Files
doneit-web/.angular/cache/14.2.12/babel-webpack/bac5f04bf50bfab3e66b077827c72f11.json
T
Eudes Inácio 53b71ea16f its working
2023-06-30 09:54:21 +01:00

1 line
78 KiB
JSON

{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { r as registerInstance, d as getContext, h, g as getElement } from './core-f86805ad.js';\n\n/**\r\n * MediaStream ImageCapture polyfill\r\n *\r\n * @license\r\n * Copyright 2018 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet ImageCapture = window.ImageCapture;\nif (typeof ImageCapture === 'undefined') {\n ImageCapture = class {\n /**\r\n * TODO https://www.w3.org/TR/image-capture/#constructors\r\n *\r\n * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind\r\n */\n constructor(videoStreamTrack) {\n if (videoStreamTrack.kind !== 'video') throw new DOMException('NotSupportedError');\n this._videoStreamTrack = videoStreamTrack;\n if (!('readyState' in this._videoStreamTrack)) {\n // Polyfill for Firefox\n this._videoStreamTrack.readyState = 'live';\n }\n // MediaStream constructor not available until Chrome 55 - https://www.chromestatus.com/feature/5912172546752512\n this._previewStream = new MediaStream([videoStreamTrack]);\n this.videoElement = document.createElement('video');\n this.videoElementPlaying = new Promise(resolve => {\n this.videoElement.addEventListener('playing', resolve);\n });\n if (HTMLMediaElement) {\n this.videoElement.srcObject = this._previewStream; // Safari 11 doesn't allow use of createObjectURL for MediaStream\n } else {\n this.videoElement.src = URL.createObjectURL(this._previewStream);\n }\n this.videoElement.muted = true;\n this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784\n this.videoElement.play();\n this.canvasElement = document.createElement('canvas');\n // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas\n this.canvas2dContext = this.canvasElement.getContext('2d');\n }\n /**\r\n * https://w3c.github.io/mediacapture-image/index.html#dom-imagecapture-videostreamtrack\r\n * @return {MediaStreamTrack} The MediaStreamTrack passed into the constructor\r\n */\n get videoStreamTrack() {\n return this._videoStreamTrack;\n }\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities\r\n * @return {Promise<PhotoCapabilities>} Fulfilled promise with\r\n * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities)\r\n * object on success, rejected promise on failure\r\n */\n getPhotoCapabilities() {\n return new Promise(function executorGPC(resolve, reject) {\n // TODO see https://github.com/w3c/mediacapture-image/issues/97\n const MediaSettingsRange = {\n current: 0,\n min: 0,\n max: 0\n };\n resolve({\n exposureCompensation: MediaSettingsRange,\n exposureMode: 'none',\n fillLightMode: ['none'],\n focusMode: 'none',\n imageHeight: MediaSettingsRange,\n imageWidth: MediaSettingsRange,\n iso: MediaSettingsRange,\n redEyeReduction: false,\n whiteBalanceMode: 'none',\n zoom: MediaSettingsRange\n });\n reject(new DOMException('OperationError'));\n });\n }\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions\r\n * @param {Object} photoSettings - Photo settings dictionary, https://www.w3.org/TR/image-capture/#idl-def-photosettings\r\n * @return {Promise<void>} Fulfilled promise on success, rejected promise on failure\r\n */\n setOptions(_photoSettings = {}) {\n return new Promise(function executorSO(_resolve, _reject) {\n // TODO\n });\n }\n /**\r\n * TODO\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto\r\n * @return {Promise<Blob>} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob)\r\n * argument on success; rejected promise on failure\r\n */\n takePhoto() {\n const self = this;\n return new Promise(function executorTP(resolve, reject) {\n // `If the readyState of the MediaStreamTrack provided in the constructor is not live,\n // return a promise rejected with a new DOMException whose name is \"InvalidStateError\".`\n if (self._videoStreamTrack.readyState !== 'live') {\n return reject(new DOMException('InvalidStateError'));\n }\n self.videoElementPlaying.then(() => {\n try {\n self.canvasElement.width = self.videoElement.videoWidth;\n self.canvasElement.height = self.videoElement.videoHeight;\n self.canvas2dContext.drawImage(self.videoElement, 0, 0);\n self.canvasElement.toBlob(resolve);\n } catch (error) {\n reject(new DOMException('UnknownError'));\n }\n });\n });\n }\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-grabframe\r\n * @return {Promise<ImageBitmap>} Fulfilled promise with\r\n * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images)\r\n * argument on success; rejected promise on failure\r\n */\n grabFrame() {\n const self = this;\n return new Promise(function executorGF(resolve, reject) {\n // `If the readyState of the MediaStreamTrack provided in the constructor is not live,\n // return a promise rejected with a new DOMException whose name is \"InvalidStateError\".`\n if (self._videoStreamTrack.readyState !== 'live') {\n return reject(new DOMException('InvalidStateError'));\n }\n self.videoElementPlaying.then(() => {\n try {\n self.canvasElement.width = self.videoElement.videoWidth;\n self.canvasElement.height = self.videoElement.videoHeight;\n self.canvas2dContext.drawImage(self.videoElement, 0, 0);\n // TODO polyfill https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap for IE\n resolve(window.createImageBitmap(self.canvasElement));\n } catch (error) {\n reject(new DOMException('UnknownError'));\n }\n });\n });\n }\n };\n}\nwindow.ImageCapture = ImageCapture;\nconst CameraPWA = class {\n constructor(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.facingMode = 'user';\n this.noDevicesText = 'No camera found';\n this.noDevicesButtonText = 'Choose image';\n this.showShutterOverlay = false;\n this.flashIndex = 0;\n this.hasCamera = null;\n this.rotation = 0;\n this.deviceError = null;\n // Whether the device has multiple cameras (front/back)\n this.hasMultipleCameras = false;\n // Whether the device has flash support\n this.hasFlash = false;\n // Flash modes for camera\n this.flashModes = [];\n // Current flash mode\n this.flashMode = 'off';\n this.handlePickFile = _e => {};\n this.handleShutterClick = _e => {\n console.log();\n this.capture();\n };\n this.handleRotateClick = _e => {\n this.rotate();\n };\n this.handleClose = _e => {\n this.handlePhoto && this.handlePhoto(null);\n };\n this.handleFlashClick = _e => {\n this.cycleFlash();\n };\n this.handleCancelPhoto = _e => {\n const track = this.stream && this.stream.getTracks()[0];\n let c = track && track.getConstraints();\n this.photo = null;\n if (c) {\n this.initCamera({\n video: {\n facingMode: c.facingMode\n }\n });\n } else {\n this.initCamera();\n }\n };\n this.handleAcceptPhoto = _e => {\n this.handlePhoto && this.handlePhoto(this.photo);\n };\n this.handleFileInputChange = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (e) {\n const input = e.target;\n const file = input.files[0];\n try {\n const orientation = yield _this.getOrientation(file);\n console.log('Got orientation', orientation);\n _this.photoOrientation = orientation;\n } catch (e) {}\n _this.handlePhoto && _this.handlePhoto(file);\n });\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }();\n this.handleVideoMetadata = e => {\n console.log('Video metadata', e);\n };\n this.isServer = getContext(this, \"isServer\");\n }\n componentDidLoad() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n if (_this2.isServer) {\n return;\n }\n _this2.defaultConstraints = {\n video: {\n facingMode: _this2.facingMode\n }\n };\n // Figure out how many cameras we have\n yield _this2.queryDevices();\n // Initialize the camera\n yield _this2.initCamera();\n })();\n }\n componentDidUnload() {\n this.stopStream();\n this.photoSrc && URL.revokeObjectURL(this.photoSrc);\n }\n hasImageCapture() {\n return 'ImageCapture' in window;\n }\n /**\n * Query the list of connected devices and figure out how many video inputs we have.\n */\n queryDevices() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n try {\n const devices = yield navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter(d => d.kind == 'videoinput');\n _this3.hasCamera = !!videoDevices.length;\n _this3.hasMultipleCameras = videoDevices.length > 1;\n } catch (e) {\n _this3.deviceError = e;\n }\n })();\n }\n initCamera(constraints) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n if (!constraints) {\n constraints = _this4.defaultConstraints;\n }\n try {\n const stream = yield navigator.mediaDevices.getUserMedia(Object.assign({\n video: true,\n audio: false\n }, constraints));\n _this4.initStream(stream);\n } catch (e) {\n _this4.deviceError = e;\n _this4.handleNoDeviceError && _this4.handleNoDeviceError(e);\n }\n })();\n }\n initStream(stream) {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n _this5.stream = stream;\n _this5.videoElement.srcObject = stream;\n if (_this5.hasImageCapture()) {\n _this5.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]);\n yield _this5.initPhotoCapabilities(_this5.imageCapture);\n } else {\n _this5.deviceError = 'No image capture';\n _this5.handleNoDeviceError && _this5.handleNoDeviceError();\n }\n // Always re-render\n _this5.el.forceUpdate();\n })();\n }\n initPhotoCapabilities(imageCapture) {\n var _this6 = this;\n return _asyncToGenerator(function* () {\n const c = yield imageCapture.getPhotoCapabilities();\n if (c.fillLightMode && c.fillLightMode.length > 1) {\n _this6.flashModes = c.fillLightMode.map(m => m);\n // Try to recall the current flash mode\n if (_this6.flashMode) {\n _this6.flashMode = _this6.flashModes[_this6.flashModes.indexOf(_this6.flashMode)] || 'off';\n _this6.flashIndex = _this6.flashModes.indexOf(_this6.flashMode) || 0;\n } else {\n _this6.flashIndex = 0;\n }\n }\n })();\n }\n stopStream() {\n this.stream && this.stream.getTracks().forEach(track => track.stop());\n }\n capture() {\n var _this7 = this;\n return _asyncToGenerator(function* () {\n if (_this7.hasImageCapture()) {\n try {\n const photo = yield _this7.imageCapture.takePhoto({\n fillLightMode: _this7.flashModes.length > 1 ? _this7.flashMode : undefined\n });\n yield _this7.flashScreen();\n _this7.promptAccept(photo);\n } catch (e) {\n console.error('Unable to take photo!', e);\n }\n }\n _this7.stopStream();\n })();\n }\n promptAccept(photo) {\n var _this8 = this;\n return _asyncToGenerator(function* () {\n _this8.photo = photo;\n const orientation = yield _this8.getOrientation(photo);\n console.log('Got orientation', orientation);\n _this8.photoOrientation = orientation;\n if (orientation) {\n switch (orientation) {\n case 1:\n case 2:\n _this8.rotation = 0;\n break;\n case 3:\n case 4:\n _this8.rotation = 180;\n break;\n case 5:\n case 6:\n _this8.rotation = 90;\n break;\n case 7:\n case 8:\n _this8.rotation = 270;\n break;\n }\n }\n _this8.photoSrc = URL.createObjectURL(photo);\n })();\n }\n getOrientation(file) {\n return new Promise(resolve => {\n const reader = new FileReader();\n reader.onload = event => {\n const view = new DataView(event.target.result);\n if (view.getUint16(0, false) !== 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker === 0xFFE1) {\n if (view.getUint32(offset += 2, false) !== 0x45786966) {\n return resolve(-1);\n }\n const little = view.getUint16(offset += 6, false) === 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + i * 12, little) === 0x0112) {\n return resolve(view.getUint16(offset + i * 12 + 8, little));\n }\n }\n } else if ((marker & 0xFF00) !== 0xFF00) {\n break;\n } else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.readAsArrayBuffer(file.slice(0, 64 * 1024));\n });\n }\n rotate() {\n this.stopStream();\n const track = this.stream && this.stream.getTracks()[0];\n if (!track) {\n return;\n }\n let c = track.getConstraints();\n let facingMode = c.facingMode;\n if (!facingMode) {\n let c = track.getCapabilities();\n facingMode = c.facingMode[0];\n }\n if (facingMode === 'environment') {\n this.initCamera({\n video: {\n facingMode: 'user'\n }\n });\n } else {\n this.initCamera({\n video: {\n facingMode: 'environment'\n }\n });\n }\n }\n setFlashMode(mode) {\n console.log('New flash mode: ', mode);\n this.flashMode = mode;\n }\n cycleFlash() {\n if (this.flashModes.length > 0) {\n this.flashIndex = (this.flashIndex + 1) % this.flashModes.length;\n this.setFlashMode(this.flashModes[this.flashIndex]);\n }\n }\n flashScreen() {\n var _this9 = this;\n return _asyncToGenerator(function* () {\n return new Promise((resolve, _reject) => {\n _this9.showShutterOverlay = true;\n setTimeout(() => {\n _this9.showShutterOverlay = false;\n resolve();\n }, 100);\n });\n })();\n }\n iconExit() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconPhotos() {\n return h(\"svg\", {\n xmlns: 'http://www.w3.org/2000/svg',\n width: '512',\n height: '512',\n viewBox: '0 0 512 512'\n }, h(\"title\", null, \"ionicons-v5-e\"), h(\"path\", {\n d: 'M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z'\n }), h(\"path\", {\n d: 'M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z'\n }));\n }\n iconConfirm() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconReverseCamera() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n iconRetake() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconFlashOff() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n iconFlashOn() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E`;\n }\n iconFlashAuto() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n render() {\n // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` };\n const acceptStyles = {};\n return h(\"div\", {\n class: \"camera-wrapper\"\n }, h(\"div\", {\n class: \"camera-header\"\n }, h(\"section\", {\n class: \"items\"\n }, h(\"div\", {\n class: \"item close\",\n onClick: e => this.handleClose(e)\n }, h(\"img\", {\n src: this.iconExit()\n })), h(\"div\", {\n class: \"item flash\",\n onClick: e => this.handleFlashClick(e)\n }, this.flashModes.length > 0 && h(\"div\", null, this.flashMode == 'off' ? h(\"img\", {\n src: this.iconFlashOff()\n }) : '', this.flashMode == 'auto' ? h(\"img\", {\n src: this.iconFlashAuto()\n }) : '', this.flashMode == 'flash' ? h(\"img\", {\n src: this.iconFlashOn()\n }) : '')))), (this.hasCamera === false || !!this.deviceError) && h(\"div\", {\n class: \"no-device\"\n }, h(\"h2\", null, this.noDevicesText), h(\"label\", {\n htmlFor: \"_pwa-elements-camera-input\"\n }, this.noDevicesButtonText), h(\"input\", {\n type: \"file\",\n id: \"_pwa-elements-camera-input\",\n onChange: this.handleFileInputChange,\n accept: \"image/*\",\n class: \"select-file-button\"\n })), this.photo ? h(\"div\", {\n class: \"accept\"\n }, h(\"div\", {\n class: \"accept-image\",\n style: Object.assign({\n backgroundImage: `url(${this.photoSrc})`\n }, acceptStyles)\n })) : h(\"div\", {\n class: \"camera-video\"\n }, this.showShutterOverlay && h(\"div\", {\n class: \"shutter-overlay\"\n }), this.hasImageCapture() ? h(\"video\", {\n ref: el => this.videoElement = el,\n onLoadedMetaData: this.handleVideoMetadata,\n autoplay: true,\n playsinline: true\n }) : h(\"canvas\", {\n ref: el => this.canvasElement = el,\n width: \"100%\",\n height: \"100%\"\n }), h(\"canvas\", {\n class: \"offscreen-image-render\",\n ref: e => this.offscreenCanvas = e,\n width: \"100%\",\n height: \"100%\"\n })), this.hasCamera && h(\"div\", {\n class: \"camera-footer\"\n }, !this.photo ? [h(\"div\", {\n class: \"pick-image\",\n onClick: this.handlePickFile\n }, h(\"label\", {\n htmlFor: \"_pwa-elements-file-pick\"\n }, this.iconPhotos()), h(\"input\", {\n type: \"file\",\n id: \"_pwa-elements-file-pick\",\n onChange: this.handleFileInputChange,\n accept: \"image/*\",\n class: \"pick-image-button\"\n })), h(\"div\", {\n class: \"shutter\",\n onClick: this.handleShutterClick\n }, h(\"div\", {\n class: \"shutter-button\"\n })), h(\"div\", {\n class: \"rotate\",\n onClick: this.handleRotateClick\n }, h(\"img\", {\n src: this.iconReverseCamera()\n }))] : h(\"section\", {\n class: \"items\"\n }, h(\"div\", {\n class: \"item accept-cancel\",\n onClick: e => this.handleCancelPhoto(e)\n }, h(\"img\", {\n src: this.iconRetake()\n })), h(\"div\", {\n class: \"item accept-use\",\n onClick: e => this.handleAcceptPhoto(e)\n }, h(\"img\", {\n src: this.iconConfirm()\n })))));\n }\n static get assetsDirs() {\n return [\"icons\"];\n }\n get el() {\n return getElement(this);\n }\n static get style() {\n return \":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system,BlinkMacSystemFont,“Segoe UI”,“Roboto”,“Droid Sans”,“Helvetica Neue”,sans-serif;display:block}.items,:host{width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:#fff;background-color:#000;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:#fff;background-color:#000;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}\\@media (max-height:375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden}.camera-video,video{background-color:#000}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:#fff}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:#fff;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:#fff;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;color:#fff}.rotate,.rotate img{width:var(--icon-size-footer)}.rotate img{height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:#000}.error{width:100%;height:100%;-ms-flex-pack:center;-ms-flex-align:center}.error,.no-device{color:#fff;display:-ms-flexbox;display:flex;justify-content:center;align-items:center}.no-device{background-color:#000;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;-ms-flex-pack:center}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:#000}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:#000;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:50%;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer}.close img,.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-cancel img,.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}\";\n }\n};\nexport { CameraPWA as pwa_camera };","map":{"version":3,"names":["r","registerInstance","d","getContext","h","g","getElement","ImageCapture","window","constructor","videoStreamTrack","kind","DOMException","_videoStreamTrack","readyState","_previewStream","MediaStream","videoElement","document","createElement","videoElementPlaying","Promise","resolve","addEventListener","HTMLMediaElement","srcObject","src","URL","createObjectURL","muted","setAttribute","play","canvasElement","canvas2dContext","getPhotoCapabilities","executorGPC","reject","MediaSettingsRange","current","min","max","exposureCompensation","exposureMode","fillLightMode","focusMode","imageHeight","imageWidth","iso","redEyeReduction","whiteBalanceMode","zoom","setOptions","_photoSettings","executorSO","_resolve","_reject","takePhoto","self","executorTP","then","width","videoWidth","height","videoHeight","drawImage","toBlob","error","grabFrame","executorGF","createImageBitmap","CameraPWA","hostRef","_this","facingMode","noDevicesText","noDevicesButtonText","showShutterOverlay","flashIndex","hasCamera","rotation","deviceError","hasMultipleCameras","hasFlash","flashModes","flashMode","handlePickFile","_e","handleShutterClick","console","log","capture","handleRotateClick","rotate","handleClose","handlePhoto","handleFlashClick","cycleFlash","handleCancelPhoto","track","stream","getTracks","c","getConstraints","photo","initCamera","video","handleAcceptPhoto","handleFileInputChange","_ref","_asyncToGenerator","e","input","target","file","files","orientation","getOrientation","photoOrientation","_x","apply","arguments","handleVideoMetadata","isServer","componentDidLoad","_this2","defaultConstraints","queryDevices","componentDidUnload","stopStream","photoSrc","revokeObjectURL","hasImageCapture","_this3","devices","navigator","mediaDevices","enumerateDevices","videoDevices","filter","length","constraints","_this4","getUserMedia","Object","assign","audio","initStream","handleNoDeviceError","_this5","imageCapture","getVideoTracks","initPhotoCapabilities","el","forceUpdate","_this6","map","m","indexOf","forEach","stop","_this7","undefined","flashScreen","promptAccept","_this8","reader","FileReader","onload","event","view","DataView","result","getUint16","byteLength","offset","marker","getUint32","little","tags","i","readAsArrayBuffer","slice","getCapabilities","setFlashMode","mode","_this9","setTimeout","iconExit","iconPhotos","xmlns","viewBox","iconConfirm","iconReverseCamera","iconRetake","iconFlashOff","iconFlashOn","iconFlashAuto","render","acceptStyles","class","onClick","htmlFor","type","id","onChange","accept","style","backgroundImage","ref","onLoadedMetaData","autoplay","playsinline","offscreenCanvas","assetsDirs","pwa_camera"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/pwa-elements/dist/esm/pwa-camera.entry.js"],"sourcesContent":["import { r as registerInstance, d as getContext, h, g as getElement } from './core-f86805ad.js';\n\n/**\r\n * MediaStream ImageCapture polyfill\r\n *\r\n * @license\r\n * Copyright 2018 Google Inc.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nlet ImageCapture = window.ImageCapture;\r\nif (typeof ImageCapture === 'undefined') {\r\n ImageCapture = class {\r\n /**\r\n * TODO https://www.w3.org/TR/image-capture/#constructors\r\n *\r\n * @param {MediaStreamTrack} videoStreamTrack - A MediaStreamTrack of the 'video' kind\r\n */\r\n constructor(videoStreamTrack) {\r\n if (videoStreamTrack.kind !== 'video')\r\n throw new DOMException('NotSupportedError');\r\n this._videoStreamTrack = videoStreamTrack;\r\n if (!('readyState' in this._videoStreamTrack)) {\r\n // Polyfill for Firefox\r\n this._videoStreamTrack.readyState = 'live';\r\n }\r\n // MediaStream constructor not available until Chrome 55 - https://www.chromestatus.com/feature/5912172546752512\r\n this._previewStream = new MediaStream([videoStreamTrack]);\r\n this.videoElement = document.createElement('video');\r\n this.videoElementPlaying = new Promise(resolve => {\r\n this.videoElement.addEventListener('playing', resolve);\r\n });\r\n if (HTMLMediaElement) {\r\n this.videoElement.srcObject = this._previewStream; // Safari 11 doesn't allow use of createObjectURL for MediaStream\r\n }\r\n else {\r\n this.videoElement.src = URL.createObjectURL(this._previewStream);\r\n }\r\n this.videoElement.muted = true;\r\n this.videoElement.setAttribute('playsinline', ''); // Required by Safari on iOS 11. See https://webkit.org/blog/6784\r\n this.videoElement.play();\r\n this.canvasElement = document.createElement('canvas');\r\n // TODO Firefox has https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas\r\n this.canvas2dContext = this.canvasElement.getContext('2d');\r\n }\r\n /**\r\n * https://w3c.github.io/mediacapture-image/index.html#dom-imagecapture-videostreamtrack\r\n * @return {MediaStreamTrack} The MediaStreamTrack passed into the constructor\r\n */\r\n get videoStreamTrack() {\r\n return this._videoStreamTrack;\r\n }\r\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilities\r\n * @return {Promise<PhotoCapabilities>} Fulfilled promise with\r\n * [PhotoCapabilities](https://www.w3.org/TR/image-capture/#idl-def-photocapabilities)\r\n * object on success, rejected promise on failure\r\n */\r\n getPhotoCapabilities() {\r\n return new Promise(function executorGPC(resolve, reject) {\r\n // TODO see https://github.com/w3c/mediacapture-image/issues/97\r\n const MediaSettingsRange = {\r\n current: 0, min: 0, max: 0,\r\n };\r\n resolve({\r\n exposureCompensation: MediaSettingsRange,\r\n exposureMode: 'none',\r\n fillLightMode: ['none'],\r\n focusMode: 'none',\r\n imageHeight: MediaSettingsRange,\r\n imageWidth: MediaSettingsRange,\r\n iso: MediaSettingsRange,\r\n redEyeReduction: false,\r\n whiteBalanceMode: 'none',\r\n zoom: MediaSettingsRange,\r\n });\r\n reject(new DOMException('OperationError'));\r\n });\r\n }\r\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions\r\n * @param {Object} photoSettings - Photo settings dictionary, https://www.w3.org/TR/image-capture/#idl-def-photosettings\r\n * @return {Promise<void>} Fulfilled promise on success, rejected promise on failure\r\n */\r\n setOptions(_photoSettings = {}) {\r\n return new Promise(function executorSO(_resolve, _reject) {\r\n // TODO\r\n });\r\n }\r\n /**\r\n * TODO\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto\r\n * @return {Promise<Blob>} Fulfilled promise with [Blob](https://www.w3.org/TR/FileAPI/#blob)\r\n * argument on success; rejected promise on failure\r\n */\r\n takePhoto() {\r\n const self = this;\r\n return new Promise(function executorTP(resolve, reject) {\r\n // `If the readyState of the MediaStreamTrack provided in the constructor is not live,\r\n // return a promise rejected with a new DOMException whose name is \"InvalidStateError\".`\r\n if (self._videoStreamTrack.readyState !== 'live') {\r\n return reject(new DOMException('InvalidStateError'));\r\n }\r\n self.videoElementPlaying.then(() => {\r\n try {\r\n self.canvasElement.width = self.videoElement.videoWidth;\r\n self.canvasElement.height = self.videoElement.videoHeight;\r\n self.canvas2dContext.drawImage(self.videoElement, 0, 0);\r\n self.canvasElement.toBlob(resolve);\r\n }\r\n catch (error) {\r\n reject(new DOMException('UnknownError'));\r\n }\r\n });\r\n });\r\n }\r\n /**\r\n * Implements https://www.w3.org/TR/image-capture/#dom-imagecapture-grabframe\r\n * @return {Promise<ImageBitmap>} Fulfilled promise with\r\n * [ImageBitmap](https://www.w3.org/TR/html51/webappapis.html#webappapis-images)\r\n * argument on success; rejected promise on failure\r\n */\r\n grabFrame() {\r\n const self = this;\r\n return new Promise(function executorGF(resolve, reject) {\r\n // `If the readyState of the MediaStreamTrack provided in the constructor is not live,\r\n // return a promise rejected with a new DOMException whose name is \"InvalidStateError\".`\r\n if (self._videoStreamTrack.readyState !== 'live') {\r\n return reject(new DOMException('InvalidStateError'));\r\n }\r\n self.videoElementPlaying.then(() => {\r\n try {\r\n self.canvasElement.width = self.videoElement.videoWidth;\r\n self.canvasElement.height = self.videoElement.videoHeight;\r\n self.canvas2dContext.drawImage(self.videoElement, 0, 0);\r\n // TODO polyfill https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmapFactories/createImageBitmap for IE\r\n resolve(window.createImageBitmap(self.canvasElement));\r\n }\r\n catch (error) {\r\n reject(new DOMException('UnknownError'));\r\n }\r\n });\r\n });\r\n }\r\n };\r\n}\r\nwindow.ImageCapture = ImageCapture;\n\nconst CameraPWA = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.facingMode = 'user';\n this.noDevicesText = 'No camera found';\n this.noDevicesButtonText = 'Choose image';\n this.showShutterOverlay = false;\n this.flashIndex = 0;\n this.hasCamera = null;\n this.rotation = 0;\n this.deviceError = null;\n // Whether the device has multiple cameras (front/back)\n this.hasMultipleCameras = false;\n // Whether the device has flash support\n this.hasFlash = false;\n // Flash modes for camera\n this.flashModes = [];\n // Current flash mode\n this.flashMode = 'off';\n this.handlePickFile = (_e) => {\n };\n this.handleShutterClick = (_e) => {\n console.log();\n this.capture();\n };\n this.handleRotateClick = (_e) => {\n this.rotate();\n };\n this.handleClose = (_e) => {\n this.handlePhoto && this.handlePhoto(null);\n };\n this.handleFlashClick = (_e) => {\n this.cycleFlash();\n };\n this.handleCancelPhoto = (_e) => {\n const track = this.stream && this.stream.getTracks()[0];\n let c = track && track.getConstraints();\n this.photo = null;\n if (c) {\n this.initCamera({\n video: {\n facingMode: c.facingMode\n }\n });\n }\n else {\n this.initCamera();\n }\n };\n this.handleAcceptPhoto = (_e) => {\n this.handlePhoto && this.handlePhoto(this.photo);\n };\n this.handleFileInputChange = async (e) => {\n const input = e.target;\n const file = input.files[0];\n try {\n const orientation = await this.getOrientation(file);\n console.log('Got orientation', orientation);\n this.photoOrientation = orientation;\n }\n catch (e) {\n }\n this.handlePhoto && this.handlePhoto(file);\n };\n this.handleVideoMetadata = (e) => {\n console.log('Video metadata', e);\n };\n this.isServer = getContext(this, \"isServer\");\n }\n async componentDidLoad() {\n if (this.isServer) {\n return;\n }\n this.defaultConstraints = {\n video: {\n facingMode: this.facingMode\n }\n };\n // Figure out how many cameras we have\n await this.queryDevices();\n // Initialize the camera\n await this.initCamera();\n }\n componentDidUnload() {\n this.stopStream();\n this.photoSrc && URL.revokeObjectURL(this.photoSrc);\n }\n hasImageCapture() {\n return 'ImageCapture' in window;\n }\n /**\n * Query the list of connected devices and figure out how many video inputs we have.\n */\n async queryDevices() {\n try {\n const devices = await navigator.mediaDevices.enumerateDevices();\n const videoDevices = devices.filter(d => d.kind == 'videoinput');\n this.hasCamera = !!videoDevices.length;\n this.hasMultipleCameras = videoDevices.length > 1;\n }\n catch (e) {\n this.deviceError = e;\n }\n }\n async initCamera(constraints) {\n if (!constraints) {\n constraints = this.defaultConstraints;\n }\n try {\n const stream = await navigator.mediaDevices.getUserMedia(Object.assign({ video: true, audio: false }, constraints));\n this.initStream(stream);\n }\n catch (e) {\n this.deviceError = e;\n this.handleNoDeviceError && this.handleNoDeviceError(e);\n }\n }\n async initStream(stream) {\n this.stream = stream;\n this.videoElement.srcObject = stream;\n if (this.hasImageCapture()) {\n this.imageCapture = new window.ImageCapture(stream.getVideoTracks()[0]);\n await this.initPhotoCapabilities(this.imageCapture);\n }\n else {\n this.deviceError = 'No image capture';\n this.handleNoDeviceError && this.handleNoDeviceError();\n }\n // Always re-render\n this.el.forceUpdate();\n }\n async initPhotoCapabilities(imageCapture) {\n const c = await imageCapture.getPhotoCapabilities();\n if (c.fillLightMode && c.fillLightMode.length > 1) {\n this.flashModes = c.fillLightMode.map(m => m);\n // Try to recall the current flash mode\n if (this.flashMode) {\n this.flashMode = this.flashModes[this.flashModes.indexOf(this.flashMode)] || 'off';\n this.flashIndex = this.flashModes.indexOf(this.flashMode) || 0;\n }\n else {\n this.flashIndex = 0;\n }\n }\n }\n stopStream() {\n this.stream && this.stream.getTracks().forEach(track => track.stop());\n }\n async capture() {\n if (this.hasImageCapture()) {\n try {\n const photo = await this.imageCapture.takePhoto({\n fillLightMode: this.flashModes.length > 1 ? this.flashMode : undefined\n });\n await this.flashScreen();\n this.promptAccept(photo);\n }\n catch (e) {\n console.error('Unable to take photo!', e);\n }\n }\n this.stopStream();\n }\n async promptAccept(photo) {\n this.photo = photo;\n const orientation = await this.getOrientation(photo);\n console.log('Got orientation', orientation);\n this.photoOrientation = orientation;\n if (orientation) {\n switch (orientation) {\n case 1:\n case 2:\n this.rotation = 0;\n break;\n case 3:\n case 4:\n this.rotation = 180;\n break;\n case 5:\n case 6:\n this.rotation = 90;\n break;\n case 7:\n case 8:\n this.rotation = 270;\n break;\n }\n }\n this.photoSrc = URL.createObjectURL(photo);\n }\n getOrientation(file) {\n return new Promise(resolve => {\n const reader = new FileReader();\n reader.onload = (event) => {\n const view = new DataView(event.target.result);\n if (view.getUint16(0, false) !== 0xFFD8) {\n return resolve(-2);\n }\n const length = view.byteLength;\n let offset = 2;\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n if (marker === 0xFFE1) {\n if (view.getUint32(offset += 2, false) !== 0x45786966) {\n return resolve(-1);\n }\n const little = view.getUint16(offset += 6, false) === 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n for (let i = 0; i < tags; i++) {\n if (view.getUint16(offset + (i * 12), little) === 0x0112) {\n return resolve(view.getUint16(offset + (i * 12) + 8, little));\n }\n }\n }\n else if ((marker & 0xFF00) !== 0xFF00) {\n break;\n }\n else {\n offset += view.getUint16(offset, false);\n }\n }\n return resolve(-1);\n };\n reader.readAsArrayBuffer(file.slice(0, 64 * 1024));\n });\n }\n rotate() {\n this.stopStream();\n const track = this.stream && this.stream.getTracks()[0];\n if (!track) {\n return;\n }\n let c = track.getConstraints();\n let facingMode = c.facingMode;\n if (!facingMode) {\n let c = track.getCapabilities();\n facingMode = c.facingMode[0];\n }\n if (facingMode === 'environment') {\n this.initCamera({\n video: {\n facingMode: 'user'\n }\n });\n }\n else {\n this.initCamera({\n video: {\n facingMode: 'environment'\n }\n });\n }\n }\n setFlashMode(mode) {\n console.log('New flash mode: ', mode);\n this.flashMode = mode;\n }\n cycleFlash() {\n if (this.flashModes.length > 0) {\n this.flashIndex = (this.flashIndex + 1) % this.flashModes.length;\n this.setFlashMode(this.flashModes[this.flashIndex]);\n }\n }\n async flashScreen() {\n return new Promise((resolve, _reject) => {\n this.showShutterOverlay = true;\n setTimeout(() => {\n this.showShutterOverlay = false;\n resolve();\n }, 100);\n });\n }\n iconExit() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M402.2,134L378,109.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L139.6,109.8 c-1.6-1.6-4.1-1.6-5.7,0L109.8,134c-1.6,1.6-1.6,4.1,0,5.7l113.5,113.5c1.6,1.6,1.6,4.1,0,5.7L109.8,372.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l113.5-113.5c1.6-1.6,4.1-1.6,5.7,0l113.5,113.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l113.5-113.5C403.7,138.1,403.7,135.5,402.2,134z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconPhotos() {\n return (h(\"svg\", { xmlns: 'http://www.w3.org/2000/svg', width: '512', height: '512', viewBox: '0 0 512 512' }, h(\"title\", null, \"ionicons-v5-e\"), h(\"path\", { d: 'M450.29,112H142c-34,0-62,27.51-62,61.33V418.67C80,452.49,108,480,142,480H450c34,0,62-26.18,62-60V173.33C512,139.51,484.32,112,450.29,112Zm-77.15,61.34a46,46,0,1,1-46.28,46A46.19,46.19,0,0,1,373.14,173.33Zm-231.55,276c-17,0-29.86-13.75-29.86-30.66V353.85l90.46-80.79a46.54,46.54,0,0,1,63.44,1.83L328.27,337l-113,112.33ZM480,418.67a30.67,30.67,0,0,1-30.71,30.66H259L376.08,333a46.24,46.24,0,0,1,59.44-.16L480,370.59Z' }), h(\"path\", { d: 'M384,32H64A64,64,0,0,0,0,96V352a64.11,64.11,0,0,0,48,62V152a72,72,0,0,1,72-72H446A64.11,64.11,0,0,0,384,32Z' })));\n }\n iconConfirm() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%232CD865' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_1_'%3E%3Cg%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M208,301.4l-55.4-55.5c-1.5-1.5-4-1.6-5.6-0.1l-23.4,22.3c-1.6,1.6-1.7,4.1-0.1,5.7l81.6,81.4 c3.1,3.1,8.2,3.1,11.3,0l171.8-171.7c1.6-1.6,1.6-4.2-0.1-5.7l-23.4-22.3c-1.6-1.5-4.1-1.5-5.6,0.1L213.7,301.4 C212.1,303,209.6,303,208,301.4z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconReverseCamera() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M352,0H160C72,0,0,72,0,160v192c0,88,72,160,160,160h192c88,0,160-72,160-160V160C512,72,440,0,352,0z M356.7,365.8l-3.7,3.3c-27,23.2-61.4,35.9-96.8,35.9c-72.4,0-135.8-54.7-147-125.6c-0.3-1.9-2-3.3-3.9-3.3H64 c-3.3,0-5.2-3.8-3.2-6.4l61.1-81.4c1.6-2.1,4.7-2.1,6.4-0.1l63.3,81.4c2,2.6,0.2,6.5-3.2,6.5h-40.6c-2.5,0-4.5,2.4-3.9,4.8 c11.5,51.5,59.2,90.6,112.4,90.6c26.4,0,51.8-9.7,73.7-27.9l3.1-2.5c1.6-1.3,3.9-1.1,5.3,0.3l18.5,18.6 C358.5,361.6,358.4,364.3,356.7,365.8z M451.4,245.6l-61,83.5c-1.6,2.2-4.8,2.2-6.4,0.1l-63.3-83.3c-2-2.6-0.1-6.4,3.2-6.4h40.8 c2.5,0,4.4-2.3,3.9-4.8c-5.1-24.2-17.8-46.5-36.5-63.7c-21.2-19.4-48.2-30.1-76-30.1c-26.5,0-52.6,9.7-73.7,27.3l-3.1,2.5 c-1.6,1.3-3.9,1.2-5.4-0.3l-18.5-18.5c-1.6-1.6-1.5-4.3,0.2-5.9l3.5-3.1c27-23.2,61.4-35.9,96.8-35.9c38,0,73.9,13.7,101.2,38.7 c23.2,21.1,40.3,55.2,45.7,90.1c0.3,1.9,1.9,3.4,3.9,3.4h41.3C451.4,239.2,453.3,243,451.4,245.6z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n iconRetake() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' enable-background='new 0 0 512 512' xml:space='preserve'%3E%3Ccircle fill='%23727A87' cx='256' cy='256' r='256'/%3E%3Cg id='Icon_5_'%3E%3Cg%3E%3Cpath fill='%23FFFFFF' d='M394.2,142L370,117.8c-1.6-1.6-4.1-1.6-5.7,0L258.8,223.4c-1.6,1.6-4.1,1.6-5.7,0L147.6,117.8 c-1.6-1.6-4.1-1.6-5.7,0L117.8,142c-1.6,1.6-1.6,4.1,0,5.7l105.5,105.5c1.6,1.6,1.6,4.1,0,5.7L117.8,364.4c-1.6,1.6-1.6,4.1,0,5.7 l24.1,24.1c1.6,1.6,4.1,1.6,5.7,0l105.5-105.5c1.6-1.6,4.1-1.6,5.7,0l105.5,105.5c1.6,1.6,4.1,1.6,5.7,0l24.1-24.1 c1.6-1.6,1.6-4.1,0-5.7L288.6,258.8c-1.6-1.6-1.6-4.1,0-5.7l105.5-105.5C395.7,146.1,395.7,143.5,394.2,142z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E`;\n }\n iconFlashOff() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cg%3E%3Cpath class='st0' d='M498,483.7L42.3,28L14,56.4l149.8,149.8L91,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9c1.6,0,2.7,1.3,2.4,2.7 L197.6,507c-1,4.4,5.8,6.9,8.9,3.2l118.6-142.8L469.6,512L498,483.7z'/%3E%3Cpath class='st0' d='M449,218.2c2.5-3,0.1-7.2-3.9-7.2H301.2c-1.6,0-2.7-1.3-2.4-2.7L342.4,5c1-4.4-5.8-6.9-8.9-3.2L214.9,144.6 l161.3,161.3L449,218.2z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n iconFlashOn() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3C/svg%3E`;\n }\n iconFlashAuto() {\n return `data:image/svg+xml,%3Csvg version='1.1' id='Layer_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' style='enable-background:new 0 0 512 512;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bfill:%23FFFFFF;%7D%0A%3C/style%3E%3Cpath class='st0' d='M287.2,211c-1.6,0-2.7-1.3-2.4-2.7L328.4,5c1-4.4-5.8-6.9-8.9-3.2L77,293.8c-2.5,3-0.1,7.2,3.9,7.2h143.9 c1.6,0,2.7,1.3,2.4,2.7L183.6,507c-1,4.4,5.8,6.9,8.9,3.2l242.5-292c2.5-3,0.1-7.2-3.9-7.2L287.2,211L287.2,211z'/%3E%3Cg%3E%3Cpath class='st0' d='M321.3,186l74-186H438l74,186h-43.5l-11.9-32.5h-80.9l-12,32.5H321.3z M415.8,47.9l-27.2,70.7h54.9l-27.2-70.7 H415.8z'/%3E%3C/g%3E%3C/svg%3E`;\n }\n render() {\n // const acceptStyles = { transform: `rotate(${-this.rotation}deg)` };\n const acceptStyles = {};\n return (h(\"div\", { class: \"camera-wrapper\" }, h(\"div\", { class: \"camera-header\" }, h(\"section\", { class: \"items\" }, h(\"div\", { class: \"item close\", onClick: e => this.handleClose(e) }, h(\"img\", { src: this.iconExit() })), h(\"div\", { class: \"item flash\", onClick: e => this.handleFlashClick(e) }, this.flashModes.length > 0 && (h(\"div\", null, this.flashMode == 'off' ? h(\"img\", { src: this.iconFlashOff() }) : '', this.flashMode == 'auto' ? h(\"img\", { src: this.iconFlashAuto() }) : '', this.flashMode == 'flash' ? h(\"img\", { src: this.iconFlashOn() }) : ''))))), (this.hasCamera === false || !!this.deviceError) && (h(\"div\", { class: \"no-device\" }, h(\"h2\", null, this.noDevicesText), h(\"label\", { htmlFor: \"_pwa-elements-camera-input\" }, this.noDevicesButtonText), h(\"input\", { type: \"file\", id: \"_pwa-elements-camera-input\", onChange: this.handleFileInputChange, accept: \"image/*\", class: \"select-file-button\" }))), this.photo ? (h(\"div\", { class: \"accept\" }, h(\"div\", { class: \"accept-image\", style: Object.assign({ backgroundImage: `url(${this.photoSrc})` }, acceptStyles) }))) : (h(\"div\", { class: \"camera-video\" }, this.showShutterOverlay && (h(\"div\", { class: \"shutter-overlay\" })), this.hasImageCapture() ? (h(\"video\", { ref: (el) => this.videoElement = el, onLoadedMetaData: this.handleVideoMetadata, autoplay: true, playsinline: true })) : (h(\"canvas\", { ref: (el) => this.canvasElement = el, width: \"100%\", height: \"100%\" })), h(\"canvas\", { class: \"offscreen-image-render\", ref: e => this.offscreenCanvas = e, width: \"100%\", height: \"100%\" }))), this.hasCamera && (h(\"div\", { class: \"camera-footer\" }, !this.photo ? ([\n h(\"div\", { class: \"pick-image\", onClick: this.handlePickFile }, h(\"label\", { htmlFor: \"_pwa-elements-file-pick\" }, this.iconPhotos()), h(\"input\", { type: \"file\", id: \"_pwa-elements-file-pick\", onChange: this.handleFileInputChange, accept: \"image/*\", class: \"pick-image-button\" })),\n h(\"div\", { class: \"shutter\", onClick: this.handleShutterClick }, h(\"div\", { class: \"shutter-button\" })),\n h(\"div\", { class: \"rotate\", onClick: this.handleRotateClick }, h(\"img\", { src: this.iconReverseCamera() })),\n ]) : (h(\"section\", { class: \"items\" }, h(\"div\", { class: \"item accept-cancel\", onClick: e => this.handleCancelPhoto(e) }, h(\"img\", { src: this.iconRetake() })), h(\"div\", { class: \"item accept-use\", onClick: e => this.handleAcceptPhoto(e) }, h(\"img\", { src: this.iconConfirm() }))))))));\n }\n static get assetsDirs() { return [\"icons\"]; }\n get el() { return getElement(this); }\n static get style() { return \":host{--header-height:4em;--footer-height:9em;--header-height-landscape:3em;--footer-height-landscape:6em;--shutter-size:6em;--icon-size-header:1.5em;--icon-size-footer:2.5em;--margin-size-header:1.5em;--margin-size-footer:2.0em;font-family:-apple-system,BlinkMacSystemFont,“Segoe UI”,“Roboto”,“Droid Sans”,“Helvetica Neue”,sans-serif;display:block}.items,:host{width:100%;height:100%}.items{-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.items .item{-ms-flex:1;flex:1;text-align:center}.items .item:first-child{text-align:left}.items .item:last-child{text-align:right}.camera-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%}.camera-header{color:#fff;background-color:#000;height:var(--header-height)}.camera-header .items{padding:var(--margin-size-header)}.camera-footer{position:relative;color:#fff;background-color:#000;height:var(--footer-height)}.camera-footer .items{padding:var(--margin-size-footer)}\\@media (max-height:375px){.camera-header{--header-height:var(--header-height-landscape)}.camera-footer{--footer-height:var(--footer-height-landscape)}.camera-footer .shutter{--shutter-size:4em}}.camera-video{position:relative;-ms-flex:1;flex:1;overflow:hidden}.camera-video,video{background-color:#000}video{width:100%;height:100%;max-height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover}.pick-image{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;left:var(--margin-size-footer);top:0;height:100%;width:var(--icon-size-footer);color:#fff}.pick-image input{visibility:hidden}.pick-image svg{cursor:pointer;fill:#fff;width:var(--icon-size-footer);height:var(--icon-size-footer)}.shutter{position:absolute;left:50%;top:50%;width:var(--shutter-size);height:var(--shutter-size);margin-top:calc(var(--shutter-size) / -2);margin-left:calc(var(--shutter-size) / -2);border-radius:100%;background-color:#c6cdd8;padding:12px;-webkit-box-sizing:border-box;box-sizing:border-box}.shutter:active .shutter-button{background-color:#9da9bb}.shutter-button{background-color:#fff;border-radius:100%;width:100%;height:100%}.rotate{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;position:absolute;right:var(--margin-size-footer);top:0;height:100%;color:#fff}.rotate,.rotate img{width:var(--icon-size-footer)}.rotate img{height:var(--icon-size-footer)}.shutter-overlay{z-index:5;position:absolute;width:100%;height:100%;background-color:#000}.error{width:100%;height:100%;-ms-flex-pack:center;-ms-flex-align:center}.error,.no-device{color:#fff;display:-ms-flexbox;display:flex;justify-content:center;align-items:center}.no-device{background-color:#000;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;-ms-flex-pack:center}.no-device label{cursor:pointer;background:#fff;border-radius:6px;padding:6px 8px;color:#000}.no-device input{visibility:hidden;height:0;margin-top:16px}.accept{background-color:#000;-ms-flex:1;flex:1;overflow:hidden}.accept .accept-image{width:100%;height:100%;max-height:100%;background-position:50%;background-size:cover;background-repeat:no-repeat}.close img{cursor:pointer}.close img,.flash img{width:var(--icon-size-header);height:var(--icon-size-header)}.accept-cancel img,.accept-use img{width:var(--icon-size-footer);height:var(--icon-size-footer)}.offscreen-image-render{top:0;left:0;visibility:hidden;pointer-events:none;width:100%;height:100%}\"; }\n};\n\nexport { CameraPWA as pwa_camera };\n"],"mappings":";AAAA,SAASA,CAAC,IAAIC,gBAAgB,EAAEC,CAAC,IAAIC,UAAU,EAAEC,CAAC,EAAEC,CAAC,IAAIC,UAAU,QAAQ,oBAAoB;;AAE/F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,YAAY,GAAGC,MAAM,CAACD,YAAY;AACtC,IAAI,OAAOA,YAAY,KAAK,WAAW,EAAE;EACrCA,YAAY,GAAG,MAAM;IACjB;AACR;AACA;AACA;AACA;IACQE,WAAWA,CAACC,gBAAgB,EAAE;MAC1B,IAAIA,gBAAgB,CAACC,IAAI,KAAK,OAAO,EACjC,MAAM,IAAIC,YAAY,CAAC,mBAAmB,CAAC;MAC/C,IAAI,CAACC,iBAAiB,GAAGH,gBAAgB;MACzC,IAAI,EAAE,YAAY,IAAI,IAAI,CAACG,iBAAiB,CAAC,EAAE;QAC3C;QACA,IAAI,CAACA,iBAAiB,CAACC,UAAU,GAAG,MAAM;MAC9C;MACA;MACA,IAAI,CAACC,cAAc,GAAG,IAAIC,WAAW,CAAC,CAACN,gBAAgB,CAAC,CAAC;MACzD,IAAI,CAACO,YAAY,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;MACnD,IAAI,CAACC,mBAAmB,GAAG,IAAIC,OAAO,CAACC,OAAO,IAAI;QAC9C,IAAI,CAACL,YAAY,CAACM,gBAAgB,CAAC,SAAS,EAAED,OAAO,CAAC;MAC1D,CAAC,CAAC;MACF,IAAIE,gBAAgB,EAAE;QAClB,IAAI,CAACP,YAAY,CAACQ,SAAS,GAAG,IAAI,CAACV,cAAc,CAAC,CAAC;MACvD,CAAC,MACI;QACD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