1 line
3.2 KiB
Plaintext
1 line
3.2 KiB
Plaintext
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-img.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA6G;AAChD;;AAE7D,sBAAsB,cAAc,sBAAsB,mBAAmB,IAAI,cAAc,WAAW,YAAY,sBAAsB,mBAAmB,2BAA2B,wBAAwB;;AAElN;AACA;AACA,QAAQ,4DAAgB;AACxB,8BAA8B,4DAAW;AACzC,6BAA6B,4DAAW;AACxC,wBAAwB,4DAAW;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAC,CAAC,oDAAI,GAAG,QAAQ,mEAAU,QAAQ,EAAE,4DAAC,SAAS,mHAAmH;AAClL;AACA,cAAc,QAAQ,4DAAU,OAAO;AACvC,2BAA2B;AAC3B;AACA,MAAM;AACN;AACA;;AAE0B","file":"13-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-92848855.js';\nimport { b as getIonMode } from './ionic-global-23e7365a.js';\n\nconst imgCss = \":host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}\";\n\nconst Img = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionImgWillLoad = createEvent(this, \"ionImgWillLoad\", 7);\n this.ionImgDidLoad = createEvent(this, \"ionImgDidLoad\", 7);\n this.ionError = createEvent(this, \"ionError\", 7);\n this.onLoad = () => {\n this.ionImgDidLoad.emit();\n };\n this.onError = () => {\n this.ionError.emit();\n };\n }\n srcChanged() {\n this.addIO();\n }\n componentDidLoad() {\n this.addIO();\n }\n addIO() {\n if (this.src === undefined) {\n return;\n }\n if (typeof window !== 'undefined' &&\n 'IntersectionObserver' in window &&\n 'IntersectionObserverEntry' in window &&\n 'isIntersecting' in window.IntersectionObserverEntry.prototype) {\n this.removeIO();\n this.io = new IntersectionObserver(data => {\n // because there will only ever be one instance\n // of the element we are observing\n // we can just use data[0]\n if (data[0].isIntersecting) {\n this.load();\n this.removeIO();\n }\n });\n this.io.observe(this.el);\n }\n else {\n // fall back to setTimeout for Safari and IE\n setTimeout(() => this.load(), 200);\n }\n }\n load() {\n this.loadError = this.onError;\n this.loadSrc = this.src;\n this.ionImgWillLoad.emit();\n }\n removeIO() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n render() {\n return (h(Host, { class: getIonMode(this) }, h(\"img\", { decoding: \"async\", src: this.loadSrc, alt: this.alt, onLoad: this.onLoad, onError: this.loadError, part: \"image\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"src\": [\"srcChanged\"]\n }; }\n};\nImg.style = imgCss;\n\nexport { Img as ion_img };\n"],"sourceRoot":"webpack:///"} |