polotno-node 0.1.18 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client.beff6260.js → client.3b178911.js} +153 -111
- package/dist/client.html +1 -1
- package/index.js +30 -13
- package/package.json +3 -3
|
@@ -14,7 +14,7 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcel
|
|
|
14
14
|
"use strict";function _(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_)}catch(O){console.error(O)}}}_(),module.exports=require("./cjs/react-dom.production.min.js");
|
|
15
15
|
},{"./cjs/react-dom.production.min.js":"jF7N"}],"BzvP":[function(require,module,exports) {
|
|
16
16
|
var global = arguments[3];
|
|
17
|
-
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlowCancellationError=or,exports._allowStateChanges=_t,exports.runInAction=exports._allowStateChangesInsideComputed=Bn,exports._allowStateReadsEnd=Ut,exports._allowStateReadsStart=It,exports._endAction=dt,exports._getAdministration=Wi,exports._getGlobalState=Ft,exports._interceptReads=vr,exports._isComputingDerivation=Pt,exports._resetGlobalState=Yt,exports._startAction=vt,exports.autorun=Mn,exports.configure=$n,exports.createAtom=Q,exports.defineProperty=Tr,exports.entries=Sr,exports.extendObservable=Qn,exports.flowResult=fr,exports.get=Pr,exports.getAtom=zi,exports.getDebugName=Xi,exports.getDependencyTree=Zn,exports.getObserverTree=tr,exports.has=Er,exports.intercept=dr,exports.isAction=Ln,exports.isComputed=yr,exports.isComputedProp=gr,exports.isFlow=hr,exports.isFlowCancellationError=ar,exports.isObservable=Or,exports.isObservableArray=pi,exports.isObservableObject=Ni,exports.isObservableProp=xr,exports.keys=wr,exports.makeAutoObservable=ti,exports.makeObservable=Zr,exports.observe=Rr,exports.onBecomeObserved=zn,exports.onBecomeUnobserved=Wn,exports.onReactionError=fn,exports.ownKeys=Cr,exports.reaction=Kn,exports.remove=kr,exports.set=jr,exports.spy=wn,exports.toJS=Lr,exports.trace=Mr,exports.transaction=Ur,exports.untracked=Bt,exports.values=Ar,exports.when=Kr,exports.override=exports.observable=exports.isObservableSet=exports.isObservableMap=exports.isBoxedObservable=exports.flow=exports.computed=exports.comparer=exports.action=exports._autoAction=exports.Reaction=exports.ObservableSet=exports.ObservableMap=exports.$mobx=void 0;var t={0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"},n={};function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var i={};function o(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:i}var a=Object.assign,s=Object.getOwnPropertyDescriptor,u=Object.defineProperty,c=Object.prototype,l=[];Object.freeze(l);var f={};Object.freeze(f);var h="undefined"!=typeof Proxy,v=Object.toString();function d(){h||r("Proxy not available")}function _(e){0}function p(){return++Wt.mobxGuid}function b(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var y=function(){};function g(e){return"function"==typeof e}function m(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function O(e){return null!==e&&"object"==typeof e}function x(e){var t;if(!O(e))return!1;var n=Object.getPrototypeOf(e);return null==n||(null==(t=n.constructor)?void 0:t.toString())===v}function w(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function A(e,t,n){u(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function S(e,t,n){u(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function j(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return O(e)&&!0===e[n]}}function k(e){return e instanceof Map}function E(e){return e instanceof Set}var P=void 0!==Object.getOwnPropertySymbols;function T(e){var t=Object.keys(e);if(!P)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return c.propertyIsEnumerable.call(e,t)})):t}var C="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:P?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function R(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function V(e){return null===e?null:"object"==typeof e?""+e:e}function N(e,t){return c.hasOwnProperty.call(e,t)}var D=Object.getOwnPropertyDescriptors||function(e){var t={};return C(e).forEach(function(n){t[n]=s(e,n)}),t};function B(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)}}function L(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),e}function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function I(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=K(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var H=Symbol("mobx-stored-annotations");function z(e){return Object.assign(function(t,n){W(t,n,e)},e)}function W(e,t,n){N(e,H)||A(e,H,M({},e[H])),X(e,n,t),le(n)||(e[H][t]=n)}function X(e,t,n){}function F(e){return N(e,H)||A(e,H,M({},e[H])),e[H]}var Y=Symbol("mobx administration");exports.$mobx=Y;var J=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=xt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return rn(this)},t.reportChanged=function(){tn(),on(this),nn()},t.toString=function(){return this.name_},e}(),$=j("Atom",J);function Q(e,t,n){void 0===t&&(t=y),void 0===n&&(n=y);var r=new J(e);return t!==y&&zn(r,t),n!==y&&Wn(r,n),r}function Z(e,t){return e===t}function ee(e,t){return Yi(e,t)}function te(e,t){return Yi(e,t,1)}function ne(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}var re={identity:Z,structural:ee,default:ne,shallow:te};function ie(e,t,n){return Or(e)?e:Array.isArray(e)?Qe.array(e,{name:n}):x(e)?Qe.object(e,void 0,{name:n}):k(e)?Qe.map(e,{name:n}):E(e)?Qe.set(e,{name:n}):"function"!=typeof e||Ln(e)||hr(e)?e:w(e)?cr(e):Dn(n,e)}function oe(e,t,n){return null==e?e:Ni(e)||pi(e)||wi(e)||ki(e)?e:Array.isArray(e)?Qe.array(e,{name:n,deep:!1}):x(e)?Qe.object(e,void 0,{name:n,deep:!1}):k(e)?Qe.map(e,{name:n,deep:!1}):E(e)?Qe.set(e,{name:n,deep:!1}):void 0}function ae(e){return e}function se(e,t){return Yi(e,t)?t:e}exports.comparer=re;var ue="override",ce=z({annotationType_:ue,make_:fe,extend_:he});function le(e){return e.annotationType_===ue}function fe(e,t){return 0}function he(e,t,n,i){r("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function ve(e,t){return{annotationType_:e,options_:t,make_:de,extend_:_e}}function de(e,t,n,r){var i;if(null==(i=this.options_)?void 0:i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Ln(n.value))return 1;var o=be(e,this,t,n,!1);return u(r,t,o),2}function _e(e,t,n,r){var i=be(e,this,t,n);return e.defineProperty_(t,i,r)}function pe(e,t,n,r){t.annotationType_,r.value}function be(e,t,n,r,i){var o,a,s,u,c,l,f;void 0===i&&(i=Wt.safeDescriptors),pe(e,t,n,r);var h,v=r.value;(null==(o=t.options_)?void 0:o.bound)&&(v=v.bind(null!=(h=e.proxy_)?h:e.target_));return{value:ft(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),v,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u,(null==(l=t.options_)?void 0:l.bound)?null!=(f=e.proxy_)?f:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ye(e,t){return{annotationType_:e,options_:t,make_:ge,extend_:me}}function ge(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if((null==(i=this.options_)?void 0:i.bound)&&!hr(e.target_[t])&&null===this.extend_(e,t,n,!1))return 0;if(hr(n.value))return 1;var o=xe(e,this,t,n,!1,!1);return u(r,t,o),2}function me(e,t,n,r){var i,o=xe(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,r)}function Oe(e,t,n,r){t.annotationType_,r.value}function xe(e,t,n,r,i,o){void 0===o&&(o=Wt.safeDescriptors),Oe(e,t,n,r);var a,s=r.value;i&&(s=s.bind(null!=(a=e.proxy_)?a:e.target_));return{value:cr(s),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function we(e,t){return{annotationType_:e,options_:t,make_:Ae,extend_:Se}}function Ae(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Se(e,t,n,r){return je(e,this,t,n),e.defineComputedProperty_(t,M({},this.options_,{get:n.get,set:n.set}),r)}function je(e,t,n,r){t.annotationType_,r.get}function ke(e,t){return{annotationType_:e,options_:t,make_:Ee,extend_:Pe}}function Ee(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Pe(e,t,n,r){var i,o;return Te(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:ie,r)}function Te(e,t,n,r){t.annotationType_}exports.override=ce;var Ce="true",Re=Ve();function Ve(e){return{annotationType_:Ce,options_:e,make_:Ne,extend_:De}}function Ne(e,t,n,r){var i,o,a,s;if(n.get)return ot.make_(e,t,n,r);if(n.set){var c=ft(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!Wt.safeDescriptors||e.isPlainObject_,set:c})?0:2:(u(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&"function"==typeof n.value)return w(n.value)?((null==(s=this.options_)?void 0:s.autoBind)?cr.bound:cr).make_(e,t,n,r):((null==(a=this.options_)?void 0:a.autoBind)?Dn.bound:Dn).make_(e,t,n,r);var l,f=!1===(null==(i=this.options_)?void 0:i.deep)?Qe.ref:Qe;"function"==typeof n.value&&(null==(o=this.options_)?void 0:o.autoBind)&&(n.value=n.value.bind(null!=(l=e.proxy_)?l:e.target_));return f.make_(e,t,n,r)}function De(e,t,n,r){var i,o,a;if(n.get)return ot.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!Wt.safeDescriptors||e.isPlainObject_,set:ft(t.toString(),n.set)},r);"function"==typeof n.value&&(null==(i=this.options_)?void 0:i.autoBind)&&(n.value=n.value.bind(null!=(a=e.proxy_)?a:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Qe.ref:Qe).extend_(e,t,n,r)}var Be="observable",Le="observable.ref",Me="observable.shallow",Ie="observable.struct",Ue={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Ke(e){return e||Ue}Object.freeze(Ue);var Ge=ke(Be),qe=ke(Le,{enhancer:ae}),He=ke(Me,{enhancer:oe}),ze=ke(Ie,{enhancer:se}),We=z(Ge);function Xe(e){return!0===e.deep?ie:!1===e.deep?ae:Ye(e.defaultDecorator)}function Fe(e){var t;return e?null!=(t=e.defaultDecorator)?t:Ve(e):void 0}function Ye(e){var t,n;return e&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:ie}function Je(e,t,n){if(!m(t))return Or(e)?e:x(e)?Qe.object(e,t,n):Array.isArray(e)?Qe.array(e,t):k(e)?Qe.map(e,t):E(e)?Qe.set(e,t):"object"==typeof e&&null!==e?e:Qe.box(e,t);W(e,t,Ge)}Object.assign(Je,We);var $e={box:function(e,t){var n=Ke(t);return new mt(e,Xe(n),n.name,!0,n.equals)},array:function(e,t){var n=Ke(t);return(!1===Wt.useProxies||!1===n.proxy?Hi:si)(e,Xe(n),n.name)},map:function(e,t){var n=Ke(t);return new mi(e,Xe(n),n.name)},set:function(e,t){var n=Ke(t);return new ji(e,Xe(n),n.name)},object:function(e,t,n){return Qn(!1===Wt.useProxies||!1===(null==n?void 0:n.proxy)?Ci({},n):Wr({},n),e,t)},ref:z(qe),shallow:z(He),deep:We,struct:z(ze)},Qe=a(Je,$e);exports.observable=Qe;var Ze,et,tt="computed",nt="computed.struct",rt=we(tt),it=we(nt,{equals:re.structural}),ot=function(e,t){if(m(t))return W(e,t,rt);if(x(e))return z(we(tt,e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new At(n)};exports.computed=ot,Object.assign(ot,rt),ot.struct=z(it);var at,st=0,ut=1,ct=null!=(Ze=null==(et=s(function(){},"name"))?void 0:et.configurable)&&Ze,lt={value:"action",configurable:!0,writable:!1,enumerable:!1};function ft(e,t,n,r){function i(){return ht(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,ct&&(lt.value=e,Object.defineProperty(i,"name",lt)),i}function ht(e,t,n,r,i){var o=vt(e,t,r,i);try{return n.apply(r,i)}catch(a){throw o.error_=a,a}finally{dt(o)}}function vt(e,t,n,r){var i=0,o=Wt.trackingDerivation,a=!t||!o;tn();var s=Wt.allowStateChanges;a&&(Lt(),s=pt(!0));var u={runAsAction_:a,prevDerivation_:o,prevAllowStateChanges_:s,prevAllowStateReads_:It(!0),notifySpy_:!1,startTime_:i,actionId_:ut++,parentActionId_:st};return st=u.actionId_,u}function dt(e){st!==e.actionId_&&r(30),st=e.parentActionId_,void 0!==e.error_&&(Wt.suppressReactionErrors=!0),bt(e.prevAllowStateChanges_),Ut(e.prevAllowStateReads_),nn(),e.runAsAction_&&Mt(e.prevDerivation_),Wt.suppressReactionErrors=!1}function _t(e,t){var n=pt(e);try{return t()}finally{bt(n)}}function pt(e){var t=Wt.allowStateChanges;return Wt.allowStateChanges=e,t}function bt(e){Wt.allowStateChanges=e}var yt="create";at=Symbol.toPrimitive;var gt,mt=function(e){function t(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=re.default),(a=e.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=o,a.value_=n(t,void 0,r),a}I(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==Wt.UNCHANGED){yn();0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(Tt(this),Xr(this)){var t=Yr(this,{object:this,type:ri,newValue:e});if(!t)return Wt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Wt.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Jr(this)&&Qr(this,{type:ri,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Fr(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ri,newValue:this.value_,oldValue:void 0}),$r(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return V(this.get())},n[at]=function(){return this.valueOf()},t}(J),Ot=j("ObservableValue",mt);exports.isBoxedObservable=Ot,gt=Symbol.toPrimitive;var xt,wt,At=function(){function e(e){this.dependenciesState_=xt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=xt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new jt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=wt.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||r(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=ft("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?re.structural:re.default),this.scope_=e.context,this.requiresReaction_=!!e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){sn(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing_&&r(32,this.name_,this.derivation),0!==Wt.inBatch||0!==this.observers_.size||this.keepAlive_){if(rn(this),Et(this)){var e=Wt.trackingContext;this.keepAlive_&&!e&&(Wt.trackingContext=this),this.trackAndCompute()&&an(this),Wt.trackingContext=e}}else Et(this)&&(this.warnAboutUntrackedRead_(),tn(),this.value_=this.computeValue_(!1),nn());var t=this.value_;if(kt(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter_&&r(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else r(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===xt.NOT_TRACKING_,n=this.computeValue_(!0),r=t||kt(e)||kt(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){this.isComputing_=!0;var t,n=pt(!1);if(e)t=Rt(this,this.derivation,this.scope_);else if(!0===Wt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(r){t=new jt(r)}return bt(n),this.isComputing_=!1,t},t.suspend_=function(){this.keepAlive_||(Dt(this),this.value_=void 0)},t.observe_=function(e,t){var n=this,r=!0,i=void 0;return Mn(function(){var o=n.get();if(!r||t){var a=Lt();e({observableKind:"computed",debugObjectName:n.name_,type:ri,object:n,newValue:o,oldValue:i}),Mt(a)}r=!1,i=o})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return V(this.get())},t[gt]=function(){return this.valueOf()},e}(),St=j("ComputedValue",At);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(xt||(xt={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(wt||(wt={}));var jt=function(e){this.cause=void 0,this.cause=e};function kt(e){return e instanceof jt}function Et(e){switch(e.dependenciesState_){case xt.UP_TO_DATE_:return!1;case xt.NOT_TRACKING_:case xt.STALE_:return!0;case xt.POSSIBLY_STALE_:for(var t=It(!0),n=Lt(),r=e.observing_,i=r.length,o=0;o<i;o++){var a=r[o];if(St(a)){if(Wt.disableErrorBoundaries)a.get();else try{a.get()}catch(s){return Mt(n),Ut(t),!0}if(e.dependenciesState_===xt.STALE_)return Mt(n),Ut(t),!0}}return Kt(e),Mt(n),Ut(t),!1}}function Pt(){return null!==Wt.trackingDerivation}function Tt(e){}function Ct(e){0}function Rt(e,t,n){var r=It(!0);Kt(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++Wt.runId;var i,o=Wt.trackingDerivation;if(Wt.trackingDerivation=e,Wt.inBatch++,!0===Wt.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(a){i=new jt(a)}return Wt.inBatch--,Wt.trackingDerivation=o,Nt(e),Vt(e),Ut(r),i}function Vt(e){}function Nt(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=xt.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue_&&(s.diffValue_=1,i!==a&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}for(n.length=i,e.newObserving_=null,o=t.length;o--;){var u=t[o];0===u.diffValue_&&Zt(u,e),u.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,Qt(c,e))}r!==xt.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Dt(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)Zt(t[n],e);e.dependenciesState_=xt.NOT_TRACKING_}function Bt(e){var t=Lt();try{return e()}finally{Mt(t)}}function Lt(){var e=Wt.trackingDerivation;return Wt.trackingDerivation=null,e}function Mt(e){Wt.trackingDerivation=e}function It(e){var t=Wt.allowStateReads;return Wt.allowStateReads=e,t}function Ut(e){Wt.allowStateReads=e}function Kt(e){if(e.dependenciesState_!==xt.UP_TO_DATE_){e.dependenciesState_=xt.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=xt.UP_TO_DATE_}}var Gt=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],qt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Ht=!0,zt=!1,Wt=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Ht=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new qt).version&&(Ht=!1),Ht?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new qt):(setTimeout(function(){zt||r(35)},1),new qt)}();function Xt(){if((Wt.pendingReactions.length||Wt.inBatch||Wt.isRunningReactions)&&r(36),zt=!0,Ht){var e=o();0==--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Wt=new qt}}function Ft(){return Wt}function Yt(){var e=new qt;for(var t in e)-1===Gt.indexOf(t)&&(Wt[t]=e[t]);Wt.allowStateChanges=!Wt.enforceActions}function Jt(e){return e.observers_&&e.observers_.size>0}function $t(e){return e.observers_}function Qt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function Zt(e,t){e.observers_.delete(t),0===e.observers_.size&&en(e)}function en(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,Wt.pendingUnobservations.push(e))}function tn(){Wt.inBatch++}function nn(){if(0==--Wt.inBatch){dn();for(var e=Wt.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof At&&n.suspend_())}Wt.pendingUnobservations=[]}}function rn(e){Ct(e);var t=Wt.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&Wt.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&Wt.inBatch>0&&en(e),!1)}function on(e){e.lowestObserverState_!==xt.STALE_&&(e.lowestObserverState_=xt.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===xt.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=xt.STALE_}))}function an(e){e.lowestObserverState_!==xt.STALE_&&(e.lowestObserverState_=xt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===xt.POSSIBLY_STALE_?t.dependenciesState_=xt.STALE_:t.dependenciesState_===xt.UP_TO_DATE_&&(e.lowestObserverState_=xt.UP_TO_DATE_)}))}function sn(e){e.lowestObserverState_===xt.UP_TO_DATE_&&(e.lowestObserverState_=xt.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===xt.UP_TO_DATE_&&(e.dependenciesState_=xt.POSSIBLY_STALE_,e.onBecomeStale_())}))}function un(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===wt.BREAK){var n=[];cn(Zn(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof At?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function cn(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return cn(e,t,n+1)}))}var ln=function(){function e(e,t,n,r){void 0===e&&(e="Reaction"),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=xt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=wt.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,Wt.pendingReactions.push(this),dn())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){tn(),this.isScheduled_=!1;var e=Wt.trackingContext;if(Wt.trackingContext=this,Et(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}Wt.trackingContext=e,nn()}},t.track=function(e){if(!this.isDisposed_){tn();yn();0,this.isRunning_=!0;var t=Wt.trackingContext;Wt.trackingContext=this;var n=Rt(this,e,void 0);Wt.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Dt(this),kt(n)&&this.reportExceptionInDerivation_(n.cause),nn()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Wt.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";Wt.suppressReactionErrors||console.error(n,e),Wt.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(tn(),Dt(this),nn()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[Y]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),Mr(this,e)},e}();function fn(e){return Wt.globalReactionErrorHandlers.push(e),function(){var t=Wt.globalReactionErrorHandlers.indexOf(e);t>=0&&Wt.globalReactionErrorHandlers.splice(t,1)}}exports.Reaction=ln;var hn=100,vn=function(e){return e()};function dn(){Wt.inBatch>0||Wt.isRunningReactions||vn(_n)}function _n(){Wt.isRunningReactions=!0;for(var e=Wt.pendingReactions,t=0;e.length>0;){++t===hn&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}Wt.isRunningReactions=!1}var pn=j("Reaction",ln);function bn(e){var t=vn;vn=function(n){return e(function(){return t(n)})}}function yn(){return!1}function gn(e){}function mn(e){}var On={type:"report-end",spyReportEnd:!0};function xn(e){}function wn(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var An="action",Sn="action.bound",jn="autoAction",kn="autoAction.bound",En="<unnamed action>",Pn=ve(An),Tn=ve(Sn,{bound:!0}),Cn=ve(jn,{autoAction:!0}),Rn=ve(kn,{autoAction:!0,bound:!0});function Vn(e){return function(t,n){return g(t)?ft(t.name||En,t,e):g(n)?ft(t,n,e):m(n)?W(t,n,e?Cn:Pn):m(t)?z(ve(e?jn:An,{name:t,autoAction:e})):void 0}}var Nn=Vn(!1);exports.action=Nn,Object.assign(Nn,Pn);var Dn=Vn(!0);function Bn(e){return ht(e.name||En,!1,e,this,void 0)}function Ln(e){return g(e)&&!0===e.isMobxAction}function Mn(e,t){var n,r;void 0===t&&(t=f);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)i=new ln(o,function(){this.track(u)},t.onError,t.requiresObservable);else{var a=Un(t),s=!1;i=new ln(o,function(){s||(s=!0,a(function(){s=!1,i.isDisposed_||i.track(u)}))},t.onError,t.requiresObservable)}function u(){e(i)}return i.schedule_(),i.getDisposer_()}exports._autoAction=Dn,Object.assign(Dn,Cn),Nn.bound=z(Tn),Dn.bound=z(Rn);var In=function(e){return e()};function Un(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:In}function Kn(e,t,n){var r;void 0===n&&(n=f);var i,o,a=null!=(r=n.name)?r:"Reaction",s=Nn(a,n.onError?Gn(n.onError,t):t),u=!n.scheduler&&!n.delay,c=Un(n),l=!0,h=!1,v=n.compareStructural?re.structural:n.equals||re.default,d=new ln(a,function(){l||u?_():h||(h=!0,c(_))},n.onError,n.requiresObservable);function _(){if(h=!1,!d.isDisposed_){var t=!1;d.track(function(){var n=_t(!1,function(){return e(d)});t=l||!v(i,n),o=i,i=n}),l&&n.fireImmediately?s(i,o,d):!l&&t&&s(i,o,d),l=!1}}return d.schedule_(),d.getDisposer_()}function Gn(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}var qn="onBO",Hn="onBUO";function zn(e,t,n){return Xn(qn,e,t,n)}function Wn(e,t,n){return Xn(Hn,e,t,n)}function Xn(e,t,n,r){var i="function"==typeof r?zi(t,n):zi(t),o=g(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}var Fn="never",Yn="always",Jn="observed";function $n(e){!0===e.isolateGlobalState&&Xt();var t=e.useProxies,n=e.enforceActions;if(void 0!==t&&(Wt.useProxies=t===Yn||t!==Fn&&"undefined"!=typeof Proxy),"ifavailable"===t&&(Wt.verifyProxies=!0),void 0!==n){var r=n===Yn?Yn:n===Jn;Wt.enforceActions=r,Wt.allowStateChanges=!0!==r&&r!==Yn}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Wt[t]=!!e[t])}),Wt.allowStateReads=!Wt.observableRequiresReaction,e.reactionScheduler&&bn(e.reactionScheduler)}function Qn(e,t,n,r){var i=D(t),o=Ci(e,r)[Y];tn();try{C(i).forEach(function(e){o.extend_(e,i[e],!n||(!(e in n)||n[e]))})}finally{nn()}return e}function Zn(e,t){return er(zi(e,t))}function er(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=rr(e.observing_).map(er)),t}function tr(e,t){return nr(zi(e,t))}function nr(e){var t={name:e.name_};return Jt(e)&&(t.observers=Array.from($t(e)).map(nr)),t}function rr(e){return Array.from(new Set(e))}var ir=0;function or(){this.message="FLOW_CANCELLED"}function ar(e){return e instanceof or}or.prototype=Object.create(Error.prototype);var sr=ye("flow"),ur=ye("flow.bound",{bound:!0}),cr=Object.assign(function(e,t){if(m(t))return W(e,t,sr);var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++ir,o=Nn(r+" - runid: "+i+" - init",n).apply(this,t),a=void 0,s=new Promise(function(t,n){var s=0;function u(e){var t;a=void 0;try{t=Nn(r+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(u){return n(u)}l(t)}function c(e){var t;a=void 0;try{t=Nn(r+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(u){return n(u)}l(t)}function l(e){if(!g(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)});return s.cancel=Nn(r+" - runid: "+i+" - cancel",function(){try{a&&lr(a);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(y,y),lr(n),e(new or)}catch(r){e(r)}}),s};return i.isMobXFlow=!0,i},sr);function lr(e){g(e.cancel)&&e.cancel()}function fr(e){return e}function hr(e){return!0===(null==e?void 0:e.isMobXFlow)}function vr(e,t,n){var r;return wi(e)||pi(e)||Ot(e)?r=Wi(e):Ni(e)&&(r=Wi(e,t)),r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0}}function dr(e,t,n){return g(n)?pr(e,t,n):_r(e,t)}function _r(e,t){return Wi(e).intercept_(t)}function pr(e,t,n){return Wi(e,t).intercept_(n)}function br(e,t){if(void 0===t)return St(e);if(!1===Ni(e))return!1;if(!e[Y].values_.has(t))return!1;var n=zi(e,t);return St(n)}function yr(e){return br(e)}function gr(e,t){return br(e,t)}function mr(e,t){return!!e&&(void 0!==t?!!Ni(e)&&e[Y].values_.has(t):Ni(e)||!!e[Y]||$(e)||pn(e)||St(e))}function Or(e){return mr(e)}function xr(e,t){return mr(e,t)}function wr(e){return Ni(e)?e[Y].keys_():wi(e)||ki(e)?Array.from(e.keys()):pi(e)?e.map(function(e,t){return t}):void r(5)}function Ar(e){return Ni(e)?wr(e).map(function(t){return e[t]}):wi(e)?wr(e).map(function(t){return e.get(t)}):ki(e)?Array.from(e.values()):pi(e)?e.slice():void r(6)}function Sr(e){return Ni(e)?wr(e).map(function(t){return[t,e[t]]}):wi(e)?wr(e).map(function(t){return[t,e.get(t)]}):ki(e)?Array.from(e.entries()):pi(e)?e.map(function(e,t){return[t,e]}):void r(7)}function jr(e,t,n){if(2!==arguments.length||ki(e))Ni(e)?e[Y].set_(t,n):wi(e)?e.set(t,n):ki(e)?e.add(t):pi(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&r("Invalid index: '"+t+"'"),tn(),t>=e.length&&(e.length=t+1),e[t]=n,nn()):r(8);else{tn();var i=t;try{for(var o in i)jr(e,o,i[o])}finally{nn()}}}function kr(e,t){Ni(e)?e[Y].delete_(t):wi(e)?e.delete(t):ki(e)?e.delete(t):pi(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):r(9)}function Er(e,t){return Ni(e)?e[Y].has_(t):wi(e)?e.has(t):ki(e)?e.has(t):pi(e)?t>=0&&t<e.length:void r(10)}function Pr(e,t){if(Er(e,t))return Ni(e)?e[Y].get_(t):wi(e)?e.get(t):pi(e)?e[t]:void r(11)}function Tr(e,t,n){if(Ni(e))return e[Y].defineProperty_(t,n);r(39)}function Cr(e){if(Ni(e))return e[Y].ownKeys_();r(38)}function Rr(e,t,n,r){return g(n)?Nr(e,t,n,r):Vr(e,t,n)}function Vr(e,t,n){return Wi(e).observe_(t,n)}function Nr(e,t,n,r){return Wi(e,t).observe_(n,r)}function Dr(e,t,n){return e.set(t,n),n}function Br(e,t){if(null==e||"object"!=typeof e||e instanceof Date||!Or(e))return e;if(Ot(e)||St(e))return Br(e.get(),t);if(t.has(e))return t.get(e);if(pi(e)){var n=Dr(t,e,new Array(e.length));return e.forEach(function(e,r){n[r]=Br(e,t)}),n}if(ki(e)){var r=Dr(t,e,new Set);return e.forEach(function(e){r.add(Br(e,t))}),r}if(wi(e)){var i=Dr(t,e,new Map);return e.forEach(function(e,n){i.set(n,Br(e,t))}),i}var o=Dr(t,e,{});return Cr(e).forEach(function(n){c.propertyIsEnumerable.call(e,n)&&(o[n]=Br(e[n],t))}),o}function Lr(e,t){return Br(e,new Map)}function Mr(){r("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=Ir(n);if(!o)return r("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===wt.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled"),o.isTracing_=e?wt.BREAK:wt.LOG}function Ir(e){switch(e.length){case 0:return Wt.trackingDerivation;case 1:return zi(e[0]);case 2:return zi(e[0],e[1])}}function Ur(e,t){void 0===t&&(t=void 0),tn();try{return e.apply(t)}finally{nn()}}function Kr(e,t,n){return 1===arguments.length||t&&"object"==typeof t?qr(e,t):Gr(e,t,n||{})}function Gr(e,t,n){var r;if("number"==typeof n.timeout){var i=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!a[Y].isDisposed_){if(a(),!n.onError)throw i;n.onError(i)}},n.timeout)}n.name="When";var o=ft("When-effect",t),a=Mn(function(t){_t(!1,e)&&(t.dispose(),r&&clearTimeout(r),o())},n);return a}function qr(e,t){var n;var r=new Promise(function(r,i){var o=Gr(e,r,M({},t,{onError:i}));n=function(){o(),i("WHEN_CANCELLED")}});return r.cancel=n,r}function Hr(e){return e[Y]}exports.flow=cr,cr.bound=z(ur);var zr={has:function(e,t){return Hr(e).has_(t)},get:function(e,t){return Hr(e).get_(t)},set:function(e,t,n){var r;return!!m(t)&&(null==(r=Hr(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!m(t)&&(null==(n=Hr(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=Hr(e).defineProperty_(t,n))||r},ownKeys:function(e){return Hr(e).ownKeys_()},preventExtensions:function(e){r(13)}};function Wr(e,t){var n,r;return d(),null!=(r=(n=(e=Ci(e,t))[Y]).proxy_)?r:n.proxy_=new Proxy(e,zr)}function Xr(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Fr(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),b(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Yr(e,t){var n=Lt();try{for(var i=[].concat(e.interceptors_||[]),o=0,a=i.length;o<a&&((t=i[o](t))&&!t.type&&r(14),t);o++);return t}finally{Mt(n)}}function Jr(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function $r(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),b(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Qr(e,t){var n=Lt(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);Mt(n)}}function Zr(e,t,n){var r=Ci(e,n)[Y];tn();try{null!=t||(t=F(e)),C(t).forEach(function(e){return r.make_(e,t[e])})}finally{nn()}return e}var ei=Symbol("mobx-keys");function ti(e,t,n){if(x(e))return Qn(e,e,t,n);var r=Ci(e,n)[Y];if(!e[ei]){var i=Object.getPrototypeOf(e),o=new Set([].concat(C(e),C(i)));o.delete("constructor"),o.delete(Y),A(i,ei,o)}tn();try{e[ei].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}finally{nn()}return e}var ni="splice",ri="update",ii=1e4,oi={get:function(e,t){var n=e[Y];return t===Y?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?N(ui,t)?ui[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[Y];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){r(15)}},ai=function(){function e(e,t,n,r){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new J(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Fr(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),$r(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&r("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&qi(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Tt(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=l),Xr(this)){var o=Yr(this,{object:this.proxy_,type:ni,index:e,removedCount:t,added:n});if(!o)return l;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<ii)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length=e+n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&yn(),i=Jr(this),o=i||r?{observableKind:"array",object:this.proxy_,type:ri,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&Qr(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&yn(),i=Jr(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:ni,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&Qr(this,o)},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){Tt(this.atom_);var i=n[e];if(Xr(this)){var o=Yr(this,{type:ri,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,i))!==i&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else e===n.length?this.spliceWithArray_(e,0,[t]):r(17,e,n.length)},e}();function si(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),d();var i=new ai(n,t,r,!1);S(i.values_,Y,i);var o=new Proxy(i.values_,oi);if(i.proxy_=o,e&&e.length){var a=pt(!0);i.spliceWithArray_(0,0,e),bt(a)}return o}var ui={clear:function(){return this.splice(0)},replace:function(e){var t=this[Y];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[Y];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[Y].spliceWithArray_(e,t,n)},push:function(){for(var e=this[Y],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[Y].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Y],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Wt.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Wt.trackingDerivation&&r(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[Y],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function ci(e,t){"function"==typeof Array.prototype[e]&&(ui[e]=t(e))}function li(e){return function(){var t=this[Y];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function fi(e){return function(t,n){var r=this,i=this[Y];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function hi(e){return function(){var t=this,n=this[Y];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}ci("concat",li),ci("flat",li),ci("includes",li),ci("indexOf",li),ci("join",li),ci("lastIndexOf",li),ci("slice",li),ci("toString",li),ci("toLocaleString",li),ci("every",fi),ci("filter",fi),ci("find",fi),ci("findIndex",fi),ci("flatMap",fi),ci("forEach",fi),ci("map",fi),ci("some",fi),ci("reduce",hi),ci("reduceRight",hi);var vi,di,_i=j("ObservableArrayAdministration",ai);function pi(e){return O(e)&&_i(e[Y])}var bi={},yi="add",gi="delete";vi=Symbol.iterator,di=Symbol.toStringTag;var mi=function(){function e(e,t,n){void 0===t&&(t=ie),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Y]=bi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,g(Map)||r(18),this.keysAtom_=Q("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,this.merge(e)}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Wt.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new mt(this.has_(e),ae,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Wn(r,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Xr(this)){var r=Yr(this,{type:n?ri:yi,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Tt(this.keysAtom_),Xr(this))&&!Yr(this,{type:gi,object:this,name:e}))return!1;if(this.has_(e)){var n=yn(),r=Jr(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:gi,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Ur(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Qr(this,i),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Wt.UNCHANGED){var r=yn(),i=Jr(this),o=i||r?{observableKind:"map",debugObjectName:this.name_,type:ri,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&Qr(this,o)}},t.addValue_=function(e,t){var n=this;Tt(this.keysAtom_),Ur(function(){var r,i=new mt(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=yn(),i=Jr(this),o=i||r?{observableKind:"map",debugObjectName:this.name_,type:yi,object:this,name:e,newValue:t}:null;i&&Qr(this,o)},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return Qi({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){var e=this,t=this.keys();return Qi({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[vi]=function(){return this.entries()},t.forEach=function(e,t){for(var n,r=q(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},t.merge=function(e){var t=this;return wi(e)&&(e=new Map(e)),Ur(function(){x(e)?T(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):k(e)?(e.constructor!==Map&&r(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&r(20,e)}),this},t.clear=function(){var e=this;Ur(function(){Bt(function(){for(var t,n=q(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){var t=this;return Ur(function(){for(var n,r=Ai(e),i=new Map,o=!1,a=q(t.data_.keys());!(n=a()).done;){var s=n.value;if(!r.has(s))if(t.delete(s))o=!0;else{var u=t.data_.get(s);i.set(s,u)}}for(var c,l=q(r.entries());!(c=l()).done;){var f=c.value,h=f[0],v=f[1],d=t.data_.has(h);if(t.set(h,v),t.data_.has(h)){var _=t.data_.get(h);i.set(h,_),d||(o=!0)}}if(!o)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var p=t.data_.keys(),b=i.keys(),y=p.next(),g=b.next();!y.done;){if(y.value!==g.value){t.keysAtom_.reportChanged();break}y=p.next(),g=b.next()}t.data_=i}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return $r(this,e)},t.intercept_=function(e){return Fr(this,e)},L(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:di,get:function(){return"Map"}}]),e}();exports.ObservableMap=mi;var Oi,xi,wi=j("ObservableMap",mi);function Ai(e){if(k(e)||wi(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return r(21,e)}exports.isObservableMap=wi;var Si={};Oi=Symbol.iterator,xi=Symbol.toStringTag;var ji=function(){function e(e,t,n){void 0===t&&(t=ie),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[Y]=Si,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,g(Set)||r(22),this.atom_=Q(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;Ur(function(){Bt(function(){for(var t,n=q(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){for(var n,r=q(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){var t=this;if((Tt(this.atom_),Xr(this))&&!Yr(this,{type:yi,object:this,newValue:e}))return this;if(!this.has(e)){Ur(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var n=Jr(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:yi,object:this,newValue:e}:null;0,n&&Qr(this,r)}return this},t.delete=function(e){var t=this;if(Xr(this)&&!Yr(this,{type:gi,object:this,oldValue:e}))return!1;if(this.has(e)){var n=Jr(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:gi,object:this,oldValue:e}:null;return Ur(function(){t.atom_.reportChanged(),t.data_.delete(e)}),n&&Qr(this,r),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Qi({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return Qi({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},t.replace=function(e){var t=this;return ki(e)&&(e=new Set(e)),Ur(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):E(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&r("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return $r(this,e)},t.intercept_=function(e){return Fr(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Oi]=function(){return this.values()},L(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:xi,get:function(){return"Set"}}]),e}();exports.ObservableSet=ji;var ki=j("ObservableSet",ji);exports.isObservableSet=ki;var Ei=Object.create(null),Pi="remove",Ti=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Re),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new J("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof At)return n.set(t),!0;if(Xr(this)){var r=Yr(this,{type:ri,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==Wt.UNCHANGED){var i=Jr(this),o=i?{type:ri,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&Qr(this,o)}return!0},t.get_=function(e){return Wt.trackingDerivation&&!N(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),N(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Wt.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new mt(e in this.target_,ae,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(Bi(this,t,e),!(e in this.target_)){var n;if(null==(n=this.target_[H])?void 0:n[e])return;r(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==c;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Di(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);Bi(this,n,e);var i=n.extend_(this,e,t,r);return i&&Di(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{tn();var r=this.delete_(e);if(!r)return r;if(Xr(this)){var i=Yr(this,{object:this.proxy_||this.target_,name:e,type:yi,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=M({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else u(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{nn()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{tn();var i=this.delete_(e);if(!i)return i;if(Xr(this)){var o=Yr(this,{object:this.proxy_||this.target_,name:e,type:yi,newValue:t});if(!o)return null;t=o.newValue}var a=Vi(e),s={configurable:!Wt.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else u(this.target_,e,s);var c=new mt(t,n,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{nn()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{tn();var r=this.delete_(e);if(!r)return r;if(Xr(this))if(!Yr(this,{object:this.proxy_||this.target_,name:e,type:yi,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Vi(e),o={configurable:!Wt.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else u(this.target_,e,o);this.values_.set(e,new At(t)),this.notifyPropertyAddition_(e,void 0)}finally{nn()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!N(this.target_,e))return!0;if(Xr(this)&&!Yr(this,{object:this.proxy_||this.target_,name:e,type:Pi}))return null;try{var n,r;tn();var i,o=Jr(this),a=this.values_.get(e),u=void 0;if(!a&&o)u=null==(i=s(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof mt&&(u=a.value_),on(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var c={type:Pi,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:u,name:e};0,o&&Qr(this,c)}}finally{nn()}return!0},t.observe_=function(e,t){return $r(this,e)},t.intercept_=function(e){return Fr(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,i=Jr(this);if(i){var o=i?{type:yi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,i&&Qr(this,o)}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),C(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ci(e,t){var n;if(N(e,Y))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Ti(e,new Map,String(r),Fe(t));return A(e,Y,i),e}var Ri=j("ObservableObjectAdministration",Ti);function Vi(e){return Ei[e]||(Ei[e]={get:function(){return this[Y].getObservablePropValue_(e)},set:function(t){return this[Y].setObservablePropValue_(e,t)}})}function Ni(e){return!!O(e)&&Ri(e[Y])}function Di(e,t,n){var r;null==(r=e.target_[H])||delete r[n]}function Bi(e,t,n){}var Li=0,Mi=function(){};function Ii(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}Ii(Mi,Array.prototype);var Ui=function(e){function t(t,n,r,i){var o;void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this;var a=new ai(r,n,i,!0);if(a.proxy_=U(o),S(U(o),Y,a),t&&t.length){var s=pt(!0);o.spliceWithArray(0,0,t),bt(s)}return o}I(t,e);var n=t.prototype;return n.concat=function(){this[Y].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return pi(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Qi({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},L(t,[{key:"length",get:function(){return this[Y].getArrayLength_()},set:function(e){this[Y].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}]),t}(Mi);function Ki(e){return{enumerable:!1,configurable:!0,get:function(){return this[Y].get_(e)},set:function(t){this[Y].set_(e,t)}}}function Gi(e){u(Ui.prototype,""+e,Ki(e))}function qi(e){if(e>Li){for(var t=Li;t<e+100;t++)Gi(t);Li=e}}function Hi(e,t,n){return new Ui(e,t,n)}function zi(e,t){if("object"==typeof e&&null!==e){if(pi(e))return void 0!==t&&r(23),e[Y].atom_;if(ki(e))return e[Y];if(wi(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||r(25,t,Xi(e)),n}if(Ni(e)){if(!t)return r(26);var i=e[Y].values_.get(t);return i||r(27,t,Xi(e)),i}if($(e)||St(e)||pn(e))return e}else if(g(e)&&pn(e[Y]))return e[Y];r(28)}function Wi(e,t){return e||r(29),void 0!==t?Wi(zi(e,t)):$(e)||St(e)||pn(e)?e:wi(e)||ki(e)?e:e[Y]?e[Y]:void r(24,e)}function Xi(e,t){var n;if(void 0!==t)n=zi(e,t);else{if(Ln(e))return e.name;n=Ni(e)||wi(e)||ki(e)?Wi(e):zi(e)}return n.name_}Object.entries(ui).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&A(Ui.prototype,t,n)}),qi(1e3);var Fi=c.toString;function Yi(e,t,n){return void 0===n&&(n=-1),Ji(e,t,n)}function Ji(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if(!g(o)&&"object"!==o&&"object"!=typeof t)return!1;var a=Fi.call(e);if(a!==Fi.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=$i(e),t=$i(t);var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(g(u)&&u instanceof u&&g(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return i[l]===t;if(r.push(e),i.push(t),s){if((l=e.length)!==t.length)return!1;for(;l--;)if(!Ji(e[l],t[l],n-1,r,i))return!1}else{var f,h=Object.keys(e);if(l=h.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!N(t,f=h[l])||!Ji(e[f],t[f],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function $i(e){return pi(e)?e.slice():k(e)||wi(e)?Array.from(e.entries()):E(e)||ki(e)?Array.from(e.entries()):e}function Qi(e){return e[Symbol.iterator]=Zi,e}function Zi(){return this}function eo(e){return e instanceof Object&&"string"==typeof e.annotationType_&&g(e.make_)&&g(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===o()[e]&&r("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:wn,extras:{getDebugName:Xi},$mobx:Y});
|
|
17
|
+
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.FlowCancellationError=ar,exports._allowStateChanges=pt,exports.runInAction=exports._allowStateChangesInsideComputed=Ln,exports._allowStateReadsEnd=Kt,exports._allowStateReadsStart=Ut,exports._endAction=_t,exports._getAdministration=Xi,exports._getGlobalState=Yt,exports._interceptReads=dr,exports._isComputingDerivation=Tt,exports._resetGlobalState=Jt,exports._startAction=dt,exports.autorun=In,exports.configure=Qn,exports.createAtom=Z,exports.defineProperty=Cr,exports.entries=jr,exports.extendObservable=Zn,exports.flowResult=hr,exports.get=Tr,exports.getAtom=Wi,exports.getDebugName=Fi,exports.getDependencyTree=er,exports.getObserverTree=nr,exports.has=Pr,exports.intercept=_r,exports.isAction=Mn,exports.isComputed=gr,exports.isComputedProp=mr,exports.isFlow=vr,exports.isFlowCancellationError=sr,exports.isObservable=xr,exports.isObservableArray=bi,exports.isObservableObject=Di,exports.isObservableProp=wr,exports.keys=Ar,exports.makeAutoObservable=ni,exports.makeObservable=ei,exports.observe=Vr,exports.onBecomeObserved=Wn,exports.onBecomeUnobserved=Xn,exports.onReactionError=hn,exports.ownKeys=Rr,exports.reaction=Gn,exports.remove=Er,exports.set=kr,exports.spy=An,exports.toJS=Mr,exports.trace=Ir,exports.transaction=Kr,exports.untracked=Lt,exports.values=Sr,exports.when=Gr,exports.override=exports.observable=exports.isObservableSet=exports.isObservableMap=exports.isBoxedObservable=exports.flow=exports.computed=exports.comparer=exports.action=exports._autoAction=exports.Reaction=exports.ObservableSet=exports.ObservableMap=exports.$mobx=void 0;var t={0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"},n={};function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var i={};function o(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:i}var a=Object.assign,s=Object.getOwnPropertyDescriptor,u=Object.defineProperty,c=Object.prototype,l=[];Object.freeze(l);var f={};Object.freeze(f);var h="undefined"!=typeof Proxy,v=Object.toString();function d(){h||r("Proxy not available")}function _(e){0}function p(){return++Xt.mobxGuid}function b(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var y=function(){};function g(e){return"function"==typeof e}function m(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function O(e){return null!==e&&"object"==typeof e}function x(e){if(!O(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===v}function w(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function A(e,t,n){u(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function S(e,t,n){u(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function j(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return O(e)&&!0===e[n]}}function k(e){return e instanceof Map}function E(e){return e instanceof Set}var P=void 0!==Object.getOwnPropertySymbols;function T(e){var t=Object.keys(e);if(!P)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return c.propertyIsEnumerable.call(e,t)})):t}var C="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:P?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function R(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function V(e){return null===e?null:"object"==typeof e?""+e:e}function N(e,t){return c.hasOwnProperty.call(e,t)}var D=Object.getOwnPropertyDescriptors||function(e){var t={};return C(e).forEach(function(n){t[n]=s(e,n)}),t};function B(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)}}function L(e,t,n){return t&&B(e.prototype,t),n&&B(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(){return(M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function I(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U(e,t)}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=G(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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 z=Symbol("mobx-stored-annotations");function W(e){return Object.assign(function(t,n){X(t,n,e)},e)}function X(e,t,n){N(e,z)||A(e,z,M({},e[z])),F(e,n,t),fe(n)||(e[z][t]=n)}function F(e,t,n){}function Y(e){return N(e,z)||A(e,z,M({},e[z])),e[z]}var J=Symbol("mobx administration");exports.$mobx=J;var $=function(){function e(e){void 0===e&&(e="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=wt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return on(this)},t.reportChanged=function(){nn(),an(this),rn()},t.toString=function(){return this.name_},e}(),Q=j("Atom",$);function Z(e,t,n){void 0===t&&(t=y),void 0===n&&(n=y);var r=new $(e);return t!==y&&Wn(r,t),n!==y&&Xn(r,n),r}function ee(e,t){return e===t}function te(e,t){return Ji(e,t)}function ne(e,t){return Ji(e,t,1)}function re(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}var ie={identity:ee,structural:te,default:re,shallow:ne};function oe(e,t,n){return xr(e)?e:Array.isArray(e)?Ze.array(e,{name:n}):x(e)?Ze.object(e,void 0,{name:n}):k(e)?Ze.map(e,{name:n}):E(e)?Ze.set(e,{name:n}):"function"!=typeof e||Mn(e)||vr(e)?e:w(e)?lr(e):Bn(n,e)}function ae(e,t,n){return null==e?e:Di(e)||bi(e)||Ai(e)||Ei(e)?e:Array.isArray(e)?Ze.array(e,{name:n,deep:!1}):x(e)?Ze.object(e,void 0,{name:n,deep:!1}):k(e)?Ze.map(e,{name:n,deep:!1}):E(e)?Ze.set(e,{name:n,deep:!1}):void 0}function se(e){return e}function ue(e,t){return Ji(e,t)?t:e}exports.comparer=ie;var ce="override",le=W({annotationType_:ce,make_:he,extend_:ve});function fe(e){return e.annotationType_===ce}function he(e,t){return 0}function ve(e,t,n,i){r("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function de(e,t){return{annotationType_:e,options_:t,make_:_e,extend_:pe}}function _e(e,t,n,r){var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Mn(n.value))return 1;var o=ye(e,this,t,n,!1);return u(r,t,o),2}function pe(e,t,n,r){var i=ye(e,this,t,n);return e.defineProperty_(t,i,r)}function be(e,t,n,r){t.annotationType_,r.value}function ye(e,t,n,r,i){var o,a,s,u,c,l,f;void 0===i&&(i=Xt.safeDescriptors),be(e,t,n,r);var h,v=r.value;null!=(o=t.options_)&&o.bound&&(v=v.bind(null!=(h=e.proxy_)?h:e.target_));return{value:ht(null!=(a=null==(s=t.options_)?void 0:s.name)?a:n.toString(),v,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u,null!=(l=t.options_)&&l.bound?null!=(f=e.proxy_)?f:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ge(e,t){return{annotationType_:e,options_:t,make_:me,extend_:Oe}}function me(e,t,n,r){var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&!vr(e.target_[t])&&null===this.extend_(e,t,n,!1))return 0;if(vr(n.value))return 1;var o=we(e,this,t,n,!1,!1);return u(r,t,o),2}function Oe(e,t,n,r){var i,o=we(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,r)}function xe(e,t,n,r){t.annotationType_,r.value}function we(e,t,n,r,i,o){void 0===o&&(o=Xt.safeDescriptors),xe(e,t,n,r);var a,s=r.value;i&&(s=s.bind(null!=(a=e.proxy_)?a:e.target_));return{value:lr(s),configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function Ae(e,t){return{annotationType_:e,options_:t,make_:Se,extend_:je}}function Se(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function je(e,t,n,r){return ke(e,this,t,n),e.defineComputedProperty_(t,M({},this.options_,{get:n.get,set:n.set}),r)}function ke(e,t,n,r){t.annotationType_,r.get}function Ee(e,t){return{annotationType_:e,options_:t,make_:Pe,extend_:Te}}function Pe(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Te(e,t,n,r){var i,o;return Ce(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:oe,r)}function Ce(e,t,n,r){t.annotationType_}exports.override=le;var Re="true",Ve=Ne();function Ne(e){return{annotationType_:Re,options_:e,make_:De,extend_:Be}}function De(e,t,n,r){var i,o,a,s;if(n.get)return at.make_(e,t,n,r);if(n.set){var c=ht(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!Xt.safeDescriptors||e.isPlainObject_,set:c})?0:2:(u(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&"function"==typeof n.value)return w(n.value)?(null!=(s=this.options_)&&s.autoBind?lr.bound:lr).make_(e,t,n,r):(null!=(a=this.options_)&&a.autoBind?Bn.bound:Bn).make_(e,t,n,r);var l,f=!1===(null==(i=this.options_)?void 0:i.deep)?Ze.ref:Ze;"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(l=e.proxy_)?l:e.target_));return f.make_(e,t,n,r)}function Be(e,t,n,r){var i,o,a;if(n.get)return at.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!Xt.safeDescriptors||e.isPlainObject_,set:ht(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(a=e.proxy_)?a:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Ze.ref:Ze).extend_(e,t,n,r)}var Le="observable",Me="observable.ref",Ie="observable.shallow",Ue="observable.struct",Ke={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Ge(e){return e||Ke}Object.freeze(Ke);var qe=Ee(Le),He=Ee(Me,{enhancer:se}),ze=Ee(Ie,{enhancer:ae}),We=Ee(Ue,{enhancer:ue}),Xe=W(qe);function Fe(e){return!0===e.deep?oe:!1===e.deep?se:Je(e.defaultDecorator)}function Ye(e){var t;return e?null!=(t=e.defaultDecorator)?t:Ne(e):void 0}function Je(e){var t,n;return e&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:oe}function $e(e,t,n){if(!m(t))return xr(e)?e:x(e)?Ze.object(e,t,n):Array.isArray(e)?Ze.array(e,t):k(e)?Ze.map(e,t):E(e)?Ze.set(e,t):"object"==typeof e&&null!==e?e:Ze.box(e,t);X(e,t,qe)}Object.assign($e,Xe);var Qe={box:function(e,t){var n=Ge(t);return new Ot(e,Fe(n),n.name,!0,n.equals)},array:function(e,t){var n=Ge(t);return(!1===Xt.useProxies||!1===n.proxy?zi:ui)(e,Fe(n),n.name)},map:function(e,t){var n=Ge(t);return new Oi(e,Fe(n),n.name)},set:function(e,t){var n=Ge(t);return new ki(e,Fe(n),n.name)},object:function(e,t,n){return Zn(!1===Xt.useProxies||!1===(null==n?void 0:n.proxy)?Ri({},n):Xr({},n),e,t)},ref:W(He),shallow:W(ze),deep:Xe,struct:W(We)},Ze=a($e,Qe);exports.observable=Ze;var et,tt,nt="computed",rt="computed.struct",it=Ae(nt),ot=Ae(rt,{equals:ie.structural}),at=function(e,t){if(m(t))return X(e,t,it);if(x(e))return W(Ae(nt,e));var n=x(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new St(n)};exports.computed=at,Object.assign(at,it),at.struct=W(ot);var st,ut=0,ct=1,lt=null!=(et=null==(tt=s(function(){},"name"))?void 0:tt.configurable)&&et,ft={value:"action",configurable:!0,writable:!1,enumerable:!1};function ht(e,t,n,r){function i(){return vt(e,n,t,r||this,arguments)}return void 0===n&&(n=!1),i.isMobxAction=!0,lt&&(ft.value=e,Object.defineProperty(i,"name",ft)),i}function vt(e,t,n,r,i){var o=dt(e,t,r,i);try{return n.apply(r,i)}catch(a){throw o.error_=a,a}finally{_t(o)}}function dt(e,t,n,r){var i=0,o=Xt.trackingDerivation,a=!t||!o;nn();var s=Xt.allowStateChanges;a&&(Mt(),s=bt(!0));var u={runAsAction_:a,prevDerivation_:o,prevAllowStateChanges_:s,prevAllowStateReads_:Ut(!0),notifySpy_:!1,startTime_:i,actionId_:ct++,parentActionId_:ut};return ut=u.actionId_,u}function _t(e){ut!==e.actionId_&&r(30),ut=e.parentActionId_,void 0!==e.error_&&(Xt.suppressReactionErrors=!0),yt(e.prevAllowStateChanges_),Kt(e.prevAllowStateReads_),rn(),e.runAsAction_&&It(e.prevDerivation_),Xt.suppressReactionErrors=!1}function pt(e,t){var n=bt(e);try{return t()}finally{yt(n)}}function bt(e){var t=Xt.allowStateChanges;return Xt.allowStateChanges=e,t}function yt(e){Xt.allowStateChanges=e}var gt="create";st=Symbol.toPrimitive;var mt,Ot=function(e,t){function n(t,n,r,i,o){var a;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=ie.default),(a=e.call(this,r)||this).enhancer=void 0,a.name_=void 0,a.equals=void 0,a.hasUnreportedChange_=!1,a.interceptors_=void 0,a.changeListeners_=void 0,a.value_=void 0,a.dehancer=void 0,a.enhancer=n,a.name_=r,a.equals=o,a.value_=n(t,void 0,r),a}I(n,e);var r=n.prototype;return r.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},r.set=function(e){this.value_;if((e=this.prepareNewValue_(e))!==Xt.UNCHANGED){gn();0,this.setNewValue_(e)}},r.prepareNewValue_=function(e){if(Ct(this),Fr(this)){var t=Jr(this,{object:this,type:ii,newValue:e});if(!t)return Xt.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Xt.UNCHANGED:e},r.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),$r(this)&&Zr(this,{type:ii,object:this,newValue:e,oldValue:t})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(e){return Yr(this,e)},r.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:ii,newValue:this.value_,oldValue:void 0}),Qr(this,e)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return V(this.get())},r[t]=function(){return this.valueOf()},n}($,st),xt=j("ObservableValue",Ot);exports.isBoxedObservable=xt;var wt,At,St=function(e){function t(e){this.dependenciesState_=wt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=wt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new kt(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=At.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||r(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=ht("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?ie.structural:ie.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var n=t.prototype;return n.onBecomeStale_=function(){un(this)},n.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},n.get=function(){if(this.isComputing_&&r(32,this.name_,this.derivation),0!==Xt.inBatch||0!==this.observers_.size||this.keepAlive_){if(on(this),Pt(this)){var e=Xt.trackingContext;this.keepAlive_&&!e&&(Xt.trackingContext=this),this.trackAndCompute()&&sn(this),Xt.trackingContext=e}}else Pt(this)&&(this.warnAboutUntrackedRead_(),nn(),this.value_=this.computeValue_(!1),rn());var t=this.value_;if(Et(t))throw t.cause;return t},n.set=function(e){if(this.setter_){this.isRunningSetter_&&r(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter_=!1}}else r(34,this.name_)},n.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===wt.NOT_TRACKING_,n=this.computeValue_(!0),r=t||Et(e)||Et(n)||!this.equals_(e,n);return r&&(this.value_=n),r},n.computeValue_=function(e){this.isComputing_=!0;var t,n=bt(!1);if(e)t=Vt(this,this.derivation,this.scope_);else if(!0===Xt.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(r){t=new kt(r)}return yt(n),this.isComputing_=!1,t},n.suspend_=function(){this.keepAlive_||(Bt(this),this.value_=void 0)},n.observe_=function(e,t){var n=this,r=!0,i=void 0;return In(function(){var o=n.get();if(!r||t){var a=Mt();e({observableKind:"computed",debugObjectName:n.name_,type:ii,object:n,newValue:o,oldValue:i}),It(a)}r=!1,i=o})},n.warnAboutUntrackedRead_=function(){},n.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},n.valueOf=function(){return V(this.get())},n[e]=function(){return this.valueOf()},t}(mt=Symbol.toPrimitive),jt=j("ComputedValue",St);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(wt||(wt={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(At||(At={}));var kt=function(e){this.cause=void 0,this.cause=e};function Et(e){return e instanceof kt}function Pt(e){switch(e.dependenciesState_){case wt.UP_TO_DATE_:return!1;case wt.NOT_TRACKING_:case wt.STALE_:return!0;case wt.POSSIBLY_STALE_:for(var t=Ut(!0),n=Mt(),r=e.observing_,i=r.length,o=0;o<i;o++){var a=r[o];if(jt(a)){if(Xt.disableErrorBoundaries)a.get();else try{a.get()}catch(s){return It(n),Kt(t),!0}if(e.dependenciesState_===wt.STALE_)return It(n),Kt(t),!0}}return Gt(e),It(n),Kt(t),!1}}function Tt(){return null!==Xt.trackingDerivation}function Ct(e){}function Rt(e){0}function Vt(e,t,n){var r=Ut(!0);Gt(e),e.newObserving_=new Array(e.observing_.length+100),e.unboundDepsCount_=0,e.runId_=++Xt.runId;var i,o=Xt.trackingDerivation;if(Xt.trackingDerivation=e,Xt.inBatch++,!0===Xt.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(a){i=new kt(a)}return Xt.inBatch--,Xt.trackingDerivation=o,Dt(e),Nt(e),Kt(r),i}function Nt(e){}function Dt(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,r=wt.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,a=0;a<o;a++){var s=n[a];0===s.diffValue_&&(s.diffValue_=1,i!==a&&(n[i]=s),i++),s.dependenciesState_>r&&(r=s.dependenciesState_)}for(n.length=i,e.newObserving_=null,o=t.length;o--;){var u=t[o];0===u.diffValue_&&en(u,e),u.diffValue_=0}for(;i--;){var c=n[i];1===c.diffValue_&&(c.diffValue_=0,Zt(c,e))}r!==wt.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Bt(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)en(t[n],e);e.dependenciesState_=wt.NOT_TRACKING_}function Lt(e){var t=Mt();try{return e()}finally{It(t)}}function Mt(){var e=Xt.trackingDerivation;return Xt.trackingDerivation=null,e}function It(e){Xt.trackingDerivation=e}function Ut(e){var t=Xt.allowStateReads;return Xt.allowStateReads=e,t}function Kt(e){Xt.allowStateReads=e}function Gt(e){if(e.dependenciesState_!==wt.UP_TO_DATE_){e.dependenciesState_=wt.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=wt.UP_TO_DATE_}}var qt=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],Ht=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},zt=!0,Wt=!1,Xt=function(){var e=o();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(zt=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ht).version&&(zt=!1),zt?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ht):(setTimeout(function(){Wt||r(35)},1),new Ht)}();function Ft(){if((Xt.pendingReactions.length||Xt.inBatch||Xt.isRunningReactions)&&r(36),Wt=!0,zt){var e=o();0==--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Xt=new Ht}}function Yt(){return Xt}function Jt(){var e=new Ht;for(var t in e)-1===qt.indexOf(t)&&(Xt[t]=e[t]);Xt.allowStateChanges=!Xt.enforceActions}function $t(e){return e.observers_&&e.observers_.size>0}function Qt(e){return e.observers_}function Zt(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function en(e,t){e.observers_.delete(t),0===e.observers_.size&&tn(e)}function tn(e){!1===e.isPendingUnobservation_&&(e.isPendingUnobservation_=!0,Xt.pendingUnobservations.push(e))}function nn(){Xt.inBatch++}function rn(){if(0==--Xt.inBatch){_n();for(var e=Xt.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation_=!1,0===n.observers_.size&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof St&&n.suspend_())}Xt.pendingUnobservations=[]}}function on(e){Rt(e);var t=Xt.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&Xt.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),!0):(0===e.observers_.size&&Xt.inBatch>0&&tn(e),!1)}function an(e){e.lowestObserverState_!==wt.STALE_&&(e.lowestObserverState_=wt.STALE_,e.observers_.forEach(function(e){e.dependenciesState_===wt.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=wt.STALE_}))}function sn(e){e.lowestObserverState_!==wt.STALE_&&(e.lowestObserverState_=wt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===wt.POSSIBLY_STALE_?t.dependenciesState_=wt.STALE_:t.dependenciesState_===wt.UP_TO_DATE_&&(e.lowestObserverState_=wt.UP_TO_DATE_)}))}function un(e){e.lowestObserverState_===wt.UP_TO_DATE_&&(e.lowestObserverState_=wt.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===wt.UP_TO_DATE_&&(e.dependenciesState_=wt.POSSIBLY_STALE_,e.onBecomeStale_())}))}function cn(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===At.BREAK){var n=[];ln(er(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof St?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function ln(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return ln(e,t,n+1)}))}var fn=function(){function e(e,t,n,r){void 0===e&&(e="Reaction"),void 0===r&&(r=!1),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=wt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=At.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,Xt.pendingReactions.push(this),_n())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){nn(),this.isScheduled_=!1;var e=Xt.trackingContext;if(Xt.trackingContext=this,Pt(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}Xt.trackingContext=e,rn()}},t.track=function(e){if(!this.isDisposed_){nn();gn();0,this.isRunning_=!0;var t=Xt.trackingContext;Xt.trackingContext=this;var n=Vt(this,e,void 0);Xt.trackingContext=t,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Bt(this),Et(n)&&this.reportExceptionInDerivation_(n.cause),rn()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Xt.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";Xt.suppressReactionErrors||console.error(n,e),Xt.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(nn(),Bt(this),rn()))},t.getDisposer_=function(){var e=this.dispose.bind(this);return e[J]=this,e},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),Ir(this,e)},e}();function hn(e){return Xt.globalReactionErrorHandlers.push(e),function(){var t=Xt.globalReactionErrorHandlers.indexOf(e);t>=0&&Xt.globalReactionErrorHandlers.splice(t,1)}}exports.Reaction=fn;var vn=100,dn=function(e){return e()};function _n(){Xt.inBatch>0||Xt.isRunningReactions||dn(pn)}function pn(){Xt.isRunningReactions=!0;for(var e=Xt.pendingReactions,t=0;e.length>0;){++t===vn&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}Xt.isRunningReactions=!1}var bn=j("Reaction",fn);function yn(e){var t=dn;dn=function(n){return e(function(){return t(n)})}}function gn(){return!1}function mn(e){}function On(e){}var xn={type:"report-end",spyReportEnd:!0};function wn(e){}function An(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Sn="action",jn="action.bound",kn="autoAction",En="autoAction.bound",Pn="<unnamed action>",Tn=de(Sn),Cn=de(jn,{bound:!0}),Rn=de(kn,{autoAction:!0}),Vn=de(En,{autoAction:!0,bound:!0});function Nn(e){return function(t,n){return g(t)?ht(t.name||Pn,t,e):g(n)?ht(t,n,e):m(n)?X(t,n,e?Rn:Tn):m(t)?W(de(e?kn:Sn,{name:t,autoAction:e})):void 0}}var Dn=Nn(!1);exports.action=Dn,Object.assign(Dn,Tn);var Bn=Nn(!0);function Ln(e){return vt(e.name||Pn,!1,e,this,void 0)}function Mn(e){return g(e)&&!0===e.isMobxAction}function In(e,t){var n,r;void 0===t&&(t=f);var i,o=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)i=new fn(o,function(){this.track(u)},t.onError,t.requiresObservable);else{var a=Kn(t),s=!1;i=new fn(o,function(){s||(s=!0,a(function(){s=!1,i.isDisposed_||i.track(u)}))},t.onError,t.requiresObservable)}function u(){e(i)}return i.schedule_(),i.getDisposer_()}exports._autoAction=Bn,Object.assign(Bn,Rn),Dn.bound=W(Cn),Bn.bound=W(Vn);var Un=function(e){return e()};function Kn(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Un}function Gn(e,t,n){var r;void 0===n&&(n=f);var i,o,a=null!=(r=n.name)?r:"Reaction",s=Dn(a,n.onError?qn(n.onError,t):t),u=!n.scheduler&&!n.delay,c=Kn(n),l=!0,h=!1,v=n.compareStructural?ie.structural:n.equals||ie.default,d=new fn(a,function(){l||u?_():h||(h=!0,c(_))},n.onError,n.requiresObservable);function _(){if(h=!1,!d.isDisposed_){var t=!1;d.track(function(){var n=pt(!1,function(){return e(d)});t=l||!v(i,n),o=i,i=n}),l&&n.fireImmediately?s(i,o,d):!l&&t&&s(i,o,d),l=!1}}return d.schedule_(),d.getDisposer_()}function qn(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}var Hn="onBO",zn="onBUO";function Wn(e,t,n){return Fn(Hn,e,t,n)}function Xn(e,t,n){return Fn(zn,e,t,n)}function Fn(e,t,n,r){var i="function"==typeof r?Wi(t,n):Wi(t),o=g(r)?r:n,a=e+"L";return i[a]?i[a].add(o):i[a]=new Set([o]),function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}var Yn="never",Jn="always",$n="observed";function Qn(e){!0===e.isolateGlobalState&&Ft();var t=e.useProxies,n=e.enforceActions;if(void 0!==t&&(Xt.useProxies=t===Jn||t!==Yn&&"undefined"!=typeof Proxy),"ifavailable"===t&&(Xt.verifyProxies=!0),void 0!==n){var r=n===Jn?Jn:n===$n;Xt.enforceActions=r,Xt.allowStateChanges=!0!==r&&r!==Jn}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Xt[t]=!!e[t])}),Xt.allowStateReads=!Xt.observableRequiresReaction,e.reactionScheduler&&yn(e.reactionScheduler)}function Zn(e,t,n,r){var i=D(t),o=Ri(e,r)[J];nn();try{C(i).forEach(function(e){o.extend_(e,i[e],!n||(!(e in n)||n[e]))})}finally{rn()}return e}function er(e,t){return tr(Wi(e,t))}function tr(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=ir(e.observing_).map(tr)),t}function nr(e,t){return rr(Wi(e,t))}function rr(e){var t={name:e.name_};return $t(e)&&(t.observers=Array.from(Qt(e)).map(rr)),t}function ir(e){return Array.from(new Set(e))}var or=0;function ar(){this.message="FLOW_CANCELLED"}function sr(e){return e instanceof ar}ar.prototype=Object.create(Error.prototype);var ur=ge("flow"),cr=ge("flow.bound",{bound:!0}),lr=Object.assign(function(e,t){if(m(t))return X(e,t,ur);var n=e,r=n.name||"<unnamed flow>",i=function(){var e,t=arguments,i=++or,o=Dn(r+" - runid: "+i+" - init",n).apply(this,t),a=void 0,s=new Promise(function(t,n){var s=0;function u(e){var t;a=void 0;try{t=Dn(r+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(u){return n(u)}l(t)}function c(e){var t;a=void 0;try{t=Dn(r+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(u){return n(u)}l(t)}function l(e){if(!g(null==e?void 0:e.then))return e.done?t(e.value):(a=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)});return s.cancel=Dn(r+" - runid: "+i+" - cancel",function(){try{a&&fr(a);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(y,y),fr(n),e(new ar)}catch(r){e(r)}}),s};return i.isMobXFlow=!0,i},ur);function fr(e){g(e.cancel)&&e.cancel()}function hr(e){return e}function vr(e){return!0===(null==e?void 0:e.isMobXFlow)}function dr(e,t,n){var r;return Ai(e)||bi(e)||xt(e)?r=Xi(e):Di(e)&&(r=Xi(e,t)),r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0}}function _r(e,t,n){return g(n)?br(e,t,n):pr(e,t)}function pr(e,t){return Xi(e).intercept_(t)}function br(e,t,n){return Xi(e,t).intercept_(n)}function yr(e,t){if(void 0===t)return jt(e);if(!1===Di(e))return!1;if(!e[J].values_.has(t))return!1;var n=Wi(e,t);return jt(n)}function gr(e){return yr(e)}function mr(e,t){return yr(e,t)}function Or(e,t){return!!e&&(void 0!==t?!!Di(e)&&e[J].values_.has(t):Di(e)||!!e[J]||Q(e)||bn(e)||jt(e))}function xr(e){return Or(e)}function wr(e,t){return Or(e,t)}function Ar(e){return Di(e)?e[J].keys_():Ai(e)||Ei(e)?Array.from(e.keys()):bi(e)?e.map(function(e,t){return t}):void r(5)}function Sr(e){return Di(e)?Ar(e).map(function(t){return e[t]}):Ai(e)?Ar(e).map(function(t){return e.get(t)}):Ei(e)?Array.from(e.values()):bi(e)?e.slice():void r(6)}function jr(e){return Di(e)?Ar(e).map(function(t){return[t,e[t]]}):Ai(e)?Ar(e).map(function(t){return[t,e.get(t)]}):Ei(e)?Array.from(e.entries()):bi(e)?e.map(function(e,t){return[t,e]}):void r(7)}function kr(e,t,n){if(2!==arguments.length||Ei(e))Di(e)?e[J].set_(t,n):Ai(e)?e.set(t,n):Ei(e)?e.add(t):bi(e)?("number"!=typeof t&&(t=parseInt(t,10)),t<0&&r("Invalid index: '"+t+"'"),nn(),t>=e.length&&(e.length=t+1),e[t]=n,rn()):r(8);else{nn();var i=t;try{for(var o in i)kr(e,o,i[o])}finally{rn()}}}function Er(e,t){Di(e)?e[J].delete_(t):Ai(e)?e.delete(t):Ei(e)?e.delete(t):bi(e)?("number"!=typeof t&&(t=parseInt(t,10)),e.splice(t,1)):r(9)}function Pr(e,t){return Di(e)?e[J].has_(t):Ai(e)?e.has(t):Ei(e)?e.has(t):bi(e)?t>=0&&t<e.length:void r(10)}function Tr(e,t){if(Pr(e,t))return Di(e)?e[J].get_(t):Ai(e)?e.get(t):bi(e)?e[t]:void r(11)}function Cr(e,t,n){if(Di(e))return e[J].defineProperty_(t,n);r(39)}function Rr(e){if(Di(e))return e[J].ownKeys_();r(38)}function Vr(e,t,n,r){return g(n)?Dr(e,t,n,r):Nr(e,t,n)}function Nr(e,t,n){return Xi(e).observe_(t,n)}function Dr(e,t,n,r){return Xi(e,t).observe_(n,r)}function Br(e,t,n){return e.set(t,n),n}function Lr(e,t){if(null==e||"object"!=typeof e||e instanceof Date||!xr(e))return e;if(xt(e)||jt(e))return Lr(e.get(),t);if(t.has(e))return t.get(e);if(bi(e)){var n=Br(t,e,new Array(e.length));return e.forEach(function(e,r){n[r]=Lr(e,t)}),n}if(Ei(e)){var r=Br(t,e,new Set);return e.forEach(function(e){r.add(Lr(e,t))}),r}if(Ai(e)){var i=Br(t,e,new Map);return e.forEach(function(e,n){i.set(n,Lr(e,t))}),i}var o=Br(t,e,{});return Rr(e).forEach(function(n){c.propertyIsEnumerable.call(e,n)&&(o[n]=Lr(e[n],t))}),o}function Mr(e,t){return Lr(e,new Map)}function Ir(){r("trace() is not available in production builds");for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"boolean"==typeof n[n.length-1]&&(e=n.pop());var o=Ur(n);if(!o)return r("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");o.isTracing_===At.NONE&&console.log("[mobx.trace] '"+o.name_+"' tracing enabled"),o.isTracing_=e?At.BREAK:At.LOG}function Ur(e){switch(e.length){case 0:return Xt.trackingDerivation;case 1:return Wi(e[0]);case 2:return Wi(e[0],e[1])}}function Kr(e,t){void 0===t&&(t=void 0),nn();try{return e.apply(t)}finally{rn()}}function Gr(e,t,n){return 1===arguments.length||t&&"object"==typeof t?Hr(e,t):qr(e,t,n||{})}function qr(e,t,n){var r;if("number"==typeof n.timeout){var i=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!a[J].isDisposed_){if(a(),!n.onError)throw i;n.onError(i)}},n.timeout)}n.name="When";var o=ht("When-effect",t),a=In(function(t){pt(!1,e)&&(t.dispose(),r&&clearTimeout(r),o())},n);return a}function Hr(e,t){var n;var r=new Promise(function(r,i){var o=qr(e,r,M({},t,{onError:i}));n=function(){o(),i(new Error("WHEN_CANCELLED"))}});return r.cancel=n,r}function zr(e){return e[J]}exports.flow=lr,lr.bound=W(cr);var Wr={has:function(e,t){return zr(e).has_(t)},get:function(e,t){return zr(e).get_(t)},set:function(e,t,n){var r;return!!m(t)&&(null==(r=zr(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){var n;return!!m(t)&&(null==(n=zr(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var r;return null==(r=zr(e).defineProperty_(t,n))||r},ownKeys:function(e){return zr(e).ownKeys_()},preventExtensions:function(e){r(13)}};function Xr(e,t){var n,r;return d(),null!=(r=(n=(e=Ri(e,t))[J]).proxy_)?r:n.proxy_=new Proxy(e,Wr)}function Fr(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Yr(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),b(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Jr(e,t){var n=Mt();try{for(var i=[].concat(e.interceptors_||[]),o=0,a=i.length;o<a&&((t=i[o](t))&&!t.type&&r(14),t);o++);return t}finally{It(n)}}function $r(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function Qr(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),b(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Zr(e,t){var n=Mt(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);It(n)}}function ei(e,t,n){var r=Ri(e,n)[J];nn();try{0,null!=t||(t=Y(e)),C(t).forEach(function(e){return r.make_(e,t[e])})}finally{rn()}return e}var ti=Symbol("mobx-keys");function ni(e,t,n){if(x(e))return Zn(e,e,t,n);var r=Ri(e,n)[J];if(!e[ti]){var i=Object.getPrototypeOf(e),o=new Set([].concat(C(e),C(i)));o.delete("constructor"),o.delete(J),A(i,ti,o)}nn();try{e[ti].forEach(function(e){return r.make_(e,!t||(!(e in t)||t[e]))})}finally{rn()}return e}var ri="splice",ii="update",oi=1e4,ai={get:function(e,t){var n=e[J];return t===J?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?N(ci,t)?ci[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var r=e[J];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){r(15)}},si=function(){function e(e,t,n,r){void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new $(e),this.enhancer_=function(e,n){return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Yr(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Qr(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&r("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&r(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Hi(e+t+1)},t.spliceWithArray_=function(e,t,n){var r=this;Ct(this.atom_);var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=l),Fr(this)){var o=Jr(this,{object:this.proxy_,type:ri,index:e,removedCount:t,added:n});if(!o)return l;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){return r.enhancer_(e,void 0)}),this.legacyMode_){var a=n.length-t;this.updateArrayLength_(i,a)}var s=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,s),this.dehanceValues_(s)},t.spliceItemsIntoValues_=function(e,t,n){var r;if(n.length<oi)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var a=0;a<n.length;a++)this.values_[e+a]=n[a];for(var s=0;s<o.length;s++)this.values_[e+n.length+s]=o[s];return i},t.notifyArrayChildUpdate_=function(e,t,n){var r=!this.owned_&&gn(),i=$r(this),o=i||r?{observableKind:"array",object:this.proxy_,type:ii,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&Zr(this,o)},t.notifyArraySplice_=function(e,t,n){var r=!this.owned_&&gn(),i=$r(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:ri,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&Zr(this,o)},t.get_=function(e){if(e<this.values_.length)return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX")},t.set_=function(e,t){var n=this.values_;if(e<n.length){Ct(this.atom_);var i=n[e];if(Fr(this)){var o=Jr(this,{type:ii,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,i))!==i&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else e===n.length?this.spliceWithArray_(e,0,[t]):r(17,e,n.length)},e}();function ui(e,t,n,r){void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),d();var i=new si(n,t,r,!1);S(i.values_,J,i);var o=new Proxy(i.values_,ai);if(i.proxy_=o,e&&e.length){var a=bt(!0);i.spliceWithArray_(0,0,e),yt(a)}return o}var ci={clear:function(){return this.splice(0)},replace:function(e){var t=this[J];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[J];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){return this[J].spliceWithArray_(e,t,n)},push:function(){for(var e=this[J],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[J].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[J],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Xt.trackingDerivation&&r(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Xt.trackingDerivation&&r(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[J],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function li(e,t){"function"==typeof Array.prototype[e]&&(ci[e]=t(e))}function fi(e){return function(){var t=this[J];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function hi(e){return function(t,n){var r=this,i=this[J];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){return t.call(n,e,i,r)})}}function vi(e){return function(){var t=this,n=this[J];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){return i(e,n,r,t)},r[e].apply(r,arguments)}}li("concat",fi),li("flat",fi),li("includes",fi),li("indexOf",fi),li("join",fi),li("lastIndexOf",fi),li("slice",fi),li("toString",fi),li("toLocaleString",fi),li("every",hi),li("filter",hi),li("find",hi),li("findIndex",hi),li("flatMap",hi),li("forEach",hi),li("map",hi),li("some",hi),li("reduce",vi),li("reduceRight",vi);var di,_i,pi=j("ObservableArrayAdministration",si);function bi(e){return O(e)&&pi(e[J])}var yi={},gi="add",mi="delete",Oi=function(e,t){function n(e,t,n){var i=this;void 0===t&&(t=oe),void 0===n&&(n="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[J]=yi,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,g(Map)||r(18),this.keysAtom_=Z("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,pt(!0,function(){i.merge(e)})}var i=n.prototype;return i.has_=function(e){return this.data_.has(e)},i.has=function(e){var t=this;if(!Xt.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Ot(this.has_(e),se,"ObservableMap.key?",!1);this.hasMap_.set(e,r),Xn(r,function(){return t.hasMap_.delete(e)})}return n.get()},i.set=function(e,t){var n=this.has_(e);if(Fr(this)){var r=Jr(this,{type:n?ii:gi,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},i.delete=function(e){var t=this;if((Ct(this.keysAtom_),Fr(this))&&!Jr(this,{type:mi,object:this,name:e}))return!1;if(this.has_(e)){var n=gn(),r=$r(this),i=r||n?{observableKind:"map",debugObjectName:this.name_,type:mi,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return Kr(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),r&&Zr(this,i),!0}return!1},i.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Xt.UNCHANGED){var r=gn(),i=$r(this),o=i||r?{observableKind:"map",debugObjectName:this.name_,type:ii,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&Zr(this,o)}},i.addValue_=function(e,t){var n=this;Ct(this.keysAtom_),Kr(function(){var r,i=new Ot(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=gn(),i=$r(this),o=i||r?{observableKind:"map",debugObjectName:this.name_,type:gi,object:this,name:e,newValue:t}:null;i&&Zr(this,o)},i.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},i.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},i.values=function(){var e=this,t=this.keys();return Zi({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},i.entries=function(){var e=this,t=this.keys();return Zi({next:function(){var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},i[e]=function(){return this.entries()},i.forEach=function(e,t){for(var n,r=H(this);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];e.call(t,a,o,this)}},i.merge=function(e){var t=this;return Ai(e)&&(e=new Map(e)),Kr(function(){x(e)?T(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],r=e[1];return t.set(n,r)}):k(e)?(e.constructor!==Map&&r(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&r(20,e)}),this},i.clear=function(){var e=this;Kr(function(){Lt(function(){for(var t,n=H(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},i.replace=function(e){var t=this;return Kr(function(){for(var n,r=Si(e),i=new Map,o=!1,a=H(t.data_.keys());!(n=a()).done;){var s=n.value;if(!r.has(s))if(t.delete(s))o=!0;else{var u=t.data_.get(s);i.set(s,u)}}for(var c,l=H(r.entries());!(c=l()).done;){var f=c.value,h=f[0],v=f[1],d=t.data_.has(h);if(t.set(h,v),t.data_.has(h)){var _=t.data_.get(h);i.set(h,_),d||(o=!0)}}if(!o)if(t.data_.size!==i.size)t.keysAtom_.reportChanged();else for(var p=t.data_.keys(),b=i.keys(),y=p.next(),g=b.next();!y.done;){if(y.value!==g.value){t.keysAtom_.reportChanged();break}y=p.next(),g=b.next()}t.data_=i}),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.observe_=function(e,t){return Qr(this,e)},i.intercept_=function(e){return Yr(this,e)},L(n,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:t,get:function(){return"Map"}}]),n}(di=Symbol.iterator,_i=Symbol.toStringTag);exports.ObservableMap=Oi;var xi,wi,Ai=j("ObservableMap",Oi);function Si(e){if(k(e)||Ai(e))return e;if(Array.isArray(e))return new Map(e);if(x(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return r(21,e)}exports.isObservableMap=Ai;var ji={},ki=function(e,t){function n(e,t,n){void 0===t&&(t=oe),void 0===n&&(n="ObservableSet"),this.name_=void 0,this[J]=ji,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,g(Set)||r(22),this.atom_=Z(this.name_),this.enhancer_=function(e,r){return t(e,r,n)},e&&this.replace(e)}var i=n.prototype;return i.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},i.clear=function(){var e=this;Kr(function(){Lt(function(){for(var t,n=H(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},i.forEach=function(e,t){for(var n,r=H(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},i.add=function(e){var t=this;if((Ct(this.atom_),Fr(this))&&!Jr(this,{type:gi,object:this,newValue:e}))return this;if(!this.has(e)){Kr(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var n=$r(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:gi,object:this,newValue:e}:null;0,n&&Zr(this,r)}return this},i.delete=function(e){var t=this;if(Fr(this)&&!Jr(this,{type:mi,object:this,oldValue:e}))return!1;if(this.has(e)){var n=$r(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:mi,object:this,oldValue:e}:null;return Kr(function(){t.atom_.reportChanged(),t.data_.delete(e)}),n&&Zr(this,r),!0}return!1},i.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},i.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return Zi({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},i.keys=function(){return this.values()},i.values=function(){this.atom_.reportObserved();var e=this,t=0,n=Array.from(this.data_.values());return Zi({next:function(){return t<n.length?{value:e.dehanceValue_(n[t++]),done:!1}:{done:!0}}})},i.replace=function(e){var t=this;return Ei(e)&&(e=new Set(e)),Kr(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):E(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&r("Cannot initialize set from "+e)}),this},i.observe_=function(e,t){return Qr(this,e)},i.intercept_=function(e){return Yr(this,e)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[e]=function(){return this.values()},L(n,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:t,get:function(){return"Set"}}]),n}(xi=Symbol.iterator,wi=Symbol.toStringTag);exports.ObservableSet=ki;var Ei=j("ObservableSet",ki);exports.isObservableSet=Ei;var Pi=Object.create(null),Ti="remove",Ci=function(){function e(e,t,n,r){void 0===t&&(t=new Map),void 0===r&&(r=Ve),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new $("ObservableObject.keys"),this.isPlainObject_=x(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof St)return n.set(t),!0;if(Fr(this)){var r=Jr(this,{type:ii,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==Xt.UNCHANGED){var i=$r(this),o=i?{type:ii,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&Zr(this,o)}return!0},t.get_=function(e){return Xt.trackingDerivation&&!N(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),N(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Xt.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Ot(e in this.target_,se,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(Li(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[z])&&n[e])return;r(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==c;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Bi(this,t,e)}},t.extend_=function(e,t,n,r){if(void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);Li(this,n,e);var i=n.extend_(this,e,t,r);return i&&Bi(this,n,e),i},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1);try{nn();var r=this.delete_(e);if(!r)return r;if(Fr(this)){var i=Jr(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=M({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else u(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{rn()}return!0},t.defineObservableProperty_=function(e,t,n,r){void 0===r&&(r=!1);try{nn();var i=this.delete_(e);if(!i)return i;if(Fr(this)){var o=Jr(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:t});if(!o)return null;t=o.newValue}var a=Ni(e),s={configurable:!Xt.safeDescriptors||this.isPlainObject_,enumerable:!0,get:a.get,set:a.set};if(r){if(!Reflect.defineProperty(this.target_,e,s))return!1}else u(this.target_,e,s);var c=new Ot(t,n,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{rn()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1);try{nn();var r=this.delete_(e);if(!r)return r;if(Fr(this))if(!Jr(this,{object:this.proxy_||this.target_,name:e,type:gi,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=Ni(e),o={configurable:!Xt.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else u(this.target_,e,o);this.values_.set(e,new St(t)),this.notifyPropertyAddition_(e,void 0)}finally{rn()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),!N(this.target_,e))return!0;if(Fr(this)&&!Jr(this,{object:this.proxy_||this.target_,name:e,type:Ti}))return null;try{var n,r;nn();var i,o=$r(this),a=this.values_.get(e),u=void 0;if(!a&&o)u=null==(i=s(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(a&&(this.values_.delete(e),a instanceof Ot&&(u=a.value_),an(a)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(e in this.target_),o){var c={type:Ti,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:u,name:e};0,o&&Zr(this,c)}}finally{rn()}return!0},t.observe_=function(e,t){return Qr(this,e)},t.intercept_=function(e){return Yr(this,e)},t.notifyPropertyAddition_=function(e,t){var n,r,i=$r(this);if(i){var o=i?{type:gi,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,i&&Zr(this,o)}null==(n=this.pendingKeys_)||null==(r=n.get(e))||r.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),C(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ri(e,t){var n;if(N(e,J))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Ci(e,new Map,String(r),Ye(t));return A(e,J,i),e}var Vi=j("ObservableObjectAdministration",Ci);function Ni(e){return Pi[e]||(Pi[e]={get:function(){return this[J].getObservablePropValue_(e)},set:function(t){return this[J].setObservablePropValue_(e,t)}})}function Di(e){return!!O(e)&&Vi(e[J])}function Bi(e,t,n){var r;null==(r=e.target_[z])||delete r[n]}function Li(e,t,n){}var Mi=0,Ii=function(){};function Ui(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):void 0!==e.prototype.__proto__?e.prototype.__proto__=t:e.prototype=t}Ui(Ii,Array.prototype);var Ki=function(e,t,n){function r(t,n,r,i){var o;void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this;var a=new si(r,n,i,!0);if(a.proxy_=K(o),S(K(o),J,a),t&&t.length){var s=bt(!0);o.spliceWithArray(0,0,t),yt(s)}return o}I(r,e);var i=r.prototype;return i.concat=function(){this[J].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return bi(e)?e.slice():e}))},i[n]=function(){var e=this,t=0;return Zi({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},L(r,[{key:"length",get:function(){return this[J].getArrayLength_()},set:function(e){this[J].setArrayLength_(e)}},{key:t,get:function(){return"Array"}}]),r}(Ii,Symbol.toStringTag,Symbol.iterator);function Gi(e){return{enumerable:!1,configurable:!0,get:function(){return this[J].get_(e)},set:function(t){this[J].set_(e,t)}}}function qi(e){u(Ki.prototype,""+e,Gi(e))}function Hi(e){if(e>Mi){for(var t=Mi;t<e+100;t++)qi(t);Mi=e}}function zi(e,t,n){return new Ki(e,t,n)}function Wi(e,t){if("object"==typeof e&&null!==e){if(bi(e))return void 0!==t&&r(23),e[J].atom_;if(Ei(e))return e[J];if(Ai(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||r(25,t,Fi(e)),n}if(Di(e)){if(!t)return r(26);var i=e[J].values_.get(t);return i||r(27,t,Fi(e)),i}if(Q(e)||jt(e)||bn(e))return e}else if(g(e)&&bn(e[J]))return e[J];r(28)}function Xi(e,t){return e||r(29),void 0!==t?Xi(Wi(e,t)):Q(e)||jt(e)||bn(e)?e:Ai(e)||Ei(e)?e:e[J]?e[J]:void r(24,e)}function Fi(e,t){var n;if(void 0!==t)n=Wi(e,t);else{if(Mn(e))return e.name;n=Di(e)||Ai(e)||Ei(e)?Xi(e):Wi(e)}return n.name_}Object.entries(ci).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&A(Ki.prototype,t,n)}),Hi(1e3);var Yi=c.toString;function Ji(e,t,n){return void 0===n&&(n=-1),$i(e,t,n)}function $i(e,t,n,r,i){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var a=Yi.call(e);if(a!==Yi.call(t))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Qi(e),t=Qi(t);var s="[object Array]"===a;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(g(u)&&u instanceof u&&g(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return i[l]===t;if(r.push(e),i.push(t),s){if((l=e.length)!==t.length)return!1;for(;l--;)if(!$i(e[l],t[l],n-1,r,i))return!1}else{var f,h=Object.keys(e);if(l=h.length,Object.keys(t).length!==l)return!1;for(;l--;)if(!N(t,f=h[l])||!$i(e[f],t[f],n-1,r,i))return!1}return r.pop(),i.pop(),!0}function Qi(e){return bi(e)?e.slice():k(e)||Ai(e)?Array.from(e.entries()):E(e)||Ei(e)?Array.from(e.entries()):e}function Zi(e){return e[Symbol.iterator]=eo,e}function eo(){return this}function to(e){return e instanceof Object&&"string"==typeof e.annotationType_&&g(e.make_)&&g(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===o()[e]&&r("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:An,extras:{getDebugName:Fi},$mobx:J});
|
|
18
18
|
},{}],"moAD":[function(require,module,exports) {
|
|
19
19
|
"use strict";var e=require("mobx"),r=require("react");if(!r.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!e.makeObservable)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");
|
|
20
20
|
},{"mobx":"BzvP","react":"HdMw"}],"ZFRm":[function(require,module,exports) {
|
|
@@ -38,9 +38,9 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
38
38
|
},{"./FinalizationRegistryWrapper":"jK5f","./createReactionCleanupTrackingUsingFinalizationRegister":"vuoe","./createTimerBasedReactionCleanupTracking":"JdhZ"}],"vLuz":[function(require,module,exports) {
|
|
39
39
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.enableStaticRendering=t,exports.isUsingStaticRendering=n;var e=!1;function t(t){e=t}function n(){return e}
|
|
40
40
|
},{}],"fdT3":[function(require,module,exports) {
|
|
41
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useObserver=l;var e=require("mobx"),r=o(require("react")),t=require("./utils/printDebugValue"),n=require("./utils/reactionCleanupTracking"),u=require("./staticRendering");function o(e){return e&&e.__esModule?e:{default:e}}var c=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,u,o=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=o.next()).done;)c.push(n.value)}catch(i){u={error:i}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(u)throw u.error}}return c};function i(e){return"observer"
|
|
41
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useObserver=l;var e=require("mobx"),r=o(require("react")),t=require("./utils/printDebugValue"),n=require("./utils/reactionCleanupTracking"),u=require("./staticRendering");function o(e){return e&&e.__esModule?e:{default:e}}var c=function(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,u,o=t.call(e),c=[];try{for(;(void 0===r||r-- >0)&&!(n=o.next()).done;)c.push(n.value)}catch(i){u={error:i}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(u)throw u.error}}return c};function i(e){return"observer".concat(e)}var a=function(){return function(){}}();function f(){return new a}function l(o,a){if(void 0===a&&(a="observed"),(0,u.isUsingStaticRendering)())return o();var l=c(r.default.useState(f),1)[0],d=c(r.default.useState(),2)[1],s=function(){return d([])},v=r.default.useRef(null);if(!v.current)var g=new e.Reaction(i(a),function(){b.mounted?s():b.changedBeforeMount=!0}),b=(0,n.addReactionToTrack)(v,g,l);var h,p,y=v.current.reaction;if(r.default.useDebugValue(y,t.printDebugValue),r.default.useEffect(function(){return(0,n.recordReactionAsCommitted)(v),v.current?(v.current.mounted=!0,v.current.changedBeforeMount&&(v.current.changedBeforeMount=!1,s())):(v.current={reaction:new e.Reaction(i(a),function(){s()}),mounted:!0,changedBeforeMount:!1,cleanAt:1/0},s()),function(){v.current.reaction.dispose(),v.current=null}},[]),y.track(function(){try{h=o()}catch(e){p=e}}),p)throw p;return h}
|
|
42
42
|
},{"mobx":"BzvP","react":"HdMw","./utils/printDebugValue":"zABi","./utils/reactionCleanupTracking":"ROlb","./staticRendering":"vLuz"}],"Ocog":[function(require,module,exports) {
|
|
43
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.observer=o;var e=require("react"),r=require("./staticRendering"),t=require("./useObserver"),n=function(){return(n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function o(o,i){if((0,r.isUsingStaticRendering)())return o;var s,c=n({forwardRef:!1},i),u=o.displayName||o.name,f=function(e,r){return(0,t.useObserver)(function(){return o(e,r)},u)};return
|
|
43
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.observer=o;var e=require("react"),r=require("./staticRendering"),t=require("./useObserver"),n=function(){return(n=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var o in r=arguments[t])Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);return e}).apply(this,arguments)};function o(o,i){if((0,r.isUsingStaticRendering)())return o;var s,c=n({forwardRef:!1},i),u=o.displayName||o.name,f=function(e,r){return(0,t.useObserver)(function(){return o(e,r)},u)};return""!==u&&(f.displayName=u),o.contextTypes&&(f.contextTypes=o.contextTypes),s=c.forwardRef?(0,e.memo)((0,e.forwardRef)(f)):(0,e.memo)(f),a(o,s),s}var i={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function a(e,r){Object.keys(e).forEach(function(t){i[t]||Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}
|
|
44
44
|
},{"react":"HdMw","./staticRendering":"vLuz","./useObserver":"fdT3"}],"I8te":[function(require,module,exports) {
|
|
45
45
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Observer=r;var e=require("./useObserver");function r(r){var n=r.children,t=r.render,o=n||t;return"function"!=typeof o?null:(0,e.useObserver)(o)}function n(e,r,n,t,o){var i="children"===r?"render":"children",u="function"==typeof e[r],s="function"==typeof e[i];return u&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||s?null:new Error("Invalid prop `"+o+"` of type `"+typeof e[r]+"` supplied to `"+n+"`, expected `function`.")}r.displayName="Observer";
|
|
46
46
|
},{"./useObserver":"fdT3"}],"KZGF":[function(require,module,exports) {
|
|
@@ -53,9 +53,9 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
53
53
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useObserver=l,exports.useStaticRendering=p,Object.defineProperty(exports,"isObserverBatched",{enumerable:!0,get:function(){return r.isObserverBatched}}),Object.defineProperty(exports,"observerBatching",{enumerable:!0,get:function(){return r.observerBatching}}),Object.defineProperty(exports,"isUsingStaticRendering",{enumerable:!0,get:function(){return s.isUsingStaticRendering}}),Object.defineProperty(exports,"enableStaticRendering",{enumerable:!0,get:function(){return s.enableStaticRendering}}),Object.defineProperty(exports,"observer",{enumerable:!0,get:function(){return u.observer}}),Object.defineProperty(exports,"Observer",{enumerable:!0,get:function(){return i.Observer}}),Object.defineProperty(exports,"useLocalObservable",{enumerable:!0,get:function(){return o.useLocalObservable}}),Object.defineProperty(exports,"useLocalStore",{enumerable:!0,get:function(){return b.useLocalStore}}),Object.defineProperty(exports,"useAsObservableSource",{enumerable:!0,get:function(){return c.useAsObservableSource}}),Object.defineProperty(exports,"clearTimers",{enumerable:!0,get:function(){return a.resetCleanupScheduleForTests}}),require("./utils/assertEnvironment");var e=require("./utils/reactBatchedUpdates"),r=require("./utils/observerBatching"),t=require("./utils/utils"),n=require("./useObserver"),s=require("./staticRendering"),u=require("./observer"),i=require("./ObserverComponent"),o=require("./useLocalObservable"),b=require("./useLocalStore"),c=require("./useAsObservableSource"),a=require("./utils/reactionCleanupTracking");function l(e,r){return void 0===r&&(r="observed"),(0,n.useObserver)(e,r)}function p(e){(0,s.enableStaticRendering)(e)}(0,r.observerBatching)(e.unstable_batchedUpdates);
|
|
54
54
|
},{"./utils/assertEnvironment":"moAD","./utils/reactBatchedUpdates":"ZFRm","./utils/observerBatching":"EJpR","./utils/utils":"AGS0","./useObserver":"fdT3","./staticRendering":"vLuz","./observer":"Ocog","./ObserverComponent":"I8te","./useLocalObservable":"KZGF","./useLocalStore":"Grwe","./useAsObservableSource":"jn24","./utils/reactionCleanupTracking":"ROlb"}],"bIDB":[function(require,module,exports) {
|
|
55
55
|
var global = arguments[3];
|
|
56
|
-
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports._registerNode=exports.Konva=exports.glob=void 0;var n=Math.PI/180;function o(){return"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window))}const i=void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{};exports.glob=i;const t={_global:i,version:"8.2
|
|
56
|
+
var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports._registerNode=exports.Konva=exports.glob=void 0;var n=Math.PI/180;function o(){return"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window))}const i=void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{};exports.glob=i;const t={_global:i,version:"8.3.2",isBrowser:o(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:e=>t.angleDeg?e*n:e,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>t.DD.isDragging,isDragReady:()=>!!t.DD.node,document:i.document,_injectGlobal(e){i.Konva=e}};exports.Konva=t;const l=e=>{t[e.prototype.getClassName()]=e};exports._registerNode=l,t._injectGlobal(t);
|
|
57
57
|
},{}],"XIcS":[function(require,module,exports) {
|
|
58
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Util=exports.Transform=void 0;var e=require("./Global.js");class t{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),r=Math.sin(e),i=this.m[0]*t+this.m[2]*r,a=this.m[1]*t+this.m[3]*r,s=this.m[0]*-r+this.m[2]*t,o=this.m[1]*-r+this.m[3]*t;return this.m[0]=i,this.m[1]=a,this.m[2]=s,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var r=this.m[0]+this.m[2]*t,i=this.m[1]+this.m[3]*t,a=this.m[2]+this.m[0]*e,s=this.m[3]+this.m[1]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=s,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],r=this.m[1]*e.m[0]+this.m[3]*e.m[1],i=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],s=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,r=-this.m[1]*e,i=-this.m[2]*e,a=this.m[0]*e,s=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var r=this.m[0],i=this.m[1],a=this.m[2],s=this.m[3],o=this.m[4],n=(r*(t-this.m[5])-i*(e-o))/(r*s-i*a),l=(e-o-a*n)/r;return this.translate(l,n)}decompose(){var e=this.m[0],t=this.m[1],r=this.m[2],i=this.m[3],a=e*i-t*r;let s={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=t){var o=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/o):-Math.acos(e/o),s.scaleX=o,s.scaleY=a/o,s.skewX=(e*r+t*i)/a,s.skewY=0}else if(0!=r||0!=i){var n=Math.sqrt(r*r+i*i);s.rotation=Math.PI/2-(i>0?Math.acos(-r/n):-Math.acos(r/n)),s.scaleX=a/n,s.scaleY=n,s.skewX=0,s.skewY=(e*r+t*i)/a}return s.rotation=v._getRotation(s.rotation),s}}exports.Transform=t;var r="[object Array]",i="[object Number]",a="[object String]",s="[object Boolean]",o=Math.PI/180,n=180/Math.PI,l="#",h="",m="0",g="Konva warning: ",u="Konva error: ",c="rgb(",d={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},b=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,p=[];const y="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)},v={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>Object.prototype.toString.call(e)===r,_isNumber:e=>Object.prototype.toString.call(e)===i&&!isNaN(e)&&isFinite(e),_isString:e=>Object.prototype.toString.call(e)===a,_isBoolean:e=>Object.prototype.toString.call(e)===s,isObject:e=>e instanceof Object,isValidSelector(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e?1:e>0?1:-1,requestAnimFrame(e){p.push(e),1===p.length&&y(function(){const e=p;p=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var r=v.createImageElement();r.onload=function(){t(r)},r.src=e},_rgbToHex:(e,t,r)=>((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1),_hexToRgb(e){e=e.replace(l,h);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e=m+e;return l+e},getRGB(e){var t;return e in d?{r:(t=d[e])[0],g:t[1],b:t[2]}:e[0]===l?this._hexToRgb(e.substring(1)):e.substr(0,4)===c?(t=b.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",v._namedColorToRBA(e)||v._hex3ColorToRGBA(e)||v._hex6ColorToRGBA(e)||v._rgbColorToRGBA(e)||v._rgbaColorToRGBA(e)||v._hslColorToRGBA(e)),_namedColorToRBA(e){var t=d[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...r]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),i=Number(r[0])/360,a=Number(r[1])/100,s=Number(r[2])/100;let o,n,l;if(0===a)return l=255*s,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};const h=2*s-(o=s<.5?s*(1+a):s+a-s*a),m=[0,0,0];for(let e=0;e<3;e++)(n=i+1/3*-(e-1))<0&&n++,n>1&&n--,l=6*n<1?h+6*(o-h)*n:2*n<1?o:3*n<2?h+(o-h)*(2/3-n)*6:h,m[e]=255*l;return{r:Math.round(m[0]),g:Math.round(m[1]),b:Math.round(m[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y),cloneObject(e){var t={};for(var r in e)this._isPlainObject(e[r])?t[r]=this.cloneObject(e[r]):this._isArray(e[r])?t[r]=this.cloneArray(e[r]):t[r]=e[r];return t},cloneArray:e=>e.slice(0),degToRad:e=>e*o,radToDeg:e=>e*n,_degToRad:e=>(v.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),v.degToRad(e)),_radToDeg:e=>(v.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),v.radToDeg(e)),_getRotation:t=>e.Konva.angleDeg?v.radToDeg(t):t,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(u+e)},error(e){console.error(u+e)},warn(t){e.Konva.showWarnings&&console.warn(g+t)},each(e,t){for(var r in e)t(r,e[r])},_inRange:(e,t,r)=>t<=e&&e<r,_getProjectionToSegment(e,t,r,i,a,s){var o,n,l,h=(e-r)*(e-r)+(t-i)*(t-i);if(0==h)o=e,n=t,l=(a-r)*(a-r)+(s-i)*(s-i);else{var m=((a-e)*(r-e)+(s-t)*(i-t))/h;m<0?(o=e,n=t,l=(e-a)*(e-a)+(t-s)*(t-s)):m>1?(o=r,n=i,l=(r-a)*(r-a)+(i-s)*(i-s)):l=((o=e+m*(r-e))-a)*(o-a)+((n=t+m*(i-t))-s)*(n-s)}return[o,n,l]},_getProjectionToLine(e,t,r){var i=v.cloneObject(e),a=Number.MAX_VALUE;return t.forEach(function(s,o){if(r||o!==t.length-1){var n=t[(o+1)%t.length],l=v._getProjectionToSegment(s.x,s.y,n.x,n.y,e.x,e.y),h=l[0],m=l[1],g=l[2];g<a&&(i.x=h,i.y=m,a=g)}}),i},_prepareArrayForTween(e,t,r){var i,a=[],s=[];if(e.length>t.length){var o=t;t=e,e=o}for(i=0;i<e.length;i+=2)a.push({x:e[i],y:e[i+1]});for(i=0;i<t.length;i+=2)s.push({x:t[i],y:t[i+1]});var n=[];return s.forEach(function(e){var t=v._getProjectionToLine(e,a,r);n.push(t.x),n.push(t.y)}),n},_prepareToStringify(e){var t;for(var r in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(r)&&e[r]&&"object"==typeof e[r])if(t=Object.getOwnPropertyDescriptor(e,r),e[r].visitedByCircularReferenceRemoval||v._isElement(e[r])){if(!t.configurable)return null;delete e[r]}else if(null===v._prepareToStringify(e[r])){if(!t.configurable)return null;delete e[r]}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var r in t)e[r]=t[r];return e},_getFirstPointerId:e=>e.touches?e.changedTouches[0].identifier:e.pointerId||999};exports.Util=v;
|
|
58
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Util=exports.Transform=void 0;var e=require("./Global.js");class t{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),r=Math.sin(e),i=this.m[0]*t+this.m[2]*r,a=this.m[1]*t+this.m[3]*r,s=this.m[0]*-r+this.m[2]*t,o=this.m[1]*-r+this.m[3]*t;return this.m[0]=i,this.m[1]=a,this.m[2]=s,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var r=this.m[0]+this.m[2]*t,i=this.m[1]+this.m[3]*t,a=this.m[2]+this.m[0]*e,s=this.m[3]+this.m[1]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=s,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],r=this.m[1]*e.m[0]+this.m[3]*e.m[1],i=this.m[0]*e.m[2]+this.m[2]*e.m[3],a=this.m[1]*e.m[2]+this.m[3]*e.m[3],s=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,r=-this.m[1]*e,i=-this.m[2]*e,a=this.m[0]*e,s=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=r,this.m[2]=i,this.m[3]=a,this.m[4]=s,this.m[5]=o,this}getMatrix(){return this.m}setAbsolutePosition(e,t){var r=this.m[0],i=this.m[1],a=this.m[2],s=this.m[3],o=this.m[4],n=(r*(t-this.m[5])-i*(e-o))/(r*s-i*a),l=(e-o-a*n)/r;return this.translate(l,n)}decompose(){var e=this.m[0],t=this.m[1],r=this.m[2],i=this.m[3],a=e*i-t*r;let s={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=t){var o=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/o):-Math.acos(e/o),s.scaleX=o,s.scaleY=a/o,s.skewX=(e*r+t*i)/a,s.skewY=0}else if(0!=r||0!=i){var n=Math.sqrt(r*r+i*i);s.rotation=Math.PI/2-(i>0?Math.acos(-r/n):-Math.acos(r/n)),s.scaleX=a/n,s.scaleY=n,s.skewX=0,s.skewY=(e*r+t*i)/a}return s.rotation=v._getRotation(s.rotation),s}}exports.Transform=t;var r="[object Array]",i="[object Number]",a="[object String]",s="[object Boolean]",o=Math.PI/180,n=180/Math.PI,l="#",h="",m="0",g="Konva warning: ",u="Konva error: ",c="rgb(",d={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},b=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,p=[];const y="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)},v={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>Object.prototype.toString.call(e)===r,_isNumber:e=>Object.prototype.toString.call(e)===i&&!isNaN(e)&&isFinite(e),_isString:e=>Object.prototype.toString.call(e)===a,_isBoolean:e=>Object.prototype.toString.call(e)===s,isObject:e=>e instanceof Object,isValidSelector(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e?1:e>0?1:-1,requestAnimFrame(e){p.push(e),1===p.length&&y(function(){const e=p;p=[],e.forEach(function(e){e()})})},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(t){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var r=v.createImageElement();r.onload=function(){t(r)},r.src=e},_rgbToHex:(e,t,r)=>((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1),_hexToRgb(e){e=e.replace(l,h);var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()<<0).toString(16);e.length<6;)e=m+e;return l+e},getRGB(e){var t;return e in d?{r:(t=d[e])[0],g:t[1],b:t[2]}:e[0]===l?this._hexToRgb(e.substring(1)):e.substr(0,4)===c?(t=b.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",v._namedColorToRBA(e)||v._hex3ColorToRGBA(e)||v._hex6ColorToRGBA(e)||v._rgbColorToRGBA(e)||v._rgbaColorToRGBA(e)||v._hslColorToRGBA(e)),_namedColorToRBA(e){var t=d[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...r]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),i=Number(r[0])/360,a=Number(r[1])/100,s=Number(r[2])/100;let o,n,l;if(0===a)return l=255*s,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};const h=2*s-(o=s<.5?s*(1+a):s+a-s*a),m=[0,0,0];for(let e=0;e<3;e++)(n=i+1/3*-(e-1))<0&&n++,n>1&&n--,l=6*n<1?h+6*(o-h)*n:2*n<1?o:3*n<2?h+(o-h)*(2/3-n)*6:h,m[e]=255*l;return{r:Math.round(m[0]),g:Math.round(m[1]),b:Math.round(m[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y),cloneObject(e){var t={};for(var r in e)this._isPlainObject(e[r])?t[r]=this.cloneObject(e[r]):this._isArray(e[r])?t[r]=this.cloneArray(e[r]):t[r]=e[r];return t},cloneArray:e=>e.slice(0),degToRad:e=>e*o,radToDeg:e=>e*n,_degToRad:e=>(v.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),v.degToRad(e)),_radToDeg:e=>(v.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),v.radToDeg(e)),_getRotation:t=>e.Konva.angleDeg?v.radToDeg(t):t,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(u+e)},error(e){console.error(u+e)},warn(t){e.Konva.showWarnings&&console.warn(g+t)},each(e,t){for(var r in e)t(r,e[r])},_inRange:(e,t,r)=>t<=e&&e<r,_getProjectionToSegment(e,t,r,i,a,s){var o,n,l,h=(e-r)*(e-r)+(t-i)*(t-i);if(0==h)o=e,n=t,l=(a-r)*(a-r)+(s-i)*(s-i);else{var m=((a-e)*(r-e)+(s-t)*(i-t))/h;m<0?(o=e,n=t,l=(e-a)*(e-a)+(t-s)*(t-s)):m>1?(o=r,n=i,l=(r-a)*(r-a)+(i-s)*(i-s)):l=((o=e+m*(r-e))-a)*(o-a)+((n=t+m*(i-t))-s)*(n-s)}return[o,n,l]},_getProjectionToLine(e,t,r){var i=v.cloneObject(e),a=Number.MAX_VALUE;return t.forEach(function(s,o){if(r||o!==t.length-1){var n=t[(o+1)%t.length],l=v._getProjectionToSegment(s.x,s.y,n.x,n.y,e.x,e.y),h=l[0],m=l[1],g=l[2];g<a&&(i.x=h,i.y=m,a=g)}}),i},_prepareArrayForTween(e,t,r){var i,a=[],s=[];if(e.length>t.length){var o=t;t=e,e=o}for(i=0;i<e.length;i+=2)a.push({x:e[i],y:e[i+1]});for(i=0;i<t.length;i+=2)s.push({x:t[i],y:t[i+1]});var n=[];return s.forEach(function(e){var t=v._getProjectionToLine(e,a,r);n.push(t.x),n.push(t.y)}),n},_prepareToStringify(e){var t;for(var r in e.visitedByCircularReferenceRemoval=!0,e)if(e.hasOwnProperty(r)&&e[r]&&"object"==typeof e[r])if(t=Object.getOwnPropertyDescriptor(e,r),e[r].visitedByCircularReferenceRemoval||v._isElement(e[r])){if(!t.configurable)return null;delete e[r]}else if(null===v._prepareToStringify(e[r])){if(!t.configurable)return null;delete e[r]}return delete e.visitedByCircularReferenceRemoval,e},_assign(e,t){for(var r in t)e[r]=t[r];return e},_getFirstPointerId:e=>e.touches?e.changedTouches[0].identifier:e.pointerId||999};exports.Util=v;
|
|
59
59
|
},{"./Global.js":"bIDB"}],"tgRR":[function(require,module,exports) {
|
|
60
60
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RGBComponent=r,exports.alphaComponent=n,exports.getNumberValidator=a,exports.getNumberOrArrayOfNumbersValidator=o,exports.getNumberOrAutoValidator=u,exports.getStringValidator=l,exports.getStringOrGradientValidator=s,exports.getFunctionValidator=f,exports.getNumberArrayValidator=b,exports.getBooleanValidator=d,exports.getComponentValidator=c;var t=require("./Global.js"),i=require("./Util.js");function e(t){return i.Util._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)?t:i.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}function r(t){return t>255?255:t<0?0:Math.round(t)}function n(t){return t>1?1:t<1e-4?1e-4:t}function a(){if(t.Konva.isUnminified)return function(t,r){return i.Util._isNumber(t)||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a number.'),t}}function o(r){if(t.Konva.isUnminified)return function(t,n){let a=i.Util._isNumber(t),o=i.Util._isArray(t)&&t.length==r;return a||o||i.Util.warn(e(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+r+")"),t}}function u(){if(t.Konva.isUnminified)return function(t,r){return i.Util._isNumber(t)||"auto"===t||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a number or "auto".'),t}}function l(){if(t.Konva.isUnminified)return function(t,r){return i.Util._isString(t)||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a string.'),t}}function s(){if(t.Konva.isUnminified)return function(t,r){const n=i.Util._isString(t),a="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||a||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a string or a native gradient.'),t}}function f(){if(t.Konva.isUnminified)return function(t,r){return i.Util._isFunction(t)||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a function.'),t}}function b(){if(t.Konva.isUnminified)return function(t,r){return i.Util._isArray(t)?t.forEach(function(t){i.Util._isNumber(t)||i.Util.warn('"'+r+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")}):i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a array of numbers.'),t}}function d(){if(t.Konva.isUnminified)return function(t,r){return!0===t||!1===t||i.Util.warn(e(t)+' is a not valid value for "'+r+'" attribute. The value should be a boolean.'),t}}function c(r){if(t.Konva.isUnminified)return function(t,n){return i.Util.isObject(t)||i.Util.warn(e(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+r),t}}
|
|
61
61
|
},{"./Global.js":"bIDB","./Util.js":"XIcS"}],"cgGB":[function(require,module,exports) {
|
|
@@ -67,13 +67,13 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
67
67
|
},{"./Util.js":"XIcS","./Context.js":"pIAY","./Global.js":"bIDB","./Factory.js":"cgGB","./Validators.js":"tgRR"}],"XvfD":[function(require,module,exports) {
|
|
68
68
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DD=void 0;var e=require("./Global.js"),t=require("./Util.js");const r={get isDragging(){var e=!1;return r._dragElements.forEach(t=>{"dragging"===t.dragStatus&&(e=!0)}),e},justDragged:!1,get node(){var e;return r._dragElements.forEach(t=>{e=t.node}),e},_dragElements:new Map,_drag(e){const n=[];r._dragElements.forEach((r,a)=>{const{node:d}=r,o=d.getStage();o.setPointersPositions(e),void 0===r.pointerId&&(r.pointerId=t.Util._getFirstPointerId(e));const s=o._changedPointerPositions.find(e=>e.id===r.pointerId);if(s){if("dragging"!==r.dragStatus){var i=d.dragDistance();if(Math.max(Math.abs(s.x-r.startPointerPos.x),Math.abs(s.y-r.startPointerPos.y))<i)return;if(d.startDrag({evt:e}),!d.isDragging())return}d._setDragPosition(e,r),n.push(d)}}),n.forEach(t=>{t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)})},_endDragBefore(t){r._dragElements.forEach(n=>{const{node:a}=n,d=a.getStage();if(t&&d.setPointersPositions(t),!d._changedPointerPositions.find(e=>e.id===n.pointerId))return;"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(r.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,n.dragStatus="stopped");const o=n.node.getLayer()||n.node instanceof e.Konva.Stage&&n.node;o&&o.batchDraw()})},_endDragAfter(e){r._dragElements.forEach((t,n)=>{"stopped"===t.dragStatus&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),"dragging"!==t.dragStatus&&r._dragElements.delete(n)})}};exports.DD=r,e.Konva.isBrowser&&(window.addEventListener("mouseup",r._endDragBefore,!0),window.addEventListener("touchend",r._endDragBefore,!0),window.addEventListener("mousemove",r._drag),window.addEventListener("touchmove",r._drag),window.addEventListener("mouseup",r._endDragAfter,!1),window.addEventListener("touchend",r._endDragAfter,!1));
|
|
69
69
|
},{"./Global.js":"bIDB","./Util.js":"XIcS"}],"pBWF":[function(require,module,exports) {
|
|
70
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Node=void 0;var t=require("./Util.js"),e=require("./Factory.js"),i=require("./Canvas.js"),s=require("./Global.js"),r=require("./DragAndDrop.js"),a=require("./Validators.js"),n="absoluteOpacity",h="allEventListeners",o="absoluteTransform",l="absoluteScale",c="canvas",g="Change",d="children",f="konva",u="listening",p="mouseenter",_="mouseleave",v="name",m="set",y="Shape",C=" ",b="stage",x="transform",D="Stage",w="visible",A=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(C);let S=1;class T{constructor(t){this._id=S++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){t!==x&&t!==o||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){var i=this._cache.get(t);return(void 0===i||(t===x||t===o)&&!0===i.dirty)&&(i=e.call(this),this._cache.set(t,i)),i}_calculate(t,e,i){if(!this._attachedDepsListeners.get(t)){const i=e.map(t=>t+"Change.konva").join(C);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}_getCanvasCache(){return this._cache.get(c)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===o&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(c),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var s=e||{},r={};void 0!==s.x&&void 0!==s.y&&void 0!==s.width&&void 0!==s.height||(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var a=Math.ceil(s.width||r.width),h=Math.ceil(s.height||r.height),o=s.pixelRatio,g=void 0===s.x?r.x:s.x,d=void 0===s.y?r.y:s.y,f=s.offset||0,u=s.drawBorder||!1,p=s.hitCanvasPixelRatio||1;if(a&&h){a+=2*f,h+=2*f,g-=f,d-=f;var _=new i.SceneCanvas({pixelRatio:o,width:a,height:h}),v=new i.SceneCanvas({pixelRatio:o,width:0,height:0}),m=new i.HitCanvas({pixelRatio:p,width:a,height:h}),y=_.getContext(),C=m.getContext();return m.isCache=!0,_.isCache=!0,this._cache.delete(c),this._filterUpToDate=!1,!1===s.imageSmoothingEnabled&&(_.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),y.save(),C.save(),y.translate(-g,-d),C.translate(-g,-d),this._isUnderCache=!0,this._clearSelfAndDescendantCache(n),this._clearSelfAndDescendantCache(l),this.drawScene(_,this),this.drawHit(m,this),this._isUnderCache=!1,y.restore(),C.restore(),u&&(y.save(),y.beginPath(),y.rect(0,0,a,h),y.closePath(),y.setAttr("strokeStyle","red"),y.setAttr("lineWidth",5),y.stroke(),y.restore()),this._cache.set(c,{scene:_,filter:v,hit:m,x:g,y:d}),this._requestDraw(),this}t.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(c)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var i,s,r,a,n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],h=this.getAbsoluteTransform(e);return n.forEach(function(t){var e=h.point(t);void 0===i&&(i=r=e.x,s=a=e.y),i=Math.min(i,e.x),s=Math.min(s,e.y),r=Math.max(r,e.x),a=Math.max(a,e.y)}),{x:i,y:s,width:r-i,height:a-s}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var i=this._getCachedSceneCanvas(),s=i.pixelRatio;t.drawImage(i._canvas,0,0,i.width/s,i.height/s),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),i=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){var e,i,s,r,a=this.filters(),n=this._getCanvasCache(),h=n.scene,o=n.filter,l=o.getContext();if(a){if(!this._filterUpToDate){var c=h.pixelRatio;o.setSize(h.width/h.pixelRatio,h.height/h.pixelRatio);try{for(e=a.length,l.clear(),l.drawImage(h._canvas,0,0,h.getWidth()/c,h.getHeight()/c),i=l.getImageData(0,0,o.getWidth(),o.getHeight()),s=0;s<e;s++)"function"==typeof(r=a[s])?(r.call(this,i),l.putImageData(i,0,0)):t.Util.error("Filter should be type of function, but got "+typeof r+" instead. Please check correct filters")}catch(g){t.Util.error("Unable to apply filter. "+g.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return o}return h}on(t,e){if(this._cache&&this._cache.delete(h),3===arguments.length)return this._delegate.apply(this,arguments);var i,s,r,a,n=t.split(C),o=n.length;for(i=0;i<o;i++)r=(s=n[i].split("."))[0],a=s[1]||"",this.eventListeners[r]||(this.eventListeners[r]=[]),this.eventListeners[r].push({name:a,handler:e});return this}off(t,e){var i,s,r,a,n,o=(t||"").split(C),l=o.length;if(this._cache&&this._cache.delete(h),!t)for(s in this.eventListeners)this._off(s);for(i=0;i<l;i++)if(a=(r=o[i].split("."))[0],n=r[1],a)this.eventListeners[a]&&this._off(a,n,e);else for(s in this.eventListeners)this._off(s,n,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(e,i,s){var r=this;this.on(e,function(e){for(var a=e.target.findAncestors(i,!0,r),n=0;n<a.length;n++)(e=t.Util.cloneObject(e)).currentTarget=a[n],s.call(a[n],e)})}remove(){return this.isDragging()&&this.stopDrag(),r.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(n),this._clearSelfAndDescendantCache(l),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(w),this._clearSelfAndDescendantCache(u)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var i="get"+t.Util._capitalize(e);return t.Util._isFunction(this[i])?this[i]():this.attrs[e]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var i,s;if(!e)return this;for(i in e)i!==d&&(s=m+t.Util._capitalize(i),t.Util._isFunction(this[s])?this[s](e[i]):this._setAttr(i,e[i]))}),this}isListening(){return this._getCache(u,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(w,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var i=this.getLayer(),a=!1;r.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType?a=!0:t.node.getLayer()===i&&(a=!0))});var n=!e&&!s.Konva.hitOnDragEnabled&&a;return this.isListening()&&this.isVisible()&&!n}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,i,s,r=this.getDepth(),a=this,n=0;return a.nodeType!==D&&function h(o){for(t=[],e=o.length,i=0;i<e;i++)s=o[i],n++,s.nodeType!==y&&(t=t.concat(s.getChildren().slice())),s._id===a._id&&(i=e);t.length>0&&t[0].getDepth()<=r&&h(t)}(a.getStage().getChildren()),n}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(o)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}getAbsolutePosition(e){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),a=new t.Transform,n=this.offset();return a.m=r.slice(),a.translate(n.x,n.y),a.getTranslation()}setAbsolutePosition(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(x);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(x),this._clearSelfAndDescendantCache(o),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,i=t.y,s=this.x(),r=this.y();return void 0!==e&&(s+=e),void 0!==i&&(r+=i),this.setPosition({x:s,y:r}),this}_eachAncestorReverse(t,e){var i,s,r=[],a=this.getParent();if(!e||e._id!==this._id){for(r.unshift(this);a&&(!e||a._id!==e._id);)r.unshift(a),a=a.parent;for(i=r.length,s=0;s<i;s++)t(r[s])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return t.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0}moveUp(){if(!this.parent)return t.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return t.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return t.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return t.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&t.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(n,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var e,i,s,r,a={},n=this.getAttrs();for(e in a.attrs={},n)i=n[e],t.Util.isObject(i)&&!t.Util._isPlainObject(i)&&!t.Util._isArray(i)||(s="function"==typeof this[e]&&this[e],delete n[e],r=s?s.call(this):null,n[e]=i,r!==i&&(a.attrs[e]=i));return a.className=this.getClassName(),t.Util._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,i){var s=[];e&&this._isMatch(t)&&s.push(this);for(var r=this.parent;r;){if(r===i)return s;r._isMatch(t)&&s.push(r),r=r.parent}return s}isAncestorOf(t){return!1}findAncestor(t,e,i){return this.findAncestors(t,e,i)[0]}_isMatch(e){if(!e)return!1;if("function"==typeof e)return e(this);var i,s,r=e.replace(/ /g,"").split(","),a=r.length;for(i=0;i<a;i++)if(s=r[i],t.Util.isValidSelector(s)||(t.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),t.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),t.Util.warn("Konva is awesome, right?")),"#"===s.charAt(0)){if(this.id()===s.slice(1))return!0}else if("."===s.charAt(0)){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():void 0}fire(t,e={},i){return e.target=e.target||this,i?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(o,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var i;if(e)return i=new t.Transform,this._eachAncestorReverse(function(t){var e=t.transformsEnabled();"all"===e?i.multiply(t.getTransform()):"position"===e&&i.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},e),i;i=this._cache.get(o)||new t.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();var s=this.transformsEnabled();if("all"===s)i.multiply(this.getTransform());else if("position"===s){const t=this.attrs.x||0,e=this.attrs.y||0,s=this.attrs.offsetX||0,r=this.attrs.offsetY||0;i.translate(t-s,e-r)}return i.dirty=!1,i}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var e,i,r=this._cache.get(x)||new t.Transform;r.reset();var a=this.x(),n=this.y(),h=s.Konva.getAngle(this.rotation()),o=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,l=null!==(i=this.attrs.scaleY)&&void 0!==i?i:1,c=this.attrs.skewX||0,g=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===a&&0===n||r.translate(a,n),0!==h&&r.rotate(h),0===c&&0===g||r.skew(c,g),1===o&&1===l||r.scale(o,l),0===d&&0===f||r.translate(-1*d,-1*f),r.dirty=!1,r}clone(e){var i,s,r,a,n,h=t.Util.cloneObject(this.attrs);for(i in e)h[i]=e[i];var o=new this.constructor(h);for(i in this.eventListeners)for(r=(s=this.eventListeners[i]).length,a=0;a<r;a++)(n=s[a]).name.indexOf(f)<0&&(o.eventListeners[i]||(o.eventListeners[i]=[]),o.eventListeners[i].push(n));return o}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),s=this.getStage(),r=void 0!==t.x?t.x:e.x,a=void 0!==t.y?t.y:e.y,n=t.pixelRatio||1,h=new i.SceneCanvas({width:t.width||e.width||(s?s.width():0),height:t.height||e.height||(s?s.height():0),pixelRatio:n}),o=h.getContext();return o.save(),(r||a)&&o.translate(-1*r,-1*a),this.drawScene(h),o.restore(),h}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){var e=(t=t||{}).mimeType||null,i=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(e,i);return t.callback&&t.callback(s),s}toImage(e){if(!e||!e.callback)throw"callback required for toImage method config argument";var i=e.callback;delete e.callback,t.Util._urlToImage(this.toDataURL(e),function(t){i(t)})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():s.Konva.dragDistance}_off(t,e,i){var s,r,a,n=this.eventListeners[t];for(s=0;s<n.length;s++)if(r=n[s].name,a=n[s].handler,!("konva"===r&&"konva"!==e||e&&r!==e||i&&i!==a)){if(n.splice(s,1),0===n.length){delete this.eventListeners[t];break}s--}}_fireChangeEvent(t,e,i){this._fire(t+g,{oldVal:e,newVal:i})}addName(t){if(!this.hasName(t)){var e=this.name(),i=e?e+" "+t:t;this.name(i)}return this}hasName(t){if(!t)return!1;const e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){var e=(this.name()||"").split(/\s/g),i=e.indexOf(t);return-1!==i&&(e.splice(i,1),this.name(e.join(" "))),this}setAttr(e,i){var s=this[m+t.Util._capitalize(e)];return t.Util._isFunction(s)?s.call(this,i):this._setAttr(e,i),this}_requestDraw(){if(s.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(e,i){var s=this.attrs[e];(s!==i||t.Util.isObject(i))&&(null==i?delete this.attrs[e]:this.attrs[e]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(e,s,i),this._requestDraw())}_setComponentAttr(t,e,i){var s;void 0!==i&&((s=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=i,this._fireChangeEvent(t,s,i))}_fireAndBubble(t,e,i){if(e&&this.nodeType===y&&(e.target=this),!((t===p||t===_)&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||"Stage"===this.nodeType&&!i))){this._fire(t,e);var s=(t===p||t===_)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!s&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,e,i):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){let e=this._cache.get(h);if(!e){e={};let t=Object.getPrototypeOf(this);for(;t;)if(t.eventListeners){for(var i in t.eventListeners){const s=t.eventListeners[i],r=e[i]||[];e[i]=s.concat(r)}t=Object.getPrototypeOf(t)}else t=Object.getPrototypeOf(t);this._cache.set(h,e)}return e[t]}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;const i=this._getProtoListeners(t);if(i)for(var s=0;s<i.length;s++)i[s].handler.call(this,e);const r=this.eventListeners[t];if(r)for(s=0;s<r.length;s++)r[s].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,i=this.getStage(),s=this.getAbsolutePosition(),a=i._getPointerById(e)||i._changedPointerPositions[0]||s;r.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-s.x,y:a.y-s.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){r.DD._dragElements.has(this._id)||this._createDragElement(t),r.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(e,i){const s=this.getStage()._getPointerById(i.pointerId);if(s){var r={x:s.x-i.offset.x,y:s.y-i.offset.y},a=this.dragBoundFunc();if(void 0!==a){const i=a.call(this,r,e);i?r=i:t.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(t){const e=r.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),r.DD._endDragBefore(t),r.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=r.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if((!(void 0!==t.evt.button)||s.Konva.dragButtons.indexOf(t.evt.button)>=0)&&!this.isDragging()){var e=!1;r.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const t=r.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,i=t&&"ready"===t.dragStatus;e?this.stopDrag():i&&r.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-e.x,y:-e.y,width:i.width()+e.x,height:i.height()+e.y};return t.Util.haveIntersection(s,this.getClientRect())}static create(e,i){return t.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,i)}static _createNode(e,i){var r,a,n,h=T.prototype.getClassName.call(e),o=e.children;if(i&&(e.attrs.container=i),s.Konva[h]||(t.Util.warn('Can not find a node with class name "'+h+'". Fallback to "Shape".'),h="Shape"),r=new(0,s.Konva[h])(e.attrs),o)for(a=o.length,n=0;n<a;n++)r.add(T._createNode(o[n]));return r}}exports.Node=T,T.prototype.nodeType="Node",T.prototype._attrsAffectingSize=[],T.prototype.eventListeners={},T.prototype.on.call(T.prototype,A,function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(x),this._clearSelfAndDescendantCache(o))}),T.prototype.on.call(T.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(w)}),T.prototype.on.call(T.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(u)}),T.prototype.on.call(T.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(n)});const k=e.Factory.addGetterSetter;k(T,"zIndex"),k(T,"absolutePosition"),k(T,"position"),k(T,"x",0,(0,a.getNumberValidator)()),k(T,"y",0,(0,a.getNumberValidator)()),k(T,"globalCompositeOperation","source-over",(0,a.getStringValidator)()),k(T,"opacity",1,(0,a.getNumberValidator)()),k(T,"name","",(0,a.getStringValidator)()),k(T,"id","",(0,a.getStringValidator)()),k(T,"rotation",0,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"scale",["x","y"]),k(T,"scaleX",1,(0,a.getNumberValidator)()),k(T,"scaleY",1,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"skew",["x","y"]),k(T,"skewX",0,(0,a.getNumberValidator)()),k(T,"skewY",0,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"offset",["x","y"]),k(T,"offsetX",0,(0,a.getNumberValidator)()),k(T,"offsetY",0,(0,a.getNumberValidator)()),k(T,"dragDistance",null,(0,a.getNumberValidator)()),k(T,"width",0,(0,a.getNumberValidator)()),k(T,"height",0,(0,a.getNumberValidator)()),k(T,"listening",!0,(0,a.getBooleanValidator)()),k(T,"preventDefault",!0,(0,a.getBooleanValidator)()),k(T,"filters",null,function(t){return this._filterUpToDate=!1,t}),k(T,"visible",!0,(0,a.getBooleanValidator)()),k(T,"transformsEnabled","all",(0,a.getStringValidator)()),k(T,"size"),k(T,"dragBoundFunc"),k(T,"draggable",!1,(0,a.getBooleanValidator)()),e.Factory.backCompat(T,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});
|
|
70
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Node=void 0;var t=require("./Util.js"),e=require("./Factory.js"),i=require("./Canvas.js"),s=require("./Global.js"),r=require("./DragAndDrop.js"),a=require("./Validators.js"),n="absoluteOpacity",h="allEventListeners",o="absoluteTransform",l="absoluteScale",c="canvas",g="Change",d="children",f="konva",u="listening",p="mouseenter",_="mouseleave",v="name",m="set",y="Shape",C=" ",b="stage",x="transform",D="Stage",w="visible",A=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(C);let S=1;class T{constructor(t){this._id=S++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){t!==x&&t!==o||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){var i=this._cache.get(t);return(void 0===i||(t===x||t===o)&&!0===i.dirty)&&(i=e.call(this),this._cache.set(t,i)),i}_calculate(t,e,i){if(!this._attachedDepsListeners.get(t)){const i=e.map(t=>t+"Change.konva").join(C);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}_getCanvasCache(){return this._cache.get(c)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===o&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(c),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var s=e||{},r={};void 0!==s.x&&void 0!==s.y&&void 0!==s.width&&void 0!==s.height||(r=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var a=Math.ceil(s.width||r.width),h=Math.ceil(s.height||r.height),o=s.pixelRatio,g=void 0===s.x?r.x:s.x,d=void 0===s.y?r.y:s.y,f=s.offset||0,u=s.drawBorder||!1,p=s.hitCanvasPixelRatio||1;if(a&&h){a+=2*f,h+=2*f,g-=f,d-=f;var _=new i.SceneCanvas({pixelRatio:o,width:a,height:h}),v=new i.SceneCanvas({pixelRatio:o,width:0,height:0}),m=new i.HitCanvas({pixelRatio:p,width:a,height:h}),y=_.getContext(),C=m.getContext();return m.isCache=!0,_.isCache=!0,this._cache.delete(c),this._filterUpToDate=!1,!1===s.imageSmoothingEnabled&&(_.getContext()._context.imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),y.save(),C.save(),y.translate(-g,-d),C.translate(-g,-d),this._isUnderCache=!0,this._clearSelfAndDescendantCache(n),this._clearSelfAndDescendantCache(l),this.drawScene(_,this),this.drawHit(m,this),this._isUnderCache=!1,y.restore(),C.restore(),u&&(y.save(),y.beginPath(),y.rect(0,0,a,h),y.closePath(),y.setAttr("strokeStyle","red"),y.setAttr("lineWidth",5),y.stroke(),y.restore()),this._cache.set(c,{scene:_,filter:v,hit:m,x:g,y:d}),this._requestDraw(),this}t.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(c)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var i,s,r,a,n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],h=this.getAbsoluteTransform(e);return n.forEach(function(t){var e=h.point(t);void 0===i&&(i=r=e.x,s=a=e.y),i=Math.min(i,e.x),s=Math.min(s,e.y),r=Math.max(r,e.x),a=Math.max(a,e.y)}),{x:i,y:s,width:r-i,height:a-s}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var i=this._getCachedSceneCanvas(),s=i.pixelRatio;t.drawImage(i._canvas,0,0,i.width/s,i.height/s),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),i=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){var e,i,s,r,a=this.filters(),n=this._getCanvasCache(),h=n.scene,o=n.filter,l=o.getContext();if(a){if(!this._filterUpToDate){var c=h.pixelRatio;o.setSize(h.width/h.pixelRatio,h.height/h.pixelRatio);try{for(e=a.length,l.clear(),l.drawImage(h._canvas,0,0,h.getWidth()/c,h.getHeight()/c),i=l.getImageData(0,0,o.getWidth(),o.getHeight()),s=0;s<e;s++)"function"==typeof(r=a[s])?(r.call(this,i),l.putImageData(i,0,0)):t.Util.error("Filter should be type of function, but got "+typeof r+" instead. Please check correct filters")}catch(g){t.Util.error("Unable to apply filter. "+g.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return o}return h}on(t,e){if(this._cache&&this._cache.delete(h),3===arguments.length)return this._delegate.apply(this,arguments);var i,s,r,a,n=t.split(C),o=n.length;for(i=0;i<o;i++)r=(s=n[i].split("."))[0],a=s[1]||"",this.eventListeners[r]||(this.eventListeners[r]=[]),this.eventListeners[r].push({name:a,handler:e});return this}off(t,e){var i,s,r,a,n,o=(t||"").split(C),l=o.length;if(this._cache&&this._cache.delete(h),!t)for(s in this.eventListeners)this._off(s);for(i=0;i<l;i++)if(a=(r=o[i].split("."))[0],n=r[1],a)this.eventListeners[a]&&this._off(a,n,e);else for(s in this.eventListeners)this._off(s,n,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(e,i,s){var r=this;this.on(e,function(e){for(var a=e.target.findAncestors(i,!0,r),n=0;n<a.length;n++)(e=t.Util.cloneObject(e)).currentTarget=a[n],s.call(a[n],e)})}remove(){return this.isDragging()&&this.stopDrag(),r.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(o),this._clearSelfAndDescendantCache(n),this._clearSelfAndDescendantCache(l),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(w),this._clearSelfAndDescendantCache(u)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(e){var i="get"+t.Util._capitalize(e);return t.Util._isFunction(this[i])?this[i]():this.attrs[e]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var i,s;if(!e)return this;for(i in e)i!==d&&(s=m+t.Util._capitalize(i),t.Util._isFunction(this[s])?this[s](e[i]):this._setAttr(i,e[i]))}),this}isListening(){return this._getCache(u,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(w,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var i=this.getLayer(),a=!1;r.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType?a=!0:t.node.getLayer()===i&&(a=!0))});var n=!e&&!s.Konva.hitOnDragEnabled&&a;return this.isListening()&&this.isVisible()&&!n}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,i,s,r=this.getDepth(),a=this,n=0;return a.nodeType!==D&&function h(o){for(t=[],e=o.length,i=0;i<e;i++)s=o[i],n++,s.nodeType!==y&&(t=t.concat(s.getChildren().slice())),s._id===a._id&&(i=e);t.length>0&&t[0].getDepth()<=r&&h(t)}(a.getStage().getChildren()),n}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(o)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}getAbsolutePosition(e){let i=!1,s=this.parent;for(;s;){if(s.isCached()){i=!0;break}s=s.parent}i&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),a=new t.Transform,n=this.offset();return a.m=r.slice(),a.translate(n.x,n.y),a.getTranslation()}setAbsolutePosition(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(x);var i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(x),this._clearSelfAndDescendantCache(o),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,i=t.y,s=this.x(),r=this.y();return void 0!==e&&(s+=e),void 0!==i&&(r+=i),this.setPosition({x:s,y:r}),this}_eachAncestorReverse(t,e){var i,s,r=[],a=this.getParent();if(!e||e._id!==this._id){for(r.unshift(this);a&&(!e||a._id!==e._id);)r.unshift(a),a=a.parent;for(i=r.length,s=0;s<i;s++)t(r[s])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return t.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return t.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index;return e<this.parent.getChildren().length-1&&(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return t.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return t.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return t.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&t.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var i=this.index;return this.parent.children.splice(i,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(n,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var e,i,s,r,a={},n=this.getAttrs();for(e in a.attrs={},n)i=n[e],t.Util.isObject(i)&&!t.Util._isPlainObject(i)&&!t.Util._isArray(i)||(s="function"==typeof this[e]&&this[e],delete n[e],r=s?s.call(this):null,n[e]=i,r!==i&&(a.attrs[e]=i));return a.className=this.getClassName(),t.Util._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,i){var s=[];e&&this._isMatch(t)&&s.push(this);for(var r=this.parent;r;){if(r===i)return s;r._isMatch(t)&&s.push(r),r=r.parent}return s}isAncestorOf(t){return!1}findAncestor(t,e,i){return this.findAncestors(t,e,i)[0]}_isMatch(e){if(!e)return!1;if("function"==typeof e)return e(this);var i,s,r=e.replace(/ /g,"").split(","),a=r.length;for(i=0;i<a;i++)if(s=r[i],t.Util.isValidSelector(s)||(t.Util.warn('Selector "'+s+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),t.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),t.Util.warn("Konva is awesome, right?")),"#"===s.charAt(0)){if(this.id()===s.slice(1))return!0}else if("."===s.charAt(0)){if(this.hasName(s.slice(1)))return!0}else if(this.className===s||this.nodeType===s)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():void 0}fire(t,e={},i){return e.target=e.target||this,i?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(o,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var i;if(e)return i=new t.Transform,this._eachAncestorReverse(function(t){var e=t.transformsEnabled();"all"===e?i.multiply(t.getTransform()):"position"===e&&i.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},e),i;i=this._cache.get(o)||new t.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(i):i.reset();var s=this.transformsEnabled();if("all"===s)i.multiply(this.getTransform());else if("position"===s){const t=this.attrs.x||0,e=this.attrs.y||0,s=this.attrs.offsetX||0,r=this.attrs.offsetY||0;i.translate(t-s,e-r)}return i.dirty=!1,i}getAbsoluteScale(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var e,i,r=this._cache.get(x)||new t.Transform;r.reset();var a=this.x(),n=this.y(),h=s.Konva.getAngle(this.rotation()),o=null!==(e=this.attrs.scaleX)&&void 0!==e?e:1,l=null!==(i=this.attrs.scaleY)&&void 0!==i?i:1,c=this.attrs.skewX||0,g=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===a&&0===n||r.translate(a,n),0!==h&&r.rotate(h),0===c&&0===g||r.skew(c,g),1===o&&1===l||r.scale(o,l),0===d&&0===f||r.translate(-1*d,-1*f),r.dirty=!1,r}clone(e){var i,s,r,a,n,h=t.Util.cloneObject(this.attrs);for(i in e)h[i]=e[i];var o=new this.constructor(h);for(i in this.eventListeners)for(r=(s=this.eventListeners[i]).length,a=0;a<r;a++)(n=s[a]).name.indexOf(f)<0&&(o.eventListeners[i]||(o.eventListeners[i]=[]),o.eventListeners[i].push(n));return o}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),s=this.getStage(),r=void 0!==t.x?t.x:e.x,a=void 0!==t.y?t.y:e.y,n=t.pixelRatio||1,h=new i.SceneCanvas({width:t.width||e.width||(s?s.width():0),height:t.height||e.height||(s?s.height():0),pixelRatio:n}),o=h.getContext();return o.save(),(r||a)&&o.translate(-1*r,-1*a),this.drawScene(h),o.restore(),h}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){var e=(t=t||{}).mimeType||null,i=t.quality||null,s=this._toKonvaCanvas(t).toDataURL(e,i);return t.callback&&t.callback(s),s}toImage(e){if(!e||!e.callback)throw"callback required for toImage method config argument";var i=e.callback;delete e.callback,t.Util._urlToImage(this.toDataURL(e),function(t){i(t)})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():s.Konva.dragDistance}_off(t,e,i){var s,r,a,n=this.eventListeners[t];for(s=0;s<n.length;s++)if(r=n[s].name,a=n[s].handler,!("konva"===r&&"konva"!==e||e&&r!==e||i&&i!==a)){if(n.splice(s,1),0===n.length){delete this.eventListeners[t];break}s--}}_fireChangeEvent(t,e,i){this._fire(t+g,{oldVal:e,newVal:i})}addName(t){if(!this.hasName(t)){var e=this.name(),i=e?e+" "+t:t;this.name(i)}return this}hasName(t){if(!t)return!1;const e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){var e=(this.name()||"").split(/\s/g),i=e.indexOf(t);return-1!==i&&(e.splice(i,1),this.name(e.join(" "))),this}setAttr(e,i){var s=this[m+t.Util._capitalize(e)];return t.Util._isFunction(s)?s.call(this,i):this._setAttr(e,i),this}_requestDraw(){if(s.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(e,i){var s=this.attrs[e];(s!==i||t.Util.isObject(i))&&(null==i?delete this.attrs[e]:this.attrs[e]=i,this._shouldFireChangeEvents&&this._fireChangeEvent(e,s,i),this._requestDraw())}_setComponentAttr(t,e,i){var s;void 0!==i&&((s=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=i,this._fireChangeEvent(t,s,i))}_fireAndBubble(t,e,i){if(e&&this.nodeType===y&&(e.target=this),!((t===p||t===_)&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||"Stage"===this.nodeType&&!i))){this._fire(t,e);var s=(t===p||t===_)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!s&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,e,i):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){let e=this._cache.get(h);if(!e){e={};let t=Object.getPrototypeOf(this);for(;t;)if(t.eventListeners){for(var i in t.eventListeners){const s=t.eventListeners[i],r=e[i]||[];e[i]=s.concat(r)}t=Object.getPrototypeOf(t)}else t=Object.getPrototypeOf(t);this._cache.set(h,e)}return e[t]}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;const i=this._getProtoListeners(t);if(i)for(var s=0;s<i.length;s++)i[s].handler.call(this,e);const r=this.eventListeners[t];if(r)for(s=0;s<r.length;s++)r[s].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,i=this.getStage(),s=this.getAbsolutePosition(),a=i._getPointerById(e)||i._changedPointerPositions[0]||s;r.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-s.x,y:a.y-s.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){r.DD._dragElements.has(this._id)||this._createDragElement(t),r.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(e,i){const s=this.getStage()._getPointerById(i.pointerId);if(s){var r={x:s.x-i.offset.x,y:s.y-i.offset.y},a=this.dragBoundFunc();if(void 0!==a){const i=a.call(this,r,e);i?r=i:t.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}stopDrag(t){const e=r.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),r.DD._endDragBefore(t),r.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=r.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if((!(void 0!==t.evt.button)||s.Konva.dragButtons.indexOf(t.evt.button)>=0)&&!this.isDragging()){var e=!1;r.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const t=r.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,i=t&&"ready"===t.dragStatus;e?this.stopDrag():i&&r.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const i=this.getStage();if(!i)return!1;const s={x:-e.x,y:-e.y,width:i.width()+e.x,height:i.height()+e.y};return t.Util.haveIntersection(s,this.getClientRect())}static create(e,i){return t.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,i)}static _createNode(e,i){var r,a,n,h=T.prototype.getClassName.call(e),o=e.children;if(i&&(e.attrs.container=i),s.Konva[h]||(t.Util.warn('Can not find a node with class name "'+h+'". Fallback to "Shape".'),h="Shape"),r=new(0,s.Konva[h])(e.attrs),o)for(a=o.length,n=0;n<a;n++)r.add(T._createNode(o[n]));return r}}exports.Node=T,T.prototype.nodeType="Node",T.prototype._attrsAffectingSize=[],T.prototype.eventListeners={},T.prototype.on.call(T.prototype,A,function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(x),this._clearSelfAndDescendantCache(o))}),T.prototype.on.call(T.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(w)}),T.prototype.on.call(T.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(u)}),T.prototype.on.call(T.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(n)});const k=e.Factory.addGetterSetter;k(T,"zIndex"),k(T,"absolutePosition"),k(T,"position"),k(T,"x",0,(0,a.getNumberValidator)()),k(T,"y",0,(0,a.getNumberValidator)()),k(T,"globalCompositeOperation","source-over",(0,a.getStringValidator)()),k(T,"opacity",1,(0,a.getNumberValidator)()),k(T,"name","",(0,a.getStringValidator)()),k(T,"id","",(0,a.getStringValidator)()),k(T,"rotation",0,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"scale",["x","y"]),k(T,"scaleX",1,(0,a.getNumberValidator)()),k(T,"scaleY",1,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"skew",["x","y"]),k(T,"skewX",0,(0,a.getNumberValidator)()),k(T,"skewY",0,(0,a.getNumberValidator)()),e.Factory.addComponentsGetterSetter(T,"offset",["x","y"]),k(T,"offsetX",0,(0,a.getNumberValidator)()),k(T,"offsetY",0,(0,a.getNumberValidator)()),k(T,"dragDistance",null,(0,a.getNumberValidator)()),k(T,"width",0,(0,a.getNumberValidator)()),k(T,"height",0,(0,a.getNumberValidator)()),k(T,"listening",!0,(0,a.getBooleanValidator)()),k(T,"preventDefault",!0,(0,a.getBooleanValidator)()),k(T,"filters",null,function(t){return this._filterUpToDate=!1,t}),k(T,"visible",!0,(0,a.getBooleanValidator)()),k(T,"transformsEnabled","all",(0,a.getStringValidator)()),k(T,"size"),k(T,"dragBoundFunc"),k(T,"draggable",!1,(0,a.getBooleanValidator)()),e.Factory.backCompat(T,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});
|
|
71
71
|
},{"./Util.js":"XIcS","./Factory.js":"cgGB","./Canvas.js":"KydS","./Global.js":"bIDB","./DragAndDrop.js":"XvfD","./Validators.js":"tgRR"}],"Eysw":[function(require,module,exports) {
|
|
72
72
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Container=void 0;var e=require("./Factory.js"),t=require("./Node.js"),r=require("./Validators.js");class i extends t.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var r=[];return t.forEach(function(t){e(t)&&r.push(t)}),r}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(arguments[t]);return this}var r=e[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var t=this._generalFind(e,!0);return t.length>0?t[0]:void 0}_generalFind(e,t){var r=[];return this._descendants(i=>{const s=i._isMatch(e);return s&&r.push(i),!(!s||!t)}),r}_descendants(e){let t=!1;const r=this.getChildren();for(const i of r){if(t=e(i))return!0;if(i.hasChildren()&&(t=i._descendants(e)))return!0}return!1}toObject(){var e=t.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var r=t.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(e){r.add(e.clone())}),r}getAllIntersections(e){var t=[];return this.find("Shape").forEach(function(r){r.isVisible()&&r.intersects(e)&&t.push(r)}),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach(function(t){t._clearSelfAndDescendantCache(e)})}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach(function(e,t){e.index=t}),this._requestDraw()}drawScene(e,t){var r=this.getLayer(),i=e||r&&r.getCanvas(),s=i&&i.getContext(),h=this._getCanvasCache(),n=h&&h.scene,a=i&&i.isCache;if(!this.isVisible()&&!a)return this;if(n){s.save();var d=this.getAbsoluteTransform(t).getMatrix();s.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(s),s.restore()}else this._drawChildren("drawScene",i,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var r=this.getLayer(),i=e||r&&r.hitCanvas,s=i&&i.getContext(),h=this._getCanvasCache();if(h&&h.hit){s.save();var n=this.getAbsoluteTransform(t).getMatrix();s.transform(n[0],n[1],n[2],n[3],n[4],n[5]),this._drawCachedHitCanvas(s),s.restore()}else this._drawChildren("drawHit",i,t);return this}_drawChildren(e,t,r){var i,s=t&&t.getContext(),h=this.clipWidth(),n=this.clipHeight(),a=this.clipFunc(),d=h&&n||a;const o=r===this;if(d){s.save();var l=this.getAbsoluteTransform(r),c=l.getMatrix();if(s.transform(c[0],c[1],c[2],c[3],c[4],c[5]),s.beginPath(),a)a.call(this,s,this);else{var u=this.clipX(),v=this.clipY();s.rect(u,v,h,n)}s.clip(),c=l.copy().invert().getMatrix(),s.transform(c[0],c[1],c[2],c[3],c[4],c[5])}var f=!o&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;f&&(s.save(),s._applyGlobalCompositeOperation(this)),null===(i=this.children)||void 0===i||i.forEach(function(i){i[e](t,r)}),f&&s.restore(),d&&s.restore()}getClientRect(e){var t,r,i,s,h,n=(e=e||{}).skipTransform,a=e.relativeTo,d={x:1/0,y:1/0,width:0,height:0},o=this;null===(t=this.children)||void 0===t||t.forEach(function(t){if(t.visible()){var n=t.getClientRect({relativeTo:o,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===n.width&&0===n.height||(void 0===r?(r=n.x,i=n.y,s=n.x+n.width,h=n.y+n.height):(r=Math.min(r,n.x),i=Math.min(i,n.y),s=Math.max(s,n.x+n.width),h=Math.max(h,n.y+n.height)))}});for(var l=this.find("Shape"),c=!1,u=0;u<l.length;u++){if(l[u]._isVisible(this)){c=!0;break}}return d=c&&void 0!==r?{x:r,y:i,width:s-r,height:h-i}:{x:0,y:0,width:0,height:0},n?d:this._transformedRect(d,a)}}exports.Container=i,e.Factory.addComponentsGetterSetter(i,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(i,"clipX",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(i,"clipY",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(i,"clipWidth",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(i,"clipHeight",void 0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(i,"clipFunc");
|
|
73
73
|
},{"./Factory.js":"cgGB","./Node.js":"pBWF","./Validators.js":"tgRR"}],"Gfsp":[function(require,module,exports) {
|
|
74
74
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCapturedShape=n,exports.createEvent=o,exports.hasPointerCapture=i,exports.setPointerCapture=p,exports.releaseCapture=u;var e=require("./Global.js");const t=new Map,r=void 0!==e.Konva._global.PointerEvent;function n(e){return t.get(e)}function o(e){return{evt:e,pointerId:e.pointerId}}function i(e,r){return t.get(e)===r}function p(e,n){u(e),n.getStage()&&(t.set(e,n),r&&n._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))}function u(e,n){const i=t.get(e);if(!i)return;const p=i.getStage();p&&p.content,t.delete(e),r&&i._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}
|
|
75
75
|
},{"./Global.js":"bIDB"}],"inLU":[function(require,module,exports) {
|
|
76
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Stage=exports.stages=void 0;var t=require("./Util.js"),e=require("./Factory.js"),i=require("./Container.js"),n=require("./Global.js"),r=require("./Canvas.js"),o=require("./DragAndDrop.js"),s=h(require("./PointerEvents.js"));function a(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(a=function(t){return t?i:e})(t)}function h(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=a(e);if(i&&i.has(t))return i.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=r?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,i&&i.set(t,n),n}var c="Stage",l="string",p="px",u="mouseout",d="mouseleave",g="mouseover",v="mouseenter",f="mousemove",_="mousedown",P="mouseup",b="pointermove",y="pointerdown",C="pointerup",m="pointercancel",w="lostpointercapture",k="pointerout",D="pointerleave",x="pointerover",I="pointerenter",S="contextmenu",E="touchstart",O="touchend",T="touchmove",j="touchcancel",A="wheel",B=5,K=[[v,"_pointerenter"],[_,"_pointerdown"],[f,"_pointermove"],[P,"_pointerup"],[d,"_pointerleave"],[E,"_pointerdown"],[T,"_pointermove"],[O,"_pointerup"],[j,"_pointercancel"],[g,"_pointerover"],[A,"_wheel"],[S,"_contextmenu"],[y,"_pointerdown"],[b,"_pointermove"],[C,"_pointerup"],[m,"_pointercancel"],[w,"_lostpointercapture"]];const L={mouse:{[k]:u,[D]:d,[x]:g,[I]:v,[b]:f,[y]:_,[C]:P,[m]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[k]:"touchout",[D]:"touchleave",[x]:"touchover",[I]:"touchenter",[b]:T,[y]:E,[C]:O,[m]:j,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[k]:k,[D]:D,[x]:x,[I]:I,[b]:b,[y]:y,[C]:C,[m]:m,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},W=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",M=t=>{const e=W(t);return"pointer"===e?n.Konva.pointerEventsEnabled&&L.pointer:"touch"===e?L.touch:"mouse"===e?L.mouse:void 0};function U(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const Y="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",H=[];exports.stages=H;class R extends i.Container{constructor(t){super(U(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),H.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{U(this.attrs)}),this._checkVisibility()}_validateAdd(e){const i="Layer"===e.getType(),n="FastLayer"===e.getType();i||n||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===l){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var i;i="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(i)}if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t,e=this.children,i=e.length;for(t=0;t<i;t++)e[t].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),i.Container.prototype.clone.call(this,t)}destroy(){super.destroy();var e=this.content;e&&t.Util._isInDocument(e)&&this.container().removeChild(e);var i=H.indexOf(this);return i>-1&&H.splice(i,1),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(t.Util.warn(Y),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new r.SceneCanvas({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),i=e.getContext()._context,n=this.children;return(t.x||t.y)&&i.translate(-1*t.x,-1*t.y),n.forEach(function(e){if(e.isVisible()){var n=e._toKonvaCanvas(t);i.drawImage(n._canvas,t.x,t.y,n.getWidth()/n.getPixelRatio(),n.getHeight()/n.getPixelRatio())}}),e}getIntersection(t){if(!t)return null;var e,i=this.children;for(e=i.length-1;e>=0;e--){const n=i[e].getIntersection(t);if(n)return n}return null}_resizeDOM(){var t=this.width(),e=this.height();this.content&&(this.content.style.width=t+p,this.content.style.height=e+p),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(i=>{i.setSize({width:t,height:e}),i.draw()})}add(e,...i){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(e);var o=this.children.length;return o>B&&t.Util.warn("The stage has "+o+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),n.Konva.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return s.hasPointerCapture(t,this)}setPointerCapture(t){s.setPointerCapture(t,this)}releaseCapture(t){s.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){n.Konva.isBrowser&&K.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)})})}_pointerenter(t){this.setPointersPositions(t);const e=M(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const e=M(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){const e=M(t.type),i=W(t.type);if(e){this.setPointersPositions(t);var r=this._getTargetShape(i),s=!o.DD.isDragging||n.Konva.hitOnDragEnabled;r&&s?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[i+"targetShape"]=null):s&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const e=M(t.type),i=W(t.type);if(e){this.setPointersPositions(t);var r=!1;this._changedPointerPositions.forEach(s=>{var a=this.getIntersection(s);if(o.DD.justDragged=!1,n.Konva["_"+i+"ListenClick"]=!0,!(a&&a.isListening()))return;n.Konva.capturePointerEventsEnabled&&a.setPointerCapture(s.id),this[i+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:s.id}),r=!0;const h=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&h&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const e=M(t.type),i=W(t.type);if(!e)return;if(o.DD.isDragging&&o.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!(!o.DD.isDragging||n.Konva.hitOnDragEnabled))return;var r={};let a=!1;var h=this._getTargetShape(i);this._changedPointerPositions.forEach(n=>{const o=s.getCapturedShape(n.id)||this.getIntersection(n),c=n.id,l={evt:t,pointerId:c};var p=h!==o;if(p&&h&&(h._fireAndBubble(e.pointerout,Object.assign({},l),o),h._fireAndBubble(e.pointerleave,Object.assign({},l),o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(a=!0,p&&(o._fireAndBubble(e.pointerover,Object.assign({},l),h),o._fireAndBubble(e.pointerenter,Object.assign({},l),h),this[i+"targetShape"]=o),o._fireAndBubble(e.pointermove,Object.assign({},l))):h&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:c}),this[i+"targetShape"]=null)}),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const e=M(t.type),i=W(t.type);if(!e)return;this.setPointersPositions(t);const r=this[i+"ClickStartShape"],a=this[i+"ClickEndShape"];var h={};let c=!1;this._changedPointerPositions.forEach(l=>{const p=s.getCapturedShape(l.id)||this.getIntersection(l);if(p){if(p.releaseCapture(l.id),h[p._id])return;h[p._id]=!0}const u=l.id,d={evt:t,pointerId:u};let g=!1;n.Konva["_"+i+"InDblClickWindow"]&&n.Konva["_"+i+"InDblClickWindowId"]===u?(g=!0,clearTimeout(this[i+"DblTimeout"])):o.DD.justDragged||(n.Konva["_"+i+"InDblClickWindow"]=!0,n.Konva["_"+i+"InDblClickWindowId"]=u,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){n.Konva["_"+i+"InDblClickWindow"]=!1},n.Konva.dblClickWindow),p&&p.isListening()?(c=!0,this[i+"ClickEndShape"]=p,p._fireAndBubble(e.pointerup,Object.assign({},d)),n.Konva["_"+i+"ListenClick"]&&r&&r===p&&(p._fireAndBubble(e.pointerclick,Object.assign({},d)),g&&a&&a===p&&p._fireAndBubble(e.pointerdblclick,Object.assign({},d)))):(this[i+"ClickEndShape"]=null,n.Konva["_"+i+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),g&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))}),c||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),n.Konva["_"+i+"ListenClick"]=!1,t.cancelable&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(S,{evt:t}):this._fire(S,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(A,{evt:t}):this._fire(A,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=s.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(C,s.createEvent(t)),s.releaseCapture(t.pointerId)}_lostpointercapture(t){s.releaseCapture(t.pointerId)}setPointersPositions(e){var i=this._getContentPosition(),n=null,r=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-i.left)/i.scaleX,y:(t.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-i.left)/i.scaleX,y:(t.clientY-i.top)/i.scaleY})})):(n=(e.clientX-i.left)/i.scaleX,r=(e.clientY-i.top)/i.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:t.Util._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:t.Util._getFirstPointerId(e)}])}_setPointerPosition(e){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new r.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new r.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),n.Konva.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}exports.Stage=R,R.prototype.nodeType=c,(0,n._registerNode)(R),e.Factory.addGetterSetter(R,"container");
|
|
76
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Stage=exports.stages=void 0;var t=require("./Util.js"),e=require("./Factory.js"),i=require("./Container.js"),n=require("./Global.js"),r=require("./Canvas.js"),o=require("./DragAndDrop.js"),s=h(require("./PointerEvents.js"));function a(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,i=new WeakMap;return(a=function(t){return t?i:e})(t)}function h(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var i=a(e);if(i&&i.has(t))return i.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=r?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(n,o,s):n[o]=t[o]}return n.default=t,i&&i.set(t,n),n}var c="Stage",l="string",p="px",u="mouseout",d="mouseleave",g="mouseover",v="mouseenter",f="mousemove",_="mousedown",P="mouseup",b="pointermove",y="pointerdown",C="pointerup",m="pointercancel",w="lostpointercapture",k="pointerout",D="pointerleave",x="pointerover",S="pointerenter",E="contextmenu",I="touchstart",O="touchend",T="touchmove",j="touchcancel",A="wheel",B=5,K=[[v,"_pointerenter"],[_,"_pointerdown"],[f,"_pointermove"],[P,"_pointerup"],[d,"_pointerleave"],[I,"_pointerdown"],[T,"_pointermove"],[O,"_pointerup"],[j,"_pointercancel"],[g,"_pointerover"],[A,"_wheel"],[E,"_contextmenu"],[y,"_pointerdown"],[b,"_pointermove"],[C,"_pointerup"],[m,"_pointercancel"],[w,"_lostpointercapture"]];const L={mouse:{[k]:u,[D]:d,[x]:g,[S]:v,[b]:f,[y]:_,[C]:P,[m]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[k]:"touchout",[D]:"touchleave",[x]:"touchover",[S]:"touchenter",[b]:T,[y]:I,[C]:O,[m]:j,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[k]:k,[D]:D,[x]:x,[S]:S,[b]:b,[y]:y,[C]:C,[m]:m,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},M=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",U=t=>{const e=M(t);return"pointer"===e?n.Konva.pointerEventsEnabled&&L.pointer:"touch"===e?L.touch:"mouse"===e?L.mouse:void 0};function W(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const Y="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);",H=[];exports.stages=H;class R extends i.Container{constructor(t){super(W(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),H.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{W(this.attrs)}),this._checkVisibility()}_validateAdd(e){const i="Layer"===e.getType(),n="FastLayer"===e.getType();i||n||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===l){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var i;i="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(i)}if(!t)throw"Can not find container in document with id "+i}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t,e=this.children,i=e.length;for(t=0;t<i;t++)e[t].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),i.Container.prototype.clone.call(this,t)}destroy(){super.destroy();var e=this.content;e&&t.Util._isInDocument(e)&&this.container().removeChild(e);var i=H.indexOf(this);return i>-1&&H.splice(i,1),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(t.Util.warn(Y),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new r.SceneCanvas({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),i=e.getContext()._context,n=this.children;return(t.x||t.y)&&i.translate(-1*t.x,-1*t.y),n.forEach(function(e){if(e.isVisible()){var n=e._toKonvaCanvas(t);i.drawImage(n._canvas,t.x,t.y,n.getWidth()/n.getPixelRatio(),n.getHeight()/n.getPixelRatio())}}),e}getIntersection(t){if(!t)return null;var e,i=this.children;for(e=i.length-1;e>=0;e--){const n=i[e].getIntersection(t);if(n)return n}return null}_resizeDOM(){var t=this.width(),e=this.height();this.content&&(this.content.style.width=t+p,this.content.style.height=e+p),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(i=>{i.setSize({width:t,height:e}),i.draw()})}add(e,...i){if(arguments.length>1){for(var r=0;r<arguments.length;r++)this.add(arguments[r]);return this}super.add(e);var o=this.children.length;return o>B&&t.Util.warn("The stage has "+o+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),e.setSize({width:this.width(),height:this.height()}),e.draw(),n.Konva.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return s.hasPointerCapture(t,this)}setPointerCapture(t){s.setPointerCapture(t,this)}releaseCapture(t){s.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){n.Konva.isBrowser&&K.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)})})}_pointerenter(t){this.setPointersPositions(t);const e=U(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const e=U(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){const e=U(t.type),i=M(t.type);if(e){this.setPointersPositions(t);var r=this._getTargetShape(i),s=!o.DD.isDragging||n.Konva.hitOnDragEnabled;r&&s?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[i+"targetShape"]=null):s&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const e=U(t.type),i=M(t.type);if(e){this.setPointersPositions(t);var r=!1;this._changedPointerPositions.forEach(s=>{var a=this.getIntersection(s);if(o.DD.justDragged=!1,n.Konva["_"+i+"ListenClick"]=!0,!(a&&a.isListening()))return;n.Konva.capturePointerEventsEnabled&&a.setPointerCapture(s.id),this[i+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:s.id}),r=!0;const h=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&h&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const e=U(t.type),i=M(t.type);if(!e)return;if(o.DD.isDragging&&o.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!(!o.DD.isDragging||n.Konva.hitOnDragEnabled))return;var r={};let a=!1;var h=this._getTargetShape(i);this._changedPointerPositions.forEach(n=>{const o=s.getCapturedShape(n.id)||this.getIntersection(n),c=n.id,l={evt:t,pointerId:c};var p=h!==o;if(p&&h&&(h._fireAndBubble(e.pointerout,Object.assign({},l),o),h._fireAndBubble(e.pointerleave,Object.assign({},l),o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(a=!0,p&&(o._fireAndBubble(e.pointerover,Object.assign({},l),h),o._fireAndBubble(e.pointerenter,Object.assign({},l),h),this[i+"targetShape"]=o),o._fireAndBubble(e.pointermove,Object.assign({},l))):h&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:c}),this[i+"targetShape"]=null)}),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const e=U(t.type),i=M(t.type);if(!e)return;this.setPointersPositions(t);const r=this[i+"ClickStartShape"],a=this[i+"ClickEndShape"];var h={};let c=!1;this._changedPointerPositions.forEach(l=>{const p=s.getCapturedShape(l.id)||this.getIntersection(l);if(p){if(p.releaseCapture(l.id),h[p._id])return;h[p._id]=!0}const u=l.id,d={evt:t,pointerId:u};let g=!1;n.Konva["_"+i+"InDblClickWindow"]?(g=!0,clearTimeout(this[i+"DblTimeout"])):o.DD.justDragged||(n.Konva["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){n.Konva["_"+i+"InDblClickWindow"]=!1},n.Konva.dblClickWindow),p&&p.isListening()?(c=!0,this[i+"ClickEndShape"]=p,p._fireAndBubble(e.pointerup,Object.assign({},d)),n.Konva["_"+i+"ListenClick"]&&r&&r===p&&(p._fireAndBubble(e.pointerclick,Object.assign({},d)),g&&a&&a===p&&p._fireAndBubble(e.pointerdblclick,Object.assign({},d)))):(this[i+"ClickEndShape"]=null,n.Konva["_"+i+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),g&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))}),c||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),n.Konva["_"+i+"ListenClick"]=!1,t.cancelable&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(E,{evt:t}):this._fire(E,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(A,{evt:t}):this._fire(A,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=s.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(C,s.createEvent(t)),s.releaseCapture(t.pointerId)}_lostpointercapture(t){s.releaseCapture(t.pointerId)}setPointersPositions(e){var i=this._getContentPosition(),n=null,r=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-i.left)/i.scaleX,y:(t.clientY-i.top)/i.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-i.left)/i.scaleX,y:(t.clientY-i.top)/i.scaleY})})):(n=(e.clientX-i.left)/i.scaleX,r=(e.clientY-i.top)/i.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:t.Util._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:t.Util._getFirstPointerId(e)}])}_setPointerPosition(e){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new r.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new r.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),n.Konva.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}exports.Stage=R,R.prototype.nodeType=c,(0,n._registerNode)(R),e.Factory.addGetterSetter(R,"container");
|
|
77
77
|
},{"./Util.js":"XIcS","./Factory.js":"cgGB","./Container.js":"Eysw","./Global.js":"bIDB","./Canvas.js":"KydS","./DragAndDrop.js":"XvfD","./PointerEvents.js":"Gfsp"}],"JWag":[function(require,module,exports) {
|
|
78
78
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Shape=exports.shapes=void 0;var t=require("./Global.js"),e=require("./Util.js"),a=require("./Factory.js"),r=require("./Node.js"),i=require("./Validators.js"),o=s(require("./PointerEvents.js"));function n(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,a=new WeakMap;return(n=function(t){return t?a:e})(t)}function s(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var a=n(e);if(a&&a.has(t))return a.get(t);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var s=i?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,a&&a.set(t,r),r}var d="hasShadow",l="shadowRGBA",h="patternImage",c="linearGradient",f="radialGradient";let u;function g(){return u||(u=e.Util.createCanvasElement().getContext("2d"))}const y={};function S(t){t.fill()}function p(t){t.stroke()}function G(t){t.fill()}function C(t){t.stroke()}function F(){this._clearCache(d)}function v(){this._clearCache(l)}function k(){this._clearCache(h)}function P(){this._clearCache(c)}function w(){this._clearCache(f)}exports.shapes=y;class _ extends r.Node{constructor(t){let a;for(super(t);!(a=e.Util.getRandomColor())||a in y;);this.colorKey=a,y[a]=this}getContext(){return e.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return e.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(d,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const a=g().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(a&&a.setTransform){const r=new e.Transform;r.translate(this.fillPatternX(),this.fillPatternY()),r.rotate(t.Konva.getAngle(this.fillPatternRotation())),r.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),r.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const i=r.getMatrix();a.setTransform({a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]})}return a}}_getLinearGradient(){return this._getCache(c,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var e=g(),a=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=e.createLinearGradient(a.x,a.y,r.x,r.y),o=0;o<t.length;o+=2)i.addColorStop(t[o],t[o+1]);return i}}_getRadialGradient(){return this._getCache(f,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var e=g(),a=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=e.createRadialGradient(a.x,a.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),o=0;o<t.length;o+=2)i.addColorStop(t[o],t[o+1]);return i}}getShadowRGBA(){return this._getCache(l,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=e.Util.colorToRGBA(this.shadowColor());return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var e=this.getStage().bufferHitCanvas;return e.getContext().clear(),this.drawHit(e,null,!0),e.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return r.Node.prototype.destroy.call(this),delete y[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!this.getStage())return!1;if(!(null===(e=this.attrs.perfectDrawEnabled)||void 0===e||e))return!1;const a=t||this.hasFill(),r=this.hasStroke(),i=1!==this.getAbsoluteOpacity();if(a&&r&&i)return!0;const o=this.hasShadow(),n=this.shadowForStrokeEnabled();return!!(a&&r&&o&&n)}setStrokeHitEnabled(t){e.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const e=t.skipTransform,a=t.relativeTo,r=this.getSelfRect(),i=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=r.width+i,n=r.height+i,s=!t.skipShadow&&this.hasShadow(),d=s?this.shadowOffsetX():0,l=s?this.shadowOffsetY():0,h=o+Math.abs(d),c=n+Math.abs(l),f=s&&this.shadowBlur()||0,u=h+2*f,g=c+2*f;let y=0;Math.round(i/2)!==i/2&&(y=1);const S={width:u+y,height:g+y,x:-Math.round(i/2+f)+Math.min(d,0)+r.x,y:-Math.round(i/2+f)+Math.min(l,0)+r.y};return e?S:this._transformedRect(S,a)}drawScene(t,e){var a,r,i=this.getLayer(),o=t||i.getCanvas(),n=o.getContext(),s=this._getCanvasCache(),d=this.getSceneFunc(),l=this.hasShadow(),h=o.isCache,c=e===this;if(!this.isVisible()&&!c)return this;if(s){n.save();var f=this.getAbsoluteTransform(e).getMatrix();return n.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(n),n.restore(),this}if(!d)return this;if(n.save(),this._useBufferCanvas()&&!h){(r=(a=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var u=this.getAbsoluteTransform(e).getMatrix();r.transform(u[0],u[1],u[2],u[3],u[4],u[5]),d.call(this,r,this),r.restore();var g=a.pixelRatio;l&&n._applyShadow(this),n._applyOpacity(this),n._applyGlobalCompositeOperation(this),n.drawImage(a._canvas,0,0,a.width/g,a.height/g)}else{if(n._applyLineJoin(this),!c){u=this.getAbsoluteTransform(e).getMatrix();n.transform(u[0],u[1],u[2],u[3],u[4],u[5]),n._applyOpacity(this),n._applyGlobalCompositeOperation(this)}l&&n._applyShadow(this),d.call(this,n,this)}return n.restore(),this}drawHit(t,a,r=!1){if(!this.shouldDrawHit(a,r))return this;var i=this.getLayer(),o=t||i.hitCanvas,n=o&&o.getContext(),s=this.hitFunc()||this.sceneFunc(),d=this._getCanvasCache(),l=d&&d.hit;if(this.colorKey||e.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),l){n.save();var h=this.getAbsoluteTransform(a).getMatrix();return n.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedHitCanvas(n),n.restore(),this}if(!s)return this;if(n.save(),n._applyLineJoin(this),!(this===a)){var c=this.getAbsoluteTransform(a).getMatrix();n.transform(c[0],c[1],c[2],c[3],c[4],c[5])}return s.call(this,n,this),n.restore(),this}drawHitFromCache(t=0){var a,r,i,o,n,s=this._getCanvasCache(),d=this._getCachedSceneCanvas(),l=s.hit,h=l.getContext(),c=l.getWidth(),f=l.getHeight();h.clear(),h.drawImage(d._canvas,0,0,c,f);try{for(i=(r=(a=h.getImageData(0,0,c,f)).data).length,o=e.Util._hexToRgb(this.colorKey),n=0;n<i;n+=4)r[n+3]>t?(r[n]=o.r,r[n+1]=o.g,r[n+2]=o.b,r[n+3]=255):r[n+3]=0;h.putImageData(a,0,0)}catch(u){e.Util.error("Unable to draw hit graph from cached scene canvas. "+u.message)}return this}hasPointerCapture(t){return o.hasPointerCapture(t,this)}setPointerCapture(t){o.setPointerCapture(t,this)}releaseCapture(t){o.releaseCapture(t,this)}}exports.Shape=_,_.prototype._fillFunc=S,_.prototype._strokeFunc=p,_.prototype._fillFuncHit=G,_.prototype._strokeFuncHit=C,_.prototype._centroid=!1,_.prototype.nodeType="Shape",(0,t._registerNode)(_),_.prototype.eventListeners={},_.prototype.on.call(_.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",F),_.prototype.on.call(_.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",v),_.prototype.on.call(_.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",k),_.prototype.on.call(_.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",P),_.prototype.on.call(_.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",w),a.Factory.addGetterSetter(_,"stroke",void 0,(0,i.getStringOrGradientValidator)()),a.Factory.addGetterSetter(_,"strokeWidth",2,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillAfterStrokeEnabled",!1),a.Factory.addGetterSetter(_,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),a.Factory.addGetterSetter(_,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),a.Factory.addGetterSetter(_,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),a.Factory.addGetterSetter(_,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),a.Factory.addGetterSetter(_,"lineJoin"),a.Factory.addGetterSetter(_,"lineCap"),a.Factory.addGetterSetter(_,"sceneFunc"),a.Factory.addGetterSetter(_,"hitFunc"),a.Factory.addGetterSetter(_,"dash"),a.Factory.addGetterSetter(_,"dashOffset",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"shadowColor",void 0,(0,i.getStringValidator)()),a.Factory.addGetterSetter(_,"shadowBlur",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"shadowOpacity",1,(0,i.getNumberValidator)()),a.Factory.addComponentsGetterSetter(_,"shadowOffset",["x","y"]),a.Factory.addGetterSetter(_,"shadowOffsetX",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"shadowOffsetY",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillPatternImage"),a.Factory.addGetterSetter(_,"fill",void 0,(0,i.getStringOrGradientValidator)()),a.Factory.addGetterSetter(_,"fillPatternX",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillPatternY",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillLinearGradientColorStops"),a.Factory.addGetterSetter(_,"strokeLinearGradientColorStops"),a.Factory.addGetterSetter(_,"fillRadialGradientStartRadius",0),a.Factory.addGetterSetter(_,"fillRadialGradientEndRadius",0),a.Factory.addGetterSetter(_,"fillRadialGradientColorStops"),a.Factory.addGetterSetter(_,"fillPatternRepeat","repeat"),a.Factory.addGetterSetter(_,"fillEnabled",!0),a.Factory.addGetterSetter(_,"strokeEnabled",!0),a.Factory.addGetterSetter(_,"shadowEnabled",!0),a.Factory.addGetterSetter(_,"dashEnabled",!0),a.Factory.addGetterSetter(_,"strokeScaleEnabled",!0),a.Factory.addGetterSetter(_,"fillPriority","color"),a.Factory.addComponentsGetterSetter(_,"fillPatternOffset",["x","y"]),a.Factory.addGetterSetter(_,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),a.Factory.addComponentsGetterSetter(_,"fillPatternScale",["x","y"]),a.Factory.addGetterSetter(_,"fillPatternScaleX",1,(0,i.getNumberValidator)()),a.Factory.addGetterSetter(_,"fillPatternScaleY",1,(0,i.getNumberValidator)()),a.Factory.addComponentsGetterSetter(_,"fillLinearGradientStartPoint",["x","y"]),a.Factory.addComponentsGetterSetter(_,"strokeLinearGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(_,"fillLinearGradientStartPointX",0),a.Factory.addGetterSetter(_,"strokeLinearGradientStartPointX",0),a.Factory.addGetterSetter(_,"fillLinearGradientStartPointY",0),a.Factory.addGetterSetter(_,"strokeLinearGradientStartPointY",0),a.Factory.addComponentsGetterSetter(_,"fillLinearGradientEndPoint",["x","y"]),a.Factory.addComponentsGetterSetter(_,"strokeLinearGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(_,"fillLinearGradientEndPointX",0),a.Factory.addGetterSetter(_,"strokeLinearGradientEndPointX",0),a.Factory.addGetterSetter(_,"fillLinearGradientEndPointY",0),a.Factory.addGetterSetter(_,"strokeLinearGradientEndPointY",0),a.Factory.addComponentsGetterSetter(_,"fillRadialGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(_,"fillRadialGradientStartPointX",0),a.Factory.addGetterSetter(_,"fillRadialGradientStartPointY",0),a.Factory.addComponentsGetterSetter(_,"fillRadialGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(_,"fillRadialGradientEndPointX",0),a.Factory.addGetterSetter(_,"fillRadialGradientEndPointY",0),a.Factory.addGetterSetter(_,"fillPatternRotation",0),a.Factory.backCompat(_,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});
|
|
79
79
|
},{"./Global.js":"bIDB","./Util.js":"XIcS","./Factory.js":"cgGB","./Node.js":"pBWF","./Validators.js":"tgRR","./PointerEvents.js":"Gfsp"}],"Xvvm":[function(require,module,exports) {
|
|
@@ -89,7 +89,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
89
89
|
},{"./Util.js":"XIcS","./Animation.js":"axDI","./Node.js":"pBWF","./Global.js":"bIDB"}],"Ufhz":[function(require,module,exports) {
|
|
90
90
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.Konva=void 0;var e=require("./Global.js"),r=require("./Util.js"),a=require("./Node.js"),s=require("./Container.js"),t=require("./Stage.js"),i=require("./Layer.js"),n=require("./FastLayer.js"),o=require("./Group.js"),u=require("./DragAndDrop.js"),j=require("./Shape.js"),p=require("./Animation.js"),q=require("./Tween.js"),l=require("./Context.js"),v=require("./Canvas.js");const d=r.Util._assign(e.Konva,{Util:r.Util,Transform:r.Transform,Node:a.Node,Container:s.Container,Stage:t.Stage,stages:t.stages,Layer:i.Layer,FastLayer:n.FastLayer,Group:o.Group,DD:u.DD,Shape:j.Shape,shapes:j.shapes,Animation:p.Animation,Tween:q.Tween,Easings:q.Easings,Context:l.Context,Canvas:v.Canvas});exports.Konva=d;var g=d;exports.default=g;
|
|
91
91
|
},{"./Global.js":"bIDB","./Util.js":"XIcS","./Node.js":"pBWF","./Container.js":"Eysw","./Stage.js":"inLU","./Layer.js":"Xvvm","./FastLayer.js":"xdSo","./Group.js":"SoFy","./DragAndDrop.js":"XvfD","./Shape.js":"JWag","./Animation.js":"axDI","./Tween.js":"Rq7v","./Context.js":"pIAY","./Canvas.js":"KydS"}],"XspI":[function(require,module,exports) {
|
|
92
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Arc=void 0;var
|
|
92
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Arc=void 0;var t=require("../Factory.js"),e=require("../Shape.js"),r=require("../Global.js"),a=require("../Validators.js");class i extends e.Shape{_sceneFunc(t){var e=r.Konva.getAngle(this.angle()),a=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,a),t.arc(0,0,this.innerRadius(),e,0,!a),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),e=this.outerRadius(),a=this.clockwise(),i=r.Konva.getAngle(a?360-this.angle():this.angle()),s=Math.cos(Math.min(i,Math.PI)),o=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),h=Math.sin(Math.min(i,Math.PI/2)),d=s*(s>0?t:e),u=1*e,n=o*(o>0?t:e),c=h*(h>0?e:t);return{x:Math.round(d),y:Math.round(a?-1*c:n),width:Math.round(u-d),height:Math.round(c-n)}}}exports.Arc=i,i.prototype._centroid=!0,i.prototype.className="Arc",i.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,r._registerNode)(i),t.Factory.addGetterSetter(i,"innerRadius",0,(0,a.getNumberValidator)()),t.Factory.addGetterSetter(i,"outerRadius",0,(0,a.getNumberValidator)()),t.Factory.addGetterSetter(i,"angle",0,(0,a.getNumberValidator)()),t.Factory.addGetterSetter(i,"clockwise",!1,(0,a.getBooleanValidator)());
|
|
93
93
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Global.js":"bIDB","../Validators.js":"tgRR"}],"Pkrp":[function(require,module,exports) {
|
|
94
94
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Line=void 0;var t=require("../Factory.js"),e=require("../Shape.js"),i=require("../Validators.js"),n=require("../Global.js");function s(t,e,i,n,s,o,r){var h=Math.sqrt(Math.pow(i-t,2)+Math.pow(n-e,2)),a=Math.sqrt(Math.pow(s-i,2)+Math.pow(o-n,2)),u=r*h/(h+a),c=r*a/(h+a);return[i-u*(s-t),n-u*(o-e),i+c*(s-t),n+c*(o-e)]}function o(t,e){var i,n,o=t.length,r=[];for(i=2;i<o-2;i+=2)n=s(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e),isNaN(n[0])||(r.push(n[0]),r.push(n[1]),r.push(t[i]),r.push(t[i+1]),r.push(n[2]),r.push(n[3]));return r}class r extends e.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var e,i,n,s=this.points(),o=s.length,r=this.tension(),h=this.closed(),a=this.bezier();if(o){if(t.beginPath(),t.moveTo(s[0],s[1]),0!==r&&o>4){for(i=(e=this.getTensionPoints()).length,n=h?0:4,h||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);n<i-2;)t.bezierCurveTo(e[n++],e[n++],e[n++],e[n++],e[n++],e[n++]);h||t.quadraticCurveTo(e[i-2],e[i-1],s[o-2],s[o-1])}else if(a)for(n=2;n<o;)t.bezierCurveTo(s[n++],s[n++],s[n++],s[n++],s[n++],s[n++]);else for(n=2;n<o;n+=2)t.lineTo(s[n],s[n+1]);h?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():o(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,i=this.tension(),n=s(t[e-2],t[e-1],t[0],t[1],t[2],t[3],i),r=s(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],i),h=o(t,i);return[n[2],n[3]].concat(h).concat([r[0],r[1],t[e-2],t[e-1],r[2],r[3],n[0],n[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};for(var e,i,n=(t=0!==this.tension()?[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:this.points())[0],s=t[0],o=t[1],r=t[1],h=0;h<t.length/2;h++)e=t[2*h],i=t[2*h+1],n=Math.min(n,e),s=Math.max(s,e),o=Math.min(o,i),r=Math.max(r,i);return{x:n,y:o,width:s-n,height:r-o}}}exports.Line=r,r.prototype.className="Line",r.prototype._attrsAffectingSize=["points","bezier","tension"],(0,n._registerNode)(r),t.Factory.addGetterSetter(r,"closed",!1),t.Factory.addGetterSetter(r,"bezier",!1),t.Factory.addGetterSetter(r,"tension",0,(0,i.getNumberValidator)()),t.Factory.addGetterSetter(r,"points",[],(0,i.getNumberArrayValidator)());
|
|
95
95
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Validators.js":"tgRR","../Global.js":"bIDB"}],"QFP7":[function(require,module,exports) {
|
|
@@ -101,7 +101,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
101
101
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Validators.js":"tgRR","../Global.js":"bIDB"}],"IO5C":[function(require,module,exports) {
|
|
102
102
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Ellipse=void 0;var e=require("../Factory.js"),t=require("../Shape.js"),r=require("../Validators.js"),s=require("../Global.js");class a extends t.Shape{_sceneFunc(e){var t=this.radiusX(),r=this.radiusY();e.beginPath(),e.save(),t!==r&&e.scale(1,r/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}exports.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,s._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,r.getNumberValidator)());
|
|
103
103
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Validators.js":"tgRR","../Global.js":"bIDB"}],"Vhl9":[function(require,module,exports) {
|
|
104
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Image=void 0;var t=require("../Util.js"),e=require("../Factory.js"),r=require("../Shape.js"),a=require("../Validators.js"),i=require("../Global.js");class s extends r.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),r=this.getHeight(),a=this.attrs.image;let i;if(a){const t=this.attrs.cropWidth,s=this.attrs.cropHeight;i=t&&s?[a,this.cropX(),this.cropY(),t,s,0,0,e,r]:[a,0,0,e,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)),a&&t.drawImage.apply(t,i)}_hitFunc(t){var e=this.width(),r=this.height();t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(e,r){var
|
|
104
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Image=void 0;var t=require("../Util.js"),e=require("../Factory.js"),r=require("../Shape.js"),a=require("../Validators.js"),i=require("../Global.js");class s extends r.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),r=this.getHeight(),a=this.attrs.image;let i;if(a){const t=this.attrs.cropWidth,s=this.attrs.cropHeight;i=t&&s?[a,this.cropX(),this.cropY(),t,s,0,0,e,r]:[a,0,0,e,r]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)),a&&t.drawImage.apply(t,i)}_hitFunc(t){var e=this.width(),r=this.height();t.beginPath(),t.rect(0,0,e,r),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(e,r,a=null){var i=t.Util.createImageElement();i.onload=function(){var t=new s({image:i});r(t)},i.onerror=a,i.crossOrigin="Anonymous",i.src=e}}exports.Image=s,s.prototype.className="Image",(0,i._registerNode)(s),e.Factory.addGetterSetter(s,"image"),e.Factory.addComponentsGetterSetter(s,"crop",["x","y","width","height"]),e.Factory.addGetterSetter(s,"cropX",0,(0,a.getNumberValidator)()),e.Factory.addGetterSetter(s,"cropY",0,(0,a.getNumberValidator)()),e.Factory.addGetterSetter(s,"cropWidth",0,(0,a.getNumberValidator)()),e.Factory.addGetterSetter(s,"cropHeight",0,(0,a.getNumberValidator)());
|
|
105
105
|
},{"../Util.js":"XIcS","../Factory.js":"cgGB","../Shape.js":"JWag","../Validators.js":"tgRR","../Global.js":"bIDB"}],"bfvj":[function(require,module,exports) {
|
|
106
106
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Tag=exports.Label=void 0;var t=require("../Factory.js"),e=require("../Shape.js"),i=require("../Group.js"),r=require("../Validators.js"),o=require("../Global.js"),a=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height"],n="Change.konva",h="none",s="up",d="right",l="down",c="left",g=a.length;class p extends i.Group{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e,i=this,r=function(){i._sync()};for(e=0;e<g;e++)t.on(a[e]+n,r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t,e,i,r,o,a,n,h=this.getText(),g=this.getTag();if(h&&g){switch(t=h.width(),e=h.height(),i=g.pointerDirection(),r=g.pointerWidth(),n=g.pointerHeight(),o=0,a=0,i){case s:o=t/2,a=-1*n;break;case d:o=t+r,a=e/2;break;case l:o=t/2,a=e+n;break;case c:o=-1*r,a=e/2}g.setAttrs({x:-1*o,y:-1*a,width:t,height:e}),h.setAttrs({x:-1*o,y:-1*a})}}}exports.Label=p,p.prototype.className="Label",(0,o._registerNode)(p);class u extends e.Shape{_sceneFunc(t){var e=this.width(),i=this.height(),r=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),n=this.cornerRadius();let h=0,g=0,p=0,u=0;"number"==typeof n?h=g=p=u=Math.min(n,e/2,i/2):(h=Math.min(n[0]||0,e/2,i/2),g=Math.min(n[1]||0,e/2,i/2),u=Math.min(n[2]||0,e/2,i/2),p=Math.min(n[3]||0,e/2,i/2)),t.beginPath(),t.moveTo(h,0),r===s&&(t.lineTo((e-o)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+o)/2,0)),t.lineTo(e-g,0),t.arc(e-g,g,g,3*Math.PI/2,0,!1),r===d&&(t.lineTo(e,(i-a)/2),t.lineTo(e+o,i/2),t.lineTo(e,(i+a)/2)),t.lineTo(e,i-u),t.arc(e-u,i-u,u,0,Math.PI/2,!1),r===l&&(t.lineTo((e+o)/2,i),t.lineTo(e/2,i+a),t.lineTo((e-o)/2,i)),t.lineTo(p,i),t.arc(p,i-p,p,Math.PI/2,Math.PI,!1),r===c&&(t.lineTo(0,(i+a)/2),t.lineTo(-1*o,i/2),t.lineTo(0,(i-a)/2)),t.lineTo(0,h),t.arc(h,h,h,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,i=this.pointerWidth(),r=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),n=this.height();return o===s?(e-=r,n+=r):o===l?n+=r:o===c?(t-=1.5*i,a+=i):o===d&&(a+=1.5*i),{x:t,y:e,width:a,height:n}}}exports.Tag=u,u.prototype.className="Tag",(0,o._registerNode)(u),t.Factory.addGetterSetter(u,"pointerDirection",h),t.Factory.addGetterSetter(u,"pointerWidth",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(u,"pointerHeight",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(u,"cornerRadius",0,(0,r.getNumberOrArrayOfNumbersValidator)(4));
|
|
107
107
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Group.js":"SoFy","../Validators.js":"tgRR","../Global.js":"bIDB"}],"Fb9z":[function(require,module,exports) {
|
|
@@ -119,7 +119,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
119
119
|
},{"../Util.js":"XIcS","../Factory.js":"cgGB","../Shape.js":"JWag","../Validators.js":"tgRR","../Global.js":"bIDB"}],"aNkT":[function(require,module,exports) {
|
|
120
120
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextPath=void 0;var t=require("../Util.js"),e=require("../Factory.js"),a=require("../Shape.js"),i=require("./Path.js"),r=require("./Text.js"),n=require("../Validators.js"),h=require("../Global.js"),o="",s="normal";function p(t){t.fillText(this.partialText,0,0)}function x(t){t.strokeText(this.partialText,0,0)}class g extends a.Shape{constructor(e){super(e),this.dummyCanvas=t.Util.createCanvasElement(),this.dataArray=[],this.dataArray=i.Path.parsePathData(this.attrs.data),this.on("dataChange.konva",function(){this.dataArray=i.Path.parsePathData(this.attrs.data),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),a=this.fill(),i=this.fontSize(),r=this.glyphInfo;"underline"===e&&t.beginPath();for(var n=0;n<r.length;n++){t.save();var h=r[n].p0;t.translate(h.x,h.y),t.rotate(r[n].rotation),this.partialText=r[n].text,t.fillStrokeShape(this),"underline"===e&&(0===n&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=a,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var a=e[0].p0;t.moveTo(a.x,a.y)}for(var i=0;i<e.length;i++){var r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return t.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return r.Text.prototype.setText.call(this,t)}_getContextFont(){return r.Text.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();var a=e.measureText(t);return e.restore(),{width:a.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,e=this._getTextSize(this.attrs.text),a=this.letterSpacing(),n=this.align(),h=this.kerningFunc();this.textWidth=e.width,this.textHeight=e.height;var o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*a,0);this.glyphInfo=[];for(var s=0,p=0;p<t.dataArray.length;p++)t.dataArray[p].pathLength>0&&(s+=t.dataArray[p].pathLength);var x=0;"center"===n&&(x=Math.max(0,s/2-o/2)),"right"===n&&(x=Math.max(0,s-o));for(var g,l,d,y=(0,r.stringToArray)(this.text()),c=this.text().split(" ").length-1,f=-1,u=0,v=function(){u=0;for(var e=t.dataArray,a=f+1;a<e.length;a++){if(e[a].pathLength>0)return f=a,e[a];"M"===e[a].command&&(g={x:e[a].points[0],y:e[a].points[1]})}return{}},S=function(e){var r=t._getTextSize(e).width+a;" "===e&&"justify"===n&&(r+=(s-o)/c);var h=0,p=0;for(l=void 0;Math.abs(r-h)/r>.01&&p<20;){p++;for(var x=h;void 0===d;)(d=v())&&x+d.pathLength<r&&(x+=d.pathLength,d=void 0);if(d==={}||void 0===g)return;var y=!1;switch(d.command){case"L":i.Path.getLineLength(g.x,g.y,d.points[0],d.points[1])>r?l=i.Path.getPointOnLine(r,g.x,g.y,d.points[0],d.points[1],g.x,g.y):d=void 0;break;case"A":var f=d.points[4],S=d.points[5],T=d.points[4]+S;0===u?u=f+1e-8:r>h?u+=Math.PI/180*S/Math.abs(S):u-=Math.PI/360*S/Math.abs(S),(S<0&&u<T||S>=0&&u>T)&&(u=T,y=!0),l=i.Path.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],u,d.points[6]);break;case"C":0===u?u=r>d.pathLength?1e-8:r/d.pathLength:r>h?u+=(r-h)/d.pathLength/2:u=Math.max(u-(h-r)/d.pathLength/2,0),u>1&&(u=1,y=!0),l=i.Path.getPointOnCubicBezier(u,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);break;case"Q":0===u?u=r/d.pathLength:r>h?u+=(r-h)/d.pathLength:u-=(h-r)/d.pathLength,u>1&&(u=1,y=!0),l=i.Path.getPointOnQuadraticBezier(u,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3])}void 0!==l&&(h=i.Path.getLineLength(g.x,g.y,l.x,l.y)),y&&(y=!1,d=void 0)}},T=x/(t._getTextSize("C").width+a)-1,m=0;m<T&&(S("C"),void 0!==g&&void 0!==l);m++)g=l;for(var F=0;F<y.length&&(S(y[F]),void 0!==g&&void 0!==l);F++){var P=i.Path.getLineLength(g.x,g.y,l.x,l.y),_=0;if(h)try{_=h(y[F-1],y[F])*this.fontSize()}catch(A){_=0}g.x+=_,l.x+=_,this.textWidth+=_;var L=i.Path.getPointOnLine(_+P/2,g.x,g.y,l.x,l.y),k=Math.atan2(l.y-g.y,l.x-g.x);this.glyphInfo.push({transposeX:L.x,transposeY:L.y,text:y[F],rotation:k,p0:g,p1:l}),g=l}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)});for(var e,a,i=t[0]||0,r=t[0]||0,n=t[1]||0,h=t[1]||0,o=0;o<t.length/2;o++)e=t[2*o],a=t[2*o+1],i=Math.min(i,e),r=Math.max(r,e),n=Math.min(n,a),h=Math.max(h,a);var s=this.fontSize();return{x:i-s/2,y:n-s/2,width:r-i+s,height:h-n+s}}}exports.TextPath=g,g.prototype._fillFunc=p,g.prototype._strokeFunc=x,g.prototype._fillFuncHit=p,g.prototype._strokeFuncHit=x,g.prototype.className="TextPath",g.prototype._attrsAffectingSize=["text","fontSize","data"],(0,h._registerNode)(g),e.Factory.addGetterSetter(g,"data"),e.Factory.addGetterSetter(g,"fontFamily","Arial"),e.Factory.addGetterSetter(g,"fontSize",12,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(g,"fontStyle",s),e.Factory.addGetterSetter(g,"align","left"),e.Factory.addGetterSetter(g,"letterSpacing",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(g,"textBaseline","middle"),e.Factory.addGetterSetter(g,"fontVariant",s),e.Factory.addGetterSetter(g,"text",o),e.Factory.addGetterSetter(g,"textDecoration",null),e.Factory.addGetterSetter(g,"kerningFunc",null);
|
|
121
121
|
},{"../Util.js":"XIcS","../Factory.js":"cgGB","../Shape.js":"JWag","./Path.js":"QFP7","./Text.js":"BUL9","../Validators.js":"tgRR","../Global.js":"bIDB"}],"HEY6":[function(require,module,exports) {
|
|
122
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Transformer=void 0;var t=require("../Util.js"),e=require("../Factory.js"),i=require("../Node.js"),o=require("../Shape.js"),n=require("./Rect.js"),r=require("../Group.js"),s=require("../Global.js"),h=require("../Validators.js"),a="tr-konva",d=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(t=>t+`.${a}`).join(" "),g="nodesRect",c=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"].map(t=>t+`.${a}`).join(" "),f={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const l="ontouchstart"in s.Konva._global;function m(e,i){if("rotater"===e)return"crosshair";i+=t.Util.degToRad(f[e]||0);var o=(t.Util.radToDeg(i)%360+360)%360;return t.Util._inRange(o,337.5,360)||t.Util._inRange(o,0,22.5)?"ns-resize":t.Util._inRange(o,22.5,67.5)?"nesw-resize":t.Util._inRange(o,67.5,112.5)?"ew-resize":t.Util._inRange(o,112.5,157.5)?"nwse-resize":t.Util._inRange(o,157.5,202.5)?"ns-resize":t.Util._inRange(o,202.5,247.5)?"nesw-resize":t.Util._inRange(o,247.5,292.5)?"ew-resize":t.Util._inRange(o,292.5,337.5)?"nwse-resize":(t.Util.error("Transformer has unknown angle for cursor detection: "+o),"pointer")}var u=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],y=1e8;function p(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function _(t,e,i){const o=i.x+(t.x-i.x)*Math.cos(e)-(t.y-i.y)*Math.sin(e),n=i.y+(t.x-i.x)*Math.sin(e)+(t.y-i.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:o,y:n})}function b(t,e){return _(t,e,p(t))}function x(t,e,i){let o=e;for(let n=0;n<t.length;n++){const r=s.Konva.getAngle(t[n]),h=Math.abs(r-e)%(2*Math.PI);Math.min(h,2*Math.PI-h)<i&&(o=r)}return o}class v extends r.Group{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(d,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(e){return t.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}setNodes(t=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{const e=t._attrsAffectingSize.map(t=>t+"Change."+a).join(" "),i=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()};t.on(e,i),t.on(c,i),t.on(`absoluteTransformChange.${a}`,i),t.on(`xChange.${a} yChange.${a}`,i),this._proxyDrag(t)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${a}`,i=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(i,!1)}),t.on(`dragmove.${a}`,i=>{if(!e)return;const o=t.getAbsolutePosition(),n=o.x-e.x,r=o.y-e.y;this.nodes().forEach(e=>{if(e===t)return;if(e.isDragging())return;const o=e.getAbsolutePosition();e.setAbsolutePosition({x:o.x+n,y:o.y+r}),e.startDrag(i)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+a)}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(g),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(g,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),i){var o=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),n=t.getAbsoluteScale(i),r=t.getAbsolutePosition(i),h=o.x*n.x-t.offsetX()*n.x,a=o.y*n.y-t.offsetY()*n.y;const d=(s.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return _({x:r.x+h*Math.cos(d)+a*Math.sin(-d),y:r.y+a*Math.cos(d)+h*Math.sin(d),width:o.width*n.x,height:o.height*n.y,rotation:d},-s.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-y,y:-y,width:0,height:0,rotation:0};const e=[];this.nodes().map(t=>{const i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var o=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],n=t.getAbsoluteTransform();o.forEach(function(t){var i=n.point(t);e.push(i)})});const i=new t.Transform;var o,n,r,h;i.rotate(-s.Konva.getAngle(this.rotation())),e.forEach(function(t){var e=i.point(t);void 0===o&&(o=r=e.x,n=h=e.y),o=Math.min(o,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),h=Math.max(h,e.y)}),i.invert();const a=i.point({x:o,y:n});return{x:a.x,y:a.y,width:r-o,height:h-n,rotation:s.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),u.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var e=new n.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:l?10:"auto"}),i=this;e.on("mousedown touchstart",function(t){i._handleMouseDown(t)}),e.on("dragstart",t=>{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{var i=s.Konva.getAngle(this.rotation()),o=m(t,i);e.getStage().content&&(e.getStage().content.style.cursor=o),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){var e=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e){var i=this.getParent(),o=i.padding();e.beginPath(),e.rect(-o,-o,this.width()+2*o,this.height()+2*o),e.moveTo(this.width()/2,-o),i.rotateEnabled()&&e.lineTo(this.width()/2,-i.rotateAnchorOffset()*t.Util._sign(this.height())-o),e.fillStrokeShape(this)},hitFunc:(t,e)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.fillStrokeShape(e)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",t=>{t.cancelBubble=!0}),e.on("dragmove",t=>{t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),i=e.width,o=e.height,n=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));this.sin=Math.abs(o/n),this.cos=Math.abs(i/n),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var r=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-r.x,y:s.y-r.y},this._fire("transformstart",{evt:t,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t,target:e})})}_handleMouseMove(t){var e,i,o,n=this.findOne("."+this._movingAnchorName),r=n.getStage();r.setPointersPositions(t);const h=r.getPointerPosition();var a={x:h.x-this._anchorDragOffset.x,y:h.y-this._anchorDragOffset.y};const d=n.getAbsolutePosition();n.setAbsolutePosition(a);const g=n.getAbsolutePosition();if(d.x!==g.x||d.y!==g.y)if("rotater"!==this._movingAnchorName){var c=this.keepRatio()||t.shiftKey,f=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(c){var l=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};o=Math.sqrt(Math.pow(l.x-n.x(),2)+Math.pow(l.y-n.y(),2));var m=this.findOne(".top-left").x()>l.x?-1:1,u=this.findOne(".top-left").y()>l.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".top-left").x(l.x-e),this.findOne(".top-left").y(l.y-i)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(n.y());else if("top-right"===this._movingAnchorName){if(c){l=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};o=Math.sqrt(Math.pow(n.x()-l.x,2)+Math.pow(l.y-n.y(),2));m=this.findOne(".top-right").x()<l.x?-1:1,u=this.findOne(".top-right").y()>l.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".top-right").x(l.x+e),this.findOne(".top-right").y(l.y-i)}var y=n.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(n.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(n.x());else if("bottom-left"===this._movingAnchorName){if(c){l=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};o=Math.sqrt(Math.pow(l.x-n.x(),2)+Math.pow(n.y()-l.y,2));m=l.x<n.x()?-1:1,u=n.y()<l.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,n.x(l.x-e),n.y(l.y+i)}y=n.position(),this.findOne(".top-left").x(y.x),this.findOne(".bottom-right").y(y.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(n.y());else if("bottom-right"===this._movingAnchorName){if(c){l=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};o=Math.sqrt(Math.pow(n.x()-l.x,2)+Math.pow(n.y()-l.y,2));m=this.findOne(".bottom-right").x()<l.x?-1:1,u=this.findOne(".bottom-right").y()<l.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".bottom-right").x(l.x+e),this.findOne(".bottom-right").y(l.y+i)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(f=this.centeredScaling()||t.altKey){var p=this.findOne(".top-left"),_=this.findOne(".bottom-right"),v=p.x(),w=p.y(),A=this.getWidth()-_.x(),S=this.getHeight()-_.y();_.move({x:-v,y:-w}),p.move({x:A,y:S})}var O=this.findOne(".top-left").getAbsolutePosition();e=O.x,i=O.y;var N=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:i,width:N,height:C,rotation:s.Konva.getAngle(this.rotation())},t)}else{var M=this._getNodeRect();e=n.x()-M.width/2,i=-n.y()+M.height/2;let o=Math.atan2(-i,e)+Math.PI/2;M.height<0&&(o-=Math.PI);const r=s.Konva.getAngle(this.rotation())+o,h=s.Konva.getAngle(this.rotationSnapTolerance()),a=b(M,x(this.rotationSnaps(),r,h)-M.rotation);this._fitNodesInto(a,t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach(e=>{e._fire("transformend",{evt:t,target:e})}),this._movingAnchorName=null}}_fitNodesInto(e,i){var o=this._getNodeRect();if(t.Util._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(t.Util._inRange(e.height,2*-this.padding()-1,1))return void this.update();const n=this.flipEnabled();var r=new t.Transform;if(r.rotate(s.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=r.point({x:2*-this.padding(),y:0});if(e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!n)return void this.update()}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=r.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding(),!n)return void this.update()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=r.point({x:0,y:2*-this.padding()});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!n)return void this.update()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=r.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!n)return void this.update()}if(this.boundBoxFunc()){const i=this.boundBoxFunc()(o,e);i?e=i:t.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const h=new t.Transform;h.translate(o.x,o.y),h.rotate(o.rotation),h.scale(o.width/1e7,o.height/1e7);const a=new t.Transform;a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.width/1e7,e.height/1e7);const d=a.multiply(h.invert());this._nodes.forEach(e=>{var o;const n=e.getParent().getAbsoluteTransform(),r=e.getTransform().copy();r.translate(e.offsetX(),e.offsetY());const s=new t.Transform;s.multiply(n.copy().invert()).multiply(d).multiply(n).multiply(r);const h=s.decompose();e.setAttrs(h),this._fire("transform",{evt:i,target:e}),e._fire("transform",{evt:i,target:e}),null===(o=e.getLayer())||void 0===o||o.batchDraw()}),this.rotation(t.Util._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var e,i=this._getNodeRect();this.rotation(t.Util._getRotation(i.rotation));var o=i.width,n=i.height,r=this.enabledAnchors(),s=this.resizeEnabled(),h=this.padding(),a=this.anchorSize();this.find("._anchor").forEach(t=>{t.setAttrs({width:a,height:a,offsetX:a/2,offsetY:a/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:a/2+h,offsetY:a/2+h,visible:s&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:o/2,y:0,offsetY:a/2+h,visible:s&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:o,y:0,offsetX:a/2-h,offsetY:a/2+h,visible:s&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:n/2,offsetX:a/2+h,visible:s&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:o,y:n/2,offsetX:a/2-h,visible:s&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:n,offsetX:a/2+h,offsetY:a/2-h,visible:s&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:o/2,y:n,offsetY:a/2-h,visible:s&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:o,y:n,offsetX:a/2-h,offsetY:a/2-h,visible:s&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:o/2,y:-this.rotateAnchorOffset()*t.Util._sign(n)-h,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:o,height:n,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),r.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return i.Node.prototype.toObject.call(this)}}function w(e){return e instanceof Array||t.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(e){-1===u.indexOf(e)&&t.Util.warn("Unknown anchor name: "+e+". Available names are: "+u.join(", "))}),e||[]}exports.Transformer=v,v.prototype.className="Transformer",(0,s._registerNode)(v),e.Factory.addGetterSetter(v,"enabledAnchors",u,w),e.Factory.addGetterSetter(v,"flipEnabled",!0,(0,h.getBooleanValidator)()),e.Factory.addGetterSetter(v,"resizeEnabled",!0),e.Factory.addGetterSetter(v,"anchorSize",10,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"rotateEnabled",!0),e.Factory.addGetterSetter(v,"rotationSnaps",[]),e.Factory.addGetterSetter(v,"rotateAnchorOffset",50,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"rotationSnapTolerance",5,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"borderEnabled",!0),e.Factory.addGetterSetter(v,"anchorStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(v,"anchorStrokeWidth",1,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"anchorFill","white"),e.Factory.addGetterSetter(v,"anchorCornerRadius",0,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"borderStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(v,"borderStrokeWidth",1,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"borderDash"),e.Factory.addGetterSetter(v,"keepRatio",!0),e.Factory.addGetterSetter(v,"centeredScaling",!1),e.Factory.addGetterSetter(v,"ignoreStroke",!1),e.Factory.addGetterSetter(v,"padding",0,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(v,"node"),e.Factory.addGetterSetter(v,"nodes"),e.Factory.addGetterSetter(v,"boundBoxFunc"),e.Factory.addGetterSetter(v,"shouldOverdrawWholeArea",!1),e.Factory.addGetterSetter(v,"useSingleNodeRotation",!0),e.Factory.backCompat(v,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});
|
|
122
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Transformer=void 0;var t=require("../Util.js"),e=require("../Factory.js"),i=require("../Node.js"),o=require("../Shape.js"),n=require("./Rect.js"),r=require("../Group.js"),s=require("../Global.js"),h=require("../Validators.js"),a="tr-konva",d=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map(t=>t+`.${a}`).join(" "),g="nodesRect",c=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],l={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const f="ontouchstart"in s.Konva._global;function m(e,i){if("rotater"===e)return"crosshair";i+=t.Util.degToRad(l[e]||0);var o=(t.Util.radToDeg(i)%360+360)%360;return t.Util._inRange(o,337.5,360)||t.Util._inRange(o,0,22.5)?"ns-resize":t.Util._inRange(o,22.5,67.5)?"nesw-resize":t.Util._inRange(o,67.5,112.5)?"ew-resize":t.Util._inRange(o,112.5,157.5)?"nwse-resize":t.Util._inRange(o,157.5,202.5)?"ns-resize":t.Util._inRange(o,202.5,247.5)?"nesw-resize":t.Util._inRange(o,247.5,292.5)?"ew-resize":t.Util._inRange(o,292.5,337.5)?"nwse-resize":(t.Util.error("Transformer has unknown angle for cursor detection: "+o),"pointer")}var u=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],y=1e8;function p(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function _(t,e,i){const o=i.x+(t.x-i.x)*Math.cos(e)-(t.y-i.y)*Math.sin(e),n=i.y+(t.x-i.x)*Math.sin(e)+(t.y-i.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:o,y:n})}function b(t,e){return _(t,e,p(t))}function v(t,e,i){let o=e;for(let n=0;n<t.length;n++){const r=s.Konva.getAngle(t[n]),h=Math.abs(r-e)%(2*Math.PI);Math.min(h,2*Math.PI-h)<i&&(o=r)}return o}class x extends r.Group{constructor(t){super(t),this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(d,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(e){return t.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return a+this._id}setNodes(t=[]){return this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{const e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},i=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(i,e),t.on(c.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,i=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(i,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!e)return;const o=t.getAbsolutePosition(),n=o.x-e.x,r=o.y-e.y;this.nodes().forEach(e=>{if(e===t)return;if(e.isDragging())return;const o=e.getAbsolutePosition();e.setAbsolutePosition({x:o.x+n,y:o.y+r}),e.startDrag(i)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(g),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(g,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),i){var o=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),n=t.getAbsoluteScale(i),r=t.getAbsolutePosition(i),h=o.x*n.x-t.offsetX()*n.x,a=o.y*n.y-t.offsetY()*n.y;const d=(s.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return _({x:r.x+h*Math.cos(d)+a*Math.sin(-d),y:r.y+a*Math.cos(d)+h*Math.sin(d),width:o.width*n.x,height:o.height*n.y,rotation:d},-s.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-y,y:-y,width:0,height:0,rotation:0};const e=[];this.nodes().map(t=>{const i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var o=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],n=t.getAbsoluteTransform();o.forEach(function(t){var i=n.point(t);e.push(i)})});const i=new t.Transform;var o,n,r,h;i.rotate(-s.Konva.getAngle(this.rotation())),e.forEach(function(t){var e=i.point(t);void 0===o&&(o=r=e.x,n=h=e.y),o=Math.min(o,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x),h=Math.max(h,e.y)}),i.invert();const a=i.point({x:o,y:n});return{x:a.x,y:a.y,width:r-o,height:h-n,rotation:s.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),u.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var e=new n.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:f?10:"auto"}),i=this;e.on("mousedown touchstart",function(t){i._handleMouseDown(t)}),e.on("dragstart",t=>{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{var i=s.Konva.getAngle(this.rotation()),o=m(t,i);e.getStage().content&&(e.getStage().content.style.cursor=o),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){var e=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e){var i=this.getParent(),o=i.padding();e.beginPath(),e.rect(-o,-o,this.width()+2*o,this.height()+2*o),e.moveTo(this.width()/2,-o),i.rotateEnabled()&&e.lineTo(this.width()/2,-i.rotateAnchorOffset()*t.Util._sign(this.height())-o),e.fillStrokeShape(this)},hitFunc:(t,e)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.fillStrokeShape(e)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",t=>{t.cancelBubble=!0}),e.on("dragmove",t=>{t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),i=e.width,o=e.height,n=Math.sqrt(Math.pow(i,2)+Math.pow(o,2));this.sin=Math.abs(o/n),this.cos=Math.abs(i/n),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var r=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-r.x,y:s.y-r.y},this._fire("transformstart",{evt:t,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t,target:e})})}_handleMouseMove(t){var e,i,o,n=this.findOne("."+this._movingAnchorName),r=n.getStage();r.setPointersPositions(t);const h=r.getPointerPosition();let a={x:h.x-this._anchorDragOffset.x,y:h.y-this._anchorDragOffset.y};const d=n.getAbsolutePosition();this.anchorDragBoundFunc()&&(a=this.anchorDragBoundFunc()(d,a,t)),n.setAbsolutePosition(a);const g=n.getAbsolutePosition();if(d.x!==g.x||d.y!==g.y)if("rotater"!==this._movingAnchorName){var c=this.keepRatio()||t.shiftKey,l=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(c){var f=l?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};o=Math.sqrt(Math.pow(f.x-n.x(),2)+Math.pow(f.y-n.y(),2));var m=this.findOne(".top-left").x()>f.x?-1:1,u=this.findOne(".top-left").y()>f.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".top-left").x(f.x-e),this.findOne(".top-left").y(f.y-i)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(n.y());else if("top-right"===this._movingAnchorName){if(c){f=l?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};o=Math.sqrt(Math.pow(n.x()-f.x,2)+Math.pow(f.y-n.y(),2));m=this.findOne(".top-right").x()<f.x?-1:1,u=this.findOne(".top-right").y()>f.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".top-right").x(f.x+e),this.findOne(".top-right").y(f.y-i)}var y=n.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(n.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(n.x());else if("bottom-left"===this._movingAnchorName){if(c){f=l?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};o=Math.sqrt(Math.pow(f.x-n.x(),2)+Math.pow(n.y()-f.y,2));m=f.x<n.x()?-1:1,u=n.y()<f.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,n.x(f.x-e),n.y(f.y+i)}y=n.position(),this.findOne(".top-left").x(y.x),this.findOne(".bottom-right").y(y.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(n.y());else if("bottom-right"===this._movingAnchorName){if(c){f=l?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};o=Math.sqrt(Math.pow(n.x()-f.x,2)+Math.pow(n.y()-f.y,2));m=this.findOne(".bottom-right").x()<f.x?-1:1,u=this.findOne(".bottom-right").y()<f.y?-1:1;e=o*this.cos*m,i=o*this.sin*u,this.findOne(".bottom-right").x(f.x+e),this.findOne(".bottom-right").y(f.y+i)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(l=this.centeredScaling()||t.altKey){var p=this.findOne(".top-left"),_=this.findOne(".bottom-right"),x=p.x(),w=p.y(),A=this.getWidth()-_.x(),S=this.getHeight()-_.y();_.move({x:-x,y:-w}),p.move({x:A,y:S})}var N=this.findOne(".top-left").getAbsolutePosition();e=N.x,i=N.y;var O=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:i,width:O,height:C,rotation:s.Konva.getAngle(this.rotation())},t)}else{var M=this._getNodeRect();e=n.x()-M.width/2,i=-n.y()+M.height/2;let o=Math.atan2(-i,e)+Math.PI/2;M.height<0&&(o-=Math.PI);const r=s.Konva.getAngle(this.rotation())+o,h=s.Konva.getAngle(this.rotationSnapTolerance()),a=b(M,v(this.rotationSnaps(),r,h)-M.rotation);this._fitNodesInto(a,t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach(e=>{e._fire("transformend",{evt:t,target:e})}),this._movingAnchorName=null}}_fitNodesInto(e,i){var o=this._getNodeRect();if(t.Util._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(t.Util._inRange(e.height,2*-this.padding()-1,1))return void this.update();const n=this.flipEnabled();var r=new t.Transform;if(r.rotate(s.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=r.point({x:2*-this.padding(),y:0});if(e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!n)return void this.update()}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=r.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding(),!n)return void this.update()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=r.point({x:0,y:2*-this.padding()});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!n)return void this.update()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=r.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!n)return void this.update()}if(this.boundBoxFunc()){const i=this.boundBoxFunc()(o,e);i?e=i:t.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const h=new t.Transform;h.translate(o.x,o.y),h.rotate(o.rotation),h.scale(o.width/1e7,o.height/1e7);const a=new t.Transform;a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.width/1e7,e.height/1e7);const d=a.multiply(h.invert());this._nodes.forEach(e=>{var o;const n=e.getParent().getAbsoluteTransform(),r=e.getTransform().copy();r.translate(e.offsetX(),e.offsetY());const s=new t.Transform;s.multiply(n.copy().invert()).multiply(d).multiply(n).multiply(r);const h=s.decompose();e.setAttrs(h),this._fire("transform",{evt:i,target:e}),e._fire("transform",{evt:i,target:e}),null===(o=e.getLayer())||void 0===o||o.batchDraw()}),this.rotation(t.Util._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var e,i=this._getNodeRect();this.rotation(t.Util._getRotation(i.rotation));var o=i.width,n=i.height,r=this.enabledAnchors(),s=this.resizeEnabled(),h=this.padding(),a=this.anchorSize();this.find("._anchor").forEach(t=>{t.setAttrs({width:a,height:a,offsetX:a/2,offsetY:a/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:a/2+h,offsetY:a/2+h,visible:s&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:o/2,y:0,offsetY:a/2+h,visible:s&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:o,y:0,offsetX:a/2-h,offsetY:a/2+h,visible:s&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:n/2,offsetX:a/2+h,visible:s&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:o,y:n/2,offsetX:a/2-h,visible:s&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:n,offsetX:a/2+h,offsetY:a/2-h,visible:s&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:o/2,y:n,offsetY:a/2-h,visible:s&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:o,y:n,offsetX:a/2-h,offsetY:a/2-h,visible:s&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:o/2,y:-this.rotateAnchorOffset()*t.Util._sign(n)-h,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:o,height:n,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),r.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return i.Node.prototype.toObject.call(this)}}function w(e){return e instanceof Array||t.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(e){-1===u.indexOf(e)&&t.Util.warn("Unknown anchor name: "+e+". Available names are: "+u.join(", "))}),e||[]}exports.Transformer=x,x.prototype.className="Transformer",(0,s._registerNode)(x),e.Factory.addGetterSetter(x,"enabledAnchors",u,w),e.Factory.addGetterSetter(x,"flipEnabled",!0,(0,h.getBooleanValidator)()),e.Factory.addGetterSetter(x,"resizeEnabled",!0),e.Factory.addGetterSetter(x,"anchorSize",10,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"rotateEnabled",!0),e.Factory.addGetterSetter(x,"rotationSnaps",[]),e.Factory.addGetterSetter(x,"rotateAnchorOffset",50,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"rotationSnapTolerance",5,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"borderEnabled",!0),e.Factory.addGetterSetter(x,"anchorStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(x,"anchorStrokeWidth",1,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"anchorFill","white"),e.Factory.addGetterSetter(x,"anchorCornerRadius",0,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"borderStroke","rgb(0, 161, 255)"),e.Factory.addGetterSetter(x,"borderStrokeWidth",1,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"borderDash"),e.Factory.addGetterSetter(x,"keepRatio",!0),e.Factory.addGetterSetter(x,"centeredScaling",!1),e.Factory.addGetterSetter(x,"ignoreStroke",!1),e.Factory.addGetterSetter(x,"padding",0,(0,h.getNumberValidator)()),e.Factory.addGetterSetter(x,"node"),e.Factory.addGetterSetter(x,"nodes"),e.Factory.addGetterSetter(x,"boundBoxFunc"),e.Factory.addGetterSetter(x,"anchorDragBoundFunc"),e.Factory.addGetterSetter(x,"shouldOverdrawWholeArea",!1),e.Factory.addGetterSetter(x,"useSingleNodeRotation",!0),e.Factory.backCompat(x,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});
|
|
123
123
|
},{"../Util.js":"XIcS","../Factory.js":"cgGB","../Node.js":"pBWF","../Shape.js":"JWag","./Rect.js":"Fb9z","../Group.js":"SoFy","../Global.js":"bIDB","../Validators.js":"tgRR"}],"EbF6":[function(require,module,exports) {
|
|
124
124
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Wedge=void 0;var e=require("../Factory.js"),t=require("../Shape.js"),r=require("../Global.js"),a=require("../Validators.js");class s extends t.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,r.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}exports.Wedge=s,s.prototype.className="Wedge",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,r._registerNode)(s),e.Factory.addGetterSetter(s,"radius",0,(0,a.getNumberValidator)()),e.Factory.addGetterSetter(s,"angle",0,(0,a.getNumberValidator)()),e.Factory.addGetterSetter(s,"clockwise",!1),e.Factory.backCompat(s,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});
|
|
125
125
|
},{"../Factory.js":"cgGB","../Shape.js":"JWag","../Global.js":"bIDB","../Validators.js":"tgRR"}],"LYZO":[function(require,module,exports) {
|
|
@@ -178,7 +178,115 @@ module.exports=function(e){var n={},t=require("object-assign"),r=require("react"
|
|
|
178
178
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useStrictMode=exports.Stage=exports.Transformer=exports.Shape=exports.Arrow=exports.RegularPolygon=exports.Path=exports.Tag=exports.Arc=exports.Ring=exports.Star=exports.TextPath=exports.Text=exports.Image=exports.Sprite=exports.Line=exports.Wedge=exports.Ellipse=exports.Circle=exports.Rect=exports.Label=exports.Group=exports.FastLayer=exports.Layer=void 0;var e=s(require("react")),r=s(require("konva/lib/Core")),t=s(require("react-reconciler")),a=u(require("./ReactKonvaHostConfig")),o=require("./makeUpdates");function n(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(n=function(e){return e?t:r})(e)}function u(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=n(r);if(t&&t.has(e))return t.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var s=o?Object.getOwnPropertyDescriptor(e,u):null;s&&(s.get||s.set)?Object.defineProperty(a,u,s):a[u]=e[u]}return a.default=e,t&&t.set(e,a),a}function s(e){return e&&e.__esModule?e:{default:e}}var p=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e};function c(r){var t=e.default.useRef();return e.default.useLayoutEffect(function(){t.current=r}),t.current}var l=function(t){var a=e.default.useRef(),n=e.default.useRef(),u=e.default.useRef(),s=c(t),p=function(e){var r=t.forwardedRef;r&&("function"==typeof r?r(e):r.current=e)};return e.default.useLayoutEffect(function(){return n.current=new r.default.Stage({width:t.width,height:t.height,container:a.current}),p(n.current),u.current=I.createContainer(n.current),I.updateContainer(t.children,u.current),function(){r.default.isBrowser&&(p(null),I.updateContainer(null,u.current,null),n.current.destroy())}},[]),e.default.useLayoutEffect(function(){p(n.current),(0,o.applyNodeProps)(n.current,t,s),I.updateContainer(t.children,u.current,null)}),e.default.createElement("div",{ref:a,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},i="Layer";exports.Layer=i;var f="FastLayer";exports.FastLayer=f;var x="Group";exports.Group=x;var d="Label";exports.Label=d;var v="Rect";exports.Rect=v;var g="Circle";exports.Circle=g;var y="Ellipse";exports.Ellipse=y;var h="Wedge";exports.Wedge=h;var P="Line";exports.Line=P;var b="Sprite";exports.Sprite=b;var R="Image";exports.Image=R;var w="Text";exports.Text=w;var L="TextPath";exports.TextPath=L;var S="Star";exports.Star=S;var T="Ring";exports.Ring=T;var m="Arc";exports.Arc=m;var O="Tag";exports.Tag=O;var j="Path";exports.Path=j;var C="RegularPolygon";exports.RegularPolygon=C;var M="Arrow";exports.Arrow=M;var E="Shape";exports.Shape=E;var k="Transformer";exports.Transformer=k;var I=(0,t.default)(a);I.injectIntoDevTools({findHostInstanceByFiber:function(){return null},bundleType:0,version:e.default.version,rendererPackageName:"react-konva"});var A=e.default.forwardRef(function(r,t){return e.default.createElement(l,p({},r,{forwardedRef:t}))});exports.Stage=A;var W=o.toggleStrictMode;exports.useStrictMode=W;
|
|
179
179
|
},{"react":"HdMw","konva/lib/Core":"cQlj","react-reconciler":"lCn1","./ReactKonvaHostConfig":"yskO","./makeUpdates":"UEmO"}],"Sgug":[function(require,module,exports) {
|
|
180
180
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("konva");var e=require("./ReactKonvaCore");Object.keys(e).forEach(function(r){"default"!==r&&"__esModule"!==r&&(r in exports&&exports[r]===e[r]||Object.defineProperty(exports,r,{enumerable:!0,get:function(){return e[r]}}))});
|
|
181
|
-
},{"konva":"aTGn","./ReactKonvaCore":"JVlA"}],"
|
|
181
|
+
},{"konva":"aTGn","./ReactKonvaCore":"JVlA"}],"MJM3":[function(require,module,exports) {
|
|
182
|
+
var e=require("react"),t={image:void 0,status:"loading"};module.exports=function(r,n){var i=e.useState(t),a=i[0].image,o=i[0].status,s=i[1];return e.useEffect(function(){if(r){var e=document.createElement("img");return e.addEventListener("load",i),e.addEventListener("error",a),n&&(e.crossOrigin=n),e.src=r,function(){e.removeEventListener("load",i),e.removeEventListener("error",a),s(t)}}function i(){s({image:e,status:"loaded"})}function a(){s({image:void 0,status:"failed"})}},[r,n]),[a,o]};
|
|
183
|
+
},{"react":"HdMw"}],"XdpJ":[function(require,module,exports) {
|
|
184
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Html=void 0;var e=o(require("react")),t=o(require("react-dom")),r=require("react-konva");function o(e){return e&&e.__esModule?e:{default:e}}var n=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};const l=e=>{const t=window.getComputedStyle(e).position;return!("absolute"===t||"relative"===t)},s=({children:o,groupProps:s,divProps:a,transform:u,transformFunc:f})=>{const i=e.default.useRef(null),c=e.default.useRef(),d=null==u||u,p=()=>{const e=c.current;if(!e)return;if(d&&i.current){let t=i.current.getAbsoluteTransform().decompose();f&&(t=f(t)),e.style.position="absolute",e.style.zIndex="10",e.style.top="0px",e.style.left="0px",e.style.transform=`translate(${t.x}px, ${t.y}px) rotate(${t.rotation}deg) scaleX(${t.scaleX}) scaleY(${t.scaleY})`,e.style.transformOrigin="top left"}else e.style.position="",e.style.zIndex="",e.style.top="",e.style.left="",e.style.transform="",e.style.transformOrigin="";const t=a||{},{style:r}=t,o=n(t,["style"]);Object.assign(e.style,r),Object.assign(e,o)};return e.default.useLayoutEffect(()=>{var e;const r=i.current;if(!r)return;const o=null===(e=r.getStage())||void 0===e?void 0:e.container();if(!o)return;let n=document.createElement("div");return c.current=n,o.appendChild(n),d&&l(o)&&(o.style.position="relative"),r.on("absoluteTransformChange",p),p(),()=>{var e;r.off("absoluteTransformChange",p),t.default.unmountComponentAtNode(n),null===(e=n.parentNode)||void 0===e||e.removeChild(n)}},[d]),e.default.useLayoutEffect(()=>{p()},[a]),e.default.useLayoutEffect(()=>{t.default.render(o,c.current)}),e.default.createElement(r.Group,Object.assign({ref:i},s))};exports.Html=s;
|
|
185
|
+
},{"react":"HdMw","react-dom":"X9zx","react-konva":"Sgug"}],"beYE":[function(require,module,exports) {
|
|
186
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Portal=void 0;var e=t(require("react")),r=require("react-konva");function t(e){return e&&e.__esModule?e:{default:e}}const u=({selector:t,enabled:u,children:n})=>{const a=e.default.useRef(null),l=e.default.useRef(null),o=e.default.useRef(),c=null==u||u;return e.default.useLayoutEffect(()=>{if(!a.current||!l.current)return;o.current=l.current;const e=a.current.getStage().findOne(t);c&&e?l.current.moveTo(e):l.current.moveTo(a.current),a.current.getLayer().batchDraw(),e&&e.getLayer().batchDraw()},[t,c]),e.default.useEffect(()=>()=>{var e;null===(e=o.current)||void 0===e||e.destroy()},[]),e.default.createElement(r.Group,{name:"_outer_portal",ref:a},e.default.createElement(r.Group,{name:"_inner_portal",ref:l},n))};exports.Portal=u;
|
|
187
|
+
},{"react":"HdMw","react-konva":"Sgug"}],"Io9F":[function(require,module,exports) {
|
|
188
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"useImage",{enumerable:!0,get:function(){return e.default}});var e=r(require("use-image"));function r(e){return e&&e.__esModule?e:{default:e}}
|
|
189
|
+
},{"use-image":"MJM3"}],"jXQU":[function(require,module,exports) {
|
|
190
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Html",{enumerable:!0,get:function(){return e.Html}}),Object.defineProperty(exports,"Portal",{enumerable:!0,get:function(){return r.Portal}}),Object.defineProperty(exports,"useImage",{enumerable:!0,get:function(){return t.useImage}});var e=require("./html"),r=require("./portal"),t=require("./use-image");
|
|
191
|
+
},{"./html":"XdpJ","./portal":"beYE","./use-image":"Io9F"}],"N3c2":[function(require,module,exports) {
|
|
192
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFadeIn=exports.isAnimationUsed=exports.toggleFadeInAnimation=void 0;const t=e(require("react")),r=e(require("konva"));let n=!0;const o=(e=!n)=>{n=e};exports.toggleFadeInAnimation=o;const u=()=>n;function s(e,o){const u=t.default.useRef();t.default.useLayoutEffect(()=>{u.current&&u.current.destroy()},[o]),t.default.useLayoutEffect(()=>{if(!n)return;const t=e.current.opacity();return t?(e.current.opacity(0),u.current=new r.default.Tween({node:e.current,opacity:t,onFinish:()=>{var e;null===(e=u.current)||void 0===e||e.destroy()}}),u.current.play(),()=>{var e;null===(e=u.current)||void 0===e||e.destroy()}):void 0},[])}exports.isAnimationUsed=u,exports.useFadeIn=s;
|
|
193
|
+
},{"react":"HdMw","konva":"aTGn"}],"bN4e":[function(require,module,exports) {
|
|
194
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.whenLoaded=exports.decrementLoader=exports.incrementLoader=void 0;const e=require("../canvas/use-fadein");let o=0,t=[];function r(){o+=1;let e=!1;const t=setTimeout(()=>{e||(console.error("Timeout triggered for loader. Some assets may not have loaded."),e=!0,n())},15e3);return()=>{e||(clearTimeout(t),n())}}function n(){0===(o-=1)&&(t.forEach(e=>e()),t=[])}function s(e){0===o?e():t.push(e)}function i(){return new Promise(o=>s(()=>{(0,e.isAnimationUsed)()?setTimeout(o,300):o(!0)}))}exports.incrementLoader=r,exports.decrementLoader=n,exports.whenLoaded=i;
|
|
195
|
+
},{"../canvas/use-fadein":"N3c2"}],"SIWI":[function(require,module,exports) {
|
|
196
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyFilter=void 0;const t=e(require("konva"));function l(e,l){var r;const s={filters:[]};l.brightnessEnabled&&(s.filters.push(t.default.Filters.Brighten),s.brightness=l.brightness),l.blurEnabled&&(s.filters.push(t.default.Filters.Blur),s.blurRadius=l.blurRadius),l.sepiaEnabled&&s.filters.push(t.default.Filters.Sepia),l.grayscaleEnabled&&s.filters.push(t.default.Filters.Grayscale),e.setAttrs(s),s.filters.length?e.cache({pixelRatio:l.store._elementsPixelRatio}):e.clearCache(),null===(r=e.getLayer())||void 0===r||r.batchDraw()}exports.applyFilter=l;
|
|
197
|
+
},{"konva":"aTGn"}],"cEy1":[function(require,module,exports) {
|
|
198
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Highlighter=void 0;const t=e(require("react")),r=require("mobx-react-lite"),i=require("react-konva");exports.Highlighter=(0,r.observer)(({element:e})=>t.default.createElement(i.Rect,{name:"highlighter",x:e.x,y:e.y,rotation:e.rotation,width:e.width,height:e.height,listening:!1,stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1}));
|
|
199
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug"}],"Fpgh":[function(require,module,exports) {
|
|
200
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextElement=exports.useFontLoader=void 0;const t=e(require("react")),n=require("mobx-react-lite"),r=require("react-konva"),o=require("react-konva-utils"),a=require("mobx"),l=e(require("konva")),i=require("../utils/loader"),d=require("./apply-filters"),s=require("./use-fadein"),u=require("./highlighter"),c=document.createElement("style");c.type="text/css",document.head.appendChild(c);const f={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"normal",userSelect:"text",wordBreak:"normal"},g=(0,n.observer)(({textNodeRef:e,element:n,onBlur:r,selectAll:a,cursorPosition:l})=>{const[i,d]=t.default.useState(f),s=e.current;t.default.useLayoutEffect(()=>{const e={};e.width=s.width()-2*s.padding()+"px",e.height=s.height()-2*s.padding()+10+"px",e.fontSize=s.fontSize()+"px",e.lineHeight=s.lineHeight()+.01,e.fontFamily='"'+s.fontFamily()+'"',e.textAlign=s.align(),e.color=s.fill(),e.fontWeight=n.fontWeight,e.fontStyle=n.fontStyle;const t=`\n .polotno-input::placeholder {\n color: ${i.color};\n opacity: 0.6;\n }\n `;c.innerHTML="",c.appendChild(document.createTextNode(t)),JSON.stringify(e)!==JSON.stringify(i)&&d(e)});const u=t.default.useRef(null);return t.default.useEffect(()=>{var e;const t=u.current;if(!t)return;null===(e=u.current)||void 0===e||e.focus();const n=l||t.value.length;t.selectionStart=t.selectionEnd=n,a&&(null==t||t.select(),document.execCommand("selectAll",!1,null))},[]),t.default.createElement(o.Html,null,t.default.createElement("textarea",{className:"polotno-input",ref:u,style:Object.assign(Object.assign({},f),i),value:n.text,onChange:e=>{n.set({text:e.target.value})},placeholder:n.placeholder,onBlur:r}))}),h=e=>{const[n,r]=t.default.useState(!1),o=t.default.useRef(!1);return t.default.useEffect(()=>{var t=!0;return setTimeout(()=>{t&&(e._editModeEnabled&&(o.current=!0),r(!0),setTimeout(()=>{o.current=!1},50))},50),()=>{t=!1}},[]),{editorEnabled:n&&e._editModeEnabled,selectAll:o.current}},m=(e,n)=>{const[r,o]=t.default.useState(!1);return t.default.useLayoutEffect(()=>{let t=!0;return(async()=>{r&&o(!1);const a=(0,i.incrementLoader)();await e.loadFont(n),l.default.Util.requestAnimFrame(a),t&&o(!0)})(),()=>{t=!1}},[n]),[r]};exports.useFontLoader=m;const p=({fontLoaded:e,fontFamily:n,fontSize:r,lineHeight:o})=>t.default.useMemo(()=>{if("number"==typeof o)return o;const e=document.createElement("div");e.style.fontFamily=n,e.style.fontSize=r+"px",e.style.lineHeight=o,e.innerText="Test text",document.body.appendChild(e);const t=e.offsetHeight;return document.body.removeChild(e),t/r},[e,n,r,o]);function y(e){var t=e.getAbsoluteTransform().copy();t.invert();var n=e.getStage().getPointerPosition();return t.point(n)}function x(e){var t;const n=e.target,r=y(n),o=n.textArr,a=Math.floor(r.y/(n.fontSize()*n.lineHeight())),l=o.slice(0,a).reduce((e,t)=>e+t.text.length,a),i=null!==(t=o[a])&&void 0!==t?t:o[0];let d=0;return"right"===n.align()?d=n.width()-i.width:"center"===n.align()&&(d=n.width()/2-i.width/2),l+Math.round((r.x-d)/i.width*i.text.length)}exports.TextElement=(0,n.observer)(({element:e,store:n})=>{const o=t.default.useRef(null),{editorEnabled:l,selectAll:i}=h(e),[c,f]=t.default.useState(!1),[m,y]=t.default.useState(!1),E=n.selectedElements.indexOf(e)>=0;t.default.useEffect(()=>{if(e.width)return;const t=o.current;t.width(600),e.set({width:1.4*t.getTextWidth()})},[]),t.default.useEffect(()=>{const t=o.current;e.height!==t.height()&&e.set({height:t.height()})}),t.default.useLayoutEffect(()=>(0,a.autorun)(()=>{const t=o.current;(0,d.applyFilter)(t,e)}));const[S]=(0,exports.useFontLoader)(n,e.fontFamily);t.default.useLayoutEffect(()=>{const t=o.current;t&&(t.width(t.width()+1e-8),t._setTextData(),(0,d.applyFilter)(t,e))},[S]);const w=t.default.useRef(null),v=t.default.useRef(0),b=t=>{n.selectedElements.find(t=>t===e)&&!e.locked&&(v.current=x(t),e.toggleEditMode())},T=!e.text&&e.placeholder,F=e._editModeEnabled?0:T?.6:e.opacity;(0,s.useFadeIn)(o,F);const k=p({fontLoaded:S,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),M=e.selectable||"admin"===n.role;return t.default.createElement(t.default.Fragment,null,t.default.createElement(r.Text,{ref:o,id:e.id,name:"element",hideOnExport:!e.showInExport,x:e.x,y:e.y,rotation:e.rotation,width:e.width,text:e.text||e.placeholder,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,draggable:!e.locked,opacity:F,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,lineHeight:k,letterSpacing:e.letterSpacing*e.fontSize,listening:M,onDragStart:()=>{n.history.startTransaction()},onDragMove:t=>{setTimeout(()=>{e.set({x:t.target.x(),y:t.target.y()})})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()}),n.history.endTransaction()},onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:b,onTap:b,onTransformStart:()=>{y(!0),n.history.startTransaction()},onTransform:t=>{var n;const r=(null===(n=t.target.getStage())||void 0===n?void 0:n.findOne("Transformer")).getActiveAnchor();if("middle-left"===r||"middle-right"===r){const n=t.target.scaleX(),r=t.target.width()*n,o=e.fontSize;let a=r;r<o&&(a=o,w.current&&t.target.position(w.current)),t.target.width(a),t.target.scaleX(1),e.set({x:t.target.x(),y:t.target.y(),width:t.target.width(),rotation:t.target.rotation()}),(0,d.applyFilter)(t.target,e)}t.target.strokeWidth(e.strokeWidth/t.target.scaleX()),w.current=t.target.position()},onTransformEnd:t=>{y(!1);const r=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),t.target.strokeWidth(e.strokeWidth),e.set({fontSize:Math.round(e.fontSize*r),width:Math.ceil(t.target.width()*r),x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()}),n.history.endTransaction()}}),l&&t.default.createElement(r.Group,{x:e.x,y:e.y,rotation:e.rotation},t.default.createElement(g,{textNodeRef:o,element:e,selectAll:i,cursorPosition:v.current,onBlur:()=>{e.toggleEditMode(!1)}})),!m&&(c||E)&&t.default.createElement(u.Highlighter,{element:e}))});
|
|
201
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug","react-konva-utils":"jXQU","mobx":"BzvP","konva":"aTGn","../utils/loader":"bN4e","./apply-filters":"SIWI","./use-fadein":"N3c2","./highlighter":"cEy1"}],"Vshz":[function(require,module,exports) {
|
|
202
|
+
var t;(t=t||{}).stringify=function(){var t={"visit_linear-gradient":function(i){return t.visit_gradient(i)},"visit_repeating-linear-gradient":function(i){return t.visit_gradient(i)},"visit_radial-gradient":function(i){return t.visit_gradient(i)},"visit_repeating-radial-gradient":function(i){return t.visit_gradient(i)},visit_gradient:function(i){var r=t.visit(i.orientation);return r&&(r+=", "),i.type+"("+r+t.visit(i.colorStops)+")"},visit_shape:function(i){var r=i.value,n=t.visit(i.at),e=t.visit(i.style);return e&&(r+=" "+e),n&&(r+=" at "+n),r},"visit_default-radial":function(i){var r="",n=t.visit(i.at);return n&&(r+=n),r},"visit_extent-keyword":function(i){var r=i.value,n=t.visit(i.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(i){return t.visit(i.value.x)+" "+t.visit(i.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(i){return t.visit_color(i.value,i)},visit_hex:function(i){return t.visit_color("#"+i.value,i)},visit_rgb:function(i){return t.visit_color("rgb("+i.value.join(", ")+")",i)},visit_rgba:function(i){return t.visit_color("rgba("+i.value.join(", ")+")",i)},visit_color:function(i,r){var n=i,e=t.visit(r.length);return e&&(n+=" "+e),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(i){var r="",n=i.length;return i.forEach(function(i,e){r+=t.visit(i),e<n-1&&(r+=", ")}),r},visit:function(i){if(!i)return"";if(i instanceof Array)return t.visit_array(i,"");if(i.type){var r=t["visit_"+i.type];if(r)return r(i);throw Error("Missing visitor visit_"+i.type)}throw Error("Invalid node.")}};return function(i){return t.visit(i)}}(),(t=t||{}).parse=function(){var t={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},i="";function r(t){var r=new Error(i+": "+t);throw r.source=i,r}function n(){var t=g(e);return i.length>0&&r("Invalid input not EOF"),t}function e(){return a("linear-gradient",t.linearGradient,u)||a("repeating-linear-gradient",t.repeatingLinearGradient,u)||a("radial-gradient",t.radialGradient,s)||a("repeating-radial-gradient",t.repeatingRadialGradient,s)}function a(i,n,e){return o(n,function(n){var a=e();return a&&(h(t.comma)||r("Missing comma before color stops")),{type:i,orientation:a,colorStops:g(d)}})}function o(i,n){var e=h(i);if(e){h(t.startCall)||r("Missing (");var a=n(e);return h(t.endCall)||r("Missing )"),a}}function u(){return y("directional",t.sideOrCorner,1)||y("angular",t.angleValue,1)}function s(){var r,n,e=l();return e&&((r=[]).push(e),n=i,h(t.comma)&&((e=l())?r.push(e):i=n)),r}function l(){var t=function(){var t=y("shape",/^(circle)/i,0);t&&(t.style=_()||v());return t}()||function(){var t=y("shape",/^(ellipse)/i,0);t&&(t.style=m()||v());return t}();if(t)t.at=c();else{var i=v();if(i){t=i;var r=c();r&&(t.at=r)}else{var n=f();n&&(t={type:"default-radial",at:n})}}return t}function v(){return y("extent-keyword",t.extentKeywords,1)}function c(){if(y("position",/^at/,0)){var t=f();return t||r("Missing positioning value"),t}}function f(){var t={x:m(),y:m()};if(t.x||t.y)return{type:"position",value:t}}function g(i){var n=i(),e=[];if(n)for(e.push(n);h(t.comma);)(n=i())?e.push(n):r("One extra comma");return e}function d(){var i=y("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:g(p)}})||o(t.rgbColor,function(){return{type:"rgb",value:g(p)}})||y("literal",t.literalColor,0);return i||r("Expected color definition"),i.length=m(),i}function p(){return h(t.number)[1]}function m(){return y("%",t.percentageValue,1)||y("position-keyword",t.positionKeywords,1)||_()}function _(){return y("px",t.pixelValue,1)||y("em",t.emValue,1)}function y(t,i,r){var n=h(i);if(n)return{type:t,value:n[r]}}function h(t){var r,n;return(n=/^[\n\r\t\s]+/.exec(i))&&b(n[0].length),(r=t.exec(i))&&b(r[0].length),r}function b(t){i=i.substr(t)}return function(t){return i=t.toString(),n()}}(),exports.parse=t.parse,exports.stringify=t.stringify;
|
|
203
|
+
},{}],"V8he":[function(require,module,exports) {
|
|
204
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseColor=exports.isGradient=void 0;const r=e(require("gradient-parser")),t=e=>e.indexOf("linear-gradient")>=0;exports.isGradient=t;const o=e=>"hex"===e.type?"#"+e.value:"literal"===e.type?e.value:`${e.type}(${e.value.join(",")})`,s=e=>{if(!(0,exports.isGradient)(e))return[0,e,e];const t=r.default.parse(e)[0],s=parseFloat(t.orientation.value),a=t.colorStops[0],i=o(a),n=t.colorStops[1];return[s,i,o(n)]};exports.parseColor=s;
|
|
205
|
+
},{"gradient-parser":"Vshz"}],"B1DI":[function(require,module,exports) {
|
|
206
|
+
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.replaceColors=exports.fixSize=exports.getSvgSize=exports.svgToURL=exports.getColors=exports.urlToString=exports.urlToBase64=void 0;const e=t(require("konva")),r=require("./gradient");function o(t){for(;t.parentNode;){if("defs"===t.nodeName)return!0;t=t.parentNode}return!1}function n(t){const e={fill:"",stroke:""};return t.getAttribute("fill")&&"none"!==t.getAttribute("fill")&&(e.fill=t.getAttribute("fill")),!e.fill&&t.style.fill&&"none"!==t.style.fill&&(e.fill=t.style.fill),t.getAttribute("stroke")&&(e.stroke=t.getAttribute("stroke")),!e.stroke&&t.style.stroke&&(e.stroke=t.style.stroke),e.stroke||e.fill||(e.fill="black"),e}const i=["path","rect","circle"];function s(t){for(var e=[],r=t.getElementsByTagName("*"),n=0,s=r.length;n<s;n++){const t=r[n];o(t)||(null!==t.getAttribute("fill")&&e.push(t),(null!==t.getAttribute("stroke")||t.style&&t.style.fill||i.indexOf(t.nodeName)>=0)&&e.push(t))}return e}async function l(t){const e=await fetch(t);return c(await e.text())}async function a(t){const e=await fetch(t,{mode:"cors"});return await e.text()}function u(t){const r=s((new DOMParser).parseFromString(t,"image/svg+xml")),o=[];return r.forEach(t=>{const{fill:r,stroke:i}=n(t);[r,i].forEach(t=>{t&&e.default.Util.colorToRGBA(t)&&-1===o.indexOf(t)&&o.push(t)})}),o}function c(t){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(t)))}async function f(t){const e=await a(t),r=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement.getAttribute("viewBox"),[o,n,i,s]=(null==r?void 0:r.split(" "))||[];return{width:parseFloat(i),height:parseFloat(s)}}function p(t){var e=(new DOMParser).parseFromString(t,"image/svg+xml");const r=e.documentElement.getAttribute("viewBox"),[o,n,i,s]=(null==r?void 0:r.split(" "))||[];return e.documentElement.getAttribute("width")||e.documentElement.setAttribute("width",i+"px"),e.documentElement.getAttribute("height")||e.documentElement.setAttribute("height",s+"px"),(new XMLSerializer).serializeToString(e)}exports.urlToBase64=l,exports.urlToString=a,exports.getColors=u,exports.svgToURL=c,exports.getSvgSize=f,exports.fixSize=p;const g=(t,e)=>!(!e||!e)&&t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a;function d(t,r,o,n){var i=t.namespaceURI,s=document.createElementNS(i,"linearGradient");const l=e.default.Util.degToRad(o+90),a=(Math.cos(l)+1)/2,u=(Math.sin(l)+1)/2,c=(Math.cos(l+Math.PI)+1)/2,f=(Math.sin(l+Math.PI)+1)/2;s.setAttribute("x1",100*a+"%"),s.setAttribute("y1",100*u+"%"),s.setAttribute("x2",100*c+"%"),s.setAttribute("y2",100*f+"%"),s.setAttribute("gradientUnits","userSpaceOnUse"),s.setAttribute("id",r);for(var p=0;p<n.length;p++){var g=n[p],d=document.createElementNS(i,"stop");for(var m in g)g.hasOwnProperty(m)&&d.setAttribute(m,g[m]);s.appendChild(d)}return(t.querySelector("defs")||t.insertBefore(document.createElementNS(i,"defs"),t.firstChild)).appendChild(s)}function m(t,o){var i=(new DOMParser).parseFromString(t,"image/svg+xml");const l=s(i),a=Array.from(o.keys());return l.forEach(t=>{const{fill:s,stroke:l}=n(t);[{prop:"fill",color:s},{prop:"stroke",color:l}].forEach(({prop:n,color:s})=>{const l=a.find(t=>{return r=e.default.Util.colorToRGBA(t),!(!(o=e.default.Util.colorToRGBA(s))||!o)&&r.r===o.r&&r.g===o.g&&r.b===o.b&&r.a===o.a;var r,o});if(l){const e=o.get(l);if((0,r.isGradient)(e)){const[o,s,l]=(0,r.parseColor)(e),a=[{offset:"0%","stop-color":s},{offset:"100%","stop-color":l}],u="color"+Math.round(1e8*Math.random());d(i.children[0],u,o,a),t.style[n]=null,t.setAttribute(n,`url('#${u}')`)}else t.style[n]=o.get(l)}})}),c((new XMLSerializer).serializeToString(i))}exports.replaceColors=m;
|
|
207
|
+
},{"konva":"aTGn","./gradient":"V8he"}],"IDY9":[function(require,module,exports) {
|
|
208
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var o in n)"default"!==o&&Object.prototype.hasOwnProperty.call(n,o)&&e(r,n,o);return t(r,n),r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useDownScaling=exports.useHtmlTextRender=exports.useRemoveBackground=exports.flags=void 0;const r=n(require("mobx"));function o(e){exports.flags.removeBackgroundEnabled=e}function a(e){exports.flags.htmlRenderEnabled=e}function s(e){exports.flags.imageDownScalingEnabled=e}exports.flags=r.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1}),exports.useRemoveBackground=o,exports.useHtmlTextRender=a,exports.useDownScaling=s;
|
|
209
|
+
},{"mobx":"BzvP"}],"VbEp":[function(require,module,exports) {
|
|
210
|
+
"use strict";var t=this&&this.__createBinding||(Object.create?function(t,e,r,a){void 0===a&&(a=r),Object.defineProperty(t,a,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,a){void 0===a&&(a=r),t[a]=e[r]}),e=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),r=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var a={};if(null!=r)for(var i in r)"default"!==i&&Object.prototype.hasOwnProperty.call(r,i)&&t(a,r,i);return e(a,r),a},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageElement=exports.useImageLoader=exports.setImageLoaderHook=void 0;const i=a(require("react")),o=require("mobx-react-lite"),n=require("mobx"),h=require("react-konva"),d=a(require("use-image")),l=a(require("konva")),c=require("react-konva-utils"),u=require("./highlighter"),s=require("../utils/loader"),g=r(require("../utils/svg")),f=require("../utils/flags"),m=require("./apply-filters"),p=require("./use-fadein");async function w(t){if(!(t.indexOf("data:image/svg+xml")>=0||t.indexOf(".svg")>=0))return t;const e=await g.urlToString(t),r=g.fixSize(e);return g.svgToURL(r)}const x=t=>{const[e,r]=i.default.useState(t);return i.default.useEffect(()=>{(async()=>{const a=await w(t);a!==e&&r(a)})()},[t]),e},M=(t,e,r)=>i.default.useMemo(()=>{var a,i;const{flipX:o,flipY:n}=t,h="svg"===t.type||t.src.indexOf("data:image/svg+xml")>=0||t.src.indexOf(".svg")>=0;if(!o&&!n&&!h)return e;if(!e||!e.width||!e.height)return null;const d=document.createElement("canvas");let l=1;"svg"===t.type&&(l=Math.max(t.width/e.width*r,t.height/e.height*r)),d.width=Math.max(e.width*l,1),d.height=Math.max(e.height*l,1);let c=o?-d.width:0,u=n?-d.height:0;return null===(a=d.getContext("2d"))||void 0===a||a.scale(o?-1:1,n?-1:1),null===(i=d.getContext("2d"))||void 0===i||i.drawImage(e,c,u,d.width,d.height),d},[t.flipX,t.flipY,e,t.width,t.height,r]);function y(t,e){const r=e.width/e.height;let a,i;return r>=t.width/t.height?(a=t.width,i=t.width/r):(a=t.height*r,i=t.height),{x:(t.width-a)/2,y:(t.height-i)/2,width:a,height:i}}function b(t,e,r,a,i,o,n){for(var h=new ImageData(e,r),d=new Int32Array(t.data.buffer),l=t.width,c=new Int32Array(h.data.buffer),u=h.width,s=e/o,g=r/n,f=Math.round(1/s),m=Math.round(1/g),p=f*m,w=0;w<h.height;w++)for(var x=0;x<u;x++){for(var M=a+Math.round(x/s)+(i+Math.round(w/g))*l,y=0,b=0,E=0,v=0,I=0;I<m;I++)for(var _=0;_<f;_++){var S=d[M+_+I*l];y+=S<<24>>>24,b+=S<<16>>>24,E+=S<<8>>>24,v+=S>>>24}y=Math.round(y/p),b=Math.round(b/p),E=Math.round(E/p),v=Math.round(v/p),c[x+w*u]=v<<24|E<<16|b<<8|y}return h}function E(t,e){var r,a;const i=document.createElement("canvas");i.width=t.width,i.height=t.height,null===(r=i.getContext("2d"))||void 0===r||r.drawImage(t,0,0,i.width,i.height);const o=b(i.getContext("2d").getImageData(0,0,i.width,i.height),Math.floor(i.width*e),Math.floor(i.height*e),0,0,i.width,i.height);return i.width=Math.floor(i.width*e),i.height=Math.floor(i.height*e),null===(a=i.getContext("2d"))||void 0===a||a.putImageData(o,0,0),i}const v=(t,e)=>{const[r,a]=X(t.maskSrc,"anonymous"),o=t.maskSrc?a:"loaded";return(0,exports.useImageLoader)(o),i.default.useMemo(()=>{if(!r)return e;if(!e||!e.width||!e.height)return e;const a=document.createElement("canvas");a.width=Math.max(e.width,1),a.height=Math.max(e.height,1);const i=a.getContext("2d");if(!i)return e;i.drawImage(e,0,0),i.globalCompositeOperation="source-in";const o=y(r,t);return i.drawImage(r,o.x,o.y,o.width,o.height,0,0,e.width,e.height),a},[e,r,t.width,t.height])},I=(t,e,r,a,o=0,n=!1)=>{const h=i.default.useMemo(()=>{if(e&&e.width&&e.height)return document.createElement("canvas")},[e]);return i.default.useLayoutEffect(()=>{if(!h||!e)return;const i=Math.floor(Math.max(t.width*a,1)),d=Math.floor(Math.max(t.height*a,1));h.width=i,h.height=d;const l=h.getContext("2d");if(!l)return;const c=Math.min(o*a,i/2,d/2);c&&(l.beginPath(),l.moveTo(c,0),l.lineTo(i-c,0),l.arc(i-c,c,c,3*Math.PI/2,0,!1),l.lineTo(i,d-c),l.arc(i-c,d-c,c,0,Math.PI/2,!1),l.lineTo(c,d),l.arc(c,d-c,c,Math.PI/2,Math.PI,!1),l.lineTo(0,c),l.arc(c,c,c,Math.PI,3*Math.PI/2,!1),l.clip());const u=Math.max(t.width/r.width,t.height/r.height)*a,s=f.flags.imageDownScalingEnabled&&u<1&&!n,g=s?E(e,u):e,m=s?{x:Math.floor(r.x*u),y:Math.floor(r.y*u),width:Math.floor(r.width*u),height:Math.floor(r.height*u)}:r;l.drawImage(g,m.x,m.y,m.width,m.height,0,0,h.width,h.height)},[h,t.width,t.height,r.x,r.y,r.width,r.height,o,a,n]),h},_=(t,e,r,a)=>{const o=x(t.clipSrc||""),[n]=X(o,"anonymous"),h=i.default.useMemo(()=>{if(e&&n)return document.createElement("canvas")},[e,n]);return i.default.useLayoutEffect(()=>{var a;if(!n)return;if(!e||!e.width||!e.height)return;if(!n||!n.width||!n.height)return;if(!h)return;const i=document.createElement("canvas"),o=Math.max(t.width/n.width*r,t.height/n.height*r);i.width=n.width*o,i.height=n.height*o,null===(a=i.getContext("2d"))||void 0===a||a.drawImage(n,0,0,i.width,i.height),h.width=Math.max(e.width,1),h.height=Math.max(e.height,1);const d=h.getContext("2d");d&&(d.save(),d.drawImage(i,0,0,e.width,e.height),d.globalCompositeOperation="source-in",d.drawImage(e,0,0,h.width,h.height),d.restore())},[h,e,n,t.width,t.height,r,...a]),t.clipSrc&&n?h:e},S=document.createElement("canvas"),R=(0,o.observer)(({element:t})=>{const e=Math.min(30,t.width/4,t.height/4),r=i.default.useRef(null);return i.default.useEffect(()=>{const t=r.current;if(!t)return;const e=new l.default.Animation(e=>{t.rotate(((null==e?void 0:e.timeDiff)||0)/2)},t.getLayer());return e.start(),()=>{e.stop()}}),i.default.createElement(h.Group,{x:t.x,y:t.y,rotation:t.rotation,listening:!1,opacity:t.opacity,hideInExport:!t.showInExport},i.default.createElement(h.Rect,{width:t.width,height:t.height,fill:"rgba(124, 173, 212, 0.8)"}),i.default.createElement(h.Arc,{ref:r,x:t.width/2,y:t.height/2,fill:"white",outerRadius:Math.abs(e),innerRadius:Math.max(1,e-5),angle:270}))}),T=(0,o.observer)(({element:t})=>{const e="Can not load the image...",r=Math.max(10,Math.min(30,t.width/e.length));return i.default.createElement(h.Group,{x:t.x,y:t.y,rotation:t.rotation,listening:!1,opacity:t.opacity,hideInExport:!t.showInExport},i.default.createElement(h.Rect,{width:t.width,height:t.height,fill:"rgba(223, 102, 102, 0.8)"}),i.default.createElement(h.Text,{text:e,fontSize:r,width:t.width,height:t.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let X=d.default;const Y=t=>{X=t};exports.setImageLoaderHook=Y;const k=t=>{const e=i.default.useRef(),r=()=>{var t;null===(t=e.current)||void 0===t||t.call(e),e.current=void 0};i.default.useEffect(()=>r,[]),i.default.useLayoutEffect(()=>{"loading"!==t||e.current||(e.current=(0,s.incrementLoader)()),"loading"!==t&&r()},[t])};exports.useImageLoader=k;const C=({image:t,status:e,type:r})=>{const a=i.default.useRef();return i.default.useEffect(()=>{a.current=t||a.current},[t]),"failed"!==e||"failed"!==e&&"svg"===r?a.current:void 0};exports.ImageElement=(0,o.observer)(({element:t,store:e})=>{var r;const[a,o]=i.default.useState(!1),d=i.default.useRef(null),l=i.default.useRef(null),[s,g]=i.default.useState(!1),f=e.selectedElements.indexOf(t)>=0,[w,x]=X(t.__finalSrc||t.src,"anonymous");(0,exports.useImageLoader)(x);const y="svg"!==t.type||t.__isLoaded?x:"loading";(0,exports.useImageLoader)(y);const b=C({image:w,status:x,type:t.type}),E=v(t,M(t,w||b,e._elementsPixelRatio))||S;let{cropX:Y,cropY:k,cropWidth:L,cropHeight:P}=t;"loaded"!==x&&(Y=k=0,L=P=1);const W=E.width*L,O=E.height*P,H=t.width/t.height;let q,A;const D=W/O,z="svg"===t.type;z?(q=W,A=O):H>=D?(q=W,A=W/H):(q=O*H,A=O);const F={x:E.width*Y,y:E.height*k,width:q,height:A},B=null!==(r=t.cornerRadius)&&void 0!==r?r:0;let j=_(t,I(t,E,F,e._elementsPixelRatio,B,a||t._cropModeEnabled||"svg"===t.type),e._elementsPixelRatio,[F,B,e._elementsPixelRatio]);const G=Math.max(t.width/q,t.height/A);i.default.useEffect(()=>{var e;if(!t._cropModeEnabled)return;const r=null===(e=d.current)||void 0===e?void 0:e.getStage();function a(e){t._cropModeEnabled&&e.target!==l.current&&t.toggleCropMode(!1)}function i(e){t._cropModeEnabled&&"CANVAS"!==e.target.nodeName&&t.toggleCropMode(!1)}return document.body.addEventListener("click",i),null==r||r.on("click",a),null==r||r.on("tap",a),()=>{document.body.removeEventListener("click",i),document.body.removeEventListener("touchstart",i),null==r||r.off("click",a),null==r||r.off("click",a)}},[t._cropModeEnabled]),i.default.useLayoutEffect(()=>{if(!a&&!t._cropModeEnabled)return(0,m.applyFilter)(d.current,t),(0,n.autorun)(()=>{(0,m.applyFilter)(d.current,t)},{delay:100})},[E,a,L,P,t._cropModeEnabled]),i.default.useLayoutEffect(()=>{var e;a||t._cropModeEnabled?null===(e=d.current)||void 0===e||e.clearCache():(0,m.applyFilter)(d.current,t)},[a,t.width,t.height,t._cropModeEnabled]),i.default.useEffect(()=>{(0,m.applyFilter)(d.current,t)},[t.shadowEnabled,t.shadowBlur]);const N=i.default.useRef(null),U=i.default.useRef(null),V=i.default.useRef(null);i.default.useLayoutEffect(()=>{t._cropModeEnabled&&(U.current.nodes([N.current]),V.current.nodes([l.current]))},[t._cropModeEnabled]);const J=e=>{Math.round(e.target.x())>0&&(e.target.x(0),e.target.scaleX(1)),Math.round(e.target.y())>0&&(e.target.y(0),e.target.scaleY(1));const r=e.target.width()*e.target.scaleX(),a=e.target.height()*e.target.scaleY(),i=Math.min(1,q/r),o=Math.min(1,A/a),n=1-i,h=Math.min(n,Math.max(0,Math.round(-e.target.x())/r)),d=1-o,l=Math.min(d,Math.max(0,Math.round(-e.target.y())/a));e.target.setAttrs({x:-h*E.width,y:-l*E.height,scaleX:1,scaleY:1}),t.set({cropX:h,cropY:l,cropWidth:i,cropHeight:o})},K=()=>{"svg"!==t.type&&(t.locked||setTimeout(()=>{t.toggleCropMode(!0)}))},Q="svg"===t.type&&b,Z="loading"===x&&!Q,$="failed"===x,tt=!Z&&!$,et=i.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),rt=tt?t.opacity:0;(0,p.useFadeIn)(d,rt);const at=t.selectable||"admin"===e.role;return i.default.createElement(i.default.Fragment,null,Z&&i.default.createElement(R,{element:t}),$&&i.default.createElement(T,{element:t}),i.default.createElement(h.Image,{ref:d,name:"element",id:t.id,image:j,x:t.x,y:t.y,width:t.width||1,height:t.height||1,rotation:t.rotation,opacity:rt,shadowEnabled:t.shadowEnabled,shadowBlur:t.shadowBlur,customCrop:F,listening:at,draggable:!t.locked,hideInExport:!t.showInExport,onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onDragStart:()=>{e.history.startTransaction()},onDragMove:e=>{t.set({x:e.target.x(),y:e.target.y()})},onDragEnd:r=>{t.set({x:r.target.x(),y:r.target.y()}),e.history.endTransaction()},onDblClick:K,onDblTap:K,onTransformStart:()=>{o(!0),e.history.startTransaction(),et.current={cropX:t.cropX,cropY:t.cropY,cropWidth:t.cropWidth,cropHeight:t.cropHeight}},onTransform:e=>{var r;const a=e.currentTarget,i=Math.abs(a.scaleX()-1)<1e-7?1:a.scaleX(),o=Math.abs(a.scaleY()-1)<1e-7?1:a.scaleY();a.scaleX(1),a.scaleY(1);const n=null===(r=e.target.getStage())||void 0===r?void 0:r.findOne("Transformer"),h=1-q/E.width,d=Math.min(h,Math.max(0,t.cropX)),l=1-A/E.height,c=Math.min(l,Math.max(0,t.cropY)),u=n.getActiveAnchor(),s=!(u.indexOf("middle")>=0||u.indexOf("center")>=0),g=!s&&i<1&&et.current.cropHeight>A/E.height;let f=s?t.cropWidth:t.cropWidth*i;g&&(f=t.cropWidth);const m=!s&&o<1&&et.current.cropWidth>q/E.width;let p=s?t.cropHeight:t.cropHeight*o;m&&(p=t.cropHeight),z&&(f=t.cropWidth,p=t.cropHeight),t.set({cropX:d,cropY:c,x:a.x(),y:a.y(),width:a.width()*i,height:a.height()*o,rotation:e.target.rotation(),cropWidth:Math.min(f,1-d),cropHeight:Math.min(p,1-c)})},onTransformEnd:r=>{const a=r.currentTarget;t.set({width:a.width(),height:a.height(),x:a.x(),y:a.y(),rotation:r.target.rotation(),cropWidth:q/E.width,cropHeight:A/E.height}),o(!1),e.history.endTransaction()}}),i.default.createElement(h.Rect,{x:t.x,y:t.y,width:t.width-t.borderSize,height:t.height-t.borderSize,offsetX:-t.borderSize/2,offsetY:-t.borderSize/2,stroke:t.borderColor,strokeWidth:t.borderSize,listening:!1,visible:!!t.borderSize,rotation:t.rotation,cornerRadius:Math.max(0,B-t.borderSize),hideInExport:!t.showInExport}),t._cropModeEnabled&&i.default.createElement(c.Portal,{selector:".page-abs-container",enabled:!0},i.default.createElement(h.Rect,{x:-1500,y:-1500,width:4500,height:4500,fill:"rgba(0,0,0,0.3)"}),i.default.createElement(h.Image,{listening:!1,image:j,x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation,shadowEnabled:t.shadowEnabled,shadowBlur:t.shadowBlur}),i.default.createElement(h.Group,{x:t.x,y:t.y,rotation:t.rotation,scaleX:G,scaleY:G},i.default.createElement(h.Image,{image:E,ref:l,opacity:.4,draggable:!0,x:-t.cropX*E.width,y:-t.cropY*E.height,onDragMove:J,onTransform:J}),i.default.createElement(h.Transformer,{ref:V,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(t,e)=>e.width<5||e.height<5?t:e,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),i.default.createElement(h.Rect,{width:q,height:A,ref:N,listening:!1,onTransform:e=>{e.target.x()<-t.cropX*E.width-1e-9&&(e.target.x(-t.cropX*E.width),e.target.scaleX(1)),e.target.y()<-t.cropY*E.height-1e-9&&(e.target.y(-t.cropY*E.height),e.target.scaleY(1));const r=Math.min(1,Math.max(0,t.cropX+e.target.x()/E.width)),a=Math.min(1,Math.max(0,e.target.y()/E.height+t.cropY)),i=e.target.width()*e.target.scaleX(),o=e.target.height()*e.target.scaleY(),n=Math.min(1-r,i/E.width),h=Math.min(1-a,o/E.height),d=e.target.getAbsolutePosition(e.target.getParent().getParent());e.target.scale({x:1,y:1}),e.target.position({x:0,y:0}),t.set({x:d.x,y:d.y,cropX:r,cropY:a,cropWidth:n,cropHeight:h,width:Math.min(i*G,E.width*(1-r)*G),height:Math.min(o*G,E.height*(1-a)*G)})}}),i.default.createElement(h.Transformer,{ref:U,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(t,e)=>e.width<5||e.height<5?t:e,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(s||f)&&i.default.createElement(u.Highlighter,{element:t}))});
|
|
211
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","mobx":"BzvP","react-konva":"Sgug","use-image":"MJM3","konva":"aTGn","react-konva-utils":"jXQU","./highlighter":"cEy1","../utils/loader":"bN4e","../utils/svg":"B1DI","../utils/flags":"IDY9","./apply-filters":"SIWI","./use-fadein":"N3c2"}],"FRly":[function(require,module,exports) {
|
|
212
|
+
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
|
|
213
|
+
},{}],"Quj6":[function(require,module,exports) {
|
|
214
|
+
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
|
|
215
|
+
},{}],"aqZJ":[function(require,module,exports) {
|
|
216
|
+
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
|
|
217
|
+
},{}],"aMB2":[function(require,module,exports) {
|
|
218
|
+
|
|
219
|
+
var global = arguments[3];
|
|
220
|
+
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
|
|
221
|
+
},{"base64-js":"FRly","ieee754":"Quj6","isarray":"aqZJ","buffer":"aMB2"}],"qREC":[function(require,module,exports) {
|
|
222
|
+
var define;
|
|
223
|
+
var Buffer = require("buffer").Buffer;
|
|
224
|
+
var t,e=require("buffer").Buffer;!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof t&&t.amd?t([],n):"object"==typeof exports?exports.Quill=n():e.Quill=n()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),l=n(45),a=n(46),s=n(47),u=n(48),c=n(49),f=n(12),h=n(32),p=n(33),d=n(31),y=n(1),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=v},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return o(e,t),e}(Error);e.ParchmentError=i;var l,a={},s={},u={},c={};function f(t,e){var n;if(void 0===e&&(e=l.ANY),"string"==typeof t)n=c[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&l.LEVEL&l.BLOCK?n=c.block:t&l.LEVEL&l.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=s[r[o]])break;n=n||u[t.tagName]}return null==n?null:e&l.LEVEL&n.scope&&e&l.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(l=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new i("Unable to create "+t+" blot");var r=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(o,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map(function(e){return t(e)});var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(t){return t.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(t){null!=u[t]&&null!=r.className||(u[t]=r)})));return r}},function(t,e,n){var r=n(51),o=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){(t(r)?e:n).push(r)}),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+l.length(e):e.delete?t-e.delete:t},0)},s.prototype.length=function(){return this.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o<e&&r.hasNext();){var i;o<t?i=r.next(t-o):(i=r.next(e-o),n.push(i)),o+=l.length(i)}return new s(n)},s.prototype.compose=function(t){var e=l.iterator(this.ops),n=l.iterator(t.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var a=i.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),r.push(e.next());i.retain-a>0&&n.next(i.retain-a)}for(var u=new s(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var d=l.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(d&&(p.attributes=d),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var y=new s(e.rest());return u.concat(y).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&u.push(h)}return u.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}}),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=o),r+=o):t-=Math.min(o,t-r)}return t},t.exports=s},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},a=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,o=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)},s=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(i)return i(t,e).value}return t[e]};t.exports=function t(){var e,n,r,o,i,c,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h<p;++h)if(null!=(e=arguments[h]))for(n in e)r=u(f,n),f!==(o=u(e,n))&&(d&&o&&(a(o)||(i=l(o)))?(i?(i=!1,c=r&&l(r)?r:[]):c=r&&a(r)?r:{},s(f,{name:n,newValue:t(d,c,o)})):void 0!==o&&s(f,{name:n,newValue:o}));return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=f(n(3)),l=f(n(2)),a=f(n(0)),s=f(n(16)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,a.default.Embed),r(e,[{key:"attach",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new l.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=a.default.query(t,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=a.default.create(v.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,n.slice(0,-1))}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}();y.scope=a.default.Scope.BLOCK_BLOT;var v=function(t){function e(t){h(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return d(e,a.default.Block),r(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),b(e))},new l.default).insert("\n",b(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,i){n<=0||(a.default.query(r,a.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,i):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,i),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var i=n.split("\n"),l=i.shift();l.length>0&&(t<this.length()-1||null==this.children.tail?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});var a=this;i.reduce(function(t,e){return(a=a.split(t,!0)).insertAt(0,e),e.length},t+l.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}();function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:b(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,a.default.Embed,c.default],e.bubbleFormats=b,e.BlockEmbed=y,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50);var l=v(n(2)),a=v(n(14)),s=v(n(8)),u=v(n(9)),c=v(n(0)),f=n(15),h=v(f),p=v(n(3)),d=v(n(10)),y=v(n(34));function v(t){return t&&t.__esModule?t:{default:t}}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=(0,d.default)("quill"),m=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,function(t){t===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(s.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;O.call(n,function(){return n.editor.update(null,e,o)},t)});var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),d.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&g.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||g.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),i(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=w(t,e,n),l=o(i,4);return t=l[0],e=l[1],n=l[3],O.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return O.call(this,function(){var r=n.getSelection(!0),o=new l.default;if(null==r)return o;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,b({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,b({},t,e))}return n.setSelection(r,s.default.sources.SILENT),o},r)}},{key:"formatLine",value:function(t,e,n,r,i){var l,a=this,s=w(t,e,n,r,i),u=o(s,4);return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,function(){return a.editor.formatLine(t,e,l)},i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var l,a=this,s=w(t,e,n,r,i),u=o(s,4);return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,function(){return a.editor.formatText(t,e,l)},i,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return O.call(this,function(){return o.editor.insertEmbed(e,n,r)},i,e)}},{key:"insertText",value:function(t,e,n,r,i){var l,a=this,s=w(t,0,n,r,i),u=o(s,4);return t=u[0],l=u[2],i=u[3],O.call(this,function(){return a.editor.insertText(t,e,l)},i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=w(t,e,n),l=o(i,4);return t=l[0],e=l[1],n=l[3],O.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return O.call(this,function(){t=new l.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=w(e,n,r),l=o(i,4);e=l[0],n=l[1],r=l[3],this.selection.setRange(new f.Range(e,n),r),r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new l.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return O.call(this,function(){return t=new l.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function _(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==m.DEFAULTS.theme){if(e.theme=m.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=y.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=m.import("modules/"+e);return null==n?g.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},m.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function O(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===s.default.sources.USER)return new l.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,a=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=x(o,a,e):0!==r&&(o=x(o,n,r,e)),this.setSelection(o,s.default.sources.SILENT)),a.length()>0){var u,c,f=[s.default.events.TEXT_CHANGE,a,i,e];if((u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(f)),e!==s.default.sources.SILENT)(c=this.emitter).emit.apply(c,f)}return a}function w(t,e,n,o,i){var l={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=o,o=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=o,o=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(l=n,i=o):"string"==typeof n&&(null!=o?l[n]=o:i=n),[t,e,l,i=i||s.default.sources.API]}function x(t,e,n,r){if(null==t)return null;var i=void 0,a=void 0;if(e instanceof l.default){var u=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r!==s.default.sources.USER)}),c=o(u,2);i=c[0],a=c[1]}else{var h=[t.index,t.index+t.length].map(function(t){return t<e||t===e&&r===s.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)}),p=o(h,2);i=p[0],a=p[1]}return new f.Range(i,a-i)}m.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},m.events=s.default.events,m.sources=s.default.sources,m.version="1.3.7",m.imports={delta:l.default,parchment:c.default,"core/module":u.default,"core/theme":y.default},e.expandConfig=_,e.overload=w,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=a(n(7)),l=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Inline),r(e,[{key:"formatAt",value:function(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&l.default.query(r,l.default.Scope.BLOT)){var a=this.isolate(t,n);i&&a.wrap(r,i)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i)}},{key:"optimize",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}}]),e}();s.allowedChildren=[s,l.default.Embed,i.default],s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.Text),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=i(n(54));function i(t){return t&&t.__esModule?t:{default:t}}var l=(0,i(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(t){document.addEventListener(t,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)})})});var a=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",l.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,[{key:"emit",value:function(){l.log.apply(l,arguments),function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach(function(e){var r=e.node,o=e.handler;(t.target===r||r.contains(t.target))&&o.apply(void 0,[t].concat(n))})}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}();a.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},a.sources={API:"api",SILENT:"silent",USER:"user"},e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(t){if(r.indexOf(t)<=r.indexOf(o)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];(e=console)[t].apply(e,i)}}function l(t){return r.reduce(function(e,n){return e[n]=i.bind(console,n,t),e},{})}i.level=l.level=function(t){o=t},e.default=l},function(t,e,n){var r=Array.prototype.slice,o=n(52),i=n(53),l=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t))return!!i(e)&&(t=r.call(t),e=r.call(e),l(t,e,n));if(s(t)){if(!s(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var f=o(t),h=o(e)}catch(p){return!1}if(f.length!=h.length)return!1;for(f.sort(),h.sort(),u=f.length-1;u>=0;u--)if(f[u]!=h[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!l(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function a(t){return null==t}function s(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=f(n(2)),a=f(n(0)),s=f(n(4)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,u.default),e}();y.blotName="code",y.tagName="CODE";var v=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,s.default),o(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce(function(e,n){return e.insert(n).insert("\n",t.formats())},new l.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var o=this.descendant(c.default,this.length()-1),l=r(o,1)[0];null!=l&&l.deleteAt(l.length()-1,1),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,o){if(0!==n&&null!=a.default.query(r,a.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var i=this.newlineIndex(t);if(!(i<0||i>=t+n)){var l=this.newlineIndex(t,!0)+1,s=i-l+1,u=this.isolate(l,s),c=u.next;u.format(r,o),c instanceof e&&c.formatAt(0,t-l+n-s,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var o=this.descendant(c.default,t),i=r(o,2),l=i[0],a=i[1];l.insertAt(a,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(a.default.create("text","\n")),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=a.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof a.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=y,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=b(n(2)),a=b(n(20)),s=b(n(0)),u=b(n(13)),c=b(n(24)),f=n(4),h=b(f),p=b(n(16)),d=b(n(21)),y=b(n(11)),v=b(n(3));function b(t){return t&&t.__esModule?t:{default:t}}var g=/^[ -~]*$/,m=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return i(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,d.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,d.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)},new l.default)}(t)).reduce(function(t,l){var u=l.retain||l.delete||l.insert.length||1,c=l.attributes||{};if(null!=l.insert){if("string"==typeof l.insert){var p=l.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),t>=i&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var d=e.scroll.line(t),y=o(d,2),b=y[0],g=y[1],m=(0,v.default)({},(0,f.bubbleFormats)(b));if(b instanceof h.default){var _=b.descendant(s.default.Leaf,g),O=o(_,1)[0];m=(0,v.default)(m,(0,f.bubbleFormats)(O))}c=a.default.attributes.diff(m,c)||{}}else if("object"===r(l.insert)){var w=Object.keys(l.insert)[0];if(null==w)return t;e.scroll.insertAt(t,w,l.insert[w])}i+=u}return Object.keys(c).forEach(function(n){e.scroll.formatAt(t,u,n,c[n])}),t+u},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new l.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e){var i=e.length();if(e instanceof u.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i})}}),this.scroll.optimize(),this.update((new l.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new l.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new l.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=o(t,1)[0];e instanceof h.default?n.push(e):e instanceof s.default.Leaf&&r.push(e)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(s.default.Leaf,t,e));var i=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e});return v.default.apply(v.default,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new l.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new l.default).retain(t).insert(e,(0,d.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof p.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),i=o(r,2),a=i[0],s=i[1],c=0,f=new l.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(s)-s+1:a.length()-s,f=a.delta().slice(s,s+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new l.default).insert(n).concat(f)),p=(new l.default).retain(t).concat(h);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&s.default.find(e[0].target)){var o=s.default.find(e[0].target),i=(0,f.bubbleFormats)(o),a=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new l.default).insert(u),p=(new l.default).insert(o.value());t=(new l.default).retain(a).concat(h.diff(p,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new l.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,y.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce(function(n,r){return null==t[r]?n:(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]],n)},{})}e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),l=u(n(21)),a=u(n(11)),s=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h=(0,u(n(10)).default)("quill:selection"),p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},d=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(t,e){t===s.default.events.TEXT_CHANGE&&e.length()>0&&r.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;r.setNativeRange(o,i,l,a)}}),this.update(s.default.sources.SILENT)}return o(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var o=void 0,i=this.scroll.leaf(t),l=r(i,2),a=l[0],s=l[1];if(null==a)return null;var u=a.position(s,!0),c=r(u,2);o=c[0],s=c[1];var f=document.createRange();if(e>0){f.setStart(o,s);var h=this.scroll.leaf(t+e),p=r(h,2);if(a=p[0],s=p[1],null==a)return null;var d=a.position(s,!0),y=r(d,2);return o=y[0],s=y[1],f.setEnd(o,s),f.getBoundingClientRect()}var v="left",b=void 0;return o instanceof Text?(s<o.data.length?(f.setStart(o,s),f.setEnd(o,s+1)):(f.setStart(o,s-1),f.setEnd(o,s),v="right"),b=f.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),s>0&&(v="right")),{bottom:b.top+b.height,height:b.height,left:b[v],right:b[v],top:b.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map(function(t){var n=r(t,2),o=n[0],l=n[1],a=i.default.find(o,!0),s=a.offset(e.scroll);return 0===l?s:a instanceof i.default.Container?s+a.length():s+a.index(o,l)}),l=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),a=Math.min.apply(Math,[l].concat(c(o)));return new p(a,l-a)}},{key:"normalizeNative",value:function(t){if(!y(this.root,t.startContainer)||!t.collapsed&&!y(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],i=this.scroll.length();return n.forEach(function(t,n){t=Math.min(i-1,t);var l,a=e.scroll.leaf(t),s=r(a,2),u=s[0],c=s[1],f=u.position(c,0!==n),h=r(f,2);l=h[0],c=h[1],o.push(l,c)}),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,o)),l=r(i,1)[0],a=l;if(e.length>0){var s=this.scroll.line(Math.min(e.index+e.length,o));a=r(s,1)[0]}if(null!=l&&null!=a){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var f,h=[s.default.events.SELECTION_CHANGE,(0,l.default)(this.lastRange),(0,l.default)(e),t];if((c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(h)),t!==s.default.sources.SILENT)(f=this.emitter).emit.apply(f,h)}}}]),t}();function y(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Embed),o(e,[{key:"insertInto",value:function(t,n){0===t.children.length?function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}();a.blotName="break",a.tagName="BR",e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(44),l=n(30),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(r){if(r instanceof a.ParchmentError)return;throw r}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],o=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),o.push.apply(o,t.removedNodes))}),o.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),r.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var r=u(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))})},e}(l.default);function u(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),l=n(31),a=n(17),s=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new l.default(n.domNode),n}return o(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=s.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===r.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(a.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(30),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=l.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){var r=n(11),o=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce(function(t,e){return null!=r[e]&&(t[e]=r[e]),t},{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,o){return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new l(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function l(t){this.ops=t,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,o;try{n=Map}catch(s){n=function(){}}try{r=Set}catch(s){r=function(){}}try{o=Promise}catch(s){o=function(){}}function i(l,s,u,c,f){"object"==typeof s&&(u=s.depth,c=s.prototype,f=s.includeNonEnumerable,s=s.circular);var h=[],p=[],d=void 0!==e;return void 0===s&&(s=!0),void 0===u&&(u=1/0),function l(u,y){if(null===u)return null;if(0===y)return u;var v,b;if("object"!=typeof u)return u;if(t(u,n))v=new n;else if(t(u,r))v=new r;else if(t(u,o))v=new o(function(t,e){u.then(function(e){t(l(e,y-1))},function(t){e(l(t,y-1))})});else if(i.__isArray(u))v=[];else if(i.__isRegExp(u))v=new RegExp(u.source,a(u)),u.lastIndex&&(v.lastIndex=u.lastIndex);else if(i.__isDate(u))v=new Date(u.getTime());else{if(d&&e.isBuffer(u))return v=e.allocUnsafe?e.allocUnsafe(u.length):new e(u.length),u.copy(v),v;t(u,Error)?v=Object.create(u):void 0===c?(b=Object.getPrototypeOf(u),v=Object.create(b)):(v=Object.create(c),b=c)}if(s){var g=h.indexOf(u);if(-1!=g)return p[g];h.push(u),p.push(v)}for(var m in t(u,n)&&u.forEach(function(t,e){var n=l(e,y-1),r=l(t,y-1);v.set(n,r)}),t(u,r)&&u.forEach(function(t){var e=l(t,y-1);v.add(e)}),u){var _;b&&(_=Object.getOwnPropertyDescriptor(b,m)),_&&null==_.set||(v[m]=l(u[m],y-1))}if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(u);for(m=0;m<O.length;m++){var w=O[m];(!(k=Object.getOwnPropertyDescriptor(u,w))||k.enumerable||f)&&(v[w]=l(u[w],y-1),k.enumerable||Object.defineProperty(v,w,{enumerable:!1}))}}if(f){var x=Object.getOwnPropertyNames(u);for(m=0;m<x.length;m++){var k,E=x[m];(k=Object.getOwnPropertyDescriptor(u,E))&&k.enumerable||(v[E]=l(u[E],y-1),Object.defineProperty(v,E,{enumerable:!1}))}}return v}(l,u)}function l(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=l,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===l(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===l(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===l(t)},i.__getRegExpFlags=a,i}();"object"==typeof t&&t.exports&&(t.exports=r)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=p(n(0)),a=p(n(8)),s=n(4),u=p(s),c=p(n(16)),f=p(n(13)),h=p(n(25));function p(t){return t&&t.__esModule?t:{default:t}}function d(t){return t instanceof u.default||t instanceof s.BlockEmbed}var y=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(t,e){return t[e]=!0,t},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Scroll),o(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var o=this.line(t),l=r(o,2),a=l[0],u=l[1],h=this.line(t+n),p=r(h,1)[0];if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=p&&a!==p&&u>0){if(a instanceof s.BlockEmbed||p instanceof s.BlockEmbed)return void this.optimize();if(a instanceof f.default){var d=a.newlineIndex(a.length(),!0);if(d>-1&&(a=a.split(d+1))===p)return void this.optimize()}else if(p instanceof f.default){var y=p.newlineIndex(0);y>-1&&p.split(y+1)}var v=p.children.head instanceof c.default?null:p.children.head;a.moveChildren(p,v),a.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==l.default.query(n,l.default.Scope.BLOCK)){var o=l.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var a=l.default.create(n,r);this.appendChild(a)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===l.default.Scope.INLINE_BLOT){var r=l.default.create(this.statics.defaultChild);r.appendChild(t),t=r}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(d,t)}},{key:"lines",value:function(){return function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,function(e,n,r){d(e)?o.push(e):e instanceof l.default.Container&&(o=o.concat(t(e,n,i))),i-=r}),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=a.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,t),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,t)}}}]),e}();y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,s.BlockEmbed,h.default],e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=y(n(21)),a=y(n(11)),s=y(n(3)),u=y(n(2)),c=y(n(20)),f=y(n(0)),h=y(n(5)),p=y(n(10)),d=y(n(9));function y(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=(0,p.default)("quill:keyboard"),g=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])}),r.addBinding({key:e.keys.ENTER,shiftKey:null},k),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},O),r.addBinding({key:e.keys.DELETE},{collapsed:!0},w)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},O),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},w)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},x),r.addBinding({key:e.keys.DELETE},{collapsed:!1},x),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},O),r.listen(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,d.default),i(e,null,[{key:"match",value:function(t,e){return e=j(e),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode)}}]),i(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(t);if(null==r||null==r.key)return b.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,s.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,l=(t.bindings[i]||[]).filter(function(t){return e.match(n,t)});if(0!==l.length){var s=t.quill.getSelection();if(null!=s&&t.quill.hasFocus()){var u=t.quill.getLine(s.index),c=o(u,2),h=c[0],p=c[1],d=t.quill.getLeaf(s.index),y=o(d,2),v=y[0],b=y[1],g=0===s.length?[v,b]:t.quill.getLeaf(s.index+s.length),m=o(g,2),_=m[0],O=m[1],w=v instanceof f.default.Text?v.value().slice(0,b):"",x=_ instanceof f.default.Text?_.value().slice(O):"",k={collapsed:0===s.length,empty:0===s.length&&h.length()<=1,format:t.quill.getFormat(s),offset:p,prefix:w,suffix:x};l.some(function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==k.format[t]}))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,a.default)(e.format[t],k.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix))&&(!(null!=e.suffix&&!e.suffix.test(k.suffix))&&!0!==e.handler.call(t,s,k))})&&n.preventDefault()}}}})}}]),e}();function _(t,e){var n,r=t===m.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,altKey:null},r,/^$/),v(n,"handler",function(n){var r=n.index;t===m.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof f.default.Embed)||(t===m.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)}),n}function O(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=o(n,1)[0],i={};if(0===e.offset){var l=this.quill.getLine(t.index-1),a=o(l,1)[0];if(null!=a&&a.length()>1){var s=r.formats(),u=this.quill.getFormat(t.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,h.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,h.default.sources.USER),this.quill.focus()}}function w(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,l=this.quill.getLine(t.index),a=o(l,1)[0];if(e.offset>=a.length()-1){var s=this.quill.getLine(t.index+1),u=o(s,1)[0];if(u){var f=a.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},i=u.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,h.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=c.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function k(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))})}function E(t){return{key:m.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,i=e.length,l=this.quill.scroll.descendant(n,r),a=o(l,2),s=a[0],u=a[1];if(null!=s){var c=this.quill.getIndex(s),p=s.newlineIndex(u,!0)+1,d=s.newlineIndex(c+u+i),y=s.domNode.textContent.slice(p,d).split("\n");u=0,y.forEach(function(e,o){t?(s.insertAt(p+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(s.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=e.length+1}),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,i,h.default.sources.SILENT)}}}}function N(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function j(t){if("string"==typeof t||"number"==typeof t)return j({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,l.default)(t,!1)),"string"==typeof t.key)if(null!=m.keys[t.key.toUpperCase()])t.key=m.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[g]=t.shortKey,delete t.shortKey),t}m.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},m.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:m.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:m.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:m.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:m.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:m.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:m.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:m.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(0,s.default)({},r.formats(),{list:"checked"}),a=(new u.default).retain(t.index).insert("\n",l).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:m.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=o(n,2),i=r[0],l=r[1],a=(new u.default).retain(t.index).insert("\n",e.format).retain(i.length()-l-1).retain(1,{header:null});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),i=o(r,2),l=i[0],a=i[1];if(a>n)return!0;var s=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-a).delete(n+1).retain(l.length()-2-a).retain(1,{list:s});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:m.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(new u.default).retain(t.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(l,h.default.sources.USER)}},"embed left":_(m.keys.LEFT,!1),"embed left shift":_(m.keys.LEFT,!0),"embed right":_(m.keys.RIGHT,!1),"embed right shift":_(m.keys.RIGHT,!0)}},e.default=m,e.SHORTKEY=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Embed),i(e,null,[{key:"value",value:function(){}}]),i(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,i=0;null!=r&&r.statics.scope!==l.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),o=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];o=u[0],i=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof a.default?(o=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(l.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var f=[i,s].map(function(t){return Math.max(0,Math.min(o.data.length,t-1))}),h=r(f,2);return i=h[0],s=h[1],{startNode:o,startOffset:i,endNode:o,endOffset:s}}}}},{key:"update",value:function(t,e){var n=this;if(t.some(function(t){return"characterData"===t.type&&t.target===n.textNode})){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}();u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),o=n(4),i=l(o);function l(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Container),e}();a.allowedChildren=[i.default,o.BlockEmbed,a],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Attributor.Style),o(e,[{key:"value",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(t){return("00"+parseInt(t).toString(16)).slice(-2)}).join("")):n}}]),e}(),s=new l.default.Attributor.Class("color","ql-color",{scope:l.default.Scope.INLINE}),u=new a("color","color",{scope:l.default.Scope.INLINE});e.ColorAttributor=a,e.ColorClass=s,e.ColorStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(6),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return u(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}();function u(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(23)),l=a(n(107));function a(t){return t&&t.__esModule?t:{default:t}}var s=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(t){switch(t.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),t.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return o(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",function(){e.selectItem(n,!0)}),n.addEventListener("keydown",function(t){switch(t.keyCode){case i.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case i.default.keys.ESCAPE:e.escape(),t.preventDefault()}}),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=l.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+s,s+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach(function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)}),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach(function(e){t.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout(function(){return t.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=b(n(0)),o=b(n(5)),i=n(4),l=b(i),a=b(n(16)),s=b(n(25)),u=b(n(24)),c=b(n(35)),f=b(n(6)),h=b(n(22)),p=b(n(7)),d=b(n(55)),y=b(n(42)),v=b(n(23));function b(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":l.default,"blots/block/embed":i.BlockEmbed,"blots/break":a.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":h.default,"blots/text":p.default,"modules/clipboard":d.default,"modules/history":y.default,"modules/keyboard":v.default}),r.default.register(l.default,a.default,u.default,f.default,h.default,p.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),l=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach(function(e){null==t.modules[e]&&t.addModule(e)})}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();o.DEFAULTS={modules:{}},o.themes={default:o},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=l(n(0)),i=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var a="\ufeff",s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(t){n.contentNode.appendChild(t)}),n.leftGuard=document.createTextNode(a),n.rightGuard=document.createTextNode(a),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default.Embed),r(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(a).join("");if(t===this.leftGuard)if(this.prev instanceof i.default){var l=this.prev.length();this.prev.insertAt(l,r),e={startNode:this.prev.domNode,startOffset:l+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof i.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=a,e}},{key:"update",value:function(t,e){var n=this;t.forEach(function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}})}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",l),s=new i.default.Attributor.Class("align","ql-align",l),u=new i.default.Attributor.Style("align","text-align",l);e.AlignAttribute=a,e.AlignClass=s,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},l=n(26);var a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),s=new l.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",l),s=new i.default.Attributor.Class("direction","ql-direction",l),u=new i.default.Attributor.Style("direction","direction",l);e.DirectionAttribute=a,e.DirectionClass=s,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a={scope:l.default.Scope.INLINE,whitelist:["serif","monospace"]},s=new l.default.Attributor.Class("font","ql-font",a),u=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Attributor.Style),o(e,[{key:"value",value:function(t){return function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}())("font","font-family",a);e.FontStyle=u,e.FontClass=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=l,e.SizeStyle=a},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(0)),i=a(n(5)),l=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,function(t,e,n,o){t!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==i.default.sources.USER?r.transform(e):r.record(e,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.default.sources.USER),this.ignoreChange=!1;var r=u(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function u(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)}))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=p(n(3)),i=p(n(2)),l=p(n(8)),a=p(n(23)),s=p(n(34)),u=p(n(59)),c=p(n(60)),f=p(n(28)),h=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[!1,"center","right","justify"],g=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],m=[!1,"serif","monospace"],_=["1","2","3",!1],O=["small",!1,"large","huge"],w=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(t){t.container.contains(n.target)||t.close()})}),r}return v(e,s.default),r(e,[{key:"addModule",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach(function(t){(t.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}})})}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map(function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&k(t,b),new c.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&k(t,g,"background"===n?"#ffffff":"#000000"),new u.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?k(t,m):t.classList.contains("ql-header")?k(t,_):t.classList.contains("ql-size")&&k(t,O)),new f.default(t)});this.quill.on(l.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(t){t.update()})})}}]),e}();w.DEFAULTS=(0,o.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new i.default).retain(r.index).delete(r.length).insert({image:n.target.result}),l.default.sources.USER),t.quill.setSelection(r.index+1,l.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}}),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var x=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(e,h.default),r(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",function(e){a.default.match(e,"enter")?(t.save(),e.preventDefault()):a.default.match(e,"escape")&&(t.cancel(),e.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,l.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",l.default.sources.USER),this.quill.setSelection(r+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}e.BaseTooltip=x,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(t<o||e&&t===o&&(null==n.next||0!==n.next.length()))return[n,t];t-=o}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,o=this.find(t),i=o[0],l=t-o[1],a=this.iterator(i);(r=a())&&l<t+e;){var s=r.length();t>l?n(r,t-l,Math.min(e,l+s-t)):n(r,0,Math.min(s,t+e-l)),l+=s}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),l=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,a),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[l.DATA_KEY].mutations&&(t.domNode[l.DATA_KEY].mutations=[]),e&&a(t.parent))},s=function(t){null!=t.domNode[l.DATA_KEY]&&null!=t.domNode[l.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(s),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(t){var e=l.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(l.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=l.find(t,!1);a(e,!1),e instanceof i.default&&e.children.forEach(function(t){a(t,!1)})})):"attributes"===t.type&&a(e.prev)),a(e))}),this.children.forEach(s),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=l.find(t.target,!0);return null==e?null:null==e.domNode[l.DATA_KEY].mutations?(e.domNode[l.DATA_KEY].mutations=[t],e):(e.domNode[l.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==r&&null!=t.domNode[l.DATA_KEY]&&t.update(t.domNode[l.DATA_KEY].mutations||[],n)}),null!=this.domNode[l.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=l.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),l=n(1);var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=l.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var r=l.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=l.query(n,l.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=l.query(r,l.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=l.query(n,l.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),i=l.create(n,r);o.parent.insertBefore(i,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=l.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),l=n(1),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=l.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=l.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(e=n[i],t.call(o,e,i,n))return e}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,e){var n=-1,r=1,o=0;function i(t,e,u){if(t==e)return t?[[o,t]]:[];(u<0||t.length<u)&&(u=null);var f=a(t,e),h=t.substring(0,f);f=s(t=t.substring(f),e=e.substring(f));var p=t.substring(t.length-f),d=function(t,e){var u;if(!t)return[[r,e]];if(!e)return[[n,t]];var c=t.length>e.length?t:e,f=t.length>e.length?e:t,h=c.indexOf(f);if(-1!=h)return u=[[r,c.substring(0,h)],[o,f],[r,c.substring(h+f.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==f.length)return[[n,t],[r,e]];var p=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function o(t,e,n){for(var r,o,i,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(u,c+1));){var h=a(t.substring(n),e.substring(c)),p=s(t.substring(0,n),e.substring(0,c));f.length<p+h&&(f=e.substring(c-p,c)+e.substring(c,c+h),r=t.substring(0,n-p),o=t.substring(n+h),i=e.substring(0,c-p),l=e.substring(c+h))}return 2*f.length>=t.length?[r,o,i,l,f]:null}var i,l,u,c,f,h=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;i=p?h&&h[4].length>p[4].length?h:p:h;t.length>e.length?(l=i[0],u=i[1],c=i[2],f=i[3]):(c=i[0],f=i[1],l=i[2],u=i[3]);var d=i[4];return[l,u,c,f,d]}(t,e);if(p){var d=p[0],y=p[1],v=p[2],b=p[3],g=p[4],m=i(d,v),_=i(y,b);return m.concat([[o,g]],_)}return function(t,e){for(var o=t.length,i=e.length,a=Math.ceil((o+i)/2),s=a,u=2*a,c=new Array(u),f=new Array(u),h=0;h<u;h++)c[h]=-1,f[h]=-1;c[s+1]=0,f[s+1]=0;for(var p=o-i,d=p%2!=0,y=0,v=0,b=0,g=0,m=0;m<a;m++){for(var _=-m+y;_<=m-v;_+=2){for(var O=s+_,w=(j=_==-m||_!=m&&c[O-1]<c[O+1]?c[O+1]:c[O-1]+1)-_;j<o&&w<i&&t.charAt(j)==e.charAt(w);)j++,w++;if(c[O]=j,j>o)v+=2;else if(w>i)y+=2;else if(d){var x=s+p-_;if(x>=0&&x<u&&-1!=f[x]){var k=o-f[x];if(j>=k)return l(t,e,j,w)}}}for(var E=-m+b;E<=m-g;E+=2){for(var x=s+E,N=(k=E==-m||E!=m&&f[x-1]<f[x+1]?f[x+1]:f[x-1]+1)-E;k<o&&N<i&&t.charAt(o-k-1)==e.charAt(i-N-1);)k++,N++;if(f[x]=k,k>o)g+=2;else if(N>i)b+=2;else if(!d){var O=s+p-E;if(O>=0&&O<u&&-1!=c[O]){var j=c[O],w=s+j-O;if(j>=(k=o-k))return l(t,e,j,w)}}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-f),e=e.substring(0,e.length-f));return h&&d.unshift([o,h]),p&&d.push([o,p]),function t(e){e.push([o,""]);var i=0;var l=0;var u=0;var c="";var f="";var h;for(;i<e.length;)switch(e[i][0]){case r:u++,f+=e[i][1],i++;break;case n:l++,c+=e[i][1],i++;break;case o:l+u>1?(0!==l&&0!==u&&(0!==(h=a(f,c))&&(i-l-u>0&&e[i-l-u-1][0]==o?e[i-l-u-1][1]+=f.substring(0,h):(e.splice(0,0,[o,f.substring(0,h)]),i++),f=f.substring(h),c=c.substring(h)),0!==(h=s(f,c))&&(e[i][1]=f.substring(f.length-h)+e[i][1],f=f.substring(0,f.length-h),c=c.substring(0,c.length-h))),0===l?e.splice(i-u,l+u,[r,f]):0===u?e.splice(i-l,l+u,[n,c]):e.splice(i-l-u,l+u,[n,c],[r,f]),i=i-l-u+(l?1:0)+(u?1:0)+1):0!==i&&e[i-1][0]==o?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,u=0,l=0,c="",f=""}""===e[e.length-1][1]&&e.pop();var p=!1;i=1;for(;i<e.length-1;)e[i-1][0]==o&&e[i+1][0]==o&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),p=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),p=!0)),i++;p&&t(e)}(d),null!=u&&(d=function(t,e){var r=function(t,e){if(0===e)return[o,t];for(var r=0,i=0;i<t.length;i++){var l=t[i];if(l[0]===n||l[0]===o){var a=r+l[1].length;if(e===a)return[i+1,t];if(e<a){t=t.slice();var s=e-r,u=[l[0],l[1].slice(0,s)],c=[l[0],l[1].slice(s)];return t.splice(i,1,u,c),[i+1,t]}r=a}}throw new Error("cursor_pos is out of bounds!")}(t,e),i=r[1],l=r[0],a=i[l],s=i[l+1];if(null==a)return t;if(a[0]!==o)return t;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(l,2,s,a),c(i,l,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(l,2,[s[0],a[1]],[0,a[1]]);var u=s[1].slice(a[1].length);return u.length>0&&i.splice(l+2,0,[s[0],u]),c(i,l,3)}return t}(d,u)),d=function(t){for(var e=!1,i=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},l=2;l<t.length;l+=1)t[l-2][0]===o&&((a=t[l-2][1]).charCodeAt(a.length-1)>=55296&&a.charCodeAt(a.length-1)<=56319)&&t[l-1][0]===n&&i(t[l-1][1])&&t[l][0]===r&&i(t[l][1])&&(e=!0,t[l-1][1]=t[l-2][1].slice(-1)+t[l-1][1],t[l][1]=t[l-2][1].slice(-1)+t[l][1],t[l-2][1]=t[l-2][1].slice(0,-1));var a;if(!e)return t;for(var s=[],l=0;l<t.length;l+=1)t[l][1].length>0&&s.push(t[l]);return s}(d)}function l(t,e,n,r){var o=t.substring(0,n),l=e.substring(0,r),a=t.substring(n),s=e.substring(r),u=i(o,l),c=i(a,s);return u.concat(c)}function a(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(i,o)==e.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function s(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(t.length-o,t.length-i)==e.substring(e.length-o,e.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}var u=i;function c(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var o=t[r],i=t[r+1];o[0]===i[1]&&t.splice(r,2,[o[0],o[1]+i[1]])}return t}u.INSERT=r,u.DELETE=n,u.EQUAL=o,t.exports=u},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:o).supported=r,e.unsupported=o},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function o(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,o=[];if(0===this._eventsCount)return o;for(e in t=this._events)n.call(t,e)&&o.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},l.prototype.listeners=function(t,e){var n=r?r+t:t,o=this._events[n];if(e)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var i=0,l=o.length,a=new Array(l);i<l;i++)a[i]=o[i].fn;return a},l.prototype.emit=function(t,e,n,o,i,l){var a=r?r+t:t;if(!this._events[a])return!1;var s,u,c=this._events[a],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,o),!0;case 5:return c.fn.call(c.context,e,n,o,i),!0;case 6:return c.fn.call(c.context,e,n,o,i,l),!0}for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,o);break;default:if(!s)for(h=1,s=new Array(f-1);h<f;h++)s[h-1]=arguments[h];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(t,e,n){var o=new i(e,n||this),l=r?r+t:t;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,this._eventsCount++),this},l.prototype.once=function(t,e,n){var o=new i(e,n||this,!0),l=r?r+t:t;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,this._eventsCount++),this},l.prototype.removeListener=function(t,e,n,i){var l=r?r+t:t;if(!this._events[l])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[l],this;var a=this._events[l];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[l]);else{for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==e||i&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s]);u.length?this._events[l]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new o:delete this._events[l]}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=r,l.EventEmitter=l,void 0!==t&&(t.exports=l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=m(n(3)),a=m(n(2)),s=m(n(0)),u=m(n(5)),c=m(n(10)),f=m(n(9)),h=n(36),p=n(37),d=m(n(13)),y=n(26),v=n(38),b=n(39),g=n(40);function m(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var O=(0,c.default)("quill:clipboard"),w="__ql-matcher",x=[[Node.TEXT_NODE,R],[Node.TEXT_NODE,L],["br",function(t,e){q(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,C],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,S],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};r.fontStyle&&"italic"===A(t).fontStyle&&(n.italic=!0);r.fontWeight&&(A(t).fontWeight.startsWith("bold")||parseInt(A(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=j(e,n));parseFloat(r.textIndent||0)>0&&(e=(new a.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=s.default.query(t);if(null==n||"list-item"!==n.blotName||!q(e,"\n"))return e;var r=-1,o=t.parentNode;for(;!o.classList.contains("ql-clipboard");)"list"===(s.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new a.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new a.default}]],k=[h.AlignAttribute,v.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=[h.AlignStyle,p.BackgroundStyle,y.ColorStyle,v.DirectionStyle,b.FontStyle,g.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),N=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],x.concat(r.options.matchers).forEach(function(t){var e=o(t,2),i=e[0],l=e[1];(n.matchVisual||l!==M)&&r.addMatcher(i,l)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,f.default),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[d.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,_({},d.default.blotName,e[d.default.blotName]))}var r=this.prepareMatching(),i=o(r,2),l=i[0],s=i[1],u=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce(function(t,n){return n(e,t)},new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(o,i){var l=t(i,n,r);return i.nodeType===e.ELEMENT_NODE&&(l=n.reduce(function(t,e){return e(i,t)},l),l=(i[w]||[]).reduce(function(t,e){return e(i,t)},l)),o.concat(l)},new a.default):new a.default}(this.container,l,s);return q(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),O.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new a.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new a.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,u.default.sources.USER),e.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var i=o(r,2),l=i[0],a=i[1];switch(l){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:e.push(a);break;default:[].forEach.call(t.container.querySelectorAll(l),function(t){t[w]=t[w]||[],t[w].push(a)})}}),[e,n]}}]),e}();function j(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce(function(t,n){return j(t,n,e[n])},t):t.reduce(function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,l.default)({},_({},e,n),r.attributes))},new a.default)}function A(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function q(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var o=t.ops[r];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*e.length)===e}function T(t){if(0===t.childNodes.length)return!1;var e=A(t);return["block","list-item"].indexOf(e.display)>-1}function P(t,e,n){return j(n,t,!0)}function S(t,e){var n=s.default.Attributor.Attribute.keys(t),r=s.default.Attributor.Class.keys(t),o=s.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=s.default.query(e,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(n=E[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=j(e,i)),e}function C(t,e){var n=s.default.query(t);if(null==n)return e;if(n.prototype instanceof s.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new a.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}function L(t,e){return q(e,"\n")||(T(t)||e.length()>0&&t.nextSibling&&T(t.nextSibling))&&e.insert("\n"),e}function M(t,e){if(T(t)&&null!=t.nextElementSibling&&!q(e,"\n\n")){var n=t.offsetHeight+parseFloat(A(t).marginTop)+parseFloat(A(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!A(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&T(t.parentNode)||null!=t.previousSibling&&T(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&T(t.parentNode)||null!=t.nextSibling&&T(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0},e.default=N,e.matchAttributor=S,e.matchBlot=C,e.matchNewline=L,e.matchSpacing=M,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(6),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}();s.blotName="bold",s.tagName=["STRONG","B"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=c(n(2)),l=c(n(0)),a=c(n(5)),s=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=(0,s.default)("quill:toolbar"),p=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o,i=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(i.options.container)){var l=document.createElement("div");y(l,i.options.container),t.container.parentNode.insertBefore(l,t.container),i.container=l}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach(function(t){i.addHandler(t,i.options.handlers[t])}),[].forEach.call(i.container.querySelectorAll("button, select"),function(t){i.attach(t)}),i.quill.on(a.default.events.EDITOR_CHANGE,function(t,e){t===a.default.events.SELECTION_CHANGE&&i.update(e)}),i.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){var t=i.quill.selection.getRange(),e=r(t,1)[0];i.update(e)}),i):(o=h.error("Container required for toolbar",i.options),f(i,o))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),o(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,function(t){return 0===t.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void h.warn("ignoring attaching to disabled format",n,t);if(null==l.default.query(n))return void h.warn("ignoring attaching to nonexistent format",n,t)}var o="SELECT"===t.tagName?"change":"click";t.addEventListener(o,function(o){var s=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),o.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),f=r(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,s);else if(l.default.query(n).prototype instanceof l.default.Embed){if(!(s=prompt("Enter "+n)))return;e.quill.updateContents((new i.default).retain(f.index).delete(f.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,s)),a.default.sources.USER)}else e.quill.format(n,s,a.default.sources.USER);e.update(f)}),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach(function(n){var o=r(n,2),i=o[0],l=o[1];if("SELECT"===l.tagName){var a=void 0;if(null==t)a=null;else if(null==e[i])a=l.querySelector("option[selected]");else if(!Array.isArray(e[i])){var s=e[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=l.querySelector('option[value="'+s+'"]')}null==a?(l.value="",l.selectedIndex=-1):a.selected=!0}else if(null==t)l.classList.remove("ql-active");else if(l.hasAttribute("value")){var u=e[i]===l.getAttribute("value")||null!=e[i]&&e[i].toString()===l.getAttribute("value")||null==e[i]&&!l.getAttribute("value");l.classList.toggle("ql-active",u)}else l.classList.toggle("ql-active",null!=e[i])})}}]),e}();function d(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function y(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)d(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}(n,e,r):d(n,e,r)}}),t.appendChild(n)})}p.DEFAULTS={},p.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(e){null!=l.default.query(e,l.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,a.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",a.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",t,a.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var o="+1"===t?1:-1;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",r+o,a.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,a.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",t,a.default.sources.USER)}}},e.default=p,e.addControls=y},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(28),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"buildItem",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(28),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(t){t.innerHTML=n[t.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,[{key:"selectItem",value:function(t,n){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.left<r.left&&(i=r.left-o.left,this.root.style.left=e+i+"px"),o.bottom>r.bottom){var l=o.bottom-o.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=p(n(3)),a=p(n(8)),s=n(43),u=p(s),c=p(n(27)),f=n(15),h=p(n(41));function p(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],g=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return v(e,u.default),i(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),h.default),this.tooltip=new m(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(e,n){t.handlers.link.call(t,!n.format.link)})}}]),e}();g.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var m=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return v(e,s.BaseTooltip),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()}),this.quill.on(a.default.events.SELECTION_CHANGE,function(e,n,o){if(null!=e){if(0===e.length&&o===a.default.sources.USER){var i=t.quill.scroll.descendant(c.default,e.index),l=r(i,2),s=l[0],u=l[1];if(null!=s){t.linkRange=new f.Range(e.index-u,s.length());var h=c.default.formats(s.domNode);return t.preview.textContent=h,t.preview.setAttribute("href",h),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}})}},{key:"show",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}();m.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=M(n(29)),o=n(36),i=n(38),l=n(64),a=M(n(65)),s=M(n(66)),u=n(67),c=M(u),f=n(37),h=n(26),p=n(39),d=n(40),y=M(n(56)),v=M(n(68)),b=M(n(27)),g=M(n(69)),m=M(n(70)),_=M(n(71)),O=M(n(72)),w=M(n(73)),x=n(13),k=M(x),E=M(n(74)),N=M(n(75)),j=M(n(57)),A=M(n(41)),q=M(n(28)),T=M(n(59)),P=M(n(60)),S=M(n(61)),C=M(n(108)),L=M(n(62));function M(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":d.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":d.SizeStyle},!0),r.default.register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":l.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":p.FontClass,"formats/size":d.SizeClass,"formats/blockquote":a.default,"formats/code-block":k.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":y.default,"formats/code":x.Code,"formats/italic":v.default,"formats/link":b.default,"formats/script":g.default,"formats/strike":m.default,"formats/underline":_.default,"formats/image":O.default,"formats/video":w.default,"formats/list/item":u.ListItem,"modules/formula":E.default,"modules/syntax":N.default,"modules/toolbar":j.default,"themes/bubble":C.default,"themes/snow":L.default,"ui/icons":A.default,"ui/picker":q.default,"ui/icon-picker":P.default,"ui/color-picker":T.default,"ui/tooltip":S.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(0),a=(r=l)&&r.__esModule?r:{default:r};var s=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Attributor.Class),o(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}())("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(4),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="blockquote",l.tagName="blockquote",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(4),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}();a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=s(n(0)),l=s(n(4)),a=s(n(25));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,l.default),r(e,[{key:"format",value:function(t,n){t!==p.blotName||n?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:o(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}();h.blotName="list-item",h.tagName="LI";var p=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),o=i.default.find(e.target);"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return f(e,a.default),r(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();p.blotName="list",p.scope=i.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],e.ListItem=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(56),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="italic",l.tagName=["EM","I"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(6),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}();a.blotName="script",a.tagName=["SUB","SUP"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="strike",l.tagName="S",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="underline",l.tagName="U",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(0),a=(r=l)&&r.__esModule?r:{default:r},s=n(27);var u=["alt","height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Embed),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,s.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(4),a=n(27),s=(r=a)&&r.__esModule?r:{default:r};var u=["height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.BlockEmbed),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return s.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(35)),i=a(n(5)),l=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),r(e,null,[{key:"create",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}();f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var h=function(t){function e(){s(this,e);var t=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return c(e,l.default),r(e,null,[{key:"register",value:function(){i.default.register(f,!0)}}]),e}();e.FormulaBlot=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),i=s(n(5)),l=s(n(9)),a=s(n(13));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,a.default),r(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();h.className="ql-syntax";var p=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),d=function(t){function e(t,n){u(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(i.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(o),o=setTimeout(function(){r.highlight(),o=null},r.options.interval)}),r.highlight(),r}return f(e,l.default),r(e,null,[{key:"register",value:function(){i.default.register(p,!0),i.default.register(h,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(i.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(h).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(i.default.sources.SILENT),null!=e&&this.quill.setSelection(e,i.default.sources.SILENT)}}}]),e}();d.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=h,e.CodeToken=p,e.default=d},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=f(n(3)),l=f(n(8)),a=n(43),s=f(a),u=n(15),c=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],v=function(t){function e(t,n){h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=y);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return d(e,s.default),o(e,[{key:"extendToolbar",value:function(t){this.tooltip=new b(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}();v.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){h(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(l.default.events.EDITOR_CHANGE,function(t,e,n,o){if(t===l.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&o===l.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var a=i[i.length-1],s=r.quill.getIndex(a),c=Math.min(a.length()-1,e.index+e.length-s),f=r.quill.getBounds(new u.Range(s,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return d(e,a.BaseTooltip),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}();b.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=b,e.default=v},function(t,e,n){t.exports=n(63)}]).default});
|
|
225
|
+
},{"buffer":"aMB2"}],"sBBS":[function(require,module,exports) {
|
|
226
|
+
var global = arguments[3];
|
|
227
|
+
var define;
|
|
228
|
+
var o,e=arguments[3];!function(n){var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,t="object"==typeof module&&module&&!module.nodeType&&module,u="object"==typeof e&&e;u.global!==u&&u.window!==u&&u.self!==u||(n=u);var i,f,c=2147483647,l=36,s=1,p=26,a=38,d=700,h=72,v=128,g="-",w=/^xn--/,x=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-s,b=Math.floor,j=String.fromCharCode;function A(o){throw new RangeError(m[o])}function I(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function E(o,e){var n=o.split("@"),r="";return n.length>1&&(r=n[0]+"@",o=n[1]),r+I((o=o.replace(y,".")).split("."),e).join(".")}function F(o){for(var e,n,r=[],t=0,u=o.length;t<u;)(e=o.charCodeAt(t++))>=55296&&e<=56319&&t<u?56320==(64512&(n=o.charCodeAt(t++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),t--):r.push(e);return r}function O(o){return I(o,function(o){var e="";return o>65535&&(e+=j((o-=65536)>>>10&1023|55296),o=56320|1023&o),e+=j(o)}).join("")}function S(o,e){return o+22+75*(o<26)-((0!=e)<<5)}function T(o,e,n){var r=0;for(o=n?b(o/d):o>>1,o+=b(o/e);o>C*p>>1;r+=l)o=b(o/C);return b(r+(C+1)*o/(o+a))}function L(o){var e,n,r,t,u,i,f,a,d,w,x,y=[],m=o.length,C=0,j=v,I=h;for((n=o.lastIndexOf(g))<0&&(n=0),r=0;r<n;++r)o.charCodeAt(r)>=128&&A("not-basic"),y.push(o.charCodeAt(r));for(t=n>0?n+1:0;t<m;){for(u=C,i=1,f=l;t>=m&&A("invalid-input"),((a=(x=o.charCodeAt(t++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:l)>=l||a>b((c-C)/i))&&A("overflow"),C+=a*i,!(a<(d=f<=I?s:f>=I+p?p:f-I));f+=l)i>b(c/(w=l-d))&&A("overflow"),i*=w;I=T(C-u,e=y.length+1,0==u),b(C/e)>c-j&&A("overflow"),j+=b(C/e),C%=e,y.splice(C++,0,j)}return O(y)}function M(o){var e,n,r,t,u,i,f,a,d,w,x,y,m,C,I,E=[];for(y=(o=F(o)).length,e=v,n=0,u=h,i=0;i<y;++i)(x=o[i])<128&&E.push(j(x));for(r=t=E.length,t&&E.push(g);r<y;){for(f=c,i=0;i<y;++i)(x=o[i])>=e&&x<f&&(f=x);for(f-e>b((c-n)/(m=r+1))&&A("overflow"),n+=(f-e)*m,e=f,i=0;i<y;++i)if((x=o[i])<e&&++n>c&&A("overflow"),x==e){for(a=n,d=l;!(a<(w=d<=u?s:d>=u+p?p:d-u));d+=l)I=a-w,C=l-w,E.push(j(S(w+I%C,0))),a=b(I/C);E.push(j(S(a,0))),u=T(n,m,r==t),n=0,++r}++n,++e}return E.join("")}if(i={version:"1.4.1",ucs2:{decode:F,encode:O},decode:L,encode:M,toASCII:function(o){return E(o,function(o){return x.test(o)?"xn--"+M(o):o})},toUnicode:function(o){return E(o,function(o){return w.test(o)?L(o.slice(4).toLowerCase()):o})}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",function(){return i});else if(r&&t)if(module.exports==r)t.exports=i;else for(f in i)i.hasOwnProperty(f)&&(r[f]=i[f]);else n.punycode=i}(this);
|
|
229
|
+
},{}],"oHuK":[function(require,module,exports) {
|
|
230
|
+
"use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}};
|
|
231
|
+
},{}],"ObZ4":[function(require,module,exports) {
|
|
232
|
+
"use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(t,n,o,a){n=n||"&",o=o||"=";var s={};if("string"!=typeof t||0===t.length)return s;var p=/\+/g;t=t.split(n);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var i=0;i<c;++i){var y,l,f,v,b=t[i].replace(p,"%20"),d=b.indexOf(o);d>=0?(y=b.substr(0,d),l=b.substr(d+1)):(y=b,l=""),f=decodeURIComponent(y),v=decodeURIComponent(l),r(s,f)?e(s[f])?s[f].push(v):s[f]=[s[f],v]:s[f]=v}return s};var e=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
|
|
233
|
+
},{}],"XK8a":[function(require,module,exports) {
|
|
234
|
+
"use strict";var n=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};module.exports=function(o,u,c,a){return u=u||"&",c=c||"=",null===o&&(o=void 0),"object"==typeof o?r(t(o),function(t){var a=encodeURIComponent(n(t))+c;return e(o[t])?r(o[t],function(e){return a+encodeURIComponent(n(e))}).join(u):a+encodeURIComponent(n(o[t]))}).join(u):a?encodeURIComponent(n(a))+c+encodeURIComponent(n(o)):""};var e=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function r(n,e){if(n.map)return n.map(e);for(var r=[],t=0;t<n.length;t++)r.push(e(n[t],t));return r}var t=Object.keys||function(n){var e=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.push(r);return e};
|
|
235
|
+
},{}],"SF0R":[function(require,module,exports) {
|
|
236
|
+
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
|
|
237
|
+
},{"./decode":"ObZ4","./encode":"XK8a"}],"j37I":[function(require,module,exports) {
|
|
238
|
+
"use strict";var t=require("punycode"),s=require("./util");function h(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}exports.parse=b,exports.resolve=O,exports.resolveObject=d,exports.format=q,exports.Url=h;var e=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,r=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,o=["<",">",'"',"`"," ","\r","\n","\t"],n=["{","}","|","\\","^","`"].concat(o),i=["'"].concat(n),l=["%","/","?",";","#"].concat(i),p=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=require("querystring");function b(t,e,a){if(t&&s.isObject(t)&&t instanceof h)return t;var r=new h;return r.parse(t,e,a),r}function q(t){return s.isString(t)&&(t=b(t)),t instanceof h?t.format():h.prototype.format.call(t)}function O(t,s){return b(t,!1,!0).resolve(s)}function d(t,s){return t?b(t,!1,!0).resolveObject(s):s}h.prototype.parse=function(h,a,o){if(!s.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var n=h.indexOf("?"),b=-1!==n&&n<h.indexOf("#")?"?":"#",q=h.split(b);q[0]=q[0].replace(/\\/g,"/");var O=h=q.join(b);if(O=O.trim(),!o&&1===h.split("#").length){var d=r.exec(O);if(d)return this.path=O,this.href=O,this.pathname=d[1],d[2]?(this.search=d[2],this.query=a?y.parse(this.search.substr(1)):this.search.substr(1)):a&&(this.search="",this.query={}),this}var j=e.exec(O);if(j){var x=(j=j[0]).toLowerCase();this.protocol=x,O=O.substr(j.length)}if(o||j||O.match(/^\/\/[^@\/]+@[^@\/]+/)){var A="//"===O.substr(0,2);!A||j&&v[j]||(O=O.substr(2),this.slashes=!0)}if(!v[j]&&(A||j&&!g[j])){for(var C,I,w=-1,U=0;U<p.length;U++){-1!==(k=O.indexOf(p[U]))&&(-1===w||k<w)&&(w=k)}-1!==(I=-1===w?O.lastIndexOf("@"):O.lastIndexOf("@",w))&&(C=O.slice(0,I),O=O.slice(I+1),this.auth=decodeURIComponent(C)),w=-1;for(U=0;U<l.length;U++){var k;-1!==(k=O.indexOf(l[U]))&&(-1===w||k<w)&&(w=k)}-1===w&&(w=O.length),this.host=O.slice(0,w),O=O.slice(w),this.parseHost(),this.hostname=this.hostname||"";var N="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!N)for(var R=this.hostname.split(/\./),S=(U=0,R.length);U<S;U++){var $=R[U];if($&&!$.match(u)){for(var z="",H=0,L=$.length;H<L;H++)$.charCodeAt(H)>127?z+="x":z+=$[H];if(!z.match(u)){var Z=R.slice(0,U),_=R.slice(U+1),E=$.match(f);E&&(Z.push(E[1]),_.unshift(E[2])),_.length&&(O="/"+_.join(".")+O),this.hostname=Z.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=t.toASCII(this.hostname));var P=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+P,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O))}if(!m[x])for(U=0,S=i.length;U<S;U++){var B=i[U];if(-1!==O.indexOf(B)){var D=encodeURIComponent(B);D===B&&(D=escape(B)),O=O.split(B).join(D)}}var F=O.indexOf("#");-1!==F&&(this.hash=O.substr(F),O=O.slice(0,F));var G=O.indexOf("?");if(-1!==G?(this.search=O.substr(G),this.query=O.substr(G+1),a&&(this.query=y.parse(this.query)),O=O.slice(0,G)):a&&(this.search="",this.query={}),O&&(this.pathname=O),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){P=this.pathname||"";var J=this.search||"";this.path=P+J}return this.href=this.format(),this},h.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var h=this.protocol||"",e=this.pathname||"",a=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(o=y.stringify(this.query));var n=this.search||o&&"?"+o||"";return h&&":"!==h.substr(-1)&&(h+=":"),this.slashes||(!h||g[h])&&!1!==r?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),a&&"#"!==a.charAt(0)&&(a="#"+a),n&&"?"!==n.charAt(0)&&(n="?"+n),h+r+(e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}))+(n=n.replace("#","%23"))+a},h.prototype.resolve=function(t){return this.resolveObject(b(t,!1,!0)).format()},h.prototype.resolveObject=function(t){if(s.isString(t)){var e=new h;e.parse(t,!1,!0),t=e}for(var a=new h,r=Object.keys(this),o=0;o<r.length;o++){var n=r[o];a[n]=this[n]}if(a.hash=t.hash,""===t.href)return a.href=a.format(),a;if(t.slashes&&!t.protocol){for(var i=Object.keys(t),l=0;l<i.length;l++){var p=i[l];"protocol"!==p&&(a[p]=t[p])}return g[a.protocol]&&a.hostname&&!a.pathname&&(a.path=a.pathname="/"),a.href=a.format(),a}if(t.protocol&&t.protocol!==a.protocol){if(!g[t.protocol]){for(var c=Object.keys(t),u=0;u<c.length;u++){var f=c[u];a[f]=t[f]}return a.href=a.format(),a}if(a.protocol=t.protocol,t.host||v[t.protocol])a.pathname=t.pathname;else{for(var m=(t.pathname||"").split("/");m.length&&!(t.host=m.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==m[0]&&m.unshift(""),m.length<2&&m.unshift(""),a.pathname=m.join("/")}if(a.search=t.search,a.query=t.query,a.host=t.host||"",a.auth=t.auth,a.hostname=t.hostname||t.host,a.port=t.port,a.pathname||a.search){var y=a.pathname||"",b=a.search||"";a.path=y+b}return a.slashes=a.slashes||t.slashes,a.href=a.format(),a}var q=a.pathname&&"/"===a.pathname.charAt(0),O=t.host||t.pathname&&"/"===t.pathname.charAt(0),d=O||q||a.host&&t.pathname,j=d,x=a.pathname&&a.pathname.split("/")||[],A=(m=t.pathname&&t.pathname.split("/")||[],a.protocol&&!g[a.protocol]);if(A&&(a.hostname="",a.port=null,a.host&&(""===x[0]?x[0]=a.host:x.unshift(a.host)),a.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===m[0]?m[0]=t.host:m.unshift(t.host)),t.host=null),d=d&&(""===m[0]||""===x[0])),O)a.host=t.host||""===t.host?t.host:a.host,a.hostname=t.hostname||""===t.hostname?t.hostname:a.hostname,a.search=t.search,a.query=t.query,x=m;else if(m.length)x||(x=[]),x.pop(),x=x.concat(m),a.search=t.search,a.query=t.query;else if(!s.isNullOrUndefined(t.search)){if(A)a.hostname=a.host=x.shift(),(k=!!(a.host&&a.host.indexOf("@")>0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift());return a.search=t.search,a.query=t.query,s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.href=a.format(),a}if(!x.length)return a.pathname=null,a.search?a.path="/"+a.search:a.path=null,a.href=a.format(),a;for(var C=x.slice(-1)[0],I=(a.host||t.host||x.length>1)&&("."===C||".."===C)||""===C,w=0,U=x.length;U>=0;U--)"."===(C=x[U])?x.splice(U,1):".."===C?(x.splice(U,1),w++):w&&(x.splice(U,1),w--);if(!d&&!j)for(;w--;w)x.unshift("..");!d||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var k,N=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(a.hostname=a.host=N?"":x.length?x.shift():"",(k=!!(a.host&&a.host.indexOf("@")>0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift()));return(d=d||a.host&&x.length)&&!N&&x.unshift(""),x.length?a.pathname=x.join("/"):(a.pathname=null,a.path=null),s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.auth=t.auth||a.auth,a.slashes=a.slashes||t.slashes,a.href=a.format(),a},h.prototype.parseHost=function(){var t=this.host,s=a.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
|
|
239
|
+
},{"punycode":"sBBS","./util":"oHuK","querystring":"SF0R"}],"JMLK":[function(require,module,exports) {
|
|
240
|
+
var define;
|
|
241
|
+
var e;!function(t,n){"function"==typeof e&&e.amd?e([],n):"object"==typeof module&&module.exports?module.exports=n():t.xmlserializer=n()}(this,function(){var e=function(e){var t=e.tagName;return"http://www.w3.org/1999/xhtml"===e.namespaceURI&&(t=t.toLowerCase()),t},t=function(e){return Array.prototype.map.call(e.childNodes,function(e){return r(e)}).join("")},n=function(n,r){var a="<"+e(n);return a+=function(e,t){return Array.prototype.map.call(e.attributes||e.attrs,function(e){return e.name}).indexOf("xmlns")>=0||!t&&e.namespaceURI===e.parentNode.namespaceURI?"":' xmlns="'+e.namespaceURI+'"'}(n,r),Array.prototype.forEach.call(n.attributes||n.attrs,function(e){a+=function(e){var t=e.value;return" "+e.name+'="'+function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}(t)+'"'}(e)}),n.childNodes.length>0?(a+=">",a+=t(n),a+="</"+e(n)+">"):a+="/>",a},r=function(e,r){var a=r&&r.rootNode;return"#document"===e.nodeName||"#document-fragment"===e.nodeName?t(e):e.tagName?n(e,a):"#text"===e.nodeName?function(e){var t=e.nodeValue||e.value||"";return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}(e):"#comment"===e.nodeName?function(e){return"\x3c!--"+e.data.replace(/-/g,"-")+"--\x3e"}(e):"#cdata-section"===e.nodeName?function(e){return"<![CDATA["+e.nodeValue+"]]>"}(e):void 0};return{serializeToString:function(e){return r(e,{rootNode:!0}).replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")}}});
|
|
242
|
+
},{}],"ZgwT":[function(require,module,exports) {
|
|
243
|
+
"use strict";var e=function(e){var n=new XMLSerializer;return Array.prototype.map.call(e.childNodes,function(e){return n.serializeToString(e)}).join("")},n=function(e){return"parsererror"===e.documentElement.tagName&&"http://www.mozilla.org/newlayout/xml/parsererror.xml"===e.documentElement.namespaceURI?e.documentElement:("xml"===e.documentElement.tagName||"html"===e.documentElement.tagName)&&e.documentElement.childNodes&&e.documentElement.childNodes.length>0&&"parsererror"===e.documentElement.childNodes[0].nodeName?e.documentElement.childNodes[0]:"html"===e.documentElement.tagName&&e.documentElement.childNodes&&e.documentElement.childNodes.length>0&&"body"===e.documentElement.childNodes[0].nodeName&&e.documentElement.childNodes[0].childNodes&&e.documentElement.childNodes[0].childNodes.length&&"parsererror"===e.documentElement.childNodes[0].childNodes[0].nodeName?e.documentElement.childNodes[0].childNodes[0]:void 0},o=[new RegExp("^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)\n?</div>"),new RegExp("^(.+)\n")],r=function(n){var r,t,d=e(n);for(r=0;r<o.length;r++)if(t=o[r].exec(d))return t[1]},t=function(e){var o;if(null===e)throw new Error("Parse error");var t=n(e);if(void 0!==t)throw o=r(t)||"Parse error",new Error(o)};exports.failOnParseError=function(e){return t(e),e};
|
|
244
|
+
},{}],"KRte":[function(require,module,exports) {
|
|
245
|
+
"use strict";var r=require("url");exports.getDocumentBaseUrl=function(r){return"about:blank"!==r.baseURI?r.baseURI:null},exports.clone=function(r){var e,n={};for(e in r)r.hasOwnProperty(e)&&(n[e]=r[e]);return n},exports.cloneArray=function(r){return Array.prototype.slice.apply(r,[0])},exports.joinUrl=function(e,n){return e?r.resolve(e,n):n},exports.isDataUri=function(r){return/^data:/.test(r)},exports.collectAndReportErrors=function(r){var e=[];return Promise.all(r.map(function(r){return r.catch(function(r){e.push(r)})})).then(function(){return e})};var e=null,n=function(r,n){return!1===n||"none"===n||"repeated"===n?(null!==e&&"repeated"===n||(e=Date.now()),r+"?_="+e):r};exports.ajax=function(r,e){return new Promise(function(t,o){var a,u=new window.XMLHttpRequest,i=exports.joinUrl(e.baseUrl,r),s=function(){o({msg:"Unable to load url",url:i})};a=n(i,e.cache),u.addEventListener("load",function(){200===u.status||0===u.status?t(u.response):s()},!1),u.addEventListener("error",s,!1);try{u.open("GET",a,!0),u.overrideMimeType(e.mimeType),u.send(null)}catch(c){s()}})},exports.binaryAjax=function(r,e){var n=exports.clone(e);return n.mimeType="text/plain; charset=x-user-defined",exports.ajax(r,n).then(function(r){for(var e="",n=0;n<r.length;n++)e+=String.fromCharCode(255&r.charCodeAt(n));return e})};var t=function(r){var e=function(r,e){return r.substring(0,e.length)===e};return e(r,"<?xml")||e(r,"<svg")?"image/svg+xml":"image/png"};exports.getDataURIForImageURL=function(r,e){return exports.binaryAjax(r,e).then(function(r){var e=btoa(r);return"data:"+t(r)+";base64,"+e})};var o=[],a=function(r){return o.indexOf(r)<0&&o.push(r),o.indexOf(r)};exports.memoize=function(r,e,n){if("object"!=typeof n)throw new Error("cacheBucket is not an object");return function(){var t,o=Array.prototype.slice.call(arguments),u=e(o),i=a(r);return n[i]&&n[i][u]?n[i][u]:(t=r.apply(null,o),n[i]=n[i]||{},n[i][u]=t,t)}};
|
|
246
|
+
},{"url":"j37I"}],"pmj1":[function(require,module,exports) {
|
|
247
|
+
"use strict";var t=require("./util"),e=function(e,r){var n=null;e.hasAttribute("src")?n=e.getAttribute("src"):e.hasAttributeNS("http://www.w3.org/1999/xlink","href")?n=e.getAttributeNS("http://www.w3.org/1999/xlink","href"):e.hasAttribute("href")&&(n=e.getAttribute("href"));var u=t.getDocumentBaseUrl(e.ownerDocument),i=t.clone(r);return!i.baseUrl&&u&&(i.baseUrl=u),t.getDataURIForImageURL(n,i).then(function(t){return t},function(t){throw{resourceType:"image",url:t.url,msg:"Unable to load image "+t.url}})},r=function(e){return e.filter(function(e){var r=null;return e.hasAttribute("src")?r=e.getAttribute("src"):e.hasAttributeNS("http://www.w3.org/1999/xlink","href")?r=e.getAttributeNS("http://www.w3.org/1999/xlink","href"):e.hasAttribute("href")&&(r=e.getAttribute("href")),null!==r&&!t.isDataUri(r)})},n=function(t){return Array.prototype.filter.call(t,function(t){return"image"===t.type})},u=function(t){return Array.prototype.slice.call(t)};exports.inline=function(i,a){var l=u(i.getElementsByTagName("img")),o=u(i.getElementsByTagName("image")),s=n(i.getElementsByTagName("input"));l=(l=l.concat(o)).concat(s);var c=r(l);return t.collectAndReportErrors(c.map(function(t){return e(t,a).then(function(e){t.attributes.src?t.attributes.src.value=e:t.attributes["xlink:href"]?t.attributes["xlink:href"].value=e:t.attributes.href&&(t.attributes.href.value=e)})}))};
|
|
248
|
+
},{"./util":"KRte"}],"UPxw":[function(require,module,exports) {
|
|
249
|
+
"use strict";var t=require("./util"),r=function(r,e){var n=r.attributes.src.value,u=t.getDocumentBaseUrl(r.ownerDocument),c=t.clone(e);return!c.baseUrl&&u&&(c.baseUrl=u),t.ajax(n,c).catch(function(t){throw{resourceType:"script",url:t.url,msg:"Unable to load script "+t.url}})},e=function(t){return t.replace(/<\//g,"<\\/")},n=function(t,r){t.attributes.removeNamedItem("src"),t.textContent=e(r)},u=function(t){var r=t.getElementsByTagName("script");return Array.prototype.filter.call(r,function(t){return!!t.attributes.src})};exports.inline=function(e,c){var o=u(e);return t.collectAndReportErrors(o.map(function(t){return r(t,c).then(function(r){n(t,r)})}))};
|
|
250
|
+
},{"./util":"KRte"}],"K7Fm":[function(require,module,exports) {
|
|
251
|
+
"use strict";exports.unquoteString=function(e){var t=/^"(.*)"$/,r=/^'(.*)'$/;return t.test(e)?e.replace(t,"$1"):r.test(e)?e.replace(r,"$1"):e},exports.rulesForCssText=function(e){var t,r=document.implementation.createHTMLDocument(""),n=document.createElement("style");return n.textContent=e,r.body.appendChild(n),t=n.sheet.cssRules,Array.prototype.slice.call(t)},exports.cssRulesToText=function(e){return e.reduce(function(e,t){return e+t.cssText},"")},exports.exchangeRule=function(e,t,r){var n=e.indexOf(t);e[n]=exports.rulesForCssText(r)[0]},exports.changeFontFaceRuleSrc=function(e,t,r){var n="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(n+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(n+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(n+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),n+="src: "+r+"}",exports.exchangeRule(e,t,n)};
|
|
252
|
+
},{}],"dtzu":[function(require,module,exports) {
|
|
253
|
+
"use strict";var r=require("./cssSupport"),e=function(r){return r.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1")};exports.extractCssUrl=function(t){var n,s=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/;if(!s.test(t))throw new Error("Invalid url");return n=s.exec(t)[1],r.unquoteString(e(n))};var t=function(r){var e,t="(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+)",n="(?:\\s*"+t+")+",s=new RegExp(n,"g"),u=[],c=function(r){var e,n=new RegExp(t,"g"),s=[];for(e=n.exec(r);e;)s.push(e[1]),e=n.exec(r);return s};if(r.match(new RegExp("^\\s*((?:\\s*(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+)(?:\\s*,\\s*((?:\\s*(url\\(\\s*(?:\"[^\"]*\"|'[^']*'|[^\\(]+)\\s*\\)|[^,\\s]+))+))*\\s*$"))){for(e=s.exec(r);e;)u.push(c(e[0])),e=s.exec(r);return u}return[]},n=function(r){var e;for(e=0;e<r.length;e++)try{return{url:exports.extractCssUrl(r[e]),idx:e}}catch(t){}};exports.parse=function(r){return t(r).map(function(r){var e=n(r);return e?{preUrl:r.slice(0,e.idx),url:e.url,postUrl:r.slice(e.idx+1)}:{preUrl:r}})},exports.serialize=function(r){return r.map(function(r){var e=[].concat(r.preUrl);return r.url&&e.push('url("'+r.url+'")'),r.postUrl&&(e=e.concat(r.postUrl)),e.join(" ")}).join(", ")};
|
|
254
|
+
},{"./cssSupport":"K7Fm"}],"bca6":[function(require,module,exports) {
|
|
255
|
+
var define;
|
|
256
|
+
var global = arguments[3];
|
|
257
|
+
var r,t=arguments[3];!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof r&&r.amd)r([],n);else{("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).cssFontFaceSrc=n()}}(function(){return function r(t,n,e){function u(c,a){if(!n[c]){if(!t[c]){var i="function"==typeof require&&require;if(!a&&i)return i(c,!0);if(o)return o(c,!0);var f=new Error("Cannot find module '"+c+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[c]={exports:{}};t[c][0].call(l.exports,function(r){var n=t[c][1][r];return u(n||r)},l,l.exports,r,t,n,e)}return n[c].exports}for(var o="function"==typeof require&&require,c=0;c<e.length;c++)u(e[c]);return u}({1:[function(r,t,n){"use strict";function e(r,t,n,u){this.message=r,this.expected=t,this.found=n,this.location=u,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}!function(r,t){function n(){this.constructor=r}n.prototype=t.prototype,r.prototype=new n}(e,Error),e.buildMessage=function(r,t){var n={literal:function(r){return'"'+u(r.text)+'"'},class:function(r){var t,n="";for(t=0;t<r.parts.length;t++)n+=r.parts[t]instanceof Array?o(r.parts[t][0])+"-"+o(r.parts[t][1]):o(r.parts[t]);return"["+(r.inverted?"^":"")+n+"]"},any:function(r){return"any character"},end:function(r){return"end of input"},other:function(r){return r.description}};function e(r){return r.charCodeAt(0).toString(16).toUpperCase()}function u(r){return r.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(r){return"\\x0"+e(r)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(r){return"\\x"+e(r)})}function o(r){return r.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(r){return"\\x0"+e(r)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(r){return"\\x"+e(r)})}return"Expected "+function(r){var t,e,u,o=new Array(r.length);for(t=0;t<r.length;t++)o[t]=(u=r[t],n[u.type](u));if(o.sort(),o.length>0){for(t=1,e=1;t<o.length;t++)o[t-1]!==o[t]&&(o[e]=o[t],e++);o.length=e}switch(o.length){case 1:return o[0];case 2:return o[0]+" or "+o[1];default:return o.slice(0,-1).join(", ")+", or "+o[o.length-1]}}(r)+" but "+function(r){return r?'"'+u(r)+'"':"end of input"}(t)+" found."},t.exports={SyntaxError:e,parse:function(t,n){n=void 0!==n?n:{};var u,o={},c={start:B},a=B,i="",f=function(){return[]},l=",",s=D(",",!1),p=function(r,t){return[r].concat(t)},h=function(r){return[r]},g=function(r,t){return{url:r,format:t}},d=function(r){return{url:r}},x="url(",m=D("url(",!1),v=")",y=D(")",!1),w=function(r){return r},A="format(",C=D("format(",!1),E="local(",F=D("local(",!1),S=function(r){return{local:r}},b=/^[^)]/,$=N([")"],!0,!1),j=function(r){return K.extractValue(r.join(""))},q=/^[ \t\r\n\f]/,R=N([" ","\t","\r","\n","\f"],!1,!1),M=0,O=[{line:1,column:1}],T=0,U=[],k=0;if("startRule"in n){if(!(n.startRule in c))throw new Error("Can't start parsing from rule \""+n.startRule+'".');a=c[n.startRule]}function D(r,t){return{type:"literal",text:r,ignoreCase:t}}function N(r,t,n){return{type:"class",parts:r,inverted:t,ignoreCase:n}}function V(r){var n,e=O[r];if(e)return e;for(n=r-1;!O[n];)n--;for(e={line:(e=O[n]).line,column:e.column};n<r;)10===t.charCodeAt(n)?(e.line++,e.column=1):e.column++,n++;return O[r]=e,e}function _(r,t){var n=V(r),e=V(t);return{start:{offset:r,line:n.line,column:n.column},end:{offset:t,line:e.line,column:e.column}}}function z(r){M<T||(M>T&&(T=M,U=[]),U.push(r))}function L(r,t,n){return new e(e.buildMessage(r,t),r,t,n)}function B(){var r,n;return(r=function r(){var n,e,u,c,a,i;if(n=M,(e=G())!==o){for(u=[],c=J();c!==o;)u.push(c),c=J();if(u!==o)if(44===t.charCodeAt(M)?(c=l,M++):(c=o,0===k&&z(s)),c!==o){for(a=[],i=J();i!==o;)a.push(i),i=J();a!==o&&(i=r())!==o?(e=p(e,i),n=e):(M=n,n=o)}else M=n,n=o;else M=n,n=o}else M=n,n=o;return n===o&&(n=M,(e=G())!==o&&(e=h(e)),n=e),n}())===o&&(r=M,(n=i)!==o&&(n=f()),r=n),r}function G(){var r;return(r=function(){var r,n,e,u;if(r=M,(n=H())!==o){if(e=[],(u=J())!==o)for(;u!==o;)e.push(u),u=J();else e=o;e!==o&&(u=function(){var r,n,e,u;return r=M,t.substr(M,7)===A?(n=A,M+=7):(n=o,0===k&&z(C)),n!==o&&(e=I())!==o?(41===t.charCodeAt(M)?(u=v,M++):(u=o,0===k&&z(y)),u!==o?(n=w(e),r=n):(M=r,r=o)):(M=r,r=o),r}())!==o?(n=g(n,u),r=n):(M=r,r=o)}else M=r,r=o;return r===o&&(r=M,(n=H())!==o&&(n=d(n)),r=n),r}())===o&&(r=function(){var r,n,e,u;return r=M,t.substr(M,6)===E?(n=E,M+=6):(n=o,0===k&&z(F)),n!==o&&(e=I())!==o?(41===t.charCodeAt(M)?(u=v,M++):(u=o,0===k&&z(y)),u!==o?(n=S(e),r=n):(M=r,r=o)):(M=r,r=o),r}()),r}function H(){var r,n,e,u;return r=M,t.substr(M,4)===x?(n=x,M+=4):(n=o,0===k&&z(m)),n!==o&&(e=I())!==o?(41===t.charCodeAt(M)?(u=v,M++):(u=o,0===k&&z(y)),u!==o?r=n=w(e):(M=r,r=o)):(M=r,r=o),r}function I(){var r,n;if(M,r=[],b.test(t.charAt(M))?(n=t.charAt(M),M++):(n=o,0===k&&z($)),n!==o)for(;n!==o;)r.push(n),b.test(t.charAt(M))?(n=t.charAt(M),M++):(n=o,0===k&&z($));else r=o;return r!==o&&(r=j(r)),r}function J(){var r;return q.test(t.charAt(M))?(r=t.charAt(M),M++):(r=o,0===k&&z(R)),r}var K=r("../util");if((u=a())!==o&&M===t.length)return u;throw u!==o&&M<t.length&&z({type:"end"}),L(U,T<t.length?t.charAt(T):null,T<t.length?_(T,T+1):_(T,T))}}},{"../util":3}],2:[function(r,t,n){var e=r("./grammar");n.SyntaxError=function(r,t){this.message=r,this.offset=t},n.parse=function(r){try{return e.parse(r)}catch(t){throw new n.SyntaxError(t.message,t.offset)}},n.serialize=function(r){return r.map(function(r){var t;return r.url?(t='url("'+r.url+'")',r.format&&(t+=' format("'+r.format+'")')):t='local("'+r.local+'")',t}).join(", ")}},{"./grammar":1}],3:[function(r,t,n){n.extractValue=function(r){return t=function(r){return r.replace(/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/,"$1")}(r),e=/^'(.*)'$/,(n=/^"(.*)"$/).test(t)?t.replace(n,"$1"):e.test(t)?t.replace(e,"$1"):t;var t,n,e}},{}]},{},[2])(2)});
|
|
258
|
+
},{}],"dCPh":[function(require,module,exports) {
|
|
259
|
+
"use strict";var r=require("./util"),e=require("./cssSupport"),n=require("./backgroundValueParser"),t=require("css-font-face-src"),u=function(r,e,n){r.style.setProperty(e,n,r.style.getPropertyPriority(e))},o=function(r){return r.filter(function(r){return r.type===window.CSSRule.STYLE_RULE&&(r.style.getPropertyValue("background-image")||r.style.getPropertyValue("background"))})},a=function(r){var e=[];return r.forEach(function(r){r.style.getPropertyValue("background-image")?e.push({property:"background-image",value:r.style.getPropertyValue("background-image"),rule:r}):r.style.getPropertyValue("background")&&e.push({property:"background",value:r.style.getPropertyValue("background"),rule:r})}),e},c=function(r){return r.filter(function(r){return r.type===window.CSSRule.FONT_FACE_RULE&&r.style.getPropertyValue("src")})},s=function(r){return r.filter(function(r){return r.type===window.CSSRule.IMPORT_RULE&&r.href})},l=function(e){var n=[];return e.forEach(function(e,t){e.url&&!r.isDataUri(e.url)&&n.push(t)}),n},i=function(e){var n=[];return e.forEach(function(e,t){e.url&&!r.isDataUri(e.url)&&n.push(t)}),n};exports.adjustPathsOfCssResources=function(f,h){var p=o(h),g=a(p),y=!1;return g.forEach(function(e){var t,o=n.parse(e.value),a=l(o);a.length>0&&(a.forEach(function(e){var n=o[e].url,t=r.joinUrl(f,n);o[e].url=t}),t=n.serialize(o),u(e.rule,e.property,t),y=!0)}),c(h).forEach(function(n){var u,o,a=n.style.getPropertyValue("src");try{u=t.parse(a)}catch(c){return}(o=i(u)).length>0&&(o.forEach(function(e){var n=u[e].url,t=r.joinUrl(f,n);u[e].url=t}),e.changeFontFaceRuleSrc(h,n,t.serialize(u)),y=!0)}),s(h).forEach(function(n){var t=n.href,u=r.joinUrl(f,t);e.exchangeRule(h,n,"@import url("+u+");"),y=!0}),y};var f=function(r,e,n){var t=r.indexOf(e);r.splice(t,1),n.forEach(function(e,n){r.splice(t+n,0,e)})},h=function(n,t,u,o){var a,c=t.href;return c=e.unquoteString(c),a=r.joinUrl(o.baseUrl,c),u.indexOf(a)>=0?(f(n,t,[]),Promise.resolve([])):(u.push(a),r.ajax(c,o).then(function(r){var a=e.rulesForCssText(r);return exports.loadCSSImportsForRules(a,u,o).then(function(r){return exports.adjustPathsOfCssResources(c,a),f(n,t,a),r.errors})},function(r){throw{resourceType:"stylesheet",url:r.url,msg:"Unable to load stylesheet "+r.url}}))};exports.loadCSSImportsForRules=function(r,e,n){var t=s(r),u=[],o=!1;return Promise.all(t.map(function(t){return h(r,t,e,n).then(function(r){u=u.concat(r),o=!0},function(r){u.push(r)})})).then(function(){return{hasChanges:o,errors:u}})};var p=function(e,t){var u=n.parse(e),o=l(u),a=!1;return r.collectAndReportErrors(o.map(function(e){var n=u[e].url;return r.getDataURIForImageURL(n,t).then(function(r){u[e].url=r,a=!0},function(r){throw{resourceType:"backgroundImage",url:r.url,msg:"Unable to load background-image "+r.url}})})).then(function(r){return{backgroundValue:n.serialize(u),hasChanges:a,errors:r}})},g=function(r,e){var n=o(r),t=a(n),c=[],s=!1;return Promise.all(t.map(function(r){return p(r.value,e).then(function(e){e.hasChanges&&(u(r.rule,r.property,e.backgroundValue),s=!0),c=c.concat(e.errors)})})).then(function(){return{hasChanges:s,errors:c}})},y=function(e,n){var u,o,a=!1;try{u=t.parse(e)}catch(c){u=[]}return o=i(u),r.collectAndReportErrors(o.map(function(e){var t=u[e],o=t.format||"woff";return r.binaryAjax(t.url,n).then(function(r){var e=btoa(r);t.url="data:font/"+o+";base64,"+e,a=!0},function(r){throw{resourceType:"fontFace",url:r.url,msg:"Unable to load font-face "+r.url}})})).then(function(r){return{srcDeclarationValue:t.serialize(u),hasChanges:a,errors:r}})},d=function(r,n){var t=c(r),u=[],o=!1;return Promise.all(t.map(function(t){var a=t.style.getPropertyValue("src");return y(a,n).then(function(n){n.hasChanges&&(e.changeFontFaceRuleSrc(r,t,n.srcDeclarationValue),o=!0),u=u.concat(n.errors)})})).then(function(){return{hasChanges:o,errors:u}})};exports.loadAndInlineCSSResourcesForRules=function(r,e){var n=!1,t=[];return Promise.all([g,d].map(function(u){return u(r,e).then(function(r){n=n||r.hasChanges,t=t.concat(r.errors)})})).then(function(){return{hasChanges:n,errors:t}})};
|
|
260
|
+
},{"./util":"KRte","./cssSupport":"K7Fm","./backgroundValueParser":"dtzu","css-font-face-src":"bca6"}],"hv1m":[function(require,module,exports) {
|
|
261
|
+
"use strict";var e=require("./util"),n=require("./inlineImage"),t=require("./inlineScript"),r=require("./inlineCss"),s=require("./cssSupport"),o=function(n){return e.joinUrl(n,".")},u=function(e){return e.map(function(n,t){return t===e.length-1&&(n={baseUrl:o(n.baseUrl)}),JSON.stringify(n)})},c=function(n,t){return!1!==t.cache&&"none"!==t.cache&&t.cacheBucket?e.memoize(n,u,t.cacheBucket):n},a=function(e,n,t){var o=s.rulesForCssText(e);return r.loadCSSImportsForRules(o,n,t).then(function(n){return r.loadAndInlineCSSResourcesForRules(o,t).then(function(t){var r=n.errors.concat(t.errors),u=n.hasChanges||t.hasChanges;return u&&(e=s.cssRulesToText(o)),{hasChanges:u,content:e,errors:r}})})},l=function(n,t,r){var s=n.textContent;return c(a,t)(s,r,t).then(function(t){return t.hasChanges&&(n.childNodes[0].nodeValue=t.content),e.cloneArray(t.errors)})},i=function(e){var n=e.getElementsByTagName("style");return Array.prototype.filter.call(n,function(e){return!e.attributes.type||"text/css"===e.attributes.type.value})};exports.loadAndInlineStyles=function(n,t){var r,s=i(n),o=[],u=[];return(r=e.clone(t)).baseUrl=r.baseUrl||e.getDocumentBaseUrl(n),Promise.all(s.map(function(e){return l(e,r,u).then(function(e){o=o.concat(e)})})).then(function(){return o})};var h=function(e,n){var t,r=e.parentNode;(n=n.trim())&&((t=e.ownerDocument.createElement("style")).type="text/css",t.appendChild(e.ownerDocument.createTextNode(n)),r.insertBefore(t,e)),r.removeChild(e)},f=function(n,t){return e.ajax(n,t).then(function(e){return{content:e,cssRules:s.rulesForCssText(e)}}).then(function(e){var t=r.adjustPathsOfCssResources(n,e.cssRules);return{content:e.content,cssRules:e.cssRules,hasChanges:t}}).then(function(e){return r.loadCSSImportsForRules(e.cssRules,[],t).then(function(n){return{content:e.content,cssRules:e.cssRules,hasChanges:e.hasChanges||n.hasChanges,errors:n.errors}})}).then(function(e){return r.loadAndInlineCSSResourcesForRules(e.cssRules,t).then(function(n){return{content:e.content,cssRules:e.cssRules,hasChanges:e.hasChanges||n.hasChanges,errors:e.errors.concat(n.errors)}})}).then(function(e){var n=e.content;return e.hasChanges&&(n=s.cssRulesToText(e.cssRules)),{content:n,errors:e.errors}})},p=function(n,t){var r=n.attributes.href.value,s=e.getDocumentBaseUrl(n.ownerDocument),o=e.clone(t);return!o.baseUrl&&s&&(o.baseUrl=s),c(f,t)(r,o).then(function(n){return{content:n.content,errors:e.cloneArray(n.errors)}})},d=function(e){var n=e.getElementsByTagName("link");return Array.prototype.filter.call(n,function(e){return e.attributes.rel&&"stylesheet"===e.attributes.rel.value&&(!e.attributes.type||"text/css"===e.attributes.type.value)})};exports.loadAndInlineCssLinks=function(e,n){var t=d(e),r=[];return Promise.all(t.map(function(e){return p(e,n).then(function(n){h(e,n.content+"\n"),r=r.concat(n.errors)},function(e){r.push({resourceType:"stylesheet",url:e.url,msg:"Unable to load stylesheet "+e.url})})})).then(function(){return r})},exports.loadAndInlineImages=n.inline,exports.loadAndInlineScript=t.inline,exports.inlineReferences=function(e,n){var t=[],r=[exports.loadAndInlineImages,exports.loadAndInlineStyles,exports.loadAndInlineCssLinks];return!1!==n.inlineScripts&&r.push(exports.loadAndInlineScript),Promise.all(r.map(function(r){return r(e,n).then(function(e){t=t.concat(e)})})).then(function(){return t})};
|
|
262
|
+
},{"./util":"KRte","./inlineImage":"pmj1","./inlineScript":"UPxw","./inlineCss":"dCPh","./cssSupport":"K7Fm"}],"x2pr":[function(require,module,exports) {
|
|
263
|
+
var define;
|
|
264
|
+
var e;!function(t,n){void 0===t&&void 0!==window&&(t=window),"function"==typeof e&&e.amd?e(["url","xmlserializer","sane-domparser-error","inlineresources"],function(e,r,o,i){return t.rasterizeHTML=n(e,r,o,i)}):"object"==typeof module&&module.exports?module.exports=n(require("url"),require("xmlserializer"),require("sane-domparser-error"),require("inlineresources")):t.rasterizeHTML=n(t.url,t.xmlserializer,t.sanedomparsererror,t.inlineresources)}(this,function(e,t,n,r){var o=function(e){"use strict";var t={},n=[];t.joinUrl=function(t,n){return t?e.resolve(t,n):n},t.getConstantUniqueIdFor=function(e){return n.indexOf(e)<0&&n.push(e),n.indexOf(e)},t.clone=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n};return t.parseOptionalParameters=function(e){var n,r={canvas:null,options:{}};return null==e[0]||function(e){return"object"==typeof e&&null!==e}(n=e[0])&&Object.prototype.toString.apply(n).match(/\[object (Canvas|HTMLCanvasElement)\]/i)?(r.canvas=e[0]||null,r.options=t.clone(e[1])):r.options=t.clone(e[0]),r},t}(e),i=function(e){"use strict";var t={},n=function(e,t,n){var r=e[t];return e[t]=function(){var e=Array.prototype.slice.call(arguments);return n.apply(this,[e,r])},r};return t.baseUrlRespectingXhr=function(t,r){return function(){var o=new t;return n(o,"open",function(t,n){var o=t.shift(),i=t.shift(),u=e.joinUrl(r,i);return n.apply(this,[o,u].concat(t))}),o}},t.finishNotifyingXhr=function(e){var t,r=0,o=0,i=!1,u=new Promise(function(e){t=function(){r-o<=0&&i&&e({totalCount:r})}}),c=function(){var i=new e;return n(i,"send",function(e,t){return r+=1,t.apply(this,arguments)}),i.addEventListener("load",function(){o+=1,t()}),i};return c.waitForRequestsToFinish=function(){return i=!0,t(),u},c},t}(o),u=function(e){"use strict";var t={},n=function(e){return Array.prototype.slice.call(e)},r={active:!0,hover:!0,focus:!1,target:!1};return t.fakeUserAction=function(t,n,o){var i=t.querySelector(n),u=":"+o,c="rasterizehtml"+o;i&&(r[o]?e.addClassNameRecursively(i,c):e.addClassName(i,c),e.rewriteCssSelectorWith(t,u,"."+c))},t.persistInputValues=function(e){var t=e.querySelectorAll("input"),r=e.querySelectorAll("textarea"),o=function(e){return"checkbox"===e.type||"radio"===e.type};n(t).filter(o).forEach(function(e){e.checked?e.setAttribute("checked",""):e.removeAttribute("checked")}),n(t).filter(function(e){return!o(e)}).forEach(function(e){e.setAttribute("value",e.value)}),n(r).forEach(function(e){e.textContent=e.value})},t.rewriteTagNameSelectorsToLowerCase=function(t){e.lowercaseCssTypeSelectors(t,e.findHtmlOnlyNodeNames(t))},t}(function(){"use strict";var e={},t=function(e){return Array.prototype.slice.call(e)};e.addClassName=function(e,t){e.className+=" "+t},e.addClassNameRecursively=function(t,n){e.addClassName(t,n),t.parentNode!==t.ownerDocument&&e.addClassNameRecursively(t.parentNode,n)};var n=function(e,n){var r=e.cssText.replace(/^[^\{]+/,"");!function(e,n){var r=e.parentStyleSheet,o=t(r.cssRules).indexOf(e);r.insertRule(n,o+1),r.deleteRule(o)}(e,n+" "+r)},r=function(e){var n;e.textContent=(n=e.sheet.cssRules,t(n).reduce(function(e,t){return e+t.cssText},""))},o=function(e,o,i){var u=function(e){return"((?:^|[^.#:\\w])|(?=\\W))("+e.join("|")+")(?=\\W|$)"}(o);t(e.querySelectorAll("style")).forEach(function(e){var o,c,a;void 0===e.sheet&&(o=e,c=document.implementation.createHTMLDocument(""),(a=document.createElement("style")).textContent=o.textContent,c.body.appendChild(a),o.sheet=a.sheet);var s=t(e.sheet.cssRules).filter(function(e){return e.selectorText&&new RegExp(u,"i").test(e.selectorText)});s.length&&(s.forEach(function(e){var t=e.selectorText.replace(new RegExp(u,"gi"),function(e,t,n){return t+i(n)});t!==e.selectorText&&n(e,t)}),r(e))})};return e.rewriteCssSelectorWith=function(e,t,n){o(e,[t],function(){return n})},e.lowercaseCssTypeSelectors=function(e,t){o(e,t,function(e){return e.toLowerCase()})},e.findHtmlOnlyNodeNames=function(e){var t,n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT),r={},o={};do{t=n.currentNode.tagName.toLowerCase(),"http://www.w3.org/1999/xhtml"===n.currentNode.namespaceURI?r[t]=!0:o[t]=!0}while(n.nextNode());return Object.keys(r).filter(function(e){return!o[e]})},e}()),c=function(e,t,n,r){"use strict";var o={};o.executeJavascript=function(e,n){return new Promise(function(o){var i=function(e,t,n,r){var o=e.createElement(t);return o.style.visibility="hidden",o.style.width=n+"px",o.style.height=r+"px",o.style.position="absolute",o.style.top=-1e4-r+"px",o.style.left=-1e4-n+"px",e.getElementsByTagName("body")[0].appendChild(o),o}(r.document,"iframe",n.width,n.height),u=e.outerHTML,c=[],a=n.executeJsTimeout||0,s=function(){r.document.getElementsByTagName("body")[0].removeChild(i)},l=function(){var e=i.contentDocument;o({document:e,errors:c,cleanUp:s})},f=i.contentWindow.XMLHttpRequest,m=t.finishNotifyingXhr(f),d=t.baseUrlRespectingXhr(m,n.baseUrl);i.onload=function(){var e;(e=a,e>0?new Promise(function(t){setTimeout(t,e)}):Promise.resolve()).then(m.waitForRequestsToFinish).then(l)},i.contentDocument.open(),i.contentWindow.XMLHttpRequest=d,i.contentWindow.onerror=function(e){c.push({resourceType:"scriptExecution",msg:e})},i.contentDocument.write("<!DOCTYPE html>"),i.contentDocument.write(u),i.contentDocument.close()})};var i=function(e,t,n,o,i){var u,c,a,s,l,f,m,d=Math.max(e.scrollWidth,e.clientWidth),h=Math.max(e.scrollHeight,e.clientHeight);return t?(u=(f=function(e,t){var n=e.querySelector(t);if(n)return n;if(e.ownerDocument.querySelector(t)===e)return e;throw{message:"Clipping selector not found"}}(e,t).getBoundingClientRect()).top,c=f.left,a=f.width,s=f.height):(u=0,c=0,a=d,s=h),m=function(e,t,n,r){return{width:Math.max(e.width*r,t),height:Math.max(e.height*r,n)}}({width:a,height:s},n,o,i),l=r.getComputedStyle(e.ownerDocument.documentElement).fontSize,{left:c,top:u,width:m.width,height:m.height,viewportWidth:d,viewportHeight:h,rootFontSize:l}};o.calculateDocumentContentSize=function(e,t){return new Promise(function(n,o){var u,c=t.zoom||1;u=function(e,t,n){var o=Math.floor(e/n),i=Math.floor(t/n);return function(e,t,n){var r=e.createElement("iframe");return r.style.width=t+"px",r.style.height=n+"px",r.style.visibility="hidden",r.style.position="absolute",r.style.top=-1e4-n+"px",r.style.left=-1e4-t+"px",r.style.borderWidth=0,r.sandbox="allow-same-origin",r.scrolling="no",r}(r.document,o,i)}(t.width,t.height,c),r.document.getElementsByTagName("body")[0].appendChild(u),u.onload=function(){var a,s=u.contentDocument;try{a=i(function(e,t){var n=e.tagName;return t.querySelector(n)}(e,s),t.clip,t.width,t.height,c),n(a)}catch(l){o(l)}finally{r.document.getElementsByTagName("body")[0].removeChild(u)}},u.contentDocument.open(),u.contentDocument.write("<!DOCTYPE html>"),u.contentDocument.write(function(e){var t=e.tagName.toLowerCase();return"html"===t||"body"===t?e.outerHTML:'<body style="margin: 0;">'+e.outerHTML+"</body>"}(e)),u.contentDocument.close()})},o.parseHtmlFragment=function(e){var t=r.document.implementation.createHTMLDocument("");t.documentElement.innerHTML=e;var n=t.querySelector("body").firstChild;if(!n)throw"Invalid source";return n};o.parseHTML=function(e){var t=r.document.implementation.createHTMLDocument("");return t.documentElement.innerHTML=e,function(e,t){var n,o,i,u,c=/<html((?:\s+[^>]*)?)>/im.exec(t),a=r.document.implementation.createHTMLDocument("");if(c)for(n="<div"+c[1]+"></div>",a.documentElement.innerHTML=n,i=a.querySelector("div"),o=0;o<i.attributes.length;o++)u=i.attributes[o],e.documentElement.setAttribute(u.name,u.value)}(t,e),t};var u=function(e){try{return n.failOnParseError(e)}catch(t){throw{message:"Invalid source",originalError:t}}};o.validateXHTML=function(e){var t=(new DOMParser).parseFromString(e,"application/xml");u(t)};var c=null,a=function(t,n){return new Promise(function(r,o){var i=new window.XMLHttpRequest,u=function(e,t){return"none"===t||"repeated"===t?(null!==c&&"repeated"===t||(c=Date.now()),e+"?_="+c):e}(e.joinUrl(n.baseUrl,t),n.cache),a=function(e){o({message:"Unable to load page",originalError:e})};i.addEventListener("load",function(){200===i.status||0===i.status?r(i.responseXML):a(i.statusText)},!1),i.addEventListener("error",function(e){a(e)},!1);try{i.open("GET",u,!0),i.responseType="document",i.send(null)}catch(s){a(s)}})};return o.loadDocument=function(e,t){return a(e,t).then(function(e){return u(e)})},o}(o,i,n,window),a=function(e){"use strict";var t,n={},r=function(e,t){return t?URL.createObjectURL(new Blob([e],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(e)},o=function(e){e instanceof Blob&&URL.revokeObjectURL(e)},i='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',u=function(e){return new Promise(function(t,n){var r=document.createElement("canvas"),o=new Image;o.onload=function(){var e=r.getContext("2d");try{e.drawImage(o,0,0),r.toDataURL("image/png"),t(!0)}catch(n){t(!1)}},o.onerror=n,o.src=e})},c=function(){return new Promise(function(t,n){var c;(function(){if(e.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch(t){}return!1})()&&e.URL?(c=r(i,!0),u(c).then(function(e){return o(c),!e&&u(r(i,!1)).then(function(e){return e})},function(){return!1})).then(function(e){t(!e)},function(){n()}):t(!1)})},a=function(e){return(void 0===t&&(t=c()),t).then(function(t){return r(e,t)})};return n.renderSvg=function(e){return new Promise(function(t,n){var r,i,u=function(){r&&o(r)};(i=new Image).onload=function(){i.onload=null,i.onerror=null,u(),t(i)},i.onerror=function(){u(),n()},a(e).then(function(e){r=e,i.src=r},n)})},n}(window),s=function(e,t,n,r){"use strict";var o={},i=function(e){var t=Object.keys(e);return t.length?" "+t.map(function(t){return t+'="'+e[t]+'"'}).join(" "):""},u=function(e,n,o){var u=r.serializeToString(e);t.validateXHTML(u);var c,a,s=function(e){var t,n;return t=Math.round(e.viewportWidth),n=Math.round(e.viewportHeight),{x:-e.left,y:-e.top,width:t,height:n}}(n);return a=(c=s).style||"",c.style=a+"float: left;",function(e){e.externalResourcesRequired=!0}(s),'<svg xmlns="http://www.w3.org/2000/svg"'+i(function(e,t){var n=t||1,r={width:e.width,height:e.height,"font-size":e.rootFontSize};return 1!==n&&(r.style="transform:scale("+n+"); transform-origin: 0 0;"),r}(n,o))+'><style scoped="">html::-webkit-scrollbar { display: none; }</style><foreignObject'+i(s)+">"+u+"</foreignObject></svg>"};return o.getSvgForDocument=function(e,t,r){return n.rewriteTagNameSelectorsToLowerCase(e),u(e,t,r)},o.drawDocumentAsSvg=function(e,r){return["hover","active","focus","target"].forEach(function(t){r[t]&&n.fakeUserAction(e,r[t],t)}),t.calculateDocumentContentSize(e,r).then(function(t){return o.getSvgForDocument(e,t,r.zoom)})},o}(0,c,u,t),l=function(e,t,n,r,o,i){"use strict";var u={},c=function(e){return{message:"Error rendering page",originalError:e}},a=function(e){return o.renderSvg(e).then(function(t){return{image:t,svg:e}},function(e){throw c(e)})},s=function(e,t,n){return r.drawDocumentAsSvg(e,n).then(a).then(function(e){return t&&function(e,t){try{t.getContext("2d").drawImage(e,0,0)}catch(n){throw c(n)}}(e.image,t),e})};return u.rasterize=function(r,o,u){var c;return(c=e.clone(u)).inlineScripts=!0===u.executeJs,i.inlineReferences(r,c).then(function(e){return u.executeJs?function(e,r){return t.executeJavascript(e,r).then(function(e){var t=e.document;return n.persistInputValues(t),{document:t,errors:e.errors,cleanUp:e.cleanUp}})}(r,u).then(function(t){return{element:t.document.documentElement,errors:e.concat(t.errors),cleanUp:t.cleanUp}}):{element:r,errors:e,cleanUp:function(){}}}).then(function(e){return s(e.element,o,u).then(function(t){return e.cleanUp(),{image:t.image,svg:t.svg,errors:e.errors}})})},u}(o,c,u,s,a,r);return function(e,t,n){"use strict";var r={};r.drawDocument=function(){var t=arguments[0],r=Array.prototype.slice.call(arguments,1),o=e.parseOptionalParameters(r),i=t.documentElement?t.documentElement:t;return n.rasterize(i,o.canvas,function(t){var n,r=function(e,t){var n=e?e.width:300,r=e?e.height:200;return{width:void 0!==t.width?t.width:n,height:void 0!==t.height?t.height:r}}(t.canvas,t.options);return(n=e.clone(t.options)).width=r.width,n.height=r.height,n}(o))};r.drawHTML=function(){var n=arguments[0],o=Array.prototype.slice.call(arguments,1),i=e.parseOptionalParameters(o);return function(e,n,o){var i=t.parseHTML(e);return r.drawDocument(i,n,o)}(n,i.canvas,i.options)};var o=function(n,o,i){return t.loadDocument(n,i).then(function(t){var u=function(t,n,r){var o=document.implementation.createHTMLDocument("");o.replaceChild(t.documentElement,o.documentElement);var i=r?e.clone(r):{};return r.baseUrl||(i.baseUrl=n),{document:o,options:i}}(t,n,i);return r.drawDocument(u.document,o,u.options)})};return r.drawURL=function(){var t=arguments[0],n=Array.prototype.slice.call(arguments,1),r=e.parseOptionalParameters(n);return o(t,r.canvas,r.options)},r}(o,c,l)});
|
|
265
|
+
},{"url":"j37I","xmlserializer":"JMLK","sane-domparser-error":"ZgwT","inlineresources":"hv1m"}],"vcNA":[function(require,module,exports) {
|
|
266
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var i={};if(null!=n)for(var o in n)"default"!==o&&Object.prototype.hasOwnProperty.call(n,o)&&e(i,n,o);return t(i,n),i};Object.defineProperty(exports,"__esModule",{value:!0}),exports.htmlToCanvas=exports.detectSize=void 0;const i=n(require("rasterizehtml")),o=2;function r(e){const t=document.createElement("div");t.innerHTML=e,t.style.display="inline-block",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.zIndex="1000",s.appendChild(t);const n=t.getBoundingClientRect();return s.removeChild(t),{width:n.width,height:n.height}}exports.detectSize=r;const s=document.createElement("div");async function l({html:e,width:t,height:n,fontFamily:o}){const r=document.createElement("canvas");e+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${o}" rel="stylesheet">'`,e+="<style>\n html, body {\n padding: 0;\n margin: 0;\n }\n p {\n margin: 0;\n padding: 0\n }\n ul {\n list-style-position: inside;\n margin: 0;\n }\n</style>";const s=await i.drawHTML(e,r,{width:t,height:n});r.width=2*t,r.height=2*n;const l=r.getContext("2d");return null==l||l.drawImage(s.image,0,0,2*s.image.width,2*s.image.height),r}s.style.overflow="hidden",s.style.position="relative",document.body.appendChild(s),exports.htmlToCanvas=l;
|
|
267
|
+
},{"rasterizehtml":"x2pr"}],"MEVn":[function(require,module,exports) {
|
|
268
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.styled=exports.setup=exports.keyframes=exports.glob=exports.extractCss=exports.css=void 0;let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,r=e=>{let r=t(e),s=r.data;return r.data="",s},s=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,o=/\/\*[^]*?\*\/|\s\s+|\n/g,l=(e,t)=>{let r="",s="",o="";for(let a in e){let n=e[a];"@"==a[0]?"i"==a[1]?r=a+" "+n+";":s+="f"==a[1]?l(n,a):a+"{"+l(n,"k"==a[1]?"":t)+"}":"object"==typeof n?s+=l(n,t?t.replace(/([^,])+/g,e=>a.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):a):null!=n&&(a=a.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=l.p?l.p(a,n):a+":"+n+";")}return r+(t&&o?t+"{"+o+"}":o)+s},a={},n=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+n(e[r]);return t}return e},p=(e,t,r,p,c)=>{let i=n(e),u=a[i]||(a[i]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(i));if(!a[u]){let t=i!==e?e:(e=>{let t,r=[{}];for(;t=s.exec(e.replace(o,""));)t[4]?r.shift():t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):r[0][t[1]]=t[2];return r[0]})(e);a[u]=l(c?{["@keyframes "+u]:t}:t,r?"":"."+u)}return((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(a[u],t,p),u},c=(e,t,r)=>e.reduce((e,s,o)=>{let a=t[o];if(a&&a.call){let e=a(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;a=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):!1===e?"":e}return e+s+(null==a?"":a)},"");function i(e){let r=this||{},s=e.call?e(r.p):e;return p(s.unshift?s.raw?c(s,[].slice.call(arguments,1),r.p):s.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):s,t(r.target),r.g,r.o,r.k)}exports.extractCss=r,exports.css=i;let u,d,f,g=i.bind({g:1}),x=i.bind({k:1});function b(e,t,r,s){l.p=t,u=e,d=r,f=s}function y(e,t){let r=this||{};return function(){let s=arguments;function o(l,a){let n=Object.assign({},l),p=n.className||o.className;r.p=Object.assign({theme:d&&d()},n),r.o=/ *go\d+/.test(p),n.className=i.apply(r,s)+(p?" "+p:""),t&&(n.ref=a);let c=e;return e[0]&&(c=n.as||e,delete n.as),f&&c[0]&&f(n),u(c,n)}return t?t(o):o}}exports.glob=g,exports.keyframes=x,exports.setup=b,exports.styled=y;
|
|
269
|
+
},{}],"PsiH":[function(require,module,exports) {
|
|
270
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const t=e(require("react")),r=require("./goober");(0,r.setup)(t.default.createElement),exports.default=r.styled;
|
|
271
|
+
},{"react":"HdMw","./goober":"MEVn"}],"BLZX":[function(require,module,exports) {
|
|
272
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(n){if(n&&n.__esModule)return n;var r={};if(null!=n)for(var i in n)"default"!==i&&Object.prototype.hasOwnProperty.call(n,i)&&e(r,n,i);return t(r,n),r},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTMLElement=exports.quillRef=void 0;const i=r(require("react")),l=require("mobx-react-lite"),o=require("react-konva"),a=r(require("quill/dist/quill")),s=n(require("mobx")),u=require("./apply-filters"),d=require("./text-element"),c=require("../utils/html2canvas"),f=require("./use-fadein"),g=require("./highlighter"),h=require("react-konva-utils"),m=r(require("../utils/styled"));exports.quillRef=s.observable({enabled:!1,currentFormat:{},editor:s.observable.object({instance:null},{},{deep:!1})});const y=(0,m.default)("div",i.default.forwardRef)`
|
|
273
|
+
.ql-editor {
|
|
274
|
+
outline: none;
|
|
275
|
+
}
|
|
276
|
+
ul {
|
|
277
|
+
list-style-position: inside;
|
|
278
|
+
margin: 0;
|
|
279
|
+
}
|
|
280
|
+
`,p=({html:e,onBlur:t,onChange:n,element:r})=>{const l=i.default.useRef(null);return i.default.useEffect(()=>{if(!l.current)return;const e=new a.default(l.current,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1}});return exports.quillRef.editor.instance=e,window.__polotnoQuill=e,e.on("text-change",()=>{var t;e.getSelection()&&(exports.quillRef.currentFormat=e.getFormat()),n(null===(t=l.current)||void 0===t?void 0:t.childNodes[0].innerHTML)}),e.setSelection(0,0,"api"),e.on("selection-change",n=>{n||t(),n&&(exports.quillRef.currentFormat=e.getFormat())}),l.current.childNodes[0].addEventListener("blur",e=>{var n;(null===(n=e.relatedTarget)||void 0===n?void 0:n.classList.contains("ql-clipboard"))||t()}),()=>{exports.quillRef.editor.instance=null,exports.quillRef.currentFormat={},delete window.__polotnoQuill}},[]),i.default.useEffect(()=>{var t;const n=exports.quillRef.editor.instance,i=n.getSelection();if((null===(t=l.current)||void 0===t?void 0:t.childNodes[0].innerHTML)!==r.text){var o=n.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+e+"<p><br></p></div>");n.setContents(o),n.history.clear(),i&&(n.setSelection(i.index,i.length),exports.quillRef.currentFormat=n.getFormat())}},[r.text]),i.default.createElement(y,{ref:l,style:{fontSize:r.fontSize,color:r.fill,width:r.width,fontFamily:r.fontFamily,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,textAlign:r.align}})};function x(e,t,n){return i.default.useMemo(()=>(0,c.detectSize)(e),[e,t.width,n])}exports.HTMLElement=(0,l.observer)(({element:e,store:t})=>{const n=i.default.useRef(null),[r,l]=i.default.useState(),[a,m]=i.default.useState(!1),[v,b]=i.default.useState(!0),[w,S]=i.default.useState(!1),[E,q]=i.default.useState(!1),F=t.selectedElements.indexOf(e)>=0,[_]=(0,d.useFontLoader)(t,e.fontFamily);(0,f.useFadeIn)(n);const k=`<div style="width: ${e.width||100}px; color: ${e.fill}; font-size: ${e.fontSize}px; font-family: '${e.fontFamily}'; text-align: ${e.align}; line-height: ${e.lineHeight}; letter-spacing: ${e.letterSpacing}; font-style: ${e.fontStyle}; font-weight: ${e.fontWeight}; -webkit-text-stroke: ${e.strokeWidth}px ${e.stroke}" contentEditable>${e.text}</div>`,{width:T,height:M}=x(k,e,_);i.default.useEffect(()=>{e.set({height:M})},[M]),i.default.useLayoutEffect(()=>{a||w||(b(!0),async function(){await new Promise(e=>setTimeout(e));const t=await(0,c.htmlToCanvas)({html:k,width:e.width||1,height:M||1,fontFamily:e.fontFamily});l(t),b(!1)}())},[k,a,M,w]),i.default.useLayoutEffect(()=>s.autorun(()=>{const t=n.current;(0,u.applyFilter)(t,e)}),[r]);const R=a||v;return i.default.createElement(i.default.Fragment,null,i.default.createElement(o.Image,{ref:n,name:"element",image:r,x:e.x,y:e.y,rotation:e.rotation,width:e.width,height:e.height,text:e.text,visible:!R,stroke:e.stroke,strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle,textDecoration:e.textDecoration,align:e.align,draggable:!e.locked,opacity:w?0:e.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,onMouseEnter:()=>{q(!0)},onMouseLeave:()=>{q(!1)},onDragStart:()=>{t.history.startTransaction()},onDragMove:t=>{setTimeout(()=>{e.set({x:t.target.x(),y:t.target.y()})})},onDragEnd:n=>{e.set({x:n.target.x(),y:n.target.y()}),t.history.endTransaction()},id:e.id,onDblClick:()=>{e.locked||S(!0)},onDblTap:()=>{e.locked||S(!0)},onTransformStart:e=>{var t;const n=(null===(t=e.target.getStage())||void 0===t?void 0:t.findOne("Transformer")).getActiveAnchor();("middle-left"===n||"middle-right"===n)&&m(!0)},onTransform:t=>{var n;const r=(null===(n=t.target.getStage())||void 0===n?void 0:n.findOne("Transformer")).getActiveAnchor();if("middle-left"===r||"middle-right"===r){const n=t.target.scaleX(),r=Math.max(t.target.width()*n,e.fontSize);t.target.width(r),t.target.scaleX(1),e.set({width:r})}e.set({x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})},onTransformEnd:t=>{m(!1),b(!0);const n=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({fontSize:e.fontSize*n,width:t.target.width()*n,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),R&&i.default.createElement(o.Group,{x:e.x,y:e.y,rotation:e.rotation},i.default.createElement(h.Html,{divProps:{style:{pointerEvents:"none"}}},i.default.createElement(y,{dangerouslySetInnerHTML:{__html:k},style:{pointerEvents:"none",display:"inline-block"}}))),w&&i.default.createElement(o.Group,{x:e.x,y:e.y,rotation:e.rotation},i.default.createElement(h.Html,null,i.default.createElement(p,{html:k,element:e,onChange:t=>{e.set({text:t})},onBlur:e=>{S(!1)}}))),(F||E)&&i.default.createElement(g.Highlighter,{element:e}))});
|
|
281
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug","quill/dist/quill":"qREC","mobx":"BzvP","./apply-filters":"SIWI","./text-element":"Fpgh","../utils/html2canvas":"vcNA","./use-fadein":"N3c2","./highlighter":"cEy1","react-konva-utils":"jXQU","../utils/styled":"PsiH"}],"XEPK":[function(require,module,exports) {
|
|
282
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.registerShapeComponent=void 0;const t=e(require("react")),r=require("mobx-react-lite"),n=require("./text-element"),l=require("./image-element"),o=require("./html-element"),i=require("../utils/flags"),m={text:n.TextElement,image:l.ImageElement,svg:l.ImageElement};function s(e,t){m[e]=t}exports.registerShapeComponent=s,exports.default=(0,r.observer)(e=>{let r=m[e.element.type];return"text"===e.element.type&&i.flags.htmlRenderEnabled&&(r=o.HTMLElement),e.element.visible?r?t.default.createElement(r,Object.assign({},e)):(console.error("Can not find component for "+e.element.type),null):null});
|
|
283
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","./text-element":"Fpgh","./image-element":"VbEp","./html-element":"BLZX","../utils/flags":"IDY9"}],"RXmf":[function(require,module,exports) {
|
|
284
|
+
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClientRect=void 0;const e=t(require("konva"));function i(t,e,i,n,a){const o=Math.sqrt(i*i+n*n);return a+=Math.atan2(n,i),{x:t+o*Math.cos(a),y:e+o*Math.sin(a)}}function n(t){const{x:n,y:a,width:o,height:r}=t,x=e.default.Util.degToRad(t.rotation),h=i(n,a,0,0,x),s=i(n,a,o,0,x),u=i(n,a,o,r,x),y=i(n,a,0,r,x),c=Math.min(h.x,s.x,u.x,y.x),d=Math.min(h.y,s.y,u.y,y.y),M=Math.max(h.x,s.x,u.x,y.x),l=Math.max(h.y,s.y,u.y,y.y);return{x:c,y:d,width:M-c,height:l-d,minX:c,minY:d,maxX:M,maxY:l}}exports.getClientRect=n;
|
|
285
|
+
},{"konva":"aTGn"}],"F86d":[function(require,module,exports) {
|
|
286
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useSnap=void 0;const t=e(require("react")),n=e(require("konva")),r=require("../utils/math");var i=5;function a(e){const t=e.__getNodeRect(),i=(0,r.getClientRect)(Object.assign(Object.assign({},t),{rotation:n.default.Util.radToDeg(t.rotation)})),a=e.getAbsolutePosition();return{vertical:[{guide:i.x,offset:a.x-i.x,snap:"start"},{guide:i.x+i.width/2,offset:a.x-i.x-i.width/2,snap:"center"},{guide:i.x+i.width,offset:a.x-i.x-i.width,snap:"end"}],horizontal:[{guide:i.y,offset:a.y-i.y,snap:"start"},{guide:i.y+i.height/2,offset:a.y-i.y-i.height/2,snap:"center"},{guide:i.y+i.height,offset:a.y-i.y-i.height,snap:"end"}]}}function s(e,t){var n=[],r=[];e.vertical.forEach(e=>{t.vertical.forEach(t=>{var r=Math.abs(e-t.guide);r<i&&n.push({lineGuide:e,diff:r,snap:t.snap,offset:t.offset})})}),e.horizontal.forEach(e=>{t.horizontal.forEach(t=>{var n=Math.abs(e-t.guide);n<i&&r.push({lineGuide:e,diff:n,snap:t.snap,offset:t.offset})})});var a=[];const s=n.sort((e,t)=>e.diff-t.diff),o=r.sort((e,t)=>e.diff-t.diff);var d=s[0],f=o[0];return d&&s.filter(e=>Math.abs(e.diff-d.diff)<.1).forEach(e=>{a.push(Object.assign({orientation:"V"},e))}),f&&o.filter(e=>Math.abs(e.diff-f.diff)<.1).forEach(e=>{a.push(Object.assign({orientation:"H"},e))}),a}function o(e){const r=e=>e.hasName("element")||e.hasName("page-background")||e.hasName("elements-area");function i(t){var n;const i=null===(n=e.current)||void 0===n?void 0:n.getStage();var a=[],s=[];return i.find(r).forEach(e=>{if(!(t.indexOf(e)>=0)){var n=e.getClientRect({skipShadow:!0,skipStroke:!0});a.push(n.x,n.x+n.width,n.x+n.width/2),s.push(n.y,n.y+n.height,n.y+n.height/2)}}),{vertical:a,horizontal:s}}function o(t){var r;const i=null===(r=e.current)||void 0===r?void 0:r.getLayer(),a=null==i?void 0:i.children.find(e=>"line-guides"===e.name());t.forEach(e=>{if("H"===e.orientation){var t=new n.default.Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});null==a||a.add(t),i.batchDraw()}else"V"===e.orientation&&(t=new n.default.Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),null==a||a.add(t))})}const d=e=>{e.target.getLayer().children.find(e=>"line-guides"===e.name()).destroyChildren();var t=s(i(e.target.nodes()),a(e.target));if(!t.length)return;o(t);const n=e.target.getAbsolutePosition(),r=Object.assign({},n);t.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":r.x=e.lineGuide+e.offset;break;case"H":r.y=e.lineGuide+e.offset}}});const d=r.x-n.x,f=r.y-n.y;e.evt.ctrlKey||e.evt.metaKey||e.target.nodes().forEach(e=>{const t=e.getAbsolutePosition();e.setAbsolutePosition({x:t.x+d,y:t.y+f})})},f=(t,n,r)=>{const a=e.current,d=a.getLayer();if(d.children.find(e=>"line-guides"===e.name()).destroyChildren(),"rotater"===a.getActiveAnchor())return n;if(Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))>50)return n;if(!d)return n;var f=s(i(a.nodes()),{vertical:[{guide:n.x,offset:0,snap:"start"}],horizontal:[{guide:n.y,offset:0,snap:"start"}]});if(!f.length)return n;if(o(f),r.ctrlKey||r.metaKey)return n;let u=n.x,c=n.x;f.forEach(e=>{switch(e.orientation){case"V":u=e.lineGuide;break;case"H":c=e.lineGuide}});const h=Math.abs(n.x-u)<10,l=Math.abs(n.y-c)<10;return h&&!l?{x:u,y:t.y}:l&&!h?{x:t.x,y:c}:h&&l?{x:u,y:c}:n},u=e=>{const t=e.target.getLayer();t.children.find(e=>"line-guides"===e.name()).destroyChildren(),t.batchDraw()};t.default.useEffect(()=>{e.current&&(e.current.anchorDragBoundFunc(f),e.current.on("dragstart",()=>{setTimeout(()=>{const e=[...n.default.DD._dragElements.entries()];e.reverse(),n.default.DD._dragElements.clear(),e.forEach(([e,t])=>{n.default.DD._dragElements.set(e,t)})})}),e.current.on("dragmove",d),e.current.on("dragend",u),e.current.on("transformend",u))},[])}exports.useSnap=o;
|
|
287
|
+
},{"react":"HdMw","konva":"aTGn","../utils/math":"RXmf"}],"hfHf":[function(require,module,exports) {
|
|
288
|
+
"use strict";function t(t,e,h="scale"){const i=e.width/e.height;let o,r;i>=t.width/t.height?(o=t.width,r=t.width/i):(o=t.height*i,r=t.height);let d=0,g=0;return"left-top"===h?(d=0,g=0):"left-middle"===h?(d=0,g=(t.height-r)/2):"left-bottom"===h?(d=0,g=t.height-r):"center-top"===h?(d=(t.width-o)/2,g=0):"center-middle"===h?(d=(t.width-o)/2,g=(t.height-r)/2):"center-bottom"===h?(d=(t.width-o)/2,g=t.height-r):"right-top"===h?(d=t.width-o,g=0):"right-middle"===h?(d=t.width-o,g=(t.height-r)/2):"right-bottom"===h?(d=t.width-o,g=t.height-r):"scale"===h?(d=0,g=0,o=t.width,r=t.height):console.error(new Error("Unknown clip position property - "+h)),{cropX:d,cropY:g,cropWidth:o,cropHeight:r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCrop=void 0,exports.getCrop=t;
|
|
289
|
+
},{}],"Qw3W":[function(require,module,exports) {
|
|
182
290
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Alignment=void 0;var e={CENTER:"center",LEFT:"left",RIGHT:"right"};exports.Alignment=e;
|
|
183
291
|
},{}],"SHM3":[function(require,module,exports) {
|
|
184
292
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Elevation=void 0;var e={ZERO:0,ONE:1,TWO:2,THREE:3,FOUR:4};exports.Elevation=e;
|
|
@@ -191,7 +299,7 @@ module.exports=function(e){var n={},t=require("object-assign"),r=require("react"
|
|
|
191
299
|
var t,e,n=module.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}function u(t){if(e===clearTimeout)return clearTimeout(t);if((e===o||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{return e(t)}catch(n){try{return e.call(null,t)}catch(n){return e.call(this,t)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(n){t=r}try{e="function"==typeof clearTimeout?clearTimeout:o}catch(n){e=o}}();var c,s=[],l=!1,a=-1;function f(){l&&c&&(l=!1,c.length?s=c.concat(s):a=-1,s.length&&h())}function h(){if(!l){var t=i(f);l=!0;for(var e=s.length;e;){for(c=s,s=[];++a<e;)c&&c[a].run();a=-1,e=s.length}c=null,l=!1,u(t)}}function m(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];s.push(new m(t,e)),1!==s.length||l||i(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0};
|
|
192
300
|
},{}],"A6xK":[function(require,module,exports) {
|
|
193
301
|
var process = require("process");
|
|
194
|
-
var r=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClassNamespace=Pt,exports.alignmentClass=Ct,exports.elevationClass=nt,exports.iconClass=it,exports.intentClass=lt,exports.positionClass=Ut,exports.INPUT_GHOST=exports.INPUT=exports.HTML_TABLE_STRIPED=exports.HTML_TABLE_CONDENSED=exports.HTML_TABLE_BORDERED=exports.HTML_TABLE=exports.SELECT=exports.HTML_SELECT=exports.FLEX_EXPANDER=exports.EDITABLE_TEXT_PLACEHOLDER=exports.EDITABLE_TEXT_INPUT=exports.EDITABLE_TEXT_EDITING=exports.EDITABLE_TEXT_CONTENT=exports.EDITABLE_TEXT=exports.DRAWER_HEADER=exports.DRAWER_FOOTER=exports.DRAWER_BODY=exports.DRAWER=exports.DIVIDER=exports.DIALOG_STEP_VIEWED=exports.DIALOG_STEP_ICON=exports.DIALOG_STEP_TITLE=exports.DIALOG_STEP_CONTAINER=exports.DIALOG_STEP=exports.DIALOG_HEADER=exports.DIALOG_FOOTER_ACTIONS=exports.DIALOG_FOOTER=exports.DIALOG_CLOSE_BUTTON=exports.DIALOG_BODY=exports.DIALOG_CONTAINER=exports.DIALOG=exports.CONTROL_GROUP=exports.CONTEXT_MENU_POPOVER_TARGET=exports.CONTEXT_MENU=exports.COLLAPSIBLE_LIST=exports.COLLAPSE_BODY=exports.COLLAPSE=exports.CARD=exports.CALLOUT_ICON=exports.CALLOUT=exports.BUTTON_TEXT=exports.BUTTON_SPINNER=exports.BUTTON_GROUP=exports.BUTTON=exports.BREADCRUMBS_COLLAPSED=exports.BREADCRUMBS=exports.BREADCRUMB_CURRENT=exports.BREADCRUMB=exports.ALERT_FOOTER=exports.ALERT_CONTENTS=exports.ALERT_BODY=exports.ALERT=exports.FIXED_POSITIONING_CONTAINING_BLOCK=exports.RTL=exports.LIST_UNSTYLED=exports.LIST=exports.HEADING=exports.CODE_BLOCK=exports.CODE=exports.BLOCKQUOTE=exports.TEXT_OVERFLOW_ELLIPSIS=exports.TEXT_DISABLED=exports.TEXT_MUTED=exports.TEXT_SMALL=exports.TEXT_LARGE=exports.MONOSPACE_TEXT=exports.RUNNING_TEXT=exports.UI_TEXT=exports.FOCUS_DISABLED=exports.INTENT_DANGER=exports.INTENT_WARNING=exports.INTENT_SUCCESS=exports.INTENT_PRIMARY=exports.ELEVATION_4=exports.ELEVATION_3=exports.ELEVATION_2=exports.ELEVATION_1=exports.ELEVATION_0=exports.POSITION_RIGHT=exports.POSITION_LEFT=exports.POSITION_BOTTOM=exports.POSITION_TOP=exports.VERTICAL=exports.SMALL=exports.ROUND=exports.MULTILINE=exports.OUTLINED=exports.MINIMAL=exports.LOADING=exports.LARGE=exports.INTERACTIVE=exports.INLINE=exports.FIXED_TOP=exports.FIXED=exports.FILL=exports.DISABLED=exports.DARK=exports.ALIGN_RIGHT=exports.ALIGN_LEFT=exports.ACTIVE=void 0,exports.TAG=exports.TABS=exports.TAB_PANEL=exports.TAB_LIST=exports.TAB_INDICATOR_WRAPPER=exports.TAB_INDICATOR=exports.TAB=exports.SPINNER_TRACK=exports.SPINNER_NO_SPIN=exports.SPINNER_HEAD=exports.SPINNER_ANIMATION=exports.SPINNER=exports.END=exports.START=exports.SLIDER_PROGRESS=exports.SLIDER_TRACK=exports.SLIDER_LABEL=exports.SLIDER_HANDLE=exports.SLIDER_AXIS=exports.SLIDER=exports.SKELETON=exports.PORTAL=exports.PROGRESS_NO_ANIMATION=exports.PROGRESS_NO_STRIPES=exports.PROGRESS_METER=exports.PROGRESS_BAR=exports.TRANSITION_CONTAINER=exports.POPOVER_WRAPPER=exports.POPOVER_TARGET=exports.POPOVER_OPEN=exports.POPOVER_DISMISS_OVERRIDE=exports.POPOVER_DISMISS=exports.POPOVER_CONTENT_SIZING=exports.POPOVER_CONTENT=exports.POPOVER_CAPTURING_DISMISS=exports.POPOVER_BACKDROP=exports.POPOVER_ARROW=exports.POPOVER=exports.PANEL_STACK2_VIEW=exports.PANEL_STACK2_HEADER_BACK=exports.PANEL_STACK2_HEADER=exports.PANEL_STACK2=exports.PANEL_STACK_VIEW=exports.PANEL_STACK_HEADER_BACK=exports.PANEL_STACK_HEADER=exports.PANEL_STACK=exports.OVERLAY_END_FOCUS_TRAP=exports.OVERLAY_START_FOCUS_TRAP=exports.OVERLAY_SCROLL_CONTAINER=exports.OVERLAY_OPEN=exports.OVERLAY_INLINE=exports.OVERLAY_CONTENT=exports.OVERLAY_CONTAINER=exports.OVERLAY_BACKDROP=exports.OVERLAY=exports.OVERFLOW_LIST_SPACER=exports.OVERFLOW_LIST=exports.NUMERIC_INPUT=exports.NON_IDEAL_STATE_VISUAL=exports.NON_IDEAL_STATE=exports.NAVBAR_DIVIDER=exports.NAVBAR_HEADING=exports.NAVBAR_GROUP=exports.NAVBAR=exports.MULTISTEP_DIALOG_FOOTER=exports.MULTISTEP_DIALOG_RIGHT_PANEL=exports.MULTISTEP_DIALOG_LEFT_PANEL=exports.MULTISTEP_DIALOG_PANELS=exports.MULTISTEP_DIALOG=exports.MENU_HEADER=exports.MENU_DIVIDER=exports.MENU_SUBMENU=exports.MENU_ITEM_LABEL=exports.MENU_ITEM=exports.MENU=exports.FORM_HELPER_TEXT=exports.FORM_CONTENT=exports.FORM_GROUP=exports.LABEL=exports.HOTKEY_DIALOG=exports.HOTKEY_COLUMN=exports.HOTKEY_LABEL=exports.HOTKEY=exports.MODIFIER_KEY=exports.KEY_COMBO=exports.KEY=exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT=exports.FILE_UPLOAD_INPUT=exports.FILE_INPUT_HAS_SELECTION=exports.FILE_INPUT=exports.SWITCH_INNER_TEXT=exports.SWITCH=exports.RADIO=exports.CHECKBOX=exports.CONTROL_INDICATOR_CHILD=exports.CONTROL_INDICATOR=exports.CONTROL=exports.INPUT_ACTION=exports.INPUT_LEFT_CONTAINER=exports.INPUT_GROUP=void 0,exports.ICON_LARGE=exports.ICON_STANDARD=exports.ICON=exports.TREE_ROOT=exports.TREE_NODE_SELECTED=exports.TREE_NODE_SECONDARY_LABEL=exports.TREE_NODE_LIST=exports.TREE_NODE_LABEL=exports.TREE_NODE_ICON=exports.TREE_NODE_EXPANDED=exports.TREE_NODE_CONTENT=exports.TREE_NODE_CARET_OPEN=exports.TREE_NODE_CARET_NONE=exports.TREE_NODE_CARET_CLOSED=exports.TREE_NODE_CARET=exports.TREE_NODE=exports.TREE=exports.TOOLTIP_INDICATOR=exports.TOOLTIP=exports.TOAST_MESSAGE=exports.TOAST_CONTAINER=exports.TOAST=exports.TAG_INPUT_VALUES=exports.TAG_INPUT_ICON=exports.TAG_INPUT=exports.TAG_REMOVE=void 0;var e,E,t,o,s=require("./alignment"),T=require("./elevation"),p=require("./intent"),_=require("./position"),x="bp3";void 0!==r&&(x=null!==(o=null!==(E=null===(e=r.env)||void 0===e?void 0:e.BLUEPRINT_NAMESPACE)&&void 0!==E?E:null===(t=r.env)||void 0===t?void 0:t.REACT_APP_BLUEPRINT_NAMESPACE)&&void 0!==o?o:x);var O=x+"-active";exports.ACTIVE=O;var A=x+"-align-left";exports.ALIGN_LEFT=A;var N=x+"-align-right";exports.ALIGN_RIGHT=N;var I=x+"-dark";exports.DARK=I;var R=x+"-disabled";exports.DISABLED=R;var a=x+"-fill";exports.FILL=a;var L=x+"-fixed";exports.FIXED=L;var v=x+"-fixed-top";exports.FIXED_TOP=v;var D=x+"-inline";exports.INLINE=D;var S=x+"-interactive";exports.INTERACTIVE=S;var P=x+"-large";exports.LARGE=P;var C=x+"-loading";exports.LOADING=C;var n=x+"-minimal";exports.MINIMAL=n;var i=x+"-outlined";exports.OUTLINED=i;var l=x+"-multiline";exports.MULTILINE=l;var U=x+"-round";exports.ROUND=U;var B=x+"-small";exports.SMALL=B;var G=x+"-vertical";exports.VERTICAL=G;var M=Ut(_.Position.TOP);exports.POSITION_TOP=M;var d=Ut(_.Position.BOTTOM);exports.POSITION_BOTTOM=d;var V=Ut(_.Position.LEFT);exports.POSITION_LEFT=V;var c=Ut(_.Position.RIGHT);exports.POSITION_RIGHT=c;var u=nt(T.Elevation.ZERO);exports.ELEVATION_0=u;var H=nt(T.Elevation.ONE);exports.ELEVATION_1=H;var F=nt(T.Elevation.TWO);exports.ELEVATION_2=F;var K=nt(T.Elevation.THREE);exports.ELEVATION_3=K;var X=nt(T.Elevation.FOUR);exports.ELEVATION_4=X;var Y=lt(p.Intent.PRIMARY);exports.INTENT_PRIMARY=Y;var f=lt(p.Intent.SUCCESS);exports.INTENT_SUCCESS=f;var g=lt(p.Intent.WARNING);exports.INTENT_WARNING=g;var b=lt(p.Intent.DANGER);exports.INTENT_DANGER=b;var m=x+"-focus-disabled";exports.FOCUS_DISABLED=m;var W=x+"-ui-text";exports.UI_TEXT=W;var h=x+"-running-text";exports.RUNNING_TEXT=h;var k=x+"-monospace-text";exports.MONOSPACE_TEXT=k;var w=x+"-text-large";exports.TEXT_LARGE=w;var y=x+"-text-small";exports.TEXT_SMALL=y;var q=x+"-text-muted";exports.TEXT_MUTED=q;var Z=x+"-text-disabled";exports.TEXT_DISABLED=Z;var Q=x+"-text-overflow-ellipsis";exports.TEXT_OVERFLOW_ELLIPSIS=Q;var j=x+"-blockquote";exports.BLOCKQUOTE=j;var z=x+"-code";exports.CODE=z;var J=x+"-code-block";exports.CODE_BLOCK=J;var $=x+"-heading";exports.HEADING=$;var rr=x+"-list";exports.LIST=rr;var er=x+"-list-unstyled";exports.LIST_UNSTYLED=er;var Er=x+"-rtl";exports.RTL=Er;var tr=x+"-fixed-positioning-containing-block";exports.FIXED_POSITIONING_CONTAINING_BLOCK=tr;var or=x+"-alert";exports.ALERT=or;var sr=or+"-body";exports.ALERT_BODY=sr;var Tr=or+"-contents";exports.ALERT_CONTENTS=Tr;var pr=or+"-footer";exports.ALERT_FOOTER=pr;var _r=x+"-breadcrumb";exports.BREADCRUMB=_r;var xr=_r+"-current";exports.BREADCRUMB_CURRENT=xr;var Or=_r+"s";exports.BREADCRUMBS=Or;var Ar=_r+"s-collapsed";exports.BREADCRUMBS_COLLAPSED=Ar;var Nr=x+"-button";exports.BUTTON=Nr;var Ir=Nr+"-group";exports.BUTTON_GROUP=Ir;var Rr=Nr+"-spinner";exports.BUTTON_SPINNER=Rr;var ar=Nr+"-text";exports.BUTTON_TEXT=ar;var Lr=x+"-callout";exports.CALLOUT=Lr;var vr=Lr+"-icon";exports.CALLOUT_ICON=vr;var Dr=x+"-card";exports.CARD=Dr;var Sr=x+"-collapse";exports.COLLAPSE=Sr;var Pr=Sr+"-body";exports.COLLAPSE_BODY=Pr;var Cr=x+"-collapse-list";exports.COLLAPSIBLE_LIST=Cr;var nr=x+"-context-menu";exports.CONTEXT_MENU=nr;var ir=nr+"-popover-target";exports.CONTEXT_MENU_POPOVER_TARGET=ir;var lr=x+"-control-group";exports.CONTROL_GROUP=lr;var Ur=x+"-dialog";exports.DIALOG=Ur;var Br=Ur+"-container";exports.DIALOG_CONTAINER=Br;var Gr=Ur+"-body";exports.DIALOG_BODY=Gr;var Mr=Ur+"-close-button";exports.DIALOG_CLOSE_BUTTON=Mr;var dr=Ur+"-footer";exports.DIALOG_FOOTER=dr;var Vr=Ur+"-footer-actions";exports.DIALOG_FOOTER_ACTIONS=Vr;var cr=Ur+"-header";exports.DIALOG_HEADER=cr;var ur=x+"-dialog-step";exports.DIALOG_STEP=ur;var Hr=ur+"-container";exports.DIALOG_STEP_CONTAINER=Hr;var Fr=ur+"-title";exports.DIALOG_STEP_TITLE=Fr;var Kr=ur+"-icon";exports.DIALOG_STEP_ICON=Kr;var Xr=ur+"-viewed";exports.DIALOG_STEP_VIEWED=Xr;var Yr=x+"-divider";exports.DIVIDER=Yr;var fr=x+"-drawer";exports.DRAWER=fr;var gr=fr+"-body";exports.DRAWER_BODY=gr;var br=fr+"-footer";exports.DRAWER_FOOTER=br;var mr=fr+"-header";exports.DRAWER_HEADER=mr;var Wr=x+"-editable-text";exports.EDITABLE_TEXT=Wr;var hr=Wr+"-content";exports.EDITABLE_TEXT_CONTENT=hr;var kr=Wr+"-editing";exports.EDITABLE_TEXT_EDITING=kr;var wr=Wr+"-input";exports.EDITABLE_TEXT_INPUT=wr;var yr=Wr+"-placeholder";exports.EDITABLE_TEXT_PLACEHOLDER=yr;var qr=x+"-flex-expander";exports.FLEX_EXPANDER=qr;var Zr=x+"-html-select";exports.HTML_SELECT=Zr;var Qr=x+"-select";exports.SELECT=Qr;var jr=x+"-html-table";exports.HTML_TABLE=jr;var zr=jr+"-bordered";exports.HTML_TABLE_BORDERED=zr;var Jr=jr+"-condensed";exports.HTML_TABLE_CONDENSED=Jr;var $r=jr+"-striped";exports.HTML_TABLE_STRIPED=$r;var re=x+"-input";exports.INPUT=re;var ee=re+"-ghost";exports.INPUT_GHOST=ee;var Ee=re+"-group";exports.INPUT_GROUP=Ee;var te=re+"-left-container";exports.INPUT_LEFT_CONTAINER=te;var oe=re+"-action";exports.INPUT_ACTION=oe;var se=x+"-control";exports.CONTROL=se;var Te=se+"-indicator";exports.CONTROL_INDICATOR=Te;var pe=Te+"-child";exports.CONTROL_INDICATOR_CHILD=pe;var _e=x+"-checkbox";exports.CHECKBOX=_e;var xe=x+"-radio";exports.RADIO=xe;var Oe=x+"-switch";exports.SWITCH=Oe;var Ae=Oe+"-inner-text";exports.SWITCH_INNER_TEXT=Ae;var Ne=x+"-file-input";exports.FILE_INPUT=Ne;var Ie=x+"-file-input-has-selection";exports.FILE_INPUT_HAS_SELECTION=Ie;var Re=x+"-file-upload-input";exports.FILE_UPLOAD_INPUT=Re;var ae=x+"-file-upload-input-custom-text";exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT=ae;var Le=x+"-key";exports.KEY=Le;var ve=Le+"-combo";exports.KEY_COMBO=ve;var De=x+"-modifier-key";exports.MODIFIER_KEY=De;var Se=x+"-hotkey";exports.HOTKEY=Se;var Pe=Se+"-label";exports.HOTKEY_LABEL=Pe;var Ce=Se+"-column";exports.HOTKEY_COLUMN=Ce;var ne=Se+"-dialog";exports.HOTKEY_DIALOG=ne;var ie=x+"-label";exports.LABEL=ie;var le=x+"-form-group";exports.FORM_GROUP=le;var Ue=x+"-form-content";exports.FORM_CONTENT=Ue;var Be=x+"-form-helper-text";exports.FORM_HELPER_TEXT=Be;var Ge=x+"-menu";exports.MENU=Ge;var Me=Ge+"-item";exports.MENU_ITEM=Me;var de=Me+"-label";exports.MENU_ITEM_LABEL=de;var Ve=x+"-submenu";exports.MENU_SUBMENU=Ve;var ce=Ge+"-divider";exports.MENU_DIVIDER=ce;var ue=Ge+"-header";exports.MENU_HEADER=ue;var He=x+"-multistep-dialog";exports.MULTISTEP_DIALOG=He;var Fe=He+"-panels";exports.MULTISTEP_DIALOG_PANELS=Fe;var Ke=He+"-left-panel";exports.MULTISTEP_DIALOG_LEFT_PANEL=Ke;var Xe=He+"-right-panel";exports.MULTISTEP_DIALOG_RIGHT_PANEL=Xe;var Ye=He+"-footer";exports.MULTISTEP_DIALOG_FOOTER=Ye;var fe=x+"-navbar";exports.NAVBAR=fe;var ge=fe+"-group";exports.NAVBAR_GROUP=ge;var be=fe+"-heading";exports.NAVBAR_HEADING=be;var me=fe+"-divider";exports.NAVBAR_DIVIDER=me;var We=x+"-non-ideal-state";exports.NON_IDEAL_STATE=We;var he=We+"-visual";exports.NON_IDEAL_STATE_VISUAL=he;var ke=x+"-numeric-input";exports.NUMERIC_INPUT=ke;var we=x+"-overflow-list";exports.OVERFLOW_LIST=we;var ye=we+"-spacer";exports.OVERFLOW_LIST_SPACER=ye;var qe=x+"-overlay";exports.OVERLAY=qe;var Ze=qe+"-backdrop";exports.OVERLAY_BACKDROP=Ze;var Qe=qe+"-container";exports.OVERLAY_CONTAINER=Qe;var je=qe+"-content";exports.OVERLAY_CONTENT=je;var ze=qe+"-inline";exports.OVERLAY_INLINE=ze;var Je=qe+"-open";exports.OVERLAY_OPEN=Je;var $e=qe+"-scroll-container";exports.OVERLAY_SCROLL_CONTAINER=$e;var rE=qe+"-start-focus-trap";exports.OVERLAY_START_FOCUS_TRAP=rE;var eE=qe+"-end-focus-trap";exports.OVERLAY_END_FOCUS_TRAP=eE;var EE=x+"-panel-stack";exports.PANEL_STACK=EE;var tE=EE+"-header";exports.PANEL_STACK_HEADER=tE;var oE=EE+"-header-back";exports.PANEL_STACK_HEADER_BACK=oE;var sE=EE+"-view";exports.PANEL_STACK_VIEW=sE;var TE=x+"-panel-stack2";exports.PANEL_STACK2=TE;var pE=EE+"-header";exports.PANEL_STACK2_HEADER=pE;var _E=EE+"-header-back";exports.PANEL_STACK2_HEADER_BACK=_E;var xE=EE+"-view";exports.PANEL_STACK2_VIEW=xE;var OE=x+"-popover";exports.POPOVER=OE;var AE=OE+"-arrow";exports.POPOVER_ARROW=AE;var NE=OE+"-backdrop";exports.POPOVER_BACKDROP=NE;var IE=OE+"-capturing-dismiss";exports.POPOVER_CAPTURING_DISMISS=IE;var RE=OE+"-content";exports.POPOVER_CONTENT=RE;var aE=RE+"-sizing";exports.POPOVER_CONTENT_SIZING=aE;var LE=OE+"-dismiss";exports.POPOVER_DISMISS=LE;var vE=LE+"-override";exports.POPOVER_DISMISS_OVERRIDE=vE;var DE=OE+"-open";exports.POPOVER_OPEN=DE;var SE=OE+"-target";exports.POPOVER_TARGET=SE;var PE=OE+"-wrapper";exports.POPOVER_WRAPPER=PE;var CE=x+"-transition-container";exports.TRANSITION_CONTAINER=CE;var nE=x+"-progress-bar";exports.PROGRESS_BAR=nE;var iE=x+"-progress-meter";exports.PROGRESS_METER=iE;var lE=x+"-no-stripes";exports.PROGRESS_NO_STRIPES=lE;var UE=x+"-no-animation";exports.PROGRESS_NO_ANIMATION=UE;var BE=x+"-portal";exports.PORTAL=BE;var GE=x+"-skeleton";exports.SKELETON=GE;var ME=x+"-slider";exports.SLIDER=ME;var dE=ME+"-axis";exports.SLIDER_AXIS=dE;var VE=ME+"-handle";exports.SLIDER_HANDLE=VE;var cE=ME+"-label";exports.SLIDER_LABEL=cE;var uE=ME+"-track";exports.SLIDER_TRACK=uE;var HE=ME+"-progress";exports.SLIDER_PROGRESS=HE;var FE=x+"-start";exports.START=FE;var KE=x+"-end";exports.END=KE;var XE=x+"-spinner";exports.SPINNER=XE;var YE=XE+"-animation";exports.SPINNER_ANIMATION=YE;var fE=XE+"-head";exports.SPINNER_HEAD=fE;var gE=x+"-no-spin";exports.SPINNER_NO_SPIN=gE;var bE=XE+"-track";exports.SPINNER_TRACK=bE;var mE=x+"-tab";exports.TAB=mE;var WE=mE+"-indicator";exports.TAB_INDICATOR=WE;var hE=WE+"-wrapper";exports.TAB_INDICATOR_WRAPPER=hE;var kE=mE+"-list";exports.TAB_LIST=kE;var wE=mE+"-panel";exports.TAB_PANEL=wE;var yE=mE+"s";exports.TABS=yE;var qE=x+"-tag";exports.TAG=qE;var ZE=qE+"-remove";exports.TAG_REMOVE=ZE;var QE=x+"-tag-input";exports.TAG_INPUT=QE;var jE=QE+"-icon";exports.TAG_INPUT_ICON=jE;var zE=QE+"-values";exports.TAG_INPUT_VALUES=zE;var JE=x+"-toast";exports.TOAST=JE;var $E=JE+"-container";exports.TOAST_CONTAINER=$E;var rt=JE+"-message";exports.TOAST_MESSAGE=rt;var et=x+"-tooltip";exports.TOOLTIP=et;var Et=et+"-indicator";exports.TOOLTIP_INDICATOR=Et;var tt=x+"-tree";exports.TREE=tt;var ot=x+"-tree-node";exports.TREE_NODE=ot;var st=ot+"-caret";exports.TREE_NODE_CARET=st;var Tt=st+"-closed";exports.TREE_NODE_CARET_CLOSED=Tt;var pt=st+"-none";exports.TREE_NODE_CARET_NONE=pt;var _t=st+"-open";exports.TREE_NODE_CARET_OPEN=_t;var xt=ot+"-content";exports.TREE_NODE_CONTENT=xt;var Ot=ot+"-expanded";exports.TREE_NODE_EXPANDED=Ot;var At=ot+"-icon";exports.TREE_NODE_ICON=At;var Nt=ot+"-label";exports.TREE_NODE_LABEL=Nt;var It=ot+"-list";exports.TREE_NODE_LIST=It;var Rt=ot+"-secondary-label";exports.TREE_NODE_SECONDARY_LABEL=Rt;var at=ot+"-selected";exports.TREE_NODE_SELECTED=at;var Lt=x+"-tree-root";exports.TREE_ROOT=Lt;var vt=x+"-icon";exports.ICON=vt;var Dt=vt+"-standard";exports.ICON_STANDARD=Dt;var St=vt+"-large";function Pt(){return x}function Ct(r){switch(r){case s.Alignment.LEFT:return A;case s.Alignment.RIGHT:return N;default:return}}function nt(r){if(void 0!==r)return x+"-elevation-"+r}function it(r){if(null!=r)return 0===r.indexOf(x+"-icon-")?r:x+"-icon-"+r}function lt(r){if(null!=r&&r!==p.Intent.NONE)return x+"-intent-"+r.toLowerCase()}function Ut(r){if(void 0!==r)return x+"-position-"+r}exports.ICON_LARGE=St;
|
|
302
|
+
var r=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClassNamespace=Ct,exports.alignmentClass=nt,exports.elevationClass=it,exports.iconClass=lt,exports.intentClass=Ut,exports.positionClass=Bt,exports.INPUT_GHOST=exports.INPUT=exports.HTML_TABLE_STRIPED=exports.HTML_TABLE_CONDENSED=exports.HTML_TABLE_BORDERED=exports.HTML_TABLE=exports.SELECT=exports.HTML_SELECT=exports.FLEX_EXPANDER=exports.EDITABLE_TEXT_PLACEHOLDER=exports.EDITABLE_TEXT_INPUT=exports.EDITABLE_TEXT_EDITING=exports.EDITABLE_TEXT_CONTENT=exports.EDITABLE_TEXT=exports.DRAWER_HEADER=exports.DRAWER_FOOTER=exports.DRAWER_BODY=exports.DRAWER=exports.DIVIDER=exports.DIALOG_STEP_VIEWED=exports.DIALOG_STEP_ICON=exports.DIALOG_STEP_TITLE=exports.DIALOG_STEP_CONTAINER=exports.DIALOG_STEP=exports.DIALOG_HEADER=exports.DIALOG_FOOTER_ACTIONS=exports.DIALOG_FOOTER=exports.DIALOG_CLOSE_BUTTON=exports.DIALOG_BODY=exports.DIALOG_CONTAINER=exports.DIALOG=exports.CONTROL_GROUP=exports.CONTEXT_MENU_POPOVER_TARGET=exports.CONTEXT_MENU=exports.COLLAPSIBLE_LIST=exports.COLLAPSE_BODY=exports.COLLAPSE=exports.CARD=exports.CALLOUT_ICON=exports.CALLOUT=exports.BUTTON_TEXT=exports.BUTTON_SPINNER=exports.BUTTON_GROUP=exports.BUTTON=exports.BREADCRUMBS_COLLAPSED=exports.BREADCRUMBS=exports.BREADCRUMB_CURRENT=exports.BREADCRUMB=exports.ALERT_FOOTER=exports.ALERT_CONTENTS=exports.ALERT_BODY=exports.ALERT=exports.FIXED_POSITIONING_CONTAINING_BLOCK=exports.RTL=exports.LIST_UNSTYLED=exports.LIST=exports.HEADING=exports.CODE_BLOCK=exports.CODE=exports.BLOCKQUOTE=exports.TEXT_OVERFLOW_ELLIPSIS=exports.TEXT_DISABLED=exports.TEXT_MUTED=exports.TEXT_SMALL=exports.TEXT_LARGE=exports.MONOSPACE_TEXT=exports.RUNNING_TEXT=exports.UI_TEXT=exports.FOCUS_DISABLED=exports.INTENT_DANGER=exports.INTENT_WARNING=exports.INTENT_SUCCESS=exports.INTENT_PRIMARY=exports.ELEVATION_4=exports.ELEVATION_3=exports.ELEVATION_2=exports.ELEVATION_1=exports.ELEVATION_0=exports.POSITION_RIGHT=exports.POSITION_LEFT=exports.POSITION_BOTTOM=exports.POSITION_TOP=exports.VERTICAL=exports.SMALL=exports.ROUND=exports.MULTILINE=exports.OUTLINED=exports.MINIMAL=exports.LOADING=exports.LARGE=exports.INTERACTIVE=exports.INLINE=exports.FIXED_TOP=exports.FIXED=exports.FILL=exports.DISABLED=exports.DARK=exports.ALIGN_RIGHT=exports.ALIGN_LEFT=exports.ACTIVE=void 0,exports.TABS=exports.TAB_PANEL=exports.TAB_LIST=exports.TAB_INDICATOR_WRAPPER=exports.TAB_INDICATOR=exports.TAB=exports.SPINNER_TRACK=exports.SPINNER_NO_SPIN=exports.SPINNER_HEAD=exports.SPINNER_ANIMATION=exports.SPINNER=exports.END=exports.START=exports.SLIDER_PROGRESS=exports.SLIDER_TRACK=exports.SLIDER_LABEL=exports.SLIDER_HANDLE=exports.SLIDER_AXIS=exports.SLIDER=exports.SKELETON=exports.PORTAL=exports.PROGRESS_NO_ANIMATION=exports.PROGRESS_NO_STRIPES=exports.PROGRESS_METER=exports.PROGRESS_BAR=exports.TRANSITION_CONTAINER=exports.POPOVER_WRAPPER=exports.POPOVER_TARGET=exports.POPOVER_OPEN=exports.POPOVER_DISMISS_OVERRIDE=exports.POPOVER_DISMISS=exports.POPOVER_CONTENT_SIZING=exports.POPOVER_CONTENT=exports.POPOVER_CAPTURING_DISMISS=exports.POPOVER_BACKDROP=exports.POPOVER_ARROW=exports.POPOVER=exports.PANEL_STACK2_VIEW=exports.PANEL_STACK2_HEADER_BACK=exports.PANEL_STACK2_HEADER=exports.PANEL_STACK2=exports.PANEL_STACK_VIEW=exports.PANEL_STACK_HEADER_BACK=exports.PANEL_STACK_HEADER=exports.PANEL_STACK=exports.OVERLAY_END_FOCUS_TRAP=exports.OVERLAY_START_FOCUS_TRAP=exports.OVERLAY_SCROLL_CONTAINER=exports.OVERLAY_OPEN=exports.OVERLAY_INLINE=exports.OVERLAY_CONTENT=exports.OVERLAY_CONTAINER=exports.OVERLAY_BACKDROP=exports.OVERLAY=exports.OVERFLOW_LIST_SPACER=exports.OVERFLOW_LIST=exports.NUMERIC_INPUT=exports.NON_IDEAL_STATE_VISUAL=exports.NON_IDEAL_STATE=exports.NAVBAR_DIVIDER=exports.NAVBAR_HEADING=exports.NAVBAR_GROUP=exports.NAVBAR=exports.MULTISTEP_DIALOG_FOOTER=exports.MULTISTEP_DIALOG_RIGHT_PANEL=exports.MULTISTEP_DIALOG_LEFT_PANEL=exports.MULTISTEP_DIALOG_PANELS=exports.MULTISTEP_DIALOG=exports.MENU_HEADER=exports.MENU_DIVIDER=exports.MENU_SUBMENU=exports.MENU_ITEM_LABEL=exports.MENU_ITEM=exports.MENU=exports.FORM_GROUP_SUB_LABEL=exports.FORM_HELPER_TEXT=exports.FORM_CONTENT=exports.FORM_GROUP=exports.LABEL=exports.HOTKEY_DIALOG=exports.HOTKEY_COLUMN=exports.HOTKEY_LABEL=exports.HOTKEY=exports.MODIFIER_KEY=exports.KEY_COMBO=exports.KEY=exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT=exports.FILE_UPLOAD_INPUT=exports.FILE_INPUT_HAS_SELECTION=exports.FILE_INPUT=exports.SWITCH_INNER_TEXT=exports.SWITCH=exports.RADIO=exports.CHECKBOX=exports.CONTROL_INDICATOR_CHILD=exports.CONTROL_INDICATOR=exports.CONTROL=exports.INPUT_ACTION=exports.INPUT_LEFT_CONTAINER=exports.INPUT_GROUP=void 0,exports.ICON_LARGE=exports.ICON_STANDARD=exports.ICON=exports.TREE_ROOT=exports.TREE_NODE_SELECTED=exports.TREE_NODE_SECONDARY_LABEL=exports.TREE_NODE_LIST=exports.TREE_NODE_LABEL=exports.TREE_NODE_ICON=exports.TREE_NODE_EXPANDED=exports.TREE_NODE_CONTENT=exports.TREE_NODE_CARET_OPEN=exports.TREE_NODE_CARET_NONE=exports.TREE_NODE_CARET_CLOSED=exports.TREE_NODE_CARET=exports.TREE_NODE=exports.TREE=exports.TOOLTIP_INDICATOR=exports.TOOLTIP=exports.TOAST_MESSAGE=exports.TOAST_CONTAINER=exports.TOAST=exports.TAG_INPUT_VALUES=exports.TAG_INPUT_ICON=exports.TAG_INPUT=exports.TAG_REMOVE=exports.TAG=void 0;var e,E,t,o,s=require("./alignment"),T=require("./elevation"),p=require("./intent"),_=require("./position"),x="bp3";void 0!==r&&(x=null!==(o=null!==(E=null===(e=r.env)||void 0===e?void 0:e.BLUEPRINT_NAMESPACE)&&void 0!==E?E:null===(t=r.env)||void 0===t?void 0:t.REACT_APP_BLUEPRINT_NAMESPACE)&&void 0!==o?o:x);var O=x+"-active";exports.ACTIVE=O;var A=x+"-align-left";exports.ALIGN_LEFT=A;var N=x+"-align-right";exports.ALIGN_RIGHT=N;var I=x+"-dark";exports.DARK=I;var R=x+"-disabled";exports.DISABLED=R;var a=x+"-fill";exports.FILL=a;var L=x+"-fixed";exports.FIXED=L;var v=x+"-fixed-top";exports.FIXED_TOP=v;var D=x+"-inline";exports.INLINE=D;var S=x+"-interactive";exports.INTERACTIVE=S;var P=x+"-large";exports.LARGE=P;var C=x+"-loading";exports.LOADING=C;var n=x+"-minimal";exports.MINIMAL=n;var i=x+"-outlined";exports.OUTLINED=i;var l=x+"-multiline";exports.MULTILINE=l;var U=x+"-round";exports.ROUND=U;var B=x+"-small";exports.SMALL=B;var G=x+"-vertical";exports.VERTICAL=G;var M=Bt(_.Position.TOP);exports.POSITION_TOP=M;var d=Bt(_.Position.BOTTOM);exports.POSITION_BOTTOM=d;var V=Bt(_.Position.LEFT);exports.POSITION_LEFT=V;var c=Bt(_.Position.RIGHT);exports.POSITION_RIGHT=c;var u=it(T.Elevation.ZERO);exports.ELEVATION_0=u;var H=it(T.Elevation.ONE);exports.ELEVATION_1=H;var F=it(T.Elevation.TWO);exports.ELEVATION_2=F;var K=it(T.Elevation.THREE);exports.ELEVATION_3=K;var X=it(T.Elevation.FOUR);exports.ELEVATION_4=X;var Y=Ut(p.Intent.PRIMARY);exports.INTENT_PRIMARY=Y;var f=Ut(p.Intent.SUCCESS);exports.INTENT_SUCCESS=f;var g=Ut(p.Intent.WARNING);exports.INTENT_WARNING=g;var b=Ut(p.Intent.DANGER);exports.INTENT_DANGER=b;var m=x+"-focus-disabled";exports.FOCUS_DISABLED=m;var W=x+"-ui-text";exports.UI_TEXT=W;var h=x+"-running-text";exports.RUNNING_TEXT=h;var k=x+"-monospace-text";exports.MONOSPACE_TEXT=k;var w=x+"-text-large";exports.TEXT_LARGE=w;var y=x+"-text-small";exports.TEXT_SMALL=y;var q=x+"-text-muted";exports.TEXT_MUTED=q;var Z=x+"-text-disabled";exports.TEXT_DISABLED=Z;var Q=x+"-text-overflow-ellipsis";exports.TEXT_OVERFLOW_ELLIPSIS=Q;var j=x+"-blockquote";exports.BLOCKQUOTE=j;var z=x+"-code";exports.CODE=z;var J=x+"-code-block";exports.CODE_BLOCK=J;var $=x+"-heading";exports.HEADING=$;var rr=x+"-list";exports.LIST=rr;var er=x+"-list-unstyled";exports.LIST_UNSTYLED=er;var Er=x+"-rtl";exports.RTL=Er;var tr=x+"-fixed-positioning-containing-block";exports.FIXED_POSITIONING_CONTAINING_BLOCK=tr;var or=x+"-alert";exports.ALERT=or;var sr=or+"-body";exports.ALERT_BODY=sr;var Tr=or+"-contents";exports.ALERT_CONTENTS=Tr;var pr=or+"-footer";exports.ALERT_FOOTER=pr;var _r=x+"-breadcrumb";exports.BREADCRUMB=_r;var xr=_r+"-current";exports.BREADCRUMB_CURRENT=xr;var Or=_r+"s";exports.BREADCRUMBS=Or;var Ar=_r+"s-collapsed";exports.BREADCRUMBS_COLLAPSED=Ar;var Nr=x+"-button";exports.BUTTON=Nr;var Ir=Nr+"-group";exports.BUTTON_GROUP=Ir;var Rr=Nr+"-spinner";exports.BUTTON_SPINNER=Rr;var ar=Nr+"-text";exports.BUTTON_TEXT=ar;var Lr=x+"-callout";exports.CALLOUT=Lr;var vr=Lr+"-icon";exports.CALLOUT_ICON=vr;var Dr=x+"-card";exports.CARD=Dr;var Sr=x+"-collapse";exports.COLLAPSE=Sr;var Pr=Sr+"-body";exports.COLLAPSE_BODY=Pr;var Cr=x+"-collapse-list";exports.COLLAPSIBLE_LIST=Cr;var nr=x+"-context-menu";exports.CONTEXT_MENU=nr;var ir=nr+"-popover-target";exports.CONTEXT_MENU_POPOVER_TARGET=ir;var lr=x+"-control-group";exports.CONTROL_GROUP=lr;var Ur=x+"-dialog";exports.DIALOG=Ur;var Br=Ur+"-container";exports.DIALOG_CONTAINER=Br;var Gr=Ur+"-body";exports.DIALOG_BODY=Gr;var Mr=Ur+"-close-button";exports.DIALOG_CLOSE_BUTTON=Mr;var dr=Ur+"-footer";exports.DIALOG_FOOTER=dr;var Vr=Ur+"-footer-actions";exports.DIALOG_FOOTER_ACTIONS=Vr;var cr=Ur+"-header";exports.DIALOG_HEADER=cr;var ur=x+"-dialog-step";exports.DIALOG_STEP=ur;var Hr=ur+"-container";exports.DIALOG_STEP_CONTAINER=Hr;var Fr=ur+"-title";exports.DIALOG_STEP_TITLE=Fr;var Kr=ur+"-icon";exports.DIALOG_STEP_ICON=Kr;var Xr=ur+"-viewed";exports.DIALOG_STEP_VIEWED=Xr;var Yr=x+"-divider";exports.DIVIDER=Yr;var fr=x+"-drawer";exports.DRAWER=fr;var gr=fr+"-body";exports.DRAWER_BODY=gr;var br=fr+"-footer";exports.DRAWER_FOOTER=br;var mr=fr+"-header";exports.DRAWER_HEADER=mr;var Wr=x+"-editable-text";exports.EDITABLE_TEXT=Wr;var hr=Wr+"-content";exports.EDITABLE_TEXT_CONTENT=hr;var kr=Wr+"-editing";exports.EDITABLE_TEXT_EDITING=kr;var wr=Wr+"-input";exports.EDITABLE_TEXT_INPUT=wr;var yr=Wr+"-placeholder";exports.EDITABLE_TEXT_PLACEHOLDER=yr;var qr=x+"-flex-expander";exports.FLEX_EXPANDER=qr;var Zr=x+"-html-select";exports.HTML_SELECT=Zr;var Qr=x+"-select";exports.SELECT=Qr;var jr=x+"-html-table";exports.HTML_TABLE=jr;var zr=jr+"-bordered";exports.HTML_TABLE_BORDERED=zr;var Jr=jr+"-condensed";exports.HTML_TABLE_CONDENSED=Jr;var $r=jr+"-striped";exports.HTML_TABLE_STRIPED=$r;var re=x+"-input";exports.INPUT=re;var ee=re+"-ghost";exports.INPUT_GHOST=ee;var Ee=re+"-group";exports.INPUT_GROUP=Ee;var te=re+"-left-container";exports.INPUT_LEFT_CONTAINER=te;var oe=re+"-action";exports.INPUT_ACTION=oe;var se=x+"-control";exports.CONTROL=se;var Te=se+"-indicator";exports.CONTROL_INDICATOR=Te;var pe=Te+"-child";exports.CONTROL_INDICATOR_CHILD=pe;var _e=x+"-checkbox";exports.CHECKBOX=_e;var xe=x+"-radio";exports.RADIO=xe;var Oe=x+"-switch";exports.SWITCH=Oe;var Ae=Oe+"-inner-text";exports.SWITCH_INNER_TEXT=Ae;var Ne=x+"-file-input";exports.FILE_INPUT=Ne;var Ie=x+"-file-input-has-selection";exports.FILE_INPUT_HAS_SELECTION=Ie;var Re=x+"-file-upload-input";exports.FILE_UPLOAD_INPUT=Re;var ae=x+"-file-upload-input-custom-text";exports.FILE_UPLOAD_INPUT_CUSTOM_TEXT=ae;var Le=x+"-key";exports.KEY=Le;var ve=Le+"-combo";exports.KEY_COMBO=ve;var De=x+"-modifier-key";exports.MODIFIER_KEY=De;var Se=x+"-hotkey";exports.HOTKEY=Se;var Pe=Se+"-label";exports.HOTKEY_LABEL=Pe;var Ce=Se+"-column";exports.HOTKEY_COLUMN=Ce;var ne=Se+"-dialog";exports.HOTKEY_DIALOG=ne;var ie=x+"-label";exports.LABEL=ie;var le=x+"-form-group";exports.FORM_GROUP=le;var Ue=x+"-form-content";exports.FORM_CONTENT=Ue;var Be=x+"-form-helper-text";exports.FORM_HELPER_TEXT=Be;var Ge=x+"-form-group-sub-label";exports.FORM_GROUP_SUB_LABEL=Ge;var Me=x+"-menu";exports.MENU=Me;var de=Me+"-item";exports.MENU_ITEM=de;var Ve=de+"-label";exports.MENU_ITEM_LABEL=Ve;var ce=x+"-submenu";exports.MENU_SUBMENU=ce;var ue=Me+"-divider";exports.MENU_DIVIDER=ue;var He=Me+"-header";exports.MENU_HEADER=He;var Fe=x+"-multistep-dialog";exports.MULTISTEP_DIALOG=Fe;var Ke=Fe+"-panels";exports.MULTISTEP_DIALOG_PANELS=Ke;var Xe=Fe+"-left-panel";exports.MULTISTEP_DIALOG_LEFT_PANEL=Xe;var Ye=Fe+"-right-panel";exports.MULTISTEP_DIALOG_RIGHT_PANEL=Ye;var fe=Fe+"-footer";exports.MULTISTEP_DIALOG_FOOTER=fe;var ge=x+"-navbar";exports.NAVBAR=ge;var be=ge+"-group";exports.NAVBAR_GROUP=be;var me=ge+"-heading";exports.NAVBAR_HEADING=me;var We=ge+"-divider";exports.NAVBAR_DIVIDER=We;var he=x+"-non-ideal-state";exports.NON_IDEAL_STATE=he;var ke=he+"-visual";exports.NON_IDEAL_STATE_VISUAL=ke;var we=x+"-numeric-input";exports.NUMERIC_INPUT=we;var ye=x+"-overflow-list";exports.OVERFLOW_LIST=ye;var qe=ye+"-spacer";exports.OVERFLOW_LIST_SPACER=qe;var Ze=x+"-overlay";exports.OVERLAY=Ze;var Qe=Ze+"-backdrop";exports.OVERLAY_BACKDROP=Qe;var je=Ze+"-container";exports.OVERLAY_CONTAINER=je;var ze=Ze+"-content";exports.OVERLAY_CONTENT=ze;var Je=Ze+"-inline";exports.OVERLAY_INLINE=Je;var $e=Ze+"-open";exports.OVERLAY_OPEN=$e;var rE=Ze+"-scroll-container";exports.OVERLAY_SCROLL_CONTAINER=rE;var eE=Ze+"-start-focus-trap";exports.OVERLAY_START_FOCUS_TRAP=eE;var EE=Ze+"-end-focus-trap";exports.OVERLAY_END_FOCUS_TRAP=EE;var tE=x+"-panel-stack";exports.PANEL_STACK=tE;var oE=tE+"-header";exports.PANEL_STACK_HEADER=oE;var sE=tE+"-header-back";exports.PANEL_STACK_HEADER_BACK=sE;var TE=tE+"-view";exports.PANEL_STACK_VIEW=TE;var pE=x+"-panel-stack2";exports.PANEL_STACK2=pE;var _E=tE+"-header";exports.PANEL_STACK2_HEADER=_E;var xE=tE+"-header-back";exports.PANEL_STACK2_HEADER_BACK=xE;var OE=tE+"-view";exports.PANEL_STACK2_VIEW=OE;var AE=x+"-popover";exports.POPOVER=AE;var NE=AE+"-arrow";exports.POPOVER_ARROW=NE;var IE=AE+"-backdrop";exports.POPOVER_BACKDROP=IE;var RE=AE+"-capturing-dismiss";exports.POPOVER_CAPTURING_DISMISS=RE;var aE=AE+"-content";exports.POPOVER_CONTENT=aE;var LE=aE+"-sizing";exports.POPOVER_CONTENT_SIZING=LE;var vE=AE+"-dismiss";exports.POPOVER_DISMISS=vE;var DE=vE+"-override";exports.POPOVER_DISMISS_OVERRIDE=DE;var SE=AE+"-open";exports.POPOVER_OPEN=SE;var PE=AE+"-target";exports.POPOVER_TARGET=PE;var CE=AE+"-wrapper";exports.POPOVER_WRAPPER=CE;var nE=x+"-transition-container";exports.TRANSITION_CONTAINER=nE;var iE=x+"-progress-bar";exports.PROGRESS_BAR=iE;var lE=x+"-progress-meter";exports.PROGRESS_METER=lE;var UE=x+"-no-stripes";exports.PROGRESS_NO_STRIPES=UE;var BE=x+"-no-animation";exports.PROGRESS_NO_ANIMATION=BE;var GE=x+"-portal";exports.PORTAL=GE;var ME=x+"-skeleton";exports.SKELETON=ME;var dE=x+"-slider";exports.SLIDER=dE;var VE=dE+"-axis";exports.SLIDER_AXIS=VE;var cE=dE+"-handle";exports.SLIDER_HANDLE=cE;var uE=dE+"-label";exports.SLIDER_LABEL=uE;var HE=dE+"-track";exports.SLIDER_TRACK=HE;var FE=dE+"-progress";exports.SLIDER_PROGRESS=FE;var KE=x+"-start";exports.START=KE;var XE=x+"-end";exports.END=XE;var YE=x+"-spinner";exports.SPINNER=YE;var fE=YE+"-animation";exports.SPINNER_ANIMATION=fE;var gE=YE+"-head";exports.SPINNER_HEAD=gE;var bE=x+"-no-spin";exports.SPINNER_NO_SPIN=bE;var mE=YE+"-track";exports.SPINNER_TRACK=mE;var WE=x+"-tab";exports.TAB=WE;var hE=WE+"-indicator";exports.TAB_INDICATOR=hE;var kE=hE+"-wrapper";exports.TAB_INDICATOR_WRAPPER=kE;var wE=WE+"-list";exports.TAB_LIST=wE;var yE=WE+"-panel";exports.TAB_PANEL=yE;var qE=WE+"s";exports.TABS=qE;var ZE=x+"-tag";exports.TAG=ZE;var QE=ZE+"-remove";exports.TAG_REMOVE=QE;var jE=x+"-tag-input";exports.TAG_INPUT=jE;var zE=jE+"-icon";exports.TAG_INPUT_ICON=zE;var JE=jE+"-values";exports.TAG_INPUT_VALUES=JE;var $E=x+"-toast";exports.TOAST=$E;var rt=$E+"-container";exports.TOAST_CONTAINER=rt;var et=$E+"-message";exports.TOAST_MESSAGE=et;var Et=x+"-tooltip";exports.TOOLTIP=Et;var tt=Et+"-indicator";exports.TOOLTIP_INDICATOR=tt;var ot=x+"-tree";exports.TREE=ot;var st=x+"-tree-node";exports.TREE_NODE=st;var Tt=st+"-caret";exports.TREE_NODE_CARET=Tt;var pt=Tt+"-closed";exports.TREE_NODE_CARET_CLOSED=pt;var _t=Tt+"-none";exports.TREE_NODE_CARET_NONE=_t;var xt=Tt+"-open";exports.TREE_NODE_CARET_OPEN=xt;var Ot=st+"-content";exports.TREE_NODE_CONTENT=Ot;var At=st+"-expanded";exports.TREE_NODE_EXPANDED=At;var Nt=st+"-icon";exports.TREE_NODE_ICON=Nt;var It=st+"-label";exports.TREE_NODE_LABEL=It;var Rt=st+"-list";exports.TREE_NODE_LIST=Rt;var at=st+"-secondary-label";exports.TREE_NODE_SECONDARY_LABEL=at;var Lt=st+"-selected";exports.TREE_NODE_SELECTED=Lt;var vt=x+"-tree-root";exports.TREE_ROOT=vt;var Dt=x+"-icon";exports.ICON=Dt;var St=Dt+"-standard";exports.ICON_STANDARD=St;var Pt=Dt+"-large";function Ct(){return x}function nt(r){switch(r){case s.Alignment.LEFT:return A;case s.Alignment.RIGHT:return N;default:return}}function it(r){if(void 0!==r)return x+"-elevation-"+r}function lt(r){if(null!=r)return 0===r.indexOf(x+"-icon-")?r:x+"-icon-"+r}function Ut(r){if(null!=r&&r!==p.Intent.NONE)return x+"-intent-"+r.toLowerCase()}function Bt(r){if(void 0!==r)return x+"-position-"+r}exports.ICON_LARGE=Pt;
|
|
195
303
|
},{"./alignment":"Qw3W","./elevation":"SHM3","./intent":"RoRb","./position":"SX4S","process":"g5IB"}],"lYXs":[function(require,module,exports) {
|
|
196
304
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InteractionModeEngine=void 0;var n=9,e=function(){function e(e,t){var i=this;this.container=e,this.className=t,this.isRunning=!1,this.handleKeyDown=function(e){e.which===n&&(i.reset(),i.container.addEventListener("mousedown",i.handleMouseDown))},this.handleMouseDown=function(){i.reset(),i.container.classList.add(i.className),i.container.addEventListener("keydown",i.handleKeyDown)}}return e.prototype.isActive=function(){return this.isRunning},e.prototype.start=function(){this.container.addEventListener("mousedown",this.handleMouseDown),this.isRunning=!0},e.prototype.stop=function(){this.reset(),this.isRunning=!1},e.prototype.reset=function(){this.container.classList.remove(this.className),this.container.removeEventListener("keydown",this.handleKeyDown),this.container.removeEventListener("mousedown",this.handleMouseDown)},e}();exports.InteractionModeEngine=e;
|
|
197
305
|
},{}],"DsLe":[function(require,module,exports) {
|
|
@@ -462,7 +570,7 @@ var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
462
570
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/props":"hCEs"}],"h4eK":[function(require,module,exports) {
|
|
463
571
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileInput=void 0;var e=require("tslib"),t=u(require("classnames")),n=o(require("react")),r=require("react-lifecycles-compat"),s=require("../../common"),a=require("../../common/props");function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=s?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function u(e){return e&&e.__esModule?e:{default:e}}var i=function(l){function o(){var e=null!==l&&l.apply(this,arguments)||this;return e.handleInputChange=function(t){var n,r,s,a;null===(r=(n=e.props).onInputChange)||void 0===r||r.call(n,t),null===(a=null===(s=e.props.inputProps)||void 0===s?void 0:s.onChange)||void 0===a||a.call(s,t)},e}return(0,e.__extends)(o,l),o.prototype.render=function(){var r,a,l,o=this.props,u=o.buttonText,i=o.className,p=o.disabled,c=o.fill,f=o.hasSelection,d=o.inputProps,_=o.large,I=(o.onInputChange,o.text),C=(0,e.__rest)(o,["buttonText","className","disabled","fill","hasSelection","inputProps","large","onInputChange","text"]),P=(0,t.default)(s.Classes.FILE_INPUT,((r={})[s.Classes.FILE_INPUT_HAS_SELECTION]=f,r[s.Classes.DISABLED]=p,r[s.Classes.FILL]=c,r[s.Classes.LARGE]=_,r),i),h=((a={})[s.Classes.getClassNamespace()+"-button-text"]=u,a.className=(0,t.default)(s.Classes.FILE_UPLOAD_INPUT,((l={})[s.Classes.FILE_UPLOAD_INPUT_CUSTOM_TEXT]=!!u,l)),a);return n.createElement("label",(0,e.__assign)({},C,{className:P}),n.createElement("input",(0,e.__assign)({},d,{onChange:this.handleInputChange,type:"file",disabled:p})),n.createElement("span",(0,e.__assign)({},h),I))},o.displayName=a.DISPLAYNAME_PREFIX+".FileInput",o.defaultProps={hasSelection:!1,inputProps:{},text:"Choose file..."},o=(0,e.__decorate)([r.polyfill],o)}(s.AbstractPureComponent2);exports.FileInput=i;
|
|
464
572
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/props":"hCEs"}],"lLhU":[function(require,module,exports) {
|
|
465
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormGroup=void 0;var e=require("tslib"),t=i(require("classnames")),r=o(require("react")),s=require("react-lifecycles-compat"),a=require("../../common"),
|
|
573
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FormGroup=void 0;var e=require("tslib"),t=i(require("classnames")),r=o(require("react")),s=require("react-lifecycles-compat"),a=require("../../common"),l=require("../../common/props");function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var s={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var o=a?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(s,l,o):s[l]=e[l]}return s.default=e,r&&r.set(e,s),s}function i(e){return e&&e.__esModule?e:{default:e}}var u=function(n){function o(){return null!==n&&n.apply(this,arguments)||this}return(0,e.__extends)(o,n),o.prototype.render=function(){var e=this.props,s=e.children,l=e.contentClassName,n=e.helperText,o=e.label,i=e.labelFor,u=e.labelInfo,c=e.style,p=e.subLabel;return r.createElement("div",{className:this.getClassName(),style:c},o&&r.createElement("label",{className:a.Classes.LABEL,htmlFor:i},o," ",r.createElement("span",{className:a.Classes.TEXT_MUTED},u)),p&&r.createElement("div",{className:a.Classes.FORM_GROUP_SUB_LABEL},p),r.createElement("div",{className:(0,t.default)(a.Classes.FORM_CONTENT,l)},s,n&&r.createElement("div",{className:a.Classes.FORM_HELPER_TEXT},n)))},o.prototype.getClassName=function(){var e,r=this.props,s=r.className,l=r.disabled,n=r.inline,o=r.intent;return(0,t.default)(a.Classes.FORM_GROUP,a.Classes.intentClass(o),((e={})[a.Classes.DISABLED]=l,e[a.Classes.INLINE]=n,e),s)},o.displayName=l.DISPLAYNAME_PREFIX+".FormGroup",o=(0,e.__decorate)([s.polyfill],o)}(a.AbstractPureComponent2);exports.FormGroup=u;
|
|
466
574
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/props":"hCEs"}],"a1Ju":[function(require,module,exports) {
|
|
467
575
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AsyncControllableInput=void 0;var e=require("tslib"),t=r(require("react")),n=require("react-lifecycles-compat"),a=require("../../common/props");function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(o=function(e){return e?n:t})(e)}function r(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=o(t);if(n&&n.has(e))return n.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}var l=function(o){function r(){var e=null!==o&&o.apply(this,arguments)||this;return e.state={hasPendingUpdate:!1,isComposing:!1,nextValue:e.props.value,value:e.props.value},e.handleCompositionStart=function(t){var n,a;e.setState({isComposing:!0,nextValue:e.state.value}),null===(a=(n=e.props).onCompositionStart)||void 0===a||a.call(n,t)},e.handleCompositionEnd=function(t){var n,a;e.setState({isComposing:!1}),null===(a=(n=e.props).onCompositionEnd)||void 0===a||a.call(n,t)},e.handleChange=function(t){var n,a,o=t.target.value;e.setState({nextValue:o}),null===(a=(n=e.props).onChange)||void 0===a||a.call(n,t)},e}return(0,e.__extends)(r,o),r.getDerivedStateFromProps=function(e,t){return t.isComposing||void 0===e.value?null:t.nextValue!==t.value?e.value===t.nextValue?t.hasPendingUpdate?{value:e.value,hasPendingUpdate:!1}:{value:t.nextValue}:e.value===t.value?{hasPendingUpdate:!0}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}:{value:e.value,nextValue:e.value,hasPendingUpdate:!1}},r.prototype.render=function(){var n=this.state,a=n.isComposing,o=n.hasPendingUpdate,r=n.value,l=n.nextValue,i=this.props,u=i.inputRef,s=(0,e.__rest)(i,["inputRef"]);return t.createElement("input",(0,e.__assign)({},s,{ref:u,value:a||o?l:r,onCompositionStart:this.handleCompositionStart,onCompositionEnd:this.handleCompositionEnd,onChange:this.handleChange}))},r.displayName=a.DISPLAYNAME_PREFIX+".AsyncControllableInput",r=(0,e.__decorate)([n.polyfill],r)}(t.PureComponent);exports.AsyncControllableInput=l;
|
|
468
576
|
},{"tslib":"CvJj","react":"HdMw","react-lifecycles-compat":"X9k7","../../common/props":"hCEs"}],"mAtJ":[function(require,module,exports) {
|
|
@@ -555,7 +663,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
555
663
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/props":"hCEs","../icon/icon":"Xg5P","../tag/tag":"mLQa"}],"uwWq":[function(require,module,exports) {
|
|
556
664
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Toast=void 0;var t=require("tslib"),e=p(require("classnames")),o=l(require("react")),r=require("react-lifecycles-compat"),n=require("../../common"),i=require("../../common/props"),s=require("../button/buttonGroup"),u=require("../button/buttons"),a=require("../icon/icon");function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,o=new WeakMap;return(c=function(t){return t?o:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var o=c(e);if(o&&o.has(t))return o.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in t)if("default"!==i&&Object.prototype.hasOwnProperty.call(t,i)){var s=n?Object.getOwnPropertyDescriptor(t,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=t[i]}return r.default=t,o&&o.set(t,r),r}function p(t){return t&&t.__esModule?t:{default:t}}var m=function(c){function l(){var t=null!==c&&c.apply(this,arguments)||this;return t.handleActionClick=function(e){var o,r;null===(r=null===(o=t.props.action)||void 0===o?void 0:o.onClick)||void 0===r||r.call(o,e),t.triggerDismiss(!1)},t.handleCloseClick=function(){return t.triggerDismiss(!1)},t.startTimeout=function(){t.clearTimeouts(),t.props.timeout>0&&t.setTimeout(function(){return t.triggerDismiss(!0)},t.props.timeout)},t}return(0,t.__extends)(l,c),l.prototype.render=function(){var t=this.props,r=t.className,i=t.icon,c=t.intent,l=t.message;return o.createElement("div",{className:(0,e.default)(n.Classes.TOAST,n.Classes.intentClass(c),r),onBlur:this.startTimeout,onFocus:this.clearTimeouts,onMouseEnter:this.clearTimeouts,onMouseLeave:this.startTimeout,tabIndex:0},o.createElement(a.Icon,{icon:i}),o.createElement("span",{className:n.Classes.TOAST_MESSAGE},l),o.createElement(s.ButtonGroup,{minimal:!0},this.maybeRenderActionButton(),o.createElement(u.Button,{"aria-label":"Close",icon:"cross",onClick:this.handleCloseClick})))},l.prototype.componentDidMount=function(){this.startTimeout()},l.prototype.componentDidUpdate=function(t){t.timeout!==this.props.timeout&&(this.props.timeout>0?this.startTimeout():this.clearTimeouts())},l.prototype.componentWillUnmount=function(){this.clearTimeouts()},l.prototype.maybeRenderActionButton=function(){var e=this.props.action;return null==e?void 0:o.createElement(u.AnchorButton,(0,t.__assign)({},e,{intent:void 0,onClick:this.handleActionClick}))},l.prototype.triggerDismiss=function(t){var e,o;this.clearTimeouts(),null===(o=(e=this.props).onDismiss)||void 0===o||o.call(e,t)},l.defaultProps={className:"",message:"",timeout:5e3},l.displayName=i.DISPLAYNAME_PREFIX+".Toast",l=(0,t.__decorate)([r.polyfill],l)}(n.AbstractPureComponent2);exports.Toast=m;
|
|
557
665
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/props":"hCEs","../button/buttonGroup":"n2uA","../button/buttons":"GWuz","../icon/icon":"Xg5P"}],"zNDe":[function(require,module,exports) {
|
|
558
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OverlayToaster=exports.Toaster=void 0;var t=require("tslib"),e=h(require("classnames")),s=d(require("react")),r=d(require("react-dom")),o=require("react-lifecycles-compat"),n=require("../../common"),a=require("../../common/errors"),i=require("../../common/keys"),u=require("../../common/props"),l=require("../../common/utils"),c=require("../overlay/overlay"),p=require("./toast");function f(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,s=new WeakMap;return(f=function(t){return t?s:e})(t)}function d(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var s=f(e);if(s&&s.has(t))return s.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if("default"!==n&&Object.prototype.hasOwnProperty.call(t,n)){var a=o?Object.getOwnPropertyDescriptor(t,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=t[n]}return r.default=t,s&&s.set(t,r),r}function h(t){return t&&t.__esModule?t:{default:t}}var y=function(f){function d(){var e=null!==f&&f.apply(this,arguments)||this;return e.state={toasts:[]},e.toastId=0,e.renderToast=function(r){return s.createElement(p.Toast,(0,t.__assign)({},r,{onDismiss:e.getDismissHandler(r)}))},e.getDismissHandler=function(t){return function(s){e.dismiss(t.key,s)}},e.handleClose=function(t){t.which===i.ESCAPE&&e.clear()},e}var h;return(0,t.__extends)(d,f),h=d,d.create=function(e,o){void 0===o&&(o=document.body),null==e||null==e.usePortal||(0,l.isNodeEnv)("production")||console.warn(a.TOASTER_WARN_INLINE);var n=document.createElement("div");o.appendChild(n);var i=r.render(s.createElement(h,(0,t.__assign)({},e,{usePortal:!1})),n);if(null==i)throw new Error(a.TOASTER_CREATE_NULL);return i},d.prototype.show=function(e,s){this.props.maxToasts&&this.dismissIfAtLimit();var r=this.createToastOptions(e,s);return void 0===s||this.isNewToastKey(s)?this.setState(function(e){return{toasts:(0,t.__spreadArrays)([r],e.toasts)}}):this.setState(function(t){return{toasts:t.toasts.map(function(t){return t.key===s?r:t})}}),r.key},d.prototype.dismiss=function(t,e){void 0===e&&(e=!1),this.setState(function(s){return{toasts:s.toasts.filter(function(s){var r,o=s.key===t;return o&&(null===(r=s.onDismiss)||void 0===r||r.call(s,e)),!o})}})},d.prototype.clear=function(){this.state.toasts.forEach(function(t){var e;return null===(e=t.onDismiss)||void 0===e?void 0:e.call(t,!1)}),this.setState({toasts:[]})},d.prototype.getToasts=function(){return this.state.toasts},d.prototype.render=function(){var t=(0,e.default)(n.Classes.TOAST_CONTAINER,this.getPositionClasses(),this.props.className);return s.createElement(c.Overlay,{autoFocus:this.props.autoFocus,canEscapeKeyClose:this.props.canEscapeKeyClear,canOutsideClickClose:!1,className:t,enforceFocus:!1,hasBackdrop:!1,isOpen:this.state.toasts.length>0||null!=this.props.children,onClose:this.handleClose,transitionDuration:350,transitionName:n.Classes.TOAST,usePortal:this.props.usePortal},this.state.toasts.map(this.renderToast,this),this.props.children)},d.prototype.validateProps=function(t){var e=t.maxToasts;if(void 0!==e&&e<1)throw new Error(a.TOASTER_MAX_TOASTS_INVALID)},d.prototype.isNewToastKey=function(t){return this.state.toasts.every(function(e){return e.key!==t})},d.prototype.dismissIfAtLimit=function(){this.state.toasts.length===this.props.maxToasts&&this.dismiss(this.state.toasts[this.state.toasts.length-1].key)},d.prototype.createToastOptions=function(e,s){return void 0===s&&(s="toast-"+this.toastId++),(0,t.__assign)((0,t.__assign)({},e),{key:s})},d.prototype.getPositionClasses=function(){var e=this.props.position.split("-");return(0,t.__spreadArrays)(e.map(function(t){return n.Classes.TOAST_CONTAINER+"-"+t.toLowerCase()}),[n.Classes.TOAST_CONTAINER+"-"+(this.props.usePortal?"in-portal":"inline")])},d.displayName=u.DISPLAYNAME_PREFIX+".Toaster",d.defaultProps={autoFocus:!1,canEscapeKeyClear:!0,position:n.Position.TOP,usePortal:!0},d=h=(0,t.__decorate)([o.polyfill],d)}(n.AbstractPureComponent2);exports.Toaster=y;var m=y;exports.OverlayToaster=m;
|
|
666
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.OverlayToaster=exports.Toaster=void 0;var t=require("tslib"),e=h(require("classnames")),s=d(require("react")),r=d(require("react-dom")),o=require("react-lifecycles-compat"),n=require("../../common"),a=require("../../common/errors"),i=require("../../common/keys"),u=require("../../common/props"),l=require("../../common/utils"),c=require("../overlay/overlay"),p=require("./toast");function f(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,s=new WeakMap;return(f=function(t){return t?s:e})(t)}function d(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var s=f(e);if(s&&s.has(t))return s.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in t)if("default"!==n&&Object.prototype.hasOwnProperty.call(t,n)){var a=o?Object.getOwnPropertyDescriptor(t,n):null;a&&(a.get||a.set)?Object.defineProperty(r,n,a):r[n]=t[n]}return r.default=t,s&&s.set(t,r),r}function h(t){return t&&t.__esModule?t:{default:t}}var y=function(f){function d(){var e=null!==f&&f.apply(this,arguments)||this;return e.state={toasts:[]},e.toastId=0,e.renderToast=function(r){return s.createElement(p.Toast,(0,t.__assign)({},r,{onDismiss:e.getDismissHandler(r)}))},e.getDismissHandler=function(t){return function(s){e.dismiss(t.key,s)}},e.handleClose=function(t){t.which===i.ESCAPE&&e.clear()},e}var h;return(0,t.__extends)(d,f),h=d,d.create=function(e,o){void 0===o&&(o=document.body),null==e||null==e.usePortal||(0,l.isNodeEnv)("production")||console.warn(a.TOASTER_WARN_INLINE);var n=document.createElement("div");o.appendChild(n);var i=r.render(s.createElement(h,(0,t.__assign)({},e,{usePortal:!1})),n);if(null==i)throw new Error(a.TOASTER_CREATE_NULL);return i},d.prototype.show=function(e,s){this.props.maxToasts&&this.dismissIfAtLimit();var r=this.createToastOptions(e,s);return void 0===s||this.isNewToastKey(s)?this.setState(function(e){return{toasts:(0,t.__spreadArrays)([r],e.toasts)}}):this.setState(function(t){return{toasts:t.toasts.map(function(t){return t.key===s?r:t})}}),r.key},d.prototype.dismiss=function(t,e){void 0===e&&(e=!1),this.setState(function(s){return{toasts:s.toasts.filter(function(s){var r,o=s.key===t;return o&&(null===(r=s.onDismiss)||void 0===r||r.call(s,e)),!o})}})},d.prototype.clear=function(){this.state.toasts.forEach(function(t){var e;return null===(e=t.onDismiss)||void 0===e?void 0:e.call(t,!1)}),this.setState({toasts:[]})},d.prototype.getToasts=function(){return this.state.toasts},d.prototype.render=function(){var t=(0,e.default)(n.Classes.TOAST_CONTAINER,this.getPositionClasses(),this.props.className);return s.createElement(c.Overlay,{autoFocus:this.props.autoFocus,canEscapeKeyClose:this.props.canEscapeKeyClear,canOutsideClickClose:!1,className:t,enforceFocus:!1,hasBackdrop:!1,isOpen:this.state.toasts.length>0||null!=this.props.children,onClose:this.handleClose,shouldReturnFocusOnClose:!1,transitionDuration:350,transitionName:n.Classes.TOAST,usePortal:this.props.usePortal},this.state.toasts.map(this.renderToast,this),this.props.children)},d.prototype.validateProps=function(t){var e=t.maxToasts;if(void 0!==e&&e<1)throw new Error(a.TOASTER_MAX_TOASTS_INVALID)},d.prototype.isNewToastKey=function(t){return this.state.toasts.every(function(e){return e.key!==t})},d.prototype.dismissIfAtLimit=function(){this.state.toasts.length===this.props.maxToasts&&this.dismiss(this.state.toasts[this.state.toasts.length-1].key)},d.prototype.createToastOptions=function(e,s){return void 0===s&&(s="toast-"+this.toastId++),(0,t.__assign)((0,t.__assign)({},e),{key:s})},d.prototype.getPositionClasses=function(){var e=this.props.position.split("-");return(0,t.__spreadArrays)(e.map(function(t){return n.Classes.TOAST_CONTAINER+"-"+t.toLowerCase()}),[n.Classes.TOAST_CONTAINER+"-"+(this.props.usePortal?"in-portal":"inline")])},d.displayName=u.DISPLAYNAME_PREFIX+".Toaster",d.defaultProps={autoFocus:!1,canEscapeKeyClear:!0,position:n.Position.TOP,usePortal:!0},d=h=(0,t.__decorate)([o.polyfill],d)}(n.AbstractPureComponent2);exports.Toaster=y;var m=y;exports.OverlayToaster=m;
|
|
559
667
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","react-dom":"X9zx","react-lifecycles-compat":"X9k7","../../common":"OpAJ","../../common/errors":"AgjZ","../../common/keys":"DZgZ","../../common/props":"hCEs","../../common/utils":"MIjH","../overlay/overlay":"H0os","./toast":"uwWq"}],"Gshw":[function(require,module,exports) {
|
|
560
668
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TreeNode=void 0;var e=require("tslib"),n=c(require("classnames")),t=s(require("react")),r=s(require("../../common/classes")),o=require("../../common/props"),a=require("../collapse/collapse"),l=require("../icon/icon");function i(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(i=function(e){return e?t:n})(e)}function s(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i(n);if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var l=o?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(r,a,l):r[a]=e[a]}return r.default=e,t&&t.set(e,r),r}function c(e){return e&&e.__esModule?e:{default:e}}var u=function(i){function s(){var e=null!==i&&i.apply(this,arguments)||this;return e.handleCaretClick=function(n){var t;n.stopPropagation();var r=e.props,o=r.isExpanded,a=r.onCollapse,l=r.onExpand;null===(t=o?a:l)||void 0===t||t(e,n)},e.handleClick=function(n){var t,r;null===(r=(t=e.props).onClick)||void 0===r||r.call(t,e,n)},e.handleContentRef=function(n){var t,r;null===(r=(t=e.props).contentRef)||void 0===r||r.call(t,e,n)},e.handleContextMenu=function(n){var t,r;null===(r=(t=e.props).onContextMenu)||void 0===r||r.call(t,e,n)},e.handleDoubleClick=function(n){var t,r;null===(r=(t=e.props).onDoubleClick)||void 0===r||r.call(t,e,n)},e.handleMouseEnter=function(n){var t,r;null===(r=(t=e.props).onMouseEnter)||void 0===r||r.call(t,e,n)},e.handleMouseLeave=function(n){var t,r;null===(r=(t=e.props).onMouseLeave)||void 0===r||r.call(t,e,n)},e}return(0,e.__extends)(s,i),s.ofType=function(){return s},s.prototype.render=function(){var o,i=this.props,s=i.children,c=i.className,u=i.disabled,p=i.icon,E=i.isExpanded,d=i.isSelected,f=i.label,h=(0,n.default)(r.TREE_NODE,((o={})[r.DISABLED]=u,o[r.TREE_NODE_SELECTED]=d,o[r.TREE_NODE_EXPANDED]=E,o),c),_=(0,n.default)(r.TREE_NODE_CONTENT,r.TREE_NODE_CONTENT+"-"+this.props.depth),v=!0===u?{}:{onClick:this.handleClick,onContextMenu:this.handleContextMenu,onDoubleClick:this.handleDoubleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave};return t.createElement("li",{className:h},t.createElement("div",(0,e.__assign)({className:_,ref:this.handleContentRef},v),this.maybeRenderCaret(),t.createElement(l.Icon,{className:r.TREE_NODE_ICON,icon:p}),t.createElement("span",{className:r.TREE_NODE_LABEL},f),this.maybeRenderSecondaryLabel()),t.createElement(a.Collapse,{isOpen:E},s))},s.prototype.maybeRenderCaret=function(){var e=this.props,o=e.children,a=e.isExpanded,i=e.disabled,s=e.hasCaret;if(void 0===s?t.Children.count(o)>0:s){var c=(0,n.default)(r.TREE_NODE_CARET,a?r.TREE_NODE_CARET_OPEN:r.TREE_NODE_CARET_CLOSED),u=!0===i?void 0:this.handleCaretClick;return t.createElement(l.Icon,{title:a?"Collapse group":"Expand group",className:c,onClick:u,icon:"chevron-right"})}return t.createElement("span",{className:r.TREE_NODE_CARET_NONE})},s.prototype.maybeRenderSecondaryLabel=function(){return null!=this.props.secondaryLabel?t.createElement("span",{className:r.TREE_NODE_SECONDARY_LABEL},this.props.secondaryLabel):void 0},s.displayName=o.DISPLAYNAME_PREFIX+".TreeNode",s}(t.Component);exports.TreeNode=u;
|
|
561
669
|
},{"tslib":"CvJj","classnames":"G1XI","react":"HdMw","../../common/classes":"A6xK","../../common/props":"hCEs","../collapse/collapse":"FyRR","../icon/icon":"Xg5P"}],"WJhK":[function(require,module,exports) {
|
|
@@ -584,9 +692,11 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
584
692
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=s(require("../dom-utils/getNodeName.js")),t=require("../dom-utils/instanceOf.js");function s(e){return e&&e.__esModule?e:{default:e}}function r(s){var r=s.state;Object.keys(r.elements).forEach(function(s){var n=r.styles[s]||{},o=r.attributes[s]||{},a=r.elements[s];(0,t.isHTMLElement)(a)&&(0,e.default)(a)&&(Object.assign(a.style,n),Object.keys(o).forEach(function(e){var t=o[e];!1===t?a.removeAttribute(e):a.setAttribute(e,!0===t?"":t)}))})}function n(s){var r=s.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow),function(){Object.keys(r.elements).forEach(function(s){var o=r.elements[s],a=r.attributes[s]||{},i=Object.keys(r.styles.hasOwnProperty(s)?r.styles[s]:n[s]).reduce(function(e,t){return e[t]="",e},{});(0,t.isHTMLElement)(o)&&(0,e.default)(o)&&(Object.assign(o.style,i),Object.keys(a).forEach(function(e){o.removeAttribute(e)}))})}}var o={name:"applyStyles",enabled:!0,phase:"write",fn:r,effect:n,requires:["computeStyles"]};exports.default=o;
|
|
585
693
|
},{"../dom-utils/getNodeName.js":"hqUe","../dom-utils/instanceOf.js":"lOVC"}],"yLpD":[function(require,module,exports) {
|
|
586
694
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("../enums.js");function r(e){return e.split("-")[0]}
|
|
587
|
-
},{"../enums.js":"KwvA"}],"
|
|
588
|
-
"use strict";
|
|
589
|
-
},{}],"
|
|
695
|
+
},{"../enums.js":"KwvA"}],"oQre":[function(require,module,exports) {
|
|
696
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.round=exports.min=exports.max=void 0;var r=Math.max;exports.max=r;var e=Math.min;exports.min=e;var t=Math.round;exports.round=t;
|
|
697
|
+
},{}],"btCD":[function(require,module,exports) {
|
|
698
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var t=require("./instanceOf.js"),e=require("../utils/math.js");function i(i,o){void 0===o&&(o=!1);var r=i.getBoundingClientRect(),h=1,f=1;if((0,t.isHTMLElement)(i)&&o){var n=i.offsetHeight,s=i.offsetWidth;s>0&&(h=(0,e.round)(r.width)/s||1),n>0&&(f=(0,e.round)(r.height)/n||1)}return{width:r.width/h,height:r.height/f,top:r.top/f,right:r.right/h,bottom:r.bottom/f,left:r.left/h,x:r.left/h,y:r.top/f}}
|
|
699
|
+
},{"./instanceOf.js":"lOVC","../utils/math.js":"oQre"}],"bgU0":[function(require,module,exports) {
|
|
590
700
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f;var e=t(require("./getBoundingClientRect.js"));function t(e){return e&&e.__esModule?e:{default:e}}function f(t){var f=(0,e.default)(t),i=t.offsetWidth,h=t.offsetHeight;return Math.abs(f.width-i)<=1&&(i=f.width),Math.abs(f.height-h)<=1&&(h=f.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:h}}
|
|
591
701
|
},{"./getBoundingClientRect.js":"btCD"}],"TozG":[function(require,module,exports) {
|
|
592
702
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=require("./instanceOf.js");function t(t,o){var r=o.getRootNode&&o.getRootNode();if(t.contains(o))return!0;if(r&&(0,e.isShadowRoot)(r)){var i=o;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}
|
|
@@ -602,10 +712,8 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
602
712
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=l;var e=a(require("./getWindow.js")),t=a(require("./getNodeName.js")),r=a(require("./getComputedStyle.js")),n=require("./instanceOf.js"),i=a(require("./isTableElement.js")),u=a(require("./getParentNode.js"));function a(e){return e&&e.__esModule?e:{default:e}}function f(e){return(0,n.isHTMLElement)(e)&&"fixed"!==(0,r.default)(e).position?e.offsetParent:null}function o(e){var i=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&(0,n.isHTMLElement)(e)&&"fixed"===(0,r.default)(e).position)return null;for(var a=(0,u.default)(e);(0,n.isHTMLElement)(a)&&["html","body"].indexOf((0,t.default)(a))<0;){var f=(0,r.default)(a);if("none"!==f.transform||"none"!==f.perspective||"paint"===f.contain||-1!==["transform","perspective"].indexOf(f.willChange)||i&&"filter"===f.willChange||i&&f.filter&&"none"!==f.filter)return a;a=a.parentNode}return null}function l(n){for(var u=(0,e.default)(n),a=f(n);a&&(0,i.default)(a)&&"static"===(0,r.default)(a).position;)a=f(a);return a&&("html"===(0,t.default)(a)||"body"===(0,t.default)(a)&&"static"===(0,r.default)(a).position)?u:a||o(n)||u}
|
|
603
713
|
},{"./getWindow.js":"iP0B","./getNodeName.js":"hqUe","./getComputedStyle.js":"ro5C","./instanceOf.js":"lOVC","./isTableElement.js":"t2So","./getParentNode.js":"Tyrb"}],"w8hZ":[function(require,module,exports) {
|
|
604
714
|
"use strict";function e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
605
|
-
},{}],"oQre":[function(require,module,exports) {
|
|
606
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.round=exports.min=exports.max=void 0;var r=Math.max;exports.max=r;var e=Math.min;exports.min=e;var t=Math.round;exports.round=t;
|
|
607
715
|
},{}],"bTtH":[function(require,module,exports) {
|
|
608
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
716
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.within=r,exports.withinMaxClamp=t;var e=require("./math.js");function r(r,t,i){return(0,e.max)(r,(0,e.min)(t,i))}function t(e,t,i){var n=r(e,t,i);return n>i?i:n}
|
|
609
717
|
},{"./math.js":"oQre"}],"R9OA":[function(require,module,exports) {
|
|
610
718
|
"use strict";function t(){return{top:0,right:0,bottom:0,left:0}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
|
|
611
719
|
},{}],"YlSo":[function(require,module,exports) {
|
|
@@ -613,11 +721,11 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
613
721
|
},{"./getFreshSideObject.js":"R9OA"}],"ZqdX":[function(require,module,exports) {
|
|
614
722
|
"use strict";function e(e,t){return t.reduce(function(t,r){return t[r]=e,t},{})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
615
723
|
},{}],"T3Ag":[function(require,module,exports) {
|
|
616
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("../utils/getBasePlacement.js")),t=l(require("../dom-utils/getLayoutRect.js")),r=l(require("../dom-utils/contains.js")),s=l(require("../dom-utils/getOffsetParent.js")),i=l(require("../utils/getMainAxisFromPlacement.js")),
|
|
724
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=l(require("../utils/getBasePlacement.js")),t=l(require("../dom-utils/getLayoutRect.js")),r=l(require("../dom-utils/contains.js")),s=l(require("../dom-utils/getOffsetParent.js")),i=l(require("../utils/getMainAxisFromPlacement.js")),n=require("../utils/within.js"),a=l(require("../utils/mergePaddingObject.js")),u=l(require("../utils/expandToHashMap.js")),o=require("../enums.js"),f=require("../dom-utils/instanceOf.js");function l(e){return e&&e.__esModule?e:{default:e}}var p=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,a.default)("number"!=typeof e?e:(0,u.default)(e,o.basePlacements))};function c(r){var a,u=r.state,f=r.name,l=r.options,c=u.elements.arrow,d=u.modifiersData.popperOffsets,m=(0,e.default)(u.placement),g=(0,i.default)(m),j=[o.left,o.right].indexOf(m)>=0?"height":"width";if(c&&d){var q=p(l.padding,u),h=(0,t.default)(c),v="y"===g?o.top:o.left,O="y"===g?o.bottom:o.right,y=u.rects.reference[j]+u.rects.reference[g]-d[g]-u.rects.popper[j],w=d[g]-u.rects.reference[g],b=(0,s.default)(c),x=b?"y"===g?b.clientHeight||0:b.clientWidth||0:0,P=y/2-w/2,M=q[v],_=x-h[j]-q[O],D=x/2-h[j]/2+P,H=(0,n.within)(M,D,_),A=g;u.modifiersData[f]=((a={})[A]=H,a.centerOffset=H-D,a)}}function d(e){var t=e.state,s=e.options.element,i=void 0===s?"[data-popper-arrow]":s;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&(0,r.default)(t.elements.popper,i)&&(t.elements.arrow=i)}var m={name:"arrow",enabled:!0,phase:"main",fn:c,effect:d,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};exports.default=m;
|
|
617
725
|
},{"../utils/getBasePlacement.js":"yLpD","../dom-utils/getLayoutRect.js":"bgU0","../dom-utils/contains.js":"TozG","../dom-utils/getOffsetParent.js":"Mnay","../utils/getMainAxisFromPlacement.js":"w8hZ","../utils/within.js":"bTtH","../utils/mergePaddingObject.js":"YlSo","../utils/expandToHashMap.js":"ZqdX","../enums.js":"KwvA","../dom-utils/instanceOf.js":"lOVC"}],"kB4N":[function(require,module,exports) {
|
|
618
726
|
"use strict";function e(e){return e.split("-")[1]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
619
727
|
},{}],"p5kV":[function(require,module,exports) {
|
|
620
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mapToStyles=d,exports.default=void 0;var e=require("../enums.js"),t=n(require("../dom-utils/getOffsetParent.js")),
|
|
728
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.mapToStyles=d,exports.default=void 0;var e=require("../enums.js"),t=n(require("../dom-utils/getOffsetParent.js")),i=n(require("../dom-utils/getWindow.js")),o=n(require("../dom-utils/getDocumentElement.js")),s=n(require("../dom-utils/getComputedStyle.js")),r=n(require("../utils/getBasePlacement.js")),a=n(require("../utils/getVariation.js")),p=require("../utils/math.js");function n(e){return e&&e.__esModule?e:{default:e}}var l={top:"auto",right:"auto",bottom:"auto",left:"auto"};function u(e){var t=e.x,i=e.y,o=window.devicePixelRatio||1;return{x:(0,p.round)(t*o)/o||0,y:(0,p.round)(i*o)/o||0}}function d(r){var a,p=r.popper,n=r.popperRect,d=r.placement,f=r.variation,c=r.offsets,m=r.position,v=r.gpuAcceleration,g=r.adaptive,x=r.roundOffsets,y=r.isFixed,b=c.x,O=void 0===b?0:b,h=c.y,j=void 0===h?0:h,w="function"==typeof x?x({x:O,y:j}):{x:O,y:j};O=w.x,j=w.y;var q=c.hasOwnProperty("x"),P=c.hasOwnProperty("y"),D=e.left,V=e.top,R=window;if(g){var W=(0,t.default)(p),_="clientHeight",A="clientWidth";if(W===(0,i.default)(p)&&(W=(0,o.default)(p),"static"!==(0,s.default)(W).position&&"absolute"===m&&(_="scrollHeight",A="scrollWidth")),W=W,d===e.top||(d===e.left||d===e.right)&&f===e.end)V=e.bottom,j-=(y&&R.visualViewport?R.visualViewport.height:W[_])-n.height,j*=v?1:-1;if(d===e.left||(d===e.top||d===e.bottom)&&f===e.end)D=e.right,O-=(y&&R.visualViewport?R.visualViewport.width:W[A])-n.width,O*=v?1:-1}var S,F=Object.assign({position:m},g&&l),H=!0===x?u({x:O,y:j}):{x:O,y:j};return O=H.x,j=H.y,v?Object.assign({},F,((S={})[V]=P?"0":"",S[D]=q?"0":"",S.transform=(R.devicePixelRatio||1)<=1?"translate("+O+"px, "+j+"px)":"translate3d("+O+"px, "+j+"px, 0)",S)):Object.assign({},F,((a={})[V]=P?j+"px":"",a[D]=q?O+"px":"",a.transform="",a))}function f(e){var t=e.state,i=e.options,o=i.gpuAcceleration,s=void 0===o||o,p=i.adaptive,n=void 0===p||p,l=i.roundOffsets,u=void 0===l||l,f={placement:(0,r.default)(t.placement),variation:(0,a.default)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,d(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:n,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,d(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var c={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:f,data:{}};exports.default=c;
|
|
621
729
|
},{"../enums.js":"KwvA","../dom-utils/getOffsetParent.js":"Mnay","../dom-utils/getWindow.js":"iP0B","../dom-utils/getDocumentElement.js":"iOCj","../dom-utils/getComputedStyle.js":"ro5C","../utils/getBasePlacement.js":"yLpD","../utils/getVariation.js":"kB4N","../utils/math.js":"oQre"}],"ugN3":[function(require,module,exports) {
|
|
622
730
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../dom-utils/getWindow.js"));function t(e){return e&&e.__esModule?e:{default:e}}var r={passive:!0};function n(t){var n=t.state,s=t.instance,o=t.options,a=o.scroll,i=void 0===a||a,d=o.resize,u=void 0===d||d,c=(0,e.default)(n.elements.popper),l=[].concat(n.scrollParents.reference,n.scrollParents.popper);return i&&l.forEach(function(e){e.addEventListener("scroll",s.update,r)}),u&&c.addEventListener("resize",s.update,r),function(){i&&l.forEach(function(e){e.removeEventListener("scroll",s.update,r)}),u&&c.removeEventListener("resize",s.update,r)}}var s={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:n,data:{}};exports.default=s;
|
|
623
731
|
},{"../dom-utils/getWindow.js":"iP0B"}],"hGEW":[function(require,module,exports) {
|
|
@@ -641,7 +749,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
641
749
|
},{"./getScrollParent.js":"zGGS","./getParentNode.js":"Tyrb","./getWindow.js":"iP0B","./isScrollParent.js":"T26w"}],"vA8j":[function(require,module,exports) {
|
|
642
750
|
"use strict";function t(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;
|
|
643
751
|
},{}],"MtyE":[function(require,module,exports) {
|
|
644
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=q;var e=require("../enums.js"),t=g(require("./getViewportRect.js")),r=g(require("./getDocumentRect.js")),i=g(require("./listScrollParents.js")),n=g(require("./getOffsetParent.js")),u=g(require("./getDocumentElement.js")),o=g(require("./getComputedStyle.js")),l=require("./instanceOf.js"),f=g(require("./getBoundingClientRect.js")),s=g(require("./getParentNode.js")),a=g(require("./contains.js")),c=g(require("./getNodeName.js")),d=g(require("../utils/rectToClientRect.js")),m=require("../utils/math.js");function g(e){return e&&e.__esModule?e:{default:e}}function p(e){var t=(0,f.default)(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function h(i,n){return n===e.viewport?(0,d.default)((0,t.default)(i)):(0,l.
|
|
752
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=q;var e=require("../enums.js"),t=g(require("./getViewportRect.js")),r=g(require("./getDocumentRect.js")),i=g(require("./listScrollParents.js")),n=g(require("./getOffsetParent.js")),u=g(require("./getDocumentElement.js")),o=g(require("./getComputedStyle.js")),l=require("./instanceOf.js"),f=g(require("./getBoundingClientRect.js")),s=g(require("./getParentNode.js")),a=g(require("./contains.js")),c=g(require("./getNodeName.js")),d=g(require("../utils/rectToClientRect.js")),m=require("../utils/math.js");function g(e){return e&&e.__esModule?e:{default:e}}function p(e){var t=(0,f.default)(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function h(i,n){return n===e.viewport?(0,d.default)((0,t.default)(i)):(0,l.isElement)(n)?p(n):(0,d.default)((0,r.default)((0,u.default)(i)))}function j(e){var t=(0,i.default)((0,s.default)(e)),r=["absolute","fixed"].indexOf((0,o.default)(e).position)>=0&&(0,l.isHTMLElement)(e)?(0,n.default)(e):e;return(0,l.isElement)(r)?t.filter(function(e){return(0,l.isElement)(e)&&(0,a.default)(e,r)&&"body"!==(0,c.default)(e)}):[]}function q(e,t,r){var i="clippingParents"===t?j(e):[].concat(t),n=[].concat(i,[r]),u=n[0],o=n.reduce(function(t,r){var i=h(e,r);return t.top=(0,m.max)(i.top,t.top),t.right=(0,m.min)(i.right,t.right),t.bottom=(0,m.min)(i.bottom,t.bottom),t.left=(0,m.max)(i.left,t.left),t},h(e,u));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}
|
|
645
753
|
},{"../enums.js":"KwvA","./getViewportRect.js":"uJtB","./getDocumentRect.js":"xGf3","./listScrollParents.js":"inBY","./getOffsetParent.js":"Mnay","./getDocumentElement.js":"iOCj","./getComputedStyle.js":"ro5C","./instanceOf.js":"lOVC","./getBoundingClientRect.js":"btCD","./getParentNode.js":"Tyrb","./contains.js":"TozG","./getNodeName.js":"hqUe","../utils/rectToClientRect.js":"vA8j","../utils/math.js":"oQre"}],"HyU9":[function(require,module,exports) {
|
|
646
754
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=i(require("./getBasePlacement.js")),t=i(require("./getVariation.js")),r=i(require("./getMainAxisFromPlacement.js")),a=require("../enums.js");function i(e){return e&&e.__esModule?e:{default:e}}function u(i){var u,l=i.reference,s=i.element,n=i.placement,h=n?(0,e.default)(n):null,c=n?(0,t.default)(n):null,d=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2;switch(h){case a.top:u={x:d,y:l.y-s.height};break;case a.bottom:u={x:d,y:l.y+l.height};break;case a.right:u={x:l.x+l.width,y:f};break;case a.left:u={x:l.x-s.width,y:f};break;default:u={x:l.x,y:l.y}}var o=h?(0,r.default)(h):null;if(null!=o){var x="y"===o?"height":"width";switch(c){case a.start:u[o]=u[o]-(l[x]/2-s[x]/2);break;case a.end:u[o]=u[o]+(l[x]/2-s[x]/2)}}return u}
|
|
647
755
|
},{"./getBasePlacement.js":"yLpD","./getVariation.js":"kB4N","./getMainAxisFromPlacement.js":"w8hZ","../enums.js":"KwvA"}],"lMQv":[function(require,module,exports) {
|
|
@@ -659,7 +767,7 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
659
767
|
},{"../utils/computeOffsets.js":"HyU9"}],"lz0w":[function(require,module,exports) {
|
|
660
768
|
"use strict";function e(e){return"x"===e?"y":"x"}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
661
769
|
},{}],"T716":[function(require,module,exports) {
|
|
662
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../enums.js"),t=
|
|
770
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../enums.js"),t=f(require("../utils/getBasePlacement.js")),i=f(require("../utils/getMainAxisFromPlacement.js")),a=f(require("../utils/getAltAxis.js")),r=require("../utils/within.js"),s=f(require("../dom-utils/getLayoutRect.js")),n=f(require("../dom-utils/getOffsetParent.js")),l=f(require("../utils/detectOverflow.js")),o=f(require("../utils/getVariation.js")),u=f(require("../utils/getFreshSideObject.js")),d=require("../utils/math.js");function f(e){return e&&e.__esModule?e:{default:e}}function m(f){var m=f.state,p=f.options,x=f.name,c=p.mainAxis,h=void 0===c||c,g=p.altAxis,v=void 0!==g&&g,y=p.boundary,j=p.rootBoundary,w=p.altBoundary,A=p.padding,q=p.tether,b=void 0===q||q,O=p.tetherOffset,D=void 0===O?0:O,B=(0,l.default)(m,{boundary:y,rootBoundary:j,padding:A,altBoundary:w}),M=(0,t.default)(m.placement),P=(0,o.default)(m.placement),_=!P,F=(0,i.default)(M),L=(0,a.default)(F),C=m.modifiersData.popperOffsets,E=m.rects.reference,I=m.rects.popper,R="function"==typeof D?D(Object.assign({},m.rects,{placement:m.placement})):D,S="number"==typeof R?{mainAxis:R,altAxis:R}:Object.assign({mainAxis:0,altAxis:0},R),T=m.modifiersData.offset?m.modifiersData.offset[m.placement]:null,V={x:0,y:0};if(C){if(h){var k,z="y"===F?e.top:e.left,G="y"===F?e.bottom:e.right,H="y"===F?"height":"width",J=C[F],K=J+B[z],N=J-B[G],Q=b?-I[H]/2:0,U=P===e.start?E[H]:I[H],W=P===e.start?-I[H]:-E[H],X=m.elements.arrow,Y=b&&X?(0,s.default)(X):{width:0,height:0},Z=m.modifiersData["arrow#persistent"]?m.modifiersData["arrow#persistent"].padding:(0,u.default)(),$=Z[z],ee=Z[G],te=(0,r.within)(0,E[H],Y[H]),ie=_?E[H]/2-Q-te-$-S.mainAxis:U-te-$-S.mainAxis,ae=_?-E[H]/2+Q+te+ee+S.mainAxis:W+te+ee+S.mainAxis,re=m.elements.arrow&&(0,n.default)(m.elements.arrow),se=re?"y"===F?re.clientTop||0:re.clientLeft||0:0,ne=null!=(k=null==T?void 0:T[F])?k:0,le=J+ie-ne-se,oe=J+ae-ne,ue=(0,r.within)(b?(0,d.min)(K,le):K,J,b?(0,d.max)(N,oe):N);C[F]=ue,V[F]=ue-J}if(v){var de,fe="x"===F?e.top:e.left,me="x"===F?e.bottom:e.right,pe=C[L],xe="y"===L?"height":"width",ce=pe+B[fe],he=pe-B[me],ge=-1!==[e.top,e.left].indexOf(M),ve=null!=(de=null==T?void 0:T[L])?de:0,ye=ge?ce:pe-E[xe]-I[xe]-ve+S.altAxis,je=ge?pe+E[xe]+I[xe]-ve-S.altAxis:he,we=b&&ge?(0,r.withinMaxClamp)(ye,pe,je):(0,r.within)(b?ye:ce,pe,b?je:he);C[L]=we,V[L]=we-pe}m.modifiersData[x]=V}}var p={name:"preventOverflow",enabled:!0,phase:"main",fn:m,requiresIfExists:["offset"]};exports.default=p;
|
|
663
771
|
},{"../enums.js":"KwvA","../utils/getBasePlacement.js":"yLpD","../utils/getMainAxisFromPlacement.js":"w8hZ","../utils/getAltAxis.js":"lz0w","../utils/within.js":"bTtH","../dom-utils/getLayoutRect.js":"bgU0","../dom-utils/getOffsetParent.js":"Mnay","../utils/detectOverflow.js":"lMQv","../utils/getVariation.js":"kB4N","../utils/getFreshSideObject.js":"R9OA","../utils/math.js":"oQre"}],"afdv":[function(require,module,exports) {
|
|
664
772
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"applyStyles",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(exports,"arrow",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"computeStyles",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"eventListeners",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(exports,"flip",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(exports,"hide",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(exports,"offset",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(exports,"popperOffsets",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(exports,"preventOverflow",{enumerable:!0,get:function(){return i.default}});var e=p(require("./applyStyles.js")),r=p(require("./arrow.js")),t=p(require("./computeStyles.js")),n=p(require("./eventListeners.js")),u=p(require("./flip.js")),f=p(require("./hide.js")),o=p(require("./offset.js")),s=p(require("./popperOffsets.js")),i=p(require("./preventOverflow.js"));function p(e){return e&&e.__esModule?e:{default:e}}
|
|
665
773
|
},{"./applyStyles.js":"pu4Q","./arrow.js":"T3Ag","./computeStyles.js":"p5kV","./eventListeners.js":"ugN3","./flip.js":"sjJD","./hide.js":"T3oQ","./offset.js":"YSdh","./popperOffsets.js":"KKNB","./preventOverflow.js":"T716"}],"MDXK":[function(require,module,exports) {
|
|
@@ -667,8 +775,8 @@ var e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),export
|
|
|
667
775
|
},{}],"ISrc":[function(require,module,exports) {
|
|
668
776
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=n;var e=l(require("./getWindowScroll.js")),t=l(require("./getWindow.js")),r=require("./instanceOf.js"),u=l(require("./getHTMLElementScroll.js"));function l(e){return e&&e.__esModule?e:{default:e}}function n(l){return l!==(0,t.default)(l)&&(0,r.isHTMLElement)(l)?(0,u.default)(l):(0,e.default)(l)}
|
|
669
777
|
},{"./getWindowScroll.js":"aES8","./getWindow.js":"iP0B","./instanceOf.js":"lOVC","./getHTMLElementScroll.js":"MDXK"}],"At1X":[function(require,module,exports) {
|
|
670
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=
|
|
671
|
-
},{"./getBoundingClientRect.js":"btCD","./getNodeScroll.js":"ISrc","./getNodeName.js":"hqUe","./instanceOf.js":"lOVC","./getWindowScrollBarX.js":"pET8","./getDocumentElement.js":"iOCj","./isScrollParent.js":"T26w"}],"ND1T":[function(require,module,exports) {
|
|
778
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f;var e=s(require("./getBoundingClientRect.js")),t=s(require("./getNodeScroll.js")),r=s(require("./getNodeName.js")),l=require("./instanceOf.js"),i=s(require("./getWindowScrollBarX.js")),u=s(require("./getDocumentElement.js")),o=s(require("./isScrollParent.js")),n=require("../utils/math.js");function s(e){return e&&e.__esModule?e:{default:e}}function d(e){var t=e.getBoundingClientRect(),r=(0,n.round)(t.width)/e.offsetWidth||1,l=(0,n.round)(t.height)/e.offsetHeight||1;return 1!==r||1!==l}function f(n,s,f){void 0===f&&(f=!1);var a=(0,l.isHTMLElement)(s),c=(0,l.isHTMLElement)(s)&&d(s),g=(0,u.default)(s),h=(0,e.default)(n,c),j={scrollLeft:0,scrollTop:0},q={x:0,y:0};return(a||!a&&!f)&&(("body"!==(0,r.default)(s)||(0,o.default)(g))&&(j=(0,t.default)(s)),(0,l.isHTMLElement)(s)?((q=(0,e.default)(s,!0)).x+=s.clientLeft,q.y+=s.clientTop):g&&(q.x=(0,i.default)(g))),{x:h.left+j.scrollLeft-q.x,y:h.top+j.scrollTop-q.y,width:h.width,height:h.height}}
|
|
779
|
+
},{"./getBoundingClientRect.js":"btCD","./getNodeScroll.js":"ISrc","./getNodeName.js":"hqUe","./instanceOf.js":"lOVC","./getWindowScrollBarX.js":"pET8","./getDocumentElement.js":"iOCj","./isScrollParent.js":"T26w","../utils/math.js":"oQre"}],"ND1T":[function(require,module,exports) {
|
|
672
780
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=r;var e=require("../enums.js");function n(e){var n=new Map,r=new Set,t=[];return e.forEach(function(e){n.set(e.name,e)}),e.forEach(function(e){r.has(e.name)||function e(u){r.add(u.name),[].concat(u.requires||[],u.requiresIfExists||[]).forEach(function(t){if(!r.has(t)){var u=n.get(t);u&&e(u)}}),t.push(u)}(e)}),t}function r(r){var t=n(r);return e.modifierPhases.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}
|
|
673
781
|
},{"../enums.js":"KwvA"}],"dSl1":[function(require,module,exports) {
|
|
674
782
|
"use strict";function e(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
@@ -718,104 +826,38 @@ var e="undefined"!=typeof Element,r="function"==typeof Map,t="function"==typeof
|
|
|
718
826
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"PlacementOptions",{enumerable:!0,get:function(){return e.placements}});var e=require("@popperjs/core");
|
|
719
827
|
},{"@popperjs/core":"S1OH"}],"mZnF":[function(require,module,exports) {
|
|
720
828
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"ContextMenu2",{enumerable:!0,get:function(){return t.ContextMenu2}}),Object.defineProperty(exports,"PlacementOptions",{enumerable:!0,get:function(){return n.PlacementOptions}}),Object.defineProperty(exports,"Popover2",{enumerable:!0,get:function(){return o.Popover2}}),Object.defineProperty(exports,"Popover2InteractionKind",{enumerable:!0,get:function(){return o.Popover2InteractionKind}}),Object.defineProperty(exports,"ResizeSensor2",{enumerable:!0,get:function(){return u.ResizeSensor2}}),Object.defineProperty(exports,"Tooltip2",{enumerable:!0,get:function(){return i.Tooltip2}}),exports.Errors=exports.Classes=void 0;var e=s(require("./classes"));exports.Classes=e;var r=s(require("./errors"));exports.Errors=r;var t=require("./contextMenu2"),n=require("./popover2SharedProps"),o=require("./popover2"),u=require("./resizeSensor2"),i=require("./tooltip2");function p(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,t=new WeakMap;return(p=function(e){return e?t:r})(e)}function s(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=p(r);if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u]}return n.default=e,t&&t.set(e,n),n}
|
|
721
|
-
},{"./classes":"e4eA","./errors":"gQJg","./contextMenu2":"mDEr","./popover2SharedProps":"r11X","./popover2":"r9m3","./resizeSensor2":"HAyF","./tooltip2":"d4OQ"}],"
|
|
722
|
-
|
|
723
|
-
},{"
|
|
724
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
725
|
-
},{"react":"HdMw","react-
|
|
726
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
727
|
-
},{"
|
|
728
|
-
"use strict";Object.defineProperty(
|
|
729
|
-
},{"
|
|
730
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"Html",{enumerable:!0,get:function(){return e.Html}}),Object.defineProperty(exports,"Portal",{enumerable:!0,get:function(){return r.Portal}}),Object.defineProperty(exports,"useImage",{enumerable:!0,get:function(){return t.useImage}});var e=require("./html"),r=require("./portal"),t=require("./use-image");
|
|
731
|
-
},{"
|
|
732
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useFadeIn=exports.isAnimationUsed=exports.toggleFadeInAnimation=void 0;const t=e(require("react")),r=e(require("konva"));let n=!0;const o=(e=!n)=>{n=e};exports.toggleFadeInAnimation=o;const u=()=>n;function s(e,o){const u=t.default.useRef();t.default.useLayoutEffect(()=>{u.current&&u.current.destroy()},[o]),t.default.useLayoutEffect(()=>{if(!n)return;const t=e.current.opacity();return t?(e.current.opacity(0),u.current=new r.default.Tween({node:e.current,opacity:t,onFinish:()=>{var e;null===(e=u.current)||void 0===e||e.destroy()}}),u.current.play(),()=>{var e;null===(e=u.current)||void 0===e||e.destroy()}):void 0},[])}exports.isAnimationUsed=u,exports.useFadeIn=s;
|
|
733
|
-
},{"react":"HdMw","konva":"aTGn"}],"bN4e":[function(require,module,exports) {
|
|
734
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.whenLoaded=exports.decrementLoader=exports.incrementLoader=void 0;const e=require("../canvas/use-fadein");let o=0,t=[];function n(){o+=1}function r(){0===(o-=1)&&(t.forEach(e=>e()),t=[])}function s(e){0===o?e():t.push(e)}function i(){return new Promise(o=>s(()=>{(0,e.isAnimationUsed)()?setTimeout(o,300):o(!0)}))}exports.incrementLoader=n,exports.decrementLoader=r,exports.whenLoaded=i;
|
|
735
|
-
},{"../canvas/use-fadein":"N3c2"}],"SIWI":[function(require,module,exports) {
|
|
736
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.applyFilter=void 0;const t=e(require("konva"));function l(e,l){var r;const s={filters:[]};l.brightnessEnabled&&(s.filters.push(t.default.Filters.Brighten),s.brightness=l.brightness),l.blurEnabled&&(s.filters.push(t.default.Filters.Blur),s.blurRadius=l.blurRadius),l.sepiaEnabled&&s.filters.push(t.default.Filters.Sepia),l.grayscaleEnabled&&s.filters.push(t.default.Filters.Grayscale),e.setAttrs(s),s.filters.length?e.cache({pixelRatio:l.store._elementsPixelRatio}):e.clearCache(),null===(r=e.getLayer())||void 0===r||r.batchDraw()}exports.applyFilter=l;
|
|
737
|
-
},{"konva":"aTGn"}],"cEy1":[function(require,module,exports) {
|
|
738
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Highlighter=void 0;const t=e(require("react")),r=require("mobx-react-lite"),i=require("react-konva");exports.Highlighter=(0,r.observer)(({element:e})=>t.default.createElement(i.Rect,{name:"highlighter",x:e.x,y:e.y,rotation:e.rotation,width:e.width,height:e.height,listening:!1,stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1}));
|
|
739
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug"}],"Fpgh":[function(require,module,exports) {
|
|
740
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextElement=exports.useFontLoader=void 0;const t=e(require("react")),n=require("mobx-react-lite"),r=require("react-konva"),o=require("react-konva-utils"),l=require("mobx"),a=e(require("konva")),i=require("../utils/loader"),d=require("./apply-filters"),s=require("./use-fadein"),u=require("./highlighter"),c=document.createElement("style");c.type="text/css",document.head.appendChild(c);const f={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"normal",userSelect:"text",wordBreak:"normal"},h=(0,n.observer)(({textNodeRef:e,element:n,onBlur:r,selectAll:l,cursorPosition:a})=>{const[i,d]=t.default.useState(f),s=e.current;t.default.useLayoutEffect(()=>{const e={};e.width=s.width()-2*s.padding()+"px",e.height=s.height()-2*s.padding()+10+"px",e.fontSize=s.fontSize()+"px",e.lineHeight=s.lineHeight()+.01,e.fontFamily='"'+s.fontFamily()+'"',e.textAlign=s.align(),e.color=s.fill(),e.fontWeight=n.fontWeight,e.fontStyle=n.fontStyle;const t=`\n .polotno-input::placeholder {\n color: ${i.color};\n opacity: 0.6;\n }\n `;c.innerHTML="",c.appendChild(document.createTextNode(t)),JSON.stringify(e)!==JSON.stringify(i)&&d(e)});const u=t.default.useRef(null);return t.default.useEffect(()=>{var e;const t=u.current;if(!t)return;null===(e=u.current)||void 0===e||e.focus();const n=a||t.value.length;t.selectionStart=t.selectionEnd=n,l&&(null==t||t.select(),document.execCommand("selectAll",!1,null))},[]),t.default.createElement(o.Html,null,t.default.createElement("textarea",{className:"polotno-input",ref:u,style:Object.assign(Object.assign({},f),i),value:n.text,onChange:e=>{n.set({text:e.target.value})},placeholder:n.placeholder,onBlur:r}))}),g=e=>{const[n,r]=t.default.useState(!1),o=t.default.useRef(!1);return t.default.useEffect(()=>{var t=!0;return setTimeout(()=>{t&&(e._editModeEnabled&&(o.current=!0),r(!0),setTimeout(()=>{o.current=!1},50))},50),()=>{t=!1}},[]),{editorEnabled:n&&e._editModeEnabled,selectAll:o.current}},m=(e,n)=>{const[r,o]=t.default.useState(!1);return t.default.useLayoutEffect(()=>{let t=!0;return(async()=>{r&&o(!1),(0,i.incrementLoader)(),await e.loadFont(n),a.default.Util.requestAnimFrame(i.decrementLoader),t&&o(!0)})(),()=>{t=!1}},[n]),[r]};exports.useFontLoader=m;const p=({fontLoaded:e,fontFamily:n,fontSize:r,lineHeight:o})=>t.default.useMemo(()=>{if("number"==typeof o)return o;const e=document.createElement("div");e.style.fontFamily=n,e.style.fontSize=r+"px",e.style.lineHeight=o,e.innerText="Test text",document.body.appendChild(e);const t=e.offsetHeight;return document.body.removeChild(e),t/r},[e,n,r,o]);function y(e){var t=e.getAbsoluteTransform().copy();t.invert();var n=e.getStage().getPointerPosition();return t.point(n)}function x(e){var t;const n=e.target,r=y(n),o=n.textArr,l=Math.floor(r.y/(n.fontSize()*n.lineHeight())),a=o.slice(0,l).reduce((e,t)=>e+t.text.length,l),i=null!==(t=o[l])&&void 0!==t?t:o[0];let d=0;return"right"===n.align()?d=n.width()-i.width:"center"===n.align()&&(d=n.width()/2-i.width/2),a+Math.round((r.x-d)/i.width*i.text.length)}exports.TextElement=(0,n.observer)(({element:e,store:n})=>{const o=t.default.useRef(null),{editorEnabled:a,selectAll:i}=g(e),[c,f]=t.default.useState(!1),m=n.selectedElements.indexOf(e)>=0;t.default.useEffect(()=>{if(e.width)return;const t=o.current;t.width(600),e.set({width:1.4*t.getTextWidth()})},[]),t.default.useEffect(()=>{const t=o.current;e.height!==t.height()&&e.set({height:t.height()})}),t.default.useLayoutEffect(()=>(0,l.autorun)(()=>{const t=o.current;(0,d.applyFilter)(t,e)}));const[y]=(0,exports.useFontLoader)(n,e.fontFamily);t.default.useLayoutEffect(()=>{const t=o.current;t&&(t.width(t.width()+1e-8),t._setTextData(),(0,d.applyFilter)(t,e))},[y]);const E=t.default.useRef(null),S=t.default.useRef(0),v=t=>{n.selectedElements.find(t=>t===e)&&!e.locked&&(S.current=x(t),e.toggleEditMode())},w=!e.text&&e.placeholder,b=e._editModeEnabled?0:w?.6:e.opacity;(0,s.useFadeIn)(o,b);const T=p({fontLoaded:y,fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight}),F=e.selectable||"admin"===n.role;return t.default.createElement(t.default.Fragment,null,t.default.createElement(r.Text,{ref:o,id:e.id,name:"element",hideOnExport:!e.showInExport,x:e.x,y:e.y,rotation:e.rotation,width:e.width,text:e.text||e.placeholder,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle+" "+e.fontWeight,textDecoration:e.textDecoration,align:e.align,draggable:!e.locked,opacity:b,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,lineHeight:T,letterSpacing:e.letterSpacing*e.fontSize,listening:F,onDragStart:()=>{n.history.startTransaction()},onDragMove:t=>{setTimeout(()=>{e.set({x:t.target.x(),y:t.target.y()})})},onDragEnd:t=>{e.set({x:t.target.x(),y:t.target.y()}),n.history.endTransaction()},onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)},onClick:v,onTap:v,onTransformStart:()=>{n.history.startTransaction()},onTransform:t=>{var n;const r=(null===(n=t.target.getStage())||void 0===n?void 0:n.findOne("Transformer")).getActiveAnchor();if("middle-left"===r||"middle-right"===r){const n=t.target.scaleX(),r=t.target.width()*n,o=e.fontSize;let l=r;r<o&&(l=o,E.current&&t.target.position(E.current)),t.target.width(l),t.target.scaleX(1),(0,d.applyFilter)(t.target,e)}t.target.strokeWidth(e.strokeWidth/t.target.scaleX()),E.current=t.target.position()},onTransformEnd:t=>{const r=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),t.target.strokeWidth(e.strokeWidth),e.set({fontSize:Math.round(e.fontSize*r),width:Math.ceil(t.target.width()*r),x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()}),n.history.endTransaction()}}),a&&t.default.createElement(r.Group,{x:e.x,y:e.y,rotation:e.rotation},t.default.createElement(h,{textNodeRef:o,element:e,selectAll:i,cursorPosition:S.current,onBlur:()=>{e.toggleEditMode(!1)}})),(c||m)&&t.default.createElement(u.Highlighter,{element:e}))});
|
|
741
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug","react-konva-utils":"jXQU","mobx":"BzvP","konva":"aTGn","../utils/loader":"bN4e","./apply-filters":"SIWI","./use-fadein":"N3c2","./highlighter":"cEy1"}],"Vshz":[function(require,module,exports) {
|
|
742
|
-
var t;(t=t||{}).stringify=function(){var t={"visit_linear-gradient":function(i){return t.visit_gradient(i)},"visit_repeating-linear-gradient":function(i){return t.visit_gradient(i)},"visit_radial-gradient":function(i){return t.visit_gradient(i)},"visit_repeating-radial-gradient":function(i){return t.visit_gradient(i)},visit_gradient:function(i){var r=t.visit(i.orientation);return r&&(r+=", "),i.type+"("+r+t.visit(i.colorStops)+")"},visit_shape:function(i){var r=i.value,n=t.visit(i.at),e=t.visit(i.style);return e&&(r+=" "+e),n&&(r+=" at "+n),r},"visit_default-radial":function(i){var r="",n=t.visit(i.at);return n&&(r+=n),r},"visit_extent-keyword":function(i){var r=i.value,n=t.visit(i.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(i){return t.visit(i.value.x)+" "+t.visit(i.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(i){return t.visit_color(i.value,i)},visit_hex:function(i){return t.visit_color("#"+i.value,i)},visit_rgb:function(i){return t.visit_color("rgb("+i.value.join(", ")+")",i)},visit_rgba:function(i){return t.visit_color("rgba("+i.value.join(", ")+")",i)},visit_color:function(i,r){var n=i,e=t.visit(r.length);return e&&(n+=" "+e),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(i){var r="",n=i.length;return i.forEach(function(i,e){r+=t.visit(i),e<n-1&&(r+=", ")}),r},visit:function(i){if(!i)return"";if(i instanceof Array)return t.visit_array(i,"");if(i.type){var r=t["visit_"+i.type];if(r)return r(i);throw Error("Missing visitor visit_"+i.type)}throw Error("Invalid node.")}};return function(i){return t.visit(i)}}(),(t=t||{}).parse=function(){var t={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},i="";function r(t){var r=new Error(i+": "+t);throw r.source=i,r}function n(){var t=g(e);return i.length>0&&r("Invalid input not EOF"),t}function e(){return a("linear-gradient",t.linearGradient,u)||a("repeating-linear-gradient",t.repeatingLinearGradient,u)||a("radial-gradient",t.radialGradient,s)||a("repeating-radial-gradient",t.repeatingRadialGradient,s)}function a(i,n,e){return o(n,function(n){var a=e();return a&&(h(t.comma)||r("Missing comma before color stops")),{type:i,orientation:a,colorStops:g(d)}})}function o(i,n){var e=h(i);if(e){h(t.startCall)||r("Missing (");var a=n(e);return h(t.endCall)||r("Missing )"),a}}function u(){return y("directional",t.sideOrCorner,1)||y("angular",t.angleValue,1)}function s(){var r,n,e=l();return e&&((r=[]).push(e),n=i,h(t.comma)&&((e=l())?r.push(e):i=n)),r}function l(){var t=function(){var t=y("shape",/^(circle)/i,0);t&&(t.style=_()||v());return t}()||function(){var t=y("shape",/^(ellipse)/i,0);t&&(t.style=m()||v());return t}();if(t)t.at=c();else{var i=v();if(i){t=i;var r=c();r&&(t.at=r)}else{var n=f();n&&(t={type:"default-radial",at:n})}}return t}function v(){return y("extent-keyword",t.extentKeywords,1)}function c(){if(y("position",/^at/,0)){var t=f();return t||r("Missing positioning value"),t}}function f(){var t={x:m(),y:m()};if(t.x||t.y)return{type:"position",value:t}}function g(i){var n=i(),e=[];if(n)for(e.push(n);h(t.comma);)(n=i())?e.push(n):r("One extra comma");return e}function d(){var i=y("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:g(p)}})||o(t.rgbColor,function(){return{type:"rgb",value:g(p)}})||y("literal",t.literalColor,0);return i||r("Expected color definition"),i.length=m(),i}function p(){return h(t.number)[1]}function m(){return y("%",t.percentageValue,1)||y("position-keyword",t.positionKeywords,1)||_()}function _(){return y("px",t.pixelValue,1)||y("em",t.emValue,1)}function y(t,i,r){var n=h(i);if(n)return{type:t,value:n[r]}}function h(t){var r,n;return(n=/^[\n\r\t\s]+/.exec(i))&&b(n[0].length),(r=t.exec(i))&&b(r[0].length),r}function b(t){i=i.substr(t)}return function(t){return i=t.toString(),n()}}(),exports.parse=t.parse,exports.stringify=t.stringify;
|
|
743
|
-
},{}],"V8he":[function(require,module,exports) {
|
|
744
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseColor=exports.isGradient=void 0;const r=e(require("gradient-parser")),t=e=>e.indexOf("linear-gradient")>=0;exports.isGradient=t;const o=e=>"hex"===e.type?"#"+e.value:"literal"===e.type?e.value:`${e.type}(${e.value.join(",")})`,s=e=>{if(!(0,exports.isGradient)(e))return[0,e,e];const t=r.default.parse(e)[0],s=parseFloat(t.orientation.value),a=t.colorStops[0],i=o(a),n=t.colorStops[1];return[s,i,o(n)]};exports.parseColor=s;
|
|
745
|
-
},{"gradient-parser":"Vshz"}],"B1DI":[function(require,module,exports) {
|
|
746
|
-
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.replaceColors=exports.fixSize=exports.getSvgSize=exports.svgToURL=exports.getColors=exports.urlToString=exports.urlToBase64=void 0;const e=t(require("konva")),r=require("./gradient");function o(t){for(;t.parentNode;){if("defs"===t.nodeName)return!0;t=t.parentNode}return!1}function n(t){const e={fill:"",stroke:""};return t.getAttribute("fill")&&"none"!==t.getAttribute("fill")&&(e.fill=t.getAttribute("fill")),!e.fill&&t.style.fill&&"none"!==t.style.fill&&(e.fill=t.style.fill),t.getAttribute("stroke")&&(e.stroke=t.getAttribute("stroke")),!e.stroke&&t.style.stroke&&(e.stroke=t.style.stroke),e.stroke||e.fill||(e.fill="black"),e}const i=["path","rect","circle"];function s(t){for(var e=[],r=t.getElementsByTagName("*"),n=0,s=r.length;n<s;n++){const t=r[n];o(t)||(null!==t.getAttribute("fill")&&e.push(t),(null!==t.getAttribute("stroke")||t.style&&t.style.fill||i.indexOf(t.nodeName)>=0)&&e.push(t))}return e}async function l(t){const e=await fetch(t);return c(await e.text())}async function a(t){const e=await fetch(t,{mode:"cors"});return await e.text()}function u(t){const r=s((new DOMParser).parseFromString(t,"image/svg+xml")),o=[];return r.forEach(t=>{const{fill:r,stroke:i}=n(t);[r,i].forEach(t=>{t&&e.default.Util.colorToRGBA(t)&&-1===o.indexOf(t)&&o.push(t)})}),o}function c(t){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(t)))}async function f(t){const e=await a(t),r=(new DOMParser).parseFromString(e,"image/svg+xml").documentElement.getAttribute("viewBox"),[o,n,i,s]=(null==r?void 0:r.split(" "))||[];return{width:parseFloat(i),height:parseFloat(s)}}function p(t){var e=(new DOMParser).parseFromString(t,"image/svg+xml");const r=e.documentElement.getAttribute("viewBox"),[o,n,i,s]=(null==r?void 0:r.split(" "))||[];return e.documentElement.getAttribute("width")||e.documentElement.setAttribute("width",i+"px"),e.documentElement.getAttribute("height")||e.documentElement.setAttribute("height",s+"px"),(new XMLSerializer).serializeToString(e)}exports.urlToBase64=l,exports.urlToString=a,exports.getColors=u,exports.svgToURL=c,exports.getSvgSize=f,exports.fixSize=p;const g=(t,e)=>!(!e||!e)&&t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a;function d(t,r,o,n){var i=t.namespaceURI,s=document.createElementNS(i,"linearGradient");const l=e.default.Util.degToRad(o+90),a=(Math.cos(l)+1)/2,u=(Math.sin(l)+1)/2,c=(Math.cos(l+Math.PI)+1)/2,f=(Math.sin(l+Math.PI)+1)/2;s.setAttribute("x1",100*a+"%"),s.setAttribute("y1",100*u+"%"),s.setAttribute("x2",100*c+"%"),s.setAttribute("y2",100*f+"%"),s.setAttribute("gradientUnits","userSpaceOnUse"),s.setAttribute("id",r);for(var p=0;p<n.length;p++){var g=n[p],d=document.createElementNS(i,"stop");for(var m in g)g.hasOwnProperty(m)&&d.setAttribute(m,g[m]);s.appendChild(d)}return(t.querySelector("defs")||t.insertBefore(document.createElementNS(i,"defs"),t.firstChild)).appendChild(s)}function m(t,o){var i=(new DOMParser).parseFromString(t,"image/svg+xml");const l=s(i),a=Array.from(o.keys());return l.forEach(t=>{const{fill:s,stroke:l}=n(t);[{prop:"fill",color:s},{prop:"stroke",color:l}].forEach(({prop:n,color:s})=>{const l=a.find(t=>{return r=e.default.Util.colorToRGBA(t),!(!(o=e.default.Util.colorToRGBA(s))||!o)&&r.r===o.r&&r.g===o.g&&r.b===o.b&&r.a===o.a;var r,o});if(l){const e=o.get(l);if((0,r.isGradient)(e)){const[o,s,l]=(0,r.parseColor)(e),a=[{offset:"0%","stop-color":s},{offset:"100%","stop-color":l}],u="color"+Math.round(1e8*Math.random());d(i.children[0],u,o,a),t.style[n]=null,t.setAttribute(n,`url('#${u}')`)}else t.style[n]=o.get(l)}})}),c((new XMLSerializer).serializeToString(i))}exports.replaceColors=m;
|
|
747
|
-
},{"konva":"aTGn","./gradient":"V8he"}],"VbEp":[function(require,module,exports) {
|
|
748
|
-
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,a){void 0===a&&(a=r),Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,a){void 0===a&&(a=r),e[a]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var a={};if(null!=r)for(var i in r)"default"!==i&&Object.prototype.hasOwnProperty.call(r,i)&&e(a,r,i);return t(a,r),a},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ImageElement=exports.useImageLoader=exports.setImageLoaderHook=void 0;const i=a(require("react")),o=require("mobx-react-lite"),n=require("mobx"),h=require("react-konva"),d=a(require("use-image")),l=a(require("konva")),c=require("react-konva-utils"),s=require("./highlighter"),u=require("../utils/loader"),g=r(require("../utils/svg")),f=require("./apply-filters"),m=require("./use-fadein");async function p(e){if(!(e.indexOf("data:image/svg+xml")>=0||e.indexOf(".svg")>=0))return e;const t=await g.urlToString(e),r=g.fixSize(t);return g.svgToURL(r)}const w=e=>{const[t,r]=i.default.useState(e);return i.default.useEffect(()=>{(async()=>{const a=await p(e);a!==t&&r(a)})()},[e]),t},x=(e,t,r)=>i.default.useMemo(()=>{var a,i;const{flipX:o,flipY:n}=e,h="svg"===e.type||e.src.indexOf("data:image/svg+xml")>=0||e.src.indexOf(".svg")>=0;if(!o&&!n&&!h)return t;if(!t||!t.width||!t.height)return null;const d=document.createElement("canvas");let l=1;"svg"===e.type&&(l=Math.max(e.width/t.width*r,e.height/t.height*r)),d.width=Math.max(t.width*l,1),d.height=Math.max(t.height*l,1);let c=o?-d.width:0,s=n?-d.height:0;return null===(a=d.getContext("2d"))||void 0===a||a.scale(o?-1:1,n?-1:1),null===(i=d.getContext("2d"))||void 0===i||i.drawImage(t,c,s,d.width,d.height),d},[e.flipX,e.flipY,t,e.width,e.height,r]);function y(e,t){const r=t.width/t.height;let a,i;return r>=e.width/e.height?(a=e.width,i=e.width/r):(a=e.height*r,i=e.height),{x:(e.width-a)/2,y:(e.height-i)/2,width:a,height:i}}const M=(e,t)=>{const[r,a]=S(e.maskSrc,"anonymous"),o=e.maskSrc?a:"loaded";return(0,exports.useImageLoader)(o),i.default.useMemo(()=>{if(!r)return t;if(!t||!t.width||!t.height)return t;const a=document.createElement("canvas");a.width=Math.max(t.width,1),a.height=Math.max(t.height,1);const i=a.getContext("2d");if(!i)return t;i.drawImage(t,0,0),i.globalCompositeOperation="source-in";const o=y(r,e);return i.drawImage(r,o.x,o.y,o.width,o.height,0,0,t.width,t.height),a},[t,r,e.width,e.height])},E=(e,t,r,a,o=0)=>{const n=i.default.useMemo(()=>{if(t&&t.width&&t.height)return document.createElement("canvas")},[t]);return i.default.useLayoutEffect(()=>{if(!n||!t)return;const i=Math.max(e.width*a,1),h=Math.max(e.height*a,1);n.width=i,n.height=h;const d=n.getContext("2d");if(!d)return;const l=Math.min(o*a,i/2,h/2);l&&(d.beginPath(),d.moveTo(l,0),d.lineTo(i-l,0),d.arc(i-l,l,l,3*Math.PI/2,0,!1),d.lineTo(i,h-l),d.arc(i-l,h-l,l,0,Math.PI/2,!1),d.lineTo(l,h),d.arc(l,h-l,l,Math.PI/2,Math.PI,!1),d.lineTo(0,l),d.arc(l,l,l,Math.PI,3*Math.PI/2,!1),d.clip()),d.drawImage(t,r.x,r.y,r.width,r.height,0,0,n.width,n.height)},[n,e.width,e.height,r.x,r.y,r.width,r.height,o,a]),n},b=(e,t,r,a)=>{const o=w(e.clipSrc||""),[n]=S(o,"anonymous"),h=i.default.useMemo(()=>{if(t&&n)return document.createElement("canvas")},[t,n]);return i.default.useLayoutEffect(()=>{var a;if(!n)return;if(!t||!t.width||!t.height)return;if(!n||!n.width||!n.height)return;if(!h)return;const i=document.createElement("canvas"),o=Math.max(e.width/n.width*r,e.height/n.height*r);i.width=n.width*o,i.height=n.height*o,null===(a=i.getContext("2d"))||void 0===a||a.drawImage(n,0,0,i.width,i.height),h.width=Math.max(t.width,1),h.height=Math.max(t.height,1);const d=h.getContext("2d");d&&(d.save(),d.drawImage(i,0,0,t.width,t.height),d.globalCompositeOperation="source-in",d.drawImage(t,0,0,h.width,h.height),d.restore())},[h,t,n,e.width,e.height,r,...a]),e.clipSrc&&n?h:t},v=document.createElement("canvas"),I=(0,o.observer)(({element:e})=>{const t=Math.min(30,e.width/4,e.height/4),r=i.default.useRef(null);return i.default.useEffect(()=>{const e=r.current;if(!e)return;const t=new l.default.Animation(t=>{e.rotate(((null==t?void 0:t.timeDiff)||0)/2)},e.getLayer());return t.start(),()=>{t.stop()}}),i.default.createElement(h.Group,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.opacity,hideInExport:!e.showInExport},i.default.createElement(h.Rect,{width:e.width,height:e.height,fill:"rgba(124, 173, 212, 0.8)"}),i.default.createElement(h.Arc,{ref:r,x:e.width/2,y:e.height/2,fill:"white",outerRadius:Math.abs(t),innerRadius:Math.max(1,t-5),angle:270}))}),_=(0,o.observer)(({element:e})=>{const t="Can not load the image...",r=Math.max(10,Math.min(30,e.width/t.length));return i.default.createElement(h.Group,{x:e.x,y:e.y,rotation:e.rotation,listening:!1,opacity:e.opacity,hideInExport:!e.showInExport},i.default.createElement(h.Rect,{width:e.width,height:e.height,fill:"rgba(223, 102, 102, 0.8)"}),i.default.createElement(h.Text,{text:t,fontSize:r,width:e.width,height:e.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let S=d.default;const R=e=>{S=e};exports.setImageLoaderHook=R;const T=e=>{const t=i.default.useRef(e);return i.default.useEffect(()=>{t.current=e},[e]),t.current},X=e=>{const t=T(e);i.default.useLayoutEffect(()=>{"loading"===e&&(0,u.incrementLoader)(),"loading"!==t||"loaded"!==e&&"failed"!==e||(0,u.decrementLoader)()},[t,e])};exports.useImageLoader=X;const Y=({image:e,status:t,type:r})=>{const a=i.default.useRef();return i.default.useEffect(()=>{a.current=e||a.current},[e]),"failed"!==t||"failed"!==t&&"svg"===r?a.current:void 0};exports.ImageElement=(0,o.observer)(({element:e,store:t})=>{var r;const[a,o]=i.default.useState(!1),d=i.default.useRef(null),l=i.default.useRef(null),[u,g]=i.default.useState(!1),p=t.selectedElements.indexOf(e)>=0,[w,y]=S(e.__finalSrc||e.src,"anonymous");(0,exports.useImageLoader)(y);const R="svg"!==e.type||e.__isLoaded?y:"loading";(0,exports.useImageLoader)(R);const T=Y({image:w,status:y,type:e.type}),X=M(e,x(e,w||T,t._elementsPixelRatio))||v;let{cropX:k,cropY:L,cropWidth:P,cropHeight:C}=e;"loaded"!==y&&(k=L=0,P=C=1);const W=X.width*P,O=X.height*C,H=e.width/e.height;let q,A;const z=W/O,D="svg"===e.type;D?(q=W,A=O):H>=z?(q=W,A=W/H):(q=O*H,A=O);const F={x:X.width*k,y:X.height*L,width:q,height:A},B=null!==(r=e.cornerRadius)&&void 0!==r?r:0;let j=b(e,E(e,X,F,t._elementsPixelRatio,B),t._elementsPixelRatio,[F,B,t._elementsPixelRatio]);const G=Math.max(e.width/q,e.height/A);i.default.useEffect(()=>{var t;if(!e._cropModeEnabled)return;const r=null===(t=d.current)||void 0===t?void 0:t.getStage();function a(t){e._cropModeEnabled&&t.target!==l.current&&e.toggleCropMode(!1)}function i(t){e._cropModeEnabled&&"CANVAS"!==t.target.nodeName&&e.toggleCropMode(!1)}return document.body.addEventListener("click",i),null==r||r.on("click",a),null==r||r.on("tap",a),()=>{document.body.removeEventListener("click",i),document.body.removeEventListener("touchstart",i),null==r||r.off("click",a),null==r||r.off("click",a)}},[e._cropModeEnabled]),i.default.useLayoutEffect(()=>{if(!a&&!e._cropModeEnabled)return(0,f.applyFilter)(d.current,e),(0,n.autorun)(()=>{(0,f.applyFilter)(d.current,e)},{delay:100})},[X,a,P,C,e._cropModeEnabled]),i.default.useLayoutEffect(()=>{var t;a||e._cropModeEnabled?null===(t=d.current)||void 0===t||t.clearCache():(0,f.applyFilter)(d.current,e)},[a,e.width,e.height,e._cropModeEnabled]),i.default.useEffect(()=>{(0,f.applyFilter)(d.current,e)},[e.shadowEnabled,e.shadowBlur]);const N=i.default.useRef(null),U=i.default.useRef(null),V=i.default.useRef(null);i.default.useLayoutEffect(()=>{e._cropModeEnabled&&(U.current.nodes([N.current]),V.current.nodes([l.current]))},[e._cropModeEnabled]);const J=t=>{Math.round(t.target.x())>0&&(t.target.x(0),t.target.scaleX(1)),Math.round(t.target.y())>0&&(t.target.y(0),t.target.scaleY(1));const r=t.target.width()*t.target.scaleX(),a=t.target.height()*t.target.scaleY(),i=Math.min(1,q/r),o=Math.min(1,A/a),n=1-i,h=Math.min(n,Math.max(0,Math.round(-t.target.x())/r)),d=1-o,l=Math.min(d,Math.max(0,Math.round(-t.target.y())/a));t.target.setAttrs({x:-h*X.width,y:-l*X.height,scaleX:1,scaleY:1}),e.set({cropX:h,cropY:l,cropWidth:i,cropHeight:o})},K=()=>{"svg"!==e.type&&(e.locked||setTimeout(()=>{e.toggleCropMode(!0)}))},Q="svg"===e.type&&T,Z="loading"===y&&!Q,$="failed"===y,ee=!Z&&!$,te=i.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),re=ee?e.opacity:0;(0,m.useFadeIn)(d,re);const ae=e.selectable||"admin"===t.role;return i.default.createElement(i.default.Fragment,null,Z&&i.default.createElement(I,{element:e}),$&&i.default.createElement(_,{element:e}),i.default.createElement(h.Image,{ref:d,name:"element",id:e.id,image:j,x:e.x,y:e.y,width:e.width||1,height:e.height||1,rotation:e.rotation,opacity:re,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,customCrop:F,listening:ae,draggable:!e.locked,hideInExport:!e.showInExport,onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onDragStart:()=>{t.history.startTransaction()},onDragMove:t=>{setTimeout(()=>{e.set({x:t.target.x(),y:t.target.y()})})},onDragEnd:r=>{e.set({x:r.target.x(),y:r.target.y()}),t.history.endTransaction()},onDblClick:K,onDblTap:K,onTransformStart:()=>{o(!0),t.history.startTransaction(),te.current={cropX:e.cropX,cropY:e.cropY,cropWidth:e.cropWidth,cropHeight:e.cropHeight}},onTransform:t=>{var r;const a=t.currentTarget,i=Math.abs(a.scaleX()-1)<1e-7?1:a.scaleX(),o=Math.abs(a.scaleY()-1)<1e-7?1:a.scaleY();a.scaleX(1),a.scaleY(1);const n=null===(r=t.target.getStage())||void 0===r?void 0:r.findOne("Transformer"),h=1-q/X.width,d=Math.min(h,Math.max(0,e.cropX)),l=1-A/X.height,c=Math.min(l,Math.max(0,e.cropY)),s=n.getActiveAnchor(),u=!(s.indexOf("middle")>=0||s.indexOf("center")>=0),g=!u&&i<1&&te.current.cropHeight>A/X.height;let f=u?e.cropWidth:e.cropWidth*i;g&&(f=e.cropWidth);const m=!u&&o<1&&te.current.cropWidth>q/X.width;let p=u?e.cropHeight:e.cropHeight*o;m&&(p=e.cropHeight),D&&(f=e.cropWidth,p=e.cropHeight),e.set({cropX:d,cropY:c,x:a.x(),y:a.y(),width:a.width()*i,height:a.height()*o,rotation:t.target.rotation(),cropWidth:Math.min(f,1-d),cropHeight:Math.min(p,1-c)})},onTransformEnd:r=>{const a=r.currentTarget;e.set({width:a.width(),height:a.height(),x:a.x(),y:a.y(),rotation:r.target.rotation(),cropWidth:q/X.width,cropHeight:A/X.height}),o(!1),t.history.endTransaction()}}),i.default.createElement(h.Rect,{x:e.x,y:e.y,width:e.width-e.borderSize,height:e.height-e.borderSize,offsetX:-e.borderSize/2,offsetY:-e.borderSize/2,stroke:e.borderColor,strokeWidth:e.borderSize,listening:!1,visible:!!e.borderSize,rotation:e.rotation,cornerRadius:Math.max(0,B-e.borderSize),hideInExport:!e.showInExport}),e._cropModeEnabled&&i.default.createElement(c.Portal,{selector:".page-abs-container",enabled:!0},i.default.createElement(h.Rect,{x:-1500,y:-1500,width:4500,height:4500,fill:"rgba(0,0,0,0.3)"}),i.default.createElement(h.Image,{listening:!1,image:j,x:e.x,y:e.y,width:e.width,height:e.height,rotation:e.rotation,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur}),i.default.createElement(h.Group,{x:e.x,y:e.y,rotation:e.rotation,scaleX:G,scaleY:G},i.default.createElement(h.Image,{image:X,ref:l,opacity:.4,draggable:!0,x:-e.cropX*X.width,y:-e.cropY*X.height,onDragMove:J,onTransform:J}),i.default.createElement(h.Transformer,{ref:V,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),i.default.createElement(h.Rect,{width:q,height:A,ref:N,listening:!1,onTransform:t=>{t.target.x()<-e.cropX*X.width-1e-9&&(t.target.x(-e.cropX*X.width),t.target.scaleX(1)),t.target.y()<-e.cropY*X.height-1e-9&&(t.target.y(-e.cropY*X.height),t.target.scaleY(1));const r=Math.min(1,Math.max(0,e.cropX+t.target.x()/X.width)),a=Math.min(1,Math.max(0,t.target.y()/X.height+e.cropY)),i=t.target.width()*t.target.scaleX(),o=t.target.height()*t.target.scaleY(),n=Math.min(1-r,i/X.width),h=Math.min(1-a,o/X.height),d=t.target.getAbsolutePosition(t.target.getParent().getParent());t.target.scale({x:1,y:1}),t.target.position({x:0,y:0}),e.set({x:d.x,y:d.y,cropX:r,cropY:a,cropWidth:n,cropHeight:h,width:Math.min(i*G,X.width*(1-r)*G),height:Math.min(o*G,X.height*(1-a)*G)})}}),i.default.createElement(h.Transformer,{ref:U,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(e,t)=>t.width<5||t.height<5?e:t,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(u||p)&&i.default.createElement(s.Highlighter,{element:e}))});
|
|
749
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","mobx":"BzvP","react-konva":"Sgug","use-image":"MJM3","konva":"aTGn","react-konva-utils":"jXQU","./highlighter":"cEy1","../utils/loader":"bN4e","../utils/svg":"B1DI","./apply-filters":"SIWI","./use-fadein":"N3c2"}],"FRly":[function(require,module,exports) {
|
|
750
|
-
"use strict";exports.byteLength=u,exports.toByteArray=i,exports.fromByteArray=d;for(var r=[],t=[],e="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],t[n.charCodeAt(o)]=o;function h(r){var t=r.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=r.indexOf("=");return-1===e&&(e=t),[e,e===t?0:4-e%4]}function u(r){var t=h(r),e=t[0],n=t[1];return 3*(e+n)/4-n}function c(r,t,e){return 3*(t+e)/4-e}function i(r){var n,o,a=h(r),u=a[0],i=a[1],f=new e(c(r,u,i)),A=0,d=i>0?u-4:u;for(o=0;o<d;o+=4)n=t[r.charCodeAt(o)]<<18|t[r.charCodeAt(o+1)]<<12|t[r.charCodeAt(o+2)]<<6|t[r.charCodeAt(o+3)],f[A++]=n>>16&255,f[A++]=n>>8&255,f[A++]=255&n;return 2===i&&(n=t[r.charCodeAt(o)]<<2|t[r.charCodeAt(o+1)]>>4,f[A++]=255&n),1===i&&(n=t[r.charCodeAt(o)]<<10|t[r.charCodeAt(o+1)]<<4|t[r.charCodeAt(o+2)]>>2,f[A++]=n>>8&255,f[A++]=255&n),f}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function A(r,t,e){for(var n,o=[],a=t;a<e;a+=3)n=(r[a]<<16&16711680)+(r[a+1]<<8&65280)+(255&r[a+2]),o.push(f(n));return o.join("")}function d(t){for(var e,n=t.length,o=n%3,a=[],h=0,u=n-o;h<u;h+=16383)a.push(A(t,h,h+16383>u?u:h+16383));return 1===o?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")}t["-".charCodeAt(0)]=62,t["_".charCodeAt(0)]=63;
|
|
751
|
-
},{}],"Quj6":[function(require,module,exports) {
|
|
752
|
-
exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<<w)-1,e=f>>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<<e)-1,N=i>>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<<h|w,e+=h;e>0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l};
|
|
753
|
-
},{}],"aqZJ":[function(require,module,exports) {
|
|
754
|
-
var r={}.toString;module.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)};
|
|
755
|
-
},{}],"aMB2":[function(require,module,exports) {
|
|
756
|
-
|
|
757
|
-
var global = arguments[3];
|
|
758
|
-
var t=arguments[3],r=require("base64-js"),e=require("ieee754"),n=require("isarray");function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(o()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,e){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return s(this,t,r,e)}function s(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?g(t,r,e,n):"string"==typeof r?l(t,r,e):y(t,r)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function a(t,r,e,n){return h(r),r<=0?u(t,r):void 0!==e?"string"==typeof n?u(t,r).fill(e,n):u(t,r).fill(e):u(t,r)}function c(t,r){if(h(r),t=u(t,r<0?0:0|w(r)),!f.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function l(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|v(r,e),i=(t=u(t,n)).write(r,e);return i!==n&&(t=t.slice(0,i)),t}function p(t,r){var e=r.length<0?0:0|w(r.length);t=u(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function g(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.prototype:t=p(t,r),t}function y(t,r){if(f.isBuffer(r)){var e=0|w(r.length);return 0===(t=u(t,e)).length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||W(r.length)?u(t,0):p(t,r);if("Buffer"===r.type&&n(r.data))return p(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function w(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function d(t){return+t!=t&&(t=0),f.alloc(+t)}function v(t,r){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return K(t).length;default:if(n)return $(t).length;r=(""+r).toLowerCase(),n=!0}}function E(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,r,e);case"utf8":case"utf-8":return Y(this,r,e);case"ascii":return L(this,r,e);case"latin1":case"binary":return D(this,r,e);case"base64":return S(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function R(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=f.from(r,n)),f.isBuffer(r))return 0===r.length?-1:_(t,r,e,n,i);if("number"==typeof r)return r&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):_(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,r,e,n,i){var o,u=1,f=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,s/=2,e/=2}function h(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var a=-1;for(o=e;o<f;o++)if(h(t,o)===h(r,-1===a?0:o-a)){if(-1===a&&(a=o),o-a+1===s)return a*u}else-1!==a&&(o-=o-a),a=-1}else for(e+s>f&&(e=f-s),o=e;o>=0;o--){for(var c=!0,l=0;l<s;l++)if(h(t,o+l)!==h(r,l)){c=!1;break}if(c)return o}return-1}function A(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function m(t,r,e,n){return Q($(r,t.length-e),t,e,n)}function P(t,r,e,n){return Q(G(r),t,e,n)}function T(t,r,e,n){return P(t,r,e,n)}function B(t,r,e,n){return Q(K(r),t,e,n)}function U(t,r,e,n){return Q(H(r,t.length-e),t,e,n)}function S(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function Y(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o,u,f,s,h=t[i],a=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=e)switch(c){case 1:h<128&&(a=h);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&h)<<6|63&o)>127&&(a=s);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(s=(15&h)<<12|(63&o)<<6|63&u)>2047&&(s<55296||s>57343)&&(a=s);break;case 4:o=t[i+1],u=t[i+2],f=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&f)&&(s=(15&h)<<18|(63&o)<<12|(63&u)<<6|63&f)>65535&&s<1114112&&(a=s)}null===a?(a=65533,c=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=c}return O(n)}exports.Buffer=f,exports.SlowBuffer=d,exports.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),exports.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,e){return s(null,t,r,e)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,e){return a(null,t,r,e)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},f.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},f.concat=function(t,r){if(!n(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var i=f.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(i,o),o+=u.length}return i},f.byteLength=v,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)b(this,r,r+1);return this},f.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},f.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Y(this,0,t):E.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=exports.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,r,e,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),s=Math.min(o,u),h=this.slice(n,i),a=t.slice(r,e),c=0;c<s;++c)if(h[c]!==a[c]){o=h[c],u=a[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},f.prototype.indexOf=function(t,r,e){return R(this,t,r,e,!0)},f.prototype.lastIndexOf=function(t,r,e){return R(this,t,r,e,!1)},f.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return A(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return P(this,t,r,e);case"latin1":case"binary":return T(this,t,r,e);case"base64":return B(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function O(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=I));return e}function L(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function D(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function x(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=Z(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function k(t,r,e,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function N(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function z(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function F(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function j(t,r,n,i,o){return o||F(t,r,n,4,3.4028234663852886e38,-3.4028234663852886e38),e.write(t,r,n,i,23,4),n+4}function q(t,r,n,i,o){return o||F(t,r,n,8,1.7976931348623157e308,-1.7976931348623157e308),e.write(t,r,n,i,52,8),n+8}f.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),f.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;e=new f(i,void 0);for(var o=0;o<i;++o)e[o]=this[o+t]}return e},f.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},f.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},f.prototype.readUInt8=function(t,r){return r||M(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||M(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||M(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*r)),n},f.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||M(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},f.prototype.readInt8=function(t,r){return r||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||M(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt16BE=function(t,r){r||M(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},f.prototype.readInt32LE=function(t,r){return r||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||M(t,4,this.length),e.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||M(t,8,this.length),e.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},f.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||k(this,t,r,e,Math.pow(2,8*e)-1,0);var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},f.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):z(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);k(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},f.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):N(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):N(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):z(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||k(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):z(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,e){return j(this,t,r,!0,e)},f.prototype.writeFloatBE=function(t,r,e){return j(this,t,r,!1,e)},f.prototype.writeDoubleLE=function(t,r,e){return q(this,t,r,!0,e)},f.prototype.writeDoubleBE=function(t,r,e){return q(this,t,r,!1,e)},f.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},f.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var o;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var u=f.isBuffer(t)?t:$(new f(t,n).toString()),s=u.length;for(o=0;o<e-r;++o)this[o+r]=u[o%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function X(t){if((t=J(t).replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Z(t){return t<16?"0"+t.toString(16):t.toString(16)}function $(t,r){var e;r=r||1/0;for(var n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function G(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,i=e%256,o.push(i),o.push(n);return o}function K(t){return r.toByteArray(X(t))}function Q(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function W(t){return t!=t}
|
|
759
|
-
},{"base64-js":"FRly","ieee754":"Quj6","isarray":"aqZJ","buffer":"aMB2"}],"qREC":[function(require,module,exports) {
|
|
760
|
-
var define;
|
|
761
|
-
var Buffer = require("buffer").Buffer;
|
|
762
|
-
var t,e=require("buffer").Buffer;!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof t&&t.amd?t([],n):"object"==typeof exports?exports.Quill=n():e.Quill=n()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=109)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(17),o=n(18),i=n(19),l=n(45),a=n(46),s=n(47),u=n(48),c=n(49),f=n(12),h=n(32),p=n(33),d=n(31),y=n(1),v={Scope:y.Scope,create:y.create,find:y.find,query:y.query,register:y.register,Container:r.default,Format:o.default,Leaf:i.default,Embed:u.default,Scroll:l.default,Block:s.default,Inline:a.default,Text:c.default,Attributor:{Attribute:f.default,Class:h.default,Style:p.default,Store:d.default}};e.default=v},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(e){var n=this;return e="[Parchment] "+e,(n=t.call(this,e)||this).message=e,n.name=n.constructor.name,n}return o(e,t),e}(Error);e.ParchmentError=i;var l,a={},s={},u={},c={};function f(t,e){var n;if(void 0===e&&(e=l.ANY),"string"==typeof t)n=c[t]||a[t];else if(t instanceof Text||t.nodeType===Node.TEXT_NODE)n=c.text;else if("number"==typeof t)t&l.LEVEL&l.BLOCK?n=c.block:t&l.LEVEL&l.INLINE&&(n=c.inline);else if(t instanceof HTMLElement){var r=(t.getAttribute("class")||"").split(/\s+/);for(var o in r)if(n=s[r[o]])break;n=n||u[t.tagName]}return null==n?null:e&l.LEVEL&n.scope&&e&l.TYPE&n.scope?n:null}e.DATA_KEY="__blot",function(t){t[t.TYPE=3]="TYPE",t[t.LEVEL=12]="LEVEL",t[t.ATTRIBUTE=13]="ATTRIBUTE",t[t.BLOT=14]="BLOT",t[t.INLINE=7]="INLINE",t[t.BLOCK=11]="BLOCK",t[t.BLOCK_BLOT=10]="BLOCK_BLOT",t[t.INLINE_BLOT=6]="INLINE_BLOT",t[t.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",t[t.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",t[t.ANY=15]="ANY"}(l=e.Scope||(e.Scope={})),e.create=function(t,e){var n=f(t);if(null==n)throw new i("Unable to create "+t+" blot");var r=n,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:r.create(e);return new r(o,e)},e.find=function t(n,r){return void 0===r&&(r=!1),null==n?null:null!=n[e.DATA_KEY]?n[e.DATA_KEY].blot:r?t(n.parentNode,r):null},e.query=f,e.register=function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(e.length>1)return e.map(function(e){return t(e)});var r=e[0];if("string"!=typeof r.blotName&&"string"!=typeof r.attrName)throw new i("Invalid definition");if("abstract"===r.blotName)throw new i("Cannot register abstract class");c[r.blotName||r.attrName]=r,"string"==typeof r.keyName?a[r.keyName]=r:(null!=r.className&&(s[r.className]=r),null!=r.tagName&&(Array.isArray(r.tagName)?r.tagName=r.tagName.map(function(t){return t.toUpperCase()}):r.tagName=r.tagName.toUpperCase(),(Array.isArray(r.tagName)?r.tagName:[r.tagName]).forEach(function(t){null!=u[t]&&null!=r.className||(u[t]=r)})));return r}},function(t,e,n){var r=n(51),o=n(11),i=n(3),l=n(20),a=String.fromCharCode(0),s=function(t){Array.isArray(t)?this.ops=t:null!=t&&Array.isArray(t.ops)?this.ops=t.ops:this.ops=[]};s.prototype.insert=function(t,e){var n={};return 0===t.length?this:(n.insert=t,null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n))},s.prototype.delete=function(t){return t<=0?this:this.push({delete:t})},s.prototype.retain=function(t,e){if(t<=0)return this;var n={retain:t};return null!=e&&"object"==typeof e&&Object.keys(e).length>0&&(n.attributes=e),this.push(n)},s.prototype.push=function(t){var e=this.ops.length,n=this.ops[e-1];if(t=i(!0,{},t),"object"==typeof n){if("number"==typeof t.delete&&"number"==typeof n.delete)return this.ops[e-1]={delete:n.delete+t.delete},this;if("number"==typeof n.delete&&null!=t.insert&&(e-=1,"object"!=typeof(n=this.ops[e-1])))return this.ops.unshift(t),this;if(o(t.attributes,n.attributes)){if("string"==typeof t.insert&&"string"==typeof n.insert)return this.ops[e-1]={insert:n.insert+t.insert},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this;if("number"==typeof t.retain&&"number"==typeof n.retain)return this.ops[e-1]={retain:n.retain+t.retain},"object"==typeof t.attributes&&(this.ops[e-1].attributes=t.attributes),this}}return e===this.ops.length?this.ops.push(t):this.ops.splice(e,0,t),this},s.prototype.chop=function(){var t=this.ops[this.ops.length-1];return t&&t.retain&&!t.attributes&&this.ops.pop(),this},s.prototype.filter=function(t){return this.ops.filter(t)},s.prototype.forEach=function(t){this.ops.forEach(t)},s.prototype.map=function(t){return this.ops.map(t)},s.prototype.partition=function(t){var e=[],n=[];return this.forEach(function(r){(t(r)?e:n).push(r)}),[e,n]},s.prototype.reduce=function(t,e){return this.ops.reduce(t,e)},s.prototype.changeLength=function(){return this.reduce(function(t,e){return e.insert?t+l.length(e):e.delete?t-e.delete:t},0)},s.prototype.length=function(){return this.reduce(function(t,e){return t+l.length(e)},0)},s.prototype.slice=function(t,e){t=t||0,"number"!=typeof e&&(e=1/0);for(var n=[],r=l.iterator(this.ops),o=0;o<e&&r.hasNext();){var i;o<t?i=r.next(t-o):(i=r.next(e-o),n.push(i)),o+=l.length(i)}return new s(n)},s.prototype.compose=function(t){var e=l.iterator(this.ops),n=l.iterator(t.ops),r=[],i=n.peek();if(null!=i&&"number"==typeof i.retain&&null==i.attributes){for(var a=i.retain;"insert"===e.peekType()&&e.peekLength()<=a;)a-=e.peekLength(),r.push(e.next());i.retain-a>0&&n.next(i.retain-a)}for(var u=new s(r);e.hasNext()||n.hasNext();)if("insert"===n.peekType())u.push(n.next());else if("delete"===e.peekType())u.push(e.next());else{var c=Math.min(e.peekLength(),n.peekLength()),f=e.next(c),h=n.next(c);if("number"==typeof h.retain){var p={};"number"==typeof f.retain?p.retain=c:p.insert=f.insert;var d=l.attributes.compose(f.attributes,h.attributes,"number"==typeof f.retain);if(d&&(p.attributes=d),u.push(p),!n.hasNext()&&o(u.ops[u.ops.length-1],p)){var y=new s(e.rest());return u.concat(y).chop()}}else"number"==typeof h.delete&&"number"==typeof f.retain&&u.push(h)}return u.chop()},s.prototype.concat=function(t){var e=new s(this.ops.slice());return t.ops.length>0&&(e.push(t.ops[0]),e.ops=e.ops.concat(t.ops.slice(1))),e},s.prototype.diff=function(t,e){if(this.ops===t.ops)return new s;var n=[this,t].map(function(e){return e.map(function(n){if(null!=n.insert)return"string"==typeof n.insert?n.insert:a;throw new Error("diff() called "+(e===t?"on":"with")+" non-document")}).join("")}),i=new s,u=r(n[0],n[1],e),c=l.iterator(this.ops),f=l.iterator(t.ops);return u.forEach(function(t){for(var e=t[1].length;e>0;){var n=0;switch(t[0]){case r.INSERT:n=Math.min(f.peekLength(),e),i.push(f.next(n));break;case r.DELETE:n=Math.min(e,c.peekLength()),c.next(n),i.delete(n);break;case r.EQUAL:n=Math.min(c.peekLength(),f.peekLength(),e);var a=c.next(n),s=f.next(n);o(a.insert,s.insert)?i.retain(n,l.attributes.diff(a.attributes,s.attributes)):i.push(s).delete(n)}e-=n}}),i.chop()},s.prototype.eachLine=function(t,e){e=e||"\n";for(var n=l.iterator(this.ops),r=new s,o=0;n.hasNext();){if("insert"!==n.peekType())return;var i=n.peek(),a=l.length(i)-n.peekLength(),u="string"==typeof i.insert?i.insert.indexOf(e,a)-a:-1;if(u<0)r.push(n.next());else if(u>0)r.push(n.next(u));else{if(!1===t(r,n.next(1).attributes||{},o))return;o+=1,r=new s}}r.length()>0&&t(r,{},o)},s.prototype.transform=function(t,e){if(e=!!e,"number"==typeof t)return this.transformPosition(t,e);for(var n=l.iterator(this.ops),r=l.iterator(t.ops),o=new s;n.hasNext()||r.hasNext();)if("insert"!==n.peekType()||!e&&"insert"===r.peekType())if("insert"===r.peekType())o.push(r.next());else{var i=Math.min(n.peekLength(),r.peekLength()),a=n.next(i),u=r.next(i);if(a.delete)continue;u.delete?o.push(u):o.retain(i,l.attributes.transform(a.attributes,u.attributes,e))}else o.retain(l.length(n.next()));return o.chop()},s.prototype.transformPosition=function(t,e){e=!!e;for(var n=l.iterator(this.ops),r=0;n.hasNext()&&r<=t;){var o=n.peekLength(),i=n.peekType();n.next(),"delete"!==i?("insert"===i&&(r<t||!e)&&(t+=o),r+=o):t-=Math.min(o,t-r)}return t},t.exports=s},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,o=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===r.call(t)},a=function(t){if(!t||"[object Object]"!==r.call(t))return!1;var e,o=n.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!o&&!i)return!1;for(e in t);return void 0===e||n.call(t,e)},s=function(t,e){o&&"__proto__"===e.name?o(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},u=function(t,e){if("__proto__"===e){if(!n.call(t,e))return;if(i)return i(t,e).value}return t[e]};t.exports=function t(){var e,n,r,o,i,c,f=arguments[0],h=1,p=arguments.length,d=!1;for("boolean"==typeof f&&(d=f,f=arguments[1]||{},h=2),(null==f||"object"!=typeof f&&"function"!=typeof f)&&(f={});h<p;++h)if(null!=(e=arguments[h]))for(n in e)r=u(f,n),f!==(o=u(e,n))&&(d&&o&&(a(o)||(i=l(o)))?(i?(i=!1,c=r&&l(r)?r:[]):c=r&&a(r)?r:{},s(f,{name:n,newValue:t(d,c,o)})):void 0!==o&&s(f,{name:n,newValue:o}));return f}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockEmbed=e.bubbleFormats=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=f(n(3)),l=f(n(2)),a=f(n(0)),s=f(n(16)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,a.default.Embed),r(e,[{key:"attach",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"attach",this).call(this),this.attributes=new a.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return(new l.default).insert(this.value(),(0,i.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(t,e){var n=a.default.query(t,a.default.Scope.BLOCK_ATTRIBUTE);null!=n&&this.attributes.attribute(n,e)}},{key:"formatAt",value:function(t,e,n,r){this.format(n,r)}},{key:"insertAt",value:function(t,n,r){if("string"==typeof n&&n.endsWith("\n")){var i=a.default.create(v.blotName);this.parent.insertBefore(i,0===t?this:this.next),i.insertAt(0,n.slice(0,-1))}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r)}}]),e}();y.scope=a.default.Scope.BLOCK_BLOT;var v=function(t){function e(t){h(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.cache={},n}return d(e,a.default.Block),r(e,[{key:"delta",value:function(){return null==this.cache.delta&&(this.cache.delta=this.descendants(a.default.Leaf).reduce(function(t,e){return 0===e.length()?t:t.insert(e.value(),b(e))},new l.default).insert("\n",b(this))),this.cache.delta}},{key:"deleteAt",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),this.cache={}}},{key:"formatAt",value:function(t,n,r,i){n<=0||(a.default.query(r,a.default.Scope.BLOCK)?t+n===this.length()&&this.format(r,i):o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,Math.min(n,this.length()-t-1),r,i),this.cache={})}},{key:"insertAt",value:function(t,n,r){if(null!=r)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);if(0!==n.length){var i=n.split("\n"),l=i.shift();l.length>0&&(t<this.length()-1||null==this.children.tail?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});var a=this;i.reduce(function(t,e){return(a=a.split(t,!0)).insertAt(0,e),e.length},t+l.length)}}},{key:"insertBefore",value:function(t,n){var r=this.children.head;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n),r instanceof s.default&&r.remove(),this.cache={}}},{key:"length",value:function(){return null==this.cache.length&&(this.cache.length=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"length",this).call(this)+1),this.cache.length}},{key:"moveChildren",value:function(t,n){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"moveChildren",this).call(this,t,n),this.cache={}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.cache={}}},{key:"path",value:function(t){return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t,!0)}},{key:"removeChild",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeChild",this).call(this,t),this.cache={}}},{key:"split",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n&&(0===t||t>=this.length()-1)){var r=this.clone();return 0===t?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}var i=o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"split",this).call(this,t,n);return this.cache={},i}}]),e}();function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return null==t?e:("function"==typeof t.formats&&(e=(0,i.default)(e,t.formats())),null==t.parent||"scroll"==t.parent.blotName||t.parent.statics.scope!==t.statics.scope?e:b(t.parent,e))}v.blotName="block",v.tagName="P",v.defaultChild="break",v.allowedChildren=[u.default,a.default.Embed,c.default],e.bubbleFormats=b,e.BlockEmbed=y,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.overload=e.expandConfig=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n(50);var l=v(n(2)),a=v(n(14)),s=v(n(8)),u=v(n(9)),c=v(n(0)),f=n(15),h=v(f),p=v(n(3)),d=v(n(10)),y=v(n(34));function v(t){return t&&t.__esModule?t:{default:t}}function b(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=(0,d.default)("quill"),m=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=_(e,r),this.container=this.options.container,null==this.container)return g.error("Invalid Quill container",e);this.options.debug&&t.debug(this.options.debug);var o=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new s.default,this.scroll=c.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new a.default(this.scroll),this.selection=new h.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(s.default.events.EDITOR_CHANGE,function(t){t===s.default.events.TEXT_CHANGE&&n.root.classList.toggle("ql-blank",n.editor.isBlank())}),this.emitter.on(s.default.events.SCROLL_UPDATE,function(t,e){var r=n.selection.lastRange,o=r&&0===r.length?r.index:void 0;O.call(n,function(){return n.editor.update(null,e,o)},t)});var i=this.clipboard.convert("<div class='ql-editor' style=\"white-space: normal;\">"+o+"<p><br></p></div>");this.setContents(i),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return i(t,null,[{key:"debug",value:function(t){!0===t&&(t="log"),d.default.level(t)}},{key:"find",value:function(t){return t.__quill||c.default.find(t)}},{key:"import",value:function(t){return null==this.imports[t]&&g.error("Cannot import "+t+". Are you sure it was registered?"),this.imports[t]}},{key:"register",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"!=typeof t){var o=t.attrName||t.blotName;"string"==typeof o?this.register("formats/"+o,t,e):Object.keys(t).forEach(function(r){n.register(r,t[r],e)})}else null==this.imports[t]||r||g.warn("Overwriting "+t+" with",e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&"abstract"!==e.blotName?c.default.register(e):t.startsWith("modules")&&"function"==typeof e.register&&e.register()}}]),i(t,[{key:"addContainer",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof t){var n=t;(t=document.createElement("div")).classList.add(n)}return this.container.insertBefore(t,e),t}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(t,e,n){var r=this,i=w(t,e,n),l=o(i,4);return t=l[0],e=l[1],n=l[3],O.call(this,function(){return r.editor.deleteText(t,e)},n,t,-1*e)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}},{key:"focus",value:function(){var t=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=t,this.scrollIntoView()}},{key:"format",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;return O.call(this,function(){var r=n.getSelection(!0),o=new l.default;if(null==r)return o;if(c.default.query(t,c.default.Scope.BLOCK))o=n.editor.formatLine(r.index,r.length,b({},t,e));else{if(0===r.length)return n.selection.format(t,e),o;o=n.editor.formatText(r.index,r.length,b({},t,e))}return n.setSelection(r,s.default.sources.SILENT),o},r)}},{key:"formatLine",value:function(t,e,n,r,i){var l,a=this,s=w(t,e,n,r,i),u=o(s,4);return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,function(){return a.editor.formatLine(t,e,l)},i,t,0)}},{key:"formatText",value:function(t,e,n,r,i){var l,a=this,s=w(t,e,n,r,i),u=o(s,4);return t=u[0],e=u[1],l=u[2],i=u[3],O.call(this,function(){return a.editor.formatText(t,e,l)},i,t,0)}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=void 0;n="number"==typeof t?this.selection.getBounds(t,e):this.selection.getBounds(t.index,t.length);var r=this.container.getBoundingClientRect();return{bottom:n.bottom-r.top,height:n.height,left:n.left-r.left,right:n.right-r.left,top:n.top-r.top,width:n.width}}},{key:"getContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getContents(t,e)}},{key:"getFormat",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getSelection(!0),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"number"==typeof t?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}},{key:"getIndex",value:function(t){return t.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(t){return this.scroll.leaf(t)}},{key:"getLine",value:function(t){return this.scroll.line(t)}},{key:"getLines",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE;return"number"!=typeof t?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}},{key:"getModule",value:function(t){return this.theme.modules[t]}},{key:"getSelection",value:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLength()-t,n=w(t,e),r=o(n,2);return t=r[0],e=r[1],this.editor.getText(t,e)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(e,n,r){var o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.sources.API;return O.call(this,function(){return o.editor.insertEmbed(e,n,r)},i,e)}},{key:"insertText",value:function(t,e,n,r,i){var l,a=this,s=w(t,0,n,r,i),u=o(s,4);return t=u[0],l=u[2],i=u[3],O.call(this,function(){return a.editor.insertText(t,e,l)},i,t,e.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(t,e,n){this.clipboard.dangerouslyPasteHTML(t,e,n)}},{key:"removeFormat",value:function(t,e,n){var r=this,i=w(t,e,n),l=o(i,4);return t=l[0],e=l[1],n=l[3],O.call(this,function(){return r.editor.removeFormat(t,e)},n,t)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return O.call(this,function(){t=new l.default(t);var n=e.getLength(),r=e.editor.deleteText(0,n),o=e.editor.applyDelta(t),i=o.ops[o.ops.length-1];return null!=i&&"string"==typeof i.insert&&"\n"===i.insert[i.insert.length-1]&&(e.editor.deleteText(e.getLength()-1,1),o.delete(1)),r.compose(o)},n)}},{key:"setSelection",value:function(e,n,r){if(null==e)this.selection.setRange(null,n||t.sources.API);else{var i=w(e,n,r),l=o(i,4);e=l[0],n=l[1],r=l[3],this.selection.setRange(new f.Range(e,n),r),r!==s.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API,n=(new l.default).insert(t);return this.setContents(n,e)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.scroll.update(t);return this.selection.update(t),e}},{key:"updateContents",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.sources.API;return O.call(this,function(){return t=new l.default(t),e.editor.applyDelta(t,n)},n,!0)}}]),t}();function _(t,e){if((e=(0,p.default)(!0,{container:t,modules:{clipboard:!0,keyboard:!0,history:!0}},e)).theme&&e.theme!==m.DEFAULTS.theme){if(e.theme=m.import("themes/"+e.theme),null==e.theme)throw new Error("Invalid theme "+e.theme+". Did you register it?")}else e.theme=y.default;var n=(0,p.default)(!0,{},e.theme.DEFAULTS);[n,e].forEach(function(t){t.modules=t.modules||{},Object.keys(t.modules).forEach(function(e){!0===t.modules[e]&&(t.modules[e]={})})});var r=Object.keys(n.modules).concat(Object.keys(e.modules)).reduce(function(t,e){var n=m.import("modules/"+e);return null==n?g.error("Cannot load "+e+" module. Are you sure you registered it?"):t[e]=n.DEFAULTS||{},t},{});return null!=e.modules&&e.modules.toolbar&&e.modules.toolbar.constructor!==Object&&(e.modules.toolbar={container:e.modules.toolbar}),e=(0,p.default)(!0,{},m.DEFAULTS,{modules:r},n,e),["bounds","container","scrollingContainer"].forEach(function(t){"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),e.modules=Object.keys(e.modules).reduce(function(t,n){return e.modules[n]&&(t[n]=e.modules[n]),t},{}),e}function O(t,e,n,r){if(this.options.strict&&!this.isEnabled()&&e===s.default.sources.USER)return new l.default;var o=null==n?null:this.getSelection(),i=this.editor.delta,a=t();if(null!=o&&(!0===n&&(n=o.index),null==r?o=x(o,a,e):0!==r&&(o=x(o,n,r,e)),this.setSelection(o,s.default.sources.SILENT)),a.length()>0){var u,c,f=[s.default.events.TEXT_CHANGE,a,i,e];if((u=this.emitter).emit.apply(u,[s.default.events.EDITOR_CHANGE].concat(f)),e!==s.default.sources.SILENT)(c=this.emitter).emit.apply(c,f)}return a}function w(t,e,n,o,i){var l={};return"number"==typeof t.index&&"number"==typeof t.length?"number"!=typeof e?(i=o,o=n,n=e,e=t.length,t=t.index):(e=t.length,t=t.index):"number"!=typeof e&&(i=o,o=n,n=e,e=0),"object"===(void 0===n?"undefined":r(n))?(l=n,i=o):"string"==typeof n&&(null!=o?l[n]=o:i=n),[t,e,l,i=i||s.default.sources.API]}function x(t,e,n,r){if(null==t)return null;var i=void 0,a=void 0;if(e instanceof l.default){var u=[t.index,t.index+t.length].map(function(t){return e.transformPosition(t,r!==s.default.sources.USER)}),c=o(u,2);i=c[0],a=c[1]}else{var h=[t.index,t.index+t.length].map(function(t){return t<e||t===e&&r===s.default.sources.USER?t:n>=0?t+n:Math.max(e,t+n)}),p=o(h,2);i=p[0],a=p[1]}return new f.Range(i,a-i)}m.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},m.events=s.default.events,m.sources=s.default.sources,m.version="1.3.7",m.imports={delta:l.default,parchment:c.default,"core/module":u.default,"core/theme":y.default},e.expandConfig=_,e.overload=w,e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=a(n(7)),l=a(n(0));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Inline),r(e,[{key:"formatAt",value:function(t,n,r,i){if(e.compare(this.statics.blotName,r)<0&&l.default.query(r,l.default.Scope.BLOT)){var a=this.isolate(t,n);i&&a.wrap(r,i)}else o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,i)}},{key:"optimize",value:function(t){if(o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.parent instanceof e&&e.compare(this.statics.blotName,this.parent.statics.blotName)>0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(t,n){var r=e.order.indexOf(t),o=e.order.indexOf(n);return r>=0||o>=0?r-o:t===n?0:t<n?-1:1}}]),e}();s.allowedChildren=[s,l.default.Embed,i.default],s.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default.Text),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=i(n(54));function i(t){return t&&t.__esModule?t:{default:t}}var l=(0,i(n(10)).default)("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(function(t){document.addEventListener(t,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(t){var n;t.__quill&&t.__quill.emitter&&(n=t.__quill.emitter).handleDOM.apply(n,e)})})});var a=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return t.listeners={},t.on("error",l.error),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default),r(e,[{key:"emit",value:function(){l.log.apply(l,arguments),function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];(this.listeners[t.type]||[]).forEach(function(e){var r=e.node,o=e.handler;(t.target===r||r.contains(t.target))&&o.apply(void 0,[t].concat(n))})}},{key:"listenDOM",value:function(t,e,n){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push({node:e,handler:n})}}]),e}();a.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},a.sources={API:"api",SILENT:"silent",USER:"user"},e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n};r.DEFAULTS={},e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=["error","warn","log","info"],o="warn";function i(t){if(r.indexOf(t)<=r.indexOf(o)){for(var e,n=arguments.length,i=Array(n>1?n-1:0),l=1;l<n;l++)i[l-1]=arguments[l];(e=console)[t].apply(e,i)}}function l(t){return r.reduce(function(e,n){return e[n]=i.bind(console,n,t),e},{})}i.level=l.level=function(t){o=t},e.default=l},function(t,e,n){var r=Array.prototype.slice,o=n(52),i=n(53),l=t.exports=function(t,e,n){return n||(n={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?n.strict?t===e:t==e:function(t,e,n){var u,c;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t))return!!i(e)&&(t=r.call(t),e=r.call(e),l(t,e,n));if(s(t)){if(!s(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var f=o(t),h=o(e)}catch(p){return!1}if(f.length!=h.length)return!1;for(f.sort(),h.sort(),u=f.length-1;u>=0;u--)if(f[u]!=h[u])return!1;for(u=f.length-1;u>=0;u--)if(c=f[u],!l(t[c],e[c],n))return!1;return typeof t==typeof e}(t,e,n))};function a(t){return null==t}function s(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t,e,n){void 0===n&&(n={}),this.attrName=t,this.keyName=e;var o=r.Scope.TYPE&r.Scope.ATTRIBUTE;null!=n.scope?this.scope=n.scope&r.Scope.LEVEL|o:this.scope=r.Scope.ATTRIBUTE,null!=n.whitelist&&(this.whitelist=n.whitelist)}return t.keys=function(t){return[].map.call(t.attributes,function(t){return t.name})},t.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.setAttribute(this.keyName,e),!0)},t.prototype.canAdd=function(t,e){return null!=r.query(t,r.Scope.BLOT&(this.scope|r.Scope.TYPE))&&(null==this.whitelist||("string"==typeof e?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1))},t.prototype.remove=function(t){t.removeAttribute(this.keyName)},t.prototype.value=function(t){var e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""},t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Code=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=f(n(2)),a=f(n(0)),s=f(n(4)),u=f(n(6)),c=f(n(7));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,u.default),e}();y.blotName="code",y.tagName="CODE";var v=function(t){function e(){return h(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return d(e,s.default),o(e,[{key:"delta",value:function(){var t=this,e=this.domNode.textContent;return e.endsWith("\n")&&(e=e.slice(0,-1)),e.split("\n").reduce(function(e,n){return e.insert(n).insert("\n",t.formats())},new l.default)}},{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n){var o=this.descendant(c.default,this.length()-1),l=r(o,1)[0];null!=l&&l.deleteAt(l.length()-1,1),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}},{key:"formatAt",value:function(t,n,r,o){if(0!==n&&null!=a.default.query(r,a.default.Scope.BLOCK)&&(r!==this.statics.blotName||o!==this.statics.formats(this.domNode))){var i=this.newlineIndex(t);if(!(i<0||i>=t+n)){var l=this.newlineIndex(t,!0)+1,s=i-l+1,u=this.isolate(l,s),c=u.next;u.format(r,o),c instanceof e&&c.formatAt(0,t-l+n-s,r,o)}}}},{key:"insertAt",value:function(t,e,n){if(null==n){var o=this.descendant(c.default,t),i=r(o,2),l=i[0],a=i[1];l.insertAt(a,e)}}},{key:"length",value:function(){var t=this.domNode.textContent.length;return this.domNode.textContent.endsWith("\n")?t:t+1}},{key:"newlineIndex",value:function(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])return this.domNode.textContent.slice(0,t).lastIndexOf("\n");var e=this.domNode.textContent.slice(t).indexOf("\n");return e>-1?t+e:-1}},{key:"optimize",value:function(t){this.domNode.textContent.endsWith("\n")||this.appendChild(a.default.create("text","\n")),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===n.statics.formats(n.domNode)&&(n.optimize(t),n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(t){var e=a.default.find(t);null==e?t.parentNode.removeChild(t):e instanceof a.default.Embed?e.remove():e.unwrap()})}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("spellcheck",!1),n}},{key:"formats",value:function(){return!0}}]),e}();v.blotName="code-block",v.tagName="PRE",v.TAB=" ",e.Code=y,e.default=v},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=b(n(2)),a=b(n(20)),s=b(n(0)),u=b(n(13)),c=b(n(24)),f=n(4),h=b(f),p=b(n(16)),d=b(n(21)),y=b(n(11)),v=b(n(3));function b(t){return t&&t.__esModule?t:{default:t}}var g=/^[ -~]*$/,m=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroll=e,this.delta=this.getDelta()}return i(t,[{key:"applyDelta",value:function(t){var e=this,n=!1;this.scroll.update();var i=this.scroll.length();return this.scroll.batchStart(),(t=function(t){return t.reduce(function(t,e){if(1===e.insert){var n=(0,d.default)(e.attributes);return delete n.image,t.insert({image:e.attributes.image},n)}if(null==e.attributes||!0!==e.attributes.list&&!0!==e.attributes.bullet||((e=(0,d.default)(e)).attributes.list?e.attributes.list="ordered":(e.attributes.list="bullet",delete e.attributes.bullet)),"string"==typeof e.insert){var r=e.insert.replace(/\r\n/g,"\n").replace(/\r/g,"\n");return t.insert(r,e.attributes)}return t.push(e)},new l.default)}(t)).reduce(function(t,l){var u=l.retain||l.delete||l.insert.length||1,c=l.attributes||{};if(null!=l.insert){if("string"==typeof l.insert){var p=l.insert;p.endsWith("\n")&&n&&(n=!1,p=p.slice(0,-1)),t>=i&&!p.endsWith("\n")&&(n=!0),e.scroll.insertAt(t,p);var d=e.scroll.line(t),y=o(d,2),b=y[0],g=y[1],m=(0,v.default)({},(0,f.bubbleFormats)(b));if(b instanceof h.default){var _=b.descendant(s.default.Leaf,g),O=o(_,1)[0];m=(0,v.default)(m,(0,f.bubbleFormats)(O))}c=a.default.attributes.diff(m,c)||{}}else if("object"===r(l.insert)){var w=Object.keys(l.insert)[0];if(null==w)return t;e.scroll.insertAt(t,w,l.insert[w])}i+=u}return Object.keys(c).forEach(function(n){e.scroll.formatAt(t,u,n,c[n])}),t+u},0),t.reduce(function(t,n){return"number"==typeof n.delete?(e.scroll.deleteAt(t,n.delete),t):t+(n.retain||n.insert.length||1)},0),this.scroll.batchEnd(),this.update(t)}},{key:"deleteText",value:function(t,e){return this.scroll.deleteAt(t,e),this.update((new l.default).retain(t).delete(e))}},{key:"formatLine",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.scroll.update(),Object.keys(r).forEach(function(o){if(null==n.scroll.whitelist||n.scroll.whitelist[o]){var i=n.scroll.lines(t,Math.max(e,1)),l=e;i.forEach(function(e){var i=e.length();if(e instanceof u.default){var a=t-e.offset(n.scroll),s=e.newlineIndex(a+l)-a+1;e.formatAt(a,s,o,r[o])}else e.format(o,r[o]);l-=i})}}),this.scroll.optimize(),this.update((new l.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"formatText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e,o,r[o])}),this.update((new l.default).retain(t).retain(e,(0,d.default)(r)))}},{key:"getContents",value:function(t,e){return this.delta.slice(t,t+e)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(t,e){return t.concat(e.delta())},new l.default)}},{key:"getFormat",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[],r=[];0===e?this.scroll.path(t).forEach(function(t){var e=o(t,1)[0];e instanceof h.default?n.push(e):e instanceof s.default.Leaf&&r.push(e)}):(n=this.scroll.lines(t,e),r=this.scroll.descendants(s.default.Leaf,t,e));var i=[n,r].map(function(t){if(0===t.length)return{};for(var e=(0,f.bubbleFormats)(t.shift());Object.keys(e).length>0;){var n=t.shift();if(null==n)return e;e=_((0,f.bubbleFormats)(n),e)}return e});return v.default.apply(v.default,i)}},{key:"getText",value:function(t,e){return this.getContents(t,e).filter(function(t){return"string"==typeof t.insert}).map(function(t){return t.insert}).join("")}},{key:"insertEmbed",value:function(t,e,n){return this.scroll.insertAt(t,e,n),this.update((new l.default).retain(t).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n)))}},{key:"insertText",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n"),this.scroll.insertAt(t,e),Object.keys(r).forEach(function(o){n.scroll.formatAt(t,e.length,o,r[o])}),this.update((new l.default).retain(t).insert(e,(0,d.default)(r)))}},{key:"isBlank",value:function(){if(0==this.scroll.children.length)return!0;if(this.scroll.children.length>1)return!1;var t=this.scroll.children.head;return t.statics.blotName===h.default.blotName&&(!(t.children.length>1)&&t.children.head instanceof p.default)}},{key:"removeFormat",value:function(t,e){var n=this.getText(t,e),r=this.scroll.line(t+e),i=o(r,2),a=i[0],s=i[1],c=0,f=new l.default;null!=a&&(c=a instanceof u.default?a.newlineIndex(s)-s+1:a.length()-s,f=a.delta().slice(s,s+c-1).insert("\n"));var h=this.getContents(t,e+c).diff((new l.default).insert(n).concat(f)),p=(new l.default).retain(t).concat(h);return this.applyDelta(p)}},{key:"update",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=this.delta;if(1===e.length&&"characterData"===e[0].type&&e[0].target.data.match(g)&&s.default.find(e[0].target)){var o=s.default.find(e[0].target),i=(0,f.bubbleFormats)(o),a=o.offset(this.scroll),u=e[0].oldValue.replace(c.default.CONTENTS,""),h=(new l.default).insert(u),p=(new l.default).insert(o.value());t=(new l.default).retain(a).concat(h.diff(p,n)).reduce(function(t,e){return e.insert?t.insert(e.insert,i):t.push(e)},new l.default),this.delta=r.compose(t)}else this.delta=this.getDelta(),t&&(0,y.default)(r.compose(t),this.delta)||(t=r.diff(this.delta,n));return t}}]),t}();function _(t,e){return Object.keys(e).reduce(function(n,r){return null==t[r]?n:(e[r]===t[r]?n[r]=e[r]:Array.isArray(e[r])?e[r].indexOf(t[r])<0&&(n[r]=e[r].concat([t[r]])):n[r]=[e[r],t[r]],n)},{})}e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.Range=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=u(n(0)),l=u(n(21)),a=u(n(11)),s=u(n(8));function u(t){return t&&t.__esModule?t:{default:t}}function c(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var h=(0,u(n(10)).default)("quill:selection"),p=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;f(this,t),this.index=e,this.length=n},d=function(){function t(e,n){var r=this;f(this,t),this.emitter=n,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=i.default.create("cursor",this),this.lastRange=this.savedRange=new p(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){r.mouseDown||setTimeout(r.update.bind(r,s.default.sources.USER),1)}),this.emitter.on(s.default.events.EDITOR_CHANGE,function(t,e){t===s.default.events.TEXT_CHANGE&&e.length()>0&&r.update(s.default.sources.SILENT)}),this.emitter.on(s.default.events.SCROLL_BEFORE_UPDATE,function(){if(r.hasFocus()){var t=r.getNativeRange();null!=t&&t.start.node!==r.cursor.textNode&&r.emitter.once(s.default.events.SCROLL_UPDATE,function(){try{r.setNativeRange(t.start.node,t.start.offset,t.end.node,t.end.offset)}catch(e){}})}}),this.emitter.on(s.default.events.SCROLL_OPTIMIZE,function(t,e){if(e.range){var n=e.range,o=n.startNode,i=n.startOffset,l=n.endNode,a=n.endOffset;r.setNativeRange(o,i,l,a)}}),this.update(s.default.sources.SILENT)}return o(t,[{key:"handleComposition",value:function(){var t=this;this.root.addEventListener("compositionstart",function(){t.composing=!0}),this.root.addEventListener("compositionend",function(){if(t.composing=!1,t.cursor.parent){var e=t.cursor.restore();if(!e)return;setTimeout(function(){t.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}},{key:"handleDragging",value:function(){var t=this;this.emitter.listenDOM("mousedown",document.body,function(){t.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){t.mouseDown=!1,t.update(s.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(t,e){if(null==this.scroll.whitelist||this.scroll.whitelist[t]){this.scroll.update();var n=this.getNativeRange();if(null!=n&&n.native.collapsed&&!i.default.query(t,i.default.Scope.BLOCK)){if(n.start.node!==this.cursor.textNode){var r=i.default.find(n.start.node,!1);if(null==r)return;if(r instanceof i.default.Leaf){var o=r.split(n.start.offset);r.parent.insertBefore(this.cursor,o)}else r.insertBefore(this.cursor,n.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.scroll.length();t=Math.min(t,n-1),e=Math.min(t+e,n-1)-t;var o=void 0,i=this.scroll.leaf(t),l=r(i,2),a=l[0],s=l[1];if(null==a)return null;var u=a.position(s,!0),c=r(u,2);o=c[0],s=c[1];var f=document.createRange();if(e>0){f.setStart(o,s);var h=this.scroll.leaf(t+e),p=r(h,2);if(a=p[0],s=p[1],null==a)return null;var d=a.position(s,!0),y=r(d,2);return o=y[0],s=y[1],f.setEnd(o,s),f.getBoundingClientRect()}var v="left",b=void 0;return o instanceof Text?(s<o.data.length?(f.setStart(o,s),f.setEnd(o,s+1)):(f.setStart(o,s-1),f.setEnd(o,s),v="right"),b=f.getBoundingClientRect()):(b=a.domNode.getBoundingClientRect(),s>0&&(v="right")),{bottom:b.top+b.height,height:b.height,left:b[v],right:b[v],top:b.top,width:0}}},{key:"getNativeRange",value:function(){var t=document.getSelection();if(null==t||t.rangeCount<=0)return null;var e=t.getRangeAt(0);if(null==e)return null;var n=this.normalizeNative(e);return h.info("getNativeRange",n),n}},{key:"getRange",value:function(){var t=this.getNativeRange();return null==t?[null,null]:[this.normalizedToRange(t),t]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(t){var e=this,n=[[t.start.node,t.start.offset]];t.native.collapsed||n.push([t.end.node,t.end.offset]);var o=n.map(function(t){var n=r(t,2),o=n[0],l=n[1],a=i.default.find(o,!0),s=a.offset(e.scroll);return 0===l?s:a instanceof i.default.Container?s+a.length():s+a.index(o,l)}),l=Math.min(Math.max.apply(Math,c(o)),this.scroll.length()-1),a=Math.min.apply(Math,[l].concat(c(o)));return new p(a,l-a)}},{key:"normalizeNative",value:function(t){if(!y(this.root,t.startContainer)||!t.collapsed&&!y(this.root,t.endContainer))return null;var e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(function(t){for(var e=t.node,n=t.offset;!(e instanceof Text)&&e.childNodes.length>0;)if(e.childNodes.length>n)e=e.childNodes[n],n=0;else{if(e.childNodes.length!==n)break;n=(e=e.lastChild)instanceof Text?e.data.length:e.childNodes.length+1}t.node=e,t.offset=n}),e}},{key:"rangeToNative",value:function(t){var e=this,n=t.collapsed?[t.index]:[t.index,t.index+t.length],o=[],i=this.scroll.length();return n.forEach(function(t,n){t=Math.min(i-1,t);var l,a=e.scroll.leaf(t),s=r(a,2),u=s[0],c=s[1],f=u.position(c,0!==n),h=r(f,2);l=h[0],c=h[1],o.push(l,c)}),o.length<2&&(o=o.concat(o)),o}},{key:"scrollIntoView",value:function(t){var e=this.lastRange;if(null!=e){var n=this.getBounds(e.index,e.length);if(null!=n){var o=this.scroll.length()-1,i=this.scroll.line(Math.min(e.index,o)),l=r(i,1)[0],a=l;if(e.length>0){var s=this.scroll.line(Math.min(e.index+e.length,o));a=r(s,1)[0]}if(null!=l&&null!=a){var u=t.getBoundingClientRect();n.top<u.top?t.scrollTop-=u.top-n.top:n.bottom>u.bottom&&(t.scrollTop+=n.bottom-u.bottom)}}}}},{key:"setNativeRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(h.info("setNativeRange",t,e,n,r),null==t||null!=this.root.parentNode&&null!=t.parentNode&&null!=n.parentNode){var i=document.getSelection();if(null!=i)if(null!=t){this.hasFocus()||this.root.focus();var l=(this.getNativeRange()||{}).native;if(null==l||o||t!==l.startContainer||e!==l.startOffset||n!==l.endContainer||r!==l.endOffset){"BR"==t.tagName&&(e=[].indexOf.call(t.parentNode.childNodes,t),t=t.parentNode),"BR"==n.tagName&&(r=[].indexOf.call(n.parentNode.childNodes,n),n=n.parentNode);var a=document.createRange();a.setStart(t,e),a.setEnd(n,r),i.removeAllRanges(),i.addRange(a)}}else i.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.default.sources.API;if("string"==typeof e&&(n=e,e=!1),h.info("setRange",t),null!=t){var r=this.rangeToNative(t);this.setNativeRange.apply(this,c(r).concat([e]))}else this.setNativeRange(null);this.update(n)}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.default.sources.USER,e=this.lastRange,n=this.getRange(),o=r(n,2),i=o[0],u=o[1];if(this.lastRange=i,null!=this.lastRange&&(this.savedRange=this.lastRange),!(0,a.default)(e,this.lastRange)){var c;!this.composing&&null!=u&&u.native.collapsed&&u.start.node!==this.cursor.textNode&&this.cursor.restore();var f,h=[s.default.events.SELECTION_CHANGE,(0,l.default)(this.lastRange),(0,l.default)(e),t];if((c=this.emitter).emit.apply(c,[s.default.events.EDITOR_CHANGE].concat(h)),t!==s.default.sources.SILENT)(f=this.emitter).emit.apply(f,h)}}}]),t}();function y(t,e){try{e.parentNode}catch(n){return!1}return e instanceof Text&&(e=e.parentNode),t.contains(e)}e.Range=p,e.default=d},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Embed),o(e,[{key:"insertInto",value:function(t,n){0===t.children.length?function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertInto",this).call(this,t,n):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),e}();a.blotName="break",a.tagName="BR",e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(44),l=n(30),a=n(1),s=function(t){function e(e){var n=t.call(this,e)||this;return n.build(),n}return o(e,t),e.prototype.appendChild=function(t){this.insertBefore(t)},e.prototype.attach=function(){t.prototype.attach.call(this),this.children.forEach(function(t){t.attach()})},e.prototype.build=function(){var t=this;this.children=new i.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(e){try{var n=u(e);t.insertBefore(n,t.children.head||void 0)}catch(r){if(r instanceof a.ParchmentError)return;throw r}})},e.prototype.deleteAt=function(t,e){if(0===t&&e===this.length())return this.remove();this.children.forEachAt(t,e,function(t,e,n){t.deleteAt(e,n)})},e.prototype.descendant=function(t,n){var r=this.children.find(n),o=r[0],i=r[1];return null==t.blotName&&t(o)||null!=t.blotName&&o instanceof t?[o,i]:o instanceof e?o.descendant(t,i):[null,-1]},e.prototype.descendants=function(t,n,r){void 0===n&&(n=0),void 0===r&&(r=Number.MAX_VALUE);var o=[],i=r;return this.children.forEachAt(n,r,function(n,r,l){(null==t.blotName&&t(n)||null!=t.blotName&&n instanceof t)&&o.push(n),n instanceof e&&(o=o.concat(n.descendants(t,r,i))),i-=l}),o},e.prototype.detach=function(){this.children.forEach(function(t){t.detach()}),t.prototype.detach.call(this)},e.prototype.formatAt=function(t,e,n,r){this.children.forEachAt(t,e,function(t,e,o){t.formatAt(e,o,n,r)})},e.prototype.insertAt=function(t,e,n){var r=this.children.find(t),o=r[0],i=r[1];if(o)o.insertAt(i,e,n);else{var l=null==n?a.create("text",e):a.create(e,n);this.appendChild(l)}},e.prototype.insertBefore=function(t,e){if(null!=this.statics.allowedChildren&&!this.statics.allowedChildren.some(function(e){return t instanceof e}))throw new a.ParchmentError("Cannot insert "+t.statics.blotName+" into "+this.statics.blotName);t.insertInto(this,e)},e.prototype.length=function(){return this.children.reduce(function(t,e){return t+e.length()},0)},e.prototype.moveChildren=function(t,e){this.children.forEach(function(n){t.insertBefore(n,e)})},e.prototype.optimize=function(e){if(t.prototype.optimize.call(this,e),0===this.children.length)if(null!=this.statics.defaultChild){var n=a.create(this.statics.defaultChild);this.appendChild(n),n.optimize(e)}else this.remove()},e.prototype.path=function(t,n){void 0===n&&(n=!1);var r=this.children.find(t,n),o=r[0],i=r[1],l=[[this,t]];return o instanceof e?l.concat(o.path(i,n)):(null!=o&&l.push([o,i]),l)},e.prototype.removeChild=function(t){this.children.remove(t)},e.prototype.replace=function(n){n instanceof e&&n.moveChildren(this),t.prototype.replace.call(this,n)},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=this.clone();return this.parent.insertBefore(n,this.next),this.children.forEachAt(t,this.length(),function(t,r,o){t=t.split(r,e),n.appendChild(t)}),n},e.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},e.prototype.update=function(t,e){var n=this,r=[],o=[];t.forEach(function(t){t.target===n.domNode&&"childList"===t.type&&(r.push.apply(r,t.addedNodes),o.push.apply(o,t.removedNodes))}),o.forEach(function(t){if(!(null!=t.parentNode&&"IFRAME"!==t.tagName&&document.body.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var e=a.find(t);null!=e&&(null!=e.domNode.parentNode&&e.domNode.parentNode!==n.domNode||e.detach())}}),r.filter(function(t){return t.parentNode==n.domNode}).sort(function(t,e){return t===e?0:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(t){var e=null;null!=t.nextSibling&&(e=a.find(t.nextSibling));var r=u(t);r.next==e&&null!=r.next||(null!=r.parent&&r.parent.removeChild(n),n.insertBefore(r,e||void 0))})},e}(l.default);function u(t){var e=a.find(t);if(null==e)try{e=a.create(t)}catch(n){e=a.create(a.Scope.INLINE),[].slice.call(t.childNodes).forEach(function(t){e.domNode.appendChild(t)}),t.parentNode&&t.parentNode.replaceChild(e.domNode,t),e.attach()}return e}e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(12),l=n(31),a=n(17),s=n(1),u=function(t){function e(e){var n=t.call(this,e)||this;return n.attributes=new l.default(n.domNode),n}return o(e,t),e.formats=function(t){return"string"==typeof this.tagName||(Array.isArray(this.tagName)?t.tagName.toLowerCase():void 0)},e.prototype.format=function(t,e){var n=s.query(t);n instanceof i.default?this.attributes.attribute(n,e):e&&(null==n||t===this.statics.blotName&&this.formats()[t]===e||this.replaceWith(t,e))},e.prototype.formats=function(){var t=this.attributes.values(),e=this.statics.formats(this.domNode);return null!=e&&(t[this.statics.blotName]=e),t},e.prototype.replaceWith=function(e,n){var r=t.prototype.replaceWith.call(this,e,n);return this.attributes.copy(r),r},e.prototype.update=function(e,n){var r=this;t.prototype.update.call(this,e,n),e.some(function(t){return t.target===r.domNode&&"attributes"===t.type})&&this.attributes.build()},e.prototype.wrap=function(n,r){var o=t.prototype.wrap.call(this,n,r);return o instanceof e&&o.statics.scope===this.statics.scope&&this.attributes.move(o),o},e}(a.default);e.default=u},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(30),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.value=function(t){return!0},e.prototype.index=function(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1},e.prototype.position=function(t,e){var n=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return t>0&&(n+=1),[this.parent.domNode,n]},e.prototype.value=function(){var t;return(t={})[this.statics.blotName]=this.statics.value(this.domNode)||!0,t},e.scope=l.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){var r=n(11),o=n(3),i={attributes:{compose:function(t,e,n){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var r=o(!0,{},e);for(var i in n||(r=Object.keys(r).reduce(function(t,e){return null!=r[e]&&(t[e]=r[e]),t},{})),t)void 0!==t[i]&&void 0===e[i]&&(r[i]=t[i]);return Object.keys(r).length>0?r:void 0},diff:function(t,e){"object"!=typeof t&&(t={}),"object"!=typeof e&&(e={});var n=Object.keys(t).concat(Object.keys(e)).reduce(function(n,o){return r(t[o],e[o])||(n[o]=void 0===e[o]?null:e[o]),n},{});return Object.keys(n).length>0?n:void 0},transform:function(t,e,n){if("object"!=typeof t)return e;if("object"==typeof e){if(!n)return e;var r=Object.keys(e).reduce(function(n,r){return void 0===t[r]&&(n[r]=e[r]),n},{});return Object.keys(r).length>0?r:void 0}}},iterator:function(t){return new l(t)},length:function(t){return"number"==typeof t.delete?t.delete:"number"==typeof t.retain?t.retain:"string"==typeof t.insert?t.insert.length:1}};function l(t){this.ops=t,this.index=0,this.offset=0}l.prototype.hasNext=function(){return this.peekLength()<1/0},l.prototype.next=function(t){t||(t=1/0);var e=this.ops[this.index];if(e){var n=this.offset,r=i.length(e);if(t>=r-n?(t=r-n,this.index+=1,this.offset=0):this.offset+=t,"number"==typeof e.delete)return{delete:t};var o={};return e.attributes&&(o.attributes=e.attributes),"number"==typeof e.retain?o.retain=t:"string"==typeof e.insert?o.insert=e.insert.substr(n,t):o.insert=e.insert,o}return{retain:1/0}},l.prototype.peek=function(){return this.ops[this.index]},l.prototype.peekLength=function(){return this.ops[this.index]?i.length(this.ops[this.index])-this.offset:1/0},l.prototype.peekType=function(){return this.ops[this.index]?"number"==typeof this.ops[this.index].delete?"delete":"number"==typeof this.ops[this.index].retain?"retain":"insert":"retain"},l.prototype.rest=function(){if(this.hasNext()){if(0===this.offset)return this.ops.slice(this.index);var t=this.offset,e=this.index,n=this.next(),r=this.ops.slice(this.index);return this.offset=t,this.index=e,[n].concat(r)}return[]},t.exports=i},function(t,n){var r=function(){"use strict";function t(t,e){return null!=e&&t instanceof e}var n,r,o;try{n=Map}catch(s){n=function(){}}try{r=Set}catch(s){r=function(){}}try{o=Promise}catch(s){o=function(){}}function i(l,s,u,c,f){"object"==typeof s&&(u=s.depth,c=s.prototype,f=s.includeNonEnumerable,s=s.circular);var h=[],p=[],d=void 0!==e;return void 0===s&&(s=!0),void 0===u&&(u=1/0),function l(u,y){if(null===u)return null;if(0===y)return u;var v,b;if("object"!=typeof u)return u;if(t(u,n))v=new n;else if(t(u,r))v=new r;else if(t(u,o))v=new o(function(t,e){u.then(function(e){t(l(e,y-1))},function(t){e(l(t,y-1))})});else if(i.__isArray(u))v=[];else if(i.__isRegExp(u))v=new RegExp(u.source,a(u)),u.lastIndex&&(v.lastIndex=u.lastIndex);else if(i.__isDate(u))v=new Date(u.getTime());else{if(d&&e.isBuffer(u))return v=e.allocUnsafe?e.allocUnsafe(u.length):new e(u.length),u.copy(v),v;t(u,Error)?v=Object.create(u):void 0===c?(b=Object.getPrototypeOf(u),v=Object.create(b)):(v=Object.create(c),b=c)}if(s){var g=h.indexOf(u);if(-1!=g)return p[g];h.push(u),p.push(v)}for(var m in t(u,n)&&u.forEach(function(t,e){var n=l(e,y-1),r=l(t,y-1);v.set(n,r)}),t(u,r)&&u.forEach(function(t){var e=l(t,y-1);v.add(e)}),u){var _;b&&(_=Object.getOwnPropertyDescriptor(b,m)),_&&null==_.set||(v[m]=l(u[m],y-1))}if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(u);for(m=0;m<O.length;m++){var w=O[m];(!(k=Object.getOwnPropertyDescriptor(u,w))||k.enumerable||f)&&(v[w]=l(u[w],y-1),k.enumerable||Object.defineProperty(v,w,{enumerable:!1}))}}if(f){var x=Object.getOwnPropertyNames(u);for(m=0;m<x.length;m++){var k,E=x[m];(k=Object.getOwnPropertyDescriptor(u,E))&&k.enumerable||(v[E]=l(u[E],y-1),Object.defineProperty(v,E,{enumerable:!1}))}}return v}(l,u)}function l(t){return Object.prototype.toString.call(t)}function a(t){var e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),e}return i.clonePrototype=function(t){if(null===t)return null;var e=function(){};return e.prototype=t,new e},i.__objToStr=l,i.__isDate=function(t){return"object"==typeof t&&"[object Date]"===l(t)},i.__isArray=function(t){return"object"==typeof t&&"[object Array]"===l(t)},i.__isRegExp=function(t){return"object"==typeof t&&"[object RegExp]"===l(t)},i.__getRegExpFlags=a,i}();"object"==typeof t&&t.exports&&(t.exports=r)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=p(n(0)),a=p(n(8)),s=n(4),u=p(s),c=p(n(16)),f=p(n(13)),h=p(n(25));function p(t){return t&&t.__esModule?t:{default:t}}function d(t){return t instanceof u.default||t instanceof s.BlockEmbed}var y=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.emitter=n.emitter,Array.isArray(n.whitelist)&&(r.whitelist=n.whitelist.reduce(function(t,e){return t[e]=!0,t},{})),r.domNode.addEventListener("DOMNodeInserted",function(){}),r.optimize(),r.enable(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Scroll),o(e,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(t,n){var o=this.line(t),l=r(o,2),a=l[0],u=l[1],h=this.line(t+n),p=r(h,1)[0];if(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"deleteAt",this).call(this,t,n),null!=p&&a!==p&&u>0){if(a instanceof s.BlockEmbed||p instanceof s.BlockEmbed)return void this.optimize();if(a instanceof f.default){var d=a.newlineIndex(a.length(),!0);if(d>-1&&(a=a.split(d+1))===p)return void this.optimize()}else if(p instanceof f.default){var y=p.newlineIndex(0);y>-1&&p.split(y+1)}var v=p.children.head instanceof c.default?null:p.children.head;a.moveChildren(p,v),a.remove()}this.optimize()}},{key:"enable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.domNode.setAttribute("contenteditable",t)}},{key:"formatAt",value:function(t,n,r,o){(null==this.whitelist||this.whitelist[r])&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"formatAt",this).call(this,t,n,r,o),this.optimize())}},{key:"insertAt",value:function(t,n,r){if(null==r||null==this.whitelist||this.whitelist[n]){if(t>=this.length())if(null==r||null==l.default.query(n,l.default.Scope.BLOCK)){var o=l.default.create(this.statics.defaultChild);this.appendChild(o),null==r&&n.endsWith("\n")&&(n=n.slice(0,-1)),o.insertAt(0,n,r)}else{var a=l.default.create(n,r);this.appendChild(a)}else i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertAt",this).call(this,t,n,r);this.optimize()}}},{key:"insertBefore",value:function(t,n){if(t.statics.scope===l.default.Scope.INLINE_BLOT){var r=l.default.create(this.statics.defaultChild);r.appendChild(t),t=r}i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n)}},{key:"leaf",value:function(t){return this.path(t).pop()||[null,-1]}},{key:"line",value:function(t){return t===this.length()?this.line(t-1):this.descendant(d,t)}},{key:"lines",value:function(){return function t(e,n,r){var o=[],i=r;return e.children.forEachAt(n,r,function(e,n,r){d(e)?o.push(e):e instanceof l.default.Container&&(o=o.concat(t(e,n,i))),i-=r}),o}(this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE)}},{key:"optimize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!0!==this.batch&&(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t,n),t.length>0&&this.emitter.emit(a.default.events.SCROLL_OPTIMIZE,t,n))}},{key:"path",value:function(t){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"path",this).call(this,t).slice(1)}},{key:"update",value:function(t){if(!0!==this.batch){var n=a.default.sources.USER;"string"==typeof t&&(n=t),Array.isArray(t)||(t=this.observer.takeRecords()),t.length>0&&this.emitter.emit(a.default.events.SCROLL_BEFORE_UPDATE,n,t),i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t.concat([])),t.length>0&&this.emitter.emit(a.default.events.SCROLL_UPDATE,n,t)}}}]),e}();y.blotName="scroll",y.className="ql-editor",y.tagName="DIV",y.defaultChild="block",y.allowedChildren=[u.default,s.BlockEmbed,h.default],e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHORTKEY=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=y(n(21)),a=y(n(11)),s=y(n(3)),u=y(n(2)),c=y(n(20)),f=y(n(0)),h=y(n(5)),p=y(n(10)),d=y(n(9));function y(t){return t&&t.__esModule?t:{default:t}}function v(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=(0,p.default)("quill:keyboard"),g=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",m=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.bindings={},Object.keys(r.options.bindings).forEach(function(e){("list autofill"!==e||null==t.scroll.whitelist||t.scroll.whitelist.list)&&r.options.bindings[e]&&r.addBinding(r.options.bindings[e])}),r.addBinding({key:e.keys.ENTER,shiftKey:null},k),r.addBinding({key:e.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0},O),r.addBinding({key:e.keys.DELETE},{collapsed:!0},w)):(r.addBinding({key:e.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},O),r.addBinding({key:e.keys.DELETE},{collapsed:!0,suffix:/^.?$/},w)),r.addBinding({key:e.keys.BACKSPACE},{collapsed:!1},x),r.addBinding({key:e.keys.DELETE},{collapsed:!1},x),r.addBinding({key:e.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},O),r.listen(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,d.default),i(e,null,[{key:"match",value:function(t,e){return e=j(e),!["altKey","ctrlKey","metaKey","shiftKey"].some(function(n){return!!e[n]!==t[n]&&null!==e[n]})&&e.key===(t.which||t.keyCode)}}]),i(e,[{key:"addBinding",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=j(t);if(null==r||null==r.key)return b.warn("Attempted to add invalid keyboard binding",r);"function"==typeof e&&(e={handler:e}),"function"==typeof n&&(n={handler:n}),r=(0,s.default)(r,e,n),this.bindings[r.key]=this.bindings[r.key]||[],this.bindings[r.key].push(r)}},{key:"listen",value:function(){var t=this;this.quill.root.addEventListener("keydown",function(n){if(!n.defaultPrevented){var i=n.which||n.keyCode,l=(t.bindings[i]||[]).filter(function(t){return e.match(n,t)});if(0!==l.length){var s=t.quill.getSelection();if(null!=s&&t.quill.hasFocus()){var u=t.quill.getLine(s.index),c=o(u,2),h=c[0],p=c[1],d=t.quill.getLeaf(s.index),y=o(d,2),v=y[0],b=y[1],g=0===s.length?[v,b]:t.quill.getLeaf(s.index+s.length),m=o(g,2),_=m[0],O=m[1],w=v instanceof f.default.Text?v.value().slice(0,b):"",x=_ instanceof f.default.Text?_.value().slice(O):"",k={collapsed:0===s.length,empty:0===s.length&&h.length()<=1,format:t.quill.getFormat(s),offset:p,prefix:w,suffix:x};l.some(function(e){if(null!=e.collapsed&&e.collapsed!==k.collapsed)return!1;if(null!=e.empty&&e.empty!==k.empty)return!1;if(null!=e.offset&&e.offset!==k.offset)return!1;if(Array.isArray(e.format)){if(e.format.every(function(t){return null==k.format[t]}))return!1}else if("object"===r(e.format)&&!Object.keys(e.format).every(function(t){return!0===e.format[t]?null!=k.format[t]:!1===e.format[t]?null==k.format[t]:(0,a.default)(e.format[t],k.format[t])}))return!1;return!(null!=e.prefix&&!e.prefix.test(k.prefix))&&(!(null!=e.suffix&&!e.suffix.test(k.suffix))&&!0!==e.handler.call(t,s,k))})&&n.preventDefault()}}}})}}]),e}();function _(t,e){var n,r=t===m.keys.LEFT?"prefix":"suffix";return v(n={key:t,shiftKey:e,altKey:null},r,/^$/),v(n,"handler",function(n){var r=n.index;t===m.keys.RIGHT&&(r+=n.length+1);var i=this.quill.getLeaf(r);return!(o(i,1)[0]instanceof f.default.Embed)||(t===m.keys.LEFT?e?this.quill.setSelection(n.index-1,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index-1,h.default.sources.USER):e?this.quill.setSelection(n.index,n.length+1,h.default.sources.USER):this.quill.setSelection(n.index+n.length+1,h.default.sources.USER),!1)}),n}function O(t,e){if(!(0===t.index||this.quill.getLength()<=1)){var n=this.quill.getLine(t.index),r=o(n,1)[0],i={};if(0===e.offset){var l=this.quill.getLine(t.index-1),a=o(l,1)[0];if(null!=a&&a.length()>1){var s=r.formats(),u=this.quill.getFormat(t.index-1,1);i=c.default.attributes.diff(s,u)||{}}}var f=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;this.quill.deleteText(t.index-f,f,h.default.sources.USER),Object.keys(i).length>0&&this.quill.formatLine(t.index-f,f,i,h.default.sources.USER),this.quill.focus()}}function w(t,e){var n=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(!(t.index>=this.quill.getLength()-n)){var r={},i=0,l=this.quill.getLine(t.index),a=o(l,1)[0];if(e.offset>=a.length()-1){var s=this.quill.getLine(t.index+1),u=o(s,1)[0];if(u){var f=a.formats(),p=this.quill.getFormat(t.index,1);r=c.default.attributes.diff(f,p)||{},i=u.length()}}this.quill.deleteText(t.index,n,h.default.sources.USER),Object.keys(r).length>0&&this.quill.formatLine(t.index+i-1,n,r,h.default.sources.USER)}}function x(t){var e=this.quill.getLines(t),n={};if(e.length>1){var r=e[0].formats(),o=e[e.length-1].formats();n=c.default.attributes.diff(o,r)||{}}this.quill.deleteText(t,h.default.sources.USER),Object.keys(n).length>0&&this.quill.formatLine(t.index,1,n,h.default.sources.USER),this.quill.setSelection(t.index,h.default.sources.SILENT),this.quill.focus()}function k(t,e){var n=this;t.length>0&&this.quill.scroll.deleteAt(t.index,t.length);var r=Object.keys(e.format).reduce(function(t,n){return f.default.query(n,f.default.Scope.BLOCK)&&!Array.isArray(e.format[n])&&(t[n]=e.format[n]),t},{});this.quill.insertText(t.index,"\n",r,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.focus(),Object.keys(e.format).forEach(function(t){null==r[t]&&(Array.isArray(e.format[t])||"link"!==t&&n.quill.format(t,e.format[t],h.default.sources.USER))})}function E(t){return{key:m.keys.TAB,shiftKey:!t,format:{"code-block":!0},handler:function(e){var n=f.default.query("code-block"),r=e.index,i=e.length,l=this.quill.scroll.descendant(n,r),a=o(l,2),s=a[0],u=a[1];if(null!=s){var c=this.quill.getIndex(s),p=s.newlineIndex(u,!0)+1,d=s.newlineIndex(c+u+i),y=s.domNode.textContent.slice(p,d).split("\n");u=0,y.forEach(function(e,o){t?(s.insertAt(p+u,n.TAB),u+=n.TAB.length,0===o?r+=n.TAB.length:i+=n.TAB.length):e.startsWith(n.TAB)&&(s.deleteAt(p+u,n.TAB.length),u-=n.TAB.length,0===o?r-=n.TAB.length:i-=n.TAB.length),u+=e.length+1}),this.quill.update(h.default.sources.USER),this.quill.setSelection(r,i,h.default.sources.SILENT)}}}}function N(t){return{key:t[0].toUpperCase(),shortKey:!0,handler:function(e,n){this.quill.format(t,!n.format[t],h.default.sources.USER)}}}function j(t){if("string"==typeof t||"number"==typeof t)return j({key:t});if("object"===(void 0===t?"undefined":r(t))&&(t=(0,l.default)(t,!1)),"string"==typeof t.key)if(null!=m.keys[t.key.toUpperCase()])t.key=m.keys[t.key.toUpperCase()];else{if(1!==t.key.length)return null;t.key=t.key.toUpperCase().charCodeAt(0)}return t.shortKey&&(t[g]=t.shortKey,delete t.shortKey),t}m.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},m.DEFAULTS={bindings:{bold:N("bold"),italic:N("italic"),underline:N("underline"),indent:{key:m.keys.TAB,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","+1",h.default.sources.USER)}},outdent:{key:m.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(t,e){if(e.collapsed&&0!==e.offset)return!0;this.quill.format("indent","-1",h.default.sources.USER)}},"outdent backspace":{key:m.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(t,e){null!=e.format.indent?this.quill.format("indent","-1",h.default.sources.USER):null!=e.format.list&&this.quill.format("list",!1,h.default.sources.USER)}},"indent code-block":E(!0),"outdent code-block":E(!1),"remove tab":{key:m.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(t){this.quill.deleteText(t.index-1,1,h.default.sources.USER)}},tab:{key:m.keys.TAB,handler:function(t){this.quill.history.cutoff();var e=(new u.default).retain(t.index).delete(t.length).insert("\t");this.quill.updateContents(e,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index+1,h.default.sources.SILENT)}},"list empty enter":{key:m.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(t,e){this.quill.format("list",!1,h.default.sources.USER),e.format.indent&&this.quill.format("indent",!1,h.default.sources.USER)}},"checklist enter":{key:m.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(0,s.default)({},r.formats(),{list:"checked"}),a=(new u.default).retain(t.index).insert("\n",l).retain(r.length()-i-1).retain(1,{list:"unchecked"});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:m.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(t,e){var n=this.quill.getLine(t.index),r=o(n,2),i=r[0],l=r[1],a=(new u.default).retain(t.index).insert("\n",e.format).retain(i.length()-l-1).retain(1,{header:null});this.quill.updateContents(a,h.default.sources.USER),this.quill.setSelection(t.index+1,h.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(t,e){var n=e.prefix.length,r=this.quill.getLine(t.index),i=o(r,2),l=i[0],a=i[1];if(a>n)return!0;var s=void 0;switch(e.prefix.trim()){case"[]":case"[ ]":s="unchecked";break;case"[x]":s="checked";break;case"-":case"*":s="bullet";break;default:s="ordered"}this.quill.insertText(t.index," ",h.default.sources.USER),this.quill.history.cutoff();var c=(new u.default).retain(t.index-a).delete(n+1).retain(l.length()-2-a).retain(1,{list:s});this.quill.updateContents(c,h.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(t.index-n,h.default.sources.SILENT)}},"code exit":{key:m.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(t){var e=this.quill.getLine(t.index),n=o(e,2),r=n[0],i=n[1],l=(new u.default).retain(t.index+r.length()-i-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(l,h.default.sources.USER)}},"embed left":_(m.keys.LEFT,!1),"embed left shift":_(m.keys.LEFT,!0),"embed right":_(m.keys.RIGHT,!1),"embed right shift":_(m.keys.RIGHT,!0)}},e.default=m,e.SHORTKEY=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=s(n(0)),a=s(n(7));function s(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.selection=n,r.textNode=document.createTextNode(e.CONTENTS),r.domNode.appendChild(r.textNode),r._length=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Embed),i(e,null,[{key:"value",value:function(){}}]),i(e,[{key:"detach",value:function(){null!=this.parent&&this.parent.removeChild(this)}},{key:"format",value:function(t,n){if(0!==this._length)return o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);for(var r=this,i=0;null!=r&&r.statics.scope!==l.default.Scope.BLOCK_BLOT;)i+=r.offset(r.parent),r=r.parent;null!=r&&(this._length=e.CONTENTS.length,r.optimize(),r.formatAt(i,e.CONTENTS.length,t,n),this._length=0)}},{key:"index",value:function(t,n){return t===this.textNode?0:o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!this.selection.composing&&null!=this.parent){var t=this.textNode,n=this.selection.getNativeRange(),o=void 0,i=void 0,s=void 0;if(null!=n&&n.start.node===t&&n.end.node===t){var u=[t,n.start.offset,n.end.offset];o=u[0],i=u[1],s=u[2]}for(;null!=this.domNode.lastChild&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==e.CONTENTS){var c=this.textNode.data.split(e.CONTENTS).join("");this.next instanceof a.default?(o=this.next.domNode,this.next.insertAt(0,c),this.textNode.data=e.CONTENTS):(this.textNode.data=c,this.parent.insertBefore(l.default.create(this.textNode),this),this.textNode=document.createTextNode(e.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),null!=i){var f=[i,s].map(function(t){return Math.max(0,Math.min(o.data.length,t-1))}),h=r(f,2);return i=h[0],s=h[1],{startNode:o,startOffset:i,endNode:o,endOffset:s}}}}},{key:"update",value:function(t,e){var n=this;if(t.some(function(t){return"characterData"===t.type&&t.target===n.textNode})){var r=this.restore();r&&(e.range=r)}}},{key:"value",value:function(){return""}}]),e}();u.blotName="cursor",u.className="ql-cursor",u.tagName="span",u.CONTENTS="\ufeff",e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(0)),o=n(4),i=l(o);function l(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.default.Container),e}();a.allowedChildren=[i.default,o.BlockEmbed,a],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorStyle=e.ColorClass=e.ColorAttributor=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Attributor.Style),o(e,[{key:"value",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t);return n.startsWith("rgb(")?(n=n.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+n.split(",").map(function(t){return("00"+parseInt(t).toString(16)).slice(-2)}).join("")):n}}]),e}(),s=new l.default.Attributor.Class("color","ql-color",{scope:l.default.Scope.INLINE}),u=new a("color","color",{scope:l.default.Scope.INLINE});e.ColorAttributor=a,e.ColorClass=s,e.ColorStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitize=e.default=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(6),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"format",value:function(t,n){if(t!==this.statics.blotName||!n)return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n);n=this.constructor.sanitize(n),this.domNode.setAttribute("href",n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return t=this.sanitize(t),n.setAttribute("href",t),n.setAttribute("rel","noopener noreferrer"),n.setAttribute("target","_blank"),n}},{key:"formats",value:function(t){return t.getAttribute("href")}},{key:"sanitize",value:function(t){return u(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}}]),e}();function u(t,e){var n=document.createElement("a");n.href=t;var r=n.href.slice(0,n.href.indexOf(":"));return e.indexOf(r)>-1}s.blotName="link",s.tagName="A",s.SANITIZED_URL="about:blank",s.PROTOCOL_WHITELIST=["http","https","mailto","tel"],e.default=s,e.sanitize=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(23)),l=a(n(107));function a(t){return t&&t.__esModule?t:{default:t}}var s=0;function u(t,e){t.setAttribute(e,!("true"===t.getAttribute(e)))}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){n.togglePicker()}),this.label.addEventListener("keydown",function(t){switch(t.keyCode){case i.default.keys.ENTER:n.togglePicker();break;case i.default.keys.ESCAPE:n.escape(),t.preventDefault()}}),this.select.addEventListener("change",this.update.bind(this))}return o(t,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),u(this.label,"aria-expanded"),u(this.options,"aria-hidden")}},{key:"buildItem",value:function(t){var e=this,n=document.createElement("span");return n.tabIndex="0",n.setAttribute("role","button"),n.classList.add("ql-picker-item"),t.hasAttribute("value")&&n.setAttribute("data-value",t.getAttribute("value")),t.textContent&&n.setAttribute("data-label",t.textContent),n.addEventListener("click",function(){e.selectItem(n,!0)}),n.addEventListener("keydown",function(t){switch(t.keyCode){case i.default.keys.ENTER:e.selectItem(n,!0),t.preventDefault();break;case i.default.keys.ESCAPE:e.escape(),t.preventDefault()}}),n}},{key:"buildLabel",value:function(){var t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=l.default,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}},{key:"buildOptions",value:function(){var t=this,e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id="ql-picker-options-"+s,s+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,[].slice.call(this.select.options).forEach(function(n){var r=t.buildItem(n);e.appendChild(r),!0===n.selected&&t.selectItem(r)}),this.container.appendChild(e)}},{key:"buildPicker",value:function(){var t=this;[].slice.call(this.select.attributes).forEach(function(e){t.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var t=this;this.close(),setTimeout(function(){return t.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.container.querySelector(".ql-selected");if(t!==n&&(null!=n&&n.classList.remove("ql-selected"),null!=t&&(t.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(t.parentNode.children,t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e))){if("function"==typeof Event)this.select.dispatchEvent(new Event("change"));else if("object"===("undefined"==typeof Event?"undefined":r(Event))){var o=document.createEvent("Event");o.initEvent("change",!0,!0),this.select.dispatchEvent(o)}this.close()}}},{key:"update",value:function(){var t=void 0;if(this.select.selectedIndex>-1){var e=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(e)}else this.selectItem(null);var n=null!=t&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=b(n(0)),o=b(n(5)),i=n(4),l=b(i),a=b(n(16)),s=b(n(25)),u=b(n(24)),c=b(n(35)),f=b(n(6)),h=b(n(22)),p=b(n(7)),d=b(n(55)),y=b(n(42)),v=b(n(23));function b(t){return t&&t.__esModule?t:{default:t}}o.default.register({"blots/block":l.default,"blots/block/embed":i.BlockEmbed,"blots/break":a.default,"blots/container":s.default,"blots/cursor":u.default,"blots/embed":c.default,"blots/inline":f.default,"blots/scroll":h.default,"blots/text":p.default,"modules/clipboard":d.default,"modules/history":y.default,"modules/keyboard":v.default}),r.default.register(l.default,a.default,u.default,f.default,h.default,p.default),e.default=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=function(){function t(t){this.domNode=t,this.domNode[r.DATA_KEY]={blot:this}}return Object.defineProperty(t.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),t.create=function(t){if(null==this.tagName)throw new r.ParchmentError("Blot definition missing tagName");var e;return Array.isArray(this.tagName)?("string"==typeof t&&(t=t.toUpperCase(),parseInt(t).toString()===t&&(t=parseInt(t))),e="number"==typeof t?document.createElement(this.tagName[t-1]):this.tagName.indexOf(t)>-1?document.createElement(t):document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e},t.prototype.attach=function(){null!=this.parent&&(this.scroll=this.parent.scroll)},t.prototype.clone=function(){var t=this.domNode.cloneNode(!1);return r.create(t)},t.prototype.detach=function(){null!=this.parent&&this.parent.removeChild(this),delete this.domNode[r.DATA_KEY]},t.prototype.deleteAt=function(t,e){this.isolate(t,e).remove()},t.prototype.formatAt=function(t,e,n,o){var i=this.isolate(t,e);if(null!=r.query(n,r.Scope.BLOT)&&o)i.wrap(n,o);else if(null!=r.query(n,r.Scope.ATTRIBUTE)){var l=r.create(this.statics.scope);i.wrap(l),l.format(n,o)}},t.prototype.insertAt=function(t,e,n){var o=null==n?r.create("text",e):r.create(e,n),i=this.split(t);this.parent.insertBefore(o,i)},t.prototype.insertInto=function(t,e){void 0===e&&(e=null),null!=this.parent&&this.parent.children.remove(this);var n=null;t.children.insertBefore(this,e),null!=e&&(n=e.domNode),this.domNode.parentNode==t.domNode&&this.domNode.nextSibling==n||t.domNode.insertBefore(this.domNode,n),this.parent=t,this.attach()},t.prototype.isolate=function(t,e){var n=this.split(t);return n.split(e),n},t.prototype.length=function(){return 1},t.prototype.offset=function(t){return void 0===t&&(t=this.parent),null==this.parent||this==t?0:this.parent.children.offset(this)+this.parent.offset(t)},t.prototype.optimize=function(t){null!=this.domNode[r.DATA_KEY]&&delete this.domNode[r.DATA_KEY].mutations},t.prototype.remove=function(){null!=this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},t.prototype.replace=function(t){null!=t.parent&&(t.parent.insertBefore(this,t.next),t.remove())},t.prototype.replaceWith=function(t,e){var n="string"==typeof t?r.create(t,e):t;return n.replace(this),n},t.prototype.split=function(t,e){return 0===t?this:this.next},t.prototype.update=function(t,e){},t.prototype.wrap=function(t,e){var n="string"==typeof t?r.create(t,e):t;return null!=this.parent&&this.parent.insertBefore(n,this.next),n.appendChild(this),n},t.blotName="abstract",t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(12),o=n(32),i=n(33),l=n(1),a=function(){function t(t){this.attributes={},this.domNode=t,this.build()}return t.prototype.attribute=function(t,e){e?t.add(this.domNode,e)&&(null!=t.value(this.domNode)?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])},t.prototype.build=function(){var t=this;this.attributes={};var e=r.default.keys(this.domNode),n=o.default.keys(this.domNode),a=i.default.keys(this.domNode);e.concat(n).concat(a).forEach(function(e){var n=l.query(e,l.Scope.ATTRIBUTE);n instanceof r.default&&(t.attributes[n.attrName]=n)})},t.prototype.copy=function(t){var e=this;Object.keys(this.attributes).forEach(function(n){var r=e.attributes[n].value(e.domNode);t.format(n,r)})},t.prototype.move=function(t){var e=this;this.copy(t),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},t.prototype.values=function(){var t=this;return Object.keys(this.attributes).reduce(function(e,n){return e[n]=t.attributes[n].value(t.domNode),e},{})},t}();e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t,e){return(t.getAttribute("class")||"").split(/\s+/).filter(function(t){return 0===t.indexOf(e+"-")})}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("class")||"").split(/\s+/).map(function(t){return t.split("-").slice(0,-1).join("-")})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(this.remove(t),t.classList.add(this.keyName+"-"+e),!0)},e.prototype.remove=function(t){i(t,this.keyName).forEach(function(e){t.classList.remove(e)}),0===t.classList.length&&t.removeAttribute("class")},e.prototype.value=function(t){var e=(i(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function i(t){var e=t.split("-"),n=e.slice(1).map(function(t){return t[0].toUpperCase()+t.slice(1)}).join("");return e[0]+n}Object.defineProperty(e,"__esModule",{value:!0});var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.keys=function(t){return(t.getAttribute("style")||"").split(";").map(function(t){return t.split(":")[0].trim()})},e.prototype.add=function(t,e){return!!this.canAdd(t,e)&&(t.style[i(this.keyName)]=e,!0)},e.prototype.remove=function(t){t.style[i(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")},e.prototype.value=function(t){var e=t.style[i(this.keyName)];return this.canAdd(t,e)?e:""},e}(n(12).default);e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.options=n,this.modules={}}return r(t,[{key:"init",value:function(){var t=this;Object.keys(this.options.modules).forEach(function(e){null==t.modules[e]&&t.addModule(e)})}},{key:"addModule",value:function(t){var e=this.quill.constructor.import("modules/"+t);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}]),t}();o.DEFAULTS={modules:{}},o.themes={default:o},e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=l(n(0)),i=l(n(7));function l(t){return t&&t.__esModule?t:{default:t}}var a="\ufeff",s=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.contentNode=document.createElement("span"),n.contentNode.setAttribute("contenteditable",!1),[].slice.call(n.domNode.childNodes).forEach(function(t){n.contentNode.appendChild(t)}),n.leftGuard=document.createTextNode(a),n.rightGuard=document.createTextNode(a),n.domNode.appendChild(n.leftGuard),n.domNode.appendChild(n.contentNode),n.domNode.appendChild(n.rightGuard),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,o.default.Embed),r(e,[{key:"index",value:function(t,n){return t===this.leftGuard?0:t===this.rightGuard?1:function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"index",this).call(this,t,n)}},{key:"restore",value:function(t){var e=void 0,n=void 0,r=t.data.split(a).join("");if(t===this.leftGuard)if(this.prev instanceof i.default){var l=this.prev.length();this.prev.insertAt(l,r),e={startNode:this.prev.domNode,startOffset:l+r.length}}else n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this),e={startNode:n,startOffset:r.length};else t===this.rightGuard&&(this.next instanceof i.default?(this.next.insertAt(0,r),e={startNode:this.next.domNode,startOffset:r.length}):(n=document.createTextNode(r),this.parent.insertBefore(o.default.create(n),this.next),e={startNode:n,startOffset:r.length}));return t.data=a,e}},{key:"update",value:function(t,e){var n=this;t.forEach(function(t){if("characterData"===t.type&&(t.target===n.leftGuard||t.target===n.rightGuard)){var r=n.restore(t.target);r&&(e.range=r)}})}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlignStyle=e.AlignClass=e.AlignAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l={scope:i.default.Scope.BLOCK,whitelist:["right","center","justify"]},a=new i.default.Attributor.Attribute("align","align",l),s=new i.default.Attributor.Class("align","ql-align",l),u=new i.default.Attributor.Style("align","text-align",l);e.AlignAttribute=a,e.AlignClass=s,e.AlignStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackgroundStyle=e.BackgroundClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r},l=n(26);var a=new i.default.Attributor.Class("background","ql-bg",{scope:i.default.Scope.INLINE}),s=new l.ColorAttributor("background","background-color",{scope:i.default.Scope.INLINE});e.BackgroundClass=a,e.BackgroundStyle=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirectionStyle=e.DirectionClass=e.DirectionAttribute=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l={scope:i.default.Scope.BLOCK,whitelist:["rtl"]},a=new i.default.Attributor.Attribute("direction","dir",l),s=new i.default.Attributor.Class("direction","ql-direction",l),u=new i.default.Attributor.Style("direction","direction",l);e.DirectionAttribute=a,e.DirectionClass=s,e.DirectionStyle=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontClass=e.FontStyle=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(0),l=(r=i)&&r.__esModule?r:{default:r};var a={scope:l.default.Scope.INLINE,whitelist:["serif","monospace"]},s=new l.default.Attributor.Class("font","ql-font",a),u=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default.Attributor.Style),o(e,[{key:"value",value:function(t){return function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t).replace(/["']/g,"")}}]),e}())("font","font-family",a);e.FontStyle=u,e.FontClass=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SizeStyle=e.SizeClass=void 0;var r,o=n(0),i=(r=o)&&r.__esModule?r:{default:r};var l=new i.default.Attributor.Class("size","ql-size",{scope:i.default.Scope.INLINE,whitelist:["small","large","huge"]}),a=new i.default.Attributor.Style("size","font-size",{scope:i.default.Scope.INLINE,whitelist:["10px","18px","32px"]});e.SizeClass=l,e.SizeStyle=a},function(t,e,n){"use strict";t.exports={align:{"":n(76),center:n(77),right:n(78),justify:n(79)},background:n(80),blockquote:n(81),bold:n(82),clean:n(83),code:n(58),"code-block":n(58),color:n(84),direction:{"":n(85),rtl:n(86)},float:{center:n(87),full:n(88),left:n(89),right:n(90)},formula:n(91),header:{1:n(92),2:n(93)},italic:n(94),image:n(95),indent:{"+1":n(96),"-1":n(97)},link:n(98),list:{ordered:n(99),bullet:n(100),check:n(101)},script:{sub:n(102),super:n(103)},strike:n(104),underline:n(105),video:n(106)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastChangeIndex=e.default=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(0)),i=a(n(5)),l=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastRecorded=0,r.ignoreChange=!1,r.clear(),r.quill.on(i.default.events.EDITOR_CHANGE,function(t,e,n,o){t!==i.default.events.TEXT_CHANGE||r.ignoreChange||(r.options.userOnly&&o!==i.default.sources.USER?r.transform(e):r.record(e,n))}),r.quill.keyboard.addBinding({key:"Z",shortKey:!0},r.undo.bind(r)),r.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},r.redo.bind(r)),/Win/i.test(navigator.platform)&&r.quill.keyboard.addBinding({key:"Y",shortKey:!0},r.redo.bind(r)),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),r(e,[{key:"change",value:function(t,e){if(0!==this.stack[t].length){var n=this.stack[t].pop();this.stack[e].push(n),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(n[t],i.default.sources.USER),this.ignoreChange=!1;var r=u(n[t]);this.quill.setSelection(r)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(t,e){if(0!==t.ops.length){this.stack.redo=[];var n=this.quill.getContents().diff(e),r=Date.now();if(this.lastRecorded+this.options.delay>r&&this.stack.undo.length>0){var o=this.stack.undo.pop();n=n.compose(o.undo),t=o.redo.compose(t)}else this.lastRecorded=r;this.stack.undo.push({redo:t,undo:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(t){this.stack.undo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)}),this.stack.redo.forEach(function(e){e.undo=t.transform(e.undo,!0),e.redo=t.transform(e.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),e}();function u(t){var e=t.reduce(function(t,e){return t+=e.delete||0},0),n=t.length()-e;return function(t){var e=t.ops[t.ops.length-1];return null!=e&&(null!=e.insert?"string"==typeof e.insert&&e.insert.endsWith("\n"):null!=e.attributes&&Object.keys(e.attributes).some(function(t){return null!=o.default.query(t,o.default.Scope.BLOCK)}))}(t)&&(n-=1),n}s.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1},e.default=s,e.getLastChangeIndex=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BaseTooltip=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=p(n(3)),i=p(n(2)),l=p(n(8)),a=p(n(23)),s=p(n(34)),u=p(n(59)),c=p(n(60)),f=p(n(28)),h=p(n(61));function p(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[!1,"center","right","justify"],g=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],m=[!1,"serif","monospace"],_=["1","2","3",!1],O=["small",!1,"large","huge"],w=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return t.emitter.listenDOM("click",document.body,function e(n){if(!document.body.contains(t.root))return document.body.removeEventListener("click",e);null==r.tooltip||r.tooltip.root.contains(n.target)||document.activeElement===r.tooltip.textbox||r.quill.hasFocus()||r.tooltip.hide(),null!=r.pickers&&r.pickers.forEach(function(t){t.container.contains(n.target)||t.close()})}),r}return v(e,s.default),r(e,[{key:"addModule",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"addModule",this).call(this,t);return"toolbar"===t&&this.extendToolbar(n),n}},{key:"buildButtons",value:function(t,e){t.forEach(function(t){(t.getAttribute("class")||"").split(/\s+/).forEach(function(n){if(n.startsWith("ql-")&&(n=n.slice("ql-".length),null!=e[n]))if("direction"===n)t.innerHTML=e[n][""]+e[n].rtl;else if("string"==typeof e[n])t.innerHTML=e[n];else{var r=t.value||"";null!=r&&e[n][r]&&(t.innerHTML=e[n][r])}})})}},{key:"buildPickers",value:function(t,e){var n=this;this.pickers=t.map(function(t){if(t.classList.contains("ql-align"))return null==t.querySelector("option")&&k(t,b),new c.default(t,e.align);if(t.classList.contains("ql-background")||t.classList.contains("ql-color")){var n=t.classList.contains("ql-background")?"background":"color";return null==t.querySelector("option")&&k(t,g,"background"===n?"#ffffff":"#000000"),new u.default(t,e[n])}return null==t.querySelector("option")&&(t.classList.contains("ql-font")?k(t,m):t.classList.contains("ql-header")?k(t,_):t.classList.contains("ql-size")&&k(t,O)),new f.default(t)});this.quill.on(l.default.events.EDITOR_CHANGE,function(){n.pickers.forEach(function(t){t.update()})})}}]),e}();w.DEFAULTS=(0,o.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var t=this,e=this.container.querySelector("input.ql-image[type=file]");null==e&&((e=document.createElement("input")).setAttribute("type","file"),e.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),e.classList.add("ql-image"),e.addEventListener("change",function(){if(null!=e.files&&null!=e.files[0]){var n=new FileReader;n.onload=function(n){var r=t.quill.getSelection(!0);t.quill.updateContents((new i.default).retain(r.index).delete(r.length).insert({image:n.target.result}),l.default.sources.USER),t.quill.setSelection(r.index+1,l.default.sources.SILENT),e.value=""},n.readAsDataURL(e.files[0])}}),this.container.appendChild(e)),e.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var x=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.textbox=r.root.querySelector('input[type="text"]'),r.listen(),r}return v(e,h.default),r(e,[{key:"listen",value:function(){var t=this;this.textbox.addEventListener("keydown",function(e){a.default.match(e,"enter")?(t.save(),e.preventDefault()):a.default.match(e,"escape")&&(t.cancel(),e.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"link",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),null!=e?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+t)||""),this.root.setAttribute("data-mode",t)}},{key:"restoreFocus",value:function(){var t=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=t}},{key:"save",value:function(){var t=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":var e=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,l.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,l.default.sources.USER)),this.quill.root.scrollTop=e;break;case"video":t=function(t){var e=t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||t.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);if(e)return(e[1]||"https")+"://www.youtube.com/embed/"+e[2]+"?showinfo=0";if(e=t.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))return(e[1]||"https")+"://player.vimeo.com/video/"+e[2]+"/";return t}(t);case"formula":if(!t)break;var n=this.quill.getSelection(!0);if(null!=n){var r=n.index+n.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),t,l.default.sources.USER),"formula"===this.root.getAttribute("data-mode")&&this.quill.insertText(r+1," ",l.default.sources.USER),this.quill.setSelection(r+2,l.default.sources.USER)}}this.textbox.value="",this.hide()}}]),e}();function k(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.forEach(function(e){var r=document.createElement("option");e===n?r.setAttribute("selected","selected"):r.setAttribute("value",e),t.appendChild(r)})}e.BaseTooltip=x,e.default=w},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){this.head=this.tail=null,this.length=0}return t.prototype.append=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.insertBefore(t[0],null),t.length>1&&this.append.apply(this,t.slice(1))},t.prototype.contains=function(t){for(var e,n=this.iterator();e=n();)if(e===t)return!0;return!1},t.prototype.insertBefore=function(t,e){t&&(t.next=e,null!=e?(t.prev=e.prev,null!=e.prev&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):null!=this.tail?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)},t.prototype.offset=function(t){for(var e=0,n=this.head;null!=n;){if(n===t)return e;e+=n.length(),n=n.next}return-1},t.prototype.remove=function(t){this.contains(t)&&(null!=t.prev&&(t.prev.next=t.next),null!=t.next&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)},t.prototype.iterator=function(t){return void 0===t&&(t=this.head),function(){var e=t;return null!=t&&(t=t.next),e}},t.prototype.find=function(t,e){void 0===e&&(e=!1);for(var n,r=this.iterator();n=r();){var o=n.length();if(t<o||e&&t===o&&(null==n.next||0!==n.next.length()))return[n,t];t-=o}return[null,0]},t.prototype.forEach=function(t){for(var e,n=this.iterator();e=n();)t(e)},t.prototype.forEachAt=function(t,e,n){if(!(e<=0))for(var r,o=this.find(t),i=o[0],l=t-o[1],a=this.iterator(i);(r=a())&&l<t+e;){var s=r.length();t>l?n(r,t-l,Math.min(e,l+s-t)):n(r,0,Math.min(s,t+e-l)),l+=s}},t.prototype.map=function(t){return this.reduce(function(e,n){return e.push(t(n)),e},[])},t.prototype.reduce=function(t,e){for(var n,r=this.iterator();n=r();)e=t(e,n);return e},t}();e.default=r},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(17),l=n(1),a={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},s=function(t){function e(e){var n=t.call(this,e)||this;return n.scroll=n,n.observer=new MutationObserver(function(t){n.update(t)}),n.observer.observe(n.domNode,a),n.attach(),n}return o(e,t),e.prototype.detach=function(){t.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(e,n){this.update(),0===e&&n===this.length()?this.children.forEach(function(t){t.remove()}):t.prototype.deleteAt.call(this,e,n)},e.prototype.formatAt=function(e,n,r,o){this.update(),t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){this.update(),t.prototype.insertAt.call(this,e,n,r)},e.prototype.optimize=function(e,n){var r=this;void 0===e&&(e=[]),void 0===n&&(n={}),t.prototype.optimize.call(this,n);for(var o=[].slice.call(this.observer.takeRecords());o.length>0;)e.push(o.pop());for(var a=function(t,e){void 0===e&&(e=!0),null!=t&&t!==r&&null!=t.domNode.parentNode&&(null==t.domNode[l.DATA_KEY].mutations&&(t.domNode[l.DATA_KEY].mutations=[]),e&&a(t.parent))},s=function(t){null!=t.domNode[l.DATA_KEY]&&null!=t.domNode[l.DATA_KEY].mutations&&(t instanceof i.default&&t.children.forEach(s),t.optimize(n))},u=e,c=0;u.length>0;c+=1){if(c>=100)throw new Error("[Parchment] Maximum optimize iterations reached");for(u.forEach(function(t){var e=l.find(t.target,!0);null!=e&&(e.domNode===t.target&&("childList"===t.type?(a(l.find(t.previousSibling,!1)),[].forEach.call(t.addedNodes,function(t){var e=l.find(t,!1);a(e,!1),e instanceof i.default&&e.children.forEach(function(t){a(t,!1)})})):"attributes"===t.type&&a(e.prev)),a(e))}),this.children.forEach(s),o=(u=[].slice.call(this.observer.takeRecords())).slice();o.length>0;)e.push(o.pop())}},e.prototype.update=function(e,n){var r=this;void 0===n&&(n={}),(e=e||this.observer.takeRecords()).map(function(t){var e=l.find(t.target,!0);return null==e?null:null==e.domNode[l.DATA_KEY].mutations?(e.domNode[l.DATA_KEY].mutations=[t],e):(e.domNode[l.DATA_KEY].mutations.push(t),null)}).forEach(function(t){null!=t&&t!==r&&null!=t.domNode[l.DATA_KEY]&&t.update(t.domNode[l.DATA_KEY].mutations||[],n)}),null!=this.domNode[l.DATA_KEY].mutations&&t.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,n),this.optimize(e,n)},e.blotName="scroll",e.defaultChild="block",e.scope=l.Scope.BLOCK_BLOT,e.tagName="DIV",e}(i.default);e.default=s},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),l=n(1);var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){if(n.tagName!==e.tagName)return t.formats.call(this,n)},e.prototype.format=function(n,r){var o=this;n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):(this.children.forEach(function(t){t instanceof i.default||(t=t.wrap(e.blotName,!0)),o.attributes.copy(t)}),this.unwrap())},e.prototype.formatAt=function(e,n,r,o){null!=this.formats()[r]||l.query(r,l.Scope.ATTRIBUTE)?this.isolate(e,n).format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n);var r=this.formats();if(0===Object.keys(r).length)return this.unwrap();var o=this.next;o instanceof e&&o.prev===this&&function(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}(r,o.formats())&&(o.moveChildren(this),o.remove())},e.blotName="inline",e.scope=l.Scope.INLINE_BLOT,e.tagName="SPAN",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(18),l=n(1),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(n){var r=l.query(e.blotName).tagName;if(n.tagName!==r)return t.formats.call(this,n)},e.prototype.format=function(n,r){null!=l.query(n,l.Scope.BLOCK)&&(n!==this.statics.blotName||r?t.prototype.format.call(this,n,r):this.replaceWith(e.blotName))},e.prototype.formatAt=function(e,n,r,o){null!=l.query(r,l.Scope.BLOCK)?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.insertAt=function(e,n,r){if(null==r||null!=l.query(n,l.Scope.INLINE))t.prototype.insertAt.call(this,e,n,r);else{var o=this.split(e),i=l.create(n,r);o.parent.insertBefore(i,o)}},e.prototype.update=function(e,n){navigator.userAgent.match(/Trident/)?this.build():t.prototype.update.call(this,e,n)},e.blotName="block",e.scope=l.Scope.BLOCK_BLOT,e.tagName="P",e}(i.default);e.default=a},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.formats=function(t){},e.prototype.format=function(e,n){t.prototype.formatAt.call(this,0,this.length(),e,n)},e.prototype.formatAt=function(e,n,r,o){0===e&&n===this.length()?this.format(r,o):t.prototype.formatAt.call(this,e,n,r,o)},e.prototype.formats=function(){return this.statics.formats(this.domNode)},e}(n(19).default);e.default=i},function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var i=n(19),l=n(1),a=function(t){function e(e){var n=t.call(this,e)||this;return n.text=n.statics.value(n.domNode),n}return o(e,t),e.create=function(t){return document.createTextNode(t)},e.value=function(t){var e=t.data;return e.normalize&&(e=e.normalize()),e},e.prototype.deleteAt=function(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)},e.prototype.index=function(t,e){return this.domNode===t?e:-1},e.prototype.insertAt=function(e,n,r){null==r?(this.text=this.text.slice(0,e)+n+this.text.slice(e),this.domNode.data=this.text):t.prototype.insertAt.call(this,e,n,r)},e.prototype.length=function(){return this.text.length},e.prototype.optimize=function(n){t.prototype.optimize.call(this,n),this.text=this.statics.value(this.domNode),0===this.text.length?this.remove():this.next instanceof e&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},e.prototype.position=function(t,e){return void 0===e&&(e=!1),[this.domNode,t]},e.prototype.split=function(t,e){if(void 0===e&&(e=!1),!e){if(0===t)return this;if(t===this.length())return this.next}var n=l.create(this.domNode.splitText(t));return this.parent.insertBefore(n,this.next),this.text=this.statics.value(this.domNode),n},e.prototype.update=function(t,e){var n=this;t.some(function(t){return"characterData"===t.type&&t.target===n.domNode})&&(this.text=this.statics.value(this.domNode))},e.prototype.value=function(){return this.text},e.blotName="text",e.scope=l.Scope.INLINE_BLOT,e}(i.default);e.default=a},function(t,e,n){"use strict";var r=document.createElement("div");if(r.classList.toggle("test-class",!1),r.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return arguments.length>1&&!this.contains(t)==!e?e:o.call(this,t)}}String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var n=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>n.length)&&(e=n.length),e-=t.length;var r=n.indexOf(t,e);return-1!==r&&r===e}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,o=arguments[1],i=0;i<r;i++)if(e=n[i],t.call(o,e,i,n))return e}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,e){var n=-1,r=1,o=0;function i(t,e,u){if(t==e)return t?[[o,t]]:[];(u<0||t.length<u)&&(u=null);var f=a(t,e),h=t.substring(0,f);f=s(t=t.substring(f),e=e.substring(f));var p=t.substring(t.length-f),d=function(t,e){var u;if(!t)return[[r,e]];if(!e)return[[n,t]];var c=t.length>e.length?t:e,f=t.length>e.length?e:t,h=c.indexOf(f);if(-1!=h)return u=[[r,c.substring(0,h)],[o,f],[r,c.substring(h+f.length)]],t.length>e.length&&(u[0][0]=u[2][0]=n),u;if(1==f.length)return[[n,t],[r,e]];var p=function(t,e){var n=t.length>e.length?t:e,r=t.length>e.length?e:t;if(n.length<4||2*r.length<n.length)return null;function o(t,e,n){for(var r,o,i,l,u=t.substring(n,n+Math.floor(t.length/4)),c=-1,f="";-1!=(c=e.indexOf(u,c+1));){var h=a(t.substring(n),e.substring(c)),p=s(t.substring(0,n),e.substring(0,c));f.length<p+h&&(f=e.substring(c-p,c)+e.substring(c,c+h),r=t.substring(0,n-p),o=t.substring(n+h),i=e.substring(0,c-p),l=e.substring(c+h))}return 2*f.length>=t.length?[r,o,i,l,f]:null}var i,l,u,c,f,h=o(n,r,Math.ceil(n.length/4)),p=o(n,r,Math.ceil(n.length/2));if(!h&&!p)return null;i=p?h&&h[4].length>p[4].length?h:p:h;t.length>e.length?(l=i[0],u=i[1],c=i[2],f=i[3]):(c=i[0],f=i[1],l=i[2],u=i[3]);var d=i[4];return[l,u,c,f,d]}(t,e);if(p){var d=p[0],y=p[1],v=p[2],b=p[3],g=p[4],m=i(d,v),_=i(y,b);return m.concat([[o,g]],_)}return function(t,e){for(var o=t.length,i=e.length,a=Math.ceil((o+i)/2),s=a,u=2*a,c=new Array(u),f=new Array(u),h=0;h<u;h++)c[h]=-1,f[h]=-1;c[s+1]=0,f[s+1]=0;for(var p=o-i,d=p%2!=0,y=0,v=0,b=0,g=0,m=0;m<a;m++){for(var _=-m+y;_<=m-v;_+=2){for(var O=s+_,w=(j=_==-m||_!=m&&c[O-1]<c[O+1]?c[O+1]:c[O-1]+1)-_;j<o&&w<i&&t.charAt(j)==e.charAt(w);)j++,w++;if(c[O]=j,j>o)v+=2;else if(w>i)y+=2;else if(d){var x=s+p-_;if(x>=0&&x<u&&-1!=f[x]){var k=o-f[x];if(j>=k)return l(t,e,j,w)}}}for(var E=-m+b;E<=m-g;E+=2){for(var x=s+E,N=(k=E==-m||E!=m&&f[x-1]<f[x+1]?f[x+1]:f[x-1]+1)-E;k<o&&N<i&&t.charAt(o-k-1)==e.charAt(i-N-1);)k++,N++;if(f[x]=k,k>o)g+=2;else if(N>i)b+=2;else if(!d){var O=s+p-E;if(O>=0&&O<u&&-1!=c[O]){var j=c[O],w=s+j-O;if(j>=(k=o-k))return l(t,e,j,w)}}}}return[[n,t],[r,e]]}(t,e)}(t=t.substring(0,t.length-f),e=e.substring(0,e.length-f));return h&&d.unshift([o,h]),p&&d.push([o,p]),function t(e){e.push([o,""]);var i=0;var l=0;var u=0;var c="";var f="";var h;for(;i<e.length;)switch(e[i][0]){case r:u++,f+=e[i][1],i++;break;case n:l++,c+=e[i][1],i++;break;case o:l+u>1?(0!==l&&0!==u&&(0!==(h=a(f,c))&&(i-l-u>0&&e[i-l-u-1][0]==o?e[i-l-u-1][1]+=f.substring(0,h):(e.splice(0,0,[o,f.substring(0,h)]),i++),f=f.substring(h),c=c.substring(h)),0!==(h=s(f,c))&&(e[i][1]=f.substring(f.length-h)+e[i][1],f=f.substring(0,f.length-h),c=c.substring(0,c.length-h))),0===l?e.splice(i-u,l+u,[r,f]):0===u?e.splice(i-l,l+u,[n,c]):e.splice(i-l-u,l+u,[n,c],[r,f]),i=i-l-u+(l?1:0)+(u?1:0)+1):0!==i&&e[i-1][0]==o?(e[i-1][1]+=e[i][1],e.splice(i,1)):i++,u=0,l=0,c="",f=""}""===e[e.length-1][1]&&e.pop();var p=!1;i=1;for(;i<e.length-1;)e[i-1][0]==o&&e[i+1][0]==o&&(e[i][1].substring(e[i][1].length-e[i-1][1].length)==e[i-1][1]?(e[i][1]=e[i-1][1]+e[i][1].substring(0,e[i][1].length-e[i-1][1].length),e[i+1][1]=e[i-1][1]+e[i+1][1],e.splice(i-1,1),p=!0):e[i][1].substring(0,e[i+1][1].length)==e[i+1][1]&&(e[i-1][1]+=e[i+1][1],e[i][1]=e[i][1].substring(e[i+1][1].length)+e[i+1][1],e.splice(i+1,1),p=!0)),i++;p&&t(e)}(d),null!=u&&(d=function(t,e){var r=function(t,e){if(0===e)return[o,t];for(var r=0,i=0;i<t.length;i++){var l=t[i];if(l[0]===n||l[0]===o){var a=r+l[1].length;if(e===a)return[i+1,t];if(e<a){t=t.slice();var s=e-r,u=[l[0],l[1].slice(0,s)],c=[l[0],l[1].slice(s)];return t.splice(i,1,u,c),[i+1,t]}r=a}}throw new Error("cursor_pos is out of bounds!")}(t,e),i=r[1],l=r[0],a=i[l],s=i[l+1];if(null==a)return t;if(a[0]!==o)return t;if(null!=s&&a[1]+s[1]===s[1]+a[1])return i.splice(l,2,s,a),c(i,l,2);if(null!=s&&0===s[1].indexOf(a[1])){i.splice(l,2,[s[0],a[1]],[0,a[1]]);var u=s[1].slice(a[1].length);return u.length>0&&i.splice(l+2,0,[s[0],u]),c(i,l,3)}return t}(d,u)),d=function(t){for(var e=!1,i=function(t){return t.charCodeAt(0)>=56320&&t.charCodeAt(0)<=57343},l=2;l<t.length;l+=1)t[l-2][0]===o&&((a=t[l-2][1]).charCodeAt(a.length-1)>=55296&&a.charCodeAt(a.length-1)<=56319)&&t[l-1][0]===n&&i(t[l-1][1])&&t[l][0]===r&&i(t[l][1])&&(e=!0,t[l-1][1]=t[l-2][1].slice(-1)+t[l-1][1],t[l][1]=t[l-2][1].slice(-1)+t[l][1],t[l-2][1]=t[l-2][1].slice(0,-1));var a;if(!e)return t;for(var s=[],l=0;l<t.length;l+=1)t[l][1].length>0&&s.push(t[l]);return s}(d)}function l(t,e,n,r){var o=t.substring(0,n),l=e.substring(0,r),a=t.substring(n),s=e.substring(r),u=i(o,l),c=i(a,s);return u.concat(c)}function a(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(i,o)==e.substring(i,o)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}function s(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var n=0,r=Math.min(t.length,e.length),o=r,i=0;n<o;)t.substring(t.length-o,t.length-i)==e.substring(e.length-o,e.length-i)?i=n=o:r=o,o=Math.floor((r-n)/2+n);return o}var u=i;function c(t,e,n){for(var r=e+n-1;r>=0&&r>=e-1;r--)if(r+1<t.length){var o=t[r],i=t[r+1];o[0]===i[1]&&t.splice(r,2,[o[0],o[1]+i[1]])}return t}u.INSERT=r,u.DELETE=n,u.EQUAL=o,t.exports=u},function(t,e){function n(t){var e=[];for(var n in t)e.push(n);return e}(t.exports="function"==typeof Object.keys?Object.keys:n).shim=n},function(t,e){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(e=t.exports=n?r:o).supported=r,e.unsupported=o},function(t,e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function o(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function l(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(r=!1)),l.prototype.eventNames=function(){var t,e,o=[];if(0===this._eventsCount)return o;for(e in t=this._events)n.call(t,e)&&o.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},l.prototype.listeners=function(t,e){var n=r?r+t:t,o=this._events[n];if(e)return!!o;if(!o)return[];if(o.fn)return[o.fn];for(var i=0,l=o.length,a=new Array(l);i<l;i++)a[i]=o[i].fn;return a},l.prototype.emit=function(t,e,n,o,i,l){var a=r?r+t:t;if(!this._events[a])return!1;var s,u,c=this._events[a],f=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),f){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,o),!0;case 5:return c.fn.call(c.context,e,n,o,i),!0;case 6:return c.fn.call(c.context,e,n,o,i,l),!0}for(u=1,s=new Array(f-1);u<f;u++)s[u-1]=arguments[u];c.fn.apply(c.context,s)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),f){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,n);break;case 4:c[u].fn.call(c[u].context,e,n,o);break;default:if(!s)for(h=1,s=new Array(f-1);h<f;h++)s[h-1]=arguments[h];c[u].fn.apply(c[u].context,s)}}return!0},l.prototype.on=function(t,e,n){var o=new i(e,n||this),l=r?r+t:t;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,this._eventsCount++),this},l.prototype.once=function(t,e,n){var o=new i(e,n||this,!0),l=r?r+t:t;return this._events[l]?this._events[l].fn?this._events[l]=[this._events[l],o]:this._events[l].push(o):(this._events[l]=o,this._eventsCount++),this},l.prototype.removeListener=function(t,e,n,i){var l=r?r+t:t;if(!this._events[l])return this;if(!e)return 0==--this._eventsCount?this._events=new o:delete this._events[l],this;var a=this._events[l];if(a.fn)a.fn!==e||i&&!a.once||n&&a.context!==n||(0==--this._eventsCount?this._events=new o:delete this._events[l]);else{for(var s=0,u=[],c=a.length;s<c;s++)(a[s].fn!==e||i&&!a[s].once||n&&a[s].context!==n)&&u.push(a[s]);u.length?this._events[l]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new o:delete this._events[l]}return this},l.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new o:delete this._events[e])):(this._events=new o,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prototype.setMaxListeners=function(){return this},l.prefixed=r,l.EventEmitter=l,void 0!==t&&(t.exports=l)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchText=e.matchSpacing=e.matchNewline=e.matchBlot=e.matchAttributor=e.default=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=m(n(3)),a=m(n(2)),s=m(n(0)),u=m(n(5)),c=m(n(10)),f=m(n(9)),h=n(36),p=n(37),d=m(n(13)),y=n(26),v=n(38),b=n(39),g=n(40);function m(t){return t&&t.__esModule?t:{default:t}}function _(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var O=(0,c.default)("quill:clipboard"),w="__ql-matcher",x=[[Node.TEXT_NODE,R],[Node.TEXT_NODE,L],["br",function(t,e){q(e,"\n")||e.insert("\n");return e}],[Node.ELEMENT_NODE,L],[Node.ELEMENT_NODE,C],[Node.ELEMENT_NODE,M],[Node.ELEMENT_NODE,S],[Node.ELEMENT_NODE,function(t,e){var n={},r=t.style||{};r.fontStyle&&"italic"===A(t).fontStyle&&(n.italic=!0);r.fontWeight&&(A(t).fontWeight.startsWith("bold")||parseInt(A(t).fontWeight)>=700)&&(n.bold=!0);Object.keys(n).length>0&&(e=j(e,n));parseFloat(r.textIndent||0)>0&&(e=(new a.default).insert("\t").concat(e));return e}],["li",function(t,e){var n=s.default.query(t);if(null==n||"list-item"!==n.blotName||!q(e,"\n"))return e;var r=-1,o=t.parentNode;for(;!o.classList.contains("ql-clipboard");)"list"===(s.default.query(o)||{}).blotName&&(r+=1),o=o.parentNode;return r<=0?e:e.compose((new a.default).retain(e.length()-1).retain(1,{indent:r}))}],["b",P.bind(P,"bold")],["i",P.bind(P,"italic")],["style",function(){return new a.default}]],k=[h.AlignAttribute,v.DirectionAttribute].reduce(function(t,e){return t[e.keyName]=e,t},{}),E=[h.AlignStyle,p.BackgroundStyle,y.ColorStyle,v.DirectionStyle,b.FontStyle,g.SizeStyle].reduce(function(t,e){return t[e.keyName]=e,t},{}),N=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.root.addEventListener("paste",r.onPaste.bind(r)),r.container=r.quill.addContainer("ql-clipboard"),r.container.setAttribute("contenteditable",!0),r.container.setAttribute("tabindex",-1),r.matchers=[],x.concat(r.options.matchers).forEach(function(t){var e=o(t,2),i=e[0],l=e[1];(n.matchVisual||l!==M)&&r.addMatcher(i,l)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,f.default),i(e,[{key:"addMatcher",value:function(t,e){this.matchers.push([t,e])}},{key:"convert",value:function(t){if("string"==typeof t)return this.container.innerHTML=t.replace(/\>\r?\n +\</g,"><"),this.convert();var e=this.quill.getFormat(this.quill.selection.savedRange.index);if(e[d.default.blotName]){var n=this.container.innerText;return this.container.innerHTML="",(new a.default).insert(n,_({},d.default.blotName,e[d.default.blotName]))}var r=this.prepareMatching(),i=o(r,2),l=i[0],s=i[1],u=function t(e,n,r){return e.nodeType===e.TEXT_NODE?r.reduce(function(t,n){return n(e,t)},new a.default):e.nodeType===e.ELEMENT_NODE?[].reduce.call(e.childNodes||[],function(o,i){var l=t(i,n,r);return i.nodeType===e.ELEMENT_NODE&&(l=n.reduce(function(t,e){return e(i,t)},l),l=(i[w]||[]).reduce(function(t,e){return e(i,t)},l)),o.concat(l)},new a.default):new a.default}(this.container,l,s);return q(u,"\n")&&null==u.ops[u.ops.length-1].attributes&&(u=u.compose((new a.default).retain(u.length()-1).delete(1))),O.log("convert",this.container.innerHTML,u),this.container.innerHTML="",u}},{key:"dangerouslyPasteHTML",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.default.sources.API;if("string"==typeof t)this.quill.setContents(this.convert(t),e),this.quill.setSelection(0,u.default.sources.SILENT);else{var r=this.convert(e);this.quill.updateContents((new a.default).retain(t).concat(r),n),this.quill.setSelection(t+r.length(),u.default.sources.SILENT)}}},{key:"onPaste",value:function(t){var e=this;if(!t.defaultPrevented&&this.quill.isEnabled()){var n=this.quill.getSelection(),r=(new a.default).retain(n.index),o=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(u.default.sources.SILENT),setTimeout(function(){r=r.concat(e.convert()).delete(n.length),e.quill.updateContents(r,u.default.sources.USER),e.quill.setSelection(r.length()-n.length,u.default.sources.SILENT),e.quill.scrollingContainer.scrollTop=o,e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var t=this,e=[],n=[];return this.matchers.forEach(function(r){var i=o(r,2),l=i[0],a=i[1];switch(l){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:e.push(a);break;default:[].forEach.call(t.container.querySelectorAll(l),function(t){t[w]=t[w]||[],t[w].push(a)})}}),[e,n]}}]),e}();function j(t,e,n){return"object"===(void 0===e?"undefined":r(e))?Object.keys(e).reduce(function(t,n){return j(t,n,e[n])},t):t.reduce(function(t,r){return r.attributes&&r.attributes[e]?t.push(r):t.insert(r.insert,(0,l.default)({},_({},e,n),r.attributes))},new a.default)}function A(t){if(t.nodeType!==Node.ELEMENT_NODE)return{};return t["__ql-computed-style"]||(t["__ql-computed-style"]=window.getComputedStyle(t))}function q(t,e){for(var n="",r=t.ops.length-1;r>=0&&n.length<e.length;--r){var o=t.ops[r];if("string"!=typeof o.insert)break;n=o.insert+n}return n.slice(-1*e.length)===e}function T(t){if(0===t.childNodes.length)return!1;var e=A(t);return["block","list-item"].indexOf(e.display)>-1}function P(t,e,n){return j(n,t,!0)}function S(t,e){var n=s.default.Attributor.Attribute.keys(t),r=s.default.Attributor.Class.keys(t),o=s.default.Attributor.Style.keys(t),i={};return n.concat(r).concat(o).forEach(function(e){var n=s.default.query(e,s.default.Scope.ATTRIBUTE);null!=n&&(i[n.attrName]=n.value(t),i[n.attrName])||(null==(n=k[e])||n.attrName!==e&&n.keyName!==e||(i[n.attrName]=n.value(t)||void 0),null==(n=E[e])||n.attrName!==e&&n.keyName!==e||(n=E[e],i[n.attrName]=n.value(t)||void 0))}),Object.keys(i).length>0&&(e=j(e,i)),e}function C(t,e){var n=s.default.query(t);if(null==n)return e;if(n.prototype instanceof s.default.Embed){var r={},o=n.value(t);null!=o&&(r[n.blotName]=o,e=(new a.default).insert(r,n.formats(t)))}else"function"==typeof n.formats&&(e=j(e,n.blotName,n.formats(t)));return e}function L(t,e){return q(e,"\n")||(T(t)||e.length()>0&&t.nextSibling&&T(t.nextSibling))&&e.insert("\n"),e}function M(t,e){if(T(t)&&null!=t.nextElementSibling&&!q(e,"\n\n")){var n=t.offsetHeight+parseFloat(A(t).marginTop)+parseFloat(A(t).marginBottom);t.nextElementSibling.offsetTop>t.offsetTop+1.5*n&&e.insert("\n")}return e}function R(t,e){var n=t.data;if("O:P"===t.parentNode.tagName)return e.insert(n.trim());if(0===n.trim().length&&t.parentNode.classList.contains("ql-clipboard"))return e;if(!A(t.parentNode).whiteSpace.startsWith("pre")){var r=function(t,e){return(e=e.replace(/[^\u00a0]/g,"")).length<1&&t?" ":e};n=(n=n.replace(/\r\n/g," ").replace(/\n/g," ")).replace(/\s\s+/g,r.bind(r,!0)),(null==t.previousSibling&&T(t.parentNode)||null!=t.previousSibling&&T(t.previousSibling))&&(n=n.replace(/^\s+/,r.bind(r,!1))),(null==t.nextSibling&&T(t.parentNode)||null!=t.nextSibling&&T(t.nextSibling))&&(n=n.replace(/\s+$/,r.bind(r,!1)))}return e.insert(n)}N.DEFAULTS={matchers:[],matchVisual:!0},e.default=N,e.matchAttributor=S,e.matchBlot=C,e.matchNewline=L,e.matchSpacing=M,e.matchText=R},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(6),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"optimize",value:function(t){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),e}();s.blotName="bold",s.tagName=["STRONG","B"],e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addControls=e.default=void 0;var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=c(n(2)),l=c(n(0)),a=c(n(5)),s=c(n(10)),u=c(n(9));function c(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var h=(0,s.default)("quill:toolbar"),p=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o,i=f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(Array.isArray(i.options.container)){var l=document.createElement("div");y(l,i.options.container),t.container.parentNode.insertBefore(l,t.container),i.container=l}else"string"==typeof i.options.container?i.container=document.querySelector(i.options.container):i.container=i.options.container;return i.container instanceof HTMLElement?(i.container.classList.add("ql-toolbar"),i.controls=[],i.handlers={},Object.keys(i.options.handlers).forEach(function(t){i.addHandler(t,i.options.handlers[t])}),[].forEach.call(i.container.querySelectorAll("button, select"),function(t){i.attach(t)}),i.quill.on(a.default.events.EDITOR_CHANGE,function(t,e){t===a.default.events.SELECTION_CHANGE&&i.update(e)}),i.quill.on(a.default.events.SCROLL_OPTIMIZE,function(){var t=i.quill.selection.getRange(),e=r(t,1)[0];i.update(e)}),i):(o=h.error("Container required for toolbar",i.options),f(i,o))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,u.default),o(e,[{key:"addHandler",value:function(t,e){this.handlers[t]=e}},{key:"attach",value:function(t){var e=this,n=[].find.call(t.classList,function(t){return 0===t.indexOf("ql-")});if(n){if(n=n.slice("ql-".length),"BUTTON"===t.tagName&&t.setAttribute("type","button"),null==this.handlers[n]){if(null!=this.quill.scroll.whitelist&&null==this.quill.scroll.whitelist[n])return void h.warn("ignoring attaching to disabled format",n,t);if(null==l.default.query(n))return void h.warn("ignoring attaching to nonexistent format",n,t)}var o="SELECT"===t.tagName?"change":"click";t.addEventListener(o,function(o){var s=void 0;if("SELECT"===t.tagName){if(t.selectedIndex<0)return;var u=t.options[t.selectedIndex];s=!u.hasAttribute("selected")&&(u.value||!1)}else s=!t.classList.contains("ql-active")&&(t.value||!t.hasAttribute("value")),o.preventDefault();e.quill.focus();var c=e.quill.selection.getRange(),f=r(c,1)[0];if(null!=e.handlers[n])e.handlers[n].call(e,s);else if(l.default.query(n).prototype instanceof l.default.Embed){if(!(s=prompt("Enter "+n)))return;e.quill.updateContents((new i.default).retain(f.index).delete(f.length).insert(function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},n,s)),a.default.sources.USER)}else e.quill.format(n,s,a.default.sources.USER);e.update(f)}),this.controls.push([n,t])}}},{key:"update",value:function(t){var e=null==t?{}:this.quill.getFormat(t);this.controls.forEach(function(n){var o=r(n,2),i=o[0],l=o[1];if("SELECT"===l.tagName){var a=void 0;if(null==t)a=null;else if(null==e[i])a=l.querySelector("option[selected]");else if(!Array.isArray(e[i])){var s=e[i];"string"==typeof s&&(s=s.replace(/\"/g,'\\"')),a=l.querySelector('option[value="'+s+'"]')}null==a?(l.value="",l.selectedIndex=-1):a.selected=!0}else if(null==t)l.classList.remove("ql-active");else if(l.hasAttribute("value")){var u=e[i]===l.getAttribute("value")||null!=e[i]&&e[i].toString()===l.getAttribute("value")||null==e[i]&&!l.getAttribute("value");l.classList.toggle("ql-active",u)}else l.classList.toggle("ql-active",null!=e[i])})}}]),e}();function d(t,e,n){var r=document.createElement("button");r.setAttribute("type","button"),r.classList.add("ql-"+e),null!=n&&(r.value=n),t.appendChild(r)}function y(t,e){Array.isArray(e[0])||(e=[e]),e.forEach(function(e){var n=document.createElement("span");n.classList.add("ql-formats"),e.forEach(function(t){if("string"==typeof t)d(n,t);else{var e=Object.keys(t)[0],r=t[e];Array.isArray(r)?function(t,e,n){var r=document.createElement("select");r.classList.add("ql-"+e),n.forEach(function(t){var e=document.createElement("option");!1!==t?e.setAttribute("value",t):e.setAttribute("selected","selected"),r.appendChild(e)}),t.appendChild(r)}(n,e,r):d(n,e,r)}}),t.appendChild(n)})}p.DEFAULTS={},p.DEFAULTS={container:null,handlers:{clean:function(){var t=this,e=this.quill.getSelection();if(null!=e)if(0==e.length){var n=this.quill.getFormat();Object.keys(n).forEach(function(e){null!=l.default.query(e,l.default.Scope.INLINE)&&t.quill.format(e,!1)})}else this.quill.removeFormat(e,a.default.sources.USER)},direction:function(t){var e=this.quill.getFormat().align;"rtl"===t&&null==e?this.quill.format("align","right",a.default.sources.USER):t||"right"!==e||this.quill.format("align",!1,a.default.sources.USER),this.quill.format("direction",t,a.default.sources.USER)},indent:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e),r=parseInt(n.indent||0);if("+1"===t||"-1"===t){var o="+1"===t?1:-1;"rtl"===n.direction&&(o*=-1),this.quill.format("indent",r+o,a.default.sources.USER)}},link:function(t){!0===t&&(t=prompt("Enter link URL:")),this.quill.format("link",t,a.default.sources.USER)},list:function(t){var e=this.quill.getSelection(),n=this.quill.getFormat(e);"check"===t?"checked"===n.list||"unchecked"===n.list?this.quill.format("list",!1,a.default.sources.USER):this.quill.format("list","unchecked",a.default.sources.USER):this.quill.format("list",t,a.default.sources.USER)}}},e.default=p,e.addControls=y},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(28),a=(r=l)&&r.__esModule?r:{default:r};var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.label.innerHTML=n,r.container.classList.add("ql-color-picker"),[].slice.call(r.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(t){t.classList.add("ql-primary")}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default),o(e,[{key:"buildItem",value:function(t){var n=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"buildItem",this).call(this,t);return n.style.backgroundColor=t.getAttribute("value")||"",n}},{key:"selectItem",value:function(t,n){i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n);var r=this.label.querySelector(".ql-color-label"),o=t&&t.getAttribute("data-value")||"";r&&("line"===r.tagName?r.style.stroke=o:r.style.fill=o)}}]),e}();e.default=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(28),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.container.classList.add("ql-icon-picker"),[].forEach.call(r.container.querySelectorAll(".ql-picker-item"),function(t){t.innerHTML=n[t.getAttribute("data-value")||""]}),r.defaultItem=r.container.querySelector(".ql-selected"),r.selectItem(r.defaultItem),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,[{key:"selectItem",value:function(t,n){(function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0})(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"selectItem",this).call(this,t,n),t=t||this.defaultItem,this.label.innerHTML=t.innerHTML}}]),e}();e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var o=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.quill=e,this.boundsContainer=n||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){r.root.style.marginTop=-1*r.quill.root.scrollTop+"px"}),this.hide()}return r(t,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(t){var e=t.left+t.width/2-this.root.offsetWidth/2,n=t.bottom+this.quill.root.scrollTop;this.root.style.left=e+"px",this.root.style.top=n+"px",this.root.classList.remove("ql-flip");var r=this.boundsContainer.getBoundingClientRect(),o=this.root.getBoundingClientRect(),i=0;if(o.right>r.right&&(i=r.right-o.right,this.root.style.left=e+i+"px"),o.left<r.left&&(i=r.left-o.left,this.root.style.left=e+i+"px"),o.bottom>r.bottom){var l=o.bottom-o.top,a=t.bottom-t.top+l;this.root.style.top=n-a+"px",this.root.classList.add("ql-flip")}return i}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,a=t[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=p(n(3)),a=p(n(8)),s=n(43),u=p(s),c=p(n(27)),f=n(15),h=p(n(41));function p(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function y(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var b=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],g=function(t){function e(t,n){d(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=b);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-snow"),r}return v(e,u.default),i(e,[{key:"extendToolbar",value:function(t){t.container.classList.add("ql-snow"),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),h.default),this.tooltip=new m(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(e,n){t.handlers.link.call(t,!n.format.link)})}}]),e}();g.DEFAULTS=(0,l.default)(!0,{},u.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){if(t){var e=this.quill.getSelection();if(null==e||0==e.length)return;var n=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(n)&&0!==n.indexOf("mailto:")&&(n="mailto:"+n),this.quill.theme.tooltip.edit("link",n)}else this.quill.format("link",!1)}}}}});var m=function(t){function e(t,n){d(this,e);var r=y(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.preview=r.root.querySelector("a.ql-preview"),r}return v(e,s.BaseTooltip),i(e,[{key:"listen",value:function(){var t=this;o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(e){t.root.classList.contains("ql-editing")?t.save():t.edit("link",t.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(e){if(null!=t.linkRange){var n=t.linkRange;t.restoreFocus(),t.quill.formatText(n,"link",!1,a.default.sources.USER),delete t.linkRange}e.preventDefault(),t.hide()}),this.quill.on(a.default.events.SELECTION_CHANGE,function(e,n,o){if(null!=e){if(0===e.length&&o===a.default.sources.USER){var i=t.quill.scroll.descendant(c.default,e.index),l=r(i,2),s=l[0],u=l[1];if(null!=s){t.linkRange=new f.Range(e.index-u,s.length());var h=c.default.formats(s.domNode);return t.preview.textContent=h,t.preview.setAttribute("href",h),t.show(),void t.position(t.quill.getBounds(t.linkRange))}}else delete t.linkRange;t.hide()}})}},{key:"show",value:function(){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),e}();m.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),e.default=g},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=M(n(29)),o=n(36),i=n(38),l=n(64),a=M(n(65)),s=M(n(66)),u=n(67),c=M(u),f=n(37),h=n(26),p=n(39),d=n(40),y=M(n(56)),v=M(n(68)),b=M(n(27)),g=M(n(69)),m=M(n(70)),_=M(n(71)),O=M(n(72)),w=M(n(73)),x=n(13),k=M(x),E=M(n(74)),N=M(n(75)),j=M(n(57)),A=M(n(41)),q=M(n(28)),T=M(n(59)),P=M(n(60)),S=M(n(61)),C=M(n(108)),L=M(n(62));function M(t){return t&&t.__esModule?t:{default:t}}r.default.register({"attributors/attribute/direction":i.DirectionAttribute,"attributors/class/align":o.AlignClass,"attributors/class/background":f.BackgroundClass,"attributors/class/color":h.ColorClass,"attributors/class/direction":i.DirectionClass,"attributors/class/font":p.FontClass,"attributors/class/size":d.SizeClass,"attributors/style/align":o.AlignStyle,"attributors/style/background":f.BackgroundStyle,"attributors/style/color":h.ColorStyle,"attributors/style/direction":i.DirectionStyle,"attributors/style/font":p.FontStyle,"attributors/style/size":d.SizeStyle},!0),r.default.register({"formats/align":o.AlignClass,"formats/direction":i.DirectionClass,"formats/indent":l.IndentClass,"formats/background":f.BackgroundStyle,"formats/color":h.ColorStyle,"formats/font":p.FontClass,"formats/size":d.SizeClass,"formats/blockquote":a.default,"formats/code-block":k.default,"formats/header":s.default,"formats/list":c.default,"formats/bold":y.default,"formats/code":x.Code,"formats/italic":v.default,"formats/link":b.default,"formats/script":g.default,"formats/strike":m.default,"formats/underline":_.default,"formats/image":O.default,"formats/video":w.default,"formats/list/item":u.ListItem,"modules/formula":E.default,"modules/syntax":N.default,"modules/toolbar":j.default,"themes/bubble":C.default,"themes/snow":L.default,"ui/icons":A.default,"ui/picker":q.default,"ui/icon-picker":P.default,"ui/color-picker":T.default,"ui/tooltip":S.default},!0),e.default=r.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentClass=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(0),a=(r=l)&&r.__esModule?r:{default:r};var s=new(function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Attributor.Class),o(e,[{key:"add",value:function(t,n){if("+1"===n||"-1"===n){var r=this.value(t)||0;n="+1"===n?r+1:r-1}return 0===n?(this.remove(t),!0):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"add",this).call(this,t,n)}},{key:"canAdd",value:function(t,n){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,n)||i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"canAdd",this).call(this,t,parseInt(n))}},{key:"value",value:function(t){return parseInt(i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"value",this).call(this,t))||void 0}}]),e}())("indent","ql-indent",{scope:a.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});e.IndentClass=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(4),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="blockquote",l.tagName="blockquote",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(4),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,null,[{key:"formats",value:function(t){return this.tagName.indexOf(t.tagName)+1}}]),e}();a.blotName="header",a.tagName=["H1","H2","H3","H4","H5","H6"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.ListItem=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},i=s(n(0)),l=s(n(4)),a=s(n(25));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,l.default),r(e,[{key:"format",value:function(t,n){t!==p.blotName||n?o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n):this.replaceWith(i.default.create(this.statics.scope))}},{key:"remove",value:function(){null==this.prev&&null==this.next?this.parent.remove():o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(t,n){return this.parent.isolate(this.offset(this.parent),this.length()),t===this.parent.statics.blotName?(this.parent.replaceWith(t,n),this):(this.parent.unwrap(),o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t,n))}}],[{key:"formats",value:function(t){return t.tagName===this.tagName?void 0:o(e.__proto__||Object.getPrototypeOf(e),"formats",this).call(this,t)}}]),e}();h.blotName="list-item",h.tagName="LI";var p=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=function(e){if(e.target.parentNode===t){var r=n.statics.formats(t),o=i.default.find(e.target);"checked"===r?o.format("list","unchecked"):"unchecked"===r&&o.format("list","checked")}};return t.addEventListener("touchstart",r),t.addEventListener("mousedown",r),n}return f(e,a.default),r(e,null,[{key:"create",value:function(t){var n="ordered"===t?"OL":"UL",r=o(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,n);return"checked"!==t&&"unchecked"!==t||r.setAttribute("data-checked","checked"===t),r}},{key:"formats",value:function(t){return"OL"===t.tagName?"ordered":"UL"===t.tagName?t.hasAttribute("data-checked")?"true"===t.getAttribute("data-checked")?"checked":"unchecked":"bullet":void 0}}]),r(e,[{key:"format",value:function(t,e){this.children.length>0&&this.children.tail.format(t,e)}},{key:"formats",value:function(){return t={},e=this.statics.blotName,n=this.statics.formats(this.domNode),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"insertBefore",value:function(t,n){if(t instanceof h)o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"insertBefore",this).call(this,t,n);else{var r=null==n?this.length():n.offset(this),i=this.split(r);i.parent.insertBefore(t,i)}}},{key:"optimize",value:function(t){o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"optimize",this).call(this,t);var n=this.next;null!=n&&n.prev===this&&n.statics.blotName===this.statics.blotName&&n.domNode.tagName===this.domNode.tagName&&n.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(n.moveChildren(this),n.remove())}},{key:"replace",value:function(t){if(t.statics.blotName!==this.statics.blotName){var n=i.default.create(this.statics.defaultChild);t.moveChildren(n),this.appendChild(n)}o(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replace",this).call(this,t)}}]),e}();p.blotName="list",p.scope=i.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],e.ListItem=h,e.default=p},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(56),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="italic",l.tagName=["EM","I"],e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(6),l=(r=i)&&r.__esModule?r:{default:r};var a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.default),o(e,null,[{key:"create",value:function(t){return"super"===t?document.createElement("sup"):"sub"===t?document.createElement("sub"):function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t)}},{key:"formats",value:function(t){return"SUB"===t.tagName?"sub":"SUP"===t.tagName?"super":void 0}}]),e}();a.blotName="script",a.tagName=["SUB","SUP"],e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="strike",l.tagName="S",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(6),i=(r=o)&&r.__esModule?r:{default:r};var l=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.default),e}();l.blotName="underline",l.tagName="U",e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(0),a=(r=l)&&r.__esModule?r:{default:r},s=n(27);var u=["alt","height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,a.default.Embed),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"match",value:function(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}},{key:"sanitize",value:function(t){return(0,s.sanitize)(t,["http","https","data"])?t:"//:0"}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="image",c.tagName="IMG",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},l=n(4),a=n(27),s=(r=a)&&r.__esModule?r:{default:r};var u=["height","width"],c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,l.BlockEmbed),o(e,[{key:"format",value:function(t,n){u.indexOf(t)>-1?n?this.domNode.setAttribute(t,n):this.domNode.removeAttribute(t):i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"format",this).call(this,t,n)}}],[{key:"create",value:function(t){var n=i(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(t)),n}},{key:"formats",value:function(t){return u.reduce(function(e,n){return t.hasAttribute(n)&&(e[n]=t.getAttribute(n)),e},{})}},{key:"sanitize",value:function(t){return s.default.sanitize(t)}},{key:"value",value:function(t){return t.getAttribute("src")}}]),e}();c.blotName="video",c.className="ql-video",c.tagName="IFRAME",e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.FormulaBlot=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=a(n(35)),i=a(n(5)),l=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var f=function(t){function e(){return s(this,e),u(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return c(e,o.default),r(e,null,[{key:"create",value:function(t){var n=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.__proto__||Object.getPrototypeOf(e),"create",this).call(this,t);return"string"==typeof t&&(window.katex.render(t,n,{throwOnError:!1,errorColor:"#f00"}),n.setAttribute("data-value",t)),n}},{key:"value",value:function(t){return t.getAttribute("data-value")}}]),e}();f.blotName="formula",f.className="ql-formula",f.tagName="SPAN";var h=function(t){function e(){s(this,e);var t=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(null==window.katex)throw new Error("Formula module requires KaTeX.");return t}return c(e,l.default),r(e,null,[{key:"register",value:function(){i.default.register(f,!0)}}]),e}();e.FormulaBlot=f,e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.CodeToken=e.CodeBlock=void 0;var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=s(n(0)),i=s(n(5)),l=s(n(9)),a=s(n(13));function s(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=function(t){function e(){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return f(e,a.default),r(e,[{key:"replaceWith",value:function(t){this.domNode.textContent=this.domNode.textContent,this.attach(),function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0}(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"replaceWith",this).call(this,t)}},{key:"highlight",value:function(t){var e=this.domNode.textContent;this.cachedText!==e&&((e.trim().length>0||null==this.cachedText)&&(this.domNode.innerHTML=t(e),this.domNode.normalize(),this.attach()),this.cachedText=e)}}]),e}();h.className="ql-syntax";var p=new o.default.Attributor.Class("token","hljs",{scope:o.default.Scope.INLINE}),d=function(t){function e(t,n){u(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if("function"!=typeof r.options.highlight)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var o=null;return r.quill.on(i.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(o),o=setTimeout(function(){r.highlight(),o=null},r.options.interval)}),r.highlight(),r}return f(e,l.default),r(e,null,[{key:"register",value:function(){i.default.register(p,!0),i.default.register(h,!0)}}]),r(e,[{key:"highlight",value:function(){var t=this;if(!this.quill.selection.composing){this.quill.update(i.default.sources.USER);var e=this.quill.getSelection();this.quill.scroll.descendants(h).forEach(function(e){e.highlight(t.options.highlight)}),this.quill.update(i.default.sources.SILENT),null!=e&&this.quill.setSelection(e,i.default.sources.SILENT)}}}]),e}();d.DEFAULTS={highlight:null==window.hljs?null:function(t){return window.hljs.highlightAuto(t).value},interval:1e3},e.CodeBlock=h,e.CodeToken=p,e.default=d},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,e){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,e){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,e){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BubbleTooltip=void 0;var r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var l=o.get;return void 0!==l?l.call(r):void 0},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=f(n(3)),l=f(n(8)),a=n(43),s=f(a),u=n(15),c=f(n(41));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],v=function(t){function e(t,n){h(this,e),null!=n.modules.toolbar&&null==n.modules.toolbar.container&&(n.modules.toolbar.container=y);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.container.classList.add("ql-bubble"),r}return d(e,s.default),o(e,[{key:"extendToolbar",value:function(t){this.tooltip=new b(this.quill,this.options.bounds),this.tooltip.root.appendChild(t.container),this.buildButtons([].slice.call(t.container.querySelectorAll("button")),c.default),this.buildPickers([].slice.call(t.container.querySelectorAll("select")),c.default)}}]),e}();v.DEFAULTS=(0,i.default)(!0,{},s.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(t){t?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var b=function(t){function e(t,n){h(this,e);var r=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.quill.on(l.default.events.EDITOR_CHANGE,function(t,e,n,o){if(t===l.default.events.SELECTION_CHANGE)if(null!=e&&e.length>0&&o===l.default.sources.USER){r.show(),r.root.style.left="0px",r.root.style.width="",r.root.style.width=r.root.offsetWidth+"px";var i=r.quill.getLines(e.index,e.length);if(1===i.length)r.position(r.quill.getBounds(e));else{var a=i[i.length-1],s=r.quill.getIndex(a),c=Math.min(a.length()-1,e.index+e.length-s),f=r.quill.getBounds(new u.Range(s,c));r.position(f)}}else document.activeElement!==r.textbox&&r.quill.hasFocus()&&r.hide()}),r}return d(e,a.BaseTooltip),o(e,[{key:"listen",value:function(){var t=this;r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){t.root.classList.remove("ql-editing")}),this.quill.on(l.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!t.root.classList.contains("ql-hidden")){var e=t.quill.getSelection();null!=e&&t.position(t.quill.getBounds(e))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(t){var n=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"position",this).call(this,t),o=this.root.querySelector(".ql-tooltip-arrow");if(o.style.marginLeft="",0===n)return n;o.style.marginLeft=-1*n-o.offsetWidth/2+"px"}}]),e}();b.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),e.BubbleTooltip=b,e.default=v},function(t,e,n){t.exports=n(63)}]).default});
|
|
763
|
-
},{"buffer":"aMB2"}],"NLGZ":[function(require,module,exports) {
|
|
764
|
-
var define;
|
|
765
|
-
var global = arguments[3];
|
|
766
|
-
var A,e=arguments[3];function t(A){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A})(A)}!function(e,r){"object"===("undefined"==typeof exports?"undefined":t(exports))&&"undefined"!=typeof module?module.exports=r():"function"==typeof A&&A.amd?A(r):(e="undefined"!=typeof globalThis?globalThis:e||self).html2canvas=r()}(this,function(){"use strict";var A=function(e,t){return(A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,e){A.__proto__=e}||function(A,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(A[t]=e[t])})(e,t)};function e(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var r=function(){return(r=Object.assign||function(A){for(var e,t=1,r=arguments.length;t<r;t++)for(var B in e=arguments[t])Object.prototype.hasOwnProperty.call(e,B)&&(A[B]=e[B]);return A}).apply(this,arguments)};function B(A,e,t,r){return new(t||(t=Promise))(function(B,n){function s(A){try{i(r.next(A))}catch(e){n(e)}}function o(A){try{i(r.throw(A))}catch(e){n(e)}}function i(A){var e;A.done?B(A.value):(e=A.value,e instanceof t?e:new t(function(A){A(e)})).then(s,o)}i((r=r.apply(A,e||[])).next())})}function n(A,e){var t,r,B,n,s={label:0,sent:function(){if(1&B[0])throw B[1];return B[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(n){return function(o){return function(n){if(t)throw new TypeError("Generator is already executing.");for(;s;)try{if(t=1,r&&(B=2&n[0]?r.return:n[0]?r.throw||((B=r.return)&&B.call(r),0):r.next)&&!(B=B.call(r,n[1])).done)return B;switch(r=0,B&&(n=[2&n[0],B.value]),n[0]){case 0:case 1:B=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!(B=(B=s.trys).length>0&&B[B.length-1])&&(6===n[0]||2===n[0])){s=0;continue}if(3===n[0]&&(!B||n[1]>B[0]&&n[1]<B[3])){s.label=n[1];break}if(6===n[0]&&s.label<B[1]){s.label=B[1],B=n;break}if(B&&s.label<B[2]){s.label=B[2],s.ops.push(n);break}B[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(A,s)}catch(o){n=[6,o],r=0}finally{t=B=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,o])}}}function s(A,e,t){if(t||2===arguments.length)for(var r,B=0,n=e.length;B<n;B++)!r&&B in e||(r||(r=Array.prototype.slice.call(e,0,B)),r[B]=e[B]);return A.concat(r||e)}for(var o=function(){function A(A,e,t,r){this.left=A,this.top=e,this.width=t,this.height=r}return A.prototype.add=function(e,t,r,B){return new A(this.left+e,this.top+t,this.width+r,this.height+B)},A.fromClientRect=function(e,t){return new A(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},A.fromDOMRectList=function(e,t){var r=t[0];return r?new A(r.x+e.windowBounds.left,r.y+e.windowBounds.top,r.width,r.height):A.EMPTY},A.EMPTY=new A(0,0,0,0),A}(),i=function(A,e){return o.fromClientRect(A,e.getBoundingClientRect())},c=function(A){for(var e=[],t=0,r=A.length;t<r;){var B=A.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=A.charCodeAt(t++);56320==(64512&n)?e.push(((1023&B)<<10)+(1023&n)+65536):(e.push(B),t--)}else e.push(B)}return e},Q=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n},a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w="undefined"==typeof Uint8Array?[]:new Uint8Array(256),g=0;g<a.length;g++)w[a.charCodeAt(g)]=g;var C=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},u=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A<this.highStart)return e=2080+(A>>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),U=10,l=13,F=15,h=17,d=18,E=19,f=20,H=21,I=22,p=24,y=25,K=26,L=27,m=28,D=30,b=32,v=33,R=34,O=35,S=37,T=38,M=39,N=40,G=42,x=[9001,65288],V="!",P=function(A){var e,t,r,B=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),Q=Array.isArray(c)?c:new Uint8Array(c);for(e=0;e<o;e+=4)t=w[A.charCodeAt(e)],r=w[A.charCodeAt(e+1)],B=w[A.charCodeAt(e+2)],n=w[A.charCodeAt(e+3)],Q[i++]=t<<2|r>>4,Q[i++]=(15&r)<<4|B>>2,Q[i++]=(3&B)<<6|63&n;return c}(A),n=Array.isArray(B)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(B):new Uint32Array(B),s=Array.isArray(B)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(B):new Uint16Array(B),o=C(s,12,n[4]/2),i=2===n[5]?C(s,(24+n[4])/2):(e=n,t=Math.ceil((24+n[4])/4),e.slice?e.slice(t,r):new Uint32Array(Array.prototype.slice.call(e,t,r)));return new u(n[0],n[1],n[2],n[3],o,i)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),k=[D,36],J=[1,2,3,5],X=[U,8],_=[L,K],Y=J.concat(X),W=[T,M,N,R,O],Z=[F,l],q=function(A,e,t,r){var B=r[t];if(Array.isArray(A)?-1!==A.indexOf(B):A===B)for(var n=t;n<=r.length;){if((i=r[++n])===e)return!0;if(i!==U)break}if(B===U)for(n=t;n>0;){var s=r[--n];if(Array.isArray(A)?-1!==A.indexOf(s):A===s)for(var o=t;o<=r.length;){var i;if((i=r[++o])===e)return!0;if(i!==U)break}if(s!==U)break}return!1},j=function(A,e){for(var t=A;t>=0;){var r=e[t];if(r!==U)return r;t--}return 0},z=function(A,e,t,r,B){if(0===t[r])return"×";var n=r-1;if(Array.isArray(B)&&!0===B[n])return"×";var s=n-1,o=n+1,i=e[n],c=s>=0?e[s]:0,Q=e[o];if(2===i&&3===Q)return"×";if(-1!==J.indexOf(i))return V;if(-1!==J.indexOf(Q))return"×";if(-1!==X.indexOf(Q))return"×";if(8===j(n,e))return"÷";if(11===P.get(A[n]))return"×";if((i===b||i===v)&&11===P.get(A[o]))return"×";if(7===i||7===Q)return"×";if(9===i)return"×";if(-1===[U,l,F].indexOf(i)&&9===Q)return"×";if(-1!==[h,d,E,p,m].indexOf(Q))return"×";if(j(n,e)===I)return"×";if(q(23,I,n,e))return"×";if(q([h,d],H,n,e))return"×";if(q(12,12,n,e))return"×";if(i===U)return"÷";if(23===i||23===Q)return"×";if(16===Q||16===i)return"÷";if(-1!==[l,F,H].indexOf(Q)||14===i)return"×";if(36===c&&-1!==Z.indexOf(i))return"×";if(i===m&&36===Q)return"×";if(Q===f)return"×";if(-1!==k.indexOf(Q)&&i===y||-1!==k.indexOf(i)&&Q===y)return"×";if(i===L&&-1!==[S,b,v].indexOf(Q)||-1!==[S,b,v].indexOf(i)&&Q===K)return"×";if(-1!==k.indexOf(i)&&-1!==_.indexOf(Q)||-1!==_.indexOf(i)&&-1!==k.indexOf(Q))return"×";if(-1!==[L,K].indexOf(i)&&(Q===y||-1!==[I,F].indexOf(Q)&&e[o+1]===y)||-1!==[I,F].indexOf(i)&&Q===y||i===y&&-1!==[y,m,p].indexOf(Q))return"×";if(-1!==[y,m,p,h,d].indexOf(Q))for(var a=n;a>=0;){if((w=e[a])===y)return"×";if(-1===[m,p].indexOf(w))break;a--}if(-1!==[L,K].indexOf(Q))for(a=-1!==[h,d].indexOf(i)?s:n;a>=0;){var w;if((w=e[a])===y)return"×";if(-1===[m,p].indexOf(w))break;a--}if(T===i&&-1!==[T,M,R,O].indexOf(Q)||-1!==[M,R].indexOf(i)&&-1!==[M,N].indexOf(Q)||-1!==[N,O].indexOf(i)&&Q===N)return"×";if(-1!==W.indexOf(i)&&-1!==[f,K].indexOf(Q)||-1!==W.indexOf(Q)&&i===L)return"×";if(-1!==k.indexOf(i)&&-1!==k.indexOf(Q))return"×";if(i===p&&-1!==k.indexOf(Q))return"×";if(-1!==k.concat(y).indexOf(i)&&Q===I&&-1===x.indexOf(A[o])||-1!==k.concat(y).indexOf(Q)&&i===d)return"×";if(41===i&&41===Q){for(var g=t[n],C=1;g>0&&41===e[--g];)C++;if(C%2!=0)return"×"}return i===b&&Q===v?"×":"÷"},$=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=function(A,e){void 0===e&&(e="strict");var t=[],r=[],B=[];return A.forEach(function(A,n){var s=P.get(A);if(s>50?(B.push(!0),s-=50):B.push(!1),-1!==["normal","auto","loose"].indexOf(e)&&-1!==[8208,8211,12316,12448].indexOf(A))return r.push(n),t.push(16);if(4===s||11===s){if(0===n)return r.push(n),t.push(D);var o=t[n-1];return-1===Y.indexOf(o)?(r.push(r[n-1]),t.push(o)):(r.push(n),t.push(D))}return r.push(n),31===s?t.push("strict"===e?H:S):s===G?t.push(D):29===s?t.push(D):43===s?A>=131072&&A<=196605||A>=196608&&A<=262141?t.push(S):t.push(D):void t.push(s)}),[r,t,B]}(A,e.lineBreak),r=t[0],B=t[1],n=t[2];return"break-all"!==e.wordBreak&&"break-word"!==e.wordBreak||(B=B.map(function(A){return-1!==[y,D,G].indexOf(A)?S:A})),[r,B,"keep-all"===e.wordBreak?n.map(function(e,t){return e&&A[t]>=19968&&A[t]<=40959}):void 0]},AA=function(){function A(A,e,t,r){this.codePoints=A,this.required=e===V,this.start=t,this.end=r}return A.prototype.slice=function(){return Q.apply(void 0,this.codePoints.slice(this.start,this.end))},A}(),eA=function(A){return A>=48&&A<=57},tA=function(A){return eA(A)||A>=65&&A<=70||A>=97&&A<=102},rA=function(A){return 10===A||9===A||32===A},BA=function(A){return function(A){return function(A){return A>=97&&A<=122}(A)||function(A){return A>=65&&A<=90}(A)}(A)||function(A){return A>=128}(A)||95===A},nA=function(A){return BA(A)||eA(A)||45===A},sA=function(A){return A>=0&&A<=8||11===A||A>=14&&A<=31||127===A},oA=function(A,e){return 92===A&&10!==e},iA=function(A,e,t){return 45===A?BA(e)||oA(e,t):!!BA(A)||!(92!==A||!oA(A,e))},cA=function(A,e,t){return 43===A||45===A?!!eA(e)||46===e&&eA(t):eA(46===A?e:A)},QA=function(A){var e=0,t=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(t=-1),e++);for(var r=[];eA(A[e]);)r.push(A[e++]);var B=r.length?parseInt(Q.apply(void 0,r),10):0;46===A[e]&&e++;for(var n=[];eA(A[e]);)n.push(A[e++]);var s=n.length,o=s?parseInt(Q.apply(void 0,n),10):0;69!==A[e]&&101!==A[e]||e++;var i=1;43!==A[e]&&45!==A[e]||(45===A[e]&&(i=-1),e++);for(var c=[];eA(A[e]);)c.push(A[e++]);var a=c.length?parseInt(Q.apply(void 0,c),10):0;return t*(B+o*Math.pow(10,-s))*Math.pow(10,i*a)},aA={type:2},wA={type:3},gA={type:4},CA={type:13},uA={type:8},UA={type:21},lA={type:9},FA={type:10},hA={type:11},dA={type:12},EA={type:14},fA={type:23},HA={type:1},IA={type:25},pA={type:24},yA={type:26},KA={type:27},LA={type:28},mA={type:29},DA={type:31},bA={type:32},vA=function(){function A(){this._value=[]}return A.prototype.write=function(A){this._value=this._value.concat(c(A))},A.prototype.read=function(){for(var A=[],e=this.consumeToken();e!==bA;)A.push(e),e=this.consumeToken();return A},A.prototype.consumeToken=function(){var A=this.consumeCodePoint();switch(A){case 34:return this.consumeStringToken(34);case 35:var e=this.peekCodePoint(0),t=this.peekCodePoint(1),r=this.peekCodePoint(2);if(nA(e)||oA(t,r)){var B=iA(e,t,r)?2:1;return{type:5,value:this.consumeName(),flags:B}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),CA;break;case 39:return this.consumeStringToken(39);case 40:return aA;case 41:return wA;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),EA;break;case 43:if(cA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 44:return gA;case 45:var n=A,s=this.peekCodePoint(0),o=this.peekCodePoint(1);if(cA(n,s,o))return this.reconsumeCodePoint(A),this.consumeNumericToken();if(iA(n,s,o))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();if(45===s&&62===o)return this.consumeCodePoint(),this.consumeCodePoint(),pA;break;case 46:if(cA(A,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(A),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var i=this.consumeCodePoint();if(42===i&&47===(i=this.consumeCodePoint()))return this.consumeToken();if(-1===i)return this.consumeToken()}break;case 58:return yA;case 59:return KA;case 60:if(33===this.peekCodePoint(0)&&45===this.peekCodePoint(1)&&45===this.peekCodePoint(2))return this.consumeCodePoint(),this.consumeCodePoint(),IA;break;case 64:var c=this.peekCodePoint(0),a=this.peekCodePoint(1),w=this.peekCodePoint(2);if(iA(c,a,w))return{type:7,value:this.consumeName()};break;case 91:return LA;case 92:if(oA(A,this.peekCodePoint(0)))return this.reconsumeCodePoint(A),this.consumeIdentLikeToken();break;case 93:return mA;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),uA;break;case 123:return hA;case 125:return dA;case 117:case 85:var g=this.peekCodePoint(0),C=this.peekCodePoint(1);return 43!==g||!tA(C)&&63!==C||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(A),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),lA;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),UA;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),FA;break;case-1:return bA}return rA(A)?(this.consumeWhiteSpace(),DA):eA(A)?(this.reconsumeCodePoint(A),this.consumeNumericToken()):BA(A)?(this.reconsumeCodePoint(A),this.consumeIdentLikeToken()):{type:6,value:Q(A)}},A.prototype.consumeCodePoint=function(){var A=this._value.shift();return void 0===A?-1:A},A.prototype.reconsumeCodePoint=function(A){this._value.unshift(A)},A.prototype.peekCodePoint=function(A){return A>=this._value.length?-1:this._value[A]},A.prototype.consumeUnicodeRangeToken=function(){for(var A=[],e=this.consumeCodePoint();tA(e)&&A.length<6;)A.push(e),e=this.consumeCodePoint();for(var t=!1;63===e&&A.length<6;)A.push(e),e=this.consumeCodePoint(),t=!0;if(t)return{type:30,start:parseInt(Q.apply(void 0,A.map(function(A){return 63===A?48:A})),16),end:parseInt(Q.apply(void 0,A.map(function(A){return 63===A?70:A})),16)};var r=parseInt(Q.apply(void 0,A),16);if(45===this.peekCodePoint(0)&&tA(this.peekCodePoint(1))){this.consumeCodePoint(),e=this.consumeCodePoint();for(var B=[];tA(e)&&B.length<6;)B.push(e),e=this.consumeCodePoint();return{type:30,start:r,end:parseInt(Q.apply(void 0,B),16)}}return{type:30,start:r,end:r}},A.prototype.consumeIdentLikeToken=function(){var A=this.consumeName();return"url"===A.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:A}):{type:20,value:A}},A.prototype.consumeUrlToken=function(){var A=[];if(this.consumeWhiteSpace(),-1===this.peekCodePoint(0))return{type:22,value:""};var e=this.peekCodePoint(0);if(39===e||34===e){var t=this.consumeStringToken(this.consumeCodePoint());return 0===t.type&&(this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:t.value}):(this.consumeBadUrlRemnants(),fA)}for(;;){var r=this.consumeCodePoint();if(-1===r||41===r)return{type:22,value:Q.apply(void 0,A)};if(rA(r))return this.consumeWhiteSpace(),-1===this.peekCodePoint(0)||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:Q.apply(void 0,A)}):(this.consumeBadUrlRemnants(),fA);if(34===r||39===r||40===r||sA(r))return this.consumeBadUrlRemnants(),fA;if(92===r){if(!oA(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),fA;A.push(this.consumeEscapedCodePoint())}else A.push(r)}},A.prototype.consumeWhiteSpace=function(){for(;rA(this.peekCodePoint(0));)this.consumeCodePoint()},A.prototype.consumeBadUrlRemnants=function(){for(;;){var A=this.consumeCodePoint();if(41===A||-1===A)return;oA(A,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},A.prototype.consumeStringSlice=function(A){for(var e="";A>0;){var t=Math.min(6e4,A);e+=Q.apply(void 0,this._value.splice(0,t)),A-=t}return this._value.shift(),e},A.prototype.consumeStringToken=function(A){for(var e="",t=0;;){var r=this._value[t];if(-1===r||void 0===r||r===A)return{type:0,value:e+=this.consumeStringSlice(t)};if(10===r)return this._value.splice(0,t),HA;if(92===r){var B=this._value[t+1];-1!==B&&void 0!==B&&(10===B?(e+=this.consumeStringSlice(t),t=-1,this._value.shift()):oA(r,B)&&(e+=this.consumeStringSlice(t),e+=Q(this.consumeEscapedCodePoint()),t=-1))}t++}},A.prototype.consumeNumber=function(){var A=[],e=4,t=this.peekCodePoint(0);for(43!==t&&45!==t||A.push(this.consumeCodePoint());eA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===t&&eA(r))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;eA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());t=this.peekCodePoint(0),r=this.peekCodePoint(1);var B=this.peekCodePoint(2);if((69===t||101===t)&&((43===r||45===r)&&eA(B)||eA(r)))for(A.push(this.consumeCodePoint(),this.consumeCodePoint()),e=8;eA(this.peekCodePoint(0));)A.push(this.consumeCodePoint());return[QA(A),e]},A.prototype.consumeNumericToken=function(){var A=this.consumeNumber(),e=A[0],t=A[1],r=this.peekCodePoint(0),B=this.peekCodePoint(1),n=this.peekCodePoint(2);return iA(r,B,n)?{type:15,number:e,flags:t,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}},A.prototype.consumeEscapedCodePoint=function(){var A=this.consumeCodePoint();if(tA(A)){for(var e=Q(A);tA(this.peekCodePoint(0))&&e.length<6;)e+=Q(this.consumeCodePoint());rA(this.peekCodePoint(0))&&this.consumeCodePoint();var t=parseInt(e,16);return 0===t||function(A){return A>=55296&&A<=57343}(t)||t>1114111?65533:t}return-1===A?65533:A},A.prototype.consumeName=function(){for(var A="";;){var e=this.consumeCodePoint();if(nA(e))A+=Q(e);else{if(!oA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),A;A+=Q(this.consumeEscapedCodePoint())}}},A}(),RA=function(){function A(A){this._tokens=A}return A.create=function(e){var t=new vA;return t.write(e),new A(t.read())},A.parseValue=function(e){return A.create(e).parseComponentValue()},A.parseValues=function(e){return A.create(e).parseComponentValues()},A.prototype.parseComponentValue=function(){for(var A=this.consumeToken();31===A.type;)A=this.consumeToken();if(32===A.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(A);var e=this.consumeComponentValue();do{A=this.consumeToken()}while(31===A.type);if(32===A.type)return e;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},A.prototype.parseComponentValues=function(){for(var A=[];;){var e=this.consumeComponentValue();if(32===e.type)return A;A.push(e),A.push()}},A.prototype.consumeComponentValue=function(){var A=this.consumeToken();switch(A.type){case 11:case 28:case 2:return this.consumeSimpleBlock(A.type);case 19:return this.consumeFunction(A)}return A},A.prototype.consumeSimpleBlock=function(A){for(var e={type:A,values:[]},t=this.consumeToken();;){if(32===t.type||PA(t,A))return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue()),t=this.consumeToken()}},A.prototype.consumeFunction=function(A){for(var e={name:A.value,values:[],type:18};;){var t=this.consumeToken();if(32===t.type||3===t.type)return e;this.reconsumeToken(t),e.values.push(this.consumeComponentValue())}},A.prototype.consumeToken=function(){var A=this._tokens.shift();return void 0===A?bA:A},A.prototype.reconsumeToken=function(A){this._tokens.unshift(A)},A}(),OA=function(A){return 15===A.type},SA=function(A){return 17===A.type},TA=function(A){return 20===A.type},MA=function(A){return 0===A.type},NA=function(A,e){return TA(A)&&A.value===e},GA=function(A){return 31!==A.type},xA=function(A){return 31!==A.type&&4!==A.type},VA=function(A){var e=[],t=[];return A.forEach(function(A){if(4===A.type){if(0===t.length)throw new Error("Error parsing function args, zero tokens for arg");return e.push(t),void(t=[])}31!==A.type&&t.push(A)}),t.length&&e.push(t),e},PA=function(A,e){return 11===e&&12===A.type||(28===e&&29===A.type||2===e&&3===A.type)},kA=function(A){return 17===A.type||15===A.type},JA=function(A){return 16===A.type||kA(A)},XA=function(A){return A.length>1?[A[0],A[1]]:[A[0]]},_A={type:17,number:0,flags:4},YA={type:16,number:50,flags:4},WA={type:16,number:100,flags:4},ZA=function(A,e,t){var r=A[0],B=A[1];return[qA(r,e),qA(void 0!==B?B:r,t)]},qA=function(A,e){if(16===A.type)return A.number/100*e;if(OA(A))switch(A.unit){case"rem":case"em":return 16*A.number;case"px":default:return A.number}return A.number},jA=function(A,e){if(15===e.type)switch(e.unit){case"deg":return Math.PI*e.number/180;case"grad":return Math.PI/200*e.number;case"rad":return e.number;case"turn":return 2*Math.PI*e.number}throw new Error("Unsupported angle type")},zA=function(A){return 15===A.type&&("deg"===A.unit||"grad"===A.unit||"rad"===A.unit||"turn"===A.unit)},$A=function(A){switch(A.filter(TA).map(function(A){return A.value}).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[_A,_A];case"to top":case"bottom":return Ae(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[_A,WA];case"to right":case"left":return Ae(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[WA,WA];case"to bottom":case"top":return Ae(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[WA,_A];case"to left":case"right":return Ae(270)}return 0},Ae=function(A){return Math.PI*A/180},ee=function(A,e){if(18===e.type){var t=Qe[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(A,e.values)}if(5===e.type){if(3===e.value.length){var r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3);return Be(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),1)}if(4===e.value.length){r=e.value.substring(0,1),B=e.value.substring(1,2),n=e.value.substring(2,3);var s=e.value.substring(3,4);return Be(parseInt(r+r,16),parseInt(B+B,16),parseInt(n+n,16),parseInt(s+s,16)/255)}if(6===e.value.length){r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6);return Be(parseInt(r,16),parseInt(B,16),parseInt(n,16),1)}if(8===e.value.length){r=e.value.substring(0,2),B=e.value.substring(2,4),n=e.value.substring(4,6),s=e.value.substring(6,8);return Be(parseInt(r,16),parseInt(B,16),parseInt(n,16),parseInt(s,16)/255)}}if(20===e.type){var o=we[e.value.toUpperCase()];if(void 0!==o)return o}return we.TRANSPARENT},te=function(A){return 0==(255&A)},re=function(A){var e=255&A,t=255&A>>8,r=255&A>>16,B=255&A>>24;return e<255?"rgba("+B+","+r+","+t+","+e/255+")":"rgb("+B+","+r+","+t+")"},Be=function(A,e,t,r){return(A<<24|e<<16|t<<8|Math.round(255*r)<<0)>>>0},ne=function(A,e){if(17===A.type)return A.number;if(16===A.type){var t=3===e?1:255;return 3===e?A.number/100*t:Math.round(A.number/100*t)}return 0},se=function(A,e){var t=e.filter(xA);if(3===t.length){var r=t.map(ne),B=r[0],n=r[1],s=r[2];return Be(B,n,s,1)}if(4===t.length){var o=t.map(ne),i=(B=o[0],n=o[1],s=o[2],o[3]);return Be(B,n,s,i)}return 0};function oe(A,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<.5?e:t<2/3?6*(e-A)*(2/3-t)+A:A}var ie,ce=function(A,e){var t=e.filter(xA),r=t[0],B=t[1],n=t[2],s=t[3],o=(17===r.type?Ae(r.number):jA(A,r))/(2*Math.PI),i=JA(B)?B.number/100:0,c=JA(n)?n.number/100:0,Q=void 0!==s&&JA(s)?qA(s,1):1;if(0===i)return Be(255*c,255*c,255*c,1);var a=c<=.5?c*(i+1):c+i-c*i,w=2*c-a,g=oe(w,a,o+1/3),C=oe(w,a,o),u=oe(w,a,o-1/3);return Be(255*g,255*C,255*u,Q)},Qe={hsl:ce,hsla:ce,rgb:se,rgba:se},ae=function(A,e){return ee(A,RA.create(e).parseComponentValue())},we={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199};!function(A){A[A.BORDER_BOX=0]="BORDER_BOX",A[A.PADDING_BOX=1]="PADDING_BOX",A[A.CONTENT_BOX=2]="CONTENT_BOX"}(ie||(ie={}));var ge,Ce={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(TA(A))switch(A.value){case"padding-box":return ie.PADDING_BOX;case"content-box":return ie.CONTENT_BOX}return ie.BORDER_BOX})}},ue={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ue=function(A,e){var t=ee(A,e[0]),r=e[1];return r&&JA(r)?{color:t,stop:r}:{color:t,stop:null}},le=function(A,e){var t=A[0],r=A[A.length-1];null===t.stop&&(t.stop=_A),null===r.stop&&(r.stop=WA);for(var B=[],n=0,s=0;s<A.length;s++){var o=A[s].stop;if(null!==o){var i=qA(o,e);i>n?B.push(i):B.push(n),n=i}else B.push(null)}var c=null;for(s=0;s<B.length;s++){var Q=B[s];if(null===Q)null===c&&(c=s);else if(null!==c){for(var a=s-c,w=(Q-B[c-1])/(a+1),g=1;g<=a;g++)B[c+g-1]=w*g;c=null}}return A.map(function(A,t){return{color:A.color,stop:Math.max(Math.min(1,B[t]/e),0)}})},Fe=function(A,e,t){var r="number"==typeof A?A:function(A,e,t){var r=e/2,B=t/2,n=qA(A[0],e)-r,s=B-qA(A[1],t);return(Math.atan2(s,n)+2*Math.PI)%(2*Math.PI)}(A,e,t),B=Math.abs(e*Math.sin(r))+Math.abs(t*Math.cos(r)),n=e/2,s=t/2,o=B/2,i=Math.sin(r-Math.PI/2)*o,c=Math.cos(r-Math.PI/2)*o;return[B,n-c,n+c,s-i,s+i]},he=function(A,e){return Math.sqrt(A*A+e*e)},de=function(A,e,t,r,B){return[[0,0],[0,e],[A,0],[A,e]].reduce(function(A,e){var n=e[0],s=e[1],o=he(t-n,r-s);return(B?o<A.optimumDistance:o>A.optimumDistance)?{optimumCorner:e,optimumDistance:o}:A},{optimumDistance:B?1/0:-1/0,optimumCorner:null}).optimumCorner},Ee=function(A,e){var t=Ae(180),r=[];return VA(e).forEach(function(e,B){if(0===B){var n=e[0];if(20===n.type&&-1!==["top","left","right","bottom"].indexOf(n.value))return void(t=$A(e));if(zA(n))return void(t=(jA(A,n)+Ae(270))%Ae(360))}var s=Ue(A,e);r.push(s)}),{angle:t,stops:r,type:ge.LINEAR_GRADIENT}},fe=function(A,e){var t=He.CIRCLE,r=Ie.FARTHEST_CORNER,B=[],n=[];return VA(e).forEach(function(e,s){var o=!0;if(0===s?o=e.reduce(function(A,e){if(TA(e))switch(e.value){case"center":return n.push(YA),!1;case"top":case"left":return n.push(_A),!1;case"right":case"bottom":return n.push(WA),!1}else if(JA(e)||kA(e))return n.push(e),!1;return A},o):1===s&&(o=e.reduce(function(A,e){if(TA(e))switch(e.value){case"circle":return t=He.CIRCLE,!1;case"ellipse":return t=He.ELLIPSE,!1;case"contain":case"closest-side":return r=Ie.CLOSEST_SIDE,!1;case"farthest-side":return r=Ie.FARTHEST_SIDE,!1;case"closest-corner":return r=Ie.CLOSEST_CORNER,!1;case"cover":case"farthest-corner":return r=Ie.FARTHEST_CORNER,!1}else if(kA(e)||JA(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A},o)),o){var i=Ue(A,e);B.push(i)}}),{size:r,shape:t,stops:B,position:n,type:ge.RADIAL_GRADIENT}};!function(A){A[A.URL=0]="URL",A[A.LINEAR_GRADIENT=1]="LINEAR_GRADIENT",A[A.RADIAL_GRADIENT=2]="RADIAL_GRADIENT"}(ge||(ge={}));var He,Ie;!function(A){A[A.CIRCLE=0]="CIRCLE",A[A.ELLIPSE=1]="ELLIPSE"}(He||(He={})),function(A){A[A.CLOSEST_SIDE=0]="CLOSEST_SIDE",A[A.FARTHEST_SIDE=1]="FARTHEST_SIDE",A[A.CLOSEST_CORNER=2]="CLOSEST_CORNER",A[A.FARTHEST_CORNER=3]="FARTHEST_CORNER"}(Ie||(Ie={}));var pe=function(A,e){if(22===e.type){var t={url:e.value,type:ge.URL};return A.cache.addImage(e.value),t}if(18===e.type){var r=Ke[e.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return r(A,e.values)}throw new Error("Unsupported image type "+e.type)};var ye,Ke={"linear-gradient":function(A,e){var t=Ae(180),r=[];return VA(e).forEach(function(e,B){if(0===B){var n=e[0];if(20===n.type&&"to"===n.value)return void(t=$A(e));if(zA(n))return void(t=jA(A,n))}var s=Ue(A,e);r.push(s)}),{angle:t,stops:r,type:ge.LINEAR_GRADIENT}},"-moz-linear-gradient":Ee,"-ms-linear-gradient":Ee,"-o-linear-gradient":Ee,"-webkit-linear-gradient":Ee,"radial-gradient":function(A,e){var t=He.CIRCLE,r=Ie.FARTHEST_CORNER,B=[],n=[];return VA(e).forEach(function(e,s){var o=!0;if(0===s){var i=!1;o=e.reduce(function(A,e){if(i)if(TA(e))switch(e.value){case"center":return n.push(YA),A;case"top":case"left":return n.push(_A),A;case"right":case"bottom":return n.push(WA),A}else(JA(e)||kA(e))&&n.push(e);else if(TA(e))switch(e.value){case"circle":return t=He.CIRCLE,!1;case"ellipse":return t=He.ELLIPSE,!1;case"at":return i=!0,!1;case"closest-side":return r=Ie.CLOSEST_SIDE,!1;case"cover":case"farthest-side":return r=Ie.FARTHEST_SIDE,!1;case"contain":case"closest-corner":return r=Ie.CLOSEST_CORNER,!1;case"farthest-corner":return r=Ie.FARTHEST_CORNER,!1}else if(kA(e)||JA(e))return Array.isArray(r)||(r=[]),r.push(e),!1;return A},o)}if(o){var c=Ue(A,e);B.push(c)}}),{size:r,shape:t,stops:B,position:n,type:ge.RADIAL_GRADIENT}},"-moz-radial-gradient":fe,"-ms-radial-gradient":fe,"-o-radial-gradient":fe,"-webkit-radial-gradient":fe,"-webkit-gradient":function(A,e){var t=Ae(180),r=[],B=ge.LINEAR_GRADIENT,n=He.CIRCLE,s=Ie.FARTHEST_CORNER;return VA(e).forEach(function(e,t){var n=e[0];if(0===t){if(TA(n)&&"linear"===n.value)return void(B=ge.LINEAR_GRADIENT);if(TA(n)&&"radial"===n.value)return void(B=ge.RADIAL_GRADIENT)}if(18===n.type)if("from"===n.name){var s=ee(A,n.values[0]);r.push({stop:_A,color:s})}else if("to"===n.name)s=ee(A,n.values[0]),r.push({stop:WA,color:s});else if("color-stop"===n.name){var o=n.values.filter(xA);if(2===o.length){s=ee(A,o[1]);var i=o[0];SA(i)&&r.push({stop:{type:16,number:100*i.number,flags:i.flags},color:s})}}}),B===ge.LINEAR_GRADIENT?{angle:(t+Ae(180))%Ae(360),stops:r,type:B}:{size:s,shape:n,stops:r,position:[],type:B}}},Le={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e.filter(function(A){return xA(A)&&function(A){return!(20===A.type&&"none"===A.value||18===A.type&&!Ke[A.name])}(A)}).map(function(e){return pe(A,e)})}},me={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(A,e){return e.map(function(A){if(TA(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},De={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(A,e){return VA(e).map(function(A){return A.filter(JA)}).map(XA)}};!function(A){A[A.REPEAT=0]="REPEAT",A[A.NO_REPEAT=1]="NO_REPEAT",A[A.REPEAT_X=2]="REPEAT_X",A[A.REPEAT_Y=3]="REPEAT_Y"}(ye||(ye={}));var be,ve={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(A,e){return VA(e).map(function(A){return A.filter(TA).map(function(A){return A.value}).join(" ")}).map(Re)}},Re=function(A){switch(A){case"no-repeat":return ye.NO_REPEAT;case"repeat-x":case"repeat no-repeat":return ye.REPEAT_X;case"repeat-y":case"no-repeat repeat":return ye.REPEAT_Y;case"repeat":default:return ye.REPEAT}};!function(A){A.AUTO="auto",A.CONTAIN="contain",A.COVER="cover"}(be||(be={}));var Oe,Se={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(A,e){return VA(e).map(function(A){return A.filter(Te)})}},Te=function(A){return TA(A)||JA(A)},Me=function(A){return{name:"border-"+A+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Ne=Me("top"),Ge=Me("right"),xe=Me("bottom"),Ve=Me("left"),Pe=function(A){return{name:"border-radius-"+A,initialValue:"0 0",prefix:!1,type:1,parse:function(A,e){return XA(e.filter(JA))}}},ke=Pe("top-left"),Je=Pe("top-right"),Xe=Pe("bottom-right"),_e=Pe("bottom-left");!function(A){A[A.NONE=0]="NONE",A[A.SOLID=1]="SOLID",A[A.DASHED=2]="DASHED",A[A.DOTTED=3]="DOTTED",A[A.DOUBLE=4]="DOUBLE"}(Oe||(Oe={}));var Ye,We=function(A){return{name:"border-"+A+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(A,e){switch(e){case"none":return Oe.NONE;case"dashed":return Oe.DASHED;case"dotted":return Oe.DOTTED;case"double":return Oe.DOUBLE}return Oe.SOLID}}},Ze=We("top"),qe=We("right"),je=We("bottom"),ze=We("left"),$e=function(A){return{name:"border-"+A+"-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return OA(e)?e.number:0}}},At=$e("top"),et=$e("right"),tt=$e("bottom"),rt=$e("left"),Bt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},nt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(A,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},st={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(A,e){return e.filter(TA).reduce(function(A,e){return A|ot(e.value)},0)}},ot=function(A){switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0};!function(A){A[A.NONE=0]="NONE",A[A.LEFT=1]="LEFT",A[A.RIGHT=2]="RIGHT",A[A.INLINE_START=3]="INLINE_START",A[A.INLINE_END=4]="INLINE_END"}(Ye||(Ye={}));var it,ct={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"left":return Ye.LEFT;case"right":return Ye.RIGHT;case"inline-start":return Ye.INLINE_START;case"inline-end":return Ye.INLINE_END}return Ye.NONE}},Qt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(A,e){return 20===e.type&&"normal"===e.value?0:17===e.type?e.number:15===e.type?e.number:0}};!function(A){A.NORMAL="normal",A.STRICT="strict"}(it||(it={}));var at,wt={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"strict":return it.STRICT;case"normal":default:return it.NORMAL}}},gt={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ct=function(A,e){return TA(A)&&"normal"===A.value?1.2*e:17===A.type?e*A.number:JA(A)?qA(A,e):e},ut={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(A,e){return 20===e.type&&"none"===e.value?null:pe(A,e)}};!function(A){A[A.INSIDE=0]="INSIDE",A[A.OUTSIDE=1]="OUTSIDE"}(at||(at={}));var Ut,lt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(A,e){switch(e){case"inside":return at.INSIDE;case"outside":default:return at.OUTSIDE}}};!function(A){A[A.NONE=-1]="NONE",A[A.DISC=0]="DISC",A[A.CIRCLE=1]="CIRCLE",A[A.SQUARE=2]="SQUARE",A[A.DECIMAL=3]="DECIMAL",A[A.CJK_DECIMAL=4]="CJK_DECIMAL",A[A.DECIMAL_LEADING_ZERO=5]="DECIMAL_LEADING_ZERO",A[A.LOWER_ROMAN=6]="LOWER_ROMAN",A[A.UPPER_ROMAN=7]="UPPER_ROMAN",A[A.LOWER_GREEK=8]="LOWER_GREEK",A[A.LOWER_ALPHA=9]="LOWER_ALPHA",A[A.UPPER_ALPHA=10]="UPPER_ALPHA",A[A.ARABIC_INDIC=11]="ARABIC_INDIC",A[A.ARMENIAN=12]="ARMENIAN",A[A.BENGALI=13]="BENGALI",A[A.CAMBODIAN=14]="CAMBODIAN",A[A.CJK_EARTHLY_BRANCH=15]="CJK_EARTHLY_BRANCH",A[A.CJK_HEAVENLY_STEM=16]="CJK_HEAVENLY_STEM",A[A.CJK_IDEOGRAPHIC=17]="CJK_IDEOGRAPHIC",A[A.DEVANAGARI=18]="DEVANAGARI",A[A.ETHIOPIC_NUMERIC=19]="ETHIOPIC_NUMERIC",A[A.GEORGIAN=20]="GEORGIAN",A[A.GUJARATI=21]="GUJARATI",A[A.GURMUKHI=22]="GURMUKHI",A[A.HEBREW=22]="HEBREW",A[A.HIRAGANA=23]="HIRAGANA",A[A.HIRAGANA_IROHA=24]="HIRAGANA_IROHA",A[A.JAPANESE_FORMAL=25]="JAPANESE_FORMAL",A[A.JAPANESE_INFORMAL=26]="JAPANESE_INFORMAL",A[A.KANNADA=27]="KANNADA",A[A.KATAKANA=28]="KATAKANA",A[A.KATAKANA_IROHA=29]="KATAKANA_IROHA",A[A.KHMER=30]="KHMER",A[A.KOREAN_HANGUL_FORMAL=31]="KOREAN_HANGUL_FORMAL",A[A.KOREAN_HANJA_FORMAL=32]="KOREAN_HANJA_FORMAL",A[A.KOREAN_HANJA_INFORMAL=33]="KOREAN_HANJA_INFORMAL",A[A.LAO=34]="LAO",A[A.LOWER_ARMENIAN=35]="LOWER_ARMENIAN",A[A.MALAYALAM=36]="MALAYALAM",A[A.MONGOLIAN=37]="MONGOLIAN",A[A.MYANMAR=38]="MYANMAR",A[A.ORIYA=39]="ORIYA",A[A.PERSIAN=40]="PERSIAN",A[A.SIMP_CHINESE_FORMAL=41]="SIMP_CHINESE_FORMAL",A[A.SIMP_CHINESE_INFORMAL=42]="SIMP_CHINESE_INFORMAL",A[A.TAMIL=43]="TAMIL",A[A.TELUGU=44]="TELUGU",A[A.THAI=45]="THAI",A[A.TIBETAN=46]="TIBETAN",A[A.TRAD_CHINESE_FORMAL=47]="TRAD_CHINESE_FORMAL",A[A.TRAD_CHINESE_INFORMAL=48]="TRAD_CHINESE_INFORMAL",A[A.UPPER_ARMENIAN=49]="UPPER_ARMENIAN",A[A.DISCLOSURE_OPEN=50]="DISCLOSURE_OPEN",A[A.DISCLOSURE_CLOSED=51]="DISCLOSURE_CLOSED"}(Ut||(Ut={}));var Ft,ht={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"disc":return Ut.DISC;case"circle":return Ut.CIRCLE;case"square":return Ut.SQUARE;case"decimal":return Ut.DECIMAL;case"cjk-decimal":return Ut.CJK_DECIMAL;case"decimal-leading-zero":return Ut.DECIMAL_LEADING_ZERO;case"lower-roman":return Ut.LOWER_ROMAN;case"upper-roman":return Ut.UPPER_ROMAN;case"lower-greek":return Ut.LOWER_GREEK;case"lower-alpha":return Ut.LOWER_ALPHA;case"upper-alpha":return Ut.UPPER_ALPHA;case"arabic-indic":return Ut.ARABIC_INDIC;case"armenian":return Ut.ARMENIAN;case"bengali":return Ut.BENGALI;case"cambodian":return Ut.CAMBODIAN;case"cjk-earthly-branch":return Ut.CJK_EARTHLY_BRANCH;case"cjk-heavenly-stem":return Ut.CJK_HEAVENLY_STEM;case"cjk-ideographic":return Ut.CJK_IDEOGRAPHIC;case"devanagari":return Ut.DEVANAGARI;case"ethiopic-numeric":return Ut.ETHIOPIC_NUMERIC;case"georgian":return Ut.GEORGIAN;case"gujarati":return Ut.GUJARATI;case"gurmukhi":return Ut.GURMUKHI;case"hebrew":return Ut.HEBREW;case"hiragana":return Ut.HIRAGANA;case"hiragana-iroha":return Ut.HIRAGANA_IROHA;case"japanese-formal":return Ut.JAPANESE_FORMAL;case"japanese-informal":return Ut.JAPANESE_INFORMAL;case"kannada":return Ut.KANNADA;case"katakana":return Ut.KATAKANA;case"katakana-iroha":return Ut.KATAKANA_IROHA;case"khmer":return Ut.KHMER;case"korean-hangul-formal":return Ut.KOREAN_HANGUL_FORMAL;case"korean-hanja-formal":return Ut.KOREAN_HANJA_FORMAL;case"korean-hanja-informal":return Ut.KOREAN_HANJA_INFORMAL;case"lao":return Ut.LAO;case"lower-armenian":return Ut.LOWER_ARMENIAN;case"malayalam":return Ut.MALAYALAM;case"mongolian":return Ut.MONGOLIAN;case"myanmar":return Ut.MYANMAR;case"oriya":return Ut.ORIYA;case"persian":return Ut.PERSIAN;case"simp-chinese-formal":return Ut.SIMP_CHINESE_FORMAL;case"simp-chinese-informal":return Ut.SIMP_CHINESE_INFORMAL;case"tamil":return Ut.TAMIL;case"telugu":return Ut.TELUGU;case"thai":return Ut.THAI;case"tibetan":return Ut.TIBETAN;case"trad-chinese-formal":return Ut.TRAD_CHINESE_FORMAL;case"trad-chinese-informal":return Ut.TRAD_CHINESE_INFORMAL;case"upper-armenian":return Ut.UPPER_ARMENIAN;case"disclosure-open":return Ut.DISCLOSURE_OPEN;case"disclosure-closed":return Ut.DISCLOSURE_CLOSED;case"none":default:return Ut.NONE}}},dt=function(A){return{name:"margin-"+A,initialValue:"0",prefix:!1,type:4}},Et=dt("top"),ft=dt("right"),Ht=dt("bottom"),It=dt("left");!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.SCROLL=2]="SCROLL",A[A.CLIP=3]="CLIP",A[A.AUTO=4]="AUTO"}(Ft||(Ft={}));var pt,yt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(A,e){return e.filter(TA).map(function(A){switch(A.value){case"hidden":return Ft.HIDDEN;case"scroll":return Ft.SCROLL;case"clip":return Ft.CLIP;case"auto":return Ft.AUTO;case"visible":default:return Ft.VISIBLE}})}},Kt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},Lt=function(A){return{name:"padding-"+A,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},mt=Lt("top"),Dt=Lt("right"),bt=Lt("bottom"),vt=Lt("left");!function(A){A[A.LEFT=0]="LEFT",A[A.CENTER=1]="CENTER",A[A.RIGHT=2]="RIGHT"}(pt||(pt={}));var Rt,Ot={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(A,e){switch(e){case"right":return pt.RIGHT;case"center":case"justify":return pt.CENTER;case"left":default:return pt.LEFT}}};!function(A){A[A.STATIC=0]="STATIC",A[A.RELATIVE=1]="RELATIVE",A[A.ABSOLUTE=2]="ABSOLUTE",A[A.FIXED=3]="FIXED",A[A.STICKY=4]="STICKY"}(Rt||(Rt={}));var St,Tt={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(A,e){switch(e){case"relative":return Rt.RELATIVE;case"absolute":return Rt.ABSOLUTE;case"fixed":return Rt.FIXED;case"sticky":return Rt.STICKY}return Rt.STATIC}},Mt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&NA(e[0],"none")?[]:VA(e).map(function(e){for(var t={color:we.TRANSPARENT,offsetX:_A,offsetY:_A,blur:_A},r=0,B=0;B<e.length;B++){var n=e[B];kA(n)?(0===r?t.offsetX=n:1===r?t.offsetY=n:t.blur=n,r++):t.color=ee(A,n)}return t})}};!function(A){A[A.NONE=0]="NONE",A[A.LOWERCASE=1]="LOWERCASE",A[A.UPPERCASE=2]="UPPERCASE",A[A.CAPITALIZE=3]="CAPITALIZE"}(St||(St={}));var Nt,Gt={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"uppercase":return St.UPPERCASE;case"lowercase":return St.LOWERCASE;case"capitalize":return St.CAPITALIZE}return St.NONE}},xt={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(A,e){if(20===e.type&&"none"===e.value)return null;if(18===e.type){var t=Vt[e.name];if(void 0===t)throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},Vt={matrix:function(A){var e=A.filter(function(A){return 17===A.type}).map(function(A){return A.number});return 6===e.length?e:null},matrix3d:function(A){var e=A.filter(function(A){return 17===A.type}).map(function(A){return A.number}),t=e[0],r=e[1];e[2],e[3];var B=e[4],n=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],o=e[13];return e[14],e[15],16===e.length?[t,r,B,n,s,o]:null}},Pt={type:16,number:50,flags:4},kt=[Pt,Pt],Jt={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(A,e){var t=e.filter(JA);return 2!==t.length?kt:[t[0],t[1]]}};!function(A){A[A.VISIBLE=0]="VISIBLE",A[A.HIDDEN=1]="HIDDEN",A[A.COLLAPSE=2]="COLLAPSE"}(Nt||(Nt={}));var Xt,_t={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(A,e){switch(e){case"hidden":return Nt.HIDDEN;case"collapse":return Nt.COLLAPSE;case"visible":default:return Nt.VISIBLE}}};!function(A){A.NORMAL="normal",A.BREAK_ALL="break-all",A.KEEP_ALL="keep-all"}(Xt||(Xt={}));var Yt,Wt={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"break-all":return Xt.BREAK_ALL;case"keep-all":return Xt.KEEP_ALL;case"normal":default:return Xt.NORMAL}}},Zt={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(A,e){if(20===e.type)return{auto:!0,order:0};if(SA(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},qt=function(A,e){if(15===e.type)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")},jt={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(A,e){return SA(e)?e.number:1}},zt={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},$t={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(A,e){return e.filter(TA).map(function(A){switch(A.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(A){return 0!==A})}},Ar={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(A,e){var t=[],r=[];return e.forEach(function(A){switch(A.type){case 20:case 0:t.push(A.value);break;case 17:t.push(A.number.toString());break;case 4:r.push(t.join(" ")),t.length=0}}),t.length&&r.push(t.join(" ")),r.map(function(A){return-1===A.indexOf(" ")?A:"'"+A+"'"})}},er={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},tr={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(A,e){if(SA(e))return e.number;if(TA(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},rr={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return e.filter(TA).map(function(A){return A.value})}};!function(A){A.NORMAL="normal",A.ITALIC="italic",A.OBLIQUE="oblique"}(Yt||(Yt={}));var Br,nr={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(A,e){switch(e){case"oblique":return Yt.OBLIQUE;case"italic":return Yt.ITALIC;case"normal":default:return Yt.NORMAL}}},sr=function(A,e){return 0!=(A&e)},or={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(A,e){if(0===e.length)return[];var t=e[0];return 20===t.type&&"none"===t.value?[]:e}},ir={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;for(var r=[],B=e.filter(GA),n=0;n<B.length;n++){var s=B[n],o=B[n+1];if(20===s.type){var i=o&&SA(o)?o.number:1;r.push({counter:s.value,increment:i})}}return r}},cr={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return[];for(var t=[],r=e.filter(GA),B=0;B<r.length;B++){var n=r[B],s=r[B+1];if(TA(n)&&"none"!==n.value){var o=s&&SA(s)?s.number:0;t.push({counter:n.value,reset:o})}}return t}},Qr={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(A,e){return e.filter(OA).map(function(e){return qt(A,e)})}},ar={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(A,e){if(0===e.length)return null;var t=e[0];if(20===t.type&&"none"===t.value)return null;var r=[],B=e.filter(MA);if(B.length%2!=0)return null;for(var n=0;n<B.length;n+=2){var s=B[n].value,o=B[n+1].value;r.push({open:s,close:o})}return r}},wr=function(A,e,t){if(!A)return"";var r=A[Math.min(e,A.length-1)];return r?t?r.open:r.close:""},gr={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(A,e){return 1===e.length&&NA(e[0],"none")?[]:VA(e).map(function(e){for(var t={color:255,offsetX:_A,offsetY:_A,blur:_A,spread:_A,inset:!1},r=0,B=0;B<e.length;B++){var n=e[B];NA(n,"inset")?t.inset=!0:kA(n)?(0===r?t.offsetX=n:1===r?t.offsetY=n:2===r?t.blur=n:t.spread=n,r++):t.color=ee(A,n)}return t})}};!function(A){A[A.FILL=0]="FILL",A[A.STROKE=1]="STROKE",A[A.MARKERS=2]="MARKERS"}(Br||(Br={}));for(var Cr={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(A,e){var t=[Br.FILL,Br.STROKE,Br.MARKERS],r=[];return e.filter(TA).forEach(function(A){switch(A.value){case"stroke":r.push(Br.STROKE);break;case"fill":r.push(Br.FILL);break;case"markers":r.push(Br.MARKERS)}}),t.forEach(function(A){-1===r.indexOf(A)&&r.push(A)}),r}},ur={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Ur={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(A,e){return OA(e)?e.number:0}},lr=function(){function A(A,e){var t,r;this.animationDuration=dr(A,Qr,e.animationDuration),this.backgroundClip=dr(A,Ce,e.backgroundClip),this.backgroundColor=dr(A,ue,e.backgroundColor),this.backgroundImage=dr(A,Le,e.backgroundImage),this.backgroundOrigin=dr(A,me,e.backgroundOrigin),this.backgroundPosition=dr(A,De,e.backgroundPosition),this.backgroundRepeat=dr(A,ve,e.backgroundRepeat),this.backgroundSize=dr(A,Se,e.backgroundSize),this.borderTopColor=dr(A,Ne,e.borderTopColor),this.borderRightColor=dr(A,Ge,e.borderRightColor),this.borderBottomColor=dr(A,xe,e.borderBottomColor),this.borderLeftColor=dr(A,Ve,e.borderLeftColor),this.borderTopLeftRadius=dr(A,ke,e.borderTopLeftRadius),this.borderTopRightRadius=dr(A,Je,e.borderTopRightRadius),this.borderBottomRightRadius=dr(A,Xe,e.borderBottomRightRadius),this.borderBottomLeftRadius=dr(A,_e,e.borderBottomLeftRadius),this.borderTopStyle=dr(A,Ze,e.borderTopStyle),this.borderRightStyle=dr(A,qe,e.borderRightStyle),this.borderBottomStyle=dr(A,je,e.borderBottomStyle),this.borderLeftStyle=dr(A,ze,e.borderLeftStyle),this.borderTopWidth=dr(A,At,e.borderTopWidth),this.borderRightWidth=dr(A,et,e.borderRightWidth),this.borderBottomWidth=dr(A,tt,e.borderBottomWidth),this.borderLeftWidth=dr(A,rt,e.borderLeftWidth),this.boxShadow=dr(A,gr,e.boxShadow),this.color=dr(A,Bt,e.color),this.direction=dr(A,nt,e.direction),this.display=dr(A,st,e.display),this.float=dr(A,ct,e.cssFloat),this.fontFamily=dr(A,Ar,e.fontFamily),this.fontSize=dr(A,er,e.fontSize),this.fontStyle=dr(A,nr,e.fontStyle),this.fontVariant=dr(A,rr,e.fontVariant),this.fontWeight=dr(A,tr,e.fontWeight),this.letterSpacing=dr(A,Qt,e.letterSpacing),this.lineBreak=dr(A,wt,e.lineBreak),this.lineHeight=dr(A,gt,e.lineHeight),this.listStyleImage=dr(A,ut,e.listStyleImage),this.listStylePosition=dr(A,lt,e.listStylePosition),this.listStyleType=dr(A,ht,e.listStyleType),this.marginTop=dr(A,Et,e.marginTop),this.marginRight=dr(A,ft,e.marginRight),this.marginBottom=dr(A,Ht,e.marginBottom),this.marginLeft=dr(A,It,e.marginLeft),this.opacity=dr(A,jt,e.opacity);var B=dr(A,yt,e.overflow);this.overflowX=B[0],this.overflowY=B[B.length>1?1:0],this.overflowWrap=dr(A,Kt,e.overflowWrap),this.paddingTop=dr(A,mt,e.paddingTop),this.paddingRight=dr(A,Dt,e.paddingRight),this.paddingBottom=dr(A,bt,e.paddingBottom),this.paddingLeft=dr(A,vt,e.paddingLeft),this.paintOrder=dr(A,Cr,e.paintOrder),this.position=dr(A,Tt,e.position),this.textAlign=dr(A,Ot,e.textAlign),this.textDecorationColor=dr(A,zt,null!==(t=e.textDecorationColor)&&void 0!==t?t:e.color),this.textDecorationLine=dr(A,$t,null!==(r=e.textDecorationLine)&&void 0!==r?r:e.textDecoration),this.textShadow=dr(A,Mt,e.textShadow),this.textTransform=dr(A,Gt,e.textTransform),this.transform=dr(A,xt,e.transform),this.transformOrigin=dr(A,Jt,e.transformOrigin),this.visibility=dr(A,_t,e.visibility),this.webkitTextStrokeColor=dr(A,ur,e.webkitTextStrokeColor),this.webkitTextStrokeWidth=dr(A,Ur,e.webkitTextStrokeWidth),this.wordBreak=dr(A,Wt,e.wordBreak),this.zIndex=dr(A,Zt,e.zIndex)}return A.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===Nt.VISIBLE},A.prototype.isTransparent=function(){return te(this.backgroundColor)},A.prototype.isTransformed=function(){return null!==this.transform},A.prototype.isPositioned=function(){return this.position!==Rt.STATIC},A.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},A.prototype.isFloating=function(){return this.float!==Ye.NONE},A.prototype.isInlineLevel=function(){return sr(this.display,4)||sr(this.display,33554432)||sr(this.display,268435456)||sr(this.display,536870912)||sr(this.display,67108864)||sr(this.display,134217728)},A}(),Fr=function(){return function(A,e){this.content=dr(A,or,e.content),this.quotes=dr(A,ar,e.quotes)}}(),hr=function(){return function(A,e){this.counterIncrement=dr(A,ir,e.counterIncrement),this.counterReset=dr(A,cr,e.counterReset)}}(),dr=function(A,e,t){var r=new vA,B=null!=t?t.toString():e.initialValue;r.write(B);var n=new RA(r.read());switch(e.type){case 2:var s=n.parseComponentValue();return e.parse(A,TA(s)?s.value:e.initialValue);case 0:return e.parse(A,n.parseComponentValue());case 1:return e.parse(A,n.parseComponentValues());case 4:return n.parseComponentValue();case 3:switch(e.format){case"angle":return jA(A,n.parseComponentValue());case"color":return ee(A,n.parseComponentValue());case"image":return pe(A,n.parseComponentValue());case"length":var o=n.parseComponentValue();return kA(o)?o:_A;case"length-percentage":var i=n.parseComponentValue();return JA(i)?i:_A;case"time":return qt(A,n.parseComponentValue())}}},Er=function(A,e){var t=function(A){switch(A.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(A);return 1===t||e===t},fr=function(){return function(A,e){this.context=A,this.textNodes=[],this.elements=[],this.flags=0,Er(e,3),this.styles=new lr(A,window.getComputedStyle(e,null)),yB(e)&&(this.styles.animationDuration.some(function(A){return A>0})&&(e.style.animationDuration="0s"),null!==this.styles.transform&&(e.style.transform="none")),this.bounds=i(this.context,e),Er(e,4)&&(this.flags|=16)}}(),Hr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ir="undefined"==typeof Uint8Array?[]:new Uint8Array(256),pr=0;pr<Hr.length;pr++)Ir[Hr.charCodeAt(pr)]=pr;for(var yr=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},Kr=function(){function A(A,e,t,r,B,n){this.initialValue=A,this.errorValue=e,this.highStart=t,this.highValueIndex=r,this.index=B,this.data=n}return A.prototype.get=function(A){var e;if(A>=0){if(A<55296||A>56319&&A<=65535)return e=((e=this.index[A>>5])<<2)+(31&A),this.data[e];if(A<=65535)return e=((e=this.index[2048+(A-55296>>5)])<<2)+(31&A),this.data[e];if(A<this.highStart)return e=2080+(A>>11),e=this.index[e],e+=A>>5&63,e=((e=this.index[e])<<2)+(31&A),this.data[e];if(A<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A}(),Lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Dr=0;Dr<Lr.length;Dr++)mr[Lr.charCodeAt(Dr)]=Dr;var br,vr=8,Rr=9,Or=11,Sr=12,Tr=function(A,e){var t,r,B,n=function(A){var e,t,r,B,n,s=.75*A.length,o=A.length,i=0;"="===A[A.length-1]&&(s--,"="===A[A.length-2]&&s--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(s):new Array(s),Q=Array.isArray(c)?c:new Uint8Array(c);for(e=0;e<o;e+=4)t=Ir[A.charCodeAt(e)],r=Ir[A.charCodeAt(e+1)],B=Ir[A.charCodeAt(e+2)],n=Ir[A.charCodeAt(e+3)],Q[i++]=t<<2|r>>4,Q[i++]=(15&r)<<4|B>>2,Q[i++]=(3&B)<<6|63&n;return c}(A),s=Array.isArray(n)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=4)t.push(A[r+3]<<24|A[r+2]<<16|A[r+1]<<8|A[r]);return t}(n):new Uint32Array(n),o=Array.isArray(n)?function(A){for(var e=A.length,t=[],r=0;r<e;r+=2)t.push(A[r+1]<<8|A[r]);return t}(n):new Uint16Array(n),i=yr(o,12,s[4]/2),c=2===s[5]?yr(o,(24+s[4])/2):(t=s,r=Math.ceil((24+s[4])/4),t.slice?t.slice(r,B):new Uint32Array(Array.prototype.slice.call(t,r,B)));return new Kr(s[0],s[1],s[2],s[3],i,c)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Mr=function(A){return Tr.get(A)},Nr=function(A,e,t){var r=t-2,B=e[r],n=e[t-1],s=e[t];if(2===n&&3===s)return"×";if(2===n||3===n||4===n)return"÷";if(2===s||3===s||4===s)return"÷";if(n===vr&&-1!==[vr,Rr,Or,Sr].indexOf(s))return"×";if(!(n!==Or&&n!==Rr||s!==Rr&&10!==s))return"×";if((n===Sr||10===n)&&10===s)return"×";if(13===s||5===s)return"×";if(7===s)return"×";if(1===n)return"×";if(13===n&&14===s){for(;5===B;)B=e[--r];if(14===B)return"×"}if(15===n&&15===s){for(var o=0;15===B;)o++,B=e[--r];if(o%2==0)return"×"}return"÷"},Gr=function(A){var e=function(A){for(var e=[],t=0,r=A.length;t<r;){var B=A.charCodeAt(t++);if(B>=55296&&B<=56319&&t<r){var n=A.charCodeAt(t++);56320==(64512&n)?e.push(((1023&B)<<10)+(1023&n)+65536):(e.push(B),t--)}else e.push(B)}return e}(A),t=e.length,r=0,B=0,n=e.map(Mr);return{next:function(){if(r>=t)return{done:!0,value:null};for(var A="×";r<t&&"×"===(A=Nr(0,n,++r)););if("×"!==A||r===t){var s=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var r=[],B=-1,n="";++B<t;){var s=A[B];s<=65535?r.push(s):(s-=65536,r.push(55296+(s>>10),s%1024+56320)),(B+1===t||r.length>16384)&&(n+=String.fromCharCode.apply(String,r),r.length=0)}return n}.apply(null,e.slice(B,r));return B=r,{value:s,done:!1}}return{done:!0,value:null}}}},xr=function(A){for(var e,t=Gr(A),r=[];!(e=t.next()).done;)e.value&&r.push(e.value.slice());return r},Vr=function(A){return 0===A[0]&&255===A[1]&&0===A[2]&&255===A[3]},Pr=function(A,e,t,r,B){var n="http://www.w3.org/2000/svg",s=document.createElementNS(n,"svg"),o=document.createElementNS(n,"foreignObject");return s.setAttributeNS(null,"width",A.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",t.toString()),o.setAttributeNS(null,"y",r.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(B),s},kr=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},Jr={get SUPPORT_RANGE_BOUNDS(){var A=function(A){if(A.createRange){var e=A.createRange();if(e.getBoundingClientRect){var t=A.createElement("boundtest");t.style.height="123px",t.style.display="block",A.body.appendChild(t),e.selectNode(t);var r=e.getBoundingClientRect(),B=Math.round(r.height);if(A.body.removeChild(t),123===B)return!0}}return!1}(document);return Object.defineProperty(Jr,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){var A=Jr.SUPPORT_RANGE_BOUNDS&&function(A){var e=A.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",A.body.appendChild(e);var t=A.createRange();e.innerHTML="function"==typeof"".repeat?"👨".repeat(10):"";var r=e.firstChild,B=c(r.data).map(function(A){return Q(A)}),n=0,s={},o=B.every(function(A,e){t.setStart(r,n),t.setEnd(r,n+A.length);var B=t.getBoundingClientRect();n+=A.length;var o=B.x>s.x||B.y>s.y;return s=B,0===e||o});return A.body.removeChild(e),o}(document);return Object.defineProperty(Jr,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){var A=function(A){var e=new Image,t=A.createElement("canvas"),r=t.getContext("2d");if(!r)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(e,0,0),t.toDataURL()}catch(B){return!1}return!0}(document);return Object.defineProperty(Jr,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){var A="function"==typeof Array.from&&"function"==typeof window.fetch?function(A){var e=A.createElement("canvas");e.width=100,e.height=100;var t=e.getContext("2d");if(!t)return Promise.reject(!1);t.fillStyle="rgb(0, 255, 0)",t.fillRect(0,0,100,100);var r=new Image,B=e.toDataURL();r.src=B;var n=Pr(100,100,0,0,r);return t.fillStyle="red",t.fillRect(0,0,100,100),kr(n).then(function(e){t.drawImage(e,0,0);var r=t.getImageData(0,0,100,100).data;t.fillStyle="red",t.fillRect(0,0,100,100);var n=A.createElement("div");return n.style.backgroundImage="url("+B+")",n.style.height="100px",Vr(r)?kr(Pr(100,100,0,0,n)):Promise.reject(!1)}).then(function(A){return t.drawImage(A,0,0),Vr(t.getImageData(0,0,100,100).data)}).catch(function(){return!1})}(document):Promise.resolve(!1);return Object.defineProperty(Jr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){var A=void 0!==(new Image).crossOrigin;return Object.defineProperty(Jr,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){var A="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Jr,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){var A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Jr,"SUPPORT_CORS_XHR",{value:A}),A}},Xr=function(){return function(A,e){this.text=A,this.bounds=e}}(),_r=function(A,e,t,r){var B=qr(e,t),n=[],s=0;return B.forEach(function(e){if(t.textDecorationLine.length||e.trim().length>0)if(Jr.SUPPORT_RANGE_BOUNDS)Jr.SUPPORT_WORD_BREAKING?n.push(new Xr(e,Zr(A,r,s,e.length))):n.push(new Xr(e,o.fromDOMRectList(A,Wr(r,s,e.length).getClientRects())));else{var B=r.splitText(e.length);n.push(new Xr(e,Yr(A,r))),r=B}else Jr.SUPPORT_RANGE_BOUNDS||(r=r.splitText(e.length));s+=e.length}),n},Yr=function(A,e){var t=e.ownerDocument;if(t){var r=t.createElement("html2canvaswrapper");r.appendChild(e.cloneNode(!0));var B=e.parentNode;if(B){B.replaceChild(r,e);var n=i(A,r);return r.firstChild&&B.replaceChild(r.firstChild,r),n}}return o.EMPTY},Wr=function(A,e,t){var r=A.ownerDocument;if(!r)throw new Error("Node has no owner document");var B=r.createRange();return B.setStart(A,e),B.setEnd(A,e+t),B},Zr=function(A,e,t,r){return o.fromClientRect(A,Wr(e,t,r).getBoundingClientRect())},qr=function(A,e){return 0!==e.letterSpacing?xr(A):zr(A,e)},jr=[32,160,4961,65792,65793,4153,4241],zr=function(A,e){for(var t,r=function(A,e){var t=c(A),r=$(t,e),B=r[0],n=r[1],s=r[2],o=t.length,i=0,Q=0;return{next:function(){if(Q>=o)return{done:!0,value:null};for(var A="×";Q<o&&"×"===(A=z(t,n,B,++Q,s)););if("×"!==A||Q===o){var e=new AA(t,A,i,Q);return i=Q,{value:e,done:!1}}return{done:!0,value:null}}}}(A,{lineBreak:e.lineBreak,wordBreak:"break-word"===e.overflowWrap?"break-word":e.wordBreak}),B=[],n=function(){if(t.value){var A=t.value.slice(),e=c(A),r="";e.forEach(function(A){-1===jr.indexOf(A)?r+=Q(A):(r.length&&B.push(r),B.push(Q(A)),r="")}),r.length&&B.push(r)}};!(t=r.next()).done;)n();return B},$r=function(){return function(A,e,t){this.text=AB(e.data,t.textTransform),this.textBounds=_r(A,this.text,t,e)}}(),AB=function(A,e){switch(e){case St.LOWERCASE:return A.toLowerCase();case St.CAPITALIZE:return A.replace(eB,tB);case St.UPPERCASE:return A.toUpperCase();default:return A}},eB=/(^|\s|:|-|\(|\))([a-z])/g,tB=function(A,e,t){return A.length>0?e+t.toUpperCase():A},rB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.src=t.currentSrc||t.src,r.intrinsicWidth=t.naturalWidth,r.intrinsicHeight=t.naturalHeight,r.context.cache.addImage(r.src),r}return e(t,A),t}(fr),BB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.canvas=t,r.intrinsicWidth=t.width,r.intrinsicHeight=t.height,r}return e(t,A),t}(fr),nB=function(A){function t(e,t){var r=A.call(this,e,t)||this,B=new XMLSerializer,n=i(e,t);return t.setAttribute("width",n.width+"px"),t.setAttribute("height",n.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(B.serializeToString(t)),r.intrinsicWidth=t.width.baseVal.value,r.intrinsicHeight=t.height.baseVal.value,r.context.cache.addImage(r.svg),r}return e(t,A),t}(fr),sB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.value=t.value,r}return e(t,A),t}(fr),oB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.start=t.start,r.reversed="boolean"==typeof t.reversed&&!0===t.reversed,r}return e(t,A),t}(fr),iB=[{type:15,flags:0,unit:"px",number:3}],cB=[{type:16,flags:0,number:50}],QB=function(A){return A.width>A.height?new o(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width<A.height?new o(A.left,A.top+(A.height-A.width)/2,A.width,A.width):A},aB=function(A){var e=A.type===CB?new Array(A.value.length+1).join("•"):A.value;return 0===e.length?A.placeholder||"":e},wB="checkbox",gB="radio",CB="password",uB=function(A){function t(e,t){var r=A.call(this,e,t)||this;switch(r.type=t.type.toLowerCase(),r.checked=t.checked,r.value=aB(t),r.type!==wB&&r.type!==gB||(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=Oe.SOLID,r.styles.backgroundClip=[ie.BORDER_BOX],r.styles.backgroundOrigin=[0],r.bounds=QB(r.bounds)),r.type){case wB:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=iB;break;case gB:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=cB}return r}return e(t,A),t}(fr),UB=function(A){function t(e,t){var r=A.call(this,e,t)||this,B=t.options[t.selectedIndex||0];return r.value=B&&B.text||"",r}return e(t,A),t}(fr),lB=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.value=t.value,r}return e(t,A),t}(fr),FB=function(A){function t(e,t){var r=A.call(this,e,t)||this;r.src=t.src,r.width=parseInt(t.width,10)||0,r.height=parseInt(t.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(t.contentWindow&&t.contentWindow.document&&t.contentWindow.document.documentElement){r.tree=EB(e,t.contentWindow.document.documentElement);var B=t.contentWindow.document.documentElement?ae(e,getComputedStyle(t.contentWindow.document.documentElement).backgroundColor):we.TRANSPARENT,n=t.contentWindow.document.body?ae(e,getComputedStyle(t.contentWindow.document.body).backgroundColor):we.TRANSPARENT;r.backgroundColor=te(B)?te(n)?r.styles.backgroundColor:n:B}}catch(s){}return r}return e(t,A),t}(fr),hB=["OL","UL","MENU"],dB=function(A,e){return OB(e)?new rB(A,e):RB(e)?new BB(A,e):bB(e)?new nB(A,e):LB(e)?new sB(A,e):mB(e)?new oB(A,e):DB(e)?new uB(A,e):GB(e)?new UB(A,e):NB(e)?new lB(A,e):SB(e)?new FB(A,e):new fr(A,e)},EB=function(A,e){var t=dB(A,e);return t.flags|=4,function A(e,t,r,B){for(var n=t.firstChild,s=void 0;n;n=s)if(s=n.nextSibling,IB(n)&&n.data.trim().length>0)r.textNodes.push(new $r(e,n,r.styles));else if(pB(n))if(xB(n)&&n.assignedNodes)n.assignedNodes().forEach(function(t){return A(e,t,r,B)});else{var o=dB(e,n);o.styles.isVisible()&&(fB(n,o,B)?o.flags|=4:HB(o.styles)&&(o.flags|=2),-1!==hB.indexOf(n.tagName)&&(o.flags|=8),r.elements.push(o),n.slot,n.shadowRoot?A(e,n.shadowRoot,o,B):NB(n)||bB(n)||GB(n)||A(e,n,o,B))}}(A,e,t,t),t},fB=function(A,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||vB(A)&&t.styles.isTransparent()},HB=function(A){return A.isPositioned()||A.isFloating()},IB=function(A){return A.nodeType===Node.TEXT_NODE},pB=function(A){return A.nodeType===Node.ELEMENT_NODE},yB=function(A){return pB(A)&&void 0!==A.style&&!KB(A)},KB=function(A){return"object"===t(A.className)},LB=function(A){return"LI"===A.tagName},mB=function(A){return"OL"===A.tagName},DB=function(A){return"INPUT"===A.tagName},bB=function(A){return"svg"===A.tagName},vB=function(A){return"BODY"===A.tagName},RB=function(A){return"CANVAS"===A.tagName},OB=function(A){return"IMG"===A.tagName},SB=function(A){return"IFRAME"===A.tagName},TB=function(A){return"STYLE"===A.tagName},MB=function(A){return"SCRIPT"===A.tagName},NB=function(A){return"TEXTAREA"===A.tagName},GB=function(A){return"SELECT"===A.tagName},xB=function(A){return"SLOT"===A.tagName},VB=function(){function A(){this.counters={}}return A.prototype.getCounterValue=function(A){var e=this.counters[A];return e&&e.length?e[e.length-1]:1},A.prototype.getCounterValues=function(A){var e=this.counters[A];return e||[]},A.prototype.pop=function(A){var e=this;A.forEach(function(A){return e.counters[A].pop()})},A.prototype.parse=function(A){var e=this,t=A.counterIncrement,r=A.counterReset,B=!0;null!==t&&t.forEach(function(A){var t=e.counters[A.counter];t&&0!==A.increment&&(B=!1,t.length||t.push(1),t[Math.max(0,t.length-1)]+=A.increment)});var n=[];return B&&r.forEach(function(A){var t=e.counters[A.counter];n.push(A.counter),t||(t=e.counters[A.counter]=[]),t.push(A.reset)}),n},A}(),PB={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},kB={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},JB={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},XB={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},_B=function(A,e,t,r,B,n){return A<e||A>t?jB(A,B,n.length>0):r.integers.reduce(function(e,t,B){for(;A>=t;)A-=t,e+=r.values[B];return e},"")+n},YB=function(A,e,t,r){var B="";do{t||A--,B=r(A)+B,A/=e}while(A*e>=e);return B},WB=function(A,e,t,r,B){var n=t-e+1;return(A<0?"-":"")+(YB(Math.abs(A),n,r,function(A){return Q(Math.floor(A%n)+e)})+B)},ZB=function(A,e,t){void 0===t&&(t=". ");var r=e.length;return YB(Math.abs(A),r,!1,function(A){return e[Math.floor(A%r)]})+t},qB=function(A,e,t,r,B,n){if(A<-9999||A>9999)return jB(A,Ut.CJK_DECIMAL,B.length>0);var s=Math.abs(A),o=B;if(0===s)return e[0]+o;for(var i=0;s>0&&i<=4;i++){var c=s%10;0===c&&sr(n,1)&&""!==o?o=e[c]+o:c>1||1===c&&0===i||1===c&&1===i&&sr(n,2)||1===c&&1===i&&sr(n,4)&&A>100||1===c&&i>1&&sr(n,8)?o=e[c]+(i>0?t[i-1]:"")+o:1===c&&i>0&&(o=t[i-1]+o),s=Math.floor(s/10)}return(A<0?r:"")+o},jB=function(A,e,t){var r=t?". ":"",B=t?"、":"",n=t?", ":"",s=t?" ":"";switch(e){case Ut.DISC:return"•"+s;case Ut.CIRCLE:return"◦"+s;case Ut.SQUARE:return"◾"+s;case Ut.DECIMAL_LEADING_ZERO:var o=WB(A,48,57,!0,r);return o.length<4?"0"+o:o;case Ut.CJK_DECIMAL:return ZB(A,"〇一二三四五六七八九",B);case Ut.LOWER_ROMAN:return _B(A,1,3999,PB,Ut.DECIMAL,r).toLowerCase();case Ut.UPPER_ROMAN:return _B(A,1,3999,PB,Ut.DECIMAL,r);case Ut.LOWER_GREEK:return WB(A,945,969,!1,r);case Ut.LOWER_ALPHA:return WB(A,97,122,!1,r);case Ut.UPPER_ALPHA:return WB(A,65,90,!1,r);case Ut.ARABIC_INDIC:return WB(A,1632,1641,!0,r);case Ut.ARMENIAN:case Ut.UPPER_ARMENIAN:return _B(A,1,9999,kB,Ut.DECIMAL,r);case Ut.LOWER_ARMENIAN:return _B(A,1,9999,kB,Ut.DECIMAL,r).toLowerCase();case Ut.BENGALI:return WB(A,2534,2543,!0,r);case Ut.CAMBODIAN:case Ut.KHMER:return WB(A,6112,6121,!0,r);case Ut.CJK_EARTHLY_BRANCH:return ZB(A,"子丑寅卯辰巳午未申酉戌亥",B);case Ut.CJK_HEAVENLY_STEM:return ZB(A,"甲乙丙丁戊己庚辛壬癸",B);case Ut.CJK_IDEOGRAPHIC:case Ut.TRAD_CHINESE_INFORMAL:return qB(A,"零一二三四五六七八九","十百千萬","負",B,14);case Ut.TRAD_CHINESE_FORMAL:return qB(A,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",B,15);case Ut.SIMP_CHINESE_INFORMAL:return qB(A,"零一二三四五六七八九","十百千萬","负",B,14);case Ut.SIMP_CHINESE_FORMAL:return qB(A,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",B,15);case Ut.JAPANESE_INFORMAL:return qB(A,"〇一二三四五六七八九","十百千万","マイナス",B,0);case Ut.JAPANESE_FORMAL:return qB(A,"零壱弐参四伍六七八九","拾百千万","マイナス",B,7);case Ut.KOREAN_HANGUL_FORMAL:return qB(A,"영일이삼사오육칠팔구","십백천만","마이너스",n,7);case Ut.KOREAN_HANJA_INFORMAL:return qB(A,"零一二三四五六七八九","十百千萬","마이너스",n,0);case Ut.KOREAN_HANJA_FORMAL:return qB(A,"零壹貳參四五六七八九","拾百千","마이너스",n,7);case Ut.DEVANAGARI:return WB(A,2406,2415,!0,r);case Ut.GEORGIAN:return _B(A,1,19999,XB,Ut.DECIMAL,r);case Ut.GUJARATI:return WB(A,2790,2799,!0,r);case Ut.GURMUKHI:return WB(A,2662,2671,!0,r);case Ut.HEBREW:return _B(A,1,10999,JB,Ut.DECIMAL,r);case Ut.HIRAGANA:return ZB(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case Ut.HIRAGANA_IROHA:return ZB(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case Ut.KANNADA:return WB(A,3302,3311,!0,r);case Ut.KATAKANA:return ZB(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",B);case Ut.KATAKANA_IROHA:return ZB(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",B);case Ut.LAO:return WB(A,3792,3801,!0,r);case Ut.MONGOLIAN:return WB(A,6160,6169,!0,r);case Ut.MYANMAR:return WB(A,4160,4169,!0,r);case Ut.ORIYA:return WB(A,2918,2927,!0,r);case Ut.PERSIAN:return WB(A,1776,1785,!0,r);case Ut.TAMIL:return WB(A,3046,3055,!0,r);case Ut.TELUGU:return WB(A,3174,3183,!0,r);case Ut.THAI:return WB(A,3664,3673,!0,r);case Ut.TIBETAN:return WB(A,3872,3881,!0,r);case Ut.DECIMAL:default:return WB(A,48,57,!0,r)}},zB=function(){function A(A,e,t){if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new VB,this.quoteDepth=0,!e.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(e.ownerDocument.documentElement)}return A.prototype.toIFrame=function(A,e){var t=this,r=An(A,e);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var s=A.defaultView.pageXOffset,o=A.defaultView.pageYOffset,i=r.contentWindow,c=i.document,Q=rn(r).then(function(){return B(t,void 0,void 0,function(){var A,t;return n(this,function(B){switch(B.label){case 0:return this.scrolledElements.forEach(cn),i&&(i.scrollTo(e.left,e.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||i.scrollY===e.top&&i.scrollX===e.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(i.scrollX-e.left,i.scrollY-e.top,0,0))),A=this.options.onclone,void 0===(t=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:B.sent(),B.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,tn(c)]:[3,4];case 3:B.sent(),B.label=4;case 4:return"function"==typeof A?[2,Promise.resolve().then(function(){return A(c,t)}).then(function(){return r})]:[2,r]}})})});return c.open(),c.write(sn(document.doctype)+"<html></html>"),on(this.referenceElement.ownerDocument,s,o),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),Q},A.prototype.createElementClone=function(A){if(Er(A,2),RB(A))return this.createCanvasClone(A);if(TB(A))return this.createStyleClone(A);var e=A.cloneNode(!1);return OB(e)&&(OB(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),"lazy"===e.loading&&(e.loading="eager")),e},A.prototype.createStyleClone=function(A){try{var e=A.sheet;if(e&&e.cssRules){var t=[].slice.call(e.cssRules,0).reduce(function(A,e){return e&&"string"==typeof e.cssText?A+e.cssText:A},""),r=A.cloneNode(!1);return r.textContent=t,r}}catch(B){if(this.context.logger.error("Unable to access cssRules property",B),"SecurityError"!==B.name)throw B}return A.cloneNode(!1)},A.prototype.createCanvasClone=function(A){var e;if(this.options.inlineImages&&A.ownerDocument){var t=A.ownerDocument.createElement("img");try{return t.src=A.toDataURL(),t}catch(i){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}var r=A.cloneNode(!1);try{r.width=A.width,r.height=A.height;var B=A.getContext("2d"),n=r.getContext("2d");if(n)if(!this.options.allowTaint&&B)n.putImageData(B.getImageData(0,0,A.width,A.height),0,0);else{var s=null!==(e=A.getContext("webgl2"))&&void 0!==e?e:A.getContext("webgl");if(s){var o=s.getContextAttributes();!1===(null==o?void 0:o.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A)}n.drawImage(A,0,0)}return r}catch(i){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return r},A.prototype.cloneNode=function(A){if(IB(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);var e=A.ownerDocument.defaultView;if(e&&pB(A)&&(yB(A)||KB(A))){var t=this.createElementClone(A);t.style.transitionProperty="none";var r=e.getComputedStyle(A),B=e.getComputedStyle(A,":before"),n=e.getComputedStyle(A,":after");this.referenceElement===A&&yB(t)&&(this.clonedReferenceElement=t),vB(t)&&wn(t);for(var s=this.counters.parse(new hr(this.context,r)),o=this.resolvePseudoContent(A,t,B,br.BEFORE),i=A.firstChild;i;i=i.nextSibling)pB(i)&&(MB(i)||i.hasAttribute("data-html2canvas-ignore")||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(i))||this.options.copyStyles&&pB(i)&&TB(i)||t.appendChild(this.cloneNode(i));o&&t.insertBefore(o,t.firstChild);var c=this.resolvePseudoContent(A,t,n,br.AFTER);return c&&t.appendChild(c),this.counters.pop(s),r&&(this.options.copyStyles||KB(A))&&!SB(A)&&nn(r,t),0===A.scrollTop&&0===A.scrollLeft||this.scrolledElements.push([t,A.scrollLeft,A.scrollTop]),(NB(A)||GB(A))&&(NB(t)||GB(t))&&(t.value=A.value),t}return A.cloneNode(!1)},A.prototype.resolvePseudoContent=function(A,e,t,r){var B=this;if(t){var n=t.content,s=e.ownerDocument;if(s&&n&&"none"!==n&&"-moz-alt-content"!==n&&"none"!==t.display){this.counters.parse(new hr(this.context,t));var o=new Fr(this.context,t),i=s.createElement("html2canvaspseudoelement");nn(t,i),o.content.forEach(function(e){if(0===e.type)i.appendChild(s.createTextNode(e.value));else if(22===e.type){var t=s.createElement("img");t.src=e.value,t.style.opacity="1",i.appendChild(t)}else if(18===e.type){if("attr"===e.name){var r=e.values.filter(TA);r.length&&i.appendChild(s.createTextNode(A.getAttribute(r[0].value)||""))}else if("counter"===e.name){var n=e.values.filter(xA),c=n[0],Q=n[1];if(c&&TA(c)){var a=B.counters.getCounterValue(c.value),w=Q&&TA(Q)?ht.parse(B.context,Q.value):Ut.DECIMAL;i.appendChild(s.createTextNode(jB(a,w,!1)))}}else if("counters"===e.name){var g=e.values.filter(xA),C=(c=g[0],g[1]);Q=g[2];if(c&&TA(c)){var u=B.counters.getCounterValues(c.value),U=Q&&TA(Q)?ht.parse(B.context,Q.value):Ut.DECIMAL,l=C&&0===C.type?C.value:"",F=u.map(function(A){return jB(A,U,!1)}).join(l);i.appendChild(s.createTextNode(F))}}}else if(20===e.type)switch(e.value){case"open-quote":i.appendChild(s.createTextNode(wr(o.quotes,B.quoteDepth++,!0)));break;case"close-quote":i.appendChild(s.createTextNode(wr(o.quotes,--B.quoteDepth,!1)));break;default:i.appendChild(s.createTextNode(e.value))}}),i.className=Qn+" "+an;var c=r===br.BEFORE?" "+Qn:" "+an;return KB(e)?e.className.baseValue+=c:e.className+=c,i}}},A.destroy=function(A){return!!A.parentNode&&(A.parentNode.removeChild(A),!0)},A}();!function(A){A[A.BEFORE=0]="BEFORE",A[A.AFTER=1]="AFTER"}(br||(br={}));var $B,An=function(A,e){var t=A.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute("data-html2canvas-ignore","true"),A.body.appendChild(t),t},en=function(A){return new Promise(function(e){A.complete?e():A.src?(A.onload=e,A.onerror=e):e()})},tn=function(A){return Promise.all([].slice.call(A.images,0).map(en))},rn=function(A){return new Promise(function(e,t){var r=A.contentWindow;if(!r)return t("No window assigned for iframe");var B=r.document;r.onload=A.onload=function(){r.onload=A.onload=null;var t=setInterval(function(){B.body.childNodes.length>0&&"complete"===B.readyState&&(clearInterval(t),e(A))},50)}})},Bn=["all","d","content"],nn=function(A,e){for(var t=A.length-1;t>=0;t--){var r=A.item(t);-1===Bn.indexOf(r)&&e.style.setProperty(r,A.getPropertyValue(r))}return e},sn=function(A){var e="";return A&&(e+="<!DOCTYPE ",A.name&&(e+=A.name),A.internalSubset&&(e+=A.internalSubset),A.publicId&&(e+='"'+A.publicId+'"'),A.systemId&&(e+='"'+A.systemId+'"'),e+=">"),e},on=function(A,e,t){A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},cn=function(A){var e=A[0],t=A[1],r=A[2];e.scrollLeft=t,e.scrollTop=r},Qn="___html2canvas___pseudoelement_before",an="___html2canvas___pseudoelement_after",wn=function(A){gn(A,"."+Qn+':before{\n content: "" !important;\n display: none !important;\n}\n .'+an+':after{\n content: "" !important;\n display: none !important;\n}')},gn=function(A,e){var t=A.ownerDocument;if(t){var r=t.createElement("style");r.textContent=e,A.appendChild(r)}},Cn=function(){function A(){}return A.getOrigin=function(e){var t=A._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},A.isSameOrigin=function(e){return A.getOrigin(e)===A._origin},A.setContext=function(e){A._link=e.document.createElement("a"),A._origin=A.getOrigin(e.location.href)},A._origin="about:blank",A}(),un=function(){function A(A,e){this.context=A,this._options=e,this._cache={}}return A.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)?e:fn(A)||hn(A)?((this._cache[A]=this.loadImage(A)).catch(function(){}),e):e},A.prototype.match=function(A){return this._cache[A]},A.prototype.loadImage=function(A){return B(this,void 0,void 0,function(){var e,t,r,B,s=this;return n(this,function(n){switch(n.label){case 0:return e=Cn.isSameOrigin(A),t=!dn(A)&&!0===this._options.useCORS&&Jr.SUPPORT_CORS_IMAGES&&!e,r=!dn(A)&&!e&&!fn(A)&&"string"==typeof this._options.proxy&&Jr.SUPPORT_CORS_XHR&&!t,e||!1!==this._options.allowTaint||dn(A)||fn(A)||r||t?(B=A,r?[4,this.proxy(B)]:[3,2]):[2];case 1:B=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(A,e){var r=new Image;r.onload=function(){return A(r)},r.onerror=e,(En(B)||t)&&(r.crossOrigin="anonymous"),r.src=B,!0===r.complete&&setTimeout(function(){return A(r)},500),s._options.imageTimeout>0&&setTimeout(function(){return e("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,n.sent()]}})})},A.prototype.has=function(A){return void 0!==this._cache[A]},A.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},A.prototype.proxy=function(A){var e=this,t=this._options.proxy;if(!t)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(B,n){var s=Jr.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=function(){if(200===o.status)if("text"===s)B(o.response);else{var A=new FileReader;A.addEventListener("load",function(){return B(A.result)},!1),A.addEventListener("error",function(A){return n(A)},!1),A.readAsDataURL(o.response)}else n("Failed to proxy resource "+r+" with status code "+o.status)},o.onerror=n;var i=t.indexOf("?")>-1?"&":"?";if(o.open("GET",""+t+i+"url="+encodeURIComponent(A)+"&responseType="+s),"text"!==s&&o instanceof XMLHttpRequest&&(o.responseType=s),e._options.imageTimeout){var c=e._options.imageTimeout;o.timeout=c,o.ontimeout=function(){return n("Timed out ("+c+"ms) proxying "+r)}}o.send()})},A}(),Un=/^data:image\/svg\+xml/i,ln=/^data:image\/.*;base64,/i,Fn=/^data:image\/.*/i,hn=function(A){return Jr.SUPPORT_SVG_DRAWING||!Hn(A)},dn=function(A){return Fn.test(A)},En=function(A){return ln.test(A)},fn=function(A){return"blob"===A.substr(0,4)},Hn=function(A){return"svg"===A.substr(-3).toLowerCase()||Un.test(A)};!function(A){A[A.VECTOR=0]="VECTOR",A[A.BEZIER_CURVE=1]="BEZIER_CURVE"}($B||($B={}));var In,pn=function(A,e){return A.length===e.length&&A.some(function(A,t){return A===e[t]})},yn=function(){function A(A,e){this.type=$B.VECTOR,this.x=A,this.y=e}return A.prototype.add=function(e,t){return new A(this.x+e,this.y+t)},A}(),Kn=function(A,e,t){return new yn(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t)},Ln=function(){function A(A,e,t,r){this.type=$B.BEZIER_CURVE,this.start=A,this.startControl=e,this.endControl=t,this.end=r}return A.prototype.subdivide=function(e,t){var r=Kn(this.start,this.startControl,e),B=Kn(this.startControl,this.endControl,e),n=Kn(this.endControl,this.end,e),s=Kn(r,B,e),o=Kn(B,n,e),i=Kn(s,o,e);return t?new A(this.start,r,s,i):new A(i,o,n,this.end)},A.prototype.add=function(e,t){return new A(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},A.prototype.reverse=function(){return new A(this.end,this.endControl,this.startControl,this.start)},A}(),mn=function(A){return A.type===$B.BEZIER_CURVE},Dn=function(){return function(A){var e=A.styles,t=A.bounds,r=ZA(e.borderTopLeftRadius,t.width,t.height),B=r[0],n=r[1],s=ZA(e.borderTopRightRadius,t.width,t.height),o=s[0],i=s[1],c=ZA(e.borderBottomRightRadius,t.width,t.height),Q=c[0],a=c[1],w=ZA(e.borderBottomLeftRadius,t.width,t.height),g=w[0],C=w[1],u=[];u.push((B+o)/t.width),u.push((g+Q)/t.width),u.push((n+C)/t.height),u.push((i+a)/t.height);var U=Math.max.apply(Math,u);U>1&&(B/=U,n/=U,o/=U,i/=U,Q/=U,a/=U,g/=U,C/=U);var l=t.width-o,F=t.height-a,h=t.width-Q,d=t.height-C,E=e.borderTopWidth,f=e.borderRightWidth,H=e.borderBottomWidth,I=e.borderLeftWidth,p=qA(e.paddingTop,A.bounds.width),y=qA(e.paddingRight,A.bounds.width),K=qA(e.paddingBottom,A.bounds.width),L=qA(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=B>0||n>0?bn(t.left+I/3,t.top+E/3,B-I/3,n-E/3,In.TOP_LEFT):new yn(t.left+I/3,t.top+E/3),this.topRightBorderDoubleOuterBox=B>0||n>0?bn(t.left+l,t.top+E/3,o-f/3,i-E/3,In.TOP_RIGHT):new yn(t.left+t.width-f/3,t.top+E/3),this.bottomRightBorderDoubleOuterBox=Q>0||a>0?bn(t.left+h,t.top+F,Q-f/3,a-H/3,In.BOTTOM_RIGHT):new yn(t.left+t.width-f/3,t.top+t.height-H/3),this.bottomLeftBorderDoubleOuterBox=g>0||C>0?bn(t.left+I/3,t.top+d,g-I/3,C-H/3,In.BOTTOM_LEFT):new yn(t.left+I/3,t.top+t.height-H/3),this.topLeftBorderDoubleInnerBox=B>0||n>0?bn(t.left+2*I/3,t.top+2*E/3,B-2*I/3,n-2*E/3,In.TOP_LEFT):new yn(t.left+2*I/3,t.top+2*E/3),this.topRightBorderDoubleInnerBox=B>0||n>0?bn(t.left+l,t.top+2*E/3,o-2*f/3,i-2*E/3,In.TOP_RIGHT):new yn(t.left+t.width-2*f/3,t.top+2*E/3),this.bottomRightBorderDoubleInnerBox=Q>0||a>0?bn(t.left+h,t.top+F,Q-2*f/3,a-2*H/3,In.BOTTOM_RIGHT):new yn(t.left+t.width-2*f/3,t.top+t.height-2*H/3),this.bottomLeftBorderDoubleInnerBox=g>0||C>0?bn(t.left+2*I/3,t.top+d,g-2*I/3,C-2*H/3,In.BOTTOM_LEFT):new yn(t.left+2*I/3,t.top+t.height-2*H/3),this.topLeftBorderStroke=B>0||n>0?bn(t.left+I/2,t.top+E/2,B-I/2,n-E/2,In.TOP_LEFT):new yn(t.left+I/2,t.top+E/2),this.topRightBorderStroke=B>0||n>0?bn(t.left+l,t.top+E/2,o-f/2,i-E/2,In.TOP_RIGHT):new yn(t.left+t.width-f/2,t.top+E/2),this.bottomRightBorderStroke=Q>0||a>0?bn(t.left+h,t.top+F,Q-f/2,a-H/2,In.BOTTOM_RIGHT):new yn(t.left+t.width-f/2,t.top+t.height-H/2),this.bottomLeftBorderStroke=g>0||C>0?bn(t.left+I/2,t.top+d,g-I/2,C-H/2,In.BOTTOM_LEFT):new yn(t.left+I/2,t.top+t.height-H/2),this.topLeftBorderBox=B>0||n>0?bn(t.left,t.top,B,n,In.TOP_LEFT):new yn(t.left,t.top),this.topRightBorderBox=o>0||i>0?bn(t.left+l,t.top,o,i,In.TOP_RIGHT):new yn(t.left+t.width,t.top),this.bottomRightBorderBox=Q>0||a>0?bn(t.left+h,t.top+F,Q,a,In.BOTTOM_RIGHT):new yn(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=g>0||C>0?bn(t.left,t.top+d,g,C,In.BOTTOM_LEFT):new yn(t.left,t.top+t.height),this.topLeftPaddingBox=B>0||n>0?bn(t.left+I,t.top+E,Math.max(0,B-I),Math.max(0,n-E),In.TOP_LEFT):new yn(t.left+I,t.top+E),this.topRightPaddingBox=o>0||i>0?bn(t.left+Math.min(l,t.width-f),t.top+E,l>t.width+f?0:Math.max(0,o-f),Math.max(0,i-E),In.TOP_RIGHT):new yn(t.left+t.width-f,t.top+E),this.bottomRightPaddingBox=Q>0||a>0?bn(t.left+Math.min(h,t.width-I),t.top+Math.min(F,t.height-H),Math.max(0,Q-f),Math.max(0,a-H),In.BOTTOM_RIGHT):new yn(t.left+t.width-f,t.top+t.height-H),this.bottomLeftPaddingBox=g>0||C>0?bn(t.left+I,t.top+Math.min(d,t.height-H),Math.max(0,g-I),Math.max(0,C-H),In.BOTTOM_LEFT):new yn(t.left+I,t.top+t.height-H),this.topLeftContentBox=B>0||n>0?bn(t.left+I+L,t.top+E+p,Math.max(0,B-(I+L)),Math.max(0,n-(E+p)),In.TOP_LEFT):new yn(t.left+I+L,t.top+E+p),this.topRightContentBox=o>0||i>0?bn(t.left+Math.min(l,t.width+I+L),t.top+E+p,l>t.width+I+L?0:o-I+L,i-(E+p),In.TOP_RIGHT):new yn(t.left+t.width-(f+y),t.top+E+p),this.bottomRightContentBox=Q>0||a>0?bn(t.left+Math.min(h,t.width-(I+L)),t.top+Math.min(F,t.height+E+p),Math.max(0,Q-(f+y)),a-(H+K),In.BOTTOM_RIGHT):new yn(t.left+t.width-(f+y),t.top+t.height-(H+K)),this.bottomLeftContentBox=g>0||C>0?bn(t.left+I+L,t.top+d,Math.max(0,g-(I+L)),C-(H+K),In.BOTTOM_LEFT):new yn(t.left+I+L,t.top+t.height-(H+K))}}();!function(A){A[A.TOP_LEFT=0]="TOP_LEFT",A[A.TOP_RIGHT=1]="TOP_RIGHT",A[A.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",A[A.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(In||(In={}));var bn=function(A,e,t,r,B){var n=(Math.sqrt(2)-1)/3*4,s=t*n,o=r*n,i=A+t,c=e+r;switch(B){case In.TOP_LEFT:return new Ln(new yn(A,c),new yn(A,c-o),new yn(i-s,e),new yn(i,e));case In.TOP_RIGHT:return new Ln(new yn(A,e),new yn(A+s,e),new yn(i,c-o),new yn(i,c));case In.BOTTOM_RIGHT:return new Ln(new yn(i,e),new yn(i,e+o),new yn(A+s,c),new yn(A,c));case In.BOTTOM_LEFT:default:return new Ln(new yn(i,c),new yn(i-s,c),new yn(A,e+o),new yn(A,e))}},vn=function(A){return[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox]},Rn=function(A){return[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox]},On=function(){return function(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}}(),Sn=function(){return function(A,e){this.path=A,this.target=e,this.type=1}}(),Tn=function(){return function(A){this.opacity=A,this.type=2,this.target=6}}(),Mn=function(A){return 1===A.type},Nn=function(){return function(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}}(),Gn=function(){function A(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new Dn(this.container),this.container.styles.opacity<1&&this.effects.push(new Tn(this.container.styles.opacity)),null!==this.container.styles.transform){var t=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,B=this.container.styles.transform;this.effects.push(new On(t,r,B))}if(this.container.styles.overflowX!==Ft.VISIBLE){var n=vn(this.curves),s=Rn(this.curves);pn(n,s)?this.effects.push(new Sn(n,6)):(this.effects.push(new Sn(n,2)),this.effects.push(new Sn(s,4)))}}return A.prototype.getEffects=function(A){for(var e=-1===[Rt.ABSOLUTE,Rt.FIXED].indexOf(this.container.styles.position),t=this.parent,r=this.effects.slice(0);t;){var B=t.effects.filter(function(A){return!Mn(A)});if(e||t.container.styles.position!==Rt.STATIC||!t.parent){if(r.unshift.apply(r,B),e=-1===[Rt.ABSOLUTE,Rt.FIXED].indexOf(t.container.styles.position),t.container.styles.overflowX!==Ft.VISIBLE){var n=vn(t.curves),s=Rn(t.curves);pn(n,s)||r.unshift(new Sn(s,6))}}else r.unshift.apply(r,B);t=t.parent}return r.filter(function(e){return sr(e.target,A)})},A}(),xn=function(A,e){for(var t=A instanceof oB?A.start:1,r=A instanceof oB&&A.reversed,B=0;B<e.length;B++){var n=e[B];n.container instanceof sB&&"number"==typeof n.container.value&&0!==n.container.value&&(t=n.container.value),n.listValue=jB(t,n.container.styles.listStyleType,!0),t+=r?-1:1}},Vn=function(A){var e=new Gn(A,null),t=new Nn(e),r=[];return function A(e,t,r,B){e.container.elements.forEach(function(n){var s=sr(n.flags,4),o=sr(n.flags,2),i=new Gn(n,e);sr(n.styles.display,2048)&&B.push(i);var c=sr(n.flags,8)?[]:B;if(s||o){var Q=s||n.styles.isPositioned()?r:t,a=new Nn(i);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var w=n.styles.zIndex.order;if(w<0){var g=0;Q.negativeZIndex.some(function(A,e){return w>A.element.container.styles.zIndex.order?(g=e,!1):g>0}),Q.negativeZIndex.splice(g,0,a)}else if(w>0){var C=0;Q.positiveZIndex.some(function(A,e){return w>=A.element.container.styles.zIndex.order?(C=e+1,!1):C>0}),Q.positiveZIndex.splice(C,0,a)}else Q.zeroOrAutoZIndexOrTransformedOrOpacity.push(a)}else n.styles.isFloating()?Q.nonPositionedFloats.push(a):Q.nonPositionedInlineLevel.push(a);A(i,a,s?a:r,c)}else n.styles.isInlineLevel()?t.inlineLevel.push(i):t.nonInlineLevel.push(i),A(i,t,r,c);sr(n.flags,8)&&xn(n,c)})}(e,t,t,r),xn(e.container,r),t},Pn=function(A,e){switch(e){case 0:return Jn(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Jn(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Jn(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);case 3:default:return Jn(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},kn=function(A,e){var t=[];return mn(A)?t.push(A.subdivide(.5,!1)):t.push(A),mn(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Jn=function(A,e,t,r){var B=[];return mn(A)?B.push(A.subdivide(.5,!1)):B.push(A),mn(t)?B.push(t.subdivide(.5,!0)):B.push(t),mn(r)?B.push(r.subdivide(.5,!0).reverse()):B.push(r),mn(e)?B.push(e.subdivide(.5,!1).reverse()):B.push(e),B},Xn=function(A){var e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},_n=function(A){var e=A.styles,t=A.bounds,r=qA(e.paddingLeft,t.width),B=qA(e.paddingRight,t.width),n=qA(e.paddingTop,t.width),s=qA(e.paddingBottom,t.width);return t.add(r+e.borderLeftWidth,n+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+r+B),-(e.borderTopWidth+e.borderBottomWidth+n+s))},Yn=function(A,e,t){var r,B,n=(r=jn(A.styles.backgroundOrigin,e),B=A,0===r?B.bounds:2===r?_n(B):Xn(B)),s=function(A,e){return A===ie.BORDER_BOX?e.bounds:A===ie.CONTENT_BOX?_n(e):Xn(e)}(jn(A.styles.backgroundClip,e),A),o=qn(jn(A.styles.backgroundSize,e),t,n),i=o[0],c=o[1],Q=ZA(jn(A.styles.backgroundPosition,e),n.width-i,n.height-c);return[zn(jn(A.styles.backgroundRepeat,e),Q,o,n,s),Math.round(n.left+Q[0]),Math.round(n.top+Q[1]),i,c]},Wn=function(A){return TA(A)&&A.value===be.AUTO},Zn=function(A){return"number"==typeof A},qn=function(A,e,t){var r=e[0],B=e[1],n=e[2],s=A[0],o=A[1];if(!s)return[0,0];if(JA(s)&&o&&JA(o))return[qA(s,t.width),qA(o,t.height)];var i=Zn(n);if(TA(s)&&(s.value===be.CONTAIN||s.value===be.COVER))return Zn(n)?t.width/t.height<n!=(s.value===be.COVER)?[t.width,t.width/n]:[t.height*n,t.height]:[t.width,t.height];var c=Zn(r),Q=Zn(B),a=c||Q;if(Wn(s)&&(!o||Wn(o)))return c&&Q?[r,B]:i||a?a&&i?[c?r:B*n,Q?B:r/n]:[c?r:t.width,Q?B:t.height]:[t.width,t.height];if(i){var w=0,g=0;return JA(s)?w=qA(s,t.width):JA(o)&&(g=qA(o,t.height)),Wn(s)?w=g*n:o&&!Wn(o)||(g=w/n),[w,g]}var C=null,u=null;if(JA(s)?C=qA(s,t.width):o&&JA(o)&&(u=qA(o,t.height)),null===C||o&&!Wn(o)||(u=c&&Q?C/r*B:t.height),null!==u&&Wn(s)&&(C=c&&Q?u/B*r:t.width),null!==C&&null!==u)return[C,u];throw new Error("Unable to calculate background-size for element")},jn=function(A,e){var t=A[e];return void 0===t?A[0]:t},zn=function(A,e,t,r,B){var n=e[0],s=e[1],o=t[0],i=t[1];switch(A){case ye.REPEAT_X:return[new yn(Math.round(r.left),Math.round(r.top+s)),new yn(Math.round(r.left+r.width),Math.round(r.top+s)),new yn(Math.round(r.left+r.width),Math.round(i+r.top+s)),new yn(Math.round(r.left),Math.round(i+r.top+s))];case ye.REPEAT_Y:return[new yn(Math.round(r.left+n),Math.round(r.top)),new yn(Math.round(r.left+n+o),Math.round(r.top)),new yn(Math.round(r.left+n+o),Math.round(r.height+r.top)),new yn(Math.round(r.left+n),Math.round(r.height+r.top))];case ye.NO_REPEAT:return[new yn(Math.round(r.left+n),Math.round(r.top+s)),new yn(Math.round(r.left+n+o),Math.round(r.top+s)),new yn(Math.round(r.left+n+o),Math.round(r.top+s+i)),new yn(Math.round(r.left+n),Math.round(r.top+s+i))];default:return[new yn(Math.round(B.left),Math.round(B.top)),new yn(Math.round(B.left+B.width),Math.round(B.top)),new yn(Math.round(B.left+B.width),Math.round(B.height+B.top)),new yn(Math.round(B.left),Math.round(B.height+B.top))]}},$n=function(){function A(A){this._data={},this._document=A}return A.prototype.parseMetrics=function(A,e){var t=this._document.createElement("div"),r=this._document.createElement("img"),B=this._document.createElement("span"),n=this._document.body;t.style.visibility="hidden",t.style.fontFamily=A,t.style.fontSize=e,t.style.margin="0",t.style.padding="0",n.appendChild(t),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",B.style.fontFamily=A,B.style.fontSize=e,B.style.margin="0",B.style.padding="0",B.appendChild(this._document.createTextNode("Hidden Text")),t.appendChild(B),t.appendChild(r);var s=r.offsetTop-B.offsetTop+2;t.removeChild(B),t.appendChild(this._document.createTextNode("Hidden Text")),t.style.lineHeight="normal",r.style.verticalAlign="super";var o=r.offsetTop-t.offsetTop+2;return n.removeChild(t),{baseline:s,middle:o}},A.prototype.getMetrics=function(A,e){var t=A+" "+e;return void 0===this._data[t]&&(this._data[t]=this.parseMetrics(A,e)),this._data[t]},A}(),As=function(){return function(A,e){this.context=A,this.options=e}}(),es=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r._activeEffects=[],r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),t.canvas||(r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px"),r.fontMetrics=new $n(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+t.width+"x"+t.height+") with scale "+t.scale),r}return e(t,A),t.prototype.applyEffects=function(A){for(var e=this;this._activeEffects.length;)this.popEffect();A.forEach(function(A){return e.applyEffect(A)})},t.prototype.applyEffect=function(A){this.ctx.save(),function(A){return 2===A.type}(A)&&(this.ctx.globalAlpha=A.opacity),function(A){return 0===A.type}(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),Mn(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(A){return B(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return A.element.container.styles.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.renderNode=function(A){return B(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return sr(A.container.flags,16),A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return e.sent(),[4,this.renderNodeContent(A)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.renderTextWithLetterSpacing=function(A,e,t){var r=this;0===e?this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+t):xr(A.text).reduce(function(e,B){return r.ctx.fillText(B,e,A.bounds.top+t),e+r.ctx.measureText(B).width},A.bounds.left)},t.prototype.createFontStyle=function(A){var e=A.fontVariant.filter(function(A){return"normal"===A||"small-caps"===A}).join(""),t=A.fontFamily.join(", "),r=OA(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,e,A.fontWeight,r,t].join(" "),t,r]},t.prototype.renderTextNode=function(A,e){return B(this,void 0,void 0,function(){var t,r,B,s,o,i,c,Q,a=this;return n(this,function(n){return t=this.createFontStyle(e),r=t[0],B=t[1],s=t[2],this.ctx.font=r,this.ctx.direction=1===e.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(B,s),i=o.baseline,c=o.middle,Q=e.paintOrder,A.textBounds.forEach(function(A){Q.forEach(function(t){switch(t){case Br.FILL:a.ctx.fillStyle=re(e.color),a.renderTextWithLetterSpacing(A,e.letterSpacing,i);var r=e.textShadow;r.length&&A.text.trim().length&&(r.slice(0).reverse().forEach(function(t){a.ctx.shadowColor=re(t.color),a.ctx.shadowOffsetX=t.offsetX.number*a.options.scale,a.ctx.shadowOffsetY=t.offsetY.number*a.options.scale,a.ctx.shadowBlur=t.blur.number,a.renderTextWithLetterSpacing(A,e.letterSpacing,i)}),a.ctx.shadowColor="",a.ctx.shadowOffsetX=0,a.ctx.shadowOffsetY=0,a.ctx.shadowBlur=0),e.textDecorationLine.length&&(a.ctx.fillStyle=re(e.textDecorationColor||e.color),e.textDecorationLine.forEach(function(e){switch(e){case 1:a.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top+i),A.bounds.width,1);break;case 2:a.ctx.fillRect(A.bounds.left,Math.round(A.bounds.top),A.bounds.width,1);break;case 3:a.ctx.fillRect(A.bounds.left,Math.ceil(A.bounds.top+c),A.bounds.width,1)}}));break;case Br.STROKE:e.webkitTextStrokeWidth&&A.text.trim().length&&(a.ctx.strokeStyle=re(e.webkitTextStrokeColor),a.ctx.lineWidth=e.webkitTextStrokeWidth,a.ctx.lineJoin=window.chrome?"miter":"round",a.ctx.strokeText(A.text,A.bounds.left,A.bounds.top+i)),a.ctx.strokeStyle="",a.ctx.lineWidth=0,a.ctx.lineJoin="miter"}})}),[2]})})},t.prototype.renderReplacedElement=function(A,e,t){if(t&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var r=_n(A),B=Rn(e);this.path(B),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(t,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(A){return B(this,void 0,void 0,function(){var e,r,B,s,i,c,Q,a,w,g,C,u,U,l,F,h,d,E;return n(this,function(n){switch(n.label){case 0:this.applyEffects(A.getEffects(4)),e=A.container,r=A.curves,B=e.styles,s=0,i=e.textNodes,n.label=1;case 1:return s<i.length?(c=i[s],[4,this.renderTextNode(c,B)]):[3,4];case 2:n.sent(),n.label=3;case 3:return s++,[3,1];case 4:if(!(e instanceof rB))return[3,8];n.label=5;case 5:return n.trys.push([5,7,,8]),[4,this.context.cache.match(e.src)];case 6:return F=n.sent(),this.renderReplacedElement(e,r,F),[3,8];case 7:return n.sent(),this.context.logger.error("Error loading image "+e.src),[3,8];case 8:if(e instanceof BB&&this.renderReplacedElement(e,r,e.canvas),!(e instanceof nB))return[3,12];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,this.context.cache.match(e.svg)];case 10:return F=n.sent(),this.renderReplacedElement(e,r,F),[3,12];case 11:return n.sent(),this.context.logger.error("Error loading svg "+e.svg.substring(0,255)),[3,12];case 12:return e instanceof FB&&e.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:e.backgroundColor,x:0,y:0,width:e.width,height:e.height}).render(e.tree)]:[3,14];case 13:Q=n.sent(),e.width&&e.height&&this.ctx.drawImage(Q,0,0,e.width,e.height,e.bounds.left,e.bounds.top,e.bounds.width,e.bounds.height),n.label=14;case 14:if(e instanceof uB&&(a=Math.min(e.bounds.width,e.bounds.height),e.type===wB?e.checked&&(this.ctx.save(),this.path([new yn(e.bounds.left+.39363*a,e.bounds.top+.79*a),new yn(e.bounds.left+.16*a,e.bounds.top+.5549*a),new yn(e.bounds.left+.27347*a,e.bounds.top+.44071*a),new yn(e.bounds.left+.39694*a,e.bounds.top+.5649*a),new yn(e.bounds.left+.72983*a,e.bounds.top+.23*a),new yn(e.bounds.left+.84*a,e.bounds.top+.34085*a),new yn(e.bounds.left+.39363*a,e.bounds.top+.79*a)]),this.ctx.fillStyle=re(707406591),this.ctx.fill(),this.ctx.restore()):e.type===gB&&e.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(e.bounds.left+a/2,e.bounds.top+a/2,a/4,0,2*Math.PI,!0),this.ctx.fillStyle=re(707406591),this.ctx.fill(),this.ctx.restore())),ts(e)&&e.value.length){switch(w=this.createFontStyle(B),d=w[0],g=w[1],C=this.fontMetrics.getMetrics(d,g).baseline,this.ctx.font=d,this.ctx.fillStyle=re(B.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bs(e.styles.textAlign),E=_n(e),u=0,e.styles.textAlign){case pt.CENTER:u+=E.width/2;break;case pt.RIGHT:u+=E.width}U=E.add(u,0,0,-E.height/2+1),this.ctx.save(),this.path([new yn(E.left,E.top),new yn(E.left+E.width,E.top),new yn(E.left+E.width,E.top+E.height),new yn(E.left,E.top+E.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Xr(e.value,U),B.letterSpacing,C),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!sr(e.styles.display,2048))return[3,20];if(null===e.styles.listStyleImage)return[3,19];if((l=e.styles.listStyleImage).type!==ge.URL)return[3,18];F=void 0,h=l.url,n.label=15;case 15:return n.trys.push([15,17,,18]),[4,this.context.cache.match(h)];case 16:return F=n.sent(),this.ctx.drawImage(F,e.bounds.left-(F.width+10),e.bounds.top),[3,18];case 17:return n.sent(),this.context.logger.error("Error loading list-style-image "+h),[3,18];case 18:return[3,20];case 19:A.listValue&&e.styles.listStyleType!==Ut.NONE&&(d=this.createFontStyle(B)[0],this.ctx.font=d,this.ctx.fillStyle=re(B.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",E=new o(e.bounds.left,e.bounds.top+qA(e.styles.paddingTop,e.bounds.width),e.bounds.width,Ct(B.lineHeight,B.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Xr(A.listValue,E),B.letterSpacing,Ct(B.lineHeight,B.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),n.label=20;case 20:return[2]}})})},t.prototype.renderStackContent=function(A){return B(this,void 0,void 0,function(){var e,t,r,B,s,o,i,c,Q,a,w,g,C,u,U;return n(this,function(n){switch(n.label){case 0:return sr(A.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:n.sent(),e=0,t=A.negativeZIndex,n.label=2;case 2:return e<t.length?(U=t[e],[4,this.renderStack(U)]):[3,5];case 3:n.sent(),n.label=4;case 4:return e++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:n.sent(),r=0,B=A.nonInlineLevel,n.label=7;case 7:return r<B.length?(U=B[r],[4,this.renderNode(U)]):[3,10];case 8:n.sent(),n.label=9;case 9:return r++,[3,7];case 10:s=0,o=A.nonPositionedFloats,n.label=11;case 11:return s<o.length?(U=o[s],[4,this.renderStack(U)]):[3,14];case 12:n.sent(),n.label=13;case 13:return s++,[3,11];case 14:i=0,c=A.nonPositionedInlineLevel,n.label=15;case 15:return i<c.length?(U=c[i],[4,this.renderStack(U)]):[3,18];case 16:n.sent(),n.label=17;case 17:return i++,[3,15];case 18:Q=0,a=A.inlineLevel,n.label=19;case 19:return Q<a.length?(U=a[Q],[4,this.renderNode(U)]):[3,22];case 20:n.sent(),n.label=21;case 21:return Q++,[3,19];case 22:w=0,g=A.zeroOrAutoZIndexOrTransformedOrOpacity,n.label=23;case 23:return w<g.length?(U=g[w],[4,this.renderStack(U)]):[3,26];case 24:n.sent(),n.label=25;case 25:return w++,[3,23];case 26:C=0,u=A.positiveZIndex,n.label=27;case 27:return C<u.length?(U=u[C],[4,this.renderStack(U)]):[3,30];case 28:n.sent(),n.label=29;case 29:return C++,[3,27];case 30:return[2]}})})},t.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},t.prototype.formatPath=function(A){var e=this;A.forEach(function(A,t){var r=mn(A)?A.start:A;0===t?e.ctx.moveTo(r.x,r.y):e.ctx.lineTo(r.x,r.y),mn(A)&&e.ctx.bezierCurveTo(A.startControl.x,A.startControl.y,A.endControl.x,A.endControl.y,A.end.x,A.end.y)})},t.prototype.renderRepeat=function(A,e,t,r){this.path(A),this.ctx.fillStyle=e,this.ctx.translate(t,r),this.ctx.fill(),this.ctx.translate(-t,-r)},t.prototype.resizeImage=function(A,e,t){var r;if(A.width===e&&A.height===t)return A;var B=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return B.width=Math.max(1,e),B.height=Math.max(1,t),B.getContext("2d").drawImage(A,0,0,A.width,A.height,0,0,e,t),B},t.prototype.renderBackgroundImage=function(A){return B(this,void 0,void 0,function(){var e,t,r,B,s,o;return n(this,function(i){switch(i.label){case 0:e=A.styles.backgroundImage.length-1,t=function(t){var B,s,o,i,c,Q,a,w,g,C,u,U,l,F,h,d,E,f,H,I,p,y,K,L,m,D,b,v,R,O,S;return n(this,function(n){switch(n.label){case 0:if(t.type!==ge.URL)return[3,5];B=void 0,s=t.url,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,r.context.cache.match(s)];case 2:return B=n.sent(),[3,4];case 3:return n.sent(),r.context.logger.error("Error loading background-image "+s),[3,4];case 4:return B&&(o=Yn(A,e,[B.width,B.height,B.width/B.height]),d=o[0],y=o[1],K=o[2],H=o[3],I=o[4],F=r.ctx.createPattern(r.resizeImage(B,H,I),"repeat"),r.renderRepeat(d,F,y,K)),[3,6];case 5:t.type===ge.LINEAR_GRADIENT?(i=Yn(A,e,[null,null,null]),d=i[0],y=i[1],K=i[2],H=i[3],I=i[4],c=Fe(t.angle,H,I),Q=c[0],a=c[1],w=c[2],g=c[3],C=c[4],(u=document.createElement("canvas")).width=H,u.height=I,U=u.getContext("2d"),l=U.createLinearGradient(a,g,w,C),le(t.stops,Q).forEach(function(A){return l.addColorStop(A.stop,re(A.color))}),U.fillStyle=l,U.fillRect(0,0,H,I),H>0&&I>0&&(F=r.ctx.createPattern(u,"repeat"),r.renderRepeat(d,F,y,K))):function(A){return A.type===ge.RADIAL_GRADIENT}(t)&&(h=Yn(A,e,[null,null,null]),d=h[0],E=h[1],f=h[2],H=h[3],I=h[4],p=0===t.position.length?[YA]:t.position,y=qA(p[0],H),K=qA(p[p.length-1],I),L=function(A,e,t,r,B){var n=0,s=0;switch(A.size){case Ie.CLOSEST_SIDE:A.shape===He.CIRCLE?n=s=Math.min(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):A.shape===He.ELLIPSE&&(n=Math.min(Math.abs(e),Math.abs(e-r)),s=Math.min(Math.abs(t),Math.abs(t-B)));break;case Ie.CLOSEST_CORNER:if(A.shape===He.CIRCLE)n=s=Math.min(he(e,t),he(e,t-B),he(e-r,t),he(e-r,t-B));else if(A.shape===He.ELLIPSE){var o=Math.min(Math.abs(t),Math.abs(t-B))/Math.min(Math.abs(e),Math.abs(e-r)),i=de(r,B,e,t,!0),c=i[0],Q=i[1];s=o*(n=he(c-e,(Q-t)/o))}break;case Ie.FARTHEST_SIDE:A.shape===He.CIRCLE?n=s=Math.max(Math.abs(e),Math.abs(e-r),Math.abs(t),Math.abs(t-B)):A.shape===He.ELLIPSE&&(n=Math.max(Math.abs(e),Math.abs(e-r)),s=Math.max(Math.abs(t),Math.abs(t-B)));break;case Ie.FARTHEST_CORNER:if(A.shape===He.CIRCLE)n=s=Math.max(he(e,t),he(e,t-B),he(e-r,t),he(e-r,t-B));else if(A.shape===He.ELLIPSE){o=Math.max(Math.abs(t),Math.abs(t-B))/Math.max(Math.abs(e),Math.abs(e-r));var a=de(r,B,e,t,!1);c=a[0],Q=a[1],s=o*(n=he(c-e,(Q-t)/o))}}return Array.isArray(A.size)&&(n=qA(A.size[0],r),s=2===A.size.length?qA(A.size[1],B):n),[n,s]}(t,y,K,H,I),m=L[0],D=L[1],m>0&&D>0&&(b=r.ctx.createRadialGradient(E+y,f+K,0,E+y,f+K,m),le(t.stops,2*m).forEach(function(A){return b.addColorStop(A.stop,re(A.color))}),r.path(d),r.ctx.fillStyle=b,m!==D?(v=A.bounds.left+.5*A.bounds.width,R=A.bounds.top+.5*A.bounds.height,S=1/(O=D/m),r.ctx.save(),r.ctx.translate(v,R),r.ctx.transform(1,0,0,O,0,0),r.ctx.translate(-v,-R),r.ctx.fillRect(E,S*(f-R)+R,H,I*S),r.ctx.restore()):r.ctx.fill())),n.label=6;case 6:return e--,[2]}})},r=this,B=0,s=A.styles.backgroundImage.slice(0).reverse(),i.label=1;case 1:return B<s.length?(o=s[B],[5,t(o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return B++,[3,1];case 4:return[2]}})})},t.prototype.renderSolidBorder=function(A,e,t){return B(this,void 0,void 0,function(){return n(this,function(r){return this.path(Pn(t,e)),this.ctx.fillStyle=re(A),this.ctx.fill(),[2]})})},t.prototype.renderDoubleBorder=function(A,e,t,r){return B(this,void 0,void 0,function(){var B,s;return n(this,function(n){switch(n.label){case 0:return e<3?[4,this.renderSolidBorder(A,t,r)]:[3,2];case 1:return n.sent(),[2];case 2:return B=function(A,e){switch(e){case 0:return Jn(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Jn(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Jn(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);case 3:default:return Jn(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}}(r,t),this.path(B),this.ctx.fillStyle=re(A),this.ctx.fill(),s=function(A,e){switch(e){case 0:return Jn(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Jn(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Jn(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);case 3:default:return Jn(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}}(r,t),this.path(s),this.ctx.fill(),[2]}})})},t.prototype.renderNodeBackgroundAndBorders=function(A){return B(this,void 0,void 0,function(){var e,t,r,B,s,o,i,c,Q=this;return n(this,function(n){switch(n.label){case 0:return this.applyEffects(A.getEffects(2)),e=A.container.styles,t=!te(e.backgroundColor)||e.backgroundImage.length,r=[{style:e.borderTopStyle,color:e.borderTopColor,width:e.borderTopWidth},{style:e.borderRightStyle,color:e.borderRightColor,width:e.borderRightWidth},{style:e.borderBottomStyle,color:e.borderBottomColor,width:e.borderBottomWidth},{style:e.borderLeftStyle,color:e.borderLeftColor,width:e.borderLeftWidth}],B=rs(jn(e.backgroundClip,0),A.curves),t||e.boxShadow.length?(this.ctx.save(),this.path(B),this.ctx.clip(),te(e.backgroundColor)||(this.ctx.fillStyle=re(e.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:n.sent(),this.ctx.restore(),e.boxShadow.slice(0).reverse().forEach(function(e){Q.ctx.save();var t,r,B,n,s,o=vn(A.curves),i=e.inset?0:1e4,c=(t=o,r=-i+(e.inset?1:-1)*e.spread.number,B=(e.inset?1:-1)*e.spread.number,n=e.spread.number*(e.inset?-2:2),s=e.spread.number*(e.inset?-2:2),t.map(function(A,e){switch(e){case 0:return A.add(r,B);case 1:return A.add(r+n,B);case 2:return A.add(r+n,B+s);case 3:return A.add(r,B+s)}return A}));e.inset?(Q.path(o),Q.ctx.clip(),Q.mask(c)):(Q.mask(o),Q.ctx.clip(),Q.path(c)),Q.ctx.shadowOffsetX=e.offsetX.number+i,Q.ctx.shadowOffsetY=e.offsetY.number,Q.ctx.shadowColor=re(e.color),Q.ctx.shadowBlur=e.blur.number,Q.ctx.fillStyle=e.inset?re(e.color):"rgba(0,0,0,1)",Q.ctx.fill(),Q.ctx.restore()}),n.label=2;case 2:s=0,o=0,i=r,n.label=3;case 3:return o<i.length?(c=i[o]).style!==Oe.NONE&&!te(c.color)&&c.width>0?c.style!==Oe.DASHED?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,s,A.curves,Oe.DASHED)]:[3,11]:[3,13];case 4:return n.sent(),[3,11];case 5:return c.style!==Oe.DOTTED?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,s,A.curves,Oe.DOTTED)];case 6:return n.sent(),[3,11];case 7:return c.style!==Oe.DOUBLE?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,s,A.curves)];case 8:return n.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,s,A.curves)];case 10:n.sent(),n.label=11;case 11:s++,n.label=12;case 12:return o++,[3,3];case 13:return[2]}})})},t.prototype.renderDashedDottedBorder=function(A,e,t,r,s){return B(this,void 0,void 0,function(){var B,o,i,c,Q,a,w,g,C,u,U,l,F,h,d,E;return n(this,function(n){return this.ctx.save(),B=function(A,e){switch(e){case 0:return kn(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return kn(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return kn(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);case 3:default:return kn(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}}(r,t),o=Pn(r,t),s===Oe.DASHED&&(this.path(o),this.ctx.clip()),mn(o[0])?(i=o[0].start.x,c=o[0].start.y):(i=o[0].x,c=o[0].y),mn(o[1])?(Q=o[1].end.x,a=o[1].end.y):(Q=o[1].x,a=o[1].y),w=0===t||2===t?Math.abs(i-Q):Math.abs(c-a),this.ctx.beginPath(),s===Oe.DOTTED?this.formatPath(B):this.formatPath(o.slice(0,2)),g=e<3?3*e:2*e,C=e<3?2*e:e,s===Oe.DOTTED&&(g=e,C=e),u=!0,w<=2*g?u=!1:w<=2*g+C?(g*=U=w/(2*g+C),C*=U):(l=Math.floor((w+C)/(g+C)),F=(w-l*g)/(l-1),C=(h=(w-(l+1)*g)/l)<=0||Math.abs(C-F)<Math.abs(C-h)?F:h),u&&(s===Oe.DOTTED?this.ctx.setLineDash([0,g+C]):this.ctx.setLineDash([g,C])),s===Oe.DOTTED?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=2*e+1.1,this.ctx.strokeStyle=re(A),this.ctx.stroke(),this.ctx.setLineDash([]),s===Oe.DASHED&&(mn(o[0])&&(d=o[3],E=o[0],this.ctx.beginPath(),this.formatPath([new yn(d.end.x,d.end.y),new yn(E.start.x,E.start.y)]),this.ctx.stroke()),mn(o[1])&&(d=o[1],E=o[2],this.ctx.beginPath(),this.formatPath([new yn(d.end.x,d.end.y),new yn(E.start.x,E.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},t.prototype.render=function(A){return B(this,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=re(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),e=Vn(A),[4,this.renderStack(e)];case 1:return t.sent(),this.applyEffects([]),[2,this.canvas]}})})},t}(As),ts=function(A){return A instanceof lB||(A instanceof UB||A instanceof uB&&A.type!==gB&&A.type!==wB)},rs=function(A,e){switch(A){case ie.BORDER_BOX:return vn(e);case ie.CONTENT_BOX:return function(A){return[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox]}(e);case ie.PADDING_BOX:default:return Rn(e)}},Bs=function(A){switch(A){case pt.CENTER:return"center";case pt.RIGHT:return"right";case pt.LEFT:default:return"left"}},ns=function(A){function t(e,t){var r=A.call(this,e,t)||this;return r.canvas=t.canvas?t.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=t,r.canvas.width=Math.floor(t.width*t.scale),r.canvas.height=Math.floor(t.height*t.scale),r.canvas.style.width=t.width+"px",r.canvas.style.height=t.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-t.x,-t.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+t.width+"x"+t.height+" at "+t.x+","+t.y+") with scale "+t.scale),r}return e(t,A),t.prototype.render=function(A){return B(this,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:return e=Pr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,ss(e)];case 1:return t=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=re(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(t,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},t}(As),ss=function(A){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=t,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(A))})},os=function(){function A(A){var e=A.id,t=A.enabled;this.id=e,this.enabled=t,this.start=Date.now()}return A.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,s([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.prototype.getTime=function(){return Date.now()-this.start},A.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,s([this.id,this.getTime()+"ms"],A))},A.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,s([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,s([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},A.instances={},A}(),is=function(){function A(e,t){var r;this.windowBounds=t,this.instanceName="#"+A.instanceCount++,this.logger=new os({id:this.instanceName,enabled:e.logging}),this.cache=null!==(r=e.cache)&&void 0!==r?r:new un(this,e)}return A.instanceCount=1,A}();"undefined"!=typeof window&&Cn.setContext(window);var cs=function(A,e){return B(void 0,void 0,void 0,function(){var B,s,c,Q,a,w,g,C,u,U,l,F,h,d,E,f,H,I,p,y,K,L,m,D,b,v,R,O,S,T,M,N,G,x,V,P,k,J;return n(this,function(n){switch(n.label){case 0:if(!A||"object"!==t(A))return[2,Promise.reject("Invalid element provided as first argument")];if(!(B=A.ownerDocument))throw new Error("Element is not attached to a Document");if(!(s=B.defaultView))throw new Error("Document is not attached to a Window");return c={allowTaint:null!==(L=e.allowTaint)&&void 0!==L&&L,imageTimeout:null!==(m=e.imageTimeout)&&void 0!==m?m:15e3,proxy:e.proxy,useCORS:null!==(D=e.useCORS)&&void 0!==D&&D},Q=r({logging:null===(b=e.logging)||void 0===b||b,cache:e.cache},c),a={windowWidth:null!==(v=e.windowWidth)&&void 0!==v?v:s.innerWidth,windowHeight:null!==(R=e.windowHeight)&&void 0!==R?R:s.innerHeight,scrollX:null!==(O=e.scrollX)&&void 0!==O?O:s.pageXOffset,scrollY:null!==(S=e.scrollY)&&void 0!==S?S:s.pageYOffset},w=new o(a.scrollX,a.scrollY,a.windowWidth,a.windowHeight),g=new is(Q,w),C=null!==(T=e.foreignObjectRendering)&&void 0!==T&&T,u={allowTaint:null!==(M=e.allowTaint)&&void 0!==M&&M,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:C,copyStyles:C},g.logger.debug("Starting document clone with size "+w.width+"x"+w.height+" scrolled to "+-w.left+","+-w.top),U=new zB(g,A,u),(l=U.clonedReferenceElement)?[4,U.toIFrame(B,w)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return F=n.sent(),h=vB(l)||"HTML"===l.tagName?function(A){var e=A.body,t=A.documentElement;if(!e||!t)throw new Error("Unable to get document size");var r=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),B=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new o(0,0,r,B)}(l.ownerDocument):i(g,l),d=h.width,E=h.height,f=h.left,H=h.top,I=Qs(g,l,e.backgroundColor),p={canvas:e.canvas,backgroundColor:I,scale:null!==(G=null!==(N=e.scale)&&void 0!==N?N:s.devicePixelRatio)&&void 0!==G?G:1,x:(null!==(x=e.x)&&void 0!==x?x:0)+f,y:(null!==(V=e.y)&&void 0!==V?V:0)+H,width:null!==(P=e.width)&&void 0!==P?P:Math.ceil(d),height:null!==(k=e.height)&&void 0!==k?k:Math.ceil(E)},C?(g.logger.debug("Document cloned, using foreign object rendering"),[4,new ns(g,p).render(l)]):[3,3];case 2:return y=n.sent(),[3,5];case 3:return g.logger.debug("Document cloned, element located at "+f+","+H+" with size "+d+"x"+E+" using computed rendering"),g.logger.debug("Starting DOM parsing"),K=EB(g,l),I===K.styles.backgroundColor&&(K.styles.backgroundColor=we.TRANSPARENT),g.logger.debug("Starting renderer for element at "+p.x+","+p.y+" with size "+p.width+"x"+p.height),[4,new es(g,p).render(K)];case 4:y=n.sent(),n.label=5;case 5:return(null===(J=e.removeContainer)||void 0===J||J)&&(zB.destroy(F)||g.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),g.logger.debug("Finished rendering"),[2,y]}})})},Qs=function(A,e,t){var r=e.ownerDocument,B=r.documentElement?ae(A,getComputedStyle(r.documentElement).backgroundColor):we.TRANSPARENT,n=r.body?ae(A,getComputedStyle(r.body).backgroundColor):we.TRANSPARENT,s="string"==typeof t?ae(A,t):null===t?we.TRANSPARENT:4294967295;return e===r.documentElement?te(B)?te(n)?s:n:B:s};return function(A,e){return void 0===e&&(e={}),cs(A,e)}});
|
|
767
|
-
},{}],"vcNA":[function(require,module,exports) {
|
|
768
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.htmlToCanvas=exports.detectSize=void 0;const t=e(require("html2canvas")),n=2;function i(e){const t=document.createElement("div");t.innerHTML=e,t.style.display="inline-block",t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.zIndex="1000",o.appendChild(t);const n=t.getBoundingClientRect();return o.removeChild(t),{width:n.width,height:n.height}}exports.detectSize=i;const o=document.createElement("div");async function l({html:e,width:n,height:i}){const l=document.createElement("div");return o.appendChild(l),l.innerHTML=e,l.style.position="absolute",l.style.width=n+"px",l.style.height=i+"px",l.style.zIndex="1000",await(0,t.default)(l,{logging:!1,width:n,height:i,backgroundColor:"transparent"})}o.style.overflow="hidden",o.style.position="relative",document.body.appendChild(o),exports.htmlToCanvas=l;
|
|
769
|
-
},{"html2canvas":"NLGZ"}],"e3HD":[function(require,module,exports) {
|
|
770
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.css=i,exports.setup=x,exports.styled=y,exports.keyframes=exports.glob=exports.extractCss=void 0;let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,r=e=>{let r=t(e),s=r.data;return r.data="",s},s=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/g,o=/\/\*[^]*?\*\/|\s\s+|\n/g,l=(e,t)=>{let r,s="",o="",a="";for(let n in e){let c=e[n];"object"==typeof c?(r=t?t.replace(/([^,])+/g,e=>n.replace(/([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n,o+="@"==n[0]?"f"==n[1]?l(c,n):n+"{"+l(c,"k"==n[1]?"":t)+"}":l(c,r)):"@"==n[0]&&"i"==n[1]?s=n+" "+c+";":(n=n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=l.p?l.p(n,c):n+":"+c+";")}return a[0]?s+(r=t?t+"{"+a+"}":a)+o:s+o},a={},n=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?n(e[r]):e[r]);return t},c=(e,t,r,c,p)=>{let i="object"==typeof e?n(e):e,u=a[i]||(a[i]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return"go"+r})(i));if(!a[u]){let t="object"==typeof e?e:(e=>{let t,r=[{}];for(;t=s.exec(e.replace(o,""));)t[4]&&r.shift(),t[3]?r.unshift(r[0][t[3]]=r[0][t[3]]||{}):t[4]||(r[0][t[1]]=t[2]);return r[0]})(e);a[u]=l(p?{["@keyframes "+u]:t}:t,r?"":"."+u)}return((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(a[u],t,c),u},p=(e,t,r)=>e.reduce((e,s,o)=>{let a=t[o];if(a&&a.call){let e=a(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;a=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):e}return e+s+(null==a?"":a)},"");function i(e){let r=this||{},s=e.call?e(r.p):e;return c(s.unshift?s.raw?p(s,[].slice.call(arguments,1),r.p):s.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):s,t(r.target),r.g,r.o,r.k)}exports.extractCss=r;let u,d,f,g=i.bind({g:1}),b=i.bind({k:1});function x(e,t,r,s){l.p=t,u=e,d=r,f=s}function y(e,t){let r=this||{};return function(){let s=arguments;function o(l,a){let n=Object.assign({},l),c=n.className||o.className;r.p=Object.assign({theme:d&&d()},n),r.o=/ *go\d+/.test(c),n.className=i.apply(r,s)+(c?" "+c:""),t&&(n.ref=a);let p=n.as||e;return delete n.as,f&&p[0]&&f(n),u(p,n)}return t?t(o):o}}exports.keyframes=b,exports.glob=g;
|
|
771
|
-
},{}],"PsiH":[function(require,module,exports) {
|
|
772
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const t=e(require("react")),r=require("goober");(0,r.setup)(t.default.createElement),exports.default=r.styled;
|
|
773
|
-
},{"react":"HdMw","goober":"e3HD"}],"BLZX":[function(require,module,exports) {
|
|
774
|
-
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var l in r)"default"!==l&&Object.prototype.hasOwnProperty.call(r,l)&&e(n,r,l);return t(n,r),n},n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.HTMLElement=exports.quillRef=void 0;const l=n(require("react")),o=require("mobx-react-lite"),i=require("react-konva"),a=n(require("quill/dist/quill")),u=r(require("mobx")),s=require("./apply-filters"),d=require("./text-element"),c=require("../utils/html2canvas"),f=require("./use-fadein"),h=require("./highlighter"),g=require("react-konva-utils"),m=n(require("../utils/styled"));exports.quillRef=u.observable({enabled:!1,currentFormat:{},editor:u.observable.object({instance:null},{},{deep:!1})});const p=(0,m.default)("div",l.default.forwardRef)`
|
|
775
|
-
.ql-editor {
|
|
776
|
-
outline: none;
|
|
777
|
-
}
|
|
778
|
-
`,y=({html:e,onBlur:t,onChange:r,element:n})=>{const o=l.default.useRef(null);return l.default.useEffect(()=>{if(!o.current)return;const e=new a.default(o.current,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1}});return exports.quillRef.editor.instance=e,window.__polotnoQuill=e,e.on("text-change",()=>{var t;e.getSelection()&&(exports.quillRef.currentFormat=e.getFormat()),r(null===(t=o.current)||void 0===t?void 0:t.childNodes[0].innerHTML)}),e.setSelection(0,0,"api"),e.on("selection-change",r=>{r||t(),r&&(exports.quillRef.currentFormat=e.getFormat())}),o.current.childNodes[0].addEventListener("blur",e=>{var r;(null===(r=e.relatedTarget)||void 0===r?void 0:r.classList.contains("ql-clipboard"))||t()}),()=>{exports.quillRef.editor.instance=null,exports.quillRef.currentFormat={},delete window.__polotnoQuill}},[]),l.default.useEffect(()=>{var t;const r=exports.quillRef.editor.instance,l=r.getSelection();if((null===(t=o.current)||void 0===t?void 0:t.childNodes[0].innerHTML)!==n.text){var i=r.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+e+"<p><br></p></div>");r.setContents(i),r.history.clear(),l&&(r.setSelection(l.index,l.length),exports.quillRef.currentFormat=r.getFormat())}},[n.text]),l.default.createElement(p,{ref:o,style:{fontSize:n.fontSize,color:n.fill,width:n.width,fontFamily:n.fontFamily,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing,textAlign:n.align}})};function v(e,t,r){return l.default.useMemo(()=>(0,c.detectSize)(e),[e,t.width,r])}exports.HTMLElement=(0,o.observer)(({element:e,store:t})=>{const r=l.default.useRef(null),[n,o]=l.default.useState(),[a,m]=l.default.useState(!1),[p,x]=l.default.useState(!0),[b,S]=l.default.useState(!1),[w,E]=l.default.useState(!1),q=t.selectedElements.indexOf(e)>=0,[_]=(0,d.useFontLoader)(t,e.fontFamily);(0,f.useFadeIn)(r);const F=`<div style="width: ${e.width||100}px; color: ${e.fill}; font-size: ${e.fontSize}px; font-family: '${e.fontFamily}'; text-align: ${e.align}; line-height: ${e.lineHeight}; letter-spacing: ${e.letterSpacing}; font-style: ${e.fontStyle}; font-weight: ${e.fontWeight}; -webkit-text-stroke: ${e.strokeWidth}px ${e.stroke}" contentEditable>${e.text}</div>`,{width:k,height:T}=v(F,e,_);l.default.useEffect(()=>{e.set({height:T})},[T]),l.default.useLayoutEffect(()=>{a||b||async function(){const t=await(0,c.htmlToCanvas)({html:F,width:e.width||1,height:T||1});o(t),x(!1)}()},[F,a,T,b]),l.default.useLayoutEffect(()=>u.autorun(()=>{const t=r.current;(0,s.applyFilter)(t,e)}),[n]);const M=a||p;return l.default.createElement(l.default.Fragment,null,l.default.createElement(i.Image,{ref:r,name:"element",image:n,x:e.x,y:e.y,rotation:e.rotation,width:e.width,height:e.height,text:e.text,visible:!M,stroke:e.stroke,strokeWidth:e.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:e.fontSize,fontFamily:e.fontFamily,fontStyle:e.fontStyle,textDecoration:e.textDecoration,align:e.align,draggable:!e.locked,opacity:b?0:e.opacity,shadowEnabled:e.shadowEnabled,shadowBlur:e.shadowBlur,onMouseEnter:()=>{E(!0)},onMouseLeave:()=>{E(!1)},onDragStart:()=>{t.history.startTransaction()},onDragMove:t=>{setTimeout(()=>{e.set({x:t.target.x(),y:t.target.y()})})},onDragEnd:r=>{e.set({x:r.target.x(),y:r.target.y()}),t.history.endTransaction()},id:e.id,onDblClick:()=>{e.locked||S(!0)},onDblTap:()=>{e.locked||S(!0)},onTransformStart:e=>{var t;const r=(null===(t=e.target.getStage())||void 0===t?void 0:t.findOne("Transformer")).getActiveAnchor();("middle-left"===r||"middle-right"===r)&&m(!0)},onTransform:t=>{var r;const n=(null===(r=t.target.getStage())||void 0===r?void 0:r.findOne("Transformer")).getActiveAnchor();if("middle-left"===n||"middle-right"===n){const r=t.target.scaleX(),n=Math.max(t.target.width()*r,e.fontSize);t.target.width(n),t.target.scaleX(1),e.set({width:n})}e.set({x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})},onTransformEnd:t=>{m(!1),x(!0);const r=t.target.scaleX();t.target.scaleX(1),t.target.scaleY(1),e.set({fontSize:e.fontSize*r,width:t.target.width()*r,x:t.target.x(),y:t.target.y(),rotation:t.target.rotation()})}}),M&&l.default.createElement(i.Group,{x:e.x,y:e.y,rotation:e.rotation},l.default.createElement(g.Html,{divProps:{style:{pointerEvents:"none"}}},l.default.createElement("div",{dangerouslySetInnerHTML:{__html:F},style:{pointerEvents:"none",display:"inline-block"}}))),b&&l.default.createElement(i.Group,{x:e.x,y:e.y,rotation:e.rotation},l.default.createElement(g.Html,null,l.default.createElement(y,{html:F,element:e,onChange:t=>{e.set({text:t})},onBlur:e=>{S(!1)}}))),(q||w)&&l.default.createElement(h.Highlighter,{element:e}))});
|
|
779
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","react-konva":"Sgug","quill/dist/quill":"qREC","mobx":"BzvP","./apply-filters":"SIWI","./text-element":"Fpgh","../utils/html2canvas":"vcNA","./use-fadein":"N3c2","./highlighter":"cEy1","react-konva-utils":"jXQU","../utils/styled":"PsiH"}],"IDY9":[function(require,module,exports) {
|
|
780
|
-
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.prototype.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useHtmlTextRender=exports.htmlRenderEnabled=void 0;const n=r(require("mobx"));function o(e){exports.htmlRenderEnabled.value=e}exports.htmlRenderEnabled=n.observable({value:!1}),exports.useHtmlTextRender=o;
|
|
781
|
-
},{"mobx":"BzvP"}],"XEPK":[function(require,module,exports) {
|
|
782
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.registerShapeComponent=void 0;const t=e(require("react")),r=require("mobx-react-lite"),n=require("./text-element"),l=require("./image-element"),o=require("./html-element"),i=require("../utils/flags"),m={text:n.TextElement,image:l.ImageElement,svg:l.ImageElement};function u(e,t){m[e]=t}exports.registerShapeComponent=u,exports.default=(0,r.observer)(e=>{let r=m[e.element.type];return"text"===e.element.type&&i.htmlRenderEnabled.value&&(r=o.HTMLElement),e.element.visible?r?t.default.createElement(r,Object.assign({},e)):(console.error("Can not find component for "+e.element.type),null):null});
|
|
783
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","./text-element":"Fpgh","./image-element":"VbEp","./html-element":"BLZX","../utils/flags":"IDY9"}],"RXmf":[function(require,module,exports) {
|
|
784
|
-
"use strict";var t=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClientRect=void 0;const e=t(require("konva"));function i(t,e,i,n,a){const o=Math.sqrt(i*i+n*n);return a+=Math.atan2(n,i),{x:t+o*Math.cos(a),y:e+o*Math.sin(a)}}function n(t){const{x:n,y:a,width:o,height:r}=t,h=e.default.Util.degToRad(t.rotation),x=i(n,a,0,0,h),s=i(n,a,o,0,h),u=i(n,a,o,r,h),y=i(n,a,0,r,h),c=Math.min(x.x,s.x,u.x,y.x),d=Math.min(x.y,s.y,u.y,y.y);return{x:c,y:d,width:Math.max(x.x,s.x,u.x,y.x)-c,height:Math.max(x.y,s.y,u.y,y.y)-d}}exports.getClientRect=n;
|
|
785
|
-
},{"konva":"aTGn"}],"F86d":[function(require,module,exports) {
|
|
786
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.useSnap=void 0;const t=e(require("react")),i=e(require("konva")),n=require("../utils/math");var a=5;function r(e){const t=e.__getNodeRect(),a=(0,n.getClientRect)(Object.assign(Object.assign({},t),{rotation:i.default.Util.radToDeg(t.rotation)})),r=e.getAbsolutePosition();return{vertical:[{guide:a.x,offset:r.x-a.x,snap:"start"},{guide:a.x+a.width/2,offset:r.x-a.x-a.width/2,snap:"center"},{guide:a.x+a.width,offset:r.x-a.x-a.width,snap:"end"}],horizontal:[{guide:a.y,offset:r.y-a.y,snap:"start"},{guide:a.y+a.height/2,offset:r.y-a.y-a.height/2,snap:"center"},{guide:a.y+a.height,offset:r.y-a.y-a.height,snap:"end"}]}}function o(e,t){var i=[],n=[];e.vertical.forEach(e=>{t.vertical.forEach(t=>{var n=Math.abs(e-t.guide);n<a&&i.push({lineGuide:e,diff:n,snap:t.snap,offset:t.offset})})}),e.horizontal.forEach(e=>{t.horizontal.forEach(t=>{var i=Math.abs(e-t.guide);i<a&&n.push({lineGuide:e,diff:i,snap:t.snap,offset:t.offset})})});var r=[],o=i.sort((e,t)=>e.diff-t.diff)[0],s=n.sort((e,t)=>e.diff-t.diff)[0];return o&&r.push(Object.assign({orientation:"V"},o)),s&&r.push(Object.assign(Object.assign({},s),{orientation:"H"})),r}function s(e){const n=e=>e.hasName("element")||e.hasName("page-background"),a=t=>{t.target.getLayer().find(".guid-line").forEach(e=>e.destroy());var a=o(function(t){var i;const a=null===(i=e.current)||void 0===i?void 0:i.getStage();var r=[],o=[];return a.find(n).forEach(e=>{if(!(t.indexOf(e)>=0)){var i=e.getClientRect({skipShadow:!0,skipStroke:!0});r.push(i.x,i.x+i.width,i.x+i.width/2),o.push(i.y,i.y+i.height,i.y+i.height/2)}}),{vertical:r,horizontal:o}}(t.target.nodes()),r(t.target));if(!a.length)return;!function(t){var n;const a=null===(n=e.current)||void 0===n?void 0:n.getLayer();t.forEach(e=>{if("H"===e.orientation){var t=new i.default.Line({points:[-6e3,e.lineGuide,6e3,e.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});a.add(t),a.batchDraw()}else"V"===e.orientation&&(t=new i.default.Line({points:[e.lineGuide,-6e3,e.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),a.add(t),a.batchDraw())})}(a);const s=t.target.getAbsolutePosition(),d=Object.assign({},s);a.forEach(e=>{switch(e.snap){case"start":case"center":case"end":switch(e.orientation){case"V":d.x=e.lineGuide+e.offset;break;case"H":d.y=e.lineGuide+e.offset}}});const f=d.x-s.x,u=d.y-s.y;t.evt.ctrlKey||t.evt.metaKey||t.target.nodes().forEach(e=>{const t=e.getAbsolutePosition();e.setAbsolutePosition({x:t.x+f,y:t.y+u})})},s=e=>{const t=e.target.getLayer();t.find(".guid-line").forEach(e=>e.destroy()),t.batchDraw()};t.default.useEffect(()=>{e.current&&(e.current.on("dragmove",a),e.current.on("dragend",s))})}exports.useSnap=s;
|
|
787
|
-
},{"react":"HdMw","konva":"aTGn","../utils/math":"RXmf"}],"hfHf":[function(require,module,exports) {
|
|
788
|
-
"use strict";function t(t,e,h="scale"){const i=e.width/e.height;let o,r;i>=t.width/t.height?(o=t.width,r=t.width/i):(o=t.height*i,r=t.height);let d=0,g=0;return"left-top"===h?(d=0,g=0):"left-middle"===h?(d=0,g=(t.height-r)/2):"left-bottom"===h?(d=0,g=t.height-r):"center-top"===h?(d=(t.width-o)/2,g=0):"center-middle"===h?(d=(t.width-o)/2,g=(t.height-r)/2):"center-bottom"===h?(d=(t.width-o)/2,g=t.height-r):"right-top"===h?(d=t.width-o,g=0):"right-middle"===h?(d=t.width-o,g=(t.height-r)/2):"right-bottom"===h?(d=t.width-o,g=t.height-r):"scale"===h?(d=0,g=0,o=t.width,r=t.height):console.error(new Error("Unknown clip position property - "+h)),{cropX:d,cropY:g,cropWidth:o,cropHeight:r}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCrop=void 0,exports.getCrop=t;
|
|
789
|
-
},{}],"FlVj":[function(require,module,exports) {
|
|
790
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.t=exports.getTranslations=exports.setTranslations=void 0;const e=require("mobx"),o=(0,e.observable)({toolbar:{opacity:"Opacity",effects:"Effects",blur:"Blur",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",removeClip:"Remove clip",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",saveAsHDPDF:"Save as High Quality PDF",selectable:"Selectable",alwaysOnTop:"Always on top",showInExport:"Show in export"},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",elements:"Elements",upload:"Upload",uploadImage:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",useMagicResize:"Use magic resize",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas"}});function t(e,o){var t,a=o.split("."),s=e;for(t=0;t<a.length;++t){if(null==s[a[t]])return;s=s[a[t]]}return s}const a=e=>e&&"object"==typeof e;function s(e,o){Object.keys(o).forEach(t=>{const n=e[t],r=o[t];a(r)&&a(n)?s(n,r):e[t]=r})}exports.setTranslations=(0,e.action)(e=>{s(o,e)});const n=()=>(0,e.toJS)(o);exports.getTranslations=n;const r={},l=e=>{const a=t(o,e);if(void 0!==a)return a;r[e]||(r[e]=!0,console.warn(`Missing translation '${e}'`));const s=e.split(".");return s[s.length-1]};exports.t=l;
|
|
791
|
-
},{"mobx":"BzvP"}],"Co9b":[function(require,module,exports) {
|
|
792
|
-
"use strict";var e=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.registerNextDomDrop=exports.registerTransformerAttrs=void 0;const n=t(require("react")),r=require("mobx-react-lite"),o=require("mobx"),l=require("react-konva"),i=require("@blueprintjs/core"),a=require("@blueprintjs/popover2"),s=t(require("use-image")),c=t(require("konva")),d=t(require("./element")),u=require("./use-transformer-snap"),g=require("./image-element"),m=require("../utils/crop"),f=require("../utils/l10n"),p={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,anchorStrokeWidth:2,borderStrokeWidth:2},h={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}};function v(e,t){h[e]=h[e]||t,Object.assign(h[e],t)}exports.registerTransformerAttrs=v;const b=e=>n.default.createElement(l.Rect,Object.assign({},e,{preventDefault:!1})),E=t=>{var{url:r}=t,o=e(t,["url"]);const[i,a]=(0,s.default)(r,"anonymous"),c=i?(0,m.getCrop)(i,{width:o.width,height:o.height},"center-middle"):{};return(0,g.useImageLoader)(a),n.default.createElement(l.Image,Object.assign({image:i},o,c))},w=e=>n.default.createElement(l.Rect,Object.assign({},e)),y=t=>{const{background:r,scale:o,borderColor:i}=t,a=e(t,["background","scale","borderColor"]),s=r.indexOf("http")>=0||r.indexOf(".png")>=0||r.indexOf(".jpg")>=0,c=1/o;return n.default.createElement(n.default.Fragment,null,n.default.createElement(l.Rect,{name:"page-highlight",x:-1.5*c,y:-1.5*c,width:t.width+3*c,height:t.height+3*c,stroke:i,strokeWidth:3,listening:!1,strokeScaleEnabled:!1}),s?n.default.createElement(E,Object.assign({url:r},a)):n.default.createElement(w,Object.assign({fill:r},a)))},x=(0,r.observer)(({selection:e})=>e.visible?n.default.createElement(l.Rect,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),k=(0,r.observer)(({elements:e,store:t})=>{const r=e.filter(e=>e.alwaysOnTop),o=e.filter(e=>!e.alwaysOnTop).concat(r);return n.default.createElement(n.default.Fragment,null,o.map(e=>n.default.createElement(d.default,{key:e.id,store:t,element:e,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let O=null;const P=e=>{O=e};exports.registerNextDomDrop=P,exports.default=(0,r.observer)(({store:e,page:t,xPadding:s,yPadding:d,width:g,height:m,pageControlsEnabled:v,backColor:E,pageBorderColor:w,activePageBorderColor:P})=>{const C=n.default.useRef(null),A=n.default.useRef(null),D=n.default.useRef(null),S=null==v||v,j=e.pages.length>1,T=e.pages.indexOf(t),I=e.selectedElements.find(e=>e._cropModeEnabled),q=e.selectedElements.filter(e=>e.locked).length>0,B=e.selectedElements.filter(e=>!e.visible).length>0;n.default.useEffect(()=>{var t,n;if(!C.current)return;const r=C.current.getStage(),o=e.selectedElements.map(e=>e._cropModeEnabled?null:r.findOne("#"+e.id)).filter(e=>e),l=1===e.selectedElements.length&&(null===(t=e.selectedElements[0])||void 0===t?void 0:t.type)||"many";q?(C.current.enabledAnchors([]),C.current.rotateEnabled(!1)):h[l]?(C.current.setAttrs(Object.assign(Object.assign({},p),h[l])),"svg"!==l||e.selectedElements[0].keepRatio||C.current.setAttrs({enabledAnchors:p.enabledAnchors})):C.current.setAttrs(p),C.current.nodes(o),null===(n=C.current.getLayer())||void 0===n||n.batchDraw()},[e.selectedElements,I,q,B]);const L=(0,r.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),M=n.default.useRef(!1),R=(0,o.action)(n=>{var r,o;M.current=!1,e.activePage!==t&&t.select();const l=n.target.findAncestor(".elements-container"),i=n.target.findAncestor("Transformer"),a=n.target.findAncestor(".page-abs-container");if(l||i||a)return;const s=null===(r=n.target.getStage())||void 0===r?void 0:r.getPointerPosition();s&&(L.visible=!0,L.x1=s.x,L.y1=s.y,L.x2=s.x,L.y2=s.y,(null===(o=n.target.getStage())||void 0===o?void 0:o.getPointersPositions().length)>=2&&(L.visible=!1))});n.default.useEffect(()=>{const t=(0,o.action)(e=>{var t,n;if(!L.visible)return;null===(t=A.current)||void 0===t||t.setPointersPositions(e);let r=(null===(n=A.current)||void 0===n?void 0:n.getPointerPosition())||{x:L.x2,y:L.y2};L.x2=r.x,L.y2=r.y}),n=(0,o.action)(()=>{if(!L.visible)return;if(!A.current)return;const t=A.current.findOne(".selection"),n=t?t.getClientRect():{width:0,height:0,x:0,y:0};if(n.width&&n.height){const t=[];A.current.find(".element").forEach(r=>{const o=r.getClientRect(),l=e.getElementById(r.id()),i=null==l?void 0:l.locked,a=null==l?void 0:l.selectable;c.default.Util.haveIntersection(n,o)&&!i&&a&&t.push(r.id())}),e.selectElements(t)}L.visible=!1,M.current=!0});return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n)}},[]);const _=t=>{if(M.current)return;const n=t.evt.ctrlKey||t.evt.metaKey||t.evt.shiftKey,r=t.target.findAncestor(".elements-container"),o=t.target.findAncestor(".page-abs-container"),l=t.target.findAncestor("Transformer");if(!(n||r||l||o))return void e.selectElements([]);const i=t.target.findAncestor(".element",!0),a=e.selectedElementsIds.indexOf(null==i?void 0:i.id())>=0;i&&n&&!a&&e.selectElements(e.selectedElementsIds.concat([i.id()])),i&&n&&a&&e.selectElements(e.selectedElementsIds.filter(e=>e!==i.id())),!i||n||a||e.selectElements([i.id()])};(0,u.useSnap)(C);const N=e.activePage===t;return n.default.createElement("div",{ref:D,onDragOver:e=>e.preventDefault(),onDrop:t=>{if(t.preventDefault(),!A.current)return;A.current.setPointersPositions(t);const n=A.current.findOne(".elements-container").getRelativePointerPosition(),r=A.current.getPointerPosition(),o=A.current.getIntersection(r),l=o&&o.findAncestor(".element",!0),i=l?e.getElementById(l.id()):void 0;O&&(O(n,i),O=null)},style:{position:"relative",width:g+"px"},className:"polotno-page-container"+(N?" active-page":"")},n.default.createElement(l.Stage,{ref:A,width:g,height:m,onClick:_,onTap:_,onMouseDown:R,onDragStart:t=>{var n;if(t.target.hasName("element")){const r=t.target.id();!(e.selectedElementsIds.indexOf(r)>=0)&&r&&(e.selectElements([r]),null===(n=C.current)||void 0===n||n.startDrag(t))}},pageId:t.id,style:{position:"relative"}},n.default.createElement(l.Layer,null,n.default.createElement(b,{width:g,height:m,fill:E}),n.default.createElement(l.Group,{x:s,y:d,scaleX:e.scale,scaleY:e.scale,name:"page-container"},n.default.createElement(y,{width:e.width,height:e.height,background:t.background,shadowBlur:10,shadowColor:"lightgrey",name:"page-background",preventDefault:!1,scale:e.scale,active:N&&e.pages.length>1,borderColor:N&&e.pages.length>1?P:w}),n.default.createElement(l.Group,{clipX:0,clipY:0,clipWidth:e.width,clipHeight:e.height,name:"elements-container"},n.default.createElement(k,{elements:t.children,store:e}))),n.default.createElement(l.Group,{x:s,y:d,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container"},n.default.createElement(l.Transformer,{ref:C,boundBoxFunc:(e,t)=>{const n=t.width<1||t.height<1,r=e.width<1||e.height<1;return n&&!r?e:t}})),n.default.createElement(x,{selection:L}),e._showCredit&&n.default.createElement(l.Text,{text:"Powered by polotno.dev",fontSize:14,fill:"rgba(0,0,0,0.6)",x:g-170,y:m-18,onMouseEnter:e=>{e.target.getStage().container().style.cursor="pointer"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onTouchStart:e=>{e.cancelBubble=!0},onMouseDown:e=>{e.cancelBubble=!0},onClick:()=>{window.open("https://polotno.dev")},onTap:()=>{window.open("https://polotno.dev")}}))),S&&N&&n.default.createElement("div",{style:{position:"absolute",top:d-40+"px",right:s+"px"}},j&&n.default.createElement(a.Tooltip2,{content:(0,f.t)("workspace.moveUp"),disabled:0===T},n.default.createElement(i.Button,{icon:"chevron-up",minimal:!0,disabled:0===T,onClick:()=>{t.setZIndex(T-1)}})),j&&n.default.createElement(a.Tooltip2,{content:(0,f.t)("workspace.moveDown"),disabled:T===e.pages.length-1},n.default.createElement(i.Button,{icon:"chevron-down",minimal:!0,disabled:T===e.pages.length-1,onClick:()=>{const n=e.pages.indexOf(t);t.setZIndex(n+1)}})),n.default.createElement(a.Tooltip2,{content:(0,f.t)("workspace.duplicatePage")},n.default.createElement(i.Button,{icon:"duplicate",minimal:!0,onClick:()=>{t.clone()}})),j&&n.default.createElement(a.Tooltip2,{content:(0,f.t)("workspace.removePage")},n.default.createElement(i.Button,{icon:"trash",minimal:!0,onClick:()=>{e.deletePages([t.id])}})),n.default.createElement(a.Tooltip2,{content:(0,f.t)("workspace.addPage")},n.default.createElement(i.Button,{icon:"insert",minimal:!0,onClick:()=>{const n=e.addPage(),r=e.pages.indexOf(t);n.setZIndex(r+1)}}))))});
|
|
793
|
-
},{"react":"HdMw","mobx-react-lite":"ZfSi","mobx":"BzvP","react-konva":"Sgug","@blueprintjs/core":"Ydrz","@blueprintjs/popover2":"mZnF","use-image":"MJM3","konva":"aTGn","./element":"XEPK","./use-transformer-snap":"F86d","./image-element":"VbEp","../utils/crop":"hfHf","../utils/l10n":"FlVj"}],"NI5R":[function(require,module,exports) {
|
|
829
|
+
},{"./classes":"e4eA","./errors":"gQJg","./contextMenu2":"mDEr","./popover2SharedProps":"r11X","./popover2":"r9m3","./resizeSensor2":"HAyF","./tooltip2":"d4OQ"}],"FlVj":[function(require,module,exports) {
|
|
830
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.t=exports.getTranslations=exports.setTranslations=void 0;const e=require("mobx"),o=(0,e.observable)({toolbar:{opacity:"Opacity",effects:"Effects",blur:"Blur",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",removeClip:"Remove clip",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",selectable:"Selectable",alwaysOnTop:"Always on top",showInExport:"Show in export"},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",elements:"Elements",upload:"Upload",uploadImage:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",useMagicResize:"Use magic resize",width:"Width",height:"Height",magicResizeDescription:"Magic resize will automatically resize and move all elements on the canvas",headerText:"Header",createHeader:"Create header",subHeaderText:"Sub Header",createSubHeader:"Create sub header",bodyText:"Body text",createBody:"Create body text"}});function t(e,o){var t,a=o.split("."),r=e;for(t=0;t<a.length;++t){if(null==r[a[t]])return;r=r[a[t]]}return r}const a=e=>e&&"object"==typeof e;function r(e,o){Object.keys(o).forEach(t=>{const n=e[t],s=o[t];a(s)&&a(n)?r(n,s):e[t]=s})}exports.setTranslations=(0,e.action)(e=>{r(o,e)});const n=()=>(0,e.toJS)(o);exports.getTranslations=n;const s={},i=e=>{const a=t(o,e);if(void 0!==a)return a;s[e]||(s[e]=!0,console.warn(`Missing translation '${e}'`));const r=e.split(".");return r[r.length-1]};exports.t=i;
|
|
831
|
+
},{"mobx":"BzvP"}],"smDv":[function(require,module,exports) {
|
|
832
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.PageControls=void 0;const t=e(require("react")),n=require("mobx-react-lite"),o=require("@blueprintjs/core"),a=require("@blueprintjs/popover2"),l=require("../utils/l10n");exports.PageControls=(0,n.observer)(({store:e,page:n,xPadding:i,yPadding:r})=>{const d=e.pages.length>1,c=e.pages.indexOf(n);return t.default.createElement("div",{style:{position:"absolute",top:r-40+"px",right:i+"px"}},d&&t.default.createElement(a.Tooltip2,{content:(0,l.t)("workspace.moveUp"),disabled:0===c},t.default.createElement(o.Button,{icon:"chevron-up",minimal:!0,disabled:0===c,onClick:()=>{n.setZIndex(c-1)}})),d&&t.default.createElement(a.Tooltip2,{content:(0,l.t)("workspace.moveDown"),disabled:c===e.pages.length-1},t.default.createElement(o.Button,{icon:"chevron-down",minimal:!0,disabled:c===e.pages.length-1,onClick:()=>{const t=e.pages.indexOf(n);n.setZIndex(t+1)}})),t.default.createElement(a.Tooltip2,{content:(0,l.t)("workspace.duplicatePage")},t.default.createElement(o.Button,{icon:"duplicate",minimal:!0,onClick:()=>{n.clone()}})),d&&t.default.createElement(a.Tooltip2,{content:(0,l.t)("workspace.removePage")},t.default.createElement(o.Button,{icon:"trash",minimal:!0,onClick:()=>{e.deletePages([n.id])}})),t.default.createElement(a.Tooltip2,{content:(0,l.t)("workspace.addPage")},t.default.createElement(o.Button,{icon:"insert",minimal:!0,onClick:()=>{var t;const o=e.addPage({bleed:(null===(t=e.activePage)||void 0===t?void 0:t.bleed)||0}),a=e.pages.indexOf(n);o.setZIndex(a+1)}})))});
|
|
833
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","@blueprintjs/core":"Ydrz","@blueprintjs/popover2":"mZnF","../utils/l10n":"FlVj"}],"Ic0q":[function(require,module,exports) {
|
|
834
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setAPI=exports.iconscoutDownload=exports.iconscoutList=exports.unsplashDownload=exports.unsplashList=exports.textTemplateList=exports.templateList=exports.removeBackground=exports.polotnoShapesList=exports.getGoogleFontImage=exports.getGoogleFontsListAPI=exports.URLS=exports.URL=exports.API=void 0;const e=require("./validate-key");exports.API="https://api.polotno.dev/api",exports.URL="https://api.polotno.dev";const o={},t=(e,t)=>{o[e]||(o[e]=!0,console.error(t))},s=(e,o,t)=>e.replace(new RegExp(o,"g"),t),p="API for iconscout is provided as a demonstration.\nFor production usage you have to use your own API endpoint.\nhttps://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement\nhttps://polotno.dev/docs/server-api";exports.URLS={unsplashList:({query:o,page:t=1})=>`${exports.API}/get-unsplash?query=${o}&per_page=20&page=${t}&KEY=${(0,e.getKey)()}`,unsplashDownload:o=>`${exports.API}/download-unsplash?id=${o}&KEY=${(0,e.getKey)()}`,iconscoutList:({query:o,page:s=1})=>(t("iconscout",p),`${exports.API}/get-iconscout?query=${o}&page=${s}&KEY=${(0,e.getKey)()}`),iconscoutDownload:o=>(t("iconscout",p),`${exports.API}/download-iconscout?uuid=${o}&KEY=${(0,e.getKey)()}`),templateList:({query:o,page:t=1,sizeQuery:s})=>`${exports.API}/get-templates?${s}&query=${o}&per_page=30&page=${t}&KEY=${(0,e.getKey)()}`};const r=()=>`${exports.API}/get-google-fonts?KEY=${(0,e.getKey)()}`;exports.getGoogleFontsListAPI=r;const n=e=>{return`${exports.URL}/google-fonts-previews/black/${o=e," ","-",o.replace(new RegExp(" ","g"),"-")}.png`;var o};exports.getGoogleFontImage=n;const a=()=>`${exports.API}/get-basic-shapes?KEY=${(0,e.getKey)()}`;exports.polotnoShapesList=a;const c=()=>`${exports.API}/remove-image-background?KEY=${(0,e.getKey)()}`;exports.removeBackground=c;const i=e=>exports.URLS.templateList(e);exports.templateList=i;const l=()=>`${exports.API}/get-text-templates?KEY=${(0,e.getKey)()}`;exports.textTemplateList=l;const x=e=>exports.URLS.unsplashList(e);exports.unsplashList=x;const g=e=>exports.URLS.unsplashDownload(e);exports.unsplashDownload=g;const u=e=>exports.URLS.iconscoutList(e);exports.iconscoutList=u;const d=e=>exports.URLS.iconscoutDownload(e);exports.iconscoutDownload=d;const L=(e,o)=>{exports.URLS[e]=o};exports.setAPI=L;
|
|
835
|
+
},{"./validate-key":"zree"}],"zree":[function(require,module,exports) {
|
|
836
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,o,t,n){void 0===n&&(n=t),Object.defineProperty(e,n,{enumerable:!0,get:function(){return o[t]}})}:function(e,o,t,n){void 0===n&&(n=t),e[n]=o[t]}),o=this&&this.__setModuleDefault||(Object.create?function(e,o){Object.defineProperty(e,"default",{enumerable:!0,value:o})}:function(e,o){e.default=o}),t=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&e(n,t,i);return o(n,t),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateKey=exports.isKeyPaid=exports.getKey=exports.shouldShowCredit=void 0;const n=t(require("mobx")),i=require("./api"),a=require("./flags");exports.shouldShowCredit=n.observable({value:!1});const r=n.action(()=>{exports.shouldShowCredit.value=!0});let s="";const l=()=>s||"";exports.getKey=l;const d=5,c=3e3,u="Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.dev/cabinet",p="Polotno API key is not valid. Please get new API key here: https://polotno.dev/cabinet",h="Can not validate Polotno API key. Please report to anton@polotno.dev immediately.",v="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.dev/",y=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${location.origin}" here: https://polotno.dev/cabinet`,f=navigator.userAgent.indexOf("HeadlessChrome")>=0;async function g(e){for(let o=0;o<5;o++)try{const o=await fetch(i.API+"/validate-key",{method:"POST",body:JSON.stringify({key:e,site:location.host+location.pathname})});if(!e)return console.warn(u),!1;if(200!==o.status){await new Promise(e=>setTimeout(e,3e3));continue}const t=await o.json();return t.is_valid||console.warn(p),t.is_paid||console.log(v,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),t.is_domain_valid||f||console.log(y,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,a.useRemoveBackground)(t.remove_background_enabled),t.is_paid||!1}catch(e){await new Promise(e=>setTimeout(e,3e3))}return console.error(h),!0}async function P(e,o){s=e,await g(e)&&!o||r()}exports.isKeyPaid=g,exports.validateKey=P;
|
|
837
|
+
},{"mobx":"BzvP","./api":"Ic0q","./flags":"IDY9"}],"Co9b":[function(require,module,exports) {
|
|
838
|
+
"use strict";var e=this&&this.__rest||function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n},t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.registerNextDomDrop=exports.registerTransformerAttrs=void 0;const n=t(require("react")),i=require("mobx-react-lite"),r=require("mobx"),l=require("react-konva"),o=t(require("use-image")),a=t(require("konva")),s=t(require("./element")),d=require("./use-transformer-snap"),c=require("./image-element"),m=require("../utils/crop"),u=require("./page-controls"),h=require("../utils/validate-key"),g=require("../utils/math"),f={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,anchorStrokeWidth:2,borderStrokeWidth:2},p={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}};function x(e,t){p[e]=p[e]||t,Object.assign(p[e],t)}exports.registerTransformerAttrs=x;const b=e=>n.default.createElement(l.Rect,Object.assign({},e,{preventDefault:!1})),y=t=>{var{url:i}=t,r=e(t,["url"]);const[a,s]=(0,o.default)(i,"anonymous"),d=a?(0,m.getCrop)(a,{width:r.width,height:r.height},"center-middle"):{};return(0,c.useImageLoader)(s),n.default.createElement(l.Image,Object.assign({image:a},r,d))},v=e=>n.default.createElement(l.Rect,Object.assign({},e)),E=t=>{const{background:i,scale:r,borderColor:l}=t,o=e(t,["background","scale","borderColor"]),a=i.indexOf("http")>=0||i.indexOf(".png")>=0||i.indexOf(".jpg")>=0;return n.default.createElement(n.default.Fragment,null,a?n.default.createElement(y,Object.assign({url:i},o)):n.default.createElement(v,Object.assign({fill:i},o)))},w=(0,i.observer)(({selection:e})=>e.visible?n.default.createElement(l.Rect,{name:"selection",x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x1-e.x2),height:Math.abs(e.y1-e.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),X=(0,i.observer)(({elements:e,store:t})=>{const i=e.filter(e=>e.alwaysOnTop),r=e.filter(e=>!e.alwaysOnTop).concat(i);return n.default.createElement(n.default.Fragment,null,r.map(e=>n.default.createElement(s.default,{key:e.id,store:t,element:e,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let Y=null;const k=e=>{Y=e};exports.registerNextDomDrop=k,exports.default=(0,i.observer)(({store:e,page:t,width:o,height:s,pageControlsEnabled:c,backColor:m,pageBorderColor:x,activePageBorderColor:y,components:v})=>{const k=e._bleedVisible?t.bleed:0,O=t.computedWidth+2*k,P=t.computedHeight+2*k,S=(o-O*e.scale)/2,A=(s-P*e.scale)/2,R=n.default.useRef(null),C=n.default.useRef(null),I=n.default.useRef(null),W=null==c||c,[j,D]=n.default.useState(null),L=e.selectedElements.find(e=>e._cropModeEnabled),M=e.selectedElements.filter(e=>e.locked).length>0,q=e.selectedElements.filter(e=>!e.visible).length>0;n.default.useEffect(()=>{var t,n;if(!R.current)return;const i=R.current.getStage(),r=e.selectedElements.map(e=>e._cropModeEnabled?null:i.findOne("#"+e.id)).filter(e=>e),l=1===e.selectedElements.length&&(null===(t=e.selectedElements[0])||void 0===t?void 0:t.type)||"many";M?(R.current.enabledAnchors([]),R.current.rotateEnabled(!1)):p[l]?(R.current.setAttrs(Object.assign(Object.assign({},f),p[l])),"svg"!==l||e.selectedElements[0].keepRatio||R.current.setAttrs({enabledAnchors:f.enabledAnchors})):R.current.setAttrs(f),R.current.nodes(r),null===(n=R.current.getLayer())||void 0===n||n.batchDraw()},[e.selectedElements,L,M,q]);const T=(0,i.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),_=n.default.useRef(!1),B=(0,r.action)(n=>{var i,r;_.current=!1,e.activePage!==t&&t.select();const l=n.target.findAncestor(".elements-container"),o=n.target.findAncestor("Transformer"),a=n.target.findAncestor(".page-abs-container");if(l||o||a)return;const s=null===(i=n.target.getStage())||void 0===i?void 0:i.getPointerPosition();s&&(T.visible=!0,T.x1=s.x,T.y1=s.y,T.x2=s.x,T.y2=s.y,(null===(r=n.target.getStage())||void 0===r?void 0:r.getPointersPositions().length)>=2&&(T.visible=!1))});n.default.useEffect(()=>{const t=(0,r.action)(e=>{var t,n;if(!T.visible)return;null===(t=C.current)||void 0===t||t.setPointersPositions(e);let i=(null===(n=C.current)||void 0===n?void 0:n.getPointerPosition())||{x:T.x2,y:T.y2};T.x2=i.x,T.y2=i.y}),n=(0,r.action)(()=>{if(!T.visible)return;if(!C.current)return;const t=C.current.findOne(".selection"),n=t?t.getClientRect():{width:0,height:0,x:0,y:0};if(n.width&&n.height){const t=[];C.current.find(".element").forEach(i=>{const r=i.getClientRect(),l=e.getElementById(i.id()),o=null==l?void 0:l.locked,s=null==l?void 0:l.selectable;a.default.Util.haveIntersection(n,r)&&!o&&s&&t.push(i.id())}),e.selectElements(t)}T.visible=!1,_.current=!0});return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n)}},[]);const H=t=>{if(_.current)return;const n=t.evt.ctrlKey||t.evt.metaKey||t.evt.shiftKey,i=t.target.findAncestor(".elements-container"),r=t.target.findAncestor(".page-abs-container"),l=t.target.findAncestor("Transformer");if(!(n||i||l||r))return void e.selectElements([]);const o=t.target.findAncestor(".element",!0),a=e.selectedElementsIds.indexOf(null==o?void 0:o.id())>=0;o&&n&&!a&&e.selectElements(e.selectedElementsIds.concat([o.id()])),o&&n&&a&&e.selectElements(e.selectedElementsIds.filter(e=>e!==o.id())),!o||n||a||e.selectElements([o.id()])};(0,d.useSnap)(R);const G=e.activePage===t,N=(null==v?void 0:v.PageControls)||u.PageControls;return n.default.createElement("div",{ref:I,onDragOver:e=>e.preventDefault(),onDrop:t=>{if(t.preventDefault(),!C.current)return;C.current.setPointersPositions(t);const n=C.current.findOne(".elements-container").getRelativePointerPosition(),i=C.current.getPointerPosition(),r=C.current.getIntersection(i),l=r&&r.findAncestor(".element",!0),o=l?e.getElementById(l.id()):void 0;Y&&(Y(n,o),Y=null)},style:{position:"relative",width:o+"px"},className:"polotno-page-container"+(G?" active-page":"")},n.default.createElement(l.Stage,{ref:C,width:o,height:s,onClick:H,onTap:H,onMouseDown:B,onMouseMove:n=>{if(!n.evt.altKey&&j)return void D(null);if(!n.evt.altKey)return;const i=n.target.findAncestor(".element",!0),r=null==i?void 0:i.id();if(!e.selectedElements[0])return;if(e.selectedElementsIds.includes(r))return;const l=(0,g.getClientRect)(e.selectedElements[0]),o=r?e.getElementById(r):{x:0,y:0,width:t.computedWidth,height:t.computedHeight,rotation:0},a=(0,g.getClientRect)(o),s=[];l.minX>a.maxX&&s.push({distance:l.minX-a.maxX,box1:l,box2:a,points:[{x:l.minX,y:l.minY+l.height/2},{x:a.maxX,y:l.minY+l.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),l.maxX<a.minX&&s.push({distance:a.minX-l.maxX,box1:l,box2:a,points:[{x:l.maxX,y:l.minY+l.height/2},{x:a.minX,y:l.minY+l.height/2},{x:a.minX,y:a.minY+a.height/2}]}),l.minY>a.maxY&&s.push({box1:l,box2:a,distance:l.minY-a.maxY,points:[{x:l.minX+l.width/2,y:l.minY},{x:l.minX+l.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]}),l.maxY<a.minY&&s.push({box1:l,box2:a,distance:a.minY-l.maxY,points:[{x:l.minX+l.width/2,y:l.maxY},{x:l.minX+l.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),l.minX>=a.minX&&l.maxX<=a.maxX&&l.minY>=a.minY&&l.maxY<=a.maxY&&(s.push({distance:l.minX-a.minX,box1:l,box2:a,points:[{x:l.minX,y:l.minY+l.height/2},{x:a.minX,y:l.minY+l.height/2},{x:a.minX,y:a.minY+a.height/2}]}),s.push({distance:a.maxX-l.maxX,box1:l,box2:a,points:[{x:l.maxX,y:l.minY+l.height/2},{x:a.maxX,y:l.minY+l.height/2},{x:a.maxX,y:a.minY+a.height/2}]}),s.push({box1:l,box2:a,distance:l.minY-a.minY,points:[{x:l.minX+l.width/2,y:l.minY},{x:l.minX+l.width/2,y:a.minY},{x:a.minX+a.width/2,y:a.minY}]}),s.push({box1:l,box2:a,distance:a.maxY-l.maxY,points:[{x:l.minX+l.width/2,y:l.maxY},{x:l.minX+l.width/2,y:a.maxY},{x:a.minX+a.width/2,y:a.maxY}]})),JSON.stringify(j)!==JSON.stringify(s)&&D(s)},onDragStart:t=>{var n;if(t.target.hasName("element")){const i=t.target.id();!(e.selectedElementsIds.indexOf(i)>=0)&&i&&(e.selectElements([i]),null===(n=R.current)||void 0===n||n.startDrag(t))}j&&D(null)},pageId:t.id,style:{position:"relative"}},n.default.createElement(l.Layer,null,n.default.createElement(b,{width:o,height:s,fill:m}),n.default.createElement(l.Group,{x:S,y:A,scaleX:e.scale,scaleY:e.scale,name:"page-container"},n.default.createElement(l.Rect,{name:"page-highlight",hideInExport:!0,x:-1.5/e.scale,y:-1.5/e.scale,width:O+3/e.scale,height:P+3/e.scale,stroke:G&&e.pages.length>1?y:x,strokeWidth:3,listening:!1,strokeScaleEnabled:!1}),n.default.createElement(l.Group,{name:"page-background-group",x:k,y:k,clipX:-k,clipY:-k,clipWidth:t.computedWidth+2*k,clipHeight:t.computedHeight+2*k},n.default.createElement(E,{x:-t.bleed,y:-t.bleed,width:t.computedWidth+2*t.bleed,height:t.computedHeight+2*t.bleed,background:t.background,shadowBlur:10,shadowColor:"lightgrey",name:"page-background",preventDefault:!1,scale:e.scale})),n.default.createElement(l.Group,{x:k,y:k,clipX:-k,clipY:-k,clipWidth:t.computedWidth+2*k,clipHeight:t.computedHeight+2*k,name:"elements-container"},n.default.createElement(l.Rect,{name:"elements-area",width:t.computedWidth,height:t.computedHeight,listening:!1}),n.default.createElement(X,{elements:t.children,store:e})),n.default.createElement(l.Rect,{stroke:"red",name:"bleed",strokeWidth:t.bleed,x:t.bleed/2,y:t.bleed/2,width:t.computedWidth+t.bleed,height:t.computedHeight+t.bleed,opacity:.1,listening:!1,visible:t.bleed>0&&e._bleedVisible,hideInExport:!0})),n.default.createElement(l.Group,{x:S,y:A,scaleX:e.scale,scaleY:e.scale,name:"page-abs-container"},n.default.createElement(l.Transformer,{ref:R,boundBoxFunc:(e,t)=>{const n=t.width<1||t.height<1,i=e.width<1||e.height<1;return n&&!i?e:t}}),j&&j.map(({points:t,distance:i,box1:r,box2:o},a)=>n.default.createElement(l.Group,{name:"distances-container",hideInExport:!0,key:a,listening:!1},n.default.createElement(l.Rect,Object.assign({},r,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(l.Rect,Object.assign({},o,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(l.Line,{points:[t[0].x,t[0].y,t[1].x,t[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(l.Line,{points:[t[1].x,t[1].y,t[2].x,t[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(l.Group,{x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2,scaleX:1/e.scale,scaleY:1/e.scale},n.default.createElement(l.Rect,{offsetX:25,offsetY:10,width:50,height:20,cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(l.Text,{offsetX:25,offsetY:10,width:50,height:20,align:"center",verticalAlign:"middle",fill:"white",text:Math.round(i).toString()+" px"}))))),n.default.createElement(w,{selection:T}),h.shouldShowCredit.value&&n.default.createElement(l.Text,{text:"Powered by polotno.dev",fontSize:14,fill:"rgba(0,0,0,0.6)",x:o-170,y:s-18,onMouseEnter:e=>{e.target.getStage().container().style.cursor="pointer"},onMouseLeave:e=>{e.target.getStage().container().style.cursor=""},onTouchStart:e=>{e.cancelBubble=!0},onMouseDown:e=>{e.cancelBubble=!0},onClick:()=>{window.open("https://polotno.dev")},onTap:()=>{window.open("https://polotno.dev")}}),n.default.createElement(l.Group,{name:"line-guides"}))),W&&G&&n.default.createElement(N,{store:e,page:t,xPadding:S,yPadding:A}))});
|
|
839
|
+
},{"react":"HdMw","mobx-react-lite":"ZfSi","mobx":"BzvP","react-konva":"Sgug","use-image":"MJM3","konva":"aTGn","./element":"XEPK","./use-transformer-snap":"F86d","./image-element":"VbEp","../utils/crop":"hfHf","./page-controls":"smDv","../utils/validate-key":"zree","../utils/math":"RXmf"}],"NI5R":[function(require,module,exports) {
|
|
794
840
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.handleHotkey=void 0;let e=[];function t(t,o){var l,d,n,r;if("INPUT"===(null===(l=document.activeElement)||void 0===l?void 0:l.tagName)||"TEXTAREA"===(null===(d=document.activeElement)||void 0===d?void 0:d.tagName)||"true"===(null===(n=document.activeElement)||void 0===n?void 0:n.contentEditable))return;46!==t.keyCode&&8!==t.keyCode||o.deleteElements(o.selectedElementsIds);const c=t.ctrlKey||t.metaKey,s=t.shiftKey;if(c&&"KeyZ"===t.code&&(t.preventDefault(),o.history.undo()),c&&s&&"KeyZ"===t.code&&(t.preventDefault(),o.history.redo()),c&&"KeyA"===t.code&&(t.preventDefault(),o.selectElements((null===(r=o.activePage)||void 0===r?void 0:r.children.map(e=>e.id))||[])),c&&"KeyC"===t.code&&(t.preventDefault(),e=o.selectedElements.map(e=>e.toJSON())),c&&"KeyX"===t.code&&(t.preventDefault(),e=o.selectedElements.map(e=>e.toJSON()),o.deleteElements(o.selectedElementsIds)),c&&"KeyV"===t.code){t.preventDefault();const l=o.width/20;o.history.transaction(()=>{e.forEach(e=>{var t;delete e.id,e.x+=l,e.y+=l,null===(t=o.activePage)||void 0===t||t.addElement(e)})}),o.history.redo()}"ArrowDown"===t.code&&(t.preventDefault(),o.selectedElements.forEach(e=>{e.set({y:e.y+1})})),"ArrowUp"===t.code&&(t.preventDefault(),o.selectedElements.forEach(e=>{e.set({y:e.y-1})})),"ArrowLeft"===t.code&&(t.preventDefault(),o.selectedElements.forEach(e=>{e.set({x:e.x-1})})),"ArrowRight"===t.code&&(t.preventDefault(),o.selectedElements.forEach(e=>{e.set({x:e.x+1})}))}exports.handleHotkey=t;
|
|
795
841
|
},{}],"twsc":[function(require,module,exports) {
|
|
796
|
-
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Workspace=void 0;const t=e(require("react")),r=require("mobx-react-lite"),o=e(require("./page")),
|
|
842
|
+
"use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Workspace=void 0;const t=e(require("react")),r=require("mobx-react-lite"),o=e(require("./page")),a=require("./hotkeys"),n=require("../utils/l10n"),l="Polotno warning: <Workspace /> component can not automatically detect its size.\nWidth or height of parent elements is equal 0.\nPlease make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.\nFor simpler debugging here is the log of the parent element:",s=(e,r,o,a,n)=>{const l=t.default.useRef({width:r,height:o}),s=t.default.useRef({top:0,left:0});t.default.useEffect(()=>{const t=e.current,r=()=>{s.current={top:t.scrollTop,left:t.scrollLeft}};return t.addEventListener("scroll",r),()=>{t.removeEventListener("scroll",r)}},[]),t.default.useLayoutEffect(()=>{if(!e.current)return;const t=e.current,a=(s.current.left+t.offsetWidth/2)/l.current.width,n=(s.current.top+t.offsetHeight/2)/l.current.height;t.scrollLeft=a*r-t.offsetWidth/2,t.scrollTop=n*o-t.offsetHeight/2,l.current={width:r,height:o}},[a,r,o])},c=(e,r,o)=>{const a=t.default.useRef(!1),n=t.default.useRef(null);t.default.useEffect(()=>{const t=e.current,r=()=>{a.current=!0,clearTimeout(n.current),n.current=setTimeout(()=>{a.current=!1},300)};return t.addEventListener("scroll",r),()=>{t.removeEventListener("scroll",r)}},[]);const l=o.pages.indexOf(o.activePage);t.default.useLayoutEffect(()=>{if(!o.activePage)return;if(!e.current)return;if(a.current)return;const t=e.current,n=o.pages.indexOf(o.activePage)*r;Math.abs(n-t.scrollTop)>.9*r&&(t.scrollTop=n)},[o.activePage,l])};exports.Workspace=(0,r.observer)(({store:e,pageControlsEnabled:r,backgroundColor:i,pageBorderColor:u,activePageBorderColor:d,components:f})=>{const[h,g]=t.default.useState({width:100,height:100}),p=t.default.useRef(h),m=t.default.useRef(null),w=t.default.useRef(null),v=e._bleedVisible?Math.max(0,...e.pages.map(e=>e.bleed)):0,b=Math.max(...e.pages.map(e=>e.computedWidth)),x=Math.max(...e.pages.map(e=>e.computedHeight)),E=b+2*v,k=x+2*v,y=()=>{if(null===m.current)return;const t=m.current.getBoundingClientRect();0!==t.width&&0!==t.height||(console.warn(l),console.log(m.current));const r=w.current.clientWidth||t.width,o={width:r,height:t.height};(p.current.width!==o.width||p.current.height!==o.height)&&(g(o),p.current=o);const a=(r-16)/E,n=(t.height-90)/k,s=Math.max(Math.min(a,n),.01);e.scaleToFit!==s&&(e.setScale(s),e._setScaleToFit(s))};t.default.useEffect(y,[E,k]),t.default.useEffect(()=>{const e=m.current;if(window.ResizeObserver){const t=new ResizeObserver(y);return t.observe(e),()=>t.unobserve(e)}{const e=setInterval(y,100);return()=>clearInterval(e)}},[E,k]);const P=Math.max(8,(h.width-E*e.scale)/2),M=k*e.scale*e.pages.length,C=Math.max(45,(h.height-M)/e.pages.length/2);t.default.useEffect(()=>{const t=t=>{(0,a.handleHotkey)(t,e)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),s(w,E*e.scale+2*P,k*e.scale+2*C,e.scale),c(w,k*e.scale+2*C,e);const T=h.width>=E*e.scale+2*P,L=i||"#e8e8e8",R=e.pages.indexOf(e.activePage);return t.default.createElement("div",{ref:m,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:L},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:w,onScroll:t=>{const r=t.currentTarget.childNodes[0].offsetHeight,o=t.currentTarget.scrollTop,a=Math.floor((o+h.height/2)/r),n=e.pages[a];n&&n.select()},style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:T?"hidden":"auto"},className:"polotno-workspace-inner"},e.pages.map((a,n)=>Math.abs(n-R)<=1||a._exporting?t.default.createElement(o.default,{key:a.id,page:a,xPadding:P,yPadding:C,width:E*e.scale+2*P,height:k*e.scale+2*C,store:e,pageControlsEnabled:r,backColor:L,pageBorderColor:u||"lightgrey",activePageBorderColor:d||"rgb(0, 161, 255)",components:f}):t.default.createElement("div",{key:a.id,style:{width:E*e.scale+2*P+"px",height:k*e.scale+2*C+"px"}})),0===e.pages.length&&t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,n.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{e.addPage()}},(0,n.t)("workspace.addPage")))))}),exports.default=exports.Workspace;
|
|
797
843
|
},{"react":"HdMw","mobx-react-lite":"ZfSi","./page":"Co9b","./hotkeys":"NI5R","../utils/l10n":"FlVj"}],"pk4v":[function(require,module,exports) {
|
|
798
844
|
var process = require("process");
|
|
799
|
-
var e=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDisposer=G,exports.addMiddleware=Ve,exports.applyAction=Pe,exports.applyPatch=m,exports.applySnapshot=_,exports.cast=q,exports.castFlowReturn=Zt,exports.castToReferenceSnapshot=Q,exports.castToSnapshot=K,exports.clone=L,exports.createActionTrackingMiddleware=de,exports.createActionTrackingMiddleware2=ve,exports.decorate=Ne,exports.destroy=$,exports.detach=U,exports.escapeJsonPath=rr,exports.flow=Jt,exports.getChildType=y,exports.getEnv=Y,exports.getIdentifier=R,exports.getLivelinessChecking=o,exports.getMembers=B,exports.getNodeId=X,exports.getParent=I,exports.getParentOfType=T,exports.getPath=E,exports.getPathParts=V,exports.getPropertyMembers=Z,exports.getRelativePath=H,exports.getRoot=C,exports.getRunningActionContext=Re,exports.getSnapshot=S,exports.getType=d,exports.hasParent=A,exports.hasParentOfType=x,exports.isActionContextChildOf=Fe,exports.isActionContextThisOrChildOf=Me,exports.isAlive=W,exports.isArrayType=Or,exports.isFrozenType=dn,exports.isIdentifierType=Cn,exports.isLateType=pn,exports.isLiteralType=Gr,exports.isMapType=yr,exports.isModelType=Er,exports.isOptionalType=nn,exports.isPrimitiveType=Ur,exports.isProtected=j,exports.isReferenceType=jn,exports.isRefinementType=Zr,exports.isRoot=N,exports.isStateTreeNode=nt,exports.isType=fe,exports.isUnionType=Qr,exports.isValidReference=F,exports.joinJsonPath=ir,exports.onAction=_e,exports.onPatch=v,exports.onSnapshot=g,exports.process=ht,exports.protect=P,exports.recordActions=je,exports.recordPatches=w,exports.resolveIdentifier=k,exports.resolvePath=D,exports.setLivelinessChecking=i,exports.setLivelynessChecking=a,exports.splitJsonPath=or,exports.toGenerator=qt,exports.toGeneratorFunction=Bt,exports.tryReference=z,exports.tryResolve=M,exports.typecheck=Be,exports.unescapeJsonPath=nr,exports.unprotect=O,exports.walk=J,exports.types=void 0;var t,r=require("mobx"),n="warn";function i(e){n=e}function o(){return n}function a(e){i(e)}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(t||(t={}));var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function p(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(u){i={error:u}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function d(e){return it(e,1),ot(e).type}function y(e,t){return it(e,1),ot(e).getChildType(t)}function v(e,t){return it(e,1),$t(t,2),ot(e).onPatch(t)}function g(e,t){return it(e,1),$t(t,2),ot(e).onSnapshot(t)}function m(e,t){it(e,1),Ut(t,function(e){return"object"==typeof e},"object or array",2),ot(e).applyPatches(jt(t))}function w(e,t){it(e,1);var r,n={patches:[],reversedInversePatches:[]},i={},o={get recording(){return!!r},get patches(){return i.patches||(i.patches=n.patches.slice()),i.patches},get reversedInversePatches(){return i.reversedInversePatches||(i.reversedInversePatches=n.reversedInversePatches.slice()),i.reversedInversePatches},get inversePatches(){return i.inversePatches||(i.inversePatches=n.reversedInversePatches.slice().reverse()),i.inversePatches},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=v(e,function(e,r){t&&!t(e,r,Re())||(n.patches.push(e),n.reversedInversePatches.unshift(r),i.patches=void 0,i.inversePatches=void 0,i.reversedInversePatches=void 0)}))},replay:function(t){m(t||e,n.patches)},undo:function(t){m(t||e,n.reversedInversePatches)}};return o.resume(),o}function P(e){it(e,1);var t=ot(e);if(!t.isRoot)throw mt("`protect` can only be invoked on root nodes");t.isProtectionEnabled=!0}function O(e){it(e,1);var t=ot(e);if(!t.isRoot)throw mt("`unprotect` can only be invoked on root nodes");t.isProtectionEnabled=!1}function j(e){return ot(e).isProtected}function _(e,t){return it(e,1),ot(e).applySnapshot(t)}function S(e,t){void 0===t&&(t=!0),it(e,1);var r=ot(e);return t?r.snapshot:xt(r.type.getSnapshot(r,!1))}function A(e,t){void 0===t&&(t=1),it(e,1),Wt(t,2,0);for(var r=ot(e).parent;r;){if(0==--t)return!0;r=r.parent}return!1}function I(e,t){void 0===t&&(t=1),it(e,1),Wt(t,2,0);for(var r=t,n=ot(e).parent;n;){if(0==--r)return n.storedValue;n=n.parent}throw mt("Failed to find the parent of "+ot(e)+" at depth "+t)}function x(e,t){it(e,1),be(t,2);for(var r=ot(e).parent;r;){if(t.is(r.storedValue))return!0;r=r.parent}return!1}function T(e,t){it(e,1),be(t,2);for(var r=ot(e).parent;r;){if(t.is(r.storedValue))return r.storedValue;r=r.parent}throw mt("Failed to find the parent of "+ot(e)+" of a given type")}function C(e){return it(e,1),ot(e).root.storedValue}function E(e){return it(e,1),ot(e).path}function V(e){return it(e,1),or(ot(e).path)}function N(e){return it(e,1),ot(e).isRoot}function D(e,t){it(e,1),Gt(t,2);var r=ct(ot(e),t);return r?r.value:void 0}function k(e,t,r){be(e,1),it(t,2),Nn(r,3);var n=ot(t).root.identifierCache.resolve(e,En(r));return n?n.value:void 0}function R(e){return it(e,1),ot(e).identifier}function z(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return;if(nt(r))return t?W(r)?r:void 0:r;throw mt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gn)return;throw n}}function F(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return!1;if(nt(r))return!t||W(r);throw mt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gn)return!1;throw n}}function M(e,t){it(e,1),Gt(t,2);var r=ct(ot(e),t,!1);if(void 0!==r)try{return r.value}catch(n){return}}function H(e,t){return it(e,1),it(t,2),st(ot(e),ot(t))}function L(e,t){void 0===t&&(t=!0),it(e,1);var r=ot(e);return r.type.create(r.snapshot,!0===t?r.root.environment:!1===t?void 0:t)}function U(e){return it(e,1),ot(e).detach(),e}function $(e){it(e,1);var t=ot(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function W(e){return it(e,1),ot(e).observableIsAlive}function G(e,t){return it(e,1),$t(t,2),ot(e).addDisposer(t),t}function Y(e){it(e,1);var t=ot(e).root.environment;return t||vt}function J(e,t){it(e,1),$t(t,2);var r=ot(e);r.getChildren().forEach(function(e){nt(e.storedValue)&&J(e.storedValue,t)}),t(r.storedValue)}function Z(e){var t;return Ut(t=nt(e)?d(e):e,function(e){return Er(e)},"model type or model instance",1),{name:t.name,properties:s({},t.properties)}}function B(e){var t=ot(e).type,n=s(s({},Z(t)),{actions:[],volatile:[],views:[]});return Object.getOwnPropertyNames(e).forEach(function(t){if(!(t in n.properties)){var i=Object.getOwnPropertyDescriptor(e,t);i.get?(0,r.isComputedProp)(e,t)?n.views.push(t):n.volatile.push(t):!0===i.value._isMSTAction?n.actions.push(t):(0,r.isObservableProp)(e,t)?n.volatile.push(t):n.views.push(t)}}),n}function q(e){return e}function K(e){return e}function Q(e){return e}function X(e){return it(e,1),ot(e).nodeId}var ee=function(){function e(e,t,r,n){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:Ke.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=n,this.baseSetParent(t,r)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var r=this.isAlive;this.aliveAtom&&t!==r&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new kt),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=(0,r.createAtom)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?rr(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Ke.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Ke.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=(0,r.createAtom)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(Lt()&&!this.isAlive)throw fail("assertion failed: cannot finalize the creation of a node that is already dead");if(this.state===Ke.CREATED){if(this.parent){if(this.parent.state!==Ke.FINALIZED)return;this.fireHook(t.afterAttach)}this.state=Ke.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Ke.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(t.beforeDestroy)}}),e}(),te=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;try{a.storedValue=t.createNewInstance(o)}catch(u){throw a.state=Ke.DEAD,u}return a.state=Ke.CREATED,a.finalizeCreation(),a}return l(t,e),Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw mt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.parent!==e,n=this.subpath!==t;if(r||n){if(Lt()){if(!t)throw mt("assertion failed: subpath expected");if(!e)throw mt("assertion failed: parent expected");if(r)throw mt("assertion failed: scalar nodes cannot change their parent")}this.environment=void 0,this.baseSetParent(this.parent,t)}}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return xt(this.getSnapshot())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ke.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),t}(ee);te.prototype.die=(0,r.action)(te.prototype.die);var re,ne,ie=1,oe={onError:function(e){throw e}},ae=function(e){function n(t,n,i,o,a){var u=e.call(this,t,n,i,o)||this;if(Object.defineProperty(u,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++ie}),Object.defineProperty(u,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(u,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(u,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(u,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),u._snapshotComputed=(0,r.computed)(function(){return xt(u.getSnapshot())}),u.unbox=u.unbox.bind(u),u._initialSnapshot=xt(a),u.identifierAttribute=t.identifierAttribute,n||(u.identifierCache=new Xe),u._childNodes=t.initializeChildNodes(u,u._initialSnapshot),u.identifier=null,u.unnormalizedIdentifier=null,u.identifierAttribute&&u._initialSnapshot){var l=u._initialSnapshot[u.identifierAttribute];if(void 0===l){var s=u._childNodes[u.identifierAttribute];s&&(l=s.value)}if("string"!=typeof l&&"number"!=typeof l)throw mt("Instance identifier '"+u.identifierAttribute+"' for type '"+u.type.name+"' must be a string or a number");u.identifier=En(l),u.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(u):u.identifierCache.addNodeToCache(u),u}return l(n,e),Object.defineProperty(n.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(n.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(){0===this._observableInstanceState&&this.createObservableInstance()}}),Object.defineProperty(n.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,r;if(Lt()&&this.state!==Ke.INITIALIZING)throw mt("assertion failed: the creation of the observable instance must be done on the initializing phase");this._observableInstanceState=1;for(var n=[],i=this.parent;i&&0===i._observableInstanceState;)n.unshift(i),i=i.parent;try{for(var o=f(n),a=o.next();!a.done;a=o.next()){a.value.createObservableInstanceIfNeeded()}}catch(l){e={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}var u=this.type;try{this.storedValue=u.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,u.finalizeNewInstance(this,this.storedValue)}catch(s){throw this.state=Ke.DEAD,s}finally{this._isRunningAction=!1}this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=vt,this.state=Ke.CREATED,this.fireHook(t.afterCreate),this.finalizeCreation()}}),Object.defineProperty(n.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(t.beforeDetach);var e=this.state;this.state=Ke.DETACHING;var r=this.root,n=r.environment,i=r.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=i}finally{this.state=e}}}}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){var n=e!==this.parent,i=r!==this.subpath;if(n||i){if(Lt()){if(!r)throw mt("assertion failed: subpath expected");if(!e)throw mt("assertion failed: new parent expected");if(this.parent&&n)throw mt("A node cannot exists twice in the state tree. Failed to add "+this+" to path '"+e.path+"/"+r+"'.");if(!this.parent&&e.root===this)throw mt("A state tree is not allowed to contain itself. Cannot assign "+this+" to path '"+e.path+"/"+r+"'");if(!this.parent&&this.environment&&this.environment!==e.root.environment)throw mt("A state tree cannot be made part of another state tree as long as their environments are different.")}n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,r),this.fireHook(t.afterAttach)):i&&this.baseSetParent(this.parent,r)}}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof n&&(r._allowStateChangesInsideComputed?(0,r._allowStateChangesInsideComputed)(function(){n.apply(t.storedValue)}):n.apply(this.storedValue))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(n.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,r=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,r),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(n.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(n.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=o();if(!this.isAlive&&"ignore"!==t){var r=this._getAssertAliveError(e);switch(t){case"error":throw mt(r);case"warn":Mt(r)}}}}),Object.defineProperty(n.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",r=e.subpath&&rr(e.subpath)||"",n=e.actionContext||Ie();n&&"action"!==n.type&&n.parentActionEvent&&(n=n.parentActionEvent);var i="";n&&null!=n.name&&(i=(n&&n.context&&E(n.context)||t)+"."+n.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+r+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(vt),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ft(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(n.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw mt("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(n.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation(function(){var r,n;try{for(var i=f(e.getChildren()),o=i.next();!o.done;o=i.next()){o.value.finalizeCreation()}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.fireInternalHook(t.afterCreationFinalization)})}}),Object.defineProperty(n.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw mt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(n.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=Ee(this.storedValue,"@APPLY_PATCHES",function(t){t.forEach(function(t){if(t.path){var r=or(t.path);pt(e,r.slice(0,-1)).applyPatchLocally(r[r.length-1],t)}else e.type.applySnapshot(e,t.value)})}),this._applySnapshot=Ee(this.storedValue,"@APPLY_SNAPSHOT",function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)}),Vt(this.storedValue,"$treenode",this),Vt(this.storedValue,"toJSON",ut)}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ke.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach(function(e){e.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(e){e.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(n.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(n.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(n.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var r=b(Qt(_t({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),n=r[0],i=r[1];this._internalEventsEmit("patch",n,i)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(n.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(n.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw mt("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(n.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw mt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(n.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(n.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;void 0===t&&(t=!0);var n={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(n):this.middlewares=[n],function(){r.removeMiddleware(n)}}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(n.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=(0,r.reaction)(function(){return e.snapshot},function(t){return e.emitSnapshot(t)},oe);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(n.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(n.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return void 0===r&&(r=!1),this._internalEvents||(this._internalEvents=new kt),this._internalEvents.register(e,t,r)}}),Object.defineProperty(n.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this._internalEvents&&(t=this._internalEvents).emit.apply(t,h([e],r))}}),Object.defineProperty(n.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(n.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),n}(ee);ae.prototype.createObservableInstance=(0,r.action)(ae.prototype.createObservableInstance),ae.prototype.detach=(0,r.action)(ae.prototype.detach),ae.prototype.die=(0,r.action)(ae.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(ne||(ne={}));var ue="cannotDetermine",le=Symbol("$type"),se=function(){function e(e){Object.defineProperty(this,re,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Ze(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw mt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(at(e)){var r=d(e);return this.isAssignableFrom(r)?Ge():Ye(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw mt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw mt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw mt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw mt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();re=le,se.prototype.create=(0,r.action)(se.prototype.create);var ce=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return l(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,r)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.identifierAttribute||e.identifier===En(t[e.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.isDetaching&&(e.snapshot===t||(!(!nt(t)||ot(t)!==e)||!(e.type!==this||!At(t)||nt(t)||!this.isMatchingSnapshotId(e,t))&&(e.applySnapshot(t),!0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.tryToReconcileNode(e,t))return e.setParent(r,n),e;if(e.die(),nt(t)&&this.isAssignableFrom(d(t))){var i=ot(t);return i.setParent(r,n),i}return this.instantiate(r,n,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(se);ce.prototype.create=(0,r.action)(ce.prototype.create);var pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(r,n,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(se);function fe(e){return"object"==typeof e&&e&&!0===e.isType}function be(e,t){Ut(e,fe,"mobx-state-tree type",t)}var he=new Map;function de(e){return function(t,r,n){switch(t.type){case"action":if(e.filter&&!0!==e.filter(t))return r(t);var i=e.onStart(t);e.onResume(t,i),he.set(t.id,{call:t,context:i,async:!1});try{var o=r(t);return e.onSuspend(t,i),!1===he.get(t.id).async&&(he.delete(t.id),e.onSuccess(t,i,o)),o}catch(u){throw he.delete(t.id),e.onFail(t,i,u),u}case"flow_spawn":return(a=he.get(t.rootId)).async=!0,r(t);case"flow_resume":case"flow_resume_error":var a=he.get(t.rootId);e.onResume(t,a.context);try{return r(t)}finally{e.onSuspend(t,a.context)}case"flow_throw":a=he.get(t.rootId);return he.delete(t.rootId),e.onFail(t,a.context,t.args[0]),r(t);case"flow_return":a=he.get(t.rootId);return he.delete(t.rootId),e.onSuccess(t,a.context,t.args[0]),r(t)}}}var ye=function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function ve(e){var t=new WeakMap;return function(r,n){var i=r.parentActionEvent?t.get(r.parentActionEvent):void 0;if("action"===r.type){var o=s(s({},r),{env:i&&i.call.env,parentCall:i&&i.call}),a=!e.filter||e.filter(o),u=new ye(a?e:void 0,o);t.set(r,u);var l=void 0;try{l=n(r)}catch(p){throw u.finish(p),p}return u.hasFlowsPending||u.finish(),l}if(!i)return n(r);switch(r.type){case"flow_spawn":return i.incFlowsPending(),n(r);case"flow_resume":case"flow_resume_error":return n(r);case"flow_throw":var c=r.args[0];try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish(c)}case"flow_return":try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish()}}}}function ge(e,t,r,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(It(n))return n;if(nt(n))return we("[MSTNode: "+d(n).name+"]");if("function"==typeof n)return we("[function]");if("object"==typeof n&&!St(n)&&!Ot(n))return we("[object "+(n&&n.constructor&&n.constructor.name||"Complex Object")+"]");try{return JSON.stringify(n),n}catch(i){return we(""+i)}}function me(e,t){return t&&"object"==typeof t&&"$MST_DATE"in t?new Date(t.$MST_DATE):t}function we(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function Pe(e,t){it(e,1),Ut(t,function(e){return"object"==typeof e},"object or array",2),(0,r.runInAction)(function(){jt(t).forEach(function(t){return Oe(e,t)})})}function Oe(e,t){var r=M(e,t.path||"");if(!r)throw mt("Invalid action path: "+(t.path||""));var n=ot(r);if("@APPLY_PATCHES"===t.name)return m.call(null,r,t.args[0]);if("@APPLY_SNAPSHOT"===t.name)return _.call(null,r,t.args[0]);if("function"!=typeof r[t.name])throw mt("Action '"+t.name+"' does not exist in '"+n.path+"'");return r[t.name].apply(r,t.args?t.args.map(function(e){return me(n,e)}):[])}function je(e,t){it(e,1);var r,n=[],i=function(e){(!t||t(e,Re()))&&n.push(e)},o={actions:n,get recording(){return!!r},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=_e(e,i))},replay:function(e){Pe(e,n)}};return o.resume(),o}function _e(e,t,r){return void 0===r&&(r=!1),it(e,1),Lt()&&(N(e)||Mt("Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree."),j(e)||Mt("Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action.")),Ve(e,function(n,i){if("action"===n.type&&n.id===n.rootId){var o=ot(n.context),a={name:n.name,path:st(ot(e),o),args:n.args.map(function(e,t){return ge(o,n.name,t,e)})};if(r){var u=i(n);return t(a),u}return t(a),i(n)}return i(n)})}var Se,Ae=1;function Ie(){return Se}function xe(){return Ae++}function Te(e,t){var r=ot(e.context);"action"===e.type&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=Se;Se=e;try{return ke(r,e,t)}finally{Se=i,r._isRunningAction=n}}function Ce(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Ee(e,t,r){var n=function(){var n=xe(),i=Se,o=Ce(i);return Te({type:"action",name:t,id:n,args:Rt(arguments),context:e,tree:C(e),rootId:i?i.rootId:n,parentId:i?i.id:0,allParentIds:i?h(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},r)};return n._isMSTAction=!0,n}function Ve(e,t,r){void 0===r&&(r=!0);var n=ot(e);return Lt()&&(n.isProtectionEnabled||Mt("It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`")),n.addMiddleWare(t,r)}function Ne(e,t,r){void 0===r&&(r=!0);var n={handler:e,includeHooks:r};return t.$mst_middleware=t.$mst_middleware||[],t.$mst_middleware.push(n),t}var De=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var r=e;r;)r.middlewares&&this.middlewares.push(r.middlewares),r=r.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function ke(e,n,i){var o=new De(e,i);if(o.isEmpty)return(0,r.action)(i).apply(null,n.args);var a=null;return function e(n){var u=o.getNextMiddleware(),l=u&&u.handler;if(!l)return(0,r.action)(i).apply(null,n.args);if(!u.includeHooks&&t[n.name])return e(n);var s=!1;var c=!1;if(l(n,function(t,r){s=!0,a=e(t),r&&(a=r(a))},function(e){c=!0,a=e}),Lt()){if(!s&&!c){var p=ot(n.tree);throw mt("Neither the next() nor the abort() callback within the middleware "+l.name+' for the action: "'+n.name+'" on the node: '+p.type.name+" was invoked.")}if(s&&c)throw p=ot(n.tree),mt("The next() and abort() callback within the middleware "+l.name+' for the action: "'+n.name+'" on the node: '+p.type.name+" were invoked.")}return a}(n)}function Re(){for(var e=Ie();e&&"action"!==e.type;)e=e.parentActionEvent;return e}function ze(e,t,r){for(var n="number"==typeof t?t:t.id,i=r?e:e.parentActionEvent;i;){if(i.id===n)return!0;i=i.parentActionEvent}return!1}function Fe(e,t){return ze(e,t,!1)}function Me(e,t){return ze(e,t,!0)}function He(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: "+t+">"}}function Le(e){return"function"==typeof e?"<function"+(e.name?" "+e.name:"")+">":nt(e)?"<"+e+">":"`"+He(e)+"`"}function Ue(e){return e.length<280?e:e.substring(0,272)+"......"+e.substring(e.length-8)}function $e(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(e){return e.path}).filter(function(e){return e.length>0}).join("/"),i=n.length>0?'at path "/'+n+'" ':"",o=nt(t)?"value of type "+ot(t).type.name+":":It(t)?"value":"snapshot",a=r&&nt(t)&&r.is(ot(t).snapshot);return""+i+o+" "+Le(t)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(e.message?" ("+e.message+")":"")+(r?Ur(r)||It(t)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function We(e,t,r){return e.concat([{path:t,type:r}])}function Ge(){return yt}function Ye(e,t,r){return[{context:e,value:t,message:r}]}function Je(e){return e.reduce(function(e,t){return e.concat(t)},[])}function Ze(e,t){Ht()&&Be(e,t)}function Be(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw mt(qe(e,t,r))}function qe(e,t,r){if(0!==r.length)return"Error while converting "+Ue(Le(t))+" to `"+e.name+"`:\n\n "+r.map($e).join("\n ")}var Ke,Qe=0,Xe=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Qe++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,r.observable.array([],gt));var i=this.cache.get(n);if(-1!==i.indexOf(e))throw mt("Already registered");i.push(e),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;(0,r.values)(e.identifierCache.cache).forEach(function(e){return e.forEach(function(e){t.addNodeToCache(e)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,r=this.cache.get(t);r&&(r.remove(e),r.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,i=new e,o=t.path;return(0,r.entries)(this.cache).forEach(function(e){for(var t=b(e,2),r=t[0],a=t[1],u=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(o)&&(i.addNodeToCache(a[l],!1),a.splice(l,1),u=!0);u&&n.updateLastCacheModificationPerId(r)}),i}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);return!!r&&r.some(function(t){return e.isAssignableFrom(t.type)})}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);if(!r)return null;var n=r.filter(function(t){return e.isAssignableFrom(t.type)});switch(n.length){case 0:return null;case 1:return n[0];default:throw mt("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+n.map(function(e){return e.path}).join(", "))}}}),e}();function et(e,t,r,n,i){var o=at(i);if(o){if(o.parent)throw mt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+r+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,r),o}return new ae(e,t,r,n,i)}function tt(e,t,r,n,i){return new te(e,t,r,n,i)}function rt(e){return e instanceof te||e instanceof ae}function nt(e){return!(!e||!e.$treenode)}function it(e,t){Ut(e,nt,"mobx-state-tree node",t)}function ot(e){if(!nt(e))throw mt("Value "+e+" is no MST Node");return e.$treenode}function at(e){return e&&e.$treenode||null}function ut(){return ot(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(Ke||(Ke={}));var lt=function(e){return".."};function st(e,t){if(e.root!==t.root)throw mt("Cannot calculate relative path: objects '"+e+"' and '"+t+"' are not part of the same object tree");for(var r=or(e.path),n=or(t.path),i=0;i<r.length&&r[i]===n[i];i++);return r.slice(i).map(lt).join("/")+ir(n.slice(i))}function ct(e,t,r){return void 0===r&&(r=!0),pt(e,or(t),r)}function pt(e,t,r){void 0===r&&(r=!0);for(var n=e,i=0;i<t.length;i++){var o=t[i];if(".."===o){if(n=n.parent)continue}else{if("."===o)continue;if(n){if(n instanceof te)try{var a=n.value;nt(a)&&(n=ot(a))}catch(u){if(!r)return;throw u}if(n instanceof ae)if(n.getChildType(o)&&(n=n.getChildNode(o)))continue}}if(r)throw mt("Could not resolve '"+o+"' in path '"+(ir(t.slice(0,i))||"/")+"' while resolving '"+ir(t)+"'");return}return n}function ft(e){if(!e)return yt;var t=Object.keys(e);if(!t.length)return yt;var r=new Array(t.length);return t.forEach(function(t,n){r[n]=e[t]}),r}var bt="See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. Note that the middleware event types starting with `process` now start with `flow`.";function ht(e){return Ft("process","`process()` has been renamed to `flow()`. "+bt),Jt(e)}var dt=Object.toString(),yt=Object.freeze([]),vt=Object.freeze({}),gt=(0,r._getGlobalState)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function mt(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function wt(e){return e}Object.freeze(gt);var Pt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Ot(e){return Array.isArray(e)||(0,r.isObservableArray)(e)}function jt(e){return e?Ot(e)?e:[e]:yt}function _t(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)e[o]=i[o]}return e}function St(e){var t;if(null===e||"object"!=typeof e)return!1;var r=Object.getPrototypeOf(e);return null==r||(null===(t=r.constructor)||void 0===t?void 0:t.toString())===dt}function At(e){return!(null===e||"object"!=typeof e||e instanceof Date||e instanceof RegExp)}function It(e,t){return void 0===t&&(t=!0),null==e||!!("string"==typeof e||"number"==typeof e||"boolean"==typeof e||t&&e instanceof Date)}function xt(e){return Lt()?It(e)||(0,r.isObservableArray)(e)?e:Object.freeze(e):e}function Tt(e){return Lt()?(xt(e),St(e)&&Object.keys(e).forEach(function(t){It(e[t])||Object.isFrozen(e[t])||Tt(e[t])}),e):e}function Ct(e){return"function"!=typeof e}function Et(e,t,n){(0,r.isObservableObject)(e)?(0,r.defineProperty)(e,t,n):Object.defineProperty(e,t,n)}function Vt(e,t,r){Et(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Nt(e,t,r){Et(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}var Dt=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){r.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.handlers.slice().forEach(function(t){return t.apply(void 0,h(e))})}}),e}(),kt=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){void 0===r&&(r=!1),this.eventHandlers||(this.eventHandlers={});var n=this.eventHandlers[e];return n||(n=this.eventHandlers[e]=new Dt),n.register(t,r)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];return!!r&&r.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];r&&r.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,h(r))}}),e}();function Rt(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function zt(e,t){return 0===e.indexOf(t)}var Ft=function(e,t){Lt()&&(Ft.ids&&!Ft.ids.hasOwnProperty(e)&&Mt("Deprecation warning: "+t),Ft.ids&&(Ft.ids[e]=!0))};function Mt(e){console.warn(new Error("[mobx-state-tree] "+e))}function Ht(){return Lt()||void 0!==e&&e.env&&!1}function Lt(){return!1}function Ut(e,t,r,n){if(Lt()&&!t(e))throw mt("expected "+r+" as argument "+jt(n).join(" or ")+", got "+e+" instead")}function $t(e,t){Ut(e,function(e){return"function"==typeof e},"function",t)}function Wt(e,t,r,n){Ut(e,function(e){return"number"==typeof e},"number",t),void 0!==r&&Ut(e,function(e){return e>=r},"number greater than "+r,t),void 0!==n&&Ut(e,function(e){return e<=n},"number lesser than "+n,t)}function Gt(e,t,r){void 0===r&&(r=!0),Ut(e,function(e){return"string"==typeof e},"string",t),r||Ut(e,function(e){return""!==e},"not empty string",t)}function Yt(e){"function"==typeof queueMicrotask?queueMicrotask(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,1)}function Jt(e){return Kt(e.name,e)}function Zt(e){return e}function Bt(e){return function(){var t,r=[];for(t=0;t<arguments.length;t++)r[t]=arguments[t];return p(this,function(t){switch(t.label){case 0:return[4,e.apply(void 0,h(r))];case 1:return[2,t.sent()]}})}}function qt(e){return p(this,function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()]}})}function Kt(e,t){var r=function(){var n=xe(),i=Ie();if(!i)throw mt("a mst flow must always have a parent context");var o=Ce(i);if(!o)throw mt("a mst flow must always have a parent action context");var a={name:e,id:n,tree:i.tree,context:i.context,parentId:i.id,allParentIds:h(i.allParentIds,[i.id]),rootId:i.rootId,parentEvent:i,parentActionEvent:o},u=arguments;function l(e,t,n){e.$mst_middleware=r.$mst_middleware,Te(s(s({},a),{type:t,args:[n]}),e)}return new Promise(function(e,n){var i,o=function(){i=t.apply(null,arguments),c(void 0)};function c(e){var t;try{l(function(e){t=i.next(e)},"flow_resume",e)}catch(r){return void Yt(function(){l(function(e){n(r)},"flow_throw",r)})}f(t)}function p(e){var t;try{l(function(e){t=i.throw(e)},"flow_resume_error",e)}catch(r){return void Yt(function(){l(function(e){n(r)},"flow_throw",r)})}f(t)}function f(t){if(!t.done){if(!t.value||"function"!=typeof t.value.then)throw mt("Only promises can be yielded to `async`, got: "+t);return t.value.then(c,p)}Yt(function(){l(function(t){e(t)},"flow_return",t.value)})}o.$mst_middleware=r.$mst_middleware,Te(s(s({},a),{type:"flow_spawn",args:Rt(u)}),o)})};return r}function Qt(e){if(!("oldValue"in e))throw mt("Patches without `oldValue` field cannot be inversed");return[Xt(e),er(e)]}function Xt(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function er(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function tr(e){return"number"==typeof e}function rr(e){return!0===tr(e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function nr(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ir(e){if(0===e.length)return"";var t=function(e){return e.map(rr).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function or(e){var t=e.split("/").map(nr);if(!(""===e||"."===e||".."===e||zt(e,"/")||zt(e,"./")||zt(e,"../")))throw mt("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}Ft.ids={};var ar=Symbol("$preProcessorFailed"),ur=function(e){function t(t,r,n){var i=e.call(this,n||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{return this.preProcessSnapshot(e)}catch(t){return ar}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;lr(e.type,this,"create","is","isMatchingSnapshotId");var r=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(r.call(e))},e.getReconciliationType=function(){return t}}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?n:this.preProcessSnapshot(n),o=this._subtype.instantiate(e,t,r,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this._subtype.reconcile(e,nt(t)?t:this.preProcessSnapshot(t),r,n);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var r=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(r):r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.preProcessSnapshotSafe(e);return r===ar?Ye(t,e,"Failed to preprocess value"):this._subtype.validate(r,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=fe(e)?this._subtype:nt(e)?S(e,!1):this.preProcessSnapshotSafe(e);return t!==ar&&0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(this._subtype instanceof ce))return!1;var r=this.preProcessSnapshot(t);return ce.prototype.isMatchingSnapshotId.call(this._subtype,e,r)}}),t}(se);function lr(e,t){for(var r,n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=f(i),u=a.next();!u.done;u=a.next()){var l=u.value;e[l]=t[l].bind(t)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}function sr(e,t,r){if(be(e,1),Lt()){if(t.postProcessor&&"function"!=typeof t.postProcessor)throw fail("postSnapshotProcessor must be a function");if(t.preProcessor&&"function"!=typeof t.preProcessor)throw fail("preSnapshotProcessor must be a function")}return new ur(e,t,r)}var cr,pr="Map.put can only be used to store complex values that have an identifier type attribute";function fr(e,t){var r,n,i=e.getSubTypes();if(i===ue)return!1;if(i){var o=jt(i);try{for(var a=f(o),u=a.next();!u.done;u=a.next()){if(!fr(u.value,t))return!1}}catch(l){r={error:l}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e instanceof xr&&t.push(e),!0}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(cr||(cr={}));var br=function(e){function t(t){return e.call(this,t,r.observable.ref.enhancer)||this}return l(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return e.prototype.set.call(this,""+t,r)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw mt("Map.put cannot be used to set empty values");if(nt(e)){var t=ot(e);if(Lt()&&!t.identifierAttribute)throw mt(pr);if(null===t.identifier)throw mt(pr);return this.set(t.identifier,e),e}if(At(e)){var r=ot(this),n=r.type;if(n.identifierMode!==cr.YES)throw mt(pr);var i=e[n.mapIdentifierAttribute];if(!Vn(i)){var o=this.put(n.getChildType().create(e,r.environment));return this.put(S(o))}var a=En(i);return this.set(a,e),this.get(a)}throw mt("Map.put can only be used to store complex values")}}),t}(r.ObservableMap),hr=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:cr.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=n,i}return l(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._determineIdentifierMode(),et(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===cr.UNKNOWN){var e=[];if(fr(this._subType,e)){var t=void 0;e.forEach(function(e){if(e.identifierAttribute){if(t&&t!==e.identifierAttribute)throw mt("The objects in a map should all have the same identifier attribute, expected '"+t+"', but child of type '"+e.name+"' declared attribute '"+e.identifierAttribute+"' as identifier");t=e.identifierAttribute}}),t?(this.identifierMode=cr.YES,this.mapIdentifierAttribute=t):this.identifierMode=cr.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type._subType,n={};return Object.keys(t).forEach(function(i){n[i]=r.instantiate(e,i,void 0,t[i])}),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new br(e)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,r._interceptReads)(t,e.unbox),e.type.hookInitializers.forEach(function(e){var r=e(t);Object.keys(r).forEach(function(e){var n=r[e],i=Ee(t,e,n);(Lt()?Nt:Vt)(t,e,i)})}),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"Map<string, "+this._subType.describe()+">"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return(0,r.values)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e.storedValue.get(""+t);if(!r)throw mt("Not a child "+t);return r}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object),r=e.name;t.assertWritable({subpath:r});var n=t.type,i=n._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(r))return null;Ze(i,o),e.newValue=i.reconcile(t.getChildNode(r),e.newValue,t,r),n.processIdentifier(r,e.newValue);break;case"add":Ze(i,e.newValue),e.newValue=i.instantiate(t,r,void 0,e.newValue),n.processIdentifier(r,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===cr.YES&&t instanceof ae){var r=t.identifier;if(r!==e)throw mt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+r+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach(function(e){t[e.subpath]=e.snapshot}),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].getSnapshot()}),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:rr(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:rr(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var r=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:rr(e.name),oldValue:r},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue;switch(r.op){case"add":case"replace":n.set(t,r.value);break;case"remove":n.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ze(this,t);var r=e.storedValue,n={};if(Array.from(r.keys()).forEach(function(e){n[e]=!1}),t)for(var i in t)r.set(i,t[i]),n[""+i]=!0;Object.keys(n).forEach(function(e){!1===n[e]&&r.delete(e)})}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return St(e)?Je(Object.keys(e).map(function(n){return r._subType.validate(e[n],We(t,n,r._subType))})):Ye(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vt}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(ce);function dr(e){return new hr("map<string, "+e.name+">",e)}function yr(e){return fe(e)&&(e.flags&ne.Map)>0}hr.prototype.applySnapshot=(0,r.action)(hr.prototype.applySnapshot);var vr=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=n,i}return l(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return et(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var r=e.type._subType,n={};return t.forEach(function(t,i){var o=""+i;n[o]=r.instantiate(e,o,void 0,t)}),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return r.observable.array(ft(e),gt)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,r._getAdministration)(t).dehancer=e.unbox,e.type.hookInitializers.forEach(function(e){var r=e(t);Object.keys(r).forEach(function(e){var n=r[e],i=Ee(t,e,n);(Lt()?Nt:Vt)(t,e,i)})}),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType.describe()+"[]"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=Number(t);if(r<e.storedValue.length)return e.storedValue[r];throw mt("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);t.assertWritable({subpath:""+e.index});var r=t.type._subType,n=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=mr(t,r,[n[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,u=e.added,l=mr(t,r,n.slice(o,o+a),u,u.map(function(e,t){return o+t}));if(!l)return null;e.added=l;for(var s=o+a;s<n.length;s++)n[s].setParent(t,""+(s+u.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map(function(e){return e.snapshot})}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach(function(r){t.push(e[r].getSnapshot())}),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var r=e.removedCount-1;r>=0;r--)t.emitPatch({op:"remove",path:""+(e.index+r),oldValue:e.removed[r].snapshot},t);for(r=0;r<e.addedCount;r++)t.emitPatch({op:"add",path:""+(e.index+r),value:t.getChildNode(""+(e.index+r)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue,i="-"===t?n.length:Number(t);switch(r.op){case"replace":n[i]=r.value;break;case"add":n.splice(i,0,r.value);break;case"remove":n.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ze(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return Ot(e)?Je(e.map(function(e,n){return r._subType.validate(e,We(t,""+n,r._subType))})):Ye(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return yt}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(ce);function gr(e){return be(e,1),new vr(e.name+"[]",e)}function mr(e,t,r,n,i){for(var o=!0,a=0;;a++){var u=a<=n.length-1,l=r[a],s=u?n[a]:void 0,c=""+i[a];if(rt(s)&&(s=s.storedValue),!l&&!u)break;if(u)if(l)if(Pr(l,s))r[a]=wr(t,e,c,s,l);else{for(var p=void 0,f=a;f<r.length;f++)if(Pr(r[f],s)){p=r.splice(f,1)[0];break}o=!1;b=wr(t,e,c,s,p);r.splice(a,0,b)}else{if(nt(s)&&ot(s).parent===e)throw mt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+c+"', but it lives already at '"+ot(s).path+"'");o=!1;var b=wr(t,e,c,s);r.splice(a,0,b)}else o=!1,r.splice(a,1),l instanceof ae&&l.createObservableInstanceIfNeeded(),l.die(),a--}return o?null:r}function wr(e,t,r,n,i){Ze(e,n);var o=function(){if(nt(n)){var o=ot(n);if(o.assertAlive(vt),null!==o.parent&&o.parent===t)return o.setParent(t,r),o}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}();return i&&i!==o&&(i instanceof ae&&i.createObservableInstanceIfNeeded(),i.die()),o}function Pr(e,t){if(!e.isAlive)return!1;if(nt(t)){var r=ot(t);return r.isAlive&&r===e}return e.snapshot===t||e instanceof ae&&null!==e.identifier&&e.identifierAttribute&&St(t)&&e.type.is(t)&&e.type.isMatchingSnapshotId(e,t)}function Or(e){return fe(e)&&(e.flags&ne.Array)>0}vr.prototype.applySnapshot=(0,r.action)(vr.prototype.applySnapshot);var jr="preProcessSnapshot",_r="postProcessSnapshot";function Sr(){return ot(this).toString()}var Ar={name:"AnonymousModel",properties:{},initializers:yt};function Ir(e){return Object.keys(e).reduce(function(e,r){var n,i,o;if(r in t)throw mt("Hook '"+r+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,r);if("get"in a)throw mt("Getters are not supported as properties. Please use views instead");var u=a.value;if(null==u)throw mt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(It(u))return Object.assign({},e,((n={})[r]=tn(Lr(u),u),n));if(u instanceof hr)return Object.assign({},e,((i={})[r]=tn(u,{}),i));if(u instanceof vr)return Object.assign({},e,((o={})[r]=tn(u,[]),o));if(fe(u))return e;throw Lt()&&"function"==typeof u?mt("Invalid type definition for property '"+r+"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?"):Lt()&&"object"==typeof u?mt("Invalid type definition for property '"+r+"', it looks like you passed an object. Try passing another model type or a types.frozen."):mt("Invalid type definition for property '"+r+"', cannot infer a type from a value like '"+u+"' ("+typeof u+")")},e)}var xr=function(e){function n(t){var r=e.call(this,t.name||Ar.name)||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Object}),Object.defineProperty(r,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.cloneAndEnhance({name:e})}}),Object.defineProperty(r,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.cloneAndEnhance({properties:e})}}),Object.defineProperty(r,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.preProcessor;return t?r.cloneAndEnhance({preProcessor:function(r){return t(e(r))}}):r.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(r,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.postProcessor;return t?r.cloneAndEnhance({postProcessor:function(r){return e(t(r))}}):r.cloneAndEnhance({postProcessor:e})}}),Object.assign(r,Ar,t),r.properties=Ir(r.properties),xt(r.properties),r.propertyNames=Object.keys(r.properties),r.identifierAttribute=r._getIdentifierAttribute(),r}return l(n,e),Object.defineProperty(n.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps(function(t,r){if(r.flags&ne.Identifier){if(e)throw mt("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}}),e}}),Object.defineProperty(n.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new n({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(n.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateActions(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){if(!St(r))throw mt("actions initializer should return a plain object containing actions");Object.keys(r).forEach(function(n){if(n===jr)throw mt("Cannot define action '"+jr+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(n===_r)throw mt("Cannot define action '"+_r+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var i=r[n],o=e[n];if(n in t&&o){var a=i;i=function(){o.apply(null,arguments),a.apply(null,arguments)}}var u=i.$mst_middleware,l=i.bind(r);l.$mst_middleware=u;var s=Ee(e,n,l);r[n]=s,(Lt()?Nt:Vt)(e,n,s)})}}),Object.defineProperty(n.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!=typeof e)throw mt("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(r){return t.instantiateVolatileState(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!St(t))throw mt("volatile state initializer should return a plain object containing state");(0,r.set)(e,t)}}),Object.defineProperty(n.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){var n=e(r),i=n.actions,o=n.views,a=n.state,u=c(n,["actions","views","state"]);for(var l in u)throw mt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+l+"'");return a&&t.instantiateVolatileState(r,a),o&&t.instantiateViews(r,o),i&&t.instantiateActions(r,i),r}]})}}),Object.defineProperty(n.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateViews(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!St(t))throw mt("views initializer should return a plain object containing views");Object.keys(t).forEach(function(n){var i,o=Object.getOwnPropertyDescriptor(t,n);if("get"in o)(0,r.defineProperty)(e,n,o),(0,r.makeObservable)(e,((i={})[n]=r.computed,i));else{if("function"!=typeof o.value)throw mt("A view member should either be a function or getter based property");(Lt()?Nt:Vt)(e,n,o.value)}})}}),Object.defineProperty(n.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return et(this,e,t,r,nt(n)?n:this.applySnapshotPreProcessor(n))}}),Object.defineProperty(n.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type,n={};return r.forAllProps(function(r,i){n[r]=i.instantiate(e,r,void 0,t[r])}),n}}),Object.defineProperty(n.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return r.observable.object(e,vt,gt)}}),Object.defineProperty(n.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Vt(t,"toString",Sr),this.forAllProps(function(n){(0,r._interceptReads)(t,n,e.unbox)}),this.initializers.reduce(function(e,t){return t(e)},t),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(n.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=ot(t.object),n=t.name;r.assertWritable({subpath:n});var i=r.type.properties[n];return i&&(Ze(i,t.newValue),t.newValue=i.reconcile(r.getChildNode(n),t.newValue,r,n)),t}}),Object.defineProperty(n.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=ot(t.object);if(r.type.properties[t.name]){var n=t.oldValue?t.oldValue.snapshot:void 0;r.emitPatch({op:"replace",path:rr(t.name),value:t.newValue.snapshot,oldValue:n},r)}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,r=[];return this.forAllProps(function(n){r.push(t.getChildNode(e,n))}),r}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(t in this.properties))throw mt("Not a value property: "+t);var n=(0,r._getAdministration)(e.storedValue,t).raw();if(!n)throw mt("Node not available for property "+t);return n}}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var i={};return this.forAllProps(function(t,o){(0,r.getAtom)(e.storedValue,t).reportObserved(),i[t]=n.getChildNode(e,t).snapshot}),t?this.applySnapshotPostProcessor(i):i}}),Object.defineProperty(n.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].getSnapshot()}),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){if("replace"!==r.op&&"add"!==r.op)throw mt("object does not support operation "+r.op);e.storedValue[t]=r.value}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.applySnapshotPreProcessor(t);Ze(this,r),this.forAllProps(function(t){e.storedValue[t]=r[t]})}}),Object.defineProperty(n.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(n.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Gt(e,1),this.properties[e]}}),Object.defineProperty(n.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this,n=this.applySnapshotPreProcessor(e);return St(n)?Je(this.propertyNames.map(function(e){return r.properties[e].validate(n[e],We(t,e,r.properties[e]))})):Ye(t,n,"Value is not a plain object")}}),Object.defineProperty(n.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach(function(r){return e(r,t.properties[r])})}}),Object.defineProperty(n.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map(function(t){return t+": "+e.properties[t].describe()}).join("; ")+" }"}}),Object.defineProperty(n.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vt}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),n}(ce);function Tr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():"AnonymousModel",n=e.shift()||{};return new xr({name:r,properties:n})}function Cr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0],n=r?e[0]:"AnonymousModel";return r&&e.shift(),Lt()&&e.forEach(function(e,t){Ut(e,Er,"mobx-state-tree model type",r?t+2:t+1)}),e.reduce(function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(r){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(r))},postProcessor:function(r){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(r))}})}).named(n)}function Er(e){return fe(e)&&(e.flags&ne.Object)>0}xr.prototype.applySnapshot=(0,r.action)(xr.prototype.applySnapshot);var Vr=function(e){function t(t,r,n,i){void 0===i&&(i=wt);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=r,o}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return It(e)&&this.checker(e)?Ge():Ye(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(pe),Nr=new Vr("string",ne.String,function(e){return"string"==typeof e}),Dr=new Vr("number",ne.Number,function(e){return"number"==typeof e}),kr=new Vr("integer",ne.Integer,function(e){return Pt(e)}),Rr=new Vr("boolean",ne.Boolean,function(e){return"boolean"==typeof e}),zr=new Vr("null",ne.Null,function(e){return null===e}),Fr=new Vr("undefined",ne.Undefined,function(e){return void 0===e}),Mr=new Vr("Date",ne.Date,function(e){return"number"==typeof e||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});Mr.getSnapshot=function(e){return e.storedValue.getTime()};var Hr=Mr;function Lr(e){switch(typeof e){case"string":return Nr;case"number":return Dr;case"boolean":return Rr;case"object":if(e instanceof Date)return Hr}throw mt("Cannot determine primitive type from value "+e)}function Ur(e){return fe(e)&&(e.flags&(ne.String|ne.Number|ne.Integer|ne.Boolean|ne.Date))>0}var $r=function(e){function t(t){var r=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(r,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Literal}),r.value=t,r}return l(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return It(e)&&e===this.value?Ge():Ye(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(pe);function Wr(e){return Ut(e,It,"primitive",1),new $r(e)}function Gr(e){return fe(e)&&(e.flags&ne.Literal)>0}var Yr=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this._subtype.validate(e,t);if(r.length>0)return r;var n=nt(e)?ot(e).snapshot:e;return this._predicate(n)?Ge():Ye(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(se);function Jr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():fe(e[0])?e[0].name:null,n=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return be(n,[1,2]),Gt(r,1),$t(i,[2,3]),$t(o,[3,4]),new Yr(r,n,i,o)}function Zr(e){return(e.flags&ne.Refinement)>0}function Br(e,t){var r="string"==typeof e?t:e;Lt()&&r.forEach(function(e,t){Gt(e,t+1)});var n=Kr.apply(void 0,h(r.map(function(e){return Wr(""+e)})));return"string"==typeof e&&(n.name=e),n}var qr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),n=s({eager:!0,dispatcher:void 0},n),i._dispatcher=n.dispatcher,n.eager||(i._eager=!1),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=ne.Union;return this._types.forEach(function(t){e|=t.flags}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some(function(t){return t.isAssignableFrom(e)})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(e){return e.describe()}).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(n,void 0);if(!i)throw mt("No matching type for union "+this.describe());return i.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(t,e.getReconciliationType());if(!i)throw mt("No matching type for union "+this.describe());return i.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter(function(e){return e!==t}).find(function(t){return t.is(e)}):this._types.find(function(t){return t.is(e)})}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var r=[],n=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return Ge();n++}else r.push(o)}return 1===n?Ge():Ye(t,e,"No type is applicable for the union").concat(Je(r))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(se);function Kr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=fe(e)?void 0:e,i=fe(e)?h([e],t):t,o="("+i.map(function(e){return e.name}).join(" | ")+")";return Lt()&&(n&&Ut(n,function(e){return St(e)},"object { eager?: boolean, dispatcher?: Function }",1),i.forEach(function(e,t){be(e,n?t+2:t+1)})),new qr(o,i,n)}function Qr(e){return(e.flags&ne.Union)>0}var Xr=function(e){function t(t,r,n){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.optionalValues.indexOf(n)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,r,i)}return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),r,n)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&Ze(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?Ge():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(se);function en(e,t){if("function"!=typeof t&&nt(t))throw mt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");be(e,1),Lt()&&"function"!=typeof t&&Ze(e,t)}function tn(e,t,r){return en(e,t),new Xr(e,t,r||rn)}var rn=[void 0];function nn(e){return fe(e)&&(e.flags&ne.Optional)>0}var on=tn(Fr,void 0),an=tn(zr,null);function un(e){return be(e,1),Kr(e,on)}function ln(e){return be(e,1),Kr(e,an)}var sn=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|ne.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(r){if(!(r instanceof ReferenceError))throw r;t=void 0}if(e&&void 0===t)throw mt("Late type seems to be used too early, the definition (still) returns undefined");if(t){if(Lt()&&!fe(t))throw mt("Failed to determine subtype, make sure types.late returns a type definition.");this._subType=t}}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.getSubType(!1);return r?r.validate(e,t):Ge()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e||ue}}),t}(se);function cn(e,t){var r="string"==typeof e?e:"late("+e.toString()+")",n="string"==typeof e?t:e;if(Lt()&&("function"!=typeof n||0!==n.length))throw mt("Invalid late type, expected a function with zero arguments that returns a type, got: "+n);return new sn(r,n)}function pn(e){return fe(e)&&(e.flags&ne.Late)>0}var fn=function(e){function t(t){var r=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(r,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Frozen}),r}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,Tt(n))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Ct(e)?this.subType?this.subType.validate(e,t):Ge():Ye(t,e,"Value is not serializable and cannot be frozen")}}),t}(pe),bn=new fn;function hn(e){return 0===arguments.length?bn:fe(e)?new fn(e):tn(bn,e)}function dn(e){return fe(e)&&(e.flags&ne.Frozen)>0}function yn(e){switch(e){case t.beforeDestroy:return"destroy";case t.beforeDetach:return"detach";default:return}}var vn=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Vn(e))this.identifier=e;else{if(!nt(e))throw mt("Can only store references to tree nodes or identifiers, got: '"+e+"'");var r=ot(e);if(!r.identifierAttribute)throw mt("Can only store references with a defined identifier attribute.");var n=r.unnormalizedIdentifier;if(null==n)throw mt("Can only store references to tree nodes with a defined identifier.");this.identifier=n}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=En(this.identifier),r=e.root,n=r.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==n){var i=this.targetType,o=r.identifierCache.resolve(i,t);if(!o)throw new gn("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:n}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),gn=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return l(t,e),t}(Error),mn=function(e){function r(t,r){var n=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(n,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Reference}),n}return l(r,e),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Vn(e)?Ge():Ye(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(r.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:n?n.storedValue:void 0,invalidId:r,replaceRef:function(e){m(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Er(i.type)?this.replaceRef(void 0):m(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(r.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){var n=this,i=this.getValue(e);if(i){var o=ot(i),a=function(t,i){var a=yn(i);a&&n.fireInvalidated(a,e,r,o)},u=o.registerHook(t.beforeDetach,a),l=o.registerHook(t.beforeDestroy,a);return function(){u(),l()}}}}),Object.defineProperty(r.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,n){var i=this;if(this.onInvalidated){var o;e.registerHook(t.beforeDestroy,function(){o&&o()});var a=function(t){o&&o();var a=e.parent,u=a&&a.storedValue;if(a&&a.isAlive&&u){(n?!!n.get(r,u):e.root.identifierCache.has(i.targetType,En(r)))?o=i.addTargetNodeWatcher(e,r):t||i.fireInvalidated("invalidSnapshotReference",e,r,null)}};e.state===Ke.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(t.afterCreationFinalization,function(){e.parent&&e.parent.createObservableInstanceIfNeeded()}),e.registerHook(t.afterAttach,function(){a(!1)}))}}}),r}(pe),wn=function(e){function t(t,r){return e.call(this,t,r)||this}return l(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?R(n):n,o=new vn(n,this.targetType),a=tt(this,e,t,r,o);return o.node=a,this.watchTargetNodeForInvalidations(a,i,void 0),a}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this){var i=nt(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(r,n),e}var a=this.instantiate(r,n,void 0,t);return e.die(),a}}),t}(mn),Pn=function(e){function t(t,r,n){var i=e.call(this,t,n)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return l(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?this.options.set(n,e?e.storedValue:null):n,o=tt(this,e,t,r,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(r,n),e;var o=this.instantiate(r,n,void 0,i);return e.die(),o}}),t}(mn);function On(e,t){if(be(e,1),Lt()&&2===arguments.length&&"string"==typeof arguments[1])throw mt("References with base path are no longer supported. Please remove the base path.");var r=t||void 0,n=t?t.onInvalidated:void 0;if(r&&(r.get||r.set)){if(Lt()&&(!r.get||!r.set))throw mt("reference options must either contain both a 'get' and a 'set' method or none of them");return new Pn(e,{get:r.get,set:r.set},n)}return new wn(e,n)}function jn(e){return(e.flags&ne.Reference)>0}function _n(e,t){var r=On(e,s(s({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?r:un(r)}var Sn=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"validType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Identifier}),n}return l(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!(e&&e.type instanceof xr))throw mt("Identifier types can only be instantiated as direct child of a model type");return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(e.storedValue!==t)throw mt("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(r,n),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?Ye(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Ge()}}),t}(pe),An=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Identifier}),t}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Sn),In=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return l(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Sn),xn=new An,Tn=new In;function Cn(e){return fe(e)&&(e.flags&ne.Identifier)>0}function En(e){return""+e}function Vn(e){return"string"==typeof e||"number"==typeof e}function Nn(e,t){Ut(e,Vn,"string or number (identifier)",t)}function Dn(e){return new kn(e)}var kn=function(e){function t(t){var r=e.call(this,t.name)||this;return Object.defineProperty(r,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Custom}),r}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return Ge();var r=this.options.getValidationMessage(e);return r?Ye(t,e,"Invalid value for type '"+this.name+"': "+r):Ge()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,this.options.isTargetType(n)?n:this.options.fromSnapshot(n,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(r,n),e;var o=i?this.options.fromSnapshot(t,r.root.environment):t,a=this.instantiate(r,n,void 0,o);return e.die(),a}}),t}(pe),Rn={enumeration:Br,model:Tr,compose:Cr,custom:Dn,reference:On,safeReference:_n,union:Kr,optional:tn,literal:Wr,maybe:un,maybeNull:ln,refinement:Jr,string:Nr,boolean:Rr,number:Dr,integer:kr,Date:Hr,map:dr,array:gr,frozen:hn,identifier:xn,identifierNumber:Tn,late:cn,undefined:Fr,null:zr,snapshotProcessor:sr};exports.types=Rn;
|
|
845
|
+
var e=require("process");Object.defineProperty(exports,"__esModule",{value:!0}),exports.addDisposer=G,exports.addMiddleware=Ve,exports.applyAction=Pe,exports.applyPatch=m,exports.applySnapshot=_,exports.cast=q,exports.castFlowReturn=Zt,exports.castToReferenceSnapshot=Q,exports.castToSnapshot=K,exports.clone=L,exports.createActionTrackingMiddleware=de,exports.createActionTrackingMiddleware2=ve,exports.decorate=Ne,exports.destroy=$,exports.detach=U,exports.escapeJsonPath=rr,exports.flow=Jt,exports.getChildType=y,exports.getEnv=Y,exports.getIdentifier=R,exports.getLivelinessChecking=o,exports.getMembers=B,exports.getNodeId=X,exports.getParent=I,exports.getParentOfType=T,exports.getPath=E,exports.getPathParts=V,exports.getPropertyMembers=Z,exports.getRelativePath=H,exports.getRoot=C,exports.getRunningActionContext=Re,exports.getSnapshot=S,exports.getType=d,exports.hasParent=A,exports.hasParentOfType=x,exports.isActionContextChildOf=Fe,exports.isActionContextThisOrChildOf=Me,exports.isAlive=W,exports.isArrayType=Or,exports.isFrozenType=dn,exports.isIdentifierType=Cn,exports.isLateType=pn,exports.isLiteralType=Gr,exports.isMapType=yr,exports.isModelType=Er,exports.isOptionalType=nn,exports.isPrimitiveType=Ur,exports.isProtected=j,exports.isReferenceType=jn,exports.isRefinementType=Zr,exports.isRoot=N,exports.isStateTreeNode=nt,exports.isType=fe,exports.isUnionType=Qr,exports.isValidReference=F,exports.joinJsonPath=ir,exports.onAction=_e,exports.onPatch=v,exports.onSnapshot=g,exports.process=ht,exports.protect=P,exports.recordActions=je,exports.recordPatches=w,exports.resolveIdentifier=k,exports.resolvePath=D,exports.setLivelinessChecking=i,exports.setLivelynessChecking=a,exports.splitJsonPath=or,exports.toGenerator=qt,exports.toGeneratorFunction=Bt,exports.tryReference=z,exports.tryResolve=M,exports.typecheck=Be,exports.unescapeJsonPath=nr,exports.unprotect=O,exports.walk=J,exports.types=void 0;var t,r=require("mobx"),n="warn";function i(e){n=e}function o(){return n}function a(e){i(e)}!function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"}(t||(t={}));var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function p(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(u){o=[6,u],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(u){i={error:u}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function d(e){return it(e,1),ot(e).type}function y(e,t){return it(e,1),ot(e).getChildType(t)}function v(e,t){return it(e,1),$t(t,2),ot(e).onPatch(t)}function g(e,t){return it(e,1),$t(t,2),ot(e).onSnapshot(t)}function m(e,t){it(e,1),Ut(t,function(e){return"object"==typeof e},"object or array",2),ot(e).applyPatches(jt(t))}function w(e,t){it(e,1);var r,n={patches:[],reversedInversePatches:[]},i={},o={get recording(){return!!r},get patches(){return i.patches||(i.patches=n.patches.slice()),i.patches},get reversedInversePatches(){return i.reversedInversePatches||(i.reversedInversePatches=n.reversedInversePatches.slice()),i.reversedInversePatches},get inversePatches(){return i.inversePatches||(i.inversePatches=n.reversedInversePatches.slice().reverse()),i.inversePatches},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=v(e,function(e,r){t&&!t(e,r,Re())||(n.patches.push(e),n.reversedInversePatches.unshift(r),i.patches=void 0,i.inversePatches=void 0,i.reversedInversePatches=void 0)}))},replay:function(t){m(t||e,n.patches)},undo:function(t){m(t||e,n.reversedInversePatches)}};return o.resume(),o}function P(e){it(e,1);var t=ot(e);if(!t.isRoot)throw mt("`protect` can only be invoked on root nodes");t.isProtectionEnabled=!0}function O(e){it(e,1);var t=ot(e);if(!t.isRoot)throw mt("`unprotect` can only be invoked on root nodes");t.isProtectionEnabled=!1}function j(e){return ot(e).isProtected}function _(e,t){return it(e,1),ot(e).applySnapshot(t)}function S(e,t){void 0===t&&(t=!0),it(e,1);var r=ot(e);return t?r.snapshot:xt(r.type.getSnapshot(r,!1))}function A(e,t){void 0===t&&(t=1),it(e,1),Wt(t,2,0);for(var r=ot(e).parent;r;){if(0==--t)return!0;r=r.parent}return!1}function I(e,t){void 0===t&&(t=1),it(e,1),Wt(t,2,0);for(var r=t,n=ot(e).parent;n;){if(0==--r)return n.storedValue;n=n.parent}throw mt("Failed to find the parent of "+ot(e)+" at depth "+t)}function x(e,t){it(e,1),be(t,2);for(var r=ot(e).parent;r;){if(t.is(r.storedValue))return!0;r=r.parent}return!1}function T(e,t){it(e,1),be(t,2);for(var r=ot(e).parent;r;){if(t.is(r.storedValue))return r.storedValue;r=r.parent}throw mt("Failed to find the parent of "+ot(e)+" of a given type")}function C(e){return it(e,1),ot(e).root.storedValue}function E(e){return it(e,1),ot(e).path}function V(e){return it(e,1),or(ot(e).path)}function N(e){return it(e,1),ot(e).isRoot}function D(e,t){it(e,1),Gt(t,2);var r=ct(ot(e),t);return r?r.value:void 0}function k(e,t,r){be(e,1),it(t,2),Nn(r,3);var n=ot(t).root.identifierCache.resolve(e,En(r));return null==n?void 0:n.value}function R(e){return it(e,1),ot(e).identifier}function z(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return;if(nt(r))return t?W(r)?r:void 0:r;throw mt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gn)return;throw n}}function F(e,t){void 0===t&&(t=!0);try{var r=e();if(null==r)return!1;if(nt(r))return!t||W(r);throw mt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gn)return!1;throw n}}function M(e,t){it(e,1),Gt(t,2);var r=ct(ot(e),t,!1);if(void 0!==r)try{return r.value}catch(n){return}}function H(e,t){return it(e,1),it(t,2),st(ot(e),ot(t))}function L(e,t){void 0===t&&(t=!0),it(e,1);var r=ot(e);return r.type.create(r.snapshot,!0===t?r.root.environment:!1===t?void 0:t)}function U(e){return it(e,1),ot(e).detach(),e}function $(e){it(e,1);var t=ot(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function W(e){return it(e,1),ot(e).observableIsAlive}function G(e,t){return it(e,1),$t(t,2),ot(e).addDisposer(t),t}function Y(e){it(e,1);var t=ot(e).root.environment;return t||vt}function J(e,t){it(e,1),$t(t,2);var r=ot(e);r.getChildren().forEach(function(e){nt(e.storedValue)&&J(e.storedValue,t)}),t(r.storedValue)}function Z(e){var t;return Ut(t=nt(e)?d(e):e,function(e){return Er(e)},"model type or model instance",1),{name:t.name,properties:s({},t.properties)}}function B(e){var t=ot(e).type,n=s(s({},Z(t)),{actions:[],volatile:[],views:[]});return Object.getOwnPropertyNames(e).forEach(function(t){if(!(t in n.properties)){var i=Object.getOwnPropertyDescriptor(e,t);i.get?(0,r.isComputedProp)(e,t)?n.views.push(t):n.volatile.push(t):!0===i.value._isMSTAction?n.actions.push(t):(0,r.isObservableProp)(e,t)?n.volatile.push(t):n.views.push(t)}}),n}function q(e){return e}function K(e){return e}function Q(e){return e}function X(e){return it(e,1),ot(e).nodeId}var ee=function(){function e(e,t,r,n){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:Ke.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=n,this.baseSetParent(t,r)}return Object.defineProperty(e.prototype,"subpath",{get:function(){return this._subpath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subpathUponDeath",{get:function(){return this._subpathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pathUponDeath",{get:function(){return this._pathUponDeath},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.type.getValue(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){var t=this.isAlive;this._state=e;var r=this.isAlive;this.aliveAtom&&t!==r&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._hookSubscribers&&this._hookSubscribers.emit(e,this,e)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._hookSubscribers||(this._hookSubscribers=new kt),this._hookSubscribers.register(e,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._parent=e,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e&&(this.pathAtom||(this.pathAtom=(0,r.createAtom)("path")),this.pathAtom.reportObserved()),this.parent?(void 0===this._escapedSubpath&&(this._escapedSubpath=this._subpath?rr(this._subpath):""),this.parent.getEscapedPath(e)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return null===this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Ke.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Ke.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=(0,r.createAtom)("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(Lt()&&!this.isAlive)throw fail("assertion failed: cannot finalize the creation of a node that is already dead");if(this.state===Ke.CREATED){if(this.parent){if(this.parent.state!==Ke.FINALIZED)return;this.fireHook(t.afterAttach)}this.state=Ke.FINALIZED,e&&e()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Ke.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(t.beforeDestroy)}}),e}(),te=function(e){function t(t,r,n,i,o){var a=e.call(this,t,r,n,i)||this;try{a.storedValue=t.createNewInstance(o)}catch(u){throw a.state=Ke.DEAD,u}return a.state=Ke.CREATED,a.finalizeCreation(),a}return l(t,e),Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw mt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.parent!==e,n=this.subpath!==t;if(r||n){if(Lt()){if(!t)throw mt("assertion failed: subpath expected");if(!e)throw mt("assertion failed: parent expected");if(r)throw mt("assertion failed: scalar nodes cannot change their parent")}this.environment=void 0,this.baseSetParent(this.parent,t)}}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return xt(this.getSnapshot())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return this.type.name+"@"+e+(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ke.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.fireInternalHook(e)}}),t}(ee);te.prototype.die=(0,r.action)(te.prototype.die);var re,ne,ie=1,oe={onError:function(e){throw e}},ae=function(e){function n(t,n,i,o,a){var u=e.call(this,t,n,i,o)||this;if(Object.defineProperty(u,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++ie}),Object.defineProperty(u,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(u,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(u,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(u,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(u,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(u,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),u._snapshotComputed=(0,r.computed)(function(){return xt(u.getSnapshot())}),u.unbox=u.unbox.bind(u),u._initialSnapshot=xt(a),u.identifierAttribute=t.identifierAttribute,n||(u.identifierCache=new Xe),u._childNodes=t.initializeChildNodes(u,u._initialSnapshot),u.identifier=null,u.unnormalizedIdentifier=null,u.identifierAttribute&&u._initialSnapshot){var l=u._initialSnapshot[u.identifierAttribute];if(void 0===l){var s=u._childNodes[u.identifierAttribute];s&&(l=s.value)}if("string"!=typeof l&&"number"!=typeof l)throw mt("Instance identifier '"+u.identifierAttribute+"' for type '"+u.type.name+"' must be a string or a number");u.identifier=En(l),u.unnormalizedIdentifier=l}return n?n.root.identifierCache.addNodeToCache(u):u.identifierCache.addNodeToCache(u),u}return l(n,e),Object.defineProperty(n.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applyPatches(e)}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.createObservableInstanceIfNeeded(),this._applySnapshot(e)}}),Object.defineProperty(n.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(){0===this._observableInstanceState&&this.createObservableInstance()}}),Object.defineProperty(n.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,r;if(Lt()&&this.state!==Ke.INITIALIZING)throw mt("assertion failed: the creation of the observable instance must be done on the initializing phase");this._observableInstanceState=1;for(var n=[],i=this.parent;i&&0===i._observableInstanceState;)n.unshift(i),i=i.parent;try{for(var o=f(n),a=o.next();!a.done;a=o.next()){a.value.createObservableInstanceIfNeeded()}}catch(l){e={error:l}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}var u=this.type;try{this.storedValue=u.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,u.finalizeNewInstance(this,this.storedValue)}catch(s){throw this.state=Ke.DEAD,s}finally{this._isRunningAction=!1}this._observableInstanceState=2,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=vt,this.state=Ke.CREATED,this.fireHook(t.afterCreate),this.finalizeCreation()}}),Object.defineProperty(n.prototype,"root",{get:function(){var e=this.parent;return e?e.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(t.beforeDetach);var e=this.state;this.state=Ke.DETACHING;var r=this.root,n=r.environment,i=r.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=n,this.identifierCache=i}finally{this.state=e}}}}),Object.defineProperty(n.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){var n=e!==this.parent,i=r!==this.subpath;if(n||i){if(Lt()){if(!r)throw mt("assertion failed: subpath expected");if(!e)throw mt("assertion failed: new parent expected");if(this.parent&&n)throw mt("A node cannot exists twice in the state tree. Failed to add "+this+" to path '"+e.path+"/"+r+"'.");if(!this.parent&&e.root===this)throw mt("A state tree is not allowed to contain itself. Cannot assign "+this+" to path '"+e.path+"/"+r+"'");if(!this.parent&&this.environment&&this.environment!==e.root.environment)throw mt("A state tree cannot be made part of another state tree as long as their environments are different.")}n?(this.environment=void 0,e.root.identifierCache.mergeCache(this),this.baseSetParent(e,r),this.fireHook(t.afterAttach)):i&&this.baseSetParent(this.parent,r)}}}),Object.defineProperty(n.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.fireInternalHook(e);var n=this.storedValue&&"object"==typeof this.storedValue&&this.storedValue[e];"function"==typeof n&&(r._allowStateChangesInsideComputed?(0,r._allowStateChangesInsideComputed)(function(){n.apply(t.storedValue)}):n.apply(this.storedValue))}}),Object.defineProperty(n.prototype,"snapshot",{get:function(){return this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?2===this._observableInstanceState?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(n.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(n.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var e=this.type,t=this._childNodes,r=this._initialSnapshot;this._cachedInitialSnapshot=e.processInitialSnapshot(t,r),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(n.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return!!this._isRunningAction||!this.isRoot&&this.parent.isRunningAction()}}),Object.defineProperty(n.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=o();if(!this.isAlive&&"ignore"!==t){var r=this._getAssertAliveError(e);switch(t){case"error":throw mt(r);case"warn":Mt(r)}}}}),Object.defineProperty(n.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getEscapedPath(!1)||this.pathUponDeath||"",r=e.subpath&&rr(e.subpath)||"",n=e.actionContext||Ie();n&&"action"!==n.type&&n.parentActionEvent&&(n=n.parentActionEvent);var i="";n&&null!=n.name&&(i=(n&&n.context&&E(n.context)||t)+"."+n.name+"()");return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '"+this.type.name+"', Path upon death: '"+t+"', Subpath: '"+r+"', Action: '"+i+"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree."}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.assertAlive({subpath:e}),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildNode(this,e):this._childNodes[e]}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(vt),this._autoUnbox=!1;try{return 2===this._observableInstanceState?this.type.getChildren(this):ft(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.type.getChildType(e)}}),Object.defineProperty(n.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.assertAlive(e),!this.isRunningAction()&&this.isProtected)throw mt("Cannot modify '"+this+"', the object is protected and can only be modified by using an action.")}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.type.removeChild(this,e)}}),Object.defineProperty(n.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?(this.assertAlive({subpath:e.subpath||e.subpathUponDeath}),this._autoUnbox?e.value:e):e}}),Object.defineProperty(n.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=(this.isAlive?this.path:this.pathUponDeath)||"<root>",t=this.identifier?"(id: "+this.identifier+")":"";return this.type.name+"@"+e+t+(this.isAlive?"":" [dead]")}}),Object.defineProperty(n.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this.baseFinalizeCreation(function(){var r,n;try{for(var i=f(e.getChildren()),o=i.next();!o.done;o=i.next()){o.value.finalizeCreation()}}catch(a){r={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.fireInternalHook(t.afterCreationFinalization)})}}),Object.defineProperty(n.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw mt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(n.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;this._applyPatches=Ee(this.storedValue,"@APPLY_PATCHES",function(t){t.forEach(function(t){if(t.path){var r=or(t.path);pt(e,r.slice(0,-1)).applyPatchLocally(r[r.length-1],t)}else e.type.applySnapshot(e,t.value)})}),this._applySnapshot=Ee(this.storedValue,"@APPLY_SNAPSHOT",function(t){if(t!==e.snapshot)return e.type.applySnapshot(e,t)}),Vt(this.storedValue,"$treenode",this),Vt(this.storedValue,"toJSON",ut)}}),Object.defineProperty(n.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.isAlive&&this.state!==Ke.DETACHING&&(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(n.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){0!==this._observableInstanceState&&(this.getChildren().forEach(function(e){e.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit("dispose"),this._internalEventsClear("dispose"))}}),Object.defineProperty(n.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(e){e.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var e=this.snapshot;this._snapshotUponDeath=e,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(n.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._addSnapshotReaction(),this._internalEventsRegister("snapshot",e)}}),Object.defineProperty(n.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEventsEmit("snapshot",e)}}),Object.defineProperty(n.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsRegister("patch",e)}}),Object.defineProperty(n.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._internalEventsHasSubscribers("patch")){var r=b(Qt(_t({},e,{path:t.path.substr(this.path.length)+"/"+e.path})),2),n=r[0],i=r[1];this._internalEventsEmit("patch",n,i)}this.parent&&this.parent.emitPatch(e,t)}}),Object.defineProperty(n.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._internalEventsHas("dispose",e)}}),Object.defineProperty(n.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.hasDisposer(e))throw mt("cannot add a disposer when it is already registered for execution");this._internalEventsRegister("dispose",e,!0)}}),Object.defineProperty(n.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._internalEventsHas("dispose",e))throw mt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister("dispose",e)}}),Object.defineProperty(n.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(this.middlewares){var t=this.middlewares.indexOf(e);t>=0&&this.middlewares.splice(t,1)}}}),Object.defineProperty(n.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;void 0===t&&(t=!0);var n={handler:e,includeHooks:t};return this.middlewares?this.middlewares.push(n):this.middlewares=[n],function(){r.removeMiddleware(n)}}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this.assertWritable({subpath:e}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,e,t)}}),Object.defineProperty(n.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(!this._hasSnapshotReaction){var t=(0,r.reaction)(function(){return e.snapshot},function(t){return e.emitSnapshot(t)},oe);this.addDisposer(t),this._hasSnapshotReaction=!0}}}),Object.defineProperty(n.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return!!this._internalEvents&&this._internalEvents.hasSubscribers(e)}}),Object.defineProperty(n.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){return void 0===r&&(r=!1),this._internalEvents||(this._internalEvents=new kt),this._internalEvents.register(e,t,r)}}),Object.defineProperty(n.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!!this._internalEvents&&this._internalEvents.has(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){this._internalEvents&&this._internalEvents.unregister(e,t)}}),Object.defineProperty(n.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this._internalEvents&&(t=this._internalEvents).emit.apply(t,h([e],r))}}),Object.defineProperty(n.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this._internalEvents&&this._internalEvents.clear(e)}}),Object.defineProperty(n.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),n}(ee);ae.prototype.createObservableInstance=(0,r.action)(ae.prototype.createObservableInstance),ae.prototype.detach=(0,r.action)(ae.prototype.detach),ae.prototype.die=(0,r.action)(ae.prototype.die),function(e){e[e.String=1]="String",e[e.Number=2]="Number",e[e.Boolean=4]="Boolean",e[e.Date=8]="Date",e[e.Literal=16]="Literal",e[e.Array=32]="Array",e[e.Map=64]="Map",e[e.Object=128]="Object",e[e.Frozen=256]="Frozen",e[e.Optional=512]="Optional",e[e.Reference=1024]="Reference",e[e.Identifier=2048]="Identifier",e[e.Late=4096]="Late",e[e.Refinement=8192]="Refinement",e[e.Union=16384]="Union",e[e.Null=32768]="Null",e[e.Undefined=65536]="Undefined",e[e.Integer=131072]="Integer",e[e.Custom=262144]="Custom",e[e.SnapshotProcessor=524288]="SnapshotProcessor"}(ne||(ne={}));var ue="cannotDetermine",le=Symbol("$type"),se=function(){function e(e){Object.defineProperty(this,re,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=e}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Ze(this,e),this.instantiate(null,"",t,e).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){throw mt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(at(e)){var r=d(e);return this.isAssignableFrom(r)?Ge():Ye(t,e)}return this.isValidSnapshot(e,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return 0===this.validate(e,[{path:"",type:this}]).length}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw mt("Factory.Type should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.Type`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"TypeWithoutSTN",{get:function(){throw mt("Factory.TypeWithoutSTN should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.TypeWithoutSTN`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"SnapshotType",{get:function(){throw mt("Factory.SnapshotType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.SnapshotType`")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CreationType",{get:function(){throw mt("Factory.CreationType should not be actually called. It is just a Type signature that can be used at compile time with Typescript, by using `typeof type.CreationType`")},enumerable:!1,configurable:!0}),e}();re=le,se.prototype.create=(0,r.action)(se.prototype.create);var ce=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return l(t,e),Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return void 0===t&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,r)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.createObservableInstanceIfNeeded(),e.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.identifierAttribute||e.identifier===En(t[e.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return!e.isDetaching&&(e.snapshot===t||(!(!nt(t)||ot(t)!==e)||!(e.type!==this||!At(t)||nt(t)||!this.isMatchingSnapshotId(e,t))&&(e.applySnapshot(t),!0)))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.tryToReconcileNode(e,t))return e.setParent(r,n),e;if(e.die(),nt(t)&&this.isAssignableFrom(d(t))){var i=ot(t);return i.setParent(r,n),i}return this.instantiate(r,n,void 0,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(se);ce.prototype.create=(0,r.action)(ce.prototype.create);var pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this&&e.storedValue===t)return e;var i=this.instantiate(r,n,void 0,t);return e.die(),i}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(se);function fe(e){return"object"==typeof e&&e&&!0===e.isType}function be(e,t){Ut(e,fe,"mobx-state-tree type",t)}var he=new Map;function de(e){return function(t,r,n){switch(t.type){case"action":if(e.filter&&!0!==e.filter(t))return r(t);var i=e.onStart(t);e.onResume(t,i),he.set(t.id,{call:t,context:i,async:!1});try{var o=r(t);return e.onSuspend(t,i),!1===he.get(t.id).async&&(he.delete(t.id),e.onSuccess(t,i,o)),o}catch(u){throw he.delete(t.id),e.onFail(t,i,u),u}case"flow_spawn":return(a=he.get(t.rootId)).async=!0,r(t);case"flow_resume":case"flow_resume_error":var a=he.get(t.rootId);e.onResume(t,a.context);try{return r(t)}finally{e.onSuspend(t,a.context)}case"flow_throw":a=he.get(t.rootId);return he.delete(t.rootId),e.onFail(t,a.context,t.args[0]),r(t);case"flow_return":a=he.get(t.rootId);return he.delete(t.rootId),e.onSuccess(t,a.context,t.args[0]),r(t)}}}var ye=function(){function e(e,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),e&&e.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,e))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function ve(e){var t=new WeakMap;return function(r,n){var i=r.parentActionEvent?t.get(r.parentActionEvent):void 0;if("action"===r.type){var o=s(s({},r),{env:i&&i.call.env,parentCall:i&&i.call}),a=!e.filter||e.filter(o),u=new ye(a?e:void 0,o);t.set(r,u);var l=void 0;try{l=n(r)}catch(p){throw u.finish(p),p}return u.hasFlowsPending||u.finish(),l}if(!i)return n(r);switch(r.type){case"flow_spawn":return i.incFlowsPending(),n(r);case"flow_resume":case"flow_resume_error":return n(r);case"flow_throw":var c=r.args[0];try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish(c)}case"flow_return":try{return n(r)}finally{i.decFlowsPending(),i.hasFlowsPending||i.finish()}}}}function ge(e,t,r,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(It(n))return n;if(nt(n))return we("[MSTNode: "+d(n).name+"]");if("function"==typeof n)return we("[function]");if("object"==typeof n&&!St(n)&&!Ot(n))return we("[object "+(n&&n.constructor&&n.constructor.name||"Complex Object")+"]");try{return JSON.stringify(n),n}catch(i){return we(""+i)}}function me(e,t){return t&&"object"==typeof t&&"$MST_DATE"in t?new Date(t.$MST_DATE):t}function we(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function Pe(e,t){it(e,1),Ut(t,function(e){return"object"==typeof e},"object or array",2),(0,r.runInAction)(function(){jt(t).forEach(function(t){return Oe(e,t)})})}function Oe(e,t){var r=M(e,t.path||"");if(!r)throw mt("Invalid action path: "+(t.path||""));var n=ot(r);if("@APPLY_PATCHES"===t.name)return m.call(null,r,t.args[0]);if("@APPLY_SNAPSHOT"===t.name)return _.call(null,r,t.args[0]);if("function"!=typeof r[t.name])throw mt("Action '"+t.name+"' does not exist in '"+n.path+"'");return r[t.name].apply(r,t.args?t.args.map(function(e){return me(n,e)}):[])}function je(e,t){it(e,1);var r,n=[],i=function(e){(!t||t(e,Re()))&&n.push(e)},o={actions:n,get recording(){return!!r},stop:function(){r&&(r(),r=void 0)},resume:function(){r||(r=_e(e,i))},replay:function(e){Pe(e,n)}};return o.resume(),o}function _e(e,t,r){return void 0===r&&(r=!1),it(e,1),Lt()&&(N(e)||Mt("Warning: Attaching onAction listeners to non root nodes is dangerous: No events will be emitted for actions initiated higher up in the tree."),j(e)||Mt("Warning: Attaching onAction listeners to non protected nodes is dangerous: No events will be emitted for direct modifications without action.")),Ve(e,function(n,i){if("action"===n.type&&n.id===n.rootId){var o=ot(n.context),a={name:n.name,path:st(ot(e),o),args:n.args.map(function(e,t){return ge(o,n.name,t,e)})};if(r){var u=i(n);return t(a),u}return t(a),i(n)}return i(n)})}var Se,Ae=1;function Ie(){return Se}function xe(){return Ae++}function Te(e,t){var r=ot(e.context);"action"===e.type&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=Se;Se=e;try{return ke(r,e,t)}finally{Se=i,r._isRunningAction=n}}function Ce(e){if(e)return"action"===e.type?e:e.parentActionEvent}function Ee(e,t,r){var n=function(){var n=xe(),i=Se,o=Ce(i);return Te({type:"action",name:t,id:n,args:Rt(arguments),context:e,tree:C(e),rootId:i?i.rootId:n,parentId:i?i.id:0,allParentIds:i?h(i.allParentIds,[i.id]):[],parentEvent:i,parentActionEvent:o},r)};return n._isMSTAction=!0,n}function Ve(e,t,r){void 0===r&&(r=!0);var n=ot(e);return Lt()&&(n.isProtectionEnabled||Mt("It is recommended to protect the state tree before attaching action middleware, as otherwise it cannot be guaranteed that all changes are passed through middleware. See `protect`")),n.addMiddleWare(t,r)}function Ne(e,t,r){void 0===r&&(r=!0);var n={handler:e,includeHooks:r};return t.$mst_middleware=t.$mst_middleware||[],t.$mst_middleware.push(n),t}var De=function(){function e(e,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var r=e;r;)r.middlewares&&this.middlewares.push(r.middlewares),r=r.parent}return Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.middlewares.length<=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getNextMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.middlewares[this.arrayIndex];if(e){var t=e[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function ke(e,n,i){var o=new De(e,i);if(o.isEmpty)return(0,r.action)(i).apply(null,n.args);var a=null;return function e(n){var u=o.getNextMiddleware(),l=u&&u.handler;if(!l)return(0,r.action)(i).apply(null,n.args);if(!u.includeHooks&&t[n.name])return e(n);var s=!1;var c=!1;if(l(n,function(t,r){s=!0,a=e(t),r&&(a=r(a))},function(e){c=!0,a=e}),Lt()){if(!s&&!c){var p=ot(n.tree);throw mt("Neither the next() nor the abort() callback within the middleware "+l.name+' for the action: "'+n.name+'" on the node: '+p.type.name+" was invoked.")}if(s&&c)throw p=ot(n.tree),mt("The next() and abort() callback within the middleware "+l.name+' for the action: "'+n.name+'" on the node: '+p.type.name+" were invoked.")}return a}(n)}function Re(){for(var e=Ie();e&&"action"!==e.type;)e=e.parentActionEvent;return e}function ze(e,t,r){for(var n="number"==typeof t?t:t.id,i=r?e:e.parentActionEvent;i;){if(i.id===n)return!0;i=i.parentActionEvent}return!1}function Fe(e,t){return ze(e,t,!1)}function Me(e,t){return ze(e,t,!0)}function He(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: "+t+">"}}function Le(e){return"function"==typeof e?"<function"+(e.name?" "+e.name:"")+">":nt(e)?"<"+e+">":"`"+He(e)+"`"}function Ue(e){return e.length<280?e:e.substring(0,272)+"......"+e.substring(e.length-8)}function $e(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(e){return e.path}).filter(function(e){return e.length>0}).join("/"),i=n.length>0?'at path "/'+n+'" ':"",o=nt(t)?"value of type "+ot(t).type.name+":":It(t)?"value":"snapshot",a=r&&nt(t)&&r.is(ot(t).snapshot);return""+i+o+" "+Le(t)+" is not assignable "+(r?"to type: `"+r.name+"`":"")+(e.message?" ("+e.message+")":"")+(r?Ur(r)||It(t)?".":", expected an instance of `"+r.name+"` or a snapshot like `"+r.describe()+"` instead."+(a?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function We(e,t,r){return e.concat([{path:t,type:r}])}function Ge(){return yt}function Ye(e,t,r){return[{context:e,value:t,message:r}]}function Je(e){return e.reduce(function(e,t){return e.concat(t)},[])}function Ze(e,t){Ht()&&Be(e,t)}function Be(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw mt(qe(e,t,r))}function qe(e,t,r){if(0!==r.length)return"Error while converting "+Ue(Le(t))+" to `"+e.name+"`:\n\n "+r.map($e).join("\n ")}var Ke,Qe=0,Xe=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:Qe++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:r.observable.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e);this.lastCacheModificationPerId.set(e,void 0===t?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.lastCacheModificationPerId.get(e)||0;return this.cacheId+"-"+t}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(void 0===t&&(t=!0),e.identifierAttribute){var n=e.identifier;this.cache.has(n)||this.cache.set(n,r.observable.array([],gt));var i=this.cache.get(n);if(-1!==i.indexOf(e))throw mt("Already registered");i.push(e),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;(0,r.values)(e.identifierCache.cache).forEach(function(e){return e.forEach(function(e){t.addNodeToCache(e)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.identifierAttribute){var t=e.identifier,r=this.cache.get(t);r&&(r.remove(e),r.length||this.cache.delete(t),this.updateLastCacheModificationPerId(e.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,i=new e,o=t.path;return(0,r.entries)(this.cache).forEach(function(e){for(var t=b(e,2),r=t[0],a=t[1],u=!1,l=a.length-1;l>=0;l--)0===a[l].path.indexOf(o)&&(i.addNodeToCache(a[l],!1),a.splice(l,1),u=!0);u&&n.updateLastCacheModificationPerId(r)}),i}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);return!!r&&r.some(function(t){return e.isAssignableFrom(t.type)})}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.cache.get(t);if(!r)return null;var n=r.filter(function(t){return e.isAssignableFrom(t.type)});switch(n.length){case 0:return null;case 1:return n[0];default:throw mt("Cannot resolve a reference to type '"+e.name+"' with id: '"+t+"' unambigously, there are multiple candidates: "+n.map(function(e){return e.path}).join(", "))}}}),e}();function et(e,t,r,n,i){var o=at(i);if(o){if(o.parent)throw mt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+(t?t.path:"")+"/"+r+"', but it lives already at '"+o.path+"'");return t&&o.setParent(t,r),o}return new ae(e,t,r,n,i)}function tt(e,t,r,n,i){return new te(e,t,r,n,i)}function rt(e){return e instanceof te||e instanceof ae}function nt(e){return!(!e||!e.$treenode)}function it(e,t){Ut(e,nt,"mobx-state-tree node",t)}function ot(e){if(!nt(e))throw mt("Value "+e+" is no MST Node");return e.$treenode}function at(e){return e&&e.$treenode||null}function ut(){return ot(this).snapshot}!function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"}(Ke||(Ke={}));var lt=function(e){return".."};function st(e,t){if(e.root!==t.root)throw mt("Cannot calculate relative path: objects '"+e+"' and '"+t+"' are not part of the same object tree");for(var r=or(e.path),n=or(t.path),i=0;i<r.length&&r[i]===n[i];i++);return r.slice(i).map(lt).join("/")+ir(n.slice(i))}function ct(e,t,r){return void 0===r&&(r=!0),pt(e,or(t),r)}function pt(e,t,r){void 0===r&&(r=!0);for(var n=e,i=0;i<t.length;i++){var o=t[i];if(".."===o){if(n=n.parent)continue}else{if("."===o)continue;if(n){if(n instanceof te)try{var a=n.value;nt(a)&&(n=ot(a))}catch(u){if(!r)return;throw u}if(n instanceof ae)if(n.getChildType(o)&&(n=n.getChildNode(o)))continue}}if(r)throw mt("Could not resolve '"+o+"' in path '"+(ir(t.slice(0,i))||"/")+"' while resolving '"+ir(t)+"'");return}return n}function ft(e){if(!e)return yt;var t=Object.keys(e);if(!t.length)return yt;var r=new Array(t.length);return t.forEach(function(t,n){r[n]=e[t]}),r}var bt="See https://github.com/mobxjs/mobx-state-tree/issues/399 for more information. Note that the middleware event types starting with `process` now start with `flow`.";function ht(e){return Ft("process","`process()` has been renamed to `flow()`. "+bt),Jt(e)}var dt=Object.toString(),yt=Object.freeze([]),vt=Object.freeze({}),gt=(0,r._getGlobalState)().useProxies?{deep:!1}:{deep:!1,proxy:!1};function mt(e){return void 0===e&&(e="Illegal state"),new Error("[mobx-state-tree] "+e)}function wt(e){return e}Object.freeze(gt);var Pt=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e};function Ot(e){return Array.isArray(e)||(0,r.isObservableArray)(e)}function jt(e){return e?Ot(e)?e:[e]:yt}function _t(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var o in i)e[o]=i[o]}return e}function St(e){var t;if(null===e||"object"!=typeof e)return!1;var r=Object.getPrototypeOf(e);return null==r||(null===(t=r.constructor)||void 0===t?void 0:t.toString())===dt}function At(e){return!(null===e||"object"!=typeof e||e instanceof Date||e instanceof RegExp)}function It(e,t){return void 0===t&&(t=!0),null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||t&&e instanceof Date}function xt(e){return Lt()?It(e)||(0,r.isObservableArray)(e)?e:Object.freeze(e):e}function Tt(e){return Lt()?(xt(e),St(e)&&Object.keys(e).forEach(function(t){It(e[t])||Object.isFrozen(e[t])||Tt(e[t])}),e):e}function Ct(e){return"function"!=typeof e}function Et(e,t,n){(0,r.isObservableObject)(e)?(0,r.defineProperty)(e,t,n):Object.defineProperty(e,t,n)}function Vt(e,t,r){Et(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Nt(e,t,r){Et(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}var Dt=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return void 0===t&&(t=!1),t?this.handlers.unshift(e):this.handlers.push(e),function(){r.unregister(e)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.handlers.indexOf(e)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.handlers.slice().forEach(function(t){return t.apply(void 0,h(e))})}}),e}(),kt=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.eventHandlers&&this.eventHandlers[e];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){void 0===r&&(r=!1),this.eventHandlers||(this.eventHandlers={});var n=this.eventHandlers[e];return n||(n=this.eventHandlers[e]=new Dt),n.register(t,r)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];return!!r&&r.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.eventHandlers&&this.eventHandlers[e];r&&r.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.eventHandlers&&delete this.eventHandlers[e]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.eventHandlers&&this.eventHandlers[e];i&&(t=i).emit.apply(t,h(r))}}),e}();function Rt(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function zt(e,t){return 0===e.indexOf(t)}var Ft=function(e,t){Lt()&&(Ft.ids&&!Ft.ids.hasOwnProperty(e)&&Mt("Deprecation warning: "+t),Ft.ids&&(Ft.ids[e]=!0))};function Mt(e){console.warn(new Error("[mobx-state-tree] "+e))}function Ht(){return Lt()||void 0!==e&&e.env&&!1}function Lt(){return!1}function Ut(e,t,r,n){if(Lt()&&!t(e))throw mt("expected "+r+" as argument "+jt(n).join(" or ")+", got "+e+" instead")}function $t(e,t){Ut(e,function(e){return"function"==typeof e},"function",t)}function Wt(e,t,r,n){Ut(e,function(e){return"number"==typeof e},"number",t),void 0!==r&&Ut(e,function(e){return e>=r},"number greater than "+r,t),void 0!==n&&Ut(e,function(e){return e<=n},"number lesser than "+n,t)}function Gt(e,t,r){void 0===r&&(r=!0),Ut(e,function(e){return"string"==typeof e},"string",t),r||Ut(e,function(e){return""!==e},"not empty string",t)}function Yt(e){"function"==typeof queueMicrotask?queueMicrotask(e):"function"==typeof setImmediate?setImmediate(e):setTimeout(e,1)}function Jt(e){return Kt(e.name,e)}function Zt(e){return e}function Bt(e){return function(){var t,r=[];for(t=0;t<arguments.length;t++)r[t]=arguments[t];return p(this,function(t){switch(t.label){case 0:return[4,e.apply(void 0,h(r))];case 1:return[2,t.sent()]}})}}function qt(e){return p(this,function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()]}})}function Kt(e,t){var r=function(){var n=xe(),i=Ie();if(!i)throw mt("a mst flow must always have a parent context");var o=Ce(i);if(!o)throw mt("a mst flow must always have a parent action context");var a={name:e,id:n,tree:i.tree,context:i.context,parentId:i.id,allParentIds:h(i.allParentIds,[i.id]),rootId:i.rootId,parentEvent:i,parentActionEvent:o},u=arguments;function l(e,t,n){e.$mst_middleware=r.$mst_middleware,Te(s(s({},a),{type:t,args:[n]}),e)}return new Promise(function(e,n){var i,o=function(){i=t.apply(null,arguments),c(void 0)};function c(e){var t;try{l(function(e){t=i.next(e)},"flow_resume",e)}catch(r){return void Yt(function(){l(function(e){n(r)},"flow_throw",r)})}f(t)}function p(e){var t;try{l(function(e){t=i.throw(e)},"flow_resume_error",e)}catch(r){return void Yt(function(){l(function(e){n(r)},"flow_throw",r)})}f(t)}function f(t){if(!t.done){if(!t.value||"function"!=typeof t.value.then)throw mt("Only promises can be yielded to `async`, got: "+t);return t.value.then(c,p)}Yt(function(){l(function(t){e(t)},"flow_return",t.value)})}o.$mst_middleware=r.$mst_middleware,Te(s(s({},a),{type:"flow_spawn",args:Rt(u)}),o)})};return r}function Qt(e){if(!("oldValue"in e))throw mt("Patches without `oldValue` field cannot be inversed");return[Xt(e),er(e)]}function Xt(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function er(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function tr(e){return"number"==typeof e}function rr(e){return!0===tr(e)?""+e:-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function nr(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ir(e){if(0===e.length)return"";var t=function(e){return e.map(rr).join("/")};return"."===e[0]||".."===e[0]?t(e):"/"+t(e)}function or(e){var t=e.split("/").map(nr);if(!(""===e||"."===e||".."===e||zt(e,"/")||zt(e,"./")||zt(e,"../")))throw mt("a json path must be either rooted, empty or relative, but got '"+e+"'");return""===t[0]&&t.shift(),t}Ft.ids={};var ar=Symbol("$preProcessorFailed"),ur=function(e){function t(t,r,n){var i=e.call(this,n||t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor("+this._subtype.describe()+")"}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.preProcessor?this._processors.preProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(e){try{return this.preProcessSnapshot(e)}catch(t){return ar}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._processors.postProcessor?this._processors.postProcessor.call(null,e):e}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;lr(e.type,this,"create");var r=e.getSnapshot;e.getSnapshot=function(){return t.postProcessSnapshot(r.call(e))},e.getReconciliationType=function(){return t}}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?n:this.preProcessSnapshot(n),o=this._subtype.instantiate(e,t,r,i);return this._fixNode(o),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this._subtype.reconcile(e,nt(t)?t:this.preProcessSnapshot(t),r,n);return i!==e&&this._fixNode(i),i}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=!0);var r=this._subtype.getSnapshot(e);return t?this.postProcessSnapshot(r):r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.preProcessSnapshotSafe(e);return r===ar?Ye(t,e,"Failed to preprocess value"):this._subtype.validate(r,t)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=fe(e)?this._subtype:nt(e)?S(e,!1):this.preProcessSnapshotSafe(e);return t!==ar&&0===this._subtype.validate(t,[{path:"",type:this._subtype}]).length}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(this._subtype instanceof ce))return!1;var r=this.preProcessSnapshot(t);return this._subtype.isMatchingSnapshotId(e,r)}}),t}(se);function lr(e,t){for(var r,n,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];try{for(var a=f(i),u=a.next();!u.done;u=a.next()){var l=u.value;e[l]=t[l].bind(t)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}function sr(e,t,r){if(be(e,1),Lt()){if(t.postProcessor&&"function"!=typeof t.postProcessor)throw fail("postSnapshotProcessor must be a function");if(t.preProcessor&&"function"!=typeof t.preProcessor)throw fail("preSnapshotProcessor must be a function")}return new ur(e,t,r)}var cr,pr="Map.put can only be used to store complex values that have an identifier type attribute";function fr(e,t){var r,n,i=e.getSubTypes();if(i===ue)return!1;if(i){var o=jt(i);try{for(var a=f(o),u=a.next();!u.done;u=a.next()){if(!fr(u.value,t))return!1}}catch(l){r={error:l}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e instanceof xr&&t.push(e),!0}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"}(cr||(cr={}));var br=function(e){function t(t){return e.call(this,t,r.observable.ref.enhancer)||this}return l(t,e),Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return e.prototype.set.call(this,""+t,r)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!e)throw mt("Map.put cannot be used to set empty values");if(nt(e)){var t=ot(e);if(Lt()&&!t.identifierAttribute)throw mt(pr);if(null===t.identifier)throw mt(pr);return this.set(t.identifier,e),e}if(At(e)){var r=ot(this),n=r.type;if(n.identifierMode!==cr.YES)throw mt(pr);var i=e[n.mapIdentifierAttribute];if(!Vn(i)){var o=this.put(n.getChildType().create(e,r.environment));return this.put(S(o))}var a=En(i);return this.set(a,e),this.get(a)}throw mt("Map.put can only be used to store complex values")}}),t}(r.ObservableMap),hr=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:cr.UNKNOWN}),Object.defineProperty(i,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Map}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i._determineIdentifierMode(),i.hookInitializers=n,i}return l(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._determineIdentifierMode(),et(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===cr.UNKNOWN){var e=[];if(fr(this._subType,e)){var t=e.reduce(function(e,t){if(!t.identifierAttribute)return e;if(e&&e!==t.identifierAttribute)throw mt("The objects in a map should all have the same identifier attribute, expected '"+e+"', but child of type '"+t.name+"' declared attribute '"+t.identifierAttribute+"' as identifier");return t.identifierAttribute},void 0);t?(this.identifierMode=cr.YES,this.mapIdentifierAttribute=t):this.identifierMode=cr.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type._subType,n={};return Object.keys(t).forEach(function(i){n[i]=r.instantiate(e,i,void 0,t[i])}),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new br(e)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,r._interceptReads)(t,e.unbox),e.type.hookInitializers.forEach(function(e){var r=e(t);Object.keys(r).forEach(function(e){var n=r[e],i=Ee(t,e,n);(Lt()?Nt:Vt)(t,e,i)})}),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"Map<string, "+this._subType.describe()+">"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return(0,r.values)(e.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=e.storedValue.get(""+t);if(!r)throw mt("Not a child "+t);return r}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object),r=e.name;t.assertWritable({subpath:r});var n=t.type,i=n._subType;switch(e.type){case"update":var o=e.newValue;if(o===e.object.get(r))return null;Ze(i,o),e.newValue=i.reconcile(t.getChildNode(r),e.newValue,t,r),n.processIdentifier(r,e.newValue);break;case"add":Ze(i,e.newValue),e.newValue=i.instantiate(t,r,void 0,e.newValue),n.processIdentifier(r,e.newValue)}return e}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.identifierMode===cr.YES&&t instanceof ae){var r=t.identifier;if(r!==e)throw mt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '"+r+"', but expected: '"+e+"'")}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return e.getChildren().forEach(function(e){t[e.subpath]=e.snapshot}),t}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].getSnapshot()}),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:rr(e.name),value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"add":return void t.emitPatch({op:"add",path:rr(e.name),value:e.newValue.snapshot,oldValue:void 0},t);case"delete":var r=e.oldValue.snapshot;return e.oldValue.die(),void t.emitPatch({op:"remove",path:rr(e.name),oldValue:r},t)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue;switch(r.op){case"add":case"replace":n.set(t,r.value);break;case"remove":n.delete(t)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ze(this,t);var r=e.storedValue,n={};if(Array.from(r.keys()).forEach(function(e){n[e]=!1}),t)for(var i in t)r.set(i,t[i]),n[""+i]=!0;Object.keys(n).forEach(function(e){!1===n[e]&&r.delete(e)})}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return St(e)?Je(Object.keys(e).map(function(n){return r._subType.validate(e[n],We(t,n,r._subType))})):Ye(t,e,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vt}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.delete(t)}}),t}(ce);function dr(e){return new hr("map<string, "+e.name+">",e)}function yr(e){return fe(e)&&(e.flags&ne.Map)>0}hr.prototype.applySnapshot=(0,r.action)(hr.prototype.applySnapshot);var vr=function(e){function t(t,r,n){void 0===n&&(n=[]);var i=e.call(this,t)||this;return Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Array}),Object.defineProperty(i,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),i.hookInitializers=n,i}return l(t,e),Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var r=this.hookInitializers.length>0?this.hookInitializers.concat(e):[e];return new t(this.name,this._subType,r)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return et(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t=[]);var r=e.type._subType,n={};return t.forEach(function(t,i){var o=""+i;n[o]=r.instantiate(e,o,void 0,t)}),n}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return r.observable.array(ft(e),gt)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){(0,r._getAdministration)(t).dehancer=e.unbox,e.type.hookInitializers.forEach(function(e){var r=e(t);Object.keys(r).forEach(function(e){var n=r[e],i=Ee(t,e,n);(Lt()?Nt:Vt)(t,e,i)})}),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType.describe()+"[]"}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=Number(t);if(r<e.storedValue.length)return e.storedValue[r];throw mt("Not a child: "+t)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);t.assertWritable({subpath:""+e.index});var r=t.type._subType,n=t.getChildren();switch(e.type){case"update":if(e.newValue===e.object[e.index])return null;var i=mr(t,r,[n[e.index]],[e.newValue],[e.index]);if(!i)return null;e.newValue=i[0];break;case"splice":var o=e.index,a=e.removedCount,u=e.added,l=mr(t,r,n.slice(o,o+a),u,u.map(function(e,t){return o+t}));if(!l)return null;e.added=l;for(var s=o+a;s<n.length;s++)n[s].setParent(t,""+(s+u.length-a))}return e}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.getChildren().map(function(e){return e.snapshot})}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=[];return Object.keys(e).forEach(function(r){t.push(e[r].getSnapshot())}),t}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=ot(e.object);switch(e.type){case"update":return void t.emitPatch({op:"replace",path:""+e.index,value:e.newValue.snapshot,oldValue:e.oldValue?e.oldValue.snapshot:void 0},t);case"splice":for(var r=e.removedCount-1;r>=0;r--)t.emitPatch({op:"remove",path:""+(e.index+r),oldValue:e.removed[r].snapshot},t);for(r=0;r<e.addedCount;r++)t.emitPatch({op:"add",path:""+(e.index+r),value:t.getChildNode(""+(e.index+r)).snapshot,oldValue:void 0},t);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){var n=e.storedValue,i="-"===t?n.length:Number(t);switch(r.op){case"replace":n[i]=r.value;break;case"add":n.splice(i,0,r.value);break;case"remove":n.splice(i,1)}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Ze(this,t),e.storedValue.replace(t)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this;return Ot(e)?Je(e.map(function(e,n){return r._subType.validate(e,We(t,""+n,r._subType))})):Ye(t,e,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return yt}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue.splice(Number(t),1)}}),t}(ce);function gr(e){return be(e,1),new vr(e.name+"[]",e)}function mr(e,t,r,n,i){for(var o=!0,a=0;;a++){var u=a<=n.length-1,l=r[a],s=u?n[a]:void 0,c=""+i[a];if(rt(s)&&(s=s.storedValue),!l&&!u)break;if(u)if(l)if(Pr(l,s))r[a]=wr(t,e,c,s,l);else{for(var p=void 0,f=a;f<r.length;f++)if(Pr(r[f],s)){p=r.splice(f,1)[0];break}o=!1;b=wr(t,e,c,s,p);r.splice(a,0,b)}else{if(nt(s)&&ot(s).parent===e)throw mt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '"+e.path+"/"+c+"', but it lives already at '"+ot(s).path+"'");o=!1;var b=wr(t,e,c,s);r.splice(a,0,b)}else o=!1,r.splice(a,1),l instanceof ae&&l.createObservableInstanceIfNeeded(),l.die(),a--}return o?null:r}function wr(e,t,r,n,i){Ze(e,n);var o=function(){if(nt(n)){var o=ot(n);if(o.assertAlive(vt),null!==o.parent&&o.parent===t)return o.setParent(t,r),o}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}();return i&&i!==o&&(i instanceof ae&&i.createObservableInstanceIfNeeded(),i.die()),o}function Pr(e,t){if(!e.isAlive)return!1;if(nt(t)){var r=ot(t);return r.isAlive&&r===e}if(e.snapshot===t)return!0;if(!(e instanceof ae))return!1;var n=e.getReconciliationType();return null!==e.identifier&&e.identifierAttribute&&St(t)&&n.is(t)&&n.isMatchingSnapshotId(e,t)}function Or(e){return fe(e)&&(e.flags&ne.Array)>0}vr.prototype.applySnapshot=(0,r.action)(vr.prototype.applySnapshot);var jr="preProcessSnapshot",_r="postProcessSnapshot";function Sr(){return ot(this).toString()}var Ar={name:"AnonymousModel",properties:{},initializers:yt};function Ir(e){return Object.keys(e).reduce(function(e,r){var n,i,o;if(r in t)throw mt("Hook '"+r+"' was defined as property. Hooks should be defined as part of the actions");var a=Object.getOwnPropertyDescriptor(e,r);if("get"in a)throw mt("Getters are not supported as properties. Please use views instead");var u=a.value;if(null==u)throw mt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(It(u))return Object.assign({},e,((n={})[r]=tn(Lr(u),u),n));if(u instanceof hr)return Object.assign({},e,((i={})[r]=tn(u,{}),i));if(u instanceof vr)return Object.assign({},e,((o={})[r]=tn(u,[]),o));if(fe(u))return e;throw Lt()&&"function"==typeof u?mt("Invalid type definition for property '"+r+"', it looks like you passed a function. Did you forget to invoke it, or did you intend to declare a view / action?"):Lt()&&"object"==typeof u?mt("Invalid type definition for property '"+r+"', it looks like you passed an object. Try passing another model type or a types.frozen."):mt("Invalid type definition for property '"+r+"', cannot infer a type from a value like '"+u+"' ("+typeof u+")")},e)}var xr=function(e){function n(t){var r=e.call(this,t.name||Ar.name)||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Object}),Object.defineProperty(r,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.cloneAndEnhance({name:e})}}),Object.defineProperty(r,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(e){return r.cloneAndEnhance({properties:e})}}),Object.defineProperty(r,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.preProcessor;return t?r.cloneAndEnhance({preProcessor:function(r){return t(e(r))}}):r.cloneAndEnhance({preProcessor:e})}}),Object.defineProperty(r,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=r.postProcessor;return t?r.cloneAndEnhance({postProcessor:function(r){return e(t(r))}}):r.cloneAndEnhance({postProcessor:e})}}),Object.assign(r,Ar,t),r.properties=Ir(r.properties),xt(r.properties),r.propertyNames=Object.keys(r.properties),r.identifierAttribute=r._getIdentifierAttribute(),r}return l(n,e),Object.defineProperty(n.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=void 0;return this.forAllProps(function(t,r){if(r.flags&ne.Identifier){if(e)throw mt("Cannot define property '"+t+"' as object identifier, property '"+e+"' is already defined as identifier property");e=t}}),e}}),Object.defineProperty(n.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return new n({name:e.name||this.name,properties:Object.assign({},this.properties,e.properties),initializers:this.initializers.concat(e.initializers||[]),preProcessor:e.preProcessor||this.preProcessor,postProcessor:e.postProcessor||this.postProcessor})}}),Object.defineProperty(n.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateActions(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){if(!St(r))throw mt("actions initializer should return a plain object containing actions");Object.keys(r).forEach(function(n){if(n===jr)throw mt("Cannot define action '"+jr+"', it should be defined using 'type.preProcessSnapshot(fn)' instead");if(n===_r)throw mt("Cannot define action '"+_r+"', it should be defined using 'type.postProcessSnapshot(fn)' instead");var i=r[n],o=e[n];if(n in t&&o){var a=i;i=function(){o.apply(null,arguments),a.apply(null,arguments)}}var u=i.$mst_middleware,l=i.bind(r);l.$mst_middleware=u;var s=Ee(e,n,l);r[n]=s,(Lt()?Nt:Vt)(e,n,s)})}}),Object.defineProperty(n.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if("function"!=typeof e)throw mt("You passed an "+typeof e+" to volatile state as an argument, when function is expected");return this.cloneAndEnhance({initializers:[function(r){return t.instantiateVolatileState(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!St(t))throw mt("volatile state initializer should return a plain object containing state");(0,r.set)(e,t)}}),Object.defineProperty(n.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){var n=e(r),i=n.actions,o=n.views,a=n.state,u=c(n,["actions","views","state"]);for(var l in u)throw mt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '"+l+"'");return a&&t.instantiateVolatileState(r,a),o&&t.instantiateViews(r,o),i&&t.instantiateActions(r,i),r}]})}}),Object.defineProperty(n.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;return this.cloneAndEnhance({initializers:[function(r){return t.instantiateViews(r,e(r)),r}]})}}),Object.defineProperty(n.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!St(t))throw mt("views initializer should return a plain object containing views");Object.keys(t).forEach(function(n){var i,o=Object.getOwnPropertyDescriptor(t,n);if("get"in o)(0,r.defineProperty)(e,n,o),(0,r.makeObservable)(e,((i={})[n]=r.computed,i));else{if("function"!=typeof o.value)throw mt("A view member should either be a function or getter based property");(Lt()?Nt:Vt)(e,n,o.value)}})}}),Object.defineProperty(n.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return et(this,e,t,r,nt(n)?n:this.applySnapshotPreProcessor(n))}}),Object.defineProperty(n.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){void 0===t&&(t={});var r=e.type,n={};return r.forAllProps(function(r,i){n[r]=i.instantiate(e,r,void 0,t[r])}),n}}),Object.defineProperty(n.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return r.observable.object(e,vt,gt)}}),Object.defineProperty(n.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){Vt(t,"toString",Sr),this.forAllProps(function(n){(0,r._interceptReads)(t,n,e.unbox)}),this.initializers.reduce(function(e,t){return t(e)},t),(0,r.intercept)(t,this.willChange),(0,r.observe)(t,this.didChange)}}),Object.defineProperty(n.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=ot(t.object),n=t.name;r.assertWritable({subpath:n});var i=r.type.properties[n];return i&&(Ze(i,t.newValue),t.newValue=i.reconcile(r.getChildNode(n),t.newValue,r,n)),t}}),Object.defineProperty(n.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e,r=ot(t.object);if(r.type.properties[t.name]){var n=t.oldValue?t.oldValue.snapshot:void 0;r.emitPatch({op:"replace",path:rr(t.name),value:t.newValue.snapshot,oldValue:n},r)}}}),Object.defineProperty(n.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this,r=[];return this.forAllProps(function(n){r.push(t.getChildNode(e,n))}),r}}),Object.defineProperty(n.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(!(t in this.properties))throw mt("Not a value property: "+t);var n=(0,r._getAdministration)(e.storedValue,t).raw();if(!n)throw mt("Node not available for property "+t);return n}}),Object.defineProperty(n.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var n=this;void 0===t&&(t=!0);var i={};return this.forAllProps(function(t,o){(0,r.getAtom)(e.storedValue,t).reportObserved(),i[t]=n.getChildNode(e,t).snapshot}),t?this.applySnapshotPostProcessor(i):i}}),Object.defineProperty(n.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r].getSnapshot()}),this.applySnapshotPostProcessor(t)}}),Object.defineProperty(n.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r){if("replace"!==r.op&&"add"!==r.op)throw mt("object does not support operation "+r.op);e.storedValue[t]=r.value}}),Object.defineProperty(n.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.applySnapshotPreProcessor(t);Ze(this,r),this.forAllProps(function(t){e.storedValue[t]=r[t]})}}),Object.defineProperty(n.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.preProcessor;return t?t.call(null,e):e}}),Object.defineProperty(n.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.postProcessor;return t?t.call(null,e):e}}),Object.defineProperty(n.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return Gt(e,1),this.properties[e]}}),Object.defineProperty(n.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this,n=this.applySnapshotPreProcessor(e);return St(n)?Je(this.propertyNames.map(function(e){return r.properties[e].validate(n[e],We(t,e,r.properties[e]))})):Ye(t,n,"Value is not a plain object")}}),Object.defineProperty(n.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;this.propertyNames.forEach(function(r){return e(r,t.properties[r])})}}),Object.defineProperty(n.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;return"{ "+this.propertyNames.map(function(t){return t+": "+e.properties[t].describe()}).join("; ")+" }"}}),Object.defineProperty(n.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return vt}}),Object.defineProperty(n.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){e.storedValue[t]=void 0}}),n}(ce);function Tr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():"AnonymousModel",n=e.shift()||{};return new xr({name:r,properties:n})}function Cr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0],n=r?e[0]:"AnonymousModel";return r&&e.shift(),Lt()&&e.forEach(function(e,t){Ut(e,Er,"mobx-state-tree model type",r?t+2:t+1)}),e.reduce(function(e,t){return e.cloneAndEnhance({name:e.name+"_"+t.name,properties:t.properties,initializers:t.initializers,preProcessor:function(r){return t.applySnapshotPreProcessor(e.applySnapshotPreProcessor(r))},postProcessor:function(r){return t.applySnapshotPostProcessor(e.applySnapshotPostProcessor(r))}})}).named(n)}function Er(e){return fe(e)&&(e.flags&ne.Object)>0}xr.prototype.applySnapshot=(0,r.action)(xr.prototype.applySnapshot);var Vr=function(e){function t(t,r,n,i){void 0===i&&(i=wt);var o=e.call(this,t)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:i}),o.flags=r,o}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.initializer(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return It(e)&&this.checker(e)?Ge():Ye(t,e,"Value is not a "+("Date"===this.name?"Date or a unix milliseconds timestamp":this.name))}}),t}(pe),Nr=new Vr("string",ne.String,function(e){return"string"==typeof e}),Dr=new Vr("number",ne.Number,function(e){return"number"==typeof e}),kr=new Vr("integer",ne.Integer,function(e){return Pt(e)}),Rr=new Vr("boolean",ne.Boolean,function(e){return"boolean"==typeof e}),zr=new Vr("null",ne.Null,function(e){return null===e}),Fr=new Vr("undefined",ne.Undefined,function(e){return void 0===e}),Mr=new Vr("Date",ne.Date,function(e){return"number"==typeof e||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});Mr.getSnapshot=function(e){return e.storedValue.getTime()};var Hr=Mr;function Lr(e){switch(typeof e){case"string":return Nr;case"number":return Dr;case"boolean":return Rr;case"object":if(e instanceof Date)return Hr}throw mt("Cannot determine primitive type from value "+e)}function Ur(e){return fe(e)&&(e.flags&(ne.String|ne.Number|ne.Integer|ne.Boolean|ne.Date))>0}var $r=function(e){function t(t){var r=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(r,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Literal}),r.value=t,r}return l(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return It(e)&&e===this.value?Ge():Ye(t,e,"Value is not a literal "+JSON.stringify(this.value))}}),t}(pe);function Wr(e){return Ut(e,It,"primitive",1),new $r(e)}function Gr(e){return fe(e)&&(e.flags&ne.Literal)>0}var Yr=function(e){function t(t,r,n,i){var o=e.call(this,t)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:i}),o}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this._subtype.validate(e,t);if(r.length>0)return r;var n=nt(e)?ot(e).snapshot:e;return this._predicate(n)?Ge():Ye(t,e,this._message(e))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(se);function Jr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r="string"==typeof e[0]?e.shift():fe(e[0])?e[0].name:null,n=e[0],i=e[1],o=e[2]?e[2]:function(e){return"Value does not respect the refinement predicate"};return be(n,[1,2]),Gt(r,1),$t(i,[2,3]),$t(o,[3,4]),new Yr(r,n,i,o)}function Zr(e){return(e.flags&ne.Refinement)>0}function Br(e,t){var r="string"==typeof e?t:e;Lt()&&r.forEach(function(e,t){Gt(e,t+1)});var n=Kr.apply(void 0,h(r.map(function(e){return Wr(""+e)})));return"string"==typeof e&&(n.name=e),n}var qr=function(e){function t(t,r,n){var i=e.call(this,t)||this;return Object.defineProperty(i,"_types",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(i,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),n=s({eager:!0,dispatcher:void 0},n),i._dispatcher=n.dispatcher,n.eager||(i._eager=!1),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){var e=ne.Union;return this._types.forEach(function(t){e|=t.flags}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._types.some(function(t){return t.isAssignableFrom(e)})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(e){return e.describe()}).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(n,void 0);if(!i)throw mt("No matching type for union "+this.describe());return i.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=this.determineType(t,e.getReconciliationType());if(!i)throw mt("No matching type for union "+this.describe());return i.reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this._dispatcher?this._dispatcher(e):t?t.is(e)?t:this._types.filter(function(e){return e!==t}).find(function(t){return t.is(e)}):this._types.find(function(t){return t.is(e)})}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this._dispatcher)return this._dispatcher(e).validate(e,t);for(var r=[],n=0,i=0;i<this._types.length;i++){var o=this._types[i].validate(e,t);if(0===o.length){if(this._eager)return Ge();n++}else r.push(o)}return 1===n?Ge():Ye(t,e,"No type is applicable for the union").concat(Je(r))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(se);function Kr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=fe(e)?void 0:e,i=fe(e)?h([e],t):t,o="("+i.map(function(e){return e.name}).join(" | ")+")";return Lt()&&(n&&Ut(n,function(e){return St(e)},"object { eager?: boolean, dispatcher?: Function }",1),i.forEach(function(e,t){be(e,n?t+2:t+1)})),new qr(o,i,n)}function Qr(e){return(e.flags&ne.Union)>0}var Xr=function(e){function t(t,r,n){var i=e.call(this,t.name)||this;return Object.defineProperty(i,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(i,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:n}),i}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ne.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(this.optionalValues.indexOf(n)>=0){var i=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(e,t,r,i)}return this._subtype.instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this._subtype.reconcile(e,this.optionalValues.indexOf(t)<0&&this._subtype.is(t)?t:this.getDefaultInstanceOrSnapshot(),r,n)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e="function"==typeof this._defaultValue?this._defaultValue():this._defaultValue;return"function"==typeof this._defaultValue&&Ze(this,e),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return this.optionalValues.indexOf(e)>=0?Ge():this._subtype.validate(e,t)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this._subtype.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(se);function en(e,t){if("function"!=typeof t&&nt(t))throw mt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead");be(e,1),Lt()&&"function"!=typeof t&&Ze(e,t)}function tn(e,t,r){return en(e,t),new Xr(e,t,r||rn)}var rn=[void 0];function nn(e){return fe(e)&&(e.flags&ne.Optional)>0}var on=tn(Fr,void 0),an=tn(zr,null);function un(e){return be(e,1),Kr(e,on)}function ln(e){return be(e,1),Kr(e,an)}var sn=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return l(t,e),Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|ne.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(!this._subType){var t=void 0;try{t=this._definition()}catch(r){if(!(r instanceof ReferenceError))throw r;t=void 0}if(e&&void 0===t)throw mt("Late type seems to be used too early, the definition (still) returns undefined");if(t){if(Lt()&&!fe(t))throw mt("Failed to determine subtype, make sure types.late returns a type definition.");this._subType=t}}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).instantiate(e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return this.getSubType(!0).reconcile(e,t,r,n)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e?e.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){var r=this.getSubType(!1);return r?r.validate(e,t):Ge()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this.getSubType(!1);return!!t&&t.isAssignableFrom(e)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.getSubType(!1);return e||ue}}),t}(se);function cn(e,t){var r="string"==typeof e?e:"late("+e.toString()+")",n="string"==typeof e?t:e;if(Lt()&&("function"!=typeof n||0!==n.length))throw mt("Invalid late type, expected a function with zero arguments that returns a type, got: "+n);return new sn(r,n)}function pn(e){return fe(e)&&(e.flags&ne.Late)>0}var fn=function(e){function t(t){var r=e.call(this,t?"frozen("+t.name+")":"frozen")||this;return Object.defineProperty(r,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Frozen}),r}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,Tt(n))}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Ct(e)?this.subType?this.subType.validate(e,t):Ge():Ye(t,e,"Value is not serializable and cannot be frozen")}}),t}(pe),bn=new fn;function hn(e){return 0===arguments.length?bn:fe(e)?new fn(e):tn(bn,e)}function dn(e){return fe(e)&&(e.flags&ne.Frozen)>0}function yn(e){switch(e){case t.beforeDestroy:return"destroy";case t.beforeDetach:return"detach";default:return}}var vn=function(){function e(e,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Vn(e))this.identifier=e;else{if(!nt(e))throw mt("Can only store references to tree nodes or identifiers, got: '"+e+"'");var r=ot(e);if(!r.identifierAttribute)throw mt("Can only store references with a defined identifier attribute.");var n=r.unnormalizedIdentifier;if(null==n)throw mt("Can only store references to tree nodes with a defined identifier.");this.identifier=n}}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=En(this.identifier),r=e.root,n=r.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==n){var i=this.targetType,o=r.identifierCache.resolve(i,t);if(!o)throw new gn("[mobx-state-tree] Failed to resolve reference '"+this.identifier+"' to type '"+this.targetType.name+"' (from node: "+e.path+")");this.resolvedReference={node:o,lastCacheModification:n}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),gn=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return l(t,e),t}(Error),mn=function(e){function r(t,r){var n=e.call(this,"reference("+t.name+")")||this;return Object.defineProperty(n,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Reference}),n}return l(r,e),Object.defineProperty(r.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(r.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.targetType.isAssignableFrom(e)}}),Object.defineProperty(r.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return Vn(e)?Ge():Ye(t,e,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(r.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=t.parent;if(i&&i.isAlive){var o=i.storedValue;o&&this.onInvalidated({cause:e,parent:o,invalidTarget:n?n.storedValue:void 0,invalidId:r,replaceRef:function(e){m(t.root.storedValue,{op:"replace",value:e,path:t.path})},removeRef:function(){Er(i.type)?this.replaceRef(void 0):m(t.root.storedValue,{op:"remove",path:t.path})}})}}}),Object.defineProperty(r.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r){var n=this,i=this.getValue(e);if(i){var o=ot(i),a=function(t,i){var a=yn(i);a&&n.fireInvalidated(a,e,r,o)},u=o.registerHook(t.beforeDetach,a),l=o.registerHook(t.beforeDestroy,a);return function(){u(),l()}}}}),Object.defineProperty(r.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(e,r,n){var i=this;if(this.onInvalidated){var o;e.registerHook(t.beforeDestroy,function(){o&&o()});var a=function(t){o&&o();var a=e.parent,u=a&&a.storedValue;if(a&&a.isAlive&&u){(n?!!n.get(r,u):e.root.identifierCache.has(i.targetType,En(r)))?o=i.addTargetNodeWatcher(e,r):t||i.fireInvalidated("invalidSnapshotReference",e,r,null)}};e.state===Ke.FINALIZED?a(!0):(e.isRoot||e.root.registerHook(t.afterCreationFinalization,function(){e.parent&&e.parent.createObservableInstanceIfNeeded()}),e.registerHook(t.afterAttach,function(){a(!1)}))}}}),r}(pe),wn=function(e){function t(t,r){return e.call(this,t,r)||this}return l(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return e.storedValue.resolvedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?R(n):n,o=new vn(n,this.targetType),a=tt(this,e,t,r,o);return o.node=a,this.watchTargetNodeForInvalidations(a,i,void 0),a}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!e.isDetaching&&e.type===this){var i=nt(t),o=e.storedValue;if(!i&&o.identifier===t||i&&o.resolvedValue===t)return e.setParent(r,n),e}var a=this.instantiate(r,n,void 0,t);return e.die(),a}}),t}(mn),Pn=function(e){function t(t,r,n){var i=e.call(this,t,n)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),i}return l(t,e),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e.isAlive)return this.options.get(e.storedValue,e.parent?e.parent.storedValue:null)}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(n)?this.options.set(n,e?e.storedValue:null):n,o=tt(this,e,t,r,i);return this.watchTargetNodeForInvalidations(o,i,this.options),o}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=nt(t)?this.options.set(t,e?e.storedValue:null):t;if(!e.isDetaching&&e.type===this&&e.storedValue===i)return e.setParent(r,n),e;var o=this.instantiate(r,n,void 0,i);return e.die(),o}}),t}(mn);function On(e,t){if(be(e,1),Lt()&&2===arguments.length&&"string"==typeof arguments[1])throw mt("References with base path are no longer supported. Please remove the base path.");var r=t||void 0,n=t?t.onInvalidated:void 0;if(r&&(r.get||r.set)){if(Lt()&&(!r.get||!r.set))throw mt("reference options must either contain both a 'get' and a 'set' method or none of them");return new Pn(e,{get:r.get,set:r.set},n)}return new wn(e,n)}function jn(e){return(e.flags&ne.Reference)>0}function _n(e,t){var r=On(e,s(s({},t),{onInvalidated:function(e){t&&t.onInvalidated&&t.onInvalidated(e),e.removeRef()}}));return t&&!1===t.acceptsUndefined?r:un(r)}var Sn=function(e){function t(t,r){var n=e.call(this,t)||this;return Object.defineProperty(n,"validType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Identifier}),n}return l(t,e),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(!(e&&e.type instanceof xr))throw mt("Identifier types can only be instantiated as direct child of a model type");return tt(this,e,t,r,n)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){if(e.storedValue!==t)throw mt("Tried to change identifier from '"+e.storedValue+"' to '"+t+"'. Changing identifiers is not allowed.");return e.setParent(r,n),e}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){return typeof e!==this.validType?Ye(t,e,"Value is not a valid "+this.describe()+", expected a "+this.validType):Ge()}}),t}(pe),An=function(e){function t(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Identifier}),t}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(Sn),In=function(e){function t(){return e.call(this,"identifierNumber","number")||this}return l(t,e),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(Sn),xn=new An,Tn=new In;function Cn(e){return fe(e)&&(e.flags&ne.Identifier)>0}function En(e){return""+e}function Vn(e){return"string"==typeof e||"number"==typeof e}function Nn(e,t){Ut(e,Vn,"string or number (identifier)",t)}function Dn(e){return new kn(e)}var kn=function(e){function t(t){var r=e.call(this,t.name)||this;return Object.defineProperty(r,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ne.Custom}),r}return l(t,e),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t){if(this.options.isTargetType(e))return Ge();var r=this.options.getValidationMessage(e);return r?Ye(t,e,"Invalid value for type '"+this.name+"': "+r):Ge()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.options.toSnapshot(e.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){return tt(this,e,t,r,this.options.isTargetType(n)?n:this.options.fromSnapshot(n,e&&e.root.environment))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,r,n){var i=!this.options.isTargetType(t);if(!e.isDetaching&&(e.type===this&&(i?t===e.snapshot:t===e.storedValue)))return e.setParent(r,n),e;var o=i?this.options.fromSnapshot(t,r.root.environment):t,a=this.instantiate(r,n,void 0,o);return e.die(),a}}),t}(pe),Rn={enumeration:Br,model:Tr,compose:Cr,custom:Dn,reference:On,safeReference:_n,union:Kr,optional:tn,literal:Wr,maybe:un,maybeNull:ln,refinement:Jr,string:Nr,boolean:Rr,number:Dr,integer:kr,Date:Hr,map:dr,array:gr,frozen:hn,identifier:xn,identifierNumber:Tn,late:cn,undefined:Fr,null:zr,snapshotProcessor:sr};exports.types=Rn;
|
|
800
846
|
},{"mobx":"BzvP","process":"g5IB"}],"lvYv":[function(require,module,exports) {
|
|
801
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UndoManager=void 0;const t=require("mobx-state-tree");exports.UndoManager=t.types.model("UndoManager",{history:t.types.array(t.types.frozen()),undoIdx:-1,targetPath:""}).views(t=>({get canUndo(){return t.undoIdx>0},get canRedo(){return t.undoIdx<t.history.length-1}})).actions(e=>{let o,r,n=!1,a=null,d=0,s=!1;function i(){const e=(0,t.getSnapshot)(o);return{pages:e.pages,width:e.width,height:e.height}}function h(e){(0,t.applySnapshot)(o.pages,e.pages),o.setSize(e.width,e.height)}return{startTransaction(){s=!0},endTransaction(t){s=!1,t||this.requestAddState(i())},async ignore(t){e.startTransaction();try{await t()}catch(e){setTimeout(()=>{throw e})}e.endTransaction(!0),
|
|
847
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UndoManager=void 0;const t=require("mobx-state-tree");exports.UndoManager=t.types.model("UndoManager",{history:t.types.array(t.types.frozen()),undoIdx:-1,targetPath:""}).views(t=>({get canUndo(){return t.undoIdx>0},get canRedo(){return t.undoIdx<t.history.length-1}})).actions(e=>{let o,r,n=!1,a=null,d=0,s=!1;function i(){const e=(0,t.getSnapshot)(o);return{pages:e.pages,width:e.width,height:e.height}}function h(e){(0,t.applySnapshot)(o.pages,e.pages),o.setSize(e.width,e.height)}return{startTransaction(){s=!0},endTransaction(t){s=!1,t||this.requestAddState(i())},async ignore(t){e.startTransaction();try{await t()}catch(e){setTimeout(()=>{throw e})}e.endTransaction(!0),clearTimeout(d),d=0},async transaction(t){await e.ignore(t),this.addUndoState()},requestAddState(t){a=t,d||s||(n?n=!1:d=setTimeout(()=>{d=0,clearTimeout(d),s||this.addUndoState()},100))},addUndoState(){if(n)return void(n=!1);const t=e.history[e.undoIdx];JSON.stringify(t)!==JSON.stringify(a)&&(e.history.splice(e.undoIdx+1),e.history.push(a),e.undoIdx=e.history.length-1)},afterCreate(){if(!(o=(0,t.resolvePath)(e,"..")))throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");r=(0,t.onSnapshot)(o,()=>this.requestAddState(i())),0===e.history.length&&this.requestAddState(i())},clear(){clearTimeout(d),d=0,e.history.splice(0,e.history.length),e.undoIdx=-1,e.addUndoState(i())},beforeDestroy(){r()},undo(){d&&this.addUndoState(),e.canUndo?(e.undoIdx--,n=!0,h(e.history[e.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){d&&this.addUndoState(),e.canRedo?(e.undoIdx++,n=!0,h(e.history[e.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){e.history[e.undoIdx]=i()}}}),exports.default=exports.UndoManager;
|
|
802
848
|
},{"mobx-state-tree":"pk4v"}],"n29C":[function(require,module,exports) {
|
|
803
849
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.urlAlphabet=void 0;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";exports.urlAlphabet=e;
|
|
804
850
|
},{}],"iDyL":[function(require,module,exports) {
|
|
805
851
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"urlAlphabet",{enumerable:!0,get:function(){return r.urlAlphabet}}),exports.random=exports.customRandom=exports.customAlphabet=exports.nanoid=void 0;var r=require("./url-alphabet/index.js");var t=function(r){return crypto.getRandomValues(new Uint8Array(r))};exports.random=t;var e=function(r,t,e){var n=(2<<Math.log(r.length-1)/Math.LN2)-1,o=-~(1.6*n*t/r.length);return function(){for(var a="";;)for(var u=e(o),p=o;p--;)if((a+=r[u[p]&n]||"").length===t)return a}};exports.customRandom=e;var n=function(r,n){return e(r,n,t)};exports.customAlphabet=n;var o=function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21,t="",e=crypto.getRandomValues(new Uint8Array(r));r--;){var n=63&e[r];t+=n<36?n.toString(36):n<62?(n-26).toString(36).toUpperCase():n<63?"_":"-"}return t};exports.nanoid=o;
|
|
806
852
|
},{"./url-alphabet/index.js":"n29C"}],"HWHW":[function(require,module,exports) {
|
|
807
|
-
"use strict";async function e(e,o
|
|
853
|
+
"use strict";async function e(e,o){const t=await(await fetch(e)).blob(),d=document.createElement("a"),c=URL.createObjectURL(t);d.href=c,d.download=o,document.body.appendChild(d),d.click(),setTimeout(function(){document.body.removeChild(d),window.URL.revokeObjectURL(c)},0)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.downloadFile=void 0,exports.downloadFile=e;
|
|
808
854
|
},{}],"sptl":[function(require,module,exports) {
|
|
809
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getJsPDF=void 0;const e="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let t;function
|
|
810
|
-
},{}],"
|
|
811
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.setAPI=exports.iconscoutDownload=exports.iconscoutList=exports.unsplashDownload=exports.unsplashList=exports.textTemplateList=exports.templateList=exports.removeBackground=exports.polotnoShapesList=exports.getGoogleFontImage=exports.getGoogleFontsListAPI=exports.URLS=exports.URL=exports.API=void 0;const e=require("./validate-key");exports.API="https://api.polotno.dev/api",exports.URL="https://api.polotno.dev";const o={},t=(e,t)=>{o[e]||(o[e]=!0,console.error(t))},s=(e,o,t)=>e.replace(new RegExp(o,"g"),t),p="API for iconscout is provided as a demonstration.\nFor production usage you have to use your own API endpoint.\nhttps://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement\nhttps://polotno.dev/docs/server-api";exports.URLS={unsplashList:({query:o,page:t=1})=>`${exports.API}/get-unsplash?query=${o}&per_page=20&page=${t}&KEY=${(0,e.getKey)()}`,unsplashDownload:o=>`${exports.API}/download-unsplash?id=${o}&KEY=${(0,e.getKey)()}`,iconscoutList:({query:o,page:s=1})=>(t("iconscout",p),`${exports.API}/get-iconscout?query=${o}&page=${s}&KEY=${(0,e.getKey)()}`),iconscoutDownload:o=>(t("iconscout",p),`${exports.API}/download-iconscout?uuid=${o}&KEY=${(0,e.getKey)()}`),templateList:({query:o,page:t=1,sizeQuery:s})=>`${exports.API}/get-templates?${s}&query=${o}&per_page=30&page=${t}&KEY=${(0,e.getKey)()}`};const r=()=>`${exports.API}/get-google-fonts?KEY=${(0,e.getKey)()}`;exports.getGoogleFontsListAPI=r;const n=e=>{return`${exports.URL}/google-fonts-previews/black/${o=e," ","-",o.replace(new RegExp(" ","g"),"-")}.png`;var o};exports.getGoogleFontImage=n;const a=()=>`${exports.API}/get-basic-shapes?KEY=${(0,e.getKey)()}`;exports.polotnoShapesList=a;const c=()=>`${exports.API}/remove-image-background?KEY=${(0,e.getKey)()}`;exports.removeBackground=c;const i=e=>exports.URLS.templateList(e);exports.templateList=i;const l=()=>`${exports.API}/get-text-templates?KEY=${(0,e.getKey)()}`;exports.textTemplateList=l;const x=e=>exports.URLS.unsplashList(e);exports.unsplashList=x;const g=e=>exports.URLS.unsplashDownload(e);exports.unsplashDownload=g;const u=e=>exports.URLS.iconscoutList(e);exports.iconscoutList=u;const d=e=>exports.URLS.iconscoutDownload(e);exports.iconscoutDownload=d;const L=(e,o)=>{exports.URLS[e]=o};exports.setAPI=L;
|
|
812
|
-
},{"./validate-key":"zree"}],"zree":[function(require,module,exports) {
|
|
813
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.validateKey=exports.getKey=void 0;const e=require("./api");let o="";const t=()=>o||"";exports.getKey=t;const n=5,a=3e3,i="Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.dev/cabinet",r="Polotno API key is not valid. Please get new API key here: https://polotno.dev/cabinet",s="Can not validate Polotno API key. Please report to anton@polotno.dev immediately.",l="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.dev/",d=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${location.origin}" here: https://polotno.dev/cabinet`,c=navigator.userAgent.indexOf("HeadlessChrome")>=0;async function p(t){o=t;for(let o=0;o<5;o++)try{const o=await fetch(e.API+"/validate-key",{method:"POST",body:JSON.stringify({key:t,site:location.host+location.pathname})});if(!t)return console.warn(i),!1;if(200!==o.status){await new Promise(e=>setTimeout(e,3e3));continue}const n=await o.json();return n.is_valid||console.warn(r),n.is_paid||console.log(l,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),n.is_domain_valid||c||console.log(d,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),n.is_paid||!1}catch(t){await new Promise(e=>setTimeout(e,3e3))}return console.error(s),!0}exports.validateKey=p;
|
|
814
|
-
},{"./api":"Ic0q"}],"XXLd":[function(require,module,exports) {
|
|
855
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPdfKit=exports.getJsPDF=void 0;const e="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let t;function o(){return t?Promise.resolve(t):new Promise(o=>{var n=document.createElement("script");n.onload=function(){t=window.jspdf.jsPDF,o(t)},n.src=e,document.head.appendChild(n)})}exports.getJsPDF=o;const n="https://unpkg.com/pdfkit@0.13.0/js/pdfkit.standalone.js",s="https://github.com/devongovett/blob-stream/releases/download/v0.1.3/blob-stream.js";async function r(e){return new Promise(t=>{var o=document.createElement("script");o.onload=function(){t(null)},o.src=e,document.head.appendChild(o)})}let d;async function i(){return d?Promise.resolve(d):(await r(n),await r(s),d=window.PDFDocument)}exports.getPdfKit=i;
|
|
856
|
+
},{}],"XXLd":[function(require,module,exports) {
|
|
815
857
|
"use strict";var t=this&&this.__createBinding||(Object.create?function(t,e,o,n){void 0===n&&(n=o),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[o]}})}:function(t,e,o,n){void 0===n&&(n=o),t[n]=e[o]}),e=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var n={};if(null!=o)for(var r in o)"default"!==r&&Object.prototype.hasOwnProperty.call(o,r)&&t(n,o,r);return e(n,o),n};Object.defineProperty(exports,"__esModule",{value:!0}),exports.injectCustomFont=exports.injectGoogleFont=exports.loadFont=exports.addGlobalFont=exports.globalFonts=exports.getFontsList=exports.setGoogleFonts=exports.isGoogleFontChanged=void 0;const n=o(require("mobx"));let r=n.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),s=!1;function i(){return s}function l(t){s=!0,r.splice(0,r.length),r.push(...t)}function a(){return r}function c(t){exports.globalFonts.push(t)}exports.isGoogleFontChanged=i,exports.setGoogleFonts=l,exports.getFontsList=a,exports.globalFonts=n.observable([]),exports.addGlobalFont=c;var u="Some test text;?#D-ПРИВЕТ!",f=document.createElement("canvas"),d=f.getContext("2d");function p(){return m("Arial")}function m(t){return d.font=`normal 40px '${t}', Arial`,d.measureText(u).width}const g=100,x={Arial:!0};async function h(t){var e;if(x[t])return;const o=!!(null===(e=document.fonts)||void 0===e?void 0:e.load),n=p();if(o)try{if(await document.fonts.load(`16px '${t}'`),n!==m(t))return void(x[t]=!0)}catch(t){}const r=m(t);for(let s=0;s<100;s++){const e=m(t);if(e!==r||e!==n)return void(x[t]=!0);await new Promise(t=>setTimeout(t,60))}console.warn(`Timeout for loading font "${t}". Looks like polotno can't load it. Is it a correct font family?`)}exports.loadFont=h;const y={};function b(t){if(y[t])return;const e=`https://fonts.googleapis.com/css?family=${t.replace(/ /g,"+")}`,o=document.createElement("link");o.type="text/css",o.href=e,o.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(o),y[t]=!0}exports.injectGoogleFont=b;const F={};function v(t){const e=t.fontFamily;if(F[e])return;if(!t.url&&!t.styles)return;const o=document.createElement("style");o.type="text/css";const n=t.styles||(t.url?[{src:`url("${t.url}")`}]:[]);let r="";n.forEach(t=>{r+=`\n @font-face {\n font-family: '${e}';\n src: ${t.src};\n font-style: ${t.fontStyle||"normal"};\n font-weight: ${t.fontWeight||"normal"};\n }\n `}),o.innerHTML=r,document.getElementsByTagName("head")[0].appendChild(o),F[t.fontFamily]=!0}exports.injectCustomFont=v;
|
|
816
858
|
},{"mobx":"BzvP"}],"GRkH":[function(require,module,exports) {
|
|
817
|
-
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var n={};if(null!=o)for(var s in o)"default"!==s&&Object.prototype.hasOwnProperty.call(o,s)&&e(n,o,s);return t(n,o),n},n=this&&this.__rest||function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(o[n[s]]=e[n[s]])}return o},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createStore=exports.Store=exports.Font=exports.Page=exports.registerShapeModel=exports.SVGElement=exports.ImageElement=exports.TextElement=exports.Element=void 0;const i=require("mobx-state-tree"),r=require("./undo-manager"),a=require("nanoid"),d=s(require("konva")),l=require("../utils/download"),c=require("../utils/pdf"),p=require("../utils/validate-key"),g=o(require("../utils/fonts")),h=require("../utils/svg"),f=require("../utils/loader");(0,i.setLivelinessChecking)("ignore"),exports.Element=i.types.model("Element",{id:i.types.identifier,type:"none",x:0,y:0,rotation:0,opacity:1,visible:!0,locked:!1,blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",custom:i.types.frozen(),selectable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{const t=Object.assign(Object.assign({},e),{x:e.x||0,y:e.y||0});return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),t}).postProcessSnapshot(e=>{const t=Object.assign({},e),o={};for(var n in t)"_"!==n[0]&&(o[n]=e[n]);return o}).views(e=>({get page(){return(0,i.getParentOfType)(e,exports.Page)},get store(){return(0,i.getParentOfType)(e,exports.Store)}})).actions(e=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(e))})).actions(e=>({clone(t){const o=e.toJSON();return t.id=t.id||(0,a.nanoid)(10),Object.assign(o,t),e.page.addElement(o)},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementUp(e.id)},moveTop(){e.page.moveElementTop(e.id)},moveDown(){e.page.moveElementDown(e.id)},moveBottom(){e.page.moveElementBottom(e.id)},beforeDestroy(){e.store.history.endTransaction()}})),exports.TextElement=exports.Element.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:14,strokeWidth:0,stroke:"black",lineHeight:i.types.optional(i.types.union(i.types.number,i.types.string),1.2),letterSpacing:0,_editModeEnabled:!1}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontSize:e.fontSize||0})).actions(e=>({toggleEditMode(t){e._editModeEnabled=null!=t?t:!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),exports.ImageElement=exports.Element.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=null!=t?t:!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),exports.SVGElement=exports.Element.named("SVG").props({type:"svg",src:"",maskSrc:"",__svgString:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,colorsReplace:i.types.map(i.types.string)}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{src:e.src||e.svgSource})).views(e=>({get colors(){return e.__svgString?(0,h.getColors)(e.__svgString):[]},get __finalSrc(){return e.__svgString?(0,h.replaceColors)(e.__svgString,e.colorsReplace):this.src},get __isLoaded(){return!!e.__svgString&&(!(Array.from(e.colorsReplace.keys()).length>0)||e.__finalSrc!==e.src)}})).actions(e=>{let t=()=>{};return{async _loadSVG(){if(!e.src)return;const t=await(0,h.urlToString)(e.src);(0,i.isAlive)(e)&&(0,i.hasParent)(e)&&e.store.history.ignore(()=>{e.set({__svgString:(0,h.fixSize)(t)})})},async afterCreate(){e._loadSVG();let o=e.src;t=(0,i.onSnapshot)(e,t=>{t.src===o&&e.__svgString||(e._loadSVG(),o=e.src)})},beforeDestroy(){t()},replaceColor(t,o){e.colorsReplace.set(t,o)}}});const m={svg:exports.SVGElement,text:exports.TextElement,image:exports.ImageElement},y=[];function u(e){const t=e.type;if(!t)throw new Error('You must pass "type" attribute to custom model.');const o=exports.Element.named(t).props(e);m[t]=o,y.push(o)}exports.registerShapeModel=u;const b=[...new Array(20)].map((e,t)=>i.types.late(()=>y[t])),x=i.types.union({dispatcher:e=>m[e.type]},exports.SVGElement,exports.TextElement,exports.ImageElement,...b),E=i.types.array(x);function v({key:e,showCredit:t}={key:"",showCredit:!1}){const o=exports.Store.create();return o.__checkKey(e,t),o}exports.Page=i.types.model("Page",{id:i.types.identifier,children:E,background:"white",custom:i.types.frozen()}).views(e=>({get store(){return(0,i.getParentOfType)(e,exports.Store)}})).actions(e=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(e)),clone(t){const o=e.children.map(e=>{const t=e.toJSON();return t.id=(0,a.nanoid)(10),t}),n=Object.assign({id:(0,a.nanoid)(10),children:o,background:e.background},t),s=e.store.addPage(n),i=e.store.pages.indexOf(e);s.setZIndex(i+1),s.select()},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t){const o=m[t.type];if(!o)return void console.error("Can not find model with type "+t.type);const n=o.create(Object.assign({id:(0,a.nanoid)(10)},t));return e.children.push(n),n.selectable&&e.store.selectElements([n.id]),n},moveElementUp(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(o+1,0,n)},moveElementDown(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(o-1,0,n)},moveElementTop(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.push(n)},moveElementBottom(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(0,0,n)}})),exports.Font=i.types.model("Font",{fontFamily:i.types.string,url:i.types.optional(i.types.string,""),styles:i.types.frozen()}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontFamily:e.fontFamily||e.name})),exports.Store=i.types.model("Store",{role:"",pages:i.types.array(exports.Page),fonts:i.types.array(exports.Font),width:1080,height:1080,scale:1,scaleToFit:1,openedSidePanel:"",selectedElementsIds:i.types.array(i.types.string),history:i.types.optional(r.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:2,_showCredit:!1,_activePageId:""}).views(e=>({get selectedElements(){return e.selectedElementsIds.map(t=>{for(const o of e.pages)for(const e of o.children)if(e.id===t)return e}).filter(e=>!!e)},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)}})).actions(e=>({async __checkKey(t,o){const n=await(0,p.validateKey)(t);e.__(n,o)},__(t,o){e._showCredit=!t||o},setRole(t){e.role=t},getElementById(t){for(const o of e.pages)for(const e of o.children)if(e.id===t)return e},addPage(t){const o=exports.Page.create(Object.assign({id:(0,a.nanoid)(10)},t));return e.pages.push(o),e._activePageId=o.id,o},selectPage(t){e._activePageId=t},selectElements(t){e.selectedElementsIds=(0,i.cast)(t)},openSidePanel(t){e.openedSidePanel=t},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,o,n){if(n){const n=t/e.width,s=o/e.height;for(const t of e.pages)for(const e of t.children)e.set({x:e.x*n,y:e.y*s}),"text"===e.type?e.set({fontSize:e.fontSize*n,width:Math.max(e.width*n,2)}):"image"===e.type?e.set({width:e.width*n,height:e.height*s}):"svg"===e.type&&e.set({width:Math.max(e.width*n,2),height:Math.max(e.height*n,2)})}e.width=t,e.height=o},setPageZIndex(t,o){const n=e.pages.find(e=>e.id===t);n&&((0,i.detach)(n),e.pages.remove(n),e.pages.splice(o,0,n))},deletePages(t){const o=e.pages.indexOf(e.activePage);t.forEach(t=>{const o=e.pages.find(e=>e.id===t);(0,i.destroy)(o)});const n=Math.min(e.pages.length-1,o),s=e.pages[n];s&&(e._activePageId=s.id),e.selectedElementsIds=(0,i.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},deleteElements(t){t.forEach(t=>{e.pages.forEach(e=>{const o=e.children.find(e=>e.id===t);o&&(0,i.destroy)(o)})}),e.selectedElementsIds=(0,i.cast)([])},on(t,o){if("change"===t)return(0,i.onSnapshot)(e,e=>{o(e)})},toDataURL({pixelRatio:t,ignoreBackground:o,pageId:n,mimeType:s}={}){const i=t||1,r=d.default.stages.find(e=>e.getAttr("pageId")===n)||d.default.stages[0];if(!r)throw new Error("Export is failed. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.");const a=r.findOne(".page-container");r.find("Transformer").forEach(e=>e.visible(!1)),a.findOne(".page-background").shadowEnabled(!1),a.findOne(".page-background").strokeEnabled(!1),a.find(".highlighter").forEach(e=>e.visible(!1));const l=a.find(e=>e.getAttr("hideInExport"));l.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.hide()}),o&&a.findOne(".page-background").hide();const c=a.toDataURL({x:a.x(),y:a.y(),width:e.width*a.scaleX(),height:e.height*a.scaleY(),pixelRatio:1/a.scaleX()*i,mimeType:s});return o&&a.findOne(".page-background").show(),l.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),a.findOne(".page-background").shadowEnabled(!0),a.findOne(".page-background").strokeEnabled(!0),r.find("Transformer").forEach(e=>e.visible(!0)),a.find(".highlighter").forEach(e=>e.visible(!0)),c},saveAsImage(t={}){var{fileName:o}=t,s=n(t,["fileName"]);const i=s.mimeType||"image/png",r=i.split("/")[1];(0,l.downloadFile)(e.toDataURL(s),o||"polotno."+r,i)},async _toPDF(t){const o=(t.dpi||72)/72,n=e=>.75*e;var s=new(await(0,c.getJsPDF)())({unit:"pt",orientation:e.width>e.height?"landscape":"portrait",format:[n(e.width),n(e.height)]}),i=s.internal.pageSize.getWidth(),r=s.internal.pageSize.getHeight();const a=e._elementsPixelRatio;return e.setElementsPixelRatio(o),e.pages.forEach((n,a)=>{0!==a&&s.addPage(),s.addImage(e.toDataURL(Object.assign(Object.assign({},t),{pageId:n.id,pixelRatio:o})),0,0,i,r,void 0,"SLOW")}),e.setElementsPixelRatio(a),s},toPDFDataURL:async t=>(await e._toPDF(Object.assign({mimeType:"image/jpg"},t))).output("datauristring"),async saveAsPDF(t={}){var{fileName:o,dpi:s}=t,i=n(t,["fileName","dpi"]);(await e._toPDF(Object.assign({mimeType:"image/jpg"},i))).save(o||"polotno.pdf")},async waitLoading(){await(0,f.whenLoaded)()},toJSON:()=>({width:e.width,height:e.height,fonts:(0,i.getSnapshot)(e.fonts),pages:(0,i.getSnapshot)(e.pages)}),loadJSON(t,o=!1){var n;e.pages.forEach(e=>e.children.forEach(e=>(0,i.detach)(e))),e.pages=(0,i.cast)([]),t._activePageId=null===(n=t.pages[0])||void 0===n?void 0:n.id,t.scale=e.scale,t._isKeyValid=e._isKeyValid,t.openedSidePanel=e.openedSidePanel,o&&(t.history=e.history.toJSON()),(0,i.applySnapshot)(e,t)},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(e=>e.fontFamily===t).forEach(e=>(0,i.destroy)(e))},async loadFont(t){const o=e.fonts.find(e=>e.fontFamily===t)||g.globalFonts.find(e=>e.fontFamily===t);o?g.injectCustomFont(o):g.injectGoogleFont(t),await g.loadFont(t)}})),exports.createStore=v,exports.default=v;
|
|
859
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[o]}})}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(o){if(o&&o.__esModule)return o;var n={};if(null!=o)for(var s in o)"default"!==s&&Object.prototype.hasOwnProperty.call(o,s)&&e(n,o,s);return t(n,o),n},n=this&&this.__rest||function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(o[n[s]]=e[n[s]])}return o},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createStore=exports.Store=exports.Font=exports.Page=exports.registerShapeModel=exports.SVGElement=exports.ImageElement=exports.TextElement=exports.Element=void 0;const i=require("mobx-state-tree"),r=require("./undo-manager"),a=require("nanoid"),l=s(require("konva")),d=require("../utils/download"),c=require("../utils/pdf"),p=require("../utils/validate-key"),g=o(require("../utils/fonts")),h=require("../utils/svg"),f=require("../utils/loader");(0,i.setLivelinessChecking)("ignore"),exports.Element=i.types.model("Element",{id:i.types.identifier,type:"none",x:0,y:0,rotation:0,opacity:1,visible:!0,locked:!1,blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",custom:i.types.frozen(),selectable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(e=>{const t=Object.assign(Object.assign({},e),{x:e.x||0,y:e.y||0});return"width"in e&&(t.width=t.width||1),"height"in e&&(t.height=t.height||1),t}).postProcessSnapshot(e=>{const t=Object.assign({},e),o={};for(var n in t)"_"!==n[0]&&(o[n]=e[n]);return o}).views(e=>({get page(){return(0,i.getParentOfType)(e,exports.Page)},get store(){return(0,i.getParentOfType)(e,exports.Store)}})).actions(e=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(e))})).actions(e=>({clone(t){const o=e.toJSON();return t.id=t.id||(0,a.nanoid)(10),Object.assign(o,t),e.page.addElement(o)},set(t){Object.assign(e,t)},moveUp(){e.page.moveElementUp(e.id)},moveTop(){e.page.moveElementTop(e.id)},moveDown(){e.page.moveElementDown(e.id)},moveBottom(){e.page.moveElementBottom(e.id)},beforeDestroy(){e.store.history.endTransaction()}})),exports.TextElement=exports.Element.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:14,strokeWidth:0,stroke:"black",lineHeight:i.types.optional(i.types.union(i.types.number,i.types.string),1.2),letterSpacing:0,_editModeEnabled:!1}).preProcessSnapshot(e=>Object.assign({},e)).actions(e=>({toggleEditMode(t){e._editModeEnabled=null!=t?t:!e._editModeEnabled,e._editModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),exports.ImageElement=exports.Element.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,_cropModeEnabled:!1}).actions(e=>({toggleCropMode(t){e._cropModeEnabled=null!=t?t:!e._cropModeEnabled,e._cropModeEnabled?e.store.history.startTransaction():e.store.history.endTransaction()}})),exports.SVGElement=exports.Element.named("SVG").props({type:"svg",src:"",maskSrc:"",__svgString:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,colorsReplace:i.types.map(i.types.string)}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{src:e.src||e.svgSource})).views(e=>({get colors(){return e.__svgString?(0,h.getColors)(e.__svgString):[]},get __finalSrc(){return e.__svgString?(0,h.replaceColors)(e.__svgString,e.colorsReplace):this.src},get __isLoaded(){return!!e.__svgString&&(!(Array.from(e.colorsReplace.keys()).length>0)||e.__finalSrc!==e.src)}})).actions(e=>{let t=()=>{};return{async _loadSVG(){if(!e.src)return;const t=await(0,h.urlToString)(e.src);(0,i.isAlive)(e)&&(0,i.hasParent)(e)&&e.store.history.ignore(()=>{e.set({__svgString:(0,h.fixSize)(t)})})},async afterCreate(){e._loadSVG();let o=e.src;t=(0,i.onSnapshot)(e,t=>{t.src===o&&e.__svgString||(e._loadSVG(),o=e.src)})},beforeDestroy(){t()},replaceColor(t,o){e.colorsReplace.set(t,o)}}});const m={svg:exports.SVGElement,text:exports.TextElement,image:exports.ImageElement},u=[];function y(e){const t=e.type;if(!t)throw new Error('You must pass "type" attribute to custom model.');const o=exports.Element.named(t).props(e);m[t]=o,u.push(o)}exports.registerShapeModel=y;const b=[...new Array(20)].map((e,t)=>i.types.late(()=>u[t])),x=i.types.union({dispatcher:e=>{const t=m[e.type];if(!t)throw new Error(`Unknown element type: "${e.type}"`);return t}},exports.SVGElement,exports.TextElement,exports.ImageElement,...b);function v({key:e,showCredit:t}={key:"",showCredit:!1}){const o=exports.Store.create();return(0,p.validateKey)(e,t),o}exports.Page=i.types.model("Page",{id:i.types.identifier,children:i.types.array(x),width:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),height:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),background:"white",bleed:0,custom:i.types.frozen(),_exporting:!1}).postProcessSnapshot(e=>{const t=Object.assign({},e),o={};for(var n in t)"_"!==n[0]&&(o[n]=e[n]);return o}).views(e=>({get store(){return(0,i.getParentOfType)(e,exports.Store)}})).views(e=>({get computedWidth(){return"auto"===e.width?e.store.width:e.width},get computedHeight(){return"auto"===e.height?e.store.height:e.height}})).actions(e=>({toJSON:()=>JSON.parse(JSON.stringify((0,i.getSnapshot)(e))),clone(t){const o=e.toJSON();o.children.forEach(e=>{e.id=(0,a.nanoid)(10)});const n=Object.assign(Object.assign(Object.assign({},o),{id:(0,a.nanoid)(10)}),t),s=e.store.addPage(n),i=e.store.pages.indexOf(e);s.setZIndex(i+1),s.select()},setZIndex(t){e.store.setPageZIndex(e.id,t)},set(t){Object.assign(e,t)},select(){e.store.selectPage(e.id)},addElement(t){const o=m[t.type];if(!o)return void console.error("Can not find model with type "+t.type);const n=o.create(Object.assign({id:(0,a.nanoid)(10)},t));return e.children.push(n),n.selectable&&e.store.selectElements([n.id]),n},moveElementUp(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(o+1,0,n)},moveElementDown(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(o-1,0,n)},moveElementTop(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.push(n)},moveElementBottom(t){const o=e.children.findIndex(e=>e.id===t),n=e.children[o];(0,i.detach)(n),e.children.remove(n),e.children.splice(0,0,n)}})),exports.Font=i.types.model("Font",{fontFamily:i.types.string,url:i.types.optional(i.types.string,""),styles:i.types.frozen()}).preProcessSnapshot(e=>Object.assign(Object.assign({},e),{fontFamily:e.fontFamily||e.name})),exports.Store=i.types.model("Store",{role:"",pages:i.types.array(exports.Page),fonts:i.types.array(exports.Font),width:1080,height:1080,scale:1,scaleToFit:1,_bleedVisible:!1,openedSidePanel:"",selectedElementsIds:i.types.array(i.types.string),history:i.types.optional(r.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:2,_activePageId:""}).views(e=>({get selectedElements(){return e.selectedElementsIds.map(t=>{for(const o of e.pages)for(const e of o.children)if(e.id===t)return e}).filter(e=>!!e)},get activePage(){return e.pages.slice().find(t=>t.id===e._activePageId)||(e.pages.length?e.pages[0]:null)}})).actions(e=>({setRole(t){e.role=t},getElementById(t){for(const o of e.pages)for(const e of o.children)if(e.id===t)return e},addPage(t){const o=exports.Page.create(Object.assign({id:(0,a.nanoid)(10)},t));return e.pages.push(o),e._activePageId=o.id,o},selectPage(t){e._activePageId=t},selectElements(t){e.selectedElementsIds=(0,i.cast)(t)},_toggleBleed(t){e._bleedVisible=null!=t?t:!e._bleedVisible},openSidePanel(t){e.openedSidePanel=t},setScale(t){e.scale=t},_setScaleToFit(t){e.scaleToFit=t},setElementsPixelRatio(t){e._elementsPixelRatio=t},setSize(t,o,n){if(n){const n=t/e.width,s=o/e.height;for(const t of e.pages)for(const e of t.children)e.set({x:e.x*n,y:e.y*s}),"text"===e.type?e.set({fontSize:e.fontSize*n,width:Math.max(e.width*n,2)}):"image"===e.type?e.set({width:e.width*n,height:e.height*s}):"svg"===e.type&&e.set({width:Math.max(e.width*n,2),height:Math.max(e.height*n,2)})}e.width=t,e.height=o},setPageZIndex(t,o){const n=e.pages.find(e=>e.id===t);n&&((0,i.detach)(n),e.pages.remove(n),e.pages.splice(o,0,n))},deletePages(t){const o=e.pages.indexOf(e.activePage);t.forEach(t=>{const o=e.pages.find(e=>e.id===t);(0,i.destroy)(o)});const n=Math.min(e.pages.length-1,o),s=e.pages[n];s&&(e._activePageId=s.id),e.selectedElementsIds=(0,i.cast)(e.selectedElementsIds.filter(t=>e.getElementById(t)))},deleteElements(t){t.forEach(t=>{e.pages.forEach(e=>{const o=e.children.find(e=>e.id===t);o&&(0,i.destroy)(o)})}),e.selectedElementsIds=(0,i.cast)([])},on(t,o){if("change"===t){let t=e.toJSON();return(0,i.onSnapshot)(e,n=>{const s=e.toJSON();JSON.stringify(s)!==JSON.stringify(t)&&(t=s,o(s))})}},async toDataURL({pixelRatio:t,ignoreBackground:o,pageId:n,mimeType:s,includeBleed:i,quality:r}={}){var a;const d=t||1;n=n||(null===(a=e.pages[0])||void 0===a?void 0:a.id);const c=e.pages.find(e=>e.id===n);if(!c)throw new Error(`No page for export with id ${n}`);null==c||c.set({_exporting:!0}),await new Promise(e=>{setTimeout(e,0)}),await e.waitLoading();const p=l.default.stages.find(e=>e.getAttr("pageId")===n);if(!p)throw new Error(`Export is failed. Can not find stage for page ${n}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const g=p.findOne(".page-container");p.find("Transformer").forEach(e=>e.visible(!1)),g.findOne(".page-background").shadowEnabled(!1),g.findOne(".page-background").strokeEnabled(!1),g.find(".highlighter").forEach(e=>e.visible(!1));const h=g.findOne(".page-background-group"),f=h.clip();h.clip({x:null,y:null,width:null,height:null});const m=g.find(e=>e.getAttr("hideInExport"));m.forEach(e=>{e.setAttr("oldVisible",e.visible()),e.hide()}),o&&g.findOne(".page-background").hide();const u=i?c.bleed:0;let y=u;e._bleedVisible&&i?y=0:e._bleedVisible&&!i&&(y=-c.bleed);const b=g.toDataURL({x:g.x()-y*g.scaleX(),y:g.y()-y*g.scaleY(),width:(c.computedWidth+2*u)*g.scaleX(),height:(c.computedHeight+2*u)*g.scaleY(),pixelRatio:1/g.scaleX()*d,mimeType:s,quality:r});return o&&g.findOne(".page-background").show(),m.forEach(e=>{e.visible(e.getAttr("oldVisible"))}),g.findOne(".page-background").shadowEnabled(!0),g.findOne(".page-background").strokeEnabled(!0),p.find("Transformer").forEach(e=>e.visible(!0)),g.find(".highlighter").forEach(e=>e.visible(!0)),h.clip(f),null==c||c.set({_exporting:!1}),b},async saveAsImage(t={}){var{fileName:o}=t,s=n(t,["fileName"]);const i=s.mimeType||"image/png",r=i.split("/")[1];(0,d.downloadFile)(await e.toDataURL(s),o||"polotno."+r,i)},async _toPDF(t){const o=t.dpi||300,n=e=>.75*e;var s=new(await(0,c.getJsPDF)())({unit:"pt",orientation:e.width>e.height?"landscape":"portrait",format:[n(e.width),n(e.height)],compress:!0});s.deletePage(1);const i=e._elementsPixelRatio,r=o/72;e.setElementsPixelRatio(r),await new Promise(e=>setTimeout(e));for(const a of e.pages){const o=t.includeBleed?a.bleed:0,i=n(a.computedWidth+o),l=n(a.computedHeight+o);s.addPage([i,l],i>l?"landscape":"portrait");let d=0,c=r;for(;d<10;){2===(d+=1)&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const o=await e.toDataURL(Object.assign(Object.assign({},t),{pageId:a.id,pixelRatio:c}));if(o.length>20){s.addImage(o,0,0,i,l,void 0,"FAST");break}c*=.8}}return e.setElementsPixelRatio(i),s},toPDFDataURL:async t=>(await e._toPDF(Object.assign({mimeType:"image/jpeg"},t))).output("datauristring"),async saveAsPDF(t={}){var{fileName:o}=t,s=n(t,["fileName"]);(await e._toPDF(Object.assign({mimeType:"image/jpeg"},s))).save(o||"polotno.pdf")},async waitLoading(){await(0,f.whenLoaded)()},toJSON:()=>({width:e.width,height:e.height,fonts:(0,i.getSnapshot)(e.fonts),pages:(0,i.getSnapshot)(e.pages)}),loadJSON(t,o=!1){var n;const s=Object.assign({},t);e.pages.forEach(e=>e.children.forEach(e=>(0,i.detach)(e))),e.pages=(0,i.cast)([]),s._activePageId=null===(n=s.pages[0])||void 0===n?void 0:n.id,s.scale=e.scale,s.openedSidePanel=e.openedSidePanel,s._bleedVisible=e._bleedVisible,o&&(s.history=e.history.toJSON()),(0,i.applySnapshot)(e,s)},addFont(t){e.removeFont(t.fontFamily),e.fonts.push(t),e.loadFont(t.fontFamily)},removeFont(t){e.fonts.filter(e=>e.fontFamily===t).forEach(e=>(0,i.destroy)(e))},async loadFont(t){const o=e.fonts.find(e=>e.fontFamily===t)||g.globalFonts.find(e=>e.fontFamily===t);o?g.injectCustomFont(o):g.injectGoogleFont(t),await g.loadFont(t)}})),exports.createStore=v,exports.default=v;
|
|
818
860
|
},{"mobx-state-tree":"pk4v","./undo-manager":"lvYv","nanoid":"iDyL","konva":"aTGn","../utils/download":"HWHW","../utils/pdf":"sptl","../utils/validate-key":"zree","../utils/fonts":"XXLd","../utils/svg":"B1DI","../utils/loader":"bN4e"}],"IVsl":[function(require,module,exports) {
|
|
819
861
|
"use strict";var e=l(require("react")),o=l(require("react-dom")),r=require("polotno/canvas/workspace"),t=require("polotno/model/store"),a=require("polotno/canvas/use-fadein"),n=require("polotno/utils/fonts");function l(e){return e&&e.__esModule?e:{default:e}}(0,a.toggleFadeInAnimation)(!1);var d=new URLSearchParams(location.search).get("key"),i=(0,t.createStore)({key:d});window.store=i,window.config={addGlobalFont:n.addGlobalFont},o.default.render(e.default.createElement(r.Workspace,{store:i}),document.getElementById("root"));
|
|
820
862
|
},{"react":"HdMw","react-dom":"X9zx","polotno/canvas/workspace":"twsc","polotno/model/store":"GRkH","polotno/canvas/use-fadein":"N3c2","polotno/utils/fonts":"XXLd"}]},{},["IVsl"], null)
|
|
821
|
-
//# sourceMappingURL=client.
|
|
863
|
+
//# sourceMappingURL=client.3b178911.js.map
|