Files
doneit-web/_platforms/browser/www/8025-es5.6f2c26336bfcf3f7e01a.js
T
tiago.kayaya 24e2a8f518 save
2021-08-18 18:58:02 +01:00

1 line
2.8 KiB
JavaScript

!function(){function e(e,t,n,r,i,o,a){try{var c=e[o](a),s=c.value}catch(h){return void n(h)}c.done?t(s):Promise.resolve(s).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(i,o){var a=t.apply(n,r);function c(t){e(a,i,o,c,s,"next",t)}function s(t){e(a,i,o,c,s,"throw",t)}c(void 0)})}}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8025],{18025:function(e,r,i){"use strict";i.r(r),i.d(r,{pwa_camera_modal_instance:function(){return a}});var o=i(75485),a=function(){function e(n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,o.r)(this,n),this.noDevicesText="No camera found",this.noDevicesButtonText="Choose image",this.handlePhoto=function(){var e=t(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.onPhoto.emit(t);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),this.handleNoDeviceError=function(){var e=t(regeneratorRuntime.mark(function e(t){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.noDeviceError.emit(t);case 1:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),this.onPhoto=(0,o.c)(this,"onPhoto",7),this.noDeviceError=(0,o.c)(this,"noDeviceError",7)}var r,i,a;return r=e,a=[{key:"style",get:function(){return":host{z-index:1000;position:fixed;top:0;left:0;width:100%;height:100%;contain:strict;--inset-width:600px;--inset-height:600px}.wrapper,:host{display:-ms-flexbox;display:flex}.wrapper{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:rgba(0,0,0,.15)}.content{-webkit-box-shadow:0 0 5px rgba(0,0,0,.2);box-shadow:0 0 5px rgba(0,0,0,.2);width:var(--inset-width);height:var(--inset-height);max-height:100%}@media only screen and (max-width:600px){.content{width:100%;height:100%}}"}}],(i=[{key:"handleBackdropClick",value:function(e){e.target!==this.el&&this.onPhoto.emit(null)}},{key:"handleComponentClick",value:function(e){e.stopPropagation()}},{key:"handleBackdropKeyUp",value:function(e){"Escape"===e.key&&this.onPhoto.emit(null)}},{key:"render",value:function(){var e=this;return(0,o.h)("div",{class:"wrapper",onClick:function(t){return e.handleBackdropClick(t)}},(0,o.h)("div",{class:"content"},(0,o.h)("pwa-camera",{onClick:function(t){return e.handleComponentClick(t)},handlePhoto:this.handlePhoto,handleNoDeviceError:this.handleNoDeviceError,noDevicesButtonText:this.noDevicesButtonText,noDevicesText:this.noDevicesText})))}},{key:"el",get:function(){return(0,o.g)(this)}}])&&n(r.prototype,i),a&&n(r,a),e}()}}])}();