1require.config({"config": { 2 "jsbuild":{"jquery/uppy/dist/uppy.min.js":"\"use strict\";(()=>{var gb=Object.create;var fl=Object.defineProperty;var yb=Object.getOwnPropertyDescriptor;var vb=Object.getOwnPropertyNames;var bb=Object.getPrototypeOf,wb=Object.prototype.hasOwnProperty;var o=(r,e)=>fl(r,\"name\",{value:e,configurable:!0});var be=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ml=(r,e)=>{for(var t in e)fl(r,t,{get:e[t],enumerable:!0})},Sb=(r,e,t,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let s of vb(e))!wb.call(r,s)&&s!==t&&fl(r,s,{get:()=>e[s],enumerable:!(i=yb(e,s))||i.enumerable});return r};var ve=(r,e,t)=>(t=r!=null?gb(bb(r)):{},Sb(e||!r||!r.__esModule?fl(t,\"default\",{value:r,enumerable:!0}):t,r));var ef=be((fF,Zp)=>{Zp.exports=o(function(){var e={},t=e._fns={};e.emit=o(function(a,l,u,h,d,m,w){var y=i(a);y.length&&s(a,y,[l,u,h,d,m,w])},\"emit\"),e.on=o(function(a,l){t[a]||(t[a]=[]),t[a].push(l)},\"on\"),e.once=o(function(a,l){function u(){l.apply(this,arguments),e.off(a,u)}o(u,\"one\"),this.on(a,u)},\"once\"),e.off=o(function(a,l){var u=[];if(a&&l){var h=this._fns[a],d=0,m=h?h.length:0;for(d;d<m;d++)h[d]!==l&&u.push(h[d])}u.length?this._fns[a]=u:delete this._fns[a]},\"off\");function i(n){var a=t[n]?t[n]:[],l=n.indexOf(\":\"),u=l===-1?[n]:[n.substring(0,l),n.substring(l+1)],h=Object.keys(t),d=0,m=h.length;for(d;d<m;d++){var w=h[d];if(w===\"*\"&&(a=a.concat(t[w])),u.length===2&&u[0]===w){a=a.concat(t[w]);break}}return a}o(i,\"getListeners\");function s(n,a,l){var u=0,h=a.length;for(u;u<h&&a[u];u++)a[u].event=n,a[u].apply(a[u],l)}return o(s,\"emitAll\"),e},\"createNamespaceEmitter\")});var yl=be((vF,tf)=>{function Cb(r){var e=typeof r;return r!=null&&(e==\"object\"||e==\"function\")}o(Cb,\"isObject\");tf.exports=Cb});var sf=be((wF,rf)=>{var Tb=typeof global==\"object\"&&global&&global.Object===Object&&global;rf.exports=Tb});var ju=be((SF,of)=>{var Ob=sf(),Ab=typeof self==\"object\"&&self&&self.Object===Object&&self,Rb=Ob||Ab||Function(\"return this\")();of.exports=Rb});var af=be((PF,nf)=>{var kb=ju(),Ub=o(function(){return kb.Date.now()},\"now\");nf.exports=Ub});var uf=be((xF,lf)=>{var Db=/\\s/;function Ib(r){for(var e=r.length;e--&&Db.test(r.charAt(e)););return e}o(Ib,\"trimmedEndIndex\");lf.exports=Ib});var hf=be((EF,cf)=>{var Nb=uf(),Lb=/^\\s+/;function Mb(r){return r&&r.slice(0,Nb(r)+1).replace(Lb,\"\")}
2o(Mb,\"baseTrim\");cf.exports=Mb});var Hu=be((TF,df)=>{var Bb=ju(),zb=Bb.Symbol;df.exports=zb});var gf=be((OF,mf)=>{var pf=Hu(),ff=Object.prototype,jb=ff.hasOwnProperty,Hb=ff.toString,Zo=pf?pf.toStringTag:void 0;function qb(r){var e=jb.call(r,Zo),t=r[Zo];try{r[Zo]=void 0;var i=!0}catch{}var s=Hb.call(r);return i&&(e?r[Zo]=t:delete r[Zo]),s}o(qb,\"getRawTag\");mf.exports=qb});var vf=be((RF,yf)=>{var $b=Object.prototype,Vb=$b.toString;function Wb(r){return Vb.call(r)}o(Wb,\"objectToString\");yf.exports=Wb});var Pf=be((UF,Sf)=>{var bf=Hu(),Gb=gf(),Kb=vf(),Xb=\"[object Null]\",Yb=\"[object Undefined]\",wf=bf?bf.toStringTag:void 0;function Jb(r){return r==null?r===void 0?Yb:Xb:wf&&wf in Object(r)?Gb(r):Kb(r)}o(Jb,\"baseGetTag\");Sf.exports=Jb});var xf=be((IF,_f)=>{function Qb(r){return r!=null&&typeof r==\"object\"}o(Qb,\"isObjectLike\");_f.exports=Qb});var Ef=be((LF,Ff)=>{var Zb=Pf(),e1=xf(),t1=\"[object Symbol]\";function r1(r){return typeof r==\"symbol\"||e1(r)&&Zb(r)==t1}o(r1,\"isSymbol\");Ff.exports=r1});var Af=be((BF,Of)=>{var i1=hf(),Cf=yl(),s1=Ef(),Tf=NaN,o1=/^[-+]0x[0-9a-f]+$/i,n1=/^0b[01]+$/i,a1=/^0o[0-7]+$/i,l1=parseInt;function u1(r){if(typeof r==\"number\")return r;if(s1(r))return Tf;if(Cf(r)){var e=typeof r.valueOf==\"function\"?r.valueOf():r;r=Cf(e)?e+\"\":e}if(typeof r!=\"string\")return r===0?r:+r;r=i1(r);var t=n1.test(r);return t||a1.test(r)?l1(r.slice(2),t?2:8):o1.test(r)?Tf:+r}o(u1,\"toNumber\");Of.exports=u1});var $u=be((jF,kf)=>{var c1=yl(),qu=af(),Rf=Af(),h1=\"Expected a function\",d1=Math.max,p1=Math.min;function f1(r,e,t){var i,s,n,a,l,u,h=0,d=!1,m=!1,w=!0;if(typeof r!=\"function\")throw new TypeError(h1);e=Rf(e)||0,c1(t)&&(d=!!t.leading,m=\"maxWait\"in t,n=m?d1(Rf(t.maxWait)||0,e):n,w=\"trailing\"in t?!!t.trailing:w);function y($){var W=i,te=s;return i=s=void 0,h=$,a=r.apply(te,W),a}o(y,\"invokeFunc\");function P($){return h=$,l=setTimeout(O,e),d?y($):a}o(P,\"leadingEdge\");function D($){var W=$-u,te=$-h,se=e-W;return m?p1(se,n-te):se}o(D,\"remainingWait\");function C($){var W=$-u,te=$-h;return u===void 0||W>=e||W<0||m&&te>=n}o(C,\"shouldInvoke\");function O(){var $=qu();if(C($))return z($);l=setTimeout(O,D($))}o(O,\"timerExpired\");function z($){return l=void 0,w&&i?y($):(i=s=void 0,a)}o(z,\"trailingEdge\");function X(){l!==void 0&&clearTimeout(l),h=0,i=u=s=l=void 0}o(X,\"cancel\");function K(){return l===void 0?a:z(qu())}o(K,\"flush\");function Z(){var $=qu(),W=C($);if(i=arguments,s=this,u=$,W){if(l===void 0)return P(u);if(m)return clearTimeout(l),l=setTimeout(O,e),y(u)}return l===void 0&&(l=setTimeout(O,e)),a}return o(Z,\"debounced\"),Z.cancel=X,Z.flush=K,Z}o(f1,\"debounce\");kf.exports=f1});var vl=be((qF,Uf)=>{var m1=$u(),g1=yl(),y1=\"Expected a function\";function v1(r,e,t){var i=!0,s=!0;if(typeof r!=\"function\")throw new TypeError(y1);return g1(t)&&(i=\"leading\"in t?!!t.leading:i,s=\"trailing\"in t?!!t.trailing:s),m1(r,e,{leading:i,maxWait:e,trailing:s})}o(v1,\"throttle\");Uf.exports=v1});var sn=be((d3,Mf)=>{\"use strict\";Mf.exports=o(function(e){if(typeof e!=\"number\"||Number.isNaN(e))throw new TypeError(`Expected a number, got ${typeof e}`);let t=e<0,i=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"];if(t&&(e=-e),e<1)return`${(t?\"-\":\"\")+e} B`;let s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),i.length-1);e=Number(e/1024**s);let n=i[s];return e>=10||e%1===0?`${(t?\"-\":\"\")+e.toFixed(0)} ${n}`:`${(t?\"-\":\"\")+e.toFixed(1)} ${n}`},\"prettierBytes\")});var jf=be((f3,zf)=>{\"use strict\";function Bf(r,e){this.text=r=r||\"\",this.hasWild=~r.indexOf(\"*\"),this.separator=e,this.parts=r.split(e)}o(Bf,\"WildcardMatcher\");Bf.prototype.match=function(r){var e=!0,t=this.parts,i,s=t.length,n;if(typeof r==\"string\"||r instanceof String)if(!this.hasWild&&this.text!=r)e=!1;else{for(n=(r||\"\").split(this.separator),i=0;e&&i<s;i++)t[i]!==\"*\"&&(i<n.length?e=t[i]===n[i]:e=!1);e=e&&n}else if(typeof r.splice==\"function\")for(e=[],i=r.length;i--;)this.match(r[i])&&(e[e.length]=r[i]);else if(typeof r==\"object\"){e={};for(var a in r)this.match(a)&&(e[a]=r[a])}return e};zf.exports=function(r,e,t){var i=new Bf(r,t||/[\\/\\.]/);return typeof e<\"u\"?i.match(e):i}});var qf=be((g3,Hf)=>{var x1=jf(),F1=/[\\/\\+\\.]/;Hf.exports=function(r,e){function t(i){var s=x1(i,r,F1);return s&&s.length>=2}return o(t,\"test\"),e?t(e.split(\";\")[0]):t}}
2);var fm=be((oE,pm)=>{function pr(r,e){typeof e==\"boolean\"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(r)),this._timeouts=r,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(pr,\"RetryOperation\");pm.exports=pr;pr.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};pr.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};pr.prototype.retry=function(r){if(this._timeout&&clearTimeout(this._timeout),!r)return!1;var e=new Date().getTime();if(r&&e-this._operationStart>=this._maxRetryTime)return this._errors.push(r),this._errors.unshift(new Error(\"RetryOperation timeout occurred\")),!1;this._errors.push(r);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),t=this._cachedTimeouts.slice(-1);else return!1;var i=this;return this._timer=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},t),this._options.unref&&this._timer.unref(),!0};pr.prototype.attempt=function(r,e){this._fn=r,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};pr.prototype.try=function(r){console.log(\"Using RetryOperation.try() is deprecated\"),this.attempt(r)};pr.prototype.start=function(r){console.log(\"Using RetryOperation.start() is deprecated\"),this.attempt(r)};pr.prototype.start=pr.prototype.try;pr.prototype.errors=function(){return this._errors};pr.prototype.attempts=function(){return this._attempts};pr.prototype.mainError=function(){if(this._errors.length===0)return null;for(var r={},e=null,t=0,i=0;i<this._errors.length;i++){var s=this._errors[i],n=s.message,a=(r[n]||0)+1;r[n]=a,a>=t&&(e=s,t=a)}return e}});var mm=be(ns=>{var J1=fm();ns.operation=function(r){var e=ns.timeouts(r);return new J1(e,{forever:r&&(r.forever||r.retries===1/0),unref:r&&r.unref,maxRetryTime:r&&r.maxRetryTime})};ns.timeouts=function(r){if(r instanceof Array)return[].concat(r);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in r)e[t]=r[t];if(e.minTimeout>e.maxTimeout)throw new Error(\"minTimeout is greater than maxTimeout\");for(var i=[],s=0;s<e.retries;s++)i.push(this.createTimeout(s,e));return r&&r.forever&&!i.length&&i.push(this.createTimeout(s,e)),i.sort(function(n,a){return n-a}),i};ns.createTimeout=function(r,e){var t=e.randomize?Math.random()+1:1,i=Math.round(t*Math.max(e.minTimeout,1)*Math.pow(e.factor,r));return i=Math.min(i,e.maxTimeout),i};ns.wrap=function(r,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var i in r)typeof r[i]==\"function\"&&t.push(i)}for(var s=0;s<t.length;s++){var n=t[s],a=r[n];r[n]=o(function(u){var h=ns.operation(e),d=Array.prototype.slice.call(arguments,1),m=d.pop();d.push(function(w){h.retry(w)||(w&&(arguments[0]=h.mainError()),m.apply(this,arguments))}),h.attempt(function(){u.apply(r,d)})},\"retryWrapper\").bind(r,a),r[n].options=e}}});var ym=be((uE,gm)=>{gm.exports=mm()});var kt=be((ZE,Dl)=>{(function(){\"use strict\";var r={}.hasOwnProperty;function e(){for(var s=\"\",n=0;n<arguments.length;n++){var a=arguments[n];a&&(s=i(s,t(a)))}return s}o(e,\"classNames\");function t(s){if(typeof s==\"string\"||typeof s==\"number\")return s;if(typeof s!=\"object\")return\"\";if(Array.isArray(s))return e.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var n=\"\";for(var a in s)r.call(s,a)&&s[a]&&(n=i(n,a));return n}o(t,\"parseValue\");function i(s,n){return n?s?s+\" \"+n:s+n:s}o(i,\"appendClass\"),typeof Dl<\"u\"&&Dl.exports?(e.default=e,Dl.exports=e):typeof define==\"function\"&&typeof define.amd==\"object\"&&define.amd?define(\"classnames\",[],function(){return e}):window.classNames=e})()});var jm=be((rC,Tc)=>{\"use strict\";var Iw=Object.prototype.hasOwnProperty,Dt=\"~\";function Pn(){}o(Pn,\"Events\");Object.create&&(Pn.prototype=Object.create(null),new Pn().__proto__||(Dt=!1));function Nw(r,e,t){this.fn=r,this.context=e,this.once=t||!1}o(Nw,\"EE\");function zm(r,e,t,i,s){if(typeof t!=\"function\")throw new TypeError(\"The listener must be a function\");var n=new Nw(t,i||r,s),a=Dt?Dt+e:e;return r._events[a]?r._events[a].fn?r._events[a]=[r._events[a],n]:r._events[a].push(n):(r._events[a]=n,r._eventsCount++),r}o(zm,\"addListener\");function jl(r,e){--r._eventsCount===0?r._events=new Pn:delete r._events[e]}o(jl,\"clearEvent\");function At(){this._events=new Pn,this._eventsCount=0}o(At,\"EventEmitter\");At.prototype.eventNames=o(function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)Iw.call(t,i)&&e.push(Dt?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},\"eventNames\");At.prototype.listeners=o(function(e){var t=Dt?Dt+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,n=i.length,a=new Array(n);s<n;s++)a[s]=i[s].fn;return a},\"listeners\");At.prototype.listenerCount=o(function(e){var t=Dt?Dt+e:e,i=this._events[t];return i?i.fn?1:i.length:0},\"listenerCount\");At.prototype.emit=o(function(e,t,i,s,n,a){var l=Dt?Dt+e:e;if(!this._events[l])return!1;var u=this._events[l],h=arguments.length,d,m;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),h){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,s),!0;case 5:return u.fn.call(u.context,t,i,s,n),!0;case 6:return u.fn.call(u.context,t,i,s,n,a),!0}for(m=1,d=new Array(h-1);m<h;m++)d[m-1]=arguments[m];u.fn.apply(u.context,d)}else{var w=u.length,y;for(m=0;m<w;m++)switch(u[m].once&&this.removeListener(e,u[m].fn,void 0,!0),h){case 1:u[m].fn.call(u[m].
2context);break;case 2:u[m].fn.call(u[m].context,t);break;case 3:u[m].fn.call(u[m].context,t,i);break;case 4:u[m].fn.call(u[m].context,t,i,s);break;default:if(!d)for(y=1,d=new Array(h-1);y<h;y++)d[y-1]=arguments[y];u[m].fn.apply(u[m].context,d)}}return!0},\"emit\");At.prototype.on=o(function(e,t,i){return zm(this,e,t,i,!1)},\"on\");At.prototype.once=o(function(e,t,i){return zm(this,e,t,i,!0)},\"once\");At.prototype.removeListener=o(function(e,t,i,s){var n=Dt?Dt+e:e;if(!this._events[n])return this;if(!t)return jl(this,n),this;var a=this._events[n];if(a.fn)a.fn===t&&(!s||a.once)&&(!i||a.context===i)&&jl(this,n);else{for(var l=0,u=[],h=a.length;l<h;l++)(a[l].fn!==t||s&&!a[l].once||i&&a[l].context!==i)&&u.push(a[l]);u.length?this._events[n]=u.length===1?u[0]:u:jl(this,n)}return this},\"removeListener\");At.prototype.removeAllListeners=o(function(e){var t;return e?(t=Dt?Dt+e:e,this._events[t]&&jl(this,t)):(this._events=new Pn,this._eventsCount=0),this},\"removeAllListeners\");At.prototype.off=At.prototype.removeListener;At.prototype.addListener=At.prototype.on;At.prefixed=Dt;At.EventEmitter=At;typeof Tc<\"u\"&&(Tc.exports=At)});var hy=be((kh,Uh)=>{(function(r,e){typeof kh==\"object\"&&typeof Uh<\"u\"?Uh.exports=e():typeof define==\"function\"&&define.amd?define(e):(r=r||self,r.Cropper=e())})(kh,function(){\"use strict\";function r(v){\"@babel/helpers - typeof\";return typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?r=o(function(p){return typeof p},\"_typeof\"):r=o(function(p){return p&&typeof Symbol==\"function\"&&p.constructor===Symbol&&p!==Symbol.prototype?\"symbol\":typeof p},\"_typeof\"),r(v)}o(r,\"_typeof\");function e(v,p){if(!(v instanceof p))throw new TypeError(\"Cannot call a class as a function\")}o(e,\"_classCallCheck\");function t(v,p){for(var g=0;g<p.length;g++){var f=p[g];f.enumerable=f.enumerable||!1,f.configurable=!0,\"value\"in f&&(f.writable=!0),Object.defineProperty(v,f.key,f)}}o(t,\"_defineProperties\");function i(v,p,g){return p&&t(v.prototype,p),g&&t(v,g),v}o(i,\"_createClass\");function s(v,p,g){return p in v?Object.defineProperty(v,p,{value:g,enumerable:!0,configurable:!0,writable:!0}):v[p]=g,v}o(s,\"_defineProperty\");function n(v,p){var g=Object.keys(v);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(v);p&&(f=f.filter(function(_){return Object.getOwnPropertyDescriptor(v,_).enumerable})),g.push.apply(g,f)}return g}o(n,\"ownKeys\");function a(v){for(var p=1;p<arguments.length;p++){var g=arguments[p]!=null?arguments[p]:{};p%2?n(Object(g),!0).forEach(function(f){s(v,f,g[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(v,Object.getOwnPropertyDescriptors(g)):n(Object(g)).forEach(function(f){Object.defineProperty(v,f,Object.getOwnPropertyDescriptor(g,f))})}return v}o(a,\"_objectSpread2\");function l(v){return u(v)||h(v)||d(v)||w()}o(l,\"_toConsumableArray\");function u(v){if(Array.isArray(v))return m(v)}o(u,\"_arrayWithoutHoles\");function h(v){if(typeof Symbol<\"u\"&&Symbol.iterator in Object(v))return Array.from(v)}o(h,\"_iterableToArray\");function d(v,p){if(v){if(typeof v==\"string\")return m(v,p);var g=Object.prototype.toString.call(v).slice(8,-1);if(g===\"Object\"&&v.constructor&&(g=v.constructor.name),g===\"Map\"||g===\"Set\")return Array.from(v);if(g===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return m(v,p)}}o(d,\"_unsupportedIterableToArray\");function m(v,p){(p==null||p>v.length)&&(p=v.length);for(var g=0,f=new Array(p);g<p;g++)f[g]=v[g];return f}o(m,\"_arrayLikeToArray\");function w(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}o(w,\"_nonIterableSpread\");var y=typeof window<\"u\"&&typeof window.document<\"u\",P=y?window:{},D=y&&P.document.documentElement?\"ontouchstart\"in P.document.documentElement:!1,C=y?\"PointerEvent\"in P:!1,O=\"cropper\",z=\"all\",X=\"crop\",K=\"move\",Z=\"zoom\",$=\"e\",W=\"w\",te=\"s\",se=\"n\",Ae=\"ne\",je=\"nw\",He=\"se\",xe=\"sw\",De=\"\".concat(O,\"-crop\"),ft=\"\".concat(O,\"-disabled\"),E=\"\".concat(O,\"-hidden\"),S=\"\".concat(O,\"-hide\"),F=\"\".concat(O,\"-invisible\"),I=\"\".concat(O,\"-modal\"),j=\"\".concat(O,\"-move\"),M=\"\".concat(O,\"Action\"),R=\"\".concat(O,\"Preview\"),T=\"crop\",A=\"move\",N=\"none\",G=\"crop\",Y=\"cropend\",Fe=\"cropmove\",ce=\"cropstart\",ue=\"dblclick\",he=D?\"touchstart\":\"mousedown\",Re=D?\"touchmove\":\"mousemove\",Ie=D?\"touchend touchcancel\":\"mouseup\",Ct=C?\"pointerdown\":he,qe=C?\"pointermove\":Re,oe=C?\"pointerup pointercancel\":Ie,Tt=\"ready\",Je=\"resize\",$r=\"wheel\",Gi=\"zoom\",Li=\"image/jpeg\",Ki=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Xi=/^data:/,Yi=/^data:image\\/jpeg;base64,/,Mi=/^img|canvas$/i,rt={viewMode:0,dragMode:T,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:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},lt='<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>',nl=Number.isNaN||P.isNaN;function de(v){return typeof v==\"number\"&&!nl(v)}o(de,\"isNumber\");var Wo=o(function(p){return p>0&&p<1/0},\"isPositiveNumber\");function no(v){return typeof v>\"u\"}o(no,\"isUndefined\");function Rr(v){return r(v)===\"object\"&&v!==null}o(Rr,\"isObject\");var al=Object.prototype.hasOwnProperty;function Vr(v){if(!Rr(v))return!1;try{var p=v.constructor,g=p.prototype;return p&&g&&al.call(g,\"isPrototypeOf\")}catch{return!1}}o(Vr,\"isPlainObject\");function mt(v){return typeof v==\"function\"}o(mt,\"isFunction\");var ll=Array.prototype.slice;function ul(v){return Array.from?Array.from(v):ll.call(v)}o(ul,\"toArray\");function $e(v,p){return v&&mt(p)&&(Array.isArray(v)||de(v.length)?ul(v).forEach(function(g,f){p.call(v,g,f,v)}):Rr(v)&&Object.keys(v).forEach(function(g){p.call(v,v[g],g,v)})),v}o($e,\"forEach\");var Ee=Object.assign||o(function(p){for(var g=arguments.length,f=new Array(g>1?g-1:0),_=1;_<g;_++)f[_-1]=arguments[_];return Rr(p)&&f.length>0&&f.forEach(function(b){Rr(b)&&Object.keys(b).forEach(function(x){p[x]=b[x]})}),p},\"assign\"),Lu=/\\.\\d*(?:0|9){12}\\d*$/;function kr(v){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Lu.test(v)?Math.round(v*p)/p:v}o(kr,\"normalizeDecimalNumber\");var cl=/^width|height|left|top|marginLeft|marginTop$/;function Sr(v,p){var g=v.style;$e(p,function(f,_){cl.test(_)&&de(f)&&(f=\"\".concat(f,\"px\")),g[_]=f})}o(Sr,\"setStyle\");function Go(v,p){return v.classList?v.classList.contains(p):v.className.indexOf(p)>-1}o(Go,\"hasClass\");function Ve(v,p){if(p){if(de(v.length)){$e(v,function(f){Ve(f,p)});return}if(v.classList){v.classList.add(p);return}var g=v.className.trim();g?g.indexOf(p)<0&&(v.className=\"\".concat(g,\" \").concat(p)):v.className=p}}o(Ve,\"addClass\");function Kt(v,p){if(p){if(de(v.length)){$e(v,function(g){Kt(g,p)});return}if(v.classList){v.classList.remove(p);return}v.className.indexOf(p)>=0&&(v.className=v.className.replace(p,\"\"))}}o(Kt,\"removeClass\");function Wr(v,p,g){if(p){if(de(v.length)){$e(v,function(f){Wr(f,p,g)});return}g?Ve(v,p):Kt(v,p)}}o(Wr,\"toggleClass\");var hl=/([a-z\\d])([A-Z])/g;function ao(v){return v.replace(hl,\"$1-$2\").toLowerCase()}o(ao,\"toParamCase\");function lo(v,p){return Rr(v[p])?v[p]:v.dataset?v.dataset[p]:v.getAttribute(\"data-\".concat(ao(p)))}o(lo,\"getData\");function uo(v,p,g){Rr(g)?v[p]=g:v.dataset?v.dataset[p]=g:v.setAttribute(\"data-\".concat(ao(p)),g)}o(uo,\"setData\");function Ji(v,p){if(Rr(v[p]))try{delete v[p]}catch{v[p]=void 0}else if(v.dataset)try{delete v.dataset[p]}catch{v.dataset[p]=void 0}else v.removeAttribute(\"data-\".concat(ao(p)))}o(Ji,\"removeData\");var Ko=/\\s\\s*/,Xo=function(){var v=!1;if(y){var p=!1,g=o(function(){},\"listener\"),f=Object.defineProperty({},\"once\",{get:o(function(){return v=!0,p},\"get\"),set:o(function(b){p=b},\"set\")});P.addEventListener(\"test\",g,f),P.removeEventListener(\"test\",g,f)}return v}();function ut(v,p,g){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=g;
2p.trim().split(Ko).forEach(function(b){if(!Xo){var x=v.listeners;x&&x[b]&&x[b][g]&&(_=x[b][g],delete x[b][g],Object.keys(x[b]).length===0&&delete x[b],Object.keys(x).length===0&&delete v.listeners)}v.removeEventListener(b,_,f)})}o(ut,\"removeListener\");function Ot(v,p,g){var f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=g;p.trim().split(Ko).forEach(function(b){if(f.once&&!Xo){var x=v.listeners,k=x===void 0?{}:x;_=o(function(){delete k[b][g],v.removeEventListener(b,_,f);for(var B=arguments.length,L=new Array(B),U=0;U<B;U++)L[U]=arguments[U];g.apply(v,L)},\"handler\"),k[b]||(k[b]={}),k[b][g]&&v.removeEventListener(b,k[b][g],f),k[b][g]=_,v.listeners=k}v.addEventListener(b,_,f)})}o(Ot,\"addListener\");function cr(v,p,g){var f;return mt(Event)&&mt(CustomEvent)?f=new CustomEvent(p,{detail:g,bubbles:!0,cancelable:!0}):(f=document.createEvent(\"CustomEvent\"),f.initCustomEvent(p,!0,!0,g)),v.dispatchEvent(f)}o(cr,\"dispatchEvent\");function Hp(v){var p=v.getBoundingClientRect();return{left:p.left+(window.pageXOffset-document.documentElement.clientLeft),top:p.top+(window.pageYOffset-document.documentElement.clientTop)}}o(Hp,\"getOffset\");var Mu=P.location,Y0=/^(\\w+:)\\/\\/([^:/?#]*):?(\\d*)/i;function qp(v){var p=v.match(Y0);return p!==null&&(p[1]!==Mu.protocol||p[2]!==Mu.hostname||p[3]!==Mu.port)}o(qp,\"isCrossOriginURL\");function $p(v){var p=\"timestamp=\".concat(new Date().getTime());return v+(v.indexOf(\"?\")===-1?\"?\":\"&\")+p}o($p,\"addTimestamp\");function Yo(v){var p=v.rotate,g=v.scaleX,f=v.scaleY,_=v.translateX,b=v.translateY,x=[];de(_)&&_!==0&&x.push(\"translateX(\".concat(_,\"px)\")),de(b)&&b!==0&&x.push(\"translateY(\".concat(b,\"px)\")),de(p)&&p!==0&&x.push(\"rotate(\".concat(p,\"deg)\")),de(g)&&g!==1&&x.push(\"scaleX(\".concat(g,\")\")),de(f)&&f!==1&&x.push(\"scaleY(\".concat(f,\")\"));var k=x.length?x.join(\" \"):\"none\";return{WebkitTransform:k,msTransform:k,transform:k}}o(Yo,\"getTransforms\");function J0(v){var p=a({},v),g=[];return $e(v,function(f,_){delete p[_],$e(p,function(b){var x=Math.abs(f.startX-b.startX),k=Math.abs(f.startY-b.startY),q=Math.abs(f.endX-b.endX),B=Math.abs(f.endY-b.endY),L=Math.sqrt(x*x+k*k),U=Math.sqrt(q*q+B*B),H=(U-L)/L;g.push(H)})}),g.sort(function(f,_){return Math.abs(f)<Math.abs(_)}),g[0]}o(J0,\"getMaxZoomRatio\");function dl(v,p){var g=v.pageX,f=v.pageY,_={endX:g,endY:f};return p?_:a({startX:g,startY:f},_)}o(dl,\"getPointer\");function Q0(v){var p=0,g=0,f=0;return $e(v,function(_){var b=_.startX,x=_.startY;p+=b,g+=x,f+=1}),p/=f,g/=f,{pageX:p,pageY:g}}o(Q0,\"getPointersCenter\");function Bi(v){var p=v.aspectRatio,g=v.height,f=v.width,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:\"contain\",b=Wo(f),x=Wo(g);if(b&&x){var k=g*p;_===\"contain\"&&k>f||_===\"cover\"&&k<f?g=f/p:f=g*p}else b?g=f/p:x&&(f=g*p);return{width:f,height:g}}o(Bi,\"getAdjustedSizes\");function Z0(v){var p=v.width,g=v.height,f=v.degree;if(f=Math.abs(f)%180,f===90)return{width:g,height:p};var _=f%90*Math.PI/180,b=Math.sin(_),x=Math.cos(_),k=p*x+g*b,q=p*b+g*x;return f>90?{width:q,height:k}:{width:k,height:q}}o(Z0,\"getRotatedSizes\");function eb(v,p,g,f){var _=p.aspectRatio,b=p.naturalWidth,x=p.naturalHeight,k=p.rotate,q=k===void 0?0:k,B=p.scaleX,L=B===void 0?1:B,U=p.scaleY,H=U===void 0?1:U,ge=g.aspectRatio,me=g.naturalWidth,ke=g.naturalHeight,Se=f.fillColor,it=Se===void 0?\"transparent\":Se,ct=f.imageSmoothingEnabled,Qe=ct===void 0?!0:ct,Gr=f.imageSmoothingQuality,Xt=Gr===void 0?\"low\":Gr,V=f.maxWidth,Pe=V===void 0?1/0:V,st=f.maxHeight,hr=st===void 0?1/0:st,Kr=f.minWidth,Qi=Kr===void 0?0:Kr,Zi=f.minHeight,zi=Zi===void 0?0:Zi,Ur=document.createElement(\"canvas\"),Ht=Ur.getContext(\"2d\"),es=Bi({aspectRatio:ge,width:Pe,height:hr}),pl=Bi({aspectRatio:ge,width:Qi,height:zi},\"cover\"),Bu=Math.min(es.width,Math.max(pl.width,me)),zu=Math.min(es.height,Math.max(pl.height,ke)),Gp=Bi({aspectRatio:_,width:Pe,height:hr}),Kp=Bi({aspectRatio:_,width:Qi,height:zi},\"cover\"),Xp=Math.min(Gp.width,Math.max(Kp.width,b)),Yp=Math.min(Gp.height,Math.max(Kp.height,x)),fb=[-Xp/2,-Yp/2,Xp,Yp];return Ur.width=kr(Bu),Ur.height=kr(zu),Ht.fillStyle=it,Ht.fillRect(0,0,Bu,zu),Ht.save(),Ht.translate(Bu/2,zu/2),Ht.rotate(q*Math.PI/180),Ht.scale(L,H),Ht.imageSmoothingEnabled=Qe,Ht.imageSmoothingQuality=Xt,Ht.drawImage.apply(Ht,[v].concat(l(fb.map(function(mb){return Math.floor(kr(mb))}
2)))),Ht.restore(),Ur}o(eb,\"getSourceCanvas\");var Vp=String.fromCharCode;function tb(v,p,g){var f=\"\";g+=p;for(var _=p;_<g;_+=1)f+=Vp(v.getUint8(_));return f}o(tb,\"getStringFromCharCode\");var rb=/^data:.*,/;function ib(v){var p=v.replace(rb,\"\"),g=atob(p),f=new ArrayBuffer(g.length),_=new Uint8Array(f);return $e(_,function(b,x){_[x]=g.charCodeAt(x)}),f}o(ib,\"dataURLToArrayBuffer\");function sb(v,p){for(var g=[],f=8192,_=new Uint8Array(v);_.length>0;)g.push(Vp.apply(null,ul(_.subarray(0,f)))),_=_.subarray(f);return\"data:\".concat(p,\";base64,\").concat(btoa(g.join(\"\")))}o(sb,\"arrayBufferToDataURL\");function ob(v){var p=new DataView(v),g;try{var f,_,b;if(p.getUint8(0)===255&&p.getUint8(1)===216)for(var x=p.byteLength,k=2;k+1<x;){if(p.getUint8(k)===255&&p.getUint8(k+1)===225){_=k;break}k+=1}if(_){var q=_+4,B=_+10;if(tb(p,q,4)===\"Exif\"){var L=p.getUint16(B);if(f=L===18761,(f||L===19789)&&p.getUint16(B+2,f)===42){var U=p.getUint32(B+4,f);U>=8&&(b=B+U)}}}if(b){var H=p.getUint16(b,f),ge,me;for(me=0;me<H;me+=1)if(ge=b+me*12+2,p.getUint16(ge,f)===274){ge+=8,g=p.getUint16(ge,f),p.setUint16(ge,1,f);break}}}catch{g=1}return g}o(ob,\"resetAndGetOrientation\");function nb(v){var p=0,g=1,f=1;switch(v){case 2:g=-1;break;case 3:p=-180;break;case 4:f=-1;break;case 5:p=90,f=-1;break;case 6:p=90;break;case 7:p=90,g=-1;break;case 8:p=-90;break}return{rotate:p,scaleX:g,scaleY:f}}o(nb,\"parseOrientation\");var ab={render:o(function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},\"render\"),initContainer:o(function(){var p=this.element,g=this.options,f=this.container,_=this.cropper;Ve(_,E),Kt(p,E);var b={width:Math.max(f.offsetWidth,Number(g.minContainerWidth)||200),height:Math.max(f.offsetHeight,Number(g.minContainerHeight)||100)};this.containerData=b,Sr(_,{width:b.width,height:b.height}),Ve(p,E),Kt(_,E)},\"initContainer\"),initCanvas:o(function(){var p=this.containerData,g=this.imageData,f=this.options.viewMode,_=Math.abs(g.rotate)%180===90,b=_?g.naturalHeight:g.naturalWidth,x=_?g.naturalWidth:g.naturalHeight,k=b/x,q=p.width,B=p.height;p.height*k>p.width?f===3?q=p.height*k:B=p.width/k:f===3?B=p.width/k:q=p.height*k;var L={aspectRatio:k,naturalWidth:b,naturalHeight:x,width:q,height:B};L.left=(p.width-q)/2,L.top=(p.height-B)/2,L.oldLeft=L.left,L.oldTop=L.top,this.canvasData=L,this.limited=f===1||f===2,this.limitCanvas(!0,!0),this.initialImageData=Ee({},g),this.initialCanvasData=Ee({},L)},\"initCanvas\"),limitCanvas:o(function(p,g){var f=this.options,_=this.containerData,b=this.canvasData,x=this.cropBoxData,k=f.viewMode,q=b.aspectRatio,B=this.cropped&&x;if(p){var L=Number(f.minCanvasWidth)||0,U=Number(f.minCanvasHeight)||0;k>1?(L=Math.max(L,_.width),U=Math.max(U,_.height),k===3&&(U*q>L?L=U*q:U=L/q)):k>0&&(L?L=Math.max(L,B?x.width:0):U?U=Math.max(U,B?x.height:0):B&&(L=x.width,U=x.height,U*q>L?L=U*q:U=L/q));var H=Bi({aspectRatio:q,width:L,height:U});L=H.width,U=H.height,b.minWidth=L,b.minHeight=U,b.maxWidth=1/0,b.maxHeight=1/0}if(g)if(k>(B?0:1)){var ge=_.width-b.width,me=_.height-b.height;b.minLeft=Math.min(0,ge),b.minTop=Math.min(0,me),b.maxLeft=Math.max(0,ge),b.maxTop=Math.max(0,me),B&&this.limited&&(b.minLeft=Math.min(x.left,x.left+(x.width-b.width)),b.minTop=Math.min(x.top,x.top+(x.height-b.height)),b.maxLeft=x.left,b.maxTop=x.top,k===2&&(b.width>=_.width&&(b.minLeft=Math.min(0,ge),b.maxLeft=Math.max(0,ge)),b.height>=_.height&&(b.minTop=Math.min(0,me),b.maxTop=Math.max(0,me))))}else b.minLeft=-b.width,b.minTop=-b.height,b.maxLeft=_.width,b.maxTop=_.height},\"limitCanvas\"),renderCanvas:o(function(p,g){var f=this.canvasData,_=this.imageData;if(g){var b=Z0({width:_.naturalWidth*Math.abs(_.scaleX||1),height:_.naturalHeight*Math.abs(_.scaleY||1),degree:_.rotate||0}),x=b.width,k=b.height,q=f.width*(x/f.naturalWidth),B=f.height*(k/f.naturalHeight);f.left-=(q-f.width)/2,f.top-=(B-f.height)/2,f.width=q,f.height=B,f.aspectRatio=x/k,f.naturalWidth=x,f.naturalHeight=k,this.limitCanvas(!0,!1)}(f.width>f.maxWidth||f.width<f.minWidth)&&(f.left=f.oldLeft),(f.height>f.maxHeight||f.height<f.minHeight)&&(f.top=f.oldTop),f.width=Math.min(Math.max(f.width,f.minWidth),f.maxWidth),f.height=Math.min(Math.max(f.height,f.minHeight),f.maxHeight),this.limitCanvas(!1,!0),f.left=Math.min(Math.max(f.left,f.minLeft),f.maxLeft),f.top=Math.min(Math.max(f.top,f.minTop),f.maxTop),f.oldLeft=f.left,f.oldTop=f.top,Sr(this.canvas,Ee({width:f.width,height:f.height},Yo({translateX:f.left,translateY:f.top}))),this.renderImage(p),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},\"renderCanvas\"),renderImage:o(function(p){var g=this.canvasData,f=this.imageData,_=f.naturalWi
2dth*(g.width/g.naturalWidth),b=f.naturalHeight*(g.height/g.naturalHeight);Ee(f,{width:_,height:b,left:(g.width-_)/2,top:(g.height-b)/2}),Sr(this.image,Ee({width:f.width,height:f.height},Yo(Ee({translateX:f.left,translateY:f.top},f)))),p&&this.output()},\"renderImage\"),initCropBox:o(function(){var p=this.options,g=this.canvasData,f=p.aspectRatio||p.initialAspectRatio,_=Number(p.autoCropArea)||.8,b={width:g.width,height:g.height};f&&(g.height*f>g.width?b.height=b.width/f:b.width=b.height*f),this.cropBoxData=b,this.limitCropBox(!0,!0),b.width=Math.min(Math.max(b.width,b.minWidth),b.maxWidth),b.height=Math.min(Math.max(b.height,b.minHeight),b.maxHeight),b.width=Math.max(b.minWidth,b.width*_),b.height=Math.max(b.minHeight,b.height*_),b.left=g.left+(g.width-b.width)/2,b.top=g.top+(g.height-b.height)/2,b.oldLeft=b.left,b.oldTop=b.top,this.initialCropBoxData=Ee({},b)},\"initCropBox\"),limitCropBox:o(function(p,g){var f=this.options,_=this.containerData,b=this.canvasData,x=this.cropBoxData,k=this.limited,q=f.aspectRatio;if(p){var B=Number(f.minCropBoxWidth)||0,L=Number(f.minCropBoxHeight)||0,U=k?Math.min(_.width,b.width,b.width+b.left,_.width-b.left):_.width,H=k?Math.min(_.height,b.height,b.height+b.top,_.height-b.top):_.height;B=Math.min(B,_.width),L=Math.min(L,_.height),q&&(B&&L?L*q>B?L=B/q:B=L*q:B?L=B/q:L&&(B=L*q),H*q>U?H=U/q:U=H*q),x.minWidth=Math.min(B,U),x.minHeight=Math.min(L,H),x.maxWidth=U,x.maxHeight=H}g&&(k?(x.minLeft=Math.max(0,b.left),x.minTop=Math.max(0,b.top),x.maxLeft=Math.min(_.width,b.left+b.width)-x.width,x.maxTop=Math.min(_.height,b.top+b.height)-x.height):(x.minLeft=0,x.minTop=0,x.maxLeft=_.width-x.width,x.maxTop=_.height-x.height))},\"limitCropBox\"),renderCropBox:o(function(){var p=this.options,g=this.containerData,f=this.cropBoxData;(f.width>f.maxWidth||f.width<f.minWidth)&&(f.left=f.oldLeft),(f.height>f.maxHeight||f.height<f.minHeight)&&(f.top=f.oldTop),f.width=Math.min(Math.max(f.width,f.minWidth),f.maxWidth),f.height=Math.min(Math.max(f.height,f.minHeight),f.maxHeight),this.limitCropBox(!1,!0),f.left=Math.min(Math.max(f.left,f.minLeft),f.maxLeft),f.top=Math.min(Math.max(f.top,f.minTop),f.maxTop),f.oldLeft=f.left,f.oldTop=f.top,p.movable&&p.cropBoxMovable&&uo(this.face,M,f.width>=g.width&&f.height>=g.height?K:z),Sr(this.cropBox,Ee({width:f.width,height:f.height},Yo({translateX:f.left,translateY:f.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},\"renderCropBox\"),output:o(function(){this.preview(),cr(this.element,G,this.getData())},\"output\")},lb={initPreview:o(function(){var p=this.element,g=this.crossOrigin,f=this.options.preview,_=g?this.crossOriginUrl:this.url,b=p.alt||\"The image to preview\",x=document.createElement(\"img\");if(g&&(x.crossOrigin=g),x.src=_,x.alt=b,this.viewBox.appendChild(x),this.viewBoxImage=x,!!f){var k=f;typeof f==\"string\"?k=p.ownerDocument.querySelectorAll(f):f.querySelector&&(k=[f]),this.previews=k,$e(k,function(q){var B=document.createElement(\"img\");uo(q,R,{width:q.offsetWidth,height:q.offsetHeight,html:q.innerHTML}),g&&(B.crossOrigin=g),B.src=_,B.alt=b,B.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;\"',q.innerHTML=\"\",q.appendChild(B)})}},\"initPreview\"),resetPreview:o(function(){$e(this.previews,function(p){var g=lo(p,R);Sr(p,{width:g.width,height:g.height}),p.innerHTML=g.html,Ji(p,R)})},\"resetPreview\"),preview:o(function(){var p=this.imageData,g=this.canvasData,f=this.cropBoxData,_=f.width,b=f.height,x=p.width,k=p.height,q=f.left-g.left-p.left,B=f.top-g.top-p.top;!this.cropped||this.disabled||(Sr(this.viewBoxImage,Ee({width:x,height:k},Yo(Ee({translateX:-q,translateY:-B},p)))),$e(this.previews,function(L){var U=lo(L,R),H=U.width,ge=U.height,me=H,ke=ge,Se=1;_&&(Se=H/_,ke=b*Se),b&&ke>ge&&(Se=ge/b,me=_*Se,ke=ge),Sr(L,{width:me,height:ke}),Sr(L.getElementsByTagName(\"img\")[0],Ee({width:x*Se,height:k*Se},Yo(Ee({translateX:-q*Se,translateY:-B*Se},p))))}))},\"preview\")},ub={bind:o(function(){var p=this.element,g=this.options,f=this.cropper;mt(g.cropstart)&&Ot(p,ce,g.cropstart),mt(g.cropmove)&&Ot(p,Fe,g.cropmove),mt(g.cropend)&&Ot(p,Y,g.cropend),mt(g.crop)&&Ot(p,G,g.crop),mt(g.zoom)&&Ot(p,Gi,g.zoom),Ot(f,Ct,this.onCropStart=this.cropStart.bind(this)),g.zoomable&&g.zoomOnWheel&&Ot(f,$r,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),g.toggleDragModeOnDblclick&&Ot(f,ue,this.onDblclick=this.dblclick.bind(this)),Ot(p.ownerDocument,qe,this.onCropMove=this.cropMove.bind(this)),Ot(p.ownerDocument,oe,this.onCropEnd=this.cropEnd.bind(this)),g.responsive&&Ot(window,Je,this.onResize=this.resize.bind(this))},\"bind\"),unbind:o(function(){var p=this.element,g=this.options,f=this.cropper;mt(g.cropstart)&&ut(p,ce,g.cropstart),mt(g.cropmove)&&ut(p,Fe,g.cropmove),mt(g.cropend)&&ut(p,Y,g.cropend),mt(g.crop)&&ut(p,G,g.crop),mt(g.zoom)&&ut(p,Gi,g.zoom),ut(f,Ct,this.onCropStart),g.zoomable&&g.zoomOnWheel&&ut(f,$r,this.onWheel,{passive:!1,capture:!0}),g.toggleDragModeOnDblclick&&ut(f,ue,this.onDblclick),ut(p.ownerDocument,qe,this.onCropMove),ut(p.ownerDocument,oe,this.onCropEnd),g.responsive&&ut(window,Je,this.onResize)},\"unbind\")},cb={resize:o(function(){if(!this.disabled){var p=this.options,g=this.container,f=this.containerData,_=g.offsetWidth/f.width;if(_!==1||g.offsetHeight!==f.height){var b,x;p.restore&&(b=this.getCanvasData(),x=this.getCropBoxData()),this.render(),p.restore&&(this.setCanvasData($e(b,function(k,q){b[q]=k*_})),this.setCropBoxData($e(x,function(k,q){x[q]=k*_})))}}},\"resize\"),dblclick:o(function(){this.disabled||this.options.dragMode===N||this.setDragMode(Go(this.dragBox,De)?A:T)},\"dblclick\"),wheel:o(function(p){var g=this,f=Number(this.options.wheelZoomRatio)||.1,_=1;this.disabled||(p.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){g.wheeling=!1},50),p.deltaY?_=p.deltaY>0?1:-1:p.wheelDelta?_=-p.wheelDelta/120:p.detail&&(_=p.detail>0?1:-1),this.zoom(-_*f,p)))},\"wheel\"),cropStart:o(function(p){var g=p.buttons,f=p.button;if(!(this.disabled||(p.type===\"mousedown\"||p.type===\"pointerdown\"&&p.pointerType===\"mouse\")&&(de(g)&&g!==1||de(f)&&f!==0||p.ctrlKey))){var _=this.options,b=this.pointers,x;p.changedTouches?$e(p.changedTouches,function(k){b[k.identifier]=dl(k)}):b[p.pointerId||0]=dl(p),Object.keys(b).length>1&&_.zoomable&&_.zoomOnTouch?x=Z:x=lo(p.target,M),Ki.test(x)&&cr(this.element,ce,{originalEvent:p,action:x})!==!1&&(p.preventDefault(),this.action=x,this.cropping=!1,x===X&&(this.cropping=!0,Ve(this.dragBox,I)))}},\"cropStart\"),cropMove:o(function(p){var g=this.action;if(!(this.disabled||!g)){var f=this.pointers;p.preventDefault(),cr(this.element,Fe,{originalEvent:p,action:g})!==!1&&(p.changedTouches?$e(p.changedTouches,function(_){Ee(f[_.identifier]||{},dl(_,!0))}):Ee(f[p.pointerId||0]||{},dl(p,!0)),this.change(p))}},\"cropMove\"),cropEnd:o(function(p){if(!this.disabled){var g=this.action,f=this.pointers;p.changedTouches?$e(p.changedTouches,function(_){delete f[_.identifier]}):delete f[p.pointerId||0],g&&(p.preventDefault(),Object.keys(f).length||(this.action=\"\"),this.cropping&&(this.cropping=!1,Wr(this.dragBox,I,this.cropped&&this.options.modal)),cr(this.element,Y,{originalEvent:p,action:g}))}},\"cropEnd\")},hb={change:o(function(p){var g=this.options,f=this.canvasData,_=this.containerData,b=this.cropBoxData,x=this.pointers,k=this.action,q=g.aspectRatio,B=b.left,L=b.top,U=b.width,H=b.height,ge=B+U,me=L+H,ke=0,Se=0,it=_.width,ct=_.height,Qe=!0,Gr;!q&&p.shiftKey&&(q=U&&H?U/H:1),this.limited&&(ke=b.minLeft,Se=b.minTop,it=ke+Math.min(_.width,f.width,f.left+f.width),ct=Se+Math.min(_.height,f.height,f.top+f.height));var Xt=x[Object.keys(x)[0]],V={x:Xt.endX-Xt.startX,y:Xt.endY-Xt.startY},Pe=o(function(hr){switch(hr){case $:ge+V.x>it&&(V.x=it-ge);break;case W:B+V.x<ke&&(V.x=ke-B);break;case se:L+V.y<Se&&(V.y=Se-L);break;case te:me+V.y>ct&&(V.y=ct-me);break}},\"check\");switch(k){case z:B+=V.x,L+=V.y;break;case $:if(V.x>=0&&(ge>=it||q&&(L<=Se||me>=ct))){Qe=!1;break}Pe($),U+=V.x,U<0&&(k=W,U=-U,B-=U),q&&(H=U/q,L+=(b.height-H)/2);break;case se:if(V.y<=0&&(L<=Se||q&&(B<=ke||ge>=it))){Qe=!1;break}
vendor: 16,008 bytes, line 2
2Pe(se),H-=V.y,L+=V.y,H<0&&(k=te,H=-H,L-=H),q&&(U=H*q,B+=(b.width-U)/2);break;case W:if(V.x<=0&&(B<=ke||q&&(L<=Se||me>=ct))){Qe=!1;break}Pe(W),U-=V.x,B+=V.x,U<0&&(k=$,U=-U,B-=U),q&&(H=U/q,L+=(b.height-H)/2);break;case te:if(V.y>=0&&(me>=ct||q&&(B<=ke||ge>=it))){Qe=!1;break}Pe(te),H+=V.y,H<0&&(k=se,H=-H,L-=H),q&&(U=H*q,B+=(b.width-U)/2);break;case Ae:if(q){if(V.y<=0&&(L<=Se||ge>=it)){Qe=!1;break}Pe(se),H-=V.y,L+=V.y,U=H*q}else Pe(se),Pe($),V.x>=0?ge<it?U+=V.x:V.y<=0&&L<=Se&&(Qe=!1):U+=V.x,V.y<=0?L>Se&&(H-=V.y,L+=V.y):(H-=V.y,L+=V.y);U<0&&H<0?(k=xe,H=-H,U=-U,L-=H,B-=U):U<0?(k=je,U=-U,B-=U):H<0&&(k=He,H=-H,L-=H);break;case je:if(q){if(V.y<=0&&(L<=Se||B<=ke)){Qe=!1;break}Pe(se),H-=V.y,L+=V.y,U=H*q,B+=b.width-U}else Pe(se),Pe(W),V.x<=0?B>ke?(U-=V.x,B+=V.x):V.y<=0&&L<=Se&&(Qe=!1):(U-=V.x,B+=V.x),V.y<=0?L>Se&&(H-=V.y,L+=V.y):(H-=V.y,L+=V.y);U<0&&H<0?(k=He,H=-H,U=-U,L-=H,B-=U):U<0?(k=Ae,U=-U,B-=U):H<0&&(k=xe,H=-H,L-=H);break;case xe:if(q){if(V.x<=0&&(B<=ke||me>=ct)){Qe=!1;break}Pe(W),U-=V.x,B+=V.x,H=U/q}else Pe(te),Pe(W),V.x<=0?B>ke?(U-=V.x,B+=V.x):V.y>=0&&me>=ct&&(Qe=!1):(U-=V.x,B+=V.x),V.y>=0?me<ct&&(H+=V.y):H+=V.y;U<0&&H<0?(k=Ae,H=-H,U=-U,L-=H,B-=U):U<0?(k=He,U=-U,B-=U):H<0&&(k=je,H=-H,L-=H);break;case He:if(q){if(V.x>=0&&(ge>=it||me>=ct)){Qe=!1;break}Pe($),U+=V.x,H=U/q}else Pe(te),Pe($),V.x>=0?ge<it?U+=V.x:V.y>=0&&me>=ct&&(Qe=!1):U+=V.x,V.y>=0?me<ct&&(H+=V.y):H+=V.y;U<0&&H<0?(k=je,H=-H,U=-U,L-=H,B-=U):U<0?(k=xe,U=-U,B-=U):H<0&&(k=Ae,H=-H,L-=H);break;case K:this.move(V.x,V.y),Qe=!1;break;case Z:this.zoom(J0(x),p),Qe=!1;break;case X:if(!V.x||!V.y){Qe=!1;break}Gr=Hp(this.cropper),B=Xt.startX-Gr.left,L=Xt.startY-Gr.top,U=b.minWidth,H=b.minHeight,V.x>0?k=V.y>0?He:Ae:V.x<0&&(B-=U,k=V.y>0?xe:je),V.y<0&&(L-=H),this.cropped||(Kt(this.cropBox,E),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}Qe&&(b.width=U,b.height=H,b.left=B,b.top=L,this.action=k,this.renderCropBox()),$e(x,function(st){st.startX=st.endX,st.startY=st.endY})},\"change\")},db={crop:o(function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Ve(this.dragBox,I),Kt(this.cropBox,E),this.setCropBoxData(this.initialCropBoxData)),this},\"crop\"),reset:o(function(){return this.ready&&!this.disabled&&(this.imageData=Ee({},this.initialImageData),this.canvasData=Ee({},this.initialCanvasData),this.cropBoxData=Ee({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},\"reset\"),clear:o(function(){return this.cropped&&!this.disabled&&(Ee(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Kt(this.dragBox,I),Ve(this.cropBox,E)),this},\"clear\"),replace:o(function(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&p&&(this.isImg&&(this.element.src=p),g?(this.url=p,this.image.src=p,this.ready&&(this.viewBoxImage.src=p,$e(this.previews,function(f){f.getElementsByTagName(\"img\")[0].src=p}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(p))),this},\"replace\"),enable:o(function(){return this.ready&&this.disabled&&(this.disabled=!1,Kt(this.cropper,ft)),this},\"enable\"),disable:o(function(){return this.ready&&!this.disabled&&(this.disabled=!0,Ve(this.cropper,ft)),this},\"disable\"),destroy:o(function(){var p=this.element;return p[O]?(p[O]=void 0,this.isImg&&this.replaced&&(p.src=this.originalUrl),this.uncreate(),this):this},\"destroy\"),move:o(function(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,f=this.canvasData,_=f.left,b=f.top;return this.moveTo(no(p)?p:_+Number(p),no(g)?g:b+Number(g))},\"move\"),moveTo:o(function(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,f=this.canvasData,_=!1;return p=Number(p),g=Number(g),this.ready&&!this.disabled&&this.options.movable&&(de(p)&&(f.left=p,_=!0),de(g)&&(f.top=g,_=!0),_&&this.renderCanvas(!0)),this},\"moveTo\"),zoom:o(function(p,g){var f=this.canvasData;return p=Number(p),p<0?p=1/(1-p):p=1+p,this.zoomTo(f.width*p/f.naturalWidth,null,g)},\"zoom\"),zoomTo:o(function(p,g,f){var _=this.options,b=this.canvasData,x=b.width,k=b.height,q=b.naturalWidth,B=b.naturalHeight;if(p=Number(p),p>=0&&this.ready&&!this.disabled&&_.zoomable){var L=q*p,U=B*p;if(cr(this.element,Gi,{ratio:p,oldRatio:x/q,originalEvent:f})===!1)return this;if(f){var H=this.pointers,ge=Hp(this.cropper),me=H&&Object.keys(H).length?Q0(H):{pageX:f.pageX,pageY:f.pageY};b.left-=(L-x)*((me.pageX-ge.left-b.left)/x),b.top-=(U-k)*((me.pageY-ge.top-b.top)/k)}else Vr(g)&&de(g.x)&&de(g.y)?(b.left-=(L-x)*((g.x-b.left)/x),b.top-=(U-k)*((g.y-b.top)/k)):(b.left-=(L-x)/2,b.top-=(U-k)/2);b.width=L,b.height=U,this.renderCanvas(!0)}return this},\"zoomTo\"),rotate:o(function(p){return this.rotateTo((this.imageData.rotate||0)+Number(p))},\"rotate\"),rotateTo:o(function(p){return p=Number(p),de(p)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=p%360,this.renderCanvas(!0,!0)),this},\"rotateTo\"),scaleX:o(function(p){var g=this.imageData.scaleY;return this.scale(p,de(g)?g:1)},\"scaleX\"),scaleY:o(function(p){var g=this.imageData.scaleX;return this.scale(de(g)?g:1,p)},\"scaleY\"),scale:o(function(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p,f=this.imageData,_=!1;return p=Number(p),g=Number(g),this.ready&&!this.disabled&&this.options.scalable&&(de(p)&&(f.scaleX=p,_=!0),de(g)&&(f.scaleY=g,_=!0),_&&this.renderCanvas(!0,!0)),this},\"scale\"),getData:o(function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,g=this.options,f=this.imageData,_=this.canvasData,b=this.cropBoxData,x;if(this.ready&&this.cropped){x={x:b.left-_.left,y:b.top-_.top,width:b.width,height:b.height};var k=f.width/f.naturalWidth;if($e(x,function(L,U){x[U]=L/k}),p){var q=Math.round(x.y+x.height),B=Math.round(x.x+x.width);x.x=Math.round(x.x),x.y=Math.round(x.y),x.width=B-x.x,x.height=q-x.y}}else x={x:0,y:0,width:0,height:0};return g.rotatable&&(x.rotate=f.rotate||0),g.scalable&&(x.scaleX=f.scaleX||1,x.scaleY=f.scaleY||1),x},\"getData\"),setData:o(function(p){var g=this.options,f=this.imageData,_=this.canvasData,b={};if(this.ready&&!this.disabled&&Vr(p)){var x=!1;g.rotatable&&de(p.rotate)&&p.rotate!==f.rotate&&(f.rotate=p.rotate,x=!0),g.scalable&&(de(p.scaleX)&&p.scaleX!==f.scaleX&&(f.scaleX=p.scaleX,x=!0),de(p.scaleY)&&p.scaleY!==f.scaleY&&(f.scaleY=p.scaleY,x=!0)),x&&this.renderCanvas(!0,!0);var k=f.width/f.naturalWidth;de(p.x)&&(b.left=p.x*k+_.left),de(p.y)&&(b.top=p.y*k+_.top),de(p.width)&&(b.width=p.width*k),de(p.height)&&(b.height=p.height*k),this.setCropBoxData(b)}return this},\"setData\"),getContainerData:o(function(){return this.ready?Ee({},this.containerData):{}},\"getContainerData\"),getImageData:o(function(){return this.sized?Ee({},this.imageData):{}},\"getImageData\"),getCanvasData:o(function(){var p=this.canvasData,g={};return this.ready&&$e([\"left\",\"top\",\"width\",\"height\",\"naturalWidth\",\"naturalHeight\"],function(f){g[f]=p[f]}),g},\"getCanvasData\"),setCanvasData:o(function(p){var g=this.canvasData,f=g.aspectRatio;return this.ready&&!this.disabled&&Vr(p)&&(de(p.left)&&(g.left=p.left),de(p.top)&&(g.top=p.top),de(p.width)?(g.width=p.width,g.height=p.width/f):de(p.height)&&(g.height=p.height,g.width=p.height*f),this.renderCanvas(!0)),this},\"setCanvasData\"),getCropBoxData:o(function(){var p=this.cropBoxData,g;return this.ready&&this.cropped&&(g={left:p.left,top:p.top,width:p.width,height:p.height}),g||{}},\"getCropBoxData\"),setCropBoxData:o(function(p){var g=this.cropBoxData,f=this.options.aspectRatio,_,b;return this.ready&&this.cropped&&!this.disabled&&Vr(p)&&(de(p.left)&&(g.left=p.left),de(p.top)&&(g.top=p.top),de(p.width)&&p.width!==g.width&&(_=!0,g.width=p.width),de(p.height)&&p.height!==g.height&&(b=!0,g.height=p.height),f&&(_?g.height=g.width/f:b&&(g.width=g.height*f)),this.renderCropBox()),this},\"setCropBoxData\"),getCroppedCanvas:o(function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var g=this.canvasData,f=eb(this.image,this.imageData,g,p);if(!this.cropped)return f;var _=this.getData(),b=_.x,x=_.y,k=_.width,q=_.height,B=f.width/Math.floor(g.naturalWidth);B!==1&&(b*=B,x*=B,k*=B,q*=B);var L=k/q,U=Bi({aspectRatio:L,width:p.maxWidth||1/0,height:p.maxHeight||1/0}),H=Bi({aspectRatio:L,width:p.minWidth||0,height:p.minHeight||0},\"cover\"),ge=Bi({aspectRatio:L,width:p.width||(B!==1?f.width:k),height:p.height||(B!==1?f.height:q)}),me=ge.width,ke=ge.height;me=Math.min(U.width,Math.max(H.width,me)),ke=Math.min(U.height,Math.max(H.height,ke));var Se=document.createElement(\"canvas\"),it=Se.getContext(\"2d\");Se.width=kr(me),Se.height=kr(ke),it.fillStyle=p.fillColor||\"transparent\",it.fillRect(0,0,me,ke);var ct=p.imageSmoothingEnabled,Qe=ct===void 0?!0:ct,Gr=p.imageSmoothingQuality;it.imageSmoothingEnabled=Qe,Gr&&(it.imageSmoothingQuality=Gr);var Xt=f.width,V=f.height,Pe=b,st=x,hr,Kr,Qi,Zi,zi,Ur;Pe<=-k||Pe>Xt?(Pe=0,hr=0,Qi=0,zi=0):Pe<=0?(Qi=-Pe,Pe=0,hr=Math.min(Xt,k+Pe),zi=hr):Pe<=Xt&&(Qi=0,hr=Math.min(k,Xt-Pe),zi=hr),hr<=0||st<=-q||st>V?(st=0,Kr=0,Zi=0,Ur=0):st<=0?(Zi=-st,st=0,Kr=Math.min(V,q+st),Ur=Kr):st<=V&&(Zi=0,Kr=Math.min(q,V-st),Ur=Kr);var Ht=[Pe,st,hr,Kr];if(zi>0&&Ur>0){var es=me/k;Ht.push(Qi*es,Zi*es,zi*es,Ur*es)}return it.drawImage.apply(it,[f].concat(l(Ht.map(function(pl){return Math.floor(kr(pl))})))),Se},\"getCroppedCanvas\"),setAspectRatio:o(function(p){var g=this.options;return!this.disabled&&!no(p)&&(g.aspectRatio=Math.max(0,p)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},\"setAspectRatio\"),setDragMode:o(function(p){var g=this.options,f=this.dragBox,_=this.face;if(this.ready&&!this.disabled){var b=p===T,x=g.movable&&p===A;p=b||x?p:N,g.dragMode=p,uo(f,M,p),Wr(f,De,b),Wr(f,j,x),g.cropBoxMovable||(uo(_,M,p),Wr(_,De,b),Wr(_,j,x))}return this},\"setDragMode\")},pb=P.Cropper,Wp=function(){function v(p){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e(this,v),!p||!Mi.test(p.tagName))throw new Error(\"The first argument is required and must be an <img> or <canvas> element.\");this.element=p,this.options=Ee({},rt,Vr(g)&&g),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 o(v,\"Cropper\"),i(v,[{key:\"init\",value:o(function(){var g=this.element,f=g.tagName.toLowerCase(),_;if(!g[O]){if(g[O]=this,f===\"img\"){if(this.isImg=!0,_=g.getAttribute(\"src\")||\"\",this.originalUrl=_,!_)return;_=g.src}else f===\"canvas\"&&window.HTMLCanvasElement&&(_=g.toDataURL());this.load(_)}},\"init\")},{key:\"load\",value:o(function(g){var f=this;if(g){this.url=g,this.imageData={};var _=this.element,b=this.options;if(!b.rotatable&&!b.scalable&&(b.checkOrientation=!1),!b.checkOrientation||!window.ArrayBuffer){this.clone();return}if(Xi.test(g)){Yi.test(g)?this.read(ib(g)):this.clone();return}var x=new XMLHttpRequest,k=this.clone.bind(this);this.reloading=!0,this.xhr=x,x.onabort=k,x.onerror=k,x.ontimeout=k,x.onprogress=function(){x.getResponseHeader(\"content-type\")!==Li&&x.abort()},x.onload=function(){f.read(x.response)},x.onloadend=function(){f.reloading=!1,f.xhr=null},b.checkCrossOrigin&&qp(g)&&_.crossOrigin&&(g=$p(g)),x.open(\"GET\",g),x.responseType=\"arraybuffer\",x.withCredentials=_.crossOrigin===\"use-credentials\",x.send()}},\"load\")},{key:\"read\",value:o(function(g){var f=this.options,_=this.imageData,b=ob(g),x=0,k=1,q=1;if(b>1){this.url=sb(g,Li);var B=nb(b);x=B.rotate,k=B.scaleX,q=B.scaleY}f.rotatable&&(_.rotate=x),f.scalable&&(_.scaleX=k,_.scaleY=q),this.clone()},\"read\")},{key:\"clone\",value:o(function(){var g=this.element,f=this.url,_=g.crossOrigin,b=f;this.options.checkCrossOrigin&&qp(f)&&(_||(_=\"anonymous\"),b=$p(f)),this.crossOrigin=_,this.crossOriginUrl=b;var x=document.createElement(\"img\");_&&(x.crossOrigin=_),x.src=b||f,x.alt=g.alt||\"The image to crop\",this.image=x,x.onload=this.start.bind(this),x.onerror=this.stop.bind(this),Ve(x,S),g.parentNode.insertBefore(x,g.nextSibling)},\"clone\")},{key:\"start\",value:o(function(){var g=this,f=this.image;f.onload=null,f.onerror=null,this.sizing=!0;var _=P.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(P.navigator.userAgent),b=o(function(B,L){Ee(g.imageData,{naturalWidth:B,naturalHeight:L,aspectRatio:B/L}),g.sizing=!1,g.sized=!0,g.build()},\"done\");if(f.naturalWidth&&!_){b(f.naturalWidth,f.naturalHeight);return}var x=document.createElement(\"img\"),k=document.body||document.documentElement;this.sizingImage=x,x.onload=function(){b(x.width,x.height),_||k.removeChild(x)},x.src=f.src,_||(x.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;\",k.appendChild(x))},\"start\")},{key:\"stop\",value:o(function(){var g=this.image;g.onload=null,g.onerror=null,g.parentNode.removeChild(g),this.image=null},\"stop\")},{key:\"build\",value:o(function(){if(!(!this.sized||this.ready)){var g=this.element,f=this.options,_=this.image,b=g.parentNode,x=document.createElement(\"div\");x.innerHTML=lt;var k=x.querySelector(\".\".concat(O,\"-container\")),q=k.querySelector(\".\".concat(O,\"-canvas\")),B=k.querySelector(\".\".concat(O,\"-drag-box\")),L=k.querySelector(\".\".concat(O,\"-crop-box\")),U=L.querySelector(\".\".concat(O,\"-face\"));this.container=b,this.cropper=k,this.canvas=q,this.dragBox=B,this.cropBox=L,this.viewBox=k.querySelector(\".\".concat(O,\"-view-box\")),this.face=U,q.appendChild(_),Ve(g,E),b.insertBefore(k,g.nextSibling),this.isImg||Kt(_,S),this.initPreview(),this.bind(),f.initialAspectRatio=Math.max(0,f.initialAspectRatio)||NaN,f.aspectRatio=Math.max(0,f.aspectRatio)||NaN,f.viewMode=Math.max(0,Math.min(3,Math.round(f.viewMode)))||0,Ve(L,E),f.guides||Ve(L.getElementsByClassName(\"\".concat(O,\"-dashed\")),E),f.center||Ve(L.getElementsByClassName(\"\".concat(O,\"-center\")),E),f.background&&Ve(k,\"\".concat(O,\"-bg\")),f.highlight||Ve(U,F),f.cropBoxMovable&&(Ve(U,j),uo(U,M,z)),f.cropBoxResizable||(Ve(L.getElementsByClassName(\"\".concat(O,\"-line\")),E),Ve(L.getElementsByClassName(\"\".concat(O,\"-point\")),E)),this.render(),this.ready=!0,this.setDragMode(f.dragMode),f.autoCrop&&this.crop(),this.setData(f.data),mt(f.ready)&&Ot(g,Tt,f.ready,{once:!0}),cr(g,Tt)}},\"build\")},{key:\"unbuild\",value:o(function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Kt(this.element,E))},\"unbuild\")},{key:\"uncreate\",value:o(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()},\"uncreate\")}],[{key:\"noConflict\",value:o(function(){return window.Cropper=pb,v},\"noConflict\")},{key:\"setDefaults\",value:o(function(g){Ee(rt,Vr(g)&&g)},\"setDefaults\")}]),v}();return Ee(Wp.prototype,ab,lb,ub,cb,hb,db),Wp})});var Hy=be((T7,du)=>{\"use strict\";du.exports=sd;du.exports.isMobile=sd;du.exports.default=sd;var _P=/(android|bb\\d+|meego).+mobile|armv7l|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,xP=/CrOS/,FP=/android|ipad|playbook|silk/i;function sd(r){r||(r={});let e=r.ua;if(!e&&typeof navigator<\"u\"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers[\"user-agent\"]==\"string\"&&(e=e.headers[\"user-agent\"]),typeof e!=\"string\")return!1;let t=_P.test(e)&&!xP.test(e)||!!r.tablet&&FP.test(e);return!t&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf(\"Macintosh\")!==-1&&e.indexOf(\"Safari\")!==-1&&(t=!0),t}o(sd,\"isMobile\")});var Fv=be((_9,xv)=>
2{\"use strict\";xv.exports=o(function(e,t){if(t=t.split(\":\")[0],e=+e,!e)return!1;switch(t){case\"http\":case\"ws\":return e!==80;case\"https\":case\"wss\":return e!==443;case\"ftp\":return e!==21;case\"gopher\":return e!==70;case\"file\":return!1}return e!==0},\"required\")});var Tv=be(Bd=>{\"use strict\";var L_=Object.prototype.hasOwnProperty,M_;function Ev(r){try{return decodeURIComponent(r.replace(/\\+/g,\" \"))}catch{return null}}o(Ev,\"decode\");function Cv(r){try{return encodeURIComponent(r)}catch{return null}}o(Cv,\"encode\");function B_(r){for(var e=/([^=?#&]+)=?([^&]*)/g,t={},i;i=e.exec(r);){var s=Ev(i[1]),n=Ev(i[2]);s===null||n===null||s in t||(t[s]=n)}return t}o(B_,\"querystring\");function z_(r,e){e=e||\"\";var t=[],i,s;typeof e!=\"string\"&&(e=\"?\");for(s in r)if(L_.call(r,s)){if(i=r[s],!i&&(i===null||i===M_||isNaN(i))&&(i=\"\"),s=Cv(s),i=Cv(i),s===null||i===null)continue;t.push(s+\"=\"+i)}return t.length?e+t.join(\"&\"):\"\"}o(z_,\"querystringify\");Bd.stringify=z_;Bd.parse=B_});var Nv=be((C9,Iv)=>{\"use strict\";var Av=Fv(),wu=Tv(),j_=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,Rv=/[\\n\\r\\t]/g,H_=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,kv=/:\\d+$/,q_=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,$_=/^[a-zA-Z]:/;
2function jd(r){return(r||\"\").toString().replace(j_,\"\")}o(jd,\"trimLeft\");var zd=[[\"#\",\"hash\"],[\"?\",\"query\"],o(function(e,t){return jr(t.protocol)?e.replace(/\\\\/g,\"/\"):e},\"sanitize\"),[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],Ov={hash:1,query:1};function Uv(r){var e;typeof window<\"u\"?e=window:typeof global<\"u\"?e=global:typeof self<\"u\"?e=self:e={};var t=e.location||{};r=r||t;var i={},s=typeof r,n;if(r.protocol===\"blob:\")i=new Hr(unescape(r.pathname),{});else if(s===\"string\"){i=new Hr(r,{});for(n in Ov)delete i[n]}else if(s===\"object\"){for(n in r)n in Ov||(i[n]=r[n]);i.slashes===void 0&&(i.slashes=H_.test(r.href))}return i}o(Uv,\"lolcation\");function jr(r){return r===\"file:\"||r===\"ftp:\"||r===\"http:\"||r===\"https:\"||r===\"ws:\"||r===\"wss:\"}o(jr,\"isSpecial\");function Dv(r,e){r=jd(r),r=r.replace(Rv,\"\"),e=e||{};var t=q_.exec(r),i=t[1]?t[1].toLowerCase():\"\",s=!!t[2],n=!!t[3],a=0,l;return s?n?(l=t[2]+t[3]+t[4],a=t[2].length+t[3].length):(l=t[2]+t[4],a=t[2].length):n?(l=t[3]+t[4],a=t[3].length):l=t[4],i===\"file:\"?a>=2&&(l=l.slice(2)):jr(i)?l=t[4]:i?s&&(l=l.slice(2)):a>=2&&jr(e.protocol)&&(l=t[4]),{protocol:i,slashes:s||jr(i),slashesCount:a,rest:l}}o(Dv,\"extractProtocol\");function V_(r,e){if(r===\"\")return e;for(var t=(e||\"/\").split(\"/\").slice(0,-1).concat(r.split(\"/\")),i=t.length,s=t[i-1],n=!1,a=0;i--;)t[i]===\".\"?t.splice(i,1):t[i]===\"..\"?(t.splice(i,1),a++):a&&(i===0&&(n=!0),t.splice(i,1),a--);return n&&t.unshift(\"\"),(s===\".\"||s===\"..\")&&t.push(\"\"),t.join(\"/\")}o(V_,\"resolve\");function Hr(r,e,t){if(r=jd(r),r=r.replace(Rv,\"\"),!(this instanceof Hr))return new Hr(r,e,t);var i,s,n,a,l,u,h=zd.slice(),d=typeof e,m=this,w=0;for(d!==\"object\"&&d!==\"string\"&&(t=e,e=null),t&&typeof t!=\"function\"&&(t=wu.parse),e=Uv(e),s=Dv(r||\"\",e),i=!s.protocol&&!s.slashes,m.slashes=s.slashes||i&&e.slashes,m.protocol=s.protocol||e.protocol||\"\",r=s.rest,(s.protocol===\"file:\"&&(s.slashesCount!==2||$_.test(r))||!s.slashes&&(s.protocol||s.slashesCount<2||!jr(m.protocol)))&&(h[3]=[/(.*)/,\"pathname\"]);w<h.length;w++){if(a=h[w],typeof a==\"function\"){r=a(r,m);continue}n=a[0],u=a[1],n!==n?m[u]=r:typeof n==\"string\"?(l=n===\"@\"?r.lastIndexOf(n):r.indexOf(n),~l&&(typeof a[2]==\"number\"?(m[u]=r.slice(0,l),r=r.slice(l+a[2])):(m[u]=r.slice(l),r=r.slice(0,l)))):(l=n.exec(r))&&(m[u]=l[1],r=r.slice(0,l.index)),m[u]=m[u]||i&&a[3]&&e[u]||\"\",a[4]&&(m[u]=m[u].toLowerCase())}t&&(m.query=t(m.query)),i&&e.slashes&&m.pathname.charAt(0)!==\"/\"&&(m.pathname!==\"\"||e.pathname!==\"\")&&(m.pathname=V_(m.pathname,e.pathname)),m.pathname.charAt(0)!==\"/\"&&jr(m.protocol)&&(m.pathname=\"/\"+m.pathname),Av(m.port,m.protocol)||(m.host=m.hostname,m.port=\"\"),m.username=m.password=\"\",m.auth&&(l=m.auth.indexOf(\":\"),~l?(m.username=m.auth.slice(0,l),m.username=encodeURIComponent(decodeURIComponent(m.username)),m.password=m.auth.slice(l+1),m.password=encodeURIComponent(decodeURIComponent(m.password))):m.username=encodeURIComponent(decodeURIComponent(m.auth)),m.auth=m.password?m.username+\":\"+m.password:m.username),m.origin=m.protocol!==\"file:\"&&jr(m.protocol)&&m.host?m.protocol+\"//\"+m.host:\"null\",m.href=m.toString()}o(Hr,\"Url\");function W_(r,e,t){var i=this;switch(r){case\"query\":typeof e==\"string\"&&e.length&&(e=(t||wu.parse)(e)),i[r]=e;break;case\"port\":i[r]=e,Av(e,i.protocol)?e&&(i.host=i.hostname+\":\"+e):(i.host=i.hostname,i[r]=\"\");break;case\"hostname\":i[r]=e,i.port&&(e+=\":\"+i.port),i.host=e;break;case\"host\":i[r]=e,kv.test(e)?(e=e.split(\":\"),i.port=e.pop(),i.hostname=e.join(\":\")):(i.hostname=e,i.port=\"\");break;case\"protocol\":i.protocol=e.toLowerCase(),i.slashes=!t;break;case\"pathname\":case\"hash\":if(e){var s=r===\"pathname\"?\"/\":\"#\";i[r]=e.charAt(0)!==s?s+e:e}else i[r]=e;break;case\"username\":case\"password\":i[r]=encodeURIComponent(e);break;case\"auth\":var n=e.indexOf(\":\");~n?(i.username=e.slice(0,n),i.username=encodeURIComponent(decodeURIComponent(i.username)),i.password=e.slice(n+1),i.password=encodeURIComponent(decodeURIComponent(i.password))):i.username=encodeURIComponent(decodeURIComponent(e))}for(var a=0;a<zd.length;a++){var l=zd[a];l[4]&&(i[l[1]]=i[l[1]].toLowerCase())}return i.auth=i.password?i.username+\":\"+i.password:i.username,i.origin=i.protocol!==\"file:\"&&jr(i.protocol)&&i.host?i.protocol+\"//\"+i.host:\"null\",i.href=i.toString(),i}o(W_,\"set\");function G_(r){(!r||typeof r!=\"function\")&&(r=wu.stringify);var e,t=this,i=t.host,s=t.protocol;s&&s.charAt(s.length-1)!==\":\"&&(s+=\":\");var n=s+(t.protocol&&t.slashes||jr(t.protocol)?\"//\":\"\");return t.username?(n+=t.username,t.password&&(n+=\":\"+t.password),n+=\"@\"):t.password?(n+=\":\"+t.password,n+=\"@\"):t.protocol!==\"file:\"&&jr(t.protocol)&&!i&&t.pathname!==\"/\"&&(n+=\"@\"),(i[i.length-1]===\":\"||kv.test(t.hostname)&&!t.port)&&(i+=\":\"),n+=i+t.pathname,e=typeof t.query==\"object\"?r(t.query):t.query,e&&(n+=e.charAt(0)!==\"?\"?\"?\"+e:e),t.hash&&(n+=t.hash),n}o(G_,\"toString\");Hr.prototype={set:W_,toString:G_};Hr.extractProtocol=Dv;Hr.location=Uv;Hr.trimLeft=jd;Hr.qs=wu;Iv.exports=Hr});var ap=be((NN,np)=>{function Ft(r){if(r)return X5(r);this._callbacks=new Map}o(Ft,\"Emitter\");function X5(r){return Object.assign(r,Ft.prototype),r._callbacks=new Map,r}o(X5,\"mixin\");Ft.prototype.on=function(r,e){let t=this._callbacks.get(r)??[];return t.push(e),this._callbacks.set(r,t),this};Ft.prototype.once=function(r,e){let t=o((...i)=>{this.off(r,t),e.apply(this,i)},\"on\");return t.fn=e,this.on(r,t),this};Ft.prototype.off=function(r,e){if(r===void 0&&e===void 0)return this._callbacks.clear(),this;if(e===void 0)return this._callbacks.delete(r),this;let t=this._callbacks.get(r);if(t){for(let[i,s]of t.entries())if(s===e||s.fn===e){t.splice(i,1);break}t.length===0?this._callbacks.delete(r):this._callbacks.set(r,t)}return this};Ft.prototype.emit=function(r,...e){let t=this._callbacks.get(r);if(t){let i=[...t];for(let s of i)s.apply(this,e)}return this};Ft.prototype.listeners=function(r){return this._callbacks.get(r)??[]};Ft.prototype.listenerCount=function(r){if(r)return this.listeners(r).length;let e=0;for(let t of this._callbacks.values())e+=t.length;return e};Ft.prototype.hasListeners=function(r){return this.listenerCount(r)>0};Ft.prototype.addEventListener=Ft.prototype.on;Ft.prototype.removeListener=Ft.prototype.off;Ft.prototype.removeEventListener=Ft.prototype.off;Ft.prototype.removeAllListeners=Ft.prototype.off;typeof np<\"u\"&&(np.exports=Ft)});var R0=be((Mp,Bp)=>{(function(r,e){typeof Mp==\"object\"&&typeof Bp<\"u\"?Bp.exports=e():typeof define==\"function\"&&define.amd?define(e):(r=typeof globalThis<\"u\"?globalThis:r||self,r.Compressor=e())})(Mp,function(){\"use strict\";function r(R,T){var A=Object.keys(R);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(R);T&&(N=N.filter(function(G){return Object.getOwnPropertyDescriptor(R,G).enumerable})),A.push.apply(A,N)}return A}o(r,\"ownKeys\");function e(R){for(var T=1;T<arguments.length;T++){var A=arguments[T]!=null?arguments[T]:{};
2T%2?r(Object(A),!0).forEach(function(N){n(R,N,A[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(A)):r(Object(A)).forEach(function(N){Object.defineProperty(R,N,Object.getOwnPropertyDescriptor(A,N))})}return R}o(e,\"_objectSpread2\");function t(R,T){if(!(R instanceof T))throw new TypeError(\"Cannot call a class as a function\")}o(t,\"_classCallCheck\");function i(R,T){for(var A=0;A<T.length;A++){var N=T[A];N.enumerable=N.enumerable||!1,N.configurable=!0,\"value\"in N&&(N.writable=!0),Object.defineProperty(R,u(N.key),N)}}o(i,\"_defineProperties\");function s(R,T,A){return T&&i(R.prototype,T),A&&i(R,A),Object.defineProperty(R,\"prototype\",{writable:!1}),R}o(s,\"_createClass\");function n(R,T,A){return T=u(T),T in R?Object.defineProperty(R,T,{value:A,enumerable:!0,configurable:!0,writable:!0}):R[T]=A,R}o(n,\"_defineProperty\");function a(){return a=Object.assign?Object.assign.bind():function(R){for(var T=1;T<arguments.length;T++){var A=arguments[T];for(var N in A)Object.prototype.hasOwnProperty.call(A,N)&&(R[N]=A[N])}return R},a.apply(this,arguments)}o(a,\"_extends\");function l(R,T){if(typeof R!=\"object\"||R===null)return R;var A=R[Symbol.toPrimitive];if(A!==void 0){var N=A.call(R,T||\"default\");if(typeof N!=\"object\")return N;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(T===\"string\"?String:Number)(R)}o(l,\"_toPrimitive\");function u(R){var T=l(R,\"string\");return typeof T==\"symbol\"?T:String(T)}o(u,\"_toPropertyKey\");var h={exports:{}};(function(R){typeof window>\"u\"||function(T){var A=T.HTMLCanvasElement&&T.HTMLCanvasElement.prototype,N=T.Blob&&function(){try{return!!new Blob}catch{return!1}}(),G=N&&T.Uint8Array&&function(){try{return new Blob([new Uint8Array(100)]).size===100}catch{return!1}}(),Y=T.BlobBuilder||T.WebKitBlobBuilder||T.MozBlobBuilder||T.MSBlobBuilder,Fe=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,ce=(N||Y)&&T.atob&&T.ArrayBuffer&&T.Uint8Array&&function(ue){var he,Re,Ie,Ct,qe,oe,Tt,Je,$r;if(he=ue.match(Fe),!he)throw new Error(\"invalid data URI\");for(Re=he[2]?he[1]:\"text/plain\"+(he[3]||\";charset=US-ASCII\"),Ie=!!he[4],Ct=ue.slice(he[0].length),Ie?qe=atob(Ct):qe=decodeURIComponent(Ct),oe=new ArrayBuffer(qe.length),Tt=new Uint8Array(oe),Je=0;Je<qe.length;Je+=1)Tt[Je]=qe.charCodeAt(Je);return N?new Blob([G?Tt:oe],{type:Re}):($r=new Y,$r.append(oe),$r.getBlob(Re))};T.HTMLCanvasElement&&!A.toBlob&&(A.mozGetAsFile?A.toBlob=function(ue,he,Re){var Ie=this;setTimeout(function(){Re&&A.toDataURL&&ce?ue(ce(Ie.toDataURL(he,Re))):ue(Ie.mozGetAsFile(\"blob\",he))})}:A.toDataURL&&ce&&(A.msToBlob?A.toBlob=function(ue,he,Re){var Ie=this;setTimeout(function(){(he&&he!==\"image/png\"||Re)&&A.toDataURL&&ce?ue(ce(Ie.toDataURL(he,Re))):ue(Ie.msToBlob(he))})}:A.toBlob=function(ue,he,Re){var Ie=this;setTimeout(function(){ue(ce(Ie.toDataURL(he,Re)))})})),R.exports?R.exports=ce:T.dataURLtoBlob=ce}(window)})(h);var d=h.exports,m=o(function(T){return typeof Blob>\"u\"?!1:T instanceof Blob||Object.prototype.toString.call(T)===\"[object Blob]\"},\"isBlob\"),w={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},y=typeof window<\"u\"&&typeof window.document<\"u\",P=y?window:{},D=o(function(T){return T>0&&T<1/0},\"isPositiveNumber\"),C=Array.prototype.slice;function O(R){return Array.from?Array.from(R):C.call(R)}o(O,\"toArray\");var z=/^image\\/.+$/;function X(R){return z.test(R)}o(X,\"isImageType\");function K(R){var T=X(R)?R.substr(6):\"\";return T===\"jpeg\"&&(T=\"jpg\"),\".\".concat(T)}o(K,\"imageTypeToExtension\");var Z=String.fromCharCode;function $(R,T,A){var N=\"\",G;for(A+=T,G=T;G<A;G+=1)N+=Z(R.getUint8(G));return N}o($,\"getStringFromCharCode\");var W=P.btoa;function te(R,T){for(var A=[],N=8192,G=new Uint8Array(R);G.length>0;)A.push(Z.apply(null,O(G.subarray(0,N)))),G=G.subarray(N);return\"data:\".concat(T,\";base64,\").concat(W(A.join(\"\")))}o(te,\"arrayBufferToDataURL\");function se(R){var T=new DataView(R),A;try{var N,G,Y;if(T.getUint8(0)===255&&T.getUint8(1)===216)for(var Fe=T.byteLength,ce=2;ce+1<Fe;){if(T.getUint8(ce)===255&&T.getUint8(ce+1)===225){G=ce;break}ce+=1}if(G){var ue=G+4,he=G+10;if($(T,ue,4)===\"Exif\"){var Re=T.getUint16(he);if(N=Re===18761,(N||Re===19789)&&T.getUint16(he+2,N)===42){var Ie=T.getUint32(he+4,N);Ie>=8&&(Y=he+Ie)}}}
2if(Y){var Ct=T.getUint16(Y,N),qe,oe;for(oe=0;oe<Ct;oe+=1)if(qe=Y+oe*12+2,T.getUint16(qe,N)===274){qe+=8,A=T.getUint16(qe,N),T.setUint16(qe,1,N);break}}}catch{A=1}return A}o(se,\"resetAndGetOrientation\");function Ae(R){var T=0,A=1,N=1;switch(R){case 2:A=-1;break;case 3:T=-180;break;case 4:N=-1;break;case 5:T=90,N=-1;break;case 6:T=90;break;case 7:T=90,A=-1;break;case 8:T=-90;break}return{rotate:T,scaleX:A,scaleY:N}}o(Ae,\"parseOrientation\");var je=/\\.\\d*(?:0|9){12}\\d*$/;function He(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return je.test(R)?Math.round(R*T)/T:R}o(He,\"normalizeDecimalNumber\");function xe(R){var T=R.aspectRatio,A=R.height,N=R.width,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:\"none\",Y=D(N),Fe=D(A);if(Y&&Fe){var ce=A*T;(G===\"contain\"||G===\"none\")&&ce>N||G===\"cover\"&&ce<N?A=N/T:N=A*T}else Y?A=N/T:Fe&&(N=A*T);return{width:N,height:A}}o(xe,\"getAdjustedSizes\");function De(R){for(var T=O(new Uint8Array(R)),A=T.length,N=[],G=0;G+3<A;){var Y=T[G],Fe=T[G+1];if(Y===255&&Fe===218)break;if(Y===255&&Fe===216)G+=2;else{var ce=T[G+2]*256+T[G+3],ue=G+ce+2,he=T.slice(G,ue);N.push(he),G=ue}}return N.reduce(function(Re,Ie){return Ie[0]===255&&Ie[1]===225?Re.concat(Ie):Re},[])}o(De,\"getExif\");function ft(R,T){var A=O(new Uint8Array(R));if(A[2]!==255||A[3]!==224)return R;var N=A[4]*256+A[5],G=[255,216].concat(T,A.slice(4+N));return new Uint8Array(G)}o(ft,\"insertExif\");var E=P.ArrayBuffer,S=P.FileReader,F=P.URL||P.webkitURL,I=/\\.\\w+$/,j=P.Compressor,M=function(){function R(T,A){t(this,R),this.file=T,this.exif=[],this.image=new Image,this.options=e(e({},w),A),this.aborted=!1,this.result=null,this.init()}return o(R,\"Compressor\"),s(R,[{key:\"init\",value:o(function(){var A=this,N=this.file,G=this.options;if(!m(N)){this.fail(new Error(\"The first argument must be a File or Blob object.\"));return}var Y=N.type;if(!X(Y)){this.fail(new Error(\"The first argument must be an image File or Blob object.\"));return}if(!F||!S){this.fail(new Error(\"The current browser does not support image compression.\"));return}E||(G.checkOrientation=!1,G.retainExif=!1);var Fe=Y===\"image/jpeg\",ce=Fe&&G.checkOrientation,ue=Fe&&G.retainExif;if(F&&!ce&&!ue)this.load({url:F.createObjectURL(N)});else{var he=new S;this.reader=he,he.onload=function(Re){var Ie=Re.target,Ct=Ie.result,qe={},oe=1;ce&&(oe=se(Ct),oe>1&&a(qe,Ae(oe))),ue&&(A.exif=De(Ct)),ce||ue?!F||oe>1?qe.url=te(Ct,Y):qe.url=F.createObjectURL(N):qe.url=Ct,A.load(qe)},he.onabort=function(){A.fail(new Error(\"Aborted to read the image with FileReader.\"))},he.onerror=function(){A.fail(new Error(\"Failed to read the image with FileReader.\"))},he.onloadend=function(){A.reader=null},ce||ue?he.readAsArrayBuffer(N):he.readAsDataURL(N)}},\"init\")},{key:\"load\",value:o(function(A){var N=this,G=this.file,Y=this.image;Y.onload=function(){N.draw(e(e({},A),{},{naturalWidth:Y.naturalWidth,naturalHeight:Y.naturalHeight}))},Y.onabort=function(){N.fail(new Error(\"Aborted to load the image.\"))},Y.onerror=function(){N.fail(new Error(\"Failed to load the image.\"))},P.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(P.navigator.userAgent)&&(Y.crossOrigin=\"anonymous\"),Y.alt=G.name,Y.src=A.url},\"load\")},{key:\"draw\",value:o(function(A){var N=this,G=A.naturalWidth,Y=A.naturalHeight,Fe=A.rotate,ce=Fe===void 0?0:Fe,ue=A.scaleX,he=ue===void 0?1:ue,Re=A.scaleY,Ie=Re===void 0?1:Re,Ct=this.file,qe=this.image,oe=this.options,Tt=document.createElement(\"canvas\"),Je=Tt.getContext(\"2d\"),$r=Math.abs(ce)%180===90,Gi=(oe.resize===\"contain\"||oe.resize===\"cover\")&&D(oe.width)&&D(oe.height),Li=Math.max(oe.maxWidth,0)||1/0,Ki=Math.max(oe.maxHeight,0)||1/0,Xi=Math.max(oe.minWidth,0)||0,Yi=Math.max(oe.minHeight,0)||0,Mi=G/Y,rt=oe.width,lt=oe.height;if($r){var nl=[Ki,Li];Li=nl[0],Ki=nl[1];var de=[Yi,Xi];Xi=de[0],Yi=de[1];var Wo=[lt,rt];rt=Wo[0],lt=Wo[1]}Gi&&(Mi=rt/lt);var no=xe({aspectRatio:Mi,width:Li,height:Ki},\"contain\");Li=no.width,Ki=no.height;var Rr=xe({aspectRatio:Mi,width:Xi,height:Yi},\"cover\");if(Xi=Rr.width,Yi=Rr.height,Gi){var al=xe({aspectRatio:Mi,width:rt,he
vendor: 4,068 bytes, line 2
2ight:lt},oe.resize);rt=al.width,lt=al.height}else{var Vr=xe({aspectRatio:Mi,width:rt,height:lt}),mt=Vr.width;rt=mt===void 0?G:mt;var ll=Vr.height;lt=ll===void 0?Y:ll}rt=Math.floor(He(Math.min(Math.max(rt,Xi),Li))),lt=Math.floor(He(Math.min(Math.max(lt,Yi),Ki)));var ul=-rt/2,$e=-lt/2,Ee=rt,Lu=lt,kr=[];if(Gi){var cl=0,Sr=0,Go=G,Ve=Y,Kt=xe({aspectRatio:Mi,width:G,height:Y},{contain:\"cover\",cover:\"contain\"}[oe.resize]);Go=Kt.width,Ve=Kt.height,cl=(G-Go)/2,Sr=(Y-Ve)/2,kr.push(cl,Sr,Go,Ve)}if(kr.push(ul,$e,Ee,Lu),$r){var Wr=[lt,rt];rt=Wr[0],lt=Wr[1]}Tt.width=rt,Tt.height=lt,X(oe.mimeType)||(oe.mimeType=Ct.type);var hl=\"transparent\";Ct.size>oe.convertSize&&oe.convertTypes.indexOf(oe.mimeType)>=0&&(oe.mimeType=\"image/jpeg\");var ao=oe.mimeType===\"image/jpeg\";if(ao&&(hl=\"#fff\"),Je.fillStyle=hl,Je.fillRect(0,0,rt,lt),oe.beforeDraw&&oe.beforeDraw.call(this,Je,Tt),!this.aborted&&(Je.save(),Je.translate(rt/2,lt/2),Je.rotate(ce*Math.PI/180),Je.scale(he,Ie),Je.drawImage.apply(Je,[qe].concat(kr)),Je.restore(),oe.drew&&oe.drew.call(this,Je,Tt),!this.aborted)){var lo=o(function(Ji){if(!N.aborted){var Ko=o(function(cr){return N.done({naturalWidth:G,naturalHeight:Y,result:cr})},\"done\");if(Ji&&ao&&oe.retainExif&&N.exif&&N.exif.length>0){var Xo=o(function(cr){return Ko(d(te(ft(cr,N.exif),oe.mimeType)))},\"next\");if(Ji.arrayBuffer)Ji.arrayBuffer().then(Xo).catch(function(){N.fail(new Error(\"Failed to read the compressed image with Blob.arrayBuffer().\"))});else{var ut=new S;N.reader=ut,ut.onload=function(Ot){var cr=Ot.target;Xo(cr.result)},ut.onabort=function(){N.fail(new Error(\"Aborted to read the compressed image with FileReader.\"))},ut.onerror=function(){N.fail(new Error(\"Failed to read the compressed image with FileReader.\"))},ut.onloadend=function(){N.reader=null},ut.readAsArrayBuffer(Ji)}}else Ko(Ji)}},\"callback\");Tt.toBlob?Tt.toBlob(lo,oe.mimeType,oe.quality):lo(d(Tt.toDataURL(oe.mimeType,oe.quality)))}},\"draw\")},{key:\"done\",value:o(function(A){var N=A.naturalWidth,G=A.naturalHeight,Y=A.result,Fe=this.file,ce=this.image,ue=this.options;if(F&&ce.src.indexOf(\"blob:\")===0&&F.revokeObjectURL(ce.src),Y)if(ue.strict&&!ue.retainExif&&Y.size>Fe.size&&ue.mimeType===Fe.type&&!(ue.width>N||ue.height>G||ue.minWidth>N||ue.minHeight>G||ue.maxWidth<N||ue.maxHeight<G))Y=Fe;else{var he=new Date;Y.lastModified=he.getTime(),Y.lastModifiedDate=he,Y.name=Fe.name,Y.name&&Y.type!==Fe.type&&(Y.name=Y.name.replace(I,K(Y.type)))}else Y=Fe;this.result=Y,ue.success&&ue.success.call(this,Y)},\"done\")},{key:\"fail\",value:o(function(A){var N=this.options;if(N.error)N.error.call(this,A);else throw A},\"fail\")},{key:\"abort\",value:o(function(){this.aborted||(this.aborted=!0,this.reader?this.reader.abort():this.image.complete?this.fail(new Error(\"The compression process has been aborted.\")):(this.image.onload=null,this.image.onabort()))},\"abort\")}],[{key:\"noConflict\",value:o(function(){return window.Compressor=j,R},\"noConflict\")},{key:\"setDefaults\",value:o(function(A){a(w,A)},\"setDefaults\")}]),R}();return M})});var jp={};ml(jp,{Audio:()=>Os,AwsS3:()=>Ro,BasePlugin:()=>Ce,Box:()=>fi,Compressor:()=>ol,Core:()=>lF,Dashboard:()=>ws,DefaultStore:()=>Sl,DragDrop:()=>Ss,DropTarget:()=>Eo,Dropbox:()=>mi,Facebook:()=>gi,FileInput:()=>Ps,Form:()=>Ho,GoldenRetriever:()=>$o,GoogleDrive:()=>yi,GooglePhotos:()=>vi,ImageEditor:()=>_s,Informer:()=>ui,Instagram:()=>bi,OneDrive:()=>wi,ProgressBar:()=>xs,ReduxDevTools:()=>Vo,ReduxStore:()=>tg,RemoteSources:()=>Co,ScreenCapture:()=>Rs,StatusBar:()=>li,ThumbnailGenerator:()=>qi,Transloadit:()=>Ui,Tus:()=>Ai,UIPlugin:()=>ne,Unsplash:()=>Si,Uppy:()=>Zu,Url:()=>vr,Webcam:()=>ks,XHRUpload:()=>zo,Zoom:()=>Pi,debugLogger:()=>rn,locales:()=>cF,server:()=>pc,views:()=>uF});function gl(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(gl,\"_classPrivateFieldLooseBase\");var Pb=0;function Qp(r){return\"__private_\"+Pb+++\"_\"+r}o(Qp,\"_classPrivateFieldLooseKey\");function _b(r,e,t){let i=[];return r.forEach(s=>
2typeof s!=\"string\"?i.push(s):e[Symbol.split](s).forEach((n,a,l)=>{n!==\"\"&&i.push(n),a<l.length-1&&i.push(t)})),i}o(_b,\"insertReplacement\");function Jp(r,e){let t=/\\$/g,i=\"$$$$\",s=[r];if(e==null)return s;for(let n of Object.keys(e))if(n!==\"_\"){let a=e[n];typeof a==\"string\"&&(a=t[Symbol.replace](a,i)),s=_b(s,new RegExp(`%\\\\{${n}\\\\}`,\"g\"),a)}return s}o(Jp,\"interpolate\");var xb=o(r=>{throw new Error(`missing string: ${r}`)},\"defaultOnMissingKey\"),Jo=Qp(\"onMissingKey\"),Qo=Qp(\"apply\"),ts=class{static{o(this,\"Translator\")}constructor(e,t){let{onMissingKey:i=xb}=t===void 0?{}:t;Object.defineProperty(this,Qo,{value:Fb}),Object.defineProperty(this,Jo,{writable:!0,value:void 0}),this.locale={strings:{},pluralize(s){return s===1?0:1}},Array.isArray(e)?e.forEach(gl(this,Qo)[Qo],this):gl(this,Qo)[Qo](e),gl(this,Jo)[Jo]=i}translate(e,t){return this.translateArray(e,t).join(\"\")}translateArray(e,t){let i=this.locale.strings[e];if(i==null&&(gl(this,Jo)[Jo](e),i=e),typeof i==\"object\"){if(t&&typeof t.smart_count<\"u\"){let n=this.locale.pluralize(t.smart_count);return Jp(i[n],t)}throw new Error(\"Attempted to use a string with plural forms, but no value was given for %{smart_count}\")}if(typeof i!=\"string\")throw new Error(\"string was not a string\");return Jp(i,t)}};function Fb(r){if(!(r!=null&&r.strings))return;let e=this.locale;Object.assign(this.locale,{strings:{...e.strings,...r.strings},pluralize:r.pluralize||e.pluralize})}o(Fb,\"_apply2\");var Gf=ve(ef(),1);var Eb=\"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";var dr=o((r=21)=>{let e=\"\",t=r;for(;t--;)e+=Eb[Math.random()*64|0];return e},\"nanoid\");var Kf=ve(vl(),1);function bl(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(bl,\"_classPrivateFieldLooseBase\");var b1=0;function Df(r){return\"__private_\"+b1+++\"_\"+r}o(Df,\"_classPrivateFieldLooseKey\");var w1={version:\"4.1.0\"},rs=Df(\"callbacks\"),Vu=Df(\"publish\"),wl=class{static{o(this,\"DefaultStore\")}constructor(){Object.defineProperty(this,Vu,{value:S1}),this.state={},Object.defineProperty(this,rs,{writable:!0,value:new Set})}getState(){return this.state}setState(e){let t={...this.state},i={...this.state,...e};this.state=i,bl(this,Vu)[Vu](t,i,e)}subscribe(e){return bl(this,rs)[rs].add(e),()=>{bl(this,rs)[rs].delete(e)}}};function S1(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];bl(this,rs)[rs].forEach(i=>{i(...e)})}o(S1,\"_publish2\");wl.VERSION=w1.version;var Sl=wl;function Dr(r){let e=r.lastIndexOf(\".\");return e===-1||e===r.length-1?{name:r,extension:void 0}:{name:r.slice(0,e),extension:r.slice(e+1)}}o(Dr,\"getFileNameAndExtension\");var en={__proto__:null,md:\"text/markdown\",markdown:\"text/markdown\",mp4:\"video/mp4\",mp3:\"audio/mp3\",svg:\"image/svg+xml\",jpg:\"image/jpeg\",png:\"image/png\",webp:\"image/webp\",gif:\"image/gif\",heic:\"image/heic\",heif:\"image/heif\",yaml:\"text/yaml\",yml:\"text/yaml\",csv:\"text/csv\",tsv:\"text/tab-separated-values\",tab:\"text/tab-separated-values\",avi:\"video/x-msvideo\",mks:\"video/x-matroska\",mkv:\"video/x-matroska\",mov:\"video/quicktime\",dicom:\"application/dicom\",doc:\"application/msword\",docm:\"application/vnd.ms-word.document.macroenabled.12\",docx:\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",dot:\"application/msword\",dotm:\"application/vnd.ms-word.template.macroenabled.12\",dotx:\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\",xla:\"application/vnd.ms-excel\",xlam:\"application/vnd.ms-excel.addin.macroenabled.12\",xlc:\"application/vnd.ms-excel\",xlf:\"application/x-xliff+xml\",xlm:\"application/vnd.ms-excel\",xls:\"application/vnd.ms-excel\",xlsb:\"application/vnd.ms-excel.sheet.binary.macroenabled.12\",xlsm:\"application/vnd.ms-excel.sheet.macroenabled.12\",xlsx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",xlt:\"application/vnd.ms-excel\",xltm:\"application/vnd.ms-excel.template.macroenabled.12\",xltx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\",xlw:\"application/vnd.ms-excel\",txt:\"text/plain\",text:\"text/plain\",conf:\"text/plain\",log:\"text/plain\",pdf:\"application/pdf\",zip:\"application/zip\",\"7z\":\"application/x-7z-compressed\",rar:\"application/x-rar-compressed\",tar:\"application/x-tar\",gz:\"application/gzip\",dmg:\"application/x-apple-diskimage\"};function tn(r){var e;if(r.type)return r.type;let t=r.name?(e=Dr(r.name).extension)==null?void 0:e.toLowerCase():null;return t&&t in en?en[t]:\"application/octet-stream\"}o(tn,\"getFileType\");function P1(r){return r.charCodeAt(0).toString(32)}o(P1,\"encodeCharacter\");function If(r){let e=\"\";return r.replace(/[^A-Z0-9]/gi,t=>(e+=`-${P1(t)}`,\"/\"))+e}o(If,\"encodeFilename\");function Nf(r,e){let t=e||\"uppy\";return typeof r.name==\"string\"&&(t+=`-${If(r.name.toLowerCase())}`),r.type!==void 0&&(t+=`-${r.type}`),r.meta&&typeof r.meta.relativePath==\"string\"&&(t+=`-${If(r.meta.relativePath.toLowerCase())}`),r.data.size!==void 0&&(t+=`-${r.data.size}`),r.data.lastModified!==void 0&&(t+=`-${r.data.lastModified}`),t}o(Nf,\"generateFileID\");function _1(r){return!r.isRemote||!r.remote?!1:new Set([\"box\",\"dropbox\",\"drive\",\"facebook\",\"unsplash\"]).has(r.remote.provider)}o(_1,\"hasFileStableId\");function Pl(r,e){if(_1(r))return r.id;let t=tn(r);return Nf({...r,type:t},e)}o(Pl,\"getSafeFileId\");function Wu(r){if(r==null&&typeof navigator<\"u\"&&(r=navigator.userAgent),!r)return!0;let e=/Edge\\/(\\d+\\.\\d+)/.exec(r);if(!e)return!0;let i=e[1].split(\".\",2),s=parseInt(i[0],10),n=parseInt(i[1],10);return s<15||s===15&&n<15063||s>18||s===18&&n>=18218}o(Wu,\"supportsUploadProgress\");function Gu(r,e){return e.name?e.name:r.split(\"/\")[0]===\"image\"?`${r.split(\"/\")[0]}.${r.split(\"/\")[1]}`:\"noname\"}o(Gu,\"getFileName\");function Ku(r){return r<10?`0${r}`:r.toString()}o(Ku,\"pad\");function co(){let r=new Date,e=Ku(r.getHours()),t=Ku(r.getMinutes()),i=Ku(r.getSeconds());return`${e}:${t}:${i}`}o(co,\"getTimeStamp\");var Lf={debug:o(()=>{},\"debug\"),warn:o(()=>{},\"warn\"),error:o(function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return console.error(`[Uppy] [${co()}]`,...e)},\"error\")},rn={debug:o(function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return console.debug(`[Uppy] [${co()}]`,...e)},\"debug\"),warn:o(function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return console.warn(`[Uppy] [${co()}]`,...e)},\"warn\"),error:o(function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return console.error(`[Uppy] [${co()}]`,...e)},\"error\")};var on=ve(sn(),1),$f=ve(qf(),1);var Vf={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]}
2,qt=class extends Error{static{o(this,\"RestrictionError\")}constructor(e,t){var i;super(e),this.isRestriction=!0,this.isUserFacing=(i=t?.isUserFacing)!=null?i:!0,t!=null&&t.file&&(this.file=t.file)}},_l=class{static{o(this,\"Restricter\")}constructor(e,t){this.getI18n=t,this.getOpts=()=>{var i;let s=e();if(((i=s.restrictions)==null?void 0:i.allowedFileTypes)!=null&&!Array.isArray(s.restrictions.allowedFileTypes))throw new TypeError(\"`restrictions.allowedFileTypes` must be an array\");return s}}validateAggregateRestrictions(e,t){let{maxTotalFileSize:i,maxNumberOfFiles:s}=this.getOpts().restrictions;if(s&&e.filter(a=>!a.isGhost).length+t.length>s)throw new qt(`${this.getI18n()(\"youCanOnlyUploadX\",{smart_count:s})}`);if(i){let n=[...e,...t].reduce((a,l)=>{var u;return a+((u=l.size)!=null?u:0)},0);if(n>i)throw new qt(this.getI18n()(\"aggregateExceedsSize\",{sizeAllowed:(0,on.default)(i),size:(0,on.default)(n)}))}}validateSingleFile(e){let{maxFileSize:t,minFileSize:i,allowedFileTypes:s}=this.getOpts().restrictions;if(s&&!s.some(l=>l.includes(\"/\")?e.type?(0,$f.default)(e.type.replace(/;.*?$/,\"\"),l):!1:l[0]===\".\"&&e.extension?e.extension.toLowerCase()===l.slice(1).toLowerCase():!1)){let l=s.join(\", \");throw new qt(this.getI18n()(\"youCanOnlyUploadFileTypes\",{types:l}),{file:e})}if(t&&e.size!=null&&e.size>t){var n;throw new qt(this.getI18n()(\"exceedsSize\",{size:(0,on.default)(t),file:(n=e.name)!=null?n:this.getI18n()(\"unnamed\")}),{file:e})}if(i&&e.size!=null&&e.size<i)throw new qt(this.getI18n()(\"inferiorSize\",{size:(0,on.default)(i)}),{file:e})}validate(e,t){t.forEach(i=>{this.validateSingleFile(i)}),this.validateAggregateRestrictions(e,t)}validateMinNumberOfFiles(e){let{minNumberOfFiles:t}=this.getOpts().restrictions;if(t&&Object.keys(e).length<t)throw new qt(this.getI18n()(\"youHaveToAtLeastSelectX\",{smart_count:t}))}getMissingRequiredMetaFields(e){var t;let i=new qt(this.getI18n()(\"missingRequiredMetaFieldOnFile\",{fileName:(t=e.name)!=null?t:this.getI18n()(\"unnamed\")})),{requiredMetaFields:s}=this.getOpts().restrictions,n=[];for(let a of s)(!Object.hasOwn(e.meta,a)||e.meta[a]===\"\")&&n.push(a);return{missingFields:n,error:i}}};var Wf={strings:{addBulkFilesFailed:{0:\"Failed to add %{smart_count} file due to an internal error\",1:\"Failed to add %{smart_count} files due to internal errors\"},youCanOnlyUploadX:{0:\"You can only upload %{smart_count} file\",1:\"You can only upload %{smart_count} files\"},youHaveToAtLeastSelectX:{0:\"You have to select at least %{smart_count} file\",1:\"You have to select at least %{smart_count} files\"},aggregateExceedsSize:\"You selected %{size} of files, but maximum allowed size is %{sizeAllowed}\",exceedsSize:\"%{file} exceeds maximum allowed size of %{size}\",missingRequiredMetaField:\"Missing required meta fields\",missingRequiredMetaFieldOnFile:\"Missing required meta fields in %{fileName}\",inferiorSize:\"This file is smaller than the allowed size of %{size}\",youCanOnlyUploadFileTypes:\"You can only upload: %{types}\",noMoreFilesAllowed:\"Cannot add more files\",noDuplicates:\"Cannot add the duplicate file '%{fileName}', it already exists\",companionError:\"Connection with Companion failed\",authAborted:\"Authentication aborted\",companionUnauthorizeHint:\"To unauthorize to your %{provider} account, please go to %{url}\",failedToUpload:\"Failed to upload %{file}\",noInternetConnection:\"No Internet connection\",connectedToInternet:\"Connected to the Internet\",noFilesFound:\"You have no files or folders here\",noSearchResults:\"Unfortunately, there are no results for this search\",selectX:{0:\"Select %{smart_count}\",1:\"Select %{smart_count}\"},allFilesFromFolderNamed:\"All files from folder %{name}\",openFolderNamed:\"Open folder %{name}\",cancel:\"Cancel\",logOut:\"Log out\",filter:\"Filter\",resetFilter:\"Reset filter\",loading:\"Loading...\",loadedXFiles:\"Loaded %{numFiles} files\",authenticateWithTitle:\"Please authenticate with %{pluginName} to select files\",authenticateWith:\"Connect to %{pluginName}\",signInWithGoogle:\"Sign in with Google\",searchImages:\"Search for images\",enterTextToSearch:\"Enter text to search for images\",search:\"Search\",resetSearch:\"Reset search\",emptyFolderAdded:\"No files were added from empty folder\",addedNumFiles:\"Added %{numFiles} file(s)\",folderAlreadyAdded:'The folder \"%{folder}\" was already added',folderAdded:{0:\"Added %{smart_count} file from %{folder}\",1:\"Added %{smart_count} files from %{folder}\"},additionalRestrictionsFailed:\"%{count} additional restrictions were not fulfilled\",unnamed:\"Unnamed\"}};function Q(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Q,\"_classPrivateFieldLooseBase\");var E1=0;function We(r){return\"__private_\"+E1+++\"_\"+r}o(We,\"_classPrivateFieldLooseKey\");var C1={version:\"4.2.2\"},xl={totalProgress:0,allowNewUpload:!0,error:null,recoveredState:null},gt=We(\"plugins\"),Rt=We(\"restricter\"),nn=We(\"storeUnsubscribe\"),Xr=We(\"emitter\"),is=We(\"preProcessors\"),ss=We(\"uploaders\"),Qr=We(\"postProcessors\"),Yt=We(\"informAndEmit\"),hn=We(\"checkRequiredMetaFieldsOnFile\"),Xu=We(\"checkRequiredMetaFields\"),an=We(\"assertNewUploadAllowed\"),Qu=We(\"transformFile\"),ln=We(\"startIfAutoProceed\"),un=We(\"checkAndUpdateFileState\"),Yu=We(\"addListeners\"),Pr=We(\"updateOnlineStatus\"),cn=We(\"requestClientById\"),Yr=We(\"createUpload\"),Ju=We(\"getUpload\"),os=We(\"removeUpload\"),Jr=We(\"runUpload\"),Fl=class r{static{o(this,\"Uppy\")}constructor(e){Object.defineProperty(this,Jr,{value:B1}),Object.defineProperty(this,os,{value:M1}),Object.defineProperty(this,Ju,{value:L1}
vendor: 4,655 bytes, line 2
2),Object.defineProperty(this,Yr,{value:N1}),Object.defineProperty(this,Yu,{value:I1}),Object.defineProperty(this,un,{value:D1}),Object.defineProperty(this,ln,{value:U1}),Object.defineProperty(this,Qu,{value:k1}),Object.defineProperty(this,an,{value:R1}),Object.defineProperty(this,Xu,{value:A1}),Object.defineProperty(this,hn,{value:O1}),Object.defineProperty(this,Yt,{value:T1}),Object.defineProperty(this,gt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,Rt,{writable:!0,value:void 0}),Object.defineProperty(this,nn,{writable:!0,value:void 0}),Object.defineProperty(this,Xr,{writable:!0,value:(0,Gf.default)()}),Object.defineProperty(this,is,{writable:!0,value:new Set}),Object.defineProperty(this,ss,{writable:!0,value:new Set}),Object.defineProperty(this,Qr,{writable:!0,value:new Set}),this.scheduledAutoProceed=null,this.wasOffline=!1,this.calculateProgress=(0,Kf.default)((s,n)=>{let a=this.getFile(s?.id);if(s==null||!a){this.log(`Not setting progress for a file that has been removed: ${s?.id}`);return}if(a.progress.percentage===100){this.log(`Not setting progress for a file that has been already uploaded: ${s.id}`);return}let l=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(s.id,{progress:{...a.progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:l?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()},500,{leading:!0,trailing:!0}),Object.defineProperty(this,Pr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),Object.defineProperty(this,cn,{writable:!0,value:new Map}),this.defaultLocale=Wf;let t={id:\"uppy\",autoProceed:!1,allowMultipleUploadBatches:!0,debug:!1,restrictions:Vf,meta:{},onBeforeFileAdded:o((s,n)=>!Object.hasOwn(n,s.id),\"onBeforeFileAdded\"),onBeforeUpload:o(s=>s,\"onBeforeUpload\"),store:new Sl,logger:Lf,infoTimeout:5e3},i={...t,...e};this.opts={...i,restrictions:{...t.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log(\"You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.\",\"warning\"):e&&e.debug&&(this.opts.logger=rn),this.log(`Using Core v${r.VERSION}`),this.i18nInit(),this.store=this.opts.store,this.setState({...xl,plugins:{},files:{},currentUploads:{},capabilities:{uploadProgress:Wu(),individualCancellation:!0,resumableUploads:!1},meta:{...this.opts.meta},info:[]}),Q(this,Rt)[Rt]=new _l(()=>this.opts,()=>this.i18n),Q(this,nn)[nn]=this.store.subscribe((s,n,a)=>{this.emit(\"state-update\",s,n,a),this.updateAll(n)}),this.opts.debug&&typeof window<\"u\"&&(window[this.opts.id]=this),Q(this,Yu)[Yu]()}emit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];Q(this,Xr)[Xr].emit(e,...i)}on(e,t){return Q(this,Xr)[Xr].on(e,t),this}once(e,t){return Q(this,Xr)[Xr].once(e,t),this}off(e,t){return Q(this,Xr)[Xr].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}patchFilesState(e){let t=this.getState().files;this.setState({files:{...t,...Object.fromEntries(Object.entries(e).map(i=>{let[s,n]=i;return[s,{...t[s],...n}]}))}})}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can\\u2019t set state for ${e} (the file could have been removed)`);this.patchFilesState({[e]:t})}i18nInit(){let e=o(i=>this.log(`Missing i18n string: ${i}`,\"error\"),\"onMissingKey\"),t=new ts([this.defaultLocale,this.opts.locale],{onMissingKey:e});this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e?.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(t=>{t.setOptions(e)}),this.setState(void 0)}resetProgress(){let e={percentage:0,bytesUploaded:!1,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},i=Object.create(null);Object.keys(t).forEach(s=>{i[s]={...t[s],progress:{...t[s].progress,...e},tus:void 0,transloadit:void 0}}),this.setState({files:i,...xl})}clear(){let{capabilities:e,currentUploads:t}=this.getState();if(Object.keys(t).length>0&&!e.individualCancellation)throw new Error(\"The installed uploader plugin does not allow removing files during an upload.\");this.setState({...xl,files:{}})}addPreProcessor(e){Q(this,is)[is].add(e)}removePreProcessor(e){return Q(this,is)[is].delete(e)}addPostProcessor(e){Q(this,Qr)[Qr].add(e)}removePostProcessor(e){return Q(this,Qr)[Qr].delete(e)}addUploader(e){Q(this,ss)[ss].add(e)}removeUploader(e){return Q(this,ss)[ss].delete(e)}
2setMeta(e){let t={...this.getState().meta,...e},i={...this.getState().files};Object.keys(i).forEach(s=>{i[s]={...i[s],meta:{...i[s].meta,...e}}}),this.log(\"Adding metadata:\"),this.log(e),this.setState({meta:t,files:i})}setFileMeta(e,t){let i={...this.getState().files};if(!i[e]){this.log(\"Was trying to set metadata for a file that has been removed: \",e);return}let s={...i[e].meta,...t};i[e]={...i[e],meta:s},this.setState({files:i})}getFile(e){return this.getState().files[e]}getFiles(){let{files:e}=this.getState();return Object.values(e)}getFilesByIds(e){return e.map(t=>this.getFile(t))}getObjectOfFilesPerState(){let{files:e,totalProgress:t,error:i}=this.getState(),s=Object.values(e),n=[],a=[],l=[],u=[],h=[],d=[],m=[],w=[],y=[];for(let P of s){let{progress:D}=P;!D.uploadComplete&&D.uploadStarted&&(n.push(P),P.isPaused||w.push(P)),D.uploadStarted||a.push(P),(D.uploadStarted||D.preprocess||D.postprocess)&&l.push(P),D.uploadStarted&&u.push(P),P.isPaused&&h.push(P),D.uploadComplete&&d.push(P),P.error&&m.push(P),(D.preprocess||D.postprocess)&&y.push(P)}return{newFiles:a,startedFiles:l,uploadStartedFiles:u,pausedFiles:h,completeFiles:d,erroredFiles:m,inProgressFiles:n,inProgressNotPausedFiles:w,processingFiles:y,isUploadStarted:u.length>0,isAllComplete:t===100&&d.length===s.length&&y.length===0,isAllErrored:!!i&&m.length===s.length,isAllPaused:n.length!==0&&h.length===n.length,isUploadInProgress:n.length>0,isSomeGhost:s.some(P=>P.isGhost)}}validateSingleFile(e){try{Q(this,Rt)[Rt].validateSingleFile(e)}catch(t){return t.message}return null}validateAggregateRestrictions(e){let t=this.getFiles();try{Q(this,Rt)[Rt].validateAggregateRestrictions(t,e)}catch(i){return i.message}return null}checkIfFileAlreadyExists(e){let{files:t}=this.getState();return!!(t[e]&&!t[e].isGhost)}addFile(e){Q(this,an)[an](e);let{nextFilesState:t,validFilesToAdd:i,errors:s}=Q(this,un)[un]([e]),n=s.filter(l=>l.isRestriction);if(Q(this,Yt)[Yt](n),s.length>0)throw s[0];this.setState({files:t});let[a]=i;return this.emit(\"file-added\",a),this.emit(\"files-added\",i),this.log(`Added file: ${a.name}, ${a.id}, mime type: ${a.type}`),Q(this,ln)[ln](),a.id}addFiles(e){Q(this,an)[an]();let{nextFilesState:t,validFilesToAdd:i,errors:s}=Q(this,un)[un](e),n=s.filter(l=>l.isRestriction);Q(this,Yt)[Yt](n);let a=s.filter(l=>!l.isRestriction);if(a.length>0){let l=`Multiple errors occurred while adding files:\n`;if(a.forEach(u=>{l+=`\n * ${u.message}`}),this.info({message:this.i18n(\"addBulkFilesFailed\",{smart_count:a.length}),details:l},\"error\",this.opts.infoTimeout),typeof AggregateError==\"function\")throw new AggregateError(a,l);{let u=new Error(l);throw u.errors=a,u}}this.setState({files:t}),i.forEach(l=>{this.emit(\"file-added\",l)}),this.emit(\"files-added\",i),i.length>5?this.log(`Added batch of ${i.length} files`):Object.values(i).forEach(l=>{this.log(`Added file: ${l.name}\n id: ${l.id}\n type: ${l.type}`)}),i.length>0&&Q(this,ln)[ln]()}removeFiles(e){let{files:t,currentUploads:i}=this.getState(),s={...t},n={...i},a=Object.create(null);e.forEach(d=>{t[d]&&(a[d]=t[d],delete s[d])});function l(d){return a[d]===void 0}o(l,\"fileIsNotRemoved\"),Object.keys(n).forEach(d=>{let m=i[d].fileIDs.filter(l);if(m.length===0){delete n[d];return}let{capabilities:w}=this.getState();if(m.length!==i[d].fileIDs.length&&!w.individualCancellation)throw new Error(\"The installed uploader plugin does not allow removing files during an upload.\");n[d]={...i[d],fileIDs:m}});let u={currentUploads:n,files:s};Object.keys(s).length===0&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();let h=Object.keys(a);h.forEach(d=>{this.emit(\"file-removed\",a[d])}),h.length>5?this.log(`Removed ${h.length} files`):this.log(`Removed files: ${h.join(\", \")}`)}removeFile(e){this.removeFiles([e])}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).progress.uploadComplete)return;let t=this.getFile(e),s=!(t.isPaused||!1);return this.setFileState(e,{isPaused:s}),this.emit(\"upload-pause\",t,s),s}
2pauseAll(){let e={...this.getState().files};Object.keys(e).filter(i=>!e[i].progress.uploadComplete&&e[i].progress.uploadStarted).forEach(i=>{let s={...e[i],isPaused:!0};e[i]=s}),this.setState({files:e}),this.emit(\"pause-all\")}resumeAll(){let e={...this.getState().files};Object.keys(e).filter(i=>!e[i].progress.uploadComplete&&e[i].progress.uploadStarted).forEach(i=>{let s={...e[i],isPaused:!1,error:null};e[i]=s}),this.setState({files:e}),this.emit(\"resume-all\")}retryAll(){let e={...this.getState().files},t=Object.keys(e).filter(s=>e[s].error);if(t.forEach(s=>{let n={...e[s],isPaused:!1,error:null};e[s]=n}),this.setState({files:e,error:null}),this.emit(\"retry-all\",Object.values(e)),t.length===0)return Promise.resolve({successful:[],failed:[]});let i=Q(this,Yr)[Yr](t,{forceAllowNewUpload:!0});return Q(this,Jr)[Jr](i)}cancelAll(){this.emit(\"cancel-all\");let{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t),this.setState(xl)}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit(\"upload-retry\",this.getFile(e));let t=Q(this,Yr)[Yr]([e],{forceAllowNewUpload:!0});return Q(this,Jr)[Jr](t)}logout(){this.iteratePlugins(e=>{var t;(t=e.provider)==null||t.logout==null||t.logout()})}calculateTotalProgress(){let t=this.getFiles().filter(h=>h.progress.uploadStarted||h.progress.preprocess||h.progress.postprocess);if(t.length===0){this.emit(\"progress\",0),this.setState({totalProgress:0});return}let i=t.filter(h=>h.progress.bytesTotal!=null),s=t.filter(h=>h.progress.bytesTotal==null);if(i.length===0){let h=t.length*100,d=s.reduce((w,y)=>w+y.progress.percentage,0),m=Math.round(d/h*100);this.setState({totalProgress:m});return}let n=i.reduce((h,d)=>{var m;return h+((m=d.progress.bytesTotal)!=null?m:0)},0),a=n/i.length;n+=a*s.length;let l=0;i.forEach(h=>{l+=h.progress.bytesUploaded}),s.forEach(h=>{l+=a*(h.progress.percentage||0)/100});let u=n===0?0:Math.round(l/n*100);u>100&&(u=100),this.setState({totalProgress:u}),this.emit(\"progress\",u)}updateOnlineStatus(){var e;((e=window.navigator.onLine)!=null?e:!0)?(this.emit(\"is-online\"),this.wasOffline&&(this.emit
2(\"back-online\"),this.info(this.i18n(\"connectedToInternet\"),\"success\",3e3),this.wasOffline=!1)):(this.emit(\"is-offline\"),this.info(this.i18n(\"noInternetConnection\"),\"error\",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e){if(typeof e!=\"function\"){let u=`Expected a plugin class, but got ${e===null?\"null\":typeof e}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(u)}for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s<t;s++)i[s-1]=arguments[s];let n=new e(this,...i),a=n.id;if(!a)throw new Error(\"Your plugin must have an id\");if(!n.type)throw new Error(\"Your plugin must have a type\");let l=this.getPlugin(a);if(l){let u=`Already found a plugin named '${l.id}'. Tried to use: '${a}'.\nUppy plugins must have unique \\`id\\` options.`;throw new Error(u)}return e.VERSION&&this.log(`Using ${a} v${e.VERSION}`),n.type in Q(this,gt)[gt]?Q(this,gt)[gt][n.type].push(n):Q(this,gt)[gt][n.type]=[n],n.install(),this.emit(\"plugin-added\",n),this}getPlugin(e){for(let t of Object.values(Q(this,gt)[gt])){let i=t.find(s=>s.id===e);if(i!=null)return i}}[Symbol.for(\"uppy test: getPlugins\")](e){return Q(this,gt)[gt][e]}iteratePlugins(e){Object.values(Q(this,gt)[gt]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit(\"plugin-remove\",e),e.uninstall&&e.uninstall();let t=Q(this,gt)[gt][e.type],i=t.findIndex(a=>a.id===e.id);i!==-1&&t.splice(i,1);let n={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(n)}destroy(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll(),Q(this,nn)[nn](),this.iteratePlugins(e=>{this.removePlugin(e)}),typeof window<\"u\"&&window.removeEventListener&&(window.removeEventListener(\"online\",Q(this,Pr)[Pr]),window.removeEventListener(\"offline\",Q(this,Pr)[Pr]))}hideInfo(){let{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit(\"info-hidden\")}info(e,t,i){t===void 0&&(t=\"info\"),i===void 0&&(i=3e3);let s=typeof e==\"object\";this.setState({info:[...this.getState().info,{type:t,message:s?e.message:e,details:s?e.details:null}]}),setTimeout(()=>this.hideInfo(),i),this.emit(\"info-visible\")}log(e,t){let{logger:i}=this.opts;switch(t){case\"error\":i.error(e);break;case\"warning\":i.warn(e);break;default:i.debug(e);break}}registerRequestClient(e,t){Q(this,cn)[cn].set(e,t)}
2getRequestClientForFile(e){if(!e.remote)throw new Error(`Tried to get RequestClient for a non-remote file ${e.id}`);let t=Q(this,cn)[cn].get(e.remote.requestClientId);if(t==null)throw new Error(`requestClientId \"${e.remote.requestClientId}\" not registered for file \"${e.id}\"`);return t}restore(e){return this.log(`Core: attempting to restore upload \"${e}\"`),this.getState().currentUploads[e]?Q(this,Jr)[Jr](e):(Q(this,os)[os](e),Promise.reject(new Error(\"Nonexistent upload\")))}[Symbol.for(\"uppy test: createUpload\")](){return Q(this,Yr)[Yr](...arguments)}addResultData(e,t){if(!Q(this,Ju)[Ju](e)){this.log(`Not setting result for an upload that has been removed: ${e}`);return}let{currentUploads:i}=this.getState(),s={...i[e],result:{...i[e].result,...t}};this.setState({currentUploads:{...i,[e]:s}})}upload(){var e;(e=Q(this,gt)[gt].uploader)!=null&&e.length||this.log(\"No uploader type plugins are used\",\"warning\");let{files:t}=this.getState(),i=this.opts.onBeforeUpload(t);return i===!1?Promise.reject(new Error(\"Not starting the upload because onBeforeUpload returned false\")):(i&&typeof i==\"object\"&&(t=i,this.setState({files:t})),Promise.resolve().then(()=>Q(this,Rt)[Rt].validateMinNumberOfFiles(t)).catch(s=>{throw Q(this,Yt)[Yt]([s]),s}).then(()=>{if(!Q(this,Xu)[Xu](t))throw new qt(this.i18n(\"missingRequiredMetaField\"))}).catch(s=>{throw s}).then(()=>{let{currentUploads:s}=this.getState(),n=Object.values(s).flatMap(u=>u.fileIDs),a=[];Object.keys(t).forEach(u=>{let h=this.getFile(u);!h.progress.uploadStarted&&n.indexOf(u)===-1&&a.push(h.id)});let l=Q(this,Yr)[Yr](a);return Q(this,Jr)[Jr](l)}).catch(s=>{throw this.emit(\"error\",s),this.log(s,\"error\"),s}))}};function T1(r){for(let n of r)n.isRestriction?this.emit(\"restriction-failed\",n.file,n):this.emit(\"error\",n,n.file),this.log(n,\"warning\");let e=r.filter(n=>n.isUserFacing),t=4,i=e.slice(0,t),s=e.slice(t);i.forEach(n=>{let{message:a,details:l=\"\"}=n;this.info({message:a,details:l},\"error\",this.opts.infoTimeout)}),s.length>0&&this.info({message:this.i18n(\"additionalRestrictionsFailed\",{count:s.length})})}o(T1,\"_informAndEmit2\");function O1(r){let{missingFields:e,error:t}=Q(this,Rt)[Rt].getMissingRequiredMetaFields(r);return e.length>0?(this.setFileState(r.id,{missingRequiredMetaFields:e}),this.log(t.message),this.emit(\"restriction-failed\",r,t),!1):!0}o(O1,\"_checkRequiredMetaFieldsOnFile2\");function A1(r){let e=!0;for(let t of Object.values(r))Q(this,hn)[hn](t)||(e=!1);return e}o(A1,\"_checkRequiredMetaFields2\");function R1(r){let{allowNewUpload:e}=this.getState();if(e===!1){let t=new qt(this.i18n(\"noMoreFilesAllowed\"),{file:r});throw Q(this,Yt)[Yt]([t]),t}}o(R1,\"_assertNewUploadAllowed2\");function k1(r){let e=r instanceof File?{name:r.name,type:r.type,size:r.size,data:r}:r,t=tn(e),i=Gu(t,e),s=Dr(i).extension,n=Pl(e,this.getID()),a=e.meta||{};a.name=i,a.type=t;let l=Number.isFinite(e.data.size)?e.data.size:null;return{source:e.source||\"\",id:n,name:i,extension:s||\"\",meta:{...this.getState().meta,...a},type:t,data:e.data,progress:{percentage:0,bytesUploaded:!1,bytesTotal:l,uploadComplete:!1,uploadStarted:null},size:l,isGhost:!1,isRemote:e.isRemote||!1,remote:e.remote,preview:e.preview}}o(k1,\"_transformFile2\");function U1(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(r=>{r.isRestriction||this.log(r.stack||r.message||r)})},4))}o(U1,\"_startIfAutoProceed2\");function D1(r){let{files:e}=this.getState(),t={...e},i=[],s=[];for(let l of r)try{var n;let u=Q(this,Qu)[Qu](l),h=(n=e[u.id])==null?void 0:n.isGhost;h&&(u={...e[u.id],isGhost:!1,data:l.data},this.log(`Replaced the blob in the restored ghost file: ${u.name}, ${u.id}`));let d=this.opts.onBeforeFileAdded(u,t);if(!d&&this.checkIfFileAlreadyExists(u.id)){var a;throw new qt(this.i18n(\"noDuplicates\",{fileName:(a=u.name)!=null?a:this.i18n(\"unnamed\")}),{file:l})}if(d===!1&&!h)throw new qt(\"Cannot add the file because onBeforeFileAdded returned false.\",{isUserFacing:!1,file:l});typeof d==\"object\"&&d!==null&&(u=d),Q(this,Rt)[Rt].validateSingleFile(u),t[u.id]=u,i.push(u)}catch(u){s.push(u)}try{Q(this,Rt)[Rt].validateAggregateRestrictions(Object.values(e),i)}catch(l){return s.push(l),{nextFilesState:e,validFilesToAdd:[],errors:s}}return{nextFilesState:t,validFilesToAdd:i,errors:s}}o(D1,\"_checkAndUpdateFileState2\");function I1(){let r=o((i,s,n)=>{let a=i.message||\"Unknown error\";i.details&&(a+=` ${i.details}`),this.setState({error:a}
2),s!=null&&s.id in this.getState().files&&this.setFileState(s.id,{error:a,response:n})},\"errorHandler\");this.on(\"error\",r),this.on(\"upload-error\",(i,s,n)=>{if(r(s,i,n),typeof s==\"object\"&&s.message){var a;this.log(s.message,\"error\");let l=new Error(this.i18n(\"failedToUpload\",{file:(a=i?.name)!=null?a:\"\"}));l.isUserFacing=!0,l.details=s.message,s.details&&(l.details+=` ${s.details}`),Q(this,Yt)[Yt]([l])}else Q(this,Yt)[Yt]([s])});let e=null;this.on(\"upload-stalled\",(i,s)=>{let{message:n}=i,a=s.map(l=>l.meta.name).join(\", \");e||(this.info({message:n,details:a},\"warning\",this.opts.infoTimeout),e=setTimeout(()=>{e=null},this.opts.infoTimeout)),this.log(`${n} ${a}`.trim(),\"warning\")}),this.on(\"upload\",()=>{this.setState({error:null})});let t=o(i=>{let s=i.filter(a=>{let l=a!=null&&this.getFile(a.id);return l||this.log(`Not setting progress for a file that has been removed: ${a?.id}`),l}),n=Object.fromEntries(s.map(a=>[a.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:a.size}}]));this.patchFilesState(n)},\"onUploadStarted\");this.on(\"upload-start\",t),this.on(\"upload-progress\",this.calculateProgress),this.on(\"upload-success\",(i,s)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}let n=this.getFile(i.id).progress;this.setFileState(i.id,{progress:{...n,postprocess:Q(this,Qr)[Qr].size>0?{mode:\"indeterminate\"}:void 0,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:s,uploadURL:s.uploadURL,isPaused:!1}),i.size==null&&this.setFileState(i.id,{size:s.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on(\"preprocess-progress\",(i,s)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getFile(i.id).progress,preprocess:s}})}),this.on(\"preprocess-complete\",i=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}let s={...this.getState().files};s[i.id]={...s[i.id],progress:{...s[i.id].progress}},delete s[i.id].progress.preprocess,this.setState({files:s})}),this.on(\"postprocess-progress\",(i,s)=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}this.setFileState(i.id,{progress:{...this.getState().files[i.id].progress,postprocess:s}})}),this.on(\"postprocess-complete\",i=>{if(i==null||!this.getFile(i.id)){this.log(`Not setting progress for a file that has been removed: ${i?.id}`);return}let s={...this.getState().files};s[i.id]={...s[i.id],progress:{...s[i.id].progress}},delete s[i.id].progress.postprocess,this.setState({files:s})}),this.on(\"restored\",()=>{this.calculateTotalProgress()}),this.on(\"dashboard:file-edit-complete\",i=>{i&&Q(this,hn)[hn](i)}),typeof window<\"u\"&&window.addEventListener&&(window.addEventListener(\"online\",Q(this,Pr)[Pr]),window.addEventListener(\"offline\",Q(this,Pr)[Pr]),setTimeout(Q(this,Pr)[Pr],3e3))}o(I1,\"_addListeners2\");function N1(r,e){e===void 0&&(e={});let{forceAllowNewUpload:t=!1}=e,{allowNewUpload:i,currentUploads:s}=this.getState();if(!i&&!t)throw new Error(\"Cannot create a new upload: already uploading.\");let n=dr();return this.emit(\"upload\",n,this.getFilesByIds(r)),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...s,[n]:{fileIDs:r,step:0,result:{}}}}),n}o(N1,\"_createUpload2\");function L1(r){let{currentUploads:e}=this.getState();return e[r]}o(L1,\"_getUpload2\");function M1(r){let e={...this.getState().currentUploads};delete e[r],this.setState({currentUploads:e})}o(M1,\"_removeUpload2\");async function B1(r){let e=o(()=>{let{currentUploads:n}=this.getState();return n[r]},\"getCurrentUpload\"),t=e(),i=[...Q(this,is)[is],...Q(this,ss)[ss],...Q(this,Qr)[Qr]];try{for(let n=t.step||0;n<i.length&&t;n++){let a=i[n];this.setState({currentUploads:{...this.getState().currentUploads,[r]:{...t,step:n}}});let{fileIDs:l}=t;await a(l,r),t=e()}}catch(n){throw Q(this,os)[os](r),n}if(t){t.fileIDs.forEach(u=>{let h=this.getFile(u);
2h&&h.progress.postprocess&&this.emit(\"postprocess-complete\",h)});let n=t.fileIDs.map(u=>this.getFile(u)),a=n.filter(u=>!u.error),l=n.filter(u=>u.error);this.addResultData(r,{successful:a,failed:l,uploadID:r}),t=e()}let s;return t&&(s=t.result,this.emit(\"complete\",s),Q(this,os)[os](r)),s==null&&this.log(`Not setting result for an upload that has been removed: ${r}`),s}o(B1,\"_runUpload2\");Fl.VERSION=C1.version;var Zu=Fl;var fn,le,em,z1,dn,Xf,j1,El={},tm=[],H1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Zr(r,e){for(var t in e)r[t]=e[t];return r}o(Zr,\"s\");function rm(r){var e=r.parentNode;e&&e.removeChild(r)}o(rm,\"a\");function c(r,e,t){var i,s,n,a={};for(n in e)n==\"key\"?i=e[n]:n==\"ref\"?s=e[n]:a[n]=e[n];if(arguments.length>2&&(a.children=arguments.length>3?fn.call(arguments,2):t),typeof r==\"function\"&&r.defaultProps!=null)for(n in r.defaultProps)a[n]===void 0&&(a[n]=r.defaultProps[n]);return pn(r,a,i,s,null)}o(c,\"h\");function pn(r,e,t,i,s){var n={type:r,props:e,key:t,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:s??++em};return s==null&&le.vnode!=null&&le.vnode(n),n}o(pn,\"v\");function im(){return{current:null}}o(im,\"y\");function Jt(r){return r.children}o(Jt,\"p\");function Ue(r,e){this.props=r,this.context=e}o(Ue,\"d\");function ho(r,e){if(e==null)return r.__?ho(r.__,r.__.__k.indexOf(r)+1):null;for(var t;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null)return t.__e;return typeof r.type==\"function\"?ho(r):null}o(ho,\"_\");function sm(r){var e,t;if((r=r.__)!=null&&r.__c!=null){for(r.__e=r.__c.base=null,e=0;e<r.__k.length;e++)if((t=r.__k[e])!=null&&t.__e!=null){r.__e=r.__c.base=t.__e;break}return sm(r)}}o(sm,\"k\");function Yf(r){(!r.__d&&(r.__d=!0)&&dn.push(r)&&!Cl.__r++||Xf!==le.debounceRendering)&&((Xf=le.debounceRendering)||setTimeout)(Cl)}o(Yf,\"b\");function Cl(){for(var r;Cl.__r=dn.length;)r=dn.sort(function(e,t){return e.__v.__b-t.__v.__b}),dn=[],r.some(function(e){var t,i,s,n,a,l;e.__d&&(a=(n=(t=e).__v).__e,(l=t.__P)&&(i=[],(s=Zr({},n)).__v=n.__v+1,ec(l,n,s,t.__n,l.ownerSVGElement!==void 0,n.__h!=null?[a]:null,i,a??ho(n),n.__h),lm(i,n),n.__e!=a&&sm(n)))})}o(Cl,\"g\");function om(r,e,t,i,s,n,a,l,u,h){var d,m,w,y,P,D,C,O=i&&i.__k||tm,z=O.length;for(t.__k=[],d=0;d<e.length;d++)if((y=t.__k[d]=(y=e[d])==null||typeof y==\"boolean\"?null:typeof y==\"string\"||typeof y==\"number\"||typeof y==\"bigint\"?pn(null,y,null,null,y):Array.isArray(y)?pn(Jt,{children:y},null,null,null):y.__b>0?pn(y.type,y.props,y.key,null,y.__v):y)!=null){if(y.__=t,y.__b=t.__b+1,(w=O[d])===null||w&&y.key==w.key&&y.type===w.type)O[d]=void 0;else for(m=0;m<z;m++){if((w=O[m])&&y.key==w.key&&y.type===w.type){O[m]=void 0;break}w=null}ec(r,y,w=w||El,s,n,a,l,u,h),P=y.__e,(m=y.ref)&&w.ref!=m&&(C||(C=[]),w.ref&&C.push(w.ref,null,y),C.push(m,y.__c||P,y)),P!=null?(D==null&&(D=P),typeof y.type==\"function\"&&y.__k===w.__k?y.__d=u=nm(y,u,r):u=am(r,y,w,O,P,u),typeof t.type==\"function\"&&(t.__d=u)):u&&w.__e==u&&u.parentNode!=r&&(u=ho(w))}for(t.__e=D,d=z;d--;)O[d]!=null&&(typeof t.type==\"function\"&&O[d].__e!=null&&O[d].__e==t.__d&&(t.__d=ho(i,d+1)),cm(O[d],O[d]));if(C)for(d=0;d<C.length;d++)um(C[d],C[++d],C[++d])}o(om,\"w\");function nm(r,e,t){for(var i,s=r.__k,n=0;s&&n<s.length;n++)(i=s[n])&&(i.__=r,e=typeof i.type==\"function\"?nm(i,e,t):am(t,i,i,s,i.__e,e));return e}o(nm,\"m\");function Ir(r,e){return e=e||[],r==null||typeof r==\"boolean\"||(Array.isArray(r)?r.some(function(t){Ir(t,e)}):e.push(r)),e}o(Ir,\"x\");function am(r,e,t,i,s,n){var a,l,u;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(t==null||s!=n||s.parentNode==null)e:if(n==null||n.parentNode!==r)r.appendChild(s),a=null;else{for(l=n,u=0;(l=l.nextSibling)&&u<i.length;u+=2)if(l==s)break e;r.insertBefore(s,n),a=n}return a!==void 0?a:s.nextSibling}o(am,\"A\");function q1(r,e,t,i,s){var n;for(n in t)n===\"children\"||n===\"key\"||n in e||Tl(r,n,null,t[n],i);for(n in e)s&&typeof e[n]!=\"function\"||n===\"children\"||n===\"key\"||n===\"value\"||n===\"checked\"||t[n]===e[n]||Tl(r,n,e[n],t[n],i)}o(q1,\"C\");function Jf(r,e,t){e[0]===\"-\"?r.setProperty(e,t):r[e]=t==null?\"\":typeof t!=\"number\"||H1.test(e)?t:t+\"px\"}o(Jf,\"$\");function Tl(r,e,t,i,s){var n;e:if(e===\"style\")if(typeof t==\"string\")r.style.cssText=t;else{if(typeof i==\"string\"&&(r.style.cssText=i=\"\"),i)for(e in i)t&&e in t||Jf(r.style,e,\"\");if(t)for(e in t)i&&t[e]===i[e]||Jf(r.style,e,t[e])}else if(e[0]===\"o\"&&e[1]===\"n\")n=e!==(e=e.replace(/Capture$/,\"\")),e=e.toLowerCase()in r?e.toLowerCase().slice(2):e.slice(2),r.l||(r.l={}),r.l[e+n]=t,t?i||r.addEventListener(e,n?Zf:Qf,n):r.removeEventListener(e,n?Zf:Qf,n);else if(e!==\"dangerouslySetInnerHTML\"){if(s)e=e.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(e!==\"href\"&&e!==\"list\"&&e!==\"form\"&&e!==\"tabIndex\"&&e!==\"download\"&&e in r)try{r[e]=t??\"\";break e}catch{}typeof t==\"function\"||(t!=null&&(t!==!1||e[0]===\"a\"&&e[1]===\"r\")?r.setAttribute(e,t):r.removeAttribute(e))}}o(Tl,\"H\");function Qf(r){this.l[r.type+!1](le.event?le.event(r):r)}o(Qf,\"I\");function Zf(r){this.l[r.type+!0](le.event?le.event(r):r)}o(Zf,\"T\");function ec(r,e,t,i,s,n,a,l,u){var h,d,m,w,y,P,D,C,O,z,X,K,Z,$=e.type;if(e.constructor!==void 0)return null;t.__h!=null&&(u=t.__h,l=e.__e=t.__e,e.__h=null,n=[l]),(h=le.__b)&&h(e);try{e:if(typeof $==\"function\"){if(C=e.props,O=(h=$.contextType)&&i[h.__c],z=h?O?O.props.value:h.__:i,t.__c?D=(d=e.__c=t.__c).__=d.__E:(\"prototype\"in $&&$.prototype.render?e.__c=d=new $(C,z):(e.__c=d=new Ue(C,z),d.constructor=$,d.render=V1),O&&O.sub(d),d.props=C,d.state||(d.state={}),d.context=z,d.__n=i,m=d.__d=!0,d.__h=[]),d.__s==null&&(d.__s=d.state),$.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Zr({},d.__s)),Zr(d.__s,$.getDerivedStateFromProps(C,d.__s))),w=d.props,y=d.state,m)$.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if($.getDerivedStateFromProps==null&&C!==w&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(C,z),!d.__e&&d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(C,d.__s,z)===!1||e.__v===t.__v){d.props=C,d.state=d.__s,e.__v!==t.__v&&(d.__d=!1),d.__v=e,e.__e=t.__e,e.__k=t.__k,e.__k.forEac
2h(function(W){W&&(W.__=e)}),d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(C,d.__s,z),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(w,y,P)})}if(d.context=z,d.props=C,d.__v=e,d.__P=r,X=le.__r,K=0,\"prototype\"in $&&$.prototype.render)d.state=d.__s,d.__d=!1,X&&X(e),h=d.render(d.props,d.state,d.context);else do d.__d=!1,X&&X(e),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++K<25);d.state=d.__s,d.getChildContext!=null&&(i=Zr(Zr({},i),d.getChildContext())),m||d.getSnapshotBeforeUpdate==null||(P=d.getSnapshotBeforeUpdate(w,y)),Z=h!=null&&h.type===Jt&&h.key==null?h.props.children:h,om(r,Array.isArray(Z)?Z:[Z],e,t,i,s,n,a,l,u),d.base=e.__e,e.__h=null,d.__h.length&&a.push(d),D&&(d.__E=d.__=null),d.__e=!1}else n==null&&e.__v===t.__v?(e.__k=t.__k,e.__e=t.__e):e.__e=$1(t.__e,e,t,i,s,n,a,u);(h=le.diffed)&&h(e)}catch(W){e.__v=null,(u||n!=null)&&(e.__e=l,e.__h=!!u,n[n.indexOf(l)]=null),le.__e(W,e,t)}}o(ec,\"j\");function lm(r,e){le.__c&&le.__c(e,r),r.some(function(t){try{r=t.__h,t.__h=[],r.some(function(i){i.call(t)})}catch(i){le.__e(i,t.__v)}})}o(lm,\"z\");function $1(r,e,t,i,s,n,a,l){var u,h,d,m=t.props,w=e.props,y=e.type,P=0;if(y===\"svg\"&&(s=!0),n!=null){for(;P<n.length;P++)if((u=n[P])&&\"setAttribute\"in u==!!y&&(y?u.localName===y:u.nodeType===3)){r=u,n[P]=null;break}}if(r==null){if(y===null)return document.createTextNode(w);r=s?document.createElementNS(\"http://www.w3.org/2000/svg\",y):document.createElement(y,w.is&&w),n=null,l=!1}if(y===null)m===w||l&&r.data===w||(r.data=w);else{if(n=n&&fn.call(r.childNodes),h=(m=t.props||El).dangerouslySetInnerHTML,d=w.dangerouslySetInnerHTML,!l){if(n!=null)for(m={},P=0;P<r.attributes.length;P++)m[r.attributes[P].name]=r.attributes[P].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===r.innerHTML)||(r.innerHTML=d&&d.__html||\"\"))}if(q1(r,w,m,s,l),d)e.__k=[];else if(P=e.props.children,om(r,Array.isArray(P)?P:[P],e,t,i,s&&y!==\"foreignObject\",n,a,n?n[0]:t.__k&&ho(t,0),l),n!=null)for(P=n.length;P--;)n[P]!=null&&rm(n[P]);l||(\"value\"in w&&(P=w.value)!==void 0&&(P!==r.value||y===\"progress\"&&!P||y===\"option\"&&P!==m.value)&&Tl(r,\"value\",P,m.value,!1),\"checked\"in w&&(P=w.checked)!==void 0&&P!==r.checked&&Tl(r,\"checked\",P,m.checked,!1))}return r}
2o($1,\"L\");function um(r,e,t){try{typeof r==\"function\"?r(e):r.current=e}catch(i){le.__e(i,t)}}o(um,\"M\");function cm(r,e,t){var i,s;if(le.unmount&&le.unmount(r),(i=r.ref)&&(i.current&&i.current!==r.__e||um(i,null,e)),(i=r.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){le.__e(n,e)}i.base=i.__P=null}if(i=r.__k)for(s=0;s<i.length;s++)i[s]&&cm(i[s],e,typeof r.type!=\"function\");t||r.__e==null||rm(r.__e),r.__e=r.__d=void 0}o(cm,\"N\");function V1(r,e,t){return this.constructor(r,t)}o(V1,\"O\");function tc(r,e,t){var i,s,n;le.__&&le.__(r,e),s=(i=typeof t==\"function\")?null:t&&t.__k||e.__k,n=[],ec(e,r=(!i&&t||e).__k=c(Jt,null,[r]),s||El,El,e.ownerSVGElement!==void 0,!i&&t?[t]:s?null:e.firstChild?fn.call(e.childNodes):null,n,!i&&t?t:s?s.__e:e.firstChild,i),lm(n,r)}o(tc,\"P\");function Ol(r,e,t){var i,s,n,a=Zr({},r.props);for(n in e)n==\"key\"?i=e[n]:n==\"ref\"?s=e[n]:a[n]=e[n];return arguments.length>2&&(a.children=arguments.length>3?fn.call(arguments,2):t),pn(r.type,a,i||r.key,s||r.ref,null)}o(Ol,\"q\");fn=tm.slice,le={__e:o(function(r,e,t,i){for(var s,n,a;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(r)),a=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(r,i||{}),a=s.__d),a)return s.__E=s}catch(l){r=l}throw r},\"__e\")},em=0,z1=o(function(r){return r!=null&&r.constructor===void 0},\"i\"),Ue.prototype.setState=function(r,e){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Zr({},this.state),typeof r==\"function\"&&(r=r(Zr({},t),this.props)),r&&Zr(t,r),r!=null&&this.__v&&(e&&this.__h.push(e),Yf(this))},Ue.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),Yf(this))},Ue.prototype.render=Jt,dn=[],Cl.__r=0,j1=0;function mn(r){return typeof r!=\"object\"||r===null||!(\"nodeType\"in r)?!1:r.nodeType===Node.ELEMENT_NODE}o(mn,\"isDOMElement\");function W1(r,e){return e===void 0&&(e=document),typeof r==\"string\"?e.querySelector(r):mn(r)?r:null}o(W1,\"findDOMElement\");var Al=W1;function G1(r){for(var e;r&&!r.dir;)r=r.parentNode;return(e=r)==null?void 0:e.dir}o(G1,\"getTextDirection\");var Rl=G1;var Ce=class{static{o(this,\"BasePlugin\")}constructor(e,t){this.uppy=e,this.opts=t??{}}getPluginState(){let{plugins:e}=this.uppy.getState();return e?.[this.id]||{}}setPluginState(e){let{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(void 0),this.i18nInit()}i18nInit(){let e=new ts([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.setPluginState(void 0)}addTarget(e){throw new Error(\"Extend the addTarget method to add your plugin to another plugin's target\")}install(){}uninstall(){}update(e){}afterUpdate(){}};function hm(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(hm,\"_classPrivateFieldLooseBase\");var K1=0;function X1(r){return\"__private_\"+K1+++\"_\"+r}o(X1,\"_classPrivateFieldLooseKey\");function Y1(r){let e=null,t;return function(){for(var i=arguments.length,s=new Array(i),n=0;n<i;n++)s[n]=arguments[n];return t=s,e||(e=Promise.resolve().then(()=>(e=null,r(...t)))),e}}o(Y1,\"debounce\");var gn=X1(\"updateUI\"),rc=class r extends Ce{static{o(this,\"UIPlugin\")}constructor(){super(...arguments),Object.defineProperty(this,gn,{writable:!0,value:void 0})}getTargetPlugin(e){let t;if(typeof e?.addTarget==\"function\")t=e,t instanceof r||console.warn(new Error(\"The provided plugin is not an instance of UIPlugin. This is an indication of a bug with the way Uppy is bundled.\",{cause:{targetPlugin:t,UIPlugin:r}}));else if(typeof e==\"function\"){let i=e;this.uppy.iteratePlugins(s=>{s instanceof i&&(t=s)})}return t}mount(e,t){let i=t.id,s=Al(e);if(s){this.isTargetDOMEl=!0;let l=document.createElement(\"div\");return l.classList.add(\"uppy-Root\"),hm(this,gn)[gn]=Y1(u=>{this.uppy.getPlugin(this.id)&&(tc(this.render(u,l),l),this.afterUpdate())}),this.uppy.log(`Installing ${i} to a DOM element '${e}'`),this.opts.replaceTargetContent&&(s.innerHTML=\"\"),tc(this.render(this.uppy.getState(),l),l),this.el=l,s.appendChild(l),l.dir=this.opts.direction||Rl(l)||\"ltr\",this.onMount(),this.el}let n=this.getTargetPlugin(e);
2if(n)return this.uppy.log(`Installing ${i} to ${n.id}`),this.parent=n,this.el=n.addTarget(t),this.onMount(),this.el;this.uppy.log(`Not installing ${i}`);let a=`Invalid target option given to ${i}.`;throw typeof e==\"function\"?a+=\" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.\":a+=\"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\\n\\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.\",new Error(a)}render(e,t){throw new Error(\"Extend the render method to add your plugin to a DOM element\")}update(e){if(this.el!=null){var t,i;(t=(i=hm(this,gn))[gn])==null||t.call(i,e)}}unmount(){if(this.isTargetDOMEl){var e;(e=this.el)==null||e.remove()}this.onUnmount()}onMount(){}onUnmount(){}},ne=rc;var pc={};ml(pc,{Provider:()=>Ge,RequestClient:()=>$t,SearchProvider:()=>ls,getAllowedHosts:()=>Ke,tokenStorage:()=>Xe});var ic=class extends Error{static{o(this,\"UserFacingApiError\")}constructor(){super(...arguments),this.name=\"UserFacingApiError\"}},dm=ic;var bm=ve(ym(),1);var Q1=Object.prototype.toString,Z1=o(r=>Q1.call(r)===\"[object Error]\",\"isError\"),ew=new Set([\"network error\",\"Failed to fetch\",\"NetworkError when attempting to fetch resource.\",\"The Internet connection appears to be offline.\",\"Load failed\",\"Network request failed\",\"fetch failed\",\"terminated\"]);function sc(r){return r&&Z1(r)&&r.name===\"TypeError\"&&typeof r.message==\"string\"?r.message===\"Load failed\"?r.stack===void 0:ew.has(r.message):!1}o(sc,\"isNetworkError\");var po=class extends Error{static{o(this,\"AbortError\")}constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name=\"AbortError\",this.message=e}},vm=o((r,e,t)=>{let i=t.retries-(e-1);return r.attemptNumber=e,r.retriesLeft=i,r},\"decorateErrorWithCounts\");async function kl(r,e){return new Promise((t,i)=>{e={onFailedAttempt(){},retries:10,shouldRetry:o(()=>!0,\"shouldRetry\"),...e};let s=bm.default.operation(e),n=o(()=>{s.stop(),i(e.signal?.reason)},\"abortHandler\");e.signal&&!e.signal.aborted&&e.signal.addEventListener(\"abort\",n,{once:!0});let a=o(()=>{e.signal?.removeEventListener(\"abort\",n),s.stop()},\"cleanUp\");s.attempt(async l=>{try{let u=await r(l);a(),t(u)}catch(u){try{if(!(u instanceof Error))throw new TypeError(`Non-error was thrown: \"${u}\". You should only throw errors.`);if(u instanceof po)throw u.originalError;if(u instanceof TypeError&&!sc(u))throw u;if(vm(u,l,e),await e.shouldRetry(u)||(s.stop(),i(u)),await e.onFailedAttempt(u),!s.retry(u))throw s.mainError()}catch(h){vm(h,l,e),a(),i(h)}}})})}o(kl,\"pRetry\");var oc=class extends Error{static{o(this,\"NetworkError\")}constructor(e,t){t===void 0&&(t=null),super(\"This looks like a network error, the endpoint might be blocked by an internet provider or a firewall.\"),this.cause=e,this.isNetworkError=!0,this.request=t}},fr=oc;function as(){return fetch(...arguments).catch(r=>{throw r.name===\"AbortError\"?r:new fr(r)})}o(as,\"fetchWithNetworkError\");function Qt(r,e){return Object.prototype.hasOwnProperty.call(r,e)}o(Qt,\"has\");var nc=class extends Error{static{o(this,\"ErrorWithCause\")}constructor(e,t){super(e),this.cause=t?.cause,this.cause&&Qt(this.cause,\"isNetworkError\")?this.isNetworkError=this.cause.isNetworkError:this.isNetworkError=!1}},fo=nc;var wm=ve(vl(),1);function tw(r,e,t){let{progress:i,bytesUploaded:s,bytesTotal:n}=e;if(i){var a;r.uppy.log(`Upload progress: ${i}`),r.uppy.emit(\"upload-progress\",t,{uploadStarted:(a=t.progress.uploadStarted)!=null?a:0,bytesUploaded:s,bytesTotal:n}
2)}}o(tw,\"emitSocketProgress\");var Sm=(0,wm.default)(tw,300,{leading:!0,trailing:!0});function ac(r){var e;let i=(e=/^(?:https?:\\/\\/|\\/\\/)?(?:[^@\\n]+@)?(?:www\\.)?([^\\n]+)/i.exec(r))==null?void 0:e[1];return`${/^http:\\/\\//i.test(r)?\"ws\":\"wss\"}://${i}`}o(ac,\"getSocketHost\");var lc=class extends Error{static{o(this,\"AuthError\")}constructor(){super(\"Authorization required\"),this.name=\"AuthError\",this.isAuthError=!0}},Pm=lc;function ei(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ei,\"_classPrivateFieldLooseBase\");var rw=0;function Ul(r){return\"__private_\"+rw+++\"_\"+r}o(Ul,\"_classPrivateFieldLooseKey\");var iw={version:\"4.1.0\"};function sw(r){return r.replace(/\\/$/,\"\")}o(sw,\"stripSlash\");var _m=10,ow=5*60*1e3,hc=401,cc=class extends Error{static{o(this,\"HttpError\")}constructor(e){let{statusCode:t,message:i}=e;super(i),this.name=\"HttpError\",this.statusCode=t}};async function nw(r){if(r.status===hc)throw new Pm;if(r.ok)return r.json();let e=`Failed request with status: ${r.status}. ${r.statusText}`,t;try{t=await r.json(),t.message&&(e=`${e} message: ${t.message}`),t.requestId&&(e=`${e} request-Id: ${t.requestId}`)}catch(i){throw new Error(e,{cause:i})}throw r.status>=400&&r.status<=499&&t.message?new dm(t.message):new cc({statusCode:r.status,message:e})}o(nw,\"handleJSONResponse\");var ti=Ul(\"companionHeaders\"),yn=Ul(\"getUrl\"),uc=Ul(\"requestSocketToken\"),vn=Ul(\"awaitRemoteFileUpload\"),$t=class{static{o(this,\"RequestClient\")}constructor(e,t){Object.defineProperty(this,vn,{value:lw}),Object.defineProperty(this,yn,{value:aw}),Object.defineProperty(this,ti,{writable:!0,value:void 0}),Object.defineProperty(this,uc,{writable:!0,value:o(async i=>{var s;let{file:n,postBody:a,signal:l}=i;if(((s=n.remote)==null?void 0:s.url)==null)throw new Error(\"Cannot connect to an undefined URL\");return(await this.post(n.remote.url,{...n.remote.body,...a},{signal:l})).token},\"value\")}),this.uppy=e,this.opts=t,this.onReceiveResponse=this.onReceiveResponse.bind(this),ei(this,ti)[ti]=t.companionHeaders}setCompanionHeaders(e){ei(this,ti)[ti]=e}[Symbol.for(\"uppy test: getCompanionHeaders\")](){return ei(this,ti)[ti]}get hostname(){let{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return sw(e&&e[t]?e[t]:t)}async headers(e){return e===void 0&&(e=!1),{...{Accept:\"application/json\",...e?void 0:{\"Content-Type\":\"application/json\"}},...ei(this,ti)[ti]}}onReceiveResponse(e){let{headers:t}=e,s=this.uppy.getState().companion||{},n=this.opts.companionUrl;t.has(\"i-am\")&&t.get(\"i-am\")!==s[n]&&this.uppy.setState({companion:{...s,[n]:t.get(\"i-am\")}})}async request(e){let{path:t,method:i=\"GET\",data:s,skipPostResponse:n,signal:a}=e;try{let l=await this.headers(!s),u=await as(ei(this,yn)[yn](t),{method:i,signal:a,headers:l,credentials:this.opts.companionCookiesRule||\"same-origin\",body:s?JSON.stringify(s):null});return n||this.onReceiveResponse(u),await nw(u)}catch(l){throw l.isAuthError||l.name===\"UserFacingApiError\"||l.name===\"AbortError\"?l:new fo(`Could not ${i} ${ei(this,yn)[yn](t)}`,{cause:l})}}async get(e,t){return this.request({...t,path:e})}async post(e,t,i){return this.request({...i,path:e,method:\"POST\",data:t})}async delete(e,t,i){return this.request({...i,path:e,method:\"DELETE\",data:t})}async uploadRemoteFile(e,t,i){var s=this;try{let{signal:n,getQueue:a}=i||{};return await kl(async()=>{var l;let u=(l=this.uppy.getFile(e.id))==null?void 0:l.serverToken;
vendor: 1,615 bytes, line 2
2if(u!=null)return this.uppy.log(`Connecting to exiting websocket ${u}`),ei(this,vn)[vn]({file:e,queue:a(),signal:n});let d=await a().wrapPromiseFunction(async function(){try{return await ei(s,uc)[uc](...arguments)}catch(m){if(m.isAuthError)throw new po(m);if(m.cause==null)throw m;let w=m.cause,y=o(()=>[408,409,429,418,423].includes(w.statusCode)||w.statusCode>=500&&w.statusCode<=599&&![501,505].includes(w.statusCode),\"isRetryableHttpError\");throw w.name===\"HttpError\"&&!y()?new po(w):w}},{priority:-1})({file:e,postBody:t,signal:n}).abortOn(n);if(this.uppy.getFile(e.id))return this.uppy.setFileState(e.id,{serverToken:d}),ei(this,vn)[vn]({file:this.uppy.getFile(e.id),queue:a(),signal:n})},{retries:_m,signal:n,onFailedAttempt:o(l=>this.uppy.log(`Retrying upload due to: ${l.message}`,\"warning\"),\"onFailedAttempt\")})}catch(n){if(n.name===\"AbortError\")return;throw this.uppy.emit(\"upload-error\",e,n),n}}};function aw(r){return/^(https?:|)\\/\\//.test(r)?r:`${this.hostname}/${r}`}o(aw,\"_getUrl2\");async function lw(r){let{file:e,queue:t,signal:i}=r,s,{capabilities:n}=this.uppy.getState();try{return await new Promise((a,l)=>{let u=e.serverToken,h=ac(e.remote.companionUrl),d,m,w,{isPaused:y}=e,P=o((W,te)=>{if(d==null||d.readyState!==d.OPEN){var se;this.uppy.log(`Cannot send \"${W}\" to socket ${e.id} because the socket state was ${String((se=d)==null?void 0:se.readyState)}`,\"warning\");return}d.send(JSON.stringify({action:W,payload:te??{}}))},\"socketSend\");function D(){n.resumableUploads&&P(y?\"pause\":\"resume\")}o(D,\"sendState\");let C=o(async()=>{m&&m.abort(),m=new AbortController;
2let W=o(se=>{var Ae;this.uppy.setFileState(e.id,{serverToken:null}),(Ae=m)==null||Ae.abort==null||Ae.abort(),l(se)},\"onFatalError\");function te(){clearTimeout(w),!y&&(w=setTimeout(()=>W(new Error(\"Timeout waiting for message from Companion socket\")),ow))}o(te,\"resetActivityTimeout\");try{await t.wrapPromiseFunction(async()=>{await kl(o(async()=>new Promise((Ae,je)=>{d=new WebSocket(`${h}/api/${u}`),te(),d.addEventListener(\"close\",()=>{d=void 0,je(new Error(\"Socket closed unexpectedly\"))}),d.addEventListener(\"error\",xe=>{var De;this.uppy.log(`Companion socket error ${JSON.stringify(xe)}, closing socket`,\"warning\"),(De=d)==null||De.close()}),d.addEventListener(\"open\",()=>{D()}),d.addEventListener(\"message\",xe=>{te();try{let{action:F,payload:I}=JSON.parse(xe.data);switch(F){case\"progress\":{Sm(this,I,this.uppy.getFile(e.id));break}case\"success\":{var De,ft,E,S;let j=(De=I.response)==null?void 0:De.responseText;this.uppy.emit(\"upload-success\",this.uppy.getFile(e.id),{uploadURL:I.url,status:(ft=(E=I.response)==null?void 0:E.status)!=null?ft:200,body:j?JSON.parse(j):void 0}),(S=m)==null||S.abort==null||S.abort(),a();break}case\"error\":{let{message:j}=I.error;throw Object.assign(new Error(j),{cause:I.error})}default:this.uppy.log(`Companion socket unknown action ${F}`,\"warning\")}}catch(F){W(F)}});let He=o(()=>{this.uppy.log(`Closing socket ${e.id}`,\"info\"),clearTimeout(w),d&&d.close(),d=void 0},\"closeSocket\");m.signal.addEventListener(\"abort\",()=>{He()})}),\"reconnectWebsocket\"),{retries:_m,signal:m.signal,onFailedAttempt:o(()=>{m.signal.aborted||this.uppy.log(`Retrying websocket ${e.id}`,\"info\")},\"onFailedAttempt\")})})().abortOn(m.signal)}catch(se){if(m.signal.aborted)return;W(se)}},\"createWebsocket\"),O=o(W=>{n.resumableUploads&&(y=W,d&&D())},\"pause\"),z=o(W=>{var te;n.individualCancellation&&W.id===e.id&&(P(\"cancel\"),(te=m)==null||te.abort==null||te.abort(),this.uppy.log(`upload ${e.id} was removed`,\"info\"),a())},\"onFileRemove\"),X=o(()=>{var W;P(\"cancel\"),(W=m)==null||W.abort==null||W.abort(),this.uppy.log(`upload ${e.id} was canceled`,\"info\"),a()},\"onCancelAll\"),K=o((W,te)=>{W?.id===e.id&&O(te)},\"onFilePausedChange\"),Z=o(()=>O(!0),\"onPauseAll\"),$=o(()=>O(!1),\"onResumeAll\");this.uppy.on(\"file-removed\",z),this.uppy.on(\"cancel-all\",X),this.uppy.on(\"upload-pause\",K),this.uppy.on(\"pause-all\",Z),this.uppy.on(\"resume-all\",$),s=o(()=>{this.uppy.off(\"file-removed\",z),this.uppy.off(\"cancel-all\",X),this.uppy.off(\"upload-pause\",K),this.uppy.off(\"pause-all\",Z),this.uppy.off(\"resume-all\",$)},\"removeEventHandlers\"),i.addEventListener(\"abort\",()=>{var W;(W=m)==null||W.abort()}),C()})}finally{s?.()}}o(lw,\"_awaitRemoteFileUpload2\");$t.VERSION=iw.version;function mr(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(mr,\"_classPrivateFieldLooseBase\");var uw=0;function dc(r){return\"__private_\"+uw+++\"_\"+r}o(dc,\"_classPrivateFieldLooseKey\");var cw=o(r=>r.split(\"-\").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(\" \"),\"getName\");function hw(){return location.origin}o(hw,\"getOrigin\");function xm(r){if(typeof r==\"string\")return new RegExp(`^${r}$`);if(r instanceof RegExp)return r}o(xm,\"getRegex\");function dw(r,e){return(Array.isArray(e)?e.map(xm):[xm(e)]).some(i=>i?.test(r)||i?.test(`${r}/`))}o(dw,\"isOriginAllowed\");var _r=dc(\"refreshingTokenPromise\"),bn=dc(\"getAuthToken\"),xr=dc(\"getPlugin\"),Ge=class extends $t{static{o(this,\"Provider\")}constructor(e,t){super(e,t),Object.defineProperty(this,xr,{value:fw}),Object.defineProperty(this,bn,{value:pw}),Object.defineProperty(this,_r,{writable:!0,value:void 0}),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||cw(this.id),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null,this.supportsRefreshToken=!!t.supportsRefreshToken}async headers(){let[e,t]=await Promise.all([super.headers(),mr(this,bn)[bn]()]),i={};return t&&(i[\"uppy-auth-token\"]=t),this.companionKeysParams&&(i[\"uppy-credentials-params\"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...e,...i}}onReceiveResponse(e){super.onReceiveResponse(e);let t=mr(this,xr)[xr](),s=t.getPluginState().authenticated?e.status!==
2hc:e.status<400;return t.setPluginState({authenticated:s}),e}async setAuthToken(e){return mr(this,xr)[xr]().storage.setItem(this.tokenKey,e)}async removeAuthToken(){return mr(this,xr)[xr]().storage.removeItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error(\"Could not load authentication data required for third-party login. Please try again later.\")}authQuery(e){return{}}authUrl(e){let{authFormData:t,query:i}=e,s=new URLSearchParams({...i,state:btoa(JSON.stringify({origin:hw()})),...this.authQuery({authFormData:t})});return this.preAuthToken&&s.set(\"uppyPreAuthToken\",this.preAuthToken),`${this.hostname}/${this.id}/connect?${s}`}async loginSimpleAuth(e){let{uppyVersions:t,authFormData:i,signal:s}=e,n=await this.post(`${this.id}/simple-auth`,{form:i},{qs:{uppyVersions:t},signal:s});this.setAuthToken(n.uppyAuthToken)}async loginOAuth(e){let{uppyVersions:t,authFormData:i,signal:s}=e;return await this.ensurePreAuth(),s.throwIfAborted(),new Promise((n,a)=>{let l=this.authUrl({query:{uppyVersions:t},authFormData:i}),u=window.open(l,\"_blank\"),h,d=o(m=>{if(m.source!==u){let P=\"\";try{P=JSON.stringify(m.data)}catch{}this.uppy.log(`ignoring event from unknown source ${P}`,\"warning\");return}let{companionAllowedHosts:w}=mr(this,xr)[xr]().opts;if(!dw(m.origin,w)){a(new Error(`rejecting event from ${m.origin} vs allowed pattern ${w}`));return}let y=typeof m.data==\"string\"?JSON.parse(m.data):m.data;if(y.error){let{uppy:P}=this,D=P.i18n(\"authAborted\");P.info({message:D},\"warning\",5e3),a(new Error(\"auth aborted\"));return}if(!y.token){a(new Error(\"did not receive token from auth window\"));return}h(),n(this.setAuthToken(y.token))},\"handleToken\");h=o(()=>{u?.close(),window.removeEventListener(\"message\",d),s.removeEventListener(\"abort\",h)},\"cleanup\"),s.addEventListener(\"abort\",h),window.addEventListener(\"message\",d)})}async login(e){let{uppyVersions:t,authFormData:i,signal:s}=e;return this.loginOAuth({uppyVersions:t,authFormData:i,signal:s})}refreshTokenUrl(){return`${this.hostname}/${this.id}/refresh-token`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async request(){await mr(this,_r)[_r];try{return await super.request(...arguments)}catch(e){if(!this.supportsRefreshToken)throw e;let t=await mr(this,bn)[bn]();if(!e.isAuthError||!t)throw e;return mr(this,_r)[_r]==null&&(mr(this,_r)[_r]=(async()=>{try{this.uppy.log(\"[CompanionClient] Refreshing expired auth token\",\"info\");let i=await super.request({path:this.refreshTokenUrl(),method:\"POST\"});await this.setAuthToken(i.uppyAuthToken)}catch(i){throw i.isAuthError&&await this.removeAuthToken(),e}finally{mr(this,_r)[_r]=void 0}})()),await mr(this,_r)[_r],super.request(...arguments)}}async fetchPreAuthToken(){if(this.companionKeysParams)try{let e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,\"warning\")}}list(e,t){return this.get(`${this.id}/list/${e||\"\"}`,t)}async logout(e){let t=await this.get(`${this.id}/logout`,e);return await this.removeAuthToken(),t}};async function pw(){return mr(this,xr)[xr]().storage.getItem(this.tokenKey)}o(pw,\"_getAuthToken2\");function fw(){let r=this.uppy.getPlugin(this.pluginId);if(r==null)throw new Error(\"Plugin was nullish\");return r}o(fw,\"_getPlugin2\");var mw=o(r=>r.split(\"-\").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(\" \"),\"getName\"),ls=class extends $t{static{o(this,\"SearchProvider\")}constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||mw(this.id),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:\"\"}`)}};function Ke(r,e){if(r){if(typeof r!=\"string\"&&!Array.isArray(r)&&!(r instanceof RegExp))throw new TypeError('The option \"companionAllowedHosts\" must be one of string, Array, RegExp');return r}return/^(?!https?:\\/\\/).*$/i.test(e)?`https://${e.replace(/^\\/\\//,\"\")}`:new URL(e).origin}o(Ke,\"getAllowedHosts\");var Xe={};ml(Xe,{getItem:()=>yw,removeItem:()=>vw,setItem:()=>gw});function gw(r,e){return new Promise(t=>{localStorage.setItem(r,e),t()})}o(gw,\"setItem\");function yw(r){return Promise.resolve(localStorage.getItem(r))}o(yw,\"getItem\");function vw(r){return new Promise(e=>{localStorage.removeItem(r),e()})}o(vw,\"removeItem\");var Uc={};ml(Uc,{ProviderViews:()=>Ne,SearchProviderViews:()=>si,defaultPickerIcon:()=>yo});var Zm=ve(kt(),1);function wn(r){return{...r,type:r.mimeType,extension:r.name?Dr(r.name).extension:null}}o(wn,\"remoteFileObjToLocal\");var Ll,Ut,fc,Fm,Sn=0,km=[],Il=[],Em=le.__b,Cm=le.__r,Tm=le.diffed,Om=le.__c,Am=le.unmount;function gc(r,e){le.__h&&le.__h(Ut,r,Sn||e),Sn=0;var t=Ut.__H||(Ut.__H={__:[],__h:[]});return r>=t.__.length&&t.__.push({__V:Il}),t.__[r]}o(gc,\"p\");function Nr(r){return Sn=1,bw(Dm,r)}o(Nr,\"y\");function bw(r,e,t){var i=gc(Ll++,2);return i.t=r,i.__c||(i.__=[t?t(e):Dm(void 0,e),function(s){var n=i.t(i.__[0],s);i.__[0]!==n&&(i.__=[n,i.__[1]],i.__c.setState({}))}],i.__c=Ut),i.__}o(bw,\"d\");function gr(r,e){var t=gc(Ll++,3);!le.__s&&Um(t.__H,e)&&(t.__=r,t.u=e,Ut.__H.__h.push(t))}o(gr,\"_\");function ri(r){return Sn=5,us(function(){return{current:r}},[])}o(ri,\"s\");function us(r,e){var t=gc(Ll++,7);return Um(t.__H,e)?(t.__V=r(),t.u=e,t.__h=r,t.__V):t.__}o(us,\"F\");function mo(r,e){return Sn=8,us(function(){return r},e)}o(mo,\"T\");function ww(){for(var r;r=km.shift();)if(r.__P)try{r.__H.__h.forEach(Nl),r.__H.__h.forEach(mc),r.__H.__h=[]}catch(e){r.__H.__h=[],le.__e(e,r.__v)}}o(ww,\"b\");le.__b=function(r){Ut=null,Em&&Em(r)},le.__r=function(r){Cm&&Cm(r),Ll=0;var e=(Ut=r.__c).__H;e&&(fc===Ut?(e.__h=[],Ut.__h=[],e.__.forEach(function(t){t.__V=Il,t.u=void 0})):(e.__h.forEach(Nl),e.__h.forEach(mc),e.__h=[])),fc=Ut},le.diffed=function(r){Tm&&Tm(r);var e=r.__c;e&&e.__H&&(e.__H.__h.length&&(km.push(e)!==1&&Fm===le.requestAnimationFrame||((Fm=le.requestAnimationFrame)||function(t){var i,s=o(function(){clearTimeout(n),Rm&&c
2ancelAnimationFrame(i),setTimeout(t)},\"u\"),n=setTimeout(s,100);Rm&&(i=requestAnimationFrame(s))})(ww)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.__V!==Il&&(t.__=t.__V),t.u=void 0,t.__V=Il})),fc=Ut=null},le.__c=function(r,e){e.some(function(t){try{t.__h.forEach(Nl),t.__h=t.__h.filter(function(i){return!i.__||mc(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],le.__e(i,t.__v)}}),Om&&Om(r,e)},le.unmount=function(r){Am&&Am(r);var e,t=r.__c;t&&t.__H&&(t.__H.__.forEach(function(i){try{Nl(i)}catch(s){e=s}}),e&&le.__e(e,t.__v))};var Rm=typeof requestAnimationFrame==\"function\";function Nl(r){var e=Ut,t=r.__c;typeof t==\"function\"&&(r.__c=void 0,t()),Ut=e}o(Nl,\"j\");function mc(r){var e=Ut;r.__c=r.__(),Ut=e}o(mc,\"k\");function Um(r,e){return!r||r.length!==e.length||e.some(function(t,i){return t!==r[i]})}o(Um,\"w\");function Dm(r,e){return typeof e==\"function\"?e(r):e}o(Dm,\"z\");function Sw(){return c(\"svg\",{width:\"26\",height:\"26\",viewBox:\"0 0 26 26\",xmlns:\"http://www.w3.org/2000/svg\"},c(\"g\",{fill:\"none\",\"fill-rule\":\"evenodd\"},c(\"circle\",{fill:\"#FFF\",cx:\"13\",cy:\"13\",r:\"13\"}),c(\"path\",{d:\"M21.64 13.205c0-.639-.057-1.252-.164-1.841H13v3.481h4.844a4.14 4.14 0 01-1.796 2.716v2.259h2.908c1.702-1.567 2.684-3.875 2.684-6.615z\",fill:\"#4285F4\",\"fill-rule\":\"nonzero\"}),c(\"path\",{d:\"M13 22c2.43 0 4.467-.806 5.956-2.18l-2.908-2.259c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H4.957v2.332A8.997 8.997 0 0013 22z\",fill:\"#34A853\",\"fill-rule\":\"nonzero\"}),c(\"path\",{d:\"M7.964 14.71A5.41 5.41 0 017.682 13c0-.593.102-1.17.282-1.71V8.958H4.957A8.996 8.996 0 004 13c0 1.452.348 2.827.957 4.042l3.007-2.332z\",fill:\"#FBBC05\",\"fill-rule\":\"nonzero\"}),c(\"path\",{d:\"M13 7.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C17.463 4.891 15.426 4 13 4a8.997 8.997 0 00-8.043 4.958l3.007 2.332C8.672 9.163 10.656 7.58 13 7.58z\",fill:\"#EA4335\",\"fill-rule\":\"nonzero\"}),c(\"path\",{d:\"M4 4h18v18H4z\"})))}o(Sw,\"GoogleIcon\");function Pw(r){let{pluginName:e,i18n:t,onAuth:i}=r,s=e===\"Google Drive\",n=mo(a=>{a.preventDefault(),i()},[i]);return c(\"form\",{onSubmit:n},s?c(\"button\",{type:\"submit\",className:\"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn uppy-Provider-btn-google\",\"data-uppy-super-focusable\":!0},c(Sw,null),t(\"signInWithGoogle\")):c(\"button\",{type:\"submit\",className:\"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Provider-authBtn\",\"data-uppy-super-focusable\":!0},t(\"authenticateWith\",{pluginName:e})))}o(Pw,\"DefaultForm\");var _w=o(r=>{let{pluginName:e,i18n:t,onAuth:i}=r;return c(Pw,{pluginName:e,i18n:t,onAuth:i})},\"defaultRenderForm\");function yc(r){let{loading:e,pluginName:t,pluginIcon:i,i18n:s,handleAuth:n,renderForm:a=_w}=r;return c(\"div\",{className:\"uppy-Provider-auth\"},c(\"div\",{className:\"uppy-Provider-authIcon\"},i()),c(\"div\",{className:\"uppy-Provider-authTitle\"},s(\"authenticateWithTitle\",{pluginName:t})),c(\"div\",{className:\"uppy-Provider-authForm\"},a({pluginName:t,i18n:s,loading:e,onAuth:n})))}o(yc,\"AuthView\");var Im=ve(kt(),1);function vc(r){let{i18n:e,logout:t,username:i}=r;return c(Jt,null,i&&c(\"span\",{className:\"uppy-ProviderBrowser-user\",key:\"username\"},i),c(\"button\",{type:\"button\",onClick:t,className:\"uppy-u-reset uppy-c-btn uppy-ProviderBrowser-userLogout\",key:\"logout\"},e(\"logOut\")))}o(vc,\"User\");function bc(r){let{openFolder:e,title:t,breadcrumbsIcon:i,breadcrumbs:s,i18n:n}=r;return c(\"div\",{className:\"uppy-Provider-breadcrumbs\"},c(\"div\",{className:\"uppy-Provider-breadcrumbsIcon\"},i),s.map((a,l)=>{var u;return c(Jt,null,c(\"button\",{key:a.id,type:\"button\",className:\"uppy-u-reset uppy-c-btn\",onClick:o(()=>e(a.id),\"onClick\")},a.type===\"root\"?t:(u=a.data.name)!=null?u:n(\"unnamed\")),s.length===l+1?\"\":\" / \")}))}o(bc,\"Breadcrumbs\");function wc(r){return c(\"div\",{className:\"uppy-ProviderBrowser-header\"},c(\"div\",{className:(0,Im.default)(\"uppy-ProviderBrowser-headerBar\",!r.showBreadcrumbs&&\"uppy-ProviderBrowser-headerBar--simple\")},r.showBreadcrumbs&&c(bc,{openFolder:r.openFolder,breadcrumbs:r.breadcrumbs,breadcrumbsIcon:r.pluginIcon&&r.pluginIcon(),title:r.title,i18n:r.i18n}),c(vc,{logout:r.logout,username:r.username,i18n:r.i18n})))}o(wc,\"Header\");function Sc(){return Sc=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Sc.apply(null,arguments)}o(Sc,\"_extends\");var xw={position:\"relative\",width:\"100%\",minHeight:\"100%\"},Fw={position:\"absolute\",top:0,left:0,width:\"100%\",overflow:\"visible\"},Pc=class extends Ue{static{o(this,\"VirtualList\")}constructor(e){super(e),this.handleScroll=()=>{this.setState({offset:this.base.scrollTop})},this.handleResize=()=>{this.resize()},this.focusElement=null,this.state={offset:0,height:0}}componentDidMount(){this.resize(),window.addEventListener(\"resize\",this.handleResize)}componentWillUpdate(){this.base.contains(document.activeElement)&&(this.focusElement=document.activeElement)}componentDidUpdate(){this.focusElement&&this.focusElement.parentNode&&document.activeElement!==this.focusElement&&this.focusElement.focus(),this.focusElement=null,this.resize()}componentWillUnmount(){window.removeEventListener(\"resize\",this.handleResize)}resize(){let{height:e}=this.state;e!==this.base.offsetHeight&&this.setState({height:this.base.offsetHeight})}render(e){let{data:t,rowHeight:i,renderRow:s,overscanCount:n=10,...a}=e,{offset:l,height:u}=this.state,h=Math.floor(l/i),d=Math.floor(u/i);n&&(h=Math.max(0,h-h%n),d+=n);let m=h+d+4,w=t.slice(h,m),y={...xw,height:t.length*i},P={...Fw,top:h*i};return c(\"div\",Sc({onScroll:this.handleScroll},a),c(\"div\",{role:\"presentation\",style:y},c(\"div\",{role:\"presentation\",style:P},w.map(s))))}},Ml=Pc;var Nm=ve(kt(),1);
2function Ew(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:11,height:14.5,viewBox:\"0 0 44 58\"},c(\"path\",{d:\"M27.437.517a1 1 0 0 0-.094.03H4.25C2.037.548.217 2.368.217 4.58v48.405c0 2.212 1.82 4.03 4.03 4.03H39.03c2.21 0 4.03-1.818 4.03-4.03V15.61a1 1 0 0 0-.03-.28 1 1 0 0 0 0-.093 1 1 0 0 0-.03-.032 1 1 0 0 0 0-.03 1 1 0 0 0-.032-.063 1 1 0 0 0-.03-.063 1 1 0 0 0-.032 0 1 1 0 0 0-.03-.063 1 1 0 0 0-.032-.03 1 1 0 0 0-.03-.063 1 1 0 0 0-.063-.062l-14.593-14a1 1 0 0 0-.062-.062A1 1 0 0 0 28 .708a1 1 0 0 0-.374-.157 1 1 0 0 0-.156 0 1 1 0 0 0-.03-.03l-.003-.003zM4.25 2.547h22.218v9.97c0 2.21 1.82 4.03 4.03 4.03h10.564v36.438a2.02 2.02 0 0 1-2.032 2.032H4.25c-1.13 0-2.032-.9-2.032-2.032V4.58c0-1.13.902-2.032 2.03-2.032zm24.218 1.345l10.375 9.937.75.718H30.5c-1.13 0-2.032-.9-2.032-2.03V3.89z\"}))}o(Ew,\"FileIcon\");function Cw(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",style:{minWidth:16,marginRight:3},viewBox:\"0 0 276.157 276.157\"},c(\"path\",{d:\"M273.08 101.378c-3.3-4.65-8.86-7.32-15.254-7.32h-24.34V67.59c0-10.2-8.3-18.5-18.5-18.5h-85.322c-3.63 0-9.295-2.875-11.436-5.805l-6.386-8.735c-4.982-6.814-15.104-11.954-23.546-11.954H58.73c-9.292 0-18.638 6.608-21.737 15.372l-2.033 5.752c-.958 2.71-4.72 5.37-7.596 5.37H18.5C8.3 49.09 0 57.39 0 67.59v167.07c0 .886.16 1.73.443 2.52.152 3.306 1.18 6.424 3.053 9.064 3.3 4.652 8.86 7.32 15.255 7.32h188.487c11.395 0 23.27-8.425 27.035-19.18l40.677-116.188c2.11-6.035 1.43-12.164-1.87-16.816zM18.5 64.088h8.864c9.295 0 18.64-6.607 21.738-15.37l2.032-5.75c.96-2.712 4.722-5.373 7.597-5.373h29.565c3.63 0 9.295 2.876 11.437 5.806l6.386 8.735c4.982 6.815 15.104 11.954 23.546 11.954h85.322c1.898 0 3.5 1.602 3.5 3.5v26.47H69.34c-11.395 0-23.27 8.423-27.035 19.178L15 191.23V67.59c0-1.898 1.603-3.5 3.5-3.5zm242.29 49.15l-40.676 116.188c-1.674 4.78-7.812 9.135-12.877 9.135H18.75c-1.447 0-2.576-.372-3.02-.997-.442-.625-.422-1.814.057-3.18l40.677-116.19c1.674-4.78 7.812-9.134 12.877-9.134h188.487c1.448 0 2.577.372 3.02.997.443.625.423 1.814-.056 3.18z\"}))}o(Cw,\"FolderIcon\");function Tw(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",style:{width:16,marginRight:4},viewBox:\"0 0 58 58\"},c(\"path\",{d:\"M36.537 28.156l-11-7a1.005 1.005 0 0 0-1.02-.033C24.2 21.3 24 21.635 24 22v14a1 1 0 0 0 1.537.844l11-7a1.002 1.002 0 0 0 0-1.688zM26 34.18V23.82L34.137 29 26 34.18z\"}),c(\"path\",{d:\"M57 6H1a1 1 0 0 0-1 1v44a1 1 0 0 0 1 1h56a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1zM10 28H2v-9h8v9zm-8 2h8v9H2v-9zm10 10V8h34v42H12V40zm44-12h-8v-9h8v9zm-8 2h8v9h-8v-9zm8-22v9h-8V8h8zM2 8h8v9H2V8zm0 42v-9h8v9H2zm54 0h-8v-9h8v9z\"}))}o(Tw,\"VideoIcon\");function go(r){let{itemIconString:e,alt:t=void 0}=r;if(e===null)return null;switch(e){case\"file\":return c(Ew,null);case\"folder\":return c(Cw,null);case\"video\":return c(Tw,null);default:return c(\"img\",{src:e,alt:t,referrerPolicy:\"no-referrer\",loading:\"lazy\",width:16,height:16})}}o(go,\"ItemIcon\");function Ow(r){var e,t;let{file:i,toggleCheckbox:s,className:n,isDisabled:a,restrictionError:l,showTitles:u,children:h=null,i18n:d}=r;return c(\"li\",{className:n,title:a&&l?l:void 0},c(\"input\",{type:\"checkbox\",className:\"uppy-u-reset uppy-ProviderBrowserItem-checkbox uppy-ProviderBrowserItem-checkbox--grid\",onCh
2ange:s,name:\"listitem\",id:i.id,checked:i.status===\"checked\",disabled:a,\"data-uppy-super-focusable\":!0}),c(\"label\",{htmlFor:i.id,\"aria-label\":(e=i.data.name)!=null?e:d(\"unnamed\"),className:\"uppy-u-reset uppy-ProviderBrowserItem-inner\"},c(go,{itemIconString:i.data.thumbnail||i.data.icon}),u&&((t=i.data.name)!=null?t:d(\"unnamed\")),h))}o(Ow,\"GridItem\");var _c=Ow;function xc(r){var e,t,i;let{file:s,openFolder:n,className:a,isDisabled:l,restrictionError:u,toggleCheckbox:h,showTitles:d,i18n:m}=r;return c(\"li\",{className:a,title:s.status!==\"checked\"&&u?u:void 0},c(\"input\",{type:\"checkbox\",className:\"uppy-u-reset uppy-ProviderBrowserItem-checkbox\",onChange:h,name:\"listitem\",id:s.id,checked:s.status===\"checked\",\"aria-label\":s.data.isFolder?m(\"allFilesFromFolderNamed\",{name:(e=s.data.name)!=null?e:m(\"unnamed\")}):null,disabled:l,\"data-uppy-super-focusable\":!0}),s.data.isFolder?c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-ProviderBrowserItem-inner\",onClick:o(()=>n(s.id),\"onClick\"),\"aria-label\":m(\"openFolderNamed\",{name:(t=s.data.name)!=null?t:m(\"unnamed\")})},c(\"div\",{className:\"uppy-ProviderBrowserItem-iconWrap\"},c(go,{itemIconString:s.data.icon})),d&&s.data.name?c(\"span\",null,s.data.name):m(\"unnamed\")):c(\"label\",{htmlFor:s.id,className:\"uppy-u-reset uppy-ProviderBrowserItem-inner\"},c(\"div\",{className:\"uppy-ProviderBrowserItem-iconWrap\"},c(go,{itemIconString:s.data.icon})),d&&((i=s.data.name)!=null?i:m(\"unnamed\"))))}o(xc,\"ListItem\");function Fc(r){let{viewType:e,toggleCheckbox:t,showTitles:i,i18n:s,openFolder:n,file:a}=r,l=a.type===\"folder\"?null:a.restrictionError,u=!!l&&a.status!==\"checked\",h={file:a,openFolder:n,toggleCheckbox:t,i18n:s,viewType:e,showTitles:i,className:(0,Nm.default)(\"uppy-ProviderBrowserItem\",{\"uppy-ProviderBrowserItem--disabled\":u},{\"uppy-ProviderBrowserItem--noPreview\":a.data.icon===\"video\"},{\"uppy-ProviderBrowserItem--is-checked\":a.status===\"checked\"},{\"uppy-ProviderBrowserItem--is-partial\":a.status===\"partial\"}),isDisabled:u,restrictionError:l};switch(e){case\"grid\":return c(_c,h);case\"list\":return c(xc,h);case\"unsplash\":return c(_c,h,c(\"a\",{href:`${a.data.author.url}?utm_source=Companion&utm_medium=referral`,target:\"_blank\",rel:\"noopener noreferrer\",className:\"uppy-ProviderBrowserItem-author\",tabIndex:-1},a.data.author.name));default:throw new Error(`There is no such type ${e}`)}}o(Fc,\"Item\");function Aw(r){let{displayedPartialTree:e,viewType:t,toggleCheckbox:i,handleScroll:s,showTitles:n,i18n:a,isLoading:l,openFolder:u,noResultsLabel:h,virtualList:d}=r,[m,w]=Nr(!1);if(gr(()=>{let P=o(C=>{C.key===\"Shift\"&&w(!1)},\"handleKeyUp\"),D=o(C=>{C.key===\"Shift\"&&w(!0)},\"handleKeyDown\");return document.addEventListener(\"keyup\",P),document.addEventListener(\"keydown\",D),()=>{document.removeEventListener(\"keyup\",P),document.removeEventListener(\"keydown\",D)}},[]),l)return c(\"div\",{className:\"uppy-Provider-loading\"},typeof l==\"string\"?l:a(\"loading\"));if(e.length===0)return c(\"div\",{className:\"uppy-Provider-empty\"},h);let y=o(P=>c(Fc,{viewType:t,toggleCheckbox:o(D=>{var C;D.stopPropagation(),D.preventDefault(),(C=document.getSelection())==null||C.removeAllRanges(),i(P,m)},\"toggleCheckbox\"),showTitles:n,i18n:a,openFolder:u,file:P}),\"renderItem\");return d?c(\"div\",{className:\"uppy-ProviderBrowser-body\"},c(\"ul\",{className:\"uppy-ProviderBrowser-list\"},c(Ml,{data:e,renderRow:y,rowHeight:31}))):c(\"div\",{className:\"uppy-ProviderBrowser-body\"},c(\"ul\",{className:\"uppy-ProviderBrowser-list\",onScroll:s,role:\"listbox\",tabIndex:-1},e.map(y)))}o(Aw,\"Browser\");var Bl=Aw;var Rw=o((r,e,t,i,s)=>{let n=e.filter(y=>y.isFolder===!0),a=e.filter(y=>y.isFolder===!1),l=t.type===\"folder\"&&t.status===\"checked\",u=n.map(y=>({type:\"folder\",id:y.requestPath,cached:!1,nextPagePath:null,status:l?\"checked\":\"unchecked\",parentId:t.id,data:y})),h=a.map(y=>{let P=s(y);return{type:\"file\",id:y.requestPath,restrictionError:P,status:l&&!P?\"checked\":\"unchecked\",parentId:t.id,data:y}}),d={...t,cached:!0,nextPagePath:i};return[...r.map(y=>y.id===d.id?d:y),...u,...h]},\"afterOpenFolder\"),Lm=Rw;var kw=o((r,e,t,i,s)=>{let n=r.find(P=>P.id===e),a=t.filter(P=>P.isFolder===!0),l=t.filter(P=>P.isFolder===!1),u={...n,nextPagePath:i},h=r.map(P=>P.id===u.id?u:P),d=u.type===\"folder\"&&u.status===\"checked\",m=a.map(P=>({type:\"folder\",id:P.requestPath,cached:!1,nextPagePath:null,status:d?\"checked\":\"unchecked\",parentId:u.id,data:P})),w=l.map(P=>{let D=s(P);return{type:\"file\",id:P.requestPath,restrictionError:D,status:d&&!D?\"checked\":\"unchecked\",parentId:u.id,data:P}});return[...h,...m,...w]},\"afterScrollFolder\"),Mm=kw;var Uw=o(r=>r.map(e=>({...e}
2)),\"shallowClone\"),zl=Uw;var Ec=o((r,e,t)=>{r.filter(s=>s.type!==\"root\"&&s.parentId===e).forEach(s=>{s.status=t&&!(s.type===\"file\"&&s.restrictionError)?\"checked\":\"unchecked\",Ec(r,s.id,t)})},\"percolateDown\"),Cc=o((r,e)=>{let t=r.find(a=>a.id===e);if(t.type===\"root\")return;let i=r.filter(a=>a.type!==\"root\"&&a.parentId===t.id&&!(a.type===\"file\"&&a.restrictionError)),s=i.every(a=>a.status===\"checked\"),n=i.every(a=>a.status===\"unchecked\");s?t.status=\"checked\":n?t.status=\"unchecked\":t.status=\"partial\",Cc(r,t.parentId)},\"percolateUp\"),Dw=o((r,e)=>{let t=zl(r);if(e.length>=2){let i=t.filter(s=>s.type!==\"root\"&&e.includes(s.id));i.forEach(s=>{s.type===\"file\"?s.status=s.restrictionError?\"unchecked\":\"checked\":s.status=\"checked\"}),i.forEach(s=>{Ec(t,s.id,!0)}),Cc(t,i[0].parentId)}else{let i=t.find(s=>s.id===e[0]);i.status=i.status===\"checked\"?\"unchecked\":\"checked\",Ec(t,i.id,i.status===\"checked\"),Cc(t,i.parentId)}return t},\"afterToggleCheckbox\"),Bm=Dw;var Oc=ve(jm(),1);var _n=class extends Error{static{o(this,\"TimeoutError\")}constructor(e){super(e),this.name=\"TimeoutError\"}},Ac=class extends Error{static{o(this,\"AbortError\")}constructor(e){super(),this.name=\"AbortError\",this.message=e}},Hm=o(r=>globalThis.DOMException===void 0?new Ac(r):new DOMException(r),\"getDOMException\"),qm=o(r=>{let e=r.reason===void 0?Hm(\"This operation was aborted.\"):r.reason;return e instanceof Error?e:Hm(e)},\"getAbortedReason\");function Rc(r,e){let{milliseconds:t,fallback:i,message:s,customTimers:n={setTimeout,clearTimeout}}=e,a,u=new Promise((h,d)=>{if(typeof t!=\"number\"||Math.sign(t)!==1)throw new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${t}\\``);if(e.signal){let{signal:w}=e;w.aborted&&d(qm(w)),w.addEventListener(\"abort\",()=>{d(qm(w))})}if(t===Number.POSITIVE_INFINITY){r.then(h,d);return}let m=new _n;a=n.setTimeout.call(void 0,()=>{if(i){try{h(i())}catch(w){d(w)}return}typeof r.cancel==\"function\"&&r.cancel(),s===!1?h():s instanceof Error?d(s):(m.message=s??`Promise timed out after ${t} milliseconds`,d(m))},t),(async()=>{try{h(await r)}catch(w){d(w)}})()}).finally(()=>{u.clear()});return u.clear=()=>{n.clearTimeout.call(void 0,a),a=void 0},u}o(Rc,\"pTimeout\");function kc(r,e,t){let i=0,s=r.length;for(;s>0;){let n=Math.trunc(s/2),a=i+n;t(r[a],e)<=0?(i=++a,s-=n+1):s=n}return i}o(kc,\"lowerBound\");var xn=class{static{o(this,\"PriorityQueue\")}#e=[];enqueue(e,t){t={priority:0,...t};let i={priority:t.priority,run:e};if(this.size&&this.#e[this.size-1].priority>=t.priority){this.#e.push(i);return}let s=kc(this.#e,i,(n,a)=>a.priority-n.priority);this.#e.splice(s,0,i)}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return this.#e.length}};var Fn=class extends Oc.default{static{o(this,\"PQueue\")}#e;#n;#o=0;#p;#a;#f=0;#r;#l;#t;#m;#i=0;#u;#s;#g;timeout;constructor(e){if(super(),e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:xn,...e},!(typeof e.intervalCap==\"number\"&&e.intervalCap>=1))throw new TypeError(`Expected \\`intervalCap\\` to be a number from 1 and up, got \\`${e.intervalCap?.toString()??\"\"}\\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \\`interval\\` to be a finite number >= 0, got \\`${e.interval?.toString()??\"\"}\\` (${typeof e.interval})`);this.#e=e.carryoverConcurrencyCount,this.#n=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#p=e.intervalCap,this.#a=e.interval,this.#t=new e.queueClass,this.#m=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#g=e.throwOnTimeout===!0,this.#s=e.autoStart===!1}get#b(){return this.#n||this.#o<this.#p}get#w(){return this.#i<this.#u}#S(){this.#i--,this.#c(),this.emit(\"next\")}#P(){this.#v(),this.#y(),this.#l=void 0}get#_(){let e=Date.now();if(this.#r===void 0){let t=this.#f-e;if(t<0)this.#o=this.#e?this.#i:0;else return this.#l===void 0&&(this.#l=setTimeout(()=>{this.#P()},t)),!0}return!1}#c(){if(this.#t.size===0)return this.#r&&clearInterval(this.#r),this.#r=void 0,this.emit
2(\"empty\"),this.#i===0&&this.emit(\"idle\"),!1;if(!this.#s){let e=!this.#_;if(this.#b&&this.#w){let t=this.#t.dequeue();return t?(this.emit(\"active\"),t(),e&&this.#y(),!0):!1}}return!1}#y(){this.#n||this.#r!==void 0||(this.#r=setInterval(()=>{this.#v()},this.#a),this.#f=Date.now()+this.#a)}#v(){this.#o===0&&this.#i===0&&this.#r&&(clearInterval(this.#r),this.#r=void 0),this.#o=this.#e?this.#i:0,this.#h()}#h(){for(;this.#c(););}get concurrency(){return this.#u}set concurrency(e){if(!(typeof e==\"number\"&&e>=1))throw new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${e}\\` (${typeof e})`);this.#u=e,this.#h()}async#x(e){return new Promise((t,i)=>{e.addEventListener(\"abort\",()=>{i(e.reason)},{once:!0})})}async add(e,t={}){return t={timeout:this.timeout,throwOnTimeout:this.#g,...t},new Promise((i,s)=>{this.#t.enqueue(async()=>{this.#i++,this.#o++;try{t.signal?.throwIfAborted();let n=e({signal:t.signal});t.timeout&&(n=Rc(Promise.resolve(n),{milliseconds:t.timeout})),t.signal&&(n=Promise.race([n,this.#x(t.signal)]));let a=await n;i(a),this.emit(\"completed\",a)}catch(n){if(n instanceof _n&&!t.throwOnTimeout){i();return}s(n),this.emit(\"error\",n)}finally{this.#S()}},t),this.emit(\"add\"),this.#c()})}async addAll(e,t){return Promise.all(e.map(async i=>this.add(i,t)))}start(){return this.#s?(this.#s=!1,this.#h(),this):this}pause(){this.#s=!0}clear(){this.#t=new this.#m}async onEmpty(){this.#t.size!==0&&await this.#d(\"empty\")}async onSizeLessThan(e){this.#t.size<e||await this.#d(\"next\",()=>this.#t.size<e)}async onIdle(){this.#i===0&&this.#t.size===0||await this.#d(\"idle\")}async#d(e,t){return new Promise(i=>{let s=o(()=>{t&&!t()||(this.off(e,s),i())},\"listener\");this.on(e,s)})}get size(){return this.#t.size}sizeBy(e){return this.#t.filter(e).length}get pending(){return this.#i}get isPaused(){return this.#s}};var $m=o(async(r,e,t,i,s)=>{let n=[],a=t.cached?t.nextPagePath:t.id;for(;a;){let m=await i(a);n=n.concat(m.items),a=m.nextPagePath}let l=n.filter(m=>m.isFolder===!0),u=n.filter(m=>m.isFolder===!1),h=l.map(m=>({type:\"folder\",id:m.requestPath,cached:!1,nextPagePath:null,status:\"checked\",parentId:t.id,data:m})),d=u.map(m=>{let w=s(m);return{type:\"file\",id:m.requestPath,restrictionError:w,status:w?\"unchecked\":\"checked\",parentId:t.id,data:m}});t.cached=!0,t.nextPagePath=null,e.push(...d,...h),h.forEach(async m=>{r.add(()=>$m(r,e,m,i,s))})},\"recursivelyFetch\"),Lw=o(async(r,e,t,i)=>{let s=new Fn({concurrency:6}),n=zl(r);return n.filter(l=>l.type===\"folder\"&&l.status===\"checked\"&&(l.cached===!1||l.nextPagePath)).forEach(l=>{s.add(()=>$m(s,n,l,e,t))}),s.on(\"completed\",()=>{let l=n.filter(u=>u.type===\"file\"&&u.status===\"checked\").length;i(l)}),await s.onIdle(),n},\"afterFill\"),Vm=Lw;var cs={afterOpenFolder:Lm,afterScrollFolder:Mm,afterToggleCheckbox:Bm,afterFill:Vm};var Mw=o(r=>{let{scrollHeight:e,scrollTop:t,offsetHeight:i}=r.target;return e-(t+i)<50},\"shouldHandleScroll\"),Hl=Mw;var Bw=o(r=>e=>{if(!e.isAuthError){if(e.name===\"AbortError\"){r.log(\"Aborting request\",\"warning\");return}r.log(e,\"error\"),e.name===\"UserFacingApiError\"&&r.info({message:r.i18n(\"companionError\"),details:r.i18n(e.message)},\"warning\",5e3)}},\"handleError\"),ii=Bw;var zw=o((r,e,t,i)=>{let s=e.findIndex(n=>n.id===i);if(s!==-1&&t){let n=e.findIndex(l=>l.id===r);return e.slice(Math.min(s,n),Math.max(s,n)+1).map(l=>l.id)}return[r]},\"getClickedRange\"),ql=zw;function jw(r){let{searchString:e,setSearchString:t,submitSearchString:i,wrapperClassName:s,inputClassName:n,inputLabel:a,clearSearchLabel:l=\"\",showButton:u=!1,buttonLabel:h=\"\",buttonCSSClassName:d=\"\"}=r,m=o(P=>{t(P.target.value)},\"onInput\"),w=mo(P=>{P.preventDefault(),i()},[i]),[y]=Nr(()=>{let P=document.createElement(\"form\");return P.setAttribute(\"tabindex\",\"-1\"),P.id=dr(),P});return gr(()=>(document.body.appendChild(y),y.addEventListener(\"submit\",w),()=>{y.removeEventListener(\"submit\",w),document.body.removeChild(y)}),[y,w]),c(\"section\",{className:s},c(\"input\",{className:`uppy-u-reset ${n}`,type:\"search\",\"aria-label\":a,placeholder:a,value:e,onInput:m,form:y.id,\"data-uppy-super-focusable\":!0}
2),!u&&c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon uppy-ProviderBrowser-searchFilterIcon\",width:\"12\",height:\"12\",viewBox:\"0 0 12 12\"},c(\"path\",{d:\"M8.638 7.99l3.172 3.172a.492.492 0 1 1-.697.697L7.91 8.656a4.977 4.977 0 0 1-2.983.983C2.206 9.639 0 7.481 0 4.819 0 2.158 2.206 0 4.927 0c2.721 0 4.927 2.158 4.927 4.82a4.74 4.74 0 0 1-1.216 3.17zm-3.71.685c2.176 0 3.94-1.726 3.94-3.856 0-2.129-1.764-3.855-3.94-3.855C2.75.964.984 2.69.984 4.819c0 2.13 1.765 3.856 3.942 3.856z\"})),!u&&e&&c(\"button\",{className:\"uppy-u-reset uppy-ProviderBrowser-searchFilterReset\",type:\"button\",\"aria-label\":l,title:l,onClick:o(()=>t(\"\"),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",viewBox:\"0 0 19 19\"},c(\"path\",{d:\"M17.318 17.232L9.94 9.854 9.586 9.5l-.354.354-7.378 7.378h.707l-.62-.62v.706L9.318 9.94l.354-.354-.354-.354L1.94 1.854v.707l.62-.62h-.706l7.378 7.378.354.354.354-.354 7.378-7.378h-.707l.622.62v-.706L9.854 9.232l-.354.354.354.354 7.378 7.378.708-.707-7.38-7.378v.708l7.38-7.38.353-.353-.353-.353-.622-.622-.353-.353-.354.352-7.378 7.38h.708L2.56 1.23 2.208.88l-.353.353-.622.62-.353.355.352.353 7.38 7.38v-.708l-7.38 7.38-.353.353.352.353.622.622.353.353.354-.353 7.38-7.38h-.708l7.38 7.38z\"}))),u&&c(\"button\",{className:`uppy-u-reset uppy-c-btn uppy-c-btn-primary ${d}`,type:\"submit\",form:y.id},h))}o(jw,\"SearchInput\");var En=jw;var Gm=ve(kt(),1);var Hw=o(r=>r.filter(t=>t.type===\"file\"&&t.status===\"checked\"?!0:t.type===\"folder\"&&t.status===\"checked\"?!r.some(s=>s.type!==\"root\"&&s.parentId===t.id):!1).length,\"getNumberOfSelectedFiles\"),Wm=Hw;function Cn(r){let{cancelSelection:e,donePicking:t,i18n:i,partialTree:s,validateAggregateRestrictions:n}=r,a=us(()=>n(s),[s,n]),l=us(()=>Wm(s),[s]);return l===0?null:c(\"div\",{className:\"uppy-ProviderBrowser-footer\"},c(\"div\",{className:\"uppy-ProviderBrowser-footer-buttons\"},c(\"button\",{className:(0,Gm.default)(\"uppy-u-reset uppy-c-btn uppy-c-btn-primary\",{\"uppy-c-btn--disabled\":a}),disabled:!!a,onClick:t,type:\"button\"},i(\"selectX\",{smart_count:l})),c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-c-btn-link\",onClick:e,type:\"button\"},i(\"cancel\"))),a&&c(\"div\",{className:\"uppy-ProviderBrowser-footer-error\"},a))}o(Cn,\"FooterActions\");var qw=o((r,e,t)=>{var i,s;return{id:r.id,source:e.id,name:r.name||r.id,type:r.mimeType,isRemote:!0,data:r,preview:r.thumbnail||void 0,meta:{authorName:(i=r.author)==null?void 0:i.name,authorUrl:(s=r.author)==null?void 0:s.url,relativePath:r.relDirPath||null,absolutePath:r.absDirPath},body:{fileId:r.id},remote:{companionUrl:e.opts.companionUrl,url:`${t.fileUrl(r.requestPath)}`,body:{fileId:r.id},providerName:t.name,provider:t.provider,requestClientId:t.provider}}},\"getTagFile\"),Km=qw;var $w=o((r,e,t)=>{let i=r.map(a=>Km(a,e,t)),s=[],n=[];i.forEach(a=>{e.uppy.checkIfFileAlreadyExists(Pl(a,e.uppy.getID()))?n.push(a):s.push(a)}),s.length>0&&e.uppy.info(e.uppy.i18n(\"addedNumFiles\",{numFiles:s.length})),n.length>0&&e.uppy.info(`Not adding ${n.length} files because they already exist`),e.uppy.addFiles(s)},\"addFiles\"),$l=$w;var Xm=o((r,e,t)=>{let i=e===null?\"null\":e;if(t[i])return t[i];let s=r.find(a=>a.id===e);if(s.type===\"root\")return[];let n=[...Xm(r,s.parentId,t),s];return t[i]=n,n},\"getPath\"),Vw=o(r=>{let e=Object.create(null);return r.filter(s=>s.type===\"file\"&&s.status===\"checked\").map(s=>{let n=Xm(r,s.id,e),a=n.findIndex(d=>d.type===\"folder\"&&d.status===\"checked\"),l=n.slice(a),u=`/${n.map(d=>d.data.name).join(\"/\")}`,h=l.length===1?void 0:l.map(d=>d.data.name).join(\"/\");return{...s.data,absDirPath:u,relDirPath:h}})},\"getCheckedFilesWithPaths\"),Vl=Vw;var Ww=o((r,e)=>{let t=r.find(s=>
2s.id===e),i=[];for(;i=[t,...i],t.type!==\"root\";){let s=t.parentId;t=r.find(n=>n.id===s)}return i},\"getBreadcrumbs\"),Ym=Ww;function ji(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ji,\"_classPrivateFieldLooseBase\");var Gw=0;function Qm(r){return\"__private_\"+Gw+++\"_\"+r}o(Qm,\"_classPrivateFieldLooseKey\");var Kw={version:\"4.0.1\"};function yo(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"30\",height:\"30\",viewBox:\"0 0 30 30\"},c(\"path\",{d:\"M15 30c8.284 0 15-6.716 15-15 0-8.284-6.716-15-15-15C6.716 0 0 6.716 0 15c0 8.284 6.716 15 15 15zm4.258-12.676v6.846h-8.426v-6.846H5.204l9.82-12.364 9.82 12.364H19.26z\"}))}o(yo,\"defaultPickerIcon\");var Jm=o(r=>({authenticated:void 0,partialTree:[{type:\"root\",id:r,cached:!1,nextPagePath:null}],currentFolderId:r,searchString:\"\",didFirstRender:!1,username:null,loading:!1}),\"getDefaultState\"),hs=Qm(\"abortController\"),Fr=Qm(\"withAbort\"),Ne=class{static{o(this,\"ProviderView\")}constructor(e,t){Object.defineProperty(this,Fr,{value:Xw}),this.isHandlingScroll=!1,this.lastCheckbox=null,Object.defineProperty(this,hs,{writable:!0,value:void 0}),this.validateSingleFile=s=>{let n=wn(s);return this.plugin.uppy.validateSingleFile(n)},this.getDisplayedPartialTree=()=>{let{partialTree:s,currentFolderId:n,searchString:a}=this.plugin.getPluginState(),l=s.filter(h=>h.type!==\"root\"&&h.parentId===n);return a===\"\"?l:l.filter(h=>{var d;return((d=h.data.name)!=null?d:this.plugin.uppy.i18n(\"unnamed\")).toLowerCase().indexOf(a.toLowerCase())!==-1})},this.validateAggregateRestrictions=s=>{let a=s.filter(l=>l.type===\"file\"&&l.status===\"checked\").map(l=>l.data);return this.plugin.uppy.validateAggregateRestrictions(a)},this.plugin=e,this.provider=t.provider;let i={viewType:\"list\",showTitles:!0,showFilter:!0,showBreadcrumbs:!0,loadAllFiles:!1,virtualList:!1};this.opts={...i,...t},this.openFolder=this.openFolder.bind(this),this.logout=this.logout.bind(this),this.handleAuth=this.handleAuth.bind(this),this.handleScroll=this.handleScroll.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.donePicking=this.donePicking.bind(this),this.render=this.render.bind(this),this.cancelSelection=this.cancelSelection.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.resetPluginState(),this.plugin.uppy.on(\"dashboard:close-panel\",this.resetPluginState),this.plugin.uppy.registerRequestClient(this.provider.provider,this.provider)}resetPluginState(){this.plugin.setPluginState(Jm(this.plugin.rootFolderId))}tearDown(){}setLoading(e){this.plugin.setPluginState({loading:e})}cancelSelection(){let{partialTree:e}=this.plugin.getPluginState(),t=e.map(i=>i.type===\"root\"?i:{...i,status:\"unchecked\"});this.plugin.setPluginState({partialTree:t})}async openFolder(e){this.lastCheckbox=null;let{partialTree:t}=this.plugin.getPluginState(),i=t.find(s=>s.id===e);if(i.cached){this.plugin.setPluginState({currentFolderId:e,searchString:\"\"});return}this.setLoading(!0),await ji(this,Fr)[Fr](async s=>{let n=e,a=[];do{let{username:u,nextPagePath:h,items:d}=await this.provider.list(n,{signal:s});this.plugin.setPluginState({username:u}),n=h,a=a.concat(d),this.setLoading(this.plugin.uppy.i18n(\"loadedXFiles\",{numFiles:a.length}))}while(this.opts.loadAllFiles&&n);let l=cs.afterOpenFolder(t,a,i,n,this.validateSingleFile);this.plugin.setPluginState({partialTree:l,currentFolderId:e,searchString:\"\"})}).catch(ii(this.plugin.uppy)),this.setLoading(!1)}async logout(){await ji(this,Fr)[Fr](async e=>{let t=await this.provider.logout({signal:e});if(t.ok){if(!t.revoked){let i=this.plugin.uppy.i18n(\"companionUnauthorizeHint\",{provider:this.plugin.title,url:t.manual_revoke_url});this.plugin.uppy.info(i,\"info\",7e3)}this.plugin.setPluginState({...Jm(this.plugin.rootFolderId),authenticated:!1})}}).catch(ii(this.plugin.uppy))}async handleAuth(e){await ji(this,Fr)[Fr](async t=>{this.setLoading(!0),await this.provider.login({authFormData:e,signal:t}),this.plugin.setPluginState({authenticated:!0}),await Promise.all([this.provider.fetchPreAuthToken(),this.openFolder(this.plugin.rootFolderId)])}).catch(ii(this.plugin.uppy)),this.setLoading(!1)}async handleScroll(e){let{partialTree:t,currentFolderId:i}=this.plugin.getPluginState(),s=t.find(n=>n.id===i);Hl(e)&&!this.isHandlingScroll&&s.nextPagePath&&(this.isHandlingScroll=!0,await ji(this,Fr)[Fr](async n=>{let{nextPagePath:a,items:l}=await this.provider.list(s.nextPagePath,{signal:n}),u=cs.afterScrollFolder(t,i,l,a,this.validateSingleFile);this.plugin.setPluginState({partialTree:u})}).catch(ii(this.plugin.uppy)),this.isHandlingScroll=!1)}async donePicking(){let{partialTree:e}=this.plugin.getPluginState();this.setLoading(!0),await ji(this,Fr)[Fr](async t=>{let i=await cs.afterFill(e,a=>this.provider.list(a,{signal:t}),this.validateSingleFile,a=>{this.setLoading(this.plugin.uppy.i18n(\"addedNumFiles\",{numFiles:a}))});if(this.validateAggregateRestrictions(i)){this.plugin.setPluginState({partialTree:i});return}let n=Vl(i);$l(n,this.plugin,this.provider),this.resetPluginState()}).catch(ii(this.plugin.uppy)),this.setLoading(!1)}toggleCheckbox(e,t){let{partialTree:i}=this.plugin.getPluginState(),s=ql(e.id,this.getDisplayedPartialTree(),t,this.lastCheckbox),n=cs.afterToggleCheckbox(i,s);this.plugin.setPluginState({partialTree:n}),this.lastCheckbox=e.id}render(e,t){t===void 0&&(t={});let{didFirstRender:i}=this.plugin.getPluginState(),{i18n:s}=this.plugin.uppy;i||(this.plugin.setPluginState({didFirstRender:!0}),this.provider.fetchPreAuthToken(),this.openFolder(this.plugin.rootFolderId));let n={...this.opts,...t},{authenticated:a,loading:l}=this.plugin.getPluginState(),u=this.plugin.icon||yo;if(a===!1)return c(yc,{pluginName:this.plugin.title,pluginIcon:u,handleAuth:this.handleAuth,i18n:this.plugin.uppy.i18nArray,renderForm:n.renderAuthForm,loading:l});let{partialTree:h,currentFolderId:d,username:m,searchString:w}=this.plugin.getPluginState(),y=Ym(h,d);return c(\"div\",{className:(0,Zm.default)(\"uppy-ProviderBrowser\",`uppy-ProviderBrowser-viewType--${n.viewType}`)},c(wc,{showBreadcrumbs:n.showBreadcrumbs,openFolder:this.openFolder,breadcrumbs:y,pluginIcon:u,title:this.plugin.title,logout:this.logout,username:m,i18n:s}),n.showFilter&&c(En,{searchString:w,setSearchString:o(P=>{this.plugin.setPluginState({searchString:P})},\"setSearchString\"),submitSearchString:o(()=>{},\"submitSearchString\"),inputLabel:s(\"filter\"),clearSearchLabel:s(\"resetFilter\"),wrapperClassName:\"uppy-ProviderBrowser-searchFilter\",inputClassName:\"uppy-ProviderBrowser-searchFilterInput\"}),c(Bl,{toggleCheckbox:this.toggleCheckbox,displayedPartialTree:this.getDisplayedPartialTree(),openFolder:this.openFolder,virtualList:n.virtualList,noResultsLabel:s(\"noFilesFound\"),handleScroll:this.handleScroll,viewType:n.viewType,showTitles:n.showTitles,i18n:this.plugin.uppy.i18n,isLoading:l}),c(Cn,{partialTree:h,donePicking:this.donePicking,cancelSelection:this.cancelSelection,i18n:s,validateAggregateRestrictions:this.validateAggregateRestrictions}))}};async function Xw(r){var e;(e=ji(this,hs)[hs])==null||e.abort();let t=new AbortController;ji(this,hs)[hs]=t;let i=o(()=>{t.abort()},\"cancelRequest\");try{this.plugin.uppy.on(\"dashboard:close-panel\",i),this.plugin.uppy.on(\"cancel-all\",i),await r(t.signal)}finally{this.plugin.uppy.off(\"dashboard:close-panel\",i),this.plugin.uppy.off(\"cancel-all\",i),ji(this,hs)[hs]=void 0}}o(Xw,\"_withAbort2\");Ne.VERSION=Kw.version;var eg=ve(kt(),1);var Yw={version:\"4.0.1\"},Jw={loading:!1,searchString:\"\",partialTree:[{type:\"root\",id:null,cached:!1,nextPagePath:null}],currentFolderId:null,isInputMode:!0},si=class{static{o(this,\"SearchProviderView\")}constructor(e,t){this.isHandlingScroll=!1,this.lastCheckbox=null,this.validateSingleFile=s=>{let n=wn(s);return this.plugin.uppy.validateSingleFile(n)},this.getDisplayedPartialTree=()=>{let{partialTree:s}=this.plugin.getPluginState();return s.filter(n=>n.type!==\"root\")},this.setSearchString=s=>{this.plugin.setPluginState({searchString:s}),s===\"\"&&this.plugin.setPluginState({partialTree:[]})},this.validateAggregateRestrictions=s=>{let a=s.filter(l=>l.type===\"file\"&&l.status===\"checked\").map(l=>l.data);return this.plugin.uppy.validateAggregateRestrictions(a)},this.plugin=e,this.provider=t.provider;
2let i={viewType:\"grid\",showTitles:!0,showFilter:!0};this.opts={...i,...t},this.setSearchString=this.setSearchString.bind(this),this.search=this.search.bind(this),this.resetPluginState=this.resetPluginState.bind(this),this.handleScroll=this.handleScroll.bind(this),this.donePicking=this.donePicking.bind(this),this.cancelSelection=this.cancelSelection.bind(this),this.toggleCheckbox=this.toggleCheckbox.bind(this),this.render=this.render.bind(this),this.resetPluginState(),this.plugin.uppy.on(\"dashboard:close-panel\",this.resetPluginState),this.plugin.uppy.registerRequestClient(this.provider.provider,this.provider)}tearDown(){}setLoading(e){this.plugin.setPluginState({loading:e})}resetPluginState(){this.plugin.setPluginState(Jw)}cancelSelection(){let{partialTree:e}=this.plugin.getPluginState(),t=e.map(i=>i.type===\"root\"?i:{...i,status:\"unchecked\"});this.plugin.setPluginState({partialTree:t})}async search(){let{searchString:e}=this.plugin.getPluginState();if(e!==\"\"){this.setLoading(!0);try{let t=await this.provider.search(e),i=[{type:\"root\",id:null,cached:!1,nextPagePath:t.nextPageQuery},...t.items.map(s=>({type:\"file\",id:s.requestPath,status:\"unchecked\",parentId:null,data:s}))];this.plugin.setPluginState({partialTree:i,isInputMode:!1})}catch(t){ii(this.plugin.uppy)(t)}this.setLoading(!1)}}async handleScroll(e){let{partialTree:t,searchString:i}=this.plugin.getPluginState(),s=t.find(n=>n.type===\"root\");if(Hl(e)&&!this.isHandlingScroll&&s.nextPagePath){this.isHandlingScroll=!0;try{let n=await this.provider.search(i,s.nextPagePath),a={...s,nextPagePath:n.nextPageQuery},l=t.filter(h=>h.type!==\"root\"),u=[a,...l,...n.items.map(h=>({type:\"file\",id:h.requestPath,status:\"unchecked\",parentId:null,data:h}))];this.plugin.setPluginState({partialTree:u})}catch(n){ii(this.plugin.uppy)(n)}this.isHandlingScroll=!1}}async donePicking(){let{partialTree:e}=this.plugin.getPluginState(),t=Vl(e);$l(t,this.plugin,this.provider),this.resetPluginState()}toggleCheckbox(e,t){let{partialTree:i}=this.plugin.getPluginState(),s=ql(e.id,this.getDisplayedPartialTree(),t,this.lastCheckbox),n=cs.afterToggleCheckbox(i,s);this.plugin.setPluginState({partialTree:n}),this.lastCheckbox=e.id}render(e,t){t===void 0&&(t={});let{isInputMode:i,searchString:s,loading:n,partialTree:a}=this.plugin.getPluginState(),{i18n:l}=this.plugin.uppy,u={...this.opts,...t};return i?c(En,{searchString:s,setSearchString:this.setSearchString,submitSearchString:this.search,inputLabel:l(\"enterTextToSearch\"),buttonLabel:l(\"searchImages\"),wrapperClassName:\"uppy-SearchProvider\",inputClassName:\"uppy-c-textInput uppy-SearchProvider-input\",showButton:!0,buttonCSSClassName:\"uppy-SearchProvider-searchButton\"}):c(\"div\",{className:(0,eg.default)(\"uppy-ProviderBrowser\",`uppy-ProviderBrowser-viewType--${u.viewType}`)},u.showFilter&&c(En,{searchString:s,setSearchString:this.setSearchString,submitSearchString:this.search,inputLabel:l(\"search\"),clearSearchLabel:l(\"resetSearch\"),wrapperClassName:\"uppy-ProviderBrowser-searchFilter\",inputClassName:\"uppy-ProviderBrowser-searchFilterInput\"}),c(Bl,{toggleCheckbox:this.toggleCheckbox,displayedPartialTree:this.getDisplayedPartialTree(),handleScroll:this.handleScroll,openFolder:o(async()=>{},\"openFolder\"),noResultsLabel:l(\"noSearchResults\"),viewType:u.viewType,showTitles:u.showTitles,isLoading:n,i18n:l,virtualList:!1}),c(Cn,{partialTree:a,donePicking:this.donePicking,cancelSelection:this.cancelSelection,i18n:l,validateAggregateRestrictions:this.validateAggregateRestrictions}))}};si.VERSION=Yw.version;function Lr(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Lr,\"_classPrivateFieldLooseBase\");var Qw=0;function Dc(r){return\"__private_\"+Qw+++\"_\"+r}o(Dc,\"_classPrivateFieldLooseKey\");var Zw={version:\"4.0.0\"},eS=\"uppy/STATE_UPDATE\",tS=o(r=>e=>e.uppy[r],\"defaultSelector\");function rS(r,e){let t=Object.keys(e),i={};return t.forEach(s=>{r[s]!==e[s]&&(i[s]=e[s])}),i}o(rS,\"getPatch\");var oi=Dc(\"id\"),Tn=Dc(\"selector\"),ni=Dc(\"store\"),Wl=class{static{o(this,\"ReduxStore\")}constructor(e){Object.defineProperty(this,oi,{writable:!0,value:void 0}),Object.defineProperty(this,Tn,{writable:!0,value:void 0}),Object.defineProperty(this,ni,{writable:!0,value:void 0}),Lr(this,ni)[ni]=e.store,Lr(this,oi)[oi]=e.id||dr(),Lr(this,Tn)[Tn]=e.selector||tS(Lr(this,oi)[oi]),this.setState({})}setState(e){Lr(this,ni)[ni].dispatch({type:eS,id:Lr(this,oi)[oi],payload:e})}getState(){return Lr(this,Tn)[Tn](Lr(this,ni)[ni].getState())}subscribe(e){let t=this.getState();return Lr(this,ni)[ni].subscribe(()=>{let i=this.getState();if(t!==i){let s=rS(t,i);e(t,i,s),t=i}})}[Symbol.for(\"uppy test: get id\")](){return Lr(this,oi)[oi]}};Wl.VERSION=Zw.version;var tg=Wl;function Gl(r,e,t,i){return t===0||r===e?r:i===0?e:r+(e-r)*2**(-i/t)}o(Gl,\"emaFilter\");var Zt={STATE_ERROR:\"error\",STATE_WAITING:\"waiting\",STATE_PREPROCESSING:\"preprocessing\",STATE_UPLOADING:\"uploading\",STATE_POSTPROCESSING:\"postprocessing\",STATE_COMPLETE:\"complete\"};var jc=ve(kt(),1);function On(r){let e=[],t=\"indeterminate\",i;for(let{progress:n}of Object.values(r)){let{preprocess:a,postprocess:l}=n;i==null&&(a||l)&&({mode:t,message:i}=a||l),a?.mode===\"determinate\"&&e.push(a.value),l?.mode===\"determinate\"&&e.push(l.value)}let s=e.reduce((n,a)=>n+a/e.length,0);return{mode:t,message:i,value:s}}o(On,\"calculateProcessingProgress\");var Mc=ve(kt(),1),Lc=ve(sn(),1);function Ic(r){let e=Math.floor(r/3600)%24,t=Math.floor(r/60)%60,i=Math.floor(r%60);return{hours:e,minutes:t,seconds:i}}o(Ic,\"secondsToTime\");function Nc(r){let e=Ic(r),t=e.hours===0?\"\":`${e.hours}h`,i=e.minutes===0?\"\":`${e.hours===0?e.minutes:` ${e.minutes.toString(10).padStart(2,\"0\")}`}m`,s=e.hours!==0?\"\":`${e.minutes===0?e.seconds:` ${e.seconds.toString(10).padStart(2,\"0\")}`}s`;return`${t}${i}${s}`}o(Nc,\"prettyETA\");var iS=\"\\xB7\",rg=o(()=>` ${iS} `,\"renderDot\");function ig(r){let{newFiles:e,isUploadStarted:t,recoveredState:i,i18n:s,uploadState:n,isSomeGhost:a,startUpload:l}=r,u=(0,Mc.default)(\"uppy-u-reset\",\"uppy-c-btn\",\"uppy-StatusBar-actionBtn\",\"uppy-StatusBar-actionBtn--upload\",{\"uppy-c-btn-primary\":n===Zt.STATE_WAITING},{\"uppy-StatusBar-actionBtn--disabled\":a}),h=e&&t&&!i?s(\"uploadXNewFiles\",{smart_count:e}):s(\"uploadXFiles\",{smart_count:e});return c(\"button\",{type:\"button\",className:u,\"aria-label\":s(\"uploadXFiles\",{smart_count:e}),onClick:l,disabled:a,\"data-uppy-super-focusable\":!0},h)}o(ig,\"UploadBtn\");function sg(r){let{i18n:e,uppy:t}=r;return c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--retry\",\"aria-label\":e(\"retryUpload\"),onClick:o(()=>t.retryAll().catch(()=>{}),\"onClick\"),\"data-uppy-super-focusable\":!0,\"data-cy\":\"retry\"}
2,c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"8\",height:\"10\",viewBox:\"0 0 8 10\"},c(\"path\",{d:\"M4 2.408a2.75 2.75 0 1 0 2.75 2.75.626.626 0 0 1 1.25.018v.023a4 4 0 1 1-4-4.041V.25a.25.25 0 0 1 .389-.208l2.299 1.533a.25.25 0 0 1 0 .416l-2.3 1.533A.25.25 0 0 1 4 3.316v-.908z\"})),e(\"retry\"))}o(sg,\"RetryBtn\");function og(r){let{i18n:e,uppy:t}=r;return c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-StatusBar-actionCircleBtn\",title:e(\"cancel\"),\"aria-label\":e(\"cancel\"),onClick:o(()=>t.cancelAll(),\"onClick\"),\"data-cy\":\"cancel\",\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"16\",height:\"16\",viewBox:\"0 0 16 16\"},c(\"g\",{fill:\"none\",fillRule:\"evenodd\"},c(\"circle\",{fill:\"#888\",cx:\"8\",cy:\"8\",r:\"8\"}),c(\"path\",{fill:\"#FFF\",d:\"M9.283 8l2.567 2.567-1.283 1.283L8 9.283 5.433 11.85 4.15 10.567 6.717 8 4.15 5.433 5.433 4.15 8 6.717l2.567-2.567 1.283 1.283z\"}))))}o(og,\"CancelBtn\");function ng(r){let{isAllPaused:e,i18n:t,isAllComplete:i,resumableUploads:s,uppy:n}=r,a=t(e?\"resume\":\"pause\");function l(){if(!i){if(!s){n.cancelAll();return}if(e){n.resumeAll();return}n.pauseAll()}}return o(l,\"togglePauseResume\"),c(\"button\",{title:a,\"aria-label\":a,className:\"uppy-u-reset uppy-StatusBar-actionCircleBtn\",type:\"button\",onClick:l,\"data-cy\":\"togglePauseResume\",\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"16\",height:\"16\",viewBox:\"0 0 16 16\"},c(\"g\",{fill:\"none\",fillRule:\"evenodd\"},c(\"circle\",{fill:\"#888\",cx:\"8\",cy:\"8\",r:\"8\"}),c(\"path\",{fill:\"#FFF\",d:e?\"M6 4.25L11.5 8 6 11.75z\":\"M5 4.5h2v7H5v-7zm4 0h2v7H9v-7z\"}))))}o(ng,\"PauseResumeButton\");function ag(r){let{i18n:e,doneButtonHandler:t}=r;return c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-StatusBar-actionBtn uppy-StatusBar-actionBtn--done\",onClick:t,\"data-uppy-super-focusable\":!0},e(\"done\"))}o(ag,\"DoneBtn\");function lg(){return c(\"svg\",{className:\"uppy-StatusBar-spinner\",\"aria-hidden\":\"true\",focusable:\"false\",width:\"14\",height:\"14\"},c(\"path\",{d:\"M13.983 6.547c-.12-2.509-1.64-4.893-3.939-5.936-2.48-1.127-5.488-.656-7.556 1.094C.524 3.367-.398 6.048.162 8.562c.556 2.495 2.46 4.52 4.94 5.183 2.932.784 5.61-.602 7.256-3.015-1.493 1.993-3.745 3.309-6.298 2.868-2.514-.434-4.578-2.349-5.153-4.84a6.226 6.226 0 0 1 2.98-6.778C6.34.586 9.74 1.1 11.373 3.493c.407.596.693 1.282.842 1.988.127.598.073 1.197.161 1.794.078.525.543 1.257 1.15.864.525-.341.49-1.05.456-1.592-.007-.15.02.3 0 0\",fillRule:\"evenodd\"}))}o(lg,\"LoadingSpinner\");function ug(r){let{progress:e}=r,{value:t,mode:i,message:s}=e;return c(\"div\",{className:\"uppy-StatusBar-content\"},c(lg,null),i===\"determinate\"?`${Math.round(t*100)}% \\xB7 `:\"\",s)}o(ug,\"ProgressBarProcessing\");function sS(r){let{numUploads:e,complete:t,totalUploadedSize:i,totalSize:s,totalETA:n,i18n:a}=r,l=e>1;return c(\"div\",{className:\"uppy-StatusBar-statusSecondary\"},l&&a(\"filesUploadedOfTotal\",{complete:t,smart_count:e}),c(\"span\",{className:\"uppy-StatusBar-additionalInfo\"},l&&rg(),a(\"dataUploadedOfTotal\",{complete:(0,Lc.default)(i),total:(0,Lc.default)(s)}),rg(),a(\"xTimeLeft\",{time:Nc(n)})))}o(sS,\"ProgressDetails\");function cg(r){let{i18n:e,complete:t,numUploads:i}=r;return c(\"div\",{className:\"uppy-StatusBar-statusSecondary\"},e(\"filesUploadedOfTotal\",{complete:t,smart_count:i}))}o(cg,\"FileUploadCount\");function oS(r){let{i18n:e,newFiles:t,startUpload:i}=r,s=(0,Mc.default)(\"uppy-u-reset\",\"uppy-c-btn\",\"uppy-StatusBar-actionBtn\",\"uppy-StatusBar-actionBtn--uploadNewlyAdded\");return c(\"div\",{className:\"uppy-StatusBar-statusSecondary\"},c(\"div\",{className:\"uppy-StatusBar-statusSecondaryHint\"},e(\"xMoreFilesAdded\",{smart_count:t})),c(\"button\",{type:\"button\",className:s,\"aria-label\":e(\"uploadXFiles\",{smart_count:t}),onClick:i},e(\"upload\")))}o(oS,\"UploadNewlyAddedFiles\");function hg(r){let{i18n:e,supportsUploadProgress:t,totalProgress:i,showProgressDetail
2s:s,isUploadStarted:n,isAllComplete:a,isAllPaused:l,newFiles:u,numUploads:h,complete:d,totalUploadedSize:m,totalSize:w,totalETA:y,startUpload:P}=r,D=u&&n;if(!n||a)return null;let C=e(l?\"paused\":\"uploading\");function O(){return!l&&!D&&s?t?c(sS,{numUploads:h,complete:d,totalUploadedSize:m,totalSize:w,totalETA:y,i18n:e}):c(cg,{i18n:e,complete:d,numUploads:h}):null}return o(O,\"renderProgressDetails\"),c(\"div\",{className:\"uppy-StatusBar-content\",\"aria-label\":C,title:C},l?null:c(lg,null),c(\"div\",{className:\"uppy-StatusBar-status\"},c(\"div\",{className:\"uppy-StatusBar-statusPrimary\"},t?`${C}: ${i}%`:C),O(),D?c(oS,{i18n:e,newFiles:u,startUpload:P}):null))}o(hg,\"ProgressBarUploading\");function dg(r){let{i18n:e}=r;return c(\"div\",{className:\"uppy-StatusBar-content\",role:\"status\",title:e(\"complete\")},c(\"div\",{className:\"uppy-StatusBar-status\"},c(\"div\",{className:\"uppy-StatusBar-statusPrimary\"},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-StatusBar-statusIndicator uppy-c-icon\",width:\"15\",height:\"11\",viewBox:\"0 0 15 11\"},c(\"path\",{d:\"M.414 5.843L1.627 4.63l3.472 3.472L13.202 0l1.212 1.213L5.1 10.528z\"})),e(\"complete\"))))}o(dg,\"ProgressBarComplete\");function pg(r){let{error:e,i18n:t,complete:i,numUploads:s}=r;function n(){let a=`${t(\"uploadFailed\")}\n\n ${e}`;alert(a)}return o(n,\"displayErrorAlert\"),c(\"div\",{className:\"uppy-StatusBar-content\",title:t(\"uploadFailed\")},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-StatusBar-statusIndicator uppy-c-icon\",width:\"11\",height:\"11\",viewBox:\"0 0 11 11\"},c(\"path\",{d:\"M4.278 5.5L0 1.222 1.222 0 5.5 4.278 9.778 0 11 1.222 6.722 5.5 11 9.778 9.778 11 5.5 6.722 1.222 11 0 9.778z\"})),c(\"div\",{className:\"uppy-StatusBar-status\"},c(\"div\",{className:\"uppy-StatusBar-statusPrimary\"},t(\"uploadFailed\"),c(\"button\",{className:\"uppy-u-reset uppy-StatusBar-details\",\"aria-label\":t(\"showErrorDetails\"),\"data-microtip-position\":\"top-right\",\"data-microtip-size\":\"medium\",onClick:n,type:\"button\"},\"?\")),c(cg,{i18n:t,complete:i,numUploads:s})))}o(pg,\"ProgressBarError\");var{STATE_ERROR:fg,STATE_WAITING:nS,STATE_PREPROCESSING:Bc,STATE_UPLOADING:Kl,STATE_POSTPROCESSING:zc,STATE_COMPLETE:Xl}=Zt;function Hc(r){let{newFiles:e,allowNewUpload:t,isUploadInProgress:i,isAllPaused:s,resumableUploads:n,error:a,hideUploadButton:l=void 0,hidePauseResumeButton:u=!1,hideCancelButton:h=!1,hideRetryButton:d=!1,recoveredState:m,uploadState:w,totalProgress:y,files:P,supportsUploadProgress:D,hideAfterFinish:C=!1,isSomeGhost:O,doneButtonHandler:z=void 0,isUploadStarted:X,i18n:K,startUpload:Z,uppy:$,isAllComplete:W,showProgressDetails:te=void 0,numUploads:se,complete:Ae,totalSize:je,totalETA:He,totalUploadedSize:xe}=r;function De(){switch(w){case zc:case Bc:{let ce=On(P);return ce.mode===\"determinate\"?ce.value*100:y}case fg:return null;case Kl:return D?y:null;default:return y}}o(De,\"getProgressValue\");function ft(){switch(w){case zc:case Bc:{let{mode:ce}=On(P);return ce===\"indeterminate\"}case Kl:return!D;default:return!1}}o(ft,\"getIsIndeterminate\");let E=De(),S=E??100,F=!a&&e&&(!i&&!s||m)&&t&&!l,I=!h&&w!==nS&&w!==Xl,j=n&&!u&&w===Kl,M=a&&!W&&!d,R=z&&w===Xl,T=(0,jc.default)(\"uppy-StatusBar-progress\",{\"is-indeterminate\":ft()}),A=(0,jc.default)(\"uppy-StatusBar\",`is-${w}`,{\"has-ghosts\":O}),N=(()=>{switch(w){case Bc:case zc:return c(ug,{progress:On(P)});case Xl:return c(dg,{i18n:K});case fg:return c(pg,{error:a,i18n:K,numUploads:se,complete:Ae});case Kl:return c(hg,{i18n:K,supportsUploadProgress:D,totalProgress:y,showProgressDetails:te,isUploadStarted:X,isAllComplete:W,isAllPaused:s,newFiles:e,numUploads:se,complete:Ae,totalUploadedSize:xe,totalSize:je,totalETA:He,startUpload:Z});default:return null}})();return c(\"div\",{className:A,\"aria-hidden\":!(F||M||j||I||R)&&!N||w===Xl&&C},c(\"div\",{className:T,style:{width:`${S}%`},role:\"progressbar\",\"aria-label\":`${S}%`,\"aria-valuetext\":`${S}%`,\"aria-valuemin\":0,\"aria-valuemax\":100,\"aria-valuenow\":E}),N,c(\"div\",{className:\"uppy-StatusBar-actions\"},F?c(ig,{newFiles:e,isUploadStarted:X,recoveredState:m,i18n:K,isSomeGhost:O,startUpload:Z,uploadState:w}):null,M?c(sg,{i18n:K,uppy:$}):null,j?c(ng,{isAllPaused:s,i18n:K,isAllComplete:W,resumableUploads:n,uppy:$}):null,I?c(og,{i18n:K,uppy:$}):null,R?c(ag,{i18n:K,doneButtonHandler:z}):null))}o(Hc,\"StatusBarUI\");var mg={strings:{uploading:\"Uploading\",complete:\"Complete\",uploadFailed:\"Upload failed\",paused:\"Paused\",retry:\"Retry\",cancel:\"Cancel\",pause:\"Pause\",resume:\"Resume\",done:\"Done\",filesUploadedOfTotal:{0:\"%{complete} of %{smart_count} file uploaded\",1:\"%{complete} of %{smart_count} files uploaded\"},dataUploadedOfTotal:\"%{complete} of %{total}\",xTimeLeft:\"%{time} left\",uploadXFiles:{0:\"Upload %{smart_count} file\",1:\"Upload %{smart_count} files\"},uploadXNewFiles:{0:\"Upload +%{smart_count} file\",1:\"Upload +%{smart_count} files\"},upload:\"Upload\",retryUpload:\"Retry upload\",xMoreFilesAdded:{0:\"%{smart_count} more file added\",1:\"%{smart_count} more files added\"},showErrorDetails:\"Show error details\"}};function Le(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Le,\"_classPrivateFieldLooseBase\");var aS=0;function vo(r){return\"__private_\"+aS+++\"_\"+r}o(vo,\"_classPrivateFieldLooseKey\");var lS={version:\"4.0.3\"},uS=2e3,cS=2e3;function hS(r,e,t,i){if(r)return Zt.STATE_ERROR;if(e)return Zt.STATE_COMPLETE;if(t)return Zt.STATE_WAITING;let s=Zt.STATE_WAITING,n=Object.keys(i);for(let a=0;a<n.length;a++){let{progress:l}=i[n[a]];if(l.uploadStarted&&!l.uploadComplete)return Zt.STATE_UPLOADING;l.preprocess&&(s=Zt.STATE_PREPROCESSING),l.postprocess&&s!==Zt.STATE_PREPROCESSING&&(s=Zt.STATE_POSTPROCESSING)}return s}o(hS,\"getUploadingState\");var dS={hideUploadButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideCancelButton:!1,showProgressDetail
2s:!1,hideAfterFinish:!0,doneButtonHandler:null},yr=vo(\"lastUpdateTime\"),Er=vo(\"previousUploadedBytes\"),ai=vo(\"previousSpeed\"),er=vo(\"previousETA\"),qc=vo(\"computeSmoothETA\"),An=vo(\"onUploadStart\"),li=class extends ne{static{o(this,\"StatusBar\")}constructor(e,t){super(e,{...dS,...t}),Object.defineProperty(this,qc,{value:pS}),Object.defineProperty(this,yr,{writable:!0,value:void 0}),Object.defineProperty(this,Er,{writable:!0,value:void 0}),Object.defineProperty(this,ai,{writable:!0,value:void 0}),Object.defineProperty(this,er,{writable:!0,value:void 0}),this.startUpload=()=>this.uppy.upload().catch(()=>{}),Object.defineProperty(this,An,{writable:!0,value:o(()=>{let{recoveredState:i}=this.uppy.getState();if(Le(this,ai)[ai]=null,Le(this,er)[er]=null,i){Le(this,Er)[Er]=Object.values(i.files).reduce((s,n)=>{let{progress:a}=n;return s+a.bytesUploaded},0),this.uppy.emit(\"restore-confirmed\");return}Le(this,yr)[yr]=performance.now(),Le(this,Er)[Er]=0},\"value\")}),this.id=this.opts.id||\"StatusBar\",this.title=\"StatusBar\",this.type=\"progressindicator\",this.defaultLocale=mg,this.i18nInit(),this.render=this.render.bind(this),this.install=this.install.bind(this)}render(e){let{capabilities:t,files:i,allowNewUpload:s,totalProgress:n,error:a,recoveredState:l}=e,{newFiles:u,startedFiles:h,completeFiles:d,isUploadStarted:m,isAllComplete:w,isAllPaused:y,isUploadInProgress:P,isSomeGhost:D}=this.uppy.getObjectOfFilesPerState(),C=l?Object.values(i):u,O=!!t.resumableUploads,z=t.uploadProgress!==!1,X=0,K=0;h.forEach($=>{X+=$.progress.bytesTotal||0,K+=$.progress.bytesUploaded||0});let Z=Le(this,qc)[qc]({uploaded:K,total:X,remaining:X-K});return Hc({error:a,uploadState:hS(a,w,l,e.files||{}),allowNewUpload:s,totalProgress:n,totalSize:X,totalUploadedSize:K,isAllComplete:!1,isAllPaused:y,isUploadStarted:m,isUploadInProgress:P,isSomeGhost:D,recoveredState:l,complete:d.length,newFiles:C.length,numUploads:h.length,totalETA:Z,files:i,i18n:this.i18n,uppy:this.uppy,startUpload:this.startUpload,doneButtonHandler:this.opts.doneButtonHandler,resumableUploads:O,supportsUploadProgress:z,showProgressDetails:this.opts.showProgressDetails,hideUploadButton:this.opts.hideUploadButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,hideCancelButton:this.opts.hideCancelButton,hideAfterFinish:this.opts.hideAfterFinish})}onMount(){let e=this.el;Rl(e)||(e.dir=\"ltr\")}install(){let{target:e}=this.opts;e&&this.mount(e,this),this.uppy.on(\"upload\",Le(this,An)[An]),Le(this,yr)[yr]=performance.now(),Le(this,Er)[Er]=this.uppy.getFiles().reduce((t,i)=>t+i.progress.bytesUploaded,0)}uninstall(){this.unmount(),this.uppy.off(\"upload\",Le(this,An)[An])}};function pS(r){var e,t;if(r.total===0||r.remaining===0)return 0;(t=(e=Le(this,yr))[yr])!=null||(e[yr]=performance.now());let i=performance.now()-Le(this,yr)[yr];if(i===0){var s;return Math.round(((s=Le(this,er)[er])!=null?s:0)/100)/10}let n=r.uploaded-Le(this,Er)[Er];if(Le(this,Er)[Er]=r.uploaded,n<=0){var a;return Math.round(((a=Le(this,er)[er])!=null?a:0)/100)/10}let l=n/i,u=Le(this,ai)[ai]==null?l:Gl(l,Le(this,ai)[ai],uS,i);Le(this,ai)[ai]=u;let h=r.remaining/u,d=Math.max(Le(this,er)[er]-i,0),m=Le(this,er)[er]==null?h:Gl(h,d,cS,i);return Le(this,er)[er]=m,Le(this,yr)[yr]=performance.now(),Math.round(m/100)/10}o(pS,\"_computeSmoothETA2\");li.VERSION=lS.version;var gg=300,Rn=class extends Ue{static{o(this,\"FadeIn\")}constructor(){super(...arguments),this.ref=im()}componentWillEnter(e){this.ref.current.style.opacity=\"1\",this.ref.current.style.transform=\"none\",setTimeout(e,gg)}componentWillLeave(e){this.ref.current.style.opacity=\"0\",this.ref.current.style.transform=\"translateY(350%)\",setTimeout(e,gg)}render(){let{children:e}=this.props;return c(\"div\",{className:\"uppy-Informer-animated\",ref:this.ref},e)}};function fS(r,e){return Object.assign(r,e)}o(fS,\"assign\");function mS(r,e){var t;return(t=r?.key)!=null?t:e}o(mS,\"getKey\");function gS(r,e){let t=r._ptgLinkedRefs||(r._ptgLinkedRefs={});return t[e]||(t[e]=i=>{r.refs[e]=i})}o(gS,\"linkRef\");function kn(r){let e={};for(let t=0;t<r.length;t++)if(r[t]!=null){let i=mS(r[t],t.toString(36));e[i]=r[t]}return e}o(kn,\"getChildMapping\");function yS(r,e){r=r||{},e=e||{};
2let t=o(a=>e.hasOwnProperty(a)?e[a]:r[a],\"getValueForKey\"),i={},s=[];for(let a in r)e.hasOwnProperty(a)?s.length&&(i[a]=s,s=[]):s.push(a);let n={};for(let a in e){if(i.hasOwnProperty(a))for(let l=0;l<i[a].length;l++){let u=i[a][l];n[i[a][l]]=t(u)}n[a]=t(a)}for(let a=0;a<s.length;a++)n[s[a]]=t(s[a]);return n}o(yS,\"mergeChildMappings\");var vS=o(r=>r,\"identity\"),Yl=class extends Ue{static{o(this,\"TransitionGroup\")}constructor(e,t){super(e,t),this.refs={},this.state={children:kn(Ir(Ir(this.props.children))||[])},this.performAppear=this.performAppear.bind(this),this.performEnter=this.performEnter.bind(this),this.performLeave=this.performLeave.bind(this)}componentWillMount(){this.currentlyTransitioningKeys={},this.keysToAbortLeave=[],this.keysToEnter=[],this.keysToLeave=[]}componentDidMount(){let e=this.state.children;for(let t in e)e[t]&&this.performAppear(t)}componentWillReceiveProps(e){let t=kn(Ir(e.children)||[]),i=this.state.children;this.setState(n=>({children:yS(n.children,t)}));let s;for(s in t)if(t.hasOwnProperty(s)){let n=i&&i.hasOwnProperty(s);t[s]&&n&&this.currentlyTransitioningKeys[s]?(this.keysToEnter.push(s),this.keysToAbortLeave.push(s)):t[s]&&!n&&!this.currentlyTransitioningKeys[s]&&this.keysToEnter.push(s)}for(s in i)if(i.hasOwnProperty(s)){let n=t&&t.hasOwnProperty(s);i[s]&&!n&&!this.currentlyTransitioningKeys[s]&&this.keysToLeave.push(s)}}componentDidUpdate(){let{keysToEnter:e}=this;this.keysToEnter=[],e.forEach(this.performEnter);let{keysToLeave:t}=this;this.keysToLeave=[],t.forEach(this.performLeave)}_finishAbort(e){let t=this.keysToAbortLeave.indexOf(e);t!==-1&&this.keysToAbortLeave.splice(t,1)}performAppear(e){this.currentlyTransitioningKeys[e]=!0;let t=this.refs[e];t!=null&&t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)}_handleDoneAppearing(e){let t=this.refs[e];t!=null&&t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);let i=kn(Ir(this.props.children)||[]);(!i||!i.hasOwnProperty(e))&&this.performLeave(e)}performEnter(e){this.currentlyTransitioningKeys[e]=!0;let t=this.refs[e];t!=null&&t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)}_handleDoneEntering(e){let t=this.refs[e];t!=null&&t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e],this._finishAbort(e);let i=kn(Ir(this.props.children)||[]);(!i||!i.hasOwnProperty(e))&&this.performLeave(e)}performLeave(e){if(this.keysToAbortLeave.indexOf(e)!==-1)return;this.currentlyTransitioningKeys[e]=!0;let i=this.refs[e];i!=null&&i.componentWillLeave?i.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)}_handleDoneLeaving(e){if(this.keysToAbortLeave.indexOf(e)!==-1)return;let i=this.refs[e];i!=null&&i.componentDidLeave&&i.componentDidLeave(),delete this.currentlyTransitioningKeys[e];let s=kn(Ir(this.props.children)||[]);if(s&&s.hasOwnProperty(e))this.performEnter(e);else{let n=fS({},this.state.children);delete n[e],this.setState({children:n})}}render(e,t){let{childFactory:i,transitionLeave:s,transitionName:n,transitionAppear:a,transitionEnter:l,transitionLeaveTimeout:u,transitionEnterTimeout:h,transitionAppearTimeout:d,component:m,...w}=e,{children:y}=t,P=Object.entries(y).map(D=>{let[C,O]=D;if(!O)return;let z=gS(this,C);return Ol(i(O),{ref:z,key:C})}).filter(Boolean);return c(m,w,P)}};Yl.defaultProps={component:\"span\",childFactory:vS};var yg=Yl;var bS={version:\"4.1.0\"},ui=class extends ne{static{o(this,\"Informer\")}constructor(e,t){super(e,t),this.render=i=>c(\"div\",{className:\"uppy uppy-Informer\"},c(yg,null,i.info.map(s=>c(Rn,{key:s.message},c(\"p\",{role:\"alert\"},s.message,\" \",s.details&&c(\"span\",{\"aria-label\":s.details,\"data-microtip-position\":\"top-left\",\"data-microtip-size\":\"medium\",role:\"tooltip\",onClick:o(()=>alert(`${s.message}\n\n ${s.details}`),\"onClick\")},\"?\")))))),this.type=\"progressindicator\",this.id=this.opts.id||\"Informer\",this.title=\"Informer\"}install(){let{target:e}=this.opts;e&&this.mount(e,this)}};ui.VERSION=bS.version;var wS=/^data:([^/]+\\/[^,;]+(?:[^,]*?))(;base64)?,([\\s\\S]*)$/;function SS(r,e,t){var i,s;let n=wS.exec(r),a=(i=(s=e.mimeType)!=null?s:n?.[1])!=null?i:\"plain/text\",l;if(n?.[2]!=null){let u=atob(decodeURIComponent(n[3])),h=new Uint8Array(u.length);for(let d=0;d<u.length;d++)h[d]=u.charCodeAt(d);l=[h]}else n?.[3]!=null&&(l=[decodeURIComponent(n[3])]);return t?new File(l,e.name||\"\",{type:a}):new Blob(l,{type:a})}o(SS,\"dataURItoBlob\");var vg=SS;function Jl(r){return r.startsWith(\"blob:\")}o(Jl,\"isObjectURL\");function Ql(r){return r?/^[^/]+\\/(jpe?g|gif|png|svg|svg\\+xml|bmp|webp|avif)$/.test(r):!1}o(Ql,\"isPreviewSupported\");function _e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}o(_e,\"e\");var Cg=typeof self<\"u\"?self:global,Nn=typeof navigator<\"u\",PS=Nn&&typeof HTMLImageElement>\"u\",bg=!(typeof global>\"u\"||typeof process>\"u\"||!process.versions||!process.versions.node),Tg=Cg.Buffer,Og=!!Tg,_S=o(r=>r!==void 0,\"h\");function Ag(r){return r===void 0||(r instanceof Map?r.size===0:Object.values(r).filter(_S).length===0)}o(Ag,\"f\");function ht(r){let e=new Error(r);throw delete e.stack,e}o(ht,\"l\");function wg(r){let e=function(t){let i=0;return t.ifd0.enabled&&(i+=1024),t.exif.enabled&&(i+=2048),t.makerNote&&(i+=2048),t.userComment&&(i+=1024),t.gps.enabled&&(i+=512),t.interop.enabled&&(i+=100),t.ifd1.enabled&&(i+=1024),i+2048}(r);return r.jfif.enabled&&(e+=50),r.xmp.enabled&&(e+=2e4),r.iptc.enabled&&(e+=14e3),r.icc.enabled&&(e+=6e3),e}o(wg,\"o\");var $c=o(r=>String.fromCharCode.apply(null,r),\"u\"),Sg=typeof TextDecoder<\"u\"?new TextDecoder(\"utf-8\"):void 0,ps=class r{static{o(this,\"c\")}static from(e,t){return e instanceof this&&e.le===t?e:new r(e,void 0,void 0,t)}constructor(e,t=0,i,s){if(typeof s==\"boolean\"&&(this.le=s),Array.isArray(e)&&(e=new Uint8Array(e)),e===0)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){i===void 0&&(i=e.byteLength-t);let n=new DataView(e,t,i);this._swapDataView(n)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof r){i===void 0&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&ht(\"Creating view outside of available memory in ArrayBuffer\");let n=new DataView(e.buffer,t,i);this._swapDataView(n)}else if(typeof e==\"number\"){let n=new DataView(new ArrayBuffer(e));this._swapDataView(n)}else ht(\"Invalid input argument for BufferView: \"+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,i=r){return e instanceof DataView||e instanceof r?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||ht(\"BufferView.set(): Invalid data argument.\"),this.toUint8().set(e,t),new i(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new r(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return s=this.getUint8Array(e,t),Sg?Sg.decode(s):Og?Buffer.from(s).toString(\"utf8\"):decodeURIComponent(escape($c(s)));var s}getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);return $c(i)}getUnicodeString(e=0,t=this.byteLength){let i=[];for(let s=0;s<t&&e+s<this.byteLength;s+=2)i.push(this.getUint16(e+s));return $c(i)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}
2getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,i){switch(t){case 1:return this.getUint8(e,i);case 2:return this.getUint16(e,i);case 4:return this.getUint32(e,i);case 8:return this.getUint64&&this.getUint64(e,i)}}getUint(e,t,i){switch(t){case 8:return this.getUint8(e,i);case 16:return this.getUint16(e,i);case 32:return this.getUint32(e,i);case 64:return this.getUint64&&this.getUint64(e,i)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}};function Wc(r,e){ht(`${r} '${e}' was not loaded, try using full build of exifr.`)}o(Wc,\"p\");var Ln=class extends Map{static{o(this,\"g\")}constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||Wc(this.kind,e),t&&(e in t||function(i,s){ht(`Unknown ${i} '${s}'.`)}(this.kind,e),t[e].enabled||Wc(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}},iu=new Ln(\"file parser\"),tr=new Ln(\"segment parser\"),zn=new Ln(\"file reader\"),xS=Cg.fetch;function Pg(r,e){return(t=r).startsWith(\"data:\")||t.length>1e4?Kc(r,e,\"base64\"):bg&&r.includes(\"://\")?Gc(r,e,\"url\",Zl):bg?Kc(r,e,\"fs\"):Nn?Gc(r,e,\"url\",Zl):void ht(\"Invalid input argument\");var t}o(Pg,\"k\");async function Gc(r,e,t,i){return zn.has(t)?Kc(r,e,t):i?async function(s,n){let a=await n(s);return new ps(a)}(r,i):void ht(`Parser ${t} is not loaded`)}o(Gc,\"O\");async function Kc(r,e,t){let i=new(zn.get(t))(r,e);return await i.read(),i}o(Kc,\"v\");var Zl=o(r=>xS(r).then(e=>e.arrayBuffer()),\"S\"),Mn=o(r=>new Promise((e,t)=>{let i=new FileReader;i.onloadend=()=>e(i.result||new ArrayBuffer),i.onerror=t,i.readAsArrayBuffer(r)}),\"A\"),Xc=class extends Map{static{o(this,\"U\")}get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}};function Rg(r,e,t){let i=new Xc;for(let[s,n]of t)i.set(s,n);if(Array.isArray(e))for(let s of e)r.set(s,i);else r.set(e,i);return i}o(Rg,\"x\");function kg(r,e,t){let i,s=r.get(e);for(i of t)s.set(i[0],i[1])}o(kg,\"C\");var jn=new Map,eh=new Map,th=new Map,bo=[\"chunked\",\"firstChunkSize\",\"firstChunkSizeNode\",\"firstChunkSizeBrowser\",\"chunkSize\",\"chunkLimit\"],su=[\"jfif\",\"xmp\",\"icc\",\"iptc\",\"ihdr\"],Bn=[\"tiff\",...su],Ze=[\"ifd0\",\"ifd1\",\"exif\",\"gps\",\"interop\"],wo=[...Bn,...Ze],So=[\"makerNote\",\"userComment\"],ou=[\"translateKeys\",\"translateValues\",\"reviveValues\",\"multiSegment\"],Po=[...ou,\"sanitize\",\"mergeOutput\",\"silentErrors\"],eu=class{static{o(this,\"_\")}get translate(){return this.translateKeys||this.translateValues||this.reviveValues}},ds=class extends eu{static{o(this,\"D\")}get needed(){return this.enabled||this.deps.size>0}constructor(e,t,i,s){if(super(),_e(this,\"enabled\",!1),_e(this,\"skip\",new Set),_e(this,\"pick\",new Set),_e(this,\"deps\",new Set),_e(this,\"translateKeys\",!1),_e(this,\"translateValues\",!1),_e(this,\"reviveValues\",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(s),this.canBeFiltered=Ze.includes(e),this.canBeFiltered&&(this.dict=jn.get(e)),i!==void 0)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if(typeof i==\"object\"){if(this.enabled=!0,this.parse=i.parse!==!1,this.canBeFiltered){let{pick:n,skip:a}=i;n&&n.length>0&&this.translateTagSet(n,this.pick),a&&a.length>0&&this.translateTagSet(a,this.skip)}this.applyInheritables(i)}else i===!0||i===!1?this.parse=this.enabled=i:ht(`Invalid options argument: ${i}`)}applyInheritables(e){let t,i;for(t of ou)i=e[t],i!==void 0&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,s,{tagKeys:n,tagValues:a}=this.dict;for(i of e)typeof i==\"string\"?(s=a.indexOf(i),s===-1&&(s=n.indexOf(Number(i))),s!==-1&&t.add(Number(n[s]))):t.add(i)}else for(let i of e)t.add(i)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,tu(this.pick,this.deps)):this.enabled&&this.pick.size>0&&tu(this.pick,this.deps)}},It={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},_g=new Map,fs=class extends eu{static{o(this,\"R\")}static useCached(e){let t=_g.get(e);return t!==void 0||(t=new this(e),_g.set(e,t)),t}constructor(e){super(),e===!0?this.setupFromTrue():e===void 0?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):typeof e==\"object\"?this.setupFromObject(e):ht(`Invalid options argument ${e}`),this.firstChunkSize===void 0&&(this.firstChunkSize=Nn?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of bo)this[e]=It[e];for(e of Po)this[e]=It[e];for(e of So)this[e]=It[e];for(e of wo)this[e]=new ds(e,It[e],void 0,this)}setupFromTrue(){let e;for(e of bo)this[e]=It[e];for(e of Po)this[e]=It[e];for(e of So)this[e]=!0;for(e of wo)this[e]=new ds(e,!0,void 0,this)}setupFromArray(e){let t;for(t of bo)this[t]=It[t];for(t of Po)this[t]=It[t];for(t of So)this[t]=It[t];for(t of wo)this[t]=new ds(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,Ze)}setupFromObject(e){let t;for(t of(Ze.ifd0=Ze.ifd0||Ze.image,Ze.ifd1=Ze.ifd1||Ze.thumbnail,Object.assign(this,e),bo))this[t]=Vc(e[t],It[t]);for(t of Po)this[t]=Vc(e[t],It[t]);for(t of So)this[t]=Vc(e[t],It[t]);for(t of Bn)this[t]=new ds(t,It[t],e[t],this);for(t of Ze)this[t]=new ds(t,It[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,Ze,wo),e.tiff===!0?this.batchEnableWithBool(Ze,!0):e.tiff===!1?this.batchEnableWithUserValue(Ze,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,Ze):typeof e.tiff==\"object\"&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,Ze)}batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t}batchEnableWithUserValue(e,t){for(let i of e){let s=t[i];this[i].enabled=s!==!1&&s!==void 0}}setupGlobalFilters(e,t,i,s=i){if(e&&e.length){for(let a of s)this[a].enabled=!1;let n=xg(e,i);for(let[a,l]of n)tu(this[a].pick,l),this[a].enabled=!0}else if(t&&t.length){let n=xg(t,i);for(let[a,l]of n)tu(this[a].skip,l)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:s,icc:n}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),i.enabled||e.skip.add(700),s.enabled||e.skip.add(33723),n.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:s}=this;s.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),i.needed&&e.deps.add(34853),this.tiff.enabled=Ze.some(n=>this[n].enabled===!0)||this.makerNote||this.userComment;for(let n of Ze)this[n].finalizeFilters()}get onlyTiff(){return!su.map(e=>this[e].enabled).some(e=>e===!0)&&this.tiff.enabled}checkLoadedPlugins(){for(let e of Bn)this[e].enabled&&!tr.has(e)&&Wc(\"segment parser\",e)}};function xg(r,e){let t,i,s,n,a=[];for(s of e){for(n of(t=jn.get(s),i=[],t))(r.includes(n[0])||r.includes(n[1]))&&i.push(n[0]);i.length&&a.push([s,i])}return a}o(xg,\"K\");function Vc(r,e){return r!==void 0?r:e!==void 0?e:void 0}o(Vc,\"W\");function tu(r,e){for(let t of e)r.add(t)}o(tu,\"X\");_e(fs,\"default\",It);var _o=class{static{o(this,\"H\")}constructor(e){_e(this,\"parsers\",{}),_e(this,\"output\",{}),_e(this,\"errors\",[]),_e(this,\"pushToErrors\",t=>this.errors.push(t)),this.options=fs.useCached(e)}async read(e){this.file=await function(t,i){return typeof t==\"string\"?Pg(t,i):Nn&&!PS&&t instanceof HTMLImageElement?Pg(t.src,i):t instanceof Uint8Array||t instanceof ArrayBuffer||t instanceof DataView?new ps(t):Nn&&t instanceof Blob?Gc(t,i,\"blob\",Mn):void ht(\"Invalid input argument\")}(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,s]of iu)if(s.canHandle(e,t))return this.fileParser=new s(this.options,this.file,this.parsers),e[i]=!0;this.file.close&&this.file.close(),ht(\"Unknown file format\")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),Ag(i=e)?void 0:i;var i}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map(async i=>{let s=await i.parse();i.assignToOutput(e,s)});this.options.silentErrors&&(t=t.map(i=>i.catch(this.pushToErrors))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=tr.get(\"tiff\",e);var s;if(t.tiff?s={start:0,type:\"tiff\"}:t.jpeg&&(s=await this.fileParser.getOrFindSegment(\"tiff\")),s===void 0)return;let n=await this.fileParser.ensureSegmentChunk(s),a=this.parsers.tiff=new i(n,e,t),l=await a.extractThumbnail();return t.close&&t.close(),l}};async function Ug(r,e){let t=new _o(e);return await t.read(r),t.parse()}o(Ug,\"Y\");var FS=Object.freeze({__proto__:null,parse:Ug,Exifr:_o,fileParsers:iu,segmentParsers:tr,fileReaders:zn,tagKeys:jn,tagValues:eh,tagRevivers:th,createDictionary:Rg,extendDictionary:kg,fetchUrlAsArrayBuffer:Zl,readBlobAsArrayBuffer:Mn,chunkedProps:bo,otherSegments:su,segments:Bn,tiffBlocks:Ze,segmentsAndBlocks:wo,tiffExtractables:So,inheritables:ou,allFormatters:Po,Options:fs}),Hi=class{static{o(this,\"J\")}static findPosition(e,t){let i=e.getUint16(t+2)+2,s=typeof this.headerLength==\"function\"?this.headerLength(e,t,i):this.headerLength,n=t+s,a=i-s;return{offset:t,length:i,headerLength:s,start:n,size:a,end:n+a}}static parse(e,t={}){return new this(e,new fs({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof ps?e:new ps(e)}constructor(e,t={},i){_e(this,\"errors\",[]),_e(this,\"raw\",new Map),_e(this,\"handleError\",s=>{if(!this.options.silentErrors)throw s;this.errors.push(s.message)}),this.chunk=this.normalizeInput(e),this.file=i,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let i=th.get(t),s=eh.get(t),n=jn.get(t),a=this.options[t],l=a.reviveValues&&!!i,u=a.translateValues&&!!s,h=a.translateKeys&&!!n,d={};for(let[m,w]of e)l&&i.has(m)?w=i.get(m)(w):u&&s.has(m)&&(w=this.translateValue(w,s.get(m))),h&&n.has(m)&&(m=n.get(m)||m),d[m]=w;return d}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return Object.assign(e,i);e[t]?Object.assign(e[t],i):e[t]=i}};_e(Hi,\"headerLength\",4),_e(Hi,\"type\",void 0),_e(Hi,\"multiSegment\",!1),_e(Hi,\"canHandle\",()=>!1);function ES(r){return r===192||r===194||r===196||r===219||r===221||r===218||r===254}o(ES,\"q\");function CS(r){return r>=224&&r<=239}o(CS,\"Q\");function TS(r,e,t){for(let[i,s]of tr)if(s.canHandle(r,e,t))return i}o(TS,\"Z\");var ru=class extends class{constructor(e,t,i){_e(this,\"errors\",[]),_e(this,\"ensureSegmentChunk\",async s=>{let n=s.start,a=s.size||65536;if(this.file.chunked)if(this.file.available(n,a))s.chunk=this.file.subarray(n,a);else try{s.chunk=await this.file.readChunk(n,a)}catch(l){ht(`Couldn't read segment: ${JSON.stringify(s)}. ${l.message}`)}else this.file.byteLength>n+a?s.chunk=this.file.subarray(n,a):s.size===void 0?s.chunk=this.file.subarray(n):ht(\"Segment unreachable: \"+JSON.stringify(s));return s.chunk}),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let i=new(tr.get(e))(t,this.options,this.file);return this.parsers[e]=i}createParsers(e){for(let t of e){let{type:i,chunk:s}=t,n=this.options[i];if(n&&n.enabled){let a=this.parsers[i];a&&a.append||a||this.createParser(i,s)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}{static{o(this,\"ee\")}constructor(...e){super(...e),_e(this,\"appSegments\",[]),_e(this,\"jpegSegments\",[]),_e(this,\"unknownSegments\",[])}static canHandle(e,t){return t===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){e===!0?(this.findAll=!0,this.wanted=new Set(tr.keyList())):(e=e===void 0?tr.keyList().filter(t=>this.options[t].enabled):e.filter(t=>this.options[t].enabled&&tr.has(t)),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:i,findAll:s,wanted:n,remaining:a}=this;if(!s&&this.file.chunked&&(s=Array.from(n).some(l=>{let u=tr.get(l),h=this.options[l];return u.multiSegment&&h.multiSegment}),s&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,i.byteLength),!this.options.onlyTiff&&i.chunked){let l=!1;for(;a.size>0&&!l&&(i.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:u}=i,h=this.appSegments.some(d=>!this.file.available(d.offset||d.start,d.length||d.size));if(l=e>u&&!h?!await i.readNextChunk(e):!await i.readNextChunk(u),(e=this.findAppSegmentsInRange(e,i.byteLength))===void 0)return}}}findAppSegmentsInRange(e,t){t-=2;let i,s,n,a,l,u,{file:h,findAll:d,wanted:m,remaining:w,options:y}=this;for(;e<t;e++)if(h.getUint8(e)===255){if(i=h.getUint8(e+1),CS(i)){if(s=h.getUint16(e+2),n=TS(h,e,s),n&&m.has(n)&&(a=tr.get(n),l=a.findPosition(h,e),u=y[n],l.type=n,this.appSegments.push(l),!d&&(a.multiSegment&&u.multiSegment?(this.unfinishedMultiSegment=l.chunkNumber<l.chunkCount,this.unfinishedMultiSegment||w.delete(n)):w.delete(n),w.size===0)))break;y.recordUnknownSegments&&(l=Hi.findPosition(h,e),l.marker=i,this.unknownSegments.push(l)),e+=s+1}else if(ES(i)){if(s=h.getUint16(e+2),i===218&&y.stopAfterSos!==!1)return;y.recordJpegSegments&&this.jpegSegments.push({offset:e,length:s,marker:i}),e+=s+1}}return e}mergeMultiSegments(){if(!this.appSegments.some(t=>t.multiSegment))return;let e=function(t,i){let s,n,a,l=new Map;for(let u=0;u<t.length;u++)s=t[u],n=s[i],l.has(n)?a=l.get(n):l.set(n,a=[]),a.push(s);return Array.from(l)}(this.appSegments,\"type\");this.mergedAppSegments=e.map(([t,i])=>{let s=tr.get(t,this.options);return s.handleMultiSegments?{type:t,chunk:s.handleMultiSegments(i)}:i[0]})}getSegment(e){return this.appSegments.find(t=>t.type===e)}async getOrFindSegment(e){let t=this.getSegment(e);return t===void 0&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}};_e(ru,\"type\",\"jpeg\"),iu.set(\"jpeg\",ru);var OS=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4],Yc=class extends Hi{static{o(this,\"se\")}parseHeader(){var e=this.chunk.getUint16();e===18761?this.le=!0:e===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,i=new Map){let{pick:s,skip:n}=this.options[t];s=new Set(s);let a=s.size>0,l=n.size===0,u=this.chunk.getUint16(e);e+=2;for(let h=0;h<u;h++){let d=this.chunk.getUint16(e);
vendor: 6,925 bytes, line 2
2if(a){if(s.has(d)&&(i.set(d,this.parseTag(e,d,t)),s.delete(d),s.size===0))break}else!l&&n.has(d)||i.set(d,this.parseTag(e,d,t));e+=12}return i}parseTag(e,t,i){let{chunk:s}=this,n=s.getUint16(e+2),a=s.getUint32(e+4),l=OS[n];if(l*a<=4?e+=8:e=s.getUint32(e+8),(n<1||n>13)&&ht(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e}`),e>s.byteLength&&ht(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${n}, offset ${e} is outside of chunk size ${s.byteLength}`),n===1)return s.getUint8Array(e,a);if(n===2)return(u=function(h){for(;h.endsWith(\"\\0\");)h=h.slice(0,-1);return h}(u=s.getString(e,a)).trim())===\"\"?void 0:u;var u;if(n===7)return s.getUint8Array(e,a);if(a===1)return this.parseTagValue(n,e);{let h=new(function(m){switch(m){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(n))(a),d=l;for(let m=0;m<a;m++)h[m]=this.parseTagValue(n,e),e+=d;return h}}parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint8(t);case 3:return i.getUint16(t);case 4:return i.getUint32(t);case 5:return i.getUint32(t)/i.getUint32(t+4);case 6:return i.getInt8(t);case 8:return i.getInt16(t);case 9:return i.getInt32(t);case 10:return i.getInt32(t)/i.getInt32(t+4);case 11:return i.getFloat(t);case 12:return i.getDouble(t);case 13:return i.getUint32(t);default:ht(`Invalid tiff type ${e}`)}}},In=class extends Yc{static{o(this,\"ie\")}static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1165519206&&e.getUint16(t+8)===0}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse(\"parseExifBlock\"),e.gps.enabled&&await this.safeParse(\"parseGpsBlock\"),e.interop.enabled&&await this.safeParse(\"parseInteropBlock\"),e.ifd1.enabled&&await this.safeParse(\"parseThumbnailBlock\"),this.createOutput()}safeParse(e){let t=this[e]();return t.catch!==void 0&&(t=t.catch(this.handleError)),t}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&ht(\"Malformed EXIF data\"),!e.chunked&&this.ifd0Offset>e.byteLength&&ht(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,wg(this.options));let t=this.parseBlock(this.ifd0Offset,\"ifd0\");return t.size!==0?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,wg(this.options));let e=this.parseBlock(this.exifOffset,\"exif\");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let i=e.get(t);i&&i.length===1&&e.set(t,i[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let e=this.parseBlock(this.gpsOffset,\"gps\");return e&&e.has(2)&&e.has(4)&&(e.set(\"latitude\",Fg(...e.get(2),e.get(1))),e.set(\"longitude\",Fg(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,\"interop\")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,\"ifd1\"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,i,s={};for(t of Ze)if(e=this[t],!Ag(e))if(i=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(t===\"ifd1\")continue;Object.assign(s,i)}else s[t]=i;return this.makerNote&&(s.makerNote=this.makerNote),this.userComment&&(s.userComment=this.userComment),s}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[i,s]of Object.entries(t))this.assignObjectToOutput(e,i,s)}};function Fg(r,e,t,i){var s=r+e/60+t/3600;return i!==\"S\"&&i!==\"W\"||(s*=-1),s}o(Fg,\"ne\");_e(In,\"type\",\"tiff\"),_e(In,\"headerLength\",10),tr.set(\"tiff\",In);var NO=Object.freeze({__proto__:null,default:FS,Exifr:_o,fileParsers:iu,segmentParsers:tr,fileReaders:zn,tagKeys:jn,tagValues:eh,tagRevivers:th,createDictionary:Rg,extendDictionary:kg,fetchUrlAsArrayBuffer:Zl,readBlobAsArrayBuffer:Mn,chunkedProps:bo,otherSegments:su,segments:Bn,tiffBlocks:Ze,segmentsAndBlocks:wo,tiffExtractables:So,inheritables:ou,allFormatters:Po,Options:fs,parse:Ug}),rh={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},LO=Object.assign({},rh,{firstChunkSize:4e4,gps:[1,2,3,4]});var MO=Object.assign({},rh,{tiff:!1,ifd1:!0,mergeOutput:!1});var AS=Object.assign({},rh,{firstChunkSize:4e4,ifd0:[274]});async function RS(r){let e=new _o(AS);await e.read(r);let t=await e.parse();if(t&&t.ifd0)return t.ifd0[274]}o(RS,\"ce\");var kS=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}}),Un=!0,Dn=!0;if(typeof navigator==\"object\"){let r=navigator.userAgent;if(r.includes(\"iPad\")||r.includes(\"iPhone\")){let e=r.match(/OS (\\d+)_(\\d+)/
2);if(e){let[,t,i]=e;Un=Number(t)+.1*Number(i)<13.4,Dn=!1}}else if(r.includes(\"OS X 10\")){let[,e]=r.match(/OS X 10[_.](\\d+)/);Un=Dn=Number(e)<15}if(r.includes(\"Chrome/\")){let[,e]=r.match(/Chrome\\/(\\d+)/);Un=Dn=Number(e)<81}else if(r.includes(\"Firefox/\")){let[,e]=r.match(/Firefox\\/(\\d+)/);Un=Dn=Number(e)<77}}async function Dg(r){let e=await RS(r);return Object.assign({canvas:Un,css:Dn},kS[e])}o(Dg,\"ye\");var Jc=class extends ps{static{o(this,\"be\")}constructor(...e){super(...e),_e(this,\"ranges\",new Qc),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,i){if(e===0&&this.byteLength===0&&i){let s=new DataView(i.buffer||i,i.byteOffset,i.byteLength);this._swapDataView(s)}else{let s=e+t;if(s>this.byteLength){let{dataView:n}=this._extend(s);this._swapDataView(n)}}}_extend(e){let t;t=Og?Tg.allocUnsafe(e):new Uint8Array(e);let i=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:i}}subarray(e,t,i=!1){return t=t||this._lengthToEnd(e),i&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,i=!1){i&&this._tryExtend(t,e.byteLength,e);let s=super.set(e,t);return this.ranges.add(t,s.byteLength),s}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}},Qc=class{static{o(this,\"we\")}constructor(){_e(this,\"list\",[])}get length(){return this.list.length}add(e,t,i=0){let s=e+t,n=this.list.filter(a=>Eg(e,a.offset,s)||Eg(e,a.end,s));if(n.length>0){e=Math.min(e,...n.map(l=>l.offset)),s=Math.max(s,...n.map(l=>l.end)),t=s-e;let a=n.shift();a.offset=e,a.length=t,a.end=s,this.list=this.list.filter(l=>!n.includes(l))}else this.list.push({offset:e,length:t,end:s})}available(e,t){let i=e+t;return this.list.some(s=>s.offset<=e&&i<=s.end)}};function Eg(r,e,t){return r<=e&&e<=t}o(Eg,\"ke\");var Zc=class extends Jc{static{o(this,\"Oe\")}constructor(e,t){super(0),_e(this,\"chunksRead\",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,i=await this.readChunk(e,t);return!!i&&i.byteLength===t}async readChunk(e,t){if(this.chunksRead++,(t=this.safeWrapAddress(e,t))!==0)return this._readChunk(e,t)}safeWrapAddress(e,t){return this.size!==void 0&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}};zn.set(\"blob\",class extends Zc{async readWhole(){this.chunked=!1;let r=await Mn(this.input);this._swapArrayBuffer(r)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(r,e){let t=e?r+e:void 0,i=this.input.slice(r,t),s=await Mn(i);return this.set(s,r,!0)}});var Ig={strings:{generatingThumbnails:\"Generating thumbnails...\"}};var US={version:\"4.0.0\"};function DS(r,e,t){try{r.getContext(\"2d\").getImageData(0,0,1,1)}catch(i){if(i.code===18)return Promise.reject(new Error(\"cannot read image, probably an svg with external resources\"))}return r.toBlob?new Promise(i=>{r.toBlob(i,e,t)}).then(i=>{if(i===null)throw new Error(\"cannot read image, probably an svg with external resources\");return i}):Promise.resolve().then(()=>vg(r.toDataURL(e,t),{})).then(i=>{if(i===null)throw new Error(\"could not extract blob, probably an old browser\");return i})}o(DS,\"canvasToBlob\");function IS(r,e){let t=r.width,i=r.height;(e.deg===90||e.deg===270)&&(t=r.height,i=r.width);let s=document.createElement(\"canvas\");s.width=t,s.height=i;let n=s.getContext(\"2d\");return n.translate(t/2,i/2),e.canvas&&(n.rotate(e.rad),n.scale(e.scaleX,e.scaleY)),n.drawImage(r,-r.width/2,-r.height/2,r.width,r.height),s}o(IS,\"rotateImage\");function NS(r){let e=r.width/r.height,t=5e6,i=4096,s=Math.floor(Math.sqrt(t*e)),n=Math.floor(t/Math.sqrt(t*e));if(s>i&&(s=i,n=Math.round(s/e)),n>i&&(n=i,s=Math.round(e*n)),r.width>s){let a=document.createElement(\"canvas\");return a.width=s,a.height=n,a.getContext(\"2d\").drawImage(r,0,0,s,n),a}return r}o(NS,\"protect\");var LS={thumbnailWidth:null,thumbnailHeight:null,thumbnailType:\"image/jpeg\",waitForThumbnailsBeforeUpload:!1,lazy:!1},qi=class extends ne{static{o(this,\"ThumbnailGenerator\")}constructor(e,t){if(super(e,{...LS,...t}),this.onFileAdded=i=>{!i.preview&&i.data&&Ql(i.type)&&!i.isRemote&&this.addToQueue(i.id)},this.onCancelRequest=i=>{let s=this.queue.indexOf(i.id);s!==-1&&this.queue.splice(s,1)},this.onFileRemoved=i=>{let s=this.queue.indexOf(i.id);s!==-1&&this.queue.splice(s,1),i.preview&&Jl(i.preview)&&URL.revokeObjectURL(i.preview)},this.onRestored=()=>
2{this.uppy.getFiles().filter(s=>s.isRestored).forEach(s=>{(!s.preview||Jl(s.preview))&&this.addToQueue(s.id)})},this.onAllFilesRemoved=()=>{this.queue=[]},this.waitUntilAllProcessed=i=>{i.forEach(n=>{let a=this.uppy.getFile(n);this.uppy.emit(\"preprocess-progress\",a,{mode:\"indeterminate\",message:this.i18n(\"generatingThumbnails\")})});let s=o(()=>{i.forEach(n=>{let a=this.uppy.getFile(n);this.uppy.emit(\"preprocess-complete\",a)})},\"emitPreprocessCompleteForAll\");return new Promise(n=>{this.queueProcessing?this.uppy.once(\"thumbnail:all-generated\",()=>{s(),n()}):(s(),n())})},this.type=\"modifier\",this.id=this.opts.id||\"ThumbnailGenerator\",this.title=\"Thumbnail Generator\",this.queue=[],this.queueProcessing=!1,this.defaultThumbnailDimension=200,this.thumbnailType=this.opts.thumbnailType,this.defaultLocale=Ig,this.i18nInit(),this.opts.lazy&&this.opts.waitForThumbnailsBeforeUpload)throw new Error(\"ThumbnailGenerator: The `lazy` and `waitForThumbnailsBeforeUpload` options are mutually exclusive. Please ensure at most one of them is set to `true`.\")}createThumbnail(e,t,i){let s=URL.createObjectURL(e.data),n=new Promise((l,u)=>{let h=new Image;h.src=s,h.addEventListener(\"load\",()=>{URL.revokeObjectURL(s),l(h)}),h.addEventListener(\"error\",d=>{URL.revokeObjectURL(s),u(d.error||new Error(\"Could not create thumbnail\"))})}),a=Dg(e.data).catch(()=>1);return Promise.all([n,a]).then(l=>{let[u,h]=l,d=this.getProportionalDimensions(u,t,i,h.deg),m=IS(u,h),w=this.resizeImage(m,d.width,d.height);return DS(w,this.thumbnailType,80)}).then(l=>URL.createObjectURL(l))}getProportionalDimensions(e,t,i,s){let n=e.width/e.height;return(s===90||s===270)&&(n=e.height/e.width),t!=null?{width:t,height:Math.round(t/n)}:i!=null?{width:Math.round(i*n),height:i}:{width:this.defaultThumbnailDimension,height:Math.round(this.defaultThumbnailDimension/n)}}resizeImage(e,t,i){let s=NS(e),n=Math.ceil(Math.log2(s.width/t));n<1&&(n=1);let a=t*2**(n-1),l=i*2**(n-1),u=2;for(;n--;){let h=document.createElement(\"canvas\");h.width=a,h.height=l,h.getContext(\"2d\").drawImage(s,0,0,a,l),s=h,a=Math.round(a/u),l=Math.round(l/u)}return s}setPreviewURL(e,t){this.uppy.setFileState(e,{preview:t})}addToQueue(e){this.queue.push(e),this.queueProcessing===!1&&this.processQueue()}processQueue(){if(this.queueProcessing=!0,this.queue.length>0){let e=this.uppy.getFile(this.queue.shift());return e?this.requestThumbnail(e).catch(()=>{}).then(()=>this.processQueue()):(this.uppy.log(\"[ThumbnailGenerator] file was removed before a thumbnail could be generated, but not removed from the queue. This is probably a bug\",\"error\"),Promise.resolve())}return this.queueProcessing=!1,this.uppy.log(\"[ThumbnailGenerator] Emptied thumbnail queue\"),this.uppy.emit(\"thumbnail:all-generated\"),Promise.resolve()}requestThumbnail(e){return Ql(e.type)&&!e.isRemote?this.createThumbnail(e,this.opts.thumbnailWidth,this.opts.thumbnailHeight).then(t=>{this.setPreviewURL(e.id,t),this.uppy.log(`[ThumbnailGenerator] Generated thumbnail for ${e.id}`),this.uppy.emit(\"thumbnail:generated\",this.uppy.getFile(e.id),t)}).catch(t=>{this.uppy.log(`[ThumbnailGenerator] Failed thumbnail for ${e.id}:`,\"warning\"),this.uppy.log(t,\"warning\"),this.uppy.emit(\"thumbnail:error\",this.uppy.getFile(e.id),t)}):Promise.resolve()}install(){this.uppy.on(\"file-removed\",this.onFileRemoved),this.uppy.on(\"cancel-all\",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.on(\"thumbnail:request\",this.onFileAdded),this.uppy.on(\"thumbnail:cancel\",this.onCancelRequest)):(this.uppy.on(\"thumbnail:request\",this.onFileAdded),this.uppy.on(\"file-added\",this.onFileAdded),this.uppy.on(\"restored\",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.addPreProcessor(this.waitUntilAllProcessed)}uninstall(){this.uppy.off(\"file-removed\",this.onFileRemoved),this.uppy.off(\"cancel-all\",this.onAllFilesRemoved),this.opts.lazy?(this.uppy.off(\"thumbnail:request\",this.onFileAdded),this.uppy.off(\"thumbnail:cancel\",this.onCancelRequest)):(this.uppy.off(\"thumbnail:request\",this.onFileAdded),this.uppy.off(\"file-added\",this.onFileAdded),this.uppy.off(\"restored\",this.onRestored)),this.opts.waitForThumbnailsBeforeUpload&&this.uppy.removePreProcessor(this.waitUntilAllProcessed)}};qi.VERSION=US.version;function MS(r){if(typeof r==\"string\"){let e=document.querySelectorAll(r);return e.length===0?null:Array.from(e)}return typeof r==\"object\"&&mn(r)?[r]:null}o(MS,\"findAllDOMElements\");var ih=MS;var et=Array.from;function nu(r,e,t,i){let{onSuccess:s}=i;r.readEntries(n=>{let a=[...e,...n];n.length?queueMicrotask(()=>{nu(r,a,t,{onSuccess:s})}):s(a)},n=>{t(n),s(e)})}o(nu,\"getFilesAndDirectoriesFromDirectory\");function Ng(r,e){return r==null?r:{kind:r.isFile?\"file\":r.isDirectory?\"directory\":void 0,name:r.name,getFile(){return new Promise((t,i)=>r.file(t,i))},async*values(){let t=r.createReader();yield*await new Promise(s=>{nu(t,[],e,{onSuccess:o(n=>s(n.map(a=>
2Ng(a,e))),\"onSuccess\")})})},isSameEntry:void 0}}o(Ng,\"getAsFileSystemHandleFromEntry\");function Lg(r,e,t){try{return t===void 0&&(t=void 0),async function*(){let i=o(()=>`${e}/${r.name}`,\"getNextRelativePath\");if(r.kind===\"file\"){let s=await r.getFile();s!=null?(s.relativePath=e?i():null,yield s):t!=null&&(yield t)}else if(r.kind===\"directory\")for await(let s of r.values())yield*Lg(s,e?i():r.name);else t!=null&&(yield t)}()}catch(i){return Promise.reject(i)}}o(Lg,\"createPromiseToAddFileOrParseDirectory\");async function*sh(r,e){let t=await Promise.all(Array.from(r.items,async i=>{var s;let n,a=o(()=>typeof i.getAsEntry==\"function\"?i.getAsEntry():i.webkitGetAsEntry(),\"getAsEntry\");return(s=n)!=null||(n=Ng(a(),e)),{fileSystemHandle:n,lastResortFile:i.getAsFile()}}));for(let{lastResortFile:i,fileSystemHandle:s}of t)if(s!=null)try{yield*Lg(s,\"\",i)}catch(n){i!=null?yield i:e(n)}else i!=null&&(yield i)}o(sh,\"getFilesFromDataTransfer\");function oh(r){let e=et(r.files);return Promise.resolve(e)}o(oh,\"fallbackApi\");async function ms(r,e){var t;let i=(t=e?.logDropError)!=null?t:Function.prototype;try{let s=[];for await(let n of sh(r,i))s.push(n);return s}catch{return oh(r)}}o(ms,\"getDroppedFiles\");var Mg=Number.isNaN||o(function(e){return typeof e==\"number\"&&e!==e},\"ponyfill\");function BS(r,e){return!!(r===e||Mg(r)&&Mg(e))}o(BS,\"isEqual\");function zS(r,e){if(r.length!==e.length)return!1;for(var t=0;t<r.length;t++)if(!BS(r[t],e[t]))return!1;return!0}o(zS,\"areInputsEqual\");function nh(r,e){e===void 0&&(e=zS);var t=null;function i(){for(var s=[],n=0;n<arguments.length;n++)s[n]=arguments[n];if(t&&t.lastThis===this&&e(s,t.lastArgs))return t.lastResult;var a=r.apply(this,s);return t={lastResult:a,lastArgs:s,lastThis:this},a}return o(i,\"memoized\"),i.clear=o(function(){t=null},\"clear\"),i}o(nh,\"memoizeOne\");var au=['a[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])','area[href]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])',\"input:not([disabled]):not([inert]):not([aria-hidden])\",\"select:not([disabled]):not([inert]):not([aria-hidden])\",\"textarea:not([disabled]):not([inert]):not([aria-hidden])\",\"button:not([disabled]):not([inert]):not([aria-hidden])\",'iframe:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])','object:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])','embed:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])','[contenteditable]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])','[tabindex]:not([tabindex^=\"-\"]):not([inert]):not([aria-hidden])'];function Hn(r,e){if(e){let t=r.querySelector(`[data-uppy-paneltype=\"${e}\"]`);if(t)return t}return r}o(Hn,\"getActiveOverlayEl\");function Bg(r,e){let t=e[0];t&&(t.focus(),r.preventDefault())}o(Bg,\"focusOnFirstNode\");function jS(r,e){let t=e[e.length-1];t&&(t.focus(),r.preventDefault())}o(jS,\"focusOnLastNode\");function HS(r){return r.contains(document.activeElement)}o(HS,\"isFocusInOverlay\");function ah(r,e,t){let i=Hn(t,e),s=et(i.querySelectorAll(au)),n=s.indexOf(document.activeElement);HS(i)?r.shiftKey&&n===0?jS(r,s):!r.shiftKey&&n===s.length-1&&Bg(r,s):Bg(r,s)}o(ah,\"trapFocus\");function zg(r,e,t){e===null||ah(r,e,t)}o(zg,\"forInline\");var jg=ve($u(),1);function lh(){let r=!1;return(0,jg.default)(o((t,i)=>{let s=Hn(t,i),n=s.contains(document.activeElement);if(n&&r)return;let a=s.querySelector(\"[data-uppy-super-focusable]\");if(!(n&&!a))if(a)a.focus({preventScroll:!0}),r=!0;else{let l=s.querySelector(au);l?.focus({preventScroll:!0}),r=!1}},\"superFocus\"),260)}o(lh,\"createSuperFocus\");var oy=ve(kt(),1);function qn(){let r=document.body;return!(!(\"draggable\"in r)||!(\"ondragstart\"in r&&\"ondrop\"in r)||!(\"FormData\"in window)||!(\"FileReader\"in window))}o(qn,\"isDragDropSupported\");var Vg=ve(kt(),1);function Hg(r,e){if(r===e)return!0;if(!r||!e)return!1;let t=Object.keys(r),i=Object.keys(e),s=t.length;if(i.length!==s)return!1;for(let n=0;n<s;n++){let a=t[n];if(r[a]!==e[a]||!Object.prototype.hasOwnProperty.call(e,a))return!1}return!0}o(Hg,\"shallowEqualObjects\");
2function $S(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"g\",{fill:\"#686DE0\",fillRule:\"evenodd\"},c(\"path\",{d:\"M5 7v10h15V7H5zm0-1h15a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z\",fillRule:\"nonzero\"}),c(\"path\",{d:\"M6.35 17.172l4.994-5.026a.5.5 0 0 1 .707 0l2.16 2.16 3.505-3.505a.5.5 0 0 1 .707 0l2.336 2.31-.707.72-1.983-1.97-3.505 3.505a.5.5 0 0 1-.707 0l-2.16-2.159-3.938 3.939-1.409.026z\",fillRule:\"nonzero\"}),c(\"circle\",{cx:\"7.5\",cy:\"9.5\",r:\"1.5\"})))}o($S,\"iconImage\");function VS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"path\",{d:\"M9.5 18.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V7.25a.5.5 0 0 1 .379-.485l9-2.25A.5.5 0 0 1 18.5 5v11.64c0 1.14-1.145 2-2.5 2s-2.5-.86-2.5-2c0-1.14 1.145-2 2.5-2 .557 0 1.079.145 1.5.396V8.67l-8 2v7.97zm8-11v-2l-8 2v2l8-2zM7 19.64c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1zm9-2c.855 0 1.5-.484 1.5-1s-.645-1-1.5-1-1.5.484-1.5 1 .645 1 1.5 1z\",fill:\"#049BCF\",fillRule:\"nonzero\"}))}o(VS,\"iconAudio\");function WS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"path\",{d:\"M16 11.834l4.486-2.691A1 1 0 0 1 22 10v6a1 1 0 0 1-1.514.857L16 14.167V17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v2.834zM15 9H5v8h10V9zm1 4l5 3v-6l-5 3z\",fill:\"#19AF67\",fillRule:\"nonzero\"}))}o(WS,\"iconVideo\");function GS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"path\",{d:\"M9.766 8.295c-.691-1.843-.539-3.401.747-3.726 1.643-.414 2.505.938 2.39 3.299-.039.79-.194 1.662-.537 3.148.324.49.66.967 1.055 1.51.17.231.382.488.629.757 1.866-.128 3.653.114 4.918.655 1.487.635 2.192 1.685 1.614 2.84-.566 1.133-1.839 1.084-3.416.249-1.141-.604-2.457-1.634-3.51-2.707a13.467 13.467 0 0 0-2.238.426c-1.392 4.051-4.534 6.453-5.707 4.572-.986-1.58 1.38-4.206 4.914-5.375.097-.322.185-.656.264-1.001.08-.353.306-1.31.407-1.737-.678-1.059-1.2-2.031-1.53-2.91zm2.098 4.87c-.033.144-.068.287-.104.427l.033-.01-.012.038a14.065 14.065 0 0 1 1.02-.197l-.032-.033.052-.004a7.902 7.902 0 0 1-.208-.271c-.197-.27-.38-.526-.555-.775l-.006.028-.002-.003c-.076.323-.148.632-.186.8zm5.77 2.978c1.143.605 1.832.632 2.054.187.26-.519-.087-1.034-1.113-1.473-.911-.39-2.175-.608-3.55-.608.845.766 1.787 1.459 2.609 1.894zM6.559 18.789c.14.223.693.16 1.425-.413.827-.648 1.61-1.747 2.208-3.206-2.563 1.064-4.102 2.867-3.633 3.62zm5.345-10.97c.088-1.793-.351-2.48-1.146-2.28-.473.119-.564 1.05-.056 2.405.213.566.52 1.188.908 1.859.18-.858.268-1.453.294-1.984z\",fill:\"#E2514A\",fillRule:\"nonzero\"}))}o(GS,\"iconPDF\");function KS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"path\",{d:\"M10.45 2.05h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V2.55a.5.5 0 0 1 .5-.5zm2.05 1.024h1.05a.5.5 0 0 1 .5.5V3.6a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5v-.001zM10.45 0h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5V.5a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 3.074h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-2.05 1.024h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm-2.05 1.025h1.05a.5.5 0 0 1 .5.5v.025a.5.5 0 0 1-.5.5h-1.05a.5.5 0 0 1-.5-.5v-.025a.5.5 0 0 1 .5-.5zm2.05 1.025h1.05a.5.5 0 0 1 .5.5v.024a.5.5 0 0 1-.5.5H12.5a.5.5 0 0 1-.5-.5v-.024a.5.5 0 0 1 .5-.5zm-1.656 3.074l-.82 5.946c.52.302 1.174.458 1.976.458.803 0 1.455-.156 1.975-.458l-.82-5.946h-2.311zm0-1.025h2.312c.512 0 .946.378 1.015.885l.82 5.946c.056.412-.142.817-.501 1.026-.686.398-1.515.597-2.49.597-.974 0-1.804-.199-2.49-.597a1.025 1.025 0 0 1-.5-1.026l.819-5.946c.07-.507.503-.885 1.015-.885zm.545 6.6a.5.5 0 0 1-.397-.561l.143-.999a.5.5 0 0 1 .495-.429h.74a.5.5 0 0 1 .495.43l.143.998a.5.5 0 0 1-.397.561c-.404.08-.819.08-1.222 0z\",fill:\"#00C469\",fillRule:\"nonzero\"}))}o(KS,\"iconArchive\");
2function XS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"g\",{fill:\"#A7AFB7\",fillRule:\"nonzero\"},c(\"path\",{d:\"M5.5 22a.5.5 0 0 1-.5-.5v-18a.5.5 0 0 1 .5-.5h10.719a.5.5 0 0 1 .367.16l3.281 3.556a.5.5 0 0 1 .133.339V21.5a.5.5 0 0 1-.5.5h-14zm.5-1h13V7.25L16 4H6v17z\"}),c(\"path\",{d:\"M15 4v3a1 1 0 0 0 1 1h3V7h-3V4h-1z\"})))}o(XS,\"iconFile\");function YS(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"25\",height:\"25\",viewBox:\"0 0 25 25\"},c(\"path\",{d:\"M4.5 7h13a.5.5 0 1 1 0 1h-13a.5.5 0 0 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h15a.5.5 0 1 1 0 1h-15a.5.5 0 1 1 0-1zm0 3h10a.5.5 0 1 1 0 1h-10a.5.5 0 1 1 0-1z\",fill:\"#5A5E69\",fillRule:\"nonzero\"}))}o(YS,\"iconText\");function gs(r){let e={color:\"#838999\",icon:XS()};if(!r)return e;let t=r.split(\"/\")[0],i=r.split(\"/\")[1];return t===\"text\"?{color:\"#5a5e69\",icon:YS()}:t===\"image\"?{color:\"#686de0\",icon:$S()}:t===\"audio\"?{color:\"#068dbb\",icon:VS()}:t===\"video\"?{color:\"#19af67\",icon:WS()}:t===\"application\"&&i===\"pdf\"?{color:\"#e25149\",icon:GS()}:t===\"application\"&&[\"zip\",\"x-7z-compressed\",\"x-zip-compressed\",\"x-rar-compressed\",\"x-tar\",\"x-gzip\",\"x-apple-diskimage\"].indexOf(i)!==-1?{color:\"#00C469\",icon:KS()}:e}o(gs,\"getIconByMime\");function $n(r){let{file:e}=r;if(e.preview)return c(\"img\",{className:\"uppy-Dashboard-Item-previewImg\",alt:e.name,src:e.preview});let{color:t,icon:i}=gs(e.type);return c(\"div\",{className:\"uppy-Dashboard-Item-previewIconWrap\"},c(\"span\",{className:\"uppy-Dashboard-Item-previewIcon\",style:{color:t}},i),c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-Dashboard-Item-previewIconBg\",width:\"58\",height:\"76\",viewBox:\"0 0 58 76\"},c(\"rect\",{fill:\"#FFF\",width:\"58\",height:\"76\",rx:\"3\",fillRule:\"evenodd\"})))}o($n,\"FilePreview\");var JS=o((r,e)=>(typeof e==\"function\"?e():e).filter(s=>s.id===r)[0].name,\"metaFieldIdToName\");function Vn(r){let{file:e,toggleFileCard:t,i18n:i,metaFields:s}=r,{missingRequiredMetaFields:n}=e;if(!(n!=null&&n.length))return null;let a=n.map(l=>JS(l,s)).join(\", \");return c(\"div\",{className:\"uppy-Dashboard-Item-errorMessage\"},i(\"missingRequiredMetaFields\",{smart_count:n.length,fields:a}),\" \",c(\"button\",{type:\"button\",class:\"uppy-u-reset uppy-Dashboard-Item-errorMessageBtn\",onClick:o(()=>t(!0,e.id),\"onClick\")},i(\"editFile\")))}o(Vn,\"MetaErrorMessage\");function uh(r){let{file:e,i18n:t,toggleFileCard:i,metaFields:s,showLinkToFileUploadResult:n}=r,l=e.preview?\"rgba(255, 255, 255, 0.5)\":gs(e.type).color;return c(\"div\",{className:\"uppy-Dashboard-Item-previewInnerWrap\",style:{backgroundColor:l}},n&&e.uploadURL&&c(\"a\",{className:\"uppy-Dashboard-Item-previewLink\",href:e.uploadURL,rel:\"noreferrer noopener\",target:\"_blank\",\"aria-label\":e.meta.name},c(\"span\",{hidden:!0},e.meta.name)),c($n,{file:e}),c(Vn,{file:e,i18n:t,toggleFileCard:i,metaFields:s}))}o(uh,\"FilePreviewAndLink\");function QS(r){if(!r.isUploaded){if(r.error&&!r.hideRetryButton){r.uppy.retryUpload(r.file.id);return}r.resumableUploads&&!r.hidePauseResumeButton?r.uppy.pauseResume(r.file.id):r.individualCancellation&&!r.hideCancelButton&&r.uppy.removeFile(r.file.id)}}o(QS,\"onPauseResumeCancelRetry\");function qg(r){return r.isUploaded?r.i18n(\"uploadComplete\"):r.error?r.i18n(\"retryUpload\"):r.resumableUploads?r.file.isPaused?r.i18n(\"resumeUpload\"):r.i18n(\"pauseUpload\"):r.individualCancellation?r.i18n(\"cancelUpload\"):\"\"}o(qg,\"progressIndicatorTitle\");function ch(r){return c(\"div\",{className:\"uppy-Dashboard-Item-progress\"},c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-progressIndicator\",type:\"button\",\"aria-label\":qg(r),title:qg(r),onClick:o(()=>QS(r),\"onClick\")},r.children))}o(ch,\"ProgressIndicatorButton\");function lu(r){let{children:e}=r;return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"70\",height:\"70\",viewBox:\"0 0 36 36\",className:\"uppy-c-icon uppy-Dashboard-Item-progressIcon--circle\"},e)}o(lu,\"ProgressCircleContainer\");function hh(r){let{progress:e}=r,t=2*Math.PI*15;
2return c(\"g\",null,c(\"circle\",{className:\"uppy-Dashboard-Item-progressIcon--bg\",r:\"15\",cx:\"18\",cy:\"18\",\"stroke-width\":\"2\",fill:\"none\"}),c(\"circle\",{className:\"uppy-Dashboard-Item-progressIcon--progress\",r:\"15\",cx:\"18\",cy:\"18\",transform:\"rotate(-90, 18, 18)\",fill:\"none\",\"stroke-width\":\"2\",\"stroke-dasharray\":t,\"stroke-dashoffset\":t-t/100*e}))}o(hh,\"ProgressCircle\");function dh(r){return!r.file.progress.uploadStarted||r.file.progress.percentage===void 0?null:r.isUploaded?c(\"div\",{className:\"uppy-Dashboard-Item-progress\"},c(\"div\",{className:\"uppy-Dashboard-Item-progressIndicator\"},c(lu,null,c(\"circle\",{r:\"15\",cx:\"18\",cy:\"18\",fill:\"#1bb240\"}),c(\"polygon\",{className:\"uppy-Dashboard-Item-progressIcon--check\",transform:\"translate(2, 3)\",points:\"14 22.5 7 15.2457065 8.99985857 13.1732815 14 18.3547104 22.9729883 9 25 11.1005634\"})))):r.recoveredState?null:r.error&&!r.hideRetryButton?c(ch,r,c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon uppy-Dashboard-Item-progressIcon--retry\",width:\"28\",height:\"31\",viewBox:\"0 0 16 19\"},c(\"path\",{d:\"M16 11a8 8 0 1 1-8-8v2a6 6 0 1 0 6 6h2z\"}),c(\"path\",{d:\"M7.9 3H10v2H7.9z\"}),c(\"path\",{d:\"M8.536.5l3.535 3.536-1.414 1.414L7.12 1.914z\"}),c(\"path\",{d:\"M10.657 2.621l1.414 1.415L8.536 7.57 7.12 6.157z\"}))):r.resumableUploads&&!r.hidePauseResumeButton?c(ch,r,c(lu,null,c(hh,{progress:r.file.progress.percentage}),r.file.isPaused?c(\"polygon\",{className:\"uppy-Dashboard-Item-progressIcon--play\",transform:\"translate(3, 3)\",points:\"12 20 12 10 20 15\"}):c(\"g\",{className:\"uppy-Dashboard-Item-progressIcon--pause\",transform:\"translate(14.5, 13)\"},c(\"rect\",{x:\"0\",y:\"0\",width:\"2\",height:\"10\",rx:\"0\"}),c(\"rect\",{x:\"5\",y:\"0\",width:\"2\",height:\"10\",rx:\"0\"})))):!r.resumableUploads&&r.individualCancellation&&!r.hideCancelButton?c(ch,r,c(lu,null,c(hh,{progress:r.file.progress.percentage}),c(\"polygon\",{className:\"cancel\",transform:\"translate(2, 2)\",points:\"19.8856516 11.0625 16 14.9481516 12.1019737 11.0625 11.0625 12.1143484 14.9481516 16 11.0625 19.8980263 12.1019737 20.9375 16 17.0518484 19.8856516 20.9375 20.9375 19.8980263 17.0518484 16 20.9375 12\"}))):c(\"div\",{className:\"uppy-Dashboard-Item-progress\"},c(\"div\",{className:\"uppy-Dashboard-Item-progressIndicator\"},c(lu,null,c(hh,{progress:r.file.progress.percentage}))))}o(dh,\"FileProgress\");var $g=ve(sn(),1);var ph=\"...\";function uu(r,e){if(e===0)return\"\";if(r.length<=e)return r;if(e<=ph.length+1)return`${r.slice(0,e-1)}\\u2026`;let t=e-ph.length,i=Math.ceil(t/2),s=Math.floor(t/2);return r.slice(0,i)+ph+r.slice(-s)}o(uu,\"truncateString\");var ZS=o(r=>{let{author:e,name:t}=r.file.meta;function i(){return r.isSingleFile&&r.containerHeight>=350?90:r.containerWidth<=352?35:r.containerWidth<=576?60:e?20:30}return o(i,\"getMaxNameLength\"),c(\"div\",{className:\"uppy-Dashboard-Item-name\",title:t},uu(t,i()))},\"renderFileName\"),e2=o(r=>{var e;let{author:t}=r.file.meta,i=(e=r.file.remote)==null?void 0:e.providerName,s=\"\\xB7\";return t?c(\"div\",{className:\"uppy-Dashboard-Item-author\"},c(\"a\",{href:`${t.url}?utm_source=Companion&utm_medium=referral`,target:\"_blank\",rel:\"noopener noreferrer\"},uu(t.name,13)),i?c(Fragment,null,` ${s} `,i,` ${s} `):null):null},\"renderAuthor\"),t2=o(r=>r.file.size&&c(\"div\",{className:\"uppy-Dashboard-Item-statusSize\"},(0,$g.default)(r.file.size)),\"renderFileSize\"),r2=o(r=>r.file.isGhost&&c(\"span\",null,\" \\u2022 \",c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-reSelect\",type:\"button\",onClick:o(()=>r.toggleAddFilesPanel(!0),\"onClick\")},r.i18n(\"reSelect\"))),\"ReSelectButton\"),i2=o(r=>{let{file:e,onClick:t}=r;return e.error?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-errorDetails\",\"aria-label\":e.error,\"data-microtip-position\":\"bottom\",\"data-microtip-size\":\"medium\",onClick:t,type:\"button\"},\"?\"):null},\"ErrorButton\");function fh(r){let{file:e,i18n:t,toggleFileCard:i,metaFields:s,toggleAddFilesPanel:n,isSingleFile:a,containerHeight:l,containerWidth:u}=r;return c(\"div\",{className:\"uppy-Dashboard-Item-fileInfo\",\"data-uppy-file-source\":e.source},c(\"div\",{className:\"uppy-Dashboard-Item-fileName\"},ZS({file:e,isSingleFile:a,containerHeight:l,containerWidth:u}),c(i2,{file:e,onClick:o(()=>alert(e.error),\"onClick\")})),c(\"div\",{className:\"uppy-Dashboard-Item-status\"},e2({file:e}),t2({file:e}),r2({file:e,toggleAddFilesPanel:n,i18n:t})),c(Vn,{file:e,i18n:t,toggleFileCard:i,metaFields:s}))}o(fh,\"FileInfo\");function mh(r,e){return e===void 0&&(e=\"Copy the URL below\"),new Promise(t=>{let i=document.createElement(\"textarea\");i.setAttribute(\"style\",{position:\"fixed\",top:0,left:0,width:\"2em\",height:\"2em\",padding:0,border:\"none\",outline:\"none\",boxShadow:\"none\",background:\"transparent\"}),i.value=r,document.body.appendChild(i),i.select();let s=o(()=>{document.body.removeChild(i),window.prompt(e,r),t()},\"magicCopyFailed\");try{return document.execCommand(\"copy\")?(document.body.removeChild(i),t()):s()}catch{return document.body.removeChild(i),s()}})}o(mh,\"copyToClipboard\");function s2(r){let{file:e,uploadInProgressOrComplete:t,metaFields:i,canEditFile:s,i18n:n,onClick:a}=r;return!t&&i&&i.length>0||!t&&s(e)?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-Item-action uppy-Dashboard-Item-action--edit\",type:\"button\",\"aria-label\":n(\"editFileWithFilename\",{file:e.meta.name}),title:n(\"editFileWithFilename\",{file:e.meta.name}),onClick:o(()=>a(),\"onClick\")}
2,c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"14\",height:\"14\",viewBox:\"0 0 14 14\"},c(\"g\",{fillRule:\"evenodd\"},c(\"path\",{d:\"M1.5 10.793h2.793A1 1 0 0 0 5 10.5L11.5 4a1 1 0 0 0 0-1.414L9.707.793a1 1 0 0 0-1.414 0l-6.5 6.5A1 1 0 0 0 1.5 8v2.793zm1-1V8L9 1.5l1.793 1.793-6.5 6.5H2.5z\",fillRule:\"nonzero\"}),c(\"rect\",{x:\"1\",y:\"12.293\",width:\"11\",height:\"1\",rx:\".5\"}),c(\"path\",{fillRule:\"nonzero\",d:\"M6.793 2.5L9.5 5.207l.707-.707L7.5 1.793z\"})))):null}o(s2,\"EditButton\");function o2(r){let{i18n:e,onClick:t,file:i}=r;return c(\"button\",{className:\"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--remove\",type:\"button\",\"aria-label\":e(\"removeFile\",{file:i.meta.name}),title:e(\"removeFile\",{file:i.meta.name}),onClick:o(()=>t(),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"18\",height:\"18\",viewBox:\"0 0 18 18\"},c(\"path\",{d:\"M9 0C4.034 0 0 4.034 0 9s4.034 9 9 9 9-4.034 9-9-4.034-9-9-9z\"}),c(\"path\",{fill:\"#FFF\",d:\"M13 12.222l-.778.778L9 9.778 5.778 13 5 12.222 8.222 9 5 5.778 5.778 5 9 8.222 12.222 5l.778.778L9.778 9z\"})))}o(o2,\"RemoveButton\");function n2(r){let{file:e,uppy:t,i18n:i}=r,s=o(n=>{mh(e.uploadURL,i(\"copyLinkToClipboardFallback\")).then(()=>{t.log(\"Link copied to clipboard.\"),t.info(i(\"copyLinkToClipboardSuccess\"),\"info\",3e3)}).catch(t.log).then(()=>n.target.focus({preventScroll:!0}))},\"copyLinkToClipboard\");return c(\"button\",{className:\"uppy-u-reset uppy-Dashboard-Item-action uppy-Dashboard-Item-action--copyLink\",type:\"button\",\"aria-label\":i(\"copyLink\"),title:i(\"copyLink\"),onClick:o(n=>s(n),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"14\",height:\"14\",viewBox:\"0 0 14 12\"},c(\"path\",{d:\"M7.94 7.703a2.613 2.613 0 0 1-.626 2.681l-.852.851a2.597 2.597 0 0 1-1.849.766A2.616 2.616 0 0 1 2.764 7.54l.852-.852a2.596 2.596 0 0 1 2.69-.625L5.267 7.099a1.44 1.44 0 0 0-.833.407l-.852.851a1.458 1.458 0 0 0 1.03 2.486c.39 0 .755-.152 1.03-.426l.852-.852c.231-.231.363-.522.406-.824l1.04-1.038zm4.295-5.937A2.596 2.596 0 0 0 10.387 1c-.698 0-1.355.272-1.849.766l-.852.851a2.614 2.614 0 0 0-.624 2.688l1.036-1.036c.041-.304.173-.6.407-.833l.852-.852c.275-.275.64-.426 1.03-.426a1.458 1.458 0 0 1 1.03 2.486l-.852.851a1.442 1.442 0 0 1-.824.406l-1.04 1.04a2.596 2.596 0 0 0 2.683-.628l.851-.85a2.616 2.616 0 0 0 0-3.697zm-6.88 6.883a.577.577 0 0 0 .82 0l3.474-3.474a.579.579 0 1 0-.819-.82L5.355 7.83a.579.579 0 0 0 0 .819z\"})))}o(n2,\"CopyLinkButton\");function gh(r){let{uppy:e,file:t,uploadInProgressOrComplete:i,canEditFile:s,metaFields:n,showLinkToFileUploadResult:a,showRemoveButton:l,i18n:u,toggleFileCard:h,openFileEditor:d}=r;return c(\"div\",{className:\"uppy-Dashboard-Item-actionWrapper\"},c(s2,{i18n:u,file:t,uploadInProgressOrComplete:i,canEditFile:s,metaFields:n,onClick:o(()=>{n&&n.length>0?h(!0,t.id):d(t)},\"editAction\")}),a&&t.uploadURL?c(n2,{file:t,uppy:e,i18n:u}):null,l?c(o2,{i18n:u,file:t,onClick:o(()=>e.removeFile(t.id),\"onClick\")}):null)}o(gh,\"Buttons\");var Wn=class extends Ue{static{o(this,\"FileItem\")}componentDidMount(){let{file:e}=this.props;
vendor: 2,623 bytes, line 2
2e.preview||this.props.handleRequestThumbnail(e)}shouldComponentUpdate(e){return!Hg(this.props,e)}componentDidUpdate(){let{file:e}=this.props;e.preview||this.props.handleRequestThumbnail(e)}componentWillUnmount(){let{file:e}=this.props;e.preview||this.props.handleCancelThumbnail(e)}render(){let{file:e}=this.props,t=e.progress.preprocess||e.progress.postprocess,i=!!e.progress.uploadComplete&&!t&&!e.error,s=!!e.progress.uploadStarted||!!t,n=e.progress.uploadStarted&&!e.progress.uploadComplete||t,a=e.error||!1,{isGhost:l}=e,u=(this.props.individualCancellation||!n)&&!i;i&&this.props.showRemoveButtonAfterComplete&&(u=!0);let h=(0,Vg.default)({\"uppy-Dashboard-Item\":!0,\"is-inprogress\":n&&!this.props.recoveredState,\"is-processing\":t,\"is-complete\":i,\"is-error\":!!a,\"is-resumable\":this.props.resumableUploads,\"is-noIndividualCancellation\":!this.props.individualCancellation,\"is-ghost\":l});return c(\"div\",{className:h,id:`uppy_${e.id}`,role:this.props.role},c(\"div\",{className:\"uppy-Dashboard-Item-preview\"},c(uh,{file:e,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,i18n:this.props.i18n,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields}),c(dh,{uppy:this.props.uppy,file:e,error:a,isUploaded:i,hideRetryButton:this.props.hideRetryButton,hideCancelButton:this.props.hideCancelButton,hidePauseResumeButton:this.props.hidePauseResumeButton,recoveredState:this.props.recoveredState,resumableUploads:this.props.resumableUploads,individualCancellation:this.props.individualCancellation,i18n:this.props.i18n})),c(\"div\",{className:\"uppy-Dashboard-Item-fileInfoAndButtons\"},c(fh,{file:e,containerWidth:this.props.containerWidth,containerHeight:this.props.containerHeight,i18n:this.props.i18n,toggleAddFilesPanel:this.props.toggleAddFilesPanel,toggleFileCard:this.props.toggleFileCard,metaFields:this.props.metaFields,isSingleFile:this.props.isSingleFile}),c(gh,{file:e,metaFields:this.props.metaFields,showLinkToFileUploadResult:this.props.showLinkToFileUploadResult,showRemoveButton:u,canEditFile:this.props.canEditFile,uploadInProgressOrComplete:s,toggleFileCard:this.props.toggleFileCard,openFileEditor:this.props.openFileEditor,uppy:this.props.uppy,i18n:this.props.i18n})))}};function a2(r,e){let t=[],i=[];return r.forEach(s=>{i.length<e?i.push(s):(t.push(i),i=[s])}),i.length&&t.push(i),t}o(a2,\"chunks\");function yh(r){let{id:e,i18n:t,uppy:i,files:s,resumableUploads:n,hideRetryButton:a,hidePauseResumeButton:l,hideCancelButton:u,showLinkToFileUploadResult:h,showRemoveButtonAfterComplete:d,metaFields:m,isSingleFile:w,toggleFileCard:y,handleRequestThumbn
2ail:P,handleCancelThumbnail:D,recoveredState:C,individualCancellation:O,itemsPerRow:z,openFileEditor:X,canEditFile:K,toggleAddFilesPanel:Z,containerWidth:$,containerHeight:W}=r,te=z===1?71:200,se=us(()=>{let je=o((xe,De)=>Number(s[De].isGhost)-Number(s[xe].isGhost),\"sortByGhostComesFirst\"),He=Object.keys(s);return C&&He.sort(je),a2(He,z)},[s,z,C]),Ae=o(je=>c(\"div\",{class:\"uppy-Dashboard-filesInner\",role:\"presentation\",key:je[0]},je.map(He=>c(Wn,{key:He,uppy:i,id:e,i18n:t,resumableUploads:n,individualCancellation:O,hideRetryButton:a,hidePauseResumeButton:l,hideCancelButton:u,showLinkToFileUploadResult:h,showRemoveButtonAfterComplete:d,metaFields:m,recoveredState:C,isSingleFile:w,containerWidth:$,containerHeight:W,toggleFileCard:y,handleRequestThumbnail:P,handleCancelThumbnail:D,role:\"listitem\",openFileEditor:X,canEditFile:K,toggleAddFilesPanel:Z,file:s[He]}))),\"renderRow\");return w?c(\"div\",{class:\"uppy-Dashboard-files\"},Ae(se[0])):c(Ml,{class:\"uppy-Dashboard-files\",role:\"list\",data:se,renderRow:Ae,rowHeight:te})}o(yh,\"FileList\");var vh=class extends Ue{static{o(this,\"AddFiles\")}constructor(){super(...arguments),this.fileInput=null,this.folderInput=null,this.mobilePhotoFileInput=null,this.mobileVideoFileInput=null,this.triggerFileInputClick=()=>{var e;(e=this.fileInput)==null||e.click()},this.triggerFolderInputClick=()=>{var e;(e=this.folderInput)==null||e.click()},this.triggerVideoCameraInputClick=()=>{var e;(e=this.mobileVideoFileInput)==null||e.click()},this.triggerPhotoCameraInputClick=()=>{var e;(e=this.mobilePhotoFileInput)==null||e.click()},this.onFileInputChange=e=>{this.props.handleInputChange(e),e.currentTarget.value=\"\"},this.renderHiddenInput=(e,t)=>{var i;return c(\"input\",{className:\"uppy-Dashboard-input\",hidden:!0,\"aria-hidden\":\"true\",tabIndex:-1,webkitdirectory:e,type:\"file\",name:\"files[]\",multiple:this.props.maxNumberOfFiles!==1,onChange:this.onFileInputChange,accept:(i=this.props.allowedFileTypes)==null?void 0:i.join(\", \"),ref:t})},this.renderHiddenCameraInput=(e,t,i)=>{let n={photo:\"image/*\",video:\"video/*\"}[e];return c(\"input\",{className:\"uppy-Dashboard-input\",hidden:!0,\"aria-hidden\":\"true\",tabIndex:-1,type:\"file\",name:`camera-${e}`,onChange:this.onFileInputChange,capture:t,accept:n,ref:i})},this.renderMyDeviceAcquirer=()=>c(\"div\",{className:\"uppy-DashboardTab\",role:\"presentation\",\"data-uppy-acquirer-id\":\"MyDevice\"},c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",role:\"tab\",tabIndex:0,\"data-uppy-super-focusable\":!0,onClick:this.triggerFileInputClick},c(\"div\",{className:\"uppy-DashboardTab-inner\"},c(\"svg\",{className:\"uppy-DashboardTab-iconMyDevice\",\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M8.45 22.087l-1.305-6.674h17.678l-1.572 6.674H8.45zm4.975-12.412l1.083 1.765a.823.823 0 00.715.386h7.951V13.5H8.587V9.675h4.838zM26.043 13.5h-1.195v-2.598c0-.463-.336-.75-.798-.75h-8.356l-1.082-1.766A.823.823 0 0013.897 8H7.728c-.462 0-.815.256-.815.718V13.5h-.956a.97.97 0 00-.746.37.972.972 0 00-.19.81l1.724 8.565c.095.44.484.755.933.755H24c.44 0 .824-.3.929-.727l2.043-8.568a.972.972 0 00-.176-.825.967.967 0 00-.753-.38z\",fill:\"currentcolor\",\"fill-rule\":\"evenodd\"}))),c(\"div\",{className:\"uppy-DashboardTab-name\"},this.props.i18n(\"myDevice\")))),this.renderPhotoCamera=()=>c(\"div\",{className:\"uppy-DashboardTab\",role:\"presentation\",\"data-uppy-acquirer-id\":\"MobilePhotoCamera\"},c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",role:\"tab\",tabIndex:0,\"data-uppy-super-focusable\":!0,onClick:this.triggerPhotoCameraInputClick},c(\"div\",{className:\"uppy-DashboardTab-inner\"},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z\",fill:\"#02B383\",\"fill-rule\":\"nonzero\"}))),c(\"div\",{className:\"uppy-DashboardTab-name\"},this.props.i18n(\"takePictureBtn\")))),this.renderVideoCamera=()=>c(\"div\",{className:\"uppy-DashboardTab\",role:\"presentation\",\"data-uppy-acquirer-id\":\"MobileVideoCamera\"},c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",role:\"tab\",tabIndex:0,\"data-uppy-super-focusable\":!0,onClick:this.triggerVideoCameraInputClick},c(\"div\",{className:\"uppy-DashboardTab-inner\"},c(\"svg\",{\"aria-hidden\":\"true\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{fill:\"#FF675E\",fillRule:\"nonzero\",d:\"m21.254 14.277 2.941-2.588c.797-.313 1.243.818 1.09 1.554-.01 2.094.02 4.189-.017 6.282-.126.915-1.145 1.08-1.58.34l-2.434-2.142c-.192.287-.504 1.305-.738.468-.104-1.293-.028-2.596-.05-3.894.047-.312.381.823.426 1.069.063-.384.206-.744.362-1.09zm-12.939-3.73c3.858.013 7.717-.025 11.574.02.912.129 1.492 1.237 1.351 2.217-.019 2.412.04 4.83-.03 7.239-.17 1.025-1.166 1.59-2.029 1.429-3.705-.012-7.41.025-11.114-.019-.913-.129-1.492-1.237-1.352-2.217.018-2.404-.036-4.813.029-7.214.136-.82.83-1.473 1.571-1.454z \"}))),c(\"div\",{className:\"uppy-DashboardTab-name\"},this.props.i18n(\"recordVideoBtn\")))),this.renderBrowseButton=(e,t)=>{let i=this.props.acquirers.length;return c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-browse\",onClick:t,\"data-uppy-super-focusable\":i===0},e)},this.renderDropPasteBrowseTagline=e=>{let t=this.renderBrowseButton(this.props.i18n(\"browseFiles\"),this.triggerFileInputClick),i=this.renderBrowseButton(this.props.i18n(\"browseFolders\"),this.triggerFolderInputClick),s=this.props.fileManagerSelectionType,n=s.charAt(0).toUpperCase()+s.slice(1);return c(\"div\",{class:\"uppy-Dashboard-AddFiles-title\"},this.props.disableLocalFiles?this.props.i18n(\"importFiles\"):e>0?this.props.i18nArray(`dropPasteImport${n}`,{browseFiles:t,browseFolders:i,browse:t}):this.props.i18nArray(`dropPaste${n}`,{browseFiles:t,browseFolders:i,browse:t}))},this.renderAcquirer=e=>{var t;return c(\"div\",{className:\"uppy-DashboardTab\",role:\"presentation\",\"data-uppy-acquirer-id\":e.id},c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-DashboardTab-btn\",role:\"tab\",tabIndex:0,\"data-cy\":e.id,\"aria-controls\":`uppy-DashboardContent-panel--${e.id}`,\"aria-selected\":((t=this.props.activePickerPanel)==null?void 0:t.id)===e.id,\"data-uppy-super-focusable\":!0,onClick:o(()=>this.props.showPanel(e.id),\"onClick\")},c(\"div\",{className:\"uppy-DashboardTab-inner\"},e.icon()),c(\"div\",{className:\"uppy-DashboardTab-name\"},e.name)))},this.renderAcquirers=e=>{let t=[...e],i=t.splice(e.length-2,e.length);return c(Jt,null,t.map(s=>this.renderAcquirer(s)),c(\"span\",{role:\"presentation\",style:{\"white-space\":\"nowrap\"}},i.map(s=>this.renderAcquirer(s))))},this.renderSourcesList=(e,t)=>
2{let{showNativePhotoCameraButton:i,showNativeVideoCameraButton:s}=this.props,n=[],a=\"myDevice\";t||n.push({key:a,elements:this.renderMyDeviceAcquirer()}),i&&n.push({key:\"nativePhotoCameraButton\",elements:this.renderPhotoCamera()}),s&&n.push({key:\"nativePhotoCameraButton\",elements:this.renderVideoCamera()}),n.push(...e.map(d=>({key:d.id,elements:this.renderAcquirer(d)}))),n.length===1&&n[0].key===a&&(n=[]);let u=[...n],h=u.splice(n.length-2,n.length);return c(Jt,null,this.renderDropPasteBrowseTagline(n.length),c(\"div\",{className:\"uppy-Dashboard-AddFiles-list\",role:\"tablist\"},u.map(d=>{let{key:m,elements:w}=d;return c(Jt,{key:m},w)}),c(\"span\",{role:\"presentation\",style:{\"white-space\":\"nowrap\"}},h.map(d=>{let{key:m,elements:w}=d;return c(Jt,{key:m},w)}))))}}[Symbol.for(\"uppy test: disable unused locale key warning\")](){this.props.i18nArray(\"dropPasteBoth\"),this.props.i18nArray(\"dropPasteFiles\"),this.props.i18nArray(\"dropPasteFolders\"),this.props.i18nArray(\"dropPasteImportBoth\"),this.props.i18nArray(\"dropPasteImportFiles\"),this.props.i18nArray(\"dropPasteImportFolders\")}renderPoweredByUppy(){let{i18nArray:e}=this.props,t=c(\"span\",null,c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon uppy-Dashboard-poweredByIcon\",width:\"11\",height:\"11\",viewBox:\"0 0 11 11\"},c(\"path\",{d:\"M7.365 10.5l-.01-4.045h2.612L5.5.806l-4.467 5.65h2.604l.01 4.044h3.718z\",fillRule:\"evenodd\"})),c(\"span\",{className:\"uppy-Dashboard-poweredByUppy\"},\"Uppy\")),i=e(\"poweredBy\",{uppy:t});return c(\"a\",{tabIndex:-1,href:\"https://uppy.io\",rel:\"noreferrer noopener\",target:\"_blank\",className:\"uppy-Dashboard-poweredBy\"},i)}render(){let{showNativePhotoCameraButton:e,showNativeVideoCameraButton:t,nativeCameraFacingMode:i}=this.props;return c(\"div\",{className:\"uppy-Dashboard-AddFiles\"},this.renderHiddenInput(!1,s=>{this.fileInput=s}),this.renderHiddenInput(!0,s=>{this.folderInput=s}),e&&this.renderHiddenCameraInput(\"photo\",i,s=>{this.mobilePhotoFileInput=s}),t&&this.renderHiddenCameraInput(\"video\",i,s=>{this.mobileVideoFileInput=s}),this.renderSourcesList(this.props.acquirers,this.props.disableLocalFiles),c(\"div\",{className:\"uppy-Dashboard-AddFiles-info\"},this.props.note&&c(\"div\",{className:\"uppy-Dashboard-note\"},this.props.note),this.props.proudlyDisplayPoweredByUppy&&this.renderPoweredByUppy()))}},cu=vh;var Wg=ve(kt(),1);var l2=o(r=>c(\"div\",{className:(0,Wg.default)(\"uppy-Dashboard-AddFilesPanel\",r.className),\"data-uppy-panelType\":\"AddFiles\",\"aria-hidden\":!r.showAddFilesPanel},c(\"div\",{className:\"uppy-DashboardContent-bar\"},c(\"div\",{className:\"uppy-DashboardContent-title\",role:\"heading\",\"aria-level\":\"1\"},r.i18n(\"addingMoreFiles\")),c(\"button\",{className:\"uppy-DashboardContent-back\",type:\"button\",onClick:o(()=>r.toggleAddFilesPanel(!1),\"onClick\")},r.i18n(\"back\"))),c(cu,r)),\"AddFilesPanel\"),Gg=l2;var Kg=ve(kt(),1);function u2(r){let{tagName:e}=r.target;if(e===\"INPUT\"||e===\"TEXTAREA\"){r.stopPropagation();return}r.preventDefault(),r.stopPropagation()}o(u2,\"ignoreEvent\");var Mr=u2;function c2(r){let{activePickerPanel:e,className:t,hideAllPanels:i,i18n:s,state:n,uppy:a}=r,l=ri(null);return c(\"div\",{className:(0,Kg.default)(\"uppy-DashboardContent-panel\",t),role:\"tabpanel\",\"data-uppy-panelType\":\"PickerPanel\",id:`uppy-DashboardContent-panel--${e.id}`,onDragOver:Mr,onDragLeave:Mr,onDrop:Mr,onPaste:Mr},c(\"div\",{className:\"uppy-DashboardContent-bar\"},c(\"div\",{className:\"uppy-DashboardContent-title\",role:\"heading\",\"aria-level\":\"1\"},s(\"importFrom\",{name:e.name})),c(\"button\",{className:\"uppy-DashboardContent-back\",type:\"button\",onClick:i},s(\"cancel\"))),c(\"div\",{ref:l,className:\"uppy-DashboardContent-panelBody\"},a.getPlugin(e.id).render(n,l.current)))}o(c2,\"PickerPanelContent\");var Xg=c2;var Yg=ve(kt(),1);function h2(r){let e=r.files[r.fileCardFor],t=o(()=>{r.uppy.emit(\"file-editor:cancel\",e),r.closeFileEditor()},\"handleCancel\");return c(\"div\",{className:(0,Yg.default)(\"uppy-DashboardContent-panel\",r.className),role:\"tabpanel\",\"data-uppy-panelType\":\"FileEditor\",id:\"uppy-DashboardContent-panel--editor\"},c(\"div\",{className:\"uppy-DashboardContent-bar\"},c(\"div\",{className:\"uppy-DashboardContent-title\",role:\"heading\",\"aria-level\":\"1\"},r.i18nArray(\"editing\",{file:c(\"span\",{className:\"uppy-DashboardContent-titleFile\"},e.meta?e.meta.name:e.name)}
2)),c(\"button\",{className:\"uppy-DashboardContent-back\",type:\"button\",onClick:t},r.i18n(\"cancel\")),c(\"button\",{className:\"uppy-DashboardContent-save\",type:\"button\",onClick:r.saveFileEditor},r.i18n(\"save\"))),c(\"div\",{className:\"uppy-DashboardContent-panelBody\"},r.editors.map(i=>r.uppy.getPlugin(i.id).render(r.state))))}o(h2,\"EditorPanel\");var Jg=h2;var Br={STATE_ERROR:\"error\",STATE_WAITING:\"waiting\",STATE_PREPROCESSING:\"preprocessing\",STATE_UPLOADING:\"uploading\",STATE_POSTPROCESSING:\"postprocessing\",STATE_COMPLETE:\"complete\",STATE_PAUSED:\"paused\"};function d2(r,e,t,i){if(i===void 0&&(i={}),r)return Br.STATE_ERROR;if(e)return Br.STATE_COMPLETE;if(t)return Br.STATE_PAUSED;let s=Br.STATE_WAITING,n=Object.keys(i);for(let a=0;a<n.length;a++){let{progress:l}=i[n[a]];if(l.uploadStarted&&!l.uploadComplete)return Br.STATE_UPLOADING;l.preprocess&&s!==Br.STATE_UPLOADING&&(s=Br.STATE_PREPROCESSING),l.postprocess&&s!==Br.STATE_UPLOADING&&s!==Br.STATE_PREPROCESSING&&(s=Br.STATE_POSTPROCESSING)}return s}o(d2,\"getUploadingState\");function p2(r){let{files:e,i18n:t,isAllComplete:i,isAllErrored:s,isAllPaused:n,inProgressNotPausedFiles:a,newFiles:l,processingFiles:u}=r;switch(d2(s,i,n,e)){case\"uploading\":return t(\"uploadingXFiles\",{smart_count:a.length});case\"preprocessing\":case\"postprocessing\":return t(\"processingXFiles\",{smart_count:u.length});case\"paused\":return t(\"uploadPaused\");case\"waiting\":return t(\"xFilesSelected\",{smart_count:l.length});case\"complete\":return t(\"uploadComplete\");case\"error\":return t(\"error\");default:}}o(p2,\"UploadStatus\");function f2(r){let{i18n:e,isAllComplete:t,hideCancelButton:i,maxNumberOfFiles:s,toggleAddFilesPanel:n,uppy:a}=r,{allowNewUpload:l}=r;return l&&s&&(l=r.totalFileCount<r.maxNumberOfFiles),c(\"div\",{className:\"uppy-DashboardContent-bar\"},!t&&!i?c(\"button\",{className:\"uppy-DashboardContent-back\",type:\"button\",onClick:o(()=>a.cancelAll(),\"onClick\")},e(\"cancel\")):c(\"div\",null),c(\"div\",{className:\"uppy-DashboardContent-title\",role:\"heading\",\"aria-level\":\"1\"},c(p2,r)),l?c(\"button\",{className:\"uppy-DashboardContent-addMore\",type:\"button\",\"aria-label\":e(\"addMoreFiles\"),title:e(\"addMoreFiles\"),onClick:o(()=>n(!0),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"15\",height:\"15\",viewBox:\"0 0 15 15\"},c(\"path\",{d:\"M8 6.5h6a.5.5 0 0 1 .5.5v.5a.5.5 0 0 1-.5.5H8v6a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V8h-6a.5.5 0 0 1-.5-.5V7a.5.5 0 0 1 .5-.5h6v-6A.5.5 0 0 1 7 0h.5a.5.5 0 0 1 .5.5v6z\"})),c(\"span\",{className:\"uppy-DashboardContent-addMoreCaption\"},e(\"addMore\"))):c(\"div\",null))}o(f2,\"PanelTopBar\");var Qg=f2;var Zg=ve(kt(),1);function bh(r){let{computedMetaFields:e,requiredMetaFields:t,updateMeta:i,form:s,formState:n}=r,a={text:\"uppy-u-reset uppy-c-textInput uppy-Dashboard-FileCard-input\"};return e.map(l=>{let u=`uppy-Dashboard-FileCard-input-${l.id}`,h=t.includes(l.id);return c(\"fieldset\",{key:l.id,className:\"uppy-Dashboard-FileCard-fieldset\"},c(\"label\",{className:\"uppy-Dashboard-FileCard-label\",htmlFor:u},l.name),l.render!==void 0?l.render({value:n[l.id],onChange:o(d=>i(d,l.id),\"onChange\"),fieldCSSClasses:a,required:h,form:s.id},c):c(\"input\",{className:a.text,id:u,form:s.id,type:l.type||\"text\",required:h,value:n[l.id],placeholder:l.placeholder,onInput:o(d=>i(d.target.value,l.id),\"onInput\"),\"data-uppy-super-focusable\":!0}))})}o(bh,\"RenderMetaFields\");function wh(r){var e;let{files:t,fileCardFor:i,toggleFileCard:s,saveFileCard:n,metaFields:a,requiredMetaFields:l,openFileEditor:u,i18n:h,i18nArray:d,className:m,canEditFile:w}=r,y=o(()=>typeof a==\"function\"?a(t[i]):a,\"getMetaFields\"),P=t[i],D=(e=y())!=null?e:[],C=w(P),O={};D.forEach(te=>{var se;O[te.id]=(se=P.meta[te.id])!=null?se:\"\"});let[z,X]=Nr(O),K=mo(te=>{te.preventDefault(),n(z,i)},[n,z,i]),Z=o((te,se)=>{X({...z,[se]:te})},\"updateMeta\"),$=o(()=>{s(!1)},\"handleCancel\"),[W]=Nr(()=>{let te=document.createElement(\"form\");return te.setAttribute(\"tabindex\",\"-1\"),te.id=dr(),te});return gr(()=>(document.body.appendChild(W),W.addEventListener(\"submit\",K),()=>{W.removeEventListener(\"submit\",K),document.body.removeChild(W)}),[W,K]),c(\"div\",{className:(0,Zg.default)(\"uppy-Dashboard-FileCard\",m),\"data-uppy-panelType\":\"FileCard\",onDragOver:Mr,onDragLeave:Mr,onDrop:Mr,onPaste:Mr},c(\"div\",{className:\"uppy-DashboardContent-bar\"},c(\"div\",{className:\"uppy-DashboardContent-title\",role:\"heading\",\"aria-level\":\"1\"},d(\"editing\",{file:c(\"span\",{className:\"uppy-DashboardContent-titleFile\"},P.meta?P.meta.name:P.name)})),c(\"button\",{className:\"uppy-DashboardContent-back\",type:\"button\",form:W.id,title:h(\"finishEditingFile\"),onClick:$},h(\"cancel\"))),c(\"div\",{className:\"uppy-Dashboard-FileCard-inner\"},c(\"div\",{className:\"uppy-Dashboard-FileCard-preview\",style:{backgroundColor:gs(P.type).
2color}},c($n,{file:P}),C&&c(\"button\",{type:\"button\",className:\"uppy-u-reset uppy-c-btn uppy-Dashboard-FileCard-edit\",onClick:o(te=>{K(te),u(P)},\"onClick\")},h(\"editImage\"))),c(\"div\",{className:\"uppy-Dashboard-FileCard-info\"},c(bh,{computedMetaFields:D,requiredMetaFields:l,updateMeta:Z,form:W,formState:z})),c(\"div\",{className:\"uppy-Dashboard-FileCard-actions\"},c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Dashboard-FileCard-actionsBtn\",type:\"submit\",form:W.id},h(\"saveChanges\")),c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-c-btn-link uppy-Dashboard-FileCard-actionsBtn\",type:\"button\",onClick:$,form:W.id},h(\"cancel\")))))}o(wh,\"FileCard\");var ty=ve(kt(),1);var xo=\"uppy-transition-slideDownUp\",ey=250;function m2(r){let{children:e}=r,[t,i]=Nr(null),[s,n]=Nr(\"\"),a=ri(),l=ri(),u=ri(),h=o(()=>{n(`${xo}-enter`),cancelAnimationFrame(u.current),clearTimeout(l.current),l.current=void 0,u.current=requestAnimationFrame(()=>{n(`${xo}-enter ${xo}-enter-active`),a.current=setTimeout(()=>{n(\"\")},ey)})},\"handleEnterTransition\"),d=o(()=>{n(`${xo}-leave`),cancelAnimationFrame(u.current),clearTimeout(a.current),a.current=void 0,u.current=requestAnimationFrame(()=>{n(`${xo}-leave ${xo}-leave-active`),l.current=setTimeout(()=>{i(null),n(\"\")},ey)})},\"handleLeaveTransition\");return gr(()=>{let m=Ir(e)[0];t!==m&&(m&&!t?h():t&&!m&&!l.current&&d(),i(m))},[e,t]),gr(()=>()=>{clearTimeout(a.current),clearTimeout(l.current),cancelAnimationFrame(u.current)},[]),t?Ol(t,{className:(0,ty.default)(s,t.props.className)}):null}o(m2,\"Slide\");var Gn=m2;function Fo(){return Fo=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Fo.apply(null,arguments)}o(Fo,\"_extends\");var ry=900,iy=700,Sh=576,sy=330;function Ph(r){let e=r.totalFileCount===0,t=r.totalFileCount===1,i=r.containerWidth>Sh,s=r.containerHeight>sy,n=(0,oy.default)({\"uppy-Dashboard\":!0,\"uppy-Dashboard--isDisabled\":r.disabled,\"uppy-Dashboard--animateOpenClose\":r.animateOpenClose,\"uppy-Dashboard--isClosing\":r.isClosing,\"uppy-Dashboard--isDraggingOver\":r.isDraggingOver,\"uppy-Dashboard--modal\":!r.inline,\"uppy-size--md\":r.containerWidth>Sh,\"uppy-size--lg\":r.containerWidth>iy,\"uppy-size--xl\":r.containerWidth>ry,\"uppy-size--height-md\":r.containerHeight>sy,\"uppy-Dashboard--isAddFilesPanelVisible\":r.showAddFilesPanel,\"uppy-Dashboard--isInnerWrapVisible\":r.areInsidesReadyToBeVisible,\"uppy-Dashboard--singleFile\":r.singleFileFullScreen&&t&&s}),a=1;r.containerWidth>ry?a=5:r.containerWidth>iy?a=4:r.containerWidth>Sh&&(a=3);let l=r.showSelectedFiles&&!e,u=r.recoveredState?Object.keys(r.recoveredState.files).length:null,h=r.files?Object.keys(r.files).filter(w=>r.files[w].isGhost).length:0,d=o(()=>h>0?r.i18n(\"recoveredXFiles\",{smart_count:h}):r.i18n(\"recoveredAllFiles\"),\"renderRestoredText\");return c(\"div\",{className:n,\"data-uppy-theme\":r.theme,\"data-uppy-num-acquirers\":r.acquirers.length,\"data-uppy-drag-drop-supported\":!r.disableLocalFiles&&qn(),\"aria-hidden\":r.inline?\"false\":r.isHidden,\"aria-disabled\":r.disabled,\"aria-label\":r.inline?r.i18n(\"dashboardTitle\"):r.i18n(\"dashboardWindowTitle\"),onPaste:r.handlePaste,onDragOver:r.handleDragOver,onDragLeave:r.handleDragLeave,onDrop:r.handleDrop},c(\"div\",{\"aria-hidden\":\"true\",className:\"uppy-Dashboard-overlay\",tabIndex:-1,onClick:r.handleClickOutside}),c(\"div\",{className:\"uppy-Dashboard-inner\",\"aria-modal\":!r.inline&&\"true\",role:r.inline?void 0:\"dialog\",style:{width:r.inline&&r.width?r.width:\"\",height:r.inline&&r.height?r.height:\"\"}},r.inline?null:c(\"button\",{className:\"uppy-u-reset uppy-Dashboard-close\",type:\"button\",\"aria-label\":r.i18n(\"closeModal\"),title:r.i18n(\"closeModal\"),onClick:r.closeModal},c(\"span\",{\"aria-hidden\":\"true\"},\"\\xD7\")),c(\"div\",{className:\"uppy-Dashboard-innerWrap\"},c(\"div\",{className:\"uppy-Dashboard-dropFilesHereHint\"},r.i18n(\"dropHint\")),l&&c(Qg,r),u&&c(\"div\",{className:\"uppy-Dashboard-serviceMsg\"},c(\"svg\",{className:\"uppy-Dashboard-serviceMsg-icon\",\"aria-hidden\":\"true\",focu
2sable:\"false\",width:\"21\",height:\"16\",viewBox:\"0 0 24 19\"},c(\"g\",{transform:\"translate(0 -1)\",fill:\"none\",fillRule:\"evenodd\"},c(\"path\",{d:\"M12.857 1.43l10.234 17.056A1 1 0 0122.234 20H1.766a1 1 0 01-.857-1.514L11.143 1.429a1 1 0 011.714 0z\",fill:\"#FFD300\"}),c(\"path\",{fill:\"#000\",d:\"M11 6h2l-.3 8h-1.4z\"}),c(\"circle\",{fill:\"#000\",cx:\"12\",cy:\"17\",r:\"1\"}))),c(\"strong\",{className:\"uppy-Dashboard-serviceMsg-title\"},r.i18n(\"sessionRestored\")),c(\"div\",{className:\"uppy-Dashboard-serviceMsg-text\"},d())),l?c(yh,{id:r.id,i18n:r.i18n,uppy:r.uppy,files:r.files,resumableUploads:r.resumableUploads,hideRetryButton:r.hideRetryButton,hidePauseResumeButton:r.hidePauseResumeButton,hideCancelButton:r.hideCancelButton,showLinkToFileUploadResult:r.showLinkToFileUploadResult,showRemoveButtonAfterComplete:r.showRemoveButtonAfterComplete,metaFields:r.metaFields,toggleFileCard:r.toggleFileCard,handleRequestThumbnail:r.handleRequestThumbnail,handleCancelThumbnail:r.handleCancelThumbnail,recoveredState:r.recoveredState,individualCancellation:r.individualCancellation,openFileEditor:r.openFileEditor,canEditFile:r.canEditFile,toggleAddFilesPanel:r.toggleAddFilesPanel,isSingleFile:t,itemsPerRow:a,containerWidth:r.containerWidth,containerHeight:r.containerHeight}):c(cu,{i18n:r.i18n,i18nArray:r.i18nArray,acquirers:r.acquirers,handleInputChange:r.handleInputChange,maxNumberOfFiles:r.maxNumberOfFiles,allowedFileTypes:r.allowedFileTypes,showNativePhotoCameraButton:r.showNativePhotoCameraButton,showNativeVideoCameraButton:r.showNativeVideoCameraButton,nativeCameraFacingMode:r.nativeCameraFacingMode,showPanel:r.showPanel,activePickerPanel:r.activePickerPanel,disableLocalFiles:r.disableLocalFiles,fileManagerSelectionType:r.fileManagerSelectionType,note:r.note,proudlyDisplayPoweredByUppy:r.proudlyDisplayPoweredByUppy}),c(Gn,null,r.showAddFilesPanel?c(Gg,Fo({key:\"AddFiles\"},r,{isSizeMD:i})):null),c(Gn,null,r.fileCardFor?c(wh,Fo({key:\"FileCard\"},r)):null),c(Gn,null,r.activePickerPanel?c(Xg,Fo({key:\"Picker\"},r)):null),c(Gn,null,r.showFileEditor?c(Jg,Fo({key:\"Editor\"},r)):null),c(\"div\",{className:\"uppy-Dashboard-progressindicators\"},r.progressindicators.map(w=>r.uppy.getPlugin(w.id).render(r.state))))))}o(Ph,\"Dashboard\");var ny={strings:{closeModal:\"Close Modal\",addMoreFiles:\"Add more files\",addingMoreFiles:\"Adding more files\",importFrom:\"Import from %{name}\",dashboardWindowTitle:\"Uppy Dashboard Window (Press escape to close)\",dashboardTitle:\"Uppy Dashboard\",copyLinkToClipboardSuccess:\"Link copied to clipboard.\",copyLinkToClipboardFallback:\"Copy the URL below\",copyLink:\"Copy link\",back:\"Back\",removeFile:\"Remove file\",editFile:\"Edit file\",editImage:\"Edit image\",editing:\"Editing %{file}\",error:\"Error\",finishEditingFile:\"Finish editing file\",saveChanges:\"Save changes\",myDevice:\"My Device\",dropHint:\"Drop your files here\",uploadComplete:\"Upload complete\",uploadPaused:\"Upload paused\",resumeUpload:\"Resume upload\",pauseUpload:\"Pause upload\",retryUpload:\"Retry upload\",cancelUpload:\"Cancel upload\",xFilesSelected:{0:\"%{smart_count} file selected\",1:\"%{smart_count} files selected\"},uploadingXFiles:{0:\"Uploading %{smart_count} file\",1:\"Uploading %{smart_count} files\"},processingXFiles:{0:\"Processing %{smart_count} file\",1:\"Processing %{smart_count} files\"},poweredBy:\"Powered by %{uppy}\",addMore:\"Add more\",editFileWithFilename:\"Edit file %{file}\",save:\"Save\",cancel:\"Cancel\",dropPasteFiles:\"Drop files here or %{browseFiles}\",dropPasteFolders:\"Drop files here or %{browseFolders}\",dropPasteBoth:\"Drop files here, %{browseFiles} or %{browseFolders}\",dropPasteImportFiles:\"Drop files here, %{browseFiles} or import from:\",dropPasteImportFolders:\"Drop files here, %{browseFolders} or import from:\",dropPasteImportBoth:\"Drop files here, %{browseFiles}, %{browseFolders} or import from:\",importFiles:\"Import files from:\",browseFiles:\"browse files\",browseFolders:\"browse folders\",recoveredXFiles:{0:\"We could not fully recover 1 file. Please re-select it and resume the upload.\",1:\"We could not fully recover %{smart_count} files. Please re-select them and resume the upload.\"},recoveredAllFiles:\"We restored all files. You can now resume the upload.\",sessionRestored:\"Session restored\",reSelect:\"Re-select\",missingRequiredMetaFields:{0:\"Missing required meta field: %{fields}.\",1:\"Missing required meta fields: %{fields}.\"},takePictureBtn:\"Take Picture\",recordVideoBtn:\"Record Video\"}};function ye(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ye,\"_classPrivateFieldLooseBase\");var g2=0;function yt(r){return\"__private_\"+g2+++\"_\"+r}o(yt,\"_classPrivateFieldLooseKey\");var y2={version:\"4.1.1\"},_h=nh.default||nh,ay=9,v2=27;function ly(){let r={};return r.promise=new Promise((e,t)=>
2{r.resolve=e,r.reject=t}),r}o(ly,\"createPromise\");var b2={target:\"body\",metaFields:[],thumbnailWidth:280,thumbnailType:\"image/jpeg\",waitForThumbnailsBeforeUpload:!1,defaultPickerIcon:yo,showLinkToFileUploadResult:!1,showProgressDetails:!1,hideUploadButton:!1,hideCancelButton:!1,hideRetryButton:!1,hidePauseResumeButton:!1,hideProgressAfterFinish:!1,note:null,singleFileFullScreen:!0,disableStatusBar:!1,disableInformer:!1,disableThumbnailGenerator:!1,fileManagerSelectionType:\"files\",proudlyDisplayPoweredByUppy:!0,showSelectedFiles:!0,showRemoveButtonAfterComplete:!1,showNativePhotoCameraButton:!1,showNativeVideoCameraButton:!1,theme:\"light\",autoOpen:null,disabled:!1,disableLocalFiles:!1,nativeCameraFacingMode:\"\",onDragLeave:o(()=>{},\"onDragLeave\"),onDragOver:o(()=>{},\"onDragOver\"),onDrop:o(()=>{},\"onDrop\"),plugins:[],doneButtonHandler:void 0,onRequestCloseModal:null,inline:!1,animateOpenClose:!0,browserBackButtonClose:!1,closeAfterFinish:!1,closeModalOnClickOutside:!1,disablePageScrollWhenModalOpen:!0,trigger:null,width:750,height:550},ys=yt(\"disabledNodes\"),ci=yt(\"generateLargeThumbnailIfSingleFile\"),Kn=yt(\"openFileEditorWhenFilesAdded\"),vs=yt(\"attachRenderFunctionToTarget\"),xh=yt(\"isTargetSupported\"),Fh=yt(\"getAcquirers\"),Eh=yt(\"getProgressIndicators\"),hi=yt(\"getEditors\"),Ch=yt(\"addSpecifiedPluginsFromOptions\"),Th=yt(\"autoDiscoverPlugins\"),bs=yt(\"addSupportedPluginIfNoTarget\"),Xn=yt(\"getStatusBarOpts\"),Yn=yt(\"getThumbnailGeneratorOpts\"),Oh=yt(\"getInformerOpts\"),Jn=yt(\"getStatusBarId\"),Qn=yt(\"getThumbnailGeneratorId\"),Ah=yt(\"getInformerId\"),ws=class extends ne{static{o(this,\"Dashboard\")}constructor(e,t){var i,s,n;let a=(i=t?.autoOpen)!=null?i:null;super(e,{...b2,...t,autoOpen:a}),Object.defineProperty(this,Ah,{value:F2}),Object.defineProperty(this,Qn,{value:x2}),Object.defineProperty(this,Jn,{value:_2}),Object.defineProperty(this,Oh,{value:P2}),Object.defineProperty(this,Yn,{value:S2}),Object.defineProperty(this,Xn,{value:w2}),Object.defineProperty(this,ys,{writable:!0,value:void 0}),this.modalName=`uppy-Dashboard-${dr()}`,this.superFocus=lh(),this.ifFocusedOnUppyRecently=!1,this.removeTarget=l=>{let h=this.getPluginState().targets.filter(d=>d.id!==l.id);this.setPluginState({targets:h})},this.addTarget=l=>{let u=l.id||l.constructor.name,h=l.title||u,d=l.type;if(d!==\"acquirer\"&&d!==\"progressindicator\"&&d!==\"editor\")return this.up
2py.log(\"Dashboard: can only be targeted by plugins of types: acquirer, progressindicator, editor\",\"error\"),null;let m={id:u,name:h,type:d},y=this.getPluginState().targets.slice();return y.push(m),this.setPluginState({targets:y}),this.el},this.hideAllPanels=()=>{var l;let u=this.getPluginState(),h={activePickerPanel:void 0,showAddFilesPanel:!1,activeOverlayType:null,fileCardFor:null,showFileEditor:!1};u.activePickerPanel===h.activePickerPanel&&u.showAddFilesPanel===h.showAddFilesPanel&&u.showFileEditor===h.showFileEditor&&u.activeOverlayType===h.activeOverlayType||(this.setPluginState(h),this.uppy.emit(\"dashboard:close-panel\",(l=u.activePickerPanel)==null?void 0:l.id))},this.showPanel=l=>{let{targets:u}=this.getPluginState(),h=u.find(d=>d.type===\"acquirer\"&&d.id===l);this.setPluginState({activePickerPanel:h,activeOverlayType:\"PickerPanel\"}),this.uppy.emit(\"dashboard:show-panel\",l)},this.canEditFile=l=>{let{targets:u}=this.getPluginState();return ye(this,hi)[hi](u).some(d=>this.uppy.getPlugin(d.id).canEditFile(l))},this.openFileEditor=l=>{let{targets:u}=this.getPluginState(),h=ye(this,hi)[hi](u);this.setPluginState({showFileEditor:!0,fileCardFor:l.id||null,activeOverlayType:\"FileEditor\"}),h.forEach(d=>{this.uppy.getPlugin(d.id).selectFile(l)})},this.closeFileEditor=()=>{let{metaFields:l}=this.getPluginState();l&&l.length>0?this.setPluginState({showFileEditor:!1,activeOverlayType:\"FileCard\"}):this.setPluginState({showFileEditor:!1,fileCardFor:null,activeOverlayType:\"AddFiles\"})},this.saveFileEditor=()=>{let{targets:l}=this.getPluginState();ye(this,hi)[hi](l).forEach(h=>{this.uppy.getPlugin(h.id).save()}),this.closeFileEditor()},this.openModal=()=>{let{promise:l,resolve:u}=ly();if(this.savedScrollPosition=window.pageYOffset,this.savedActiveElement=document.activeElement,this.opts.disablePageScrollWhenModalOpen&&document.body.classList.add(\"uppy-Dashboard-isFixed\"),this.opts.animateOpenClose&&this.getPluginState().isClosing){let h=o(()=>{this.setPluginState({isHidden:!1}),this.el.removeEventListener(\"animationend\",h,!1),u()},\"handler\");this.el.addEventListener(\"animationend\",h,!1)}else this.setPluginState({isHidden:!1}),u();return this.opts.browserBackButtonClose&&this.updateBrowserHistory(),document.addEventListener(\"keydown\",this.handleKeyDownInModal),this.uppy.emit(\"dashboard:modal-open\"),l},this.closeModal=l=>{var u;let h=(u=l?.manualClose)!=null?u:!0,{isHidden:d,isClosing:m}=this.getPluginState();if(d||m)return;let{promise:w,resolve:y}=ly();if(this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove(\"uppy-Dashboard-isFixed\"),this.opts.animateOpenClose){this.setPluginState({isClosing:!0});let D=o(()=>{this.setPluginState({isHidden:!0,isClosing:!1}),this.superFocus.cancel(),this.savedActiveElement.focus(),this.el.removeEventListener(\"animationend\",D,!1),y()},\"handler\");this.el.addEventListener(\"animationend\",D,!1)}else this.setPluginState({isHidden:!0}),this.superFocus.cancel(),this.savedActiveElement.focus(),y();if(document.removeEventListener(\"keydown\",this.handleKeyDownInModal),h&&this.opts.browserBackButtonClose){var P;(P=history.state)!=null&&P[this.modalName]&&history.back()}
2return this.uppy.emit(\"dashboard:modal-closed\"),w},this.isModalOpen=()=>!this.getPluginState().isHidden||!1,this.requestCloseModal=()=>this.opts.onRequestCloseModal?this.opts.onRequestCloseModal():this.closeModal(),this.setDarkModeCapability=l=>{let{capabilities:u}=this.uppy.getState();this.uppy.setState({capabilities:{...u,darkMode:l}})},this.handleSystemDarkModeChange=l=>{let u=l.matches;this.uppy.log(`[Dashboard] Dark mode is ${u?\"on\":\"off\"}`),this.setDarkModeCapability(u)},this.toggleFileCard=(l,u)=>{let h=this.uppy.getFile(u);l?this.uppy.emit(\"dashboard:file-edit-start\",h):this.uppy.emit(\"dashboard:file-edit-complete\",h),this.setPluginState({fileCardFor:l?u:null,activeOverlayType:l?\"FileCard\":null})},this.toggleAddFilesPanel=l=>{this.setPluginState({showAddFilesPanel:l,activeOverlayType:l?\"AddFiles\":null})},this.addFiles=l=>{let u=l.map(h=>({source:this.id,name:h.name,type:h.type,data:h,meta:{relativePath:h.relativePath||h.webkitRelativePath||null}}));try{this.uppy.addFiles(u)}catch(h){this.uppy.log(h)}},this.startListeningToResize=()=>{this.resizeObserver=new ResizeObserver(l=>{let u=l[0],{width:h,height:d}=u.contentRect;this.setPluginState({containerWidth:h,containerHeight:d,areInsidesReadyToBeVisible:!0})}),this.resizeObserver.observe(this.el.querySelector(\".uppy-Dashboard-inner\")),this.makeDashboardInsidesVisibleAnywayTimeout=setTimeout(()=>{let l=this.getPluginState(),u=!this.opts.inline&&l.isHidden;!l.areInsidesReadyToBeVisible&&!u&&(this.uppy.log(\"[Dashboard] resize event didn\\u2019t fire on time: defaulted to mobile layout\",\"warning\"),this.setPluginState({areInsidesReadyToBeVisible:!0}))},1e3)},this.stopListeningToResize=()=>{this.resizeObserver.disconnect(),clearTimeout(this.makeDashboardInsidesVisibleAnywayTimeout)},this.recordIfFocusedOnUppyRecently=l=>{this.el.contains(l.target)?this.ifFocusedOnUppyRecently=!0:(this.ifFocusedOnUppyRecently=!1,this.superFocus.cancel())},this.disableInteractiveElements=l=>{var u;let h=[\"a[href]\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\",\"button:not([disabled])\",'[role=\"button\"]:not([disabled])'],d=(u=ye(this,ys)[ys])!=null?u:et(this.el.querySelectorAll(h)).filter(m=>!m.classList.contains(\"uppy-Dashboard-close\"));for(let m of d)m.tagName===\"A\"?m.setAttribute(\"aria-disabled\",l):m.disabled=l;l?ye(this,ys)[ys]=d:ye(this,ys)[ys]=null,this.dashboardIsDisabled=l},this.updateBrowserHistory=()=>{var l;(l=history.state)!=null&&l[this.modalName]||history.pushState({...history.state,[this.modalName]:!0},\"\"),window.addEventListener(\"popstate\",this.handlePopState,!1)},this.handlePopState=l=>{var u;this.isModalOpen()&&(!l.state||!l.state[this.modalName])&&this.closeModal({manualClose:!1}),!this.isModalOpen()&&(u=l.state)!=null&&u[this.modalName]&&history.back()},this.handleKeyDownInModal=l=>{l.keyCode===v2&&this.requestCloseModal(),l.keyCode===ay&&ah(l,this.getPluginState().activeOverlayType,this.el)},this.handleClickOutside=()=>{this.opts.closeModalOnClickOutside&&this.requestCloseModal()},this.handlePaste=l=>{this.uppy.iteratePlugins(h=>{h.type===\"acquirer\"&&(h.handleRootPaste==null||h.handleRootPaste(l))});let u=et(l.clipboardData.files);u.length>0&&(this.uppy.log(\"[Dashboard] Files pasted\"),this.addFiles(u))},this.handleInputChange=l=>{l.preventDefault();let u=et(l.currentTarget.files||[]);u.length>0&&(this.uppy.log(\"[Dashboard] Files selected through input\"),this.addFiles(u))},this.handleDragOver=l=>{l.preventDefault(),l.stopPropagation();let u=o(()=>{let w=!0;
2return this.uppy.iteratePlugins(y=>{y.canHandleRootDrop!=null&&y.canHandleRootDrop(l)&&(w=!0)}),w},\"canSomePluginHandleRootDrop\"),h=o(()=>{let{types:w}=l.dataTransfer;return w.some(y=>y===\"Files\")},\"doesEventHaveFiles\"),d=u(),m=h();if(!d&&!m||this.opts.disabled||this.opts.disableLocalFiles&&(m||!d)||!this.uppy.getState().allowNewUpload){l.dataTransfer.dropEffect=\"none\";return}l.dataTransfer.dropEffect=\"copy\",this.setPluginState({isDraggingOver:!0}),this.opts.onDragOver(l)},this.handleDragLeave=l=>{l.preventDefault(),l.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.opts.onDragLeave(l)},this.handleDrop=async l=>{l.preventDefault(),l.stopPropagation(),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(m=>{m.type===\"acquirer\"&&(m.handleRootDrop==null||m.handleRootDrop(l))});let u=!1,h=o(m=>{this.uppy.log(m,\"error\"),u||(this.uppy.info(m.message,\"error\"),u=!0)},\"logDropError\");this.uppy.log(\"[Dashboard] Processing dropped files\");let d=await ms(l.dataTransfer,{logDropError:h});d.length>0&&(this.uppy.log(\"[Dashboard] Files dropped\"),this.addFiles(d)),this.opts.onDrop(l)}
2,this.handleRequestThumbnail=l=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit(\"thumbnail:request\",l)},this.handleCancelThumbnail=l=>{this.opts.waitForThumbnailsBeforeUpload||this.uppy.emit(\"thumbnail:cancel\",l)},this.handleKeyDownInInline=l=>{l.keyCode===ay&&zg(l,this.getPluginState().activeOverlayType,this.el)},this.handlePasteOnBody=l=>{this.el.contains(document.activeElement)&&this.handlePaste(l)},this.handleComplete=l=>{let{failed:u}=l;this.opts.closeAfterFinish&&!(u!=null&&u.length)&&this.requestCloseModal()},this.handleCancelRestore=()=>{this.uppy.emit(\"restore-canceled\")},Object.defineProperty(this,ci,{writable:!0,value:o(()=>{if(this.opts.disableThumbnailGenerator)return;let l=600,u=this.uppy.getFiles();if(u.length===1){let h=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);h?.setOptions({thumbnailWidth:l});let d={...u[0],preview:void 0};h?.requestThumbnail(d).then(()=>{h?.setOptions({thumbnailWidth:this.opts.thumbnailWidth})})}},\"value\")}),Object.defineProperty(this,Kn,{writable:!0,value:o(l=>{let u=l[0],{metaFields:h}=this.getPluginState(),d=h&&h.length>0,m=this.canEditFile(u);d&&this.opts.autoOpen===\"metaEditor\"?this.toggleFileCard(!0,u.id):m&&this.opts.autoOpen===\"imageEditor\"&&this.openFileEditor(u)},\"value\")}),this.initEvents=()=>{if(this.opts.trigger&&!this.opts.inline){let l=ih(this.opts.trigger);l?l.forEach(u=>u.addEventListener(\"click\",this.openModal)):this.uppy.log(\"Dashboard modal trigger not found. Make sure `trigger` is set in Dashboard options, unless you are planning to call `dashboard.openM
2odal()` method yourself\",\"warning\")}this.startListeningToResize(),document.addEventListener(\"paste\",this.handlePasteOnBody),this.uppy.on(\"plugin-added\",ye(this,bs)[bs]),this.uppy.on(\"plugin-remove\",this.removeTarget),this.uppy.on(\"file-added\",this.hideAllPanels),this.uppy.on(\"dashboard:modal-closed\",this.hideAllPanels),this.uppy.on(\"complete\",this.handleComplete),this.uppy.on(\"files-added\",ye(this,ci)[ci]),this.uppy.on(\"file-removed\",ye(this,ci)[ci]),document.addEventListener(\"focus\",this.recordIfFocusedOnUppyRecently,!0),document.addEventListener(\"click\",this.recordIfFocusedOnUppyRecently,!0),this.opts.inline&&this.el.addEventListener(\"keydown\",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.on(\"files-added\",ye(this,Kn)[Kn])},this.removeEvents=()=>{let l=ih(this.opts.trigger);!this.opts.inline&&l&&l.forEach(u=>u.removeEventListener(\"click\",this.openModal)),this.stopListeningToResize(),document.removeEventListener(\"paste\",this.handlePasteOnBody),window.removeEventListener(\"popstate\",this.handlePopState,!1),this.uppy.off(\"plugin-added\",ye(this,bs)[bs]),this.uppy.off(\"plugin-remove\",this.removeTarget),this.uppy.off(\"file-added\",this.hideAllPanels),this.uppy.off(\"dashboard:modal-closed\",this.hideAllPanels),this.uppy.off(\"complete\",this.handleComplete),this.uppy.off(\"files-added\",ye(this,ci)[ci]),this.uppy.off(\"file-removed\",ye(this,ci)[ci]),document.removeEventListener(\"focus\",this.recordIfFocusedOnUppyRecently),document.removeEventListener(\"click\",this.recordIfFocusedOnUppyRecently),this.opts.inline&&this.el.removeEventListener(\"keydown\",this.handleKeyDownInInline),this.opts.autoOpen&&this.uppy.off(\"files-added\",ye(this,Kn)[Kn])},this.superFocusOnEachUpdate=()=>{let l=this.el.contains(document.activeElement),u=document.activeElement===document.body||document.activeElement===null,h=this.uppy.getState().info.length===0,d=!this.opts.inline;h&&(d||l||u&&this.ifFocusedOnUppyRecently)?this.superFocus(this.el,this.getPluginState().activeOverlayType):this.superFocus.cancel()},this.afterUpdate=()=>{if(this.opts.disabled&&!this.dashboardIsDisabled){this.disableInteractiveElements(!0);return}!this.opts.disabled&&this.dashboardIsDisabled&&this.disableInteractiveElements(!1),this.superFocusOnEachUpdate()},this.saveFileCard=(l,u)=>{this.uppy.setFileMeta(u,l),this.toggleFileCard(!1,u)},Object.defineProperty(this,vs,{writable:!0,value:o(l=>{let u=this.uppy.getPlugin(l.id);return{...l,icon:u.icon||this.opts.defaultPickerIcon,render:u.render}},\"value\")}),Object.defineProperty(this,xh,{writable:!0,value:o(l=>{let u=this.uppy.getPlugin(l.id);return typeof u.isSupported!=\"function\"?!0:u.isSupported()},\"value\")}),Object.defineProperty(this,Fh,{writable:!0,value:_h(l=>l.filter(u=>u.type===\"acquirer\"&&ye(this,xh)[xh](u)).map(ye(this,vs)[vs]))}),Object.defineProperty(this,Eh,{writable:!0,value:_h(l=>l.filter(u=>u.type===\"progressindicator\").map(ye(this,vs)[vs]))}),Object.defineProperty(this,hi,{writable:!0,value:_h(l=>l.filter(u=>u.type===\"editor\").map(ye(this,vs)[vs]))}),this.render=l=>{let u=this.getPluginState(),{files:h,capabilities:d,allowNewUpload:m}=l,{newFiles:w,uploadStartedFiles:y,completeFiles:P,erroredFiles:D,inProgressFiles:C,inProgressNotPausedFiles:O,processingFiles:z,isUploadStarted:X,isAllComplete:K,isAllPaused:Z}=this.uppy.getObjectOfFilesPerState(),$=ye(this,Fh)[Fh](u.targets),W=ye(this,Eh)[Eh](u.targets),te=ye(this,hi)[hi](u.targets),se;return this.opts.theme===\"auto\"?se=d.darkMode?\"dark\":\"light\":se=this.opts.theme,[\"files\",\"folders\",\"both\"].indexOf(this.opts.fileManagerSelectionType)<0&&(this.opts.fileManagerSelectionType=\"files\",console.warn(`Unsupported option for \"fileManagerSelectionType\". Using default of \"${this.opts.fileManagerSelectionType}\".`)),Ph({state:l,isHidden:u.isHidden,files:h,newFiles:w,uploadStartedFiles:y,completeFiles:P,erroredFiles:D,inProgressFiles:C,inProgressNotPausedFiles:O,processingFiles:z,isUploadStarted:X,isAllComplete:K,isAllPaused:Z,totalFileCount:Object.keys(h).length,totalProgress:l.totalProgress,allowNewUpload:m,acquirers:$,theme:se,disabled:this.opts.disabled,disableLocalFiles:this.opts.disableLocalFiles,direction:this.opts.direction,activePickerPanel:u.activePickerPanel,showFileEditor:u.showFileEditor,saveFileEditor:this.saveFileEditor,closeFileEditor:this.closeFileEditor,disableInteractiveElements:this.disableInteractiveElements,animateOpenClose:this.opts.animateOpenClose,isClosing:u.isClosing,progressindicators:W,editors:te,autoProceed:this.uppy.opts.autoProceed,id:this.id,closeModal:this.requestCloseModal,handleClickOutside:this.handleClickOutside,handleInputChange:this.handleInputChange,handlePaste:this.handlePaste,inline:this.opts.inline,showPanel:this.showPanel,hideAllPanels:this.hideAllPanels,i18n:this.i18n,i18nArray:this.i18nArray,uppy:this.uppy,note:this.opts.note,recoveredState:l.recoveredState,metaFields:u.metaFields,resumableUploads:d.resumableUploads||!1,individualCancellation:d.individualCancellation,isMobileDevice:d.isMobileDevice,fileCardFor:u.fileCardFor,toggleFileCard:this.toggleFileCard,toggleAddFilesPanel:this.toggleAddFilesPanel,showAddFilesPanel:u.showAddFilesPanel,saveFileCard:this.saveFileCard,openFileEditor:this.openFileEditor,canEditFile:this.canEditFile,width:this.opts.width,height:this.opts.height,showLinkToFileUploadResult:this.opts.showLinkToFileUploadResult,f
2ileManagerSelectionType:this.opts.fileManagerSelectionType,proudlyDisplayPoweredByUppy:this.opts.proudlyDisplayPoweredByUppy,hideCancelButton:this.opts.hideCancelButton,hideRetryButton:this.opts.hideRetryButton,hidePauseResumeButton:this.opts.hidePauseResumeButton,showRemoveButtonAfterComplete:this.opts.showRemoveButtonAfterComplete,containerWidth:u.containerWidth,containerHeight:u.containerHeight,areInsidesReadyToBeVisible:u.areInsidesReadyToBeVisible,parentElement:this.el,allowedFileTypes:this.uppy.opts.restrictions.allowedFileTypes,maxNumberOfFiles:this.uppy.opts.restrictions.maxNumberOfFiles,requiredMetaFields:this.uppy.opts.restrictions.requiredMetaFields,showSelectedFiles:this.opts.showSelectedFiles,showNativePhotoCameraButton:this.opts.showNativePhotoCameraButton,showNativeVideoCameraButton:this.opts.showNativeVideoCameraButton,nativeCameraFacingMode:this.opts.nativeCameraFacingMode,singleFileFullScreen:this.opts.singleFileFullScreen,handleCancelRestore:this.handleCancelRestore,handleRequestThumbnail:this.handleRequestThumbn
2ail,handleCancelThumbnail:this.handleCancelThumbnail,isDraggingOver:u.isDraggingOver,handleDragOver:this.handleDragOver,handleDragLeave:this.handleDragLeave,handleDrop:this.handleDrop})},Object.defineProperty(this,Ch,{writable:!0,value:o(()=>{let{plugins:l}=this.opts;l.forEach(u=>{let h=this.uppy.getPlugin(u);h?h.mount(this,h):this.uppy.log(`[Uppy] Dashboard could not find plugin '${u}', make sure to uppy.use() the plugins you are specifying`,\"warning\")})},\"value\")}),Object.defineProperty(this,Th,{writable:!0,value:o(()=>{this.uppy.iteratePlugins(ye(this,bs)[bs])},\"value\")}),Object.defineProperty(this,bs,{writable:!0,value:o(l=>{var u;let h=[\"acquirer\",\"editor\"];l&&!((u=l.opts)!=null&&u.target)&&h.includes(l.type)&&(this.getPluginState().targets.some(m=>l.id===m.id)||l.mount(this,l))},\"value\")}),this.install=()=>{this.setPluginState({isHidden:!0,fileCardFor:null,activeOverlayType:null,showAddFilesPanel:!1,activePickerPanel:void 0,showFileEditor:!1,metaFields:this.opts.metaFields,targets:[],areInsidesReadyToBeVisible:!1,isDraggingOver:!1});let{inline:l,closeAfterFinish:u}=this.opts;if(l&&u)throw new Error(\"[Dashboard] `closeAfterFinish: true` cannot be used on an inline Dashboard, because an inline Dashboard cannot be closed at all. Either set `inline: false`, or disable the `closeAfterFinish` option.\");let{allowMultipleUploads:h,allowMultipleUploadBatches:d}=this.uppy.opts;(h||d)&&u&&this.uppy.log(\"[Dashboard] When using `closeAfterFinish`, we recommended setting the `allowMultipleUploadBatches` option to `false` in the Uppy constructor. See https://uppy.io/docs/uppy/#allowMultipleUploads-true\",\"warning\");let{target:m}=this.opts;m&&this.mount(m,this),this.opts.disableStatusBar||this.uppy.use(li,{id:ye(this,Jn)[Jn](),target:this,...ye(this,Xn)[Xn]()}),this.opts.disableInformer||this.uppy.use(ui,{id:ye(this,Ah)[Ah](),target:this,...ye(this,Oh)[Oh]()}),this.opts.disableThumbnailGenerator||this.uppy.use(qi,{id:ye(this,Qn)[Qn](),...ye(this,Yn)[Yn]()}),this.darkModeMediaQuery=typeof window<\"u\"&&window.matchMedia?window.matchMedia(\"(prefers-color-scheme: dark)\"):null;let w=this.darkModeMediaQuery?this.darkModeMediaQuery.matches:!1;if(this.uppy.log(`[Dashboard] Dark mode is ${w?\"on\":\"off\"}`),this.setDarkModeCapability(w),this.opts.theme===\"auto\"){var y;(y=this.darkModeMediaQuery)==null||y.addListener(this.handleSystemDarkModeChange)}ye(this,Ch)[Ch](),ye(this,Th)[Th](),this.initEvents()},this.uninstall=()=>{if(!this.opts.disableInformer){let h=this.uppy.getPlugin(`${this.id}:Informer`);h&&this.uppy.removePlugin(h)}if(!this.opts.disableStatusBar){let h=this.uppy.getPlugin(`${this.id}:StatusBar`);h&&this.uppy.removePlugin(h)}if(!this.opts.disableThumbnailGenerator){let h=this.uppy.getPlugin(`${this.id}:ThumbnailGenerator`);h&&this.uppy.removePlugin(h)}let{plugins:l}=this.opts;if(l.forEach(h=>{let d=this.uppy.getPlugin(h);d&&d.unmount()}),this.opts.theme===\"auto\"){var u;(u=this.darkModeMediaQuery)==null||u.removeListener(this.handleSystemDarkModeChange)}this.opts.disablePageScrollWhenModalOpen&&document.body.classList.remove(\"uppy-Dashboard-isFixed\"),this.unmount(),this.removeEvents()},this.id=this.opts.id||\"Dashboard\",this.title=\"Dashboard\",this.type=\"orchestrator\",this.defaultLocale=ny,this.opts.doneButtonHandler===void 0&&(this.opts.doneButtonHandler=()=>{this.uppy.clear(),this.requestCloseModal()}),(n=(s=this.opts).onRequestCloseModal)!=null||(s.onRequestCloseModal=()=>this.closeModal()),this.i18nInit()}setOptions(e){var t,i;super.setOptions(e),(t=this.uppy.getPlugin(ye(this,Jn)[Jn]()))==null||t.setOptions(ye(this,Xn)[Xn]()),(i=this.uppy.getPlugin(ye(this,Qn)[Qn]()))==null||i.setOptions(ye(this,Yn)[Yn]())}};function w2(){let{hideUploadButton:r,hideRetryButton:e,hidePauseResumeButton:t,hideCancelButton:i,showProgressDetails:s,hideProgressAfterFinish:n,locale:a,doneButtonHandler:l}=this.opts;return{hideUploadButton:r,hideRetryButton:e,hidePauseResumeButton:t,hideCancelButton:i,showProgressDetails:s,hideAfterFinish:n,locale:a,doneButtonHandler:l}}o(w2,\"_getStatusBarOpts2\");function S2(){let{thumbnailWidth:r,thumbnailHeight:e,thumbnailType:t,waitForThumbnailsBeforeUpload:i}=this.opts;return{thumbnailWidth:r,thumbnailHeight:e,thumbnailType:t,waitForThumbnailsBeforeUpload:i,lazy:!i}}o(S2,\"_getThumbnailGeneratorOpts2\");function P2(){return{}}o(P2,\"_getInformerOpts2\");function _2(){return`${this.id}:StatusBar`}o(_2,\"_getStatusBarId2\");function x2(){return`${this.id}:ThumbnailGenerator`}o(x2,\"_getThumbnailGeneratorId2\");function F2(){return`${this.id}:Informer`}o(F2,\"_getInformerId2\");ws.VERSION=y2.version;var uy={strings:{dropHereOr:\"Drop here or %{browse}\",browse:\"browse\"}};var E2={version:\"4.0.3\"},C2={inputName:\"files[]\",width:\"100%\",height:\"100%\"},Ss=class r extends ne{static{o(this,\"DragDrop\")}constructor(e,t){super(e,{...C2,...t}),this.isDragDropSupported=qn(),this.addFiles=i=>{let s=i.map(n=>({source:this.id,name:n.name,type:n.type,data:n,meta:{relativePath:n.relativePath||null}}));
2try{this.uppy.addFiles(s)}catch(n){this.uppy.log(n)}},this.onInputChange=i=>{let s=et(i.currentTarget.files||[]);s.length>0&&(this.uppy.log(\"[DragDrop] Files selected through input\"),this.addFiles(s)),i.currentTarget.value=\"\"},this.handleDragOver=i=>{var s,n;i.preventDefault(),i.stopPropagation();let{types:a}=i.dataTransfer,l=a.some(h=>h===\"Files\"),{allowNewUpload:u}=this.uppy.getState();if(!l||!u){i.dataTransfer.dropEffect=\"none\";return}i.dataTransfer.dropEffect=\"copy\",this.setPluginState({isDraggingOver:!0}),(s=(n=this.opts).onDragOver)==null||s.call(n,i)},this.handleDragLeave=i=>{var s,n;i.preventDefault(),i.stopPropagation(),this.setPluginState({isDraggingOver:!1}),(s=(n=this.opts).onDragLeave)==null||s.call(n,i)},this.handleDrop=async i=>{var s,n;i.preventDefault(),i.stopPropagation(),this.setPluginState({isDraggingOver:!1});let a=o(u=>{this.uppy.log(u,\"error\")},\"logDropError\"),l=await ms(i.dataTransfer,{logDropError:a});l.length>0&&(this.uppy.log(\"[DragDrop] Files dropped\"),this.addFiles(l)),(s=(n=this.opts).onDrop)==null||s.call(n,i)},this.type=\"acquirer\",this.id=this.opts.id||\"DragDrop\",this.title=\"Drag & Drop\",this.defaultLocale=uy,this.i18nInit()}renderHiddenFileInput(){var e;let{restrictions:t}=this.uppy.opts;return c(\"input\",{className:\"uppy-DragDrop-input\",type:\"file\",hidden:!0,ref:o(i=>{this.fileInputRef=i},\"ref\"),name:this.opts.inputName,multiple:t.maxNumberOfFiles!==1,accept:(e=t.allowedFileTypes)==null?void 0:e.join(\", \"),onChange:this.onInputChange})}static renderArrowSvg(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon uppy-DragDrop-arrow\",width:\"16\",height:\"16\",viewBox:\"0 0 16 16\"},c(\"path\",{d:\"M11 10V0H5v10H2l6 6 6-6h-3zm0 0\",fillRule:\"evenodd\"}))}renderLabel(){return c(\"div\",{className:\"uppy-DragDrop-label\"},this.i18nArray(\"dropHereOr\",{browse:c(\"span\",{className:\"uppy-DragDrop-browse\"},this.i18n(\"browse\"))}))}renderNote(){return c(\"span\",{className:\"uppy-DragDrop-note\"},this.opts.note)}render(){let e=`uppy-u-reset\n uppy-DragDrop-container\n ${this.isDragDropSupported?\"uppy-DragDrop--isDragDropSupported\":\"\"}\n ${this.getPluginState().isDraggingOver?\"uppy-DragDrop--isDraggingOver\":\"\"}\n `,t={width:this.opts.width,height:this.opts.height};return c(\"button\",{type:\"button\",className:e,style:t,onClick:o(()=>this.fileInputRef.click(),\"onClick\"),onDragOver:this.handleDragOver,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop},this.renderHiddenFileInput(),c(\"div\",{className:\"uppy-DragDrop-inner\"},r.renderArrowSvg(),this.renderLabel(),this.renderNote()))}install(){let{target:e}=this.opts;this.setPluginState({isDraggingOver:!1}),e&&this.mount(e,this)}uninstall(){this.unmount()}};Ss.VERSION=E2.version;var T2={version:\"3.0.1\"},O2={target:null};function Rh(r){var e,t;return(e=(t=r.dataTransfer)==null||(t=t.types)==null?void 0:t.some(i=>i===\"Files\"))!=null?e:!1}o(Rh,\"isFileTransfer\");var Eo=class extends Ce{static{o(this,\"DropTarget\")}constructor(e,t){super(e,{...O2,...t}),this.addFiles=i=>{let s=i.map(n=>({source:this.id,name:n.name,type:n.type,data:n,meta:{relativePath:n.relativePath||null}}));try{this.uppy.addFiles(s)}catch(n){this.uppy.log(n)}},this.handleDrop=async i=>{var s,n,a;if(!Rh(i))return;i.preventDefault(),i.stopPropagation(),(s=i.currentTarget)==null||s.classList.remove(\"uppy-is-drag-over\"),this.setPluginState({isDraggingOver:!1}),this.uppy.iteratePlugins(d=>{d.type===\"acquirer\"&&(d.handleRootDrop==null||d.handleRootDrop(i))});let l=!1,u=o(d=>{this.uppy.log(d,\"error\"),l||(this.uppy.info(d.message,\"error\"),l=!0)},\"logDropError\"),h=await ms(i.dataTransfer,{logDropError:u});h.length>0&&(this.uppy.log(\"[DropTarget] Files were dropped\"),this.addFiles(h)),(n=(a=this.opts).onDrop)==null||n.call(a,i)},this.handleDragOver=i=>{var s,n;Rh(i)&&(i.preventDefault(),i.stopPropagation(),i.dataTransfer.dropEffect=\"copy\",i.currentTarget.classList.add(\"uppy-is-drag-over\"),this.setPluginState({isDraggingOver:!0}),(s=(n=this.opts).onDragOver)==null||s.call(n,i))},this.handleDragLeave=i=>{var s,n,a;Rh(i)&&(i.preventDefault(),i.stopPropagation(),this.setPluginState({isDraggingOver:!1}),(s=i.currentTarget)==null||s.classList.remove(\"uppy-is-drag-over\"),(n=(a=this.opts).onDragLeave)==null||n.call(a,i))},this.addListeners=()=>{let{target:i}=this.opts;if(i instanceof Element?this.nodes=[i]:typeof i==\"string\"&&(this.nodes=et(document.querySelectorAll(i))),!this.nodes||this.nodes.length===0)throw new Error(`\"${i}\" does not match any HTML elements`);
2this.nodes.forEach(s=>{s.addEventListener(\"dragover\",this.handleDragOver,!1),s.addEventListener(\"dragleave\",this.handleDragLeave,!1),s.addEventListener(\"drop\",this.handleDrop,!1)})},this.removeListeners=()=>{this.nodes&&this.nodes.forEach(i=>{i.removeEventListener(\"dragover\",this.handleDragOver,!1),i.removeEventListener(\"dragleave\",this.handleDragLeave,!1),i.removeEventListener(\"drop\",this.handleDrop,!1)})},this.type=\"acquirer\",this.id=this.opts.id||\"DropTarget\"}install(){this.setPluginState({isDraggingOver:!1}),this.addListeners()}uninstall(){this.removeListeners()}};Eo.VERSION=T2.version;var cy={strings:{chooseFiles:\"Choose files\"}};var A2={version:\"4.0.2\"},R2={pretty:!0,inputName:\"files[]\"},Ps=class extends ne{static{o(this,\"FileInput\")}constructor(e,t){super(e,{...R2,...t}),this.input=null,this.id=this.opts.id||\"FileInput\",this.title=\"File Input\",this.type=\"acquirer\",this.defaultLocale=cy,this.i18nInit(),this.render=this.render.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleClick=this.handleClick.bind(this)}addFiles(e){let t=e.map(i=>({source:this.id,name:i.name,type:i.type,data:i}));try{this.uppy.addFiles(t)}catch(i){this.uppy.log(i)}}handleInputChange(e){this.uppy.log(\"[FileInput] Something selected through input...\");let t=et(e.currentTarget.files||[]);this.addFiles(t),e.currentTarget.value=\"\"}handleClick(){this.input.click()}render(){var e;let t={width:\"0.1px\",height:\"0.1px\",opacity:0,overflow:\"hidden\",position:\"absolute\",zIndex:-1},{restrictions:i}=this.uppy.opts;return c(\"div\",{className:\"uppy-FileInput-container\"},c(\"input\",{className:\"uppy-FileInput-input\",style:this.opts.pretty?t:void 0,type:\"file\",name:this.opts.inputName,onChange:this.handleInputChange,multiple:i.maxNumberOfFiles!==1,accept:(e=i.allowedFileTypes)==null?void 0:e.join(\", \"),ref:o(s=>{this.input=s},\"ref\")}),this.opts.pretty&&c(\"button\",{className:\"uppy-FileInput-btn\",type:\"button\",onClick:this.handleClick},this.i18n(\"chooseFiles\")))}install(){let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}};Ps.VERSION=A2.version;var gy=ve(hy(),1);function k2(r,e){let t=r.width/e.width,i=r.height/e.height,s=Math.min(t,i),n=e.width*s,a=e.height*s,l=(r.width-n)/2,u=(r.height-a)/2;return{width:n,height:a,left:l,top:u}}o(k2,\"getCanvasDataThatFitsPerfectlyIntoContainer\");var dy=k2;function U2(r){return r*(Math.PI/180)}o(U2,\"toRadians\");function D2(r,e,t){let i=Math.abs(U2(t));return Math.max((Math.sin(i)*r+Math.cos(i)*e)/e,(Math.sin(i)*e+Math.cos(i)*r)/r)}o(D2,\"getScaleFactorThatRemovesDarkCorners\");var py=D2;function I2(r,e,t){return e.left<r.left?{left:r.left,width:t.width}:e.top<r.top?{top:r.top,height:t.height}:e.left+e.width>r.left+r.width?{left:r.left+r.width-t.width,width:t.width}:e.top+e.height>r.top+r.height?{top:r.top+r.height-t.height,height:t.height}:null}o(I2,\"limitCropboxMovementOnMove\");var fy=I2;function N2(r,e,t){return e.left<r.left?{left:r.left,width:t.left+t.width-r.left}:e.top<r.top?{top:r.top,height:t.top+t.height-r.top}:e.left+e.width>r.left+r.width?{left:t.left,width:r.left+r.width-t.left}:e.top+e.height>r.top+r.height?{top:t.top,height:r.top+r.height-t.top}:null}o(N2,\"limitCropboxMovementOnResize\");var my=N2;var Zn=class extends Ue{static{o(this,\"Editor\")}constructor(e){super(e),this.onRotate90Deg=()=>{let{angle90Deg:t}=this.state,i=t-90;this.setState({angle90Deg:i,angleGranular:0}),this.cropper.scale(1),this.cropper.rotateTo(i);let s=this.cropper.getCanvasData(),n=this.cropper.getContainerData(),a=dy(n,s);this.cropper.setCanvasData(a),this.cropper.setCropBoxData(a)},this.onRotateGranular=t=>{let i=Number(t.target.value);this.setState({angleGranular:i});let{angle90Deg:s}=this.state,n=s+i;this.cropper.rotateTo(n);let a=this.cropper.getImageData(),l=py(a.naturalWidth,a.naturalHeight,i),u=this.cropper.getImageData().scaleX<0?-l:l;this.cropper.scale(u,l)}
2,this.state={angle90Deg:0,angleGranular:0,prevCropboxData:null},this.storePrevCropboxData=this.storePrevCropboxData.bind(this),this.limitCropboxMovement=this.limitCropboxMovement.bind(this)}componentDidMount(){let{opts:e,storeCropperInstance:t}=this.props;this.cropper=new gy.default(this.imgElement,e.cropperOptions),this.imgElement.addEventListener(\"cropstart\",this.storePrevCropboxData),this.imgElement.addEventListener(\"cropend\",this.limitCropboxMovement),t(this.cropper)}componentWillUnmount(){this.cropper.destroy(),this.imgElement.removeEventListener(\"cropstart\",this.storePrevCropboxData),this.imgElement.removeEventListener(\"cropend\",this.limitCropboxMovement)}storePrevCropboxData(){this.setState({prevCropboxData:this.cropper.getCropBoxData()})}limitCropboxMovement(e){let t=this.cropper.getCanvasData(),i=this.cropper.getCropBoxData(),{prevCropboxData:s}=this.state;if(e.detail.action===\"all\"){let n=fy(t,i,s);n&&this.cropper.setCropBoxData(n)}else{let n=my(t,i,s);n&&this.cropper.setCropBoxData(n)}}renderGranularRotate(){let{i18n:e}=this.props,{angleGranular:t}=this.state;return c(\"label\",{role:\"tooltip\",\"aria-label\":`${t}\\xBA`,\"data-microtip-position\":\"top\",className:\"uppy-ImageCropper-rangeWrapper\"},c(\"input\",{className:\"uppy-ImageCropper-range uppy-u-reset\",type:\"range\",onInput:this.onRotateGranular,onChange:this.onRotateGranular,value:t,min:\"-45\",max:\"45\",\"aria-label\":e(\"rotate\")}))}renderRevert(){let{i18n:e,opts:t}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"revert\"),onClick:o(()=>{this.cropper.reset(),this.cropper.setAspectRatio(t.cropperOptions.initialAspectRatio),this.setState({angle90Deg:0,angleGranular:0})},\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"}),c(\"path\",{d:\"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z\"})))}renderRotate(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"rotate\"),onClick:this.onRotate90Deg},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0V0zm0 0h24v24H0V0z\",fill:\"none\"}),c(\"path\",{d:\"M14 10a2 2 0 012 2v7a2 2 0 01-2 2H6a2 2 0 01-2-2v-7a2 2 0 012-2h8zm0 1.75H6a.25.25 0 00-.243.193L5.75 12v7a.25.25 0 00.193.243L6 19.25h8a.25.25 0 00.243-.193L14.25 19v-7a.25.25 0 00-.193-.243L14 11.75zM12 .76V4c2.3 0 4.61.88 6.36 2.64a8.95 8.95 0 012.634 6.025L21 13a1 1 0 01-1.993.117L19 13h-.003a6.979 6.979 0 00-2.047-4.95 6.97 6.97 0 00-4.652-2.044L12 6v3.24L7.76 5 12 .76z\"})))}renderFlip(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"flipHorizontal\"),onClick:o(()=>this.cropper.scaleX(-this.cropper.getData().scaleX||-1),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"}),c(\"path\",{d:\"M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z\"})))}renderZoomIn(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"zoomIn\"),onClick:o(()=>this.cropper.zoom(.1),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",height:\"24\",viewBox:\"0 0 24 24\",width:\"24\"},c(\"path\",{d:\"M0 0h24v24H0V0z\",fill:\"none\"}),c(\"path\",{d:\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\"}),c(\"path\",{d:\"M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z\"})))}renderZoomOut(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"zoomOut\"),onClick:o(()=>this.cropper.zoom(-.1),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0V0z\",fill:\"none\"}),c(\"path\",{d:\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z\"})))}renderCropSquare(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"aspectRatioSquare\"),onClick:o(()=>this.cropper.setAspectRatio(1),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"}),c(\"path\",{d:\"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"})))}renderCropWidescreen(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",className:\"uppy-u-reset uppy-c-btn\",\"aria-label\":e(\"aspectRatioLandscape\"),onClick:o(()=>this.cropper.setAspectRatio(16/9),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M 19,4.9999992 V 17.000001 H 4.9999998 V 6.9999992 H 19 m 0,-2 H 4.9999998 c -1.0999999,0 -1.9999999,0.9000001 -1.9999999,2 V 17.000001 c 0,1.1 0.9,2 1.9999999,2 H 19 c 1.1,0 2,-0.9 2,-2 V 6.9999992 c 0,-1.0999999 -0.9,-2 -2,-2 z\"}),c(\"path\",{fill:\"none\",d:\"M0 0h24v24H0z\"})))}renderCropWidescreenVertical(){let{i18n:e}=this.props;return c(\"button\",{role:\"button tooltip\",\"data-microtip-position\":\"top\",type:\"button\",\"aria-label\":e(\"aspectRatioPortrait\"),className:\"uppy-u-reset uppy-c-btn\",onClick:o(()=>this.cropper.setAspectRatio(9/16),\"onClick\")},c(\"svg\",{\"aria-hidden\":\"true\",className:\"uppy-c-icon\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M 19.000001,19 H 6.999999 V 5 h 10.000002 v 14 m 2,0 V 5 c 0,-1.0999999 -0.9,-1.9999999 -2,-1.9999999 H 6.999999 c -1.1,0
2-2,0.9 -2,1.9999999 v 14 c 0,1.1 0.9,2 2,2 h 10.000002 c 1.1,0 2,-0.9 2,-2 z\"}),c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"})))}render(){let{currentImage:e,opts:t}=this.props,{actions:i}=t,s=URL.createObjectURL(e.data);return c(\"div\",{className:\"uppy-ImageCropper\"},c(\"div\",{className:\"uppy-ImageCropper-container\"},c(\"img\",{className:\"uppy-ImageCropper-image\",alt:e.name,src:s,ref:o(n=>{this.imgElement=n},\"ref\")})),c(\"div\",{className:\"uppy-ImageCropper-controls\"},i.revert&&this.renderRevert(),i.rotate&&this.renderRotate(),i.granularRotate&&this.renderGranularRotate(),i.flip&&this.renderFlip(),i.zoomIn&&this.renderZoomIn(),i.zoomOut&&this.renderZoomOut(),i.cropSquare&&this.renderCropSquare(),i.cropWidescreen&&this.renderCropWidescreen(),i.cropWidescreenVertical&&this.renderCropWidescreenVertical()))}};var yy={strings:{revert:\"Reset\",rotate:\"Rotate 90\\xB0\",zoomIn:\"Zoom in\",zoomOut:\"Zoom out\",flipHorizontal:\"Flip horizontally\",aspectRatioSquare:\"Crop square\",aspectRatioLandscape:\"Crop landscape (16:9)\",aspectRatioPortrait:\"Crop portrait (9:16)\"}};var L2={version:\"3.1.0\"},vy={viewMode:0,background:!1,autoCropArea:1,responsive:!0,minCropBoxWidth:70,minCropBoxHeight:70,croppedCanvasOptions:{},initialAspectRatio:0},by={revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!0,cropWidescreen:!0,cropWidescreenVertical:!0},M2={quality:.8,actions:by,cropperOptions:vy},_s=class extends ne{static{o(this,\"ImageEditor\")}constructor(e,t){super(e,{...M2,...t,actions:{...by,...t?.actions},cropperOptions:{...vy,...t?.cropperOptions}}),this.save=()=>{let i=o(a=>{var l;let{currentImage:u}=this.getPluginState();this.uppy.setFileState(u.id,{data:new File([a],(l=u.name)!=null?l:this.i18n(\"unnamed\"),{type:a.type}),size:a.size,preview:void 0});let h=this.uppy.getFile(u.id);
2this.uppy.emit(\"thumbnail:request\",h),this.setPluginState({currentImage:h}),this.uppy.emit(\"file-editor:complete\",h)},\"saveBlobCallback\"),{currentImage:s}=this.getPluginState(),n=this.cropper.getCroppedCanvas({});n.width%2!==0&&this.cropper.setData({width:n.width-1}),n.height%2!==0&&this.cropper.setData({height:n.height-1}),this.cropper.getCroppedCanvas(this.opts.cropperOptions.croppedCanvasOptions).toBlob(i,s.type,this.opts.quality)},this.storeCropperInstance=i=>{this.cropper=i},this.selectFile=i=>{this.uppy.emit(\"file-editor:start\",i),this.setPluginState({currentImage:i})},this.id=this.opts.id||\"ImageEditor\",this.title=\"Image Editor\",this.type=\"editor\",this.defaultLocale=yy,this.i18nInit()}canEditFile(e){if(!e.type||e.isRemote)return!1;let t=e.type.split(\"/\")[1];return!!/^(jpe?g|gif|png|bmp|webp)$/.test(t)}install(){this.setPluginState({currentImage:null});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){let{currentImage:e}=this.getPluginState();if(e){let t=this.uppy.getFile(e.id);this.uppy.emit(\"file-editor:cancel\",t)}this.unmount()}render(){let{currentImage:e}=this.getPluginState();return e===null||e.isRemote?null:c(Zn,{currentImage:e,storeCropperInstance:this.storeCropperInstance,save:this.save,opts:this.opts,i18n:this.i18n})}};_s.VERSION=L2.version;var B2={version:\"4.0.0\"},z2={fixed:!1,hideAfterFinish:!0},xs=class extends ne{static{o(this,\"ProgressBar\")}constructor(e,t){super(e,{...z2,...t}),this.id=this.opts.id||\"ProgressBar\",this.title=\"Progress Bar\",this.type=\"progressindicator\",this.render=this.render.bind(this)}render(e){let t=e.totalProgress||0,i=(t===0||t===100)&&this.opts.hideAfterFinish;return c(\"div\",{className:\"uppy uppy-ProgressBar\",style:{position:this.opts.fixed?\"fixed\":\"initial\"},\"aria-hidden\":i},c(\"div\",{className:\"uppy-ProgressBar-inner\",style:{width:`${t}%`}}),c(\"div\",{className:\"uppy-ProgressBar-percentage\"},t))}install(){let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}};xs.VERSION=B2.version;var j2={__proto__:null,\"audio/mp3\":\"mp3\",\"audio/mp4\":\"mp4\",\"audio/ogg\":\"ogg\",\"audio/webm\":\"webm\",\"image/gif\":\"gif\",\"image/heic\":\"heic\",\"image/heif\":\"heif\",\"image/jpeg\":\"jpg\",\"image/png\":\"png\",\"image/svg+xml\":\"svg\",\"video/mp4\":\"mp4\",\"video/ogg\":\"ogv\",\"video/quicktime\":\"mov\",\"video/webm\":\"webm\",\"video/x-matroska\":\"mkv\",\"video/x-msvideo\":\"avi\"};function zr(r){return[r]=r.split(\";\",1),j2[r]||null}o(zr,\"getFileTypeExtension\");function Dh(){var r;return typeof MediaRecorder==\"function\"&&typeof((r=MediaRecorder.prototype)==null?void 0:r.start)==\"function\"}o(Dh,\"supportsMediaRecorder\");function Ih(r){let{recording:e,onStartRecording:t,onStopRecording:i,i18n:s}=r;return e?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Audio-button\",type:\"button\",title:s(\"stopAudioRecording\"),\"aria-label\":s(\"stopAudioRecording\"),onClick:i,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"100\",height:\"100\",viewBox:\"0 0 100 100\"},c(\"rect\",{x:\"15\",y:\"15\",width:\"70\",height:\"70\"}))):c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Audio-button\",type:\"button\",title:s(\"startAudioRecording\"),\"aria-label\":s(\"startAudioRecording\"),onClick:t,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"14px\",height:\"20px\",viewBox:\"0 0 14 20\"},c(\"path\",{d:\"M7 14c2.21 0 4-1.71 4-3.818V3.818C11 1.71 9.21 0 7 0S3 1.71 3 3.818v6.364C3 12.29 4.79 14 7 14zm6.364-7h-.637a.643.643 0 0 0-.636.65V9.6c0 3.039-2.565 5.477-5.6 5.175-2.645-.264-4.582-2.692-4.582-5.407V7.65c0-.36-.285-.65-.636-.65H.636A.643.643 0 0 0 0 7.65v1.631c0 3.642 2.544 6.888 6.045 7.382v1.387H3.818a.643.643 0 0 0-.636.65v.65c0 .36.285.65.636.65h6.364c.351 0 .636-.29.636-.65v-.65c0-.36-.285-.65-.636-.65H7.955v-1.372C11.363 16.2 14 13.212 14 9.6V7.65c0-.36-.285-.65-.636-.65z\",fill:\"#FFF\",\"fill-rule\":\"nonzero\"})))}o(Ih,\"RecordButton\");function Nh(r){return`${Math.floor(r/60)}:${String(r%60).padStart(2,\"0\")}`}o(Nh,\"formatSeconds\");function Lh(r){let{recordingLengthSeconds:e,i18n:t}=r,i=Nh(e);return c(\"span\",{\"aria-label\":t(\"recordingLength\",{recording_length:i})},i)}o(Lh,\"RecordingLength\");var wy=o(r=>{let{currentDeviceId:e,audioSources:t,onChangeSource:i}=r;return c(\"div\",{className:\"uppy-Audio-videoSource\"},c(\"select\",{className:\"uppy-u-reset uppy-Audio-audioSource-select\",onChange:o(s=>{i(s.target.value)},\"onChange\")},t.map(s=>c(\"option\",{key:s.deviceId,value:s.deviceId,selected:s.deviceId===e},s.label))))},\"default\");function H2(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}
2o(H2,\"_classPrivateFieldLooseBase\");var q2=0;function $2(r){return\"__private_\"+q2+++\"_\"+r}o($2,\"_classPrivateFieldLooseKey\");function Sy(r){return typeof r==\"function\"}o(Sy,\"isFunction\");function ea(r){return Sy(r)?r():r}o(ea,\"result\");var Mh=$2(\"draw\"),ta=class{static{o(this,\"AudioOscilloscope\")}constructor(e,t){t===void 0&&(t={}),Object.defineProperty(this,Mh,{writable:!0,value:o(()=>this.draw(),\"value\")});let i=t.canvas||{},s=t.canvasContext||{};this.analyser=null,this.bufferLength=0,this.canvas=e,this.width=ea(i.width)||this.canvas.width,this.height=ea(i.height)||this.canvas.height,this.canvas.width=this.width,this.canvas.height=this.height,this.canvasContext=this.canvas.getContext(\"2d\"),this.canvasContext.fillStyle=ea(s.fillStyle)||\"rgb(255, 255, 255)\",this.canvasContext.strokeStyle=ea(s.strokeStyle)||\"rgb(0, 0, 0)\",this.canvasContext.lineWidth=ea(s.lineWidth)||1,this.onDrawFrame=Sy(t.onDrawFrame)?t.onDrawFrame:()=>{}}addSource(e){this.streamSource=e,this.audioContext=this.streamSource.context,this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2048,this.bufferLength=this.analyser.frequencyBinCount,this.source=this.audioContext.createBufferSource(),this.dataArray=new Uint8Array(this.bufferLength),this.analyser.getByteTimeDomainData(this.dataArray),this.streamSource.connect(this.analyser)}draw(){let{analyser:e,dataArray:t,bufferLength:i}=this,s=this.canvasContext,n=this.width,a=this.height;e&&e.getByteTimeDomainData(t),s.fillRect(0,0,n,a),s.beginPath();let l=n*1/i,u=0;i||s.moveTo(0,this.height/2);for(let h=0;h<i;h++){let m=t[h]/128*(a/2);h===0?s.moveTo(u,m):s.lineTo(u,m),u+=l}s.lineTo(n,a/2),s.stroke(),this.onDrawFrame(this),requestAnimationFrame(H2(this,Mh)[Mh])}};function V2(r){let{onSubmit:e,i18n:t}=r;return c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Audio-button uppy-Audio-button--submit\",type:\"button\",title:t(\"submitRecordedFile\"),\"aria-label\":t(\"submitRecordedFile\"),onClick:e,\"data-uppy-super-focusable\":!0},c(\"svg\",{width:\"12\",height:\"9\",viewBox:\"0 0 12 9\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\"},c(\"path\",{fill:\"#fff\",fillRule:\"nonzero\",d:\"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z\"})))}o(V2,\"SubmitButton\");var Py=V2;function W2(r){let{onDiscard:e,i18n:t}=r;return c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Audio-button\",type:\"button\",title:t(\"discardRecordedFile\"),\"aria-label\":t(\"discardRecordedFile\"),onClick:e,\"data-uppy-super-focusable\":!0},c(\"svg\",{width:\"13\",height:\"13\",viewBox:\"0 0 13 13\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",className:\"uppy-c-icon\"},c(\"g\",{fill:\"#FFF\",fillRule:\"evenodd\"},c(\"path\",{d:\"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z\"}),c(\"path\",{d:\"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z\"}))))}o(W2,\"DiscardButton\");var _y=W2;function Bh(r){let{stream:e,recordedAudio:t,onStop:i,recording:s,supportsRecording:n,audioSources:a,showAudioSourceDropdown:l,onSubmit:u,i18n:h,onStartRecording:d,onStopRecording:m,onDiscardRecordedAudio:w,recordingLengthSeconds:y}=r,P=ri(null),D=ri();gr(()=>()=>{D.current=null,i()},[i]),gr(()=>{if(!t&&(D.current=new ta(P.current,{canvas:{width:600,height:600},canvasContext:{lineWidth:2,fillStyle:\"rgb(0,0,0)\",strokeStyle:\"green\"}}),D.current.draw(),e)){let K=new AudioContext().createMediaStreamSource(e);D.current.addSource(K)}},[t,e]);let C=t!=null,O=!C&&n,z=l&&!C&&a&&a.length>1;return c(\"div\",{className:\"uppy-Audio-container\"},c(\"div\",{className:\"uppy-Audio-audioContainer\"},C?c(\"audio\",{className:\"uppy-Audio-player\",controls:!0,src:t}):c(\"canvas\",{ref:P,className:\"uppy-Audio-canvas\"})),c(\"div\",{className:\"uppy-Audio-footer\"},c(\"div\",{className:\"uppy-Audio-audioSourceContainer\"},z?wy(r):null),c(\"div\",{className:\"uppy-Audio-buttonContainer\"},O&&c(Ih,{recording:s,onStartRecording:d,onStopRecording:m,i18n:h}),C&&c(Py,{onSubmit:u,i18n:h}),C&&c(_y,{onDiscard:w,i18n:h})),c(\"div\",{className:\"uppy-Audio-recordingLength\"},!C&&c(Lh,{recordingLengthSeconds:y,i18n:h}))))}o(Bh,\"RecordingScreen\");var xy=o(r=>{let{icon:e,hasAudio:t,i18n:i}=r;return c(\"div\",{className:\"uppy-Audio-permissons\"},c(\"div\",{className:\"uppy-Audio-permissonsIcon\"},e()),c(\"div\",{className:\"uppy-Audio-title\"},i(t?\"allowAudioAccessTitle\":\"noAudioTitle\")),c(\"p\",null,i(t?\"allowAudioAccessDescription\":\"noAudioDescription\")))},\"default\");var Fy={strings:{pluginNameAudio:\"Audio\",startAudioRecording:\"Begin audio recording\",stopAudioRecording:\"
2Stop audio recording\",allowAudioAccessTitle:\"Please allow access to your microphone\",allowAudioAccessDescription:\"In order to record audio, please allow microphone access for this site.\",noAudioTitle:\"Microphone Not Available\",noAudioDescription:\"In order to record audio, please connect a microphone or another audio input device\",recordingStoppedMaxSize:\"Recording stopped because the file size is about to exceed the limit\",recordingLength:\"Recording length %{recording_length}\",submitRecordedFile:\"Submit recorded file\",discardRecordedFile:\"Discard recorded file\"}};function Wh(){return Wh=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},Wh.apply(null,arguments)}o(Wh,\"_extends\");function J(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(J,\"_classPrivateFieldLooseBase\");var G2=0;function dt(r){return\"__private_\"+G2+++\"_\"+r}o(dt,\"_classPrivateFieldLooseKey\");var K2={version:\"2.0.1\"},Fs=dt(\"recordingLengthTimer\"),vt=dt(\"stream\"),Es=dt(\"audioActive\"),Be=dt(\"recordingChunks\"),Me=dt(\"recorder\"),di=dt(\"capturedMediaFile\"),bt=dt(\"mediaDevices\"),ra=dt(\"supportsUserMedia\"),zh=dt(\"hasAudioCheck\"),Cs=dt(\"start\"),jh=dt(\"startRecording\"),ia=dt(\"stopRecording\"),Hh=dt(\"discardRecordedAudio\"),qh=dt(\"submit\"),pi=dt(\"stop\"),$h=dt(\"getAudio\"),Vh=dt(\"changeSource\"),Ts=dt(\"updateSources\"),Os=class extends ne{static{o(this,\"Audio\")}constructor(e,t){super(e,t),Object.defineProperty(this,$h,{value:Y2}),Object.defineProperty(this,zh,{value:X2}),Object.defineProperty(this,Fs,{writable:!0,value:void 0}),Object.defineProperty(this,vt,{writable:!0,value:null}),Object.defineProperty(this,Es,{writable:!0,value:!1}),Object.defineProperty(this,Be,{writable:!0,value:null}),Object.defineProperty(this,Me,{writable:!0,value:null}),Object.defineProperty(this,di,{writable:!0,value:null}),Object.defineProperty(this,bt,{writable:!0,value:void 0}),Object.defineProperty(this,ra,{writable:!0,value:void 0}),Object.defineProperty(this,Cs,{writable:!0,value:o(i=>{if(!J(this,ra)[ra])return Promise.reject(new Error(\"Microphone access not supported\"));J(this,Es)[Es]=!0,J(this,zh)[zh]().then(s=>(this.setPluginState({hasAudio:s}),J(this,bt)[bt].getUserMedia({audio:!0}).then(n=>{J(this,vt)[vt]=n;let a=null,l=n.getAudioTracks();i!=null&&i.deviceId?a=l.findLast(u=>u.getSettings().deviceId===i.deviceId):a=l[0].getSettings().deviceId,J(this,Ts)[Ts](),this.setPluginState({currentDeviceId:a,audioReady:!0})}).catch(n=>{this.setPluginState({audioReady:!1,cameraError:n}),this.uppy.info(n.message,\"error\")})))},\"value\")}),Object.defineProperty(this,jh,{writable:!0,value:o(()=>{J(this,Me)[Me]=new MediaRecorder(J(this,vt)[vt]),J(this,Be)[Be]=[];let i=!1;J(this,Me)[Me].addEventListener(\"dataavailable\",s=>{J(this,Be)[Be].push(s.data);let{restrictions:n}=this.uppy.opts;if(J(this,Be)[Be].length>1&&n.maxFileSize!=null&&!i){let a=J(this,Be)[Be].reduce((d,m)=>d+m.size,0),u=(a-J(this,Be)[Be][0].size)/(J(this,Be)[Be].length-1)*3,h=Math.max(0,n.maxFileSize-u);a>h&&(i=!0,this.uppy.info(this.i18n(\"recordingStoppedMaxSize\"),\"warning\",4e3),J(this,ia)[ia]())}}),J(this,Me)[Me].start(500),J(this,Fs)[Fs]=setInterval(()=>{let s=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:s+1})},1e3),this.setPluginState({isRecording:!0})},\"value\")}),Object.defineProperty(this,ia,{writable:!0,value:o(()=>new Promise(s=>{J(this,Me)[Me].addEventListener(\"stop\",()=>{s()}),J(this,Me)[Me].stop(),clearInterval(J(this,Fs)[Fs]),this.setPluginState({recordingLengthSeconds:0})}).then(()=>(this.setPluginState({isRecording:!1}),J(this,$h)[$h]())).then(s=>{try{J(this,di)[di]=s,this.setPluginState({recordedAudio:URL.createObjectURL(s.data)})}catch(n){n.isRestriction||this.uppy.log(n)}}).then(()=>{J(this,Be)[Be]=null,J(this,Me)[Me]=null},s=>{throw J(this,Be)[Be]=null,J(this,Me)[Me]=null,s}),\"value\")}),Object.defineProperty(this,Hh,{writable:!0,value:o(()=>
2{this.setPluginState({recordedAudio:null}),J(this,di)[di]=null},\"value\")}),Object.defineProperty(this,qh,{writable:!0,value:o(()=>{try{J(this,di)[di]&&this.uppy.addFile(J(this,di)[di])}catch(i){i.isRestriction||this.uppy.log(i,\"warning\")}},\"value\")}),Object.defineProperty(this,pi,{writable:!0,value:o(async()=>{J(this,vt)[vt]&&J(this,vt)[vt].getAudioTracks().forEach(s=>s.stop()),J(this,Me)[Me]&&await new Promise(i=>{J(this,Me)[Me].addEventListener(\"stop\",i,{once:!0}),J(this,Me)[Me].stop(),clearInterval(J(this,Fs)[Fs])}),J(this,Be)[Be]=null,J(this,Me)[Me]=null,J(this,Es)[Es]=!1,J(this,vt)[vt]=null,this.setPluginState({recordedAudio:null,isRecording:!1,recordingLengthSeconds:0})},\"value\")}),Object.defineProperty(this,Vh,{writable:!0,value:o(i=>{J(this,pi)[pi](),J(this,Cs)[Cs]({deviceId:i})},\"value\")}),Object.defineProperty(this,Ts,{writable:!0,value:o(()=>{J(this,bt)[bt].enumerateDevices().then(i=>{this.setPluginState({audioSources:i.filter(s=>s.kind===\"audioinput\")})})},\"value\")}),J(this,bt)[bt]=navigator.mediaDevices,J(this,ra)[ra]=J(this,bt)[bt]!=null,this.id=this.opts.id||\"Audio\",this.type=\"acquirer\",this.icon=()=>c(\"svg\",{className:\"uppy-DashboardTab-iconAudio\",\"aria-hidden\":\"true\",focusable:\"false\",width:\"32px\",height:\"32px\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M21.143 12.297c.473 0 .857.383.857.857v2.572c0 3.016-2.24 5.513-5.143 5.931v2.64h2.572a.857.857 0 110 1.714H12.57a.857.857 0 110-1.714h2.572v-2.64C12.24 21.24 10 18.742 10 15.726v-2.572a.857.857 0 111.714 0v2.572A4.29 4.29 0 0016 20.01a4.29 4.29 0 004.286-4.285v-2.572c0-.474.384-.857.857-.857zM16 6.5a3 3 0 013 3v6a3 3 0 01-6 0v-6a3 3 0 013-3z\",fill:\"currentcolor\",\"fill-rule\":\"nonzero\"})),this.defaultLocale=Fy,this.opts={...t},this.i18nInit(),this.title=this.i18n(\"pluginNameAudio\"),this.setPluginState({hasAudio:!1,audioReady:!1,cameraError:null,recordingLengthSeconds:0,audioSources:[],currentDeviceId:null})}render(){J(this,Es)[Es]||J(this,Cs)[Cs]();let e=this.getPluginState();return!e.audioReady||!e.hasAudio?c(xy,{icon:this.icon,i18n:this.i18n,hasAudio:e.hasAudio}):c(Bh,Wh({},e,{onChangeSource:J(this,Vh)[Vh],onStartRecording:J(this,jh)[jh],onStopRecording:J(this,ia)[ia],onDiscardRecordedAudio:J(this,Hh)[Hh],onSubmit:J(this,qh)[qh],onStop:J(this,pi)[pi],i18n:this.i18n,showAudioSourceDropdown:this.opts.showAudioSourceDropdown,supportsRecording:Dh(),recording:e.isRecording,stream:J(this,vt)[vt]}))}install(){this.setPluginState({audioReady:!1,recordingLengthSeconds:0});let{target:e}=this.opts;e&&this.mount(e,this),J(this,bt)[bt]&&(J(this,Ts)[Ts](),J(this,bt)[bt].ondevicechange=()=>{if(J(this,Ts)[Ts](),J(this,vt)[vt]){let t=!0,{audioSources:i,currentDeviceId:s}=this.getPluginState();i.forEach(n=>{s===n.deviceId&&(t=!1)}),t&&(J(this,pi)[pi](),J(this,Cs)[Cs]())}})}uninstall(){J(this,vt)[vt]&&J(this,pi)[pi](),this.unmount()}};function X2(){return J(this,bt)[bt]?J(this,bt)[bt].enumerateDevices().then(r=>r.some(e=>e.kind===\"audioinput\")):Promise.resolve(!1)}o(X2,\"_hasAudioCheck2\");function Y2(){let r=J(this,Be)[Be].find(n=>{var a;return((a=n.type)==null?void 0:a.length)>0}).type,e=zr(r);if(!e)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type \"${r}\"`));let t=`audio-${Date.now()}.${e}`,i=new Blob(J(this,Be)[Be],{type:r}),s={source:this.id,name:t,data:new Blob([i],{type:r}),type:r};return Promise.resolve(s)}o(Y2,\"_getAudio2\");Os.VERSION=K2.version;var Ey={strings:{pluginNameBox:\"Box\"}};var J2={version:\"3.1.0\"},fi=class extends ne{static{o(this,\"Box\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.id=this.opts.id||\"Box\",this.type=\"acquirer\",this.storage=this.opts.storage||Xe,this.files=[],this.icon=()=>c(\"svg\",{className:\"uppy-DashboardTab-iconBox\",\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"g\",{fill:\"currentcolor\",fillRule:\"nonzero\"},c(\"path\",{d:\"m16.4 13.5c-1.6 0-3 0.9-3.7 2.2-0.7-1.3-2.1-2.2-3.7-2.2-1 0-1.8 0.3-2.5 0.8v-3.6c-0.1-0.3-0.5-0.7-1-0.7s-0.8 0.4-0.8 0.8v7c0 2.3 1.9 4.2 4.2 4.2 1.6 0 3-0.9 3.7-2.2 0.7 1.3 2.1 2.2 3.7 2.2 2.3 0 4.2-1.9 4.2-4.2 0.1-2.4-1.8-4.3-4.1-4.3m-7.5 6.8c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5m7.5 0c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5\"}),c(\"path\",{d:\"m27.2 20.6l-2.3-2.8 2.3-2.8c0.3-0.4 0.2-0.9-0.2-1.2s-1-0.2-1.3 0.2l-2 2.4-2-2.4c-0.3-0.4-0.9-0.4-1.3-0.2-0.4 0.3-0.5 0.8-0.2 1.2l2.3 2.8-2.3 2.8c-0.3 0.4-0.2 0.9 0.2
21.2s1 0.2 1.3-0.2l2-2.4 2 2.4c0.3 0.4 0.9 0.4 1.3 0.2 0.4-0.3 0.4-0.8 0.2-1.2\"}))),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"box\",pluginId:this.id,supportsRefreshToken:!1}),this.defaultLocale=Ey,this.i18nInit(),this.title=this.i18n(\"pluginNameBox\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};fi.VERSION=J2.version;var Cy={strings:{pluginNameDropbox:\"Dropbox\"}};var Q2={version:\"4.1.0\"},mi=class extends ne{static{o(this,\"Dropbox\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.id=this.opts.id||\"Dropbox\",this.type=\"acquirer\",this.storage=this.opts.storage||Xe,this.files=[],this.icon=()=>c(\"svg\",{className:\"uppy-DashboardTab-iconDropbox\",\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M10.5 7.5L5 10.955l5.5 3.454 5.5-3.454 5.5 3.454 5.5-3.454L21.5 7.5 16 10.955zM10.5 21.319L5 17.864l5.5-3.455 5.5 3.455zM16 17.864l5.5-3.455 5.5 3.455-5.5 3.455zM16 25.925l-5.5-3.455 5.5-3.454 5.5 3.454z\",fill:\"currentcolor\",fillRule:\"nonzero\"})),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"dropbox\",pluginId:this.id,supportsRefreshToken:!0}),this.defaultLocale=Cy,this.i18nInit(),this.title=this.i18n(\"pluginNameDropbox\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};mi.VERSION=Q2.version;var Ty={strings:{pluginNameFacebook:\"Facebook\"}};var Z2={version:\"4.1.0\"},gi=class extends ne{static{o(this,\"Facebook\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.id=this.opts.id||\"Facebook\",this.type=\"acquirer\",this.storage=this.opts.storage||Xe,this.files=[],this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"g\",{fill:\"none\",fillRule:\"evenodd\"},c(\"path\",{d:\"M27 16c0-6.075-4.925-11-11-11S5 9.925 5 16c0 5.49 4.023 10.041 9.281 10.866V19.18h-2.793V16h2.793v-2.423c0-2.757 1.642-4.28 4.155-4.28 1.204 0 2.462.215 2.462.215v2.707h-1.387c-1.366 0-1.792.848-1.792 1.718V16h3.05l-.487 3.18h-2.563v7.686C22.977 26.041 27 21.49 27 16\",fill:\"#1777F2\"}),c(\"path\",{d:\"M20.282 19.18L20.77 16h-3.051v-2.063c0-.87.426-1.718 1.792-1.718h1.387V9.512s-1.258-.215-2.462-.215c-2.513 0-4.155 1.523-4.155 4.28V16h-2.793v3.18h2.793v7.686a11.082 11.082 0 003.438 0V19.18h2.563\",fill:\"#FFFFFE\"}))),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"facebook\",pluginId:this.id,supportsRefreshToken:!1}),this.defaultLocale=Ty,this.i18nInit(),this.title=this.i18n(\"pluginNameFacebook\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){let{partialTree:t,currentFolderId:i}=this.getPluginState();return t.filter(n=>n.type===\"folder\"&&n.parentId===i).length===0?this.view.render(e,{viewType:\"grid\",showFilter:!1,showTitles:!1}):this.view.render(e)}};gi.VERSION=Z2.version;var sa=class extends Ne{static{o(this,\"DriveProviderViews\")}toggleCheckbox(e,t){var i;(i=e.data.custom)!=null&&i.isSharedDrive||super.toggleCheckbox(e,t)}};var Oy={strings:{pluginNameGoogleDrive:\"Google Drive\"}};var eP={version:\"4.1.0\"},yi=class extends ne{static{o(this,\"GoogleDrive\")}constructor(e,t){super(e,t),this.rootFolderId=\"root\",this.type=\"acquirer\",this.storage=this.opts.storage||Xe,this.files=[],this.id=this.opts.id||\"GoogleDrive\",this.icon=()=>
2c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"g\",{fillRule:\"nonzero\",fill:\"none\"},c(\"path\",{d:\"M6.663 22.284l.97 1.62c.202.34.492.609.832.804l3.465-5.798H5c0 .378.1.755.302 1.096l1.361 2.278z\",fill:\"#0066DA\"}),c(\"path\",{d:\"M16 12.09l-3.465-5.798c-.34.195-.63.463-.832.804l-6.4 10.718A2.15 2.15 0 005 18.91h6.93L16 12.09z\",fill:\"#00AC47\"}),c(\"path\",{d:\"M23.535 24.708c.34-.195.63-.463.832-.804l.403-.67 1.928-3.228c.201-.34.302-.718.302-1.096h-6.93l1.474 2.802 1.991 2.996z\",fill:\"#EA4335\"}),c(\"path\",{d:\"M16 12.09l3.465-5.798A2.274 2.274 0 0018.331 6h-4.662c-.403 0-.794.11-1.134.292L16 12.09z\",fill:\"#00832D\"}),c(\"path\",{d:\"M20.07 18.91h-8.14l-3.465 5.798c.34.195.73.292 1.134.292h12.802c.403 0 .794-.11 1.134-.292L20.07 18.91z\",fill:\"#2684FC\"}),c(\"path\",{d:\"M23.497 12.455l-3.2-5.359a2.252 2.252 0 00-.832-.804L16 12.09l4.07 6.82h6.917c0-.377-.1-.755-.302-1.096l-3.188-5.359z\",fill:\"#FFBA00\"}))),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"drive\",pluginId:this.id,supportsRefreshToken:!0}),this.defaultLocale=Oy,this.i18nInit(),this.title=this.i18n(\"pluginNameGoogleDrive\"),this.render=this.render.bind(this)}install(){this.view=new sa(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};yi.VERSION=eP.version;var Ay={strings:{pluginNameGooglePhotos:\"Google Photos\"}};var tP={version:\"0.3.0\"},vi=class extends ne{static{o(this,\"GooglePhotos\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.type=\"acquirer\",this.storage=this.opts.storage||Xe,this.files=[],this.id=this.opts.id||\"GooglePhotos\",this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"-7 -7 73 73\"},c(\"g\",{fill:\"none\",\"fill-rule\":\"evenodd\"},c(\"path\",{d:\"M-3-3h64v64H-3z\"}),c(\"g\",{\"fill-rule\":\"nonzero\"},c(\"path\",{fill:\"#FBBC04\",d:\"M14.8 13.4c8.1 0 14.7 6.6 14.7 14.8v1.3H1.3c-.7 0-1.3-.6-1.3-1.3
2C0 20 6.6 13.4 14.8 13.4z\"}),c(\"path\",{fill:\"#EA4335\",d:\"M45.6 14.8c0 8.1-6.6 14.7-14.8 14.7h-1.3V1.3c0-.7.6-1.3 1.3-1.3C39 0 45.6 6.6 45.6 14.8z\"}),c(\"path\",{fill:\"#4285F4\",d:\"M44.3 45.6c-8.2 0-14.8-6.6-14.8-14.8v-1.3h28.2c.7 0 1.3.6 1.3 1.3 0 8.2-6.6 14.8-14.8 14.8z\"}),c(\"path\",{fill:\"#34A853\",d:\"M13.4 44.3c0-8.2 6.6-14.8 14.8-14.8h1.3v28.2c0 .7-.6 1.3-1.3 1.3-8.2 0-14.8-6.6-14.8-14.8z\"})))),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"googlephotos\",pluginId:this.id,supportsRefreshToken:!0}),this.defaultLocale=Ay,this.i18nInit(),this.title=this.i18n(\"pluginNameGooglePhotos\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider,loadAllFiles:!0});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){let{partialTree:t,currentFolderId:i}=this.getPluginState();return t.filter(n=>n.type===\"folder\"&&n.parentId===i).length===0?this.view.render(e,{viewType:\"grid\",showFilter:!1,showTitles:!1}):this.view.render(e)}};vi.VERSION=tP.version;var Ry={strings:{pluginNameInstagram:\"Instagram\"}};var rP={version:\"4.1.0\"},bi=class extends ne{static{o(this,\"Instagram\")}constructor(e,t){super(e,t),this.rootFolderId=\"recent\",this.type=\"acquirer\",this.files=[],this.storage=this.opts.storage||Xe,this.id=this.opts.id||\"Instagram\",this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"defs\",null,c(\"path\",{d:\"M16.825 5l.483-.001.799.002c1.168.005 1.598.021 2.407.057 1.17.05 1.97.235 2.67.506.725.28 1.34.655 1.951 1.265.613.61.99 1.223 1.273 1.946.273.7.46 1.498.516 2.67l.025.552.008.205c.029.748.037 1.51.042 3.777l.001.846v.703l-.001.398a50.82 50.82 0 01-.058 2.588c-.05 1.17-.235 1.97-.506 2.67a5.394 5.394 0 01-1.265 1.951c-.61.613-1.222.99-1.946 1.273-.699.273-1.498.46-2.668.516-.243.012-.451.022-.656.03l-.204.007c-.719.026-1.512.034-3.676.038l-.847.001h-1.1a50.279 50.279 0 01-2.587-.059c-1.171-.05-1.971-.235-2.671-.506a5.394 5.394 0 01-1.951-1.265 5.385 5.385 0 01-1.272-1.946c-.274-.699-.46-1.498-.517-2.668a88.15 88.15 0 01-.03-.656l-.007-.205c-.026-.718-.034-1.512-.038-3.674v-2.129c.006-1.168.022-1.597.058-2.406.051-1.171.235-1.971.506-2.672a5.39 5.39 0 011.265-1.95 5.381 5.381 0 011.946-1.272c.699-.274 1.498-.462 2.669-.517l.656-.03.204-.007c.718-.026 1.511-.034 3.674-.038zm.678 1.981h-1.226l-.295.001c-2.307.005-3.016.013-3.777.043l-.21.009-.457.02c-1.072.052-1.654.232-2.042.383-.513.2-.879.44-1.263.825a3.413 3.413 0 00-.82 1.267c-.15.388-.33.97-.375 2.043a48.89 48.89 0 00-.056 2.482v.398 1.565c.006 2.937.018 3.285.073 4.444.05 1.073.231 1.654.382 2.043.2.512.44.878.825 1.263.386.383.753.621 1.267.82.388.15.97.328 2.043.374.207.01.388.017.563.024l.208.007a63.28 63.28 0 002.109.026h1.564c2.938-.006 3.286-.019 4.446-.073 1.071-.051 1.654-.232 2.04-.383.514-.2.88-.44 1.264-.825.384-.386.622-.753.82-1.266.15-.389.328-.971.375-2.044.039-.88.054-1.292.057-2.723v-1.15-.572c-.006-2.936-.019-3.284-.074-4.445-.05-1.071-.23-1.654-.382-2.04-.2-.515-.44-.88-.825-1.264a3.405 3.405 0 00-1.267-.82c-.388-.15-.97-.328-2.042-.375a48.987 48.987 0 00-2.535-.056zm-1.515 3.37a5.65 5.65 0 11.021 11.299 5.65 5.65 0 01-.02-11.3zm.004 1.982a3.667 3.667 0 10.015 7.334 3.667 3.667 0 00-.015-7.334zm5.865-3.536a1.32 1.32 0 11.005 2.64 1.32 1.32 0 01-.005-2.64z\",id:\"a\"})),c(\"g\",{fill:\"none\",\"fill-rule\":\"evenodd\"},c(\"mask\",{id:\"b\",fill:\"#fff\"},c(\"use\",{xlinkHref:\"#a\"})),c(\"image\",{mask:\"url(#b)\",x:\"4\",y:\"4\",width:\"24\",height:\"24\",xlinkHref:\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALKADAAQAAAABAAAALAAAAAD8buejAAALZklEQVRYCVWZC2LbNhAFCRKykvP0bD1506SxRKIzbwHJoU3jv5h9WICU3P7+6zlG2zZvr8s/rW1tN7U0rMll8aDYufdzbLfc1JHmpv3jpPy8tsO+3O2s/O6YMSjTl/qdCds4mIIG60m8vdq2Z+phm2V4vAb9+o7BbZeuoM0NyYazvTvbvlN1MGjHUAesZ/IWWOsCeF0BOwAK4ITR0WYd/QKHEPv2DEymmorZtiubjOHEMYEzXmC9GMxu+95Kz+kuwxjDBKb8iUoCAdqZoAeyALreW6ZNx9Y4Jz8cLwjTZOEoR+HU05k2RzgP2
2iafGgfZiEdZbEr94zpX/xkPtDtGAxF+LRcgTsp9CAZg0rnEnXmPqFshY5vLnVWxLXO/bah2sZQgBZppGSe8NbjNPN5kc/WbIYEn8U+jXCOezT4zfgS1eoVEhceVeK74Fe4N6CoYEoLWykzHsd+GMAUqdTTVvvqT1uWqB3lVCLb12/ORAe8/5Zu9mp7lqoEFUCAFDIxqz7i1bq2AY1U9jqq2QK/7DYl+1AeZlAFcEc+U/jkRUqsvCHQ/nyGvjrOl6EuZWRWVGCKUMCkntQ5o+u2AZ3OxakbTcoBZnY0xhgGCUM4Kp1xtBTnBnXM5ASRms/Fs7d9OpX8bXN45pibQY/ML1MmA5G9CINBuCpdftexr6i2c5qd9J441LNJm3zk1GVusJ7v6mPJ7HPxJR0Li/vg9O1XHTEgvsQoSgExU0NnlLF0paK+6d06aOMKE2nCKV0ofNw4WsWmLsWrv6lPLnhGpr9E137QkHOMB/jh/T8MOqOadXarR44zPBW5NvDccnBxVmdK81+7RQ5p6qnQoRDZPh9+xWj0N2XpqxX1HzMty9UlFnKya/h3gulziAsyxwkSmpTIPB8vagKLyktRdDuBEHNGZMm4oCFWgjq31WPHpaC93gGNqpOpP4Ez4spa+nMNvhTWcuPKAJ79fqIxVoUvdjEG9qSy2WhpQlz61yG/gnKEA25IrIOYK6DIsQs2EE9LR/sTKq38Nd1y/X//FXG0QDHkEqSz3EYVV2dhb00rgLPSDcqmrScs55NNOD2zVqKmYnYTFnkACp520dkW5vBxK99BVzr792/iZ+VVo92UkKU2oG5WFTb6mNiA1H2C8KC0E44qaQleR3EQvQNwLrECOVAiSwM5gpF7nvDND0lZvYuQ9JbZfqdTrqCgwMcVrRS0z9QkLu9NWmkgEHb8p2zDRylj9VWA3lXD2vObEdWpT3w5MiFqQ1W/lteG4eipastxv2w+TeTBP0ypK84HiOW9fUzLcjRDwCW2b2VxmnGSKTX6uRSwMnC9YX4l05Mh2uwI+QVWdWUOSTWd5Xjjf7/tPYk2stSh053XTGN5RJMCMSajMcS8Trn3j/E1ajthlxCkmJXVi47PSUsyyq+jyexsayQNuv5GVYJaszprNsQD3RkgYiy49kFl2JlJJxlf8Uu/lpkq7+aWqzEzjr5cTVpFaJvSVr8AKRtiTlVPFk5t1nO30W+o6jrbAk76kxFa/tX+dom4C1wDPk03gqCw8HTBSxx4FHxIA+mh2pM3rKu5SNqBAuOSZnHzsB9JwW7DV/ge8dlVsOh375PvH8YO8EALU1HuecIC6qQgXifNuSx9XAoLaoGIYDjkWFrawX1U1XrknuMFw7QBSPtg79XovmBvwqnDICrhClEO6wgKFj9vPqJWlthUvdgH1DOA8+wFMexzQc5BUS1d1IsdBSjEv4Fe1LgBO1CpFPTpV1JuPSFNt4y/trzbtaUfwBWwM3/6JsrL6MSQYwLKXAm9YJBxsM8992MblZ63Gami0+rnwOMyPykVpQsyl9eYNOfVC6kRBkwaop//LgcAKWivkHF791g0JK5kMmCgKPas2QRkUFQsuTvm6R1946Wg95k764ZRLW59yO5UVGsawwELupCfAbdCuAwvcz5Xk18rIVEdgSRBRgO77R206QdXHuA2goaGiCQ0GmUfN1JlmFayjv0IcKGkfYt4HAj0yuQBRGDjzuS/rTmAf29Gov1S+FF7QBayNcpoBOEsMt3vFcIUC7VxOnE+pxmkgqEzduzwsPykrjBszCusgdarsRIAL6CM/KqsqcAf1vj8P1TXFyN6e5G8ao48fjKfDQJYizIdIfb+Xwp6Z2fE2C7mUfUEzMKqSBp4VUV1A49Sz1M2LzVzahEfyHUAcQNltR0nADYkBvHXDZQo8H9dQvHF7qhjPtSolBJ0A/vaLwdRz5YFFGoWBy8E/4aKcjqimaUBXXnjBpzOZnMlIVXsTVEBBUa+dD0BR0xVopgAD70psY0KjMHpmHB2kApea9o23NS83mpsref5OZet4U/0CMhSEDpwnxB9lVKSfk5djllXRFPizQmKcqMpnyZ3ycPntf96Ym9ChzU8vCQnhgWZ2UuySArw+cVBG4gqNCS6YoSEEziRWVStKUpe4FfCd91V0XA/qgOJuF7FpGjjyQgsFoNDtibp8cm+cyXxbB6zh4pMUO4H06yzsv4E/A6rg/uRJRnMRmrhMDIhyOjABX9CMDFhBFxx19KujjqWeim5PwVFU6IBiewfyk7IPETcg52kjXN7nsbaoEykKf/cjUgVxpTZZVtnqFMgv4FHa8oSOisawinMLHfUBzJcK1j8BeqquedKDtgcgnA4bym4P6gBWYVM3W/pn41ku5L4RElFWtlk5SXHEThhOWDiIyVROlQNM+wyHimlgATI/PPIm4BB8qfqwHnhgL89gzs+Ww1xQb4821SZ/4IwOJiRqH/X9u7Hj08JLSZfawOQcpRzwgk1oBNzzcgLn1FBNHspMENik9OG4awIDaUjw9rKNT1KXPl9neua6sSbkgqfs/CNfBdNfDDhQuL4AKXEXeOgZID91eOiRUnEFOIA5rnTkBU0/IT05gByoq5KBJF4Hym4Pxh3UcxZ7HjdhEhKWURbhavNR9rjLBwk3ryDcrGzfvk9I69b1yhMGWQ4bqMwv/RMSplQkjjVKXzZX8wESVcuB7QG0YUCMjk/aOmWgc/vC4oMCVYfghIGP6MT1zpeUhM1rQzOnGxmFKwTCir1Xaj5vN7T7nDZvnbDGHbCKnwji2zofNsOvbold3zlUtKGosBun3PbJSrrReHEaCQVCIDEMaCCBs+P+AbybkbIhmbNecGwF+E5/L2ECuPKCWsUESQkKnyyJ93TGACk7OrAY9P8XG//fGCoM7DAEUGnj5Mw7aQfelySWOm9iPuFyvrL8rKQR6mM6qdCUDQsfNPVu4yv/HaPOT1e/yDaviMKmTkg/I/F7MUG9OlrmDrBLRVd3c8KBJlPEKoVRcIJuhoQAmZDUkPC00W5OI1dOpQ1F61kFNqr9SmFcaHdBheOaDHF6QZMOP6QyiZ804oj98wLiAMIgcWw4UDYkDAWfR+4d5s0zP2GgUZX04i+NeSgYGokvbDhIZYUWHgd9K8zZzir264NxZUFbsfM1jdqpV2naA48tx6hsvBSabE4IMtlcOGgq8PqCjoly2rw2soqy4RJWQtPZl6PUCU14ZUWENuZV2Honn3f+k6R6wrkqgTStyQ0bFY+XAaafMRFgUlVeXxXFUcpLEYfZz3FrVUzZrOOJK+4B/wnIZ8TGRvb9OB8EUM0w8uNYj/oa9iK9AMoy6gA72o02srMxpAPUD+EDnVEF7P5xw896VyAbFk8MgnpVpR3gfLnt/wECq3rYFvYLcKCpqvcI+/hVl8AumXDeApklDRRKJSS+KOaq1Rgg4igOYtiQK1hJy46TBtDjznDp3iqJff5j0/LfSZbYVdauqXccJ9W+czupp0sU9gMlqkQ52lU1E6tUwoDUukAD6YRpAwqDrAErzA8QCRvXm98KEep0xIdY1CN1ye27IP0IHvvYIW18qGz8S7VWUZuMkUOb3P8DHTl67ur/i1UAAAAASUVORK5CYII=\"}))),this.defaultLocale=Ry,this.i18nInit(),this.title=this.i18n(\"pluginNameInstagram\"),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"instagram\",pluginId:this.id,supportsRefreshToken:!1}),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider,viewType:\"grid\",showTitles:!1,show
2Filter:!1,showBreadcrumbs:!1});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};bi.VERSION=rP.version;var ky={strings:{pluginNameOneDrive:\"OneDrive\"}};var iP={version:\"4.1.0\"},wi=class extends ne{static{o(this,\"OneDrive\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.type=\"acquirer\",this.files=[],this.storage=this.opts.storage||Xe,this.id=this.opts.id||\"OneDrive\",this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"g\",{fill:\"none\",fillRule:\"nonzero\"},c(\"path\",{d:\"M13.39 12.888l4.618 2.747 2.752-1.15a4.478 4.478 0 012.073-.352 6.858 6.858 0 00-5.527-5.04 6.895 6.895 0 00-6.876 2.982l.07-.002a5.5 5.5 0 012.89.815z\",fill:\"#0364B8\"}),c(\"path\",{d:\"M13.39 12.887v.001a5.5 5.5 0 00-2.89-.815l-.07.002a5.502 5.502 0 00-4.822 2.964 5.43 5.43 0 00.38 5.62l4.073-1.702 1.81-.757 4.032-1.685 2.105-.88-4.619-2.748z\",fill:\"#0078D4\"}),c(\"path\",{d:\"M22.833 14.133a4.479 4.479 0 00-2.073.352l-2.752 1.15.798.475 2.616 1.556 1.141.68 3.902 2.321a4.413 4.413 0 00-.022-4.25 4.471 4.471 0 00-3.61-2.284z\",fill:\"#1490DF\"}),c(\"path\",{d:\"M22.563 18.346l-1.141-.68-2.616-1.556-.798-.475-2.105.88L11.87 18.2l-1.81.757-4.073 1.702A5.503 5.503 0 0010.5 23h12.031a4.472 4.472 0 003.934-2.333l-3.902-2.321z\",fill:\"#28A8EA\"}))),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"onedrive\",pluginId:this.id,supportsRefreshToken:!1}),this.defaultLocale=ky,this.i18nInit(),this.title=this.i18n(\"pluginNameOneDrive\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider,loadAllFiles:!0,virtualList:!0});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};wi.VERSION=iP.version;var Uy={strings:{pluginNameUnsplash:\"Unsplash\"}};var sP={version:\"4.1.0\"},Si=class extends ne{static{o(this,\"Unsplash\")}constructor(e,t){if(super(e,t),this.type=\"acquirer\",this.files=[],this.storage=this.opts.storage||Xe,this.id=this.opts.id||\"Unsplash\",this.defaultLocale=Uy,this.i18nInit(),this.title=this.i18n(\"pluginNameUnsplash\"),this.icon=()=>c(\"svg\",{className:\"uppy-DashboardTab-iconUnsplash\",viewBox:\"0 0 32 32\",height:\"32\",width:\"32\",\"aria-hidden\":\"true\"},c(\"g\",{fill:\"currentcolor\"},c(\"path\",{d:\"M46.575 10.883v-9h12v9zm12 5h10v18h-32v-18h10v9h12z\"}),c(\"path\",{d:\"M13 12.5V8h6v4.5zm6 2.5h5v9H8v-9h5v4.5h6z\"}))),!this.opts.companionUrl)throw new Error(\"Companion hostname is required, please consult https://uppy.io/docs/companion\");this.hostname=this.opts.companionUrl,this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new ls(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionCookiesRule:this.opts.companionCookiesRule,provider:\"unsplash\",pluginId:this.id})}install(){this.view=new si(this,{provider:this.provider,viewType:\"unsplash\",showFilter:!0});let{target:e}=this.opts;e&&this.mount(e,this)}render(e){return this.view.render(e)}uninstall(){this.unmount()}};Si.VERSION=sP.version;function Dy(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Dy,\"_classPrivateFieldLooseBase\");var oP=0;function nP(r){return\"__private_\"+oP+++\"_\"+r}o(nP,\"_classPrivateFieldLooseKey\");var oa=nP(\"handleSubmit\"),Gh=class extends Ue{static{o(this,\"UrlUI\")}constructor(e){super(e),this.form=document.createElement(\"form\"),Object.defineProperty(this,oa,{writable:!0,value:o(t=>{t.preventDefault();let{addFile:i}=this.props,s=this.input.value.trim();i(s)},\"value\")}),this.form.id=dr()}componentDidMount(){this.input.value=\"\",this.form.addEventListener(\"submit\",Dy(this,oa)[oa]),document.body.appendChild(this.form)}componentWillUnmount(){this.form.removeEventListener(\"submit\",Dy(this,oa)[oa]),document.body.removeChild(this.form)}render(){let{i18n:e}=this.props;return c(\"div\",{className:\"uppy-Url\"},c(\"input\",{className:\"uppy-u-reset uppy-c-textInput uppy-Url-input\",type:\"text\",\"aria-label\":e(\"enterUrlToImport\"),placeholder:e(\"enterUrlToImport\"),ref:o(t=>{this.input=t},\"ref\"),\"data-uppy-super-focusable\":!0,form:this.form.id}),c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-c-btn-primary uppy-Url-importButton\",type:\"submit\",form:this.form.id},e(\"import\")))}},Iy=Gh;
2function hu(r,e,t){let i=et(r.items),s;switch(e){case\"paste\":{if(i.some(a=>a.kind===\"file\"))return;s=i.filter(a=>a.kind===\"string\"&&a.type===\"text/plain\");break}case\"drop\":{s=i.filter(n=>n.kind===\"string\"&&n.type===\"text/uri-list\");break}default:throw new Error(`isDropOrPaste must be either 'drop' or 'paste', but it's ${e}`)}s.forEach(n=>{n.getAsString(a=>t(a))})}o(hu,\"forEachDroppedOrPastedUrl\");var Ny={strings:{pluginNameUrl:\"Link\",import:\"Import\",enterUrlToImport:\"Enter URL to import a file\",failedToFetch:\"Companion failed to fetch this URL, please make sure it\\u2019s correct\",enterCorrectUrl:\"Incorrect URL: Please make sure you are entering a direct link to a file\"}};var Ly,aP={version:\"4.1.0\"};function lP(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M23.637 15.312l-2.474 2.464a3.582 3.582 0 01-.577.491c-.907.657-1.897.986-2.968.986a4.925 4.925 0 01-3.959-1.971c-.248-.329-.164-.902.165-1.149.33-.247.907-.164 1.155.164 1.072 1.478 3.133 1.724 4.618.656a.642.642 0 00.33-.328l2.473-2.463c1.238-1.313 1.238-3.366-.082-4.597a3.348 3.348 0 00-4.618 0l-1.402 1.395a.799.799 0 01-1.154 0 .79.79 0 010-1.15l1.402-1.394a4.843 4.843 0 016.843 0c2.062 1.805 2.144 5.007.248 6.896zm-8.081 5.664l-1.402 1.395a3.348 3.348 0 01-4.618 0c-1.319-1.23-1.319-3.365-.082-4.596l2.475-2.464.328-.328c.743-.492 1.567-.739 2.475-.657.906.165 1.648.574 2.143 1.314.248.329.825.411 1.155.165.33-.248.412-.822.165-1.15-.825-1.068-1.98-1.724-3.216-1.888-1.238-.247-2.556.082-3.628.902l-.495.493-2.474 2.464c-1.897 1.969-1.814 5.09.083 6.977.99.904 2.226 1.396 3.463 1.396s2.473-.492 3.463-1.395l1.402-1.396a.79.79 0 000-1.15c-.33-.328-.908-.41-1.237-.082z\",fill:\"#FF753E\",\"fill-rule\":\"nonzero\"}))}o(lP,\"UrlIcon\");function uP(r){let e=/^[a-z0-9]+:\\/\\//,t=\"http://\";return e.test(r)?r:t+r}o(uP,\"addProtocolToURL\");function cP(r){return et(r.dataTransfer.items).filter(i=>i.kind===\"string\"&&i.type===\"text/uri-list\").length>0}o(cP,\"canHandleRootDrop\");function hP(r){return r?.startsWith(\"http://\")||r?.startsWith(\"https://\")}o(hP,\"checkIfCorrectURL\");function dP(r){let{pathname:e}=new URL(r);return e.substring(e.lastIndexOf(\"/\")+1)}o(dP,\"getFileNameFromUrl\");var vr=class r extends ne{static{o(this,\"Url\")}constructor(e,t){if(super(e,t),this.getMeta=i=>this.client.post(\"url/meta\",{url:i}),this.addFile=async(i,s)=>{let n=uP(i);if(!hP(n)){this.uppy.log(`[URL] Incorrect URL entered: ${n}`),this.uppy.info(this.i18n(\"enterCorrectUrl\"),\"error\",4e3);return}try{let a=await this.getMeta(n),l={meta:s,source:this.id,name:a.name||dP(n),type:a.type,data:{size:a.size},isRemote:!0,body:{url:n},remote:{companionUrl:this.opts.companionUrl,url:`${this.hostname}/url/get`,body:{fileId:n,url:n},requestClientId:r.requestClientId}};this.uppy.log(\"[Url] Adding remote file\");
2try{return this.uppy.addFile(l)}catch(u){return u.isRestriction||this.uppy.log(u),u}}catch(a){return this.uppy.log(a),this.uppy.info({message:this.i18n(\"failedToFetch\"),details:a},\"error\",4e3),a}},this.handleRootDrop=i=>{hu(i.dataTransfer,\"drop\",s=>{this.uppy.log(`[URL] Adding file from dropped url: ${s}`),this.addFile(s)})},this.handleRootPaste=i=>{hu(i.clipboardData,\"paste\",s=>{this.uppy.log(`[URL] Adding file from pasted url: ${s}`),this.addFile(s)})},this.id=this.opts.id||\"Url\",this.type=\"acquirer\",this.icon=()=>c(lP,null),this.defaultLocale=Ny,this.i18nInit(),this.title=this.i18n(\"pluginNameUrl\"),this.hostname=this.opts.companionUrl,!this.hostname)throw new Error(\"Companion hostname is required, please consult https://uppy.io/docs/companion\");this.client=new $t(e,{pluginId:this.id,provider:\"url\",companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionCookiesRule:this.opts.companionCookiesRule}),this.uppy.registerRequestClient(r.requestClientId,this.client)}render(){return c(Iy,{i18n:this.i18n,addFile:this.addFile})}install(){let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.unmount()}};Ly=vr;vr.VERSION=aP.version;vr.requestClientId=Ly.name;vr.prototype.canHandleRootDrop=cP;var My={strings:{pluginNameZoom:\"Zoom\"}};var pP={version:\"3.1.0\"},Pi=class extends ne{static{o(this,\"Zoom\")}constructor(e,t){super(e,t),this.rootFolderId=null,this.type=\"acquirer\",this.files=[],this.storage=this.opts.storage||Xe,this.id=this.opts.id||\"Zoom\",this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M24.5 11.125l-2.75 2.063c-.473.353-.75.91-.75 1.5v3.124c0 .59.277 1.147.75 1.5l2.75 2.063a.938.938 0 001.5-.75v-8.75a.938.938 0 00-1.5-.75zm-4.75 9.5c0 1.035-.84 1.875-1.875 1.875H9.75A3.75 3.75 0 016 18.75v-6.875C6 10.84 6.84 10 7.875 10H16a3.75 3.75 0 013.75 3.75v6.875z\",fill:\"#2E8CFF\",\"fill-rule\":\"evenodd\"})),this.opts.companionAllowedHosts=Ke(this.opts.companionAllowedHosts,this.opts.companionUrl),this.provider=new Ge(e,{companionUrl:this.opts.companionUrl,companionHeaders:this.opts.companionHeaders,companionKeysParams:this.opts.companionKeysParams,companionCookiesRule:this.opts.companionCookiesRule,provider:\"zoom\",pluginId:this.id,supportsRefreshToken:!1}),this.defaultLocale=My,this.i18nInit(),this.title=this.i18n(\"pluginNameZoom\"),this.render=this.render.bind(this)}install(){this.view=new Ne(this,{provider:this.provider});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.view.tearDown(),this.unmount()}render(e){return this.view.render(e)}};Pi.VERSION=pP.version;function Kh(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Kh,\"_classPrivateFieldLooseBase\");var fP=0;function mP(r){return\"__private_\"+fP+++\"_\"+r}o(mP,\"_classPrivateFieldLooseKey\");var gP={version:\"2.2.0\"},Xh={__proto__:null,Box:fi,Dropbox:mi,Facebook:gi,GoogleDrive:yi,GooglePhotos:vi,Instagram:bi,OneDrive:wi,Unsplash:Si,Url:vr,Zoom:Pi},yP={sources:Object.keys(Xh)},As=mP(\"installedPlugins\"),Co=class extends Ce{static{o(this,\"RemoteSources\")}constructor(e,t){if(super(e,{...yP,...t}),Object.defineProperty(this,As,{writable:!0,value:new Set}),this.id=this.opts.id||\"RemoteSources\",this.type=\"preset\",this.opts.companionUrl==null)throw new Error(\"Please specify companionUrl for RemoteSources to work, see https://uppy.io/docs/remote-sources#companionUrl\")}setOptions(e){this.uninstall(),super.setOptions(e),this.install()}install(){this.opts.sources.forEach(e=>{var t;let{sources:i,...s}=this.opts,n={...s,companionKeysParams:(t=this.opts.companionKeysParams)==null?void 0:t[e]},a=Xh[e];if(a==null){let l=Object.keys(Xh),u=new Intl.ListFormat(\"en\",{style:\"long\",type:\"disjunction\"});throw new Error(`Invalid plugin: \"${e}\" is not one of: ${u.format(l)}.`)}this.uppy.use(a,n),Kh(this,As)[As].add(this.uppy.getPlugin(e))})}uninstall(){for(let e of Kh(this,As)[As])this.uppy.removePlugin(e);Kh(this,As)[As].clear()}};Co.VERSION=gP.version;function Yh(){return c(\"svg\",{className:\"uppy-DashboardTab-iconScreenRec\",\"aria-hidden\":\"true\",focu
2sable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"g\",{fill:\"currentcolor\",fillRule:\"evenodd\"},c(\"path\",{d:\"M24.182 9H7.818C6.81 9 6 9.742 6 10.667v10c0 .916.81 1.666 1.818 1.666h4.546V24h7.272v-1.667h4.546c1 0 1.809-.75 1.809-1.666l.009-10C26 9.742 25.182 9 24.182 9zM24 21H8V11h16v10z\"}),c(\"circle\",{cx:\"16\",cy:\"16\",r:\"2\"})))}o(Yh,\"ScreenRecIcon\");function Jh(r){let{recording:e,onStartRecording:t,onStopRecording:i,i18n:s}=r;return e?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video uppy-ScreenCapture-button--stop-rec\",type:\"button\",title:s(\"stopCapturing\"),\"aria-label\":s(\"stopCapturing\"),onClick:i,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"100\",height:\"100\",viewBox:\"0 0 100 100\"},c(\"rect\",{x:\"15\",y:\"15\",width:\"70\",height:\"70\"}))):c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--video\",type:\"button\",title:s(\"startCapturing\"),\"aria-label\":s(\"startCapturing\"),onClick:t,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"100\",height:\"100\",viewBox:\"0 0 100 100\"},c(\"circle\",{cx:\"50\",cy:\"50\",r:\"40\"})))}o(Jh,\"RecordButton\");function Qh(r){let{recording:e,recordedVideo:t,onSubmit:i,i18n:s}=r;return t&&!e?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-ScreenCapture-button uppy-ScreenCapture-button--submit\",type:\"button\",title:s(\"submitRecordedFile\"),\"aria-label\":s(\"submitRecordedFile\"),onClick:i,\"data-uppy-super-focusable\":!0},c(\"svg\",{width:\"12\",height:\"9\",viewBox:\"0 0 12 9\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\"},c(\"path\",{fill:\"#fff\",fillRule:\"nonzero\",d:\"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z\"}))):null}o(Qh,\"SubmitButton\");function vP(r){return(r-(r%=60))/60+(r>9?\":\":\":0\")+r}o(vP,\"fmtMSS\");var Zh=class extends Ue{static{o(this,\"StopWatch\")}constructor(e){super(e),this.wrapperStyle={width:\"100%\",height:\"100%\",display:\"flex\"},this.overlayStyle={position:\"absolute\",width:\"100%\",height:\"100%\",background:\"black\",opacity:.7},this.infoContainerStyle={marginLeft:\"auto\",marginRight:\"auto\",marginTop:\"auto\",marginBottom:\"auto\",zIndex:1,color:\"white\"},this.infotextStyle={marginLeft:\"auto\",marginRight:\"auto\",marginBottom:\"1rem\",fontSize:\"1.5rem\"},this.timeStyle={display:\"block\",fontWeight:\"bold\",marginLeft:\"auto\",marginRight:\"auto\",fontSize:\"3rem\",fontFamily:\"Courier New\"},this.timerRunning=!1,this.state={elapsedTime:0}}startTimer(){this.timerTick(),this.timerRunning=!0}resetTimer(){clearTimeout(this.timer),this.setState({elapsedTime:0}),this.timerRunning=!1}timerTick(){this.timer=setTimeout(()=>{this.setState(e=>({elapsedTime:e.elapsedTime+1})),this.timerTick()},1e3)}render(){let{recording:e,i18n:t}={...this.props},{elapsedTime:i}=this.state,s=vP(i);return e&&!this.timerRunning&&this.startTimer(),!e&&this.timerRunning&&this.resetTimer(),e?c(\"div\",{style:this.wrapperStyle},c(\"div\",{style:this.overlayStyle}),c(\"div\",{style:this.infoContainerStyle},c(\"div\",{style:this.infotextStyle},t(\"recording\")),c(\"div\",{style:this.timeStyle},s))):null}},By=Zh;function ed(r){let{streamActive:e,i18n:t}=r;return e?c(\"div\",{title:t(\"streamActive\"),\"aria-label\":t(\"streamActive\"),className:\"uppy-ScreenCapture-icon--stream uppy-ScreenCapture-icon--streamActive\"},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0z\",opacity:\".1\",fill:\"none\"}),c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"}),c(\"path\",{d:\"M1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm18-7H5v1.63c3.96 1.28 7.09 4.41 8.37 8.37H19V7zM1 10v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11zm20-7H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"}))):c(\"div\",{title:t(\"streamPassive\"),\"aria-label\":t(\"streamPassive\"),className:\"uppy-ScreenCapture-icon--stream\"}
2,c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},c(\"path\",{d:\"M0 0h24v24H0z\",opacity:\".1\",fill:\"none\"}),c(\"path\",{d:\"M0 0h24v24H0z\",fill:\"none\"}),c(\"path\",{d:\"M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z\"})))}o(ed,\"StreamStatus\");function td(){return td=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},td.apply(null,arguments)}o(td,\"_extends\");var rd=class extends Ue{static{o(this,\"RecorderScreen\")}constructor(){super(...arguments),this.videoElement=null}componentWillUnmount(){let{onStop:e}=this.props;e()}render(){let{recording:e,stream:t,recordedVideo:i}=this.props,s={playsinline:!0};return(e||!i&&!e)&&(s.muted=!0,s.autoplay=!0,s.srcObject=t),i&&!e&&(s.muted=!1,s.controls=!0,s.src=i,this.videoElement&&(this.videoElement.srcObject=null)),c(\"div\",{className:\"uppy uppy-ScreenCapture-container\"},c(\"div\",{className:\"uppy-ScreenCapture-videoContainer\"},c(ed,this.props),c(\"video\",td({ref:o(n=>{this.videoElement=n},\"ref\"),className:\"uppy-ScreenCapture-video\"},s)),c(By,this.props)),c(\"div\",{className:\"uppy-ScreenCapture-buttonContainer\"},c(Jh,this.props),c(Qh,this.props)))}},zy=rd;var jy={strings:{pluginNameScreenCapture:\"Screencast\",startCapturing:\"Begin screen capturing\",stopCapturing:\"Stop screen capturing\",submitRecordedFile:\"Submit recorded file\",streamActive:\"Stream active\",streamPassive:\"Stream passive\",micDisabled:\"Microphone access denied by user\",recording:\"Recording\"}};function id(){return id=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},id.apply(null,arguments)}o(id,\"_extends\");var bP={version:\"4.1.0\"};function wP(){var r;return window.MediaRecorder&&((r=navigator.mediaDevices)==null?void 0:r.getDisplayMedia)}o(wP,\"isScreenRecordingSupported\");function SP(){return window.MediaRecorder&&navigator.mediaDevices}o(SP,\"getMediaDevices\");var PP={displayMediaConstraints:{video:{width:1280,height:720,frameRate:{ideal:3,max:5},cursor:\"motion\",displaySurface:\"monitor\"}},userMediaConstraints:{audio:!0},preferredVideoMimeType:\"video/webm\"},Rs=class extends ne{static{o(this,\"ScreenCapture\")}constructor(e,t){super(e,{...PP,...t}),this.videoStream=null,this.audioStream=null,this.userDenied=!1,this.recorder=null,this.outputStream=null,this.recordingChunks=null,this.mediaDevices=SP(),this.protocol=location.protocol===\"https:\"?\"https\":\"http\",this.id=this.opts.id||\"ScreenCapture\",this.type=\"acquirer\",this.icon=Yh,this.defaultLocale=jy,this.i18nInit(),this.title=this.i18n(\"pluginNameScreenCapture\"),this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.submit=this.submit.bind(this),this.streamInterrupted=this.streamInactivated.bind(this),this.captureActive=!1,this.capturedMediaFile=null}
2install(){if(!wP())return this.uppy.log(\"Screen recorder access is not supported\",\"warning\"),null;this.setPluginState({streamActive:!1,audioStreamActive:!1});let{target:e}=this.opts;e&&this.mount(e,this)}uninstall(){this.videoStream&&this.stop(),this.unmount()}start(){return this.mediaDevices?(this.captureActive=!0,this.selectAudioStreamSource(),this.selectVideoStreamSource().then(e=>{e===!1&&this.parent&&this.parent.hideAllPanels&&(this.parent.hideAllPanels(),this.captureActive=!1)})):Promise.reject(new Error(\"Screen recorder access not supported\"))}selectVideoStreamSource(){return this.videoStream?new Promise(e=>e(this.videoStream)):this.mediaDevices.getDisplayMedia(this.opts.displayMediaConstraints).then(e=>(this.videoStream=e,this.videoStream.addEventListener(\"inactive\",()=>{this.streamInactivated()}),this.setPluginState({streamActive:!0}),e)).catch(e=>(this.setPluginState({screenRecError:e}),this.userDenied=!0,setTimeout(()=>{this.userDenied=!1},1e3),!1))}selectAudioStreamSource(){return this.audioStream?new Promise(e=>e(this.audioStream)):this.mediaDevices.getUserMedia(this.opts.userMediaConstraints).then(e=>(this.audioStream=e,this.setPluginState({audioStreamActive:!0}),e)).catch(e=>(e.name===\"NotAllowedError\"&&(this.uppy.info(this.i18n(\"micDisabled\"),\"error\",5e3),this.uppy.log(this.i18n(\"micDisabled\"),\"warning\")),!1))}startRecording(){let e={};this.capturedMediaFile=null,this.recordingChunks=[];let{preferredVideoMimeType:t}=this.opts;this.selectVideoStreamSource().then(i=>{if(i===!1)throw new Error(\"No video stream available\");t&&MediaRecorder.isTypeSupported(t)&&zr(t)&&(e.mimeType=t);let s=[i.getVideoTracks()[0]];this.audioStream&&s.push(this.audioStream.getAudioTracks()[0]),this.outputStream=new MediaStream(s),this.recorder=new MediaRecorder(this.outputStream,e),this.recorder.addEventListener(\"dataavailable\",n=>{this.recordingChunks.push(n.data)}),this.recorder.start(),this.setPluginState({recording:!0})}).catch(i=>{this.uppy.log(i,\"error\")})}streamInactivated(){let{recordedVideo:e,recording:t}={...this.getPluginState()};!e&&!t?this.parent&&this.parent.hideAllPanels&&this.parent.hideAllPanels():t&&(this.uppy.log(\"Capture stream inactive \\u2014 stop recording\"),this.stopRecording()),this.videoStream=null,this.audioStream=null,this.setPluginState({streamActive:!1,audioStreamActive:!1})}stopRecording(){return new Promise(t=>{this.recorder.addEventListener(\"stop\",()=>{t()}),this.recorder.stop()}).then(()=>(this.setPluginState({recording:!1}),this.getVideo())).then(t=>{this.capturedMediaFile=t,this.setPluginState({recordedVideo:URL.createObjectURL(t.data)})}).then(()=>{this.recordingChunks=null,this.recorder=null},t=>{throw this.recordingChunks=null,this.recorder=null,t})}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,\"warning\")}}stop(){this.videoStream&&(this.videoStream.getVideoTracks().forEach(e=>{e.stop()}),this.videoStream.getAudioTracks().forEach(e=>{e.stop()}),this.videoStream=null),this.audioStream&&(this.audioStream.getAudioTracks().forEach(e=>{e.stop()}),this.audioStream.getVideoTracks().forEach(e=>{e.stop()}),this.audioStream=null),this.outputStream&&(this.outputStream.getAudioTracks().forEach(e=>{e.stop()}),this.outputStream.getVideoTracks().forEach(e=>{e.stop()}),this.outputStream=null),this.setPluginState({recordedVideo:null}),this.captureActive=!1}getVideo(){let e=this.recordingChunks[0].type,t=zr(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type \"${e}\"`));let i=`screencap-${Date.now()}.${t}`,s=new Blob(this.recordingChunks,{type:e}),n={source:this.id,name:i,data:new Blob([s],{type:e}),type:e};return Promise.resolve(n)}render(){let e=this.getPluginState();return!e.streamActive&&!this.captureActive&&!this.userDenied&&this.start(),c(zy,id({},e,{onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onStop:this.stop,onSubmit:this.submit,i18n:this.i18n,stream:this.videoStream}))}};Rs.VERSION=bP.version;var Ky=ve(Hy(),1);function od(r,e,t){return new Promise(i=>{r.toBlob(i,e,t)})}o(od,\"canvasToBlob\");
2function nd(){return typeof MediaRecorder==\"function\"&&!!MediaRecorder.prototype&&typeof MediaRecorder.prototype.start==\"function\"}o(nd,\"supportsMediaRecorder\");function na(){return c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",fill:\"#0097DC\",width:\"66\",height:\"55\",viewBox:\"0 0 66 55\"},c(\"path\",{d:\"M57.3 8.433c4.59 0 8.1 3.51 8.1 8.1v29.7c0 4.59-3.51 8.1-8.1 8.1H8.7c-4.59 0-8.1-3.51-8.1-8.1v-29.7c0-4.59 3.51-8.1 8.1-8.1h9.45l4.59-7.02c.54-.54 1.35-1.08 2.16-1.08h16.2c.81 0 1.62.54 2.16 1.08l4.59 7.02h9.45zM33 14.64c-8.62 0-15.393 6.773-15.393 15.393 0 8.62 6.773 15.393 15.393 15.393 8.62 0 15.393-6.773 15.393-15.393 0-8.62-6.773-15.393-15.393-15.393zM33 40c-5.648 0-9.966-4.319-9.966-9.967 0-5.647 4.318-9.966 9.966-9.966s9.966 4.319 9.966 9.966C42.966 35.681 38.648 40 33 40z\",fillRule:\"evenodd\"}))}o(na,\"CameraIcon\");function ad(r){let{onSnapshot:e,i18n:t}=r;return c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--picture\",type:\"button\",title:t(\"takePicture\"),\"aria-label\":t(\"takePicture\"),onClick:e,\"data-uppy-super-focusable\":!0},na())}o(ad,\"SnapshotButton\");function ld(r){let{recording:e,onStartRecording:t,onStopRecording:i,i18n:s}=r;return e?c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Webcam-button\",type:\"button\",title:s(\"stopRecording\"),\"aria-label\":s(\"stopRecording\"),onClick:i,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"100\",height:\"100\",viewBox:\"0 0 100 100\"},c(\"rect\",{x:\"15\",y:\"15\",width:\"70\",height:\"70\"}))):c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Webcam-button\",type:\"button\",title:s(\"startRecording\"),\"aria-label\":s(\"startRecording\"),onClick:t,\"data-uppy-super-focusable\":!0},c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\",width:\"100\",height:\"100\",viewBox:\"0 0 100 100\"},c(\"circle\",{cx:\"50\",cy:\"50\",r:\"40\"})))}o(ld,\"RecordButton\");function ud(r){return`${Math.floor(r/60)}:${String(r%60).padStart(2,\"0\")}`}o(ud,\"formatSeconds\");function cd(r){let{recordingLengthSeconds:e,i18n:t}=r,i=ud(e);return c(\"span\",{\"aria-label\":t(\"recordingLength\",{recording_length:i})},i)}o(cd,\"RecordingLength\");function hd(r){let{currentDeviceId:e,videoSources:t,onChangeVideoSource:i}=r;return c(\"div\",{className:\"uppy-Webcam-videoSource\"},c(\"select\",{className:\"uppy-u-reset uppy-Webcam-videoSource-select\",onChange:o(s=>{i(s.target.value)},\"onChange\")},t.map(s=>c(\"option\",{key:s.deviceId,value:s.deviceId,selected:s.deviceId===e},s.label))))}o(hd,\"VideoSourceSelect\");function EP(r){let{onSubmit:e,i18n:t}=r;return c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--submit\",type:\"button\",title:t(\"submitRecordedFile\"),\"aria-label\":t(\"submitRecordedFile\"),onClick:e,\"data-uppy-super-focusable\":!0},c(\"svg\",{width:\"12\",height:\"9\",viewBox:\"0 0 12 9\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\"},c(\"path\",{fill:\"#fff\",fillRule:\"nonzero\",d:\"M10.66 0L12 1.31 4.136 9 0 4.956l1.34-1.31L4.136 6.38z\"})))}o(EP,\"SubmitButton\");var qy=EP;function CP(r){let{onDiscard:e,i18n:t}=r;return c(\"button\",{className:\"uppy-u-reset uppy-c-btn uppy-Webcam-button uppy-Webcam-button--discard\",type:\"button\",title:t(\"discardRecordedFile\"),\"aria-label\":t(\"discardRecordedFile\"),onClick:e,\"data-uppy-super-focusable\":!0},c(\"svg\",{width:\"13\",height:\"13\",viewBox:\"0 0 13 13\",xmlns:\"http://www.w3.org/2000/svg\",\"aria-hidden\":\"true\",focusable:\"false\",className:\"uppy-c-icon\"},c(\"g\",{fill:\"#FFF\",fillRule:\"evenodd\"},c(\"path\",{d:\"M.496 11.367L11.103.76l1.414 1.414L1.911 12.781z\"}),c(\"path\",{d:\"M11.104 12.782L.497 2.175 1.911.76l10.607 10.606z\"}))))}o(CP,\"DiscardButton\");var $y=CP;function dd(){return dd=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},dd.apply(null,arguments)}o(dd,\"_extends\");function pu(r,e){return r.includes(e)}o(pu,\"isModeAvailable\");var pd=class extends Ue{static{o(this,\"CameraScreen\")}componentDidMount(){let{onFocus:e}=this.props;e()}componentWillUnmount(){let{onStop:e}=this.props;e()}render(){let{src:e,recordedVideo:t,recording:i,modes:s,supportsRecording:n,videoSources:a,showVideoSourceDropdown:l,showRecordingLength:u,onSubmit:h,i18n:d,mirror:m,onSnapshot:w,onStartRecording:y,onStopRecording:P,onDiscardRecordedVideo:D,recordingLengthSeconds:C}=this.props,O=!!t,z=!O&&n&&(pu(s,\"video-only\")||pu(s,\"audio-only\")||pu(s,\"video-audio\")),X=!O&&pu(s,\"picture\"),K=n&&u&&!O,Z=l&&a&&a.length>
21,$={playsInline:!0};return t?($.muted=!1,$.controls=!0,$.src=t,this.videoElement&&(this.videoElement.srcObject=null)):($.muted=!0,$.autoPlay=!0,$.srcObject=e),c(\"div\",{className:\"uppy uppy-Webcam-container\"},c(\"div\",{className:\"uppy-Webcam-videoContainer\"},c(\"video\",dd({ref:o(W=>this.videoElement=W,\"ref\"),className:`uppy-Webcam-video ${m?\"uppy-Webcam-video--mirrored\":\"\"}`},$))),c(\"div\",{className:\"uppy-Webcam-footer\"},c(\"div\",{className:\"uppy-Webcam-videoSourceContainer\"},Z?hd(this.props):null),c(\"div\",{className:\"uppy-Webcam-buttonContainer\"},X&&c(ad,{onSnapshot:w,i18n:d}),z&&c(ld,{recording:i,onStartRecording:y,onStopRecording:P,i18n:d}),O&&c(qy,{onSubmit:h,i18n:d}),O&&c($y,{onDiscard:D,i18n:d})),c(\"div\",{className:\"uppy-Webcam-recordingLength\"},K&&c(cd,{recordingLengthSeconds:C,i18n:d}))))}},Vy=pd;function fd(r){let{icon:e,i18n:t,hasCamera:i}=r;return c(\"div\",{className:\"uppy-Webcam-permissons\"},c(\"div\",{className:\"uppy-Webcam-permissonsIcon\"},e()),c(\"div\",{className:\"uppy-Webcam-title\"},t(i?\"allowAccessTitle\":\"noCameraTitle\")),c(\"p\",null,t(i?\"allowAccessDescription\":\"noCameraDescription\")))}o(fd,\"PermissionsScreen\");var Wy={strings:{pluginNameCamera:\"Camera\",noCameraTitle:\"Camera Not Available\",noCameraDescription:\"In order to take pictures or record video, please connect a camera device\",recordingStoppedMaxSize:\"Recording stopped because the file size is about to exceed the limit\",submitRecordedFile:\"Submit recorded file\",discardRecordedFile:\"Discard recorded file\",smile:\"Smile!\",takePicture:\"Take a picture\",startRecording:\"Begin video recording\",stopRecording:\"Stop video recording\",recordingLength:\"Recording length %{recording_length}\",allowAccessTitle:\"Please allow access to your camera\",allowAccessDescription:\"In order to take pictures or record video with your camera, please allow camera access for this site.\"}};function gd(){return gd=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},gd.apply(null,arguments)}o(gd,\"_extends\");function aa(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(aa,\"_classPrivateFieldLooseBase\");var TP=0;function OP(r){return\"__private_\"+TP+++\"_\"+r}o(OP,\"_classPrivateFieldLooseKey\");var AP={version:\"4.0.1\"};function Gy(r){return r[0]===\".\"?en[r.slice(1)]:r}o(Gy,\"toMimeType\");function RP(r){return/^video\\/[^*]+$/.test(r)}o(RP,\"isVideoMimeType\");function kP(r){return/^image\\/[^*]+$/.test(r)}o(kP,\"isImageMimeType\");function UP(){return navigator.mediaDevices}o(UP,\"getMediaDevices\");function md(r,e){return r.includes(e)}o(md,\"isModeAvailable\");var DP={onBeforeSnapshot:o(()=>Promise.resolve(),\"onBeforeSnapshot\"),countdown:!1,modes:[\"video-audio\",\"video-only\",\"audio-only\",\"picture\"],mirror:!0,showVideoSourceDropdown:!1,preferredImageMimeType:null,preferredVideoMimeType:null,showRecordingLength:!1,mobileNativeCamera:(0,Ky.default)({tablet:!0})},Cr=OP(\"enableMirror\"),ks=class extends ne{static{o(this,\"Webcam\")}constructor(e,t){super(e,{...DP,...t}),Object.defineProperty(this,Cr,{writable:!0,value:void 0}),this.stream=null,this.recorder=null,this.recordingChunks=null,this.captureInProgress=!1,this.mediaDevices=UP(),this.supportsUserMedia=!!this.mediaDevices,this.protocol=location.protocol.match(/https/i)?\"https\":\"http\",this.id=this.opts.id||\"Webcam\",this.type=\"acquirer\",this.capturedMediaFile=null,this.icon=()=>c(\"svg\",{\"aria-hidden\":\"true\",focusable:\"false\",width:\"32\",height:\"32\",viewBox:\"0 0 32 32\"},c(\"path\",{d:\"M23.5 9.5c1.417 0 2.5 1.083 2.5 2.5v9.167c0 1.416-1.083 2.5-2.5 2.5h-15c-1.417 0-2.5-1.084-2.5-2.5V12c0-1.417 1.083-2.5 2.5-2.5h2.917l1.416-2.167C13 7.167 13.25 7 13.5 7h5c.25 0 .5.167.667.333L20.583 9.5H23.5zM16 11.417a4.706 4.706 0 00-4.75 4.75 4.704 4.704 0 004.75 4.75 4.703 4.703 0 004.75-4.75c0-2.663-2.09-4.75-4.75-4.75zm0 7.825c-1.744 0-3.076-1.332-3.076-3.074 0-1.745 1.333-3.077 3.076-3.077 1.744 0 3.074 1.333 3.074 3.076s-1.33 3.075-3.074 3.075z\",fill:\"#02B383\",fillRule:\"nonzero\"})),this.defaultLocale=Wy,this.i18nInit(),this.title=this.i18n(\"pluginNameCamera\"),aa(this,Cr)[Cr]=this.opts.mirror,this.install=this.install.bind(this),this.setPluginState=this.setPluginState.bind(this),this.render=this.render.bind(this),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.takeSnapshot=this.takeSnapshot.bind(this),this.startRecording=this.startRecording.bind(this),this.stopRecording=this.stopRecording.bind(this),this.discardRecordedVideo=this.discardRecordedVideo.bind(this),this.submit=this.submit.bind(this),this.oneTwoThreeSmile=this.oneTwoThreeSmile.bind(this),this.focus=this.focus.bind(this),this.changeVideoSource=this.changeVideoSource.bind(this),this.webcamActive=!1,this.opts.countdown&&(this.opts.onBeforeSnapshot=this.oneTwoThreeSmile),this.setPluginState({hasCamera:!1,cameraReady:!1,cameraError:null,recordingLengthSeconds:0,videoSources:[],currentDeviceId:null})}setOptions(e){super.setOptions({...e,videoConstraints:{...this.opts.videoConstraints,...e?.videoConstraints}})}hasCameraCheck(){return this.mediaDevices?this.mediaDevices.enumerateDevices().then(e=>e.some(t=>t.kind===\"videoinput\")):Promise.resolve(!1)}isAudioOnly(){return this.opts.modes.length===1&&this.opts.modes[0]===\"audio-only\"}getConstraints(e){e===void 0&&(e=null);let t=this.opts.modes.indexOf(\"video-audio\")!==-1||this.opts.modes.indexOf(\"audio-only\")!==-1,i=!this.isAudioOnly()&&(this.opts.modes.indexOf(\"video-audio\")!==-1||this.opts.modes.indexOf(\"video-only\")!==-1||this.opts.modes.indexOf(\"picture\")!==-1),s={...this.opts.videoConstraints||{},...e!=null&&{deviceId:e}};return{audio:t,video:i?s:!1}}start(e){var t;if(e===void 0&&(e=null),!this.supportsUserMedia)return Promise.reject(new Error(\"Webcam access not supported\"));this.webcamActive=!0,this.opts.mirror&&(aa(this,Cr)[Cr]=!0);let i=this.getConstraints((t=e)==null?void 0:t.deviceId);this.hasCameraCheck().then(s=>(this.setPluginState({hasCamera:s}),this.mediaDevices.getUserMedia(i).then(n=>{this.stream=n;let a=null,l=this.isAudioOnly()?n.getAudioTracks():n.getVideoTracks();!e||!e.deviceId?a=l[0].getSettings().deviceId:l.forEach(u=>{u.getSettings().deviceId===e.deviceId&&(a=u.getSettings().deviceId)}),this.updateVideoSources(),this.setPluginState({currentDeviceId:a,cameraReady:!0})}).catch(n=>{this.setPluginState({cameraReady:!1,cameraError:n}),this.uppy.info(n.message,\"error\")})))}getMediaRecorderOptions(){let e={};
2if(MediaRecorder.isTypeSupported){let{restrictions:t}=this.uppy.opts,i=[];this.opts.preferredVideoMimeType?i=[this.opts.preferredVideoMimeType]:t.allowedFileTypes&&(i=t.allowedFileTypes.map(Gy).filter(RP));let s=o(a=>MediaRecorder.isTypeSupported(a)&&zr(a),\"filterSupportedTypes\"),n=i.filter(s);n.length>0&&(e.mimeType=n[0])}return e}startRecording(){this.recorder=new MediaRecorder(this.stream,this.getMediaRecorderOptions()),this.recordingChunks=[];let e=!1;this.recorder.addEventListener(\"dataavailable\",t=>{this.recordingChunks.push(t.data);let{restrictions:i}=this.uppy.opts;if(this.recordingChunks.length>1&&i.maxFileSize!=null&&!e){let s=this.recordingChunks.reduce((u,h)=>u+h.size,0),a=(s-this.recordingChunks[0].size)/(this.recordingChunks.length-1)*3,l=Math.max(0,i.maxFileSize-a);s>l&&(e=!0,this.uppy.info(this.i18n(\"recordingStoppedMaxSize\"),\"warning\",4e3),this.stopRecording())}}),this.recorder.start(500),this.opts.showRecordingLength&&(this.recordingLengthTimer=setInterval(()=>{let t=this.getPluginState().recordingLengthSeconds;this.setPluginState({recordingLengthSeconds:t+1})},1e3)),this.setPluginState({isRecording:!0})}stopRecording(){return new Promise(t=>{this.recorder.addEventListener(\"stop\",()=>{t()}),this.recorder.stop(),this.opts.showRecordingLength&&(clearInterval(this.recordingLengthTimer),this.setPluginState({recordingLengthSeconds:0}))}).then(()=>(this.setPluginState({isRecording:!1}),this.getVideo())).then(t=>{try{this.capturedMediaFile=t,this.setPluginState({recordedVideo:URL.createObjectURL(t.data)}),aa(this,Cr)[Cr]=!1}catch(i){i.isRestriction||this.uppy.log(i)}}).then(()=>{this.recordingChunks=null,this.recorder=null},t=>{throw this.recordingChunks=null,this.recorder=null,t})}discardRecordedVideo(){this.setPluginState({recordedVideo:null}),this.opts.mirror&&(aa(this,Cr)[Cr]=!0),this.capturedMediaFile=null}submit(){try{this.capturedMediaFile&&this.uppy.addFile(this.capturedMediaFile)}catch(e){e.isRestriction||this.uppy.log(e,\"error\")}}async stop(){if(this.stream){let e=this.stream.getAudioTracks(),t=this.stream.getVideoTracks();e.concat(t).forEach(i=>i.stop())}this.recorder&&await new Promise(e=>{this.recorder.addEventListener(\"stop\",e,{once:!0}),this.recorder.stop(),this.opts.showRecordingLength&&clearInterval(this.recordingLengthTimer)}),this.recordingChunks=null,this.recorder=null,this.webcamActive=!1,this.stream=null,this.setPluginState({recordedVideo:null,isRecording:!1,recordingLengthSeconds:0})}getVideoElement(){return this.el.querySelector(\".uppy-Webcam-video\")}oneTwoThreeSmile(){return new Promise((e,t)=>{let i=this.opts.countdown,s=setInterval(()=>{if(!this.webcamActive)return clearInterval(s),this.captureInProgress=!1,t(new Error(\"Webcam is not active\"));i?(this.uppy.info(`${i}...`,\"warning\",800),i--):(clearInterval(s),this.uppy.info(this.i18n(\"smile\"),\"success\",1500),setTimeout(()=>e(),1500))},1e3)})}takeSnapshot(){this.captureInProgress||(this.captureInProgress=!0,this.opts.onBeforeSnapshot().catch(e=>{let t=typeof e==\"object\"?e.message:e;
2return this.uppy.info(t,\"error\",5e3),Promise.reject(new Error(`onBeforeSnapshot: ${t}`))}).then(()=>this.getImage()).then(e=>{this.captureInProgress=!1;try{this.uppy.addFile(e)}catch(t){t.isRestriction||this.uppy.log(t)}},e=>{throw this.captureInProgress=!1,e}))}getImage(){let e=this.getVideoElement();if(!e)return Promise.reject(new Error(\"No video element found, likely due to the Webcam tab being closed.\"));let t=e.videoWidth,i=e.videoHeight,s=document.createElement(\"canvas\");s.width=t,s.height=i,s.getContext(\"2d\").drawImage(e,0,0);let{restrictions:a}=this.uppy.opts,l=[];this.opts.preferredImageMimeType?l=[this.opts.preferredImageMimeType]:a.allowedFileTypes&&(l=a.allowedFileTypes.map(Gy).filter(kP));let u=l[0]||\"image/jpeg\",h=zr(u)||\"jpg\",d=`cam-${Date.now()}.${h}`;return od(s,u).then(m=>({source:this.id,name:d,data:new Blob([m],{type:u}),type:u}))}getVideo(){let e=this.recordingChunks.find(a=>{var l;return((l=a.type)==null?void 0:l.length)>0}).type,t=zr(e);if(!t)return Promise.reject(new Error(`Could not retrieve recording: Unsupported media type \"${e}\"`));let i=`webcam-${Date.now()}.${t}`,s=new Blob(this.recordingChunks,{type:e}),n={source:this.id,name:i,data:new Blob([s],{type:e}),type:e};return Promise.resolve(n)}focus(){this.opts.countdown&&setTimeout(()=>{this.uppy.info(this.i18n(\"smile\"),\"success\",1500)},1e3)}changeVideoSource(e){this.stop(),this.start({deviceId:e})}updateVideoSources(){this.mediaDevices.enumerateDevices().then(e=>{this.setPluginState({videoSources:e.filter(t=>t.kind===\"videoinput\")})})}render(){this.webcamActive||this.start();let e=this.getPluginState();return!e.cameraReady||!e.hasCamera?c(fd,{icon:na,i18n:this.i18n,hasCamera:e.hasCamera}):c(Vy,gd({},e,{onChangeVideoSource:this.changeVideoSource,onSnapshot:this.takeSnapshot,onStartRecording:this.startRecording,onStopRecording:this.stopRecording,onDiscardRecordedVideo:this.discardRecordedVideo,onSubmit:this.submit,onFocus:this.focus,onStop:this.stop,i18n:this.i18n,modes:this.opts.modes,showRecordingLength:this.opts.showRecordingLength,showVideoSourceDropdown:this.opts.showVideoSourceDropdown,supportsRecording:nd(),recording:e.isRecording,mirror:aa(this,Cr)[Cr],src:this.stream}))}install(){let{mobileNativeCamera:e,modes:t,videoConstraints:i}=this.opts,{target:s}=this.opts;if(e&&s){var n;(n=this.getTargetPlugin(s))==null||n.setOptions({showNativeVideoCameraButton:md(t,\"video-only\")||md(t,\"video-audio\"),showNativePhotoCameraButton:md(t,\"picture\"),nativeCameraFacingMode:i?.facingMode});return}this.setPluginState({cameraReady:!1,recordingLengthSeconds:0}),s&&this.mount(s,this),this.mediaDevices&&(this.updateVideoSources(),this.mediaDevices.ondevicechange=()=>{if(this.updateVideoSources(),this.stream){let a=!0,{videoSources:l,currentDeviceId:u}=this.getPluginState();l.forEach(h=>{u===h.deviceId&&(a=!1)}),a&&(this.stop(),this.start())}})}uninstall(){this.stop(),this.unmount()}onUnmount(){this.stop()}};ks.VERSION=AP.version;function _i(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(_i,\"_classPrivateFieldLooseBase\");var IP=0;function Xy(r){return\"__private_\"+IP+++\"_\"+r}o(Xy,\"_classPrivateFieldLooseKey\");var Nt=Xy(\"uppy\"),la=Xy(\"events\"),xi=class{static{o(this,\"EventManager\")}constructor(e){Object.defineProperty(this,Nt,{writable:!0,value:void 0}),Object.defineProperty(this,la,{writable:!0,value:[]}),_i(this,Nt)[Nt]=e}on(e,t){return _i(this,la)[la].push([e,t]),_i(this,Nt)[Nt].on(e,t)}remove(){for(let[e,t]of _i(this,la)[la].splice(0))_i(this,Nt)[Nt].off(e,t)}onFilePause(e,t){this.on(\"upload-pause\",(i,s)=>{e===i?.id&&t(s)})}onFileRemove(e,t){this.on(\"file-removed\",i=>{e===i.id&&t(i.id)})}onPause(e,t){this.on(\"upload-pause\",(i,s)=>{e===i?.id&&t(s)})}onRetry(e,t){this.on(\"upload-retry\",i=>{e===i?.id&&t()})}onRetryAll(e,t){this.on(\"retry-all\",()=>{_i(this,Nt)[Nt].getFile(e)&&t()})}onPauseAll(e,t){this.on(\"pause-all\",()=>{_i(this,Nt)[Nt].getFile(e)&&t()})}onCancelAll(e,t){var i=this;this.on(\"cancel-all\",function(){_i(i,Nt)[Nt].getFile(e)&&t(...arguments)})}onResumeAll(e,t){this.on(\"resume-all\",()=>{_i(this,Nt)[Nt].getFile(e)&&t()})}};function ie(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ie,\"_classPrivateFieldLooseBase\");var NP=0;
2function Vt(r){return\"__private_\"+NP+++\"_\"+r}o(Vt,\"_classPrivateFieldLooseKey\");function LP(r){return new Error(\"Cancelled\",{cause:r})}o(LP,\"createCancelError\");function Yy(r){if(r!=null){var e;let t=o(()=>this.abort(r.reason),\"abortPromise\");r.addEventListener(\"abort\",t,{once:!0});let i=o(()=>{r.removeEventListener(\"abort\",t)},\"removeAbortListener\");(e=this.then)==null||e.call(this,i,i)}return this}o(Yy,\"abortOn\");var ir=Vt(\"activeRequests\"),Mt=Vt(\"queuedHandlers\"),rr=Vt(\"paused\"),Us=Vt(\"pauseTimer\"),Lt=Vt(\"downLimit\"),Ds=Vt(\"upperLimit\"),Fi=Vt(\"rateLimitingTimer\"),ua=Vt(\"call\"),Ei=Vt(\"queueNext\"),bd=Vt(\"next\"),yd=Vt(\"queue\"),wd=Vt(\"dequeue\"),vd=Vt(\"resume\"),Is=Vt(\"increaseLimit\"),br=class{static{o(this,\"RateLimitedQueue\")}constructor(e){Object.defineProperty(this,wd,{value:HP}),Object.defineProperty(this,yd,{value:jP}),Object.defineProperty(this,bd,{value:zP}),Object.defineProperty(this,Ei,{value:BP}),Object.defineProperty(this,ua,{value:MP}),Object.defineProperty(this,ir,{writable:!0,value:0}),Object.defineProperty(this,Mt,{writable:!0,value:[]}),Object.defineProperty(this,rr,{writable:!0,value:!1}),Object.defineProperty(this,Us,{writable:!0,value:void 0}),Object.defineProperty(this,Lt,{writable:!0,value:1}),Object.defineProperty(this,Ds,{writable:!0,value:void 0}),Object.defineProperty(this,Fi,{writable:!0,value:void 0}),Object.defineProperty(this,vd,{writable:!0,value:o(()=>this.resume(),\"value\")}),Object.defineProperty(this,Is,{writable:!0,value:o(()=>{if(ie(this,rr)[rr]){ie(this,Fi)[Fi]=setTimeout(ie(this,Is)[Is],0);return}ie(this,Lt)[Lt]=this.limit,this.limit=Math.ceil((ie(this,Ds)[Ds]+ie(this,Lt)[Lt])/2);for(let t=ie(this,Lt)[Lt];t<=this.limit;t++)ie(this,Ei)[Ei]();ie(this,Ds)[Ds]-ie(this,Lt)[Lt]>3?ie(this,Fi)[Fi]=setTimeout(ie(this,Is)[Is],2e3):ie(this,Lt)[Lt]=Math.floor(ie(this,Lt)[Lt]/2)},\"value\")}),typeof e!=\"number\"||e===0?this.limit=1/0:this.limit=e}run(e,t){return!ie(this,rr)[rr]&&ie(this,ir)[ir]<this.limit?ie(this,ua)[ua](e):ie(this,yd)[yd](e,t)}wrapSyncFunction(e,t){var i=this;return function(){for(var s=arguments.length,n=new Array(s),a=0;a<s;a++)n[a]=arguments[a];let l=i.run(()=>(e(...n),queueMicrotask(()=>l.done()),()=>{}),t);return{abortOn:Yy,abort(){l.abort()}}}}wrapPromiseFunction(e,t){var i=this;return function(){for(var s=arguments.length,n=new Array(s),a=0;a<s;a++)n[a]=arguments[a];let l,u=new Promise((h,d)=>{l=i.run(()=>{let m,w;try{w=Promise.resolve(e(...n))}catch(y){w=Promise.reject(y)}return w.then(y=>{m?d(m):(l.done(),h(y))},y=>{m?d(m):(l.done(),d(y))}),y=>{m=LP(y)}},t)});return u.abort=h=>{l.abort(h)},u.abortOn=Yy,u}}resume(){ie(this,rr)[rr]=!1,clearTimeout(ie(this,Us)[Us]);for(let e=0;e<this.limit;e++)ie(this,Ei)[Ei]()}pause(e){e===void 0&&(e=null),ie(this,rr)[rr]=!0,clearTimeout(ie(this,Us)[Us]),e!=null&&(ie(this,Us)[Us]=setTimeout(ie(this,vd)[vd],e))}rateLimit(e){clearTimeout(ie(this,Fi)[Fi]),this.pause(e),this.limit>1&&Number.isFinite(this.limit)&&(ie(this,Ds)[Ds]=this.limit-1,this.limit=ie(this,Lt)[Lt],ie(this,Fi)[Fi]=setTimeout(ie(this,Is)[Is],e))}get isPaused(){return ie(this,rr)[rr]}};function MP(r){ie(this,ir)[ir]+=1;let e=!1,t;try{t=r()}catch(i){throw ie(this,ir)[ir]-=1,i}return{abort:o(i=>{e||(e=!0,ie(this,ir)[ir]-=1,t?.(i),ie(this,Ei)[Ei]())},\"abort\"),done:o(()=>{e||(e=!0,ie(this,ir)[ir]-=1,ie(this,Ei)[Ei]())},\"done\")}}o(MP,\"_call2\");function BP(){queueMicrotask(()=>ie(this,bd)[bd]())}o(BP,\"_queueNext2\");function zP(){if(ie(this,rr)[rr]||ie(this,ir)[ir]>=this.limit||ie(this,Mt)[Mt].length===0)return;let r=ie(this,Mt)[Mt].shift();if(r==null)throw new Error(\"Invariant violation: next is null\");let e=ie(this,ua)[ua](r.fn);r.abort=e.abort,r.done=e.done}o(zP,\"_next2\");function jP(r,e){let t={fn:r,priority:e?.priority||0,abort:o(()=>{ie(this,wd)[wd](t)},\"abort\"),done:o(()=>{throw new Error(\"Cannot mark a queued request as done: this indicates a bug\")},\"done\")},i=ie(this,Mt)[Mt].findIndex(s=>t.priority>s.priority);return i===-1?ie(this,Mt)[Mt].push(t):ie(this,Mt)[Mt].splice(i,0,t),t}o(jP,\"_queue2\");function HP(r){let e=ie(this,Mt)[Mt].indexOf(r);e!==-1&&ie(this,Mt)[Mt].splice(e,1)}o(HP,\"_dequeue2\");var fu=Symbol(\"__queue\");function To(r){let e=o(t=>\"error\"in t&&!!t.error,\"hasError\");return r.filter(t=>!e(t))}o(To,\"filterNonFailedFiles\");function Oo(r){return r.filter(e=>{var t;return!((t=e.progress)!=null&&t.uploadStarted)||!e.isRestored})}o(Oo,\"filterFilesToEmitUploadStarted\");var{AbortController:mu}=globalThis,{AbortSignal:BI}=globalThis,gu=o(function(r,e){r===void 0&&(r=\"Aborted\");let t=new DOMException(r,\"AbortError\");return e!=null&&Qt(e,\"cause\")&&Object.defineProperty(t,\"cause\",{__proto__:null,configurable:!0,writable:!0,value:e.cause}),t},\"createAbortError\");function Ci(r,e){return r===!0?Object.keys(e):Array.isArray(r)?r:[]}o(Ci,\"getAllowedMetaFields\");function ee(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ee,\"_classPrivateFieldLooseBase\");var qP=0;function nt(r){return\"__private_\"+qP+++\"_\"+r}o(nt,\"_classPrivateFieldLooseKey\");var $P=1024*1024,Jy={getChunkSize(r){return Math.ceil(r.size/1e4)},onProgress(){},onPartComplete(){},onSuccess(){},onError(r){throw r}};function VP(r){if(typeof r==\"string\")return parseInt(r,10);if(typeof r==\"number\")return r;throw new TypeError(\"Expected a number\")}
2o(VP,\"ensureInt\");var ma=Symbol(\"pausing upload, not an actual error\"),wt=nt(\"abortController\"),ot=nt(\"chunks\"),Bt=nt(\"chunkState\"),sr=nt(\"data\"),or=nt(\"file\"),ga=nt(\"uploadHasStarted\"),ca=nt(\"onError\"),Ms=nt(\"onSuccess\"),Ti=nt(\"shouldUseMultipart\"),Ls=nt(\"isRestoring\"),ya=nt(\"onReject\"),Ns=nt(\"maxMultipartParts\"),da=nt(\"minPartSize\"),Sd=nt(\"initChunks\"),Pd=nt(\"createUpload\"),ha=nt(\"resumeUpload\"),pa=nt(\"onPartProgress\"),fa=nt(\"onPartComplete\"),_d=nt(\"abortUpload\"),xd=class{static{o(this,\"MultipartUploader\")}constructor(e,t){var i,s;Object.defineProperty(this,_d,{value:XP}),Object.defineProperty(this,ha,{value:KP}),Object.defineProperty(this,Pd,{value:GP}),Object.defineProperty(this,Sd,{value:WP}),Object.defineProperty(this,wt,{writable:!0,value:new mu}),Object.defineProperty(this,ot,{writable:!0,value:[]}),Object.defineProperty(this,Bt,{writable:!0,value:[]}),Object.defineProperty(this,sr,{writable:!0,value:void 0}),Object.defineProperty(this,or,{writable:!0,value:void 0}),Object.defineProperty(this,ga,{writable:!0,value:!1}),Object.defineProperty(this,ca,{writable:!0,value:void 0}),Object.defineProperty(this,Ms,{writable:!0,value:void 0}),Object.defineProperty(this,Ti,{writable:!0,value:void 0}),Object.defineProperty(this,Ls,{writable:!0,value:void 0}),Object.defineProperty(this,ya,{writable:!0,value:o(n=>n?.cause===ma?null:ee(this,ca)[ca](n),\"value\")}),Object.defineProperty(this,Ns,{writable:!0,value:1e4}),Object.defineProperty(this,da,{writable:!0,value:5*$P}),Object.defineProperty(this,pa,{writable:!0,value:o(n=>a=>{if(!a.lengthComputable)return;ee(this,Bt)[Bt][n].uploaded=VP(a.loaded);let l=ee(this,Bt)[Bt].reduce((u,h)=>u+h.uploaded,0);this.options.onProgress(l,ee(this,sr)[sr].size)},\"value\")}),Object.defineProperty(this,fa,{writable:!0,value:o(n=>a=>{ee(this,ot)[ot][n]=null,ee(this,Bt)[Bt][n].etag=a,ee(this,Bt)[Bt][n].done=!0;let l={PartNumber:n+1,ETag:a};this.options.onPartComplete(l)},\"value\")}),this.options={...Jy,...t},(s=(i=this.options).getChunkSize)!=null||(i.getChunkSize=Jy.getChunkSize),ee(this,sr)[sr]=e,ee(this,or)[or]=t.file,ee(this,Ms)[Ms]=this.options.onSuccess,ee(this,ca)[ca]=this.options.onError,ee(this,Ti)[Ti]=this.options.shouldUseMultipart,ee(this,Ls)[Ls]=t.uploadId&&t.key,ee(this,Sd)[Sd]()}start(){ee(this,ga)[ga]?(ee(this,wt)[wt].signal.aborted||ee(this,wt)[wt].abort(ma),ee(this,wt)[wt]=new mu,ee(this,ha)[ha]()):ee(this,Ls)[Ls]?(this.options.companionComm.restoreUploadFile(ee(this,or)[or],{uploadId:this.options.uploadId,key:this.options.key}),ee(this,ha)[ha]()):ee(this,Pd)[Pd]()}pause(){ee(this,wt)[wt].abort(ma),ee(this,wt)[wt]=new mu}abort(e){e!=null&&e.really?ee(this,_d)[_d]():this.pause()}[Symbol.for(\"uppy test: getChunkState\")](){return ee(this,Bt)[Bt]}};function WP(){let r=ee(this,sr)[sr].size,e=typeof ee(this,Ti)[Ti]==\"function\"?ee(this,Ti)[Ti](ee(this,or)[or]):!!ee(this,Ti)[Ti];if(e&&r>ee(this,da)[da]){let t=Math.max(this.options.getChunkSize(ee(this,sr)[sr]),ee(this,da)[da]),i=Math.floor(r/t);i>ee(this,Ns)[Ns]&&(i=ee(this,Ns)[Ns],t=r/ee(this,Ns)[Ns]),ee(this,ot)[ot]=Array(i);for(let s=0,n=0;s<r;s+=t,n++){let a=Math.min(r,s+t),l=o(()=>{let u=s;return ee(this,sr)[sr].slice(u,a)},\"getData\");if(ee(this,ot)[ot][n]={getData:l,onProgress:ee(this,pa)[pa](n),onComplete:ee(this,fa)[fa](n),shouldUseMultipart:e},ee(this,Ls)[Ls]){let u=s+t>r?r-s:t;ee(this,ot)[ot][n].setAsUploaded=()=>{ee(this,ot)[ot][n]=null,ee(this,Bt)[Bt][n].uploaded=u}}}}else ee(this,ot)[ot]=[{getData:o(()=>ee(this,sr)[sr],\"getData\"),onProgress:ee(this,pa)[pa](0),onComplete:ee(this,fa)[fa](0),shouldUseMultipart:e}];ee(this,Bt)[Bt]=ee(this,ot)[ot].map(()=>({uploaded:0}))}o(WP,\"_initChunks2\");function GP(){this.options.companionComm.uploadFile(ee(this,or)[or],ee(this,ot)[ot],ee(this,wt)[wt].signal).then(ee(this,Ms)[Ms],ee(this,ya)[ya]),ee(this,ga)[ga]=!0}o(GP,\"_createUpload2\");function KP(){this.options.companionComm.resumeUploadFile(ee(this,or)[or],ee(this,ot)[ot],ee(this,wt)[wt].signal).then(ee(this,Ms)[Ms],ee(this,ya)[ya])}o(KP,\"_resumeUpload2\");function XP(){ee(this,wt)[wt].abort(),this.options.companionComm.abortFileUpload(ee(this,or)[or]).catch(r=>this.options.log(r))}o(XP,\"_abortUpload2\");var Qy=xd;function pt(r){if(r!=null&&r.aborted)throw gu(\"The operation was aborted\",{cause:r.reason})}o(pt,\"throwIfAborted\");function YP(r){let{method:e=\"PUT\",CanonicalUri:t=\"/\",CanonicalQueryString:i=\"\",SignedHeaders:s,HashedPayload:n}
2=r,a=Object.keys(s).map(l=>l.toLowerCase()).sort();return[e,t,i,...a.map(l=>`${l}:${s[l]}`),\"\",a.join(\";\"),n].join(`\n`)}o(YP,\"createCanonicalRequest\");var Fd=new TextEncoder,Ed={name:\"HMAC\",hash:\"SHA-256\"};async function JP(r){let{subtle:e}=globalThis.crypto;return e.digest(Ed.hash,Fd.encode(r))}o(JP,\"digest\");async function QP(r){let{subtle:e}=globalThis.crypto;return e.importKey(\"raw\",typeof r==\"string\"?Fd.encode(r):r,Ed,!1,[\"sign\"])}o(QP,\"generateHmacKey\");function Zy(r){let e=new Uint8Array(r),t=\"\";for(let i=0;i<e.length;i++)t+=e[i].toString(16).padStart(2,\"0\");return t}o(Zy,\"arrayBufferToHexString\");async function va(r,e){let{subtle:t}=globalThis.crypto;return t.sign(Ed,await QP(r),Fd.encode(e))}o(va,\"hash\");async function Cd(r){let{accountKey:e,accountSecret:t,sessionToken:i,bucketName:s,Key:n,Region:a,expires:l,uploadId:u,partNumber:h}=r,d=\"s3\",m=`${d}.${a}.amazonaws.com`,w=`/${s}/${encodeURI(n).replace(/[;?:@&=+$,#!'()*]/g,Ae=>`%${Ae.charCodeAt(0).toString(16).toUpperCase()}`)}`,y=\"UNSIGNED-PAYLOAD\",P=new Date().toISOString().replace(/[-:]|\\.\\d+/g,\"\"),D=P.slice(0,8),C=`${D}/${a}/${d}/aws4_request`,O=new URL(`https://${m}${w}`);O.searchParams.set(\"X-Amz-Algorithm\",\"AWS4-HMAC-SHA256\"),O.searchParams.set(\"X-Amz-Content-Sha256\",y),O.searchParams.set(\"X-Amz-Credential\",`${e}/${C}`),O.searchParams.set(\"X-Amz-Date\",P),O.searchParams.set(\"X-Amz-Expires\",l),O.searchParams.set(\"X-Amz-Security-Token\",i),O.searchParams.set(\"X-Amz-SignedHeaders\",\"host\"),h&&O.searchParams.set(\"partNumber\",h),u&&O.searchParams.set(\"uploadId\",u),O.searchParams.set(\"x-id\",h&&u?\"UploadPart\":\"PutObject\");let z=YP({CanonicalUri:w,CanonicalQueryString:O.search.slice(1),SignedHeaders:{host:m},HashedPayload:y}),X=Zy(await JP(z)),K=[\"AWS4-HMAC-SHA256\",P,C,X].join(`\n`),Z=await va(`AWS4${t}`,D),$=await va(Z,a),W=await va($,d),te=await va(W,\"aws4_request\"),se=Zy(await va(te,K));return O.searchParams.set(\"X-Amz-Signature\",se),O}o(Cd,\"createSignedURL\");function ae(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(ae,\"_classPrivateFieldLooseBase\");var ZP=0;function zt(r){return\"__private_\"+ZP+++\"_\"+r}o(zt,\"_classPrivateFieldLooseKey\");function e_(r){let e=new URL(r);return e.search=\"\",e.hash=\"\",e.href}o(e_,\"removeMetadataFromURL\");var ba=zt(\"abortMultipartUpload\"),St=zt(\"cache\"),wa=zt(\"createMultipartUpload\"),Sa=zt(\"fetchSignature\"),xa=zt(\"getUploadParameters\"),Pa=zt(\"listParts\"),Hs=zt(\"previousRetryDelay\"),qs=zt(\"requests\"),Bs=zt(\"retryDelays\"),zs=zt(\"sendCompletionRequest\"),js=zt(\"setS3MultipartState\"),$s=zt(\"uploadPartBytes\"),Pt=zt(\"getFile\"),Td=zt(\"shouldRetry\"),_a=zt(\"nonMultipartUpload\"),yu=class{static{o(this,\"HTTPCommunicationQueue\")}constructor(e,t,i,s){Object.defineProperty(this,_a,{value:r_}),Object.defineProperty(this,Td,{value:t_}),Object.defineProperty(this,ba,{writable:!0,value:void 0}),Object.defineProperty(this,St,{writable:!0,value:new WeakMap}),Object.defineProperty(this,wa,{writable:!0,value:void 0}),Object.defineProperty(this,Sa,{writable:!0,value:void 0}),Object.defineProperty(this,xa,{writable:!0,value:void 0}),Object.defineProperty(this,Pa,{writable:!0,value:void 0}),Object.defineProperty(this,Hs,{writable:!0,value:void 0}),Object.defineProperty(this,qs,{writable:!0,value:void 0}),Object.defineProperty(this,Bs,{writable:!0,value:void 0}),Object.defineProperty(this,zs,{writable:!0,value:void 0}),Object.defineProperty(this,js,{writable:!0,value:void 0}),Object.defineProperty(this,$s,{writable:!0,value:void 0}),Object.defineProperty(this,Pt,{writable:!0,value:void 0}),ae(this,qs)[qs]=e,ae(this,js)[js]=i,ae(this,Pt)[Pt]=s,this.setOptions(t)}setOptions(e){let t=ae(this,qs)[qs];if(\"abortMultipartUpload\"in e&&(ae(this,ba)[ba]=t.wrapPromiseFunction(e.abortMultipartUpload,{priority:1})),\"createMultipartUpload\"in e&&(ae(this,wa)[wa]=t.wrapPromiseFunction(e.createMultipartUpload,{priority:-1})),\"signPart\"in e&&(ae(this,Sa)[Sa]=t.wrapPromiseFunction(e.signPart)),\"listParts\"in e&&(ae(this,Pa)[Pa]=t.wrapPromiseFunction(e.listParts)),\"completeMultipartUpload\"in e&&(ae(this,zs)[zs]=t.wrapPromiseFunction(e.completeMultipartUpload,{priority:1})),\"retryDelays\"in e){var i;ae(this,Bs)[Bs]=(i=e.retryDelays)!=null?i:[]}\"uploadPartBytes\"in e&&(ae(this,$s)[$s]=t.wrapPromiseFunction(e.uploadPartBytes,{priority:1/0})),\"getUploadParameters\"in e&&(ae(this,xa)[xa]=t.wrapPromiseFunction(e.getUploadParameters))}async getUploadId(e,t){let i;for(;(i=ae(this,St)[St].get(e.data))!=null;)try{return await i}catch{}let s=ae(this,wa)[wa](ae(this,Pt)[Pt](e),t),n=o(()=>{s.abort(t.reason),ae(this,St)[St].delete(e.data)},\"abortPromise\");return t.addEventListener(\"abort\",n,{once:!0}),ae(this,St)[St].set(e.data,s),s.then(async a=>{t.removeEventListener(\"abort\",n),ae(this,js)[js](e,a),ae(this,St)[St].set(e.data,a)},()=>{t.removeEventListener(\"abort\",n),ae(this,St)[St].delete(e.data)}),s}async abortFileUpload(e){let t=ae(this,St)[St].get(e.data);if(t==null)return;ae(this,St)[St].delete(e.data),ae(this,js)[js](e,Object.create(null));let i;try{i=await t}catch{return}
2await ae(this,ba)[ba](ae(this,Pt)[Pt](e),i)}async uploadFile(e,t,i){if(pt(i),t.length===1&&!t[0].shouldUseMultipart)return ae(this,_a)[_a](e,t[0],i);let{uploadId:s,key:n}=await this.getUploadId(e,i);pt(i);try{let a=await Promise.all(t.map((l,u)=>this.uploadChunk(e,u+1,l,i)));return pt(i),await ae(this,zs)[zs](ae(this,Pt)[Pt](e),{key:n,uploadId:s,parts:a,signal:i},i).abortOn(i)}catch(a){throw a?.cause!==ma&&a?.name!==\"AbortError\"&&this.abortFileUpload(e),a}}restoreUploadFile(e,t){ae(this,St)[St].set(e.data,t)}async resumeUploadFile(e,t,i){if(pt(i),t.length===1&&t[0]!=null&&!t[0].shouldUseMultipart)return ae(this,_a)[_a](e,t[0],i);let{uploadId:s,key:n}=await this.getUploadId(e,i);pt(i);let a=await ae(this,Pa)[Pa](ae(this,Pt)[Pt](e),{uploadId:s,key:n,signal:i},i).abortOn(i);pt(i);let l=await Promise.all(t.map((u,h)=>{let d=h+1,m=a.find(w=>{let{PartNumber:y}=w;return y===d});return m==null?this.uploadChunk(e,d,u,i):(u==null||u.setAsUploaded==null||u.setAsUploaded(),{PartNumber:d,ETag:m.ETag})}));return pt(i),ae(this,zs)[zs](ae(this,Pt)[Pt](e),{key:n,uploadId:s,parts:l,signal:i},i).abortOn(i)}async uploadChunk(e,t,i,s){pt(s);let{uploadId:n,key:a}=await this.getUploadId(e,s),l=ae(this,Bs)[Bs].values(),u=ae(this,Bs)[Bs].values(),h=o(()=>{let d=l.next();return d==null||d.done?null:d.value},\"shouldRetrySignature\");for(;;){pt(s);let d=i.getData(),{onProgress:m,onComplete:w}=i,y;try{y=await ae(this,Sa)[Sa](ae(this,Pt)[Pt](e),{uploadId:n,key:a,partNumber:t,body:d,signal:s}).abortOn(s)}catch(P){let D=h();if(D==null||s.aborted)throw P;await new Promise(C=>setTimeout(C,D));continue}pt(s);try{return{PartNumber:t,...await ae(this,$s)[$s]({signature:y,body:d,size:d.size,onProgress:m,onComplete:w,signal:s}).abortOn(s)}}catch(P){if(!await ae(this,Td)[Td](P,u))throw P}}}};async function t_(r,e){var t;let i=ae(this,qs)[qs],s=r==null||(t=r.source)==null?void 0:t.status;if(s==null)return!1;if(s===403&&r.message===\"Request has expired\"){if(!i.isPaused){if(i.limit===1||ae(this,Hs)[Hs]==null){let n=e.next();if(n==null||n.done)return!1;ae(this,Hs)[Hs]=n.value}i.rateLimit(0),await new Promise(n=>setTimeout(n,ae(this,Hs)[Hs]))}}else if(s===429){if(!i.isPaused){let n=e.next();if(n==null||n.done)return!1;i.rateLimit(n.value)}}else{if(s>400&&s<500&&s!==409)return!1;if(typeof navigator<\"u\"&&navigator.onLine===!1)i.isPaused||(i.pause(),window.addEventListener(\"online\",()=>{i.resume()},{once:!0}));else{let n=e.next();if(n==null||n.done)return!1;await new Promise(a=>setTimeout(a,n.value))}}return!0}o(t_,\"_shouldRetry2\");async function r_(r,e,t){let{method:i=\"POST\",url:s,fields:n,headers:a}=await ae(this,xa)[xa](ae(this,Pt)[Pt](r),{signal:t}).abortOn(t),l,u=e.getData();if(i.toUpperCase()===\"POST\"){let w=new FormData;Object.entries(n).forEach(y=>{let[P,D]=y;return w.set(P,D)}),w.set(\"file\",u),l=w}else l=u;let{onProgress:h,onComplete:d}=e,m=await ae(this,$s)[$s]({signature:{url:s,headers:a,method:i},body:l,size:u.size,onProgress:h,onComplete:d,signal:t}).abortOn(t);return\"location\"in m?m:{location:e_(s),...m}}o(r_,\"_nonMultipartUpload2\");function re(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(re,\"_classPrivateFieldLooseBase\");var i_=0;function Wt(r){return\"__private_\"+i_+++\"_\"+r}o(Wt,\"_classPrivateFieldLooseKey\");var s_={version:\"4.1.0\"};function Ao(r){if(r!=null&&r.error){let e=new Error(r.message);throw Object.assign(e,r.error),e}return r}o(Ao,\"assertServerError\");function tv(r){let e=r.Expiration;if(e){let t=Math.floor((new Date(e)-Date.now())/1e3);if(t>9)return t}}o(tv,\"getExpiry\");function ev(r){let{meta:e,allowedMetaFields:t,querify:i=!1}=r,s=t??Object.keys(e);return e?Object.fromEntries(s.filter(n=>e[n]!=null).map(n=>{let a=i?`metadata[${n}]`:n,l=String(e[n]);return[a,l]})):{}}o(ev,\"getAllowedMetadata\");var o_={allowedMetaFields:!0,limit:6,getTemporarySecurityCredentials:!1,shouldUseMultipart:o(r=>r.size>>10>>10>100,\"shouldUseMultipart\"),retryDelays:[0,1e3,3e3,5e3]},Vs=Wt(\"companionCommunicationQueue\"),Te=Wt(\"client\"),Fa=Wt(\"setClient\"),jt=Wt(\"assertHost\"),_t=Wt(\"cachedTemporaryCredentials\"),Od=Wt(\"getTemporarySecurityCredentials\"),Ad=Wt(\"setS3MultipartState\"),Gs=Wt(\"getFile\"),Rd=Wt(\"uploadLocalFile\"),kd=Wt(\"getCompanionCl
2ientArgs\"),Ea=Wt(\"upload\"),Ws=Wt(\"setCompanionHeaders\"),Oi=Wt(\"setResumableUploadsCapability\"),Ca=Wt(\"resetResumableCapability\"),Ro=class r extends Ce{static{o(this,\"AwsS3Multipart\")}constructor(e,t){var i;super(e,{...o_,uploadPartBytes:r.uploadPartBytes,createMultipartUpload:null,listParts:null,abortMultipartUpload:null,completeMultipartUpload:null,signPart:null,getUploadParameters:null,...t}),Object.defineProperty(this,kd,{value:c_}),Object.defineProperty(this,Rd,{value:u_}),Object.defineProperty(this,Od,{value:l_}),Object.defineProperty(this,jt,{value:a_}),Object.defineProperty(this,Fa,{value:n_}),Object.defineProperty(this,Vs,{writable:!0,value:void 0}),Object.defineProperty(this,Te,{writable:!0,value:void 0}),Object.defineProperty(this,_t,{writable:!0,value:void 0}),Object.defineProperty(this,Ad,{writable:!0,value:o((n,a)=>{let{key:l,uploadId:u}=a,h=this.uppy.getFile(n.id);h!=null&&this.uppy.setFileState(n.id,{s3Multipart:{...h.s3Multipart,key:l,uploadId:u}})},\"value\")}),Object.defineProperty(this,Gs,{writable:!0,value:o(n=>this.uppy.getFile(n.id)||n,\"value\")}),Object.defineProperty(this,Ea,{writable:!0,value:o(async n=>{if(n.length===0)return;let a=this.uppy.getFilesByIds(n),l=To(a),u=Oo(l);this.uppy.emit(\"upload-start\",u);let h=l.map(m=>{if(m.isRemote){let w=o(()=>this.requests,\"getQueue\");re(this,Oi)[Oi](!1);let y=new AbortController,P=o(C=>{C.id===m.id&&y.abort()},\"removedHandler\");this.uppy.on(\"file-removed\",P);
2let D=this.uppy.getRequestClientForFile(m).uploadRemoteFile(m,re(this,kd)[kd](m),{signal:y.signal,getQueue:w});return this.requests.wrapSyncFunction(()=>{this.uppy.off(\"file-removed\",P)},{priority:-1})(),D}return re(this,Rd)[Rd](m)}),d=await Promise.all(h);return re(this,Oi)[Oi](!0),d},\"value\")}),Object.defineProperty(this,Ws,{writable:!0,value:o(()=>{var n;(n=re(this,Te)[Te])==null||n.setCompanionHeaders(this.opts.headers)},\"value\")}),Object.defineProperty(this,Oi,{writable:!0,value:o(n=>{let{capabilities:a}=this.uppy.getState();this.uppy.setState({capabilities:{...a,resumableUploads:n}})},\"value\")}),Object.defineProperty(this,Ca,{writable:!0,value:o(()=>{re(this,Oi)[Oi](!0)},\"value\")}),this.type=\"uploader\",this.id=this.opts.id||\"AwsS3Multipart\",re(this,Fa)[Fa](t);let s={createMultipartUpload:this.createMultipartUpload,listParts:this.listParts,abortMultipartUpload:this.abortMultipartUpload,completeMultipartUpload:this.completeMultipartUpload,signPart:t!=null&&t.getTemporarySecurityCredentials?this.createSignedURL:this.signPart,getUploadParameters:t!=null&&t.getTemporarySecurityCredentials?this.createSignedURL:this.getUploadParameters};for(let n of Object.keys(s))this.opts[n]==null&&(this.opts[n]=s[n].bind(this));this.requests=(i=this.opts.rateLimitedQueue)!=null?i:new br(this.opts.limit),re(this,Vs)[Vs]=new yu(this.requests,this.opts,re(this,Ad)[Ad],re(this,Gs)[Gs]),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null)}[Symbol.for(\"uppy test: getClient\")](){return re(this,Te)[Te]}setOptions(e){re(this,Vs)[Vs].setOptions(e),super.setOptions(e),re(this,Fa)[Fa](e)}resetUploaderReferences(e,t){this.uploaders[e]&&(this.uploaders[e].abort({really:t?.abort||!1}),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null)}createMultipartUpload(e,t){re(this,jt)[jt](\"createMultipartUpload\"),pt(t);let i=Ci(this.opts.allowedMetaFields,e.meta),s=ev({meta:e.meta,allowedMetaFields:i});return re(this,Te)[Te].post(\"s3/multipart\",{filename:e.name,type:e.type,metadata:s},{signal:t}).then(Ao)}listParts(e,t,i){var s;let{key:n,uploadId:a,signal:l}=t;(s=l)!=null||(l=i),re(this,jt)[jt](\"listParts\"),pt(l);let u=encodeURIComponent(n);return re(this,Te)[Te].get(`s3/multipart/${encodeURIComponent(a)}?key=${u}`,{signal:l}).then(Ao)}completeMultipartUpload(e,t,i){var s;let{key:n,uploadId:a,parts:l,signal:u}=t;(s=u)!=null||(u=i),re(this,jt)[jt](\"completeMultipartUpload\"),pt(u);let h=encodeURIComponent(n),d=encodeURIComponent(a);return re(this,Te)[Te].post(`s3/multipart/${d}/complete?key=${h}`,{parts:l.map(m=>{let{ETag:w,PartNumber:y}=m;return{ETag:w,PartNumber:y}})},{signal:u}).then(Ao)}async createSignedURL(e,t){let i=await re(this,Od)[Od](t),s=tv(i.credentials)||604800,{uploadId:n,key:a,partNumber:l}=t;return{method:\"PUT\",expires:s,fields:{},url:`${await Cd({accountKey:i.credentials.AccessKeyId,accountSecret:i.credentials.SecretAccessKey,sessionToken:i.credentials.SessionToken,expires:s,bucketName:i.bucket,Region:i.region,Key:a??`${crypto.randomUUID()}-${e.name}`,uploadId:n,partNumber:l})}`,headers:{\"Content-Type\":e.type}}}signPart(e,t){let{uploadId:i,key:s,partNumber:n,signal:a}=t;if(re(this,jt)[jt](\"signPart\"),pt(a),i==null||s==null||n==null)throw new Error(\"Cannot sign without a key, an uploadId, and a partNumber\");let l=encodeURIComponent(s);return re(this,Te)[Te].get(`s3/multipart/${encodeURIComponent(i)}/${n}?key=${l}`,{signal:a}).then(Ao)}abortMultipartUpload(e,t){let{key:i,uploadId:s,signal:n}=t;re(this,jt)[jt](\"abortMultipartUpload\");let a=encodeURIComponent(i),l=encodeURIComponent(s);return re(this,Te)[Te].delete(`s3/multipart/${l}?key=${a}
2`,void 0,{signal:n}).then(Ao)}getUploadParameters(e,t){re(this,jt)[jt](\"getUploadParameters\");let{meta:i}=e,{type:s,name:n}=i,a=Ci(this.opts.allowedMetaFields,e.meta),l=ev({meta:i,allowedMetaFields:a,querify:!0}),u=new URLSearchParams({filename:n,type:s,...l});return re(this,Te)[Te].get(`s3/params?${u}`,t)}static async uploadPartBytes(e){let{signature:{url:t,expires:i,headers:s,method:n=\"PUT\"},body:a,size:l=a.size,onProgress:u,onComplete:h,signal:d}=e;if(pt(d),t==null)throw new Error(\"Cannot upload to an undefined URL\");return new Promise((m,w)=>{let y=new XMLHttpRequest;y.open(n,t,!0),s&&Object.keys(s).forEach(C=>{y.setRequestHeader(C,s[C])}),y.responseType=\"text\",typeof i==\"number\"&&(y.timeout=i*1e3);function P(){y.abort()}o(P,\"onabort\");function D(){d?.removeEventListener(\"abort\",P)}o(D,\"cleanup\"),d?.addEventListener(\"abort\",P),y.upload.addEventListener(\"progress\",C=>{u(C)}),y.addEventListener(\"abort\",()=>{D(),w(gu())}),y.addEventListener(\"timeout\",()=>{D();let C=new Error(\"Request has expired\");C.source={status:403},w(C)}),y.addEventListener(\"load\",()=>{if(D(),y.status===403&&y.responseText.includes(\"<Message>Request has expired</Message>\")){let K=new Error(\"Request has expired\");K.source=y,w(K);return}if(y.status<200||y.status>=300){let K=new Error(\"Non 2xx\");K.source=y,w(K);return}u?.({loaded:l,lengthComputable:!0});let C=y.getAllResponseHeaders().trim().split(/[\\r\\n]+/),O={__proto__:null};for(let K of C){let Z=K.split(\": \"),$=Z.shift(),W=Z.join(\": \");O[$]=W}let{etag:z,location:X}=O;if(n.toUpperCase()===\"POST\"&&X===null&&console.warn(\"AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.\"),z===null){w(new Error(\"AwsS3/Multipart: Could not read the ETag header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.\"));return}h?.(z),m({...O,ETag:z})}),y.addEventListener(\"error\",C=>{D();let O=new Error(\"Unknown error\");O.source=C.target,w(O)}),y.send(a)})}install(){re(this,Oi)[Oi](!0),this.uppy.addPreProcessor(re(this,Ws)[Ws]),this.uppy.addUploader(re(this,Ea)[Ea]),this.uppy.on(\"cancel-all\",re(this,Ca)[Ca])}uninstall(){this.uppy.removePreProcessor(re(this,Ws)[Ws]),this.uppy.removeUploader(re(this,Ea)[Ea]),this.uppy.off(\"cancel-all\",re(this,Ca)[Ca])}};function n_(r){r==null||!(\"endpoint\"in r||\"companionUrl\"in r||\"headers\"in r||\"companionHeaders\"in r||\"cookiesRule\"in r||\"companionCookiesRule\"in r)||(\"companionUrl\"in r&&!(\"endpoint\"in r)&&this.uppy.log(\"`companionUrl` option has been removed in @uppy/aws-s3, use `endpoint` instead.\",\"warning\"),\"companionHeaders\"in r&&!(\"headers\"in r)&&this.uppy.log(\"`companionHeaders` option has been removed in @uppy/aws-s3, use `headers` instead.\",\"warning\"),\"companionCookiesRule\"in r&&!(\"cookiesRule\"in r)&&this.uppy.log(\"`companionCookiesRule` option has been removed in @uppy/aws-s3, use `cookiesRule` instead.\",\"warning\"),\"endpoint\"in r?re(this,Te)[Te]=new $t(this.uppy,{pluginId:this.id,provider:\"AWS\",companionUrl:this.opts.endpoint,companionHeaders:this.opts.headers,companionCookiesRule:this.opts.cookiesRule}):(\"headers\"in r&&re(this,Ws)[Ws](),\"cookiesRule\"in r&&(re(this,Te)[Te].opts.companionCookiesRule=r.cookiesRule)))}o(n_,\"_setClient2\");function a_(r){if(!re(this,Te)[Te])throw new Error(`Expected a \\`endpoint\\` option containing a URL, or if you are not using Companion, a custom \\`${r}\\` implementation.`)}o(a_,\"_assertHost2\");async function l_(r){if(pt(r?.signal),re(this,_t)[_t]==null){let{getTemporarySecurityCredentials:e}=this.opts;e===!0?(re(this,jt)[jt](\"getTemporarySecurityCredentials\"),re(this,_t)[_t]=re(this,Te)[Te].get(\"s3/sts\",r).then(Ao)):re(this,_t)[_t]=e(r),re(this,_t)[_t]=await re(this,_t)[_t],setTimeout(()=>{re(this,_t)[_t]=null},(tv(re(this,_t)[_t].credentials)||0)*500)}return re(this,_t)[_t]}o(l_,\"_getTemporarySecurityCredentials2\");function u_(r){var e=this;return new Promise((t,i)=>{let s=o((h,d)=>{var m;let w=this.uppy.getFile(r.id);
2this.uppy.emit(\"upload-progress\",w,{uploadStarted:(m=w.progress.uploadStarted)!=null?m:0,bytesUploaded:h,bytesTotal:d})},\"onProgress\"),n=o(h=>{this.uppy.log(h),this.uppy.emit(\"upload-error\",r,h),this.resetUploaderReferences(r.id),i(h)},\"onError\"),a=o(h=>{let d={body:{...h},status:200,uploadURL:h.location};this.resetUploaderReferences(r.id),this.uppy.emit(\"upload-success\",re(this,Gs)[Gs](r),d),h.location&&this.uppy.log(`Download ${r.name} from ${h.location}`),t()},\"onSuccess\"),l=new Qy(r.data,{companionComm:re(this,Vs)[Vs],log:o(function(){return e.uppy.log(...arguments)},\"log\"),getChunkSize:this.opts.getChunkSize?this.opts.getChunkSize.bind(this):void 0,onProgress:s,onError:n,onSuccess:a,onPartComplete:o(h=>{this.uppy.emit(\"s3-multipart:part-uploaded\",re(this,Gs)[Gs](r),h)},\"onPartComplete\"),file:r,shouldUseMultipart:this.opts.shouldUseMultipart,...r.s3Multipart});this.uploaders[r.id]=l;let u=new xi(this.uppy);this.uploaderEvents[r.id]=u,u.onFileRemove(r.id,h=>{l.abort(),this.resetUploaderReferences(r.id,{abort:!0}),t(`upload ${h} was removed`)}),u.onCancelAll(r.id,()=>{l.abort(),this.resetUploaderReferences(r.id,{abort:!0}),t(`upload ${r.id} was canceled`)}),u.onFilePause(r.id,h=>{h?l.pause():l.start()}),u.onPauseAll(r.id,()=>{l.pause()}),u.onResumeAll(r.id,()=>{l.start()}),l.start()})}o(u_,\"_uploadLocalFile2\");function c_(r){var e;return{...(e=r.remote)==null?void 0:e.body,protocol:\"s3-multipart\",size:r.data.size,metadata:r.meta}}o(c_,\"_getCompanionClientArgs2\");Ro.VERSION=s_.version;function ko(r){\"@babel/helpers - typeof\";return ko=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},ko(r)}o(ko,\"_typeof\");function rv(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,d_(i.key),i)}}o(rv,\"_defineProperties\");function h_(r,e,t){return e&&rv(r.prototype,e),t&&rv(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(h_,\"_createClass\");function d_(r){var e=p_(r,\"string\");return ko(e)==\"symbol\"?e:e+\"\"}o(d_,\"_toPropertyKey\");function p_(r,e){if(ko(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(ko(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(p_,\"_toPrimitive\");function f_(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(f_,\"_classCallCheck\");function m_(r,e,t){return e=Oa(e),g_(r,Dd()?Reflect.construct(e,t||[],Oa(r).constructor):e.apply(r,t))}o(m_,\"_callSuper\");function g_(r,e){if(e&&(ko(e)===\"object\"||typeof e==\"function\"))return e;if(e!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return y_(r)}o(g_,\"_possibleConstructorReturn\");function y_(r){if(r===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return r}o(y_,\"_assertThisInitialized\");function v_(r,e){if(typeof e!=\"function\"&&e!==null)throw new TypeError(\"Super expression must either be null or a function\");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,\"prototype\",{writable:!1}),e&&Ta(r,e)}o(v_,\"_inherits\");function Ud(r){var e=typeof Map==\"function\"?new Map:void 0;return Ud=o(function(i){if(i===null||!w_(i))return i;if(typeof i!=\"function\")throw new TypeError(\"Super expression must either be null or a function\");if(typeof e<\"u\"){if(e.has(i))return e.get(i);e.set(i,s)}function s(){return b_(i,arguments,Oa(this).constructor)}return o(s,\"Wrapper\"),s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Ta(s,i)},\"_wrapNativeSuper\"),Ud(r)}o(Ud,\"_wrapNativeSuper\");function b_(r,e,t){if(Dd())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,e);var s=new(r.bind.apply(r,i));return t&&Ta(s,t.prototype),s}o(b_,\"_construct\");function Dd(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dd=o(function(){return!!r},\"_isNativeReflectConstruct\"))()}o(Dd,\"_isNativeReflectConstruct\");function w_(r){try{return Function.toString.call(r).indexOf(\"[native code]\")!==-1}catch{return typeof r==\"function\"}}o(w_,\"_isNativeFunction\");
2function Ta(r,e){return Ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():o(function(i,s){return i.__proto__=s,i},\"_setPrototypeOf\"),Ta(r,e)}o(Ta,\"_setPrototypeOf\");function Oa(r){return Oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():o(function(t){return t.__proto__||Object.getPrototypeOf(t)},\"_getPrototypeOf\"),Oa(r)}o(Oa,\"_getPrototypeOf\");var S_=function(r){function e(t){var i,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(f_(this,e),i=m_(this,e,[t]),i.originalRequest=n,i.originalResponse=a,i.causingError=s,s!=null&&(t+=\", caused by \".concat(s.toString())),n!=null){var l=n.getHeader(\"X-Request-ID\")||\"n/a\",u=n.getMethod(),h=n.getURL(),d=a?a.getStatus():\"n/a\",m=a?a.getBody()||\"\":\"n/a\";t+=\", originated from request (method: \".concat(u,\", url: \").concat(h,\", response code: \").concat(d,\", response text: \").concat(m,\", request id: \").concat(l,\")\")}return i.message=t,i}return o(e,\"DetailedError\"),v_(e,r),h_(e)}(Ud(Error)),Uo=S_;var P_=!1;function $i(r){P_&&console.log(r)}o($i,\"log\");function Aa(r){\"@babel/helpers - typeof\";return Aa=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Aa(r)}o(Aa,\"_typeof\");function __(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(__,\"_classCallCheck\");function iv(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,F_(i.key),i)}}o(iv,\"_defineProperties\");function x_(r,e,t){return e&&iv(r.prototype,e),t&&iv(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(x_,\"_createClass\");function F_(r){var e=E_(r,\"string\");return Aa(e)==\"symbol\"?e:e+\"\"}o(F_,\"_toPropertyKey\");function E_(r,e){if(Aa(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Aa(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(E_,\"_toPrimitive\");var sv=function(){function r(){__(this,r)}return o(r,\"NoopUrlStorage\"),x_(r,[{key:\"listAllUploads\",value:o(function(){return Promise.resolve([])},\"listAllUploads\")},{key:\"findUploadsByFingerprint\",value:o(function(t){return Promise.resolve([])},\"findUploadsByFingerprint\")},{key:\"removeUpload\",value:o(function(t){return Promise.resolve()},\"removeUpload\")},{key:\"addUpload\",value:o(function(t,i){return Promise.resolve(null)},\"addUpload\")}])}();var cv=\"3.7.7\",C_=cv,Io=typeof Buffer==\"function\",ov=typeof TextDecoder==\"function\"?new TextDecoder:void 0,nv=typeof TextEncoder==\"function\"?new TextEncoder:void 0,T_=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",Ra=Array.prototype.slice.call(T_),vu=(r=>{let e={};return r.forEach((t,i)=>e[t]=i),e})(Ra),O_=/^(?:[A-Za-z\\d+\\/]{4})*?(?:[A-Za-z\\d+\\/]{2}(?:==)?|[A-Za-z\\d+\\/]{3}=?)?$/,xt=String.fromCharCode.bind(String),av=typeof Uint8Array.from==\"function\"?Uint8Array.from.bind(Uint8Array):r=>new Uint8Array(Array.prototype.slice.call(r,0)),hv=o(r=>r.replace(/=/g,\"\").replace(/[+\\/]/g,e=>e==\"+\"?\"-\":\"_\"),\"_mkUriSafe\"),dv=o(r=>r.replace(/[^A-Za-z0-9\\+\\/]/g,\"\"),\"_tidyB64\"),pv=o(r=>{let e,t,i,s,n=\"\",a=r.length%3;for(let l=0;l<r.length;){if((t=r.charCodeAt(l++))>255||(i=r.charCodeAt(l++))>255||(s=r.charCodeAt(l++))>255)throw new TypeError(\"invalid character found\");e=t<<16|i<<8|s,n+=Ra[e>>18&63]+Ra[e>>12&63]+Ra[e>>6&63]+Ra[e&63]}return a?n.slice(0,a-3)+\"===\".substring(a):n},\"btoaPolyfill\"),Ld=typeof btoa==\"function\"?r=>btoa(r):Io?r=>Buffer.from(r,\"binary\").toString(\"base64\"):pv,Id=Io?r=>Buffer.from(r).toString(\"base64\"):r=>{let t=[];for(let i=0,s=r.length;i<s;i+=4096)t.push(xt.apply(null,r.subarray(i,i+4096)));return Ld(t.join(\"\"))},bu=o((r,e=!1)=>e?hv(Id(r)):Id(r),\"fromUint8Array\"),A_=o(r=>{if(r.length<2){var e=r.charCodeAt(0);return e<128?r:e<2048?xt(192|e>>>6)+xt(128|e&63):xt(224|e>>>12&15)+xt(128|e>>>6&63)+xt(128|e&63)}else{var e=65536+(r.charCodeAt(0)-55296)*1024+(r.charCodeAt(1)-56320);return xt(240|e>>>18&7)+xt(128|e>>>12&63)+xt(128|e>>>6&63)+xt(128|e&63)}},\"cb_utob\"),R_=/[\\uD800-\\uDBFF][\\uDC00-\\uDFFFF]|[^\\x00-\\x7F]/g,fv=o(r=>r.replace(R_,A_),\"utob\"),lv=Io?r=>Buffer.from(r,\"utf8\").toString(\"base64\"):nv?r=>Id(nv.encode(r)):r=>Ld(fv(r)),Do=o((r,e=!1)=>e?hv(lv(r)):lv(r),\"encode\"),uv=o(r=>Do(r,!0),\"encodeURI\"),k_=/[\\xC0-\\xDF][\\x80-\\xBF]|[\\xE0-\\xEF][\\x80-\\xBF]{2}|[\\xF0-\\xF7][\\x80-\\xBF]{3}/g,U_=o(r=>{switch(r.length){case 4:var e=(7&r.charCodeAt(0))<<18|(63&r.charCodeAt(1))<<12|(63&r.charCodeAt(2))<<6|63&r.charCodeAt(3),t=e-65536;return xt((t>>>10)+55296)+xt((t&1023)+56320);case 3:return xt((15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2));default:return xt((31&r.charCodeAt(0))<<6|63&r.charCodeAt(1))}},\"cb_btou\"),mv=o(r=>r.replace(k_,U_),\"btou\"),gv=o(r=>{if(r=r.replace(/\\s+/g,\"\"),!O_.test(r))throw new TypeError(\"malformed base64.\");r+=\"==\".slice(2-(r.length&3));let e,t=\"\",i,s;for(let n=0;n<r.length;)e=vu[r.charAt(n++)]<<18|vu[r.charAt(n++)]<<12|(i=vu[r.charAt(n++)])<<6|(s=vu[r.charAt(n++)]),t+=i===64?xt(e>>16&255):s===64?xt(e>>16&255,e>>8&255):xt(e>>16&255,e>>8&255,e&255);return t},\"atobPolyfill\"),Md=typeof atob==\"function\"?r=>atob(dv(r)):Io?r=>Buffer.from(r,\"base64\").toString(\"binary\"):gv,yv=Io?r=>av(Buffer.from(r,\"base64\")):r=>av(Md(r).split(\"\").map(e=>e.charCodeAt(0))),vv=o(r=>yv(bv(r)),\"toUint8Array\"),D_=Io?r=>Buffer.from(r,\"base64\").toString(\"utf8\"):ov?r=>ov.decode(yv(r)):r=>mv(Md(r)),bv=o(r=>dv(r.replace(/[-_]/g,e=>e==\"-\"?\"+\":\"/\")),\"_unURI\"),Nd=o(r=>D_(bv(r)),\"decode\"),I_=o(r=>{if(typeof r!=\"string\")return!1;let e=r.replace(/\\s+/g,\"\").replace(/={0,2}$/,\"\");return!/[^\\s0-9a-zA-Z\\+/]/.test(e)||!/[^\\s0-9a-zA-Z\\-_]/.test(e)},\"isValid\"),wv=o(r=>({value:r,enumerable:!1,writable:!0,configurable:!0}),\"_noEnum\"),Sv=o(function(){let r=o((e,t)=>Object.defineProperty(String.prototype,e,wv(t)),\"_add\");r(\"fromBase64\",function(){return Nd(this)}),r(\"toBase64\",function(e){return Do(this,e)}),r(\"toBase64URI\",function(){return Do(this,!0)}),r(\"toBase64URL\",function(){return Do(this,!0)}),r(\"toUint8Array\",function(){return vv(this)})},\"extendString\"),Pv=o(function(){let r=o((e,t)=>Object.defineProperty(Uint8Array.prototype,e,wv(t)),\"_add\");r(\"toBase64\",function(e){return bu(this,e)}),r(\"toBase64URI\",function(){return bu(this,!0)}),r(\"toBase64URL\",function(){return bu(this,!0)})},\"extendUint8Array\"),N_=o(()=>{Sv(),Pv()}
2,\"extendBuiltins\"),_v={version:cv,VERSION:C_,atob:Md,atobPolyfill:gv,btoa:Ld,btoaPolyfill:pv,fromBase64:Nd,toBase64:Do,encode:Do,encodeURI:uv,encodeURL:uv,utob:fv,btou:mv,decode:Nd,isValid:I_,fromUint8Array:bu,toUint8Array:vv,extendString:Sv,extendUint8Array:Pv,extendBuiltins:N_};var Xv=ve(Nv());function Hd(){return\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g,function(r){var e=Math.random()*16|0,t=r===\"x\"?e:e&3|8;return t.toString(16)})}o(Hd,\"uuid\");function qd(){\"use strict\";qd=o(function(){return e},\"_regeneratorRuntime\");var r,e={},t=Object.prototype,i=t.hasOwnProperty,s=Object.defineProperty||function(E,S,F){E[S]=F.value},n=typeof Symbol==\"function\"?Symbol:{},a=n.iterator||\"@@iterator\",l=n.asyncIterator||\"@@asyncIterator\",u=n.toStringTag||\"@@toStringTag\";function h(E,S,F){return Object.defineProperty(E,S,{value:F,enumerable:!0,configurable:!0,writable:!0}),E[S]}o(h,\"define\");try{h({},\"\")}catch{h=o(function(F,I,j){return F[I]=j},\"define\")}function d(E,S,F,I){var j=S&&S.prototype instanceof O?S:O,M=Object.create(j.prototype),R=new De(I||[]);return s(M,\"_invoke\",{value:Ae(E,F,R)}),M}o(d,\"wrap\");function m(E,S,F){try{return{type:\"normal\",arg:E.call(S,F)}}catch(I){return{type:\"throw\",arg:I}}}o(m,\"tryCatch\"),e.wrap=d;var w=\"suspendedStart\",y=\"suspendedYield\",P=\"executing\",D=\"completed\",C={};function O(){}o(O,\"Generator\");function z(){}o(z,\"GeneratorFunction\");function X(){}o(X,\"GeneratorFunctionPrototype\");var K={};h(K,a,function(){return this});var Z=Object.getPrototypeOf,$=Z&&Z(Z(ft([])));$&&$!==t&&i.call($,a)&&(K=$);var W=X.prototype=O.prototype=Object.create(K);function te(E){[\"next\",\"throw\",\"return\"].forEach(function(S){h(E,S,function(F){return this._invoke(S,F)})})}o(te,\"defineIteratorMethods\");function se(E,S){function F(j,M,R,T){var A=m(E[j],E,M);if(A.type!==\"throw\"){var N=A.arg,G=N.value;return G&&Ks(G)==\"object\"&&i.call(G,\"__await\")?S.resolve(G.__await).then(function(Y){F(\"next\",Y,R,T)},function(Y){F(\"throw\",Y,R,T)}):S.resolve(G).then(function(Y){N.value=Y,R(N)},function(Y){return F(\"throw\",Y,R,T)})}T(A.arg)}o(F,\"invoke\");var I;s(this,\"_invoke\",{value:o(function(M,R){function T(){return new S(function(A,N){F(M,R,A,N)})}return o(T,\"callInvokeWithMethodAndArg\"),I=I?I.then(T,T):T()},\"value\")})}o(se,\"AsyncIterator\");function Ae(E,S,F){var I=w;return function(j,M){if(I===P)throw Error(\"Generator is already running\");
2if(I===D){if(j===\"throw\")throw M;return{value:r,done:!0}}for(F.method=j,F.arg=M;;){var R=F.delegate;if(R){var T=je(R,F);if(T){if(T===C)continue;return T}}if(F.method===\"next\")F.sent=F._sent=F.arg;else if(F.method===\"throw\"){if(I===w)throw I=D,F.arg;F.dispatchException(F.arg)}else F.method===\"return\"&&F.abrupt(\"return\",F.arg);I=P;var A=m(E,S,F);if(A.type===\"normal\"){if(I=F.done?D:y,A.arg===C)continue;return{value:A.arg,done:F.done}}A.type===\"throw\"&&(I=D,F.method=\"throw\",F.arg=A.arg)}}}o(Ae,\"makeInvokeMethod\");function je(E,S){var F=S.method,I=E.iterator[F];if(I===r)return S.delegate=null,F===\"throw\"&&E.iterator.return&&(S.method=\"return\",S.arg=r,je(E,S),S.method===\"throw\")||F!==\"return\"&&(S.method=\"throw\",S.arg=new TypeError(\"The iterator does not provide a '\"+F+\"' method\")),C;var j=m(I,E.iterator,S.arg);if(j.type===\"throw\")return S.method=\"throw\",S.arg=j.arg,S.delegate=null,C;var M=j.arg;return M?M.done?(S[E.resultName]=M.value,S.next=E.nextLoc,S.method!==\"return\"&&(S.method=\"next\",S.arg=r),S.delegate=null,C):M:(S.method=\"throw\",S.arg=new TypeError(\"iterator result is not an object\"),S.delegate=null,C)}o(je,\"maybeInvokeDelegate\");function He(E){var S={tryLoc:E[0]};1 in E&&(S.catchLoc=E[1]),2 in E&&(S.finallyLoc=E[2],S.afterLoc=E[3]),this.tryEntries.push(S)}o(He,\"pushTryEntry\");function xe(E){var S=E.completion||{};S.type=\"normal\",delete S.arg,E.completion=S}o(xe,\"resetTryEntry\");function De(E){this.tryEntries=[{tryLoc:\"root\"}],E.forEach(He,this),this.reset(!0)}o(De,\"Context\");function ft(E){if(E||E===\"\"){var S=E[a];if(S)return S.call(E);if(typeof E.next==\"function\")return E;if(!isNaN(E.length)){var F=-1,I=o(function j(){for(;++F<E.length;)if(i.call(E,F))return j.value=E[F],j.done=!1,j;return j.value=r,j.done=!0,j},\"next\");return I.next=I}}throw new TypeError(Ks(E)+\" is not iterable\")}return o(ft,\"values\"),z.prototype=X,s(W,\"constructor\",{value:X,configurable:!0}),s(X,\"constructor\",{value:z,configurable:!0}),z.displayName=h(X,u,\"GeneratorFunction\"),e.isGeneratorFunction=function(E){var S=typeof E==\"function\"&&E.constructor;return!!S&&(S===z||(S.displayName||S.name)===\"GeneratorFunction\")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,X):(E.__proto__=X,h(E,u,\"GeneratorFunction\")),E.prototype=Object.create(W),E},e.awrap=function(E){return{__await:E}},te(se.prototype),h(se.prototype,l,function(){return this}),e.AsyncIterator=se,e.async=function(E,S,F,I,j){j===void 0&&(j=Promise);var M=new se(d(E,S,F,I),j);return e.isGeneratorFunction(S)?M:M.next().then(function(R){return R.done?R.value:M.next()})},te(W),h(W,u,\"Generator\"),h(W,a,function(){return this}),h(W,\"toString\",function(){return\"[object Generator]\"}),e.keys=function(E){var S=Object(E),F=[];for(var I in S)F.push(I);return F.reverse(),o(function j(){for(;F.length;){var M=F.pop();if(M in S)return j.value=M,j.done=!1,j}return j.done=!0,j},\"next\")},e.values=ft,De.prototype={constructor:De,reset:o(function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=r,this.tryEntries.forEach(xe),!S)for(var F in this)F.charAt(0)===\"t\"&&i.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=r)},\"reset\"),stop:o(function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type===\"throw\")throw S.arg;return this.rval},\"stop\"),dispatchException:o(function(S){if(this.done)throw S;var F=this;function I(N,G){return R.type=\"throw\",R.arg=S,F.next=N,G&&(F.method=\"next\",F.arg=r),!!G}o(I,\"handle\");for(var j=this.tryEntries.length-1;j>=0;--j){var M=this.tryEntries[j],R=M.completion;if(M.tryLoc===\"root\")return I(\"end\");if(M.tryLoc<=this.prev){var T=i.call(M,\"catchLoc\"),A=i.call(M,\"finallyLoc\");if(T&&A){if(this.prev<M.catchLoc)return I(M.catchLoc,!0);if(this.prev<M.finallyLoc)return I(M.finallyLoc)}else if(T){if(this.prev<M.catchLoc)return I(M.catchLoc,!0)}else{if(!A)throw Error(\"try statement without catch or finally\");if(this.prev<M.finallyLoc)return I(M.finallyLoc)}}}},\"dispatchException\"),abrupt:o(function(S,F){for(var I=this.tryEntries.length-1;I>=0;--I){var j=this.tryEntries[I];if(j.tryLoc<=this.prev&&i.call(j,\"finallyLoc\")&&this.prev<j.finallyLoc){var M=j;break}}M&&(S===\"break\"||S===\"continue\")&&M.tryLoc<=F&&F<=M.finallyLoc&&(M=null);var R=M?M.completion:{};return R.type=S,R.arg=F,M?(this.method=\"next\",this.next=M.finallyLoc,C):this.complete(R)},\"abrupt\"),complete:o(function(S,F){if(S.type===\"throw\")throw S.arg;return S.type===\"break\"||S.type===\"continue\"?this.next=S.arg:S.type===\"return\"?(this.rval=this.arg=S.arg,this.method=\"return\",this.next=\"end\"):S.type===\"normal\"&&F&&(this.next=F),C},\"complete\"),finish:o(function(S){for(var F=this.tryEntries.length-1;F>=0;--F){var I=this.tryEntries[F];if(I.finallyLoc===S)return this.complete(I.completion,I.afterLoc),xe(I),C}},\"finish\"),catch:o(function(S){for(var F=this.tryEntries.length-1;F>=0;--F){var I=this.tryEntries[F];if(I.tryLoc===S){var j=I.completion;if(j.type===\"throw\"){var M=j.arg;xe(I)}return M}}throw Error(\"illegal catch attempt\")},\"_catch\"),delegateYield:o(function(S,F,I){return this.delegate={iterator:ft(S),resultName:F,nextLoc:I},this.method===\"next\"&&(this.arg=r),C},\"delegateYield\")},e}o(qd,\"_regeneratorRuntime\");function Lv(r,e,t,i,s,n,a){try{var l=r[n](a),u=l.value}catch(h){t(h);return}l.done?e(u):Promise.resolve(u).then(i,s)}o(Lv,\"asyncGeneratorStep\");function K_(r){return function(){var e=this,t=arguments;return new Promise(function(i,s){var n=r.apply(e,t);function a(u){Lv(n,i,s,a,l,\"next\",u)}o(a,\"_next\");function l(u){Lv(n,i,s,a,l,\"throw\",u)}o(l,\"_throw\"),a(void 0)})}}o(K_,\"_asyncToGenerator\");function Wv(r,e){return J_(r)||Y_(r,e)||Gv(r,e)||X_()}o(Wv,\"_slicedToArray\");
2function X_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}o(X_,\"_nonIterableRest\");function Y_(r,e){var t=r==null?null:typeof Symbol<\"u\"&&r[Symbol.iterator]||r[\"@@iterator\"];if(t!=null){var i,s,n,a,l=[],u=!0,h=!1;try{if(n=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(i=n.call(t)).done)&&(l.push(i.value),l.length!==e);u=!0);}catch(d){h=!0,s=d}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(h)throw s}}return l}}o(Y_,\"_iterableToArrayLimit\");function J_(r){if(Array.isArray(r))return r}o(J_,\"_arrayWithHoles\");function Ks(r){\"@babel/helpers - typeof\";return Ks=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Ks(r)}o(Ks,\"_typeof\");function Q_(r,e){var t=typeof Symbol<\"u\"&&r[Symbol.iterator]||r[\"@@iterator\"];if(!t){if(Array.isArray(r)||(t=Gv(r))||e&&r&&typeof r.length==\"number\"){t&&(r=t);var i=0,s=o(function(){},\"F\");return{s,n:o(function(){return i>=r.length?{done:!0}:{done:!1,value:r[i++]}},\"n\"),e:o(function(h){throw h},\"e\"),f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var n=!0,a=!1,l;return{s:o(function(){t=t.call(r)},\"s\"),n:o(function(){var h=t.next();return n=h.done,h},\"n\"),e:o(function(h){a=!0,l=h},\"e\"),f:o(function(){try{!n&&t.return!=null&&t.return()}finally{if(a)throw l}},\"f\")}}o(Q_,\"_createForOfIteratorHelper\");function Gv(r,e){if(r){if(typeof r==\"string\")return Mv(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t===\"Object\"&&r.constructor&&(t=r.constructor.name),t===\"Map\"||t===\"Set\")return Array.from(r);if(t===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Mv(r,e)}}o(Gv,\"_unsupportedIterableToArray\");function Mv(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=new Array(e);t<e;t++)i[t]=r[t];return i}o(Mv,\"_arrayLikeToArray\");function Bv(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,i)}return t}o(Bv,\"ownKeys\");function No(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Bv(Object(t),!0).forEach(function(i){Z_(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Bv(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}o(No,\"_objectSpread\");function Z_(r,e,t){return e=Kv(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}o(Z_,\"_defineProperty\");function e5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(e5,\"_classCallCheck\");function zv(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,Kv(i.key),i)}}o(zv,\"_defineProperties\");function t5(r,e,t){return e&&zv(r.prototype,e),t&&zv(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(t5,\"_createClass\");function Kv(r){var e=r5(r,\"string\");return Ks(e)==\"symbol\"?e:e+\"\"}o(Kv,\"_toPropertyKey\");function r5(r,e){if(Ks(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Ks(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(r5,\"_toPrimitive\");var $d=\"tus-v1\",Su=\"ietf-draft-03\",i5={endpoint:null,uploadUrl:null,metadata:{},metadataForPartialUploads:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:Jv,chunkSize:Number.POSITIVE_INFINITY,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,
2storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null,protocol:$d},Yv=function(){function r(e,t){e5(this,r),\"resume\"in t&&console.log(\"tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead.\"),this.options=t,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=e,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return o(r,\"BaseUpload\"),t5(r,[{key:\"findPreviousUploads\",value:o(function(){var t=this;return this.options.fingerprint(this.file,this.options).then(function(i){return t._urlStorage.findUploadsByFingerprint(i)})},\"findPreviousUploads\")},{key:\"resumeFromPreviousUpload\",value:o(function(t){this.url=t.uploadUrl||null,this._parallelUploadUrls=t.parallelUploadUrls||null,this._urlStorageKey=t.urlStorageKey},\"resumeFromPreviousUpload\")},{key:\"start\",value:o(function(){var t=this,i=this.file;if(!i){this._emitError(new Error(\"tus: no file or stream to upload provided\"));return}if(![$d,Su].includes(this.options.protocol)){this._emitError(new Error(\"tus: unsupported protocol \".concat(this.options.protocol)));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error(\"tus: neither an endpoint or an upload URL is provided\"));return}var s=this.options.retryDelays;if(s!=null&&Object.prototype.toString.call(s)!==\"[object Array]\"){this._emitError(new Error(\"tus: the `retryDelays` option must either be an array or null\"));return}if(this.options.parallelUploads>1)for(var n=0,a=[\"uploadUrl\",\"uploadSize\",\"uploadLengthDeferred\"];n<a.length;n++){var l=a[n];if(this.options[l]){this._emitError(new Error(\"tus: cannot use the \".concat(l,\" option when parallelUploads is enabled\")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error(\"tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled\"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error(\"tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`\"));return}}this.options.fingerprint(i,this.options).then(function(u){return u==null?$i(\"No fingerprint was calculated meaning that the upload cannot be stored in the URL storage.\"):$i(\"Calculated fingerprint: \".concat(u)),t._fingerprint=u,t._source?t._source:t.options.fileReader.openFile(i,t.options.chunkSize)}).then(function(u){if(t._source=u,t.options.uploadLengthDeferred)t._size=null;else if(t.options.uploadSize!=null){if(t._size=Number(t.options.uploadSize),Number.isNaN(t._size)){t._emitError(new Error(\"tus: cannot convert `uploadSize` option into a number\"));return}}else if(t._size=t._source.size,t._size==null){t._emitError(new Error(\"tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option\"));return}t.options.parallelUploads>1||t._parallelUploadUrls!=null?t._startParallelUpload():t._startSingleUpload()}).catch(function(u){t._emitError(u)})},\"start\")},{key:\"_startParallelUpload\",value:o(function(){var t,i=this,s=this._size,n=0;this._parallelUploads=[];var a=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,l=(t=this.options.parallelUploadBoundaries)!==null&&t!==void 0?t:o5(this._source.size,a);this._parallelUploadUrls&&l.forEach(function(d,m){d.uploadUrl=i._parallelUploadUrls[m]||null}),this._parallelUploadUrls=new Array(l.length);var u=l.map(function(d,m){var w=0;return i._source.slice(d.start,d.end).then(function(y){var P=y.value;return new Promise(function(D,C){var O=No(No({},i.options),{},{uploadUrl:d.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:i.options.metadataForPartialUploads,headers:No(No({},i.options.headers),{},{\"Upload-Concat\":\"partial\"}),onSuccess:D,onError:C,onProgress:o(function(K){n=n-w+K,w=K,i._emitProgress(n,s)},\"onProgress\"),onUploadUrlAvailable:o(function(){i._parallelUploadUrls[m]=z.url,i._parallelUploadUrls.filter(function(K){return!!K}).length===l.length&&i._saveUploadInUrlStorage()},\"onUploadUrlAvailable\")}),z=new r(P,O);z.start(),i._parallelUploads.push(z)})})}),h;Promise.all(u).then(function(){h=i._openRequest(\"POST\",i.options.endpoint),h.setHeader(\"Upload-Concat\",\"final;\".concat(i._parallelUploadUrls.join(\" \")));var d=jv(i.options.metadata);return d!==\"\"&&h.setHeader(\"Upload-Metadata\",d),i._sendRequest(h,null)}).then(function(d){if(!Lo(d.getStatus(),200)){i._emitHttpError(h,d,\"tus: unexpected response while creating upload\");return}var m=d.getHeader(\"Location\");
2if(m==null){i._emitHttpError(h,d,\"tus: invalid or missing Location header\");return}i.url=Vv(i.options.endpoint,m),$i(\"Created upload at \".concat(i.url)),i._emitSuccess(d)}).catch(function(d){i._emitError(d)})},\"_startParallelUpload\")},{key:\"_startSingleUpload\",value:o(function(){if(this._aborted=!1,this.url!=null){$i(\"Resuming upload from previous URL: \".concat(this.url)),this._resumeUpload();return}if(this.options.uploadUrl!=null){$i(\"Resuming upload from provided URL: \".concat(this.options.uploadUrl)),this.url=this.options.uploadUrl,this._resumeUpload();return}$i(\"Creating a new upload\"),this._createUpload()},\"_startSingleUpload\")},{key:\"abort\",value:o(function(t){var i=this;if(this._parallelUploads!=null){var s=Q_(this._parallelUploads),n;try{for(s.s();!(n=s.n()).done;){var a=n.value;a.abort(t)}}catch(l){s.e(l)}finally{s.f()}}return this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!t||this.url==null?Promise.resolve():r.terminate(this.url,this.options).then(function(){return i._removeFromUrlStorage()})},\"abort\")},{key:\"_emitHttpError\",value:o(function(t,i,s,n){this._emitError(new Uo(s,n,t,i))},\"_emitHttpError\")},{key:\"_emitError\",value:o(function(t){var i=this;if(!this._aborted){if(this.options.retryDelays!=null){var s=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(s&&(this._retryAttempt=0),$v(t,this._retryAttempt,this.options)){var n=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){i.start()},n);return}}if(typeof this.options.onError==\"function\")this.options.onError(t);else throw t}},\"_emitError\")},{key:\"_emitSuccess\",value:o(function(t){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess==\"function\"&&this.options.onSuccess({lastResponse:t})},\"_emitSuccess\")},{key:\"_emitProgress\",value:o(function(t,i){typeof this.options.onProgress==\"function\"&&this.options.onProgress(t,i)},\"_emitProgress\")},{key:\"_emitChunkComplete\",value:o(function(t,i,s){typeof this.options.onChunkComplete==\"function\"&&this.options.onChunkComplete(t,i,s)},\"_emitChunkComplete\")},{key:\"_createUpload\",value:o(function(){var t=this;if(!this.options.endpoint){this._emitError(new Error(\"tus: unable to create upload because no endpoint is provided\"));return}var i=this._openRequest(\"POST\",this.options.endpoint);this.options.uploadLengthDeferred?i.setHeader(\"Upload-Defer-Length\",\"1\"):i.setHeader(\"Upload-Length\",\"\".concat(this._size));var s=jv(this.options.metadata);s!==\"\"&&i.setHeader(\"Upload-Metadata\",s);var n;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,n=this._addChunkToRequest(i)):(this.options.protocol===Su&&i.setHeader(\"Upload-Complete\",\"?0\"),n=this._sendRequest(i,null)),n.then(function(a){if(!Lo(a.getStatus(),200)){t._emitHttpError(i,a,\"tus: unexpected response while creating upload\");return}var l=a.getHeader(\"Location\");if(l==null){t._emitHttpError(i,a,\"tus: invalid or missing Location header\");return}if(t.url=Vv(t.options.endpoint,l),$i(\"Created upload at \".concat(t.url)),typeof t.options.onUploadUrlAvailable==\"function\"&&t.options.onUploadUrlAvailable(),t._size===0){t._emitSuccess(a),t._source.close();return}t._saveUploadInUrlStorage().then(function(){t.options.uploadDataDuringCreation?t._handleUploadResponse(i,a):(t._offset=0,t._performUpload())})}).catch(function(a){t._emitHttpError(i,null,\"tus: failed to create upload\",a)})},\"_createUpload\")},{key:\"_resumeUpload\",value:o(function(){var t=this,i=this._openRequest(\"HEAD\",this.url),s=this._sendRequest(i,null);s.then(function(n){var a=n.getStatus();if(!Lo(a,200)){if(a===423){t._emitHttpError(i,n,\"tus: upload is currently locked; retry later\");return}if(Lo(a,400)&&t._removeFromUrlStorage(),!t.options.endpoint){t._emitHttpError(i,n,\"tus: unable to resume upload (new upload cannot be created without an endpoint)\");return}t.url=null,t._createUpload();return}var l=Number.parseInt(n.getHeader(\"Upload-Offset\"),10);
2if(Number.isNaN(l)){t._emitHttpError(i,n,\"tus: invalid or missing offset value\");return}var u=Number.parseInt(n.getHeader(\"Upload-Length\"),10);if(Number.isNaN(u)&&!t.options.uploadLengthDeferred&&t.options.protocol===$d){t._emitHttpError(i,n,\"tus: invalid or missing length value\");return}typeof t.options.onUploadUrlAvailable==\"function\"&&t.options.onUploadUrlAvailable(),t._saveUploadInUrlStorage().then(function(){if(l===u){t._emitProgress(u,u),t._emitSuccess(n);return}t._offset=l,t._performUpload()})}).catch(function(n){t._emitHttpError(i,null,\"tus: failed to resume upload\",n)})},\"_resumeUpload\")},{key:\"_performUpload\",value:o(function(){var t=this;if(!this._aborted){var i;this.options.overridePatchMethod?(i=this._openRequest(\"POST\",this.url),i.setHeader(\"X-HTTP-Method-Override\",\"PATCH\")):i=this._openRequest(\"PATCH\",this.url),i.setHeader(\"Upload-Offset\",\"\".concat(this._offset));var s=this._addChunkToRequest(i);s.then(function(n){if(!Lo(n.getStatus(),200)){t._emitHttpError(i,n,\"tus: unexpected response while uploading chunk\");return}t._handleUploadResponse(i,n)}).catch(function(n){t._aborted||t._emitHttpError(i,null,\"tus: failed to upload chunk at offset \".concat(t._offset),n)})}},\"_performUpload\")},{key:\"_addChunkToRequest\",value:o(function(t){var i=this,s=this._offset,n=this._offset+this.options.chunkSize;return t.setProgressHandler(function(a){i._emitProgress(s+a,i._size)}),t.setHeader(\"Content-Type\",\"application/offset+octet-stream\"),(n===Number.POSITIVE_INFINITY||n>this._size)&&!this.options.uploadLengthDeferred&&(n=this._size),this._source.slice(s,n).then(function(a){var l=a.value,u=a.done,h=l!=null&&l.size?l.size:0;i.options.uploadLengthDeferred&&u&&(i._size=i._offset+h,t.setHeader(\"Upload-Length\",\"\".concat(i._size)));var d=i._offset+h;return!i.options.uploadLengthDeferred&&u&&d!==i._size?Promise.reject(new Error(\"upload was configured with a size of \".concat(i._size,\" bytes, but the source is done after \").concat(d,\" bytes\"))):l===null?i._sendRequest(t):(i.options.protocol===Su&&t.setHeader(\"Upload-Complete\",u?\"?1\":\"?0\"),i._emitProgress(i._offset,i._size),i._sendRequest(t,l))})},\"_addChunkToRequest\")},{key:\"_handleUploadResponse\",value:o(function(t,i){var s=Number.parseInt(i.getHeader(\"Upload-Offset\"),10);if(Number.isNaN(s)){this._emitHttpError(t,i,\"tus: invalid or missing offset value\");return}if(this._emitProgress(s,this._size),this._emitChunkComplete(s-this._offset,s,this._size),this._offset=s,s===this._size){this._emitSuccess(i),this._source.close();return}this._performUpload()},\"_handleUploadResponse\")},{key:\"_openRequest\",value:o(function(t,i){var s=Hv(t,i,this.options);return this._req=s,s},\"_openRequest\")},{key:\"_removeFromUrlStorage\",value:o(function(){var t=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(i){t._emitError(i)}),this._urlStorageKey=null)},\"_removeFromUrlStorage\")},{key:\"_saveUploadInUrlStorage\",value:o(function(){var t=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var i={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?i.parallelUploadUrls=this._parallelUploadUrls:i.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,i).then(function(s){t._urlStorageKey=s})},\"_saveUploadInUrlStorage\")},{key:\"_sendRequest\",value:o(function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return qv(t,i,this.options)},\"_sendRequest\")}],[{key:\"terminate\",value:o(function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=Hv(\"DELETE\",t,i);return qv(s,null,i).then(function(n){if(n.getStatus()!==204)throw new Uo(\"tus: unexpected response while terminating upload\",null,s,n)}).catch(function(n){if(n instanceof Uo||(n=new Uo(\"tus: failed to terminate upload\",n,s,null)),!$v(n,0,i))throw n;var a=i.retryDelays[0],l=i.retryDelays.slice(1),u=No(No({},i),{},{retryDelays:l});return new Promise(function(h){return setTimeout(h,a)}).then(function(){return r.terminate(t,u)})})},\"terminate\")}])}();function jv(r){return Object.entries(r).map(function(e){var t=Wv(e,2),i=t[0],s=t[1];return\"\".concat(i,\" \").concat(_v.encode(String(s)))}).join(\",\")}o(jv,\"encodeMetadata\");function Lo(r,e){return r>=e&&r<e+100}o(Lo,\"inStatusCategory\");function Hv(r,e,t){var i=t.httpStack.createRequest(r,e);t.protocol===Su?i.setHeader(\"Upload-Draft-Interop-Version\",\"5\"):i.setHeader(\"Tus-Resumable\",\"1.0.0\");for(var s=t.headers||{},n=0,a=Object.entries(s);n<a.length;
2n++){var l=Wv(a[n],2),u=l[0],h=l[1];i.setHeader(u,h)}if(t.addRequestId){var d=Hd();i.setHeader(\"X-Request-ID\",d)}return i}o(Hv,\"openRequest\");function qv(r,e,t){return Vd.apply(this,arguments)}o(qv,\"sendRequest\");function Vd(){return Vd=K_(qd().mark(o(function r(e,t,i){var s;return qd().wrap(o(function(a){for(;;)switch(a.prev=a.next){case 0:if(typeof i.onBeforeRequest!=\"function\"){a.next=3;break}return a.next=3,i.onBeforeRequest(e);case 3:return a.next=5,e.send(t);case 5:if(s=a.sent,typeof i.onAfterResponse!=\"function\"){a.next=9;break}return a.next=9,i.onAfterResponse(e,s);case 9:return a.abrupt(\"return\",s);case 10:case\"end\":return a.stop()}},\"_callee$\"),r)},\"_callee\"))),Vd.apply(this,arguments)}o(Vd,\"_sendRequest2\");function s5(){var r=!0;return typeof navigator<\"u\"&&navigator.onLine===!1&&(r=!1),r}o(s5,\"isOnline\");function $v(r,e,t){return t.retryDelays==null||e>=t.retryDelays.length||r.originalRequest==null?!1:t&&typeof t.onShouldRetry==\"function\"?t.onShouldRetry(r,e,t):Jv(r)}o($v,\"shouldRetry\");function Jv(r){var e=r.originalResponse?r.originalResponse.getStatus():0;return(!Lo(e,400)||e===409||e===423)&&s5()}o(Jv,\"defaultOnShouldRetry\");function Vv(r,e){return new Xv.default(e,r).toString()}o(Vv,\"resolveUrl\");function o5(r,e){for(var t=Math.floor(r/e),i=[],s=0;s<e;s++)i.push({start:t*s,end:t*(s+1)});return i[e-1].end=r,i}o(o5,\"splitSizeIntoParts\");Yv.defaultOptions=i5;var Pu=Yv;var n5=o(function(){return typeof navigator<\"u\"&&typeof navigator.product==\"string\"&&navigator.product.toLowerCase()===\"reactnative\"},\"isReactNative\"),_u=n5;function Wd(r){return new Promise(function(e,t){var i=new XMLHttpRequest;i.responseType=\"blob\",i.onload=function(){var s=i.response;e(s)},i.onerror=function(s){t(s)},i.open(\"GET\",r),i.send()})}o(Wd,\"uriToBlob\");var a5=o(function(){return typeof window<\"u\"&&(typeof window.PhoneGap<\"u\"||typeof window.Cordova<\"u\"||typeof window.cordova<\"u\")},\"isCordova\"),Qv=a5;function Gd(r){return new Promise(function(e,t){var i=new FileReader;i.onload=function(){var s=new Uint8Array(i.result);e({value:s})},i.onerror=function(s){t(s)},i.readAsArrayBuffer(r)})}o(Gd,\"readAsByteArray\");function ka(r){\"@babel/helpers - typeof\";return ka=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},ka(r)}o(ka,\"_typeof\");function l5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(l5,\"_classCallCheck\");function Zv(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,c5(i.key),i)}}o(Zv,\"_defineProperties\");function u5(r,e,t){return e&&Zv(r.prototype,e),t&&Zv(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(u5,\"_createClass\");function c5(r){var e=h5(r,\"string\");return ka(e)==\"symbol\"?e:e+\"\"}o(c5,\"_toPropertyKey\");function h5(r,e){if(ka(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(ka(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(h5,\"_toPrimitive\");var Kd=function(){function r(e){l5(this,r),this._file=e,this.size=e.size}return o(r,\"FileSource\"),u5(r,[{key:\"slice\",value:o(function(t,i){if(Qv())return Gd(this._file.slice(t,i));var s=this._file.slice(t,i),n=i>=this.size;return Promise.resolve({value:s,done:n})},\"slice\")},{key:\"close\",value:o(function(){},\"close\")}])}();function Ua(r){\"@babel/helpers - typeof\";return Ua=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Ua(r)}o(Ua,\"_typeof\");function d5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(d5,\"_classCallCheck\");function e0(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,f5(i.key),i)}}o(e0,\"_defineProperties\");function p5(r,e,t){return e&&e0(r.prototype,e),t&&e0(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(p5,\"_createClass\");function f5(r){var e=m5(r,\"string\");return Ua(e)==\"symbol\"?e:e+\"\"}o(f5,\"_toPropertyKey\");function m5(r,e){if(Ua(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Ua(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(m5,\"_toPrimitive\");function t0(r){return r===void 0?0:r.size!==void 0?r.size:r.length}o(t0,\"len\");function g5(r,e){if(r.concat)return r.concat(e);
2if(r instanceof Blob)return new Blob([r,e],{type:r.type});if(r.set){var t=new r.constructor(r.length+e.length);return t.set(r),t.set(e,r.length),t}throw new Error(\"Unknown data type\")}o(g5,\"concat\");var r0=function(){function r(e){d5(this,r),this._buffer=void 0,this._bufferOffset=0,this._reader=e,this._done=!1}return o(r,\"StreamSource\"),p5(r,[{key:\"slice\",value:o(function(t,i){return t<this._bufferOffset?Promise.reject(new Error(\"Requested data is before the reader's current offset\")):this._readUntilEnoughDataOrDone(t,i)},\"slice\")},{key:\"_readUntilEnoughDataOrDone\",value:o(function(t,i){var s=this,n=i<=this._bufferOffset+t0(this._buffer);if(this._done||n){var a=this._getDataFromBuffer(t,i),l=a==null?this._done:!1;return Promise.resolve({value:a,done:l})}return this._reader.read().then(function(u){var h=u.value,d=u.done;return d?s._done=!0:s._buffer===void 0?s._buffer=h:s._buffer=g5(s._buffer,h),s._readUntilEnoughDataOrDone(t,i)})},\"_readUntilEnoughDataOrDone\")},{key:\"_getDataFromBuffer\",value:o(function(t,i){t>this._bufferOffset&&(this._buffer=this._buffer.slice(t-this._bufferOffset),this._bufferOffset=t);var s=t0(this._buffer)===0;return this._done&&s?null:this._buffer.slice(0,i-t)},\"_getDataFromBuffer\")},{key:\"close\",value:o(function(){this._reader.cancel&&this._reader.cancel()},\"close\")}])}();function Xs(r){\"@babel/helpers - typeof\";return Xs=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Xs(r)}o(Xs,\"_typeof\");function Xd(){\"use strict\";Xd=o(function(){return e},\"_regeneratorRuntime\");var r,e={},t=Object.prototype,i=t.hasOwnProperty,s=Object.defineProperty||function(E,S,F){E[S]=F.value},n=typeof Symbol==\"function\"?Symbol:{},a=n.iterator||\"@@iterator\",l=n.asyncIterator||\"@@asyncIterator\",u=n.toStringTag||\"@@toStringTag\";function h(E,S,F){return Object.defineProperty(E,S,{value:F,enumerable:!0,configurable:!0,writable:!0}),E[S]}o(h,\"define\");try{h({},\"\")}catch{h=o(function(F,I,j){return F[I]=j},\"define\")}function d(E,S,F,I){var j=S&&S.prototype instanceof O?S:O,M=Object.create(j.prototype),R=new De(I||[]);return s(M,\"_invoke\",{value:Ae(E,F,R)}),M}o(d,\"wrap\");function m(E,S,F){try{return{type:\"normal\",arg:E.call(S,F)}}catch(I){return{type:\"throw\",arg:I}}}o(m,\"tryCatch\"),e.wrap=d;var w=\"suspendedStart\",y=\"suspendedYield\",P=\"executing\",D=\"completed\",C={};function O(){}o(O,\"Generator\");function z(){}o(z,\"GeneratorFunction\");function X(){}o(X,\"GeneratorFunctionPrototype\");var K={};h(K,a,function(){return this});var Z=Object.getPrototypeOf,$=Z&&Z(Z(ft([])));$&&$!==t&&i.call($,a)&&(K=$);var W=X.prototype=O.prototype=Object.create(K);function te(E){[\"next\",\"throw\",\"return\"].forEach(function(S){h(E,S,function(F){return this._invoke(S,F)})})}o(te,\"defineIteratorMethods\");function se(E,S){function F(j,M,R,T){var A=m(E[j],E,M);if(A.type!==\"throw\"){var N=A.arg,G=N.value;return G&&Xs(G)==\"object\"&&i.call(G,\"__await\")?S.resolve(G.__await).then(function(Y){F(\"next\",Y,R,T)},function(Y){F(\"throw\",Y,R,T)}):S.resolve(G).then(function(Y){N.value=Y,R(N)},function(Y){return F(\"throw\",Y,R,T)})}T(A.arg)}o(F,\"invoke\");var I;s(this,\"_invoke\",{value:o(function(M,R){function T(){return new S(function(A,N){F(M,R,A,N)})}return o(T,\"callInvokeWithMethodAndArg\"),I=I?I.then(T,T):T()},\"value\")})}o(se,\"AsyncIterator\");function Ae(E,S,F){var I=w;return function(j,M){if(I===P)throw Error(\"Generator is already running\");
2if(I===D){if(j===\"throw\")throw M;return{value:r,done:!0}}for(F.method=j,F.arg=M;;){var R=F.delegate;if(R){var T=je(R,F);if(T){if(T===C)continue;return T}}if(F.method===\"next\")F.sent=F._sent=F.arg;else if(F.method===\"throw\"){if(I===w)throw I=D,F.arg;F.dispatchException(F.arg)}else F.method===\"return\"&&F.abrupt(\"return\",F.arg);I=P;var A=m(E,S,F);if(A.type===\"normal\"){if(I=F.done?D:y,A.arg===C)continue;return{value:A.arg,done:F.done}}A.type===\"throw\"&&(I=D,F.method=\"throw\",F.arg=A.arg)}}}o(Ae,\"makeInvokeMethod\");function je(E,S){var F=S.method,I=E.iterator[F];if(I===r)return S.delegate=null,F===\"throw\"&&E.iterator.return&&(S.method=\"return\",S.arg=r,je(E,S),S.method===\"throw\")||F!==\"return\"&&(S.method=\"throw\",S.arg=new TypeError(\"The iterator does not provide a '\"+F+\"' method\")),C;var j=m(I,E.iterator,S.arg);if(j.type===\"throw\")return S.method=\"throw\",S.arg=j.arg,S.delegate=null,C;var M=j.arg;return M?M.done?(S[E.resultName]=M.value,S.next=E.nextLoc,S.method!==\"return\"&&(S.method=\"next\",S.arg=r),S.delegate=null,C):M:(S.method=\"throw\",S.arg=new TypeError(\"iterator result is not an object\"),S.delegate=null,C)}o(je,\"maybeInvokeDelegate\");function He(E){var S={tryLoc:E[0]};1 in E&&(S.catchLoc=E[1]),2 in E&&(S.finallyLoc=E[2],S.afterLoc=E[3]),this.tryEntries.push(S)}o(He,\"pushTryEntry\");function xe(E){var S=E.completion||{};S.type=\"normal\",delete S.arg,E.completion=S}o(xe,\"resetTryEntry\");function De(E){this.tryEntries=[{tryLoc:\"root\"}],E.forEach(He,this),this.reset(!0)}o(De,\"Context\");function ft(E){if(E||E===\"\"){var S=E[a];if(S)return S.call(E);if(typeof E.next==\"function\")return E;if(!isNaN(E.length)){var F=-1,I=o(function j(){for(;++F<E.length;)if(i.call(E,F))return j.value=E[F],j.done=!1,j;return j.value=r,j.done=!0,j},\"next\");return I.next=I}}throw new TypeError(Xs(E)+\" is not iterable\")}return o(ft,\"values\"),z.prototype=X,s(W,\"constructor\",{value:X,configurable:!0}),s(X,\"constructor\",{value:z,configurable:!0}),z.displayName=h(X,u,\"GeneratorFunction\"),e.isGeneratorFunction=function(E){var S=typeof E==\"function\"&&E.constructor;return!!S&&(S===z||(S.displayName||S.name)===\"GeneratorFunction\")},e.mark=function(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,X):(E.__proto__=X,h(E,u,\"GeneratorFunction\")),E.prototype=Object.create(W),E},e.awrap=function(E){return{__await:E}},te(se.prototype),h(se.prototype,l,function(){return this}),e.AsyncIterator=se,e.async=function(E,S,F,I,j){j===void 0&&(j=Promise);var M=new se(d(E,S,F,I),j);return e.isGeneratorFunction(S)?M:M.next().then(function(R){return R.done?R.value:M.next()})},te(W),h(W,u,\"Generator\"),h(W,a,function(){return this}),h(W,\"toString\",function(){return\"[object Generator]\"}),e.keys=function(E){var S=Object(E),F=[];for(var I in S)F.push(I);return F.reverse(),o(function j(){for(;F.length;){var M=F.pop();if(M in S)return j.value=M,j.done=!1,j}return j.done=!0,j},\"next\")},e.values=ft,De.prototype={constructor:De,reset:o(function(S){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method=\"next\",this.arg=r,this.tryEntries.forEach(xe),!S)for(var F in this)F.charAt(0)===\"t\"&&i.call(this,F)&&!isNaN(+F.slice(1))&&(this[F]=r)},\"reset\"),stop:o(function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type===\"throw\")throw S.arg;return this.rval},\"stop\"),dispatchException:o(function(S){if(this.done)throw S;var F=this;function I(N,G){return R.type=\"throw\",R.arg=S,F.next=N,G&&(F.method=\"next\",F.arg=r),!!G}o(I,\"handle\");for(var j=this.tryEntries.length-1;j>=0;--j){var M=this.tryEntries[j],R=M.completion;if(M.tryLoc===\"root\")return I(\"end\");if(M.tryLoc<=this.prev){var T=i.call(M,\"catchLoc\"),A=i.call(M,\"finallyLoc\");if(T&&A){if(this.prev<M.catchLoc)return I(M.catchLoc,!0);if(this.prev<M.finallyLoc)return I(M.finallyLoc)}else if(T){if(this.prev<M.catchLoc)return I(M.catchLoc,!0)}else{if(!A)throw Error(\"try statement without catch or finally\");if(this.prev<M.finallyLoc)return I(M.finallyLoc)}}}},\"dispatchException\"),abrupt:o(function(S,F){for(var I=this.tryEntries.length-1;I>=0;--I){var j=this.tryEntries[I];if(j.tryLoc<=this.prev&&i.call(j,\"finallyLoc\")&&this.prev<j.finallyLoc){var M=j;break}}M&&(S===\"break\"||S===\"continue\")&&M.tryLoc<=F&&F<=M.finallyLoc&&(M=null);var R=M?M.completion:{};return R.type=S,R.arg=F,M?(this.method=\"next\",this.next=M.finallyLoc,C):this.complete(R)},\"abrupt\"),complete:o(function(S,F){if(S.type===\"throw\")throw S.arg;return S.type===\"break\"||S.type===\"continue\"?this.next=S.arg:S.type===\"return\"?(this.rval=this.arg=S.arg,this.method=\"return\",this.next=\"end\"):S.type===\"normal\"&&F&&(this.next=F),C},\"complete\"),finish:o(function(S){for(var F=this.tryEntries.length-1;F>=0;--F){var I=this.tryEntries[F];if(I.finallyLoc===S)return this.complete(I.completion,I.afterLoc),xe(I),C}},\"finish\"),catch:o(function(S){for(var F=this.tryEntries.length-1;F>=0;--F){var I=this.tryEntries[F];if(I.tryLoc===S){var j=I.completion;if(j.type===\"throw\"){var M=j.arg;xe(I)}return M}}throw Error(\"illegal catch attempt\")},\"_catch\"),delegateYield:o(function(S,F,I){return this.delegate={iterator:ft(S),resultName:F,nextLoc:I},this.method===\"next\"&&(this.arg=r),C},\"delegateYield\")},e}o(Xd,\"_regeneratorRuntime\");function i0(r,e,t,i,s,n,a){try{var l=r[n](a),u=l.value}catch(h){t(h);return}l.done?e(u):Promise.resolve(u).then(i,s)}o(i0,\"asyncGeneratorStep\");function y5(r){return function(){var e=this,t=arguments;return new Promise(function(i,s){var n=r.apply(e,t);function a(u){i0(n,i,s,a,l,\"next\",u)}o(a,\"_next\");function l(u){i0(n,i,s,a,l,\"throw\",u)}o(l,\"_throw\"),a(void 0)})}}o(y5,\"_asyncToGenerator\");function v5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(v5,\"_classCallCheck\");function s0(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,w5(i.key),i)}}o(s0,\"_defineProperties\");function b5(r,e,t){return e&&s0(r.prototype,e),t&&s0(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(b5,\"_createClass\");function w5(r){var e=S5(r,\"string\");return Xs(e)==\"symbol\"?e:e+\"\"}o(w5,\"_toPropertyKey\");function S5(r,e){if(Xs(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Xs(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(S5,\"_toPrimitive\");var o0=function(){function r(){v5(this,r)}return o(r,\"FileReader\"),b5(r,[{key:\"openFile\",value:function(){var e=y5(Xd().mark(o(function i(s,n){var a;return Xd().wrap(o(function(u){for(;;)switch(u.prev=u.next){case 0:if(!(_u()&&s&&typeof s.uri<\"u\")){u.next=11;break}return u.prev=1,u.next=4,Wd(s.uri);case 4:return a=u.sent,u.abrupt(\"return\",new Kd(a));case 8:throw u.prev=8,u.t0=u.catch(1),new Error(\"tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. \".concat(u.t0));case 11:if(!(typeof s.slice==\"function\"&&typeof s.size<\"u\")){u.next=13;break}return u.abrupt(\"return\",Promise.resolve(new Kd(s)));case 13:if(typeof s.read!=\"function\"){u.next=18;break}if(n=Number(n),Number.isFinite(n)){u.next=17;break}return u.abrupt(\"return\",Promise.reject(new Error(\"cannot create source for stream without a finite value for the `chunkSize` option\")));case 17:return u.abrupt(\"return\",Promise.resolve(new r0(s,n)));case 18:return u.abrupt(\"return\",Promise.reject(new Error(\"source object may only be an instance of File, Blob, or Reader in this environment\")));case 19:case\"end\":return u.stop()}},\"_callee$\"),i,null,[[1,8]])},\"_callee\")));function t(i,s){return e.apply(this,arguments)}return o(t,\"openFile\"),t}()}])}();function Yd(r,e){return _u()?Promise.resolve(P5(r,e)):Promise.resolve([\"tus-br\",r.name,r.type,r.size,r.lastModified,e.endpoint].join(\"
2-\"))}o(Yd,\"fingerprint\");function P5(r,e){var t=r.exif?_5(JSON.stringify(r.exif)):\"noexif\";return[\"tus-rn\",r.name||\"noname\",r.size||\"nosize\",t,e.endpoint].join(\"/\")}o(P5,\"reactNativeFingerprint\");function _5(r){var e=0;if(r.length===0)return e;for(var t=0;t<r.length;t++){var i=r.charCodeAt(t);e=(e<<5)-e+i,e&=e}return e}o(_5,\"hashCode\");function Da(r){\"@babel/helpers - typeof\";return Da=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Da(r)}o(Da,\"_typeof\");function Jd(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(Jd,\"_classCallCheck\");function n0(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,x5(i.key),i)}}o(n0,\"_defineProperties\");function Qd(r,e,t){return e&&n0(r.prototype,e),t&&n0(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(Qd,\"_createClass\");function x5(r){var e=F5(r,\"string\");return Da(e)==\"symbol\"?e:e+\"\"}o(x5,\"_toPropertyKey\");function F5(r,e){if(Da(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Da(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(F5,\"_toPrimitive\");var a0=function(){function r(){Jd(this,r)}return o(r,\"XHRHttpStack\"),Qd(r,[{key:\"createRequest\",value:o(function(t,i){return new E5(t,i)},\"createRequest\")},{key:\"getName\",value:o(function(){return\"XHRHttpStack\"},\"getName\")}])}();var E5=function(){function r(e,t){Jd(this,r),this._xhr=new XMLHttpRequest,this._xhr.open(e,t,!0),this._method=e,this._url=t,this._headers={}}return o(r,\"Request\"),Qd(r,[{key:\"getMethod\",value:o(function(){return this._method},\"getMethod\")},{key:\"getURL\",value:o(function(){return this._url},\"getURL\")},{key:\"setHeader\",value:o(function(t,i){this._xhr.setRequestHeader(t,i),this._headers[t]=i},\"setHeader\")},{key:\"getHeader\",value:o(function(t){return this._headers[t]},\"getHeader\")},{key:\"setProgressHandler\",value:o(function(t){\"upload\"in this._xhr&&(this._xhr.upload.onprogress=function(i){i.lengthComputable&&t(i.loaded)})},\"setProgressHandler\")},{key:\"send\",value:o(function(){var t=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(s,n){t._xhr.onload=function(){s(new C5(t._xhr))},t._xhr.onerror=function(a){n(a)},t._xhr.send(i)})},\"send\")},{key:\"abort\",value:o(function(){return this._xhr.abort(),Promise.resolve()},\"abort\")},{key:\"getUnderlyingObject\",value:o(function(){return this._xhr},\"getUnderlyingObject\")}])}(),C5=function(){function r(e){Jd(this,r),this._xhr=e}return o(r,\"Response\"),Qd(r,[{key:\"getStatus\",value:o(function(){return this._xhr.status},\"getStatus\")},{key:\"getHeader\",value:o(function(t){return this._xhr.getResponseHeader(t)},\"getHeader\")},{key:\"getBody\",value:o(function(){return this._xhr.responseText},\"getBody\")},{key:\"getUnderlyingObject\",value:o(function(){return this._xhr},\"getUnderlyingObject\")}])}();function Ia(r){\"@babel/helpers - typeof\";return Ia=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Ia(r)}o(Ia,\"_typeof\");function T5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(T5,\"_classCallCheck\");function l0(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,A5(i.key),i)}}o(l0,\"_defineProperties\");function O5(r,e,t){return e&&l0(r.prototype,e),t&&l0(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(O5,\"_createClass\");function A5(r){var e=R5(r,\"string\");return Ia(e)==\"symbol\"?e:e+\"\"}o(A5,\"_toPropertyKey\");function R5(r,e){if(Ia(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Ia(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(R5,\"_toPrimitive\");var ep=!1;try{ep=\"localStorage\"in window,xu=\"tusSupport\",Zd=localStorage.getItem(xu),localStorage.setItem(xu,Zd),Zd===null&&localStorage.removeItem(xu)}catch(r){if(r.code===r.SECURITY_ERR||r.code===r.QUOTA_EXCEEDED_ERR)ep=!1;else throw r}var xu,Zd,u0=ep,c0=function(){function r(){T5(this,r)}return o(r,\"WebStorageUrlStorage\"),O5(r,[{key:\"findAllUploads\",value:o(function(){var t=this._findEntries(\"tus::\");return Promise.resolve(t)},\"findAllUploads\")},{key:\"findUploadsByFingerprint\",value:o(function(t){var i=this._findEntries(\"tus::\".concat(t,\"::\"));return Promise.resolve(i)},\"findUploadsByFingerprint\")},{key:\"removeUpload\",value:o(function(t){return localStorage.removeItem(t),Promise.resolve()},\"removeUpload\")},{key:\"addUpload\",value:o(function(t,i){var s=Math.round(Math.random()*1e12),n=\"tus::\".concat(t,\"::\").concat(s);return localStorage.setItem(n,JSON.stringify(i)),Promise.resolve(n)},\"addUpload\")},{key:\"_findEntries\",value:o(function(t){for(var i=[],s=0;s<localStorage.length;s++){var n=localStorage.key(s);if(n.indexOf(t)===0)try{var a=JSON.parse(localStorage.getItem(n));a.urlStorageKey=n,i.push(a)}catch{}}return i},\"_findEntries\")}])}();function Bo(r){\"@babel/helpers - typeof\";return Bo=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(e){return typeof e}:function(e){return e&&typeof Symbol==\"function\"&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},Bo(r)}o(Bo,\"_typeof\");function k5(r,e){if(!(r instanceof e))throw new TypeError(\"Cannot call a class as a function\")}o(k5,\"_classCallCheck\");function h0(r,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,\"value\"in i&&(i.writable=!0),Object.defineProperty(r,f0(i.key),i)}}o(h0,\"_defineProperties\");function U5(r,e,t){return e&&h0(r.prototype,e),t&&h0(r,t),Object.defineProperty(r,\"prototype\",{writable:!1}),r}o(U5,\"_createClass\");function D5(r,e,t){return e=Fu(e),I5(r,p0()?Reflect.construct(e,t||[],Fu(r).constructor):e.apply(r,t))}o(D5,\"_callSuper\");function I5(r,e){if(e&&(Bo(e)===\"object\"||typeof e==\"function\"))return e;if(e!==void 0)throw new TypeError(\"Derived constructors may only return object or undefined\");return N5(r)}o(I5,\"_possibleConstructorReturn\");function N5(r){if(r===void 0)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return r}o(N5,\"_assertThisInitialized\");function p0(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p0=o(function(){return!!r},\"_isNativeReflectConstruct\"))()}o(p0,\"_isNativeReflectConstruct\");function Fu(r){return Fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():o(function(t){return t.__proto__||Object.getPrototypeOf(t)},\"_getPrototypeOf\"),Fu(r)}o(Fu,\"_getPrototypeOf\");function L5(r,e){if(typeof e!=\"function\"&&e!==null)throw new TypeError(\"Super expression must either be null or a function\");r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,\"prototype\",{writable:!1}),e&&tp(r,e)}o(L5,\"_inherits\");
2function tp(r,e){return tp=Object.setPrototypeOf?Object.setPrototypeOf.bind():o(function(i,s){return i.__proto__=s,i},\"_setPrototypeOf\"),tp(r,e)}o(tp,\"_setPrototypeOf\");function d0(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(r,s).enumerable})),t.push.apply(t,i)}return t}o(d0,\"ownKeys\");function Mo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?d0(Object(t),!0).forEach(function(i){M5(r,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):d0(Object(t)).forEach(function(i){Object.defineProperty(r,i,Object.getOwnPropertyDescriptor(t,i))})}return r}o(Mo,\"_objectSpread\");function M5(r,e,t){return e=f0(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}o(M5,\"_defineProperty\");function f0(r){var e=B5(r,\"string\");return Bo(e)==\"symbol\"?e:e+\"\"}o(f0,\"_toPropertyKey\");function B5(r,e){if(Bo(r)!=\"object\"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var i=t.call(r,e||\"default\");if(Bo(i)!=\"object\")return i;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(e===\"string\"?String:Number)(r)}o(B5,\"_toPrimitive\");var Eu=Mo(Mo({},Pu.defaultOptions),{},{httpStack:new a0,fileReader:new o0,urlStorage:u0?new c0:new sv,fingerprint:Yd}),m0=function(r){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return k5(this,e),i=Mo(Mo({},Eu),i),D5(this,e,[t,i])}return o(e,\"Upload\"),L5(e,r),U5(e,null,[{key:\"terminate\",value:o(function(i){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return s=Mo(Mo({},Eu),s),Pu.terminate(i,s)},\"terminate\")}])}(Pu),bN=typeof XMLHttpRequest==\"function\"&&typeof Blob==\"function\"&&typeof Blob.prototype.slice==\"function\";function z5(r){return r?r.readyState!==0&&r.readyState!==4||r.status===0:!1}o(z5,\"isNetworkError\");var Cu=z5;function j5(){return typeof window<\"u\"&&(typeof window.PhoneGap<\"u\"||typeof window.Cordova<\"u\"||typeof window.cordova<\"u\")}o(j5,\"isCordova\");function H5(){return typeof navigator<\"u\"&&typeof navigator.product==\"string\"&&navigator.product.toLowerCase()===\"reactnative\"}o(H5,\"isReactNative\");function rp(r){return(e,t)=>{if(j5()||H5())return Eu.fingerprint(e,t);let i=[\"tus\",r.id,t.endpoint].join(\"-\");return Promise.resolve(i)}}o(rp,\"getFingerprint\");function Ys(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Ys,\"_classPrivateFieldLooseBase\");var q5=0;function Ma(r){return\"__private_\"+q5+++\"_\"+r}o(Ma,\"_classPrivateFieldLooseKey\");var $5={version:\"4.1.2\"},y0={endpoint:\"\",uploadUrl:null,metadata:{},uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,overridePatchMethod:!1,headers:{},addRequestId:!1,chunkSize:1/0,retryDelays:[100,1e3,3e3,5e3],parallelUploads:1,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1},V5={limit:20,retryDelays:y0.retryDelays,withCredentials:!1,allowedMetaFields:!0},La=Ma(\"retryDelayIterator\"),sp=Ma(\"uploadLocalFile\"),op=Ma(\"getCompanionClientArgs\"),ip=Ma(\"uploadFiles\"),Na=Ma(\"handleUpload\"),Ai=class extends Ce{static{o(this,\"Tus\")}constructor(e,t){var i,s;if(super(e,{...V5,...t}),Object.defineProperty(this,ip,{value:K5}),Object.defineProperty(this,op,{value:G5}),Object.defineProperty(this,sp,{value:W5}),Object.defineProperty(this,La,{writable:!0,value:void 0}),Object.defineProperty(this,Na,{writable:!0,value:o(async n=>{if(n.length===0){this.uppy.log(\"[Tus] No files to upload\");return}this.opts.limit===0&&this.uppy.log(\"[Tus] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/tus/#limit-0\",\"warning\"),this.uppy.log(\"[Tus] Uploading...\");let a=this.uppy.getFilesByIds(n);await Ys(this,ip)[ip](a)},\"value\")}),this.type=\"uploader\",this.id=this.opts.id||\"Tus\",t?.allowedMetaFields===void 0&&\"metaFields\"in this.opts)throw new Error(\"The `metaFields` option has been renamed to `allowedMetaFields`.\");if(\"autoRetry\"in t)throw new Error(\"The `autoRetry` option was deprecated and has been removed.\");this.requests=(i=this.opts.rateLimitedQueue)!=null?i:new br(this.opts.limit),Ys(this,La)[La]=(s=this.opts.retryDelays)==null?void 0:s.values(),this.uploaders=Object.create(null),this.uploaderEvents=Object.create(null)}resetUploaderReferences(e,t){let i=this.uploaders[e];i&&(i.abort(),t!=null&&t.abort&&i.abort(!0),this.uploaders[e]=null),this.uploaderEvents[e]&&(this.uploaderEvents[e].remove(),this.uploaderEvents[e]=null)}onReceiveUploadUrl(e,t){let i=this.uppy.getFile(e.id);i&&(!i.tus||i.tus.uploadUrl!==t)&&(this.uppy.log(\"[Tus] Storing upload url\"),this.uppy.setFileState(i.id,{tus:{...i.tus,uploadUrl:t}}))}
2install(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!0}}),this.uppy.addUploader(Ys(this,Na)[Na])}uninstall(){this.uppy.setState({capabilities:{...this.uppy.getState().capabilities,resumableUploads:!1}}),this.uppy.removeUploader(Ys(this,Na)[Na])}};function W5(r){return this.resetUploaderReferences(r.id),new Promise((e,t)=>{let i,s,n,a={...this.opts,...r.tus||{}};typeof a.headers==\"function\"&&(a.headers=a.headers(r));let{onShouldRetry:l,onBeforeRequest:u,...h}=a,d={...y0,...h};d.fingerprint=rp(r),d.onBeforeRequest=async C=>{let O=C.getUnderlyingObject();O.withCredentials=!!a.withCredentials;let z;if(typeof u==\"function\"&&(z=u(C,r)),Qt(i,\"shouldBeRequeued\")){if(!i.shouldBeRequeued)return Promise.reject();let X,K=new Promise(Z=>{X=Z});i=this.requests.run(()=>(r.isPaused&&i.abort(),X(),()=>{})),await Promise.all([K,z]);return}return z},d.onError=C=>{var O;this.uppy.log(C);let z=C.originalRequest!=null?C.originalRequest.getUnderlyingObject():null;Cu(z)&&(C=new fr(C,z)),this.resetUploaderReferences(r.id),(O=i)==null||O.abort(),typeof a.onError==\"function\"&&a.onError(C),t(C)},d.onProgress=(C,O)=>{var z;this.onReceiveUploadUrl(r,n.url),typeof a.onProgress==\"function\"&&a.onProgress(C,O);let X=this.uppy.getFile(r.id);
2this.uppy.emit(\"upload-progress\",X,{uploadStarted:(z=X.progress.uploadStarted)!=null?z:0,bytesUploaded:C,bytesTotal:O})},d.onSuccess=C=>{var O;let z={uploadURL:(O=n.url)!=null?O:void 0,status:200,body:{xhr:C.lastResponse.getUnderlyingObject()}};if(this.resetUploaderReferences(r.id),i.done(),this.uppy.emit(\"upload-success\",this.uppy.getFile(r.id),z),n.url){let{name:X}=n.file;this.uppy.log(`Download ${X} from ${n.url}`)}typeof a.onSuccess==\"function\"&&a.onSuccess(C),e(n)};let m=o(C=>{var O;let z=C==null||(O=C.originalResponse)==null?void 0:O.getStatus();if(z===429){if(!this.requests.isPaused){var X;let K=(X=Ys(this,La)[La])==null?void 0:X.next();if(K==null||K.done)return!1;this.requests.rateLimit(K.value)}}else{if(z!=null&&z>=400&&z<500&&z!==409&&z!==423)return!1;typeof navigator<\"u\"&&navigator.onLine===!1&&(this.requests.isPaused||(this.requests.pause(),window.addEventListener(\"online\",()=>{this.requests.resume()},{once:!0})))}return i.abort(),i={shouldBeRequeued:!0,abort(){this.shouldBeRequeued=!1},done(){throw new Error(\"Cannot mark a queued request as done: this indicates a bug\")},fn(){throw new Error(\"Cannot run a queued request: this indicates a bug\")}},!0},\"defaultOnShouldRetry\");l!=null?d.onShouldRetry=(C,O)=>l(C,O,a,m):d.onShouldRetry=m;let w=o((C,O,z)=>{Qt(C,O)&&!Qt(C,z)&&(C[z]=C[O])},\"copyProp\"),y={};
2Ci(a.allowedMetaFields,r.meta).forEach(C=>{y[C]=String(r.meta[C])}),w(y,\"type\",\"filetype\"),w(y,\"name\",\"filename\"),d.metadata=y,n=new m0(r.data,d),this.uploaders[r.id]=n;let D=new xi(this.uppy);this.uploaderEvents[r.id]=D,s=o(()=>(r.isPaused||n.start(),()=>{}),\"qRequest\"),n.findPreviousUploads().then(C=>{let O=C[0];O&&(this.uppy.log(`[Tus] Resuming upload of ${r.id} started at ${O.creationTime}`),n.resumeFromPreviousUpload(O))}),i=this.requests.run(s),D.onFileRemove(r.id,C=>{i.abort(),this.resetUploaderReferences(r.id,{abort:!!n.url}),e(`upload ${C} was removed`)}),D.onPause(r.id,C=>{i.abort(),C?n.abort():i=this.requests.run(s)}),D.onPauseAll(r.id,()=>{i.abort(),n.abort()}),D.onCancelAll(r.id,()=>{i.abort(),this.resetUploaderReferences(r.id,{abort:!!n.url}),e(`upload ${r.id} was canceled`)}),D.onResumeAll(r.id,()=>{i.abort(),r.error&&n.abort(),i=this.requests.run(s)})}).catch(e=>{throw this.uppy.emit(\"upload-error\",r,e),e})}o(W5,\"_uploadLocalFile2\");function G5(r){var e;let t={...this.opts};return r.tus&&Object.assign(t,r.tus),typeof t.headers==\"function\"&&(t.headers=t.headers(r)),{...(e=r.remote)==null?void 0:e.body,endpoint:t.endpoint,uploadUrl:t.uploadUrl,protocol:\"tus\",size:r.data.size,headers:t.headers,metadata:r.meta}}o(G5,\"_getCompanionClientArgs2\");async function K5(r){let e=To(r),t=Oo(e);this.uppy.emit(\"upload-start\",t),await Promise.allSettled(e.map(i=>{if(i.isRemote){let s=o(()=>this.requests,\"getQueue\"),n=new AbortController,a=o(u=>{u.id===i.id&&n.abort()},\"removedHandler\");this.uppy.on(\"file-removed\",a);
2let l=this.uppy.getRequestClientForFile(i).uploadRemoteFile(i,Ys(this,op)[op](i),{signal:n.signal,getQueue:s});return this.requests.wrapSyncFunction(()=>{this.uppy.off(\"file-removed\",a)},{priority:-1})(),l}return Ys(this,sp)[sp](i)}))}o(K5,\"_uploadFiles2\");Ai.VERSION=$5.version;var b0=ve(ap(),1);function we(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(we,\"_classPrivateFieldLooseBase\");var Y5=0;function qr(r){return\"__private_\"+Y5+++\"_\"+r}o(qr,\"_classPrivateFieldLooseKey\");var J5=\"ASSEMBLY_UPLOADING\",hp=\"ASSEMBLY_EXECUTING\",dp=\"ASSEMBLY_COMPLETED\",v0=[J5,hp,dp];function Tu(r,e){return v0.indexOf(r)>=v0.indexOf(e)}o(Tu,\"isStatus\");var Qs=qr(\"rateLimitedQueue\"),Ba=qr(\"fetchWithNetworkError\"),Js=qr(\"previousFetchStatusStillPending\"),Ye=qr(\"sse\"),pp=qr(\"onFinished\"),lp=qr(\"connectServerSentEvents\"),Tr=qr(\"onError\"),up=qr(\"beginPolling\"),Ri=qr(\"fetchStatus\"),cp=qr(\"diffStatus\"),fp=class extends b0.default{static{o(this,\"TransloaditAssembly\")}constructor(e,t){super(),Object.defineProperty(this,cp,{value:ix}),Object.defineProperty(this,Ri,{value:rx}),Object.defineProperty(this,up,{value:tx}),Object.defineProperty(this,Tr,{value:ex}),Object.defineProperty(this,lp,{value:Z5}),Object.defineProperty(this,pp,{value:Q5}),Object.defineProperty(this,Qs,{writable:!0,value:void 0}),Object.defineProperty(this,Ba,{writable:!0,value:void 0}),Object.defineProperty(this,Js,{writable:!0,value:!1}),Object.defineProperty(this,Ye,{writable:!0,value:null}),this.status=e,this.pollInterval=null,this.closed=!1,we(this,Qs)[Qs]=t,we(this,Ba)[Ba]=t.wrapPromiseFunction(as)}connect(){we(this,lp)[lp](),we(this,up)[up]()}update(){return we(this,Ri)[Ri]({diff:!0})}updateStatus(e){we(this,cp)[cp](this.status,e),this.status=e}close(){this.closed=!0,we(this,Ye)[Ye]&&(we(this,Ye)[Ye].close(),we(this,Ye)[Ye]=null),clearInterval(this.pollInterval),this.pollInterval=null}};function Q5(){this.emit(\"finished\"),this.close()}o(Q5,\"_onFinished2\");function Z5(){we(this,Ye)[Ye]=new EventSource(`${this.status.websocket_url}?assembly=${this.status.assembly_id}`),we(this,Ye)[Ye].addEventListener(\"open\",()=>{clearInterval(this.pollInterval),this.pollInterval=null}),we(this,Ye)[Ye].addEventListener(\"message\",r=>{r.data===\"assembly_finished\"&&we(this,pp)[pp](),r.data===\"assembly_uploading_finished\"&&this.emit(\"executing\"),r.data===\"assembly_upload_meta_data_extracted\"&&(this.emit
2(\"metadata\"),we(this,Ri)[Ri]({diff:!1}))}),we(this,Ye)[Ye].addEventListener(\"assembly_upload_finished\",r=>{let e=JSON.parse(r.data);this.status.uploads.push(e),this.emit(\"upload\",e)}),we(this,Ye)[Ye].addEventListener(\"assembly_result_finished\",r=>{var e,t;let[i,s]=JSON.parse(r.data);((t=(e=this.status.results)[i])!=null?t:e[i]=[]).push(s),this.emit(\"result\",i,s)}),we(this,Ye)[Ye].addEventListener(\"assembly_execution_progress\",r=>{let e=JSON.parse(r.data);this.emit(\"execution-progress\",e)}),we(this,Ye)[Ye].addEventListener(\"assembly_error\",r=>{try{we(this,Tr)[Tr](JSON.parse(r.data))}catch{we(this,Tr)[Tr](new Error(r.data))}we(this,Ri)[Ri]({diff:!1})})}o(Z5,\"_connectServerSentEvents2\");function ex(r){this.emit(\"error\",Object.assign(new Error(r.message),r)),this.close()}o(ex,\"_onError2\");function tx(){this.pollInterval=setInterval(()=>{we(this,Ri)[Ri]()},2e3)}o(tx,\"_beginPolling2\");async function rx(r){let{diff:e=!0}=r===void 0?{}:r;if(!(this.closed||we(this,Qs)[Qs].isPaused||we(this,Js)[Js]))try{we(this,Js)[Js]=!0;let t=await we(this,Ba)[Ba](this.status.assembly_ssl_url);if(we(this,Js)[Js]=!1,this.closed)return;if(t.status===429){we(this,Qs)[Qs].rateLimit(2e3);return}if(!t.ok){we(this,Tr)[Tr](new fr(t.statusText));return}let i=await t.json();if(this.closed)return;this.emit(\"status\",i),e?this.updateStatus(i):this.status=i}catch(t){we(this,Tr)[Tr](t)}}o(rx,\"_fetchStatus2\");function ix(r,e){let t=r.ok,i=e.ok;if(e.error&&!r.error)return we(this,Tr)[Tr](e);let s=Tu(i,hp)&&!Tu(t,hp);s&&this.emit(\"executing\"),Object.keys(e.uploads).filter(n=>!Qt(r.uploads,n)).forEach(n=>{this.emit(\"upload\",e.uploads[n])}),s&&this.emit(\"metadata\"),Object.keys(e.results).forEach(n=>{let a=e.results[n],l=r.results[n];a.filter(u=>!l||!l.some(h=>h.id===u.id)).forEach(u=>{this.emit(\"result\",n,u)})}),Tu(i,dp)&&!Tu(t,dp)&&this.emit(\"finished\")}o(ix,\"_diffStatus2\");var mp=fp;function tt(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(tt,\"_classPrivateFieldLooseBase\");var sx=0;function Ou(r){return\"__private_\"+sx+++\"_\"+r}o(Ou,\"_classPrivateFieldLooseKey\");var w0=\"/assemblies\",gp=class extends Error{static{o(this,\"AssemblyError\")}constructor(e,t,i){super(e),this.details=t,this.assembly=i}},nr=Ou(\"headers\"),Zs=Ou(\"fetchWithNetworkError\"),ar=Ou(\"fetchJSON\"),Or=Ou(\"reportError\"),za=class{static{o(this,\"Client\")}constructor(e){Object.defineProperty(this,ar,{value:ox}),Object.defineProperty(this,nr,{writable:!0,value:{}}),Object.defineProperty(this,Zs,{writable:!0,value:void 0}),Object.defineProperty(this,Or,{writable:!0,value:o((t,i)=>{if(this.opts.errorReporting===!1)throw t;let s={type:i.type};throw i.assembly&&(s.assembly=i.assembly.assembly_id,s.instance=i.assembly.instance),i.url&&(s.endpoint=i.url),this.submitError(t,s).catch(()=>{}),t},\"value\")}),this.opts=e,this.opts.client!=null&&(tt(this,nr)[nr][\"Transloadit-Client\"]=this.opts.client),tt(this,Zs)[Zs]=this.opts.rateLimitedQueue.wrapPromiseFunction(as)}async createAssembly(e){let{params:t,fields:i,signature:s,expectedFiles:n}=e,a=new FormData;a.append(\"params\",typeof t==\"string\"?t:JSON.stringify(t)),s&&a.append(\"signature\",s),Object.keys(i).forEac
2h(u=>{a.append(u,String(i[u]))}),a.append(\"num_expected_upload_files\",String(n));let l=new URL(w0,`${this.opts.service}`).href;return tt(this,ar)[ar](l,{method:\"POST\",headers:tt(this,nr)[nr],body:a}).catch(u=>tt(this,Or)[Or](u,{url:l,type:\"API_ERROR\"}))}async reserveFile(e,t){let i=encodeURIComponent(t.size),s=`${e.assembly_ssl_url}/reserve_file?size=${i}`;return tt(this,ar)[ar](s,{method:\"POST\",headers:tt(this,nr)[nr]}).catch(n=>tt(this,Or)[Or](n,{assembly:e,file:t,url:s,type:\"API_ERROR\"}))}async addFile(e,t){var i;if(!t.uploadURL)return Promise.reject(new Error(\"File does not have an `uploadURL`.\"));let s=encodeURIComponent(t.size),n=encodeURIComponent(t.uploadURL),a=encodeURIComponent((i=t.name)!=null?i:\"Unnamed\"),u=`size=${s}&filename=${a}&fieldname=file&s3Url=${n}`,h=`${e.assembly_ssl_url}/add_file?${u}`;return tt(this,ar)[ar](h,{method:\"POST\",headers:tt(this,nr)[nr]}).catch(d=>tt(this,Or)[Or](d,{assembly:e,file:t,url:h,type:\"API_ERROR\"}))}async cancelAssembly(e){let t=e.assembly_ssl_url;await tt(this,Zs)[Zs](t,{method:\"DELETE\",headers:tt(this,nr)[nr]}).catch(i=>tt(this,Or)[Or](i,{url:t,type:\"API_ERROR\"}))}async getAssemblyStatus(e){return tt(this,ar)[ar](e,{headers:tt(this,nr)[nr]}).catch(t=>tt(this,Or)[Or](t,{url:e,type:\"STATUS_ERROR\"}))}async submitError(e,t){let{endpoint:i,instance:s,assembly:n}=t===void 0?{}:t,a=e.details?`${e.message} (${e.details})`:e.message;return tt(this,ar)[ar](\"https://transloaditstatus.com/client_error\",{method:\"POST\",body:JSON.stringify({endpoint:i,instance:s,assembly_id:n,agent:typeof navigator<\"u\"?navigator.userAgent:\"\",client:this.opts.client,error:a})})}};async function ox(){let r=await tt(this,Zs)[Zs](...arguments);if(r.status===429)return this.opts.rateLimitedQueue.rateLimit(2e3),tt(this,ar)[ar](...arguments);if(!r.ok){let e=new Error(r.statusText);return e.statusCode=r.status,`${arguments.length<=0?void 0:arguments[0]}`.endsWith(w0)?r.json().then(t=>{if(!t.error)throw e;let i=new gp(t.error,t.message,t);throw t.assembly_id&&(i.details+=` Assembly ID: ${t.assembly_id}`),i},t=>{throw t.cause=e,t}):Promise.reject(e)}return r.json()}o(ox,\"_fetchJSON2\");var S0=ve(ap(),1);function pe(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(pe,\"_classPrivateFieldLooseBase\");var nx=0;function lr(r){return\"__private_\"+nx+++\"_\"+r}o(lr,\"_classPrivateFieldLooseKey\");var ja=lr(\"assemblyIDs\"),to=lr(\"remaining\"),Ha=lr(\"resolve\"),yp=lr(\"reject\"),Oe=lr(\"uppy\"),ki=lr(\"watching\"),qa=lr(\"onAssemblyComplete\"),$a=lr(\"onAssemblyCancel\"),ro=lr(\"onAssemblyError\"),Va=lr(\"onImportError\"),eo=lr(\"checkAllComplete\"),bp=lr(\"removeListeners\"),vp=lr(\"addListeners\"),wp=class extends S0.default{static{o(this,\"TransloaditAssemblyWatcher\")}constructor(e,t){super(),Object.defineProperty(this,vp,{value:cx}),Object.defineProperty(this,bp,{value:ux}),Object.defineProperty(this,eo,{value:lx}),Object.defineProperty(this,ki,{value:ax}),Object.defineProperty(this,ja,{writable:!0,value:void 0}),Object.defineProperty(this,to,{writable:!0,value:void 0}),Object.defineProperty(this,Ha,{writable:!0,value:void 0}),Object.defineProperty(this,yp,{writable:!0,value:void 0}),Object.defineProperty(this,Oe,{writable:!0,value:void 0}),Object.defineProperty(this,qa,{writable:!0,value:o(i=>{pe(this,ki)[ki](i.assembly_id)&&(pe(this,Oe)[Oe].log(`[Transloadit] AssemblyWatcher: Got Assembly finish ${i.assembly_id}`),this.emit(\"assembly-complete\",i.assembly_id),pe(this,eo)[eo]())},\"value\")}),Object.defineProperty(this,$a,{writable:!0,value:o(i=>{pe(this,ki)[ki](i.assembly_id)&&pe(this,eo)[eo]()},\"value\")}),Object.defineProperty(this,ro,{writable:!0,value:o((i,s)=>{pe(this,ki)[ki](i.assembly_id)&&(pe(this,Oe)[Oe].log(`[Transloadit] AssemblyWatcher: Got Assembly error ${i.assembly_id}`),pe(this,Oe)[Oe].log(s),this.emit(\"assembly-error\",i.assembly_id,s),pe(this,eo)[eo]())},\"value\")}),Object.defineProperty(this,Va,{writable:!0,value:o((i,s,n)=>{pe(this,ki)[ki](i.assembly_id)&&pe(this,ro)[ro](i,n)},\"value\")}),pe(this,Oe)[Oe]=e,pe(this,ja)[ja]=t,pe(this,to)[to]=t.length,this.promise=new Promise((i,s)=>{pe(this,Ha)[Ha]=i,pe(this,yp)[yp]=s}),pe(this,vp)[vp]()}};function ax(r){return pe(this,ja)[ja].indexOf(r)!==-1}o(ax,\"_watching2\");function lx(){pe(this,to)[to]-=1,pe(this,to)[to]===0&&(pe(this,bp)[bp](),pe(this,Ha)[Ha]())}o(lx,\"_checkAllComplete2\");function ux(){pe(this,Oe)[Oe].off(\"transloadit:complete\",pe(this,qa)[qa]),pe(this,Oe)[Oe].off(\"transloadit:assembly-cancel\",pe(this,$a)[$a]),pe(this,Oe)[Oe].off(\"transloadit:assembly-error\",pe(this,ro)[ro]),pe(this,Oe)[Oe].off(\"transloadit:import-error\",pe(this,Va)[Va])}o(ux,\"_removeListeners2\");function cx(){pe(this,Oe)[Oe].on(\"transloadit:complete\",pe(this,qa)[qa]),pe(this,Oe)[Oe].on(\"transloadit:assembly-cancel\",pe(this,$a)[$a]),pe(this,Oe)[Oe].on(\"transloadit:assembly-error\",pe(this,ro)[ro]),pe(this,Oe)[Oe].on(\"transloadit:import-error\",pe(this,Va)[Va])}o(cx,\"_addListeners2\");var P0=wp;var _0={strings:{creatingAssembly:\"Preparing upload...\",creatingAssemblyFailed:\"Transloadit: Could not create Assembly\",encoding:\"Encoding...\"}};function fe(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(fe,\"_classPrivateFieldLooseBase\");var hx=0;function ze(r){return\"__private_\"+hx+++\"_\"+r}o(ze,\"_classPrivateFieldLooseKey\");var dx={version:\"4.1.2\"},px={service:\"https://api2.transloadit.com\",errorReporting:!0,waitForEncoding:!1,waitForMetadata:!1,alwaysRunAssembly:!1,importFromUploadURLs:!1,limit:20,retryDelays:[7e3,1e4,15e3,2e4],clientName:null},x0=o(r=>e=>{let t=new fo(\"Failed to send error to the client\",{cause:e});console.error(t,r)},\"sendErrorToConsole\");function fx(r){if(r==null)throw new Error(\"Transloadit: The `params` option is required.\");if(typeof r==\"string\")try{r=JSON.parse(r)}catch(e){throw new fo(\"Transloadit: The `params` option is a malformed JSON string.\",{cause:e})}if(!r.auth||!r.auth.key)throw new Error(\"Transloadit: The `params.auth.key` option is required. You can find your Transloadit API key at https://transloadit.com/c/template-credentials\")}o(fx,\"validateParams\");var F0=\"https://api2.transloadit.com/companion\",E0=/\\.transloadit\\.com$/,mx=/https?:\\/\\/api2(?:-\\w+)?\\.transloadit\\.com\\/companion/,Ar=ze(\"rateLimitedQueue\"),el=ze(\"watcher\"),Sp=ze(\"getClientVersion\"),Ap=ze(\"attachAssemblyMetadata\"),Pp=ze(\"createAssembly\"),Wa=ze(\"createAssemblyWatcher\"),_p=ze(\"shouldWaitAfterUpload\"),xp=ze(\"reserveFiles\"),Ga=ze(\"onFileUploadURLAvailable\"),tl=ze(\"findFile\"),Rp=ze(\"onFileUploadComplete\"),kp=ze(\"onResult\"),Za=ze(\"onAssemblyFinished\"),Fp=ze(\"cancelAssembly\"),Ep=ze(\"onCancelAll\"),Cp=ze(\"getPersistentData\"),Tp=ze(\"onRestored\"),Ka=ze(\"connectAssembly\"),Xa=ze(\"prepareUpload\"),Ya=ze(\"afterUpload\"),Ja=ze(\"closeAssemblyIfExists\"),Qa=ze(\"onError\"),Op=ze(\"onTusError\"),Ui=class extends Ce{static{o(this,\"Transloadit\")}constructor(e,t){super(e,{...px,...t}),Object.defineProperty(this,Ka,{value:Cx}),Object.defineProperty(this,Fp,{value:Ex}),Object.defineProperty(this,Za,{value:Fx}),Object.defineProperty(this,kp,{value:xx}),Object.defineProperty(this,Rp,{value:_x}),Object.defineProperty(this,tl,{value:Px}),Object.defineProperty(this,xp,{value:Sx}),Object.defineProperty(this,_p,{value:wx}),Object.defineProperty(this,Wa,{value:bx}),Object.defineProperty(this,Pp,{value:vx}),Object.defineProperty(this,Ap,{value:yx}),Object.defineProperty(this,Sp,{value:gx}),Object.defineProperty(this,Ar,{writable:!0,value:void 0}),Object.defineProperty(this,el,{writable:!0,value:void 0}),this.restored=null,Object.defineProperty(this,Ga,{writable:!0,value:o(i=>{var s;let n=this.uppy.getFile(i.id);if(!(n!=null&&(s=n.transloadit)!=null&&s.assembly))return;let{status:a}=this.assembly;this.client.addFile(a,n).catch(l=>
2{this.uppy.log(l),this.uppy.emit(\"transloadit:import-error\",a,n.id,l)})},\"value\")}),Object.defineProperty(this,Ep,{writable:!0,value:o(async()=>{if(this.assembly)try{await fe(this,Fp)[Fp](this.assembly.status)}catch(i){this.uppy.log(i)}},\"value\")}),Object.defineProperty(this,Cp,{writable:!0,value:o(i=>{this.assembly&&i({[this.id]:{assemblyResponse:this.assembly.status}})},\"value\")}),Object.defineProperty(this,Tp,{writable:!0,value:o(i=>{let n=(i&&i[this.id]?i[this.id]:{}).assemblyResponse;if(!n)return;let a=o(()=>{let h={},d=[],{assembly_id:m}=n;n.uploads.forEach(y=>{let P=fe(this,tl)[tl](y);h[y.id]={id:P.id,assembly:m,uploadedFile:y}});let w=this.getPluginState();return Object.keys(n.results).forEach(y=>{for(let P of n.results[y]){let D=w.files[P.original_id];P.localId=D?D.id:null,d.push({id:P.id,result:P,stepName:y,assembly:m})}}),this.assembly=new mp(n,fe(this,Ar)[Ar]),this.assembly.status=n,this.setPluginState({files:h,results:d}),h},\"restoreState\"),l=o(h=>{fe(this,Wa)[Wa](n.assembly_id),fe(this,Ka)[Ka](this.assembly,h)},\"restoreAssemblies\"),u=o(()=>{var h;return(h=this.assembly)==null?void 0:h.update()},\"updateAssembly\");this.restored=(async()=>{let h=a();l(Object.keys(h)),await u(),this.restored=null})(),this.restored.catch(h=>{this.uppy.log(\"Failed to restore\",h)})},\"value\")}),Object.defineProperty(this,Xa,{writable:!0,value:o(async i=>{var s;let n=typeof this.opts.assemblyOptions==\"function\"?await this.opts.assemblyOptions():this.opts.assemblyOptions;(s=n.fields)!=null||(n.fields={}),fx(n.params);try{var a;let l=(a=this.assembly)!=null?a:await fe(this,Pp)[Pp](i,n);if(l==null)throw new Error(\"All files were canceled after assembly was created\");this.opts.importFromUploadURLs&&await fe(this,xp)[xp](l,i),i.forEach(u=>{let h=this.uppy.getFile(u);this.uppy.emit(\"preprocess-complete\",h)}),fe(this,Wa)[Wa](l.status.assembly_id),fe(this,Ka)[Ka](l,i)}catch(l){throw i.forEach(u=>{let h=this.uppy.getFile(u);this.uppy.emit(\"preprocess-complete\",h),this.uppy.emit(\"upload-error\",h,l)}),l}},\"value\")}),Object.defineProperty(this,Ya,{writable:!0,value:o(async(i,s)=>{try{var n,a;await this.restored;let u=i.map(y=>this.uppy.getFile(y)).filter(y=>!y.error),h=(n=this.assembly)==null?void 0:n.status.assembly_id,d=o(()=>{var y;(y=this.assembly)==null||y.close()},\"closeSocketConnections\");if(!fe(this,_p)[_p]()){var l;d();let y=(l=this.assembly)==null?void 0:l.status;y!=null&&this.uppy.addResultData(s,{transloadit:[y]});return}if(!h){this.uppy.addResultData(s,{transloadit:[]});return}u.filter(y=>!Qt(this.completedFiles,y.id)).forEach(y=>{this.uppy.emit(\"postprocess-progress\",y,{mode:\"indeterminate\",message:this.i18n(\"encoding\")})}),await fe(this,el)[el].promise,d();let w=(a=this.assembly)==null?void 0:a.status;w!=null&&this.uppy.addResultData(s,{transloadit:[w]})}finally{this.assembly=void 0}},\"value\")}),Object.defineProperty(this,Ja,{writable:!0,value:o(()=>{var i;(i=this.assembly)==null||i.close()},\"value\")}),Object.defineProperty(this,Qa,{writable:!0,value:o(i=>{fe(this,Ja)[Ja](),this.assembly=void 0,this.client.submitError(i).catch(x0(i))},\"value\")}),Object.defineProperty(this,Op,{writable:!0,value:o((i,s)=>{var n;if(fe(this,Ja)[Ja](),s!=null&&(n=s.message)!=null&&n.startsWith(\"tus: \")){var a;let l=(a=s.originalRequest)==null||(a=a.getUnderlyingObject())==null?void 0:a.responseURL;this.client.submitError(s,{endpoint:l}).catch(x0(s))}},\"value\")}),this.type=\"uploader\",this.id=this.opts.id||\"Transloadit\",this.defaultLocale=_0,fe(this,Ar)[Ar]=new br(this.opts.limit),this.i18nInit(),this.client=new za({service:this.opts.service,client:fe(this,Sp)[Sp](),errorReporting:this.opts.errorReporting,rateLimitedQueue:fe(this,Ar)[Ar]}),this.completedFiles=Object.create(null)}install(){this.uppy.addPreProcessor(fe(this,Xa)[Xa]),this.uppy.addPostProcessor(fe(this,Ya)[Ya]),this.uppy.on(\"error\",fe(this,Qa)[Qa]),this.uppy.on(\"cancel-all\",fe(this,Ep)[Ep]),this.uppy.on(\"upload-error\",fe(this,Op)[Op]),this.opts.importFromUploadURLs?this.uppy.on(\"upload-success\",fe(this,Ga)[Ga]):this.uppy.use(Ai,{storeFingerprintForResuming:!1,allowedMetaFields:!0,limit:this.opts.limit,rateLimitedQueue:fe(this,Ar)[Ar],retryDelays:this.opts.retryDelays}),this.uppy.on(\"restore:get-data\",fe(this,Cp)[Cp]),this.uppy.on(\"restored\",fe(this,Tp)[Tp]),this.setPluginState({files:{},results:[]});let{capabilities:e}=this.uppy.getState();
2this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}uninstall(){this.uppy.removePreProcessor(fe(this,Xa)[Xa]),this.uppy.removePostProcessor(fe(this,Ya)[Ya]),this.uppy.off(\"error\",fe(this,Qa)[Qa]),this.opts.importFromUploadURLs&&this.uppy.off(\"upload-success\",fe(this,Ga)[Ga]);let{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}getAssembly(){var e;return(e=this.assembly)==null?void 0:e.status}getAssemblyFiles(e){return this.uppy.getFiles().filter(t=>{var i;return(t==null||(i=t.transloadit)==null?void 0:i.assembly)===e})}};function gx(){let r=[`uppy-core:${this.uppy.constructor.VERSION}`,`uppy-transloadit:${this.constructor.VERSION}`,`uppy-tus:${Ai.VERSION}`],e=o((t,i)=>{let s=this.uppy.getPlugin(t);s&&r.push(`${i}:${s.constructor.VERSION}`)},\"addPluginVersion\");return this.opts.importFromUploadURLs&&(e(\"XHRUpload\",\"uppy-xhr-upload\"),e(\"AwsS3\",\"uppy-aws-s3\"),e(\"AwsS3Multipart\",\"uppy-aws-s3-multipart\")),e(\"Dropbox\",\"uppy-dropbox\"),e(\"Box\",\"uppy-box\"),e(\"Facebook\",\"uppy-facebook\"),e(\"GoogleDrive\",\"uppy-google-drive\"),e(\"GooglePhotos\",\"uppy-google-photos\"),e(\"Instagram\",\"uppy-instagram\"),e(\"OneDrive\",\"uppy-onedrive\"),e(\"Zoom\",\"uppy-zoom\"),e(\"Url\",\"uppy-url\"),this.opts.clientName!=null&&r.push(this.opts.clientName),r.join(\",\")}o(gx,\"_getClientVersion2\");function yx(r,e){let t={...r.meta,assembly_url:e.assembly_url,filename:r.name,fieldname:\"file\"},i={...r.tus,endpoint:e.tus_url,addRequestId:!0},{remote:s}=r;if(r.remote&&mx.test(r.remote.companionUrl)){let a=e.companion_url.replace(/\\/$/,\"\"),l=r.remote.url.replace(r.remote.companionUrl,\"\").replace(/^\\//,\"\");s={...r.remote,companionUrl:a,url:`${a}/${l}`}}let n={...r,transloadit:{assembly:e.assembly_id}};return this.opts.importFromUploadURLs||Object.assign(n,{meta:t,tus:i,remote:s}),n}o(yx,\"_attachAssemblyMetadata2\");
2async function vx(r,e){this.uppy.log(\"[Transloadit] Create Assembly\");try{let t=await this.client.createAssembly({...e,expectedFiles:r.length}),i=this.uppy.getFiles().filter(u=>{let{id:h}=u;return r.includes(h)});if(i.length===0&&r.length!==0)return await this.client.cancelAssembly(t),null;let s=new mp(t,fe(this,Ar)[Ar]),{status:n}=s,a=n.assembly_id,l={};return i.forEach(u=>{l[u.id]=fe(this,Ap)[Ap](u,n)}),this.uppy.setState({files:{...this.uppy.getState().files,...l}}),this.uppy.emit(\"transloadit:assembly-created\",n,r),this.uppy.log(`[Transloadit] Created Assembly ${a}`),s}catch(t){let i=new fo(`${this.i18n(\"creatingAssemblyFailed\")}: ${t.message}`,{cause:t});throw\"details\"in t&&(i.details=t.details),\"assembly\"in t&&(i.assembly=t.assembly),i}}o(vx,\"_createAssembly2\");function bx(r){let e=Array.isArray(r)?r:[r],t=new P0(this.uppy,e);t.on(\"assembly-complete\",i=>{this.getAssemblyFiles(i).forEach(n=>{this.completedFiles[n.id]=!0,this.uppy.emit(\"postprocess-complete\",n)})}),t.on(\"assembly-error\",(i,s)=>{let n=this.getAssemblyFiles(i);n.forEach(l=>{this.uppy.emit(\"upload-error\",l,s),this.uppy.emit(\"postprocess-complete\",l)});let a={...this.uppy.getState().files};n.forEach(l=>delete a[l.id].tus),this.uppy.setState({files:a}),this.uppy.emit(\"error\",s)}),fe(this,el)[el]=t}o(bx,\"_createAssemblyWatcher2\");function wx(){return this.opts.waitForEncoding||this.opts.waitForMetadata}o(wx,\"_shouldWaitAfterUpload2\");function Sx(r,e){return Promise.all(e.map(t=>{let i=this.uppy.getFile(t);return this.client.reserveFile(r.status,i)}))}o(Sx,\"_reserveFiles2\");function Px(r){let e=this.uppy.getFiles();for(let t=0;t<e.length;t++){let i=e[t];if(i.uploadURL===r.tus_upload_url||i.tus&&i.tus.uploadUrl===r.tus_upload_url||!r.is_tus_file&&i.name===r.name&&i.size===r.size)return i}}o(Px,\"_findFile2\");function _x(r,e){let t=this.getPluginState(),i=fe(this,tl)[tl](e);if(!i){this.uppy.log(\"[Transloadit] Couldn\\u2019t find the file, it was likely removed in the process\");return}this.setPluginState({files:{...t.files,[e.id]:{assembly:r,id:i.id,uploadedFile:e}}}),this.uppy.emit(\"transloadit:upload\",e,this.getAssembly())}o(_x,\"_onFileUploadComplete2\");function xx(r,e,t){let i=this.getPluginState(),s=i.files[t.original_id];t.localId=s?s.id:null;let n={result:t,stepName:e,id:t.id,assembly:r};this.setPluginState({results:[...i.results,n]}),this.uppy.emit(\"transloadit:result\",e,t,this.getAssembly())}o(xx,\"_onResult2\");function Fx(r){let e=r.status.assembly_ssl_url;this.client.getAssemblyStatus(e).then(t=>{r.status=t,this.uppy.emit(\"transloadit:complete\",t)})}o(Fx,\"_onAssemblyFinished2\");async function Ex(r){await this.client.cancelAssembly(r),this.uppy.emit(\"transloadit:assembly-cancelled\",r),this.assembly=void 0}o(Ex,\"_cancelAssembly2\");function Cx(r,e){let{status:t}=r,i=t.assembly_id;return this.assembly=r,r.on(\"upload\",s=>{fe(this,Rp)[Rp](i,s)}),r.on(\"error\",s=>{s.assembly=r.status,this.uppy.emit(\"transloadit:assembly-error\",r.status,s)}),r.on(\"executing\",()=>{this.uppy.emit(\"transloadit:assembly-executing\",r.status)}),r.on(\"execution-progress\",s=>{if(this.uppy.emit(\"transloadit:execution-progress\",s),s.progress_combined!=null)for(let n of this.uppy.getFilesByIds(e))this.uppy.emit(\"postprocess-progress\",n,{mode:\"determinate\",value:s.progress_combined/100,message:this.i18n(\"encoding\")})}),this.opts.waitForEncoding&&r.on(\"result\",(s,n)=>{fe(this,kp)[kp](i,s,n)}),this.opts.waitForEncoding?r.on(\"finished\",()=>{fe(this,Za)[Za](r)}):this.opts.waitForMetadata&&r.on(\"metadata\",()=>{fe(this,Za)[Za](r)}),r.ok===\"ASSEMBLY_COMPLETE\"||r.connect(),r}o(Cx,\"_connectAssembly2\");
2Ui.VERSION=dx.version;function wr(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(wr,\"_classPrivateFieldLooseBase\");var Tx=0;function Au(r){return\"__private_\"+Tx+++\"_\"+r}o(Au,\"_classPrivateFieldLooseKey\");var Di=Au(\"aliveTimer\"),io=Au(\"isDone\"),rl=Au(\"onTimedOut\"),so=Au(\"timeout\"),Up=class{static{o(this,\"ProgressTimeout\")}constructor(e,t){Object.defineProperty(this,Di,{writable:!0,value:void 0}),Object.defineProperty(this,io,{writable:!0,value:!1}),Object.defineProperty(this,rl,{writable:!0,value:void 0}),Object.defineProperty(this,so,{writable:!0,value:void 0}),wr(this,so)[so]=e,wr(this,rl)[rl]=()=>t(e)}progress(){wr(this,io)[io]||wr(this,so)[so]>0&&(clearTimeout(wr(this,Di)[Di]),wr(this,Di)[Di]=setTimeout(wr(this,rl)[rl],wr(this,so)[so]))}done(){wr(this,io)[io]||(clearTimeout(wr(this,Di)[Di]),wr(this,Di)[Di]=void 0,wr(this,io)[io]=!0)}},C0=Up;var Ru=o(()=>{},\"noop\");function T0(r,e){e===void 0&&(e={});let{body:t=null,headers:i={},method:s=\"GET\",onBeforeRequest:n=Ru,onUploadProgress:a=Ru,shouldRetry:l=o(()=>!0,\"shouldRetry\"),onAfterResponse:u=Ru,onTimeout:h=Ru,responseType:d,retries:m=3,signal:w=null,timeout:y=3e4,withCredentials:P=!1}=e,D=o(z=>.3*2**(z-1)*1e3,\"delay\"),C=new C0(y,h);function O(z){return z===void 0&&(z=0),new Promise(async(X,K)=>{let Z=new XMLHttpRequest;Z.open(s,r,!0),Z.withCredentials=P,d&&(Z.responseType=d),w?.addEventListener(\"abort\",()=>{Z.abort(),K(new DOMException(\"Aborted\",\"AbortError\"))}),Z.onload=async()=>{await u(Z,z),Z.status>=200&&Z.status<300?(C.done(),X(Z)):l(Z)&&z<m?setTimeout(()=>{O(z+1).then(X,K)},D(z)):(C.done(),K(new fr(Z.statusText,Z)))},Z.onerror=()=>{l(Z)&&z<m?setTimeout(()=>{O(z+1).then(X,K)},D(z)):(C.done(),K(new fr(Z.statusText,Z)))},Z.upload.onprogress=$=>{C.progress(),a($)}
2,i&&Object.keys(i).forEach($=>{Z.setRequestHeader($,i[$])}),await n(Z,z),Z.send(t)})}return o(O,\"requestWithRetry\"),O()}o(T0,\"fetcher\");var O0={strings:{uploadStalled:\"Upload has not made any progress for %{seconds} seconds. You may want to retry it.\"}};function Ii(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Ii,\"_classPrivateFieldLooseBase\");var Ox=0;function jo(r){return\"__private_\"+Ox+++\"_\"+r}o(jo,\"_classPrivateFieldLooseKey\");var Ax={version:\"4.2.1\"};function Rx(r,e){let t=e;return t||(t=new Error(\"Upload error\")),typeof t==\"string\"&&(t=new Error(t)),t instanceof Error||(t=Object.assign(new Error(\"Upload error\"),{data:t})),Cu(r)?(t=new fr(t,r),t):(t.request=r,t)}o(Rx,\"buildResponseError\");function A0(r){return r.data.slice(0,r.data.size,r.meta.type)}o(A0,\"setTypeInBlob\");var kx={formData:!0,fieldName:\"file\",method:\"post\",allowedMetaFields:!0,bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:\"\"},oo=jo(\"getFetcher\"),Np=jo(\"uploadLocalFile\"),Dp=jo(\"uploadBundle\"),Lp=jo(\"getCompanionClientArgs\"),Ip=jo(\"uploadFiles\"),il=jo(\"handleUpload\"),zo=class extends Ce{static{o(this,\"XHRUpload\")}constructor(e,t){if(super(e,{...kx,fieldName:t.bundle?\"files[]\":\"file\",...t}),Object.defineProperty(this,Ip,{value:Nx}),Object.defineProperty(this,Lp,{value:Ix}),Object.defineProperty(this,Dp,{value:Dx}),Object.defineProperty(this,Np,{value:Ux}),Object.defineProperty(this,oo,{writable:!0,value:void 0}),Object.defineProperty(this,il,{writable:!0,value:o(async i=>{if(i.length===0){this.uppy.log(\"[XHRUpload] No files to upload!\");return}this.opts.limit===0&&!this.opts[fu]&&this.uppy.log(\"[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0\",\"warning\"),this.uppy.log(\"[XHRUpload] Uploading...\");let s=this.uppy.getFilesByIds(i),n=To(s),a=Oo(n);if(this.uppy.emit(\"upload-start\",a),this.opts.bundle){if(n.some(u=>u.isRemote))throw new Error(\"Can\\u2019t upload remote files when the `bundle: true` option is set\");if(typeof this.opts.headers==\"function\")throw new TypeError(\"`headers` may not be a function when the `bundle: true` option is set\");await Ii(this,Dp)[Dp](n)}else await Ii(this,Ip)[Ip](n)},\"value\")}),this.type=\"uploader\",this.id=this.opts.id||\"XHRUpload\",this.defaultLocale=O0,this.i18nInit(),fu in this.opts?this.requests=this.opts[fu]:this.requests=new br(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error(\"`opts.formData` must be true when `opts.bundle` is enabled.\");if(this.opts.bundle&&typeof this.opts.headers==\"function\")throw new Error(\"`opts.headers` can not be a function when the `bundle: true` option is set.\");if(t?.allowedMetaFields===void 0&&\"metaFields\"in this.opts)throw new Error(\"The `metaFields` option has been renamed to `allowedMetaFields`.\");this.uploaderEvents=Object.create(null),Ii(this,oo)[oo]=i=>async(s,n)=>{try{var a,l,u;let d=await T0(s,{...n,onBeforeRequest:o((y,P)=>{var D,C;return(D=(C=this.opts).onBeforeRequest)==null?void 0:D.call(C,y,P,i)},\"onBeforeRequest\"),shouldRetry:this.opts.shouldRetry,onAfterResponse:this.opts.onAfterResponse,onTimeout:o(y=>{let P=Math.ceil(y/1e3),D=new Error(this.i18n(\"uploadStalled\",{seconds:P}));this.uppy.emit(\"upload-stalled\",D,i)},\"onTimeout\"),onUploadProgress:o(y=>{if(y.lengthComputable)for(let D of i){var P;this.uppy.emit(\"upload-progress\",D,{uploadStarted:(P=D.progress.uploadStarted)!=null?P:0,bytesUploaded:y.loaded/y.total*D.size,bytesTotal:D.size})}},\"onUploadProgress\")}),m=await((a=(l=this.opts).getResponseData)==null?void 0:a.call(l,d));try{var h;(h=m)!=null||(m=JSON.parse(d.responseText))}catch(y){throw new Error(\"@uppy/xhr-upload expects a JSON response (with a `url` property). To parse non-JSON responses, use `getResponseData` to turn your response into JSON.\",{cause:y})}let w=typeof((u=m)==null?void 0:u.url)==\"string\"?m.url:void 0;for(let y of i)this.uppy.emit(\"upload-success\",y,{status:d.status,body:m,uploadURL:w});return d}catch(d){if(d.name===\"AbortError\")return;if(d instanceof fr){let m=d.request;for(let w of i)this.uppy.emit(\"upload-error\",w,Rx(m,d),m)}throw d}}}getOptions(e){let t=this.uppy.getState().xhrUpload,{headers:i}=this.opts,s={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return typeof i==\"function\"?s.headers=i(e):Object.assign(s.headers,this.opts.headers),t&&Ob
2ject.assign(s.headers,t.headers),e.xhrUpload&&Object.assign(s.headers,e.xhrUpload.headers),s}addMetadata(e,t,i){Ci(i.allowedMetaFields,t).forEach(n=>{let a=t[n];Array.isArray(a)?a.forEach(l=>e.append(n,l)):e.append(n,a)})}createFormDataUpload(e,t){let i=new FormData;this.addMetadata(i,e.meta,t);let s=A0(e);return e.name?i.append(t.fieldName,s,e.meta.name):i.append(t.fieldName,s),i}createBundledUpload(e,t){let i=new FormData,{meta:s}=this.uppy.getState();return this.addMetadata(i,s,t),e.forEach(n=>{let a=this.getOptions(n),l=A0(n);n.name?i.append(a.fieldName,l,n.name):i.append(a.fieldName,l)}),i}install(){if(this.opts.bundle){let{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(Ii(this,il)[il])}uninstall(){if(this.opts.bundle){let{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(Ii(this,il)[il])}};async function Ux(r){let e=new xi(this.uppy),t=new AbortController,i=this.requests.wrapPromiseFunction(async()=>{let s=this.getOptions(r),n=Ii(this,oo)[oo]([r]),a=s.formData?this.createFormDataUpload(r,s):r.data;return n(s.endpoint,{...s,body:a,signal:t.signal})});e.onFileRemove(r.id,()=>t.abort()),e.onCancelAll(r.id,()=>{t.abort()});try{await i().abortOn(t.signal)}catch(s){if(s.message!==\"Cancelled\")throw s}finally{e.remove()}}o(Ux,\"_uploadLocalFile2\");async function Dx(r){let e=new AbortController,t=this.requests.wrapPromiseFunction(async()=>{var s;let n=(s=this.uppy.getState().xhrUpload)!=null?s:{},a=Ii(this,oo)[oo](r),l=this.createBundledUpload(r,{...this.opts,...n});return a(this.opts.endpoint,{...this.opts,body:l,signal:e.signal})});function i(){e.abort()}o(i,\"abort\"),this.uppy.once(\"cancel-all\",i);try{await t().abortOn(e.signal)}catch(s){if(s.message!==\"Cancelled\")throw s}finally{this.uppy.off(\"cancel-all\",i)}}o(Dx,\"_uploadBundle2\");function Ix(r){var e;let t=this.getOptions(r),i=Ci(t.allowedMetaFields,r.meta);return{...(e=r.remote)==null?void 0:e.body,protocol:\"multipart\",endpoint:t.endpoint,size:r.data.size,fieldname:t.fieldName,metadata:Object.fromEntries(i.map(s=>[s,r.meta[s]])),httpMethod:t.method,useFormData:t.formData,headers:t.headers}}o(Ix,\"_getCompanionClientArgs2\");async function Nx(r){await Promise.allSettled(r.map(e=>{if(e.isRemote){let t=o(()=>this.requests,\"getQueue\"),i=new AbortController,s=o(a=>{a.id===e.id&&i.abort()},\"removedHandler\");this.uppy.on(\"file-removed\",s);
2let n=this.uppy.getRequestClientForFile(e).uploadRemoteFile(e,Ii(this,Lp)[Lp](e),{signal:i.signal,getQueue:t});return this.requests.wrapSyncFunction(()=>{this.uppy.off(\"file-removed\",s)},{priority:-1})(),n}return Ii(this,Np)[Np](e)}))}o(Nx,\"_uploadFiles2\");zo.VERSION=Ax.version;var zp=ve(sn(),1),D0=ve(R0(),1);var k0={strings:{compressingImages:\"Compressing images...\",compressedX:\"Saved %{size} by compressing images\"}};function U0(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(U0,\"_classPrivateFieldLooseBase\");var Lx=0;function Mx(r){return\"__private_\"+Lx+++\"_\"+r}o(Mx,\"_classPrivateFieldLooseKey\");var Bx={quality:.6,limit:10},sl=Mx(\"RateLimitedQueue\"),ol=class extends Ce{static{o(this,\"Compressor\")}constructor(e,t){super(e,{...Bx,...t}),Object.defineProperty(this,sl,{writable:!0,value:void 0}),this.id=this.opts.id||\"Compressor\",this.type=\"modifier\",this.defaultLocale=k0,U0(this,sl)[sl]=new br(this.opts.limit),this.i18nInit(),this.prepareUpload=this.prepareUpload.bind(this),this.compress=this.compress.bind(this)}compress(e){return new Promise((t,i)=>{new D0.default(e,{...this.opts,success:t,error:i})})}async prepareUpload(e){let t=0,i=[],s=U0(this,sl)[sl].wrapPromiseFunction(async a=>{try{let l=await this.compress(a.data),u=a.data.size-l.size;this.uppy.log(`[Image Compressor] Image ${a.id} compressed by ${(0,zp.default)(u)}`),t+=u;let{name:h,type:d,size:m}=l,w=Dr(h),P=`${Dr(a.meta.name).name}.${w.extension}`;this.uppy.setFileState(a.id,{...h&&{name:h},...w.extension&&{extension:w.extension},...d&&{type:d},...m&&{size:m},data:l,meta:{...a.meta,type:d,name:P}}),i.push(a)}catch(l){this.uppy.log(`[Image Compressor] Failed to compress ${a.id}:`,\"warning\"),this.uppy.log(l,\"warning\")}}),n=e.map(a=>{var l;let u=this.uppy.getFile(a);
2return this.uppy.emit(\"preprocess-progress\",u,{mode:\"indeterminate\",message:this.i18n(\"compressingImages\")}),u.isRemote||(u.data.type||(u.data=u.data.slice(0,u.data.size,u.type)),!((l=u.type)!=null&&l.startsWith(\"image/\")))?Promise.resolve():s(u)});await Promise.all(n),this.uppy.emit(\"compressor:complete\",i),t>1024&&this.uppy.info(this.i18n(\"compressedX\",{size:(0,zp.default)(t)}),\"info\");for(let a of e){let l=this.uppy.getFile(a);this.uppy.emit(\"preprocess-complete\",l)}}install(){this.uppy.addPreProcessor(this.prepareUpload)}uninstall(){this.uppy.removePreProcessor(this.prepareUpload)}};function ku(){return ku=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},ku.apply(this,arguments)}o(ku,\"_extends\");var zx={\"[object HTMLCollection]\":!0,\"[object NodeList]\":!0,\"[object RadioNodeList]\":!0},jx={button:!0,fieldset:!0,reset:!0,submit:!0},Hx={checkbox:!0,radio:!0},qx=/^\\s+|\\s+$/g,$x=Array.prototype.slice,I0=Object.prototype.toString;function Uu(r,e){if(!r)throw new Error(\"A form is required by getFormData, was given form=\"+r);e=ku({includeDisabled:!1,trim:!1},e);for(var t={},i,s=[],n={},a=0,l=r.elements.length;a<l;a++){var u=r.elements[a];jx[u.type]||u.disabled&&!e.includeDisabled||(i=u.name||u.id,i&&!n[i]&&(s.push(i),n[i]=!0))}for(var h=0,d=s.length;h<d;h++){i=s[h];var m=L0(r,i,e);m!=null&&(t[i]=m)}return t}o(Uu,\"getFormData\");function L0(r,e,t){if(!r)throw new Error(\"A form is required by getFieldData, was given form=\"+r);if(!e&&I0.call(e)!==\"[object String]\")throw new Error(\"A field name is required by getFieldData, was given fieldName=\"+e);t=ku({includeDisabled:!1,trim:!1},t);var i=r.elements[e];if(!i||i.disabled&&!t.includeDisabled)return null;if(!zx[I0.call(i)])return N0(i,t.trim);for(var s=[],n=!0,a=0,l=i.length;a<l;a++)if(!(i[a].disabled&&!t.includeDisabled)){n&&i[a].type!==\"radio\"&&(n=!1);var u=N0(i[a],t.trim);u!=null&&(s=s.concat(u))}return n&&s.length===1?s[0]:s.length>0?s:null}o(L0,\"getFieldData\");function N0(r,e){var t=null,i=r.type;if(i===\"select-one\")return r.options.length&&(t=r.options[r.selectedIndex].value),t;if(i===\"select-multiple\"){t=[];for(var s=0,n=r.options.length;s<n;s++)r.options[s].selected&&t.push(r.options[s].value);return t.length===0&&(t=null),t}return i===\"file\"&&\"files\"in r?(r.multiple?(t=$x.call(r.files),t.length===0&&(t=null)):t=r.files[0],t):(Hx[i]?r.checked&&(i===\"checkbox\"&&!r.hasAttribute(\"value\")?t=!0:t=r.value):t=e?r.value.replace(qx,\"\"):r.value,t)}o(N0,\"getFormElementValue\");Uu.getFieldData=L0;function Vi(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Vi,\"_classPrivateFieldLooseBase\");var Vx=0;function Wx(r){return\"__private_\"+Vx+++\"_\"+r}o(Wx,\"_classPrivateFieldLooseKey\");var Gx={version:\"4.0.0\"},Kx={resultName:\"uppyResult\",getMetaFromForm:!0,addResultToForm:!0,submitOnSuccess:!1,triggerUploadOnSubmit:!1};function Xx(r){if(r==null||r.nodeName!==\"FORM\")throw new Error(\"ASSERTION FAILED: the target is not a <form> element\",{cause:r});return r}o(Xx,\"assertHTMLFormElement\");var Et=Wx(\"form\"),Ho=class extends Ce{static{o(this,\"Form\")}constructor(e,t){super(e,{...Kx,...t}),Object.defineProperty(this,Et,{writable:!0,value:void 0}),this.type=\"acquirer\",this.id=this.opts.id||\"Form\",this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleUploadStart=this.handleUploadStart.bind(this),this.handleSuccess=this.handleSuccess.bind(this),this.addResultToForm=this.addResultToForm.bind(this),this.getMetaFromForm=this.getMetaFromForm.bind(this)}handleUploadStart(){this.opts.getMetaFromForm&&this.getMetaFromForm()}handleSuccess(e){this.opts.addResultToForm&&this.addResultToForm(e),this.opts.submitOnSuccess&&Vi(this,Et)[Et].reportValidity()&&Vi(this,Et)[Et].submit()}handleFormSubmit(e){if(this.opts.triggerUploadOnSubmit){e.preventDefault();let t=et(e.target.elements),i=[];t.forEach(s=>{(s.tagName===\"BUTTON\"||s.tagName===\"INPUT\"&&s.type===\"submit\")&&!s.disabled&&(s.disabled=!0,i.push(s))}),this.uppy.upload().then(()=>
2{i.forEach(s=>{s.disabled=!1})},s=>(i.forEach(n=>{n.disabled=!1}),Promise.reject(s))).catch(s=>{this.uppy.log(s.stack||s.message||s)})}}addResultToForm(e){this.uppy.log(\"[Form] Adding result to the original form:\"),this.uppy.log(e);let t=Vi(this,Et)[Et].querySelector(`[name=\"${this.opts.resultName}\"]`);if(t){let i;try{i=JSON.parse(t.value)}catch{}Array.isArray(i)||(i=[]),i.push(e),t.value=JSON.stringify(i);return}t=document.createElement(\"input\"),t.name=this.opts.resultName,t.type=\"hidden\",t.value=JSON.stringify([e]),Vi(this,Et)[Et].appendChild(t)}getMetaFromForm(){let e=Uu(Vi(this,Et)[Et]);delete e[this.opts.resultName],this.uppy.setMeta(e)}install(){Vi(this,Et)[Et]=Xx(Al(this.opts.target)),Vi(this,Et)[Et].addEventListener(\"submit\",this.handleFormSubmit),this.uppy.on(\"upload\",this.handleUploadStart),this.uppy.on(\"complete\",this.handleSuccess)}uninstall(){Vi(this,Et)[Et].removeEventListener(\"submit\",this.handleFormSubmit),this.uppy.off(\"upload\",this.handleUploadStart),this.uppy.off(\"complete\",this.handleSuccess)}};Ho.VERSION=Gx.version;var X0=ve(vl(),1);function qo(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(qo,\"_classPrivateFieldLooseBase\");var Yx=0;function Jx(r){return\"__private_\"+Yx+++\"_\"+r}o(Jx,\"_classPrivateFieldLooseKey\");var M0=typeof navigator<\"u\"&&\"serviceWorker\"in navigator;function Qx(){return new Promise((r,e)=>{M0?navigator.serviceWorker.controller?r():navigator.serviceWorker.addEventListener(\"controllerchange\",()=>{r()}):e(new Error(\"Unsupported\"))})}o(Qx,\"waitForServiceWorker\");var ur=Jx(\"ready\"),Du=class{static{o(this,\"ServiceWorkerStore\")}constructor(e){Object.defineProperty(this,ur,{writable:!0,value:void 0}),qo(this,ur)[ur]=Qx().then(t=>{qo(this,ur)[ur]=t}),this.name=e.storeName}get ready(){return Promise.resolve(qo(this,ur)[ur])}async list(){return await qo(this,ur)[ur],new Promise((e,t)=>{let i=o(s=>{if(s.data.store===this.name)switch(s.data.type){case\"uppy/ALL_FILES\":e(s.data.files),navigator.serviceWorker.removeEventListener(\"message\",i);break;default:t()}},\"onMessage\");navigator.serviceWorker.addEventListener(\"message\",i),navigator.serviceWorker.controller.postMessage({type:\"uppy/GET_FILES\",store:this.name})})}async put(e){await qo(this,ur)[ur],navigator.serviceWorker.controller.postMessage({type:\"uppy/ADD_FILE\",store:this.name,file:e})}async delete(e){await qo(this,ur)[ur],navigator.serviceWorker.controller.postMessage({type:\"uppy/REMOVE_FILE\",store:this.name,fileID:e})}};Du.isSupported=M0;var B0=Du;function Ni(r,e){if(!{}.hasOwnProperty.call(r,e))throw new TypeError(\"attempted to use private field on non-instance\");return r}o(Ni,\"_classPrivateFieldLooseBase\");var Zx=0;function eF(r){return\"__private_\"+Zx+++\"_\"+r}o(eF,\"_classPrivateFieldLooseKey\");var $0=typeof window<\"u\"&&(window.indexedDB||window.webkitIndexedDB||window.mozIndexedDB||window.OIndexedDB||window.msIndexedDB),tF=!!$0,z0=\"uppy-blobs\",Gt=\"files\",V0=24*60*60*1e3,rF=3,j0=1048576;function iF(r){let e=r.openCursor();e.onsuccess=t=>{let i=t.target.result;if(!i)return;let s=i.value;s.expires=Date.now()+V0,i.update(s)}}o(iF,\"migrateExpiration\");function H0(r){let e=$0.open(r,rF);return new Promise((t,i)=>{e.onupgradeneeded=s=>{let n=s.target.result,a=s.currentTarget.transaction;if(s.oldVersion<2&&n.createObjectStore(Gt,{keyPath:\"id\"}).createIndex(\"store\",\"store\",{unique:!1}),s.oldVersion<3){let l=a.objectStore(Gt);l.createIndex(\"expires\",\"expires\",{unique:!1}),iF(l)}a.oncomplete=()=>{t(n)}},e.onsuccess=s=>{t(s.target.result)},e.onerror=i})}o(H0,\"connect\");function Iu(r){return new Promise((e,t)=>{r.onsuccess=i=>{e(i.target.result)},r.onerror=t})}o(Iu,\"waitForRequest\");var q0=!1,at=eF(\"ready\"),Nu=class r{static{o(this,\"IndexedDBStore\")}constructor(e){Object.defineProperty(this,at,{writable:!0,value:void 0}),this.opts={dbName:z0,storeName:\"default\",expires:V0,maxFileSize:10*j0,maxTotalSize:300*j0,...e},this.name=this.opts.storeName;let t=o(async()=>{let i=await H0(this.opts.dbName);return Ni(this,at)[at]=i,i},\"createConnection\");q0?Ni(this,at)[at]=t():(q0=!0,Ni(this,at)[at]=r.cleanup().then(t,t))}get ready(){return Promise.resolve(Ni(this,at)[at])}key(e){return`${this.name}!${e}`}async list(){let s=(await Ni(this,at)[at]).transaction([Gt],\"readonly\").objectStore(Gt).index(\"store\").getAll(IDBKeyRange.only(this.name)),n=await Iu(s);return Object.fromEntries(n.map(a=>[a.fileID,a.data]))}async get(e){let s=(await Ni(this,at)[at]).transaction([Gt],\"readonly\").objectStore(Gt).get(this.key(e)),{data:n}=await Iu(s);return{id:n.fileID,data:n.data}}async getSize(){let s=(await Ni(this,at)[at]).transaction([Gt],\"readonly\").objectStore(Gt).index(\"store\").openCursor(IDBKeyRange.only(this.name));return new Promise((n,a)=>{let l=0;s.onsuccess=u=>{let h=u.target.result;h?(l+=h.value.data.size,h.continue()):n(l)},s.onerror=()=>{a(new Error(\"Could not retrieve stored blobs size\"))}})}async put(e){if(e.data.size>this.opts.maxFileSize)throw new Error(\"File is too big to store.\");
2if(await this.getSize()>this.opts.maxTotalSize)throw new Error(\"No space left\");let n=(await Ni(this,at)[at]).transaction([Gt],\"readwrite\").objectStore(Gt).add({id:this.key(e.id),fileID:e.id,store:this.name,expires:Date.now()+this.opts.expires,data:e.data});return Iu(n)}async delete(e){let s=(await Ni(this,at)[at]).transaction([Gt],\"readwrite\").objectStore(Gt).delete(this.key(e));return Iu(s)}static async cleanup(){let e=await H0(z0),s=e.transaction([Gt],\"readwrite\").objectStore(Gt).index(\"expires\").openCursor(IDBKeyRange.upperBound(Date.now()));await new Promise((n,a)=>{s.onsuccess=l=>{let u=l.target.result;u?(u.delete(),u.continue()):n()},s.onerror=a}),e.close()}};Nu.isSupported=tF;var W0=Nu;function sF(){let r=[];for(let e=0;e<localStorage.length;e++){let t=localStorage.key(e);t!=null&&t.startsWith(\"uppyState:\")&&r.push(t.slice(10))}return r}o(sF,\"findUppyInstances\");function G0(r){try{return JSON.parse(r)}catch{return null}}o(G0,\"maybeParse\");var K0=!1,Wi=class r{static{o(this,\"MetaDataStore\")}constructor(e){this.opts={expires:24*60*60*1e3,...e},this.name=`uppyState:${e.storeName}`,K0||(K0=!0,r.cleanup())}load(){let e=localStorage.getItem(this.name);if(!e)return null;let t=G0(e);return t?t.metadata:null}save(e){let t=Date.now()+this.opts.expires,i=JSON.stringify({metadata:e,expires:t});localStorage.setItem(this.name,i)}static cleanup(e){if(e){localStorage.removeItem(`uppyState:${e}`);return}let t=sF(),i=Date.now();t.forEach(s=>{let n=localStorage.getItem(`uppyState:${s}`);if(!n)return;let a=G0(n);a&&a.expires&&a.expires<i&&localStorage.removeItem(`uppyState:${s}`)})}};var oF={version:\"4.0.0\"},nF={expires:24*60*60*1e3,serviceWorker:!1},$o=class extends Ce{static{o(this,\"GoldenRetriever\")}constructor(e,t){super(e,{...nF,...t}),this.addBlobToStores=i=>{i.isRemote||(this.ServiceWorkerStore&&this.ServiceWorkerStore.put(i).catch(s=>{this.uppy.log(\"[GoldenRetriever] Could not store file\",\"warning\"),this.uppy.log(s)}),this.IndexedDBStore.put(i).catch(s=>{this.uppy.log(\"[GoldenRetriever] Could not store file\",\"warning\"),this.uppy.log(s)}))},this.removeBlobFromStores=i=>{this.ServiceWorkerStore&&this.ServiceWorkerStore.delete(i.id).catch(s=>{this.uppy.log(\"[GoldenRetriever] Failed to remove file\",\"warning\"),this.uppy.log(s)}),this.IndexedDBStore.delete(i.id).catch(s=>{this.uppy.log(\"[GoldenRetriever] Failed to remove file\",\"warning\"),this.uppy.log(s)})},this.replaceBlobInStores=i=>{this.removeBlobFromStores(i),this.addBlobToStores(i)},this.handleRestoreConfirmed=()=>{this.uppy.log(\"[GoldenRetriever] Restore confirmed, proceeding...\");let{currentUploads:i}=this.uppy.getState();
2i&&(this.uppy.resumeAll(),Object.keys(i).forEach(s=>{this.uppy.restore(s)})),this.uppy.setState({recoveredState:null})},this.abortRestore=()=>{this.uppy.log(\"[GoldenRetriever] Aborting restore...\");let i=Object.keys(this.uppy.getState().files);this.deleteBlobs(i).then(()=>{this.uppy.log(`[GoldenRetriever] Removed ${i.length} files`)}).catch(s=>{this.uppy.log(`[GoldenRetriever] Could not remove ${i.length} files`,\"warning\"),this.uppy.log(s)}),this.uppy.cancelAll(),this.uppy.setState({recoveredState:null}),Wi.cleanup(this.uppy.opts.id)},this.handleComplete=i=>{let{successful:s}=i,n=s.map(a=>a.id);this.deleteBlobs(n).then(()=>{this.uppy.log(`[GoldenRetriever] Removed ${s.length} files that finished uploading`)}).catch(a=>{this.uppy.log(`[GoldenRetriever] Could not remove ${s.length} files that finished uploading`,\"warning\"),this.uppy.log(a)}),this.uppy.setState({recoveredState:null}),Wi.cleanup(this.uppy.opts.id)},this.restoreBlobs=()=>{this.uppy.getFiles().length>0?Promise.all([this.loadFileBlobsFromServiceWorker(),this.loadFileBlobsFromIndexedDB()]).then(i=>{let s={...i[0],...i[1]};this.onBlobsLoaded(s)}):this.uppy.log(\"[GoldenRetriever] No files need to be loaded, only restoring processing state...\")},this.type=\"debugger\",this.id=this.opts.id||\"GoldenRetriever\",this.MetaDataStore=new Wi({expires:this.opts.expires,storeName:e.getID()}),this.ServiceWorkerStore=null,this.opts.serviceWorker&&(this.ServiceWorkerStore=new B0({storeName:e.getID()})),this.IndexedDBStore=new W0({expires:this.opts.expires,...this.opts.indexedDB||{},storeName:e.getID()}),this.saveFilesStateToLocalStorage=(0,X0.default)(this.saveFilesStateToLocalStorage.bind(this),500,{leading:!0,trailing:!0}),this.restoreState=this.restoreState.bind(this),this.loadFileBlobsFromServiceWorker=this.loadFileBlobsFromServiceWorker.bind(this),this.loadFileBlobsFromIndexedDB=this.loadFileBlobsFromIndexedDB.bind(this),this.onBlobsLoaded=this.onBlobsLoaded.bind(this)}restoreState(){let e=this.MetaDataStore.load();e&&(this.uppy.log(\"[GoldenRetriever] Recovered some state from Local Storage\"),this.uppy.setState({currentUploads:e.currentUploads||{},files:e.files||{},recoveredState:e}),this.savedPluginData=e.pluginData)}getWaitingFiles(){let e={};
2return this.uppy.getFiles().forEach(t=>{(!t.progress||!t.progress.uploadStarted)&&(e[t.id]=t)}),e}getUploadingFiles(){let e={},{currentUploads:t}=this.uppy.getState();return t&&Object.keys(t).forEach(s=>{t[s].fileIDs.forEach(a=>{e[a]=this.uppy.getFile(a)})}),e}saveFilesStateToLocalStorage(){let e={...this.getWaitingFiles(),...this.getUploadingFiles()},t=Object.entries(e);if(t.length===0){this.uppy.getState().recoveredState!==null&&this.uppy.setState({recoveredState:null}),Wi.cleanup(this.uppy.opts.id);return}let i=Object.fromEntries(t.map(a=>{let[l,u]=a;return[l,u.isRemote?{...u,isRestored:!0}:{...u,isRestored:!0,data:null,preview:null}]})),s={};this.uppy.emit(\"restore:get-data\",a=>{Object.assign(s,a)});let{currentUploads:n}=this.uppy.getState();this.MetaDataStore.save({currentUploads:n,files:i,pluginData:s})}loadFileBlobsFromServiceWorker(){return this.ServiceWorkerStore?this.ServiceWorkerStore.list().then(e=>{let t=Object.keys(e).length;return t>0?(this.uppy.log(`[GoldenRetriever] Successfully recovered ${t} blobs from Service Worker!`),e):(this.uppy.log(\"[GoldenRetriever] No blobs found in Service Worker, trying IndexedDB now...\"),{})}).catch(e=>(this.uppy.log(\"[GoldenRetriever] Failed to recover blobs from Service Worker\",\"warning\"),this.uppy.log(e),{})):Promise.resolve({})}loadFileBlobsFromIndexedDB(){return this.IndexedDBStore.list().then(e=>{let t=Object.keys(e).length;return t>0?(this.uppy.log(`[GoldenRetriever] Successfully recovered ${t} blobs from IndexedDB!`),e):(this.uppy.log(\"[GoldenRetriever] No blobs found in IndexedDB\"),{})}).catch(e=>(this.uppy.log(\"[GoldenRetriever] Failed to recover blobs from IndexedDB\",\"warning\"),this.uppy.log(e),{}))}onBlobsLoaded(e){let t=[],i={...this.uppy.getState().files};Object.keys(e).forEach(s=>{let n=this.uppy.getFile(s);if(!n){t.push(s);return}let l={data:e[s],isRestored:!0,isGhost:!1};i[s]={...n,...l}}
2),Object.keys(i).forEach(s=>{i[s].data===null&&(i[s]={...i[s],isGhost:!0})}),this.uppy.setState({files:i}),this.uppy.emit(\"restored\",this.savedPluginData),t.length&&this.deleteBlobs(t).then(()=>{this.uppy.log(`[GoldenRetriever] Cleaned up ${t.length} old files`)}).catch(s=>{this.uppy.log(`[GoldenRetriever] Could not clean up ${t.length} old files`,\"warning\"),this.uppy.log(s)})}async deleteBlobs(e){await Promise.all(e.map(t=>{var i,s,n;return(i=(s=this.ServiceWorkerStore)==null?void 0:s.delete(t))!=null?i:(n=this.IndexedDBStore)==null?void 0:n.delete(t)}))}install(){this.restoreState(),this.restoreBlobs(),this.uppy.on(\"file-added\",this.addBlobToStores),this.uppy.on(\"file-editor:complete\",this.replaceBlobInStores),this.uppy.on(\"file-removed\",this.removeBlobFromStores),this.uppy.on(\"state-update\",this.saveFilesStateToLocalStorage),this.uppy.on(\"restore-confirmed\",this.handleRestoreConfirmed),this.uppy.on(\"restore-canceled\",this.abortRestore),this.uppy.on(\"complete\",this.handleComplete)}uninstall(){this.uppy.off(\"file-added\",this.addBlobToStores),this.uppy.off(\"file-editor:complete\",this.replaceBlobInStores),this.uppy.off(\"file-removed\",this.removeBlobFromStores),this.uppy.off(\"state-update\",this.saveFilesStateToLocalStorage),this.uppy.off(\"restore-confirmed\",this.handleRestoreConfirmed),this.uppy.off(\"restore-canceled\",this.abortRestore),this.uppy.off(\"complete\",this.handleComplete)}};$o.VERSION=oF.version;var aF={version:\"4.0.0\"},Vo=class extends ne{static{o(this,\"ReduxDevTools\")}constructor(e,t){super(e,t),this.type=\"debugger\",this.id=this.opts.id||\"ReduxDevTools\",this.title=\"Redux DevTools\";let i={};this.opts={...i,...t},this.handleStateChange=this.handleStateChange.bind(this),this.initDevTools=this.initDevTools.bind(this)}handleStateChange(e,t){this.devTools.send(\"UPPY_STATE_UPDATE\",t)}initDevTools(){this.devTools=window.devToolsExtension.connect(),this.devToolsUnsubscribe=this.devTools.subscribe(e=>{if(e.type===\"DISPATCH\")switch(e.payload.type){case\"RESET\":this.uppy.cancelAll();return;case\"IMPORT_STATE\":{let{computedStates:t}=e.payload.nextLiftedState;
2this.uppy.store.state={...this.uppy.getState(),...t[t.length-1].state},this.uppy.updateAll(this.uppy.getState());return}case\"JUMP_TO_STATE\":case\"JUMP_TO_ACTION\":this.uppy.store.state={...this.uppy.getState(),...JSON.parse(e.state)},this.uppy.updateAll(this.uppy.getState());break;default:}})}install(){this.withDevTools=typeof window<\"u\"&&window.__REDUX_DEVTOOLS_EXTENSION__,this.withDevTools&&(this.initDevTools(),this.uppy.on(\"state-update\",this.handleStateChange))}uninstall(){this.withDevTools&&(this.devToolsUnsubscribe(),this.uppy.off(\"state-update\",this.handleStateUpdate))}};Vo.VERSION=aF.version;function lF(){throw new Error(\"Core has been renamed to Uppy\")}o(lF,\"Core\");var uF={ProviderView:Uc};Ui.COMPANION_URL=F0;Ui.COMPANION_ALLOWED_HOSTS=E0;var cF={};globalThis.Uppy=jp;})();\n/**\n * Takes a string with placeholder variables like `%{smart_count} file selected`\n * and replaces it with values from options `{smart_count: 5}`\n *\n * @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE\n * taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299\n *\n * @param phrase that needs interpolation, with placeholders\n * @param options with values that will be used to replace placeholders\n */\n/*! Bundled license information:\n\nclassnames/index.js:\n (*!\n \tCopyright (c) 2018 Jed Watson.\n \tLicensed under the MIT License (MIT), see\n \thttp://jedwatson.github.io/classnames\n *)\n\ncropperjs/dist/cropper.js:\n (*!\n * Cropper.js v1.5.7\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2020-05-23T05:23:00.081Z\n *)\n\ncompressorjs/dist/compressor.js:\n (*!\n * Compressor.js v1.2.1\n * https://fengyuanchen.github.io/compressorjs\n *\n * Copyright 2018-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2023-02-28T14:09:41.732Z\n *)\n\ntus-js-client/lib.esm/upload.js:\n (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE *)\n\ntus-js-client/lib.esm/browser/fileReader.js:\n (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE *)\n*/\n//# sourceMappingURL=uppy.min.js.map\n","js-cookie/cookie-wrapper.min.js":"define(['jquery','js-cookie/js.cookie'],function($,cookie){'use strict';window.Cookies=window.Cookies||cookie;var config=$.cookie=function(key,value,options){if(value!==undefined){options=$.extend({},config.defaults,options);return cookie.set(key,value,options);}\nvar result=key?undefined:{},cookies=document.cookie?document.cookie.split('; '):[],i;for(i=0;i<cookies.length;i++){var parts=cookies[i].split('='),name=config.raw?parts.shift():decodeURIComponent(parts.shift()),cookieValue=parts.join('=');if(key&&key===name){result=decodeURIComponent(cookieValue.replace('/\\\\+/g',' '));break;}\nif(!key&&(cookieValue=decodeURIComponent(cookieValue.replace('/\\\\+/g',' ')))!==undefined){result[name]=cookieValue;}}\nreturn result;};config.defaults={};$.removeCookie=function(key,options){if($.cookie(key)===undefined){return false;}\n$.cookie(key,'',$.extend({},options,{expires:-1}));return!$.cookie(key);};});","js-cookie/js.cookie.min.js":"/*! js-cookie v3.0.5 | MIT */;(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory():typeof define==='function'&&define.amd?define(factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,(function(){var current=global.Cookies;var exports=global.Cookies=factory();exports.noConflict=function(){global.Cookies=current;return exports;};})());})(this,(function(){'use strict';function assign(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){target[key]=source[key];}}\nreturn target}\nvar defaultConverter={read:function(value){if(value[0]==='\"'){value=value.slice(1,-1);}\nreturn value.replace(/(%[\\dA-F]{2})+/gi,decodeURIComponent)},write:function(value){return encodeURIComponent(value).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
2URIComponent)}};function init(converter,defaultAttributes){function set(name,value,attributes){if(typeof document==='undefined'){return}\nattributes=assign({},defaultAttributes,attributes);if(typeof attributes.expires==='number'){attributes.expires=new Date(Date.now()+attributes.expires*864e5);}\nif(attributes.expires){attributes.expires=attributes.expires.toUTCString();}\nname=encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var stringifiedAttributes='';for(var attributeName in attributes){if(!attributes[attributeName]){continue}\nstringifiedAttributes+='; '+attributeName;if(attributes[attributeName]===true){continue}\nstringifiedAttributes+='='+attributes[attributeName].split(';')[0];}\nreturn(document.cookie=name+'='+converter.write(value,name)+stringifiedAttributes)}\nfunction get(name){if(typeof document==='undefined'||(arguments.length&&!name)){return}\nvar cookies=document.cookie?document.cookie.split('; '):[];var jar={};for(var i=0;i<cookies.length;i++){var parts=cookies[i].split('=');var value=parts.slice(1).join('=');try{var found=decodeURIComponent(parts[0]);jar[found]=converter.read(value,found);if(name===found){break}}catch(e){}}\nreturn name?jar[name]:jar}\nreturn Object.create({set,get,remove:function(name,attributes){set(name,'',assign({},attributes,{expires:-1}));},withAttributes:function(attributes){return init(this.converter,assign({},this.attributes,attributes))},withConverter:function(converter){return init(assign({},this.converter,converter),this.attributes)}},{attributes:{value:Object.freeze(defaultAttributes)},converter:{value:Object.freeze(converter)}})}\nvar api=init(defaultConverter,{path:'/'});return api;}));","js-storage/js.storage.min.js":"(function(factory){var registeredInModuleLoader=false;if(typeof define==='function'&&define.amd){define(['jquery','jquery/jquery.cookie'],factory);registeredInModuleLoader=true;}\nif(typeof exports==='object'){module.exports=factory();registeredInModuleLoader=true;}\nif(!registeredInModuleLoader){var OldStorages=window.Storages;var api=window.Storages=factory();api.noConflict=function(){window.Storages=OldStorages;return api;};}}(function(){var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var getProto=Object.getPrototypeOf;var apis={};var cookie_local_prefix=\"ls_\";var cookie_session_prefix=\"ss_\";function _get(){var storage=this._type,l=arguments.length,s=window[storage],a=arguments,a0=a[0],vi,ret,tmp,i,j;if(l<1){throw new Error('Minimum 1 argument must be given');}else if(Array.isArray(a0)){ret={};for(i in a0){if(a0.hasOwnProperty(i)){vi=a0[i];try{ret[vi]=JSON.parse(s.getItem(vi));}catch(e){ret[vi]=s.getItem(vi);}}}\nreturn ret;}else if(l==1){try{return JSON.parse(s.getItem(a0));}catch(e){return s.getItem(a0);}}else{try{ret=JSON.parse(s.getItem(a0));if(!ret){throw new ReferenceError(a0+' is not defined in this storage');}}catch(e){throw new ReferenceError(a0+' is not defined in this storage');}\nfor(i=1;i<l-1;i++){ret=ret[a[i]];if(ret===undefined){throw new ReferenceError([].slice.call(a,0,i+1).join('.')+' is not defined in this storage');}}\nif(Array.isArray(a[i])){tmp=ret;ret={};for(j in a[i]){if(a[i].hasOwnProperty(j)){ret[a[i][j]]=tmp[a[i][j]];}}\nreturn ret;}else{return ret[a[i]];}}}\nfunction _set(){var storage=this._type,l=arguments.length,s=window[storage],a=arguments,a0=a[0],a1=a[1],vi,to_store=isNaN(a1)?{}:[],type,tmp,i;if(l<1||!_isPlainObject(a0)&&l<2){throw new Error('Minimum 2 arguments must be given or first parameter must be an object');}else if(_isPlainObject(a0)){for(i in a0){if(a0.hasOwnProperty(i)){vi=a0[i];if(!_isPlainObject(vi)&&!this.alwaysUseJson){s.setItem(i,vi);}else{s.setItem(i,JSON.stringify(vi));}}}\nreturn a0;}else if(l==2){if(typeof a1==='object'||this.alwaysUseJson){s.setItem(a0,JSON.stringify(a1));}else{s.setItem(a0,a1);}\nreturn a1;}else{try{tmp=s.getItem(a0);if(tmp!=null){to_store=JSON.parse(tmp);}}catch(e){}\ntmp=to_store;for(i=1;i<l-2;i++){vi=a[i];type=isNaN(a[i+1])?\"object\":\"array\";if(!tmp[vi]||type==\"object\"&&!_isPlainObject(tmp[vi])||type==\"array\"&&!Array.isArray(tmp[vi])){if(type==\"array\")tmp[vi]=[];else tmp[vi]={};}\ntmp=tmp[vi];}\ntmp[a[i]]=a[i+1];s.setItem(a0,JSON.stringify(to_store));return to_store;}}\nfunction _remove(){var storage=this._type,l=arguments.length,s=window[storage],a=arguments,a0=a[0],to_store,tmp,i,j;if(l<1){throw new Error('Minimum 1 argument must be given');}else if(Array.isArray(a0)){for(i in a0){if(a0.hasOwnProperty(i)){s.removeItem(a0[i]);}}\nreturn true;}else if(l==1){s.removeItem(a0);return true;}else{try{to_store=tmp=JSON.parse(s.getItem(a0));}catch(e){throw new ReferenceError(a0+' is not defined in this storage');}\nfor(i=1;i<l-1;i++){tmp=tmp[a[i]];if(tmp===undefined){throw new ReferenceError([].slice.call(a,1,i).join('.')+' is not defined in this storage');}}\nif(Array.isArray(a[i])){for(j in a[i]){if(a[i].hasOwnProperty(j)){delete tmp[a[i][j]];}}}else{delete tmp[a[i]];}\ns.setItem(a0,JSON.stringify(to_store));return true;}}\nfunction _removeAll(reinit_ns){var keys=_keys.call(this),i;for(i in keys){if(keys.hasOwnProperty(i)){_remove.call(this,keys[i]);}}\nif(reinit_ns){for(i in apis.namespaceStorages){if(apis.namespaceStorages.hasOwnProperty(i)){_createNamespace(i);}}}}\nfunction _isEmpty(){var l=arguments.length,a=arguments,a0=a[0],i;if(l==0){return(_keys.call(this).length==0);}else if(Array.isArray(a0)){for(i=0;i<a0.length;i++){if(!_isEmpty.call(this,a0[i])){return false;}}\nreturn true;}else{try{var v=_get.apply(this,arguments);if(!Array.isArray(a[l-1])){v={'totest':v};}
2\nfor(i in v){if(v.hasOwnProperty(i)&&!((_isPlainObject(v[i])&&_isEmptyObject(v[i]))||(Array.isArray(v[i])&&!v[i].length)||(typeof v[i]!=='boolean'&&!v[i]))){return false;}}\nreturn true;}catch(e){return true;}}}\nfunction _isSet(){var l=arguments.length,a=arguments,a0=a[0],i;if(l<1){throw new Error('Minimum 1 argument must be given');}\nif(Array.isArray(a0)){for(i=0;i<a0.length;i++){if(!_isSet.call(this,a0[i])){return false;}}\nreturn true;}else{try{var v=_get.apply(this,arguments);if(!Array.isArray(a[l-1])){v={'totest':v};}\nfor(i in v){if(v.hasOwnProperty(i)&&!(v[i]!==undefined&&v[i]!==null)){return false;}}\nreturn true;}catch(e){return false;}}}\nfunction _keys(){var storage=this._type,l=arguments.length,s=window[storage],keys=[],o={};if(l>0){o=_get.apply(this,arguments);}else{o=s;}\nif(o&&o._cookie){var cookies=Cookies.get();for(var key in cookies){if(cookies.hasOwnProperty(key)&&key!=''){keys.push(key.replace(o._prefix,''));}}}else{for(var i in o){if(o.hasOwnProperty(i)){keys.push(i);}}}\nreturn keys;}\nfunction _createNamespace(name){if(!name||typeof name!=\"string\"){throw new Error('First parameter must be a string');}\nif(storage_available){if(!window.localStorage.getItem(name)){window.localStorage.setItem(name,'{}');}\nif(!window.sessionStorage.getItem(name)){window.sessionStorage.setItem(name,'{}');}}else{if(!window.localCookieStorage.getItem(name)){window.localCookieStorage.setItem(name,'{}');}\nif(!window.sessionCookieStorage.getItem(name)){window.sessionCookieStorage.setItem(name,'{}');}}\nvar ns={localStorage:_extend({},apis.localStorage,{_ns:name}),sessionStorage:_extend({},apis.sessionStorage,{_ns:name})};if(cookies_available){if(!window.cookieStorage.getItem(name)){window.cookieStorage.setItem(name,'{}');}\nns.cookieStorage=_extend({},apis.cookieStorage,{_ns:name});}\napis.namespaceStorages[name]=ns;return ns;}\nfunction _testStorage(name){var foo='jsapi';try{if(!window[name]){return false;}\nwindow[name].setItem(foo,foo);window[name].removeItem(foo);return true;}catch(e){return false;}}\nfunction _isPlainObject(obj){var proto,Ctor;if(!obj||toString.call(obj)!==\"[object Object]\"){return false;}\nproto=getProto(obj);if(!proto){return true;}\nCtor=hasOwn.call(proto,\"constructor\")&&proto.constructor;return typeof Ctor===\"function\"&&fnToString.call(Ctor)===ObjectFunctionString;}\nfunction _isEmptyObject(obj){var name;for(name in obj){return false;}\nreturn true;}\nfunction _extend(){var i=1;var result=arguments[0];for(;i<arguments.length;i++){var attributes=arguments[i];for(var key in attributes){if(attributes.hasOwnProperty(key)){result[key]=attributes[key];}}}\nreturn result;}\nvar storage_available=_testStorage('localStorage');var cookies_available=typeof Cookies!=='undefined';var storage={_type:'',_ns:'',_callMethod:function(f,a){a=Array.prototype.slice.call(a);var p=[],a0=a[0];if(this._ns){p.push(this._ns);}\nif(typeof a0==='string'&&a0.indexOf('.')!==-1){a.shift();[].unshift.apply(a,a0.split('.'));}\n[].push.apply(p,a);return f.apply(this,p);},alwaysUseJson:false,get:function(){if(!storage_available&&!cookies_available){return null;}\nreturn this._callMethod(_get,arguments);},set:function(){var l=arguments.length,a=arguments,a0=a[0];if(l<1||!_isPlainObject(a0)&&l<2){throw new Error('Minimum 2 arguments must be given or first parameter must be an object');}\nif(!storage_available&&!cookies_available){return null;}\nif(_isPlainObject(a0)&&this._ns){for(var i in a0){if(a0.hasOwnProperty(i)){this._callMethod(_set,[i,a0[i]]);}}\nreturn a0;}else{var r=this._callMethod(_set,a);if(this._ns){return r[a0.split('.')[0]];}else{return r;}}},remove:function(){if(arguments.length<1){throw new Error('Minimum 1 argument must be given');}\nif(!storage_available&&!cookies_available){return null;}\nreturn this._callMethod(_remove,arguments);},removeAll:function(reinit_ns){if(!storage_available&&!cookies_available){return null;}\nif(this._ns){this._callMethod(_set,[{}]);return true;}else{return this._callMethod(_removeAll,[reinit_ns]);}},isEmpty:function(){if(!storage_available&&!cookies_available){return null;}\nreturn this._callMethod(_isEmpty,arguments);},isSet:function(){if(arguments.length<1){throw new Error('Minimum 1 argument must be given');}
2\nif(!storage_available&&!cookies_available){return null;}\nreturn this._callMethod(_isSet,arguments);},keys:function(){if(!storage_available&&!cookies_available){return null;}\nreturn this._callMethod(_keys,arguments);}};if(cookies_available){if(!window.name){window.name=Math.floor(Math.random()*100000000);}\nvar cookie_storage={_cookie:true,_prefix:'',_expires:null,_path:null,_domain:null,_secure:false,setItem:function(n,v){Cookies.set(this._prefix+n,v,{expires:this._expires,path:this._path,domain:this._domain,secure:this._secure});},getItem:function(n){return Cookies.get(this._prefix+n);},removeItem:function(n){return Cookies.remove(this._prefix+n,{path:this._path});},clear:function(){var cookies=Cookies.get();for(var key in cookies){if(cookies.hasOwnProperty(key)&&key!=''){if(!this._prefix&&key.indexOf(cookie_local_prefix)===-1&&key.indexOf(cookie_session_prefix)===-1||this._prefix&&key.indexOf(this._prefix)===0){Cookies.remove(key);}}}},setExpires:function(e){this._expires=e;return this;},setPath:function(p){this._path=p;return this;},setDomain:function(d){this._domain=d;return this;},setSecure:function(s){this._secure=s;return this;},setConf:function(c){if(c.path){this._path=c.path;}\nif(c.domain){this._domain=c.domain;}\nif(c.secure){this._secure=c.secure;}\nif(c.expires){this._expires=c.expires;}\nreturn this;},setDefaultConf:function(){this._path=this._domain=this._expires=null;this._secure=false;}};if(!storage_available){window.localCookieStorage=_extend({},cookie_storage,{_prefix:cookie_local_prefix,_expires:365*10,_secure:true});window.sessionCookieStorage=_extend({},cookie_storage,{_prefix:cookie_session_prefix+window.name+'_',_secure:true});}\nwindow.cookieStorage=_extend({},cookie_storage);apis.cookieStorage=_extend({},storage,{_type:'cookieStorage',setExpires:function(e){window.cookieStorage.setExpires(e);return this;},setPath:function(p){window.cookieStorage.setPath(p);return this;},setDomain:function(d){window.cookieStorage.setDomain(d);return this;},setSecure:function(s){window.cookieStorage.setSecure(s);return this;},setConf:function(c){window.cookieStorage.setConf(c);return this;},setDefaultConf:function(){window.cookieStorage.setDefaultConf();return this;}});}\napis.initNamespaceStorage=function(ns){return _createNamespace(ns);};if(storage_available){apis.localStorage=_extend({},storage,{_type:'localStorage'});apis.sessionStorage=_extend({},storage,{_type:'sessionStorage'});}else{apis.localStorage=_extend({},storage,{_type:'localCookieStorage'});apis.sessionStorage=_extend({},storage,{_type:'sessionCookieStorage'});}\napis.namespaceStorages={};apis.removeAllStorages=function(reinit_ns){apis.localStorage.removeAll(reinit_ns);apis.sessionStorage.removeAll(reinit_ns);if(apis.cookieStorage){apis.cookieStorage.removeAll(reinit_ns);}\nif(!reinit_ns){apis.namespaceStorages={};}};apis.alwaysUseJsonInStorage=function(value){storage.alwaysUseJson=value;apis.localStorage.alwaysUseJson=value;apis.sessionStorage.alwaysUseJson=value;if(apis.cookieStorage){apis.cookieStorage.alwaysUseJson=value;}};return apis;}));","js-storage/storage-wrapper.min.js":"define(['jquery','js-storage/js.storage'],function($,storage){'use strict';if(window.cookieStorage){var cookiesConfig=window.cookiesConfig||{};$.extend(window.cookieStorage,{_secure:!!cookiesConfig.secure,_samesite:cookiesConfig.samesite?cookiesConfig.samesite:'lax',setItem:function(name,value,options){var _default={expires:this._expires,path:this._path,domain:this._domain,secure:this._secure,samesite:this._samesite};$.cookie(this._prefix+name,value,$.extend(_default,options||{}));},setConf:function(c){if(c.path){this._path=c.path;}\nif(c.domain){this._domain=c.domain;}\nif(c.expires){this._expires=c.expires;}\nif(typeof c.secure!=='undefined'){this._secure=c.secure;}\nif(typeof c.samesite!=='undefined'){this._samesite=c.samesite;}\nreturn this;}});}\n$.alwaysUseJsonInStorage=$.alwaysUseJsonInStorage||storage.alwaysUseJsonInStorage;$.cookieStorage=$.cookieStorage||storage.cookieStorage;$.initNamespaceStorage=$.initNamespaceStorage||storage.initNamespaceStorage;$.localStorage=$.localStorage||storage.localStorage;$.namespaceStorages=$.namespaceStorages||storage.namespaceStorages;$.removeAllStorages=$.removeAllStorages||storage.removeAllStorages;$.sessionStorage=$.sessionStorage||storage.sessionStorage;});","knockoutjs/knockout-es5.min.js":"/*!\n * Knockout ES5 plugin - https://github.com/SteveSanderson/knockout-es5\n * Copyright (c) Steve Sanderson\n * MIT license\n */\n(function(global,undefined){'use strict';var ko;function track(obj,propertyNamesOrSettings){if(!obj||typeof obj!=='object'){throw new Error('When calling ko.track, you must pass an object as the first parameter.');}\nvar propertyNames;if(isPlainObject(propertyNamesOrSettings)){propertyNamesOrSettings.deep=propertyNamesOrSettings.deep||false;propertyNamesOrSettings.fields=propertyNamesOrSettings.fields||Object.getOwnPropertyNames(obj);propertyNamesOrSettings.lazy=propertyNamesOrSettings.lazy||false;wrap(obj,propertyNamesOrSettings.fields,propertyNamesOrSettings);}else{propertyNames=propertyNamesOrSettings||Object.getOwnPropertyNames(obj);wrap(obj,propertyNames,{});}\nreturn obj;}\nvar rFunctionName=/^function\\s*([^\\s(]+)/;function getFunctionName(ctor){if(ctor.name){return ctor.name;}\nreturn(ctor.toString().trim().match(rFunctionName)||[])[1];}\nfunction canTrack(obj){return obj&&typeof obj==='object'&&getFunctionName(obj.constructor)==='Object';}\nfunction createPropertyDescriptor(originalValue,prop,map){var isObservable=ko.isObservable(
2originalValue);var isArray=!isObservable&&Array.isArray(originalValue);var observable=isObservable?originalValue:isArray?ko.observableArray(originalValue):ko.observable(originalValue);map[prop]=function(){return observable;};if(isArray||(isObservable&&'push'in observable)){notifyWhenPresentOrFutureArrayValuesMutate(ko,observable);}\nreturn{configurable:true,enumerable:true,get:observable,set:ko.isWriteableObservable(observable)?observable:undefined};}\nfunction createLazyPropertyDescriptor(originalValue,prop,map){if(ko.isObservable(originalValue)){return createPropertyDescriptor(originalValue,prop,map);}\nvar observable;function getOrCreateObservable(value,writing){if(observable){return writing?observable(value):observable;}\nif(Array.isArray(value)){observable=ko.observableArray(value);notifyWhenPresentOrFutureArrayValuesMutate(ko,observable);return observable;}\nreturn(observable=ko.observable(value));}\nmap[prop]=function(){return getOrCreateObservable(originalValue);};return{configurable:true,enumerable:true,get:function(){return getOrCreateObservable(originalValue)();},set:function(value){getOrCreateObservable(value,true);}};}\nfunction wrap(obj,props,options){if(!props.length){return;}\nvar allObservablesForObject=getAllObservablesForObject(obj,true);var descriptors={};props.forEach(function(prop){if(prop in allObservablesForObject){return;}\nif(Object.getOwnPropertyDescriptor(obj,prop).configurable===false){return;}\nvar originalValue=obj[prop];descriptors[prop]=(options.lazy?createLazyPropertyDescriptor:createPropertyDescriptor)\n(originalValue,prop,allObservablesForObject);if(options.deep&&canTrack(originalValue)){wrap(originalValue,Object.keys(originalValue),options);}});Object.defineProperties(obj,descriptors);}\nfunction isPlainObject(obj){return!!obj&&typeof obj==='object'&&obj.constructor===Object;}\nvar objectToObservableMap;function getAllObservablesForObject(obj,createIfNotDefined){if(!objectToObservableMap){objectToObservableMap=weakMapFactory();}\nvar result=objectToObservableMap.get(obj);if(!result&&createIfNotDefined){result={};objectToObservableMap.set(obj,result);}\nreturn result;}\nfunction untrack(obj,propertyNames){if(!objectToObservableMap){return;}\nif(arguments.length===1){objectToObservableMap['delete'](obj);}else{var allObservablesForObject=getAllObservablesForObject(obj,false);if(allObservablesForObject){propertyNames.forEach(function(propertyName){delete allObservablesForObject[propertyName];});}}}\nfunction defineComputedProperty(obj,propertyName,evaluatorOrOptions){var ko=this,computedOptions={owner:obj,deferEvaluation:true};if(typeof evaluatorOrOptions==='function'){computedOptions.read=evaluatorOrOptions;}else{if('value'in evaluatorOrOptions){throw new Error('For ko.defineProperty, you must not specify a \"value\" for the property. '+'You must provide a \"get\" function.');}\nif(typeof evaluatorOrOptions.get!=='function'){throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, '+'or an options object containing a function called \"get\".');}\ncomputedOptions.read=evaluatorOrOptions.get;computedOptions.write=evaluatorOrOptions.set;}\nobj[propertyName]=ko.computed(computedOptions);track.call(ko,obj,[propertyName]);return obj;}\nfunction notifyWhenPresentOrFutureArrayValuesMutate(ko,observable){var watchingArraySubscription=null;ko.computed(function(){if(watchingArraySubscription){watchingArraySubscription.dispose();watchingArraySubscription=null;}\nvar newArrayInstance=observable();if(newArrayInstance instanceof Array){watchingArraySubscription=startWatchingArrayInstance(ko,observable,newArrayInstance);}});}\nfunction startWatchingArrayInstance(ko,observable,arrayInstance){var subscribable=getSubscribableForArray(ko,arrayInstance);return subscribable.subscribe(observable);}\nvar arraySubscribablesMap;function getSubscribableForArray(ko,arrayInstance){if(!arraySubscribablesMap){arraySubscribablesMap=weakMapFactory();}\nvar subscribable=arraySubscribablesMap.get(arrayInstance);if(!subscribable){subscribable=new ko.subscribable();arraySubscribablesMap.set(arrayInstance,subscribable);var notificationPauseSignal={};wrapStandardArrayMutators(arrayInstance,subscribable,notificationPauseSignal);addKnockoutArrayMutators(ko,arrayInstance,subscribable,notificationPauseSignal);}\nreturn subscribable;}\nfunction wrapStandardArrayMutators(arrayInstance,subscribable,notificationPauseSignal){['pop','push','reverse','shift','sort','splice','unshift'].forEach(function(fnName){var origMutator=arrayInstance[fnName];arrayInstance[fnName]=function(){var result=origMutator.apply(this,arguments);if(notificationPauseSignal.pause!==true){subscribable.notifySubscribers(this);}\nreturn result;};});}\nfunction addKnockoutArrayMutators(ko,arrayInstance,subscribable,notificationPauseSignal){['remove','removeAll','destroy','destroyAll','replace'].forEach(function(fnName){Object.defineProperty(arrayInstance,fnName,{enumerable:false,value:function(){var result;notificationPauseSignal.pause=true;try{result=ko.observableArray.fn[fnName].apply(ko.observableArray(arrayInstance),arguments);}\nfinally{notificationPauseSignal.pause=false;}\nsubscribable.notifySubscribers(arrayInstance);return result;}});});}
2\nfunction getObservable(obj,propertyName){if(!obj||typeof obj!=='object'){return null;}\nvar allObservablesForObject=getAllObservablesForObject(obj,false);if(allObservablesForObject&&propertyName in allObservablesForObject){return allObservablesForObject[propertyName]();}\nreturn null;}\nfunction isTracked(obj,propertyName){if(!obj||typeof obj!=='object'){return false;}\nvar allObservablesForObject=getAllObservablesForObject(obj,false);return!!allObservablesForObject&&propertyName in allObservablesForObject;}\nfunction valueHasMutated(obj,propertyName){var observable=getObservable(obj,propertyName);if(observable){observable.valueHasMutated();}}\nvar weakMapFactory;function attachToKo(ko){ko.track=track;ko.untrack=untrack;ko.getObservable=getObservable;ko.valueHasMutated=valueHasMutated;ko.defineProperty=defineComputedProperty;ko.es5={getAllObservablesForObject:getAllObservablesForObject,notifyWhenPresentOrFutureArrayValuesMutate:notifyWhenPresentOrFutureArrayValuesMutate,isTracked:isTracked};}\nfunction prepareExports(){if(typeof exports==='object'&&typeof module==='object'){ko=require('knockout');var WM=require('../lib/weakmap');attachToKo(ko);weakMapFactory=function(){return new WM();};module.exports=ko;}else if(typeof define==='function'&&define.amd){define(['knockout'],function(koModule){ko=koModule;attachToKo(koModule);weakMapFactory=function(){return new global.WeakMap();};return koModule;});}else if('ko'in global){ko=global.ko;attachToKo(global.ko);weakMapFactory=function(){return new global.WeakMap();};}}\nprepareExports();})(this);","knockoutjs/knockout-fast-foreach.min.js":"/*!\n Knockout Fast Foreach v0.4.1 (2015-07-17T14:06:15.974Z)\n By: Brian M Hunt (C) 2015\n License: MIT\n\n Adds `fastForEach` to `ko.bindingHandlers`.\n*/\n(function(root,factory){if(typeof define==='function'&&define.amd){define(['knockout'],factory);}else if(typeof exports==='object'){module.exports=factory(require('knockout'));}else{root.KnockoutFastForeach=factory(root.ko);}}(this,function(ko){\"use strict\";function isPlainObject(o){return!!o&&typeof o==='object'&&o.constructor===Object;}\nvar commentNodesHaveTextProperty=document&&document.createComment(\"test\").text===\"<!--test-->\";var startCommentRegex=commentNodesHaveTextProperty?/^<!--\\s*ko(?:\\s+([\\s\\S]+))?\\s*-->$/:/^\\s*ko(?:\\s+([\\s\\S]+))?\\s*$/;var supportsDocumentFragment=document&&typeof document.createDocumentFragment===\"function\";function isVirtualNode(node){return(node.nodeType===8)&&startCommentRegex.test(commentNodesHaveTextProperty?node.text:node.nodeValue);}\nfunction makeTemplateNode(sourceNode){var container=document.createElement(\"div\");var parentNode;if(sourceNode.content){parentNode=sourceNode.content;}else if(sourceNode.tagName==='SCRIPT'){parentNode=document.createElement(\"div\");parentNode.innerHTML=sourceNode.text;}else{parentNode=sourceNode;}\nko.utils.arrayForEach(ko.virtualElements.childNodes(parentNode),function(child){if(child){container.insertBefore(child.cloneNode(true),null);}});return container;}\nfunction insertAllAfter(containerNode,nodeOrNodeArrayToInsert,insertAfterNode){var frag,len,i;if(typeof nodeOrNodeArrayToInsert.nodeType!==\"undefined\"&&typeof nodeOrNodeArrayToInsert.length===\"undefined\"){throw new Error(\"Expected a single node or a node array\");}\nif(typeof nodeOrNodeArrayToInsert.nodeType!==\"undefined\"){ko.virtualElements.insertAfter(containerNode,nodeOrNodeArrayToInsert,insertAfterNode);return;}\nif(nodeOrNodeArrayToInsert.length===1){ko.virtualElements.insertAfter(containerNode,nodeOrNodeArrayToInsert[0],insertAfterNode);return;}\nif(supportsDocumentFragment){frag=document.createDocumentFragment();for(i=0,len=nodeOrNodeArrayToInsert.length;i!==len;++i){frag.appendChild(nodeOrNodeArrayToInsert[i]);}\nko.virtualElements.insertAfter(containerNode,frag,insertAfterNode);}else{for(i=nodeOrNodeArrayToInsert.length-1;i>=0;--i){var child=nodeOrNodeArrayToInsert[i];if(!child){return;}\nko.virtualElements.insertAfter(containerNode,child,insertAfterNode);}}}\nfunction valueToChangeAddItem(value,index){return{status:'added',value:value,index:index};}\nfunction isAdditionAdjacentToLast(changeIndex,arrayChanges){return changeIndex>0&&changeIndex<arrayChanges.length&&arrayChanges[changeIndex].status===\"added\"&&arrayChanges[changeIndex-1].status===\"added\"&&arrayChanges[changeIndex-1].index===arrayChanges[changeIndex].index-1;}\nfunction FastForEach(spec){this.element=spec.element;this.container=isVirtualNode(this.element)?this.element.parentNode:this.element;this.$context=spec.$context;this.data=spec.data;this.as=spec.as;this.noContext=spec.noContext;this.templateNode=makeTemplateNode(spec.name?document.getElementById(spec.name).cloneNode(true):spec.element);this.afterQueueFlush=spec.afterQueueFlush;this.beforeQueueFlush=spec.beforeQueueFlush;this.changeQueue=[];this.lastNodesList=[];this.indexesToDelete=[];this.rendering_queued=false;ko.virtualElements.emptyNode(this.element);var primeData=ko.unwrap(this.data);if(primeData.map){this.onArrayChange(primeData.map(valueToChangeAddItem));}
2\nif(ko.isObservable(this.data)){if(!this.data.indexOf){this.data=this.data.extend({trackArrayChanges:true});}\nthis.changeSubs=this.data.subscribe(this.onArrayChange,this,'arrayChange');}}\nFastForEach.animateFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(cb){return window.setTimeout(cb,1000 / 60);};FastForEach.prototype.dispose=function(){if(this.changeSubs){this.changeSubs.dispose();}};FastForEach.prototype.onArrayChange=function(changeSet){var self=this;var changeMap={added:[],deleted:[]};for(var i=0,len=changeSet.length;i<len;i++){if(isAdditionAdjacentToLast(i,changeSet)){var batchValues=changeMap.added[changeMap.added.length-1].values;if(!batchValues){var lastAddition=changeMap.added.pop();var batchAddition={isBatch:true,status:'added',index:lastAddition.index,values:[lastAddition.value]};batchValues=batchAddition.values;changeMap.added.push(batchAddition);}\nbatchValues.push(changeSet[i].value);}else{changeMap[changeSet[i].status].push(changeSet[i]);}}\nif(changeMap.deleted.length>0){this.changeQueue.push.apply(this.changeQueue,changeMap.deleted);this.changeQueue.push({status:'clearDeletedIndexes'});}\nthis.changeQueue.push.apply(this.changeQueue,changeMap.added);if(this.changeQueue.length>0&&!this.rendering_queued){this.rendering_queued=true;FastForEach.animateFrame.call(window,function(){self.processQueue();});}};FastForEach.prototype.processQueue=function(){var self=this;if(typeof this.beforeQueueFlush==='function'){this.beforeQueueFlush(this.changeQueue);}\nko.utils.arrayForEach(this.changeQueue,function(changeItem){self[changeItem.status](changeItem);});this.rendering_queued=false;if(typeof this.afterQueueFlush==='function'){this.afterQueueFlush(this.changeQueue);}\nthis.changeQueue=[];};FastForEach.prototype.added=function(changeItem){var index=changeItem.index;var valuesToAdd=changeItem.isBatch?changeItem.values:[changeItem.value];var referenceElement=this.lastNodesList[index-1]||null;var allChildNodes=[];for(var i=0,len=valuesToAdd.length;i<len;++i){var templateClone=this.templateNode.cloneNode(true);var childContext;if(this.noContext){childContext=this.$context.extend({'$item':valuesToAdd[i]});}else{childContext=this.$context.createChildContext(valuesToAdd[i],this.as||null);}\nko.applyBindingsToDescendants(childContext,templateClone);var childNodes=ko.virtualElements.childNodes(templateClone);allChildNodes.push.apply(allChildNodes,Array.prototype.slice.call(childNodes));this.lastNodesList.splice(index+i,0,childNodes[childNodes.length-1]);}\ninsertAllAfter(this.element,allChildNodes,referenceElement);};FastForEach.prototype.deleted=function(changeItem){var index=changeItem.index;var ptr=this.lastNodesList[index],lastNode=this.lastNodesList[index-1]||this.element;do{ptr=ptr.previousSibling;ko.removeNode((ptr&&ptr.nextSibling)||ko.virtualElements.firstChild(this.element));}while(ptr&&ptr!==lastNode);this.lastNodesList[index]=this.lastNodesList[index-1];this.indexesToDelete.push(index);};FastForEach.prototype.clearDeletedIndexes=function(){for(var i=this.indexesToDelete.length-1;i>=0;--i){this.lastNodesList.splice(this.indexesToDelete[i],1);}\nthis.indexesToDelete=[];};ko.bindingHandlers.fastForEach={init:function init(element,valueAccessor,bindings,vm,context){var value=valueAccessor(),ffe;if(isPlainObject(value)){value.element=value.element||element;value.$context=context;ffe=new FastForEach(value);}else{ffe=new FastForEach({element:element,data:ko.unwrap(context.$rawData)===value?context.$rawData:value,$context:context});}\nko.utils.domNodeDisposal.addDisposeCallback(element,function(){ffe.dispose();});return{controlsDescendantBindings:true};},FastForEach:FastForEach};ko.virtualElements.allowedBindings.fastForEach=true;}));","knockoutjs/knockout-repeat.min.js":"(function(factory){if(typeof define==='function'&&define.amd){define(['knockout'],factory);}else if(typeof exports==='object'){factory(require('knockout'));}else{factory(window.ko);}})(function(ko){if(!ko.virtualElements)\nthrow Error('Repeat requires at least Knockout 2.1');var ko_bindingFlags=ko.bindingFlags||{};var ko_unwrap=ko.utils.unwrapObservable;var koProtoName='__ko_proto__';if(ko.version>=\"3.0.0\"){var provider=ko.bindingProvider.instance,previousPreprocessFn=provider.preprocessNode;provider.preprocessNode=function(node){var newNodes,nodeBinding;if(!previousPreprocessFn||!(newNodes=previousPreprocessFn.call(this,node))){if(node.nodeType===1&&(nodeBinding=node.getAttribute('data-bind'))){if
2(/^\\s*repeat\\s*:/.test(nodeBinding)){var leadingComment=node.ownerDocument.createComment('ko '+nodeBinding),trailingComment=node.ownerDocument.createComment('/ko');node.parentNode.insertBefore(leadingComment,node);node.parentNode.insertBefore(trailingComment,node.nextSibling);node.removeAttribute('data-bind');newNodes=[leadingComment,node,trailingComment];}}}\nreturn newNodes;};}\nko.virtualElements.allowedBindings.repeat=true;ko.bindingHandlers.repeat={flags:ko_bindingFlags.contentBind|ko_bindingFlags.canUseVirtual,init:function(element,valueAccessor,allBindingsAccessor,xxx,bindingContext){var repeatParam=ko_unwrap(valueAccessor());if(repeatParam&&typeof repeatParam=='object'&&!('length'in repeatParam)){var repeatIndex=repeatParam.index,repeatData=repeatParam.item,repeatStep=repeatParam.step,repeatReversed=repeatParam.reverse,repeatBind=repeatParam.bind,repeatInit=repeatParam.init,repeatUpdate=repeatParam.update;}\nrepeatIndex=repeatIndex||'$index';repeatData=repeatData||ko.bindingHandlers.repeat.itemName||'$item';repeatStep=repeatStep||1;repeatReversed=repeatReversed||false;var parent=element.parentNode,placeholder;if(element.nodeType==8){var childNodes=ko.utils.arrayFilter(ko.virtualElements.childNodes(element),function(node){return node.nodeType==1;});if(childNodes.length!==1){throw Error(\"Repeat binding requires a single element to repeat\");}\nko.virtualElements.emptyNode(element);placeholder=repeatReversed?element:element.nextSibling;element=childNodes[0];}else{var origBindString=element.getAttribute('data-bind');ko.cleanNode(element);element.removeAttribute('data-bind');placeholder=element.ownerDocument.createComment('ko_repeatplaceholder '+origBindString);parent.replaceChild(placeholder,element);}\nif(!repeatBind){repeatBind=element.getAttribute('data-repeat-bind');if(repeatBind){element.removeAttribute('data-repeat-bind');}}\nvar cleanNode=element.cloneNode(true);if(typeof repeatBind==\"string\"){cleanNode.setAttribute('data-bind',repeatBind);repeatBind=null;}\nvar lastRepeatCount=0,notificationObservable=ko.observable(),repeatArray,arrayObservable;if(repeatInit){repeatInit(parent);}\nvar subscribable=ko.computed(function(){function makeArrayItemAccessor(index){var f=function(newValue){var item=repeatArray[index];if(!arguments.length){notificationObservable();return ko_unwrap(item);}\nif(ko.isObservable(item)){item(newValue);}else if(arrayObservable&&arrayObservable.splice){arrayObservable.splice(index,1,newValue);}else{repeatArray[index]=newValue;}\nreturn this;};f[koProtoName]=ko.observable;return f;}\nfunction makeBinding(item,index,context){return repeatArray?function(){return repeatBind.call(bindingContext.$data,item,index,context);}:function(){return repeatBind.call(bindingContext.$data,index,context);}}\nvar paramObservable=valueAccessor(),repeatParam=ko_unwrap(paramObservable),repeatCount=0;if(repeatParam&&typeof repeatParam=='object'){if('length'in repeatParam){repeatArray=repeatParam;repeatCount=repeatArray.length;}else{if('foreach'in repeatParam){repeatArray=ko_unwrap(paramObservable=repeatParam.foreach);if(repeatArray&&typeof repeatArray=='object'&&'length'in repeatArray){repeatCount=repeatArray.length||0;}else{repeatCount=repeatArray||0;repeatArray=null;}}\nif('count'in repeatParam)\nrepeatCount=ko_unwrap(repeatParam.count)||repeatCount;if('limit'in repeatParam)\nrepeatCount=Math.min(repeatCount,ko_unwrap(repeatParam.limit))||repeatCount;}\narrayObservable=repeatArray&&ko.isObservable(paramObservable)?paramObservable:null;}else{repeatCount=repeatParam||0;}\nfor(;lastRepeatCount>repeatCount;lastRepeatCount-=repeatStep){ko.removeNode(repeatReversed?placeholder.nextSibling:placeholder.previousSibling);}\nnotificationObservable.notifySubscribers();for(;lastRepeatCount<repeatCount;lastRepeatCount+=repeatStep){var newNode=cleanNode.cloneNode(true);parent.insertBefore(newNode,repeatReversed?placeholder.nextSibling:placeholder);newNode.setAttribute('data-repeat-index',lastRepeatCount);if(repeatArray&&repeatData=='$data'){var newContext=bindingContext.createChildContext(makeArrayItemAccessor(lastRepeatCount));}else{var newContext=bindingContext.extend();if(repeatArray)\nnewContext[repeatData]=makeArrayItemAccessor(lastRepeatCount);}\nnewContext[repeatIndex]=lastRepeatCount;
2if(repeatBind){var result=ko.applyBindingsToNode(newNode,makeBinding(newContext[repeatData],lastRepeatCount,newContext),newContext,true),shouldBindDescendants=result&&result.shouldBindDescendants;}\nif(!repeatBind||(result&&shouldBindDescendants!==false)){ko.applyBindings(newContext,newNode);}}\nif(repeatUpdate){repeatUpdate(parent);}},null,{disposeWhenNodeIsRemoved:placeholder});return{controlsDescendantBindings:true,subscribable:subscribable};}};});","knockoutjs/knockout.min.js":"/*!\n * Knockout JavaScript library v3.5.1\n * (c) The Knockout.js team - http://knockoutjs.com/\n * License: MIT (http://www.opensource.org/licenses/mit-license.php)\n */\n(function(){var DEBUG=true;(function(undefined){var window=this||(0,eval)('this'),document=window['document'],navigator=window['navigator'],jQueryInstance=window[\"jQuery\"],JSON=window[\"JSON\"];if(!jQueryInstance&&typeof jQuery!==\"undefined\"){jQueryInstance=jQuery;}\n(function(factory){if(typeof define==='function'&&define['amd']){define(['exports','require'],factory);}else if(typeof exports==='object'&&typeof module==='object'){factory(module['exports']||exports);}else{factory(window['ko']={});}}(function(koExports,amdRequire){var ko=typeof koExports!=='undefined'?koExports:{};ko.exportSymbol=function(koPath,object){var tokens=koPath.split(\".\");var target=ko;for(var i=0;i<tokens.length-1;i++)\ntarget=target[tokens[i]];target[tokens[tokens.length-1]]=object;};ko.exportProperty=function(owner,publicName,object){owner[publicName]=object;};ko.version=\"3.5.1\";ko.exportSymbol('version',ko.version);ko.options={'deferUpdates':false,'useOnlyNativeEvents':false,'foreachHidesDestroyed':false};ko.utils=(function(){var hasOwnProperty=Object.prototype.hasOwnProperty;function objectForEach(obj,action){for(var prop in obj){if(hasOwnProperty.call(obj,prop)){action(prop,obj[prop]);}}}\nfunction extend(target,source){if(source){for(var prop in source){if(hasOwnProperty.call(source,prop)){target[prop]=source[prop];}}}\nreturn target;}\nfunction setPrototypeOf(obj,proto){obj.__proto__=proto;return obj;}\nvar canSetPrototype=({__proto__:[]}instanceof Array);var canUseSymbols=!DEBUG&&typeof Symbol==='function';var knownEvents={},knownEventTypesByEventName={};var keyEventTypeName=(navigator&&/Firefox\\/2/i.test(navigator.userAgent))?'KeyboardEvent':'UIEvents';knownEvents[keyEventTypeName]=['keyup','keydown','keypress'];knownEvents['MouseEvents']=['click','dblclick','mousedown','mouseup','mousemove','mouseover','mouseout','mouseenter','mouseleave'];objectForEach(knownEvents,function(eventType,knownEventsForType){if(knownEventsForType.length){for(var i=0,j=knownEventsForType.length;i<j;i++)\nknownEventTypesByEventName[knownEventsForType[i]]=eventType;}});var eventsThatMustBeRegisteredUsingAttachEvent={'propertychange':true};var ieVersion=document&&(function(){var version=3,div=document.createElement('div'),iElems=div.getElementsByTagName('i');while(div.innerHTML='<!--[if gt IE '+(++version)+']><i></i><![endif]-->',iElems[0]){}\nreturn version>4?version:undefined;}());var isIe6=ieVersion===6,isIe7=ieVersion===7;function isClickOnCheckableElement(element,eventType){if((ko.utils.tagNameLower(element)!==\"input\")||!element.type)return false;if(eventType.toLowerCase()!=\"click\")return false;var inputType=element.type;return(inputType==\"checkbox\")||(inputType==\"radio\");}\nvar cssClassNameRegex=/\\S+/g;var jQueryEventAttachName;function toggleDomNodeCssClass(node,classNames,shouldHaveClass){var addOrRemoveFn;if(classNames){if(typeof node.classList==='object'){addOrRemoveFn=node.classList[shouldHaveClass?'add':'remove'];ko.utils.arrayForEach(classNames.match(cssClassNameRegex),function(className){addOrRemoveFn.call(node.classList,className);});}else if(typeof node.className['baseVal']==='string'){toggleObjectClassPropertyString(node.className,'baseVal',classNames,shouldHaveClass);}else{toggleObjectClassPropertyString(node,'className',classNames,shouldHaveClass);}}}\nfunction toggleObjectClassPropertyString(obj,prop,classNames,shouldHaveClass){var currentClassNames=obj[prop].match(cssClassNameRegex)||[];ko.utils.arrayForEach(classNames.match(cssClassNameRegex),function(className){ko.utils.addOrRemoveItem(currentClassNames,className,shouldHaveClass);});obj[prop]=currentClassNames.join(\" \");}\nreturn{fieldsIncludedWithJsonPost:['authenticity_token',/^__RequestVerificationToken(_.*)?$/],arrayForEach:function(array,action,actionOwner){for(var i=0,j=array.length;i<j;i++){action.call(actionOwner,array[i],i,array);}},arrayIndexOf:typeof Array.prototype.indexOf==\"function\"?function(array,item){return Array.prototype.indexOf.call(array,item);}:function(array,item){for(var i=0,j=array.length;i<j;i++){if(array[i]===item)\nreturn i;}\nreturn-1;},arrayFirst:function(array,predicate,predicateOwner){for(var i=0,j=array.length;i<j;i++){if(predicate.call(predicateOwner,array[i],i,array))\nreturn array[i];}\nreturn undefined;},arrayRemoveItem:function(array,itemToRemove){var index=ko.utils.arrayIndexOf(array,itemToRemove);if(index>0){array.splice(index,1);}\nelse if(index===0){array.shift();}},arrayGetDistinctValues:function(array){var result=[];if(array){ko.utils.arrayForEach(array,function(item){if(ko.utils.arrayIndexOf(result,item)<0)\nresult.push(item);});}\nreturn result;},arrayMap:function(array,mapping,mappingOwner){var result=[];if(array){for(var i=0,j=array.length;i<j;i++)\nresult.push(mapping.call(mappingOwner,array[i],i));}\nreturn result;},arrayFilter:function(array,predicate,predicateOwner){var result=[];if(array){for(var i=0,j=array.length;i<j;i++)\nif(predicate.call(predicateOwner,array[i],i))\nresult.push(array[i]);}\nreturn result;},arrayPushAll:function(array,valuesToPush){if(valuesToPush instanceof Array)\narray.push.apply(array,valuesToPush);else\nfor(var i=0,j=valuesToPush.length;i<j;i++)\narray.push(valuesToPush[i]);return array;},addOrRemoveItem:function(array,value,included){var existingEntryIndex=ko.utils.arrayIndexOf(ko.utils.peekObservable(array),value);if(existingEntryIndex<0){if(included)\narray.push(value);}else{if(!included)\narray.splice(existingEntryIndex,1);}},canSetPrototype:canSetPrototype,extend:extend,setPrototypeOf:setPrototypeOf,setPrototypeOfOrExtend:canSetPrototype?setPrototypeOf:extend,objectForEach:objectForEach,objectMap:function(source,mapping,mappingOwner){if(!source)\nreturn source;var target={};for(var prop in source){if(hasOwnProperty.call(source,prop)){target[prop]=mapping.call(mappingOwner,source[prop],prop,source);}}\nreturn target;},emptyDomNode:function(domNode){while(domNode.firstChild){ko.removeNode(domNode.firstChild);}},moveCleanedNodesToContainerElement:function(nodes){var nodesArray=ko.utils.makeArray(nodes);var templateDocument=(nodesArray[0]&&nodesArray[0].ownerDocument)||document;var container=templateDocument.createElement('div');for(var i=0,j=nodesArray.length;i<j;i++){container.appendChild(ko.cleanNode(nodesArray[i]));}\nreturn container;},cloneNodes:function(nodesArray,shouldCleanNodes){for(var i=0,j=nodesArray.length,newNodesArray=[];i<j;i++){var clonedNode=nodesArray[i].cloneNode(true);newNodesArray.push(shouldCleanNodes?ko.cleanNode(clonedNode):clonedNode);}\nreturn newNodesArray;}
vendor: 10,880 bytes, line 2
2,setDomNodeChildren:function(domNode,childNodes){ko.utils.emptyDomNode(domNode);if(childNodes){for(var i=0,j=childNodes.length;i<j;i++)\ndomNode.appendChild(childNodes[i]);}},replaceDomNodes:function(nodeToReplaceOrNodeArray,newNodesArray){var nodesToReplaceArray=nodeToReplaceOrNodeArray.nodeType?[nodeToReplaceOrNodeArray]:nodeToReplaceOrNodeArray;if(nodesToReplaceArray.length>0){var insertionPoint=nodesToReplaceArray[0];var parent=insertionPoint.parentNode;for(var i=0,j=newNodesArray.length;i<j;i++)\nparent.insertBefore(newNodesArray[i],insertionPoint);for(var i=0,j=nodesToReplaceArray.length;i<j;i++){ko.removeNode(nodesToReplaceArray[i]);}}},fixUpContinuousNodeArray:function(continuousNodeArray,parentNode){if(continuousNodeArray.length){parentNode=(parentNode.nodeType===8&&parentNode.parentNode)||parentNode;while(continuousNodeArray.length&&continuousNodeArray[0].parentNode!==parentNode)\ncontinuousNodeArray.splice(0,1);while(continuousNodeArray.length>1&&continuousNodeArray[continuousNodeArray.length-1].parentNode!==parentNode)\ncontinuousNodeArray.length--;if(continuousNodeArray.length>1){var current=continuousNodeArray[0],last=continuousNodeArray[continuousNodeArray.length-1];continuousNodeArray.length=0;while(current!==last){continuousNodeArray.push(current);current=current.nextSibling;}\ncontinuousNodeArray.push(last);}}\nreturn continuousNodeArray;},setOptionNodeSelectionState:function(optionNode,isSelected){if(ieVersion<7)\noptionNode.setAttribute(\"selected\",isSelected);else\noptionNode.selected=isSelected;},stringTrim:function(string){return string===null||string===undefined?'':string.trim?string.trim():string.toString().replace(/^[\\s\\xa0]+|[\\s\\xa0]+$/g,'');},stringStartsWith:function(string,startsWith){string=string||\"\";if(startsWith.length>string.length)\nreturn false;return string.substring(0,startsWith.length)===startsWith;},domNodeIsContainedBy:function(node,containedByNode){if(node===containedByNode)\nreturn true;if(node.nodeType===11)\nreturn false;if(containedByNode.contains)\nreturn containedByNode.contains(node.nodeType!==1?node.parentNode:node);if(containedByNode.compareDocumentPosition)\nreturn(containedByNode.compareDocumentPosition(node)&16)==16;while(node&&node!=containedByNode){node=node.parentNode;}\nreturn!!node;},domNodeIsAttachedToDocument:function(node){return ko.utils.domNodeIsContainedBy(node,node.ownerDocument.documentElement);},anyDomNodeIsAttachedToDocument:function(nodes){return!!ko.utils.arrayFirst(nodes,ko.utils.domNodeIsAttachedToDocument);},tagNameLower:function(element){return element&&element.tagName&&element.tagName.toLowerCase();},catchFunctionErrors:function(delegate){return ko['onError']?function(){try{return delegate.apply(this,arguments);}catch(e){ko['onError']&&ko['onError'](e);throw e;}}:delegate;},setTimeout:function(handler,timeout){return setTimeout(ko.utils.catchFunctionErrors(handler),timeout);},deferError:function(error){setTimeout(function(){ko['onError']&&ko['onError'](error);throw error;},0);},registerEventHandler:function(element,eventType,handler){var wrappedHandler=ko.utils.catchFunctionErrors(handler);var mustUseAttachEvent=eventsThatMustBeRegisteredUsingAttachEvent[eventType];if(!ko.options['useOnlyNativeEvents']&&!mustUseAttachEvent&&jQueryInstance){if(!jQueryEventAttachName){jQueryEventAttachName=(typeof jQueryInstance(element)['on']=='function')?'on':'bind';}\njQueryInstance(element)[jQueryEventAttachName](eventType,wrappedHandler);}else if(!mustUseAttachEvent&&typeof element.addEventListener==\"function\")\nelement.addEventListener(eventType,wrappedHandler,false);else if(typeof element.attachEvent!=\"undefined\"){var attachEventHandler=function(event){wrappedHandler.call(element,event);},attachEventName=\"on\"+eventType;element.attachEvent(attachEventName,attachEventHandler);ko.utils.domNodeDisposal.addDisposeCallback(element,function(){element.detachEvent(attachEventName,attachEventHandler);});}else\nthrow new Error(\"Browser doesn't support addEventListener or attachEvent\");},triggerEvent:function(element,eventType){if(!(element&&element.nodeType))\nthrow new Error(\"element must be a DOM node when calling triggerEvent\");var useClickWorkaround=isClickOnCheckableElement(element,eventType);if(!ko.options['useOnlyNativeEvents']&&jQueryInstance&&!useClickWorkaround){jQueryInstance(element)['trigger'](eventType);}else if(typeof document.createEvent==\"function\"){if(typeof element.dispatchEvent==\"function\"){var eventCategory=knownEventTypesByEventName[eventType]||\"HTMLEvents\";var event=document.createEvent(eventCategory);event.initEvent(eventType,true,true,window,0,0,0,0,0,false,false,false,false,0,element);element.dispatchEvent(event);}\nelse\nthrow new Error(\"The supplied element doesn't support dispatchEvent\");}else if(useClickWorkaround&&element.click){element.click();}else if(typeof element.fireEvent!=\"undefined\"){element.fireEvent(\"on\"+eventType);}else{throw new Error(\"Browser doesn't support triggering events\");}},unwrapObservable:function(value){return ko.isObservable(value)?value():value;},peekObservable:function(value){return ko.isObservable(value)?value.peek():value;},toggleDomNodeCssClass:toggleDomNodeCssClass,setTextContent:function(element,textContent){var value=ko.utils.unwrapObservable(textContent);if((value===null)||(value===undefined))\nvalue=\"\";var innerTextNode=ko.virtualElements.firstChild(element);if(!innerTextNode||innerTextNode.nodeType!=3||ko.virtualElements.nextSibling(innerTextNode)){ko.virtualElements.setDomNodeChildren(element,[element.ownerDocument.createTextNode(value)]);}else{innerTextNode.data=value;}\nko.utils.forceRefresh(element);},setElementName:function(element,name){element.name=name;if(ieVersion<=7){try{var escapedName=element.name.replace(/[&<>'\"]/g,function(r){return\"&#\"+r.charCodeAt(0)+\";\";});element.mergeAttributes(document.createElement(\"<input name='\"+escapedName+\"'/>\"),false);}\ncatch(e){}}},forceRefresh:function(node){if(ieVersion>=9){var elem=node.nodeType==1?node:node.parentNode;if(elem.style)\nelem.style.zoom=elem.style.zoom;}},ensureSelectElementIsRenderedCorrectly:function(selectElement){if(ieVersion){var originalWidth=selectElement.style.width;selectElement.style.width=0;selectElement.style.width=originalWidth;}},range:function(min,max){min=ko.utils.unwrapObservable(min);max=ko.utils.unwrapObservable(max);var result=[];for(var i=min;i<=max;i++)\nresult.push(i);return result;},makeArray:function(arrayLikeObject){var result=[];for(var i=0,j=arrayLikeObject.length;i<j;i++){result.push(arrayLikeObject[i]);};return result;},createSymbolOrString:function(identifier){return canUseSymbols?Symbol(identifier):identifier;},isIe6:isIe6,isIe7:isIe7,ieVersion:ieVersion,getFormFields:function(form,fieldName){var fields=ko.utils.makeArray(form.getElementsByTagName(\"input\")).concat(ko.utils.makeArray(form.getElementsByTagName(\"textarea\")));var isMatchingField=(typeof fieldName=='string')?function(field){return field.name===fieldName}:function(field){return fieldName.test(field.name)};var matches=[];for(var i=fields.length-1;i>=0;i--){if(isMatchingField(fields[i]))\nmatches.push(fields[i]);};return matches;},parseJson:function(jsonString){if(typeof jsonString==\"string\"){jsonString=ko.utils.stringTrim(jsonString);if(jsonString){if(JSON&&JSON.parse)\nreturn JSON.parse(jsonString);return(new Function(\"return \"+jsonString))();}}\nreturn null;},stringifyJson:function(data,replacer,space){if(!JSON||!JSON.stringify)\nthrow new Error(\"Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js\");return JSON.stringify(ko.utils.unwrapObservable(data),replacer,space);},postJson:function(urlOrForm,data,options){options=options||{};var params=options['params']||{};var includeFields=options['includeFields']||this.fieldsIncludedWithJsonPost;var url=urlOrForm;if((typeof urlOrForm=='object')&&(ko.utils.tagNameLower(urlOrForm)===\"form\")){var originalForm=urlOrForm;url=originalForm.action;for(var i=includeFields.length-1;i>=0;i--){var fields=ko.utils.getFormFields(originalForm,includeFields[i]);for(var j=fields.length-1;j>=0;j--)\nparams[fields[j].name]=fields[j].value;}}\ndata=ko.utils.unwrapObservable(data);var form=document.createElement(\"form\");form.style.display=\"none\";form.action=url;form.method=\"post\";for(var key in data){var input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=ko.utils.stringifyJson(ko.utils.unwrapObservable(data[key]));form.appendChild(input);}\nobjectForEach(params,function(key,value){var input=document.createElement(\"input\");input.type=\"hidden\";input.name=key;input.value=value;form.appendChild(input);});document.body.appendChild(form);options['submitter']?options['submitter'](form):form.submit();setTimeout(function(){form.parentNode.removeChild(form);},0);}}}());ko.exportSymbol('utils',ko.utils);ko.exportSymbol('utils.arrayForEach',ko.utils.arrayForEach);ko.exportSymbol('utils.arrayFirst',ko.utils.arrayFirst);ko.exportSymbol('utils.arrayFilter',ko.utils.arrayFilter);ko.exportSymbol('utils.arrayGetDistinctValues',ko.utils.arrayGetDistinctValues);ko.exportSymbol('utils.arrayIndexOf',ko.utils.arrayIndexOf);ko.exportSymbol('utils.arrayMap',ko.utils.arrayMap);ko.exportSymbol('utils.arrayPushAll',ko.utils.arrayPushAll);ko.exportSymbol('utils.arrayRemoveItem',ko.utils.arrayRemoveItem);ko.exportSymbol('utils.cloneNodes',ko.utils.cloneNodes);ko.exportSymbol('utils.createSymbolOrString',ko.utils.createSymbolOrString);ko.exportSymbol('utils.extend',ko.utils.extend);ko.exportSymbol('utils.fieldsIncludedWithJsonPost',ko.utils.fieldsIncludedWithJsonPost);ko.exportSymbol('utils.getFormFields',ko.utils.getFormFields);ko.exportSymbol('utils.objectMap',ko.utils.objectMap);ko.exportSymbol('utils.peekObservable',ko.utils.peekObservable);ko.exportSymbol('utils.postJson',ko.utils.postJson);ko.exportSymbol('utils.parseJson',ko.utils.parseJson);ko.exportSymbol('utils.registerEventHandler',ko.utils.registerEventHandler);ko.exportSymbol('utils.stringifyJson',ko.utils.stringifyJson);ko.exportSymbol('utils.range',ko.utils.range);ko.exportSymbol('utils.toggleDomNodeCssClass',ko.utils.toggleDomNodeCssClass);ko.exportSymbol('utils.triggerEvent',ko.utils.triggerEvent);ko.exportSymbol('utils.unwrapObservable',ko.utils.unwrapObservable);ko.exportSymbol('utils.objectForEach',ko.utils.objectForEach);ko.exportSymbol('utils.addOrRemoveItem',ko.utils.addOrRemoveItem);ko.exportSymbol('utils.setTextContent',ko.utils.setTextContent);ko.exportSymbol('unwrap',ko.utils.unwrapObservable);if(!Function.prototype['bind']){Function.prototype['bind']=function(object){var originalFunction=this;if(arguments.length===1){return function(){return originalFunction.apply(object,arguments);};}
2else{var partialArgs=Array.prototype.slice.call(arguments,1);return function(){var args=partialArgs.slice(0);args.push.apply(args,arguments);return originalFunction.apply(object,args);};}};}\nko.utils.domData=new(function(){var uniqueId=0;var dataStoreKeyExpandoPropertyName=\"__ko__\"+(new Date).getTime();var dataStore={};var getDataForNode,clear;if(!ko.utils.ieVersion){getDataForNode=function(node,createIfNotFound){var dataForNode=node[dataStoreKeyExpandoPropertyName];if(!dataForNode&&createIfNotFound){dataForNode=node[dataStoreKeyExpandoPropertyName]={};}\nreturn dataForNode;};clear=function(node){if(node[dataStoreKeyExpandoPropertyName]){delete node[dataStoreKeyExpandoPropertyName];return true;}\nreturn false;};}else{getDataForNode=function(node,createIfNotFound){var dataStoreKey=node[dataStoreKeyExpandoPropertyName];var hasExistingDataStore=dataStoreKey&&(dataStoreKey!==\"null\")&&dataStore[dataStoreKey];if(!hasExistingDataStore){if(!createIfNotFound)\nreturn undefined;dataStoreKey=node[dataStoreKeyExpandoPropertyName]=\"ko\"+uniqueId++;dataStore[dataStoreKey]={};}\nreturn dataStore[dataStoreKey];};clear=function(node){var dataStoreKey=node[dataStoreKeyExpandoPropertyName];if(dataStoreKey){delete dataStore[dataStoreKey];node[dataStoreKeyExpandoPropertyName]=null;return true;}\nreturn false;};}\nreturn{get:function(node,key){var dataForNode=getDataForNode(node,false);return dataForNode&&dataForNode[key];},set:function(node,key,value){var dataForNode=getDataForNode(node,value!==undefined);dataForNode&&(dataForNode[key]=value);},getOrSet:function(node,key,value){var dataForNode=getDataForNode(node,true);return dataForNode[key]||(dataForNode[key]=value);},clear:clear,nextKey:function(){return(uniqueId++)+dataStoreKeyExpandoPropertyName;}};})();ko.exportSymbol('utils.domData',ko.utils.domData);ko.exportSymbol('utils.domData.clear',ko.utils.domData.clear);ko.utils.domNodeDisposal=new(function(){var domDataKey=ko.utils.domData.nextKey();var cleanableNodeTypes={1:true,8:true,9:true};var cleanableNodeTypesWithDescendants={1:true,9:true};function getDisposeCallbacksCollection(node,createIfNotFound){var allDisposeCallbacks=ko.utils.domData.get(node,domDataKey);if((allDisposeCallbacks===undefined)&&createIfNotFound){allDisposeCallbacks=[];ko.utils.domData.set(node,domDataKey,allDisposeCallbacks);}\nreturn allDisposeCallbacks;}\nfunction destroyCallbacksCollection(node){ko.utils.domData.set(node,domDataKey,undefined);}\nfunction cleanSingleNode(node){var callbacks=getDisposeCallbacksCollection(node,false);if(callbacks){callbacks=callbacks.slice(0);for(var i=0;i<callbacks.length;i++)\ncallbacks[i](node);}\nko.utils.domData.clear(node);ko.utils.domNodeDisposal[\"cleanExternalData\"](node);if(cleanableNodeTypesWithDescendants[node.nodeType]){cleanNodesInList(node.childNodes,true);}}\nfunction cleanNodesInList(nodeList,onlyComments){var cleanedNodes=[],lastCleanedNode;for(var i=0;i<nodeList.length;i++){if(!onlyComments||nodeList[i].nodeType===8){cleanSingleNode(cleanedNodes[cleanedNodes.length]=lastCleanedNode=nodeList[i]);if(nodeList[i]!==lastCleanedNode){while(i--&&ko.utils.arrayIndexOf(cleanedNodes,nodeList[i])==-1){}}}}}\nreturn{addDisposeCallback:function(node,callback){if(typeof callback!=\"function\")\nthrow new Error(\"Callback must be a function\");getDisposeCallbacksCollection(node,true).push(callback);},removeDisposeCallback:function(node,callback){var callbacksCollection=getDisposeCallbacksCollection(node,false);if(callbacksCollection){ko.utils.arrayRemoveItem(callbacksCollection,callback);if(callbacksCollection.length==0)\ndestroyCallbacksCollection(node);}},cleanNode:function(node){ko.dependencyDetection.ignore(function(){if(cleanableNodeTypes[node.nodeType]){cleanSingleNode(node);if(cleanableNodeTypesWithDescendants[node.nodeType]){cleanNodesInList(node.getElementsByTagName(\"*\"));}}});return node;},removeNode:function(node){ko.cleanNode(node);if(node.parentNode)\nnode.parentNode.removeChild(node);},\"cleanExternalData\":function(node){if(jQueryInstance&&(typeof jQueryInstance['cleanData']==\"function\"))\njQueryInstance['cleanData']([node]);}};})();ko.cleanNode=ko.utils.domNodeDisposal.cleanNode;ko.removeNode=ko.utils.domNodeDisposal.removeNode;ko.exportSymbol('cleanNode',ko.cleanNode);ko.exportSymbol('removeNode',ko.removeNode);ko.exportSymbol('utils.domNodeDisposal',ko.utils.domNodeDisposal);ko.exportSymbol('utils.domNodeDisposal.addDisposeCallback',ko.utils.domNodeDisposal.addDisposeCallback);ko.exportSymbol('utils.domNodeDisposal.removeDisposeCallback',ko.utils.domNodeDisposal.removeDisposeCallback);(function(){var none=[0,\"\",\"\"],table=[1,\"<table>\",\"</table>\"],tbody=[2,\"<table><tbody>\",\"</tbody></table>\"],tr=[3,\"<table><tbody><tr>\",\"</tr></tbody></table>\"],select=[1,\"<select multiple='multiple'>\",\"</select>\"],lookup={'thead':table,'tbody':table,'tfoot':table,'tr':tbody,'td':tr,'th':tr,'option':select,'optgroup':select},mayRequireCreateElementHack=ko.utils.ieVersion<=8;function getWrap(tags){var m=tags.match(/^(?:<!--.*?-->\\s*?)*?<([a-z]+)[\\s>]/);return(m&&lookup[m[1]])||none;}\nfunction simpleHtmlParse(html,documentContext){documentContext||(documentContext=document);var windowContext=documentContext['parentWindow']||documentContext['defaultView']||window;var tags=ko.utils.stringTrim(html).toLowerCase(),div=documentContext.createElement(\"div\"),wrap=getWrap(tags),depth=wrap[0];var markup=\"ignored<div>\"+wrap[1]+html+wrap[2]+\"</div>\";if(typeof windowContext['innerShiv']==\"function\"){div.appendChild(windowContext['innerShiv'](markup));}else{if(mayRequireCreateElementHack){documentContext.body.appendChild(div);}\ndiv.innerHTML=markup;if(mayRequireCreateElementHack){div.parentNode.removeChild(div);}}\nwhile(depth--)\ndiv=div.lastChild;return ko.utils.makeArray(div.lastChild.childNodes);}\nfunction jQueryHtmlParse(html,documentContext){if(jQueryInstance['parseHTML']){return jQueryInstance['parseHTML'](html,documentContext)||[];}else{var elems=jQueryInstance['clean']([html],documentContext);if(elems&&elems[0]){var elem=elems[0];while(elem.parentNode&&elem.parentNode.nodeType!==11)\nelem=elem.parentNode;if(elem.parentNode)\nelem.parentNode.removeChild(elem);}\nreturn elems;}}\nko.utils.parseHtmlFragment=function(html,documentContext){return jQueryInstance?jQueryHtmlParse(html,documentContext):simpleHtmlParse(html,documentContext);};ko.utils.parseHtmlForTemplateNodes=function(html,documentContext){var nodes=ko.utils.parseHtmlFragment(html,documentContext);return(nodes.length&&nodes[0].parentElement)||ko.utils.moveCleanedNodesToContainerElement(nodes);};ko.utils.setHtml=function(node,html){ko.utils.emptyDomNode(node);html=ko.utils.unwrapObservable(html);if((html!==null)&&(html!==undefined)){if(typeof html!='string')\nhtml=html.toString();if(jQueryInstance){jQueryInstance(node)['html'](html);}
2else{var parsedNodes=ko.utils.parseHtmlFragment(html,node.ownerDocument);for(var i=0;i<parsedNodes.length;i++)\nnode.appendChild(parsedNodes[i]);}}};})();ko.exportSymbol('utils.parseHtmlFragment',ko.utils.parseHtmlFragment);ko.exportSymbol('utils.setHtml',ko.utils.setHtml);ko.memoization=(function(){var memos={};function randomMax8HexChars(){return(((1+Math.random())*0x100000000)|0).toString(16).substring(1);}\nfunction generateRandomId(){return randomMax8HexChars()+randomMax8HexChars();}\nfunction findMemoNodes(rootNode,appendToArray){if(!rootNode)\nreturn;if(rootNode.nodeType==8){var memoId=ko.memoization.parseMemoText(rootNode.nodeValue);if(memoId!=null)\nappendToArray.push({domNode:rootNode,memoId:memoId});}else if(rootNode.nodeType==1){for(var i=0,childNodes=rootNode.childNodes,j=childNodes.length;i<j;i++)\nfindMemoNodes(childNodes[i],appendToArray);}}\nreturn{memoize:function(callback){if(typeof callback!=\"function\")\nthrow new Error(\"You can only pass a function to ko.memoization.memoize()\");var memoId=generateRandomId();memos[memoId]=callback;return\"<!--[ko_memo:\"+memoId+\"]-->\";},unmemoize:function(memoId,callbackParams){var callback=memos[memoId];if(callback===undefined)\nthrow new Error(\"Couldn't find any memo with ID \"+memoId+\". Perhaps it's already been unmemoized.\");try{callback.apply(null,callbackParams||[]);return true;}\nfinally{delete memos[memoId];}},unmemoizeDomNodeAndDescendants:function(domNode,extraCallbackParamsArray){var memos=[];findMemoNodes(domNode,memos);for(var i=0,j=memos.length;i<j;i++){var node=memos[i].domNode;var combinedParams=[node];if(extraCallbackParamsArray)\nko.utils.arrayPushAll(combinedParams,extraCallbackParamsArray);ko.memoization.unmemoize(memos[i].memoId,combinedParams);node.nodeValue=\"\";if(node.parentNode)\nnode.parentNode.removeChild(node);}},parseMemoText:function(memoText){var match=memoText.match(/^\\[ko_memo\\:(.*?)\\]$/);return match?match[1]:null;}};})();ko.exportSymbol('memoization',ko.memoization);ko.exportSymbol('memoization.memoize',ko.memoization.memoize);ko.exportSymbol('memoization.unmemoize',ko.memoization.unmemoize);ko.exportSymbol('memoization.parseMemoText',ko.memoization.parseMemoText);ko.exportSymbol('memoization.unmemoizeDomNodeAndDescendants',ko.memoization.unmemoizeDomNodeAndDescendants);ko.tasks=(function(){var scheduler,taskQueue=[],taskQueueLength=0,nextHandle=1,nextIndexToProcess=0;if(window['MutationObserver']){scheduler=(function(callback){var div=document.createElement(\"div\");new MutationObserver(callback).observe(div,{attributes:true});return function(){div.classList.toggle(\"foo\");};})(scheduledProcess);}else if(document&&\"onreadystatechange\"in document.createElement(\"script\")){scheduler=function(callback){var script=document.createElement(\"script\");script.onreadystatechange=function(){script.onreadystatechange=null;document.documentElement.removeChild(script);script=null;callback();};document.documentElement.appendChild(script);};}else{scheduler=function(callback){setTimeout(callback,0);};}\nfunction processTasks(){if(taskQueueLength){var mark=taskQueueLength,countMarks=0;for(var task;nextIndexToProcess<taskQueueLength;){if(task=taskQueue[nextIndexToProcess++]){if(nextIndexToProcess>mark){if(++countMarks>=5000){nextIndexToProcess=taskQueueLength;ko.utils.deferError(Error(\"'Too much recursion' after processing \"+countMarks+\" task groups.\"));break;}\nmark=taskQueueLength;}\ntry{task();}catch(ex){ko.utils.deferError(ex);}}}}}\nfunction scheduledProcess(){processTasks();nextIndexToProcess=taskQueueLength=taskQueue.length=0;}\nfunction scheduleTaskProcessing(){ko.tasks['scheduler'](scheduledProcess);}\nvar tasks={'scheduler':scheduler,schedule:function(func){if(!taskQueueLength){scheduleTaskProcessing();}\ntaskQueue[taskQueueLength++]=func;return nextHandle++;},cancel:function(handle){var index=handle-(nextHandle-taskQueueLength);if(index>=nextIndexToProcess&&index<taskQueueLength){taskQueue[index]=null;}},'resetForTesting':function(){var length=taskQueueLength-nextIndexToProcess;nextIndexToProcess=taskQueueLength=taskQueue.length=0;return length;},runEarly:processTasks};return tasks;})();ko.exportSymbol('tasks',ko.tasks);ko.exportSymbol('tasks.schedule',ko.tasks.schedule);ko.exportSymbol('tasks.runEarly',ko.tasks.runEarly);ko.extenders={'throttle':function(target,timeout){target['throttleEvaluation']=timeout;var writeTimeoutInstance=null;return ko.dependentObservable({'read':target,'write':function(value){clearTimeout(writeTimeoutInstance);writeTimeoutInstance=ko.utils.setTimeout(function(){target(value);},timeout);}});},'rateLimit':function(target,options){var timeout,method,limitFunction;if(typeof options=='number'){timeout=options;}else{timeout=options['timeout'];method=options['method'];}\ntarget._deferUpdates=false;limitFunction=typeof method=='function'?method:method=='notifyWhenChangesStop'?debounce:throttle;target.limit(function(callback){return limitFunction(callback,timeout,options);});},'deferred':function(target,options){if(options!==true){throw new Error('The \\'deferred\\' extender only accepts the value \\'true\\', because it is not supported to turn deferral off once enabled.')}\nif(!target._deferUpdates){target._deferUpdates=true;target.limit(function(callback){var handle,ignoreUpdates=false;return function(){if(!ignoreUpdates){ko.tasks.cancel(handle);handle=ko.tasks.schedule(callback);try{ignoreUpdates=true;target['notifySubscribers'](undefined,'dirty');}finally{ignoreUpdates=false;}}};});}},'notify':function(target,notifyWhen){target[\"equalityComparer\"]=notifyWhen==\"always\"?null:valuesArePrimitiveAndEqual;}};var primitiveTypes={'undefined':1,'boolean':1,'number':1,'string':1};function valuesArePrimitiveAndEqual(a,b){var oldValueIsPrimitive=(a===null)||(typeof(a)in primitiveTypes);return oldValueIsPrimitive?(a===b):false;}\nfunction throttle(callback,timeout){var timeoutInstance;return function(){if(!timeoutInstance){timeoutInstance=ko.utils.setTimeout(function(){timeoutInstance=undefined;callback();},timeout);}};}\nfunction debounce(callback,timeout){var timeoutInstance;return function(){clearTimeout(timeoutInstance);timeoutInstance=ko.utils.setTimeout(callback,timeout);};}\nfunction applyExtenders(requestedExtenders){var target=this;if(requestedExtenders){ko.utils.objectForEach(requestedExtenders,function(key,value){var extenderHandler=ko.extenders[key];if(typeof extenderHandler=='function'){target=extenderHandler(target,value)||target;}});}\nreturn target;}\nko.exportSymbol('extenders',ko.extenders);ko.subscription=function(target,callback,disposeCallback){this._target=target;this._callback=callback;this._disposeCallback=disposeCallback;this._isDisposed=false;this._node=null;
vendor: 14,968 bytes, line 2
2this._domNodeDisposalCallback=null;ko.exportProperty(this,'dispose',this.dispose);ko.exportProperty(this,'disposeWhenNodeIsRemoved',this.disposeWhenNodeIsRemoved);};ko.subscription.prototype.dispose=function(){var self=this;if(!self._isDisposed){if(self._domNodeDisposalCallback){ko.utils.domNodeDisposal.removeDisposeCallback(self._node,self._domNodeDisposalCallback);}\nself._isDisposed=true;self._disposeCallback();self._target=self._callback=self._disposeCallback=self._node=self._domNodeDisposalCallback=null;}};ko.subscription.prototype.disposeWhenNodeIsRemoved=function(node){this._node=node;ko.utils.domNodeDisposal.addDisposeCallback(node,this._domNodeDisposalCallback=this.dispose.bind(this));};ko.subscribable=function(){ko.utils.setPrototypeOfOrExtend(this,ko_subscribable_fn);ko_subscribable_fn.init(this);}\nvar defaultEvent=\"change\";function limitNotifySubscribers(value,event){if(!event||event===defaultEvent){this._limitChange(value);}else if(event==='beforeChange'){this._limitBeforeChange(value);}else{this._origNotifySubscribers(value,event);}}\nvar ko_subscribable_fn={init:function(instance){instance._subscriptions={\"change\":[]};instance._versionNumber=1;},subscribe:function(callback,callbackTarget,event){var self=this;event=event||defaultEvent;var boundCallback=callbackTarget?callback.bind(callbackTarget):callback;var subscription=new ko.subscription(self,boundCallback,function(){ko.utils.arrayRemoveItem(self._subscriptions[event],subscription);if(self.afterSubscriptionRemove)\nself.afterSubscriptionRemove(event);});if(self.beforeSubscriptionAdd)\nself.beforeSubscriptionAdd(event);if(!self._subscriptions[event])\nself._subscriptions[event]=[];self._subscriptions[event].push(subscription);return subscription;},\"notifySubscribers\":function(valueToNotify,event){event=event||defaultEvent;if(event===defaultEvent){this.updateVersion();}\nif(this.hasSubscriptionsForEvent(event)){var subs=event===defaultEvent&&this._changeSubscriptions||this._subscriptions[event].slice(0);try{ko.dependencyDetection.begin();for(var i=0,subscription;subscription=subs[i];++i){if(!subscription._isDisposed)\nsubscription._callback(valueToNotify);}}finally{ko.dependencyDetection.end();}}},getVersion:function(){return this._versionNumber;},hasChanged:function(versionToCheck){return this.getVersion()!==versionToCheck;},updateVersion:function(){++this._versionNumber;},limit:function(limitFunction){var self=this,selfIsObservable=ko.isObservable(self),ignoreBeforeChange,notifyNextChange,previousValue,pendingValue,didUpdate,beforeChange='beforeChange';if(!self._origNotifySubscribers){self._origNotifySubscribers=self[\"notifySubscribers\"];self[\"notifySubscribers\"]=limitNotifySubscribers;}\nvar finish=limitFunction(function(){self._notificationIsPending=false;if(selfIsObservable&&pendingValue===self){pendingValue=self._evalIfChanged?self._evalIfChanged():self();}\nvar shouldNotify=notifyNextChange||(didUpdate&&self.isDifferent(previousValue,pendingValue));didUpdate=notifyNextChange=ignoreBeforeChange=false;if(shouldNotify){self._origNotifySubscribers(previousValue=pendingValue);}});self._limitChange=function(value,isDirty){if(!isDirty||!self._notificationIsPending){didUpdate=!isDirty;}\nself._changeSubscriptions=self._subscriptions[defaultEvent].slice(0);self._notificationIsPending=ignoreBeforeChange=true;pendingValue=value;finish();};self._limitBeforeChange=function(value){if(!ignoreBeforeChange){previousValue=value;self._origNotifySubscribers(value,beforeChange);}};self._recordUpdate=function(){didUpdate=true;};self._notifyNextChangeIfValueIsDifferent=function(){if(self.isDifferent(previousValue,self.peek(true))){notifyNextChange=true;}};},hasSubscriptionsForEvent:function(event){return this._subscriptions[event]&&this._subscriptions[event].length;},getSubscriptionsCount:function(event){if(event){return this._subscriptions[event]&&this._subscriptions[event].length||0;}else{var total=0;ko.utils.objectForEach(this._subscriptions,function(eventName,subscriptions){if(eventName!=='dirty')\ntotal+=subscriptions.length;});return total;}},isDifferent:function(oldValue,newValue){return!this['equalityComparer']||!this['equalityComparer'](oldValue,newValue);},toString:function(){return'[object Object]'},extend:applyExtenders};ko.exportProperty(ko_subscribable_fn,'init',ko_subscribable_fn.init);ko.exportProperty(ko_subscribable_fn,'subscribe',ko_subscribable_fn.subscribe);ko.exportProperty(ko_subscribable_fn,'extend',ko_subscribable_fn.extend);ko.exportProperty(ko_subscribable_fn,'getSubscriptionsCount',ko_subscribable_fn.getSubscriptionsCount);if(ko.utils.canSetPrototype){ko.utils.setPrototypeOf(ko_subscribable_fn,Function.prototype);}\nko.subscribable['fn']=ko_subscribable_fn;ko.isSubscribable=function(instance){return instance!=null&&typeof instance.subscribe==\"function\"&&typeof instance[\"notifySubscribers\"]==\"function\";};ko.exportSymbol('subscribable',ko.subscribable);ko.exportSymbol('isSubscribable',ko.isSubscribable);ko.computedContext=ko.dependencyDetection=(function(){var outerFrames=[],currentFrame,lastId=0;function getId(){return++lastId;}\nfunction begin(options){outerFrames.push(currentFrame);currentFrame=options;}\nfunction end(){currentFrame=outerFrames.pop();}\nreturn{begin:begin,end:end,registerDependency:function(subscribable){if(currentFrame){if(!ko.isSubscribable(subscribable))\nthrow new Error(\"Only subscribable things can act as dependencies\");currentFrame.callback.call(currentFrame.callbackTarget,subscribable,subscribable._id||(subscribable._id=getId()));}},ignore:function(callback,callbackTarget,callbackArgs){try{begin();return callback.apply(callbackTarget,callbackArgs||[]);}finally{end();}},getDependenciesCount:function(){if(currentFrame)\nreturn currentFrame.computed.getDependenciesCount();},getDependencies:function(){if(currentFrame)\nreturn currentFrame.computed.getDependencies();},isInitial:function(){if(currentFrame)\nreturn currentFrame.isInitial;},computed:function(){if(currentFrame)\nreturn currentFrame.computed;}};})();ko.exportSymbol('computedContext',ko.computedContext);ko.exportSymbol('computedContext.getDependenciesCount',ko.computedContext.getDependenciesCount);ko.exportSymbol('computedContext.getDependencies',ko.computedContext.getDependencies);ko.exportSymbol('computedContext.isInitial',ko.computedContext.isInitial);ko.exportSymbol('computedContext.registerDependency',ko.computedContext.registerDependency);ko.exportSymbol('ignoreDependencies',ko.ignoreDependencies=ko.dependencyDetection.ignore);var observableLatestValue=ko.utils.createSymbolOrString('_latestValue');ko.observable=function(initialValue){function observable(){if(arguments.length>0){if(observable.isDifferent(observable[observableLatestValue],arguments[0])){observable.valueWillMutate();observable[observableLatestValue]=arguments[0];observable.valueHasMutated();}\nreturn this;}\nelse{ko.dependencyDetection.registerDependency(observable);return observable[observableLatestValue];}}\nobservable[observableLatestValue]=initialValue;if(!ko.utils.canSetPrototype){ko.utils.extend(observable,ko.subscribable['fn']);}\nko.subscribable['fn'].init(observable);ko.utils.setPrototypeOfOrExtend(observable,observableFn);if(ko.options['deferUpdates']){ko.extenders['deferred'](observable,true);}\nreturn observable;}\nvar observableFn={'equalityComparer':valuesArePrimitiveAndEqual,peek:function(){return this[observableLatestValue];},valueHasMutated:function(){this['notifySubscribers'](this[observableLatestValue],'spectate');this['notifySubscribers'](this[observableLatestValue]);},valueWillMutate:function(){this['notifySubscribers'](this[observableLatestValue],'beforeChange');}};if(ko.utils.canSetPrototype){ko.utils.setPrototypeOf(observableFn,ko.subscribable['fn']);}\nvar protoProperty=ko.observable.protoProperty='__ko_proto__';observableFn[protoProperty]=ko.observable;ko.isObservable=function(instance){var proto=typeof instance=='function'&&instance[protoProperty];if(proto&&proto!==observableFn[protoProperty]&&proto!==ko.computed['fn'][protoProperty]){throw Error(\"Invalid object that looks like an observable; possibly from another Knockout instance\");}\nreturn!!proto;};ko.isWriteableObservable=function(instance){return(typeof instance=='function'&&((instance[protoProperty]===observableFn[protoProperty])||(instance[protoProperty]===ko.computed['fn'][protoProperty]&&instance.hasWriteFunction)));};ko.exportSymbol('observable',ko.observable);ko.exportSymbol('isObservable',ko.isObservable);ko.exportSymbol('isWriteableObservable',ko.isWriteableObservable);ko.exportSymbol('isWritableObservable',ko.isWriteableObservable);ko.exportSymbol('observable.fn',observableFn);ko.exportProperty(observableFn,'peek',observableFn.peek);ko.exportProperty(observableFn,'valueHasMutated',observableFn.valueHasMutated);ko.exportProperty(observableFn,'valueWillMutate',observableFn.valueWillMutate);ko.observableArray=function(initialValues){initialValues=initialValues||[];if(typeof initialValues!='object'||!('length'in initialValues))\nthrow new Error(\"The argument passed when initializing an observable array must be an array, or null, or undefined.\");var result=ko.observable(initialValues);ko.utils.setPrototypeOfOrExtend(result,ko.observableArray['fn']);return result.extend({'trackArrayChanges':true});};ko.observableArray['fn']={'remove':function(valueOrPredicate){var underlyingArray=this.peek();var removedValues=[];var predicate=typeof valueOrPredicate==\"function\"&&!ko.isObservable(valueOrPredicate)?valueOrPredicate:function(value){return value===valueOrPredicate;};for(var i=0;i<underlyingArray.length;i++){var value=underlyingArray[i];if(predicate(value)){if(removedValues.length===0){this.valueWillMutate();}\nif(underlyingArray[i]!==value){throw Error(\"Array modified during remove; cannot remove item\");}\nremovedValues.push(value);underlyingArray.splice(i,1);i--;}}\nif(removedValues.length){this.valueHasMutated();}\nreturn removedValues;},'removeAll':function(arrayOfValues){if(arrayOfValues===undefined){var underlyingArray=this.peek();var allValues=underlyingArray.slice(0);this.valueWillMutate();underlyingArray.splice(0,underlyingArray.length);this.valueHasMutated();return allValues;}\nif(!arrayOfValues)\nreturn[];return this['remove'](function(value){return ko.utils.arrayIndexOf(arrayOfValues,value)>=0;});},'destroy':function(valueOrPredicate){var underlyingArray=this.peek();var predicate=typeof valueOrPredicate==\"function\"&&!ko.isObservable(valueOrPredicate)?valueOrPredicate:function(value){return value===valueOrPredicate;};this.valueWillMutate();for(var i=underlyingArray.length-1;i>=0;i--){var value=underlyingArray[i];if(predicate(value))\nvalue[\"_destroy\"]=true;}\nthis.valueHasMutated();},'destroyAll':function(arrayOfValues){if(arrayOfValues===undefined)\nreturn this['destroy'](function(){return true});if(!arrayOfValues)\nreturn[];return this['destroy'](function(value){return ko.utils.arrayIndexOf(arrayOfValues,value)>=0;});},'indexOf':function(item){var underlyingArray=this();return ko.utils.arrayIndexOf(underlyingArray,item);},'replace':function(oldItem,newItem){var index=this['indexOf'](oldItem);if(index>=0){this.valueWillMutate();this.peek()[index]=newItem;this.valueHasMutated();}},'sorted':function(compareFunction){var arrayCopy=this().slice(0);return compareFunction?arrayCopy.sort(compareFunction):arrayCopy.sort();},'reversed':function(){return this().slice(0).reverse();}};if(ko.utils.canSetPrototype){ko.utils.setPrototypeOf(ko.observableArray['fn'],ko.observable['fn']);}\nko.utils.arrayForEach([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(methodName){ko.observableArray['fn'][methodName]=function(){var underlyingArray=this.peek();this.valueWillMutate();this.cacheDiffForKnownOperation(underlyingArray,methodName,arguments);var methodCallResult=underlyingArray[methodName].apply(underlyingArray,arguments);this.valueHasMutated();return methodCallResult===underlyingArray?this:methodCallResult;};});ko.utils.arrayForEach([\"slice\"],function(methodName){ko.observableArray['fn'][methodName]=function(){var underlyingArray=this();return underlyingArray[methodName].apply(underlyingArray,arguments);};});ko.isObservableArray=function(instance){return ko.isObservable(instance)&&typeof instance[\"remove\"]==\"function\"&&typeof instance[\"push\"]==\"function\";};ko.exportSymbol('observableArray',ko.observableArray);ko.exportSymbol('isObservableArray',ko.isObservableArray);var arrayChangeEventName='arrayChange';ko.extenders['trackArrayChanges']=function(target,options){target.compareArrayOptions={};if(options&&typeof options==\"object\"){ko.utils.extend(target.compareArrayOptions,options);}\ntarget.compareArrayOptions['sparse']=true;if(target.cacheDiffForKnownOperation){return;}\nvar trackingChanges=false,cachedDiff=null,changeSubscription,spectateSubscription,pendingChanges=0,previousContents,underlyingBeforeSubscriptionAddFunction=target.beforeSubscriptionAdd,underlyingAfterSubscriptionRemoveFunction=target.afterSubscriptionRemove;target.beforeSubscriptionAdd=function(event){if(underlyingBeforeSubscriptionAddFunction){underlyingBeforeSubscriptionAddFunction.call(target,event);}\nif(event===arrayChangeEventName){trackChanges();}};target.afterSubscriptionRemove=function(event){if(underlyingAfterSubscriptionRemoveFunction){underlyingAfterSubscriptionRemoveFunction.call(target,event);}\nif(event===arrayChangeEventName&&!target.hasSubscriptionsForEvent(arrayChangeEventName)){if(changeSubscription){changeSubscription.dispose();}\nif(spectateSubscription){spectateSubscription.dispose();}\nspectateSubscription=changeSubscription=null;trackingChanges=false;previousContents=undefined;}};function trackChanges(){if(trackingChanges){notifyChanges();return;}\ntrackingChanges=true;spectateSubscription=target.subscribe(function(){++pendingChanges;},null,\"spectate\");previousContents=[].concat(target.peek()||[]);cachedDiff=null;changeSubscription=target.subscribe(notifyChanges);function notifyChanges(){if(pendingChanges){var currentContents=[].concat(target.peek()||[]),changes;if(target.hasSubscriptionsForEvent(arrayChangeEventName)){changes=getChanges(previousContents,currentContents);}\npreviousContents=currentContents;cachedDiff=null;pendingChanges=0;if(changes&&changes.length){target['notifySubscribers'](changes,arrayChangeEventName);}}}}\nfunction getChanges(previousContents,currentContents){if(!cachedDiff||pendingChanges>1){cachedDiff=ko.utils.compareArrays(previousContents,currentContents,target.compareArrayOptions);}\nreturn cachedDiff;}\ntarget.cacheDiffForKnownOperation=function(rawArray,operationName,args){if(!trackingChanges||pendingChanges){return;}\nvar diff=[],arrayLength=rawArray.length,argsLength=args.length,offset=0;function pushDiff(status,value,index){return diff[diff.length]={'status':status,'value':value,'index':index};}\nswitch(operationName){case'push':offset=arrayLength;case'unshift':for(var index=0;
2index<argsLength;index++){pushDiff('added',args[index],offset+index);}\nbreak;case'pop':offset=arrayLength-1;case'shift':if(arrayLength){pushDiff('deleted',rawArray[offset],offset);}\nbreak;case'splice':var startIndex=Math.min(Math.max(0,args[0]<0?arrayLength+args[0]:args[0]),arrayLength),endDeleteIndex=argsLength===1?arrayLength:Math.min(startIndex+(args[1]||0),arrayLength),endAddIndex=startIndex+argsLength-2,endIndex=Math.max(endDeleteIndex,endAddIndex),additions=[],deletions=[];for(var index=startIndex,argsIndex=2;index<endIndex;++index,++argsIndex){if(index<endDeleteIndex)\ndeletions.push(pushDiff('deleted',rawArray[index],index));if(index<endAddIndex)\nadditions.push(pushDiff('added',args[argsIndex],index));}\nko.utils.findMovesInArrayComparison(deletions,additions);break;default:return;}\ncachedDiff=diff;};};var computedState=ko.utils.createSymbolOrString('_state');ko.computed=ko.dependentObservable=function(evaluatorFunctionOrOptions,evaluatorFunctionTarget,options){if(typeof evaluatorFunctionOrOptions===\"object\"){options=evaluatorFunctionOrOptions;}else{options=options||{};if(evaluatorFunctionOrOptions){options[\"read\"]=evaluatorFunctionOrOptions;}}\nif(typeof options[\"read\"]!=\"function\")\nthrow Error(\"Pass a function that returns the value of the ko.computed\");var writeFunction=options[\"write\"];var state={latestValue:undefined,isStale:true,isDirty:true,isBeingEvaluated:false,suppressDisposalUntilDisposeWhenReturnsFalse:false,isDisposed:false,pure:false,isSleeping:false,readFunction:options[\"read\"],evaluatorFunctionTarget:evaluatorFunctionTarget||options[\"owner\"],disposeWhenNodeIsRemoved:options[\"disposeWhenNodeIsRemoved\"]||options.disposeWhenNodeIsRemoved||null,disposeWhen:options[\"disposeWhen\"]||options.disposeWhen,domNodeDisposalCallback:null,dependencyTracking:{},dependenciesCount:0,evaluationTimeoutInstance:null};function computedObservable(){if(arguments.length>0){if(typeof writeFunction===\"function\"){writeFunction.apply(state.evaluatorFunctionTarget,arguments);}else{throw new Error(\"Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.\");}\nreturn this;}else{if(!state.isDisposed){ko.dependencyDetection.registerDependency(computedObservable);}\nif(state.isDirty||(state.isSleeping&&computedObservable.haveDependenciesChanged())){computedObservable.evaluateImmediate();}\nreturn state.latestValue;}}\ncomputedObservable[computedState]=state;computedObservable.hasWriteFunction=typeof writeFunction===\"function\";if(!ko.utils.canSetPrototype){ko.utils.extend(computedObservable,ko.subscribable['fn']);}\nko.subscribable['fn'].init(computedObservable);ko.utils.setPrototypeOfOrExtend(computedObservable,computedFn);if(options['pure']){state.pure=true;state.isSleeping=true;ko.utils.extend(computedObservable,pureComputedOverrides);}else if(options['deferEvaluation']){ko.utils.extend(computedObservable,deferEvaluationOverrides);}\nif(ko.options['deferUpdates']){ko.extenders['deferred'](computedObservable,true);}\nif(DEBUG){computedObservable[\"_options\"]=options;}\nif(state.disposeWhenNodeIsRemoved){state.suppressDisposalUntilDisposeWhenReturnsFalse=true;if(!state.disposeWhenNodeIsRemoved.nodeType){state.disposeWhenNodeIsRemoved=null;}}\nif(!state.isSleeping&&!options['deferEvaluation']){computedObservable.evaluateImmediate();}\nif(state.disposeWhenNodeIsRemoved&&computedObservable.isActive()){ko.utils.domNodeDisposal.addDisposeCallback(state.disposeWhenNodeIsRemoved,state.domNodeDisposalCallback=function(){computedObservable.dispose();});}\nreturn computedObservable;};function computedDisposeDependencyCallback(id,entryToDispose){if(entryToDispose!==null&&entryToDispose.dispose){entryToDispose.dispose();}}\nfunction computedBeginDependencyDetectionCallback(subscribable,id){var computedObservable=this.computedObservable,state=computedObservable[computedState];if(!state.isDisposed){if(this.disposalCount&&this.disposalCandidates[id]){computedObservable.addDependencyTracking(id,subscribable,this.disposalCandidates[id]);this.disposalCandidates[id]=null;--this.disposalCount;}else if(!state.dependencyTracking[id]){computedObservable.addDependencyTracking(id,subscribable,state.isSleeping?{_target:subscribable}:computedObservable.subscribeToDependency(subscribable));}\nif(subscribable._notificationIsPending){subscribable._notifyNextChangeIfValueIsDifferent();}}}\nvar computedFn={\"equalityComparer\":valuesArePrimitiveAndEqual,getDependenciesCount:function(){return this[computedState].dependenciesCount;},getDependencies:function(){var dependencyTracking=this[computedState].dependencyTracking,dependentObservables=[];ko.utils.objectForEach(dependencyTracking,function(id,dependency){dependentObservables[dependency._order]=dependency._target;});
2return dependentObservables;},hasAncestorDependency:function(obs){if(!this[computedState].dependenciesCount){return false;}\nvar dependencies=this.getDependencies();if(ko.utils.arrayIndexOf(dependencies,obs)!==-1){return true;}\nreturn!!ko.utils.arrayFirst(dependencies,function(dep){return dep.hasAncestorDependency&&dep.hasAncestorDependency(obs);});},addDependencyTracking:function(id,target,trackingObj){if(this[computedState].pure&&target===this){throw Error(\"A 'pure' computed must not be called recursively\");}\nthis[computedState].dependencyTracking[id]=trackingObj;trackingObj._order=this[computedState].dependenciesCount++;trackingObj._version=target.getVersion();},haveDependenciesChanged:function(){var id,dependency,dependencyTracking=this[computedState].dependencyTracking;for(id in dependencyTracking){if(Object.prototype.hasOwnProperty.call(dependencyTracking,id)){dependency=dependencyTracking[id];if((this._evalDelayed&&dependency._target._notificationIsPending)||dependency._target.hasChanged(dependency._version)){return true;}}}},markDirty:function(){if(this._evalDelayed&&!this[computedState].isBeingEvaluated){this._evalDelayed(false);}},isActive:function(){var state=this[computedState];return state.isDirty||state.dependenciesCount>0;},respondToChange:function(){if(!this._notificationIsPending){this.evaluatePossiblyAsync();}else if(this[computedState].isDirty){this[computedState].isStale=true;}},subscribeToDependency:function(target){if(target._deferUpdates){var dirtySub=target.subscribe(this.markDirty,this,'dirty'),changeSub=target.subscribe(this.respondToChange,this);return{_target:target,dispose:function(){dirtySub.dispose();changeSub.dispose();}};}else{return target.subscribe(this.evaluatePossiblyAsync,this);}},evaluatePossiblyAsync:function(){var computedObservable=this,throttleEvaluationTimeout=computedObservable['throttleEvaluation'];if(throttleEvaluationTimeout&&throttleEvaluationTimeout>=0){clearTimeout(this[computedState].evaluationTimeoutInstance);this[computedState].evaluationTimeoutInstance=ko.utils.setTimeout(function(){computedObservable.evaluateImmediate(true);},throttleEvaluationTimeout);}else if(computedObservable._evalDelayed){computedObservable._evalDelayed(true);}else{computedObservable.evaluateImmediate(true);}},evaluateImmediate:function(notifyChange){var computedObservable=this,state=computedObservable[computedState],disposeWhen=state.disposeWhen,changed=false;if(state.isBeingEvaluated){return;}\nif(state.isDisposed){return;}\nif(state.disposeWhenNodeIsRemoved&&!ko.utils.domNodeIsAttachedToDocument(state.disposeWhenNodeIsRemoved)||disposeWhen&&disposeWhen()){if(!state.suppressDisposalUntilDisposeWhenReturnsFalse){computedObservable.dispose();return;}}else{state.suppressDisposalUntilDisposeWhenReturnsFalse=false;}\nstate.isBeingEvaluated=true;try{changed=this.evaluateImmediate_CallReadWithDependencyDetection(notifyChange);}finally{state.isBeingEvaluated=false;}\nreturn changed;},evaluateImmediate_CallReadWithDependencyDetection:function(notifyChange){var computedObservable=this,state=computedObservable[computedState],changed=false;var isInitial=state.pure?undefined:!state.dependenciesCount,dependencyDetectionContext={computedObservable:computedObservable,disposalCandidates:state.dependencyTracking,disposalCount:state.dependenciesCount};ko.dependencyDetection.begin({callbackTarget:dependencyDetectionContext,callback:computedBeginDependencyDetectionCallback,computed:computedObservable,isInitial:isInitial});state.dependencyTracking={};state.dependenciesCount=0;var newValue=this.evaluateImmediate_CallReadThenEndDependencyDetection(state,dependencyDetectionContext);if(!state.dependenciesCount){computedObservable.dispose();changed=true;}else{changed=computedObservable.isDifferent(state.latestValue,newValue);}\nif(changed){if(!state.isSleeping){computedObservable[\"notifySubscribers\"](state.latestValue,\"beforeChange\");}else{computedObservable.updateVersion();}\nstate.latestValue=newValue;if(DEBUG)computedObservable._latestValue=newValue;computedObservable[\"notifySubscribers\"](state.latestValue,\"spectate\");if(!state.isSleeping&¬ifyChange){computedObservable[\"notifySubscribers\"](state.latestValue);}\nif(computedObservable._recordUpdate){computedObservable._recordUpdate();}}\nif(isInitial){computedObservable[\"notifySubscribers\"](state.latestValue,\"awake\");}\nreturn changed;},evaluateImmediate_CallReadThenEndDependencyDetection:function(state,dependencyDetectionContext){try{var readFunction=state.readFunction;return state.evaluatorFunctionTarget?readFunction.call(state.evaluatorFunctionTarget):readFunction();}finally{ko.dependencyDetection.end();if(dependencyDetectionContext.disposalCount&&!state.isSleeping){ko.utils.objectForEach(dependencyDetectionContext.disposalCandidates,computedDisposeDepen
2dencyCallback);}\nstate.isStale=state.isDirty=false;}},peek:function(evaluate){var state=this[computedState];if((state.isDirty&&(evaluate||!state.dependenciesCount))||(state.isSleeping&&this.haveDependenciesChanged())){this.evaluateImmediate();}\nreturn state.latestValue;},limit:function(limitFunction){ko.subscribable['fn'].limit.call(this,limitFunction);this._evalIfChanged=function(){if(!this[computedState].isSleeping){if(this[computedState].isStale){this.evaluateImmediate();}else{this[computedState].isDirty=false;}}\nreturn this[computedState].latestValue;};this._evalDelayed=function(isChange){this._limitBeforeChange(this[computedState].latestValue);this[computedState].isDirty=true;if(isChange){this[computedState].isStale=true;}\nthis._limitChange(this,!isChange);};},dispose:function(){var state=this[computedState];if(!state.isSleeping&&state.dependencyTracking){ko.utils.objectForEach(state.dependencyTracking,function(id,dependency){if(dependency.dispose)\ndependency.dispose();});}\nif(state.disposeWhenNodeIsRemoved&&state.domNodeDisposalCallback){ko.utils.domNodeDisposal.removeDisposeCallback(state.disposeWhenNodeIsRemoved,state.domNodeDisposalCallback);}\nstate.dependencyTracking=undefined;state.dependenciesCount=0;state.isDisposed=true;state.isStale=false;state.isDirty=false;state.isSleeping=false;state.disposeWhenNodeIsRemoved=undefined;state.disposeWhen=undefined;state.readFunction=undefined;if(!this.hasWriteFunction){state.evaluatorFunctionTarget=undefined;}}};var pureComputedOverrides={beforeSubscriptionAdd:function(event){var computedObservable=this,state=computedObservable[computedState];if(!state.isDisposed&&state.isSleeping&&event=='change'){state.isSleeping=false;if(state.isStale||computedObservable.haveDependenciesChanged()){state.dependencyTracking=null;state.dependenciesCount=0;if(computedObservable.evaluateImmediate()){computedObservable.updateVersion();}}else{var dependenciesOrder=[];ko.utils.objectForEach(state.dependencyTracking,function(id,dependency){dependenciesOrder[dependency._order]=id;});ko.utils.arrayForEach(dependenciesOrder,function(id,order){var dependency=state.dependencyTracking[id],subscription=computedObservable.subscribeToDependency(dependency._target);subscription._order=order;subscription._version=dependency._version;state.dependencyTracking[id]=subscription;});if(computedObservable.haveDependenciesChanged()){if(computedObservable.evaluateImmediate()){computedObservable.updateVersion();}}}\nif(!state.isDisposed){computedObservable[\"notifySubscribers\"](state.latestValue,\"awake\");}}},afterSubscriptionRemove:function(event){var state=this[computedState];if(!state.isDisposed&&event=='change'&&!this.hasSubscriptionsForEvent('change')){ko.utils.objectForEach(state.dependencyTracking,function(id,dependency){if(dependency.dispose){state.dependencyTracking[id]={_target:dependency._target,_order:dependency._order,_version:dependency._version};dependency.dispose();}});state.isSleeping=true;this[\"notifySubscribers\"](undefined,\"asleep\");}},getVersion:function(){var state=this[computedState];if(state.isSleeping&&(state.isStale||this.haveDependenciesChanged())){this.evaluateImmediate();}\nreturn ko.subscribable['fn'].getVersion.call(this);}};var deferEvaluationOverrides={beforeSubscriptionAdd:function(event){if(event=='change'||event=='beforeChange'){this.peek();}}};if(ko.utils.canSetPrototype){ko.utils.setPrototypeOf(computedFn,ko.subscribable['fn']);}\nvar protoProp=ko.observable.protoProperty;computedFn[protoProp]=ko.computed;ko.isComputed=function(instance){return(typeof instance=='function'&&instance[protoProp]===computedFn[protoProp]);};ko.isPureComputed=function(instance){return ko.isComputed(instance)&&instance[computedState]&&instance[computedState].pure;};ko.exportSymbol('computed',ko.computed);ko.exportSymbol('dependentObservable',ko.computed);ko.exportSymbol('isComputed',ko.isComputed);ko.exportSymbol('isPureComputed',ko.isPureComputed);ko.exportSymbol('computed.fn',computedFn);ko.exportProperty(computedFn,'peek',computedFn.peek);ko.exportProperty(computedFn,'dispose',computedFn.dispose);ko.exportProperty(computedFn,'isActive',computedFn.isActive);ko.exportProperty(computedFn,'getDependenciesCount',computedFn.getDependenciesCount);ko.exportProperty(computedFn,'getDependencies',computedFn.getDependencies);ko.pureComputed=function(evaluatorFunctionOrOptions,evaluatorFunctionTarget){if(typeof evaluatorFunctionOrOptions==='function'){return ko.computed(evaluatorFunctionOrOptions,evaluatorFunctionTarget,{'pure':true});}else{evaluatorFunctionOrOptions=ko.utils.extend({},evaluatorFunctionOrOptions);evaluatorFunctionOrOptions['pure']=true;return ko.computed(evaluatorFunctionOrOptions,evaluatorFunctionTarget);}}\nko.exportSymbol('pureComputed',ko.pureComputed);(function(){var maxNestedObservableDepth=10;ko.toJS=function(rootObject){if(arguments.length==0)\nthrow new Error(\"When calling ko.toJS, pass the object you want to convert.\");return mapJsObjectGraph(rootObject,function(valueToMap){for(var i=0;ko.isObservable(valueToMap)&&(i<maxNestedObservableDepth);i++)\nvalueToMap=valueToMap();return valueToMap;});};ko.toJSON=function(rootObject,replacer,space){var plainJavaScriptObject=ko.toJS(rootObject);return ko.utils.stringifyJson(plainJavaScriptObject,replacer,space);};function mapJsObjectGraph(rootObject,mapInputCallback,visitedObjects){visitedObjects=visitedObjects||new objectLookup();rootObject=mapInputCallback(rootObject);var canHaveProperties=(typeof rootObject==\"object\")&&(rootObject!==null)&&(rootObject!==undefined)&&(!(rootObject instanceof RegExp))&&(!(rootObject instanceof Date))&&(!(rootObject instanceof String))&&(!(rootObject instanceof Number))&&(!(rootObject instanceof Boolean));if(!canHaveProperties)\nreturn rootObject;var outputProperties=rootObject instanceof Array?[]:{};visitedObjects.save(rootObject,outputProperties);visitPropertiesOrArrayEntries(rootObject,function(indexer){var propertyValue=mapInputCallback(rootObject[indexer]);switch(typeof propertyValue){case\"boolean\":case\"number\":case\"string\":case\"function\":outputProperties[indexer]=propertyValue;break;case\"object\":case\"undefined\":var previouslyMappedValue=visitedObjects.get(propertyValue);outputProperties[indexer]=(previouslyMappedValue!==undefined)?previouslyMappedValue:mapJsObjectGraph(propertyValue,mapInputCallback,visitedObjects);break;}});return outputProperties;}\nfunction visitPropertiesOrArrayEntries(rootObject,visitorCallback){if(rootObject instanceof Array){for(var i=0;i<rootObject.length;
2i++)\nvisitorCallback(i);if(typeof rootObject['toJSON']=='function')\nvisitorCallback('toJSON');}else{for(var propertyName in rootObject){visitorCallback(propertyName);}}};function objectLookup(){this.keys=[];this.values=[];};objectLookup.prototype={constructor:objectLookup,save:function(key,value){var existingIndex=ko.utils.arrayIndexOf(this.keys,key);if(existingIndex>=0)\nthis.values[existingIndex]=value;else{this.keys.push(key);this.values.push(value);}},get:function(key){var existingIndex=ko.utils.arrayIndexOf(this.keys,key);return(existingIndex>=0)?this.values[existingIndex]:undefined;}};})();ko.exportSymbol('toJS',ko.toJS);ko.exportSymbol('toJSON',ko.toJSON);ko.when=function(predicate,callback,context){function kowhen(resolve){var observable=ko.pureComputed(predicate,context).extend({notify:'always'});var subscription=observable.subscribe(function(value){if(value){subscription.dispose();resolve(value);}});observable['notifySubscribers'](observable.peek());return subscription;}\nif(typeof Promise===\"function\"&&!callback){return new Promise(kowhen);}else{return kowhen(callback.bind(context));}};ko.exportSymbol('when',ko.when);(function(){var hasDomDataExpandoProperty='__ko__hasDomDataOptionValue__';ko.selectExtensions={readValue:function(element){switch(ko.utils.tagNameLower(element)){case'option':if(element[hasDomDataExpandoProperty]===true)\nreturn ko.utils.domData.get(element,ko.bindingHandlers.options.optionValueDomDataKey);return ko.utils.ieVersion<=7?(element.getAttributeNode('value')&&element.getAttributeNode('value').specified?element.value:element.text):element.value;case'select':return element.selectedIndex>=0?ko.selectExtensions.readValue(element.options[element.selectedIndex]):undefined;default:return element.value;}},writeValue:function(element,value,allowUnset){switch(ko.utils.tagNameLower(element)){case'option':if(typeof value===\"string\"){ko.utils.domData.set(element,ko.bindingHandlers.options.optionValueDomDataKey,undefined);if(hasDomDataExpandoProperty in element){delete element[hasDomDataExpandoProperty];}\nelement.value=value;}\nelse{ko.utils.domData.set(element,ko.bindingHandlers.options.optionValueDomDataKey,value);element[hasDomDataExpandoProperty]=true;element.value=typeof value===\"number\"?value:\"\";}\nbreak;case'select':if(value===\"\"||value===null)\nvalue=undefined;var selection=-1;for(var i=0,n=element.options.length,optionValue;i<n;++i){optionValue=ko.selectExtensions.readValue(element.options[i]);if(optionValue==value||(optionValue===\"\"&&value===undefined)){selection=i;break;}}\nif(allowUnset||selection>=0||(value===undefined&&element.size>1)){element.selectedIndex=selection;if(ko.utils.ieVersion===6){ko.utils.setTimeout(function(){element.selectedIndex=selection;},0);}}\nbreak;default:if((value===null)||(value===undefined))\nvalue=\"\";element.value=value;break;}}};})();ko.exportSymbol('selectExtensions',ko.selectExtensions);ko.exportSymbol('selectExtensions.readValue',ko.selectExtensions.readValue);ko.exportSymbol('selectExtensions.writeValue',ko.selectExtensions.writeValue);ko.expressionRewriting=(function(){var javaScriptReservedWords=[\"true\",\"false\",\"null\",\"undefined\"];var javaScriptAssignmentTarget=/^(?:[$_a-z][$\\w]*|(.+)(\\.\\s*[$_a-z][$\\w]*|\\[.+\\]))$/i;function getWriteableValue(expression){if(ko.utils.arrayIndexOf(javaScriptReservedWords,expression)>=0)\nreturn false;var match=expression.match(javaScriptAssignmentTarget);return match===null?false:match[1]?('Object('+match[1]+')'+match[2]):expression;}\nvar specials=',\"\\'`{}()/:[\\\\]',bindingToken=RegExp(['\"(?:\\\\\\\\.|[^\"])*\"',\"'(?:\\\\\\\\.|[^'])*'\",\"`(?:\\\\\\\\.|[^`])*`\",\"/\\\\*(?:[^*]|\\\\*+[^*/])*\\\\*+/\",\"//.*\\n\",'/(?:\\\\\\\\.|[^/])+/\\w*','[^\\\\s:,/][^'+specials+']*[^\\\\s'+specials+']','[^\\\\s]'].join('|'),'g'),divisionLookBehind=/[\\])\"'A-Za-z0-9_$]+$/,keywordRegexLookBehind={'in':1,'return':1,'typeof':1};function parseObjectLiteral(objectLiteralString){var str=ko.utils.stringTrim(objectLiteralString);if(str.charCodeAt(0)===123)str=str.slice(1,-1);str+=\"\\n,\";var result=[],toks=str.match(bindingToken),key,values=[],depth=0;
vendor: 4,649 bytes, line 2
2if(toks.length>1){for(var i=0,tok;tok=toks[i];++i){var c=tok.charCodeAt(0);if(c===44){if(depth<=0){result.push((key&&values.length)?{key:key,value:values.join('')}:{'unknown':key||values.join('')});key=depth=0;values=[];continue;}}else if(c===58){if(!depth&&!key&&values.length===1){key=values.pop();continue;}}else if(c===47&&tok.length>1&&(tok.charCodeAt(1)===47||tok.charCodeAt(1)===42)){continue;}else if(c===47&&i&&tok.length>1){var match=toks[i-1].match(divisionLookBehind);if(match&&!keywordRegexLookBehind[match[0]]){str=str.substr(str.indexOf(tok)+1);toks=str.match(bindingToken);i=-1;tok='/';}}else if(c===40||c===123||c===91){++depth;}else if(c===41||c===125||c===93){--depth;}else if(!key&&!values.length&&(c===34||c===39)){tok=tok.slice(1,-1);}\nvalues.push(tok);}\nif(depth>0){throw Error(\"Unbalanced parentheses, braces, or brackets\");}}\nreturn result;}\nvar twoWayBindings={};function preProcessBindings(bindingsStringOrKeyValueArray,bindingOptions){bindingOptions=bindingOptions||{};function processKeyValue(key,val){var writableVal;function callPreprocessHook(obj){return(obj&&obj['preprocess'])?(val=obj['preprocess'](val,key,processKeyValue)):true;}\nif(!bindingParams){if(!callPreprocessHook(ko['getBindingHandler'](key)))\nreturn;if(twoWayBindings[key]&&(writableVal=getWriteableValue(val))){var writeKey=typeof twoWayBindings[key]=='string'?twoWayBindings[key]:key;propertyAccessorResultStrings.push(\"'\"+writeKey+\"':function(_z){\"+writableVal+\"=_z}\");}}\nif(makeValueAccessors){val='function(){return '+val+' }';}\nresultStrings.push(\"'\"+key+\"':\"+val);}\nvar resultStrings=[],propertyAccessorResultStrings=[],makeValueAccessors=bindingOptions['valueAccessors'],bindingParams=bindingOptions['bindingParams'],keyValueArray=typeof bindingsStringOrKeyValueArray===\"string\"?parseObjectLiteral(bindingsStringOrKeyValueArray):bindingsStringOrKeyValueArray;ko.utils.arrayForEach(keyValueArray,function(keyValue){processKeyValue(keyValue.key||keyValue['unknown'],keyValue.value);});if(propertyAccessorResultStrings.length)\nprocessKeyValue('_ko_property_writers',\"{\"+propertyAccessorResultStrings.join(\",\")+\" }\");return resultStrings.join(\",\");}\nreturn{bindingRewriteValidators:[],twoWayBindings:twoWayBindings,parseObjectLiteral:parseObjectLiteral,preProcessBindings:preProcessBindings,keyValueArrayContainsKey:function(keyValueArray,key){for(var i=0;i<keyValueArray.length;i++)\nif(keyValueArray[i]['key']==key)\nreturn true;return false;},writeValueToProperty:function(property,allBindings,key,value,checkIfDifferent){if(!property||!ko.isObservable(property)){var propWriters=allBindings.get('_ko_property_writers');if(propWriters&&propWriters[key])\npropWriters[key](value);}else if(ko.isWriteableObservable(property)&&(!checkIfDifferent||property.peek()!==value)){property(value);}}};})();ko.exportSymbol('expressionRewriting',ko.expressionRewriting);ko.exportSymbol('expressionRewriting.bindingRewriteValidators',ko.expressionRewriting.bindingRewriteValidators);ko.exportSymbol('expressionRewriting.parseObjectLiteral',ko.expressionRewriting.parseObjectLiteral);ko.exportSymbol('expressionRewriting.preProcessBindings',ko.expressionRewriting.preProcessBindings);ko.exportSymbol('expressionRewriting._twoWayBindings',ko.expressionRewriting.twoWayBindings);ko.exportSymbol('jsonExpressionRewriting',ko.expressionRewriting);ko.exportSymbol('jsonExpressionRewriting.insertPropertyAccessorsIntoJson',ko.expressionRewriting.preProcessBindings);(function(){var commentNodesHaveTextProperty=document&&document.createComment(\"test\").text===\"<!--test-->\";var startCommentRegex=commentNodesHaveTextProperty?/^<!--\\s*ko(?:\\s+([\\s\\S]+))?\\s*-->$/:/^\\s*ko(?:\\s+([\\s\\S]+))?\\s*$/;var endCommentRegex=commentNodesHaveTextProperty?/^<!--\\s*\\/ko\\s*-->$/:/^\\s*\\/ko\\s*$/;var htmlTagsWithOptionallyClosingChildren={'ul':true,'ol':true};function isStartComment(node){return(node.nodeType==8)&&startCommentRegex.test(commentNodesHaveTextProperty?node.text:node.nodeValue);}\nfunction isEndComment(node){return(node.nodeType==8)&&endCommentRegex.test(commentNodesHaveTextProperty?node.text:node.nodeValue);}\nfunction isUnmatchedEndComment(node){return isEndComment(node)&&!(ko.utils.domData.get(node,matchedEndCommentDataKey));}\nvar matchedEndCommentDataKey=\"__ko_matchedEndComment__\"\nfunction getVirtualChildren(startComment,allowUnbalanced){var currentNode=startComment;var depth=1;var children=[];while(currentNode=currentNode.nextSibling){if(isEndComment(currentNode)){ko.utils.domData.set(currentNode,matchedEndCommentDataKey,true);depth--;if(depth===0)\nreturn children;}\nchildren.push(currentNode);
2if(isStartComment(currentNode))\ndepth++;}\nif(!allowUnbalanced)\nthrow new Error(\"Cannot find closing comment tag to match: \"+startComment.nodeValue);return null;}\nfunction getMatchingEndComment(startComment,allowUnbalanced){var allVirtualChildren=getVirtualChildren(startComment,allowUnbalanced);if(allVirtualChildren){if(allVirtualChildren.length>0)\nreturn allVirtualChildren[allVirtualChildren.length-1].nextSibling;return startComment.nextSibling;}else\nreturn null;}\nfunction getUnbalancedChildTags(node){var childNode=node.firstChild,captureRemaining=null;if(childNode){do{if(captureRemaining)\ncaptureRemaining.push(childNode);else if(isStartComment(childNode)){var matchingEndComment=getMatchingEndComment(childNode,true);if(matchingEndComment)\nchildNode=matchingEndComment;else\ncaptureRemaining=[childNode];}else if(isEndComment(childNode)){captureRemaining=[childNode];}}while(childNode=childNode.nextSibling);}\nreturn captureRemaining;}\nko.virtualElements={allowedBindings:{},childNodes:function(node){return isStartComment(node)?getVirtualChildren(node):node.childNodes;},emptyNode:function(node){if(!isStartComment(node))\nko.utils.emptyDomNode(node);else{var virtualChildren=ko.virtualElements.childNodes(node);for(var i=0,j=virtualChildren.length;i<j;i++)\nko.removeNode(virtualChildren[i]);}},setDomNodeChildren:function(node,childNodes){if(!isStartComment(node))\nko.utils.setDomNodeChildren(node,childNodes);else{ko.virtualElements.emptyNode(node);var endCommentNode=node.nextSibling;for(var i=0,j=childNodes.length;i<j;i++)\nendCommentNode.parentNode.insertBefore(childNodes[i],endCommentNode);}},prepend:function(containerNode,nodeToPrepend){var insertBeforeNode;if(isStartComment(containerNode)){insertBeforeNode=containerNode.nextSibling;containerNode=containerNode.parentNode;}else{insertBeforeNode=containerNode.firstChild;}\nif(!insertBeforeNode){containerNode.appendChild(nodeToPrepend);}else if(nodeToPrepend!==insertBeforeNode){containerNode.insertBefore(nodeToPrepend,insertBeforeNode);}},insertAfter:function(containerNode,nodeToInsert,insertAfterNode){if(!insertAfterNode){ko.virtualElements.prepend(containerNode,nodeToInsert);}else{var insertBeforeNode=insertAfterNode.nextSibling;if(isStartComment(containerNode)){containerNode=containerNode.parentNode;}\nif(!insertBeforeNode){containerNode.appendChild(nodeToInsert);}else if(nodeToInsert!==insertBeforeNode){containerNode.insertBefore(nodeToInsert,insertBeforeNode);}}},firstChild:function(node){if(!isStartComment(node)){if(node.firstChild&&isEndComment(node.firstChild)){throw new Error(\"Found invalid end comment, as the first child of \"+node);}\nreturn node.firstChild;}else if(!node.nextSibling||isEndComment(node.nextSibling)){return null;}else{return node.nextSibling;}},nextSibling:function(node){if(isStartComment(node)){node=getMatchingEndComment(node);}\nif(node.nextSibling&&isEndComment(node.nextSibling)){if(isUnmatchedEndComment(node.nextSibling)){throw Error(\"Found end comment without a matching opening comment, as child of \"+node);}else{return null;}}else{return node.nextSibling;}},hasBindingValue:isStartComment,virtualNodeBindingValue:function(node){var regexMatch=(commentNodesHaveTextProperty?node.text:node.nodeValue).match(startCommentRegex);return regexMatch?regexMatch[1]:null;},normaliseVirtualElementDomStructure:function(elementVerified){if(!htmlTagsWithOptionallyClosingChildren[ko.utils.tagNameLower(elementVerified)])\nreturn;var childNode=elementVerified.firstChild;if(childNode){do{if(childNode.nodeType===1){var unbalancedTags=getUnbalancedChildTags(childNode);if(unbalancedTags){var nodeToInsertBefore=childNode.nextSibling;for(var i=0;i<unbalancedTags.length;i++){if(nodeToInsertBefore)\nelementVerified.insertBefore(unbalancedTags[i],nodeToInsertBefore);else\nelementVerified.appendChild(unbalancedTags[i]);}}}}while(childNode=childNode.nextSibling);}}};})();ko.exportSymbol('virtualElements',ko.virtualElements);ko.exportSymbol('virtualElements.allowedBindings',ko.virtualElements.allowedBindings);ko.exportSymbol('virtualElements.emptyNode',ko.virtualElements.emptyNode);ko.exportSymbol('virtualElements.insertAfter',ko.virtualElements.insertAfter);ko.exportSymbol('virtualElements.prepend',ko.virtualElements.prepend);ko.exportSymbol('virtualElements.setDomNodeChildren',ko.virtualElements.setDomNodeChildren);(function(){var defaultBindingAttributeName=\"data-bind\";ko.bindingProvider=function(){this.bindingCache={};};ko.utils.extend(ko.bindingProvider.prototype,{'nodeHasBindings':function(node){switch(node.nodeType){case 1:return node.getAttribute(defaultBindingAttributeName)!=null||ko.components['getComponentNameForNode'](node);case 8:return ko.virtualElements.hasBindingValue(node);default:return false;}},'getBindings':function(node,bindingContext){var bindingsString=this['getBindingsString'](node,bindingContext),parsedBindings=bindingsString?this['parseBindingsString'](bindingsString,bindingContext,node):null;return ko.components.addBindingsForCustomElement(parsedBindings,node,bindingContext,false);},'getBindingAccessors':function(node,bindingContext){var bindingsString=this['getBindingsString'](node,bindingContext),parsedBindings=bindingsString?this['parseBindingsString'](bindingsString,bindingContext,node,{'valueAccessors':true}):null;return ko.components.addBindingsForCustomElement(parsedBindings,node,bindingContext,true);},'getBindingsString':function(node,bindingContext){switch(node.nodeType){case 1:return node.getAttribute(defaultBindingAttributeName);case 8:return ko.virtualElements.virtualNodeBindingValue(node);default:return null;}},'parseBindingsString':function(bindingsString,bindingContext,node,options){try{var bindingFunction=createBindingsStringEvaluatorViaCache(bindingsString,this.bindingCache,options);return bindingFunction(bindingContext,node);}catch(ex){ex.message=\"Unable to parse bindings.\\nBindings value: \"+bindingsString+\"\\nMessage: \"+ex.message;throw ex;}}});
2ko.bindingProvider['instance']=new ko.bindingProvider();function createBindingsStringEvaluatorViaCache(bindingsString,cache,options){var cacheKey=bindingsString+(options&&options['valueAccessors']||'');return cache[cacheKey]||(cache[cacheKey]=createBindingsStringEvaluator(bindingsString,options));}\nfunction createBindingsStringEvaluator(bindingsString,options){var rewrittenBindings=ko.expressionRewriting.preProcessBindings(bindingsString,options),functionBody=\"with($context){with($data||{}){return{\"+rewrittenBindings+\"}}}\";return new Function(\"$context\",\"$element\",functionBody);}})();ko.exportSymbol('bindingProvider',ko.bindingProvider);(function(){var contextSubscribable=ko.utils.createSymbolOrString('_subscribable');var contextAncestorBindingInfo=ko.utils.createSymbolOrString('_ancestorBindingInfo');var contextDataDependency=ko.utils.createSymbolOrString('_dataDependency');ko.bindingHandlers={};var bindingDoesNotRecurseIntoElementTypes={'script':true,'textarea':true,'template':true};ko['getBindingHandler']=function(bindingKey){return ko.bindingHandlers[bindingKey];};var inheritParentVm={};ko.bindingContext=function(dataItemOrAccessor,parentContext,dataItemAlias,extendCallback,options){function updateContext(){var dataItemOrObservable=isFunc?realDataItemOrAccessor():realDataItemOrAccessor,dataItem=ko.utils.unwrapObservable(dataItemOrObservable);if(parentContext){ko.utils.extend(self,parentContext);if(contextAncestorBindingInfo in parentContext){self[contextAncestorBindingInfo]=parentContext[contextAncestorBindingInfo];}}else{self['$parents']=[];self['$root']=dataItem;self['ko']=ko;}\nself[contextSubscribable]=subscribable;if(shouldInheritData){dataItem=self['$data'];}else{self['$rawData']=dataItemOrObservable;self['$data']=dataItem;}\nif(dataItemAlias)\nself[dataItemAlias]=dataItem;if(extendCallback)\nextendCallback(self,parentContext,dataItem);if(parentContext&&parentContext[contextSubscribable]&&!ko.computedContext.computed().hasAncestorDependency(parentContext[contextSubscribable])){parentContext[contextSubscribable]();}\nif(dataDependency){self[contextDataDependency]=dataDependency;}\nreturn self['$data'];}\nvar self=this,shouldInheritData=dataItemOrAccessor===inheritParentVm,realDataItemOrAccessor=shouldInheritData?undefined:dataItemOrAccessor,isFunc=typeof(realDataItemOrAccessor)==\"function\"&&!ko.isObservable(realDataItemOrAccessor),nodes,subscribable,dataDependency=options&&options['dataDependency'];if(options&&options['exportDependencies']){updateContext();}else{subscribable=ko.pureComputed(updateContext);subscribable.peek();if(subscribable.isActive()){subscribable['equalityComparer']=null;}else{self[contextSubscribable]=undefined;}}}\nko.bindingContext.prototype['createChildContext']=function(dataItemOrAccessor,dataItemAlias,extendCallback,options){if(!options&&dataItemAlias&&typeof dataItemAlias==\"object\"){options=dataItemAlias;dataItemAlias=options['as'];extendCallback=options['extend'];}\nif(dataItemAlias&&options&&options['noChildContext']){var isFunc=typeof(dataItemOrAccessor)==\"function\"&&!ko.isObservable(dataItemOrAccessor);return new ko.bindingContext(inheritParentVm,this,null,function(self){if(extendCallback)\nextendCallback(self);self[dataItemAlias]=isFunc?dataItemOrAccessor():dataItemOrAccessor;},options);}\nreturn new ko.bindingContext(dataItemOrAccessor,this,dataItemAlias,function(self,parentContext){self['$parentContext']=parentContext;self['$parent']=parentContext['$data'];self['$parents']=(parentContext['$parents']||[]).slice(0);self['$parents'].unshift(self['$parent']);if(extendCallback)\nextendCallback(self);},options);};ko.bindingContext.prototype['extend']=function(properties,options){return new ko.bindingContext(inheritParentVm,this,null,function(self,parentContext){ko.utils.extend(self,typeof(properties)==\"function\"?properties(self):properties);},options);};var boundElementDomDataKey=ko.utils.domData.nextKey();function asyncContextDispose(node){var bindingInfo=ko.utils.domData.get(node,boundElementDomDataKey),asyncContext=bindingInfo&&bindingInfo.asyncContext;if(asyncContext){bindingInfo.asyncContext=null;asyncContext.notifyAncestor();}}\nfunction AsyncCompleteContext(node,bindingInfo,ancestorBindingInfo){this.node=node;this.bindingInfo=bindingInfo;this.asyncDescendants=[];this.childrenComplete=false;if(!bindingInfo.asyncContext){ko.utils.domNodeDisposal.addDisposeCallback(node,asyncContextDispose);}
2\nif(ancestorBindingInfo&&ancestorBindingInfo.asyncContext){ancestorBindingInfo.asyncContext.asyncDescendants.push(node);this.ancestorBindingInfo=ancestorBindingInfo;}}\nAsyncCompleteContext.prototype.notifyAncestor=function(){if(this.ancestorBindingInfo&&this.ancestorBindingInfo.asyncContext){this.ancestorBindingInfo.asyncContext.descendantComplete(this.node);}};AsyncCompleteContext.prototype.descendantComplete=function(node){ko.utils.arrayRemoveItem(this.asyncDescendants,node);if(!this.asyncDescendants.length&&this.childrenComplete){this.completeChildren();}};AsyncCompleteContext.prototype.completeChildren=function(){this.childrenComplete=true;if(this.bindingInfo.asyncContext&&!this.asyncDescendants.length){this.bindingInfo.asyncContext=null;ko.utils.domNodeDisposal.removeDisposeCallback(this.node,asyncContextDispose);ko.bindingEvent.notify(this.node,ko.bindingEvent.descendantsComplete);this.notifyAncestor();}};ko.bindingEvent={childrenComplete:\"childrenComplete\",descendantsComplete:\"descendantsComplete\",subscribe:function(node,event,callback,context,options){var bindingInfo=ko.utils.domData.getOrSet(node,boundElementDomDataKey,{});if(!bindingInfo.eventSubscribable){bindingInfo.eventSubscribable=new ko.subscribable;}\nif(options&&options['notifyImmediately']&&bindingInfo.notifiedEvents[event]){ko.dependencyDetection.ignore(callback,context,[node]);}\nreturn bindingInfo.eventSubscribable.subscribe(callback,context,event);},notify:function(node,event){var bindingInfo=ko.utils.domData.get(node,boundElementDomDataKey);if(bindingInfo){bindingInfo.notifiedEvents[event]=true;if(bindingInfo.eventSubscribable){bindingInfo.eventSubscribable['notifySubscribers'](node,event);}\nif(event==ko.bindingEvent.childrenComplete){if(bindingInfo.asyncContext){bindingInfo.asyncContext.completeChildren();}else if(bindingInfo.asyncContext===undefined&&bindingInfo.eventSubscribable&&bindingInfo.eventSubscribable.hasSubscriptionsForEvent(ko.bindingEvent.descendantsComplete)){throw new Error(\"descendantsComplete event not supported for bindings on this node\");}}}},startPossiblyAsyncContentBinding:function(node,bindingContext){var bindingInfo=ko.utils.domData.getOrSet(node,boundElementDomDataKey,{});if(!bindingInfo.asyncContext){bindingInfo.asyncContext=new AsyncCompleteContext(node,bindingInfo,bindingContext[contextAncestorBindingInfo]);}\nif(bindingContext[contextAncestorBindingInfo]==bindingInfo){return bindingContext;}\nreturn bindingContext['extend'](function(ctx){ctx[contextAncestorBindingInfo]=bindingInfo;});}};function makeValueAccessor(value){return function(){return value;};}\nfunction evaluateValueAccessor(valueAccessor){return valueAccessor();}\nfunction makeAccessorsFromFunction(callback){return ko.utils.objectMap(ko.dependencyDetection.ignore(callback),function(value,key){return function(){return callback()[key];};});}\nfunction makeBindingAccessors(bindings,context,node){if(typeof bindings==='function'){return makeAccessorsFromFunction(bindings.bind(null,context,node));}else{return ko.utils.objectMap(bindings,makeValueAccessor);}}\nfunction getBindingsAndMakeAccessors(node,context){return makeAccessorsFromFunction(this['getBindings'].bind(this,node,context));}\nfunction validateThatBindingIsAllowedForVirtualElements(bindingName){var validator=ko.virtualElements.allowedBindings[bindingName];if(!validator)\nthrow new Error(\"The binding '\"+bindingName+\"' cannot be used with virtual elements\")}\nfunction applyBindingsToDescendantsInternal(bindingContext,elementOrVirtualElement){var nextInQueue=ko.virtualElements.firstChild(elementOrVirtualElement);if(nextInQueue){var currentChild,provider=ko.bindingProvider['instance'],preprocessNode=provider['preprocessNode'];if(preprocessNode){while(currentChild=nextInQueue){nextInQueue=ko.virtualElements.nextSibling(currentChild);preprocessNode.call(provider,currentChild);}\nnextInQueue=ko.virtualElements.firstChild(elementOrVirtualElement);}\nwhile(currentChild=nextInQueue){nextInQueue=ko.virtualElements.nextSibling(currentChild);applyBindingsToNodeAndDescendantsInternal(bindingContext,currentChild);}}\nko.bindingEvent.notify(elementOrVirtualElement,ko.bindingEvent.childrenComplete);}\nfunction applyBindingsToNodeAndDescendantsInternal(bindingContext,nodeVerified){var bindingContextForDescendants=bindingContext;var isElement=(nodeVerified.nodeType===1);if(isElement)\nko.virtualElements.normaliseVirtualElementDomStructure(nodeVerified);
vendor: 6,515 bytes, line 2
2var shouldApplyBindings=isElement||ko.bindingProvider['instance']['nodeHasBindings'](nodeVerified);if(shouldApplyBindings)\nbindingContextForDescendants=applyBindingsToNodeInternal(nodeVerified,null,bindingContext)['bindingContextForDescendants'];if(bindingContextForDescendants&&!bindingDoesNotRecurseIntoElementTypes[ko.utils.tagNameLower(nodeVerified)]){applyBindingsToDescendantsInternal(bindingContextForDescendants,nodeVerified);}}\nfunction topologicalSortBindings(bindings){var result=[],bindingsConsidered={},cyclicDependencyStack=[];ko.utils.objectForEach(bindings,function pushBinding(bindingKey){if(!bindingsConsidered[bindingKey]){var binding=ko['getBindingHandler'](bindingKey);if(binding){if(binding['after']){cyclicDependencyStack.push(bindingKey);ko.utils.arrayForEach(binding['after'],function(bindingDependencyKey){if(bindings[bindingDependencyKey]){if(ko.utils.arrayIndexOf(cyclicDependencyStack,bindingDependencyKey)!==-1){throw Error(\"Cannot combine the following bindings, because they have a cyclic dependency: \"+cyclicDependencyStack.join(\", \"));}else{pushBinding(bindingDependencyKey);}}});cyclicDependencyStack.length--;}\nresult.push({key:bindingKey,handler:binding});}\nbindingsConsidered[bindingKey]=true;}});return result;}\nfunction applyBindingsToNodeInternal(node,sourceBindings,bindingContext){var bindingInfo=ko.utils.domData.getOrSet(node,boundElementDomDataKey,{});var alreadyBound=bindingInfo.alreadyBound;if(!sourceBindings){if(alreadyBound){throw Error(\"You cannot apply bindings multiple times to the same element.\");}\nbindingInfo.alreadyBound=true;}\nif(!alreadyBound){bindingInfo.context=bindingContext;}\nif(!bindingInfo.notifiedEvents){bindingInfo.notifiedEvents={};}\nvar bindings;if(sourceBindings&&typeof sourceBindings!=='function'){bindings=sourceBindings;}else{var provider=ko.bindingProvider['instance'],getBindings=provider['getBindingAccessors']||getBindingsAndMakeAccessors;var bindingsUpdater=ko.dependentObservable(function(){bindings=sourceBindings?sourceBindings(bindingContext,node):getBindings.call(provider,node,bindingContext);if(bindings){if(bindingContext[contextSubscribable]){bindingContext[contextSubscribable]();}\nif(bindingContext[contextDataDependency]){bindingContext[contextDataDependency]();}}\nreturn bindings;},null,{disposeWhenNodeIsRemoved:node});if(!bindings||!bindingsUpdater.isActive())\nbindingsUpdater=null;}\nvar contextToExtend=bindingContext;var bindingHandlerThatControlsDescendantBindings;if(bindings){var getValueAccessor=bindingsUpdater?function(bindingKey){return function(){return evaluateValueAccessor(bindingsUpdater()[bindingKey]);};}:function(bindingKey){return bindings[bindingKey];};function allBindings(){return ko.utils.objectMap(bindingsUpdater?bindingsUpdater():bindings,evaluateValueAccessor);}\nallBindings['get']=function(key){return bindings[key]&&evaluateValueAccessor(getValueAccessor(key));};allBindings['has']=function(key){return key in bindings;};if(ko.bindingEvent.childrenComplete in bindings){ko.bindingEvent.subscribe(node,ko.bindingEvent.childrenComplete,function(){var callback=evaluateValueAccessor(bindings[ko.bindingEvent.childrenComplete]);if(callback){var nodes=ko.virtualElements.childNodes(node);if(nodes.length){callback(nodes,ko.dataFor(nodes[0]));}}});}\nif(ko.bindingEvent.descendantsComplete in bindings){contextToExtend=ko.bindingEvent.startPossiblyAsyncContentBinding(node,bindingContext);ko.bindingEvent.subscribe(node,ko.bindingEvent.descendantsComplete,function(){var callback=evaluateValueAccessor(bindings[ko.bindingEvent.descendantsComplete]);if(callback&&ko.virtualElements.firstChild(node)){callback(node);}});}\nvar orderedBindings=topologicalSortBindings(bindings);ko.utils.arrayForEach(orderedBindings,function(bindingKeyAndHandler){var handlerInitFn=bindingKeyAndHandler.handler[\"init\"],handlerUpdateFn=bindingKeyAndHandler.handler[\"update\"],bindingKey=bindingKeyAndHandler.key;if(node.nodeType===8){validateThatBindingIsAllowedForVirtualElements(bindingKey);}\ntry{if(typeof handlerInitFn==\"function\"){ko.dependencyDetection.ignore(function(){var initResult=handlerInitFn(node,getValueAccessor(bindingKey),allBindings,contextToExtend['$data'],contextToExtend);if(initResult&&initResult['controlsDescendantBindings']){if(bindingHandlerThatControlsDescendantBindings!==undefined)\nthrow new Error(\"Multiple bindings (\"+bindingHandlerThatControlsDescendantBindings+\" and \"+bindingKey+\") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.\");bindingHandlerThatControlsDescendantBindings=bindingKey;}});}\nif(typeof handlerUpdateFn==\"function\"){ko.dependentObservable(function(){handlerUpdateFn(node,getValueAccessor(bindingKey),allBindings,contextToExtend['$data'],contextToExtend);},null,{disposeWhenNodeIsRemoved:node});}}catch(ex){ex.message=\"Unable to process binding \\\"\"+bindingKey+\": \"+bindings[bindingKey]+\"\\\"\\nMessage: \"+ex.message;throw ex;}});}\nvar shouldBindDescendants=bindingHandlerThatControlsDescendantBindings===undefined;return{'shouldBindDescendants':shouldBindDescendants,'bindingContextForDescendants':shouldBindDescendants&&contextToExtend};};ko.storedBindingContextForNode=function(node){var bindingInfo=ko.utils.domData.get(node,boundElementDomDataKey);return bindingInfo&&bindingInfo.context;}\nfunction getBindingContext(viewModelOrBindingContext,extendContextCallback){return viewModelOrBindingContext&&(viewModelOrBindingContext instanceof ko.bindingContext)?viewModelOrBindingContext:new ko.bindingContext(viewModelOrBindingContext,undefined,undefined,extendContextCallback);}\nko.applyBindingAccessorsToNode=function(node,bindings,viewModelOrBindingContext){if(node.nodeType===1)\nko.virtualElements.normaliseVirtualElementDomStructure(node);return applyBindingsToNodeInternal(node,bindings,getBindingContext(viewModelOrBindingContext));};ko.applyBindingsToNode=function(node,bindings,viewModelOrBindingContext){var context=getBindingContext(viewModelOrBindingContext);return ko.applyBindingAccessorsToNode(node,makeBindingAccessors(bindings,context,node),context);};ko.applyBindingsToDescendants=function(viewModelOrBindingContext,rootNode){if(rootNode.nodeType===1||rootNode.nodeType===8)\napplyBindingsToDescendantsInternal(getBindingContext(viewModelOrBindingContext),rootNode);};ko.applyBindings=function(viewModelOrBindingContext,rootNode,extendContextCallback){if(!jQueryInstance&&window['jQuery']){jQueryInstance=window['jQuery'];}
2\nif(arguments.length<2){rootNode=document.body;if(!rootNode){throw Error(\"ko.applyBindings: could not find document.body; has the document been loaded?\");}}else if(!rootNode||(rootNode.nodeType!==1&&rootNode.nodeType!==8)){throw Error(\"ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node\");}\napplyBindingsToNodeAndDescendantsInternal(getBindingContext(viewModelOrBindingContext,extendContextCallback),rootNode);};ko.contextFor=function(node){if(node&&(node.nodeType===1||node.nodeType===8)){return ko.storedBindingContextForNode(node);}\nreturn undefined;};ko.dataFor=function(node){var context=ko.contextFor(node);return context?context['$data']:undefined;};ko.exportSymbol('bindingHandlers',ko.bindingHandlers);ko.exportSymbol('bindingEvent',ko.bindingEvent);ko.exportSymbol('bindingEvent.subscribe',ko.bindingEvent.subscribe);ko.exportSymbol('bindingEvent.startPossiblyAsyncContentBinding',ko.bindingEvent.startPossiblyAsyncContentBinding);ko.exportSymbol('applyBindings',ko.applyBindings);ko.exportSymbol('applyBindingsToDescendants',ko.applyBindingsToDescendants);ko.exportSymbol('applyBindingAccessorsToNode',ko.applyBindingAccessorsToNode);ko.exportSymbol('applyBindingsToNode',ko.applyBindingsToNode);ko.exportSymbol('contextFor',ko.contextFor);ko.exportSymbol('dataFor',ko.dataFor);})();(function(undefined){var loadingSubscribablesCache={},loadedDefinitionsCache={};ko.components={get:function(componentName,callback){var cachedDefinition=getObjectOwnProperty(loadedDefinitionsCache,componentName);if(cachedDefinition){if(cachedDefinition.isSynchronousComponent){ko.dependencyDetection.ignore(function(){callback(cachedDefinition.definition);});}else{ko.tasks.schedule(function(){callback(cachedDefinition.definition);});}}else{loadComponentAndNotify(componentName,callback);}},clearCachedDefinition:function(componentName){delete loadedDefinitionsCache[componentName];},_getFirstResultFromLoaders:getFirstResultFromLoaders};function getObjectOwnProperty(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)?obj[propName]:undefined;}\nfunction loadComponentAndNotify(componentName,callback){var subscribable=getObjectOwnProperty(loadingSubscribablesCache,componentName),completedAsync;if(!subscribable){subscribable=loadingSubscribablesCache[componentName]=new ko.subscribable();subscribable.subscribe(callback);beginLoadingComponent(componentName,function(definition,config){var isSynchronousComponent=!!(config&&config['synchronous']);loadedDefinitionsCache[componentName]={definition:definition,isSynchronousComponent:isSynchronousComponent};delete loadingSubscribablesCache[componentName];if(completedAsync||isSynchronousComponent){subscribable['notifySubscribers'](definition);}else{ko.tasks.schedule(function(){subscribable['notifySubscribers'](definition);});}});completedAsync=true;}else{subscribable.subscribe(callback);}}\nfunction beginLoadingComponent(componentName,callback){getFirstResultFromLoaders('getConfig',[componentName],function(config){if(config){getFirstResultFromLoaders('loadComponent',[componentName,config],function(definition){callback(definition,config);});}else{callback(null,null);}});}\nfunction getFirstResultFromLoaders(methodName,argsExceptCallback,callback,candidateLoaders){if(!candidateLoaders){candidateLoaders=ko.components['loaders'].slice(0);}\nvar currentCandidateLoader=candidateLoaders.shift();if(currentCandidateLoader){var methodInstance=currentCandidateLoader[methodName];if(methodInstance){var wasAborted=false,synchronousReturnValue=methodInstance.apply(currentCandidateLoader,argsExceptCallback.concat(function(result){if(wasAborted){callback(null);}else if(result!==null){callback(result);}else{getFirstResultFromLoaders(methodName,argsExceptCallback,callback,candidateLoaders);}}));if(synchronousReturnValue!==undefined){wasAborted=true;if(!currentCandidateLoader['suppressLoaderExceptions']){throw new Error('Component loaders must supply values by invoking the callback, not by returning values synchronously.');}}}else{getFirstResultFromLoaders(methodName,argsExceptCallback,callback,candidateLoaders);}}else{callback(null);}}\nko.components['loaders']=[];ko.exportSymbol('components',ko.components);ko.exportSymbol('components.get',ko.components.get);ko.exportSymbol('components.clearCachedDefinition',ko.components.clearCachedDefinition);})();(function(undefined){var defaultConfigRegistry={};ko.components.register=function(componentName,config){if(!config){throw new Error('Invalid configuration for '+componentName);}\nif(ko.components.isRegistered(componentName)){throw new Error('Component '+componentName+' is already registered');}\ndefaultConfigRegistry[componentName]=config;};ko.components.isRegistered=function(componentName){return Object.prototype.hasOwnProperty.call(defaultConfigRegistry,componentName);};ko.components.unregister=function(componentName){delete defaultConfigRegistry[componentName];ko.components.clearCachedDefinition(componentName);};ko.components.defaultLoader={'getConfig':function(componentName,callback){var result=ko.components.isRegistered(componentName)?defaultConfigRegistry[componentName]:null;callback(result);},'loadComponent':function(componentName,config,callback){var errorCallback=makeErrorCallback(componentName);possiblyGetConfigFromAmd(errorCallback,config,function(loadedConfig){resolve
2Config(componentName,errorCallback,loadedConfig,callback);});},'loadTemplate':function(componentName,templateConfig,callback){resolveTemplate(makeErrorCallback(componentName),templateConfig,callback);},'loadViewModel':function(componentName,viewModelConfig,callback){resolveViewModel(makeErrorCallback(componentName),viewModelConfig,callback);}};var createViewModelKey='createViewModel';function resolveConfig(componentName,errorCallback,config,callback){var result={},makeCallBackWhenZero=2,tryIssueCallback=function(){if(--makeCallBackWhenZero===0){callback(result);}},templateConfig=config['template'],viewModelConfig=config['viewModel'];if(templateConfig){possiblyGetConfigFromAmd(errorCallback,templateConfig,function(loadedConfig){ko.components._getFirstResultFromLoaders('loadTemplate',[componentName,loadedConfig],function(resolvedTemplate){result['template']=resolvedTemplate;tryIssueCallback();});});}else{tryIssueCallback();}\nif(viewModelConfig){possiblyGetConfigFromAmd(errorCallback,viewModelConfig,function(loadedConfig){ko.components._getFirstResultFromLoaders('loadViewModel',[componentName,loadedConfig],function(resolvedViewModel){result[createViewModelKey]=resolvedViewModel;tryIssueCallback();});});}else{tryIssueCallback();}}\nfunction resolveTemplate(errorCallback,templateConfig,callback){if(typeof templateConfig==='string'){callback(ko.utils.parseHtmlFragment(templateConfig));}else if(templateConfig instanceof Array){callback(templateConfig);}else if(isDocumentFragment(templateConfig)){callback(ko.utils.makeArray(templateConfig.childNodes));}else if(templateConfig['element']){var element=templateConfig['element'];if(isDomElement(element)){callback(cloneNodesFromTemplateSourceElement(element));}else if(typeof element==='string'){var elemInstance=document.getElementById(element);if(elemInstance){callback(cloneNodesFromTemplateSourceElement(elemInstance));}else{errorCallback('Cannot find element with ID '+element);}}else{errorCallback('Unknown element type: '+element);}}else{errorCallback('Unknown template value: '+templateConfig);}}\nfunction resolveViewModel(errorCallback,viewModelConfig,callback){if(typeof viewModelConfig==='function'){callback(function(params){return new viewModelConfig(params);});}else if(typeof viewModelConfig[createViewModelKey]==='function'){callback(viewModelConfig[createViewModelKey]);}else if('instance'in viewModelConfig){var fixedInstance=viewModelConfig['instance'];callback(function(params,componentInfo){return fixedInstance;});}else if('viewModel'in viewModelConfig){resolveViewModel(errorCallback,viewModelConfig['viewModel'],callback);}else{errorCallback('Unknown viewModel value: '+viewModelConfig);}}\nfunction cloneNodesFromTemplateSourceElement(elemInstance){switch(ko.utils.tagNameLower(elemInstance)){case'script':return ko.utils.parseHtmlFragment(elemInstance.text);case'textarea':return ko.utils.parseHtmlFragment(elemInstance.value);case'template':if(isDocumentFragment(elemInstance.content)){return ko.utils.cloneNodes(elemInstance.content.childNodes);}}\nreturn ko.utils.cloneNodes(elemInstance.childNodes);}\nfunction isDomElement(obj){if(window['HTMLElement']){return obj instanceof HTMLElement;}else{return obj&&obj.tagName&&obj.nodeType===1;}}\nfunction isDocumentFragment(obj){if(window['DocumentFragment']){return obj instanceof DocumentFragment;}else{return obj&&obj.nodeType===11;}}\nfunction possiblyGetConfigFromAmd(errorCallback,config,callback){if(typeof config['require']==='string'){if(amdRequire||window['require']){(amdRequire||window['require'])([config['require']],function(module){if(module&&typeof module==='object'&&module.__esModule&&module.default){module=module.default;}\ncallback(module);});}else{errorCallback('Uses require, but no AMD loader is present');}}else{callback(config);}}\nfunction makeErrorCallback(componentName){return function(message){throw new Error('Component \\''+componentName+'\\': '+message);};}\nko.exportSymbol('components.register',ko.components.register);ko.exportSymbol('components.isRegistered',ko.components.isRegistered);ko.exportSymbol('components.unregister',ko.components.unregister);ko.exportSymbol('components.defaultLoader',ko.components.defaultLoader);ko.components['loaders'].push(ko.components.defaultLoader);ko.components._allRegisteredComponents=defaultConfigRegistry;})();(function(undefined){ko.components['getComponentNameForNode']=function(node){var tagNameLower=ko.utils.tagNameLower(node);if(ko.components.isRegistered(tagNameLower)){if(tagNameLower.indexOf('-')!=-1||(''+node)==\"[object HTMLUnknownElement]\"||(ko.utils.ieVersion<=8&&node.tagName===tagNameLower)){return tagNameLower;}}};ko.components.addBindingsForCustomElement=function(allBindings,node,bindingContext,valueAccessors){if(node.nodeType===1){var componentName=ko.components['getComponentNameForNode'](node);if(componentName){allBindings=allBindings||{};if(allBindings['component']){throw new Error('Cannot use the \"component\" binding on a custom element matching a component');}\nvar componentBindingValue={'name':componentName,'params':getComponentParamsFromCustomElement(node,bindingContext)};allBindings['component']=valueAccessors?function(){return componentBindingValue;}:componentBindingValue;}}\nreturn allBindings;}\nvar nativeBindingProviderInstance=new ko.bindingProvider();function getComponentParamsFromCustomElement(elem,bindingContext){var paramsAttribute=elem.getAttribute('params');if(paramsAttribute){var params=nativeBindingProviderInstance['parseBindingsString'](paramsAttribute,bindingContext,elem,{'valueAccessors':true,'bindingParams':true}),rawParamComputedValues=ko.utils.objectMap(params,function(paramValue,paramName){return ko.computed(paramValue,null,{disposeWhenNodeIsRemoved:elem});}),result=ko.utils.objectMap(rawParamComputedValues,function(paramValueComputed,paramName){var paramValue=paramValueComputed.peek();if(!paramValueComputed.isActive()){return paramValue;}else{return ko.computed({'read':function(){return ko.utils.unwrapObservable(paramValueComputed());},'write':ko.isWriteableObservable(paramValue)&&function(value){paramValueComputed()(value);},disposeWhenNodeIsRemoved:elem});}});if(!Object.prototype.hasOwnProperty.call(result,'$raw')){result['$raw']=rawParamComputedValues;}\nreturn result;}else{return{'$raw':{}};}}\nif(ko.utils.ieVersion<9){ko.components['register']=(function(originalFunction){return function(componentName){document.createElement(componentName);return originalFunction.apply(this,arguments);}}
2)(ko.components['register']);document.createDocumentFragment=(function(originalFunction){return function(){var newDocFrag=originalFunction(),allComponents=ko.components._allRegisteredComponents;for(var componentName in allComponents){if(Object.prototype.hasOwnProperty.call(allComponents,componentName)){newDocFrag.createElement(componentName);}}\nreturn newDocFrag;};})(document.createDocumentFragment);}})();(function(undefined){var componentLoadingOperationUniqueId=0;ko.bindingHandlers['component']={'init':function(element,valueAccessor,ignored1,ignored2,bindingContext){var currentViewModel,currentLoadingOperationId,afterRenderSub,disposeAssociatedComponentViewModel=function(){var currentViewModelDispose=currentViewModel&¤tViewModel['dispose'];if(typeof currentViewModelDispose==='function'){currentViewModelDispose.call(currentViewModel);}\nif(afterRenderSub){afterRenderSub.dispose();}\nafterRenderSub=null;currentViewModel=null;currentLoadingOperationId=null;},originalChildNodes=ko.utils.makeArray(ko.virtualElements.childNodes(element));ko.virtualElements.emptyNode(element);ko.utils.domNodeDisposal.addDisposeCallback(element,disposeAssociatedComponentViewModel);ko.computed(function(){var value=ko.utils.unwrapObservable(valueAccessor()),componentName,componentParams;if(typeof value==='string'){componentName=value;}else{componentName=ko.utils.unwrapObservable(value['name']);componentParams=ko.utils.unwrapObservable(value['params']);}\nif(!componentName){throw new Error('No component name specified');}\nvar asyncContext=ko.bindingEvent.startPossiblyAsyncContentBinding(element,bindingContext);var loadingOperationId=currentLoadingOperationId=++componentLoadingOperationUniqueId;ko.components.get(componentName,function(componentDefinition){if(currentLoadingOperationId!==loadingOperationId){return;}\ndisposeAssociatedComponentViewModel();if(!componentDefinition){throw new Error('Unknown component \\''+componentName+'\\'');}\ncloneTemplateIntoElement(componentName,componentDefinition,element);var componentInfo={'element':element,'templateNodes':originalChildNodes};var componentViewModel=createViewModel(componentDefinition,componentParams,componentInfo),childBindingContext=asyncContext['createChildContext'](componentViewModel,{'extend':function(ctx){ctx['$component']=componentViewModel;ctx['$componentTemplateNodes']=originalChildNodes;}});if(componentViewModel&&componentViewModel['koDescendantsComplete']){afterRenderSub=ko.bindingEvent.subscribe(element,ko.bindingEvent.descendantsComplete,componentViewModel['koDescendantsComplete'],componentViewModel);}\ncurrentViewModel=componentViewModel;ko.applyBindingsToDescendants(childBindingContext,element);});},null,{disposeWhenNodeIsRemoved:element});return{'controlsDescendantBindings':true};}};ko.virtualElements.allowedBindings['component']=true;function cloneTemplateIntoElement(componentName,componentDefinition,element){var template=componentDefinition['template'];if(!template){throw new Error('Component \\''+componentName+'\\' has no template');}\nvar clonedNodesArray=ko.utils.cloneNodes(template);ko.virtualElements.setDomNodeChildren(element,clonedNodesArray);}\nfunction createViewModel(componentDefinition,componentParams,componentInfo){var componentViewModelFactory=componentDefinition['createViewModel'];return componentViewModelFactory?componentViewModelFactory.call(componentDefinition,componentParams,componentInfo):componentParams;}})();var attrHtmlToJavaScriptMap={'class':'className','for':'htmlFor'};ko.bindingHandlers['attr']={'update':function(element,valueAccessor,allBindings){var value=ko.utils.unwrapObservable(valueAccessor())||{};ko.utils.objectForEach(value,function(attrName,attrValue){attrValue=ko.utils.unwrapObservable(attrValue);var prefixLen=attrName.indexOf(':');var namespace=\"lookupNamespaceURI\"in element&&prefixLen>0&&element.lookupNamespaceURI(attrName.substr(0,prefixLen));var toRemove=(attrValue===false)||(attrValue===null)||(attrValue===undefined);if(toRemove){namespace?element.removeAttributeNS(namespace,attrName):element.removeAttribute(attrName);}else{attrValue=attrValue.toString();}\nif(ko.utils.ieVersion<=8&&attrName in attrHtmlToJavaScriptMap){attrName=attrHtmlToJavaScriptMap[attrName];if(toRemove)\nelement.removeAttribute(attrName);else\nelement[attrName]=attrValue;}else if(!toRemove){namespace?element.setAttributeNS(namespace,attrName,attrValue):element.setAttribute(attrName,attrValue);}
2\nif(attrName===\"name\"){ko.utils.setElementName(element,toRemove?\"\":attrValue);}});}};(function(){ko.bindingHandlers['checked']={'after':['value','attr'],'init':function(element,valueAccessor,allBindings){var checkedValue=ko.pureComputed(function(){if(allBindings['has']('checkedValue')){return ko.utils.unwrapObservable(allBindings.get('checkedValue'));}else if(useElementValue){if(allBindings['has']('value')){return ko.utils.unwrapObservable(allBindings.get('value'));}else{return element.value;}}});function updateModel(){var isChecked=element.checked,elemValue=checkedValue();if(ko.computedContext.isInitial()){return;}\nif(!isChecked&&(isRadio||ko.computedContext.getDependenciesCount())){return;}\nvar modelValue=ko.dependencyDetection.ignore(valueAccessor);if(valueIsArray){var writableValue=rawValueIsNonArrayObservable?modelValue.peek():modelValue,saveOldValue=oldElemValue;oldElemValue=elemValue;if(saveOldValue!==elemValue){if(isChecked){ko.utils.addOrRemoveItem(writableValue,elemValue,true);ko.utils.addOrRemoveItem(writableValue,saveOldValue,false);}}else{ko.utils.addOrRemoveItem(writableValue,elemValue,isChecked);}\nif(rawValueIsNonArrayObservable&&ko.isWriteableObservable(modelValue)){modelValue(writableValue);}}else{if(isCheckbox){if(elemValue===undefined){elemValue=isChecked;}else if(!isChecked){elemValue=undefined;}}\nko.expressionRewriting.writeValueToProperty(modelValue,allBindings,'checked',elemValue,true);}};function updateView(){var modelValue=ko.utils.unwrapObservable(valueAccessor()),elemValue=checkedValue();if(valueIsArray){element.checked=ko.utils.arrayIndexOf(modelValue,elemValue)>=0;oldElemValue=elemValue;}else if(isCheckbox&&elemValue===undefined){element.checked=!!modelValue;}else{element.checked=(checkedValue()===modelValue);}};var isCheckbox=element.type==\"checkbox\",isRadio=element.type==\"radio\";if(!isCheckbox&&!isRadio){return;}\nvar rawValue=valueAccessor(),valueIsArray=isCheckbox&&(ko.utils.unwrapObservable(rawValue)instanceof Array),rawValueIsNonArrayObservable=!(valueIsArray&&rawValue.push&&rawValue.splice),useElementValue=isRadio||valueIsArray,oldElemValue=valueIsArray?checkedValue():undefined;if(isRadio&&!element.name)\nko.bindingHandlers['uniqueName']['init'](element,function(){return true});ko.computed(updateModel,null,{disposeWhenNodeIsRemoved:element});ko.utils.registerEventHandler(element,\"click\",updateModel);ko.computed(updateView,null,{disposeWhenNodeIsRemoved:element});rawValue=undefined;}};ko.expressionRewriting.twoWayBindings['checked']=true;ko.bindingHandlers['checkedValue']={'update':function(element,valueAccessor){element.value=ko.utils.unwrapObservable(valueAccessor());}};})();var classesWrittenByBindingKey='__ko__cssValue';ko.bindingHandlers['class']={'update':function(element,valueAccessor){var value=ko.utils.stringTrim(ko.utils.unwrapObservable(valueAccessor()));ko.utils.toggleDomNodeCssClass(element,element[classesWrittenByBindingKey],false);element[classesWrittenByBindingKey]=value;ko.utils.toggleDomNodeCssClass(element,value,true);}};ko.bindingHandlers['css']={'update':function(element,valueAccessor){var value=ko.utils.unwrapObservable(valueAccessor());if(value!==null&&typeof value==\"object\"){ko.utils.objectForEach(value,function(className,shouldHaveClass){shouldHaveClass=ko.utils.unwrapObservable(shouldHaveClass);ko.utils.toggleDomNodeCssClass(element,className,shouldHaveClass);});}else{ko.bindingHandlers['class']['update'](element,valueAccessor);}}};ko.bindingHandlers['enable']={'update':function(element,valueAccessor){var value=ko.utils.unwrapObservable(valueAccessor());if(value&&element.disabled)\nelement.removeAttribute(\"disabled\");else if((!value)&&(!element.disabled))\nelement.disabled=true;}};ko.bindingHandlers['disable']={'update':function(element,valueAccessor){ko.bindingHandlers['enable']['update'](element,function(){return!ko.utils.unwrapObservable(valueAccessor())});}};function makeEventHandlerShortcut(eventName){ko.bindingHandlers[eventName]={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){var newValueAccessor=function(){var result={};result[eventName]=valueAccessor();return result;};return ko.bindingHandlers['event']['init'].call(this,element,newValueAccessor,allBindings,viewModel,bindingContext);}}}\nko.bindingHandlers['event']={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){var eventsToHandle=valueAccessor()||{};ko.utils.objectForEach(eventsToHandle,function(eventName){if(typeof eventName==\"string\"){ko.utils.registerEventHandler(element,eventName,function(event){var handlerReturnValue;var handlerFunction=valueAccessor()[eventName];if(!handlerFunction)\nreturn;try{var argsForHandler=ko.utils.makeArray(arguments);viewModel=bindingContext['$data'];argsForHandler.unshift(viewModel);handlerReturnValue=handlerFunction.apply(viewModel,argsForHandler);}finally{if(handlerReturnValue!==true){if(event.preventDefault)\nevent.preventDefault();else\nevent.returnValue=false;}}\nvar bubble=allBindings.get(eventName+'Bubble')!==false;if(!bubble){event.cancelBubble=true;if(event.stopPropagation)\nevent.stopPropagation();}});}});}};ko.bindingHandlers['foreach']={makeTemplateValueAccessor:function(valueAccessor){return function(){var modelValue=valueAccessor(),unwrappedValue=ko.utils.peekObservable(modelValue);
2if((!unwrappedValue)||typeof unwrappedValue.length==\"number\")\nreturn{'foreach':modelValue,'templateEngine':ko.nativeTemplateEngine.instance};ko.utils.unwrapObservable(modelValue);return{'foreach':unwrappedValue['data'],'as':unwrappedValue['as'],'noChildContext':unwrappedValue['noChildContext'],'includeDestroyed':unwrappedValue['includeDestroyed'],'afterAdd':unwrappedValue['afterAdd'],'beforeRemove':unwrappedValue['beforeRemove'],'afterRender':unwrappedValue['afterRender'],'beforeMove':unwrappedValue['beforeMove'],'afterMove':unwrappedValue['afterMove'],'templateEngine':ko.nativeTemplateEngine.instance};};},'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){return ko.bindingHandlers['template']['init'](element,ko.bindingHandlers['foreach'].makeTemplateValueAccessor(valueAccessor));},'update':function(element,valueAccessor,allBindings,viewModel,bindingContext){return ko.bindingHandlers['template']['update'](element,ko.bindingHandlers['foreach'].makeTemplateValueAccessor(valueAccessor),allBindings,viewModel,bindingContext);}};ko.expressionRewriting.bindingRewriteValidators['foreach']=false;ko.virtualElements.allowedBindings['foreach']=true;var hasfocusUpdatingProperty='__ko_hasfocusUpdating';var hasfocusLastValue='__ko_hasfocusLastValue';ko.bindingHandlers['hasfocus']={'init':function(element,valueAccessor,allBindings){var handleElementFocusChange=function(isFocused){element[hasfocusUpdatingProperty]=true;var ownerDoc=element.ownerDocument;if(\"activeElement\"in ownerDoc){var active;try{active=ownerDoc.activeElement;}catch(e){active=ownerDoc.body;}\nisFocused=(active===element);}\nvar modelValue=valueAccessor();ko.expressionRewriting.writeValueToProperty(modelValue,allBindings,'hasfocus',isFocused,true);element[hasfocusLastValue]=isFocused;element[hasfocusUpdatingProperty]=false;};var handleElementFocusIn=handleElementFocusChange.bind(null,true);var handleElementFocusOut=handleElementFocusChange.bind(null,false);ko.utils.registerEventHandler(element,\"focus\",handleElementFocusIn);ko.utils.registerEventHandler(element,\"focusin\",handleElementFocusIn);ko.utils.registerEventHandler(element,\"blur\",handleElementFocusOut);ko.utils.registerEventHandler(element,\"focusout\",handleElementFocusOut);element[hasfocusLastValue]=false;},'update':function(element,valueAccessor){var value=!!ko.utils.unwrapObservable(valueAccessor());if(!element[hasfocusUpdatingProperty]&&element[hasfocusLastValue]!==value){value?element.focus():element.blur();if(!value&&element[hasfocusLastValue]){element.ownerDocument.body.focus();}\nko.dependencyDetection.ignore(ko.utils.triggerEvent,null,[element,value?\"focusin\":\"focusout\"]);}}};ko.expressionRewriting.twoWayBindings['hasfocus']=true;ko.bindingHandlers['hasFocus']=ko.bindingHandlers['hasfocus'];ko.expressionRewriting.twoWayBindings['hasFocus']='hasfocus';ko.bindingHandlers['html']={'init':function(){return{'controlsDescendantBindings':true};},'update':function(element,valueAccessor){ko.utils.setHtml(element,valueAccessor());}};(function(){function makeWithIfBinding(bindingKey,isWith,isNot){ko.bindingHandlers[bindingKey]={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){var didDisplayOnLastUpdate,savedNodes,contextOptions={},completeOnRender,needAsyncContext,renderOnEveryChange;if(isWith){var as=allBindings.get('as'),noChildContext=allBindings.get('noChildContext');renderOnEveryChange=!(as&&noChildContext);contextOptions={'as':as,'noChildContext':noChildContext,'exportDependencies':renderOnEveryChange};}\ncompleteOnRender=allBindings.get(\"completeOn\")==\"render\";needAsyncContext=completeOnRender||allBindings['has'](ko.bindingEvent.descendantsComplete);ko.computed(function(){var value=ko.utils.unwrapObservable(valueAccessor()),shouldDisplay=!isNot!==!value,isInitial=!savedNodes,childContext;if(!renderOnEveryChange&&shouldDisplay===didDisplayOnLastUpdate){return;}\nif(needAsyncContext){bindingContext=ko.bindingEvent.startPossiblyAsyncContentBinding(element,bindingContext);}\nif(shouldDisplay){if(!isWith||renderOnEveryChange){contextOptions['dataDependency']=ko.c
2omputedContext.computed();}\nif(isWith){childContext=bindingContext['createChildContext'](typeof value==\"function\"?value:valueAccessor,contextOptions);}else if(ko.computedContext.getDependenciesCount()){childContext=bindingContext['extend'](null,contextOptions);}else{childContext=bindingContext;}}\nif(isInitial&&ko.computedContext.getDependenciesCount()){savedNodes=ko.utils.cloneNodes(ko.virtualElements.childNodes(element),true);}\nif(shouldDisplay){if(!isInitial){ko.virtualElements.setDomNodeChildren(element,ko.utils.cloneNodes(savedNodes));}\nko.applyBindingsToDescendants(childContext,element);}else{ko.virtualElements.emptyNode(element);if(!completeOnRender){ko.bindingEvent.notify(element,ko.bindingEvent.childrenComplete);}}\ndidDisplayOnLastUpdate=shouldDisplay;},null,{disposeWhenNodeIsRemoved:element});return{'controlsDescendantBindings':true};}};ko.expressionRewriting.bindingRewriteValidators[bindingKey]=false;ko.virtualElements.allowedBindings[bindingKey]=true;}\nmakeWithIfBinding('if');makeWithIfBinding('ifnot',false,true);makeWithIfBinding('with',true);})();ko.bindingHandlers['let']={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){var innerContext=bindingContext['extend'](valueAccessor);ko.applyBindingsToDescendants(innerContext,element);return{'controlsDescendantBindings':true};}};ko.virtualElements.allowedBindings['let']=true;var captionPlaceholder={};ko.bindingHandlers['options']={'init':function(element){if(ko.utils.tagNameLower(element)!==\"select\")\nthrow new Error(\"options binding applies only to SELECT elements\");while(element.length>0){element.remove(0);}\nreturn{'controlsDescendantBindings':true};},'update':function(element,valueAccessor,allBindings){function selectedOptions(){return ko.utils.arrayFilter(element.options,function(node){return node.selected;});}\nvar selectWasPreviouslyEmpty=element.length==0,multiple=element.multiple,previousScrollTop=(!selectWasPreviouslyEmpty&&multiple)?element.scrollTop:null,unwrappedArray=ko.utils.unwrapObservable(valueAccessor()),valueAllowUnset=allBindings.get('valueAllowUnset')&&allBindings['has']('value'),includeDestroyed=allBindings.get('optionsIncludeDestroyed'),arrayToDomNodeChildrenOptions={},captionValue,filteredArray,previousSelectedValues=[];if(!valueAllowUnset){if(multiple){previousSelectedValues=ko.utils.arrayMap(selectedOptions(),ko.selectExtensions.readValue);}else if(element.selectedIndex>=0){previousSelectedValues.push(ko.selectExtensions.readValue(element.options[element.selectedIndex]));}}\nif(unwrappedArray){if(typeof unwrappedArray.length==\"undefined\")\nunwrappedArray=[unwrappedArray];filteredArray=ko.utils.arrayFilter(unwrappedArray,function(item){return includeDestroyed||item===undefined||item===null||!ko.utils.unwrapObservable(item['_destroy']);});if(allBindings['has']('optionsCaption')){captionValue=ko.utils.unwrapObservable(allBindings.get('optionsCaption'));if(captionValue!==null&&captionValue!==undefined){filteredArray.unshift(captionPlaceholder);}}}else{}\nfunction applyToObject(object,predicate,defaultValue){var predicateType=typeof predicate;if(predicateType==\"function\")\nreturn predicate(object);else if(predicateType==\"string\")\nreturn object[predicate];else\nreturn defaultValue;}\nvar itemUpdate=false;function optionForArrayItem(arrayEntry,index,oldOptions){if(oldOptions.length){previousSelectedValues=!valueAllowUnset&&oldOptions[0].selected?[ko.selectExtensions.readValue(oldOptions[0])]:[];itemUpdate=true;}\nvar option=element.ownerDocument.createElement(\"option\");if(arrayEntry===captionPlaceholder){ko.utils.setTextContent(option,allBindings.get('optionsCaption'));ko.selectExtensions.writeValue(option,undefined);}else{var optionValue=applyToObject(arrayEntry,allBindings.get('optionsValue'),arrayEntry);ko.selectExtensions.writeValue(option,ko.utils.unwrapObservable(optionValue));var optionText=applyToObject(arrayEntry,allBindings.get('optionsText'),optionValue);ko.utils.setTextContent(option,optionText);}\nreturn[option];}\narrayToDomNodeChildrenOptions['beforeRemove']=function(option){element.removeChild(option);};function setSelectionCallback(arrayEntry,newOptions){if(itemUpdate&&valueAllowUnset){ko.bindingEvent.notify(element,ko.bindingEvent.childrenComplete);}else if(previousSelectedValues.length){var isSelected=ko.utils.arrayIndexOf(previousSelectedValues,ko.selectExtensions.readValue(newOptions[0]))>=0;ko.utils.setOptionNodeSelectionState(newOptions[0],isSelected);if(itemUpdate&&!isSelected){ko.dependencyDetection.ignore(ko.utils.triggerEvent,null,[element,\"change\"]);}}}\nvar callback=setSelectionCallback;if(allBindings['has']('optionsAfterRender')&&typeof allBindings.get('optionsAfterRender')==\"function\"){callback=function(arrayEntry,newOptions){setSelectionCallback(arrayEntry,newOptions);ko.dependencyDetection.ignore(allBindings.get('optionsAfterRender'),null,[newOptions[0],arrayEntry!==captionPlaceholder?arrayEntry:undefined]);}}\nko.utils.setDomNodeChildrenFromArrayMapping(element,filteredArray,optionForArrayItem,arrayToDomNodeChildrenOptions,callback);if(!valueAllowUnset){var selectionChanged;if(multiple){selectionChanged=previousSelectedValues.length&&selectedOptions().length<previousSelectedValues.length;}else{selectionChanged=(previousSelectedValues.length&&element.selectedIndex>=0)?(ko.selectExtensions.readValue(element.options[element.selectedIndex])!==previousSelectedValues[0]):(previousSelectedValues.length||element.selectedIndex>=0);}\nif(selectionChanged){ko.dependencyDetection.ignore(ko.utils.triggerEvent,null,[element,\"change\"]);}}\nif(valueAllowUnset||ko.computedContext.isInitial()){ko.bindingEvent.notify(element,ko.bindingEvent.childrenComplete);}\nko.utils.ensureSelectElementIsRenderedCorrectly(element);if(previousScrollTop&&Math.abs(previousScrollTop-element.scrollTop)>20)\nelement.scrollTop=previousScrollTop;}};ko.bindingHandlers['options'].optionValueDomDataKey=ko.utils.domData.nextKey();ko.bindingHandlers['selectedOptions']={'init':function(element,valueAccessor,allBindings){function updateFromVie
2w(){var value=valueAccessor(),valueToWrite=[];ko.utils.arrayForEach(element.getElementsByTagName(\"option\"),function(node){if(node.selected)\nvalueToWrite.push(ko.selectExtensions.readValue(node));});ko.expressionRewriting.writeValueToProperty(value,allBindings,'selectedOptions',valueToWrite);}\nfunction updateFromModel(){var newValue=ko.utils.unwrapObservable(valueAccessor()),previousScrollTop=element.scrollTop;if(newValue&&typeof newValue.length==\"number\"){ko.utils.arrayForEach(element.getElementsByTagName(\"option\"),function(node){var isSelected=ko.utils.arrayIndexOf(newValue,ko.selectExtensions.readValue(node))>=0;if(node.selected!=isSelected){ko.utils.setOptionNodeSelectionState(node,isSelected);}});}\nelement.scrollTop=previousScrollTop;}\nif(ko.utils.tagNameLower(element)!=\"select\"){throw new Error(\"selectedOptions binding applies only to SELECT elements\");}\nvar updateFromModelComputed;ko.bindingEvent.subscribe(element,ko.bindingEvent.childrenComplete,function(){if(!updateFromModelComputed){ko.utils.registerEventHandler(element,\"change\",updateFromView);updateFromModelComputed=ko.computed(updateFromModel,null,{disposeWhenNodeIsRemoved:element});}else{updateFromView();}},null,{'notifyImmediately':true});},'update':function(){}};ko.expressionRewriting.twoWayBindings['selectedOptions']=true;ko.bindingHandlers['style']={'update':function(element,valueAccessor){var value=ko.utils.unwrapObservable(valueAccessor()||{});ko.utils.objectForEach(value,function(styleName,styleValue){styleValue=ko.utils.unwrapObservable(styleValue);if(styleValue===null||styleValue===undefined||styleValue===false){styleValue=\"\";}\nif(jQueryInstance){jQueryInstance(element)['css'](styleName,styleValue);}else if(/^--/.test(styleName)){element.style.setProperty(styleName,styleValue);}else{styleName=styleName.replace(/-(\\w)/g,function(all,letter){return letter.toUpperCase();});var previousStyle=element.style[styleName];element.style[styleName]=styleValue;if(styleValue!==previousStyle&&element.style[styleName]==previousStyle&&!isNaN(styleValue)){element.style[styleName]=styleValue+\"px\";}}});}};ko.bindingHandlers['submit']={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){if(typeof valueAccessor()!=\"function\")\nthrow new Error(\"The value for a submit binding must be a function\");ko.utils.registerEventHandler(element,\"submit\",function(event){var handlerReturnValue;var value=valueAccessor();try{handlerReturnValue=value.call(bindingContext['$data'],element);}\nfinally{if(handlerReturnValue!==true){if(event.preventDefault)\nevent.preventDefault();else\nevent.returnValue=false;}}});}};ko.bindingHandlers['text']={'init':function(){return{'controlsDescendantBindings':true};},'update':function(element,valueAccessor){ko.utils.setTextContent(element,valueAccessor());}};ko.virtualElements.allowedBindings['text']=true;(function(){if(window&&window.navigator){var parseVersion=function(matches){if(matches){return parseFloat(matches[1]);}};var userAgent=window.navigator.userAgent,operaVersion,chromeVersion,safariVersion,firefoxVersion,ieVersion,edgeVersion;(operaVersion=window.opera&&window.opera.version&&parseInt(window.opera.version()))||(edgeVersion=parseVersion(userAgent.match(/Edge\\/([^ ]+)$/)))||(chromeVersion=parseVersion(userAgent.match(/Chrome\\/([^ ]+)/)))||(safariVersion=parseVersion(userAgent.match(/Version\\/([^ ]+) Safari/)))||(firefoxVersion=parseVersion(userAgent.match(/Firefox\\/([^ ]+)/)))||(ieVersion=ko.utils.ieVersion||parseVersion(userAgent.match(/MSIE ([^ ]+)/)))||(ieVersion=parseVersion(userAgent.match(/rv:([^ )]+)/)));}\nif(ieVersion>=8&&ieVersion<10){var selectionChangeRegisteredName=ko.utils.domData.nextKey(),selectionChangeHandlerName=ko.utils.domData.nextKey();var selectionChangeHandler=function(event){var target=this.activeElement,handler=target&&ko.utils.domData.get(target,selectionChangeHandlerName);if(handler){handler(event);}};var registerForSelectionChangeEvent=function(element,handler){var ownerDoc=element.ownerDocument;if(!ko.utils.domData.get(ownerDoc,selectionChangeRegisteredName)){ko.utils.domData.set(ownerDoc,selectionChangeRegisteredName,true);ko.utils.registerEventHandler(ownerDoc,'selectionchange',selectionChangeHandler);}\nko.utils.domData.set(element,selectionChangeHandlerName,handler);};}\nko.bindingHandlers['textInput']={'init':function(element,valueAccessor,allBindings){var previousElementValue=element.value,timeoutHandle,elementValueBeforeEvent;var updateModel=function(event){clearTimeout(timeoutHandle);elementValueBeforeEvent=timeoutHandle=undefined;var elementValue=element.value;if(previousElementValue!==elementValue){if(DEBUG&&event)element['_ko_textInputProcessedEvent']=event.type;previousElementValue=elementValue;ko.expressionRewriting.writeValueToProperty(valueAccessor(),allBindings,'textInput',elementValue);}};var deferUpdateModel=function(event){if(!timeoutHandle){elementValueBeforeEvent=element.value;var handler=DEBUG?updateModel.bind(element,{type:event.type}):updateModel;timeoutHandle=ko.utils.setTimeout(handler,4);}};
2var ieUpdateModel=ko.utils.ieVersion==9?deferUpdateModel:updateModel,ourUpdate=false;var updateView=function(){var modelValue=ko.utils.unwrapObservable(valueAccessor());if(modelValue===null||modelValue===undefined){modelValue='';}\nif(elementValueBeforeEvent!==undefined&&modelValue===elementValueBeforeEvent){ko.utils.setTimeout(updateView,4);return;}\nif(element.value!==modelValue){ourUpdate=true;element.value=modelValue;ourUpdate=false;previousElementValue=element.value;}};var onEvent=function(event,handler){ko.utils.registerEventHandler(element,event,handler);};if(DEBUG&&ko.bindingHandlers['textInput']['_forceUpdateOn']){ko.utils.arrayForEach(ko.bindingHandlers['textInput']['_forceUpdateOn'],function(eventName){if(eventName.slice(0,5)=='after'){onEvent(eventName.slice(5),deferUpdateModel);}else{onEvent(eventName,updateModel);}});}else{if(ieVersion){onEvent('keypress',updateModel);}\nif(ieVersion<11){onEvent('propertychange',function(event){if(!ourUpdate&&event.propertyName==='value'){ieUpdateModel(event);}});}\nif(ieVersion==8){onEvent('keyup',updateModel);onEvent('keydown',updateModel);}\nif(registerForSelectionChangeEvent){registerForSelectionChangeEvent(element,ieUpdateModel);onEvent('dragend',deferUpdateModel);}\nif(!ieVersion||ieVersion>=9){onEvent('input',ieUpdateModel);}\nif(safariVersion<5&&ko.utils.tagNameLower(element)===\"textarea\"){onEvent('keydown',deferUpdateModel);onEvent('paste',deferUpdateModel);onEvent('cut',deferUpdateModel);}else if(operaVersion<11){onEvent('keydown',deferUpdateModel);}else if(firefoxVersion<4.0){onEvent('DOMAutoComplete',updateModel);onEvent('dragdrop',updateModel);onEvent('drop',updateModel);}else if(edgeVersion&&element.type===\"number\"){onEvent('keydown',deferUpdateModel);}}\nonEvent('change',updateModel);onEvent('blur',updateModel);ko.computed(updateView,null,{disposeWhenNodeIsRemoved:element});}};ko.expressionRewriting.twoWayBindings['textInput']=true;ko.bindingHandlers['textinput']={'preprocess':function(value,name,addBinding){addBinding('textInput',value);}};})();ko.bindingHandlers['uniqueName']={'init':function(element,valueAccessor){if(valueAccessor()){var name=\"ko_unique_\"+(++ko.bindingHandlers['uniqueName'].currentIndex);ko.utils.setElementName(element,name);}}};ko.bindingHandlers['uniqueName'].currentIndex=0;ko.bindingHandlers['using']={'init':function(element,valueAccessor,allBindings,viewModel,bindingContext){var options;if(allBindings['has']('as')){options={'as':allBindings.get('as'),'noChildContext':allBindings.get('noChildContext')};}\nvar innerContext=bindingContext['createChildContext'](valueAccessor,options);ko.applyBindingsToDescendants(innerContext,element);return{'controlsDescendantBindings':true};}};ko.virtualElements.allowedBindings['using']=true;ko.bindingHandlers['value']={'init':function(element,valueAccessor,allBindings){var tagName=ko.utils.tagNameLower(element),isInputElement=tagName==\"input\";if(isInputElement&&(element.type==\"checkbox\"||element.type==\"radio\")){ko.applyBindingAccessorsToNode(element,{'checkedValue':valueAccessor});return;}\nvar eventsToCatch=[];var requestedEventsToCatch=allBindings.get(\"valueUpdate\");var propertyChangedFired=false;var elementValueBeforeEvent=null;if(requestedEventsToCatch){if(typeof requestedEventsToCatch==\"string\"){eventsToCatch=[requestedEventsToCatch];}else{eventsToCatch=ko.utils.arrayGetDistinctValues(requestedEventsToCatch);}\nko.utils.arrayRemoveItem(eventsToCatch,\"change\");}\nvar valueUpdateHandler=function(){elementValueBeforeEvent=null;propertyChangedFired=false;var modelValue=valueAccessor();var elementValue=ko.selectExtensions.readValue(element);ko.expressionRewriting.writeValueToProperty(modelValue,allBindings,'value',elementValue);}\nvar ieAutoCompleteHackNeeded=ko.utils.ieVersion&&isInputElement&&element.type==\"text\"&&element.autocomplete!=\"off\"&&(!element.form||element.form.autocomplete!=\"off\");if(ieAutoCompleteHackNeeded&&ko.utils.arrayIndexOf(eventsToCatch,\"propertychange\")==-1){ko.utils.registerEventHandler(element,\"propertychange\",function(){propertyChangedFired=true});ko.utils.registerEventHandler(element,\"focus\",function(){propertyChangedFired=false});ko.utils.registerEventHandler(element,\"blur\",function(){if(propertyChangedFired){valueUpdateHandler();}});}\nko.utils.arrayForEach(eventsToCatch,function(eventName){var handler=valueUpdateHandler;if(ko.utils.stringStartsWith(eventName,\"after\")){handler=function(){elementValueBeforeEvent=ko.selectExtensions.readValue(element);ko.utils.setTimeout(valueUpdateHandler,0);};eventName=eventName.substring(\"after\".length);}\nko.utils.registerEventHandler(element,eventName,handler);});var updateFromModel;if(isInputElement&&element.type==\"file\"){updateFromModel=function(){var newValue=ko.utils.unwrapObservable(valueAccessor());if(newValue===null||newValue===undefined||newValue===\"\"){element.value=\"\";}else{ko.dependencyDetection.ignore(valueUpdateHandler);}}}else{updateFromModel=function(){var newValue=ko.utils.unwrapObservable(valueAccessor());var elementValue=ko.selectExtensions.readValue(element);if(elementValueBeforeEvent!==null&&newValue===elementValueBeforeEvent){ko.utils.setTimeout(updateFromModel,0);return;}\nvar valueHasChanged=newValue!==elementValue;if(valueHasChanged||elementValue===undefined){if(tagName===\"select\"){var allowUnset=allBindings.get('valueAllowUnset');ko.selectExtensions.writeValue(element,newValue,allowUnset);if(!allowUnset&&newValue!==ko.selectExtensions.readValue(element)){ko.dependencyDetection.ignore(valueUpdateHandler);}}else{ko.selectExtensions.writeValue(element,newValue);}}};}\nif(tagName===\"select\"){var updateFromModelComputed;ko.bindingEvent.subscribe(element,ko.bindingEvent.childrenComplete,function(){if(!updateFromModelComputed){ko.utils.registerEventHandler(element,\"change\",valueUpdateHandler);updateFromModelComputed=ko.computed(updateFromModel,null,{disposeWhenNodeIsRemoved:element});}else if(allBindings.get('valueAllowUnset')){updateFromModel();}else{valueUpdateHandler();}},null,{'notifyImmediately':true});}else{ko.utils.registerEventHandler(element,\"change\",valueUpdateHandler);ko.computed(updateFromModel,null,{disposeWhenNodeIsRemoved:element});}},'update':function(){}};ko.expressionRewriting.twoWayBindings['value']=true;ko.bindingHandlers['visible']={'update':function(element,valueAccessor){var value=ko.utils.unwrapObservable(valueAccessor());var isCurrentlyVisible=!(element.style.display==\"none\");if(value&&!isCurrentlyVisible)\nelement.style.display=\"\";else if((!value)&&isCurrentlyVisible)\nelement.style.display=\"none\";}};ko.bindingHandlers['hidden']={'update':function(element,valueAccessor){ko.bindingHandlers['visible']['update'](element,function(){return!ko.utils.unwrapObservable(valueAccessor())});}}
2;makeEventHandlerShortcut('click');ko.templateEngine=function(){};ko.templateEngine.prototype['renderTemplateSource']=function(templateSource,bindingContext,options,templateDocument){throw new Error(\"Override renderTemplateSource\");};ko.templateEngine.prototype['createJavaScriptEvaluatorBlock']=function(script){throw new Error(\"Override createJavaScriptEvaluatorBlock\");};ko.templateEngine.prototype['makeTemplateSource']=function(template,templateDocument){if(typeof template==\"string\"){templateDocument=templateDocument||document;var elem=templateDocument.getElementById(template);if(!elem)\nthrow new Error(\"Cannot find template with ID \"+template);return new ko.templateSources.domElement(elem);}else if((template.nodeType==1)||(template.nodeType==8)){return new ko.templateSources.anonymousTemplate(template);}else\nthrow new Error(\"Unknown template type: \"+template);};ko.templateEngine.prototype['renderTemplate']=function(template,bindingContext,options,templateDocument){var templateSource=this['makeTemplateSource'](template,templateDocument);return this['renderTemplateSource'](templateSource,bindingContext,options,templateDocument);};ko.templateEngine.prototype['isTemplateRewritten']=function(template,templateDocument){if(this['allowTemplateRewriting']===false)\nreturn true;return this['makeTemplateSource'](template,templateDocument)['data'](\"isRewritten\");};ko.templateEngine.prototype['rewriteTemplate']=function(template,rewriterCallback,templateDocument){var templateSource=this['makeTemplateSource'](template,templateDocument);var rewritten=rewriterCallback(templateSource['text']());templateSource['text'](rewritten);templateSource['data'](\"isRewritten\",true);};ko.exportSymbol('templateEngine',ko.templateEngine);ko.templateRewriting=(function(){var memoizeDataBindingAttributeSyntaxRegex=/(<([a-z]+\\d*)(?:\\s+(?!data-bind\\s*=\\s*)[a-z0-9\\-]+(?:=(?:\\\"[^\\\"]*\\\"|\\'[^\\']*\\'|[^>]*))?)*\\s+)data-bind\\s*=\\s*([\"'])([\\s\\S]*?)\\3/gi;var memoizeVirtualContainerBindingSyntaxRegex=/<!--\\s*ko\\b\\s*([\\s\\S]*?)\\s*-->/g;function validateDataBindValuesForRewriting(keyValueArray){var allValidators=ko.expressionRewriting.bindingRewriteValidators;for(var i=0;i<keyValueArray.length;i++){var key=keyValueArray[i]['key'];if(Object.prototype.hasOwnProperty.call(allValidators,key)){var validator=allValidators[key];if(typeof validator===\"function\"){var possibleErrorMessage=validator(keyValueArray[i]['value']);if(possibleErrorMessage)\nthrow new Error(possibleErrorMessage);}else if(!validator){throw new Error(\"This template engine does not support the '\"+key+\"' binding within its templates\");}}}}\nfunction constructMemoizedTagReplacement(dataBindAttributeValue,tagToRetain,nodeName,templateEngine){var dataBindKeyValueArray=ko.expressionRewriting.parseObjectLiteral(dataBindAttributeValue);validateDataBindValuesForRewriting(dataBindKeyValueArray);var rewrittenDataBindAttributeValue=ko.expressionRewriting.preProcessBindings(dataBindKeyValueArray,{'valueAccessors':true});var applyBindingsToNextSiblingScript=\"ko.__tr_ambtns(function($context,$element){return(function(){return{ \"+rewrittenDataBindAttributeValue+\" } })()},'\"+nodeName.toLowerCase()+\"')\";return templateEngine['createJavaScriptEvaluatorBlock'](applyBindingsToNextSiblingScript)+tagToRetain;}\nreturn{ensureTemplateIsRewritten:function(template,templateEngine,templateDocument){if(!templateEngine['isTemplateRewritten'](template,templateDocument))\ntemplateEngine['rewriteTemplate'](template,function(htmlString){return ko.templateRewriting.memoizeBindingAttributeSyntax(htmlString,templateEngine);},templateDocument);},memoizeBindingAttributeSyntax:function(htmlString,templateEngine){return htmlString.replace(memoizeDataBindingAttributeSyntaxRegex,function(){return constructMemoizedTagReplacement(arguments[4],arguments[1],arguments[2],templateEngine);}).replace(memoizeVirtualContainerBindingSyntaxRegex,function(){return constructMemoizedTagReplacement(arguments[1],\"<!-- ko -->\",\"#comment\",templateEngine);});},applyMemoizedBindingsToNextSibling:function(bindings,nodeName){return ko.memoization.memoize(function(domNode,bindingContext){var nodeToBind=domNode.nextSibling;if(nodeToBind&&nodeToBind.nodeName.toLowerCase()===nodeName){ko.applyBindingAccessorsToNode(nodeToBind,bindings,bindingContext);}});}}})();ko.exportSymbol('__tr_ambtns',ko.templateRewriting.applyMemoizedBindingsToNextSibling);(function(){ko.templateSources={};var templateScript=1,templateTextArea=2,templateTemplate=3,templateElement=4;ko.templateSources.domElement=function(element){this.domElement=element;if(element){var tagNameLower=ko.utils.tagNameLower(element);this.templateType=tagNameLower===\"script\"?templateScript:tagNameLower===\"textarea\"?templateTextArea:tagNameLower==\"template\"&&element.content&&element.content.nodeType===11?templateTemplate:templateElement;}}\nko.templateSources.domElement.prototype['text']=function(){var elemContentsProperty=this.templateType===templateScript?\"text\":this.templateType===templateTextArea?\"value\":\"innerHTML\";if(arguments.length==0){return this.domElement[elemContentsProperty];}else{var valueToWrite=arguments[0];if(elemContentsProperty===\"innerHTML\")\nko.utils.setHtml(this.domElement,valueToWrite);else\nthis.domElement[elemContentsProperty]=valueToWrite;}};var dataDomDataPrefix=ko.utils.domData.nextKey()+\"_\";ko.templateSources.domElement.prototype['data']=function(key){if(arguments.length===1){return ko.utils.domData.get(this.domElement,dataDomDataPrefix+key);}else{ko.utils.domData.set(this.domElement,dataDomDataPrefix+key,arguments[1]);}};var templatesDomDataKey=ko.utils.domData.nextKey();function getTemplateDomData(element){return ko.utils.domData.get(element,templatesDomDataKey)||{};}\nfunction setTemplateDomData(element,data){ko.utils.domData.set(element,templatesDomDataKey,data);}\nko.templateSources.domElement.prototype['nodes']=function(){var element=this.domElement;if(arguments.length==0){var templateData=getTemplateDomData(element),nodes=templateData.containerData||(this.templateType===templateTemplate?element.content:this.templateType===templateElement?element:undefined);if(!nodes||templateData.alwaysCheckText){var text=this['text']();if(text&&text!==templateData.textData){nodes=ko.utils.parseHtmlForTemplateNodes(text,element.ownerDocument);setTemplateDomData(element,{containerData:nodes,textData:text,alwaysCheckText:true});}}\nreturn nodes;}else{var valueToWrite=arguments[0];if(this.templateType!==undefined){this['text'](\"\");}\nsetTemplateDomData(element,{containerData:valueToWrite});}};ko.templateSources.anonymousTemplate=function(element){this.domElement=element;}\nko.templateSources.anonymousTemplate.prototype=new ko.templateSources.domElement();ko.templateSources.anonymousTemplate.prototype.constructor=ko.templateSources.anonymousTemplate;ko.templateSources.anonymousTemplate.prototype['text']=function(){if(arguments.length==0){var templateData=getTemplateDomData(this.domElement);if(templateData.textData===undefined&&templateData.containerData)\ntemplateData.textData=templateData.containerData.innerHTML;return templateData.textData;}else{var valueToWrite=arguments[0];setTemplateDomData(this.domElement,{textData:valueToWrite});}};ko.exportSymbol('templateSources',ko.templateSources);ko.exportSymbol('templateSources.domElement',ko.templateSources.domElement);ko.exportSymbol('templateSources.anonymousTemplate',ko.templateSources.anonymousTemplate);})();(function(){var _templateEngine;ko.setTemplateEngine=function(templateEngine){if((templateEngine!=undefined)&&!(templateEngine instanceof ko.templateEngine))\nthrow new Error(\"templateEngine must inherit from ko.templateEngine\");_templateEngine=templateEngine;}\nfunction invokeForEachNodeInContinuousRange(firstNode,lastNode,action){var node,nextInQueue=firstNode,firstOutOfRangeNode=ko.virtualElements.nextSibling(lastNode);while(nextInQueue&&((node=nextInQueue)!==firstOutOfRangeNode)){nextInQueue=ko.virtualElements.nextSibling(node);action(node,nextInQueue);}}\nfunction activateBindingsOnContinuousNodeArray(continuousNodeArray,bindingContext){if(continuousNodeArray.length){var firstNode=continuousNodeArray[0],lastNode=continuousNodeArray[continuousNodeArray.length-1],parentNode=firstNode.parentNode,provider=ko.bindingProvider['
2instance'],preprocessNode=provider['preprocessNode'];if(preprocessNode){invokeForEachNodeInContinuousRange(firstNode,lastNode,function(node,nextNodeInRange){var nodePreviousSibling=node.previousSibling;var newNodes=preprocessNode.call(provider,node);if(newNodes){if(node===firstNode)\nfirstNode=newNodes[0]||nextNodeInRange;if(node===lastNode)\nlastNode=newNodes[newNodes.length-1]||nodePreviousSibling;}});continuousNodeArray.length=0;if(!firstNode){return;}\nif(firstNode===lastNode){continuousNodeArray.push(firstNode);}else{continuousNodeArray.push(firstNode,lastNode);ko.utils.fixUpContinuousNodeArray(continuousNodeArray,parentNode);}}\ninvokeForEachNodeInContinuousRange(firstNode,lastNode,function(node){if(node.nodeType===1||node.nodeType===8)\nko.applyBindings(bindingContext,node);});invokeForEachNodeInContinuousRange(firstNode,lastNode,function(node){if(node.nodeType===1||node.nodeType===8)\nko.memoization.unmemoizeDomNodeAndDescendants(node,[bindingContext]);});ko.utils.fixUpContinuousNodeArray(continuousNodeArray,parentNode);}}\nfunction getFirstNodeFromPossibleArray(nodeOrNodeArray){return nodeOrNodeArray.nodeType?nodeOrNodeArray:nodeOrNodeArray.length>0?nodeOrNodeArray[0]:null;}\nfunction executeTemplate(targetNodeOrNodeArray,renderMode,template,bindingContext,options){options=options||{};var firstTargetNode=targetNodeOrNodeArray&&getFirstNodeFromPossibleArray(targetNodeOrNodeArray);var templateDocument=(firstTargetNode||template||{}).ownerDocument;var templateEngineToUse=(options['templateEngine']||_templateEngine);ko.templateRewriting.ensureTemplateIsRewritten(template,templateEngineToUse,templateDocument);var renderedNodesArray=templateEngineToUse['renderTemplate'](template,bindingContext,options,templateDocument);if((typeof renderedNodesArray.length!=\"number\")||(renderedNodesArray.length>0&&typeof renderedNodesArray[0].nodeType!=\"number\"))\nthrow new Error(\"Template engine must return an array of DOM nodes\");var haveAddedNodesToParent=false;switch(renderMode){case\"replaceChildren\":ko.virtualElements.setDomNodeChildren(targetNodeOrNodeArray,renderedNodesArray);haveAddedNodesToParent=true;break;case\"replaceNode\":ko.utils.replaceDomNodes(targetNodeOrNodeArray,renderedNodesArray);haveAddedNodesToParent=true;break;case\"ignoreTargetNode\":break;default:throw new Error(\"Unknown renderMode: \"+renderMode);}\nif(haveAddedNodesToParent){activateBindingsOnContinuousNodeArray(renderedNodesArray,bindingContext);if(options['afterRender']){ko.dependencyDetection.ignore(options['afterRender'],null,[renderedNodesArray,bindingContext[options['as']||'$data']]);}\nif(renderMode==\"replaceChildren\"){ko.bindingEvent.notify(targetNodeOrNodeArray,ko.bindingEvent.childrenComplete);}}\nreturn renderedNodesArray;}\nfunction resolveTemplateName(template,data,context){if(ko.isObservable(template)){return template();}else if(typeof template==='function'){return template(data,context);}else{return template;}}\nko.renderTemplate=function(template,dataOrBindingContext,options,targetNodeOrNodeArray,renderMode){options=options||{};if((options['templateEngine']||_templateEngine)==undefined)\nthrow new Error(\"Set a template engine before calling renderTemplate\");renderMode=renderMode||\"replaceChildren\";if(targetNodeOrNodeArray){var firstTargetNode=getFirstNodeFromPossibleArray(targetNodeOrNodeArray);var whenToDispose=function(){return(!firstTargetNode)||!ko.utils.domNodeIsAttachedToDocument(firstTargetNode);};var activelyDisposeWhenNodeIsRemoved=(firstTargetNode&&renderMode==\"replaceNode\")?firstTargetNode.parentNode:firstTargetNode;return ko.dependentObservable(function(){var bindingContext=(dataOrBindingContext&&(dataOrBindingContext instanceof ko.bindingContext))?dataOrBindingContext:new ko.bindingContext(dataOrBindingContext,null,null,null,{\"exportDependencies\":true});var templateName=resolveTemplateName(template,bindingContext['$data'],bindingContext),renderedNodesArray=executeTemplate(targetNodeOrNodeArray,renderMode,templateName,bindingContext,options);if(renderMode==\"replaceNode\"){targetNodeOrNodeArray=renderedNodesArray;firstTargetNode=getFirstNodeFromPossibleArray(targetNodeOrNodeArray);}}
2,null,{disposeWhen:whenToDispose,disposeWhenNodeIsRemoved:activelyDisposeWhenNodeIsRemoved});}else{return ko.memoization.memoize(function(domNode){ko.renderTemplate(template,dataOrBindingContext,options,domNode,\"replaceNode\");});}};ko.renderTemplateForEach=function(template,arrayOrObservableArray,options,targetNode,parentBindingContext){var arrayItemContext,asName=options['as'];var executeTemplateForArrayItem=function(arrayValue,index){arrayItemContext=parentBindingContext['createChildContext'](arrayValue,{'as':asName,'noChildContext':options['noChildContext'],'extend':function(context){context['$index']=index;if(asName){context[asName+\"Index\"]=index;}}});var templateName=resolveTemplateName(template,arrayValue,arrayItemContext);return executeTemplate(targetNode,\"ignoreTargetNode\",templateName,arrayItemContext,options);};var activateBindingsCallback=function(arrayValue,addedNodesArray,index){activateBindingsOnContinuousNodeArray(addedNodesArray,arrayItemContext);if(options['afterRender'])\noptions['afterRender'](addedNodesArray,arrayValue);arrayItemContext=null;};var setDomNodeChildrenFromArrayMapping=function(newArray,changeList){ko.dependencyDetection.ignore(ko.utils.setDomNodeChildrenFromArrayMapping,null,[targetNode,newArray,executeTemplateForArrayItem,options,activateBindingsCallback,changeList]);ko.bindingEvent.notify(targetNode,ko.bindingEvent.childrenComplete);};var shouldHideDestroyed=(options['includeDestroyed']===false)||(ko.options['foreachHidesDestroyed']&&!options['includeDestroyed']);if(!shouldHideDestroyed&&!options['beforeRemove']&&ko.isObservableArray(arrayOrObservableArray)){setDomNodeChildrenFromArrayMapping(arrayOrObservableArray.peek());var subscription=arrayOrObservableArray.subscribe(function(changeList){setDomNodeChildrenFromArrayMapping(arrayOrObservableArray(),changeList);},null,\"arrayChange\");subscription.disposeWhenNodeIsRemoved(targetNode);return subscription;}else{return ko.dependentObservable(function(){var unwrappedArray=ko.utils.unwrapObservable(arrayOrObservableArray)||[];if(typeof unwrappedArray.length==\"undefined\")\nunwrappedArray=[unwrappedArray];if(shouldHideDestroyed){unwrappedArray=ko.utils.arrayFilter(unwrappedArray,function(item){return item===undefined||item===null||!ko.utils.unwrapObservable(item['_destroy']);});}\nsetDomNodeChildrenFromArrayMapping(unwrappedArray);},null,{disposeWhenNodeIsRemoved:targetNode});}};var templateComputedDomDataKey=ko.utils.domData.nextKey();function disposeOldComputedAndStoreNewOne(element,newComputed){var oldComputed=ko.utils.domData.get(element,templateComputedDomDataKey);if(oldComputed&&(typeof(oldComputed.dispose)=='function'))\noldComputed.dispose();ko.utils.domData.set(element,templateComputedDomDataKey,(newComputed&&(!newComputed.isActive||newComputed.isActive()))?newComputed:undefined);}\nvar cleanContainerDomDataKey=ko.utils.domData.nextKey();ko.bindingHandlers['template']={'init':function(element,valueAccessor){var bindingValue=ko.utils.unwrapObservable(valueAccessor());if(typeof bindingValue==\"string\"||'name'in bindingValue){ko.virtualElements.emptyNode(element);}else if('nodes'in bindingValue){var nodes=bindingValue['nodes']||[];if(ko.isObservable(nodes)){throw new Error('The \"nodes\" option must be a plain, non-observable array.');}\nvar container=nodes[0]&&nodes[0].parentNode;if(!container||!ko.utils.domData.get(container,cleanContainerDomDataKey)){container=ko.utils.moveCleanedNodesToContainerElement(nodes);ko.utils.domData.set(container,cleanContainerDomDataKey,true);}\nnew ko.templateSources.anonymousTemplate(element)['nodes'](container);}else{var templateNodes=ko.virtualElements.childNodes(element);if(templateNodes.length>0){var container=ko.utils.moveCleanedNodesToContainerElement(templateNodes);new ko.templateSources.anonymousTemplate(element)['nodes'](container);}else{throw new Error(\"Anonymous template defined, but no template content was provided\");}}\nreturn{'controlsDescendantBindings':true};},'update':function(element,valueAccessor,allBindings,viewModel,bindingContext){var value=valueAccessor(),options=ko.utils.unwrapObservable(value),shouldDisplay=true,templateComputed=null,template;if(typeof options==\"string\"){template=value;options={};}else{template='name'in options?options['name']:element;
2if('if'in options)\nshouldDisplay=ko.utils.unwrapObservable(options['if']);if(shouldDisplay&&'ifnot'in options)\nshouldDisplay=!ko.utils.unwrapObservable(options['ifnot']);if(shouldDisplay&&!template){shouldDisplay=false;}}\nif('foreach'in options){var dataArray=(shouldDisplay&&options['foreach'])||[];templateComputed=ko.renderTemplateForEach(template,dataArray,options,element,bindingContext);}else if(!shouldDisplay){ko.virtualElements.emptyNode(element);}else{var innerBindingContext=bindingContext;if('data'in options){innerBindingContext=bindingContext['createChildContext'](options['data'],{'as':options['as'],'noChildContext':options['noChildContext'],'exportDependencies':true});}\ntemplateComputed=ko.renderTemplate(template,innerBindingContext,options,element);}\ndisposeOldComputedAndStoreNewOne(element,templateComputed);}};ko.expressionRewriting.bindingRewriteValidators['template']=function(bindingValue){var parsedBindingValue=ko.expressionRewriting.parseObjectLiteral(bindingValue);if((parsedBindingValue.length==1)&&parsedBindingValue[0]['unknown'])\nreturn null;if(ko.expressionRewriting.keyValueArrayContainsKey(parsedBindingValue,\"name\"))\nreturn null;return\"This template engine does not support anonymous templates nested within its templates\";};ko.virtualElements.allowedBindings['template']=true;})();ko.exportSymbol('setTemplateEngine',ko.setTemplateEngine);ko.exportSymbol('renderTemplate',ko.renderTemplate);ko.utils.findMovesInArrayComparison=function(left,right,limitFailedCompares){if(left.length&&right.length){var failedCompares,l,r,leftItem,rightItem;for(failedCompares=l=0;(!limitFailedCompares||failedCompares<limitFailedCompares)&&(leftItem=left[l]);++l){for(r=0;rightItem=right[r];++r){if(leftItem['value']===rightItem['value']){leftItem['moved']=rightItem['index'];rightItem['moved']=leftItem['index'];right.splice(r,1);failedCompares=r=0;break;}}\nfailedCompares+=r;}}};ko.utils.compareArrays=(function(){var statusNotInOld='added',statusNotInNew='deleted';function compareArrays(oldArray,newArray,options){options=(typeof options==='boolean')?{'dontLimitMoves':options}:(options||{});oldArray=oldArray||[];newArray=newArray||[];if(oldArray.length<newArray.length)\nreturn compareSmallArrayToBigArray(oldArray,newArray,statusNotInOld,statusNotInNew,options);else\nreturn compareSmallArrayToBigArray(newArray,oldArray,statusNotInNew,statusNotInOld,options);}\nfunction compareSmallArrayToBigArray(smlArray,bigArray,statusNotInSml,statusNotInBig,options){var myMin=Math.min,myMax=Math.max,editDistanceMatrix=[],smlIndex,smlIndexMax=smlArray.length,bigIndex,bigIndexMax=bigArray.length,compareRange=(bigIndexMax-smlIndexMax)||1,maxDistance=smlIndexMax+bigIndexMax+1,thisRow,lastRow,bigIndexMaxForRow,bigIndexMinForRow;for(smlIndex=0;smlIndex<=smlIndexMax;smlIndex++){lastRow=thisRow;editDistanceMatrix.push(thisRow=[]);bigIndexMaxForRow=myMin(bigIndexMax,smlIndex+compareRange);bigIndexMinForRow=myMax(0,smlIndex-1);for(bigIndex=bigIndexMinForRow;bigIndex<=bigIndexMaxForRow;bigIndex++){if(!bigIndex)\nthisRow[bigIndex]=smlIndex+1;else if(!smlIndex)\nthisRow[bigIndex]=bigIndex+1;else if(smlArray[smlIndex-1]===bigArray[bigIndex-1])\nthisRow[bigIndex]=lastRow[bigIndex-1];else{var northDistance=lastRow[bigIndex]||maxDistance;var westDistance=thisRow[bigIndex-1]||maxDistance;thisRow[bigIndex]=myMin(northDistance,westDistance)+1;}}}\nvar editScript=[],meMinusOne,notInSml=[],notInBig=[];for(smlIndex=smlIndexMax,bigIndex=bigIndexMax;smlIndex||bigIndex;){meMinusOne=editDistanceMatrix[smlIndex][bigIndex]-1;if(bigIndex&&meMinusOne===editDistanceMatrix[smlIndex][bigIndex-1]){notInSml.push(editScript[editScript.length]={'status':statusNotInSml,'value':bigArray[--bigIndex],'index':bigIndex});}else if(smlIndex&&meMinusOne===editDistanceMatrix[smlIndex-1][bigIndex]){notInBig.push(editScript[editScript.length]={'status':statusNotInBig,'value':smlArray[--smlIndex],'index':smlIndex});}else{--bigIndex;--smlIndex;if(!options['sparse']){editScript.push({'status':\"retained\",'value':bigArray[bigIndex]});}}}\nko.utils.findMovesInArrayComparison(notInBig,notInSml,!options['dontLimitMoves']&&smlIndexMax*10);return editScript.reverse();}\nreturn compareArrays;})();ko.exportSymbol('utils.compareArrays',ko.utils.compareArrays);(function(){function mapNodeAndRefreshWhenChanged(containerNode,mapping,valueToMap,callbackAfterAddingNodes,index){var mappedNodes=[];var dependentObservable=ko.dependentObservable(function(){var newMappedNodes=mapping(valueToMap,index,ko.utils.fixUpContinuousNodeArray(mappedNodes,c
vendor: 4,269 bytes, line 2
2ontainerNode))||[];if(mappedNodes.length>0){ko.utils.replaceDomNodes(mappedNodes,newMappedNodes);if(callbackAfterAddingNodes)\nko.dependencyDetection.ignore(callbackAfterAddingNodes,null,[valueToMap,newMappedNodes,index]);}\nmappedNodes.length=0;ko.utils.arrayPushAll(mappedNodes,newMappedNodes);},null,{disposeWhenNodeIsRemoved:containerNode,disposeWhen:function(){return!ko.utils.anyDomNodeIsAttachedToDocument(mappedNodes);}});return{mappedNodes:mappedNodes,dependentObservable:(dependentObservable.isActive()?dependentObservable:undefined)};}\nvar lastMappingResultDomDataKey=ko.utils.domData.nextKey(),deletedItemDummyValue=ko.utils.domData.nextKey();ko.utils.setDomNodeChildrenFromArrayMapping=function(domNode,array,mapping,options,callbackAfterAddingNodes,editScript){array=array||[];if(typeof array.length==\"undefined\")\narray=[array];options=options||{};var lastMappingResult=ko.utils.domData.get(domNode,lastMappingResultDomDataKey);var isFirstExecution=!lastMappingResult;var newMappingResult=[];var lastMappingResultIndex=0;var currentArrayIndex=0;var nodesToDelete=[];var itemsToMoveFirstIndexes=[];var itemsForBeforeRemoveCallbacks=[];var itemsForMoveCallbacks=[];var itemsForAfterAddCallbacks=[];var mapData;var countWaitingForRemove=0;function itemAdded(value){mapData={arrayEntry:value,indexObservable:ko.observable(currentArrayIndex++)};newMappingResult.push(mapData);if(!isFirstExecution){itemsForAfterAddCallbacks.push(mapData);}}\nfunction itemMovedOrRetained(oldPosition){mapData=lastMappingResult[oldPosition];if(currentArrayIndex!==mapData.indexObservable.peek())\nitemsForMoveCallbacks.push(mapData);mapData.indexObservable(currentArrayIndex++);ko.utils.fixUpContinuousNodeArray(mapData.mappedNodes,domNode);newMappingResult.push(mapData);}\nfunction callCallback(callback,items){if(callback){for(var i=0,n=items.length;i<n;i++){ko.utils.arrayForEach(items[i].mappedNodes,function(node){callback(node,i,items[i].arrayEntry);});}}}\nif(isFirstExecution){ko.utils.arrayForEach(array,itemAdded);}else{if(!editScript||(lastMappingResult&&lastMappingResult['_countWaitingForRemove'])){var lastArray=ko.utils.arrayMap(lastMappingResult,function(x){return x.arrayEntry;}),compareOptions={'dontLimitMoves':options['dontLimitMoves'],'sparse':true};editScript=ko.utils.compareArrays(lastArray,array,compareOptions);}\nfor(var i=0,editScriptItem,movedIndex,itemIndex;editScriptItem=editScript[i];i++){movedIndex=editScriptItem['moved'];itemIndex=editScriptItem['index'];switch(editScriptItem['status']){case\"deleted\":while(lastMappingResultIndex<itemIndex){itemMovedOrRetained(lastMappingResultIndex++);}\nif(movedIndex===undefined){mapData=lastMappingResult[lastMappingResultIndex];if(mapData.dependentObservable){mapData.dependentObservable.dispose();mapData.dependentObservable=undefined;}\nif(ko.utils.fixUpContinuousNodeArray(mapData.mappedNodes,domNode).length){if(options['beforeRemove']){newMappingResult.push(mapData);countWaitingForRemove++;if(mapData.arrayEntry===deletedItemDummyValue){mapData=null;}else{itemsForBeforeRemoveCallbacks.push(mapData);}}\nif(mapData){nodesToDelete.push.apply(nodesToDelete,mapData.mappedNodes);}}}\nlastMappingResultIndex++;break;case\"added\":while(currentArrayIndex<itemIndex){itemMovedOrRetained(lastMappingResultIndex++);}\nif(movedIndex!==undefined){itemsToMoveFirstIndexes.push(newMappingResult.length);itemMovedOrRetained(movedIndex);}else{itemAdded(editScriptItem['value']);}\nbreak;}}\nwhile(currentArrayIndex<array.length){itemMovedOrRetained(lastMappingResultIndex++);}\nnewMappingResult['_countWaitingForRemove']=countWaitingForRemove;}\nko.utils.domData.set(domNode,lastMappingResultDomDataKey,newMappingResult);callCallback(options['beforeMove'],itemsForMoveCallbacks);ko.utils.arrayForEach(nodesToDelete,options['beforeRemove']?ko.cleanNode:ko.removeNode);var i,j,lastNode,nodeToInsert,mappedNodes,activeElement;try{activeElement=domNode.ownerDocument.activeElement;}catch(e){}\nif(itemsToMoveFirstIndexes.length){while((i=itemsToMoveFirstIndexes.shift())!=undefined){mapData=newMappingResult[i];for(lastNode=undefined;i;){if((mappedNodes=newMappingResult[--i].mappedNodes)&&mappedNodes.length){lastNode=mappedNodes[mappedNodes.length-1];break;}}\nfor(j=0;nodeToInsert=mapData.mappedNodes[j];
2lastNode=nodeToInsert,j++){ko.virtualElements.insertAfter(domNode,nodeToInsert,lastNode);}}}\nfor(i=0;mapData=newMappingResult[i];i++){if(!mapData.mappedNodes)\nko.utils.extend(mapData,mapNodeAndRefreshWhenChanged(domNode,mapping,mapData.arrayEntry,callbackAfterAddingNodes,mapData.indexObservable));for(j=0;nodeToInsert=mapData.mappedNodes[j];lastNode=nodeToInsert,j++){ko.virtualElements.insertAfter(domNode,nodeToInsert,lastNode);}\nif(!mapData.initialized&&callbackAfterAddingNodes){callbackAfterAddingNodes(mapData.arrayEntry,mapData.mappedNodes,mapData.indexObservable);mapData.initialized=true;lastNode=mapData.mappedNodes[mapData.mappedNodes.length-1];}}\nif(activeElement&&domNode.ownerDocument.activeElement!=activeElement){activeElement.focus();}\ncallCallback(options['beforeRemove'],itemsForBeforeRemoveCallbacks);for(i=0;i<itemsForBeforeRemoveCallbacks.length;++i){itemsForBeforeRemoveCallbacks[i].arrayEntry=deletedItemDummyValue;}\ncallCallback(options['afterMove'],itemsForMoveCallbacks);callCallback(options['afterAdd'],itemsForAfterAddCallbacks);}})();ko.exportSymbol('utils.setDomNodeChildrenFromArrayMapping',ko.utils.setDomNodeChildrenFromArrayMapping);ko.nativeTemplateEngine=function(){this['allowTemplateRewriting']=false;}\nko.nativeTemplateEngine.prototype=new ko.templateEngine();ko.nativeTemplateEngine.prototype.constructor=ko.nativeTemplateEngine;ko.nativeTemplateEngine.prototype['renderTemplateSource']=function(templateSource,bindingContext,options,templateDocument){var useNodesIfAvailable=!(ko.utils.ieVersion<9),templateNodesFunc=useNodesIfAvailable?templateSource['nodes']:null,templateNodes=templateNodesFunc?templateSource['nodes']():null;if(templateNodes){return ko.utils.makeArray(templateNodes.cloneNode(true).childNodes);}else{var templateText=templateSource['text']();return ko.utils.parseHtmlFragment(templateText,templateDocument);}};ko.nativeTemplateEngine.instance=new ko.nativeTemplateEngine();ko.setTemplateEngine(ko.nativeTemplateEngine.instance);ko.exportSymbol('nativeTemplateEngine',ko.nativeTemplateEngine);(function(){ko.jqueryTmplTemplateEngine=function(){var jQueryTmplVersion=this.jQueryTmplVersion=(function(){if(!jQueryInstance||!(jQueryInstance['tmpl']))\nreturn 0;try{if(jQueryInstance['tmpl']['tag']['tmpl']['open'].toString().indexOf('__')>=0){return 2;}}catch(ex){}\nreturn 1;})();function ensureHasReferencedJQueryTemplates(){if(jQueryTmplVersion<2)\nthrow new Error(\"Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.\");}\nfunction executeTemplate(compiledTemplate,data,jQueryTemplateOptions){return jQueryInstance['tmpl'](compiledTemplate,data,jQueryTemplateOptions);}\nthis['renderTemplateSource']=function(templateSource,bindingContext,options,templateDocument){templateDocument=templateDocument||document;options=options||{};ensureHasReferencedJQueryTemplates();var precompiled=templateSource['data']('precompiled');if(!precompiled){var templateText=templateSource['text']()||\"\";templateText=\"{{ko_with $item.koBindingContext}}\"+templateText+\"{{/ko_with}}\";precompiled=jQueryInstance['template'](null,templateText);templateSource['data']('precompiled',precompiled);}\nvar data=[bindingContext['$data']];var jQueryTemplateOptions=jQueryInstance['extend']({'koBindingContext':bindingContext},options['templateOptions']);var resultNodes=executeTemplate(precompiled,data,jQueryTemplateOptions);resultNodes['appendTo'](templateDocument.createElement(\"div\"));jQueryInstance['fragments']={};return resultNodes;};this['createJavaScriptEvaluatorBlock']=function(script){return\"{{ko_code ((function() { return \"+script+\" })()) }}\";};this['addTemplate']=function(templateName,templateMarkup){document.write(\"<script type='text/html' id='\"+templateName+\"'>\"+templateMarkup+\"<\"+\"/script>\");};if(jQueryTmplVersion>0){jQueryInstance['tmpl']['tag']['ko_code']={open:\"__.push($1 || '');\"};jQueryInstance['tmpl']['tag']['ko_with']={open:\"with($1) {\",close:\"} \"};}};ko.jqueryTmplTemplateEngine.prototype=new ko.templateEngine();ko.jqueryTmplTemplateEngine.prototype.constructor=ko.jqueryTmplTemplateEngine;var jqueryTmplTemplateEngineInstance=new ko.jqueryTmplTemplateEngine();if(jqueryTmplTemplateEngineInstance.jQueryTmplVersion>0)\nko.setTemplateEngine(jqueryTmplTemplateEngineInstance);ko.exportSymbol('jqueryTmplTemplateEngine',ko.jqueryTmplTemplateEngine);})();}));}());})();","mage/terms.min.js":"define(['jquery'],function($){'use strict';$.fn.terms=function(args){var defaults={start:0,wrapper:'',showAnchor:'',effects:'slide'},options=$.extend(defaults,args);this.each(function(){var obj=$(this),wrapper=options.wrapper!==''?'> '+options.wrapper:'',switches=$(wrapper+'> [data-section=\"title\"] > [data-toggle=\"switch\"]',obj),terms=$(wrapper+'> [data-section=\"content\"]',obj),t=switches.length,marginTop=$(switches[0]).closest('[data-section=\"title\"]').css('position')=='absolute'?0:null,title,current,showItem=function(item){if(item!=current&&!$(switches[item]).closest('[data-section=\"title\"]').hasClass('disabled')){$(switches).closest('[data-section=\"title\"]').removeClass('active');if(options.wrapper!==''){$(switches).parent().parent().removeClass('active');}\n$(terms).removeClass('active');$(switches[item]).closest('[data-section=\"title\"]').addClass('active');if(options.wrapper!==''){$(switches[current]).parent().parent().addClass('active');}\n$(terms[item]).addClass('active');current=item;}else if((obj.attr('data-sections')=='accordion'||$(switches[item]).closest('[data-section=\"title\"]').css('width')==obj.css('width'))&&item==current&&!$(switches[item]).closest('[data-section=\"title\"]').hasClass('disabled')){$(switches).closest('[data-section=\"title\"]').removeClass('active');if(options.wrapper!==''){$(switches).parent().parent().removeClass('active');}\n$(terms).removeClass('active');current=-1;}},init=function(){var linksList,i,classes,dataSection,itemHref,itemClass,fromUrl;if(t>0){if($(switches[0]).closest('[data-section=\"title\"]').css('display')=='table-cell'){obj.addClass('adjusted');if(obj[0].tagName=='DL'){linksList=$('<dd>');}else{linksList=$('<div>');}\nlinksList.addClass('sections-nav');obj.prepend(linksList);for(i=0;i<t;i++){title=$(switches[i]).html();classes=$(switches[i]).closest('[data-section=\"title\"]').attr('class');dataSection=$(switches[i]).closest('[data-section=\"title\"]').attr('data-section');itemHref=$(switches[i]).attr('href');itemClass=$(switches[i]).attr('class');$(switches[i]).parent('[data-section=\"title\"]').hide();switches[i]=$('<a/>',{href:itemHref,'class':itemClass,html:title}
2).appendTo(linksList);$(switches[i]).wrap('<strong class=\"'+classes+'\" data-section=\"'+dataSection+'\" />');}}\n$(switches).each(function(ind,el){$(el).on('click',function(event){event.preventDefault();showItem(ind);});if(marginTop!==null){$(el).closest('[data-section=\"title\"]').css({'top':marginTop+'px'});marginTop+=$(el).closest('[data-section=\"title\"]').outerHeight(true);obj.css({'min-height':marginTop+'px'});}});fromUrl=false;if(window.location.hash.length>0){$(terms).each(function(ind,el){if('#info-'+$(el).attr('id')==window.location.hash){showItem(ind);$('html, body').animate({scrollTop:$(switches[ind]).offset().top},700);fromUrl=true;}});}\nif(fromUrl===false){if(options.start%1===0){current=options.start+1;showItem(options.start);}else{$(terms).each(function(ind,el){if($(el).attr('id')==options.start){current=ind+1;showItem(ind);$('html, body').animate({scrollTop:$(switches[ind]).offset().top},700);}});}}}};init();});};return function(data,el){$(el).terms(data);};});","mage/toggle.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.toggleAdvanced',{options:{baseToggleClass:'active'},_create:function(){this.beforeCreate();this._bindCore();this.afterCreate();},_bindCore:function(){var widget=this;this.element.on('click',$.proxy(function(e){widget._onClick();e.preventDefault();},this));},_onClick:function(){this._prepareOptions();this._toggleSelectors();},_prepareOptions:function(){this.options.baseToggleClass=this.element.data('base-toggle-class')?this.element.data('base-toggle-class'):this.options.baseToggleClass;},_toggleSelectors:function(){this.element.toggleClass(this.options.baseToggleClass);},beforeCreate:function(){},afterCreate:function(){}});$.widget('mage.toggleAdvanced',$.mage.toggleAdvanced,{options:{selectorsToggleClass:'hidden',toggleContainers:null},_toggleSelectors:function(){this._super();if(this.options.toggleContainers){$(this.options.toggleContainers).toggleClass(this.options.selectorsToggleClass);}else{this.element.toggleClass(this.options.baseToggleClass);}},_prepareOptions:function(){this.options.selectorsToggleClass=this.element.data('selectors-toggle-class')?this.element.data('selectors-toggle-class'):this.options.selectorsToggleClass;this.options.toggleContainers=this.element.data('toggle-selectors')?this.element.data('toggle-selectors'):this.options.toggleContainers;this._super();}});$.widget('mage.toggleAdvanced',$.mage.toggleAdvanced,{options:{newLabel:null,curLabel:null,currentLabelElement:null},_onClick:function(){this._super();this._toggleLabel();},_toggleLabel:function(){var cachedLabel,currentLabelSelector;if(this.options.newLabel){cachedLabel=this.options.newLabel;currentLabelSelector=this.options.currentLabelElement?$(this.options.currentLabelElement):this.element;this.element.data('toggle-label',this.options.curLabel);currentLabelSelector.html(this.options.newLabel);this.options.curLabel=this.options.newLabel;this.options.newLabel=cachedLabel;}},_prepareOptions:function(){this.options.newLabel=this.element.data('toggle-label')?this.element.data('toggle-label'):this.options.newLabel;this.options.currentLabelElement=this.element.data('current-label-el')?this.element.data('current-label-el'):this.options.currentLabelElement;if(!this.options.currentLabelElement){this.options.currentLabelElement=this.element;}\nthis.options.curLabel=$(this.options.currentLabelElement).html();this._super();}});return $.mage.toggleAdvanced;});","mage/tooltip.min.js":"define(['jquery','jquery-ui-modules/tooltip'],function($){'use strict';$.widget('mage.tooltip',$.ui.tooltip,{});return $.mage.tooltip;});","mage/touch-slider.min.js":"define(['jquery','underscore','jquery-ui-modules/slider'],function($,_){'use strict';$.widget('mage.touchSlider',$.ui.slider,{_create:function(){_.bindAll(this,'_mouseDown','_mouseMove','_onTouchEnd');return this._superApply(arguments);},_mouseInit:function(){var result=this._superApply(arguments);this.element.off('mousedown.'+this.widgetName).on('touchstart.'+this.widgetName,this._mouseDown);return result;},_mouseDown:function(event){var prevDelegate=this._mouseMoveDelegate,result;event=this._touchToMouse(event);result=this._super(event);if(prevDelegate===this._mouseMoveDelegate){return result;}\n$(document).off('mousemove.'+this.widgetName).off('mouseup.'+this.widgetName);$(document).on('touchmove.'+this.widgetName,this._mouseMove).on('touchend.'+this.widgetName,this._onTouchEnd).on('tochleave.'+this.widgetName,this._onTouchEnd);return result;},_mouseMove:function(event){event=this._touchToMouse(event);return this._super(event);},_onTouchEnd:function(event){$(document).trigger('mouseup');return this._mouseUp(event);},_mouseUp:function(){this._removeTouchHandlers();return this._superApply(arguments);},_mouseDestroy:function(){this._removeTouchHandlers();return this._superApply(arguments);},_removeTouchHandlers:function(){$(document).off('touchmove.'+this.widgetName).off('touchend.'+this.widgetName).off('touchleave.'+this.widgetName);},_touchToMouse:function(event){var orig=event.originalEvent,touch=orig.touches[0];return _.extend(event,{which:1,pageX:touch.pageX,pageY:touch.pageY,clientX:touch.clientX,clientY:touch.clientY,screenX:touch.screenX,screenY:touch.screenY});}});return $.mage.touchSlider;});","mage/translate-inline.min.js":"define(['jquery','mage/template','mage/utils/misc','mage/translate','jquery-ui-modules/dialog'],function($,mageTemplate,miscUtils){'use strict';$.widget('mage.translateInline',$.ui.dialog,{options:{translateForm:{template:'#translate-form-template',data:{id:'translate-inline-form',message:'Please refresh the page to see your changes after submitting this form. '+'Note: browser cache refresh may be required'}},autoOpen:false,translateArea:null,modal:true,dialogClass:'popup-window window-translate-inline',width:'75%',title:$.mage.__('Translate'),height:470,position:{my:'left top',at:'center top',of:'body'},buttons:[{text:$.mage.__('Submit'),'class':'action-primary',click:function(){$(this).translateInline('submit');}},{text:$.mage.__('Close'),'class':'action-close',click:function(){$(this).translateInline('close');}}],open:function(){var $uiDialog=$(this).closest('.ui-dialog'),topMargin=$uiDialog.children('.ui-dialog-titlebar').outerHeight()+45;$uiDialog.addClass('ui-dialog-active').css('margin-top',topMargin);},close:function(){$(this).closest('.ui-dialog').removeClass('ui-dialog-active');}},_create:function(){var $translateArea=$(this.options.translateArea);if(!$translateArea.length){$translateArea=$('body');}\n$translateArea.on('edit.editTrigger',$.proxy(this._onEdit,this));this.tmpl=mageTemplate(this.options.translateForm.template);this._super();},_prepareContent:function(templateData){var data=$.extend({items:templateData,escape:miscUtils.escape},this.options.translateForm.data);this.data=data;return $(this.tmpl({data:data}));},_onEdit:function(e){this.target=e.target;this.element.html(this._prepareContent($(e.target).data('translate')));this.open(e);},submit:function(){if(this.formIsSubmitted){return;}\nthis._formSubmit();},_formSubmit:function(){var parameters=$.param({area:this.options.area})+'&'+$('#'+this.options.translateForm.data.id).serialize();this.formIsSubmitted=true;$.ajax({url:this.options.ajaxUrl,type:'POST',data:parameters,loaderContext:this.element,showLoader:true}).always($.proxy(this._formSubmitComplete,this));},_formSubmitComplete:function(response){var responseJSON=response.responseJSON||response;this.close();this.formIsSubmitted=false;$.mage.translate.add(responseJSON);this._updatePlaceholder(responseJSON[this.data.items[0].original]);},_updatePlaceholder:function(newValue){var $target=$(this.target),translateOb
2ject=$target.data('translate')[0];translateObject.shown=newValue;translateObject.translated=newValue;$.mage.translate.add(this.data.items[0].original,newValue);$target.html(newValue);},destroy:function(){this.element.off('.editTrigger');this._super();}});return $.mage.translateInline;});","mage/translate.min.js":"define(['jquery','mage/mage','mageTranslationDictionary','underscore'],function($,mage,dictionary,_){'use strict';$.extend(true,$,{mage:{translate:(function(){var _data=dictionary;return{add:function(){if(arguments.length>1){_data[arguments[0]]=arguments[1];}else if(typeof arguments[0]==='object'){$.extend(_data,arguments[0]);}},translate:function(text){return typeof _data[text]!=='undefined'?_data[text]:text;}};}())}});$.mage.__=$.proxy($.mage.translate.translate,$.mage.translate);_.extend(_,{i18n:function(text){return $.mage.__(text);}});return $.mage.__;});","mage/trim-input.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.trimInput',{options:{cache:{}},_create:function(){this.options.cache.input=$(this.element);this._bind();},_bind:function(){if(this.options.cache.input.length){this._on(this.options.cache.input,{'change':this._trimInput,'keyup':this._trimInput,'paste':this._trimInput});}},_trimInput:function(){var caretStart,caretEnd,input;caretStart=this.options.cache.input.get(0).selectionStart;caretEnd=this.options.cache.input.get(0).selectionEnd;input=this._getInputValue().trim();this.options.cache.input.val(input);if(caretStart!==null&&caretEnd!==null){this.options.cache.input.get(0).setSelectionRange(caretStart,caretEnd);}},_getInputValue:function(){return this.options.cache.input.val();}});return $.mage.trimInput;});","mage/url.min.js":"define([],function(){var baseUrl='';return{setBaseUrl:function(url){baseUrl=url;},build:function(path){if(path.indexOf(baseUrl)!==-1){return path;}\nreturn baseUrl+path;}};});","mage/validation.min.js":"define(['jquery','moment','mageUtils','jquery-ui-modules/widget','jquery/validate','mage/translate'],function($,moment,utils){'use strict';var creditCartTypes,rules,showLabel,originValidateDelegate;$.extend(true,$,{mage:{isEmpty:function(value){return value===''||value===undefined||value==null||value.length===0||/^\\s+$/.test(value);},isEmptyNoTrim:function(value){return value===''||value==null||value.length===0;},isBetween:function(value,from,to){return($.mage.isEmpty(from)||value>=$.mage.parseNumber(from))&&($.mage.isEmpty(to)||value<=$.mage.parseNumber(to));},parseNumber:function(value){var isDot,isComa;if(typeof value!=='string'){return parseFloat(value);}\nisDot=value.indexOf('.');isComa=value.indexOf(',');if(isDot!==-1&&isComa!==-1){if(isComa>isDot){value=value.replace('.','').replace(',','.');}else{value=value.replace(',','');}}else if(isComa!==-1){value=value.replace(',','.');}\nreturn parseFloat(value);},stripHtml:function(value){return value.replace(/<.[^<>]*?>/g,' ').replace(/ | /gi,' ').replace(/[0-9.(),;:!?%#$'\"_+=\\/-]*/g,'');}}});$.validator.addMethod=function(name,method,message,dontSkip){$.validator.methods[name]=method;$.validator.messages[name]=message!==undefined?message:$.validator.messages[name];if(method.length<3||dontSkip){$.validator.addClassRules(name,$.validator.normalizeRule(name));}};creditCartTypes={'SO':[new RegExp('^(6334[5-9]([0-9]{11}|[0-9]{13,14}))|(6767([0-9]{12}|[0-9]{14,15}))$'),new RegExp('^([0-9]{3}|[0-9]{4})?$'),true],'SM':[new RegExp('(^(5[0678])[0-9]{11,18}$)|(^(6[^05])[0-9]{11,18}$)|'+'(^(601)[^1][0-9]{9,16}$)|(^(6011)[0-9]{9,11}$)|(^(6011)[0-9]{13,16}$)|'+'(^(65)[0-9]{11,13}$)|(^(65)[0-9]{15,18}$)|(^(49030)[2-9]([0-9]{10}$|[0-9]{12,13}$))|'+'(^(49033)[5-9]([0-9]{10}$|[0-9]{12,13}$))|(^(49110)[1-2]([0-9]{10}$|[0-9]{12,13}$))|'+'(^(49117)[4-9]([0-9]{10}$|[0-9]{12,13}$))|(^(49118)[0-2]([0-9]{10}$|[0-9]{12,13}$))|'+'(^(4936)([0-9]{12}$|[0-9]{14,15}$))'),new RegExp('^([0-9]{3}|[0-9]{4})?$'),true],'VI':[new RegExp('^4[0-9]{12}([0-9]{3})?$'),new RegExp('^[0-9]{3}$'),true],'MC':[new RegExp('^(?:5[1-5][0-9]{2}|222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$'),new RegExp('^[0-9]{3}$'),true],'AE':[new RegExp('^3[47][0-9]{13}$'),new RegExp('^[0-9]{4}$'),true],'DI':[new RegExp('^(6011(0|[2-4]|74|7[7-9]|8[6-9]|9)|6(4[4-9]|5))\\\\d*$'),new RegExp('^[0-9]{3}$'),true],'JCB':[new RegExp('^35(2[8-9]|[3-8])\\\\d*$'),new RegExp('^[0-9]{3}$'),true],'DN':[new RegExp('^(3(0[0-5]|095|6|[8-9]))\\\\d*$'),new RegExp('^[0-9]{3}$'),true],'UN':[new RegExp('^(622(1(2[6-9]|[3-9])|[3-8]|9([[0-1]|2[0-5]))|62[4-6]|628([2-8]))\\\\d*?$'),new RegExp('^[0-9]{3}$'),true],'MI':[new RegExp('^(5(0|[6-9])|63|67(?!59|6770|6774))\\\\d*$'),new RegExp('^[0-9]{3}$'),true],'MD':[new RegExp('^6759(?!24|38|40|6[3-9]|70|76)|676770|676774\\\\d*$'),new RegExp('^[0-9]{3}$'),true]};function validateCreditCard(s){var v='0123456789',w='',i,j,k,m,c,a,x;for(i=0;i<s.length;i++){x=s.charAt(i);if(v.indexOf(x,0)!==-1){w+=x;}}\nj=w.length / 2;k=Math.floor(j);m=Math.ceil(j)-k;c=0;for(i=0;i<k;i++){a=w.charAt(i*2+m)*2;c+=a>9?Math.floor(a / 10+a%10):a;}\nfor(i=0;i<k+m;i++){c+=w.charAt(i*2+1-m)*1;}\nreturn c%10===0;}\nfunction tableSingleValidation(value,element){var empty=$(element).closest('table').find('input.required-option:visible').filter(function(i,el){if($(el).is('disabled')){return $.mage.isEmpty(el.value);}}).length;return empty===0;}\nfunction resolveModulo(qty,qtyIncrements){var divideEpsilon=10000,epsilon,remainder;while(qtyIncrements<1){qty*=10;qtyIncrements*=10;}\nepsilon=qtyIncrements / divideEpsilon;remainder=qty%qtyIncrements;if(Math.abs(remainder-qtyIncrements)<epsilon||Math.abs(remainder)<epsilon){remainder=0;}\nreturn remainder;}\nrules={'max-words':[function(value,element,params){return this.optional(element)||$.mage.stripHtml(value).match(/\\b\\w+\\b/g).length<=params;},$.mage.__('Please enter {0} words or less.')],'min-words':[function(value,element,params){return this.optional(element)||$.mage.stripHtml(value).match(/\\b\\w+\\b/g).length>=params;},$.mage.__('Please enter at least {0} words.')],'range-words':[function(value,element,params){return this.optional(element)||$.mage.stripHtml(value).match(/\\b\\w+\\b/g).length>=params[0]&&value.match(/bw+b/g).length<params[1];},$.mage.__('Please enter between {0} and {1} words.')],'letters-with-basic-punc':[function(value,element){return this.optional(element)||/^[a-z\\-.,()'\\\"\\s]+$/i.test(value);},$.mage.__('Letters or punctuation only please')],'alphanumeric':[function(value,element){return this.optional(element)||/^\\w+$/i.test(value);}
2,$.mage.__('Letters, numbers, spaces or underscores only please')],'letters-only':[function(value,element){return this.optional(element)||/^[a-z]+$/i.test(value);},$.mage.__('Letters only please')],'no-whitespace':[function(value,element){return this.optional(element)||/^\\S+$/i.test(value);},$.mage.__('No white space please')],'no-marginal-whitespace':[function(value,element){return this.optional(element)||!/^\\s+|\\s+$/i.test(value);},$.mage.__('No marginal white space please')],'zip-range':[function(value,element){return this.optional(element)||/^90[2-5]-\\d{2}-\\d{4}$/.test(value);},$.mage.__('Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx')],'integer':[function(value,element){return this.optional(element)||/^-?\\d+$/.test(value);},$.mage.__('A positive or negative non-decimal number please')],'vinUS':[function(v){var i,n,d,f,cd,cdv,LL,VL,FL,rs;if(v.length!==17){return false;}\nLL=['A','B','C','D','E','F','G','H','J','K','L','M','N','P','R','S','T','U','V','W','X','Y','Z'];VL=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9];FL=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2];rs=0;for(i=0;i<17;i++){f=FL[i];d=v.slice(i,i+1);if(i===8){cdv=d;}\nif(!isNaN(d)){d*=f;}else{for(n=0;n<LL.length;n++){if(d.toUpperCase()===LL[n]){d=VL[n];d*=f;if(isNaN(cdv)&&n===8){cdv=LL[n];}\nbreak;}}}\nrs+=d;}\ncd=rs%11;if(cd===10){cd='X';}\nif(cd===cdv){return true;}\nreturn false;},$.mage.__('The specified vehicle identification number (VIN) is invali
2d.')],'dateITA':[function(value,element){var check=false,re=/^\\d{1,2}\\/\\d{1,2}\\/\\d{4}$/,adata,gg,mm,aaaa,xdata;if(re.test(value)){adata=value.split('/');gg=parseInt(adata[0],10);mm=parseInt(adata[1],10);aaaa=parseInt(adata[2],10);xdata=new Date(aaaa,mm-1,gg);if(xdata.getFullYear()===aaaa&&xdata.getMonth()===mm-1&&xdata.getDate()===gg){check=true;}else{check=false;}}else{check=false;}\nreturn this.optional(element)||check;},$.mage.__('Please enter a correct date')],'dateNL':[function(value,element){return this.optional(element)||/^\\d\\d?[\\.\\/-]\\d\\d?[\\.\\/-]\\d\\d\\d?\\d?$/.test(value);},'Vul hier een geldige datum in.'],'time':[function(value,element){return this.optional(element)||/^([01]\\d|2[0-3])(:[0-5]\\d){0,2}$/.test(value);},$.mage.__('Please enter a valid time, between 00:00 and 23:59')],'time12h':[function(value,element){return this.optional(element)||/^((0?[1-9]|1[012])(:[0-5]\\d){0,2}(\\s[AP]M))$/i.test(value);},$.mage.__('Please enter a valid time, between 00:00 am and 12:00 pm')],'phoneUS':[function(phoneNumber,element){phoneNumber=phoneNumber.replace(/\\s+/g,'');return this.optional(element)||phoneNumber.length>9&&phoneNumber.match(/^(1-?)?(\\([2-9]\\d{2}\\)|[2-9]\\d{2})-?[2-9]\\d{2}-?\\d{4}$/);},$.mage.__('Please specify a valid phone number')],'phoneUK':[function(phoneNumber,element){return this.optional(element)||phoneNumber.length>9&&phoneNumber.match(/^(\\(?(0|\\+44)[1-9]{1}\\d{1,4}?\\)?\\s?\\d{3,4}\\s?\\d{3,4})$/);},$.mage.__('Please specify a valid phone number')],'mobileUK':[function(phoneNumber,element){return this.optional(element)||phoneNumber.length>9&&phoneNumber.match(/^((0|\\+44)7\\d{3}\\s?\\d{6})$/);},$.mage.__('Please specify a valid mobile number')],'stripped-min-length':[function(value,element,param){return value.length>=param;},$.mage.__('Please enter at least {0} characters')],'validate-no-utf8mb4-characters':[function(value){var validator=this,message=$.mage.__('Please remove invalid characters: {0}.'),matches=value.match(/(?:[\\uD800-\\uDBFF][\\uDC00-\\uDFFF])/g),result=matches===null;if(!result){validator.charErrorMessage=message.replace('{0}',matches.join());}\nreturn result;},function(){return this.charErrorMessage;}],'email2':[function(value,element){return this.optional(element)||/^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)*(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?$/i.test(value);},$.validator.messages.email],'url2':[function(value,element){return this.optional(element)||/^(https?|ftp):\\/\\/(((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:)*@)?(((\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5]))|((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)*(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.?)(:\\d*)?)(\\/((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)+(\\/(([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)*)*)?)?(\\?((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(\\#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i.test(value);},$.validator.messages.url],'credit-card-types':[function(value,element,param){var validTypes;if(/[^0-9-]+/.test(value)){return false;}\nvalue=value.replace(/\\D/g,'');validTypes=0x0000;if(param.mastercard){validTypes|=0x0001;}\nif(param.visa){validTypes|=0x0002;}\nif(param.amex){validTypes|=0x0004;}\nif(param.dinersclub){validTypes|=0x0008;}\nif(param.enroute){validTypes|=0x0010;}\nif(param.discover){validTypes|=0x0020;}\nif(param.jcb){validTypes|=0x0040;}\nif(param.unknown){validTypes|=0x0080;}\nif(param.all){validTypes=0x0001|0x0002|0x0004|0x0008|0x0010|0x0020|0x0040|0x0080;}\nif(validTypes&0x0001&&/^(51|52|53|54|55)/.test(value)){return value.length===16;}\nif(validTypes&0x0002&&/^(4)/.test(value)){return value.length===16;}\nif(validTypes&0x0004&&/^(34|37)/.test(value)){return value.length===15;}\nif(validTypes&0x0008&&/^(300|301|302|303|304|305|36|38)/.test(value)){return value.length===14;}\nif(validTypes&0x0010&&/^(2014|2149)/.test(value)){return value.length===15;}\nif(validTypes&0x0020&&/^(6011)/.test(value)){return value.length===16;}\nif(validTypes&0x0040&&/^(3)/.test(value)){return value.length===16;}\nif(validTypes&0x0040&&/^(2131|1800)/.test(value)){return value.length===15;}\nif(validTypes&0x0080){return true;}\nreturn false;},$.mage.__('Please enter a valid credit card number.')],'ipv4':[function(value,element){return this.optional(element)||/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(value);},$.mage.__('Please enter a valid IP v4 address.')],'ipv6':[function(value,element){return this.optional(element)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b)\\.){3}(\\b((25[0-5])|(1\\d{2})|(2[0-4]\\d)|(\\d{1,2}))\\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(value);},$.mage.__('Please enter a valid IP v6 address.')],'pattern':[function(value,element,param){return this.optional(element)||new RegExp(param).test(value);},$.mage.__('Invalid format.')],'allow-container-className':[function(element){if(element.type==='radio'||element.type==='checkbox'){return $(element).hasClass('change-container-classname');}},''],'validate-no-html-tags':[function(value){return!/<(\\/)?\\w+/.test(value);},$.mage.__('HTML tags are not allowed.')],'validate-select':[function(value){return value!=='none'&&value!=null&&value.length!==0;},$.mage.__('Please select an option.')],'validate-no-empty':[function(value){return!$.mage.
2isEmpty(value);},$.mage.__('Empty Value.')],'validate-alphanum-with-spaces':[function(v){return $.mage.isEmptyNoTrim(v)||/^[a-zA-Z0-9 ]+$/.test(v);},$.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or spaces only in this field.')],'validate-data':[function(v){return $.mage.isEmptyNoTrim(v)||/^[A-Za-z]+[A-Za-z0-9_]+$/.test(v);},$.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.')],'validate-street':[function(v){return $.mage.isEmptyNoTrim(v)||/^[ \\w]{3,}([A-Za-z]\\.)?([ \\w]*\\#\\d+)?(\\r\\n| )[ \\w]{3,}/.test(v);},$.mage.__('Please use only letters (a-z or A-Z), numbers (0-9), spaces and \"#\" in this field.')],'validate-phoneStrict':[function(v){return $.mage.isEmptyNoTrim(v)||/^(\\()?\\d{3}(\\))?(-|\\s)?\\d{3}(-|\\s)\\d{4}$/.test(v);},$.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')],'validate-phoneLax':[function(v){return $.mage.isEmptyNoTrim(v)||/^((\\d[\\-. ]?)?((\\(\\d{3}\\))|\\d{3}))?[\\-. ]?\\d{3}[\\-. ]?\\d{4}$/.test(v);},$.mage.__('Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890.')],'validate-fax':[function(v){return $.mage.isEmptyNoTrim(v)||/^(\\()?\\d{3}(\\))?(-|\\s)?\\d{3}(-|\\s)\\d{4}$/.test(v);},$.mage.__('Please enter a valid fax number (Ex: 123-456-7890).')],'validate-email':[function(v){return $.mage.isEmptyNoTrim(v)||/^([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*@([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*\\.(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]){2,})$/i.test(v);},$.mage.__('Please enter a valid email address (Ex: [email protected]).')],'email':[function(v){return $.mage.isEmptyNoTrim(v)||/^([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*@([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*\\.(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]){2,})$/i.test(v);},$.mage.__('Please enter a valid email address.')],'validate-emailSender':[function(v){return $.mage.isEmptyNoTrim(v)||/^(?!.*:)[\\S ]+$/.test(v);},$.mage.__('Please use only visible characters and spaces. The colon character is not allowed.')],'validate-password':[function(v){var pass;if(v==null){return false;}\npass=v.trim();if(!pass.length){return true;}\nreturn!(pass.length>0&&pass.length<6);},$.mage.__('Please enter 6 or more characters. Leading and trailing spaces will be ignored.')],'validate-admin-password':[function(v){var pass;if(v==null){return false;}\npass=v.trim();if(pass.length===0){return true;}\nif(!/[a-z]/i.test(v)||!/[0-9]/.test(v)){return false;}\nif(pass.length<7){return false;}\nreturn true;},$.mage.__('Please enter 7 or more characters, using both numeric and alphabetic.')],'validate-customer-password':[function(v,elm){var validator=this,counter=0,passwordMinLength=$(elm).data('password-min-length'),passwordMinCharacterSets=$(elm).data('password-min-character-sets'),pass=v.trim(),result=pass.length>=passwordMinLength;if(result===false){validator.passwordErrorMessage=$.mage.__('Minimum length of this field must be equal or greater than %1 symbols. Leading and trailing spaces will be ignored.').replace('%1',passwordMinLength);return result;}\nif(pass.match(/\\d+/)){counter++;}\nif(pass.match(/[a-z]+/)){counter++;}\nif(pass.match(/[A-Z]+/)){counter++;}\nif(pass.match(/[^a-zA-Z0-9]+/)){counter++;}\nif(counter<passwordMinCharacterSets){result=false;validator.passwordErrorMessage=$.mage.__('Minimum of different classes of characters in password is %1. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.').replace('%1',passwordMinCharacterSets);}\nreturn result;},function(){return this.passwordErrorMessage;}],'validate-url':[function(v){if($.mage.isEmptyNoTrim(v)){return true;}\nv=(v||'').replace(/^\\s+/,'').replace(/\\s+$/,'');return(/^(http|https|ftp):\\/\\/(([A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))(\\.[A-Z0-9]([A-Z0-9_-]*[A-Z0-9]|))*)(:(\\d+))?(\\/[A-Z0-9~](([A-Z0-9_~-]|\\.)*[A-Z0-9~]|))*\\/?(.*)?$/i).test(v);},$.mage.__('Please enter a valid URL. Protocol is required (http://, https:// or ftp://).')],'validate-clean-url':[function(v){return $.mage.isEmptyNoTrim(v)||/^(http|https|ftp):\\/\\/(([A-Z0-9][A-Z0-9_-]*)(\\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\\d+))?\\/?/i.test(v)||/^(www)((\\.[A-Z0-9][A-Z0-9_-]*)+.(com|org|net|dk|at|us|tv|info|uk|co.uk|biz|se)$)(:(\\d+))?\\/?/i.test(v);},$.mage.__('Please enter a valid URL. For example http://www.example.com or www.example.com.')],'validate-xml-identifier':[function(v){return $.mage.isEmptyNoTrim(v)||/^[A-Z][A-Z0-9_\\/-]*$/i.test(v);},$.mage.__('Please enter a valid XML-identifier (Ex: something_1, block5, id-4).')],'validate-ssn':[function(v){return $.mage.isEmptyNoTrim(v)||/^\\d{3}-?\\d{2}-?\\d{4}$/.test(v);},$.mage.__('Please enter a valid social security number (Ex: 123-45-6789).')],'validate-zip-us':[function(v){return $.mage.isEmptyNoTrim(v)||/(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(v);},$.mage.__('Please enter a valid zip code (Ex: 90602 or 90602-1234).')],'validate-date-au':[function(v){var regex,d;if($.mage.isEmptyNoTrim(v)){return true;}\nregex=/^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/;if($.mage.isEmpty(v)||!regex.test(v)){return false;}\nd=new Date(v.replace(regex,'$2/$1/$3'));return parseInt(RegExp.$2,10)===1+d.getMonth()&&parseInt(RegExp.$1,10)===d.getDate()&&parseInt(RegExp.$3,10)===d.getFullYear();},$.mage.__('Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.')],'validate-currency-dollar':[function(v){return $.mage.isEmptyNoTrim(v)||/^\\$?\\-?([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}\\d*(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$/.test(v);},$.mage.__('Please enter a valid $ amount. For example $100.00.')],'validate-not-negative-number':[function(v){if($.mage.isEmptyNoTrim(v)){return true;}\nv=$.mage.parseNumber(v);return!isNaN(v)&&v>=0;},$.mage.__('Please enter a number 0 or greater in this field.')],'validate-zero-or-greater':[function(v){if($.mage.isEmptyNoTrim(v)){return true;}\nv=$.mage.parseNumber(v);return!isNaN(v)&&v>=0;},$.mage.__('Please enter a number 0 or greater in this field.')],'validate-greater-than-zero':[function(v){if($.mage.isEmptyNoTrim(v)){return true;}\nv=$.mage.parseNumber(v);return!isNaN(v)&&v>0;},$.mage.__('Please enter a number greater than 0 in this field.')],'validate-css-length':[function(v){if(v!==''){return(/^[0-9]*\\.*[0-9]+(px|pc|pt|ex|em|mm|cm|in|%)?$/).test(v);}\nreturn true;},$.mage.__('Please input a valid CSS-length (Ex: 100px, 77pt, 20em, .5ex or 50%).')],'validate-number':[function(v){return $.mage.isEmptyNoTrim(v)||!isNaN($.mage.parseNumber(v))&&/^\\s*-?\\d*(\\.\\d*)?\\s*$/.test(v);},$.mage.__('Please enter a valid number in this field.')],'required-number':[function(v){return!!v.length;},$.mage.__('Please enter a valid number in this field.')],'validate-number-range':[function(v,elm,param){var num
2Value,dataAttrRange,classNameRange,result,range,m,classes,ii;if($.mage.isEmptyNoTrim(v)){return true;}\nnumValue=$.mage.parseNumber(v);if(isNaN(numValue)){return false;}\ndataAttrRange=/^(-?[\\d.,]+)?-(-?[\\d.,]+)?$/;classNameRange=/^number-range-(-?[\\d.,]+)?-(-?[\\d.,]+)?$/;result=true;range=param;if(typeof range==='string'){m=dataAttrRange.exec(range);if(m){result=result&&$.mage.isBetween(numValue,m[1],m[2]);}else{result=false;}}else if(elm&&elm.className){classes=elm.className.split(' ');ii=classes.length;while(ii--){range=classes[ii];m=classNameRange.exec(range);if(m){result=result&&$.mage.isBetween(numValue,m[1],m[2]);break;}}}\nreturn result;},$.mage.__('The value is not within the specified range.'),true],'validate-digits':[function(v){return $.mage.isEmptyNoTrim(v)||!/[^\\d]/.test(v);},$.mage.__('Please enter a valid number in this field.')],'validate-forbidden-extensions':[function(v,elem){var forbiddenExtensions=$(elem).attr('data-validation-params'),forbiddenExtensionsArray=forbiddenExtensions.split(','),extensionsArray=v.split(','),result=true;this.validateExtensionsMessage=$.mage.__('Forbidden extensions has been used. Avoid usage of ')+\nforbiddenExtensions;$.each(extensionsArray,function(key,extension){if(forbiddenExtensionsArray.indexOf(extension)!==-1){result=false;}});return result;},function(){return this.validateExtensionsMessage;}],'validate-digits-range':[function(v,elm,param){var numValue,dataAttrRange,classNameRange,result,range,m,classes,ii;if($.mage.isEmptyNoTrim(v)){return true;}\nnumValue=$.mage.parseNumber(v);if(isNaN(numValue)){return false;}\ndataAttrRange=/^(-?\\d+)?-(-?\\d+)?$/;classNameRange=/^digits-range-(-?\\d+)?-(-?\\d+)?$/;result=true;range=param;if(typeof range==='string'){m=dataAttrRange.exec(range);if(m){result=result&&$.mage.isBetween(numValue,m[1],m[2]);}else{result=false;}}else if(elm&&elm.className){classes=elm.className.split(' ');ii=classes.length;while(ii--){range=classes[ii];m=classNameRange.exec(range);if(m){result=result&&$.mage.isBetween(numValue,m[1],m[2]);break;}}}\nreturn result;},$.mage.__('The value is not within the specified range.'),true],'validate-range':[function(v,elm){var minValue,maxValue,ranges,reRange,result,values,i,name,validRange,minValidRange,maxValidRange;if($.mage.isEmptyNoTrim(v)){return true;}else if($.validator.methods['validate-digits']&&$.validator.methods['validate-digits'](v)){minValue=maxValue=$.mage.parseNumber(v);}else{ranges=/^(-?\\d+)?-(-?\\d+)?$/.exec(v);if(ranges){minValue=$.mage.parseNumber(ranges[1]);maxValue=$.mage.parseNumber(ranges[2]);if(minValue>maxValue){return false;}}else{return false;}}\nreRange=/^range-(-?\\d+)?-(-?\\d+)?$/;result=true;values=$(elm).prop('class').split(' ');for(i=values.length-1;i>=0;i--){name=values[i];validRange=reRange.exec(name);if(validRange){minValidRange=$.mage.parseNumber(validRange[1]);maxValidRange=$.mage.parseNumber(validRange[2]);result=result&&(isNaN(minValidRange)||minValue>=minValidRange)&&(isNaN(maxValidRange)||maxValue<=maxValidRange);}}\nreturn result;},$.mage.__('The value is not within the specified range.')],'validate-alpha':[function(v){return $.mage.isEmptyNoTrim(v)||/^[a-zA-Z]+$/.test(v);},$.mage.__('Please use letters only (a-z or A-Z) in this field.')],'validate-code':[function(v){return $.mage.isEmptyNoTrim(v)||/^[a-zA-Z]+[a-zA-Z0-9_]+$/.test(v);},$.mage.__('Please use only letters (a-z or A-Z), numbers (0-9) or underscore (_) in this field, and the first character should be a letter.')],'validate-alphanum':[function(v){return $.mage.isEmptyNoTrim(v)||/^[a-zA-Z0-9]+$/.test(v);},$.mage.__('Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.')],'validate-not-number-first':[function(value){return $.mage.isEmptyNoTrim(value)||/^[^0-9-\\.].*$/.test(value.trim());},$.mage.__('First character must be letter.')],'validate-date':[function(value,params,additionalParams){var test=moment(value,utils.convertToMomentFormat(additionalParams.dateFormat));return $.mage.isEmptyNoTrim(value)||test.isValid();},$.mage.__('Please enter a valid date.')],'validate-date-range':[function(v,elm){var m=/\\bdate-range-(\\w+)-(\\w+)\\b/.exec(elm.className),currentYear,normalizedTime,dependentElements;if(!m||m[2]==='to'||$.mage.isEmptyNoTrim(v)){return true;}\ncurrentYear=new Date().getFullYear()+'';normalizedTime=function(vd){vd=vd.split(/[.\\/]/);if(vd[2]&&vd[2].length<4){vd[2]=currentYear.substr(0,vd[2].length)+vd[2];}\nreturn new Date(vd.join('/')).getTime();};dependentElements=$(elm.form).find('.validate-date-range.date-range-'+m[1]+'-to');return!dependentElements.length||$.mage.isEmptyNoTrim(dependentElements[0].value)||normalizedTime(v)<=normalizedTime(dependentElements[0].value);},$.mage.__('Make sure the To Date is later than or the same as the From Date.')],'validate-cpassword':[function(){var conf=$('#confirmation').length>0?$('#confirmation'):$($('.validate-cpassword')[0]),pass=false,passwordElements,i,passwordElement;if($('#password')){pass=$('#password');}\npasswordElements=$('.validate-password');for(i=0;i<passwordElements.length;i++){passwordElement=$(passwordElements[i]);if(passwordElement.closest('form').attr('id')===conf.closest('form').attr('id')){pass=passwordElement;}}\nif($('.validate-admin-password').length){pass=$($('.validate-admin-password')[0]);}\nreturn pass.val()===conf.val();},$.mage.__('Please make sure your passwords match.')],'validate-identifier':[function(v){return $.mage.isEmptyNoTrim(v)||/^[a-z0-9][a-z0-9_\\/-]+(\\.[a-z0-9_-]+)?$/.test(v);},$.mage.__('Please enter a valid URL Key (Ex: \"example-page\", \"example-page.html\" or \"anotherlevel/example-page\").')],'validate-zip-international':[function(){return true;},$.mage.__('Please enter a valid zip code.')],'validate-one-required':[function(v,elm){var p=$(elm).parent(),options=p.find('input');return options.map(function(el){return $(el).val();}).length>0;},$.mage.__('Please select one of the options above.')],'validate-state':[function(v){return v!==0;},$.mage.__('Please select State/Province.')],'required-file':[function(v,elm){var result=!$.mage.
2isEmptyNoTrim(v),ovId;if(!result){ovId=$('#'+$(elm).attr('id')+'_value');if(ovId.length>0){result=!$.mage.isEmptyNoTrim(ovId.val());}}\nreturn result;},$.mage.__('Please select a file.')],'validate-ajax-error':[function(v,element){element=$(element);element.on('change.ajaxError',function(){element.removeClass('validate-ajax-error');element.off('change.ajaxError');});return!element.hasClass('validate-ajax-error');},''],'validate-optional-datetime':[function(v,elm,param){var dateTimeParts=$('.datetime-picker[id^=\"options_'+param+'\"]'),hasWithValue=false,hasWithNoValue=false,pattern=/day_part$/i,i;for(i=0;i<dateTimeParts.length;i++){if(!pattern.test($(dateTimeParts[i]).attr('id'))){if($(dateTimeParts[i]).val()==='s'){hasWithValue=true;}else{hasWithNoValue=true;}}}\nreturn hasWithValue^hasWithNoValue;},$.mage.__('The field isn\\'t complete.')],'validate-required-datetime':[function(v,elm,param){var dateTimeParts=$('.datetime-picker[id^=\"options_'+param+'\"]'),i;for(i=0;i<dateTimeParts.length;i++){if(dateTimeParts[i].value===''){return false;}}\nreturn true;},$.mage.__('This is a required field.')],'validate-one-required-by-name':[function(v,elm,selector){var name=elm.name.replace(/([\\\\\"])/g,'\\\\$1'),container=this.currentForm;selector=selector===true?'input[name=\"'+name+'\"]:checked':selector;return!!container.querySelectorAll(selector).length;},$.mage.__('Please select one of the options.')],'less-than-equals-to':[function(value,element,params){if($.isNumeric($(params).val())&&$.isNumeric(value)){this.lteToVal=$(params).val();return parseFloat(value)<=parseFloat($(params).val());}\nreturn true;},function(){var message=$.mage.__('Please enter a value less than or equal to %s.');return message.replace('%s',this.lteToVal);}],'greater-than-equals-to':[function(value,element,params){if($.isNumeric($(params).val())&&$.isNumeric(value)){this.gteToVal=$(params).val();return parseFloat(value)>=parseFloat($(params).val());}\nreturn true;},function(){var message=$.mage.__('Please enter a value greater than or equal to %s.');return message.replace('%s',this.gteToVal);}],'validate-emails':[function(value){var validRegexp,emails,i;if($.mage.isEmpty(value)){return true;}\nvalidRegexp=/^([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9,!\\#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\|\\}~-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*@([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z0-9-]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*\\.(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]){2,})$/i;emails=value.split(/[\\s\\n\\,]+/g);for(i=0;i<emails.length;i++){if(!validRegexp.test(emails[i].trim())){return false;}}\nreturn true;},$.mage.__('Please enter valid email addresses, separated by commas. For example, [email protected], [email protected].')],'validate-cc-type-select':[function(value,element,params){if(value&¶ms&&creditCartTypes[value]){return creditCartTypes[value][0].test($(params).val().replace(/\\s+/g,''));}\nreturn false;},$.mage.__('Card type does not match credit card number.')],'validate-cc-number':[function(value){if(value){return validateCreditCard(value);}\nreturn false;},$.mage.__('Please enter a valid credit card number.')],'validate-cc-type':[function(value,element,params){var ccType;if(value&¶ms){ccType=$(params).val();value=value.replace(/\\s/g,'').replace(/\\-/g,'');if(creditCartTypes[ccType]&&creditCartTypes[ccType][0]){return creditCartTypes[ccType][0].test(value);}else if(creditCartTypes[ccType]&&!creditCartTypes[ccType][0]){return true;}}\nreturn false;},$.mage.__('Credit card number does not match credit card type.')],'validate-cc-exp':[function(value,element,params){var isValid=false,month,year,currentTime,currentMonth,currentYear;if(value&¶ms){month=value;year=$(params).val();currentTime=new Date();currentMonth=currentTime.getMonth()+1;currentYear=currentTime.getFullYear();isValid=!year||year>currentYear||year==currentYear&&month>=currentMonth;}\nreturn isValid;},$.mage.__('Incorrect credit card expiration date.')],'validate-cc-cvn':[function(value,element,params){var ccType;if(value&¶ms){ccType=$(params).val();
2if(creditCartTypes[ccType]&&creditCartTypes[ccType][0]){return creditCartTypes[ccType][1].test(value);}}\nreturn false;},$.mage.__('Please enter a valid credit card verification number.')],'validate-cc-ukss':[function(value){return value;},$.mage.__('Please enter issue number or start date for switch/solo card type.')],'validate-length':[function(v,elm){var reMax=new RegExp(/^maximum-length-[0-9]+$/),reMin=new RegExp(/^minimum-length-[0-9]+$/),validator=this,result=true,length=0;$.each(elm.className.split(' '),function(index,name){if(name.match(reMax)&&result){length=name.split('-')[2];result=v.length<=length;validator.validateMessage=$.mage.__('Please enter less or equal than %1 symbols.').replace('%1',length);}\nif(name.match(reMin)&&result&&!$.mage.isEmpty(v)){length=name.split('-')[2];result=v.length>=length;validator.validateMessage=$.mage.__('Please enter more or equal than %1 symbols.').replace('%1',length);}});return result;},function(){return this.validateMessage;}],'required-entry':[function(value){return!$.mage.isEmpty(value);},$.mage.__('This is a required field.')],'not-negative-amount':[function(v){if(v.length){return(/^\\s*\\d+([,.]\\d+)*\\s*%?\\s*$/).test(v);}\nreturn true;},$.mage.__('Please enter positive number in this field.')],'validate-per-page-value-list':[function(v){var isValid=true,values=v.split(','),i;if($.mage.isEmpty(v)){return isValid;}\nfor(i=0;i<values.length;i++){if(!/^[0-9]+$/.test(values[i])){isValid=false;}}\nreturn isValid;},$.mage.__('Please enter a valid value, ex: 10,20,30')],'validate-per-page-value':[function(v,elm){var values;if($.mage.isEmpty(v)){return false;}\nvalues=$('#'+elm.id+'_values').val().split(',');return values.indexOf(v)!==-1;},$.mage.__('Please enter a valid value from list')],'validate-new-password':[function(v){if($.validator.methods['validate-password']&&!$.validator.methods['validate-password'](v)){return false;}\nif($.mage.isEmpty(v)&&v!==''){return false;}\nreturn true;},$.mage.__('Please enter 6 or more characters. Leading and trailing spaces will be ignored.')],'required-if-not-specified':[function(value,element,params){var valid=false,alternate=$(params),alternateValue;if(alternate.length>0){valid=this.check(alternate);if(valid){alternateValue=alternate.val();if(typeof alternateValue=='undefined'||alternateValue.length===0){valid=false;}}}\nif(!valid){valid=!this.optional(element);}\nreturn valid;},$.mage.__('This is a required field.')],'required-if-all-sku-empty-and-file-not-loaded':[function(value,element,params){var valid=false,alternate=$(params.specifiedId),alternateValue;if(alternate.length>0){valid=this.check(alternate);if(valid){alternateValue=alternate.val();if(typeof alternateValue=='undefined'||alternateValue.length===0){valid=false;}}}\nif(!valid){valid=!this.optional(element);}\n$('input['+params.dataSku+'=true]').each(function(){if($(this).val()!==''){valid=true;}});return valid;},$.mage.__('Please enter valid SKU key.')],'required-if-specified':[function(value,element,params){var valid=true,dependent=$(params),dependentValue;if(dependent.length>0){valid=this.check(dependent);if(valid){dependentValue=dependent.val();valid=typeof dependentValue!='undefined'&&dependentValue.length>0;}}\nif(valid){valid=!this.optional(element);}else{valid=true;}\nreturn valid;},$.mage.__('This is a required field.')],'required-number-if-specified':[function(value,element,params){var valid=true,dependent=$(params),depeValue;if(dependent.length){valid=this.check(dependent);if(valid){depeValue=dependent[0].value;valid=!!(depeValue&&depeValue.length);}}\nreturn valid?!!value.length:true;},$.mage.__('Please enter a valid number.')],'datetime-validation':[function(value,element){var isValid=true;if($(element).val().length===0){isValid=false;$(element).addClass('mage-error');}\nreturn isValid;},$.mage.__('This is required field')],'required-text-swatch-entry':[tableSingleValidation,$.mage.__('Admin is a required field in each row.')],'required-visual-swatch-entry':[tableSingleValidation,$.mage.__('Admin is a required field in each row.')],'required-dropdown-attribute-entry':[tableSingleValidation,$.mage.__('Admin is a required field in each row.')],'validate-item-quantity':[function(value,element,params){var validator=this,result=false,qty=$.mage.parseNumber(value),isMinAllowedValid=typeof params.minAllowed==='undefined'||qty>=$.mage.parseNumber(params.minAllowed),isMaxAllowedValid=typeof params.maxAllowed==='undefined'||qty<=$.mage.parseNumber(params.maxAllowed),isQtyIncrementsValid=typeof params.qtyIncrements==='undefined'||resolveModulo(qty,$.mage.parseNumber(params.qtyIncrements))===0.0;result=qty>0;
2if(result===false){validator.itemQtyErrorMessage=$.mage.__('Please enter a quantity greater than 0.');return result;}\nresult=isMinAllowedValid;if(result===false){validator.itemQtyErrorMessage=$.mage.__('The fewest you may purchase is %1.').replace('%1',params.minAllowed);return result;}\nresult=isMaxAllowedValid;if(result===false){validator.itemQtyErrorMessage=$.mage.__('The maximum you may purchase is %1.').replace('%1',params.maxAllowed);return result;}\nresult=isQtyIncrementsValid;if(result===false){validator.itemQtyErrorMessage=$.mage.__('You can buy this product only in quantities of %1 at a time.').replace('%1',params.qtyIncrements);return result;}\nreturn result;},function(){return this.itemQtyErrorMessage;}],'password-not-equal-to-user-name':[function(value,element,params){if(typeof params==='string'){return value.toLowerCase()!==params.toLowerCase();}\nreturn true;},$.mage.__('The password can\\'t be the same as the email address. Create a new password and try again.')]};$.each(rules,function(i,rule){rule.unshift(i);$.validator.addMethod.apply($.validator,rule);});$.validator.addClassRules({'required-option':{required:true},'required-options-count':{required:true},'validate-both-passwords':{'validate-cpassword':true}});$.validator.messages=$.extend($.validator.messages,{required:$.mage.__('This is a required field.'),remote:$.mage.__('Please fix this field.'),email:$.mage.__('Please enter a valid email address.'),url:$.mage.__('Please enter a valid URL.'),date:$.mage.__('Please enter a valid date.'),dateISO:$.mage.__('Please enter a valid date (ISO).'),number:$.mage.__('Please enter a valid number.'),digits:$.mage.__('Please enter only digits.'),creditcard:$.mage.__('Please enter a valid credit card number.'),equalTo:$.mage.__('Please enter the same value again.'),maxlength:$.validator.format($.mage.__('Please enter no more than {0} characters.')),minlength:$.validator.format($.mage.__('Please enter at least {0} characters.')),rangelength:$.validator.format($.mage.__('Please enter a value between {0} and {1} characters long.')),range:$.validator.format($.mage.__('Please enter a value between {0} and {1}.')),max:$.validator.format($.mage.__('Please enter a value less than or equal to {0}.')),min:$.validator.format($.mage.__('Please enter a value greater than or equal to {0}.'))});if($.metadata){$.metadata.setType('html5');}\nshowLabel=$.validator.prototype.showLabel;$.extend(true,$.validator.prototype,{showLabel:function(element,message){var label,elem;showLabel.call(this,element,message);label=this.errorsFor(element);elem=$(element);if(!label.attr('id')){label.attr('id',this.idOrName(element)+'-error');}\nelem.attr('aria-invalid','true').attr('aria-describedby',label.attr('id'));}});$.validator.validateElement=function(element){var form,validator,valid,classes;element=$(element);form=element.get(0).form;validator=form?$(form).data('validator'):null;if(validator){return validator.element(element.get(0));}\nvalid=true;classes=element.prop('class').split(' ');$.each(classes,$.proxy(function(i,className){if(this.methods[className]&&!this.methods[className](element.val(),element.get(0))){valid=false;return valid;}},this));return valid;};originValidateDelegate=$.fn.validateDelegate;$.fn.validateDelegate=function(){if(!this[0].form){return this;}\nreturn originValidateDelegate.apply(this,arguments);};$.validator.validateSingleElement=function(element,config){var errors={},valid=true,validateConfig={errorElement:'label',ignore:'.ignore-validate',hideError:false},form,validator,classes,elementValue;$.extend(validateConfig,config);element=$(element).not(validateConfig.ignore);if(!element.length){return true;}\nform=element.get(0).form;validator=form?$(form).data('validator'):null;if(validator){return validator.element(element.get(0));}\nclasses=element.prop('class').split(' ');validator=element.parent().data('validator')||$.mage.validation(validateConfig,element.parent()).validate;element.removeClass(validator.settings.errorClass);validator.toHide=validator.toShow;validator.hideErrors();validator.toShow=validator.toHide=$([]);$.each(classes,$.proxy(function(i,className){elementValue=element.val();if(element.is(':checkbox')||element.is(':radio')){elementValue=element.is(':checked')||null;}\nif(this.methods[className]&&!this.methods[className](elementValue,element.get(0))){valid=false;errors[element.get(0).name]=this.messages[className];
2validator.invalid[element.get(0).name]=true;if(!validateConfig.hideError){validator.showErrors(errors);}\nreturn valid;}},this));return valid;};$.widget('mage.validation',{options:{meta:'validate',onfocusout:false,onkeyup:false,onclick:false,ignoreTitle:true,errorClass:'mage-error',errorElement:'div',errorPlacement:function(error,element){var errorPlacement=element,fieldWrapper;if(element.hasClass('_has-datepicker')){errorPlacement=element.siblings('button');}\nfieldWrapper=element.closest('.addon');if(fieldWrapper.length){errorPlacement=fieldWrapper.after(error);}\nif(element.is(':checkbox')||element.is(':radio')){errorPlacement=element.parents('.control').children().last();if(!errorPlacement.length){errorPlacement=element.siblings('label').last();}}\nif(element.siblings('.tooltip').length){errorPlacement=element.siblings('.tooltip');}\nif(element.next().find('.tooltip').length){errorPlacement=element.next();}\nerrorPlacement.after(error);}},isValid:function(){return this.element.valid();},clearError:function(){if(arguments.length){$.each(arguments,$.proxy(function(index,item){this.validate.prepareElement(item);this.validate.hideErrors();},this));}else{this.validate.resetForm();}},_create:function(){this.validate=this.element.validate(this.options);this.element.find('.field.required').find('.control').find('input, select, textarea').attr('aria-required','true');this.element.find('.field.additional').find('.control').find('input, select, textarea').removeAttr('aria-required');this._listenFormValidate();},_listenFormValidate:function(){$('form').on('invalid-form.validate',this.listenFormValidateHandler);},listenFormValidateHandler:function(event,validation){var firstActive=$(validation.errorList[0].element||[]),lastActive=$(validation.findLastActive()||validation.errorList.length&&validation.errorList[0].element||[]),windowHeight=$(window).height(),parent,successList;if(lastActive.is(':hidden')){parent=lastActive.parent();$('html, body').animate({scrollTop:parent.offset().top-windowHeight / 2});}\nsuccessList=validation.successList;if(successList.length){$.each(successList,function(){$(this).removeAttr('aria-describedby').removeAttr('aria-invalid');});}\nif(firstActive.length){$('html, body').stop().animate({scrollTop:firstActive.parent().offset().top-windowHeight / 2});firstActive.trigger('focus');}}});return $.mage.validation;});","mage/accordion.min.js":"define(['jquery','mage/tabs'],function($,tabs){'use strict';$.widget('mage.accordion',tabs,{options:{active:[0],multipleCollapsible:false,openOnFocus:false},_callCollapsible:function(){var self=this,disabled=false,active=false;if(typeof this.options.active==='string'){this.options.active=this.options.active.split(' ').map(function(item){return parseInt(item,10);});}\n$.each(this.collapsibles,function(i){disabled=active=false;if($.inArray(i,self.options.disabled)!==-1){disabled=true;}\nif($.inArray(i,self.options.active)!==-1){active=true;}\nself._instantiateCollapsible(this,i,active,disabled);});},_toggleActivate:function(action,index){var self=this;if(Array.isArray(index&&this.options.multipleCollapsible)){$.each(index,function(){self.collapsibles.eq(this).collapsible(action);});}else if(index===undefined&&this.options.multipleCollapsible){this.collapsibles.collapsible(action);}else{this._super(action,index);}},_handleDeepLinking:function(){if(!this.options.multipleCollapsible){this._super();}},_closeOthers:function(){var self=this;if(!this.options.multipleCollapsible){$.each(this.collapsibles,function(){$(this).on('beforeOpen',function(){self.collapsibles.not(this).collapsible('deactivate');});});}\n$.each(this.collapsibles,function(){$(this).on('beforeOpen',function(){var section=$(this);section.addClass('allow').prevAll().addClass('allow');section.nextAll().removeClass('allow');});});}});return $.mage.accordion;});","mage/bootstrap.min.js":"define(['jquery','mage/apply/main','Magento_Ui/js/lib/knockout/bootstrap'],function($,mage){'use strict';$.ajaxSetup({cache:false});setTimeout(mage.apply);});","mage/calendar.min.js":"define(['jquery','jquery-ui-modules/widget','jquery-ui-modules/datepicker','jquery-ui-modules/timepicker'],function($){'use strict';var calendarBasePrototype,datepickerPrototype=$.datepicker.constructor.prototype;$.datepicker.markerClassName='_has-datepicker';$.extend(datepickerPrototype,{_getTimezoneDate:function(options){var ms=Date.now();options=options||$.calendarConfig||{};if(typeof options.serverTimezoneOffset!=='undefined'){ms+=new Date().getTimezoneOffset()*60*1000+options.serverTimezoneOffset*1000;}else if(typeof options.serverTimezoneSeconds!=='undefined'){ms=(options.serverTimezoneSeconds+new Date().getTimezoneOffset()*60)*1000;}\nreturn new Date(ms);},_setTimezoneDateDatepicker:function(target){this._setDateDatepicker(target,this._getTimezoneDate());}});$.widget('mage.calendar',{options:{autoComplete:true},_create:function(){this._enableAMPM();this.options=$.extend({},$.calendarConfig?$.calendarConfig:{}
2,this.options.showsTime?{showTime:true,showHour:true,showMinute:true}:{},this.options);this._initPicker(this.element);this._overwriteGenerateHtml();this._overwriteFindPos();},_picker:function(){return this.options.showsTime?'datetimepicker':'datepicker';},_enableAMPM:function(){if(this.options.timeFormat&&this.options.timeFormat.indexOf('tt')>=0){this.options.ampm=true;}},_overwriteFindPos:function(){$.datepicker.constructor.prototype._findPos=function(obj){let domPosition=obj.getBoundingClientRect();return[domPosition.left,domPosition.top];};},_overwriteGenerateHtml:function(){$.datepicker.constructor.prototype._generateHTML=function(inst){var today=this._getTimezoneDate(),isRTL=this._get(inst,'isRTL'),showButtonPanel=this._get(inst,'showButtonPanel'),hideIfNoPrevNext=this._get(inst,'hideIfNoPrevNext'),navigationAsDateFormat=this._get(inst,'navigationAsDateFormat'),numMonths=this._getNumberOfMonths(inst),showCurrentAtPos=this._get(inst,'showCurrentAtPos'),stepMonths=this._get(inst,'stepMonths'),isMultiMonth=parseInt(numMonths[0],10)!==1||parseInt(numMonths[1],10)!==1,currentDate=this._daylightSavingAdjust(!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)),minDate=this._getMinMaxDate(inst,'min'),maxDate=this._getMinMaxDate(inst,'max'),drawMonth=inst.drawMonth-showCurrentAtPos,drawYear=inst.drawYear,maxDraw,prevText=this._get(inst,'prevText'),prev,nextText=this._get(inst,'nextText'),next,currentText=this._get(inst,'currentText'),gotoDate,controls,buttonPanel,firstDay,showWeek=this._get(inst,'showWeek'),dayNames=this._get(inst,'dayNames'),dayNamesMin=this._get(inst,'dayNamesMin'),monthNames=this._get(inst,'monthNames'),monthNamesShort=this._get(inst,'monthNamesShort'),beforeShowDay=this._get(inst,'beforeShowDay'),showOtherMonths=this._get(inst,'showOtherMonths'),selectOtherMonths=this._get(inst,'selectOtherMonths'),defaultDate=this._getDefaultDate(inst),html='',row=0,col=0,selectedDate,cornerClass=' ui-corner-all',group='',calender='',dow=0,thead,day,daysInMonth,leadDays,curRows,numRows,printDate,dRow=0,tbody,daySettings,otherMonth,unselectable;if(drawMonth<0){drawMonth+=12;drawYear--;}\nif(maxDate){maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[0]*numMonths[1]+1,maxDate.getDate()));maxDraw=minDate&&maxDraw<minDate?minDate:maxDraw;while(this._daylightSavingAdjust(new Date(drawYear,drawMonth,1))>maxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--;}}}\ninst.drawMonth=drawMonth;inst.drawYear=drawYear;prevText=!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst));prev=this._canAdjustMonth(inst,-1,drawYear,drawMonth)?'<a class=\"ui-datepicker-prev ui-corner-all\" data-handler=\"prev\" data-event=\"click\"'+' title=\"'+prevText+'\">'+'<span class=\"ui-icon ui-icon-circle-triangle-'+(isRTL?'e':'w')+'\">'+''+prevText+'</span></a>':hideIfNoPrevNext?'':'<a class=\"ui-datepicker-prev ui-corner-all ui-state-disabled\" title=\"'+''+prevText+'\"><span class=\"ui-icon ui-icon-circle-triangle-'+''+(isRTL?'e':'w')+'\">'+prevText+'</span></a>';nextText=!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst));next=this._canAdjustMonth(inst,+1,drawYear,drawMonth)?'<a class=\"ui-datepicker-next ui-corner-all\" data-handler=\"next\" data-event=\"click\"'+'title=\"'+nextText+'\"><span class=\"ui-icon ui-icon-circle-triangle-'+''+(isRTL?'w':'e')+'\">'+nextText+'</span></a>':hideIfNoPrevNext?'':'<a class=\"ui-datepicker-next ui-corner-all ui-state-disabled\" title=\"'+nextText+'\">'+'<span class=\"ui-icon ui-icon-circle-triangle-'+(isRTL?'w':'e')+'\">'+nextText+'</span></a>';gotoDate=this._get(inst,'gotoCurrent')&&inst.currentDay?currentDate:today;currentText=!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst));controls=!inst.inline?'<button type=\"button\" class=\"ui-datepicker-close ui-state-default ui-priority-primary '+'ui-corner-all\" data-handler=\"hide\" data-event=\"click\">'+\nthis._get(inst,'closeText')+'</button>':'';buttonPanel=showButtonPanel?'<div class=\"ui-datepicker-buttonpane ui-widget-content\">'+(isRTL?controls:'')+\n(this._isInRange(inst,gotoDate)?'<button type=\"button\" class=\"ui-datepicker-current '+'ui-state-default ui-priority-secondary ui-corner-all\"'\n+' data-handler=\"today\" data-event=\"click\"'+'>'+currentText+'</button>
2':'')+\n(isRTL?'':controls)+'</div>':'';firstDay=parseInt(this._get(inst,'firstDay'),10);firstDay=isNaN(firstDay)?0:firstDay;for(row=0;row<numMonths[0];row++){this.maxRows=4;for(col=0;col<numMonths[1];col++){selectedDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,inst.selectedDay));calender='';if(isMultiMonth){calender+='<div class=\"ui-datepicker-group';if(numMonths[1]>1){switch(col){case 0:calender+=' ui-datepicker-group-first';cornerClass=' ui-corner-'+(isRTL?'right':'left');break;case numMonths[1]-1:calender+=' ui-datepicker-group-last';cornerClass=' ui-corner-'+(isRTL?'left':'right');break;default:calender+=' ui-datepicker-group-middle';cornerClass='';break;}}\ncalender+='\">';}\ncalender+='<div class=\"ui-datepicker-header '+'ui-widget-header ui-helper-clearfix'+cornerClass+'\">'+\n(/all|left/.test(cornerClass)&&parseInt(row,10)===0?isRTL?next:prev:'')+\n(/all|right/.test(cornerClass)&&parseInt(row,10)===0?isRTL?prev:next:'')+\nthis._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,row>0||col>0,monthNames,monthNamesShort)+'</div><table class=\"ui-datepicker-calendar\"><thead>'+'<tr>';thead=showWeek?'<th class=\"ui-datepicker-week-col\">'+this._get(inst,'weekHeader')+'</th>':'';for(dow=0;dow<7;dow++){day=(dow+firstDay)%7;thead+='<th'+((dow+firstDay+6)%7>=5?' class=\"ui-datepicker-week-end\"':'')+'>'+'<span title=\"'+dayNames[day]+'\">'+dayNamesMin[day]+'</span></th>';}\ncalender+=thead+'</tr></thead><tbody>';daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear===inst.selectedYear&&drawMonth===inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth);}\nleadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;curRows=Math.ceil((leadDays+daysInMonth)/ 7);numRows=isMultiMonth?this.maxRows>curRows?this.maxRows:curRows:curRows;this.maxRows=numRows;printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(dRow=0;dRow<numRows;dRow++){calender+='<tr>';tbody=!showWeek?'':'<td class=\"ui-datepicker-week-col\">'+\nthis._get(inst,'calculateWeek')(printDate)+'</td>';for(dow=0;dow<7;dow++){daySettings=beforeShowDay?beforeShowDay.apply(inst.input?inst.input[0]:null,[printDate]):[true,''];otherMonth=printDate.getMonth()!==drawMonth;unselectable=otherMonth&&!selectOtherMonths||!daySettings[0]||minDate&&printDate<minDate||maxDate&&printDate>maxDate;tbody+='<td class=\"'+\n((dow+firstDay+6)%7>=5?' ui-datepicker-week-end':'')+\n(otherMonth?' ui-datepicker-other-month':'')+\n(printDate.getTime()===selectedDate.getTime()&&drawMonth===inst.selectedMonth&&inst._keyEvent||defaultDate.getTime()===printDate.getTime()&&defaultDate.getTime()===selectedDate.getTime()?' '+this._dayOverClass:'')+\n(unselectable?' '+this._unselectableClass+' ui-state-disabled':'')+\n(otherMonth&&!showOtherMonths?'':' '+daySettings[1]+\n(printDate.getTime()===currentDate.getTime()?' '+this._currentClass:'')+\n(printDate.getDate()===today.getDate()&&printDate.getMonth()===today.getMonth()&&printDate.getYear()===today.getYear()?' ui-datepicker-today':''))+'\"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title=\"'+daySettings[2]+'\"':'')+\n(unselectable?'':' data-handler=\"selectDay\" data-event=\"click\" data-month=\"'+''+printDate.getMonth()+'\" data-year=\"'+\nprintDate.getFullYear()+'\"')+'>'+\n(otherMonth&&!showOtherMonths?' ':unselectable?'<span class=\"ui-state-default\">'+printDate.getDate()+'</span>':'<a class=\"ui-state-default'+\n(printDate.getTime()===today.getTime()?' ':'')+\n(printDate.getTime()===currentDate.getTime()?' ui-state-active':'')+\n(otherMonth?' ui-priority-secondary':'')+'\" data-date=\"'+printDate.getDate()+'\" href=\"#\">'+\nprintDate.getDate()+'</a>')+'</td>';printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate);}\ncalender+=tbody+'</tr>';}\ndrawMonth++;if(drawMonth>11){drawMonth=0;drawYear++;}\ncalender+='</tbody></table>'+(isMultiMonth?'</div>'+\n(numMonths[0]>0&&col===numMonths[1]-1?'<div class=\"ui-datepicker-row-break\"></div>':''):'');group+=calender;}\nhtml+=group;}\nhtml+=buttonPanel+($.ui.ie6&&!inst.inline?'<iframe src=\"javascript:false;\" class=\"ui-datepicker-cover\" frameborder=\"0\"></iframe>':'');inst._keyEvent=false;return html;};},_setCurrentDate:function(element){if(!element.val()){element[this._picker()]('setTimezoneDate').val('');}},_initPicker:function(element){var picker=element[this._picker()](this.options),pickerButtonText=picker.next('.ui-datepicker-trigger').find('img').attr('title');picker.next('.ui-datepicker-trigger').addClass('v-middle').text('').append('<span>'+pickerButtonText+'</span>');$(element).attr('autocomplete',this.options.autoComplete?'on':'off');this._setCurrentDate(element);},_destroy:function(){this.element[this._picker()]('destroy');this._super();},getTimezoneDate:function(){return datepickerPrototype._getTimezoneDate.call(this,this.options);}});calendarBasePrototype=$.mage.calendar.prototype;$.widget('mage.calendar',$.extend({}
2,calendarBasePrototype,{dateTimeFormat:{date:{'EEEE':'DD','EEE':'D','EE':'D','E':'D','D':'o','MMMM':'MM','MMM':'M','MM':'mm','M':'mm','yyyy':'yy','y':'yy','Y':'yy','yy':'yy'},time:{'a':'TT'}},_create:function(){if(this.options.dateFormat){this.options.dateFormat=this._convertFormat(this.options.dateFormat,'date');}\nif(this.options.timeFormat){this.options.timeFormat=this._convertFormat(this.options.timeFormat,'time');}\ncalendarBasePrototype._create.apply(this,arguments);},_convertFormat:function(format,type){var symbols=format.match(/([a-z]+)/ig),separators=format.match(/([^a-z]+)/ig),self=this,convertedFormat='';if(symbols){$.each(symbols,function(key,val){convertedFormat+=(self.dateTimeFormat[type][val]||val)+\n(separators[key]||'');});}\nreturn convertedFormat;}}));$.widget('mage.dateRange',$.mage.calendar,{_initPicker:function(){var from,to;if(this.options.from&&this.options.to){from=this.element.find('#'+this.options.from.id);to=this.element.find('#'+this.options.to.id);$.mage.calendar.prototype._initPicker.call(this,from);this.options.onSelect=$.proxy(function(selectedDate){from[this._picker()]('option','maxDate',selectedDate);},this);$.mage.calendar.prototype._initPicker.call(this,to);to.on('change',$.proxy(function(){from[this._picker()]('option','maxDate',to[this._picker()]('getDate'));},this));}},_destroy:function(){if(this.options.from){this.element.find('#'+this.options.from.id)[this._picker()]('destroy');}\nif(this.options.to){this.element.find('#'+this.options.to.id)[this._picker()]('destroy');}\nthis._super();}});$.datepicker._gotoTodayOriginal=$.datepicker._gotoToday;$.datepicker._showDatepickerOriginal=$.datepicker._showDatepicker;$.datepicker._showDatepicker=function(input){if(!input.disabled){$.datepicker._showDatepickerOriginal.call(this,input);}};$.datepicker._gotoToday=function(el){$(el).datepicker('setTimezoneDate').trigger('blur').trigger('change');};return{dateRange:$.mage.dateRange,calendar:$.mage.calendar};});","mage/collapsible.min.js":"define(['jquery','jquery-ui-modules/widget','jquery-ui-modules/core','jquery/jquery-storageapi','mage/mage'],function($){'use strict';var hideProps={},showProps={};hideProps.height='hide';showProps.height='show';$.widget('mage.collapsible',{options:{active:false,disabled:false,collapsible:true,header:'[data-role=title]',content:'[data-role=content]',trigger:'[data-role=trigger]',closedState:null,openedState:null,disabledState:null,ajaxUrlElement:'[data-ajax=true]',ajaxContent:false,loadingClass:null,saveState:false,animate:false,icons:{activeHeader:null,header:null},collateral:{element:null,openedState:null}},_create:function(){this.storage=$.localStorage;this.icons=false;if(typeof this.options.icons==='string'){this.options.icons=JSON.parse(this.options.icons);}\nthis._processPanels();this._processState();this._refresh();if(this.options.icons.header&&this.options.icons.activeHeader){this._createIcons();this.icons=true;}\nthis.element.on('dimensionsChanged',function(e){if(e.target&&e.target.classList.contains('active')){this._scrollToTopIfNotVisible();}}.bind(this));this._bind('click');this._trigger('created');},_refresh:function(){this.trigger.attr('tabIndex',0);if(this.options.active&&!this.options.disabled){if(this.options.openedState){this.element.addClass(this.options.openedState);}\nif(this.options.collateral.element&&this.options.collateral.openedState){$(this.options.collateral.element).addClass(this.options.collateral.openedState);}\nif(this.options.ajaxContent){this._loadContent();}\nthis.header.attr({'aria-selected':false});}else if(this.options.disabled){this.disable();}else{this.content.hide();if(this.options.closedState){this.element.addClass(this.options.closedState);}}},_processState:function(){var anchor=window.location.hash,isValid=$.mage.isValidSelector(anchor),urlPath=window.location.pathname.replace(/\\./g,''),state;this.stateKey=encodeURIComponent(urlPath+this.element.attr('id'));if(isValid&&($(this.content.find(anchor)).length>0||this.content.attr('id')===anchor.replace('#',''))){this.element.parents('[data-collapsible=true]').collapsible('forceActivate');if(!this.options.disabled){this.options.active=true;if(this.options.saveState){this.storage.set(this.stateKey,true);}}}else if(this.options.saveState&&!this.options.disabled){state=this.storage.get(this.stateKey);if(typeof state==='undefined'||state===null){this.storage.set(this.stateKey,this.options.active);}else if(state===true){this.options.active=true;}else if(state===false){this.options.active=false;}}},_createIcons:function(){var icons=this.options.icons;
2if(icons){$('<span>').addClass(icons.header).attr('data-role','icons').prependTo(this.header);if(this.options.active&&!this.options.disabled){this.header.children('[data-role=icons]').removeClass(icons.header).addClass(icons.activeHeader);}}},_destroyIcons:function(){this.header.children('[data-role=icons]').remove();},_destroy:function(){var options=this.options;this.element.removeAttr('data-collapsible');this.trigger.removeAttr('tabIndex');if(options.openedState){this.element.removeClass(options.openedState);}\nif(this.options.collateral.element&&this.options.collateral.openedState){$(this.options.collateral.element).removeClass(this.options.collateral.openedState);}\nif(options.closedState){this.element.removeClass(options.closedState);}\nif(options.disabledState){this.element.removeClass(options.disabledState);}\nif(this.icons){this._destroyIcons();}},_processPanels:function(){var headers,triggers;this.element.attr('data-collapsible','true');if(typeof this.options.header==='object'){this.header=this.options.header;}else{headers=this.element.find(this.options.header);if(headers.length>0){this.header=headers.eq(0);}else{this.header=this.element;}}\nif(typeof this.options.content==='object'){this.content=this.options.content;}else{this.content=this.header.next(this.options.content).eq(0);}\nif(this.header.attr('id')){this.content.attr('aria-labelledby',this.header.attr('id'));}\nif(this.content.attr('id')){this.header.attr('aria-controls',this.content.attr('id'));}\nthis.header.attr({'role':'tab','aria-selected':this.options.active,'aria-expanded':this.options.active});if(this.header.parent().attr('role')!=='presentation'){this.header.parent().attr('role','tablist');}\nthis.content.attr({'role':'tabpanel','aria-hidden':!this.options.active});if(typeof this.options.trigger==='object'){this.trigger=this.options.trigger;}else{triggers=this.header.find(this.options.trigger);if(triggers.length>0){this.trigger=triggers.eq(0);}else{this.trigger=this.header;}}},_keydown:function(event){var keyCode;if(event.altKey||event.ctrlKey){return;}\nkeyCode=$.ui.keyCode;switch(event.keyCode){case keyCode.SPACE:case keyCode.ENTER:this._eventHandler(event);break;}},_bind:function(event){var self=this;this.events={keydown:'_keydown'};if(event){$.each(event.split(' '),function(index,eventName){self.events[eventName]='_eventHandler';});}\nthis._off(this.trigger);if(!this.options.disabled){this._on(this.trigger,this.events);}},disable:function(){this.options.disabled=true;this._off(this.trigger);this.forceDeactivate();if(this.options.disabledState){this.element.addClass(this.options.disabledState);}\nthis.trigger.attr('tabIndex',-1);},enable:function(){this.options.disabled=false;this._on(this.trigger,this.events);this.forceActivate();if(this.options.disabledState){this.element.removeClass(this.options.disabledState);}\nthis.trigger.attr('tabIndex',0);},_eventHandler:function(event){if(this.options.active&&this.options.collapsible){this.deactivate();}else{this.activate();}\nevent.preventDefault();},_animate:function(prop){var duration,easing,animate=this.options.animate;if(typeof animate==='number'){duration=animate;}\nif(typeof animate==='string'){animate=JSON.parse(animate);}\nduration=duration||animate.duration;easing=animate.easing;this.content.animate(prop,duration,easing);},deactivate:function(){if(this.options.animate){this._animate(hideProps);}else{this.content.hide();}\nthis._close();},forceDeactivate:function(){this.content.hide();this._close();},_close:function(){this.options.active=false;if(this.options.saveState){this.storage.set(this.stateKey,false);}\nif(this.options.openedState){this.element.removeClass(this.options.openedState);}\nif(this.options.collateral.element&&this.options.collateral.openedState){$(this.options.collateral.element).removeClass(this.options.collateral.openedState);}\nif(this.options.closedState){this.element.addClass(this.options.closedState);}\nif(this.icons){this.header.children('[data-role=icons]').removeClass(this.options.icons.activeHeader).addClass(this.options.icons.header);}\nthis.header.attr({'aria-selected':'false','aria-expanded':'false'});this.content.attr({'aria-hidden':'true'});this.element.trigger('dimensionsChanged',{opened:false});},activate:function(){if(this.options.disabled){return;}\nif(this.options.animate){this._animate(showProps);}else{this.content.show();}\nthis._open();},forceActivate:function(){if(!this.options.disabled){this.content.show();this._open();}},_open:function(){this.element.trigger('beforeOpen');this.options.active=true;if(this.options.ajaxContent){this._loadContent();}\nif(this.options.saveState){this.storage.set(this.stateKey,true);}\nif(this.options.openedState){this.element.addClass(this.options.openedState);}\nif(this.options.collateral.element&&this.options.collateral.openedState){$(this.options.collateral.element).addClass(this.options.collateral.openedState);}\nif(this.options.closedState){this.element.removeClass(this.options.closedState);}\nif(this.icons){this.header.children('[data-role=icons]').removeClass(this.options.icons.header).addClass(this.options.icons.activeHeader);}\nthis.header.attr({'aria-selected':'true','aria-expanded':'true'});this.content.attr({'aria-hidden':'false'});this.element.trigger('dimensionsChanged',{opened:true});},_loadContent:function(){var url=this.element.find(this.options.ajaxUrlElement).attr('href'),that=this;if(url){that.xhr=$.get({url:url,dataType:'html'},function(){});}\nif(that.xhr&&that.xhr.statusText!=='canceled'){if(that.options.loadingClass){that.element.addClass(that.options.loadingClass);}\nthat.content.attr('aria-busy','true');that.xhr.done(function(response){setTimeout(function(){that.content.html(response);},1);});that.xhr.always(function(jqXHR,status){setTimeout(function(){if(status==='abort'){that.content.stop(false,true);}\nif(that.options.loadingClass){that.element.removeClass(that.options.loadingClass);}\nthat.content.removeAttr('aria-busy');if(jqXHR===that.xhr){delete that.xhr;}},1);});}},_scrollToTopIfNotVisible:function(){if(this._isElementOutOfViewport()){this.header[0].scrollIntoView();}},_isElementOutOfViewport:function(){var headerRect=this.header[0].getBoundingClientRect(),contentRect=this.content.get().length?this.content[0].getBoundingClientRect():false,headerOut,contentOut;headerOut=headerRect.bottom-headerRect.height<0||headerRect.right-headerRect.width<0||headerRect.left+headerRect.width>window.innerWidth||headerRect.top+headerRect.height>window.innerHeight;
2contentOut=contentRect?contentRect.bottom-contentRect.height<0||contentRect.right-contentRect.width<0||contentRect.left+contentRect.width>window.innerWidth||contentRect.top+contentRect.height>window.innerHeight:false;return headerOut?headerOut:contentOut;}});return $.mage.collapsible;});","mage/common.min.js":"define(['jquery','domReady!'],function($){'use strict';$('form[data-auto-submit=\"true\"]').trigger('submit');$(document).on('submit','form',function(e){var formKeyElement,existingFormKeyElement,isKeyPresentInForm,isActionExternal,baseUrl=window.BASE_URL,form=$(e.target),formKey=$('input[name=\"form_key\"]').val(),formMethod=form.prop('method'),formAction=form.prop('action');isActionExternal=formAction.indexOf(baseUrl)!==0;existingFormKeyElement=form.find('input[name=\"form_key\"]');isKeyPresentInForm=existingFormKeyElement.length;if(isKeyPresentInForm&&existingFormKeyElement.attr('auto-added-form-key')==='1'){isKeyPresentInForm=form.find('> input[name=\"form_key\"]').length;}\nif(formKey&&!isKeyPresentInForm&&!isActionExternal&&formMethod!=='get'){formKeyElement=document.createElement('input');formKeyElement.setAttribute('type','hidden');formKeyElement.setAttribute('name','form_key');formKeyElement.setAttribute('value',formKey);formKeyElement.setAttribute('auto-added-form-key','1');form.get(0).appendChild(formKeyElement);}});});","mage/cookies.min.js":"define(['jquery','mage/mage','js-cookie/cookie-wrapper'],function($){'use strict';var CookieHelper=function(){this.defaults={expires:null,path:'/',domain:null,secure:false,lifetime:null,samesite:'lax'};function lifetimeToExpires(options,defaults){var expires,lifetime;lifetime=options.lifetime||defaults.lifetime;if(lifetime&&lifetime>0){expires=options.expires||new Date();return new Date(expires.getTime()+lifetime*1000);}\nreturn null;}\nthis.set=function(name,value,options){var expires,path,domain,secure,samesite;options=$.extend({},this.defaults,options||{});expires=lifetimeToExpires(options,this.defaults)||options.expires;path=options.path;domain=options.domain;secure=options.secure;samesite=options.samesite;document.cookie=name+'='+encodeURIComponent(value)+\n(expires?'; expires='+expires.toUTCString():'')+\n(path?'; path='+path:'')+\n(domain?'; domain='+domain:'')+\n(secure?'; secure':'')+'; samesite='+(samesite?samesite:'lax');};this.get=function(name){var arg=name+'=',aLength=arg.length,cookie=document.cookie,cLength=cookie.length,i=0,j=0;while(i<cLength){j=i+aLength;if(cookie.substring(i,j)===arg){return this.getCookieVal(j);}\ni=cookie.indexOf(' ',i)+1;if(i===0){break;}}\nreturn null;};this.clear=function(name){if(this.get(name)){this.set(name,'',{expires:new Date('Jan 01 1970 00:00:01 GMT')});}};this.getCookieVal=function(offset){var cookie=document.cookie,endstr=cookie.indexOf(';',offset);if(endstr===-1){endstr=cookie.length;}\nreturn decodeURIComponent(cookie.substring(offset,endstr));};return this;};$.extend(true,$,{mage:{cookies:new CookieHelper()}});return function(pageOptions){$.extend($.mage.cookies.defaults,pageOptions);$.extend($.cookie.defaults,$.mage.cookies.defaults);};});","mage/dataPost.min.js":"define(['jquery','mage/template','Magento_Ui/js/modal/confirm','jquery-ui-modules/widget'],function($,mageTemplate,uiConfirm){'use strict';$.widget('mage.dataPost',{options:{formTemplate:'<form action=\"<%- data.action %>\" method=\"post\">'+'<% _.each(data.data, function(value, index) { %>'+'<input name=\"<%- index %>\" value=\"<%- value %>\">'+'<% }) %></form>',postTrigger:['a[data-post]','button[data-post]','span[data-post]'],formKeyInputSelector:'input[name=\"form_key\"]'},_create:function(){this._bind();},_bind:function(){var events={};$.each(this.options.postTrigger,function(index,value){events['click '+value]='_postDataAction';});this._on(events);},_postDataAction:function(e){var params=$(e.currentTarget).data('post');e.preventDefault();this.postData(params);},postData:function(params){var formKey=$(this.options.formKeyInputSelector).val(),$form,input;if(formKey){params.data['form_key']=formKey;}\n$form=$(mageTemplate(this.options.formTemplate,{data:params}));if(params.files){$form[0].enctype='multipart/form-data';
2$.each(params.files,function(key,files){if(files instanceof FileList){input=document.createElement('input');input.type='file';input.name=key;input.files=files;$form[0].appendChild(input);}});}\nif(params.data.confirmation){uiConfirm({content:params.data.confirmationMessage,actions:{confirm:function(){$form.appendTo('body').hide().trigger('submit');}}});}else{$form.appendTo('body').hide().trigger('submit');}}});$(document).dataPost();return $.mage.dataPost;});","mage/decorate.min.js":"define(['jquery','mage/translate'],function($){var methods={list:function(isRecursive){return this.each(function(){var list=$(this),items;if(list.length>0){items=typeof isRecursive==='undefined'||isRecursive?list.find('li'):list.children();items.decorate('generic',['odd','even','last']);}});},generic:function(decoratorParams){var elements=$(this),allSupportedParams;if(elements){allSupportedParams={even:'odd',odd:'even',last:'last',first:'first'};decoratorParams=decoratorParams||allSupportedParams;$.each(decoratorParams,function(index,param){if(param==='even'||param==='odd'){elements.filter(':'+param).removeClass('odd even').addClass(allSupportedParams[param]);}else{elements.filter(':'+param).addClass(allSupportedParams[param]);}});}\nreturn this;},table:function(instanceOptions){return this.each(function(){var table=$(this),options;if(table.length>0){options={'tbody':false,'tbody tr':['odd','even','first','last'],'thead tr':['first','last'],'tfoot tr':['first','last'],'tr td':['last']};$.extend(options,instanceOptions||{});$.each(options,function(key,value){if(options[key]){if(key==='tr td'){$.each(table.find('tr'),function(){$(this).find('td').decorate('generic',options['tr td']);});}else{table.find(key).decorate('generic',value);}}});}});},dataList:function(){return this.each(function(){var list=$(this);if(list){list.find('dt').decorate('generic',['odd','even','last']);list.find('dd').decorate('generic',['odd','even','last']);}});}};$.fn.decorate=function(method){var message;if(methods[method]){return methods[method].apply(this,Array.prototype.slice.call(arguments,1));}else if(typeof method==='object'||!method){return methods.init.apply(this,arguments);}\nmessage=$.mage.__('Method %s does not exist on jQuery.decorate');$.error(message.replace('%s',method));};});","mage/deletable-item.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.deletableItem',{options:{deleteEvent:'click',deleteSelector:'[data-role=\"delete\"]',hiddenClass:'no-display'},_bind:function(){var handlers={};handlers[this.options.deleteEvent+' '+this.options.deleteSelector]='_onDeleteClicked';handlers.hideDelete='_onHideDelete';handlers.showDelete='_onShowDelete';this._on(handlers);},_create:function(){this._bind();},_init:function(){this._onHideDelete();},_onDeleteClicked:function(e){e.stopPropagation();this.element.trigger('deleteItem');},_onHideDelete:function(){this.element.find(this.options.deleteSelector).addClass(this.options.hiddenClass);},_onShowDelete:function(){this.element.find(this.options.deleteSelector).removeClass(this.options.hiddenClass);}});return $.mage.deletableItem;});","mage/dropdown.min.js":"define(['jquery','jquery-ui-modules/dialog','mage/translate'],function($){'use strict';var timer=null;$.widget('mage.dropdownDialog',$.ui.dialog,{options:{triggerEvent:'click',triggerClass:null,parentClass:null,triggerTarget:null,defaultDialogClass:'mage-dropdown-dialog',dialogContentClass:null,shadowHinter:null,closeOnMouseLeave:true,closeOnClickOutside:true,minHeight:null,minWidth:null,width:null,modal:false,timeout:null,autoOpen:false,createTitleBar:false,autoPosition:false,autoSize:false,draggable:false,resizable:false,bodyClass:'',buttons:[{'class':'action close','text':$.mage.__('Close'),'click':function(){$(this).dropdownDialog('close');}}]},_create:function(){var _self=this;this._super();this.uiDialog.addClass(this.options.defaultDialogClass);if(_self.options.triggerTarget){$(_self.options.triggerTarget).on(_self.options.triggerEvent,function(event){event.preventDefault();event.stopPropagation();if(!_self._isOpen){$('.'+_self.options.defaultDialogClass+' > .ui-dialog-content').dropdownDialog('close');_self.open();}else{_self.close(event);}});}\nif(_self.options.shadowHinter){_self.hinter=$('<div class=\"'+_self.options.shadowHinter+'\"></div>');
2_self.element.append(_self.hinter);}},open:function(){var _self=this;this._super();if(_self.options.dialogContentClass){_self.element.addClass(_self.options.dialogContentClass);}\nif(_self.options.closeOnMouseLeave){this._mouseEnter(_self.uiDialog);this._mouseLeave(_self.uiDialog);if(_self.options.triggerTarget){this._mouseLeave($(_self.options.triggerTarget));}}\nif(_self.options.closeOnClickOutside){$('body').on('click.outsideDropdown',function(event){if(_self._isOpen&&!$(event.target).closest('.ui-dialog').length){if(timer){clearTimeout(timer);}\n_self.close(event);}});}\nif(_self.options.triggerClass){$(_self.options.triggerTarget).addClass(_self.options.triggerClass);}\nif(_self.options.parentClass){$(_self.options.appendTo).addClass(_self.options.parentClass);}\nif(_self.options.bodyClass){$('body').addClass(_self.options.bodyClass);}\nif(_self.options.shadowHinter){_self._setShadowHinterPosition();}},close:function(){this._super();if(this.options.dialogContentClass){this.element.removeClass(this.options.dialogContentClass);}\nif(this.options.triggerClass){$(this.options.triggerTarget).removeClass(this.options.triggerClass);}\nif(this.options.parentClass){$(this.options.appendTo).removeClass(this.options.parentClass);}\nif(this.options.bodyClass){$('body').removeClass(this.options.bodyClass);}\nif(timer){clearTimeout(timer);}\nif(this.options.triggerTarget){$(this.options.triggerTarget).off('mouseleave');}\nthis.uiDialog.off('mouseenter');this.uiDialog.off('mouseleave');$('body').off('click.outsideDropdown');},_setShadowHinterPosition:function(){var _self=this,offset;offset=_self.options.position.of.offset().left-\n_self.element.offset().left+\n_self.options.position.of.outerWidth()/ 2;offset=isNaN(offset)?0:Math.floor(offset);_self.hinter.css('left',offset);},_position:function(){if(this.options.autoPosition){this._super();}},_createTitlebar:function(){if(this.options.createTitleBar){this._super();}else{this.uiDialogTitlebarClose=$('<div></div>');}},_size:function(){if(this.options.autoSize){this._super();}},_mouseLeave:function(handler){var _self=this;handler.on('mouseleave',function(event){event.stopPropagation();if(_self._isOpen){if(timer){clearTimeout(timer);}\ntimer=setTimeout(function(e){_self.close(e);},_self.options.timeout);}});},_mouseEnter:function(handler){handler.on('mouseenter',function(event){event.stopPropagation();if(timer){clearTimeout(timer);}});},_setOption:function(key,value){this._super(key,value);if(key==='triggerTarget'){this.options.triggerTarget=value;}}});return $.mage.dropdownDialog;});","mage/dropdowns.min.js":"define(['jquery'],function($){'use strict';$.fn.dropdown=function(options){var defaults={parent:null,autoclose:true,btnArrow:'.arrow',menu:'[data-target=\"dropdown\"]',activeClass:'active'},actionElem=$(this),self=this;options=$.extend(defaults,options);actionElem=$(this);self=this;this.openDropdown=function(elem){elem.addClass(options.activeClass).attr('aria-expanded',true).parent().addClass(options.activeClass);elem.parent().find(options.menu).attr('aria-hidden',false);$(options.btnArrow,elem).text('-');};this.closeDropdown=function(elem){elem.removeClass(options.activeClass).attr('aria-expanded',false).parent().removeClass(options.activeClass);elem.parent().find(options.menu).attr('aria-hidden',true);$(options.btnArrow,elem).text('+');};this.reset=function(param){var params=param||{},dropdowns=params.elems||actionElem;dropdowns.each(function(index,elem){self.closeDropdown($(elem));});};if(options.autoclose===true){$(document).on('click.hideDropdown',this.reset);$(document).on('keyup.hideDropdown',function(e){var ESC_CODE='27';if(e.keyCode==ESC_CODE){self.reset();}});}\nif(options.events){$.each(options.events,function(index,event){$(document).on(event.name,event.selector,event.action);});}\nreturn this.each(function(){var elem=$(this),parent=$(options.parent).length>0?$(options.parent):elem.parent(),menu=$(options.menu,parent)||$('.dropdown-menu',parent);if(menu.length){elem.attr('aria-haspopup',true);}\nif(!elem.hasClass(options.activeClass)){elem.attr('aria-expanded',false);menu.attr('aria-hidden',true);}else{elem.attr('aria-expanded',true);menu.attr('aria-hidden',false);}\nif(!elem.is('a, button')){elem.attr('role','button');elem.attr('tabindex',0);}\nif(elem.attr('data-trigger-keypress-button')){elem.on('keypress',function(e){var keyCode=e.keyCode||e.which,ENTER_CODE=13;if(keyCode===ENTER_CODE){e.preventDefault();elem.trigger('click.toggleDropdown');}});}\nelem.on('click.toggleDropdown',function(){var el=actionElem;if(options.autoclose===true){actionElem=$();$(document).trigger('click.hideDropdown');actionElem=el;}\nself[el.hasClass(options.activeClass)?'closeDropdown':'openDropdown'](elem);return false;});});};return function(data,el){$(el).dropdown(data);};});","mage/edit-trigger.min.js":"define(['jquery','mage/template','jquery-ui-modules/widget'],function($,mageTemplate){'use strict';var editTriggerPrototype;$.widget('mage.editTrigger',{options:{img:'',alt:'[TR]',template:'#translate-inline-icon',zIndex:2000,editSelector:'[data-translate]',delay:2000,offsetTop:-3,singleElement:true},_create:function(){this.tmpl=mageTemplate(this.options.template);this._initTrigger();this._bind();},_getCss:function(){return{position:'absolute',cursor:'pointer',display:'none','z-index':this.options.zIndex};},_createTrigger:function(appendTo){var tmpl=this.tmpl({data:this.options});return $(tmpl).css(this._getCss()).data('role','edit-trigger-element').appendTo(appendTo);},_initTrigger:function(){this.trigger=this._createTrigger($('body'));},_bind:function(){this.trigger.on('click.'+this.widgetName,$.proxy(this._onClick,this));this.element.on('mousemove.'+this.widgetName,$.proxy(this._onMouseMove,this));},show:function(){if(this.trigger.is(':hidden')){this.trigger.show();}},hide:function(){this.currentTarget=null;if(this.trigger&&this.trigger.is(':visible')){this.trigger.hide();}},_setPosition:function(el){var offset=el.offset();this.trigger.css({top:offset.top+el.outerHeight()+this.options.offsetTop,left:offset.left});},_onMouseMove:function(e){var target=$(e.target),inner=target.find(this.options.editSelector);if($(e.target).is('button')&&inner.length){target=inner;}else if(!target.is(this.trigger)&&!target.is(this.options.editSelector)){target=target.parents(this.options.editSelector).first();}\nif(target.length){if(!target.is(this.trigger)){this._setPosition(target);this.currentTarget=target;}\nthis.show();}else{this.hide();}},_onClick:function(e){e.preventDefault();e.stopImmediatePropagation();$(this.currentTarget).trigger('edit.'+this.widgetName);this.hide(true);},destroy:function(){this.trigger.remove();this.element.off('.'+this.widgetName);return $.Widget.prototype.destroy.call(this);}});editTriggerPrototype=$.mage.editTrigger.prototype;$.widget('mage.editTrigger',$.extend({},editTriggerPrototype,{show:function(){editTriggerPrototype.show.apply(this,arguments);if(this.options.delay){this._clearTimer();}},hide:function(immediate){if(!immediate&&this.options.delay){if(!this.timer){this.timer=setTimeout($.proxy(function(){editTriggerPrototype.hide.apply(this,arguments);this._clearTimer();},this),this.options.delay);}}else{editTriggerPrototype.hide.apply(this,arguments);}},_clearTimer:function(){if(this.timer){clearTimeout(this.timer);this.timer=null;}}}));return $.mage.editTrigger;});
2","mage/fieldset-controls.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.fieldsetControls',{original:undefined,options:{inputSelector:'[data-reset=\"true\"]'},_create:function(){this.original=this.element.find(this.options.inputSelector).clone(true);this._bind();},_bind:function(){this._on({'fieldsetReset':'_onReset'});},_onReset:function(e){var items;e.stopPropagation();items=this.element.find(this.options.inputSelector);items.each($.proxy(function(index,item){if($(item).attr('type')=='file'){$(item).replaceWith($(this.original[index]).clone(true));}else if($(item).attr('type')=='checkbox'||$(item).attr('type')=='radio'){if($(this.original[index]).attr('checked')===undefined){$(item).removeAttr('checked');}else{$(item).attr('checked',$(this.original[index]).attr('checked'));}}else{$(item).val($(this.original[index]).val());}},this));}});$.widget('mage.fieldsetResetControl',{_create:function(){this._bind();},_bind:function(){this._on({click:'_onClick'});},_onClick:function(e){e.stopPropagation();$(this.element).trigger('fieldsetReset');}});return{fieldsetControls:$.mage.fieldsetControls,fieldsetResetControl:$.mage.fieldsetResetControl};});","mage/item-table.min.js":"define(['jquery','mage/template','jquery-ui-modules/widget'],function($,mageTemplate){'use strict';$.widget('mage.itemTable',{options:{addBlock:'[data-template=\"add-block\"]',addBlockData:{},addEvent:'click',addSelector:'[data-role=\"add\"]',itemsSelector:'[data-container=\"items\"]',keepLastRow:true},_add:function(){var hideShowDelete,deletableItems,addedBlock;this.rowIndex++;this.options.addBlockData.rowIndex=this.rowIndex;addedBlock=$(this.addBlockTmpl({data:this.options.addBlockData}));this.element.find(this.options.itemsSelector).append(addedBlock);addedBlock.trigger('contentUpdated');deletableItems=this._getDeletableItems();hideShowDelete='showDelete';if(this.options.keepLastRow&&deletableItems.length===1){hideShowDelete='hideDelete';}\n$.each(deletableItems,function(index){$(deletableItems[index]).trigger(hideShowDelete);});},_bind:function(){var handlers={};handlers[this.options.addEvent+' '+this.options.addSelector]='_add';handlers.deleteItem='_onDeleteItem';this._on(handlers);},_create:function(){this._bind();this.addBlockTmpl=mageTemplate(this.options.addBlock);this.rowIndex=-1;if(this.options.addBlockData==null||typeof this.options.addBlockData!=='object'){this.options.addBlockData={};}\nthis._add();},_getDeletableItems:function(){return this.element.find(this.options.itemsSelector+'> .deletableItem');},_onDeleteItem:function(e){var deletableItems;e.stopPropagation();$(e.target).remove();if(this.options.keepLastRow){deletableItems=this._getDeletableItems();if(deletableItems.length===1){$(deletableItems[0]).trigger('hideDelete');}}}});return $.mage.itemTable;});","mage/loader.min.js":"define(['jquery','mage/template','jquery-ui-modules/widget','mage/translate'],function($,mageTemplate){'use strict';$.widget('mage.loader',{loaderStarted:0,options:{icon:'',texts:{loaderText:$.mage.__('Please wait...'),imgAlt:$.mage.__('Loading...')},template:'<div class=\"loading-mask\" data-role=\"loader\">'+'<div class=\"loader\">'+'<img alt=\"<%- data.texts.imgAlt %>\" src=\"<%- data.icon %>\">'+'<p><%- data.texts.loaderText %></p>'+'</div>'+'</div>'},_create:function(){this._bind();},_bind:function(){this._on({'processStop':'hide','processStart':'show','show.loader':'show','hide.loader':'hide','contentUpdated.loader':'_contentUpdated'});},_contentUpdated:function(e){this.show(e);},show:function(e,ctx){this._render();this.loaderStarted++;this.spinner.show();if(ctx){this.spinner.css({width:ctx.outerWidth(),height:ctx.outerHeight(),position:'absolute'}).position({my:'top left',at:'top left',of:ctx});}\nreturn false;},hide:function(){if(this.loaderStarted>0){this.loaderStarted--;if(this.loaderStarted===0){this.spinner.hide();}}\nreturn false;},_render:function(){var html;if(!this.spinnerTemplate){this.spinnerTemplate=mageTemplate(this.options.template);html=$(this.spinnerTemplate({data:this.options}));html.prependTo(this.element);this.spinner=html;}},_destroy:function(){this.spinner.remove();}});$.widget('mage.loaderAjax',{options:{defaultContainer:'[data-container=body]',loadingClass:'ajax-loading'},_create:function(){this._bind();if(window.console&&!this.element.is(this.options.defaultContainer)&&$.mage.isDevMode(undefined)){console.warn('This widget is intended to be attached to the body, not below.');}},_bind:function(){$(document).on({'ajaxSend':this._onAjaxSend.bind(this),'ajaxComplete':this._onAjaxComplete.bind(this)});},_getJqueryObj:function(loaderContext){var ctx;if(loaderContext){if(loaderContext.jquery){ctx=loaderContext;}else{ctx=$(loaderContext);}}else{ctx=$('[data-container=\"body\"]');}\nreturn ctx;},_onAjaxSend:function(e,jqxhr,settings){var ctx;$(this.options.defaultContainer).addClass(this.options.loadingClass).attr({'aria-busy':true});if(settings&&settings.showLoader){ctx=this._getJqueryObj(settings.loaderContext);ctx.trigger('processStart');if(window.console&&!ctx.parents('[data-role=\"loader\"]').length){console.warn('Expected to start loader but did not find one in the dom');}}},_onAjaxComplete:function(e,jqxhr,settings){$(this.options.defaultContainer).removeClass(this.options.loadingClass).attr('aria-busy',false);
2if(settings&&settings.showLoader){this._getJqueryObj(settings.loaderContext).trigger('processStop');}}});return{loader:$.mage.loader,loaderAjax:$.mage.loaderAjax};});","mage/mage.min.js":"define(['jquery','mage/apply/main'],function($,mage){'use strict';$.mage=$.mage||{};$.fn.mage=function(name,config){config=config||{};this.each(function(index,el){mage.applyFor(el,config,name);});return this;};$.extend($.mage,{init:function(){mage.apply();return this;},redirect:function(url,type,timeout,forced){var _redirect;forced=!!forced;timeout=timeout||0;type=type||'assign';_redirect=function(){window.location[type](type==='reload'?forced:url);};timeout?setTimeout(_redirect,timeout):_redirect();},isValidSelector:function(selector){try{document.querySelector(selector);return true;}catch(e){return false;}}});$(document).on('contentUpdated','body',function(){if(mage){mage.apply();}});return $.mage;});","mage/menu.min.js":"define(['jquery','matchMedia','jquery-ui-modules/menu','mage/translate'],function($,mediaCheck){'use strict';$.widget('mage.menu',$.ui.menu,{options:{categoryLayoutClass:'catalog-product-view',responsive:false,expanded:false,showDelay:42,hideDelay:300,delay:0,mediaBreakpoint:'(max-width: 767px)'},_create:function(){var self=this;this.delay=this.options.delay;this._super();$(window).on('resize',function(){self.element.find('.submenu-reverse').removeClass('submenu-reverse');});},_init:function(){this._super();if(this.options.expanded===true){this.isExpanded();}\nif(this.options.responsive===true){mediaCheck({media:this.options.mediaBreakpoint,entry:$.proxy(function(){this._toggleMobileMode();},this),exit:$.proxy(function(){this._toggleDesktopMode();},this)});}\nthis._assignControls()._listen();this._setActiveMenu();},_assignControls:function(){this.controls={toggleBtn:$('[data-action=\"toggle-nav\"]')};return this;},_listen:function(){var controls=this.controls,toggle=this.toggle;controls.toggleBtn.off('click');controls.toggleBtn.on('click',toggle.bind(this));},toggle:function(){var html=$('html');if(html.hasClass('nav-open')){html.removeClass('nav-open');setTimeout(function(){html.removeClass('nav-before-open');},this.options.hideDelay);}else{html.addClass('nav-before-open');setTimeout(function(){html.addClass('nav-open');},this.options.showDelay);}},_setActiveMenu:function(){var currentUrl=window.location.href.split('?')[0];if(!this._setActiveMenuForCategory(currentUrl)){this._setActiveMenuForProduct(currentUrl);}},_setActiveMenuForCategory:function(url){var activeCategoryLink=this.element.find('a[href=\"'+url+'\"]'),classes,classNav;if(!activeCategoryLink||!activeCategoryLink.hasClass('ui-menu-item-wrapper')){return false;}else if(!activeCategoryLink.parent().hasClass('active')){activeCategoryLink.parent().addClass('active');classes=activeCategoryLink.parent().attr('class');classNav=classes.match(/(nav-)[0-9]+(-[0-9]+)+/gi);if(classNav){this._setActiveParent(classNav[0]);}}\nreturn true;},_setActiveParent:function(childClassName){var parentElement,parentClass=childClassName.substr(0,childClassName.lastIndexOf('-'));if(parentClass.lastIndexOf('-')!==-1){parentElement=this.element.find('.'+parentClass);if(parentElement){parentElement.addClass('has-active');}\nthis._setActiveParent(parentClass);}},_getUrlExtension:function(url){var lastSegment=url.slice(url.lastIndexOf('/')+1);return lastSegment.includes('.')?lastSegment.slice(lastSegment.lastIndexOf('.')):'';},_isProductPage:function(){return document.body.classList.contains(this.options.categoryLayoutClass);},_setActiveMenuForProduct:function(currentUrl){var firstCategoryUrl=this.element.find('> li a').attr('href'),categoryUrlExtension,categoryUrl,isProductPage,currentHostname;if(!firstCategoryUrl){this._clearActiveState();return;}\ncategoryUrlExtension=this._getUrlExtension(firstCategoryUrl);isProductPage=this._isProductPage();if(isProductPage){currentHostname=window.location.hostname;if(document.referrer.includes(currentHostname)&&document.referrer.endsWith(categoryUrlExtension)){categoryUrl=document.referrer.split('?')[0];}else{categoryUrl=currentUrl.substring(0,currentUrl.lastIndexOf('/'))+categoryUrlExtension;}\nthis._setActiveMenuForCategory(categoryUrl);}else{this._clearActiveState();}},_clearActiveState:function(){this.element.find('li').removeClass('active has-active');},isExpanded:function(){var subMenus=this.element.find(this.options.menus),expandedMenus=subMenus.find(this.options.menus);expandedMenus.addClass('expanded');},_activate:function(event){window.location.href=this.active.find('> a').attr('href');this.collapseAll(event);},_keydown:function(event){var match,prev,character,skip,regex,preventDefault=true;function escape(value){return value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,'\\\\$&');}\nif(this.active.closest(this.options.menus).attr('aria-expanded')!='true'){switch(event.keyCode){case $.ui.keyCode.PAGE_UP:this.previousPage(event);break;case $.ui.keyCode.PAGE_DOWN:this.nextPage(event);break;case $.ui.keyCode.HOME:this._move('first','first',event);break;case $.ui.keyCode.END:this._move('last','last',event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.DOWN:if(this.active&&!this.active.is('.ui-state-disabled')){this.expand(event);}\nbreak;case $.ui.keyCode.LEFT:this.previous(event);break;case $.ui.keyCode.RIGHT:this.next(event);break;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||'';character=String.fromCharCode(event.keyCode);skip=false;clearTimeout(this.filterTimer);if(character===prev){skip=true;}else{character=prev+character;}\nregex=new RegExp('^'+escape(character),'i');match=this.activeMenu.children('.ui-menu-item').filter(function(){return regex.test($(this).children('a').text());});match=skip&&match.index(this.active.next())!==-1?this.active.nextAll('.ui-menu-item'):match;if(!match.length){character=String.fromCharCode(event.keyCode);regex=new RegExp('^'+escape(character),'i');match=this.activeMenu.children('.ui-menu-item').filter(function(){return regex.test($(this).children('a').text());});}\nif(match.length){this.focus(event,match);if(match.length>1){this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter;},1000);}else{delete this.previousFilter;}}else{delete this.previousFilter;}}}else{switch(event.keyCode){case $.ui.keyCode.DOWN:this.next(event);break;case $.ui.keyCode.UP:this.previous(event);break;case $.ui.keyCode.RIGHT:if(this.active&&!this.active.is('.ui-state-disabled')){this.expand(event);}\nbreak;case $.ui.keyCode.ENTER:case $.ui.keyCode.SPACE:this._activate(event);break;case $.ui.keyCode.LEFT:case $.ui.keyCode.ESCAPE:this.collapse(event);break;default:preventDefault=false;prev=this.previousFilter||'';character=String.fromCharCode(event.keyCode);skip=false;clearTimeout(this.filterTimer);if(character===prev){skip=true;}else{character=prev+character;}\nregex=new RegExp('^'+escape(character),'i');match=this.activeMenu.children('.ui-menu-item').filter(function(){return regex.test($(this).children('a').text());});match=skip&&match.index(this.active.next())!==-1?this.active.nextAll('.ui-menu-item'):match;if(!match.length){character=String.fromCharCode(event.keyCode);regex=new RegExp('^'+escape(character),'i');match=this.activeMenu.children('.ui-menu-item').filter(function(){return regex.test($(this).children('a').text());});}\nif(match.length){this.focus(event,match);if(match.length>1){this.previousFilter=character;this.filterTimer=this._delay(function(){delete this.previousFilter;},1000);}else{delete this.previousFilter;}}else{delete this.previousFilter;}}}\nif(preventDefault){event.preventDefault();}},_toggleMobileMode:function(){var subMenus;$(this.element).off('mouseenter mouseleave');this._on({'click .ui-menu-item:has(a)':function(event){var target;event.preventDefault();target=$(event.target).closest('.ui-menu-item');target.get(0).scrollIntoView();if(target.has('.ui-menu').length){this.expand(event);}else if(!this.element.is(':focus')&&$(this.document[0].activeElement).closest('.ui-menu').length){this.element.trigger('focus',[true]);if(this.active&&this.active.parents('.ui-menu').length===1){clearTimeout(this.timer);}}\nif(!target.hasClass('level-top')||!target.has('.ui-menu').length){window.location.href=target.find('> a').attr('href');}},'click .ui-menu-item:has(.ui-state-active)':function(event){this.collapseAll(event,true);}});subMenus=this.element.find('.level-top');$.each(subMenus,$.proxy(function(index,item){var category=$(item).find('> a span').not('.ui-menu-icon').text(),categoryUrl=$(item).find('> a').attr('href'),menu=$(item).find('> .ui-menu');this.categoryLink=$('<a>').attr('href',categoryUrl).text($.mage.__('All %1').replace('%1',category));this.categoryParent=$('<li>').addClass('ui-menu-item all-category').html(this.categoryLink);if(menu.find('.all-category').length===0){menu.prepend(this.categoryParent);}},this));},_toggleDesktopMode:function(){var categoryParent,html;$(this.element).off('click mousedown mouseenter mouseleave');this._on({'mousedown .ui-menu-item > a':function(event){event.preventDefault();},'click .ui-state-disabled > a':function(event){event.preventDefault();},'click .ui-menu-item:has(a)':function(event){var target=$(event.target).closest('.ui-menu-item');
2if(!this.mouseHandled&&target.not('.ui-state-disabled').length){this.select(event);if(!event.isPropagationStopped()){this.mouseHandled=true;}\nif(target.has('.ui-menu').length){this.expand(event);}else if(!this.element.is(':focus')&&$(this.document[0].activeElement).closest('.ui-menu').length){this.element.trigger('focus',[true]);if(this.active&&this.active.parents('.ui-menu').length===1){clearTimeout(this.timer);}}}},'mouseenter .ui-menu-item':function(event){var target=$(event.currentTarget),submenu=this.options.menus,ulElement,ulElementWidth,width,targetPageX,rightBound;if(target.has(submenu)){ulElement=target.find(submenu);ulElementWidth=ulElement.outerWidth(true);width=target.outerWidth()*2;targetPageX=target.offset().left;rightBound=$(window).width();if(ulElementWidth+width+targetPageX>rightBound){ulElement.addClass('submenu-reverse');}\nif(targetPageX-ulElementWidth<0){ulElement.removeClass('submenu-reverse');}}\ntarget.siblings().children('.ui-state-active').removeClass('ui-state-active');this.focus(event,target);},'mouseleave':function(event){this.collapseAll(event,true);},'mouseleave .ui-menu':'collapseAll'});categoryParent=this.element.find('.all-category');html=$('html');categoryParent.remove();if(html.hasClass('nav-open')){html.removeClass('nav-open');setTimeout(function(){html.removeClass('nav-before-open');},this.options.hideDelay);}},_delay:function(handler,delay){var instance=this,handlerProxy=function(){return(typeof handler==='string'?instance[handler]:handler).apply(instance,arguments);};return setTimeout(handlerProxy,delay||0);},expand:function(event){var newItem=this.active&&this.active.children('.ui-menu').children('.ui-menu-item').first();if(newItem&&newItem.length){if(newItem.closest('.ui-menu').is(':visible')&&newItem.closest('.ui-menu').has('.all-categories')){return;}\nthis.active.siblings().children('.ui-state-active').removeClass('ui-state-active');this._open(newItem.parent());this._delay(function(){this.focus(event,newItem);});}},select:function(event){var ui;this.active=this.active||$(event.target).closest('.ui-menu-item');if(this.active.is('.all-category')){this.active=$(event.target).closest('.ui-menu-item');}\nui={item:this.active};if(!this.active.has('.ui-menu').length){this.collapseAll(event,true);}\nthis._trigger('select',event,ui);}});$.widget('mage.navigation',$.mage.menu,{options:{responsiveAction:'wrap',maxItems:null,container:'#menu',moreText:$.mage.__('more'),breakpoint:768},_init:function(){var that,responsive;this._super();that=this;responsive=this.options.responsiveAction;this.element.addClass('ui-menu-responsive').attr('responsive','main');this.setupMoreMenu();this.setMaxItems();if(responsive=='onResize'){$(window).on('resize',function(){if($(window).width()>that.options.breakpoint){that._responsive();$('[responsive=more]').show();}else{that.element.children().show();$('[responsive=more]').hide();}});}else if(responsive=='onReload'){this._responsive();}},setupMoreMenu:function(){var moreListItems=this.element.children().clone(),moreLink=$('<a>'+this.options.moreText+'</a>');moreListItems.hide();moreLink.attr('href','#');this.moreItemsList=$('<ul>').append(moreListItems);this.moreListContainer=$('<li>').append(moreLink).append(this.moreItemsList);this.responsiveMenu=$('<ul>').addClass('ui-menu-more').attr('responsive','more').append(this.moreListContainer).menu({position:{my:'right top',at:'right bottom'}}).insertAfter(this.element);},_responsive:function(){var container=$(this.options.container),containerSize=container.width(),width=0,items=this.element.children('li'),more=$('.ui-menu-more > li > ul > li a');items=items.map(function(){var item={};item.item=$(this);
2item.itemSize=$(this).outerWidth();return item;});$.each(items,function(index){var itemText=items[index].item.find('a:first').text();width+=parseInt(items[index].itemSize,null);if(width<containerSize){items[index].item.show();more.each(function(){var text=$(this).text();if(text===itemText){$(this).parent().hide();}});}else if(width>containerSize){items[index].item.hide();more.each(function(){var text=$(this).text();if(text===itemText){$(this).parent().show();}});}});},setMaxItems:function(){var items=this.element.children('li'),itemsCount=items.length,maxItems=this.options.maxItems,overflow=itemsCount-maxItems,overflowItems=items.slice(overflow);overflowItems.hide();overflowItems.each(function(){var itemText=$(this).find('a:first').text();$(this).hide();$('.ui-menu-more > li > ul > li a').each(function(){var text=$(this).text();if(text===itemText){$(this).parent().show();}});});}});return{menu:$.mage.menu,navigation:$.mage.navigation};});","mage/multiselect.min.js":"define(['underscore','jquery','text!mage/multiselect.html','Magento_Ui/js/modal/alert','jquery-ui-modules/widget','jquery/editableMultiselect/js/jquery.multiselect'],function(_,$,searchTemplate,alert){'use strict';$.widget('mage.multiselect2',{options:{mselectContainer:'section.mselect-list',mselectItemsWrapperClass:'mselect-items-wrapper',mselectCheckedClass:'mselect-checked',containerClass:'paginated',searchInputClass:'admin__action-multiselect-search',selectedItemsCountClass:'admin__action-multiselect-items-selected',currentPage:1,lastAppendValue:0,updateDelay:1000,optionsLoaded:false},_create:function(){$.fn.multiselect.call(this.element,this.options);},_init:function(){this.domElement=this.element.get(0);this.$container=$(this.options.mselectContainer);this.$wrapper=this.$container.find('.'+this.options.mselectItemsWrapperClass);this.$item=this.$wrapper.find('div').first();this.selectedValues=[];this.values={};this.$container.addClass(this.options.containerClass).prepend(searchTemplate);this.$input=this.$container.find('.'+this.options.searchInputClass);this.$selectedCounter=this.$container.find('.'+this.options.selectedItemsCountClass);this.filter='';if(this.domElement.options.length){this._setLastAppendOption(this.domElement.options[this.domElement.options.length-1].value);}\nthis._initElement();this._events();},_initElement:function(){this.element.empty();_.each(this.options.selectedValues,function(value){this._createSelectedOption({value:value,label:value});},this);},_events:function(){var onKeyUp=_.debounce(this.onKeyUp,this.options.updateDelay);_.bindAll(this,'onScroll','onCheck','onOptionsChange');this.$wrapper.on('scroll',this.onScroll);this.$wrapper.on('change.mselectCheck','[type=checkbox]',this.onCheck);this.$input.on('keyup',_.bind(onKeyUp,this));this.element.on('change.hiddenSelect',this.onOptionsChange);},onScroll:function(){var height=this.$wrapper.height(),scrollHeight=this.$wrapper.prop('scrollHeight'),scrollTop=Math.ceil(this.$wrapper.prop('scrollTop'));if(!this.options.optionsLoaded&&scrollHeight-height<=scrollTop){this.loadOptions();}},onKeyUp:function(){if(this.getSearchCriteria()===this.filter){return false;}\nthis.setFilter();this.clearMultiselectOptions();this.setCurrentPage(0);this.loadOptions();},onOptionsChange:function(){this.selectedValues=_.map(this.domElement.options,function(option){this.values[option.value]=true;return option.value;},this);this._updateSelectedCounter();},onCheck:function(event){var checkbox=event.target,option={value:checkbox.value,label:$(checkbox).parent('label').text()};checkbox.checked?this._createSelectedOption(option):this._removeSelectedOption(option);event.stopPropagation();},onError:function(message){alert({content:message});},setFilter:function(){this.filter=this.getSearchCriteria()||'';},getSearchCriteria:function(){return this.$input.val().trim();},loadOptions:function(){var nextPage=this.getCurrentPage()+1;this.$wrapper.trigger('processStart');this.$input.prop('disabled',true);$.get(this.options.nextPageUrl,{p:nextPage,s:this.filter}).done(function(response){if(response.success){this.appendOptions(response.result);this.setCurrentPage(nextPage);}else{this.onError(response.errorMessage);}}.bind(this)).always(function(){this.$wrapper.trigger('processStop');this.$input.prop('disabled',false);
2if(this.filter){this.$input.focus();}}.bind(this));},appendOptions:function(options){var divOptions=[];if(!options.length){return false;}\nif(this.isOptionsLoaded(options)){return;}\noptions.forEach(function(option){if(!this.values[option.value]){this.values[option.value]=true;option.selected=this._isOptionSelected(option);divOptions.push(this._createMultiSelectOption(option));this._setLastAppendOption(option.value);}},this);this.$wrapper.append(divOptions);},clearMultiselectOptions:function(){this._setLastAppendOption(0);this.values={};this.$wrapper.empty();},isOptionsLoaded:function(options){this.options.optionsLoaded=this.options.lastAppendValue===options[options.length-1].value;return this.options.optionsLoaded;},setCurrentPage:function(page){this.options.currentPage=page;},getCurrentPage:function(){return this.options.currentPage;},_createSelectedOption:function(option){var selectOption=new Option(option.label,option.value,false,true);this.element.append(selectOption);this.selectedValues.push(option.value);this._updateSelectedCounter();return selectOption;},_removeSelectedOption:function(option){var unselectedOption=_.findWhere(this.domElement.options,{value:option.value});if(!_.isUndefined(unselectedOption)){this.domElement.remove(unselectedOption.index);this.selectedValues.splice(_.indexOf(this.selectedValues,option.value),1);this._updateSelectedCounter();}\nreturn unselectedOption;},_createMultiSelectOption:function(option){var item=this.$item.clone(),checkbox=item.find('input'),isSelected=!!option.selected;checkbox.val(option.value).prop('checked',isSelected).toggleClass(this.options.mselectCheckedClass,isSelected);item.find('label > span').text(option.label);return item;},_isOptionSelected:function(option){return!!~this.selectedValues.indexOf(option.value);},_setLastAppendOption:function(value){this.options.lastAppendValue=value;},_updateSelectedCounter:function(){this.$selectedCounter.text(this.selectedValues.length);}});return $.mage.multiselect2;});","mage/polyfill.min.js":"(function(root,doc){'use strict';var Storage;try{if(!root.localStorage||!root.sessionStorage){throw new Error();}\nlocalStorage.setItem('storage_test',1);localStorage.removeItem('storage_test');}catch(e){Storage=function(type){var data;function createCookie(name,value,days){var date,expires;if(days){date=new Date();date.setTime(date.getTime()+days*24*60*60*1000);expires='; expires='+date.toGMTString();}else{expires='';}\ndoc.cookie=name+'='+value+expires+'; path=/';}\nfunction readCookie(name){var nameEQ=name+'=',ca=doc.cookie.split(';'),i=0,c;for(i=0;i<ca.length;i++){c=ca[i];while(c.charAt(0)===' '){c=c.substring(1,c.length);}\nif(c.indexOf(nameEQ)===0){return c.substring(nameEQ.length,c.length);}}\nreturn null;}\nfunction getCookieName(){if(type!=='session'){return'localstorage';}\nif(!root.name){root.name=new Date().getTime();}\nreturn'sessionStorage'+root.name;}\nfunction setData(dataObject){data=encodeURIComponent(JSON.stringify(dataObject));createCookie(getCookieName(),data,365);}\nfunction clearData(){createCookie(getCookieName(),'',365);}\nfunction getData(){var dataResponse=readCookie(getCookieName());return dataResponse?JSON.parse(decodeURIComponent(dataResponse)):{};}\ndata=getData();return{length:0,clear:function(){data={};this.length=0;clearData();},getItem:function(key){return data[key]===undefined?null:data[key];},key:function(i){var ctr=0,k;for(k in data){if(data.hasOwnProperty(k)){if(ctr.toString()===i.toString()){return k;}\nctr++;}}\nreturn null;},removeItem:function(key){delete data[key];this.length--;setData(data);},setItem:function(key,value){data[key]=value.toString();this.length++;setData(data);}};};root.localStorage.prototype=root.localStorage=new Storage('local');root.sessionStorage.prototype=root.sessionStorage=new Storage('session');}})(window,document);","mage/popup-window.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.popupWindow',{options:{centerBrowser:0,centerScreen:0,height:500,left:0,location:0,menubar:0,resizable:0,scrollbars:0,status:0,width:500,windowName:null,windowURL:null,top:0,toolbar:0},_create:function(){this.element.on('click',$.proxy(this._openPopupWindow,this));},_openPopupWindow:function(event){var element=$(event.target),settings=this.options,windowFeatures='height='+settings.height+',width='+settings.width+',toolbar='+settings.toolbar+',scrollbars='+settings.scrollbars+',status='+settings.status+',resizable='+settings.resizable+',location='+settings.location+',menuBar='+settings.menubar,centeredX,centeredY;settings.windowName=settings.windowName||element.attr('name');settings.windowURL=settings.windowURL||element.attr('href');if(settings.centerBrowser){centeredY=window.screenY+(window.outerHeight / 2-settings.height / 2);centeredX=window.screenX+(window.outerWidth / 2-settings.width / 2);
2windowFeatures+=',left='+centeredX+',top='+centeredY;}else if(settings.centerScreen){centeredY=(screen.height-settings.height)/ 2;centeredX=(screen.width-settings.width)/ 2;windowFeatures+=',left='+centeredX+',top='+centeredY;}else{windowFeatures+=',left='+settings.left+',top='+settings.top;}\nwindow.open(settings.windowURL,settings.windowName,windowFeatures).focus();event.preventDefault();}});return $.mage.popupWindow;});","mage/redirect-url.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.redirectUrl',{options:{event:'click',url:undefined},_bind:function(){var handlers={};handlers[this.options.event]='_onEvent';this._on(handlers);},_create:function(){this._bind();},_onEvent:function(){if(this.options.url){location.href=this.options.url;}else{location.href=this.element.val();}}});return $.mage.redirectUrl;});","mage/smart-keyboard-handler.min.js":"define(['jquery'],function($){'use strict';function KeyboardHandler(){var body=$('body'),focusState=false,tabFocusClass='_keyfocus',productsGrid='[data-container=\"product-grid\"]',catalogProductsGrid=$(productsGrid),CODE_TAB=9;function onFocusInHandler(){focusState=true;body.addClass(tabFocusClass).off('focusin.keyboardHandler',onFocusInHandler);}\nfunction onClickHandler(){focusState=false;body.removeClass(tabFocusClass).off('click',onClickHandler);}\nfunction smartKeyboardFocus(){$(document).on('keydown keypress',function(event){if(event.which===CODE_TAB&&!focusState){body.on('focusin.keyboardHandler',onFocusInHandler).on('click',onClickHandler);}});if(catalogProductsGrid.length){body.on('focusin.gridProducts',productsGrid,function(){if(body.hasClass(tabFocusClass)){$(this).addClass('active');}});body.on('focusout.gridProducts',productsGrid,function(){$(this).removeClass('active');});}}\nfunction handleFocus(element){element.on('focusin.emulateTabFocus',function(){focusState=true;body.addClass(tabFocusClass);element.off();});element.on('focusout.emulateTabFocus',function(){focusState=false;body.removeClass(tabFocusClass);element.off();});}\nreturn{apply:smartKeyboardFocus,focus:handleFocus};}\nreturn new KeyboardHandler;});","mage/sticky.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.sticky',{options:{container:'',spacingTop:0,stickAfter:0,stickyClass:'_sticky'},_getOptionValue:function(option){var value=this.options[option]||0;if(typeof value==='function'){value=this.options[option]();}\nreturn value;},_create:function(){$(window).on({'scroll':$.proxy(this._stick,this),'resize':$.proxy(this.reset,this)});this.element.on('dimensionsChanged',$.proxy(this.reset,this));this.reset();this.normalizeIE11AndEdgeScroll();},_stick:function(){var offset,isStatic,stuck,stickAfter;isStatic=this.element.css('position')==='static';if(!isStatic&&this.element.is(':visible')){offset=$(document).scrollTop()-\nthis.parentOffset+\nthis._getOptionValue('spacingTop');offset=Math.max(0,Math.min(offset,this.maxOffset));stuck=this.element.hasClass(this.options.stickyClass);stickAfter=this._getOptionValue('stickAfter');if(offset&&!stuck&&offset<stickAfter){offset=0;}\nthis.element.toggleClass(this.options.stickyClass,offset>0).css('top',offset);}},_calculateDimens:function(){var $parent=this.element.parent(),topMargin=parseInt(this.element.css('margin-top'),10),parentHeight=$parent.height()-topMargin,height=this.element.innerHeight(),maxScroll=document.body.offsetHeight-window.innerHeight;if(this.options.container.length>0){maxScroll=$(this.options.container).height();}\nthis.parentOffset=$parent.offset().top+topMargin;this.maxOffset=maxScroll-this.parentOffset;if(this.maxOffset+height>=parentHeight){this.maxOffset=parentHeight-height;}\nreturn this;},reset:function(){this._calculateDimens()._stick();},normalizeIE11AndEdgeScroll:function(){if(navigator.userAgent.match(/Trident.*rv[ :]*11\\.|Edge\\//)){document.body.addEventListener('mousewheel',function(){event.preventDefault();window.scrollTo(0,window.pageYOffset-event.wheelDelta);});}}});return $.mage.sticky;});","mage/storage.min.js":"define(['jquery','mage/url'],function($,urlBuilder){'use strict';return{get:function(url,global,contentType,headers){headers=headers||{};global=global===undefined?true:global;contentType=contentType||'application/json';return $.ajax({url:urlBuilder.build(url),type:'GET',global:global,contentType:contentType,headers:headers});},post:function(url,data,global,contentType,headers,async){headers=headers||{};global=global===undefined?true:global;contentType=contentType||'application/json';async=async===undefined?true:async;return $.ajax({url:urlBuilder.build(url),type:'POST',data:data,global:global,contentType:contentType,headers:headers,async:async});},put:function(url,data,global,contentType,headers){var ajaxSettings={};headers=headers||{};global=global===undefined?true:global;contentType=contentType||'application/json';ajaxSettings.url=urlBuilder.build(url);ajaxSettings.type='PUT';ajaxSettings.data=data;ajaxSettings.global=global;ajaxSettings.contentType=contentType;ajaxSettings.headers=headers;return $.ajax(ajaxSettings);},delete:function(url,global,contentType,headers){headers=headers||{};global=global===undefined?true:global;contentType=contentType||'application/json';return $.ajax({url:urlBuilder.build(url),type:'DELETE',global:global,contentType:contentType,headers:headers});}};});","mage/tabs.min.js":"define(['jquery','jquery-ui-modules/widget','jquery/ui-modules/widgets/tabs','mage/mage','mage/collapsible'],function($){'use strict';$.widget('mage.tabs',{options:{active:0,disabled:[],openOnFocus:true,collapsible:false,collapsibleElement:'[data-role=collapsible]',header:'[data-role=title]',content:'[data-role=content]',trigger:'[data-role=trigger]',closedState:null,openedState:null,disabledState:null,ajaxUrlElement:'[data-ajax=true]',ajaxContent:false,loadingClass:null,saveState:false,animate:false,icons:{activeHeader:null,header:null}},_create:function(){if(typeof this.options.disabled==='string'){this.options.disabled=this.options.disabled.split(' ').map(function(item){return parseInt(item,10);});}\nthis._processPanels();this._handleDeepLinking();this._processTabIndex();this._closeOthers();this._bind();},_destroy:function(){$.each(this.collapsibles,function(){$(this).collapsible('destroy');});}
2,_handleDeepLinking:function(){var self=this,anchor=window.location.hash,isValid=$.mage.isValidSelector(anchor),anchorId=anchor.replace('#','');if(anchor&&isValid){$.each(self.contents,function(i){if($(this).attr('id')===anchorId||$(this).find('#'+anchorId).length){self.collapsibles.not(self.collapsibles.eq(i)).collapsible('forceDeactivate');return false;}});}},_processTabIndex:function(){var self=this;self.triggers.attr('tabIndex',0);$.each(this.collapsibles,function(i){self.triggers.attr('tabIndex',0);self.triggers.eq(i).attr('tabIndex',0);});},_processPanels:function(){var isNotNested=this._isNotNested.bind(this);this.contents=this.element.find(this.options.content).filter(isNotNested);this.collapsibles=this.element.find(this.options.collapsibleElement).filter(isNotNested);this.collapsibles.attr('role','presentation').parent().attr('role','tablist');this.headers=this.element.find(this.options.header).filter(isNotNested);if(this.headers.length===0){this.headers=this.collapsibles;}\nthis.triggers=this.element.find(this.options.trigger).filter(isNotNested);if(this.triggers.length===0){this.triggers=this.headers;}\nthis._callCollapsible();},_isNotNested:function(index,element){var parentContent=$(element).parents(this.options.content);return!parentContent.length||!this.element.find(parentContent).length;},_callCollapsible:function(){var self=this,disabled=false,active=false;$.each(this.collapsibles,function(i){disabled=active=false;if($.inArray(i,self.options.disabled)!==-1){disabled=true;}\nif(i===self.options.active){active=true;}\nself._instantiateCollapsible(this,i,active,disabled);});},_instantiateCollapsible:function(element,index,active,disabled){$(element).collapsible($.extend({},this.options,{active:active,disabled:disabled,header:this.headers.eq(index),content:this.contents.eq(index),trigger:this.triggers.eq(index)}));},_closeOthers:function(){var self=this;$.each(this.collapsibles,function(){$(this).on('beforeOpen',function(){self.collapsibles.not(this).collapsible('forceDeactivate');});});},activate:function(index){this._toggleActivate('activate',index);},deactivate:function(index){this._toggleActivate('deactivate',index);},_toggleActivate:function(action,index){this.collapsibles.eq(index).collapsible(action);},disable:function(index){this._toggleEnable('disable',index);},enable:function(index){this._toggleEnable('enable',index);},_toggleEnable:function(action,index){var self=this;if(Array.isArray(index)){$.each(index,function(){self.collapsibles.eq(this).collapsible(action);});}else if(index===undefined){this.collapsibles.collapsible(action);}else{this.collapsibles.eq(index).collapsible(action);}},_keydown:function(event){var self=this,keyCode,toFocus,toFocusIndex,enabledTriggers,length,currentIndex,nextToFocus;if(event.altKey||event.ctrlKey){return;}\nkeyCode=$.ui.keyCode;toFocus=false;enabledTriggers=[];$.each(this.triggers,function(){if(!self.collapsibles.eq(self.triggers.index($(this))).collapsible('option','disabled')){enabledTriggers.push(this);}});length=$(enabledTriggers).length;currentIndex=$(enabledTriggers).index(event.target);nextToFocus=function(direction){if(length>0){if(direction==='right'){toFocusIndex=(currentIndex+1)%length;}else{toFocusIndex=(currentIndex+length-1)%length;}\nreturn enabledTriggers[toFocusIndex];}\nreturn event.target;};switch(event.keyCode){case keyCode.RIGHT:case keyCode.DOWN:toFocus=nextToFocus('right');break;case keyCode.LEFT:case keyCode.UP:toFocus=nextToFocus('left');break;case keyCode.HOME:toFocus=enabledTriggers[0];break;case keyCode.END:toFocus=enabledTriggers[length-1];break;}\nif(toFocus){toFocusIndex=this.triggers.index(toFocus);$(event.target).attr('tabIndex',-1);$(toFocus).attr('tabIndex',0);toFocus.focus();if(this.options.openOnFocus){this.activate(toFocusIndex);}\nevent.preventDefault();}},_bind:function(){var events={keydown:'_keydown'};this._off(this.triggers);this._on(this.triggers,events);}});return $.mage.tabs;});","mage/template.min.js":"define(['underscore'],function(_){'use strict';function isSelector(selector){try{document.querySelector(selector);return true;}catch(e){return false;}}\nfunction unescape(str){return str.replace(/<%|%3C%/g,'<%').replace(/%>|%%3E/g,'%>');}\nfunction getTmplString(tmpl){if(isSelector(tmpl)){tmpl=document.querySelector(tmpl);if(tmpl){tmpl=tmpl.innerHTML.trim();}else{console.warn('No template was found by selector: '+tmpl);tmpl='';}}\nreturn unescape(tmpl);}\nreturn function(tmpl,data){var render;tmpl=getTmplString(tmpl);render=_.template(tmpl);return!_.isUndefined(data)?render(data):render;};});","mage/apply/main.min.js":"define(['underscore','jquery','./scripts'],function(_,$,processScripts){'use strict';
2var dataAttr='data-mage-init',nodeSelector='['+dataAttr+']';function init(el,config,component){require([component],function(fn){var $el;if(typeof fn==='object'){fn=fn[component].bind(fn);}\nif(_.isFunction(fn)){fn=fn.bind(null,config,el);}else{$el=$(el);if($el[component]){fn=$el[component].bind($el,config);}}\nsetTimeout(fn);},function(error){if('console'in window&&typeof window.console.error==='function'){console.error(error);}\nreturn true;});}\nfunction getData(el){var data=el.getAttribute(dataAttr);el.removeAttribute(dataAttr);return{el:el,data:JSON.parse(data)};}\nreturn{apply:function(context){var virtuals=processScripts(!context?document:context),nodes=document.querySelectorAll(nodeSelector);_.toArray(nodes).map(getData).concat(virtuals).forEach(function(itemContainer){var element=itemContainer.el;_.each(itemContainer.data,function(obj,key){if(obj.mixins){require(obj.mixins,function(){var i,len;for(i=0,len=arguments.length;i<len;i++){$.extend(true,itemContainer.data[key],arguments[i](itemContainer.data[key],element));}\ndelete obj.mixins;init.call(null,element,obj,key);});}else{init.call(null,element,obj,key);}});});},applyFor:init};});","mage/apply/scripts.min.js":"define(['underscore','jquery'],function(_,$){'use strict';var scriptSelector='script[type=\"text/x-magento-init\"]',dataAttr='data-mage-init',virtuals=[];function addVirtual(components){virtuals.push({el:false,data:components});}\nfunction setData(components,elem){var data=elem.getAttribute(dataAttr);data=data?JSON.parse(data):{};_.each(components,function(obj,key){if(_.has(obj,'mixins')){data[key]=data[key]||{};data[key].mixins=data[key].mixins||[];data[key].mixins=data[key].mixins.concat(obj.mixins);delete obj.mixins;}});data=$.extend(true,data,components);data=JSON.stringify(data);elem.setAttribute(dataAttr,data);}\nfunction processElems(components,selector){var elems,iterator;if(selector==='*'){addVirtual(components);return;}\nelems=document.querySelectorAll(selector);iterator=setData.bind(null,components);_.toArray(elems).forEach(iterator);}\nfunction getNodeData(node){var data=node.textContent;node.parentNode.removeChild(node);return JSON.parse(data);}\nreturn function(){var nodes=document.querySelectorAll(scriptSelector);_.toArray(nodes).map(getNodeData).forEach(function(item){_.each(item,processElems);});return virtuals.splice(0,virtuals.length);};});","mage/gallery/gallery.min.js":"define(['jquery','fotorama/fotorama','underscore','matchMedia','mage/template','text!mage/gallery/gallery.html','uiClass','mage/translate'],function($,fotorama,_,mediaCheck,template,galleryTpl,Class,$t){'use strict';var getMainImageIndex=function(data){var mainIndex;if(_.every(data,function(item){return _.isObject(item);})){mainIndex=_.findIndex(data,function(item){return item.isMain;});}\nreturn mainIndex>0?mainIndex:0;},getTranslate=function(el){var slideTransform=$(el).attr('style').split(';');slideTransform=$.map(slideTransform,function(style){style=style.trim();if(style.startsWith('transform: translate3d')){return style.match(/transform: translate3d\\((.+)px,(.+)px,(.+)px\\)/);}\nreturn false;});return slideTransform.filter(Boolean);},_toNumber=function(str){var type=typeof str;if(type==='string'){return parseInt(str);}\nreturn str;};return Class.extend({defaults:{settings:{},config:{},startConfig:{}},isTouchEnabled:(function(){return'ontouchstart'in document.documentElement;})(),initialize:function(config,element){var self=this;this._super();_.bindAll(this,'_focusSwitcher');if(this.isTouchEnabled){config.options.arrows=false;if(config.fullscreen){config.fullscreen.arrows=false;}}\nconfig.options.width=_toNumber(config.options.width);config.options.height=_toNumber(config.options.height);config.options.thumbwidth=_toNumber(config.options.thumbwidth);config.options.thumbheight=_toNumber(config.options.thumbheight);config.options.whiteBorders=_toNumber(config.options.whiteBorders);config.options.swipe=true;this.config=config;this.settings={$element:$(element),$pageWrapper:$('.page-wrapper'),currentConfig:config,defaultConfig:_.clone(config),fullscreenConfig:_.clone(config.fullscreen),breakpoints:config.breakpoints,activeBreakpoint:{},fotoramaApi:null,isFullscreen:false,api:null,data:_.clone(config.data)};config.options.ratio=config.options.width / config.options.height;config.options.height=null;if(!config.options.whiteBorders){config.options.height=$(element).height();}\n$.extend(true,this.startConfig,config);this.initGallery();this.initApi();this.setupBreakpoints();this.initFullscreenSettings();this.settings.$element.on('click','.fotorama__stage__frame',function(){if(!$(this).parents('.fotorama__shadows--left, .fotorama__shadows--right').length&&!$(this).hasClass('fotorama-video-container')){self.openFullScreen();}});if(this.isTouchEnabled&&this.settings.isFullscreen){this.settings.$element.on('tap','.fotorama__stage__frame',function(){var translate=getTranslate($(this).parents('.fotorama__stage__shaft'));if(translate[1]==='0'&&!$(this).hasClass('fotorama-video-container')){self.openFullScreen();self.settings.$pageWrapper.hide();}});}},openFullScreen:function(){this.settings.api.fotorama.requestFullScreen();this.settings.$fullscreenIcon.css({opacity:1,visibility:'visible',display:'block'});},initFullscreenSettings:function(){var settings=this.settings,self=this;settings.$gallery=this.settings.$element.find('[data-gallery-role=\"gallery\"]');settings.$fullscreenIcon=this.settings.$element.find('[data-gallery-role=\"fotorama__fullscreen-icon\"]');settings.focusableStart=this.settings.$element.find('[data-gallery-role=\"fotorama__focusable-start\"]');settings.focusableEnd=this.settings.$element.find('[data-gallery-role=\"fotorama__focusable-end\"]');settings.closeIcon=this.settings.$element.find('[data-gallery-role=\"fotorama__fullscreen-icon\"]');settings.fullscreenConfig.swipe=true;settings.$gallery.on('fotorama:fullscreenenter',function(){settings.closeIcon.show();settings.focusableStart.attr('tabindex','0');settings.focusableEnd.attr('tabindex','0');settings.focusableStart.on('focusin',self._focusSwitcher);settings.focusableEnd.on('focusin',self._focusSwitcher);settings.api.updateOptions(settings.defaultConfig.options,true);settings.api.updateOptions(settings.fullscreenConfig,true);if(!_.isEqual(settings.activeBreakpoint,{})&&settings.breakpoints){settings.api.updateOptions(settings.activeBreakpoint.options,true);}\nsettings.isFullscreen=true;});settings.$gallery.on('fotorama:fullscreenexit',function(){settings.closeIcon.hide();settings.focusableStart.attr('tabindex','-1');settings.focusableEnd.attr('tabindex','-1');settings.api.updateOptions(settings.defaultConfig.options,true);settings.focusableStart.off('focusin',this._focusSwitcher);settings.focusableEnd.off('focusin',this._focusSwitcher);settings.closeIcon.hide();if(!_.isEqual(settings.activeBreakpoint,{})&&settings.breakpoints){settings.api.updateOptions(settings.activeBreakpoint.options,true);}\nsettings.isFullscreen=false;settings.$element.data('gallery').updateOptions({swipe:true});});},_focusSwitcher:function(e){var target=$(e.target),settings=this.settings;if(target.is(settings.focusableStart)){this._setFocus('start');}else if(target.is(settings.focusableEnd)){this._setFocus('end');}},_setFocus:function(position){var settings=this.settings,focusableElements,infelicity;if(position==='end'){settings.$gallery.find(settings.closeIcon).trigger('focus');}else if(position==='start'){infelicity=3;focusableElements=settings.$gallery.find(':focusable');focusableElements.eq(focusableElements.length-infelicity).trigger('focus');}},initGallery:function(){var breakpoints={},settings=this.settings,config=this.config,tpl=template(galleryTpl,{next:$t('Next'),previous:$t('Previous')}),mainImageIndex,$element=settings.$element,$fotoramaElement;if(settings.breakpoints){_.each(_.values(settings.breakpoints),function(breakpoint){var conditions;_.each(_.pairs(breakpoint.conditions),function(pair){conditions=conditions?conditions+' and ('+pair[0]+': '+pair[1]+')':'('+pair[0]+': '+pair[1]+')';});breakpoints[conditions]=breakpoint.options;});settings.breakpoints=breakpoints;}\n_.extend(config,config.options,{options:undefined,click:false,breakpoints:null});settings.currentConfig=config;$element.css('min-height',settings.$element.height()).append(tpl);$fotoramaElement=$element.find('[data-gallery-role=\"gallery\"]');$fotoramaElement.fotorama(config);$fotoramaElement.find('.fotorama__stage__frame.fotorama__active').one('f:load',function(){$element.removeClass('_block-content-loading').css('min-height','');});settings.$elementF=$fotoramaElement;settings.fotoramaApi=$fotoramaElement.data('fotorama');$.extend(true,config,this.startConfig);mainImageIndex=getMainImageIndex(config.data);if(mainImageIndex){this.settings.fotoramaApi.show({index:mainImageIndex,time:0});}},setupBreakpoints:function(){var pairs,settings=this.settings,config=this.config,startConfig=this.startConfig,isInitialized={},isTouchEnabled=this.isTouchEnabled;if(_.isObject(settings.breakpoints)){pairs=_.pairs(settings.breakpoints);_.each(pairs,function(pair){var mediaQuery=pair[0];isInitialized[mediaQuery]=false;mediaCheck({media:mediaQuery,entry:function(){$.extend(true,config,_.clone(startConfig));settings.api.updateOptions(settings.defaultConfig.options,true);if(settings.isFullscreen){settings.api.updateOptions(settings.fullscreenConfig,true);}\nif(isTouchEnabled){settings.breakpoints[mediaQuery].options.arrows=false;if(settings.breakpoints[mediaQuery].options.fullscreen){settings.breakpoints[mediaQuery].options.fullscreen.arrows=false;}}\nsettings.api.updateOptions(settings.breakpoints[mediaQuery].options,true);$.extend(true,config,settings.breakpoints[mediaQuery]);settings.activeBreakpoint=settings.breakpoints[mediaQuery];isInitialized[mediaQuery]=true;},exit:function(){if(isInitialized[mediaQuery]){$.extend(true,config,_.clone(startConfig));settings.api.updateOptions(settings.defaultConfig.options,true);if(settings.isFullscreen){settings.api.updateOptions(settings.fullscreenConfig,true);}\nsettings.activeBreakpoint={};}else{isInitialized[mediaQuery]=true;}}});});}},initApi:function(){var settings=this.settings,config=this.config,api={fotorama:settings.fotoramaApi,last:function(){settings.fotoramaApi.show('>>');},first:function(){settings.fotoramaApi.show('<<');},prev:function(){settings.fotoramaApi.show('<');},next:function(){settings.fotoramaApi.show('>');}
2,seek:function(index){if(_.isNumber(index)&&index!==0){if(index>0){index-=1;}\nsettings.fotoramaApi.show(index);}},updateOptions:function(configuration,isInternal){var $selectable=$('a[href], area[href], input, select, '+'textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]').not('[tabindex=-1], [disabled], :hidden'),$focus=$(':focus'),index;if(_.isObject(configuration)){$selectable.each(function(number){if($(this).is($focus)){index=number;}});if(this.isTouchEnabled){configuration.arrows=false;}\nconfiguration.click=false;configuration.breakpoints=null;if(!isInternal){!_.isEqual(settings.activeBreakpoint,{}&&settings.breakpoints)?$.extend(true,settings.activeBreakpoint.options,configuration):settings.isFullscreen?$.extend(true,settings.fullscreenConfig,configuration):$.extend(true,settings.defaultConfig.options,configuration);}\n$.extend(true,settings.currentConfig.options,configuration);settings.fotoramaApi.setOptions(settings.currentConfig.options);if(_.isNumber(index)){$selectable.eq(index).trigger('focus');}}},updateData:function(data){var mainImageIndex;if(_.isArray(data)){settings.fotoramaApi.load(data);mainImageIndex=getMainImageIndex(data);if(settings.fotoramaApi.activeIndex!==mainImageIndex){settings.fotoramaApi.show({index:mainImageIndex,time:0});}\n$.extend(false,settings,{data:data,defaultConfig:data});$.extend(false,config,{data:data});}},returnCurrentImages:function(){var images=[];_.each(this.fotorama.data,function(item){images.push(_.omit(item,'$navThumbFrame','$navDotFrame','$stageFrame','labelledby'));});return images;},updateDataByIndex:function(index,item){settings.fotoramaApi.spliceByIndex(index,item);}};settings.$element.data('gallery',api);settings.api=settings.$element.data('gallery');settings.$element.trigger('gallery:loaded');}});});","mage/msie/file-reader.min.js":"define(['jquery'],function($){'use strict';var readAsBinaryStringIEFunc=function(fileData){var binary='',self=this,reader=new FileReader();reader.onload=function(){var bytes,length,index;bytes=new Uint8Array(reader.result);length=bytes.length;for(index=0;index<length;index++){binary+=String.fromCharCode(bytes[index]);}\nself.content=binary;$(self).trigger('onload');};reader.readAsArrayBuffer(fileData);};if(typeof FileReader.prototype.readAsBinaryString==='undefined'){FileReader.prototype.readAsBinaryString=readAsBinaryStringIEFunc;}});","mage/requirejs/baseUrlResolver.min.js":"define('baseUrlInterceptor',['module'],function(module){'use strict';var ctx=require.s.contexts._,origNameToUrl=ctx.nameToUrl,newContextConstr=require.s.newContext;function trimDots(ary){var i,part,length=ary.length;for(i=0;i<length;i++){part=ary[i];if(part==='.'){ary.splice(i,1);i-=1;}else if(part==='..'){if(i===1&&(ary[2]==='..'||ary[0]==='..')){break;}else if(i>0){ary.splice(i-1,2);i-=2;}}}}\nfunction normalize(name,baseName,applyMap,localContext){var lastIndex,baseParts=baseName&&baseName.split('/'),normalizedBaseParts=baseParts;if(name&&name.charAt(0)==='.'){if(baseName){normalizedBaseParts=baseParts.slice(0,baseParts.length-1);name=name.split('/');lastIndex=name.length-1;if(localContext.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,'');}\nname=normalizedBaseParts.concat(name);trimDots(name);name=name.join('/');}else if(name.indexOf('./')===0){name=name.substring(2);}}\nreturn name;}\nfunction getUrl(context,url){var baseUrl=context.config.baseUrl,newConfig=context.config,modulePath=url.replace(baseUrl,''),newBaseUrl,rewrite=module.config()[modulePath];if(!rewrite){return url;}\nnewBaseUrl=normalize(rewrite,baseUrl,undefined,newConfig);return newBaseUrl+modulePath;}\nctx.nameToUrl=function(){return getUrl(ctx,origNameToUrl.apply(ctx,arguments));};require.s.newContext=function(){var newCtx=newContextConstr.apply(require.s,arguments),newOrigNameToUrl=newCtx.nameToUrl;newCtx.nameToUrl=function(){return getUrl(newCtx,newOrigNameToUrl.apply(newCtx,arguments));};return newCtx;};});require(['baseUrlInterceptor'],function(){'use strict';});","mage/requirejs/resolver.min.js":"define(['underscore','domReady!'],function(_){'use strict';var context=require.s.contexts._,execCb=context.execCb,registry=context.registry,callbacks=[],retries=10,updateDelay=1,ready,update;function isSubscribed(callback){return!!_.findWhere(callbacks,callback);}\nfunction isRejected(module){return registry[module.id]&&(registry[module.id].inited||registry[module.id].error);}\nfunction isPathFallback(module){return registry[module.id]&®istry[module.id].events.error;}\nfunction isPending(module){if(!module.depCount){return false;}\nreturn module.depCount>_.filter(module.depMaps,isRejected).length+_.filter(module.depMaps,isPathFallback).length;}\nfunction hasPending(){return _.some(registry,isPending);}\nfunction isReady(){return ready&&!hasPending();}\nfunction invoke(callback){callback.handler.call(callback.ctx);}\nfunction resolve(){ready=true;
2callbacks.splice(0).forEach(invoke);}\nfunction tick(){ready=false;update(retries);}\nfunction subscribe(handler,ctx){var callback={handler:handler,ctx:ctx};if(!isSubscribed(callback)){callbacks.push(callback);if(isReady()){_.defer(tick);}}}\nupdate=_.debounce(function(retry){if(!hasPending()){retry?update(--retry):resolve();}},updateDelay);context.execCb=function(){var exported=execCb.apply(context,arguments);tick();return exported;};return subscribe;});","mage/requirejs/text.min.js":"define(['module'],function(module){'use strict';var xmlRegExp=/^\\s*<\\?xml(\\s)+version=[\\'\\\"](\\d)*.(\\d)*[\\'\\\"](\\s)*\\?>/im,bodyRegExp=/<body[^>]*>\\s*([\\s\\S]+)\\s*<\\/body>/im,stripReg=/!strip$/i,defaultConfig=module.config&&module.config()||{};function stripContent(external){var matches;if(!external){return'';}\nmatches=external.match(bodyRegExp);external=matches?matches[1]:external.replace(xmlRegExp,'');return external;}\nfunction sameDomain(url){var uProtocol,uHostName,uPort,xdRegExp=/^([\\w:]+)?\\/\\/([^\\/\\\\]+)/i,location=window.location,match=xdRegExp.exec(url);if(!match){return true;}\nuProtocol=match[1];uHostName=match[2];uHostName=uHostName.split(':');uPort=uHostName[1]||'';uHostName=uHostName[0];return(!uProtocol||uProtocol===location.protocol)&&(!uHostName||uHostName.toLowerCase()===location.hostname.toLowerCase())&&(!uPort&&!uHostName||uPort===location.port);}\nfunction createRequest(url){var xhr=new XMLHttpRequest();if(!sameDomain(url)&&typeof XDomainRequest!=='undefined'){xhr=new XDomainRequest();}\nreturn xhr;}\nfunction getContent(url,callback,fail,headers){var xhr=createRequest(url),header;xhr.open('GET',url);if('setRequestHeader'in xhr&&headers){for(header in headers){if(headers.hasOwnProperty(header)){xhr.setRequestHeader(header.toLowerCase(),headers[header]);}}}\nxhr.onreadystatechange=function(){var status,err;if(xhr.readyState===4){status=xhr.status||0;if(status>399&&status<600){err=new Error(url+' HTTP status: '+status);err.xhr=xhr;if(fail){fail(err);}}else{callback(xhr.responseText);if(defaultConfig.onXhrComplete){defaultConfig.onXhrComplete(xhr,url);}}}};if(defaultConfig.onXhr){defaultConfig.onXhr(xhr,url);}\nxhr.send();}\nfunction loadContent(name,req,onLoad){var toStrip=stripReg.test(name),url=req.toUrl(name.replace(stripReg,'')),headers=defaultConfig.headers;getContent(url,function(content){content=toStrip?stripContent(content):content;onLoad(content);},onLoad.error,headers);}\nreturn{load:loadContent,get:getContent};});","mage/utils/arrays.min.js":"define(['underscore','./strings'],function(_,utils){'use strict';function getIndex(item,container){var index=container.indexOf(item);if(~index){return index;}\nreturn _.findIndex(container,function(value){return value&&value.name===item;});}\nreturn{toggle:function(arr,value,add){return add?this.add(arr,value):this.remove(arr,value);},remove:function(arr,value){var index=arr.indexOf(value);if(~index){arr.splice(index,1);}\nreturn this;},add:function(arr){var values=_.toArray(arguments).slice(1);values.forEach(function(value){if(!~arr.indexOf(value)){arr.push(value);}});return this;},insert:function(item,container,position){var currentIndex=getIndex(item,container),newIndex,target;if(typeof position==='undefined'){position=-1;}else if(typeof position==='string'){position=isNaN(+position)?position:+position;}\nnewIndex=position;if(~currentIndex){target=container.splice(currentIndex,1)[0];if(typeof item==='string'){item=target;}}\nif(typeof position!=='number'){target=position.after||position.before||position;newIndex=getIndex(target,container);if(~newIndex&&(position.after||newIndex>=currentIndex)){newIndex++;}}\nif(newIndex<0){newIndex+=container.length+1;}\ncontainer[newIndex]?container.splice(newIndex,0,item):container[newIndex]=item;return!~currentIndex?item:currentIndex!==newIndex;},formatOffset:function(elems,offset){if(utils.isEmpty(offset)){offset=-1;}\noffset=+offset;if(offset<0){offset+=elems.length+1;}\nreturn offset;}};});","mage/utils/compare.min.js":"define(['underscore','mage/utils/objects'],function(_,utils){'use strict';var result=[];function equalArrays(keepOrder,target){var args=_.toArray(arguments),arrays;if(!Array.isArray(keepOrder)){arrays=args.slice(2);}else{target=keepOrder;keepOrder=false;arrays=args.slice(1);}\nif(!arrays.length){return true;}\nreturn arrays.every(function(array){if(array===target){return true;}else if(array.length!==target.length){return false;}else if(!keepOrder){return!_.difference(target,array).length;}\nreturn array.every(function(value,index){return target[index]===value;});});}\nfunction isDifferent(a,b){var oldIsPrimitive=utils.isPrimitive(a);if(Array.isArray(a)&&Array.isArray(b)){return!equalArrays(true,a,b);}\nreturn oldIsPrimitive?a!==b:true;}\nfunction getPath(prefix,part){return prefix?prefix+'.'+part:part;}\nfunction hasOwn(obj,key){return Object.prototype.hasOwnProperty.call(obj,key);}\nfunction getContainers(changes){var containers={}
2,indexed=_.indexBy(changes,'path');_.each(indexed,function(change,name){var path;name.split('.').forEach(function(part){path=getPath(path,part);if(path in indexed){return;}\n(containers[path]=containers[path]||[]).push(change);});});return containers;}\nfunction addChange(path,name,type,newValue,oldValue){var data;data={path:path,name:name,type:type};if(type!=='remove'){data.value=newValue;data.oldValue=oldValue;}else{data.oldValue=newValue;}\nresult.push(data);}\nfunction setAll(ns,name,type,iterator,placeholder){var key;if(arguments.length>4){type==='add'?addChange(ns,name,'update',iterator,placeholder):addChange(ns,name,'update',placeholder,iterator);}else{addChange(ns,name,type,iterator);}\nif(!utils.isObject(iterator)){return;}\nfor(key in iterator){if(hasOwn(iterator,key)){setAll(getPath(ns,key),key,type,iterator[key]);}}}\nfunction compare(old,current,ns,name){var key,oldIsObj=utils.isObject(old),newIsObj=utils.isObject(current);if(oldIsObj&&newIsObj){for(key in old){if(hasOwn(old,key)&&!hasOwn(current,key)){setAll(getPath(ns,key),key,'remove',old[key]);}}\nfor(key in current){if(hasOwn(current,key)){hasOwn(old,key)?compare(old[key],current[key],getPath(ns,key),key):setAll(getPath(ns,key),key,'add',current[key]);}}}else if(oldIsObj){setAll(ns,name,'remove',old,current);}else if(newIsObj){setAll(ns,name,'add',current,old);}else if(isDifferent(old,current)){addChange(ns,name,'update',current,old);}}\nreturn{compare:function(){var changes;compare.apply(null,arguments);changes=result.splice(0);return{containers:getContainers(changes),changes:changes,equal:!changes.length};},equalArrays:equalArrays};});","mage/utils/main.min.js":"define(function(require){'use strict';var utils={},_=require('underscore'),root=typeof self=='object'&&self.self===self&&self||typeof global=='object'&&global.global===global&&global||Function('return this')()||{};root._=_;return _.extend(utils,require('./arrays'),require('./compare'),require('./misc'),require('./objects'),require('./strings'),require('./template'));});","mage/utils/misc.min.js":"define(['underscore','jquery','mage/utils/objects'],function(_,$,utils){'use strict';var defaultAttributes,ajaxSettings,map;defaultAttributes={method:'post',enctype:'multipart/form-data'};ajaxSettings={default:{method:'POST',cache:false,processData:false,contentType:false},simple:{method:'POST',dataType:'json'}};map={'D':'DDD','dd':'DD','d':'D','EEEE':'dddd','EEE':'ddd','e':'d','yyyy':'YYYY','yy':'YY','y':'YYYY','a':'A'};return{uniqueid:function(size){var code=Math.random()*25+65|0,idstr=String.fromCharCode(code);size=size||7;while(idstr.length<size){code=Math.floor(Math.random()*42+48);if(code<58||code>64){idstr+=String.fromCharCode(code);}}\nreturn idstr;},limit:function(owner,target,limit){var fn=owner[target];owner[target]=_.debounce(fn.bind(owner),limit);},normalizeDate:function(mageFormat){var result=mageFormat;_.each(map,function(moment,mage){result=result.replace(new RegExp(mage+'(?=([^\\u0027]*\\u0027[^\\u0027]*\\u0027)*[^\\u0027]*$)'),moment);});result=result.replace(/'(.*?)'/g,'[$1]');return result;},inRange:function(value,min,max){return Math.min(Math.max(min,value),max);},submit:function(options,attrs){var form=document.createElement('form'),data=utils.serialize(options.data),attributes=_.extend({},defaultAttributes,attrs||{});if(!attributes.action){attributes.action=options.url;}\ndata['form_key']=window.FORM_KEY;_.each(attributes,function(value,name){form.setAttribute(name,value);});data=_.map(data,function(value,name){return'<input type=\"hidden\" '+'name=\"'+_.escape(name)+'\" '+'value=\"'+_.escape(value)+'\"'+' />';}).join('');form.insertAdjacentHTML('afterbegin',data);document.body.appendChild(form);form.submit();},ajaxSubmit:function(options,config){var t=new Date().getTime(),settings;options.data['form_key']=window.FORM_KEY;options.data=this.prepareFormData(options.data,config.ajaxSaveType);settings=_.extend({},ajaxSettings[config.ajaxSaveType],options||{});if(!config.ignoreProcessEvents){$('body').trigger('processStart');}\nreturn $.ajax(settings).done(function(data){if(config.response){data.t=t;config.response.data(data);config.response.status(undefined);config.response.status(!data.error);}}).fail(function(){if(config.response){config.response.status(undefined);config.response.status(false);config.response.data({error:true,messages:'Something went wrong.',t:t});}}).always(function(){if(!config.ignoreProcessEvents){$('body').trigger('processStop');}});},prepareFormData:function(data,type){var formData;if(type==='default'){formData=new FormData();_.each(utils.serialize(data),function(val,name){formData.append(name,val);});}else if(type==='simple'){formData=utils.serialize(data);}\nreturn formData;},filterFormData:function(data,suffix,separator){data=data||{};suffix=suffix||'prepared-for-send';separator=separator||'-';_.each(data,function(value,key){if(_.isObject(value)&&!Array.isArray(value)){this.filterFormData(value,suffix,separator);}else if(_.isString(key)&&~key.indexOf(suffix)){data[key.split(separator)[0]]=value;delete data[key];}},this);return data;},escape:function(string){return string?$('<p></p>').text(string).html().replace(/\"/g,'"'):string;},unescape:function(data){var unescaped=_.unescape(data),mapCharacters={''':'\\''};_.each(mapCharacters,function(value,key){unescaped=unescaped.replace(key,value);});return unescaped;},convertToMomentFormat:function(format){var newFormat;newFormat=format.replace(/yyyy|yy|y/,'YYYY');newFormat=newFormat.replace(/dd|d/g,'DD');return newFormat;},getUrlParameters:function(url){var params={},queries=url.split('?'),temp,i,l;if(!queries[1]){return params;}\nqueries=queries[1].split('&');for(i=0,l=queries.length;i<l;i++){temp=queries[i].split('=');if(temp[1]){params[temp[0]]=decodeURIComponent(temp[1].replace(/\\+/g,'%20'));}else{params[temp[0]]='';}}\nreturn params;}};});","mage/utils/objects.min.js":"define(['ko','jquery','underscore','mage/utils/strings'],function(ko,$,_,stringUtils){'use strict';var primitives=['undefined','boolean','number','string'];function setNested(parent,path,value){var last=path.pop(),len=path.length,pi=0,part=path[pi];for(;pi<len;part=path[++pi]){if(!_.isObject(parent[part])){parent[part]={};}\nparent=parent[part];}\nif(typeof parent[last]==='function'){parent[last](value);}else{parent[last]=value;}\nreturn value;}\nfunction getNested(parent,path){var exists=true,len=path.length,pi=0;for(;pi<len&&exists;pi++){parent=parent[path[pi]];if(typeof parent==='undefined'){exists=false;}}\nif(exists){if(ko.isObservable(parent)){parent=parent();}\nreturn parent;}}\nfunction removeNested(parent,path){var field=path.pop();parent=getNested(parent,path);if(_.isObject(parent)){delete parent[field];}}\nreturn{nested:function(data,path,value){var action=arguments.length>2?setNested:getNested;path=path?path.split('.'):[];return action(data,path,value);},nestedRemove:function(data,path){path=path.split('.');removeNested(data,path);},flatten:function(data,separator,parent,result){separator=separator||'.';result=result||{};if(!data){return result;}\n_.each(Object.keys(data),function(name){var node=data[name];if({}.toString.call(node)==='[object Function]'){return;}\nif(parent){name=parent+separator+name;}\ntypeof node==='object'?this.flatten(node,separator,name,result):result[name]=node;},this);return result;},unflatten:function(data,separator){var result={};separator=separator||'.';_.each(data,function(value,nodes){nodes=nodes.split(separator);setNested(result,nodes,value);});return result;},serialize:function(data){var result={};data=this.flatten(data);_.each(data,function(value,keys){keys=stringUtils.serializeName(keys);value=_.isUndefined(value)?'':value;result[keys]=value;},this);return result;},extend:function(){var args=_.toArray(arguments);args.unshift(true);return $.extend.apply($,args);},copy:function(data){var result=data,isArray=Array.isArray(data),placeholder;if(this.isObject(data)||isArray){placeholder=isArray?[]:{};result=this.extend(placeholder,data);}\nreturn result;},hardCopy:function(original){if(original===null||typeof original!=='object'){return original;}\nreturn JSON.parse(JSON.stringify(original));},omit:function(target,list){var removed={},ignored=list;if(this.isObject(list)){ignored=[];_.each(list,function(value,key){if(value){ignored.push(key);}});}else if(_.isString(list)){ignored=_.toArray(arguments).slice(1);}\n_.each(ignored,function(path){var value=this.nested(target,path);if(!_.isUndefined(value)){removed[path]=value;this.nestedRemove(target,path);}},this);return removed;},isObject:function(value){var objProto=Object.prototype;return typeof value=='object'?objProto.toString.call(value)==='[object Object]':false;},isPrimitive:function(value){return value===null||~primitives.indexOf(typeof value);},forEachRecursive:function(data,action,maxDepth){maxDepth=typeof maxDepth==='number'&&!isNaN(maxDepth)?maxDepth-1:7;if(!_.isFunction(action)||_.isFunction(data)||maxDepth<0){return;}\nif(!_.isObject(data)){action(data);return;}\n_.each(data,function(value){this.forEachRecursive(value,action,maxDepth);},this);action(data);},mapRecursive:function(data,action,maxDepth){var newData;maxDepth=typeof maxDepth==='number'&&!isNaN(maxDepth)?maxDepth-1:7;if(!_.isFunction(action)||_.isFunction(data)||maxDepth<0){return data;}\nif(!_.isObject(data)){return action(data);}\nif(_.isArray(data)){newData=_.map(data,function(item){return this.mapRecursive(item,action,maxDepth);},this);return action(newData);}\nnewData=_.mapObject(data,function(val,key){if(data.hasOwnProperty(key)){return this.mapRecursive(val,action,maxDepth);}\nreturn val;},this);return action(newData);},removeEmptyValues:function(data){if(!_.isObject(data)){return data;}\nif(_.isArray(data)){return data.filter(function(item){return!this.isEmptyObj(item);},this);}\nreturn _.omit(data,this.isEmptyObj.bind(this));},isEmptyObj:function(val){return _.isObject(val)&&_.isEmpty(val)||this.isEmpty(val)||val&&val.trim&&this.isEmpty(val.trim());}};});","mage/utils/strings.min.js":"define(['underscore'],function(_){'use strict';var jsonRe=/^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/;return{castString:function(str){try{str=str==='true'?true:str==='false'?false:str==='null'?null:+str+''===str?+str:jsonRe.test(str)?JSON.parse(str):str;}catch(e){}\nreturn str;},stringToArray:function(str,separator){separator=separator||' ';return typeof str==='string'?str.split(separator):str;},serializeName:function(name,separator){var result;separator=separator||'.';name=name.split(separator);result=name.shift();name.forEach(function(part){result+='['+part+']';});return result;},isEmpty:function(value){return value===''||_.isUndefined(value)||_.isNull(value);},fullPath:function(prefix,part){return prefix?prefix+'.'+part:part;},getPart:function(parts,offset,delimiter){delimiter=delimiter||'.';parts=parts.split(delimiter);offset=this.formatOffset(parts,offset);parts.splice(offset,1);return parts.join(delimiter)||'';},camelCaseToMinus:function camelCaseToMinus(string){return(''+string).split('').map(function(symbol,index){return index?symbol.toUpperCase()===symbol?'-'+symbol.toLowerCase():symbol:symbol.toLowerCase();}).join('');},minusToCamelCase:function minusToCamelCase(string){return(''+string).split('-').map(function(part,index){return index?part.charAt(0).toUpperCase()+part.slice(1):part;}).join('');}};});","mage/utils/template.min.js":"define(['jquery','underscore','mage/utils/objects','mage/utils/strings'],function($,_,utils,stringUtils){'use strict';var tmplSettings=_.templateSettings,interpolate=/\\$\\{([\\s\\S]+?)\\}/g,opener='${',template,hasStringTmpls;hasStringTmpls=(function(){var testString='var foo = \"bar\"; return `${ foo }` === foo';try{return Function(testString)();}catch(e){return false;}})();function isTmplIgnored(tmpl,target){var parsedTmpl;try{parsedTmpl=JSON.parse(tmpl);if(typeof parsedTmpl==='object'){return tmpl.includes('__disableTmpl');}}catch(e){}\nif(typeof target!=='undefined'){if(typeof target==='object'&&target.hasOwnProperty('__disableTmpl')){return target.__disableTmpl;}}\nreturn false;}\nif(hasStringTmpls){template=function(tmpl,$){return eval('`'+tmpl+'`');};}else{template=function(tmpl,data){var cached=tmplSettings.interpolate;tmplSettings.interpolate=interpolate;tmpl=_.template(tmpl,{variable:'$'})(data);tmplSettings.interpolate=cached;return tmpl;};}\nfunction isTemplate(value){return typeof value==='string'&&value.indexOf(opener)!==-1&&value.indexOf('${{')===-1;}\nfunction render(tmpl,data,castString,maxCycles){var last=tmpl,cycles=0;while(~tmpl.indexOf(opener)&&(typeof maxCycles==='undefined'||cycles<maxCycles)){if(!isTmplIgnored(tmpl)){tmpl=template(tmpl,data);}\nif(tmpl===last){break;}\nlast=tmpl;cycles++;}\nreturn castString?stringUtils.castString(tmpl):tmpl;}\nreturn{template:function(tmpl,data,castString,dontClone){if(typeof tmpl==='string'){return render(tmpl,data,castString);}\nif(!dontClone){tmpl=utils.copy(tmpl);}\ntmpl.$data=data||{};_.each(tmpl,function iterate(value,key,list){var disabled,maxCycles;if(key==='$data'){return;}
2\nif(isTemplate(key)){delete list[key];key=render(key,tmpl);list[key]=value;}\nif(isTemplate(value)){disabled=isTmplIgnored(value,list);if(typeof disabled==='object'&&disabled.hasOwnProperty(key)&&disabled[key]!==false){maxCycles=disabled[key];}\nif(disabled===true||maxCycles===true){maxCycles=0;}\nlist[key]=render(value,tmpl,castString,maxCycles);}else if($.isPlainObject(value)||Array.isArray(value)){_.each(value,iterate);}});delete tmpl.$data;return tmpl;}};});","mage/utils/wrapper.min.js":"define(['underscore'],function(_){'use strict';var superReg=/\\b_super\\b/;return{wrap:function(target,wrapper){if(!_.isFunction(target)||!_.isFunction(wrapper)){return wrapper;}\nreturn function(){var args=_.toArray(arguments),ctx=this,_super;_super=function(){var superArgs=arguments.length?arguments:args.slice(1);return target.apply(ctx,superArgs);};args.unshift(_super);return wrapper.apply(ctx,args);};},wrapSuper:function(target,wrapper){if(!this.hasSuper(wrapper)||!_.isFunction(target)){return wrapper;}\nreturn function(){var _super=this._super,args=arguments,result;this._super=function(){var superArgs=arguments.length?arguments:args;return target.apply(this,superArgs);};result=wrapper.apply(this,args);this._super=_super;return result;};},hasSuper:function(fn){return _.isFunction(fn)&&superReg.test(fn);},extend:function(target){var extenders=_.toArray(arguments).slice(1),iterator=this._extend.bind(this,target);extenders.forEach(iterator);return target;},_extend:function(target,extender){_.each(extender,function(value,key){target[key]=this.wrap(target[key],extender[key]);},this);}};});","mage/validation/url.min.js":"define([],function(){'use strict';return{redirect:function(path){path=this.sanitize(path);if(this.validate(path)){window.location.href=path;}},validate:function(path){var hostname=window.location.hostname;if(path.indexOf(hostname)===-1||path.indexOf('javascript:')!==-1||path.indexOf('vbscript:')!==-1){return false;}\nreturn true;},sanitize:function(path){return path.replace('[^-A-Za-z0-9+&@#/%?=~_|!:,.;\\(\\)]','');}};});","mage/validation/validation.min.js":"define(['jquery','mage/validation','mage/translate'],function($){'use strict';$.each({'validate-grouped-qty':[function(value,element,params){var result=true,total=0,inputVal=parseFloat($(element).val())||0;if(inputVal<0){result=false;}\n$(params).find('input[data-validate*=\"validate-grouped-qty\"]').each(function(i,e){var groupedVal=parseFloat($(e).val())||0;if(groupedVal>=0){total+=groupedVal;}});return result&&total>0;},$.mage.__('Please specify the quantity of product(s).')],'validate-one-checkbox-required-by-name':[function(value,element,params){var checkedCount=0,container;if(element.type==='checkbox'){$('[name=\"'+element.name+'\"]').each(function(){if($(this).is(':checked')){checkedCount+=1;return false;}});}\ncontainer='#'+params;if(checkedCount>0){$(container).removeClass('validation-failed');$(container).addClass('validation-passed');return true;}\n$(container).addClass('validation-failed');$(container).removeClass('validation-passed');return false;},$.mage.__('Please select one of the options.')],'validate-date-between':[function(value,element,params){var minDate=new Date(params[0]),maxDate=new Date(params[1]),inputDate=new Date(element.value),message;minDate.setHours(0);maxDate.setHours(0);if(inputDate>=minDate&&inputDate<=maxDate){return true;}\nmessage=$.mage.__('Please enter a date between %min and %max.');this.dateBetweenErrorMessage=message.replace('%min',minDate).replace('%max',maxDate);return false;},function(){return this.dateBetweenErrorMessage;}],'validate-dob':[function(val,element,params){var dob=$(element).parents('.customer-dob'),dayVal,monthVal,yearVal,dobLength,day,month,year,curYear,validYearMessage,validateDayInMonth,validDateMessage,today,dateEntered;$(dob).find('.'+this.settings.errorClass).removeClass(this.settings.errorClass);dayVal=$(dob).find(params[0]).find('input:text').val();monthVal=$(dob).find(params[1]).find('input:text').val();yearVal=$(dob).find(params[2]).find('input:text').val();dobLength=dayVal.length+monthVal.length+yearVal.length;if(params[3]&&dobLength===0){this.dobErrorMessage=$.mage.__('This is a required field.');return false;}\nif(!params[3]&&dobLength===0){return true;}\nday=parseInt(dayVal,10)||0;month=parseInt(monthVal,10)||0;year=parseInt(yearVal,10)||0;curYear=new Date().getFullYear();if(!day||!month||!year){this.dobErrorMessage=$.mage.__('Please enter a valid full date.');return false;}\nif(month<1||month>12){this.dobErrorMessage=$.mage.__('Please enter a valid month (1-12).');return false;}\nif(year<1900||year>curYear){validYearMessage=$.mage.__('Please enter a valid year (1900-%1).');this.dobErrorMessage=validYearMessage.replace('%1',curYear.toString());return false;}\nvalidateDayInMonth=new Date(year,month,0).getDate();if(day<1||day>validateDayInMonth){validDateMessage=$.mage.__('Please enter a valid day (1-%1).');this.dobErrorMessage=validDateMessage.replace('%1',validateDayInMonth.toString());return false;}\ntoday=new Date();dateEntered=new Date();dateEntered.setFullYear(year,month-1,day);if(dateEntered>today){this.dobErrorMessage=$.mage.__('Please enter a date from the past.');return false;}\nday=day%10===day?'0'+day:day;month=month%10===month?'0'+month:month;$(element).val(month+'/'+day+'/'+year);return true;},function(){return this.dobErrorMessage;}]},function(i,rule){rule.unshift(i);$.validator.addMethod.apply($.validator,rule);});});","magnifier/magnifier.min.js":"(function($){$.fn.magnify=function(options){'use strict';var magnify=new Magnify($(this),options);return magnify;};function Magnify(element,options){var customUserOptions=options||{},$box=$(element),$thumb,that=this,largeWrapper=options.largeWrapper||'.magnifier-preview',$magnifierPreview=$(largeWrapper);curThumb=null,magnifierOptions={x:0,y:0,w:0,h:0,lensW:0,lensH:0,lensBgX:0,lensBgY:0,largeW:0,largeH:0,largeL:0,largeT:0,zoom:2,zoomMin:1.1,zoomMax:5,mode:'outside',eventType:'click',status:0,zoomAttached:false,zoomable:customUserOptions.zoomable!==undefined?customUserOptions.zoomable:false,onthumbenter:customUserOptions.onthumbenter!==undefined?customUserOptions.onthumbenter:null,onthumbmove:customUserOptions.onthumbmove!==undefined?customUserOptions.onthumbmove:null,onthumbleave:customUserOptions.onthumbleave!==undefined?customUserOptions.onthumbleave:null,onzoom:customUserOptions.onzoom!==undefined?customUserOptions.onzoom:null},pos={t:0,l:0,x:0,y:0},gId=0,status=0,curIdx='',curLens=null,curLarge=null,lensbg=customUserOptions.bg!==undefined?customUserOptions.lensbg:true,gZoom=customUserOptions.zoom!==undefined?customUserOptions.zoom:magnifierOptions.zoom,gZoomMin=customUserOptions.zoomMin!==undefined?customUserOptions.zoomMin:magnifierOptions.zoomMin,gZoomMax=customUserOptions.zoomMax!==undefined?customUserOptions.zoomMax:magnifierOptions.zoomMax,gMode=customUserOptions.mode||magnifierOptions.mode,gEventType=customUserOptions.eventType||magnifierOptions.eventType,data={},inBounds=false,isOverThumb=false,rate=1,paddingX=0,paddingY=0,enabled=true,showWrapper=true;var MagnifyCls={magnifyHidden:'magnify-hidden',magnifyOpaque:'magnify-opaque',magnifyFull:'magnify-fullimage'};that.update=function(){updateLensOnLoad();};that.init=function(){_init($box,options);};function _toBoolean(str){if(typeof str==='string'){if(str==='true'){return true;}else if(str==='false'||''){return false;}\nconsole.warn('Wrong type: can\\'t be transformed to Boolean');}else if(typeof str==='boolean'){return str;}}\nfunction createLens(thumb){if($(thumb).siblings('.magnify-lens').length){return false;}\nvar lens=$('<div class=\"magnify-lens magnify-hidden\" data-gallery-role=\"magnifier-zoom\"></div>');$(thumb).parent().append(lens);}\nfunction updateLensOnLoad(idSelectorMainImg,thumb,largeImgInMagnifyLens,largeWrapper){var magnifyLensElement=$box.find('.magnify-lens'),textWrapper;if(data[idSelectorMainImg].status===1){textWrapper=$('<div class=\"magnifier-loader-text\"></div>');magnifyLensElement.className='magnifier-loader magnify-hidden';textWrapper.html('Loading...');magnifyLensElement.html('').append(textWrapper);}else if(data[idSelectorMainImg].status===2){magnifyLensElement.addClass(MagnifyCls.magnifyHidden);magnifyLensElement.html('');largeImgInMagnifyLens.id=idSelectorMainImg+'-large';largeImgInMagnifyLens.style.width=data[idSelectorMainImg].largeImgInMagnifyLensWidth+'px';largeImgInMagnifyLens.style.height=data[idSelectorMainImg].largeImgInMagnifyLensHeight+'px';largeImgInMagnifyLens.className='magnifier-large magnify-hidden';if(data[idSelectorMainImg].mode==='inside'){magnifyLensElement.append(largeImgInMagnifyLens);}else{largeWrapper.html('').append(largeImgInMagnifyLens);}}\ndata[idSelectorMainImg].lensH=data[idSelectorMainImg].lensH>$thumb.height()?$thumb.height():data[idSelectorMainImg].lensH;if(Math.round(data[idSelectorMainImg].lensW)===0){magnifyLensElement.css('display','none');}else{magnifyLensElement.css({width:Math.round(data[idSelectorMainImg].lensW)+'px',height:Math.round(data[idSelectorMainImg].lensH)+'px',display:''});}}\nfunction getMousePos(){var xPos=pos.x-magnifierOptions.x,yPos=pos.y-magnifierOptions.y,t,l;inBounds=xPos<0||yPos<0||xPos>magnifierOptions.w||yPos>magnifierOptions.h?false:true;
2l=xPos-magnifierOptions.lensW / 2;t=yPos-magnifierOptions.lensH / 2;if(xPos<magnifierOptions.lensW / 2){l=0;}\nif(yPos<magnifierOptions.lensH / 2){t=0;}\nif(xPos-magnifierOptions.w+Math.ceil(magnifierOptions.lensW / 2)>0){l=magnifierOptions.w-Math.ceil(magnifierOptions.lensW+2);}\nif(yPos-magnifierOptions.h+Math.ceil(magnifierOptions.lensH / 2)>0){t=magnifierOptions.h-Math.ceil(magnifierOptions.lensH);}\npos.l=l;pos.t=t;magnifierOptions.lensBgX=pos.l;magnifierOptions.lensBgY=pos.t;if(magnifierOptions.mode==='inside'){magnifierOptions.largeL=Math.round(xPos*(magnifierOptions.zoom-magnifierOptions.lensW / magnifierOptions.w));magnifierOptions.largeT=Math.round(yPos*(magnifierOptions.zoom-magnifierOptions.lensH / magnifierOptions.h));}else{magnifierOptions.largeL=Math.round(magnifierOptions.lensBgX*magnifierOptions.zoom*(magnifierOptions.largeWrapperW / magnifierOptions.w));magnifierOptions.largeT=Math.round(magnifierOptions.lensBgY*magnifierOptions.zoom*(magnifierOptions.largeWrapperH / magnifierOptions.h));}}\nfunction onThumbEnter(){if(_toBoolean(enabled)){magnifierOptions=data[curIdx];curLens=$box.find('.magnify-lens');if(magnifierOptions.status===2){curLens.removeClass(MagnifyCls.magnifyOpaque);curLarge=$('#'+curIdx+'-large');curLarge.removeClass(MagnifyCls.magnifyHidden);}else if(magnifierOptions.status===1){curLens.className='magnifier-loader';}}}\nfunction onThumbLeave(){if(magnifierOptions.status>0){var handler=magnifierOptions.onthumbleave;if(handler!==null){handler({thumb:curThumb,lens:curLens,large:curLarge,x:pos.x,y:pos.y});}\nif(!curLens.hasClass(MagnifyCls.magnifyHidden)){curLens.addClass(MagnifyCls.magnifyHidden);if(curLarge!==null){curLarge.addClass(MagnifyCls.magnifyHidden);}}}}\nfunction move(){if(_toBoolean(enabled)){if(status!==magnifierOptions.status){onThumbEnter();}\nif(magnifierOptions.status>0){curThumb.className=magnifierOptions.thumbCssClass+' magnify-opaque';if(magnifierOptions.status===1){curLens.className='magnifier-loader';}else if(magnifierOptions.status===2){curLens.removeClass(MagnifyCls.magnifyHidden);curLarge.removeClass(MagnifyCls.magnifyHidden);curLarge.css({left:'-'+magnifierOptions.largeL+'px',top:'-'+magnifierOptions.largeT+'px'});}\nvar borderOffset=2;pos.t=pos.t<=0?0:pos.t-borderOffset;curLens.css({left:pos.l+paddingX+'px',top:pos.t+paddingY+'px'});if(lensbg){curLens.css({'background-color':'rgba(f,f,f,.5)'});}else{curLens.get(0).style.backgroundPosition='-'+\nmagnifierOptions.lensBgX+'px -'+\nmagnifierOptions.lensBgY+'px';}\nvar handler=magnifierOptions.onthumbmove;if(handler!==null){handler({thumb:curThumb,lens:curLens,large:curLarge,x:pos.x,y:pos.y});}}\nstatus=magnifierOptions.status;}}\nfunction setThumbData(mainImage,mainImageData){var thumbBounds=mainImage.getBoundingClientRect(),w=0,h=0;mainImageData.x=Math.round(thumbBounds.left);mainImageData.y=Math.round(thumbBounds.top);mainImageData.w=Math.round(thumbBounds.right-mainImageData.x);mainImageData.h=Math.round(thumbBounds.bottom-mainImageData.y);if(mainImageData.mode==='inside'){w=mainImageData.w;h=mainImageData.h;}else{w=mainImageData.largeWrapperW;h=mainImageData.largeWrapperH;}\nmainImageData.largeImgInMagnifyLensWidth=Math.round(mainImageData.zoom*w);mainImageData.largeImgInMagnifyLensHeight=Math.round(mainImageData.zoom*h);mainImageData.lensW=Math.round(mainImageData.w / mainImageData.zoom);mainImageData.lensH=Math.round(mainImageData.h / mainImageData.zoom);}\nfunction _init($box,options){var opts={};if(options.thumb===undefined){return false;}\n$thumb=$box.find(options.thumb);if($thumb.length){for(var key in options){opts[key]=options[key];}\nopts.thumb=$thumb;enabled=opts.enabled;if(_toBoolean(enabled)){$magnifierPreview.show().css('display','');$magnifierPreview.addClass(MagnifyCls.magnifyHidden);set(opts);}else{$magnifierPreview.empty().hide();}}\nreturn that;}\nfunction hoverEvents(thumb){$(thumb).on('mouseover',function(e){if(showWrapper){if(magnifierOptions.status!==0){onThumbLeave();}\nhandleEvents(e);isOverThumb=inBounds;}}).trigger('mouseover');}\nfunction clickEvents(thumb){$(thumb).on('click',function(e){if(showWrapper){if(!isOverThumb){if(magnifierOptions.status!==0){onThumbLeave();}\nhandleEvents(e);isOverThumb=true;}}});}\nfunction bindEvents(eType,thumb){var eventFlag='hasBoundEvent_'+eType;if(thumb[eventFlag]){return;}\nthumb[eventFlag]=true;
2switch(eType){case'hover':hoverEvents(thumb);break;case'click':clickEvents(thumb);break;}}\nfunction handleEvents(e){var src=e.target;curIdx=src.id;curThumb=src;onThumbEnter(src);setThumbData(curThumb,magnifierOptions);pos.x=e.clientX;pos.y=e.clientY;getMousePos();move();var handler=magnifierOptions.onthumbenter;if(handler!==null){handler({thumb:curThumb,lens:curLens,large:curLarge,x:pos.x,y:pos.y});}}\nfunction set(options){if(data[options.thumb.id]!==undefined){curThumb=options.thumb;return false;}\nvar thumbObj=new Image(),largeObj=new Image(),$thumb=options.thumb,thumb=$thumb.get(0),idx=thumb.id,largeUrl,largeWrapper=$(options.largeWrapper),zoom=options.zoom||thumb.getAttribute('data-zoom')||gZoom,zoomMin=options.zoomMin||gZoomMin,zoomMax=options.zoomMax||gZoomMax,mode=options.mode||thumb.getAttribute('data-mode')||gMode,eventType=options.eventType||thumb.getAttribute('data-eventType')||gEventType,onthumbenter=options.onthumbenter!==undefined?options.onthumbenter:magnifierOptions.onthumbenter,onthumbleave=options.onthumbleave!==undefined?options.onthumbleave:magnifierOptions.onthumbleave,onthumbmove=options.onthumbmove!==undefined?options.onthumbmove:magnifierOptions.onthumbmove;largeUrl=$thumb.data('original')||customUserOptions.full||$thumb.attr('src');if(thumb.id===''){idx=thumb.id='magnifier-item-'+gId;gId+=1;}\ncreateLens(thumb,idx);if(options.width){largeWrapper.width(options.width);}\nif(options.height){largeWrapper.height(options.height);}\nif(options.top){if(typeof options.top=='function'){var top=options.top()+'px';}else{var top=options.top+'px';}\nif(largeWrapper.length){largeWrapper[0].style.top=top.replace('%px','%');}}\nif(options.left){if(typeof options.left=='function'){var left=options.left()+'px';}else{var left=options.left+'px';}\nif(largeWrapper.length){largeWrapper[0].style.left=left.replace('%px','%');}}\ndata[idx]={zoom:zoom,zoomMin:zoomMin,zoomMax:zoomMax,mode:mode,eventType:eventType,thumbCssClass:thumb.className,zoomAttached:false,status:0,largeUrl:largeUrl,largeWrapperId:mode==='outside'?largeWrapper.attr('id'):null,largeWrapperW:mode==='outside'?largeWrapper.width():null,largeWrapperH:mode==='outside'?largeWrapper.height():null,onthumbenter:onthumbenter,onthumbleave:onthumbleave,onthumbmove:onthumbmove};paddingX=($thumb.parent().width()-$thumb.width())/ 2;paddingY=($thumb.parent().height()-$thumb.height())/ 2;showWrapper=false;$(thumbObj).on('load',function(){if(data.hasOwnProperty(idx)){data[idx].status=1;$(largeObj).on('load',function(){if(largeObj.width>largeWrapper.width()||largeObj.height>largeWrapper.height()){showWrapper=true;bindEvents(eventType,thumb);data[idx].status=2;if(largeObj.width>largeObj.height){data[idx].zoom=largeObj.width / largeWrapper.width();}else{data[idx].zoom=largeObj.height / largeWrapper.height();}\nsetThumbData(thumb,data[idx]);updateLensOnLoad(idx,thumb,largeObj,largeWrapper);}});largeObj.src=data[idx].largeUrl;}});thumbObj.src=thumb.src;}\nfunction onMouseLeave(){onThumbLeave();isOverThumb=false;$magnifierPreview.addClass(MagnifyCls.magnifyHidden);}\nfunction onMousemove(e){pos.x=e.clientX;pos.y=e.clientY;getMousePos();if(gEventType==='hover'){isOverThumb=inBounds;}\nif(inBounds&&isOverThumb){if(gMode==='outside'){$magnifierPreview.removeClass(MagnifyCls.magnifyHidden);}\nmove();}}\nfunction onScroll(){if(curThumb!==null){setThumbData(curThumb,magnifierOptions);}}\n$(window).on('scroll',onScroll);$(window).on('resize',function(){_init($box,customUserOptions);});$box.on('mousemove',onMousemove);$box.on('mouseleave',onMouseLeave);_init($box,customUserOptions);}}(jQuery));","magnifier/magnify.min.js":"define(['jquery','underscore','magnifier/magnifier'],function($,_){'use strict';return function(config,element){var isTouchEnabled='ontouchstart'in document.documentElement,gallerySelector='[data-gallery-role=\"gallery\"]',magnifierSelector='[data-gallery-role=\"magnifier\"]',magnifierZoomSelector='[data-gallery-role=\"magnifier-zoom\"]',zoomInButtonSelector='[data-gallery-role=\"fotorama__zoom-in\"]',zoomOutButtonSelector='[data-gallery-role=\"fotorama__zoom-out\"]',fullscreenImageSelector='[data-gallery-role=\"stage-shaft\"] [data-active=\"true\"] .fotorama__img--full',imageDraggableClass='fotorama__img--draggable',imageZoommable='fotorama__img--zoommable',zoomInLoaded='zoom-in-loaded',zoomOutLoaded='zoom-out-loaded',zoomInDisabled='fotorama__zoom-in--disabled',zoomOutDisabled='fotorama__zoom-out--disabled',keyboardNavigation,videoContainerClass='fotorama-video-container',hideMagnifier,dragFlag,endX,transitionEnabled,transitionActive=false,allowZoomOut=false,allowZoomIn=true;transitionEnabled=document.documentElement.style.transition!==un
2defined||document.documentElement.style.WebkitTransition!==undefined||document.documentElement.style.MozTransition!==undefined||document.documentElement.style.MsTransition!==undefined||document.documentElement.style.OTransition!==undefined;function getImageSize(img){return{rw:img.naturalWidth,rh:img.naturalHeight};}\nfunction calculateMinSize($image){var minHeight,minWidth,height=$image.height(),width=$image.width(),parentHeight=$image.parent().height(),parentWidth=$image.parent().width();if(width>parentWidth||height>parentHeight){if(width / height<parentWidth / parentHeight){minHeight=parentHeight;minWidth=width*(parentHeight / height);}else{minWidth=parentWidth;minHeight=height*parentWidth / width;}\n$image.css({'min-width':minWidth,'min-height':minHeight});}}\nfunction toggleZoomable($image,flag){if(flag){$image.css({'min-width':$image.width(),'min-height':$image.height(),'width':$image.width(),'height':$image.height()}).addClass(imageZoommable);}else{$image.css({width:'',height:'',top:'',left:'',right:'',bottom:''}).removeClass(imageZoommable);calculateMinSize($image);}}\nfunction resetVars($image){allowZoomIn=true;allowZoomOut=dragFlag=transitionActive=false;$image.hasClass(imageDraggableClass)&&$image.removeClass(imageDraggableClass);toggleZoomable($image,false);}\nfunction hideZoomControls(isHide){if(isHide){$(zoomInButtonSelector).addClass(zoomInDisabled);$(zoomOutButtonSelector).addClass(zoomOutDisabled);}else{$(zoomInButtonSelector).removeClass(zoomInDisabled);$(zoomOutButtonSelector).removeClass(zoomOutDisabled);}}\nfunction asyncToggleZoomButtons(path,$image){var img=new Image();img.onload=function(){this.height>$image.parent().height()||this.width>$image.parent().width()?hideZoomControls(false):hideZoomControls(true);};img.src=path;}\nfunction toggleZoomButtons($image,isTouchScreen,isVideoActiveFrame){var path=$image.attr('src');if(path&&!isTouchScreen&&!isVideoActiveFrame){asyncToggleZoomButtons(path,$image);}else{hideZoomControls(true);}}\nfunction resizeHandler(e,$image){var imageSize,parentWidth,parentHeight,isImageSmall,isImageFit;if(!e.data.$image||!e.data.$image.length)\nreturn;imageSize=getImageSize($(fullscreenImageSelector)[0]);parentWidth=e.data.$image.parent().width();parentHeight=e.data.$image.parent().height();isImageSmall=parentWidth>=imageSize.rw&&parentHeight>=imageSize.rh;isImageFit=parentWidth>e.data.$image.width()&&parentHeight>e.data.$image.height();toggleZoomButtons(e.data.$image,isTouchEnabled,checkForVideo(e.data.fotorama.activeFrame.$stageFrame));calculateMinSize(e.data.$image);if(e.data.$image.hasClass(imageZoommable)&&!allowZoomOut||isImageSmall||isImageFit){resetVars(e.data.$image);}\nif(!isImageSmall){toggleStandartNavigation();}}\nfunction getTopValue($image,topProp,step,height,containerHeight){var top;if(parseInt($image.css('marginTop'))||parseInt($image.css('marginLeft'))){top=dragFlag?topProp-step / 4:0;top=top<containerHeight-height?containerHeight-height:top;top=top>height-containerHeight?height-containerHeight:top;}else{top=topProp+step / 2;top=top<containerHeight-height?containerHeight-height:top;top=top>0?0:top;if(!dragFlag&&step<0){top=top<(containerHeight-height)/ 2?(containerHeight-height)/ 2:top;}}\nreturn top;}\nfunction getLeftValue(leftProp,step,width,containerWidth){var left;left=leftProp+step / 2;left=left<containerWidth-width?containerWidth-width:left;left=left>0?0:left;if(!dragFlag&&step<0){left=left<(containerWidth-width)/ 2?(containerWidth-width)/ 2:left;}\nreturn left;}\nfunction checkFullscreenImagePosition($image,dimensions,widthStep,heightStep){var $imageContainer,containerWidth,containerHeight,settings,top,left,right,ratio;if($(gallerySelector).data('fotorama').fullScreen){transitionActive=true;$imageContainer=$image.parent();containerWidth=$imageContainer.width();containerHeight=$imageContainer.height();top=$image.position().top;left=$image.position().left;ratio=$image.width()/ $image.height();dimensions.height=isNaN(dimensions.height)?dimensions.width / ratio:dimensions.height;dimensions.width=isNaN(dimensions.width)?dimensions.height*ratio:dimensions.width;top=dimensions.height>=containerHeight?getTopValue($image,top,heightStep,dimensions.height,containerHeight):0;left=dimensions.width>=containerWidth?getLeftValue(left,widthStep,dimensions.width,containerWidth):0;right=dragFlag&&left<(containerWidth-dimensions.width)/ 2?0:left;settings=$.extend(dimensions,{top:top,left:left,right:right});$image.css(settings);}}\nfunction toggleStandartNavigation(){var $selectable=$('a[href], area[href], input, select, textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]').not('[tabindex=-1], [disabled], :hidden'),fotorama=$(gallerySelector).data('fotorama'),$focus=$(':focus'),index;if(fotorama.fullScreen){$selectable.each(function(number){if($(this).is($focus)){index=number;}});fotorama.setOptions({swipe:!allowZoomOut,keyboard:!allowZoomOut});if(_.isNumber(index)){$selectable.eq(index).trigger('focus');}}}\nfunction zoomIn(e,xStep,yStep){var $image,imgOriginalSize,imageWidth,imageHeight,zoomWidthStep,zoomHeightStep,widthResult,heightResult,ratio,dimensions={};if(allowZoomIn&&(!transitionEnabled||!transitionActive)&&(isTouchEnabled||!$(zoomInButtonSelector).hasClass(zoomInDisabled))){$image=$(fullscreenImageSelector);imgOriginalSize=getImageSize($image[0]);imageWidth=$image.width();imageHeight=$image.height();ratio=imageWidth / imageHeight;allowZoomOut=true;toggleStandartNavigation();if(!$image.hasClass(imageZoommable)){toggleZoomable($image,true);}\ne.preventDefault();if(imageWidth>=imageHeight){zoomWidthStep=xStep||Math.ceil(imageWidth*parseFloat(config.magnifierOpts.fullscreenzoom)/ 100);widthResult=imageWidth+zoomWidthStep;if(widthResult>=imgOriginalSize.rw){widthResult=imgOriginalSize.rw;zoomWidthStep=xStep||widthResult-imageWidth;allowZoomIn=false;}\nheightResult=widthResult / ratio;zoomHeightStep=yStep||heightResult-imageHeight;}
2else{zoomHeightStep=yStep||Math.ceil(imageHeight*parseFloat(config.magnifierOpts.fullscreenzoom)/ 100);heightResult=imageHeight+zoomHeightStep;if(heightResult>=imgOriginalSize.rh){heightResult=imgOriginalSize.rh;zoomHeightStep=yStep||heightResult-imageHeight;allowZoomIn=false;}\nwidthResult=heightResult*ratio;zoomWidthStep=xStep||widthResult-imageWidth;}\nif(imageWidth>=imageHeight&&imageWidth!==imgOriginalSize.rw){dimensions=$.extend(dimensions,{width:widthResult,height:'auto'});checkFullscreenImagePosition($image,dimensions,-zoomWidthStep,-zoomHeightStep);}else if(imageWidth<imageHeight&&imageHeight!==imgOriginalSize.rh){dimensions=$.extend(dimensions,{width:'auto',height:heightResult});checkFullscreenImagePosition($image,dimensions,-zoomWidthStep,-zoomHeightStep);}}\nreturn false;}\nfunction zoomOut(e,xStep,yStep){var $image,widthResult,heightResult,dimensions,parentWidth,parentHeight,imageWidth,imageHeight,zoomWidthStep,zoomHeightStep,ratio,fitIntoParent;if(allowZoomOut&&(!transitionEnabled||!transitionActive)&&(isTouchEnabled||!$(zoomOutButtonSelector).hasClass(zoomOutDisabled))){allowZoomIn=true;$image=$(fullscreenImageSelector);parentWidth=$image.parent().width();parentHeight=$image.parent().height();imageWidth=$image.width();imageHeight=$image.height();ratio=imageWidth / imageHeight;e.preventDefault();if(imageWidth>=imageHeight){zoomWidthStep=xStep||Math.ceil(imageWidth*parseFloat(config.magnifierOpts.fullscreenzoom)/ 100);widthResult=imageWidth-zoomWidthStep;heightResult=widthResult / ratio;zoomHeightStep=yStep||imageHeight-heightResult;}else{zoomHeightStep=yStep||Math.ceil(imageHeight*parseFloat(config.magnifierOpts.fullscreenzoom)/ 100);heightResult=imageHeight-zoomHeightStep;widthResult=heightResult*ratio;zoomWidthStep=xStep||imageWidth-widthResult;}\nfitIntoParent=function(){if(ratio>parentWidth / parentHeight){widthResult=parentWidth;zoomWidthStep=imageWidth-widthResult;heightResult=widthResult / ratio;zoomHeightStep=imageHeight-heightResult;dimensions={width:widthResult,height:'auto'};}else{heightResult=parentHeight;zoomHeightStep=imageHeight-heightResult;widthResult=heightResult*ratio;zoomWidthStep=imageWidth-widthResult;dimensions={width:'auto',height:heightResult};}\ncheckFullscreenImagePosition($image,dimensions,zoomWidthStep,zoomHeightStep);};if(imageWidth>=imageHeight){if(widthResult>parentWidth){dimensions={width:widthResult,height:'auto'};checkFullscreenImagePosition($image,dimensions,zoomWidthStep,zoomHeightStep);}else if(heightResult>parentHeight){dimensions={width:widthResult,height:'auto'};checkFullscreenImagePosition($image,dimensions,zoomWidthStep,zoomHeightStep);}else{toggleStandartNavigation();fitIntoParent();}}else if(heightResult>parentHeight){dimensions={width:'auto',height:heightResult};checkFullscreenImagePosition($image,dimensions,zoomWidthStep,zoomHeightStep);}else if(widthResult>parentWidth){dimensions={width:'auto',height:heightResult};checkFullscreenImagePosition($image,dimensions,zoomWidthStep,zoomHeightStep);}else{allowZoomOut=dragFlag=false;toggleStandartNavigation();fitIntoParent();}}\nreturn false;}\nfunction mousewheel(e,fotorama,element){var $fotoramaStage=fotorama.activeFrame.$stageFrame,fotoramaStage=$fotoramaStage.get(0);function onWheel(e){var delta=e.deltaY||e.wheelDelta,ev=e||window.event;if($(gallerySelector).data('fotorama').fullScreen){if(e.deltaY){if(delta>0){zoomOut(ev);}else{zoomIn(ev);}}else if(delta>0){zoomIn(ev);}else{zoomOut(ev);}\ne.preventDefault?e.preventDefault():e.returnValue=false;}}\nif(!$fotoramaStage.hasClass('magnify-wheel-loaded')){if(fotoramaStage&&fotoramaStage.addEventListener){if('onwheel'in document){fotoramaStage.addEventListener('wheel',onWheel,{passive:false});}else if('onmousewheel'in document){fotoramaStage.addEventListener('mousewheel',onWheel);}else{fotoramaStage.addEventListener('MozMousePixelScroll',onWheel);}\n$fotoramaStage.addClass('magnify-wheel-loaded');}}}\nfunction magnifierFullscreen(fotorama){var isDragActive=false,startX,startY,imagePosX,imagePosY,touch,swipeSlide,$gallery=$(gallerySelector),$image=$(fullscreenImageSelector,$gallery),$imageContainer=$('[data-gallery-role=\"stage-shaft\"] [data-active=\"true\"]'),gallery=$gallery.data('fotorama'),evCache=[],prevDiff=-1,preventAction=false;swipeSlide=_.throttle(function(direction){$(gallerySelector).data('fotorama').show(direction);},500,{trailing:false});function getTop($el){return parseInt($el.get(0).style.top);}\nfunction shiftImage(dx,dy,e){var top=+imagePosY+dy,left=+imagePosX+dx,swipeCondition=$image.width()/ 10+20;dragFlag=true;if($image.offset().left===$imageContainer.offset().left+$imageContainer.width()-$image.width()&&e.keyCode===39||endX-1<$imageContainer.offset().left+$imageContainer.width()-$image.width()&&dx<0&&_.isNumber(endX)&&(e.type==='mousemove'||e.type==='touchmove'||e.type==='pointermove'||e.type==='MSPointerMove')){endX=null;swipeSlide('>');return;}\nif($image.offset().left===$imageContainer.offset().left&&dx!==0&&e.keyCode===37||endX===$imageContainer.offset().left&&dx>0&&(e.type==='mousemove'||e.type==='touchmove'||e.type==='pointermove'||e.type==='MSPointerMove')){endX=null;swipeSlide('<');return;}\nif($image.height()>$imageContainer.height()){if($imageContainer.height()>$image.height()+top){$image.css('top',$imageContainer.height()-$image.height());}else{top=$image.height()-getTop($image)-$imageContainer.height();dy=dy<top?dy:top;$image.css('top',getTop($image)+dy);}}\nif($image.width()>$imageContainer.width()){if($imageContainer.offset().left+$imageContainer.width()>left+$image.width()){left=$imageContainer.offset().left+$imageContainer.width()-$image.width();}else{left=$imageContainer.offset().left<left?$imageContainer.offset().left:left;}\n$image.offset({'left':left});$image.css('right','');}else if(Math.abs(dy)<1&&allowZoomOut&&!(e.type==='mousemove'||e.type==='touchmove'||e.type==='pointermove'||e.type==='MSPointerMove')){dx<0?$(gallerySelector).data('fotorama').show('>'):$(gallerySelector).data('fotorama').show('<');}\nif($image.width()<=$imageContainer.width()&&allowZoomOut&&(e.type==='mousemove'||e.type==='touchmove'||e.type==='pointermove'||e.type==='MSPointerMove')&&Math.abs(dx)>Math.abs(dy)&&Math.abs(dx)>swipeCondition){dx<0?swipeSlide('>'):swipeSlide('<');}}\nfunction pointerDownHandler(ev){evCache.push(ev);}\nfunction pointerMoveHandler(ev){let timeout;for(let i=0;i<evCache.length;i++){if(ev.pointerId===evCache[i].pointerId){evCache[i]=ev;break;}}\nif(evCache.length===2){let curDiff=Math.sqrt(Math.pow(evCache[1].clientX-evCache[0].clientX,2)+\nMath.pow(evCache[1].clientY-evCache[0].clientY,2));if(prevDiff>0){if(curDiff-prevDiff>0.2&&allowZoomIn){preventAction=true;zoomIn(ev,curDiff,curDiff);timeout=setTimeout(()=>{clearTimeout(timeout);preventAction=false;},500);}\nif(curDiff-prevDiff<-0.2&&allowZoomOut){preventAction=true;zoomOut(ev,curDiff,curDiff);timeout=setTimeout(()=>{clearTimeout(timeout);preventAction=false;},500);}}\nprevDiff=curDiff;}}\nfunction pointerUpHandler(ev){removeEvent(ev);
2if(evCache.length<2){prevDiff=-1;}}\nfunction removeEvent(ev){for(let i=0;i<evCache.length;i++){if(evCache[i].pointerId===ev.pointerId){evCache.splice(i,1);break;}}}\nfunction dblClickHandler(e){if($image.length===0){$image=$(fullscreenImageSelector,$gallery);}\nvar imgOriginalSize=getImageSize($image[0]),proportions;if(imgOriginalSize.rh<$image.parent().height()&&imgOriginalSize.rw<$image.parent().width()){return;}\nproportions=imgOriginalSize.rw / imgOriginalSize.rh;if(allowZoomIn){zoomIn(e,imgOriginalSize.rw-$image.width(),imgOriginalSize.rh-$image.height());}else if(allowZoomOut){zoomOut(e,imgOriginalSize.rw*proportions,imgOriginalSize.rh-$imageContainer.height());}}\nfunction detectDoubleTap(){let lastTap=0;let tapTimeout,zoomTimeout;return function doubleTap(event){const curTime=new Date().getTime();const tapLen=curTime-lastTap;transitionActive=false;if(tapLen<300&&tapLen>50&&!preventAction){event.preventDefault();preventAction=true;dblClickHandler(event);zoomTimeout=setTimeout(()=>{preventAction=false;clearTimeout(zoomTimeout);},500);prevDiff=-1;}else{tapTimeout=setTimeout(()=>{clearTimeout(tapTimeout);},500);}\nlastTap=curTime;};}\nif(isTouchEnabled){$image.off('pointerdown');$image.on('pointerdown',pointerDownHandler);$image.off('pointermove');$image.on('pointermove',pointerMoveHandler);$image.off('pointerup');$image.on('pointerup',pointerUpHandler);$image.off('pointercancel');$image.on('pointercancel',pointerUpHandler);$image.off('pointerout');$image.on('pointerout',pointerUpHandler);$image.off('pointerleave');$image.on('pointerleave',pointerUpHandler);$image.off('touchend');$image.on('touchend',detectDoubleTap());$image.off('touchcancel');$image.on('touchcancel',()=>{transitionActive=false});}else{$image.off('dblclick');$image.on('dblclick',dblClickHandler);}\nif(gallery.fullScreen){toggleZoomButtons($image,isTouchEnabled,checkForVideo(fotorama.activeFrame.$stageFrame));}\n$image.off(isTouchEnabled?'touchstart':'pointerdown mousedown MSPointerDown');$image.on(isTouchEnabled?'touchstart':'pointerdown mousedown MSPointerDown',function(e){if(e&&e.originalEvent.touches&&e.originalEvent.touches.length>=2){e.preventDefault();isDragActive=false;if($image.hasClass(imageDraggableClass)){$image.removeClass(imageDraggableClass);}}else if(gallery.fullScreen&&(!transitionEnabled||!transitionActive)){imagePosY=getTop($image);imagePosX=$image.offset().left;if(isTouchEnabled){touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];e.clientX=touch.pageX;e.clientY=touch.pageY;}\nstartX=e.clientX||e.originalEvent.clientX;startY=e.clientY||e.originalEvent.clientY;isDragActive=true;}\nif($image.offset()&&$image.width()>$imageContainer.width()){endX=$image.offset().left;}});$image.off(isTouchEnabled?'touchmove':'mousemove pointermove MSPointerMove');$image.on(isTouchEnabled?'touchmove':'mousemove pointermove MSPointerMove',function(e){if(e&&e.originalEvent.touches&&e.originalEvent.touches.length>=2){e.preventDefault();if($image.hasClass(imageDraggableClass)){$image.removeClass(imageDraggableClass);}}else{var clientX,clientY;if(gallery.fullScreen&&isDragActive&&(!transitionEnabled||!transitionActive)){if(allowZoomOut&&!$image.hasClass(imageDraggableClass)){$image.addClass(imageDraggableClass);}\nclientX=e.clientX||e.originalEvent.clientX;clientY=e.clientY||e.originalEvent.clientY;e.preventDefault();if(isTouchEnabled){touch=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];clientX=touch.pageX;clientY=touch.pageY;}\nif(allowZoomOut){imagePosY=getTop($(fullscreenImageSelector,$gallery));shiftImage(clientX-startX,clientY-startY,e);}}}});$image.off('transitionend webkitTransitionEnd mozTransitionEnd msTransitionEnd ');$image.on('transitionend webkitTransitionEnd mozTransitionEnd msTransitionEnd',function(){transitionActive=false;});if(keyboardNavigation){$(document).off('keydown',keyboardNavigation);}\nkeyboardNavigation=function(e){var step=40,$focus=$(':focus'),isFullScreen=$(gallerySelector).data('fotorama').fullScreen,initVars=function(){imagePosX=$(fullscreenImageSelector,$gallery).offset().left;imagePosY=getTop($(fullscreenImageSelector,$gallery));};if(($focus.attr('data-gallery-role')||!$focus.length)&&allowZoomOut){if(isFullScreen){imagePosX=$(fullscreenImageSelector,$(gallerySelector)).offset().left;imagePosY=getTop($(fullscreenImageSelector,$(gallerySelector)));}
2\nif(e.keyCode===39){if(isFullScreen){initVars();shiftImage(-step,0,e);}}\nif(e.keyCode===38){if(isFullScreen){initVars();shiftImage(0,step,e);}}\nif(e.keyCode===37){if(isFullScreen){initVars();shiftImage(step,0,e);}}\nif(e.keyCode===40){if(isFullScreen){e.preventDefault();initVars();shiftImage(0,-step,e);}}}\nif(e.keyCode===27&&isFullScreen&&allowZoomOut){$(gallerySelector).data('fotorama').cancelFullScreen();}};$(document).on('keydown',keyboardNavigation);$(document).on(isTouchEnabled?'touchend':'mouseup pointerup MSPointerUp',function(e){if(gallery.fullScreen){if($image.offset()&&$image.width()>$imageContainer.width()){endX=$image.offset().left;}\nisDragActive=false;$image.removeClass(imageDraggableClass);}});$(window).off('resize',resizeHandler);$(window).on('resize',{$image:$image,fotorama:fotorama},resizeHandler);}\nhideMagnifier=function(){$(magnifierSelector).empty().hide();$(magnifierZoomSelector).remove();};function checkForVideo($stageFrame){return $stageFrame.hasClass(videoContainerClass);}\nfunction behaveOnDrag(e,initPos){var pos=[e.pageX,e.pageY],isArrow=$(e.target).data('gallery-role')==='arrow',isClick=initPos[0]===pos[0]&&initPos[1]===pos[1],isImg=$(e.target).parent().data('active');if(isArrow||isImg&&!isClick){hideMagnifier();}}\nif(config.magnifierOpts.enabled){$(element).on('pointerdown mousedown MSPointerDown',function(e){var pos=[e.pageX,e.pageY];$(element).on('mousemove pointermove MSPointerMove',function(ev){navigator.msPointerEnabled?hideMagnifier():behaveOnDrag(ev,pos);});$(document).on('mouseup pointerup MSPointerUp',function(){$(element).off('mousemove pointermove MSPointerMove');});});}\n$.extend(config.magnifierOpts,{zoomable:false,thumb:'.fotorama__img',largeWrapper:'[data-gallery-role=\"magnifier\"]',height:config.magnifierOpts.height||function(){return $('[data-active=\"true\"]').height();},width:config.magnifierOpts.width||function(){var productMedia=$(gallerySelector).parent().parent();return productMedia.parent().width()-productMedia.width()-20;},left:config.magnifierOpts.left||function(){return $(gallerySelector).offset().left+$(gallerySelector).width()+20;},top:config.magnifierOpts.top||function(){return $(gallerySelector).offset().top;}});$(element).on('fotorama:load fotorama:showend fotorama:fullscreenexit fotorama:ready',function(e,fotorama){var $activeStageFrame=$(gallerySelector).data('fotorama').activeFrame.$stageFrame;if(!$activeStageFrame.find(magnifierZoomSelector).length){hideMagnifier();if(config.magnifierOpts){config.magnifierOpts.large=$(gallerySelector).data('fotorama').activeFrame.img;config.magnifierOpts.full=fotorama.data[fotorama.activeIndex].original;!checkForVideo($activeStageFrame)&&$($activeStageFrame).magnify(config.magnifierOpts);}}});$(element).on('gallery:loaded',function(e){var $prevImage;$(element).find(gallerySelector).on('fotorama:ready',function(e,fotorama){var $zoomIn=$(zoomInButtonSelector),$zoomOut=$(zoomOutButtonSelector);if(!$zoomIn.hasClass(zoomInLoaded)){$zoomIn.on('click touchstart',zoomIn);$zoomIn.on('mousedown',function(e){e.stopPropagation();});$zoomIn.on('keyup',function(e){if(e.keyCode===13){zoomIn(e);}});$(window).on('keyup',function(e){if(e.keyCode===107||fotorama.fullscreen){zoomIn(e);}});$zoomIn.addClass(zoomInLoaded);}\nif(!$zoomOut.hasClass(zoomOutLoaded)){$zoomOut.on('click touchstart',zoomOut);$zoomOut.on('mousedown',function(e){e.stopPropagation();});$zoomOut.on('keyup',function(e){if(e.keyCode===13){zoomOut(e);}});$(window).on('keyup',function(e){if(e.keyCode===109||fotorama.fullscreen){zoomOut(e);}});$zoomOut.addClass(zoomOutLoaded);}}).on('fotorama:fullscreenenter fotorama:showend',function(e,fotorama){hideMagnifier();if(!$(fullscreenImageSelector).is($prevImage)){resetVars($(fullscreenImageSelector));}\nmagnifierFullscreen(fotorama);mousewheel(e,fotorama,element);if($prevImage){calculateMinSize($prevImage);if(!$(fullscreenImageSelector).is($prevImage)){resetVars($prevImage);}}\ntoggleStandartNavigation();}).on('fotorama:load',function(e,fotorama){if($(gallerySelector).data('fotorama').fullScreen){toggleZoomButtons($(fullscreenImageSelector),isTouchEnabled,checkForVideo(fotorama.activeFrame.$stageFrame));}\nmagnifierFullscreen(fotorama);}).on('fotorama:show',function(e,fotorama){$prevImage=_.clone($(fullscreenImageSelector));hideMagnifier();}).on('fotorama:fullscreenexit',function(e,fotorama){resetVars($(fullscreenImageSelector));hideMagnifier();hideZoomControls(true);});});return config;};});","requirejs/domReady.min.js":"define(function(){'use strict';var isTop,testDiv,scrollIntervalId,isBrowser=typeof window!==\"undefined\"&&window.document,isPageLoaded=!isBrowser,doc=isBrowser?document:null,readyCalls=[];function runCallbacks(callbacks){var i;for(i=0;i<callbacks.length;i+=1){callbacks[i](doc);}}\nfunction callReady(){var callbacks=readyCalls;if(isPageLoaded){if(callbacks.length){readyCalls=[];runCallbacks(callbacks);}}}\nfunction pageLoaded(){if(!isPageLoaded){isPageLoaded=true;if(scrollIntervalId){clearInterval(scrollIntervalId);}\ncallReady();}}\nif(isBrowser){if(document.addEventListener){document.addEventListener(\"DOMContentLoaded\",pageLoaded,false);window.addEventListener(\"load\",pageLoaded,false);}else if(window.attachEvent){window.attachEvent(\"onload\",pageLoaded);testDiv=document.createElement('div');try{isTop=window.frameElement===null;}catch(e){}\nif(testDiv.doScroll&&isTop&&window.external){scrollIntervalId=setInterval(function(){try{testDiv.doScroll();pageLoaded();}catch(e){}},30);}}
2\nif(document.readyState!==\"loading\"){setTimeout(pageLoaded);}}\nfunction domReady(callback){if(isPageLoaded){callback(doc);}else{readyCalls.push(callback);}\nreturn domReady;}\ndomReady.version='2.0.1';domReady.load=function(name,req,onLoad,config){if(config.isBuild){onLoad(null);}else{domReady(onLoad);}};return domReady;});","vimeo/player.min.js":"/*! @vimeo/player v2.16.4 | (c) 2022 Vimeo | MIT License | https://github.com/vimeo/player.js */\n!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):((e=\"undefined\"!=typeof globalThis?globalThis:e||self).Vimeo=e.Vimeo||{},e.Vimeo.Player=t())}(this,function(){\"use strict\";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e=\"undefined\"!=typeof global&&\"[object global]\"==={}.toString.call(global);function i(e,t){return 0===e.indexOf(t.toLowerCase())?e:\"\".concat(t.toLowerCase()).concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}function l(e){return/^(https?:)?\\/\\/((player|www)\\.)?vimeo\\.com(?=$|\\/)/.test(e)}function u(e){var t=0<arguments.length&&void 0!==e?e:{},n=t.id,e=t.url,t=n||e;if(!t)throw new Error(\"An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.\");if(e=t,!isNaN(parseFloat(e))&&isFinite(e)&&Math.floor(e)==e)return\"https://vimeo.com/\".concat(t);if(l(t))return t.replace(\"http:\",\"https:\");if(n)throw new TypeError(\"\u201c\".concat(n,\"\u201d is not a valid video id.\"));throw new TypeError(\"\u201c\".concat(t,\"\u201d is not a vimeo.com url.\"))}var t=void 0!==Array.prototype.indexOf,Player=\"undefined\"!=typeof window&&void 0!==window.postMessage;if(!(e||t&&Player))throw new Error(\"Sorry, the Vimeo Player API is not available in this browser.\");var n,o,a=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function c(){if(void 0===this)throw new TypeError(\"Constructor WeakMap requires 'new'\");if(o(this,\"_id\",\"_WeakMap_\"+f()+\".\"+f()),0<arguments.length)throw new TypeError(\"WeakMap iterable is not supported\")}function s(e,t){if(!d(e)||!n.call(e,\"_id\"))throw new TypeError(t+\" method called on incompatible receiver \"+typeof e)}function f(){return Math.random().toString().substring(2)}function d(e){return Object(e)===e}(Player=\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:a).WeakMap||(n=Object.prototype.hasOwnProperty,Player.WeakMap=((o=function(e,t,n){Object.defineProperty?Object.defineProperty(e,t,{configurable:!0,writable:!0,value:n}):e[t]=n})(c.prototype,\"delete\",function(e){if(s(this,\"delete\"),!d(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)&&(delete e[this._id],!0)}),o(c.prototype,\"get\",function(e){if(s(this,\"get\"),d(e)){var t=e[this._id];return t&&t[0]===e?t[1]:void 0}}),o(c.prototype,\"has\",function(e){if(s(this,\"has\"),!d(e))return!1;var t=e[this._id];return!(!t||t[0]!==e)}),o(c.prototype,\"set\",function(e,t){if(s(this,\"set\"),!d(e))throw new TypeError(\"Invalid value used as weak map key\");var n=e[this._id];return n&&n[0]===e?n[1]=t:o(e,this._id,[e,t]),this}),o(c,\"_polyfill\",!0),c));var h,m=(function(e){var t,n,r;r=function(){var t,n,r,o,i,e=Object.prototype.toString,a=\"undefined\"!=typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},\"x\",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function u(e,t){this.fn=e,this.self=t,this.next=void 0}function l(e,t){y.add(e,t),n=n||a(y.drain)}function c(e){var t,n=typeof e;return\"function\"==typeof(t=null!=e&&(\"object\"==n||\"function\"==n)?e.then:t)&&t}function s(){for(var e=0;e<this.chain.length;e++)!function(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError(\"Promise-chain cycle\")):(o=c(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function f(e){var n,r=this;if(!r.triggered){r.triggered=!0,r.def&&(r=r.def);try{(n=c(e))?l(function(){var t=new m(r);try{n.call(e,function(){f.apply(t,arguments)},function(){d.apply(t,arguments)})}catch(e){d.call(t,e)}}):(r.msg=e,r.state=1,0<r.chain.length&&l(s,r))}catch(e){d.call(new m(r),e)}}}function d(e){var t=this;t.triggered||(t.triggered=!0,(t=t.def?t.def:t).msg=e,t.state=2,0<t.chain.length&&l(s,t))}function h(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function m(e){this.def=e,this.triggered=!1}function v(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(e){if(\"function\"!=typeof e)throw TypeError(\"Not a function\");if(0!==this.__NPO__)throw TypeError(\"Not a promise\");this.__NPO__=1;var r=new v(this);this.then=function(e,t){var n={success:\"function\"!=typeof e||e,failure:\"function\"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if(\"function\"!=typeof e||\"function\"!=typeof t)throw TypeError(\"Not a function\");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&l(s,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){f.call(r,e)},function(e){d.call(r,e)})}catch(e){d.call(r,e)}}var y={add:function(e,t){i=new u(e,t),o?o.next=i:r=i,o=i,i=void 0},drain:function(){var e=r;
2for(r=o=n=void 0;e;)e.fn.call(e.self),e=e.next}},g=t({},\"constructor\",p,!1);return t(p.prototype=g,\"__NPO__\",0,!1),t(p,\"resolve\",function(n){return n&&\"object\"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if(\"function\"!=typeof e||\"function\"!=typeof t)throw TypeError(\"Not a function\");e(n)})}),t(p,\"reject\",function(n){return new this(function(e,t){if(\"function\"!=typeof e||\"function\"!=typeof t)throw TypeError(\"Not a function\");t(n)})}),t(p,\"all\",function(t){var a=this;return\"[object Array]\"!=e.call(t)?a.reject(TypeError(\"Not an array\")):0===t.length?a.resolve([]):new a(function(n,e){if(\"function\"!=typeof n||\"function\"!=typeof e)throw TypeError(\"Not a function\");var r=t.length,o=Array(r),i=0;h(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(p,\"race\",function(t){var r=this;return\"[object Array]\"!=e.call(t)?r.reject(TypeError(\"Not an array\")):new r(function(n,e){if(\"function\"!=typeof n||\"function\"!=typeof e)throw TypeError(\"Not a function\");h(r,t,function(e,t){n(t)},e)})}),p},(n=a)[t=\"Promise\"]=n[t]||r(),e.exports&&(e.exports=n[t])}(h={exports:{}}),h.exports),v=new WeakMap;function p(e,t,n){var r=v.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),v.set(e.element,r)}function y(e,t){return(v.get(e.element)||{})[t]||[]}function g(e,t,n){var r=v.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],v.set(e.element,r),!0;n=r[t].indexOf(n);return-1!==n&&r[t].splice(n,1),v.set(e.element,r),r[t]&&0===r[t].length}var w=[\"autopause\",\"autoplay\",\"background\",\"byline\",\"color\",\"controls\",\"dnt\",\"height\",\"id\",\"interactive_params\",\"keyboard\",\"loop\",\"maxheight\",\"maxwidth\",\"muted\",\"playsinline\",\"portrait\",\"responsive\",\"speed\",\"texttrack\",\"title\",\"transparent\",\"url\",\"width\"];function b(r,e){return w.reduce(function(e,t){var n=r.getAttribute(\"data-vimeo-\".concat(t));return!n&&\"\"!==n||(e[t]=\"\"===n?1:n),e},1<arguments.length&&void 0!==e?e:{})}function k(e,t){var n=e.html;if(!t)throw new TypeError(\"An element must be provided\");if(null!==t.getAttribute(\"data-vimeo-initialized\"))return t.querySelector(\"iframe\");e=document.createElement(\"div\");return e.innerHTML=n,t.appendChild(e.firstChild),t.setAttribute(\"data-vimeo-initialized\",\"true\"),t.querySelector(\"iframe\")}function E(i,e,t){var a=1<arguments.length&&void 0!==e?e:{},u=2<arguments.length?t:void 0;return new Promise(function(t,n){if(!l(i))throw new TypeError(\"\u201c\".concat(i,\"\u201d is not a vimeo.com url.\"));var e,r=\"https://vimeo.com/api/oembed.json?url=\".concat(encodeURIComponent(i));for(e in a)a.hasOwnProperty(e)&&(r+=\"&\".concat(e,\"=\").concat(encodeURIComponent(a[e])));var o=new(\"XDomainRequest\"in window?XDomainRequest:XMLHttpRequest);o.open(\"GET\",r,!0),o.onload=function(){if(404!==o.status)if(403!==o.status)try{var e=JSON.parse(o.responseText);if(403===e.domain_status_code)return k(e,u),void n(new Error(\"\u201c\".concat(i,\"\u201d is not embeddable.\")));t(e)}catch(e){n(e)}else n(new Error(\"\u201c\".concat(i,\"\u201d is not embeddable.\")));else n(new Error(\"\u201c\".concat(i,\"\u201d was not found.\")))},o.onerror=function(){var e=o.status?\" (\".concat(o.status,\")\"):\"\";n(new Error(\"There was an error fetching the embed code from Vimeo\".concat(e,\".\")))},o.send()})}function T(e){function n(e){\"console\"in window&&console.error&&console.error(\"There was an error creating an embed: \".concat(e))}e=0<arguments.length&&void 0!==e?e:document,e=[].slice.call(e.querySelectorAll(\"[data-vimeo-id], [data-vimeo-url]\"));e.forEach(function(t){try{if(null!==t.getAttribute(\"data-vimeo-defer\"))return;var e=b(t);E(u(e),e,t).then(function(e){return k(e,t)}).catch(n)}catch(e){n(e)}})}function P(e){if(\"string\"==typeof e)try{e=JSON.parse(e)}catch(e){return console.warn(e),{}}return e}function _(e,t,n){e.element.contentWindow&&e.element.contentWindow.postMessage&&(t={method:t},void 0!==n&&(t.value=n),8<=(n=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/,\"$1\")))&&n<10&&(t=JSON.stringify(t)),e.element.contentWindow.postMessage(t,e.origin))}function M(n,r){var t,e,o,i,a=[];
2(r=P(r)).event?(\"error\"===r.event&&y(n,r.data.method).forEach(function(e){var t=new Error(r.data.message);t.name=r.data.name,e.reject(t),g(n,r.data.method,e)}),a=y(n,\"event:\".concat(r.event)),t=r.data):r.method&&(e=n,o=r.method,(i=!((i=y(e,o)).length<1)&&(i=i.shift(),g(e,o,i),i))&&(a.push(i),t=r.value)),a.forEach(function(e){try{if(\"function\"==typeof e)return void e.call(n,t);e.resolve(t)}catch(e){}})}var N,F,x,C=new WeakMap,j=new WeakMap,A={},Player=function(){function Player(i){var e,a=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,Player),window.jQuery&&i instanceof jQuery&&(1<i.length&&window.console&&console.warn&&console.warn(\"A jQuery object with multiple elements was passed, using the first element.\"),i=i[0]),\"undefined\"!=typeof document&&\"string\"==typeof i&&(i=document.getElementById(i)),e=i,!Boolean(e&&1===e.nodeType&&\"nodeName\"in e&&e.ownerDocument&&e.ownerDocument.defaultView))throw new TypeError(\"You must pass either a valid element or a valid id.\");if(\"IFRAME\"===i.nodeName||(r=i.querySelector(\"iframe\"))&&(i=r),\"IFRAME\"===i.nodeName&&!l(i.getAttribute(\"src\")||\"\"))throw new Error(\"The player element passed isn\u2019t a Vimeo embed.\");if(C.has(i))return C.get(i);this._window=i.ownerDocument.defaultView,this.element=i,this.origin=\"*\";var n,r=new m(function(r,o){var e;a._onMessage=function(e){if(l(e.origin)&&a.element.contentWindow===e.source){\"*\"===a.origin&&(a.origin=e.origin);var t=P(e.data);if(t&&\"error\"===t.event&&t.data&&\"ready\"===t.data.method){var n=new Error(t.data.message);return n.name=t.data.name,void o(n)}e=t&&\"ready\"===t.event,n=t&&\"ping\"===t.method;if(e||n)return a.element.setAttribute(\"data-ready\",\"true\"),void r();M(a,t)}},a._window.addEventListener(\"message\",a._onMessage),\"IFRAME\"!==a.element.nodeName&&E(u(e=b(i,t)),e,i).then(function(e){var t,n,r=k(e,i);return a.element=r,a._originalElement=i,t=i,n=r,r=v.get(t),v.set(n,r),v.delete(t),C.set(a.element,a),e}).catch(o)});return j.set(this,r),C.set(this.element,this),\"IFRAME\"===this.element.nodeName&&_(this,\"ping\"),A.isEnabled&&(n=function(){return A.exit()},this.fullscreenchangeHandler=function(){(A.isFullscreen?p:g)(a,\"event:exitFullscreen\",n),a.ready().then(function(){_(a,\"fullscreenchange\",A.isFullscreen)})},A.on(\"fullscreenchange\",this.fullscreenchangeHandler)),this}var e,t,n;return e=Player,(t=[{key:\"callMethod\",value:function(n){var r=this,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return new m(function(e,t){return r.ready().then(function(){p(r,n,{resolve:e,reject:t}),_(r,n,o)}).catch(t)})}},{key:\"get\",value:function(n){var r=this;return new m(function(e,t){return n=i(n,\"get\"),r.ready().then(function(){p(r,n,{resolve:e,reject:t}),_(r,n)}).catch(t)})}},{key:\"set\",value:function(n,r){var o=this;return new m(function(e,t){if(n=i(n,\"set\"),null==r)throw new TypeError(\"There must be a value to set.\");return o.ready().then(function(){p(o,n,{resolve:e,reject:t}),_(o,n,r)}).catch(t)})}},{key:\"on\",value:function(e,t){if(!e)throw new TypeError(\"You must pass an event name.\");if(!t)throw new TypeError(\"You must pass a callback function.\");if(\"function\"!=typeof t)throw new TypeError(\"The callback must be a function.\");0===y(this,\"event:\".concat(e)).length&&this.callMethod(\"addEventListener\",e).catch(function(){}),p(this,\"event:\".concat(e),t)}},{key:\"off\",value:function(e,t){if(!e)throw new TypeError(\"You must pass an event name.\");if(t&&\"function\"!=typeof t)throw new TypeError(\"The callback must be a function.\");g(this,\"event:\".concat(e),t)&&this.callMethod(\"removeEventListener\",e).catch(function(e){})}},{key:\"loadVideo\",value:function(e){return this.callMethod(\"loadVideo\",e)}},{key:\"ready\",value:function(){var e=j.get(this)||new m(function(e,t){t(new Error(\"Unknown player. Probably unloaded.\"))});return m.resolve(e)}},{key:\"addCuePoint\",value:function(e){return this.callMethod(\"addCuePoint\",{time:e,data:1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}})}},{key:\"removeCuePoint\",value:function(e){return this.callMethod(\"removeCuePoint\",e)}},{key:\"enableTextTrack\",value:function(e,t){if(!e)throw new TypeError(\"You must pass a language.\");return this.callMethod(\"enableTextTrack\",{language:e,kind:t})}},{key:\"disableTextTrack\",value:function(){return this.callMethod(\"disableTextTrack\")}},{key:\"pause\",value:function(){return this.callMethod(\"pause\")}},{key:\"play\",value:function(){return this.callMethod(\"play\")}},{key:\"requestFullscreen\",value:function(){return A.isEnabled?A.request(this.element):this.callMethod(\"requestFullscreen\")}},{key:\"exitFullscreen\",value:function(){return A.isEnabled?A.exit():this.callMethod(\"exitFullscreen\")}},{key:\"getFullscreen\",value:function(){return A.isEnabled?m.resolve(A.isFullscreen):this.get(\"fullscreen\")}},{key:\"requestPictureInPicture\",value:function(){return this.callMethod(\"requestPictureInPicture\")}},{key:\"exitPictureInPicture\",value:function(){return this.callMethod(\"exitPictureInPicture\")}},{key:\"getPictureInPicture\",value:function(){return this.get(\"pictureInPicture\")}},{key:\"unload\",value:function(){return this.callMethod(\"unload\")}},{key:\"destroy\",value:function(){var n=this;return new m(function(e){var t;j.delete(n),C.delete(n.element),n._originalElement&&(C.delete(n._originalElement),n._originalElement.removeAttribute(\"data-vimeo-initialized\")),n.element&&\"IFRAME\"===n.element.nodeName&&n.element.parentNode&&(n.element.parentNode.parentNode&&n._originalElement&&n._originalElement!==n.element.parentNode?n.element.parentNode.parentNode.removeChild(n.element.parentNode):n.element.parentNode.removeChild(n.element)),n.element&&\"DIV\"===n.element.nodeName&&n.element.parentNode&&(n.element.removeAttribute(\"data-vimeo-initialized\"),(t=n.element.querySelector(\"iframe\"))&&t.parentNode&&(t.parentNode.parentNode&&n._originalElement&&n._originalElement!==t.parentNode?t.parentNode.parentNode.removeChild(t.parentNode):t.parentNode.removeChild(t))),n._window.removeEventListener(\"message\",n._onMessage),A.isEnabled&&A.off(\"fullscreenchange\",n.fullscreenchangeHandler),e()})}},{key:\"getAutopause\",value:function(){return this.get(\"autopause\")}},{key:\"setAutopause\",value:function(e){return this.set(\"autopause\",e)}},{key:\"getBuffered\",value:function(){return this.get(\"buffered\")}},{key:\"getCameraProps\",value:function(){return this.get(\"cameraProps\")}},{key:\"setCameraProps\",value:function(e){return this.set(\"cameraProps\",e)}},{key:\"getChapters\",value:function(){return this.get(\"chapters\")}},{key:\"getCurrentChapter\",value:function(){return this.get(\"currentChapter\")}},{key:\"getColor\",value:function(){return this.get(\"color\")}},{key:\"setColor\",value:function(e){return this.set(\"color\",e)}},{key:\"getCuePoints\",value:function(){return this.get(\"cuePoints\")}},{key:\"getCurrentTime\",value:function(){return this.get(\"currentTime\")}},{key:\"setCurrentTime\",value:function(e){return this.set(\"currentTime\",e)}},{key:\"getDuration\",value:function(){return this.get(\"duration\")}},{key:\"getEnded\",value:function(){return this.get(\"ended\")}},{key:\"getLoop\",value:function(){return this.get(\"loop\")}},{key:\"setLoop\",value:function(e){return this.set(\"loop\",e)}},{key:\"setMuted\",value:function(e){return this.set(\"muted\",e)}},{key:\"getMuted\",value:function(){return this.get(\"muted\")}},{key:\"getPaused\",value:function(){return this.get(\"paused\")}},{key:\"getPlaybackRate\",value:function(){return this.get(\"playbackRate\")}},{key:\"setPlaybackRate\",value:function(e){return this.set(\"playbackRate\",e)}},{key:\"getPlayed\",value:function(){return this.get(\"played\")}},{key:\"getQualities\",value:function(){return this.get(\"qualities\")}},{key:\"getQuality\",value:function(){return this.get(\"quality\")}},{key:\"setQuality\",value:function(e){return this.set(\"quality\",e)}},{key:\"getSeekable\",value:function(){return this.get(\"seekable\")}},{key:\"getSeeking\",value:function(){return this.get(\"seeking\")}},{key:\"getTextTracks\",value:function(){return this.get(\"textTracks\")}},{key:\"getVideoEmbedCode\",value:function(){return this.get(\"videoEmbedCode\")}},{key:\"getVideoId\",value:function(){return this.get(\"videoId\")}},{key:\"getVideoTitle\",value:function(){return this.get(\"videoTitle\")}},{key:\"getVideoWidth\",value:function(){return this.get(\"videoWidth\")}},{key:\"getVideoHeight\",value:function(){return this.get(\"videoHeight\")}},{key:\"getVideoUrl\",value:function(){return this.get(\"videoUrl\")}},{key:\"getVolume\",value:function(){return this.get(\"volume\")}},{key:\"setVolume\",value:function(e){return this.set(\"volume\",e)}}])&&r(e.prototype,t),n&&r(e,n),Player}();return e||(N=function(){for(var e,t=[[\"requestFullscreen\",\"exitFullscreen\",\"fullscreenElement\",\"fullscreenEnabled\",\"fullscreenchange\",\"fullscreenerror\"],[\"webkitRequestFullscreen\",\"webkitExitFullscreen\",\"webkitFullscreenElement\",\"webkitFullscreenEnabled\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"webkitRequestFullScreen\",\"webkitCancelFullScreen\",\"webkitCurrentFullScreenElement\",\"webkitCancelFullScreen\",\"webkitfullscreenchange\",\"webkitfullscreenerror\"],[\"mozRequestFullScreen\",\"mozCancelFullScreen\",\"mozFullScreenElement\",\"mozFullScreenEnabled\",\"mozfullscreenchange\",\"mozfullscreenerror\"],[\"msRequestFullscreen\",\"msExitFullscreen\",\"msFullscreenElement\",\"msFullscreenEnabled\",\"MSFullscreenChange\",\"MSFullscreenError\"]],n=0,r=t.length,o={};n<r;n++)if((e=t[n])&&e[1]in document){for(n=0;n<e.length;n++)o[t[0][n]]=e[n];return o}return!1}(),F={fullscreenchange:N.fullscreenchange,fullscreenerror:N.fullscreenerror},x={request:function(o){return new Promise(function(e,t){function n(){x.off(\"fullscreenchange\",n),e()}
2x.on(\"fullscreenchange\",n);var r=(o=o||document.documentElement)[N.requestFullscreen]();r instanceof Promise&&r.then(n).catch(t)})},exit:function(){return new Promise(function(t,e){var n,r;x.isFullscreen?(n=function e(){x.off(\"fullscreenchange\",e),t()},x.on(\"fullscreenchange\",n),(r=document[N.exitFullscreen]())instanceof Promise&&r.then(n).catch(e)):t()})},on:function(e,t){e=F[e];e&&document.addEventListener(e,t)},off:function(e,t){e=F[e];e&&document.removeEventListener(e,t)}},Object.defineProperties(x,{isFullscreen:{get:function(){return Boolean(document[N.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[N.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[N.fullscreenEnabled])}}}),A=x,T(),function(e){var r=0<arguments.length&&void 0!==e?e:document;window.VimeoPlayerResizeEmbeds_||(window.VimeoPlayerResizeEmbeds_=!0,window.addEventListener(\"message\",function(e){if(l(e.origin)&&e.data&&\"spacechange\"===e.data.event)for(var t=r.querySelectorAll(\"iframe\"),n=0;n<t.length;n++)if(t[n].contentWindow===e.source){t[n].parentElement.style.paddingBottom=\"\".concat(e.data.data[0].bottom,\"px\");break}}))}()),Player});\n","vimeo/vimeo-wrapper.min.js":"define(['vimeo'],function(Player){'use strict';window.Vimeo=window.Vimeo||{'Player':Player};});","Magento_Catalog/js/price-box.min.js":"define(['jquery','Magento_Catalog/js/price-utils','underscore','mage/template','jquery-ui-modules/widget'],function($,utils,_,mageTemplate){'use strict';var globalOptions={productId:null,priceConfig:null,prices:{},priceTemplate:'<span class=\"price\"><%- data.formatted %></span>'};$.widget('mage.priceBox',{options:globalOptions,qtyInfo:'#qty',_init:function initPriceBox(){var box=this.element;box.trigger('updatePrice');this.cache.displayPrices=utils.deepClone(this.options.prices);},_create:function createPriceBox(){var box=this.element;this.cache={};this._setDefaultsFromPriceConfig();this._setDefaultsFromDataSet();box.on('reloadPrice',this.reloadPrice.bind(this));box.on('updatePrice',this.onUpdatePrice.bind(this));$(this.qtyInfo).on('input',this.updateProductTierPrice.bind(this));box.trigger('price-box-initialized');},onUpdatePrice:function onUpdatePrice(event,prices){return this.updatePrice(prices);},updatePrice:function updatePrice(newPrices){var prices=this.cache.displayPrices,additionalPrice={},pricesCode=[],priceValue,origin,finalPrice;this.cache.additionalPriceObject=this.cache.additionalPriceObject||{};if(newPrices){$.extend(this.cache.additionalPriceObject,newPrices);}\nif(!_.isEmpty(additionalPrice)){pricesCode=_.keys(additionalPrice);}else if(!_.isEmpty(prices)){pricesCode=_.keys(prices);}\n_.each(this.cache.additionalPriceObject,function(additional){if(additional&&!_.isEmpty(additional)){pricesCode=_.keys(additional);}\n_.each(pricesCode,function(priceCode){priceValue=additional[priceCode]||{};priceValue.amount=+priceValue.amount||0;priceValue.adjustments=priceValue.adjustments||{};additionalPrice[priceCode]=additionalPrice[priceCode]||{'amount':0,'adjustments':{}};additionalPrice[priceCode].amount=0+(additionalPrice[priceCode].amount||0)+\npriceValue.amount;_.each(priceValue.adjustments,function(adValue,adCode){additionalPrice[priceCode].adjustments[adCode]=0+\n(additionalPrice[priceCode].adjustments[adCode]||0)+adValue;});});});if(_.isEmpty(additionalPrice)){this.cache.displayPrices=utils.deepClone(this.options.prices);}else{_.each(additionalPrice,function(option,priceCode){origin=this.options.prices[priceCode]||{};finalPrice=prices[priceCode]||{};option.amount=option.amount||0;origin.amount=origin.amount||0;origin.adjustments=origin.adjustments||{};finalPrice.adjustments=finalPrice.adjustments||{};finalPrice.amount=0+origin.amount+option.amount;_.each(option.adjustments,function(pa,paCode){finalPrice.adjustments[paCode]=0+(origin.adjustments[paCode]||0)+pa;});},this);}\nthis.element.trigger('priceUpdated',this.cache.displayPrices);this.element.trigger('reloadPrice');},reloadPrice:function reDrawPrices(){var priceFormat=(this.options.priceConfig&&this.options.priceConfig.priceFormat)||{},priceTemplate=mageTemplate(this.options.priceTemplate);_.each(this.cache.displayPrices,function(price,priceCode){price.final=_.reduce(price.adjustments,function(memo,amount){return memo+amount;},price.amount);
2price.formatted=utils.formatPriceLocale(price.final,priceFormat);$('[data-price-type=\"'+priceCode+'\"]',this.element).html(priceTemplate({data:price}));},this);},setDefault:function setDefaultPrices(prices){this.cache.displayPrices=utils.deepClone(prices);this.options.prices=utils.deepClone(prices);},_setOptions:function setOptions(options){$.extend(true,this.options,options);if('disabled'in options){this._setOption('disabled',options.disabled);}\nreturn this;},_setDefaultsFromDataSet:function _setDefaultsFromDataSet(){var box=this.element,priceHolders=$('[data-price-type]',box),prices=this.options.prices;this.options.productId=box.data('productId');if(_.isEmpty(prices)){priceHolders.each(function(index,element){var type=$(element).data('priceType'),amount=parseFloat($(element).data('priceAmount'));if(type&&!_.isNaN(amount)){prices[type]={amount:amount};}});}},_setDefaultsFromPriceConfig:function _setDefaultsFromPriceConfig(){var config=this.options.priceConfig;if(config&&config.prices){this.options.prices=config.prices;}},updateProductTierPrice:function updateProductTierPrice(){var originalPrice,prices={'prices':{}};if(this.options.prices.finalPrice){originalPrice=this.options.prices.finalPrice.amount;prices.prices.finalPrice={'amount':this.getPrice('price')-originalPrice};}\nif(this.options.prices.basePrice){originalPrice=this.options.prices.basePrice.amount;prices.prices.basePrice={'amount':this.getPrice('basePrice')-originalPrice};}\nthis.updatePrice(prices);}
2,getPrice:function(priceKey){var productQty=$(this.qtyInfo).val(),result,tierPriceItem,i;for(i=0;i<this.options.priceConfig.tierPrices.length;i++){tierPriceItem=this.options.priceConfig.tierPrices[i];if(productQty>=tierPriceItem.qty&&tierPriceItem[priceKey]){result=tierPriceItem[priceKey];}}\nreturn result;}});return $.mage.priceBox;});","Magento_Catalog/js/price-option-date.min.js":"define(['jquery','priceUtils','priceOptions','jquery-ui-modules/widget'],function($,utils){'use strict';var globalOptions={fromSelector:'form',dropdownsSelector:'[data-role=calendar-dropdown]'},optionHandler={};optionHandler.optionHandlers={};function onCalendarDropdownChange(siblings){return function(element,optionConfig){var changes={},optionId=utils.findOptionId(element),overhead=optionConfig[optionId].prices,isNeedToUpdate=true,optionHash='price-option-calendar-'+optionId;siblings.each(function(index,el){isNeedToUpdate=isNeedToUpdate&&!!$(el).val();});overhead=isNeedToUpdate?overhead:{};changes[optionHash]=overhead;return changes;};}\nfunction getDaysInMonth(month,year){return new Date(year,month,0).getDate();}\nfunction onDateChange(dropdowns){var daysNodes,curMonth,curYear,expectedDays,options,needed,month=dropdowns.filter('[data-calendar-role=month]'),year=dropdowns.filter('[data-calendar-role=year]');if(month.length&&year.length){daysNodes=dropdowns.filter('[data-calendar-role=day]').find('option');curMonth=month.val()||'01';curYear=year.val()||'2000';expectedDays=getDaysInMonth(curMonth,curYear);if(daysNodes.length-1>expectedDays){daysNodes.each(function(i,e){if(e.value>expectedDays){$(e).remove();}});}else if(daysNodes.length-1<expectedDays){options=[];needed=expectedDays-daysNodes.length+1;while(needed--){options.push('<option value=\"'+(expectedDays-needed)+'\">'+(expectedDays-needed)+'</option>');}\n$(options.join('')).insertAfter(daysNodes.last());}}}\n$.widget('mage.priceOptionDate',{options:globalOptions,_create:function initOptionDate(){var field=this.element,form=field.closest(this.options.fromSelector),dropdowns=$(this.options.dropdownsSelector,field),dateOptionId;if(dropdowns.length){dateOptionId=this.options.dropdownsSelector+dropdowns.attr('name');optionHandler.optionHandlers[dateOptionId]=onCalendarDropdownChange(dropdowns);form.priceOptions(optionHandler);dropdowns.data('role',dateOptionId);dropdowns.on('change',onDateChange.bind(this,dropdowns));}}});return $.mage.priceOptionDate;});","Magento_Catalog/js/price-option-file.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.priceOptionFile',{options:{fileName:'',fileNamed:'',fieldNameAction:'',changeFileSelector:'',deleteFileSelector:''},_create:function(){this.fileDeleteFlag=this.fileChangeFlag=false;this.inputField=this.element.find('input[name='+this.options.fileName+']')[0];this.inputFieldAction=this.element.find('input[name='+this.options.fieldNameAction+']')[0];this.fileNameSpan=this.element.parent('dd').find('.'+this.options.fileNamed);$(this.options.changeFileSelector).on('click',$.proxy(function(){this._toggleFileChange();},this));$(this.options.deleteFileSelector).on('click',$.proxy(function(){this._toggleFileDelete();},this));},_toggleFileChange:function(){this.element.toggle();this.fileChangeFlag=!this.fileChangeFlag;if(!this.fileDeleteFlag){$(this.inputFieldAction).attr('value',this.fileChangeFlag?'save_new':'save_old');this.inputField.disabled=!this.fileChangeFlag;}},_toggleFileDelete:function(){this.fileDeleteFlag=$(this.options.deleteFileSelector+':checked').val();$(this.inputFieldAction).attr('value',this.fileDeleteFlag?'':this.fileChangeFlag?'save_new':'save_old');this.inputField.disabled=this.fileDeleteFlag||!this.fileChangeFlag;this.fileNameSpan.css('text-decoration',this.fileDeleteFlag?'line-through':'none');}});return $.mage.priceOptionFile;});","Magento_Catalog/js/price-options.min.js":"define(['jquery','underscore','mage/template','priceUtils','priceBox','jquery-ui-modules/widget'],function($,_,mageTemplate,utils){'use strict';var globalOptions={productId:null,priceHolderSelector:'.price-box',optionsSelector:'.product-custom-option',optionConfig:{},optionHandlers:{},optionTemplate:'<%= data.label %>'+'<% if (data.finalPrice.value > 0) { %>'+' +<%- data.finalPrice.formatted %>'+'<% } else if (data.finalPrice.value < 0) { %>'+' <%- data.finalPrice.formatted %>'+'<% } %>',controlContainer:'dd'};function defaultGetOptionValue(element,optionsConfig){var changes={},optionValue=element.val(),optionId=utils.findOptionId(element[0]),optionName=element.prop('name'),optionType=element.prop('type'),optionConfig=optionsConfig[optionId],optionHash=optionName;switch(optionType){case'text':case'textarea':changes[optionHash]=optionValue?optionConfig.prices:{};break;case'radio':if(element.is(':checked')){changes[optionHash]=optionConfig[optionValue]&&optionConfig[optionValue].prices||{};}\nbreak;case'select-one':changes[optionHash]=optionConfig[optionValue]&&optionConfig[optionValue].prices||{};break;case'select-multiple':_.each(optionConfig,function(row,optionValueCode){optionHash=optionName+'##'+optionValueCode;changes[optionHash]=_.contains(optionValue,optionValueCode)?row.prices:{};});break;case'checkbox':optionHash=optionName+'##'+optionValue;changes[optionHash]=element.is(':checked')?optionConfig[optionValue].prices:{};break;case'file':changes[optionHash]=optionValue||element.prop('disabled')?optionConfig.prices:{};break;}\nreturn changes;}\n$.widget('mage.priceOptions',{options:globalOptions,_init:function initPriceBundle(){$(this.options.optionsSelector,this.element).trigger('change');},_create:function createPriceOptions(){var form=this.element,options=$(this.options.optionsSelector,form),priceBox=$(this.options.priceHolderSelector,$(this.options.optionsSelector).element);if(priceBox.data('magePriceBox')&&priceBox.priceBox('option')&&priceBox.priceBox('option').priceConfig){if(priceBox.priceBox('option').priceConfig.optionTemplate){this._setOption('optionTemplate',priceBox.priceBox('option').priceConfig.optionTemplate);}\nthis._setOption('priceFormat',priceBox.priceBox('option').priceConfig.priceFormat);}\nthis._applyOptionNodeFix(options);options.on('change',this._onOptionChanged.bind(this));},_onOptionChanged:function onOptionChanged(event){var changes,option=$(event.target),handler=this.options.optionHandlers[option.data('role')];option.data('optionContainer',option.closest(this.options.controlContainer));if(handler&&handler instanceof Function){changes=handler(option,this.options.optionConfig,this);}else{changes=defaultGetOptionValue(option,this.options.optionConfig);}\n$(this.options.priceHolderSelector).trigger('updatePrice',changes);},_applyOptionNodeFix:function applyOptionNodeFix(options){var config=this.options,format=config.priceFormat,template=config.optionTemplate;template=mageTemplate(template);options.filter('select').each(function(index,element){var $element=$(element),optionId=utils.findOptionId($element),optionConfig=config.optionConfig&&config.optionConfig[optionId];$element.find('option').each(function(idx,option){var $option,optionValue,toTemplate,prices;$option=$(option);optionValue=$option.val();if(!optionValue&&optionValue!==0){return;}\ntoTemplate={data:{label:optionConfig[optionValue]&&optionConfig[optionValue].name}};prices=optionConfig[optionValue]?optionConfig[optionValue].prices:null;if(prices){_.each(prices,function(price,type){var value=+price.amount;value+=_.reduce(price.adjustments,function(sum,x){return sum+x;},0);
2toTemplate.data[type]={value:value,formatted:utils.formatPriceLocale(value,format)};});$option.text(template(toTemplate));}});});},_setOptions:function setOptions(options){$.extend(true,this.options,options);this._super(options);return this;}});return $.mage.priceOptions;});","Magento_Catalog/js/price-utils.min.js":"define(['jquery','underscore'],function($,_){'use strict';var globalPriceFormat={requiredPrecision:2,integerRequired:1,decimalSymbol:',',groupSymbol:',',groupLength:','};function stringPad(string,times){return new Array(times+1).join(string);}\nfunction formatPriceLocale(amount,format,isShowSign){var s='',precision,pattern,locale,r;format=_.extend(globalPriceFormat,format);precision=isNaN(format.requiredPrecision=Math.abs(format.requiredPrecision))?2:format.requiredPrecision;pattern=format.pattern||'%s';locale=window.LOCALE||'en-US';if(isShowSign===undefined||isShowSign===true){s=amount<0?'-':isShowSign?'+':'';}else if(isShowSign===false){s='';}\npattern=pattern.indexOf('{sign}')<0?s+pattern:pattern.replace('{sign}',s);amount=Number(Math.round(Math.abs(+amount||0)+'e+'+precision)+('e-'+precision));r=amount.toLocaleString(locale,{minimumFractionDigits:precision});return pattern.replace('%s',r).replace(/^\\s\\s*/,'').replace(/\\s\\s*$/,'');}\nfunction formatPrice(amount,format,isShowSign){var s='',precision,integerRequired,decimalSymbol,groupSymbol,groupLength,pattern,i,pad,j,re,r,am;format=_.extend(globalPriceFormat,format);precision=isNaN(format.requiredPrecision=Math.abs(format.requiredPrecision))?2:format.requiredPrecision;integerRequired=isNaN(format.integerRequired=Math.abs(format.integerRequired))?1:format.integerRequired;decimalSymbol=format.decimalSymbol===undefined?',':format.decimalSymbol;groupSymbol=format.groupSymbol===undefined?'.':format.groupSymbol;groupLength=format.groupLength===undefined?3:format.groupLength;pattern=format.pattern||'%s';if(isShowSign===undefined||isShowSign===true){s=amount<0?'-':isShowSign?'+':'';}else if(isShowSign===false){s='';}\npattern=pattern.indexOf('{sign}')<0?s+pattern:pattern.replace('{sign}',s);i=parseInt(amount=Number(Math.round(Math.abs(+amount||0)+'e+'+precision)+('e-'+precision)),10)+'';pad=i.length<integerRequired?integerRequired-i.length:0;i=stringPad('0',pad)+i;j=i.length>groupLength?i.length%groupLength:0;re=new RegExp('(\\\\d{'+groupLength+'})(?=\\\\d)','g');am=Number(Math.round(Math.abs(amount-i)+'e+'+precision)+('e-'+precision));r=(j?i.substr(0,j)+groupSymbol:'')+\ni.substr(j).replace(re,'$1'+groupSymbol)+\n(precision?decimalSymbol+am.toFixed(precision).replace(/-/,0).slice(2):'');return pattern.replace('%s',r).replace(/^\\s\\s*/,'').replace(/\\s\\s*$/,'');}\nfunction objectDeepClone(obj){return JSON.parse(JSON.stringify(obj));}\nfunction findOptionId(element){var re,id,name;if(!element){return id;}\nname=$(element).attr('name');if(name.indexOf('[')!==-1){re=/\\[([^\\]]+)?\\]/;}else{re=/_([^\\]]+)?_/;}\nid=re.exec(name)&&re.exec(name)[1];if(id){return id;}}\nreturn{formatPriceLocale:formatPriceLocale,formatPrice:formatPrice,deepClone:objectDeepClone,strPad:stringPad,findOptionId:findOptionId};});","Magento_Catalog/js/catalog-add-to-cart.min.js":"define(['jquery','mage/translate','underscore','Magento_Catalog/js/product/view/product-ids-resolver','Magento_Catalog/js/product/view/product-info-resolver','jquery-ui-modules/widget'],function($,$t,_,idsResolver,productInfoResolver){'use strict';$.widget('mage.catalogAddToCart',{options:{processStart:null,processStop:null,bindSubmit:true,minicartSelector:'[data-block=\"minicart\"]',messagesSelector:'[data-placeholder=\"messages\"]',productStatusSelector:'.stock.available',addToCartButtonSelector:'.action.tocart',addToCartButtonDisabledClass:'disabled',addToCartButtonTextWhileAdding:'',addToCartButtonTextAdded:'',addToCartButtonTextDefault:'',productInfoResolver:productInfoResolver},_create:function(){if(this.options.bindSubmit){this._bindSubmit();}\n$(this.options.addToCartButtonSelector).prop('disabled',false);},_bindSubmit:function(){var self=this;if(this.element.data('catalog-addtocart-initialized')){return;}\nthis.element.data('catalog-addtocart-initialized',1);this.element.on('submit',function(e){e.preventDefault();self.submitForm($(this));});},_redirect:function(url){var urlParts,locationParts,forceReload;urlParts=url.split('#');locationParts=window.location.href.split('#');forceReload=urlParts[0]===locationParts[0];window.location.assign(url);if(forceReload){window.location.reload();}},isLoaderEnabled:function(){return this.options.processStart&&this.options.processStop;},submitForm:function(form){this.ajaxSubmit(form);},ajaxSubmit:function(form){var self=this,productIds=idsResolver(form),productInfo=self.options.productInfoResolver(form),formData;$(self.options.minicartSelector).trigger('contentLoading');self.disableAddToCartButton(form);formData=new FormData(form[0]);
2$.ajax({url:form.prop('action'),data:formData,type:'post',dataType:'json',cache:false,contentType:false,processData:false,beforeSend:function(){if(self.isLoaderEnabled()){$('body').trigger(self.options.processStart);}},success:function(res){var eventData,parameters;$(document).trigger('ajax:addToCart',{'sku':form.data().productSku,'productIds':productIds,'productInfo':productInfo,'form':form,'response':res});if(self.isLoaderEnabled()){$('body').trigger(self.options.processStop);}\nif(res.backUrl){eventData={'form':form,'redirectParameters':[]};$('body').trigger('catalogCategoryAddToCartRedirect',eventData);if(eventData.redirectParameters.length>0&&window.location.href.split(/[?#]/)[0]===res.backUrl){parameters=res.backUrl.split('#');parameters.push(eventData.redirectParameters.join('&'));res.backUrl=parameters.join('#');}\nself._redirect(res.backUrl);return;}\nif(res.messages){$(self.options.messagesSelector).html(res.messages);}\nif(res.minicart){$(self.options.minicartSelector).replaceWith(res.minicart);$(self.options.minicartSelector).trigger('contentUpdated');}\nif(res.product&&res.product.statusText){$(self.options.productStatusSelector).removeClass('available').addClass('unavailable').find('span').html(res.product.statusText);}\nself.enableAddToCartButton(form);},error:function(res){$(document).trigger('ajax:addToCart:error',{'sku':form.data().productSku,'productIds':productIds,'productInfo':productInfo,'form':form,'response':res});},complete:function(res){if(res.state()==='rejected'){location.reload();}}});},disableAddToCartButton:function(form){var addToCartButtonTextWhileAdding=this.options.addToCartButtonTextWhileAdding||$t('Adding...'),addToCartButton=$(form).find(this.options.addToCartButtonSelector);addToCartButton.addClass(this.options.addToCartButtonDisabledClass);addToCartButton.find('span').text(addToCartButtonTextWhileAdding);addToCartButton.prop('title',addToCartButtonTextWhileAdding);},enableAddToCartButton:function(form){var addToCartButtonTextAdded=this.options.addToCartButtonTextAdded||$t('Added'),self=this,addToCartButton=$(form).find(this.options.addToCartButtonSelector);addToCartButton.find('span').text(addToCartButtonTextAdded);addToCartButton.prop('title',addToCartButtonTextAdded);setTimeout(function(){var addToCartButtonTextDefault=self.options.addToCartButtonTextDefault||$t('Add to Cart');addToCartButton.removeClass(self.options.addToCartButtonDisabledClass);addToCartButton.find('span').text(addToCartButtonTextDefault);addToCartButton.prop('title',addToCartButtonTextDefault);},1000);}});return $.mage.catalogAddToCart;});","Magento_Catalog/js/gallery.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.gallery',{options:{minWidth:300,widthOffset:90,heightOffset:210,closeWindow:'div.buttons-set a[role=\"close-window\"]'},_create:function(){$(this.options.closeWindow).on('click',function(){window.close();});this._resizeWindow();},_resizeWindow:function(){var img=this.element,width=img.width()<this.options.minWidth?this.options.minWidth:img.width();window.resizeTo(width+this.options.widthOffset,img.height()+this.options.heightOffset);}});return $.mage.gallery;});","Magento_Catalog/js/list.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.compareList',{_create:function(){var elem=this.element,products=$('thead td',elem),headings;if(products.length>this.options.productsInRow){headings=$('<table></table>').addClass('comparison headings data table').insertBefore(elem.closest('.container'));elem.addClass('scroll');$('th',elem).each(function(){var th=$(this),thCopy=th.clone();th.animate({top:'+=0'},50,function(){var height=th.height();thCopy.css('height',height).appendTo(headings).wrap('<tr></tr>');});});}\n$(this.options.windowPrintSelector).on('click',function(e){e.preventDefault();window.print();});}});return $.mage.compareList;});","Magento_Catalog/js/related-products.min.js":"define(['jquery','jquery-ui-modules/widget','mage/translate'],function($){'use strict';$.widget('mage.relatedProducts',{options:{relatedCheckbox:'.related-checkbox',relatedProductsCheckFlag:false,relatedProductsField:'#related-products-field',selectAllMessage:$.mage.__('select all'),unselectAllMessage:$.mage.__('unselect all'),selectAllLink:'[data-role=\"select-all\"],[role=\"select-all\"]',elementsSelector:'.item.product'},_create:function(){$(this.options.selectAllLink).on('click',$.proxy(this._selectAllRelated,this));$(this.options.relatedCheckbox).on('click',$.proxy(this._addRelatedToProduct,this));this._showRelatedProducts(this.element.find(this.options.elementsSelector),this.element.data('limit'),this.element.data('shuffle'));},_selectAllRelated:function(e){var innerHTML=this.options.relatedProductsCheckFlag?this.options.selectAllMessage:this.options.unselectAllMessage;$(e.target).html(innerHTML);$(this.options.relatedCheckbox).attr('checked',this.options.relatedProductsCheckFlag=!this.options.relatedProductsCheckFlag);this._addRelatedToProduct();return false;},_addRelatedToProduct:function(){$(this.options.relatedProductsField).val($(this.options.relatedCheckbox+':checked').map(function(){return this.value;}).get().join(','));},_showRelatedProducts:function(elements,limit,shuffle){var index;if(shuffle){this._shuffle(elements);}\nif(limit===0){limit=elements.length;}\nfor(index=0;index<limit;index++){$(elements[index]).show();}},_shuffle:function shuffle(o){for(var j,x,i=o.length;i;j=Math.floor(Math.random()*i),x=o[--i],o[i]=o[j],o[j]=x);return o;}});return $.mage.relatedProducts;});","Magento_Catalog/js/storage-manager.min.js":"define(['underscore','uiElement','mageUtils','Magento_Catalog/js/product/storage/storage-service','Magento_Customer/js/section-config','jquery'],function(_,Element,utils,storage,sectionConfig,$){'use strict';$(document).on('submit',function(event){var sections;if(event.target.hasAttribute('method')&&event.target.getAttribute('method').match(/post|put|delete/i)){sections=sectionConfig.getAffectedSections(event.target.action);if(sections&&window.localStorage){_.each(sections,function(section){window.localStorage.removeItem(section);});}}});return Element.extend({defaults:{defaultNamespace:{lifetime:1000},storagesConfiguration:{'recently_viewed_product':{namespace:'recently_viewed_product',className:'IdsStorage',lifetime:'${ $.defaultNamespace.lifetime }',requestConfig:{typeId:'${ $.storagesConfiguration.recently_viewed_product.namespace }'},savePrevious:{namespace:'${ $.storagesConfiguration.recently_viewed_product.namespace }'+'_previous',className:'${ $.storagesConfiguration.recently_viewed_product.className }'},allowToSendRequest:0},'recently_compared_product':{namespace:'recently_compared_product',className:'IdsStorageCompare',provider:'compare-products',lifetime:'${ $.defaultNamespace.lifetime }',requestConfig:{typeId:'${ $.storagesConfiguration.recently_compared_product.namespace }'},savePrevious:{namespace:'${ $.storagesConfiguration.recently_compared_product.namespace }'+'_previous',className:'${ $.storagesConfiguration.recently_compared_product.className }'},allowToSendRequest:0},'product_data_storage':{namespace:'product_data_storage',className:'DataStorage',allowToSendRequest:0,updateRequestConfig:{url:'',method:'GET',dataType:'json'}}},requestConfig:{method:'POST',dataType:'json',ajaxSaveType:'default',ignoreProcessEvents:true},requestSent:0},initialize:function(){this._super().prepareStoragesConfig().initStorages().initStartData().initUpdateStorageDataListener();return this;},initStorages:function(){_.each(this.storagesNamespace,function(name){this[name]=storage.createStorage(this.storagesConfiguration[name]);if(this.storagesConfiguration[name].savePrevious){this[name].previous=storage.createStorage(this.storagesConfiguration[name].savePrevious);}}.bind(this));return this;},initStartData:function(){_.each(this.storagesNamespace,function(name){this.updateDataHandler(name,this[name].get());}.bind(this));return this;},prepareStoragesConfig:function(){this.storagesNamespace=_.keys(this.storagesConfiguration);_.each(this.storagesNamespace,function(name){this.storagesConfiguration[name].requestConfig=_.extend(utils.copy(this.requestConfig),this.storagesConfiguration[name].requestConfig);}.bind(this));return this;},getUtcTime:function(){return new Date().getTime()/ 1000;},initUpdateStorageDataListener:function(){_.each(this.storagesNamespace,function(name){if(this[name].data){this[name].data.subscribe(this.updateDataHandler.bind(this,name));}}.bind(this));},updateDataHandler:function(name,data){var previousData=this[name].previous?this[name].previous.get():false;
2if(!_.isEmpty(previousData)&&!_.isEmpty(data)&&!utils.compare(data,previousData).equal){this[name].set(data);this[name].previous.set(data);this.sendRequest(name,data);}else if(_.isEmpty(previousData)&&!_.isEmpty(data)){this[name].set(data);this.sendRequest(name,data);}},getLastUpdate:function(name){return window.localStorage.getItem(this[name].namespace+'_last_update');},setLastUpdate:function(name){window.localStorage.setItem(this[name].namespace+'_last_update',this.getUtcTime());},requestHandler:function(name){this.setLastUpdate(name);this.requestSent=1;},sendRequest:function(name,data){var params=utils.copy(this.storagesConfiguration[name].requestConfig),url=params.syncUrl,typeId=params.typeId;if(this.requestSent||!~~this.storagesConfiguration[name].allowToSendRequest){return;}\ndelete params.typeId;delete params.url;this.requestSent=1;return utils.ajaxSubmit({url:url,data:{ids:data,'type_id':typeId}},params).done(this.requestHandler.bind(this,name));}});});","Magento_Catalog/js/upsell-products.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.upsellProducts',{options:{elementsSelector:'.item.product'},_create:function(){if(this.element.data('shuffle')){this._shuffle(this.element.find(this.options.elementsSelector));}\nthis._showUpsellProducts(this.element.find(this.options.elementsSelector),this.element.data('limit'),this.element.data('shuffle-weighted'));},_showUpsellProducts:function(elements,limit,weightedRandom){var index,weights=[],random=[],weight=2,shown=0,$element,currentGroup,prevGroup;if(limit===0){limit=elements.length;}\nif(weightedRandom&&limit>0&&limit<elements.length){for(index=0;index<limit;index++){$element=$(elements[index]);if($element.data('shuffle-group')!==''){break;}\n$element.show();shown++;}\nlimit-=shown;for(index=elements.length-1;index>=0;index--){$element=$(elements[index]);currentGroup=$element.data('shuffle-group');if(currentGroup!==''){weights.push([index,Math.log(weight)]);if(typeof prevGroup!=='undefined'&&prevGroup!==currentGroup){weight+=2;}\nprevGroup=currentGroup;}}\nif(weights.length===0){return;}\nfor(index=0;index<weights.length;index++){random.push([weights[index][0],Math.pow(Math.random(),1 / weights[index][1])]);}\nrandom.sort(function(a,b){a=a[1];b=b[1];return a<b?1:(a>b?-1:0);});index=0;while(limit){$(elements[random[index][0]]).show();limit--;index++}\nreturn;}\nfor(index=0;index<limit;index++){$(elements[index]).show();}},_shuffle:function shuffle(elements){var parent,child,lastSibling;if(elements.length){parent=$(elements[0]).parent();}\nwhile(elements.length){child=elements.splice(Math.floor(Math.random()*elements.length),1)[0];lastSibling=parent.find('[data-shuffle-group=\"'+$(child).data('shuffle-group')+'\"]').last();lastSibling.after(child);}}});return $.mage.upsellProducts;});","Magento_Catalog/js/validate-product.min.js":"define(['jquery','mage/mage','Magento_Catalog/product/view/validation','catalogAddToCart'],function($){'use strict';$.widget('mage.productValidate',{options:{bindSubmit:false,radioCheckboxClosest:'.nested',addToCartButtonSelector:'.action.tocart'},_create:function(){var bindSubmit=this.options.bindSubmit;this.element.validation({radioCheckboxClosest:this.options.radioCheckboxClosest,submitHandler:function(form){var jqForm=$(form).catalogAddToCart({bindSubmit:bindSubmit});jqForm.catalogAddToCart('submitForm',jqForm);return false;}});$(this.options.addToCartButtonSelector).attr('disabled',false);}});return $.mage.productValidate;});","Magento_Catalog/js/product/addtocart-button.min.js":"define(['Magento_Ui/js/grid/columns/column','Magento_Catalog/js/product/uenc-processor','Magento_Catalog/js/product/list/column-status-validator'],function(Element,uencProcessor,columnStatusValidator){'use strict';return Element.extend({defaults:{label:''},getDataMageInit:function(row){return'{\"redirectUrl\": { \"url\" : \"'+uencProcessor(row['add_to_cart_button'].url)+'\"}}';},getDataPost:function(row){return uencProcessor(row['add_to_cart_button']['post_data']);},hasRequiredOptions:function(row){return row['add_to_cart_button']['required_options'];},isSalable:function(row){return row['is_salable'];},isAvailable:function(row){return row['is_available'];},isAllowed:function(){return columnStatusValidator.isValid(this.source(),'add_to_cart','show_buttons');},getLabel:function(){return this.label;}});});","Magento_Catalog/js/product/addtocompare-button.min.js":"define(['Magento_Ui/js/grid/columns/column','Magento_Catalog/js/product/uenc-processor','Magento_Catalog/js/product/list/column-status-validator'],function(Column,uencProcessor,columnStatusValidator){'use strict';return Column.extend({defaults:{label:''},getDataPost:function(row){return uencProcessor(row['add_to_compare_button'].url||row['add_to_compare_button']['post_data']);},isAllowed:function(){return columnStatusValidator.isValid(this.source(),'add_to_compare','show_buttons');},getLabel:function(){return this.label;}});});","Magento_Catalog/js/product/learn-more.min.js":"define(['Magento_Ui/js/grid/columns/column','Magento_Catalog/js/product/list/column-status-validator'],function(Column,columnStatusValidator){'use strict';return Column.extend({isAllowed:function(){return columnStatusValidator.isValid(this.source(),'learn_more','show_attributes');}});});","Magento_Catalog/js/product/name.min.js":"define(['Magento_Ui/js/grid/columns/column','Magento_Catalog/js/product/list/column-status-validator','escaper'],function(Column,columnStatusValidator,escaper){'use strict';return Column.extend({defaults:{allowedTags:['div','span','b','strong','i','em','u','a']},isAllowed:function(){return columnStatusValidator.isValid(this.source(),'name','show_attributes');},getNameUnsanitizedHtml:function(label){return escaper.escapeHtml(label,this.allowedTags);}});});","Magento_Catalog/js/product/breadcrumbs.min.js":"define(['jquery','Magento_Theme/js/model/breadcrumb-list'],function($,breadcrumbList){'use strict';return function(widget){$.widget('mage.breadcrumbs',widget,{options:{categoryUrlSuffix:'',useCategoryPathInUrl:false,product:'',categoryItemSelector:'.category-item',menuContainer:'[data-action=\"navigation\"] > ul'},_render:function(){this._appendCatalogCrumbs();this._super();},_appendCatalogCrumbs:function(){var categoryCrumbs=this._resolveCategoryCrumbs();
2categoryCrumbs.forEach(function(crumbInfo){breadcrumbList.push(crumbInfo);});if(this.options.product){breadcrumbList.push(this._getProductCrumb());}},_resolveCategoryCrumbs:function(){var menuItem=this._resolveCategoryMenuItem(),categoryCrumbs=[];if(menuItem!==null&&menuItem.length){categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));while((menuItem=this._getParentMenuItem(menuItem))!==null){categoryCrumbs.unshift(this._getCategoryCrumb(menuItem));}}\nreturn categoryCrumbs;},_getCategoryCrumb:function(menuItem){return{'name':'category','label':menuItem.text(),'link':menuItem.attr('href'),'title':''};},_getProductCrumb:function(){return{'name':'product','label':this.options.product,'link':'','title':''};},_getParentMenuItem:function(menuItem){var classes,classNav,parentClass,parentMenuItem=null;if(!menuItem){return null;}\nclasses=menuItem.parent().attr('class');classNav=classes.match(/(nav\\-)[0-9]+(\\-[0-9]+)+/gi);if(classNav){classNav=classNav[0];parentClass=classNav.substr(0,classNav.lastIndexOf('-'));if(parentClass.lastIndexOf('-')!==-1){parentMenuItem=$(this.options.menuContainer).find('.'+parentClass+' > a');parentMenuItem=parentMenuItem.length?parentMenuItem:null;}}\nreturn parentMenuItem;},_resolveCategoryMenuItem:function(){var categoryUrl=this._resolveCategoryUrl(),menu=$(this.options.menuContainer),categoryMenuItem=null;if(categoryUrl&&menu.length){categoryMenuItem=menu.find(this.options.categoryItemSelector+' > a[href=\"'+categoryUrl+'\"]');}\nreturn categoryMenuItem;},_resolveCategoryUrl:function(){var categoryUrl;if(this.options.useCategoryPathInUrl){categoryUrl=window.location.href.split('?')[0];categoryUrl=categoryUrl.substring(0,categoryUrl.lastIndexOf('/'))+\nthis.options.categoryUrlSuffix;}else{categoryUrl=document.referrer;if(categoryUrl.indexOf('?')>0){categoryUrl=categoryUrl.substr(0,categoryUrl.indexOf('?'));}}\nreturn categoryUrl;}});return $.mage.breadcrumbs;};});","Magento_Catalog/js/product/provider-compared.min.js":"define(['underscore','./provider','Magento_Catalog/js/product/storage/storage-service','Magento_Customer/js/customer-data'],function(_,Provider,storage,customerData){'use strict';return Provider.extend({idsHandler:function(data){this.productStorage.setIds(this.data.currency,this.data.store,this.dataFilter(data));},dataFilter:function(data){var providerData=this.idsStorage.prepareData(customerData.get(this.identifiersConfig.provider)().items),result={},productCurrentScope,scopeId;if(typeof this.data.productCurrentScope!=='undefined'&&window.checkout&&window.checkout.baseUrl){productCurrentScope=this.data.productCurrentScope;scopeId=productCurrentScope==='store'?window.checkout.storeId:productCurrentScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;_.each(data,function(value,key){if(!providerData[productCurrentScope+'-'+scopeId+'-'+key]){result[key]=value;}});}else{_.each(data,function(value,key){if(!providerData[key]){result[key]=value;}});}\nreturn result;},filterData:function(data){var result={},i=0,ids=_.keys(this.dataFilter(this.ids())),length=ids.length;for(i;i<length;i++){if(ids[i]&&data[ids[i]]){result[ids[i]]=data[ids[i]];}}\nreturn result;}});});","Magento_Catalog/js/product/provider.min.js":"define(['underscore','jquery','mageUtils','uiElement','Magento_Catalog/js/product/storage/storage-service','Magento_Customer/js/customer-data','Magento_Catalog/js/product/view/product-ids-resolver'],function(_,$,utils,Element,storage,customerData,productResolver){'use strict';return Element.extend({defaults:{identifiersConfig:{namespace:''},productStorageConfig:{namespace:'product_data_storage',customerDataProvider:'product_data_storage',updateRequestConfig:{url:'',method:'GET',dataType:'json'},className:'DataStorage'},ids:{},listens:{ids:'idsHandler'}},initialize:function(){this._super().initIdsStorage();return this;},initObservable:function(){this._super();this.observe('ids');return this;},initIdsStorage:function(){storage.onStorageInit(this.identifiersConfig.namespace,this.idsStorageHandler.bind(this));return this;},idsStorageHandler:function(idsStorage){this.idsStorage=idsStorage;this.productStorage=storage.createStorage(this.productStorageConfig);this.productStorage.data.subscribe(this.dataCollectionHandler.bind(this));if(~~this.idsStorage.allowToSendRequest){customerData.reload([idsStorage.namespace]).done(this._resolveDataByIds.bind(this));}else{this._resolveDataByIds();}},_resolveDataByIds:function(){if(!window.checkout||!window.checkout.baseUrl){return;}\nthis.ids(this.filterIds(this.ids()));this.initIdsListener();this.idsMerger(this.idsStorage.get(),this.prepareDataFromCustomerData(customerData.get(this.identifiersConfig.namespace)()));},initIdsListener:function(){customerData.get(this.identifiersConfig.namespace).subscribe(function(data){this.idsMerger(this.prepareDataFromCustomerData(data));}.bind(this));
2this.idsStorage.data.subscribe(this.idsMerger.bind(this));},prepareDataFromCustomerData:function(data){data=data.items?data.items:data;return data;},filterIds:function(ids){var _ids={},currentTime=new Date().getTime()/ 1000,currentProductIds=productResolver($('#product_addtocart_form')),productCurrentScope=this.data.productCurrentScope,scopeId=productCurrentScope==='store'?window.checkout.storeId:productCurrentScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;_.each(ids,function(id,key){if(currentTime-ids[key]['added_at']<~~this.idsStorage.lifetime&&!_.contains(currentProductIds,ids[key]['product_id'])&&(!id.hasOwnProperty('scope_id')||ids[key]['scope_id']===scopeId)){_ids[id['product_id']]=id;}},this);return _ids;},idsMerger:function(data,optionalData){if(data&&optionalData){data=_.extend(data,optionalData);}\nif(!_.isEmpty(data)){this.ids(this.filterIds(_.extend(utils.copy(this.ids()),data)));}},idsHandler:function(data){this.productStorage.setIds(this.data.currency,this.data.store,data);},processData:function(data){var curData=utils.copy(this.data),ids=this.ids();delete data['data_id'];data=_.values(data);_.each(data,function(record,index){record._rowIndex=index;record['added_at']=ids[record.id]['added_at'];},this);curData.items=data;this.set('data',curData);},dataCollectionHandler:function(data){data=this.filterData(data);this.processData(data);},filterData:function(data){var result={},i=0,ids=_.keys(this.ids()),length=ids.length;for(i;i<length;i++){if(ids[i]&&data[ids[i]]){result[ids[i]]=data[ids[i]];}}\nreturn result;}});});","Magento_Catalog/js/product/query-builder.min.js":"define(['underscore'],function(_){'use strict';return{buildQuery:function(data){var filters=[];_.each(data,function(value,key){filters.push({field:key,value:value,'condition_type':'in'});});return{searchCriteria:{filterGroups:[{filters:filters}]}};}};});","Magento_Catalog/js/product/remaining-characters.min.js":"define(['jquery','mage/translate','jquery-ui-modules/widget'],function($,$t){'use strict';$.widget('mage.remainingCharacters',{options:{remainingText:$t('remaining'),tooManyText:$t('too many'),errorClass:'mage-error',noDisplayClass:'no-display'},_create:function(){this.note=$(this.options.noteSelector);this.counter=$(this.options.counterSelector);this.updateCharacterCount();this.element.on('change keyup paste',this.updateCharacterCount.bind(this));},updateCharacterCount:function(){var length=this.element.val().length,diff=this.options.maxLength-length;this.counter.text(this._formatMessage(diff));this.counter.toggleClass(this.options.noDisplayClass,length===0);this.note.toggleClass(this.options.errorClass,diff<0);},_formatMessage:function(diff){var count=Math.abs(diff),qualifier=diff<0?this.options.tooManyText:this.options.remainingText;return'('+count+' '+qualifier+')';}});return $.mage.remainingCharacters;});","Magento_Catalog/js/product/uenc-processor.min.js":"define([],function(){'use strict';function _isJSON(data){try{JSON.parse(data);}catch(e){return false;}\nreturn true;}\nfunction _stringProcessor(data,placeholder,uenc){if(data&&~data.indexOf(placeholder)){return data.replace(placeholder,uenc);}\nreturn data;}\nfunction _objectProcessor(data,placeholder,uenc){data=JSON.parse(data);if(data.hasOwnProperty('action')){data.action=_stringProcessor(data.action,placeholder,uenc);}\nif(data.hasOwnProperty('data')&&data.data.hasOwnProperty('uenc')){data.data.uenc=uenc;}\nreturn JSON.stringify(data);}\nreturn function(data,placeholder){var uenc=btoa(window.location.href).replace('+/=','-_,');placeholder=placeholder||encodeURI('%uenc%');return _isJSON(data)?_objectProcessor(data,placeholder,uenc):_stringProcessor(data,placeholder,uenc);};});","Magento_Catalog/js/product/list/column-status-validator.min.js":"define(['underscore'],function(_){'use strict';return _.extend({isValid:function(source,attributeCode,type){var attributes;if(!source[type]){return false;}\nattributes=source[type].split(',');return _.contains(attributes,attributeCode);}});});","Magento_Catalog/js/product/list/listing.min.js":"define(['ko','underscore','Magento_Ui/js/grid/listing'],function(ko,_,Listing){'use strict';return Listing.extend({defaults:{additionalClasses:'',filteredRows:{}
2,limit:5,listens:{elems:'filterRowsFromCache','${ $.provider }:data.items':'filterRowsFromServer'}},initialize:function(){this._super();this.filteredRows=ko.observable();this.initProductsLimit();this.hideLoader();},initProductsLimit:function(){if(this.source['page_size']){this.limit=this.source['page_size'];}\nreturn this;},initObservable:function(){this._super().track({rows:[]});return this;},filterRowsFromCache:function(){this._filterRows(this.rows);},filterRowsFromServer:function(rows){this._filterRows(rows);},_filterRows:function(rows){this.filteredRows(_.sortBy(rows,'added_at').reverse().slice(0,this.limit));},getUrl:function(row){return row.url;},getComponentByCode:function(code){var elems=this.elems()?this.elems():ko.getObservable(this,'elems'),component;component=_.filter(elems,function(elem){return elem.index===code;},this).pop();return component;}});});","Magento_Catalog/js/product/list/toolbar.min.js":"define(['jquery','jquery-ui-modules/widget'],function($){'use strict';$.widget('mage.productListToolbarForm',{options:{modeControl:'[data-role=\"mode-switcher\"]',directionControl:'[data-role=\"direction-switcher\"]',orderControl:'[data-role=\"sorter\"]',limitControl:'[data-role=\"limiter\"]',mode:'product_list_mode',direction:'product_list_dir',order:'product_list_order',limit:'product_list_limit',page:'p',modeDefault:'grid',directionDefault:'asc',orderDefault:'position',limitDefault:'9',url:'',formKey:'',post:false},_create:function(){this._bind($(this.options.modeControl,this.element),this.options.mode,this.options.modeDefault);this._bind($(this.options.directionControl,this.element),this.options.direction,this.options.directionDefault);this._bind($(this.options.orderControl,this.element),this.options.order,this.options.orderDefault);this._bind($(this.options.limitControl,this.element),this.options.limit,this.options.limitDefault);},_bind:function(element,paramName,defaultValue){if(element.is('select')){element.on('change',{paramName:paramName,'default':defaultValue},$.proxy(this._processSelect,this));}else{element.on('click',{paramName:paramName,'default':defaultValue},$.proxy(this._processLink,this));}},_processLink:function(event){event.preventDefault();this.changeUrl(event.data.paramName,$(event.currentTarget).data('value'),event.data.default);},_processSelect:function(event){this.changeUrl(event.data.paramName,event.currentTarget.options[event.currentTarget.selectedIndex].value,event.data.default);},getUrlParams:function(){var decode=window.decodeURIComponent,urlPaths=this.options.url.split('?'),urlParam
2s=urlPaths[1]?urlPaths[1].split('&'):[],params={},parameters,i;for(i=0;i<urlParams.length;i++){parameters=urlParams[i].split('=');params[decode(parameters[0])]=parameters[1]!==undefined?decode(parameters[1].replace(/\\+/g,'%20')):'';}\nreturn params;},getCurrentLimit:function(){return this.getUrlParams()[this.options.limit]||this.options.limitDefault;},getCurrentPage:function(){return this.getUrlParams()[this.options.page]||1;},changeUrl:function(paramName,paramValue,defaultValue){var urlPaths=this.options.url.split('?'),baseUrl=urlPaths[0],paramData=this.getUrlParams(),currentPage=this.getCurrentPage(),form,params,key,input,formKey,newPage;if(currentPage>1&¶mName===this.options.mode){delete paramData[this.options.page];}\nif(currentPage>1&¶mName===this.options.limit){newPage=Math.floor(this.getCurrentLimit()*(currentPage-1)/ paramValue)+1;if(newPage>1){paramData[this.options.page]=newPage;}else{delete paramData[this.options.page];}}\nparamData[paramName]=paramValue;if(this.options.post){form=document.createElement('form');params=[this.options.mode,this.options.direction,this.options.order,this.options.limit];for(key in paramData){if(params.indexOf(key)!==-1){input=document.createElement('input');input.name=key;input.value=paramData[key];form.appendChild(input);delete paramData[key];}}\nformKey=document.createElement('input');formKey.name='form_key';formKey.value=this.options.formKey;form.appendChild(formKey);paramData=$.param(paramData);baseUrl+=paramData.length?'?'+paramData:'';form.action=baseUrl;form.method='POST';document.body.appendChild(form);form.submit();}else{if(paramValue==defaultValue){delete paramData[paramName];}\nparamData=$.param(paramData);location.href=baseUrl+(paramData.length?'?'+paramData:'');}}});return $.mage.productListToolbarForm;});","Magento_Catalog/js/product/list/columns/final-price.min.js":"define(['underscore','uiRegistry','mageUtils','uiCollection'],function(_,registry,utils,Collection){'use strict';return Collection.extend({defaults:{label:false,headerTmpl:'ui/grid/columns/text',showMinimalPrice:false,showMaximumPrice:false,useLinkForAsLowAs:false,bodyTmpl:'Magento_Catalog/product/final_price',priceWrapperCssClasses:'',priceWrapperAttr:{}},getPrice:function(row){return row['price_info']['formatted_prices']['final_price'];},getPriceUnsanitizedHtml:function(row){return this.getPrice(row);},getRegularPrice:function(row){return row['price_info']['formatted_prices']['regular_price'];},getRegularPriceUnsanitizedHtml:function(row){return this.getRegularPrice(row);},hasPriceRange:function(row){return row['price_info']['max_regular_price']!==row['price_info']['min_regular_price'];},hasSpecialPrice:function(row){return row['price_info']['regular_price']>row['price_info']['final_price'];},isMinimalPrice:function(row){return row['price_info']['minimal_price']<row['price_info']['final_price'];},getMinimalPrice:function(row){return row['price_info']['formatted_prices']['minimal_price'];},getMinimalPriceUnsanitizedHtml:function(row){return this.getMinimalPrice(row);},isSalable:function(row){return row['is_salable'];},getMaxPrice:function(row){return row['price_info']['formatted_prices']['max_price'];},getMaxPriceUnsanitizedHtml:function(row){return this.getMaxPrice(row);},getMaxRegularPrice:function(row){return row['price_info']['formatted_prices']['max_regular_price'];},getMaxRegularPriceUnsanitizedHtml:function(row){return this.getMaxRegularPrice(row);},getMinRegularPrice:function(row){return row['price_info']['formatted_prices']['min_regular_price'];},getMinRegularPriceUnsanitizedHtml:function(row){return this.getMinRegularPrice(row);}
2,getAdjustmentCssClasses:function(){return _.pluck(this.getAdjustments(),'index').join(' ');},getMinimalPriceAmount:function(row){return row['price_info']['minimal_price'];},getMinimalPriceAmountUnsanitizedHtml:function(row){return this.getMinimalPriceAmount(row);},getMinimalRegularPriceAmount:function(row){return row['price_info']['min_regular_price'];},getMaximumPriceAmount:function(row){return row['price_info']['max_price'];},getMaximumRegularPriceAmount:function(row){return row['price_info']['max_regular_price'];},showMinRegularPrice:function(row){return this.getMinimalPriceAmount(row)<this.getMinimalRegularPriceAmount(row);},showMaxRegularPrice:function(row){return this.getMaximumPriceAmount(row)<this.getMaximumRegularPriceAmount(row);},getBody:function(){return this.bodyTmpl;},getAdjustments:function(){var adjustments=this.elems();_.each(adjustments,function(adjustment){adjustment.setPriceType(this.priceType);adjustment.source=this.source;},this);return adjustments;}});});","Magento_Catalog/js/product/list/columns/image.min.js":"define(['underscore','Magento_Ui/js/grid/columns/column','Magento_Catalog/js/product/list/column-status-validator'],function(_,Element,columnStatusValidator){'use strict';return Element.extend({defaults:{bodyTmpl:'Magento_Catalog/product/list/columns/image',imageCode:'default',image:{}},getImage:function(images){return _.filter(images,function(image){return this.imageCode===image.code;},this).pop();},getImageUrl:function(row){return this.getImage(row.images).url;},getWidth:function(row){return this.getImage(row.images).width;},getHeight:function(row){return this.getImage(row.images).height;},getResizedImageWidth:function(row){return this.getImage(row.images)['resized_width'];},getResizedImageHeight:function(row){return this.getImage(row.images)['resized_height'];},getLabel:function(row){if(!this.imageExists(row)){return this._super();}\nreturn this.getImage(row.images).label;},imageExists:function(row){return this.getImage(row.images)!=='undefined';},isAllowed:function(){return columnStatusValidator.isValid(this.source(),'image','show_attributes');}});});","Magento_Catalog/js/product/list/columns/price-box.min.js":"define(['ko','underscore','uiRegistry','mageUtils','uiCollection','Magento_Catalog/js/product/list/column-status-validator','uiLayout'],function(ko,_,registry,utils,Collection,columnStatusValidator,layout){'use strict';return Collection.extend({defaults:{label:'',hasSpecialPrice:false,showMinimalPrice:false,useLinkForAsLowAs:false,visible:true,headerTmpl:'ui/grid/columns/text',bodyTmpl:'Magento_Catalog/product/price/price_box',disableAction:false,controlVisibility:true,sortable:false,sorting:false,draggable:true,fieldClass:{},renders:{default:{}},ignoreTmpls:{fieldAction:true},statefull:{visible:true,sorting:true},imports:{exportSorting:'sorting'},listens:{elems:''},modules:{source:'${ $.provider }'},pricesInit:{}},sort:function(){return this;},isAllowed:function(){return columnStatusValidator.isValid(this.source(),'price','show_attributes');},getPrices:function(row){var elems=this.elems()?this.elems():ko.getObservable(this,'elems'),result;this.initPrices(row);result=_.filter(elems,function(elem){return elem.productType===row.type;});return result;},_deepObjectExtend:function(target,source){var _target=utils.copy(target);_.each(source,function(value,key){if(_.keys(value).length&&typeof _target[key]!=='undefined'){_target[key]=this._deepObjectExtend(_target[key],value);}else{_target[key]=value;}},this);return _target;},_initPriceWithCustomMetaData:function(productType){var price=this._deepObjectExtend(this.renders.prices['default'],this.renders.prices[productType]);price.name=productType+'.default';price.parent=this.name;price.source=this.source;price.productType=productType;layout([price]);},_initPricesForProductType:function(_priceData,productType){var prices=[];this._setPriceNamesToPrices(_priceData,productType);_.sortBy(_priceData,this._comparePrices);_.each(_priceData,function(priceData){if(!priceData.component){return;}\npriceData.parent=this.name;priceData.provider=this.provider;priceData.productType=productType;priceData=utils.template(priceData,this);prices.push(priceData);},this);layout(prices);},initPrices:function(row){var _priceData=[],productType=row.type,defaultPrice=this.renders.prices['default'];if(this.pricesInit[productType]){return true;}\nthis.pricesInit[productType]=true;if(this.renders.prices[productType]&&this._needToApplyCustomTemplate(this.renders.prices[productType])){return this._initPriceWithCustomMetaData(productType);}\nif(this.renders.prices[productType]&&this.renders.prices[productType].children){_priceData=this._deepObjectExtend(defaultPrice.children,this.renders.prices[productType].children);}else{_priceData=defaultPrice.children;}\nreturn this._initPricesForProductType(_priceData,productType);},_setPriceNamesToPrices:function(prices,productType){_.each(prices,function(price,name){price.priceType=name;price.name=name+'.'+productType;});return prices;},_comparePrices:function(firstPrice,secondPrice){if(firstPrice.s
2ortOrder<secondPrice.sortOrder){return-1;}\nif(firstPrice.sortOrder>secondPrice.sortOrder){return 1;}\nreturn 0;},_needToApplyCustomTemplate:function(productData){return productData.bodyTmpl||productData.component;},getBody:function(){return this.bodyTmpl;},getLabel:function(){return this.label;}});});","Magento_Catalog/js/product/list/columns/pricetype-box.min.js":"define(['ko','underscore','uiCollection'],function(ko,_,Collection){'use strict';return Collection.extend({getPriceByCode:function(code){var elems=this.elems()?this.elems():ko.getObservable(this,'elems'),price;price=_.filter(elems,function(elem){return elem.index.split('.').shift()===code;},this).pop();price.source=this.source();price.priceType=code;return price;},getBody:function(){return this.bodyTmpl;},hasPriceRange:function(row){return row['price_info']['max_regular_price']!==row['price_info']['min_regular_price'];}});});","Magento_Catalog/js/product/storage/data-storage.min.js":"define(['jquery','underscore','ko','mageUtils','Magento_Catalog/js/product/query-builder','Magento_Customer/js/customer-data','jquery/jquery-storageapi'],function($,_,ko,utils,queryBuilder,customerData){'use strict';function getParsedDataFromServer(data){var result={};_.each(data.items,function(item){if(item.id){result[item.id]=item;}});return{items:result};}\nfunction setLocalStorageItem(namespace,data){try{window.localStorage.setItem(namespace,JSON.stringify(data));}catch(e){console.warn('localStorage is unavailable - skipping local caching of product data');console.error(e);}}\nreturn{name:'DataStorage',request:{},customerDataProvider:'product_data_storage',initialize:function(){if(!this.data){this.data=ko.observable({});}\nthis.initLocalStorage().initCustomerDataReloadListener().cachesDataFromLocalStorage().initDataListener().initProvideStorage().initProviderListener();return this;},initCustomerDataReloadListener:function(){$(document).on('customer-data-invalidate',this._flushProductStorage.bind(this));return this;},_flushProductStorage:function(event,sections){if(_.isEmpty(sections)||_.contains(sections,'product_data_storage')){this.localStorage.removeAll();}},initDataListener:function(){this.data.subscribe(this.dataHandler.bind(this));return this;},initProvideStorage:function(){this.providerHandler(customerData.get(this.customerDataProvider)());return this;},dataHandler:function(data){if(_.isEmpty(data)){this.localStorage.removeAll();}else{setLocalStorageItem(this.namespace,data);}},providerHandler:function(data){var currentData=utils.copy(this.data()),ids=_.keys(data.items);if(data.items&&ids.length){data=data.items;this.data(_.extend(currentData,data));}},setIds:function(currency,store,ids){if(!this.hasInCache(currency,store,ids)){this.loadDataFromServer(currency,store,ids);}else{this.data.valueHasMutated();}},getDataByIdentifiers:function(currency,store,productIdentifiers){var data={},dataCollection=this.data(),id;for(id in productIdentifiers){if(productIdentifiers.hasOwnProperty(id)){data[id]=dataCollection[id];}}\nreturn data;},hasInCache:function(currency,store,ids){var data=this.data(),id;for(id in ids){if(!data.hasOwnProperty(id)||data[id]['currency_code']!==currency||~~data[id]['store_id']!==~~store){return false;}}\nreturn true;},loadDataFromServer:function(currency,store,ids){var idsArray=_.keys(ids),prepareAjaxParams={'entity_id':idsArray.join(',')};if(this.request.sent&&this.hasIdsInSentRequest(ids)){return;}\nthis.request={sent:true,data:ids};this.updateRequestConfig.data=queryBuilder.buildQuery(prepareAjaxParams);this.updateRequestConfig.data['store_id']=store;this.updateRequestConfig.data['currency_code']=currency;$.ajax(this.updateRequestConfig).done(function(data){this.request={};this.providerHandler(getParsedDataFromServer(data));}.bind(this));},addDataFromPageCache:function(data){this.providerHandler(getParsedDataFromServer(data));},hasIdsInSentRequest:function(ids){var sentDataIds,currentDataIds;if(this.request.data){sentDataIds=_.keys(this.request.data);currentDataIds=_.keys(ids);return _.every(currentDataIds,function(id){return _.lastIndexOf(sentDataIds,id)!==-1;});}\nreturn false;},initProviderListener:function(){customerData.get(this.customerDataProvider).subscribe(this.providerHandler.bind(this));return this;},cachesDataFromLocalStorage:function(){this.data(this.getDataFromLocalStorage());return this;},getDataFromLocalStorage:function(){return this.localStorage.get();},initLocalStorage:function(){this.localStorage=$.initNamespaceStorage(this.namespace).localStorage;return this;}};});","Magento_Catalog/js/product/storage/ids-storage-compare.min.js":"define(['underscore','ko','mageUtils','Magento_Customer/js/customer-data','Magento_Catalog/js/product/storage/ids-storage'],function(_,ko,utils,customerData,idsStorage){'use strict';return _.extend(utils.copy(idsStorage),{name:'IdsStorageCompare',initialize:function(){if(!this.data){this.data=ko.observable({});}\nif(this.provider&&window.checkout&&window.checkout.baseUrl){this.providerDataHandler(customerData.get(this.provider)());this.initProviderListener();}\nthis.initLocalStorage().cachesDataFromLocalStorage().initDataListener();return this;},initProviderListener:function(){customerData.get(this.provider).subscribe(this.providerDataHandler.bind(this));},providerDataHandler:function(data){data=data.items||data;data=this.prepareData(data);this.add(data);},prepareData:function(data){var result={},scopeId;_.each(data,function(item){if(typeof item.productScope!=='undefined'){scopeId=item.productScope==='store'?window.checkout.storeId:item.productScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;result[item.productScope+'-'+scopeId+'-'+item.id]={'added_at':new Date().getTime()/ 1000,'product_id':item.id,'scope_id':scopeId};}else{result[item.id]={'added_at':new Date().getTime()/ 1000,'product_id':item.id};}});return result;}});});","Magento_Catalog/js/product/storage/ids-storage.min.js":"define(['jquery','underscore','ko','mageUtils','jquery/jquery-storageapi'],function($,_,ko,utils){'use strict';function setLocalStorageItem(namespace,data){try{window.localStorage.setItem(namespace,JSON.stringify(data));}catch(e){console.warn('localStorage is unavailable - skipping local caching of product data');console.error(e);}}\nreturn{name:'IdsStorage',initialize:function(){if(!this.data){this.data=ko.observable({});}\nthis.initCustomerDataReloadListener().initLocalStorage().cachesDataFromLocalStorage().initDataListener();return this;},getDataFromLocalStorage:function(){return this.localStorage.get();},cachesDataFromLocalStorage:function(){this.data(this.getDataFromLocalStorage());return this;},initLocalStorage:function(){this.localStorage=$.initNamespaceStorage(this.namespace).localStorage;return this;},initDataListener:function(){this.data.subscribe(this.internalDataHandler.bind(this));},initCustomerDataReloadListener:function(){$(document).on('customer-data-reload',function(event,sections){if((_.isEmpty(sections)||_.contains(sections,this.namespace))&&~~this.allowToSendRequest){this.localStorage.removeAll();this.data();}}.bind(this));return this;},internalDataHandler:function(data){setLocalStorageItem(this.namespace,data);},externalDataHandler:function(data){data=data.items?data.items:data;this.set(_.extend(utils.copy(this.data()),data));}};});","Magento_Catalog/js/product/storage/storage-service.min.js":"define(['jquery','underscore','mageUtils','mage/translate','Magento_Catalog/js/product/storage/ids-storage','Magento_Catalog/js/product/storage/data-storage','Magento_Catalog/js/product/storage/ids-storage-compare'],function($,_,utils,$t,IdsStorage,DataStore,IdsStorageCompare){'use strict';return(function(){var\nstorages={},classes={},prototype={set:function(data){if(!utils.compare(data,this.data()).equal){this.data(data);}},add:function(data){if(!_.isEmpty(data)){this.data(_.extend(utils.copy(this.data()),data));}},get:function(){return this.data();}},storagesInterface={data:'function',initialize:'function',namespace:'string'},_private={overrideClassMethods:function(extensionMethods,originInstance){var methodsName=_.keys(extensionMethods),i=0,length=methodsName.length;for(i;i<length;i++){if(_.isFunction(originInstance[methodsName[i]])){originInstance[methodsName[i]]=extensionMethods[methodsName[i]];}}\nreturn originInstance;},isImplementInterface:function(classInstance){_.each(storagesInterface,function(key,value){if(typeof classInstance[key]!==value){return false;}});return true;}},subscribers={};(function(){classes[IdsStorage.name]=function(config){_.extend(this,IdsStorage,config);};classes[IdsStorageCompare.name]=function(config){_.extend(this,IdsStorageCompare,config);};classes[DataStore.name]=function(config){_.extend(this,DataStore,config);};_.each(classes,function(classItem){classItem.prototype=prototype;});})();return{createStorage:function(config){var instance,initialized;if(storages[config.namespace]){return storages[config.namespace];}\ninstance=new classes[config.className](config);if(_private.isImplementInterface(instance)){initialized=storages[config.namespace]=instance.initialize();this.processSubscribers(initialized,config);return initialized;}\nthrow new Error('Class '+config.className+$t('does not implement Storage Interface'));},processSubscribers:function(initialized,config){if(subscribers[config.namespace]){_.each(subscribers[config.namespace],function(callback){callback(initialized);});delete subscribers[config.namespace];}},onStorageInit:function(namespace,callback){if(storages[namespace]){callback(storages[namespace]);}else{subscribers[namespace]?subscribers[namespace].push(callback):subscribers[namespace]=[callback];}},getStorage:function(namespace){return storages[namespace];}};})();});","Magento_Catalog/js/product/view/product-ids-resolver.min.js":"define(['underscore','Magento_Catalog/js/product/view/product-ids'],function(_,productIds){'use strict';return function($form){var idSet=productIds(),product=_.findWhere($form.serializeArray(),{name:'product'});if(!_.isUndefined(product)){idSet.push(product.value);}\nreturn _.uniq(idSet);};});","Magento_Catalog/js/product/view/product-ids.min.js":"define(['ko'],function(ko){'use strict';return ko.observableArray([]);});","Magento_Catalog/js/product/view/product-info-resolver.min.js":"define(['underscore','Magento_Catalog/js/product/view/product-info'],function(_,productInfo){'use strict';return function($form){var product=_.findWhere($form.serializeArray(),{name:'product'});if(!_.isUndefined(product)){productInfo().push({'id':product.value});}\nreturn _.uniq(productInfo(),function(item){return item.id;});};});","Magento_Catalog/js/product/view/product-info.min.js":"define(['ko'],function(ko){'use strict';return ko.observableArray([]);});
2","Magento_Catalog/js/product/view/provider.min.js":"define(['underscore','uiElement','Magento_Catalog/js/product/storage/storage-service'],function(_,Element,storage){'use strict';return Element.extend({defaults:{identifiersConfig:{namespace:'recently_viewed_product'},productStorageConfig:{namespace:'product_data_storage',updateRequestConfig:{method:'GET',dataType:'json'},className:'DataStorage'}},initialize:function(){this._super();if(window.checkout&&window.checkout.baseUrl){this.initIdsStorage();}\nthis.initDataStorage();return this;},initIdsStorage:function(){storage.onStorageInit(this.identifiersConfig.namespace,this.idsStorageHandler.bind(this));return this;},initDataStorage:function(){storage.onStorageInit(this.productStorageConfig.namespace,this.dataStorageHandler.bind(this));return this;},dataStorageHandler:function(dataStorage){this.productStorage=dataStorage;this.productStorage.add(this.data.items);},idsStorageHandler:function(idsStorage){this.idsStorage=idsStorage;this.idsStorage.add(this.getIdentifiers());},getIdentifiers:function(){var result={},productCurrentScope=this.data.productCurrentScope,scopeId=productCurrentScope==='store'?window.checkout.storeId:productCurrentScope==='group'?window.checkout.storeGroupId:window.checkout.websiteId;_.each(this.data.items,function(item,key){result[productCurrentScope+'-'+scopeId+'-'+key]={'added_at':new Date().getTime()/ 1000,'product_id':key,'scope_id':scopeId};},this);return result;}});});","Magento_Catalog/js/view/compare-products.min.js":"define(['uiComponent','Magento_Customer/js/customer-data','jquery','underscore','mage/mage','mage/decorate'],function(Component,customerData,$,_){'use strict';var sidebarInitialized=false,compareProductsReloaded=false;function initSidebar(){if(sidebarInitialized){return;}\nsidebarInitialized=true;$('[data-role=compare-products-sidebar]').decorate('list',true);}\nreturn Component.extend({initialize:function(){this._super();this.compareProducts=customerData.get('compare-products');if(!compareProductsReloaded&&!_.isEmpty(this.compareProducts())&&_.indexOf(customerData.getExpiredSectionNames(),'compare-products')===-1&&window.checkout&&window.checkout.websiteId&&window.checkout.websiteId!==this.compareProducts().websiteId){this.compareProducts().count=0;customerData.reload(['compare-products'],false);compareProductsReloaded=true;}\ninitSidebar();}});});","Magento_Catalog/js/view/image.min.js":"define(['uiComponent'],function(Component){'use strict';return Component.extend({initialize:function(){this._super();this.template=window.checkout.imageTemplate||this.template;}});});","Magento_Catalog/product/view/validation.min.js":"define(['jquery','jquery-ui-modules/widget','mage/validation/validation'],function($){'use strict';$.widget('mage.validation',$.mage.validation,{options:{radioCheckboxClosest:'ul, ol'},errorPlacement:function(error,element){var messageBox,dataValidate;if($(element).hasClass('datetime-picker')){element=$(element).parent();if(element.parent().find('.mage-error').length){return;}}\nif(element.attr('data-errors-message-box')){messageBox=$(element.attr('data-errors-message-box'));messageBox.html(error);return;}\ndataValidate=element.attr('data-validate');if(dataValidate&&dataValidate.indexOf('validate-one-checkbox-required-by-name')>0){error.appendTo('#links-advice-container');}else if(element.is(':radio, :checkbox')){element.closest(this.radioCheckboxClosest).after(error);}else{element.after(error);}},highlight:function(element,errorClass){var dataValidate=$(element).attr('data-validate');if(dataValidate&&dataValidate.indexOf('validate-required-datetime')>0){$(element).parent().find('.datetime-picker').each(function(){$(this).removeClass(errorClass);if($(this).val().length===0){$(this).addClass(errorClass);}});}else if($(element).is(':radio, :checkbox')){$(element).closest(this.radioCheckboxClosest).addClass(errorClass);}else{$(element).addClass(errorClass);}},unhighlight:function(element,errorClass){var dataValidate=$(element).attr('data-validate');if(dataValidate&&dataValidate.indexOf('validate-required-datetime')>0){$(element).parent().find('.datetime-picker').removeClass(errorClass);}else if($(element).is(':radio, :checkbox')){$(element).closest(this.radioCheckboxClosest).removeClass(errorClass);}else{$(element).removeClass(errorClass);}}});return $.mage.validation;});"} 3}});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.