dealposbarcode 26.46.3 → 26.46.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-d9TVeeRY.js → chunk-2WAnOzGd.js} +1 -1
- package/{chunk-CzCMpdYW.js → chunk-Bo2Wlifp.js} +1 -1
- package/{chunk-D_drFZ9B.js → chunk-BqiKYBZB.js} +1 -1
- package/chunk-Br1LVJaC.js +1 -0
- package/{chunk-B4SypU5x.js → chunk-BrYuJ3_B.js} +1 -1
- package/{chunk-No-kkB47.js → chunk-CXWiG2wq.js} +2 -2
- package/{chunk-DVmYwAhe.js → chunk-CpMSXHia.js} +1 -1
- package/{chunk-yJ9bUdiC.js → chunk-D9HboCXe.js} +1 -1
- package/{chunk-BsK2EPXV.js → chunk-D9W75WcJ.js} +1 -1
- package/{chunk-gvoWbvLX.js → chunk-DgvU-8oj.js} +1 -1
- package/{chunk-MQHp7r9K.js → chunk-IAyl2lX6.js} +1 -1
- package/{chunk-Bx9fCbls.js → chunk-fSeUH18k.js} +1 -1
- package/{chunk-Dga3bjBb.js → chunk-yONIixN9.js} +1 -1
- package/index.html +2 -2
- package/{main-4PMU2GQ6.js → main-Q2MGVNT6.js} +3 -3
- package/ngsw.json +133 -133
- package/package.json +1 -1
- package/chunk-jYvhl2Yc.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as W,b as Z,c as qt,d as F,f as T,g as Jt,h as Fa$1,i as Te,m as Ba$1,n as ht,o as Rt,p as U,r as or$1,s as Wt,t as Le,v as Xt,x as eu,y as Ya$1}from"./main-4PMU2GQ6.js";import{t as Ge}from"./chunk-BUsg5rFD.js";import{c as ra,l as vi,n as Mt$1,o as ha$1,r as Ni,t as Ai}from"./chunk-d9TVeeRY.js";import{t as i}from"./chunk-CKXRHkCI.js";import{_ as zn,c as Sn,d as gn$1,f as gr$1,g as ye,h as qr,l as Ti,m as mn$1,n as An,r as Ee}from"./chunk-DVmYwAhe.js";import{$ as gl$1,Dt as yi$1,F as Vl$1,H as _t,I as Wl,J as dl$1,K as bt,L as Xi,Mt as zr$1,O as Su,Ot as yl$1,Q as gd,S as Ml$1,St as vl$1,W as al$1,X as fe,Y as el$1,Z as fl$1,bt as ul$1,d as Do$1,et as hd,ht as si,it as jl$1,jt as zl$1,k as Tc,m as F$1,mt as rp,nt as it,pt as rl$1,q as ct,r as Ac,rt as ja$1,s as At$1,t as $,vt as tu,w as Ol$1,wt as vu,z as Ze}from"./chunk-CZtkF-WL.js";import{B as js,D as Xi$1,F as fh,G as ne,I as fn$1,K as oh,L as gl$2,P as dh,Q as tt,R as hh,S as Tl$1,W as lh,X as sh,Y as sc$1,_ as Ps,a as Fs,at as xh,b as Sl$1,c as Hr,i as Fo,it as xe,k as _l$1,ot as xs,p as Me,r as Er$1,s as Gs$1,tt as vl$2,u as It$1,v as Rs,w as Us,z as ja$2}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb$1,B as GI,Ci as zu,Cr as lm$1,Ct as Pm$1,Di as I,Dr as ml$1,E,Ei as H,Et as Q,Fi as w,Fn as ee,Fr as od,Ft as Rh,G as He,Gn as fs,Gr as qe,H as Gu,Hn as fl$2,I as Fw$1,In as ei,Kn as fw$1,Kr as qh$1,Lr as ov,Mi as N,Mt as Qr,Ni as O,Nn as eE$1,Oi as J,Ot as QI,Pi as P,Pn as eb,Pr as oE$1,R as G1,Rn as ep$1,S as Db$1,St as Pi,Ti as G,Tn as cg$1,Tt as Pw$1,V as Gh$1,Vn as fg$1,Vr as pm$1,Vt as Tb$1,W as Hb$1,Wt as Th,X as Jh$1,Xr as rm$1,Yt as U1$1,Z as Ji,Zr as ru,_ as Cb,_r as kh,_t as Ow$1,ai as ue,ar as hw$1,bi as zh$1,br as kw$1,bt as Pb$1,c as Ah,cr as it$1,di as vw$1,ei as ti,en as Vw,er as hd$1,f as BD,fi as wb$1,fn as Zr,fr as jw,ft as O1,g as Br,gi as x,gn as _h,gr as ke,hr as kb$1,ht as Oh,i as $e,ii as ub$1,in as Wh$1,j as F1,ji as M,jn as ds$1,jr as mw$1,ki as K,kn as dg$1,kt as Ql,m as Bh,mt as Ob$1,n as $D,nn as W1$1,nt as Lb,o as Ab$1,or as iI,pr as k1$1,qr as ql$1,qt as Tw$1,r as $b$1,ri as tu$1,sr as im$1,tn as Vy$1,tt as L1,u as Aw$1,ur as jD,vi as yw$1,vn as bb$1,vt as P1,w as Du$1,wi as F$2,wn as cc$1,xi as zl$2,xr as le,xt as Ph,yn as be,yr as ko,yt as PD,z as GD}from"./chunk-LD3k3Loy.js";var Vm=J((M3,jm)=>{"use strict";function zm(i,t){this.text=i=i||``,this.hasWild=~i.indexOf(`*`),this.separator=t,this.parts=i.split(t)}zm.prototype.match=function(i){var t=!0,e=this.parts,n,o=e.length,r;if(typeof i==`string`||i instanceof String)if(!this.hasWild&&this.text!=i)t=!1;else{for(r=(i||``).split(this.separator),n=0;t&&n<o;n++)e[n]!==`*`&&(n<r.length?t=e[n]===r[n]:t=!1);t=t&&r}else if(typeof i.splice==`function`)for(t=[],n=i.length;n--;)this.match(i[n])&&(t[t.length]=i[n]);else if(typeof i==`object`){t={};for(var a in i)this.match(a)&&(t[a]=i[a])}return t};jm.exports=function(i,t,e){var n=new zm(i,e||/[\/\.]/);return typeof t<`u`?n.match(t):n}});var $m=J((k3,Um)=>{var Qb=Vm(),Jb=/[\/\+\.]/;Um.exports=function(i,t){function e(n){var o=Qb(n,i,Jb);return o&&o.length>=2}return t?e(t.split(`;`)[0]):e}});var ml=J((L3,Wm)=>{function tv(i){var t=typeof i;return i!=null&&(t==`object`||t==`function`)}Wm.exports=tv});var Km=J((z3,Gm)=>{Gm.exports=typeof global==`object`&&global&&global.Object===Object&&global});var ap=J((j3,Ym)=>{var nv=Km(),ov=typeof self==`object`&&self&&self.Object===Object&&self;Ym.exports=nv||ov||Function(`return this`)()});var Zm=J((V3,Xm)=>{var av=ap(),sv=function(){return av.Date.now()};Xm.exports=sv});var Jm=J((U3,Qm)=>{var lv=/\s/;function dv(i){for(var t=i.length;t--&&lv.test(i.charAt(t)););return t}Qm.exports=dv});var tf=J(($3,ef)=>{var pv=Jm(),cv=/^\s+/;function uv(i){return i&&i.slice(0,pv(i)+1).replace(cv,``)}ef.exports=uv});var sp=J((H3,nf)=>{nf.exports=ap().Symbol});var sf=J((q3,af)=>{var of=sp(),rf=Object.prototype,fv=rf.hasOwnProperty,gv=rf.toString,Sa=of?of.toStringTag:void 0;function yv(i){var t=fv.call(i,Sa),e=i[Sa];try{i[Sa]=void 0;var n=!0}catch(r){}var o=gv.call(i);return n&&(t?i[Sa]=e:delete i[Sa]),o}af.exports=yv});var df=J((W3,lf)=>{var vv=Object.prototype.toString;function _v(i){return vv.call(i)}lf.exports=_v});var hf=J((G3,uf)=>{var pf=sp(),xv=sf(),Cv=df(),wv=`[object Null]`,Sv=`[object Undefined]`,cf=pf?pf.toStringTag:void 0;function Dv(i){return i==null?i===void 0?Sv:wv:cf&&cf in Object(i)?xv(i):Cv(i)}uf.exports=Dv});var ff=J((K3,mf)=>{function Iv(i){return i!=null&&typeof i==`object`}mf.exports=Iv});var yf=J((Y3,gf)=>{var Tv=hf(),Pv=ff(),Ev=`[object Symbol]`;function Mv(i){return typeof i==`symbol`||Pv(i)&&Tv(i)==Ev}gf.exports=Mv});var xf=J((X3,_f)=>{var kv=tf(),bf=ml(),Ov=yf(),vf=NaN,Av=/^[-+]0x[0-9a-f]+$/i,Fv=/^0b[01]+$/i,Bv=/^0o[0-7]+$/i,Nv=parseInt;function Rv(i){if(typeof i==`number`)return i;if(Ov(i))return vf;if(bf(i)){var t=typeof i.valueOf==`function`?i.valueOf():i;i=bf(t)?t+``:t}if(typeof i!=`string`)return i===0?i:+i;i=kv(i);var e=Fv.test(i);return e||Bv.test(i)?Nv(i.slice(2),e?2:8):Av.test(i)?vf:+i}_f.exports=Rv});var fl=J((Z3,wf)=>{var Lv=ml(),lp=Zm(),Cf=xf(),zv=`Expected a function`,jv=Math.max,Vv=Math.min;function Uv(i,t,e){var n,o,r,a,s,l,d=0,c=!1,m=!1,g=!0;if(typeof i!=`function`)throw new TypeError(zv);t=Cf(t)||0,Lv(e)&&(c=!!e.leading,m=`maxWait`in e,r=m?jv(Cf(e.maxWait)||0,t):r,g=`trailing`in e?!!e.trailing:g);function v(S){var D=n,N=o;return n=o=void 0,d=S,a=i.apply(N,D),a}function _(S){return d=S,s=setTimeout(E,t),c?v(S):a}function P(S){var D=S-l,N=S-d,V=t-D;return m?Vv(V,r-N):V}function O(S){var D=S-l,N=S-d;return l===void 0||D>=t||D<0||m&&N>=r}function E(){var S=lp();if(O(S))return ne(S);s=setTimeout(E,P(S))}function ne(S){return s=void 0,g&&n?v(S):(n=o=void 0,a)}function G(){s!==void 0&&clearTimeout(s),d=0,n=l=o=s=void 0}function ce(){return s===void 0?a:ne(lp())}function de(){var S=lp(),D=O(S);if(n=arguments,o=this,l=S,D){if(s===void 0)return _(l);if(m)return clearTimeout(s),s=setTimeout(E,t),v(l)}return s===void 0&&(s=setTimeout(E,t)),a}return de.cancel=G,de.flush=ce,de}wf.exports=Uv});var Df=J((Q3,Sf)=>{var $v=fl(),Hv=ml(),qv=`Expected a function`;function Wv(i,t,e){var n=!0,o=!0;if(typeof i!=`function`)throw new TypeError(qv);return Hv(e)&&(n=`leading`in e?!!e.leading:n,o=`trailing`in e?!!e.trailing:o),$v(i,t,{leading:n,maxWait:t,trailing:o})}Sf.exports=Wv});var Tf=J((J3,If)=>{If.exports=function(){var t={},e=t._fns={};t.emit=function(a,s,l,d,c,m,g){var v=n(a);v.length&&o(a,v,[s,l,d,c,m,g])},t.on=function(a,s){e[a]||(e[a]=[]),e[a].push(s)},t.once=function(a,s){function l(){s.apply(this,arguments),t.off(a,l)}this.on(a,l)},t.off=function(a,s){var l=[];if(a&&s){var d=this._fns[a],c=0,m=d?d.length:0;for(;c<m;c++)d[c]!==s&&l.push(d[c])}l.length?this._fns[a]=l:delete this._fns[a]};function n(r){var a=e[r]?e[r]:[],s=r.indexOf(`:`),l=s===-1?[r]:[r.substring(0,s),r.substring(s+1)],d=Object.keys(e),c=0,m=d.length;for(;c<m;c++){var g=d[c];if(g===`*`&&(a=a.concat(e[g])),l.length===2&&l[0]===g){a=a.concat(e[g]);break}}return a}function o(r,a,s){var l=0,d=a.length;for(;l<d&&a[l];l++)a[l].event=r,a[l].apply(a[l],s)}return t}});var pi=J((BA,bl)=>{(function(){"use strict";var i={}.hasOwnProperty;function t(){for(var o=``,r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=n(o,e(a)))}return o}function e(o){if(typeof o==`string`||typeof o==`number`)return o;if(typeof o!=`object`)return``;if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes(`[native code]`))return o.toString();var r=``;for(var a in o)i.call(o,a)&&o[a]&&(r=n(r,a));return r}function n(o,r){return r?o?o+` `+r:o+r:o}typeof bl<`u`&&bl.exports?(t.default=t,bl.exports=t):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return t}):window.classNames=t})()});var Zf=J((VF,Sp)=>{"use strict";var p_=Object.prototype.hasOwnProperty,wi=`~`;function Ta(){}Object.create&&(Ta.prototype=Object.create(null),new Ta().__proto__||(wi=!1));function c_(i,t,e){this.fn=i,this.context=t,this.once=e||!1}function Xf(i,t,e,n,o){if(typeof e!=`function`)throw new TypeError(`The listener must be a function`);var r=new c_(e,n||i,o),a=wi?wi+t:t;return i._events[a]?i._events[a].fn?i._events[a]=[i._events[a],r]:i._events[a].push(r):(i._events[a]=r,i._eventsCount++),i}function xl(i,t){--i._eventsCount===0?i._events=new Ta:delete i._events[t]}function bi(){this._events=new Ta,this._eventsCount=0}bi.prototype.eventNames=function(){var t=[],e,n;if(this._eventsCount===0)return t;for(n in e=this._events)p_.call(e,n)&&t.push(wi?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};bi.prototype.listeners=function(t){var e=wi?wi+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,r=n.length,a=new Array(r);o<r;o++)a[o]=n[o].fn;return a};bi.prototype.listenerCount=function(t){var e=wi?wi+t:t,n=this._events[e];return n?n.fn?1:n.length:0};bi.prototype.emit=function(t,e,n,o,r,a){var s=wi?wi+t:t;if(!this._events[s])return!1;var l=this._events[s],d=arguments.length,c,m;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,o),!0;case 5:return l.fn.call(l.context,e,n,o,r),!0;case 6:return l.fn.call(l.context,e,n,o,r,a),!0}for(m=1,c=new Array(d-1);m<d;m++)c[m-1]=arguments[m];l.fn.apply(l.context,c)}else{var g=l.length,v;for(m=0;m<g;m++)switch(l[m].once&&this.removeListener(t,l[m].fn,void 0,!0),d){case 1:l[m].fn.call(l[m].context);break;case 2:l[m].fn.call(l[m].context,e);break;case 3:l[m].fn.call(l[m].context,e,n);break;case 4:l[m].fn.call(l[m].context,e,n,o);break;default:if(!c)for(v=1,c=new Array(d-1);v<d;v++)c[v-1]=arguments[v];l[m].fn.apply(l[m].context,c)}}return!0};bi.prototype.on=function(t,e,n){return Xf(this,t,e,n,!1)};bi.prototype.once=function(t,e,n){return Xf(this,t,e,n,!0)};bi.prototype.removeListener=function(t,e,n,o){var r=wi?wi+t:t;if(!this._events[r])return this;if(!e)return xl(this,r),this;var a=this._events[r];if(a.fn)a.fn===e&&(!o||a.once)&&(!n||a.context===n)&&xl(this,r);else{for(var s=0,l=[],d=a.length;s<d;s++)(a[s].fn!==e||o&&!a[s].once||n&&a[s].context!==n)&&l.push(a[s]);l.length?this._events[r]=l.length===1?l[0]:l:xl(this,r)}return this};bi.prototype.removeAllListeners=function(t){var e;return t?(e=wi?wi+t:t,this._events[e]&&xl(this,e)):(this._events=new Ta,this._eventsCount=0),this};bi.prototype.off=bi.prototype.removeListener;bi.prototype.addListener=bi.prototype.on;bi.prefixed=wi;bi.EventEmitter=bi;typeof Sp<`u`&&(Sp.exports=bi)});var vg=J((uc,hc)=>{(function(i,t){typeof uc==`object`&&typeof hc<`u`?hc.exports=t():typeof define==`function`&&define.amd?define(t):(i=typeof globalThis<`u`?globalThis:i||self,i.Compressor=t())})(uc,(function(){"use strict";function i(X,j){if(!(X instanceof j))throw new TypeError(`Cannot call a class as a function`)}function t(X,j){for(var q=0;q<j.length;q++){var H=j[q];H.enumerable=H.enumerable||!1,H.configurable=!0,`value`in H&&(H.writable=!0),Object.defineProperty(X,l(H.key),H)}}function e(X,j,q){return j&&t(X.prototype,j),q&&t(X,q),Object.defineProperty(X,"prototype",{writable:!1}),X}function n(X,j,q){return(j=l(j))in X?Object.defineProperty(X,j,{value:q,enumerable:!0,configurable:!0,writable:!0}):X[j]=q,X}function o(){return o=Object.assign?Object.assign.bind():function(X){for(var j=1;j<arguments.length;j++){var q=arguments[j];for(var H in q)({}).hasOwnProperty.call(q,H)&&(X[H]=q[H])}return X},o.apply(null,arguments)}function r(X,j){var q=Object.keys(X);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(X);j&&(H=H.filter(function(ye){return Object.getOwnPropertyDescriptor(X,ye).enumerable})),q.push.apply(q,H)}return q}function a(X){for(var j=1;j<arguments.length;j++){var q=arguments[j]!=null?arguments[j]:{};j%2?r(Object(q),!0).forEach(function(H){n(X,H,q[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(q)):r(Object(q)).forEach(function(H){Object.defineProperty(X,H,Object.getOwnPropertyDescriptor(q,H))})}return X}function s(X,j){if(typeof X!=`object`||!X)return X;var q=X[Symbol.toPrimitive];if(q!==void 0){var H=q.call(X,j||`default`);if(typeof H!=`object`)return H;throw new TypeError(`@@toPrimitive must return a primitive value.`)}return(j===`string`?String:Number)(X)}function l(X){var j=s(X,`string`);return typeof j==`symbol`?j:j+``}function d(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,`default`)?X.default:X}var c={exports:{}};(function(X){typeof window>`u`||(function(j){var q=j.HTMLCanvasElement&&j.HTMLCanvasElement.prototype,H=j.Blob&&(function(){try{return!!new Blob}catch(_e){return!1}})(),ye=H&&j.Uint8Array&&(function(){try{return new Blob([/* @__PURE__ */ new Uint8Array(100)]).size===100}catch(_e){return!1}})(),we=j.BlobBuilder||j.WebKitBlobBuilder||j.MozBlobBuilder||j.MSBlobBuilder,je=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,Ee=(H||we)&&j.atob&&j.ArrayBuffer&&j.Uint8Array&&function(_e){var Ae=_e.match(je),Oe,Ve,Qe,dt,Be,Ct,Xe,Tt;if(!Ae)throw new Error(`invalid data URI`);for(Oe=Ae[2]?Ae[1]:`text/plain`+(Ae[3]||`;charset=US-ASCII`),Ve=!!Ae[4],Qe=_e.slice(Ae[0].length),Ve?dt=atob(Qe):dt=decodeURIComponent(Qe),Be=new ArrayBuffer(dt.length),Ct=new Uint8Array(Be),Xe=0;Xe<dt.length;Xe+=1)Ct[Xe]=dt.charCodeAt(Xe);return H?new Blob([ye?Ct:Be],{type:Oe}):(Tt=new we,Tt.append(Be),Tt.getBlob(Oe))};j.HTMLCanvasElement&&!q.toBlob&&(q.mozGetAsFile?q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){Oe&&q.toDataURL&&Ee?_e(Ee(Ve.toDataURL(Ae,Oe))):_e(Ve.mozGetAsFile(`blob`,Ae))})}:q.toDataURL&&Ee&&(q.msToBlob?q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){(Ae&&Ae!==`image/png`||Oe)&&q.toDataURL&&Ee?_e(Ee(Ve.toDataURL(Ae,Oe))):_e(Ve.msToBlob(Ae))})}:q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){_e(Ee(Ve.toDataURL(Ae,Oe)))})})),X.exports?X.exports=Ee:j.dataURLtoBlob=Ee})(window)})(c);var m=c.exports,g=d(m),v=function(j){return typeof Blob>`u`?!1:j instanceof Blob||Object.prototype.toString.call(j)===`[object Blob]`},_=d(v),P={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:`none`,quality:.8,mimeType:`auto`,convertTypes:[`image/png`],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},E=typeof window<`u`&&typeof window.document<`u`?window:{},ne=function(j){return j>0&&j<1/0},G=Array.prototype.slice;function ce(X){return Array.from?Array.from(X):G.call(X)}var de=/^image\/.+$/;function S(X){return de.test(X)}function D(X){var j=S(X)?X.substr(6):``;return j===`jpeg`&&(j=`jpg`),`.`.concat(j)}var N=String.fromCharCode;function V(X,j,q){var H=``,ye;for(q+=j,ye=j;ye<q;ye+=1)H+=N(X.getUint8(ye));return H}function se(){try{var X=document.createElement(`canvas`);X.width=2,X.height=1;var j=X.getContext(`2d`);if(!j)return!1;var q=j.createImageData(2,1);q.data[0]=12,q.data[1]=23,q.data[2]=34,q.data[3]=255,q.data[4]=45,q.data[5]=56,q.data[6]=67,q.data[7]=255,j.putImageData(q,0,0);var H=j.getImageData(0,0,2,1),ye=[12,23,34,255,45,56,67,255];return H.data.every(function(we,je){return we===ye[je]})}catch(we){return!1}}var Se=E.btoa;function lt(X,j){for(var q=[],H=8192,ye=new Uint8Array(X);ye.length>0;)q.push(N.apply(null,ce(ye.subarray(0,H)))),ye=ye.subarray(H);return`data:`.concat(j,`;base64,`).concat(Se(q.join(``)))}function le(X){var j=new DataView(X),q;try{var H,ye,we;if(j.getUint8(0)===255&&j.getUint8(1)===216)for(var je=j.byteLength,Ee=2;Ee+1<je;){if(j.getUint8(Ee)===255&&j.getUint8(Ee+1)===225){ye=Ee;break}Ee+=1}if(ye){var _e=ye+4,Ae=ye+10;if(V(j,_e,4)===`Exif`){var Oe=j.getUint16(Ae);if(H=Oe===18761,(H||Oe===19789)&&j.getUint16(Ae+2,H)===42){var Ve=j.getUint32(Ae+4,H);Ve>=8&&(we=Ae+Ve)}}}if(we){var Qe=j.getUint16(we,H),dt,Be=0;for(;Be<Qe;Be+=1)if(dt=we+Be*12+2,j.getUint16(dt,H)===274){dt+=8,q=j.getUint16(dt,H),j.setUint16(dt,1,H);break}}}catch(Ct){q=1}return q}function Re(X){var j=0,q=1,H=1;switch(X){case 2:q=-1;break;case 3:j=-180;break;case 4:H=-1;break;case 5:j=90,H=-1;break;case 6:j=90;break;case 7:j=90,q=-1;break;case 8:j=-90}return{rotate:j,scaleX:q,scaleY:H}}var K=/\.\d*(?:0|9){12}\d*$/;function z(X){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return K.test(X)?Math.round(X*j)/j:X}function pe(X){var j=X.aspectRatio,q=X.height,H=X.width,ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`none`,we=ne(H),je=ne(q);if(we&&je){var Ee=q*j;(ye===`contain`||ye===`none`)&&Ee>H||ye===`cover`&&Ee<H?q=H/j:H=q*j}else we?q=H/j:je&&(H=q*j);return{width:H,height:q}}function L(X){for(var j=ce(new Uint8Array(X)),q=j.length,H=[],ye=0;ye+3<q;){var we=j[ye],je=j[ye+1];if(we===255&&je===218)break;if(we===255&&je===216)ye+=2;else{var Ee=j[ye+2]*256+j[ye+3],_e=ye+Ee+2,Ae=j.slice(ye,_e);H.push(Ae),ye=_e}}return H.reduce(function(Oe,Ve){return Ve[0]===255&&Ve[1]===225?Oe.concat(Ve):Oe},[])}function Le(X,j){var q=ce(new Uint8Array(X));if(q[2]!==255||q[3]!==224)return X;var H=q[4]*256+q[5],ye=[255,216].concat(j,q.slice(4+H));return new Uint8Array(ye)}var He=E.ArrayBuffer,Te=E.FileReader,ft=E.URL||E.webkitURL,Je=/\.\w+$/,st=E.Compressor;return(function(){function X(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,X),this.file=j,this.exif=[],this.image=new Image,this.options=a(a({},P),q),this.aborted=!1,this.result=null,this.init()}return e(X,[{key:`init`,value:function(){var q=this,H=this.file,ye=this.options;if(!_(H)){this.fail(/* @__PURE__ */ new Error(`The first argument must be a File or Blob object.`));return}var we=H.type;if(!S(we)){this.fail(/* @__PURE__ */ new Error(`The first argument must be an image File or Blob object.`));return}if(!ft||!Te){this.fail(/* @__PURE__ */ new Error(`The current browser does not support image compression.`));return}He||(ye.checkOrientation=!1,ye.retainExif=!1);var je=we===`image/jpeg`,Ee=je&&ye.checkOrientation,_e=je&&ye.retainExif;if(ft&&!Ee&&!_e)this.load({url:ft.createObjectURL(H)});else{var Ae=new Te;this.reader=Ae,Ae.onload=function(Oe){var Qe=Oe.target.result,dt={},Be=1;Ee&&(Be=le(Qe),Be>1&&o(dt,Re(Be))),_e&&(q.exif=L(Qe)),Ee||_e?!ft||Be>1?dt.url=lt(Qe,we):dt.url=ft.createObjectURL(H):dt.url=Qe,q.load(dt)},Ae.onabort=function(){q.fail(/* @__PURE__ */ new Error(`Aborted to read the image with FileReader.`))},Ae.onerror=function(){q.fail(/* @__PURE__ */ new Error(`Failed to read the image with FileReader.`))},Ae.onloadend=function(){q.reader=null},Ee||_e?Ae.readAsArrayBuffer(H):Ae.readAsDataURL(H)}}},{key:`load`,value:function(q){var H=this,ye=this.file,we=this.image;we.onload=function(){se()?H.draw(a(a({},q),{},{naturalWidth:we.naturalWidth,naturalHeight:we.naturalHeight})):H.done({naturalWidth:we.naturalWidth,naturalHeight:we.naturalHeight,result:null})},we.onabort=function(){H.fail(/* @__PURE__ */ new Error(`Aborted to load the image.`))},we.onerror=function(){H.fail(/* @__PURE__ */ new Error(`Failed to load the image.`))},E.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(E.navigator.userAgent)&&(we.crossOrigin=`anonymous`),we.alt=ye.name,we.src=q.url}},{key:`draw`,value:function(q){var H=this,ye=q.naturalWidth,we=q.naturalHeight,je=q.rotate,Ee=je===void 0?0:je,_e=q.scaleX,Ae=_e===void 0?1:_e,Oe=q.scaleY,Ve=Oe===void 0?1:Oe,Qe=this.file,dt=this.image,Be=this.options,Ct=document.createElement(`canvas`),Xe=Ct.getContext(`2d`),Tt=Math.abs(Ee)%180===90,vt=(Be.resize===`contain`||Be.resize===`cover`)&&ne(Be.width)&&ne(Be.height),wt=Math.max(Be.maxWidth,0)||1/0,W=Math.max(Be.maxHeight,0)||1/0,Ie=Math.max(Be.minWidth,0)||0,I=Math.max(Be.minHeight,0)||0,re=ye/we,ee=Be.width,ve=Be.height;if(Tt){var et=[W,wt];wt=et[0],W=et[1];var Ke=[I,Ie];Ie=Ke[0],I=Ke[1];var Ur=[ve,ee];ee=Ur[0],ve=Ur[1]}vt&&(re=ee/ve);var To=pe({aspectRatio:re,width:wt,height:W},`contain`);wt=To.width,W=To.height;var yn=pe({aspectRatio:re,width:Ie,height:I},`cover`);if(Ie=yn.width,I=yn.height,vt){var bs=pe({aspectRatio:re,width:ee,height:ve},Be.resize);ee=bs.width,ve=bs.height}else{var En=pe({aspectRatio:re,width:ee,height:ve}),ri=En.width;ee=ri===void 0?ye:ri;var vs=En.height;ve=vs===void 0?we:vs}ee=Math.floor(z(Math.min(Math.max(ee,Ie),wt))),ve=Math.floor(z(Math.min(Math.max(ve,I),W)));var _s=-ee/2,Pt=-ve/2,_t=ee,ad=ve,bn=[];if(vt){var xs=0,an=0,$r=ye,Et=we,Fi=pe({aspectRatio:re,width:ye,height:we},{contain:`cover`,cover:`contain`}[Be.resize]);$r=Fi.width,Et=Fi.height,xs=(ye-$r)/2,an=(we-Et)/2,bn.push(xs,an,$r,Et)}if(bn.push(_s,Pt,_t,ad),Tt){var Mn=[ve,ee];ee=Mn[0],ve=Mn[1]}Ct.width=ee,Ct.height=ve,S(Be.mimeType)||(Be.mimeType=Qe.type);var Cs=`transparent`;Qe.size>Be.convertSize&&Be.convertTypes.indexOf(Be.mimeType)>=0&&(Be.mimeType=`image/jpeg`);var Po=Be.mimeType===`image/jpeg`;if(Po&&(Cs=`#fff`),Xe.fillStyle=Cs,Xe.fillRect(0,0,ee,ve),Be.beforeDraw&&Be.beforeDraw.call(this,Xe,Ct),!this.aborted&&(Xe.save(),Xe.translate(ee/2,ve/2),Xe.rotate(Ee*Math.PI/180),Xe.scale(Ae,Ve),Xe.drawImage.apply(Xe,[dt].concat(bn)),Xe.restore(),Be.drew&&Be.drew.call(this,Xe,Ct),!this.aborted)){var Eo=function(oo){if(!H.aborted){var Hr=function(Yi){return H.done({naturalWidth:ye,naturalHeight:we,result:Yi})};if(oo&&Po&&Be.retainExif&&H.exif&&H.exif.length>0){var qr=function(Yi){return Hr(g(lt(Le(Yi,H.exif),Be.mimeType)))};if(oo.arrayBuffer)oo.arrayBuffer().then(qr).catch(function(){H.fail(/* @__PURE__ */ new Error(`Failed to read the compressed image with Blob.arrayBuffer().`))});else{var Kt=new Te;H.reader=Kt,Kt.onload=function(ci){var Yi=ci.target;qr(Yi.result)},Kt.onabort=function(){H.fail(/* @__PURE__ */ new Error(`Aborted to read the compressed image with FileReader.`))},Kt.onerror=function(){H.fail(/* @__PURE__ */ new Error(`Failed to read the compressed image with FileReader.`))},Kt.onloadend=function(){H.reader=null},Kt.readAsArrayBuffer(oo)}}else Hr(oo)}};Ct.toBlob?Ct.toBlob(Eo,Be.mimeType,Be.quality):Eo(g(Ct.toDataURL(Be.mimeType,Be.quality)))}}},{key:`done`,value:function(q){var H=q.naturalWidth,ye=q.naturalHeight,we=q.result,je=this.file,Ee=this.image,_e=this.options;if(ft&&Ee.src.indexOf(`blob:`)===0&&ft.revokeObjectURL(Ee.src),we)if(_e.strict&&!_e.retainExif&&we.size>je.size&&_e.mimeType===je.type&&!(_e.width>H||_e.height>ye||_e.minWidth>H||_e.minHeight>ye||_e.maxWidth<H||_e.maxHeight<ye))we=je;else{var Ae=je.name;Ae&&we.type!==je.type&&(Ae=Ae.replace(Je,D(we.type)));try{we=new File([we],Ae,{type:we.type})}catch(Ve){var Oe=/* @__PURE__ */ new Date;we.name=Ae,we.lastModified=Oe.getTime(),we.lastModifiedDate=Oe}}else we=je;this.result=we,_e.success&&_e.success.call(this,we)}},{key:`fail`,value:function(q){var H=this.options;if(H.error)H.error.call(this,q);else throw q}},{key:`abort`,value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(/* @__PURE__ */ new Error(`The compression process has been aborted.`)):(this.image.onload=null,this.image.onabort()))}}],[{key:`create`,value:function(q,H){return new X(q,H)}},{key:`setDefaults`,value:function(q){o(P,q)}},{key:`noConflict`,value:function(){return window.Compressor=st,X}}])})()}))});var Cg=J((mc,fc)=>{(function(i,t){typeof mc==`object`&&typeof fc<`u`?fc.exports=t():typeof define==`function`&&define.amd?define(t):(i=typeof globalThis<`u`?globalThis:i||self,i.Cropper=t())})(mc,(function(){"use strict";function i(T,u){var f=Object.keys(T);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(T);u&&(h=h.filter(function(B){return Object.getOwnPropertyDescriptor(T,B).enumerable})),f.push.apply(f,h)}return f}function t(T){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?arguments[u]:{};u%2?i(Object(f),!0).forEach(function(h){l(T,h,f[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(f)):i(Object(f)).forEach(function(h){Object.defineProperty(T,h,Object.getOwnPropertyDescriptor(f,h))})}return T}function e(T,u){if(typeof T!=`object`||!T)return T;var f=T[Symbol.toPrimitive];if(f!==void 0){var h=f.call(T,u||`default`);if(typeof h!=`object`)return h;throw new TypeError(`@@toPrimitive must return a primitive value.`)}return(u===`string`?String:Number)(T)}function n(T){var u=e(T,`string`);return typeof u==`symbol`?u:u+``}function o(T){"@babel/helpers - typeof";return o=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(u){return typeof u}:function(u){return u&&typeof Symbol==`function`&&u.constructor===Symbol&&u!==Symbol.prototype?`symbol`:typeof u},o(T)}function r(T,u){if(!(T instanceof u))throw new TypeError(`Cannot call a class as a function`)}function a(T,u){for(var f=0;f<u.length;f++){var h=u[f];h.enumerable=h.enumerable||!1,h.configurable=!0,`value`in h&&(h.writable=!0),Object.defineProperty(T,n(h.key),h)}}function s(T,u,f){return u&&a(T.prototype,u),f&&a(T,f),Object.defineProperty(T,"prototype",{writable:!1}),T}function l(T,u,f){return u=n(u),u in T?Object.defineProperty(T,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):T[u]=f,T}function d(T){return c(T)||m(T)||g(T)||_()}function c(T){if(Array.isArray(T))return v(T)}function m(T){if(typeof Symbol<`u`&&T[Symbol.iterator]!=null||T[`@@iterator`]!=null)return Array.from(T)}function g(T,u){if(T){if(typeof T==`string`)return v(T,u);var f=Object.prototype.toString.call(T).slice(8,-1);if(f===`Object`&&T.constructor&&(f=T.constructor.name),f===`Map`||f===`Set`)return Array.from(T);if(f===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return v(T,u)}}function v(T,u){(u==null||u>T.length)&&(u=T.length);for(var f=0,h=new Array(u);f<u;f++)h[f]=T[f];return h}function _(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1
|
+
import{_ as W,b as Z,c as qt,d as F,f as T,g as Jt,h as Fa$1,i as Te,m as Ba$1,n as ht,o as Rt,p as U,r as or$1,s as Wt,t as Le,v as Xt,x as eu,y as Ya$1}from"./main-Q2MGVNT6.js";import{t as Ge}from"./chunk-BUsg5rFD.js";import{c as ra,l as vi,n as Mt$1,o as ha$1,r as Ni,t as Ai}from"./chunk-2WAnOzGd.js";import{t as i}from"./chunk-CKXRHkCI.js";import{_ as zn,c as Sn,d as gn$1,f as gr$1,g as ye,h as qr,l as Ti,m as mn$1,n as An,r as Ee}from"./chunk-CpMSXHia.js";import{$ as gl$1,Dt as yi$1,F as Vl$1,H as _t,I as Wl,J as dl$1,K as bt,L as Xi,Mt as zr$1,O as Su,Ot as yl$1,Q as gd,S as Ml$1,St as vl$1,W as al$1,X as fe,Y as el$1,Z as fl$1,bt as ul$1,d as Do$1,et as hd,ht as si,it as jl$1,jt as zl$1,k as Tc,m as F$1,mt as rp,nt as it,pt as rl$1,q as ct,r as Ac,rt as ja$1,s as At$1,t as $,vt as tu,w as Ol$1,wt as vu,z as Ze}from"./chunk-CZtkF-WL.js";import{B as js,D as Xi$1,F as fh,G as ne,I as fn$1,K as oh,L as gl$2,P as dh,Q as tt,R as hh,S as Tl$1,W as lh,X as sh,Y as sc$1,_ as Ps,a as Fs,at as xh,b as Sl$1,c as Hr,i as Fo,it as xe,k as _l$1,ot as xs,p as Me,r as Er$1,s as Gs$1,tt as vl$2,u as It$1,v as Rs,w as Us,z as ja$2}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb$1,B as GI,Ci as zu,Cr as lm$1,Ct as Pm$1,Di as I,Dr as ml$1,E,Ei as H,Et as Q,Fi as w,Fn as ee,Fr as od,Ft as Rh,G as He,Gn as fs,Gr as qe,H as Gu,Hn as fl$2,I as Fw$1,In as ei,Kn as fw$1,Kr as qh$1,Lr as ov,Mi as N,Mt as Qr,Ni as O,Nn as eE$1,Oi as J,Ot as QI,Pi as P,Pn as eb,Pr as oE$1,R as G1,Rn as ep$1,S as Db$1,St as Pi,Ti as G,Tn as cg$1,Tt as Pw$1,V as Gh$1,Vn as fg$1,Vr as pm$1,Vt as Tb$1,W as Hb$1,Wt as Th,X as Jh$1,Xr as rm$1,Yt as U1$1,Z as Ji,Zr as ru,_ as Cb,_r as kh,_t as Ow$1,ai as ue,ar as hw$1,bi as zh$1,br as kw$1,bt as Pb$1,c as Ah,cr as it$1,di as vw$1,ei as ti,en as Vw,er as hd$1,f as BD,fi as wb$1,fn as Zr,fr as jw,ft as O1,g as Br,gi as x,gn as _h,gr as ke,hr as kb$1,ht as Oh,i as $e,ii as ub$1,in as Wh$1,j as F1,ji as M,jn as ds$1,jr as mw$1,ki as K,kn as dg$1,kt as Ql,m as Bh,mt as Ob$1,n as $D,nn as W1$1,nt as Lb,o as Ab$1,or as iI,pr as k1$1,qr as ql$1,qt as Tw$1,r as $b$1,ri as tu$1,sr as im$1,tn as Vy$1,tt as L1,u as Aw$1,ur as jD,vi as yw$1,vn as bb$1,vt as P1,w as Du$1,wi as F$2,wn as cc$1,xi as zl$2,xr as le,xt as Ph,yn as be,yr as ko,yt as PD,z as GD}from"./chunk-LD3k3Loy.js";var Vm=J((M3,jm)=>{"use strict";function zm(i,t){this.text=i=i||``,this.hasWild=~i.indexOf(`*`),this.separator=t,this.parts=i.split(t)}zm.prototype.match=function(i){var t=!0,e=this.parts,n,o=e.length,r;if(typeof i==`string`||i instanceof String)if(!this.hasWild&&this.text!=i)t=!1;else{for(r=(i||``).split(this.separator),n=0;t&&n<o;n++)e[n]!==`*`&&(n<r.length?t=e[n]===r[n]:t=!1);t=t&&r}else if(typeof i.splice==`function`)for(t=[],n=i.length;n--;)this.match(i[n])&&(t[t.length]=i[n]);else if(typeof i==`object`){t={};for(var a in i)this.match(a)&&(t[a]=i[a])}return t};jm.exports=function(i,t,e){var n=new zm(i,e||/[\/\.]/);return typeof t<`u`?n.match(t):n}});var $m=J((k3,Um)=>{var Qb=Vm(),Jb=/[\/\+\.]/;Um.exports=function(i,t){function e(n){var o=Qb(n,i,Jb);return o&&o.length>=2}return t?e(t.split(`;`)[0]):e}});var ml=J((L3,Wm)=>{function tv(i){var t=typeof i;return i!=null&&(t==`object`||t==`function`)}Wm.exports=tv});var Km=J((z3,Gm)=>{Gm.exports=typeof global==`object`&&global&&global.Object===Object&&global});var ap=J((j3,Ym)=>{var nv=Km(),ov=typeof self==`object`&&self&&self.Object===Object&&self;Ym.exports=nv||ov||Function(`return this`)()});var Zm=J((V3,Xm)=>{var av=ap(),sv=function(){return av.Date.now()};Xm.exports=sv});var Jm=J((U3,Qm)=>{var lv=/\s/;function dv(i){for(var t=i.length;t--&&lv.test(i.charAt(t)););return t}Qm.exports=dv});var tf=J(($3,ef)=>{var pv=Jm(),cv=/^\s+/;function uv(i){return i&&i.slice(0,pv(i)+1).replace(cv,``)}ef.exports=uv});var sp=J((H3,nf)=>{nf.exports=ap().Symbol});var sf=J((q3,af)=>{var of=sp(),rf=Object.prototype,fv=rf.hasOwnProperty,gv=rf.toString,Sa=of?of.toStringTag:void 0;function yv(i){var t=fv.call(i,Sa),e=i[Sa];try{i[Sa]=void 0;var n=!0}catch(r){}var o=gv.call(i);return n&&(t?i[Sa]=e:delete i[Sa]),o}af.exports=yv});var df=J((W3,lf)=>{var vv=Object.prototype.toString;function _v(i){return vv.call(i)}lf.exports=_v});var hf=J((G3,uf)=>{var pf=sp(),xv=sf(),Cv=df(),wv=`[object Null]`,Sv=`[object Undefined]`,cf=pf?pf.toStringTag:void 0;function Dv(i){return i==null?i===void 0?Sv:wv:cf&&cf in Object(i)?xv(i):Cv(i)}uf.exports=Dv});var ff=J((K3,mf)=>{function Iv(i){return i!=null&&typeof i==`object`}mf.exports=Iv});var yf=J((Y3,gf)=>{var Tv=hf(),Pv=ff(),Ev=`[object Symbol]`;function Mv(i){return typeof i==`symbol`||Pv(i)&&Tv(i)==Ev}gf.exports=Mv});var xf=J((X3,_f)=>{var kv=tf(),bf=ml(),Ov=yf(),vf=NaN,Av=/^[-+]0x[0-9a-f]+$/i,Fv=/^0b[01]+$/i,Bv=/^0o[0-7]+$/i,Nv=parseInt;function Rv(i){if(typeof i==`number`)return i;if(Ov(i))return vf;if(bf(i)){var t=typeof i.valueOf==`function`?i.valueOf():i;i=bf(t)?t+``:t}if(typeof i!=`string`)return i===0?i:+i;i=kv(i);var e=Fv.test(i);return e||Bv.test(i)?Nv(i.slice(2),e?2:8):Av.test(i)?vf:+i}_f.exports=Rv});var fl=J((Z3,wf)=>{var Lv=ml(),lp=Zm(),Cf=xf(),zv=`Expected a function`,jv=Math.max,Vv=Math.min;function Uv(i,t,e){var n,o,r,a,s,l,d=0,c=!1,m=!1,g=!0;if(typeof i!=`function`)throw new TypeError(zv);t=Cf(t)||0,Lv(e)&&(c=!!e.leading,m=`maxWait`in e,r=m?jv(Cf(e.maxWait)||0,t):r,g=`trailing`in e?!!e.trailing:g);function v(S){var D=n,N=o;return n=o=void 0,d=S,a=i.apply(N,D),a}function _(S){return d=S,s=setTimeout(E,t),c?v(S):a}function P(S){var D=S-l,N=S-d,V=t-D;return m?Vv(V,r-N):V}function O(S){var D=S-l,N=S-d;return l===void 0||D>=t||D<0||m&&N>=r}function E(){var S=lp();if(O(S))return ne(S);s=setTimeout(E,P(S))}function ne(S){return s=void 0,g&&n?v(S):(n=o=void 0,a)}function G(){s!==void 0&&clearTimeout(s),d=0,n=l=o=s=void 0}function ce(){return s===void 0?a:ne(lp())}function de(){var S=lp(),D=O(S);if(n=arguments,o=this,l=S,D){if(s===void 0)return _(l);if(m)return clearTimeout(s),s=setTimeout(E,t),v(l)}return s===void 0&&(s=setTimeout(E,t)),a}return de.cancel=G,de.flush=ce,de}wf.exports=Uv});var Df=J((Q3,Sf)=>{var $v=fl(),Hv=ml(),qv=`Expected a function`;function Wv(i,t,e){var n=!0,o=!0;if(typeof i!=`function`)throw new TypeError(qv);return Hv(e)&&(n=`leading`in e?!!e.leading:n,o=`trailing`in e?!!e.trailing:o),$v(i,t,{leading:n,maxWait:t,trailing:o})}Sf.exports=Wv});var Tf=J((J3,If)=>{If.exports=function(){var t={},e=t._fns={};t.emit=function(a,s,l,d,c,m,g){var v=n(a);v.length&&o(a,v,[s,l,d,c,m,g])},t.on=function(a,s){e[a]||(e[a]=[]),e[a].push(s)},t.once=function(a,s){function l(){s.apply(this,arguments),t.off(a,l)}this.on(a,l)},t.off=function(a,s){var l=[];if(a&&s){var d=this._fns[a],c=0,m=d?d.length:0;for(;c<m;c++)d[c]!==s&&l.push(d[c])}l.length?this._fns[a]=l:delete this._fns[a]};function n(r){var a=e[r]?e[r]:[],s=r.indexOf(`:`),l=s===-1?[r]:[r.substring(0,s),r.substring(s+1)],d=Object.keys(e),c=0,m=d.length;for(;c<m;c++){var g=d[c];if(g===`*`&&(a=a.concat(e[g])),l.length===2&&l[0]===g){a=a.concat(e[g]);break}}return a}function o(r,a,s){var l=0,d=a.length;for(;l<d&&a[l];l++)a[l].event=r,a[l].apply(a[l],s)}return t}});var pi=J((BA,bl)=>{(function(){"use strict";var i={}.hasOwnProperty;function t(){for(var o=``,r=0;r<arguments.length;r++){var a=arguments[r];a&&(o=n(o,e(a)))}return o}function e(o){if(typeof o==`string`||typeof o==`number`)return o;if(typeof o!=`object`)return``;if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes(`[native code]`))return o.toString();var r=``;for(var a in o)i.call(o,a)&&o[a]&&(r=n(r,a));return r}function n(o,r){return r?o?o+` `+r:o+r:o}typeof bl<`u`&&bl.exports?(t.default=t,bl.exports=t):typeof define==`function`&&typeof define.amd==`object`&&define.amd?define(`classnames`,[],function(){return t}):window.classNames=t})()});var Zf=J((VF,Sp)=>{"use strict";var p_=Object.prototype.hasOwnProperty,wi=`~`;function Ta(){}Object.create&&(Ta.prototype=Object.create(null),new Ta().__proto__||(wi=!1));function c_(i,t,e){this.fn=i,this.context=t,this.once=e||!1}function Xf(i,t,e,n,o){if(typeof e!=`function`)throw new TypeError(`The listener must be a function`);var r=new c_(e,n||i,o),a=wi?wi+t:t;return i._events[a]?i._events[a].fn?i._events[a]=[i._events[a],r]:i._events[a].push(r):(i._events[a]=r,i._eventsCount++),i}function xl(i,t){--i._eventsCount===0?i._events=new Ta:delete i._events[t]}function bi(){this._events=new Ta,this._eventsCount=0}bi.prototype.eventNames=function(){var t=[],e,n;if(this._eventsCount===0)return t;for(n in e=this._events)p_.call(e,n)&&t.push(wi?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};bi.prototype.listeners=function(t){var e=wi?wi+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,r=n.length,a=new Array(r);o<r;o++)a[o]=n[o].fn;return a};bi.prototype.listenerCount=function(t){var e=wi?wi+t:t,n=this._events[e];return n?n.fn?1:n.length:0};bi.prototype.emit=function(t,e,n,o,r,a){var s=wi?wi+t:t;if(!this._events[s])return!1;var l=this._events[s],d=arguments.length,c,m;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,o),!0;case 5:return l.fn.call(l.context,e,n,o,r),!0;case 6:return l.fn.call(l.context,e,n,o,r,a),!0}for(m=1,c=new Array(d-1);m<d;m++)c[m-1]=arguments[m];l.fn.apply(l.context,c)}else{var g=l.length,v;for(m=0;m<g;m++)switch(l[m].once&&this.removeListener(t,l[m].fn,void 0,!0),d){case 1:l[m].fn.call(l[m].context);break;case 2:l[m].fn.call(l[m].context,e);break;case 3:l[m].fn.call(l[m].context,e,n);break;case 4:l[m].fn.call(l[m].context,e,n,o);break;default:if(!c)for(v=1,c=new Array(d-1);v<d;v++)c[v-1]=arguments[v];l[m].fn.apply(l[m].context,c)}}return!0};bi.prototype.on=function(t,e,n){return Xf(this,t,e,n,!1)};bi.prototype.once=function(t,e,n){return Xf(this,t,e,n,!0)};bi.prototype.removeListener=function(t,e,n,o){var r=wi?wi+t:t;if(!this._events[r])return this;if(!e)return xl(this,r),this;var a=this._events[r];if(a.fn)a.fn===e&&(!o||a.once)&&(!n||a.context===n)&&xl(this,r);else{for(var s=0,l=[],d=a.length;s<d;s++)(a[s].fn!==e||o&&!a[s].once||n&&a[s].context!==n)&&l.push(a[s]);l.length?this._events[r]=l.length===1?l[0]:l:xl(this,r)}return this};bi.prototype.removeAllListeners=function(t){var e;return t?(e=wi?wi+t:t,this._events[e]&&xl(this,e)):(this._events=new Ta,this._eventsCount=0),this};bi.prototype.off=bi.prototype.removeListener;bi.prototype.addListener=bi.prototype.on;bi.prefixed=wi;bi.EventEmitter=bi;typeof Sp<`u`&&(Sp.exports=bi)});var vg=J((uc,hc)=>{(function(i,t){typeof uc==`object`&&typeof hc<`u`?hc.exports=t():typeof define==`function`&&define.amd?define(t):(i=typeof globalThis<`u`?globalThis:i||self,i.Compressor=t())})(uc,(function(){"use strict";function i(X,j){if(!(X instanceof j))throw new TypeError(`Cannot call a class as a function`)}function t(X,j){for(var q=0;q<j.length;q++){var H=j[q];H.enumerable=H.enumerable||!1,H.configurable=!0,`value`in H&&(H.writable=!0),Object.defineProperty(X,l(H.key),H)}}function e(X,j,q){return j&&t(X.prototype,j),q&&t(X,q),Object.defineProperty(X,"prototype",{writable:!1}),X}function n(X,j,q){return(j=l(j))in X?Object.defineProperty(X,j,{value:q,enumerable:!0,configurable:!0,writable:!0}):X[j]=q,X}function o(){return o=Object.assign?Object.assign.bind():function(X){for(var j=1;j<arguments.length;j++){var q=arguments[j];for(var H in q)({}).hasOwnProperty.call(q,H)&&(X[H]=q[H])}return X},o.apply(null,arguments)}function r(X,j){var q=Object.keys(X);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(X);j&&(H=H.filter(function(ye){return Object.getOwnPropertyDescriptor(X,ye).enumerable})),q.push.apply(q,H)}return q}function a(X){for(var j=1;j<arguments.length;j++){var q=arguments[j]!=null?arguments[j]:{};j%2?r(Object(q),!0).forEach(function(H){n(X,H,q[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(X,Object.getOwnPropertyDescriptors(q)):r(Object(q)).forEach(function(H){Object.defineProperty(X,H,Object.getOwnPropertyDescriptor(q,H))})}return X}function s(X,j){if(typeof X!=`object`||!X)return X;var q=X[Symbol.toPrimitive];if(q!==void 0){var H=q.call(X,j||`default`);if(typeof H!=`object`)return H;throw new TypeError(`@@toPrimitive must return a primitive value.`)}return(j===`string`?String:Number)(X)}function l(X){var j=s(X,`string`);return typeof j==`symbol`?j:j+``}function d(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,`default`)?X.default:X}var c={exports:{}};(function(X){typeof window>`u`||(function(j){var q=j.HTMLCanvasElement&&j.HTMLCanvasElement.prototype,H=j.Blob&&(function(){try{return!!new Blob}catch(_e){return!1}})(),ye=H&&j.Uint8Array&&(function(){try{return new Blob([/* @__PURE__ */ new Uint8Array(100)]).size===100}catch(_e){return!1}})(),we=j.BlobBuilder||j.WebKitBlobBuilder||j.MozBlobBuilder||j.MSBlobBuilder,je=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,Ee=(H||we)&&j.atob&&j.ArrayBuffer&&j.Uint8Array&&function(_e){var Ae=_e.match(je),Oe,Ve,Qe,dt,Be,Ct,Xe,Tt;if(!Ae)throw new Error(`invalid data URI`);for(Oe=Ae[2]?Ae[1]:`text/plain`+(Ae[3]||`;charset=US-ASCII`),Ve=!!Ae[4],Qe=_e.slice(Ae[0].length),Ve?dt=atob(Qe):dt=decodeURIComponent(Qe),Be=new ArrayBuffer(dt.length),Ct=new Uint8Array(Be),Xe=0;Xe<dt.length;Xe+=1)Ct[Xe]=dt.charCodeAt(Xe);return H?new Blob([ye?Ct:Be],{type:Oe}):(Tt=new we,Tt.append(Be),Tt.getBlob(Oe))};j.HTMLCanvasElement&&!q.toBlob&&(q.mozGetAsFile?q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){Oe&&q.toDataURL&&Ee?_e(Ee(Ve.toDataURL(Ae,Oe))):_e(Ve.mozGetAsFile(`blob`,Ae))})}:q.toDataURL&&Ee&&(q.msToBlob?q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){(Ae&&Ae!==`image/png`||Oe)&&q.toDataURL&&Ee?_e(Ee(Ve.toDataURL(Ae,Oe))):_e(Ve.msToBlob(Ae))})}:q.toBlob=function(_e,Ae,Oe){var Ve=this;setTimeout(function(){_e(Ee(Ve.toDataURL(Ae,Oe)))})})),X.exports?X.exports=Ee:j.dataURLtoBlob=Ee})(window)})(c);var m=c.exports,g=d(m),v=function(j){return typeof Blob>`u`?!1:j instanceof Blob||Object.prototype.toString.call(j)===`[object Blob]`},_=d(v),P={strict:!0,checkOrientation:!0,retainExif:!1,maxWidth:1/0,maxHeight:1/0,minWidth:0,minHeight:0,width:void 0,height:void 0,resize:`none`,quality:.8,mimeType:`auto`,convertTypes:[`image/png`],convertSize:5e6,beforeDraw:null,drew:null,success:null,error:null},E=typeof window<`u`&&typeof window.document<`u`?window:{},ne=function(j){return j>0&&j<1/0},G=Array.prototype.slice;function ce(X){return Array.from?Array.from(X):G.call(X)}var de=/^image\/.+$/;function S(X){return de.test(X)}function D(X){var j=S(X)?X.substr(6):``;return j===`jpeg`&&(j=`jpg`),`.`.concat(j)}var N=String.fromCharCode;function V(X,j,q){var H=``,ye;for(q+=j,ye=j;ye<q;ye+=1)H+=N(X.getUint8(ye));return H}function se(){try{var X=document.createElement(`canvas`);X.width=2,X.height=1;var j=X.getContext(`2d`);if(!j)return!1;var q=j.createImageData(2,1);q.data[0]=12,q.data[1]=23,q.data[2]=34,q.data[3]=255,q.data[4]=45,q.data[5]=56,q.data[6]=67,q.data[7]=255,j.putImageData(q,0,0);var H=j.getImageData(0,0,2,1),ye=[12,23,34,255,45,56,67,255];return H.data.every(function(we,je){return we===ye[je]})}catch(we){return!1}}var Se=E.btoa;function lt(X,j){for(var q=[],H=8192,ye=new Uint8Array(X);ye.length>0;)q.push(N.apply(null,ce(ye.subarray(0,H)))),ye=ye.subarray(H);return`data:`.concat(j,`;base64,`).concat(Se(q.join(``)))}function le(X){var j=new DataView(X),q;try{var H,ye,we;if(j.getUint8(0)===255&&j.getUint8(1)===216)for(var je=j.byteLength,Ee=2;Ee+1<je;){if(j.getUint8(Ee)===255&&j.getUint8(Ee+1)===225){ye=Ee;break}Ee+=1}if(ye){var _e=ye+4,Ae=ye+10;if(V(j,_e,4)===`Exif`){var Oe=j.getUint16(Ae);if(H=Oe===18761,(H||Oe===19789)&&j.getUint16(Ae+2,H)===42){var Ve=j.getUint32(Ae+4,H);Ve>=8&&(we=Ae+Ve)}}}if(we){var Qe=j.getUint16(we,H),dt,Be=0;for(;Be<Qe;Be+=1)if(dt=we+Be*12+2,j.getUint16(dt,H)===274){dt+=8,q=j.getUint16(dt,H),j.setUint16(dt,1,H);break}}}catch(Ct){q=1}return q}function Re(X){var j=0,q=1,H=1;switch(X){case 2:q=-1;break;case 3:j=-180;break;case 4:H=-1;break;case 5:j=90,H=-1;break;case 6:j=90;break;case 7:j=90,q=-1;break;case 8:j=-90}return{rotate:j,scaleX:q,scaleY:H}}var K=/\.\d*(?:0|9){12}\d*$/;function z(X){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return K.test(X)?Math.round(X*j)/j:X}function pe(X){var j=X.aspectRatio,q=X.height,H=X.width,ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`none`,we=ne(H),je=ne(q);if(we&&je){var Ee=q*j;(ye===`contain`||ye===`none`)&&Ee>H||ye===`cover`&&Ee<H?q=H/j:H=q*j}else we?q=H/j:je&&(H=q*j);return{width:H,height:q}}function L(X){for(var j=ce(new Uint8Array(X)),q=j.length,H=[],ye=0;ye+3<q;){var we=j[ye],je=j[ye+1];if(we===255&&je===218)break;if(we===255&&je===216)ye+=2;else{var Ee=j[ye+2]*256+j[ye+3],_e=ye+Ee+2,Ae=j.slice(ye,_e);H.push(Ae),ye=_e}}return H.reduce(function(Oe,Ve){return Ve[0]===255&&Ve[1]===225?Oe.concat(Ve):Oe},[])}function Le(X,j){var q=ce(new Uint8Array(X));if(q[2]!==255||q[3]!==224)return X;var H=q[4]*256+q[5],ye=[255,216].concat(j,q.slice(4+H));return new Uint8Array(ye)}var He=E.ArrayBuffer,Te=E.FileReader,ft=E.URL||E.webkitURL,Je=/\.\w+$/,st=E.Compressor;return(function(){function X(j){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,X),this.file=j,this.exif=[],this.image=new Image,this.options=a(a({},P),q),this.aborted=!1,this.result=null,this.init()}return e(X,[{key:`init`,value:function(){var q=this,H=this.file,ye=this.options;if(!_(H)){this.fail(/* @__PURE__ */ new Error(`The first argument must be a File or Blob object.`));return}var we=H.type;if(!S(we)){this.fail(/* @__PURE__ */ new Error(`The first argument must be an image File or Blob object.`));return}if(!ft||!Te){this.fail(/* @__PURE__ */ new Error(`The current browser does not support image compression.`));return}He||(ye.checkOrientation=!1,ye.retainExif=!1);var je=we===`image/jpeg`,Ee=je&&ye.checkOrientation,_e=je&&ye.retainExif;if(ft&&!Ee&&!_e)this.load({url:ft.createObjectURL(H)});else{var Ae=new Te;this.reader=Ae,Ae.onload=function(Oe){var Qe=Oe.target.result,dt={},Be=1;Ee&&(Be=le(Qe),Be>1&&o(dt,Re(Be))),_e&&(q.exif=L(Qe)),Ee||_e?!ft||Be>1?dt.url=lt(Qe,we):dt.url=ft.createObjectURL(H):dt.url=Qe,q.load(dt)},Ae.onabort=function(){q.fail(/* @__PURE__ */ new Error(`Aborted to read the image with FileReader.`))},Ae.onerror=function(){q.fail(/* @__PURE__ */ new Error(`Failed to read the image with FileReader.`))},Ae.onloadend=function(){q.reader=null},Ee||_e?Ae.readAsArrayBuffer(H):Ae.readAsDataURL(H)}}},{key:`load`,value:function(q){var H=this,ye=this.file,we=this.image;we.onload=function(){se()?H.draw(a(a({},q),{},{naturalWidth:we.naturalWidth,naturalHeight:we.naturalHeight})):H.done({naturalWidth:we.naturalWidth,naturalHeight:we.naturalHeight,result:null})},we.onabort=function(){H.fail(/* @__PURE__ */ new Error(`Aborted to load the image.`))},we.onerror=function(){H.fail(/* @__PURE__ */ new Error(`Failed to load the image.`))},E.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(E.navigator.userAgent)&&(we.crossOrigin=`anonymous`),we.alt=ye.name,we.src=q.url}},{key:`draw`,value:function(q){var H=this,ye=q.naturalWidth,we=q.naturalHeight,je=q.rotate,Ee=je===void 0?0:je,_e=q.scaleX,Ae=_e===void 0?1:_e,Oe=q.scaleY,Ve=Oe===void 0?1:Oe,Qe=this.file,dt=this.image,Be=this.options,Ct=document.createElement(`canvas`),Xe=Ct.getContext(`2d`),Tt=Math.abs(Ee)%180===90,vt=(Be.resize===`contain`||Be.resize===`cover`)&&ne(Be.width)&&ne(Be.height),wt=Math.max(Be.maxWidth,0)||1/0,W=Math.max(Be.maxHeight,0)||1/0,Ie=Math.max(Be.minWidth,0)||0,I=Math.max(Be.minHeight,0)||0,re=ye/we,ee=Be.width,ve=Be.height;if(Tt){var et=[W,wt];wt=et[0],W=et[1];var Ke=[I,Ie];Ie=Ke[0],I=Ke[1];var Ur=[ve,ee];ee=Ur[0],ve=Ur[1]}vt&&(re=ee/ve);var To=pe({aspectRatio:re,width:wt,height:W},`contain`);wt=To.width,W=To.height;var yn=pe({aspectRatio:re,width:Ie,height:I},`cover`);if(Ie=yn.width,I=yn.height,vt){var bs=pe({aspectRatio:re,width:ee,height:ve},Be.resize);ee=bs.width,ve=bs.height}else{var En=pe({aspectRatio:re,width:ee,height:ve}),ri=En.width;ee=ri===void 0?ye:ri;var vs=En.height;ve=vs===void 0?we:vs}ee=Math.floor(z(Math.min(Math.max(ee,Ie),wt))),ve=Math.floor(z(Math.min(Math.max(ve,I),W)));var _s=-ee/2,Pt=-ve/2,_t=ee,ad=ve,bn=[];if(vt){var xs=0,an=0,$r=ye,Et=we,Fi=pe({aspectRatio:re,width:ye,height:we},{contain:`cover`,cover:`contain`}[Be.resize]);$r=Fi.width,Et=Fi.height,xs=(ye-$r)/2,an=(we-Et)/2,bn.push(xs,an,$r,Et)}if(bn.push(_s,Pt,_t,ad),Tt){var Mn=[ve,ee];ee=Mn[0],ve=Mn[1]}Ct.width=ee,Ct.height=ve,S(Be.mimeType)||(Be.mimeType=Qe.type);var Cs=`transparent`;Qe.size>Be.convertSize&&Be.convertTypes.indexOf(Be.mimeType)>=0&&(Be.mimeType=`image/jpeg`);var Po=Be.mimeType===`image/jpeg`;if(Po&&(Cs=`#fff`),Xe.fillStyle=Cs,Xe.fillRect(0,0,ee,ve),Be.beforeDraw&&Be.beforeDraw.call(this,Xe,Ct),!this.aborted&&(Xe.save(),Xe.translate(ee/2,ve/2),Xe.rotate(Ee*Math.PI/180),Xe.scale(Ae,Ve),Xe.drawImage.apply(Xe,[dt].concat(bn)),Xe.restore(),Be.drew&&Be.drew.call(this,Xe,Ct),!this.aborted)){var Eo=function(oo){if(!H.aborted){var Hr=function(Yi){return H.done({naturalWidth:ye,naturalHeight:we,result:Yi})};if(oo&&Po&&Be.retainExif&&H.exif&&H.exif.length>0){var qr=function(Yi){return Hr(g(lt(Le(Yi,H.exif),Be.mimeType)))};if(oo.arrayBuffer)oo.arrayBuffer().then(qr).catch(function(){H.fail(/* @__PURE__ */ new Error(`Failed to read the compressed image with Blob.arrayBuffer().`))});else{var Kt=new Te;H.reader=Kt,Kt.onload=function(ci){var Yi=ci.target;qr(Yi.result)},Kt.onabort=function(){H.fail(/* @__PURE__ */ new Error(`Aborted to read the compressed image with FileReader.`))},Kt.onerror=function(){H.fail(/* @__PURE__ */ new Error(`Failed to read the compressed image with FileReader.`))},Kt.onloadend=function(){H.reader=null},Kt.readAsArrayBuffer(oo)}}else Hr(oo)}};Ct.toBlob?Ct.toBlob(Eo,Be.mimeType,Be.quality):Eo(g(Ct.toDataURL(Be.mimeType,Be.quality)))}}},{key:`done`,value:function(q){var H=q.naturalWidth,ye=q.naturalHeight,we=q.result,je=this.file,Ee=this.image,_e=this.options;if(ft&&Ee.src.indexOf(`blob:`)===0&&ft.revokeObjectURL(Ee.src),we)if(_e.strict&&!_e.retainExif&&we.size>je.size&&_e.mimeType===je.type&&!(_e.width>H||_e.height>ye||_e.minWidth>H||_e.minHeight>ye||_e.maxWidth<H||_e.maxHeight<ye))we=je;else{var Ae=je.name;Ae&&we.type!==je.type&&(Ae=Ae.replace(Je,D(we.type)));try{we=new File([we],Ae,{type:we.type})}catch(Ve){var Oe=/* @__PURE__ */ new Date;we.name=Ae,we.lastModified=Oe.getTime(),we.lastModifiedDate=Oe}}else we=je;this.result=we,_e.success&&_e.success.call(this,we)}},{key:`fail`,value:function(q){var H=this.options;if(H.error)H.error.call(this,q);else throw q}},{key:`abort`,value:function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(/* @__PURE__ */ new Error(`The compression process has been aborted.`)):(this.image.onload=null,this.image.onabort()))}}],[{key:`create`,value:function(q,H){return new X(q,H)}},{key:`setDefaults`,value:function(q){o(P,q)}},{key:`noConflict`,value:function(){return window.Compressor=st,X}}])})()}))});var Cg=J((mc,fc)=>{(function(i,t){typeof mc==`object`&&typeof fc<`u`?fc.exports=t():typeof define==`function`&&define.amd?define(t):(i=typeof globalThis<`u`?globalThis:i||self,i.Cropper=t())})(mc,(function(){"use strict";function i(T,u){var f=Object.keys(T);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(T);u&&(h=h.filter(function(B){return Object.getOwnPropertyDescriptor(T,B).enumerable})),f.push.apply(f,h)}return f}function t(T){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?arguments[u]:{};u%2?i(Object(f),!0).forEach(function(h){l(T,h,f[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(f)):i(Object(f)).forEach(function(h){Object.defineProperty(T,h,Object.getOwnPropertyDescriptor(f,h))})}return T}function e(T,u){if(typeof T!=`object`||!T)return T;var f=T[Symbol.toPrimitive];if(f!==void 0){var h=f.call(T,u||`default`);if(typeof h!=`object`)return h;throw new TypeError(`@@toPrimitive must return a primitive value.`)}return(u===`string`?String:Number)(T)}function n(T){var u=e(T,`string`);return typeof u==`symbol`?u:u+``}function o(T){"@babel/helpers - typeof";return o=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(u){return typeof u}:function(u){return u&&typeof Symbol==`function`&&u.constructor===Symbol&&u!==Symbol.prototype?`symbol`:typeof u},o(T)}function r(T,u){if(!(T instanceof u))throw new TypeError(`Cannot call a class as a function`)}function a(T,u){for(var f=0;f<u.length;f++){var h=u[f];h.enumerable=h.enumerable||!1,h.configurable=!0,`value`in h&&(h.writable=!0),Object.defineProperty(T,n(h.key),h)}}function s(T,u,f){return u&&a(T.prototype,u),f&&a(T,f),Object.defineProperty(T,"prototype",{writable:!1}),T}function l(T,u,f){return u=n(u),u in T?Object.defineProperty(T,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):T[u]=f,T}function d(T){return c(T)||m(T)||g(T)||_()}function c(T){if(Array.isArray(T))return v(T)}function m(T){if(typeof Symbol<`u`&&T[Symbol.iterator]!=null||T[`@@iterator`]!=null)return Array.from(T)}function g(T,u){if(T){if(typeof T==`string`)return v(T,u);var f=Object.prototype.toString.call(T).slice(8,-1);if(f===`Object`&&T.constructor&&(f=T.constructor.name),f===`Map`||f===`Set`)return Array.from(T);if(f===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return v(T,u)}}function v(T,u){(u==null||u>T.length)&&(u=T.length);for(var f=0,h=new Array(u);f<u;f++)h[f]=T[f];return h}function _(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var P=typeof window<`u`&&typeof window.document<`u`,O=P?window:{},E=P&&O.document.documentElement?`ontouchstart`in O.document.documentElement:!1,ne=P?`PointerEvent`in O:!1,G=`cropper`,ce=`all`,de=`crop`,S=`move`,D=`zoom`,N=`e`,V=`w`,se=`s`,Se=`n`,lt=`ne`,le=`nw`,Re=`se`,K=`sw`,z=``.concat(G,`-crop`),pe=``.concat(G,`-disabled`),L=``.concat(G,`-hidden`),Le=``.concat(G,`-hide`),He=``.concat(G,`-invisible`),Te=``.concat(G,`-modal`),ft=``.concat(G,`-move`),Je=``.concat(G,`Action`),st=``.concat(G,`Preview`),Nt=`crop`,X=`move`,j=`none`,q=`crop`,H=`cropend`,ye=`cropmove`,we=`cropstart`,je=`dblclick`,Ee=E?`touchstart`:`mousedown`,_e=E?`touchmove`:`mousemove`,Ae=E?`touchend touchcancel`:`mouseup`,Oe=ne?`pointerdown`:Ee,Ve=ne?`pointermove`:_e,Qe=ne?`pointerup pointercancel`:Ae,dt=`ready`,Be=`resize`,Ct=`wheel`,Xe=`zoom`,Tt=`image/jpeg`,vt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,wt=/^data:/,W=/^data:image\/jpeg;base64,/,Ie=/^img|canvas$/i,I=200,re=100,ee={viewMode:0,dragMode:Nt,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:I,minContainerHeight:re,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ve=`<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>`,et=Number.isNaN||O.isNaN;function Ke(T){return typeof T==`number`&&!et(T)}var Ur=function(u){return u>0&&u<1/0};function To(T){return typeof T>`u`}function yn(T){return o(T)===`object`&&T!==null}var bs=Object.prototype.hasOwnProperty;function En(T){if(!yn(T))return!1;try{var u=T.constructor,f=u.prototype;return u&&f&&bs.call(f,`isPrototypeOf`)}catch(h){return!1}}function ri(T){return typeof T==`function`}var vs=Array.prototype.slice;function _s(T){return Array.from?Array.from(T):vs.call(T)}function Pt(T,u){return T&&ri(u)&&(Array.isArray(T)||Ke(T.length)?_s(T).forEach(function(f,h){u.call(T,f,h,T)}):yn(T)&&Object.keys(T).forEach(function(f){u.call(T,T[f],f,T)})),T}var _t=Object.assign||function(u){for(var f=arguments.length,h=new Array(f>1?f-1:0),B=1;B<f;B++)h[B-1]=arguments[B];return yn(u)&&h.length>0&&h.forEach(function(M){yn(M)&&Object.keys(M).forEach(function(F){u[F]=M[F]})}),u},ad=/\.\d*(?:0|9){12}\d*$/;function bn(T){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ad.test(T)?Math.round(T*u)/u:T}var xs=/^width|height|left|top|marginLeft|marginTop$/;function an(T,u){var f=T.style;Pt(u,function(h,B){xs.test(B)&&Ke(h)&&(h=``.concat(h,`px`)),f[B]=h})}function $r(T,u){return T.classList?T.classList.contains(u):T.className.indexOf(u)>-1}function Et(T,u){if(u){if(Ke(T.length)){Pt(T,function(h){Et(h,u)});return}if(T.classList){T.classList.add(u);return}var f=T.className.trim();f?f.indexOf(u)<0&&(T.className=``.concat(f,` `).concat(u)):T.className=u}}function Fi(T,u){if(u){if(Ke(T.length)){Pt(T,function(f){Fi(f,u)});return}if(T.classList){T.classList.remove(u);return}T.className.indexOf(u)>=0&&(T.className=T.className.replace(u,``))}}function Mn(T,u,f){if(u){if(Ke(T.length)){Pt(T,function(h){Mn(h,u,f)});return}f?Et(T,u):Fi(T,u)}}var Cs=/([a-z\d])([A-Z])/g;function Po(T){return T.replace(Cs,`$1-$2`).toLowerCase()}function Eo(T,u){return yn(T[u])?T[u]:T.dataset?T.dataset[u]:T.getAttribute(`data-`.concat(Po(u)))}function Mo(T,u,f){yn(f)?T[u]=f:T.dataset?T.dataset[u]=f:T.setAttribute(`data-`.concat(Po(u)),f)}function oo(T,u){if(yn(T[u]))try{delete T[u]}catch(f){T[u]=void 0}else if(T.dataset)try{delete T.dataset[u]}catch(f){T.dataset[u]=void 0}else T.removeAttribute(`data-`.concat(Po(u)))}var Hr=/\s\s*/,qr=(function(){var T=!1;if(P){var u=!1,f=function(){},h=Object.defineProperty({},"once",{get:function(){return T=!0,u},set:function(M){u=M}});O.addEventListener(`test`,f,h),O.removeEventListener(`test`,f,h)}return T})();function Kt(T,u,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},B=f;u.trim().split(Hr).forEach(function(M){if(!qr){var F=T.listeners;F&&F[M]&&F[M][f]&&(B=F[M][f],delete F[M][f],Object.keys(F[M]).length===0&&delete F[M],Object.keys(F).length===0&&delete T.listeners)}T.removeEventListener(M,B,h)})}function ci(T,u,f){var h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},B=f;u.trim().split(Hr).forEach(function(M){if(h.once&&!qr){var F=T.listeners,Y=F===void 0?{}:F;B=function(){delete Y[M][f],T.removeEventListener(M,B,h);for(var ae=arguments.length,Z=new Array(ae),Q=0;Q<ae;Q++)Z[Q]=arguments[Q];f.apply(T,Z)},Y[M]||(Y[M]={}),Y[M][f]&&T.removeEventListener(M,Y[M][f],h),Y[M][f]=B,T.listeners=Y}T.addEventListener(M,B,h)})}function Yi(T,u,f){var h;return ri(Event)&&ri(CustomEvent)?h=new CustomEvent(u,{detail:f,bubbles:!0,cancelable:!0}):(h=document.createEvent(`CustomEvent`),h.initCustomEvent(u,!0,!0,f)),T.dispatchEvent(h)}function Fu(T){var u=T.getBoundingClientRect();return{left:u.left+(window.pageXOffset-document.documentElement.clientLeft),top:u.top+(window.pageYOffset-document.documentElement.clientTop)}}var sd=O.location,Wy=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Bu(T){var u=T.match(Wy);return u!==null&&(u[1]!==sd.protocol||u[2]!==sd.hostname||u[3]!==sd.port)}function Nu(T){var u=`timestamp=`.concat((/* @__PURE__ */ new Date()).getTime());return T+(T.indexOf(`?`)===-1?`?`:`&`)+u}function Wr(T){var u=T.rotate,f=T.scaleX,h=T.scaleY,B=T.translateX,M=T.translateY,F=[];Ke(B)&&B!==0&&F.push(`translateX(`.concat(B,`px)`)),Ke(M)&&M!==0&&F.push(`translateY(`.concat(M,`px)`)),Ke(u)&&u!==0&&F.push(`rotate(`.concat(u,`deg)`)),Ke(f)&&f!==1&&F.push(`scaleX(`.concat(f,`)`)),Ke(h)&&h!==1&&F.push(`scaleY(`.concat(h,`)`));var Y=F.length?F.join(` `):`none`;return{WebkitTransform:Y,msTransform:Y,transform:Y}}function Gy(T){var u=t({},T),f=0;return Pt(T,function(h,B){delete u[B],Pt(u,function(M){var F=Math.abs(h.startX-M.startX),Y=Math.abs(h.startY-M.startY),he=Math.abs(h.endX-M.endX),ae=Math.abs(h.endY-M.endY),Z=Math.sqrt(F*F+Y*Y),ue=(Math.sqrt(he*he+ae*ae)-Z)/Z;Math.abs(ue)>Math.abs(f)&&(f=ue)})}),f}function ws(T,u){var f=T.pageX,h=T.pageY,B={endX:f,endY:h};return u?B:t({startX:f,startY:h},B)}function Ky(T){var u=0,f=0,h=0;return Pt(T,function(B){var M=B.startX,F=B.startY;u+=M,f+=F,h+=1}),u/=h,f/=h,{pageX:u,pageY:f}}function Ln(T){var u=T.aspectRatio,f=T.height,h=T.width,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`contain`,M=Ur(h),F=Ur(f);if(M&&F){var Y=f*u;B===`contain`&&Y>h||B===`cover`&&Y<h?f=h/u:h=f*u}else M?f=h/u:F&&(h=f*u);return{width:h,height:f}}function Yy(T){var u=T.width,f=T.height,h=T.degree;if(h=Math.abs(h)%180,h===90)return{width:f,height:u};var B=h%90*Math.PI/180,M=Math.sin(B),F=Math.cos(B),Y=u*F+f*M,he=u*M+f*F;return h>90?{width:he,height:Y}:{width:Y,height:he}}function Xy(T,u,f,h){var B=u.aspectRatio,M=u.naturalWidth,F=u.naturalHeight,Y=u.rotate,he=Y===void 0?0:Y,ae=u.scaleX,Z=ae===void 0?1:ae,Q=u.scaleY,ue=Q===void 0?1:Q,ot=f.aspectRatio,tt=f.naturalWidth,St=f.naturalHeight,pt=h.fillColor,Ht=pt===void 0?`transparent`:pt,Yt=h.imageSmoothingEnabled,Rt=Yt===void 0?!0:Yt,kn=h.imageSmoothingQuality,Bi=kn===void 0?`low`:kn,be=h.maxWidth,ct=be===void 0?1/0:be,qt=h.maxHeight,Xi=qt===void 0?1/0:qt,On=h.minWidth,ro=On===void 0?0:On,ao=h.minHeight,zn=ao===void 0?0:ao,vn=document.createElement(`canvas`),Ii=vn.getContext(`2d`),so=Ln({aspectRatio:ot,width:ct,height:Xi}),Ss=Ln({aspectRatio:ot,width:ro,height:zn},`cover`),ld=Math.min(so.width,Math.max(Ss.width,tt)),dd=Math.min(so.height,Math.max(Ss.height,St)),zu=Ln({aspectRatio:B,width:ct,height:Xi}),ju=Ln({aspectRatio:B,width:ro,height:zn},`cover`),Vu=Math.min(zu.width,Math.max(ju.width,M)),Uu=Math.min(zu.height,Math.max(ju.height,F)),pb=[-Vu/2,-Uu/2,Vu,Uu];return vn.width=bn(ld),vn.height=bn(dd),Ii.fillStyle=Ht,Ii.fillRect(0,0,ld,dd),Ii.save(),Ii.translate(ld/2,dd/2),Ii.rotate(he*Math.PI/180),Ii.scale(Z,ue),Ii.imageSmoothingEnabled=Rt,Ii.imageSmoothingQuality=Bi,Ii.drawImage.apply(Ii,[T].concat(d(pb.map(function(cb){return Math.floor(bn(cb))})))),Ii.restore(),vn}var Ru=String.fromCharCode;function Zy(T,u,f){var h=``;f+=u;for(var B=u;B<f;B+=1)h+=Ru(T.getUint8(B));return h}var Qy=/^data:.*,/;function Jy(T){var u=T.replace(Qy,``),f=atob(u),h=new ArrayBuffer(f.length),B=new Uint8Array(h);return Pt(B,function(M,F){B[F]=f.charCodeAt(F)}),h}function eb(T,u){for(var f=[],h=8192,B=new Uint8Array(T);B.length>0;)f.push(Ru.apply(null,_s(B.subarray(0,h)))),B=B.subarray(h);return`data:`.concat(u,`;base64,`).concat(btoa(f.join(``)))}function tb(T){var u=new DataView(T),f;try{var h,B,M;if(u.getUint8(0)===255&&u.getUint8(1)===216)for(var F=u.byteLength,Y=2;Y+1<F;){if(u.getUint8(Y)===255&&u.getUint8(Y+1)===225){B=Y;break}Y+=1}if(B){var he=B+4,ae=B+10;if(Zy(u,he,4)===`Exif`){var Z=u.getUint16(ae);if(h=Z===18761,(h||Z===19789)&&u.getUint16(ae+2,h)===42){var Q=u.getUint32(ae+4,h);Q>=8&&(M=ae+Q)}}}if(M){var ue=u.getUint16(M,h),ot,tt=0;for(;tt<ue;tt+=1)if(ot=M+tt*12+2,u.getUint16(ot,h)===274){ot+=8,f=u.getUint16(ot,h),u.setUint16(ot,1,h);break}}}catch(St){f=1}return f}function ib(T){var u=0,f=1,h=1;switch(T){case 2:f=-1;break;case 3:u=-180;break;case 4:h=-1;break;case 5:u=90,h=-1;break;case 6:u=90;break;case 7:u=90,f=-1;break;case 8:u=-90}return{rotate:u,scaleX:f,scaleY:h}}var nb={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var u=this.element,f=this.options,h=this.container,B=this.cropper,M=Number(f.minContainerWidth),F=Number(f.minContainerHeight);Et(B,L),Fi(u,L);var Y={width:Math.max(h.offsetWidth,M>=0?M:I),height:Math.max(h.offsetHeight,F>=0?F:re)};this.containerData=Y,an(B,{width:Y.width,height:Y.height}),Et(u,L),Fi(B,L)},initCanvas:function(){var u=this.containerData,f=this.imageData,h=this.options.viewMode,B=Math.abs(f.rotate)%180===90,M=B?f.naturalHeight:f.naturalWidth,F=B?f.naturalWidth:f.naturalHeight,Y=M/F,he=u.width,ae=u.height;u.height*Y>u.width?h===3?he=u.height*Y:ae=u.width/Y:h===3?ae=u.width/Y:he=u.height*Y;var Z={aspectRatio:Y,naturalWidth:M,naturalHeight:F,width:he,height:ae};this.canvasData=Z,this.limited=h===1||h===2,this.limitCanvas(!0,!0),Z.width=Math.min(Math.max(Z.width,Z.minWidth),Z.maxWidth),Z.height=Math.min(Math.max(Z.height,Z.minHeight),Z.maxHeight),Z.left=(u.width-Z.width)/2,Z.top=(u.height-Z.height)/2,Z.oldLeft=Z.left,Z.oldTop=Z.top,this.initialCanvasData=_t({},Z)},limitCanvas:function(u,f){var h=this.options,B=this.containerData,M=this.canvasData,F=this.cropBoxData,Y=h.viewMode,he=M.aspectRatio,ae=this.cropped&&F;if(u){var Z=Number(h.minCanvasWidth)||0,Q=Number(h.minCanvasHeight)||0;Y>1?(Z=Math.max(Z,B.width),Q=Math.max(Q,B.height),Y===3&&(Q*he>Z?Z=Q*he:Q=Z/he)):Y>0&&(Z?Z=Math.max(Z,ae?F.width:0):Q?Q=Math.max(Q,ae?F.height:0):ae&&(Z=F.width,Q=F.height,Q*he>Z?Z=Q*he:Q=Z/he));var ue=Ln({aspectRatio:he,width:Z,height:Q});Z=ue.width,Q=ue.height,M.minWidth=Z,M.minHeight=Q,M.maxWidth=1/0,M.maxHeight=1/0}if(f)if(Y>(ae?0:1)){var ot=B.width-M.width,tt=B.height-M.height;M.minLeft=Math.min(0,ot),M.minTop=Math.min(0,tt),M.maxLeft=Math.max(0,ot),M.maxTop=Math.max(0,tt),ae&&this.limited&&(M.minLeft=Math.min(F.left,F.left+(F.width-M.width)),M.minTop=Math.min(F.top,F.top+(F.height-M.height)),M.maxLeft=F.left,M.maxTop=F.top,Y===2&&(M.width>=B.width&&(M.minLeft=Math.min(0,ot),M.maxLeft=Math.max(0,ot)),M.height>=B.height&&(M.minTop=Math.min(0,tt),M.maxTop=Math.max(0,tt))))}else M.minLeft=-M.width,M.minTop=-M.height,M.maxLeft=B.width,M.maxTop=B.height},renderCanvas:function(u,f){var h=this.canvasData,B=this.imageData;if(f){var M=Yy({width:B.naturalWidth*Math.abs(B.scaleX||1),height:B.naturalHeight*Math.abs(B.scaleY||1),degree:B.rotate||0}),F=M.width,Y=M.height,he=h.width*(F/h.naturalWidth),ae=h.height*(Y/h.naturalHeight);h.left-=(he-h.width)/2,h.top-=(ae-h.height)/2,h.width=he,h.height=ae,h.aspectRatio=F/Y,h.naturalWidth=F,h.naturalHeight=Y,this.limitCanvas(!0,!1)}(h.width>h.maxWidth||h.width<h.minWidth)&&(h.left=h.oldLeft),(h.height>h.maxHeight||h.height<h.minHeight)&&(h.top=h.oldTop),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),this.limitCanvas(!1,!0),h.left=Math.min(Math.max(h.left,h.minLeft),h.maxLeft),h.top=Math.min(Math.max(h.top,h.minTop),h.maxTop),h.oldLeft=h.left,h.oldTop=h.top,an(this.canvas,_t({width:h.width,height:h.height},Wr({translateX:h.left,translateY:h.top}))),this.renderImage(u),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(u){var f=this.canvasData,h=this.imageData,B=h.naturalWidth*(f.width/f.naturalWidth),M=h.naturalHeight*(f.height/f.naturalHeight);_t(h,{width:B,height:M,left:(f.width-B)/2,top:(f.height-M)/2}),an(this.image,_t({width:h.width,height:h.height},Wr(_t({translateX:h.left,translateY:h.top},h)))),u&&this.output()},initCropBox:function(){var u=this.options,f=this.canvasData,h=u.aspectRatio||u.initialAspectRatio,B=Number(u.autoCropArea)||.8,M={width:f.width,height:f.height};h&&(f.height*h>f.width?M.height=M.width/h:M.width=M.height*h),this.cropBoxData=M,this.limitCropBox(!0,!0),M.width=Math.min(Math.max(M.width,M.minWidth),M.maxWidth),M.height=Math.min(Math.max(M.height,M.minHeight),M.maxHeight),M.width=Math.max(M.minWidth,M.width*B),M.height=Math.max(M.minHeight,M.height*B),M.left=f.left+(f.width-M.width)/2,M.top=f.top+(f.height-M.height)/2,M.oldLeft=M.left,M.oldTop=M.top,this.initialCropBoxData=_t({},M)},limitCropBox:function(u,f){var h=this.options,B=this.containerData,M=this.canvasData,F=this.cropBoxData,Y=this.limited,he=h.aspectRatio;if(u){var ae=Number(h.minCropBoxWidth)||0,Z=Number(h.minCropBoxHeight)||0,Q=Y?Math.min(B.width,M.width,M.width+M.left,B.width-M.left):B.width,ue=Y?Math.min(B.height,M.height,M.height+M.top,B.height-M.top):B.height;ae=Math.min(ae,B.width),Z=Math.min(Z,B.height),he&&(ae&&Z?Z*he>ae?Z=ae/he:ae=Z*he:ae?Z=ae/he:Z&&(ae=Z*he),ue*he>Q?ue=Q/he:Q=ue*he),F.minWidth=Math.min(ae,Q),F.minHeight=Math.min(Z,ue),F.maxWidth=Q,F.maxHeight=ue}f&&(Y?(F.minLeft=Math.max(0,M.left),F.minTop=Math.max(0,M.top),F.maxLeft=Math.min(B.width,M.left+M.width)-F.width,F.maxTop=Math.min(B.height,M.top+M.height)-F.height):(F.minLeft=0,F.minTop=0,F.maxLeft=B.width-F.width,F.maxTop=B.height-F.height))},renderCropBox:function(){var u=this.options,f=this.containerData,h=this.cropBoxData;(h.width>h.maxWidth||h.width<h.minWidth)&&(h.left=h.oldLeft),(h.height>h.maxHeight||h.height<h.minHeight)&&(h.top=h.oldTop),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),this.limitCropBox(!1,!0),h.left=Math.min(Math.max(h.left,h.minLeft),h.maxLeft),h.top=Math.min(Math.max(h.top,h.minTop),h.maxTop),h.oldLeft=h.left,h.oldTop=h.top,u.movable&&u.cropBoxMovable&&Mo(this.face,Je,h.width>=f.width&&h.height>=f.height?S:ce),an(this.cropBox,_t({width:h.width,height:h.height},Wr({translateX:h.left,translateY:h.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Yi(this.element,q,this.getData())}},ob={initPreview:function(){var u=this.element,f=this.crossOrigin,h=this.options.preview,B=f?this.crossOriginUrl:this.url,M=u.alt||`The image to preview`,F=document.createElement(`img`);if(f&&(F.crossOrigin=f),F.src=B,F.alt=M,this.viewBox.appendChild(F),this.viewBoxImage=F,!!h){var Y=h;typeof h==`string`?Y=u.ownerDocument.querySelectorAll(h):h.querySelector&&(Y=[h]),this.previews=Y,Pt(Y,function(he){var ae=document.createElement(`img`);Mo(he,st,{width:he.offsetWidth,height:he.offsetHeight,html:he.innerHTML}),f&&(ae.crossOrigin=f),ae.src=B,ae.alt=M,ae.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;"`,he.innerHTML=``,he.appendChild(ae)})}},resetPreview:function(){Pt(this.previews,function(u){var f=Eo(u,st);an(u,{width:f.width,height:f.height}),u.innerHTML=f.html,oo(u,st)})},preview:function(){var u=this.imageData,f=this.canvasData,h=this.cropBoxData,B=h.width,M=h.height,F=u.width,Y=u.height,he=h.left-f.left-u.left,ae=h.top-f.top-u.top;!this.cropped||this.disabled||(an(this.viewBoxImage,_t({width:F,height:Y},Wr(_t({translateX:-he,translateY:-ae},u)))),Pt(this.previews,function(Z){var Q=Eo(Z,st),ue=Q.width,ot=Q.height,tt=ue,St=ot,pt=1;B&&(pt=ue/B,St=M*pt),M&&St>ot&&(pt=ot/M,tt=B*pt,St=ot),an(Z,{width:tt,height:St}),an(Z.getElementsByTagName(`img`)[0],_t({width:F*pt,height:Y*pt},Wr(_t({translateX:-he*pt,translateY:-ae*pt},u))))}))}},rb={bind:function(){var u=this.element,f=this.options,h=this.cropper;ri(f.cropstart)&&ci(u,we,f.cropstart),ri(f.cropmove)&&ci(u,ye,f.cropmove),ri(f.cropend)&&ci(u,H,f.cropend),ri(f.crop)&&ci(u,q,f.crop),ri(f.zoom)&&ci(u,Xe,f.zoom),ci(h,Oe,this.onCropStart=this.cropStart.bind(this)),f.zoomable&&f.zoomOnWheel&&ci(h,Ct,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),f.toggleDragModeOnDblclick&&ci(h,je,this.onDblclick=this.dblclick.bind(this)),ci(u.ownerDocument,Ve,this.onCropMove=this.cropMove.bind(this)),ci(u.ownerDocument,Qe,this.onCropEnd=this.cropEnd.bind(this)),f.responsive&&ci(window,Be,this.onResize=this.resize.bind(this))},unbind:function(){var u=this.element,f=this.options,h=this.cropper;ri(f.cropstart)&&Kt(u,we,f.cropstart),ri(f.cropmove)&&Kt(u,ye,f.cropmove),ri(f.cropend)&&Kt(u,H,f.cropend),ri(f.crop)&&Kt(u,q,f.crop),ri(f.zoom)&&Kt(u,Xe,f.zoom),Kt(h,Oe,this.onCropStart),f.zoomable&&f.zoomOnWheel&&Kt(h,Ct,this.onWheel,{passive:!1,capture:!0}),f.toggleDragModeOnDblclick&&Kt(h,je,this.onDblclick),Kt(u.ownerDocument,Ve,this.onCropMove),Kt(u.ownerDocument,Qe,this.onCropEnd),f.responsive&&Kt(window,Be,this.onResize)}},ab={resize:function(){if(!this.disabled){var u=this.options,f=this.container,h=this.containerData,B=f.offsetWidth/h.width,M=f.offsetHeight/h.height,F=Math.abs(B-1)>Math.abs(M-1)?B:M;if(F!==1){var Y,he;u.restore&&(Y=this.getCanvasData(),he=this.getCropBoxData()),this.render(),u.restore&&(this.setCanvasData(Pt(Y,function(ae,Z){Y[Z]=ae*F})),this.setCropBoxData(Pt(he,function(ae,Z){he[Z]=ae*F})))}}},dblclick:function(){this.disabled||this.options.dragMode===j||this.setDragMode($r(this.dragBox,z)?X:Nt)},wheel:function(u){var f=this,h=Number(this.options.wheelZoomRatio)||.1,B=1;this.disabled||(u.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){f.wheeling=!1},50),u.deltaY?B=u.deltaY>0?1:-1:u.wheelDelta?B=-u.wheelDelta/120:u.detail&&(B=u.detail>0?1:-1),this.zoom(-B*h,u)))},cropStart:function(u){var f=u.buttons,h=u.button;if(!(this.disabled||(u.type===`mousedown`||u.type===`pointerdown`&&u.pointerType===`mouse`)&&(Ke(f)&&f!==1||Ke(h)&&h!==0||u.ctrlKey))){var B=this.options,M=this.pointers,F;u.changedTouches?Pt(u.changedTouches,function(Y){M[Y.identifier]=ws(Y)}):M[u.pointerId||0]=ws(u),Object.keys(M).length>1&&B.zoomable&&B.zoomOnTouch?F=D:F=Eo(u.target,Je),vt.test(F)&&Yi(this.element,we,{originalEvent:u,action:F})!==!1&&(u.preventDefault(),this.action=F,this.cropping=!1,F===de&&(this.cropping=!0,Et(this.dragBox,Te)))}},cropMove:function(u){var f=this.action;if(!(this.disabled||!f)){var h=this.pointers;u.preventDefault(),Yi(this.element,ye,{originalEvent:u,action:f})!==!1&&(u.changedTouches?Pt(u.changedTouches,function(B){_t(h[B.identifier]||{},ws(B,!0))}):_t(h[u.pointerId||0]||{},ws(u,!0)),this.change(u))}},cropEnd:function(u){if(!this.disabled){var f=this.action,h=this.pointers;u.changedTouches?Pt(u.changedTouches,function(B){delete h[B.identifier]}):delete h[u.pointerId||0],f&&(u.preventDefault(),Object.keys(h).length||(this.action=``),this.cropping&&(this.cropping=!1,Mn(this.dragBox,Te,this.cropped&&this.options.modal)),Yi(this.element,H,{originalEvent:u,action:f}))}}},sb={change:function(u){var f=this.options,h=this.canvasData,B=this.containerData,M=this.cropBoxData,F=this.pointers,Y=this.action,he=f.aspectRatio,ae=M.left,Z=M.top,Q=M.width,ue=M.height,ot=ae+Q,tt=Z+ue,St=0,pt=0,Ht=B.width,Yt=B.height,Rt=!0,kn;!he&&u.shiftKey&&(he=Q&&ue?Q/ue:1),this.limited&&(St=M.minLeft,pt=M.minTop,Ht=St+Math.min(B.width,h.width,h.left+h.width),Yt=pt+Math.min(B.height,h.height,h.top+h.height));var Bi=F[Object.keys(F)[0]],be={x:Bi.endX-Bi.startX,y:Bi.endY-Bi.startY},ct=function(Xi){switch(Xi){case N:ot+be.x>Ht&&(be.x=Ht-ot);break;case V:ae+be.x<St&&(be.x=St-ae);break;case Se:Z+be.y<pt&&(be.y=pt-Z);break;case se:tt+be.y>Yt&&(be.y=Yt-tt)}};switch(Y){case ce:ae+=be.x,Z+=be.y;break;case N:if(be.x>=0&&(ot>=Ht||he&&(Z<=pt||tt>=Yt))){Rt=!1;break}ct(N),Q+=be.x,Q<0&&(Y=V,Q=-Q,ae-=Q),he&&(ue=Q/he,Z+=(M.height-ue)/2);break;case Se:if(be.y<=0&&(Z<=pt||he&&(ae<=St||ot>=Ht))){Rt=!1;break}ct(Se),ue-=be.y,Z+=be.y,ue<0&&(Y=se,ue=-ue,Z-=ue),he&&(Q=ue*he,ae+=(M.width-Q)/2);break;case V:if(be.x<=0&&(ae<=St||he&&(Z<=pt||tt>=Yt))){Rt=!1;break}ct(V),Q-=be.x,ae+=be.x,Q<0&&(Y=N,Q=-Q,ae-=Q),he&&(ue=Q/he,Z+=(M.height-ue)/2);break;case se:if(be.y>=0&&(tt>=Yt||he&&(ae<=St||ot>=Ht))){Rt=!1;break}ct(se),ue+=be.y,ue<0&&(Y=Se,ue=-ue,Z-=ue),he&&(Q=ue*he,ae+=(M.width-Q)/2);break;case lt:if(he){if(be.y<=0&&(Z<=pt||ot>=Ht)){Rt=!1;break}ct(Se),ue-=be.y,Z+=be.y,Q=ue*he}else ct(Se),ct(N),be.x>=0?ot<Ht?Q+=be.x:be.y<=0&&Z<=pt&&(Rt=!1):Q+=be.x,be.y<=0?Z>pt&&(ue-=be.y,Z+=be.y):(ue-=be.y,Z+=be.y);Q<0&&ue<0?(Y=K,ue=-ue,Q=-Q,Z-=ue,ae-=Q):Q<0?(Y=le,Q=-Q,ae-=Q):ue<0&&(Y=Re,ue=-ue,Z-=ue);break;case le:if(he){if(be.y<=0&&(Z<=pt||ae<=St)){Rt=!1;break}ct(Se),ue-=be.y,Z+=be.y,Q=ue*he,ae+=M.width-Q}else ct(Se),ct(V),be.x<=0?ae>St?(Q-=be.x,ae+=be.x):be.y<=0&&Z<=pt&&(Rt=!1):(Q-=be.x,ae+=be.x),be.y<=0?Z>pt&&(ue-=be.y,Z+=be.y):(ue-=be.y,Z+=be.y);Q<0&&ue<0?(Y=Re,ue=-ue,Q=-Q,Z-=ue,ae-=Q):Q<0?(Y=lt,Q=-Q,ae-=Q):ue<0&&(Y=K,ue=-ue,Z-=ue);break;case K:if(he){if(be.x<=0&&(ae<=St||tt>=Yt)){Rt=!1;break}ct(V),Q-=be.x,ae+=be.x,ue=Q/he}else ct(se),ct(V),be.x<=0?ae>St?(Q-=be.x,ae+=be.x):be.y>=0&&tt>=Yt&&(Rt=!1):(Q-=be.x,ae+=be.x),be.y>=0?tt<Yt&&(ue+=be.y):ue+=be.y;Q<0&&ue<0?(Y=lt,ue=-ue,Q=-Q,Z-=ue,ae-=Q):Q<0?(Y=Re,Q=-Q,ae-=Q):ue<0&&(Y=le,ue=-ue,Z-=ue);break;case Re:if(he){if(be.x>=0&&(ot>=Ht||tt>=Yt)){Rt=!1;break}ct(N),Q+=be.x,ue=Q/he}else ct(se),ct(N),be.x>=0?ot<Ht?Q+=be.x:be.y>=0&&tt>=Yt&&(Rt=!1):Q+=be.x,be.y>=0?tt<Yt&&(ue+=be.y):ue+=be.y;Q<0&&ue<0?(Y=le,ue=-ue,Q=-Q,Z-=ue,ae-=Q):Q<0?(Y=K,Q=-Q,ae-=Q):ue<0&&(Y=lt,ue=-ue,Z-=ue);break;case S:this.move(be.x,be.y),Rt=!1;break;case D:this.zoom(Gy(F),u),Rt=!1;break;case de:if(!be.x||!be.y){Rt=!1;break}kn=Fu(this.cropper),ae=Bi.startX-kn.left,Z=Bi.startY-kn.top,Q=M.minWidth,ue=M.minHeight,be.x>0?Y=be.y>0?Re:lt:be.x<0&&(ae-=Q,Y=be.y>0?K:le),be.y<0&&(Z-=ue),this.cropped||(Fi(this.cropBox,L),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}Rt&&(M.width=Q,M.height=ue,M.left=ae,M.top=Z,this.action=Y,this.renderCropBox()),Pt(F,function(qt){qt.startX=qt.endX,qt.startY=qt.endY})}},lb={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Et(this.dragBox,Te),Fi(this.cropBox,L),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=_t({},this.initialImageData),this.canvasData=_t({},this.initialCanvasData),this.cropBoxData=_t({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(_t(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Fi(this.dragBox,Te),Et(this.cropBox,L)),this},replace:function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&u&&(this.isImg&&(this.element.src=u),f?(this.url=u,this.image.src=u,this.ready&&(this.viewBoxImage.src=u,Pt(this.previews,function(h){h.getElementsByTagName(`img`)[0].src=u}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(u))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Fi(this.cropper,pe)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Et(this.cropper,pe)),this},destroy:function(){var u=this.element;return u[G]?(u[G]=void 0,this.isImg&&this.replaced&&(u.src=this.originalUrl),this.uncreate(),this):this},move:function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,h=this.canvasData,B=h.left,M=h.top;return this.moveTo(To(u)?u:B+Number(u),To(f)?f:M+Number(f))},moveTo:function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,h=this.canvasData,B=!1;return u=Number(u),f=Number(f),this.ready&&!this.disabled&&this.options.movable&&(Ke(u)&&(h.left=u,B=!0),Ke(f)&&(h.top=f,B=!0),B&&this.renderCanvas(!0)),this},zoom:function(u,f){var h=this.canvasData;return u=Number(u),u<0?u=1/(1-u):u=1+u,this.zoomTo(h.width*u/h.naturalWidth,null,f)},zoomTo:function(u,f,h){var B=this.options,M=this.canvasData,F=M.width,Y=M.height,he=M.naturalWidth,ae=M.naturalHeight;if(u=Number(u),u>=0&&this.ready&&!this.disabled&&B.zoomable){var Z=he*u,Q=ae*u;if(Yi(this.element,Xe,{ratio:u,oldRatio:F/he,originalEvent:h})===!1)return this;if(h){var ue=this.pointers,ot=Fu(this.cropper),tt=ue&&Object.keys(ue).length?Ky(ue):{pageX:h.pageX,pageY:h.pageY};M.left-=(Z-F)*((tt.pageX-ot.left-M.left)/F),M.top-=(Q-Y)*((tt.pageY-ot.top-M.top)/Y)}else En(f)&&Ke(f.x)&&Ke(f.y)?(M.left-=(Z-F)*((f.x-M.left)/F),M.top-=(Q-Y)*((f.y-M.top)/Y)):(M.left-=(Z-F)/2,M.top-=(Q-Y)/2);M.width=Z,M.height=Q,this.renderCanvas(!0)}return this},rotate:function(u){return this.rotateTo((this.imageData.rotate||0)+Number(u))},rotateTo:function(u){return u=Number(u),Ke(u)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=u%360,this.renderCanvas(!0,!0)),this},scaleX:function(u){var f=this.imageData.scaleY;return this.scale(u,Ke(f)?f:1)},scaleY:function(u){var f=this.imageData.scaleX;return this.scale(Ke(f)?f:1,u)},scale:function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,h=this.imageData,B=!1;return u=Number(u),f=Number(f),this.ready&&!this.disabled&&this.options.scalable&&(Ke(u)&&(h.scaleX=u,B=!0),Ke(f)&&(h.scaleY=f,B=!0),B&&this.renderCanvas(!0,!0)),this},getData:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,f=this.options,h=this.imageData,B=this.canvasData,M=this.cropBoxData,F;if(this.ready&&this.cropped){F={x:M.left-B.left,y:M.top-B.top,width:M.width,height:M.height};var Y=h.width/h.naturalWidth;if(Pt(F,function(Z,Q){F[Q]=Z/Y}),u){var he=Math.round(F.y+F.height),ae=Math.round(F.x+F.width);F.x=Math.round(F.x),F.y=Math.round(F.y),F.width=ae-F.x,F.height=he-F.y}}else F={x:0,y:0,width:0,height:0};return f.rotatable&&(F.rotate=h.rotate||0),f.scalable&&(F.scaleX=h.scaleX||1,F.scaleY=h.scaleY||1),F},setData:function(u){var f=this.options,h=this.imageData,B=this.canvasData,M={};if(this.ready&&!this.disabled&&En(u)){var F=!1;f.rotatable&&Ke(u.rotate)&&u.rotate!==h.rotate&&(h.rotate=u.rotate,F=!0),f.scalable&&(Ke(u.scaleX)&&u.scaleX!==h.scaleX&&(h.scaleX=u.scaleX,F=!0),Ke(u.scaleY)&&u.scaleY!==h.scaleY&&(h.scaleY=u.scaleY,F=!0)),F&&this.renderCanvas(!0,!0);var Y=h.width/h.naturalWidth;Ke(u.x)&&(M.left=u.x*Y+B.left),Ke(u.y)&&(M.top=u.y*Y+B.top),Ke(u.width)&&(M.width=u.width*Y),Ke(u.height)&&(M.height=u.height*Y),this.setCropBoxData(M)}return this},getContainerData:function(){return this.ready?_t({},this.containerData):{}},getImageData:function(){return this.sized?_t({},this.imageData):{}},getCanvasData:function(){var u=this.canvasData,f={};return this.ready&&Pt([`left`,`top`,`width`,`height`,`naturalWidth`,`naturalHeight`],function(h){f[h]=u[h]}),f},setCanvasData:function(u){var f=this.canvasData,h=f.aspectRatio;return this.ready&&!this.disabled&&En(u)&&(Ke(u.left)&&(f.left=u.left),Ke(u.top)&&(f.top=u.top),Ke(u.width)?(f.width=u.width,f.height=u.width/h):Ke(u.height)&&(f.height=u.height,f.width=u.height*h),this.renderCanvas(!0)),this},getCropBoxData:function(){var u=this.cropBoxData,f;return this.ready&&this.cropped&&(f={left:u.left,top:u.top,width:u.width,height:u.height}),f||{}},setCropBoxData:function(u){var f=this.cropBoxData,h=this.options.aspectRatio,B,M;return this.ready&&this.cropped&&!this.disabled&&En(u)&&(Ke(u.left)&&(f.left=u.left),Ke(u.top)&&(f.top=u.top),Ke(u.width)&&u.width!==f.width&&(B=!0,f.width=u.width),Ke(u.height)&&u.height!==f.height&&(M=!0,f.height=u.height),h&&(B?f.height=f.width/h:M&&(f.width=f.height*h)),this.renderCropBox()),this},getCroppedCanvas:function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var f=this.canvasData,h=Xy(this.image,this.imageData,f,u);if(!this.cropped)return h;var B=this.getData(u.rounded),M=B.x,F=B.y,Y=B.width,he=B.height,ae=h.width/Math.floor(f.naturalWidth);ae!==1&&(M*=ae,F*=ae,Y*=ae,he*=ae);var Z=Y/he,Q=Ln({aspectRatio:Z,width:u.maxWidth||1/0,height:u.maxHeight||1/0}),ue=Ln({aspectRatio:Z,width:u.minWidth||0,height:u.minHeight||0},`cover`),ot=Ln({aspectRatio:Z,width:u.width||(ae!==1?h.width:Y),height:u.height||(ae!==1?h.height:he)}),tt=ot.width,St=ot.height;tt=Math.min(Q.width,Math.max(ue.width,tt)),St=Math.min(Q.height,Math.max(ue.height,St));var pt=document.createElement(`canvas`),Ht=pt.getContext(`2d`);pt.width=bn(tt),pt.height=bn(St),Ht.fillStyle=u.fillColor||`transparent`,Ht.fillRect(0,0,tt,St);var Yt=u.imageSmoothingEnabled,Rt=Yt===void 0?!0:Yt,kn=u.imageSmoothingQuality;Ht.imageSmoothingEnabled=Rt,kn&&(Ht.imageSmoothingQuality=kn);var Bi=h.width,be=h.height,ct=M,qt=F,Xi,On,ro,ao,zn,vn;ct<=-Y||ct>Bi?(ct=0,Xi=0,ro=0,zn=0):ct<=0?(ro=-ct,ct=0,Xi=Math.min(Bi,Y+ct),zn=Xi):ct<=Bi&&(ro=0,Xi=Math.min(Y,Bi-ct),zn=Xi),Xi<=0||qt<=-he||qt>be?(qt=0,On=0,ao=0,vn=0):qt<=0?(ao=-qt,qt=0,On=Math.min(be,he+qt),vn=On):qt<=be&&(ao=0,On=Math.min(he,be-qt),vn=On);var Ii=[ct,qt,Xi,On];if(zn>0&&vn>0){var so=tt/Y;Ii.push(ro*so,ao*so,zn*so,vn*so)}return Ht.drawImage.apply(Ht,[h].concat(d(Ii.map(function(Ss){return Math.floor(bn(Ss))})))),pt},setAspectRatio:function(u){var f=this.options;return!this.disabled&&!To(u)&&(f.aspectRatio=Math.max(0,u)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(u){var f=this.options,h=this.dragBox,B=this.face;if(this.ready&&!this.disabled){var M=u===Nt,F=f.movable&&u===X;u=M||F?u:j,f.dragMode=u,Mo(h,Je,u),Mn(h,z,M),Mn(h,ft,F),f.cropBoxMovable||(Mo(B,Je,u),Mn(B,z,M),Mn(B,ft,F))}return this}},db=O.Cropper,Lu=(function(){function T(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r(this,T),!u||!Ie.test(u.tagName))throw new Error(`The first argument is required and must be an <img> or <canvas> element.`);this.element=u,this.options=_t({},ee,En(f)&&f),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 f=this.element,h=f.tagName.toLowerCase(),B;if(!f[G]){if(f[G]=this,h===`img`){if(this.isImg=!0,B=f.getAttribute(`src`)||``,this.originalUrl=B,!B)return;B=f.src}else h===`canvas`&&window.HTMLCanvasElement&&(B=f.toDataURL());this.load(B)}}},{key:`load`,value:function(f){var h=this;if(f){this.url=f,this.imageData={};var B=this.element,M=this.options;if(!M.rotatable&&!M.scalable&&(M.checkOrientation=!1),!M.checkOrientation||!window.ArrayBuffer){this.clone();return}if(wt.test(f)){W.test(f)?this.read(Jy(f)):this.clone();return}var F=new XMLHttpRequest,Y=this.clone.bind(this);this.reloading=!0,this.xhr=F,F.onabort=Y,F.onerror=Y,F.ontimeout=Y,F.onprogress=function(){F.getResponseHeader(`content-type`)!==Tt&&F.abort()},F.onload=function(){h.read(F.response)},F.onloadend=function(){h.reloading=!1,h.xhr=null},M.checkCrossOrigin&&Bu(f)&&B.crossOrigin&&(f=Nu(f)),F.open(`GET`,f,!0),F.responseType=`arraybuffer`,F.withCredentials=B.crossOrigin===`use-credentials`,F.send()}}},{key:`read`,value:function(f){var h=this.options,B=this.imageData,M=tb(f),F=0,Y=1,he=1;if(M>1){this.url=eb(f,Tt);var ae=ib(M);F=ae.rotate,Y=ae.scaleX,he=ae.scaleY}h.rotatable&&(B.rotate=F),h.scalable&&(B.scaleX=Y,B.scaleY=he),this.clone()}},{key:`clone`,value:function(){var f=this.element,h=this.url,B=f.crossOrigin,M=h;this.options.checkCrossOrigin&&Bu(h)&&(B||(B=`anonymous`),M=Nu(h)),this.crossOrigin=B,this.crossOriginUrl=M;var F=document.createElement(`img`);B&&(F.crossOrigin=B),F.src=M||h,F.alt=f.alt||`The image to crop`,this.image=F,F.onload=this.start.bind(this),F.onerror=this.stop.bind(this),Et(F,Le),f.parentNode.insertBefore(F,f.nextSibling)}},{key:`start`,value:function(){var f=this,h=this.image;h.onload=null,h.onerror=null,this.sizing=!0;var B=O.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(O.navigator.userAgent),M=function(ae,Z){_t(f.imageData,{naturalWidth:ae,naturalHeight:Z,aspectRatio:ae/Z}),f.initialImageData=_t({},f.imageData),f.sizing=!1,f.sized=!0,f.build()};if(h.naturalWidth&&!B){M(h.naturalWidth,h.naturalHeight);return}var F=document.createElement(`img`),Y=document.body||document.documentElement;this.sizingImage=F,F.onload=function(){M(F.width,F.height),B||Y.removeChild(F)},F.src=h.src,B||(F.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;`,Y.appendChild(F))}},{key:`stop`,value:function(){var f=this.image;f.onload=null,f.onerror=null,f.parentNode.removeChild(f),this.image=null}},{key:`build`,value:function(){if(!(!this.sized||this.ready)){var f=this.element,h=this.options,B=this.image,M=f.parentNode,F=document.createElement(`div`);F.innerHTML=ve;var Y=F.querySelector(`.`.concat(G,`-container`)),he=Y.querySelector(`.`.concat(G,`-canvas`)),ae=Y.querySelector(`.`.concat(G,`-drag-box`)),Z=Y.querySelector(`.`.concat(G,`-crop-box`)),Q=Z.querySelector(`.`.concat(G,`-face`));this.container=M,this.cropper=Y,this.canvas=he,this.dragBox=ae,this.cropBox=Z,this.viewBox=Y.querySelector(`.`.concat(G,`-view-box`)),this.face=Q,he.appendChild(B),Et(f,L),M.insertBefore(Y,f.nextSibling),Fi(B,Le),this.initPreview(),this.bind(),h.initialAspectRatio=Math.max(0,h.initialAspectRatio)||NaN,h.aspectRatio=Math.max(0,h.aspectRatio)||NaN,h.viewMode=Math.max(0,Math.min(3,Math.round(h.viewMode)))||0,Et(Z,L),h.guides||Et(Z.getElementsByClassName(``.concat(G,`-dashed`)),L),h.center||Et(Z.getElementsByClassName(``.concat(G,`-center`)),L),h.background&&Et(Y,``.concat(G,`-bg`)),h.highlight||Et(Q,He),h.cropBoxMovable&&(Et(Q,ft),Mo(Q,Je,ce)),h.cropBoxResizable||(Et(Z.getElementsByClassName(``.concat(G,`-line`)),L),Et(Z.getElementsByClassName(``.concat(G,`-point`)),L)),this.render(),this.ready=!0,this.setDragMode(h.dragMode),h.autoCrop&&this.crop(),this.setData(h.data),ri(h.ready)&&ci(f,dt,h.ready,{once:!0}),Yi(f,dt)}}},{key:`unbuild`,value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var f=this.cropper.parentNode;f&&f.removeChild(this.cropper),Fi(this.element,L)}}},{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=db,T}},{key:`setDefaults`,value:function(f){_t(ee,En(f)&&f)}}])})();return _t(Lu.prototype,nb,ob,rb,ab,sb,lb),Lu}))});var Og=J((gc,yc)=>{((i,t)=>{typeof define==`function`&&define.amd?define([],t):typeof yc==`object`&&typeof gc<`u`?yc.exports=t():i.Papa=t()})(gc,function i(){var t=typeof self<`u`?self:typeof window<`u`?window:t!==void 0?t:{},e=!t.document&&!!t.postMessage,n=t.IS_PAPA_WORKER||!1,o={},r=0,a={};function s(S){return S.charCodeAt(0)===65279?S.slice(1):S}function l(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine=``,this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(D){var N=G(D);N.chunkSize=parseInt(N.chunkSize),D.step||D.chunk||(N.chunkSize=null),this._handle=new v(N),(this._handle.streamer=this)._config=N}.call(this,S),this.parseChunk=function(D,N){var V=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<V){let Se=this._config.newline;Se||(se=this._config.quoteChar||`"`,Se=this._handle.guessLineEndings(D,se)),D=[...D.split(Se).slice(V)].join(Se)}this.isFirstChunk&&de(this._config.beforeFirstChunk)&&(se=this._config.beforeFirstChunk(D))!==void 0&&(D=se),this.isFirstChunk=!1,this._halted=!1;var V=this._partialLine+D,se=(this._partialLine=``,this._handle.parse(V,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(D=se.meta.cursor,V=(this._finished||(this._partialLine=V.substring(D-this._baseIndex),this._baseIndex=D),se&&se.data&&(this._rowCount+=se.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),n)t.postMessage({results:se,workerId:a.WORKER_ID,finished:V});else if(de(this._config.chunk)&&!N){if(this._config.chunk(se,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=se=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(se.data),this._completeResults.errors=this._completeResults.errors.concat(se.errors),this._completeResults.meta=se.meta),this._completed||!V||!de(this._config.complete)||se&&se.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),V||se&&se.meta.paused||this._nextChunk(),se}this._halted=!0},this._sendError=function(D){de(this._config.error)?this._config.error(D):n&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:D,finished:!1})}}function d(S){var D;(S=S||{}).chunkSize||(S.chunkSize=a.RemoteChunkSize),l.call(this,S),this._nextChunk=e?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(N){this._input=N,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(D=new XMLHttpRequest,this._config.withCredentials&&(D.withCredentials=this._config.withCredentials),e||(D.onload=ce(this._chunkLoaded,this),D.onerror=ce(this._chunkError,this)),D.ontimeout=ce(this._chunkTimeout,this),D.open(this._config.downloadRequestBody?`POST`:`GET`,this._input,!e),this._config.downloadTimeout&&!e&&(D.timeout=this._config.downloadTimeout),this._config.downloadRequestHeaders){var N,V=this._config.downloadRequestHeaders;for(N in V)D.setRequestHeader(N,V[N])}var se;this._config.chunkSize&&(se=this._start+this._config.chunkSize-1,D.setRequestHeader(`Range`,`bytes=`+this._start+`-`+se));try{D.send(this._config.downloadRequestBody)}catch(Se){this._chunkError(Se.message)}e&&D.status===0&&this._chunkError()}},this._chunkLoaded=function(){D.readyState===4&&(D.status<200||400<=D.status?this._chunkError():(this._start+=this._config.chunkSize||D.responseText.length,this._finished=!this._config.chunkSize||this._start>=(N=>(N=N.getResponseHeader(`Content-Range`))!==null?parseInt(N.substring(N.lastIndexOf(`/`)+1)):-1)(D),this.parseChunk(D.responseText)))},this._chunkError=function(N){N=D.statusText||N,this._sendError(new Error(N))},this._chunkTimeout=function(){this._chunkError(`Request timed out after `+this._config.downloadTimeout+`ms`)}}function c(S){(S=S||{}).chunkSize||(S.chunkSize=a.LocalChunkSize),l.call(this,S);var D,N,V=typeof FileReader<`u`;this.stream=function(se){this._input=se,N=se.slice||se.webkitSlice||se.mozSlice,V?((D=new FileReader).onload=ce(this._chunkLoaded,this),D.onerror=ce(this._chunkError,this)):D=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var se=this._input,Se=(this._config.chunkSize&&(Se=Math.min(this._start+this._config.chunkSize,this._input.size),se=N.call(se,this._start,Se)),D.readAsText(se,this._config.encoding));V||this._chunkLoaded({target:{result:Se}})},this._chunkLoaded=function(se){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(se.target.result)},this._chunkError=function(){this._sendError(D.error)}}function m(S){var D;l.call(this,S=S||{}),this.stream=function(N){return D=N,this._nextChunk()},this._nextChunk=function(){var N,V;if(!this._finished)return N=this._config.chunkSize,D=N?(V=D.substring(0,N),D.substring(N)):(V=D,``),this._finished=!D,this.parseChunk(V)}}function g(S){l.call(this,S=S||{});var D=[],N=!0,V=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(se){this._input=se,this._input.on(`data`,this._streamData),this._input.on(`end`,this._streamEnd),this._input.on(`error`,this._streamError)},this._checkIsFinished=function(){V&&D.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),D.length?this.parseChunk(D.shift()):N=!0},this._streamData=ce(function(se){try{D.push(typeof se==`string`?se:se.toString(this._config.encoding)),N&&(N=!1,this._checkIsFinished(),this.parseChunk(D.shift()))}catch(Se){this._streamError(Se)}},this),this._streamError=ce(function(se){this._streamCleanUp(),this._sendError(se)},this),this._streamEnd=ce(function(){this._streamCleanUp(),V=!0,this._streamData(``)},this),this._streamCleanUp=ce(function(){this._input.removeListener(`data`,this._streamData),this._input.removeListener(`end`,this._streamEnd),this._input.removeListener(`error`,this._streamError)},this)}function v(S){var D,N,V,se,Se=Math.pow(2,53),lt=-Se,le=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,Re=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,K=this,z=0,pe=0,L=!1,Le=!1,He=[],Te={data:[],errors:[],meta:{}};function ft(X){return S.skipEmptyLines===`greedy`?X.join(``).trim()===``:X.length===1&&X[0].length===0}function Je(){if(Te&&V&&(Nt(`Delimiter`,`UndetectableDelimiter`,`Unable to auto-detect delimiting character; defaulted to '`+a.DefaultDelimiter+`'`),V=!1),S.skipEmptyLines&&(Te.data=Te.data.filter(function(ye){return!ft(ye)})),st()){let ye=function(we){He.push(we)};if(Te)if(Array.isArray(Te.data[0])){for(var X=0;st()&&X<Te.data.length;X++)Te.data[X].forEach(ye);Te.data.splice(0,1)}else Te.data.forEach(ye)}function j(ye,we){for(var je=S.header?{}:[],Ee=0;Ee<ye.length;Ee++){var _e=Ee,Ae=ye[Ee],Ae=((Oe,Ve)=>(Qe=>(S.dynamicTypingFunction&&S.dynamicTyping[Qe]===void 0&&(S.dynamicTyping[Qe]=S.dynamicTypingFunction(Qe)),(S.dynamicTyping[Qe]||S.dynamicTyping)===!0))(Oe)?Ve===`true`||Ve===`TRUE`||Ve!==`false`&&Ve!==`FALSE`&&((Qe=>{if(le.test(Qe)&&(Qe=parseFloat(Qe),lt<Qe&&Qe<Se))return 1})(Ve)?parseFloat(Ve):Re.test(Ve)?new Date(Ve):Ve===``?null:Ve):Ve)(_e=S.header?Ee>=He.length?`__parsed_extra`:He[Ee]:_e,Ae=S.transform?S.transform(Ae,_e):Ae);_e===`__parsed_extra`?(je[_e]=je[_e]||[],je[_e].push(Ae)):je[_e]=Ae}return S.header&&(Ee>He.length?Nt(`FieldMismatch`,`TooManyFields`,`Too many fields: expected `+He.length+` fields but parsed `+Ee,pe+we):Ee<He.length&&Nt(`FieldMismatch`,`TooFewFields`,`Too few fields: expected `+He.length+` fields but parsed `+Ee,pe+we)),je}var q;Te&&(S.header||S.dynamicTyping||S.transform)&&(q=1,!Te.data.length||Array.isArray(Te.data[0])?(Te.data=Te.data.map(j),q=Te.data.length):Te.data=j(Te.data,0),S.header&&Te.meta&&(Te.meta.fields=He),pe+=q)}function st(){return S.header&&He.length===0}function Nt(X,j,q,H){X={type:X,code:j,message:q},H!==void 0&&(X.row=H),Te.errors.push(X)}de(S.step)&&(se=S.step,S.step=function(X){Te=X,st()?Je():(Je(),Te.data.length!==0&&(z+=X.data.length,S.preview&&z>S.preview?N.abort():(Te.data=Te.data[0],se(Te,K))))}),this.parse=function(X,j,q){var H=S.quoteChar||`"`,H=(S.newline||(S.newline=this.guessLineEndings(X,H)),V=!1,S.delimiter?de(S.delimiter)&&(S.delimiter=S.delimiter(X),Te.meta.delimiter=S.delimiter):((H=((ye,we,je,Ee,_e)=>{var Ae,Oe,Ve,Qe;_e=_e||[`,`,` `,`|`,`;`,a.RECORD_SEP,a.UNIT_SEP];for(var dt=0;dt<_e.length;dt++){for(var Be,Ct=_e[dt],Xe=0,Tt=0,vt=0,wt=(Ve=void 0,new P({comments:Ee,delimiter:Ct,newline:we,preview:10}).parse(ye)),W=0;W<wt.data.length;W++)je&&ft(wt.data[W])?vt++:(Be=wt.data[W].length,Tt+=Be,Ve===void 0?Ve=Be:0<Be&&(Xe+=Math.abs(Be-Ve),Ve=Be));0<wt.data.length&&(Tt/=wt.data.length-vt),1.99<Tt&&(Oe===void 0||Xe<Oe||Xe===Oe&&Qe<Tt)&&(Oe=Xe,Ae=Ct,Qe=Tt)}return{successful:!!(S.delimiter=Ae),bestDelimiter:Ae}})(X,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess)).successful?S.delimiter=H.bestDelimiter:(V=!0,S.delimiter=a.DefaultDelimiter),Te.meta.delimiter=S.delimiter),G(S));return H.header=st(),S.preview&&S.header&&H.preview++,D=X,N=new P(H),Te=N.parse(D,j,q),Je(),L?{meta:{paused:!0}}:Te||{meta:{paused:!1}}},this.paused=function(){return L},this.pause=function(){L=!0,N.abort(),D=de(S.chunk)?``:D.substring(N.getCharIndex())},this.resume=function(){K.streamer._halted?(L=!1,K.streamer.parseChunk(D,!0)):setTimeout(K.resume,3)},this.aborted=function(){return Le},this.abort=function(){Le=!0,N.abort(),Te.meta.aborted=!0,de(S.complete)&&S.complete(Te),D=``},this.guessLineEndings=function(ye,H){ye=ye.substring(0,1048576);var H=new RegExp(_(H)+`([^]*?)`+_(H),`gm`),q=(ye=ye.replace(H,``)).split(`\r`),H=ye.split(`
|
|
3
3
|
`),ye=1<H.length&&H[0].length<q[0].length;if(q.length===1||ye)return`
|
|
4
4
|
`;for(var we=0,je=0;je<q.length;je++)q[je][0]===`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[{path:``,children:[{path:`v2/print-mode`,loadComponent:()=>import(`./chunk-BrYuJ3_B.js`).then(o=>o.PrintModeSelectorComponent)},{path:``,children:[{path:`barcode`,loadComponent:()=>import(`./chunk-CXWiG2wq.js`).then(o=>o.BarcodeWrapperComponent)},{path:`price-label`,loadComponent:()=>import(`./chunk-IAyl2lX6.js`).then(o=>o.PriceLabelWrapperComponent)},{path:`setup`,children:[{path:`users`,loadComponent:()=>import(`./chunk-fSeUH18k.js`).then(o=>o.UsersComponent)},{path:`groups`,loadComponent:()=>import(`./chunk-yONIixN9.js`).then(o=>o.GroupsComponent)},{path:`credential`,loadComponent:()=>import(`./chunk-D9W75WcJ.js`).then(o=>o.CredentialComponent)}]}]}]}];export{e as dashboardRoutes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as W$1,m as Ba,u as Sh,v as Xt,x as eu}from"./main-
|
|
1
|
+
import{_ as W$1,m as Ba,u as Sh,v as Xt,x as eu}from"./main-Q2MGVNT6.js";import{t as D}from"./chunk-CUqJO8Ae.js";import"./chunk-DAfeU1o0.js";import{D as Xi,F as fh,K as oh,P as dh,S as Tl,X as sh,a as Fs,i as Fo,nt as wl,tt as vl,z as ja}from"./chunk-CtdBLXrI.js";import{B as GI,Ci as zu,Dr as ml,E,Ft as Rh,H as Gu,Hn as fl,Kn as fw,Ot as QI,Rn as ep,St as Pi,Tn as cg,ar as hw,ei as ti,en as Vw,ht as Oh,ii as ub,m as Bh,or as iI,qt as Tw,u as Aw,vn as bb,yt as PD}from"./chunk-LD3k3Loy.js";var P=n=>({active:n});function W(n,_){n&1&&(Pi(0,`h4`),ub(1,`This menu is for printing barcodes that will be placed directly on your products.`),fl())}function X(n,_){n&1&&(Pi(0,`h4`),ub(1,` This option is designed for printing barcodes and labels that will be displayed on the shelves where your products are stored. `),fl())}function Y(n,_){n&1&&(Pi(0,`h4`),ub(1,`This option is for setting up user accounts and managing user permissions.`),fl())}function Z(n,_){if(n&1){let l=Tw();Pi(0,`div`,27),Bh(`click`,function(){Gu(l),Aw();let o=Vw(36);return zu(o.click())}),Pi(1,`div`,28)(2,`div`,29),Oh(3,`i`,7),fl(),Pi(4,`h6`,31),ub(5,`Setup`),fl(),Pi(6,`h4`,32),ub(7,`Users`),fl()()()}if(n&2){let l=Aw();Rh(`ngClass`,bb(1,P,l.form.get(`printMode`).value===3))}}var pe=(()=>{class n{constructor(){this.domain=ti(``),this.username=ti(``),this.appStore=E(eu),this.router=E(W$1),this.fb=E(dh),this.authService=E(Sh)}ngOnInit(){this.initForm()}ngAfterViewInit(){this.domain.set(localStorage.getItem(Xt.Host)),this.username.set(localStorage.getItem(Xt.Username))}onNext(){let l=this.form.get(`printMode`).value;switch(this.appStore.clearAll(),l){case 1:this.form.get(`rememberMe`).value&&localStorage.setItem(Xt.PrintMode,`barcode`),this.router.navigate([`/pages/profile-template`]);break;case 2:this.form.get(`rememberMe`).value&&localStorage.setItem(Xt.PrintMode,`priceLabel`),this.router.navigate([`/pages/price-label`]);break;case 3:this.form.get(`rememberMe`).value&&localStorage.setItem(Xt.PrintMode,`setupUsers`),this.router.navigate([`/pages/setup/users`]);break;default:console.error(`Unknown print mode selected:`,l)}}initForm(){this.form=this.fb.group({printMode:this.fb.control(localStorage.getItem(Xt.PrintMode)===`priceLabel`?2:1),rememberMe:this.fb.control(!0)})}get isUserAdmin(){return this.appStore.userRole()===`admin`}static{this.ɵfac=function(s){return new(s||n)}}static{this.ɵcmp=PD({type:n,selectors:[[`app-print-mode-selector`]],decls:63,vars:17,consts:[[`radioDefault1`,``],[`radioDefault2`,``],[`radioDefault3`,``],[1,`navbar`,`navbar-light`,`bg-white`,`shadow-sm`,`px-4`,`py-2`],[1,`fw-normal`,`mt-2`],[1,`dropdown`],[`type`,`button`,`id`,`profileMenu`,`data-bs-toggle`,`dropdown`,`aria-expanded`,`false`,1,`btn`,`btn-light`,`rounded-circle`,`d-flex`,`align-items-center`,`justify-content-center`,2,`width`,`40px`,`height`,`40px`],[1,`fa-solid`,`fa-user`],[`aria-labelledby`,`profileMenu`,1,`dropdown-menu`,`dropdown-menu-end`,`shadow`,`border-0`,`p-3`,2,`width`,`250px`,`border-radius`,`1rem`],[1,`mb-2`],[1,`fw-bold`,`text-uppercase`],[1,`d-flex`,`align-items-center`,`mb-3`],[1,`me-3`],[1,`fa-solid`,`fa-user-circle`,`fa-3x`,`text-secondary`],[1,`mt-3`,`fw-bold`],[1,`text-muted`,`fw-bolder`],[`rel`,`noopener noreferrer`,`target`,`_blank`,1,`text-primary`,`text-decoration-none`,3,`href`],[1,`dropdown-divider`],[`href`,`javascript:void(0)`,1,`btn`,`btn-primary`,`w-100`,`rounded-pill`,3,`click`],[1,`d-flex`,`flex-column`,2,`height`,`calc(100vh - 56px)`],[1,`flex-grow-1`,`w-100`,`d-flex`,`flex-column`,`justify-content-center`,`align-items-center`,`gap-4`,`px-3`],[`id`,`header`,1,`text-center`,`mb-4`],[1,`row`,`g-4`,`justify-content-center`,`w-100`,2,`max-width`,`960px`,3,`formGroup`],[`formControlName`,`printMode`,`type`,`radio`,`name`,`printMode`,1,`form-check-input`,`d-none`,3,`value`],[`formControlName`,`printMode`,`type`,`radio`,`name`,`printMode`,`checked`,``,1,`form-check-input`,`d-none`,3,`value`],[1,`d-flex`,`flex-column`,`align-items-center`,`gap-4`,`w-100`],[1,`d-flex`,`gap-5`,`justify-content-center`,`flex-wrap`],[1,`card`,`option-card`,3,`click`,`ngClass`],[1,`card-body`,`text-center`],[1,`icon-wrapper`,`mb-2`,`mt-4`],[1,`fa-solid`,`fa-barcode`],[1,`text-muted`,`mb-1`],[1,`fw-normal`],[1,`fa-solid`,`fa-shelves`],[1,`card`,`option-card`,3,`ngClass`],[1,`form-check`,`d-flex`,`justify-content-center`,`align-items-center`,`gap-2`,`mt-3`],[`type`,`checkbox`,`formControlName`,`rememberMe`,`id`,`checkDefault`,1,`form-check-input`],[`for`,`checkDefault`,1,`form-check-label`],[1,`mt-3`],[`type`,`button`,1,`btn`,`btn-primary`,`btn-lg`,`px-5`,`rounded-pill`,`shadow-lg`,3,`click`]],template:function(s,o){if(s&1){let E=Tw();Pi(0,`nav`,3)(1,`h2`,4),ub(2,`Choose Barcode Mode`),fl(),Pi(3,`div`,5)(4,`button`,6),Oh(5,`i`,7),fl(),Pi(6,`ul`,8)(7,`li`,9)(8,`span`,10),ub(9,`User Profile`),fl()(),Pi(10,`li`,11)(11,`div`,12),Oh(12,`i`,13),fl(),Pi(13,`div`)(14,`h6`,14),ub(15),fl(),Pi(16,`h6`,15)(17,`a`,16),ub(18),fl()()()(),Pi(19,`li`),Oh(20,`hr`,17),fl(),Pi(21,`li`)(22,`button`,18),Bh(`click`,function(){return o.authService.logout()}),ub(23,` SIGN OUT `),fl()()()()(),Pi(24,`div`,19)(25,`main`,20)(26,`div`,21),fw(27,W,2,0,`h4`),fw(28,X,2,0,`h4`),fw(29,Y,2,0,`h4`),fl(),Pi(30,`div`,22)(31,`input`,23,0),GI(),fl(),Pi(33,`input`,24,1),GI(),fl(),Pi(35,`input`,24,2),GI(),fl(),Pi(37,`div`,25)(38,`div`,26)(39,`div`,27),Bh(`click`,function(){Gu(E);let M=Vw(32);return zu(M.click())}),Pi(40,`div`,28)(41,`div`,29),Oh(42,`i`,30),fl(),Pi(43,`h6`,31),ub(44,`Print`),fl(),Pi(45,`h4`,32),ub(46,`Product`),fl()()(),Pi(47,`div`,27),Bh(`click`,function(){Gu(E);let M=Vw(34);return zu(M.click())}),Pi(48,`div`,28)(49,`div`,29),Oh(50,`i`,33),fl(),Pi(51,`h6`,31),ub(52,`Print`),fl(),Pi(53,`h4`,32),ub(54,`Shelf`),fl()()(),fw(55,Z,8,3,`div`,34),fl(),Pi(56,`div`,35)(57,`input`,36),GI(),fl(),Pi(58,`label`,37),ub(59,`Remember my decision`),fl()(),Pi(60,`div`,38)(61,`button`,39),Bh(`click`,function(){return o.onNext()}),ub(62,` Next `),fl()()()()()()}s&2&&(iI(15),cg(o.username()),iI(2),Rh(`href`,`https://`+o.domain(),ep),iI(),ml(` `,o.domain(),` `),iI(9),hw(o.form.get(`printMode`).value===1?27:-1),iI(),hw(o.form.get(`printMode`).value===2?28:-1),iI(),hw(o.form.get(`printMode`).value===3?29:-1),iI(),Rh(`formGroup`,o.form),iI(),Rh(`value`,1),QI(),iI(2),Rh(`value`,2),QI(),iI(2),Rh(`value`,3),QI(),iI(4),Rh(`ngClass`,bb(13,P,o.form.get(`printMode`).value===1)),iI(8),Rh(`ngClass`,bb(15,P,o.form.get(`printMode`).value===2)),iI(8),hw(o.isUserAdmin?55:-1),iI(2),QI())},dependencies:[Xi,Fs,Ba,fh,Fo,ja,wl,oh,sh,vl,Tl,D],styles:[`[_nghost-%COMP%]{display:block}main[_ngcontent-%COMP%]{background-color:#f5f5f5}.card[_ngcontent-%COMP%]{width:205px;height:205px;border-radius:8px;transition:transform .3s ease,border-color .3s ease}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:4rem}.card.active[_ngcontent-%COMP%]{border:2px solid blue;transform:scale(1.05)}.dropdown-menu[_ngcontent-%COMP%]{position:absolute;right:0}#header[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{margin:0}#header[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:nth-child(1){font-size:2rem;font-weight:500}#header[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]:nth-child(2){font-size:.8rem}`]})}}return n})();export{pe as PrintModeSelectorComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as W,a as In,b as Z,v as Xt$1,x as eu}from"./main-
|
|
1
|
+
import{_ as W,a as In,b as Z,v as Xt$1,x as eu}from"./main-Q2MGVNT6.js";import{t as D}from"./chunk-CUqJO8Ae.js";import{a as dj,i as bV,n as Rg,o as rd,r as Ul,s as vz,t as Hl}from"./chunk-BqiKYBZB.js";import"./chunk-BUsg5rFD.js";import"./chunk-2WAnOzGd.js";import{t as i}from"./chunk-CKXRHkCI.js";import{c as Sn,f as gr,i as Gn,n as An,r as Ee,t as $n}from"./chunk-CpMSXHia.js";import{$ as gl,At as ze,Dt as yi,I as Wl,J as dl,O as Su,Q as gd,X as fe,Y as el,Z as fl,et as hd,j as Tl,q as ct,r as Ac,s as At$1,w as Ol,wt as vu,y as Ji,z as Ze}from"./chunk-CZtkF-WL.js";import"./chunk-DAfeU1o0.js";import{D as Xi,F as fh,K as oh,P as dh,R as hh,S as Tl$1,X as sh,Y as sc,a as Fs,h as Ns,i as Fo,ot as xs,tt as vl,w as Us}from"./chunk-CtdBLXrI.js";import{$ as Jw,$n as hb,B as GI,Ci as zu,Dr as ml,E,Ft as Rh,Gn as fs,H as Gu,Hn as fl$1,Kn as fw,Lr as ov,Ot as QI,Pn as eb,Pr as oE,Qr as sm,S as Db,St as Pi,Ti as G,Tn as cg,V as Gh,Vn as fg,Vr as pm,W as Hb,Wt as Th,Yn as gl$1,Yt as U1,_t as Ow,ai as ue,ar as hw,br as kw,bt as Pb,c as Ah,di as vw,ei as ti$1,en as Vw,fi as wb,fr as jw,ft as O1,gi as x,gn as _h,ht as Oh,i as $e,ii as ub,j as F1,ji as M,jn as ds,kn as dg,m as Bh,mt as Ob,nn as W1,o as Ab,on as Xi$1,or as iI,pr as k1,qr as ql,qt as Tw,u as Aw,ur as jD,vi as yw,vn as bb,w as Du,wi as F,xt as Ph,yt as PD,z as GD}from"./chunk-LD3k3Loy.js";var Et=`
|
|
2
2
|
.p-popover {
|
|
3
3
|
margin-block-start: dt('popover.gutter');
|
|
4
4
|
background: dt('popover.background');
|
|
@@ -60,4 +60,4 @@ import{_ as W,a as In,b as Z,v as Xt$1,x as eu}from"./main-4PMU2GQ6.js";import{t
|
|
|
60
60
|
border-bottom-color: transparent;
|
|
61
61
|
border-top-color: dt('popover.border.color');
|
|
62
62
|
}
|
|
63
|
-
`;var Ht={root:({instance:i})=>F({position:`absolute`},i.style())};var Bt={root:`p-popover p-component`,content:`p-popover-content`};var Et=class Z extends fe{name=`popover`;style=Dt;classes=Bt;inlineStyles=Ht;static ɵfac=(()=>{let e;return function(r){return(e||(e=ov(Z)))(r||Z)}})();static ɵprov=ue({token:Z,factory:Z.ɵfac})};var Nt=new x(`POPOVER_INSTANCE`);var At=class j extends ct{componentName=`Popover`;$pcPopover=E(Nt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});ariaLabel=k1();ariaLabelledBy=k1();dismissable=k1(!0,{transform:U1});style=k1();styleClass=k1();appendTo=k1(`body`);autoZIndex=k1(!0,{transform:U1});ariaCloseLabel=k1();baseZIndex=k1(0,{transform:W1});focusOnShow=k1(!0,{transform:U1});motionOptions=k1(void 0);computedMotionOptions=Hb(()=>F(F({},this.ptm(`motion`)),this.motionOptions()));onShow=O1();onHide=O1();$appendTo=Hb(()=>this.appendTo()||this.config.overlayAppendTo());container;overlayVisible=ti$1(!1);render=ti$1(!1);selfClick=!1;documentClickListener;target=null;willHide;scrollHandler;documentResizeListener;contentTemplate=F1(`content`,{descendants:!1});onCloseClickCallback=this.onCloseClick.bind(this);contentTemplateContext=Hb(()=>({closeCallback:this.onCloseClickCallback}));destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=E(Et);overlayService=E(Wl);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm(`host`))}bindDocumentClickListener(){if(sc(this.platformId)&&!this.documentClickListener){let e=Tl()?`touchstart`:`click`,t=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(t,e,r=>{if(!this.dismissable())return;let a=gd(r,this.container),h=gd(r,this.target);!this.container?.contains(a)&&this.target!==h&&!this.target?.contains(h)&&!this.selfClick&&this.hide(),this.selfClick=!1})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,t){this.overlayVisible()?(this.hasTargetChanged(e,t)&&(this.destroyCallback=()=>{this.show(null,t||e.currentTarget||e.target)}),this.hide()):this.show(e,t)}show(e,t){t&&e&&e.stopPropagation(),this.container&&!this.overlayVisible()&&(this.container=null),this.target=t||e.currentTarget||e.target,this.overlayVisible.set(!0),this.render.set(!0)}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let t=e.target;this.selfClick=e.offsetX<t.clientWidth&&e.offsetY<t.clientHeight}hasTargetChanged(e,t){return this.target!=null&&this.target!==(t||e.currentTarget||e.target)}appendOverlay(){this.$appendTo()&&this.$appendTo()!==`self`&&(this.$appendTo()===`body`?fl(this.$overlayParent(this.document.body,this.container),this.container):fl(this.$overlayParent(this.$appendTo(),this.container),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!==`self`&&fl(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex()&&Ac.set(`overlay`,this.container,this.baseZIndex()+this.config.zIndex.overlay)}align(){if(this.target&&this.container){dl(this.container,this.target,!1);let e=Ji(this.container),t=Ji(this.target),r=e.left,a=e.top,h=t.left,m=t.top,f=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue(`border-radius`),l=0;r<h&&(l=h-r-parseFloat(f)*2),this.container.style.setProperty(this.$styleScope.resolvers.$dt(`popover.arrow.left`).name,`${l}px`),a<m&&(this.container.setAttribute(`data-p-popover-flipped`,`true`),this.$unstyled()||ze(this.container,this.pcn(`p-popover-flipped`)))}}onAnimationStart(e){this.container=e.element,this.$markInstance(this.container),this.appendOverlay(),this.align(),this.setZIndex(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow()&&this.focus(),this.overlayEventListener=t=>{this.container&&this.container.contains(t.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)}onAnimationEnd(){this.overlayVisible()||(this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.autoZIndex()&&Ac.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render.set(!1),this.container=null)}focus(){let e=gl(this.container,`[autofocus]`);e&&setTimeout(()=>e.focus(),5)}hide(){this.overlayVisible.set(!1)}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible()&&!Ol()&&this.hide()}bindDocumentResizeListener(){if(sc(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,`resize`,this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){sc(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new hd(this.target,()=>{this.overlayVisible()&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex()&&Ac.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}static ɵfac=(()=>{let e;return function(r){return(e||(e=ov(j)))(r||j)}})();static ɵcmp=(function(){let e=[`content`],t=[`*`];function r(m,f){m&1&&Ph(0)}function a(m,f){if(m&1&&_h(0,r,1,0,`ng-container`,3),m&2){let l=Aw(2);Rh(`ngTemplateOutlet`,l.contentTemplate())(`ngTemplateOutletContext`,l.contentTemplateContext())}}function h(m,f){if(m&1){let l=Tw();Pi(0,`div`,1),Bh(`click`,function(g){Gu(l);let D=Aw();return zu(D.onOverlayClick(g))})(`pMotionOnEnter`,function(g){Gu(l);let D=Aw();return zu(D.onAnimationStart(g))})(`pMotionOnAfterLeave`,function(){Gu(l);let g=Aw();return zu(g.onAnimationEnd())}),Pi(1,`div`,2),Bh(`click`,function(g){Gu(l);let D=Aw();return zu(D.onContentClick(g))})(`mousedown`,function(g){Gu(l);let D=Aw();return zu(D.onContentClick(g))}),kw(2),fw(3,a,1,2,`ng-container`),fl$1()()}if(m&2){let l=Aw();Jw(l.sx(`root`)),eb(l.cn(l.cx(`root`),l.styleClass())),Rh(`pBind`,l.ptm(`root`))(`pMotion`,l.overlayVisible())(`pMotionName`,l.pcn(`p-anchored-overlay`))(`pMotionAppear`,!0)(`pMotionOptions`,l.computedMotionOptions()),Ah(`aria-modal`,l.overlayVisible())(`aria-label`,l.ariaLabel())(`aria-labelledBy`,l.ariaLabelledBy()),iI(),eb(l.cx(`content`)),Rh(`pBind`,l.ptm(`content`)),iI(2),hw(l.contentTemplate()?3:-1)}}return PD({type:j,selectors:[[`p-popover`]],contentQueries:function(f,l,M){f&1&&Gh(M,l.contentTemplate,e,4),f&2&&jw()},hostBindings:function(f,l){f&1&&Bh(`keydown.escape`,function(g){return l.onEscapeKeydown(g)},oE)},inputs:{ariaLabel:[1,`ariaLabel`],ariaLabelledBy:[1,`ariaLabelledBy`],dismissable:[1,`dismissable`],style:[1,`style`],styleClass:[1,`styleClass`],appendTo:[1,`appendTo`],autoZIndex:[1,`autoZIndex`],ariaCloseLabel:[1,`ariaCloseLabel`],baseZIndex:[1,`baseZIndex`],focusOnShow:[1,`focusOnShow`],motionOptions:[1,`motionOptions`]},outputs:{onShow:`onShow`,onHide:`onHide`},features:[Db([Et,{provide:Nt,useExisting:j},{provide:At$1,useExisting:j}]),GD([Ze]),Th],ngContentSelectors:t,decls:1,vars:1,consts:[[`role`,`dialog`,3,`pBind`,`class`,`style`,`pMotion`,`pMotionName`,`pMotionAppear`,`pMotionOptions`],[`role`,`dialog`,3,`click`,`pMotionOnEnter`,`pMotionOnAfterLeave`,`pBind`,`pMotion`,`pMotionName`,`pMotionAppear`,`pMotionOptions`],[3,`click`,`mousedown`,`pBind`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`]],template:function(f,l){f&1&&(Ow(),fw(0,h,4,16,`div`,0)),f&2&&hw(l.render()?0:-1)},dependencies:[xs,yi,Ze,Su,vu],encapsulation:2})})()};var Ot=class ke{static ɵfac=function(t){return new(t||ke)};static ɵmod=jD({type:ke});static ɵinj=Du({imports:[At,yi,yi]})};var Vt=(i,u,e=0)=>{let t=10**e,r=i*t,a;switch(u){case`floor`:a=Math.floor(r);break;case`ceil`:a=Math.ceil(r);break;default:a=Math.round(r)}return a/t};var ve=(i,u=96,e=`ceil`,t=0)=>{return Vt(i*37.7952755906,e,t)};var z=(i,u=96,e=`ceil`,t=0)=>{return Vt(i*.0264583333,e,t)};var Lt=(()=>{class i{constructor(){this.form=k1(),this.onSubmit=O1()}onSubmitHandler(){this.onSubmit.emit(this.form().getRawValue())}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-dialog-form-create`]],inputs:{form:[1,`form`]},outputs:{onSubmit:`onSubmit`},decls:57,vars:7,consts:[[1,`row`,`row-gap-2`,3,`formGroup`],[1,`col-12`],[1,`form-group`],[`for`,``,1,`fs-3`,`fw-semibold`],[`formControlName`,`name`,`type`,`text`,`pInputText`,``,1,`form-control`],[1,`col-6`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeightCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeight`,`pInputText`,``,3,`precision`]],template:function(t,r){t&1&&(Pi(0,`div`,0)(1,`div`,1)(2,`div`,2)(3,`label`,3),ub(4,`Label Name`),fl$1(),Pi(5,`input`,4),GI(),fl$1()()(),Pi(6,`div`,5)(7,`div`,2)(8,`label`,3),ub(9,`Paper Width`),fl$1(),Pi(10,`p-inputgroup`)(11,`input`,6),GI(),fl$1(),Pi(12,`p-inputgroup-addon`)(13,`span`),ub(14,`cm`),fl$1()()()()(),Pi(15,`div`,5)(16,`div`,2),Oh(17,`label`,3),Pi(18,`p-inputgroup`)(19,`input`,7),GI(),fl$1(),Pi(20,`p-inputgroup-addon`)(21,`span`),ub(22,`px`),fl$1()()()()(),Pi(23,`div`,5)(24,`div`,2)(25,`label`,3),ub(26,`Sticker Width`),fl$1(),Pi(27,`p-inputgroup`)(28,`input`,8),GI(),fl$1(),Pi(29,`p-inputgroup-addon`)(30,`span`),ub(31,`cm`),fl$1()()()()(),Pi(32,`div`,5)(33,`div`,2),Oh(34,`label`,3),Pi(35,`p-inputgroup`)(36,`input`,9),GI(),fl$1(),Pi(37,`p-inputgroup-addon`)(38,`span`),ub(39,`px`),fl$1()()()()(),Pi(40,`div`,5)(41,`div`,2)(42,`label`,3),ub(43,`Sticker Height`),fl$1(),Pi(44,`p-inputgroup`)(45,`input`,10),GI(),fl$1(),Pi(46,`p-inputgroup-addon`)(47,`span`),ub(48,`cm`),fl$1()()()()(),Pi(49,`div`,5)(50,`div`,2),Oh(51,`label`,3),Pi(52,`p-inputgroup`)(53,`input`,11),GI(),fl$1(),Pi(54,`p-inputgroup-addon`)(55,`span`),ub(56,`px`),fl$1()()()()()()),t&2&&(Rh(`formGroup`,r.form()),iI(5),QI(),iI(6),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI())},dependencies:[fh,Fo,oh,sh,vl,Tl$1,$n,Gn,Sn,Ul],encapsulation:2,changeDetection:1})}}return i})();var Ft=(()=>{class i{constructor(){this.form=k1(),this.onSubmit=O1()}onSubmitHandler(){this.onSubmit.emit(this.form().getRawValue())}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-dialog-form-edit`]],inputs:{form:[1,`form`]},outputs:{onSubmit:`onSubmit`},decls:57,vars:7,consts:[[1,`row`,`row-gap-2`,3,`formGroup`],[1,`col-12`],[1,`form-group`],[`for`,``,1,`fs-3`,`fw-semibold`],[`formControlName`,`name`,`type`,`text`,`pInputText`,``,1,`form-control`],[1,`col-6`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeightCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeight`,`pInputText`,``,3,`precision`]],template:function(t,r){t&1&&(Pi(0,`div`,0)(1,`div`,1)(2,`div`,2)(3,`label`,3),ub(4,`Label Name`),fl$1(),Pi(5,`input`,4),GI(),fl$1()()(),Pi(6,`div`,5)(7,`div`,2)(8,`label`,3),ub(9,`Paper Width`),fl$1(),Pi(10,`p-inputgroup`)(11,`input`,6),GI(),fl$1(),Pi(12,`p-inputgroup-addon`)(13,`span`),ub(14,`cm`),fl$1()()()()(),Pi(15,`div`,5)(16,`div`,2),Oh(17,`label`,3),Pi(18,`p-inputgroup`)(19,`input`,7),GI(),fl$1(),Pi(20,`p-inputgroup-addon`)(21,`span`),ub(22,`px`),fl$1()()()()(),Pi(23,`div`,5)(24,`div`,2)(25,`label`,3),ub(26,`Sticker Width`),fl$1(),Pi(27,`p-inputgroup`)(28,`input`,8),GI(),fl$1(),Pi(29,`p-inputgroup-addon`)(30,`span`),ub(31,`cm`),fl$1()()()()(),Pi(32,`div`,5)(33,`div`,2),Oh(34,`label`,3),Pi(35,`p-inputgroup`)(36,`input`,9),GI(),fl$1(),Pi(37,`p-inputgroup-addon`)(38,`span`),ub(39,`px`),fl$1()()()()(),Pi(40,`div`,5)(41,`div`,2)(42,`label`,3),ub(43,`Sticker Height`),fl$1(),Pi(44,`p-inputgroup`)(45,`input`,10),GI(),fl$1(),Pi(46,`p-inputgroup-addon`)(47,`span`),ub(48,`cm`),fl$1()()()()(),Pi(49,`div`,5)(50,`div`,2),Oh(51,`label`,3),Pi(52,`p-inputgroup`)(53,`input`,11),GI(),fl$1(),Pi(54,`p-inputgroup-addon`)(55,`span`),ub(56,`px`),fl$1()()()()()()),t&2&&(Rh(`formGroup`,r.form()),iI(5),QI(),iI(6),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI())},dependencies:[fh,Fo,oh,sh,vl,Tl$1,Sn,$n,Gn,Ul],encapsulation:2,changeDetection:1})}}return i})();var jt=()=>({width:`35rem`});var $t=i=>({"border border-primary":i});var qt=()=>({class:`py-1`});var Zt=i=>({root:i});var zt=(i,u)=>u.ID;function Gt(i,u){if(i&1){let e=Tw();Pi(0,`div`,8)(1,`p-button`,9),Bh(`click`,function(){Gu(e);let r=Aw();return zu(r.openCreate())}),fl$1()()}if(i&2){let e=Aw();iI(),Rh(`disabled`,!e.isUserAdmin)}}function Ut(i,u){if(i&1){let e=Tw();Pi(0,`input`,22),Bh(`change`,function(){Gu(e);let r=Aw(2).$implicit,a=Aw(2);return zu(a.onSelectionChange(r.ID))}),fl$1()}if(i&2){let e=Aw(2).$implicit,t=Aw(2);Rh(`value`,e.ID)(`checked`,t.selectedTemplateId()===e.ID)}}function Kt(i,u){if(i&1&&(Pi(0,`div`,19)(1,`div`,20)(2,`span`),ub(3),fl$1()(),Pi(4,`div`,16),fw(5,Ut,1,2,`input`,21),fl$1()()),i&2){let e=Aw().$implicit,t=Aw(2);iI(3),cg(e.ConfigObject.Name),iI(2),hw(t.selectedTemplateId()===e.ID?5:-1)}}function Jt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.PaperWidthCM),`cm`)}}function Qt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.StickerWidthCM),`cm`)}}function Xt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.StickerHeightCM),`cm`)}}function Yt(i,u){if(i&1){let e=Tw();Pi(0,`div`,23)(1,`p-button`,24),Bh(`onClick`,function(r){Gu(e);let a=Vw(3),h=Aw().$implicit,m=Aw(2);return zu(m.onMenuToggle(r,a,h.ID))}),fl$1(),Oh(2,`p-menu`,25,4),fl$1()}if(i&2){let e=Aw(3);iI(),Rh(`outlined`,!0)(`pt`,bb(5,Zt,wb(4,qt))),iI(),Rh(`model`,e.menuItems())(`popup`,!0)}}function ei(i,u){if(i&1){let e=Tw();Pi(0,`div`,12)(1,`p-card`,13),Bh(`click`,function(){let r=Gu(e).$implicit,a=Aw(2);return zu(a.onSelectionChange(r.ID))}),_h(2,Kt,6,2,`ng-template`,null,3,Pb),Pi(4,`div`,14)(5,`div`,15),ub(6,`Paper Width`),fl$1(),Pi(7,`div`,16)(8,`div`,17),_h(9,Jt,6,3,`ng-container`,18),Pi(10,`span`),ub(11),Ab(12,`number`),fl$1()()()(),Pi(13,`div`,14)(14,`div`,15),ub(15,`Sticker Width`),fl$1(),Pi(16,`div`,16)(17,`div`,17),_h(18,Qt,6,3,`ng-container`,18),Pi(19,`span`),ub(20),Ab(21,`number`),fl$1()()()(),Pi(22,`div`,14)(23,`div`,15),ub(24,`Sticker Height`),fl$1(),Pi(25,`div`,16)(26,`div`,17),_h(27,Xt,6,3,`ng-container`,18),Pi(28,`span`),ub(29),Ab(30,`number`),fl$1()()()(),_h(31,Yt,4,7,`ng-template`,null,2,Pb),fl$1()()}if(i&2){let e=u.$implicit,t=Aw(2);iI(),Rh(`ngClass`,bb(13,$t,t.selectedTemplateId()===e.ID)),iI(8),Rh(`ngIf`,e.ConfigObject.PaperWidthCM),iI(2),ml(``,Ob(12,7,e.ConfigObject.PaperWidth),`px`),iI(7),Rh(`ngIf`,e.ConfigObject.StickerWidthCM),iI(2),ml(``,Ob(21,9,e.ConfigObject.StickerWidth),`px`),iI(7),Rh(`ngIf`,e.ConfigObject.StickerHeightCM),iI(2),ml(``,Ob(30,11,e.ConfigObject.StickerHeight),`px`)}}function ti(i,u){if(i&1&&(Pi(0,`p-card`,10)(1,`div`,11),yw(2,ei,33,15,`div`,12,zt),fl$1()()),i&2){let e=Aw();iI(2),vw(e.profileTemplates())}}function ii(i,u){if(i&1){let e=Tw();Pi(0,`div`,26)(1,`p-button`,27),Bh(`onClick`,function(){Gu(e);let r=Aw();return zu(r.onNextStep())}),fl$1()()}if(i&2){let e=Aw();iI(),Rh(`disabled`,!e.hasSelectedTemplate())}}function oi(i,u){if(i&1){let e=Tw();Pi(0,`app-dialog-form-edit`,28),Bh(`onSubmit`,function(r){Gu(e);let a=Aw();return zu(a.onDialogFormEdit(r))}),fl$1()}if(i&2){let e=Aw();Rh(`form`,e.form)}}function ni(i,u){if(i&1){let e=Tw();Pi(0,`app-dialog-form-create`,28),Bh(`onSubmit`,function(r){Gu(e);let a=Aw();return zu(a.onDialogFormCreate(r))}),fl$1()}if(i&2){let e=Aw();Rh(`form`,e.form)}}function ri(i,u){if(i&1){let e=Tw();Pi(0,`p-button`,29),Bh(`onClick`,function(){Gu(e);let r=Aw();return zu(r.closeDialog())}),fl$1(),Pi(1,`p-button`,30),Bh(`onClick`,function(){Gu(e);let r=Aw();return zu(r.onSubmit())}),fl$1()}}var Wt=(()=>{class i$1{constructor(){this.templateService=E(Rg),this.appStore=E(eu),this.profileTemplates=ti$1(null),this.fb=E(dh),this.router=E(W),this.route=E(Z),this.selectedTemplateId=ti$1(null),this.profileTemplateDefault=ti$1(null),this.dialogVisible=ti$1(!1),this.dialogMode=ti$1(null),this.menuItems=ti$1([]),this.isPatching=ti$1(!1),this.isFirstRun=!0,this.hasSelectedTemplate=Hb(()=>this.selectedTemplateId()!=null)}get isUserAdmin(){return this.appStore.userRole()===`admin`}initDialogState(){this.route.queryParamMap.pipe(ql(e=>{let t=e.get(`dialog`),r=e.get(`id`);if(t===`create`){this.dialogMode.update(a=>`create`),this.dialogVisible.update(a=>!0),this.selectedTemplateId.update(a=>null),this.form.reset();return}if(t===`edit`&&r){this.dialogMode.update(a=>`edit`),this.dialogVisible.update(a=>!0),this.selectedTemplateId.update(a=>r),this.handleTemplateEdit(r);return}this.dialogVisible.update(a=>!1),this.dialogMode.update(a=>null),this.selectedTemplateId.update(a=>null)})).subscribe()}ngOnInit(){this.closeDialog(),this.initForm(),this.loadData(),this.initMenuItems(),this.initDialogState(),this.templateService.getDefaultPaperTemplate().pipe(i(`Default template loaded`),ql(e=>this.profileTemplateDefault.update(t=>e))).subscribe(),this.linkControls(this.form.controls.paperWidth,this.form.controls.paperWidthCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2)),this.linkControls(this.form.controls.stickerWidth,this.form.controls.stickerWidthCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2)),this.linkControls(this.form.controls.stickerHeight,this.form.controls.stickerHeightCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2))}ngAfterViewInit(){let e=localStorage.getItem(Xt$1.SelectedProfileTemplate);if(e)try{let t=JSON.parse(e);t?.ID!=null&&(this.selectedTemplateId.set(t.ID),this.appStore.updateProfileTemplate(t))}catch(t){console.warn(`Failed to parse selected profile template from localStorage`,t),localStorage.removeItem(Xt$1.SelectedProfileTemplate)}}onDialogFormEdit(e){Object.assign(this.form.value,e)}onDialogFormCreate(e){Object.assign(this.form.value,e)}initMenuItems(){this.menuItems.update(e=>[...e,{label:`Edit`,disabled:!this.isUserAdmin,command:t=>{this.openEdit(t.item.id)}},{label:`Copy`,disabled:!this.isUserAdmin,command:t=>{this.onCopyTemplate(t.item.id)}},{label:`Delete`,disabled:!this.isUserAdmin,command:t=>{this.onDeleteTemplate(t.item.id)}}])}handleTemplateEdit(e){this.templateService.getPaperTemplatesById(e).pipe(ql(({ConfigObject:{Name:t,PaperWidth:r,PaperWidthCM:a,StickerWidth:h,StickerWidthCM:m,StickerHeight:f,StickerHeightCM:l}})=>{this.isPatching.update(g=>!0);let M=(g,D)=>g||(D?z(D,96,`round`,2):g);this.form.patchValue({name:t,paperWidth:r,paperWidthCM:M(a,r),stickerWidth:h,stickerWidthCM:M(m,h),stickerHeight:f,stickerHeightCM:M(l,f)}),this.isPatching.update(g=>!1)})).subscribe()}linkControls(e,t,r,a){let h=(m,f=2)=>m.toFixed(f);e.valueChanges.pipe(sm(),$e(()=>!this.isPatching()),ql(m=>{if(m!=null){let f=r(m);t.setValue(h(f),{emitEvent:!1})}})).subscribe(),t.valueChanges.pipe(sm(),$e(()=>!this.isPatching()),ql(m=>{if(m!=null){let f=a(m);e.setValue(h(f),{emitEvent:!1})}})).subscribe()}loadData(){let e=`https://${localStorage.getItem(Xt$1.Host)}/`;pm({templates:this.templateService.getBarcodeTemplate().pipe(fs(t=>(console.error(`Failed to load templates:`,t),ds([])))),outlets:this.templateService.getListOutlet(e).pipe(fs(t=>(console.error(`Failed to load outlets:`,t),ds([])))),taxes:this.templateService.getListTax(e).pipe(fs(t=>(console.error(`Failed to load taxes:`,t),ds([]))))}).pipe(ql(({templates:t,outlets:r,taxes:a})=>{this.appStore.updateOutlets(r),this.appStore.updateTaxes(a),this.profileTemplates.set(t)}),i(`All template data loaded (even if some failed)`)).subscribe()}onMenuToggle(e,t,r){e.stopPropagation(),t.toggle(e),this.menuItems().forEach(a=>a.id=r)}initForm(){this.form=this.fb.group({paperWidthCM:void 0,name:this.fb.control(null),paperWidth:this.fb.control(null),stickerWidth:this.fb.control(null),stickerWidthCM:this.fb.control(null),stickerHeight:this.fb.control(null),stickerHeightCM:this.fb.control(null)})}onSelectionChange(e){return M(this,null,function*(){this.selectedTemplateId.update(t=>e)})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{name:e,paperWidth:t,paperWidthCM:r,stickerWidth:a,stickerWidthCM:h,stickerHeight:m,stickerHeightCM:f}=this.form.value;if(this.route.snapshot.queryParamMap.has(`id`)){let l=this.profileTemplates().findIndex(g=>g.ID===this.route.snapshot.queryParamMap.get(`id`));if(l===-1)return;let M$1=G(F({},this.profileTemplates()[l]),{ConfigObject:G(F({},this.profileTemplates()[l].ConfigObject),{Name:e,PaperWidth:+t,PaperWidthCM:+r,StickerWidth:+a,StickerWidthCM:+h,StickerHeight:+m,StickerHeightCM:+f})});this.templateService.updatePaperTemplate(this.route.snapshot.queryParamMap.get(`id`),M$1).pipe(ql(()=>M(this,null,function*(){this.loadData(),this.closeDialog()}))).subscribe()}else{let l={ConfigObject:G(F({},this.profileTemplateDefault()),{Name:e,PaperWidth:+t,PaperWidthCM:+r,StickerWidth:+a,StickerWidthCM:+h,StickerHeight:+m,StickerHeightCM:+f})};this.templateService.savePaperTemplate(l).pipe(i(`Template saved`),ql(()=>M(this,null,function*(){this.loadData(),this.closeDialog()}))).subscribe()}}openCreate(){this.router.navigate([],{queryParams:{dialog:`create`},queryParamsHandling:`merge`})}openEdit(e){this.router.navigate([],{queryParams:{dialog:`edit`,id:e},queryParamsHandling:`merge`})}closeDialog(){this.router.navigate([],{queryParams:{},replaceUrl:!0})}onDeleteTemplate(e){this.templateService.deletePaperTemplate(e).pipe(ql(()=>{this.loadData()})).subscribe(),setTimeout(()=>{document.querySelector(`.p-menu-overlay`)?.remove()},100)}onCopyTemplate(e){this.templateService.copyPaperTemplate(e).pipe(ql(()=>{this.loadData()})).subscribe(),setTimeout(()=>{document.querySelector(`.p-menu-overlay`)?.remove()},100)}onPreviousStep(){this.appStore.updateCurrentStep(this.appStore.currentStep()-1)}onNextStep(){this.appStore.updateCurrentStep(this.appStore.currentStep()+1);let e=this.profileTemplates().find(t=>t.ID===this.selectedTemplateId());this.appStore.updateProfileTemplate(e),localStorage.setItem(Xt$1.SelectedProfileTemplate,JSON.stringify(e))}static{this.ɵfac=function(t){return new(t||i$1)}}static{this.ɵcmp=PD({type:i$1,selectors:[[`app-choose-profile-template`]],decls:12,vars:9,consts:[[`actionButton`,``],[`content`,``],[`footer`,``],[`title`,``],[`menu`,``],[`pageTitle`,`Choose Paper Template`],[`appendTo`,`body`,3,`visibleChange`,`closable`,`header`,`modal`,`visible`],[3,`form`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Add`,3,`click`,`disabled`],[1,`p-2`,`m-3`],[1,`row`,`row-gap-4`],[1,`col-12`,`col-md-6`,`col-lg-4`,`col-xl-3`],[3,`click`,`ngClass`],[1,`row`,`fs-3`],[1,`col`],[1,`col`,`d-flex`,`justify-content-end`],[1,`d-flex`,`gap-2`],[4,`ngIf`],[1,`row`],[1,`col-10`],[`type`,`radio`,`name`,`selectedCategory`,1,`p-radiobutton-box`,3,`value`,`checked`],[`type`,`radio`,`name`,`selectedCategory`,1,`p-radiobutton-box`,3,`change`,`value`,`checked`],[1,`d-flex`,`justify-content-end`,`border-top`,`py-2`],[`icon`,`fa-solid fa-ellipsis`,`severity`,`secondary`,3,`onClick`,`outlined`,`pt`],[`appendTo`,`body`,3,`model`,`popup`],[1,`d-flex`,`justify-content-end`,`gap-2`,`py-2`,`px-3`],[`label`,`Next`,`severity`,`info`,3,`onClick`,`disabled`],[3,`onSubmit`,`form`],[`label`,`Cancel`,`severity`,`secondary`,3,`onClick`],[`label`,`Save`,`severity`,`secondary`,3,`onClick`]],template:function(t,r){if(t&1){let a=Tw();Pi(0,`app-main-panel`,5),_h(1,Gt,2,1,`ng-template`,null,0,Pb)(3,ti,4,0,`ng-template`,null,1,Pb)(5,ii,2,1,`ng-template`,null,2,Pb),fl$1(),Pi(7,`p-dialog`,6),fg(`visibleChange`,function(m){return Gu(a),hb(r.dialogVisible,m)||(r.dialogVisible=m),zu(m)}),fw(8,oi,1,1,`app-dialog-form-edit`,7),fw(9,ni,1,1,`app-dialog-form-create`,7),_h(10,ri,2,0,`ng-template`,null,2,Pb),fl$1()}t&2&&(iI(7),Jw(wb(8,jt)),Rh(`closable`,!1)(`header`,r.dialogMode()==`create`?`Create New Label`:`Edit New Label`)(`modal`,!0),dg(`visible`,r.dialogVisible),iI(),hw(r.dialogMode()==`edit`?8:-1),iI(),hw(r.dialogMode()==`create`?9:-1))},dependencies:[gr,fh,D,Xi,Fs,Ns,Hl,Ee,Ot,An,In,hh,Lt,Ft,Us],styles:[`[_nghost-%COMP%]{display:block;height:100%}input[type=radio][_ngcontent-%COMP%]{appearance:none;width:18px;height:18px;border:2px solid #ced4da;border-radius:50%;outline:none;cursor:pointer;position:relative}input[type=radio][_ngcontent-%COMP%]:checked{border-color:#3b82f6}input[type=radio][_ngcontent-%COMP%]:checked:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;background:#3b82f6;border-radius:50%;transform:translate(-50%,-50%)}`]})}}return i$1})();function ai(i,u){i&1&&Oh(0,`app-choose-profile-template`)}function li(i,u){i&1&&Oh(0,`choose-product`)}function pi(i,u){if(i&1&&Oh(0,`app-barcode-preview`,1),i&2){let e=u.$implicit;Rh(`cartItems`,e)}}function si(i,u){i&1&&(Pi(0,`app-customize-label`),_h(1,pi,1,1,`ng-template`,null,0,Pb),fl$1())}function ci(i,u){i&1&&Oh(0,`app-print-preview`)}var Bo=(()=>{class i{constructor(){this.storeService=E(el),this.appStore=E(eu)}get cartItems(){return this.appStore.flattenedCartUnits()}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-barcode-wrapper`]],decls:4,vars:1,consts:[[`content`,``],[`previewMode`,`single`,3,`cartItems`]],template:function(t,r){if(t&1&&fw(0,ai,1,0,`app-choose-profile-template`)(1,li,1,0,`choose-product`)(2,si,3,0,`app-customize-label`)(3,ci,1,0,`app-print-preview`),t&2){let a;hw((a=r.appStore.currentStep())===1?0:a===2?1:a===3?2:a===4?3:-1)}},dependencies:[Wt,vz,dj,rd,bV],encapsulation:2,changeDetection:1})}}return i})();export{Bo as BarcodeWrapperComponent};
|
|
63
|
+
`;var Ht={root:({instance:i})=>F({position:`absolute`},i.style())};var Bt={root:`p-popover p-component`,content:`p-popover-content`};var It=class Z extends fe{name=`popover`;style=Et;classes=Bt;inlineStyles=Ht;static ɵfac=(()=>{let e;return function(n){return(e||(e=ov(Z)))(n||Z)}})();static ɵprov=ue({token:Z,factory:Z.ɵfac})};var Nt=new x(`POPOVER_INSTANCE`);var At=class q extends ct{componentName=`Popover`;$pcPopover=E(Nt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});ariaLabel=k1();ariaLabelledBy=k1();dismissable=k1(!0,{transform:U1});style=k1();styleClass=k1();appendTo=k1(`body`);autoZIndex=k1(!0,{transform:U1});ariaCloseLabel=k1();baseZIndex=k1(0,{transform:W1});focusOnShow=k1(!0,{transform:U1});motionOptions=k1(void 0);computedMotionOptions=Hb(()=>F(F({},this.ptm(`motion`)),this.motionOptions()));onShow=O1();onHide=O1();$appendTo=Hb(()=>this.appendTo()||this.config.overlayAppendTo());container;overlayVisible=ti$1(!1);render=ti$1(!1);selfClick=!1;documentClickListener;target=null;willHide;scrollHandler;documentResizeListener;contentTemplate=F1(`content`,{descendants:!1});onCloseClickCallback=this.onCloseClick.bind(this);contentTemplateContext=Hb(()=>({closeCallback:this.onCloseClickCallback}));destroyCallback;overlayEventListener;overlaySubscription;_componentStyle=E(It);overlayService=E(Wl);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm(`host`))}bindDocumentClickListener(){if(sc(this.platformId)&&!this.documentClickListener){let e=Tl()?`touchstart`:`click`,t=this.el?this.el.nativeElement.ownerDocument:this.document;this.documentClickListener=this.renderer.listen(t,e,n=>{if(!this.dismissable())return;let a=gd(n,this.container),h=gd(n,this.target);!this.container?.contains(a)&&this.target!==h&&!this.target?.contains(h)&&!this.selfClick&&this.hide(),this.selfClick=!1})}}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,t){this.overlayVisible()?(this.hasTargetChanged(e,t)&&(this.destroyCallback=()=>{this.show(null,t||e.currentTarget||e.target)}),this.hide()):this.show(e,t)}show(e,t){t&&e&&e.stopPropagation(),this.container&&!this.overlayVisible()&&(this.container=null),this.target=t||e.currentTarget||e.target,this.overlayVisible.set(!0),this.render.set(!0)}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(e){let t=e.target;this.selfClick=e.offsetX<t.clientWidth&&e.offsetY<t.clientHeight}hasTargetChanged(e,t){return this.target!=null&&this.target!==(t||e.currentTarget||e.target)}appendOverlay(){this.$appendTo()&&this.$appendTo()!==`self`&&(this.$appendTo()===`body`?fl(this.$overlayParent(this.document.body,this.container),this.container):fl(this.$overlayParent(this.$appendTo(),this.container),this.container))}restoreAppend(){this.container&&this.$appendTo()&&this.$appendTo()!==`self`&&fl(this.el.nativeElement,this.container)}setZIndex(){this.autoZIndex()&&Ac.set(`overlay`,this.container,this.baseZIndex()+this.config.zIndex.overlay)}align(){if(this.target&&this.container){dl(this.container,this.target,!1);let e=Ji(this.container),t=Ji(this.target),n=e.left,a=e.top,h=t.left,d=t.top,f=this.document.defaultView?.getComputedStyle(this.container).getPropertyValue(`border-radius`),l=0;n<h&&(l=h-n-parseFloat(f)*2),this.container.style.setProperty(this.$styleScope.resolvers.$dt(`popover.arrow.left`).name,`${l}px`),a<d&&(this.container.setAttribute(`data-p-popover-flipped`,`true`),this.$unstyled()||ze(this.container,this.pcn(`p-popover-flipped`)))}}onAnimationStart(e){this.container=e.element,this.$markInstance(this.container),this.appendOverlay(),this.align(),this.setZIndex(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindScrollListener(),this.focusOnShow()&&this.focus(),this.overlayEventListener=t=>{this.container&&this.container.contains(t.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)}onAnimationEnd(){this.overlayVisible()||(this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.autoZIndex()&&Ac.clear(this.container),this.onContainerDestroy(),this.onHide.emit({}),this.render.set(!1),this.container=null)}focus(){let e=gl(this.container,`[autofocus]`);e&&setTimeout(()=>e.focus(),5)}hide(){this.overlayVisible.set(!1)}onCloseClick(e){this.hide(),e.preventDefault()}onEscapeKeydown(e){this.hide()}onWindowResize(){this.overlayVisible()&&!Ol()&&this.hide()}bindDocumentResizeListener(){if(sc(this.platformId)&&!this.documentResizeListener){let e=this.document.defaultView;this.documentResizeListener=this.renderer.listen(e,`resize`,this.onWindowResize.bind(this))}}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindScrollListener(){sc(this.platformId)&&(this.scrollHandler||(this.scrollHandler=new hd(this.target,()=>{this.overlayVisible()&&this.hide()})),this.scrollHandler.bindScrollListener())}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}onDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex()&&Ac.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}static ɵfac=(()=>{let e;return function(n){return(e||(e=ov(q)))(n||q)}})();static ɵcmp=(function(){let e=[`content`],t=[`*`];function n(d,f){d&1&&Ph(0)}function a(d,f){if(d&1&&_h(0,n,1,0,`ng-container`,3),d&2){let l=Aw(2);Rh(`ngTemplateOutlet`,l.contentTemplate())(`ngTemplateOutletContext`,l.contentTemplateContext())}}function h(d,f){if(d&1){let l=Tw();Pi(0,`div`,1),Bh(`click`,function(g){Gu(l);let E=Aw();return zu(E.onOverlayClick(g))})(`pMotionOnEnter`,function(g){Gu(l);let E=Aw();return zu(E.onAnimationStart(g))})(`pMotionOnAfterLeave`,function(){Gu(l);let g=Aw();return zu(g.onAnimationEnd())}),Pi(1,`div`,2),Bh(`click`,function(g){Gu(l);let E=Aw();return zu(E.onContentClick(g))})(`mousedown`,function(g){Gu(l);let E=Aw();return zu(E.onContentClick(g))}),kw(2),fw(3,a,1,2,`ng-container`),fl$1()()}if(d&2){let l=Aw();Jw(l.sx(`root`)),eb(l.cn(l.cx(`root`),l.styleClass())),Rh(`pBind`,l.ptm(`root`))(`pMotion`,l.overlayVisible())(`pMotionName`,l.pcn(`p-anchored-overlay`))(`pMotionAppear`,!0)(`pMotionOptions`,l.computedMotionOptions()),Ah(`aria-modal`,l.overlayVisible())(`aria-label`,l.ariaLabel())(`aria-labelledBy`,l.ariaLabelledBy()),iI(),eb(l.cx(`content`)),Rh(`pBind`,l.ptm(`content`)),iI(2),hw(l.contentTemplate()?3:-1)}}return PD({type:q,selectors:[[`p-popover`]],contentQueries:function(f,l,M){f&1&&Gh(M,l.contentTemplate,e,4),f&2&&jw()},hostBindings:function(f,l){f&1&&Bh(`keydown.escape`,function(g){return l.onEscapeKeydown(g)},oE)},inputs:{ariaLabel:[1,`ariaLabel`],ariaLabelledBy:[1,`ariaLabelledBy`],dismissable:[1,`dismissable`],style:[1,`style`],styleClass:[1,`styleClass`],appendTo:[1,`appendTo`],autoZIndex:[1,`autoZIndex`],ariaCloseLabel:[1,`ariaCloseLabel`],baseZIndex:[1,`baseZIndex`],focusOnShow:[1,`focusOnShow`],motionOptions:[1,`motionOptions`]},outputs:{onShow:`onShow`,onHide:`onHide`},features:[Db([It,{provide:Nt,useExisting:q},{provide:At$1,useExisting:q}]),GD([Ze]),Th],ngContentSelectors:t,decls:1,vars:1,consts:[[`role`,`dialog`,3,`pBind`,`class`,`style`,`pMotion`,`pMotionName`,`pMotionAppear`,`pMotionOptions`],[`role`,`dialog`,3,`click`,`pMotionOnEnter`,`pMotionOnAfterLeave`,`pBind`,`pMotion`,`pMotionName`,`pMotionAppear`,`pMotionOptions`],[3,`click`,`mousedown`,`pBind`],[4,`ngTemplateOutlet`,`ngTemplateOutletContext`]],template:function(f,l){f&1&&(Ow(),fw(0,h,4,16,`div`,0)),f&2&&hw(l.render()?0:-1)},dependencies:[xs,yi,Ze,Su,vu],encapsulation:2})})()};var Ot=class De{static ɵfac=function(t){return new(t||De)};static ɵmod=jD({type:De});static ɵinj=Du({imports:[At,yi,yi]})};var Vt=(i,u,e=0)=>{let t=10**e,n=i*t,a;switch(u){case`floor`:a=Math.floor(n);break;case`ceil`:a=Math.ceil(n);break;default:a=Math.round(n)}return a/t};var ve=(i,u=96,e=`ceil`,t=0)=>{return Vt(i*37.7952755906,e,t)};var z=(i,u=96,e=`ceil`,t=0)=>{return Vt(i*.0264583333,e,t)};var Lt=(()=>{class i{constructor(){this.form=k1(),this.onSubmit=O1()}onSubmitHandler(){this.onSubmit.emit(this.form().getRawValue())}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-dialog-form-create`]],inputs:{form:[1,`form`]},outputs:{onSubmit:`onSubmit`},decls:57,vars:7,consts:[[1,`row`,`row-gap-2`,3,`formGroup`],[1,`col-12`],[1,`form-group`],[`for`,``,1,`fs-3`,`fw-semibold`],[`formControlName`,`name`,`type`,`text`,`pInputText`,``,1,`form-control`],[1,`col-6`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeightCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeight`,`pInputText`,``,3,`precision`]],template:function(t,n){t&1&&(Pi(0,`div`,0)(1,`div`,1)(2,`div`,2)(3,`label`,3),ub(4,`Label Name`),fl$1(),Pi(5,`input`,4),GI(),fl$1()()(),Pi(6,`div`,5)(7,`div`,2)(8,`label`,3),ub(9,`Paper Width`),fl$1(),Pi(10,`p-inputgroup`)(11,`input`,6),GI(),fl$1(),Pi(12,`p-inputgroup-addon`)(13,`span`),ub(14,`cm`),fl$1()()()()(),Pi(15,`div`,5)(16,`div`,2),Oh(17,`label`,3),Pi(18,`p-inputgroup`)(19,`input`,7),GI(),fl$1(),Pi(20,`p-inputgroup-addon`)(21,`span`),ub(22,`px`),fl$1()()()()(),Pi(23,`div`,5)(24,`div`,2)(25,`label`,3),ub(26,`Sticker Width`),fl$1(),Pi(27,`p-inputgroup`)(28,`input`,8),GI(),fl$1(),Pi(29,`p-inputgroup-addon`)(30,`span`),ub(31,`cm`),fl$1()()()()(),Pi(32,`div`,5)(33,`div`,2),Oh(34,`label`,3),Pi(35,`p-inputgroup`)(36,`input`,9),GI(),fl$1(),Pi(37,`p-inputgroup-addon`)(38,`span`),ub(39,`px`),fl$1()()()()(),Pi(40,`div`,5)(41,`div`,2)(42,`label`,3),ub(43,`Sticker Height`),fl$1(),Pi(44,`p-inputgroup`)(45,`input`,10),GI(),fl$1(),Pi(46,`p-inputgroup-addon`)(47,`span`),ub(48,`cm`),fl$1()()()()(),Pi(49,`div`,5)(50,`div`,2),Oh(51,`label`,3),Pi(52,`p-inputgroup`)(53,`input`,11),GI(),fl$1(),Pi(54,`p-inputgroup-addon`)(55,`span`),ub(56,`px`),fl$1()()()()()()),t&2&&(Rh(`formGroup`,n.form()),iI(5),QI(),iI(6),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI())},dependencies:[fh,Fo,oh,sh,vl,Tl$1,$n,Gn,Sn,Ul],encapsulation:2,changeDetection:1})}}return i})();var Wt=(()=>{class i{constructor(){this.form=k1(),this.onSubmit=O1()}onSubmitHandler(){this.onSubmit.emit(this.form().getRawValue())}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-dialog-form-edit`]],inputs:{form:[1,`form`]},outputs:{onSubmit:`onSubmit`},decls:57,vars:7,consts:[[1,`row`,`row-gap-2`,3,`formGroup`],[1,`col-12`],[1,`form-group`],[`for`,``,1,`fs-3`,`fw-semibold`],[`formControlName`,`name`,`type`,`text`,`pInputText`,``,1,`form-control`],[1,`col-6`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`paperWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidthCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerWidth`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeightCM`,`pInputText`,``,3,`precision`],[`appMaskNumber`,``,`postfix`,``,`formControlName`,`stickerHeight`,`pInputText`,``,3,`precision`]],template:function(t,n){t&1&&(Pi(0,`div`,0)(1,`div`,1)(2,`div`,2)(3,`label`,3),ub(4,`Label Name`),fl$1(),Pi(5,`input`,4),GI(),fl$1()()(),Pi(6,`div`,5)(7,`div`,2)(8,`label`,3),ub(9,`Paper Width`),fl$1(),Pi(10,`p-inputgroup`)(11,`input`,6),GI(),fl$1(),Pi(12,`p-inputgroup-addon`)(13,`span`),ub(14,`cm`),fl$1()()()()(),Pi(15,`div`,5)(16,`div`,2),Oh(17,`label`,3),Pi(18,`p-inputgroup`)(19,`input`,7),GI(),fl$1(),Pi(20,`p-inputgroup-addon`)(21,`span`),ub(22,`px`),fl$1()()()()(),Pi(23,`div`,5)(24,`div`,2)(25,`label`,3),ub(26,`Sticker Width`),fl$1(),Pi(27,`p-inputgroup`)(28,`input`,8),GI(),fl$1(),Pi(29,`p-inputgroup-addon`)(30,`span`),ub(31,`cm`),fl$1()()()()(),Pi(32,`div`,5)(33,`div`,2),Oh(34,`label`,3),Pi(35,`p-inputgroup`)(36,`input`,9),GI(),fl$1(),Pi(37,`p-inputgroup-addon`)(38,`span`),ub(39,`px`),fl$1()()()()(),Pi(40,`div`,5)(41,`div`,2)(42,`label`,3),ub(43,`Sticker Height`),fl$1(),Pi(44,`p-inputgroup`)(45,`input`,10),GI(),fl$1(),Pi(46,`p-inputgroup-addon`)(47,`span`),ub(48,`cm`),fl$1()()()()(),Pi(49,`div`,5)(50,`div`,2),Oh(51,`label`,3),Pi(52,`p-inputgroup`)(53,`input`,11),GI(),fl$1(),Pi(54,`p-inputgroup-addon`)(55,`span`),ub(56,`px`),fl$1()()()()()()),t&2&&(Rh(`formGroup`,n.form()),iI(5),QI(),iI(6),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI(),iI(9),Rh(`precision`,2),QI(),iI(8),Rh(`precision`,2),QI())},dependencies:[fh,Fo,oh,sh,vl,Tl$1,Sn,$n,Gn,Ul],encapsulation:2,changeDetection:1})}}return i})();var qt=()=>({width:`35rem`});var jt=i=>({"border border-primary":i});var $t=()=>({class:`py-1`});var Zt=i=>({root:i});var zt=(i,u)=>u.ID;function Gt(i,u){if(i&1){let e=Tw();Pi(0,`div`,8)(1,`p-button`,9),Bh(`click`,function(){Gu(e);let n=Aw();return zu(n.openCreate())}),fl$1()()}if(i&2){let e=Aw();iI(),Rh(`disabled`,!e.isUserAdmin)}}function Ut(i,u){if(i&1){let e=Tw();Pi(0,`input`,23),Bh(`change`,function(){Gu(e);let n=Aw(2).$implicit,a=Aw(2);return zu(a.onSelectionChange(n.ID))}),fl$1()}if(i&2){let e=Aw(2).$implicit,t=Aw(2);Rh(`value`,e.ID)(`checked`,t.selectedTemplateId()===e.ID)}}function Kt(i,u){if(i&1&&(Pi(0,`div`,20)(1,`div`,21)(2,`span`),ub(3),fl$1()(),Pi(4,`div`,17),fw(5,Ut,1,2,`input`,22),fl$1()()),i&2){let e=Aw().$implicit,t=Aw(2);iI(3),cg(e.ConfigObject.Name),iI(2),hw(t.selectedTemplateId()===e.ID?5:-1)}}function Jt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.PaperWidthCM),`cm`)}}function Qt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.StickerWidthCM),`cm`)}}function Xt(i,u){if(i&1&&(gl$1(0),Pi(1,`span`),ub(2),Ab(3,`number`),fl$1(),Pi(4,`span`),ub(5,`/`),fl$1(),Xi$1()),i&2){let e=Aw().$implicit;iI(2),ml(``,Ob(3,1,e.ConfigObject.StickerHeightCM),`cm`)}}function Yt(i,u){if(i&1){let e=Tw();Pi(0,`div`,24)(1,`p-button`,25),Bh(`onClick`,function(n){Gu(e);let a=Vw(3),h=Aw().$implicit,d=Aw(2);return zu(d.onMenuToggle(n,a,h.ID))}),fl$1(),Oh(2,`p-menu`,26,4),fl$1()}if(i&2){let e=Aw(3);iI(),Rh(`outlined`,!0)(`pt`,bb(5,Zt,wb(4,$t))),iI(),Rh(`model`,e.menuItems())(`popup`,!0)}}function ei(i,u){if(i&1){let e=Tw();Pi(0,`div`,12)(1,`p-card`,14),Bh(`click`,function(){let n=Gu(e).$implicit,a=Aw(2);return zu(a.onSelectionChange(n.ID))}),_h(2,Kt,6,2,`ng-template`,null,3,Pb),Pi(4,`div`,15)(5,`div`,16),ub(6,`Paper Width`),fl$1(),Pi(7,`div`,17)(8,`div`,18),_h(9,Jt,6,3,`ng-container`,19),Pi(10,`span`),ub(11),Ab(12,`number`),fl$1()()()(),Pi(13,`div`,15)(14,`div`,16),ub(15,`Sticker Width`),fl$1(),Pi(16,`div`,17)(17,`div`,18),_h(18,Qt,6,3,`ng-container`,19),Pi(19,`span`),ub(20),Ab(21,`number`),fl$1()()()(),Pi(22,`div`,15)(23,`div`,16),ub(24,`Sticker Height`),fl$1(),Pi(25,`div`,17)(26,`div`,18),_h(27,Xt,6,3,`ng-container`,19),Pi(28,`span`),ub(29),Ab(30,`number`),fl$1()()()(),_h(31,Yt,4,7,`ng-template`,null,2,Pb),fl$1()()}if(i&2){let e=u.$implicit,t=Aw(2);iI(),Rh(`ngClass`,bb(13,jt,t.selectedTemplateId()===e.ID)),iI(8),Rh(`ngIf`,e.ConfigObject.PaperWidthCM),iI(2),ml(``,Ob(12,7,e.ConfigObject.PaperWidth),`px`),iI(7),Rh(`ngIf`,e.ConfigObject.StickerWidthCM),iI(2),ml(``,Ob(21,9,e.ConfigObject.StickerWidth),`px`),iI(7),Rh(`ngIf`,e.ConfigObject.StickerHeightCM),iI(2),ml(``,Ob(30,11,e.ConfigObject.StickerHeight),`px`)}}function ti(i,u){i&1&&(Pi(0,`div`,13),ub(1,`No template found`),fl$1())}function ii(i,u){if(i&1&&(Pi(0,`p-card`,10)(1,`div`,11),yw(2,ei,33,15,`div`,12,zt,!1,ti,2,0,`div`,13),fl$1()()),i&2){let e=Aw();iI(2),vw(e.filteredTemplates())}}function oi(i,u){if(i&1){let e=Tw();Pi(0,`div`,27)(1,`p-button`,28),Bh(`onClick`,function(){Gu(e);let n=Aw();return zu(n.onNextStep())}),fl$1()()}if(i&2){let e=Aw();iI(),Rh(`disabled`,!e.hasSelectedTemplate())}}function ni(i,u){if(i&1){let e=Tw();Pi(0,`app-dialog-form-edit`,29),Bh(`onSubmit`,function(n){Gu(e);let a=Aw();return zu(a.onDialogFormEdit(n))}),fl$1()}if(i&2){let e=Aw();Rh(`form`,e.form)}}function ri(i,u){if(i&1){let e=Tw();Pi(0,`app-dialog-form-create`,29),Bh(`onSubmit`,function(n){Gu(e);let a=Aw();return zu(a.onDialogFormCreate(n))}),fl$1()}if(i&2){let e=Aw();Rh(`form`,e.form)}}function ai(i,u){if(i&1){let e=Tw();Pi(0,`p-button`,30),Bh(`onClick`,function(){Gu(e);let n=Aw();return zu(n.closeDialog())}),fl$1(),Pi(1,`p-button`,31),Bh(`onClick`,function(){Gu(e);let n=Aw();return zu(n.onSubmit())}),fl$1()}}var Ft=(()=>{class i$1{constructor(){this.templateService=E(Rg),this.appStore=E(eu),this.profileTemplates=ti$1(null),this.fb=E(dh),this.router=E(W),this.route=E(Z),this.selectedTemplateId=ti$1(null),this.profileTemplateDefault=ti$1(null),this.dialogVisible=ti$1(!1),this.dialogMode=ti$1(null),this.menuItems=ti$1([]),this.isPatching=ti$1(!1),this.isFirstRun=!0,this.querySearch=ti$1(``),this.hasSelectedTemplate=Hb(()=>this.selectedTemplateId()!=null),this.filteredTemplates=Hb(()=>{let e=this.querySearch().trim().toLowerCase(),t=this.profileTemplates()??[];return e?t.filter(n=>n.ConfigObject.Name?.toLowerCase().includes(e)):t})}get isUserAdmin(){return this.appStore.userRole()===`admin`}initDialogState(){this.route.queryParamMap.pipe(ql(e=>{let t=e.get(`dialog`),n=e.get(`id`);if(t===`create`){this.dialogMode.update(a=>`create`),this.dialogVisible.update(a=>!0),this.selectedTemplateId.update(a=>null),this.form.reset();return}if(t===`edit`&&n){this.dialogMode.update(a=>`edit`),this.dialogVisible.update(a=>!0),this.selectedTemplateId.update(a=>n),this.handleTemplateEdit(n);return}this.dialogVisible.update(a=>!1),this.dialogMode.update(a=>null),this.selectedTemplateId.update(a=>null)})).subscribe()}ngOnInit(){this.closeDialog(),this.initForm(),this.loadData(),this.initMenuItems(),this.initDialogState(),this.templateService.getDefaultPaperTemplate().pipe(i(`Default template loaded`),ql(e=>this.profileTemplateDefault.update(t=>e))).subscribe(),this.linkControls(this.form.controls.paperWidth,this.form.controls.paperWidthCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2)),this.linkControls(this.form.controls.stickerWidth,this.form.controls.stickerWidthCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2)),this.linkControls(this.form.controls.stickerHeight,this.form.controls.stickerHeightCM,e=>z(e,96,`round`,2),e=>ve(e,96,`round`,2))}ngAfterViewInit(){let e=localStorage.getItem(Xt$1.SelectedProfileTemplate);if(e)try{let t=JSON.parse(e);t?.ID!=null&&(this.selectedTemplateId.set(t.ID),this.appStore.updateProfileTemplate(t))}catch(t){console.warn(`Failed to parse selected profile template from localStorage`,t),localStorage.removeItem(Xt$1.SelectedProfileTemplate)}}onDialogFormEdit(e){Object.assign(this.form.value,e)}onDialogFormCreate(e){Object.assign(this.form.value,e)}initMenuItems(){this.menuItems.update(e=>[...e,{label:`Edit`,disabled:!this.isUserAdmin,command:t=>{this.openEdit(t.item.id)}},{label:`Copy`,disabled:!this.isUserAdmin,command:t=>{this.onCopyTemplate(t.item.id)}},{label:`Delete`,disabled:!this.isUserAdmin,command:t=>{this.onDeleteTemplate(t.item.id)}}])}handleTemplateEdit(e){this.templateService.getPaperTemplatesById(e).pipe(ql(({ConfigObject:{Name:t,PaperWidth:n,PaperWidthCM:a,StickerWidth:h,StickerWidthCM:d,StickerHeight:f,StickerHeightCM:l}})=>{this.isPatching.update(g=>!0);let M=(g,E)=>g||(E?z(E,96,`round`,2):g);this.form.patchValue({name:t,paperWidth:n,paperWidthCM:M(a,n),stickerWidth:h,stickerWidthCM:M(d,h),stickerHeight:f,stickerHeightCM:M(l,f)}),this.isPatching.update(g=>!1)})).subscribe()}linkControls(e,t,n,a){let h=(d,f=2)=>d.toFixed(f);e.valueChanges.pipe(sm(),$e(()=>!this.isPatching()),ql(d=>{if(d!=null){let f=n(d);t.setValue(h(f),{emitEvent:!1})}})).subscribe(),t.valueChanges.pipe(sm(),$e(()=>!this.isPatching()),ql(d=>{if(d!=null){let f=a(d);e.setValue(h(f),{emitEvent:!1})}})).subscribe()}loadData(){let e=`https://${localStorage.getItem(Xt$1.Host)}/`;pm({templates:this.templateService.getBarcodeTemplate().pipe(fs(t=>(console.error(`Failed to load templates:`,t),ds([])))),outlets:this.templateService.getListOutlet(e).pipe(fs(t=>(console.error(`Failed to load outlets:`,t),ds([])))),taxes:this.templateService.getListTax(e).pipe(fs(t=>(console.error(`Failed to load taxes:`,t),ds([]))))}).pipe(ql(({templates:t,outlets:n,taxes:a})=>{this.appStore.updateOutlets(n),this.appStore.updateTaxes(a),this.profileTemplates.set(t)}),i(`All template data loaded (even if some failed)`)).subscribe()}onMenuToggle(e,t,n){e.stopPropagation(),t.toggle(e),this.menuItems().forEach(a=>a.id=n)}initForm(){this.form=this.fb.group({paperWidthCM:void 0,name:this.fb.control(null),paperWidth:this.fb.control(null),stickerWidth:this.fb.control(null),stickerWidthCM:this.fb.control(null),stickerHeight:this.fb.control(null),stickerHeightCM:this.fb.control(null)})}onSelectionChange(e){return M(this,null,function*(){this.selectedTemplateId.update(t=>e)})}onSubmit(){if(this.form.invalid){this.form.markAllAsTouched();return}let{name:e,paperWidth:t,paperWidthCM:n,stickerWidth:a,stickerWidthCM:h,stickerHeight:d,stickerHeightCM:f}=this.form.value;if(this.route.snapshot.queryParamMap.has(`id`)){let l=this.profileTemplates().findIndex(g=>g.ID===this.route.snapshot.queryParamMap.get(`id`));if(l===-1)return;let M$1=G(F({},this.profileTemplates()[l]),{ConfigObject:G(F({},this.profileTemplates()[l].ConfigObject),{Name:e,PaperWidth:+t,PaperWidthCM:+n,StickerWidth:+a,StickerWidthCM:+h,StickerHeight:+d,StickerHeightCM:+f})});this.templateService.updatePaperTemplate(this.route.snapshot.queryParamMap.get(`id`),M$1).pipe(ql(()=>M(this,null,function*(){this.loadData(),this.closeDialog()}))).subscribe()}else{let l={ConfigObject:G(F({},this.profileTemplateDefault()),{Name:e,PaperWidth:+t,PaperWidthCM:+n,StickerWidth:+a,StickerWidthCM:+h,StickerHeight:+d,StickerHeightCM:+f})};this.templateService.savePaperTemplate(l).pipe(i(`Template saved`),ql(()=>M(this,null,function*(){this.loadData(),this.closeDialog()}))).subscribe()}}openCreate(){this.router.navigate([],{queryParams:{dialog:`create`},queryParamsHandling:`merge`})}openEdit(e){this.router.navigate([],{queryParams:{dialog:`edit`,id:e},queryParamsHandling:`merge`})}closeDialog(){this.router.navigate([],{queryParams:{},replaceUrl:!0})}onDeleteTemplate(e){this.templateService.deletePaperTemplate(e).pipe(ql(()=>{this.loadData()})).subscribe(),setTimeout(()=>{document.querySelector(`.p-menu-overlay`)?.remove()},100)}onCopyTemplate(e){this.templateService.copyPaperTemplate(e).pipe(ql(()=>{this.loadData()})).subscribe(),setTimeout(()=>{document.querySelector(`.p-menu-overlay`)?.remove()},100)}onPreviousStep(){this.appStore.updateCurrentStep(this.appStore.currentStep()-1)}onNextStep(){this.appStore.updateCurrentStep(this.appStore.currentStep()+1);let e=this.profileTemplates().find(t=>t.ID===this.selectedTemplateId());this.appStore.updateProfileTemplate(e),localStorage.setItem(Xt$1.SelectedProfileTemplate,JSON.stringify(e))}static{this.ɵfac=function(t){return new(t||i$1)}}static{this.ɵcmp=PD({type:i$1,selectors:[[`app-choose-profile-template`]],decls:12,vars:11,consts:[[`actionButton`,``],[`content`,``],[`footer`,``],[`title`,``],[`menu`,``],[`pageTitle`,`Choose Paper Template`,3,`querySearchChange`,`searchable`,`querySearch`],[`appendTo`,`body`,3,`visibleChange`,`closable`,`header`,`modal`,`visible`],[3,`form`],[1,`d-flex`,`gap-2`,`justify-content-end`,`align-items-center`],[`label`,`Add`,3,`click`,`disabled`],[1,`p-2`,`m-3`],[1,`row`,`row-gap-4`],[1,`col-12`,`col-md-6`,`col-lg-4`,`col-xl-3`],[1,`text-center`,`text-muted`,`p-4`],[3,`click`,`ngClass`],[1,`row`,`fs-3`],[1,`col`],[1,`col`,`d-flex`,`justify-content-end`],[1,`d-flex`,`gap-2`],[4,`ngIf`],[1,`row`],[1,`col-10`],[`type`,`radio`,`name`,`selectedCategory`,1,`p-radiobutton-box`,3,`value`,`checked`],[`type`,`radio`,`name`,`selectedCategory`,1,`p-radiobutton-box`,3,`change`,`value`,`checked`],[1,`d-flex`,`justify-content-end`,`border-top`,`py-2`],[`icon`,`fa-solid fa-ellipsis`,`severity`,`secondary`,3,`onClick`,`outlined`,`pt`],[`appendTo`,`body`,3,`model`,`popup`],[1,`d-flex`,`justify-content-end`,`gap-2`,`py-2`,`px-3`],[`label`,`Next`,`severity`,`info`,3,`onClick`,`disabled`],[3,`onSubmit`,`form`],[`label`,`Cancel`,`severity`,`secondary`,3,`onClick`],[`label`,`Save`,`severity`,`secondary`,3,`onClick`]],template:function(t,n){if(t&1){let a=Tw();Pi(0,`app-main-panel`,5),fg(`querySearchChange`,function(d){return Gu(a),hb(n.querySearch,d)||(n.querySearch=d),zu(d)}),_h(1,Gt,2,1,`ng-template`,null,0,Pb)(3,ii,5,1,`ng-template`,null,1,Pb)(5,oi,2,1,`ng-template`,null,2,Pb),fl$1(),Pi(7,`p-dialog`,6),fg(`visibleChange`,function(d){return Gu(a),hb(n.dialogVisible,d)||(n.dialogVisible=d),zu(d)}),fw(8,ni,1,1,`app-dialog-form-edit`,7),fw(9,ri,1,1,`app-dialog-form-create`,7),_h(10,ai,2,0,`ng-template`,null,2,Pb),fl$1()}t&2&&(Rh(`searchable`,!0),dg(`querySearch`,n.querySearch),iI(7),Jw(wb(10,qt)),Rh(`closable`,!1)(`header`,n.dialogMode()==`create`?`Create New Label`:`Edit New Label`)(`modal`,!0),dg(`visible`,n.dialogVisible),iI(),hw(n.dialogMode()==`edit`?8:-1),iI(),hw(n.dialogMode()==`create`?9:-1))},dependencies:[gr,fh,D,Xi,Fs,Ns,Hl,Ee,Ot,An,In,hh,Lt,Wt,Us],styles:[`[_nghost-%COMP%]{display:block;height:100%}input[type=radio][_ngcontent-%COMP%]{appearance:none;width:18px;height:18px;border:2px solid #ced4da;border-radius:50%;outline:none;cursor:pointer;position:relative}input[type=radio][_ngcontent-%COMP%]:checked{border-color:#3b82f6}input[type=radio][_ngcontent-%COMP%]:checked:after{content:"";position:absolute;top:50%;left:50%;width:8px;height:8px;background:#3b82f6;border-radius:50%;transform:translate(-50%,-50%)}`]})}}return i$1})();function li(i,u){i&1&&Oh(0,`app-choose-profile-template`)}function pi(i,u){i&1&&Oh(0,`choose-product`)}function si(i,u){if(i&1&&Oh(0,`app-barcode-preview`,1),i&2){let e=u.$implicit;Rh(`cartItems`,e)}}function ci(i,u){i&1&&(Pi(0,`app-customize-label`),_h(1,si,1,1,`ng-template`,null,0,Pb),fl$1())}function di(i,u){i&1&&Oh(0,`app-print-preview`)}var Ao=(()=>{class i{constructor(){this.storeService=E(el),this.appStore=E(eu)}get cartItems(){return this.appStore.flattenedCartUnits()}static{this.ɵfac=function(t){return new(t||i)}}static{this.ɵcmp=PD({type:i,selectors:[[`app-barcode-wrapper`]],decls:4,vars:1,consts:[[`content`,``],[`previewMode`,`single`,3,`cartItems`]],template:function(t,n){if(t&1&&fw(0,li,1,0,`app-choose-profile-template`)(1,pi,1,0,`choose-product`)(2,ci,3,0,`app-customize-label`)(3,di,1,0,`app-print-preview`),t&2){let a;hw((a=n.appStore.currentStep())===1?0:a===2?1:a===3?2:a===4?3:-1)}},dependencies:[Ft,vz,dj,rd,bV],encapsulation:2,changeDetection:1})}}return i})();export{Ao as BarcodeWrapperComponent};
|
|
@@ -961,7 +961,7 @@ import{A as Te,D as Sl,Dt as yi,F as Vl,I as Wl,L as Xi,Mt as zr,O as Su,Ot as y
|
|
|
961
961
|
.p-inputgroup > p-inputmask > .p-inputtext {
|
|
962
962
|
width: 100%;
|
|
963
963
|
}
|
|
964
|
-
`;var vo={root:({instance:l})=>[`p-inputgroup`,{"p-inputgroup-fluid":l.fluid}]};var Ln=class re extends fe{name=`inputgroup`;style=yo;classes=vo;static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(re)))(i||re)}})();static ɵprov=ue({token:re,factory:re.ɵfac})};var Vn=new x(`INPUTGROUP_INSTANCE`);var $n=class qt extends ct{componentName=`InputGroup`;_componentStyle=E(Ln);$pcInputGroup=E(Vn,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(qt)))(i||qt)}})();static ɵcmp=(function(){return PD({type:qt,selectors:[[`p-inputgroup`],[`p-input-group`]],hostVars:2,hostBindings:function(i,f){i&2&&eb(f.cx(`root`))},features:[Db([Ln,{provide:Vn,useExisting:qt},{provide:At,useExisting:qt}]),GD([Ze]),Th],ngContentSelectors:[`*`],decls:1,vars:0,template:function(i,f){i&1&&(Ow(),kw(0))},dependencies:[zr],encapsulation:2})})()};var _o={root:`p-inputgroupaddon`};var Hn=class le extends fe{name=`inputgroupaddon`;classes=_o;static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(le)))(i||le)}})();static ɵprov=ue({token:le,factory:le.ɵfac})};var qn=new x(`INPUTGROUPADDON_INSTANCE`);var Gn=class Gt extends ct{componentName=`InputGroupAddon`;_componentStyle=E(Hn);$pcInputGroupAddon=E(qn,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(Gt)))(i||Gt)}})();static ɵcmp=(function(){return PD({type:Gt,selectors:[[`p-inputgroup-addon`]],hostVars:2,hostBindings:function(i,f){i&2&&eb(f.cx(`root`))},features:[Db([Hn,{provide:qn,useExisting:Gt},{provide:At,useExisting:Gt}]),GD([Ze]),Th],ngContentSelectors:[`*`],decls:1,vars:0,template:function(i,f){i&1&&(Ow(),kw(0))},dependencies:[zr],encapsulation:2})})()};var xo=[`content`];var Co=[`actionButton`];var Mo=[`footer`];var To=[`filterDialog`];var Io=()=>({width:`25rem`});function Do(l,w){if(l&1){let e=Tw();Pi(0,`p-inputgroup`)(1,`input`,15,0),GI(),fg(`ngModelChange`,function(i){Gu(e);let f=Aw();return hb(f.querySearch,i)||(f.querySearch=i),zu(i)}),fl$1(),Pi(3,`p-inputgroup-addon`)(4,`p-button`,16),Bh(`onClick`,function(){Gu(e);let i=Vw(2);return zu(i.click())}),fl$1()()()}if(l&2){let e=Aw();iI(),dg(`ngModel`,e.querySearch),QI()}}function So(l,w){l&1&&Oh(0,`i`,18)}function wo(l,w){if(l&1){let e=Tw();Pi(0,`button`,17),Bh(`click`,function(){Gu(e);let i=Aw();return zu(i.openFilterDialog())}),Oh(1,`i`),fw(2,So,1,0,`i`,18),fl$1()}if(l&2){let e=Aw();iI(),eb(e.filterIcon()),iI(),hw(e.hasCarretIcon()?2:-1)}}function ko(l,w){l&1&&Ph(0)}function Bo(l,w){l&1&&Ph(0)}function No(l,w){l&1&&Ph(0)}function Eo(l,w){l&1&&Ph(0)}var gr=(()=>{class l{constructor(){this.storeService=E(el),this.searchable=k1(!1),this.filterable=k1(!1),this.searchPlaceholder=k1(`keyword`),this.pageTitle=k1(``),this.querySearch=L1(),this.dialogFilterVisible=L1(!1),this.filterIcon=k1(`fa-solid fa-filter`),this.hasCarretIcon=k1(!0),this.filterHeader=k1(`Filter`)}openFilterDialog(){this.dialogFilterVisible.set(!0)}static{this.ɵfac=function(n){return new(n||l)}}static{this.ɵcmp=PD({type:l,selectors:[[`app-main-panel`]],contentQueries:function(n,i,f){if(n&1&&Wh(f,xo,7)(f,Co,7)(f,Mo,7)(f,To,7),n&2){let S;Pw(S=Fw())&&(i.contentTemplate=S.first),Pw(S=Fw())&&(i.actionButtonTemplate=S.first),Pw(S=Fw())&&(i.footerTemplate=S.first),Pw(S=Fw())&&(i.filterDialogTemplate=S.first)}},inputs:{searchable:[1,`searchable`],filterable:[1,`filterable`],searchPlaceholder:[1,`searchPlaceholder`],pageTitle:[1,`pageTitle`],querySearch:[1,`querySearch`],dialogFilterVisible:[1,`dialogFilterVisible`],filterIcon:[1,`filterIcon`],hasCarretIcon:[1,`hasCarretIcon`],filterHeader:[1,`filterHeader`]},outputs:{querySearch:`querySearchChange`,dialogFilterVisible:`dialogFilterVisibleChange`},decls:19,vars:17,consts:[[`input`,``],[1,`d-flex`,`flex-column`,`h-100`],[1,`topbar`,`position-static`],[1,`d-flex`,`top-navbar`,`navbar-expand-lg`,`border-bottom`,2,`border-color`,`#ddd`],[`id`,`navbarSupportedContent`,1,`navbar-collapse`,`collapse`,`m-0`,3,`ngbCollapse`],[1,`w-100`,`d-flex`,`align-items-center`,`px-3`],[1,`navbar-nav`,`float-start`,`me-auto`,`h-100`,`d-flex`,`align-items-center`],[1,`d-flex`,`align-items-center`,`gap-2`],[1,`nav-item`,`d-none`,`d-lg-block`],[1,`font-robotoslab`,`m-0`],[1,`btn`,`h-100`,`d-flex`,`align-items-center`],[4,`ngTemplateOutlet`],[1,`flex-grow-1`,2,`overflow-y`,`auto`,`overflow-x`,`hidden`,`max-height`,`calc(100vh - 40px)`],[1,`bg-white`],[`appendTo`,`body`,3,`visibleChange`,`header`,`draggable`,`modal`,`visible`],[`pSize`,`small`,`pInputText`,``,`placeholder`,`Search`,3,`ngModelChange`,`ngModel`],[`icon`,`fa-solid fa-magnifying-glass`,`severity`,`secondary`,`variant`,`text`,3,`onClick`],[1,`btn`,`h-100`,`d-flex`,`align-items-center`,3,`click`],[1,`fa-solid`,`fa-caret-down`,2,`margin-left`,`-5px`]],template:function(n,i){n&1&&(Pi(0,`div`,1)(1,`header`,2)(2,`nav`,3)(3,`div`,4)(4,`div`,5)(5,`ul`,6)(6,`div`,7)(7,`li`,8)(8,`h3`,9),ub(9),fl$1()(),fw(10,Do,5,1,`p-inputgroup`),fw(11,wo,3,3,`button`,10),fl$1()(),_h(12,ko,1,0,`ng-container`,11),fl$1()()()(),Pi(13,`div`,12),_h(14,Bo,1,0,`ng-container`,11),fl$1(),Pi(15,`footer`,13),_h(16,No,1,0,`ng-container`,11),fl$1()(),Pi(17,`p-dialog`,14),fg(`visibleChange`,function(S){return hb(i.dialogFilterVisible,S)||(i.dialogFilterVisible=S),S}),_h(18,Eo,1,0,`ng-container`,11),fl$1()),n&2&&(iI(),Ah(`data-navbarbg`,i.storeService.options().navbarbg),iI(2),Rh(`ngbCollapse`,!i.storeService.options().isCollapsed),Ah(`data-navbarbg`,i.storeService.options().navbarbg),iI(6),cg(i.pageTitle()),iI(),hw(i.searchable()?10:-1),iI(),hw(i.filterable()?11:-1),iI(),Rh(`ngTemplateOutlet`,i.actionButtonTemplate),iI(2),Rh(`ngTemplateOutlet`,i.contentTemplate),iI(2),Rh(`ngTemplateOutlet`,i.footerTemplate),iI(),Jw(wb(16,Io)),Rh(`header`,i.filterHeader())(`draggable`,!1)(`modal`,!0),dg(`visible`,i.dialogFilterVisible),iI(),Rh(`ngTemplateOutlet`,i.filterDialogTemplate))},dependencies:[Xi$1,xs,Lu,$n,Gn,Ee,Sn,hh,Fo$1,oh,_l,An],styles:[`footer[_ngcontent-%COMP%]{box-shadow:#63636333 0 2px 8px}`],changeDetection:1})}}return l})();var Rn={name:`minus`,meta:{tags:[`minus`,`remove`,`subtract`,`decrease`,`less`]},svg:{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 20 20`,fill:`none`},nodes:[[`path`,{d:`M17 9.25C17.4142 9.25 17.75 9.58579 17.75 10C17.75 10.4142 17.4142 10.75 17 10.75H3C2.58579 10.75 2.25 10.4142 2.25 10C2.25 9.58579 2.58579 9.25 3 9.25H17Z`,fill:`currentColor`,key:`iu8x2q`}]]};var jn=(()=>{class l extends Kr{constructor(){super(),this._icon=Rn}static ɵfac=function(n){return new(n||l)};static ɵcmp=(function(){let e=(o,d)=>d[1].key||o;function n(o,d){if(o&1&&(od(),kh(0,`path`)),o&2){let t=Aw().$implicit;Ah(`d`,t[1].d)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`fill-rule`,t[1].fillRule)(`clip-rule`,t[1].clipRule)(`stroke`,t[1].stroke)(`stroke-width`,t[1].strokeWidth)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function i(o,d){if(o&1&&(od(),kh(0,`circle`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`r`,t[1].r)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function f(o,d){if(o&1&&(od(),kh(0,`rect`)),o&2){let t=Aw().$implicit;Ah(`x`,t[1].x)(`y`,t[1].y)(`width`,t[1].width)(`height`,t[1].height)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function S(o,d){if(o&1&&(od(),kh(0,`line`)),o&2){let t=Aw().$implicit;Ah(`x1`,t[1].x1)(`y1`,t[1].y1)(`x2`,t[1].x2)(`y2`,t[1].y2)(`stroke`,t[1].stroke)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function A(o,d){if(o&1&&(od(),kh(0,`polyline`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function P(o,d){if(o&1&&(od(),kh(0,`polygon`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function O(o,d){if(o&1&&(od(),kh(0,`ellipse`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function V(o,d){if(o&1&&fw(0,n,1,9,`path`)(1,i,1,6,`circle`)(2,f,1,9,`rect`)(3,S,1,7,`line`)(4,A,1,4,`polyline`)(5,P,1,4,`polygon`)(6,O,1,7,`ellipse`),o&2){let t,Y=d.$implicit;hw((t=Y[0])===`path`?0:t===`circle`?1:t===`rect`?2:t===`line`?3:t===`polyline`?4:t===`polygon`?5:t===`ellipse`?6:-1)}}return PD({type:l,selectors:[[`svg`,`data-p-icon`,`minus`]],features:[Th],decls:2,vars:0,template:function(d,t){d&1&&yw(0,V,7,1,null,null,e),d&2&&vw(t.iconNodes())},encapsulation:2,changeDetection:1})})()}return l})();var Un={name:`plus`,meta:{tags:[`plus`,`add`,`increase`,`more`,`extra`]},svg:{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 20 20`,fill:`none`},nodes:[[`path`,{d:`M10 2.25C10.4142 2.25 10.75 2.58579 10.75 3V9.25H17C17.4142 9.25 17.75 9.58579 17.75 10C17.75 10.4142 17.4142 10.75 17 10.75H10.75V17C10.75 17.4142 10.4142 17.75 10 17.75C9.58579 17.75 9.25 17.4142 9.25 17V10.75H3C2.58579 10.75 2.25 10.4142 2.25 10C2.25 9.58579 2.58579 9.25 3 9.25H9.25V3C9.25 2.58579 9.58579 2.25 10 2.25Z`,fill:`currentColor`,key:`uygcm6`}]]};var Wn=(()=>{class l extends Kr{constructor(){super(),this._icon=Un}static ɵfac=function(n){return new(n||l)};static ɵcmp=(function(){let e=(o,d)=>d[1].key||o;function n(o,d){if(o&1&&(od(),kh(0,`path`)),o&2){let t=Aw().$implicit;Ah(`d`,t[1].d)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`fill-rule`,t[1].fillRule)(`clip-rule`,t[1].clipRule)(`stroke`,t[1].stroke)(`stroke-width`,t[1].strokeWidth)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function i(o,d){if(o&1&&(od(),kh(0,`circle`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`r`,t[1].r)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function f(o,d){if(o&1&&(od(),kh(0,`rect`)),o&2){let t=Aw().$implicit;Ah(`x`,t[1].x)(`y`,t[1].y)(`width`,t[1].width)(`height`,t[1].height)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function S(o,d){if(o&1&&(od(),kh(0,`line`)),o&2){let t=Aw().$implicit;Ah(`x1`,t[1].x1)(`y1`,t[1].y1)(`x2`,t[1].x2)(`y2`,t[1].y2)(`stroke`,t[1].stroke)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function A(o,d){if(o&1&&(od(),kh(0,`polyline`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function P(o,d){if(o&1&&(od(),kh(0,`polygon`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function O(o,d){if(o&1&&(od(),kh(0,`ellipse`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function V(o,d){if(o&1&&fw(0,n,1,9,`path`)(1,i,1,6,`circle`)(2,f,1,9,`rect`)(3,S,1,7,`line`)(4,A,1,4,`polyline`)(5,P,1,4,`polygon`)(6,O,1,7,`ellipse`),o&2){let t,Y=d.$implicit;hw((t=Y[0])===`path`?0:t===`circle`?1:t===`rect`?2:t===`line`?3:t===`polyline`?4:t===`polygon`?5:t===`ellipse`?6:-1)}}return PD({type:l,selectors:[[`svg`,`data-p-icon`,`plus`]],features:[Th],decls:2,vars:0,template:function(d,t){d&1&&yw(0,V,7,1,null,null,e),d&2&&vw(t.iconNodes())},encapsulation:2,changeDetection:1})})()}return l})();var Zn=`
|
|
964
|
+
`;var vo={root:({instance:l})=>[`p-inputgroup`,{"p-inputgroup-fluid":l.fluid}]};var Ln=class re extends fe{name=`inputgroup`;style=yo;classes=vo;static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(re)))(i||re)}})();static ɵprov=ue({token:re,factory:re.ɵfac})};var Vn=new x(`INPUTGROUP_INSTANCE`);var $n=class qt extends ct{componentName=`InputGroup`;_componentStyle=E(Ln);$pcInputGroup=E(Vn,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(qt)))(i||qt)}})();static ɵcmp=(function(){return PD({type:qt,selectors:[[`p-inputgroup`],[`p-input-group`]],hostVars:2,hostBindings:function(i,f){i&2&&eb(f.cx(`root`))},features:[Db([Ln,{provide:Vn,useExisting:qt},{provide:At,useExisting:qt}]),GD([Ze]),Th],ngContentSelectors:[`*`],decls:1,vars:0,template:function(i,f){i&1&&(Ow(),kw(0))},dependencies:[zr],encapsulation:2})})()};var _o={root:`p-inputgroupaddon`};var Hn=class le extends fe{name=`inputgroupaddon`;classes=_o;static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(le)))(i||le)}})();static ɵprov=ue({token:le,factory:le.ɵfac})};var qn=new x(`INPUTGROUPADDON_INSTANCE`);var Gn=class Gt extends ct{componentName=`InputGroupAddon`;_componentStyle=E(Hn);$pcInputGroupAddon=E(qn,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=E(Ze,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms([`host`,`root`]))}static ɵfac=(()=>{let e;return function(i){return(e||(e=ov(Gt)))(i||Gt)}})();static ɵcmp=(function(){return PD({type:Gt,selectors:[[`p-inputgroup-addon`]],hostVars:2,hostBindings:function(i,f){i&2&&eb(f.cx(`root`))},features:[Db([Hn,{provide:qn,useExisting:Gt},{provide:At,useExisting:Gt}]),GD([Ze]),Th],ngContentSelectors:[`*`],decls:1,vars:0,template:function(i,f){i&1&&(Ow(),kw(0))},dependencies:[zr],encapsulation:2})})()};var xo=[`content`];var Co=[`actionButton`];var Mo=[`footer`];var To=[`filterDialog`];var Io=()=>({width:`25rem`});function Do(l,w){if(l&1){let e=Tw();Pi(0,`p-inputgroup`)(1,`input`,15,0),GI(),fg(`ngModelChange`,function(i){Gu(e);let f=Aw();return hb(f.querySearch,i)||(f.querySearch=i),zu(i)}),fl$1(),Pi(3,`p-inputgroup-addon`)(4,`p-button`,16),Bh(`onClick`,function(){Gu(e);let i=Vw(2);return zu(i.click())}),fl$1()()()}if(l&2){let e=Aw();iI(),dg(`ngModel`,e.querySearch),QI()}}function So(l,w){l&1&&Oh(0,`i`,18)}function wo(l,w){if(l&1){let e=Tw();Pi(0,`button`,17),Bh(`click`,function(){Gu(e);let i=Aw();return zu(i.openFilterDialog())}),Oh(1,`i`),fw(2,So,1,0,`i`,18),fl$1()}if(l&2){let e=Aw();iI(),eb(e.filterIcon()),iI(),hw(e.hasCarretIcon()?2:-1)}}function ko(l,w){l&1&&Ph(0)}function Bo(l,w){l&1&&Ph(0)}function No(l,w){l&1&&Ph(0)}function Eo(l,w){l&1&&Ph(0)}var gr=(()=>{class l{constructor(){this.storeService=E(el),this.searchable=k1(!1),this.filterable=k1(!1),this.searchPlaceholder=k1(`keyword`),this.pageTitle=k1(``),this.querySearch=L1(),this.dialogFilterVisible=L1(!1),this.filterIcon=k1(`fa-solid fa-filter`),this.hasCarretIcon=k1(!0),this.filterHeader=k1(`Filter`)}openFilterDialog(){this.dialogFilterVisible.set(!0)}static{this.ɵfac=function(n){return new(n||l)}}static{this.ɵcmp=PD({type:l,selectors:[[`app-main-panel`]],contentQueries:function(n,i,f){if(n&1&&Wh(f,xo,7)(f,Co,7)(f,Mo,7)(f,To,7),n&2){let S;Pw(S=Fw())&&(i.contentTemplate=S.first),Pw(S=Fw())&&(i.actionButtonTemplate=S.first),Pw(S=Fw())&&(i.footerTemplate=S.first),Pw(S=Fw())&&(i.filterDialogTemplate=S.first)}},inputs:{searchable:[1,`searchable`],filterable:[1,`filterable`],searchPlaceholder:[1,`searchPlaceholder`],pageTitle:[1,`pageTitle`],querySearch:[1,`querySearch`],dialogFilterVisible:[1,`dialogFilterVisible`],filterIcon:[1,`filterIcon`],hasCarretIcon:[1,`hasCarretIcon`],filterHeader:[1,`filterHeader`]},outputs:{querySearch:`querySearchChange`,dialogFilterVisible:`dialogFilterVisibleChange`},decls:19,vars:17,consts:[[`input`,``],[1,`d-flex`,`flex-column`,`h-100`],[1,`topbar`,`position-static`],[1,`d-flex`,`top-navbar`,`navbar-expand-lg`,`border-bottom`,2,`border-color`,`#ddd`],[`id`,`navbarSupportedContent`,1,`navbar-collapse`,`collapse`,`m-0`,3,`ngbCollapse`],[1,`w-100`,`d-flex`,`align-items-center`,`px-3`],[1,`navbar-nav`,`float-start`,`me-auto`,`h-100`,`d-flex`,`align-items-center`],[1,`d-flex`,`align-items-center`,`gap-2`],[1,`nav-item`,`d-none`,`d-lg-block`,`flex-shrink-0`],[1,`font-robotoslab`,`m-0`,`text-nowrap`],[1,`btn`,`h-100`,`d-flex`,`align-items-center`],[4,`ngTemplateOutlet`],[1,`flex-grow-1`,2,`overflow-y`,`auto`,`overflow-x`,`hidden`,`max-height`,`calc(100vh - 40px)`],[1,`bg-white`],[`appendTo`,`body`,3,`visibleChange`,`header`,`draggable`,`modal`,`visible`],[`pSize`,`small`,`pInputText`,``,`placeholder`,`Search`,3,`ngModelChange`,`ngModel`],[`icon`,`fa-solid fa-magnifying-glass`,`severity`,`secondary`,`variant`,`text`,3,`onClick`],[1,`btn`,`h-100`,`d-flex`,`align-items-center`,3,`click`],[1,`fa-solid`,`fa-caret-down`,2,`margin-left`,`-5px`]],template:function(n,i){n&1&&(Pi(0,`div`,1)(1,`header`,2)(2,`nav`,3)(3,`div`,4)(4,`div`,5)(5,`ul`,6)(6,`div`,7)(7,`li`,8)(8,`h3`,9),ub(9),fl$1()(),fw(10,Do,5,1,`p-inputgroup`),fw(11,wo,3,3,`button`,10),fl$1()(),_h(12,ko,1,0,`ng-container`,11),fl$1()()()(),Pi(13,`div`,12),_h(14,Bo,1,0,`ng-container`,11),fl$1(),Pi(15,`footer`,13),_h(16,No,1,0,`ng-container`,11),fl$1()(),Pi(17,`p-dialog`,14),fg(`visibleChange`,function(S){return hb(i.dialogFilterVisible,S)||(i.dialogFilterVisible=S),S}),_h(18,Eo,1,0,`ng-container`,11),fl$1()),n&2&&(iI(),Ah(`data-navbarbg`,i.storeService.options().navbarbg),iI(2),Rh(`ngbCollapse`,!i.storeService.options().isCollapsed),Ah(`data-navbarbg`,i.storeService.options().navbarbg),iI(6),cg(i.pageTitle()),iI(),hw(i.searchable()?10:-1),iI(),hw(i.filterable()?11:-1),iI(),Rh(`ngTemplateOutlet`,i.actionButtonTemplate),iI(2),Rh(`ngTemplateOutlet`,i.contentTemplate),iI(2),Rh(`ngTemplateOutlet`,i.footerTemplate),iI(),Jw(wb(16,Io)),Rh(`header`,i.filterHeader())(`draggable`,!1)(`modal`,!0),dg(`visible`,i.dialogFilterVisible),iI(),Rh(`ngTemplateOutlet`,i.filterDialogTemplate))},dependencies:[Xi$1,xs,Lu,$n,Gn,Ee,Sn,hh,Fo$1,oh,_l,An],styles:[`footer[_ngcontent-%COMP%]{box-shadow:#63636333 0 2px 8px}`],changeDetection:1})}}return l})();var Rn={name:`minus`,meta:{tags:[`minus`,`remove`,`subtract`,`decrease`,`less`]},svg:{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 20 20`,fill:`none`},nodes:[[`path`,{d:`M17 9.25C17.4142 9.25 17.75 9.58579 17.75 10C17.75 10.4142 17.4142 10.75 17 10.75H3C2.58579 10.75 2.25 10.4142 2.25 10C2.25 9.58579 2.58579 9.25 3 9.25H17Z`,fill:`currentColor`,key:`iu8x2q`}]]};var jn=(()=>{class l extends Kr{constructor(){super(),this._icon=Rn}static ɵfac=function(n){return new(n||l)};static ɵcmp=(function(){let e=(o,d)=>d[1].key||o;function n(o,d){if(o&1&&(od(),kh(0,`path`)),o&2){let t=Aw().$implicit;Ah(`d`,t[1].d)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`fill-rule`,t[1].fillRule)(`clip-rule`,t[1].clipRule)(`stroke`,t[1].stroke)(`stroke-width`,t[1].strokeWidth)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function i(o,d){if(o&1&&(od(),kh(0,`circle`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`r`,t[1].r)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function f(o,d){if(o&1&&(od(),kh(0,`rect`)),o&2){let t=Aw().$implicit;Ah(`x`,t[1].x)(`y`,t[1].y)(`width`,t[1].width)(`height`,t[1].height)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function S(o,d){if(o&1&&(od(),kh(0,`line`)),o&2){let t=Aw().$implicit;Ah(`x1`,t[1].x1)(`y1`,t[1].y1)(`x2`,t[1].x2)(`y2`,t[1].y2)(`stroke`,t[1].stroke)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function A(o,d){if(o&1&&(od(),kh(0,`polyline`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function P(o,d){if(o&1&&(od(),kh(0,`polygon`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function O(o,d){if(o&1&&(od(),kh(0,`ellipse`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function V(o,d){if(o&1&&fw(0,n,1,9,`path`)(1,i,1,6,`circle`)(2,f,1,9,`rect`)(3,S,1,7,`line`)(4,A,1,4,`polyline`)(5,P,1,4,`polygon`)(6,O,1,7,`ellipse`),o&2){let t,Y=d.$implicit;hw((t=Y[0])===`path`?0:t===`circle`?1:t===`rect`?2:t===`line`?3:t===`polyline`?4:t===`polygon`?5:t===`ellipse`?6:-1)}}return PD({type:l,selectors:[[`svg`,`data-p-icon`,`minus`]],features:[Th],decls:2,vars:0,template:function(d,t){d&1&&yw(0,V,7,1,null,null,e),d&2&&vw(t.iconNodes())},encapsulation:2,changeDetection:1})})()}return l})();var Un={name:`plus`,meta:{tags:[`plus`,`add`,`increase`,`more`,`extra`]},svg:{xmlns:`http://www.w3.org/2000/svg`,width:20,height:20,viewBox:`0 0 20 20`,fill:`none`},nodes:[[`path`,{d:`M10 2.25C10.4142 2.25 10.75 2.58579 10.75 3V9.25H17C17.4142 9.25 17.75 9.58579 17.75 10C17.75 10.4142 17.4142 10.75 17 10.75H10.75V17C10.75 17.4142 10.4142 17.75 10 17.75C9.58579 17.75 9.25 17.4142 9.25 17V10.75H3C2.58579 10.75 2.25 10.4142 2.25 10C2.25 9.58579 2.58579 9.25 3 9.25H9.25V3C9.25 2.58579 9.58579 2.25 10 2.25Z`,fill:`currentColor`,key:`uygcm6`}]]};var Wn=(()=>{class l extends Kr{constructor(){super(),this._icon=Un}static ɵfac=function(n){return new(n||l)};static ɵcmp=(function(){let e=(o,d)=>d[1].key||o;function n(o,d){if(o&1&&(od(),kh(0,`path`)),o&2){let t=Aw().$implicit;Ah(`d`,t[1].d)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`fill-rule`,t[1].fillRule)(`clip-rule`,t[1].clipRule)(`stroke`,t[1].stroke)(`stroke-width`,t[1].strokeWidth)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function i(o,d){if(o&1&&(od(),kh(0,`circle`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`r`,t[1].r)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function f(o,d){if(o&1&&(od(),kh(0,`rect`)),o&2){let t=Aw().$implicit;Ah(`x`,t[1].x)(`y`,t[1].y)(`width`,t[1].width)(`height`,t[1].height)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function S(o,d){if(o&1&&(od(),kh(0,`line`)),o&2){let t=Aw().$implicit;Ah(`x1`,t[1].x1)(`y1`,t[1].y1)(`x2`,t[1].x2)(`y2`,t[1].y2)(`stroke`,t[1].stroke)(`stroke-opacity`,t[1].strokeOpacity)(`opacity`,t[1].opacity)}}function A(o,d){if(o&1&&(od(),kh(0,`polyline`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function P(o,d){if(o&1&&(od(),kh(0,`polygon`)),o&2){let t=Aw().$implicit;Ah(`points`,t[1].points)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function O(o,d){if(o&1&&(od(),kh(0,`ellipse`)),o&2){let t=Aw().$implicit;Ah(`cx`,t[1].cx)(`cy`,t[1].cy)(`rx`,t[1].rx)(`ry`,t[1].ry)(`fill`,t[1].fill)(`fill-opacity`,t[1].fillOpacity)(`opacity`,t[1].opacity)}}function V(o,d){if(o&1&&fw(0,n,1,9,`path`)(1,i,1,6,`circle`)(2,f,1,9,`rect`)(3,S,1,7,`line`)(4,A,1,4,`polyline`)(5,P,1,4,`polygon`)(6,O,1,7,`ellipse`),o&2){let t,Y=d.$implicit;hw((t=Y[0])===`path`?0:t===`circle`?1:t===`rect`?2:t===`line`?3:t===`polyline`?4:t===`polygon`?5:t===`ellipse`?6:-1)}}return PD({type:l,selectors:[[`svg`,`data-p-icon`,`plus`]],features:[Th],decls:2,vars:0,template:function(d,t){d&1&&yw(0,V,7,1,null,null,e),d&2&&vw(t.iconNodes())},encapsulation:2,changeDetection:1})})()}return l})();var Zn=`
|
|
965
965
|
.p-panel {
|
|
966
966
|
display: block;
|
|
967
967
|
border: 1px solid dt('panel.border.color');
|