UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 56.8 kB
/*! For license information please see 78661.ae80205b71d55e85.js.LICENSE.txt */
(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[78661],{23318:function(t,e,i){i(89463),i(16280),i(44114),i(54743),i(11745),i(16573),i(78100),i(77936),i(55081),i(18111),i(22489),i(7588),i(27495),i(25440),i(42762),i(21489),i(48140),i(75044),i(21903),i(91134),i(28845),i(373),i(37467),i(44732),i(79577),i(16632),i(34226),i(9486),i(20456),i(62953),i(55815),i(64979),i(79739),i(13611),t.exports=function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function e(e){for(var i=1;i<arguments.length;i++){var n=null!=arguments[i]?arguments[i]:{};i%2?t(Object(n),!0).forEach(function(t){h(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function n(t){var e=i(t,"string");return"symbol"==typeof e?e:e+""}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,n(a.key),a)}}function s(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(t,e,i){return(e=n(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function c(t){return l(t)||d(t)||p(t)||g()}function l(t){if(Array.isArray(t))return u(t)}function d(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function p(t,e){if(t){if("string"==typeof t)return u(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var m="undefined"!=typeof window&&void 0!==window.document,f=m?window:{},v=!(!m||!f.document.documentElement)&&"ontouchstart"in f.document.documentElement,w=!!m&&"PointerEvent"in f,b="cropper",y="all",x="crop",C="move",M="zoom",k="e",D="w",A="s",B="n",O="ne",E="nw",T="se",z="sw",L="".concat(b,"-crop"),H="".concat(b,"-disabled"),N="".concat(b,"-hidden"),W="".concat(b,"-hide"),R="".concat(b,"-invisible"),S="".concat(b,"-modal"),$="".concat(b,"-move"),X="".concat(b,"Action"),j="".concat(b,"Preview"),P="crop",Y="move",I="none",U="crop",_="cropend",q="cropmove",Z="cropstart",F="dblclick",Q=v?"touchstart":"mousedown",G=v?"touchmove":"mousemove",K=v?"touchend touchcancel":"mouseup",J=w?"pointerdown":Q,V=w?"pointermove":G,tt=w?"pointerup pointercancel":K,et="ready",it="resize",nt="wheel",at="zoom",ot="image/jpeg",rt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,st=/^data:/,ht=/^data:image\/jpeg;base64,/,ct=/^img|canvas$/i,lt=200,dt=100,pt={viewMode:0,dragMode:P,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:lt,minContainerHeight:dt,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ut='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',gt=Number.isNaN||f.isNaN;function mt(t){return"number"==typeof t&&!gt(t)}var ft=function(t){return t>0&&t<1/0};function vt(t){return void 0===t}function wt(t){return"object"===a(t)&&null!==t}var bt=Object.prototype.hasOwnProperty;function yt(t){if(!wt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&bt.call(i,"isPrototypeOf")}catch(n){return!1}}function xt(t){return"function"==typeof t}var Ct=Array.prototype.slice;function Mt(t){return Array.from?Array.from(t):Ct.call(t)}function kt(t,e){return t&&xt(e)&&(Array.isArray(t)||mt(t.length)?Mt(t).forEach(function(i,n){e.call(t,i,n,t)}):wt(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var Dt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return wt(t)&&i.length>0&&i.forEach(function(e){wt(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},At=/\.\d*(?:0|9){12}\d*$/;function Bt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return At.test(t)?Math.round(t*e)/e:t}var Ot=/^width|height|left|top|marginLeft|marginTop$/;function Et(t,e){var i=t.style;kt(e,function(t,e){Ot.test(e)&&mt(t)&&(t="".concat(t,"px")),i[e]=t})}function Tt(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function zt(t,e){if(e)if(mt(t.length))kt(t,function(t){zt(t,e)});else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Lt(t,e){e&&(mt(t.length)?kt(t,function(t){Lt(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Ht(t,e,i){e&&(mt(t.length)?kt(t,function(t){Ht(t,e,i)}):i?zt(t,e):Lt(t,e))}var Nt=/([a-z\d])([A-Z])/g;function Wt(t){return t.replace(Nt,"$1-$2").toLowerCase()}function Rt(t,e){return wt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Wt(e)))}function St(t,e,i){wt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Wt(e)),i)}function $t(t,e){if(wt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Wt(e)))}var Xt=/\s\s*/,jt=function(){var t=!1;if(m){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});f.addEventListener("test",i,n),f.removeEventListener("test",i,n)}return t}();function Pt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(Xt).forEach(function(e){if(!jt){var o=t.listeners;o&&o[e]&&o[e][i]&&(a=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,a,n)})}function Yt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(Xt).forEach(function(e){if(n.once&&!jt){var o=t.listeners,r=void 0===o?{}:o;a=function(){delete r[e][i],t.removeEventListener(e,a,n);for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];i.apply(t,s)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],n),r[e][i]=a,t.listeners=r}t.addEventListener(e,a,n)})}function It(t,e,i){var n;return xt(Event)&&xt(CustomEvent)?n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(n)}function Ut(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var _t=f.location,qt=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Zt(t){var e=t.match(qt);return null!==e&&(e[1]!==_t.protocol||e[2]!==_t.hostname||e[3]!==_t.port)}function Ft(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Qt(t){var e=t.rotate,i=t.scaleX,n=t.scaleY,a=t.translateX,o=t.translateY,r=[];mt(a)&&0!==a&&r.push("translateX(".concat(a,"px)")),mt(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),mt(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),mt(i)&&1!==i&&r.push("scaleX(".concat(i,")")),mt(n)&&1!==n&&r.push("scaleY(".concat(n,")"));var s=r.length?r.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Gt(t){var i=e({},t),n=0;return kt(t,function(t,e){delete i[e],kt(i,function(e){var i=Math.abs(t.startX-e.startX),a=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),s=Math.sqrt(i*i+a*a),h=(Math.sqrt(o*o+r*r)-s)/s;Math.abs(h)>Math.abs(n)&&(n=h)})}),n}function Kt(t,i){var n=t.pageX,a=t.pageY,o={endX:n,endY:a};return i?o:e({startX:n,startY:a},o)}function Jt(t){var e=0,i=0,n=0;return kt(t,function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1}),{pageX:e/=n,pageY:i/=n}}function Vt(t){var e=t.aspectRatio,i=t.height,n=t.width,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=ft(n),r=ft(i);if(o&&r){var s=i*e;"contain"===a&&s>n||"cover"===a&&s<n?i=n/e:n=i*e}else o?i=n/e:r&&(n=i*e);return{width:n,height:i}}function te(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var a=n%90*Math.PI/180,o=Math.sin(a),r=Math.cos(a),s=e*r+i*o,h=e*o+i*r;return n>90?{width:h,height:s}:{width:s,height:h}}function ee(t,e,i,n){var a=e.aspectRatio,o=e.naturalWidth,r=e.naturalHeight,s=e.rotate,h=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,g=i.aspectRatio,m=i.naturalWidth,f=i.naturalHeight,v=n.fillColor,w=void 0===v?"transparent":v,b=n.imageSmoothingEnabled,y=void 0===b||b,x=n.imageSmoothingQuality,C=void 0===x?"low":x,M=n.maxWidth,k=void 0===M?1/0:M,D=n.maxHeight,A=void 0===D?1/0:D,B=n.minWidth,O=void 0===B?0:B,E=n.minHeight,T=void 0===E?0:E,z=document.createElement("canvas"),L=z.getContext("2d"),H=Vt({aspectRatio:g,width:k,height:A}),N=Vt({aspectRatio:g,width:O,height:T},"cover"),W=Math.min(H.width,Math.max(N.width,m)),R=Math.min(H.height,Math.max(N.height,f)),S=Vt({aspectRatio:a,width:k,height:A}),$=Vt({aspectRatio:a,width:O,height:T},"cover"),X=Math.min(S.width,Math.max($.width,o)),j=Math.min(S.height,Math.max($.height,r)),P=[-X/2,-j/2,X,j];return z.width=Bt(W),z.height=Bt(R),L.fillStyle=w,L.fillRect(0,0,W,R),L.save(),L.translate(W/2,R/2),L.rotate(h*Math.PI/180),L.scale(d,u),L.imageSmoothingEnabled=y,L.imageSmoothingQuality=C,L.drawImage.apply(L,[t].concat(c(P.map(function(t){return Math.floor(Bt(t))})))),L.restore(),z}var ie=String.fromCharCode;function ne(t,e,i){var n="";i+=e;for(var a=e;a<i;a+=1)n+=ie(t.getUint8(a));return n}var ae=/^data:.*,/;function oe(t){var e=t.replace(ae,""),i=atob(e),n=new ArrayBuffer(i.length),a=new Uint8Array(n);return kt(a,function(t,e){a[e]=i.charCodeAt(e)}),n}function re(t,e){for(var i=[],n=8192,a=new Uint8Array(t);a.length>0;)i.push(ie.apply(null,Mt(a.subarray(0,n)))),a=a.subarray(n);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}function se(t){var e,i=new DataView(t);try{var n,a,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,s=2;s+1<r;){if(255===i.getUint8(s)&&225===i.getUint8(s+1)){a=s;break}s+=1}if(a){var h=a+10;if("Exif"===ne(i,a+4,4)){var c=i.getUint16(h);if(((n=18761===c)||19789===c)&&42===i.getUint16(h+2,n)){var l=i.getUint32(h+4,n);l>=8&&(o=h+l)}}}if(o){var d,p,u=i.getUint16(o,n);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,n)){d+=8,e=i.getUint16(d,n),i.setUint16(d,1,n);break}}}catch(g){e=1}return e}function he(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}var ce={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,n=this.cropper,a=Number(e.minContainerWidth),o=Number(e.minContainerHeight);zt(n,N),Lt(t,N);var r={width:Math.max(i.offsetWidth,a>=0?a:lt),height:Math.max(i.offsetHeight,o>=0?o:dt)};this.containerData=r,Et(n,{width:r.width,height:r.height}),zt(t,N),Lt(n,N)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,a=n?e.naturalHeight:e.naturalWidth,o=n?e.naturalWidth:e.naturalHeight,r=a/o,s=t.width,h=t.height;t.height*r>t.width?3===i?s=t.height*r:h=t.width/r:3===i?h=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:s,height:h};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Dt({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=a.aspectRatio,h=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),l=Math.max(l,n.height),3===r&&(l*s>c?c=l*s:l=c/s)):r>0&&(c?c=Math.max(c,h?o.width:0):l?l=Math.max(l,h?o.height:0):h&&(c=o.width,(l=o.height)*s>c?c=l*s:l=c/s));var d=Vt({aspectRatio:s,width:c,height:l});c=d.width,l=d.height,a.minWidth=c,a.minHeight=l,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(h?0:1)){var p=n.width-a.width,u=n.height-a.height;a.minLeft=Math.min(0,p),a.minTop=Math.min(0,u),a.maxLeft=Math.max(0,p),a.maxTop=Math.max(0,u),h&&this.limited&&(a.minLeft=Math.min(o.left,o.left+(o.width-a.width)),a.minTop=Math.min(o.top,o.top+(o.height-a.height)),a.maxLeft=o.left,a.maxTop=o.top,2===r&&(a.width>=n.width&&(a.minLeft=Math.min(0,p),a.maxLeft=Math.max(0,p)),a.height>=n.height&&(a.minTop=Math.min(0,u),a.maxTop=Math.max(0,u))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=n.width,a.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var a=te({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=a.width,r=a.height,s=i.width*(o/i.naturalWidth),h=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(h-i.height)/2,i.width=s,i.height=h,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Et(this.canvas,Dt({width:i.width,height:i.height},Qt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,n=i.naturalWidth*(e.width/e.naturalWidth),a=i.naturalHeight*(e.height/e.naturalHeight);Dt(i,{width:n,height:a,left:(e.width-n)/2,top:(e.height-a)/2}),Et(this.image,Dt({width:i.width,height:i.height},Qt(Dt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,a={width:e.width,height:e.height};i&&(e.height*i>e.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*n),a.height=Math.max(a.minHeight,a.height*n),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=Dt({},a)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var h=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,d=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;h=Math.min(h,n.width),c=Math.min(c,n.height),s&&(h&&c?c*s>h?c=h/s:h=c*s:h?c=h/s:c&&(h=c*s),d*s>l?d=l/s:l=d*s),o.minWidth=Math.min(h,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,a.left),o.minTop=Math.max(0,a.top),o.maxLeft=Math.min(n.width,a.left+a.width)-o.width,o.maxTop=Math.min(n.height,a.top+a.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&St(this.face,X,i.width>=e.width&&i.height>=e.height?C:y),Et(this.cropBox,Dt({width:i.width,height:i.height},Qt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),It(this.element,U,this.getData())}},le={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,a=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=n,o.alt=a,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,kt(r,function(t){var i=document.createElement("img");St(t,j,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=a,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)})}},resetPreview:function(){kt(this.previews,function(t){var e=Rt(t,j);Et(t,{width:e.width,height:e.height}),t.innerHTML=e.html,$t(t,j)})},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,a=i.height,o=t.width,r=t.height,s=i.left-e.left-t.left,h=i.top-e.top-t.top;this.cropped&&!this.disabled&&(Et(this.viewBoxImage,Dt({width:o,height:r},Qt(Dt({translateX:-s,translateY:-h},t)))),kt(this.previews,function(e){var i=Rt(e,j),c=i.width,l=i.height,d=c,p=l,u=1;n&&(p=a*(u=c/n)),a&&p>l&&(d=n*(u=l/a),p=l),Et(e,{width:d,height:p}),Et(e.getElementsByTagName("img")[0],Dt({width:o*u,height:r*u},Qt(Dt({translateX:-s*u,translateY:-h*u},t))))}))}},de={bind:function(){var t=this.element,e=this.options,i=this.cropper;xt(e.cropstart)&&Yt(t,Z,e.cropstart),xt(e.cropmove)&&Yt(t,q,e.cropmove),xt(e.cropend)&&Yt(t,_,e.cropend),xt(e.crop)&&Yt(t,U,e.crop),xt(e.zoom)&&Yt(t,at,e.zoom),Yt(i,J,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Yt(i,nt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Yt(i,F,this.onDblclick=this.dblclick.bind(this)),Yt(t.ownerDocument,V,this.onCropMove=this.cropMove.bind(this)),Yt(t.ownerDocument,tt,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Yt(window,it,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;xt(e.cropstart)&&Pt(t,Z,e.cropstart),xt(e.cropmove)&&Pt(t,q,e.cropmove),xt(e.cropend)&&Pt(t,_,e.cropend),xt(e.crop)&&Pt(t,U,e.crop),xt(e.zoom)&&Pt(t,at,e.zoom),Pt(i,J,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Pt(i,nt,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Pt(i,F,this.onDblclick),Pt(t.ownerDocument,V,this.onCropMove),Pt(t.ownerDocument,tt,this.onCropEnd),e.responsive&&Pt(window,it,this.onResize)}},pe={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,a=this.containerData,o=n.offsetWidth/a.width,r=n.offsetHeight/a.height,s=Math.abs(o-1)>Math.abs(r-1)?o:r;1!==s&&(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(kt(t,function(e,i){t[i]=e*s})),this.setCropBoxData(kt(e,function(t,i){e[i]=t*s}))))}},dblclick:function(){this.disabled||this.options.dragMode===I||this.setDragMode(Tt(this.dragBox,L)?Y:P)},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){e.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(mt(e)&&1!==e||mt(i)&&0!==i||t.ctrlKey))){var n,a=this.options,o=this.pointers;t.changedTouches?kt(t.changedTouches,function(t){o[t.identifier]=Kt(t)}):o[t.pointerId||0]=Kt(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?M:Rt(t.target,X),rt.test(n)&&!1!==It(this.element,Z,{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,n===x&&(this.cropping=!0,zt(this.dragBox,S)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==It(this.element,q,{originalEvent:t,action:e})&&(t.changedTouches?kt(t.changedTouches,function(t){Dt(i[t.identifier]||{},Kt(t,!0))}):Dt(i[t.pointerId||0]||{},Kt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?kt(t.changedTouches,function(t){delete i[t.identifier]}):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Ht(this.dragBox,S,this.cropped&&this.options.modal)),It(this.element,_,{originalEvent:t,action:e}))}}},ue={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,o=this.cropBoxData,r=this.pointers,s=this.action,h=i.aspectRatio,c=o.left,l=o.top,d=o.width,p=o.height,u=c+d,g=l+p,m=0,f=0,v=a.width,w=a.height,b=!0;!h&&t.shiftKey&&(h=d&&p?d/p:1),this.limited&&(m=o.minLeft,f=o.minTop,v=m+Math.min(a.width,n.width,n.left+n.width),w=f+Math.min(a.height,n.height,n.top+n.height));var L=r[Object.keys(r)[0]],H={x:L.endX-L.startX,y:L.endY-L.startY},W=function(t){switch(t){case k:u+H.x>v&&(H.x=v-u);break;case D:c+H.x<m&&(H.x=m-c);break;case B:l+H.y<f&&(H.y=f-l);break;case A:g+H.y>w&&(H.y=w-g)}};switch(s){case y:c+=H.x,l+=H.y;break;case k:if(H.x>=0&&(u>=v||h&&(l<=f||g>=w))){b=!1;break}W(k),(d+=H.x)<0&&(s=D,c-=d=-d),h&&(p=d/h,l+=(o.height-p)/2);break;case B:if(H.y<=0&&(l<=f||h&&(c<=m||u>=v))){b=!1;break}W(B),p-=H.y,l+=H.y,p<0&&(s=A,l-=p=-p),h&&(d=p*h,c+=(o.width-d)/2);break;case D:if(H.x<=0&&(c<=m||h&&(l<=f||g>=w))){b=!1;break}W(D),d-=H.x,c+=H.x,d<0&&(s=k,c-=d=-d),h&&(p=d/h,l+=(o.height-p)/2);break;case A:if(H.y>=0&&(g>=w||h&&(c<=m||u>=v))){b=!1;break}W(A),(p+=H.y)<0&&(s=B,l-=p=-p),h&&(d=p*h,c+=(o.width-d)/2);break;case O:if(h){if(H.y<=0&&(l<=f||u>=v)){b=!1;break}W(B),p-=H.y,l+=H.y,d=p*h}else W(B),W(k),H.x>=0?u<v?d+=H.x:H.y<=0&&l<=f&&(b=!1):d+=H.x,H.y<=0?l>f&&(p-=H.y,l+=H.y):(p-=H.y,l+=H.y);d<0&&p<0?(s=z,l-=p=-p,c-=d=-d):d<0?(s=E,c-=d=-d):p<0&&(s=T,l-=p=-p);break;case E:if(h){if(H.y<=0&&(l<=f||c<=m)){b=!1;break}W(B),p-=H.y,l+=H.y,d=p*h,c+=o.width-d}else W(B),W(D),H.x<=0?c>m?(d-=H.x,c+=H.x):H.y<=0&&l<=f&&(b=!1):(d-=H.x,c+=H.x),H.y<=0?l>f&&(p-=H.y,l+=H.y):(p-=H.y,l+=H.y);d<0&&p<0?(s=T,l-=p=-p,c-=d=-d):d<0?(s=O,c-=d=-d):p<0&&(s=z,l-=p=-p);break;case z:if(h){if(H.x<=0&&(c<=m||g>=w)){b=!1;break}W(D),d-=H.x,c+=H.x,p=d/h}else W(A),W(D),H.x<=0?c>m?(d-=H.x,c+=H.x):H.y>=0&&g>=w&&(b=!1):(d-=H.x,c+=H.x),H.y>=0?g<w&&(p+=H.y):p+=H.y;d<0&&p<0?(s=O,l-=p=-p,c-=d=-d):d<0?(s=T,c-=d=-d):p<0&&(s=E,l-=p=-p);break;case T:if(h){if(H.x>=0&&(u>=v||g>=w)){b=!1;break}W(k),p=(d+=H.x)/h}else W(A),W(k),H.x>=0?u<v?d+=H.x:H.y>=0&&g>=w&&(b=!1):d+=H.x,H.y>=0?g<w&&(p+=H.y):p+=H.y;d<0&&p<0?(s=E,l-=p=-p,c-=d=-d):d<0?(s=z,c-=d=-d):p<0&&(s=O,l-=p=-p);break;case C:this.move(H.x,H.y),b=!1;break;case M:this.zoom(Gt(r),t),b=!1;break;case x:if(!H.x||!H.y){b=!1;break}e=Ut(this.cropper),c=L.startX-e.left,l=L.startY-e.top,d=o.minWidth,p=o.minHeight,H.x>0?s=H.y>0?T:O:H.x<0&&(c-=d,s=H.y>0?z:E),H.y<0&&(l-=p),this.cropped||(Lt(this.cropBox,N),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}b&&(o.width=d,o.height=p,o.left=c,o.top=l,this.action=s,this.renderCropBox()),kt(r,function(t){t.startX=t.endX,t.startY=t.endY})}},ge={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&zt(this.dragBox,S),Lt(this.cropBox,N),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Dt({},this.initialImageData),this.canvasData=Dt({},this.initialCanvasData),this.cropBoxData=Dt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Dt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Lt(this.dragBox,S),zt(this.cropBox,N)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,kt(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Lt(this.cropper,H)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,zt(this.cropper,H)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,a=i.top;return this.moveTo(vt(t)?t:n+Number(t),vt(e)?e:a+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(mt(t)&&(i.left=t,n=!0),mt(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,a=this.canvasData,o=a.width,r=a.height,s=a.naturalWidth,h=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,l=h*t;if(!1===It(this.element,at,{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var d=this.pointers,p=Ut(this.cropper),u=d&&Object.keys(d).length?Jt(d):{pageX:i.pageX,pageY:i.pageY};a.left-=(c-o)*((u.pageX-p.left-a.left)/o),a.top-=(l-r)*((u.pageY-p.top-a.top)/r)}else yt(e)&&mt(e.x)&&mt(e.y)?(a.left-=(c-o)*((e.x-a.left)/o),a.top-=(l-r)*((e.y-a.top)/r)):(a.left-=(c-o)/2,a.top-=(l-r)/2);a.width=c,a.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return mt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,mt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(mt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(mt(t)&&(i.scaleX=t,n=!0),mt(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,a=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-a.left,y:o.top-a.top,width:o.width,height:o.height};var r=n.width/n.naturalWidth;if(kt(t,function(e,i){t[i]=e/r}),e){var s=Math.round(t.y+t.height),h=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=h-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,a={};if(this.ready&&!this.disabled&&yt(t)){var o=!1;e.rotatable&&mt(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(mt(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),mt(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;mt(t.x)&&(a.left=t.x*r+n.left),mt(t.y)&&(a.top=t.y*r+n.top),mt(t.width)&&(a.width=t.width*r),mt(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?Dt({},this.containerData):{}},getImageData:function(){return this.sized?Dt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&kt(["left","top","width","height","naturalWidth","naturalHeight"],function(i){e[i]=t[i]}),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&yt(t)&&(mt(t.left)&&(e.left=t.left),mt(t.top)&&(e.top=t.top),mt(t.width)?(e.width=t.width,e.height=t.width/i):mt(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,a=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&yt(t)&&(mt(t.left)&&(n.left=t.left),mt(t.top)&&(n.top=t.top),mt(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),mt(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),a&&(e?n.height=n.width/a:i&&(n.width=n.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ee(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(t.rounded),a=n.x,o=n.y,r=n.width,s=n.height,h=i.width/Math.floor(e.naturalWidth);1!==h&&(a*=h,o*=h,r*=h,s*=h);var l=r/s,d=Vt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Vt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Vt({aspectRatio:l,width:t.width||(1!==h?i.width:r),height:t.height||(1!==h?i.height:s)}),g=u.width,m=u.height;g=Math.min(d.width,Math.max(p.width,g)),m=Math.min(d.height,Math.max(p.height,m));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=Bt(g),f.height=Bt(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,g,m);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,C,M,k,D,A,B=i.width,O=i.height,E=a,T=o;E<=-r||E>B?(E=0,x=0,M=0,D=0):E<=0?(M=-E,E=0,D=x=Math.min(B,r+E)):E<=B&&(M=0,D=x=Math.min(r,B-E)),x<=0||T<=-s||T>O?(T=0,C=0,k=0,A=0):T<=0?(k=-T,T=0,A=C=Math.min(O,s+T)):T<=O&&(k=0,A=C=Math.min(s,O-T));var z=[E,T,x,C];if(D>0&&A>0){var L=g/r;z.push(M*L,k*L,D*L,A*L)}return v.drawImage.apply(v,[i].concat(c(z.map(function(t){return Math.floor(Bt(t))})))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||vt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var a=t===P,o=e.movable&&t===Y;t=a||o?t:I,e.dragMode=t,St(i,X,t),Ht(i,L,a),Ht(i,$,o),e.cropBoxMovable||(St(n,X,t),Ht(n,L,a),Ht(n,$,o))}return this}},me=f.Cropper,fe=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,t),!e||!ct.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Dt({},pt,yt(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return s(t,[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[b]){if(e[b]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(st.test(t))ht.test(t)?this.read(oe(t)):this.clone();else{var a=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=a,a.onabort=o,a.onerror=o,a.ontimeout=o,a.onprogress=function(){a.getResponseHeader("content-type")!==ot&&a.abort()},a.onload=function(){e.read(a.response)},a.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&Zt(t)&&i.crossOrigin&&(t=Ft(t)),a.open("GET",t,!0),a.responseType="arraybuffer",a.withCredentials="use-credentials"===i.crossOrigin,a.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=se(t),a=0,o=1,r=1;if(n>1){this.url=re(t,ot);var s=he(n);a=s.rotate,o=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=a),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&Zt(e)&&(i||(i="anonymous"),n=Ft(e)),this.crossOrigin=i,this.crossOriginUrl=n;var a=document.createElement("img");i&&(a.crossOrigin=i),a.src=n||e,a.alt=t.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),zt(a,W),t.parentNode.insertBefore(a,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=f.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(f.navigator.userAgent),n=function(e,i){Dt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Dt({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var a=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=a,a.onload=function(){n(a.width,a.height),i||o.removeChild(a)},a.src=e.src,i||(a.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(a))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,a=document.createElement("div");a.innerHTML=ut;var o=a.querySelector(".".concat(b,"-container")),r=o.querySelector(".".concat(b,"-canvas")),s=o.querySelector(".".concat(b,"-drag-box")),h=o.querySelector(".".concat(b,"-crop-box")),c=h.querySelector(".".concat(b,"-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=h,this.viewBox=o.querySelector(".".concat(b,"-view-box")),this.face=c,r.appendChild(i),zt(t,N),n.insertBefore(o,t.nextSibling),Lt(i,W),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,zt(h,N),e.guides||zt(h.getElementsByClassName("".concat(b,"-dashed")),N),e.center||zt(h.getElementsByClassName("".concat(b,"-center")),N),e.background&&zt(o,"".concat(b,"-bg")),e.highlight||zt(c,R),e.cropBoxMovable&&(zt(c,$),St(c,X,y)),e.cropBoxResizable||(zt(h.getElementsByClassName("".concat(b,"-line")),N),zt(h.getElementsByClassName("".concat(b,"-point")),N)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),xt(e.ready)&&Yt(t,et,e.ready,{once:!0}),It(t,et)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),Lt(this.element,N)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=me,t}},{key:"setDefaults",value:function(t){Dt(pt,yt(t)&&t)}}])}();return Dt(fe.prototype,ce,le,de,pe,ue,ge),fe}()},32609:function(t){"use strict";t.exports="/*!\n * Cropper.js v1.6.2\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2024-04-21T07:43:02.731Z\n */\n\n.cropper-container {\n  direction: ltr;\n  font-size: 0;\n  line-height: 0;\n  position: relative;\n  -ms-touch-action: none;\n      touch-action: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n     -moz-user-select: none;\n      -ms-user-select: none;\n          user-select: none;\n}\n\n.cropper-container img {\n    backface-visibility: hidden;\n    display: block;\n    height: 100%;\n    image-orientation: 0deg;\n    max-height: none !important;\n    max-width: none !important;\n    min-height: 0 !important;\n    min-width: 0 !important;\n    width: 100%;\n  }\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n  bottom: 0;\n  left: 0;\n  position: absolute;\n  right: 0;\n  top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n  overflow: hidden;\n}\n\n.cropper-drag-box {\n  background-color: #fff;\n  opacity: 0;\n}\n\n.cropper-modal {\n  background-color: #000;\n  opacity: 0.5;\n}\n\n.cropper-view-box {\n  display: block;\n  height: 100%;\n  outline: 1px solid #39f;\n  outline-color: rgba(51, 153, 255, 0.75);\n  overflow: hidden;\n  width: 100%;\n}\n\n.cropper-dashed {\n  border: 0 dashed #eee;\n  display: block;\n  opacity: 0.5;\n  position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n    border-bottom-width: 1px;\n    border-top-width: 1px;\n    height: calc(100% / 3);\n    left: 0;\n    top: calc(100% / 3);\n    width: 100%;\n  }\n\n.cropper-dashed.dashed-v {\n    border-left-width: 1px;\n    border-right-width: 1px;\n    height: 100%;\n    left: calc(100% / 3);\n    top: 0;\n    width: calc(100% / 3);\n  }\n\n.cropper-center {\n  display: block;\n  height: 0;\n  left: 50%;\n  opacity: 0.75;\n  position: absolute;\n  top: 50%;\n  width: 0;\n}\n\n.cropper-center::before,\n  .cropper-center::after {\n    background-color: #eee;\n    content: ' ';\n    display: block;\n    position: absolute;\n  }\n\n.cropper-center::before {\n    height: 1px;\n    left: -3px;\n    top: 0;\n    width: 7px;\n  }\n\n.cropper-center::after {\n    height: 7px;\n    left: 0;\n    top: -3px;\n    width: 1px;\n  }\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n  display: block;\n  height: 100%;\n  opacity: 0.1;\n  position: absolute;\n  width: 100%;\n}\n\n.cropper-face {\n  background-color: #fff;\n  left: 0;\n  top: 0;\n}\n\n.cropper-line {\n  background-color: #39f;\n}\n\n.cropper-line.line-e {\n    cursor: ew-resize;\n    right: -3px;\n    top: 0;\n    width: 5px;\n  }\n\n.cropper-line.line-n {\n    cursor: ns-resize;\n    height: 5px;\n    left: 0;\n    top: -3px;\n  }\n\n.cropper-line.line-w {\n    cursor: ew-resize;\n    left: -3px;\n    top: 0;\n    width: 5px;\n  }\n\n.cropper-line.line-s {\n    bottom: -3px;\n    cursor: ns-resize;\n    height: 5px;\n    left: 0;\n  }\n\n.cropper-point {\n  background-color: #39f;\n  height: 5px;\n  opacity: 0.75;\n  width: 5px;\n}\n\n.cropper-point.point-e {\n    cursor: ew-resize;\n    margin-top: -3px;\n    right: -3px;\n    top: 50%;\n  }\n\n.cropper-point.point-n {\n    cursor: ns-resize;\n    left: 50%;\n    margin-left: -3px;\n    top: -3px;\n  }\n\n.cropper-point.point-w {\n    cursor: ew-resize;\n    left: -3px;\n    margin-top: -3px;\n    top: 50%;\n  }\n\n.cropper-point.point-s {\n    bottom: -3px;\n    cursor: s-resize;\n    left: 50%;\n    margin-left: -3px;\n  }\n\n.cropper-point.point-ne {\n    cursor: nesw-resize;\n    right: -3px;\n    top: -3px;\n  }\n\n.cropper-point.point-nw {\n    cursor: nwse-resize;\n    left: -3px;\n    top: -3px;\n  }\n\n.cropper-point.point-sw {\n    bottom: -3px;\n    cursor: nesw-resize;\n    left: -3px;\n  }\n\n.cropper-point.point-se {\n    bottom: -3px;\n    cursor: nwse-resize;\n    height: 20px;\n    opacity: 1;\n    right: -3px;\n    width: 20px;\n  }\n\n@media (min-width: 768px) {\n\n.cropper-point.point-se {\n      height: 15px;\n      width: 15px;\n  }\n    }\n\n@media (min-width: 992px) {\n\n.cropper-point.point-se {\n      height: 10px;\n      width: 10px;\n  }\n    }\n\n@media (min-width: 1200px) {\n\n.cropper-point.point-se {\n      height: 5px;\n      opacity: 0.75;\n      width: 5px;\n  }\n    }\n\n.cropper-point.point-se::before {\n    background-color: #39f;\n    bottom: -50%;\n    content: ' ';\n    display: block;\n    height: 200%;\n    opacity: 0;\n    position: absolute;\n    right: -50%;\n    width: 200%;\n  }\n\n.cropper-invisible {\n  opacity: 0;\n}\n\n.cropper-bg {\n  background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n  display: block;\n  height: 0;\n  position: absolute;\n  width: 0;\n}\n\n.cropper-hidden {\n  display: none !important;\n}\n\n.cropper-move {\n  cursor: move;\n}\n\n.cropper-crop {\n  cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n  cursor: not-allowed;\n}\n"},13611:function(t,e,i){"use strict";var n=i(46518),a=i(44576),o=i(62106),r=i(43724),s=TypeError,h=Object.defineProperty,c=a.self!==a;try{if(r){var l=Object.getOwnPropertyDescriptor(a,"self");!c&&l&&l.get&&l.enumerable||o(a,"self",{get:function(){return a},set:function(t){if(this!==a)throw new s("Illegal invocation");h(a,"self",{value:t,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else n({global:!0,simple:!0,forced:c},{self:a})}catch(d){}},93900:function(t,e,i){"use strict";i.a(t,async function(t,e){try{i(3362),i(27495),i(62953);var n=i(5124),a=i(67576),o=i(6412),r=i(63672),s=i(17051),h=i(42462),c=i(28438),l=i(98779),d=i(27259),p=i(25877),u=i(31247),g=i(4444),m=i(92070),f=i(9395),v=i(717),w=i(17060),b=i(88496),y=i(91470),x=t([b,w]);[b,w]=x.then?(await x)():x;let D,A,B,O=t=>t;var C=Object.defineProperty,M=Object.getOwnPropertyDescriptor,k=(t,e,i,n)=>{for(var a,o=n>1?void 0:n?M(e,i):e,r=t.length-1;r>=0;r--)(a=t[r])&&(o=(n?a(e,i,o):a(o))||o);return n&&o&&C(e,i,o),o};let E=class extends v.A{firstUpdated(){this.open&&(this.addOpenListeners(),this.dialog.showModal(),(0,g.JG)(this))}disconnectedCallback(){super.disconnectedCallback(),(0,g.I7)(this),this.removeOpenListeners()}async requestClose(t){const e=new c.L({source:t});if(this.dispatchEvent(e),e.defaultPrevented)return this.open=!0,void(0,d.Ud)(this.dialog,"pulse");this.removeOpenListeners(),await(0,d.Ud)(this.dialog,"hide"),this.open=!1,this.dialog.close(),(0,g.I7)(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout(()=>i.focus()),this.dispatchEvent(new s.Z)}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown),(0,p.AZ)(this)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown),(0,p.Fw)(this)}handleDialogCancel(t){t.preventDefault(),!this.dialog.classList.contains("hide")&&t.target===this.dialog&&(0,p.a0)(this)&&this.requestClose(this.dialog)}handleDialogClick(t){const e=t.target.closest('[data-dialog="close"]');e&&(t.stopPropagation(),this.requestClose(e))}async handleDialogPointerDown(t){t.target===this.dialog&&(this.lightDismiss?this.requestClose(this.dialog):await(0,d.Ud)(this.dialog,"pulse"))}handleOpenChange(){this.open&&!this.dialog.open?this.show():!this.open&&this.dialog.open&&(this.open=!0,this.requestClose(this.dialog))}async show(){const t=new l.k;this.dispatchEvent(t),t.defaultPrevented?this.open=!1:(this.addOpenListeners(),this.originalTrigger=document.activeElement,this.open=!0,this.dialog.showModal(),(0,g.JG)(this),requestAnimationFrame(()=>{const t=this.querySelector("[autofocus]");t&&"function"==typeof t.focus?t.focus():this.dialog.focus()}),await(0,d.Ud)(this.dialog,"show"),this.dispatchEvent(new h.q))}render(){var t;const e=!this.withoutHeader,i=this.hasUpdated?this.hasSlotController.test("footer"):this.withFooter;return(0,n.qy)(D||(D=O` <dialog aria-labelledby="${0}" aria-describedby="${0}" part="dialog" class="${0}" @cancel="${0}" @click="${0}" @pointerdown="${0}"> ${0} <div part="body" class="body"><slot></slot></div> ${0} </dialog> `),null!==(t=this.ariaLabelledby)&&void 0!==t?t:"title",(0,r.J)(this.ariaDescribedby),(0,o.H)({dialog:!0,open:this.open}),this.handleDialogCancel,this.handleDialogClick,this.handleDialogPointerDown,e?(0,n.qy)(A||(A=O` <header part="header" class="header"> <h2 part="title" class="title" id="title"> <slot name="label"> ${0} </slot> </h2> <div part="header-actions" class="header-actions"> <slot name="header-actions"></slot> <wa-button part="close-button" exportparts="base:close-button__base" class="close" appearance="plain" @click="${0}"> <wa-icon name="xmark" label="${0}" library="system" variant="solid"></wa-icon> </wa-button> </div> </header> `),this.label.length>0?this.label:String.fromCharCode(8203),t=>this.requestClose(t.target),this.localize.term("close")):"",i?(0,n.qy)(B||(B=O` <footer part="footer" class="footer"> <slot name="footer"></slot> </footer> `)):"")}constructor(){super(...arguments),this.localize=new w.c(this),this.hasSlotController=new m.X(this,"footer","header-actions","label"),this.open=!1,this.label="",this.withoutHeader=!1,this.lightDismiss=!1,this.withFooter=!1,this.handleDocumentKeyDown=t=>{"Escape"===t.key&&this.open&&(0,p.a0)(this)&&(t.preventDefault(),t.stopPropagation(),this.requestClose(this.dialog))}}};E.css=y.A,k([(0,a.P)(".dialog")],E.prototype,"dialog",2),k([(0,a.MZ)({type:Boolean,reflect:!0})],E.prototype,"open",2),k([(0,a.MZ)({reflect:!0})],E.prototype,"label",2),k([(0,a.MZ)({attribute:"without-header",type:Boolean,reflect:!0})],E.prototype,"withoutHeader",2),k([(0,a.MZ)({attribute:"light-dismiss",type:Boolean})],E.prototype,"lightDismiss",2),k([(0,a.MZ)({attribute:"aria-labelledby"})],E.prototype,"ariaLabelledby",2),k([(0,a.MZ)({attribute:"aria-describedby"})],E.prototype,"ariaDescribedby",2),k([(0,a.MZ)({attribute:"with-footer",type:Boolean})],E.prototype,"withFooter",2),k([(0,f.w)("open",{waitUntilFirstUpdate:!0})],E.prototype,"handleOpenChange",1),E=k([(0,a.EM)("wa-dialog")],E),n.S$||(document.addEventListener("click",t=>{const e=t.target.closest("[data-dialog]");if(e instanceof Element){const[t,i]=(0,u.v)(e.getAttribute("data-dialog")||"");if("open"===t&&null!=i&&i.length){const t=e.getRootNode().getElementById(i);"wa-dialog"===(null==t?void 0:t.localName)?t.open=!0:console.warn(`A dialog with an ID of "${i}" could not be found in this document.`)}}}),document.addEventListener("pointerdown",()=>{})),e()}catch(D){e(D)}})},91470:function(t,e,i){"use strict";i.d(e,{A:function(){return a}});let n;var a=(0,i(5124).AH)(n||(n=(t=>t)`:host{--width:31rem;--spacing:var(--wa-space-l);--backdrop-filter:none;--show-duration:200ms;--hide-duration:200ms;display:none}:host([open]){display:block}.dialog{display:flex;flex-direction:column;top:0;right:0;bottom:0;left:0;width:var(--width);max-width:calc(100% - var(--wa-space-2xl));max-height:calc(100% - var(--wa-space-2xl));color:inherit;background-color:var(--wa-color-surface-raised);border-radius:var(--wa-panel-border-radius);border:none;box-shadow:var(--wa-shadow-l);padding:0;margin:auto}.dialog.show{animation:show-dialog var(--show-duration) ease}.dialog.show::backdrop{animation:show-backdrop var(--show-duration,200ms) ease}.dialog.hide{animation:show-dialog var(--hide-duration) ease reverse}.dialog.hide::backdrop{animation:show-backdrop var(--hide-duration,200ms) ease reverse}.dialog.pulse{animation:pulse 250ms ease}.dialog:focus{outline:0}@media screen and (max-width:420px){.dialog{max-height:80vh}}.open{display:flex;opacity:1}.header{flex:0 0 auto;display:flex;flex-wrap:nowrap;padding-inline-start:var(--spacing);padding-block-end:0;padding-inline-end:calc(var(--spacing) - var(--wa-form-control-padding-block));padding-block-start:calc(var(--spacing) - var(--wa-form-control-padding-block))}.title{align-self:center;flex:1 1 auto;font-family:inherit;font-size:var(--wa-font-size-l);font-weight:var(--wa-font-weight-heading);line-height:var(--wa-line-height-condensed);margin:0}.header-actions{align-self:start;display:flex;flex-shrink:0;flex-wrap:wrap;justify-content:end;gap:var(--wa-space-2xs);padding-inline-start:var(--spacing)}.header-actions ::slotted(wa-button),.header-actions wa-button{flex:0 0 auto;display:flex;align-items:center}.body{flex:1 1 auto;display:block;padding:var(--spacing);overflow:auto;-webkit-overflow-scrolling:touch}.body:focus{outline:0}.body:focus-visible{outline:var(--wa-focus-ring);outline-offset:var(--wa-focus-ring-offset)}.footer{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:var(--wa-space-xs);justify-content:end;padding:var(--spacing);padding-block-start:0}.footer ::slotted(wa-button:not(:first-of-type)){margin-inline-start:var(--wa-spacing-xs)}.dialog::backdrop{background-color:var(--wa-color-overlay-modal,rgb(0 0 0 / .25));-webkit-backdrop-filter:var(--backdrop-filter);backdrop-filter:var(--backdrop-filter)}@keyframes pulse{0%{scale:1}50%{scale:1.02}100%{scale:1}}@keyframes show-dialog{from{opacity:0;scale:0.8}to{opacity:1;scale:1}}@keyframes show-backdrop{from{opacity:0}to{opacity:1}}@media (forced-colors:active){.dialog{border:solid 1px #fff}}`))},31247:function(t,e,i){"use strict";i.d(e,{v:function(){return n}});i(18111),i(22489),i(61701),i(42762);function n(t){return t.split(" ").map(t=>t.trim()).filter(t=>""!==t)}},4444:function(t,e,i){"use strict";i.d(e,{JG:function(){return a},Rt:function(){return r},I7:function(){return o}});i(27495),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(25440),i(62953);const n=new Set;function a(t){if(n.add(t),!document.documentElement.classList.contains("wa-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}()+function(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}();let e=getComputedStyle(document.documentElement).scrollbarGutter;e&&"auto"!==e||(e="stable"),t<2&&(e=""),document.documentElement.style.setProperty("--wa-scroll-lock-gutter",e),document.documentElement.classList.add("wa-scroll-lock"),document.documentElement.style.setProperty("--wa-scroll-lock-size",`${t}px`)}}function o(t){n.delete(t),0===n.size&&(document.documentElement.classList.remove("wa-scroll-lock"),document.documentElement.style.removeProperty("--wa-scroll-lock-size"))}function r(t,e,i="vertical",n="smooth"){const a=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),o=a.top+e.scrollTop,r=a.left+e.scrollLeft,s=e.scrollLeft,h=e.scrollLeft+e.offsetWidth,c=e.scrollTop,l=e.scrollTop+e.offsetHeight;"horizontal"!==i&&"both"!==i||(r<s?e.scrollTo({left:r,behavior:n}):r+t.clientWidth>h&&e.scrollTo({left:r-e.offsetWidth+t.clientWidth,behavior:n})),"vertical"!==i&&"both"!==i||(o<c?e.scrollTo({top:o,behavior:n}):o+t.clientHeight>l&&e.scrollTo({top:o-e.offsetHeight+t.clientHeight,behavior:n}))}},88696:function(t,e,i){"use strict";i.a(t,async function(t,n){try{i.d(e,{P:function(){return h}});var a=i(69235),o=(i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953),i(37540)),r=i(42017),s=t([a]);a=(s.then?(await s)():s)[0];class h{handleChanges(t){var e;this.value=null===(e=this.callback)||void 0===e?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}target(t){return c(this,t)}constructor(t,{target:e,config:i,callback:n,skipInitial:a}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(null!=e?e:t),this.l=i,this.o=null!=a?a:this.o,this.callback=n,window.ResizeObserver?(this.u=new ResizeObserver(t=>{this.handleChanges(t),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}}const c=(0,r.u$)(class extends o.Kq{render(t,e){}update(t,[e,i]){this.controller=e,this.part=t,this.observe=i,!1===i?(e.unobserve(t.element),this.observing=!1):!1===this.observing&&(e.observe(t.element),this.observing=!0)}disconnected(){var t;null!==(t=this.controller)&&void 0!==t&&t.unobserve(this.part.element),this.observing=!1}reconnected(){var t;!1!==this.observe&&!1===this.observing&&(null!==(t=this.controller)&&void 0!==t&&t.observe(this.part.element),this.observing=!0)}constructor(){super(...arguments),this.observing=!1}});n()}catch(h){n(h)}})},37540:function(t,e,i){"use strict";i.d(e,{Kq:function(){return d}});i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var n=i(63937),a=i(42017);const o=(t,e)=>{const i=t._$AN;if(void 0===i)return!1;for(const a of i){var n;null!==(n=a._$AO)&&void 0!==n&&n.call(a,e,!1),o(a,e)}return!0},r=t=>{let e,i;do{var n;if(void 0===(e=t._$AM))break;i=e._$AN,i.delete(t),t=e}while(0===(null===(n=i)||void 0===n?void 0:n.size))},s=t=>{for(let e;e=t._$AM;t=e){let i=e._$AN;if(void 0===i)e._$AN=i=new Set;else if(i.has(t))break;i.add(t),l(e)}};function h(t){void 0!==this._$AN?(r(this),this._$AM=t,s(this)):this._$AM=t}function c(t,e=!1,i=0){const n=this._$AH,a=this._$AN;if(void 0!==a&&0!==a.size)if(e)if(Array.isArray(n))for(let s=i;s<n.length;s++)o(n[s],!1),r(n[s]);else null!=n&&(o(n,!1),r(n));else o(this,t)}const l=t=>{var e,i;t.type==a.OA.CHILD&&(null!==(e=t._$AP)&&void 0!==e||(t._$AP=c),null!==(i=t._$AQ)&&void 0!==i||(t._$AQ=h))};class d extends a.WL{_$AT(t,e,i){super._$AT(t,e,i),s(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,n;t!==this.isConnected&&(this.isConnected=t,t?null===(i=this.reconnected)||void 0===i||i.call(this):null===(n=this.disconnected)||void 0===n||n.call(this)),e&&(o(this,t),r(this))}setValue(t){if((0,n.Rt)(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}constructor(){super(...arguments),this._$AN=void 0}}}}]);