File: /var/www/vhost/disk-apps/pwa.sports-crowd.com/node_modules/@capacitor/clipboard/dist/plugin.js.map
{"version":3,"file":"plugin.js","sources":["esm/web.js","esm/index.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class ClipboardWeb extends WebPlugin {\n async write(options) {\n if (typeof navigator === 'undefined' || !navigator.clipboard) {\n throw this.unavailable('Clipboard API not available in this browser');\n }\n if (options.string !== undefined) {\n await this.writeText(options.string);\n }\n else if (options.url) {\n await this.writeText(options.url);\n }\n else if (options.image) {\n if (typeof ClipboardItem !== 'undefined') {\n try {\n const blob = await (await fetch(options.image)).blob();\n const clipboardItemInput = new ClipboardItem({ [blob.type]: blob });\n await navigator.clipboard.write([clipboardItemInput]);\n }\n catch (err) {\n throw new Error('Failed to write image');\n }\n }\n else {\n throw this.unavailable('Writing images to the clipboard is not supported in this browser');\n }\n }\n else {\n throw new Error('Nothing to write');\n }\n }\n async read() {\n if (typeof navigator === 'undefined' || !navigator.clipboard) {\n throw this.unavailable('Clipboard API not available in this browser');\n }\n if (typeof ClipboardItem !== 'undefined') {\n try {\n const clipboardItems = await navigator.clipboard.read();\n const type = clipboardItems[0].types[0];\n const clipboardBlob = await clipboardItems[0].getType(type);\n const data = await this._getBlobData(clipboardBlob, type);\n return { value: data, type };\n }\n catch (err) {\n return this.readText();\n }\n }\n else {\n return this.readText();\n }\n }\n async readText() {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.readText) {\n throw this.unavailable('Reading from clipboard not supported in this browser');\n }\n const text = await navigator.clipboard.readText();\n return { value: text, type: 'text/plain' };\n }\n async writeText(text) {\n if (typeof navigator === 'undefined' ||\n !navigator.clipboard ||\n !navigator.clipboard.writeText) {\n throw this.unavailable('Writting to clipboard not supported in this browser');\n }\n await navigator.clipboard.writeText(text);\n }\n _getBlobData(clipboardBlob, type) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n if (type.includes('image')) {\n reader.readAsDataURL(clipboardBlob);\n }\n else {\n reader.readAsText(clipboardBlob);\n }\n reader.onloadend = () => {\n const r = reader.result;\n resolve(r);\n };\n reader.onerror = e => {\n reject(e);\n };\n });\n }\n}\n//# sourceMappingURL=web.js.map","import { registerPlugin } from '@capacitor/core';\nimport { ClipboardWeb } from './web';\nconst Clipboard = registerPlugin('Clipboard', {\n web: () => new ClipboardWeb(),\n});\nexport * from './definitions';\nexport { Clipboard };\n//# sourceMappingURL=index.js.map"],"names":["WebPlugin","registerPlugin"],"mappings":";;;IACO,MAAM,YAAY,SAASA,cAAS,CAAC;IAC5C,IAAI,MAAM,KAAK,CAAC,OAAO,EAAE;IACzB,QAAQ,IAAI,OAAO,SAAS,KAAK,WAAW,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;IACtE,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,6CAA6C,CAAC,CAAC;IAClF,SAAS;IACT,QAAQ,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;IAC1C,YAAY,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,SAAS;IACT,aAAa,IAAI,OAAO,CAAC,GAAG,EAAE;IAC9B,YAAY,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9C,SAAS;IACT,aAAa,IAAI,OAAO,CAAC,KAAK,EAAE;IAChC,YAAY,IAAI,OAAO,aAAa,KAAK,WAAW,EAAE;IACtD,gBAAgB,IAAI;IACpB,oBAAoB,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IAC3E,oBAAoB,MAAM,kBAAkB,GAAG,IAAI,aAAa,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,EAAE,CAAC,CAAC;IACxF,oBAAoB,MAAM,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAAC,CA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