polotno-node 2.11.6 → 2.11.7
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/assets/index-YTXoD22f.js +329 -0
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/index-Dqn1Kcya.js +0 -315
|
@@ -1,315 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function t(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(a){if(a.ep)return;a.ep=!0;const l=t(a);fetch(a.href,l)}})();var cc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rs(e){if(e.__esModule)return e;var i=e.default;if(typeof i=="function"){var t=function r(){return this instanceof r?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};t.prototype=i.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),t}var Ag={exports:{}},Dt={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Mm;function R_(){if(Mm)return Dt;Mm=1;var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),S=Symbol.iterator;function w(B){return B===null||typeof B!="object"?null:(B=S&&B[S]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function g(B,U,W){this.props=B,this.context=U,this.refs=v,this.updater=W||b}g.prototype.isReactComponent={},g.prototype.setState=function(B,U){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,U,"setState")},g.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function O(){}O.prototype=g.prototype;function h(B,U,W){this.props=B,this.context=U,this.refs=v,this.updater=W||b}var p=h.prototype=new O;p.constructor=h,y(p,g.prototype),p.isPureReactComponent=!0;var m=Array.isArray,x=Object.prototype.hasOwnProperty,N={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function I(B,U,W){var ee,ne={},te=null,Z=null;if(U!=null)for(ee in U.ref!==void 0&&(Z=U.ref),U.key!==void 0&&(te=""+U.key),U)x.call(U,ee)&&!T.hasOwnProperty(ee)&&(ne[ee]=U[ee]);var ae=arguments.length-2;if(ae===1)ne.children=W;else if(1<ae){for(var H=Array(ae),J=0;J<ae;J++)H[J]=arguments[J+2];ne.children=H}if(B&&B.defaultProps)for(ee in ae=B.defaultProps,ae)ne[ee]===void 0&&(ne[ee]=ae[ee]);return{$$typeof:e,type:B,key:te,ref:Z,props:ne,_owner:N.current}}function R(B,U){return{$$typeof:e,type:B.type,key:U,ref:B.ref,props:B.props,_owner:B._owner}}function C(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function M(B){var U={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(W){return U[W]})}var k=/\/+/g;function A(B,U){return typeof B=="object"&&B!==null&&B.key!=null?M(""+B.key):U.toString(36)}function L(B,U,W,ee,ne){var te=typeof B;(te==="undefined"||te==="boolean")&&(B=null);var Z=!1;if(B===null)Z=!0;else switch(te){case"string":case"number":Z=!0;break;case"object":switch(B.$$typeof){case e:case i:Z=!0}}if(Z)return Z=B,ne=ne(Z),B=ee===""?"."+A(Z,0):ee,m(ne)?(W="",B!=null&&(W=B.replace(k,"$&/")+"/"),L(ne,U,W,"",function(J){return J})):ne!=null&&(C(ne)&&(ne=R(ne,W+(!ne.key||Z&&Z.key===ne.key?"":(""+ne.key).replace(k,"$&/")+"/")+B)),U.push(ne)),1;if(Z=0,ee=ee===""?".":ee+":",m(B))for(var ae=0;ae<B.length;ae++){te=B[ae];var H=ee+A(te,ae);Z+=L(te,U,W,H,ne)}else if(H=w(B),typeof H=="function")for(B=H.call(B),ae=0;!(te=B.next()).done;)te=te.value,H=ee+A(te,ae++),Z+=L(te,U,W,H,ne);else if(te==="object")throw U=String(B),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return Z}function z(B,U,W){if(B==null)return B;var ee=[],ne=0;return L(B,ee,"","",function(te){return U.call(W,te,ne++)}),ee}function Y(B){if(B._status===-1){var U=B._result;U=U(),U.then(function(W){(B._status===0||B._status===-1)&&(B._status=1,B._result=W)},function(W){(B._status===0||B._status===-1)&&(B._status=2,B._result=W)}),B._status===-1&&(B._status=0,B._result=U)}if(B._status===1)return B._result.default;throw B._result}var $={current:null},X={transition:null},q={ReactCurrentDispatcher:$,ReactCurrentBatchConfig:X,ReactCurrentOwner:N};function D(){throw Error("act(...) is not supported in production builds of React.")}return Dt.Children={map:z,forEach:function(B,U,W){z(B,function(){U.apply(this,arguments)},W)},count:function(B){var U=0;return z(B,function(){U++}),U},toArray:function(B){return z(B,function(U){return U})||[]},only:function(B){if(!C(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},Dt.Component=g,Dt.Fragment=t,Dt.Profiler=a,Dt.PureComponent=h,Dt.StrictMode=r,Dt.Suspense=f,Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q,Dt.act=D,Dt.cloneElement=function(B,U,W){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var ee=y({},B.props),ne=B.key,te=B.ref,Z=B._owner;if(U!=null){if(U.ref!==void 0&&(te=U.ref,Z=N.current),U.key!==void 0&&(ne=""+U.key),B.type&&B.type.defaultProps)var ae=B.type.defaultProps;for(H in U)x.call(U,H)&&!T.hasOwnProperty(H)&&(ee[H]=U[H]===void 0&&ae!==void 0?ae[H]:U[H])}var H=arguments.length-2;if(H===1)ee.children=W;else if(1<H){ae=Array(H);for(var J=0;J<H;J++)ae[J]=arguments[J+2];ee.children=ae}return{$$typeof:e,type:B.type,key:ne,ref:te,props:ee,_owner:Z}},Dt.createContext=function(B){return B={$$typeof:s,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:l,_context:B},B.Consumer=B},Dt.createElement=I,Dt.createFactory=function(B){var U=I.bind(null,B);return U.type=B,U},Dt.createRef=function(){return{current:null}},Dt.forwardRef=function(B){return{$$typeof:c,render:B}},Dt.isValidElement=C,Dt.lazy=function(B){return{$$typeof:_,_payload:{_status:-1,_result:B},_init:Y}},Dt.memo=function(B,U){return{$$typeof:E,type:B,compare:U===void 0?null:U}},Dt.startTransition=function(B){var U=X.transition;X.transition={};try{B()}finally{X.transition=U}},Dt.unstable_act=D,Dt.useCallback=function(B,U){return $.current.useCallback(B,U)},Dt.useContext=function(B){return $.current.useContext(B)},Dt.useDebugValue=function(){},Dt.useDeferredValue=function(B){return $.current.useDeferredValue(B)},Dt.useEffect=function(B,U){return $.current.useEffect(B,U)},Dt.useId=function(){return $.current.useId()},Dt.useImperativeHandle=function(B,U,W){return $.current.useImperativeHandle(B,U,W)},Dt.useInsertionEffect=function(B,U){return $.current.useInsertionEffect(B,U)},Dt.useLayoutEffect=function(B,U){return $.current.useLayoutEffect(B,U)},Dt.useMemo=function(B,U){return $.current.useMemo(B,U)},Dt.useReducer=function(B,U,W){return $.current.useReducer(B,U,W)},Dt.useRef=function(B){return $.current.useRef(B)},Dt.useState=function(B){return $.current.useState(B)},Dt.useSyncExternalStore=function(B,U,W){return $.current.useSyncExternalStore(B,U,W)},Dt.useTransition=function(){return $.current.useTransition()},Dt.version="18.3.1",Dt}var Lm;function Ar(){return Lm||(Lm=1,Ag.exports=R_()),Ag.exports}var Or=Ar();const Gt=zd(Or);var ep={},Tg={exports:{}},bi={},Rg={exports:{}},Mg={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Nm;function M_(){return Nm||(Nm=1,function(e){function i(X,q){var D=X.length;X.push(q);e:for(;0<D;){var B=D-1>>>1,U=X[B];if(0<a(U,q))X[B]=q,X[D]=U,D=B;else break e}}function t(X){return X.length===0?null:X[0]}function r(X){if(X.length===0)return null;var q=X[0],D=X.pop();if(D!==q){X[0]=D;e:for(var B=0,U=X.length,W=U>>>1;B<W;){var ee=2*(B+1)-1,ne=X[ee],te=ee+1,Z=X[te];if(0>a(ne,D))te<U&&0>a(Z,ne)?(X[B]=Z,X[te]=D,B=te):(X[B]=ne,X[ee]=D,B=ee);else if(te<U&&0>a(Z,D))X[B]=Z,X[te]=D,B=te;else break e}}return q}function a(X,q){var D=X.sortIndex-q.sortIndex;return D!==0?D:X.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var f=[],E=[],_=1,S=null,w=3,b=!1,y=!1,v=!1,g=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(X){for(var q=t(E);q!==null;){if(q.callback===null)r(E);else if(q.startTime<=X)r(E),q.sortIndex=q.expirationTime,i(f,q);else break;q=t(E)}}function m(X){if(v=!1,p(X),!y)if(t(f)!==null)y=!0,Y(x);else{var q=t(E);q!==null&&$(m,q.startTime-X)}}function x(X,q){y=!1,v&&(v=!1,O(I),I=-1),b=!0;var D=w;try{for(p(q),S=t(f);S!==null&&(!(S.expirationTime>q)||X&&!M());){var B=S.callback;if(typeof B=="function"){S.callback=null,w=S.priorityLevel;var U=B(S.expirationTime<=q);q=e.unstable_now(),typeof U=="function"?S.callback=U:S===t(f)&&r(f),p(q)}else r(f);S=t(f)}if(S!==null)var W=!0;else{var ee=t(E);ee!==null&&$(m,ee.startTime-q),W=!1}return W}finally{S=null,w=D,b=!1}}var N=!1,T=null,I=-1,R=5,C=-1;function M(){return!(e.unstable_now()-C<R)}function k(){if(T!==null){var X=e.unstable_now();C=X;var q=!0;try{q=T(!0,X)}finally{q?A():(N=!1,T=null)}}else N=!1}var A;if(typeof h=="function")A=function(){h(k)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,z=L.port2;L.port1.onmessage=k,A=function(){z.postMessage(null)}}else A=function(){g(k,0)};function Y(X){T=X,N||(N=!0,A())}function $(X,q){I=g(function(){X(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_continueExecution=function(){y||b||(y=!0,Y(x))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_getFirstCallbackNode=function(){return t(f)},e.unstable_next=function(X){switch(w){case 1:case 2:case 3:var q=3;break;default:q=w}var D=w;w=q;try{return X()}finally{w=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,q){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var D=w;w=X;try{return q()}finally{w=D}},e.unstable_scheduleCallback=function(X,q,D){var B=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?B+D:B):D=B,X){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=D+U,X={id:_++,callback:q,priorityLevel:X,startTime:D,expirationTime:U,sortIndex:-1},D>B?(X.sortIndex=D,i(E,X),t(f)===null&&X===t(E)&&(v?(O(I),I=-1):v=!0,$(m,D-B))):(X.sortIndex=U,i(f,X),y||b||(y=!0,Y(x))),X},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(X){var q=w;return function(){var D=w;w=q;try{return X.apply(this,arguments)}finally{w=D}}}}(Mg)),Mg}var Im;function lv(){return Im||(Im=1,Rg.exports=M_()),Rg.exports}/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var jm;function L_(){if(jm)return bi;jm=1;var e=Ar(),i=lv();function t(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,P=1;P<arguments.length;P++)o+="&args[]="+encodeURIComponent(arguments[P]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function l(n,o){s(n,o),s(n+"Capture",o)}function s(n,o){for(a[n]=o,n=0;n<o.length;n++)r.add(o[n])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,E=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_={},S={};function w(n){return f.call(S,n)?!0:f.call(_,n)?!1:E.test(n)?S[n]=!0:(_[n]=!0,!1)}function b(n,o,P,F){if(P!==null&&P.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return F?!1:P!==null?!P.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function y(n,o,P,F){if(o===null||typeof o>"u"||b(n,o,P,F))return!0;if(F)return!1;if(P!==null)switch(P.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function v(n,o,P,F,V,Q,oe){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=F,this.attributeNamespace=V,this.mustUseProperty=P,this.propertyName=n,this.type=o,this.sanitizeURL=Q,this.removeEmptyString=oe}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){g[n]=new v(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];g[o]=new v(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){g[n]=new v(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){g[n]=new v(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){g[n]=new v(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){g[n]=new v(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){g[n]=new v(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){g[n]=new v(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){g[n]=new v(n,5,!1,n.toLowerCase(),null,!1,!1)});var O=/[\-:]([a-z])/g;function h(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var o=n.replace(O,h);g[o]=new v(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(O,h);g[o]=new v(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(O,h);g[o]=new v(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){g[n]=new v(n,1,!1,n.toLowerCase(),null,!1,!1)}),g.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){g[n]=new v(n,1,!1,n.toLowerCase(),null,!0,!0)});function p(n,o,P,F){var V=g.hasOwnProperty(o)?g[o]:null;(V!==null?V.type!==0:F||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(y(o,P,V,F)&&(P=null),F||V===null?w(o)&&(P===null?n.removeAttribute(o):n.setAttribute(o,""+P)):V.mustUseProperty?n[V.propertyName]=P===null?V.type===3?!1:"":P:(o=V.attributeName,F=V.attributeNamespace,P===null?n.removeAttribute(o):(V=V.type,P=V===3||V===4&&P===!0?"":""+P,F?n.setAttributeNS(F,o,P):n.setAttribute(o,P))))}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),M=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),$=Symbol.for("react.offscreen"),X=Symbol.iterator;function q(n){return n===null||typeof n!="object"?null:(n=X&&n[X]||n["@@iterator"],typeof n=="function"?n:null)}var D=Object.assign,B;function U(n){if(B===void 0)try{throw Error()}catch(P){var o=P.stack.trim().match(/\n( *(at )?)/);B=o&&o[1]||""}return`
|
|
26
|
-
`+B+n}var W=!1;function ee(n,o){if(!n||W)return"";W=!0;var P=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Re){var F=Re}Reflect.construct(n,[],o)}else{try{o.call()}catch(Re){F=Re}n.call(o.prototype)}else{try{throw Error()}catch(Re){F=Re}n()}}catch(Re){if(Re&&F&&typeof Re.stack=="string"){for(var V=Re.stack.split(`
|
|
27
|
-
`),Q=F.stack.split(`
|
|
28
|
-
`),oe=V.length-1,de=Q.length-1;1<=oe&&0<=de&&V[oe]!==Q[de];)de--;for(;1<=oe&&0<=de;oe--,de--)if(V[oe]!==Q[de]){if(oe!==1||de!==1)do if(oe--,de--,0>de||V[oe]!==Q[de]){var ge=`
|
|
29
|
-
`+V[oe].replace(" at new "," at ");return n.displayName&&ge.includes("<anonymous>")&&(ge=ge.replace("<anonymous>",n.displayName)),ge}while(1<=oe&&0<=de);break}}}finally{W=!1,Error.prepareStackTrace=P}return(n=n?n.displayName||n.name:"")?U(n):""}function ne(n){switch(n.tag){case 5:return U(n.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return n=ee(n.type,!1),n;case 11:return n=ee(n.type.render,!1),n;case 1:return n=ee(n.type,!0),n;default:return""}}function te(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case N:return"Portal";case R:return"Profiler";case I:return"StrictMode";case A:return"Suspense";case L:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case M:return(n.displayName||"Context")+".Consumer";case C:return(n._context.displayName||"Context")+".Provider";case k:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return o=n.displayName||null,o!==null?o:te(n.type)||"Memo";case Y:o=n._payload,n=n._init;try{return te(n(o))}catch{}}return null}function Z(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return te(o);case 8:return o===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ae(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function H(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function J(n){var o=H(n)?"checked":"value",P=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),F=""+n[o];if(!n.hasOwnProperty(o)&&typeof P<"u"&&typeof P.get=="function"&&typeof P.set=="function"){var V=P.get,Q=P.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return V.call(this)},set:function(oe){F=""+oe,Q.call(this,oe)}}),Object.defineProperty(n,o,{enumerable:P.enumerable}),{getValue:function(){return F},setValue:function(oe){F=""+oe},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function ie(n){n._valueTracker||(n._valueTracker=J(n))}function le(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var P=o.getValue(),F="";return n&&(F=H(n)?n.checked?"true":"false":n.value),n=F,n!==P?(o.setValue(n),!0):!1}function ue(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function he(n,o){var P=o.checked;return D({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:P??n._wrapperState.initialChecked})}function ye(n,o){var P=o.defaultValue==null?"":o.defaultValue,F=o.checked!=null?o.checked:o.defaultChecked;P=ae(o.value!=null?o.value:P),n._wrapperState={initialChecked:F,initialValue:P,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ce(n,o){o=o.checked,o!=null&&p(n,"checked",o,!1)}function pe(n,o){Ce(n,o);var P=ae(o.value),F=o.type;if(P!=null)F==="number"?(P===0&&n.value===""||n.value!=P)&&(n.value=""+P):n.value!==""+P&&(n.value=""+P);else if(F==="submit"||F==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?ve(n,o.type,P):o.hasOwnProperty("defaultValue")&&ve(n,o.type,ae(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function fe(n,o,P){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var F=o.type;if(!(F!=="submit"&&F!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,P||o===n.value||(n.value=o),n.defaultValue=o}P=n.name,P!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,P!==""&&(n.name=P)}function ve(n,o,P){(o!=="number"||ue(n.ownerDocument)!==n)&&(P==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+P&&(n.defaultValue=""+P))}var xe=Array.isArray;function Te(n,o,P,F){if(n=n.options,o){o={};for(var V=0;V<P.length;V++)o["$"+P[V]]=!0;for(P=0;P<n.length;P++)V=o.hasOwnProperty("$"+n[P].value),n[P].selected!==V&&(n[P].selected=V),V&&F&&(n[P].defaultSelected=!0)}else{for(P=""+ae(P),o=null,V=0;V<n.length;V++){if(n[V].value===P){n[V].selected=!0,F&&(n[V].defaultSelected=!0);return}o!==null||n[V].disabled||(o=n[V])}o!==null&&(o.selected=!0)}}function ce(n,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return D({},o,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function me(n,o){var P=o.value;if(P==null){if(P=o.children,o=o.defaultValue,P!=null){if(o!=null)throw Error(t(92));if(xe(P)){if(1<P.length)throw Error(t(93));P=P[0]}o=P}o==null&&(o=""),P=o}n._wrapperState={initialValue:ae(P)}}function Oe(n,o){var P=ae(o.value),F=ae(o.defaultValue);P!=null&&(P=""+P,P!==n.value&&(n.value=P),o.defaultValue==null&&n.defaultValue!==P&&(n.defaultValue=P)),F!=null&&(n.defaultValue=""+F)}function Ne(n){var o=n.textContent;o===n._wrapperState.initialValue&&o!==""&&o!==null&&(n.value=o)}function tt(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function rt(n,o){return n==null||n==="http://www.w3.org/1999/xhtml"?tt(o):n==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var He,$e=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,P,F,V){MSApp.execUnsafeLocalFunction(function(){return n(o,P,F,V)})}:n}(function(n,o){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=o;else{for(He=He||document.createElement("div"),He.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=He.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function Xe(n,o){if(o){var P=n.firstChild;if(P&&P===n.lastChild&&P.nodeType===3){P.nodeValue=o;return}}n.textContent=o}var De={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ye=["Webkit","ms","Moz","O"];Object.keys(De).forEach(function(n){Ye.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),De[o]=De[n]})});function lt(n,o,P){return o==null||typeof o=="boolean"||o===""?"":P||typeof o!="number"||o===0||De.hasOwnProperty(n)&&De[n]?(""+o).trim():o+"px"}function wt(n,o){n=n.style;for(var P in o)if(o.hasOwnProperty(P)){var F=P.indexOf("--")===0,V=lt(P,o[P],F);P==="float"&&(P="cssFloat"),F?n.setProperty(P,V):n[P]=V}}var zt=D({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function _e(n,o){if(o){if(zt[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function Se(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xt=null;function ht(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var At=null,vt=null,Tr=null;function Pr(n){if(n=Ps(n)){if(typeof At!="function")throw Error(t(280));var o=n.stateNode;o&&(o=Qr(o),At(n.stateNode,n.type,o))}}function tr(n){vt?Tr?Tr.push(n):Tr=[n]:vt=n}function mr(){if(vt){var n=vt,o=Tr;if(Tr=vt=null,Pr(n),o)for(n=0;n<o.length;n++)Pr(o[n])}}function Pn(n,o){return n(o)}function Ve(){}var at=!1;function bt(n,o,P){if(at)return n(o,P);at=!0;try{return Pn(n,o,P)}finally{at=!1,(vt!==null||Tr!==null)&&(Ve(),mr())}}function Ot(n,o){var P=n.stateNode;if(P===null)return null;var F=Qr(P);if(F===null)return null;P=F[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(F=!F.disabled)||(n=n.type,F=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!F;break e;default:n=!1}if(n)return null;if(P&&typeof P!="function")throw Error(t(231,o,typeof P));return P}var je=!1;if(c)try{var Ze={};Object.defineProperty(Ze,"passive",{get:function(){je=!0}}),window.addEventListener("test",Ze,Ze),window.removeEventListener("test",Ze,Ze)}catch{je=!1}function ct(n,o,P,F,V,Q,oe,de,ge){var Re=Array.prototype.slice.call(arguments,3);try{o.apply(P,Re)}catch(Be){this.onError(Be)}}var Ie=!1,_t=null,Fe=!1,mt=null,ir={onError:function(n){Ie=!0,_t=n}};function Vt(n,o,P,F,V,Q,oe,de,ge){Ie=!1,_t=null,ct.apply(ir,arguments)}function pn(n,o,P,F,V,Q,oe,de,ge){if(Vt.apply(this,arguments),Ie){if(Ie){var Re=_t;Ie=!1,_t=null}else throw Error(t(198));Fe||(Fe=!0,mt=Re)}}function Lr(n){var o=n,P=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(P=o.return),n=o.return;while(n)}return o.tag===3?P:null}function et(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function qt(n){if(Lr(n)!==n)throw Error(t(188))}function $t(n){var o=n.alternate;if(!o){if(o=Lr(n),o===null)throw Error(t(188));return o!==n?null:n}for(var P=n,F=o;;){var V=P.return;if(V===null)break;var Q=V.alternate;if(Q===null){if(F=V.return,F!==null){P=F;continue}break}if(V.child===Q.child){for(Q=V.child;Q;){if(Q===P)return qt(V),n;if(Q===F)return qt(V),o;Q=Q.sibling}throw Error(t(188))}if(P.return!==F.return)P=V,F=Q;else{for(var oe=!1,de=V.child;de;){if(de===P){oe=!0,P=V,F=Q;break}if(de===F){oe=!0,F=V,P=Q;break}de=de.sibling}if(!oe){for(de=Q.child;de;){if(de===P){oe=!0,P=Q,F=V;break}if(de===F){oe=!0,F=Q,P=V;break}de=de.sibling}if(!oe)throw Error(t(189))}}if(P.alternate!==F)throw Error(t(190))}if(P.tag!==3)throw Error(t(188));return P.stateNode.current===P?n:o}function rr(n){return n=$t(n),n!==null?Kt(n):null}function Kt(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var o=Kt(n);if(o!==null)return o;n=n.sibling}return null}var Cn=i.unstable_scheduleCallback,kn=i.unstable_cancelCallback,rn=i.unstable_shouldYield,sa=i.unstable_requestPaint,Xt=i.unstable_now,Pi=i.unstable_getCurrentPriorityLevel,Un=i.unstable_ImmediatePriority,Fa=i.unstable_UserBlockingPriority,ui=i.unstable_NormalPriority,yo=i.unstable_LowPriority,Ci=i.unstable_IdlePriority,ci=null,Nr=null;function hr(n){if(Nr&&typeof Nr.onCommitFiberRoot=="function")try{Nr.onCommitFiberRoot(ci,n,void 0,(n.current.flags&128)===128)}catch{}}var It=Math.clz32?Math.clz32:qn,za=Math.log,gn=Math.LN2;function qn(n){return n>>>=0,n===0?32:31-(za(n)/gn|0)|0}var Gi=64,ua=4194304;function Kr(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function bo(n,o){var P=n.pendingLanes;if(P===0)return 0;var F=0,V=n.suspendedLanes,Q=n.pingedLanes,oe=P&268435455;if(oe!==0){var de=oe&~V;de!==0?F=Kr(de):(Q&=oe,Q!==0&&(F=Kr(Q)))}else oe=P&~V,oe!==0?F=Kr(oe):Q!==0&&(F=Kr(Q));if(F===0)return 0;if(o!==0&&o!==F&&(o&V)===0&&(V=F&-F,Q=o&-o,V>=Q||V===16&&(Q&4194240)!==0))return o;if((F&4)!==0&&(F|=P&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=F;0<o;)P=31-It(o),V=1<<P,F|=n[P],o&=~V;return F}function Qd(n,o){switch(n){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jd(n,o){for(var P=n.suspendedLanes,F=n.pingedLanes,V=n.expirationTimes,Q=n.pendingLanes;0<Q;){var oe=31-It(Q),de=1<<oe,ge=V[oe];ge===-1?((de&P)===0||(de&F)!==0)&&(V[oe]=Qd(de,o)):ge<=o&&(n.expiredLanes|=de),Q&=~de}}function ll(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Ac(){var n=Gi;return Gi<<=1,(Gi&4194240)===0&&(Gi=64),n}function Kn(n){for(var o=[],P=0;31>P;P++)o.push(n);return o}function cs(n,o,P){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-It(o),n[o]=P}function Qp(n,o){var P=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var F=n.eventTimes;for(n=n.expirationTimes;0<P;){var V=31-It(P),Q=1<<V;o[V]=0,F[V]=-1,n[V]=-1,P&=~Q}}function Tc(n,o){var P=n.entangledLanes|=o;for(n=n.entanglements;P;){var F=31-It(P),V=1<<F;V&o|n[F]&o&&(n[F]|=o),P&=~V}}var Wt=0;function fs(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var sl,ul,eh,th,au,ou=!1,cl=[],fi=null,Ba=null,Vi=null,jt=new Map,fl=new Map,$i=[],rh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function nh(n,o){switch(n){case"focusin":case"focusout":fi=null;break;case"dragenter":case"dragleave":Ba=null;break;case"mouseover":case"mouseout":Vi=null;break;case"pointerover":case"pointerout":jt.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":fl.delete(o.pointerId)}}function ds(n,o,P,F,V,Q){return n===null||n.nativeEvent!==Q?(n={blockedOn:o,domEventName:P,eventSystemFlags:F,nativeEvent:Q,targetContainers:[V]},o!==null&&(o=Ps(o),o!==null&&ul(o)),n):(n.eventSystemFlags|=F,o=n.targetContainers,V!==null&&o.indexOf(V)===-1&&o.push(V),n)}function Xr(n,o,P,F,V){switch(o){case"focusin":return fi=ds(fi,n,o,P,F,V),!0;case"dragenter":return Ba=ds(Ba,n,o,P,F,V),!0;case"mouseover":return Vi=ds(Vi,n,o,P,F,V),!0;case"pointerover":var Q=V.pointerId;return jt.set(Q,ds(jt.get(Q)||null,n,o,P,F,V)),!0;case"gotpointercapture":return Q=V.pointerId,fl.set(Q,ds(fl.get(Q)||null,n,o,P,F,V)),!0}return!1}function lu(n){var o=Xa(n.target);if(o!==null){var P=Lr(o);if(P!==null){if(o=P.tag,o===13){if(o=et(P),o!==null){n.blockedOn=o,au(n.priority,function(){eh(P)});return}}else if(o===3&&P.stateNode.current.memoizedState.isDehydrated){n.blockedOn=P.tag===3?P.stateNode.containerInfo:null;return}}}n.blockedOn=null}function su(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var P=fu(n.domEventName,n.eventSystemFlags,o[0],n.nativeEvent);if(P===null){P=n.nativeEvent;var F=new P.constructor(P.type,P);xt=F,P.target.dispatchEvent(F),xt=null}else return o=Ps(P),o!==null&&ul(o),n.blockedOn=P,!1;o.shift()}return!0}function uu(n,o,P){su(n)&&P.delete(o)}function Jp(){ou=!1,fi!==null&&su(fi)&&(fi=null),Ba!==null&&su(Ba)&&(Ba=null),Vi!==null&&su(Vi)&&(Vi=null),jt.forEach(uu),fl.forEach(uu)}function Ua(n,o){n.blockedOn===o&&(n.blockedOn=null,ou||(ou=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Jp)))}function Hn(n){function o(V){return Ua(V,n)}if(0<cl.length){Ua(cl[0],n);for(var P=1;P<cl.length;P++){var F=cl[P];F.blockedOn===n&&(F.blockedOn=null)}}for(fi!==null&&Ua(fi,n),Ba!==null&&Ua(Ba,n),Vi!==null&&Ua(Vi,n),jt.forEach(o),fl.forEach(o),P=0;P<$i.length;P++)F=$i[P],F.blockedOn===n&&(F.blockedOn=null);for(;0<$i.length&&(P=$i[0],P.blockedOn===null);)lu(P),P.blockedOn===null&&$i.shift()}var dl=m.ReactCurrentBatchConfig,cu=!0;function ki(n,o,P,F){var V=Wt,Q=dl.transition;dl.transition=null;try{Wt=1,hl(n,o,P,F)}finally{Wt=V,dl.transition=Q}}function ca(n,o,P,F){var V=Wt,Q=dl.transition;dl.transition=null;try{Wt=4,hl(n,o,P,F)}finally{Wt=V,dl.transition=Q}}function hl(n,o,P,F){if(cu){var V=fu(n,o,P,F);if(V===null)Cu(n,o,F,pl,P),nh(n,F);else if(Xr(V,n,o,P,F))F.stopPropagation();else if(nh(n,F),o&4&&-1<rh.indexOf(n)){for(;V!==null;){var Q=Ps(V);if(Q!==null&&sl(Q),Q=fu(n,o,P,F),Q===null&&Cu(n,o,F,pl,P),Q===V)break;V=Q}V!==null&&F.stopPropagation()}else Cu(n,o,F,null,P)}}var pl=null;function fu(n,o,P,F){if(pl=null,n=ht(F),n=Xa(n),n!==null)if(o=Lr(n),o===null)n=null;else if(P=o.tag,P===13){if(n=et(o),n!==null)return n;n=null}else if(P===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null);return pl=n,null}function ih(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Pi()){case Un:return 1;case Fa:return 4;case ui:case yo:return 16;case Ci:return 536870912;default:return 16}default:return 16}}var nn=null,qa=null,fa=null;function hs(){if(fa)return fa;var n,o=qa,P=o.length,F,V="value"in nn?nn.value:nn.textContent,Q=V.length;for(n=0;n<P&&o[n]===V[n];n++);var oe=P-n;for(F=1;F<=oe&&o[P-F]===V[Q-F];F++);return fa=V.slice(n,1<F?1-F:void 0)}function wo(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function An(){return!0}function Xn(){return!1}function Br(n){function o(P,F,V,Q,oe){this._reactName=P,this._targetInst=V,this.type=F,this.nativeEvent=Q,this.target=oe,this.currentTarget=null;for(var de in n)n.hasOwnProperty(de)&&(P=n[de],this[de]=P?P(Q):Q[de]);return this.isDefaultPrevented=(Q.defaultPrevented!=null?Q.defaultPrevented:Q.returnValue===!1)?An:Xn,this.isPropagationStopped=Xn,this}return D(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var P=this.nativeEvent;P&&(P.preventDefault?P.preventDefault():typeof P.returnValue!="unknown"&&(P.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var P=this.nativeEvent;P&&(P.stopPropagation?P.stopPropagation():typeof P.cancelBubble!="unknown"&&(P.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),o}var Gn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ai=Br(Gn),Ti=D({},Gn,{view:0,detail:0}),ah=Br(Ti),ps,gs,an,Tn=D({},Ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:So,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==an&&(an&&n.type==="mousemove"?(ps=n.screenX-an.screenX,gs=n.screenY-an.screenY):gs=ps=0,an=n),ps)},movementY:function(n){return"movementY"in n?n.movementY:gs}}),pr=Br(Tn),vs=D({},Tn,{dataTransfer:0}),Ri=Br(vs),oh=D({},Ti,{relatedTarget:0}),du=Br(oh),Rc=D({},Gn,{animationName:0,elapsedTime:0,pseudoElement:0}),Mc=Br(Rc),lh=D({},Gn,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),hu=Br(lh),sh=D({},Gn,{data:0}),_o=Br(sh),Lc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eg={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tg(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=pu[n])?!!o[n]:!1}function So(){return tg}var gu=D({},Ti,{key:function(n){if(n.key){var o=Lc[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=wo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?eg[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:So,charCode:function(n){return n.type==="keypress"?wo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?wo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),uh=Br(gu),ch=D({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eo=Br(ch),fh=D({},Ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:So}),vu=Br(fh),mu=D({},Gn,{propertyName:0,elapsedTime:0,pseudoElement:0}),gl=Br(mu),Nc=D({},Tn,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),Ic=Br(Nc),dh=[9,13,27,32],ms=c&&"CompositionEvent"in window,xo=null;c&&"documentMode"in document&&(xo=document.documentMode);var vl=c&&"TextEvent"in window&&!xo,Zn=c&&(!ms||xo&&8<xo&&11>=xo),Ha=" ",yu=!1;function jc(n,o){switch(n){case"keyup":return dh.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mi(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Qn=!1;function Dc(n,o){switch(n){case"compositionend":return Mi(o);case"keypress":return o.which!==32?null:(yu=!0,Ha);case"textInput":return n=o.data,n===Ha&&yu?null:n;default:return null}}function hh(n,o){if(Qn)return n==="compositionend"||!ms&&jc(n,o)?(n=hs(),fa=qa=nn=null,Qn=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Zn&&o.locale!=="ko"?null:o.data;default:return null}}var da={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ha(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!da[n.type]:o==="textarea"}function ys(n,o,P,F){tr(F),o=ku(o,"onChange"),0<o.length&&(P=new Ai("onChange","change",null,P,F),n.push({event:P,listeners:o}))}var ml=null,Ga=null;function ph(n){Yc(n,0)}function Va(n){var o=qr(n);if(le(o))return n}function di(n,o){if(n==="change")return o}var yl=!1;if(c){var $a;if(c){var hi="oninput"in document;if(!hi){var bu=document.createElement("div");bu.setAttribute("oninput","return;"),hi=typeof bu.oninput=="function"}$a=hi}else $a=!1;yl=$a&&(!document.documentMode||9<document.documentMode)}function Oo(){ml&&(ml.detachEvent("onpropertychange",Fc),Ga=ml=null)}function Fc(n){if(n.propertyName==="value"&&Va(Ga)){var o=[];ys(o,Ga,n,ht(n)),bt(ph,o)}}function zc(n,o,P){n==="focusin"?(Oo(),ml=o,Ga=P,ml.attachEvent("onpropertychange",Fc)):n==="focusout"&&Oo()}function xr(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Va(Ga)}function wu(n,o){if(n==="click")return Va(o)}function Bc(n,o){if(n==="input"||n==="change")return Va(o)}function Uc(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var Vn=typeof Object.is=="function"?Object.is:Uc;function Po(n,o){if(Vn(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var P=Object.keys(n),F=Object.keys(o);if(P.length!==F.length)return!1;for(F=0;F<P.length;F++){var V=P[F];if(!f.call(o,V)||!Vn(n[V],o[V]))return!1}return!0}function Wa(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function yr(n,o){var P=Wa(n);n=0;for(var F;P;){if(P.nodeType===3){if(F=n+P.textContent.length,n<=o&&F>=o)return{node:P,offset:o-n};n=F}e:{for(;P;){if(P.nextSibling){P=P.nextSibling;break e}P=P.parentNode}P=void 0}P=Wa(P)}}function Ir(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?Ir(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function Ur(){for(var n=window,o=ue();o instanceof n.HTMLIFrameElement;){try{var P=typeof o.contentWindow.location.href=="string"}catch{P=!1}if(P)n=o.contentWindow;else break;o=ue(n.document)}return o}function bl(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function bs(n){var o=Ur(),P=n.focusedElem,F=n.selectionRange;if(o!==P&&P&&P.ownerDocument&&Ir(P.ownerDocument.documentElement,P)){if(F!==null&&bl(P)){if(o=F.start,n=F.end,n===void 0&&(n=o),"selectionStart"in P)P.selectionStart=o,P.selectionEnd=Math.min(n,P.value.length);else if(n=(o=P.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var V=P.textContent.length,Q=Math.min(F.start,V);F=F.end===void 0?Q:Math.min(F.end,V),!n.extend&&Q>F&&(V=F,F=Q,Q=V),V=yr(P,Q);var oe=yr(P,F);V&&oe&&(n.rangeCount!==1||n.anchorNode!==V.node||n.anchorOffset!==V.offset||n.focusNode!==oe.node||n.focusOffset!==oe.offset)&&(o=o.createRange(),o.setStart(V.node,V.offset),n.removeAllRanges(),Q>F?(n.addRange(o),n.extend(oe.node,oe.offset)):(o.setEnd(oe.node,oe.offset),n.addRange(o)))}}for(o=[],n=P;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<o.length;P++)n=o[P],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var ws=c&&"documentMode"in document&&11>=document.documentMode,wl=null,Zr=null,Co=null,_s=!1;function _u(n,o,P){var F=P.window===P?P.document:P.nodeType===9?P:P.ownerDocument;_s||wl==null||wl!==ue(F)||(F=wl,"selectionStart"in F&&bl(F)?F={start:F.selectionStart,end:F.selectionEnd}:(F=(F.ownerDocument&&F.ownerDocument.defaultView||window).getSelection(),F={anchorNode:F.anchorNode,anchorOffset:F.anchorOffset,focusNode:F.focusNode,focusOffset:F.focusOffset}),Co&&Po(Co,F)||(Co=F,F=ku(Zr,"onSelect"),0<F.length&&(o=new Ai("onSelect","select",null,o,P),n.push({event:o,listeners:F}),o.target=wl)))}function Jn(n,o){var P={};return P[n.toLowerCase()]=o.toLowerCase(),P["Webkit"+n]="webkit"+o,P["Moz"+n]="moz"+o,P}var on={animationend:Jn("Animation","AnimationEnd"),animationiteration:Jn("Animation","AnimationIteration"),animationstart:Jn("Animation","AnimationStart"),transitionend:Jn("Transition","TransitionEnd")},ko={},Su={};c&&(Su=document.createElement("div").style,"AnimationEvent"in window||(delete on.animationend.animation,delete on.animationiteration.animation,delete on.animationstart.animation),"TransitionEvent"in window||delete on.transitionend.transition);function _l(n){if(ko[n])return ko[n];if(!on[n])return n;var o=on[n],P;for(P in o)if(o.hasOwnProperty(P)&&P in Su)return ko[n]=o[P];return n}var qc=_l("animationend"),Hc=_l("animationiteration"),Gc=_l("animationstart"),Vc=_l("transitionend"),$c=new Map,Wc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function pa(n,o){$c.set(n,o),l(o,[n])}for(var Eu=0;Eu<Wc.length;Eu++){var Ao=Wc[Eu],gh=Ao.toLowerCase(),xu=Ao[0].toUpperCase()+Ao.slice(1);pa(gh,"on"+xu)}pa(qc,"onAnimationEnd"),pa(Hc,"onAnimationIteration"),pa(Gc,"onAnimationStart"),pa("dblclick","onDoubleClick"),pa("focusin","onFocus"),pa("focusout","onBlur"),pa(Vc,"onTransitionEnd"),s("onMouseEnter",["mouseout","mouseover"]),s("onMouseLeave",["mouseout","mouseover"]),s("onPointerEnter",["pointerout","pointerover"]),s("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ya="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),vh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ya));function Ou(n,o,P){var F=n.type||"unknown-event";n.currentTarget=P,pn(F,o,void 0,n),n.currentTarget=null}function Yc(n,o){o=(o&4)!==0;for(var P=0;P<n.length;P++){var F=n[P],V=F.event;F=F.listeners;e:{var Q=void 0;if(o)for(var oe=F.length-1;0<=oe;oe--){var de=F[oe],ge=de.instance,Re=de.currentTarget;if(de=de.listener,ge!==Q&&V.isPropagationStopped())break e;Ou(V,de,Re),Q=ge}else for(oe=0;oe<F.length;oe++){if(de=F[oe],ge=de.instance,Re=de.currentTarget,de=de.listener,ge!==Q&&V.isPropagationStopped())break e;Ou(V,de,Re),Q=ge}}}if(Fe)throw n=mt,Fe=!1,mt=null,n}function sr(n,o){var P=o[Tu];P===void 0&&(P=o[Tu]=new Set);var F=n+"__bubble";P.has(F)||(Kc(o,n,2,!1),P.add(F))}function Pu(n,o,P){var F=0;o&&(F|=4),Kc(P,n,F,o)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function To(n){if(!n[Ss]){n[Ss]=!0,r.forEach(function(P){P!=="selectionchange"&&(vh.has(P)||Pu(P,!1,n),Pu(P,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Ss]||(o[Ss]=!0,Pu("selectionchange",!1,o))}}function Kc(n,o,P,F){switch(ih(o)){case 1:var V=ki;break;case 4:V=ca;break;default:V=hl}P=V.bind(null,o,P,n),V=void 0,!je||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(V=!0),F?V!==void 0?n.addEventListener(o,P,{capture:!0,passive:V}):n.addEventListener(o,P,!0):V!==void 0?n.addEventListener(o,P,{passive:V}):n.addEventListener(o,P,!1)}function Cu(n,o,P,F,V){var Q=F;if((o&1)===0&&(o&2)===0&&F!==null)e:for(;;){if(F===null)return;var oe=F.tag;if(oe===3||oe===4){var de=F.stateNode.containerInfo;if(de===V||de.nodeType===8&&de.parentNode===V)break;if(oe===4)for(oe=F.return;oe!==null;){var ge=oe.tag;if((ge===3||ge===4)&&(ge=oe.stateNode.containerInfo,ge===V||ge.nodeType===8&&ge.parentNode===V))return;oe=oe.return}for(;de!==null;){if(oe=Xa(de),oe===null)return;if(ge=oe.tag,ge===5||ge===6){F=Q=oe;continue e}de=de.parentNode}}F=F.return}bt(function(){var Re=Q,Be=ht(P),Ue=[];e:{var ze=$c.get(n);if(ze!==void 0){var nt=Ai,ut=n;switch(n){case"keypress":if(wo(P)===0)break e;case"keydown":case"keyup":nt=uh;break;case"focusin":ut="focus",nt=du;break;case"focusout":ut="blur",nt=du;break;case"beforeblur":case"afterblur":nt=du;break;case"click":if(P.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":nt=pr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":nt=Ri;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":nt=vu;break;case qc:case Hc:case Gc:nt=Mc;break;case Vc:nt=gl;break;case"scroll":nt=ah;break;case"wheel":nt=Ic;break;case"copy":case"cut":case"paste":nt=hu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":nt=Eo}var dt=(o&4)!==0,$r=!dt&&n==="scroll",Pe=dt?ze!==null?ze+"Capture":null:ze;dt=[];for(var be=Re,ke;be!==null;){ke=be;var Ge=ke.stateNode;if(ke.tag===5&&Ge!==null&&(ke=Ge,Pe!==null&&(Ge=Ot(be,Pe),Ge!=null&&dt.push(Sl(be,Ge,ke)))),$r)break;be=be.return}0<dt.length&&(ze=new nt(ze,ut,null,P,Be),Ue.push({event:ze,listeners:dt}))}}if((o&7)===0){e:{if(ze=n==="mouseover"||n==="pointerover",nt=n==="mouseout"||n==="pointerout",ze&&P!==xt&&(ut=P.relatedTarget||P.fromElement)&&(Xa(ut)||ut[Yi]))break e;if((nt||ze)&&(ze=Be.window===Be?Be:(ze=Be.ownerDocument)?ze.defaultView||ze.parentWindow:window,nt?(ut=P.relatedTarget||P.toElement,nt=Re,ut=ut?Xa(ut):null,ut!==null&&($r=Lr(ut),ut!==$r||ut.tag!==5&&ut.tag!==6)&&(ut=null)):(nt=null,ut=Re),nt!==ut)){if(dt=pr,Ge="onMouseLeave",Pe="onMouseEnter",be="mouse",(n==="pointerout"||n==="pointerover")&&(dt=Eo,Ge="onPointerLeave",Pe="onPointerEnter",be="pointer"),$r=nt==null?ze:qr(nt),ke=ut==null?ze:qr(ut),ze=new dt(Ge,be+"leave",nt,P,Be),ze.target=$r,ze.relatedTarget=ke,Ge=null,Xa(Be)===Re&&(dt=new dt(Pe,be+"enter",ut,P,Be),dt.target=ke,dt.relatedTarget=$r,Ge=dt),$r=Ge,nt&&ut)t:{for(dt=nt,Pe=ut,be=0,ke=dt;ke;ke=Ro(ke))be++;for(ke=0,Ge=Pe;Ge;Ge=Ro(Ge))ke++;for(;0<be-ke;)dt=Ro(dt),be--;for(;0<ke-be;)Pe=Ro(Pe),ke--;for(;be--;){if(dt===Pe||Pe!==null&&dt===Pe.alternate)break t;dt=Ro(dt),Pe=Ro(Pe)}dt=null}else dt=null;nt!==null&&mh(Ue,ze,nt,dt,!1),ut!==null&&$r!==null&&mh(Ue,$r,ut,dt,!0)}}e:{if(ze=Re?qr(Re):window,nt=ze.nodeName&&ze.nodeName.toLowerCase(),nt==="select"||nt==="input"&&ze.type==="file")var pt=di;else if(ha(ze))if(yl)pt=Bc;else{pt=xr;var St=zc}else(nt=ze.nodeName)&&nt.toLowerCase()==="input"&&(ze.type==="checkbox"||ze.type==="radio")&&(pt=wu);if(pt&&(pt=pt(n,Re))){ys(Ue,pt,P,Be);break e}St&&St(n,ze,Re),n==="focusout"&&(St=ze._wrapperState)&&St.controlled&&ze.type==="number"&&ve(ze,"number",ze.value)}switch(St=Re?qr(Re):window,n){case"focusin":(ha(St)||St.contentEditable==="true")&&(wl=St,Zr=Re,Co=null);break;case"focusout":Co=Zr=wl=null;break;case"mousedown":_s=!0;break;case"contextmenu":case"mouseup":case"dragend":_s=!1,_u(Ue,P,Be);break;case"selectionchange":if(ws)break;case"keydown":case"keyup":_u(Ue,P,Be)}var Et;if(ms)e:{switch(n){case"compositionstart":var Pt="onCompositionStart";break e;case"compositionend":Pt="onCompositionEnd";break e;case"compositionupdate":Pt="onCompositionUpdate";break e}Pt=void 0}else Qn?jc(n,P)&&(Pt="onCompositionEnd"):n==="keydown"&&P.keyCode===229&&(Pt="onCompositionStart");Pt&&(Zn&&P.locale!=="ko"&&(Qn||Pt!=="onCompositionStart"?Pt==="onCompositionEnd"&&Qn&&(Et=hs()):(nn=Be,qa="value"in nn?nn.value:nn.textContent,Qn=!0)),St=ku(Re,Pt),0<St.length&&(Pt=new _o(Pt,n,null,P,Be),Ue.push({event:Pt,listeners:St}),Et?Pt.data=Et:(Et=Mi(P),Et!==null&&(Pt.data=Et)))),(Et=vl?Dc(n,P):hh(n,P))&&(Re=ku(Re,"onBeforeInput"),0<Re.length&&(Be=new _o("onBeforeInput","beforeinput",null,P,Be),Ue.push({event:Be,listeners:Re}),Be.data=Et))}Yc(Ue,o)})}function Sl(n,o,P){return{instance:n,listener:o,currentTarget:P}}function ku(n,o){for(var P=o+"Capture",F=[];n!==null;){var V=n,Q=V.stateNode;V.tag===5&&Q!==null&&(V=Q,Q=Ot(n,P),Q!=null&&F.unshift(Sl(n,Q,V)),Q=Ot(n,o),Q!=null&&F.push(Sl(n,Q,V))),n=n.return}return F}function Ro(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function mh(n,o,P,F,V){for(var Q=o._reactName,oe=[];P!==null&&P!==F;){var de=P,ge=de.alternate,Re=de.stateNode;if(ge!==null&&ge===F)break;de.tag===5&&Re!==null&&(de=Re,V?(ge=Ot(P,Q),ge!=null&&oe.unshift(Sl(P,ge,de))):V||(ge=Ot(P,Q),ge!=null&&oe.push(Sl(P,ge,de)))),P=P.return}oe.length!==0&&n.push({event:o,listeners:oe})}var rg=/\r\n?/g,yh=/\u0000|\uFFFD/g;function Xc(n){return(typeof n=="string"?n:""+n).replace(rg,`
|
|
30
|
-
`).replace(yh,"")}function Es(n,o,P){if(o=Xc(o),Xc(n)!==o&&P)throw Error(t(425))}function Mo(){}var Zc=null,Qc=null;function Jc(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var ei=typeof setTimeout=="function"?setTimeout:void 0,ef=typeof clearTimeout=="function"?clearTimeout:void 0,xs=typeof Promise=="function"?Promise:void 0,bh=typeof queueMicrotask=="function"?queueMicrotask:typeof xs<"u"?function(n){return xs.resolve(null).then(n).catch(wh)}:ei;function wh(n){setTimeout(function(){throw n})}function Au(n,o){var P=o,F=0;do{var V=P.nextSibling;if(n.removeChild(P),V&&V.nodeType===8)if(P=V.data,P==="/$"){if(F===0){n.removeChild(V),Hn(o);return}F--}else P!=="$"&&P!=="$?"&&P!=="$!"||F++;P=V}while(P);Hn(o)}function Wi(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function Lo(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var P=n.data;if(P==="$"||P==="$!"||P==="$?"){if(o===0)return n;o--}else P==="/$"&&o++}n=n.previousSibling}return null}var Ka=Math.random().toString(36).slice(2),pi="__reactFiber$"+Ka,Os="__reactProps$"+Ka,Yi="__reactContainer$"+Ka,Tu="__reactEvents$"+Ka,_h="__reactListeners$"+Ka,Sh="__reactHandles$"+Ka;function Xa(n){var o=n[pi];if(o)return o;for(var P=n.parentNode;P;){if(o=P[Yi]||P[pi]){if(P=o.alternate,o.child!==null||P!==null&&P.child!==null)for(n=Lo(n);n!==null;){if(P=n[pi])return P;n=Lo(n)}return o}n=P,P=n.parentNode}return null}function Ps(n){return n=n[pi]||n[Yi],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function qr(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(t(33))}function Qr(n){return n[Os]||null}var Ru=[],No=-1;function ga(n){return{current:n}}function ur(n){0>No||(n.current=Ru[No],Ru[No]=null,No--)}function ar(n,o){No++,Ru[No]=n.current,n.current=o}var Ki={},ln=ga(Ki),vn=ga(!1),Za=Ki;function Io(n,o){var P=n.type.contextTypes;if(!P)return Ki;var F=n.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===o)return F.__reactInternalMemoizedMaskedChildContext;var V={},Q;for(Q in P)V[Q]=o[Q];return F&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=V),V}function mn(n){return n=n.childContextTypes,n!=null}function El(){ur(vn),ur(ln)}function tf(n,o,P){if(ln.current!==Ki)throw Error(t(168));ar(ln,o),ar(vn,P)}function Mu(n,o,P){var F=n.stateNode;if(o=o.childContextTypes,typeof F.getChildContext!="function")return P;F=F.getChildContext();for(var V in F)if(!(V in o))throw Error(t(108,Z(n)||"Unknown",V));return D({},P,F)}function jo(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Ki,Za=ln.current,ar(ln,n),ar(vn,vn.current),!0}function Eh(n,o,P){var F=n.stateNode;if(!F)throw Error(t(169));P?(n=Mu(n,o,Za),F.__reactInternalMemoizedMergedChildContext=n,ur(vn),ur(ln),ar(ln,n)):ur(vn),ar(vn,P)}var Xi=null,xl=!1,Lu=!1;function Cs(n){Xi===null?Xi=[n]:Xi.push(n)}function va(n){xl=!0,Cs(n)}function Qa(){if(!Lu&&Xi!==null){Lu=!0;var n=0,o=Wt;try{var P=Xi;for(Wt=1;n<P.length;n++){var F=P[n];do F=F(!0);while(F!==null)}Xi=null,xl=!1}catch(V){throw Xi!==null&&(Xi=Xi.slice(n+1)),Cn(Un,Qa),V}finally{Wt=o,Lu=!1}}return null}var Rn=[],Do=0,Ja=null,eo=0,Mn=[],Ln=0,to=null,ti=1,br="";function Fo(n,o){Rn[Do++]=eo,Rn[Do++]=Ja,Ja=n,eo=o}function xh(n,o,P){Mn[Ln++]=ti,Mn[Ln++]=br,Mn[Ln++]=to,to=n;var F=ti;n=br;var V=32-It(F)-1;F&=~(1<<V),P+=1;var Q=32-It(o)+V;if(30<Q){var oe=V-V%5;Q=(F&(1<<oe)-1).toString(32),F>>=oe,V-=oe,ti=1<<32-It(o)+V|P<<V|F,br=Q+n}else ti=1<<Q|P<<V|F,br=n}function Ol(n){n.return!==null&&(Fo(n,1),xh(n,1,0))}function Jr(n){for(;n===Ja;)Ja=Rn[--Do],Rn[Do]=null,eo=Rn[--Do],Rn[Do]=null;for(;n===to;)to=Mn[--Ln],Mn[Ln]=null,br=Mn[--Ln],Mn[Ln]=null,ti=Mn[--Ln],Mn[Ln]=null}var ri=null,Ke=null,Jt=!1,ni=null;function rf(n,o){var P=na(5,null,null,0);P.elementType="DELETED",P.stateNode=o,P.return=n,o=n.deletions,o===null?(n.deletions=[P],n.flags|=16):o.push(P)}function Oh(n,o){switch(n.tag){case 5:var P=n.type;return o=o.nodeType!==1||P.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(n.stateNode=o,ri=n,Ke=Wi(o.firstChild),!0):!1;case 6:return o=n.pendingProps===""||o.nodeType!==3?null:o,o!==null?(n.stateNode=o,ri=n,Ke=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(P=to!==null?{id:ti,overflow:br}:null,n.memoizedState={dehydrated:o,treeContext:P,retryLane:1073741824},P=na(18,null,null,0),P.stateNode=o,P.return=n,n.child=P,ri=n,Ke=null,!0):!1;default:return!1}}function zo(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Pl(n){if(Jt){var o=Ke;if(o){var P=o;if(!Oh(n,o)){if(zo(n))throw Error(t(418));o=Wi(P.nextSibling);var F=ri;o&&Oh(n,o)?rf(F,P):(n.flags=n.flags&-4097|2,Jt=!1,ri=n)}}else{if(zo(n))throw Error(t(418));n.flags=n.flags&-4097|2,Jt=!1,ri=n}}}function Nu(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;ri=n}function ks(n){if(n!==ri)return!1;if(!Jt)return Nu(n),Jt=!0,!1;var o;if((o=n.tag!==3)&&!(o=n.tag!==5)&&(o=n.type,o=o!=="head"&&o!=="body"&&!Jc(n.type,n.memoizedProps)),o&&(o=Ke)){if(zo(n))throw nf(),Error(t(418));for(;o;)rf(n,o),o=Wi(o.nextSibling)}if(Nu(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(t(317));e:{for(n=n.nextSibling,o=0;n;){if(n.nodeType===8){var P=n.data;if(P==="/$"){if(o===0){Ke=Wi(n.nextSibling);break e}o--}else P!=="$"&&P!=="$!"&&P!=="$?"||o++}n=n.nextSibling}Ke=null}}else Ke=ri?Wi(n.stateNode.nextSibling):null;return!0}function nf(){for(var n=Ke;n;)n=Wi(n.nextSibling)}function Bo(){Ke=ri=null,Jt=!1}function As(n){ni===null?ni=[n]:ni.push(n)}var af=m.ReactCurrentBatchConfig;function Rr(n,o,P){if(n=P.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(P._owner){if(P=P._owner,P){if(P.tag!==1)throw Error(t(309));var F=P.stateNode}if(!F)throw Error(t(147,n));var V=F,Q=""+n;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===Q?o.ref:(o=function(oe){var de=V.refs;oe===null?delete de[Q]:de[Q]=oe},o._stringRef=Q,o)}if(typeof n!="string")throw Error(t(284));if(!P._owner)throw Error(t(290,n))}return n}function $n(n,o){throw n=Object.prototype.toString.call(o),Error(t(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n))}function Li(n){var o=n._init;return o(n._payload)}function Iu(n){function o(Pe,be){if(n){var ke=Pe.deletions;ke===null?(Pe.deletions=[be],Pe.flags|=16):ke.push(be)}}function P(Pe,be){if(!n)return null;for(;be!==null;)o(Pe,be),be=be.sibling;return null}function F(Pe,be){for(Pe=new Map;be!==null;)be.key!==null?Pe.set(be.key,be):Pe.set(be.index,be),be=be.sibling;return Pe}function V(Pe,be){return Pe=$l(Pe,be),Pe.index=0,Pe.sibling=null,Pe}function Q(Pe,be,ke){return Pe.index=ke,n?(ke=Pe.alternate,ke!==null?(ke=ke.index,ke<be?(Pe.flags|=2,be):ke):(Pe.flags|=2,be)):(Pe.flags|=1048576,be)}function oe(Pe){return n&&Pe.alternate===null&&(Pe.flags|=2),Pe}function de(Pe,be,ke,Ge){return be===null||be.tag!==6?(be=Eg(ke,Pe.mode,Ge),be.return=Pe,be):(be=V(be,ke),be.return=Pe,be)}function ge(Pe,be,ke,Ge){var pt=ke.type;return pt===T?Be(Pe,be,ke.props.children,Ge,ke.key):be!==null&&(be.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===Y&&Li(pt)===be.type)?(Ge=V(be,ke.props),Ge.ref=Rr(Pe,be,ke),Ge.return=Pe,Ge):(Ge=$h(ke.type,ke.key,ke.props,null,Pe.mode,Ge),Ge.ref=Rr(Pe,be,ke),Ge.return=Pe,Ge)}function Re(Pe,be,ke,Ge){return be===null||be.tag!==4||be.stateNode.containerInfo!==ke.containerInfo||be.stateNode.implementation!==ke.implementation?(be=xg(ke,Pe.mode,Ge),be.return=Pe,be):(be=V(be,ke.children||[]),be.return=Pe,be)}function Be(Pe,be,ke,Ge,pt){return be===null||be.tag!==7?(be=Bs(ke,Pe.mode,Ge,pt),be.return=Pe,be):(be=V(be,ke),be.return=Pe,be)}function Ue(Pe,be,ke){if(typeof be=="string"&&be!==""||typeof be=="number")return be=Eg(""+be,Pe.mode,ke),be.return=Pe,be;if(typeof be=="object"&&be!==null){switch(be.$$typeof){case x:return ke=$h(be.type,be.key,be.props,null,Pe.mode,ke),ke.ref=Rr(Pe,null,be),ke.return=Pe,ke;case N:return be=xg(be,Pe.mode,ke),be.return=Pe,be;case Y:var Ge=be._init;return Ue(Pe,Ge(be._payload),ke)}if(xe(be)||q(be))return be=Bs(be,Pe.mode,ke,null),be.return=Pe,be;$n(Pe,be)}return null}function ze(Pe,be,ke,Ge){var pt=be!==null?be.key:null;if(typeof ke=="string"&&ke!==""||typeof ke=="number")return pt!==null?null:de(Pe,be,""+ke,Ge);if(typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case x:return ke.key===pt?ge(Pe,be,ke,Ge):null;case N:return ke.key===pt?Re(Pe,be,ke,Ge):null;case Y:return pt=ke._init,ze(Pe,be,pt(ke._payload),Ge)}if(xe(ke)||q(ke))return pt!==null?null:Be(Pe,be,ke,Ge,null);$n(Pe,ke)}return null}function nt(Pe,be,ke,Ge,pt){if(typeof Ge=="string"&&Ge!==""||typeof Ge=="number")return Pe=Pe.get(ke)||null,de(be,Pe,""+Ge,pt);if(typeof Ge=="object"&&Ge!==null){switch(Ge.$$typeof){case x:return Pe=Pe.get(Ge.key===null?ke:Ge.key)||null,ge(be,Pe,Ge,pt);case N:return Pe=Pe.get(Ge.key===null?ke:Ge.key)||null,Re(be,Pe,Ge,pt);case Y:var St=Ge._init;return nt(Pe,be,ke,St(Ge._payload),pt)}if(xe(Ge)||q(Ge))return Pe=Pe.get(ke)||null,Be(be,Pe,Ge,pt,null);$n(be,Ge)}return null}function ut(Pe,be,ke,Ge){for(var pt=null,St=null,Et=be,Pt=be=0,En=null;Et!==null&&Pt<ke.length;Pt++){Et.index>Pt?(En=Et,Et=null):En=Et.sibling;var Zt=ze(Pe,Et,ke[Pt],Ge);if(Zt===null){Et===null&&(Et=En);break}n&&Et&&Zt.alternate===null&&o(Pe,Et),be=Q(Zt,be,Pt),St===null?pt=Zt:St.sibling=Zt,St=Zt,Et=En}if(Pt===ke.length)return P(Pe,Et),Jt&&Fo(Pe,Pt),pt;if(Et===null){for(;Pt<ke.length;Pt++)Et=Ue(Pe,ke[Pt],Ge),Et!==null&&(be=Q(Et,be,Pt),St===null?pt=Et:St.sibling=Et,St=Et);return Jt&&Fo(Pe,Pt),pt}for(Et=F(Pe,Et);Pt<ke.length;Pt++)En=nt(Et,Pe,Pt,ke[Pt],Ge),En!==null&&(n&&En.alternate!==null&&Et.delete(En.key===null?Pt:En.key),be=Q(En,be,Pt),St===null?pt=En:St.sibling=En,St=En);return n&&Et.forEach(function(Wl){return o(Pe,Wl)}),Jt&&Fo(Pe,Pt),pt}function dt(Pe,be,ke,Ge){var pt=q(ke);if(typeof pt!="function")throw Error(t(150));if(ke=pt.call(ke),ke==null)throw Error(t(151));for(var St=pt=null,Et=be,Pt=be=0,En=null,Zt=ke.next();Et!==null&&!Zt.done;Pt++,Zt=ke.next()){Et.index>Pt?(En=Et,Et=null):En=Et.sibling;var Wl=ze(Pe,Et,Zt.value,Ge);if(Wl===null){Et===null&&(Et=En);break}n&&Et&&Wl.alternate===null&&o(Pe,Et),be=Q(Wl,be,Pt),St===null?pt=Wl:St.sibling=Wl,St=Wl,Et=En}if(Zt.done)return P(Pe,Et),Jt&&Fo(Pe,Pt),pt;if(Et===null){for(;!Zt.done;Pt++,Zt=ke.next())Zt=Ue(Pe,Zt.value,Ge),Zt!==null&&(be=Q(Zt,be,Pt),St===null?pt=Zt:St.sibling=Zt,St=Zt);return Jt&&Fo(Pe,Pt),pt}for(Et=F(Pe,Et);!Zt.done;Pt++,Zt=ke.next())Zt=nt(Et,Pe,Pt,Zt.value,Ge),Zt!==null&&(n&&Zt.alternate!==null&&Et.delete(Zt.key===null?Pt:Zt.key),be=Q(Zt,be,Pt),St===null?pt=Zt:St.sibling=Zt,St=Zt);return n&&Et.forEach(function(T_){return o(Pe,T_)}),Jt&&Fo(Pe,Pt),pt}function $r(Pe,be,ke,Ge){if(typeof ke=="object"&&ke!==null&&ke.type===T&&ke.key===null&&(ke=ke.props.children),typeof ke=="object"&&ke!==null){switch(ke.$$typeof){case x:e:{for(var pt=ke.key,St=be;St!==null;){if(St.key===pt){if(pt=ke.type,pt===T){if(St.tag===7){P(Pe,St.sibling),be=V(St,ke.props.children),be.return=Pe,Pe=be;break e}}else if(St.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===Y&&Li(pt)===St.type){P(Pe,St.sibling),be=V(St,ke.props),be.ref=Rr(Pe,St,ke),be.return=Pe,Pe=be;break e}P(Pe,St);break}else o(Pe,St);St=St.sibling}ke.type===T?(be=Bs(ke.props.children,Pe.mode,Ge,ke.key),be.return=Pe,Pe=be):(Ge=$h(ke.type,ke.key,ke.props,null,Pe.mode,Ge),Ge.ref=Rr(Pe,be,ke),Ge.return=Pe,Pe=Ge)}return oe(Pe);case N:e:{for(St=ke.key;be!==null;){if(be.key===St)if(be.tag===4&&be.stateNode.containerInfo===ke.containerInfo&&be.stateNode.implementation===ke.implementation){P(Pe,be.sibling),be=V(be,ke.children||[]),be.return=Pe,Pe=be;break e}else{P(Pe,be);break}else o(Pe,be);be=be.sibling}be=xg(ke,Pe.mode,Ge),be.return=Pe,Pe=be}return oe(Pe);case Y:return St=ke._init,$r(Pe,be,St(ke._payload),Ge)}if(xe(ke))return ut(Pe,be,ke,Ge);if(q(ke))return dt(Pe,be,ke,Ge);$n(Pe,ke)}return typeof ke=="string"&&ke!==""||typeof ke=="number"?(ke=""+ke,be!==null&&be.tag===6?(P(Pe,be.sibling),be=V(be,ke),be.return=Pe,Pe=be):(P(Pe,be),be=Eg(ke,Pe.mode,Ge),be.return=Pe,Pe=be),oe(Pe)):P(Pe,be)}return $r}var Uo=Iu(!0),gi=Iu(!1),Ts=ga(null),ii=null,Cl=null,ju=null;function Du(){ju=Cl=ii=null}function Fu(n){var o=Ts.current;ur(Ts),n._currentValue=o}function zu(n,o,P){for(;n!==null;){var F=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,F!==null&&(F.childLanes|=o)):F!==null&&(F.childLanes&o)!==o&&(F.childLanes|=o),n===P)break;n=n.return}}function ma(n,o){ii=n,ju=Cl=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(re=!0),n.firstContext=null)}function Nn(n){var o=n._currentValue;if(ju!==n)if(n={context:n,memoizedValue:o,next:null},Cl===null){if(ii===null)throw Error(t(308));Cl=n,ii.dependencies={lanes:0,firstContext:n}}else Cl=Cl.next=n;return o}var Zi=null;function kl(n){Zi===null?Zi=[n]:Zi.push(n)}function Rs(n,o,P,F){var V=o.interleaved;return V===null?(P.next=P,kl(o)):(P.next=V.next,V.next=P),o.interleaved=P,ai(n,F)}function ai(n,o){n.lanes|=o;var P=n.alternate;for(P!==null&&(P.lanes|=o),P=n,n=n.return;n!==null;)n.childLanes|=o,P=n.alternate,P!==null&&(P.childLanes|=o),P=n,n=n.return;return P.tag===3?P.stateNode:null}var Qi=!1;function Ms(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bu(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Ji(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function ea(n,o,P){var F=n.updateQueue;if(F===null)return null;if(F=F.shared,(Yt&2)!==0){var V=F.pending;return V===null?o.next=o:(o.next=V.next,V.next=o),F.pending=o,ai(n,P)}return V=F.interleaved,V===null?(o.next=o,kl(F)):(o.next=V.next,V.next=o),F.interleaved=o,ai(n,P)}function Uu(n,o,P){if(o=o.updateQueue,o!==null&&(o=o.shared,(P&4194240)!==0)){var F=o.lanes;F&=n.pendingLanes,P|=F,o.lanes=P,Tc(n,P)}}function Ls(n,o){var P=n.updateQueue,F=n.alternate;if(F!==null&&(F=F.updateQueue,P===F)){var V=null,Q=null;if(P=P.firstBaseUpdate,P!==null){do{var oe={eventTime:P.eventTime,lane:P.lane,tag:P.tag,payload:P.payload,callback:P.callback,next:null};Q===null?V=Q=oe:Q=Q.next=oe,P=P.next}while(P!==null);Q===null?V=Q=o:Q=Q.next=o}else V=Q=o;P={baseState:F.baseState,firstBaseUpdate:V,lastBaseUpdate:Q,shared:F.shared,effects:F.effects},n.updateQueue=P;return}n=P.lastBaseUpdate,n===null?P.firstBaseUpdate=o:n.next=o,P.lastBaseUpdate=o}function Al(n,o,P,F){var V=n.updateQueue;Qi=!1;var Q=V.firstBaseUpdate,oe=V.lastBaseUpdate,de=V.shared.pending;if(de!==null){V.shared.pending=null;var ge=de,Re=ge.next;ge.next=null,oe===null?Q=Re:oe.next=Re,oe=ge;var Be=n.alternate;Be!==null&&(Be=Be.updateQueue,de=Be.lastBaseUpdate,de!==oe&&(de===null?Be.firstBaseUpdate=Re:de.next=Re,Be.lastBaseUpdate=ge))}if(Q!==null){var Ue=V.baseState;oe=0,Be=Re=ge=null,de=Q;do{var ze=de.lane,nt=de.eventTime;if((F&ze)===ze){Be!==null&&(Be=Be.next={eventTime:nt,lane:0,tag:de.tag,payload:de.payload,callback:de.callback,next:null});e:{var ut=n,dt=de;switch(ze=o,nt=P,dt.tag){case 1:if(ut=dt.payload,typeof ut=="function"){Ue=ut.call(nt,Ue,ze);break e}Ue=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=dt.payload,ze=typeof ut=="function"?ut.call(nt,Ue,ze):ut,ze==null)break e;Ue=D({},Ue,ze);break e;case 2:Qi=!0}}de.callback!==null&&de.lane!==0&&(n.flags|=64,ze=V.effects,ze===null?V.effects=[de]:ze.push(de))}else nt={eventTime:nt,lane:ze,tag:de.tag,payload:de.payload,callback:de.callback,next:null},Be===null?(Re=Be=nt,ge=Ue):Be=Be.next=nt,oe|=ze;if(de=de.next,de===null){if(de=V.shared.pending,de===null)break;ze=de,de=ze.next,ze.next=null,V.lastBaseUpdate=ze,V.shared.pending=null}}while(!0);if(Be===null&&(ge=Ue),V.baseState=ge,V.firstBaseUpdate=Re,V.lastBaseUpdate=Be,o=V.shared.interleaved,o!==null){V=o;do oe|=V.lane,V=V.next;while(V!==o)}else Q===null&&(V.shared.lanes=0);js|=oe,n.lanes=oe,n.memoizedState=Ue}}function Cr(n,o,P){if(n=o.effects,o.effects=null,n!==null)for(o=0;o<n.length;o++){var F=n[o],V=F.callback;if(V!==null){if(F.callback=null,F=P,typeof V!="function")throw Error(t(191,V));V.call(F)}}}var Tt={},or=ga(Tt),wr=ga(Tt),Mr=ga(Tt);function Hr(n){if(n===Tt)throw Error(t(174));return n}function ro(n,o){switch(ar(Mr,o),ar(wr,n),ar(or,Tt),n=o.nodeType,n){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:rt(null,"");break;default:n=n===8?o.parentNode:o,o=n.namespaceURI||null,n=n.tagName,o=rt(o,n)}ur(or),ar(or,o)}function _r(){ur(or),ur(wr),ur(Mr)}function Tl(n){Hr(Mr.current);var o=Hr(or.current),P=rt(o,n.type);o!==P&&(ar(wr,n),ar(or,P))}function ya(n){wr.current===n&&(ur(or),ur(wr))}var cr=ga(0);function Rl(n){for(var o=n;o!==null;){if(o.tag===13){var P=o.memoizedState;if(P!==null&&(P=P.dehydrated,P===null||P.data==="$?"||P.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var qo=[];function yn(){for(var n=0;n<qo.length;n++)qo[n]._workInProgressVersionPrimary=null;qo.length=0}var Ml=m.ReactCurrentDispatcher,Ns=m.ReactCurrentBatchConfig,In=0,nr=null,kr=null,jr=null,Ni=!1,no=!1,vi=0,qu=0;function Dr(){throw Error(t(321))}function Is(n,o){if(o===null)return!1;for(var P=0;P<o.length&&P<n.length;P++)if(!Vn(n[P],o[P]))return!1;return!0}function Ll(n,o,P,F,V,Q){if(In=Q,nr=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Ml.current=n===null||n.memoizedState===null?ig:oo,n=P(F,V),no){Q=0;do{if(no=!1,vi=0,25<=Q)throw Error(t(301));Q+=1,jr=kr=null,o.updateQueue=null,Ml.current=Wu,n=P(F,V)}while(no)}if(Ml.current=Dl,o=kr!==null&&kr.next!==null,In=0,jr=kr=nr=null,Ni=!1,o)throw Error(t(300));return n}function Nl(){var n=vi!==0;return vi=0,n}function gr(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jr===null?nr.memoizedState=jr=n:jr=jr.next=n,jr}function Gr(){if(kr===null){var n=nr.alternate;n=n!==null?n.memoizedState:null}else n=kr.next;var o=jr===null?nr.memoizedState:jr.next;if(o!==null)jr=o,kr=n;else{if(n===null)throw Error(t(310));kr=n,n={memoizedState:kr.memoizedState,baseState:kr.baseState,baseQueue:kr.baseQueue,queue:kr.queue,next:null},jr===null?nr.memoizedState=jr=n:jr=jr.next=n}return jr}function bn(n,o){return typeof o=="function"?o(n):o}function wn(n){var o=Gr(),P=o.queue;if(P===null)throw Error(t(311));P.lastRenderedReducer=n;var F=kr,V=F.baseQueue,Q=P.pending;if(Q!==null){if(V!==null){var oe=V.next;V.next=Q.next,Q.next=oe}F.baseQueue=V=Q,P.pending=null}if(V!==null){Q=V.next,F=F.baseState;var de=oe=null,ge=null,Re=Q;do{var Be=Re.lane;if((In&Be)===Be)ge!==null&&(ge=ge.next={lane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),F=Re.hasEagerState?Re.eagerState:n(F,Re.action);else{var Ue={lane:Be,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null};ge===null?(de=ge=Ue,oe=F):ge=ge.next=Ue,nr.lanes|=Be,js|=Be}Re=Re.next}while(Re!==null&&Re!==Q);ge===null?oe=F:ge.next=de,Vn(F,o.memoizedState)||(re=!0),o.memoizedState=F,o.baseState=oe,o.baseQueue=ge,P.lastRenderedState=F}if(n=P.interleaved,n!==null){V=n;do Q=V.lane,nr.lanes|=Q,js|=Q,V=V.next;while(V!==n)}else V===null&&(P.lanes=0);return[o.memoizedState,P.dispatch]}function Hu(n){var o=Gr(),P=o.queue;if(P===null)throw Error(t(311));P.lastRenderedReducer=n;var F=P.dispatch,V=P.pending,Q=o.memoizedState;if(V!==null){P.pending=null;var oe=V=V.next;do Q=n(Q,oe.action),oe=oe.next;while(oe!==V);Vn(Q,o.memoizedState)||(re=!0),o.memoizedState=Q,o.baseQueue===null&&(o.baseState=Q),P.lastRenderedState=Q}return[Q,F]}function Gu(){}function Vu(n,o){var P=nr,F=Gr(),V=o(),Q=!Vn(F.memoizedState,V);if(Q&&(F.memoizedState=V,re=!0),F=F.queue,uf(of.bind(null,P,F,n),[n]),F.getSnapshot!==o||Q||jr!==null&&jr.memoizedState.tag&1){if(P.flags|=2048,Il(9,ba.bind(null,P,F,V,o),void 0,null),Sn===null)throw Error(t(349));(In&30)!==0||Ph(P,o,V)}return V}function Ph(n,o,P){n.flags|=16384,n={getSnapshot:o,value:P},o=nr.updateQueue,o===null?(o={lastEffect:null,stores:null},nr.updateQueue=o,o.stores=[n]):(P=o.stores,P===null?o.stores=[n]:P.push(n))}function ba(n,o,P,F){o.value=P,o.getSnapshot=F,lf(o)&&$u(n)}function of(n,o,P){return P(function(){lf(o)&&$u(n)})}function lf(n){var o=n.getSnapshot;n=n.value;try{var P=o();return!Vn(n,P)}catch{return!0}}function $u(n){var o=ai(n,1);o!==null&&Ea(o,n,1,-1)}function io(n){var o=gr();return typeof n=="function"&&(n=n()),o.memoizedState=o.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:bn,lastRenderedState:n},o.queue=n,n=n.dispatch=Mh.bind(null,nr,n),[o.memoizedState,n]}function Il(n,o,P,F){return n={tag:n,create:o,destroy:P,deps:F,next:null},o=nr.updateQueue,o===null?(o={lastEffect:null,stores:null},nr.updateQueue=o,o.lastEffect=n.next=n):(P=o.lastEffect,P===null?o.lastEffect=n.next=n:(F=P.next,P.next=n,n.next=F,o.lastEffect=n)),n}function sf(){return Gr().memoizedState}function jl(n,o,P,F){var V=gr();nr.flags|=n,V.memoizedState=Il(1|o,P,void 0,F===void 0?null:F)}function Ho(n,o,P,F){var V=Gr();F=F===void 0?null:F;var Q=void 0;if(kr!==null){var oe=kr.memoizedState;if(Q=oe.destroy,F!==null&&Is(F,oe.deps)){V.memoizedState=Il(o,P,Q,F);return}}nr.flags|=n,V.memoizedState=Il(1|o,P,Q,F)}function Ch(n,o){return jl(8390656,8,n,o)}function uf(n,o){return Ho(2048,8,n,o)}function cf(n,o){return Ho(4,2,n,o)}function ff(n,o){return Ho(4,4,n,o)}function ao(n,o){if(typeof o=="function")return n=n(),o(n),function(){o(null)};if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function kh(n,o,P){return P=P!=null?P.concat([n]):null,Ho(4,4,ao.bind(null,o,n),P)}function wa(){}function df(n,o){var P=Gr();o=o===void 0?null:o;var F=P.memoizedState;return F!==null&&o!==null&&Is(o,F[1])?F[0]:(P.memoizedState=[n,o],n)}function vr(n,o){var P=Gr();o=o===void 0?null:o;var F=P.memoizedState;return F!==null&&o!==null&&Is(o,F[1])?F[0]:(n=n(),P.memoizedState=[n,o],n)}function Ah(n,o,P){return(In&21)===0?(n.baseState&&(n.baseState=!1,re=!0),n.memoizedState=P):(Vn(P,o)||(P=Ac(),nr.lanes|=P,js|=P,n.baseState=!0),o)}function Th(n,o){var P=Wt;Wt=P!==0&&4>P?P:4,n(!0);var F=Ns.transition;Ns.transition={};try{n(!1),o()}finally{Wt=P,Ns.transition=F}}function Rh(){return Gr().memoizedState}function ng(n,o,P){var F=Gl(n);if(P={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null},hf(n))Lh(o,P);else if(P=Rs(n,o,P,F),P!==null){var V=li();Ea(P,n,F,V),oi(P,o,F)}}function Mh(n,o,P){var F=Gl(n),V={lane:F,action:P,hasEagerState:!1,eagerState:null,next:null};if(hf(n))Lh(o,V);else{var Q=n.alternate;if(n.lanes===0&&(Q===null||Q.lanes===0)&&(Q=o.lastRenderedReducer,Q!==null))try{var oe=o.lastRenderedState,de=Q(oe,P);if(V.hasEagerState=!0,V.eagerState=de,Vn(de,oe)){var ge=o.interleaved;ge===null?(V.next=V,kl(o)):(V.next=ge.next,ge.next=V),o.interleaved=V;return}}catch{}finally{}P=Rs(n,o,V,F),P!==null&&(V=li(),Ea(P,n,F,V),oi(P,o,F))}}function hf(n){var o=n.alternate;return n===nr||o!==null&&o===nr}function Lh(n,o){no=Ni=!0;var P=n.pending;P===null?o.next=o:(o.next=P.next,P.next=o),n.pending=o}function oi(n,o,P){if((P&4194240)!==0){var F=o.lanes;F&=n.pendingLanes,P|=F,o.lanes=P,Tc(n,P)}}var Dl={readContext:Nn,useCallback:Dr,useContext:Dr,useEffect:Dr,useImperativeHandle:Dr,useInsertionEffect:Dr,useLayoutEffect:Dr,useMemo:Dr,useReducer:Dr,useRef:Dr,useState:Dr,useDebugValue:Dr,useDeferredValue:Dr,useTransition:Dr,useMutableSource:Dr,useSyncExternalStore:Dr,useId:Dr,unstable_isNewReconciler:!1},ig={readContext:Nn,useCallback:function(n,o){return gr().memoizedState=[n,o===void 0?null:o],n},useContext:Nn,useEffect:Ch,useImperativeHandle:function(n,o,P){return P=P!=null?P.concat([n]):null,jl(4194308,4,ao.bind(null,o,n),P)},useLayoutEffect:function(n,o){return jl(4194308,4,n,o)},useInsertionEffect:function(n,o){return jl(4,2,n,o)},useMemo:function(n,o){var P=gr();return o=o===void 0?null:o,n=n(),P.memoizedState=[n,o],n},useReducer:function(n,o,P){var F=gr();return o=P!==void 0?P(o):o,F.memoizedState=F.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},F.queue=n,n=n.dispatch=ng.bind(null,nr,n),[F.memoizedState,n]},useRef:function(n){var o=gr();return n={current:n},o.memoizedState=n},useState:io,useDebugValue:wa,useDeferredValue:function(n){return gr().memoizedState=n},useTransition:function(){var n=io(!1),o=n[0];return n=Th.bind(null,n[1]),gr().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,P){var F=nr,V=gr();if(Jt){if(P===void 0)throw Error(t(407));P=P()}else{if(P=o(),Sn===null)throw Error(t(349));(In&30)!==0||Ph(F,o,P)}V.memoizedState=P;var Q={value:P,getSnapshot:o};return V.queue=Q,Ch(of.bind(null,F,Q,n),[n]),F.flags|=2048,Il(9,ba.bind(null,F,Q,P,o),void 0,null),P},useId:function(){var n=gr(),o=Sn.identifierPrefix;if(Jt){var P=br,F=ti;P=(F&~(1<<32-It(F)-1)).toString(32)+P,o=":"+o+"R"+P,P=vi++,0<P&&(o+="H"+P.toString(32)),o+=":"}else P=qu++,o=":"+o+"r"+P.toString(32)+":";return n.memoizedState=o},unstable_isNewReconciler:!1},oo={readContext:Nn,useCallback:df,useContext:Nn,useEffect:uf,useImperativeHandle:kh,useInsertionEffect:cf,useLayoutEffect:ff,useMemo:vr,useReducer:wn,useRef:sf,useState:function(){return wn(bn)},useDebugValue:wa,useDeferredValue:function(n){var o=Gr();return Ah(o,kr.memoizedState,n)},useTransition:function(){var n=wn(bn)[0],o=Gr().memoizedState;return[n,o]},useMutableSource:Gu,useSyncExternalStore:Vu,useId:Rh,unstable_isNewReconciler:!1},Wu={readContext:Nn,useCallback:df,useContext:Nn,useEffect:uf,useImperativeHandle:kh,useInsertionEffect:cf,useLayoutEffect:ff,useMemo:vr,useReducer:Hu,useRef:sf,useState:function(){return Hu(bn)},useDebugValue:wa,useDeferredValue:function(n){var o=Gr();return kr===null?o.memoizedState=n:Ah(o,kr.memoizedState,n)},useTransition:function(){var n=Hu(bn)[0],o=Gr().memoizedState;return[n,o]},useMutableSource:Gu,useSyncExternalStore:Vu,useId:Rh,unstable_isNewReconciler:!1};function sn(n,o){if(n&&n.defaultProps){o=D({},o),n=n.defaultProps;for(var P in n)o[P]===void 0&&(o[P]=n[P]);return o}return o}function Fl(n,o,P,F){o=n.memoizedState,P=P(F,o),P=P==null?o:D({},o,P),n.memoizedState=P,n.lanes===0&&(n.updateQueue.baseState=P)}var zl={isMounted:function(n){return(n=n._reactInternals)?Lr(n)===n:!1},enqueueSetState:function(n,o,P){n=n._reactInternals;var F=li(),V=Gl(n),Q=Ji(F,V);Q.payload=o,P!=null&&(Q.callback=P),o=ea(n,Q,V),o!==null&&(Ea(o,n,V,F),Uu(o,n,V))},enqueueReplaceState:function(n,o,P){n=n._reactInternals;var F=li(),V=Gl(n),Q=Ji(F,V);Q.tag=1,Q.payload=o,P!=null&&(Q.callback=P),o=ea(n,Q,V),o!==null&&(Ea(o,n,V,F),Uu(o,n,V))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var P=li(),F=Gl(n),V=Ji(P,F);V.tag=2,o!=null&&(V.callback=o),o=ea(n,V,F),o!==null&&(Ea(o,n,F,P),Uu(o,n,F))}};function Yu(n,o,P,F,V,Q,oe){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(F,Q,oe):o.prototype&&o.prototype.isPureReactComponent?!Po(P,F)||!Po(V,Q):!0}function Nh(n,o,P){var F=!1,V=Ki,Q=o.contextType;return typeof Q=="object"&&Q!==null?Q=Nn(Q):(V=mn(o)?Za:ln.current,F=o.contextTypes,Q=(F=F!=null)?Io(n,V):Ki),o=new o(P,Q),n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=zl,n.stateNode=o,o._reactInternals=n,F&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=V,n.__reactInternalMemoizedMaskedChildContext=Q),o}function pf(n,o,P,F){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(P,F),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(P,F),o.state!==n&&zl.enqueueReplaceState(o,o.state,null)}function Ku(n,o,P,F){var V=n.stateNode;V.props=P,V.state=n.memoizedState,V.refs={},Ms(n);var Q=o.contextType;typeof Q=="object"&&Q!==null?V.context=Nn(Q):(Q=mn(o)?Za:ln.current,V.context=Io(n,Q)),V.state=n.memoizedState,Q=o.getDerivedStateFromProps,typeof Q=="function"&&(Fl(n,o,Q,P),V.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof V.getSnapshotBeforeUpdate=="function"||typeof V.UNSAFE_componentWillMount!="function"&&typeof V.componentWillMount!="function"||(o=V.state,typeof V.componentWillMount=="function"&&V.componentWillMount(),typeof V.UNSAFE_componentWillMount=="function"&&V.UNSAFE_componentWillMount(),o!==V.state&&zl.enqueueReplaceState(V,V.state,null),Al(n,P,V,F),V.state=n.memoizedState),typeof V.componentDidMount=="function"&&(n.flags|=4194308)}function Go(n,o){try{var P="",F=o;do P+=ne(F),F=F.return;while(F);var V=P}catch(Q){V=`
|
|
31
|
-
Error generating stack: `+Q.message+`
|
|
32
|
-
`+Q.stack}return{value:n,source:o,stack:V,digest:null}}function Xu(n,o,P){return{value:n,source:null,stack:P??null,digest:o??null}}function Bl(n,o){try{console.error(o.value)}catch(P){setTimeout(function(){throw P})}}var ag=typeof WeakMap=="function"?WeakMap:Map;function Ih(n,o,P){P=Ji(-1,P),P.tag=3,P.payload={element:null};var F=o.value;return P.callback=function(){Bh||(Bh=!0,gg=F),Bl(n,o)},P}function u(n,o,P){P=Ji(-1,P),P.tag=3;var F=n.type.getDerivedStateFromError;if(typeof F=="function"){var V=o.value;P.payload=function(){return F(V)},P.callback=function(){Bl(n,o)}}var Q=n.stateNode;return Q!==null&&typeof Q.componentDidCatch=="function"&&(P.callback=function(){Bl(n,o),typeof F!="function"&&(ql===null?ql=new Set([this]):ql.add(this));var oe=o.stack;this.componentDidCatch(o.value,{componentStack:oe!==null?oe:""})}),P}function d(n,o,P){var F=n.pingCache;if(F===null){F=n.pingCache=new ag;var V=new Set;F.set(o,V)}else V=F.get(o),V===void 0&&(V=new Set,F.set(o,V));V.has(P)||(V.add(P),n=b_.bind(null,n,o,P),o.then(n,n))}function j(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function G(n,o,P,F,V){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,P.flags|=131072,P.flags&=-52805,P.tag===1&&(P.alternate===null?P.tag=17:(o=Ji(-1,1),o.tag=2,ea(P,o,1))),P.lanes|=1),n):(n.flags|=65536,n.lanes=V,n)}var K=m.ReactCurrentOwner,re=!1;function se(n,o,P,F){o.child=n===null?gi(o,null,P,F):Uo(o,n.child,P,F)}function we(n,o,P,F,V){P=P.render;var Q=o.ref;return ma(o,V),F=Ll(n,o,P,F,Q,V),P=Nl(),n!==null&&!re?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~V,_n(n,o,V)):(Jt&&P&&Ol(o),o.flags|=1,se(n,o,F,V),o.child)}function Me(n,o,P,F,V){if(n===null){var Q=P.type;return typeof Q=="function"&&!Sg(Q)&&Q.defaultProps===void 0&&P.compare===null&&P.defaultProps===void 0?(o.tag=15,o.type=Q,qe(n,o,Q,F,V)):(n=$h(P.type,null,F,o,o.mode,V),n.ref=o.ref,n.return=o,o.child=n)}if(Q=n.child,(n.lanes&V)===0){var oe=Q.memoizedProps;if(P=P.compare,P=P!==null?P:Po,P(oe,F)&&n.ref===o.ref)return _n(n,o,V)}return o.flags|=1,n=$l(Q,F),n.ref=o.ref,n.return=o,o.child=n}function qe(n,o,P,F,V){if(n!==null){var Q=n.memoizedProps;if(Po(Q,F)&&n.ref===o.ref)if(re=!1,o.pendingProps=F=Q,(n.lanes&V)!==0)(n.flags&131072)!==0&&(re=!0);else return o.lanes=n.lanes,_n(n,o,V)}return Qe(n,o,P,F,V)}function ot(n,o,P){var F=o.pendingProps,V=F.children,Q=n!==null?n.memoizedState:null;if(F.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},ar(Qu,Ii),Ii|=P;else{if((P&1073741824)===0)return n=Q!==null?Q.baseLanes|P:P,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,ar(Qu,Ii),Ii|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=Q!==null?Q.baseLanes:P,ar(Qu,Ii),Ii|=F}else Q!==null?(F=Q.baseLanes|P,o.memoizedState=null):F=P,ar(Qu,Ii),Ii|=F;return se(n,o,V,P),o.child}function Ct(n,o){var P=o.ref;(n===null&&P!==null||n!==null&&n.ref!==P)&&(o.flags|=512,o.flags|=2097152)}function Qe(n,o,P,F,V){var Q=mn(P)?Za:ln.current;return Q=Io(o,Q),ma(o,V),P=Ll(n,o,P,F,Q,V),F=Nl(),n!==null&&!re?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~V,_n(n,o,V)):(Jt&&F&&Ol(o),o.flags|=1,se(n,o,P,V),o.child)}function fr(n,o,P,F,V){if(mn(P)){var Q=!0;jo(o)}else Q=!1;if(ma(o,V),o.stateNode===null)Bt(n,o),Nh(o,P,F),Ku(o,P,F,V),F=!0;else if(n===null){var oe=o.stateNode,de=o.memoizedProps;oe.props=de;var ge=oe.context,Re=P.contextType;typeof Re=="object"&&Re!==null?Re=Nn(Re):(Re=mn(P)?Za:ln.current,Re=Io(o,Re));var Be=P.getDerivedStateFromProps,Ue=typeof Be=="function"||typeof oe.getSnapshotBeforeUpdate=="function";Ue||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(de!==F||ge!==Re)&&pf(o,oe,F,Re),Qi=!1;var ze=o.memoizedState;oe.state=ze,Al(o,F,oe,V),ge=o.memoizedState,de!==F||ze!==ge||vn.current||Qi?(typeof Be=="function"&&(Fl(o,P,Be,F),ge=o.memoizedState),(de=Qi||Yu(o,P,de,F,ze,ge,Re))?(Ue||typeof oe.UNSAFE_componentWillMount!="function"&&typeof oe.componentWillMount!="function"||(typeof oe.componentWillMount=="function"&&oe.componentWillMount(),typeof oe.UNSAFE_componentWillMount=="function"&&oe.UNSAFE_componentWillMount()),typeof oe.componentDidMount=="function"&&(o.flags|=4194308)):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=F,o.memoizedState=ge),oe.props=F,oe.state=ge,oe.context=Re,F=de):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),F=!1)}else{oe=o.stateNode,Bu(n,o),de=o.memoizedProps,Re=o.type===o.elementType?de:sn(o.type,de),oe.props=Re,Ue=o.pendingProps,ze=oe.context,ge=P.contextType,typeof ge=="object"&&ge!==null?ge=Nn(ge):(ge=mn(P)?Za:ln.current,ge=Io(o,ge));var nt=P.getDerivedStateFromProps;(Be=typeof nt=="function"||typeof oe.getSnapshotBeforeUpdate=="function")||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(de!==Ue||ze!==ge)&&pf(o,oe,F,ge),Qi=!1,ze=o.memoizedState,oe.state=ze,Al(o,F,oe,V);var ut=o.memoizedState;de!==Ue||ze!==ut||vn.current||Qi?(typeof nt=="function"&&(Fl(o,P,nt,F),ut=o.memoizedState),(Re=Qi||Yu(o,P,Re,F,ze,ut,ge)||!1)?(Be||typeof oe.UNSAFE_componentWillUpdate!="function"&&typeof oe.componentWillUpdate!="function"||(typeof oe.componentWillUpdate=="function"&&oe.componentWillUpdate(F,ut,ge),typeof oe.UNSAFE_componentWillUpdate=="function"&&oe.UNSAFE_componentWillUpdate(F,ut,ge)),typeof oe.componentDidUpdate=="function"&&(o.flags|=4),typeof oe.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof oe.componentDidUpdate!="function"||de===n.memoizedProps&&ze===n.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||de===n.memoizedProps&&ze===n.memoizedState||(o.flags|=1024),o.memoizedProps=F,o.memoizedState=ut),oe.props=F,oe.state=ut,oe.context=ge,F=Re):(typeof oe.componentDidUpdate!="function"||de===n.memoizedProps&&ze===n.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||de===n.memoizedProps&&ze===n.memoizedState||(o.flags|=1024),F=!1)}return er(n,o,P,F,Q,V)}function er(n,o,P,F,V,Q){Ct(n,o);var oe=(o.flags&128)!==0;if(!F&&!oe)return V&&Eh(o,P,!1),_n(n,o,Q);F=o.stateNode,K.current=o;var de=oe&&typeof P.getDerivedStateFromError!="function"?null:F.render();return o.flags|=1,n!==null&&oe?(o.child=Uo(o,n.child,null,Q),o.child=Uo(o,null,de,Q)):se(n,o,de,Q),o.memoizedState=F.state,V&&Eh(o,P,!0),o.child}function jn(n){var o=n.stateNode;o.pendingContext?tf(n,o.pendingContext,o.pendingContext!==o.context):o.context&&tf(n,o.context,!1),ro(n,o.containerInfo)}function ta(n,o,P,F,V){return Bo(),As(V),o.flags|=256,se(n,o,P,F),o.child}var Ae={dehydrated:null,treeContext:null,retryLane:0};function Ee(n){return{baseLanes:n,cachePool:null,transitions:null}}function Le(n,o,P){var F=o.pendingProps,V=cr.current,Q=!1,oe=(o.flags&128)!==0,de;if((de=oe)||(de=n!==null&&n.memoizedState===null?!1:(V&2)!==0),de?(Q=!0,o.flags&=-129):(n===null||n.memoizedState!==null)&&(V|=1),ar(cr,V&1),n===null)return Pl(o),n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((o.mode&1)===0?o.lanes=1:n.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(oe=F.children,n=F.fallback,Q?(F=o.mode,Q=o.child,oe={mode:"hidden",children:oe},(F&1)===0&&Q!==null?(Q.childLanes=0,Q.pendingProps=oe):Q=Wh(oe,F,0,null),n=Bs(n,F,P,null),Q.return=o,n.return=o,Q.sibling=n,o.child=Q,o.child.memoizedState=Ee(P),o.memoizedState=Ae,n):Je(o,oe));if(V=n.memoizedState,V!==null&&(de=V.dehydrated,de!==null))return Lt(n,o,oe,F,de,V,P);if(Q){Q=F.fallback,oe=o.mode,V=n.child,de=V.sibling;var ge={mode:"hidden",children:F.children};return(oe&1)===0&&o.child!==V?(F=o.child,F.childLanes=0,F.pendingProps=ge,o.deletions=null):(F=$l(V,ge),F.subtreeFlags=V.subtreeFlags&14680064),de!==null?Q=$l(de,Q):(Q=Bs(Q,oe,P,null),Q.flags|=2),Q.return=o,F.return=o,F.sibling=Q,o.child=F,F=Q,Q=o.child,oe=n.child.memoizedState,oe=oe===null?Ee(P):{baseLanes:oe.baseLanes|P,cachePool:null,transitions:oe.transitions},Q.memoizedState=oe,Q.childLanes=n.childLanes&~P,o.memoizedState=Ae,F}return Q=n.child,n=Q.sibling,F=$l(Q,{mode:"visible",children:F.children}),(o.mode&1)===0&&(F.lanes=P),F.return=o,F.sibling=null,n!==null&&(P=o.deletions,P===null?(o.deletions=[n],o.flags|=16):P.push(n)),o.child=F,o.memoizedState=null,F}function Je(n,o){return o=Wh({mode:"visible",children:o},n.mode,0,null),o.return=n,n.child=o}function yt(n,o,P,F){return F!==null&&As(F),Uo(o,n.child,null,P),n=Je(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function Lt(n,o,P,F,V,Q,oe){if(P)return o.flags&256?(o.flags&=-257,F=Xu(Error(t(422))),yt(n,o,oe,F)):o.memoizedState!==null?(o.child=n.child,o.flags|=128,null):(Q=F.fallback,V=o.mode,F=Wh({mode:"visible",children:F.children},V,0,null),Q=Bs(Q,V,oe,null),Q.flags|=2,F.return=o,Q.return=o,F.sibling=Q,o.child=F,(o.mode&1)!==0&&Uo(o,n.child,null,oe),o.child.memoizedState=Ee(oe),o.memoizedState=Ae,Q);if((o.mode&1)===0)return yt(n,o,oe,null);if(V.data==="$!"){if(F=V.nextSibling&&V.nextSibling.dataset,F)var de=F.dgst;return F=de,Q=Error(t(419)),F=Xu(Q,F,void 0),yt(n,o,oe,F)}if(de=(oe&n.childLanes)!==0,re||de){if(F=Sn,F!==null){switch(oe&-oe){case 4:V=2;break;case 16:V=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:V=32;break;case 536870912:V=268435456;break;default:V=0}V=(V&(F.suspendedLanes|oe))!==0?0:V,V!==0&&V!==Q.retryLane&&(Q.retryLane=V,ai(n,V),Ea(F,n,V,-1))}return _g(),F=Xu(Error(t(421))),yt(n,o,oe,F)}return V.data==="$?"?(o.flags|=128,o.child=n.child,o=w_.bind(null,n),V._reactRetry=o,null):(n=Q.treeContext,Ke=Wi(V.nextSibling),ri=o,Jt=!0,ni=null,n!==null&&(Mn[Ln++]=ti,Mn[Ln++]=br,Mn[Ln++]=to,ti=n.id,br=n.overflow,to=o),o=Je(o,F.children),o.flags|=4096,o)}function kt(n,o,P){n.lanes|=o;var F=n.alternate;F!==null&&(F.lanes|=o),zu(n.return,o,P)}function Ht(n,o,P,F,V){var Q=n.memoizedState;Q===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:F,tail:P,tailMode:V}:(Q.isBackwards=o,Q.rendering=null,Q.renderingStartTime=0,Q.last=F,Q.tail=P,Q.tailMode=V)}function Vr(n,o,P){var F=o.pendingProps,V=F.revealOrder,Q=F.tail;if(se(n,o,F.children,P),F=cr.current,(F&2)!==0)F=F&1|2,o.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&kt(n,P,o);else if(n.tag===19)kt(n,P,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}F&=1}if(ar(cr,F),(o.mode&1)===0)o.memoizedState=null;else switch(V){case"forwards":for(P=o.child,V=null;P!==null;)n=P.alternate,n!==null&&Rl(n)===null&&(V=P),P=P.sibling;P=V,P===null?(V=o.child,o.child=null):(V=P.sibling,P.sibling=null),Ht(o,!1,V,P,Q);break;case"backwards":for(P=null,V=o.child,o.child=null;V!==null;){if(n=V.alternate,n!==null&&Rl(n)===null){o.child=V;break}n=V.sibling,V.sibling=P,P=V,V=n}Ht(o,!0,P,null,Q);break;case"together":Ht(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Bt(n,o){(o.mode&1)===0&&n!==null&&(n.alternate=null,o.alternate=null,o.flags|=2)}function _n(n,o,P){if(n!==null&&(o.dependencies=n.dependencies),js|=o.lanes,(P&o.childLanes)===0)return null;if(n!==null&&o.child!==n.child)throw Error(t(153));if(o.child!==null){for(n=o.child,P=$l(n,n.pendingProps),o.child=P,P.return=o;n.sibling!==null;)n=n.sibling,P=P.sibling=$l(n,n.pendingProps),P.return=o;P.sibling=null}return o.child}function og(n,o,P){switch(o.tag){case 3:jn(o),Bo();break;case 5:Tl(o);break;case 1:mn(o.type)&&jo(o);break;case 4:ro(o,o.stateNode.containerInfo);break;case 10:var F=o.type._context,V=o.memoizedProps.value;ar(Ts,F._currentValue),F._currentValue=V;break;case 13:if(F=o.memoizedState,F!==null)return F.dehydrated!==null?(ar(cr,cr.current&1),o.flags|=128,null):(P&o.child.childLanes)!==0?Le(n,o,P):(ar(cr,cr.current&1),n=_n(n,o,P),n!==null?n.sibling:null);ar(cr,cr.current&1);break;case 19:if(F=(P&o.childLanes)!==0,(n.flags&128)!==0){if(F)return Vr(n,o,P);o.flags|=128}if(V=o.memoizedState,V!==null&&(V.rendering=null,V.tail=null,V.lastEffect=null),ar(cr,cr.current),F)break;return null;case 22:case 23:return o.lanes=0,ot(n,o,P)}return _n(n,o,P)}var nm,lg,im,am;nm=function(n,o){for(var P=o.child;P!==null;){if(P.tag===5||P.tag===6)n.appendChild(P.stateNode);else if(P.tag!==4&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===o)break;for(;P.sibling===null;){if(P.return===null||P.return===o)return;P=P.return}P.sibling.return=P.return,P=P.sibling}},lg=function(){},im=function(n,o,P,F){var V=n.memoizedProps;if(V!==F){n=o.stateNode,Hr(or.current);var Q=null;switch(P){case"input":V=he(n,V),F=he(n,F),Q=[];break;case"select":V=D({},V,{value:void 0}),F=D({},F,{value:void 0}),Q=[];break;case"textarea":V=ce(n,V),F=ce(n,F),Q=[];break;default:typeof V.onClick!="function"&&typeof F.onClick=="function"&&(n.onclick=Mo)}_e(P,F);var oe;P=null;for(Re in V)if(!F.hasOwnProperty(Re)&&V.hasOwnProperty(Re)&&V[Re]!=null)if(Re==="style"){var de=V[Re];for(oe in de)de.hasOwnProperty(oe)&&(P||(P={}),P[oe]="")}else Re!=="dangerouslySetInnerHTML"&&Re!=="children"&&Re!=="suppressContentEditableWarning"&&Re!=="suppressHydrationWarning"&&Re!=="autoFocus"&&(a.hasOwnProperty(Re)?Q||(Q=[]):(Q=Q||[]).push(Re,null));for(Re in F){var ge=F[Re];if(de=V!=null?V[Re]:void 0,F.hasOwnProperty(Re)&&ge!==de&&(ge!=null||de!=null))if(Re==="style")if(de){for(oe in de)!de.hasOwnProperty(oe)||ge&&ge.hasOwnProperty(oe)||(P||(P={}),P[oe]="");for(oe in ge)ge.hasOwnProperty(oe)&&de[oe]!==ge[oe]&&(P||(P={}),P[oe]=ge[oe])}else P||(Q||(Q=[]),Q.push(Re,P)),P=ge;else Re==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,de=de?de.__html:void 0,ge!=null&&de!==ge&&(Q=Q||[]).push(Re,ge)):Re==="children"?typeof ge!="string"&&typeof ge!="number"||(Q=Q||[]).push(Re,""+ge):Re!=="suppressContentEditableWarning"&&Re!=="suppressHydrationWarning"&&(a.hasOwnProperty(Re)?(ge!=null&&Re==="onScroll"&&sr("scroll",n),Q||de===ge||(Q=[])):(Q=Q||[]).push(Re,ge))}P&&(Q=Q||[]).push("style",P);var Re=Q;(o.updateQueue=Re)&&(o.flags|=4)}},am=function(n,o,P,F){P!==F&&(o.flags|=4)};function gf(n,o){if(!Jt)switch(n.tailMode){case"hidden":o=n.tail;for(var P=null;o!==null;)o.alternate!==null&&(P=o),o=o.sibling;P===null?n.tail=null:P.sibling=null;break;case"collapsed":P=n.tail;for(var F=null;P!==null;)P.alternate!==null&&(F=P),P=P.sibling;F===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:F.sibling=null}}function Wn(n){var o=n.alternate!==null&&n.alternate.child===n.child,P=0,F=0;if(o)for(var V=n.child;V!==null;)P|=V.lanes|V.childLanes,F|=V.subtreeFlags&14680064,F|=V.flags&14680064,V.return=n,V=V.sibling;else for(V=n.child;V!==null;)P|=V.lanes|V.childLanes,F|=V.subtreeFlags,F|=V.flags,V.return=n,V=V.sibling;return n.subtreeFlags|=F,n.childLanes=P,o}function u_(n,o,P){var F=o.pendingProps;switch(Jr(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wn(o),null;case 1:return mn(o.type)&&El(),Wn(o),null;case 3:return F=o.stateNode,_r(),ur(vn),ur(ln),yn(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),(n===null||n.child===null)&&(ks(o)?o.flags|=4:n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,ni!==null&&(yg(ni),ni=null))),lg(n,o),Wn(o),null;case 5:ya(o);var V=Hr(Mr.current);if(P=o.type,n!==null&&o.stateNode!=null)im(n,o,P,F,V),n.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!F){if(o.stateNode===null)throw Error(t(166));return Wn(o),null}if(n=Hr(or.current),ks(o)){F=o.stateNode,P=o.type;var Q=o.memoizedProps;switch(F[pi]=o,F[Os]=Q,n=(o.mode&1)!==0,P){case"dialog":sr("cancel",F),sr("close",F);break;case"iframe":case"object":case"embed":sr("load",F);break;case"video":case"audio":for(V=0;V<Ya.length;V++)sr(Ya[V],F);break;case"source":sr("error",F);break;case"img":case"image":case"link":sr("error",F),sr("load",F);break;case"details":sr("toggle",F);break;case"input":ye(F,Q),sr("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!Q.multiple},sr("invalid",F);break;case"textarea":me(F,Q),sr("invalid",F)}_e(P,Q),V=null;for(var oe in Q)if(Q.hasOwnProperty(oe)){var de=Q[oe];oe==="children"?typeof de=="string"?F.textContent!==de&&(Q.suppressHydrationWarning!==!0&&Es(F.textContent,de,n),V=["children",de]):typeof de=="number"&&F.textContent!==""+de&&(Q.suppressHydrationWarning!==!0&&Es(F.textContent,de,n),V=["children",""+de]):a.hasOwnProperty(oe)&&de!=null&&oe==="onScroll"&&sr("scroll",F)}switch(P){case"input":ie(F),fe(F,Q,!0);break;case"textarea":ie(F),Ne(F);break;case"select":case"option":break;default:typeof Q.onClick=="function"&&(F.onclick=Mo)}F=V,o.updateQueue=F,F!==null&&(o.flags|=4)}else{oe=V.nodeType===9?V:V.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=tt(P)),n==="http://www.w3.org/1999/xhtml"?P==="script"?(n=oe.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof F.is=="string"?n=oe.createElement(P,{is:F.is}):(n=oe.createElement(P),P==="select"&&(oe=n,F.multiple?oe.multiple=!0:F.size&&(oe.size=F.size))):n=oe.createElementNS(n,P),n[pi]=o,n[Os]=F,nm(n,o,!1,!1),o.stateNode=n;e:{switch(oe=Se(P,F),P){case"dialog":sr("cancel",n),sr("close",n),V=F;break;case"iframe":case"object":case"embed":sr("load",n),V=F;break;case"video":case"audio":for(V=0;V<Ya.length;V++)sr(Ya[V],n);V=F;break;case"source":sr("error",n),V=F;break;case"img":case"image":case"link":sr("error",n),sr("load",n),V=F;break;case"details":sr("toggle",n),V=F;break;case"input":ye(n,F),V=he(n,F),sr("invalid",n);break;case"option":V=F;break;case"select":n._wrapperState={wasMultiple:!!F.multiple},V=D({},F,{value:void 0}),sr("invalid",n);break;case"textarea":me(n,F),V=ce(n,F),sr("invalid",n);break;default:V=F}_e(P,V),de=V;for(Q in de)if(de.hasOwnProperty(Q)){var ge=de[Q];Q==="style"?wt(n,ge):Q==="dangerouslySetInnerHTML"?(ge=ge?ge.__html:void 0,ge!=null&&$e(n,ge)):Q==="children"?typeof ge=="string"?(P!=="textarea"||ge!=="")&&Xe(n,ge):typeof ge=="number"&&Xe(n,""+ge):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(a.hasOwnProperty(Q)?ge!=null&&Q==="onScroll"&&sr("scroll",n):ge!=null&&p(n,Q,ge,oe))}switch(P){case"input":ie(n),fe(n,F,!1);break;case"textarea":ie(n),Ne(n);break;case"option":F.value!=null&&n.setAttribute("value",""+ae(F.value));break;case"select":n.multiple=!!F.multiple,Q=F.value,Q!=null?Te(n,!!F.multiple,Q,!1):F.defaultValue!=null&&Te(n,!!F.multiple,F.defaultValue,!0);break;default:typeof V.onClick=="function"&&(n.onclick=Mo)}switch(P){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break e;case"img":F=!0;break e;default:F=!1}}F&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Wn(o),null;case 6:if(n&&o.stateNode!=null)am(n,o,n.memoizedProps,F);else{if(typeof F!="string"&&o.stateNode===null)throw Error(t(166));if(P=Hr(Mr.current),Hr(or.current),ks(o)){if(F=o.stateNode,P=o.memoizedProps,F[pi]=o,(Q=F.nodeValue!==P)&&(n=ri,n!==null))switch(n.tag){case 3:Es(F.nodeValue,P,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Es(F.nodeValue,P,(n.mode&1)!==0)}Q&&(o.flags|=4)}else F=(P.nodeType===9?P:P.ownerDocument).createTextNode(F),F[pi]=o,o.stateNode=F}return Wn(o),null;case 13:if(ur(cr),F=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Jt&&Ke!==null&&(o.mode&1)!==0&&(o.flags&128)===0)nf(),Bo(),o.flags|=98560,Q=!1;else if(Q=ks(o),F!==null&&F.dehydrated!==null){if(n===null){if(!Q)throw Error(t(318));if(Q=o.memoizedState,Q=Q!==null?Q.dehydrated:null,!Q)throw Error(t(317));Q[pi]=o}else Bo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Wn(o),Q=!1}else ni!==null&&(yg(ni),ni=null),Q=!0;if(!Q)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=P,o):(F=F!==null,F!==(n!==null&&n.memoizedState!==null)&&F&&(o.child.flags|=8192,(o.mode&1)!==0&&(n===null||(cr.current&1)!==0?un===0&&(un=3):_g())),o.updateQueue!==null&&(o.flags|=4),Wn(o),null);case 4:return _r(),lg(n,o),n===null&&To(o.stateNode.containerInfo),Wn(o),null;case 10:return Fu(o.type._context),Wn(o),null;case 17:return mn(o.type)&&El(),Wn(o),null;case 19:if(ur(cr),Q=o.memoizedState,Q===null)return Wn(o),null;if(F=(o.flags&128)!==0,oe=Q.rendering,oe===null)if(F)gf(Q,!1);else{if(un!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(oe=Rl(n),oe!==null){for(o.flags|=128,gf(Q,!1),F=oe.updateQueue,F!==null&&(o.updateQueue=F,o.flags|=4),o.subtreeFlags=0,F=P,P=o.child;P!==null;)Q=P,n=F,Q.flags&=14680066,oe=Q.alternate,oe===null?(Q.childLanes=0,Q.lanes=n,Q.child=null,Q.subtreeFlags=0,Q.memoizedProps=null,Q.memoizedState=null,Q.updateQueue=null,Q.dependencies=null,Q.stateNode=null):(Q.childLanes=oe.childLanes,Q.lanes=oe.lanes,Q.child=oe.child,Q.subtreeFlags=0,Q.deletions=null,Q.memoizedProps=oe.memoizedProps,Q.memoizedState=oe.memoizedState,Q.updateQueue=oe.updateQueue,Q.type=oe.type,n=oe.dependencies,Q.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),P=P.sibling;return ar(cr,cr.current&1|2),o.child}n=n.sibling}Q.tail!==null&&Xt()>Ju&&(o.flags|=128,F=!0,gf(Q,!1),o.lanes=4194304)}else{if(!F)if(n=Rl(oe),n!==null){if(o.flags|=128,F=!0,P=n.updateQueue,P!==null&&(o.updateQueue=P,o.flags|=4),gf(Q,!0),Q.tail===null&&Q.tailMode==="hidden"&&!oe.alternate&&!Jt)return Wn(o),null}else 2*Xt()-Q.renderingStartTime>Ju&&P!==1073741824&&(o.flags|=128,F=!0,gf(Q,!1),o.lanes=4194304);Q.isBackwards?(oe.sibling=o.child,o.child=oe):(P=Q.last,P!==null?P.sibling=oe:o.child=oe,Q.last=oe)}return Q.tail!==null?(o=Q.tail,Q.rendering=o,Q.tail=o.sibling,Q.renderingStartTime=Xt(),o.sibling=null,P=cr.current,ar(cr,F?P&1|2:P&1),o):(Wn(o),null);case 22:case 23:return wg(),F=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==F&&(o.flags|=8192),F&&(o.mode&1)!==0?(Ii&1073741824)!==0&&(Wn(o),o.subtreeFlags&6&&(o.flags|=8192)):Wn(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function c_(n,o){switch(Jr(o),o.tag){case 1:return mn(o.type)&&El(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return _r(),ur(vn),ur(ln),yn(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return ya(o),null;case 13:if(ur(cr),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(t(340));Bo()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return ur(cr),null;case 4:return _r(),null;case 10:return Fu(o.type._context),null;case 22:case 23:return wg(),null;case 24:return null;default:return null}}var jh=!1,Yn=!1,f_=typeof WeakSet=="function"?WeakSet:Set,st=null;function Zu(n,o){var P=n.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(F){Fr(n,o,F)}else P.current=null}function sg(n,o,P){try{P()}catch(F){Fr(n,o,F)}}var om=!1;function d_(n,o){if(Zc=cu,n=Ur(),bl(n)){if("selectionStart"in n)var P={start:n.selectionStart,end:n.selectionEnd};else e:{P=(P=n.ownerDocument)&&P.defaultView||window;var F=P.getSelection&&P.getSelection();if(F&&F.rangeCount!==0){P=F.anchorNode;var V=F.anchorOffset,Q=F.focusNode;F=F.focusOffset;try{P.nodeType,Q.nodeType}catch{P=null;break e}var oe=0,de=-1,ge=-1,Re=0,Be=0,Ue=n,ze=null;t:for(;;){for(var nt;Ue!==P||V!==0&&Ue.nodeType!==3||(de=oe+V),Ue!==Q||F!==0&&Ue.nodeType!==3||(ge=oe+F),Ue.nodeType===3&&(oe+=Ue.nodeValue.length),(nt=Ue.firstChild)!==null;)ze=Ue,Ue=nt;for(;;){if(Ue===n)break t;if(ze===P&&++Re===V&&(de=oe),ze===Q&&++Be===F&&(ge=oe),(nt=Ue.nextSibling)!==null)break;Ue=ze,ze=Ue.parentNode}Ue=nt}P=de===-1||ge===-1?null:{start:de,end:ge}}else P=null}P=P||{start:0,end:0}}else P=null;for(Qc={focusedElem:n,selectionRange:P},cu=!1,st=o;st!==null;)if(o=st,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,st=n;else for(;st!==null;){o=st;try{var ut=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ut!==null){var dt=ut.memoizedProps,$r=ut.memoizedState,Pe=o.stateNode,be=Pe.getSnapshotBeforeUpdate(o.elementType===o.type?dt:sn(o.type,dt),$r);Pe.__reactInternalSnapshotBeforeUpdate=be}break;case 3:var ke=o.stateNode.containerInfo;ke.nodeType===1?ke.textContent="":ke.nodeType===9&&ke.documentElement&&ke.removeChild(ke.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Ge){Fr(o,o.return,Ge)}if(n=o.sibling,n!==null){n.return=o.return,st=n;break}st=o.return}return ut=om,om=!1,ut}function vf(n,o,P){var F=o.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var V=F=F.next;do{if((V.tag&n)===n){var Q=V.destroy;V.destroy=void 0,Q!==void 0&&sg(o,P,Q)}V=V.next}while(V!==F)}}function Dh(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var P=o=o.next;do{if((P.tag&n)===n){var F=P.create;P.destroy=F()}P=P.next}while(P!==o)}}function ug(n){var o=n.ref;if(o!==null){var P=n.stateNode;switch(n.tag){case 5:n=P;break;default:n=P}typeof o=="function"?o(n):o.current=n}}function lm(n){var o=n.alternate;o!==null&&(n.alternate=null,lm(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[pi],delete o[Os],delete o[Tu],delete o[_h],delete o[Sh])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function sm(n){return n.tag===5||n.tag===3||n.tag===4}function um(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||sm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function cg(n,o,P){var F=n.tag;if(F===5||F===6)n=n.stateNode,o?P.nodeType===8?P.parentNode.insertBefore(n,o):P.insertBefore(n,o):(P.nodeType===8?(o=P.parentNode,o.insertBefore(n,P)):(o=P,o.appendChild(n)),P=P._reactRootContainer,P!=null||o.onclick!==null||(o.onclick=Mo));else if(F!==4&&(n=n.child,n!==null))for(cg(n,o,P),n=n.sibling;n!==null;)cg(n,o,P),n=n.sibling}function fg(n,o,P){var F=n.tag;if(F===5||F===6)n=n.stateNode,o?P.insertBefore(n,o):P.appendChild(n);else if(F!==4&&(n=n.child,n!==null))for(fg(n,o,P),n=n.sibling;n!==null;)fg(n,o,P),n=n.sibling}var Dn=null,_a=!1;function Ul(n,o,P){for(P=P.child;P!==null;)cm(n,o,P),P=P.sibling}function cm(n,o,P){if(Nr&&typeof Nr.onCommitFiberUnmount=="function")try{Nr.onCommitFiberUnmount(ci,P)}catch{}switch(P.tag){case 5:Yn||Zu(P,o);case 6:var F=Dn,V=_a;Dn=null,Ul(n,o,P),Dn=F,_a=V,Dn!==null&&(_a?(n=Dn,P=P.stateNode,n.nodeType===8?n.parentNode.removeChild(P):n.removeChild(P)):Dn.removeChild(P.stateNode));break;case 18:Dn!==null&&(_a?(n=Dn,P=P.stateNode,n.nodeType===8?Au(n.parentNode,P):n.nodeType===1&&Au(n,P),Hn(n)):Au(Dn,P.stateNode));break;case 4:F=Dn,V=_a,Dn=P.stateNode.containerInfo,_a=!0,Ul(n,o,P),Dn=F,_a=V;break;case 0:case 11:case 14:case 15:if(!Yn&&(F=P.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){V=F=F.next;do{var Q=V,oe=Q.destroy;Q=Q.tag,oe!==void 0&&((Q&2)!==0||(Q&4)!==0)&&sg(P,o,oe),V=V.next}while(V!==F)}Ul(n,o,P);break;case 1:if(!Yn&&(Zu(P,o),F=P.stateNode,typeof F.componentWillUnmount=="function"))try{F.props=P.memoizedProps,F.state=P.memoizedState,F.componentWillUnmount()}catch(de){Fr(P,o,de)}Ul(n,o,P);break;case 21:Ul(n,o,P);break;case 22:P.mode&1?(Yn=(F=Yn)||P.memoizedState!==null,Ul(n,o,P),Yn=F):Ul(n,o,P);break;default:Ul(n,o,P)}}function fm(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var P=n.stateNode;P===null&&(P=n.stateNode=new f_),o.forEach(function(F){var V=__.bind(null,n,F);P.has(F)||(P.add(F),F.then(V,V))})}}function Sa(n,o){var P=o.deletions;if(P!==null)for(var F=0;F<P.length;F++){var V=P[F];try{var Q=n,oe=o,de=oe;e:for(;de!==null;){switch(de.tag){case 5:Dn=de.stateNode,_a=!1;break e;case 3:Dn=de.stateNode.containerInfo,_a=!0;break e;case 4:Dn=de.stateNode.containerInfo,_a=!0;break e}de=de.return}if(Dn===null)throw Error(t(160));cm(Q,oe,V),Dn=null,_a=!1;var ge=V.alternate;ge!==null&&(ge.return=null),V.return=null}catch(Re){Fr(V,o,Re)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)dm(o,n),o=o.sibling}function dm(n,o){var P=n.alternate,F=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Sa(o,n),lo(n),F&4){try{vf(3,n,n.return),Dh(3,n)}catch(dt){Fr(n,n.return,dt)}try{vf(5,n,n.return)}catch(dt){Fr(n,n.return,dt)}}break;case 1:Sa(o,n),lo(n),F&512&&P!==null&&Zu(P,P.return);break;case 5:if(Sa(o,n),lo(n),F&512&&P!==null&&Zu(P,P.return),n.flags&32){var V=n.stateNode;try{Xe(V,"")}catch(dt){Fr(n,n.return,dt)}}if(F&4&&(V=n.stateNode,V!=null)){var Q=n.memoizedProps,oe=P!==null?P.memoizedProps:Q,de=n.type,ge=n.updateQueue;if(n.updateQueue=null,ge!==null)try{de==="input"&&Q.type==="radio"&&Q.name!=null&&Ce(V,Q),Se(de,oe);var Re=Se(de,Q);for(oe=0;oe<ge.length;oe+=2){var Be=ge[oe],Ue=ge[oe+1];Be==="style"?wt(V,Ue):Be==="dangerouslySetInnerHTML"?$e(V,Ue):Be==="children"?Xe(V,Ue):p(V,Be,Ue,Re)}switch(de){case"input":pe(V,Q);break;case"textarea":Oe(V,Q);break;case"select":var ze=V._wrapperState.wasMultiple;V._wrapperState.wasMultiple=!!Q.multiple;var nt=Q.value;nt!=null?Te(V,!!Q.multiple,nt,!1):ze!==!!Q.multiple&&(Q.defaultValue!=null?Te(V,!!Q.multiple,Q.defaultValue,!0):Te(V,!!Q.multiple,Q.multiple?[]:"",!1))}V[Os]=Q}catch(dt){Fr(n,n.return,dt)}}break;case 6:if(Sa(o,n),lo(n),F&4){if(n.stateNode===null)throw Error(t(162));V=n.stateNode,Q=n.memoizedProps;try{V.nodeValue=Q}catch(dt){Fr(n,n.return,dt)}}break;case 3:if(Sa(o,n),lo(n),F&4&&P!==null&&P.memoizedState.isDehydrated)try{Hn(o.containerInfo)}catch(dt){Fr(n,n.return,dt)}break;case 4:Sa(o,n),lo(n);break;case 13:Sa(o,n),lo(n),V=n.child,V.flags&8192&&(Q=V.memoizedState!==null,V.stateNode.isHidden=Q,!Q||V.alternate!==null&&V.alternate.memoizedState!==null||(pg=Xt())),F&4&&fm(n);break;case 22:if(Be=P!==null&&P.memoizedState!==null,n.mode&1?(Yn=(Re=Yn)||Be,Sa(o,n),Yn=Re):Sa(o,n),lo(n),F&8192){if(Re=n.memoizedState!==null,(n.stateNode.isHidden=Re)&&!Be&&(n.mode&1)!==0)for(st=n,Be=n.child;Be!==null;){for(Ue=st=Be;st!==null;){switch(ze=st,nt=ze.child,ze.tag){case 0:case 11:case 14:case 15:vf(4,ze,ze.return);break;case 1:Zu(ze,ze.return);var ut=ze.stateNode;if(typeof ut.componentWillUnmount=="function"){F=ze,P=ze.return;try{o=F,ut.props=o.memoizedProps,ut.state=o.memoizedState,ut.componentWillUnmount()}catch(dt){Fr(F,P,dt)}}break;case 5:Zu(ze,ze.return);break;case 22:if(ze.memoizedState!==null){gm(Ue);continue}}nt!==null?(nt.return=ze,st=nt):gm(Ue)}Be=Be.sibling}e:for(Be=null,Ue=n;;){if(Ue.tag===5){if(Be===null){Be=Ue;try{V=Ue.stateNode,Re?(Q=V.style,typeof Q.setProperty=="function"?Q.setProperty("display","none","important"):Q.display="none"):(de=Ue.stateNode,ge=Ue.memoizedProps.style,oe=ge!=null&&ge.hasOwnProperty("display")?ge.display:null,de.style.display=lt("display",oe))}catch(dt){Fr(n,n.return,dt)}}}else if(Ue.tag===6){if(Be===null)try{Ue.stateNode.nodeValue=Re?"":Ue.memoizedProps}catch(dt){Fr(n,n.return,dt)}}else if((Ue.tag!==22&&Ue.tag!==23||Ue.memoizedState===null||Ue===n)&&Ue.child!==null){Ue.child.return=Ue,Ue=Ue.child;continue}if(Ue===n)break e;for(;Ue.sibling===null;){if(Ue.return===null||Ue.return===n)break e;Be===Ue&&(Be=null),Ue=Ue.return}Be===Ue&&(Be=null),Ue.sibling.return=Ue.return,Ue=Ue.sibling}}break;case 19:Sa(o,n),lo(n),F&4&&fm(n);break;case 21:break;default:Sa(o,n),lo(n)}}function lo(n){var o=n.flags;if(o&2){try{e:{for(var P=n.return;P!==null;){if(sm(P)){var F=P;break e}P=P.return}throw Error(t(160))}switch(F.tag){case 5:var V=F.stateNode;F.flags&32&&(Xe(V,""),F.flags&=-33);var Q=um(n);fg(n,Q,V);break;case 3:case 4:var oe=F.stateNode.containerInfo,de=um(n);cg(n,de,oe);break;default:throw Error(t(161))}}catch(ge){Fr(n,n.return,ge)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function h_(n,o,P){st=n,hm(n)}function hm(n,o,P){for(var F=(n.mode&1)!==0;st!==null;){var V=st,Q=V.child;if(V.tag===22&&F){var oe=V.memoizedState!==null||jh;if(!oe){var de=V.alternate,ge=de!==null&&de.memoizedState!==null||Yn;de=jh;var Re=Yn;if(jh=oe,(Yn=ge)&&!Re)for(st=V;st!==null;)oe=st,ge=oe.child,oe.tag===22&&oe.memoizedState!==null?vm(V):ge!==null?(ge.return=oe,st=ge):vm(V);for(;Q!==null;)st=Q,hm(Q),Q=Q.sibling;st=V,jh=de,Yn=Re}pm(n)}else(V.subtreeFlags&8772)!==0&&Q!==null?(Q.return=V,st=Q):pm(n)}}function pm(n){for(;st!==null;){var o=st;if((o.flags&8772)!==0){var P=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Yn||Dh(5,o);break;case 1:var F=o.stateNode;if(o.flags&4&&!Yn)if(P===null)F.componentDidMount();else{var V=o.elementType===o.type?P.memoizedProps:sn(o.type,P.memoizedProps);F.componentDidUpdate(V,P.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var Q=o.updateQueue;Q!==null&&Cr(o,Q,F);break;case 3:var oe=o.updateQueue;if(oe!==null){if(P=null,o.child!==null)switch(o.child.tag){case 5:P=o.child.stateNode;break;case 1:P=o.child.stateNode}Cr(o,oe,P)}break;case 5:var de=o.stateNode;if(P===null&&o.flags&4){P=de;var ge=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":ge.autoFocus&&P.focus();break;case"img":ge.src&&(P.src=ge.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Re=o.alternate;if(Re!==null){var Be=Re.memoizedState;if(Be!==null){var Ue=Be.dehydrated;Ue!==null&&Hn(Ue)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Yn||o.flags&512&&ug(o)}catch(ze){Fr(o,o.return,ze)}}if(o===n){st=null;break}if(P=o.sibling,P!==null){P.return=o.return,st=P;break}st=o.return}}function gm(n){for(;st!==null;){var o=st;if(o===n){st=null;break}var P=o.sibling;if(P!==null){P.return=o.return,st=P;break}st=o.return}}function vm(n){for(;st!==null;){var o=st;try{switch(o.tag){case 0:case 11:case 15:var P=o.return;try{Dh(4,o)}catch(ge){Fr(o,P,ge)}break;case 1:var F=o.stateNode;if(typeof F.componentDidMount=="function"){var V=o.return;try{F.componentDidMount()}catch(ge){Fr(o,V,ge)}}var Q=o.return;try{ug(o)}catch(ge){Fr(o,Q,ge)}break;case 5:var oe=o.return;try{ug(o)}catch(ge){Fr(o,oe,ge)}}}catch(ge){Fr(o,o.return,ge)}if(o===n){st=null;break}var de=o.sibling;if(de!==null){de.return=o.return,st=de;break}st=o.return}}var p_=Math.ceil,Fh=m.ReactCurrentDispatcher,dg=m.ReactCurrentOwner,ra=m.ReactCurrentBatchConfig,Yt=0,Sn=null,en=null,Fn=0,Ii=0,Qu=ga(0),un=0,mf=null,js=0,zh=0,hg=0,yf=null,mi=null,pg=0,Ju=1/0,Vo=null,Bh=!1,gg=null,ql=null,Uh=!1,Hl=null,qh=0,bf=0,vg=null,Hh=-1,Gh=0;function li(){return(Yt&6)!==0?Xt():Hh!==-1?Hh:Hh=Xt()}function Gl(n){return(n.mode&1)===0?1:(Yt&2)!==0&&Fn!==0?Fn&-Fn:af.transition!==null?(Gh===0&&(Gh=Ac()),Gh):(n=Wt,n!==0||(n=window.event,n=n===void 0?16:ih(n.type)),n)}function Ea(n,o,P,F){if(50<bf)throw bf=0,vg=null,Error(t(185));cs(n,P,F),((Yt&2)===0||n!==Sn)&&(n===Sn&&((Yt&2)===0&&(zh|=P),un===4&&Vl(n,Fn)),yi(n,F),P===1&&Yt===0&&(o.mode&1)===0&&(Ju=Xt()+500,xl&&Qa()))}function yi(n,o){var P=n.callbackNode;Jd(n,o);var F=bo(n,n===Sn?Fn:0);if(F===0)P!==null&&kn(P),n.callbackNode=null,n.callbackPriority=0;else if(o=F&-F,n.callbackPriority!==o){if(P!=null&&kn(P),o===1)n.tag===0?va(ym.bind(null,n)):Cs(ym.bind(null,n)),bh(function(){(Yt&6)===0&&Qa()}),P=null;else{switch(fs(F)){case 1:P=Un;break;case 4:P=Fa;break;case 16:P=ui;break;case 536870912:P=Ci;break;default:P=ui}P=Pm(P,mm.bind(null,n))}n.callbackPriority=o,n.callbackNode=P}}function mm(n,o){if(Hh=-1,Gh=0,(Yt&6)!==0)throw Error(t(327));var P=n.callbackNode;if(ec()&&n.callbackNode!==P)return null;var F=bo(n,n===Sn?Fn:0);if(F===0)return null;if((F&30)!==0||(F&n.expiredLanes)!==0||o)o=Vh(n,F);else{o=F;var V=Yt;Yt|=2;var Q=wm();(Sn!==n||Fn!==o)&&(Vo=null,Ju=Xt()+500,Fs(n,o));do try{m_();break}catch(de){bm(n,de)}while(!0);Du(),Fh.current=Q,Yt=V,en!==null?o=0:(Sn=null,Fn=0,o=un)}if(o!==0){if(o===2&&(V=ll(n),V!==0&&(F=V,o=mg(n,V))),o===1)throw P=mf,Fs(n,0),Vl(n,F),yi(n,Xt()),P;if(o===6)Vl(n,F);else{if(V=n.current.alternate,(F&30)===0&&!g_(V)&&(o=Vh(n,F),o===2&&(Q=ll(n),Q!==0&&(F=Q,o=mg(n,Q))),o===1))throw P=mf,Fs(n,0),Vl(n,F),yi(n,Xt()),P;switch(n.finishedWork=V,n.finishedLanes=F,o){case 0:case 1:throw Error(t(345));case 2:zs(n,mi,Vo);break;case 3:if(Vl(n,F),(F&130023424)===F&&(o=pg+500-Xt(),10<o)){if(bo(n,0)!==0)break;if(V=n.suspendedLanes,(V&F)!==F){li(),n.pingedLanes|=n.suspendedLanes&V;break}n.timeoutHandle=ei(zs.bind(null,n,mi,Vo),o);break}zs(n,mi,Vo);break;case 4:if(Vl(n,F),(F&4194240)===F)break;for(o=n.eventTimes,V=-1;0<F;){var oe=31-It(F);Q=1<<oe,oe=o[oe],oe>V&&(V=oe),F&=~Q}if(F=V,F=Xt()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*p_(F/1960))-F,10<F){n.timeoutHandle=ei(zs.bind(null,n,mi,Vo),F);break}zs(n,mi,Vo);break;case 5:zs(n,mi,Vo);break;default:throw Error(t(329))}}}return yi(n,Xt()),n.callbackNode===P?mm.bind(null,n):null}function mg(n,o){var P=yf;return n.current.memoizedState.isDehydrated&&(Fs(n,o).flags|=256),n=Vh(n,o),n!==2&&(o=mi,mi=P,o!==null&&yg(o)),n}function yg(n){mi===null?mi=n:mi.push.apply(mi,n)}function g_(n){for(var o=n;;){if(o.flags&16384){var P=o.updateQueue;if(P!==null&&(P=P.stores,P!==null))for(var F=0;F<P.length;F++){var V=P[F],Q=V.getSnapshot;V=V.value;try{if(!Vn(Q(),V))return!1}catch{return!1}}}if(P=o.child,o.subtreeFlags&16384&&P!==null)P.return=o,o=P;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Vl(n,o){for(o&=~hg,o&=~zh,n.suspendedLanes|=o,n.pingedLanes&=~o,n=n.expirationTimes;0<o;){var P=31-It(o),F=1<<P;n[P]=-1,o&=~F}}function ym(n){if((Yt&6)!==0)throw Error(t(327));ec();var o=bo(n,0);if((o&1)===0)return yi(n,Xt()),null;var P=Vh(n,o);if(n.tag!==0&&P===2){var F=ll(n);F!==0&&(o=F,P=mg(n,F))}if(P===1)throw P=mf,Fs(n,0),Vl(n,o),yi(n,Xt()),P;if(P===6)throw Error(t(345));return n.finishedWork=n.current.alternate,n.finishedLanes=o,zs(n,mi,Vo),yi(n,Xt()),null}function bg(n,o){var P=Yt;Yt|=1;try{return n(o)}finally{Yt=P,Yt===0&&(Ju=Xt()+500,xl&&Qa())}}function Ds(n){Hl!==null&&Hl.tag===0&&(Yt&6)===0&&ec();var o=Yt;Yt|=1;var P=ra.transition,F=Wt;try{if(ra.transition=null,Wt=1,n)return n()}finally{Wt=F,ra.transition=P,Yt=o,(Yt&6)===0&&Qa()}}function wg(){Ii=Qu.current,ur(Qu)}function Fs(n,o){n.finishedWork=null,n.finishedLanes=0;var P=n.timeoutHandle;if(P!==-1&&(n.timeoutHandle=-1,ef(P)),en!==null)for(P=en.return;P!==null;){var F=P;switch(Jr(F),F.tag){case 1:F=F.type.childContextTypes,F!=null&&El();break;case 3:_r(),ur(vn),ur(ln),yn();break;case 5:ya(F);break;case 4:_r();break;case 13:ur(cr);break;case 19:ur(cr);break;case 10:Fu(F.type._context);break;case 22:case 23:wg()}P=P.return}if(Sn=n,en=n=$l(n.current,null),Fn=Ii=o,un=0,mf=null,hg=zh=js=0,mi=yf=null,Zi!==null){for(o=0;o<Zi.length;o++)if(P=Zi[o],F=P.interleaved,F!==null){P.interleaved=null;var V=F.next,Q=P.pending;if(Q!==null){var oe=Q.next;Q.next=V,F.next=oe}P.pending=F}Zi=null}return n}function bm(n,o){do{var P=en;try{if(Du(),Ml.current=Dl,Ni){for(var F=nr.memoizedState;F!==null;){var V=F.queue;V!==null&&(V.pending=null),F=F.next}Ni=!1}if(In=0,jr=kr=nr=null,no=!1,vi=0,dg.current=null,P===null||P.return===null){un=1,mf=o,en=null;break}e:{var Q=n,oe=P.return,de=P,ge=o;if(o=Fn,de.flags|=32768,ge!==null&&typeof ge=="object"&&typeof ge.then=="function"){var Re=ge,Be=de,Ue=Be.tag;if((Be.mode&1)===0&&(Ue===0||Ue===11||Ue===15)){var ze=Be.alternate;ze?(Be.updateQueue=ze.updateQueue,Be.memoizedState=ze.memoizedState,Be.lanes=ze.lanes):(Be.updateQueue=null,Be.memoizedState=null)}var nt=j(oe);if(nt!==null){nt.flags&=-257,G(nt,oe,de,Q,o),nt.mode&1&&d(Q,Re,o),o=nt,ge=Re;var ut=o.updateQueue;if(ut===null){var dt=new Set;dt.add(ge),o.updateQueue=dt}else ut.add(ge);break e}else{if((o&1)===0){d(Q,Re,o),_g();break e}ge=Error(t(426))}}else if(Jt&&de.mode&1){var $r=j(oe);if($r!==null){($r.flags&65536)===0&&($r.flags|=256),G($r,oe,de,Q,o),As(Go(ge,de));break e}}Q=ge=Go(ge,de),un!==4&&(un=2),yf===null?yf=[Q]:yf.push(Q),Q=oe;do{switch(Q.tag){case 3:Q.flags|=65536,o&=-o,Q.lanes|=o;var Pe=Ih(Q,ge,o);Ls(Q,Pe);break e;case 1:de=ge;var be=Q.type,ke=Q.stateNode;if((Q.flags&128)===0&&(typeof be.getDerivedStateFromError=="function"||ke!==null&&typeof ke.componentDidCatch=="function"&&(ql===null||!ql.has(ke)))){Q.flags|=65536,o&=-o,Q.lanes|=o;var Ge=u(Q,de,o);Ls(Q,Ge);break e}}Q=Q.return}while(Q!==null)}Sm(P)}catch(pt){o=pt,en===P&&P!==null&&(en=P=P.return);continue}break}while(!0)}function wm(){var n=Fh.current;return Fh.current=Dl,n===null?Dl:n}function _g(){(un===0||un===3||un===2)&&(un=4),Sn===null||(js&268435455)===0&&(zh&268435455)===0||Vl(Sn,Fn)}function Vh(n,o){var P=Yt;Yt|=2;var F=wm();(Sn!==n||Fn!==o)&&(Vo=null,Fs(n,o));do try{v_();break}catch(V){bm(n,V)}while(!0);if(Du(),Yt=P,Fh.current=F,en!==null)throw Error(t(261));return Sn=null,Fn=0,un}function v_(){for(;en!==null;)_m(en)}function m_(){for(;en!==null&&!rn();)_m(en)}function _m(n){var o=Om(n.alternate,n,Ii);n.memoizedProps=n.pendingProps,o===null?Sm(n):en=o,dg.current=null}function Sm(n){var o=n;do{var P=o.alternate;if(n=o.return,(o.flags&32768)===0){if(P=u_(P,o,Ii),P!==null){en=P;return}}else{if(P=c_(P,o),P!==null){P.flags&=32767,en=P;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{un=6,en=null;return}}if(o=o.sibling,o!==null){en=o;return}en=o=n}while(o!==null);un===0&&(un=5)}function zs(n,o,P){var F=Wt,V=ra.transition;try{ra.transition=null,Wt=1,y_(n,o,P,F)}finally{ra.transition=V,Wt=F}return null}function y_(n,o,P,F){do ec();while(Hl!==null);if((Yt&6)!==0)throw Error(t(327));P=n.finishedWork;var V=n.finishedLanes;if(P===null)return null;if(n.finishedWork=null,n.finishedLanes=0,P===n.current)throw Error(t(177));n.callbackNode=null,n.callbackPriority=0;var Q=P.lanes|P.childLanes;if(Qp(n,Q),n===Sn&&(en=Sn=null,Fn=0),(P.subtreeFlags&2064)===0&&(P.flags&2064)===0||Uh||(Uh=!0,Pm(ui,function(){return ec(),null})),Q=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||Q){Q=ra.transition,ra.transition=null;var oe=Wt;Wt=1;var de=Yt;Yt|=4,dg.current=null,d_(n,P),dm(P,n),bs(Qc),cu=!!Zc,Qc=Zc=null,n.current=P,h_(P),sa(),Yt=de,Wt=oe,ra.transition=Q}else n.current=P;if(Uh&&(Uh=!1,Hl=n,qh=V),Q=n.pendingLanes,Q===0&&(ql=null),hr(P.stateNode),yi(n,Xt()),o!==null)for(F=n.onRecoverableError,P=0;P<o.length;P++)V=o[P],F(V.value,{componentStack:V.stack,digest:V.digest});if(Bh)throw Bh=!1,n=gg,gg=null,n;return(qh&1)!==0&&n.tag!==0&&ec(),Q=n.pendingLanes,(Q&1)!==0?n===vg?bf++:(bf=0,vg=n):bf=0,Qa(),null}function ec(){if(Hl!==null){var n=fs(qh),o=ra.transition,P=Wt;try{if(ra.transition=null,Wt=16>n?16:n,Hl===null)var F=!1;else{if(n=Hl,Hl=null,qh=0,(Yt&6)!==0)throw Error(t(331));var V=Yt;for(Yt|=4,st=n.current;st!==null;){var Q=st,oe=Q.child;if((st.flags&16)!==0){var de=Q.deletions;if(de!==null){for(var ge=0;ge<de.length;ge++){var Re=de[ge];for(st=Re;st!==null;){var Be=st;switch(Be.tag){case 0:case 11:case 15:vf(8,Be,Q)}var Ue=Be.child;if(Ue!==null)Ue.return=Be,st=Ue;else for(;st!==null;){Be=st;var ze=Be.sibling,nt=Be.return;if(lm(Be),Be===Re){st=null;break}if(ze!==null){ze.return=nt,st=ze;break}st=nt}}}var ut=Q.alternate;if(ut!==null){var dt=ut.child;if(dt!==null){ut.child=null;do{var $r=dt.sibling;dt.sibling=null,dt=$r}while(dt!==null)}}st=Q}}if((Q.subtreeFlags&2064)!==0&&oe!==null)oe.return=Q,st=oe;else e:for(;st!==null;){if(Q=st,(Q.flags&2048)!==0)switch(Q.tag){case 0:case 11:case 15:vf(9,Q,Q.return)}var Pe=Q.sibling;if(Pe!==null){Pe.return=Q.return,st=Pe;break e}st=Q.return}}var be=n.current;for(st=be;st!==null;){oe=st;var ke=oe.child;if((oe.subtreeFlags&2064)!==0&&ke!==null)ke.return=oe,st=ke;else e:for(oe=be;st!==null;){if(de=st,(de.flags&2048)!==0)try{switch(de.tag){case 0:case 11:case 15:Dh(9,de)}}catch(pt){Fr(de,de.return,pt)}if(de===oe){st=null;break e}var Ge=de.sibling;if(Ge!==null){Ge.return=de.return,st=Ge;break e}st=de.return}}if(Yt=V,Qa(),Nr&&typeof Nr.onPostCommitFiberRoot=="function")try{Nr.onPostCommitFiberRoot(ci,n)}catch{}F=!0}return F}finally{Wt=P,ra.transition=o}}return!1}function Em(n,o,P){o=Go(P,o),o=Ih(n,o,1),n=ea(n,o,1),o=li(),n!==null&&(cs(n,1,o),yi(n,o))}function Fr(n,o,P){if(n.tag===3)Em(n,n,P);else for(;o!==null;){if(o.tag===3){Em(o,n,P);break}else if(o.tag===1){var F=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof F.componentDidCatch=="function"&&(ql===null||!ql.has(F))){n=Go(P,n),n=u(o,n,1),o=ea(o,n,1),n=li(),o!==null&&(cs(o,1,n),yi(o,n));break}}o=o.return}}function b_(n,o,P){var F=n.pingCache;F!==null&&F.delete(o),o=li(),n.pingedLanes|=n.suspendedLanes&P,Sn===n&&(Fn&P)===P&&(un===4||un===3&&(Fn&130023424)===Fn&&500>Xt()-pg?Fs(n,0):hg|=P),yi(n,o)}function xm(n,o){o===0&&((n.mode&1)===0?o=1:(o=ua,ua<<=1,(ua&130023424)===0&&(ua=4194304)));var P=li();n=ai(n,o),n!==null&&(cs(n,o,P),yi(n,P))}function w_(n){var o=n.memoizedState,P=0;o!==null&&(P=o.retryLane),xm(n,P)}function __(n,o){var P=0;switch(n.tag){case 13:var F=n.stateNode,V=n.memoizedState;V!==null&&(P=V.retryLane);break;case 19:F=n.stateNode;break;default:throw Error(t(314))}F!==null&&F.delete(o),xm(n,P)}var Om;Om=function(n,o,P){if(n!==null)if(n.memoizedProps!==o.pendingProps||vn.current)re=!0;else{if((n.lanes&P)===0&&(o.flags&128)===0)return re=!1,og(n,o,P);re=(n.flags&131072)!==0}else re=!1,Jt&&(o.flags&1048576)!==0&&xh(o,eo,o.index);switch(o.lanes=0,o.tag){case 2:var F=o.type;Bt(n,o),n=o.pendingProps;var V=Io(o,ln.current);ma(o,P),V=Ll(null,o,F,n,V,P);var Q=Nl();return o.flags|=1,typeof V=="object"&&V!==null&&typeof V.render=="function"&&V.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,mn(F)?(Q=!0,jo(o)):Q=!1,o.memoizedState=V.state!==null&&V.state!==void 0?V.state:null,Ms(o),V.updater=zl,o.stateNode=V,V._reactInternals=o,Ku(o,F,n,P),o=er(null,o,F,!0,Q,P)):(o.tag=0,Jt&&Q&&Ol(o),se(null,o,V,P),o=o.child),o;case 16:F=o.elementType;e:{switch(Bt(n,o),n=o.pendingProps,V=F._init,F=V(F._payload),o.type=F,V=o.tag=E_(F),n=sn(F,n),V){case 0:o=Qe(null,o,F,n,P);break e;case 1:o=fr(null,o,F,n,P);break e;case 11:o=we(null,o,F,n,P);break e;case 14:o=Me(null,o,F,sn(F.type,n),P);break e}throw Error(t(306,F,""))}return o;case 0:return F=o.type,V=o.pendingProps,V=o.elementType===F?V:sn(F,V),Qe(n,o,F,V,P);case 1:return F=o.type,V=o.pendingProps,V=o.elementType===F?V:sn(F,V),fr(n,o,F,V,P);case 3:e:{if(jn(o),n===null)throw Error(t(387));F=o.pendingProps,Q=o.memoizedState,V=Q.element,Bu(n,o),Al(o,F,null,P);var oe=o.memoizedState;if(F=oe.element,Q.isDehydrated)if(Q={element:F,isDehydrated:!1,cache:oe.cache,pendingSuspenseBoundaries:oe.pendingSuspenseBoundaries,transitions:oe.transitions},o.updateQueue.baseState=Q,o.memoizedState=Q,o.flags&256){V=Go(Error(t(423)),o),o=ta(n,o,F,P,V);break e}else if(F!==V){V=Go(Error(t(424)),o),o=ta(n,o,F,P,V);break e}else for(Ke=Wi(o.stateNode.containerInfo.firstChild),ri=o,Jt=!0,ni=null,P=gi(o,null,F,P),o.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Bo(),F===V){o=_n(n,o,P);break e}se(n,o,F,P)}o=o.child}return o;case 5:return Tl(o),n===null&&Pl(o),F=o.type,V=o.pendingProps,Q=n!==null?n.memoizedProps:null,oe=V.children,Jc(F,V)?oe=null:Q!==null&&Jc(F,Q)&&(o.flags|=32),Ct(n,o),se(n,o,oe,P),o.child;case 6:return n===null&&Pl(o),null;case 13:return Le(n,o,P);case 4:return ro(o,o.stateNode.containerInfo),F=o.pendingProps,n===null?o.child=Uo(o,null,F,P):se(n,o,F,P),o.child;case 11:return F=o.type,V=o.pendingProps,V=o.elementType===F?V:sn(F,V),we(n,o,F,V,P);case 7:return se(n,o,o.pendingProps,P),o.child;case 8:return se(n,o,o.pendingProps.children,P),o.child;case 12:return se(n,o,o.pendingProps.children,P),o.child;case 10:e:{if(F=o.type._context,V=o.pendingProps,Q=o.memoizedProps,oe=V.value,ar(Ts,F._currentValue),F._currentValue=oe,Q!==null)if(Vn(Q.value,oe)){if(Q.children===V.children&&!vn.current){o=_n(n,o,P);break e}}else for(Q=o.child,Q!==null&&(Q.return=o);Q!==null;){var de=Q.dependencies;if(de!==null){oe=Q.child;for(var ge=de.firstContext;ge!==null;){if(ge.context===F){if(Q.tag===1){ge=Ji(-1,P&-P),ge.tag=2;var Re=Q.updateQueue;if(Re!==null){Re=Re.shared;var Be=Re.pending;Be===null?ge.next=ge:(ge.next=Be.next,Be.next=ge),Re.pending=ge}}Q.lanes|=P,ge=Q.alternate,ge!==null&&(ge.lanes|=P),zu(Q.return,P,o),de.lanes|=P;break}ge=ge.next}}else if(Q.tag===10)oe=Q.type===o.type?null:Q.child;else if(Q.tag===18){if(oe=Q.return,oe===null)throw Error(t(341));oe.lanes|=P,de=oe.alternate,de!==null&&(de.lanes|=P),zu(oe,P,o),oe=Q.sibling}else oe=Q.child;if(oe!==null)oe.return=Q;else for(oe=Q;oe!==null;){if(oe===o){oe=null;break}if(Q=oe.sibling,Q!==null){Q.return=oe.return,oe=Q;break}oe=oe.return}Q=oe}se(n,o,V.children,P),o=o.child}return o;case 9:return V=o.type,F=o.pendingProps.children,ma(o,P),V=Nn(V),F=F(V),o.flags|=1,se(n,o,F,P),o.child;case 14:return F=o.type,V=sn(F,o.pendingProps),V=sn(F.type,V),Me(n,o,F,V,P);case 15:return qe(n,o,o.type,o.pendingProps,P);case 17:return F=o.type,V=o.pendingProps,V=o.elementType===F?V:sn(F,V),Bt(n,o),o.tag=1,mn(F)?(n=!0,jo(o)):n=!1,ma(o,P),Nh(o,F,V),Ku(o,F,V,P),er(null,o,F,!0,n,P);case 19:return Vr(n,o,P);case 22:return ot(n,o,P)}throw Error(t(156,o.tag))};function Pm(n,o){return Cn(n,o)}function S_(n,o,P,F){this.tag=n,this.key=P,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=F,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function na(n,o,P,F){return new S_(n,o,P,F)}function Sg(n){return n=n.prototype,!(!n||!n.isReactComponent)}function E_(n){if(typeof n=="function")return Sg(n)?1:0;if(n!=null){if(n=n.$$typeof,n===k)return 11;if(n===z)return 14}return 2}function $l(n,o){var P=n.alternate;return P===null?(P=na(n.tag,o,n.key,n.mode),P.elementType=n.elementType,P.type=n.type,P.stateNode=n.stateNode,P.alternate=n,n.alternate=P):(P.pendingProps=o,P.type=n.type,P.flags=0,P.subtreeFlags=0,P.deletions=null),P.flags=n.flags&14680064,P.childLanes=n.childLanes,P.lanes=n.lanes,P.child=n.child,P.memoizedProps=n.memoizedProps,P.memoizedState=n.memoizedState,P.updateQueue=n.updateQueue,o=n.dependencies,P.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},P.sibling=n.sibling,P.index=n.index,P.ref=n.ref,P}function $h(n,o,P,F,V,Q){var oe=2;if(F=n,typeof n=="function")Sg(n)&&(oe=1);else if(typeof n=="string")oe=5;else e:switch(n){case T:return Bs(P.children,V,Q,o);case I:oe=8,V|=8;break;case R:return n=na(12,P,o,V|2),n.elementType=R,n.lanes=Q,n;case A:return n=na(13,P,o,V),n.elementType=A,n.lanes=Q,n;case L:return n=na(19,P,o,V),n.elementType=L,n.lanes=Q,n;case $:return Wh(P,V,Q,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:oe=10;break e;case M:oe=9;break e;case k:oe=11;break e;case z:oe=14;break e;case Y:oe=16,F=null;break e}throw Error(t(130,n==null?n:typeof n,""))}return o=na(oe,P,o,V),o.elementType=n,o.type=F,o.lanes=Q,o}function Bs(n,o,P,F){return n=na(7,n,F,o),n.lanes=P,n}function Wh(n,o,P,F){return n=na(22,n,F,o),n.elementType=$,n.lanes=P,n.stateNode={isHidden:!1},n}function Eg(n,o,P){return n=na(6,n,null,o),n.lanes=P,n}function xg(n,o,P){return o=na(4,n.children!==null?n.children:[],n.key,o),o.lanes=P,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function x_(n,o,P,F,V){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kn(0),this.expirationTimes=Kn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kn(0),this.identifierPrefix=F,this.onRecoverableError=V,this.mutableSourceEagerHydrationData=null}function Og(n,o,P,F,V,Q,oe,de,ge){return n=new x_(n,o,P,de,ge),o===1?(o=1,Q===!0&&(o|=8)):o=0,Q=na(3,null,null,o),n.current=Q,Q.stateNode=n,Q.memoizedState={element:F,isDehydrated:P,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ms(Q),n}function O_(n,o,P){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:F==null?null:""+F,children:n,containerInfo:o,implementation:P}}function Cm(n){if(!n)return Ki;n=n._reactInternals;e:{if(Lr(n)!==n||n.tag!==1)throw Error(t(170));var o=n;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(mn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(n.tag===1){var P=n.type;if(mn(P))return Mu(n,P,o)}return o}function km(n,o,P,F,V,Q,oe,de,ge){return n=Og(P,F,!0,n,V,Q,oe,de,ge),n.context=Cm(null),P=n.current,F=li(),V=Gl(P),Q=Ji(F,V),Q.callback=o??null,ea(P,Q,V),n.current.lanes=V,cs(n,V,F),yi(n,F),n}function Yh(n,o,P,F){var V=o.current,Q=li(),oe=Gl(V);return P=Cm(P),o.context===null?o.context=P:o.pendingContext=P,o=Ji(Q,oe),o.payload={element:n},F=F===void 0?null:F,F!==null&&(o.callback=F),n=ea(V,o,oe),n!==null&&(Ea(n,V,oe,Q),Uu(n,V,oe)),oe}function Kh(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Am(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var P=n.retryLane;n.retryLane=P!==0&&P<o?P:o}}function Pg(n,o){Am(n,o),(n=n.alternate)&&Am(n,o)}function P_(){return null}var Tm=typeof reportError=="function"?reportError:function(n){console.error(n)};function Cg(n){this._internalRoot=n}Xh.prototype.render=Cg.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(t(409));Yh(n,o,null,null)},Xh.prototype.unmount=Cg.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Ds(function(){Yh(null,n,null,null)}),o[Yi]=null}};function Xh(n){this._internalRoot=n}Xh.prototype.unstable_scheduleHydration=function(n){if(n){var o=th();n={blockedOn:null,target:n,priority:o};for(var P=0;P<$i.length&&o!==0&&o<$i[P].priority;P++);$i.splice(P,0,n),P===0&&lu(n)}};function kg(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Zh(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Rm(){}function C_(n,o,P,F,V){if(V){if(typeof F=="function"){var Q=F;F=function(){var Re=Kh(oe);Q.call(Re)}}var oe=km(o,F,n,0,null,!1,!1,"",Rm);return n._reactRootContainer=oe,n[Yi]=oe.current,To(n.nodeType===8?n.parentNode:n),Ds(),oe}for(;V=n.lastChild;)n.removeChild(V);if(typeof F=="function"){var de=F;F=function(){var Re=Kh(ge);de.call(Re)}}var ge=Og(n,0,!1,null,null,!1,!1,"",Rm);return n._reactRootContainer=ge,n[Yi]=ge.current,To(n.nodeType===8?n.parentNode:n),Ds(function(){Yh(o,ge,P,F)}),ge}function Qh(n,o,P,F,V){var Q=P._reactRootContainer;if(Q){var oe=Q;if(typeof V=="function"){var de=V;V=function(){var ge=Kh(oe);de.call(ge)}}Yh(o,oe,n,V)}else oe=C_(P,o,n,V,F);return Kh(oe)}sl=function(n){switch(n.tag){case 3:var o=n.stateNode;if(o.current.memoizedState.isDehydrated){var P=Kr(o.pendingLanes);P!==0&&(Tc(o,P|1),yi(o,Xt()),(Yt&6)===0&&(Ju=Xt()+500,Qa()))}break;case 13:Ds(function(){var F=ai(n,1);if(F!==null){var V=li();Ea(F,n,1,V)}}),Pg(n,1)}},ul=function(n){if(n.tag===13){var o=ai(n,134217728);if(o!==null){var P=li();Ea(o,n,134217728,P)}Pg(n,134217728)}},eh=function(n){if(n.tag===13){var o=Gl(n),P=ai(n,o);if(P!==null){var F=li();Ea(P,n,o,F)}Pg(n,o)}},th=function(){return Wt},au=function(n,o){var P=Wt;try{return Wt=n,o()}finally{Wt=P}},At=function(n,o,P){switch(o){case"input":if(pe(n,P),o=P.name,P.type==="radio"&&o!=null){for(P=n;P.parentNode;)P=P.parentNode;for(P=P.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<P.length;o++){var F=P[o];if(F!==n&&F.form===n.form){var V=Qr(F);if(!V)throw Error(t(90));le(F),pe(F,V)}}}break;case"textarea":Oe(n,P);break;case"select":o=P.value,o!=null&&Te(n,!!P.multiple,o,!1)}},Pn=bg,Ve=Ds;var k_={usingClientEntryPoint:!1,Events:[Ps,qr,Qr,tr,mr,bg]},wf={findFiberByHostInstance:Xa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},A_={bundleType:wf.bundleType,version:wf.version,rendererPackageName:wf.rendererPackageName,rendererConfig:wf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:m.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=rr(n),n===null?null:n.stateNode},findFiberByHostInstance:wf.findFiberByHostInstance||P_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{ci=Jh.inject(A_),Nr=Jh}catch{}}return bi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k_,bi.createPortal=function(n,o){var P=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kg(o))throw Error(t(200));return O_(n,o,null,P)},bi.createRoot=function(n,o){if(!kg(n))throw Error(t(299));var P=!1,F="",V=Tm;return o!=null&&(o.unstable_strictMode===!0&&(P=!0),o.identifierPrefix!==void 0&&(F=o.identifierPrefix),o.onRecoverableError!==void 0&&(V=o.onRecoverableError)),o=Og(n,1,!1,null,null,P,!1,F,V),n[Yi]=o.current,To(n.nodeType===8?n.parentNode:n),new Cg(o)},bi.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(t(188)):(n=Object.keys(n).join(","),Error(t(268,n)));return n=rr(o),n=n===null?null:n.stateNode,n},bi.flushSync=function(n){return Ds(n)},bi.hydrate=function(n,o,P){if(!Zh(o))throw Error(t(200));return Qh(null,n,o,!0,P)},bi.hydrateRoot=function(n,o,P){if(!kg(n))throw Error(t(405));var F=P!=null&&P.hydratedSources||null,V=!1,Q="",oe=Tm;if(P!=null&&(P.unstable_strictMode===!0&&(V=!0),P.identifierPrefix!==void 0&&(Q=P.identifierPrefix),P.onRecoverableError!==void 0&&(oe=P.onRecoverableError)),o=km(o,null,n,1,P??null,V,!1,Q,oe),n[Yi]=o.current,To(n),F)for(n=0;n<F.length;n++)P=F[n],V=P._getVersion,V=V(P._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[P,V]:o.mutableSourceEagerHydrationData.push(P,V);return new Xh(o)},bi.render=function(n,o,P){if(!Zh(o))throw Error(t(200));return Qh(null,n,o,!1,P)},bi.unmountComponentAtNode=function(n){if(!Zh(n))throw Error(t(40));return n._reactRootContainer?(Ds(function(){Qh(null,null,n,!1,function(){n._reactRootContainer=null,n[Yi]=null})}),!0):!1},bi.unstable_batchedUpdates=bg,bi.unstable_renderSubtreeIntoContainer=function(n,o,P,F){if(!Zh(P))throw Error(t(200));if(n==null||n._reactInternals===void 0)throw Error(t(38));return Qh(n,o,P,!1,F)},bi.version="18.3.1-next-f1338f8080-20240426",bi}var Dm;function u5(){if(Dm)return Tg.exports;Dm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(i){console.error(i)}}return e(),Tg.exports=L_(),Tg.exports}var Fm;function N_(){if(Fm)return ep;Fm=1;var e=u5();return ep.createRoot=e.createRoot,ep.hydrateRoot=e.hydrateRoot,ep}var I_=N_();const c5=zd(I_);var _f={};function Rt(e){for(var i=arguments.length,t=new Array(i>1?i-1:0),r=1;r<i;r++)t[r-1]=arguments[r];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var j_={};function Ap(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:j_}var f5=Object.assign,gp=Object.getOwnPropertyDescriptor,fo=Object.defineProperty,Bd=Object.prototype,$1=[];Object.freeze($1);var sv={};Object.freeze(sv);var D_=typeof Proxy<"u",F_=Object.toString();function d5(){D_||Rt("Proxy not available")}function h5(e){var i=!1;return function(){if(!i)return i=!0,e.apply(this,arguments)}}var oc=function(){};function Bi(e){return typeof e=="function"}function Ws(e){var i=typeof e;switch(i){case"string":case"symbol":case"number":return!0}return!1}function Tp(e){return e!==null&&typeof e=="object"}function il(e){if(!Tp(e))return!1;var i=Object.getPrototypeOf(e);if(i==null)return!0;var t=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t.toString()===F_}function p5(e){var i=e==null?void 0:e.constructor;return i?i.name==="GeneratorFunction"||i.displayName==="GeneratorFunction":!1}function Ud(e,i,t){fo(e,i,{enumerable:!1,writable:!0,configurable:!0,value:t})}function g5(e,i,t){fo(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}function ns(e,i){var t="isMobX"+e;return i.prototype[t]=!0,function(r){return Tp(r)&&r[t]===!0}}function Sc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function z_(e){var i=Object.getPrototypeOf(e),t=Object.getPrototypeOf(i),r=Object.getPrototypeOf(t);return r===null}function el(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var v5=typeof Object.getOwnPropertySymbols<"u";function B_(e){var i=Object.keys(e);if(!v5)return i;var t=Object.getOwnPropertySymbols(e);return t.length?[].concat(i,t.filter(function(r){return Bd.propertyIsEnumerable.call(e,r)})):i}var fc=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:v5?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function m5(e){return e===null?null:typeof e=="object"?""+e:e}function tl(e,i){return Bd.hasOwnProperty.call(e,i)}var U_=Object.getOwnPropertyDescriptors||function(i){var t={};return fc(i).forEach(function(r){t[r]=gp(i,r)}),t};function Fi(e,i){return!!(e&i)}function zi(e,i,t){return t?e|=i:e&=~i,e}function zm(e,i){(i==null||i>e.length)&&(i=e.length);for(var t=0,r=Array(i);t<i;t++)r[t]=e[t];return r}function q_(e,i){for(var t=0;t<i.length;t++){var r=i[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G_(r.key),r)}}function Ec(e,i,t){return i&&q_(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function lc(e,i){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=V_(e))||i){t&&(e=t);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.
|
|
33
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function es(){return es=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},es.apply(null,arguments)}function y5(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,W1(e,i)}function W1(e,i){return W1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},W1(e,i)}function H_(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var r=t.call(e,i);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function G_(e){var i=H_(e,"string");return typeof i=="symbol"?i:i+""}function V_(e,i){if(e){if(typeof e=="string")return zm(e,i);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?zm(e,i):void 0}}var co=Symbol("mobx-stored-annotations");function Ra(e){function i(t,r){if(Hd(r))return e.decorate_20223_(t,r);qd(t,r,e)}return Object.assign(i,e)}function qd(e,i,t){tl(e,co)||Ud(e,co,es({},e[co])),e6(t)||(e[co][i]=t)}function $_(e){return tl(e,co)||Ud(e,co,es({},e[co])),e[co]}function Hd(e){return typeof e=="object"&&typeof e.kind=="string"}var gt=Symbol("mobx administration"),is=function(){function e(t){t===void 0&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Qt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var i=e.prototype;return i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},i.reportObserved=function(){return D5(this)},i.reportChanged=function(){_i(),F5(this),Si()},i.toString=function(){return this.name_},Ec(e,[{key:"isBeingObserved",get:function(){return Fi(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=zi(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Fi(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=zi(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Fi(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=zi(this.flags_,e.diffValueMask_,r===1)}}])}();is.isBeingObservedMask_=1;is.isPendingUnobservationMask_=2;is.diffValueMask_=4;var uv=ns("Atom",is);function Md(e,i,t){i===void 0&&(i=oc),t===void 0&&(t=oc);var r=new is(e);return i!==oc&&W5(r,i),t!==oc&&gv(r,t),r}function W_(e,i){return e===i}function Y_(e,i){return Ov(e,i)}function K_(e,i){return Ov(e,i,1)}function X_(e,i){return Object.is?Object.is(e,i):e===i?e!==0||1/e===1/i:e!==e&&i!==i}var Ys={identity:W_,structural:Y_,default:X_,shallow:K_};function Ks(e,i,t){return Fp(e)?e:Array.isArray(e)?dr.array(e,{name:t}):il(e)?dr.object(e,void 0,{name:t}):Sc(e)?dr.map(e,{name:t}):el(e)?dr.set(e,{name:t}):typeof e=="function"&&!pc(e)&&!gc(e)?p5(e)?Zs(e):dc(t,e):e}function Z_(e,i,t){if(e==null||xn(e)||si(e)||Bn(e)||cn(e))return e;if(Array.isArray(e))return dr.array(e,{name:t,deep:!1});if(il(e))return dr.object(e,void 0,{name:t,deep:!1});if(Sc(e))return dr.map(e,{name:t,deep:!1});if(el(e))return dr.set(e,{name:t,deep:!1})}function Rp(e){return e}function Q_(e,i){return Ov(e,i)?i:e}var b5="override",J_=Ra({annotationType_:b5,make_:t6,extend_:r6,decorate_20223_:n6});function e6(e){return e.annotationType_===b5}function t6(e,i){return 0}function r6(e,i,t,r){Rt("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function n6(e,i){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Gd(e,i){return{annotationType_:e,options_:i,make_:i6,extend_:a6,decorate_20223_:o6}}function i6(e,i,t,r){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,i,t,!1)===null?0:1;if(r===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if(pc(t.value))return 1;var l=w5(e,this,i,t,!1);return fo(r,i,l),2}function a6(e,i,t,r){var a=w5(e,this,i,t);return e.defineProperty_(i,a,r)}function o6(e,i){var t=i.kind,r=i.name,a=i.addInitializer,l=this,s=function(E){var _,S,w,b;return ts((_=(S=l.options_)==null?void 0:S.name)!=null?_:r.toString(),E,(w=(b=l.options_)==null?void 0:b.autoAction)!=null?w:!1)};if(t=="field")return function(f){var E,_=f;return pc(_)||(_=s(_)),(E=l.options_)!=null&&E.bound&&(_=_.bind(this),_.isMobxAction=!0),_};if(t=="method"){var c;return pc(e)||(e=s(e)),(c=this.options_)!=null&&c.bound&&a(function(){var f=this,E=f[r].bind(f);E.isMobxAction=!0,f[r]=E}),e}Rt("Cannot apply '"+l.annotationType_+"' to '"+String(r)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+l.annotationType_+"' can only be used on properties with a function value."))}function l6(e,i,t,r){i.annotationType_,r.value}function w5(e,i,t,r,a){var l,s,c,f,E,_,S;a===void 0&&(a=We.safeDescriptors),l6(e,i,t,r);var w=r.value;if((l=i.options_)!=null&&l.bound){var b;w=w.bind((b=e.proxy_)!=null?b:e.target_)}return{value:ts((s=(c=i.options_)==null?void 0:c.name)!=null?s:t.toString(),w,(f=(E=i.options_)==null?void 0:E.autoAction)!=null?f:!1,(_=i.options_)!=null&&_.bound?(S=e.proxy_)!=null?S:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function _5(e,i){return{annotationType_:e,options_:i,make_:s6,extend_:u6,decorate_20223_:c6}}function s6(e,i,t,r){var a;if(r===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!tl(e.target_,i)||!gc(e.target_[i]))&&this.extend_(e,i,t,!1)===null)return 0;if(gc(t.value))return 1;var l=S5(e,this,i,t,!1,!1);return fo(r,i,l),2}function u6(e,i,t,r){var a,l=S5(e,this,i,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(i,l,r)}function c6(e,i){var t,r=i.name,a=i.addInitializer;return gc(e)||(e=Zs(e)),(t=this.options_)!=null&&t.bound&&a(function(){var l=this,s=l[r].bind(l);s.isMobXFlow=!0,l[r]=s}),e}function f6(e,i,t,r){i.annotationType_,r.value}function S5(e,i,t,r,a,l){l===void 0&&(l=We.safeDescriptors),f6(e,i,t,r);var s=r.value;if(gc(s)||(s=Zs(s)),a){var c;s=s.bind((c=e.proxy_)!=null?c:e.target_),s.isMobXFlow=!0}return{value:s,configurable:l?e.isPlainObject_:!0,enumerable:!1,writable:!l}}function cv(e,i){return{annotationType_:e,options_:i,make_:d6,extend_:h6,decorate_20223_:p6}}function d6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function h6(e,i,t,r){return g6(e,this,i,t),e.defineComputedProperty_(i,es({},this.options_,{get:t.get,set:t.set}),r)}function p6(e,i){var t=this,r=i.name,a=i.addInitializer;return a(function(){var l=eu(this)[gt],s=es({},t.options_,{get:e,context:this});s.name||(s.name="ObservableObject."+r.toString()),l.values_.set(r,new Na(s))}),function(){return this[gt].getObservablePropValue_(r)}}function g6(e,i,t,r){i.annotationType_,r.get}function Mp(e,i){return{annotationType_:e,options_:i,make_:v6,extend_:m6,decorate_20223_:y6}}function v6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function m6(e,i,t,r){var a,l;return b6(e,this),e.defineObservableProperty_(i,t.value,(a=(l=this.options_)==null?void 0:l.enhancer)!=null?a:Ks,r)}function y6(e,i){var t=this,r=i.kind,a=i.name,l=new WeakSet;function s(c,f){var E,_,S=eu(c)[gt],w=new Ql(f,(E=(_=t.options_)==null?void 0:_.enhancer)!=null?E:Ks,"ObservableObject."+a.toString(),!1);S.values_.set(a,w),l.add(c)}if(r=="accessor")return{get:function(){return l.has(this)||s(this,e.get.call(this)),this[gt].getObservablePropValue_(a)},set:function(f){return l.has(this)||s(this,f),this[gt].setObservablePropValue_(a,f)},init:function(f){return l.has(this)||s(this,f),f}}}function b6(e,i,t,r){i.annotationType_}var w6="true",_6=E5();function E5(e){return{annotationType_:w6,options_:e,make_:S6,extend_:E6,decorate_20223_:x6}}function S6(e,i,t,r){var a,l;if(t.get)return Qs.make_(e,i,t,r);if(t.set){var s=ts(i.toString(),t.set);return r===e.target_?e.defineProperty_(i,{configurable:We.safeDescriptors?e.isPlainObject_:!0,set:s})===null?0:2:(fo(r,i,{configurable:!0,set:s}),2)}if(r!==e.target_&&typeof t.value=="function"){var c;if(p5(t.value)){var f,E=(f=this.options_)!=null&&f.autoBind?Zs.bound:Zs;return E.make_(e,i,t,r)}var _=(c=this.options_)!=null&&c.autoBind?dc.bound:dc;return _.make_(e,i,t,r)}var S=((a=this.options_)==null?void 0:a.deep)===!1?dr.ref:dr;if(typeof t.value=="function"&&(l=this.options_)!=null&&l.autoBind){var w;t.value=t.value.bind((w=e.proxy_)!=null?w:e.target_)}return S.make_(e,i,t,r)}function E6(e,i,t,r){var a,l;if(t.get)return Qs.extend_(e,i,t,r);if(t.set)return e.defineProperty_(i,{configurable:We.safeDescriptors?e.isPlainObject_:!0,set:ts(i.toString(),t.set)},r);if(typeof t.value=="function"&&(a=this.options_)!=null&&a.autoBind){var s;t.value=t.value.bind((s=e.proxy_)!=null?s:e.target_)}var c=((l=this.options_)==null?void 0:l.deep)===!1?dr.ref:dr;return c.extend_(e,i,t,r)}function x6(e,i){Rt("'"+this.annotationType_+"' cannot be used as a decorator")}var O6="observable",P6="observable.ref",C6="observable.shallow",k6="observable.struct",x5={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(x5);function tp(e){return e||x5}var Y1=Mp(O6),A6=Mp(P6,{enhancer:Rp}),T6=Mp(C6,{enhancer:Z_}),R6=Mp(k6,{enhancer:Q_}),O5=Ra(Y1);function rp(e){return e.deep===!0?Ks:e.deep===!1?Rp:L6(e.defaultDecorator)}function M6(e){var i;return e?(i=e.defaultDecorator)!=null?i:E5(e):void 0}function L6(e){var i,t;return e&&(i=(t=e.options_)==null?void 0:t.enhancer)!=null?i:Ks}function P5(e,i,t){if(Hd(i))return Y1.decorate_20223_(e,i);if(Ws(i)){qd(e,i,Y1);return}return Fp(e)?e:il(e)?dr.object(e,i,t):Array.isArray(e)?dr.array(e,i):Sc(e)?dr.map(e,i):el(e)?dr.set(e,i):typeof e=="object"&&e!==null?e:dr.box(e,i)}f5(P5,O5);var N6={box:function(i,t){var r=tp(t);return new Ql(i,rp(r),r.name,!0,r.equals)},array:function(i,t){var r=tp(t);return(We.useProxies===!1||r.proxy===!1?B8:T8)(i,rp(r),r.name)},map:function(i,t){var r=tp(t);return new Bp(i,rp(r),r.name)},set:function(i,t){var r=tp(t);return new Ev(i,rp(r),r.name)},object:function(i,t,r){return as(function(){return vv(We.useProxies===!1||(r==null?void 0:r.proxy)===!1?eu({},r):P8({},r),i,t)})},ref:Ra(A6),shallow:Ra(T6),deep:O5,struct:Ra(R6)},dr=f5(P5,N6),C5="computed",I6="computed.struct",K1=cv(C5),j6=cv(I6,{equals:Ys.structural}),Qs=function(i,t){if(Hd(t))return K1.decorate_20223_(i,t);if(Ws(t))return qd(i,t,K1);if(il(i))return Ra(cv(C5,i));var r=il(t)?t:{};return r.get=i,r.name||(r.name=i.name||""),new Na(r)};Object.assign(Qs,K1);Qs.struct=Ra(j6);var Bm,Um,vp=0,D6=1,F6=(Bm=(Um=gp(function(){},"name"))==null?void 0:Um.configurable)!=null?Bm:!1,qm={value:"action",configurable:!0,writable:!1,enumerable:!1};function ts(e,i,t,r){t===void 0&&(t=!1);function a(){return k5(e,t,i,r||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return i.toString()},F6&&(qm.value=e,fo(a,"name",qm)),a}function k5(e,i,t,r,a){var l=A5(e,i);try{return t.apply(r,a)}catch(s){throw l.error_=s,s}finally{T5(l)}}function A5(e,i,t,r){var a=!1,l=0,s=We.trackingDerivation,c=!i||!s;_i();var f=We.allowStateChanges;c&&(Js(),f=Lp(!0));var E=Ip(!0),_={runAsAction_:c,prevDerivation_:s,prevAllowStateChanges_:f,prevAllowStateReads_:E,notifySpy_:a,startTime_:l,actionId_:D6++,parentActionId_:vp};return vp=_.actionId_,_}function T5(e){vp!==e.actionId_&&Rt(30),vp=e.parentActionId_,e.error_!==void 0&&(We.suppressReactionErrors=!0),Np(e.prevAllowStateChanges_),uc(e.prevAllowStateReads_),Si(),e.runAsAction_&&rl(e.prevDerivation_),We.suppressReactionErrors=!1}function fv(e,i){var t=Lp(e);try{return i()}finally{Np(t)}}function Lp(e){var i=We.allowStateChanges;return We.allowStateChanges=e,i}function Np(e){We.allowStateChanges=e}var Ql=function(e){function i(r,a,l,s,c){var f;return l===void 0&&(l="ObservableValue"),c===void 0&&(c=Ys.default),f=e.call(this,l)||this,f.enhancer=void 0,f.name_=void 0,f.equals=void 0,f.hasUnreportedChange_=!1,f.interceptors_=void 0,f.changeListeners_=void 0,f.value_=void 0,f.dehancer=void 0,f.enhancer=a,f.name_=l,f.equals=c,f.value_=a(r,void 0,l),f}y5(i,e);var t=i.prototype;return t.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},t.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==We.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(ia(this)){var l=aa(this,{object:this,type:ho,newValue:a});if(!l)return We.UNCHANGED;a=l.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?We.UNCHANGED:a},t.setNewValue_=function(a){var l=this.value_;this.value_=a,this.reportChanged(),Ma(this)&&La(this,{type:ho,object:this,newValue:a,oldValue:l})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(a){return Vd(this,a)},t.observe_=function(a,l){return l&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:ho,newValue:this.value_,oldValue:void 0}),$d(this,a)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return m5(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},i}(is),dv=ns("ObservableValue",Ql),Na=function(){function e(t){this.dependenciesState_=Qt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Qt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new yp(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=mp.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,t.get||Rt(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=ts("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?Ys.structural:Ys.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var i=e.prototype;return i.onBecomeStale_=function(){Y6(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(r){return r()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(r){return r()})},i.get=function(){if(this.isComputing&&Rt(32,this.name_,this.derivation),We.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)X1(this)&&(this.warnAboutUntrackedRead_(),_i(),this.value_=this.computeValue_(!1),Si());else if(D5(this),X1(this)){var r=We.trackingContext;this.keepAlive_&&!r&&(We.trackingContext=this),this.trackAndCompute()&&W6(this),We.trackingContext=r}var a=this.value_;if(up(a))throw a.cause;return a},i.set=function(r){if(this.setter_){this.isRunningSetter&&Rt(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,r)}finally{this.isRunningSetter=!1}}else Rt(34,this.name_)},i.trackAndCompute=function(){var r=this.value_,a=this.dependenciesState_===Qt.NOT_TRACKING_,l=this.computeValue_(!0),s=a||up(r)||up(l)||!this.equals_(r,l);return s&&(this.value_=l),s},i.computeValue_=function(r){this.isComputing=!0;var a=Lp(!1),l;if(r)l=R5(this,this.derivation,this.scope_);else if(We.disableErrorBoundaries===!0)l=this.derivation.call(this.scope_);else try{l=this.derivation.call(this.scope_)}catch(s){l=new yp(s)}return Np(a),this.isComputing=!1,l},i.suspend_=function(){this.keepAlive_||(Z1(this),this.value_=void 0)},i.observe_=function(r,a){var l=this,s=!0,c=void 0;return pv(function(){var f=l.get();if(!s||a){var E=Js();r({observableKind:"computed",debugObjectName:l.name_,type:ho,object:l,newValue:f,oldValue:c}),rl(E)}s=!1,c=f})},i.warnAboutUntrackedRead_=function(){},i.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},i.valueOf=function(){return m5(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},Ec(e,[{key:"isComputing",get:function(){return Fi(this.flags_,e.isComputingMask_)},set:function(r){this.flags_=zi(this.flags_,e.isComputingMask_,r)}},{key:"isRunningSetter",get:function(){return Fi(this.flags_,e.isRunningSetterMask_)},set:function(r){this.flags_=zi(this.flags_,e.isRunningSetterMask_,r)}},{key:"isBeingObserved",get:function(){return Fi(this.flags_,e.isBeingObservedMask_)},set:function(r){this.flags_=zi(this.flags_,e.isBeingObservedMask_,r)}},{key:"isPendingUnobservation",get:function(){return Fi(this.flags_,e.isPendingUnobservationMask_)},set:function(r){this.flags_=zi(this.flags_,e.isPendingUnobservationMask_,r)}},{key:"diffValue",get:function(){return Fi(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=zi(this.flags_,e.diffValueMask_,r===1)}}])}();Na.isComputingMask_=1;Na.isRunningSetterMask_=2;Na.isBeingObservedMask_=4;Na.isPendingUnobservationMask_=8;Na.diffValueMask_=16;var Xs=ns("ComputedValue",Na),Qt;(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_"})(Qt||(Qt={}));var mp;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(mp||(mp={}));var yp=function(i){this.cause=void 0,this.cause=i};function up(e){return e instanceof yp}function X1(e){switch(e.dependenciesState_){case Qt.UP_TO_DATE_:return!1;case Qt.NOT_TRACKING_:case Qt.STALE_:return!0;case Qt.POSSIBLY_STALE_:{for(var i=Ip(!0),t=Js(),r=e.observing_,a=r.length,l=0;l<a;l++){var s=r[l];if(Xs(s)){if(We.disableErrorBoundaries)s.get();else try{s.get()}catch{return rl(t),uc(i),!0}if(e.dependenciesState_===Qt.STALE_)return rl(t),uc(i),!0}}return M5(e),rl(t),uc(i),!1}}}function z6(){return We.trackingDerivation!==null}function R5(e,i,t){var r=Ip(!0);M5(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++We.runId;var a=We.trackingDerivation;We.trackingDerivation=e,We.inBatch++;var l;if(We.disableErrorBoundaries===!0)l=i.call(t);else try{l=i.call(t)}catch(s){l=new yp(s)}return We.inBatch--,We.trackingDerivation=a,B6(e),uc(r),l}function B6(e){for(var i=e.observing_,t=e.observing_=e.newObserving_,r=Qt.UP_TO_DATE_,a=0,l=e.unboundDepsCount_,s=0;s<l;s++){var c=t[s];c.diffValue===0&&(c.diffValue=1,a!==s&&(t[a]=c),a++),c.dependenciesState_>r&&(r=c.dependenciesState_)}for(t.length=a,e.newObserving_=null,l=i.length;l--;){var f=i[l];f.diffValue===0&&I5(f,e),f.diffValue=0}for(;a--;){var E=t[a];E.diffValue===1&&(E.diffValue=0,$6(E,e))}r!==Qt.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}function Z1(e){var i=e.observing_;e.observing_=[];for(var t=i.length;t--;)I5(i[t],e);e.dependenciesState_=Qt.NOT_TRACKING_}function hv(e){var i=Js();try{return e()}finally{rl(i)}}function Js(){var e=We.trackingDerivation;return We.trackingDerivation=null,e}function rl(e){We.trackingDerivation=e}function Ip(e){var i=We.allowStateReads;return We.allowStateReads=e,i}function uc(e){We.allowStateReads=e}function M5(e){if(e.dependenciesState_!==Qt.UP_TO_DATE_){e.dependenciesState_=Qt.UP_TO_DATE_;for(var i=e.observing_,t=i.length;t--;)i[t].lowestObserverState_=Qt.UP_TO_DATE_}}var U6=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],kd=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},cp=!0,L5=!1,We=function(){var e=Ap();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(cp=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new kd().version&&(cp=!1),cp?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new kd):(setTimeout(function(){L5||Rt(35)},1),new kd)}();function q6(){if((We.pendingReactions.length||We.inBatch||We.isRunningReactions)&&Rt(36),L5=!0,cp){var e=Ap();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),We=new kd}}function N5(){return We}function H6(){var e=new kd;for(var i in e)U6.indexOf(i)===-1&&(We[i]=e[i]);We.allowStateChanges=!We.enforceActions}function G6(e){return e.observers_&&e.observers_.size>0}function V6(e){return e.observers_}function $6(e,i){e.observers_.add(i),e.lowestObserverState_>i.dependenciesState_&&(e.lowestObserverState_=i.dependenciesState_)}function I5(e,i){e.observers_.delete(i),e.observers_.size===0&&j5(e)}function j5(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,We.pendingUnobservations.push(e))}function _i(){We.inBatch++}function Si(){if(--We.inBatch===0){z5();for(var e=We.pendingUnobservations,i=0;i<e.length;i++){var t=e[i];t.isPendingUnobservation=!1,t.observers_.size===0&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof Na&&t.suspend_())}We.pendingUnobservations=[]}}function D5(e){var i=We.trackingDerivation;return i!==null?(i.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=i.runId_,i.newObserving_[i.unboundDepsCount_++]=e,!e.isBeingObserved&&We.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&We.inBatch>0&&j5(e),!1)}function F5(e){e.lowestObserverState_!==Qt.STALE_&&(e.lowestObserverState_=Qt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Qt.UP_TO_DATE_&&i.onBecomeStale_(),i.dependenciesState_=Qt.STALE_}))}function W6(e){e.lowestObserverState_!==Qt.STALE_&&(e.lowestObserverState_=Qt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Qt.POSSIBLY_STALE_?i.dependenciesState_=Qt.STALE_:i.dependenciesState_===Qt.UP_TO_DATE_&&(e.lowestObserverState_=Qt.UP_TO_DATE_)}))}function Y6(e){e.lowestObserverState_===Qt.UP_TO_DATE_&&(e.lowestObserverState_=Qt.POSSIBLY_STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Qt.UP_TO_DATE_&&(i.dependenciesState_=Qt.POSSIBLY_STALE_,i.onBecomeStale_())}))}var Ia=function(){function e(t,r,a,l){t===void 0&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Qt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=mp.NONE,this.name_=t,this.onInvalidate_=r,this.errorHandler_=a,this.requiresObservable_=l}var i=e.prototype;return i.onBecomeStale_=function(){this.schedule_()},i.schedule_=function(){this.isScheduled||(this.isScheduled=!0,We.pendingReactions.push(this),z5())},i.runReaction_=function(){if(!this.isDisposed){_i(),this.isScheduled=!1;var r=We.trackingContext;if(We.trackingContext=this,X1(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}We.trackingContext=r,Si()}},i.track=function(r){if(!this.isDisposed){_i(),this.isRunning=!0;var a=We.trackingContext;We.trackingContext=this;var l=R5(this,r,void 0);We.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Z1(this),up(l)&&this.reportExceptionInDerivation_(l.cause),Si()}},i.reportExceptionInDerivation_=function(r){var a=this;if(this.errorHandler_){this.errorHandler_(r,this);return}if(We.disableErrorBoundaries)throw r;var l="[mobx] uncaught error in '"+this+"'";We.suppressReactionErrors||console.error(l,r),We.globalReactionErrorHandlers.forEach(function(s){return s(r,a)})},i.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(_i(),Z1(this),Si()))},i.getDisposer_=function(r){var a=this,l=function s(){a.dispose(),r==null||r.removeEventListener==null||r.removeEventListener("abort",s)};return r==null||r.addEventListener==null||r.addEventListener("abort",l),l[gt]=this,l},i.toString=function(){return"Reaction["+this.name_+"]"},i.trace=function(r){},Ec(e,[{key:"isDisposed",get:function(){return Fi(this.flags_,e.isDisposedMask_)},set:function(r){this.flags_=zi(this.flags_,e.isDisposedMask_,r)}},{key:"isScheduled",get:function(){return Fi(this.flags_,e.isScheduledMask_)},set:function(r){this.flags_=zi(this.flags_,e.isScheduledMask_,r)}},{key:"isTrackPending",get:function(){return Fi(this.flags_,e.isTrackPendingMask_)},set:function(r){this.flags_=zi(this.flags_,e.isTrackPendingMask_,r)}},{key:"isRunning",get:function(){return Fi(this.flags_,e.isRunningMask_)},set:function(r){this.flags_=zi(this.flags_,e.isRunningMask_,r)}},{key:"diffValue",get:function(){return Fi(this.flags_,e.diffValueMask_)?1:0},set:function(r){this.flags_=zi(this.flags_,e.diffValueMask_,r===1)}}])}();Ia.isDisposedMask_=1;Ia.isScheduledMask_=2;Ia.isTrackPendingMask_=4;Ia.isRunningMask_=8;Ia.diffValueMask_=16;function K6(e){return We.globalReactionErrorHandlers.push(e),function(){var i=We.globalReactionErrorHandlers.indexOf(e);i>=0&&We.globalReactionErrorHandlers.splice(i,1)}}var X6=100,Q1=function(i){return i()};function z5(){We.inBatch>0||We.isRunningReactions||Q1(Z6)}function Z6(){We.isRunningReactions=!0;for(var e=We.pendingReactions,i=0;e.length>0;){++i===X6&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var t=e.splice(0),r=0,a=t.length;r<a;r++)t[r].runReaction_()}We.isRunningReactions=!1}var bp=ns("Reaction",Ia);function Q6(e){var i=Q1;Q1=function(r){return e(function(){return i(r)})}}function Ad(){return!1}function B5(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var U5="action",J6="action.bound",q5="autoAction",e8="autoAction.bound",H5="<unnamed action>",J1=Gd(U5),t8=Gd(J6,{bound:!0}),ev=Gd(q5,{autoAction:!0}),r8=Gd(e8,{autoAction:!0,bound:!0});function G5(e){var i=function(r,a){if(Bi(r))return ts(r.name||H5,r,e);if(Bi(a))return ts(r,a,e);if(Hd(a))return(e?ev:J1).decorate_20223_(r,a);if(Ws(a))return qd(r,a,e?ev:J1);if(Ws(r))return Ra(Gd(e?q5:U5,{name:r,autoAction:e}))};return i}var tn=G5(!1);Object.assign(tn,J1);var dc=G5(!0);Object.assign(dc,ev);tn.bound=Ra(t8);dc.bound=Ra(r8);function hc(e){return k5(e.name||H5,!1,e,this,void 0)}function pc(e){return Bi(e)&&e.isMobxAction===!0}function pv(e,i){var t,r,a,l;i===void 0&&(i=sv);var s=(t=(r=i)==null?void 0:r.name)!=null?t:"Autorun",c=!i.scheduler&&!i.delay,f;if(c)f=new Ia(s,function(){this.track(S)},i.onError,i.requiresObservable);else{var E=V5(i),_=!1;f=new Ia(s,function(){_||(_=!0,E(function(){_=!1,f.isDisposed||f.track(S)}))},i.onError,i.requiresObservable)}function S(){e(f)}return(a=i)!=null&&(a=a.signal)!=null&&a.aborted||f.schedule_(),f.getDisposer_((l=i)==null?void 0:l.signal)}var n8=function(i){return i()};function V5(e){return e.scheduler?e.scheduler:e.delay?function(i){return setTimeout(i,e.delay)}:n8}function $5(e,i,t){var r,a,l;t===void 0&&(t=sv);var s=(r=t.name)!=null?r:"Reaction",c=tn(s,t.onError?i8(t.onError,i):i),f=!t.scheduler&&!t.delay,E=V5(t),_=!0,S=!1,w,b=t.compareStructural?Ys.structural:t.equals||Ys.default,y=new Ia(s,function(){_||f?v():S||(S=!0,E(v))},t.onError,t.requiresObservable);function v(){if(S=!1,!y.isDisposed){var g=!1,O=w;y.track(function(){var h=fv(!1,function(){return e(y)});g=_||!b(w,h),w=h}),(_&&t.fireImmediately||!_&&g)&&c(w,O,y),_=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||y.schedule_(),y.getDisposer_((l=t)==null?void 0:l.signal)}function i8(e,i){return function(){try{return i.apply(this,arguments)}catch(t){e.call(this,t)}}}var a8="onBO",o8="onBUO";function W5(e,i,t){return Y5(a8,e,i,t)}function gv(e,i,t){return Y5(o8,e,i,t)}function Y5(e,i,t,r){var a=typeof r=="function"?po(i,t):po(i),l=Bi(r)?r:t,s=e+"L";return a[s]?a[s].add(l):a[s]=new Set([l]),function(){var c=a[s];c&&(c.delete(l),c.size===0&&delete a[s])}}var l8="never",np="always",s8="observed";function K5(e){e.isolateGlobalState===!0&&q6();var i=e.useProxies,t=e.enforceActions;if(i!==void 0&&(We.useProxies=i===np?!0:i===l8?!1:typeof Proxy<"u"),i==="ifavailable"&&(We.verifyProxies=!0),t!==void 0){var r=t===np?np:t===s8;We.enforceActions=r,We.allowStateChanges=!(r===!0||r===np)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(We[a]=!!e[a])}),We.allowStateReads=!We.observableRequiresReaction,e.reactionScheduler&&Q6(e.reactionScheduler)}function vv(e,i,t,r){var a=U_(i);return as(function(){var l=eu(e,r)[gt];fc(a).forEach(function(s){l.extend_(s,a[s],t&&s in t?t[s]:!0)})}),e}function X5(e,i){return Z5(po(e,i))}function Z5(e){var i={name:e.name_};return e.observing_&&e.observing_.length>0&&(i.dependencies=c8(e.observing_).map(Z5)),i}function u8(e,i){return Q5(po(e,i))}function Q5(e){var i={name:e.name_};return G6(e)&&(i.observers=Array.from(V6(e)).map(Q5)),i}function c8(e){return Array.from(new Set(e))}var f8=0;function jp(){this.message="FLOW_CANCELLED"}jp.prototype=Object.create(Error.prototype);function d8(e){return e instanceof jp}var Lg=_5("flow"),h8=_5("flow.bound",{bound:!0}),Zs=Object.assign(function(i,t){if(Hd(t))return Lg.decorate_20223_(i,t);if(Ws(t))return qd(i,t,Lg);var r=i,a=r.name||"<unnamed flow>",l=function(){var c=this,f=arguments,E=++f8,_=tn(a+" - runid: "+E+" - init",r).apply(c,f),S,w=void 0,b=new Promise(function(y,v){var g=0;S=v;function O(m){w=void 0;var x;try{x=tn(a+" - runid: "+E+" - yield "+g++,_.next).call(_,m)}catch(N){return v(N)}p(x)}function h(m){w=void 0;var x;try{x=tn(a+" - runid: "+E+" - yield "+g++,_.throw).call(_,m)}catch(N){return v(N)}p(x)}function p(m){if(Bi(m==null?void 0:m.then)){m.then(p,v);return}return m.done?y(m.value):(w=Promise.resolve(m.value),w.then(O,h))}O(void 0)});return b.cancel=tn(a+" - runid: "+E+" - cancel",function(){try{w&&Hm(w);var y=_.return(void 0),v=Promise.resolve(y.value);v.then(oc,oc),Hm(v),S(new jp)}catch(g){S(g)}}),b};return l.isMobXFlow=!0,l},Lg);Zs.bound=Ra(h8);function Hm(e){Bi(e.cancel)&&e.cancel()}function p8(e){return e}function gc(e){return(e==null?void 0:e.isMobXFlow)===!0}function mv(e,i,t){var r;return Bn(e)||si(e)||dv(e)?r=ja(e):xn(e)&&(r=ja(e,i)),r.dehancer=typeof i=="function"?i:t,function(){r.dehancer=void 0}}function Dp(e,i,t){return Bi(t)?v8(e,i,t):g8(e,i)}function g8(e,i){return ja(e).intercept_(i)}function v8(e,i,t){return ja(e,i).intercept_(t)}function J5(e,i){if(i===void 0)return Xs(e);if(xn(e)===!1||!e[gt].values_.has(i))return!1;var t=po(e,i);return Xs(t)}function m8(e){return J5(e)}function ew(e,i){return J5(e,i)}function tw(e,i){return e?i!==void 0?xn(e)?e[gt].values_.has(i):!1:xn(e)||!!e[gt]||uv(e)||bp(e)||Xs(e):!1}function Fp(e){return tw(e)}function rw(e,i){return tw(e,i)}function Ld(e){if(xn(e))return e[gt].keys_();if(Bn(e)||cn(e))return Array.from(e.keys());if(si(e))return e.map(function(i,t){return t});Rt(5)}function yv(e){if(xn(e))return Ld(e).map(function(i){return e[i]});if(Bn(e))return Ld(e).map(function(i){return e.get(i)});if(cn(e))return Array.from(e.values());if(si(e))return e.slice();Rt(6)}function nw(e){if(xn(e))return Ld(e).map(function(i){return[i,e[i]]});if(Bn(e))return Ld(e).map(function(i){return[i,e.get(i)]});if(cn(e))return Array.from(e.entries());if(si(e))return e.map(function(i,t){return[t,i]});Rt(7)}function bv(e,i,t){if(arguments.length===2&&!cn(e)){_i();var r=i;try{for(var a in r)bv(e,a,r[a])}finally{Si()}return}xn(e)?e[gt].set_(i,t):Bn(e)?e.set(i,t):cn(e)?e.add(i):si(e)?(typeof i!="number"&&(i=parseInt(i,10)),i<0&&Rt("Invalid index: '"+i+"'"),_i(),i>=e.length&&(e.length=i+1),e[i]=t,Si()):Rt(8)}function y8(e,i){xn(e)?e[gt].delete_(i):Bn(e)||cn(e)?e.delete(i):si(e)?(typeof i!="number"&&(i=parseInt(i,10)),e.splice(i,1)):Rt(9)}function iw(e,i){if(xn(e))return e[gt].has_(i);if(Bn(e))return e.has(i);if(cn(e))return e.has(i);if(si(e))return i>=0&&i<e.length;Rt(10)}function b8(e,i){if(iw(e,i)){if(xn(e))return e[gt].get_(i);if(Bn(e))return e.get(i);if(si(e))return e[i];Rt(11)}}function wv(e,i,t){if(xn(e))return e[gt].defineProperty_(i,t);Rt(39)}function aw(e){if(xn(e))return e[gt].ownKeys_();Rt(38)}function zp(e,i,t,r){return Bi(t)?_8(e,i,t,r):w8(e,i,t)}function w8(e,i,t){return ja(e).observe_(i,t)}function _8(e,i,t,r){return ja(e,i).observe_(t,r)}function ip(e,i,t){return e.set(i,t),t}function ic(e,i){if(e==null||typeof e!="object"||e instanceof Date||!Fp(e))return e;if(dv(e)||Xs(e))return ic(e.get(),i);if(i.has(e))return i.get(e);if(si(e)){var t=ip(i,e,new Array(e.length));return e.forEach(function(s,c){t[c]=ic(s,i)}),t}if(cn(e)){var r=ip(i,e,new Set);return e.forEach(function(s){r.add(ic(s,i))}),r}if(Bn(e)){var a=ip(i,e,new Map);return e.forEach(function(s,c){a.set(c,ic(s,i))}),a}else{var l=ip(i,e,{});return aw(e).forEach(function(s){Bd.propertyIsEnumerable.call(e,s)&&(l[s]=ic(e[s],i))}),l}}function S8(e,i){return ic(e,new Map)}function E8(){}function uo(e,i){i===void 0&&(i=void 0),_i();try{return e.apply(i)}finally{Si()}}function tv(e,i,t){return arguments.length===1||i&&typeof i=="object"?x8(e,i):ow(e,i,t||{})}function ow(e,i,t){var r;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");r=setTimeout(function(){if(!s[gt].isDisposed)if(s(),t.onError)t.onError(a);else throw a},t.timeout)}t.name="When";var l=ts("When-effect",i),s=pv(function(c){var f=fv(!1,e);f&&(c.dispose(),r&&clearTimeout(r),l())},t);return s}function x8(e,i){var t;if(i!=null&&(t=i.signal)!=null&&t.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var r,a,l=new Promise(function(s,c){var f,E=ow(e,s,es({},i,{onError:c}));r=function(){E(),c(new Error("WHEN_CANCELLED"))},a=function(){E(),c(new Error("WHEN_ABORTED"))},i==null||(f=i.signal)==null||f.addEventListener==null||f.addEventListener("abort",a)}).finally(function(){var s;return i==null||(s=i.signal)==null||s.removeEventListener==null?void 0:s.removeEventListener("abort",a)});return l.cancel=r,l}function tc(e){return e[gt]}var O8={has:function(i,t){return tc(i).has_(t)},get:function(i,t){return tc(i).get_(t)},set:function(i,t,r){var a;return Ws(t)?(a=tc(i).set_(t,r,!0))!=null?a:!0:!1},deleteProperty:function(i,t){var r;return Ws(t)?(r=tc(i).delete_(t,!0))!=null?r:!0:!1},defineProperty:function(i,t,r){var a;return(a=tc(i).defineProperty_(t,r))!=null?a:!0},ownKeys:function(i){return tc(i).ownKeys_()},preventExtensions:function(i){Rt(13)}};function P8(e,i){var t,r;return d5(),e=eu(e,i),(r=(t=e[gt]).proxy_)!=null?r:t.proxy_=new Proxy(e,O8)}function ia(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Vd(e,i){var t=e.interceptors_||(e.interceptors_=[]);return t.push(i),h5(function(){var r=t.indexOf(i);r!==-1&&t.splice(r,1)})}function aa(e,i){var t=Js();try{for(var r=[].concat(e.interceptors_||[]),a=0,l=r.length;a<l&&(i=r[a](i),i&&!i.type&&Rt(14),!!i);a++);return i}finally{rl(t)}}function Ma(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function $d(e,i){var t=e.changeListeners_||(e.changeListeners_=[]);return t.push(i),h5(function(){var r=t.indexOf(i);r!==-1&&t.splice(r,1)})}function La(e,i){var t=Js(),r=e.changeListeners_;if(r){r=r.slice();for(var a=0,l=r.length;a<l;a++)r[a](i);rl(t)}}function _v(e,i,t){return as(function(){var r,a=eu(e,t)[gt];(r=i)!=null||(i=$_(e)),fc(i).forEach(function(l){return a.make_(l,i[l])})}),e}var Ng=Symbol("mobx-keys");function C8(e,i,t){return il(e)?vv(e,e,i,t):(as(function(){var r=eu(e,t)[gt];if(!e[Ng]){var a=Object.getPrototypeOf(e),l=new Set([].concat(fc(e),fc(a)));l.delete("constructor"),l.delete(gt),Ud(a,Ng,l)}e[Ng].forEach(function(s){return r.make_(s,i&&s in i?i[s]:!0)})}),e)}var Gm="splice",ho="update",k8=1e4,A8={get:function(i,t){var r=i[gt];return t===gt?r:t==="length"?r.getArrayLength_():typeof t=="string"&&!isNaN(t)?r.get_(parseInt(t)):tl(wp,t)?wp[t]:i[t]},set:function(i,t,r){var a=i[gt];return t==="length"&&a.setArrayLength_(r),typeof t=="symbol"||isNaN(t)?i[t]=r:a.set_(parseInt(t),r),!0},preventExtensions:function(){Rt(15)}},Sv=function(){function e(t,r,a,l){t===void 0&&(t="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_=a,this.legacyMode_=l,this.atom_=new is(t),this.enhancer_=function(s,c){return r(s,c,"ObservableArray[..]")}}var i=e.prototype;return i.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},i.dehanceValues_=function(r){return this.dehancer!==void 0&&r.length>0?r.map(this.dehancer):r},i.intercept_=function(r){return Vd(this,r)},i.observe_=function(r,a){return a===void 0&&(a=!1),a&&r({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),$d(this,r)},i.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},i.setArrayLength_=function(r){(typeof r!="number"||isNaN(r)||r<0)&&Rt("Out of range: "+r);var a=this.values_.length;if(r!==a)if(r>a){for(var l=new Array(r-a),s=0;s<r-a;s++)l[s]=void 0;this.spliceWithArray_(a,0,l)}else this.spliceWithArray_(r,a-r)},i.updateArrayLength_=function(r,a){r!==this.lastKnownLength_&&Rt(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&fw(r+a+1)},i.spliceWithArray_=function(r,a,l){var s=this;this.atom_;var c=this.values_.length;if(r===void 0?r=0:r>c?r=c:r<0&&(r=Math.max(0,c+r)),arguments.length===1?a=c-r:a==null?a=0:a=Math.max(0,Math.min(a,c-r)),l===void 0&&(l=$1),ia(this)){var f=aa(this,{object:this.proxy_,type:Gm,index:r,removedCount:a,added:l});if(!f)return $1;a=f.removedCount,l=f.added}if(l=l.length===0?l:l.map(function(S){return s.enhancer_(S,void 0)}),this.legacyMode_){var E=l.length-a;this.updateArrayLength_(c,E)}var _=this.spliceItemsIntoValues_(r,a,l);return(a!==0||l.length!==0)&&this.notifyArraySplice_(r,l,_),this.dehanceValues_(_)},i.spliceItemsIntoValues_=function(r,a,l){if(l.length<k8){var s;return(s=this.values_).splice.apply(s,[r,a].concat(l))}else{var c=this.values_.slice(r,r+a),f=this.values_.slice(r+a);this.values_.length+=l.length-a;for(var E=0;E<l.length;E++)this.values_[r+E]=l[E];for(var _=0;_<f.length;_++)this.values_[r+l.length+_]=f[_];return c}},i.notifyArrayChildUpdate_=function(r,a,l){var s=!this.owned_&&Ad(),c=Ma(this),f=c||s?{observableKind:"array",object:this.proxy_,type:ho,debugObjectName:this.atom_.name_,index:r,newValue:a,oldValue:l}:null;this.atom_.reportChanged(),c&&La(this,f)},i.notifyArraySplice_=function(r,a,l){var s=!this.owned_&&Ad(),c=Ma(this),f=c||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Gm,index:r,removed:l,added:a,removedCount:l.length,addedCount:a.length}:null;this.atom_.reportChanged(),c&&La(this,f)},i.get_=function(r){if(this.legacyMode_&&r>=this.values_.length){console.warn("[mobx] Out of bounds read: "+r);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[r])},i.set_=function(r,a){var l=this.values_;if(this.legacyMode_&&r>l.length&&Rt(17,r,l.length),r<l.length){this.atom_;var s=l[r];if(ia(this)){var c=aa(this,{type:ho,object:this.proxy_,index:r,newValue:a});if(!c)return;a=c.newValue}a=this.enhancer_(a,s);var f=a!==s;f&&(l[r]=a,this.notifyArrayChildUpdate_(r,a,s))}else{for(var E=new Array(r+1-l.length),_=0;_<E.length-1;_++)E[_]=void 0;E[E.length-1]=a,this.spliceWithArray_(l.length,0,E)}},e}();function T8(e,i,t,r){return t===void 0&&(t="ObservableArray"),r===void 0&&(r=!1),d5(),as(function(){var a=new Sv(t,i,r,!1);g5(a.values_,gt,a);var l=new Proxy(a.values_,A8);return a.proxy_=l,e&&e.length&&a.spliceWithArray_(0,0,e),l})}var wp={clear:function(){return this.splice(0)},replace:function(i){var t=this[gt];return t.spliceWithArray_(0,t.values_.length,i)},toJSON:function(){return this.slice()},splice:function(i,t){for(var r=arguments.length,a=new Array(r>2?r-2:0),l=2;l<r;l++)a[l-2]=arguments[l];var s=this[gt];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(i);case 2:return s.spliceWithArray_(i,t)}return s.spliceWithArray_(i,t,a)},spliceWithArray:function(i,t,r){return this[gt].spliceWithArray_(i,t,r)},push:function(){for(var i=this[gt],t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return i.spliceWithArray_(i.values_.length,0,r),i.values_.length},pop:function(){return this.splice(Math.max(this[gt].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var i=this[gt],t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return i.spliceWithArray_(0,0,r),i.values_.length},reverse:function(){return We.trackingDerivation&&Rt(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){We.trackingDerivation&&Rt(37,"sort");var i=this.slice();return i.sort.apply(i,arguments),this.replace(i),this},remove:function(i){var t=this[gt],r=t.dehanceValues_(t.values_).indexOf(i);return r>-1?(this.splice(r,1),!0):!1}};Sr("at",Ui);Sr("concat",Ui);Sr("flat",Ui);Sr("includes",Ui);Sr("indexOf",Ui);Sr("join",Ui);Sr("lastIndexOf",Ui);Sr("slice",Ui);Sr("toString",Ui);Sr("toLocaleString",Ui);Sr("toSorted",Ui);Sr("toSpliced",Ui);Sr("with",Ui);Sr("every",Da);Sr("filter",Da);Sr("find",Da);Sr("findIndex",Da);Sr("findLast",Da);Sr("findLastIndex",Da);Sr("flatMap",Da);Sr("forEach",Da);Sr("map",Da);Sr("some",Da);Sr("toReversed",Da);Sr("reduce",lw);Sr("reduceRight",lw);function Sr(e,i){typeof Array.prototype[e]=="function"&&(wp[e]=i(e))}function Ui(e){return function(){var i=this[gt];i.atom_.reportObserved();var t=i.dehanceValues_(i.values_);return t[e].apply(t,arguments)}}function Da(e){return function(i,t){var r=this,a=this[gt];a.atom_.reportObserved();var l=a.dehanceValues_(a.values_);return l[e](function(s,c){return i.call(t,s,c,r)})}}function lw(e){return function(){var i=this,t=this[gt];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=function(l,s,c){return a(l,s,c,i)},r[e].apply(r,arguments)}}var R8=ns("ObservableArrayAdministration",Sv);function si(e){return Tp(e)&&R8(e[gt])}var M8={},Zl="add",_p="delete",Bp=function(){function e(t,r,a){var l=this;r===void 0&&(r=Ks),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[gt]=M8,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_=r,this.name_=a,Bi(Map)||Rt(18),as(function(){l.keysAtom_=Md("ObservableMap.keys()"),l.data_=new Map,l.hasMap_=new Map,t&&l.merge(t)})}var i=e.prototype;return i.has_=function(r){return this.data_.has(r)},i.has=function(r){var a=this;if(!We.trackingDerivation)return this.has_(r);var l=this.hasMap_.get(r);if(!l){var s=l=new Ql(this.has_(r),Rp,"ObservableMap.key?",!1);this.hasMap_.set(r,s),gv(s,function(){return a.hasMap_.delete(r)})}return l.get()},i.set=function(r,a){var l=this.has_(r);if(ia(this)){var s=aa(this,{type:l?ho:Zl,object:this,newValue:a,name:r});if(!s)return this;a=s.newValue}return l?this.updateValue_(r,a):this.addValue_(r,a),this},i.delete=function(r){var a=this;if(this.keysAtom_,ia(this)){var l=aa(this,{type:_p,object:this,name:r});if(!l)return!1}if(this.has_(r)){var s=Ad(),c=Ma(this),f=c||s?{observableKind:"map",debugObjectName:this.name_,type:_p,object:this,oldValue:this.data_.get(r).value_,name:r}:null;return uo(function(){var E;a.keysAtom_.reportChanged(),(E=a.hasMap_.get(r))==null||E.setNewValue_(!1);var _=a.data_.get(r);_.setNewValue_(void 0),a.data_.delete(r)}),c&&La(this,f),!0}return!1},i.updateValue_=function(r,a){var l=this.data_.get(r);if(a=l.prepareNewValue_(a),a!==We.UNCHANGED){var s=Ad(),c=Ma(this),f=c||s?{observableKind:"map",debugObjectName:this.name_,type:ho,object:this,oldValue:l.value_,name:r,newValue:a}:null;l.setNewValue_(a),c&&La(this,f)}},i.addValue_=function(r,a){var l=this;this.keysAtom_,uo(function(){var E,_=new Ql(a,l.enhancer_,"ObservableMap.key",!1);l.data_.set(r,_),a=_.value_,(E=l.hasMap_.get(r))==null||E.setNewValue_(!0),l.keysAtom_.reportChanged()});var s=Ad(),c=Ma(this),f=c||s?{observableKind:"map",debugObjectName:this.name_,type:Zl,object:this,name:r,newValue:a}:null;c&&La(this,f)},i.get=function(r){return this.has(r)?this.dehanceValue_(this.data_.get(r).get()):this.dehanceValue_(void 0)},i.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},i.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},i.values=function(){var r=this,a=this.keys();return Vm({next:function(){var s=a.next(),c=s.done,f=s.value;return{done:c,value:c?void 0:r.get(f)}}})},i.entries=function(){var r=this,a=this.keys();return Vm({next:function(){var s=a.next(),c=s.done,f=s.value;return{done:c,value:c?void 0:[f,r.get(f)]}}})},i[Symbol.iterator]=function(){return this.entries()},i.forEach=function(r,a){for(var l=lc(this),s;!(s=l()).done;){var c=s.value,f=c[0],E=c[1];r.call(a,E,f,this)}},i.merge=function(r){var a=this;return Bn(r)&&(r=new Map(r)),uo(function(){il(r)?B_(r).forEach(function(l){return a.set(l,r[l])}):Array.isArray(r)?r.forEach(function(l){var s=l[0],c=l[1];return a.set(s,c)}):Sc(r)?(z_(r)||Rt(19,r),r.forEach(function(l,s){return a.set(s,l)})):r!=null&&Rt(20,r)}),this},i.clear=function(){var r=this;uo(function(){hv(function(){for(var a=lc(r.keys()),l;!(l=a()).done;){var s=l.value;r.delete(s)}})})},i.replace=function(r){var a=this;return uo(function(){for(var l=L8(r),s=new Map,c=!1,f=lc(a.data_.keys()),E;!(E=f()).done;){var _=E.value;if(!l.has(_)){var S=a.delete(_);if(S)c=!0;else{var w=a.data_.get(_);s.set(_,w)}}}for(var b=lc(l.entries()),y;!(y=b()).done;){var v=y.value,g=v[0],O=v[1],h=a.data_.has(g);if(a.set(g,O),a.data_.has(g)){var p=a.data_.get(g);s.set(g,p),h||(c=!0)}}if(!c)if(a.data_.size!==s.size)a.keysAtom_.reportChanged();else for(var m=a.data_.keys(),x=s.keys(),N=m.next(),T=x.next();!N.done;){if(N.value!==T.value){a.keysAtom_.reportChanged();break}N=m.next(),T=x.next()}a.data_=s}),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.observe_=function(r,a){return $d(this,r)},i.intercept_=function(r){return Vd(this,r)},Ec(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Bn=ns("ObservableMap",Bp);function Vm(e){return e[Symbol.toStringTag]="MapIterator",Pv(e)}function L8(e){if(Sc(e)||Bn(e))return e;if(Array.isArray(e))return new Map(e);if(il(e)){var i=new Map;for(var t in e)i.set(t,e[t]);return i}else return Rt(21,e)}var N8={},Ev=function(){function e(t,r,a){var l=this;r===void 0&&(r=Ks),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[gt]=N8,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_=a,Bi(Set)||Rt(22),this.enhancer_=function(s,c){return r(s,c,a)},as(function(){l.atom_=Md(l.name_),t&&l.replace(t)})}var i=e.prototype;return i.dehanceValue_=function(r){return this.dehancer!==void 0?this.dehancer(r):r},i.clear=function(){var r=this;uo(function(){hv(function(){for(var a=lc(r.data_.values()),l;!(l=a()).done;){var s=l.value;r.delete(s)}})})},i.forEach=function(r,a){for(var l=lc(this),s;!(s=l()).done;){var c=s.value;r.call(a,c,c,this)}},i.add=function(r){var a=this;if(this.atom_,ia(this)){var l=aa(this,{type:Zl,object:this,newValue:r});if(!l)return this}if(!this.has(r)){uo(function(){a.data_.add(a.enhancer_(r,void 0)),a.atom_.reportChanged()});var s=!1,c=Ma(this),f=c||s?{observableKind:"set",debugObjectName:this.name_,type:Zl,object:this,newValue:r}:null;c&&La(this,f)}return this},i.delete=function(r){var a=this;if(ia(this)){var l=aa(this,{type:_p,object:this,oldValue:r});if(!l)return!1}if(this.has(r)){var s=!1,c=Ma(this),f=c||s?{observableKind:"set",debugObjectName:this.name_,type:_p,object:this,oldValue:r}:null;return uo(function(){a.atom_.reportChanged(),a.data_.delete(r)}),c&&La(this,f),!0}return!1},i.has=function(r){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(r))},i.entries=function(){var r=this.values();return $m({next:function(){var l=r.next(),s=l.value,c=l.done;return c?{value:void 0,done:c}:{value:[s,s],done:c}}})},i.keys=function(){return this.values()},i.values=function(){this.atom_.reportObserved();var r=this,a=this.data_.values();return $m({next:function(){var s=a.next(),c=s.value,f=s.done;return f?{value:void 0,done:f}:{value:r.dehanceValue_(c),done:f}}})},i.intersection=function(r){if(el(r)&&!cn(r))return r.intersection(this);var a=new Set(this);return a.intersection(r)},i.union=function(r){if(el(r)&&!cn(r))return r.union(this);var a=new Set(this);return a.union(r)},i.difference=function(r){return new Set(this).difference(r)},i.symmetricDifference=function(r){if(el(r)&&!cn(r))return r.symmetricDifference(this);var a=new Set(this);return a.symmetricDifference(r)},i.isSubsetOf=function(r){return new Set(this).isSubsetOf(r)},i.isSupersetOf=function(r){return new Set(this).isSupersetOf(r)},i.isDisjointFrom=function(r){if(el(r)&&!cn(r))return r.isDisjointFrom(this);var a=new Set(this);return a.isDisjointFrom(r)},i.replace=function(r){var a=this;return cn(r)&&(r=new Set(r)),uo(function(){Array.isArray(r)?(a.clear(),r.forEach(function(l){return a.add(l)})):el(r)?(a.clear(),r.forEach(function(l){return a.add(l)})):r!=null&&Rt("Cannot initialize set from "+r)}),this},i.observe_=function(r,a){return $d(this,r)},i.intercept_=function(r){return Vd(this,r)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Symbol.iterator]=function(){return this.values()},Ec(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),cn=ns("ObservableSet",Ev);function $m(e){return e[Symbol.toStringTag]="SetIterator",Pv(e)}var Wm=Object.create(null),Ym="remove",sw=function(){function e(t,r,a,l){r===void 0&&(r=new Map),l===void 0&&(l=_6),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_=t,this.values_=r,this.name_=a,this.defaultAnnotation_=l,this.keysAtom_=new is("ObservableObject.keys"),this.isPlainObject_=il(this.target_)}var i=e.prototype;return i.getObservablePropValue_=function(r){return this.values_.get(r).get()},i.setObservablePropValue_=function(r,a){var l=this.values_.get(r);if(l instanceof Na)return l.set(a),!0;if(ia(this)){var s=aa(this,{type:ho,object:this.proxy_||this.target_,name:r,newValue:a});if(!s)return null;a=s.newValue}if(a=l.prepareNewValue_(a),a!==We.UNCHANGED){var c=Ma(this),f=!1,E=c||f?{type:ho,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:l.value_,name:r,newValue:a}:null;l.setNewValue_(a),c&&La(this,E)}return!0},i.get_=function(r){return We.trackingDerivation&&!tl(this.target_,r)&&this.has_(r),this.target_[r]},i.set_=function(r,a,l){return l===void 0&&(l=!1),tl(this.target_,r)?this.values_.has(r)?this.setObservablePropValue_(r,a):l?Reflect.set(this.target_,r,a):(this.target_[r]=a,!0):this.extend_(r,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,l)},i.has_=function(r){if(!We.trackingDerivation)return r in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(r);return a||(a=new Ql(r in this.target_,Rp,"ObservableObject.key?",!1),this.pendingKeys_.set(r,a)),a.get()},i.make_=function(r,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(r in this.target_)){var l;if((l=this.target_[co])!=null&&l[r])return;Rt(1,a.annotationType_,this.name_+"."+r.toString())}for(var s=this.target_;s&&s!==Bd;){var c=gp(s,r);if(c){var f=a.make_(this,r,c,s);if(f===0)return;if(f===1)break}s=Object.getPrototypeOf(s)}Xm(this,a,r)}},i.extend_=function(r,a,l,s){if(s===void 0&&(s=!1),l===!0&&(l=this.defaultAnnotation_),l===!1)return this.defineProperty_(r,a,s);var c=l.extend_(this,r,a,s);return c&&Xm(this,l,r),c},i.defineProperty_=function(r,a,l){l===void 0&&(l=!1),this.keysAtom_;try{_i();var s=this.delete_(r);if(!s)return s;if(ia(this)){var c=aa(this,{object:this.proxy_||this.target_,name:r,type:Zl,newValue:a.value});if(!c)return null;var f=c.newValue;a.value!==f&&(a=es({},a,{value:f}))}if(l){if(!Reflect.defineProperty(this.target_,r,a))return!1}else fo(this.target_,r,a);this.notifyPropertyAddition_(r,a.value)}finally{Si()}return!0},i.defineObservableProperty_=function(r,a,l,s){s===void 0&&(s=!1),this.keysAtom_;try{_i();var c=this.delete_(r);if(!c)return c;if(ia(this)){var f=aa(this,{object:this.proxy_||this.target_,name:r,type:Zl,newValue:a});if(!f)return null;a=f.newValue}var E=Km(r),_={configurable:We.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:E.get,set:E.set};if(s){if(!Reflect.defineProperty(this.target_,r,_))return!1}else fo(this.target_,r,_);var S=new Ql(a,l,"ObservableObject.key",!1);this.values_.set(r,S),this.notifyPropertyAddition_(r,S.value_)}finally{Si()}return!0},i.defineComputedProperty_=function(r,a,l){l===void 0&&(l=!1),this.keysAtom_;try{_i();var s=this.delete_(r);if(!s)return s;if(ia(this)){var c=aa(this,{object:this.proxy_||this.target_,name:r,type:Zl,newValue:void 0});if(!c)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var f=Km(r),E={configurable:We.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:f.get,set:f.set};if(l){if(!Reflect.defineProperty(this.target_,r,E))return!1}else fo(this.target_,r,E);this.values_.set(r,new Na(a)),this.notifyPropertyAddition_(r,void 0)}finally{Si()}return!0},i.delete_=function(r,a){if(a===void 0&&(a=!1),this.keysAtom_,!tl(this.target_,r))return!0;if(ia(this)){var l=aa(this,{object:this.proxy_||this.target_,name:r,type:Ym});if(!l)return null}try{var s;_i();var c=Ma(this),f=!1,E=this.values_.get(r),_=void 0;if(!E&&(c||f)){var S;_=(S=gp(this.target_,r))==null?void 0:S.value}if(a){if(!Reflect.deleteProperty(this.target_,r))return!1}else delete this.target_[r];if(E&&(this.values_.delete(r),E instanceof Ql&&(_=E.value_),F5(E)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(s=s.get(r))==null||s.set(r in this.target_),c||f){var w={type:Ym,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:_,name:r};c&&La(this,w)}}finally{Si()}return!0},i.observe_=function(r,a){return $d(this,r)},i.intercept_=function(r){return Vd(this,r)},i.notifyPropertyAddition_=function(r,a){var l,s=Ma(this),c=!1;if(s||c){var f=s||c?{type:Zl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:r,newValue:a}:null;s&&La(this,f)}(l=this.pendingKeys_)==null||(l=l.get(r))==null||l.set(!0),this.keysAtom_.reportChanged()},i.ownKeys_=function(){return this.keysAtom_.reportObserved(),fc(this.target_)},i.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function eu(e,i){var t;if(tl(e,gt))return e;var r=(t=i==null?void 0:i.name)!=null?t:"ObservableObject",a=new sw(e,new Map,String(r),M6(i));return Ud(e,gt,a),e}var I8=ns("ObservableObjectAdministration",sw);function Km(e){return Wm[e]||(Wm[e]={get:function(){return this[gt].getObservablePropValue_(e)},set:function(t){return this[gt].setObservablePropValue_(e,t)}})}function xn(e){return Tp(e)?I8(e[gt]):!1}function Xm(e,i,t){var r;(r=e.target_[co])==null||delete r[t]}var j8=cw(0),D8=function(){var e=!1,i={};return Object.defineProperty(i,"0",{set:function(){e=!0}}),Object.create(i)[0]=1,e===!1}(),Ig=0,uw=function(){};function F8(e,i){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,i):e.prototype.__proto__!==void 0?e.prototype.__proto__=i:e.prototype=i}F8(uw,Array.prototype);var xv=function(e){function i(r,a,l,s){var c;return l===void 0&&(l="ObservableArray"),s===void 0&&(s=!1),c=e.call(this)||this,as(function(){var f=new Sv(l,a,s,!0);f.proxy_=c,g5(c,gt,f),r&&r.length&&c.spliceWithArray(0,0,r),D8&&Object.defineProperty(c,"0",j8)}),c}y5(i,e);var t=i.prototype;return t.concat=function(){this[gt].atom_.reportObserved();for(var a=arguments.length,l=new Array(a),s=0;s<a;s++)l[s]=arguments[s];return Array.prototype.concat.apply(this.slice(),l.map(function(c){return si(c)?c.slice():c}))},t[Symbol.iterator]=function(){var r=this,a=0;return Pv({next:function(){return a<r.length?{value:r[a++],done:!1}:{done:!0,value:void 0}}})},Ec(i,[{key:"length",get:function(){return this[gt].getArrayLength_()},set:function(a){this[gt].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(uw);Object.entries(wp).forEach(function(e){var i=e[0],t=e[1];i!=="concat"&&Ud(xv.prototype,i,t)});function cw(e){return{enumerable:!1,configurable:!0,get:function(){return this[gt].get_(e)},set:function(t){this[gt].set_(e,t)}}}function z8(e){fo(xv.prototype,""+e,cw(e))}function fw(e){if(e>Ig){for(var i=Ig;i<e+100;i++)z8(i);Ig=e}}fw(1e3);function B8(e,i,t){return new xv(e,i,t)}function po(e,i){if(typeof e=="object"&&e!==null){if(si(e))return i!==void 0&&Rt(23),e[gt].atom_;if(cn(e))return e.atom_;if(Bn(e)){if(i===void 0)return e.keysAtom_;var t=e.data_.get(i)||e.hasMap_.get(i);return t||Rt(25,i,Sp(e)),t}if(xn(e)){if(!i)return Rt(26);var r=e[gt].values_.get(i);return r||Rt(27,i,Sp(e)),r}if(uv(e)||Xs(e)||bp(e))return e}else if(Bi(e)&&bp(e[gt]))return e[gt];Rt(28)}function ja(e,i){if(e||Rt(29),i!==void 0)return ja(po(e,i));if(uv(e)||Xs(e)||bp(e)||Bn(e)||cn(e))return e;if(e[gt])return e[gt];Rt(24,e)}function Sp(e,i){var t;if(i!==void 0)t=po(e,i);else{if(pc(e))return e.name;xn(e)||Bn(e)||cn(e)?t=ja(e):t=po(e)}return t.name_}function as(e){var i=Js(),t=Lp(!0);_i();try{return e()}finally{Si(),Np(t),rl(i)}}var Zm=Bd.toString;function Ov(e,i,t){return t===void 0&&(t=-1),rv(e,i,t)}function rv(e,i,t,r,a){if(e===i)return e!==0||1/e===1/i;if(e==null||i==null)return!1;if(e!==e)return i!==i;var l=typeof e;if(l!=="function"&&l!=="object"&&typeof i!="object")return!1;var s=Zm.call(e);if(s!==Zm.call(i))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+i;case"[object Number]":return+e!=+e?+i!=+i:+e==0?1/+e===1/i:+e==+i;case"[object Date]":case"[object Boolean]":return+e==+i;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(i);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=Qm(e),i=Qm(i);var c=s==="[object Array]";if(!c){if(typeof e!="object"||typeof i!="object")return!1;var f=e.constructor,E=i.constructor;if(f!==E&&!(Bi(f)&&f instanceof f&&Bi(E)&&E instanceof E)&&"constructor"in e&&"constructor"in i)return!1}if(t===0)return!1;t<0&&(t=-1),r=r||[],a=a||[];for(var _=r.length;_--;)if(r[_]===e)return a[_]===i;if(r.push(e),a.push(i),c){if(_=e.length,_!==i.length)return!1;for(;_--;)if(!rv(e[_],i[_],t-1,r,a))return!1}else{var S=Object.keys(e),w;if(_=S.length,Object.keys(i).length!==_)return!1;for(;_--;)if(w=S[_],!(tl(i,w)&&rv(e[w],i[w],t-1,r,a)))return!1}return r.pop(),a.pop(),!0}function Qm(e){return si(e)?e.slice():Sc(e)||Bn(e)||el(e)||cn(e)?Array.from(e.entries()):e}var Jm,U8=((Jm=Ap().Iterator)==null?void 0:Jm.prototype)||{};function Pv(e){return e[Symbol.iterator]=q8,Object.assign(Object.create(U8),e)}function q8(){return this}["Symbol","Map","Set"].forEach(function(e){var i=Ap();typeof i[e]>"u"&&Rt("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:B5,extras:{getDebugName:Sp},$mobx:gt});const H8=Object.freeze(Object.defineProperty({__proto__:null,$mobx:gt,FlowCancellationError:jp,ObservableMap:Bp,ObservableSet:Ev,Reaction:Ia,_allowStateChanges:fv,_allowStateChangesInsideComputed:hc,_allowStateReadsEnd:uc,_allowStateReadsStart:Ip,_autoAction:dc,_endAction:T5,_getAdministration:ja,_getGlobalState:N5,_interceptReads:mv,_isComputingDerivation:z6,_resetGlobalState:H6,_startAction:A5,action:tn,autorun:pv,comparer:Ys,computed:Qs,configure:K5,createAtom:Md,defineProperty:wv,entries:nw,extendObservable:vv,flow:Zs,flowResult:p8,get:b8,getAtom:po,getDebugName:Sp,getDependencyTree:X5,getObserverTree:u8,has:iw,intercept:Dp,isAction:pc,isBoxedObservable:dv,isComputed:m8,isComputedProp:ew,isFlow:gc,isFlowCancellationError:d8,isObservable:Fp,isObservableArray:si,isObservableMap:Bn,isObservableObject:xn,isObservableProp:rw,isObservableSet:cn,keys:Ld,makeAutoObservable:C8,makeObservable:_v,observable:dr,observe:zp,onBecomeObserved:W5,onBecomeUnobserved:gv,onReactionError:K6,override:J_,ownKeys:aw,reaction:$5,remove:y8,runInAction:hc,set:bv,spy:B5,toJS:S8,trace:E8,transaction:uo,untracked:hv,values:yv,when:tv},Symbol.toStringTag,{value:"Module"}));if(!Or.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!_v)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var G8=u5();function V8(e){e()}function dw(e){e||(e=V8),K5({reactionScheduler:e})}var $8=function(){return!0};function W8(e){return X5(e)}var hw=!1;function pw(e){hw=e}function Cv(){return hw}var Y8=1e4,K8=1e4,X8=function(){function e(i){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=Y8),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var a=Date.now();t.registrations.forEach(function(l,s){a-l.registeredAt>=r&&(t.finalize(l.value),t.registrations.delete(s))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,r){this.registrations.set(r,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.registrations.delete(i)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,K8))}}),e}(),Z8=typeof FinalizationRegistry<"u"?FinalizationRegistry:X8,Ep=new Z8(function(e){var i;(i=e.reaction)===null||i===void 0||i.dispose(),e.reaction=null}),jg={exports:{}},Dg={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var ey;function Q8(){if(ey)return Dg;ey=1;var e=Ar();function i(S,w){return S===w&&(S!==0||1/S===1/w)||S!==S&&w!==w}var t=typeof Object.is=="function"?Object.is:i,r=e.useState,a=e.useEffect,l=e.useLayoutEffect,s=e.useDebugValue;function c(S,w){var b=w(),y=r({inst:{value:b,getSnapshot:w}}),v=y[0].inst,g=y[1];return l(function(){v.value=b,v.getSnapshot=w,f(v)&&g({inst:v})},[S,b,w]),a(function(){return f(v)&&g({inst:v}),S(function(){f(v)&&g({inst:v})})},[S]),s(b),b}function f(S){var w=S.getSnapshot;S=S.value;try{var b=w();return!t(S,b)}catch{return!0}}function E(S,w){return w()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?E:c;return Dg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,Dg}var ty;function J8(){return ty||(ty=1,jg.exports=Q8()),jg.exports}var e9=J8();function ry(e){e.reaction=new Ia("observer".concat(e.name),function(){var i;e.stateVersion=Symbol(),(i=e.onStoreChange)===null||i===void 0||i.call(e)})}function kv(e,i){if(i===void 0&&(i="observed"),Cv())return e();var t=Gt.useRef(null);if(!t.current){var r={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:i,subscribe:function(c){return Ep.unregister(r),r.onStoreChange=c,r.reaction||(ry(r),r.stateVersion=Symbol()),function(){var f;r.onStoreChange=null,(f=r.reaction)===null||f===void 0||f.dispose(),r.reaction=null}},getSnapshot:function(){return r.stateVersion}};t.current=r}var a=t.current;a.reaction||(ry(a),Ep.register(t,a,a)),Gt.useDebugValue(a.reaction,W8),e9.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);var l,s;if(a.reaction.track(function(){try{l=e()}catch(c){s=c}}),s)throw s;return l}var Fg,zg,gw=typeof Symbol=="function"&&Symbol.for,t9=(zg=(Fg=Object.getOwnPropertyDescriptor(function(){},"name"))===null||Fg===void 0?void 0:Fg.configurable)!==null&&zg!==void 0?zg:!1,ny=gw?Symbol.for("react.forward_ref"):typeof Or.forwardRef=="function"&&Or.forwardRef(function(e){return null}).$$typeof,iy=gw?Symbol.for("react.memo"):typeof Or.memo=="function"&&Or.memo(function(e){return null}).$$typeof;function r9(e,i){var t;if(iy&&e.$$typeof===iy)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(Cv())return e;var r=(t=i==null?void 0:i.forwardRef)!==null&&t!==void 0?t:!1,a=e,l=e.displayName||e.name;if(ny&&e.$$typeof===ny&&(r=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var s=function(c,f){return kv(function(){return a(c,f)},l)};return s.displayName=e.displayName,t9&&Object.defineProperty(s,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(s.contextTypes=e.contextTypes),r&&(s=Or.forwardRef(s)),s=Or.memo(s),i9(e,s),s}var n9={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function i9(e,i){Object.keys(e).forEach(function(t){n9[t]||Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})}function vw(e){var i=e.children,t=e.render;i&&t&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var r=i||t;return typeof r!="function"?null:kv(r)}vw.displayName="Observer";function a9(e,i){return Or.useState(function(){return dr(e(),i,{autoBind:!0})})[0]}function mw(e){var i=Or.useState(function(){return dr(e,{},{deep:!1})})[0];return hc(function(){Object.assign(i,e)}),i}function o9(e,i){var t=i&&mw(i);return Or.useState(function(){return dr(e(t),void 0,{autoBind:!0})})[0]}var Bg;dw(G8.unstable_batchedUpdates);var l9=(Bg=Ep.finalizeAllImmediately)!==null&&Bg!==void 0?Bg:function(){};function s9(e,i){return i===void 0&&(i="observed"),kv(e,i)}function u9(e){pw(e)}const c9=Object.freeze(Object.defineProperty({__proto__:null,Observer:vw,_observerFinalizationRegistry:Ep,clearTimers:l9,enableStaticRendering:pw,isObserverBatched:$8,isUsingStaticRendering:Cv,observer:r9,observerBatching:dw,useAsObservableSource:mw,useLocalObservable:a9,useLocalStore:o9,useObserver:s9,useStaticRendering:u9},Symbol.toStringTag,{value:"Module"})),qi=rs(c9);var Us={};const oa=rs(H8);var fp={exports:{}},Sf={},Ug={},qg={},ay;function Nt(){return ay||(ay=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const i=Math.PI/180;function t(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof cc<"u"?cc:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.18",isBrowser:t(),isUnminified:/param/.test((function(a){}).toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*i:a},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,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const r=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=r,e.Konva._injectGlobal(e.Konva)}(qg)),qg}var Hg={},oy;function zr(){return oy||(oy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const i=Nt();class t{constructor(m=[1,0,0,1,0,0]){this.dirty=!1,this.m=m&&m.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(m){m.m[0]=this.m[0],m.m[1]=this.m[1],m.m[2]=this.m[2],m.m[3]=this.m[3],m.m[4]=this.m[4],m.m[5]=this.m[5]}point(m){const x=this.m;return{x:x[0]*m.x+x[2]*m.y+x[4],y:x[1]*m.x+x[3]*m.y+x[5]}}translate(m,x){return this.m[4]+=this.m[0]*m+this.m[2]*x,this.m[5]+=this.m[1]*m+this.m[3]*x,this}scale(m,x){return this.m[0]*=m,this.m[1]*=m,this.m[2]*=x,this.m[3]*=x,this}rotate(m){const x=Math.cos(m),N=Math.sin(m),T=this.m[0]*x+this.m[2]*N,I=this.m[1]*x+this.m[3]*N,R=this.m[0]*-N+this.m[2]*x,C=this.m[1]*-N+this.m[3]*x;return this.m[0]=T,this.m[1]=I,this.m[2]=R,this.m[3]=C,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(m,x){const N=this.m[0]+this.m[2]*x,T=this.m[1]+this.m[3]*x,I=this.m[2]+this.m[0]*m,R=this.m[3]+this.m[1]*m;return this.m[0]=N,this.m[1]=T,this.m[2]=I,this.m[3]=R,this}multiply(m){const x=this.m[0]*m.m[0]+this.m[2]*m.m[1],N=this.m[1]*m.m[0]+this.m[3]*m.m[1],T=this.m[0]*m.m[2]+this.m[2]*m.m[3],I=this.m[1]*m.m[2]+this.m[3]*m.m[3],R=this.m[0]*m.m[4]+this.m[2]*m.m[5]+this.m[4],C=this.m[1]*m.m[4]+this.m[3]*m.m[5]+this.m[5];return this.m[0]=x,this.m[1]=N,this.m[2]=T,this.m[3]=I,this.m[4]=R,this.m[5]=C,this}invert(){const m=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),x=this.m[3]*m,N=-this.m[1]*m,T=-this.m[2]*m,I=this.m[0]*m,R=m*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),C=m*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=x,this.m[1]=N,this.m[2]=T,this.m[3]=I,this.m[4]=R,this.m[5]=C,this}getMatrix(){return this.m}decompose(){const m=this.m[0],x=this.m[1],N=this.m[2],T=this.m[3],I=this.m[4],R=this.m[5],C=m*T-x*N,M={x:I,y:R,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(m!=0||x!=0){const k=Math.sqrt(m*m+x*x);M.rotation=x>0?Math.acos(m/k):-Math.acos(m/k),M.scaleX=k,M.scaleY=C/k,M.skewX=(m*N+x*T)/C,M.skewY=0}else if(N!=0||T!=0){const k=Math.sqrt(N*N+T*T);M.rotation=Math.PI/2-(T>0?Math.acos(-N/k):-Math.acos(N/k)),M.scaleX=C/k,M.scaleY=k,M.skewX=0,M.skewY=(m*N+x*T)/C}return M.rotation=e.Util._getRotation(M.rotation),M}}e.Transform=t;const r="[object Array]",a="[object Number]",l="[object String]",s="[object Boolean]",c=Math.PI/180,f=180/Math.PI,E="#",_="",S="0",w="Konva warning: ",b="Konva error: ",y="rgb(",v={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]},g=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let O=[];const h=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(p){setTimeout(p,60)};e.Util={_isElement(p){return!!(p&&p.nodeType==1)},_isFunction(p){return!!(p&&p.constructor&&p.call&&p.apply)},_isPlainObject(p){return!!p&&p.constructor===Object},_isArray(p){return Object.prototype.toString.call(p)===r},_isNumber(p){return Object.prototype.toString.call(p)===a&&!isNaN(p)&&isFinite(p)},_isString(p){return Object.prototype.toString.call(p)===l},_isBoolean(p){return Object.prototype.toString.call(p)===s},isObject(p){return p instanceof Object},isValidSelector(p){if(typeof p!="string")return!1;const m=p[0];return m==="#"||m==="."||m===m.toUpperCase()},_sign(p){return p===0||p>0?1:-1},requestAnimFrame(p){O.push(p),O.length===1&&h(function(){const m=O;O=[],m.forEach(function(x){x()})})},createCanvasElement(){const p=document.createElement("canvas");try{p.style=p.style||{}}catch{}return p},createImageElement(){return document.createElement("img")},_isInDocument(p){for(;p=p.parentNode;)if(p==document)return!0;return!1},_urlToImage(p,m){const x=e.Util.createImageElement();x.onload=function(){m(x)},x.src=p},_rgbToHex(p,m,x){return((1<<24)+(p<<16)+(m<<8)+x).toString(16).slice(1)},_hexToRgb(p){p=p.replace(E,_);const m=parseInt(p,16);return{r:m>>16&255,g:m>>8&255,b:m&255}},getRandomColor(){let p=(Math.random()*16777215<<0).toString(16);for(;p.length<6;)p=S+p;return E+p},getRGB(p){let m;return p in v?(m=v[p],{r:m[0],g:m[1],b:m[2]}):p[0]===E?this._hexToRgb(p.substring(1)):p.substr(0,4)===y?(m=g.exec(p.replace(/ /g,"")),{r:parseInt(m[1],10),g:parseInt(m[2],10),b:parseInt(m[3],10)}):{r:0,g:0,b:0}},colorToRGBA(p){return p=p||"black",e.Util._namedColorToRBA(p)||e.Util._hex3ColorToRGBA(p)||e.Util._hex4ColorToRGBA(p)||e.Util._hex6ColorToRGBA(p)||e.Util._hex8ColorToRGBA(p)||e.Util._rgbColorToRGBA(p)||e.Util._rgbaColorToRGBA(p)||e.Util._hslColorToRGBA(p)},_namedColorToRBA(p){const m=v[p.toLowerCase()];return m?{r:m[0],g:m[1],b:m[2],a:1}:null},_rgbColorToRGBA(p){if(p.indexOf("rgb(")===0){p=p.match(/rgb\(([^)]+)\)/)[1];const m=p.split(/ *, */).map(Number);return{r:m[0],g:m[1],b:m[2],a:1}}},_rgbaColorToRGBA(p){if(p.indexOf("rgba(")===0){p=p.match(/rgba\(([^)]+)\)/)[1];const m=p.split(/ *, */).map((x,N)=>x.slice(-1)==="%"?N===3?parseInt(x)/100:parseInt(x)/100*255:Number(x));return{r:m[0],g:m[1],b:m[2],a:m[3]}}},_hex8ColorToRGBA(p){if(p[0]==="#"&&p.length===9)return{r:parseInt(p.slice(1,3),16),g:parseInt(p.slice(3,5),16),b:parseInt(p.slice(5,7),16),a:parseInt(p.slice(7,9),16)/255}},_hex6ColorToRGBA(p){if(p[0]==="#"&&p.length===7)return{r:parseInt(p.slice(1,3),16),g:parseInt(p.slice(3,5),16),b:parseInt(p.slice(5,7),16),a:1}},_hex4ColorToRGBA(p){if(p[0]==="#"&&p.length===5)return{r:parseInt(p[1]+p[1],16),g:parseInt(p[2]+p[2],16),b:parseInt(p[3]+p[3],16),a:parseInt(p[4]+p[4],16)/255}},_hex3ColorToRGBA(p){if(p[0]==="#"&&p.length===4)return{r:parseInt(p[1]+p[1],16),g:parseInt(p[2]+p[2],16),b:parseInt(p[3]+p[3],16),a:1}},_hslColorToRGBA(p){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(p)){const[m,...x]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(p),N=Number(x[0])/360,T=Number(x[1])/100,I=Number(x[2])/100;let R,C,M;if(T===0)return M=I*255,{r:Math.round(M),g:Math.round(M),b:Math.round(M),a:1};I<.5?R=I*(1+T):R=I+T-I*T;const k=2*I-R,A=[0,0,0];for(let L=0;L<3;L++)C=N+1/3*-(L-1),C<0&&C++,C>1&&C--,6*C<1?M=k+(R-k)*6*C:2*C<1?M=R:3*C<2?M=k+(R-k)*(2/3-C)*6:M=k,A[L]=M*255;return{r:Math.round(A[0]),g:Math.round(A[1]),b:Math.round(A[2]),a:1}}},haveIntersection(p,m){return!(m.x>p.x+p.width||m.x+m.width<p.x||m.y>p.y+p.height||m.y+m.height<p.y)},cloneObject(p){const m={};for(const x in p)this._isPlainObject(p[x])?m[x]=this.cloneObject(p[x]):this._isArray(p[x])?m[x]=this.cloneArray(p[x]):m[x]=p[x];return m},cloneArray(p){return p.slice(0)},degToRad(p){return p*c},radToDeg(p){return p*f},_degToRad(p){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(p)},_radToDeg(p){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(p)},_getRotation(p){return i.Konva.angleDeg?e.Util.radToDeg(p):p},_capitalize(p){return p.charAt(0).toUpperCase()+p.slice(1)},throw(p){throw new Error(b+p)},error(p){console.error(b+p)},warn(p){i.Konva.showWarnings&&console.warn(w+p)},each(p,m){for(const x in p)m(x,p[x])},_inRange(p,m,x){return m<=p&&p<x},_getProjectionToSegment(p,m,x,N,T,I){let R,C,M;const k=(p-x)*(p-x)+(m-N)*(m-N);if(k==0)R=p,C=m,M=(T-x)*(T-x)+(I-N)*(I-N);else{const A=((T-p)*(x-p)+(I-m)*(N-m))/k;A<0?(R=p,C=m,M=(p-T)*(p-T)+(m-I)*(m-I)):A>1?(R=x,C=N,M=(x-T)*(x-T)+(N-I)*(N-I)):(R=p+A*(x-p),C=m+A*(N-m),M=(R-T)*(R-T)+(C-I)*(C-I))}return[R,C,M]},_getProjectionToLine(p,m,x){const N=e.Util.cloneObject(p);let T=Number.MAX_VALUE;return m.forEach(function(I,R){if(!x&&R===m.length-1)return;const C=m[(R+1)%m.length],M=e.Util._getProjectionToSegment(I.x,I.y,C.x,C.y,p.x,p.y),k=M[0],A=M[1],L=M[2];L<T&&(N.x=k,N.y=A,T=L)}),N},_prepareArrayForTween(p,m,x){const N=[],T=[];if(p.length>m.length){const R=m;m=p,p=R}for(let R=0;R<p.length;R+=2)N.push({x:p[R],y:p[R+1]});for(let R=0;R<m.length;R+=2)T.push({x:m[R],y:m[R+1]});const I=[];return T.forEach(function(R){const C=e.Util._getProjectionToLine(R,N,x);I.push(C.x),I.push(C.y)}),I},_prepareToStringify(p){let m;p.visitedByCircularReferenceRemoval=!0;for(const x in p)if(p.hasOwnProperty(x)&&p[x]&&typeof p[x]=="object"){if(m=Object.getOwnPropertyDescriptor(p,x),p[x].visitedByCircularReferenceRemoval||e.Util._isElement(p[x]))if(m.configurable)delete p[x];else return null;else if(e.Util._prepareToStringify(p[x])===null)if(m.configurable)delete p[x];else return null}return delete p.visitedByCircularReferenceRemoval,p},_assign(p,m){for(const x in m)p[x]=m[x];return p},_getFirstPointerId(p){return p.touches?p.changedTouches[0].identifier:p.pointerId||999},releaseCanvas(...p){i.Konva.releaseCanvasOnDestroy&&p.forEach(m=>{m.width=0,m.height=0})},drawRoundedRectPath(p,m,x,N){let T=0,I=0,R=0,C=0;typeof N=="number"?T=I=R=C=Math.min(N,m/2,x/2):(T=Math.min(N[0]||0,m/2,x/2),I=Math.min(N[1]||0,m/2,x/2),C=Math.min(N[2]||0,m/2,x/2),R=Math.min(N[3]||0,m/2,x/2)),p.moveTo(T,0),p.lineTo(m-I,0),p.arc(m-I,I,I,Math.PI*3/2,0,!1),p.lineTo(m,x-C),p.arc(m-C,x-C,C,0,Math.PI/2,!1),p.lineTo(R,x),p.arc(R,x-R,R,Math.PI/2,Math.PI,!1),p.lineTo(0,T),p.arc(T,T,T,Math.PI,Math.PI*3/2,!1)}}}(Hg)),Hg}var Ef={},Gg={},wi={},ly;function Ut(){if(ly)return wi;ly=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.RGBComponent=r,wi.alphaComponent=a,wi.getNumberValidator=l,wi.getNumberOrArrayOfNumbersValidator=s,wi.getNumberOrAutoValidator=c,wi.getStringValidator=f,wi.getStringOrGradientValidator=E,wi.getFunctionValidator=_,wi.getNumberArrayValidator=S,wi.getBooleanValidator=w,wi.getComponentValidator=b;const e=Nt(),i=zr();function t(y){return i.Util._isString(y)?'"'+y+'"':Object.prototype.toString.call(y)==="[object Number]"||i.Util._isBoolean(y)?y:Object.prototype.toString.call(y)}function r(y){return y>255?255:y<0?0:Math.round(y)}function a(y){return y>1?1:y<1e-4?1e-4:y}function l(){if(e.Konva.isUnminified)return function(y,v){return i.Util._isNumber(y)||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a number.'),y}}function s(y){if(e.Konva.isUnminified)return function(v,g){let O=i.Util._isNumber(v),h=i.Util._isArray(v)&&v.length==y;return!O&&!h&&i.Util.warn(t(v)+' is a not valid value for "'+g+'" attribute. The value should be a number or Array<number>('+y+")"),v}}function c(){if(e.Konva.isUnminified)return function(y,v){var g=i.Util._isNumber(y),O=y==="auto";return g||O||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a number or "auto".'),y}}function f(){if(e.Konva.isUnminified)return function(y,v){return i.Util._isString(y)||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a string.'),y}}function E(){if(e.Konva.isUnminified)return function(y,v){const g=i.Util._isString(y),O=Object.prototype.toString.call(y)==="[object CanvasGradient]"||y&&y.addColorStop;return g||O||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a string or a native gradient.'),y}}function _(){if(e.Konva.isUnminified)return function(y,v){return i.Util._isFunction(y)||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a function.'),y}}function S(){if(e.Konva.isUnminified)return function(y,v){const g=Int8Array?Object.getPrototypeOf(Int8Array):null;return g&&y instanceof g||(i.Util._isArray(y)?y.forEach(function(O){i.Util._isNumber(O)||i.Util.warn('"'+v+'" attribute has non numeric element '+O+". Make sure that all elements are numbers.")}):i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a array of numbers.')),y}}function w(){if(e.Konva.isUnminified)return function(y,v){var g=y===!0||y===!1;return g||i.Util.warn(t(y)+' is a not valid value for "'+v+'" attribute. The value should be a boolean.'),y}}function b(y){if(e.Konva.isUnminified)return function(v,g){return v==null||i.Util.isObject(v)||i.Util.warn(t(v)+' is a not valid value for "'+g+'" attribute. The value should be an object with properties '+y),v}}return wi}var sy;function Ft(){return sy||(sy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const i=zr(),t=Ut(),r="get",a="set";e.Factory={addGetterSetter(l,s,c,f,E){e.Factory.addGetter(l,s,c),e.Factory.addSetter(l,s,f,E),e.Factory.addOverloadedGetterSetter(l,s)},addGetter(l,s,c){var f=r+i.Util._capitalize(s);l.prototype[f]=l.prototype[f]||function(){const E=this.attrs[s];return E===void 0?c:E}},addSetter(l,s,c,f){var E=a+i.Util._capitalize(s);l.prototype[E]||e.Factory.overWriteSetter(l,s,c,f)},overWriteSetter(l,s,c,f){var E=a+i.Util._capitalize(s);l.prototype[E]=function(_){return c&&_!==void 0&&_!==null&&(_=c.call(this,_,s)),this._setAttr(s,_),f&&f.call(this),this}},addComponentsGetterSetter(l,s,c,f,E){const _=c.length,S=i.Util._capitalize,w=r+S(s),b=a+S(s);l.prototype[w]=function(){const v={};for(let g=0;g<_;g++){const O=c[g];v[O]=this.getAttr(s+S(O))}return v};const y=(0,t.getComponentValidator)(c);l.prototype[b]=function(v){const g=this.attrs[s];f&&(v=f.call(this,v,s)),y&&y.call(this,v,s);for(const O in v)v.hasOwnProperty(O)&&this._setAttr(s+S(O),v[O]);return v||c.forEach(O=>{this._setAttr(s+S(O),void 0)}),this._fireChangeEvent(s,g,v),E&&E.call(this),this},e.Factory.addOverloadedGetterSetter(l,s)},addOverloadedGetterSetter(l,s){var c=i.Util._capitalize(s),f=a+c,E=r+c;l.prototype[s]=function(){return arguments.length?(this[f](arguments[0]),this):this[E]()}},addDeprecatedGetterSetter(l,s,c,f){i.Util.error("Adding deprecated "+s);const E=r+i.Util._capitalize(s),_=s+" property is deprecated and will be removed soon. Look at Konva change log for more information.";l.prototype[E]=function(){i.Util.error(_);const S=this.attrs[s];return S===void 0?c:S},e.Factory.addSetter(l,s,f,function(){i.Util.error(_)}),e.Factory.addOverloadedGetterSetter(l,s)},backCompat(l,s){i.Util.each(s,function(c,f){const E=l.prototype[f],_=r+i.Util._capitalize(c),S=a+i.Util._capitalize(c);function w(){E.apply(this,arguments),i.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+f+'" instead.')}l.prototype[c]=w,l.prototype[_]=w,l.prototype[S]=w})},afterSetFilter(){this._filterUpToDate=!1}}}(Gg)),Gg}var $o={},Wo={},uy;function yw(){if(uy)return Wo;uy=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.HitContext=Wo.SceneContext=Wo.Context=void 0;const e=zr(),i=Nt();function t(O){const h=[],p=O.length,m=e.Util;for(let x=0;x<p;x++){let N=O[x];m._isNumber(N)?N=Math.round(N*1e3)/1e3:m._isString(N)||(N=N+""),h.push(N)}return h}const r=",",a="(",l=")",s="([",c="])",f=";",E="()",_="=",S=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],w=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],b=100;let y=class{constructor(h){this.canvas=h,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(h){h.fillEnabled()&&this._fill(h)}_fill(h){}strokeShape(h){h.hasStroke()&&this._stroke(h)}_stroke(h){}fillStrokeShape(h){h.attrs.fillAfterStrokeEnabled?(this.strokeShape(h),this.fillShape(h)):(this.fillShape(h),this.strokeShape(h))}getTrace(h,p){let m=this.traceArr,x=m.length,N="",T,I,R,C;for(T=0;T<x;T++)I=m[T],R=I.method,R?(C=I.args,N+=R,h?N+=E:e.Util._isArray(C[0])?N+=s+C.join(r)+c:(p&&(C=C.map(M=>typeof M=="number"?Math.floor(M):M)),N+=a+C.join(r)+l)):(N+=I.property,h||(N+=_+I.val)),N+=f;return N}clearTrace(){this.traceArr=[]}_trace(h){let p=this.traceArr,m;p.push(h),m=p.length,m>=b&&p.shift()}reset(){const h=this.getCanvas().getPixelRatio();this.setTransform(1*h,0,0,1*h,0,0)}getCanvas(){return this.canvas}clear(h){const p=this.getCanvas();h?this.clearRect(h.x||0,h.y||0,h.width||0,h.height||0):this.clearRect(0,0,p.getWidth()/p.pixelRatio,p.getHeight()/p.pixelRatio)}_applyLineCap(h){const p=h.attrs.lineCap;p&&this.setAttr("lineCap",p)}_applyOpacity(h){const p=h.getAbsoluteOpacity();p!==1&&this.setAttr("globalAlpha",p)}_applyLineJoin(h){const p=h.attrs.lineJoin;p&&this.setAttr("lineJoin",p)}setAttr(h,p){this._context[h]=p}arc(h,p,m,x,N,T){this._context.arc(h,p,m,x,N,T)}arcTo(h,p,m,x,N){this._context.arcTo(h,p,m,x,N)}beginPath(){this._context.beginPath()}bezierCurveTo(h,p,m,x,N,T){this._context.bezierCurveTo(h,p,m,x,N,T)}clearRect(h,p,m,x){this._context.clearRect(h,p,m,x)}clip(...h){this._context.clip.apply(this._context,h)}closePath(){this._context.closePath()}createImageData(h,p){const m=arguments;if(m.length===2)return this._context.createImageData(h,p);if(m.length===1)return this._context.createImageData(h)}createLinearGradient(h,p,m,x){return this._context.createLinearGradient(h,p,m,x)}createPattern(h,p){return this._context.createPattern(h,p)}createRadialGradient(h,p,m,x,N,T){return this._context.createRadialGradient(h,p,m,x,N,T)}drawImage(h,p,m,x,N,T,I,R,C){const M=arguments,k=this._context;M.length===3?k.drawImage(h,p,m):M.length===5?k.drawImage(h,p,m,x,N):M.length===9&&k.drawImage(h,p,m,x,N,T,I,R,C)}ellipse(h,p,m,x,N,T,I,R){this._context.ellipse(h,p,m,x,N,T,I,R)}isPointInPath(h,p,m,x){return m?this._context.isPointInPath(m,h,p,x):this._context.isPointInPath(h,p,x)}fill(...h){this._context.fill.apply(this._context,h)}fillRect(h,p,m,x){this._context.fillRect(h,p,m,x)}strokeRect(h,p,m,x){this._context.strokeRect(h,p,m,x)}fillText(h,p,m,x){x?this._context.fillText(h,p,m,x):this._context.fillText(h,p,m)}measureText(h){return this._context.measureText(h)}getImageData(h,p,m,x){return this._context.getImageData(h,p,m,x)}lineTo(h,p){this._context.lineTo(h,p)}moveTo(h,p){this._context.moveTo(h,p)}rect(h,p,m,x){this._context.rect(h,p,m,x)}roundRect(h,p,m,x,N){this._context.roundRect(h,p,m,x,N)}putImageData(h,p,m){this._context.putImageData(h,p,m)}quadraticCurveTo(h,p,m,x){this._context.quadraticCurveTo(h,p,m,x)}restore(){this._context.restore()}rotate(h){this._context.rotate(h)}save(){this._context.save()}scale(h,p){this._context.scale(h,p)}setLineDash(h){this._context.setLineDash?this._context.setLineDash(h):"mozDash"in this._context?this._context.mozDash=h:"webkitLineDash"in this._context&&(this._context.webkitLineDash=h)}getLineDash(){return this._context.getLineDash()}setTransform(h,p,m,x,N,T){this._context.setTransform(h,p,m,x,N,T)}stroke(h){h?this._context.stroke(h):this._context.stroke()}strokeText(h,p,m,x){this._context.strokeText(h,p,m,x)}transform(h,p,m,x,N,T){this._context.transform(h,p,m,x,N,T)}translate(h,p){this._context.translate(h,p)}_enableTrace(){let h=this,p=S.length,m=this.setAttr,x,N;const T=function(I){let R=h[I],C;h[I]=function(){return N=t(Array.prototype.slice.call(arguments,0)),C=R.apply(h,arguments),h._trace({method:I,args:N}),C}};for(x=0;x<p;x++)T(S[x]);h.setAttr=function(){m.apply(h,arguments);const I=arguments[0];let R=arguments[1];(I==="shadowOffsetX"||I==="shadowOffsetY"||I==="shadowBlur")&&(R=R/this.canvas.getPixelRatio()),h._trace({property:I,val:R})}}_applyGlobalCompositeOperation(h){const p=h.attrs.globalCompositeOperation;!p||p==="source-over"||this.setAttr("globalCompositeOperation",p)}};Wo.Context=y,w.forEach(function(O){Object.defineProperty(y.prototype,O,{get(){return this._context[O]},set(h){this._context[O]=h}})});class v extends y{constructor(h,{willReadFrequently:p=!1}={}){super(h),this._context=h._canvas.getContext("2d",{willReadFrequently:p})}_fillColor(h){const p=h.fill();this.setAttr("fillStyle",p),h._fillFunc(this)}_fillPattern(h){this.setAttr("fillStyle",h._getFillPattern()),h._fillFunc(this)}_fillLinearGradient(h){const p=h._getLinearGradient();p&&(this.setAttr("fillStyle",p),h._fillFunc(this))}_fillRadialGradient(h){const p=h._getRadialGradient();p&&(this.setAttr("fillStyle",p),h._fillFunc(this))}_fill(h){const p=h.fill(),m=h.getFillPriority();if(p&&m==="color"){this._fillColor(h);return}const x=h.getFillPatternImage();if(x&&m==="pattern"){this._fillPattern(h);return}const N=h.getFillLinearGradientColorStops();if(N&&m==="linear-gradient"){this._fillLinearGradient(h);return}const T=h.getFillRadialGradientColorStops();if(T&&m==="radial-gradient"){this._fillRadialGradient(h);return}p?this._fillColor(h):x?this._fillPattern(h):N?this._fillLinearGradient(h):T&&this._fillRadialGradient(h)}_strokeLinearGradient(h){const p=h.getStrokeLinearGradientStartPoint(),m=h.getStrokeLinearGradientEndPoint(),x=h.getStrokeLinearGradientColorStops(),N=this.createLinearGradient(p.x,p.y,m.x,m.y);if(x){for(let T=0;T<x.length;T+=2)N.addColorStop(x[T],x[T+1]);this.setAttr("strokeStyle",N)}}_stroke(h){const p=h.dash(),m=h.getStrokeScaleEnabled();if(h.hasStroke()){if(!m){this.save();const N=this.getCanvas().getPixelRatio();this.setTransform(N,0,0,N,0,0)}this._applyLineCap(h),p&&h.dashEnabled()&&(this.setLineDash(p),this.setAttr("lineDashOffset",h.dashOffset())),this.setAttr("lineWidth",h.strokeWidth()),h.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),h.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(h):this.setAttr("strokeStyle",h.stroke()),h._strokeFunc(this),m||this.restore()}}_applyShadow(h){var p,m,x;const N=(p=h.getShadowRGBA())!==null&&p!==void 0?p:"black",T=(m=h.getShadowBlur())!==null&&m!==void 0?m:5,I=(x=h.getShadowOffset())!==null&&x!==void 0?x:{x:0,y:0},R=h.getAbsoluteScale(),C=this.canvas.getPixelRatio(),M=R.x*C,k=R.y*C;this.setAttr("shadowColor",N),this.setAttr("shadowBlur",T*Math.min(Math.abs(M),Math.abs(k))),this.setAttr("shadowOffsetX",I.x*M),this.setAttr("shadowOffsetY",I.y*k)}}Wo.SceneContext=v;class g extends y{constructor(h){super(h),this._context=h._canvas.getContext("2d",{willReadFrequently:!0})}_fill(h){this.save(),this.setAttr("fillStyle",h.colorKey),h._fillFuncHit(this),this.restore()}strokeShape(h){h.hasHitStroke()&&this._stroke(h)}_stroke(h){if(h.hasHitStroke()){const p=h.getStrokeScaleEnabled();if(!p){this.save();const N=this.getCanvas().getPixelRatio();this.setTransform(N,0,0,N,0,0)}this._applyLineCap(h);const m=h.hitStrokeWidth(),x=m==="auto"?h.strokeWidth():m;this.setAttr("lineWidth",x),this.setAttr("strokeStyle",h.colorKey),h._strokeFuncHit(this),p||this.restore()}}}return Wo.HitContext=g,Wo}var cy;function Up(){if(cy)return $o;cy=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.HitCanvas=$o.SceneCanvas=$o.Canvas=void 0;const e=zr(),i=yw(),t=Nt(),r=Ft(),a=Ut();let l;function s(){if(l)return l;const _=e.Util.createCanvasElement(),S=_.getContext("2d");return l=function(){const w=t.Konva._global.devicePixelRatio||1,b=S.webkitBackingStorePixelRatio||S.mozBackingStorePixelRatio||S.msBackingStorePixelRatio||S.oBackingStorePixelRatio||S.backingStorePixelRatio||1;return w/b}(),e.Util.releaseCanvas(_),l}let c=class{constructor(S){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const b=(S||{}).pixelRatio||t.Konva.pixelRatio||s();this.pixelRatio=b,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(S){const w=this.pixelRatio;this.pixelRatio=S,this.setSize(this.getWidth()/w,this.getHeight()/w)}setWidth(S){this.width=this._canvas.width=S*this.pixelRatio,this._canvas.style.width=S+"px";const w=this.pixelRatio;this.getContext()._context.scale(w,w)}setHeight(S){this.height=this._canvas.height=S*this.pixelRatio,this._canvas.style.height=S+"px";const w=this.pixelRatio;this.getContext()._context.scale(w,w)}getWidth(){return this.width}getHeight(){return this.height}setSize(S,w){this.setWidth(S||0),this.setHeight(w||0)}toDataURL(S,w){try{return this._canvas.toDataURL(S,w)}catch{try{return this._canvas.toDataURL()}catch(y){return e.Util.error("Unable to get data URL. "+y.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};$o.Canvas=c,r.Factory.addGetterSetter(c,"pixelRatio",void 0,(0,a.getNumberValidator)());class f extends c{constructor(S={width:0,height:0,willReadFrequently:!1}){super(S),this.context=new i.SceneContext(this,{willReadFrequently:S.willReadFrequently}),this.setSize(S.width,S.height)}}$o.SceneCanvas=f;class E extends c{constructor(S={width:0,height:0}){super(S),this.hitCanvas=!0,this.context=new i.HitContext(this),this.setSize(S.width,S.height)}}return $o.HitCanvas=E,$o}var Vg={},fy;function Av(){return fy||(fy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const i=Nt(),t=zr();e.DD={get isDragging(){let r=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(r=!0)}),r},justDragged:!1,get node(){let r;return e.DD._dragElements.forEach(a=>{r=a.node}),r},_dragElements:new Map,_drag(r){const a=[];e.DD._dragElements.forEach((l,s)=>{const{node:c}=l,f=c.getStage();f.setPointersPositions(r),l.pointerId===void 0&&(l.pointerId=t.Util._getFirstPointerId(r));const E=f._changedPointerPositions.find(_=>_.id===l.pointerId);if(E){if(l.dragStatus!=="dragging"){const _=c.dragDistance();if(Math.max(Math.abs(E.x-l.startPointerPos.x),Math.abs(E.y-l.startPointerPos.y))<_||(c.startDrag({evt:r}),!c.isDragging()))return}c._setDragPosition(r,l),a.push(c)}}),a.forEach(l=>{l.fire("dragmove",{type:"dragmove",target:l,evt:r},!0)})},_endDragBefore(r){const a=[];e.DD._dragElements.forEach(l=>{const{node:s}=l,c=s.getStage();if(r&&c.setPointersPositions(r),!c._changedPointerPositions.find(_=>_.id===l.pointerId))return;(l.dragStatus==="dragging"||l.dragStatus==="stopped")&&(e.DD.justDragged=!0,i.Konva._mouseListenClick=!1,i.Konva._touchListenClick=!1,i.Konva._pointerListenClick=!1,l.dragStatus="stopped");const E=l.node.getLayer()||l.node instanceof i.Konva.Stage&&l.node;E&&a.indexOf(E)===-1&&a.push(E)}),a.forEach(l=>{l.draw()})},_endDragAfter(r){e.DD._dragElements.forEach((a,l)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:r},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(l)})}},i.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(Vg)),Vg}var dy;function Yr(){if(dy)return Ef;dy=1,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Node=void 0;const e=zr(),i=Ft(),t=Up(),r=Nt(),a=Av(),l=Ut(),s="absoluteOpacity",c="allEventListeners",f="absoluteTransform",E="absoluteScale",_="canvas",S="Change",w="children",b="konva",y="listening",v="mouseenter",g="mouseleave",O="set",h="Shape",p=" ",m="stage",x="transform",N="Stage",T="visible",I=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(p);let R=1;class C{constructor(A){this._id=R++,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(A),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(A){(A===x||A===f)&&this._cache.get(A)?this._cache.get(A).dirty=!0:A?this._cache.delete(A):this._cache.clear()}_getCache(A,L){let z=this._cache.get(A);return(z===void 0||(A===x||A===f)&&z.dirty===!0)&&(z=L.call(this),this._cache.set(A,z)),z}_calculate(A,L,z){if(!this._attachedDepsListeners.get(A)){const Y=L.map($=>$+"Change.konva").join(p);this.on(Y,()=>{this._clearCache(A)}),this._attachedDepsListeners.set(A,!0)}return this._getCache(A,z)}_getCanvasCache(){return this._cache.get(_)}_clearSelfAndDescendantCache(A){this._clearCache(A),A===f&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(_)){const{scene:A,filter:L,hit:z}=this._cache.get(_);e.Util.releaseCanvas(A,L,z),this._cache.delete(_)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(A){const L=A||{};let z={};(L.x===void 0||L.y===void 0||L.width===void 0||L.height===void 0)&&(z=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let Y=Math.ceil(L.width||z.width),$=Math.ceil(L.height||z.height),X=L.pixelRatio,q=L.x===void 0?Math.floor(z.x):L.x,D=L.y===void 0?Math.floor(z.y):L.y,B=L.offset||0,U=L.drawBorder||!1,W=L.hitCanvasPixelRatio||1;if(!Y||!$){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const ee=Math.abs(Math.round(z.x)-q)>.5?1:0,ne=Math.abs(Math.round(z.y)-D)>.5?1:0;Y+=B*2+ee,$+=B*2+ne,q-=B,D-=B;const te=new t.SceneCanvas({pixelRatio:X,width:Y,height:$}),Z=new t.SceneCanvas({pixelRatio:X,width:0,height:0,willReadFrequently:!0}),ae=new t.HitCanvas({pixelRatio:W,width:Y,height:$}),H=te.getContext(),J=ae.getContext();return ae.isCache=!0,te.isCache=!0,this._cache.delete(_),this._filterUpToDate=!1,L.imageSmoothingEnabled===!1&&(te.getContext()._context.imageSmoothingEnabled=!1,Z.getContext()._context.imageSmoothingEnabled=!1),H.save(),J.save(),H.translate(-q,-D),J.translate(-q,-D),this._isUnderCache=!0,this._clearSelfAndDescendantCache(s),this._clearSelfAndDescendantCache(E),this.drawScene(te,this),this.drawHit(ae,this),this._isUnderCache=!1,H.restore(),J.restore(),U&&(H.save(),H.beginPath(),H.rect(0,0,Y,$),H.closePath(),H.setAttr("strokeStyle","red"),H.setAttr("lineWidth",5),H.stroke(),H.restore()),this._cache.set(_,{scene:te,filter:Z,hit:ae,x:q,y:D}),this._requestDraw(),this}isCached(){return this._cache.has(_)}getClientRect(A){throw new Error('abstract "getClientRect" method call')}_transformedRect(A,L){const z=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}];let Y=1/0,$=1/0,X=-1/0,q=-1/0;const D=this.getAbsoluteTransform(L);return z.forEach(function(B){const U=D.point(B);Y===void 0&&(Y=X=U.x,$=q=U.y),Y=Math.min(Y,U.x),$=Math.min($,U.y),X=Math.max(X,U.x),q=Math.max(q,U.y)}),{x:Y,y:$,width:X-Y,height:q-$}}_drawCachedSceneCanvas(A){A.save(),A._applyOpacity(this),A._applyGlobalCompositeOperation(this);const L=this._getCanvasCache();A.translate(L.x,L.y);const z=this._getCachedSceneCanvas(),Y=z.pixelRatio;A.drawImage(z._canvas,0,0,z.width/Y,z.height/Y),A.restore()}_drawCachedHitCanvas(A){const L=this._getCanvasCache(),z=L.hit;A.save(),A.translate(L.x,L.y),A.drawImage(z._canvas,0,0,z.width/z.pixelRatio,z.height/z.pixelRatio),A.restore()}_getCachedSceneCanvas(){let A=this.filters(),L=this._getCanvasCache(),z=L.scene,Y=L.filter,$=Y.getContext(),X,q,D,B;if(A){if(!this._filterUpToDate){const U=z.pixelRatio;Y.setSize(z.width/z.pixelRatio,z.height/z.pixelRatio);try{for(X=A.length,$.clear(),$.drawImage(z._canvas,0,0,z.getWidth()/U,z.getHeight()/U),q=$.getImageData(0,0,Y.getWidth(),Y.getHeight()),D=0;D<X;D++){if(B=A[D],typeof B!="function"){e.Util.error("Filter should be type of function, but got "+typeof B+" instead. Please check correct filters");continue}B.call(this,q),$.putImageData(q,0,0)}}catch(W){e.Util.error("Unable to apply filter. "+W.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return Y}return z}on(A,L){if(this._cache&&this._cache.delete(c),arguments.length===3)return this._delegate.apply(this,arguments);let z=A.split(p),Y=z.length,$,X,q,D,B;for($=0;$<Y;$++)X=z[$],q=X.split("."),D=q[0],B=q[1]||"",this.eventListeners[D]||(this.eventListeners[D]=[]),this.eventListeners[D].push({name:B,handler:L});return this}off(A,L){let z=(A||"").split(p),Y=z.length,$,X,q,D,B,U;if(this._cache&&this._cache.delete(c),!A)for(X in this.eventListeners)this._off(X);for($=0;$<Y;$++)if(q=z[$],D=q.split("."),B=D[0],U=D[1],B)this.eventListeners[B]&&this._off(B,U,L);else for(X in this.eventListeners)this._off(X,U,L);return this}dispatchEvent(A){const L={target:this,type:A.type,evt:A};return this.fire(A.type,L),this}addEventListener(A,L){return this.on(A,function(z){L.call(this,z.evt)}),this}removeEventListener(A){return this.off(A),this}_delegate(A,L,z){const Y=this;this.on(A,function($){const X=$.target.findAncestors(L,!0,Y);for(let q=0;q<X.length;q++)$=e.Util.cloneObject($),$.currentTarget=X[q],z.call(X[q],$)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(f),this._clearSelfAndDescendantCache(s),this._clearSelfAndDescendantCache(E),this._clearSelfAndDescendantCache(m),this._clearSelfAndDescendantCache(T),this._clearSelfAndDescendantCache(y)}_remove(){this._clearCaches();const A=this.getParent();A&&A.children&&(A.children.splice(this.index,1),A._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(A){const L="get"+e.Util._capitalize(A);return e.Util._isFunction(this[L])?this[L]():this.attrs[A]}getAncestors(){let A=this.getParent(),L=[];for(;A;)L.push(A),A=A.getParent();return L}getAttrs(){return this.attrs||{}}setAttrs(A){return this._batchTransformChanges(()=>{let L,z;if(!A)return this;for(L in A)L!==w&&(z=O+e.Util._capitalize(L),e.Util._isFunction(this[z])?this[z](A[L]):this._setAttr(L,A[L]))}),this}isListening(){return this._getCache(y,this._isListening)}_isListening(A){if(!this.listening())return!1;const z=this.getParent();return z&&z!==A&&this!==A?z._isListening(A):!0}isVisible(){return this._getCache(T,this._isVisible)}_isVisible(A){if(!this.visible())return!1;const z=this.getParent();return z&&z!==A&&this!==A?z._isVisible(A):!0}shouldDrawHit(A,L=!1){if(A)return this._isVisible(A)&&this._isListening(A);const z=this.getLayer();let Y=!1;a.DD._dragElements.forEach(X=>{X.dragStatus==="dragging"&&(X.node.nodeType==="Stage"||X.node.getLayer()===z)&&(Y=!0)});const $=!L&&!r.Konva.hitOnDragEnabled&&(Y||r.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!$}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let A=this.getDepth(),L=this,z=0,Y,$,X,q;function D(U){for(Y=[],$=U.length,X=0;X<$;X++)q=U[X],z++,q.nodeType!==h&&(Y=Y.concat(q.getChildren().slice())),q._id===L._id&&(X=$);Y.length>0&&Y[0].getDepth()<=A&&D(Y)}const B=this.getStage();return L.nodeType!==N&&B&&D(B.getChildren()),z}getDepth(){let A=0,L=this.parent;for(;L;)A++,L=L.parent;return A}_batchTransformChanges(A){this._batchingTransformChange=!0,A(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(x),this._clearSelfAndDescendantCache(f)),this._needClearTransformCache=!1}setPosition(A){return this._batchTransformChanges(()=>{this.x(A.x),this.y(A.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const A=this.getStage();if(!A)return null;const L=A.getPointerPosition();if(!L)return null;const z=this.getAbsoluteTransform().copy();return z.invert(),z.point(L)}getAbsolutePosition(A){let L=!1,z=this.parent;for(;z;){if(z.isCached()){L=!0;break}z=z.parent}L&&!A&&(A=!0);const Y=this.getAbsoluteTransform(A).getMatrix(),$=new e.Transform,X=this.offset();return $.m=Y.slice(),$.translate(X.x,X.y),$.getTranslation()}setAbsolutePosition(A){const{x:L,y:z,...Y}=this._clearTransform();this.attrs.x=L,this.attrs.y=z,this._clearCache(x);const $=this._getAbsoluteTransform().copy();return $.invert(),$.translate(A.x,A.y),A={x:this.attrs.x+$.getTranslation().x,y:this.attrs.y+$.getTranslation().y},this._setTransform(Y),this.setPosition({x:A.x,y:A.y}),this._clearCache(x),this._clearSelfAndDescendantCache(f),this}_setTransform(A){let L;for(L in A)this.attrs[L]=A[L]}_clearTransform(){const A={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,A}move(A){let L=A.x,z=A.y,Y=this.x(),$=this.y();return L!==void 0&&(Y+=L),z!==void 0&&($+=z),this.setPosition({x:Y,y:$}),this}_eachAncestorReverse(A,L){let z=[],Y=this.getParent(),$,X;if(!(L&&L._id===this._id)){for(z.unshift(this);Y&&(!L||Y._id!==L._id);)z.unshift(Y),Y=Y.parent;for($=z.length,X=0;X<$;X++)A(z[X])}}rotate(A){return this.rotation(this.rotation()+A),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const A=this.index,L=this.parent.getChildren().length;return A<L-1?(this.parent.children.splice(A,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const A=this.index,L=this.parent.getChildren().length;return A<L-1?(this.parent.children.splice(A,1),this.parent.children.splice(A+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.splice(A-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(A){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(A<0||A>=this.parent.children.length)&&e.Util.warn("Unexpected value "+A+" 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)+".");const L=this.index;return this.parent.children.splice(L,1),this.parent.children.splice(A,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(s,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let A=this.opacity();const L=this.getParent();return L&&!L._isUnderCache&&(A*=L.getAbsoluteOpacity()),A}moveTo(A){return this.getParent()!==A&&(this._remove(),A.add(this)),this}toObject(){let A=this.getAttrs(),L,z,Y,$,X;const q={attrs:{},className:this.getClassName()};for(L in A)z=A[L],X=e.Util.isObject(z)&&!e.Util._isPlainObject(z)&&!e.Util._isArray(z),!X&&(Y=typeof this[L]=="function"&&this[L],delete A[L],$=Y?Y.call(this):null,A[L]=z,$!==z&&(q.attrs[L]=z));return e.Util._prepareToStringify(q)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(A,L,z){const Y=[];L&&this._isMatch(A)&&Y.push(this);let $=this.parent;for(;$;){if($===z)return Y;$._isMatch(A)&&Y.push($),$=$.parent}return Y}isAncestorOf(A){return!1}findAncestor(A,L,z){return this.findAncestors(A,L,z)[0]}_isMatch(A){if(!A)return!1;if(typeof A=="function")return A(this);let L=A.replace(/ /g,"").split(","),z=L.length,Y,$;for(Y=0;Y<z;Y++)if($=L[Y],e.Util.isValidSelector($)||(e.Util.warn('Selector "'+$+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),$.charAt(0)==="#"){if(this.id()===$.slice(1))return!0}else if($.charAt(0)==="."){if(this.hasName($.slice(1)))return!0}else if(this.className===$||this.nodeType===$)return!0;return!1}getLayer(){const A=this.getParent();return A?A.getLayer():null}getStage(){return this._getCache(m,this._getStage)}_getStage(){const A=this.getParent();return A?A.getStage():null}fire(A,L={},z){return L.target=L.target||this,z?this._fireAndBubble(A,L):this._fire(A,L),this}getAbsoluteTransform(A){return A?this._getAbsoluteTransform(A):this._getCache(f,this._getAbsoluteTransform)}_getAbsoluteTransform(A){let L;if(A)return L=new e.Transform,this._eachAncestorReverse(function(z){const Y=z.transformsEnabled();Y==="all"?L.multiply(z.getTransform()):Y==="position"&&L.translate(z.x()-z.offsetX(),z.y()-z.offsetY())},A),L;{L=this._cache.get(f)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(L):L.reset();const z=this.transformsEnabled();if(z==="all")L.multiply(this.getTransform());else if(z==="position"){const Y=this.attrs.x||0,$=this.attrs.y||0,X=this.attrs.offsetX||0,q=this.attrs.offsetY||0;L.translate(Y-X,$-q)}return L.dirty=!1,L}}getAbsoluteScale(A){let L=this;for(;L;)L._isUnderCache&&(A=L),L=L.getParent();const Y=this.getAbsoluteTransform(A).decompose();return{x:Y.scaleX,y:Y.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(x,this._getTransform)}_getTransform(){var A,L;const z=this._cache.get(x)||new e.Transform;z.reset();const Y=this.x(),$=this.y(),X=r.Konva.getAngle(this.rotation()),q=(A=this.attrs.scaleX)!==null&&A!==void 0?A:1,D=(L=this.attrs.scaleY)!==null&&L!==void 0?L:1,B=this.attrs.skewX||0,U=this.attrs.skewY||0,W=this.attrs.offsetX||0,ee=this.attrs.offsetY||0;return(Y!==0||$!==0)&&z.translate(Y,$),X!==0&&z.rotate(X),(B!==0||U!==0)&&z.skew(B,U),(q!==1||D!==1)&&z.scale(q,D),(W!==0||ee!==0)&&z.translate(-1*W,-1*ee),z.dirty=!1,z}clone(A){let L=e.Util.cloneObject(this.attrs),z,Y,$,X,q;for(z in A)L[z]=A[z];const D=new this.constructor(L);for(z in this.eventListeners)for(Y=this.eventListeners[z],$=Y.length,X=0;X<$;X++)q=Y[X],q.name.indexOf(b)<0&&(D.eventListeners[z]||(D.eventListeners[z]=[]),D.eventListeners[z].push(q));return D}_toKonvaCanvas(A){A=A||{};const L=this.getClientRect(),z=this.getStage(),Y=A.x!==void 0?A.x:Math.floor(L.x),$=A.y!==void 0?A.y:Math.floor(L.y),X=A.pixelRatio||1,q=new t.SceneCanvas({width:A.width||Math.ceil(L.width)||(z?z.width():0),height:A.height||Math.ceil(L.height)||(z?z.height():0),pixelRatio:X}),D=q.getContext(),B=new t.SceneCanvas({width:q.width/q.pixelRatio+Math.abs(Y),height:q.height/q.pixelRatio+Math.abs($),pixelRatio:q.pixelRatio});return A.imageSmoothingEnabled===!1&&(D._context.imageSmoothingEnabled=!1),D.save(),(Y||$)&&D.translate(-1*Y,-1*$),this.drawScene(q,void 0,B),D.restore(),q}toCanvas(A){return this._toKonvaCanvas(A)._canvas}toDataURL(A){A=A||{};const L=A.mimeType||null,z=A.quality||null,Y=this._toKonvaCanvas(A).toDataURL(L,z);return A.callback&&A.callback(Y),Y}toImage(A){return new Promise((L,z)=>{try{const Y=A==null?void 0:A.callback;Y&&delete A.callback,e.Util._urlToImage(this.toDataURL(A),function($){L($),Y==null||Y($)})}catch(Y){z(Y)}})}toBlob(A){return new Promise((L,z)=>{try{const Y=A==null?void 0:A.callback;Y&&delete A.callback,this.toCanvas(A).toBlob($=>{L($),Y==null||Y($)},A==null?void 0:A.mimeType,A==null?void 0:A.quality)}catch(Y){z(Y)}})}setSize(A){return this.width(A.width),this.height(A.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():r.Konva.dragDistance}_off(A,L,z){let Y=this.eventListeners[A],$,X,q;for($=0;$<Y.length;$++)if(X=Y[$].name,q=Y[$].handler,(X!=="konva"||L==="konva")&&(!L||X===L)&&(!z||z===q)){if(Y.splice($,1),Y.length===0){delete this.eventListeners[A];break}$--}}_fireChangeEvent(A,L,z){this._fire(A+S,{oldVal:L,newVal:z})}addName(A){if(!this.hasName(A)){const L=this.name(),z=L?L+" "+A:A;this.name(z)}return this}hasName(A){if(!A)return!1;const L=this.name();return L?(L||"").split(/\s/g).indexOf(A)!==-1:!1}removeName(A){const L=(this.name()||"").split(/\s/g),z=L.indexOf(A);return z!==-1&&(L.splice(z,1),this.name(L.join(" "))),this}setAttr(A,L){const z=this[O+e.Util._capitalize(A)];return e.Util._isFunction(z)?z.call(this,L):this._setAttr(A,L),this}_requestDraw(){if(r.Konva.autoDrawEnabled){const A=this.getLayer()||this.getStage();A==null||A.batchDraw()}}_setAttr(A,L){const z=this.attrs[A];z===L&&!e.Util.isObject(L)||(L==null?delete this.attrs[A]:this.attrs[A]=L,this._shouldFireChangeEvents&&this._fireChangeEvent(A,z,L),this._requestDraw())}_setComponentAttr(A,L,z){let Y;z!==void 0&&(Y=this.attrs[A],Y||(this.attrs[A]=this.getAttr(A)),this.attrs[A][L]=z,this._fireChangeEvent(A,Y,z))}_fireAndBubble(A,L,z){if(L&&this.nodeType===h&&(L.target=this),!((A===v||A===g)&&(z&&(this===z||this.isAncestorOf&&this.isAncestorOf(z))||this.nodeType==="Stage"&&!z))){this._fire(A,L);const $=(A===v||A===g)&&z&&z.isAncestorOf&&z.isAncestorOf(this)&&!z.isAncestorOf(this.parent);(L&&!L.cancelBubble||!L)&&this.parent&&this.parent.isListening()&&!$&&(z&&z.parent?this._fireAndBubble.call(this.parent,A,L,z):this._fireAndBubble.call(this.parent,A,L))}}_getProtoListeners(A){var L,z,Y;const $=(L=this._cache.get(c))!==null&&L!==void 0?L:{};let X=$==null?void 0:$[A];if(X===void 0){X=[];let q=Object.getPrototypeOf(this);for(;q;){const D=(Y=(z=q.eventListeners)===null||z===void 0?void 0:z[A])!==null&&Y!==void 0?Y:[];X.push(...D),q=Object.getPrototypeOf(q)}$[A]=X,this._cache.set(c,$)}return X}_fire(A,L){L=L||{},L.currentTarget=this,L.type=A;const z=this._getProtoListeners(A);if(z)for(var Y=0;Y<z.length;Y++)z[Y].handler.call(this,L);const $=this.eventListeners[A];if($)for(var Y=0;Y<$.length;Y++)$[Y].handler.call(this,L)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(A){const L=A?A.pointerId:void 0,z=this.getStage(),Y=this.getAbsolutePosition();if(!z)return;const $=z._getPointerById(L)||z._changedPointerPositions[0]||Y;a.DD._dragElements.set(this._id,{node:this,startPointerPos:$,offset:{x:$.x-Y.x,y:$.y-Y.y},dragStatus:"ready",pointerId:L})}startDrag(A,L=!0){a.DD._dragElements.has(this._id)||this._createDragElement(A);const z=a.DD._dragElements.get(this._id);z.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:A&&A.evt},L)}_setDragPosition(A,L){const z=this.getStage()._getPointerById(L.pointerId);if(!z)return;let Y={x:z.x-L.offset.x,y:z.y-L.offset.y};const $=this.dragBoundFunc();if($!==void 0){const X=$.call(this,Y,A);X?Y=X:e.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!==Y.x||this._lastPos.y!==Y.y)&&(this.setAbsolutePosition(Y),this._requestDraw()),this._lastPos=Y}stopDrag(A){const L=a.DD._dragElements.get(this._id);L&&(L.dragStatus="stopped"),a.DD._endDragBefore(A),a.DD._endDragAfter(A)}setDraggable(A){this._setAttr("draggable",A),this._dragChange()}isDragging(){const A=a.DD._dragElements.get(this._id);return A?A.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(A){if(!(!(A.evt.button!==void 0)||r.Konva.dragButtons.indexOf(A.evt.button)>=0)||this.isDragging())return;let Y=!1;a.DD._dragElements.forEach($=>{this.isAncestorOf($.node)&&(Y=!0)}),Y||this._createDragElement(A)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const L=a.DD._dragElements.get(this._id),z=L&&L.dragStatus==="dragging",Y=L&&L.dragStatus==="ready";z?this.stopDrag():Y&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(A={x:0,y:0}){const L=this.getStage();if(!L)return!1;const z={x:-A.x,y:-A.y,width:L.width()+2*A.x,height:L.height()+2*A.y};return e.Util.haveIntersection(z,this.getClientRect())}static create(A,L){return e.Util._isString(A)&&(A=JSON.parse(A)),this._createNode(A,L)}static _createNode(A,L){let z=C.prototype.getClassName.call(A),Y=A.children,$,X,q;L&&(A.attrs.container=L),r.Konva[z]||(e.Util.warn('Can not find a node with class name "'+z+'". Fallback to "Shape".'),z="Shape");const D=r.Konva[z];if($=new D(A.attrs),Y)for(X=Y.length,q=0;q<X;q++)$.add(C._createNode(Y[q]));return $}}Ef.Node=C,C.prototype.nodeType="Node",C.prototype._attrsAffectingSize=[],C.prototype.eventListeners={},C.prototype.on.call(C.prototype,I,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(x),this._clearSelfAndDescendantCache(f)}),C.prototype.on.call(C.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(T)}),C.prototype.on.call(C.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(y)}),C.prototype.on.call(C.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(s)});const M=i.Factory.addGetterSetter;return M(C,"zIndex"),M(C,"absolutePosition"),M(C,"position"),M(C,"x",0,(0,l.getNumberValidator)()),M(C,"y",0,(0,l.getNumberValidator)()),M(C,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),M(C,"opacity",1,(0,l.getNumberValidator)()),M(C,"name","",(0,l.getStringValidator)()),M(C,"id","",(0,l.getStringValidator)()),M(C,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(C,"scale",["x","y"]),M(C,"scaleX",1,(0,l.getNumberValidator)()),M(C,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(C,"skew",["x","y"]),M(C,"skewX",0,(0,l.getNumberValidator)()),M(C,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(C,"offset",["x","y"]),M(C,"offsetX",0,(0,l.getNumberValidator)()),M(C,"offsetY",0,(0,l.getNumberValidator)()),M(C,"dragDistance",void 0,(0,l.getNumberValidator)()),M(C,"width",0,(0,l.getNumberValidator)()),M(C,"height",0,(0,l.getNumberValidator)()),M(C,"listening",!0,(0,l.getBooleanValidator)()),M(C,"preventDefault",!0,(0,l.getBooleanValidator)()),M(C,"filters",void 0,function(k){return this._filterUpToDate=!1,k}),M(C,"visible",!0,(0,l.getBooleanValidator)()),M(C,"transformsEnabled","all",(0,l.getStringValidator)()),M(C,"size"),M(C,"dragBoundFunc"),M(C,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(C,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),Ef}var xf={},hy;function qp(){if(hy)return xf;hy=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.Container=void 0;const e=Ft(),i=Yr(),t=Ut();let r=class extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(l){if(!l)return this.children||[];const s=this.children||[],c=[];return s.forEach(function(f){l(f)&&c.push(f)}),c}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.destroy()}),this.children=[],this._requestDraw(),this}add(...l){if(l.length===0)return this;if(l.length>1){for(let c=0;c<l.length;c++)this.add(l[c]);return this}const s=l[0];return s.getParent()?(s.moveTo(this),this):(this._validateAdd(s),s.index=this.getChildren().length,s.parent=this,s._clearCaches(),this.getChildren().push(s),this._fire("add",{child:s}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(l){return this._generalFind(l,!1)}findOne(l){const s=this._generalFind(l,!0);return s.length>0?s[0]:void 0}_generalFind(l,s){const c=[];return this._descendants(f=>{const E=f._isMatch(l);return E&&c.push(f),!!(E&&s)}),c}_descendants(l){let s=!1;const c=this.getChildren();for(const f of c){if(s=l(f),s)return!0;if(f.hasChildren()&&(s=f._descendants(l),s))return!0}return!1}toObject(){const l=i.Node.prototype.toObject.call(this);return l.children=[],this.getChildren().forEach(s=>{l.children.push(s.toObject())}),l}isAncestorOf(l){let s=l.getParent();for(;s;){if(s._id===this._id)return!0;s=s.getParent()}return!1}clone(l){const s=i.Node.prototype.clone.call(this,l);return this.getChildren().forEach(function(c){s.add(c.clone())}),s}getAllIntersections(l){const s=[];return this.find("Shape").forEach(c=>{c.isVisible()&&c.intersects(l)&&s.push(c)}),s}_clearSelfAndDescendantCache(l){var s;super._clearSelfAndDescendantCache(l),!this.isCached()&&((s=this.children)===null||s===void 0||s.forEach(function(c){c._clearSelfAndDescendantCache(l)}))}_setChildrenIndices(){var l;(l=this.children)===null||l===void 0||l.forEach(function(s,c){s.index=c}),this._requestDraw()}drawScene(l,s,c){const f=this.getLayer(),E=l||f&&f.getCanvas(),_=E&&E.getContext(),S=this._getCanvasCache(),w=S&&S.scene,b=E&&E.isCache;if(!this.isVisible()&&!b)return this;if(w){_.save();const y=this.getAbsoluteTransform(s).getMatrix();_.transform(y[0],y[1],y[2],y[3],y[4],y[5]),this._drawCachedSceneCanvas(_),_.restore()}else this._drawChildren("drawScene",E,s,c);return this}drawHit(l,s){if(!this.shouldDrawHit(s))return this;const c=this.getLayer(),f=l||c&&c.hitCanvas,E=f&&f.getContext(),_=this._getCanvasCache();if(_&&_.hit){E.save();const w=this.getAbsoluteTransform(s).getMatrix();E.transform(w[0],w[1],w[2],w[3],w[4],w[5]),this._drawCachedHitCanvas(E),E.restore()}else this._drawChildren("drawHit",f,s);return this}_drawChildren(l,s,c,f){var E;const _=s&&s.getContext(),S=this.clipWidth(),w=this.clipHeight(),b=this.clipFunc(),y=typeof S=="number"&&typeof w=="number"||b,v=c===this;if(y){_.save();const O=this.getAbsoluteTransform(c);let h=O.getMatrix();_.transform(h[0],h[1],h[2],h[3],h[4],h[5]),_.beginPath();let p;if(b)p=b.call(this,_,this);else{const m=this.clipX(),x=this.clipY();_.rect(m||0,x||0,S,w)}_.clip.apply(_,p),h=O.copy().invert().getMatrix(),_.transform(h[0],h[1],h[2],h[3],h[4],h[5])}const g=!v&&this.globalCompositeOperation()!=="source-over"&&l==="drawScene";g&&(_.save(),_._applyGlobalCompositeOperation(this)),(E=this.children)===null||E===void 0||E.forEach(function(O){O[l](s,c,f)}),g&&_.restore(),y&&_.restore()}getClientRect(l={}){var s;const c=l.skipTransform,f=l.relativeTo;let E,_,S,w,b={x:1/0,y:1/0,width:0,height:0};const y=this;(s=this.children)===null||s===void 0||s.forEach(function(O){if(!O.visible())return;const h=O.getClientRect({relativeTo:y,skipShadow:l.skipShadow,skipStroke:l.skipStroke});h.width===0&&h.height===0||(E===void 0?(E=h.x,_=h.y,S=h.x+h.width,w=h.y+h.height):(E=Math.min(E,h.x),_=Math.min(_,h.y),S=Math.max(S,h.x+h.width),w=Math.max(w,h.y+h.height)))});const v=this.find("Shape");let g=!1;for(let O=0;O<v.length;O++)if(v[O]._isVisible(this)){g=!0;break}return g&&E!==void 0?b={x:E,y:_,width:S-E,height:w-_}:b={x:0,y:0,width:0,height:0},c?b:this._transformedRect(b,f)}};return xf.Container=r,e.Factory.addComponentsGetterSetter(r,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(r,"clipX",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(r,"clipY",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(r,"clipWidth",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(r,"clipHeight",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(r,"clipFunc"),xf}var $g={},Yl={},py;function bw(){if(py)return Yl;py=1,Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.getCapturedShape=r,Yl.createEvent=a,Yl.hasPointerCapture=l,Yl.setPointerCapture=s,Yl.releaseCapture=c;const e=Nt(),i=new Map,t=e.Konva._global.PointerEvent!==void 0;function r(f){return i.get(f)}function a(f){return{evt:f,pointerId:f.pointerId}}function l(f,E){return i.get(f)===E}function s(f,E){c(f),E.getStage()&&(i.set(f,E),t&&E._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function c(f,E){const _=i.get(f);if(!_)return;const S=_.getStage();S&&S.content,i.delete(f),t&&_._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return Yl}var gy;function f9(){return gy||(gy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const i=zr(),t=Ft(),r=qp(),a=Nt(),l=Up(),s=Av(),c=Nt(),f=bw(),E="Stage",_="string",S="px",w="mouseout",b="mouseleave",y="mouseover",v="mouseenter",g="mousemove",O="mousedown",h="mouseup",p="pointermove",m="pointerdown",x="pointerup",N="pointercancel",T="lostpointercapture",I="pointerout",R="pointerleave",C="pointerover",M="pointerenter",k="contextmenu",A="touchstart",L="touchend",z="touchmove",Y="touchcancel",$="wheel",X=5,q=[[v,"_pointerenter"],[O,"_pointerdown"],[g,"_pointermove"],[h,"_pointerup"],[b,"_pointerleave"],[A,"_pointerdown"],[z,"_pointermove"],[L,"_pointerup"],[Y,"_pointercancel"],[y,"_pointerover"],[$,"_wheel"],[k,"_contextmenu"],[m,"_pointerdown"],[p,"_pointermove"],[x,"_pointerup"],[N,"_pointercancel"],[T,"_lostpointercapture"]],D={mouse:{[I]:w,[R]:b,[C]:y,[M]:v,[p]:g,[m]:O,[x]:h,[N]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[I]:"touchout",[R]:"touchleave",[C]:"touchover",[M]:"touchenter",[p]:z,[m]:A,[x]:L,[N]:Y,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[I]:I,[R]:R,[C]:C,[M]:M,[p]:p,[m]:m,[x]:x,[N]:N,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},B=te=>te.indexOf("pointer")>=0?"pointer":te.indexOf("touch")>=0?"touch":"mouse",U=te=>{const Z=B(te);if(Z==="pointer")return a.Konva.pointerEventsEnabled&&D.pointer;if(Z==="touch")return D.touch;if(Z==="mouse")return D.mouse};function W(te={}){return(te.clipFunc||te.clipWidth||te.clipHeight)&&i.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),te}const ee="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);";e.stages=[];class ne extends r.Container{constructor(Z){super(W(Z)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.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(Z){const ae=Z.getType()==="Layer",H=Z.getType()==="FastLayer";ae||H||i.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const Z=this.visible()?"":"none";this.content.style.display=Z}setContainer(Z){if(typeof Z===_){if(Z.charAt(0)==="."){const H=Z.slice(1);Z=document.getElementsByClassName(H)[0]}else{var ae;Z.charAt(0)!=="#"?ae=Z:ae=Z.slice(1),Z=document.getElementById(ae)}if(!Z)throw"Can not find container in document with id "+ae}return this._setAttr("container",Z),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),Z.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const Z=this.children,ae=Z.length;for(let H=0;H<ae;H++)Z[H].clear();return this}clone(Z){return Z||(Z={}),Z.container=typeof document<"u"&&document.createElement("div"),r.Container.prototype.clone.call(this,Z)}destroy(){super.destroy();const Z=this.content;Z&&i.Util._isInDocument(Z)&&this.container().removeChild(Z);const ae=e.stages.indexOf(this);return ae>-1&&e.stages.splice(ae,1),i.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const Z=this._pointerPositions[0]||this._changedPointerPositions[0];return Z?{x:Z.x,y:Z.y}:(i.Util.warn(ee),null)}_getPointerById(Z){return this._pointerPositions.find(ae=>ae.id===Z)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(Z){Z=Z||{},Z.x=Z.x||0,Z.y=Z.y||0,Z.width=Z.width||this.width(),Z.height=Z.height||this.height();const ae=new l.SceneCanvas({width:Z.width,height:Z.height,pixelRatio:Z.pixelRatio||1}),H=ae.getContext()._context,J=this.children;return(Z.x||Z.y)&&H.translate(-1*Z.x,-1*Z.y),J.forEach(function(ie){if(!ie.isVisible())return;const le=ie._toKonvaCanvas(Z);H.drawImage(le._canvas,Z.x,Z.y,le.getWidth()/le.getPixelRatio(),le.getHeight()/le.getPixelRatio())}),ae}getIntersection(Z){if(!Z)return null;const ae=this.children,H=ae.length,J=H-1;for(let ie=J;ie>=0;ie--){const le=ae[ie].getIntersection(Z);if(le)return le}return null}_resizeDOM(){const Z=this.width(),ae=this.height();this.content&&(this.content.style.width=Z+S,this.content.style.height=ae+S),this.bufferCanvas.setSize(Z,ae),this.bufferHitCanvas.setSize(Z,ae),this.children.forEach(H=>{H.setSize({width:Z,height:ae}),H.draw()})}add(Z,...ae){if(arguments.length>1){for(let J=0;J<arguments.length;J++)this.add(arguments[J]);return this}super.add(Z);const H=this.children.length;return H>X&&i.Util.warn("The stage has "+H+" 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."),Z.setSize({width:this.width(),height:this.height()}),Z.draw(),a.Konva.isBrowser&&this.content.appendChild(Z.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(Z){return f.hasPointerCapture(Z,this)}setPointerCapture(Z){f.setPointerCapture(Z,this)}releaseCapture(Z){f.releaseCapture(Z,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&q.forEach(([Z,ae])=>{this.content.addEventListener(Z,H=>{this[ae](H)},{passive:!1})})}_pointerenter(Z){this.setPointersPositions(Z);const ae=U(Z.type);ae&&this._fire(ae.pointerenter,{evt:Z,target:this,currentTarget:this})}_pointerover(Z){this.setPointersPositions(Z);const ae=U(Z.type);ae&&this._fire(ae.pointerover,{evt:Z,target:this,currentTarget:this})}_getTargetShape(Z){let ae=this[Z+"targetShape"];return ae&&!ae.getStage()&&(ae=null),ae}_pointerleave(Z){const ae=U(Z.type),H=B(Z.type);if(!ae)return;this.setPointersPositions(Z);const J=this._getTargetShape(H),ie=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;J&&ie?(J._fireAndBubble(ae.pointerout,{evt:Z}),J._fireAndBubble(ae.pointerleave,{evt:Z}),this._fire(ae.pointerleave,{evt:Z,target:this,currentTarget:this}),this[H+"targetShape"]=null):ie&&(this._fire(ae.pointerleave,{evt:Z,target:this,currentTarget:this}),this._fire(ae.pointerout,{evt:Z,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(Z){const ae=U(Z.type),H=B(Z.type);if(!ae)return;this.setPointersPositions(Z);let J=!1;this._changedPointerPositions.forEach(ie=>{const le=this.getIntersection(ie);if(s.DD.justDragged=!1,a.Konva["_"+H+"ListenClick"]=!0,!le||!le.isListening()){this[H+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&le.setPointerCapture(ie.id),this[H+"ClickStartShape"]=le,le._fireAndBubble(ae.pointerdown,{evt:Z,pointerId:ie.id}),J=!0;const ue=Z.type.indexOf("touch")>=0;le.preventDefault()&&Z.cancelable&&ue&&Z.preventDefault()}),J||this._fire(ae.pointerdown,{evt:Z,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(Z){const ae=U(Z.type),H=B(Z.type);if(!ae||(a.Konva.isDragging()&&s.DD.node.preventDefault()&&Z.cancelable&&Z.preventDefault(),this.setPointersPositions(Z),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const ie={};let le=!1;const ue=this._getTargetShape(H);this._changedPointerPositions.forEach(he=>{const ye=f.getCapturedShape(he.id)||this.getIntersection(he),Ce=he.id,pe={evt:Z,pointerId:Ce},fe=ue!==ye;if(fe&&ue&&(ue._fireAndBubble(ae.pointerout,{...pe},ye),ue._fireAndBubble(ae.pointerleave,{...pe},ye)),ye){if(ie[ye._id])return;ie[ye._id]=!0}ye&&ye.isListening()?(le=!0,fe&&(ye._fireAndBubble(ae.pointerover,{...pe},ue),ye._fireAndBubble(ae.pointerenter,{...pe},ue),this[H+"targetShape"]=ye),ye._fireAndBubble(ae.pointermove,{...pe})):ue&&(this._fire(ae.pointerover,{evt:Z,target:this,currentTarget:this,pointerId:Ce}),this[H+"targetShape"]=null)}),le||this._fire(ae.pointermove,{evt:Z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(Z){const ae=U(Z.type),H=B(Z.type);if(!ae)return;this.setPointersPositions(Z);const J=this[H+"ClickStartShape"],ie=this[H+"ClickEndShape"],le={};let ue=!1;this._changedPointerPositions.forEach(he=>{const ye=f.getCapturedShape(he.id)||this.getIntersection(he);if(ye){if(ye.releaseCapture(he.id),le[ye._id])return;le[ye._id]=!0}const Ce=he.id,pe={evt:Z,pointerId:Ce};let fe=!1;a.Konva["_"+H+"InDblClickWindow"]?(fe=!0,clearTimeout(this[H+"DblTimeout"])):s.DD.justDragged||(a.Konva["_"+H+"InDblClickWindow"]=!0,clearTimeout(this[H+"DblTimeout"])),this[H+"DblTimeout"]=setTimeout(function(){a.Konva["_"+H+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),ye&&ye.isListening()?(ue=!0,this[H+"ClickEndShape"]=ye,ye._fireAndBubble(ae.pointerup,{...pe}),a.Konva["_"+H+"ListenClick"]&&J&&J===ye&&(ye._fireAndBubble(ae.pointerclick,{...pe}),fe&&ie&&ie===ye&&ye._fireAndBubble(ae.pointerdblclick,{...pe}))):(this[H+"ClickEndShape"]=null,a.Konva["_"+H+"ListenClick"]&&this._fire(ae.pointerclick,{evt:Z,target:this,currentTarget:this,pointerId:Ce}),fe&&this._fire(ae.pointerdblclick,{evt:Z,target:this,currentTarget:this,pointerId:Ce}))}),ue||this._fire(ae.pointerup,{evt:Z,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+H+"ListenClick"]=!1,Z.cancelable&&H!=="touch"&&H!=="pointer"&&Z.preventDefault()}_contextmenu(Z){this.setPointersPositions(Z);const ae=this.getIntersection(this.getPointerPosition());ae&&ae.isListening()?ae._fireAndBubble(k,{evt:Z}):this._fire(k,{evt:Z,target:this,currentTarget:this})}_wheel(Z){this.setPointersPositions(Z);const ae=this.getIntersection(this.getPointerPosition());ae&&ae.isListening()?ae._fireAndBubble($,{evt:Z}):this._fire($,{evt:Z,target:this,currentTarget:this})}_pointercancel(Z){this.setPointersPositions(Z);const ae=f.getCapturedShape(Z.pointerId)||this.getIntersection(this.getPointerPosition());ae&&ae._fireAndBubble(x,f.createEvent(Z)),f.releaseCapture(Z.pointerId)}_lostpointercapture(Z){f.releaseCapture(Z.pointerId)}setPointersPositions(Z){const ae=this._getContentPosition();let H=null,J=null;Z=Z||window.event,Z.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(Z.touches,ie=>{this._pointerPositions.push({id:ie.identifier,x:(ie.clientX-ae.left)/ae.scaleX,y:(ie.clientY-ae.top)/ae.scaleY})}),Array.prototype.forEach.call(Z.changedTouches||Z.touches,ie=>{this._changedPointerPositions.push({id:ie.identifier,x:(ie.clientX-ae.left)/ae.scaleX,y:(ie.clientY-ae.top)/ae.scaleY})})):(H=(Z.clientX-ae.left)/ae.scaleX,J=(Z.clientY-ae.top)/ae.scaleY,this.pointerPos={x:H,y:J},this._pointerPositions=[{x:H,y:J,id:i.Util._getFirstPointerId(Z)}],this._changedPointerPositions=[{x:H,y:J,id:i.Util._getFirstPointerId(Z)}])}_setPointerPosition(Z){i.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(Z)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const Z=this.content.getBoundingClientRect();return{top:Z.top,left:Z.left,scaleX:Z.width/this.content.clientWidth||1,scaleY:Z.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new l.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new l.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!a.Konva.isBrowser)return;const Z=this.container();if(!Z)throw"Stage has no container. A container is required.";Z.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"),Z.appendChild(this.content),this._resizeDOM()}cache(){return i.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(Z){Z.batchDraw()}),this}}e.Stage=ne,ne.prototype.nodeType=E,(0,c._registerNode)(ne),t.Factory.addGetterSetter(ne,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(te=>{te.batchDraw()})})}($g)),$g}var Of={},Wg={},vy;function On(){return vy||(vy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const i=Nt(),t=zr(),r=Ft(),a=Yr(),l=Ut(),s=Nt(),c=bw(),f="hasShadow",E="shadowRGBA",_="patternImage",S="linearGradient",w="radialGradient";let b;function y(){return b||(b=t.Util.createCanvasElement().getContext("2d"),b)}e.shapes={};function v(R){const C=this.attrs.fillRule;C?R.fill(C):R.fill()}function g(R){R.stroke()}function O(R){const C=this.attrs.fillRule;C?R.fill(C):R.fill()}function h(R){R.stroke()}function p(){this._clearCache(f)}function m(){this._clearCache(E)}function x(){this._clearCache(_)}function N(){this._clearCache(S)}function T(){this._clearCache(w)}class I extends a.Node{constructor(C){super(C);let M;for(;M=t.Util.getRandomColor(),!(M&&!(M in e.shapes)););this.colorKey=M,e.shapes[M]=this}getContext(){return t.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return t.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(f,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const M=y().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(M&&M.setTransform){const k=new t.Transform;k.translate(this.fillPatternX(),this.fillPatternY()),k.rotate(i.Konva.getAngle(this.fillPatternRotation())),k.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),k.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const A=k.getMatrix(),L=typeof DOMMatrix>"u"?{a:A[0],b:A[1],c:A[2],d:A[3],e:A[4],f:A[5]}:new DOMMatrix(A);M.setTransform(L)}return M}}_getLinearGradient(){return this._getCache(S,this.__getLinearGradient)}__getLinearGradient(){const C=this.fillLinearGradientColorStops();if(C){const M=y(),k=this.fillLinearGradientStartPoint(),A=this.fillLinearGradientEndPoint(),L=M.createLinearGradient(k.x,k.y,A.x,A.y);for(let z=0;z<C.length;z+=2)L.addColorStop(C[z],C[z+1]);return L}}_getRadialGradient(){return this._getCache(w,this.__getRadialGradient)}__getRadialGradient(){const C=this.fillRadialGradientColorStops();if(C){const M=y(),k=this.fillRadialGradientStartPoint(),A=this.fillRadialGradientEndPoint(),L=M.createRadialGradient(k.x,k.y,this.fillRadialGradientStartRadius(),A.x,A.y,this.fillRadialGradientEndRadius());for(let z=0;z<C.length;z+=2)L.addColorStop(C[z],C[z+1]);return L}}getShadowRGBA(){return this._getCache(E,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const C=t.Util.colorToRGBA(this.shadowColor());if(C)return"rgba("+C.r+","+C.g+","+C.b+","+C.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 C=this.hitStrokeWidth();return C==="auto"?this.hasStroke():this.strokeEnabled()&&!!C}intersects(C){const M=this.getStage();if(!M)return!1;const k=M.bufferHitCanvas;return k.getContext().clear(),this.drawHit(k,void 0,!0),k.context.getImageData(Math.round(C.x),Math.round(C.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(C){var M;if(!((M=this.attrs.perfectDrawEnabled)!==null&&M!==void 0?M:!0))return!1;const A=C||this.hasFill(),L=this.hasStroke(),z=this.getAbsoluteOpacity()!==1;if(A&&L&&z)return!0;const Y=this.hasShadow(),$=this.shadowForStrokeEnabled();return!!(A&&L&&Y&&$)}setStrokeHitEnabled(C){t.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),C?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const C=this.size();return{x:this._centroid?-C.width/2:0,y:this._centroid?-C.height/2:0,width:C.width,height:C.height}}getClientRect(C={}){let M=!1,k=this.getParent();for(;k;){if(k.isCached()){M=!0;break}k=k.getParent()}const A=C.skipTransform,L=C.relativeTo||M&&this.getStage()||void 0,z=this.getSelfRect(),$=!C.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,X=z.width+$,q=z.height+$,D=!C.skipShadow&&this.hasShadow(),B=D?this.shadowOffsetX():0,U=D?this.shadowOffsetY():0,W=X+Math.abs(B),ee=q+Math.abs(U),ne=D&&this.shadowBlur()||0,te=W+ne*2,Z=ee+ne*2,ae={width:te,height:Z,x:-($/2+ne)+Math.min(B,0)+z.x,y:-($/2+ne)+Math.min(U,0)+z.y};return A?ae:this._transformedRect(ae,L)}drawScene(C,M,k){const A=this.getLayer();let L=C||A.getCanvas(),z=L.getContext(),Y=this._getCanvasCache(),$=this.getSceneFunc(),X=this.hasShadow(),q,D;const B=L.isCache,U=M===this;if(!this.isVisible()&&!U)return this;if(Y){z.save();const ee=this.getAbsoluteTransform(M).getMatrix();return z.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(z),z.restore(),this}if(!$)return this;if(z.save(),this._useBufferCanvas()&&!B){q=this.getStage();const ee=k||q.bufferCanvas;D=ee.getContext(),D.clear(),D.save(),D._applyLineJoin(this);var W=this.getAbsoluteTransform(M).getMatrix();D.transform(W[0],W[1],W[2],W[3],W[4],W[5]),$.call(this,D,this),D.restore();const ne=ee.pixelRatio;X&&z._applyShadow(this),z._applyOpacity(this),z._applyGlobalCompositeOperation(this),z.drawImage(ee._canvas,0,0,ee.width/ne,ee.height/ne)}else{if(z._applyLineJoin(this),!U){var W=this.getAbsoluteTransform(M).getMatrix();z.transform(W[0],W[1],W[2],W[3],W[4],W[5]),z._applyOpacity(this),z._applyGlobalCompositeOperation(this)}X&&z._applyShadow(this),$.call(this,z,this)}return z.restore(),this}drawHit(C,M,k=!1){if(!this.shouldDrawHit(M,k))return this;const A=this.getLayer(),L=C||A.hitCanvas,z=L&&L.getContext(),Y=this.hitFunc()||this.sceneFunc(),$=this._getCanvasCache(),X=$&&$.hit;if(this.colorKey||t.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()"),X){z.save();const D=this.getAbsoluteTransform(M).getMatrix();return z.transform(D[0],D[1],D[2],D[3],D[4],D[5]),this._drawCachedHitCanvas(z),z.restore(),this}if(!Y)return this;if(z.save(),z._applyLineJoin(this),!(this===M)){const D=this.getAbsoluteTransform(M).getMatrix();z.transform(D[0],D[1],D[2],D[3],D[4],D[5])}return Y.call(this,z,this),z.restore(),this}drawHitFromCache(C=0){const M=this._getCanvasCache(),k=this._getCachedSceneCanvas(),A=M.hit,L=A.getContext(),z=A.getWidth(),Y=A.getHeight();L.clear(),L.drawImage(k._canvas,0,0,z,Y);try{const $=L.getImageData(0,0,z,Y),X=$.data,q=X.length,D=t.Util._hexToRgb(this.colorKey);for(let B=0;B<q;B+=4)X[B+3]>C?(X[B]=D.r,X[B+1]=D.g,X[B+2]=D.b,X[B+3]=255):X[B+3]=0;L.putImageData($,0,0)}catch($){t.Util.error("Unable to draw hit graph from cached scene canvas. "+$.message)}return this}hasPointerCapture(C){return c.hasPointerCapture(C,this)}setPointerCapture(C){c.setPointerCapture(C,this)}releaseCapture(C){c.releaseCapture(C,this)}}e.Shape=I,I.prototype._fillFunc=v,I.prototype._strokeFunc=g,I.prototype._fillFuncHit=O,I.prototype._strokeFuncHit=h,I.prototype._centroid=!1,I.prototype.nodeType="Shape",(0,s._registerNode)(I),I.prototype.eventListeners={},I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",p),I.prototype.on.call(I.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",x),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",N),I.prototype.on.call(I.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",T),r.Factory.addGetterSetter(I,"stroke",void 0,(0,l.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"strokeWidth",2,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillAfterStrokeEnabled",!1),r.Factory.addGetterSetter(I,"hitStrokeWidth","auto",(0,l.getNumberOrAutoValidator)()),r.Factory.addGetterSetter(I,"strokeHitEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(I,"perfectDrawEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(I,"shadowForStrokeEnabled",!0,(0,l.getBooleanValidator)()),r.Factory.addGetterSetter(I,"lineJoin"),r.Factory.addGetterSetter(I,"lineCap"),r.Factory.addGetterSetter(I,"sceneFunc"),r.Factory.addGetterSetter(I,"hitFunc"),r.Factory.addGetterSetter(I,"dash"),r.Factory.addGetterSetter(I,"dashOffset",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowColor",void 0,(0,l.getStringValidator)()),r.Factory.addGetterSetter(I,"shadowBlur",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOpacity",1,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"shadowOffset",["x","y"]),r.Factory.addGetterSetter(I,"shadowOffsetX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"shadowOffsetY",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternImage"),r.Factory.addGetterSetter(I,"fill",void 0,(0,l.getStringOrGradientValidator)()),r.Factory.addGetterSetter(I,"fillPatternX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternY",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillLinearGradientColorStops"),r.Factory.addGetterSetter(I,"strokeLinearGradientColorStops"),r.Factory.addGetterSetter(I,"fillRadialGradientStartRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndRadius",0),r.Factory.addGetterSetter(I,"fillRadialGradientColorStops"),r.Factory.addGetterSetter(I,"fillPatternRepeat","repeat"),r.Factory.addGetterSetter(I,"fillEnabled",!0),r.Factory.addGetterSetter(I,"strokeEnabled",!0),r.Factory.addGetterSetter(I,"shadowEnabled",!0),r.Factory.addGetterSetter(I,"dashEnabled",!0),r.Factory.addGetterSetter(I,"strokeScaleEnabled",!0),r.Factory.addGetterSetter(I,"fillPriority","color"),r.Factory.addComponentsGetterSetter(I,"fillPatternOffset",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternOffsetX",0,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternOffsetY",0,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillPatternScale",["x","y"]),r.Factory.addGetterSetter(I,"fillPatternScaleX",1,(0,l.getNumberValidator)()),r.Factory.addGetterSetter(I,"fillPatternScaleY",1,(0,l.getNumberValidator)()),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientStartPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientStartPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillLinearGradientEndPoint",["x","y"]),r.Factory.addComponentsGetterSetter(I,"strokeLinearGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillLinearGradientEndPointY",0),r.Factory.addGetterSetter(I,"strokeLinearGradientEndPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientStartPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientStartPointY",0),r.Factory.addComponentsGetterSetter(I,"fillRadialGradientEndPoint",["x","y"]),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointX",0),r.Factory.addGetterSetter(I,"fillRadialGradientEndPointY",0),r.Factory.addGetterSetter(I,"fillPatternRotation",0),r.Factory.addGetterSetter(I,"fillRule",void 0,(0,l.getStringValidator)()),r.Factory.backCompat(I,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(Wg)),Wg}var my;function ww(){if(my)return Of;my=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.Layer=void 0;const e=zr(),i=qp(),t=Yr(),r=Ft(),a=Up(),l=Ut(),s=On(),c=Nt(),f="#",E="beforeDraw",_="draw",S=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],w=S.length;class b extends i.Container{constructor(v){super(v),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(v){return this.getContext().clear(v),this.getHitCanvas().getContext().clear(v),this}setZIndex(v){super.setZIndex(v);const g=this.getStage();return g&&g.content&&(g.content.removeChild(this.getNativeCanvasElement()),v<g.children.length-1?g.content.insertBefore(this.getNativeCanvasElement(),g.children[v+1].getCanvas()._canvas):g.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const v=this.getStage();return v&&v.content&&(v.content.removeChild(this.getNativeCanvasElement()),v.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const g=this.getStage();return!g||!g.content?!1:(g.content.removeChild(this.getNativeCanvasElement()),this.index<g.children.length-1?g.content.insertBefore(this.getNativeCanvasElement(),g.children[this.index+1].getCanvas()._canvas):g.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const v=this.getStage();if(v){const g=v.children;v.content&&(v.content.removeChild(this.getNativeCanvasElement()),v.content.insertBefore(this.getNativeCanvasElement(),g[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const v=this.getStage();if(v){const g=v.children;v.content&&(v.content.removeChild(this.getNativeCanvasElement()),v.content.insertBefore(this.getNativeCanvasElement(),g[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const v=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),v&&v.parentNode&&e.Util._isInDocument(v)&&v.parentNode.removeChild(v),this}getStage(){return this.parent}setSize({width:v,height:g}){return this.canvas.setSize(v,g),this.hitCanvas.setSize(v,g),this._setSmoothEnabled(),this}_validateAdd(v){const g=v.getType();g!=="Group"&&g!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(v){return v=v||{},v.width=v.width||this.getWidth(),v.height=v.height||this.getHeight(),v.x=v.x!==void 0?v.x:this.x(),v.y=v.y!==void 0?v.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,v)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(v){if(!this.isListening()||!this.isVisible())return null;let g=1,O=!1;for(;;){for(let h=0;h<w;h++){const p=S[h],m=this._getIntersection({x:v.x+p.x*g,y:v.y+p.y*g}),x=m.shape;if(x)return x;if(O=!!m.antialiased,!m.antialiased)break}if(O)g+=1;else return null}}_getIntersection(v){const g=this.hitCanvas.pixelRatio,O=this.hitCanvas.context.getImageData(Math.round(v.x*g),Math.round(v.y*g),1,1).data,h=O[3];if(h===255){const p=e.Util._rgbToHex(O[0],O[1],O[2]),m=s.shapes[f+p];return m?{shape:m}:{antialiased:!0}}else if(h>0)return{antialiased:!0};return{}}drawScene(v,g){const O=this.getLayer(),h=v||O&&O.getCanvas();return this._fire(E,{node:this}),this.clearBeforeDraw()&&h.getContext().clear(),i.Container.prototype.drawScene.call(this,h,g),this._fire(_,{node:this}),this}drawHit(v,g){const O=this.getLayer(),h=v||O&&O.hitCanvas;return O&&O.clearBeforeDraw()&&O.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,h,g),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(v){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(v)}getHitGraphEnabled(v){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const v=this.parent;!!this.hitCanvas._canvas.parentNode?v.content.removeChild(this.hitCanvas._canvas):v.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}return Of.Layer=b,b.prototype.nodeType="Layer",(0,c._registerNode)(b),r.Factory.addGetterSetter(b,"imageSmoothingEnabled",!0),r.Factory.addGetterSetter(b,"clearBeforeDraw",!0),r.Factory.addGetterSetter(b,"hitGraphEnabled",!0,(0,l.getBooleanValidator)()),Of}var Pf={},yy;function d9(){if(yy)return Pf;yy=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.FastLayer=void 0;const e=zr(),i=ww(),t=Nt();class r extends i.Layer{constructor(l){super(l),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}return Pf.FastLayer=r,r.prototype.nodeType="FastLayer",(0,t._registerNode)(r),Pf}var Cf={},by;function Tv(){if(by)return Cf;by=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Group=void 0;const e=zr(),i=qp(),t=Nt();class r extends i.Container{_validateAdd(l){const s=l.getType();s!=="Group"&&s!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}}return Cf.Group=r,r.prototype.nodeType="Group",(0,t._registerNode)(r),Cf}var kf={},wy;function Rv(){if(wy)return kf;wy=1,Object.defineProperty(kf,"__esModule",{value:!0}),kf.Animation=void 0;const e=Nt(),i=zr(),t=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let r=class ac{constructor(l,s){this.id=ac.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t(),frameRate:0},this.func=l,this.setLayers(s)}setLayers(l){let s=[];return l&&(s=Array.isArray(l)?l:[l]),this.layers=s,this}getLayers(){return this.layers}addLayer(l){const s=this.layers,c=s.length;for(let f=0;f<c;f++)if(s[f]._id===l._id)return!1;return this.layers.push(l),!0}isRunning(){const s=ac.animations,c=s.length;for(let f=0;f<c;f++)if(s[f].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=t(),ac._addAnimation(this),this}stop(){return ac._removeAnimation(this),this}_updateFrameObject(l){this.frame.timeDiff=l-this.frame.lastTime,this.frame.lastTime=l,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(l){this.animations.push(l),this._handleAnimation()}static _removeAnimation(l){const s=l.id,c=this.animations,f=c.length;for(let E=0;E<f;E++)if(c[E].id===s){this.animations.splice(E,1);break}}static _runFrames(){const l={},s=this.animations;for(let c=0;c<s.length;c++){const f=s[c],E=f.layers,_=f.func;f._updateFrameObject(t());const S=E.length;let w;if(_?w=_.call(f,f.frame)!==!1:w=!0,!!w)for(let b=0;b<S;b++){const y=E[b];y._id!==void 0&&(l[y._id]=y)}}for(const c in l)l.hasOwnProperty(c)&&l[c].batchDraw()}static _animationLoop(){const l=ac;l.animations.length?(l._runFrames(),i.Util.requestAnimFrame(l._animationLoop)):l.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,i.Util.requestAnimFrame(this._animationLoop))}};return kf.Animation=r,r.animations=[],r.animIdCounter=0,r.animRunning=!1,kf}var Yg={},_y;function h9(){return _y||(_y=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const i=zr(),t=Rv(),r=Yr(),a=Nt(),l={node:1,duration:1,easing:1,onFinish:1,yoyo:1},s=1,c=2,f=3,E=["fill","stroke","shadowColor"];let _=0;class S{constructor(y,v,g,O,h,p,m){this.prop=y,this.propFunc=v,this.begin=O,this._pos=O,this.duration=p,this._change=0,this.prevPos=0,this.yoyo=m,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=g,this._change=h-this.begin,this.pause()}fire(y){const v=this[y];v&&v()}setTime(y){y>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():y<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=y,this.update())}getTime(){return this._time}setPosition(y){this.prevPos=this._pos,this.propFunc(y),this._pos=y}getPosition(y){return y===void 0&&(y=this._time),this.func(y,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=f,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(y){this.pause(),this._time=y,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const y=this.getTimer()-this._startTime;this.state===c?this.setTime(y):this.state===f&&this.setTime(this.duration-y)}pause(){this.state=s,this.fire("onPause")}getTimer(){return new Date().getTime()}}class w{constructor(y){const v=this,g=y.node,O=g._id,h=y.easing||e.Easings.Linear,p=!!y.yoyo;let m,x;typeof y.duration>"u"?m=.3:y.duration===0?m=.001:m=y.duration,this.node=g,this._id=_++;const N=g.getLayer()||(g instanceof a.Konva.Stage?g.getLayers():null);N||i.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new t.Animation(function(){v.tween.onEnterFrame()},N),this.tween=new S(x,function(T){v._tweenFunc(T)},h,0,1,m*1e3,p),this._addListeners(),w.attrs[O]||(w.attrs[O]={}),w.attrs[O][this._id]||(w.attrs[O][this._id]={}),w.tweens[O]||(w.tweens[O]={});for(x in y)l[x]===void 0&&this._addAttr(x,y[x]);this.reset(),this.onFinish=y.onFinish,this.onReset=y.onReset,this.onUpdate=y.onUpdate}_addAttr(y,v){const g=this.node,O=g._id;let h,p,m,x,N;const T=w.tweens[O][y];T&&delete w.attrs[O][T][y];let I=g.getAttr(y);if(i.Util._isArray(v))if(h=[],p=Math.max(v.length,I.length),y==="points"&&v.length!==I.length&&(v.length>I.length?(x=I,I=i.Util._prepareArrayForTween(I,v,g.closed())):(m=v,v=i.Util._prepareArrayForTween(v,I,g.closed()))),y.indexOf("fill")===0)for(let R=0;R<p;R++)if(R%2===0)h.push(v[R]-I[R]);else{const C=i.Util.colorToRGBA(I[R]);N=i.Util.colorToRGBA(v[R]),I[R]=C,h.push({r:N.r-C.r,g:N.g-C.g,b:N.b-C.b,a:N.a-C.a})}else for(let R=0;R<p;R++)h.push(v[R]-I[R]);else E.indexOf(y)!==-1?(I=i.Util.colorToRGBA(I),N=i.Util.colorToRGBA(v),h={r:N.r-I.r,g:N.g-I.g,b:N.b-I.b,a:N.a-I.a}):h=v-I;w.attrs[O][this._id][y]={start:I,diff:h,end:v,trueEnd:m,trueStart:x},w.tweens[O][y]=this._id}_tweenFunc(y){const v=this.node,g=w.attrs[v._id][this._id];let O,h,p,m,x,N,T,I;for(O in g){if(h=g[O],p=h.start,m=h.diff,I=h.end,i.Util._isArray(p))if(x=[],T=Math.max(p.length,I.length),O.indexOf("fill")===0)for(N=0;N<T;N++)N%2===0?x.push((p[N]||0)+m[N]*y):x.push("rgba("+Math.round(p[N].r+m[N].r*y)+","+Math.round(p[N].g+m[N].g*y)+","+Math.round(p[N].b+m[N].b*y)+","+(p[N].a+m[N].a*y)+")");else for(N=0;N<T;N++)x.push((p[N]||0)+m[N]*y);else E.indexOf(O)!==-1?x="rgba("+Math.round(p.r+m.r*y)+","+Math.round(p.g+m.g*y)+","+Math.round(p.b+m.b*y)+","+(p.a+m.a*y)+")":x=p+m*y;v.setAttr(O,x)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const y=this.node,v=w.attrs[y._id][this._id];v.points&&v.points.trueEnd&&y.setAttr("points",v.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const y=this.node,v=w.attrs[y._id][this._id];v.points&&v.points.trueStart&&y.points(v.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(y){return this.tween.seek(y*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const y=this.node._id,v=this._id,g=w.tweens[y];this.pause();for(const O in g)delete w.tweens[y][O];delete w.attrs[y][v]}}e.Tween=w,w.attrs={},w.tweens={},r.Node.prototype.to=function(b){const y=b.onFinish;b.node=this,b.onFinish=function(){this.destroy(),y&&y()},new w(b).play()},e.Easings={BackEaseIn(b,y,v,g){return v*(b/=g)*b*((1.70158+1)*b-1.70158)+y},BackEaseOut(b,y,v,g){return v*((b=b/g-1)*b*((1.70158+1)*b+1.70158)+1)+y},BackEaseInOut(b,y,v,g){let O=1.70158;return(b/=g/2)<1?v/2*(b*b*(((O*=1.525)+1)*b-O))+y:v/2*((b-=2)*b*(((O*=1.525)+1)*b+O)+2)+y},ElasticEaseIn(b,y,v,g,O,h){let p=0;return b===0?y:(b/=g)===1?y+v:(h||(h=g*.3),!O||O<Math.abs(v)?(O=v,p=h/4):p=h/(2*Math.PI)*Math.asin(v/O),-(O*Math.pow(2,10*(b-=1))*Math.sin((b*g-p)*(2*Math.PI)/h))+y)},ElasticEaseOut(b,y,v,g,O,h){let p=0;return b===0?y:(b/=g)===1?y+v:(h||(h=g*.3),!O||O<Math.abs(v)?(O=v,p=h/4):p=h/(2*Math.PI)*Math.asin(v/O),O*Math.pow(2,-10*b)*Math.sin((b*g-p)*(2*Math.PI)/h)+v+y)},ElasticEaseInOut(b,y,v,g,O,h){let p=0;return b===0?y:(b/=g/2)===2?y+v:(h||(h=g*(.3*1.5)),!O||O<Math.abs(v)?(O=v,p=h/4):p=h/(2*Math.PI)*Math.asin(v/O),b<1?-.5*(O*Math.pow(2,10*(b-=1))*Math.sin((b*g-p)*(2*Math.PI)/h))+y:O*Math.pow(2,-10*(b-=1))*Math.sin((b*g-p)*(2*Math.PI)/h)*.5+v+y)},BounceEaseOut(b,y,v,g){return(b/=g)<1/2.75?v*(7.5625*b*b)+y:b<2/2.75?v*(7.5625*(b-=1.5/2.75)*b+.75)+y:b<2.5/2.75?v*(7.5625*(b-=2.25/2.75)*b+.9375)+y:v*(7.5625*(b-=2.625/2.75)*b+.984375)+y},BounceEaseIn(b,y,v,g){return v-e.Easings.BounceEaseOut(g-b,0,v,g)+y},BounceEaseInOut(b,y,v,g){return b<g/2?e.Easings.BounceEaseIn(b*2,0,v,g)*.5+y:e.Easings.BounceEaseOut(b*2-g,0,v,g)*.5+v*.5+y},EaseIn(b,y,v,g){return v*(b/=g)*b+y},EaseOut(b,y,v,g){return-v*(b/=g)*(b-2)+y},EaseInOut(b,y,v,g){return(b/=g/2)<1?v/2*b*b+y:-v/2*(--b*(b-2)-1)+y},StrongEaseIn(b,y,v,g){return v*(b/=g)*b*b*b*b+y},StrongEaseOut(b,y,v,g){return v*((b=b/g-1)*b*b*b*b+1)+y},StrongEaseInOut(b,y,v,g){return(b/=g/2)<1?v/2*b*b*b*b*b+y:v/2*((b-=2)*b*b*b*b+2)+y},Linear(b,y,v,g){return v*b/g+y}}}(Yg)),Yg}var Sy;function nv(){return Sy||(Sy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const i=Nt(),t=zr(),r=Yr(),a=qp(),l=f9(),s=ww(),c=d9(),f=Tv(),E=Av(),_=On(),S=Rv(),w=h9(),b=yw(),y=Up();e.Konva=t.Util._assign(i.Konva,{Util:t.Util,Transform:t.Transform,Node:r.Node,Container:a.Container,Stage:l.Stage,stages:l.stages,Layer:s.Layer,FastLayer:c.FastLayer,Group:f.Group,DD:E.DD,Shape:_.Shape,shapes:_.shapes,Animation:S.Animation,Tween:w.Tween,Easings:w.Easings,Context:b.Context,Canvas:y.Canvas}),e.default=e.Konva}(Ug)),Ug}var Af={},Ey;function p9(){if(Ey)return Af;Ey=1,Object.defineProperty(Af,"__esModule",{value:!0}),Af.Arc=void 0;const e=Ft(),i=On(),t=Nt(),r=Ut(),a=Nt();class l extends i.Shape{_sceneFunc(c){const f=t.Konva.getAngle(this.angle()),E=this.clockwise();c.beginPath(),c.arc(0,0,this.outerRadius(),0,f,E),c.arc(0,0,this.innerRadius(),f,0,!E),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}getSelfRect(){const c=this.innerRadius(),f=this.outerRadius(),E=this.clockwise(),_=t.Konva.getAngle(E?360-this.angle():this.angle()),S=Math.cos(Math.min(_,Math.PI)),w=1,b=Math.sin(Math.min(Math.max(Math.PI,_),3*Math.PI/2)),y=Math.sin(Math.min(_,Math.PI/2)),v=S*(S>0?c:f),g=w*f,O=b*(b>0?c:f),h=y*(y>0?f:c);return{x:v,y:E?-1*h:O,width:g-v,height:h-O}}}return Af.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1,(0,r.getBooleanValidator)()),Af}var Tf={},Rf={},xy;function _w(){if(xy)return Rf;xy=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.Line=void 0;const e=Ft(),i=Nt(),t=On(),r=Ut();function a(c,f,E,_,S,w,b){const y=Math.sqrt(Math.pow(E-c,2)+Math.pow(_-f,2)),v=Math.sqrt(Math.pow(S-E,2)+Math.pow(w-_,2)),g=b*y/(y+v),O=b*v/(y+v),h=E-g*(S-c),p=_-g*(w-f),m=E+O*(S-c),x=_+O*(w-f);return[h,p,m,x]}function l(c,f){const E=c.length,_=[];for(let S=2;S<E-2;S+=2){const w=a(c[S-2],c[S-1],c[S],c[S+1],c[S+2],c[S+3],f);isNaN(w[0])||(_.push(w[0]),_.push(w[1]),_.push(c[S]),_.push(c[S+1]),_.push(w[2]),_.push(w[3]))}return _}class s extends t.Shape{constructor(f){super(f),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(f){let E=this.points(),_=E.length,S=this.tension(),w=this.closed(),b=this.bezier(),y,v,g;if(_){if(f.beginPath(),f.moveTo(E[0],E[1]),S!==0&&_>4){for(y=this.getTensionPoints(),v=y.length,g=w?0:4,w||f.quadraticCurveTo(y[0],y[1],y[2],y[3]);g<v-2;)f.bezierCurveTo(y[g++],y[g++],y[g++],y[g++],y[g++],y[g++]);w||f.quadraticCurveTo(y[v-2],y[v-1],E[_-2],E[_-1])}else if(b)for(g=2;g<_;)f.bezierCurveTo(E[g++],E[g++],E[g++],E[g++],E[g++],E[g++]);else for(g=2;g<_;g+=2)f.lineTo(E[g],E[g+1]);w?(f.closePath(),f.fillStrokeShape(this)):f.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){const f=this.points(),E=f.length,_=this.tension(),S=a(f[E-2],f[E-1],f[0],f[1],f[2],f[3],_),w=a(f[E-4],f[E-3],f[E-2],f[E-1],f[0],f[1],_),b=l(f,_);return[S[2],S[3]].concat(b).concat([w[0],w[1],f[E-2],f[E-1],w[2],w[3],S[0],S[1],f[0],f[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let f=this.points();if(f.length<4)return{x:f[0]||0,y:f[1]||0,width:0,height:0};this.tension()!==0?f=[f[0],f[1],...this._getTensionPoints(),f[f.length-2],f[f.length-1]]:f=this.points();let E=f[0],_=f[0],S=f[1],w=f[1],b,y;for(let v=0;v<f.length/2;v++)b=f[v*2],y=f[v*2+1],E=Math.min(E,b),_=Math.max(_,b),S=Math.min(S,y),w=Math.max(w,y);return{x:E,y:S,width:_-E,height:w-S}}}return Rf.Line=s,s.prototype.className="Line",s.prototype._attrsAffectingSize=["points","bezier","tension"],(0,i._registerNode)(s),e.Factory.addGetterSetter(s,"closed",!1),e.Factory.addGetterSetter(s,"bezier",!1),e.Factory.addGetterSetter(s,"tension",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(s,"points",[],(0,r.getNumberArrayValidator)()),Rf}var Mf={},Kg={},Oy;function g9(){return Oy||(Oy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const i=(s,c,f)=>{let E,_;const w=f/2;E=0;for(let b=0;b<20;b++)_=w*e.tValues[20][b]+w,E+=e.cValues[20][b]*r(s,c,_);return w*E};e.getCubicArcLength=i;const t=(s,c,f)=>{f===void 0&&(f=1);const E=s[0]-2*s[1]+s[2],_=c[0]-2*c[1]+c[2],S=2*s[1]-2*s[0],w=2*c[1]-2*c[0],b=4*(E*E+_*_),y=4*(E*S+_*w),v=S*S+w*w;if(b===0)return f*Math.sqrt(Math.pow(s[2]-s[0],2)+Math.pow(c[2]-c[0],2));const g=y/(2*b),O=v/b,h=f+g,p=O-g*g,m=h*h+p>0?Math.sqrt(h*h+p):0,x=g*g+p>0?Math.sqrt(g*g+p):0,N=g+Math.sqrt(g*g+p)!==0?p*Math.log(Math.abs((h+m)/(g+x))):0;return Math.sqrt(b)/2*(h*m-g*x+N)};e.getQuadraticArcLength=t;function r(s,c,f){const E=a(1,f,s),_=a(1,f,c),S=E*E+_*_;return Math.sqrt(S)}const a=(s,c,f)=>{const E=f.length-1;let _,S;if(E===0)return 0;if(s===0){S=0;for(let w=0;w<=E;w++)S+=e.binomialCoefficients[E][w]*Math.pow(1-c,E-w)*Math.pow(c,w)*f[w];return S}else{_=new Array(E);for(let w=0;w<E;w++)_[w]=E*(f[w+1]-f[w]);return a(s-1,c,_)}},l=(s,c,f)=>{let E=1,_=s/c,S=(s-f(_))/c,w=0;for(;E>.001;){const b=f(_+S),y=Math.abs(s-b)/c;if(y<E)E=y,_+=S;else{const v=f(_-S),g=Math.abs(s-v)/c;g<E?(E=g,_-=S):S/=2}if(w++,w>500)break}return _};e.t2length=l}(Kg)),Kg}var Py;function Mv(){if(Py)return Mf;Py=1,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.Path=void 0;const e=Ft(),i=On(),t=Nt(),r=g9();class a extends i.Shape{constructor(s){super(s),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(s){const c=this.dataArray;s.beginPath();let f=!1;for(let m=0;m<c.length;m++){const x=c[m].command,N=c[m].points;switch(x){case"L":s.lineTo(N[0],N[1]);break;case"M":s.moveTo(N[0],N[1]);break;case"C":s.bezierCurveTo(N[0],N[1],N[2],N[3],N[4],N[5]);break;case"Q":s.quadraticCurveTo(N[0],N[1],N[2],N[3]);break;case"A":var E=N[0],_=N[1],S=N[2],w=N[3],b=N[4],y=N[5],v=N[6],g=N[7],O=S>w?S:w,h=S>w?1:S/w,p=S>w?w/S:1;s.translate(E,_),s.rotate(v),s.scale(h,p),s.arc(0,0,O,b,b+y,1-g),s.scale(1/h,1/p),s.rotate(-v),s.translate(-E,-_);break;case"z":f=!0,s.closePath();break}}!f&&!this.hasFill()?s.strokeShape(this):s.fillStrokeShape(this)}getSelfRect(){let s=[];this.dataArray.forEach(function(b){if(b.command==="A"){const y=b.points[4],v=b.points[5],g=b.points[4]+v;let O=Math.PI/180;if(Math.abs(y-g)<O&&(O=Math.abs(y-g)),v<0)for(let h=y-O;h>g;h-=O){const p=a.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],h,0);s.push(p.x,p.y)}else for(let h=y+O;h<g;h+=O){const p=a.getPointOnEllipticalArc(b.points[0],b.points[1],b.points[2],b.points[3],h,0);s.push(p.x,p.y)}}else if(b.command==="C")for(let y=0;y<=1;y+=.01){const v=a.getPointOnCubicBezier(y,b.start.x,b.start.y,b.points[0],b.points[1],b.points[2],b.points[3],b.points[4],b.points[5]);s.push(v.x,v.y)}else s=s.concat(b.points)});let c=s[0],f=s[0],E=s[1],_=s[1],S,w;for(let b=0;b<s.length/2;b++)S=s[b*2],w=s[b*2+1],isNaN(S)||(c=Math.min(c,S),f=Math.max(f,S)),isNaN(w)||(E=Math.min(E,w),_=Math.max(_,w));return{x:c,y:E,width:f-c,height:_-E}}getLength(){return this.pathLength}getPointAtLength(s){return a.getPointAtLengthOfDataArray(s,this.dataArray)}static getLineLength(s,c,f,E){return Math.sqrt((f-s)*(f-s)+(E-c)*(E-c))}static getPathLength(s){let c=0;for(let f=0;f<s.length;++f)c+=s[f].pathLength;return c}static getPointAtLengthOfDataArray(s,c){let f,E=0,_=c.length;if(!_)return null;for(;E<_&&s>c[E].pathLength;)s-=c[E].pathLength,++E;if(E===_)return f=c[E-1].points.slice(-2),{x:f[0],y:f[1]};if(s<.01)return f=c[E].points.slice(0,2),{x:f[0],y:f[1]};const S=c[E],w=S.points;switch(S.command){case"L":return a.getPointOnLine(s,S.start.x,S.start.y,w[0],w[1]);case"C":return a.getPointOnCubicBezier((0,r.t2length)(s,a.getPathLength(c),m=>(0,r.getCubicArcLength)([S.start.x,w[0],w[2],w[4]],[S.start.y,w[1],w[3],w[5]],m)),S.start.x,S.start.y,w[0],w[1],w[2],w[3],w[4],w[5]);case"Q":return a.getPointOnQuadraticBezier((0,r.t2length)(s,a.getPathLength(c),m=>(0,r.getQuadraticArcLength)([S.start.x,w[0],w[2]],[S.start.y,w[1],w[3]],m)),S.start.x,S.start.y,w[0],w[1],w[2],w[3]);case"A":var b=w[0],y=w[1],v=w[2],g=w[3],O=w[4],h=w[5],p=w[6];return O+=h*s/S.pathLength,a.getPointOnEllipticalArc(b,y,v,g,O,p)}return null}static getPointOnLine(s,c,f,E,_,S,w){S=S??c,w=w??f;const b=this.getLineLength(c,f,E,_);if(b<1e-10)return{x:c,y:f};if(E===c)return{x:S,y:w+(_>f?s:-s)};const y=(_-f)/(E-c),v=Math.sqrt(s*s/(1+y*y))*(E<c?-1:1),g=y*v;if(Math.abs(w-f-y*(S-c))<1e-10)return{x:S+v,y:w+g};const O=((S-c)*(E-c)+(w-f)*(_-f))/(b*b),h=c+O*(E-c),p=f+O*(_-f),m=this.getLineLength(S,w,h,p),x=Math.sqrt(s*s-m*m),N=Math.sqrt(x*x/(1+y*y))*(E<c?-1:1),T=y*N;return{x:h+N,y:p+T}}static getPointOnCubicBezier(s,c,f,E,_,S,w,b,y){function v(x){return x*x*x}function g(x){return 3*x*x*(1-x)}function O(x){return 3*x*(1-x)*(1-x)}function h(x){return(1-x)*(1-x)*(1-x)}const p=b*v(s)+S*g(s)+E*O(s)+c*h(s),m=y*v(s)+w*g(s)+_*O(s)+f*h(s);return{x:p,y:m}}static getPointOnQuadraticBezier(s,c,f,E,_,S,w){function b(h){return h*h}function y(h){return 2*h*(1-h)}function v(h){return(1-h)*(1-h)}const g=S*b(s)+E*y(s)+c*v(s),O=w*b(s)+_*y(s)+f*v(s);return{x:g,y:O}}static getPointOnEllipticalArc(s,c,f,E,_,S){const w=Math.cos(S),b=Math.sin(S),y={x:f*Math.cos(_),y:E*Math.sin(_)};return{x:s+(y.x*w-y.y*b),y:c+(y.x*b+y.y*w)}}static parsePathData(s){if(!s)return[];let c=s;const f=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];c=c.replace(new RegExp(" ","g"),",");for(var E=0;E<f.length;E++)c=c.replace(new RegExp(f[E],"g"),"|"+f[E]);const _=c.split("|"),S=[],w=[];let b=0,y=0;const v=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let g;for(E=1;E<_.length;E++){let A=_[E],L=A.charAt(0);for(A=A.slice(1),w.length=0;g=v.exec(A);)w.push(g[0]);const z=[];for(let Y=0,$=w.length;Y<$;Y++){if(w[Y]==="00"){z.push(0,0);continue}const X=parseFloat(w[Y]);isNaN(X)?z.push(0):z.push(X)}for(;z.length>0&&!isNaN(z[0]);){let Y="",$=[];const X=b,q=y;var O,h,p,m,x,N,T,I,R,C;switch(L){case"l":b+=z.shift(),y+=z.shift(),Y="L",$.push(b,y);break;case"L":b=z.shift(),y=z.shift(),$.push(b,y);break;case"m":var M=z.shift(),k=z.shift();if(b+=M,y+=k,Y="M",S.length>2&&S[S.length-1].command==="z"){for(let D=S.length-2;D>=0;D--)if(S[D].command==="M"){b=S[D].points[0]+M,y=S[D].points[1]+k;break}}$.push(b,y),L="l";break;case"M":b=z.shift(),y=z.shift(),Y="M",$.push(b,y),L="L";break;case"h":b+=z.shift(),Y="L",$.push(b,y);break;case"H":b=z.shift(),Y="L",$.push(b,y);break;case"v":y+=z.shift(),Y="L",$.push(b,y);break;case"V":y=z.shift(),Y="L",$.push(b,y);break;case"C":$.push(z.shift(),z.shift(),z.shift(),z.shift()),b=z.shift(),y=z.shift(),$.push(b,y);break;case"c":$.push(b+z.shift(),y+z.shift(),b+z.shift(),y+z.shift()),b+=z.shift(),y+=z.shift(),Y="C",$.push(b,y);break;case"S":h=b,p=y,O=S[S.length-1],O.command==="C"&&(h=b+(b-O.points[2]),p=y+(y-O.points[3])),$.push(h,p,z.shift(),z.shift()),b=z.shift(),y=z.shift(),Y="C",$.push(b,y);break;case"s":h=b,p=y,O=S[S.length-1],O.command==="C"&&(h=b+(b-O.points[2]),p=y+(y-O.points[3])),$.push(h,p,b+z.shift(),y+z.shift()),b+=z.shift(),y+=z.shift(),Y="C",$.push(b,y);break;case"Q":$.push(z.shift(),z.shift()),b=z.shift(),y=z.shift(),$.push(b,y);break;case"q":$.push(b+z.shift(),y+z.shift()),b+=z.shift(),y+=z.shift(),Y="Q",$.push(b,y);break;case"T":h=b,p=y,O=S[S.length-1],O.command==="Q"&&(h=b+(b-O.points[0]),p=y+(y-O.points[1])),b=z.shift(),y=z.shift(),Y="Q",$.push(h,p,b,y);break;case"t":h=b,p=y,O=S[S.length-1],O.command==="Q"&&(h=b+(b-O.points[0]),p=y+(y-O.points[1])),b+=z.shift(),y+=z.shift(),Y="Q",$.push(h,p,b,y);break;case"A":m=z.shift(),x=z.shift(),N=z.shift(),T=z.shift(),I=z.shift(),R=b,C=y,b=z.shift(),y=z.shift(),Y="A",$=this.convertEndpointToCenterParameterization(R,C,b,y,T,I,m,x,N);break;case"a":m=z.shift(),x=z.shift(),N=z.shift(),T=z.shift(),I=z.shift(),R=b,C=y,b+=z.shift(),y+=z.shift(),Y="A",$=this.convertEndpointToCenterParameterization(R,C,b,y,T,I,m,x,N);break}S.push({command:Y||L,points:$,start:{x:X,y:q},pathLength:this.calcLength(X,q,Y||L,$)})}(L==="z"||L==="Z")&&S.push({command:"z",points:[],start:void 0,pathLength:0})}return S}static calcLength(s,c,f,E){let _,S,w,b;const y=a;switch(f){case"L":return y.getLineLength(s,c,E[0],E[1]);case"C":return(0,r.getCubicArcLength)([s,E[0],E[2],E[4]],[c,E[1],E[3],E[5]],1);case"Q":return(0,r.getQuadraticArcLength)([s,E[0],E[2]],[c,E[1],E[3]],1);case"A":_=0;var v=E[4],g=E[5],O=E[4]+g,h=Math.PI/180;if(Math.abs(v-O)<h&&(h=Math.abs(v-O)),S=y.getPointOnEllipticalArc(E[0],E[1],E[2],E[3],v,0),g<0)for(b=v-h;b>O;b-=h)w=y.getPointOnEllipticalArc(E[0],E[1],E[2],E[3],b,0),_+=y.getLineLength(S.x,S.y,w.x,w.y),S=w;else for(b=v+h;b<O;b+=h)w=y.getPointOnEllipticalArc(E[0],E[1],E[2],E[3],b,0),_+=y.getLineLength(S.x,S.y,w.x,w.y),S=w;return w=y.getPointOnEllipticalArc(E[0],E[1],E[2],E[3],O,0),_+=y.getLineLength(S.x,S.y,w.x,w.y),_}return 0}static convertEndpointToCenterParameterization(s,c,f,E,_,S,w,b,y){const v=y*(Math.PI/180),g=Math.cos(v)*(s-f)/2+Math.sin(v)*(c-E)/2,O=-1*Math.sin(v)*(s-f)/2+Math.cos(v)*(c-E)/2,h=g*g/(w*w)+O*O/(b*b);h>1&&(w*=Math.sqrt(h),b*=Math.sqrt(h));let p=Math.sqrt((w*w*(b*b)-w*w*(O*O)-b*b*(g*g))/(w*w*(O*O)+b*b*(g*g)));_===S&&(p*=-1),isNaN(p)&&(p=0);const m=p*w*O/b,x=p*-b*g/w,N=(s+f)/2+Math.cos(v)*m-Math.sin(v)*x,T=(c+E)/2+Math.sin(v)*m+Math.cos(v)*x,I=function(z){return Math.sqrt(z[0]*z[0]+z[1]*z[1])},R=function(z,Y){return(z[0]*Y[0]+z[1]*Y[1])/(I(z)*I(Y))},C=function(z,Y){return(z[0]*Y[1]<z[1]*Y[0]?-1:1)*Math.acos(R(z,Y))},M=C([1,0],[(g-m)/w,(O-x)/b]),k=[(g-m)/w,(O-x)/b],A=[(-1*g-m)/w,(-1*O-x)/b];let L=C(k,A);return R(k,A)<=-1&&(L=Math.PI),R(k,A)>=1&&(L=0),S===0&&L>0&&(L=L-2*Math.PI),S===1&&L<0&&(L=L+2*Math.PI),[N,T,w,b,M,L,v,S]}}return Mf.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),Mf}var Cy;function v9(){if(Cy)return Tf;Cy=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.Arrow=void 0;const e=Ft(),i=_w(),t=Ut(),r=Nt(),a=Mv();class l extends i.Line{_sceneFunc(c){super._sceneFunc(c);const f=Math.PI*2,E=this.points();let _=E;const S=this.tension()!==0&&E.length>4;S&&(_=this.getTensionPoints());const w=this.pointerLength(),b=E.length;let y,v;if(S){const h=[_[_.length-4],_[_.length-3],_[_.length-2],_[_.length-1],E[b-2],E[b-1]],p=a.Path.calcLength(_[_.length-4],_[_.length-3],"C",h),m=a.Path.getPointOnQuadraticBezier(Math.min(1,1-w/p),h[0],h[1],h[2],h[3],h[4],h[5]);y=E[b-2]-m.x,v=E[b-1]-m.y}else y=E[b-2]-E[b-4],v=E[b-1]-E[b-3];const g=(Math.atan2(v,y)+f)%f,O=this.pointerWidth();this.pointerAtEnding()&&(c.save(),c.beginPath(),c.translate(E[b-2],E[b-1]),c.rotate(g),c.moveTo(0,0),c.lineTo(-w,O/2),c.lineTo(-w,-O/2),c.closePath(),c.restore(),this.__fillStroke(c)),this.pointerAtBeginning()&&(c.save(),c.beginPath(),c.translate(E[0],E[1]),S?(y=(_[0]+_[2])/2-E[0],v=(_[1]+_[3])/2-E[1]):(y=E[2]-E[0],v=E[3]-E[1]),c.rotate((Math.atan2(-v,-y)+f)%f),c.moveTo(0,0),c.lineTo(-w,O/2),c.lineTo(-w,-O/2),c.closePath(),c.restore(),this.__fillStroke(c))}__fillStroke(c){const f=this.dashEnabled();f&&(this.attrs.dashEnabled=!1,c.setLineDash([])),c.fillStrokeShape(this),f&&(this.attrs.dashEnabled=!0)}getSelfRect(){const c=super.getSelfRect(),f=this.pointerWidth()/2;return{x:c.x,y:c.y-f,width:c.width,height:c.height+f*2}}}return Tf.Arrow=l,l.prototype.className="Arrow",(0,r._registerNode)(l),e.Factory.addGetterSetter(l,"pointerLength",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerWidth",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerAtBeginning",!1),e.Factory.addGetterSetter(l,"pointerAtEnding",!0),Tf}var Lf={},ky;function m9(){if(ky)return Lf;ky=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.Circle=void 0;const e=Ft(),i=On(),t=Ut(),r=Nt();class a extends i.Shape{_sceneFunc(s){s.beginPath(),s.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(s){this.radius()!==s/2&&this.radius(s/2)}setHeight(s){this.radius()!==s/2&&this.radius(s/2)}}return Lf.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,r._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),Lf}var Nf={},Ay;function y9(){if(Ay)return Nf;Ay=1,Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.Ellipse=void 0;const e=Ft(),i=On(),t=Ut(),r=Nt();class a extends i.Shape{_sceneFunc(s){const c=this.radiusX(),f=this.radiusY();s.beginPath(),s.save(),c!==f&&s.scale(1,f/c),s.arc(0,0,c,0,Math.PI*2,!1),s.restore(),s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(s){this.radiusX(s/2)}setHeight(s){this.radiusY(s/2)}}return Nf.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,r._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,t.getNumberValidator)()),Nf}var If={},Ty;function b9(){if(Ty)return If;Ty=1,Object.defineProperty(If,"__esModule",{value:!0}),If.Image=void 0;const e=zr(),i=Ft(),t=On(),r=Nt(),a=Ut();class l extends t.Shape{constructor(c){super(c),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const c=this.image();c&&c.complete||c&&c.readyState===4||c&&c.addEventListener&&c.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const c=!!this.cornerRadius(),f=this.hasShadow();return c&&f?!0:super._useBufferCanvas(!0)}_sceneFunc(c){const f=this.getWidth(),E=this.getHeight(),_=this.cornerRadius(),S=this.attrs.image;let w;if(S){const b=this.attrs.cropWidth,y=this.attrs.cropHeight;b&&y?w=[S,this.cropX(),this.cropY(),b,y,0,0,f,E]:w=[S,0,0,f,E]}(this.hasFill()||this.hasStroke()||_)&&(c.beginPath(),_?e.Util.drawRoundedRectPath(c,f,E,_):c.rect(0,0,f,E),c.closePath(),c.fillStrokeShape(this)),S&&(_&&c.clip(),c.drawImage.apply(c,w))}_hitFunc(c){const f=this.width(),E=this.height(),_=this.cornerRadius();c.beginPath(),_?e.Util.drawRoundedRectPath(c,f,E,_):c.rect(0,0,f,E),c.closePath(),c.fillStrokeShape(this)}getWidth(){var c,f;return(c=this.attrs.width)!==null&&c!==void 0?c:(f=this.image())===null||f===void 0?void 0:f.width}getHeight(){var c,f;return(c=this.attrs.height)!==null&&c!==void 0?c:(f=this.image())===null||f===void 0?void 0:f.height}static fromURL(c,f,E=null){const _=e.Util.createImageElement();_.onload=function(){const S=new l({image:_});f(S)},_.onerror=E,_.crossOrigin="Anonymous",_.src=c}}return If.Image=l,l.prototype.className="Image",(0,r._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,a.getNumberValidator)()),If}var qs={},Ry;function w9(){if(Ry)return qs;Ry=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.Tag=qs.Label=void 0;const e=Ft(),i=On(),t=Tv(),r=Ut(),a=Nt(),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],s="Change.konva",c="none",f="up",E="right",_="down",S="left",w=l.length;class b extends t.Group{constructor(g){super(g),this.on("add.konva",function(O){this._addListeners(O.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(g){let O=this,h;const p=function(){O._sync()};for(h=0;h<w;h++)g.on(l[h]+s,p)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let g=this.getText(),O=this.getTag(),h,p,m,x,N,T,I;if(g&&O){switch(h=g.width(),p=g.height(),m=O.pointerDirection(),x=O.pointerWidth(),I=O.pointerHeight(),N=0,T=0,m){case f:N=h/2,T=-1*I;break;case E:N=h+x,T=p/2;break;case _:N=h/2,T=p+I;break;case S:N=-1*x,T=p/2;break}O.setAttrs({x:-1*N,y:-1*T,width:h,height:p}),g.setAttrs({x:-1*N,y:-1*T})}}}qs.Label=b,b.prototype.className="Label",(0,a._registerNode)(b);class y extends i.Shape{_sceneFunc(g){const O=this.width(),h=this.height(),p=this.pointerDirection(),m=this.pointerWidth(),x=this.pointerHeight(),N=this.cornerRadius();let T=0,I=0,R=0,C=0;typeof N=="number"?T=I=R=C=Math.min(N,O/2,h/2):(T=Math.min(N[0]||0,O/2,h/2),I=Math.min(N[1]||0,O/2,h/2),C=Math.min(N[2]||0,O/2,h/2),R=Math.min(N[3]||0,O/2,h/2)),g.beginPath(),g.moveTo(T,0),p===f&&(g.lineTo((O-m)/2,0),g.lineTo(O/2,-1*x),g.lineTo((O+m)/2,0)),g.lineTo(O-I,0),g.arc(O-I,I,I,Math.PI*3/2,0,!1),p===E&&(g.lineTo(O,(h-x)/2),g.lineTo(O+m,h/2),g.lineTo(O,(h+x)/2)),g.lineTo(O,h-C),g.arc(O-C,h-C,C,0,Math.PI/2,!1),p===_&&(g.lineTo((O+m)/2,h),g.lineTo(O/2,h+x),g.lineTo((O-m)/2,h)),g.lineTo(R,h),g.arc(R,h-R,R,Math.PI/2,Math.PI,!1),p===S&&(g.lineTo(0,(h+x)/2),g.lineTo(-1*m,h/2),g.lineTo(0,(h-x)/2)),g.lineTo(0,T),g.arc(T,T,T,Math.PI,Math.PI*3/2,!1),g.closePath(),g.fillStrokeShape(this)}getSelfRect(){let g=0,O=0,h=this.pointerWidth(),p=this.pointerHeight(),m=this.pointerDirection(),x=this.width(),N=this.height();return m===f?(O-=p,N+=p):m===_?N+=p:m===S?(g-=h*1.5,x+=h):m===E&&(x+=h*1.5),{x:g,y:O,width:x,height:N}}}return qs.Tag=y,y.prototype.className="Tag",(0,a._registerNode)(y),e.Factory.addGetterSetter(y,"pointerDirection",c),e.Factory.addGetterSetter(y,"pointerWidth",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(y,"pointerHeight",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(y,"cornerRadius",0,(0,r.getNumberOrArrayOfNumbersValidator)(4)),qs}var jf={},My;function Sw(){if(My)return jf;My=1,Object.defineProperty(jf,"__esModule",{value:!0}),jf.Rect=void 0;const e=Ft(),i=On(),t=Nt(),r=zr(),a=Ut();class l extends i.Shape{_sceneFunc(c){const f=this.cornerRadius(),E=this.width(),_=this.height();c.beginPath(),f?r.Util.drawRoundedRectPath(c,E,_,f):c.rect(0,0,E,_),c.closePath(),c.fillStrokeShape(this)}}return jf.Rect=l,l.prototype.className="Rect",(0,t._registerNode)(l),e.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),jf}var Df={},Ly;function _9(){if(Ly)return Df;Ly=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.RegularPolygon=void 0;const e=Ft(),i=On(),t=Ut(),r=Nt();class a extends i.Shape{_sceneFunc(s){const c=this._getPoints();s.beginPath(),s.moveTo(c[0].x,c[0].y);for(let f=1;f<c.length;f++)s.lineTo(c[f].x,c[f].y);s.closePath(),s.fillStrokeShape(this)}_getPoints(){const s=this.attrs.sides,c=this.attrs.radius||0,f=[];for(let E=0;E<s;E++)f.push({x:c*Math.sin(E*2*Math.PI/s),y:-1*c*Math.cos(E*2*Math.PI/s)});return f}getSelfRect(){const s=this._getPoints();let c=s[0].x,f=s[0].y,E=s[0].x,_=s[0].y;return s.forEach(S=>{c=Math.min(c,S.x),f=Math.max(f,S.x),E=Math.min(E,S.y),_=Math.max(_,S.y)}),{x:c,y:E,width:f-c,height:_-E}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(s){this.radius(s/2)}setHeight(s){this.radius(s/2)}}return Df.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,r._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"sides",0,(0,t.getNumberValidator)()),Df}var Ff={},Ny;function S9(){if(Ny)return Ff;Ny=1,Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.Ring=void 0;const e=Ft(),i=On(),t=Ut(),r=Nt(),a=Math.PI*2;class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.innerRadius(),0,a,!1),c.moveTo(this.outerRadius(),0),c.arc(0,0,this.outerRadius(),a,0,!0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}}return Ff.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,r._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,t.getNumberValidator)()),Ff}var zf={},Iy;function E9(){if(Iy)return zf;Iy=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.Sprite=void 0;const e=Ft(),i=On(),t=Rv(),r=Ut(),a=Nt();class l extends i.Shape{constructor(c){super(c),this._updated=!0,this.anim=new t.Animation(()=>{const f=this._updated;return this._updated=!1,f}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(c){const f=this.animation(),E=this.frameIndex(),_=E*4,S=this.animations()[f],w=this.frameOffsets(),b=S[_+0],y=S[_+1],v=S[_+2],g=S[_+3],O=this.image();if((this.hasFill()||this.hasStroke())&&(c.beginPath(),c.rect(0,0,v,g),c.closePath(),c.fillStrokeShape(this)),O)if(w){const h=w[f],p=E*2;c.drawImage(O,b,y,v,g,h[p+0],h[p+1],v,g)}else c.drawImage(O,b,y,v,g,0,0,v,g)}_hitFunc(c){const f=this.animation(),E=this.frameIndex(),_=E*4,S=this.animations()[f],w=this.frameOffsets(),b=S[_+2],y=S[_+3];if(c.beginPath(),w){const v=w[f],g=E*2;c.rect(v[g+0],v[g+1],b,y)}else c.rect(0,0,b,y);c.closePath(),c.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const c=this;this.interval=setInterval(function(){c._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const c=this.getLayer();this.anim.setLayers(c),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const c=this.frameIndex(),f=this.animation(),E=this.animations(),_=E[f],S=_.length/4;c<S-1?this.frameIndex(c+1):this.frameIndex(0)}}return zf.Sprite=l,l.prototype.className="Sprite",(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"animation"),e.Factory.addGetterSetter(l,"animations"),e.Factory.addGetterSetter(l,"frameOffsets"),e.Factory.addGetterSetter(l,"image"),e.Factory.addGetterSetter(l,"frameIndex",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"frameRate",17,(0,r.getNumberValidator)()),e.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),zf}var Bf={},jy;function x9(){if(jy)return Bf;jy=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Star=void 0;const e=Ft(),i=On(),t=Ut(),r=Nt();class a extends i.Shape{_sceneFunc(s){const c=this.innerRadius(),f=this.outerRadius(),E=this.numPoints();s.beginPath(),s.moveTo(0,0-f);for(let _=1;_<E*2;_++){const S=_%2===0?f:c,w=S*Math.sin(_*Math.PI/E),b=-1*S*Math.cos(_*Math.PI/E);s.lineTo(w,b)}s.closePath(),s.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(s){this.outerRadius(s/2)}setHeight(s){this.outerRadius(s/2)}}return Bf.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,r._registerNode)(a),e.Factory.addGetterSetter(a,"numPoints",5,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"outerRadius",0,(0,t.getNumberValidator)()),Bf}var rc={},Dy;function Ew(){if(Dy)return rc;Dy=1,Object.defineProperty(rc,"__esModule",{value:!0}),rc.Text=void 0,rc.stringToArray=s;const e=zr(),i=Ft(),t=On(),r=Nt(),a=Ut(),l=Nt();function s(U){return[...U].reduce((W,ee,ne,te)=>{if(new RegExp("\\p{Emoji}","u").test(ee)){const Z=te[ne+1];Z&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(Z)?(W.push(ee+Z),te[ne+1]=""):W.push(ee)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(ee+(te[ne+1]||""))?W.push(ee+te[ne+1]):ne>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(ee)?W[W.length-1]+=ee:ee&&W.push(ee);return W},[])}const c="auto",f="center",E="inherit",_="justify",S="Change.konva",w="2d",b="-",y="left",v="text",g="Text",O="top",h="bottom",p="middle",m="normal",x="px ",N=" ",T="right",I="rtl",R="word",C="char",M="none",k="…",A=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],L=A.length;function z(U){return U.split(",").map(W=>{W=W.trim();const ee=W.indexOf(" ")>=0,ne=W.indexOf('"')>=0||W.indexOf("'")>=0;return ee&&!ne&&(W=`"${W}"`),W}).join(", ")}let Y;function $(){return Y||(Y=e.Util.createCanvasElement().getContext(w),Y)}function X(U){U.fillText(this._partialText,this._partialTextX,this._partialTextY)}function q(U){U.setAttr("miterLimit",2),U.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function D(U){return U=U||{},!U.fillLinearGradientColorStops&&!U.fillRadialGradientColorStops&&!U.fillPatternImage&&(U.fill=U.fill||"black"),U}class B extends t.Shape{constructor(W){super(D(W)),this._partialTextX=0,this._partialTextY=0;for(let ee=0;ee<L;ee++)this.on(A[ee]+S,this._setTextData);this._setTextData()}_sceneFunc(W){const ee=this.textArr,ne=ee.length;if(!this.text())return;let te=this.padding(),Z=this.fontSize(),ae=this.lineHeight()*Z,H=this.verticalAlign(),J=this.direction(),ie=0,le=this.align(),ue=this.getWidth(),he=this.letterSpacing(),ye=this.fill(),Ce=this.textDecoration(),pe=Ce.indexOf("underline")!==-1,fe=Ce.indexOf("line-through")!==-1,ve;J=J===E?W.direction:J;let xe=ae/2,Te=p;if(r.Konva._fixTextRendering){const Xe=this.measureSize("M");Te="alphabetic",xe=(Xe.fontBoundingBoxAscent-Xe.fontBoundingBoxDescent)/2+ae/2}var ce=0,me=0;for(J===I&&W.setAttr("direction",J),W.setAttr("font",this._getContextFont()),W.setAttr("textBaseline",Te),W.setAttr("textAlign",y),H===p?ie=(this.getHeight()-ne*ae-te*2)/2:H===h&&(ie=this.getHeight()-ne*ae-te*2),W.translate(te,ie+te),ve=0;ve<ne;ve++){var ce=0,me=0,Oe=ee[ve],Ne=Oe.text,tt=Oe.width,rt=Oe.lastInParagraph,He,$e;if(W.save(),le===T?ce+=ue-tt-te*2:le===f&&(ce+=(ue-tt-te*2)/2),pe){W.save(),W.beginPath();const Ye=r.Konva._fixTextRendering?Math.round(Z/4):Math.round(Z/2),lt=ce,wt=xe+me+Ye;W.moveTo(lt,wt),He=Ne.split(" ").length-1,$e=le===_&&!rt?ue-te*2:tt,W.lineTo(lt+Math.round($e),wt),W.lineWidth=Z/15;const zt=this._getLinearGradient();W.strokeStyle=zt||ye,W.stroke(),W.restore()}if(fe){W.save(),W.beginPath();const Ye=r.Konva._fixTextRendering?-Math.round(Z/4):0;W.moveTo(ce,xe+me+Ye),He=Ne.split(" ").length-1,$e=le===_&&!rt?ue-te*2:tt,W.lineTo(ce+Math.round($e),xe+me+Ye),W.lineWidth=Z/15;const lt=this._getLinearGradient();W.strokeStyle=lt||ye,W.stroke(),W.restore()}if(J!==I&&(he!==0||le===_)){He=Ne.split(" ").length-1;const Ye=s(Ne);for(let lt=0;lt<Ye.length;lt++){const wt=Ye[lt];wt===" "&&!rt&&le===_&&(ce+=(ue-te*2-tt)/He),this._partialTextX=ce,this._partialTextY=xe+me,this._partialText=wt,W.fillStrokeShape(this),ce+=this.measureSize(wt).width+he}}else he!==0&&W.setAttr("letterSpacing",`${he}px`),this._partialTextX=ce,this._partialTextY=xe+me,this._partialText=Ne,W.fillStrokeShape(this);W.restore(),ne>1&&(xe+=ae)}}_hitFunc(W){const ee=this.getWidth(),ne=this.getHeight();W.beginPath(),W.rect(0,0,ee,ne),W.closePath(),W.fillStrokeShape(this)}setText(W){const ee=e.Util._isString(W)?W:W==null?"":W+"";return this._setAttr(v,ee),this}getWidth(){return this.attrs.width===c||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===c||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(W){var ee,ne,te,Z,ae,H,J,ie,le,ue,he;let ye=$(),Ce=this.fontSize(),pe;ye.save(),ye.font=this._getContextFont(),pe=ye.measureText(W),ye.restore();const fe=Ce/100;return{actualBoundingBoxAscent:(ee=pe.actualBoundingBoxAscent)!==null&&ee!==void 0?ee:71.58203125*fe,actualBoundingBoxDescent:(ne=pe.actualBoundingBoxDescent)!==null&&ne!==void 0?ne:0,actualBoundingBoxLeft:(te=pe.actualBoundingBoxLeft)!==null&&te!==void 0?te:-7.421875*fe,actualBoundingBoxRight:(Z=pe.actualBoundingBoxRight)!==null&&Z!==void 0?Z:75.732421875*fe,alphabeticBaseline:(ae=pe.alphabeticBaseline)!==null&&ae!==void 0?ae:0,emHeightAscent:(H=pe.emHeightAscent)!==null&&H!==void 0?H:100*fe,emHeightDescent:(J=pe.emHeightDescent)!==null&&J!==void 0?J:-20*fe,fontBoundingBoxAscent:(ie=pe.fontBoundingBoxAscent)!==null&&ie!==void 0?ie:91*fe,fontBoundingBoxDescent:(le=pe.fontBoundingBoxDescent)!==null&&le!==void 0?le:21*fe,hangingBaseline:(ue=pe.hangingBaseline)!==null&&ue!==void 0?ue:72.80000305175781*fe,ideographicBaseline:(he=pe.ideographicBaseline)!==null&&he!==void 0?he:-21*fe,width:pe.width,height:Ce}}_getContextFont(){return this.fontStyle()+N+this.fontVariant()+N+(this.fontSize()+x)+z(this.fontFamily())}_addTextLine(W){this.align()===_&&(W=W.trim());const ne=this._getTextWidth(W);return this.textArr.push({text:W,width:ne,lastInParagraph:!1})}_getTextWidth(W){const ee=this.letterSpacing(),ne=W.length;return $().measureText(W).width+ee*ne}_setTextData(){let W=this.text().split(`
|
|
43
|
-
`),ee=+this.fontSize(),ne=0,te=this.lineHeight()*ee,Z=this.attrs.width,ae=this.attrs.height,H=Z!==c&&Z!==void 0,J=ae!==c&&ae!==void 0,ie=this.padding(),le=Z-ie*2,ue=ae-ie*2,he=0,ye=this.wrap(),Ce=ye!==M,pe=ye!==C&&Ce,fe=this.ellipsis();this.textArr=[],$().font=this._getContextFont();const ve=fe?this._getTextWidth(k):0;for(let xe=0,Te=W.length;xe<Te;++xe){let ce=W[xe],me=this._getTextWidth(ce);if(H&&me>le)for(;ce.length>0;){let Oe=0,Ne=s(ce).length,tt="",rt=0;for(;Oe<Ne;){const He=Oe+Ne>>>1,$e=s(ce),Xe=$e.slice(0,He+1).join(""),De=this._getTextWidth(Xe)+ve;De<=le?(Oe=He+1,tt=Xe,rt=De):Ne=He}if(tt){if(pe){const Xe=s(ce),De=s(tt),Ye=Xe[De.length],lt=Ye===N||Ye===b;let wt;if(lt&&rt<=le)wt=De.length;else{const zt=De.lastIndexOf(N),_e=De.lastIndexOf(b);wt=Math.max(zt,_e)+1}wt>0&&(Oe=wt,tt=Xe.slice(0,Oe).join(""),rt=this._getTextWidth(tt))}if(tt=tt.trimRight(),this._addTextLine(tt),ne=Math.max(ne,rt),he+=te,this._shouldHandleEllipsis(he)){this._tryToAddEllipsisToLastLine();break}if(ce=s(ce).slice(Oe).join("").trimLeft(),ce.length>0&&(me=this._getTextWidth(ce),me<=le)){this._addTextLine(ce),he+=te,ne=Math.max(ne,me);break}}else break}else this._addTextLine(ce),he+=te,ne=Math.max(ne,me),this._shouldHandleEllipsis(he)&&xe<Te-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),J&&he+te>ue)break}this.textHeight=ee,this.textWidth=ne}_shouldHandleEllipsis(W){const ee=+this.fontSize(),ne=this.lineHeight()*ee,te=this.attrs.height,Z=te!==c&&te!==void 0,ae=this.padding(),H=te-ae*2;return!(this.wrap()!==M)||Z&&W+ne>H}_tryToAddEllipsisToLastLine(){const W=this.attrs.width,ee=W!==c&&W!==void 0,ne=this.padding(),te=W-ne*2,Z=this.ellipsis(),ae=this.textArr[this.textArr.length-1];!ae||!Z||(ee&&(this._getTextWidth(ae.text+k)<te||(ae.text=ae.text.slice(0,ae.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(ae.text+k))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const W=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,ee=this.hasShadow();return W&&ee?!0:super._useBufferCanvas()}}return rc.Text=B,B.prototype._fillFunc=X,B.prototype._strokeFunc=q,B.prototype.className=g,B.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(B),i.Factory.overWriteSetter(B,"width",(0,a.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(B,"height",(0,a.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(B,"direction",E),i.Factory.addGetterSetter(B,"fontFamily","Arial"),i.Factory.addGetterSetter(B,"fontSize",12,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(B,"fontStyle",m),i.Factory.addGetterSetter(B,"fontVariant",m),i.Factory.addGetterSetter(B,"padding",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(B,"align",y),i.Factory.addGetterSetter(B,"verticalAlign",O),i.Factory.addGetterSetter(B,"lineHeight",1,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(B,"wrap",R),i.Factory.addGetterSetter(B,"ellipsis",!1,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(B,"letterSpacing",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(B,"text","",(0,a.getStringValidator)()),i.Factory.addGetterSetter(B,"textDecoration",""),rc}var Uf={},Fy;function O9(){if(Fy)return Uf;Fy=1,Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.TextPath=void 0;const e=zr(),i=Ft(),t=On(),r=Mv(),a=Ew(),l=Ut(),s=Nt(),c="",f="normal";function E(w){w.fillText(this.partialText,0,0)}function _(w){w.strokeText(this.partialText,0,0)}class S extends t.Shape{constructor(b){super(b),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return r.Path.getPathLength(this.dataArray)}_getPointAtLength(b){if(!this.attrs.data)return null;const y=this.pathLength;return b-1>y?null:r.Path.getPointAtLengthOfDataArray(b,this.dataArray)}_readDataAttribute(){this.dataArray=r.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(b){b.setAttr("font",this._getContextFont()),b.setAttr("textBaseline",this.textBaseline()),b.setAttr("textAlign","left"),b.save();const y=this.textDecoration(),v=this.fill(),g=this.fontSize(),O=this.glyphInfo;y==="underline"&&b.beginPath();for(let h=0;h<O.length;h++){b.save();const p=O[h].p0;b.translate(p.x,p.y),b.rotate(O[h].rotation),this.partialText=O[h].text,b.fillStrokeShape(this),y==="underline"&&(h===0&&b.moveTo(0,g/2+1),b.lineTo(g,g/2+1)),b.restore()}y==="underline"&&(b.strokeStyle=v,b.lineWidth=g/20,b.stroke()),b.restore()}_hitFunc(b){b.beginPath();const y=this.glyphInfo;if(y.length>=1){const v=y[0].p0;b.moveTo(v.x,v.y)}for(let v=0;v<y.length;v++){const g=y[v].p1;b.lineTo(g.x,g.y)}b.setAttr("lineWidth",this.fontSize()),b.setAttr("strokeStyle",this.colorKey),b.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(b){return a.Text.prototype.setText.call(this,b)}_getContextFont(){return a.Text.prototype._getContextFont.call(this)}_getTextSize(b){const v=this.dummyCanvas.getContext("2d");v.save(),v.font=this._getContextFont();const g=v.measureText(b);return v.restore(),{width:g.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:b,height:y}=this._getTextSize(this.attrs.text);if(this.textWidth=b,this.textHeight=y,this.glyphInfo=[],!this.attrs.data)return null;const v=this.letterSpacing(),g=this.align(),O=this.kerningFunc(),h=Math.max(this.textWidth+((this.attrs.text||"").length-1)*v,0);let p=0;g==="center"&&(p=Math.max(0,this.pathLength/2-h/2)),g==="right"&&(p=Math.max(0,this.pathLength-h));const m=(0,a.stringToArray)(this.text());let x=p;for(let N=0;N<m.length;N++){const T=this._getPointAtLength(x);if(!T)return;let I=this._getTextSize(m[N]).width+v;if(m[N]===" "&&g==="justify"){const L=this.text().split(" ").length-1;I+=(this.pathLength-h)/L}const R=this._getPointAtLength(x+I);if(!R)return;const C=r.Path.getLineLength(T.x,T.y,R.x,R.y);let M=0;if(O)try{M=O(m[N-1],m[N])*this.fontSize()}catch{M=0}T.x+=M,R.x+=M,this.textWidth+=M;const k=r.Path.getPointOnLine(M+C/2,T.x,T.y,R.x,R.y),A=Math.atan2(R.y-T.y,R.x-T.x);this.glyphInfo.push({transposeX:k.x,transposeY:k.y,text:m[N],rotation:A,p0:T,p1:R}),x+=I}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const b=[];this.glyphInfo.forEach(function(x){b.push(x.p0.x),b.push(x.p0.y),b.push(x.p1.x),b.push(x.p1.y)});let y=b[0]||0,v=b[0]||0,g=b[1]||0,O=b[1]||0,h,p;for(let x=0;x<b.length/2;x++)h=b[x*2],p=b[x*2+1],y=Math.min(y,h),v=Math.max(v,h),g=Math.min(g,p),O=Math.max(O,p);const m=this.fontSize();return{x:y-m/2,y:g-m/2,width:v-y+m,height:O-g+m}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return Uf.TextPath=S,S.prototype._fillFunc=E,S.prototype._strokeFunc=_,S.prototype._fillFuncHit=E,S.prototype._strokeFuncHit=_,S.prototype.className="TextPath",S.prototype._attrsAffectingSize=["text","fontSize","data"],(0,s._registerNode)(S),i.Factory.addGetterSetter(S,"data"),i.Factory.addGetterSetter(S,"fontFamily","Arial"),i.Factory.addGetterSetter(S,"fontSize",12,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(S,"fontStyle",f),i.Factory.addGetterSetter(S,"align","left"),i.Factory.addGetterSetter(S,"letterSpacing",0,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(S,"textBaseline","middle"),i.Factory.addGetterSetter(S,"fontVariant",f),i.Factory.addGetterSetter(S,"text",c),i.Factory.addGetterSetter(S,"textDecoration",""),i.Factory.addGetterSetter(S,"kerningFunc",void 0),Uf}var qf={},zy;function P9(){if(zy)return qf;zy=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.Transformer=void 0;const e=zr(),i=Ft(),t=Yr(),r=On(),a=Sw(),l=Tv(),s=Nt(),c=Ut(),f=Nt(),E="tr-konva",_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(I=>I+`.${E}`).join(" "),S="nodesRect",w=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],b={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},y="ontouchstart"in s.Konva._global;function v(I,R,C){if(I==="rotater")return C;R+=e.Util.degToRad(b[I]||0);const M=(e.Util.radToDeg(R)%360+360)%360;return e.Util._inRange(M,315+22.5,360)||e.Util._inRange(M,0,22.5)?"ns-resize":e.Util._inRange(M,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(M,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(M,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(M,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(M,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(M,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(M,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+M),"pointer")}const g=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function O(I){return{x:I.x+I.width/2*Math.cos(I.rotation)+I.height/2*Math.sin(-I.rotation),y:I.y+I.height/2*Math.cos(I.rotation)+I.width/2*Math.sin(I.rotation)}}function h(I,R,C){const M=C.x+(I.x-C.x)*Math.cos(R)-(I.y-C.y)*Math.sin(R),k=C.y+(I.x-C.x)*Math.sin(R)+(I.y-C.y)*Math.cos(R);return{...I,rotation:I.rotation+R,x:M,y:k}}function p(I,R){const C=O(I);return h(I,R,C)}function m(I,R,C){let M=R;for(let k=0;k<I.length;k++){const A=s.Konva.getAngle(I[k]),L=Math.abs(A-R)%(Math.PI*2);Math.min(L,Math.PI*2-L)<C&&(M=A)}return M}let x=0;class N extends l.Group{constructor(R){super(R),this._movingAnchorName=null,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(_,this.update),this.getNode()&&this.update()}attachTo(R){return this.setNode(R),this}setNode(R){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([R])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return E+this._id}setNodes(R=[]){this._nodes&&this._nodes.length&&this.detach();const C=R.filter(k=>k.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=R=C,R.length===1&&this.useSingleNodeRotation()?this.rotation(R[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(k=>{const A=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},L=k._attrsAffectingSize.map(z=>z+"Change."+this._getEventNamespace()).join(" ");k.on(L,A),k.on(w.map(z=>z+`.${this._getEventNamespace()}`).join(" "),A),k.on(`absoluteTransformChange.${this._getEventNamespace()}`,A),this._proxyDrag(k)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(R){let C;R.on(`dragstart.${this._getEventNamespace()}`,M=>{C=R.getAbsolutePosition(),!this.isDragging()&&R!==this.findOne(".back")&&this.startDrag(M,!1)}),R.on(`dragmove.${this._getEventNamespace()}`,M=>{if(!C)return;const k=R.getAbsolutePosition(),A=k.x-C.x,L=k.y-C.y;this.nodes().forEach(z=>{if(z===R||z.isDragging())return;const Y=z.getAbsolutePosition();z.setAbsolutePosition({x:Y.x+A,y:Y.y+L}),z.startDrag(M)}),C=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(R=>{R.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(S),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(S,this.__getNodeRect)}__getNodeShape(R,C=this.rotation(),M){const k=R.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),A=R.getAbsoluteScale(M),L=R.getAbsolutePosition(M),z=k.x*A.x-R.offsetX()*A.x,Y=k.y*A.y-R.offsetY()*A.y,$=(s.Konva.getAngle(R.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),X={x:L.x+z*Math.cos($)+Y*Math.sin(-$),y:L.y+Y*Math.cos($)+z*Math.sin($),width:k.width*A.x,height:k.height*A.y,rotation:$};return h(X,-s.Konva.getAngle(C),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const C=[];this.nodes().map($=>{const X=$.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),q=[{x:X.x,y:X.y},{x:X.x+X.width,y:X.y},{x:X.x+X.width,y:X.y+X.height},{x:X.x,y:X.y+X.height}],D=$.getAbsoluteTransform();q.forEach(function(B){const U=D.point(B);C.push(U)})});const M=new e.Transform;M.rotate(-s.Konva.getAngle(this.rotation()));let k=1/0,A=1/0,L=-1/0,z=-1/0;C.forEach(function($){const X=M.point($);k===void 0&&(k=L=X.x,A=z=X.y),k=Math.min(k,X.x),A=Math.min(A,X.y),L=Math.max(L,X.x),z=Math.max(z,X.y)}),M.invert();const Y=M.point({x:k,y:A});return{x:Y.x,y:Y.y,width:L-k,height:z-A,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(),g.forEach(R=>{this._createAnchor(R)}),this._createAnchor("rotater")}_createAnchor(R){const C=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:R+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:y?10:"auto"}),M=this;C.on("mousedown touchstart",function(k){M._handleMouseDown(k)}),C.on("dragstart",k=>{C.stopDrag(),k.cancelBubble=!0}),C.on("dragend",k=>{k.cancelBubble=!0}),C.on("mouseenter",()=>{const k=s.Konva.getAngle(this.rotation()),A=this.rotateAnchorCursor(),L=v(R,k,A);C.getStage().content&&(C.getStage().content.style.cursor=L),this._cursorChange=!0}),C.on("mouseout",()=>{C.getStage().content&&(C.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(C)}_createBack(){const R=new r.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(C,M){const k=M.getParent(),A=k.padding();C.beginPath(),C.rect(-A,-A,M.width()+A*2,M.height()+A*2),C.moveTo(M.width()/2,-A),k.rotateEnabled()&&k.rotateLineVisible()&&C.lineTo(M.width()/2,-k.rotateAnchorOffset()*e.Util._sign(M.height())-A),C.fillStrokeShape(M)},hitFunc:(C,M)=>{if(!this.shouldOverdrawWholeArea())return;const k=this.padding();C.beginPath(),C.rect(-k,-k,M.width()+k*2,M.height()+k*2),C.fillStrokeShape(M)}});this.add(R),this._proxyDrag(R),R.on("dragstart",C=>{C.cancelBubble=!0}),R.on("dragmove",C=>{C.cancelBubble=!0}),R.on("dragend",C=>{C.cancelBubble=!0}),this.on("dragmove",C=>{this.update()})}_handleMouseDown(R){if(this._transforming)return;this._movingAnchorName=R.target.name().split(" ")[0];const C=this._getNodeRect(),M=C.width,k=C.height,A=Math.sqrt(Math.pow(M,2)+Math.pow(k,2));this.sin=Math.abs(k/A),this.cos=Math.abs(M/A),typeof window<"u"&&(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;const L=R.target.getAbsolutePosition(),z=R.target.getStage().getPointerPosition();this._anchorDragOffset={x:z.x-L.x,y:z.y-L.y},x++,this._fire("transformstart",{evt:R.evt,target:this.getNode()}),this._nodes.forEach(Y=>{Y._fire("transformstart",{evt:R.evt,target:Y})})}_handleMouseMove(R){let C,M,k;const A=this.findOne("."+this._movingAnchorName),L=A.getStage();L.setPointersPositions(R);const z=L.getPointerPosition();let Y={x:z.x-this._anchorDragOffset.x,y:z.y-this._anchorDragOffset.y};const $=A.getAbsolutePosition();this.anchorDragBoundFunc()&&(Y=this.anchorDragBoundFunc()($,Y,R)),A.setAbsolutePosition(Y);const X=A.getAbsolutePosition();if($.x===X.x&&$.y===X.y)return;if(this._movingAnchorName==="rotater"){const H=this._getNodeRect();C=A.x()-H.width/2,M=-A.y()+H.height/2;let J=Math.atan2(-M,C)+Math.PI/2;H.height<0&&(J-=Math.PI);const le=s.Konva.getAngle(this.rotation())+J,ue=s.Konva.getAngle(this.rotationSnapTolerance()),ye=m(this.rotationSnaps(),le,ue)-H.rotation,Ce=p(H,ye);this._fitNodesInto(Ce,R);return}const q=this.shiftBehavior();let D;q==="inverted"?D=this.keepRatio()&&!R.shiftKey:q==="none"?D=this.keepRatio():D=this.keepRatio()||R.shiftKey;var ne=this.centeredScaling()||R.altKey;if(this._movingAnchorName==="top-left"){if(D){var B=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};k=Math.sqrt(Math.pow(B.x-A.x(),2)+Math.pow(B.y-A.y(),2));var U=this.findOne(".top-left").x()>B.x?-1:1,W=this.findOne(".top-left").y()>B.y?-1:1;C=k*this.cos*U,M=k*this.sin*W,this.findOne(".top-left").x(B.x-C),this.findOne(".top-left").y(B.y-M)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(A.y());else if(this._movingAnchorName==="top-right"){if(D){var B=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};k=Math.sqrt(Math.pow(A.x()-B.x,2)+Math.pow(B.y-A.y(),2));var U=this.findOne(".top-right").x()<B.x?-1:1,W=this.findOne(".top-right").y()>B.y?-1:1;C=k*this.cos*U,M=k*this.sin*W,this.findOne(".top-right").x(B.x+C),this.findOne(".top-right").y(B.y-M)}var ee=A.position();this.findOne(".top-left").y(ee.y),this.findOne(".bottom-right").x(ee.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(A.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(A.x());else if(this._movingAnchorName==="bottom-left"){if(D){var B=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};k=Math.sqrt(Math.pow(B.x-A.x(),2)+Math.pow(A.y()-B.y,2));var U=B.x<A.x()?-1:1,W=A.y()<B.y?-1:1;C=k*this.cos*U,M=k*this.sin*W,A.x(B.x-C),A.y(B.y+M)}ee=A.position(),this.findOne(".top-left").x(ee.x),this.findOne(".bottom-right").y(ee.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(A.y());else if(this._movingAnchorName==="bottom-right"){if(D){var B=ne?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};k=Math.sqrt(Math.pow(A.x()-B.x,2)+Math.pow(A.y()-B.y,2));var U=this.findOne(".bottom-right").x()<B.x?-1:1,W=this.findOne(".bottom-right").y()<B.y?-1:1;C=k*this.cos*U,M=k*this.sin*W,this.findOne(".bottom-right").x(B.x+C),this.findOne(".bottom-right").y(B.y+M)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var ne=this.centeredScaling()||R.altKey;if(ne){const H=this.findOne(".top-left"),J=this.findOne(".bottom-right"),ie=H.x(),le=H.y(),ue=this.getWidth()-J.x(),he=this.getHeight()-J.y();J.move({x:-ie,y:-le}),H.move({x:ue,y:he})}const te=this.findOne(".top-left").getAbsolutePosition();C=te.x,M=te.y;const Z=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),ae=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:C,y:M,width:Z,height:ae,rotation:s.Konva.getAngle(this.rotation())},R)}_handleMouseUp(R){this._removeEvents(R)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(R){var C;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const M=this.getNode();x--,this._fire("transformend",{evt:R,target:M}),(C=this.getLayer())===null||C===void 0||C.batchDraw(),M&&this._nodes.forEach(k=>{var A;k._fire("transformend",{evt:R,target:k}),(A=k.getLayer())===null||A===void 0||A.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(R,C){const M=this._getNodeRect(),k=1;if(e.Util._inRange(R.width,-this.padding()*2-k,k)){this.update();return}if(e.Util._inRange(R.height,-this.padding()*2-k,k)){this.update();return}const A=new e.Transform;if(A.rotate(s.Konva.getAngle(this.rotation())),this._movingAnchorName&&R.width<0&&this._movingAnchorName.indexOf("left")>=0){const D=A.point({x:-this.padding()*2,y:0});R.x+=D.x,R.y+=D.y,R.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=D.x,this._anchorDragOffset.y-=D.y}else if(this._movingAnchorName&&R.width<0&&this._movingAnchorName.indexOf("right")>=0){const D=A.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=D.x,this._anchorDragOffset.y-=D.y,R.width+=this.padding()*2}if(this._movingAnchorName&&R.height<0&&this._movingAnchorName.indexOf("top")>=0){const D=A.point({x:0,y:-this.padding()*2});R.x+=D.x,R.y+=D.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=D.x,this._anchorDragOffset.y-=D.y,R.height+=this.padding()*2}else if(this._movingAnchorName&&R.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const D=A.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=D.x,this._anchorDragOffset.y-=D.y,R.height+=this.padding()*2}if(this.boundBoxFunc()){const D=this.boundBoxFunc()(M,R);D?R=D:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const L=1e7,z=new e.Transform;z.translate(M.x,M.y),z.rotate(M.rotation),z.scale(M.width/L,M.height/L);const Y=new e.Transform,$=R.width/L,X=R.height/L;this.flipEnabled()===!1?(Y.translate(R.x,R.y),Y.rotate(R.rotation),Y.translate(R.width<0?R.width:0,R.height<0?R.height:0),Y.scale(Math.abs($),Math.abs(X))):(Y.translate(R.x,R.y),Y.rotate(R.rotation),Y.scale($,X));const q=Y.multiply(z.invert());this._nodes.forEach(D=>{var B;const U=D.getParent().getAbsoluteTransform(),W=D.getTransform().copy();W.translate(D.offsetX(),D.offsetY());const ee=new e.Transform;ee.multiply(U.copy().invert()).multiply(q).multiply(U).multiply(W);const ne=ee.decompose();D.setAttrs(ne),(B=D.getLayer())===null||B===void 0||B.batchDraw()}),this.rotation(e.Util._getRotation(R.rotation)),this._nodes.forEach(D=>{this._fire("transform",{evt:C,target:D}),D._fire("transform",{evt:C,target:D})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(R,C){this.findOne(R).setAttrs(C)}update(){var R;const C=this._getNodeRect();this.rotation(e.Util._getRotation(C.rotation));const M=C.width,k=C.height,A=this.enabledAnchors(),L=this.resizeEnabled(),z=this.padding(),Y=this.anchorSize(),$=this.find("._anchor");$.forEach(q=>{q.setAttrs({width:Y,height:Y,offsetX:Y/2,offsetY:Y/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:Y/2+z,offsetY:Y/2+z,visible:L&&A.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:M/2,y:0,offsetY:Y/2+z,visible:L&&A.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:M,y:0,offsetX:Y/2-z,offsetY:Y/2+z,visible:L&&A.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:k/2,offsetX:Y/2+z,visible:L&&A.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:M,y:k/2,offsetX:Y/2-z,visible:L&&A.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:k,offsetX:Y/2+z,offsetY:Y/2-z,visible:L&&A.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:M/2,y:k,offsetY:Y/2-z,visible:L&&A.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:M,y:k,offsetX:Y/2-z,offsetY:Y/2-z,visible:L&&A.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:M/2,y:-this.rotateAnchorOffset()*e.Util._sign(k)-z,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:M,height:k,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const X=this.anchorStyleFunc();X&&$.forEach(q=>{X(q)}),(R=this.getLayer())===null||R===void 0||R.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const R=this.findOne("."+this._movingAnchorName);R&&R.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return t.Node.prototype.toObject.call(this)}clone(R){return t.Node.prototype.clone.call(this,R)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}qf.Transformer=N,N.isTransforming=()=>x>0;function T(I){return I instanceof Array||e.Util.warn("enabledAnchors value should be an array"),I instanceof Array&&I.forEach(function(R){g.indexOf(R)===-1&&e.Util.warn("Unknown anchor name: "+R+". Available names are: "+g.join(", "))}),I||[]}return N.prototype.className="Transformer",(0,f._registerNode)(N),i.Factory.addGetterSetter(N,"enabledAnchors",g,T),i.Factory.addGetterSetter(N,"flipEnabled",!0,(0,c.getBooleanValidator)()),i.Factory.addGetterSetter(N,"resizeEnabled",!0),i.Factory.addGetterSetter(N,"anchorSize",10,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"rotateEnabled",!0),i.Factory.addGetterSetter(N,"rotateLineVisible",!0),i.Factory.addGetterSetter(N,"rotationSnaps",[]),i.Factory.addGetterSetter(N,"rotateAnchorOffset",50,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(N,"rotationSnapTolerance",5,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"borderEnabled",!0),i.Factory.addGetterSetter(N,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(N,"anchorStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"anchorFill","white"),i.Factory.addGetterSetter(N,"anchorCornerRadius",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(N,"borderStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"borderDash"),i.Factory.addGetterSetter(N,"keepRatio",!0),i.Factory.addGetterSetter(N,"shiftBehavior","default"),i.Factory.addGetterSetter(N,"centeredScaling",!1),i.Factory.addGetterSetter(N,"ignoreStroke",!1),i.Factory.addGetterSetter(N,"padding",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(N,"nodes"),i.Factory.addGetterSetter(N,"node"),i.Factory.addGetterSetter(N,"boundBoxFunc"),i.Factory.addGetterSetter(N,"anchorDragBoundFunc"),i.Factory.addGetterSetter(N,"anchorStyleFunc"),i.Factory.addGetterSetter(N,"shouldOverdrawWholeArea",!1),i.Factory.addGetterSetter(N,"useSingleNodeRotation",!0),i.Factory.backCompat(N,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),qf}var Hf={},By;function C9(){if(By)return Hf;By=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.Wedge=void 0;const e=Ft(),i=On(),t=Nt(),r=Ut(),a=Nt();class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.radius(),0,t.Konva.getAngle(this.angle()),this.clockwise()),c.lineTo(0,0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(c){this.radius(c/2)}setHeight(c){this.radius(c/2)}}return Hf.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"radius",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,r.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1),e.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),Hf}var Gf={},Uy;function k9(){if(Uy)return Gf;Uy=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.Blur=void 0;const e=Ft(),i=Yr(),t=Ut();function r(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function s(f,E){const _=f.data,S=f.width,w=f.height;let b,y,v,g,O,h,p,m,x,N,T,I,R,C,M,k,A,L,z,Y,$,X,q,D;const B=E+E+1,U=S-1,W=w-1,ee=E+1,ne=ee*(ee+1)/2,te=new r,Z=a[E],ae=l[E];let H=null,J=te,ie=null,le=null;for(v=1;v<B;v++)J=J.next=new r,v===ee&&(H=J);for(J.next=te,p=h=0,y=0;y<w;y++){for(k=A=L=z=m=x=N=T=0,I=ee*(Y=_[h]),R=ee*($=_[h+1]),C=ee*(X=_[h+2]),M=ee*(q=_[h+3]),m+=ne*Y,x+=ne*$,N+=ne*X,T+=ne*q,J=te,v=0;v<ee;v++)J.r=Y,J.g=$,J.b=X,J.a=q,J=J.next;for(v=1;v<ee;v++)g=h+((U<v?U:v)<<2),m+=(J.r=Y=_[g])*(D=ee-v),x+=(J.g=$=_[g+1])*D,N+=(J.b=X=_[g+2])*D,T+=(J.a=q=_[g+3])*D,k+=Y,A+=$,L+=X,z+=q,J=J.next;for(ie=te,le=H,b=0;b<S;b++)_[h+3]=q=T*Z>>ae,q!==0?(q=255/q,_[h]=(m*Z>>ae)*q,_[h+1]=(x*Z>>ae)*q,_[h+2]=(N*Z>>ae)*q):_[h]=_[h+1]=_[h+2]=0,m-=I,x-=R,N-=C,T-=M,I-=ie.r,R-=ie.g,C-=ie.b,M-=ie.a,g=p+((g=b+E+1)<U?g:U)<<2,k+=ie.r=_[g],A+=ie.g=_[g+1],L+=ie.b=_[g+2],z+=ie.a=_[g+3],m+=k,x+=A,N+=L,T+=z,ie=ie.next,I+=Y=le.r,R+=$=le.g,C+=X=le.b,M+=q=le.a,k-=Y,A-=$,L-=X,z-=q,le=le.next,h+=4;p+=S}for(b=0;b<S;b++){for(A=L=z=k=x=N=T=m=0,h=b<<2,I=ee*(Y=_[h]),R=ee*($=_[h+1]),C=ee*(X=_[h+2]),M=ee*(q=_[h+3]),m+=ne*Y,x+=ne*$,N+=ne*X,T+=ne*q,J=te,v=0;v<ee;v++)J.r=Y,J.g=$,J.b=X,J.a=q,J=J.next;for(O=S,v=1;v<=E;v++)h=O+b<<2,m+=(J.r=Y=_[h])*(D=ee-v),x+=(J.g=$=_[h+1])*D,N+=(J.b=X=_[h+2])*D,T+=(J.a=q=_[h+3])*D,k+=Y,A+=$,L+=X,z+=q,J=J.next,v<W&&(O+=S);for(h=b,ie=te,le=H,y=0;y<w;y++)g=h<<2,_[g+3]=q=T*Z>>ae,q>0?(q=255/q,_[g]=(m*Z>>ae)*q,_[g+1]=(x*Z>>ae)*q,_[g+2]=(N*Z>>ae)*q):_[g]=_[g+1]=_[g+2]=0,m-=I,x-=R,N-=C,T-=M,I-=ie.r,R-=ie.g,C-=ie.b,M-=ie.a,g=b+((g=y+ee)<W?g:W)*S<<2,m+=k+=ie.r=_[g],x+=A+=ie.g=_[g+1],N+=L+=ie.b=_[g+2],T+=z+=ie.a=_[g+3],ie=ie.next,I+=Y=le.r,R+=$=le.g,C+=X=le.b,M+=q=le.a,k-=Y,A-=$,L-=X,z-=q,le=le.next,h+=S}}const c=function(E){const _=Math.round(this.blurRadius());_>0&&s(E,_)};return Gf.Blur=c,e.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Gf}var Vf={},qy;function A9(){if(qy)return Vf;qy=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.Brighten=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=this.brightness()*255,s=a.data,c=s.length;for(let f=0;f<c;f+=4)s[f]+=l,s[f+1]+=l,s[f+2]+=l};return Vf.Brighten=r,e.Factory.addGetterSetter(i.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Vf}var $f={},Hy;function T9(){if(Hy)return $f;Hy=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.Contrast=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=Math.pow((this.contrast()+100)/100,2),s=a.data,c=s.length;let f=150,E=150,_=150;for(let S=0;S<c;S+=4)f=s[S],E=s[S+1],_=s[S+2],f/=255,f-=.5,f*=l,f+=.5,f*=255,E/=255,E-=.5,E*=l,E+=.5,E*=255,_/=255,_-=.5,_*=l,_+=.5,_*=255,f=f<0?0:f>255?255:f,E=E<0?0:E>255?255:E,_=_<0?0:_>255?255:_,s[S]=f,s[S+1]=E,s[S+2]=_};return $f.Contrast=r,e.Factory.addGetterSetter(i.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),$f}var Wf={},Gy;function R9(){if(Gy)return Wf;Gy=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.Emboss=void 0;const e=Ft(),i=Yr(),t=zr(),r=Ut(),a=function(l){const s=this.embossStrength()*10,c=this.embossWhiteLevel()*255,f=this.embossDirection(),E=this.embossBlend(),_=l.data,S=l.width,w=l.height,b=S*4;let y=0,v=0,g=w;switch(f){case"top-left":y=-1,v=-1;break;case"top":y=-1,v=0;break;case"top-right":y=-1,v=1;break;case"right":y=0,v=1;break;case"bottom-right":y=1,v=1;break;case"bottom":y=1,v=0;break;case"bottom-left":y=1,v=-1;break;case"left":y=0,v=-1;break;default:t.Util.error("Unknown emboss direction: "+f)}do{const O=(g-1)*b;let h=y;g+h<1&&(h=0),g+h>w&&(h=0);const p=(g-1+h)*S*4;let m=S;do{const x=O+(m-1)*4;let N=v;m+N<1&&(N=0),m+N>S&&(N=0);const T=p+(m-1+N)*4,I=_[x]-_[T],R=_[x+1]-_[T+1],C=_[x+2]-_[T+2];let M=I;const k=M>0?M:-M,A=R>0?R:-R,L=C>0?C:-C;if(A>k&&(M=R),L>k&&(M=C),M*=s,E){const z=_[x]+M,Y=_[x+1]+M,$=_[x+2]+M;_[x]=z>255?255:z<0?0:z,_[x+1]=Y>255?255:Y<0?0:Y,_[x+2]=$>255?255:$<0?0:$}else{let z=c-M;z<0?z=0:z>255&&(z=255),_[x]=_[x+1]=_[x+2]=z}}while(--m)}while(--g)};return Wf.Emboss=a,e.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossDirection","top-left",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter),Wf}var Yf={},Vy;function M9(){if(Vy)return Yf;Vy=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.Enhance=void 0;const e=Ft(),i=Yr(),t=Ut();function r(l,s,c,f,E){const _=c-s,S=E-f;if(_===0)return f+S/2;if(S===0)return f;let w=(l-s)/_;return w=S*w+f,w}const a=function(l){const s=l.data,c=s.length;let f=s[0],E=f,_,S=s[1],w=S,b,y=s[2],v=y,g;const O=this.enhance();if(O===0)return;for(let M=0;M<c;M+=4)_=s[M+0],_<f?f=_:_>E&&(E=_),b=s[M+1],b<S?S=b:b>w&&(w=b),g=s[M+2],g<y?y=g:g>v&&(v=g);E===f&&(E=255,f=0),w===S&&(w=255,S=0),v===y&&(v=255,y=0);let h,p,m,x,N,T,I,R,C;O>0?(p=E+O*(255-E),m=f-O*(f-0),N=w+O*(255-w),T=S-O*(S-0),R=v+O*(255-v),C=y-O*(y-0)):(h=(E+f)*.5,p=E+O*(E-h),m=f+O*(f-h),x=(w+S)*.5,N=w+O*(w-x),T=S+O*(S-x),I=(v+y)*.5,R=v+O*(v-I),C=y+O*(y-I));for(let M=0;M<c;M+=4)s[M+0]=r(s[M+0],f,E,m,p),s[M+1]=r(s[M+1],S,w,T,N),s[M+2]=r(s[M+2],y,v,C,R)};return Yf.Enhance=a,e.Factory.addGetterSetter(i.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Yf}var Kf={},$y;function L9(){if($y)return Kf;$y=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.Grayscale=void 0;const e=function(i){const t=i.data,r=t.length;for(let a=0;a<r;a+=4){const l=.34*t[a]+.5*t[a+1]+.16*t[a+2];t[a]=l,t[a+1]=l,t[a+2]=l}};return Kf.Grayscale=e,Kf}var Xf={},Wy;function N9(){if(Wy)return Xf;Wy=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.HSL=void 0;const e=Ft(),i=Yr(),t=Ut();e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"luminance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter);const r=function(a){const l=a.data,s=l.length,c=1,f=Math.pow(2,this.saturation()),E=Math.abs(this.hue()+360)%360,_=this.luminance()*127,S=c*f*Math.cos(E*Math.PI/180),w=c*f*Math.sin(E*Math.PI/180),b=.299*c+.701*S+.167*w,y=.587*c-.587*S+.33*w,v=.114*c-.114*S-.497*w,g=.299*c-.299*S-.328*w,O=.587*c+.413*S+.035*w,h=.114*c-.114*S+.293*w,p=.299*c-.3*S+1.25*w,m=.587*c-.586*S-1.05*w,x=.114*c+.886*S-.2*w;let N,T,I,R;for(let C=0;C<s;C+=4)N=l[C+0],T=l[C+1],I=l[C+2],R=l[C+3],l[C+0]=b*N+y*T+v*I+_,l[C+1]=g*N+O*T+h*I+_,l[C+2]=p*N+m*T+x*I+_,l[C+3]=R};return Xf.HSL=r,Xf}var Zf={},Yy;function I9(){if(Yy)return Zf;Yy=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.HSV=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=a.data,s=l.length,c=Math.pow(2,this.value()),f=Math.pow(2,this.saturation()),E=Math.abs(this.hue()+360)%360,_=c*f*Math.cos(E*Math.PI/180),S=c*f*Math.sin(E*Math.PI/180),w=.299*c+.701*_+.167*S,b=.587*c-.587*_+.33*S,y=.114*c-.114*_-.497*S,v=.299*c-.299*_-.328*S,g=.587*c+.413*_+.035*S,O=.114*c-.114*_+.293*S,h=.299*c-.3*_+1.25*S,p=.587*c-.586*_-1.05*S,m=.114*c+.886*_-.2*S;let x,N,T,I;for(let R=0;R<s;R+=4)x=l[R+0],N=l[R+1],T=l[R+2],I=l[R+3],l[R+0]=w*x+b*N+y*T,l[R+1]=v*x+g*N+O*T,l[R+2]=h*x+p*N+m*T,l[R+3]=I};return Zf.HSV=r,e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"value",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Zf}var Qf={},Ky;function j9(){if(Ky)return Qf;Ky=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.Invert=void 0;const e=function(i){const t=i.data,r=t.length;for(let a=0;a<r;a+=4)t[a]=255-t[a],t[a+1]=255-t[a+1],t[a+2]=255-t[a+2]};return Qf.Invert=e,Qf}var Jf={},Xy;function D9(){if(Xy)return Jf;Xy=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.Kaleidoscope=void 0;const e=Ft(),i=Yr(),t=zr(),r=Ut(),a=function(c,f,E){const _=c.data,S=f.data,w=c.width,b=c.height,y=E.polarCenterX||w/2,v=E.polarCenterY||b/2;let g=Math.sqrt(y*y+v*v),O=w-y,h=b-v;const p=Math.sqrt(O*O+h*h);g=p>g?p:g;const m=b,x=w,N=360/x*Math.PI/180;for(let T=0;T<x;T+=1){const I=Math.sin(T*N),R=Math.cos(T*N);for(let C=0;C<m;C+=1){O=Math.floor(y+g*C/m*R),h=Math.floor(v+g*C/m*I);let M=(h*w+O)*4;const k=_[M+0],A=_[M+1],L=_[M+2],z=_[M+3];M=(T+C*w)*4,S[M+0]=k,S[M+1]=A,S[M+2]=L,S[M+3]=z}}},l=function(c,f,E){const _=c.data,S=f.data,w=c.width,b=c.height,y=E.polarCenterX||w/2,v=E.polarCenterY||b/2;let g=Math.sqrt(y*y+v*v),O=w-y,h=b-v;const p=Math.sqrt(O*O+h*h);g=p>g?p:g;const m=b,x=w,N=0;let T,I;for(O=0;O<w;O+=1)for(h=0;h<b;h+=1){const R=O-y,C=h-v,M=Math.sqrt(R*R+C*C)*m/g;let k=(Math.atan2(C,R)*180/Math.PI+360+N)%360;k=k*x/360,T=Math.floor(k),I=Math.floor(M);let A=(I*w+T)*4;const L=_[A+0],z=_[A+1],Y=_[A+2],$=_[A+3];A=(h*w+O)*4,S[A+0]=L,S[A+1]=z,S[A+2]=Y,S[A+3]=$}},s=function(c){const f=c.width,E=c.height;let _,S,w,b,y,v,g,O,h,p,m=Math.round(this.kaleidoscopePower());const x=Math.round(this.kaleidoscopeAngle()),N=Math.floor(f*(x%360)/360);if(m<1)return;const T=t.Util.createCanvasElement();T.width=f,T.height=E;const I=T.getContext("2d").getImageData(0,0,f,E);t.Util.releaseCanvas(T),a(c,I,{polarCenterX:f/2,polarCenterY:E/2});let R=f/Math.pow(2,m);for(;R<=8;)R=R*2,m-=1;R=Math.ceil(R);let C=R,M=0,k=C,A=1;for(N+R>f&&(M=C,k=0,A=-1),S=0;S<E;S+=1)for(_=M;_!==k;_+=A)w=Math.round(_+N)%f,h=(f*S+w)*4,y=I.data[h+0],v=I.data[h+1],g=I.data[h+2],O=I.data[h+3],p=(f*S+_)*4,I.data[p+0]=y,I.data[p+1]=v,I.data[p+2]=g,I.data[p+3]=O;for(S=0;S<E;S+=1)for(C=Math.floor(R),b=0;b<m;b+=1){for(_=0;_<C+1;_+=1)h=(f*S+_)*4,y=I.data[h+0],v=I.data[h+1],g=I.data[h+2],O=I.data[h+3],p=(f*S+C*2-_-1)*4,I.data[p+0]=y,I.data[p+1]=v,I.data[p+2]=g,I.data[p+3]=O;C*=2}l(I,c,{})};return Jf.Kaleidoscope=s,e.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),Jf}var ed={},Zy;function F9(){if(Zy)return ed;Zy=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.Mask=void 0;const e=Ft(),i=Yr(),t=Ut();function r(w,b,y){let v=(y*w.width+b)*4;const g=[];return g.push(w.data[v++],w.data[v++],w.data[v++],w.data[v++]),g}function a(w,b){return Math.sqrt(Math.pow(w[0]-b[0],2)+Math.pow(w[1]-b[1],2)+Math.pow(w[2]-b[2],2))}function l(w){const b=[0,0,0];for(let y=0;y<w.length;y++)b[0]+=w[y][0],b[1]+=w[y][1],b[2]+=w[y][2];return b[0]/=w.length,b[1]/=w.length,b[2]/=w.length,b}function s(w,b){const y=r(w,0,0),v=r(w,w.width-1,0),g=r(w,0,w.height-1),O=r(w,w.width-1,w.height-1),h=b||10;if(a(y,v)<h&&a(v,O)<h&&a(O,g)<h&&a(g,y)<h){const p=l([v,y,O,g]),m=[];for(let x=0;x<w.width*w.height;x++){const N=a(p,[w.data[x*4],w.data[x*4+1],w.data[x*4+2]]);m[x]=N<h?0:255}return m}}function c(w,b){for(let y=0;y<w.width*w.height;y++)w.data[4*y+3]=b[y]}function f(w,b,y){const v=[1,1,1,1,0,1,1,1,1],g=Math.round(Math.sqrt(v.length)),O=Math.floor(g/2),h=[];for(let p=0;p<y;p++)for(let m=0;m<b;m++){const x=p*b+m;let N=0;for(let T=0;T<g;T++)for(let I=0;I<g;I++){const R=p+T-O,C=m+I-O;if(R>=0&&R<y&&C>=0&&C<b){const M=R*b+C,k=v[T*g+I];N+=w[M]*k}}h[x]=N===255*8?255:0}return h}function E(w,b,y){const v=[1,1,1,1,1,1,1,1,1],g=Math.round(Math.sqrt(v.length)),O=Math.floor(g/2),h=[];for(let p=0;p<y;p++)for(let m=0;m<b;m++){const x=p*b+m;let N=0;for(let T=0;T<g;T++)for(let I=0;I<g;I++){const R=p+T-O,C=m+I-O;if(R>=0&&R<y&&C>=0&&C<b){const M=R*b+C,k=v[T*g+I];N+=w[M]*k}}h[x]=N>=255*4?255:0}return h}function _(w,b,y){const v=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],g=Math.round(Math.sqrt(v.length)),O=Math.floor(g/2),h=[];for(let p=0;p<y;p++)for(let m=0;m<b;m++){const x=p*b+m;let N=0;for(let T=0;T<g;T++)for(let I=0;I<g;I++){const R=p+T-O,C=m+I-O;if(R>=0&&R<y&&C>=0&&C<b){const M=R*b+C,k=v[T*g+I];N+=w[M]*k}}h[x]=N}return h}const S=function(w){const b=this.threshold();let y=s(w,b);return y&&(y=f(y,w.width,w.height),y=E(y,w.width,w.height),y=_(y,w.width,w.height),c(w,y)),w};return ed.Mask=S,e.Factory.addGetterSetter(i.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),ed}var td={},Qy;function z9(){if(Qy)return td;Qy=1,Object.defineProperty(td,"__esModule",{value:!0}),td.Noise=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=this.noise()*255,s=a.data,c=s.length,f=l/2;for(let E=0;E<c;E+=4)s[E+0]+=f-2*f*Math.random(),s[E+1]+=f-2*f*Math.random(),s[E+2]+=f-2*f*Math.random()};return td.Noise=r,e.Factory.addGetterSetter(i.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),td}var rd={},Jy;function B9(){if(Jy)return rd;Jy=1,Object.defineProperty(rd,"__esModule",{value:!0}),rd.Pixelate=void 0;const e=Ft(),i=zr(),t=Yr(),r=Ut(),a=function(l){let s=Math.ceil(this.pixelSize()),c=l.width,f=l.height,E,_,S,w,b,y,v,g=Math.ceil(c/s),O=Math.ceil(f/s),h,p,m,x,N,T,I,R=l.data;if(s<=0){i.Util.error("pixelSize value can not be <= 0");return}for(N=0;N<g;N+=1)for(T=0;T<O;T+=1){for(w=0,b=0,y=0,v=0,h=N*s,p=h+s,m=T*s,x=m+s,I=0,E=h;E<p;E+=1)if(!(E>=c))for(_=m;_<x;_+=1)_>=f||(S=(c*_+E)*4,w+=R[S+0],b+=R[S+1],y+=R[S+2],v+=R[S+3],I+=1);for(w=w/I,b=b/I,y=y/I,v=v/I,E=h;E<p;E+=1)if(!(E>=c))for(_=m;_<x;_+=1)_>=f||(S=(c*_+E)*4,R[S+0]=w,R[S+1]=b,R[S+2]=y,R[S+3]=v)}};return rd.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,r.getNumberValidator)(),e.Factory.afterSetFilter),rd}var nd={},e2;function U9(){if(e2)return nd;e2=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Posterize=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=Math.round(this.levels()*254)+1,s=a.data,c=s.length,f=255/l;for(let E=0;E<c;E+=1)s[E]=Math.floor(s[E]/f)*f};return nd.Posterize=r,e.Factory.addGetterSetter(i.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),nd}var id={},t2;function q9(){if(t2)return id;t2=1,Object.defineProperty(id,"__esModule",{value:!0}),id.RGB=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=a.data,s=l.length,c=this.red(),f=this.green(),E=this.blue();for(let _=0;_<s;_+=4){const S=(.34*l[_]+.5*l[_+1]+.16*l[_+2])/255;l[_]=S*c,l[_+1]=S*f,l[_+2]=S*E,l[_+3]=l[_+3]}};return id.RGB=r,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),id}var ad={},r2;function H9(){if(r2)return ad;r2=1,Object.defineProperty(ad,"__esModule",{value:!0}),ad.RGBA=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=a.data,s=l.length,c=this.red(),f=this.green(),E=this.blue(),_=this.alpha();for(let S=0;S<s;S+=4){const w=1-_;l[S]=c*_+l[S]*w,l[S+1]=f*_+l[S+1]*w,l[S+2]=E*_+l[S+2]*w}};return ad.RGBA=r,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"alpha",1,function(a){return this._filterUpToDate=!1,a>1?1:a<0?0:a}),ad}var od={},n2;function G9(){if(n2)return od;n2=1,Object.defineProperty(od,"__esModule",{value:!0}),od.Sepia=void 0;const e=function(i){const t=i.data,r=t.length;for(let a=0;a<r;a+=4){const l=t[a+0],s=t[a+1],c=t[a+2];t[a+0]=Math.min(255,l*.393+s*.769+c*.189),t[a+1]=Math.min(255,l*.349+s*.686+c*.168),t[a+2]=Math.min(255,l*.272+s*.534+c*.131)}};return od.Sepia=e,od}var ld={},i2;function V9(){if(i2)return ld;i2=1,Object.defineProperty(ld,"__esModule",{value:!0}),ld.Solarize=void 0;const e=function(i){const t=i.data,r=i.width,a=i.height,l=r*4;let s=a;do{const c=(s-1)*l;let f=r;do{const E=c+(f-1)*4;let _=t[E],S=t[E+1],w=t[E+2];_>127&&(_=255-_),S>127&&(S=255-S),w>127&&(w=255-w),t[E]=_,t[E+1]=S,t[E+2]=w}while(--f)}while(--s)};return ld.Solarize=e,ld}var sd={},a2;function $9(){if(a2)return sd;a2=1,Object.defineProperty(sd,"__esModule",{value:!0}),sd.Threshold=void 0;const e=Ft(),i=Yr(),t=Ut(),r=function(a){const l=this.threshold()*255,s=a.data,c=s.length;for(let f=0;f<c;f+=1)s[f]=s[f]<l?0:255};return sd.Threshold=r,e.Factory.addGetterSetter(i.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),sd}var o2;function W9(){if(o2)return Sf;o2=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Konva=void 0;const e=nv(),i=p9(),t=v9(),r=m9(),a=y9(),l=b9(),s=w9(),c=_w(),f=Mv(),E=Sw(),_=_9(),S=S9(),w=E9(),b=x9(),y=Ew(),v=O9(),g=P9(),O=C9(),h=k9(),p=A9(),m=T9(),x=R9(),N=M9(),T=L9(),I=N9(),R=I9(),C=j9(),M=D9(),k=F9(),A=z9(),L=B9(),z=U9(),Y=q9(),$=H9(),X=G9(),q=V9(),D=$9();return Sf.Konva=e.Konva.Util._assign(e.Konva,{Arc:i.Arc,Arrow:t.Arrow,Circle:r.Circle,Ellipse:a.Ellipse,Image:l.Image,Label:s.Label,Tag:s.Tag,Line:c.Line,Path:f.Path,Rect:E.Rect,RegularPolygon:_.RegularPolygon,Ring:S.Ring,Sprite:w.Sprite,Star:b.Star,Text:y.Text,TextPath:v.TextPath,Transformer:g.Transformer,Wedge:O.Wedge,Filters:{Blur:h.Blur,Brighten:p.Brighten,Contrast:m.Contrast,Emboss:x.Emboss,Enhance:N.Enhance,Grayscale:T.Grayscale,HSL:I.HSL,HSV:R.HSV,Invert:C.Invert,Kaleidoscope:M.Kaleidoscope,Mask:k.Mask,Noise:A.Noise,Pixelate:L.Pixelate,Posterize:z.Posterize,RGB:Y.RGB,RGBA:$.RGBA,Sepia:X.Sepia,Solarize:q.Solarize,Threshold:D.Threshold}}),Sf}var Y9=fp.exports,l2;function Hi(){if(l2)return fp.exports;l2=1,Object.defineProperty(Y9,"__esModule",{value:!0});const e=W9();return fp.exports=e.Konva,fp.exports}Hi();var ap={exports:{}},s2;function K9(){return s2||(s2=1,function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Konva=void 0;var t=nv();Object.defineProperty(i,"Konva",{enumerable:!0,get:function(){return t.Konva}});const r=nv();e.exports=r.Konva}(ap,ap.exports)),ap.exports}var X9=K9();const Nd=zd(X9);var Xg={exports:{}};/**
|
|
44
|
-
* @license React
|
|
45
|
-
* react-reconciler.production.min.js
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license found in the
|
|
50
|
-
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var Zg,u2;function Z9(){return u2||(u2=1,Zg=function(i){var t={},r=Ar(),a=lv(),l=Object.assign;function s(u){for(var d="https://reactjs.org/docs/error-decoder.html?invariant="+u,j=1;j<arguments.length;j++)d+="&args[]="+encodeURIComponent(arguments[j]);return"Minified React error #"+u+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),b=Symbol.for("react.provider"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),x=Symbol.iterator;function N(u){return u===null||typeof u!="object"?null:(u=x&&u[x]||u["@@iterator"],typeof u=="function"?u:null)}function T(u){if(u==null)return null;if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case _:return"Fragment";case E:return"Portal";case w:return"Profiler";case S:return"StrictMode";case g:return"Suspense";case O:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case y:return(u.displayName||"Context")+".Consumer";case b:return(u._context.displayName||"Context")+".Provider";case v:var d=u.render;return u=u.displayName,u||(u=d.displayName||d.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case h:return d=u.displayName||null,d!==null?d:T(u.type)||"Memo";case p:d=u._payload,u=u._init;try{return T(u(d))}catch{}}return null}function I(u){var d=u.type;switch(u.tag){case 24:return"Cache";case 9:return(d.displayName||"Context")+".Consumer";case 10:return(d._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=d.render,u=u.displayName||u.name||"",d.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return d;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return T(d);case 8:return d===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d}return null}function R(u){var d=u,j=u;if(u.alternate)for(;d.return;)d=d.return;else{u=d;do d=u,(d.flags&4098)!==0&&(j=d.return),u=d.return;while(u)}return d.tag===3?j:null}function C(u){if(R(u)!==u)throw Error(s(188))}function M(u){var d=u.alternate;if(!d){if(d=R(u),d===null)throw Error(s(188));return d!==u?null:u}for(var j=u,G=d;;){var K=j.return;if(K===null)break;var re=K.alternate;if(re===null){if(G=K.return,G!==null){j=G;continue}break}if(K.child===re.child){for(re=K.child;re;){if(re===j)return C(K),u;if(re===G)return C(K),d;re=re.sibling}throw Error(s(188))}if(j.return!==G.return)j=K,G=re;else{for(var se=!1,we=K.child;we;){if(we===j){se=!0,j=K,G=re;break}if(we===G){se=!0,G=K,j=re;break}we=we.sibling}if(!se){for(we=re.child;we;){if(we===j){se=!0,j=re,G=K;break}if(we===G){se=!0,G=re,j=K;break}we=we.sibling}if(!se)throw Error(s(189))}}if(j.alternate!==G)throw Error(s(190))}if(j.tag!==3)throw Error(s(188));return j.stateNode.current===j?u:d}function k(u){return u=M(u),u!==null?A(u):null}function A(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var d=A(u);if(d!==null)return d;u=u.sibling}return null}function L(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){if(u.tag!==4){var d=L(u);if(d!==null)return d}u=u.sibling}return null}var z=Array.isArray,Y=i.getPublicInstance,$=i.getRootHostContext,X=i.getChildHostContext,q=i.prepareForCommit,D=i.resetAfterCommit,B=i.createInstance,U=i.appendInitialChild,W=i.finalizeInitialChildren,ee=i.prepareUpdate,ne=i.shouldSetTextContent,te=i.createTextInstance,Z=i.scheduleTimeout,ae=i.cancelTimeout,H=i.noTimeout,J=i.isPrimaryRenderer,ie=i.supportsMutation,le=i.supportsPersistence,ue=i.supportsHydration,he=i.getInstanceFromNode,ye=i.preparePortalMount,Ce=i.getCurrentEventPriority,pe=i.detachDeletedInstance,fe=i.supportsMicrotasks,ve=i.scheduleMicrotask,xe=i.supportsTestSelectors,Te=i.findFiberRoot,ce=i.getBoundingRect,me=i.getTextContent,Oe=i.isHiddenSubtree,Ne=i.matchAccessibilityRole,tt=i.setFocusIfFocusable,rt=i.setupIntersectionObserver,He=i.appendChild,$e=i.appendChildToContainer,Xe=i.commitTextUpdate,De=i.commitMount,Ye=i.commitUpdate,lt=i.insertBefore,wt=i.insertInContainerBefore,zt=i.removeChild,_e=i.removeChildFromContainer,Se=i.resetTextContent,xt=i.hideInstance,ht=i.hideTextInstance,At=i.unhideInstance,vt=i.unhideTextInstance,Tr=i.clearContainer,Pr=i.cloneInstance,tr=i.createContainerChildSet,mr=i.appendChildToContainerChildSet,Pn=i.finalizeContainerChildren,Ve=i.replaceContainerChildren,at=i.cloneHiddenInstance,bt=i.cloneHiddenTextInstance,Ot=i.canHydrateInstance,je=i.canHydrateTextInstance,Ze=i.canHydrateSuspenseInstance,ct=i.isSuspenseInstancePending,Ie=i.isSuspenseInstanceFallback,_t=i.getSuspenseInstanceFallbackErrorDetails,Fe=i.registerSuspenseInstanceRetry,mt=i.getNextHydratableSibling,ir=i.getFirstHydratableChild,Vt=i.getFirstHydratableChildWithinContainer,pn=i.getFirstHydratableChildWithinSuspenseInstance,Lr=i.hydrateInstance,et=i.hydrateTextInstance,qt=i.hydrateSuspenseInstance,$t=i.getNextHydratableInstanceAfterSuspenseInstance,rr=i.commitHydratedContainer,Kt=i.commitHydratedSuspenseInstance,Cn=i.clearSuspenseBoundary,kn=i.clearSuspenseBoundaryFromContainer,rn=i.shouldDeleteUnhydratedTailInstances,sa=i.didNotMatchHydratedContainerTextInstance,Xt=i.didNotMatchHydratedTextInstance,Pi;function Un(u){if(Pi===void 0)try{throw Error()}catch(j){var d=j.stack.trim().match(/\n( *(at )?)/);Pi=d&&d[1]||""}return`
|
|
52
|
-
`+Pi+u}var Fa=!1;function ui(u,d){if(!u||Fa)return"";Fa=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(d)if(d=function(){throw Error()},Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(qe){var G=qe}Reflect.construct(u,[],d)}else{try{d.call()}catch(qe){G=qe}u.call(d.prototype)}else{try{throw Error()}catch(qe){G=qe}u()}}catch(qe){if(qe&&G&&typeof qe.stack=="string"){for(var K=qe.stack.split(`
|
|
53
|
-
`),re=G.stack.split(`
|
|
54
|
-
`),se=K.length-1,we=re.length-1;1<=se&&0<=we&&K[se]!==re[we];)we--;for(;1<=se&&0<=we;se--,we--)if(K[se]!==re[we]){if(se!==1||we!==1)do if(se--,we--,0>we||K[se]!==re[we]){var Me=`
|
|
55
|
-
`+K[se].replace(" at new "," at ");return u.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",u.displayName)),Me}while(1<=se&&0<=we);break}}}finally{Fa=!1,Error.prepareStackTrace=j}return(u=u?u.displayName||u.name:"")?Un(u):""}var yo=Object.prototype.hasOwnProperty,Ci=[],ci=-1;function Nr(u){return{current:u}}function hr(u){0>ci||(u.current=Ci[ci],Ci[ci]=null,ci--)}function It(u,d){ci++,Ci[ci]=u.current,u.current=d}var za={},gn=Nr(za),qn=Nr(!1),Gi=za;function ua(u,d){var j=u.type.contextTypes;if(!j)return za;var G=u.stateNode;if(G&&G.__reactInternalMemoizedUnmaskedChildContext===d)return G.__reactInternalMemoizedMaskedChildContext;var K={},re;for(re in j)K[re]=d[re];return G&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=d,u.__reactInternalMemoizedMaskedChildContext=K),K}function Kr(u){return u=u.childContextTypes,u!=null}function bo(){hr(qn),hr(gn)}function Qd(u,d,j){if(gn.current!==za)throw Error(s(168));It(gn,d),It(qn,j)}function Jd(u,d,j){var G=u.stateNode;if(d=d.childContextTypes,typeof G.getChildContext!="function")return j;G=G.getChildContext();for(var K in G)if(!(K in d))throw Error(s(108,I(u)||"Unknown",K));return l({},j,G)}function ll(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||za,Gi=gn.current,It(gn,u),It(qn,qn.current),!0}function Ac(u,d,j){var G=u.stateNode;if(!G)throw Error(s(169));j?(u=Jd(u,d,Gi),G.__reactInternalMemoizedMergedChildContext=u,hr(qn),hr(gn),It(gn,u)):hr(qn),It(qn,j)}var Kn=Math.clz32?Math.clz32:Tc,cs=Math.log,Qp=Math.LN2;function Tc(u){return u>>>=0,u===0?32:31-(cs(u)/Qp|0)|0}var Wt=64,fs=4194304;function sl(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function ul(u,d){var j=u.pendingLanes;if(j===0)return 0;var G=0,K=u.suspendedLanes,re=u.pingedLanes,se=j&268435455;if(se!==0){var we=se&~K;we!==0?G=sl(we):(re&=se,re!==0&&(G=sl(re)))}else se=j&~K,se!==0?G=sl(se):re!==0&&(G=sl(re));if(G===0)return 0;if(d!==0&&d!==G&&(d&K)===0&&(K=G&-G,re=d&-d,K>=re||K===16&&(re&4194240)!==0))return d;if((G&4)!==0&&(G|=j&16),d=u.entangledLanes,d!==0)for(u=u.entanglements,d&=G;0<d;)j=31-Kn(d),K=1<<j,G|=u[j],d&=~K;return G}function eh(u,d){switch(u){case 1:case 2:case 4:return d+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function th(u,d){for(var j=u.suspendedLanes,G=u.pingedLanes,K=u.expirationTimes,re=u.pendingLanes;0<re;){var se=31-Kn(re),we=1<<se,Me=K[se];Me===-1?((we&j)===0||(we&G)!==0)&&(K[se]=eh(we,d)):Me<=d&&(u.expiredLanes|=we),re&=~we}}function au(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function ou(){var u=Wt;return Wt<<=1,(Wt&4194240)===0&&(Wt=64),u}function cl(u){for(var d=[],j=0;31>j;j++)d.push(u);return d}function fi(u,d,j){u.pendingLanes|=d,d!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,d=31-Kn(d),u[d]=j}function Ba(u,d){var j=u.pendingLanes&~d;u.pendingLanes=d,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=d,u.mutableReadLanes&=d,u.entangledLanes&=d,d=u.entanglements;var G=u.eventTimes;for(u=u.expirationTimes;0<j;){var K=31-Kn(j),re=1<<K;d[K]=0,G[K]=-1,u[K]=-1,j&=~re}}function Vi(u,d){var j=u.entangledLanes|=d;for(u=u.entanglements;j;){var G=31-Kn(j),K=1<<G;K&d|u[G]&d&&(u[G]|=d),j&=~K}}var jt=0;function fl(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var $i=a.unstable_scheduleCallback,rh=a.unstable_cancelCallback,nh=a.unstable_shouldYield,ds=a.unstable_requestPaint,Xr=a.unstable_now,lu=a.unstable_ImmediatePriority,su=a.unstable_UserBlockingPriority,uu=a.unstable_NormalPriority,Jp=a.unstable_IdlePriority,Ua=null,Hn=null;function dl(u){if(Hn&&typeof Hn.onCommitFiberRoot=="function")try{Hn.onCommitFiberRoot(Ua,u,void 0,(u.current.flags&128)===128)}catch{}}function cu(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var ki=typeof Object.is=="function"?Object.is:cu,ca=null,hl=!1,pl=!1;function fu(u){ca===null?ca=[u]:ca.push(u)}function ih(u){hl=!0,fu(u)}function nn(){if(!pl&&ca!==null){pl=!0;var u=0,d=jt;try{var j=ca;for(jt=1;u<j.length;u++){var G=j[u];do G=G(!0);while(G!==null)}ca=null,hl=!1}catch(K){throw ca!==null&&(ca=ca.slice(u+1)),$i(lu,nn),K}finally{jt=d,pl=!1}}return null}var qa=[],fa=0,hs=null,wo=0,An=[],Xn=0,Br=null,Gn=1,Ai="";function Ti(u,d){qa[fa++]=wo,qa[fa++]=hs,hs=u,wo=d}function ah(u,d,j){An[Xn++]=Gn,An[Xn++]=Ai,An[Xn++]=Br,Br=u;var G=Gn;u=Ai;var K=32-Kn(G)-1;G&=~(1<<K),j+=1;var re=32-Kn(d)+K;if(30<re){var se=K-K%5;re=(G&(1<<se)-1).toString(32),G>>=se,K-=se,Gn=1<<32-Kn(d)+K|j<<K|G,Ai=re+u}else Gn=1<<re|j<<K|G,Ai=u}function ps(u){u.return!==null&&(Ti(u,1),ah(u,1,0))}function gs(u){for(;u===hs;)hs=qa[--fa],qa[fa]=null,wo=qa[--fa],qa[fa]=null;for(;u===Br;)Br=An[--Xn],An[Xn]=null,Ai=An[--Xn],An[Xn]=null,Gn=An[--Xn],An[Xn]=null}var an=null,Tn=null,pr=!1,vs=!1,Ri=null;function oh(u,d){var j=oi(5,null,null,0);j.elementType="DELETED",j.stateNode=d,j.return=u,d=u.deletions,d===null?(u.deletions=[j],u.flags|=16):d.push(j)}function du(u,d){switch(u.tag){case 5:return d=Ot(d,u.type,u.pendingProps),d!==null?(u.stateNode=d,an=u,Tn=ir(d),!0):!1;case 6:return d=je(d,u.pendingProps),d!==null?(u.stateNode=d,an=u,Tn=null,!0):!1;case 13:if(d=Ze(d),d!==null){var j=Br!==null?{id:Gn,overflow:Ai}:null;return u.memoizedState={dehydrated:d,treeContext:j,retryLane:1073741824},j=oi(18,null,null,0),j.stateNode=d,j.return=u,u.child=j,an=u,Tn=null,!0}return!1;default:return!1}}function Rc(u){return(u.mode&1)!==0&&(u.flags&128)===0}function Mc(u){if(pr){var d=Tn;if(d){var j=d;if(!du(u,d)){if(Rc(u))throw Error(s(418));d=mt(j);var G=an;d&&du(u,d)?oh(G,j):(u.flags=u.flags&-4097|2,pr=!1,an=u)}}else{if(Rc(u))throw Error(s(418));u.flags=u.flags&-4097|2,pr=!1,an=u}}}function lh(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;an=u}function hu(u){if(!ue||u!==an)return!1;if(!pr)return lh(u),pr=!0,!1;if(u.tag!==3&&(u.tag!==5||rn(u.type)&&!ne(u.type,u.memoizedProps))){var d=Tn;if(d){if(Rc(u))throw sh(),Error(s(418));for(;d;)oh(u,d),d=mt(d)}}if(lh(u),u.tag===13){if(!ue)throw Error(s(316));if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));Tn=$t(u)}else Tn=an?mt(u.stateNode):null;return!0}function sh(){for(var u=Tn;u;)u=mt(u)}function _o(){ue&&(Tn=an=null,vs=pr=!1)}function Lc(u){Ri===null?Ri=[u]:Ri.push(u)}var eg=c.ReactCurrentBatchConfig;function pu(u,d){if(ki(u,d))return!0;if(typeof u!="object"||u===null||typeof d!="object"||d===null)return!1;var j=Object.keys(u),G=Object.keys(d);if(j.length!==G.length)return!1;for(G=0;G<j.length;G++){var K=j[G];if(!yo.call(d,K)||!ki(u[K],d[K]))return!1}return!0}function tg(u){switch(u.tag){case 5:return Un(u.type);case 16:return Un("Lazy");case 13:return Un("Suspense");case 19:return Un("SuspenseList");case 0:case 2:case 15:return u=ui(u.type,!1),u;case 11:return u=ui(u.type.render,!1),u;case 1:return u=ui(u.type,!0),u;default:return""}}function So(u,d,j){if(u=j.ref,u!==null&&typeof u!="function"&&typeof u!="object"){if(j._owner){if(j=j._owner,j){if(j.tag!==1)throw Error(s(309));var G=j.stateNode}if(!G)throw Error(s(147,u));var K=G,re=""+u;return d!==null&&d.ref!==null&&typeof d.ref=="function"&&d.ref._stringRef===re?d.ref:(d=function(se){var we=K.refs;se===null?delete we[re]:we[re]=se},d._stringRef=re,d)}if(typeof u!="string")throw Error(s(284));if(!j._owner)throw Error(s(290,u))}return u}function gu(u,d){throw u=Object.prototype.toString.call(d),Error(s(31,u==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":u))}function uh(u){var d=u._init;return d(u._payload)}function ch(u){function d(Ae,Ee){if(u){var Le=Ae.deletions;Le===null?(Ae.deletions=[Ee],Ae.flags|=16):Le.push(Ee)}}function j(Ae,Ee){if(!u)return null;for(;Ee!==null;)d(Ae,Ee),Ee=Ee.sibling;return null}function G(Ae,Ee){for(Ae=new Map;Ee!==null;)Ee.key!==null?Ae.set(Ee.key,Ee):Ae.set(Ee.index,Ee),Ee=Ee.sibling;return Ae}function K(Ae,Ee){return Ae=oo(Ae,Ee),Ae.index=0,Ae.sibling=null,Ae}function re(Ae,Ee,Le){return Ae.index=Le,u?(Le=Ae.alternate,Le!==null?(Le=Le.index,Le<Ee?(Ae.flags|=2,Ee):Le):(Ae.flags|=2,Ee)):(Ae.flags|=1048576,Ee)}function se(Ae){return u&&Ae.alternate===null&&(Ae.flags|=2),Ae}function we(Ae,Ee,Le,Je){return Ee===null||Ee.tag!==6?(Ee=zl(Le,Ae.mode,Je),Ee.return=Ae,Ee):(Ee=K(Ee,Le),Ee.return=Ae,Ee)}function Me(Ae,Ee,Le,Je){var yt=Le.type;return yt===_?ot(Ae,Ee,Le.props.children,Je,Le.key):Ee!==null&&(Ee.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===p&&uh(yt)===Ee.type)?(Je=K(Ee,Le.props),Je.ref=So(Ae,Ee,Le),Je.return=Ae,Je):(Je=Wu(Le.type,Le.key,Le.props,null,Ae.mode,Je),Je.ref=So(Ae,Ee,Le),Je.return=Ae,Je)}function qe(Ae,Ee,Le,Je){return Ee===null||Ee.tag!==4||Ee.stateNode.containerInfo!==Le.containerInfo||Ee.stateNode.implementation!==Le.implementation?(Ee=Yu(Le,Ae.mode,Je),Ee.return=Ae,Ee):(Ee=K(Ee,Le.children||[]),Ee.return=Ae,Ee)}function ot(Ae,Ee,Le,Je,yt){return Ee===null||Ee.tag!==7?(Ee=sn(Le,Ae.mode,Je,yt),Ee.return=Ae,Ee):(Ee=K(Ee,Le),Ee.return=Ae,Ee)}function Ct(Ae,Ee,Le){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return Ee=zl(""+Ee,Ae.mode,Le),Ee.return=Ae,Ee;if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case f:return Le=Wu(Ee.type,Ee.key,Ee.props,null,Ae.mode,Le),Le.ref=So(Ae,null,Ee),Le.return=Ae,Le;case E:return Ee=Yu(Ee,Ae.mode,Le),Ee.return=Ae,Ee;case p:var Je=Ee._init;return Ct(Ae,Je(Ee._payload),Le)}if(z(Ee)||N(Ee))return Ee=sn(Ee,Ae.mode,Le,null),Ee.return=Ae,Ee;gu(Ae,Ee)}return null}function Qe(Ae,Ee,Le,Je){var yt=Ee!==null?Ee.key:null;if(typeof Le=="string"&&Le!==""||typeof Le=="number")return yt!==null?null:we(Ae,Ee,""+Le,Je);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case f:return Le.key===yt?Me(Ae,Ee,Le,Je):null;case E:return Le.key===yt?qe(Ae,Ee,Le,Je):null;case p:return yt=Le._init,Qe(Ae,Ee,yt(Le._payload),Je)}if(z(Le)||N(Le))return yt!==null?null:ot(Ae,Ee,Le,Je,null);gu(Ae,Le)}return null}function fr(Ae,Ee,Le,Je,yt){if(typeof Je=="string"&&Je!==""||typeof Je=="number")return Ae=Ae.get(Le)||null,we(Ee,Ae,""+Je,yt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case f:return Ae=Ae.get(Je.key===null?Le:Je.key)||null,Me(Ee,Ae,Je,yt);case E:return Ae=Ae.get(Je.key===null?Le:Je.key)||null,qe(Ee,Ae,Je,yt);case p:var Lt=Je._init;return fr(Ae,Ee,Le,Lt(Je._payload),yt)}if(z(Je)||N(Je))return Ae=Ae.get(Le)||null,ot(Ee,Ae,Je,yt,null);gu(Ee,Je)}return null}function er(Ae,Ee,Le,Je){for(var yt=null,Lt=null,kt=Ee,Ht=Ee=0,Vr=null;kt!==null&&Ht<Le.length;Ht++){kt.index>Ht?(Vr=kt,kt=null):Vr=kt.sibling;var Bt=Qe(Ae,kt,Le[Ht],Je);if(Bt===null){kt===null&&(kt=Vr);break}u&&kt&&Bt.alternate===null&&d(Ae,kt),Ee=re(Bt,Ee,Ht),Lt===null?yt=Bt:Lt.sibling=Bt,Lt=Bt,kt=Vr}if(Ht===Le.length)return j(Ae,kt),pr&&Ti(Ae,Ht),yt;if(kt===null){for(;Ht<Le.length;Ht++)kt=Ct(Ae,Le[Ht],Je),kt!==null&&(Ee=re(kt,Ee,Ht),Lt===null?yt=kt:Lt.sibling=kt,Lt=kt);return pr&&Ti(Ae,Ht),yt}for(kt=G(Ae,kt);Ht<Le.length;Ht++)Vr=fr(kt,Ae,Ht,Le[Ht],Je),Vr!==null&&(u&&Vr.alternate!==null&&kt.delete(Vr.key===null?Ht:Vr.key),Ee=re(Vr,Ee,Ht),Lt===null?yt=Vr:Lt.sibling=Vr,Lt=Vr);return u&&kt.forEach(function(_n){return d(Ae,_n)}),pr&&Ti(Ae,Ht),yt}function jn(Ae,Ee,Le,Je){var yt=N(Le);if(typeof yt!="function")throw Error(s(150));if(Le=yt.call(Le),Le==null)throw Error(s(151));for(var Lt=yt=null,kt=Ee,Ht=Ee=0,Vr=null,Bt=Le.next();kt!==null&&!Bt.done;Ht++,Bt=Le.next()){kt.index>Ht?(Vr=kt,kt=null):Vr=kt.sibling;var _n=Qe(Ae,kt,Bt.value,Je);if(_n===null){kt===null&&(kt=Vr);break}u&&kt&&_n.alternate===null&&d(Ae,kt),Ee=re(_n,Ee,Ht),Lt===null?yt=_n:Lt.sibling=_n,Lt=_n,kt=Vr}if(Bt.done)return j(Ae,kt),pr&&Ti(Ae,Ht),yt;if(kt===null){for(;!Bt.done;Ht++,Bt=Le.next())Bt=Ct(Ae,Bt.value,Je),Bt!==null&&(Ee=re(Bt,Ee,Ht),Lt===null?yt=Bt:Lt.sibling=Bt,Lt=Bt);return pr&&Ti(Ae,Ht),yt}for(kt=G(Ae,kt);!Bt.done;Ht++,Bt=Le.next())Bt=fr(kt,Ae,Ht,Bt.value,Je),Bt!==null&&(u&&Bt.alternate!==null&&kt.delete(Bt.key===null?Ht:Bt.key),Ee=re(Bt,Ee,Ht),Lt===null?yt=Bt:Lt.sibling=Bt,Lt=Bt);return u&&kt.forEach(function(og){return d(Ae,og)}),pr&&Ti(Ae,Ht),yt}function ta(Ae,Ee,Le,Je){if(typeof Le=="object"&&Le!==null&&Le.type===_&&Le.key===null&&(Le=Le.props.children),typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case f:e:{for(var yt=Le.key,Lt=Ee;Lt!==null;){if(Lt.key===yt){if(yt=Le.type,yt===_){if(Lt.tag===7){j(Ae,Lt.sibling),Ee=K(Lt,Le.props.children),Ee.return=Ae,Ae=Ee;break e}}else if(Lt.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===p&&uh(yt)===Lt.type){j(Ae,Lt.sibling),Ee=K(Lt,Le.props),Ee.ref=So(Ae,Lt,Le),Ee.return=Ae,Ae=Ee;break e}j(Ae,Lt);break}else d(Ae,Lt);Lt=Lt.sibling}Le.type===_?(Ee=sn(Le.props.children,Ae.mode,Je,Le.key),Ee.return=Ae,Ae=Ee):(Je=Wu(Le.type,Le.key,Le.props,null,Ae.mode,Je),Je.ref=So(Ae,Ee,Le),Je.return=Ae,Ae=Je)}return se(Ae);case E:e:{for(Lt=Le.key;Ee!==null;){if(Ee.key===Lt)if(Ee.tag===4&&Ee.stateNode.containerInfo===Le.containerInfo&&Ee.stateNode.implementation===Le.implementation){j(Ae,Ee.sibling),Ee=K(Ee,Le.children||[]),Ee.return=Ae,Ae=Ee;break e}else{j(Ae,Ee);break}else d(Ae,Ee);Ee=Ee.sibling}Ee=Yu(Le,Ae.mode,Je),Ee.return=Ae,Ae=Ee}return se(Ae);case p:return Lt=Le._init,ta(Ae,Ee,Lt(Le._payload),Je)}if(z(Le))return er(Ae,Ee,Le,Je);if(N(Le))return jn(Ae,Ee,Le,Je);gu(Ae,Le)}return typeof Le=="string"&&Le!==""||typeof Le=="number"?(Le=""+Le,Ee!==null&&Ee.tag===6?(j(Ae,Ee.sibling),Ee=K(Ee,Le),Ee.return=Ae,Ae=Ee):(j(Ae,Ee),Ee=zl(Le,Ae.mode,Je),Ee.return=Ae,Ae=Ee),se(Ae)):j(Ae,Ee)}return ta}var Eo=ch(!0),fh=ch(!1),vu=Nr(null),mu=null,gl=null,Nc=null;function Ic(){Nc=gl=mu=null}function dh(u,d,j){J?(It(vu,d._currentValue),d._currentValue=j):(It(vu,d._currentValue2),d._currentValue2=j)}function ms(u){var d=vu.current;hr(vu),J?u._currentValue=d:u._currentValue2=d}function xo(u,d,j){for(;u!==null;){var G=u.alternate;if((u.childLanes&d)!==d?(u.childLanes|=d,G!==null&&(G.childLanes|=d)):G!==null&&(G.childLanes&d)!==d&&(G.childLanes|=d),u===j)break;u=u.return}}function vl(u,d){mu=u,Nc=gl=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&d)!==0&&(qr=!0),u.firstContext=null)}function Zn(u){var d=J?u._currentValue:u._currentValue2;if(Nc!==u)if(u={context:u,memoizedValue:d,next:null},gl===null){if(mu===null)throw Error(s(308));gl=u,mu.dependencies={lanes:0,firstContext:u}}else gl=gl.next=u;return d}var Ha=null;function yu(u){Ha===null?Ha=[u]:Ha.push(u)}function jc(u,d,j,G){var K=d.interleaved;return K===null?(j.next=j,yu(d)):(j.next=K.next,K.next=j),d.interleaved=j,Mi(u,G)}function Mi(u,d){u.lanes|=d;var j=u.alternate;for(j!==null&&(j.lanes|=d),j=u,u=u.return;u!==null;)u.childLanes|=d,j=u.alternate,j!==null&&(j.childLanes|=d),j=u,u=u.return;return j.tag===3?j.stateNode:null}var Qn=!1;function Dc(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hh(u,d){u=u.updateQueue,d.updateQueue===u&&(d.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function da(u,d){return{eventTime:u,lane:d,tag:0,payload:null,callback:null,next:null}}function ha(u,d,j){var G=u.updateQueue;if(G===null)return null;if(G=G.shared,(Tt&2)!==0){var K=G.pending;return K===null?d.next=d:(d.next=K.next,K.next=d),G.pending=d,Mi(u,j)}return K=G.interleaved,K===null?(d.next=d,yu(G)):(d.next=K.next,K.next=d),G.interleaved=d,Mi(u,j)}function ys(u,d,j){if(d=d.updateQueue,d!==null&&(d=d.shared,(j&4194240)!==0)){var G=d.lanes;G&=u.pendingLanes,j|=G,d.lanes=j,Vi(u,j)}}function ml(u,d){var j=u.updateQueue,G=u.alternate;if(G!==null&&(G=G.updateQueue,j===G)){var K=null,re=null;if(j=j.firstBaseUpdate,j!==null){do{var se={eventTime:j.eventTime,lane:j.lane,tag:j.tag,payload:j.payload,callback:j.callback,next:null};re===null?K=re=se:re=re.next=se,j=j.next}while(j!==null);re===null?K=re=d:re=re.next=d}else K=re=d;j={baseState:G.baseState,firstBaseUpdate:K,lastBaseUpdate:re,shared:G.shared,effects:G.effects},u.updateQueue=j;return}u=j.lastBaseUpdate,u===null?j.firstBaseUpdate=d:u.next=d,j.lastBaseUpdate=d}function Ga(u,d,j,G){var K=u.updateQueue;Qn=!1;var re=K.firstBaseUpdate,se=K.lastBaseUpdate,we=K.shared.pending;if(we!==null){K.shared.pending=null;var Me=we,qe=Me.next;Me.next=null,se===null?re=qe:se.next=qe,se=Me;var ot=u.alternate;ot!==null&&(ot=ot.updateQueue,we=ot.lastBaseUpdate,we!==se&&(we===null?ot.firstBaseUpdate=qe:we.next=qe,ot.lastBaseUpdate=Me))}if(re!==null){var Ct=K.baseState;se=0,ot=qe=Me=null,we=re;do{var Qe=we.lane,fr=we.eventTime;if((G&Qe)===Qe){ot!==null&&(ot=ot.next={eventTime:fr,lane:0,tag:we.tag,payload:we.payload,callback:we.callback,next:null});e:{var er=u,jn=we;switch(Qe=d,fr=j,jn.tag){case 1:if(er=jn.payload,typeof er=="function"){Ct=er.call(fr,Ct,Qe);break e}Ct=er;break e;case 3:er.flags=er.flags&-65537|128;case 0:if(er=jn.payload,Qe=typeof er=="function"?er.call(fr,Ct,Qe):er,Qe==null)break e;Ct=l({},Ct,Qe);break e;case 2:Qn=!0}}we.callback!==null&&we.lane!==0&&(u.flags|=64,Qe=K.effects,Qe===null?K.effects=[we]:Qe.push(we))}else fr={eventTime:fr,lane:Qe,tag:we.tag,payload:we.payload,callback:we.callback,next:null},ot===null?(qe=ot=fr,Me=Ct):ot=ot.next=fr,se|=Qe;if(we=we.next,we===null){if(we=K.shared.pending,we===null)break;Qe=we,we=Qe.next,Qe.next=null,K.lastBaseUpdate=Qe,K.shared.pending=null}}while(!0);if(ot===null&&(Me=Ct),K.baseState=Me,K.firstBaseUpdate=qe,K.lastBaseUpdate=ot,d=K.shared.interleaved,d!==null){K=d;do se|=K.lane,K=K.next;while(K!==d)}else re===null&&(K.shared.lanes=0);ya|=se,u.lanes=se,u.memoizedState=Ct}}function ph(u,d,j){if(u=d.effects,d.effects=null,u!==null)for(d=0;d<u.length;d++){var G=u[d],K=G.callback;if(K!==null){if(G.callback=null,G=j,typeof K!="function")throw Error(s(191,K));K.call(G)}}}var Va={},di=Nr(Va),yl=Nr(Va),$a=Nr(Va);function hi(u){if(u===Va)throw Error(s(174));return u}function bu(u,d){It($a,d),It(yl,u),It(di,Va),u=$(d),hr(di),It(di,u)}function Oo(){hr(di),hr(yl),hr($a)}function Fc(u){var d=hi($a.current),j=hi(di.current);d=X(j,u.type,d),j!==d&&(It(yl,u),It(di,d))}function zc(u){yl.current===u&&(hr(di),hr(yl))}var xr=Nr(0);function wu(u){for(var d=u;d!==null;){if(d.tag===13){var j=d.memoizedState;if(j!==null&&(j=j.dehydrated,j===null||ct(j)||Ie(j)))return d}else if(d.tag===19&&d.memoizedProps.revealOrder!==void 0){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var Bc=[];function Uc(){for(var u=0;u<Bc.length;u++){var d=Bc[u];J?d._workInProgressVersionPrimary=null:d._workInProgressVersionSecondary=null}Bc.length=0}var Vn=c.ReactCurrentDispatcher,Po=c.ReactCurrentBatchConfig,Wa=0,yr=null,Ir=null,Ur=null,bl=!1,bs=!1,ws=0,wl=0;function Zr(){throw Error(s(321))}function Co(u,d){if(d===null)return!1;for(var j=0;j<d.length&&j<u.length;j++)if(!ki(u[j],d[j]))return!1;return!0}function _s(u,d,j,G,K,re){if(Wa=re,yr=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,Vn.current=u===null||u.memoizedState===null?Zc:Qc,u=j(G,K),bs){re=0;do{if(bs=!1,ws=0,25<=re)throw Error(s(301));re+=1,Ur=Ir=null,d.updateQueue=null,Vn.current=Jc,u=j(G,K)}while(bs)}if(Vn.current=Mo,d=Ir!==null&&Ir.next!==null,Wa=0,Ur=Ir=yr=null,bl=!1,d)throw Error(s(300));return u}function _u(){var u=ws!==0;return ws=0,u}function Jn(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ur===null?yr.memoizedState=Ur=u:Ur=Ur.next=u,Ur}function on(){if(Ir===null){var u=yr.alternate;u=u!==null?u.memoizedState:null}else u=Ir.next;var d=Ur===null?yr.memoizedState:Ur.next;if(d!==null)Ur=d,Ir=u;else{if(u===null)throw Error(s(310));Ir=u,u={memoizedState:Ir.memoizedState,baseState:Ir.baseState,baseQueue:Ir.baseQueue,queue:Ir.queue,next:null},Ur===null?yr.memoizedState=Ur=u:Ur=Ur.next=u}return Ur}function ko(u,d){return typeof d=="function"?d(u):d}function Su(u){var d=on(),j=d.queue;if(j===null)throw Error(s(311));j.lastRenderedReducer=u;var G=Ir,K=G.baseQueue,re=j.pending;if(re!==null){if(K!==null){var se=K.next;K.next=re.next,re.next=se}G.baseQueue=K=re,j.pending=null}if(K!==null){re=K.next,G=G.baseState;var we=se=null,Me=null,qe=re;do{var ot=qe.lane;if((Wa&ot)===ot)Me!==null&&(Me=Me.next={lane:0,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null}),G=qe.hasEagerState?qe.eagerState:u(G,qe.action);else{var Ct={lane:ot,action:qe.action,hasEagerState:qe.hasEagerState,eagerState:qe.eagerState,next:null};Me===null?(we=Me=Ct,se=G):Me=Me.next=Ct,yr.lanes|=ot,ya|=ot}qe=qe.next}while(qe!==null&&qe!==re);Me===null?se=G:Me.next=we,ki(G,d.memoizedState)||(qr=!0),d.memoizedState=G,d.baseState=se,d.baseQueue=Me,j.lastRenderedState=G}if(u=j.interleaved,u!==null){K=u;do re=K.lane,yr.lanes|=re,ya|=re,K=K.next;while(K!==u)}else K===null&&(j.lanes=0);return[d.memoizedState,j.dispatch]}function _l(u){var d=on(),j=d.queue;if(j===null)throw Error(s(311));j.lastRenderedReducer=u;var G=j.dispatch,K=j.pending,re=d.memoizedState;if(K!==null){j.pending=null;var se=K=K.next;do re=u(re,se.action),se=se.next;while(se!==K);ki(re,d.memoizedState)||(qr=!0),d.memoizedState=re,d.baseQueue===null&&(d.baseState=re),j.lastRenderedState=re}return[re,G]}function qc(){}function Hc(u,d){var j=yr,G=on(),K=d(),re=!ki(G.memoizedState,K);if(re&&(G.memoizedState=K,qr=!0),G=G.queue,Ou($c.bind(null,j,G,u),[u]),G.getSnapshot!==d||re||Ur!==null&&Ur.memoizedState.tag&1){if(j.flags|=2048,Ao(9,Vc.bind(null,j,G,K,d),void 0,null),or===null)throw Error(s(349));(Wa&30)!==0||Gc(j,d,K)}return K}function Gc(u,d,j){u.flags|=16384,u={getSnapshot:d,value:j},d=yr.updateQueue,d===null?(d={lastEffect:null,stores:null},yr.updateQueue=d,d.stores=[u]):(j=d.stores,j===null?d.stores=[u]:j.push(u))}function Vc(u,d,j,G){d.value=j,d.getSnapshot=G,Wc(d)&&pa(u)}function $c(u,d,j){return j(function(){Wc(d)&&pa(u)})}function Wc(u){var d=u.getSnapshot;u=u.value;try{var j=d();return!ki(u,j)}catch{return!0}}function pa(u){var d=Mi(u,1);d!==null&&bn(d,u,1,-1)}function Eu(u){var d=Jn();return typeof u=="function"&&(u=u()),d.memoizedState=d.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:u},d.queue=u,u=u.dispatch=rg.bind(null,yr,u),[d.memoizedState,u]}function Ao(u,d,j,G){return u={tag:u,create:d,destroy:j,deps:G,next:null},d=yr.updateQueue,d===null?(d={lastEffect:null,stores:null},yr.updateQueue=d,d.lastEffect=u.next=u):(j=d.lastEffect,j===null?d.lastEffect=u.next=u:(G=j.next,j.next=u,u.next=G,d.lastEffect=u)),u}function gh(){return on().memoizedState}function xu(u,d,j,G){var K=Jn();yr.flags|=u,K.memoizedState=Ao(1|d,j,void 0,G===void 0?null:G)}function Ya(u,d,j,G){var K=on();G=G===void 0?null:G;var re=void 0;if(Ir!==null){var se=Ir.memoizedState;if(re=se.destroy,G!==null&&Co(G,se.deps)){K.memoizedState=Ao(d,j,re,G);return}}yr.flags|=u,K.memoizedState=Ao(1|d,j,re,G)}function vh(u,d){return xu(8390656,8,u,d)}function Ou(u,d){return Ya(2048,8,u,d)}function Yc(u,d){return Ya(4,2,u,d)}function sr(u,d){return Ya(4,4,u,d)}function Pu(u,d){if(typeof d=="function")return u=u(),d(u),function(){d(null)};if(d!=null)return u=u(),d.current=u,function(){d.current=null}}function Ss(u,d,j){return j=j!=null?j.concat([u]):null,Ya(4,4,Pu.bind(null,d,u),j)}function To(){}function Kc(u,d){var j=on();d=d===void 0?null:d;var G=j.memoizedState;return G!==null&&d!==null&&Co(d,G[1])?G[0]:(j.memoizedState=[u,d],u)}function Cu(u,d){var j=on();d=d===void 0?null:d;var G=j.memoizedState;return G!==null&&d!==null&&Co(d,G[1])?G[0]:(u=u(),j.memoizedState=[u,d],u)}function Sl(u,d,j){return(Wa&21)===0?(u.baseState&&(u.baseState=!1,qr=!0),u.memoizedState=j):(ki(j,d)||(j=ou(),yr.lanes|=j,ya|=j,u.baseState=!0),d)}function ku(u,d){var j=jt;jt=j!==0&&4>j?j:4,u(!0);var G=Po.transition;Po.transition={};try{u(!1),d()}finally{jt=j,Po.transition=G}}function Ro(){return on().memoizedState}function mh(u,d,j){var G=Gr(u);if(j={lane:G,action:j,hasEagerState:!1,eagerState:null,next:null},yh(u))Xc(d,j);else if(j=jc(u,d,j,G),j!==null){var K=gr();bn(j,u,G,K),Es(j,d,G)}}function rg(u,d,j){var G=Gr(u),K={lane:G,action:j,hasEagerState:!1,eagerState:null,next:null};if(yh(u))Xc(d,K);else{var re=u.alternate;if(u.lanes===0&&(re===null||re.lanes===0)&&(re=d.lastRenderedReducer,re!==null))try{var se=d.lastRenderedState,we=re(se,j);if(K.hasEagerState=!0,K.eagerState=we,ki(we,se)){var Me=d.interleaved;Me===null?(K.next=K,yu(d)):(K.next=Me.next,Me.next=K),d.interleaved=K;return}}catch{}finally{}j=jc(u,d,K,G),j!==null&&(K=gr(),bn(j,u,G,K),Es(j,d,G))}}function yh(u){var d=u.alternate;return u===yr||d!==null&&d===yr}function Xc(u,d){bs=bl=!0;var j=u.pending;j===null?d.next=d:(d.next=j.next,j.next=d),u.pending=d}function Es(u,d,j){if((j&4194240)!==0){var G=d.lanes;G&=u.pendingLanes,j|=G,d.lanes=j,Vi(u,j)}}var Mo={readContext:Zn,useCallback:Zr,useContext:Zr,useEffect:Zr,useImperativeHandle:Zr,useInsertionEffect:Zr,useLayoutEffect:Zr,useMemo:Zr,useReducer:Zr,useRef:Zr,useState:Zr,useDebugValue:Zr,useDeferredValue:Zr,useTransition:Zr,useMutableSource:Zr,useSyncExternalStore:Zr,useId:Zr,unstable_isNewReconciler:!1},Zc={readContext:Zn,useCallback:function(u,d){return Jn().memoizedState=[u,d===void 0?null:d],u},useContext:Zn,useEffect:vh,useImperativeHandle:function(u,d,j){return j=j!=null?j.concat([u]):null,xu(4194308,4,Pu.bind(null,d,u),j)},useLayoutEffect:function(u,d){return xu(4194308,4,u,d)},useInsertionEffect:function(u,d){return xu(4,2,u,d)},useMemo:function(u,d){var j=Jn();return d=d===void 0?null:d,u=u(),j.memoizedState=[u,d],u},useReducer:function(u,d,j){var G=Jn();return d=j!==void 0?j(d):d,G.memoizedState=G.baseState=d,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:d},G.queue=u,u=u.dispatch=mh.bind(null,yr,u),[G.memoizedState,u]},useRef:function(u){var d=Jn();return u={current:u},d.memoizedState=u},useState:Eu,useDebugValue:To,useDeferredValue:function(u){return Jn().memoizedState=u},useTransition:function(){var u=Eu(!1),d=u[0];return u=ku.bind(null,u[1]),Jn().memoizedState=u,[d,u]},useMutableSource:function(){},useSyncExternalStore:function(u,d,j){var G=yr,K=Jn();if(pr){if(j===void 0)throw Error(s(407));j=j()}else{if(j=d(),or===null)throw Error(s(349));(Wa&30)!==0||Gc(G,d,j)}K.memoizedState=j;var re={value:j,getSnapshot:d};return K.queue=re,vh($c.bind(null,G,re,u),[u]),G.flags|=2048,Ao(9,Vc.bind(null,G,re,j,d),void 0,null),j},useId:function(){var u=Jn(),d=or.identifierPrefix;if(pr){var j=Ai,G=Gn;j=(G&~(1<<32-Kn(G)-1)).toString(32)+j,d=":"+d+"R"+j,j=ws++,0<j&&(d+="H"+j.toString(32)),d+=":"}else j=wl++,d=":"+d+"r"+j.toString(32)+":";return u.memoizedState=d},unstable_isNewReconciler:!1},Qc={readContext:Zn,useCallback:Kc,useContext:Zn,useEffect:Ou,useImperativeHandle:Ss,useInsertionEffect:Yc,useLayoutEffect:sr,useMemo:Cu,useReducer:Su,useRef:gh,useState:function(){return Su(ko)},useDebugValue:To,useDeferredValue:function(u){var d=on();return Sl(d,Ir.memoizedState,u)},useTransition:function(){var u=Su(ko)[0],d=on().memoizedState;return[u,d]},useMutableSource:qc,useSyncExternalStore:Hc,useId:Ro,unstable_isNewReconciler:!1},Jc={readContext:Zn,useCallback:Kc,useContext:Zn,useEffect:Ou,useImperativeHandle:Ss,useInsertionEffect:Yc,useLayoutEffect:sr,useMemo:Cu,useReducer:_l,useRef:gh,useState:function(){return _l(ko)},useDebugValue:To,useDeferredValue:function(u){var d=on();return Ir===null?d.memoizedState=u:Sl(d,Ir.memoizedState,u)},useTransition:function(){var u=_l(ko)[0],d=on().memoizedState;return[u,d]},useMutableSource:qc,useSyncExternalStore:Hc,useId:Ro,unstable_isNewReconciler:!1};function ei(u,d){if(u&&u.defaultProps){d=l({},d),u=u.defaultProps;for(var j in u)d[j]===void 0&&(d[j]=u[j]);return d}return d}function ef(u,d,j,G){d=u.memoizedState,j=j(G,d),j=j==null?d:l({},d,j),u.memoizedState=j,u.lanes===0&&(u.updateQueue.baseState=j)}var xs={isMounted:function(u){return(u=u._reactInternals)?R(u)===u:!1},enqueueSetState:function(u,d,j){u=u._reactInternals;var G=gr(),K=Gr(u),re=da(G,K);re.payload=d,j!=null&&(re.callback=j),d=ha(u,re,K),d!==null&&(bn(d,u,K,G),ys(d,u,K))},enqueueReplaceState:function(u,d,j){u=u._reactInternals;var G=gr(),K=Gr(u),re=da(G,K);re.tag=1,re.payload=d,j!=null&&(re.callback=j),d=ha(u,re,K),d!==null&&(bn(d,u,K,G),ys(d,u,K))},enqueueForceUpdate:function(u,d){u=u._reactInternals;var j=gr(),G=Gr(u),K=da(j,G);K.tag=2,d!=null&&(K.callback=d),d=ha(u,K,G),d!==null&&(bn(d,u,G,j),ys(d,u,G))}};function bh(u,d,j,G,K,re,se){return u=u.stateNode,typeof u.shouldComponentUpdate=="function"?u.shouldComponentUpdate(G,re,se):d.prototype&&d.prototype.isPureReactComponent?!pu(j,G)||!pu(K,re):!0}function wh(u,d,j){var G=!1,K=za,re=d.contextType;return typeof re=="object"&&re!==null?re=Zn(re):(K=Kr(d)?Gi:gn.current,G=d.contextTypes,re=(G=G!=null)?ua(u,K):za),d=new d(j,re),u.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=xs,u.stateNode=d,d._reactInternals=u,G&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=K,u.__reactInternalMemoizedMaskedChildContext=re),d}function Au(u,d,j,G){u=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(j,G),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(j,G),d.state!==u&&xs.enqueueReplaceState(d,d.state,null)}function Wi(u,d,j,G){var K=u.stateNode;K.props=j,K.state=u.memoizedState,K.refs={},Dc(u);var re=d.contextType;typeof re=="object"&&re!==null?K.context=Zn(re):(re=Kr(d)?Gi:gn.current,K.context=ua(u,re)),K.state=u.memoizedState,re=d.getDerivedStateFromProps,typeof re=="function"&&(ef(u,d,re,j),K.state=u.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof K.getSnapshotBeforeUpdate=="function"||typeof K.UNSAFE_componentWillMount!="function"&&typeof K.componentWillMount!="function"||(d=K.state,typeof K.componentWillMount=="function"&&K.componentWillMount(),typeof K.UNSAFE_componentWillMount=="function"&&K.UNSAFE_componentWillMount(),d!==K.state&&xs.enqueueReplaceState(K,K.state,null),Ga(u,j,K,G),K.state=u.memoizedState),typeof K.componentDidMount=="function"&&(u.flags|=4194308)}function Lo(u,d){try{var j="",G=d;do j+=tg(G),G=G.return;while(G);var K=j}catch(re){K=`
|
|
56
|
-
Error generating stack: `+re.message+`
|
|
57
|
-
`+re.stack}return{value:u,source:d,stack:K,digest:null}}function Ka(u,d,j){return{value:u,source:null,stack:j??null,digest:d??null}}function pi(u,d){try{console.error(d.value)}catch(j){setTimeout(function(){throw j})}}var Os=typeof WeakMap=="function"?WeakMap:Map;function Yi(u,d,j){j=da(-1,j),j.tag=3,j.payload={element:null};var G=d.value;return j.callback=function(){kr||(kr=!0,jr=G),pi(u,d)},j}function Tu(u,d,j){j=da(-1,j),j.tag=3;var G=u.type.getDerivedStateFromError;if(typeof G=="function"){var K=d.value;j.payload=function(){return G(K)},j.callback=function(){pi(u,d)}}var re=u.stateNode;return re!==null&&typeof re.componentDidCatch=="function"&&(j.callback=function(){pi(u,d),typeof G!="function"&&(Ni===null?Ni=new Set([this]):Ni.add(this));var se=d.stack;this.componentDidCatch(d.value,{componentStack:se!==null?se:""})}),j}function _h(u,d,j){var G=u.pingCache;if(G===null){G=u.pingCache=new Os;var K=new Set;G.set(d,K)}else K=G.get(d),K===void 0&&(K=new Set,G.set(d,K));K.has(j)||(K.add(j),u=Ah.bind(null,u,d,j),d.then(u,u))}function Sh(u){do{var d;if((d=u.tag===13)&&(d=u.memoizedState,d=d!==null?d.dehydrated!==null:!0),d)return u;u=u.return}while(u!==null);return null}function Xa(u,d,j,G,K){return(u.mode&1)===0?(u===d?u.flags|=65536:(u.flags|=128,j.flags|=131072,j.flags&=-52805,j.tag===1&&(j.alternate===null?j.tag=17:(d=da(-1,1),d.tag=2,ha(j,d,1))),j.lanes|=1),u):(u.flags|=65536,u.lanes=K,u)}var Ps=c.ReactCurrentOwner,qr=!1;function Qr(u,d,j,G){d.child=u===null?fh(d,null,j,G):Eo(d,u.child,j,G)}function Ru(u,d,j,G,K){j=j.render;var re=d.ref;return vl(d,K),G=_s(u,d,j,G,re,K),j=_u(),u!==null&&!qr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~K,va(u,d,K)):(pr&&j&&ps(d),d.flags|=1,Qr(u,d,G,K),d.child)}function No(u,d,j,G,K){if(u===null){var re=j.type;return typeof re=="function"&&!Dl(re)&&re.defaultProps===void 0&&j.compare===null&&j.defaultProps===void 0?(d.tag=15,d.type=re,ga(u,d,re,G,K)):(u=Wu(j.type,null,G,d,d.mode,K),u.ref=d.ref,u.return=d,d.child=u)}if(re=u.child,(u.lanes&K)===0){var se=re.memoizedProps;if(j=j.compare,j=j!==null?j:pu,j(se,G)&&u.ref===d.ref)return va(u,d,K)}return d.flags|=1,u=oo(re,G),u.ref=d.ref,u.return=d,d.child=u}function ga(u,d,j,G,K){if(u!==null){var re=u.memoizedProps;if(pu(re,G)&&u.ref===d.ref)if(qr=!1,d.pendingProps=G=re,(u.lanes&K)!==0)(u.flags&131072)!==0&&(qr=!0);else return d.lanes=u.lanes,va(u,d,K)}return Ki(u,d,j,G,K)}function ur(u,d,j){var G=d.pendingProps,K=G.children,re=u!==null?u.memoizedState:null;if(G.mode==="hidden")if((d.mode&1)===0)d.memoizedState={baseLanes:0,cachePool:null,transitions:null},It(ro,Hr),Hr|=j;else{if((j&1073741824)===0)return u=re!==null?re.baseLanes|j:j,d.lanes=d.childLanes=1073741824,d.memoizedState={baseLanes:u,cachePool:null,transitions:null},d.updateQueue=null,It(ro,Hr),Hr|=u,null;d.memoizedState={baseLanes:0,cachePool:null,transitions:null},G=re!==null?re.baseLanes:j,It(ro,Hr),Hr|=G}else re!==null?(G=re.baseLanes|j,d.memoizedState=null):G=j,It(ro,Hr),Hr|=G;return Qr(u,d,K,j),d.child}function ar(u,d){var j=d.ref;(u===null&&j!==null||u!==null&&u.ref!==j)&&(d.flags|=512,d.flags|=2097152)}function Ki(u,d,j,G,K){var re=Kr(j)?Gi:gn.current;return re=ua(d,re),vl(d,K),j=_s(u,d,j,G,re,K),G=_u(),u!==null&&!qr?(d.updateQueue=u.updateQueue,d.flags&=-2053,u.lanes&=~K,va(u,d,K)):(pr&&G&&ps(d),d.flags|=1,Qr(u,d,j,K),d.child)}function ln(u,d,j,G,K){if(Kr(j)){var re=!0;ll(d)}else re=!1;if(vl(d,K),d.stateNode===null)Cs(u,d),wh(d,j,G),Wi(d,j,G,K),G=!0;else if(u===null){var se=d.stateNode,we=d.memoizedProps;se.props=we;var Me=se.context,qe=j.contextType;typeof qe=="object"&&qe!==null?qe=Zn(qe):(qe=Kr(j)?Gi:gn.current,qe=ua(d,qe));var ot=j.getDerivedStateFromProps,Ct=typeof ot=="function"||typeof se.getSnapshotBeforeUpdate=="function";Ct||typeof se.UNSAFE_componentWillReceiveProps!="function"&&typeof se.componentWillReceiveProps!="function"||(we!==G||Me!==qe)&&Au(d,se,G,qe),Qn=!1;var Qe=d.memoizedState;se.state=Qe,Ga(d,G,se,K),Me=d.memoizedState,we!==G||Qe!==Me||qn.current||Qn?(typeof ot=="function"&&(ef(d,j,ot,G),Me=d.memoizedState),(we=Qn||bh(d,j,we,G,Qe,Me,qe))?(Ct||typeof se.UNSAFE_componentWillMount!="function"&&typeof se.componentWillMount!="function"||(typeof se.componentWillMount=="function"&&se.componentWillMount(),typeof se.UNSAFE_componentWillMount=="function"&&se.UNSAFE_componentWillMount()),typeof se.componentDidMount=="function"&&(d.flags|=4194308)):(typeof se.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=G,d.memoizedState=Me),se.props=G,se.state=Me,se.context=qe,G=we):(typeof se.componentDidMount=="function"&&(d.flags|=4194308),G=!1)}else{se=d.stateNode,hh(u,d),we=d.memoizedProps,qe=d.type===d.elementType?we:ei(d.type,we),se.props=qe,Ct=d.pendingProps,Qe=se.context,Me=j.contextType,typeof Me=="object"&&Me!==null?Me=Zn(Me):(Me=Kr(j)?Gi:gn.current,Me=ua(d,Me));var fr=j.getDerivedStateFromProps;(ot=typeof fr=="function"||typeof se.getSnapshotBeforeUpdate=="function")||typeof se.UNSAFE_componentWillReceiveProps!="function"&&typeof se.componentWillReceiveProps!="function"||(we!==Ct||Qe!==Me)&&Au(d,se,G,Me),Qn=!1,Qe=d.memoizedState,se.state=Qe,Ga(d,G,se,K);var er=d.memoizedState;we!==Ct||Qe!==er||qn.current||Qn?(typeof fr=="function"&&(ef(d,j,fr,G),er=d.memoizedState),(qe=Qn||bh(d,j,qe,G,Qe,er,Me)||!1)?(ot||typeof se.UNSAFE_componentWillUpdate!="function"&&typeof se.componentWillUpdate!="function"||(typeof se.componentWillUpdate=="function"&&se.componentWillUpdate(G,er,Me),typeof se.UNSAFE_componentWillUpdate=="function"&&se.UNSAFE_componentWillUpdate(G,er,Me)),typeof se.componentDidUpdate=="function"&&(d.flags|=4),typeof se.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof se.componentDidUpdate!="function"||we===u.memoizedProps&&Qe===u.memoizedState||(d.flags|=4),typeof se.getSnapshotBeforeUpdate!="function"||we===u.memoizedProps&&Qe===u.memoizedState||(d.flags|=1024),d.memoizedProps=G,d.memoizedState=er),se.props=G,se.state=er,se.context=Me,G=qe):(typeof se.componentDidUpdate!="function"||we===u.memoizedProps&&Qe===u.memoizedState||(d.flags|=4),typeof se.getSnapshotBeforeUpdate!="function"||we===u.memoizedProps&&Qe===u.memoizedState||(d.flags|=1024),G=!1)}return vn(u,d,j,G,re,K)}function vn(u,d,j,G,K,re){ar(u,d);var se=(d.flags&128)!==0;if(!G&&!se)return K&&Ac(d,j,!1),va(u,d,re);G=d.stateNode,Ps.current=d;var we=se&&typeof j.getDerivedStateFromError!="function"?null:G.render();return d.flags|=1,u!==null&&se?(d.child=Eo(d,u.child,null,re),d.child=Eo(d,null,we,re)):Qr(u,d,we,re),d.memoizedState=G.state,K&&Ac(d,j,!0),d.child}function Za(u){var d=u.stateNode;d.pendingContext?Qd(u,d.pendingContext,d.pendingContext!==d.context):d.context&&Qd(u,d.context,!1),bu(u,d.containerInfo)}function Io(u,d,j,G,K){return _o(),Lc(K),d.flags|=256,Qr(u,d,j,G),d.child}var mn={dehydrated:null,treeContext:null,retryLane:0};function El(u){return{baseLanes:u,cachePool:null,transitions:null}}function tf(u,d,j){var G=d.pendingProps,K=xr.current,re=!1,se=(d.flags&128)!==0,we;if((we=se)||(we=u!==null&&u.memoizedState===null?!1:(K&2)!==0),we?(re=!0,d.flags&=-129):(u===null||u.memoizedState!==null)&&(K|=1),It(xr,K&1),u===null)return Mc(d),u=d.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?((d.mode&1)===0?d.lanes=1:Ie(u)?d.lanes=8:d.lanes=1073741824,null):(se=G.children,u=G.fallback,re?(G=d.mode,re=d.child,se={mode:"hidden",children:se},(G&1)===0&&re!==null?(re.childLanes=0,re.pendingProps=se):re=Fl(se,G,0,null),u=sn(u,G,j,null),re.return=d,u.return=d,re.sibling=u,d.child=re,d.child.memoizedState=El(j),d.memoizedState=mn,u):Mu(d,se));if(K=u.memoizedState,K!==null&&(we=K.dehydrated,we!==null))return Eh(u,d,se,G,we,K,j);if(re){re=G.fallback,se=d.mode,K=u.child,we=K.sibling;var Me={mode:"hidden",children:G.children};return(se&1)===0&&d.child!==K?(G=d.child,G.childLanes=0,G.pendingProps=Me,d.deletions=null):(G=oo(K,Me),G.subtreeFlags=K.subtreeFlags&14680064),we!==null?re=oo(we,re):(re=sn(re,se,j,null),re.flags|=2),re.return=d,G.return=d,G.sibling=re,d.child=G,G=re,re=d.child,se=u.child.memoizedState,se=se===null?El(j):{baseLanes:se.baseLanes|j,cachePool:null,transitions:se.transitions},re.memoizedState=se,re.childLanes=u.childLanes&~j,d.memoizedState=mn,G}return re=u.child,u=re.sibling,G=oo(re,{mode:"visible",children:G.children}),(d.mode&1)===0&&(G.lanes=j),G.return=d,G.sibling=null,u!==null&&(j=d.deletions,j===null?(d.deletions=[u],d.flags|=16):j.push(u)),d.child=G,d.memoizedState=null,G}function Mu(u,d){return d=Fl({mode:"visible",children:d},u.mode,0,null),d.return=u,u.child=d}function jo(u,d,j,G){return G!==null&&Lc(G),Eo(d,u.child,null,j),u=Mu(d,d.pendingProps.children),u.flags|=2,d.memoizedState=null,u}function Eh(u,d,j,G,K,re,se){if(j)return d.flags&256?(d.flags&=-257,G=Ka(Error(s(422))),jo(u,d,se,G)):d.memoizedState!==null?(d.child=u.child,d.flags|=128,null):(re=G.fallback,K=d.mode,G=Fl({mode:"visible",children:G.children},K,0,null),re=sn(re,K,se,null),re.flags|=2,G.return=d,re.return=d,G.sibling=re,d.child=G,(d.mode&1)!==0&&Eo(d,u.child,null,se),d.child.memoizedState=El(se),d.memoizedState=mn,re);if((d.mode&1)===0)return jo(u,d,se,null);if(Ie(K))return G=_t(K).digest,re=Error(s(419)),G=Ka(re,G,void 0),jo(u,d,se,G);if(j=(se&u.childLanes)!==0,qr||j){if(G=or,G!==null){switch(se&-se){case 4:K=2;break;case 16:K=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:K=32;break;case 536870912:K=268435456;break;default:K=0}K=(K&(G.suspendedLanes|se))!==0?0:K,K!==0&&K!==re.retryLane&&(re.retryLane=K,Mi(u,K),bn(G,u,K,-1))}return jl(),G=Ka(Error(s(421))),jo(u,d,se,G)}return ct(K)?(d.flags|=128,d.child=u.child,d=Rh.bind(null,u),Fe(K,d),null):(u=re.treeContext,ue&&(Tn=pn(K),an=d,pr=!0,Ri=null,vs=!1,u!==null&&(An[Xn++]=Gn,An[Xn++]=Ai,An[Xn++]=Br,Gn=u.id,Ai=u.overflow,Br=d)),d=Mu(d,G.children),d.flags|=4096,d)}function Xi(u,d,j){u.lanes|=d;var G=u.alternate;G!==null&&(G.lanes|=d),xo(u.return,d,j)}function xl(u,d,j,G,K){var re=u.memoizedState;re===null?u.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:G,tail:j,tailMode:K}:(re.isBackwards=d,re.rendering=null,re.renderingStartTime=0,re.last=G,re.tail=j,re.tailMode=K)}function Lu(u,d,j){var G=d.pendingProps,K=G.revealOrder,re=G.tail;if(Qr(u,d,G.children,j),G=xr.current,(G&2)!==0)G=G&1|2,d.flags|=128;else{if(u!==null&&(u.flags&128)!==0)e:for(u=d.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Xi(u,j,d);else if(u.tag===19)Xi(u,j,d);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===d)break e;for(;u.sibling===null;){if(u.return===null||u.return===d)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}G&=1}if(It(xr,G),(d.mode&1)===0)d.memoizedState=null;else switch(K){case"forwards":for(j=d.child,K=null;j!==null;)u=j.alternate,u!==null&&wu(u)===null&&(K=j),j=j.sibling;j=K,j===null?(K=d.child,d.child=null):(K=j.sibling,j.sibling=null),xl(d,!1,K,j,re);break;case"backwards":for(j=null,K=d.child,d.child=null;K!==null;){if(u=K.alternate,u!==null&&wu(u)===null){d.child=K;break}u=K.sibling,K.sibling=j,j=K,K=u}xl(d,!0,j,null,re);break;case"together":xl(d,!1,null,null,void 0);break;default:d.memoizedState=null}return d.child}function Cs(u,d){(d.mode&1)===0&&u!==null&&(u.alternate=null,d.alternate=null,d.flags|=2)}function va(u,d,j){if(u!==null&&(d.dependencies=u.dependencies),ya|=d.lanes,(j&d.childLanes)===0)return null;if(u!==null&&d.child!==u.child)throw Error(s(153));if(d.child!==null){for(u=d.child,j=oo(u,u.pendingProps),d.child=j,j.return=d;u.sibling!==null;)u=u.sibling,j=j.sibling=oo(u,u.pendingProps),j.return=d;j.sibling=null}return d.child}function Qa(u,d,j){switch(d.tag){case 3:Za(d),_o();break;case 5:Fc(d);break;case 1:Kr(d.type)&&ll(d);break;case 4:bu(d,d.stateNode.containerInfo);break;case 10:dh(d,d.type._context,d.memoizedProps.value);break;case 13:var G=d.memoizedState;if(G!==null)return G.dehydrated!==null?(It(xr,xr.current&1),d.flags|=128,null):(j&d.child.childLanes)!==0?tf(u,d,j):(It(xr,xr.current&1),u=va(u,d,j),u!==null?u.sibling:null);It(xr,xr.current&1);break;case 19:if(G=(j&d.childLanes)!==0,(u.flags&128)!==0){if(G)return Lu(u,d,j);d.flags|=128}var K=d.memoizedState;if(K!==null&&(K.rendering=null,K.tail=null,K.lastEffect=null),It(xr,xr.current),G)break;return null;case 22:case 23:return d.lanes=0,ur(u,d,j)}return va(u,d,j)}function Rn(u){u.flags|=4}function Do(u,d){if(u!==null&&u.child===d.child)return!0;if((d.flags&16)!==0)return!1;for(u=d.child;u!==null;){if((u.flags&12854)!==0||(u.subtreeFlags&12854)!==0)return!1;u=u.sibling}return!0}var Ja,eo,Mn,Ln;if(ie)Ja=function(u,d){for(var j=d.child;j!==null;){if(j.tag===5||j.tag===6)U(u,j.stateNode);else if(j.tag!==4&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===d)break;for(;j.sibling===null;){if(j.return===null||j.return===d)return;j=j.return}j.sibling.return=j.return,j=j.sibling}},eo=function(){},Mn=function(u,d,j,G,K){if(u=u.memoizedProps,u!==G){var re=d.stateNode,se=hi(di.current);j=ee(re,j,u,G,K,se),(d.updateQueue=j)&&Rn(d)}},Ln=function(u,d,j,G){j!==G&&Rn(d)};else if(le){Ja=function(u,d,j,G){for(var K=d.child;K!==null;){if(K.tag===5){var re=K.stateNode;j&&G&&(re=at(re,K.type,K.memoizedProps,K)),U(u,re)}else if(K.tag===6)re=K.stateNode,j&&G&&(re=bt(re,K.memoizedProps,K)),U(u,re);else if(K.tag!==4){if(K.tag===22&&K.memoizedState!==null)re=K.child,re!==null&&(re.return=K),Ja(u,K,!0,!0);else if(K.child!==null){K.child.return=K,K=K.child;continue}}if(K===d)break;for(;K.sibling===null;){if(K.return===null||K.return===d)return;K=K.return}K.sibling.return=K.return,K=K.sibling}};var to=function(u,d,j,G){for(var K=d.child;K!==null;){if(K.tag===5){var re=K.stateNode;j&&G&&(re=at(re,K.type,K.memoizedProps,K)),mr(u,re)}else if(K.tag===6)re=K.stateNode,j&&G&&(re=bt(re,K.memoizedProps,K)),mr(u,re);else if(K.tag!==4){if(K.tag===22&&K.memoizedState!==null)re=K.child,re!==null&&(re.return=K),to(u,K,!0,!0);else if(K.child!==null){K.child.return=K,K=K.child;continue}}if(K===d)break;for(;K.sibling===null;){if(K.return===null||K.return===d)return;K=K.return}K.sibling.return=K.return,K=K.sibling}};eo=function(u,d){var j=d.stateNode;if(!Do(u,d)){u=j.containerInfo;var G=tr(u);to(G,d,!1,!1),j.pendingChildren=G,Rn(d),Pn(u,G)}},Mn=function(u,d,j,G,K){var re=u.stateNode,se=u.memoizedProps;if((u=Do(u,d))&&se===G)d.stateNode=re;else{var we=d.stateNode,Me=hi(di.current),qe=null;se!==G&&(qe=ee(we,j,se,G,K,Me)),u&&qe===null?d.stateNode=re:(re=Pr(re,qe,j,se,G,d,u,we),W(re,j,G,K,Me)&&Rn(d),d.stateNode=re,u?Rn(d):Ja(re,d,!1,!1))}},Ln=function(u,d,j,G){j!==G?(u=hi($a.current),j=hi(di.current),d.stateNode=te(G,u,j,d),Rn(d)):d.stateNode=u.stateNode}}else eo=function(){},Mn=function(){},Ln=function(){};function ti(u,d){if(!pr)switch(u.tailMode){case"hidden":d=u.tail;for(var j=null;d!==null;)d.alternate!==null&&(j=d),d=d.sibling;j===null?u.tail=null:j.sibling=null;break;case"collapsed":j=u.tail;for(var G=null;j!==null;)j.alternate!==null&&(G=j),j=j.sibling;G===null?d||u.tail===null?u.tail=null:u.tail.sibling=null:G.sibling=null}}function br(u){var d=u.alternate!==null&&u.alternate.child===u.child,j=0,G=0;if(d)for(var K=u.child;K!==null;)j|=K.lanes|K.childLanes,G|=K.subtreeFlags&14680064,G|=K.flags&14680064,K.return=u,K=K.sibling;else for(K=u.child;K!==null;)j|=K.lanes|K.childLanes,G|=K.subtreeFlags,G|=K.flags,K.return=u,K=K.sibling;return u.subtreeFlags|=G,u.childLanes=j,d}function Fo(u,d,j){var G=d.pendingProps;switch(gs(d),d.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return br(d),null;case 1:return Kr(d.type)&&bo(),br(d),null;case 3:return j=d.stateNode,Oo(),hr(qn),hr(gn),Uc(),j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),(u===null||u.child===null)&&(hu(d)?Rn(d):u===null||u.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,Ri!==null&&(Vu(Ri),Ri=null))),eo(u,d),br(d),null;case 5:zc(d),j=hi($a.current);var K=d.type;if(u!==null&&d.stateNode!=null)Mn(u,d,K,G,j),u.ref!==d.ref&&(d.flags|=512,d.flags|=2097152);else{if(!G){if(d.stateNode===null)throw Error(s(166));return br(d),null}if(u=hi(di.current),hu(d)){if(!ue)throw Error(s(175));u=Lr(d.stateNode,d.type,d.memoizedProps,j,u,d,!vs),d.updateQueue=u,u!==null&&Rn(d)}else{var re=B(K,G,j,u,d);Ja(re,d,!1,!1),d.stateNode=re,W(re,K,G,j,u)&&Rn(d)}d.ref!==null&&(d.flags|=512,d.flags|=2097152)}return br(d),null;case 6:if(u&&d.stateNode!=null)Ln(u,d,u.memoizedProps,G);else{if(typeof G!="string"&&d.stateNode===null)throw Error(s(166));if(u=hi($a.current),j=hi(di.current),hu(d)){if(!ue)throw Error(s(176));if(u=d.stateNode,j=d.memoizedProps,(G=et(u,j,d,!vs))&&(K=an,K!==null))switch(K.tag){case 3:sa(K.stateNode.containerInfo,u,j,(K.mode&1)!==0);break;case 5:Xt(K.type,K.memoizedProps,K.stateNode,u,j,(K.mode&1)!==0)}G&&Rn(d)}else d.stateNode=te(G,u,j,d)}return br(d),null;case 13:if(hr(xr),G=d.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(pr&&Tn!==null&&(d.mode&1)!==0&&(d.flags&128)===0)sh(),_o(),d.flags|=98560,K=!1;else if(K=hu(d),G!==null&&G.dehydrated!==null){if(u===null){if(!K)throw Error(s(318));if(!ue)throw Error(s(344));if(K=d.memoizedState,K=K!==null?K.dehydrated:null,!K)throw Error(s(317));qt(K,d)}else _o(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;br(d),K=!1}else Ri!==null&&(Vu(Ri),Ri=null),K=!0;if(!K)return d.flags&65536?d:null}return(d.flags&128)!==0?(d.lanes=j,d):(j=G!==null,j!==(u!==null&&u.memoizedState!==null)&&j&&(d.child.flags|=8192,(d.mode&1)!==0&&(u===null||(xr.current&1)!==0?_r===0&&(_r=3):jl())),d.updateQueue!==null&&(d.flags|=4),br(d),null);case 4:return Oo(),eo(u,d),u===null&&ye(d.stateNode.containerInfo),br(d),null;case 10:return ms(d.type._context),br(d),null;case 17:return Kr(d.type)&&bo(),br(d),null;case 19:if(hr(xr),K=d.memoizedState,K===null)return br(d),null;if(G=(d.flags&128)!==0,re=K.rendering,re===null)if(G)ti(K,!1);else{if(_r!==0||u!==null&&(u.flags&128)!==0)for(u=d.child;u!==null;){if(re=wu(u),re!==null){for(d.flags|=128,ti(K,!1),u=re.updateQueue,u!==null&&(d.updateQueue=u,d.flags|=4),d.subtreeFlags=0,u=j,j=d.child;j!==null;)G=j,K=u,G.flags&=14680066,re=G.alternate,re===null?(G.childLanes=0,G.lanes=K,G.child=null,G.subtreeFlags=0,G.memoizedProps=null,G.memoizedState=null,G.updateQueue=null,G.dependencies=null,G.stateNode=null):(G.childLanes=re.childLanes,G.lanes=re.lanes,G.child=re.child,G.subtreeFlags=0,G.deletions=null,G.memoizedProps=re.memoizedProps,G.memoizedState=re.memoizedState,G.updateQueue=re.updateQueue,G.type=re.type,K=re.dependencies,G.dependencies=K===null?null:{lanes:K.lanes,firstContext:K.firstContext}),j=j.sibling;return It(xr,xr.current&1|2),d.child}u=u.sibling}K.tail!==null&&Xr()>Ns&&(d.flags|=128,G=!0,ti(K,!1),d.lanes=4194304)}else{if(!G)if(u=wu(re),u!==null){if(d.flags|=128,G=!0,u=u.updateQueue,u!==null&&(d.updateQueue=u,d.flags|=4),ti(K,!0),K.tail===null&&K.tailMode==="hidden"&&!re.alternate&&!pr)return br(d),null}else 2*Xr()-K.renderingStartTime>Ns&&j!==1073741824&&(d.flags|=128,G=!0,ti(K,!1),d.lanes=4194304);K.isBackwards?(re.sibling=d.child,d.child=re):(u=K.last,u!==null?u.sibling=re:d.child=re,K.last=re)}return K.tail!==null?(d=K.tail,K.rendering=d,K.tail=d.sibling,K.renderingStartTime=Xr(),d.sibling=null,u=xr.current,It(xr,G?u&1|2:u&1),d):(br(d),null);case 22:case 23:return $u(),j=d.memoizedState!==null,u!==null&&u.memoizedState!==null!==j&&(d.flags|=8192),j&&(d.mode&1)!==0?(Hr&1073741824)!==0&&(br(d),ie&&d.subtreeFlags&6&&(d.flags|=8192)):br(d),null;case 24:return null;case 25:return null}throw Error(s(156,d.tag))}function xh(u,d){switch(gs(d),d.tag){case 1:return Kr(d.type)&&bo(),u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 3:return Oo(),hr(qn),hr(gn),Uc(),u=d.flags,(u&65536)!==0&&(u&128)===0?(d.flags=u&-65537|128,d):null;case 5:return zc(d),null;case 13:if(hr(xr),u=d.memoizedState,u!==null&&u.dehydrated!==null){if(d.alternate===null)throw Error(s(340));_o()}return u=d.flags,u&65536?(d.flags=u&-65537|128,d):null;case 19:return hr(xr),null;case 4:return Oo(),null;case 10:return ms(d.type._context),null;case 22:case 23:return $u(),null;case 24:return null;default:return null}}var Ol=!1,Jr=!1,ri=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Jt(u,d){var j=u.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(G){vr(u,d,G)}else j.current=null}function ni(u,d,j){try{j()}catch(G){vr(u,d,G)}}var rf=!1;function Oh(u,d){for(q(u.containerInfo),Ke=d;Ke!==null;)if(u=Ke,d=u.child,(u.subtreeFlags&1028)!==0&&d!==null)d.return=u,Ke=d;else for(;Ke!==null;){u=Ke;try{var j=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(j!==null){var G=j.memoizedProps,K=j.memoizedState,re=u.stateNode,se=re.getSnapshotBeforeUpdate(u.elementType===u.type?G:ei(u.type,G),K);re.__reactInternalSnapshotBeforeUpdate=se}break;case 3:ie&&Tr(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(we){vr(u,u.return,we)}if(d=u.sibling,d!==null){d.return=u.return,Ke=d;break}Ke=u.return}return j=rf,rf=!1,j}function zo(u,d,j){var G=d.updateQueue;if(G=G!==null?G.lastEffect:null,G!==null){var K=G=G.next;do{if((K.tag&u)===u){var re=K.destroy;K.destroy=void 0,re!==void 0&&ni(d,j,re)}K=K.next}while(K!==G)}}function Pl(u,d){if(d=d.updateQueue,d=d!==null?d.lastEffect:null,d!==null){var j=d=d.next;do{if((j.tag&u)===u){var G=j.create;j.destroy=G()}j=j.next}while(j!==d)}}function Nu(u){var d=u.ref;if(d!==null){var j=u.stateNode;switch(u.tag){case 5:u=Y(j);break;default:u=j}typeof d=="function"?d(u):d.current=u}}function ks(u){var d=u.alternate;d!==null&&(u.alternate=null,ks(d)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(d=u.stateNode,d!==null&&pe(d)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function nf(u){return u.tag===5||u.tag===3||u.tag===4}function Bo(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||nf(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function As(u,d,j){var G=u.tag;if(G===5||G===6)u=u.stateNode,d?wt(j,u,d):$e(j,u);else if(G!==4&&(u=u.child,u!==null))for(As(u,d,j),u=u.sibling;u!==null;)As(u,d,j),u=u.sibling}function af(u,d,j){var G=u.tag;if(G===5||G===6)u=u.stateNode,d?lt(j,u,d):He(j,u);else if(G!==4&&(u=u.child,u!==null))for(af(u,d,j),u=u.sibling;u!==null;)af(u,d,j),u=u.sibling}var Rr=null,$n=!1;function Li(u,d,j){for(j=j.child;j!==null;)Iu(u,d,j),j=j.sibling}function Iu(u,d,j){if(Hn&&typeof Hn.onCommitFiberUnmount=="function")try{Hn.onCommitFiberUnmount(Ua,j)}catch{}switch(j.tag){case 5:Jr||Jt(j,d);case 6:if(ie){var G=Rr,K=$n;Rr=null,Li(u,d,j),Rr=G,$n=K,Rr!==null&&($n?_e(Rr,j.stateNode):zt(Rr,j.stateNode))}else Li(u,d,j);break;case 18:ie&&Rr!==null&&($n?kn(Rr,j.stateNode):Cn(Rr,j.stateNode));break;case 4:ie?(G=Rr,K=$n,Rr=j.stateNode.containerInfo,$n=!0,Li(u,d,j),Rr=G,$n=K):(le&&(G=j.stateNode.containerInfo,K=tr(G),Ve(G,K)),Li(u,d,j));break;case 0:case 11:case 14:case 15:if(!Jr&&(G=j.updateQueue,G!==null&&(G=G.lastEffect,G!==null))){K=G=G.next;do{var re=K,se=re.destroy;re=re.tag,se!==void 0&&((re&2)!==0||(re&4)!==0)&&ni(j,d,se),K=K.next}while(K!==G)}Li(u,d,j);break;case 1:if(!Jr&&(Jt(j,d),G=j.stateNode,typeof G.componentWillUnmount=="function"))try{G.props=j.memoizedProps,G.state=j.memoizedState,G.componentWillUnmount()}catch(we){vr(j,d,we)}Li(u,d,j);break;case 21:Li(u,d,j);break;case 22:j.mode&1?(Jr=(G=Jr)||j.memoizedState!==null,Li(u,d,j),Jr=G):Li(u,d,j);break;default:Li(u,d,j)}}function Uo(u){var d=u.updateQueue;if(d!==null){u.updateQueue=null;var j=u.stateNode;j===null&&(j=u.stateNode=new ri),d.forEach(function(G){var K=ng.bind(null,u,G);j.has(G)||(j.add(G),G.then(K,K))})}}function gi(u,d){var j=d.deletions;if(j!==null)for(var G=0;G<j.length;G++){var K=j[G];try{var re=u,se=d;if(ie){var we=se;e:for(;we!==null;){switch(we.tag){case 5:Rr=we.stateNode,$n=!1;break e;case 3:Rr=we.stateNode.containerInfo,$n=!0;break e;case 4:Rr=we.stateNode.containerInfo,$n=!0;break e}we=we.return}if(Rr===null)throw Error(s(160));Iu(re,se,K),Rr=null,$n=!1}else Iu(re,se,K);var Me=K.alternate;Me!==null&&(Me.return=null),K.return=null}catch(qe){vr(K,d,qe)}}if(d.subtreeFlags&12854)for(d=d.child;d!==null;)Ts(d,u),d=d.sibling}function Ts(u,d){var j=u.alternate,G=u.flags;switch(u.tag){case 0:case 11:case 14:case 15:if(gi(d,u),ii(u),G&4){try{zo(3,u,u.return),Pl(3,u)}catch(Qe){vr(u,u.return,Qe)}try{zo(5,u,u.return)}catch(Qe){vr(u,u.return,Qe)}}break;case 1:gi(d,u),ii(u),G&512&&j!==null&&Jt(j,j.return);break;case 5:if(gi(d,u),ii(u),G&512&&j!==null&&Jt(j,j.return),ie){if(u.flags&32){var K=u.stateNode;try{Se(K)}catch(Qe){vr(u,u.return,Qe)}}if(G&4&&(K=u.stateNode,K!=null)){var re=u.memoizedProps;if(j=j!==null?j.memoizedProps:re,G=u.type,d=u.updateQueue,u.updateQueue=null,d!==null)try{Ye(K,d,G,j,re,u)}catch(Qe){vr(u,u.return,Qe)}}}break;case 6:if(gi(d,u),ii(u),G&4&&ie){if(u.stateNode===null)throw Error(s(162));K=u.stateNode,re=u.memoizedProps,j=j!==null?j.memoizedProps:re;try{Xe(K,j,re)}catch(Qe){vr(u,u.return,Qe)}}break;case 3:if(gi(d,u),ii(u),G&4){if(ie&&ue&&j!==null&&j.memoizedState.isDehydrated)try{rr(d.containerInfo)}catch(Qe){vr(u,u.return,Qe)}if(le){K=d.containerInfo,re=d.pendingChildren;try{Ve(K,re)}catch(Qe){vr(u,u.return,Qe)}}}break;case 4:if(gi(d,u),ii(u),G&4&&le){re=u.stateNode,K=re.containerInfo,re=re.pendingChildren;try{Ve(K,re)}catch(Qe){vr(u,u.return,Qe)}}break;case 13:gi(d,u),ii(u),K=u.child,K.flags&8192&&(re=K.memoizedState!==null,K.stateNode.isHidden=re,!re||K.alternate!==null&&K.alternate.memoizedState!==null||(Ml=Xr())),G&4&&Uo(u);break;case 22:var se=j!==null&&j.memoizedState!==null;if(u.mode&1?(Jr=(j=Jr)||se,gi(d,u),Jr=j):gi(d,u),ii(u),G&8192){if(j=u.memoizedState!==null,(u.stateNode.isHidden=j)&&!se&&(u.mode&1)!==0)for(Ke=u,G=u.child;G!==null;){for(d=Ke=G;Ke!==null;){se=Ke;var we=se.child;switch(se.tag){case 0:case 11:case 14:case 15:zo(4,se,se.return);break;case 1:Jt(se,se.return);var Me=se.stateNode;if(typeof Me.componentWillUnmount=="function"){var qe=se,ot=se.return;try{var Ct=qe;Me.props=Ct.memoizedProps,Me.state=Ct.memoizedState,Me.componentWillUnmount()}catch(Qe){vr(qe,ot,Qe)}}break;case 5:Jt(se,se.return);break;case 22:if(se.memoizedState!==null){Fu(d);continue}}we!==null?(we.return=se,Ke=we):Fu(d)}G=G.sibling}if(ie){e:if(G=null,ie)for(d=u;;){if(d.tag===5){if(G===null){G=d;try{K=d.stateNode,j?xt(K):At(d.stateNode,d.memoizedProps)}catch(Qe){vr(u,u.return,Qe)}}}else if(d.tag===6){if(G===null)try{re=d.stateNode,j?ht(re):vt(re,d.memoizedProps)}catch(Qe){vr(u,u.return,Qe)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===u)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break e;for(;d.sibling===null;){if(d.return===null||d.return===u)break e;G===d&&(G=null),d=d.return}G===d&&(G=null),d.sibling.return=d.return,d=d.sibling}}}break;case 19:gi(d,u),ii(u),G&4&&Uo(u);break;case 21:break;default:gi(d,u),ii(u)}}function ii(u){var d=u.flags;if(d&2){try{if(ie){e:{for(var j=u.return;j!==null;){if(nf(j)){var G=j;break e}j=j.return}throw Error(s(160))}switch(G.tag){case 5:var K=G.stateNode;G.flags&32&&(Se(K),G.flags&=-33);var re=Bo(u);af(u,re,K);break;case 3:case 4:var se=G.stateNode.containerInfo,we=Bo(u);As(u,we,se);break;default:throw Error(s(161))}}}catch(Me){vr(u,u.return,Me)}u.flags&=-3}d&4096&&(u.flags&=-4097)}function Cl(u,d,j){Ke=u,ju(u)}function ju(u,d,j){for(var G=(u.mode&1)!==0;Ke!==null;){var K=Ke,re=K.child;if(K.tag===22&&G){var se=K.memoizedState!==null||Ol;if(!se){var we=K.alternate,Me=we!==null&&we.memoizedState!==null||Jr;we=Ol;var qe=Jr;if(Ol=se,(Jr=Me)&&!qe)for(Ke=K;Ke!==null;)se=Ke,Me=se.child,se.tag===22&&se.memoizedState!==null?zu(K):Me!==null?(Me.return=se,Ke=Me):zu(K);for(;re!==null;)Ke=re,ju(re),re=re.sibling;Ke=K,Ol=we,Jr=qe}Du(u)}else(K.subtreeFlags&8772)!==0&&re!==null?(re.return=K,Ke=re):Du(u)}}function Du(u){for(;Ke!==null;){var d=Ke;if((d.flags&8772)!==0){var j=d.alternate;try{if((d.flags&8772)!==0)switch(d.tag){case 0:case 11:case 15:Jr||Pl(5,d);break;case 1:var G=d.stateNode;if(d.flags&4&&!Jr)if(j===null)G.componentDidMount();else{var K=d.elementType===d.type?j.memoizedProps:ei(d.type,j.memoizedProps);G.componentDidUpdate(K,j.memoizedState,G.__reactInternalSnapshotBeforeUpdate)}var re=d.updateQueue;re!==null&&ph(d,re,G);break;case 3:var se=d.updateQueue;if(se!==null){if(j=null,d.child!==null)switch(d.child.tag){case 5:j=Y(d.child.stateNode);break;case 1:j=d.child.stateNode}ph(d,se,j)}break;case 5:var we=d.stateNode;j===null&&d.flags&4&&De(we,d.type,d.memoizedProps,d);break;case 6:break;case 4:break;case 12:break;case 13:if(ue&&d.memoizedState===null){var Me=d.alternate;if(Me!==null){var qe=Me.memoizedState;if(qe!==null){var ot=qe.dehydrated;ot!==null&&Kt(ot)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}Jr||d.flags&512&&Nu(d)}catch(Ct){vr(d,d.return,Ct)}}if(d===u){Ke=null;break}if(j=d.sibling,j!==null){j.return=d.return,Ke=j;break}Ke=d.return}}function Fu(u){for(;Ke!==null;){var d=Ke;if(d===u){Ke=null;break}var j=d.sibling;if(j!==null){j.return=d.return,Ke=j;break}Ke=d.return}}function zu(u){for(;Ke!==null;){var d=Ke;try{switch(d.tag){case 0:case 11:case 15:var j=d.return;try{Pl(4,d)}catch(Me){vr(d,j,Me)}break;case 1:var G=d.stateNode;if(typeof G.componentDidMount=="function"){var K=d.return;try{G.componentDidMount()}catch(Me){vr(d,K,Me)}}var re=d.return;try{Nu(d)}catch(Me){vr(d,re,Me)}break;case 5:var se=d.return;try{Nu(d)}catch(Me){vr(d,se,Me)}}}catch(Me){vr(d,d.return,Me)}if(d===u){Ke=null;break}var we=d.sibling;if(we!==null){we.return=d.return,Ke=we;break}Ke=d.return}}var ma=0,Nn=1,Zi=2,kl=3,Rs=4;if(typeof Symbol=="function"&&Symbol.for){var ai=Symbol.for;ma=ai("selector.component"),Nn=ai("selector.has_pseudo_class"),Zi=ai("selector.role"),kl=ai("selector.test_id"),Rs=ai("selector.text")}function Qi(u){var d=he(u);if(d!=null){if(typeof d.memoizedProps["data-testname"]!="string")throw Error(s(364));return d}if(u=Te(u),u===null)throw Error(s(362));return u.stateNode.current}function Ms(u,d){switch(d.$$typeof){case ma:if(u.type===d.value)return!0;break;case Nn:e:{d=d.value,u=[u,0];for(var j=0;j<u.length;){var G=u[j++],K=u[j++],re=d[K];if(G.tag!==5||!Oe(G)){for(;re!=null&&Ms(G,re);)K++,re=d[K];if(K===d.length){d=!0;break e}else for(G=G.child;G!==null;)u.push(G,K),G=G.sibling}}d=!1}return d;case Zi:if(u.tag===5&&Ne(u.stateNode,d.value))return!0;break;case Rs:if((u.tag===5||u.tag===6)&&(u=me(u),u!==null&&0<=u.indexOf(d.value)))return!0;break;case kl:if(u.tag===5&&(u=u.memoizedProps["data-testname"],typeof u=="string"&&u.toLowerCase()===d.value.toLowerCase()))return!0;break;default:throw Error(s(365))}return!1}function Bu(u){switch(u.$$typeof){case ma:return"<"+(T(u.value)||"Unknown")+">";case Nn:return":has("+(Bu(u)||"")+")";case Zi:return'[role="'+u.value+'"]';case Rs:return'"'+u.value+'"';case kl:return'[data-testname="'+u.value+'"]';default:throw Error(s(365))}}function Ji(u,d){var j=[];u=[u,0];for(var G=0;G<u.length;){var K=u[G++],re=u[G++],se=d[re];if(K.tag!==5||!Oe(K)){for(;se!=null&&Ms(K,se);)re++,se=d[re];if(re===d.length)j.push(K);else for(K=K.child;K!==null;)u.push(K,re),K=K.sibling}}return j}function ea(u,d){if(!xe)throw Error(s(363));u=Qi(u),u=Ji(u,d),d=[],u=Array.from(u);for(var j=0;j<u.length;){var G=u[j++];if(G.tag===5)Oe(G)||d.push(G.stateNode);else for(G=G.child;G!==null;)u.push(G),G=G.sibling}return d}var Uu=Math.ceil,Ls=c.ReactCurrentDispatcher,Al=c.ReactCurrentOwner,Cr=c.ReactCurrentBatchConfig,Tt=0,or=null,wr=null,Mr=0,Hr=0,ro=Nr(0),_r=0,Tl=null,ya=0,cr=0,Rl=0,qo=null,yn=null,Ml=0,Ns=1/0,In=null;function nr(){Ns=Xr()+500}var kr=!1,jr=null,Ni=null,no=!1,vi=null,qu=0,Dr=0,Is=null,Ll=-1,Nl=0;function gr(){return(Tt&6)!==0?Xr():Ll!==-1?Ll:Ll=Xr()}function Gr(u){return(u.mode&1)===0?1:(Tt&2)!==0&&Mr!==0?Mr&-Mr:eg.transition!==null?(Nl===0&&(Nl=ou()),Nl):(u=jt,u!==0?u:Ce())}function bn(u,d,j,G){if(50<Dr)throw Dr=0,Is=null,Error(s(185));fi(u,j,G),((Tt&2)===0||u!==or)&&(u===or&&((Tt&2)===0&&(cr|=j),_r===4&&ba(u,Mr)),wn(u,G),j===1&&Tt===0&&(d.mode&1)===0&&(nr(),hl&&nn()))}function wn(u,d){var j=u.callbackNode;th(u,d);var G=ul(u,u===or?Mr:0);if(G===0)j!==null&&rh(j),u.callbackNode=null,u.callbackPriority=0;else if(d=G&-G,u.callbackPriority!==d){if(j!=null&&rh(j),d===1)u.tag===0?ih(of.bind(null,u)):fu(of.bind(null,u)),fe?ve(function(){(Tt&6)===0&&nn()}):$i(lu,nn),j=null;else{switch(fl(G)){case 1:j=lu;break;case 4:j=su;break;case 16:j=uu;break;case 536870912:j=Jp;break;default:j=uu}j=hf(j,Hu.bind(null,u))}u.callbackPriority=d,u.callbackNode=j}}function Hu(u,d){if(Ll=-1,Nl=0,(Tt&6)!==0)throw Error(s(327));var j=u.callbackNode;if(wa()&&u.callbackNode!==j)return null;var G=ul(u,u===or?Mr:0);if(G===0)return null;if((G&30)!==0||(G&u.expiredLanes)!==0||d)d=Ho(u,G);else{d=G;var K=Tt;Tt|=2;var re=sf();(or!==u||Mr!==d)&&(In=null,nr(),io(u,d));do try{uf();break}catch(we){Il(u,we)}while(!0);Ic(),Ls.current=re,Tt=K,wr!==null?d=0:(or=null,Mr=0,d=_r)}if(d!==0){if(d===2&&(K=au(u),K!==0&&(G=K,d=Gu(u,K))),d===1)throw j=Tl,io(u,0),ba(u,G),wn(u,Xr()),j;if(d===6)ba(u,G);else{if(K=u.current.alternate,(G&30)===0&&!Ph(K)&&(d=Ho(u,G),d===2&&(re=au(u),re!==0&&(G=re,d=Gu(u,re))),d===1))throw j=Tl,io(u,0),ba(u,G),wn(u,Xr()),j;switch(u.finishedWork=K,u.finishedLanes=G,d){case 0:case 1:throw Error(s(345));case 2:ao(u,yn,In);break;case 3:if(ba(u,G),(G&130023424)===G&&(d=Ml+500-Xr(),10<d)){if(ul(u,0)!==0)break;if(K=u.suspendedLanes,(K&G)!==G){gr(),u.pingedLanes|=u.suspendedLanes&K;break}u.timeoutHandle=Z(ao.bind(null,u,yn,In),d);break}ao(u,yn,In);break;case 4:if(ba(u,G),(G&4194240)===G)break;for(d=u.eventTimes,K=-1;0<G;){var se=31-Kn(G);re=1<<se,se=d[se],se>K&&(K=se),G&=~re}if(G=K,G=Xr()-G,G=(120>G?120:480>G?480:1080>G?1080:1920>G?1920:3e3>G?3e3:4320>G?4320:1960*Uu(G/1960))-G,10<G){u.timeoutHandle=Z(ao.bind(null,u,yn,In),G);break}ao(u,yn,In);break;case 5:ao(u,yn,In);break;default:throw Error(s(329))}}}return wn(u,Xr()),u.callbackNode===j?Hu.bind(null,u):null}function Gu(u,d){var j=qo;return u.current.memoizedState.isDehydrated&&(io(u,d).flags|=256),u=Ho(u,d),u!==2&&(d=yn,yn=j,d!==null&&Vu(d)),u}function Vu(u){yn===null?yn=u:yn.push.apply(yn,u)}function Ph(u){for(var d=u;;){if(d.flags&16384){var j=d.updateQueue;if(j!==null&&(j=j.stores,j!==null))for(var G=0;G<j.length;G++){var K=j[G],re=K.getSnapshot;K=K.value;try{if(!ki(re(),K))return!1}catch{return!1}}}if(j=d.child,d.subtreeFlags&16384&&j!==null)j.return=d,d=j;else{if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function ba(u,d){for(d&=~Rl,d&=~cr,u.suspendedLanes|=d,u.pingedLanes&=~d,u=u.expirationTimes;0<d;){var j=31-Kn(d),G=1<<j;u[j]=-1,d&=~G}}function of(u){if((Tt&6)!==0)throw Error(s(327));wa();var d=ul(u,0);if((d&1)===0)return wn(u,Xr()),null;var j=Ho(u,d);if(u.tag!==0&&j===2){var G=au(u);G!==0&&(d=G,j=Gu(u,G))}if(j===1)throw j=Tl,io(u,0),ba(u,d),wn(u,Xr()),j;if(j===6)throw Error(s(345));return u.finishedWork=u.current.alternate,u.finishedLanes=d,ao(u,yn,In),wn(u,Xr()),null}function lf(u){vi!==null&&vi.tag===0&&(Tt&6)===0&&wa();var d=Tt;Tt|=1;var j=Cr.transition,G=jt;try{if(Cr.transition=null,jt=1,u)return u()}finally{jt=G,Cr.transition=j,Tt=d,(Tt&6)===0&&nn()}}function $u(){Hr=ro.current,hr(ro)}function io(u,d){u.finishedWork=null,u.finishedLanes=0;var j=u.timeoutHandle;if(j!==H&&(u.timeoutHandle=H,ae(j)),wr!==null)for(j=wr.return;j!==null;){var G=j;switch(gs(G),G.tag){case 1:G=G.type.childContextTypes,G!=null&&bo();break;case 3:Oo(),hr(qn),hr(gn),Uc();break;case 5:zc(G);break;case 4:Oo();break;case 13:hr(xr);break;case 19:hr(xr);break;case 10:ms(G.type._context);break;case 22:case 23:$u()}j=j.return}if(or=u,wr=u=oo(u.current,null),Mr=Hr=d,_r=0,Tl=null,Rl=cr=ya=0,yn=qo=null,Ha!==null){for(d=0;d<Ha.length;d++)if(j=Ha[d],G=j.interleaved,G!==null){j.interleaved=null;var K=G.next,re=j.pending;if(re!==null){var se=re.next;re.next=K,G.next=se}j.pending=G}Ha=null}return u}function Il(u,d){do{var j=wr;try{if(Ic(),Vn.current=Mo,bl){for(var G=yr.memoizedState;G!==null;){var K=G.queue;K!==null&&(K.pending=null),G=G.next}bl=!1}if(Wa=0,Ur=Ir=yr=null,bs=!1,ws=0,Al.current=null,j===null||j.return===null){_r=1,Tl=d,wr=null;break}e:{var re=u,se=j.return,we=j,Me=d;if(d=Mr,we.flags|=32768,Me!==null&&typeof Me=="object"&&typeof Me.then=="function"){var qe=Me,ot=we,Ct=ot.tag;if((ot.mode&1)===0&&(Ct===0||Ct===11||Ct===15)){var Qe=ot.alternate;Qe?(ot.updateQueue=Qe.updateQueue,ot.memoizedState=Qe.memoizedState,ot.lanes=Qe.lanes):(ot.updateQueue=null,ot.memoizedState=null)}var fr=Sh(se);if(fr!==null){fr.flags&=-257,Xa(fr,se,we,re,d),fr.mode&1&&_h(re,qe,d),d=fr,Me=qe;var er=d.updateQueue;if(er===null){var jn=new Set;jn.add(Me),d.updateQueue=jn}else er.add(Me);break e}else{if((d&1)===0){_h(re,qe,d),jl();break e}Me=Error(s(426))}}else if(pr&&we.mode&1){var ta=Sh(se);if(ta!==null){(ta.flags&65536)===0&&(ta.flags|=256),Xa(ta,se,we,re,d),Lc(Lo(Me,we));break e}}re=Me=Lo(Me,we),_r!==4&&(_r=2),qo===null?qo=[re]:qo.push(re),re=se;do{switch(re.tag){case 3:re.flags|=65536,d&=-d,re.lanes|=d;var Ae=Yi(re,Me,d);ml(re,Ae);break e;case 1:we=Me;var Ee=re.type,Le=re.stateNode;if((re.flags&128)===0&&(typeof Ee.getDerivedStateFromError=="function"||Le!==null&&typeof Le.componentDidCatch=="function"&&(Ni===null||!Ni.has(Le)))){re.flags|=65536,d&=-d,re.lanes|=d;var Je=Tu(re,we,d);ml(re,Je);break e}}re=re.return}while(re!==null)}ff(j)}catch(yt){d=yt,wr===j&&j!==null&&(wr=j=j.return);continue}break}while(!0)}function sf(){var u=Ls.current;return Ls.current=Mo,u===null?Mo:u}function jl(){(_r===0||_r===3||_r===2)&&(_r=4),or===null||(ya&268435455)===0&&(cr&268435455)===0||ba(or,Mr)}function Ho(u,d){var j=Tt;Tt|=2;var G=sf();(or!==u||Mr!==d)&&(In=null,io(u,d));do try{Ch();break}catch(K){Il(u,K)}while(!0);if(Ic(),Tt=j,Ls.current=G,wr!==null)throw Error(s(261));return or=null,Mr=0,_r}function Ch(){for(;wr!==null;)cf(wr)}function uf(){for(;wr!==null&&!nh();)cf(wr)}function cf(u){var d=Mh(u.alternate,u,Hr);u.memoizedProps=u.pendingProps,d===null?ff(u):wr=d,Al.current=null}function ff(u){var d=u;do{var j=d.alternate;if(u=d.return,(d.flags&32768)===0){if(j=Fo(j,d,Hr),j!==null){wr=j;return}}else{if(j=xh(j,d),j!==null){j.flags&=32767,wr=j;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{_r=6,wr=null;return}}if(d=d.sibling,d!==null){wr=d;return}wr=d=u}while(d!==null);_r===0&&(_r=5)}function ao(u,d,j){var G=jt,K=Cr.transition;try{Cr.transition=null,jt=1,kh(u,d,j,G)}finally{Cr.transition=K,jt=G}return null}function kh(u,d,j,G){do wa();while(vi!==null);if((Tt&6)!==0)throw Error(s(327));j=u.finishedWork;var K=u.finishedLanes;if(j===null)return null;if(u.finishedWork=null,u.finishedLanes=0,j===u.current)throw Error(s(177));u.callbackNode=null,u.callbackPriority=0;var re=j.lanes|j.childLanes;if(Ba(u,re),u===or&&(wr=or=null,Mr=0),(j.subtreeFlags&2064)===0&&(j.flags&2064)===0||no||(no=!0,hf(uu,function(){return wa(),null})),re=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||re){re=Cr.transition,Cr.transition=null;var se=jt;jt=1;var we=Tt;Tt|=4,Al.current=null,Oh(u,j),Ts(j,u),D(u.containerInfo),u.current=j,Cl(j),ds(),Tt=we,jt=se,Cr.transition=re}else u.current=j;if(no&&(no=!1,vi=u,qu=K),re=u.pendingLanes,re===0&&(Ni=null),dl(j.stateNode),wn(u,Xr()),d!==null)for(G=u.onRecoverableError,j=0;j<d.length;j++)K=d[j],G(K.value,{componentStack:K.stack,digest:K.digest});if(kr)throw kr=!1,u=jr,jr=null,u;return(qu&1)!==0&&u.tag!==0&&wa(),re=u.pendingLanes,(re&1)!==0?u===Is?Dr++:(Dr=0,Is=u):Dr=0,nn(),null}function wa(){if(vi!==null){var u=fl(qu),d=Cr.transition,j=jt;try{if(Cr.transition=null,jt=16>u?16:u,vi===null)var G=!1;else{if(u=vi,vi=null,qu=0,(Tt&6)!==0)throw Error(s(331));var K=Tt;for(Tt|=4,Ke=u.current;Ke!==null;){var re=Ke,se=re.child;if((Ke.flags&16)!==0){var we=re.deletions;if(we!==null){for(var Me=0;Me<we.length;Me++){var qe=we[Me];for(Ke=qe;Ke!==null;){var ot=Ke;switch(ot.tag){case 0:case 11:case 15:zo(8,ot,re)}var Ct=ot.child;if(Ct!==null)Ct.return=ot,Ke=Ct;else for(;Ke!==null;){ot=Ke;var Qe=ot.sibling,fr=ot.return;if(ks(ot),ot===qe){Ke=null;break}if(Qe!==null){Qe.return=fr,Ke=Qe;break}Ke=fr}}}var er=re.alternate;if(er!==null){var jn=er.child;if(jn!==null){er.child=null;do{var ta=jn.sibling;jn.sibling=null,jn=ta}while(jn!==null)}}Ke=re}}if((re.subtreeFlags&2064)!==0&&se!==null)se.return=re,Ke=se;else e:for(;Ke!==null;){if(re=Ke,(re.flags&2048)!==0)switch(re.tag){case 0:case 11:case 15:zo(9,re,re.return)}var Ae=re.sibling;if(Ae!==null){Ae.return=re.return,Ke=Ae;break e}Ke=re.return}}var Ee=u.current;for(Ke=Ee;Ke!==null;){se=Ke;var Le=se.child;if((se.subtreeFlags&2064)!==0&&Le!==null)Le.return=se,Ke=Le;else e:for(se=Ee;Ke!==null;){if(we=Ke,(we.flags&2048)!==0)try{switch(we.tag){case 0:case 11:case 15:Pl(9,we)}}catch(yt){vr(we,we.return,yt)}if(we===se){Ke=null;break e}var Je=we.sibling;if(Je!==null){Je.return=we.return,Ke=Je;break e}Ke=we.return}}if(Tt=K,nn(),Hn&&typeof Hn.onPostCommitFiberRoot=="function")try{Hn.onPostCommitFiberRoot(Ua,u)}catch{}G=!0}return G}finally{jt=j,Cr.transition=d}}return!1}function df(u,d,j){d=Lo(j,d),d=Yi(u,d,1),u=ha(u,d,1),d=gr(),u!==null&&(fi(u,1,d),wn(u,d))}function vr(u,d,j){if(u.tag===3)df(u,u,j);else for(;d!==null;){if(d.tag===3){df(d,u,j);break}else if(d.tag===1){var G=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof G.componentDidCatch=="function"&&(Ni===null||!Ni.has(G))){u=Lo(j,u),u=Tu(d,u,1),d=ha(d,u,1),u=gr(),d!==null&&(fi(d,1,u),wn(d,u));break}}d=d.return}}function Ah(u,d,j){var G=u.pingCache;G!==null&&G.delete(d),d=gr(),u.pingedLanes|=u.suspendedLanes&j,or===u&&(Mr&j)===j&&(_r===4||_r===3&&(Mr&130023424)===Mr&&500>Xr()-Ml?io(u,0):Rl|=j),wn(u,d)}function Th(u,d){d===0&&((u.mode&1)===0?d=1:(d=fs,fs<<=1,(fs&130023424)===0&&(fs=4194304)));var j=gr();u=Mi(u,d),u!==null&&(fi(u,d,j),wn(u,j))}function Rh(u){var d=u.memoizedState,j=0;d!==null&&(j=d.retryLane),Th(u,j)}function ng(u,d){var j=0;switch(u.tag){case 13:var G=u.stateNode,K=u.memoizedState;K!==null&&(j=K.retryLane);break;case 19:G=u.stateNode;break;default:throw Error(s(314))}G!==null&&G.delete(d),Th(u,j)}var Mh;Mh=function(u,d,j){if(u!==null)if(u.memoizedProps!==d.pendingProps||qn.current)qr=!0;else{if((u.lanes&j)===0&&(d.flags&128)===0)return qr=!1,Qa(u,d,j);qr=(u.flags&131072)!==0}else qr=!1,pr&&(d.flags&1048576)!==0&&ah(d,wo,d.index);switch(d.lanes=0,d.tag){case 2:var G=d.type;Cs(u,d),u=d.pendingProps;var K=ua(d,gn.current);vl(d,j),K=_s(null,d,G,u,K,j);var re=_u();return d.flags|=1,typeof K=="object"&&K!==null&&typeof K.render=="function"&&K.$$typeof===void 0?(d.tag=1,d.memoizedState=null,d.updateQueue=null,Kr(G)?(re=!0,ll(d)):re=!1,d.memoizedState=K.state!==null&&K.state!==void 0?K.state:null,Dc(d),K.updater=xs,d.stateNode=K,K._reactInternals=d,Wi(d,G,u,j),d=vn(null,d,G,!0,re,j)):(d.tag=0,pr&&re&&ps(d),Qr(null,d,K,j),d=d.child),d;case 16:G=d.elementType;e:{switch(Cs(u,d),u=d.pendingProps,K=G._init,G=K(G._payload),d.type=G,K=d.tag=ig(G),u=ei(G,u),K){case 0:d=Ki(null,d,G,u,j);break e;case 1:d=ln(null,d,G,u,j);break e;case 11:d=Ru(null,d,G,u,j);break e;case 14:d=No(null,d,G,ei(G.type,u),j);break e}throw Error(s(306,G,""))}return d;case 0:return G=d.type,K=d.pendingProps,K=d.elementType===G?K:ei(G,K),Ki(u,d,G,K,j);case 1:return G=d.type,K=d.pendingProps,K=d.elementType===G?K:ei(G,K),ln(u,d,G,K,j);case 3:e:{if(Za(d),u===null)throw Error(s(387));G=d.pendingProps,re=d.memoizedState,K=re.element,hh(u,d),Ga(d,G,null,j);var se=d.memoizedState;if(G=se.element,ue&&re.isDehydrated)if(re={element:G,isDehydrated:!1,cache:se.cache,pendingSuspenseBoundaries:se.pendingSuspenseBoundaries,transitions:se.transitions},d.updateQueue.baseState=re,d.memoizedState=re,d.flags&256){K=Lo(Error(s(423)),d),d=Io(u,d,G,j,K);break e}else if(G!==K){K=Lo(Error(s(424)),d),d=Io(u,d,G,j,K);break e}else for(ue&&(Tn=Vt(d.stateNode.containerInfo),an=d,pr=!0,Ri=null,vs=!1),j=fh(d,null,G,j),d.child=j;j;)j.flags=j.flags&-3|4096,j=j.sibling;else{if(_o(),G===K){d=va(u,d,j);break e}Qr(u,d,G,j)}d=d.child}return d;case 5:return Fc(d),u===null&&Mc(d),G=d.type,K=d.pendingProps,re=u!==null?u.memoizedProps:null,se=K.children,ne(G,K)?se=null:re!==null&&ne(G,re)&&(d.flags|=32),ar(u,d),Qr(u,d,se,j),d.child;case 6:return u===null&&Mc(d),null;case 13:return tf(u,d,j);case 4:return bu(d,d.stateNode.containerInfo),G=d.pendingProps,u===null?d.child=Eo(d,null,G,j):Qr(u,d,G,j),d.child;case 11:return G=d.type,K=d.pendingProps,K=d.elementType===G?K:ei(G,K),Ru(u,d,G,K,j);case 7:return Qr(u,d,d.pendingProps,j),d.child;case 8:return Qr(u,d,d.pendingProps.children,j),d.child;case 12:return Qr(u,d,d.pendingProps.children,j),d.child;case 10:e:{if(G=d.type._context,K=d.pendingProps,re=d.memoizedProps,se=K.value,dh(d,G,se),re!==null)if(ki(re.value,se)){if(re.children===K.children&&!qn.current){d=va(u,d,j);break e}}else for(re=d.child,re!==null&&(re.return=d);re!==null;){var we=re.dependencies;if(we!==null){se=re.child;for(var Me=we.firstContext;Me!==null;){if(Me.context===G){if(re.tag===1){Me=da(-1,j&-j),Me.tag=2;var qe=re.updateQueue;if(qe!==null){qe=qe.shared;var ot=qe.pending;ot===null?Me.next=Me:(Me.next=ot.next,ot.next=Me),qe.pending=Me}}re.lanes|=j,Me=re.alternate,Me!==null&&(Me.lanes|=j),xo(re.return,j,d),we.lanes|=j;break}Me=Me.next}}else if(re.tag===10)se=re.type===d.type?null:re.child;else if(re.tag===18){if(se=re.return,se===null)throw Error(s(341));se.lanes|=j,we=se.alternate,we!==null&&(we.lanes|=j),xo(se,j,d),se=re.sibling}else se=re.child;if(se!==null)se.return=re;else for(se=re;se!==null;){if(se===d){se=null;break}if(re=se.sibling,re!==null){re.return=se.return,se=re;break}se=se.return}re=se}Qr(u,d,K.children,j),d=d.child}return d;case 9:return K=d.type,G=d.pendingProps.children,vl(d,j),K=Zn(K),G=G(K),d.flags|=1,Qr(u,d,G,j),d.child;case 14:return G=d.type,K=ei(G,d.pendingProps),K=ei(G.type,K),No(u,d,G,K,j);case 15:return ga(u,d,d.type,d.pendingProps,j);case 17:return G=d.type,K=d.pendingProps,K=d.elementType===G?K:ei(G,K),Cs(u,d),d.tag=1,Kr(G)?(u=!0,ll(d)):u=!1,vl(d,j),wh(d,G,K),Wi(d,G,K,j),vn(null,d,G,!0,u,j);case 19:return Lu(u,d,j);case 22:return ur(u,d,j)}throw Error(s(156,d.tag))};function hf(u,d){return $i(u,d)}function Lh(u,d,j,G){this.tag=u,this.key=j,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=G,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(u,d,j,G){return new Lh(u,d,j,G)}function Dl(u){return u=u.prototype,!(!u||!u.isReactComponent)}function ig(u){if(typeof u=="function")return Dl(u)?1:0;if(u!=null){if(u=u.$$typeof,u===v)return 11;if(u===h)return 14}return 2}function oo(u,d){var j=u.alternate;return j===null?(j=oi(u.tag,d,u.key,u.mode),j.elementType=u.elementType,j.type=u.type,j.stateNode=u.stateNode,j.alternate=u,u.alternate=j):(j.pendingProps=d,j.type=u.type,j.flags=0,j.subtreeFlags=0,j.deletions=null),j.flags=u.flags&14680064,j.childLanes=u.childLanes,j.lanes=u.lanes,j.child=u.child,j.memoizedProps=u.memoizedProps,j.memoizedState=u.memoizedState,j.updateQueue=u.updateQueue,d=u.dependencies,j.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},j.sibling=u.sibling,j.index=u.index,j.ref=u.ref,j}function Wu(u,d,j,G,K,re){var se=2;if(G=u,typeof u=="function")Dl(u)&&(se=1);else if(typeof u=="string")se=5;else e:switch(u){case _:return sn(j.children,K,re,d);case S:se=8,K|=8;break;case w:return u=oi(12,j,d,K|2),u.elementType=w,u.lanes=re,u;case g:return u=oi(13,j,d,K),u.elementType=g,u.lanes=re,u;case O:return u=oi(19,j,d,K),u.elementType=O,u.lanes=re,u;case m:return Fl(j,K,re,d);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case b:se=10;break e;case y:se=9;break e;case v:se=11;break e;case h:se=14;break e;case p:se=16,G=null;break e}throw Error(s(130,u==null?u:typeof u,""))}return d=oi(se,j,d,K),d.elementType=u,d.type=G,d.lanes=re,d}function sn(u,d,j,G){return u=oi(7,u,G,d),u.lanes=j,u}function Fl(u,d,j,G){return u=oi(22,u,G,d),u.elementType=m,u.lanes=j,u.stateNode={isHidden:!1},u}function zl(u,d,j){return u=oi(6,u,null,d),u.lanes=j,u}function Yu(u,d,j){return d=oi(4,u.children!==null?u.children:[],u.key,d),d.lanes=j,d.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},d}function Nh(u,d,j,G,K){this.tag=d,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=H,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cl(0),this.expirationTimes=cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cl(0),this.identifierPrefix=G,this.onRecoverableError=K,ue&&(this.mutableSourceEagerHydrationData=null)}function pf(u,d,j,G,K,re,se,we,Me){return u=new Nh(u,d,j,we,Me),d===1?(d=1,re===!0&&(d|=8)):d=0,re=oi(3,null,null,d),u.current=re,re.stateNode=u,re.memoizedState={element:G,isDehydrated:j,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dc(re),u}function Ku(u){if(!u)return za;u=u._reactInternals;e:{if(R(u)!==u||u.tag!==1)throw Error(s(170));var d=u;do{switch(d.tag){case 3:d=d.stateNode.context;break e;case 1:if(Kr(d.type)){d=d.stateNode.__reactInternalMemoizedMergedChildContext;break e}}d=d.return}while(d!==null);throw Error(s(171))}if(u.tag===1){var j=u.type;if(Kr(j))return Jd(u,j,d)}return d}function Go(u){var d=u._reactInternals;if(d===void 0)throw typeof u.render=="function"?Error(s(188)):(u=Object.keys(u).join(","),Error(s(268,u)));return u=k(d),u===null?null:u.stateNode}function Xu(u,d){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var j=u.retryLane;u.retryLane=j!==0&&j<d?j:d}}function Bl(u,d){Xu(u,d),(u=u.alternate)&&Xu(u,d)}function ag(u){return u=k(u),u===null?null:u.stateNode}function Ih(){return null}return t.attemptContinuousHydration=function(u){if(u.tag===13){var d=Mi(u,134217728);if(d!==null){var j=gr();bn(d,u,134217728,j)}Bl(u,134217728)}},t.attemptDiscreteHydration=function(u){if(u.tag===13){var d=Mi(u,1);if(d!==null){var j=gr();bn(d,u,1,j)}Bl(u,1)}},t.attemptHydrationAtCurrentPriority=function(u){if(u.tag===13){var d=Gr(u),j=Mi(u,d);if(j!==null){var G=gr();bn(j,u,d,G)}Bl(u,d)}},t.attemptSynchronousHydration=function(u){switch(u.tag){case 3:var d=u.stateNode;if(d.current.memoizedState.isDehydrated){var j=sl(d.pendingLanes);j!==0&&(Vi(d,j|1),wn(d,Xr()),(Tt&6)===0&&(nr(),nn()))}break;case 13:lf(function(){var G=Mi(u,1);if(G!==null){var K=gr();bn(G,u,1,K)}}),Bl(u,1)}},t.batchedUpdates=function(u,d){var j=Tt;Tt|=1;try{return u(d)}finally{Tt=j,Tt===0&&(nr(),hl&&nn())}},t.createComponentSelector=function(u){return{$$typeof:ma,value:u}},t.createContainer=function(u,d,j,G,K,re,se){return pf(u,d,!1,null,j,G,K,re,se)},t.createHasPseudoClassSelector=function(u){return{$$typeof:Nn,value:u}},t.createHydrationContainer=function(u,d,j,G,K,re,se,we,Me){return u=pf(j,G,!0,u,K,re,se,we,Me),u.context=Ku(null),j=u.current,G=gr(),K=Gr(j),re=da(G,K),re.callback=d??null,ha(j,re,K),u.current.lanes=K,fi(u,K,G),wn(u,G),u},t.createPortal=function(u,d,j){var G=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:G==null?null:""+G,children:u,containerInfo:d,implementation:j}},t.createRoleSelector=function(u){return{$$typeof:Zi,value:u}},t.createTestNameSelector=function(u){return{$$typeof:kl,value:u}},t.createTextSelector=function(u){return{$$typeof:Rs,value:u}},t.deferredUpdates=function(u){var d=jt,j=Cr.transition;try{return Cr.transition=null,jt=16,u()}finally{jt=d,Cr.transition=j}},t.discreteUpdates=function(u,d,j,G,K){var re=jt,se=Cr.transition;try{return Cr.transition=null,jt=1,u(d,j,G,K)}finally{jt=re,Cr.transition=se,Tt===0&&nr()}},t.findAllNodes=ea,t.findBoundingRects=function(u,d){if(!xe)throw Error(s(363));d=ea(u,d),u=[];for(var j=0;j<d.length;j++)u.push(ce(d[j]));for(d=u.length-1;0<d;d--){j=u[d];for(var G=j.x,K=G+j.width,re=j.y,se=re+j.height,we=d-1;0<=we;we--)if(d!==we){var Me=u[we],qe=Me.x,ot=qe+Me.width,Ct=Me.y,Qe=Ct+Me.height;if(G>=qe&&re>=Ct&&K<=ot&&se<=Qe){u.splice(d,1);break}else if(G!==qe||j.width!==Me.width||Qe<re||Ct>se){if(!(re!==Ct||j.height!==Me.height||ot<G||qe>K)){qe>G&&(Me.width+=qe-G,Me.x=G),ot<K&&(Me.width=K-qe),u.splice(d,1);break}}else{Ct>re&&(Me.height+=Ct-re,Me.y=re),Qe<se&&(Me.height=se-Ct),u.splice(d,1);break}}}return u},t.findHostInstance=Go,t.findHostInstanceWithNoPortals=function(u){return u=M(u),u=u!==null?L(u):null,u===null?null:u.stateNode},t.findHostInstanceWithWarning=function(u){return Go(u)},t.flushControlled=function(u){var d=Tt;Tt|=1;var j=Cr.transition,G=jt;try{Cr.transition=null,jt=1,u()}finally{jt=G,Cr.transition=j,Tt=d,Tt===0&&(nr(),nn())}},t.flushPassiveEffects=wa,t.flushSync=lf,t.focusWithin=function(u,d){if(!xe)throw Error(s(363));for(u=Qi(u),d=Ji(u,d),d=Array.from(d),u=0;u<d.length;){var j=d[u++];if(!Oe(j)){if(j.tag===5&&tt(j.stateNode))return!0;for(j=j.child;j!==null;)d.push(j),j=j.sibling}}return!1},t.getCurrentUpdatePriority=function(){return jt},t.getFindAllNodesFailureDescription=function(u,d){if(!xe)throw Error(s(363));var j=0,G=[];u=[Qi(u),0];for(var K=0;K<u.length;){var re=u[K++],se=u[K++],we=d[se];if((re.tag!==5||!Oe(re))&&(Ms(re,we)&&(G.push(Bu(we)),se++,se>j&&(j=se)),se<d.length))for(re=re.child;re!==null;)u.push(re,se),re=re.sibling}if(j<d.length){for(u=[];j<d.length;j++)u.push(Bu(d[j]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(G.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+u.join(" > ")}return null},t.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return Y(u.child.stateNode);default:return u.child.stateNode}},t.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:ag,findFiberByHostInstance:u.findFiberByHostInstance||Ih,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(d.isDisabled||!d.supportsFiber)u=!0;else{try{Ua=d.inject(u),Hn=d}catch{}u=!!d.checkDCE}}return u},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(u,d,j,G){if(!xe)throw Error(s(363));u=ea(u,d);var K=rt(u,j,G).disconnect;return{disconnect:function(){K()}}},t.registerMutableSourceForHydration=function(u,d){var j=d._getVersion;j=j(d._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[d,j]:u.mutableSourceEagerHydrationData.push(d,j)},t.runWithPriority=function(u,d){var j=jt;try{return jt=u,d()}finally{jt=j}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(u,d,j,G){var K=d.current,re=gr(),se=Gr(K);return j=Ku(j),d.context===null?d.context=j:d.pendingContext=j,d=da(re,se),d.payload={element:u},G=G===void 0?null:G,G!==null&&(d.callback=G),u=ha(K,d,se),u!==null&&(bn(u,K,se,re),ys(u,K,se)),se},t}),Zg}var c2;function Q9(){return c2||(c2=1,Xg.exports=Z9()),Xg.exports}var J9=Q9();const e7=zd(J9);var Qg={exports:{}},Kl={};/**
|
|
62
|
-
* @license React
|
|
63
|
-
* react-reconciler-constants.production.min.js
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the MIT license found in the
|
|
68
|
-
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var f2;function t7(){return f2||(f2=1,Kl.ConcurrentRoot=1,Kl.ContinuousEventPriority=4,Kl.DefaultEventPriority=16,Kl.DiscreteEventPriority=1,Kl.IdleEventPriority=536870912,Kl.LegacyRoot=0),Kl}var d2;function r7(){return d2||(d2=1,Qg.exports=t7()),Qg.exports}var xw=r7(),n7=Nt();const h2={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let p2=!1,g2=!1;const Lv=".react-konva-event";let Ow=!1;function i7(e){Ow=e}const a7=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
70
|
-
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
71
|
-
Consider to add onDragMove or onDragEnd events.
|
|
72
|
-
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
73
|
-
`,o7=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
74
|
-
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
75
|
-
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
76
|
-
`,l7={};function Hp(e,i,t=l7){if(!p2&&"zIndex"in i&&(console.warn(o7),p2=!0),!g2&&i.draggable){var r=i.x!==void 0||i.y!==void 0,a=i.onDragEnd||i.onDragMove;r&&!a&&(console.warn(a7),g2=!0)}for(var l in t)if(!h2[l]){var s=l.slice(0,2)==="on",c=t[l]!==i[l];if(s&&c){var f=l.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),e.off(f,t[l])}var E=!i.hasOwnProperty(l);E&&e.setAttr(l,void 0)}var _=Ow||i._useStrictMode,S={},w=!1;const b={};for(var l in i)if(!h2[l]){var s=l.slice(0,2)==="on",y=t[l]!==i[l];if(s&&y){var f=l.substr(2).toLowerCase();f.substr(0,7)==="content"&&(f="content"+f.substr(7,1).toUpperCase()+f.substr(8)),i[l]&&(b[f]=i[l])}!s&&(i[l]!==t[l]||_&&i[l]!==e.getAttr(l))&&(w=!0,S[l]=i[l])}w&&(e.setAttrs(S),os(e));for(var f in b)e.on(f+Lv,b[f])}function os(e){if(!n7.Konva.autoDrawEnabled){var i=e.getLayer()||e.getStage();i&&i.batchDraw()}}var Jg=lv();const Pw={},s7={};Nd.Node.prototype._applyProps=Hp;function u7(e,i){if(typeof i=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${i}`);return}e.add(i),os(e)}function c7(e,i,t){let r=Nd[e];r||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=Nd.Group);const a={},l={};for(var s in i){var c=s.slice(0,2)==="on";c?l[s]=i[s]:a[s]=i[s]}const f=new r(a);return Hp(f,l),f}function f7(e,i,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function d7(e,i,t){return!1}function h7(e){return e}function p7(){return null}function g7(){return null}function v7(e,i,t,r){return s7}function m7(){}function y7(e){}function b7(e,i){return!1}function w7(){return Pw}function _7(){return Pw}const S7=setTimeout,E7=clearTimeout,x7=-1;function O7(e,i){return!1}const P7=!1,C7=!0,k7=!0;function A7(e,i){i.parent===e?i.moveToTop():e.add(i),os(e)}function T7(e,i){i.parent===e?i.moveToTop():e.add(i),os(e)}function Cw(e,i,t){i._remove(),e.add(i),i.setZIndex(t.getZIndex()),os(e)}function R7(e,i,t){Cw(e,i,t)}function M7(e,i){i.destroy(),i.off(Lv),os(e)}function L7(e,i){i.destroy(),i.off(Lv),os(e)}function N7(e,i,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function I7(e,i,t){}function j7(e,i,t,r,a){Hp(e,a,r)}function D7(e){e.hide(),os(e)}function F7(e){}function z7(e,i){(i.visible==null||i.visible)&&e.show()}function B7(e,i){}function U7(e){}function q7(){}const H7=()=>xw.DefaultEventPriority,G7=Object.freeze(Object.defineProperty({__proto__:null,appendChild:A7,appendChildToContainer:T7,appendInitialChild:u7,cancelTimeout:E7,clearContainer:U7,commitMount:I7,commitTextUpdate:N7,commitUpdate:j7,createInstance:c7,createTextInstance:f7,detachDeletedInstance:q7,finalizeInitialChildren:d7,getChildHostContext:_7,getCurrentEventPriority:H7,getPublicInstance:h7,getRootHostContext:w7,hideInstance:D7,hideTextInstance:F7,idlePriority:Jg.unstable_IdlePriority,insertBefore:Cw,insertInContainerBefore:R7,isPrimaryRenderer:P7,noTimeout:x7,now:Jg.unstable_now,prepareForCommit:p7,preparePortalMount:g7,prepareUpdate:v7,removeChild:M7,removeChildFromContainer:L7,resetAfterCommit:m7,resetTextContent:y7,run:Jg.unstable_runWithPriority,scheduleTimeout:S7,shouldDeprioritizeSubtree:b7,shouldSetTextContent:O7,supportsMutation:k7,unhideInstance:z7,unhideTextInstance:B7,warnsIfNotActing:C7},Symbol.toStringTag,{value:"Module"}));var V7=Object.defineProperty,$7=Object.defineProperties,W7=Object.getOwnPropertyDescriptors,v2=Object.getOwnPropertySymbols,Y7=Object.prototype.hasOwnProperty,K7=Object.prototype.propertyIsEnumerable,m2=(e,i,t)=>i in e?V7(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,y2=(e,i)=>{for(var t in i||(i={}))Y7.call(i,t)&&m2(e,t,i[t]);if(v2)for(var t of v2(i))K7.call(i,t)&&m2(e,t,i[t]);return e},X7=(e,i)=>$7(e,W7(i)),b2,w2;typeof window<"u"&&((b2=window.document)!=null&&b2.createElement||((w2=window.navigator)==null?void 0:w2.product)==="ReactNative")?Or.useLayoutEffect:Or.useEffect;function kw(e,i,t){if(!e)return;if(t(e)===!0)return e;let r=e.child;for(;r;){const a=kw(r,i,t);if(a)return a;r=r.sibling}}function Aw(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const _2=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=_2;return}return _2.apply(this,arguments)};const Nv=Aw(Or.createContext(null));class Tw extends Or.Component{render(){return Or.createElement(Nv.Provider,{value:this._reactInternals},this.props.children)}}function Z7(){const e=Or.useContext(Nv);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const i=Or.useId();return Or.useMemo(()=>{for(const r of[e,e==null?void 0:e.alternate]){if(!r)continue;const a=kw(r,!1,l=>{let s=l.memoizedState;for(;s;){if(s.memoizedState===i)return!0;s=s.next}});if(a)return a}},[e,i])}function Q7(){const e=Z7(),[i]=Or.useState(()=>new Map);i.clear();let t=e;for(;t;){if(t.type&&typeof t.type=="object"){const a=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;a&&a!==Nv&&!i.has(a)&&i.set(a,Or.useContext(Aw(a)))}t=t.return}return i}function Rw(){const e=Q7();return Or.useMemo(()=>Array.from(e.keys()).reduce((i,t)=>r=>Or.createElement(i,null,Or.createElement(t.Provider,X7(y2({},r),{value:e.get(t)}))),i=>Or.createElement(Tw,y2({},i))),[e])}function J7(e){const i=Gt.useRef({});return Gt.useLayoutEffect(()=>{i.current=e}),Gt.useLayoutEffect(()=>()=>{i.current={}},[]),i.current}const eS=e=>{const i=Gt.useRef(),t=Gt.useRef(),r=Gt.useRef(),a=J7(e),l=Rw(),s=c=>{const{forwardedRef:f}=e;f&&(typeof f=="function"?f(c):f.current=c)};return Gt.useLayoutEffect(()=>(t.current=new Nd.Stage({width:e.width,height:e.height,container:i.current}),s(t.current),r.current=sc.createContainer(t.current,xw.LegacyRoot,!1,null),sc.updateContainer(Gt.createElement(l,{},e.children),r.current),()=>{Nd.isBrowser&&(s(null),sc.updateContainer(null,r.current,null),t.current.destroy())}),[]),Gt.useLayoutEffect(()=>{s(t.current),Hp(t.current,e,a),sc.updateContainer(Gt.createElement(l,{},e.children),r.current,null)}),Gt.createElement("div",{ref:i,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},tS="Layer",rS="FastLayer",xp="Group",nS="Label",iS="Rect",aS="Circle",oS="Ellipse",lS="Wedge",sS="Line",uS="Sprite",cS="Image",fS="Text",dS="TextPath",hS="Star",pS="Ring",gS="Arc",vS="Tag",mS="Path",yS="RegularPolygon",bS="Arrow",wS="Shape",_S="Transformer",sc=e7(G7);sc.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:Gt.version,rendererPackageName:"react-konva"});const SS=Gt.forwardRef((e,i)=>Gt.createElement(Tw,{},Gt.createElement(eS,{...e,forwardedRef:i}))),ES=i7,xS=Object.freeze(Object.defineProperty({__proto__:null,Arc:gS,Arrow:bS,Circle:aS,Ellipse:oS,FastLayer:rS,Group:xp,Image:cS,KonvaRenderer:sc,Label:nS,Layer:tS,Line:sS,Path:mS,Rect:iS,RegularPolygon:yS,Ring:pS,Shape:wS,Sprite:uS,Stage:SS,Star:hS,Tag:vS,Text:fS,TextPath:dS,Transformer:_S,Wedge:lS,useStrictMode:ES},Symbol.toStringTag,{value:"Module"})),mo=rs(xS);var e0,S2;function Gp(){if(S2)return e0;S2=1;var e=Ar();return e0=function(t,r,a){const l=e.useRef("loading"),s=e.useRef(),[c,f]=e.useState(0),E=e.useRef(),_=e.useRef(),S=e.useRef();return(E.current!==t||_.current!==r||S.current!==a)&&(l.current="loading",s.current=void 0,E.current=t,_.current=r,S.current=a),e.useLayoutEffect(function(){if(!t)return;var w=document.createElement("img");function b(){l.current="loaded",s.current=w,f(Math.random())}function y(){l.current="failed",s.current=void 0,f(Math.random())}return w.addEventListener("load",b),w.addEventListener("error",y),r&&(w.crossOrigin=r),a&&(w.referrerPolicy=a),w.src=t,function(){w.removeEventListener("load",b),w.removeEventListener("error",y)}},[t,r,a]),[s.current,l.current]},e0}var ud={},cd={},OS=function(e,i){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&i.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)i.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]]);return t};const PS=e=>{const i=window.getComputedStyle(e).position;return!(i==="absolute"||i==="relative")};function Mw(e=()=>{}){const i=Gt.useRef(e);return i.current=e,Gt.useCallback((...t)=>i.current.apply(null,t),[])}const CS=({children:e,groupProps:i,divProps:t,transform:r,transformFunc:a,parentNodeFunc:l})=>{const s=Rw(),c=Gt.useRef(null),[f]=Gt.useState(()=>document.createElement("div")),E=Gt.useMemo(()=>c5.createRoot(f),[f]),_=r??!0,S=Mw(()=>{if(_&&c.current){let g=c.current.getAbsoluteTransform().decompose();a&&(g=a(g)),f.style.position="absolute",f.style.zIndex="10",f.style.top="0px",f.style.left="0px",f.style.transform=`translate(${g.x}px, ${g.y}px) rotate(${g.rotation}deg) scaleX(${g.scaleX}) scaleY(${g.scaleY})`,f.style.transformOrigin="top left"}else f.style.position="",f.style.zIndex="",f.style.top="",f.style.left="",f.style.transform="",f.style.transformOrigin="";const w=t||{},{style:b}=w,y=OS(w,["style"]);Object.assign(f.style,b),Object.assign(f,y)});return Gt.useLayoutEffect(()=>{var w;const b=c.current;if(!b)return;const y=l?l({stage:b.getStage()}):(w=b.getStage())===null||w===void 0?void 0:w.container();if(y)return y.appendChild(f),_&&PS(y)&&(y.style.position="relative"),b.on("absoluteTransformChange",S),S(),()=>{var v;b.off("absoluteTransformChange",S),(v=f.parentNode)===null||v===void 0||v.removeChild(f)}},[_,l]),Gt.useLayoutEffect(()=>{S()},[t,a]),Gt.useLayoutEffect(()=>{E.render(Gt.createElement(s,null,e))}),Gt.useLayoutEffect(()=>()=>{setTimeout(()=>{E.unmount()})},[]),Gt.createElement(xp,Object.assign({ref:c},i))},kS=({selector:e,enabled:i,children:t})=>{const r=Gt.useRef(null),a=Gt.useRef(null),l=Gt.useRef(null),s=i??!0;return Gt.useLayoutEffect(()=>{if(!r.current||!a.current)return;l.current=a.current;const f=r.current.getStage().findOne(e);s&&f?a.current.moveTo(f):a.current.moveTo(r.current);const E=r.current.getLayer();if(E&&(E.batchDraw(),f)){const _=f.getLayer();if(!_)return;_.batchDraw()}},[e,s]),Gt.useEffect(()=>()=>{var c;(c=l.current)===null||c===void 0||c.destroy()},[]),Gt.createElement(xp,{name:"_outer_portal",ref:r},Gt.createElement(xp,{name:"_inner_portal",ref:a},t))};var AS=Gp();const TS=zd(AS),RS=Object.freeze(Object.defineProperty({__proto__:null,Html:CS,Portal:kS,useEvent:Mw,useImage:TS},Symbol.toStringTag,{value:"Module"})),xc=rs(RS);function MS(e,i){return Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(i))),e}function Lw(e,i,t){const r=i-1,a=t[Iw(r,t.length)];return a.marker!=="Z"?a:Lw(e,r,t)}function Nw(e,i,t){const r=i+1,a=t[Iw(r,t.length)];return a.marker==="Z"?Nw(e,r,t):a}function LS(e,i,t){let r=t[i-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":e.values.x+=r.values.x,e.values.y+=r.values.y;break;case"L":case"A":e.values.x+=r.values.x,e.values.y+=r.values.y;break;case"H":e.marker="L",e.values.x+=r.values.x,e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x,e.values.y+=r.values.y;break;case"C":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"S":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x2+=r.values.x,e.values.y2+=r.values.y;break;case"Q":e.values.x+=r.values.x,e.values.y+=r.values.y,e.values.x1+=r.values.x,e.values.y1+=r.values.y;break;case"T":e.values.x+=r.values.x,e.values.y+=r.values.y;break}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=r.values.y;break;case"V":e.marker="L",e.values.x=r.values.x;break}if(e.marker==="Z"){let l=function(c,f){return c[f].marker==="M"?c[f]:l(c,f-1)};var a=l;let s=l(t,i);e.values.x=s.values.x,e.values.y=s.values.y}return e}function NS(e,i){const t=[];switch(e.toUpperCase()){case"M":for(let r=0;r<i.length;r+=2){let a;e===e.toUpperCase()?a=r===0?"M":"L":a=r===0?"m":"l",t.push({marker:a,values:{x:i[r],y:i[r+1]}})}break;case"L":for(let r=0;r<i.length;r+=2)t.push({marker:e,values:{x:i[r],y:i[r+1]}});break;case"H":for(let r=0;r<i.length;r++)t.push({marker:e,values:{x:i[r],y:0}});break;case"V":for(let r=0;r<i.length;r++)t.push({marker:e,values:{x:0,y:i[r]}});break;case"C":for(let r=0;r<i.length;r+=6)t.push({marker:e,values:{x1:i[r],y1:i[r+1],x2:i[r+2],y2:i[r+3],x:i[r+4],y:i[r+5]}});break;case"S":for(let r=0;r<i.length;r+=4)t.push({marker:e,values:{x2:i[r],y2:i[r+1],x:i[r+2],y:i[r+3]}});break;case"Q":for(let r=0;r<i.length;r+=4)t.push({marker:e,values:{x1:i[r],y1:i[r+1],x:i[r+2],y:i[r+3]}});break;case"T":for(let r=0;r<i.length;r+=2)t.push({marker:e,values:{x:i[r],y:i[r+1]}});break;case"A":for(let r=0;r<i.length;r+=7)t.push({marker:e,values:{radiusX:i[r],radiusY:i[r+1],rotation:i[r+2],largeArc:i[r+3],sweep:i[r+4],x:i[r+5],y:i[r+6]}});break;case"Z":t.push({marker:e,values:{x:0,y:0}});break}return t}function Iw(e,i){return(e%i+i)%i}function IS(e,i,t){if(i!==0&&e.marker==="L"){let r=t[i-1];["x","y"].every(l=>Math.round(Math.abs(r.values[l]-e.values[l]))===0)&&(e.overlap=!0)}return e}function iv(e,i){const t=["x","y"].every(r=>Math.round(Math.abs(e[i].values[r]-e[0].values[r]))===0);e[i].marker==="L"&&t&&(e[i].overlap=!0,iv(e,i-1)),e[i].marker==="Z"&&iv(e,i-1)}function jS(e,i,t){const r=x2(e.values,t.values),a=x2(i.values,e.values);return Math.min(a,r)}function E2(e,i){return Math.atan2(i.x-e.x,i.y-e.y)}function x2(e,i){const t=e.x-i.x,r=e.y-i.y;return Math.sqrt(Math.pow(t,2)+Math.pow(r,2))}function O2(e,i){return Math.sin(e)*i}function P2(e,i){return Math.cos(e)*i}function C2(e,i){const t=i/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?i:t}function DS(e,i){return i*Math.tan(e)}function FS(e,i){let t,r=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=C2(e/2,-i):(t=C2(e/2,i),r=1,t===1/0&&(t=i)),{offset:t,sweepFlag:r}}function zS(e){const i=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(t=>{let r="";if(t.marker!=="Z"){const a=Object.keys(t.values);r=i.filter(l=>a.indexOf(l)!==-1).map(l=>t.values[l]).join()}return`${t.marker}${r}`}).join("").trim()}function jw(e){const i=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(i)].map(r=>({marker:r[0],index:r.index})).reduceRight((r,a)=>{const l=e.substring(a.index,r.length?r[r.length-1].index:e.length);return r.concat([{marker:a.marker,index:a.index,chunk:l.length>0?l.substr(1,l.length-1):l}])},[]).reverse().flatMap(r=>{const a=r.chunk.match(t),l=a?a.map(parseFloat):[];return NS(r.marker,l)}).map(LS)}function Dw(e,i,t){let r=[],a=[];return t&&e.forEach(l=>MS(l,t)),e.forEach(l=>{l.marker==="M"&&r.push([]),r[r.length-1].push(l)}),r.forEach(l=>{l.map(IS),iv(l,l.length-1);const s=l[l.length-1].marker=="Z";l.filter(c=>!c.overlap).map((c,f,E)=>{const S=Lw(c,f,E),w=Nw(c,f,E),b=E2(c.values,S.values),y=E2(c.values,w.values),v=y-b,g=v*(180/Math.PI),O=jS(c,S,w),h=Math.abs(DS(v/2,O/2)),p=Math.min(i,h),m=FS(v,p),x=m.offset,N=m.sweepFlag,T=(f==0||f==E.length-1)&&!s;switch(c.marker){case"M":case"L":const I=[c.values.x+O2(b,x),c.values.y+P2(b,x)],R=[c.values.x+O2(y,x),c.values.y+P2(y,x)];T?a.push({marker:c.marker,values:c.values}):a.push({marker:c.marker,values:{x:parseFloat(I[0].toFixed(3)),y:parseFloat(I[1].toFixed(3))}}),!T&&(w.marker==="L"||w.marker==="M")&&a.push({marker:"A",radius:p,values:{radiusX:parseFloat(p.toFixed(3)),radiusY:parseFloat(p.toFixed(3)),rotation:g,largeArc:0,sweep:N,x:parseFloat(R[0].toFixed(3)),y:parseFloat(R[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":a.push({marker:c.marker,values:c.values});break}})}),{path:zS(a),commands:a}}function BS(e,i,t){return Dw([...jw(e)],i,t)}const US=Object.freeze(Object.defineProperty({__proto__:null,parsePath:jw,roundCommands:Dw,roundCorners:BS},Symbol.toStringTag,{value:"Module"})),qS=rs(US);var xa={},fd={},op={},k2;function HS(){if(k2)return op;k2=1;var e=e||{};e.stringify=function(){var i={"visit_linear-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return i.visit_gradient(t)},"visit_radial-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return i.visit_gradient(t)},visit_gradient:function(t){var r=i.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+i.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,a=i.visit(t.at),l=i.visit(t.style);return l&&(r+=" "+l),a&&(r+=" at "+a),r},"visit_default-radial":function(t){var r="",a=i.visit(t.at);return a&&(r+=a),r},"visit_extent-keyword":function(t){var r=t.value,a=i.visit(t.at);return a&&(r+=" at "+a),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return i.visit(t.value.x)+" "+i.visit(t.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(t){return i.visit_color(t.value,t)},visit_hex:function(t){return i.visit_color("#"+t.value,t)},visit_rgb:function(t){return i.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return i.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var a=t,l=i.visit(r.length);return l&&(a+=" "+l),a},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",a=t.length;return t.forEach(function(l,s){r+=i.visit(l),s<a-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return i.visit_array(t,r);if(t.type){var a=i["visit_"+t.type];if(a)return a(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return i.visit(t)}}();var e=e||{};return e.parse=function(){var i={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]+\.?))/},t="";function r(X){var q=new Error(t+": "+X);throw q.source=t,q}function a(){var X=l();return t.length>0&&r("Invalid input not EOF"),X}function l(){return m(s)}function s(){return c("linear-gradient",i.linearGradient,E)||c("repeating-linear-gradient",i.repeatingLinearGradient,E)||c("radial-gradient",i.radialGradient,w)||c("repeating-radial-gradient",i.repeatingRadialGradient,w)}function c(X,q,D){return f(q,function(B){var U=D();return U&&(Y(i.comma)||r("Missing comma before color stops")),{type:X,orientation:U,colorStops:m(x)}})}function f(X,q){var D=Y(X);if(D){Y(i.startCall)||r("Missing (");var B=q(D);return Y(i.endCall)||r("Missing )"),B}}function E(){return _()||S()}function _(){return z("directional",i.sideOrCorner,1)}function S(){return z("angular",i.angleValue,1)}function w(){var X,q=b(),D;return q&&(X=[],X.push(q),D=t,Y(i.comma)&&(q=b(),q?X.push(q):t=D)),X}function b(){var X=y()||v();if(X)X.at=O();else{var q=g();if(q){X=q;var D=O();D&&(X.at=D)}else{var B=h();B&&(X={type:"default-radial",at:B})}}return X}function y(){var X=z("shape",/^(circle)/i,0);return X&&(X.style=L()||g()),X}function v(){var X=z("shape",/^(ellipse)/i,0);return X&&(X.style=k()||g()),X}function g(){return z("extent-keyword",i.extentKeywords,1)}function O(){if(z("position",/^at/,0)){var X=h();return X||r("Missing positioning value"),X}}function h(){var X=p();if(X.x||X.y)return{type:"position",value:X}}function p(){return{x:k(),y:k()}}function m(X){var q=X(),D=[];if(q)for(D.push(q);Y(i.comma);)q=X(),q?D.push(q):r("One extra comma");return D}function x(){var X=N();return X||r("Expected color definition"),X.length=k(),X}function N(){return I()||C()||R()||T()}function T(){return z("literal",i.literalColor,0)}function I(){return z("hex",i.hexColor,1)}function R(){return f(i.rgbColor,function(){return{type:"rgb",value:m(M)}})}function C(){return f(i.rgbaColor,function(){return{type:"rgba",value:m(M)}})}function M(){return Y(i.number)[1]}function k(){return z("%",i.percentageValue,1)||A()||L()}function A(){return z("position-keyword",i.positionKeywords,1)}function L(){return z("px",i.pixelValue,1)||z("em",i.emValue,1)}function z(X,q,D){var B=Y(q);if(B)return{type:X,value:B[D]}}function Y(X){var q,D;return D=/^[\n\r\t\s]+/.exec(t),D&&$(D[0].length),q=X.exec(t),q&&$(q[0].length),q}function $(X){t=t.substr(X)}return function(X){return t=X.toString(),a()}}(),op.parse=e.parse,op.stringify=e.stringify,op}var A2;function Iv(){return A2||(A2=1,function(e){var i=fd&&fd.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const t=i(HS()),r=s=>s.indexOf("linear-gradient")>=0;e.isGradient=r;const a=s=>s.type==="hex"?"#"+s.value:s.type==="literal"?s.value:`${s.type}(${s.value.join(",")})`,l=s=>{if(!(0,e.isGradient)(s))return{rotation:0,stops:[{offset:0,color:s},{offset:1,color:s}]};const c=t.default.parse(s)[0];return{rotation:parseFloat(c.orientation.value),stops:c.colorStops.map((f,E)=>({color:a(f),offset:f.length?parseFloat(f.length.value)/100:E/(c.colorStops.length-1)}))}};e.parseColor=l}(fd)),fd}var T2;function Wd(){return T2||(T2=1,function(e){var i=xa&&xa.__createBinding||(Object.create?function(E,_,S,w){w===void 0&&(w=S);var b=Object.getOwnPropertyDescriptor(_,S);b&&!("get"in b?!_.__esModule:b.writable||b.configurable)||(b={enumerable:!0,get:function(){return _[S]}}),Object.defineProperty(E,w,b)}:function(E,_,S,w){w===void 0&&(w=S),E[w]=_[S]}),t=xa&&xa.__setModuleDefault||(Object.create?function(E,_){Object.defineProperty(E,"default",{enumerable:!0,value:_})}:function(E,_){E.default=_}),r=xa&&xa.__importStar||function(){var E=function(_){return E=Object.getOwnPropertyNames||function(S){var w=[];for(var b in S)Object.prototype.hasOwnProperty.call(S,b)&&(w[w.length]=b);return w},E(_)};return function(_){if(_&&_.__esModule)return _;var S={};if(_!=null)for(var w=E(_),b=0;b<w.length;b++)w[b]!=="default"&&i(S,_,w[b]);return t(S,_),S}}(),a=xa&&xa.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const l=a(Ar()),s=r(Iv()),c=a(Hi()),f=(E,_=E.fill,S="fill")=>l.default.useMemo(()=>{if(!s.isGradient(_))return{[S]:_};const{stops:w,rotation:b}=s.parseColor(_),y={x:E.a.width/2,y:E.a.height/2},v=Math.sqrt(Math.pow(y.x,2)+Math.pow(y.y,2)),g=c.default.Util.degToRad(b)-Math.PI/2,O=[];return w.forEach(({offset:h,color:p})=>{O.push(h,p)}),S==="fill"?{fillLinearGradientStartPointX:y.x-v*Math.cos(g),fillLinearGradientStartPointY:y.y-v*Math.sin(g),fillLinearGradientColorStops:O,fillLinearGradientEndPointX:y.x+v*Math.cos(g),fillLinearGradientEndPointY:y.y+v*Math.sin(g),fill:w[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:y.x-v*Math.cos(g),strokeLinearGradientStartPointY:y.y-v*Math.sin(g),strokeLinearGradientColorStops:O,strokeLinearGradientEndPointX:y.x+v*Math.cos(g),strokeLinearGradientEndPointY:y.y+v*Math.sin(g)}},[_,E.width,E.height]);e.useColor=f}(xa)),xa}var t0={},dd={},R2;function tu(){return R2||(R2=1,function(e){var i=dd&&dd.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=c;const t=i(Ar()),r=i(Hi());let a=!1;const l=(f=!a)=>{a=f};e.toggleFadeInAnimation=l;const s=()=>a;function c(f,E){const _=t.default.useRef();t.default.useLayoutEffect(()=>{_.current&&_.current.destroy()},[E]),t.default.useLayoutEffect(()=>{if(!a)return;const S=f.current.opacity();return S?(f.current.opacity(0),_.current=new r.default.Tween({node:f.current,opacity:S,onFinish:()=>{var w;(w=_.current)===null||w===void 0||w.destroy()}}),_.current.play(),()=>{var w;(w=_.current)===null||w===void 0||w.destroy()}):void 0},[])}e.isAnimationUsed=s}(dd)),dd}var M2;function ru(){return M2||(M2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0,e.incrementLoader=_,e.decrementLoader=S,e.whenLoaded=b,e.onLoadError=v,e.triggerLoadError=g;const i=tu();let t=0,r=[],a=3e4;const l=O=>{a=O};e.setAssetLoadTimeout=l;const s=()=>a;e.getAssetLoadTimeout=s;let c=6e3;const f=O=>{c=O};e.setFontLoadTimeout=f;const E=()=>c;function _(O){t+=1;let h=!1;const p=setTimeout(()=>{h||(g(`Timeout loading asset ${O}`),h=!0,S())},a);return()=>{h||(clearTimeout(p),S())}}function S(){t-=1,t===0&&(r.forEach(O=>O()),r=[])}function w(O){t===0?O():r.push(O)}function b(){return new Promise(O=>w(()=>{(0,i.isAnimationUsed)()?setTimeout(O,300):O(!0)}))}e.getFontLoadTimeout=E;let y=[];function v(O){y.push(O)}function g(O){y.forEach(h=>h(O))}}(t0)),t0}var Yo={},L2;function Yd(){return L2||(L2=1,function(e){var i=Yo&&Yo.__createBinding||(Object.create?function(M,k,A,L){L===void 0&&(L=A);var z=Object.getOwnPropertyDescriptor(k,A);z&&!("get"in z?!k.__esModule:z.writable||z.configurable)||(z={enumerable:!0,get:function(){return k[A]}}),Object.defineProperty(M,L,z)}:function(M,k,A,L){L===void 0&&(L=A),M[L]=k[A]}),t=Yo&&Yo.__setModuleDefault||(Object.create?function(M,k){Object.defineProperty(M,"default",{enumerable:!0,value:k})}:function(M,k){M.default=k}),r=Yo&&Yo.__importStar||function(){var M=function(k){return M=Object.getOwnPropertyNames||function(A){var L=[];for(var z in A)Object.prototype.hasOwnProperty.call(A,z)&&(L[L.length]=z);return L},M(k)};return function(k){if(k&&k.__esModule)return k;var A={};if(k!=null)for(var L=M(k),z=0;z<L.length;z++)L[z]!=="default"&&i(A,k,L[z]);return t(A,k),A}}();Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=f,e.setGoogleFonts=E,e.getFontsList=_,e.addGlobalFont=S,e.removeGlobalFont=w,e.replaceGlobalFonts=b,e.loadFont=p,e.setGoogleFontsVariants=N,e.getGoogleFontsVariants=T,e.injectGoogleFont=I,e.injectCustomFont=C;const a=r(oa),l=ru();let s=a.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),c=a.observable({value:!1});function f(){return c.value}function E(M){M!=="default"?(c.value=!0,s.splice(0,s.length),s.push(...M)):c.value=!1}function _(){return s}function S(M){e.globalFonts.push(M)}function w(M){const k=e.globalFonts.findIndex(A=>A.fontFamily===M);k!==-1&&e.globalFonts.splice(k,1)}function b(M){e.globalFonts.replace(M)}e.globalFonts=a.observable([]);var y="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",v=document.createElement("canvas");function g(M,k="Arial",A="normal",L="normal"){var z=v.getContext("2d");return z.font=`${A} ${L} 40px '${M}', ${k}`,z.measureText(y).width}const O={Arial:!0},h=M=>!!O[M];async function p(M,k,A){var L;if(O[M])return;const z=!!(!((L=document.fonts)===null||L===void 0)&&L.load),Y=g("Arial","Arial",k,A);if(z)try{await document.fonts.load(`16px '${M}', ${k} ${A}`);const D=g(M,"Arial",k,A);if(Y!==D)return void(O[M]=!0)}catch{}const $=g("Times","Times",k,A),X=g(M,"Arial",k,A),q=Math.min(6e3,(0,l.getFontLoadTimeout)())/60;for(let D=0;D<q;D++){const B=g(M,"Arial",k,A),U=g(M,"Times",k,A);if(B!==X||B!==Y||U!==$)return void(O[M]=!0);await new Promise(W=>setTimeout(W,60))}(0,l.triggerLoadError)(`Timeout for loading font "${M}"`)}e.isFontLoaded=h;const m={};let x="400,400italic,700,700italic";function N(M){x=M}function T(){return x}function I(M){if(m[M])return;const k=`https://fonts.googleapis.com/css?family=${M.replace(/ /g,"+")}:${x}`,A=document.createElement("link");A.type="text/css",A.href=k,A.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(A),m[M]=!0}const R={};function C(M){const k=M.fontFamily;if(R[k]||!M.url&&!M.styles)return;const A=document.createElement("style");A.type="text/css";const L=M.styles||(M.url?[{src:`url("${M.url}")`}]:[]);let z="";L.forEach(Y=>{z+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${k}';
|
|
79
|
-
src: ${Y.src};
|
|
80
|
-
font-style: ${Y.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${Y.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),A.innerHTML=z,document.getElementsByTagName("head")[0].appendChild(A),R[M.fontFamily]=!0}}(Yo)),Yo}var Ko={},N2;function ls(){return N2||(N2=1,function(e){var i=Ko&&Ko.__createBinding||(Object.create?function(l,s,c,f){f===void 0&&(f=c);var E=Object.getOwnPropertyDescriptor(s,c);E&&!("get"in E?!s.__esModule:E.writable||E.configurable)||(E={enumerable:!0,get:function(){return s[c]}}),Object.defineProperty(l,f,E)}:function(l,s,c,f){f===void 0&&(f=c),l[f]=s[c]}),t=Ko&&Ko.__setModuleDefault||(Object.create?function(l,s){Object.defineProperty(l,"default",{enumerable:!0,value:s})}:function(l,s){l.default=s}),r=Ko&&Ko.__importStar||function(){var l=function(s){return l=Object.getOwnPropertyNames||function(c){var f=[];for(var E in c)Object.prototype.hasOwnProperty.call(c,E)&&(f[f.length]=E);return f},l(s)};return function(s){if(s&&s.__esModule)return s;var c={};if(s!=null)for(var f=l(s),E=0;E<f.length;E++)f[E]!=="default"&&i(c,s,f[E]);return t(c,s),c}}();Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextSplitAllowed=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const a=r(oa);e.flags=a.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),e.setTextVerticalResizeEnabled=a.action(l=>{e.flags.textVerticalResizeEnabled=l}),e.useRemoveBackground=a.action(l=>{e.flags.removeBackgroundEnabled=l}),e.useHtmlTextRender=a.action(l=>{e.flags.htmlRenderEnabled=l}),e.setDownScalingEnabled=a.action(l=>{e.flags.imageDownScalingEnabled=l}),e.useDownScaling=a.action(l=>{(0,e.setDownScalingEnabled)(l)}),e.setForceTextFit=a.action(l=>{e.flags.textOverflow="change-font-size"}),e.setTextOverflow=a.action(l=>{e.flags.textOverflow=l}),e.setTextSplitAllowed=a.action(l=>{e.flags.textSplitAllowed=l}),e.setAnimationsEnabled=a.action(l=>{e.flags.animationsEnabled=l})}(Ko)),Ko}var r0={},I2;function Fw(){return I2||(I2=1,function(e){function i(t=""){return(t.match(/<\/p>/gi)||[]).length>1&&(t=t.replace(/<\/p>/gi,(r,a,l)=>(l.slice(a+r.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
|
-
`:r)),t.replace(/(<([^>]+)>)/gi,"")}Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=i}(r0)),r0}var hd={},j2;function Kd(){return j2||(j2=1,function(e){var i=hd&&hd.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=a;const t=i(Hi()),r={warm:l=>s=>{const c=s.data;for(let f=0;f<c.length;f+=4)c[f]=Math.min(c[f]+30*l,255),c[f+1]=Math.min(c[f+1]+15*l,255);return s},cold:l=>s=>{const c=s.data;for(let f=0;f<c.length;f+=4)c[f]=Math.min(c[f]-15*l,255),c[f+1]=Math.min(c[f+1]-10*l,255),c[f+2]=Math.min(c[f+2]+15*l,255);return s},natural:l=>s=>{const c=s.data;l=Math.max(0,Math.min(l,1));for(let f=0;f<c.length;f+=4){c[f]=Math.min(c[f]*(1+.1*l),255),c[f+1]=Math.min(c[f+1]*(1+.1*l),255),c[f+2]=Math.min(c[f+2]*(1+.1*l),255);const E=(c[f]+c[f+1]+c[f+2])/3;c[f]=Math.min((c[f]-E)*(1+.2*l)+E,255),c[f+1]=Math.min((c[f+1]-E)*(1+.2*l)+E,255),c[f+2]=Math.min((c[f+2]-E)*(1+.2*l)+E,255)}return s}};function a(l,s){var c;const f={filters:[]},E={};s.brightnessEnabled&&(f.filters.push(t.default.Filters.Brighten),f.brightness=s.brightness),s.blurEnabled&&(f.filters.push(t.default.Filters.Blur),f.blurRadius=s.blurRadius,s.type==="text"&&s.lineHeight<1&&(E.offset=s.fontSize)),s.sepiaEnabled&&f.filters.push(t.default.Filters.Sepia),s.grayscaleEnabled&&f.filters.push(t.default.Filters.Grayscale),s.filters.forEach((_,S)=>{const w=r[S];w&&f.filters.push(w(_.intensity))}),l.setAttrs(f),f.filters.length?l.cache(Object.assign(Object.assign({},E),{pixelRatio:s.store._elementsPixelRatio})):l.clearCache(),(c=l.getLayer())===null||c===void 0||c.batchDraw()}}(hd)),hd}var pd={},D2;function nu(){return D2||(D2=1,function(e){var i=pd&&pd.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const t=i(Ar()),r=qi,a=mo,l={stroke:"rgb(0, 161, 255)",strokeWidth:2},s=c=>{Object.assign(l,c)};e.setHighlighterStyle=s,e.Highlighter=(0,r.observer)(({element:c})=>t.default.createElement(a.Rect,Object.assign({name:"highlighter",x:c.a.x,y:c.a.y,rotation:c.a.rotation,width:c.a.width,height:c.a.height,listening:!1,strokeScaleEnabled:!1},l)))}(pd)),pd}var gd={},F2;function ss(){return F2||(F2=1,function(e){var i=gd&&gd.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.isTouchDevice=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const t=i(Ar());e.MOBILE_BREAKPOINT=800;const r=()=>window.innerWidth<=e.MOBILE_BREAKPOINT;e.isMobile=r;const a=c=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${c}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${c}
|
|
91
|
-
}
|
|
92
|
-
`;e.mobileStyle=a;const l=()=>"ontouchstart"in window||navigator.maxTouchPoints>0;e.isTouchDevice=l;const s=()=>{const[c,f]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const E=()=>{f((0,e.isMobile)())};return window.addEventListener("resize",E),()=>{window.removeEventListener("resize",E)}},[]),c};e.useMobile=s}(gd)),gd}var z2={},zw="warn";function Bw(e){zw=e}function Uw(){return zw}function GS(e){Bw(e)}var fn;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(fn||(fn={}));var av=function(e,i){return av=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},av(e,i)};function Er(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");av(e,i);function t(){this.constructor=e}e.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var dn=function(){return dn=Object.assign||function(i){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(i[l]=t[l])}return i},dn.apply(this,arguments)};function VS(e,i){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&i.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)i.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(t[r[a]]=e[r[a]]);return t}function qw(e,i){var t={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},r,a,l,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(E){return function(_){return f([E,_])}}function f(E){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,E[0]&&(t=0)),t;)try{if(r=1,a&&(l=E[0]&2?a.return:E[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,E[1])).done)return l;switch(a=0,l&&(E=[E[0]&2,l.value]),E[0]){case 0:case 1:l=E;break;case 4:return t.label++,{value:E[1],done:!1};case 5:t.label++,a=E[1],E=[0];continue;case 7:E=t.ops.pop(),t.trys.pop();continue;default:if(l=t.trys,!(l=l.length>0&&l[l.length-1])&&(E[0]===6||E[0]===2)){t=0;continue}if(E[0]===3&&(!l||E[1]>l[0]&&E[1]<l[3])){t.label=E[1];break}if(E[0]===6&&t.label<l[1]){t.label=l[1],l=E;break}if(l&&t.label<l[2]){t.label=l[2],t.ops.push(E);break}l[2]&&t.ops.pop(),t.trys.pop();continue}E=i.call(e,t)}catch(_){E=[6,_],a=0}finally{r=l=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}}function Td(e){var i=typeof Symbol=="function"&&Symbol.iterator,t=i&&e[i],r=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function go(e,i){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var r=t.call(e),a,l=[],s;try{for(;(i===void 0||i-- >0)&&!(a=r.next()).done;)l.push(a.value)}catch(c){s={error:c}}finally{try{a&&!a.done&&(t=r.return)&&t.call(r)}finally{if(s)throw s.error}}return l}function vo(e,i,t){if(arguments.length===2)for(var r=0,a=i.length,l;r<a;r++)(l||!(r in i))&&(l||(l=Array.prototype.slice.call(i,0,r)),l[r]=i[r]);return e.concat(l||Array.prototype.slice.call(i))}function Xd(e){return ft(e).type}function $S(e,i){return ft(e).getChildType(i)}function Hw(e,i){return ft(e).onPatch(i)}function WS(e,i){return ft(e).onSnapshot(i)}function vc(e,i){ft(e).applyPatches(Hv(i))}function YS(e,i){var t={patches:[],inversePatches:[]},r={},a,l={get recording(){return!!a},get patches(){return r.patches||(r.patches=t.patches.slice()),r.patches},get reversedInversePatches(){return r.reversedInversePatches||(r.reversedInversePatches=t.inversePatches.slice().reverse()),r.reversedInversePatches},get inversePatches(){return r.inversePatches||(r.inversePatches=t.inversePatches.slice()),r.inversePatches},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=Hw(e,function(s,c){i&&!i(s,c,zv())||(t.patches.push(s),t.inversePatches.push(c),r.patches=void 0,r.inversePatches=void 0,r.reversedInversePatches=void 0)}))},replay:function(s){vc(s||e,t.patches)},undo:function(s){vc(s||e,t.inversePatches.slice().reverse())}};return l.resume(),l}function KS(e){var i=ft(e);if(!i.isRoot)throw new it("`protect` can only be invoked on root nodes");i.isProtectionEnabled=!0}function XS(e){var i=ft(e);if(!i.isRoot)throw new it("`unprotect` can only be invoked on root nodes");i.isProtectionEnabled=!1}function ZS(e){return ft(e).isProtected}function Gw(e,i){return ft(e).applySnapshot(i)}function jv(e,i){i===void 0&&(i=!0);var t=ft(e);return i?t.snapshot:t.type.getSnapshot(t,!1)}function QS(e,i){i===void 0&&(i=1);for(var t=ft(e).parent;t;){if(--i===0)return!0;t=t.parent}return!1}function JS(e,i){i===void 0&&(i=1);for(var t=i,r=ft(e).parent;r;){if(--t===0)return r.storedValue;r=r.parent}throw new it("Failed to find the parent of ".concat(ft(e)," at depth ").concat(i))}function eE(e,i){for(var t=ft(e).parent;t;){if(i.is(t.storedValue))return!0;t=t.parent}return!1}function tE(e,i){for(var t=ft(e).parent;t;){if(i.is(t.storedValue))return t.storedValue;t=t.parent}throw new it("Failed to find the parent of ".concat(ft(e)," of a given type"))}function Vw(e){return ft(e).root.storedValue}function $w(e){return ft(e).path}function rE(e){return _c(ft(e).path)}function nE(e){return ft(e).isRoot}function iE(e,i){var t=c4(ft(e),i);return t?t.value:void 0}function aE(e,i,t){var r=ft(i).root.identifierCache.resolve(e,Oc(t));return r==null?void 0:r.value}function Ww(e){return ft(e).identifier}function oE(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return;if(lr(t))return i?Dv(t)?t:void 0:t;throw new it("The reference to be checked is not one of node, null or undefined")}catch(r){if(r instanceof Gv)return;throw r}}function lE(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return!1;if(lr(t))return i?Dv(t):!0;throw new it("The reference to be checked is not one of node, null or undefined")}catch(r){if(r instanceof Gv)return!1;throw r}}function Yw(e,i){var t=c4(ft(e),i,!1);if(t!==void 0)try{return t.value}catch{return}}function sE(e,i){return u4(ft(e),ft(i))}function uE(e,i){i===void 0&&(i=!0);var t=ft(e);return t.type.create(t.snapshot,i===!0?t.root.environment:i===!1?void 0:i)}function cE(e){return ft(e).detach(),e}function fE(e){var i=ft(e);i.isRoot?i.die():i.parent.removeChild(i.subpath)}function Dv(e){return ft(e).observableIsAlive}function dE(e,i){var t=ft(e);return t.addDisposer(i),i}function hE(e){var i=ft(e),t=i.root.environment;if(!t)throw new it("Failed to find the environment of ".concat(i," ").concat(i.path));return t}function pE(e){var i=ft(e),t=i.root.environment;return!!t}function Kw(e,i){var t=ft(e);t.getChildren().forEach(function(r){lr(r.storedValue)&&Kw(r.storedValue,i)}),i(t.storedValue)}function Xw(e){var i;return lr(e)?i=Xd(e):i=e,{name:i.name,properties:dn({},i.properties)}}function gE(e){var i=ft(e).type,t=dn(dn({},Xw(i)),{actions:[],volatile:[],views:[],flowActions:[]}),r=Object.getOwnPropertyNames(e);return r.forEach(function(a){if(!(a in t.properties)){var l=Object.getOwnPropertyDescriptor(e,a);if(l.get){ew(e,a)?t.views.push(a):t.volatile.push(a);return}l.value._isFlowAction===!0&&t.flowActions.push(a),l.value._isMSTAction===!0?t.actions.push(a):rw(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function vE(e){return e}function mE(e){return e}function yE(e){return e}function bE(e){return ft(e).nodeId}var Zw=function(){function e(i,t,r,a){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:a}),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:zn.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=a,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(i){var t=this.isAlive;this._state=i;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(i){this._hookSubscribers&&this._hookSubscribers.emit(i,this,i)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return this._hookSubscribers||(this._hookSubscribers=new g4),this._hookSubscribers.register(i,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(i,t){this._parent=i,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(i){return i&&(this.pathAtom||(this.pathAtom=Md("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Jl(this._subpath):""),this.parent.getEscapedPath(i)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==zn.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===zn.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Md("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(this.state===zn.CREATED){if(this.parent){if(this.parent.state!==zn.FINALIZED)return;this.fireHook(fn.afterAttach)}this.state=zn.FINALIZED,i&&i()}}}),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=zn.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(fn.beforeDestroy)}}),e}(),Id=function(e){Er(i,e);function i(t,r,a,l,s){var c=e.call(this,t,r,a,l)||this;try{c.storedValue=t.createNewInstance(s)}catch(f){throw c.state=zn.DEAD,f}return c.state=zn.CREATED,c.finalizeCreation(),c}return Object.defineProperty(i.prototype,"root",{get:function(){if(!this.parent)throw new it("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this.parent!==t,l=this.subpath!==r;!a&&!l||(this.environment=void 0,this.baseSetParent(this.parent,r))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(t).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===zn.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.fireInternalHook(t)}}),i}(Zw);Id.prototype.die=tn(Id.prototype.die);var wE=1,Ta;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Ta||(Ta={}));var Di;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Di||(Di={}));var _E={onError:function(e){throw e}},Ei=function(e){Er(i,e);function i(t,r,a,l,s){var c=e.call(this,t,r,a,l)||this;if(Object.defineProperty(c,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++wE}),Object.defineProperty(c,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Ta.UNINITIALIZED}),Object.defineProperty(c,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),c._snapshotComputed=Qs(function(){return c.getSnapshot()}),c.unbox=c.unbox.bind(c),c._initialSnapshot=s,c.identifierAttribute=t.identifierAttribute,r||(c.identifierCache=new UE),c._childNodes=t.initializeChildNodes(c,c._initialSnapshot),c.identifier=null,c.unnormalizedIdentifier=null,c.identifierAttribute&&c._initialSnapshot){var f=c._initialSnapshot[c.identifierAttribute];if(f===void 0){var E=c._childNodes[c.identifierAttribute];E&&(f=E.value)}if(typeof f!="string"&&typeof f!="number")throw new it("Instance identifier '".concat(c.identifierAttribute,"' for type '").concat(c.type.name,"' must be a string or a number"));c.identifier=Oc(f),c.unnormalizedIdentifier=f}return r?r.root.identifierCache.addNodeToCache(c):c.identifierCache.addNodeToCache(c),c}return Object.defineProperty(i.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)}}),Object.defineProperty(i.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(t){t===void 0&&(t=!0),this._observableInstanceState===Ta.UNINITIALIZED&&this.createObservableInstance(t)}}),Object.defineProperty(i.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r,a,l,s;t===void 0&&(t=!0),this._observableInstanceState=Ta.CREATING;for(var c=[],f=this.parent;f&&f._observableInstanceState===Ta.UNINITIALIZED;)c.unshift(f),f=f.parent;try{for(var E=Td(c),_=E.next();!_.done;_=E.next()){var S=_.value;S.createObservableInstanceIfNeeded(!1)}}catch(v){r={error:v}}finally{try{_&&!_.done&&(a=E.return)&&a.call(E)}finally{if(r)throw r.error}}var w=this.type;try{this.storedValue=w.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,w.finalizeNewInstance(this,this.storedValue)}catch(v){throw this.state=zn.DEAD,v}finally{this._isRunningAction=!1}if(this._observableInstanceState=Ta.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=bc,this.state=zn.CREATED,t){this.fireHook(fn.afterCreate),this.finalizeCreation();try{for(var b=Td(c.reverse()),y=b.next();!y.done;y=b.next()){var S=y.value;S.fireHook(fn.afterCreate),S.finalizeCreation()}}catch(v){l={error:v}}finally{try{y&&!y.done&&(s=b.return)&&s.call(b)}finally{if(l)throw l.error}}}}}),Object.defineProperty(i.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(fn.beforeDetach);var t=this.state;this.state=zn.DETACHING;var r=this.root,a=r.environment,l=r.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=a,this.identifierCache=l}finally{this.state=t}}}}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=t!==this.parent,l=r!==this.subpath;!a&&!l||(a?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,r),this.fireHook(fn.afterAttach)):l&&this.baseSetParent(this.parent,r))}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;this.fireInternalHook(t);var a=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[t];typeof a=="function"&&(hc?hc(function(){a.apply(r.storedValue)}):a.apply(this.storedValue))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Ta.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(i.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,r=this._childNodes,a=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(r,a),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(i.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(i.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=Uw();if(!this.isAlive&&r!=="ignore"){var a=this._getAssertAliveError(t);switch(r){case"error":throw new it(a);case"warn":ex(a)}}}}),Object.defineProperty(i.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.getEscapedPath(!1)||this.pathUponDeath||"",a=t.subpath&&Jl(t.subpath)||"",l=t.actionContext||Fv();l&&l.type!=="action"&&l.parentActionEvent&&(l=l.parentActionEvent);var s="";if(l&&l.name!=null){var c=l&&l.context&&$w(l.context)||r;s="".concat(c,".").concat(l.name,"()")}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '".concat(this.type.name,"', Path upon death: '").concat(r,"', Subpath: '").concat(a,"', Action: '").concat(s,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return this._observableInstanceState===Ta.CREATED?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(bc),this._autoUnbox=!1;try{return this._observableInstanceState===Ta.CREATED?this.type.getChildren(this):d4(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.type.getChildType(t)}}),Object.defineProperty(i.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw new it("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.type.removeChild(this,t)}}),Object.defineProperty(i.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",r=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(t).concat(r).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this.baseFinalizeCreation(function(){var r,a;try{for(var l=Td(t.getChildren()),s=l.next();!s.done;s=l.next()){var c=s.value;c.finalizeCreation()}}catch(f){r={error:f}}finally{try{s&&!s.done&&(a=l.return)&&a.call(l)}finally{if(r)throw r.error}}t.fireInternalHook(fn.afterCreationFinalization)})}}),Object.defineProperty(i.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new it("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(i.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this._applyPatches=jd(this.storedValue,"@APPLY_PATCHES",function(r){r.forEach(function(a){if(!a.path){t.type.applySnapshot(t,a.value);return}var l=_c(a.path),s=f4(t,l.slice(0,-1));s.applyPatchLocally(l[l.length-1],a)})}),this._applySnapshot=jd(this.storedValue,"@APPLY_SNAPSHOT",function(r){if(r!==t.snapshot)return t.type.applySnapshot(t,r)}),Vs(this.storedValue,"$treenode",this),Vs(this.storedValue,"toJSON",HE)}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===zn.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Ta.UNINITIALIZED&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Di.Dispose),this._internalEventsClear(Di.Dispose))}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(r){r.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._addSnapshotReaction(),this._internalEventsRegister(Di.Snapshot,t)}}),Object.defineProperty(i.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Di.Snapshot,t)}}),Object.defineProperty(i.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Di.Patch,t)}}),Object.defineProperty(i.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(this._internalEventsHasSubscribers(Di.Patch)){var a=r.path.substr(this.path.length)+(t.path?"/"+t.path:""),l=ZE({},t,{path:a}),s=go(ox(l),2),c=s[0],f=s[1];this._internalEventsEmit(Di.Patch,c,f)}this.parent&&this.parent.emitPatch(t,r)}}),Object.defineProperty(i.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Di.Dispose,t)}}),Object.defineProperty(i.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Di.Dispose,t,!0);return}throw new it("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(i.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._internalEventsHas(Di.Dispose,t))throw new it("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Di.Dispose,t)}}),Object.defineProperty(i.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.middlewares){var r=this.middlewares.indexOf(t);r>=0&&this.middlewares.splice(r,1)}}}),Object.defineProperty(i.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this;r===void 0&&(r=!0);var l={handler:t,includeHooks:r};return this.middlewares?this.middlewares.push(l):this.middlewares=[l],function(){a.removeMiddleware(l)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,r)}}),Object.defineProperty(i.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;if(!this._hasSnapshotReaction){var r=$5(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},_E);this.addDisposer(r),this._hasSnapshotReaction=!0}}}),Object.defineProperty(i.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)}}),Object.defineProperty(i.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a){return a===void 0&&(a=!1),this._internalEvents||(this._internalEvents=new g4),this._internalEvents.register(t,r,a)}}),Object.defineProperty(i.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return!!this._internalEvents&&this._internalEvents.has(t,r)}}),Object.defineProperty(i.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){this._internalEvents&&this._internalEvents.unregister(t,r)}}),Object.defineProperty(i.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var r,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];this._internalEvents&&(r=this._internalEvents).emit.apply(r,vo([t],go(a),!1))}}),Object.defineProperty(i.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEvents&&this._internalEvents.clear(t)}}),Object.defineProperty(i.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),i}(Zw);Ei.prototype.createObservableInstance=tn(Ei.prototype.createObservableInstance);Ei.prototype.detach=tn(Ei.prototype.detach);Ei.prototype.die=tn(Ei.prototype.die);var Qw,Mt;(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",e[e.Lazy=1048576]="Lazy",e[e.Finite=2097152]="Finite",e[e.Float=4194304]="Float"})(Mt||(Mt={}));var Jw="cannotDetermine",SE=Symbol("$type"),al=function(){function e(i){Object.defineProperty(this,Qw,{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=i}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return nl(this,i),this.instantiate(null,"",t,i).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){throw new it("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return i===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=s4(i);if(r){var a=Xd(i);return this.isAssignableFrom(a)?xi():Oi(t,i)}return this.isValidSnapshot(i,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.validate(i,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new it("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 new it("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 new it("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 new it("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}();Qw=SE;al.prototype.create=tn(al.prototype.create);var mc=function(e){Er(i,e);function i(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),r}return Object.defineProperty(i.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return t===void 0&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,r)}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.createObservableInstanceIfNeeded(),t.storedValue}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return!t.identifierAttribute||t.identifier===Oc(r[t.identifierAttribute])}}),Object.defineProperty(i.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return t.isDetaching?!1:t.snapshot===r||lr(r)&&ft(r)===t?!0:t.type===this&&h4(r)&&!lr(r)&&this.isMatchingSnapshotId(t,r)?(t.applySnapshot(r),!0):!1}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this.tryToReconcileNode(t,r);if(s)return t.setParent(a,l),t;if(t.die(),lr(r)&&this.isAssignableFrom(Xd(r))){var c=ft(r);return c.setParent(a,l),c}return this.instantiate(a,l,void 0,r)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(al);mc.prototype.create=tn(mc.prototype.create);var iu=function(e){Er(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){if(!t.isDetaching&&t.type===this&&t.storedValue===r)return t;var s=this.instantiate(a,l,void 0,r);return t.die(),s}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(al);function hn(e){return typeof e=="object"&&e&&e.isType===!0}var so=new Map;function EE(e){return function(t,r,a){switch(t.type){case"action":if(!e.filter||e.filter(t)===!0){var l=e.onStart(t);e.onResume(t,l),so.set(t.id,{call:t,context:l,async:!1});try{var s=r(t);return e.onSuspend(t,l),so.get(t.id).async===!1&&(so.delete(t.id),e.onSuccess(t,l,s)),s}catch(f){throw so.delete(t.id),e.onFail(t,l,f),f}}else return r(t);case"flow_spawn":{var c=so.get(t.rootId);return c.async=!0,r(t)}case"flow_resume":case"flow_resume_error":{var c=so.get(t.rootId);e.onResume(t,c.context);try{return r(t)}finally{e.onSuspend(t,c.context)}}case"flow_throw":{var c=so.get(t.rootId);return so.delete(t.rootId),e.onFail(t,c.context,t.args[0]),r(t)}case"flow_return":{var c=so.get(t.rootId);return so.delete(t.rootId),e.onSuccess(t,c.context,t.args[0]),r(t)}}}}var xE=function(){function e(i,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:i}),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}),i&&i.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,i))}}),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 OE(e){var i=new Map;return function(r,a){var l=r.parentActionEvent?i.get(r.parentActionEvent.id):void 0;if(r.type==="action"){var s=dn(dn({},r),{env:l&&l.call.env,parentCall:l&&l.call}),c=!e.filter||e.filter(s),f=c?e:void 0,E=new xE(f,s);i.set(r.id,E);var _=void 0;try{_=a(r)}catch(w){throw i.delete(r.id),E.finish(w),w}return E.hasFlowsPending||(i.delete(r.id),E.finish()),_}else{if(!l)return a(r);switch(r.type){case"flow_spawn":return l.incFlowsPending(),a(r);case"flow_resume":case"flow_resume_error":return a(r);case"flow_throw":{var S=r.args[0];try{return a(r)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(r.parentActionEvent.id),l.finish(S))}}case"flow_return":try{return a(r)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(r.parentActionEvent.id),l.finish())}}}}}function PE(e,i,t,r){if(r instanceof Date)return{$MST_DATE:r.getTime()};if(wc(r))return r;if(lr(r))return lp("[MSTNode: ".concat(Xd(r).name,"]"));if(typeof r=="function")return lp("[function]");if(typeof r=="object"&&!Gs(r)&&!qv(r))return lp("[object ".concat(r&&r.constructor&&r.constructor.name||"Complex Object","]"));try{return JSON.stringify(r),r}catch(a){return lp(""+a)}}function CE(e,i){return i&&typeof i=="object"&&"$MST_DATE"in i?new Date(i.$MST_DATE):i}function lp(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function e4(e,i){hc(function(){Hv(i).forEach(function(t){return kE(e,t)})})}function kE(e,i){var t=Yw(e,i.path||"");if(!t)throw new it("Invalid action path: ".concat(i.path||""));var r=ft(t);if(i.name==="@APPLY_PATCHES")return vc.call(null,t,i.args[0]);if(i.name==="@APPLY_SNAPSHOT")return Gw.call(null,t,i.args[0]);if(typeof t[i.name]!="function")throw new it("Action '".concat(i.name,"' does not exist in '").concat(r.path,"'"));return t[i.name].apply(t,i.args?i.args.map(function(a){return CE(r,a)}):[])}function AE(e,i){var t=[],r=function(s){var c=i?i(s,zv()):!0;c&&t.push(s)},a,l={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=t4(e,r))},replay:function(s){e4(s,t)}};return l.resume(),l}function t4(e,i,t){return t===void 0&&(t=!1),i4(e,function(a,l){if(a.type==="action"&&a.id===a.rootId){var s=ft(a.context),c={name:a.name,path:u4(ft(e),s),args:a.args.map(function(E,_){return PE(s,a.name,_,E)})};if(t){var f=l(a);return i(c),f}else return i(c),l(a)}else return l(a)})}var TE=1,Rd;function Fv(){return Rd}function r4(){return TE++}function ov(e,i){var t=ft(e.context);e.type==="action"&&t.assertAlive({actionContext:e});var r=t._isRunningAction;t._isRunningAction=!0;var a=Rd;Rd=e;try{return LE(t,e,i)}finally{Rd=a,t._isRunningAction=r}}function n4(e){if(e)return e.type==="action"?e:e.parentActionEvent}function jd(e,i,t){var r=function(){var a=r4(),l=Rd,s=n4(l);return ov({type:"action",name:i,id:a,args:v4(arguments),context:e,tree:Vw(e),rootId:l?l.rootId:a,parentId:l?l.id:0,allParentIds:l?vo(vo([],go(l.allParentIds),!1),[l.id],!1):[],parentEvent:l,parentActionEvent:s},t)};return r._isMSTAction=!0,r._isFlowAction=t._isFlowAction,r}function i4(e,i,t){t===void 0&&(t=!0);var r=ft(e);return r.addMiddleWare(i,t)}function RE(e,i,t){t===void 0&&(t=!0);var r={handler:e,includeHooks:t};return i.$mst_middleware=i.$mst_middleware||[],i.$mst_middleware.push(r),i}var ME=function(){function e(i,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=i;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 i=this.middlewares[this.arrayIndex];if(i){var t=i[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function LE(e,i,t){var r=new ME(e,t);if(r.isEmpty)return tn(t).apply(null,i.args);var a=null;function l(s){var c=r.getNextMiddleware(),f=c&&c.handler;if(!f)return tn(t).apply(null,s.args);if(!c.includeHooks&&fn[s.name])return l(s);function E(S,w){a=l(S),w&&(a=w(a))}function _(S){a=S}return f(s,E,_),a}return l(i)}function zv(){for(var e=Fv();e&&e.type!=="action";)e=e.parentActionEvent;return e}function a4(e,i,t){for(var r=typeof i=="number"?i:i.id,a=t?e:e.parentActionEvent;a;){if(a.id===r)return!0;a=a.parentActionEvent}return!1}function NE(e,i){return a4(e,i,!1)}function IE(e,i){return a4(e,i,!0)}function jE(e){try{return JSON.stringify(e)}catch(i){return"<Unserializable: ".concat(i,">")}}function o4(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):lr(e)?"<".concat(e,">"):"`".concat(jE(e),"`")}function DE(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function FE(e){var i=e.value,t=e.context[e.context.length-1].type,r=e.context.map(function(c){var f=c.path;return f}).filter(function(c){return c.length>0}).join("/"),a=r.length>0?'at path "/'.concat(r,'" '):"",l=lr(i)?"value of type ".concat(ft(i).type.name,":"):wc(i)?"value":"snapshot",s=t&&lr(i)&&t.is(ft(i).snapshot);return"".concat(a).concat(l," ").concat(o4(i)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?k4(t)||wc(i)?".":", expected an instance of `".concat(t.name,"` or a snapshot like `").concat(t.describe(),"` instead.")+(s?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function Bv(e,i,t){return e.concat([{path:i,type:t}])}function xi(){return yc}function Oi(e,i,t){return[{context:e,value:i,message:t}]}function Vp(e){return e.reduce(function(i,t){return i.concat(t)},[])}function nl(e,i){tx()&&l4(e,i)}function l4(e,i){var t=e.validate(i,[{path:"",type:e}]);if(t.length>0)throw new it(zE(e,i,t))}function zE(e,i,t){if(t.length!==0)return"Error while converting ".concat(DE(o4(i))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(FE).join(`
|
|
95
|
-
`)}var BE=0,UE=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:BE++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:dr.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:dr.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i);this.lastCacheModificationPerId.set(i,t===void 0?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i)||0;return"".concat(this.cacheId,"-").concat(t)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){if(t===void 0&&(t=!0),i.identifierAttribute){var r=i.identifier;this.cache.has(r)||this.cache.set(r,dr.array([],$p));var a=this.cache.get(r);if(a.indexOf(i)!==-1)throw new it("Already registered");a.push(i),t&&this.updateLastCacheModificationPerId(r)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this;yv(i.identifierCache.cache).forEach(function(r){return r.forEach(function(a){t.addNodeToCache(a)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(i.identifierAttribute){var t=i.identifier,r=this.cache.get(t);r&&(r.remove(i),r.length||this.cache.delete(t),this.updateLastCacheModificationPerId(i.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this,r=new e,a=i.path+"/";return nw(this.cache).forEach(function(l){for(var s=go(l,2),c=s[0],f=s[1],E=!1,_=f.length-1;_>=0;_--){var S=f[_];(S===i||S.path.indexOf(a)===0)&&(r.addNodeToCache(S,!1),f.splice(_,1),f.length||t.cache.delete(c),E=!0)}E&&t.updateLastCacheModificationPerId(c)}),r}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this.cache.get(t);return r?r.some(function(a){return i.isAssignableFrom(a.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this.cache.get(t);if(!r)return null;var a=r.filter(function(l){return i.isAssignableFrom(l.type)});switch(a.length){case 0:return null;case 1:return a[0];default:throw new it("Cannot resolve a reference to type '".concat(i.name,"' with id: '").concat(t,"' unambigously, there are multiple candidates: ").concat(a.map(function(l){return l.path}).join(", ")))}}}),e}();function Uv(e,i,t,r,a){var l=s4(a);if(l){if(l.parent)throw new it("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 '".concat(i?i.path:"","/").concat(t,"', but it lives already at '").concat(l.path,"'"));return i&&l.setParent(i,t),l}return new Ei(e,i,t,r,a)}function us(e,i,t,r,a){return new Id(e,i,t,r,a)}function qE(e){return e instanceof Id||e instanceof Ei}var zn;(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"})(zn||(zn={}));function lr(e){return!!(e&&e.$treenode)}function ft(e){if(!lr(e))throw new it("Value ".concat(e," is no MST Node"));return e.$treenode}function s4(e){return e&&e.$treenode||null}function HE(){return ft(this).snapshot}var GE=function(e){return".."};function u4(e,i){if(e.root!==i.root)throw new it("Cannot calculate relative path: objects '".concat(e,"' and '").concat(i,"' are not part of the same object tree"));for(var t=_c(e.path),r=_c(i.path),a=0;a<t.length&&t[a]===r[a];a++);return t.slice(a).map(GE).join("/")+Op(r.slice(a))}function c4(e,i,t){return t===void 0&&(t=!0),f4(e,_c(i),t)}function f4(e,i,t){t===void 0&&(t=!0);var r=e;try{for(var a=0;a<i.length;a++){var l=i[a];if(l===".."){if(r=r.parent,r)continue}else{if(l===".")continue;if(r){if(r instanceof Id){var s=r.value;lr(s)&&(r=ft(s))}if(r instanceof Ei){var c=r.getChildType(l);if(c&&(r=r.getChildNode(l),r))continue}}}throw new it("Could not resolve '".concat(l,"' in path '").concat(Op(i.slice(0,a))||"/","' while resolving '").concat(Op(i),"'"))}}catch(f){if(!t)return;throw f}return r}function d4(e){if(!e)return yc;var i=Object.keys(e);if(!i.length)return yc;var t=new Array(i.length);return i.forEach(function(r,a){t[a]=e[r]}),t}function VE(e){return m4(e)}var $E=Object.toString(),yc=Object.freeze([]),bc=Object.freeze({}),$p=N5().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze($p);var it=function(e){Er(i,e);function i(t){return t===void 0&&(t="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(t))||this}return i}(Error);function WE(e){return e}var YE=Number.isInteger;function KE(e){return Number(e)===e&&e%1!==0}function XE(e){return Number.isFinite(e)}function qv(e){return Array.isArray(e)||si(e)}function Hv(e){return e?qv(e)?e:[e]:yc}function ZE(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];for(var r=0;r<i.length;r++){var a=i[r];for(var l in a)e[l]=a[l]}return e}function Gs(e){var i;if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t==null?!0:((i=t.constructor)===null||i===void 0?void 0:i.toString())===$E}function h4(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function wc(e,i){return i===void 0&&(i=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||i&&e instanceof Date}function p4(e){return typeof e!="function"}function QE(e,i,t){xn(e)?wv(e,i,t):Object.defineProperty(e,i,t)}function Vs(e,i,t){QE(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}var JE=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(i,t){var r=this;return t===void 0&&(t=!1),t?this.handlers.unshift(i):this.handlers.push(i),function(){r.unregister(i)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.handlers.indexOf(i)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.handlers.indexOf(i);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 i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var r=this.handlers.slice();r.forEach(function(a){return a.apply(void 0,vo([],go(i),!1))})}}),e}(),g4=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(i){var t=this.eventHandlers&&this.eventHandlers[i];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,r){r===void 0&&(r=!1),this.eventHandlers||(this.eventHandlers={});var a=this.eventHandlers[i];return a||(a=this.eventHandlers[i]=new JE),a.register(t,r)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this.eventHandlers&&this.eventHandlers[i];return!!r&&r.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var r=this.eventHandlers&&this.eventHandlers[i];r&&r.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.eventHandlers&&delete this.eventHandlers[i]}}),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(i){for(var t,r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var l=this.eventHandlers&&this.eventHandlers[i];l&&(t=l).emit.apply(t,vo([],go(r),!1))}}),e}();function v4(e){for(var i=new Array(e.length),t=0;t<e.length;t++)i[t]=e[t];return i}function n0(e,i){return e.indexOf(i)===0}function ex(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function tx(){return typeof process<"u"&&z2&&z2.ENABLE_TYPE_CHECK==="true"}function i0(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function m4(e){return ax(e.name,e)}function rx(e){return e}function nx(e){return function(){var i,t=[];for(i=0;i<arguments.length;i++)t[i]=arguments[i];return qw(this,function(r){switch(r.label){case 0:return[4,e.apply(void 0,vo([],go(t),!1))];case 1:return[2,r.sent()]}})}}function ix(e){return qw(this,function(i){switch(i.label){case 0:return[4,e];case 1:return[2,i.sent()]}})}function ax(e,i){var t=function(){var a=r4(),l=Fv();if(!l)throw new it("a mst flow must always have a parent context");var s=n4(l);if(!s)throw new it("a mst flow must always have a parent action context");var c={name:e,id:a,tree:l.tree,context:l.context,parentId:l.id,allParentIds:vo(vo([],go(l.allParentIds),!1),[l.id],!1),rootId:l.rootId,parentEvent:l,parentActionEvent:s},f=arguments;function E(_,S,w){return _.$mst_middleware=t.$mst_middleware,ov(dn(dn({},c),{type:S,args:[w]}),_)}return new Promise(function(_,S){var w,b=function(){w=i.apply(null,arguments),y(void 0)};b.$mst_middleware=t.$mst_middleware,ov(dn(dn({},c),{type:"flow_spawn",args:v4(f)}),b);function y(O){var h;try{var p=E(function(m){h=w.next(m)},"flow_resume",O);p instanceof Error&&(h=w.throw(p))}catch(m){i0(function(){E(function(x){S(m)},"flow_throw",m)});return}g(h)}function v(O){var h;try{E(function(p){h=w.throw(p)},"flow_resume_error",O)}catch(p){i0(function(){E(function(m){S(p)},"flow_throw",p)});return}g(h)}function g(O){if(O.done){i0(function(){E(function(h){_(h)},"flow_return",O.value)});return}if(!O.value||typeof O.value.then!="function")throw new it("Only promises can be yielded to `async`, got: "+O);return O.value.then(y,v)}})};return t._isFlowAction=!0,t}function ox(e){if(!("oldValue"in e))throw new it("Patches without `oldValue` field cannot be inversed");return[lx(e),sx(e)]}function lx(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 sx(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 ux(e){return typeof e=="number"}function Jl(e){return ux(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function y4(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Op(e){if(e.length===0)return"";var i=function(t){return t.map(Jl).join("/")};return e[0]==="."||e[0]===".."?i(e):"/"+i(e)}function _c(e){var i=e.split("/").map(y4),t=e===""||e==="."||e===".."||n0(e,"/")||n0(e,"./")||n0(e,"../");if(!t)throw new it("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return i[0]===""&&i.shift(),i}var a0=Symbol("$preProcessorFailed"),cx=function(e){Er(i,e);function i(t,r,a){var l=e.call(this,a||t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:r}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Mt.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(i.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t}}),Object.defineProperty(i.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(t){try{return this.preProcessSnapshot(t)}catch{return a0}}}),Object.defineProperty(i.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._processors.postProcessor?this._processors.postProcessor.call(null,t,r.storedValue):t}}),Object.defineProperty(i.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;fx(t.type,this,"create"),t instanceof Ei&&(t.hasSnapshotPostProcessor=!!this._processors.postProcessor);var a=t.getSnapshot;t.getSnapshot=function(){return r.postProcessSnapshot(a.call(t),t)},T4(this._subtype)||(t.getReconciliationType=function(){return r})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=lr(l)?l:this.preProcessSnapshot(l),c=this._subtype.instantiate(t,r,a,s);return this._fixNode(c),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this._subtype.reconcile(t,lr(r)?r:this.preProcessSnapshot(r),a,l);return s!==t&&this._fixNode(s),s}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){r===void 0&&(r=!0);var a=this._subtype.getSnapshot(t);return r?this.postProcessSnapshot(a,t):a}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this.preProcessSnapshotSafe(t);return a===a0?Oi(r,t,"Failed to preprocess value"):this._subtype.validate(a,r)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(i.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=hn(t)?this._subtype:lr(t)?jv(t,!1):this.preProcessSnapshotSafe(t);return r===a0?!1:this._subtype.validate(r,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(!(this._subtype instanceof mc))return!1;var a=this.preProcessSnapshot(r);return this._subtype.isMatchingSnapshotId(t,a)}}),i}(al);function fx(e,i){for(var t,r,a=[],l=2;l<arguments.length;l++)a[l-2]=arguments[l];try{for(var s=Td(a),c=s.next();!c.done;c=s.next()){var f=c.value;e[f]=i[f].bind(i)}}catch(E){t={error:E}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}function dx(e,i,t){return new cx(e,i,t)}var B2="Map.put can only be used to store complex values that have an identifier type attribute";function b4(e,i){var t,r,a=e.getSubTypes();if(a===Jw)return!1;if(a){var l=Hv(a);try{for(var s=Td(l),c=s.next();!c.done;c=s.next()){var f=c.value;if(!b4(f,i))return!1}}catch(E){t={error:E}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}return e instanceof Dd&&i.push(e),!0}var Xl;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Xl||(Xl={}));var hx=function(e){Er(i,e);function i(t,r){return e.call(this,t,dr.ref.enhancer,r)||this}return Object.defineProperty(i.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(i.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(i.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(i.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return e.prototype.set.call(this,""+t,r)}}),Object.defineProperty(i.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!t)throw new it("Map.put cannot be used to set empty values");if(lr(t)){var r=ft(t);if(r.identifier===null)throw new it(B2);return this.set(r.identifier,t),t}else if(h4(t)){var a=ft(this),l=a.type;if(l.identifierMode!==Xl.YES)throw new it(B2);var s=l.mapIdentifierAttribute,c=t[s];if(!Vv(c)){var f=this.put(l.getChildType().create(t,a.environment));return this.put(jv(f))}var E=Oc(c);return this.set(E,t),this.get(E)}else throw new it("Map.put can only be used to store complex values")}}),i}(Bp),Pp=function(e){Er(i,e);function i(t,r,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(l,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Xl.UNKNOWN}),Object.defineProperty(l,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Map}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l._determineIdentifierMode(),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,r)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this._determineIdentifierMode(),Uv(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Xl.UNKNOWN){var t=[];if(b4(this._subType,t)){var r=t.reduce(function(a,l){if(!l.identifierAttribute)return a;if(a&&a!==l.identifierAttribute)throw new it("The objects in a map should all have the same identifier attribute, expected '".concat(a,"', but child of type '").concat(l.name,"' declared attribute '").concat(l.identifierAttribute,"' as identifier"));return l.identifierAttribute},void 0);r?(this.identifierMode=Xl.YES,this.mapIdentifierAttribute=r):this.identifierMode=Xl.NO}}}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){r===void 0&&(r={});var a=t.type._subType,l={};return Object.keys(r).forEach(function(s){l[s]=a.instantiate(t,s,void 0,r[s])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new hx(t,this.name)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){mv(r,t.unbox);var a=t.type;a.hookInitializers.forEach(function(l){var s=l(r);Object.keys(s).forEach(function(c){var f=s[c],E=jd(r,c,f);Vs(r,c,E)})}),Dp(r,this.willChange),zp(r,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return yv(t.storedValue)}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=t.storedValue.get(""+r);if(!a)throw new it("Not a child "+r);return a}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=ft(t.object),a=t.name;r.assertWritable({subpath:a});var l=r.type,s=l._subType;switch(t.type){case"update":{var c=t.newValue,f=t.object.get(a);if(c===f)return null;nl(s,c),t.newValue=s.reconcile(r.getChildNode(a),t.newValue,r,a),l.processIdentifier(a,t.newValue)}break;case"add":nl(s,t.newValue),t.newValue=s.instantiate(r,a,void 0,t.newValue),l.processIdentifier(a,t.newValue);break}return t}}),Object.defineProperty(i.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(this.identifierMode===Xl.YES&&r instanceof Ei){var a=r.identifier;if(a!==t)throw new it("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(a,"', but expected: '").concat(t,"'"))}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r={};return t.getChildren().forEach(function(a){r[a.subpath]=a.snapshot}),r}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r={};return Object.keys(t).forEach(function(a){r[a]=t[a].getSnapshot()}),r}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=ft(t.object);switch(t.type){case"update":return void r.emitPatch({op:"replace",path:Jl(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},r);case"add":return void r.emitPatch({op:"add",path:Jl(t.name),value:t.newValue.snapshot,oldValue:void 0},r);case"delete":var a=t.oldValue.snapshot;return t.oldValue.die(),void r.emitPatch({op:"remove",path:Jl(t.name),oldValue:a},r)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a){var l=t.storedValue;switch(a.op){case"add":case"replace":l.set(r,a.value);break;case"remove":l.delete(r);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){nl(this,r);var a=t.storedValue,l={};if(Array.from(a.keys()).forEach(function(c){l[c]=!1}),r)for(var s in r)a.set(s,r[s]),l[""+s]=!0;Object.keys(l).forEach(function(c){l[c]===!1&&a.delete(c)})}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this;return Gs(t)?Vp(Object.keys(t).map(function(l){return a._subType.validate(t[l],Bv(r,l,a._subType))})):Oi(r,t,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return bc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){t.storedValue.delete(r)}}),i}(mc);Pp.prototype.applySnapshot=tn(Pp.prototype.applySnapshot);function px(e){return new Pp("Map<string, ".concat(e.name,">"),e)}function gx(e){return hn(e)&&(e.flags&Mt.Map)>0}var Cp=function(e){Er(i,e);function i(t,r,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Array}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,r)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return Uv(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){r===void 0&&(r=[]);var a=t.type._subType,l={};return r.forEach(function(s,c){var f=""+c;l[f]=a.instantiate(t,f,void 0,s)}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=dn(dn({},$p),{name:this.name});return dr.array(d4(t),r)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){ja(r).dehancer=t.unbox;var a=t.type;a.hookInitializers.forEach(function(l){var s=l(r);Object.keys(s).forEach(function(c){var f=s[c],E=jd(r,c,f);Vs(r,c,E)})}),Dp(r,this.willChange),zp(r,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue.slice()}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=Number(r);if(a<t.storedValue.length)return t.storedValue[a];throw new it("Not a child: "+r)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=ft(t.object);r.assertWritable({subpath:""+t.index});var a=r.type._subType,l=r.getChildren();switch(t.type){case"update":{if(t.newValue===t.object[t.index])return null;var s=U2(r,a,[l[t.index]],[t.newValue],[t.index]);if(!s)return null;t.newValue=s[0]}break;case"splice":{var c=t.index,f=t.removedCount,E=t.added,_=U2(r,a,l.slice(c,c+f),E,E.map(function(w,b){return c+b}));if(!_)return null;t.added=_;for(var S=c+f;S<l.length;S++)l[S].setParent(r,""+(S+E.length-f))}break}return t}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.getChildren().map(function(r){return r.snapshot})}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=[];return Object.keys(t).forEach(function(a){r.push(t[a].getSnapshot())}),r}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=ft(t.object);switch(t.type){case"update":return void r.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},r);case"splice":if(t.removedCount&&t.addedCount===t.object.length)return void r.emitPatch({op:"replace",path:"",value:r.snapshot,oldValue:t.removed.map(function(l){return l.snapshot})},r);for(var a=t.removedCount-1;a>=0;a--)r.emitPatch({op:"remove",path:""+(t.index+a),oldValue:t.removed[a].snapshot},r);for(var a=0;a<t.addedCount;a++)r.emitPatch({op:"add",path:""+(t.index+a),value:t.added[a].snapshot,oldValue:void 0},r);return}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a){var l=t.storedValue,s=r==="-"?l.length:Number(r);switch(a.op){case"replace":l[s]=a.value;break;case"add":l.splice(s,0,a.value);break;case"remove":l.splice(s,1);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){nl(this,r);var a=t.storedValue;a.replace(r)}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this;return qv(t)?Vp(t.map(function(l,s){return a._subType.validate(l,Bv(r,""+s,a._subType))})):Oi(r,t,"Value is not an array")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return yc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){t.storedValue.splice(Number(r),1)}}),i}(mc);Cp.prototype.applySnapshot=tn(Cp.prototype.applySnapshot);function vx(e){return new Cp("".concat(e.name,"[]"),e)}function U2(e,i,t,r,a){for(var l=!0,s=0;;s++){var c=s<=r.length-1,f=t[s],E=c?r[s]:void 0,_=""+a[s];if(qE(E)&&(E=E.storedValue),!f&&!c)break;if(!c)l=!1,t.splice(s,1),f instanceof Ei&&f.createObservableInstanceIfNeeded(),f.die(),s--;else if(f)if(q2(f,E))t[s]=o0(i,e,_,E,f);else{for(var w=void 0,b=s;b<t.length;b++)if(q2(t[b],E)){w=t.splice(b,1)[0];break}l=!1;var S=o0(i,e,_,E,w);t.splice(s,0,S)}else{if(lr(E)&&ft(E).parent===e)throw new it("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 '".concat(e.path,"/").concat(_,"', but it lives already at '").concat(ft(E).path,"'"));l=!1;var S=o0(i,e,_,E);t.splice(s,0,S)}}return l?null:t}function o0(e,i,t,r,a){nl(e,r);function l(){if(lr(r)){var c=ft(r);if(c.assertAlive(bc),c.parent!==null&&c.parent===i)return c.setParent(i,t),c}return a?e.reconcile(a,r,i,t):e.instantiate(i,t,void 0,r)}var s=l();return a&&a!==s&&(a instanceof Ei&&a.createObservableInstanceIfNeeded(),a.die()),s}function q2(e,i){if(!e.isAlive)return!1;if(lr(i)){var t=ft(i);return t.isAlive&&t===e}if(e.snapshot===i)return!0;if(!(e instanceof Ei))return!1;var r=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&Gs(i)&&r.is(i)&&r.isMatchingSnapshotId(e,i)}function mx(e){return hn(e)&&(e.flags&Mt.Array)>0}var H2="preProcessSnapshot",G2="postProcessSnapshot";function yx(){return ft(this).toString()}var V2={name:"AnonymousModel",properties:{},initializers:yc};function bx(e){var i=Object.keys(e),t=new Set;return i.forEach(function(r){if(t.has(r))throw new it("".concat(r," is declared twice in the model. Model should not contain the same keys"));t.add(r)}),i.reduce(function(r,a){if(a in fn)throw new it("Hook '".concat(a,"' was defined as property. Hooks should be defined as part of the actions"));var l=Object.getOwnPropertyDescriptor(e,a);if("get"in l)throw new it("Getters are not supported as properties. Please use views instead");var s=l.value;if(s==null)throw new it("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(wc(s))r[a]=$s(Ox(s),s);else if(s instanceof Pp)r[a]=$s(s,{});else if(s instanceof Cp)r[a]=$s(s,[]);else if(!hn(s))throw new it("Invalid type definition for property '".concat(a,"', cannot infer a type from a value like '").concat(s,"' (").concat(typeof s,")"));return r},dn({},e))}var Dd=function(e){Er(i,e);function i(t){var r=e.call(this,t.name||V2.name)||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.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(a){return r.cloneAndEnhance({name:a})}}),Object.defineProperty(r,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return r.cloneAndEnhance({properties:a})}}),Object.defineProperty(r,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=r.preProcessor;return l?r.cloneAndEnhance({preProcessor:function(s){return l(a(s))}}):r.cloneAndEnhance({preProcessor:a})}}),Object.defineProperty(r,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=r.postProcessor;return l?r.cloneAndEnhance({postProcessor:function(s){return a(l(s))}}):r.cloneAndEnhance({postProcessor:a})}}),Object.assign(r,V2,t),r.properties=bx(r.properties),r.properties,r.propertyNames=Object.keys(r.properties),r.identifierAttribute=r._getIdentifierAttribute(),r}return Object.defineProperty(i.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=void 0;return this.forAllProps(function(r,a){if(a.flags&Mt.Identifier){if(t)throw new it("Cannot define property '".concat(r,"' as object identifier, property '").concat(t,"' is already defined as identifier property"));t=r}}),t}}),Object.defineProperty(i.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new i({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})}}),Object.defineProperty(i.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,a=function(l){return r.instantiateActions(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(!Gs(r))throw new it("actions initializer should return a plain object containing actions");Object.keys(r).forEach(function(a){if(a===H2)throw new it("Cannot define action '".concat(H2,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===G2)throw new it("Cannot define action '".concat(G2,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var l=r[a],s=t[a];if(a in fn&&s){var c=l;l=function(){s.apply(null,arguments),c.apply(null,arguments)}}var f=l.$mst_middleware,E=l.bind(r);E._isFlowAction=l._isFlowAction||!1,E.$mst_middleware=f;var _=jd(t,a,E);r[a]=_,Vs(t,a,_)})}}),Object.defineProperty(i.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;if(typeof t!="function")throw new it("You passed an ".concat(typeof t," to volatile state as an argument, when function is expected"));var a=function(l){return r.instantiateVolatileState(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(!Gs(r))throw new it("volatile state initializer should return a plain object containing state");bv(t,r)}}),Object.defineProperty(i.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,a=function(l){var s=t(l),c=s.actions,f=s.views,E=s.state,_=VS(s,["actions","views","state"]);for(var S in _)throw new it("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(S,"'"));return E&&r.instantiateVolatileState(l,E),f&&r.instantiateViews(l,f),c&&r.instantiateActions(l,c),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,a=function(l){return r.instantiateViews(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(!Gs(r))throw new it("views initializer should return a plain object containing views");Object.getOwnPropertyNames(r).forEach(function(a){var l,s=Object.getOwnPropertyDescriptor(r,a);if("get"in s)wv(t,a,s),_v(t,(l={},l[a]=Qs,l));else if(typeof s.value=="function")Vs(t,a,s.value);else throw new it("A view member should either be a function or getter based property")})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=lr(l)?l:this.applySnapshotPreProcessor(l);return Uv(this,t,r,a,s)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){r===void 0&&(r={});var a=t.type,l={};return a.forAllProps(function(s,c){l[s]=c.instantiate(t,s,void 0,r[s])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=dn(dn({},$p),{name:this.name});return dr.object(t,bc,r)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){Vs(r,"toString",yx),this.forAllProps(function(a){mv(r,a,t.unbox)}),this.initializers.reduce(function(a,l){return l(a)},r),Dp(r,this.willChange),zp(r,this.didChange)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=t,a=ft(r.object),l=r.name;a.assertWritable({subpath:l});var s=a.type.properties[l];return s&&(nl(s,r.newValue),r.newValue=s.reconcile(a.getChildNode(l),r.newValue,a,l)),r}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=t,a=ft(r.object),l=a.type.properties[r.name];if(l){var s=r.oldValue?r.oldValue.snapshot:void 0;a.emitPatch({op:"replace",path:Jl(r.name),value:r.newValue.snapshot,oldValue:s},a)}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,a=[];return this.forAllProps(function(l){a.push(r.getChildNode(t,l))}),a}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a;if(!(r in this.properties))throw new it("Not a value property: "+r);var l=ja(t.storedValue,r),s=(a=l.raw)===null||a===void 0?void 0:a.call(l);if(!s)throw new it("Node not available for property "+r);return s}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this;r===void 0&&(r=!0);var l={};return this.forAllProps(function(s,c){try{var f=po(t.storedValue,s);f.reportObserved()}catch{throw new it("".concat(s," property is declared twice"))}l[s]=a.getChildNode(t,s).snapshot}),r?this.applySnapshotPostProcessor(l):l}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r={};return Object.keys(t).forEach(function(a){r[a]=t[a].getSnapshot()}),this.applySnapshotPostProcessor(r)}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a){if(!(a.op==="replace"||a.op==="add"))throw new it("object does not support operation ".concat(a.op));t.storedValue[r]=a.value}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){nl(this,r);var a=this.applySnapshotPreProcessor(r);this.forAllProps(function(l){t.storedValue[l]=a[l]})}}),Object.defineProperty(i.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.preProcessor;return r?r.call(null,t):t}}),Object.defineProperty(i.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.postProcessor;return r?r.call(null,t):t}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.properties[t]}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this,l=this.applySnapshotPreProcessor(t);return Gs(l)?Vp(this.propertyNames.map(function(s){return a.properties[s].validate(l[s],Bv(r,s,a.properties[s]))})):Oi(r,l,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;this.propertyNames.forEach(function(a){return t(a,r.properties[a])})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;return"{ "+this.propertyNames.map(function(r){return r+": "+t.properties[r].describe()}).join("; ")+" }"}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return bc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){t.storedValue[r]=void 0}}),i}(mc);Dd.prototype.applySnapshot=tn(Dd.prototype.applySnapshot);function wx(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():"AnonymousModel",r=e.shift()||{};return new Dd({name:t,properties:r})}function _x(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string",r=t?e[0]:"AnonymousModel";return t&&e.shift(),e.reduce(function(a,l){return a.cloneAndEnhance({name:a.name+"_"+l.name,properties:l.properties,initializers:l.initializers,preProcessor:function(s){return l.applySnapshotPreProcessor(a.applySnapshotPreProcessor(s))},postProcessor:function(s){return l.applySnapshotPostProcessor(a.applySnapshotPostProcessor(s))}})}).named(r)}function w4(e){return hn(e)&&(e.flags&Mt.Object)>0}var ol=function(e){Er(i,e);function i(t,r,a,l){l===void 0&&(l=WE);var s=e.call(this,t)||this;return Object.defineProperty(s,"flags",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(s,"checker",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(s,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:l}),s.flags=r,s}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return us(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.initializer(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(wc(t)&&this.checker(t))return xi();var a=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return Oi(r,t,"Value is not a ".concat(a))}}),i}(iu),_4=new ol("string",Mt.String,function(e){return typeof e=="string"}),S4=new ol("number",Mt.Number,function(e){return typeof e=="number"}),Sx=new ol("integer",Mt.Integer,function(e){return YE(e)}),Ex=new ol("float",Mt.Float,function(e){return KE(e)}),xx=new ol("finite",Mt.Finite,function(e){return XE(e)}),E4=new ol("boolean",Mt.Boolean,function(e){return typeof e=="boolean"}),x4=new ol("null",Mt.Null,function(e){return e===null}),O4=new ol("undefined",Mt.Undefined,function(e){return e===void 0}),P4=new ol("Date",Mt.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});P4.getSnapshot=function(e){return e.storedValue.getTime()};var C4=P4;function Ox(e){switch(typeof e){case"string":return _4;case"number":return S4;case"boolean":return E4;case"object":if(e instanceof Date)return C4}throw new it("Cannot determine primitive type from value "+e)}function k4(e){return hn(e)&&(e.flags&(Mt.String|Mt.Number|Mt.Integer|Mt.Boolean|Mt.Date))>0}var Px=function(e){Er(i,e);function i(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:Mt.Literal}),r.value=t,r}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return us(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return wc(t)&&t===this.value?xi():Oi(r,t,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),i}(iu);function A4(e){return new Px(e)}function Cx(e){return hn(e)&&(e.flags&Mt.Literal)>0}var kx=function(e){Er(i,e);function i(t,r,a,l){var s=e.call(this,t)||this;return Object.defineProperty(s,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(s,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(s,"_message",{enumerable:!0,configurable:!0,writable:!0,value:l}),s}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Mt.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this._subtype.instantiate(t,r,a,l)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this._subtype.validate(t,r);if(a.length>0)return a;var l=lr(t)?ft(t).snapshot:t;return this._predicate(l)?xi():Oi(r,t,this._message(t))}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this._subtype.reconcile(t,r,a,l)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(al);function Ax(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():hn(e[0])?e[0].name:null,r=e[0],a=e[1],l=e[2]?e[2]:function(s){return"Value does not respect the refinement predicate"};return new kx(t,r,a,l)}function Tx(e){return hn(e)&&(e.flags&Mt.Refinement)>0}function Rx(e,i){var t=typeof e=="string"?i:e,r=Wp.apply(void 0,vo([],go(t.map(function(a){return A4(""+a)})),!1));return typeof e=="string"&&(r.name=e),r}var Mx=function(e){Er(i,e);function i(t,r,a){var l=e.call(this,t)||this;return Object.defineProperty(l,"_types",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(l,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),a=dn({eager:!0,dispatcher:void 0},a),l._dispatcher=a.dispatcher,a.eager||(l._eager=!1),l}return Object.defineProperty(i.prototype,"flags",{get:function(){var t=Mt.Union;return this._types.forEach(function(r){t|=r.flags}),t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._types.some(function(r){return r.isAssignableFrom(t)})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this.determineType(l,void 0);if(!s)throw new it("No matching type for union "+this.describe());return s.instantiate(t,r,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this.determineType(r,t.getReconciliationType());if(!s)throw new it("No matching type for union "+this.describe());return s.reconcile(t,r,a,l)}}),Object.defineProperty(i.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._dispatcher?this._dispatcher(t):r?r.is(t)?r:this._types.filter(function(a){return a!==r}).find(function(a){return a.is(t)}):this._types.find(function(a){return a.is(t)})}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(this._dispatcher)return this._dispatcher(t).validate(t,r);for(var a=[],l=0,s=0;s<this._types.length;s++){var c=this._types[s],f=c.validate(t,r);if(f.length===0){if(this._eager)return xi();l++}else a.push(f)}return l===1?xi():Oi(r,t,"No type is applicable for the union").concat(Vp(a))}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),i}(al);function Wp(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];var r=hn(e)?void 0:e,a=hn(e)?vo([e],go(i),!1):i,l="("+a.map(function(s){return s.name}).join(" | ")+")";return new Mx(l,a,r)}function T4(e){return hn(e)&&(e.flags&Mt.Union)>0}var Lx=function(e){Er(i,e);function i(t,r,a){var l=e.call(this,t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(l,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:a}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Mt.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){if(this.optionalValues.indexOf(l)>=0){var s=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,r,a,s)}return this._subtype.instantiate(t,r,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this._subtype.reconcile(t,this.optionalValues.indexOf(r)<0&&this._subtype.is(r)?r:this.getDefaultInstanceOrSnapshot(),a,l)}}),Object.defineProperty(i.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&nl(this,t),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this.optionalValues.indexOf(t)>=0?xi():this._subtype.validate(t,r)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(al);function Nx(e,i){if(typeof i!="function"&&lr(i))throw new it("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function $s(e,i,t){return Nx(e,i),new Lx(e,i,t||Ix)}var Ix=[void 0];function jx(e){return hn(e)&&(e.flags&Mt.Optional)>0}var Dx=$s(O4,void 0),Fx=$s(x4,null);function R4(e){return Wp(e,Dx)}function zx(e){return Wp(e,Fx)}var Bx=function(e){Er(i,e);function i(t,r){var a=e.call(this,t)||this;return Object.defineProperty(a,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a}return Object.defineProperty(i.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Mt.Late},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var r=void 0;try{r=this._definition()}catch(a){if(a instanceof ReferenceError)r=void 0;else throw a}if(t&&r===void 0)throw new it("Late type seems to be used too early, the definition (still) returns undefined");r&&(this._subType=r)}return this._subType}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this.getSubType(!0).instantiate(t,r,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this.getSubType(!0).reconcile(t,r,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this.getSubType(!1);return a?a.validate(t,r):xi()}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.getSubType(!1);return r?r.isAssignableFrom(t):!1}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t||Jw}}),i}(al);function Ux(e,i){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),r=typeof e=="string"?i:e;return new Bx(t,r)}function qx(e){return hn(e)&&(e.flags&Mt.Late)>0}function Hx(e,i){return new Gx(e,i)}var Gx=function(e){Er(i,e);function i(t,r){var a=e.call(this,t)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:dr.array()}),tv(function(){return a.pendingNodeList.length>0&&a.pendingNodeList.some(function(l){return l.isAlive&&a.options.shouldLoadPredicate(l.parent?l.parent.value:null)})},function(){a.options.loadType().then(tn(function(l){a.loadedType=l,a.pendingNodeList.forEach(function(s){s.parent&&a.loadedType&&s.parent.applyPatches([{op:"replace",path:"/".concat(s.subpath),value:s.snapshot}])})}))}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this;if(this.loadedType)return this.loadedType.instantiate(t,r,a,l);var c=us(this,t,r,a,l);return this.pendingNodeList.push(c),tv(function(){return!c.isAlive},function(){return s.pendingNodeList.splice(s.pendingNodeList.indexOf(c),1)}),c}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this.loadedType?this.loadedType.validate(t,r):p4(t)?xi():Oi(r,t,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return this.loadedType?(t.die(),this.loadedType.instantiate(a,l,a.environment,r)):e.prototype.reconcile.call(this,t,r,a,l)}}),i}(iu),M4=function(e){Er(i,e);function i(t){var r=e.call(this,t?"frozen(".concat(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:Mt.Frozen}),r}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){return us(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return p4(t)?this.subType?this.subType.validate(t,r):xi():Oi(r,t,"Value is not serializable and cannot be frozen")}}),i}(iu),$2=new M4;function Vx(e){return arguments.length===0?$2:hn(e)?new M4(e):$s($2,e)}function $x(e){return hn(e)&&(e.flags&Mt.Frozen)>0}function Wx(e){switch(e){case fn.beforeDestroy:return"destroy";case fn.beforeDetach:return"detach";default:return}}var Yx=function(){function e(i,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}),Vv(i))this.identifier=i;else if(lr(i)){var r=ft(i);if(!r.identifierAttribute)throw new it("Can only store references with a defined identifier attribute.");var a=r.unnormalizedIdentifier;if(a==null)throw new it("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new it("Can only store references to tree nodes or identifiers, got: '".concat(i,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=Oc(this.identifier),r=i.root,a=r.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==a){var l=this.targetType,s=r.identifierCache.resolve(l,t);if(!s)throw new Gv("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(i.path,")"));this.resolvedReference={node:s,lastCacheModification:a}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),Gv=function(e){Er(i,e);function i(t){var r=e.call(this,t)||this;return Object.setPrototypeOf(r,i.prototype),r}return i}(Error),L4=function(e){Er(i,e);function i(t,r){var a=e.call(this,"reference(".concat(t.name,")"))||this;return Object.defineProperty(a,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(a,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Reference}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.targetType.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return Vv(t)?xi():Oi(r,t,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(i.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=r.parent;if(!(!s||!s.isAlive)){var c=s.storedValue;c&&this.onInvalidated({cause:t,parent:c,invalidTarget:l?l.storedValue:void 0,invalidId:a,replaceRef:function(f){vc(r.root.storedValue,{op:"replace",value:f,path:r.path})},removeRef:function(){w4(s.type)?this.replaceRef(void 0):vc(r.root.storedValue,{op:"remove",path:r.path})}})}}}),Object.defineProperty(i.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var a=this,l=this.getValue(t);if(l){var s=ft(l),c=function(_,S){var w=Wx(S);w&&a.fireInvalidated(w,t,r,s)},f=s.registerHook(fn.beforeDetach,c),E=s.registerHook(fn.beforeDestroy,c);return function(){f(),E()}}}}),Object.defineProperty(i.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a){var l=this;if(this.onInvalidated){var s;t.registerHook(fn.beforeDestroy,function(){s&&s()});var c=function(f){s&&s();var E=t.parent,_=E&&E.storedValue;if(E&&E.isAlive&&_){var S=void 0;a?S=!!a.get(r,_):S=t.root.identifierCache.has(l.targetType,Oc(r)),S?s=l.addTargetNodeWatcher(t,r):f||l.fireInvalidated("invalidSnapshotReference",t,r,null)}};t.state===zn.FINALIZED?c(!0):(t.isRoot||t.root.registerHook(fn.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(fn.afterAttach,function(){c(!1)}))}}}),i}(iu),Kx=function(e){Er(i,e);function i(t,r){return e.call(this,t,r)||this}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var r=t.storedValue;return r.resolvedValue}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=t.storedValue;return r.identifier}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=lr(l)?Ww(l):l,c=new Yx(l,this.targetType),f=us(this,t,r,a,c);return c.node=f,this.watchTargetNodeForInvalidations(f,s,void 0),f}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){if(!t.isDetaching&&t.type===this){var s=lr(r),c=t.storedValue;if(!s&&c.identifier===r||s&&c.resolvedValue===r)return t.setParent(a,l),t}var f=this.instantiate(a,l,void 0,r);return t.die(),f}}),i}(L4),Xx=function(e){Er(i,e);function i(t,r,a){var l=e.call(this,t,a)||this;return Object.defineProperty(l,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),l}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var r=this.options.get(t.storedValue,t.parent?t.parent.storedValue:null);return r}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=lr(l)?this.options.set(l,t?t.storedValue:null):l,c=us(this,t,r,a,s);return this.watchTargetNodeForInvalidations(c,s,this.options),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=lr(r)?this.options.set(r,t?t.storedValue:null):r;if(!t.isDetaching&&t.type===this&&t.storedValue===s)return t.setParent(a,l),t;var c=this.instantiate(a,l,void 0,s);return t.die(),c}}),i}(L4);function N4(e,i){var t=i||void 0,r=i?i.onInvalidated:void 0;return t&&(t.get||t.set)?new Xx(e,{get:t.get,set:t.set},r):new Kx(e,r)}function Zx(e){return hn(e)&&(e.flags&Mt.Reference)>0}function Qx(e,i){var t=N4(e,dn(dn({},i),{onInvalidated:function(r){i&&i.onInvalidated&&i.onInvalidated(r),r.removeRef()}}));return i&&i.acceptsUndefined===!1?t:R4(t)}var I4=function(e){Er(i,e);function i(t,r){var a=e.call(this,t)||this;return Object.defineProperty(a,"validType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Identifier}),a}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){if(!t||!(t.type instanceof Dd))throw new it("Identifier types can only be instantiated as direct child of a model type");return us(this,t,r,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){if(t.storedValue!==r)throw new it("Tried to change identifier from '".concat(t.storedValue,"' to '").concat(r,"'. Changing identifiers is not allowed."));return t.setParent(a,l),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return typeof t!==this.validType?Oi(r,t,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):xi()}}),i}(iu),Jx=function(e){Er(i,e);function i(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Mt.Identifier}),t}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),i}(I4),eO=function(e){Er(i,e);function i(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),i}(I4),tO=new Jx,rO=new eO;function nO(e){return hn(e)&&(e.flags&Mt.Identifier)>0}function Oc(e){return""+e}function Vv(e){return typeof e=="string"||typeof e=="number"}function iO(e){return new aO(e)}var aO=function(e){Er(i,e);function i(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:Mt.Custom}),r}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(this.options.isTargetType(t))return xi();var a=this.options.getValidationMessage(t);return a?Oi(r,t,"Invalid value for type '".concat(this.name,"': ").concat(a)):xi()}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.options.toSnapshot(t.storedValue)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=this.options.isTargetType(l)?l:this.options.fromSnapshot(l,t&&t.root.environment);return us(this,t,r,a,s)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,a,l){var s=!this.options.isTargetType(r);if(!t.isDetaching){var c=t.type===this&&(s?r===t.snapshot:r===t.storedValue);if(c)return t.setParent(a,l),t}var f=s?this.options.fromSnapshot(r,a.root.environment):r,E=this.instantiate(a,l,void 0,f);return t.die(),E}}),i}(iu),W2={enumeration:Rx,model:wx,compose:_x,custom:iO,reference:N4,safeReference:Qx,union:Wp,optional:$s,literal:A4,maybe:R4,maybeNull:zx,refinement:Ax,string:_4,boolean:E4,number:S4,integer:Sx,float:Ex,finite:xx,Date:C4,map:px,array:vx,frozen:Vx,identifier:tO,identifierNumber:rO,late:Ux,lazy:Hx,undefined:O4,null:x4,snapshotProcessor:dx};const oO=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:dE,addMiddleware:i4,applyAction:e4,applyPatch:vc,applySnapshot:Gw,cast:vE,castFlowReturn:rx,castToReferenceSnapshot:yE,castToSnapshot:mE,clone:uE,createActionTrackingMiddleware:EE,createActionTrackingMiddleware2:OE,decorate:RE,destroy:fE,detach:cE,escapeJsonPath:Jl,flow:m4,getChildType:$S,getEnv:hE,getIdentifier:Ww,getLivelinessChecking:Uw,getMembers:gE,getNodeId:bE,getParent:JS,getParentOfType:tE,getPath:$w,getPathParts:rE,getPropertyMembers:Xw,getRelativePath:sE,getRoot:Vw,getRunningActionContext:zv,getSnapshot:jv,getType:Xd,hasEnv:pE,hasParent:QS,hasParentOfType:eE,isActionContextChildOf:NE,isActionContextThisOrChildOf:IE,isAlive:Dv,isArrayType:mx,isFrozenType:$x,isIdentifierType:nO,isLateType:qx,isLiteralType:Cx,isMapType:gx,isModelType:w4,isOptionalType:jx,isPrimitiveType:k4,isProtected:ZS,isReferenceType:Zx,isRefinementType:Tx,isRoot:nE,isStateTreeNode:lr,isType:hn,isUnionType:T4,isValidReference:lE,joinJsonPath:Op,onAction:t4,onPatch:Hw,onSnapshot:WS,process:VE,protect:KS,recordActions:AE,recordPatches:YS,resolveIdentifier:aE,resolvePath:iE,setLivelinessChecking:Bw,setLivelynessChecking:GS,splitJsonPath:_c,t:W2,toGenerator:ix,toGeneratorFunction:nx,tryReference:oE,tryResolve:Yw,typecheck:l4,types:W2,unescapeJsonPath:y4,unprotect:XS,walk:Kw},Symbol.toStringTag,{value:"Module"})),la=rs(oO);var l0={},Y2;function j4(){return Y2||(Y2=1,function(e){function i({oldText:t,newText:r,element:a}){if(!(r.length/Math.max(20,t.length)>=4))return a.fontSize;const l=a.width*a.page.computedHeight/r.length,s=1.5*Math.sqrt(l),c=a.fontSize;return Math.min(c,Math.max(5,Math.round(s)))}Object.defineProperty(e,"__esModule",{value:!0}),e.getLimitedFontSize=i}(l0)),l0}var K2;function D4(){return K2||(K2=1,function(e){var i=cd&&cd.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=T,e.getDir=I,e.usePrevious=Y;const t=i(Ar()),r=qi,a=mo,l=xc,s=oa,c=i(Hi()),f=qS,E=Wd(),_=ru(),S=Yd(),w=ls(),b=Fw(),y=Kd(),v=tu(),g=nu(),O=ss(),h=la,p=j4();c.default._fixTextRendering=!0;const m=document.createElement("style");m.type="text/css",document.head.appendChild(m);const x={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function N(D){var B="֑-߿יִ-﷽ﹰ-ﻼ";return new RegExp("^[^"+B+"]*?["+B+"]").test(D)}function T(D){D=D.replace(/\s/g,"");let B=0;for(var U=0;U<D.length;U++)N(D[U])&&(B+=1);return B>D.length/2}function I(D){return T(D)?"rtl":"ltr"}const R=(0,r.observer)(({textNodeRef:D,element:B,onBlur:U,selectAll:W,cursorPosition:ee})=>{const[ne,te]=t.default.useState(x),Z=D.current;t.default.useLayoutEffect(()=>{const le={};le.width=Z.width()-2*Z.padding()+"px",le.height=Z.height()-2*Z.padding()+Z.fontSize()*Z.lineHeight()+"px",le.fontSize=Z.fontSize()+"px",le.lineHeight=Z.lineHeight()+.01,le.fontFamily=Z.fontFamily(),le.textAlign=Z.align(),le.color=Z.fill(),le.fontWeight=B.fontWeight,le.fontStyle=B.fontStyle,le.letterSpacing=B.letterSpacing+"em";const ue=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${ne.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;m.innerHTML="",m.appendChild(document.createTextNode(ue)),JSON.stringify(le)!==JSON.stringify(ne)&&te(le)});const ae=t.default.useRef(null);t.default.useLayoutEffect(()=>{var le;const ue=ae.current;if(!ue)return;(le=ae.current)===null||le===void 0||le.focus();const he=ee||ue.value.length;ue.selectionStart=ue.selectionEnd=he,W&&(ue==null||ue.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",U);const le=ue=>{var he;!((he=ae.current)===null||he===void 0)&&he.contains(ue.target)||U()};return window.addEventListener("touchstart",le),()=>{window.removeEventListener("blur",U),window.removeEventListener("touchstart",le)}},[]);let H=0;const J=Z.textArr.length*Z.lineHeight()*Z.fontSize();B.verticalAlign==="middle"&&(H=(B.a.height-J)/2),B.verticalAlign==="bottom"&&(H=B.a.height-J);const ie=(0,b.removeTags)(B.text);return t.default.createElement("textarea",{className:"polotno-input",ref:ae,dir:I(ie),style:Object.assign(Object.assign(Object.assign({},x),ne),{paddingTop:H+"px"}),value:ie,onChange:le=>{const ue=(0,p.getLimitedFontSize)({oldText:B.text,newText:le.target.value,element:B});B.set({text:le.target.value,fontSize:ue})},placeholder:B.placeholder,onBlur:U})}),C=D=>t.default.createElement(l.Html,null,t.default.createElement(R,Object.assign({},D))),M=D=>{const[B,U]=t.default.useState(!1),W=t.default.useRef(!1);return t.default.useEffect(()=>{var ee=!0;return setTimeout(()=>{ee&&(D._editModeEnabled&&(W.current=!0),U(!0),setTimeout(()=>{W.current=!1},50))},50),()=>{ee=!1}},[]),{editorEnabled:B&&D._editModeEnabled,selectAll:W.current}},k=(D,B)=>{const[U,W]=t.default.useReducer(ne=>ne+1,0),ee=t.default.useRef((0,S.isFontLoaded)(B));return t.default.useLayoutEffect(()=>{if(ee.current=(0,S.isFontLoaded)(B),ee.current)return;let ne=!0;return(async()=>{ee.current=!1,W();const te=(0,_.incrementLoader)(`text ${B}`);await D.loadFont(B),setTimeout(te,100),ne&&(ee.current=!0,W())})(),()=>{ne=!1}},[B]),[ee.current]};e.useFontLoader=k;const A=({fontLoaded:D,fontFamily:B,fontSize:U,lineHeight:W})=>t.default.useMemo(()=>{if(typeof W=="number")return W;const ee=document.createElement("div");ee.style.fontFamily=B,ee.style.fontSize=U+"px",ee.style.lineHeight=W,ee.innerText="Test text",document.body.appendChild(ee);const ne=ee.offsetHeight;return document.body.removeChild(ee),ne/U},[D,B,U,W]);function L(D){var B=D.getAbsoluteTransform().copy();B.invert();var U=D.getStage().getPointerPosition();return B.point(U)}function z(D){var B;const U=D.target,W=L(U),ee=U.textArr,ne=Math.floor(W.y/(U.fontSize()*U.lineHeight())),te=ee.slice(0,ne).reduce((H,J)=>H+J.text.length,ne),Z=(B=ee[ne])!==null&&B!==void 0?B:ee[0];let ae=0;return U.align()==="right"?ae=U.width()-Z.width:U.align()==="center"&&(ae=U.width()/2-Z.width/2),te+Math.round((W.x-ae)/Z.width*Z.text.length)}function Y(D){const B=t.default.useRef(D),U=t.default.useRef(D);return t.default.useMemo(()=>{U.current=B.current,B.current=D},[D]),U.current}function $(D){return/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(D)}function X(D,B,U=!1){const W=D.fontSize(),ee=D.height(),ne=(0,b.removeTags)(B.text);let te=B.a.fontSize;D.height(void 0);const Z=Math.round(2*B.a.fontSize)-1;for(let ae=1;ae<Z;ae++){const H=B.a.height&&D.height()>B.a.height;let J=ne.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((ue,he)=>$(he)?ue.concat(he.split("")):ue.concat(he),[]),ie=D.textArr.map(ue=>ue.text).join(";");const le=J.find(ue=>!ie.includes(ue)||(ie=ie.replace(ue,""),!1));if(!(H||le&&!U))break;te-=.5,D.fontSize(te)}return D.fontSize(W),D.height(ee),te}function q({lines:D,lineHeight:B,width:U,align:W="left",padding:ee=0,cornerRadius:ne=0}){var te;D.forEach((J,ie)=>{J.cx=U/2,W==="right"?J.cx=U-J.width/2:W==="left"&&(J.cx=J.width/2),W!=="justify"||J.lastInParagraph||(J.width=U),W==="justify"&&(J.cx=J.width/2)});let Z=`M ${(te=D[0])===null||te===void 0?void 0:te.cx} ${-ee}`;D.forEach((J,ie)=>{const{cx:le}=J,ue=D[ie-1];ue&&ue.width>J.width?Z+=` L ${le+J.width/2+ee} ${ie*B+ee}`:Z+=` L ${le+J.width/2+ee} ${ie*B-ee}`;const he=D[ie+1];he&&he.width>J.width?Z+=` L ${le+J.width/2+ee} ${(ie+1)*B-ee}`:Z+=` L ${le+J.width/2+ee} ${(ie+1)*B+ee}`});for(var ae=D.length-1;ae>=0;ae--){const J=D[ae],{cx:ie}=J,le=D[ae+1];le&&le.width>J.width?Z+=` L ${ie-J.width/2-ee} ${(ae+1)*B-ee}`:Z+=` L ${ie-J.width/2-ee} ${(ae+1)*B+ee}`;const ue=D[ae-1];ue&&ue.width>J.width?Z+=` L ${ie-J.width/2-ee} ${ae*B+ee}`:Z+=` L ${ie-J.width/2-ee} ${ae*B-ee}`}Z+=" Z";const H=(0,f.parsePath)(Z);return(0,f.roundCommands)(H,ne).path}e.getLineHeight=A,e.TextElement=(0,r.observer)(({element:D,store:B})=>{const U=t.default.useRef(null),W=t.default.useRef(null),{editorEnabled:ee,selectAll:ne}=M(D),[te,Z]=t.default.useState(!1),[ae,H]=t.default.useState(!1),J=t.default.useRef(D.a.height),ie=B.selectedShapes.indexOf(D)>=0,{textVerticalResizeEnabled:le}=w.flags,ue=Y(D.fontFamily),[he,ye]=t.default.useState([]);t.default.useEffect(()=>{var $e,Xe;const De=(Xe=($e=U.current)===null||$e===void 0?void 0:$e.textArr)!==null&&Xe!==void 0?Xe:[];JSON.stringify(De)!==JSON.stringify(he)&&ye(De)}),t.default.useEffect(()=>{if(D.a.width)return;const $e=U.current;$e.width(600),D.set({width:1.4*$e.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,s.autorun)(()=>{const $e=U.current;(0,y.applyFilter)($e,D)}));const[Ce]=(0,e.useFontLoader)(B,D.fontFamily),pe=(0,b.removeTags)(D.text),fe=()=>{const $e=U.current.clone({height:void 0}),Xe=Math.ceil($e.fontSize()*$e.lineHeight()*$e.textArr.length+1);return $e.destroy(),Xe};t.default.useLayoutEffect(()=>{if(!Ce)return;const{textOverflow:$e,textSplitAllowed:Xe}=w.flags;if(D.a.height){if(!B.isPlaying)if($e!=="change-font-size"||ae){if($e==="resize"){const De=fe();le&&D.a.height<De&&B.history.ignore(()=>{var Ye;(0,h.isAlive)(D)&&D.set({height:De}),(Ye=U.current)===null||Ye===void 0||Ye.height(De)},!1,!0),le||D.a.height===De||B.history.ignore(()=>{var Ye;(0,h.isAlive)(D)&&D.set({height:De}),(Ye=U.current)===null||Ye===void 0||Ye.height(De)},!1,!0)}}else{const De=X(U.current,D,Xe);if(De!==D.a.fontSize)return void B.history.ignore(()=>{D.set({fontSize:De})},!1,!0);const Ye=fe();D.a.height===Ye||le||B.history.ignore(()=>{D.set({height:Ye})},!1,!0)}}else{const De=fe();B.history.ignore(()=>{D.set({height:De})},!1,!0)}}),t.default.useLayoutEffect(()=>{const $e=U.current;$e&&($e.width($e.width()+1e-8),$e._setTextData(),(0,y.applyFilter)($e,D))},[Ce]);const ve=t.default.useRef(null),xe=t.default.useRef(0),Te=$e=>{$e.evt.preventDefault(),B.selectedShapes.find(De=>De===D)&&D.contentEditable&&(xe.current=z($e),D.toggleEditMode())},ce=!pe&&D.placeholder?.6:D.a.opacity;(0,v.useFadeIn)(U,ce);const me=(0,e.getLineHeight)({fontLoaded:Ce,fontFamily:D.fontFamily,fontSize:D.a.fontSize,lineHeight:D.lineHeight}),Oe=D.selectable||B.role==="admin",Ne=(0,E.useColor)(D),tt=t.default.useMemo(()=>D.backgroundEnabled?q({lines:JSON.parse(JSON.stringify(he)),cornerRadius:D.backgroundCornerRadius*(D.a.fontSize*me*.5),lineHeight:me*D.a.fontSize,padding:D.backgroundPadding*(D.a.fontSize*me*.5),width:D.a.width,align:D.align}):"",[D.backgroundEnabled,D.backgroundCornerRadius,D.a.fontSize,me,D.backgroundPadding,D.a.width,D.align,he]),rt=(0,O.isTouchDevice)();let He=0;return D.verticalAlign==="middle"?He=(D.a.height-he.length*me*D.a.fontSize)/2:D.verticalAlign==="bottom"&&(He=D.a.height-he.length*me*D.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:W,x:D.a.x,y:D.a.y,rotation:D.a.rotation,hideInExport:!D.showInExport,listening:!1,visible:D.backgroundEnabled,opacity:D.backgroundOpacity*ce,data:tt,fill:D.backgroundColor,offsetY:-He}),t.default.createElement(a.Text,Object.assign({ref:U,id:D.id,name:"element",hideInExport:!D.showInExport,editModeEnabled:D._editModeEnabled,x:D.a.x,y:D.a.y,rotation:D.a.rotation,width:D.a.width,height:D.a.height,text:pe||D.placeholder,direction:I(pe)},Ne,{stroke:D.stroke,lineJoin:"round",strokeWidth:D.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:D.a.fontSize,fontFamily:`"${D.fontFamily}", "${ue}"`,fontStyle:D.fontStyle+" "+D.fontWeight,textDecoration:D.textDecoration,align:D.align,verticalAlign:D.verticalAlign,draggable:rt?D.draggable&&ie:D.draggable,preventDefault:!rt||ie,opacity:ce,visible:!D._editModeEnabled,ellipsis:w.flags.textOverflow==="ellipsis",shadowEnabled:D.shadowEnabled,shadowBlur:D.shadowBlur,shadowOffsetX:D.shadowOffsetX,shadowOffsetY:D.shadowOffsetY,shadowColor:D.shadowColor,shadowOpacity:D.shadowOpacity,lineHeight:me,letterSpacing:D.letterSpacing*D.a.fontSize,listening:Oe,onDragMove:$e=>{D.set({x:$e.target.x(),y:$e.target.y()})},onDragEnd:$e=>{D.set({x:$e.target.x(),y:$e.target.y()})},onMouseEnter:()=>{Z(!0)},onMouseLeave:()=>{Z(!1)},onClick:Te,onTap:Te,onTransformStart:()=>{H(!0),J.current=U.current.height()},onTransform:$e=>{var Xe,De;const Ye=$e.target;(Xe=W.current)===null||Xe===void 0||Xe.setAttrs({x:Ye.x(),y:Ye.y(),rotation:Ye.rotation(),scale:Ye.scale()});const lt=((De=Ye.getStage())===null||De===void 0?void 0:De.findOne("Transformer")).getActiveAnchor();if(lt==="middle-left"||lt==="middle-right"){const wt=Ye.scaleX(),zt=Ye.width()*wt,_e=D.a.fontSize;let Se=zt;zt<_e&&(Se=_e,ve.current&&Ye.position(ve.current)),Ye.width(Se),Ye.scaleX(1),Ye.scaleY(1);const xt=fe();if(w.flags.textOverflow!=="ellipsis"){const ht=Math.max(xt,J.current);Ye.height(ht),D.set({height:Ye.height()})}D.set({x:Ye.x(),y:Ye.y(),width:Ye.width(),rotation:Ye.rotation()}),(0,y.applyFilter)(Ye,D)}if(lt==="top-center"||lt==="bottom-center"){let wt=w.flags.textOverflow==="resize"?fe():me*D.a.fontSize;$e.target.height(Math.max(wt,$e.target.height()*$e.target.scaleY())),$e.target.scaleY(1)}ve.current=$e.target.position()},onTransformEnd:$e=>{var Xe;const De=$e.target.scaleX();$e.target.scaleX(1),$e.target.scaleY(1),D.set({fontSize:Math.round(D.a.fontSize*De),width:Math.ceil($e.target.width()*De),x:$e.target.x(),y:$e.target.y(),rotation:$e.target.rotation(),height:$e.target.height()*De,shadowBlur:D.shadowBlur*De,shadowOffsetX:D.shadowOffsetX*De,shadowOffsetY:D.shadowOffsetY*De,strokeWidth:D.strokeWidth*De}),(Xe=W.current)===null||Xe===void 0||Xe.setAttrs({scaleX:1,scaleY:1}),H(!1)}})),ee&&t.default.createElement(a.Group,{x:D.a.x,y:D.a.y,rotation:D.a.rotation},t.default.createElement(C,{textNodeRef:U,element:D,selectAll:ne,cursorPosition:xe.current,onBlur:()=>{D.toggleEditMode(!1)}})),!ae&&(te||ie)&&t.default.createElement(g.Highlighter,{element:D}))})}(cd)),cd}var Oa={},vd={},s0={exports:{}},u0={exports:{}},X2;function $v(){return X2||(X2=1,function(e,i){e.exports=t;function t(a){return r.bind(null,a)}function r(a){var l=[].slice.call(arguments,1);l.unshift("["+a+"]"),process.stderr.write(l.join(" ")+`
|
|
102
|
-
`)}}(u0)),u0.exports}var Z2;function F4(){return Z2||(Z2=1,function(e,i){$v()("lex"),e.exports=t;function t(r){var a="",l,s=0,c=-1,f=0,E=1,_="before-selector",S=[_],w={},b=[],y=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function v(){return I(),r[c]}function g($){return $?S[S.length-1-$]:_}function O($){var X=c+1;return $===r.slice(X,X+$.length)}function h($){var X=r.slice(c).indexOf($);return X>0?X:!1}function p($){return $===m(1)}function m($){return r[c+($||1)]}function x(){var $=S.pop();return _=S[S.length-1],$}function N($){return _=$,S.push(_),S.length}function T($){var X=_;return S[S.length-1]=_=$,X}function I($){if(($||1)==1)r[c]==`
|
|
103
|
-
`?(E++,s=1):s++,c++;else{var X=r.slice(c,c+$).split(`
|
|
104
|
-
`);X.length>1&&(E+=X.length-1,s=1),s+=X[X.length-1].length,c=c+$}}function R(){w.end={line:E,col:s},b.push(w),a="",w={}}function C($){w={type:$,start:{line:E,col:s}}}for(;l=v();)switch(l){case" ":switch(g()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":a+=l;break}break;case`
|
|
105
|
-
`:case" ":case"\r":case"\f":switch(g()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":a+=l;break;case"at-value":l===`
|
|
106
|
-
`&&(w.value=a.trim(),R(),x());break}break;case":":switch(g()){case"name":w.name=a.trim(),a="",T("before-value");break;case"before-selector":a+=l,C("selector"),N("selector");break;case"before-value":T("value"),a+=l;break;default:a+=l;break}break;case";":switch(g()){case"name":case"before-value":case"value":a.trim().length>0&&(w.value=a.trim(),R()),T("before-name");break;case"value-paren":a+=l;break;case"at-value":w.value=a.trim(),R(),x();break;case"before-name":break;default:a+=l;break}break;case"{":switch(g()){case"selector":if(m(-1)==="\\"){a+=l;break}w.text=a.trim(),R(),T("before-name"),f=f+1;break;case"at-group":switch(w.name=a.trim(),w.type){case"font-face":case"viewport":case"page":N("before-name");break;default:N("before-selector")}R(),f=f+1;break;case"name":case"at-rule":w.name=a.trim(),R(),N("before-name"),f=f+1;break;case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":T("value"),a+=l;break}break;case"}":switch(g()){case"before-name":case"name":case"before-value":case"value":a&&(w.value=a.trim()),w.name&&w.value&&R(),C("end"),R(),x(),g()==="at-group"&&(C("at-group-end"),R(),x()),f>0&&(f=f-1);break;case"at-group":case"before-selector":case"selector":if(m(-1)==="\\"){a+=l;break}f>0&&g(1)==="at-group"&&(C("at-group-end"),R()),f>1&&x(),f>0&&(f=f-1);break;case"double-string":case"single-string":case"comment":a+=l;break}break;case'"':case"'":switch(g()){case"double-string":l==='"'&&m(-1)!=="\\"&&x();break;case"single-string":l==="'"&&m(-1)!=="\\"&&x();break;case"before-at-value":T("at-value"),N(l==='"'?"double-string":"single-string");break;case"before-value":T("value"),N(l==='"'?"double-string":"single-string");break;case"comment":break;default:m(-1)!=="\\"&&N(l==='"'?"double-string":"single-string")}a+=l;break;case"/":switch(g()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":case"selector":case"name":case"value":if(p("*")){var M=h("*/");M&&I(M+1)}else g()=="before-value"&&T("value"),a+=l;break;default:p("*")?(C("comment"),N("comment"),I()):a+=l;break}break;case"*":switch(g()){case"comment":p("/")?(w.text=a,I(),R(),x()):a+=l;break;case"before-selector":a+=l,C("selector"),N("selector");break;case"before-value":T("value"),a+=l;break;default:a+=l}break;case"@":switch(g()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":T("value"),a+=l;break;default:for(var k=!1,A,L,z=0,Y=y.length;!k&&z<Y;++z)L=y[z],A=L.name||L,O(A)&&(k=!0,C(A),N(L.state||"at-group"),I(A.length),L.prefix&&(w.prefix=L.prefix),L.type&&(w.type=L.type));k||(a+=l);break}break;case"(":switch(g()){case"value":N("value-paren");break;case"before-value":T("value");break}a+=l;break;case")":switch(g()){case"value-paren":x();break;case"before-value":T("value");break}a+=l;break;default:switch(g()){case"before-selector":C("selector"),N("selector");break;case"before-name":C("property"),T("name");break;case"before-value":T("value");break;case"before-at-value":T("at-value");break}a+=l;break}return b}}(s0)),s0.exports}var c0={exports:{}},Q2;function lO(){return Q2||(Q2=1,function(e,i){$v()("parse");var t=F4();e.exports=c;var r,a,l,s;function c(x,N){N||(N={}),r=!!N.comments,l=!!N.position,a=0,s=Array.isArray(x)?x.slice():t(x);for(var T,I=[],R;R=E();)T=O(R),T&&I.push(T);return{type:"stylesheet",stylesheet:{rules:I}}}function f(x,N){N||(N={});for(var T,I=["type","name","value"],R={},C=0;C<I.length;++C)T=I[C],x[T]&&(R[T]=N[T]||x[T]);for(I=Object.keys(N),C=0;C<I.length;++C)T=I[C],R[T]||(R[T]=N[T]);return l&&(R.position={start:x.start,end:x.end}),R}function E(){var x=s.shift();return x}function _(x){a=a+1;var N={};switch(x.type){case"font-face":case"viewport":N.declarations=p();break;case"page":N.prefix=x.prefix,N.declarations=p();break;default:N.prefix=x.prefix,N.rules=m()}return f(x,N)}function S(x){return f(x)}function w(x){return f(x)}function b(x){return f(x,{text:x.text})}function y(x){return f(x)}function v(x){return f(x)}function g(x){function N(T){return T.trim()}return f(x,{type:"rule",selectors:x.text.split(",").map(N),declarations:p()})}function O(x){switch(x.type){case"property":return v(x);case"selector":return g(x);case"at-group-end":a=a-1;return;case"media":case"keyframes":return _(x);case"comment":if(r)return b(x);break;case"charset":return w(x);case"import":return S(x);case"namespace":return y(x);case"font-face":case"supports":case"viewport":case"document":case"page":return _(x)}}function h(x){for(var N,T=[],I;(I=E())&&x&&x(I);)N=O(I),N&&T.push(N);return I&&I.type!=="end"&&s.unshift(I),T}function p(){return h(function(x){return x.type==="property"||x.type==="comment"})}function m(){return h(function(){return a})}}(c0)),c0.exports}var f0={exports:{}},J2;function sO(){return J2||(J2=1,function(e,i){$v()("stringify");var t,r,a,l,s,c;e.exports=f;function f(m,x){x||(x={}),a=x.indentation||"",r=!!x.compress,t=!!x.comments,l=1,r?s=c="":(s=`
|
|
107
|
-
`,c=" ");var N=y(m.stylesheet.rules,h).join(`
|
|
108
|
-
`).trim();return N}function E(m){if(m){l+=m;return}return r?"":Array(l).join(a||"")}function _(m){return"@"+m.type+" "+m.value+";"+s}function S(m){var x="",N=m.prefix||"";m.name&&(x=" "+m.name);var T=m.type!=="page";return"@"+N+m.type+x+c+v(m,T)+s}function w(m){return t?"/*"+(m.text||"")+"*/"+s:""}function b(m){var x;return m.selectors?x=m.selectors.join(","+s):(x="@"+m.type,x+=m.name?" "+m.name:""),E()+x+c+v(m)+s}function y(m,x){return m.reduce(function(N,T){var I=T.type==="comment"?w(T):x(T);return I&&N.push(I),N},[])}function v(m,x){var N=m.declarations,T=O;return m.rules&&(N=m.rules,T=b),N=g(N,T),N&&(N=s+N+(x?"":s)),"{"+N+E()+"}"}function g(m,x){if(!m)return"";E(1);var N=y(m,x);return E(-1),N.length?N.join(s):""}function O(m){if(m.type==="property")return p(m)}function h(m){switch(m.type){case"rule":return b(m);case"media":case"keyframes":return S(m);case"comment":return w(m);case"import":case"charset":case"namespace":return _(m);case"font-face":case"supports":case"viewport":case"document":case"page":return S(m)}}function p(m){var x=m.name?m.name+":"+c:"";return E()+x+m.value+";"}}(f0)),f0.exports}var d0,eb;function uO(){return eb||(eb=1,d0={lex:F4(),parse:lO(),stringify:sO()}),d0}var tb;function Zd(){return tb||(tb=1,function(e){var i=vd&&vd.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=S,e.urlToString=w,e.getColors=b,e.svgToURL=y,e.getSvgSize=v,e.fixSize=g,e.replaceColors=p;const t=i(Hi()),r=i(Ar()),a=Iv(),l=i(uO());function s(x){for(;x.parentNode;){if(x.nodeName==="defs")return!0;x=x.parentNode}return!1}function c(x){const N={};return x.querySelectorAll("style").forEach(T=>{const I=l.default.parse(T.textContent).stylesheet.rules;for(let R of I)R.selectors&&R.selectors.forEach(C=>{const M=N[C]||{};R.declarations.forEach(k=>{M[k.name]=k.value}),N[C]=M})}),N}function f(x,N){var T;const I={fill:"",stroke:""},R=((T=x.getAttribute("class"))===null||T===void 0?void 0:T.split(" "))||[],C=x.getAttribute("id");let M={};if(C&&N[`#${C}`]?M=N[`#${C}`]:R.forEach(k=>{N[`.${k}`]&&(M=Object.assign(Object.assign({},M),N[`.${k}`]))}),N[x.nodeName]&&(M=Object.assign(Object.assign({},M),N[x.nodeName])),x.getAttribute("fill")&&x.getAttribute("fill")!=="none"?I.fill=x.getAttribute("fill"):M.fill&&M.fill!=="none"&&(I.fill=M.fill),x.getAttribute("stroke")&&x.getAttribute("stroke")!=="none"?I.stroke=x.getAttribute("stroke"):M.stroke&&M.stroke!=="none"&&(I.stroke=M.stroke),!I.fill&&x.style.fill&&x.style.fill!=="none"&&(I.fill=x.style.fill),!I.stroke&&x.style.stroke&&x.style.stroke!=="none"&&(I.stroke=x.style.stroke),!I.stroke&&!I.fill){const k=x.ownerSVGElement,A=k&&k!==x&&f(k,N);(A==null?void 0:A.fill)==="currentColor"||(A==null?void 0:A.stroke)==="currentColor"||(I.fill="black")}return I}const E=["path","rect","circle","line","polygon","polyline","ellipse","text"];function _(x){for(var N=[],T=x.getElementsByTagName("*"),I=0,R=T.length;I<R;I++){const C=T[I];s(C)||(C.getAttribute("fill")!==null&&N.push(C),(C.getAttribute("stroke")!==null||C.style&&C.style.fill||E.indexOf(C.nodeName)>=0)&&N.push(C))}return N}async function S(x){const N=await fetch(x);return y(await N.text())}async function w(x){return await(await fetch(x,{mode:"cors"})).text()}function b(x){var N=new DOMParser().parseFromString(x,"image/svg+xml");const T=c(N),I=_(N),R=[];return I.forEach(C=>{const{fill:M,stroke:k}=f(C,T);[M,k].forEach(A=>{A&&(A==="currentColor"&&(A="black"),t.default.Util.colorToRGBA(A)&&R.indexOf(A)===-1&&R.push(A))})}),R}function y(x){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(x)))}async function v(x){const N=await w(x),T=new DOMParser().parseFromString(N,"image/svg+xml").documentElement.getAttribute("viewBox"),[I,R,C,M]=(T==null?void 0:T.split(" "))||[];return{width:parseFloat(C),height:parseFloat(M)}}function g(x){var N=new DOMParser().parseFromString(x,"image/svg+xml");const T=N.documentElement.getAttribute("viewBox"),[I,R,C,M]=(T==null?void 0:T.split(" "))||[],k=N.documentElement.getAttribute("width");!k&&N.documentElement.setAttribute("width",C+"px");const A=N.documentElement.getAttribute("height");if((!A||A.indexOf("%")>=0)&&N.documentElement.setAttribute("height",M+"px"),k&&k.indexOf("%")>=0&&A&&A.indexOf("%")===-1){const L=parseFloat(A)/parseFloat(M);N.documentElement.setAttribute("width",L*parseFloat(C)+"px")}if(A&&A.indexOf("%")>=0&&k&&k.indexOf("%")===-1){const L=parseFloat(k)/parseFloat(C);N.documentElement.setAttribute("height",L*parseFloat(M)+"px")}return k==="100%"&&A==="100%"&&(N.documentElement.setAttribute("width",C+"px"),N.documentElement.setAttribute("height",M+"px")),new XMLSerializer().serializeToString(N)}const O=(x,N)=>{if(!x||!N)return!1;if(N==="currentColor"&&x==="black")return!0;const T=t.default.Util.colorToRGBA(x),I=t.default.Util.colorToRGBA(N);return T&&I?T.r===I.r&&T.g===I.g&&T.b===I.b&&T.a===I.a:void 0};function h(x,N,T,I){var R=x.namespaceURI,C=document.createElementNS(R,"linearGradient");const M=t.default.Util.degToRad(T+90),k=(Math.cos(M)+1)/2,A=(Math.sin(M)+1)/2,L=(Math.cos(M+Math.PI)+1)/2,z=(Math.sin(M+Math.PI)+1)/2;C.setAttribute("x1",100*k+"%"),C.setAttribute("y1",100*A+"%"),C.setAttribute("x2",100*L+"%"),C.setAttribute("y2",100*z+"%"),C.setAttribute("gradientUnits","userSpaceOnUse"),C.setAttribute("id",N);for(var Y=0;Y<I.length;Y++){var $=I[Y],X=document.createElementNS(R,"stop");for(var q in $)$.hasOwnProperty(q)&&X.setAttribute(q,$[q]);C.appendChild(X)}return(x.querySelector("defs")||x.insertBefore(document.createElementNS(R,"defs"),x.firstChild)).appendChild(C)}function p(x,N){var T=new DOMParser().parseFromString(x,"image/svg+xml");const I=_(T),R=Array.from(N.keys()),C=c(T);return I.forEach(M=>{const{fill:k,stroke:A}=f(M,C);[{prop:"fill",color:k},{prop:"stroke",color:A}].forEach(({prop:L,color:z})=>{const Y=R.find($=>(0,e.sameColors)($,z));if(Y){const $=N.get(Y);if((0,a.isGradient)($)){const{rotation:X,stops:q}=(0,a.parseColor)($),D=q.map(U=>({offset:100*U.offset+"%","stop-color":U.color})),B="color"+Math.round(1e8*Math.random());h(T.children[0],B,X,D),M.style[L]=null,M.setAttribute(L,`url('#${B}')`)}else M.style[L]=N.get(Y)}})}),y(new XMLSerializer().serializeToString(T))}e.sameColors=O;const m=x=>{const[N,T]=r.default.useState([]);return r.default.useEffect(()=>{let I=!1;return(async()=>{T([]);const R=b(await w(x));I||T(R)})(),()=>{I=!0}},[x]),N};e.useSvgColors=m}(vd)),vd}var h0={},rb;function z4(){return rb||(rb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trySetCanvasSize=void 0;const i=(t,r,a)=>{let l=r,s=a,c=1;for(;l>0&&s>0;){t.width=l,t.height=s;const f=t.getContext("2d");if(!f)return;if(f.fillStyle="rgba(0,0,0,0.1)",f.fillRect(0,0,1,1),f.getImageData(0,0,1,1).data[3]!==0)return void f.clearRect(0,0,t.width,t.height);if(c*=.9,l=Math.floor(r*c),s=Math.floor(a*c),l=Math.max(l,1),s=Math.max(s,1),l<=1&&s<=1)return t.width=1,void(t.height=1)}};e.trySetCanvasSize=i}(h0)),h0}var nb;function Wv(){return nb||(nb=1,function(e){var i=Oa&&Oa.__createBinding||(Object.create?function(H,J,ie,le){le===void 0&&(le=ie);var ue=Object.getOwnPropertyDescriptor(J,ie);ue&&!("get"in ue?!J.__esModule:ue.writable||ue.configurable)||(ue={enumerable:!0,get:function(){return J[ie]}}),Object.defineProperty(H,le,ue)}:function(H,J,ie,le){le===void 0&&(le=ie),H[le]=J[ie]}),t=Oa&&Oa.__setModuleDefault||(Object.create?function(H,J){Object.defineProperty(H,"default",{enumerable:!0,value:J})}:function(H,J){H.default=J}),r=Oa&&Oa.__importStar||function(){var H=function(J){return H=Object.getOwnPropertyNames||function(ie){var le=[];for(var ue in ie)Object.prototype.hasOwnProperty.call(ie,ue)&&(le[le.length]=ue);return le},H(J)};return function(J){if(J&&J.__esModule)return J;var ie={};if(J!=null)for(var le=H(J),ue=0;ue<le.length;ue++)le[ue]!=="default"&&i(ie,J,le[ue]);return t(ie,J),ie}}(),a=Oa&&Oa.__importDefault||function(H){return H&&H.__esModule?H:{default:H}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=e.useCornerRadiusAndCrop=e.setOuterImageCropTransformerStyle=e.setInnerImageCropTransformerStyle=e.useSizeFixer=void 0;const l=a(Ar()),s=qi,c=oa,f=mo,E=a(Gp()),_=a(Hi()),S=xc,w=nu(),b=ru(),y=r(Zd()),v=ls(),g=z4(),O=Kd(),h=tu(),p=ss();function m(){return document.createElement("canvas")}async function x(H){if(!(H.indexOf("data:image/svg+xml")>=0||H.indexOf(".svg")>=0))return H;const J=await y.urlToString(H),ie=y.fixSize(J);return y.svgToURL(ie)}const N=H=>{const[J,ie]=l.default.useState(H);return l.default.useEffect(()=>{(async()=>{const le=await x(H);le!==J&&ie(le)})()},[H]),J};function T(H,J){return Math.sqrt(Math.pow(J.x-H.x,2)+Math.pow(J.y-H.y,2))}function I(H,J){return{x:(H.x+J.x)/2,y:(H.y+J.y)/2}}e.useSizeFixer=N;const R=(H,J,ie)=>{const le=l.default.useMemo(()=>{var ue,he;const{flipX:ye,flipY:Ce}=H,pe=H.type==="svg"||H.src.indexOf("data:image/svg+xml")>=0||H.src.indexOf(".svg")>=0,fe=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,ve=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||fe)&&pe||H.maskSrc;if(!ye&&!Ce&&!ve)return J;if(!J||!J.width||!J.height)return null;const xe=m();let Te=1;H.type==="svg"&&(Te=Math.max(H.a.width/J.width*ie,H.a.height/J.height*ie)),(0,g.trySetCanvasSize)(xe,Math.max(J.width*Te,1),Math.max(J.height*Te,1));let ce=ye?-xe.width:0,me=Ce?-xe.height:0;return(ue=xe.getContext("2d"))===null||ue===void 0||ue.scale(ye?-1:1,Ce?-1:1),(he=xe.getContext("2d"))===null||he===void 0||he.drawImage(J,ce,me,xe.width,xe.height),xe},[H.maskSrc,H.flipX,H.flipY,J,H.a.width,H.a.height,ie]);return l.default.useEffect(()=>()=>{le&&le.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(le)},[le]),le},C={boundBoxFunc:(H,J)=>J.width<5||J.height<5?H:J,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2},M=H=>{Object.assign(C,H)};e.setInnerImageCropTransformerStyle=M;const k={boundBoxFunc:(H,J)=>J.width<5||J.height<5?H:J,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2},A=H=>{Object.assign(k,H)};function L(H,J){const ie=J.width/J.height;let le,ue;return ie>=H.width/H.height?(le=H.width,ue=H.width/ie):(le=H.height*ie,ue=H.height),{x:(H.width-le)/2,y:(H.height-ue)/2,width:le,height:ue}}function z(H,J,ie,le,ue,he,ye){for(var Ce=new ImageData(J,ie),pe=new Int32Array(H.data.buffer),fe=H.width,ve=new Int32Array(Ce.data.buffer),xe=Ce.width,Te=J/he,ce=ie/ye,me=Math.round(1/Te),Oe=Math.round(1/ce),Ne=me*Oe,tt=0;tt<Ce.height;tt++)for(var rt=0;rt<xe;rt++){for(var He=le+Math.round(rt/Te)+(ue+Math.round(tt/ce))*fe,$e=0,Xe=0,De=0,Ye=0,lt=0;lt<Oe;lt++)for(var wt=0;wt<me;wt++){var zt=pe[He+wt+lt*fe];$e+=zt<<24>>>24,Xe+=zt<<16>>>24,De+=zt<<8>>>24,Ye+=zt>>>24}$e=Math.round($e/Ne),Xe=Math.round(Xe/Ne),De=Math.round(De/Ne),Ye=Math.round(Ye/Ne),ve[rt+tt*xe]=Ye<<24|De<<16|Xe<<8|$e}return Ce}function Y(H,J){var ie,le;const ue=m();ue.width=H.width,ue.height=H.height;const he=Math.max(1,Math.floor(ue.width*J)),ye=Math.max(1,Math.floor(ue.height*J));(ie=ue.getContext("2d"))===null||ie===void 0||ie.drawImage(H,0,0,ue.width,ue.height);const Ce=z(ue.getContext("2d").getImageData(0,0,ue.width,ue.height),he,ye,0,0,ue.width,ue.height);return ue.width=he,ue.height=ye,(le=ue.getContext("2d"))===null||le===void 0||le.putImageData(Ce,0,0),ue}e.setOuterImageCropTransformerStyle=A;const $=(H,J)=>{const[ie,le]=ee(H.maskSrc,"anonymous"),ue=H.maskSrc?le:"loaded";return(0,e.useImageLoader)(ue,H.maskSrc||"",H.id),l.default.useMemo(()=>{if(!ie||!J||!J.width||!J.height)return J;const he=m();he.width=Math.max(J.width,1),he.height=Math.max(J.height,1);const ye=he.getContext("2d");if(!ye)return J;ye.drawImage(J,0,0),ye.globalCompositeOperation="source-in";const Ce=L(ie,H);return ye.drawImage(ie,Ce.x,Ce.y,Ce.width,Ce.height,0,0,J.width,J.height),he},[J,ie,H.a.width,H.a.height])},X=(H,J,ie)=>Math.max(J,Math.min(ie,H)),q=(H,J,ie,le,ue=0,he=!1,ye=!0)=>{const Ce=Math.floor(X(H.a.width*le,1,1e4)),pe=Math.floor(X(H.a.height*le,1,1e4)),fe=Math.min(ue*le,Ce/2,pe/2),ve=Math.max(H.a.width/ie.width,H.a.height/ie.height)*le,xe=H.page._exportingOrRendering&&v.flags.imageDownScalingEnabled&&ve<1&&!he,Te=ie.x===0&&ie.y===0&&ie.width===(J==null?void 0:J.width)&&ie.height===(J==null?void 0:J.height),ce=l.default.useMemo(()=>{if(!(!J||!J.width||!J.height))return Te&&fe===0&&!xe?void 0:m()},[J,fe,xe,Te]);return l.default.useLayoutEffect(()=>{if(!ce||!J)return;(0,g.trySetCanvasSize)(ce,Ce,pe);const me=ce.getContext("2d");if(!me)return;fe&&(me.beginPath(),me.moveTo(fe,0),me.lineTo(Ce-fe,0),me.arc(Ce-fe,fe,fe,3*Math.PI/2,0,!1),me.lineTo(Ce,pe-fe),me.arc(Ce-fe,pe-fe,fe,0,Math.PI/2,!1),me.lineTo(fe,pe),me.arc(fe,pe-fe,fe,Math.PI/2,Math.PI,!1),me.lineTo(0,fe),me.arc(fe,fe,fe,Math.PI,3*Math.PI/2,!1),me.clip());const Oe=xe?Y(J,ve):J,Ne=xe?{x:Math.floor(ie.x*ve),y:Math.floor(ie.y*ve),width:Math.floor(ie.width*ve),height:Math.floor(ie.height*ve)}:ie;me.drawImage(Oe,Ne.x,Ne.y,Ne.width,Ne.height,0,0,ce.width,ce.height)},[ce,H.a.width,H.a.height,ie.x,ie.y,ie.width,ie.height,ue,le,he,H.page._exportingOrRendering,xe]),l.default.useEffect(()=>()=>{ce&&ce.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ce)},[ce]),ce||J};e.useCornerRadiusAndCrop=q;const D=(H,J,ie,le)=>{const ue=(0,e.useSizeFixer)(H.clipSrc||""),[he,ye]=ee(ue,"anonymous"),Ce=H.clipSrc?ye:"loaded";(0,e.useImageLoader)(Ce,H.clipSrc,H.id);const pe=l.default.useMemo(()=>{if(J&&he)return m()},[J,he]);return l.default.useLayoutEffect(()=>{var fe;if(!he||!J||!J.width||!J.height||!he||!he.width||!he.height||!pe)return;const ve=m(),xe=Math.max(H.a.width/he.width*ie,H.a.height/he.height*ie);ve.width=he.width*xe,ve.height=he.height*xe,(fe=ve.getContext("2d"))===null||fe===void 0||fe.drawImage(he,0,0,ve.width,ve.height),pe.width=Math.max(J.width,1),pe.height=Math.max(J.height,1);const Te=pe.getContext("2d");Te&&(Te.save(),Te.drawImage(ve,0,0,J.width,J.height),_.default.Util.releaseCanvas(ve),Te.globalCompositeOperation="source-in",Te.drawImage(J,0,0,pe.width,pe.height),Te.restore())},[pe,J,he,H.a.width,H.a.height,ie,...le]),H.clipSrc&&he?pe:J},B=m(),U=(0,s.observer)(({element:H})=>{const J=Math.min(30,H.a.width/4,H.a.height/4),ie=l.default.useRef(null);return l.default.useEffect(()=>{const le=ie.current;if(!le)return;const ue=new _.default.Animation(he=>{le.rotate(((he==null?void 0:he.timeDiff)||0)/2)},le.getLayer());return ue.start(),()=>{ue.stop()}}),l.default.createElement(f.Group,{x:H.x,y:H.y,rotation:H.rotation,listening:!1,opacity:H.a.opacity,hideInExport:!H.showInExport},l.default.createElement(f.Rect,{width:H.a.width,height:H.a.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(f.Arc,{ref:ie,x:H.a.width/2,y:H.a.height/2,fill:"white",outerRadius:Math.abs(J),innerRadius:Math.max(1,J-5),angle:270}))}),W=(0,s.observer)(({element:H})=>{const J="Can not load the image...",ie=Math.max(10,Math.min(30,H.a.width/25));return l.default.createElement(f.Group,{x:H.x,y:H.y,rotation:H.rotation,listening:!1,opacity:H.a.opacity,hideInExport:!H.showInExport},l.default.createElement(f.Rect,{width:H.a.width,height:H.a.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(f.Text,{text:J,fontSize:ie,width:H.a.width,height:H.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let ee=E.default;const ne=H=>{ee=H};e.setImageLoaderHook=ne;const te=(H,J="",ie="")=>{const le=l.default.useRef(),ue=()=>{var he;(he=le.current)===null||he===void 0||he.call(le),le.current=void 0};l.default.useEffect(()=>ue,[]),l.default.useLayoutEffect(()=>{const he=J.slice(0,200),ye=`image with id ${ie} url: ${he}`;H!=="loading"||le.current||(le.current=(0,b.incrementLoader)(ye)),H!=="loading"&&ue(),H==="failed"&&(0,b.triggerLoadError)(ye)},[H])};e.useImageLoader=te;const Z=({image:H,status:J,type:ie})=>{const le=l.default.useRef();return l.default.useEffect(()=>{le.current=H||le.current},[H]),J!=="failed"||J!=="failed"&&ie==="svg"?le.current:void 0},ae=H=>{const[J,ie]=l.default.useReducer(ye=>ye+1,0),le=l.default.useRef("loading"),ue=l.default.useRef(H.src),he=l.default.useRef(H.src);return he.current!==H.src&&(he.current=H.src,le.current="loading"),l.default.useEffect(()=>{if(H.type!=="svg"||!H.src)return;let ye=!1;return(async()=>{le.current="loading",ie();const Ce=await y.urlToString(H.src),pe=y.fixSize(Ce),fe=y.replaceColors(pe,H.colorsReplace);ye||(ue.current=fe,le.current="loaded",ie())})(),()=>{ye=!0}},[H.src,JSON.stringify(H.colorsReplace)]),H.type!=="svg"?[H.src,"loaded"]:[ue.current,le.current]};e.ImageElement=(0,s.observer)(({element:H,store:J})=>{var ie;const[le,ue]=l.default.useState(!1),he=l.default.useRef(null),ye=l.default.useRef(null),[Ce,pe]=l.default.useState(!1),fe=J.selectedShapes.indexOf(H)>=0,[ve,xe]=ae(H),[Te,ce]=ee(ve,"anonymous"),me=H.type!=="svg"||xe==="loaded"?ce:"loading";(0,e.useImageLoader)(me,H.src,H.id);const Oe=H.page._exportingOrRendering?1:Math.max(1,J.scale),Ne=J._elementsPixelRatio*Oe,tt=Z({image:Te,status:ce,type:H.type}),rt=R(H,Te||tt,Ne),He=$(H,rt)||B;let{cropX:$e,cropY:Xe,cropWidth:De,cropHeight:Ye}=H.a;ce!=="loaded"&&($e=Xe=0,De=Ye=1);const lt=He.width*De,wt=He.height*Ye,zt=H.a.width/H.a.height;let _e,Se;const xt=lt/wt,ht=H.type==="svg";ht?(_e=lt,Se=wt):zt>=xt?(_e=lt,Se=lt/zt):(_e=wt*zt,Se=wt);const At={x:He.width*$e,y:He.height*Xe,width:_e,height:Se},vt=(ie=H.cornerRadius)!==null&&ie!==void 0?ie:0,Tr=H.page._exportingOrRendering?1:Math.min(2,J.scale),Pr=J._elementsPixelRatio*Tr;let tr=D(H,(0,e.useCornerRadiusAndCrop)(H,He,At,Pr,vt,le||H._cropModeEnabled||H.type==="svg",!0),Pr,[At,vt,Pr]);const mr=Math.max(H.a.width/_e,H.a.height/Se);l.default.useEffect(()=>{var et;if(!H._cropModeEnabled)return;const qt=(et=he.current)===null||et===void 0?void 0:et.getStage();function $t(Kt){H._cropModeEnabled&&Kt.target!==ye.current&&H.toggleCropMode(!1)}function rr(Kt){H._cropModeEnabled&&Kt.target.parentNode!==qt.content&&H.toggleCropMode(!1)}return document.body.addEventListener("click",rr),qt==null||qt.on("click",$t),qt==null||qt.on("tap",$t),()=>{document.body.removeEventListener("click",rr),document.body.removeEventListener("touchstart",rr),qt==null||qt.off("click",$t),qt==null||qt.off("click",$t)}},[H._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(le||H._cropModeEnabled))return(0,O.applyFilter)(he.current,H),(0,c.autorun)(()=>{(0,O.applyFilter)(he.current,H)},{delay:100})},[tr,H.page._exportingOrRendering,le,De,Ye,H._cropModeEnabled]),l.default.useLayoutEffect(()=>{var et;le||H._cropModeEnabled?(et=he.current)===null||et===void 0||et.clearCache():(0,O.applyFilter)(he.current,H)},[le,H.a.width,H.a.height,H._cropModeEnabled]),l.default.useEffect(()=>{(0,O.applyFilter)(he.current,H)},[H.shadowEnabled,H.shadowBlur,H.cornerRadius,H.shadowColor,H.shadowOffsetX,H.shadowOffsetY,H.shadowOpacity]);const Pn=l.default.useRef(null),Ve=l.default.useRef(null),at=l.default.useRef(null);l.default.useLayoutEffect(()=>{H._cropModeEnabled&&(Ve.current.nodes([Pn.current]),at.current.nodes([ye.current]))},[H._cropModeEnabled]);var bt=l.default.useRef(null),Ot=l.default.useRef(0),je=l.default.useRef(!1);const Ze=et=>{var qt;((qt=et.evt.touches)===null||qt===void 0?void 0:qt.length)>2&&et.target.stopDrag(),Math.round(et.target.x())>0&&(et.target.x(0),et.target.scaleX(1)),Math.round(et.target.y())>0&&(et.target.y(0),et.target.scaleY(1));const $t=et.target.width()*et.target.scaleX(),rr=et.target.height()*et.target.scaleY(),Kt=Math.min(1,_e/$t),Cn=Math.min(1,Se/rr),kn=1-Kt,rn=Math.min(kn,Math.max(0,Math.round(-et.target.x())/$t)),sa=1-Cn,Xt=Math.min(sa,Math.max(0,Math.round(-et.target.y())/rr));et.target.setAttrs({x:-rn*He.width,y:-Xt*He.height,scaleX:1,scaleY:1}),H.set({cropX:rn,cropY:Xt,cropWidth:Kt,cropHeight:Cn})},ct=()=>{H.type!=="svg"&&H.contentEditable&&setTimeout(()=>{H.toggleCropMode(!0)})},Ie=H.type==="svg"&&tt,_t=ce==="loading"&&!Ie,Fe=ce==="failed",mt=!_t&&!Fe,ir=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Vt=mt?H.a.opacity:0;(0,h.useFadeIn)(he,Vt);const pn=H.selectable||J.role==="admin",Lr=(0,p.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,_t&&l.default.createElement(U,{element:H}),Fe&&l.default.createElement(W,{element:H}),l.default.createElement(f.Image,{ref:he,name:"element",id:H.id,image:tr,x:H.a.x,y:H.a.y,width:H.a.width||1,height:H.a.height||1,rotation:H.a.rotation,opacity:Vt,shadowEnabled:H.shadowEnabled,shadowBlur:H.shadowBlur,shadowOffsetX:H.shadowOffsetX,shadowOffsetY:H.shadowOffsetY,shadowColor:H.shadowColor,shadowOpacity:H.shadowOpacity,customCrop:At,listening:pn,draggable:Lr?H.draggable&&fe:H.draggable,preventDefault:!Lr||fe,hideInExport:!H.showInExport,onMouseEnter:()=>{pe(!0)},onMouseLeave:()=>{pe(!1)},onDragMove:et=>{H.set({x:et.target.x(),y:et.target.y()})},onDragEnd:et=>{H.set({x:et.target.x(),y:et.target.y()})},onDblClick:ct,onDblTap:ct,onTransformStart:()=>{ue(!0),ir.current={cropX:H.cropX,cropY:H.cropY,cropWidth:H.cropWidth,cropHeight:H.cropHeight}},onTransform:et=>{var qt;const $t=et.currentTarget,rr=Math.abs($t.scaleX()-1)<1e-7?1:$t.scaleX(),Kt=Math.abs($t.scaleY()-1)<1e-7?1:$t.scaleY();$t.scaleX(1),$t.scaleY(1);const Cn=(qt=et.target.getStage())===null||qt===void 0?void 0:qt.findOne("Transformer"),kn=1-_e/He.width,rn=Math.min(kn,Math.max(0,H.cropX)),sa=1-Se/He.height,Xt=Math.min(sa,Math.max(0,H.cropY)),Pi=Cn.getActiveAnchor(),Un=!(Pi.indexOf("middle")>=0||Pi.indexOf("center")>=0),Fa=!Un&&rr<1&&ir.current.cropHeight>Se/He.height;let ui=Un?H.cropWidth:H.cropWidth*rr;Fa&&(ui=H.cropWidth);const yo=!Un&&Kt<1&&ir.current.cropWidth>_e/He.width;let Ci=Un?H.cropHeight:H.cropHeight*Kt;yo&&(Ci=H.cropHeight),ht&&(ui=H.cropWidth,Ci=H.cropHeight),H.set({cropX:rn,cropY:Xt,x:$t.x(),y:$t.y(),width:$t.width()*rr,height:$t.height()*Kt,rotation:et.target.rotation(),cropWidth:Math.min(ui,1-rn),cropHeight:Math.min(Ci,1-Xt)})},onTransformEnd:et=>{const qt=et.currentTarget;H.set({width:qt.width(),height:qt.height(),x:qt.x(),y:qt.y(),rotation:et.target.rotation(),cropWidth:_e/He.width,cropHeight:Se/He.height}),ue(!1)}}),l.default.createElement(f.Rect,{x:H.x,y:H.y,width:Math.max(H.a.width-H.borderSize,0),height:Math.max(H.a.height-H.borderSize,0),opacity:Vt,offsetX:-H.borderSize/2,offsetY:-H.borderSize/2,stroke:H.borderColor,strokeWidth:H.borderSize,listening:!1,visible:!!H.borderSize,rotation:H.rotation,cornerRadius:Math.max(0,vt-H.borderSize),hideInExport:!H.showInExport}),H._cropModeEnabled&&l.default.createElement(S.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(f.Rect,{x:-window.innerWidth/J.scale,y:-window.innerWidth/J.scale,width:window.innerWidth/J.scale*3,height:window.innerWidth/J.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(f.Image,{listening:!1,image:tr,x:H.x,y:H.y,width:H.a.width,height:H.a.height,rotation:H.rotation,shadowEnabled:H.shadowEnabled,shadowBlur:H.shadowBlur}),l.default.createElement(f.Group,{x:H.x,y:H.y,rotation:H.rotation,scaleX:mr,scaleY:mr},l.default.createElement(f.Image,{image:He,ref:ye,opacity:.4,draggable:!0,x:-H.cropX*He.width,y:-H.cropY*He.height,onDragMove:Ze,onTransform:Ze,onTouchMove:et=>{et.evt.preventDefault();const qt=et.target.getStage().getPointersPositions();var $t=qt[0],rr=qt[1];const Kt=et.target;if($t&&!rr&&!Kt.isDragging()&&je.current&&(Kt.startDrag(),je.current=!1),$t&&rr){_.default.hitOnDragEnabled=!0,Kt.isDragging()&&(je.current=!0,Kt.stopDrag());const yo=et.target.getAbsoluteTransform().copy();yo.invert();var Cn={x:$t.x,y:$t.y},kn={x:rr.x,y:rr.y};if(!bt.current)return void(bt.current=I(Cn,kn));var rn=I(Cn,kn),sa=T(Cn,kn);Ot.current||(Ot.current=sa);const Ci=Kt.position();var Xt={x:rn.x-Ci.x,y:rn.y-Ci.y},Pi=sa/Ot.current;Kt.scaleX(Pi),Kt.scaleY(Pi);const ci=yo.point(rn),Nr=yo.point(bt.current);var Un=ci.x-Nr.x,Fa=ci.y-Nr.y,ui={x:Math.min(0,rn.x-Xt.x*Pi+Un),y:Math.min(0,rn.y-Xt.y*Pi+Fa)};Kt.position(ui),Ot.current=sa,bt.current=rn,Ze(et)}},onTouchEnd:et=>{Ot.current=0,bt.current=null,_.default.hitOnDragEnabled=!1}}),l.default.createElement(f.Transformer,Object.assign({ref:at},k)),l.default.createElement(f.Rect,{width:_e,height:Se,ref:Pn,listening:!1,onTransform:et=>{et.target.x()<-H.cropX*He.width-1e-9&&(et.target.x(-H.cropX*He.width),et.target.scaleX(1)),et.target.y()<-H.cropY*He.height-1e-9&&(et.target.y(-H.cropY*He.height),et.target.scaleY(1));const qt=Math.min(1,Math.max(0,H.cropX+et.target.x()/He.width)),$t=Math.min(1,Math.max(0,et.target.y()/He.height+H.cropY)),rr=et.target.width()*et.target.scaleX(),Kt=et.target.height()*et.target.scaleY(),Cn=Math.min(1-qt,rr/He.width),kn=Math.min(1-$t,Kt/He.height),rn=et.target.getAbsolutePosition(et.target.getParent().getParent());et.target.scale({x:1,y:1}),et.target.position({x:0,y:0}),H.set({x:rn.x,y:rn.y,cropX:qt,cropY:$t,cropWidth:Cn,cropHeight:kn,width:Math.min(rr*mr,He.width*(1-qt)*mr),height:Math.min(Kt*mr,He.height*(1-$t)*mr)})}}),l.default.createElement(f.Transformer,Object.assign({ref:Ve},C,{visible:H.resizable})))),(Ce||fe)&&l.default.createElement(w.Highlighter,{element:H}))})}(Oa)),Oa}var Pa={},dp={exports:{}};/*!
|
|
109
|
-
* Quill Editor v1.3.7
|
|
110
|
-
* https://quilljs.com/
|
|
111
|
-
* Copyright (c) 2014, Jason Chen
|
|
112
|
-
* Copyright (c) 2013, salesforce.com
|
|
113
|
-
*/var cO=dp.exports,ib;function fO(){return ib||(ib=1,function(e,i){(function(r,a){e.exports=a()})(typeof self<"u"?self:cO,function(){return function(t){var r={};function a(l){if(r[l])return r[l].exports;var s=r[l]={i:l,l:!1,exports:{}};return t[l].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return a.m=t,a.c=r,a.d=function(l,s,c){a.o(l,s)||Object.defineProperty(l,s,{configurable:!1,enumerable:!0,get:c})},a.n=function(l){var s=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(s,"a",s),s},a.o=function(l,s){return Object.prototype.hasOwnProperty.call(l,s)},a.p="",a(a.s=109)}([function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(17),s=a(18),c=a(19),f=a(45),E=a(46),_=a(47),S=a(48),w=a(49),b=a(12),y=a(32),v=a(33),g=a(31),O=a(1),h={Scope:O.Scope,create:O.create,find:O.find,query:O.query,register:O.register,Container:l.default,Format:s.default,Leaf:c.default,Embed:S.default,Scroll:f.default,Block:_.default,Inline:E.default,Text:w.default,Attributor:{Attribute:b.default,Class:y.default,Style:v.default,Store:g.default}};r.default=h},function(t,r,a){var l=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,h){O.__proto__=h}||function(O,h){for(var p in h)h.hasOwnProperty(p)&&(O[p]=h[p])};return function(O,h){g(O,h);function p(){this.constructor=O}O.prototype=h===null?Object.create(h):(p.prototype=h.prototype,new p)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=function(g){l(O,g);function O(h){var p=this;return h="[Parchment] "+h,p=g.call(this,h)||this,p.message=h,p.name=p.constructor.name,p}return O}(Error);r.ParchmentError=s;var c={},f={},E={},_={};r.DATA_KEY="__blot";var S;(function(g){g[g.TYPE=3]="TYPE",g[g.LEVEL=12]="LEVEL",g[g.ATTRIBUTE=13]="ATTRIBUTE",g[g.BLOT=14]="BLOT",g[g.INLINE=7]="INLINE",g[g.BLOCK=11]="BLOCK",g[g.BLOCK_BLOT=10]="BLOCK_BLOT",g[g.INLINE_BLOT=6]="INLINE_BLOT",g[g.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",g[g.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",g[g.ANY=15]="ANY"})(S=r.Scope||(r.Scope={}));function w(g,O){var h=y(g);if(h==null)throw new s("Unable to create "+g+" blot");var p=h,m=g instanceof Node||g.nodeType===Node.TEXT_NODE?g:p.create(O);return new p(m,O)}r.create=w;function b(g,O){return O===void 0&&(O=!1),g==null?null:g[r.DATA_KEY]!=null?g[r.DATA_KEY].blot:O?b(g.parentNode,O):null}r.find=b;function y(g,O){O===void 0&&(O=S.ANY);var h;if(typeof g=="string")h=_[g]||c[g];else if(g instanceof Text||g.nodeType===Node.TEXT_NODE)h=_.text;else if(typeof g=="number")g&S.LEVEL&S.BLOCK?h=_.block:g&S.LEVEL&S.INLINE&&(h=_.inline);else if(g instanceof HTMLElement){var p=(g.getAttribute("class")||"").split(/\s+/);for(var m in p)if(h=f[p[m]],h)break;h=h||E[g.tagName]}return h==null?null:O&S.LEVEL&h.scope&&O&S.TYPE&h.scope?h:null}r.query=y;function v(){for(var g=[],O=0;O<arguments.length;O++)g[O]=arguments[O];if(g.length>1)return g.map(function(m){return v(m)});var h=g[0];if(typeof h.blotName!="string"&&typeof h.attrName!="string")throw new s("Invalid definition");if(h.blotName==="abstract")throw new s("Cannot register abstract class");if(_[h.blotName||h.attrName]=h,typeof h.keyName=="string")c[h.keyName]=h;else if(h.className!=null&&(f[h.className]=h),h.tagName!=null){Array.isArray(h.tagName)?h.tagName=h.tagName.map(function(m){return m.toUpperCase()}):h.tagName=h.tagName.toUpperCase();var p=Array.isArray(h.tagName)?h.tagName:[h.tagName];p.forEach(function(m){(E[m]==null||h.className==null)&&(E[m]=h)})}return h}r.register=v},function(t,r,a){var l=a(51),s=a(11),c=a(3),f=a(20),E="\0",_=function(S){Array.isArray(S)?this.ops=S:S!=null&&Array.isArray(S.ops)?this.ops=S.ops:this.ops=[]};_.prototype.insert=function(S,w){var b={};return S.length===0?this:(b.insert=S,w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(b.attributes=w),this.push(b))},_.prototype.delete=function(S){return S<=0?this:this.push({delete:S})},_.prototype.retain=function(S,w){if(S<=0)return this;var b={retain:S};return w!=null&&typeof w=="object"&&Object.keys(w).length>0&&(b.attributes=w),this.push(b)},_.prototype.push=function(S){var w=this.ops.length,b=this.ops[w-1];if(S=c(!0,{},S),typeof b=="object"){if(typeof S.delete=="number"&&typeof b.delete=="number")return this.ops[w-1]={delete:b.delete+S.delete},this;if(typeof b.delete=="number"&&S.insert!=null&&(w-=1,b=this.ops[w-1],typeof b!="object"))return this.ops.unshift(S),this;if(s(S.attributes,b.attributes)){if(typeof S.insert=="string"&&typeof b.insert=="string")return this.ops[w-1]={insert:b.insert+S.insert},typeof S.attributes=="object"&&(this.ops[w-1].attributes=S.attributes),this;if(typeof S.retain=="number"&&typeof b.retain=="number")return this.ops[w-1]={retain:b.retain+S.retain},typeof S.attributes=="object"&&(this.ops[w-1].attributes=S.attributes),this}}return w===this.ops.length?this.ops.push(S):this.ops.splice(w,0,S),this},_.prototype.chop=function(){var S=this.ops[this.ops.length-1];return S&&S.retain&&!S.attributes&&this.ops.pop(),this},_.prototype.filter=function(S){return this.ops.filter(S)},_.prototype.forEach=function(S){this.ops.forEach(S)},_.prototype.map=function(S){return this.ops.map(S)},_.prototype.partition=function(S){var w=[],b=[];return this.forEach(function(y){var v=S(y)?w:b;v.push(y)}),[w,b]},_.prototype.reduce=function(S,w){return this.ops.reduce(S,w)},_.prototype.changeLength=function(){return this.reduce(function(S,w){return w.insert?S+f.length(w):w.delete?S-w.delete:S},0)},_.prototype.length=function(){return this.reduce(function(S,w){return S+f.length(w)},0)},_.prototype.slice=function(S,w){S=S||0,typeof w!="number"&&(w=1/0);for(var b=[],y=f.iterator(this.ops),v=0;v<w&&y.hasNext();){var g;v<S?g=y.next(S-v):(g=y.next(w-v),b.push(g)),v+=f.length(g)}return new _(b)},_.prototype.compose=function(S){var w=f.iterator(this.ops),b=f.iterator(S.ops),y=[],v=b.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){for(var g=v.retain;w.peekType()==="insert"&&w.peekLength()<=g;)g-=w.peekLength(),y.push(w.next());v.retain-g>0&&b.next(v.retain-g)}for(var O=new _(y);w.hasNext()||b.hasNext();)if(b.peekType()==="insert")O.push(b.next());else if(w.peekType()==="delete")O.push(w.next());else{var h=Math.min(w.peekLength(),b.peekLength()),p=w.next(h),m=b.next(h);if(typeof m.retain=="number"){var x={};typeof p.retain=="number"?x.retain=h:x.insert=p.insert;var N=f.attributes.compose(p.attributes,m.attributes,typeof p.retain=="number");if(N&&(x.attributes=N),O.push(x),!b.hasNext()&&s(O.ops[O.ops.length-1],x)){var T=new _(w.rest());return O.concat(T).chop()}}else typeof m.delete=="number"&&typeof p.retain=="number"&&O.push(m)}return O.chop()},_.prototype.concat=function(S){var w=new _(this.ops.slice());return S.ops.length>0&&(w.push(S.ops[0]),w.ops=w.ops.concat(S.ops.slice(1))),w},_.prototype.diff=function(S,w){if(this.ops===S.ops)return new _;var b=[this,S].map(function(h){return h.map(function(p){if(p.insert!=null)return typeof p.insert=="string"?p.insert:E;var m=h===S?"on":"with";throw new Error("diff() called "+m+" non-document")}).join("")}),y=new _,v=l(b[0],b[1],w),g=f.iterator(this.ops),O=f.iterator(S.ops);return v.forEach(function(h){for(var p=h[1].length;p>0;){var m=0;switch(h[0]){case l.INSERT:m=Math.min(O.peekLength(),p),y.push(O.next(m));break;case l.DELETE:m=Math.min(p,g.peekLength()),g.next(m),y.delete(m);break;case l.EQUAL:m=Math.min(g.peekLength(),O.peekLength(),p);var x=g.next(m),N=O.next(m);s(x.insert,N.insert)?y.retain(m,f.attributes.diff(x.attributes,N.attributes)):y.push(N).delete(m);break}p-=m}}),y.chop()},_.prototype.eachLine=function(S,w){w=w||`
|
|
114
|
-
`;for(var b=f.iterator(this.ops),y=new _,v=0;b.hasNext();){if(b.peekType()!=="insert")return;var g=b.peek(),O=f.length(g)-b.peekLength(),h=typeof g.insert=="string"?g.insert.indexOf(w,O)-O:-1;if(h<0)y.push(b.next());else if(h>0)y.push(b.next(h));else{if(S(y,b.next(1).attributes||{},v)===!1)return;v+=1,y=new _}}y.length()>0&&S(y,{},v)},_.prototype.transform=function(S,w){if(w=!!w,typeof S=="number")return this.transformPosition(S,w);for(var b=f.iterator(this.ops),y=f.iterator(S.ops),v=new _;b.hasNext()||y.hasNext();)if(b.peekType()==="insert"&&(w||y.peekType()!=="insert"))v.retain(f.length(b.next()));else if(y.peekType()==="insert")v.push(y.next());else{var g=Math.min(b.peekLength(),y.peekLength()),O=b.next(g),h=y.next(g);if(O.delete)continue;h.delete?v.push(h):v.retain(g,f.attributes.transform(O.attributes,h.attributes,w))}return v.chop()},_.prototype.transformPosition=function(S,w){w=!!w;for(var b=f.iterator(this.ops),y=0;b.hasNext()&&y<=S;){var v=b.peekLength(),g=b.peekType();if(b.next(),g==="delete"){S-=Math.min(v,S-y);continue}else g==="insert"&&(y<S||!w)&&(S+=v);y+=v}return S},t.exports=_},function(t,r){var a=Object.prototype.hasOwnProperty,l=Object.prototype.toString,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=function(b){return typeof Array.isArray=="function"?Array.isArray(b):l.call(b)==="[object Array]"},E=function(b){if(!b||l.call(b)!=="[object Object]")return!1;var y=a.call(b,"constructor"),v=b.constructor&&b.constructor.prototype&&a.call(b.constructor.prototype,"isPrototypeOf");if(b.constructor&&!y&&!v)return!1;var g;for(g in b);return typeof g>"u"||a.call(b,g)},_=function(b,y){s&&y.name==="__proto__"?s(b,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):b[y.name]=y.newValue},S=function(b,y){if(y==="__proto__")if(a.call(b,y)){if(c)return c(b,y).value}else return;return b[y]};t.exports=function w(){var b,y,v,g,O,h,p=arguments[0],m=1,x=arguments.length,N=!1;for(typeof p=="boolean"&&(N=p,p=arguments[1]||{},m=2),(p==null||typeof p!="object"&&typeof p!="function")&&(p={});m<x;++m)if(b=arguments[m],b!=null)for(y in b)v=S(p,y),g=S(b,y),p!==g&&(N&&g&&(E(g)||(O=f(g)))?(O?(O=!1,h=v&&f(v)?v:[]):h=v&&E(v)?v:{},_(p,{name:y,newValue:w(N,h,g)})):typeof g<"u"&&_(p,{name:y,newValue:g}));return p}},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var l=function(){function M(k,A){for(var L=0;L<A.length;L++){var z=A[L];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(k,z.key,z)}}return function(k,A,L){return A&&M(k.prototype,A),L&&M(k,L),k}}(),s=function M(k,A,L){k===null&&(k=Function.prototype);var z=Object.getOwnPropertyDescriptor(k,A);if(z===void 0){var Y=Object.getPrototypeOf(k);return Y===null?void 0:M(Y,A,L)}else{if("value"in z)return z.value;var $=z.get;return $===void 0?void 0:$.call(L)}},c=a(3),f=p(c),E=a(2),_=p(E),S=a(0),w=p(S),b=a(16),y=p(b),v=a(6),g=p(v),O=a(7),h=p(O);function p(M){return M&&M.__esModule?M:{default:M}}function m(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function x(M,k){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:M}function N(M,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);M.prototype=Object.create(k&&k.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(M,k):M.__proto__=k)}var T=1,I=function(M){N(k,M);function k(){return m(this,k),x(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}return l(k,[{key:"attach",value:function(){s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"attach",this).call(this),this.attributes=new w.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new _.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(L,z){var Y=w.default.query(L,w.default.Scope.BLOCK_ATTRIBUTE);Y!=null&&this.attributes.attribute(Y,z)}},{key:"formatAt",value:function(L,z,Y,$){this.format(Y,$)}},{key:"insertAt",value:function(L,z,Y){if(typeof z=="string"&&z.endsWith(`
|
|
115
|
-
`)){var $=w.default.create(R.blotName);this.parent.insertBefore($,L===0?this:this.next),$.insertAt(0,z.slice(0,-1))}else s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,L,z,Y)}}]),k}(w.default.Embed);I.scope=w.default.Scope.BLOCK_BLOT;var R=function(M){N(k,M);function k(A){m(this,k);var L=x(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,A));return L.cache={},L}return l(k,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(w.default.Leaf).reduce(function(L,z){return z.length()===0?L:L.insert(z.value(),C(z))},new _.default).insert(`
|
|
116
|
-
`,C(this))),this.cache.delta}},{key:"deleteAt",value:function(L,z){s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"deleteAt",this).call(this,L,z),this.cache={}}},{key:"formatAt",value:function(L,z,Y,$){z<=0||(w.default.query(Y,w.default.Scope.BLOCK)?L+z===this.length()&&this.format(Y,$):s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"formatAt",this).call(this,L,Math.min(z,this.length()-L-1),Y,$),this.cache={})}},{key:"insertAt",value:function(L,z,Y){if(Y!=null)return s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,L,z,Y);if(z.length!==0){var $=z.split(`
|
|
117
|
-
`),X=$.shift();X.length>0&&(L<this.length()-1||this.children.tail==null?s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertAt",this).call(this,Math.min(L,this.length()-1),X):this.children.tail.insertAt(this.children.tail.length(),X),this.cache={});var q=this;$.reduce(function(D,B){return q=q.split(D,!0),q.insertAt(0,B),B.length},L+X.length)}}},{key:"insertBefore",value:function(L,z){var Y=this.children.head;s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"insertBefore",this).call(this,L,z),Y instanceof y.default&&Y.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"length",this).call(this)+T),this.cache.length}},{key:"moveChildren",value:function(L,z){s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"moveChildren",this).call(this,L,z),this.cache={}}},{key:"optimize",value:function(L){s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"optimize",this).call(this,L),this.cache={}}},{key:"path",value:function(L){return s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"path",this).call(this,L,!0)}},{key:"removeChild",value:function(L){s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"removeChild",this).call(this,L),this.cache={}}},{key:"split",value:function(L){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(z&&(L===0||L>=this.length()-T)){var Y=this.clone();return L===0?(this.parent.insertBefore(Y,this),this):(this.parent.insertBefore(Y,this.next),Y)}else{var $=s(k.prototype.__proto__||Object.getPrototypeOf(k.prototype),"split",this).call(this,L,z);return this.cache={},$}}}]),k}(w.default.Block);R.blotName="block",R.tagName="P",R.defaultChild="break",R.allowedChildren=[g.default,w.default.Embed,h.default];function C(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return M==null||(typeof M.formats=="function"&&(k=(0,f.default)(k,M.formats())),M.parent==null||M.parent.blotName=="scroll"||M.parent.statics.scope!==M.statics.scope)?k:C(M.parent,k)}r.bubbleFormats=C,r.BlockEmbed=I,r.default=R},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},s=function(){function q(D,B){var U=[],W=!0,ee=!1,ne=void 0;try{for(var te=D[Symbol.iterator](),Z;!(W=(Z=te.next()).done)&&(U.push(Z.value),!(B&&U.length===B));W=!0);}catch(ae){ee=!0,ne=ae}finally{try{!W&&te.return&&te.return()}finally{if(ee)throw ne}}return U}return function(D,B){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return q(D,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function q(D,B){for(var U=0;U<B.length;U++){var W=B[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(D,W.key,W)}}return function(D,B,U){return B&&q(D.prototype,B),U&&q(D,U),D}}();a(50);var f=a(2),E=C(f),_=a(14),S=C(_),w=a(8),b=C(w),y=a(9),v=C(y),g=a(0),O=C(g),h=a(15),p=C(h),m=a(3),x=C(m),N=a(10),T=C(N),I=a(34),R=C(I);function C(q){return q&&q.__esModule?q:{default:q}}function M(q,D,B){return D in q?Object.defineProperty(q,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):q[D]=B,q}function k(q,D){if(!(q instanceof D))throw new TypeError("Cannot call a class as a function")}var A=(0,T.default)("quill"),L=function(){c(q,null,[{key:"debug",value:function(B){B===!0&&(B="log"),T.default.level(B)}},{key:"find",value:function(B){return B.__quill||O.default.find(B)}},{key:"import",value:function(B){return this.imports[B]==null&&A.error("Cannot import "+B+". Are you sure it was registered?"),this.imports[B]}},{key:"register",value:function(B,U){var W=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof B!="string"){var ne=B.attrName||B.blotName;typeof ne=="string"?this.register("formats/"+ne,B,U):Object.keys(B).forEach(function(te){W.register(te,B[te],U)})}else this.imports[B]!=null&&!ee&&A.warn("Overwriting "+B+" with",U),this.imports[B]=U,(B.startsWith("blots/")||B.startsWith("formats/"))&&U.blotName!=="abstract"?O.default.register(U):B.startsWith("modules")&&typeof U.register=="function"&&U.register()}}]);function q(D){var B=this,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(k(this,q),this.options=z(D,U),this.container=this.options.container,this.container==null)return A.error("Invalid Quill container",D);this.options.debug&&q.debug(this.options.debug);var W=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 b.default,this.scroll=O.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new S.default(this.scroll),this.selection=new p.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(b.default.events.EDITOR_CHANGE,function(ne){ne===b.default.events.TEXT_CHANGE&&B.root.classList.toggle("ql-blank",B.editor.isBlank())}),this.emitter.on(b.default.events.SCROLL_UPDATE,function(ne,te){var Z=B.selection.lastRange,ae=Z&&Z.length===0?Z.index:void 0;Y.call(B,function(){return B.editor.update(null,te,ae)},ne)});var ee=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+W+"<p><br></p></div>");this.setContents(ee),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(q,[{key:"addContainer",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof B=="string"){var W=B;B=document.createElement("div"),B.classList.add(W)}return this.container.insertBefore(B,U),B}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(B,U,W){var ee=this,ne=$(B,U,W),te=s(ne,4);return B=te[0],U=te[1],W=te[3],Y.call(this,function(){return ee.editor.deleteText(B,U)},W,B,-1*U)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(B),this.container.classList.toggle("ql-disabled",!B)}},{key:"focus",value:function(){var B=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=B,this.scrollIntoView()}},{key:"format",value:function(B,U){var W=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;return Y.call(this,function(){var ne=W.getSelection(!0),te=new E.default;if(ne==null)return te;if(O.default.query(B,O.default.Scope.BLOCK))te=W.editor.formatLine(ne.index,ne.length,M({},B,U));else{if(ne.length===0)return W.selection.format(B,U),te;te=W.editor.formatText(ne.index,ne.length,M({},B,U))}return W.setSelection(ne,b.default.sources.SILENT),te},ee)}},{key:"formatLine",value:function(B,U,W,ee,ne){var te=this,Z=void 0,ae=$(B,U,W,ee,ne),H=s(ae,4);return B=H[0],U=H[1],Z=H[2],ne=H[3],Y.call(this,function(){return te.editor.formatLine(B,U,Z)},ne,B,0)}},{key:"formatText",value:function(B,U,W,ee,ne){var te=this,Z=void 0,ae=$(B,U,W,ee,ne),H=s(ae,4);return B=H[0],U=H[1],Z=H[2],ne=H[3],Y.call(this,function(){return te.editor.formatText(B,U,Z)},ne,B,0)}},{key:"getBounds",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,W=void 0;typeof B=="number"?W=this.selection.getBounds(B,U):W=this.selection.getBounds(B.index,B.length);var ee=this.container.getBoundingClientRect();return{bottom:W.bottom-ee.top,height:W.height,left:W.left-ee.left,right:W.right-ee.left,top:W.top-ee.top,width:W.width}}},{key:"getContents",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,W=$(B,U),ee=s(W,2);return B=ee[0],U=ee[1],this.editor.getContents(B,U)}},{key:"getFormat",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof B=="number"?this.editor.getFormat(B,U):this.editor.getFormat(B.index,B.length)}},{key:"getIndex",value:function(B){return B.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(B){return this.scroll.leaf(B)}},{key:"getLine",value:function(B){return this.scroll.line(B)}},{key:"getLines",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof B!="number"?this.scroll.lines(B.index,B.length):this.scroll.lines(B,U)}},{key:"getModule",value:function(B){return this.theme.modules[B]}},{key:"getSelection",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return B&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-B,W=$(B,U),ee=s(W,2);return B=ee[0],U=ee[1],this.editor.getText(B,U)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(B,U,W){var ee=this,ne=arguments.length>3&&arguments[3]!==void 0?arguments[3]:q.sources.API;return Y.call(this,function(){return ee.editor.insertEmbed(B,U,W)},ne,B)}},{key:"insertText",value:function(B,U,W,ee,ne){var te=this,Z=void 0,ae=$(B,0,W,ee,ne),H=s(ae,4);return B=H[0],Z=H[2],ne=H[3],Y.call(this,function(){return te.editor.insertText(B,U,Z)},ne,B,U.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(B,U,W){this.clipboard.dangerouslyPasteHTML(B,U,W)}},{key:"removeFormat",value:function(B,U,W){var ee=this,ne=$(B,U,W),te=s(ne,4);return B=te[0],U=te[1],W=te[3],Y.call(this,function(){return ee.editor.removeFormat(B,U)},W,B)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(B){var U=this,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b.default.sources.API;return Y.call(this,function(){B=new E.default(B);var ee=U.getLength(),ne=U.editor.deleteText(0,ee),te=U.editor.applyDelta(B),Z=te.ops[te.ops.length-1];Z!=null&&typeof Z.insert=="string"&&Z.insert[Z.insert.length-1]===`
|
|
118
|
-
`&&(U.editor.deleteText(U.getLength()-1,1),te.delete(1));var ae=ne.compose(te);return ae},W)}},{key:"setSelection",value:function(B,U,W){if(B==null)this.selection.setRange(null,U||q.sources.API);else{var ee=$(B,U,W),ne=s(ee,4);B=ne[0],U=ne[1],W=ne[3],this.selection.setRange(new h.Range(B,U),W),W!==b.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b.default.sources.API,W=new E.default().insert(B);return this.setContents(W,U)}},{key:"update",value:function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.default.sources.USER,U=this.scroll.update(B);return this.selection.update(B),U}},{key:"updateContents",value:function(B){var U=this,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b.default.sources.API;return Y.call(this,function(){return B=new E.default(B),U.editor.applyDelta(B,W)},W,!0)}}]),q}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=b.default.events,L.sources=b.default.sources,L.version="1.3.7",L.imports={delta:E.default,parchment:O.default,"core/module":v.default,"core/theme":R.default};function z(q,D){if(D=(0,x.default)(!0,{container:q,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===L.DEFAULTS.theme)D.theme=R.default;else if(D.theme=L.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var B=(0,x.default)(!0,{},D.theme.DEFAULTS);[B,D].forEach(function(ee){ee.modules=ee.modules||{},Object.keys(ee.modules).forEach(function(ne){ee.modules[ne]===!0&&(ee.modules[ne]={})})});var U=Object.keys(B.modules).concat(Object.keys(D.modules)),W=U.reduce(function(ee,ne){var te=L.import("modules/"+ne);return te==null?A.error("Cannot load "+ne+" module. Are you sure you registered it?"):ee[ne]=te.DEFAULTS||{},ee},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,x.default)(!0,{},L.DEFAULTS,{modules:W},B,D),["bounds","container","scrollingContainer"].forEach(function(ee){typeof D[ee]=="string"&&(D[ee]=document.querySelector(D[ee]))}),D.modules=Object.keys(D.modules).reduce(function(ee,ne){return D.modules[ne]&&(ee[ne]=D.modules[ne]),ee},{}),D}function Y(q,D,B,U){if(this.options.strict&&!this.isEnabled()&&D===b.default.sources.USER)return new E.default;var W=B==null?null:this.getSelection(),ee=this.editor.delta,ne=q();if(W!=null&&(B===!0&&(B=W.index),U==null?W=X(W,ne,D):U!==0&&(W=X(W,B,U,D)),this.setSelection(W,b.default.sources.SILENT)),ne.length()>0){var te,Z=[b.default.events.TEXT_CHANGE,ne,ee,D];if((te=this.emitter).emit.apply(te,[b.default.events.EDITOR_CHANGE].concat(Z)),D!==b.default.sources.SILENT){var ae;(ae=this.emitter).emit.apply(ae,Z)}}return ne}function $(q,D,B,U,W){var ee={};return typeof q.index=="number"&&typeof q.length=="number"?typeof D!="number"?(W=U,U=B,B=D,D=q.length,q=q.index):(D=q.length,q=q.index):typeof D!="number"&&(W=U,U=B,B=D,D=0),(typeof B>"u"?"undefined":l(B))==="object"?(ee=B,W=U):typeof B=="string"&&(U!=null?ee[B]=U:W=B),W=W||b.default.sources.API,[q,D,ee,W]}function X(q,D,B,U){if(q==null)return null;var W=void 0,ee=void 0;if(D instanceof E.default){var ne=[q.index,q.index+q.length].map(function(H){return D.transformPosition(H,U!==b.default.sources.USER)}),te=s(ne,2);W=te[0],ee=te[1]}else{var Z=[q.index,q.index+q.length].map(function(H){return H<D||H===D&&U===b.default.sources.USER?H:B>=0?H+B:Math.max(D,H+B)}),ae=s(Z,2);W=ae[0],ee=ae[1]}return new h.Range(W,ee-W)}r.expandConfig=z,r.overload=$,r.default=L},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function g(O,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(O,m.key,m)}}return function(O,h,p){return h&&g(O.prototype,h),p&&g(O,p),O}}(),s=function g(O,h,p){O===null&&(O=Function.prototype);var m=Object.getOwnPropertyDescriptor(O,h);if(m===void 0){var x=Object.getPrototypeOf(O);return x===null?void 0:g(x,h,p)}else{if("value"in m)return m.value;var N=m.get;return N===void 0?void 0:N.call(p)}},c=a(7),f=S(c),E=a(0),_=S(E);function S(g){return g&&g.__esModule?g:{default:g}}function w(g,O){if(!(g instanceof O))throw new TypeError("Cannot call a class as a function")}function b(g,O){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:g}function y(g,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);g.prototype=Object.create(O&&O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(g,O):g.__proto__=O)}var v=function(g){y(O,g);function O(){return w(this,O),b(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return l(O,[{key:"formatAt",value:function(p,m,x,N){if(O.compare(this.statics.blotName,x)<0&&_.default.query(x,_.default.Scope.BLOT)){var T=this.isolate(p,m);N&&T.wrap(x,N)}else s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"formatAt",this).call(this,p,m,x,N)}},{key:"optimize",value:function(p){if(s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,p),this.parent instanceof O&&O.compare(this.statics.blotName,this.parent.statics.blotName)>0){var m=this.parent.isolate(this.offset(),this.length());this.moveChildren(m),m.wrap(this)}}}],[{key:"compare",value:function(p,m){var x=O.order.indexOf(p),N=O.order.indexOf(m);return x>=0||N>=0?x-N:p===m?0:p<m?-1:1}}]),O}(_.default.Inline);v.allowedChildren=[v,_.default.Embed,f.default],v.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=v},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(0),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}function f(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function E(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return f(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(s.default.Text);r.default=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function h(p,m){for(var x=0;x<m.length;x++){var N=m[x];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(p,N.key,N)}}return function(p,m,x){return m&&h(p.prototype,m),x&&h(p,x),p}}(),s=function h(p,m,x){p===null&&(p=Function.prototype);var N=Object.getOwnPropertyDescriptor(p,m);if(N===void 0){var T=Object.getPrototypeOf(p);return T===null?void 0:h(T,m,x)}else{if("value"in N)return N.value;var I=N.get;return I===void 0?void 0:I.call(x)}},c=a(54),f=S(c),E=a(10),_=S(E);function S(h){return h&&h.__esModule?h:{default:h}}function w(h,p){if(!(h instanceof p))throw new TypeError("Cannot call a class as a function")}function b(h,p){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:h}function y(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(h,p):h.__proto__=p)}var v=(0,_.default)("quill:events"),g=["selectionchange","mousedown","mouseup","click"];g.forEach(function(h){document.addEventListener(h,function(){for(var p=arguments.length,m=Array(p),x=0;x<p;x++)m[x]=arguments[x];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(N){if(N.__quill&&N.__quill.emitter){var T;(T=N.__quill.emitter).handleDOM.apply(T,m)}})})});var O=function(h){y(p,h);function p(){w(this,p);var m=b(this,(p.__proto__||Object.getPrototypeOf(p)).call(this));return m.listeners={},m.on("error",v.error),m}return l(p,[{key:"emit",value:function(){v.log.apply(v,arguments),s(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(x){for(var N=arguments.length,T=Array(N>1?N-1:0),I=1;I<N;I++)T[I-1]=arguments[I];(this.listeners[x.type]||[]).forEach(function(R){var C=R.node,M=R.handler;(x.target===C||C.contains(x.target))&&M.apply(void 0,[x].concat(T))})}},{key:"listenDOM",value:function(x,N,T){this.listeners[x]||(this.listeners[x]=[]),this.listeners[x].push({node:N,handler:T})}}]),p}(f.default);O.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"},O.sources={API:"api",SILENT:"silent",USER:"user"},r.default=O},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});function l(c,f){if(!(c instanceof f))throw new TypeError("Cannot call a class as a function")}var s=function c(f){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(this,c),this.quill=f,this.options=E};s.DEFAULTS={},r.default=s},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=["error","warn","log","info"],s="warn";function c(E){if(l.indexOf(E)<=l.indexOf(s)){for(var _,S=arguments.length,w=Array(S>1?S-1:0),b=1;b<S;b++)w[b-1]=arguments[b];(_=console)[E].apply(_,w)}}function f(E){return l.reduce(function(_,S){return _[S]=c.bind(console,S,E),_},{})}c.level=f.level=function(E){s=E},r.default=f},function(t,r,a){var l=Array.prototype.slice,s=a(52),c=a(53),f=t.exports=function(w,b,y){return y||(y={}),w===b?!0:w instanceof Date&&b instanceof Date?w.getTime()===b.getTime():!w||!b||typeof w!="object"&&typeof b!="object"?y.strict?w===b:w==b:S(w,b,y)};function E(w){return w==null}function _(w){return!(!w||typeof w!="object"||typeof w.length!="number"||typeof w.copy!="function"||typeof w.slice!="function"||w.length>0&&typeof w[0]!="number")}function S(w,b,y){var v,g;if(E(w)||E(b)||w.prototype!==b.prototype)return!1;if(c(w))return c(b)?(w=l.call(w),b=l.call(b),f(w,b,y)):!1;if(_(w)){if(!_(b)||w.length!==b.length)return!1;for(v=0;v<w.length;v++)if(w[v]!==b[v])return!1;return!0}try{var O=s(w),h=s(b)}catch{return!1}if(O.length!=h.length)return!1;for(O.sort(),h.sort(),v=O.length-1;v>=0;v--)if(O[v]!=h[v])return!1;for(v=O.length-1;v>=0;v--)if(g=O[v],!f(w[g],b[g],y))return!1;return typeof w==typeof b}},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(1),s=function(){function c(f,E,_){_===void 0&&(_={}),this.attrName=f,this.keyName=E;var S=l.Scope.TYPE&l.Scope.ATTRIBUTE;_.scope!=null?this.scope=_.scope&l.Scope.LEVEL|S:this.scope=l.Scope.ATTRIBUTE,_.whitelist!=null&&(this.whitelist=_.whitelist)}return c.keys=function(f){return[].map.call(f.attributes,function(E){return E.name})},c.prototype.add=function(f,E){return this.canAdd(f,E)?(f.setAttribute(this.keyName,E),!0):!1},c.prototype.canAdd=function(f,E){var _=l.query(f,l.Scope.BLOT&(this.scope|l.Scope.TYPE));return _==null?!1:this.whitelist==null?!0:typeof E=="string"?this.whitelist.indexOf(E.replace(/["']/g,""))>-1:this.whitelist.indexOf(E)>-1},c.prototype.remove=function(f){f.removeAttribute(this.keyName)},c.prototype.value=function(f){var E=f.getAttribute(this.keyName);return this.canAdd(f,E)&&E?E:""},c}();r.default=s},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var l=function(){function I(R,C){var M=[],k=!0,A=!1,L=void 0;try{for(var z=R[Symbol.iterator](),Y;!(k=(Y=z.next()).done)&&(M.push(Y.value),!(C&&M.length===C));k=!0);}catch($){A=!0,L=$}finally{try{!k&&z.return&&z.return()}finally{if(A)throw L}}return M}return function(R,C){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return I(R,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function I(R,C){for(var M=0;M<C.length;M++){var k=C[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(R,k.key,k)}}return function(R,C,M){return C&&I(R.prototype,C),M&&I(R,M),R}}(),c=function I(R,C,M){R===null&&(R=Function.prototype);var k=Object.getOwnPropertyDescriptor(R,C);if(k===void 0){var A=Object.getPrototypeOf(R);return A===null?void 0:I(A,C,M)}else{if("value"in k)return k.value;var L=k.get;return L===void 0?void 0:L.call(M)}},f=a(2),E=h(f),_=a(0),S=h(_),w=a(4),b=h(w),y=a(6),v=h(y),g=a(7),O=h(g);function h(I){return I&&I.__esModule?I:{default:I}}function p(I,R){if(!(I instanceof R))throw new TypeError("Cannot call a class as a function")}function m(I,R){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:I}function x(I,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);I.prototype=Object.create(R&&R.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(I,R):I.__proto__=R)}var N=function(I){x(R,I);function R(){return p(this,R),m(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return R}(v.default);N.blotName="code",N.tagName="CODE";var T=function(I){x(R,I);function R(){return p(this,R),m(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return s(R,[{key:"delta",value:function(){var M=this,k=this.domNode.textContent;return k.endsWith(`
|
|
119
|
-
`)&&(k=k.slice(0,-1)),k.split(`
|
|
120
|
-
`).reduce(function(A,L){return A.insert(L).insert(`
|
|
121
|
-
`,M.formats())},new E.default)}},{key:"format",value:function(M,k){if(!(M===this.statics.blotName&&k)){var A=this.descendant(O.default,this.length()-1),L=l(A,1),z=L[0];z!=null&&z.deleteAt(z.length()-1,1),c(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"format",this).call(this,M,k)}}},{key:"formatAt",value:function(M,k,A,L){if(k!==0&&!(S.default.query(A,S.default.Scope.BLOCK)==null||A===this.statics.blotName&&L===this.statics.formats(this.domNode))){var z=this.newlineIndex(M);if(!(z<0||z>=M+k)){var Y=this.newlineIndex(M,!0)+1,$=z-Y+1,X=this.isolate(Y,$),q=X.next;X.format(A,L),q instanceof R&&q.formatAt(0,M-Y+k-$,A,L)}}}},{key:"insertAt",value:function(M,k,A){if(A==null){var L=this.descendant(O.default,M),z=l(L,2),Y=z[0],$=z[1];Y.insertAt($,k)}}},{key:"length",value:function(){var M=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?M:M+1}},{key:"newlineIndex",value:function(M){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(k)return this.domNode.textContent.slice(0,M).lastIndexOf(`
|
|
123
|
-
`);var A=this.domNode.textContent.slice(M).indexOf(`
|
|
124
|
-
`);return A>-1?M+A:-1}},{key:"optimize",value:function(M){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(S.default.create("text",`
|
|
126
|
-
`)),c(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,M);var k=this.next;k!=null&&k.prev===this&&k.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===k.statics.formats(k.domNode)&&(k.optimize(M),k.moveChildren(this),k.remove())}},{key:"replace",value:function(M){c(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replace",this).call(this,M),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(k){var A=S.default.find(k);A==null?k.parentNode.removeChild(k):A instanceof S.default.Embed?A.remove():A.unwrap()})}}],[{key:"create",value:function(M){var k=c(R.__proto__||Object.getPrototypeOf(R),"create",this).call(this,M);return k.setAttribute("spellcheck",!1),k}},{key:"formats",value:function(){return!0}}]),R}(b.default);T.blotName="code-block",T.tagName="PRE",T.TAB=" ",r.Code=N,r.default=T},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},s=function(){function q(D,B){var U=[],W=!0,ee=!1,ne=void 0;try{for(var te=D[Symbol.iterator](),Z;!(W=(Z=te.next()).done)&&(U.push(Z.value),!(B&&U.length===B));W=!0);}catch(ae){ee=!0,ne=ae}finally{try{!W&&te.return&&te.return()}finally{if(ee)throw ne}}return U}return function(D,B){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return q(D,B);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function q(D,B){for(var U=0;U<B.length;U++){var W=B[U];W.enumerable=W.enumerable||!1,W.configurable=!0,"value"in W&&(W.writable=!0),Object.defineProperty(D,W.key,W)}}return function(D,B,U){return B&&q(D.prototype,B),U&&q(D,U),D}}(),f=a(2),E=k(f),_=a(20),S=k(_),w=a(0),b=k(w),y=a(13),v=k(y),g=a(24),O=k(g),h=a(4),p=k(h),m=a(16),x=k(m),N=a(21),T=k(N),I=a(11),R=k(I),C=a(3),M=k(C);function k(q){return q&&q.__esModule?q:{default:q}}function A(q,D,B){return D in q?Object.defineProperty(q,D,{value:B,enumerable:!0,configurable:!0,writable:!0}):q[D]=B,q}function L(q,D){if(!(q instanceof D))throw new TypeError("Cannot call a class as a function")}var z=/^[ -~]*$/,Y=function(){function q(D){L(this,q),this.scroll=D,this.delta=this.getDelta()}return c(q,[{key:"applyDelta",value:function(B){var U=this,W=!1;this.scroll.update();var ee=this.scroll.length();return this.scroll.batchStart(),B=X(B),B.reduce(function(ne,te){var Z=te.retain||te.delete||te.insert.length||1,ae=te.attributes||{};if(te.insert!=null){if(typeof te.insert=="string"){var H=te.insert;H.endsWith(`
|
|
127
|
-
`)&&W&&(W=!1,H=H.slice(0,-1)),ne>=ee&&!H.endsWith(`
|
|
128
|
-
`)&&(W=!0),U.scroll.insertAt(ne,H);var J=U.scroll.line(ne),ie=s(J,2),le=ie[0],ue=ie[1],he=(0,M.default)({},(0,h.bubbleFormats)(le));if(le instanceof p.default){var ye=le.descendant(b.default.Leaf,ue),Ce=s(ye,1),pe=Ce[0];he=(0,M.default)(he,(0,h.bubbleFormats)(pe))}ae=S.default.attributes.diff(he,ae)||{}}else if(l(te.insert)==="object"){var fe=Object.keys(te.insert)[0];if(fe==null)return ne;U.scroll.insertAt(ne,fe,te.insert[fe])}ee+=Z}return Object.keys(ae).forEach(function(ve){U.scroll.formatAt(ne,Z,ve,ae[ve])}),ne+Z},0),B.reduce(function(ne,te){return typeof te.delete=="number"?(U.scroll.deleteAt(ne,te.delete),ne):ne+(te.retain||te.insert.length||1)},0),this.scroll.batchEnd(),this.update(B)}},{key:"deleteText",value:function(B,U){return this.scroll.deleteAt(B,U),this.update(new E.default().retain(B).delete(U))}},{key:"formatLine",value:function(B,U){var W=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(ee).forEach(function(ne){if(!(W.scroll.whitelist!=null&&!W.scroll.whitelist[ne])){var te=W.scroll.lines(B,Math.max(U,1)),Z=U;te.forEach(function(ae){var H=ae.length();if(!(ae instanceof v.default))ae.format(ne,ee[ne]);else{var J=B-ae.offset(W.scroll),ie=ae.newlineIndex(J+Z)-J+1;ae.formatAt(J,ie,ne,ee[ne])}Z-=H})}}),this.scroll.optimize(),this.update(new E.default().retain(B).retain(U,(0,T.default)(ee)))}},{key:"formatText",value:function(B,U){var W=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(ee).forEach(function(ne){W.scroll.formatAt(B,U,ne,ee[ne])}),this.update(new E.default().retain(B).retain(U,(0,T.default)(ee)))}},{key:"getContents",value:function(B,U){return this.delta.slice(B,B+U)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(B,U){return B.concat(U.delta())},new E.default)}},{key:"getFormat",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,W=[],ee=[];U===0?this.scroll.path(B).forEach(function(te){var Z=s(te,1),ae=Z[0];ae instanceof p.default?W.push(ae):ae instanceof b.default.Leaf&&ee.push(ae)}):(W=this.scroll.lines(B,U),ee=this.scroll.descendants(b.default.Leaf,B,U));var ne=[W,ee].map(function(te){if(te.length===0)return{};for(var Z=(0,h.bubbleFormats)(te.shift());Object.keys(Z).length>0;){var ae=te.shift();if(ae==null)return Z;Z=$((0,h.bubbleFormats)(ae),Z)}return Z});return M.default.apply(M.default,ne)}},{key:"getText",value:function(B,U){return this.getContents(B,U).filter(function(W){return typeof W.insert=="string"}).map(function(W){return W.insert}).join("")}},{key:"insertEmbed",value:function(B,U,W){return this.scroll.insertAt(B,U,W),this.update(new E.default().retain(B).insert(A({},U,W)))}},{key:"insertText",value:function(B,U){var W=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return U=U.replace(/\r\n/g,`
|
|
129
|
-
`).replace(/\r/g,`
|
|
130
|
-
`),this.scroll.insertAt(B,U),Object.keys(ee).forEach(function(ne){W.scroll.formatAt(B,U.length,ne,ee[ne])}),this.update(new E.default().retain(B).insert(U,(0,T.default)(ee)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var B=this.scroll.children.head;return B.statics.blotName!==p.default.blotName||B.children.length>1?!1:B.children.head instanceof x.default}},{key:"removeFormat",value:function(B,U){var W=this.getText(B,U),ee=this.scroll.line(B+U),ne=s(ee,2),te=ne[0],Z=ne[1],ae=0,H=new E.default;te!=null&&(te instanceof v.default?ae=te.newlineIndex(Z)-Z+1:ae=te.length()-Z,H=te.delta().slice(Z,Z+ae-1).insert(`
|
|
131
|
-
`));var J=this.getContents(B,U+ae),ie=J.diff(new E.default().insert(W).concat(H)),le=new E.default().retain(B).concat(ie);return this.applyDelta(le)}},{key:"update",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,ee=this.delta;if(U.length===1&&U[0].type==="characterData"&&U[0].target.data.match(z)&&b.default.find(U[0].target)){var ne=b.default.find(U[0].target),te=(0,h.bubbleFormats)(ne),Z=ne.offset(this.scroll),ae=U[0].oldValue.replace(O.default.CONTENTS,""),H=new E.default().insert(ae),J=new E.default().insert(ne.value()),ie=new E.default().retain(Z).concat(H.diff(J,W));B=ie.reduce(function(le,ue){return ue.insert?le.insert(ue.insert,te):le.push(ue)},new E.default),this.delta=ee.compose(B)}else this.delta=this.getDelta(),(!B||!(0,R.default)(ee.compose(B),this.delta))&&(B=ee.diff(this.delta,W));return B}}]),q}();function $(q,D){return Object.keys(D).reduce(function(B,U){return q[U]==null||(D[U]===q[U]?B[U]=D[U]:Array.isArray(D[U])?D[U].indexOf(q[U])<0&&(B[U]=D[U].concat([q[U]])):B[U]=[D[U],q[U]]),B},{})}function X(q){return q.reduce(function(D,B){if(B.insert===1){var U=(0,T.default)(B.attributes);return delete U.image,D.insert({image:B.attributes.image},U)}if(B.attributes!=null&&(B.attributes.list===!0||B.attributes.bullet===!0)&&(B=(0,T.default)(B),B.attributes.list?B.attributes.list="ordered":(B.attributes.list="bullet",delete B.attributes.bullet)),typeof B.insert=="string"){var W=B.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return D.insert(W,B.attributes)}return D.push(B)},new E.default)}r.default=Y},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var l=function(){function I(R,C){var M=[],k=!0,A=!1,L=void 0;try{for(var z=R[Symbol.iterator](),Y;!(k=(Y=z.next()).done)&&(M.push(Y.value),!(C&&M.length===C));k=!0);}catch($){A=!0,L=$}finally{try{!k&&z.return&&z.return()}finally{if(A)throw L}}return M}return function(R,C){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return I(R,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function I(R,C){for(var M=0;M<C.length;M++){var k=C[M];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(R,k.key,k)}}return function(R,C,M){return C&&I(R.prototype,C),M&&I(R,M),R}}(),c=a(0),f=O(c),E=a(21),_=O(E),S=a(11),w=O(S),b=a(8),y=O(b),v=a(10),g=O(v);function O(I){return I&&I.__esModule?I:{default:I}}function h(I){if(Array.isArray(I)){for(var R=0,C=Array(I.length);R<I.length;R++)C[R]=I[R];return C}else return Array.from(I)}function p(I,R){if(!(I instanceof R))throw new TypeError("Cannot call a class as a function")}var m=(0,g.default)("quill:selection"),x=function I(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;p(this,I),this.index=R,this.length=C},N=function(){function I(R,C){var M=this;p(this,I),this.emitter=C,this.scroll=R,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new x(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){M.mouseDown||setTimeout(M.update.bind(M,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(k,A){k===y.default.events.TEXT_CHANGE&&A.length()>0&&M.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(M.hasFocus()){var k=M.getNativeRange();k!=null&&k.start.node!==M.cursor.textNode&&M.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{M.setNativeRange(k.start.node,k.start.offset,k.end.node,k.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(k,A){if(A.range){var L=A.range,z=L.startNode,Y=L.startOffset,$=L.endNode,X=L.endOffset;M.setNativeRange(z,Y,$,X)}}),this.update(y.default.sources.SILENT)}return s(I,[{key:"handleComposition",value:function(){var C=this;this.root.addEventListener("compositionstart",function(){C.composing=!0}),this.root.addEventListener("compositionend",function(){if(C.composing=!1,C.cursor.parent){var M=C.cursor.restore();if(!M)return;setTimeout(function(){C.setNativeRange(M.startNode,M.startOffset,M.endNode,M.endOffset)},1)}})}},{key:"handleDragging",value:function(){var C=this;this.emitter.listenDOM("mousedown",document.body,function(){C.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){C.mouseDown=!1,C.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(C,M){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[C])){this.scroll.update();var k=this.getNativeRange();if(!(k==null||!k.native.collapsed||f.default.query(C,f.default.Scope.BLOCK))){if(k.start.node!==this.cursor.textNode){var A=f.default.find(k.start.node,!1);if(A==null)return;if(A instanceof f.default.Leaf){var L=A.split(k.start.offset);A.parent.insertBefore(this.cursor,L)}else A.insertBefore(this.cursor,k.start.node);this.cursor.attach()}this.cursor.format(C,M),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,k=this.scroll.length();C=Math.min(C,k-1),M=Math.min(C+M,k-1)-C;var A=void 0,L=this.scroll.leaf(C),z=l(L,2),Y=z[0],$=z[1];if(Y==null)return null;var X=Y.position($,!0),q=l(X,2);A=q[0],$=q[1];var D=document.createRange();if(M>0){D.setStart(A,$);var B=this.scroll.leaf(C+M),U=l(B,2);if(Y=U[0],$=U[1],Y==null)return null;var W=Y.position($,!0),ee=l(W,2);return A=ee[0],$=ee[1],D.setEnd(A,$),D.getBoundingClientRect()}else{var ne="left",te=void 0;return A instanceof Text?($<A.data.length?(D.setStart(A,$),D.setEnd(A,$+1)):(D.setStart(A,$-1),D.setEnd(A,$),ne="right"),te=D.getBoundingClientRect()):(te=Y.domNode.getBoundingClientRect(),$>0&&(ne="right")),{bottom:te.top+te.height,height:te.height,left:te[ne],right:te[ne],top:te.top,width:0}}}},{key:"getNativeRange",value:function(){var C=document.getSelection();if(C==null||C.rangeCount<=0)return null;var M=C.getRangeAt(0);if(M==null)return null;var k=this.normalizeNative(M);return m.info("getNativeRange",k),k}},{key:"getRange",value:function(){var C=this.getNativeRange();if(C==null)return[null,null];var M=this.normalizedToRange(C);return[M,C]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(C){var M=this,k=[[C.start.node,C.start.offset]];C.native.collapsed||k.push([C.end.node,C.end.offset]);var A=k.map(function(Y){var $=l(Y,2),X=$[0],q=$[1],D=f.default.find(X,!0),B=D.offset(M.scroll);return q===0?B:D instanceof f.default.Container?B+D.length():B+D.index(X,q)}),L=Math.min(Math.max.apply(Math,h(A)),this.scroll.length()-1),z=Math.min.apply(Math,[L].concat(h(A)));return new x(z,L-z)}},{key:"normalizeNative",value:function(C){if(!T(this.root,C.startContainer)||!C.collapsed&&!T(this.root,C.endContainer))return null;var M={start:{node:C.startContainer,offset:C.startOffset},end:{node:C.endContainer,offset:C.endOffset},native:C};return[M.start,M.end].forEach(function(k){for(var A=k.node,L=k.offset;!(A instanceof Text)&&A.childNodes.length>0;)if(A.childNodes.length>L)A=A.childNodes[L],L=0;else if(A.childNodes.length===L)A=A.lastChild,L=A instanceof Text?A.data.length:A.childNodes.length+1;else break;k.node=A,k.offset=L}),M}},{key:"rangeToNative",value:function(C){var M=this,k=C.collapsed?[C.index]:[C.index,C.index+C.length],A=[],L=this.scroll.length();return k.forEach(function(z,Y){z=Math.min(L-1,z);var $=void 0,X=M.scroll.leaf(z),q=l(X,2),D=q[0],B=q[1],U=D.position(B,Y!==0),W=l(U,2);$=W[0],B=W[1],A.push($,B)}),A.length<2&&(A=A.concat(A)),A}},{key:"scrollIntoView",value:function(C){var M=this.lastRange;if(M!=null){var k=this.getBounds(M.index,M.length);if(k!=null){var A=this.scroll.length()-1,L=this.scroll.line(Math.min(M.index,A)),z=l(L,1),Y=z[0],$=Y;if(M.length>0){var X=this.scroll.line(Math.min(M.index+M.length,A)),q=l(X,1);$=q[0]}if(!(Y==null||$==null)){var D=C.getBoundingClientRect();k.top<D.top?C.scrollTop-=D.top-k.top:k.bottom>D.bottom&&(C.scrollTop+=k.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(C,M){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:M,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(m.info("setNativeRange",C,M,k,A),!(C!=null&&(this.root.parentNode==null||C.parentNode==null||k.parentNode==null))){var z=document.getSelection();if(z!=null)if(C!=null){this.hasFocus()||this.root.focus();var Y=(this.getNativeRange()||{}).native;if(Y==null||L||C!==Y.startContainer||M!==Y.startOffset||k!==Y.endContainer||A!==Y.endOffset){C.tagName=="BR"&&(M=[].indexOf.call(C.parentNode.childNodes,C),C=C.parentNode),k.tagName=="BR"&&(A=[].indexOf.call(k.parentNode.childNodes,k),k=k.parentNode);var $=document.createRange();$.setStart(C,M),$.setEnd(k,A),z.removeAllRanges(),z.addRange($)}}else z.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(C){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof M=="string"&&(k=M,M=!1),m.info("setRange",C),C!=null){var A=this.rangeToNative(C);this.setNativeRange.apply(this,h(A).concat([M]))}else this.setNativeRange(null);this.update(k)}},{key:"update",value:function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,M=this.lastRange,k=this.getRange(),A=l(k,2),L=A[0],z=A[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,w.default)(M,this.lastRange)){var Y;!this.composing&&z!=null&&z.native.collapsed&&z.start.node!==this.cursor.textNode&&this.cursor.restore();var $=[y.default.events.SELECTION_CHANGE,(0,_.default)(this.lastRange),(0,_.default)(M),C];if((Y=this.emitter).emit.apply(Y,[y.default.events.EDITOR_CHANGE].concat($)),C!==y.default.sources.SILENT){var X;(X=this.emitter).emit.apply(X,$)}}}}]),I}();function T(I,R){try{R.parentNode}catch{return!1}return R instanceof Text&&(R=R.parentNode),I.contains(R)}r.Range=x,r.default=N},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(v,g){for(var O=0;O<g.length;O++){var h=g[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,g,O){return g&&y(v.prototype,g),O&&y(v,O),v}}(),s=function y(v,g,O){v===null&&(v=Function.prototype);var h=Object.getOwnPropertyDescriptor(v,g);if(h===void 0){var p=Object.getPrototypeOf(v);return p===null?void 0:y(p,g,O)}else{if("value"in h)return h.value;var m=h.get;return m===void 0?void 0:m.call(O)}},c=a(0),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(){return _(this,v),S(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return l(v,[{key:"insertInto",value:function(O,h){O.children.length===0?s(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertInto",this).call(this,O,h):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),v}(f.default.Embed);b.blotName="break",b.tagName="BR",r.default=b},function(t,r,a){var l=this&&this.__extends||function(){var S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var y in b)b.hasOwnProperty(y)&&(w[y]=b[y])};return function(w,b){S(w,b);function y(){this.constructor=w}w.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(44),c=a(30),f=a(1),E=function(S){l(w,S);function w(b){var y=S.call(this,b)||this;return y.build(),y}return w.prototype.appendChild=function(b){this.insertBefore(b)},w.prototype.attach=function(){S.prototype.attach.call(this),this.children.forEach(function(b){b.attach()})},w.prototype.build=function(){var b=this;this.children=new s.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var v=_(y);b.insertBefore(v,b.children.head||void 0)}catch(g){if(g instanceof f.ParchmentError)return;throw g}})},w.prototype.deleteAt=function(b,y){if(b===0&&y===this.length())return this.remove();this.children.forEachAt(b,y,function(v,g,O){v.deleteAt(g,O)})},w.prototype.descendant=function(b,y){var v=this.children.find(y),g=v[0],O=v[1];return b.blotName==null&&b(g)||b.blotName!=null&&g instanceof b?[g,O]:g instanceof w?g.descendant(b,O):[null,-1]},w.prototype.descendants=function(b,y,v){y===void 0&&(y=0),v===void 0&&(v=Number.MAX_VALUE);var g=[],O=v;return this.children.forEachAt(y,v,function(h,p,m){(b.blotName==null&&b(h)||b.blotName!=null&&h instanceof b)&&g.push(h),h instanceof w&&(g=g.concat(h.descendants(b,p,O))),O-=m}),g},w.prototype.detach=function(){this.children.forEach(function(b){b.detach()}),S.prototype.detach.call(this)},w.prototype.formatAt=function(b,y,v,g){this.children.forEachAt(b,y,function(O,h,p){O.formatAt(h,p,v,g)})},w.prototype.insertAt=function(b,y,v){var g=this.children.find(b),O=g[0],h=g[1];if(O)O.insertAt(h,y,v);else{var p=v==null?f.create("text",y):f.create(y,v);this.appendChild(p)}},w.prototype.insertBefore=function(b,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(v){return b instanceof v}))throw new f.ParchmentError("Cannot insert "+b.statics.blotName+" into "+this.statics.blotName);b.insertInto(this,y)},w.prototype.length=function(){return this.children.reduce(function(b,y){return b+y.length()},0)},w.prototype.moveChildren=function(b,y){this.children.forEach(function(v){b.insertBefore(v,y)})},w.prototype.optimize=function(b){if(S.prototype.optimize.call(this,b),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(b)}else this.remove()},w.prototype.path=function(b,y){y===void 0&&(y=!1);var v=this.children.find(b,y),g=v[0],O=v[1],h=[[this,b]];return g instanceof w?h.concat(g.path(O,y)):(g!=null&&h.push([g,O]),h)},w.prototype.removeChild=function(b){this.children.remove(b)},w.prototype.replace=function(b){b instanceof w&&b.moveChildren(this),S.prototype.replace.call(this,b)},w.prototype.split=function(b,y){if(y===void 0&&(y=!1),!y){if(b===0)return this;if(b===this.length())return this.next}var v=this.clone();return this.parent.insertBefore(v,this.next),this.children.forEachAt(b,this.length(),function(g,O,h){g=g.split(O,y),v.appendChild(g)}),v},w.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},w.prototype.update=function(b,y){var v=this,g=[],O=[];b.forEach(function(h){h.target===v.domNode&&h.type==="childList"&&(g.push.apply(g,h.addedNodes),O.push.apply(O,h.removedNodes))}),O.forEach(function(h){if(!(h.parentNode!=null&&h.tagName!=="IFRAME"&&document.body.compareDocumentPosition(h)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var p=f.find(h);p!=null&&(p.domNode.parentNode==null||p.domNode.parentNode===v.domNode)&&p.detach()}}),g.filter(function(h){return h.parentNode==v.domNode}).sort(function(h,p){return h===p?0:h.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(h){var p=null;h.nextSibling!=null&&(p=f.find(h.nextSibling));var m=_(h);(m.next!=p||m.next==null)&&(m.parent!=null&&m.parent.removeChild(v),v.insertBefore(m,p||void 0))})},w}(c.default);function _(S){var w=f.find(S);if(w==null)try{w=f.create(S)}catch{w=f.create(f.Scope.INLINE),[].slice.call(S.childNodes).forEach(function(y){w.domNode.appendChild(y)}),S.parentNode&&S.parentNode.replaceChild(w.domNode,S),w.attach()}return w}r.default=E},function(t,r,a){var l=this&&this.__extends||function(){var S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var y in b)b.hasOwnProperty(y)&&(w[y]=b[y])};return function(w,b){S(w,b);function y(){this.constructor=w}w.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(12),c=a(31),f=a(17),E=a(1),_=function(S){l(w,S);function w(b){var y=S.call(this,b)||this;return y.attributes=new c.default(y.domNode),y}return w.formats=function(b){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return b.tagName.toLowerCase()},w.prototype.format=function(b,y){var v=E.query(b);v instanceof s.default?this.attributes.attribute(v,y):y&&v!=null&&(b!==this.statics.blotName||this.formats()[b]!==y)&&this.replaceWith(b,y)},w.prototype.formats=function(){var b=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(b[this.statics.blotName]=y),b},w.prototype.replaceWith=function(b,y){var v=S.prototype.replaceWith.call(this,b,y);return this.attributes.copy(v),v},w.prototype.update=function(b,y){var v=this;S.prototype.update.call(this,b,y),b.some(function(g){return g.target===v.domNode&&g.type==="attributes"})&&this.attributes.build()},w.prototype.wrap=function(b,y){var v=S.prototype.wrap.call(this,b,y);return v instanceof w&&v.statics.scope===this.statics.scope&&this.attributes.move(v),v},w}(f.default);r.default=_},function(t,r,a){var l=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,S){_.__proto__=S}||function(_,S){for(var w in S)S.hasOwnProperty(w)&&(_[w]=S[w])};return function(_,S){E(_,S);function w(){this.constructor=_}_.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(30),c=a(1),f=function(E){l(_,E);function _(){return E!==null&&E.apply(this,arguments)||this}return _.value=function(S){return!0},_.prototype.index=function(S,w){return this.domNode===S||this.domNode.compareDocumentPosition(S)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(w,1):-1},_.prototype.position=function(S,w){var b=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return S>0&&(b+=1),[this.parent.domNode,b]},_.prototype.value=function(){var S;return S={},S[this.statics.blotName]=this.statics.value(this.domNode)||!0,S},_.scope=c.Scope.INLINE_BLOT,_}(s.default);r.default=f},function(t,r,a){var l=a(11),s=a(3),c={attributes:{compose:function(E,_,S){typeof E!="object"&&(E={}),typeof _!="object"&&(_={});var w=s(!0,{},_);S||(w=Object.keys(w).reduce(function(y,v){return w[v]!=null&&(y[v]=w[v]),y},{}));for(var b in E)E[b]!==void 0&&_[b]===void 0&&(w[b]=E[b]);return Object.keys(w).length>0?w:void 0},diff:function(E,_){typeof E!="object"&&(E={}),typeof _!="object"&&(_={});var S=Object.keys(E).concat(Object.keys(_)).reduce(function(w,b){return l(E[b],_[b])||(w[b]=_[b]===void 0?null:_[b]),w},{});return Object.keys(S).length>0?S:void 0},transform:function(E,_,S){if(typeof E!="object")return _;if(typeof _=="object"){if(!S)return _;var w=Object.keys(_).reduce(function(b,y){return E[y]===void 0&&(b[y]=_[y]),b},{});return Object.keys(w).length>0?w:void 0}}},iterator:function(E){return new f(E)},length:function(E){return typeof E.delete=="number"?E.delete:typeof E.retain=="number"?E.retain:typeof E.insert=="string"?E.insert.length:1}};function f(E){this.ops=E,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(E){E||(E=1/0);var _=this.ops[this.index];if(_){var S=this.offset,w=c.length(_);if(E>=w-S?(E=w-S,this.index+=1,this.offset=0):this.offset+=E,typeof _.delete=="number")return{delete:E};var b={};return _.attributes&&(b.attributes=_.attributes),typeof _.retain=="number"?b.retain=E:typeof _.insert=="string"?b.insert=_.insert.substr(S,E):b.insert=_.insert,b}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var E=this.offset,_=this.index,S=this.next(),w=this.ops.slice(this.index);return this.offset=E,this.index=_,[S].concat(w)}else return[]},t.exports=c},function(t,r){var a=function(){function l(v,g){return g!=null&&v instanceof g}var s;try{s=Map}catch{s=function(){}}var c;try{c=Set}catch{c=function(){}}var f;try{f=Promise}catch{f=function(){}}function E(v,g,O,h,p){typeof g=="object"&&(O=g.depth,h=g.prototype,p=g.includeNonEnumerable,g=g.circular);var m=[],x=[],N=typeof Buffer<"u";typeof g>"u"&&(g=!0),typeof O>"u"&&(O=1/0);function T(I,R){if(I===null)return null;if(R===0)return I;var C,M;if(typeof I!="object")return I;if(l(I,s))C=new s;else if(l(I,c))C=new c;else if(l(I,f))C=new f(function(D,B){I.then(function(U){D(T(U,R-1))},function(U){B(T(U,R-1))})});else if(E.__isArray(I))C=[];else if(E.__isRegExp(I))C=new RegExp(I.source,y(I)),I.lastIndex&&(C.lastIndex=I.lastIndex);else if(E.__isDate(I))C=new Date(I.getTime());else{if(N&&Buffer.isBuffer(I))return Buffer.allocUnsafe?C=Buffer.allocUnsafe(I.length):C=new Buffer(I.length),I.copy(C),C;l(I,Error)?C=Object.create(I):typeof h>"u"?(M=Object.getPrototypeOf(I),C=Object.create(M)):(C=Object.create(h),M=h)}if(g){var k=m.indexOf(I);if(k!=-1)return x[k];m.push(I),x.push(C)}l(I,s)&&I.forEach(function(D,B){var U=T(B,R-1),W=T(D,R-1);C.set(U,W)}),l(I,c)&&I.forEach(function(D){var B=T(D,R-1);C.add(B)});for(var A in I){var L;M&&(L=Object.getOwnPropertyDescriptor(M,A)),!(L&&L.set==null)&&(C[A]=T(I[A],R-1))}if(Object.getOwnPropertySymbols)for(var z=Object.getOwnPropertySymbols(I),A=0;A<z.length;A++){var Y=z[A],$=Object.getOwnPropertyDescriptor(I,Y);$&&!$.enumerable&&!p||(C[Y]=T(I[Y],R-1),$.enumerable||Object.defineProperty(C,Y,{enumerable:!1}))}if(p)for(var X=Object.getOwnPropertyNames(I),A=0;A<X.length;A++){var q=X[A],$=Object.getOwnPropertyDescriptor(I,q);$&&$.enumerable||(C[q]=T(I[q],R-1),Object.defineProperty(C,q,{enumerable:!1}))}return C}return T(v,O)}E.clonePrototype=function(g){if(g===null)return null;var O=function(){};return O.prototype=g,new O};function _(v){return Object.prototype.toString.call(v)}E.__objToStr=_;function S(v){return typeof v=="object"&&_(v)==="[object Date]"}E.__isDate=S;function w(v){return typeof v=="object"&&_(v)==="[object Array]"}E.__isArray=w;function b(v){return typeof v=="object"&&_(v)==="[object RegExp]"}E.__isRegExp=b;function y(v){var g="";return v.global&&(g+="g"),v.ignoreCase&&(g+="i"),v.multiline&&(g+="m"),g}return E.__getRegExpFlags=y,E}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function C(M,k){var A=[],L=!0,z=!1,Y=void 0;try{for(var $=M[Symbol.iterator](),X;!(L=(X=$.next()).done)&&(A.push(X.value),!(k&&A.length===k));L=!0);}catch(q){z=!0,Y=q}finally{try{!L&&$.return&&$.return()}finally{if(z)throw Y}}return A}return function(M,k){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return C(M,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function C(M,k){for(var A=0;A<k.length;A++){var L=k[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(M,L.key,L)}}return function(M,k,A){return k&&C(M.prototype,k),A&&C(M,A),M}}(),c=function C(M,k,A){M===null&&(M=Function.prototype);var L=Object.getOwnPropertyDescriptor(M,k);if(L===void 0){var z=Object.getPrototypeOf(M);return z===null?void 0:C(z,k,A)}else{if("value"in L)return L.value;var Y=L.get;return Y===void 0?void 0:Y.call(A)}},f=a(0),E=m(f),_=a(8),S=m(_),w=a(4),b=m(w),y=a(16),v=m(y),g=a(13),O=m(g),h=a(25),p=m(h);function m(C){return C&&C.__esModule?C:{default:C}}function x(C,M){if(!(C instanceof M))throw new TypeError("Cannot call a class as a function")}function N(C,M){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:C}function T(C,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);C.prototype=Object.create(M&&M.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(C,M):C.__proto__=M)}function I(C){return C instanceof b.default||C instanceof w.BlockEmbed}var R=function(C){T(M,C);function M(k,A){x(this,M);var L=N(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,k));return L.emitter=A.emitter,Array.isArray(A.whitelist)&&(L.whitelist=A.whitelist.reduce(function(z,Y){return z[Y]=!0,z},{})),L.domNode.addEventListener("DOMNodeInserted",function(){}),L.optimize(),L.enable(),L}return s(M,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(A,L){var z=this.line(A),Y=l(z,2),$=Y[0],X=Y[1],q=this.line(A+L),D=l(q,1),B=D[0];if(c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"deleteAt",this).call(this,A,L),B!=null&&$!==B&&X>0){if($ instanceof w.BlockEmbed||B instanceof w.BlockEmbed){this.optimize();return}if($ instanceof O.default){var U=$.newlineIndex($.length(),!0);if(U>-1&&($=$.split(U+1),$===B)){this.optimize();return}}else if(B instanceof O.default){var W=B.newlineIndex(0);W>-1&&B.split(W+1)}var ee=B.children.head instanceof v.default?null:B.children.head;$.moveChildren(B,ee),$.remove()}this.optimize()}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",A)}},{key:"formatAt",value:function(A,L,z,Y){this.whitelist!=null&&!this.whitelist[z]||(c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"formatAt",this).call(this,A,L,z,Y),this.optimize())}},{key:"insertAt",value:function(A,L,z){if(!(z!=null&&this.whitelist!=null&&!this.whitelist[L])){if(A>=this.length())if(z==null||E.default.query(L,E.default.Scope.BLOCK)==null){var Y=E.default.create(this.statics.defaultChild);this.appendChild(Y),z==null&&L.endsWith(`
|
|
134
|
-
`)&&(L=L.slice(0,-1)),Y.insertAt(0,L,z)}else{var $=E.default.create(L,z);this.appendChild($)}else c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,A,L,z);this.optimize()}}},{key:"insertBefore",value:function(A,L){if(A.statics.scope===E.default.Scope.INLINE_BLOT){var z=E.default.create(this.statics.defaultChild);z.appendChild(A),A=z}c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,A,L)}},{key:"leaf",value:function(A){return this.path(A).pop()||[null,-1]}},{key:"line",value:function(A){return A===this.length()?this.line(A-1):this.descendant(I,A)}},{key:"lines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,z=function Y($,X,q){var D=[],B=q;return $.children.forEachAt(X,q,function(U,W,ee){I(U)?D.push(U):U instanceof E.default.Container&&(D=D.concat(Y(U,W,B))),B-=ee}),D};return z(this,A,L)}},{key:"optimize",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,A,L),A.length>0&&this.emitter.emit(S.default.events.SCROLL_OPTIMIZE,A,L))}},{key:"path",value:function(A){return c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,A).slice(1)}},{key:"update",value:function(A){if(this.batch!==!0){var L=S.default.sources.USER;typeof A=="string"&&(L=A),Array.isArray(A)||(A=this.observer.takeRecords()),A.length>0&&this.emitter.emit(S.default.events.SCROLL_BEFORE_UPDATE,L,A),c(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"update",this).call(this,A.concat([])),A.length>0&&this.emitter.emit(S.default.events.SCROLL_UPDATE,L,A)}}}]),M}(E.default.Scroll);R.blotName="scroll",R.className="ql-editor",R.tagName="DIV",R.defaultChild="block",R.allowedChildren=[b.default,w.BlockEmbed,p.default],r.default=R},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},s=function(){function te(Z,ae){var H=[],J=!0,ie=!1,le=void 0;try{for(var ue=Z[Symbol.iterator](),he;!(J=(he=ue.next()).done)&&(H.push(he.value),!(ae&&H.length===ae));J=!0);}catch(ye){ie=!0,le=ye}finally{try{!J&&ue.return&&ue.return()}finally{if(ie)throw le}}return H}return function(Z,ae){if(Array.isArray(Z))return Z;if(Symbol.iterator in Object(Z))return te(Z,ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function te(Z,ae){for(var H=0;H<ae.length;H++){var J=ae[H];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(Z,J.key,J)}}return function(Z,ae,H){return ae&&te(Z.prototype,ae),H&&te(Z,H),Z}}(),f=a(21),E=C(f),_=a(11),S=C(_),w=a(3),b=C(w),y=a(2),v=C(y),g=a(20),O=C(g),h=a(0),p=C(h),m=a(5),x=C(m),N=a(10),T=C(N),I=a(9),R=C(I);function C(te){return te&&te.__esModule?te:{default:te}}function M(te,Z,ae){return Z in te?Object.defineProperty(te,Z,{value:ae,enumerable:!0,configurable:!0,writable:!0}):te[Z]=ae,te}function k(te,Z){if(!(te instanceof Z))throw new TypeError("Cannot call a class as a function")}function A(te,Z){if(!te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z&&(typeof Z=="object"||typeof Z=="function")?Z:te}function L(te,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Z);te.prototype=Object.create(Z&&Z.prototype,{constructor:{value:te,enumerable:!1,writable:!0,configurable:!0}}),Z&&(Object.setPrototypeOf?Object.setPrototypeOf(te,Z):te.__proto__=Z)}var z=(0,T.default)("quill:keyboard"),Y=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",$=function(te){L(Z,te),c(Z,null,[{key:"match",value:function(H,J){return J=ne(J),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ie){return!!J[ie]!==H[ie]&&J[ie]!==null})?!1:J.key===(H.which||H.keyCode)}}]);function Z(ae,H){k(this,Z);var J=A(this,(Z.__proto__||Object.getPrototypeOf(Z)).call(this,ae,H));return J.bindings={},Object.keys(J.options.bindings).forEach(function(ie){ie==="list autofill"&&ae.scroll.whitelist!=null&&!ae.scroll.whitelist.list||J.options.bindings[ie]&&J.addBinding(J.options.bindings[ie])}),J.addBinding({key:Z.keys.ENTER,shiftKey:null},U),J.addBinding({key:Z.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!0},q),J.addBinding({key:Z.keys.DELETE},{collapsed:!0},D)):(J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},q),J.addBinding({key:Z.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!1},B),J.addBinding({key:Z.keys.DELETE},{collapsed:!1},B),J.addBinding({key:Z.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},q),J.listen(),J}return c(Z,[{key:"addBinding",value:function(H){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},le=ne(H);if(le==null||le.key==null)return z.warn("Attempted to add invalid keyboard binding",le);typeof J=="function"&&(J={handler:J}),typeof ie=="function"&&(ie={handler:ie}),le=(0,b.default)(le,J,ie),this.bindings[le.key]=this.bindings[le.key]||[],this.bindings[le.key].push(le)}},{key:"listen",value:function(){var H=this;this.quill.root.addEventListener("keydown",function(J){if(!J.defaultPrevented){var ie=J.which||J.keyCode,le=(H.bindings[ie]||[]).filter(function(Xe){return Z.match(J,Xe)});if(le.length!==0){var ue=H.quill.getSelection();if(!(ue==null||!H.quill.hasFocus())){var he=H.quill.getLine(ue.index),ye=s(he,2),Ce=ye[0],pe=ye[1],fe=H.quill.getLeaf(ue.index),ve=s(fe,2),xe=ve[0],Te=ve[1],ce=ue.length===0?[xe,Te]:H.quill.getLeaf(ue.index+ue.length),me=s(ce,2),Oe=me[0],Ne=me[1],tt=xe instanceof p.default.Text?xe.value().slice(0,Te):"",rt=Oe instanceof p.default.Text?Oe.value().slice(Ne):"",He={collapsed:ue.length===0,empty:ue.length===0&&Ce.length()<=1,format:H.quill.getFormat(ue),offset:pe,prefix:tt,suffix:rt},$e=le.some(function(Xe){if(Xe.collapsed!=null&&Xe.collapsed!==He.collapsed||Xe.empty!=null&&Xe.empty!==He.empty||Xe.offset!=null&&Xe.offset!==He.offset)return!1;if(Array.isArray(Xe.format)){if(Xe.format.every(function(De){return He.format[De]==null}))return!1}else if(l(Xe.format)==="object"&&!Object.keys(Xe.format).every(function(De){return Xe.format[De]===!0?He.format[De]!=null:Xe.format[De]===!1?He.format[De]==null:(0,S.default)(Xe.format[De],He.format[De])}))return!1;return Xe.prefix!=null&&!Xe.prefix.test(He.prefix)||Xe.suffix!=null&&!Xe.suffix.test(He.suffix)?!1:Xe.handler.call(H,ue,He)!==!0});$e&&J.preventDefault()}}}})}}]),Z}(R.default);$.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},$.DEFAULTS={bindings:{bold:ee("bold"),italic:ee("italic"),underline:ee("underline"),indent:{key:$.keys.TAB,format:["blockquote","indent","list"],handler:function(Z,ae){if(ae.collapsed&&ae.offset!==0)return!0;this.quill.format("indent","+1",x.default.sources.USER)}},outdent:{key:$.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Z,ae){if(ae.collapsed&&ae.offset!==0)return!0;this.quill.format("indent","-1",x.default.sources.USER)}},"outdent backspace":{key:$.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Z,ae){ae.format.indent!=null?this.quill.format("indent","-1",x.default.sources.USER):ae.format.list!=null&&this.quill.format("list",!1,x.default.sources.USER)}},"indent code-block":W(!0),"outdent code-block":W(!1),"remove tab":{key:$.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Z){this.quill.deleteText(Z.index-1,1,x.default.sources.USER)}},tab:{key:$.keys.TAB,handler:function(Z){this.quill.history.cutoff();var ae=new v.default().retain(Z.index).delete(Z.length).insert(" ");this.quill.updateContents(ae,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Z.index+1,x.default.sources.SILENT)}},"list empty enter":{key:$.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Z,ae){this.quill.format("list",!1,x.default.sources.USER),ae.format.indent&&this.quill.format("indent",!1,x.default.sources.USER)}},"checklist enter":{key:$.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Z){var ae=this.quill.getLine(Z.index),H=s(ae,2),J=H[0],ie=H[1],le=(0,b.default)({},J.formats(),{list:"checked"}),ue=new v.default().retain(Z.index).insert(`
|
|
135
|
-
`,le).retain(J.length()-ie-1).retain(1,{list:"unchecked"});this.quill.updateContents(ue,x.default.sources.USER),this.quill.setSelection(Z.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:$.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Z,ae){var H=this.quill.getLine(Z.index),J=s(H,2),ie=J[0],le=J[1],ue=new v.default().retain(Z.index).insert(`
|
|
136
|
-
`,ae.format).retain(ie.length()-le-1).retain(1,{header:null});this.quill.updateContents(ue,x.default.sources.USER),this.quill.setSelection(Z.index+1,x.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Z,ae){var H=ae.prefix.length,J=this.quill.getLine(Z.index),ie=s(J,2),le=ie[0],ue=ie[1];if(ue>H)return!0;var he=void 0;switch(ae.prefix.trim()){case"[]":case"[ ]":he="unchecked";break;case"[x]":he="checked";break;case"-":case"*":he="bullet";break;default:he="ordered"}this.quill.insertText(Z.index," ",x.default.sources.USER),this.quill.history.cutoff();var ye=new v.default().retain(Z.index-ue).delete(H+1).retain(le.length()-2-ue).retain(1,{list:he});this.quill.updateContents(ye,x.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Z.index-H,x.default.sources.SILENT)}},"code exit":{key:$.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Z){var ae=this.quill.getLine(Z.index),H=s(ae,2),J=H[0],ie=H[1],le=new v.default().retain(Z.index+J.length()-ie-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(le,x.default.sources.USER)}},"embed left":X($.keys.LEFT,!1),"embed left shift":X($.keys.LEFT,!0),"embed right":X($.keys.RIGHT,!1),"embed right shift":X($.keys.RIGHT,!0)}};function X(te,Z){var ae,H=te===$.keys.LEFT?"prefix":"suffix";return ae={key:te,shiftKey:Z,altKey:null},M(ae,H,/^$/),M(ae,"handler",function(ie){var le=ie.index;te===$.keys.RIGHT&&(le+=ie.length+1);var ue=this.quill.getLeaf(le),he=s(ue,1),ye=he[0];return ye instanceof p.default.Embed?(te===$.keys.LEFT?Z?this.quill.setSelection(ie.index-1,ie.length+1,x.default.sources.USER):this.quill.setSelection(ie.index-1,x.default.sources.USER):Z?this.quill.setSelection(ie.index,ie.length+1,x.default.sources.USER):this.quill.setSelection(ie.index+ie.length+1,x.default.sources.USER),!1):!0}),ae}function q(te,Z){if(!(te.index===0||this.quill.getLength()<=1)){var ae=this.quill.getLine(te.index),H=s(ae,1),J=H[0],ie={};if(Z.offset===0){var le=this.quill.getLine(te.index-1),ue=s(le,1),he=ue[0];if(he!=null&&he.length()>1){var ye=J.formats(),Ce=this.quill.getFormat(te.index-1,1);ie=O.default.attributes.diff(ye,Ce)||{}}}var pe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Z.prefix)?2:1;this.quill.deleteText(te.index-pe,pe,x.default.sources.USER),Object.keys(ie).length>0&&this.quill.formatLine(te.index-pe,pe,ie,x.default.sources.USER),this.quill.focus()}}function D(te,Z){var ae=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Z.suffix)?2:1;if(!(te.index>=this.quill.getLength()-ae)){var H={},J=0,ie=this.quill.getLine(te.index),le=s(ie,1),ue=le[0];if(Z.offset>=ue.length()-1){var he=this.quill.getLine(te.index+1),ye=s(he,1),Ce=ye[0];if(Ce){var pe=ue.formats(),fe=this.quill.getFormat(te.index,1);H=O.default.attributes.diff(pe,fe)||{},J=Ce.length()}}this.quill.deleteText(te.index,ae,x.default.sources.USER),Object.keys(H).length>0&&this.quill.formatLine(te.index+J-1,ae,H,x.default.sources.USER)}}function B(te){var Z=this.quill.getLines(te),ae={};if(Z.length>1){var H=Z[0].formats(),J=Z[Z.length-1].formats();ae=O.default.attributes.diff(J,H)||{}}this.quill.deleteText(te,x.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(te.index,1,ae,x.default.sources.USER),this.quill.setSelection(te.index,x.default.sources.SILENT),this.quill.focus()}function U(te,Z){var ae=this;te.length>0&&this.quill.scroll.deleteAt(te.index,te.length);var H=Object.keys(Z.format).reduce(function(J,ie){return p.default.query(ie,p.default.Scope.BLOCK)&&!Array.isArray(Z.format[ie])&&(J[ie]=Z.format[ie]),J},{});this.quill.insertText(te.index,`
|
|
137
|
-
`,H,x.default.sources.USER),this.quill.setSelection(te.index+1,x.default.sources.SILENT),this.quill.focus(),Object.keys(Z.format).forEach(function(J){H[J]==null&&(Array.isArray(Z.format[J])||J!=="link"&&ae.quill.format(J,Z.format[J],x.default.sources.USER))})}function W(te){return{key:$.keys.TAB,shiftKey:!te,format:{"code-block":!0},handler:function(ae){var H=p.default.query("code-block"),J=ae.index,ie=ae.length,le=this.quill.scroll.descendant(H,J),ue=s(le,2),he=ue[0],ye=ue[1];if(he!=null){var Ce=this.quill.getIndex(he),pe=he.newlineIndex(ye,!0)+1,fe=he.newlineIndex(Ce+ye+ie),ve=he.domNode.textContent.slice(pe,fe).split(`
|
|
138
|
-
`);ye=0,ve.forEach(function(xe,Te){te?(he.insertAt(pe+ye,H.TAB),ye+=H.TAB.length,Te===0?J+=H.TAB.length:ie+=H.TAB.length):xe.startsWith(H.TAB)&&(he.deleteAt(pe+ye,H.TAB.length),ye-=H.TAB.length,Te===0?J-=H.TAB.length:ie-=H.TAB.length),ye+=xe.length+1}),this.quill.update(x.default.sources.USER),this.quill.setSelection(J,ie,x.default.sources.SILENT)}}}}function ee(te){return{key:te[0].toUpperCase(),shortKey:!0,handler:function(ae,H){this.quill.format(te,!H.format[te],x.default.sources.USER)}}}function ne(te){if(typeof te=="string"||typeof te=="number")return ne({key:te});if((typeof te>"u"?"undefined":l(te))==="object"&&(te=(0,E.default)(te,!1)),typeof te.key=="string")if($.keys[te.key.toUpperCase()]!=null)te.key=$.keys[te.key.toUpperCase()];else if(te.key.length===1)te.key=te.key.toUpperCase().charCodeAt(0);else return null;return te.shortKey&&(te[Y]=te.shortKey,delete te.shortKey),te}r.default=$,r.SHORTKEY=Y},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function O(h,p){var m=[],x=!0,N=!1,T=void 0;try{for(var I=h[Symbol.iterator](),R;!(x=(R=I.next()).done)&&(m.push(R.value),!(p&&m.length===p));x=!0);}catch(C){N=!0,T=C}finally{try{!x&&I.return&&I.return()}finally{if(N)throw T}}return m}return function(h,p){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return O(h,p);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function O(h,p,m){h===null&&(h=Function.prototype);var x=Object.getOwnPropertyDescriptor(h,p);if(x===void 0){var N=Object.getPrototypeOf(h);return N===null?void 0:O(N,p,m)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(m)}},c=function(){function O(h,p){for(var m=0;m<p.length;m++){var x=p[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,x.key,x)}}return function(h,p,m){return p&&O(h.prototype,p),m&&O(h,m),h}}(),f=a(0),E=w(f),_=a(7),S=w(_);function w(O){return O&&O.__esModule?O:{default:O}}function b(O,h){if(!(O instanceof h))throw new TypeError("Cannot call a class as a function")}function y(O,h){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:O}function v(O,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);O.prototype=Object.create(h&&h.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(O,h):O.__proto__=h)}var g=function(O){v(h,O),c(h,null,[{key:"value",value:function(){}}]);function h(p,m){b(this,h);var x=y(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,p));return x.selection=m,x.textNode=document.createTextNode(h.CONTENTS),x.domNode.appendChild(x.textNode),x._length=0,x}return c(h,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(m,x){if(this._length!==0)return s(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,m,x);for(var N=this,T=0;N!=null&&N.statics.scope!==E.default.Scope.BLOCK_BLOT;)T+=N.offset(N.parent),N=N.parent;N!=null&&(this._length=h.CONTENTS.length,N.optimize(),N.formatAt(T,h.CONTENTS.length,m,x),this._length=0)}},{key:"index",value:function(m,x){return m===this.textNode?0:s(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"index",this).call(this,m,x)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){s(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var m=this.textNode,x=this.selection.getNativeRange(),N=void 0,T=void 0,I=void 0;if(x!=null&&x.start.node===m&&x.end.node===m){var R=[m,x.start.offset,x.end.offset];N=R[0],T=R[1],I=R[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==h.CONTENTS){var C=this.textNode.data.split(h.CONTENTS).join("");this.next instanceof S.default?(N=this.next.domNode,this.next.insertAt(0,C),this.textNode.data=h.CONTENTS):(this.textNode.data=C,this.parent.insertBefore(E.default.create(this.textNode),this),this.textNode=document.createTextNode(h.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),T!=null){var M=[T,I].map(function(A){return Math.max(0,Math.min(N.data.length,A-1))}),k=l(M,2);return T=k[0],I=k[1],{startNode:N,startOffset:T,endNode:N,endOffset:I}}}}},{key:"update",value:function(m,x){var N=this;if(m.some(function(I){return I.type==="characterData"&&I.target===N.textNode})){var T=this.restore();T&&(x.range=T)}}},{key:"value",value:function(){return""}}]),h}(E.default.Embed);g.blotName="cursor",g.className="ql-cursor",g.tagName="span",g.CONTENTS="\uFEFF",r.default=g},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(0),s=E(l),c=a(4),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(){return _(this,v),S(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(s.default.Container);b.allowedChildren=[f.default,c.BlockEmbed,b],r.default=b},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var l=function(){function g(O,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(O,m.key,m)}}return function(O,h,p){return h&&g(O.prototype,h),p&&g(O,p),O}}(),s=function g(O,h,p){O===null&&(O=Function.prototype);var m=Object.getOwnPropertyDescriptor(O,h);if(m===void 0){var x=Object.getPrototypeOf(O);return x===null?void 0:g(x,h,p)}else{if("value"in m)return m.value;var N=m.get;return N===void 0?void 0:N.call(p)}},c=a(0),f=E(c);function E(g){return g&&g.__esModule?g:{default:g}}function _(g,O){if(!(g instanceof O))throw new TypeError("Cannot call a class as a function")}function S(g,O){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:g}function w(g,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);g.prototype=Object.create(O&&O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(g,O):g.__proto__=O)}var b=function(g){w(O,g);function O(){return _(this,O),S(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return l(O,[{key:"value",value:function(p){var m=s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"value",this).call(this,p);return m.startsWith("rgb(")?(m=m.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+m.split(",").map(function(x){return("00"+parseInt(x).toString(16)).slice(-2)}).join("")):m}}]),O}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),v=new b("color","color",{scope:f.default.Scope.INLINE});r.ColorAttributor=b,r.ColorClass=y,r.ColorStyle=v},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var l=function(){function v(g,O){for(var h=0;h<O.length;h++){var p=O[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}return function(g,O,h){return O&&v(g.prototype,O),h&&v(g,h),g}}(),s=function v(g,O,h){g===null&&(g=Function.prototype);var p=Object.getOwnPropertyDescriptor(g,O);if(p===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:v(m,O,h)}else{if("value"in p)return p.value;var x=p.get;return x===void 0?void 0:x.call(h)}},c=a(6),f=E(c);function E(v){return v&&v.__esModule?v:{default:v}}function _(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function S(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function w(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var b=function(v){w(g,v);function g(){return _(this,g),S(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"format",value:function(h,p){if(h!==this.statics.blotName||!p)return s(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,h,p);p=this.constructor.sanitize(p),this.domNode.setAttribute("href",p)}}],[{key:"create",value:function(h){var p=s(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,h);return h=this.sanitize(h),p.setAttribute("href",h),p.setAttribute("rel","noopener noreferrer"),p.setAttribute("target","_blank"),p}},{key:"formats",value:function(h){return h.getAttribute("href")}},{key:"sanitize",value:function(h){return y(h,this.PROTOCOL_WHITELIST)?h:this.SANITIZED_URL}}]),g}(f.default);b.blotName="link",b.tagName="A",b.SANITIZED_URL="about:blank",b.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(v,g){var O=document.createElement("a");O.href=v;var h=O.href.slice(0,O.href.indexOf(":"));return g.indexOf(h)>-1}r.default=b,r.sanitize=y},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s=function(){function g(O,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(O,m.key,m)}}return function(O,h,p){return h&&g(O.prototype,h),p&&g(O,p),O}}(),c=a(23),f=S(c),E=a(107),_=S(E);function S(g){return g&&g.__esModule?g:{default:g}}function w(g,O){if(!(g instanceof O))throw new TypeError("Cannot call a class as a function")}var b=0;function y(g,O){g.setAttribute(O,g.getAttribute(O)!=="true")}var v=function(){function g(O){var h=this;w(this,g),this.select=O,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(){h.togglePicker()}),this.label.addEventListener("keydown",function(p){switch(p.keyCode){case f.default.keys.ENTER:h.togglePicker();break;case f.default.keys.ESCAPE:h.escape(),p.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return s(g,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(h){var p=this,m=document.createElement("span");return m.tabIndex="0",m.setAttribute("role","button"),m.classList.add("ql-picker-item"),h.hasAttribute("value")&&m.setAttribute("data-value",h.getAttribute("value")),h.textContent&&m.setAttribute("data-label",h.textContent),m.addEventListener("click",function(){p.selectItem(m,!0)}),m.addEventListener("keydown",function(x){switch(x.keyCode){case f.default.keys.ENTER:p.selectItem(m,!0),x.preventDefault();break;case f.default.keys.ESCAPE:p.escape(),x.preventDefault();break}}),m}},{key:"buildLabel",value:function(){var h=document.createElement("span");return h.classList.add("ql-picker-label"),h.innerHTML=_.default,h.tabIndex="0",h.setAttribute("role","button"),h.setAttribute("aria-expanded","false"),this.container.appendChild(h),h}},{key:"buildOptions",value:function(){var h=this,p=document.createElement("span");p.classList.add("ql-picker-options"),p.setAttribute("aria-hidden","true"),p.tabIndex="-1",p.id="ql-picker-options-"+b,b+=1,this.label.setAttribute("aria-controls",p.id),this.options=p,[].slice.call(this.select.options).forEach(function(m){var x=h.buildItem(m);p.appendChild(x),m.selected===!0&&h.selectItem(x)}),this.container.appendChild(p)}},{key:"buildPicker",value:function(){var h=this;[].slice.call(this.select.attributes).forEach(function(p){h.container.setAttribute(p.name,p.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var h=this;this.close(),setTimeout(function(){return h.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(h){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=this.container.querySelector(".ql-selected");if(h!==m&&(m!=null&&m.classList.remove("ql-selected"),h!=null&&(h.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(h.parentNode.children,h),h.hasAttribute("data-value")?this.label.setAttribute("data-value",h.getAttribute("data-value")):this.label.removeAttribute("data-value"),h.hasAttribute("data-label")?this.label.setAttribute("data-label",h.getAttribute("data-label")):this.label.removeAttribute("data-label"),p))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":l(Event))==="object"){var x=document.createEvent("Event");x.initEvent("change",!0,!0),this.select.dispatchEvent(x)}this.close()}}},{key:"update",value:function(){var h=void 0;if(this.select.selectedIndex>-1){var p=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];h=this.select.options[this.select.selectedIndex],this.selectItem(p)}else this.selectItem(null);var m=h!=null&&h!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",m)}}]),g}();r.default=v},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(0),s=z(l),c=a(5),f=z(c),E=a(4),_=z(E),S=a(16),w=z(S),b=a(25),y=z(b),v=a(24),g=z(v),O=a(35),h=z(O),p=a(6),m=z(p),x=a(22),N=z(x),T=a(7),I=z(T),R=a(55),C=z(R),M=a(42),k=z(M),A=a(23),L=z(A);function z(Y){return Y&&Y.__esModule?Y:{default:Y}}f.default.register({"blots/block":_.default,"blots/block/embed":E.BlockEmbed,"blots/break":w.default,"blots/container":y.default,"blots/cursor":g.default,"blots/embed":h.default,"blots/inline":m.default,"blots/scroll":N.default,"blots/text":I.default,"modules/clipboard":C.default,"modules/history":k.default,"modules/keyboard":L.default}),s.default.register(_.default,w.default,g.default,m.default,N.default,I.default),r.default=f.default},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(1),s=function(){function c(f){this.domNode=f,this.domNode[l.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(f){if(this.tagName==null)throw new l.ParchmentError("Blot definition missing tagName");var E;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?E=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?E=document.createElement(f):E=document.createElement(this.tagName[0])):E=document.createElement(this.tagName),this.className&&E.classList.add(this.className),E},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return l.create(f)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[l.DATA_KEY]},c.prototype.deleteAt=function(f,E){var _=this.isolate(f,E);_.remove()},c.prototype.formatAt=function(f,E,_,S){var w=this.isolate(f,E);if(l.query(_,l.Scope.BLOT)!=null&&S)w.wrap(_,S);else if(l.query(_,l.Scope.ATTRIBUTE)!=null){var b=l.create(this.statics.scope);w.wrap(b),b.format(_,S)}},c.prototype.insertAt=function(f,E,_){var S=_==null?l.create("text",E):l.create(E,_),w=this.split(f);this.parent.insertBefore(S,w)},c.prototype.insertInto=function(f,E){E===void 0&&(E=null),this.parent!=null&&this.parent.children.remove(this);var _=null;f.children.insertBefore(this,E),E!=null&&(_=E.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=_)&&f.domNode.insertBefore(this.domNode,_),this.parent=f,this.attach()},c.prototype.isolate=function(f,E){var _=this.split(f);return _.split(E),_},c.prototype.length=function(){return 1},c.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},c.prototype.optimize=function(f){this.domNode[l.DATA_KEY]!=null&&delete this.domNode[l.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},c.prototype.replaceWith=function(f,E){var _=typeof f=="string"?l.create(f,E):f;return _.replace(this),_},c.prototype.split=function(f,E){return f===0?this:this.next},c.prototype.update=function(f,E){},c.prototype.wrap=function(f,E){var _=typeof f=="string"?l.create(f,E):f;return this.parent!=null&&this.parent.insertBefore(_,this.next),_.appendChild(this),_},c.blotName="abstract",c}();r.default=s},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(12),s=a(32),c=a(33),f=a(1),E=function(){function _(S){this.attributes={},this.domNode=S,this.build()}return _.prototype.attribute=function(S,w){w?S.add(this.domNode,w)&&(S.value(this.domNode)!=null?this.attributes[S.attrName]=S:delete this.attributes[S.attrName]):(S.remove(this.domNode),delete this.attributes[S.attrName])},_.prototype.build=function(){var S=this;this.attributes={};var w=l.default.keys(this.domNode),b=s.default.keys(this.domNode),y=c.default.keys(this.domNode);w.concat(b).concat(y).forEach(function(v){var g=f.query(v,f.Scope.ATTRIBUTE);g instanceof l.default&&(S.attributes[g.attrName]=g)})},_.prototype.copy=function(S){var w=this;Object.keys(this.attributes).forEach(function(b){var y=w.attributes[b].value(w.domNode);S.format(b,y)})},_.prototype.move=function(S){var w=this;this.copy(S),Object.keys(this.attributes).forEach(function(b){w.attributes[b].remove(w.domNode)}),this.attributes={}},_.prototype.values=function(){var S=this;return Object.keys(this.attributes).reduce(function(w,b){return w[b]=S.attributes[b].value(S.domNode),w},{})},_}();r.default=E},function(t,r,a){var l=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,S){_.__proto__=S}||function(_,S){for(var w in S)S.hasOwnProperty(w)&&(_[w]=S[w])};return function(_,S){E(_,S);function w(){this.constructor=_}_.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(12);function c(E,_){var S=E.getAttribute("class")||"";return S.split(/\s+/).filter(function(w){return w.indexOf(_+"-")===0})}var f=function(E){l(_,E);function _(){return E!==null&&E.apply(this,arguments)||this}return _.keys=function(S){return(S.getAttribute("class")||"").split(/\s+/).map(function(w){return w.split("-").slice(0,-1).join("-")})},_.prototype.add=function(S,w){return this.canAdd(S,w)?(this.remove(S),S.classList.add(this.keyName+"-"+w),!0):!1},_.prototype.remove=function(S){var w=c(S,this.keyName);w.forEach(function(b){S.classList.remove(b)}),S.classList.length===0&&S.removeAttribute("class")},_.prototype.value=function(S){var w=c(S,this.keyName)[0]||"",b=w.slice(this.keyName.length+1);return this.canAdd(S,b)?b:""},_}(s.default);r.default=f},function(t,r,a){var l=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,S){_.__proto__=S}||function(_,S){for(var w in S)S.hasOwnProperty(w)&&(_[w]=S[w])};return function(_,S){E(_,S);function w(){this.constructor=_}_.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(12);function c(E){var _=E.split("-"),S=_.slice(1).map(function(w){return w[0].toUpperCase()+w.slice(1)}).join("");return _[0]+S}var f=function(E){l(_,E);function _(){return E!==null&&E.apply(this,arguments)||this}return _.keys=function(S){return(S.getAttribute("style")||"").split(";").map(function(w){var b=w.split(":");return b[0].trim()})},_.prototype.add=function(S,w){return this.canAdd(S,w)?(S.style[c(this.keyName)]=w,!0):!1},_.prototype.remove=function(S){S.style[c(this.keyName)]="",S.getAttribute("style")||S.removeAttribute("style")},_.prototype.value=function(S){var w=S.style[c(this.keyName)];return this.canAdd(S,w)?w:""},_}(s.default);r.default=f},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function f(E,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,_,S){return _&&f(E.prototype,_),S&&f(E,S),E}}();function s(f,E){if(!(f instanceof E))throw new TypeError("Cannot call a class as a function")}var c=function(){function f(E,_){s(this,f),this.quill=E,this.options=_,this.modules={}}return l(f,[{key:"init",value:function(){var _=this;Object.keys(this.options.modules).forEach(function(S){_.modules[S]==null&&_.addModule(S)})}},{key:"addModule",value:function(_){var S=this.quill.constructor.import("modules/"+_);return this.modules[_]=new S(this.quill,this.options.modules[_]||{}),this.modules[_]}}]),f}();c.DEFAULTS={modules:{}},c.themes={default:c},r.default=c},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function O(h,p){for(var m=0;m<p.length;m++){var x=p[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,x.key,x)}}return function(h,p,m){return p&&O(h.prototype,p),m&&O(h,m),h}}(),s=function O(h,p,m){h===null&&(h=Function.prototype);var x=Object.getOwnPropertyDescriptor(h,p);if(x===void 0){var N=Object.getPrototypeOf(h);return N===null?void 0:O(N,p,m)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(m)}},c=a(0),f=S(c),E=a(7),_=S(E);function S(O){return O&&O.__esModule?O:{default:O}}function w(O,h){if(!(O instanceof h))throw new TypeError("Cannot call a class as a function")}function b(O,h){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:O}function y(O,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);O.prototype=Object.create(h&&h.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(O,h):O.__proto__=h)}var v="\uFEFF",g=function(O){y(h,O);function h(p){w(this,h);var m=b(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,p));return m.contentNode=document.createElement("span"),m.contentNode.setAttribute("contenteditable",!1),[].slice.call(m.domNode.childNodes).forEach(function(x){m.contentNode.appendChild(x)}),m.leftGuard=document.createTextNode(v),m.rightGuard=document.createTextNode(v),m.domNode.appendChild(m.leftGuard),m.domNode.appendChild(m.contentNode),m.domNode.appendChild(m.rightGuard),m}return l(h,[{key:"index",value:function(m,x){return m===this.leftGuard?0:m===this.rightGuard?1:s(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"index",this).call(this,m,x)}},{key:"restore",value:function(m){var x=void 0,N=void 0,T=m.data.split(v).join("");if(m===this.leftGuard)if(this.prev instanceof _.default){var I=this.prev.length();this.prev.insertAt(I,T),x={startNode:this.prev.domNode,startOffset:I+T.length}}else N=document.createTextNode(T),this.parent.insertBefore(f.default.create(N),this),x={startNode:N,startOffset:T.length};else m===this.rightGuard&&(this.next instanceof _.default?(this.next.insertAt(0,T),x={startNode:this.next.domNode,startOffset:T.length}):(N=document.createTextNode(T),this.parent.insertBefore(f.default.create(N),this.next),x={startNode:N,startOffset:T.length}));return m.data=v,x}},{key:"update",value:function(m,x){var N=this;m.forEach(function(T){if(T.type==="characterData"&&(T.target===N.leftGuard||T.target===N.rightGuard)){var I=N.restore(T.target);I&&(x.range=I)}})}}]),h}(f.default.Embed);r.default=g},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var l=a(0),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}var f={scope:s.default.Scope.BLOCK,whitelist:["right","center","justify"]},E=new s.default.Attributor.Attribute("align","align",f),_=new s.default.Attributor.Class("align","ql-align",f),S=new s.default.Attributor.Style("align","text-align",f);r.AlignAttribute=E,r.AlignClass=_,r.AlignStyle=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var l=a(0),s=f(l),c=a(26);function f(S){return S&&S.__esModule?S:{default:S}}var E=new s.default.Attributor.Class("background","ql-bg",{scope:s.default.Scope.INLINE}),_=new c.ColorAttributor("background","background-color",{scope:s.default.Scope.INLINE});r.BackgroundClass=E,r.BackgroundStyle=_},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var l=a(0),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}var f={scope:s.default.Scope.BLOCK,whitelist:["rtl"]},E=new s.default.Attributor.Attribute("direction","dir",f),_=new s.default.Attributor.Class("direction","ql-direction",f),S=new s.default.Attributor.Style("direction","direction",f);r.DirectionAttribute=E,r.DirectionClass=_,r.DirectionStyle=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var l=function(){function O(h,p){for(var m=0;m<p.length;m++){var x=p[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(h,x.key,x)}}return function(h,p,m){return p&&O(h.prototype,p),m&&O(h,m),h}}(),s=function O(h,p,m){h===null&&(h=Function.prototype);var x=Object.getOwnPropertyDescriptor(h,p);if(x===void 0){var N=Object.getPrototypeOf(h);return N===null?void 0:O(N,p,m)}else{if("value"in x)return x.value;var T=x.get;return T===void 0?void 0:T.call(m)}},c=a(0),f=E(c);function E(O){return O&&O.__esModule?O:{default:O}}function _(O,h){if(!(O instanceof h))throw new TypeError("Cannot call a class as a function")}function S(O,h){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:O}function w(O,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);O.prototype=Object.create(h&&h.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(O,h):O.__proto__=h)}var b={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",b),v=function(O){w(h,O);function h(){return _(this,h),S(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return l(h,[{key:"value",value:function(m){return s(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"value",this).call(this,m).replace(/["']/g,"")}}]),h}(f.default.Attributor.Style),g=new v("font","font-family",b);r.FontStyle=g,r.FontClass=y},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var l=a(0),s=c(l);function c(_){return _&&_.__esModule?_:{default:_}}var f=new s.default.Attributor.Class("size","ql-size",{scope:s.default.Scope.INLINE,whitelist:["small","large","huge"]}),E=new s.default.Attributor.Style("size","font-size",{scope:s.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=f,r.SizeStyle=E},function(t,r,a){t.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var l=function(){function p(m,x){for(var N=0;N<x.length;N++){var T=x[N];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(m,T.key,T)}}return function(m,x,N){return x&&p(m.prototype,x),N&&p(m,N),m}}(),s=a(0),c=w(s),f=a(5),E=w(f),_=a(9),S=w(_);function w(p){return p&&p.__esModule?p:{default:p}}function b(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function y(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function v(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var g=function(p){v(m,p);function m(x,N){b(this,m);var T=y(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,x,N));return T.lastRecorded=0,T.ignoreChange=!1,T.clear(),T.quill.on(E.default.events.EDITOR_CHANGE,function(I,R,C,M){I!==E.default.events.TEXT_CHANGE||T.ignoreChange||(!T.options.userOnly||M===E.default.sources.USER?T.record(R,C):T.transform(R))}),T.quill.keyboard.addBinding({key:"Z",shortKey:!0},T.undo.bind(T)),T.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},T.redo.bind(T)),/Win/i.test(navigator.platform)&&T.quill.keyboard.addBinding({key:"Y",shortKey:!0},T.redo.bind(T)),T}return l(m,[{key:"change",value:function(N,T){if(this.stack[N].length!==0){var I=this.stack[N].pop();this.stack[T].push(I),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(I[N],E.default.sources.USER),this.ignoreChange=!1;var R=h(I[N]);this.quill.setSelection(R)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(N,T){if(N.ops.length!==0){this.stack.redo=[];var I=this.quill.getContents().diff(T),R=Date.now();if(this.lastRecorded+this.options.delay>R&&this.stack.undo.length>0){var C=this.stack.undo.pop();I=I.compose(C.undo),N=C.redo.compose(N)}else this.lastRecorded=R;this.stack.undo.push({redo:N,undo:I}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(N){this.stack.undo.forEach(function(T){T.undo=N.transform(T.undo,!0),T.redo=N.transform(T.redo,!0)}),this.stack.redo.forEach(function(T){T.undo=N.transform(T.undo,!0),T.redo=N.transform(T.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),m}(S.default);g.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function O(p){var m=p.ops[p.ops.length-1];return m==null?!1:m.insert!=null?typeof m.insert=="string"&&m.insert.endsWith(`
|
|
139
|
-
`):m.attributes!=null?Object.keys(m.attributes).some(function(x){return c.default.query(x,c.default.Scope.BLOCK)!=null}):!1}function h(p){var m=p.reduce(function(N,T){return N+=T.delete||0,N},0),x=p.length()-m;return O(p)&&(x-=1),x}r.default=g,r.getLastChangeIndex=h},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var l=function(){function U(W,ee){for(var ne=0;ne<ee.length;ne++){var te=ee[ne];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(W,te.key,te)}}return function(W,ee,ne){return ee&&U(W.prototype,ee),ne&&U(W,ne),W}}(),s=function U(W,ee,ne){W===null&&(W=Function.prototype);var te=Object.getOwnPropertyDescriptor(W,ee);if(te===void 0){var Z=Object.getPrototypeOf(W);return Z===null?void 0:U(Z,ee,ne)}else{if("value"in te)return te.value;var ae=te.get;return ae===void 0?void 0:ae.call(ne)}},c=a(3),f=R(c),E=a(2),_=R(E),S=a(8),w=R(S),b=a(23),y=R(b),v=a(34),g=R(v),O=a(59),h=R(O),p=a(60),m=R(p),x=a(28),N=R(x),T=a(61),I=R(T);function R(U){return U&&U.__esModule?U:{default:U}}function C(U,W){if(!(U instanceof W))throw new TypeError("Cannot call a class as a function")}function M(U,W){if(!U)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:U}function k(U,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);U.prototype=Object.create(W&&W.prototype,{constructor:{value:U,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf(U,W):U.__proto__=W)}var A=[!1,"center","right","justify"],L=["#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"],z=[!1,"serif","monospace"],Y=["1","2","3",!1],$=["small",!1,"large","huge"],X=function(U){k(W,U);function W(ee,ne){C(this,W);var te=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,ee,ne)),Z=function ae(H){if(!document.body.contains(ee.root))return document.body.removeEventListener("click",ae);te.tooltip!=null&&!te.tooltip.root.contains(H.target)&&document.activeElement!==te.tooltip.textbox&&!te.quill.hasFocus()&&te.tooltip.hide(),te.pickers!=null&&te.pickers.forEach(function(J){J.container.contains(H.target)||J.close()})};return ee.emitter.listenDOM("click",document.body,Z),te}return l(W,[{key:"addModule",value:function(ne){var te=s(W.prototype.__proto__||Object.getPrototypeOf(W.prototype),"addModule",this).call(this,ne);return ne==="toolbar"&&this.extendToolbar(te),te}},{key:"buildButtons",value:function(ne,te){ne.forEach(function(Z){var ae=Z.getAttribute("class")||"";ae.split(/\s+/).forEach(function(H){if(H.startsWith("ql-")&&(H=H.slice(3),te[H]!=null))if(H==="direction")Z.innerHTML=te[H][""]+te[H].rtl;else if(typeof te[H]=="string")Z.innerHTML=te[H];else{var J=Z.value||"";J!=null&&te[H][J]&&(Z.innerHTML=te[H][J])}})})}},{key:"buildPickers",value:function(ne,te){var Z=this;this.pickers=ne.map(function(H){if(H.classList.contains("ql-align"))return H.querySelector("option")==null&&B(H,A),new m.default(H,te.align);if(H.classList.contains("ql-background")||H.classList.contains("ql-color")){var J=H.classList.contains("ql-background")?"background":"color";return H.querySelector("option")==null&&B(H,L,J==="background"?"#ffffff":"#000000"),new h.default(H,te[J])}else return H.querySelector("option")==null&&(H.classList.contains("ql-font")?B(H,z):H.classList.contains("ql-header")?B(H,Y):H.classList.contains("ql-size")&&B(H,$)),new N.default(H)});var ae=function(){Z.pickers.forEach(function(J){J.update()})};this.quill.on(w.default.events.EDITOR_CHANGE,ae)}}]),W}(g.default);X.DEFAULTS=(0,f.default)(!0,{},g.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var W=this,ee=this.container.querySelector("input.ql-image[type=file]");ee==null&&(ee=document.createElement("input"),ee.setAttribute("type","file"),ee.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),ee.classList.add("ql-image"),ee.addEventListener("change",function(){if(ee.files!=null&&ee.files[0]!=null){var ne=new FileReader;ne.onload=function(te){var Z=W.quill.getSelection(!0);W.quill.updateContents(new _.default().retain(Z.index).delete(Z.length).insert({image:te.target.result}),w.default.sources.USER),W.quill.setSelection(Z.index+1,w.default.sources.SILENT),ee.value=""},ne.readAsDataURL(ee.files[0])}}),this.container.appendChild(ee)),ee.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var q=function(U){k(W,U);function W(ee,ne){C(this,W);var te=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,ee,ne));return te.textbox=te.root.querySelector('input[type="text"]'),te.listen(),te}return l(W,[{key:"listen",value:function(){var ne=this;this.textbox.addEventListener("keydown",function(te){y.default.match(te,"enter")?(ne.save(),te.preventDefault()):y.default.match(te,"escape")&&(ne.cancel(),te.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),te!=null?this.textbox.value=te:ne!==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-"+ne)||""),this.root.setAttribute("data-mode",ne)}},{key:"restoreFocus",value:function(){var ne=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=ne}},{key:"save",value:function(){var ne=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var te=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",ne,w.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",ne,w.default.sources.USER)),this.quill.root.scrollTop=te;break}case"video":ne=D(ne);case"formula":{if(!ne)break;var Z=this.quill.getSelection(!0);if(Z!=null){var ae=Z.index+Z.length;this.quill.insertEmbed(ae,this.root.getAttribute("data-mode"),ne,w.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ae+1," ",w.default.sources.USER),this.quill.setSelection(ae+2,w.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),W}(I.default);function D(U){var W=U.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||U.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return W?(W[1]||"https")+"://www.youtube.com/embed/"+W[2]+"?showinfo=0":(W=U.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(W[1]||"https")+"://player.vimeo.com/video/"+W[2]+"/":U}function B(U,W){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;W.forEach(function(ne){var te=document.createElement("option");ne===ee?te.setAttribute("selected","selected"):te.setAttribute("value",ne),U.appendChild(te)})}r.BaseTooltip=q,r.default=X},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function s(){this.head=this.tail=null,this.length=0}return s.prototype.append=function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},s.prototype.contains=function(c){for(var f,E=this.iterator();f=E();)if(f===c)return!0;return!1},s.prototype.insertBefore=function(c,f){c&&(c.next=f,f!=null?(c.prev=f.prev,f.prev!=null&&(f.prev.next=c),f.prev=c,f===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},s.prototype.offset=function(c){for(var f=0,E=this.head;E!=null;){if(E===c)return f;f+=E.length(),E=E.next}return-1},s.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},s.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var f=c;return c!=null&&(c=c.next),f}},s.prototype.find=function(c,f){f===void 0&&(f=!1);for(var E,_=this.iterator();E=_();){var S=E.length();if(c<S||f&&c===S&&(E.next==null||E.next.length()!==0))return[E,c];c-=S}return[null,0]},s.prototype.forEach=function(c){for(var f,E=this.iterator();f=E();)c(f)},s.prototype.forEachAt=function(c,f,E){if(!(f<=0))for(var _=this.find(c),S=_[0],w=_[1],b,y=c-w,v=this.iterator(S);(b=v())&&y<c+f;){var g=b.length();c>y?E(b,c-y,Math.min(f,y+g-c)):E(b,0,Math.min(g,c+f-y)),y+=g}},s.prototype.map=function(c){return this.reduce(function(f,E){return f.push(c(E)),f},[])},s.prototype.reduce=function(c,f){for(var E,_=this.iterator();E=_();)f=c(f,E);return f},s}();r.default=l},function(t,r,a){var l=this&&this.__extends||function(){var S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,b){w.__proto__=b}||function(w,b){for(var y in b)b.hasOwnProperty(y)&&(w[y]=b[y])};return function(w,b){S(w,b);function y(){this.constructor=w}w.prototype=b===null?Object.create(b):(y.prototype=b.prototype,new y)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(17),c=a(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},E=100,_=function(S){l(w,S);function w(b){var y=S.call(this,b)||this;return y.scroll=y,y.observer=new MutationObserver(function(v){y.update(v)}),y.observer.observe(y.domNode,f),y.attach(),y}return w.prototype.detach=function(){S.prototype.detach.call(this),this.observer.disconnect()},w.prototype.deleteAt=function(b,y){this.update(),b===0&&y===this.length()?this.children.forEach(function(v){v.remove()}):S.prototype.deleteAt.call(this,b,y)},w.prototype.formatAt=function(b,y,v,g){this.update(),S.prototype.formatAt.call(this,b,y,v,g)},w.prototype.insertAt=function(b,y,v){this.update(),S.prototype.insertAt.call(this,b,y,v)},w.prototype.optimize=function(b,y){var v=this;b===void 0&&(b=[]),y===void 0&&(y={}),S.prototype.optimize.call(this,y);for(var g=[].slice.call(this.observer.takeRecords());g.length>0;)b.push(g.pop());for(var O=function(x,N){N===void 0&&(N=!0),!(x==null||x===v)&&x.domNode.parentNode!=null&&(x.domNode[c.DATA_KEY].mutations==null&&(x.domNode[c.DATA_KEY].mutations=[]),N&&O(x.parent))},h=function(x){x.domNode[c.DATA_KEY]==null||x.domNode[c.DATA_KEY].mutations==null||(x instanceof s.default&&x.children.forEach(h),x.optimize(y))},p=b,m=0;p.length>0;m+=1){if(m>=E)throw new Error("[Parchment] Maximum optimize iterations reached");for(p.forEach(function(x){var N=c.find(x.target,!0);N!=null&&(N.domNode===x.target&&(x.type==="childList"?(O(c.find(x.previousSibling,!1)),[].forEach.call(x.addedNodes,function(T){var I=c.find(T,!1);O(I,!1),I instanceof s.default&&I.children.forEach(function(R){O(R,!1)})})):x.type==="attributes"&&O(N.prev)),O(N))}),this.children.forEach(h),p=[].slice.call(this.observer.takeRecords()),g=p.slice();g.length>0;)b.push(g.pop())}},w.prototype.update=function(b,y){var v=this;y===void 0&&(y={}),b=b||this.observer.takeRecords(),b.map(function(g){var O=c.find(g.target,!0);return O==null?null:O.domNode[c.DATA_KEY].mutations==null?(O.domNode[c.DATA_KEY].mutations=[g],O):(O.domNode[c.DATA_KEY].mutations.push(g),null)}).forEach(function(g){g==null||g===v||g.domNode[c.DATA_KEY]==null||g.update(g.domNode[c.DATA_KEY].mutations||[],y)}),this.domNode[c.DATA_KEY].mutations!=null&&S.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,y),this.optimize(b,y)},w.blotName="scroll",w.defaultChild="block",w.scope=c.Scope.BLOCK_BLOT,w.tagName="DIV",w}(s.default);r.default=_},function(t,r,a){var l=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(S,w){S.__proto__=w}||function(S,w){for(var b in w)w.hasOwnProperty(b)&&(S[b]=w[b])};return function(S,w){_(S,w);function b(){this.constructor=S}S.prototype=w===null?Object.create(w):(b.prototype=w.prototype,new b)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(18),c=a(1);function f(_,S){if(Object.keys(_).length!==Object.keys(S).length)return!1;for(var w in _)if(_[w]!==S[w])return!1;return!0}var E=function(_){l(S,_);function S(){return _!==null&&_.apply(this,arguments)||this}return S.formats=function(w){if(w.tagName!==S.tagName)return _.formats.call(this,w)},S.prototype.format=function(w,b){var y=this;w===this.statics.blotName&&!b?(this.children.forEach(function(v){v instanceof s.default||(v=v.wrap(S.blotName,!0)),y.attributes.copy(v)}),this.unwrap()):_.prototype.format.call(this,w,b)},S.prototype.formatAt=function(w,b,y,v){if(this.formats()[y]!=null||c.query(y,c.Scope.ATTRIBUTE)){var g=this.isolate(w,b);g.format(y,v)}else _.prototype.formatAt.call(this,w,b,y,v)},S.prototype.optimize=function(w){_.prototype.optimize.call(this,w);var b=this.formats();if(Object.keys(b).length===0)return this.unwrap();var y=this.next;y instanceof S&&y.prev===this&&f(b,y.formats())&&(y.moveChildren(this),y.remove())},S.blotName="inline",S.scope=c.Scope.INLINE_BLOT,S.tagName="SPAN",S}(s.default);r.default=E},function(t,r,a){var l=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,S){_.__proto__=S}||function(_,S){for(var w in S)S.hasOwnProperty(w)&&(_[w]=S[w])};return function(_,S){E(_,S);function w(){this.constructor=_}_.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(18),c=a(1),f=function(E){l(_,E);function _(){return E!==null&&E.apply(this,arguments)||this}return _.formats=function(S){var w=c.query(_.blotName).tagName;if(S.tagName!==w)return E.formats.call(this,S)},_.prototype.format=function(S,w){c.query(S,c.Scope.BLOCK)!=null&&(S===this.statics.blotName&&!w?this.replaceWith(_.blotName):E.prototype.format.call(this,S,w))},_.prototype.formatAt=function(S,w,b,y){c.query(b,c.Scope.BLOCK)!=null?this.format(b,y):E.prototype.formatAt.call(this,S,w,b,y)},_.prototype.insertAt=function(S,w,b){if(b==null||c.query(w,c.Scope.INLINE)!=null)E.prototype.insertAt.call(this,S,w,b);else{var y=this.split(S),v=c.create(w,b);y.parent.insertBefore(v,y)}},_.prototype.update=function(S,w){navigator.userAgent.match(/Trident/)?this.build():E.prototype.update.call(this,S,w)},_.blotName="block",_.scope=c.Scope.BLOCK_BLOT,_.tagName="P",_}(s.default);r.default=f},function(t,r,a){var l=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,_){E.__proto__=_}||function(E,_){for(var S in _)_.hasOwnProperty(S)&&(E[S]=_[S])};return function(E,_){f(E,_);function S(){this.constructor=E}E.prototype=_===null?Object.create(_):(S.prototype=_.prototype,new S)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(19),c=function(f){l(E,f);function E(){return f!==null&&f.apply(this,arguments)||this}return E.formats=function(_){},E.prototype.format=function(_,S){f.prototype.formatAt.call(this,0,this.length(),_,S)},E.prototype.formatAt=function(_,S,w,b){_===0&&S===this.length()?this.format(w,b):f.prototype.formatAt.call(this,_,S,w,b)},E.prototype.formats=function(){return this.statics.formats(this.domNode)},E}(s.default);r.default=c},function(t,r,a){var l=this&&this.__extends||function(){var E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,S){_.__proto__=S}||function(_,S){for(var w in S)S.hasOwnProperty(w)&&(_[w]=S[w])};return function(_,S){E(_,S);function w(){this.constructor=_}_.prototype=S===null?Object.create(S):(w.prototype=S.prototype,new w)}}();Object.defineProperty(r,"__esModule",{value:!0});var s=a(19),c=a(1),f=function(E){l(_,E);function _(S){var w=E.call(this,S)||this;return w.text=w.statics.value(w.domNode),w}return _.create=function(S){return document.createTextNode(S)},_.value=function(S){var w=S.data;return w.normalize&&(w=w.normalize()),w},_.prototype.deleteAt=function(S,w){this.domNode.data=this.text=this.text.slice(0,S)+this.text.slice(S+w)},_.prototype.index=function(S,w){return this.domNode===S?w:-1},_.prototype.insertAt=function(S,w,b){b==null?(this.text=this.text.slice(0,S)+w+this.text.slice(S),this.domNode.data=this.text):E.prototype.insertAt.call(this,S,w,b)},_.prototype.length=function(){return this.text.length},_.prototype.optimize=function(S){E.prototype.optimize.call(this,S),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof _&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},_.prototype.position=function(S,w){return[this.domNode,S]},_.prototype.split=function(S,w){if(w===void 0&&(w=!1),!w){if(S===0)return this;if(S===this.length())return this.next}var b=c.create(this.domNode.splitText(S));return this.parent.insertBefore(b,this.next),this.text=this.statics.value(this.domNode),b},_.prototype.update=function(S,w){var b=this;S.some(function(y){return y.type==="characterData"&&y.target===b.domNode})&&(this.text=this.statics.value(this.domNode))},_.prototype.value=function(){return this.text},_.blotName="text",_.scope=c.Scope.INLINE_BLOT,_}(s.default);r.default=f},function(t,r,a){var l=document.createElement("div");if(l.classList.toggle("test-class",!1),l.classList.contains("test-class")){var s=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,f){return arguments.length>1&&!this.contains(c)==!f?f:s.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,f){return f=f||0,this.substr(f,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,f){var E=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>E.length)&&(f=E.length),f-=c.length;var _=E.indexOf(c,f);return _!==-1&&_===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var E=Object(this),_=E.length>>>0,S=arguments[1],w,b=0;b<_;b++)if(w=E[b],f.call(S,w,b,E))return w}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,r){var a=-1,l=1,s=0;function c(m,x,N){if(m==x)return m?[[s,m]]:[];(N<0||m.length<N)&&(N=null);var T=S(m,x),I=m.substring(0,T);m=m.substring(T),x=x.substring(T),T=w(m,x);var R=m.substring(m.length-T);m=m.substring(0,m.length-T),x=x.substring(0,x.length-T);var C=f(m,x);return I&&C.unshift([s,I]),R&&C.push([s,R]),y(C),N!=null&&(C=O(C,N)),C=h(C),C}function f(m,x){var N;if(!m)return[[l,x]];if(!x)return[[a,m]];var T=m.length>x.length?m:x,I=m.length>x.length?x:m,R=T.indexOf(I);if(R!=-1)return N=[[l,T.substring(0,R)],[s,I],[l,T.substring(R+I.length)]],m.length>x.length&&(N[0][0]=N[2][0]=a),N;if(I.length==1)return[[a,m],[l,x]];var C=b(m,x);if(C){var M=C[0],k=C[1],A=C[2],L=C[3],z=C[4],Y=c(M,A),$=c(k,L);return Y.concat([[s,z]],$)}return E(m,x)}function E(m,x){for(var N=m.length,T=x.length,I=Math.ceil((N+T)/2),R=I,C=2*I,M=new Array(C),k=new Array(C),A=0;A<C;A++)M[A]=-1,k[A]=-1;M[R+1]=0,k[R+1]=0;for(var L=N-T,z=L%2!=0,Y=0,$=0,X=0,q=0,D=0;D<I;D++){for(var B=-D+Y;B<=D-$;B+=2){var U=R+B,W;B==-D||B!=D&&M[U-1]<M[U+1]?W=M[U+1]:W=M[U-1]+1;for(var ee=W-B;W<N&&ee<T&&m.charAt(W)==x.charAt(ee);)W++,ee++;if(M[U]=W,W>N)$+=2;else if(ee>T)Y+=2;else if(z){var ne=R+L-B;if(ne>=0&&ne<C&&k[ne]!=-1){var te=N-k[ne];if(W>=te)return _(m,x,W,ee)}}}for(var Z=-D+X;Z<=D-q;Z+=2){var ne=R+Z,te;Z==-D||Z!=D&&k[ne-1]<k[ne+1]?te=k[ne+1]:te=k[ne-1]+1;for(var ae=te-Z;te<N&&ae<T&&m.charAt(N-te-1)==x.charAt(T-ae-1);)te++,ae++;if(k[ne]=te,te>N)q+=2;else if(ae>T)X+=2;else if(!z){var U=R+L-Z;if(U>=0&&U<C&&M[U]!=-1){var W=M[U],ee=R+W-U;if(te=N-te,W>=te)return _(m,x,W,ee)}}}}return[[a,m],[l,x]]}function _(m,x,N,T){var I=m.substring(0,N),R=x.substring(0,T),C=m.substring(N),M=x.substring(T),k=c(I,R),A=c(C,M);return k.concat(A)}function S(m,x){if(!m||!x||m.charAt(0)!=x.charAt(0))return 0;for(var N=0,T=Math.min(m.length,x.length),I=T,R=0;N<I;)m.substring(R,I)==x.substring(R,I)?(N=I,R=N):T=I,I=Math.floor((T-N)/2+N);return I}function w(m,x){if(!m||!x||m.charAt(m.length-1)!=x.charAt(x.length-1))return 0;for(var N=0,T=Math.min(m.length,x.length),I=T,R=0;N<I;)m.substring(m.length-I,m.length-R)==x.substring(x.length-I,x.length-R)?(N=I,R=N):T=I,I=Math.floor((T-N)/2+N);return I}function b(m,x){var N=m.length>x.length?m:x,T=m.length>x.length?x:m;if(N.length<4||T.length*2<N.length)return null;function I($,X,q){for(var D=$.substring(q,q+Math.floor($.length/4)),B=-1,U="",W,ee,ne,te;(B=X.indexOf(D,B+1))!=-1;){var Z=S($.substring(q),X.substring(B)),ae=w($.substring(0,q),X.substring(0,B));U.length<ae+Z&&(U=X.substring(B-ae,B)+X.substring(B,B+Z),W=$.substring(0,q-ae),ee=$.substring(q+Z),ne=X.substring(0,B-ae),te=X.substring(B+Z))}return U.length*2>=$.length?[W,ee,ne,te,U]:null}var R=I(N,T,Math.ceil(N.length/4)),C=I(N,T,Math.ceil(N.length/2)),M;if(!R&&!C)return null;C?R?M=R[4].length>C[4].length?R:C:M=C:M=R;var k,A,L,z;m.length>x.length?(k=M[0],A=M[1],L=M[2],z=M[3]):(L=M[0],z=M[1],k=M[2],A=M[3]);var Y=M[4];return[k,A,L,z,Y]}function y(m){m.push([s,""]);for(var x=0,N=0,T=0,I="",R="",C;x<m.length;)switch(m[x][0]){case l:T++,R+=m[x][1],x++;break;case a:N++,I+=m[x][1],x++;break;case s:N+T>1?(N!==0&&T!==0&&(C=S(R,I),C!==0&&(x-N-T>0&&m[x-N-T-1][0]==s?m[x-N-T-1][1]+=R.substring(0,C):(m.splice(0,0,[s,R.substring(0,C)]),x++),R=R.substring(C),I=I.substring(C)),C=w(R,I),C!==0&&(m[x][1]=R.substring(R.length-C)+m[x][1],R=R.substring(0,R.length-C),I=I.substring(0,I.length-C))),N===0?m.splice(x-T,N+T,[l,R]):T===0?m.splice(x-N,N+T,[a,I]):m.splice(x-N-T,N+T,[a,I],[l,R]),x=x-N-T+(N?1:0)+(T?1:0)+1):x!==0&&m[x-1][0]==s?(m[x-1][1]+=m[x][1],m.splice(x,1)):x++,T=0,N=0,I="",R="";break}m[m.length-1][1]===""&&m.pop();var M=!1;for(x=1;x<m.length-1;)m[x-1][0]==s&&m[x+1][0]==s&&(m[x][1].substring(m[x][1].length-m[x-1][1].length)==m[x-1][1]?(m[x][1]=m[x-1][1]+m[x][1].substring(0,m[x][1].length-m[x-1][1].length),m[x+1][1]=m[x-1][1]+m[x+1][1],m.splice(x-1,1),M=!0):m[x][1].substring(0,m[x+1][1].length)==m[x+1][1]&&(m[x-1][1]+=m[x+1][1],m[x][1]=m[x][1].substring(m[x+1][1].length)+m[x+1][1],m.splice(x+1,1),M=!0)),x++;M&&y(m)}var v=c;v.INSERT=l,v.DELETE=a,v.EQUAL=s,t.exports=v;function g(m,x){if(x===0)return[s,m];for(var N=0,T=0;T<m.length;T++){var I=m[T];if(I[0]===a||I[0]===s){var R=N+I[1].length;if(x===R)return[T+1,m];if(x<R){m=m.slice();var C=x-N,M=[I[0],I[1].slice(0,C)],k=[I[0],I[1].slice(C)];return m.splice(T,1,M,k),[T+1,m]}else N=R}}throw new Error("cursor_pos is out of bounds!")}function O(m,x){var N=g(m,x),T=N[1],I=N[0],R=T[I],C=T[I+1];if(R==null)return m;if(R[0]!==s)return m;if(C!=null&&R[1]+C[1]===C[1]+R[1])return T.splice(I,2,C,R),p(T,I,2);if(C!=null&&C[1].indexOf(R[1])===0){T.splice(I,2,[C[0],R[1]],[0,R[1]]);var M=C[1].slice(R[1].length);return M.length>0&&T.splice(I+2,0,[C[0],M]),p(T,I,3)}else return m}function h(m){for(var x=!1,N=function(C){return C.charCodeAt(0)>=56320&&C.charCodeAt(0)<=57343},T=function(C){return C.charCodeAt(C.length-1)>=55296&&C.charCodeAt(C.length-1)<=56319},I=2;I<m.length;I+=1)m[I-2][0]===s&&T(m[I-2][1])&&m[I-1][0]===a&&N(m[I-1][1])&&m[I][0]===l&&N(m[I][1])&&(x=!0,m[I-1][1]=m[I-2][1].slice(-1)+m[I-1][1],m[I][1]=m[I-2][1].slice(-1)+m[I][1],m[I-2][1]=m[I-2][1].slice(0,-1));if(!x)return m;for(var R=[],I=0;I<m.length;I+=1)m[I][1].length>0&&R.push(m[I]);return R}function p(m,x,N){for(var T=x+N-1;T>=0&&T>=x-1;T--)if(T+1<m.length){var I=m[T],R=m[T+1];I[0]===R[1]&&m.splice(T,2,[I[0],I[1]+R[1]])}return m}},function(t,r){r=t.exports=typeof Object.keys=="function"?Object.keys:a,r.shim=a;function a(l){var s=[];for(var c in l)s.push(c);return s}},function(t,r){var a=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";r=t.exports=a?l:s,r.supported=l;function l(c){return Object.prototype.toString.call(c)=="[object Arguments]"}r.unsupported=s;function s(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}},function(t,r){var a=Object.prototype.hasOwnProperty,l="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(l=!1));function c(E,_,S){this.fn=E,this.context=_,this.once=S||!1}function f(){this._events=new s,this._eventsCount=0}f.prototype.eventNames=function(){var _=[],S,w;if(this._eventsCount===0)return _;for(w in S=this._events)a.call(S,w)&&_.push(l?w.slice(1):w);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(S)):_},f.prototype.listeners=function(_,S){var w=l?l+_:_,b=this._events[w];if(S)return!!b;if(!b)return[];if(b.fn)return[b.fn];for(var y=0,v=b.length,g=new Array(v);y<v;y++)g[y]=b[y].fn;return g},f.prototype.emit=function(_,S,w,b,y,v){var g=l?l+_:_;if(!this._events[g])return!1;var O=this._events[g],h=arguments.length,p,m;if(O.fn){switch(O.once&&this.removeListener(_,O.fn,void 0,!0),h){case 1:return O.fn.call(O.context),!0;case 2:return O.fn.call(O.context,S),!0;case 3:return O.fn.call(O.context,S,w),!0;case 4:return O.fn.call(O.context,S,w,b),!0;case 5:return O.fn.call(O.context,S,w,b,y),!0;case 6:return O.fn.call(O.context,S,w,b,y,v),!0}for(m=1,p=new Array(h-1);m<h;m++)p[m-1]=arguments[m];O.fn.apply(O.context,p)}else{var x=O.length,N;for(m=0;m<x;m++)switch(O[m].once&&this.removeListener(_,O[m].fn,void 0,!0),h){case 1:O[m].fn.call(O[m].context);break;case 2:O[m].fn.call(O[m].context,S);break;case 3:O[m].fn.call(O[m].context,S,w);break;case 4:O[m].fn.call(O[m].context,S,w,b);break;default:if(!p)for(N=1,p=new Array(h-1);N<h;N++)p[N-1]=arguments[N];O[m].fn.apply(O[m].context,p)}}return!0},f.prototype.on=function(_,S,w){var b=new c(S,w||this),y=l?l+_:_;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],b]:this._events[y].push(b):(this._events[y]=b,this._eventsCount++),this},f.prototype.once=function(_,S,w){var b=new c(S,w||this,!0),y=l?l+_:_;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],b]:this._events[y].push(b):(this._events[y]=b,this._eventsCount++),this},f.prototype.removeListener=function(_,S,w,b){var y=l?l+_:_;if(!this._events[y])return this;if(!S)return--this._eventsCount===0?this._events=new s:delete this._events[y],this;var v=this._events[y];if(v.fn)v.fn===S&&(!b||v.once)&&(!w||v.context===w)&&(--this._eventsCount===0?this._events=new s:delete this._events[y]);else{for(var g=0,O=[],h=v.length;g<h;g++)(v[g].fn!==S||b&&!v[g].once||w&&v[g].context!==w)&&O.push(v[g]);O.length?this._events[y]=O.length===1?O[0]:O:--this._eventsCount===0?this._events=new s:delete this._events[y]}return this},f.prototype.removeAllListeners=function(_){var S;return _?(S=l?l+_:_,this._events[S]&&(--this._eventsCount===0?this._events=new s:delete this._events[S])):(this._events=new s,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=l,f.EventEmitter=f,typeof t<"u"&&(t.exports=f)},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},s=function(){function fe(ve,xe){var Te=[],ce=!0,me=!1,Oe=void 0;try{for(var Ne=ve[Symbol.iterator](),tt;!(ce=(tt=Ne.next()).done)&&(Te.push(tt.value),!(xe&&Te.length===xe));ce=!0);}catch(rt){me=!0,Oe=rt}finally{try{!ce&&Ne.return&&Ne.return()}finally{if(me)throw Oe}}return Te}return function(ve,xe){if(Array.isArray(ve))return ve;if(Symbol.iterator in Object(ve))return fe(ve,xe);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function fe(ve,xe){for(var Te=0;Te<xe.length;Te++){var ce=xe[Te];ce.enumerable=ce.enumerable||!1,ce.configurable=!0,"value"in ce&&(ce.writable=!0),Object.defineProperty(ve,ce.key,ce)}}return function(ve,xe,Te){return xe&&fe(ve.prototype,xe),Te&&fe(ve,Te),ve}}(),f=a(3),E=k(f),_=a(2),S=k(_),w=a(0),b=k(w),y=a(5),v=k(y),g=a(10),O=k(g),h=a(9),p=k(h),m=a(36),x=a(37),N=a(13),T=k(N),I=a(26),R=a(38),C=a(39),M=a(40);function k(fe){return fe&&fe.__esModule?fe:{default:fe}}function A(fe,ve,xe){return ve in fe?Object.defineProperty(fe,ve,{value:xe,enumerable:!0,configurable:!0,writable:!0}):fe[ve]=xe,fe}function L(fe,ve){if(!(fe instanceof ve))throw new TypeError("Cannot call a class as a function")}function z(fe,ve){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve&&(typeof ve=="object"||typeof ve=="function")?ve:fe}function Y(fe,ve){if(typeof ve!="function"&&ve!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ve);fe.prototype=Object.create(ve&&ve.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ve&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ve):fe.__proto__=ve)}var $=(0,O.default)("quill:clipboard"),X="__ql-matcher",q=[[Node.TEXT_NODE,pe],[Node.TEXT_NODE,he],["br",ie],[Node.ELEMENT_NODE,he],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,ye],[Node.ELEMENT_NODE,H],[Node.ELEMENT_NODE,Ce],["li",ue],["b",ae.bind(ae,"bold")],["i",ae.bind(ae,"italic")],["style",le]],D=[m.AlignAttribute,R.DirectionAttribute].reduce(function(fe,ve){return fe[ve.keyName]=ve,fe},{}),B=[m.AlignStyle,x.BackgroundStyle,I.ColorStyle,R.DirectionStyle,C.FontStyle,M.SizeStyle].reduce(function(fe,ve){return fe[ve.keyName]=ve,fe},{}),U=function(fe){Y(ve,fe);function ve(xe,Te){L(this,ve);var ce=z(this,(ve.__proto__||Object.getPrototypeOf(ve)).call(this,xe,Te));return ce.quill.root.addEventListener("paste",ce.onPaste.bind(ce)),ce.container=ce.quill.addContainer("ql-clipboard"),ce.container.setAttribute("contenteditable",!0),ce.container.setAttribute("tabindex",-1),ce.matchers=[],q.concat(ce.options.matchers).forEach(function(me){var Oe=s(me,2),Ne=Oe[0],tt=Oe[1];!Te.matchVisual&&tt===ye||ce.addMatcher(Ne,tt)}),ce}return c(ve,[{key:"addMatcher",value:function(Te,ce){this.matchers.push([Te,ce])}},{key:"convert",value:function(Te){if(typeof Te=="string")return this.container.innerHTML=Te.replace(/\>\r?\n +\</g,"><"),this.convert();var ce=this.quill.getFormat(this.quill.selection.savedRange.index);if(ce[T.default.blotName]){var me=this.container.innerText;return this.container.innerHTML="",new S.default().insert(me,A({},T.default.blotName,ce[T.default.blotName]))}var Oe=this.prepareMatching(),Ne=s(Oe,2),tt=Ne[0],rt=Ne[1],He=Z(this.container,tt,rt);return ne(He,`
|
|
140
|
-
`)&&He.ops[He.ops.length-1].attributes==null&&(He=He.compose(new S.default().retain(He.length()-1).delete(1))),$.log("convert",this.container.innerHTML,He),this.container.innerHTML="",He}},{key:"dangerouslyPasteHTML",value:function(Te,ce){var me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof Te=="string")this.quill.setContents(this.convert(Te),ce),this.quill.setSelection(0,v.default.sources.SILENT);else{var Oe=this.convert(ce);this.quill.updateContents(new S.default().retain(Te).concat(Oe),me),this.quill.setSelection(Te+Oe.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(Te){var ce=this;if(!(Te.defaultPrevented||!this.quill.isEnabled())){var me=this.quill.getSelection(),Oe=new S.default().retain(me.index),Ne=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){Oe=Oe.concat(ce.convert()).delete(me.length),ce.quill.updateContents(Oe,v.default.sources.USER),ce.quill.setSelection(Oe.length()-me.length,v.default.sources.SILENT),ce.quill.scrollingContainer.scrollTop=Ne,ce.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Te=this,ce=[],me=[];return this.matchers.forEach(function(Oe){var Ne=s(Oe,2),tt=Ne[0],rt=Ne[1];switch(tt){case Node.TEXT_NODE:me.push(rt);break;case Node.ELEMENT_NODE:ce.push(rt);break;default:[].forEach.call(Te.container.querySelectorAll(tt),function(He){He[X]=He[X]||[],He[X].push(rt)});break}}),[ce,me]}}]),ve}(p.default);U.DEFAULTS={matchers:[],matchVisual:!0};function W(fe,ve,xe){return(typeof ve>"u"?"undefined":l(ve))==="object"?Object.keys(ve).reduce(function(Te,ce){return W(Te,ce,ve[ce])},fe):fe.reduce(function(Te,ce){return ce.attributes&&ce.attributes[ve]?Te.push(ce):Te.insert(ce.insert,(0,E.default)({},A({},ve,xe),ce.attributes))},new S.default)}function ee(fe){if(fe.nodeType!==Node.ELEMENT_NODE)return{};var ve="__ql-computed-style";return fe[ve]||(fe[ve]=window.getComputedStyle(fe))}function ne(fe,ve){for(var xe="",Te=fe.ops.length-1;Te>=0&&xe.length<ve.length;--Te){var ce=fe.ops[Te];if(typeof ce.insert!="string")break;xe=ce.insert+xe}return xe.slice(-1*ve.length)===ve}function te(fe){if(fe.childNodes.length===0)return!1;var ve=ee(fe);return["block","list-item"].indexOf(ve.display)>-1}function Z(fe,ve,xe){return fe.nodeType===fe.TEXT_NODE?xe.reduce(function(Te,ce){return ce(fe,Te)},new S.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(Te,ce){var me=Z(ce,ve,xe);return ce.nodeType===fe.ELEMENT_NODE&&(me=ve.reduce(function(Oe,Ne){return Ne(ce,Oe)},me),me=(ce[X]||[]).reduce(function(Oe,Ne){return Ne(ce,Oe)},me)),Te.concat(me)},new S.default):new S.default}function ae(fe,ve,xe){return W(xe,fe,!0)}function H(fe,ve){var xe=b.default.Attributor.Attribute.keys(fe),Te=b.default.Attributor.Class.keys(fe),ce=b.default.Attributor.Style.keys(fe),me={};return xe.concat(Te).concat(ce).forEach(function(Oe){var Ne=b.default.query(Oe,b.default.Scope.ATTRIBUTE);Ne!=null&&(me[Ne.attrName]=Ne.value(fe),me[Ne.attrName])||(Ne=D[Oe],Ne!=null&&(Ne.attrName===Oe||Ne.keyName===Oe)&&(me[Ne.attrName]=Ne.value(fe)||void 0),Ne=B[Oe],Ne!=null&&(Ne.attrName===Oe||Ne.keyName===Oe)&&(Ne=B[Oe],me[Ne.attrName]=Ne.value(fe)||void 0))}),Object.keys(me).length>0&&(ve=W(ve,me)),ve}function J(fe,ve){var xe=b.default.query(fe);if(xe==null)return ve;if(xe.prototype instanceof b.default.Embed){var Te={},ce=xe.value(fe);ce!=null&&(Te[xe.blotName]=ce,ve=new S.default().insert(Te,xe.formats(fe)))}else typeof xe.formats=="function"&&(ve=W(ve,xe.blotName,xe.formats(fe)));return ve}function ie(fe,ve){return ne(ve,`
|
|
141
|
-
`)||ve.insert(`
|
|
142
|
-
`),ve}function le(){return new S.default}function ue(fe,ve){var xe=b.default.query(fe);if(xe==null||xe.blotName!=="list-item"||!ne(ve,`
|
|
143
|
-
`))return ve;for(var Te=-1,ce=fe.parentNode;!ce.classList.contains("ql-clipboard");)(b.default.query(ce)||{}).blotName==="list"&&(Te+=1),ce=ce.parentNode;return Te<=0?ve:ve.compose(new S.default().retain(ve.length()-1).retain(1,{indent:Te}))}function he(fe,ve){return ne(ve,`
|
|
144
|
-
`)||(te(fe)||ve.length()>0&&fe.nextSibling&&te(fe.nextSibling))&&ve.insert(`
|
|
145
|
-
`),ve}function ye(fe,ve){if(te(fe)&&fe.nextElementSibling!=null&&!ne(ve,`
|
|
146
|
-
|
|
147
|
-
`)){var xe=fe.offsetHeight+parseFloat(ee(fe).marginTop)+parseFloat(ee(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+xe*1.5&&ve.insert(`
|
|
148
|
-
`)}return ve}function Ce(fe,ve){var xe={},Te=fe.style||{};return Te.fontStyle&&ee(fe).fontStyle==="italic"&&(xe.italic=!0),Te.fontWeight&&(ee(fe).fontWeight.startsWith("bold")||parseInt(ee(fe).fontWeight)>=700)&&(xe.bold=!0),Object.keys(xe).length>0&&(ve=W(ve,xe)),parseFloat(Te.textIndent||0)>0&&(ve=new S.default().insert(" ").concat(ve)),ve}function pe(fe,ve){var xe=fe.data;if(fe.parentNode.tagName==="O:P")return ve.insert(xe.trim());if(xe.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return ve;if(!ee(fe.parentNode).whiteSpace.startsWith("pre")){var Te=function(me,Oe){return Oe=Oe.replace(/[^\u00a0]/g,""),Oe.length<1&&me?" ":Oe};xe=xe.replace(/\r\n/g," ").replace(/\n/g," "),xe=xe.replace(/\s\s+/g,Te.bind(Te,!0)),(fe.previousSibling==null&&te(fe.parentNode)||fe.previousSibling!=null&&te(fe.previousSibling))&&(xe=xe.replace(/^\s+/,Te.bind(Te,!1))),(fe.nextSibling==null&&te(fe.parentNode)||fe.nextSibling!=null&&te(fe.nextSibling))&&(xe=xe.replace(/\s+$/,Te.bind(Te,!1)))}return ve.insert(xe)}r.default=U,r.matchAttributor=H,r.matchBlot=J,r.matchNewline=he,r.matchSpacing=ye,r.matchText=pe},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(v,g){for(var O=0;O<g.length;O++){var h=g[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,g,O){return g&&y(v.prototype,g),O&&y(v,O),v}}(),s=function y(v,g,O){v===null&&(v=Function.prototype);var h=Object.getOwnPropertyDescriptor(v,g);if(h===void 0){var p=Object.getPrototypeOf(v);return p===null?void 0:y(p,g,O)}else{if("value"in h)return h.value;var m=h.get;return m===void 0?void 0:m.call(O)}},c=a(6),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(){return _(this,v),S(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return l(v,[{key:"optimize",value:function(O){s(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,O),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return s(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),v}(f.default);b.blotName="bold",b.tagName=["STRONG","B"],r.default=b},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var l=function(){function M(k,A){var L=[],z=!0,Y=!1,$=void 0;try{for(var X=k[Symbol.iterator](),q;!(z=(q=X.next()).done)&&(L.push(q.value),!(A&&L.length===A));z=!0);}catch(D){Y=!0,$=D}finally{try{!z&&X.return&&X.return()}finally{if(Y)throw $}}return L}return function(k,A){if(Array.isArray(k))return k;if(Symbol.iterator in Object(k))return M(k,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function M(k,A){for(var L=0;L<A.length;L++){var z=A[L];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(k,z.key,z)}}return function(k,A,L){return A&&M(k.prototype,A),L&&M(k,L),k}}(),c=a(2),f=O(c),E=a(0),_=O(E),S=a(5),w=O(S),b=a(10),y=O(b),v=a(9),g=O(v);function O(M){return M&&M.__esModule?M:{default:M}}function h(M,k,A){return k in M?Object.defineProperty(M,k,{value:A,enumerable:!0,configurable:!0,writable:!0}):M[k]=A,M}function p(M,k){if(!(M instanceof k))throw new TypeError("Cannot call a class as a function")}function m(M,k){if(!M)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k&&(typeof k=="object"||typeof k=="function")?k:M}function x(M,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof k);M.prototype=Object.create(k&&k.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),k&&(Object.setPrototypeOf?Object.setPrototypeOf(M,k):M.__proto__=k)}var N=(0,y.default)("quill:toolbar"),T=function(M){x(k,M);function k(A,L){p(this,k);var z=m(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,A,L));if(Array.isArray(z.options.container)){var Y=document.createElement("div");R(Y,z.options.container),A.container.parentNode.insertBefore(Y,A.container),z.container=Y}else typeof z.options.container=="string"?z.container=document.querySelector(z.options.container):z.container=z.options.container;if(!(z.container instanceof HTMLElement)){var $;return $=N.error("Container required for toolbar",z.options),m(z,$)}return z.container.classList.add("ql-toolbar"),z.controls=[],z.handlers={},Object.keys(z.options.handlers).forEach(function(X){z.addHandler(X,z.options.handlers[X])}),[].forEach.call(z.container.querySelectorAll("button, select"),function(X){z.attach(X)}),z.quill.on(w.default.events.EDITOR_CHANGE,function(X,q){X===w.default.events.SELECTION_CHANGE&&z.update(q)}),z.quill.on(w.default.events.SCROLL_OPTIMIZE,function(){var X=z.quill.selection.getRange(),q=l(X,1),D=q[0];z.update(D)}),z}return s(k,[{key:"addHandler",value:function(L,z){this.handlers[L]=z}},{key:"attach",value:function(L){var z=this,Y=[].find.call(L.classList,function(X){return X.indexOf("ql-")===0});if(Y){if(Y=Y.slice(3),L.tagName==="BUTTON"&&L.setAttribute("type","button"),this.handlers[Y]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Y]==null){N.warn("ignoring attaching to disabled format",Y,L);return}if(_.default.query(Y)==null){N.warn("ignoring attaching to nonexistent format",Y,L);return}}var $=L.tagName==="SELECT"?"change":"click";L.addEventListener($,function(X){var q=void 0;if(L.tagName==="SELECT"){if(L.selectedIndex<0)return;var D=L.options[L.selectedIndex];D.hasAttribute("selected")?q=!1:q=D.value||!1}else L.classList.contains("ql-active")?q=!1:q=L.value||!L.hasAttribute("value"),X.preventDefault();z.quill.focus();var B=z.quill.selection.getRange(),U=l(B,1),W=U[0];if(z.handlers[Y]!=null)z.handlers[Y].call(z,q);else if(_.default.query(Y).prototype instanceof _.default.Embed){if(q=prompt("Enter "+Y),!q)return;z.quill.updateContents(new f.default().retain(W.index).delete(W.length).insert(h({},Y,q)),w.default.sources.USER)}else z.quill.format(Y,q,w.default.sources.USER);z.update(W)}),this.controls.push([Y,L])}}},{key:"update",value:function(L){var z=L==null?{}:this.quill.getFormat(L);this.controls.forEach(function(Y){var $=l(Y,2),X=$[0],q=$[1];if(q.tagName==="SELECT"){var D=void 0;if(L==null)D=null;else if(z[X]==null)D=q.querySelector("option[selected]");else if(!Array.isArray(z[X])){var B=z[X];typeof B=="string"&&(B=B.replace(/\"/g,'\\"')),D=q.querySelector('option[value="'+B+'"]')}D==null?(q.value="",q.selectedIndex=-1):D.selected=!0}else if(L==null)q.classList.remove("ql-active");else if(q.hasAttribute("value")){var U=z[X]===q.getAttribute("value")||z[X]!=null&&z[X].toString()===q.getAttribute("value")||z[X]==null&&!q.getAttribute("value");q.classList.toggle("ql-active",U)}else q.classList.toggle("ql-active",z[X]!=null)})}}]),k}(g.default);T.DEFAULTS={};function I(M,k,A){var L=document.createElement("button");L.setAttribute("type","button"),L.classList.add("ql-"+k),A!=null&&(L.value=A),M.appendChild(L)}function R(M,k){Array.isArray(k[0])||(k=[k]),k.forEach(function(A){var L=document.createElement("span");L.classList.add("ql-formats"),A.forEach(function(z){if(typeof z=="string")I(L,z);else{var Y=Object.keys(z)[0],$=z[Y];Array.isArray($)?C(L,Y,$):I(L,Y,$)}}),M.appendChild(L)})}function C(M,k,A){var L=document.createElement("select");L.classList.add("ql-"+k),A.forEach(function(z){var Y=document.createElement("option");z!==!1?Y.setAttribute("value",z):Y.setAttribute("selected","selected"),L.appendChild(Y)}),M.appendChild(L)}T.DEFAULTS={container:null,handlers:{clean:function(){var k=this,A=this.quill.getSelection();if(A!=null)if(A.length==0){var L=this.quill.getFormat();Object.keys(L).forEach(function(z){_.default.query(z,_.default.Scope.INLINE)!=null&&k.quill.format(z,!1)})}else this.quill.removeFormat(A,w.default.sources.USER)},direction:function(k){var A=this.quill.getFormat().align;k==="rtl"&&A==null?this.quill.format("align","right",w.default.sources.USER):!k&&A==="right"&&this.quill.format("align",!1,w.default.sources.USER),this.quill.format("direction",k,w.default.sources.USER)},indent:function(k){var A=this.quill.getSelection(),L=this.quill.getFormat(A),z=parseInt(L.indent||0);if(k==="+1"||k==="-1"){var Y=k==="+1"?1:-1;L.direction==="rtl"&&(Y*=-1),this.quill.format("indent",z+Y,w.default.sources.USER)}},link:function(k){k===!0&&(k=prompt("Enter link URL:")),this.quill.format("link",k,w.default.sources.USER)},list:function(k){var A=this.quill.getSelection(),L=this.quill.getFormat(A);k==="check"?L.list==="checked"||L.list==="unchecked"?this.quill.format("list",!1,w.default.sources.USER):this.quill.format("list","unchecked",w.default.sources.USER):this.quill.format("list",k,w.default.sources.USER)}}},r.default=T,r.addControls=R},function(t,r){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,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(v,g){for(var O=0;O<g.length;O++){var h=g[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,g,O){return g&&y(v.prototype,g),O&&y(v,O),v}}(),s=function y(v,g,O){v===null&&(v=Function.prototype);var h=Object.getOwnPropertyDescriptor(v,g);if(h===void 0){var p=Object.getPrototypeOf(v);return p===null?void 0:y(p,g,O)}else{if("value"in h)return h.value;var m=h.get;return m===void 0?void 0:m.call(O)}},c=a(28),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(g,O){_(this,v);var h=S(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return h.label.innerHTML=O,h.container.classList.add("ql-color-picker"),[].slice.call(h.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(p){p.classList.add("ql-primary")}),h}return l(v,[{key:"buildItem",value:function(O){var h=s(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,O);return h.style.backgroundColor=O.getAttribute("value")||"",h}},{key:"selectItem",value:function(O,h){s(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,O,h);var p=this.label.querySelector(".ql-color-label"),m=O&&O.getAttribute("data-value")||"";p&&(p.tagName==="line"?p.style.stroke=m:p.style.fill=m)}}]),v}(f.default);r.default=b},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(v,g){for(var O=0;O<g.length;O++){var h=g[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,g,O){return g&&y(v.prototype,g),O&&y(v,O),v}}(),s=function y(v,g,O){v===null&&(v=Function.prototype);var h=Object.getOwnPropertyDescriptor(v,g);if(h===void 0){var p=Object.getPrototypeOf(v);return p===null?void 0:y(p,g,O)}else{if("value"in h)return h.value;var m=h.get;return m===void 0?void 0:m.call(O)}},c=a(28),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(g,O){_(this,v);var h=S(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,g));return h.container.classList.add("ql-icon-picker"),[].forEach.call(h.container.querySelectorAll(".ql-picker-item"),function(p){p.innerHTML=O[p.getAttribute("data-value")||""]}),h.defaultItem=h.container.querySelector(".ql-selected"),h.selectItem(h.defaultItem),h}return l(v,[{key:"selectItem",value:function(O,h){s(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,O,h),O=O||this.defaultItem,this.label.innerHTML=O.innerHTML}}]),v}(f.default);r.default=b},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function f(E,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(E,w.key,w)}}return function(E,_,S){return _&&f(E.prototype,_),S&&f(E,S),E}}();function s(f,E){if(!(f instanceof E))throw new TypeError("Cannot call a class as a function")}var c=function(){function f(E,_){var S=this;s(this,f),this.quill=E,this.boundsContainer=_||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(){S.root.style.marginTop=-1*S.quill.root.scrollTop+"px"}),this.hide()}return l(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(_){var S=_.left+_.width/2-this.root.offsetWidth/2,w=_.bottom+this.quill.root.scrollTop;this.root.style.left=S+"px",this.root.style.top=w+"px",this.root.classList.remove("ql-flip");var b=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),v=0;if(y.right>b.right&&(v=b.right-y.right,this.root.style.left=S+v+"px"),y.left<b.left&&(v=b.left-y.left,this.root.style.left=S+v+"px"),y.bottom>b.bottom){var g=y.bottom-y.top,O=_.bottom-_.top+g;this.root.style.top=w-O+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();r.default=c},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function C(M,k){var A=[],L=!0,z=!1,Y=void 0;try{for(var $=M[Symbol.iterator](),X;!(L=(X=$.next()).done)&&(A.push(X.value),!(k&&A.length===k));L=!0);}catch(q){z=!0,Y=q}finally{try{!L&&$.return&&$.return()}finally{if(z)throw Y}}return A}return function(M,k){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return C(M,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function C(M,k,A){M===null&&(M=Function.prototype);var L=Object.getOwnPropertyDescriptor(M,k);if(L===void 0){var z=Object.getPrototypeOf(M);return z===null?void 0:C(z,k,A)}else{if("value"in L)return L.value;var Y=L.get;return Y===void 0?void 0:Y.call(A)}},c=function(){function C(M,k){for(var A=0;A<k.length;A++){var L=k[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(M,L.key,L)}}return function(M,k,A){return k&&C(M.prototype,k),A&&C(M,A),M}}(),f=a(3),E=p(f),_=a(8),S=p(_),w=a(43),b=p(w),y=a(27),v=p(y),g=a(15),O=a(41),h=p(O);function p(C){return C&&C.__esModule?C:{default:C}}function m(C,M){if(!(C instanceof M))throw new TypeError("Cannot call a class as a function")}function x(C,M){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:C}function N(C,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);C.prototype=Object.create(M&&M.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(C,M):C.__proto__=M)}var T=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],I=function(C){N(M,C);function M(k,A){m(this,M),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=T);var L=x(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,k,A));return L.quill.container.classList.add("ql-snow"),L}return c(M,[{key:"extendToolbar",value:function(A){A.container.classList.add("ql-snow"),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),h.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),h.default),this.tooltip=new R(this.quill,this.options.bounds),A.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(L,z){A.handlers.link.call(A,!z.format.link)})}}]),M}(b.default);I.DEFAULTS=(0,E.default)(!0,{},b.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(M){if(M){var k=this.quill.getSelection();if(k==null||k.length==0)return;var A=this.quill.getText(k);/^\S+@\S+\.\S+$/.test(A)&&A.indexOf("mailto:")!==0&&(A="mailto:"+A);var L=this.quill.theme.tooltip;L.edit("link",A)}else this.quill.format("link",!1)}}}}});var R=function(C){N(M,C);function M(k,A){m(this,M);var L=x(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,k,A));return L.preview=L.root.querySelector("a.ql-preview"),L}return c(M,[{key:"listen",value:function(){var A=this;s(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(L){A.root.classList.contains("ql-editing")?A.save():A.edit("link",A.preview.textContent),L.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(L){if(A.linkRange!=null){var z=A.linkRange;A.restoreFocus(),A.quill.formatText(z,"link",!1,S.default.sources.USER),delete A.linkRange}L.preventDefault(),A.hide()}),this.quill.on(S.default.events.SELECTION_CHANGE,function(L,z,Y){if(L!=null){if(L.length===0&&Y===S.default.sources.USER){var $=A.quill.scroll.descendant(v.default,L.index),X=l($,2),q=X[0],D=X[1];if(q!=null){A.linkRange=new g.Range(L.index-D,q.length());var B=v.default.formats(q.domNode);A.preview.textContent=B,A.preview.setAttribute("href",B),A.show(),A.position(A.quill.getBounds(A.linkRange));return}}else delete A.linkRange;A.hide()}})}},{key:"show",value:function(){s(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),M}(w.BaseTooltip);R.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(""),r.default=I},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(29),s=ce(l),c=a(36),f=a(38),E=a(64),_=a(65),S=ce(_),w=a(66),b=ce(w),y=a(67),v=ce(y),g=a(37),O=a(26),h=a(39),p=a(40),m=a(56),x=ce(m),N=a(68),T=ce(N),I=a(27),R=ce(I),C=a(69),M=ce(C),k=a(70),A=ce(k),L=a(71),z=ce(L),Y=a(72),$=ce(Y),X=a(73),q=ce(X),D=a(13),B=ce(D),U=a(74),W=ce(U),ee=a(75),ne=ce(ee),te=a(57),Z=ce(te),ae=a(41),H=ce(ae),J=a(28),ie=ce(J),le=a(59),ue=ce(le),he=a(60),ye=ce(he),Ce=a(61),pe=ce(Ce),fe=a(108),ve=ce(fe),xe=a(62),Te=ce(xe);function ce(me){return me&&me.__esModule?me:{default:me}}s.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":g.BackgroundClass,"attributors/class/color":O.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":h.FontClass,"attributors/class/size":p.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":g.BackgroundStyle,"attributors/style/color":O.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":h.FontStyle,"attributors/style/size":p.SizeStyle},!0),s.default.register({"formats/align":c.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":E.IndentClass,"formats/background":g.BackgroundStyle,"formats/color":O.ColorStyle,"formats/font":h.FontClass,"formats/size":p.SizeClass,"formats/blockquote":S.default,"formats/code-block":B.default,"formats/header":b.default,"formats/list":v.default,"formats/bold":x.default,"formats/code":D.Code,"formats/italic":T.default,"formats/link":R.default,"formats/script":M.default,"formats/strike":A.default,"formats/underline":z.default,"formats/image":$.default,"formats/video":q.default,"formats/list/item":y.ListItem,"modules/formula":W.default,"modules/syntax":ne.default,"modules/toolbar":Z.default,"themes/bubble":ve.default,"themes/snow":Te.default,"ui/icons":H.default,"ui/picker":ie.default,"ui/icon-picker":ye.default,"ui/color-picker":ue.default,"ui/tooltip":pe.default},!0),r.default=s.default},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var l=function(){function v(g,O){for(var h=0;h<O.length;h++){var p=O[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(g,p.key,p)}}return function(g,O,h){return O&&v(g.prototype,O),h&&v(g,h),g}}(),s=function v(g,O,h){g===null&&(g=Function.prototype);var p=Object.getOwnPropertyDescriptor(g,O);if(p===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:v(m,O,h)}else{if("value"in p)return p.value;var x=p.get;return x===void 0?void 0:x.call(h)}},c=a(0),f=E(c);function E(v){return v&&v.__esModule?v:{default:v}}function _(v,g){if(!(v instanceof g))throw new TypeError("Cannot call a class as a function")}function S(v,g){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:v}function w(v,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);v.prototype=Object.create(g&&g.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(v,g):v.__proto__=g)}var b=function(v){w(g,v);function g(){return _(this,g),S(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"add",value:function(h,p){if(p==="+1"||p==="-1"){var m=this.value(h)||0;p=p==="+1"?m+1:m-1}return p===0?(this.remove(h),!0):s(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"add",this).call(this,h,p)}},{key:"canAdd",value:function(h,p){return s(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,h,p)||s(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"canAdd",this).call(this,h,parseInt(p))}},{key:"value",value:function(h){return parseInt(s(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,h))||void 0}}]),g}(f.default.Attributor.Class),y=new b("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=y},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(4),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}function f(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function E(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return f(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(s.default);S.blotName="blockquote",S.tagName="blockquote",r.default=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function b(y,v){for(var g=0;g<v.length;g++){var O=v[g];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(y,O.key,O)}}return function(y,v,g){return v&&b(y.prototype,v),g&&b(y,g),y}}(),s=a(4),c=f(s);function f(b){return b&&b.__esModule?b:{default:b}}function E(b,y){if(!(b instanceof y))throw new TypeError("Cannot call a class as a function")}function _(b,y){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:b}function S(b,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);b.prototype=Object.create(y&&y.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(b,y):b.__proto__=y)}var w=function(b){S(y,b);function y(){return E(this,y),_(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return l(y,null,[{key:"formats",value:function(g){return this.tagName.indexOf(g.tagName)+1}}]),y}(c.default);w.blotName="header",w.tagName=["H1","H2","H3","H4","H5","H6"],r.default=w},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var l=function(){function m(x,N){for(var T=0;T<N.length;T++){var I=N[T];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(x,I.key,I)}}return function(x,N,T){return N&&m(x.prototype,N),T&&m(x,T),x}}(),s=function m(x,N,T){x===null&&(x=Function.prototype);var I=Object.getOwnPropertyDescriptor(x,N);if(I===void 0){var R=Object.getPrototypeOf(x);return R===null?void 0:m(R,N,T)}else{if("value"in I)return I.value;var C=I.get;return C===void 0?void 0:C.call(T)}},c=a(0),f=b(c),E=a(4),_=b(E),S=a(25),w=b(S);function b(m){return m&&m.__esModule?m:{default:m}}function y(m,x,N){return x in m?Object.defineProperty(m,x,{value:N,enumerable:!0,configurable:!0,writable:!0}):m[x]=N,m}function v(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")}function g(m,x){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:m}function O(m,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);m.prototype=Object.create(x&&x.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(m,x):m.__proto__=x)}var h=function(m){O(x,m);function x(){return v(this,x),g(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return l(x,[{key:"format",value:function(T,I){T===p.blotName&&!I?this.replaceWith(f.default.create(this.statics.scope)):s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,T,I)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(T,I){return this.parent.isolate(this.offset(this.parent),this.length()),T===this.parent.statics.blotName?(this.parent.replaceWith(T,I),this):(this.parent.unwrap(),s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replaceWith",this).call(this,T,I))}}],[{key:"formats",value:function(T){return T.tagName===this.tagName?void 0:s(x.__proto__||Object.getPrototypeOf(x),"formats",this).call(this,T)}}]),x}(_.default);h.blotName="list-item",h.tagName="LI";var p=function(m){O(x,m),l(x,null,[{key:"create",value:function(T){var I=T==="ordered"?"OL":"UL",R=s(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return(T==="checked"||T==="unchecked")&&R.setAttribute("data-checked",T==="checked"),R}},{key:"formats",value:function(T){if(T.tagName==="OL")return"ordered";if(T.tagName==="UL")return T.hasAttribute("data-checked")?T.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function x(N){v(this,x);var T=g(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,N)),I=function(C){if(C.target.parentNode===N){var M=T.statics.formats(N),k=f.default.find(C.target);M==="checked"?k.format("list","unchecked"):M==="unchecked"&&k.format("list","checked")}};return N.addEventListener("touchstart",I),N.addEventListener("mousedown",I),T}return l(x,[{key:"format",value:function(T,I){this.children.length>0&&this.children.tail.format(T,I)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(T,I){if(T instanceof h)s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"insertBefore",this).call(this,T,I);else{var R=I==null?this.length():I.offset(this),C=this.split(R);C.parent.insertBefore(T,C)}}},{key:"optimize",value:function(T){s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,T);var I=this.next;I!=null&&I.prev===this&&I.statics.blotName===this.statics.blotName&&I.domNode.tagName===this.domNode.tagName&&I.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(I.moveChildren(this),I.remove())}},{key:"replace",value:function(T){if(T.statics.blotName!==this.statics.blotName){var I=f.default.create(this.statics.defaultChild);T.moveChildren(I),this.appendChild(I)}s(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,T)}}]),x}(w.default);p.blotName="list",p.scope=f.default.Scope.BLOCK_BLOT,p.tagName=["OL","UL"],p.defaultChild="list-item",p.allowedChildren=[h],r.ListItem=h,r.default=p},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(56),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}function f(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function E(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return f(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(s.default);S.blotName="italic",S.tagName=["EM","I"],r.default=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function y(v,g){for(var O=0;O<g.length;O++){var h=g[O];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(v,h.key,h)}}return function(v,g,O){return g&&y(v.prototype,g),O&&y(v,O),v}}(),s=function y(v,g,O){v===null&&(v=Function.prototype);var h=Object.getOwnPropertyDescriptor(v,g);if(h===void 0){var p=Object.getPrototypeOf(v);return p===null?void 0:y(p,g,O)}else{if("value"in h)return h.value;var m=h.get;return m===void 0?void 0:m.call(O)}},c=a(6),f=E(c);function E(y){return y&&y.__esModule?y:{default:y}}function _(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}function S(y,v){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:y}function w(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);y.prototype=Object.create(v&&v.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(y,v):y.__proto__=v)}var b=function(y){w(v,y);function v(){return _(this,v),S(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return l(v,null,[{key:"create",value:function(O){return O==="super"?document.createElement("sup"):O==="sub"?document.createElement("sub"):s(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,O)}},{key:"formats",value:function(O){if(O.tagName==="SUB")return"sub";if(O.tagName==="SUP")return"super"}}]),v}(f.default);b.blotName="script",b.tagName=["SUB","SUP"],r.default=b},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(6),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}function f(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function E(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return f(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(s.default);S.blotName="strike",S.tagName="S",r.default=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=a(6),s=c(l);function c(w){return w&&w.__esModule?w:{default:w}}function f(w,b){if(!(w instanceof b))throw new TypeError("Cannot call a class as a function")}function E(w,b){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:w}function _(w,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);w.prototype=Object.create(b&&b.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(w,b):w.__proto__=b)}var S=function(w){_(b,w);function b(){return f(this,b),E(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return b}(s.default);S.blotName="underline",S.tagName="U",r.default=S},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function g(O,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(O,m.key,m)}}return function(O,h,p){return h&&g(O.prototype,h),p&&g(O,p),O}}(),s=function g(O,h,p){O===null&&(O=Function.prototype);var m=Object.getOwnPropertyDescriptor(O,h);if(m===void 0){var x=Object.getPrototypeOf(O);return x===null?void 0:g(x,h,p)}else{if("value"in m)return m.value;var N=m.get;return N===void 0?void 0:N.call(p)}},c=a(0),f=_(c),E=a(27);function _(g){return g&&g.__esModule?g:{default:g}}function S(g,O){if(!(g instanceof O))throw new TypeError("Cannot call a class as a function")}function w(g,O){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:g}function b(g,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);g.prototype=Object.create(O&&O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(g,O):g.__proto__=O)}var y=["alt","height","width"],v=function(g){b(O,g);function O(){return S(this,O),w(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return l(O,[{key:"format",value:function(p,m){y.indexOf(p)>-1?m?this.domNode.setAttribute(p,m):this.domNode.removeAttribute(p):s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,p,m)}}],[{key:"create",value:function(p){var m=s(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,p);return typeof p=="string"&&m.setAttribute("src",this.sanitize(p)),m}},{key:"formats",value:function(p){return y.reduce(function(m,x){return p.hasAttribute(x)&&(m[x]=p.getAttribute(x)),m},{})}},{key:"match",value:function(p){return/\.(jpe?g|gif|png)$/.test(p)||/^data:image\/.+;base64/.test(p)}},{key:"sanitize",value:function(p){return(0,E.sanitize)(p,["http","https","data"])?p:"//:0"}},{key:"value",value:function(p){return p.getAttribute("src")}}]),O}(f.default.Embed);v.blotName="image",v.tagName="IMG",r.default=v},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0});var l=function(){function g(O,h){for(var p=0;p<h.length;p++){var m=h[p];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(O,m.key,m)}}return function(O,h,p){return h&&g(O.prototype,h),p&&g(O,p),O}}(),s=function g(O,h,p){O===null&&(O=Function.prototype);var m=Object.getOwnPropertyDescriptor(O,h);if(m===void 0){var x=Object.getPrototypeOf(O);return x===null?void 0:g(x,h,p)}else{if("value"in m)return m.value;var N=m.get;return N===void 0?void 0:N.call(p)}},c=a(4),f=a(27),E=_(f);function _(g){return g&&g.__esModule?g:{default:g}}function S(g,O){if(!(g instanceof O))throw new TypeError("Cannot call a class as a function")}function w(g,O){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:g}function b(g,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);g.prototype=Object.create(O&&O.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(g,O):g.__proto__=O)}var y=["height","width"],v=function(g){b(O,g);function O(){return S(this,O),w(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return l(O,[{key:"format",value:function(p,m){y.indexOf(p)>-1?m?this.domNode.setAttribute(p,m):this.domNode.removeAttribute(p):s(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,p,m)}}],[{key:"create",value:function(p){var m=s(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,p);return m.setAttribute("frameborder","0"),m.setAttribute("allowfullscreen",!0),m.setAttribute("src",this.sanitize(p)),m}},{key:"formats",value:function(p){return y.reduce(function(m,x){return p.hasAttribute(x)&&(m[x]=p.getAttribute(x)),m},{})}},{key:"sanitize",value:function(p){return E.default.sanitize(p)}},{key:"value",value:function(p){return p.getAttribute("src")}}]),O}(c.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",r.default=v},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var l=function(){function p(m,x){for(var N=0;N<x.length;N++){var T=x[N];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(m,T.key,T)}}return function(m,x,N){return x&&p(m.prototype,x),N&&p(m,N),m}}(),s=function p(m,x,N){m===null&&(m=Function.prototype);var T=Object.getOwnPropertyDescriptor(m,x);if(T===void 0){var I=Object.getPrototypeOf(m);return I===null?void 0:p(I,x,N)}else{if("value"in T)return T.value;var R=T.get;return R===void 0?void 0:R.call(N)}},c=a(35),f=b(c),E=a(5),_=b(E),S=a(9),w=b(S);function b(p){return p&&p.__esModule?p:{default:p}}function y(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function v(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function g(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var O=function(p){g(m,p);function m(){return y(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return l(m,null,[{key:"create",value:function(N){var T=s(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,N);return typeof N=="string"&&(window.katex.render(N,T,{throwOnError:!1,errorColor:"#f00"}),T.setAttribute("data-value",N)),T}},{key:"value",value:function(N){return N.getAttribute("data-value")}}]),m}(f.default);O.blotName="formula",O.className="ql-formula",O.tagName="SPAN";var h=function(p){g(m,p),l(m,null,[{key:"register",value:function(){_.default.register(O,!0)}}]);function m(){y(this,m);var x=v(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return x}return m}(w.default);r.FormulaBlot=O,r.default=h},function(t,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var l=function(){function N(T,I){for(var R=0;R<I.length;R++){var C=I[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(T,C.key,C)}}return function(T,I,R){return I&&N(T.prototype,I),R&&N(T,R),T}}(),s=function N(T,I,R){T===null&&(T=Function.prototype);var C=Object.getOwnPropertyDescriptor(T,I);if(C===void 0){var M=Object.getPrototypeOf(T);return M===null?void 0:N(M,I,R)}else{if("value"in C)return C.value;var k=C.get;return k===void 0?void 0:k.call(R)}},c=a(0),f=v(c),E=a(5),_=v(E),S=a(9),w=v(S),b=a(13),y=v(b);function v(N){return N&&N.__esModule?N:{default:N}}function g(N,T){if(!(N instanceof T))throw new TypeError("Cannot call a class as a function")}function O(N,T){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:N}function h(N,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);N.prototype=Object.create(T&&T.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(N,T):N.__proto__=T)}var p=function(N){h(T,N);function T(){return g(this,T),O(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}return l(T,[{key:"replaceWith",value:function(R){this.domNode.textContent=this.domNode.textContent,this.attach(),s(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"replaceWith",this).call(this,R)}},{key:"highlight",value:function(R){var C=this.domNode.textContent;this.cachedText!==C&&((C.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=R(C),this.domNode.normalize(),this.attach()),this.cachedText=C)}}]),T}(y.default);p.className="ql-syntax";var m=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),x=function(N){h(T,N),l(T,null,[{key:"register",value:function(){_.default.register(m,!0),_.default.register(p,!0)}}]);function T(I,R){g(this,T);var C=O(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,I,R));if(typeof C.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var M=null;return C.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(M),M=setTimeout(function(){C.highlight(),M=null},C.options.interval)}),C.highlight(),C}return l(T,[{key:"highlight",value:function(){var R=this;if(!this.quill.selection.composing){this.quill.update(_.default.sources.USER);var C=this.quill.getSelection();this.quill.scroll.descendants(p).forEach(function(M){M.highlight(R.options.highlight)}),this.quill.update(_.default.sources.SILENT),C!=null&&this.quill.setSelection(C,_.default.sources.SILENT)}}}]),T}(w.default);x.DEFAULTS={highlight:function(){return window.hljs==null?null:function(N){var T=window.hljs.highlightAuto(N);return T.value}}(),interval:1e3},r.CodeBlock=p,r.CodeToken=m,r.default=x},function(t,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r){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,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var l=function T(I,R,C){I===null&&(I=Function.prototype);var M=Object.getOwnPropertyDescriptor(I,R);if(M===void 0){var k=Object.getPrototypeOf(I);return k===null?void 0:T(k,R,C)}else{if("value"in M)return M.value;var A=M.get;return A===void 0?void 0:A.call(C)}},s=function(){function T(I,R){for(var C=0;C<R.length;C++){var M=R[C];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(I,M.key,M)}}return function(I,R,C){return R&&T(I.prototype,R),C&&T(I,C),I}}(),c=a(3),f=g(c),E=a(8),_=g(E),S=a(43),w=g(S),b=a(15),y=a(41),v=g(y);function g(T){return T&&T.__esModule?T:{default:T}}function O(T,I){if(!(T instanceof I))throw new TypeError("Cannot call a class as a function")}function h(T,I){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I&&(typeof I=="object"||typeof I=="function")?I:T}function p(T,I){if(typeof I!="function"&&I!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof I);T.prototype=Object.create(I&&I.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),I&&(Object.setPrototypeOf?Object.setPrototypeOf(T,I):T.__proto__=I)}var m=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],x=function(T){p(I,T);function I(R,C){O(this,I),C.modules.toolbar!=null&&C.modules.toolbar.container==null&&(C.modules.toolbar.container=m);var M=h(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,R,C));return M.quill.container.classList.add("ql-bubble"),M}return s(I,[{key:"extendToolbar",value:function(C){this.tooltip=new N(this.quill,this.options.bounds),this.tooltip.root.appendChild(C.container),this.buildButtons([].slice.call(C.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(C.container.querySelectorAll("select")),v.default)}}]),I}(w.default);x.DEFAULTS=(0,f.default)(!0,{},w.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(I){I?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var N=function(T){p(I,T);function I(R,C){O(this,I);var M=h(this,(I.__proto__||Object.getPrototypeOf(I)).call(this,R,C));return M.quill.on(_.default.events.EDITOR_CHANGE,function(k,A,L,z){if(k===_.default.events.SELECTION_CHANGE)if(A!=null&&A.length>0&&z===_.default.sources.USER){M.show(),M.root.style.left="0px",M.root.style.width="",M.root.style.width=M.root.offsetWidth+"px";var Y=M.quill.getLines(A.index,A.length);if(Y.length===1)M.position(M.quill.getBounds(A));else{var $=Y[Y.length-1],X=M.quill.getIndex($),q=Math.min($.length()-1,A.index+A.length-X),D=M.quill.getBounds(new b.Range(X,q));M.position(D)}}else document.activeElement!==M.textbox&&M.quill.hasFocus()&&M.hide()}),M}return s(I,[{key:"listen",value:function(){var C=this;l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){C.root.classList.remove("ql-editing")}),this.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!C.root.classList.contains("ql-hidden")){var M=C.quill.getSelection();M!=null&&C.position(C.quill.getBounds(M))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(C){var M=l(I.prototype.__proto__||Object.getPrototypeOf(I.prototype),"position",this).call(this,C),k=this.root.querySelector(".ql-tooltip-arrow");if(k.style.marginLeft="",M===0)return M;k.style.marginLeft=-1*M-k.offsetWidth/2+"px"}}]),I}(S.BaseTooltip);N.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(""),r.BubbleTooltip=N,r.default=x},function(t,r,a){t.exports=a(63)}]).default})}(dp)),dp.exports}var Xo={},hp={exports:{}},Hs={},Pd={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var dO=Pd.exports,ab;function hO(){return ab||(ab=1,function(e,i){(function(t){var r=i&&!i.nodeType&&i,a=e&&!e.nodeType&&e,l=typeof cc=="object"&&cc;(l.global===l||l.window===l||l.self===l)&&(t=l);var s,c=2147483647,f=36,E=1,_=26,S=38,w=700,b=72,y=128,v="-",g=/^xn--/,O=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=f-E,x=Math.floor,N=String.fromCharCode,T;function I(D){throw new RangeError(p[D])}function R(D,B){for(var U=D.length,W=[];U--;)W[U]=B(D[U]);return W}function C(D,B){var U=D.split("@"),W="";U.length>1&&(W=U[0]+"@",D=U[1]),D=D.replace(h,".");var ee=D.split("."),ne=R(ee,B).join(".");return W+ne}function M(D){for(var B=[],U=0,W=D.length,ee,ne;U<W;)ee=D.charCodeAt(U++),ee>=55296&&ee<=56319&&U<W?(ne=D.charCodeAt(U++),(ne&64512)==56320?B.push(((ee&1023)<<10)+(ne&1023)+65536):(B.push(ee),U--)):B.push(ee);return B}function k(D){return R(D,function(B){var U="";return B>65535&&(B-=65536,U+=N(B>>>10&1023|55296),B=56320|B&1023),U+=N(B),U}).join("")}function A(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:f}function L(D,B){return D+22+75*(D<26)-((B!=0)<<5)}function z(D,B,U){var W=0;for(D=U?x(D/w):D>>1,D+=x(D/B);D>m*_>>1;W+=f)D=x(D/m);return x(W+(m+1)*D/(D+S))}function Y(D){var B=[],U=D.length,W,ee=0,ne=y,te=b,Z,ae,H,J,ie,le,ue,he,ye;for(Z=D.lastIndexOf(v),Z<0&&(Z=0),ae=0;ae<Z;++ae)D.charCodeAt(ae)>=128&&I("not-basic"),B.push(D.charCodeAt(ae));for(H=Z>0?Z+1:0;H<U;){for(J=ee,ie=1,le=f;H>=U&&I("invalid-input"),ue=A(D.charCodeAt(H++)),(ue>=f||ue>x((c-ee)/ie))&&I("overflow"),ee+=ue*ie,he=le<=te?E:le>=te+_?_:le-te,!(ue<he);le+=f)ye=f-he,ie>x(c/ye)&&I("overflow"),ie*=ye;W=B.length+1,te=z(ee-J,W,J==0),x(ee/W)>c-ne&&I("overflow"),ne+=x(ee/W),ee%=W,B.splice(ee++,0,ne)}return k(B)}function $(D){var B,U,W,ee,ne,te,Z,ae,H,J,ie,le=[],ue,he,ye,Ce;for(D=M(D),ue=D.length,B=y,U=0,ne=b,te=0;te<ue;++te)ie=D[te],ie<128&&le.push(N(ie));for(W=ee=le.length,ee&&le.push(v);W<ue;){for(Z=c,te=0;te<ue;++te)ie=D[te],ie>=B&&ie<Z&&(Z=ie);for(he=W+1,Z-B>x((c-U)/he)&&I("overflow"),U+=(Z-B)*he,B=Z,te=0;te<ue;++te)if(ie=D[te],ie<B&&++U>c&&I("overflow"),ie==B){for(ae=U,H=f;J=H<=ne?E:H>=ne+_?_:H-ne,!(ae<J);H+=f)Ce=ae-J,ye=f-J,le.push(N(L(J+Ce%ye,0))),ae=x(Ce/ye);le.push(N(L(ae,0))),ne=z(U,he,W==ee),U=0,++W}++U,++B}return le.join("")}function X(D){return C(D,function(B){return g.test(B)?Y(B.slice(4).toLowerCase()):B})}function q(D){return C(D,function(B){return O.test(B)?"xn--"+$(B):B})}if(s={version:"1.4.1",ucs2:{decode:M,encode:k},decode:Y,encode:$,toASCII:q,toUnicode:X},r&&a)if(e.exports==r)a.exports=s;else for(T in s)s.hasOwnProperty(T)&&(r[T]=s[T]);else t.punycode=s})(dO)}(Pd,Pd.exports)),Pd.exports}var p0,ob;function Pc(){return ob||(ob=1,p0=TypeError),p0}const pO={},gO=Object.freeze(Object.defineProperty({__proto__:null,default:pO},Symbol.toStringTag,{value:"Module"})),vO=rs(gO);var g0,lb;function Yp(){if(lb)return g0;lb=1;var e=typeof Map=="function"&&Map.prototype,i=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=e&&i&&typeof i.get=="function"?i.get:null,r=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=a&&l&&typeof l.get=="function"?l.get:null,c=a&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,E=f?WeakMap.prototype.has:null,_=typeof WeakSet=="function"&&WeakSet.prototype,S=_?WeakSet.prototype.has:null,w=typeof WeakRef=="function"&&WeakRef.prototype,b=w?WeakRef.prototype.deref:null,y=Boolean.prototype.valueOf,v=Object.prototype.toString,g=Function.prototype.toString,O=String.prototype.match,h=String.prototype.slice,p=String.prototype.replace,m=String.prototype.toUpperCase,x=String.prototype.toLowerCase,N=RegExp.prototype.test,T=Array.prototype.concat,I=Array.prototype.join,R=Array.prototype.slice,C=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,k=Object.getOwnPropertySymbols,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,L=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||!0)?Symbol.toStringTag:null,Y=Object.prototype.propertyIsEnumerable,$=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(_e){return _e.__proto__}:null);function X(_e,Se){if(_e===1/0||_e===-1/0||_e!==_e||_e&&_e>-1e3&&_e<1e3||N.call(/e/,Se))return Se;var xt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof _e=="number"){var ht=_e<0?-C(-_e):C(_e);if(ht!==_e){var At=String(ht),vt=h.call(Se,At.length+1);return p.call(At,xt,"$&_")+"."+p.call(p.call(vt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return p.call(Se,xt,"$&_")}var q=vO,D=q.custom,B=he(D)?D:null,U={__proto__:null,double:'"',single:"'"},W={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};g0=function _e(Se,xt,ht,At){var vt=xt||{};if(pe(vt,"quoteStyle")&&!pe(U,vt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(pe(vt,"maxStringLength")&&(typeof vt.maxStringLength=="number"?vt.maxStringLength<0&&vt.maxStringLength!==1/0:vt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Tr=pe(vt,"customInspect")?vt.customInspect:!0;if(typeof Tr!="boolean"&&Tr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(pe(vt,"indent")&&vt.indent!==null&&vt.indent!==" "&&!(parseInt(vt.indent,10)===vt.indent&&vt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(pe(vt,"numericSeparator")&&typeof vt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Pr=vt.numericSeparator;if(typeof Se>"u")return"undefined";if(Se===null)return"null";if(typeof Se=="boolean")return Se?"true":"false";if(typeof Se=="string")return rt(Se,vt);if(typeof Se=="number"){if(Se===0)return 1/0/Se>0?"0":"-0";var tr=String(Se);return Pr?X(Se,tr):tr}if(typeof Se=="bigint"){var mr=String(Se)+"n";return Pr?X(Se,mr):mr}var Pn=typeof vt.depth>"u"?5:vt.depth;if(typeof ht>"u"&&(ht=0),ht>=Pn&&Pn>0&&typeof Se=="object")return Z(Se)?"[Array]":"[Object]";var Ve=lt(vt,ht);if(typeof At>"u")At=[];else if(xe(At,Se)>=0)return"[Circular]";function at(rr,Kt,Cn){if(Kt&&(At=R.call(At),At.push(Kt)),Cn){var kn={depth:vt.depth};return pe(vt,"quoteStyle")&&(kn.quoteStyle=vt.quoteStyle),_e(rr,kn,ht+1,At)}return _e(rr,vt,ht+1,At)}if(typeof Se=="function"&&!H(Se)){var bt=ve(Se),Ot=zt(Se,at);return"[Function"+(bt?": "+bt:" (anonymous)")+"]"+(Ot.length>0?" { "+I.call(Ot,", ")+" }":"")}if(he(Se)){var je=L?p.call(String(Se),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(Se);return typeof Se=="object"&&!L?$e(je):je}if(tt(Se)){for(var Ze="<"+x.call(String(Se.nodeName)),ct=Se.attributes||[],Ie=0;Ie<ct.length;Ie++)Ze+=" "+ct[Ie].name+"="+ee(ne(ct[Ie].value),"double",vt);return Ze+=">",Se.childNodes&&Se.childNodes.length&&(Ze+="..."),Ze+="</"+x.call(String(Se.nodeName))+">",Ze}if(Z(Se)){if(Se.length===0)return"[]";var _t=zt(Se,at);return Ve&&!Ye(_t)?"["+wt(_t,Ve)+"]":"[ "+I.call(_t,", ")+" ]"}if(J(Se)){var Fe=zt(Se,at);return!("cause"in Error.prototype)&&"cause"in Se&&!Y.call(Se,"cause")?"{ ["+String(Se)+"] "+I.call(T.call("[cause]: "+at(Se.cause),Fe),", ")+" }":Fe.length===0?"["+String(Se)+"]":"{ ["+String(Se)+"] "+I.call(Fe,", ")+" }"}if(typeof Se=="object"&&Tr){if(B&&typeof Se[B]=="function"&&q)return q(Se,{depth:Pn-ht});if(Tr!=="symbol"&&typeof Se.inspect=="function")return Se.inspect()}if(Te(Se)){var mt=[];return r&&r.call(Se,function(rr,Kt){mt.push(at(Kt,Se,!0)+" => "+at(rr,Se))}),De("Map",t.call(Se),mt,Ve)}if(Oe(Se)){var ir=[];return c&&c.call(Se,function(rr){ir.push(at(rr,Se))}),De("Set",s.call(Se),ir,Ve)}if(ce(Se))return Xe("WeakMap");if(Ne(Se))return Xe("WeakSet");if(me(Se))return Xe("WeakRef");if(le(Se))return $e(at(Number(Se)));if(ye(Se))return $e(at(M.call(Se)));if(ue(Se))return $e(y.call(Se));if(ie(Se))return $e(at(String(Se)));if(typeof window<"u"&&Se===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Se===globalThis||typeof cc<"u"&&Se===cc)return"{ [object globalThis] }";if(!ae(Se)&&!H(Se)){var Vt=zt(Se,at),pn=$?$(Se)===Object.prototype:Se instanceof Object||Se.constructor===Object,Lr=Se instanceof Object?"":"null prototype",et=!pn&&z&&Object(Se)===Se&&z in Se?h.call(fe(Se),8,-1):Lr?"Object":"",qt=pn||typeof Se.constructor!="function"?"":Se.constructor.name?Se.constructor.name+" ":"",$t=qt+(et||Lr?"["+I.call(T.call([],et||[],Lr||[]),": ")+"] ":"");return Vt.length===0?$t+"{}":Ve?$t+"{"+wt(Vt,Ve)+"}":$t+"{ "+I.call(Vt,", ")+" }"}return String(Se)};function ee(_e,Se,xt){var ht=xt.quoteStyle||Se,At=U[ht];return At+_e+At}function ne(_e){return p.call(String(_e),/"/g,""")}function te(_e){return!z||!(typeof _e=="object"&&(z in _e||typeof _e[z]<"u"))}function Z(_e){return fe(_e)==="[object Array]"&&te(_e)}function ae(_e){return fe(_e)==="[object Date]"&&te(_e)}function H(_e){return fe(_e)==="[object RegExp]"&&te(_e)}function J(_e){return fe(_e)==="[object Error]"&&te(_e)}function ie(_e){return fe(_e)==="[object String]"&&te(_e)}function le(_e){return fe(_e)==="[object Number]"&&te(_e)}function ue(_e){return fe(_e)==="[object Boolean]"&&te(_e)}function he(_e){if(L)return _e&&typeof _e=="object"&&_e instanceof Symbol;if(typeof _e=="symbol")return!0;if(!_e||typeof _e!="object"||!A)return!1;try{return A.call(_e),!0}catch{}return!1}function ye(_e){if(!_e||typeof _e!="object"||!M)return!1;try{return M.call(_e),!0}catch{}return!1}var Ce=Object.prototype.hasOwnProperty||function(_e){return _e in this};function pe(_e,Se){return Ce.call(_e,Se)}function fe(_e){return v.call(_e)}function ve(_e){if(_e.name)return _e.name;var Se=O.call(g.call(_e),/^function\s*([\w$]+)/);return Se?Se[1]:null}function xe(_e,Se){if(_e.indexOf)return _e.indexOf(Se);for(var xt=0,ht=_e.length;xt<ht;xt++)if(_e[xt]===Se)return xt;return-1}function Te(_e){if(!t||!_e||typeof _e!="object")return!1;try{t.call(_e);try{s.call(_e)}catch{return!0}return _e instanceof Map}catch{}return!1}function ce(_e){if(!E||!_e||typeof _e!="object")return!1;try{E.call(_e,E);try{S.call(_e,S)}catch{return!0}return _e instanceof WeakMap}catch{}return!1}function me(_e){if(!b||!_e||typeof _e!="object")return!1;try{return b.call(_e),!0}catch{}return!1}function Oe(_e){if(!s||!_e||typeof _e!="object")return!1;try{s.call(_e);try{t.call(_e)}catch{return!0}return _e instanceof Set}catch{}return!1}function Ne(_e){if(!S||!_e||typeof _e!="object")return!1;try{S.call(_e,S);try{E.call(_e,E)}catch{return!0}return _e instanceof WeakSet}catch{}return!1}function tt(_e){return!_e||typeof _e!="object"?!1:typeof HTMLElement<"u"&&_e instanceof HTMLElement?!0:typeof _e.nodeName=="string"&&typeof _e.getAttribute=="function"}function rt(_e,Se){if(_e.length>Se.maxStringLength){var xt=_e.length-Se.maxStringLength,ht="... "+xt+" more character"+(xt>1?"s":"");return rt(h.call(_e,0,Se.maxStringLength),Se)+ht}var At=W[Se.quoteStyle||"single"];At.lastIndex=0;var vt=p.call(p.call(_e,At,"\\$1"),/[\x00-\x1f]/g,He);return ee(vt,"single",Se)}function He(_e){var Se=_e.charCodeAt(0),xt={8:"b",9:"t",10:"n",12:"f",13:"r"}[Se];return xt?"\\"+xt:"\\x"+(Se<16?"0":"")+m.call(Se.toString(16))}function $e(_e){return"Object("+_e+")"}function Xe(_e){return _e+" { ? }"}function De(_e,Se,xt,ht){var At=ht?wt(xt,ht):I.call(xt,", ");return _e+" ("+Se+") {"+At+"}"}function Ye(_e){for(var Se=0;Se<_e.length;Se++)if(xe(_e[Se],`
|
|
149
|
-
`)>=0)return!1;return!0}function lt(_e,Se){var xt;if(_e.indent===" ")xt=" ";else if(typeof _e.indent=="number"&&_e.indent>0)xt=I.call(Array(_e.indent+1)," ");else return null;return{base:xt,prev:I.call(Array(Se+1),xt)}}function wt(_e,Se){if(_e.length===0)return"";var xt=`
|
|
150
|
-
`+Se.prev+Se.base;return xt+I.call(_e,","+xt)+`
|
|
151
|
-
`+Se.prev}function zt(_e,Se){var xt=Z(_e),ht=[];if(xt){ht.length=_e.length;for(var At=0;At<_e.length;At++)ht[At]=pe(_e,At)?Se(_e[At],_e):""}var vt=typeof k=="function"?k(_e):[],Tr;if(L){Tr={};for(var Pr=0;Pr<vt.length;Pr++)Tr["$"+vt[Pr]]=vt[Pr]}for(var tr in _e)pe(_e,tr)&&(xt&&String(Number(tr))===tr&&tr<_e.length||L&&Tr["$"+tr]instanceof Symbol||(N.call(/[^\w$]/,tr)?ht.push(Se(tr,_e)+": "+Se(_e[tr],_e)):ht.push(tr+": "+Se(_e[tr],_e))));if(typeof k=="function")for(var mr=0;mr<vt.length;mr++)Y.call(_e,vt[mr])&&ht.push("["+Se(vt[mr])+"]: "+Se(_e[vt[mr]],_e));return ht}return g0}var v0,sb;function mO(){if(sb)return v0;sb=1;var e=Yp(),i=Pc(),t=function(c,f,E){for(var _=c,S;(S=_.next)!=null;_=S)if(S.key===f)return _.next=S.next,E||(S.next=c.next,c.next=S),S},r=function(c,f){if(c){var E=t(c,f);return E&&E.value}},a=function(c,f,E){var _=t(c,f);_?_.value=E:c.next={key:f,next:c.next,value:E}},l=function(c,f){return c?!!t(c,f):!1},s=function(c,f){if(c)return t(c,f,!0)};return v0=function(){var f,E={assert:function(_){if(!E.has(_))throw new i("Side channel does not contain "+e(_))},delete:function(_){var S=f&&f.next,w=s(f,_);return w&&S&&S===w&&(f=void 0),!!w},get:function(_){return r(f,_)},has:function(_){return l(f,_)},set:function(_,S){f||(f={next:void 0}),a(f,_,S)}};return E},v0}var m0,ub;function B4(){return ub||(ub=1,m0=Object),m0}var y0,cb;function yO(){return cb||(cb=1,y0=Error),y0}var b0,fb;function bO(){return fb||(fb=1,b0=EvalError),b0}var w0,db;function wO(){return db||(db=1,w0=RangeError),w0}var _0,hb;function _O(){return hb||(hb=1,_0=ReferenceError),_0}var S0,pb;function SO(){return pb||(pb=1,S0=SyntaxError),S0}var E0,gb;function EO(){return gb||(gb=1,E0=URIError),E0}var x0,vb;function xO(){return vb||(vb=1,x0=Math.abs),x0}var O0,mb;function OO(){return mb||(mb=1,O0=Math.floor),O0}var P0,yb;function PO(){return yb||(yb=1,P0=Math.max),P0}var C0,bb;function CO(){return bb||(bb=1,C0=Math.min),C0}var k0,wb;function kO(){return wb||(wb=1,k0=Math.pow),k0}var A0,_b;function AO(){return _b||(_b=1,A0=Math.round),A0}var T0,Sb;function TO(){return Sb||(Sb=1,T0=Number.isNaN||function(i){return i!==i}),T0}var R0,Eb;function RO(){if(Eb)return R0;Eb=1;var e=TO();return R0=function(t){return e(t)||t===0?t:t<0?-1:1},R0}var M0,xb;function MO(){return xb||(xb=1,M0=Object.getOwnPropertyDescriptor),M0}var L0,Ob;function U4(){if(Ob)return L0;Ob=1;var e=MO();if(e)try{e([],"length")}catch{e=null}return L0=e,L0}var N0,Pb;function LO(){if(Pb)return N0;Pb=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return N0=e,N0}var I0,Cb;function NO(){return Cb||(Cb=1,I0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},t=Symbol("test"),r=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var a=42;i[t]=a;for(var l in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var s=Object.getOwnPropertySymbols(i);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(i,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(i,t);if(c.value!==a||c.enumerable!==!0)return!1}return!0}),I0}var j0,kb;function IO(){if(kb)return j0;kb=1;var e=typeof Symbol<"u"&&Symbol,i=NO();return j0=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},j0}var D0,Ab;function q4(){return Ab||(Ab=1,D0=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),D0}var F0,Tb;function H4(){if(Tb)return F0;Tb=1;var e=B4();return F0=e.getPrototypeOf||null,F0}var z0,Rb;function jO(){if(Rb)return z0;Rb=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,t=Math.max,r="[object Function]",a=function(f,E){for(var _=[],S=0;S<f.length;S+=1)_[S]=f[S];for(var w=0;w<E.length;w+=1)_[w+f.length]=E[w];return _},l=function(f,E){for(var _=[],S=E,w=0;S<f.length;S+=1,w+=1)_[w]=f[S];return _},s=function(c,f){for(var E="",_=0;_<c.length;_+=1)E+=c[_],_+1<c.length&&(E+=f);return E};return z0=function(f){var E=this;if(typeof E!="function"||i.apply(E)!==r)throw new TypeError(e+E);for(var _=l(arguments,1),S,w=function(){if(this instanceof S){var O=E.apply(this,a(_,arguments));return Object(O)===O?O:this}return E.apply(f,a(_,arguments))},b=t(0,E.length-_.length),y=[],v=0;v<b;v++)y[v]="$"+v;if(S=Function("binder","return function ("+s(y,",")+"){ return binder.apply(this,arguments); }")(w),E.prototype){var g=function(){};g.prototype=E.prototype,S.prototype=new g,g.prototype=null}return S},z0}var B0,Mb;function Kp(){if(Mb)return B0;Mb=1;var e=jO();return B0=Function.prototype.bind||e,B0}var U0,Lb;function Yv(){return Lb||(Lb=1,U0=Function.prototype.call),U0}var q0,Nb;function G4(){return Nb||(Nb=1,q0=Function.prototype.apply),q0}var H0,Ib;function DO(){return Ib||(Ib=1,H0=typeof Reflect<"u"&&Reflect&&Reflect.apply),H0}var G0,jb;function FO(){if(jb)return G0;jb=1;var e=Kp(),i=G4(),t=Yv(),r=DO();return G0=r||e.call(t,i),G0}var V0,Db;function V4(){if(Db)return V0;Db=1;var e=Kp(),i=Pc(),t=Yv(),r=FO();return V0=function(l){if(l.length<1||typeof l[0]!="function")throw new i("a function is required");return r(e,t,l)},V0}var $0,Fb;function zO(){if(Fb)return $0;Fb=1;var e=V4(),i=U4(),t;try{t=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!t&&i&&i(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;return $0=r&&typeof r.get=="function"?e([r.get]):typeof l=="function"?function(c){return l(c==null?c:a(c))}:!1,$0}var W0,zb;function BO(){if(zb)return W0;zb=1;var e=q4(),i=H4(),t=zO();return W0=e?function(a){return e(a)}:i?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return i(a)}:t?function(a){return t(a)}:null,W0}var Y0,Bb;function UO(){if(Bb)return Y0;Bb=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,t=Kp();return Y0=t.call(e,i),Y0}var K0,Ub;function Kv(){if(Ub)return K0;Ub=1;var e,i=B4(),t=yO(),r=bO(),a=wO(),l=_O(),s=SO(),c=Pc(),f=EO(),E=xO(),_=OO(),S=PO(),w=CO(),b=kO(),y=AO(),v=RO(),g=Function,O=function(H){try{return g('"use strict"; return ('+H+").constructor;")()}catch{}},h=U4(),p=LO(),m=function(){throw new c},x=h?function(){try{return arguments.callee,m}catch{try{return h(arguments,"callee").get}catch{return m}}}():m,N=IO()(),T=BO(),I=H4(),R=q4(),C=G4(),M=Yv(),k={},A=typeof Uint8Array>"u"||!T?e:T(Uint8Array),L={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":N&&T?T([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":k,"%AsyncIteratorPrototype%":k,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":k,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&T?T(T([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!N||!T?e:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":h,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!N||!T?e:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&T?T(""[Symbol.iterator]()):e,"%Symbol%":N?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":x,"%TypedArray%":A,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":C,"%Object.defineProperty%":p,"%Object.getPrototypeOf%":I,"%Math.abs%":E,"%Math.floor%":_,"%Math.max%":S,"%Math.min%":w,"%Math.pow%":b,"%Math.round%":y,"%Math.sign%":v,"%Reflect.getPrototypeOf%":R};if(T)try{null.error}catch(H){var z=T(T(H));L["%Error.prototype%"]=z}var Y=function H(J){var ie;if(J==="%AsyncFunction%")ie=O("async function () {}");else if(J==="%GeneratorFunction%")ie=O("function* () {}");else if(J==="%AsyncGeneratorFunction%")ie=O("async function* () {}");else if(J==="%AsyncGenerator%"){var le=H("%AsyncGeneratorFunction%");le&&(ie=le.prototype)}else if(J==="%AsyncIteratorPrototype%"){var ue=H("%AsyncGenerator%");ue&&T&&(ie=T(ue.prototype))}return L[J]=ie,ie},$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},X=Kp(),q=UO(),D=X.call(M,Array.prototype.concat),B=X.call(C,Array.prototype.splice),U=X.call(M,String.prototype.replace),W=X.call(M,String.prototype.slice),ee=X.call(M,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,te=/\\(\\)?/g,Z=function(J){var ie=W(J,0,1),le=W(J,-1);if(ie==="%"&&le!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(le==="%"&&ie!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var ue=[];return U(J,ne,function(he,ye,Ce,pe){ue[ue.length]=Ce?U(pe,te,"$1"):ye||he}),ue},ae=function(J,ie){var le=J,ue;if(q($,le)&&(ue=$[le],le="%"+ue[0]+"%"),q(L,le)){var he=L[le];if(he===k&&(he=Y(le)),typeof he>"u"&&!ie)throw new c("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:ue,name:le,value:he}}throw new s("intrinsic "+J+" does not exist!")};return K0=function(J,ie){if(typeof J!="string"||J.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new c('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,J)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var le=Z(J),ue=le.length>0?le[0]:"",he=ae("%"+ue+"%",ie),ye=he.name,Ce=he.value,pe=!1,fe=he.alias;fe&&(ue=fe[0],B(le,D([0,1],fe)));for(var ve=1,xe=!0;ve<le.length;ve+=1){var Te=le[ve],ce=W(Te,0,1),me=W(Te,-1);if((ce==='"'||ce==="'"||ce==="`"||me==='"'||me==="'"||me==="`")&&ce!==me)throw new s("property names with quotes must have matching quotes");if((Te==="constructor"||!xe)&&(pe=!0),ue+="."+Te,ye="%"+ue+"%",q(L,ye))Ce=L[ye];else if(Ce!=null){if(!(Te in Ce)){if(!ie)throw new c("base intrinsic for "+J+" exists, but the property is not available.");return}if(h&&ve+1>=le.length){var Oe=h(Ce,Te);xe=!!Oe,xe&&"get"in Oe&&!("originalValue"in Oe.get)?Ce=Oe.get:Ce=Ce[Te]}else xe=q(Ce,Te),Ce=Ce[Te];xe&&!pe&&(L[ye]=Ce)}}return Ce},K0}var X0,qb;function $4(){if(qb)return X0;qb=1;var e=Kv(),i=V4(),t=i([e("%String.prototype.indexOf%")]);return X0=function(a,l){var s=e(a,!!l);return typeof s=="function"&&t(a,".prototype.")>-1?i([s]):s},X0}var Z0,Hb;function W4(){if(Hb)return Z0;Hb=1;var e=Kv(),i=$4(),t=Yp(),r=Pc(),a=e("%Map%",!0),l=i("Map.prototype.get",!0),s=i("Map.prototype.set",!0),c=i("Map.prototype.has",!0),f=i("Map.prototype.delete",!0),E=i("Map.prototype.size",!0);return Z0=!!a&&function(){var S,w={assert:function(b){if(!w.has(b))throw new r("Side channel does not contain "+t(b))},delete:function(b){if(S){var y=f(S,b);return E(S)===0&&(S=void 0),y}return!1},get:function(b){if(S)return l(S,b)},has:function(b){return S?c(S,b):!1},set:function(b,y){S||(S=new a),s(S,b,y)}};return w},Z0}var Q0,Gb;function qO(){if(Gb)return Q0;Gb=1;var e=Kv(),i=$4(),t=Yp(),r=W4(),a=Pc(),l=e("%WeakMap%",!0),s=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),f=i("WeakMap.prototype.has",!0),E=i("WeakMap.prototype.delete",!0);return Q0=l?function(){var S,w,b={assert:function(y){if(!b.has(y))throw new a("Side channel does not contain "+t(y))},delete:function(y){if(l&&y&&(typeof y=="object"||typeof y=="function")){if(S)return E(S,y)}else if(r&&w)return w.delete(y);return!1},get:function(y){return l&&y&&(typeof y=="object"||typeof y=="function")&&S?s(S,y):w&&w.get(y)},has:function(y){return l&&y&&(typeof y=="object"||typeof y=="function")&&S?f(S,y):!!w&&w.has(y)},set:function(y,v){l&&y&&(typeof y=="object"||typeof y=="function")?(S||(S=new l),c(S,y,v)):r&&(w||(w=r()),w.set(y,v))}};return b}:r,Q0}var J0,Vb;function HO(){if(Vb)return J0;Vb=1;var e=Pc(),i=Yp(),t=mO(),r=W4(),a=qO(),l=a||r||t;return J0=function(){var c,f={assert:function(E){if(!f.has(E))throw new e("Side channel does not contain "+i(E))},delete:function(E){return!!c&&c.delete(E)},get:function(E){return c&&c.get(E)},has:function(E){return!!c&&c.has(E)},set:function(E,_){c||(c=l()),c.set(E,_)}};return f},J0}var e1,$b;function Xv(){if($b)return e1;$b=1;var e=String.prototype.replace,i=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return e1={default:t.RFC3986,formatters:{RFC1738:function(r){return e.call(r,i,"+")},RFC3986:function(r){return String(r)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},e1}var t1,Wb;function Y4(){if(Wb)return t1;Wb=1;var e=Xv(),i=Object.prototype.hasOwnProperty,t=Array.isArray,r=function(){for(var g=[],O=0;O<256;++O)g.push("%"+((O<16?"0":"")+O.toString(16)).toUpperCase());return g}(),a=function(O){for(;O.length>1;){var h=O.pop(),p=h.obj[h.prop];if(t(p)){for(var m=[],x=0;x<p.length;++x)typeof p[x]<"u"&&m.push(p[x]);h.obj[h.prop]=m}}},l=function(O,h){for(var p=h&&h.plainObjects?{__proto__:null}:{},m=0;m<O.length;++m)typeof O[m]<"u"&&(p[m]=O[m]);return p},s=function g(O,h,p){if(!h)return O;if(typeof h!="object"&&typeof h!="function"){if(t(O))O.push(h);else if(O&&typeof O=="object")(p&&(p.plainObjects||p.allowPrototypes)||!i.call(Object.prototype,h))&&(O[h]=!0);else return[O,h];return O}if(!O||typeof O!="object")return[O].concat(h);var m=O;return t(O)&&!t(h)&&(m=l(O,p)),t(O)&&t(h)?(h.forEach(function(x,N){if(i.call(O,N)){var T=O[N];T&&typeof T=="object"&&x&&typeof x=="object"?O[N]=g(T,x,p):O.push(x)}else O[N]=x}),O):Object.keys(h).reduce(function(x,N){var T=h[N];return i.call(x,N)?x[N]=g(x[N],T,p):x[N]=T,x},m)},c=function(O,h){return Object.keys(h).reduce(function(p,m){return p[m]=h[m],p},O)},f=function(g,O,h){var p=g.replace(/\+/g," ");if(h==="iso-8859-1")return p.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(p)}catch{return p}},E=1024,_=function(O,h,p,m,x){if(O.length===0)return O;var N=O;if(typeof O=="symbol"?N=Symbol.prototype.toString.call(O):typeof O!="string"&&(N=String(O)),p==="iso-8859-1")return escape(N).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var T="",I=0;I<N.length;I+=E){for(var R=N.length>=E?N.slice(I,I+E):N,C=[],M=0;M<R.length;++M){var k=R.charCodeAt(M);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||x===e.RFC1738&&(k===40||k===41)){C[C.length]=R.charAt(M);continue}if(k<128){C[C.length]=r[k];continue}if(k<2048){C[C.length]=r[192|k>>6]+r[128|k&63];continue}if(k<55296||k>=57344){C[C.length]=r[224|k>>12]+r[128|k>>6&63]+r[128|k&63];continue}M+=1,k=65536+((k&1023)<<10|R.charCodeAt(M)&1023),C[C.length]=r[240|k>>18]+r[128|k>>12&63]+r[128|k>>6&63]+r[128|k&63]}T+=C.join("")}return T},S=function(O){for(var h=[{obj:{o:O},prop:"o"}],p=[],m=0;m<h.length;++m)for(var x=h[m],N=x.obj[x.prop],T=Object.keys(N),I=0;I<T.length;++I){var R=T[I],C=N[R];typeof C=="object"&&C!==null&&p.indexOf(C)===-1&&(h.push({obj:N,prop:R}),p.push(C))}return a(h),O},w=function(O){return Object.prototype.toString.call(O)==="[object RegExp]"},b=function(O){return!O||typeof O!="object"?!1:!!(O.constructor&&O.constructor.isBuffer&&O.constructor.isBuffer(O))},y=function(O,h){return[].concat(O,h)},v=function(O,h){if(t(O)){for(var p=[],m=0;m<O.length;m+=1)p.push(h(O[m]));return p}return h(O)};return t1={arrayToObject:l,assign:c,combine:y,compact:S,decode:f,encode:_,isBuffer:b,isRegExp:w,maybeMap:v,merge:s},t1}var r1,Yb;function GO(){if(Yb)return r1;Yb=1;var e=HO(),i=Y4(),t=Xv(),r=Object.prototype.hasOwnProperty,a={brackets:function(g){return g+"[]"},comma:"comma",indices:function(g,O){return g+"["+O+"]"},repeat:function(g){return g}},l=Array.isArray,s=Array.prototype.push,c=function(v,g){s.apply(v,l(g)?g:[g])},f=Date.prototype.toISOString,E=t.default,_={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:E,formatter:t.formatters[E],indices:!1,serializeDate:function(g){return f.call(g)},skipNulls:!1,strictNullHandling:!1},S=function(g){return typeof g=="string"||typeof g=="number"||typeof g=="boolean"||typeof g=="symbol"||typeof g=="bigint"},w={},b=function v(g,O,h,p,m,x,N,T,I,R,C,M,k,A,L,z,Y,$){for(var X=g,q=$,D=0,B=!1;(q=q.get(w))!==void 0&&!B;){var U=q.get(g);if(D+=1,typeof U<"u"){if(U===D)throw new RangeError("Cyclic object value");B=!0}typeof q.get(w)>"u"&&(D=0)}if(typeof R=="function"?X=R(O,X):X instanceof Date?X=k(X):h==="comma"&&l(X)&&(X=i.maybeMap(X,function(ye){return ye instanceof Date?k(ye):ye})),X===null){if(x)return I&&!z?I(O,_.encoder,Y,"key",A):O;X=""}if(S(X)||i.isBuffer(X)){if(I){var W=z?O:I(O,_.encoder,Y,"key",A);return[L(W)+"="+L(I(X,_.encoder,Y,"value",A))]}return[L(O)+"="+L(String(X))]}var ee=[];if(typeof X>"u")return ee;var ne;if(h==="comma"&&l(X))z&&I&&(X=i.maybeMap(X,I)),ne=[{value:X.length>0?X.join(",")||null:void 0}];else if(l(R))ne=R;else{var te=Object.keys(X);ne=C?te.sort(C):te}var Z=T?String(O).replace(/\./g,"%2E"):String(O),ae=p&&l(X)&&X.length===1?Z+"[]":Z;if(m&&l(X)&&X.length===0)return ae+"[]";for(var H=0;H<ne.length;++H){var J=ne[H],ie=typeof J=="object"&&J&&typeof J.value<"u"?J.value:X[J];if(!(N&&ie===null)){var le=M&&T?String(J).replace(/\./g,"%2E"):String(J),ue=l(X)?typeof h=="function"?h(ae,le):ae:ae+(M?"."+le:"["+le+"]");$.set(g,D);var he=e();he.set(w,$),c(ee,v(ie,ue,h,p,m,x,N,T,h==="comma"&&z&&l(X)?null:I,R,C,M,k,A,L,z,Y,he))}}return ee},y=function(g){if(!g)return _;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.encodeDotInKeys<"u"&&typeof g.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(g.encoder!==null&&typeof g.encoder<"u"&&typeof g.encoder!="function")throw new TypeError("Encoder has to be a function.");var O=g.charset||_.charset;if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var h=t.default;if(typeof g.format<"u"){if(!r.call(t.formatters,g.format))throw new TypeError("Unknown format option provided.");h=g.format}var p=t.formatters[h],m=_.filter;(typeof g.filter=="function"||l(g.filter))&&(m=g.filter);var x;if(g.arrayFormat in a?x=g.arrayFormat:"indices"in g?x=g.indices?"indices":"repeat":x=_.arrayFormat,"commaRoundTrip"in g&&typeof g.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var N=typeof g.allowDots>"u"?g.encodeDotInKeys===!0?!0:_.allowDots:!!g.allowDots;return{addQueryPrefix:typeof g.addQueryPrefix=="boolean"?g.addQueryPrefix:_.addQueryPrefix,allowDots:N,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:x,charset:O,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:_.charsetSentinel,commaRoundTrip:!!g.commaRoundTrip,delimiter:typeof g.delimiter>"u"?_.delimiter:g.delimiter,encode:typeof g.encode=="boolean"?g.encode:_.encode,encodeDotInKeys:typeof g.encodeDotInKeys=="boolean"?g.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof g.encoder=="function"?g.encoder:_.encoder,encodeValuesOnly:typeof g.encodeValuesOnly=="boolean"?g.encodeValuesOnly:_.encodeValuesOnly,filter:m,format:h,formatter:p,serializeDate:typeof g.serializeDate=="function"?g.serializeDate:_.serializeDate,skipNulls:typeof g.skipNulls=="boolean"?g.skipNulls:_.skipNulls,sort:typeof g.sort=="function"?g.sort:null,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:_.strictNullHandling}};return r1=function(v,g){var O=v,h=y(g),p,m;typeof h.filter=="function"?(m=h.filter,O=m("",O)):l(h.filter)&&(m=h.filter,p=m);var x=[];if(typeof O!="object"||O===null)return"";var N=a[h.arrayFormat],T=N==="comma"&&h.commaRoundTrip;p||(p=Object.keys(O)),h.sort&&p.sort(h.sort);for(var I=e(),R=0;R<p.length;++R){var C=p[R],M=O[C];h.skipNulls&&M===null||c(x,b(M,C,N,T,h.allowEmptyArrays,h.strictNullHandling,h.skipNulls,h.encodeDotInKeys,h.encode?h.encoder:null,h.filter,h.sort,h.allowDots,h.serializeDate,h.format,h.formatter,h.encodeValuesOnly,h.charset,I))}var k=x.join(h.delimiter),A=h.addQueryPrefix===!0?"?":"";return h.charsetSentinel&&(h.charset==="iso-8859-1"?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),k.length>0?A+k:""},r1}var n1,Kb;function VO(){if(Kb)return n1;Kb=1;var e=Y4(),i=Object.prototype.hasOwnProperty,t=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(w){return w.replace(/&#(\d+);/g,function(b,y){return String.fromCharCode(parseInt(y,10))})},l=function(w,b,y){if(w&&typeof w=="string"&&b.comma&&w.indexOf(",")>-1)return w.split(",");if(b.throwOnLimitExceeded&&y>=b.arrayLimit)throw new RangeError("Array limit exceeded. Only "+b.arrayLimit+" element"+(b.arrayLimit===1?"":"s")+" allowed in an array.");return w},s="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",f=function(b,y){var v={__proto__:null},g=y.ignoreQueryPrefix?b.replace(/^\?/,""):b;g=g.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var O=y.parameterLimit===1/0?void 0:y.parameterLimit,h=g.split(y.delimiter,y.throwOnLimitExceeded?O+1:O);if(y.throwOnLimitExceeded&&h.length>O)throw new RangeError("Parameter limit exceeded. Only "+O+" parameter"+(O===1?"":"s")+" allowed.");var p=-1,m,x=y.charset;if(y.charsetSentinel)for(m=0;m<h.length;++m)h[m].indexOf("utf8=")===0&&(h[m]===c?x="utf-8":h[m]===s&&(x="iso-8859-1"),p=m,m=h.length);for(m=0;m<h.length;++m)if(m!==p){var N=h[m],T=N.indexOf("]="),I=T===-1?N.indexOf("="):T+1,R,C;I===-1?(R=y.decoder(N,r.decoder,x,"key"),C=y.strictNullHandling?null:""):(R=y.decoder(N.slice(0,I),r.decoder,x,"key"),C=e.maybeMap(l(N.slice(I+1),y,t(v[R])?v[R].length:0),function(k){return y.decoder(k,r.decoder,x,"value")})),C&&y.interpretNumericEntities&&x==="iso-8859-1"&&(C=a(String(C))),N.indexOf("[]=")>-1&&(C=t(C)?[C]:C);var M=i.call(v,R);M&&y.duplicates==="combine"?v[R]=e.combine(v[R],C):(!M||y.duplicates==="last")&&(v[R]=C)}return v},E=function(w,b,y,v){var g=0;if(w.length>0&&w[w.length-1]==="[]"){var O=w.slice(0,-1).join("");g=Array.isArray(b)&&b[O]?b[O].length:0}for(var h=v?b:l(b,y,g),p=w.length-1;p>=0;--p){var m,x=w[p];if(x==="[]"&&y.parseArrays)m=y.allowEmptyArrays&&(h===""||y.strictNullHandling&&h===null)?[]:e.combine([],h);else{m=y.plainObjects?{__proto__:null}:{};var N=x.charAt(0)==="["&&x.charAt(x.length-1)==="]"?x.slice(1,-1):x,T=y.decodeDotInKeys?N.replace(/%2E/g,"."):N,I=parseInt(T,10);!y.parseArrays&&T===""?m={0:h}:!isNaN(I)&&x!==T&&String(I)===T&&I>=0&&y.parseArrays&&I<=y.arrayLimit?(m=[],m[I]=h):T!=="__proto__"&&(m[T]=h)}h=m}return h},_=function(b,y,v,g){if(b){var O=v.allowDots?b.replace(/\.([^.[]+)/g,"[$1]"):b,h=/(\[[^[\]]*])/,p=/(\[[^[\]]*])/g,m=v.depth>0&&h.exec(O),x=m?O.slice(0,m.index):O,N=[];if(x){if(!v.plainObjects&&i.call(Object.prototype,x)&&!v.allowPrototypes)return;N.push(x)}for(var T=0;v.depth>0&&(m=p.exec(O))!==null&&T<v.depth;){if(T+=1,!v.plainObjects&&i.call(Object.prototype,m[1].slice(1,-1))&&!v.allowPrototypes)return;N.push(m[1])}if(m){if(v.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+v.depth+" and strictDepth is true");N.push("["+O.slice(m.index)+"]")}return E(N,y,v,g)}},S=function(b){if(!b)return r;if(typeof b.allowEmptyArrays<"u"&&typeof b.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof b.decodeDotInKeys<"u"&&typeof b.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(b.decoder!==null&&typeof b.decoder<"u"&&typeof b.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof b.charset<"u"&&b.charset!=="utf-8"&&b.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof b.throwOnLimitExceeded<"u"&&typeof b.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof b.charset>"u"?r.charset:b.charset,v=typeof b.duplicates>"u"?r.duplicates:b.duplicates;if(v!=="combine"&&v!=="first"&&v!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var g=typeof b.allowDots>"u"?b.decodeDotInKeys===!0?!0:r.allowDots:!!b.allowDots;return{allowDots:g,allowEmptyArrays:typeof b.allowEmptyArrays=="boolean"?!!b.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof b.allowPrototypes=="boolean"?b.allowPrototypes:r.allowPrototypes,allowSparse:typeof b.allowSparse=="boolean"?b.allowSparse:r.allowSparse,arrayLimit:typeof b.arrayLimit=="number"?b.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof b.charsetSentinel=="boolean"?b.charsetSentinel:r.charsetSentinel,comma:typeof b.comma=="boolean"?b.comma:r.comma,decodeDotInKeys:typeof b.decodeDotInKeys=="boolean"?b.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof b.decoder=="function"?b.decoder:r.decoder,delimiter:typeof b.delimiter=="string"||e.isRegExp(b.delimiter)?b.delimiter:r.delimiter,depth:typeof b.depth=="number"||b.depth===!1?+b.depth:r.depth,duplicates:v,ignoreQueryPrefix:b.ignoreQueryPrefix===!0,interpretNumericEntities:typeof b.interpretNumericEntities=="boolean"?b.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof b.parameterLimit=="number"?b.parameterLimit:r.parameterLimit,parseArrays:b.parseArrays!==!1,plainObjects:typeof b.plainObjects=="boolean"?b.plainObjects:r.plainObjects,strictDepth:typeof b.strictDepth=="boolean"?!!b.strictDepth:r.strictDepth,strictNullHandling:typeof b.strictNullHandling=="boolean"?b.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof b.throwOnLimitExceeded=="boolean"?b.throwOnLimitExceeded:!1}};return n1=function(w,b){var y=S(b);if(w===""||w===null||typeof w>"u")return y.plainObjects?{__proto__:null}:{};for(var v=typeof w=="string"?f(w,y):w,g=y.plainObjects?{__proto__:null}:{},O=Object.keys(v),h=0;h<O.length;++h){var p=O[h],m=_(p,v[p],y,typeof w=="string");g=e.merge(g,m,y)}return y.allowSparse===!0?g:e.compact(g)},n1}var i1,Xb;function $O(){if(Xb)return i1;Xb=1;var e=GO(),i=VO(),t=Xv();return i1={formats:t,parse:i,stringify:e},i1}var Zb;function K4(){if(Zb)return Hs;Zb=1;var e=hO();function i(){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}var t=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r",`
|
|
152
|
-
`," "],s=["{","}","|","\\","^","`"].concat(l),c=["'"].concat(s),f=["%","/","?",";","#"].concat(c),E=["/","?","#"],_=255,S=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,b={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=$O();function O(x,N,T){if(x&&typeof x=="object"&&x instanceof i)return x;var I=new i;return I.parse(x,N,T),I}i.prototype.parse=function(x,N,T){if(typeof x!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof x);var I=x.indexOf("?"),R=I!==-1&&I<x.indexOf("#")?"?":"#",C=x.split(R),M=/\\/g;C[0]=C[0].replace(M,"/"),x=C.join(R);var k=x;if(k=k.trim(),!T&&x.split("#").length===1){var A=a.exec(k);if(A)return this.path=k,this.href=k,this.pathname=A[1],A[2]?(this.search=A[2],N?this.query=g.parse(this.search.substr(1)):this.query=this.search.substr(1)):N&&(this.search="",this.query={}),this}var L=t.exec(k);if(L){L=L[0];var z=L.toLowerCase();this.protocol=z,k=k.substr(L.length)}if(T||L||k.match(/^\/\/[^@/]+@[^@/]+/)){var Y=k.substr(0,2)==="//";Y&&!(L&&y[L])&&(k=k.substr(2),this.slashes=!0)}if(!y[L]&&(Y||L&&!v[L])){for(var $=-1,X=0;X<E.length;X++){var q=k.indexOf(E[X]);q!==-1&&($===-1||q<$)&&($=q)}var D,B;$===-1?B=k.lastIndexOf("@"):B=k.lastIndexOf("@",$),B!==-1&&(D=k.slice(0,B),k=k.slice(B+1),this.auth=decodeURIComponent(D)),$=-1;for(var X=0;X<f.length;X++){var q=k.indexOf(f[X]);q!==-1&&($===-1||q<$)&&($=q)}$===-1&&($=k.length),this.host=k.slice(0,$),k=k.slice($),this.parseHost(),this.hostname=this.hostname||"";var U=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!U)for(var W=this.hostname.split(/\./),X=0,ee=W.length;X<ee;X++){var ne=W[X];if(ne&&!ne.match(S)){for(var te="",Z=0,ae=ne.length;Z<ae;Z++)ne.charCodeAt(Z)>127?te+="x":te+=ne[Z];if(!te.match(S)){var H=W.slice(0,X),J=W.slice(X+1),ie=ne.match(w);ie&&(H.push(ie[1]),J.unshift(ie[2])),J.length&&(k="/"+J.join(".")+k),this.hostname=H.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),U||(this.hostname=e.toASCII(this.hostname));var le=this.port?":"+this.port:"",ue=this.hostname||"";this.host=ue+le,this.href+=this.host,U&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!b[z])for(var X=0,ee=c.length;X<ee;X++){var he=c[X];if(k.indexOf(he)!==-1){var ye=encodeURIComponent(he);ye===he&&(ye=escape(he)),k=k.split(he).join(ye)}}var Ce=k.indexOf("#");Ce!==-1&&(this.hash=k.substr(Ce),k=k.slice(0,Ce));var pe=k.indexOf("?");if(pe!==-1?(this.search=k.substr(pe),this.query=k.substr(pe+1),N&&(this.query=g.parse(this.query)),k=k.slice(0,pe)):N&&(this.search="",this.query={}),k&&(this.pathname=k),v[z]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var le=this.pathname||"",fe=this.search||"";this.path=le+fe}return this.href=this.format(),this};function h(x){return typeof x=="string"&&(x=O(x)),x instanceof i?x.format():i.prototype.format.call(x)}i.prototype.format=function(){var x=this.auth||"";x&&(x=encodeURIComponent(x),x=x.replace(/%3A/i,":"),x+="@");var N=this.protocol||"",T=this.pathname||"",I=this.hash||"",R=!1,C="";this.host?R=x+this.host:this.hostname&&(R=x+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(R+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(C=g.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var M=this.search||C&&"?"+C||"";return N&&N.substr(-1)!==":"&&(N+=":"),this.slashes||(!N||v[N])&&R!==!1?(R="//"+(R||""),T&&T.charAt(0)!=="/"&&(T="/"+T)):R||(R=""),I&&I.charAt(0)!=="#"&&(I="#"+I),M&&M.charAt(0)!=="?"&&(M="?"+M),T=T.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),M=M.replace("#","%23"),N+R+T+M+I};function p(x,N){return O(x,!1,!0).resolve(N)}i.prototype.resolve=function(x){return this.resolveObject(O(x,!1,!0)).format()};function m(x,N){return x?O(x,!1,!0).resolveObject(N):N}return i.prototype.resolveObject=function(x){if(typeof x=="string"){var N=new i;N.parse(x,!1,!0),x=N}for(var T=new i,I=Object.keys(this),R=0;R<I.length;R++){var C=I[R];T[C]=this[C]}if(T.hash=x.hash,x.href==="")return T.href=T.format(),T;if(x.slashes&&!x.protocol){for(var M=Object.keys(x),k=0;k<M.length;k++){var A=M[k];A!=="protocol"&&(T[A]=x[A])}return v[T.protocol]&&T.hostname&&!T.pathname&&(T.pathname="/",T.path=T.pathname),T.href=T.format(),T}if(x.protocol&&x.protocol!==T.protocol){if(!v[x.protocol]){for(var L=Object.keys(x),z=0;z<L.length;z++){var Y=L[z];T[Y]=x[Y]}return T.href=T.format(),T}if(T.protocol=x.protocol,!x.host&&!y[x.protocol]){for(var ee=(x.pathname||"").split("/");ee.length&&!(x.host=ee.shift()););x.host||(x.host=""),x.hostname||(x.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),T.pathname=ee.join("/")}else T.pathname=x.pathname;if(T.search=x.search,T.query=x.query,T.host=x.host||"",T.auth=x.auth,T.hostname=x.hostname||x.host,T.port=x.port,T.pathname||T.search){var $=T.pathname||"",X=T.search||"";T.path=$+X}return T.slashes=T.slashes||x.slashes,T.href=T.format(),T}var q=T.pathname&&T.pathname.charAt(0)==="/",D=x.host||x.pathname&&x.pathname.charAt(0)==="/",B=D||q||T.host&&x.pathname,U=B,W=T.pathname&&T.pathname.split("/")||[],ee=x.pathname&&x.pathname.split("/")||[],ne=T.protocol&&!v[T.protocol];if(ne&&(T.hostname="",T.port=null,T.host&&(W[0]===""?W[0]=T.host:W.unshift(T.host)),T.host="",x.protocol&&(x.hostname=null,x.port=null,x.host&&(ee[0]===""?ee[0]=x.host:ee.unshift(x.host)),x.host=null),B=B&&(ee[0]===""||W[0]==="")),D)T.host=x.host||x.host===""?x.host:T.host,T.hostname=x.hostname||x.hostname===""?x.hostname:T.hostname,T.search=x.search,T.query=x.query,W=ee;else if(ee.length)W||(W=[]),W.pop(),W=W.concat(ee),T.search=x.search,T.query=x.query;else if(x.search!=null){if(ne){T.host=W.shift(),T.hostname=T.host;var te=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;te&&(T.auth=te.shift(),T.hostname=te.shift(),T.host=T.hostname)}return T.search=x.search,T.query=x.query,(T.pathname!==null||T.search!==null)&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.href=T.format(),T}if(!W.length)return T.pathname=null,T.search?T.path="/"+T.search:T.path=null,T.href=T.format(),T;for(var Z=W.slice(-1)[0],ae=(T.host||x.host||W.length>1)&&(Z==="."||Z==="..")||Z==="",H=0,J=W.length;J>=0;J--)Z=W[J],Z==="."?W.splice(J,1):Z===".."?(W.splice(J,1),H++):H&&(W.splice(J,1),H--);if(!B&&!U)for(;H--;H)W.unshift("..");B&&W[0]!==""&&(!W[0]||W[0].charAt(0)!=="/")&&W.unshift(""),ae&&W.join("/").substr(-1)!=="/"&&W.push("");var ie=W[0]===""||W[0]&&W[0].charAt(0)==="/";if(ne){T.hostname=ie?"":W.length?W.shift():"",T.host=T.hostname;var te=T.host&&T.host.indexOf("@")>0?T.host.split("@"):!1;te&&(T.auth=te.shift(),T.hostname=te.shift(),T.host=T.hostname)}return B=B||T.host&&W.length,B&&!ie&&W.unshift(""),W.length>0?T.pathname=W.join("/"):(T.pathname=null,T.path=null),(T.pathname!==null||T.search!==null)&&(T.path=(T.pathname?T.pathname:"")+(T.search?T.search:"")),T.auth=x.auth||T.auth,T.slashes=T.slashes||x.slashes,T.href=T.format(),T},i.prototype.parseHost=function(){var x=this.host,N=r.exec(x);N&&(N=N[0],N!==":"&&(this.port=N.substr(1)),x=x.substr(0,x.length-N.length)),x&&(this.hostname=x)},Hs.parse=O,Hs.resolve=p,Hs.resolveObject=m,Hs.format=h,Hs.Url=i,Hs}var pp={exports:{}},WO=pp.exports,Qb;function YO(){return Qb||(Qb=1,function(e){(function(i,t){e.exports?e.exports=t():i.xmlserializer=t()})(WO,function(){var i=function(b){return b.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},t=function(b){return b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},r=function(b){return b.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},a=function(b){var y=b.value;return" "+b.name+'="'+t(y)+'"'},l=function(b){var y=b.tagName;return b.namespaceURI==="http://www.w3.org/1999/xhtml"&&(y=y.toLowerCase()),y},s=function(b,y){var v=Array.prototype.map.call(b.attributes||b.attrs,function(g){return g.name}).indexOf("xmlns")>=0;return!v&&(y||b.namespaceURI!==b.parentNode.namespaceURI)?' xmlns="'+b.namespaceURI+'"':""},c=function(b){return Array.prototype.map.call(b.childNodes,function(y){return w(y)}).join("")},f=function(b,y){var v="<"+l(b);return v+=s(b,y),Array.prototype.forEach.call(b.attributes||b.attrs,function(g){v+=a(g)}),b.childNodes.length>0?(v+=">",v+=c(b),v+="</"+l(b)+">"):v+="/>",v},E=function(b){var y=b.nodeValue||b.value||"";return r(y)},_=function(b){return"<!--"+b.data.replace(/-/g,"-")+"-->"},S=function(b){return"<![CDATA["+b.nodeValue+"]]>"},w=function(b,y){var v=y&&y.rootNode;if(b.nodeName==="#document"||b.nodeName==="#document-fragment")return c(b);if(b.tagName)return f(b,v);if(b.nodeName==="#text")return E(b);if(b.nodeName==="#comment")return _(b);if(b.nodeName==="#cdata-section")return S(b)};return{serializeToString:function(b){return i(w(b,{rootNode:!0}))}}})}(pp)),pp.exports}var a1={},Jb;function KO(){if(Jb)return a1;Jb=1;var e=function(l){var s=new XMLSerializer;return Array.prototype.map.call(l.childNodes,function(c){return s.serializeToString(c)}).join("")},i=function(l){if(l.documentElement.tagName==="parsererror"&&l.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return l.documentElement;if((l.documentElement.tagName==="xml"||l.documentElement.tagName==="html")&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0];if(l.documentElement.tagName==="html"&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="body"&&l.documentElement.childNodes[0].childNodes&&l.documentElement.childNodes[0].childNodes.length&&l.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0].childNodes[0]},t=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
153
|
-
?</div>`),new RegExp(`^(.+)
|
|
154
|
-
`)],r=function(l){var s=e(l),c,f;for(c=0;c<t.length;c++)if(f=t[c].exec(s),f)return f[1]},a=function(l){var s;if(l===null)throw new Error("Parse error");var c=i(l);if(c!==void 0)throw s=r(c)||"Parse error",new Error(s)};return a1.failOnParseError=function(l){return a(l),l},a1}var o1={},l1={},e3;function Xp(){return e3||(e3=1,function(e){var i=K4();e.getDocumentBaseUrl=function(c){return c.baseURI!=="about:blank"?c.baseURI:null},e.clone=function(c){var f={},E;for(E in c)c.hasOwnProperty(E)&&(f[E]=c[E]);return f},e.cloneArray=function(c){return Array.prototype.slice.apply(c,[0])},e.joinUrl=function(c,f){return c?i.resolve(c,f):f},e.isDataUri=function(c){return/^data:/.test(c)},e.collectAndReportErrors=function(c){var f=[];return Promise.all(c.map(function(E){return E.catch(function(_){f.push(_)})})).then(function(){return f})};var t=null,r=function(c,f){return f===!1||f==="none"||f==="repeated"?((t===null||f!=="repeated")&&(t=Date.now()),c+"?_="+t):c};e.ajax=function(c,f){return new Promise(function(E,_){var S=new window.XMLHttpRequest,w=e.joinUrl(f.baseUrl,c),b,y=function(){_({msg:"Unable to load url",url:w})};b=r(w,f.cache),S.addEventListener("load",function(){S.status===200||S.status===0?E(S.response):y()},!1),S.addEventListener("error",y,!1);try{S.open("GET",b,!0),S.overrideMimeType(f.mimeType),S.send(null)}catch{y()}})},e.binaryAjax=function(c,f){var E=e.clone(f);return E.mimeType="text/plain; charset=x-user-defined",e.ajax(c,E).then(function(_){for(var S="",w=0;w<_.length;w++)S+=String.fromCharCode(_.charCodeAt(w)&255);return S})};var a=function(c){var f=function(E,_){return E.substring(0,_.length)===_};return f(c,"<?xml")||f(c,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(c,f){return e.binaryAjax(c,f).then(function(E){var _=btoa(E),S=a(E);return"data:"+S+";base64,"+_})};var l=[],s=function(c){return l.indexOf(c)<0&&l.push(c),l.indexOf(c)};e.memoize=function(c,f,E){if(typeof E!="object")throw new Error("cacheBucket is not an object");return function(){var _=Array.prototype.slice.call(arguments),S=f(_),w=s(c),b;return E[w]&&E[w][S]?E[w][S]:(b=c.apply(null,_),E[w]=E[w]||{},E[w][S]=b,b)}}}(l1)),l1}var s1={},t3;function XO(){if(t3)return s1;t3=1;var e=Xp(),i=function(l,s){var c=null;l.hasAttribute("src")?c=l.getAttribute("src"):l.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=l.getAttributeNS("http://www.w3.org/1999/xlink","href"):l.hasAttribute("href")&&(c=l.getAttribute("href"));var f=e.getDocumentBaseUrl(l.ownerDocument),E=e.clone(s);return!E.baseUrl&&f&&(E.baseUrl=f),e.getDataURIForImageURL(c,E).then(function(_){return _},function(_){throw{resourceType:"image",url:_.url,msg:"Unable to load image "+_.url}})},t=function(l){return l.filter(function(s){var c=null;return s.hasAttribute("src")?c=s.getAttribute("src"):s.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=s.getAttributeNS("http://www.w3.org/1999/xlink","href"):s.hasAttribute("href")&&(c=s.getAttribute("href")),c!==null&&!e.isDataUri(c)})},r=function(l){return Array.prototype.filter.call(l,function(s){return s.type==="image"})},a=function(l){return Array.prototype.slice.call(l)};return s1.inline=function(l,s){var c=a(l.getElementsByTagName("img")),f=a(l.getElementsByTagName("image")),E=r(l.getElementsByTagName("input"));c=c.concat(f),c=c.concat(E);var _=t(c);return e.collectAndReportErrors(_.map(function(S){return i(S,s).then(function(w){S.attributes.src?S.attributes.src.value=w:S.attributes["xlink:href"]?S.attributes["xlink:href"].value=w:S.attributes.href&&(S.attributes.href.value=w)})}))},s1}var u1={},r3;function ZO(){if(r3)return u1;r3=1;var e=Xp(),i=function(l,s){var c=l.attributes.src.value,f=e.getDocumentBaseUrl(l.ownerDocument),E=e.clone(s);return!E.baseUrl&&f&&(E.baseUrl=f),e.ajax(c,E).catch(function(_){throw{resourceType:"script",url:_.url,msg:"Unable to load script "+_.url}})},t=function(l){return l.replace(/<\//g,"<\\/")},r=function(l,s){l.attributes.removeNamedItem("src"),l.textContent=t(s)},a=function(l){var s=l.getElementsByTagName("script");return Array.prototype.filter.call(s,function(c){return!!c.attributes.src})};return u1.inline=function(l,s){var c=a(l);return e.collectAndReportErrors(c.map(function(f){return i(f,s).then(function(E){r(f,E)})}))},u1}var c1={},f1={},n3;function Zv(){return n3||(n3=1,function(e){e.unquoteString=function(i){var t=/^"(.*)"$/,r=/^'(.*)'$/;return t.test(i)?i.replace(t,"$1"):r.test(i)?i.replace(r,"$1"):i},e.rulesForCssText=function(i){var t=document.implementation.createHTMLDocument(""),r=document.createElement("style"),a;return r.textContent=i,t.body.appendChild(r),a=r.sheet.cssRules,Array.prototype.slice.call(a)},e.cssRulesToText=function(i){return i.reduce(function(t,r){return t+r.cssText},"")},e.exchangeRule=function(i,t,r){var a=i.indexOf(t);i[a]=e.rulesForCssText(r)[0]},e.changeFontFaceRuleSrc=function(i,t,r){var a="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(a+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(a+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(a+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),a+="src: "+r+"}",e.exchangeRule(i,t,a)}}(f1)),f1}var d1={},i3;function QO(){return i3||(i3=1,function(e){var i=Zv(),t=function(l){var s=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return l.replace(s,"$1")};e.extractCssUrl=function(l){var s=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,c;if(!s.test(l))throw new Error("Invalid url");return c=s.exec(l)[1],i.unquoteString(t(c))};var r=function(l){var s=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,c="(url\\("+s+"\\)|[^,\\s]+)",f="(?:\\s*"+c+")+",E="^\\s*("+f+")(?:\\s*,\\s*("+f+"))*\\s*$",_=new RegExp(f,"g"),S,w=[],b=function(y){var v=new RegExp(c,"g"),g=[],O;for(O=v.exec(y);O;)g.push(O[1]),O=v.exec(y);return g};if(l.match(new RegExp(E))){for(S=_.exec(l);S;)w.push(b(S[0])),S=_.exec(l);return w}return[]},a=function(l){var s,c;for(s=0;s<l.length;s++)try{return c=e.extractCssUrl(l[s]),{url:c,idx:s}}catch{}};e.parse=function(l){var s=r(l);return s.map(function(c){var f=a(c);return f?{preUrl:c.slice(0,f.idx),url:f.url,postUrl:c.slice(f.idx+1)}:{preUrl:c}})},e.serialize=function(l){var s=l.map(function(c){var f=[].concat(c.preUrl);return c.url&&f.push('url("'+c.url+'")'),c.postUrl&&(f=f.concat(c.postUrl)),f.join(" ")});return s.join(", ")}}(d1)),d1}function sp(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var h1={exports:{}},a3;function JO(){return a3||(a3=1,function(e,i){(function(t){e.exports=t()})(function(){return function t(r,a,l){function s(E,_){if(!a[E]){if(!r[E]){var S=typeof sp=="function"&&sp;if(!_&&S)return S(E,!0);if(c)return c(E,!0);var w=new Error("Cannot find module '"+E+"'");throw w.code="MODULE_NOT_FOUND",w}var b=a[E]={exports:{}};r[E][0].call(b.exports,function(y){var v=r[E][1][y];return s(v||y)},b,b.exports,t,r,a,l)}return a[E].exports}for(var c=typeof sp=="function"&&sp,f=0;f<l.length;f++)s(l[f]);return s}({1:[function(t,r,a){function l(f,E){function _(){this.constructor=f}_.prototype=E.prototype,f.prototype=new _}function s(f,E,_,S){this.message=f,this.expected=E,this.found=_,this.location=S,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,s)}l(s,Error),s.buildMessage=function(f,E){var _={literal:function(O){return'"'+w(O.text)+'"'},class:function(O){var h="",p;for(p=0;p<O.parts.length;p++)h+=O.parts[p]instanceof Array?b(O.parts[p][0])+"-"+b(O.parts[p][1]):b(O.parts[p]);return"["+(O.inverted?"^":"")+h+"]"},any:function(O){return"any character"},end:function(O){return"end of input"},other:function(O){return O.description}};function S(O){return O.charCodeAt(0).toString(16).toUpperCase()}function w(O){return O.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(h){return"\\x0"+S(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+S(h)})}function b(O){return O.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(h){return"\\x0"+S(h)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(h){return"\\x"+S(h)})}function y(O){return _[O.type](O)}function v(O){var h=new Array(O.length),p,m;for(p=0;p<O.length;p++)h[p]=y(O[p]);if(h.sort(),h.length>0){for(p=1,m=1;p<h.length;p++)h[p-1]!==h[p]&&(h[m]=h[p],m++);h.length=m}switch(h.length){case 1:return h[0];case 2:return h[0]+" or "+h[1];default:return h.slice(0,-1).join(", ")+", or "+h[h.length-1]}}function g(O){return O?'"'+w(O)+'"':"end of input"}return"Expected "+v(f)+" but "+g(E)+" found."};function c(f,E){E=E!==void 0?E:{};var _={},S={start:le},w=le,b="",y=function(){return[]},v=",",g=ne(",",!1),O=function(ce,me){return[ce].concat(me)},h=function(ce){return[ce]},p=function(ce,me){return{url:ce,format:me}},m=function(ce){return{url:ce}},x="url(",N=ne("url(",!1),T=")",I=ne(")",!1),R=function(ce){return ce},C="format(",M=ne("format(",!1),k="local(",A=ne("local(",!1),L=function(ce){return{local:ce}},z=/^[^)]/,Y=te([")"],!0,!1),$=function(ce){return Te.extractValue(ce.join(""))},X=/^[ \t\r\n\f]/,q=te([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),D=0,B=[{line:1,column:1}],U=0,W=[],ee;if("startRule"in E){if(!(E.startRule in S))throw new Error(`Can't start parsing from rule "`+E.startRule+'".');w=S[E.startRule]}function ne(ce,me){return{type:"literal",text:ce,ignoreCase:me}}function te(ce,me,Oe){return{type:"class",parts:ce,inverted:me,ignoreCase:Oe}}function Z(){return{type:"end"}}function ae(ce){var me=B[ce],Oe;if(me)return me;for(Oe=ce-1;!B[Oe];)Oe--;for(me=B[Oe],me={line:me.line,column:me.column};Oe<ce;)f.charCodeAt(Oe)===10?(me.line++,me.column=1):me.column++,Oe++;return B[ce]=me,me}function H(ce,me){var Oe=ae(ce),Ne=ae(me);return{start:{offset:ce,line:Oe.line,column:Oe.column},end:{offset:me,line:Ne.line,column:Ne.column}}}function J(ce){D<U||(D>U&&(U=D,W=[]),W.push(ce))}function ie(ce,me,Oe){return new s(s.buildMessage(ce,me),ce,me,Oe)}function le(){var ce,me;return ce=ue(),ce===_&&(ce=D,me=b,me!==_&&(me=y()),ce=me),ce}function ue(){var ce,me,Oe,Ne,tt,rt;if(ce=D,me=he(),me!==_){for(Oe=[],Ne=xe();Ne!==_;)Oe.push(Ne),Ne=xe();if(Oe!==_)if(f.charCodeAt(D)===44?(Ne=v,D++):(Ne=_,J(g)),Ne!==_){for(tt=[],rt=xe();rt!==_;)tt.push(rt),rt=xe();tt!==_?(rt=ue(),rt!==_?(me=O(me,rt),ce=me):(D=ce,ce=_)):(D=ce,ce=_)}else D=ce,ce=_;else D=ce,ce=_}else D=ce,ce=_;return ce===_&&(ce=D,me=he(),me!==_&&(me=h(me)),ce=me),ce}function he(){var ce;return ce=ye(),ce===_&&(ce=fe()),ce}function ye(){var ce,me,Oe,Ne;if(ce=D,me=Ce(),me!==_){if(Oe=[],Ne=xe(),Ne!==_)for(;Ne!==_;)Oe.push(Ne),Ne=xe();else Oe=_;Oe!==_?(Ne=pe(),Ne!==_?(me=p(me,Ne),ce=me):(D=ce,ce=_)):(D=ce,ce=_)}else D=ce,ce=_;return ce===_&&(ce=D,me=Ce(),me!==_&&(me=m(me)),ce=me),ce}function Ce(){var ce,me,Oe,Ne;return ce=D,f.substr(D,4)===x?(me=x,D+=4):(me=_,J(N)),me!==_?(Oe=ve(),Oe!==_?(f.charCodeAt(D)===41?(Ne=T,D++):(Ne=_,J(I)),Ne!==_?(me=R(Oe),ce=me):(D=ce,ce=_)):(D=ce,ce=_)):(D=ce,ce=_),ce}function pe(){var ce,me,Oe,Ne;return ce=D,f.substr(D,7)===C?(me=C,D+=7):(me=_,J(M)),me!==_?(Oe=ve(),Oe!==_?(f.charCodeAt(D)===41?(Ne=T,D++):(Ne=_,J(I)),Ne!==_?(me=R(Oe),ce=me):(D=ce,ce=_)):(D=ce,ce=_)):(D=ce,ce=_),ce}function fe(){var ce,me,Oe,Ne;return ce=D,f.substr(D,6)===k?(me=k,D+=6):(me=_,J(A)),me!==_?(Oe=ve(),Oe!==_?(f.charCodeAt(D)===41?(Ne=T,D++):(Ne=_,J(I)),Ne!==_?(me=L(Oe),ce=me):(D=ce,ce=_)):(D=ce,ce=_)):(D=ce,ce=_),ce}function ve(){var ce,me,Oe;if(ce=D,me=[],z.test(f.charAt(D))?(Oe=f.charAt(D),D++):(Oe=_,J(Y)),Oe!==_)for(;Oe!==_;)me.push(Oe),z.test(f.charAt(D))?(Oe=f.charAt(D),D++):(Oe=_,J(Y));else me=_;return me!==_&&(me=$(me)),ce=me,ce}function xe(){var ce;return X.test(f.charAt(D))?(ce=f.charAt(D),D++):(ce=_,J(q)),ce}var Te=t("../util");if(ee=w(),ee!==_&&D===f.length)return ee;throw ee!==_&&D<f.length&&J(Z()),ie(W,U<f.length?f.charAt(U):null,U<f.length?H(U,U+1):H(U,U))}r.exports={SyntaxError:s,parse:c}},{"../util":3}],2:[function(t,r,a){var l=t("./grammar");a.SyntaxError=function(s,c){this.message=s,this.offset=c},a.parse=function(s){try{return l.parse(s)}catch(c){throw new a.SyntaxError(c.message,c.offset)}},a.serialize=function(s){return s.map(function(c){var f;return c.url?(f='url("'+c.url+'")',c.format&&(f+=' format("'+c.format+'")')):f='local("'+c.local+'")',f}).join(", ")}},{"./grammar":1}],3:[function(t,r,a){var l=function(c){var f=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return c.replace(f,"$1")},s=function(c){var f=/^"(.*)"$/,E=/^'(.*)'$/;return f.test(c)?c.replace(f,"$1"):E.test(c)?c.replace(E,"$1"):c};a.extractValue=function(c){return s(l(c))}},{}]},{},[2])(2)})}(h1)),h1.exports}var o3;function eP(){return o3||(o3=1,function(e){var i=Xp(),t=Zv(),r=QO(),a=JO(),l=function(h,p,m){h.style.setProperty(p,m,h.style.getPropertyPriority(p))},s=function(h){return h.filter(function(p){return p.type===window.CSSRule.STYLE_RULE&&(p.style.getPropertyValue("background-image")||p.style.getPropertyValue("background"))})},c=function(h){var p=[];return h.forEach(function(m){m.style.getPropertyValue("background-image")?p.push({property:"background-image",value:m.style.getPropertyValue("background-image"),rule:m}):m.style.getPropertyValue("background")&&p.push({property:"background",value:m.style.getPropertyValue("background"),rule:m})}),p},f=function(h){return h.filter(function(p){return p.type===window.CSSRule.FONT_FACE_RULE&&p.style.getPropertyValue("src")})},E=function(h){return h.filter(function(p){return p.type===window.CSSRule.IMPORT_RULE&&p.href})},_=function(h){var p=[];return h.forEach(function(m,x){m.url&&!i.isDataUri(m.url)&&p.push(x)}),p},S=function(h){var p=[];return h.forEach(function(m,x){m.url&&!i.isDataUri(m.url)&&p.push(x)}),p};e.adjustPathsOfCssResources=function(h,p){var m=s(p),x=c(m),N=!1;return x.forEach(function(T){var I=r.parse(T.value),R=_(I),C;R.length>0&&(R.forEach(function(M){var k=I[M].url,A=i.joinUrl(h,k);I[M].url=A}),C=r.serialize(I),l(T.rule,T.property,C),N=!0)}),f(p).forEach(function(T){var I=T.style.getPropertyValue("src"),R,C;try{R=a.parse(I)}catch{return}C=S(R),C.length>0&&(C.forEach(function(M){var k=R[M].url,A=i.joinUrl(h,k);R[M].url=A}),t.changeFontFaceRuleSrc(p,T,a.serialize(R)),N=!0)}),E(p).forEach(function(T){var I=T.href,R=i.joinUrl(h,I);t.exchangeRule(p,T,"@import url("+R+");"),N=!0}),N};var w=function(h,p,m){var x=h.indexOf(p);h.splice(x,1),m.forEach(function(N,T){h.splice(x+T,0,N)})},b=function(h,p,m,x){var N=p.href,T;return N=t.unquoteString(N),T=i.joinUrl(x.baseUrl,N),m.indexOf(T)>=0?(w(h,p,[]),Promise.resolve([])):(m.push(T),i.ajax(N,x).then(function(I){var R=t.rulesForCssText(I);return e.loadCSSImportsForRules(R,m,x).then(function(C){return e.adjustPathsOfCssResources(N,R),w(h,p,R),C.errors})},function(I){throw{resourceType:"stylesheet",url:I.url,msg:"Unable to load stylesheet "+I.url}}))};e.loadCSSImportsForRules=function(h,p,m){var x=E(h),N=[],T=!1;return Promise.all(x.map(function(I){return b(h,I,p,m).then(function(R){N=N.concat(R),T=!0},function(R){N.push(R)})})).then(function(){return{hasChanges:T,errors:N}})};var y=function(h,p){var m=r.parse(h),x=_(m),N=!1;return i.collectAndReportErrors(x.map(function(T){var I=m[T].url;return i.getDataURIForImageURL(I,p).then(function(R){m[T].url=R,N=!0},function(R){throw{resourceType:"backgroundImage",url:R.url,msg:"Unable to load background-image "+R.url}})})).then(function(T){return{backgroundValue:r.serialize(m),hasChanges:N,errors:T}})},v=function(h,p){var m=s(h),x=c(m),N=[],T=!1;return Promise.all(x.map(function(I){return y(I.value,p).then(function(R){R.hasChanges&&(l(I.rule,I.property,R.backgroundValue),T=!0),N=N.concat(R.errors)})})).then(function(){return{hasChanges:T,errors:N}})},g=function(h,p){var m=!1,x,N;try{x=a.parse(h)}catch{x=[]}return N=S(x),i.collectAndReportErrors(N.map(function(T){var I=x[T],R=I.format||"woff";return i.binaryAjax(I.url,p).then(function(C){var M=btoa(C);I.url="data:font/"+R+";base64,"+M,m=!0},function(C){throw{resourceType:"fontFace",url:C.url,msg:"Unable to load font-face "+C.url}})})).then(function(T){return{srcDeclarationValue:a.serialize(x),hasChanges:m,errors:T}})},O=function(h,p){var m=f(h),x=[],N=!1;return Promise.all(m.map(function(T){var I=T.style.getPropertyValue("src");return g(I,p).then(function(R){R.hasChanges&&(t.changeFontFaceRuleSrc(h,T,R.srcDeclarationValue),N=!0),x=x.concat(R.errors)})})).then(function(){return{hasChanges:N,errors:x}})};e.loadAndInlineCSSResourcesForRules=function(h,p){var m=!1,x=[];return Promise.all([v,O].map(function(N){return N(h,p).then(function(T){m=m||T.hasChanges,x=x.concat(T.errors)})})).then(function(){return{hasChanges:m,errors:x}})}}(c1)),c1}var l3;function tP(){return l3||(l3=1,function(e){var i=Xp(),t=XO(),r=ZO(),a=eP(),l=Zv(),s=function(g){return i.joinUrl(g,".")},c=function(g){var O=g.map(function(h,p){return p===g.length-1&&(h={baseUrl:s(h.baseUrl)}),JSON.stringify(h)});return O},f=function(g,O){return O.cache!==!1&&O.cache!=="none"&&O.cacheBucket?i.memoize(g,c,O.cacheBucket):g},E=function(g,O,h){var p=l.rulesForCssText(g);return a.loadCSSImportsForRules(p,O,h).then(function(m){return a.loadAndInlineCSSResourcesForRules(p,h).then(function(x){var N=m.errors.concat(x.errors),T=m.hasChanges||x.hasChanges;return T&&(g=l.cssRulesToText(p)),{hasChanges:T,content:g,errors:N}})})},_=function(g,O,h){var p=g.textContent,m=f(E,O);return m(p,h,O).then(function(x){return x.hasChanges&&(g.childNodes[0].nodeValue=x.content),i.cloneArray(x.errors)})},S=function(g){var O=g.getElementsByTagName("style");return Array.prototype.filter.call(O,function(h){return!h.attributes.type||h.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(g,O){var h=S(g),p=[],m=[],x;return x=i.clone(O),x.baseUrl=x.baseUrl||i.getDocumentBaseUrl(g),Promise.all(h.map(function(N){return _(N,x,m).then(function(T){p=p.concat(T)})})).then(function(){return p})};var w=function(g,O){var h=g.parentNode,p;O=O.trim(),O&&(p=g.ownerDocument.createElement("style"),p.type="text/css",p.appendChild(g.ownerDocument.createTextNode(O)),h.insertBefore(p,g)),h.removeChild(g)},b=function(g,O){return i.ajax(g,O).then(function(h){var p=l.rulesForCssText(h);return{content:h,cssRules:p}}).then(function(h){var p=a.adjustPathsOfCssResources(g,h.cssRules);return{content:h.content,cssRules:h.cssRules,hasChanges:p}}).then(function(h){return a.loadCSSImportsForRules(h.cssRules,[],O).then(function(p){return{content:h.content,cssRules:h.cssRules,hasChanges:h.hasChanges||p.hasChanges,errors:p.errors}})}).then(function(h){return a.loadAndInlineCSSResourcesForRules(h.cssRules,O).then(function(p){return{content:h.content,cssRules:h.cssRules,hasChanges:h.hasChanges||p.hasChanges,errors:h.errors.concat(p.errors)}})}).then(function(h){var p=h.content;return h.hasChanges&&(p=l.cssRulesToText(h.cssRules)),{content:p,errors:h.errors}})},y=function(g,O){var h=g.attributes.href.value,p=i.getDocumentBaseUrl(g.ownerDocument),m=i.clone(O);!m.baseUrl&&p&&(m.baseUrl=p);var x=f(b,O);return x(h,m).then(function(N){return{content:N.content,errors:i.cloneArray(N.errors)}})},v=function(g){var O=g.getElementsByTagName("link");return Array.prototype.filter.call(O,function(h){return h.attributes.rel&&h.attributes.rel.value==="stylesheet"&&(!h.attributes.type||h.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(g,O){var h=v(g),p=[];return Promise.all(h.map(function(m){return y(m,O).then(function(x){w(m,x.content+`
|
|
156
|
-
`),p=p.concat(x.errors)},function(x){p.push({resourceType:"stylesheet",url:x.url,msg:"Unable to load stylesheet "+x.url})})})).then(function(){return p})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=r.inline,e.inlineReferences=function(g,O){var h=[],p=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return O.inlineScripts!==!1&&p.push(e.loadAndInlineScript),Promise.all(p.map(function(m){return m(g,O).then(function(x){h=h.concat(x)})})).then(function(){return h})}}(o1)),o1}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
157
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
158
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */var rP=hp.exports,s3;function nP(){return s3||(s3=1,function(e){(function(i,t){i===void 0&&window!==void 0&&(i=window),e.exports?e.exports=t(K4(),YO(),KO(),tP()):i.rasterizeHTML=t(i.url,i.xmlserializer,i.sanedomparsererror,i.inlineresources)})(rP,function(i,t,r,a){var l=function(y){var v={},g=[];v.joinUrl=function(p,m){return p?y.resolve(p,m):m},v.getConstantUniqueIdFor=function(p){return g.indexOf(p)<0&&g.push(p),g.indexOf(p)},v.clone=function(p){var m={},x;for(x in p)p.hasOwnProperty(x)&&(m[x]=p[x]);return m};var O=function(p){return typeof p=="object"&&p!==null},h=function(p){return O(p)&&Object.prototype.toString.apply(p).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return v.parseOptionalParameters=function(p){var m={canvas:null,options:{}};return p[0]==null||h(p[0])?(m.canvas=p[0]||null,m.options=v.clone(p[1])):m.options=v.clone(p[0]),m},v}(i),s=function(y){var v={},g=function(O,h,p){var m=O[h];return O[h]=function(){var x=Array.prototype.slice.call(arguments);return p.apply(this,[x,m])},m};return v.baseUrlRespectingXhr=function(O,h){var p=function(){var m=new O;return g(m,"open",function(x,N){var T=x.shift(),I=x.shift(),R=y.joinUrl(h,I);return N.apply(this,[T,R].concat(x))}),m};return p},v.finishNotifyingXhr=function(O){var h=0,p=0,m=!1,x,N=new Promise(function(I){x=function(){var R=h-p;R<=0&&m&&I({totalCount:h})}}),T=function(){var I=new O;return g(I,"send",function(R,C){return h+=1,C.apply(this,arguments)}),I.addEventListener("load",function(){p+=1,x()}),I};return T.waitForRequestsToFinish=function(){return m=!0,x(),N},T},v}(l),c=function(){var y={},v=function(T){return Array.prototype.slice.call(T)};y.addClassName=function(T,I){T.className+=" "+I},y.addClassNameRecursively=function(T,I){y.addClassName(T,I),T.parentNode!==T.ownerDocument&&y.addClassNameRecursively(T.parentNode,I)};var g=function(T,I){var R=T.parentStyleSheet,C=v(R.cssRules).indexOf(T);R.insertRule(I,C+1),R.deleteRule(C)},O=function(T,I){var R=T.cssText.replace(/^[^\{]+/,""),C=I+" "+R;g(T,C)},h=function(T){return v(T).reduce(function(I,R){return I+R.cssText},"")},p=function(T){T.textContent=h(T.sheet.cssRules)},m=function(T){var I=document.implementation.createHTMLDocument(""),R=document.createElement("style");R.textContent=T.textContent,I.body.appendChild(R),T.sheet=R.sheet},x=function(T){return"((?:^|[^.#:\\w])|(?=\\W))("+T.join("|")+")(?=\\W|$)"},N=function(T,I,R){var C=x(I);v(T.querySelectorAll("style")).forEach(function(M){typeof M.sheet>"u"&&m(M);var k=v(M.sheet.cssRules).filter(function(A){return A.selectorText&&new RegExp(C,"i").test(A.selectorText)});k.length&&(k.forEach(function(A){var L=A.selectorText.replace(new RegExp(C,"gi"),function(z,Y,$){return Y+R($)});L!==A.selectorText&&O(A,L)}),p(M))})};return y.rewriteCssSelectorWith=function(T,I,R){N(T,[I],function(){return R})},y.lowercaseCssTypeSelectors=function(T,I){N(T,I,function(R){return R.toLowerCase()})},y.findHtmlOnlyNodeNames=function(T){var I=T.ownerDocument.createTreeWalker(T,NodeFilter.SHOW_ELEMENT),R={},C={},M;do M=I.currentNode.tagName.toLowerCase(),I.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?R[M]=!0:C[M]=!0;while(I.nextNode());return Object.keys(R).filter(function(k){return!C[k]})},y}(),f=function(y){var v={},g=function(h){return Array.prototype.slice.call(h)},O={active:!0,hover:!0,focus:!1,target:!1};return v.fakeUserAction=function(h,p,m){var x=h.querySelector(p),N=":"+m,T="rasterizehtml"+m;x&&(O[m]?y.addClassNameRecursively(x,T):y.addClassName(x,T),y.rewriteCssSelectorWith(h,N,"."+T))},v.persistInputValues=function(h){var p=h.querySelectorAll("input"),m=h.querySelectorAll("textarea"),x=function(N){return N.type==="checkbox"||N.type==="radio"};g(p).filter(x).forEach(function(N){N.checked?N.setAttribute("checked",""):N.removeAttribute("checked")}),g(p).filter(function(N){return!x(N)}).forEach(function(N){N.setAttribute("value",N.value)}),g(m).forEach(function(N){N.textContent=N.value})},v.rewriteTagNameSelectorsToLowerCase=function(h){y.lowercaseCssTypeSelectors(h,y.findHtmlOnlyNodeNames(h))},v}(c),E=function(y,v,g,O){var h={},p=function($,X,q,D){var B=$.createElement(X);return B.style.visibility="hidden",B.style.width=q+"px",B.style.height=D+"px",B.style.position="absolute",B.style.top=-1e4-D+"px",B.style.left=-1e4-q+"px",$.getElementsByTagName("body")[0].appendChild(B),B},m=function($){return $>0?new Promise(function(X){setTimeout(X,$)}):Promise.resolve()};h.executeJavascript=function($,X){return new Promise(function(q){var D=p(O.document,"iframe",X.width,X.height),B=$.outerHTML,U=[],W=X.executeJsTimeout||0,ee=function(){O.document.getElementsByTagName("body")[0].removeChild(D)},ne=function(){var H=D.contentDocument;q({document:H,errors:U,cleanUp:ee})},te=D.contentWindow.XMLHttpRequest,Z=v.finishNotifyingXhr(te),ae=v.baseUrlRespectingXhr(Z,X.baseUrl);D.onload=function(){m(W).then(Z.waitForRequestsToFinish).then(ne)},D.contentDocument.open(),D.contentWindow.XMLHttpRequest=ae,D.contentWindow.onerror=function(H){U.push({resourceType:"scriptExecution",msg:H})},D.contentDocument.write("<!DOCTYPE html>"),D.contentDocument.write(B),D.contentDocument.close()})};var x=function($,X,q){var D=$.createElement("iframe");return D.style.width=X+"px",D.style.height=q+"px",D.style.visibility="hidden",D.style.position="absolute",D.style.top=-1e4-q+"px",D.style.left=-1e4-X+"px",D.style.borderWidth=0,D.sandbox="allow-same-origin",D.scrolling="no",D},N=function($,X,q){var D=Math.floor($/q),B=Math.floor(X/q);return x(O.document,D,B)},T=function($,X,q,D){return{width:Math.max($.width*D,X),height:Math.max($.height*D,q)}},I=function($,X){var q=$.querySelector(X);if(q)return q;if($.ownerDocument.querySelector(X)===$)return $;throw{message:"Clipping selector not found"}},R=function($,X,q,D,B){var U=Math.max($.scrollWidth,$.clientWidth),W=Math.max($.scrollHeight,$.clientHeight),ee,ne,te,Z,ae,H,J,ie;return X?(H=I($,X),J=H.getBoundingClientRect(),ee=J.top,ne=J.left,te=J.width,Z=J.height):(ee=0,ne=0,te=U,Z=W),ie=T({width:te,height:Z},q,D,B),ae=O.getComputedStyle($.ownerDocument.documentElement).fontSize,{left:ne,top:ee,width:ie.width,height:ie.height,viewportWidth:U,viewportHeight:W,rootFontSize:ae}},C=function($,X){var q=$.tagName;return X.querySelector(q)},M=function($){var X=$.tagName.toLowerCase();return X==="html"||X==="body"?$.outerHTML:'<body style="margin: 0;">'+$.outerHTML+"</body>"};h.calculateDocumentContentSize=function($,X){return new Promise(function(q,D){var B=X.zoom||1,U;U=N(X.width,X.height,B),O.document.getElementsByTagName("body")[0].appendChild(U),U.onload=function(){var W=U.contentDocument,ee;try{ee=R(C($,W),X.clip,X.width,X.height,B),q(ee)}catch(ne){D(ne)}finally{O.document.getElementsByTagName("body")[0].removeChild(U)}},U.contentDocument.open(),U.contentDocument.write("<!DOCTYPE html>"),U.contentDocument.write(M($)),U.contentDocument.close()})},h.parseHtmlFragment=function($){var X=O.document.implementation.createHTMLDocument("");X.documentElement.innerHTML=$;var q=X.querySelector("body").firstChild;if(!q)throw"Invalid source";return q};var k=function($,X){var q=/<html((?:\s+[^>]*)?)>/im.exec(X),D=O.document.implementation.createHTMLDocument(""),B,U,W,ee;if(q)for(B="<div"+q[1]+"></div>",D.documentElement.innerHTML=B,W=D.querySelector("div"),U=0;U<W.attributes.length;U++)ee=W.attributes[U],$.documentElement.setAttribute(ee.name,ee.value)};h.parseHTML=function($){var X=O.document.implementation.createHTMLDocument("");return X.documentElement.innerHTML=$,k(X,$),X};var A=function($){try{return g.failOnParseError($)}catch(X){throw{message:"Invalid source",originalError:X}}};h.validateXHTML=function($){var X=new DOMParser,q=X.parseFromString($,"application/xml");A(q)};var L=null,z=function($,X){return X==="none"||X==="repeated"?((L===null||X!=="repeated")&&(L=Date.now()),$+"?_="+L):$},Y=function($,X){return new Promise(function(q,D){var B=new window.XMLHttpRequest,U=y.joinUrl(X.baseUrl,$),W=z(U,X.cache),ee=function(ne){D({message:"Unable to load page",originalError:ne})};B.addEventListener("load",function(){B.status===200||B.status===0?q(B.responseXML):ee(B.statusText)},!1),B.addEventListener("error",function(ne){ee(ne)},!1);try{B.open("GET",W,!0),B.responseType="document",B.send(null)}catch(ne){ee(ne)}})};return h.loadDocument=function($,X){return Y($,X).then(function(q){return A(q)})},h}(l,s,r,window),_=function(y){var v={},g=function(C,M){return M?URL.createObjectURL(new Blob([C],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(C)},O=function(C){C instanceof Blob&&URL.revokeObjectURL(C)},h='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',p=function(C){return new Promise(function(M,k){var A=document.createElement("canvas"),L=new Image;L.onload=function(){var z=A.getContext("2d");try{z.drawImage(L,0,0),A.toDataURL("image/png"),M(!0)}catch{M(!1)}},L.onerror=k,L.src=C})},m=function(){var C=g(h,!0);return p(C).then(function(M){return O(C),M?!1:p(g(h,!1)).then(function(k){return k})},function(){return!1})},x=function(){if(y.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},N=function(){return new Promise(function(C,M){x()&&y.URL?m().then(function(k){C(!k)},function(){M()}):C(!1)})},T,I=function(){return T===void 0&&(T=N()),T},R=function(C){return I().then(function(M){return g(C,M)})};return v.renderSvg=function(C){return new Promise(function(M,k){var A,L,z=function(){L.onload=null,L.onerror=null},Y=function(){A&&O(A)};L=new Image,L.onload=function(){z(),Y(),M(L)},L.onerror=function(){Y(),k()},R(C).then(function($){A=$,L.src=A},k)})},v}(window),S=function(y,v,g,O){var h={},p=function(C,M){var k=M||1,A={width:C.width,height:C.height,"font-size":C.rootFontSize};return k!==1&&(A.style="transform:scale("+k+"); transform-origin: 0 0;"),A},m=function(C){var M,k,A,L;M=Math.round(C.viewportWidth),k=Math.round(C.viewportHeight),A=-C.left,L=-C.top;var z={x:A,y:L,width:M,height:k};return z},x=function(C){var M=C.style||"";C.style=M+"float: left;"},N=function(C){C.externalResourcesRequired=!0},T=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},I=function(C){var M=Object.keys(C);return M.length?" "+M.map(function(k){return k+'="'+C[k]+'"'}).join(" "):""},R=function(C,M,k){var A=O.serializeToString(C);v.validateXHTML(A);var L=m(M);return x(L),N(L),'<svg xmlns="http://www.w3.org/2000/svg"'+I(p(M,k))+">"+T()+"<foreignObject"+I(L)+">"+A+"</foreignObject></svg>"};return h.getSvgForDocument=function(C,M,k){return g.rewriteTagNameSelectorsToLowerCase(C),R(C,M,k)},h.drawDocumentAsSvg=function(C,M){return["hover","active","focus","target"].forEach(function(k){M[k]&&g.fakeUserAction(C,M[k],k)}),v.calculateDocumentContentSize(C,M).then(function(k){return h.getSvgForDocument(C,k,M.zoom)})},h}(l,E,f,t),w=function(y,v,g,O,h,p){var m={},x=function(C){return{message:"Error rendering page",originalError:C}},N=function(C){return h.renderSvg(C).then(function(M){return{image:M,svg:C}},function(M){throw x(M)})},T=function(C,M){try{M.getContext("2d").drawImage(C,0,0)}catch(k){throw x(k)}},I=function(C,M,k){return O.drawDocumentAsSvg(C,k).then(N).then(function(A){return M&&T(A.image,M),A})},R=function(C,M){return v.executeJavascript(C,M).then(function(k){var A=k.document;return g.persistInputValues(A),{document:A,errors:k.errors,cleanUp:k.cleanUp}})};return m.rasterize=function(C,M,k){var A;return A=y.clone(k),A.inlineScripts=k.executeJs===!0,p.inlineReferences(C,A).then(function(L){return k.executeJs?R(C,k).then(function(z){return{element:z.document.documentElement,errors:L.concat(z.errors),cleanUp:z.cleanUp}}):{element:C,errors:L,cleanUp:function(){}}}).then(function(L){return I(L.element,M,k).then(function(z){return L.cleanUp(),{image:z.image,svg:z.svg,errors:L.errors}})})},m}(l,E,f,S,_,a),b=function(y,v,g){var O={},h=function(T,I){var R=300,C=200,M=T?T.width:R,k=T?T.height:C,A=I.width!==void 0?I.width:M,L=I.height!==void 0?I.height:k;return{width:A,height:L}},p=function(T){var I=h(T.canvas,T.options),R;return R=y.clone(T.options),R.width=I.width,R.height=I.height,R};O.drawDocument=function(){var T=arguments[0],I=Array.prototype.slice.call(arguments,1),R=y.parseOptionalParameters(I),C=T.documentElement?T.documentElement:T;return g.rasterize(C,R.canvas,p(R))};var m=function(T,I,R){var C=v.parseHTML(T);return O.drawDocument(C,I,R)};O.drawHTML=function(){var T=arguments[0],I=Array.prototype.slice.call(arguments,1),R=y.parseOptionalParameters(I);return m(T,R.canvas,R.options)};var x=function(T,I,R){var C=document.implementation.createHTMLDocument("");C.replaceChild(T.documentElement,C.documentElement);var M=R?y.clone(R):{};return R.baseUrl||(M.baseUrl=I),{document:C,options:M}},N=function(T,I,R){return v.loadDocument(T,R).then(function(C){var M=x(C,T,R);return O.drawDocument(M.document,I,M.options)})};return O.drawURL=function(){var T=arguments[0],I=Array.prototype.slice.call(arguments,1),R=y.parseOptionalParameters(I);return N(T,R.canvas,R.options)},O}(l,E,w);return b})}(hp)),hp.exports}var u3;function X4(){return u3||(u3=1,function(e){var i=Xo&&Xo.__createBinding||(Object.create?function(m,x,N,T){T===void 0&&(T=N);var I=Object.getOwnPropertyDescriptor(x,N);I&&!("get"in I?!x.__esModule:I.writable||I.configurable)||(I={enumerable:!0,get:function(){return x[N]}}),Object.defineProperty(m,T,I)}:function(m,x,N,T){T===void 0&&(T=N),m[T]=x[N]}),t=Xo&&Xo.__setModuleDefault||(Object.create?function(m,x){Object.defineProperty(m,"default",{enumerable:!0,value:x})}:function(m,x){m.default=x}),r=Xo&&Xo.__importStar||function(){var m=function(x){return m=Object.getOwnPropertyNames||function(N){var T=[];for(var I in N)Object.prototype.hasOwnProperty.call(N,I)&&(T[T.length]=I);return T},m(x)};return function(x){if(x&&x.__esModule)return x;var N={};if(x!=null)for(var T=m(x),I=0;I<T.length;I++)T[I]!=="default"&&i(N,x,T[I]);return t(N,x),N}}();Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=b,e.detectSize=y,e.htmlToCanvas=p;const a=r(nP()),l=Yd(),s=z4();e.resetStyleContent=`
|
|
159
|
-
p {
|
|
160
|
-
margin: 0;
|
|
161
|
-
padding: 0;
|
|
162
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
163
|
-
/* a text may have several spaces, we need to preserve them */
|
|
164
|
-
white-space: pre-wrap;
|
|
165
|
-
}
|
|
166
|
-
ul, ol {
|
|
167
|
-
list-style-position: outside;
|
|
168
|
-
margin: 0;
|
|
169
|
-
padding: 0;
|
|
170
|
-
display: inline-block;
|
|
171
|
-
text-align: left;
|
|
172
|
-
width: 100%;
|
|
173
|
-
/*
|
|
174
|
-
* somehow display: inline-block is removing text-decoration
|
|
175
|
-
* let's try to restore it that way
|
|
176
|
-
*/
|
|
177
|
-
text-decoration: inherit;
|
|
178
|
-
}
|
|
179
|
-
li {
|
|
180
|
-
margin-left: 1.7em;
|
|
181
|
-
padding-left: 0.5em; /* This should match the margin-left value */
|
|
182
|
-
}
|
|
183
|
-
/* Add resets */
|
|
184
|
-
ul {
|
|
185
|
-
list-style-type: disc;
|
|
186
|
-
}
|
|
187
|
-
ol {
|
|
188
|
-
list-style-type: decimal;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
`;const c=`
|
|
192
|
-
<style>
|
|
193
|
-
html, body {
|
|
194
|
-
padding: 0;
|
|
195
|
-
margin: 0;
|
|
196
|
-
}
|
|
197
|
-
${e.resetStyleContent}
|
|
198
|
-
</style>
|
|
199
|
-
`;let f;const E=()=>(f||(f=document.createElement("div"),f.id="polotno-hidden-do-not-touch",f.style.overflow="hidden",f.style.position="relative",document.body.appendChild(f),f.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),f),_=new Map,S=navigator.userAgent.includes("Firefox"),w=async m=>{if(_.has(m))return _.get(m);const x=(async()=>{const N=`<div style="font-family: ${m}; font-size: 100px;">${m}<strong>${m}</strong></div>`,T=document.createElement("div");T.innerHTML=N,T.style.visibility="hidden",T.style.position="absolute";const I=E();I.appendChild(T);const R=S?180:50;await new Promise(C=>setTimeout(C,R)),I.removeChild(T)})();return _.set(m,x),x};function b({html:m}){const x=document.createElement("div");x.innerHTML=m,x.style.display="inline-block",x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.zIndex="1000",x.style.whiteSpace="nowrap",x.style.visibility="hidden";const N=E();N.appendChild(x);const T=x.textContent,I=x.childNodes[0],R=T.split(/\s+/);let C=!1;for(let M=0;M<R.length;M++){const k=R[M];if(I.textContent=k,C=I.scrollWidth>x.clientWidth,C)break}return N.removeChild(x),C}function y(m){m.indexOf("Avellino");const x=document.createElement("div");x.innerHTML=m,x.style.display="inline-block",x.style.position="fixed",x.style.top="0px",x.style.left="0px",x.style.zIndex="1000";const N=E();N.appendChild(x);const T=x.getBoundingClientRect();return N.removeChild(x),{width:T.width,height:T.height}}e.prerenderFont=w;const v={};function g(m){const x=[];for(const N of document.styleSheets)try{for(const T of N.cssRules)T instanceof CSSFontFaceRule&&T.style.fontFamily.replace(/['"]/g,"")===m&&x.push(T)}catch{}return x}const O={},h=m=>{if(O[m])return O[m];const x=g(m).filter(N=>N.style.fontFamily.replace(/['"]/g,"")===m).map(N=>({src:N.style.src,fontStyle:N.style.fontStyle||"normal",fontWeight:N.style.fontWeight||"normal"}));return O[m]=x,x};async function p({html:m,width:x,height:N,fontFamily:T,padding:I,font:R,pixelRatio:C}){if(T!=="Arial"&&!R){const L=(0,l.getGoogleFontsVariants)();m+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${T}:${L}" rel="stylesheet">`}if(R){const L=R.styles||(R.url?[{src:`url("${R.url}")`}]:h(T));m+="<style>",L.forEach(z=>{m+=`
|
|
200
|
-
@font-face {
|
|
201
|
-
font-family: '${T}';
|
|
202
|
-
src: ${z.src};
|
|
203
|
-
font-style: ${z.fontStyle||"normal"};
|
|
204
|
-
font-weight: ${z.fontWeight||"normal"};
|
|
205
|
-
}
|
|
206
|
-
`}),m+="</style>"}m+=c;const M=document.createElement("canvas"),k=await a.drawHTML(`<div style="padding: ${I}px;">${m}</div>`,M,{width:x+2*I,height:N+2*I,cacheBucket:v});(0,s.trySetCanvasSize)(M,(x+2*I)*C,(N+2*I)*C);const A=M.getContext("2d");return A==null||A.drawImage(k.image,0,0,M.width,M.height),M}}(Xo)),Xo}var nc={},p1={},c3;function Z4(){return c3||(c3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=S,e.setup=O,e.styled=h;let i={data:""},t=p=>typeof window=="object"?((p?p.querySelector("#_goober"):window._goober)||Object.assign((p||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:p||i,r=p=>{let m=t(p),x=m.data;return m.data="",x},a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/|\s\s+|\n/g,s=(p,m)=>{let x="",N="",T="";for(let I in p){let R=p[I];I[0]=="@"?I[1]=="i"?x=I+" "+R+";":N+=I[1]=="f"?s(R,I):I+"{"+s(R,I[1]=="k"?"":m)+"}":typeof R=="object"?N+=s(R,m?m.replace(/([^,])+/g,C=>I.replace(/(^:.*)|([^,])+/g,M=>/&/.test(M)?M.replace(/&/g,C):C?C+" "+M:M)):I):R!=null&&(I=I.replace(/[A-Z]/g,"-$&").toLowerCase(),T+=s.p?s.p(I,R):I+":"+R+";")}return x+(m&&T?m+"{"+T+"}":T)+N},c={},f=p=>{if(typeof p=="object"){let m="";for(let x in p)m+=x+f(p[x]);return m}return p},E=(p,m,x,N,T)=>{let I=f(p),R=c[I]||(c[I]=(C=>{let M=0,k=11;for(;M<C.length;)k=101*k+C.charCodeAt(M++)>>>0;return"go"+k})(I));if(!c[R]){let C=I!==p?p:(M=>{let k,A=[{}];for(;k=a.exec(M.replace(l,""));)k[4]?A.shift():k[3]?A.unshift(A[0][k[3]]=A[0][k[3]]||{}):A[0][k[1]]=k[2];return A[0]})(p);c[R]=s(T?{["@keyframes "+R]:C}:C,x?"":"."+R)}return((C,M,k)=>{M.data.indexOf(C)==-1&&(M.data=k?C+M.data:M.data+C)})(c[R],m,N),R},_=(p,m,x)=>p.reduce((N,T,I)=>{let R=m[I];if(R&&R.call){let C=R(x),M=C&&C.props&&C.props.className||/^go/.test(C)&&C;R=M?"."+M:C&&typeof C=="object"?C.props?"":s(C,""):C===!1?"":C}return N+T+(R??"")},"");function S(p){let m=this||{},x=p.call?p(m.p):p;return E(x.unshift?x.raw?_(x,[].slice.call(arguments,1),m.p):x.reduce((N,T)=>Object.assign(N,T&&T.call?T(m.p):T),{}):x,t(m.target),m.g,m.o,m.k)}e.extractCss=r;let w,b,y,v=S.bind({g:1}),g=S.bind({k:1});function O(p,m,x,N){s.p=m,w=p,b=x,y=N}function h(p,m){let x=this||{};return function(){let N=arguments;function T(I,R){let C=Object.assign({},I),M=C.className||T.className;x.p=Object.assign({theme:b&&b()},C),x.o=/ *go\d+/.test(M),C.className=S.apply(x,N)+(M?" "+M:""),m&&(C.ref=R);let k=p;return p[0]&&(k=C.as||p,delete C.as),y&&k[0]&&y(C),w(k,C)}return m?m(T):T}}e.glob=v,e.keyframes=g}(p1)),p1}var f3;function iP(){if(f3)return nc;f3=1;var e=nc&&nc.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nc,"__esModule",{value:!0});const i=e(Ar()),t=Z4();return(0,t.setup)(i.default.createElement),nc.default=t.styled,nc}var d3;function aP(){return d3||(d3=1,function(e){var i=Pa&&Pa.__createBinding||(Object.create?function(U,W,ee,ne){ne===void 0&&(ne=ee);var te=Object.getOwnPropertyDescriptor(W,ee);te&&!("get"in te?!W.__esModule:te.writable||te.configurable)||(te={enumerable:!0,get:function(){return W[ee]}}),Object.defineProperty(U,ne,te)}:function(U,W,ee,ne){ne===void 0&&(ne=ee),U[ne]=W[ee]}),t=Pa&&Pa.__setModuleDefault||(Object.create?function(U,W){Object.defineProperty(U,"default",{enumerable:!0,value:W})}:function(U,W){U.default=W}),r=Pa&&Pa.__importStar||function(){var U=function(W){return U=Object.getOwnPropertyNames||function(ee){var ne=[];for(var te in ee)Object.prototype.hasOwnProperty.call(ee,te)&&(ne[ne.length]=te);return ne},U(W)};return function(W){if(W&&W.__esModule)return W;var ee={};if(W!=null)for(var ne=U(W),te=0;te<ne.length;te++)ne[te]!=="default"&&i(ee,W,ne[te]);return t(ee,W),ee}}(),a=Pa&&Pa.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.setQuillFormats=e.quillRef=void 0;const l=a(Ar()),s=qi,c=mo,f=a(fO()),E=a(Hi()),_=r(oa),S=ls(),w=Kd(),b=D4(),y=Wd(),v=X4(),g=tu(),O=nu(),h=xc,p=a(iP()),m=ru(),x=Fw(),N=r(Yd()),T=ss(),I=j4();e.quillRef=_.observable({enabled:!1,currentFormat:{},editor:_.observable.object({instance:null},{},{deep:!1})});const R=(0,p.default)("div",l.default.forwardRef)`
|
|
207
|
-
.ql-editor {
|
|
208
|
-
outline: none;
|
|
209
|
-
}
|
|
210
|
-
${v.resetStyleContent}
|
|
211
|
-
strong {
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
}
|
|
214
|
-
.ql-direction-rtl {
|
|
215
|
-
direction: rtl;
|
|
216
|
-
}
|
|
217
|
-
`;let C=["bold","color","font","italic","size","strike","underline","indent","list","direction"];const M=U=>{C=U};e.setQuillFormats=M;const k=U=>new f.default(U,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:C});e.createQuill=k;const A=(U,W)=>{var ee=U.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+W+"<p><br></p></div>");U.setContents(ee),U.history.clear()};e.setQuillContent=A;const L=({html:U,onBlur:W,onChange:ee,element:ne})=>{const te=l.default.useRef(null);l.default.useEffect(()=>{if(!te.current)return;const ae=(0,e.createQuill)(te.current);return _.runInAction(()=>{e.quillRef.editor.instance=ae}),window.__polotnoQuill=ae,ae.on("text-change",()=>{ae.getSelection()&&_.runInAction(()=>{e.quillRef.currentFormat=ae.getFormat()}),setTimeout(()=>{var H;const J=(H=te.current)===null||H===void 0?void 0:H.childNodes[0];ee(J.innerHTML)},10)}),ae.setSelection(0,0,"api"),ae.on("selection-change",H=>{H&&_.runInAction(()=>{e.quillRef.currentFormat=ae.getFormat()})}),te.current.childNodes[0].addEventListener("blur",H=>{B(H.relatedTarget)||W()}),()=>{_.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),l.default.useEffect(()=>{var ae;const H=e.quillRef.editor.instance;if(!H)return;const J=H.getSelection();((ae=te.current)===null||ae===void 0?void 0:ae.childNodes[0].innerHTML)===ne.text||((0,e.setQuillContent)(H,U),J&&(H.setSelection(J.index,J.length),_.runInAction(()=>{e.quillRef.currentFormat=H.getFormat()})))},[ne.text]);const Z={color:ne.fill};return ne.fill.indexOf("gradient")>=0&&(Z.backgroundColor=ne.fill,Z.backgroundImage=ne.fill,Z.backgroundSize="100% 100%",Z.backgroundRepeat="repeat",Z.webkitBackgroundClip="text",Z.MozBackgroundClip="text",Z.WebkitTextFillColor="transparent",Z.MozTextFillColor="transparent"),l.default.createElement(R,{ref:te,style:Object.assign(Object.assign({},Z),{fontSize:ne.fontSize,fontWeight:ne.fontWeight,width:ne.a.width,fontFamily:ne.fontFamily,lineHeight:ne.lineHeight,letterSpacing:ne.letterSpacing+"rem",textAlign:ne.align}),dir:(0,b.getDir)((0,x.removeTags)(ne.text))})};function z(U,W,ee){return l.default.useMemo(()=>(0,v.detectSize)(U),[U,W.width,ee])}function Y(U){const W=U.getContext("2d").getImageData(0,0,U.width,U.height).data;for(let ee=0;ee<W.length;ee+=4)if(W[ee+3]!==0)return!0;return!1}function $(U){return!Y(U)}function X(U,{fontFamily:W="",color:ee="black"}={}){let ne=`color: ${ee||U.fill}`;return U.fill.indexOf("gradient")>=0&&(ne=`
|
|
218
|
-
background-color: ${ee};
|
|
219
|
-
background-image: ${U.fill};
|
|
220
|
-
background-size: 100% 100%;
|
|
221
|
-
background-repeat: repeat;
|
|
222
|
-
-webkit-background-clip: text;
|
|
223
|
-
-moz-background-clip: text;
|
|
224
|
-
-webkit-text-fill-color: transparent;
|
|
225
|
-
-moz-text-fill-color: transparent;
|
|
226
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(U.width||100)}px`,ne,`font-size: ${U.fontSize}px`,`font-family: '${W}'`,`text-align: ${U.align}`,U.textDecoration?`text-decoration: ${U.textDecoration}; text-decoration-color: ${ee||U.fill}; text-decoration-layer: over`:"",U.lineHeight?`line-height: ${U.lineHeight}`:"",U.letterSpacing?`letter-spacing: ${U.letterSpacing}rem`:"",U.fontStyle?`font-style: ${U.fontStyle}`:"",U.fontWeight?`font-weight: ${U.fontWeight}`:"",U.strokeWidth?`-webkit-text-stroke: ${U.strokeWidth}px ${U.stroke}`:"",U.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,b.getDir)((0,x.removeTags)(U.text))}">${U.text.replaceAll(`
|
|
227
|
-
`,"</br>")}</div>`}const q=U=>{let W=U.fontSize;for(let ee=1;ee<50;ee++){const ne=X(Object.assign(Object.assign({},U.toJSON()),{fontSize:W}),{fontFamily:U.fontFamily}),{height:te}=(0,v.detectSize)(ne),Z=U.height&&te>U.height,ae=(0,v.isContentWrapping)({html:ne});if(!(Z||ae))break;W-=.5}return W},D=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function B(U){return!!U&&!!U.closest(".sketch-picker")}e.HTMLElement=(0,s.observer)(({element:U,store:W})=>{const ee=l.default.useRef(null),[ne,te]=l.default.useState(),[Z,ae]=l.default.useState(!1),[H,J]=l.default.useState(!0),[ie,le]=l.default.useState(!1),ue=l.default.useRef(U.height),he=W.selectedShapes.indexOf(U)>=0,ye=U.fontSize/3,{textVerticalResizeEnabled:Ce}=S.flags,pe=(0,b.usePrevious)(U.fontFamily),[fe]=(0,b.useFontLoader)(W,U.fontFamily),ve=U._editModeEnabled;(0,g.useFadeIn)(ee);const xe=fe?U.fontFamily:pe!==U.fontFamily?pe:"Arial",Te=(0,y.useColor)(U).fill,ce=X(U,{fontFamily:xe,color:Te}),{width:me,height:Oe}=z(ce,U,fe);l.default.useEffect(()=>{if(!fe)return;if(!U.height)return void U.set({height:Oe});const{textOverflow:De}=S.flags;if(De!=="change-font-size"||Z)De==="resize"&&(Ce&&U.height<Oe&&W.history.ignore(()=>{U.set({height:Oe})}),Ce||U.height===Oe||W.history.ignore(()=>{U.set({height:Oe})}));else{const Ye=q(U);Ye!==U.fontSize?W.history.ignore(()=>{U.set({fontSize:Ye})}):U.height!==Oe&&(Ce&&U.height<Oe?W.history.ignore(()=>{U.set({height:Oe})}):Ce||W.history.ignore(()=>{U.set({height:Oe})}))}});const Ne=l.default.useRef(0),tt=l.default.useMemo(()=>{const De={lastArgs:null,lastResult:null};return async function(Ye){return De.lastArgs&&De.lastResult&&(lt=De.lastArgs,wt=Ye,JSON.stringify(lt)===JSON.stringify(wt))||(De.lastResult=await(0,v.htmlToCanvas)(Ye),De.lastArgs=Object.assign({},Ye)),De.lastResult;var lt,wt}},[]);l.default.useEffect(()=>{Z||ve||(async()=>{Ne.current++;const De=Ne.current,Ye=(0,m.incrementLoader)(`text ${U.id}`);J(!0);let lt=null;const wt=D?5:1;for(let zt=0;zt<wt;zt++){if(lt=await(zt>0?tt:v.htmlToCanvas)({skipCache:zt>0,html:ce,width:U.width||1,height:U.height||Oe||1,fontFamily:xe,padding:ye,pixelRatio:W._elementsPixelRatio,font:W.fonts.find(Se=>Se.fontFamily===xe)||N.globalFonts.find(Se=>Se.fontFamily===xe)}),De!==Ne.current)return void Ye();$(lt)&&D&&await new Promise(Se=>setTimeout(Se,50*(zt+1)))}lt?(te(lt),J(!1),E.default.Util.requestAnimFrame(Ye)):Ye()})()},[ce,Z,Oe,ve,xe,U.height,W._elementsPixelRatio,fe]);const rt=Z||H;l.default.useEffect(()=>_.autorun(()=>{const De=ee.current;(0,w.applyFilter)(De,U)}),[ne,rt,U.shadowColor,U.shadowOffsetX,U.shadowOffsetY,U.shadowOpacity]);let He=0;U.verticalAlign==="middle"&&(He=(U.height-Oe)/2),U.verticalAlign==="bottom"&&(He=U.height-Oe);const $e=(0,b.getLineHeight)({fontLoaded:fe,fontFamily:U.fontFamily,fontSize:U.fontSize,lineHeight:U.lineHeight}),Xe=(0,T.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,l.default.createElement(c.Rect,{x:U.a.x,y:U.a.y,offsetX:U.backgroundPadding*(U.fontSize*$e*.5),offsetY:U.backgroundPadding*(U.fontSize*$e*.5),rotation:U.a.rotation,hideInExport:!U.showInExport,listening:!1,visible:U.backgroundEnabled,opacity:U.backgroundOpacity*U.a.opacity,fill:U.backgroundColor,width:U.a.width+U.backgroundPadding*(U.fontSize*$e),height:U.a.height+U.backgroundPadding*(U.fontSize*$e),cornerRadius:U.backgroundCornerRadius*(U.fontSize*$e*.5)}),l.default.createElement(c.Rect,{ref:ee,name:"element",x:U.a.x,y:U.a.y,listening:U.selectable,rotation:U.a.rotation,width:U.a.width,height:U.a.height,visible:!rt,draggable:Xe?U.draggable&&he:U.draggable,preventDefault:!Xe||he,opacity:ve?0:U.a.opacity,hideInExport:!U.showInExport,onMouseEnter:()=>{le(!0)},onMouseLeave:()=>{le(!1)},onDragMove:De=>{U.set({x:De.target.x(),y:De.target.y()})},onDragEnd:De=>{U.set({x:De.target.x(),y:De.target.y()})},id:U.id,onDblClick:()=>{U.contentEditable&&U.toggleEditMode(!0)},onDblTap:()=>{U.contentEditable&&U.toggleEditMode(!0)},onTransformStart:De=>{ae(!0),ue.current=U.height},onTransform:De=>{var Ye;const lt=De.target,wt=((Ye=lt.getStage())===null||Ye===void 0?void 0:Ye.findOne("Transformer")).getActiveAnchor(),zt=wt==="middle-left"||wt==="middle-right",_e=wt==="top-center"||wt==="bottom-center",Se=lt.scaleX();if(zt){const xt=lt.scaleX(),ht=Math.max(lt.width()*xt,U.fontSize);if(lt.width(ht),lt.scaleX(1),S.flags.textVerticalResizeEnabled){const At=Math.max(Oe,ue.current);U.set({height:At})}U.set({width:ht,x:lt.x(),y:lt.y()})}else if(_e){let xt=S.flags.textOverflow==="resize"?Oe:U.lineHeight*U.fontSize;const ht=Math.max(xt,De.target.height()*De.target.scaleY());lt.scaleY(1),U.set({x:lt.x(),y:lt.y(),height:ht,rotation:lt.rotation()})}else lt.scaleX(1),lt.scaleY(1),U.set({fontSize:U.fontSize*Se,width:lt.width()*Se,x:lt.x(),y:lt.y(),rotation:lt.rotation(),height:lt.height()*Se})},onTransformEnd:De=>{ae(!1),J(!0);const Ye=De.target.scaleX();De.target.scaleX(1),De.target.scaleY(1),U.set({fontSize:U.fontSize*Ye,width:De.target.width()*Ye,x:De.target.x(),y:De.target.y(),rotation:De.target.rotation(),shadowBlur:U.shadowBlur*Ye,shadowOffsetX:U.shadowOffsetX*Ye,shadowOffsetY:U.shadowOffsetY*Ye,strokeWidth:U.strokeWidth*Ye})}}),l.default.createElement(c.Image,{ref:ee,image:ne,x:U.a.x,y:U.a.y,offsetX:ye,offsetY:ye-He,listening:!1,rotation:U.rotation,width:U.a.width+2*ye,height:U.a.height+2*ye,visible:!rt,opacity:ve?0:U.a.opacity,shadowEnabled:U.shadowEnabled,shadowBlur:U.shadowBlur,shadowOffsetX:U.shadowOffsetX,shadowOffsetY:U.shadowOffsetY,shadowColor:U.shadowColor,shadowOpacity:U.shadowOpacity,hideInExport:!U.showInExport}),rt&&l.default.createElement(c.Group,{x:U.a.x,y:U.a.y,rotation:U.rotation,offsetY:-He},l.default.createElement(h.Html,{divProps:{style:{pointerEvents:"none"}}},l.default.createElement(R,{dangerouslySetInnerHTML:{__html:ce},style:{pointerEvents:"none",display:"inline-block"}}))),ve&&l.default.createElement(c.Group,{x:U.a.x,y:U.a.y,rotation:U.rotation,offsetY:-He},l.default.createElement(h.Html,null,l.default.createElement(L,{html:ce,element:U,onChange:De=>{const Ye=(0,I.getLimitedFontSize)({oldText:(0,x.removeTags)(U.text),newText:(0,x.removeTags)(De),element:U});U.set({text:De,fontSize:Ye})},onBlur:De=>{U.toggleEditMode(!1)}}))),(he||ie)&&l.default.createElement(O.Highlighter,{element:U}))})}(Pa)),Pa}var md={},yd={},g1={},h3;function Cc(){return h3||(h3=1,function(e){function i(f){return f/180*Math.PI}function t(f,E,_,S,w){const b=Math.sqrt(_*_+S*S);return w+=Math.atan2(S,_),{x:f+b*Math.cos(w),y:E+b*Math.sin(w)}}function r(f){const{x:E,y:_,width:S,height:w}=f,b=i(f.rotation),y=t(E,_,0,0,b),v=t(E,_,S,0,b),g=t(E,_,S,w,b),O=t(E,_,0,w,b),h=Math.min(y.x,v.x,g.x,O.x),p=Math.min(y.y,v.y,g.y,O.y),m=Math.max(y.x,v.x,g.x,O.x),x=Math.max(y.y,v.y,g.y,O.y);return{x:h,y:p,width:m-h,height:x-p,minX:h,minY:p,maxX:m,maxY:x}}function a(f){const E=f.map(y=>r(y)),_=Math.min(...E.map(y=>y.minX)),S=Math.min(...E.map(y=>y.minY)),w=Math.max(...E.map(y=>y.maxX)),b=Math.max(...E.map(y=>y.maxY));return{x:_,y:S,width:w-_,height:b-S,minX:_,minY:S,maxX:w,maxY:b}}function l(f){const E=i(f.rotation||0);return{x:f.x+f.width/2*Math.cos(E)+f.height/2*Math.sin(-E),y:f.y+f.height/2*Math.cos(E)+f.width/2*Math.sin(E)}}function s(f,E,_){const S=i(E),w=_.x+(f.x-_.x)*Math.cos(S)-(f.y-_.y)*Math.sin(S),b=_.y+(f.x-_.x)*Math.sin(S)+(f.y-_.y)*Math.cos(S);return Object.assign(Object.assign({},f),{rotation:f.rotation+E,x:w,y:b})}function c(f,E){return s(f,E,l(f))}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=i,e.getClientRect=r,e.getTotalClientRect=a,e.getCenter=l,e.rotateAroundPoint=s,e.rotateAroundCenter=c}(g1)),g1}var p3;function Q4(){return p3||(p3=1,function(e){var i=yd&&yd.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.setSnapFilterFunc=void 0,e.useSnap=_,e.useAnchorSnap=w;const t=i(Ar()),r=i(Hi()),a=Cc();var l=5;let s=({targetKonvaNodes:O,guideKonvaNode:h,distance:p,snapDirection:m})=>p<l;const c=O=>{s=O};function f(O){const h=O.__getNodeRect(),p=(0,a.getClientRect)(Object.assign(Object.assign({},h),{rotation:r.default.Util.radToDeg(h.rotation)})),m=O.getAbsolutePosition();return{vertical:[{guide:p.x,offset:m.x-p.x,snap:"start",nodes:O.nodes()},{guide:p.x+p.width/2,offset:m.x-p.x-p.width/2,snap:"center",nodes:O.nodes()},{guide:p.x+p.width,offset:m.x-p.x-p.width,snap:"end",nodes:O.nodes()}],horizontal:[{guide:p.y,offset:m.y-p.y,snap:"start",nodes:O.nodes()},{guide:p.y+p.height/2,offset:m.y-p.y-p.height/2,snap:"center",nodes:O.nodes()},{guide:p.y+p.height,offset:m.y-p.y-p.height,snap:"end",nodes:O.nodes()}]}}function E(O,h){var p=[],m=[];O.vertical.forEach(C=>{h.vertical.forEach(M=>{var k=Math.abs(C.offset-M.guide);s({targetKonvaNodes:M.nodes,guideKonvaNode:C.node,distance:k,snapDirection:C.snap})&&p.push({lineGuide:C.offset,diff:k,snap:M.snap,offset:M.offset})})}),O.horizontal.forEach(C=>{h.horizontal.forEach(M=>{var k=Math.abs(C.offset-M.guide);s({targetKonvaNodes:M.nodes,guideKonvaNode:C.node,distance:k,snapDirection:C.snap})&&m.push({lineGuide:C.offset,diff:k,snap:M.snap,offset:M.offset})})});var x=[];const N=p.sort((C,M)=>C.diff-M.diff),T=m.sort((C,M)=>C.diff-M.diff);var I=N[0],R=T[0];return I&&N.filter(C=>Math.abs(C.diff-I.diff)<.1).forEach(C=>{x.push(Object.assign({orientation:"V"},C))}),R&&T.filter(C=>Math.abs(C.diff-R.diff)<.1).forEach(C=>{x.push(Object.assign({orientation:"H"},C))}),x}function _(O,h){const p=t.default.useRef(null),m=C=>C.hasName("element")||C.hasName("page-background")||!p.current&&C.hasName("elements-area");function x(C){var M;const k=(M=O.current)===null||M===void 0?void 0:M.getStage(),A=[],L=[];return k.find(m).forEach(z=>{if(!(C.indexOf(z)>=0)){var Y=z.getClientRect({skipShadow:!0,skipStroke:!0});A.push({offset:Y.x,node:z,snap:"start"},{offset:Y.x+Y.width,node:z,snap:"end"},{offset:Y.x+Y.width/2,node:z,snap:"center"}),L.push({offset:Y.y,node:z,snap:"start"},{offset:Y.y+Y.height,node:z,snap:"end"},{offset:Y.y+Y.height/2,node:z,snap:"center"})}}),{vertical:A,horizontal:L}}function N(C){var M;const k=(M=O.current)===null||M===void 0?void 0:M.getLayer(),A=k==null?void 0:k.children.find(L=>L.name()==="line-guides");C.forEach(L=>{if(L.orientation==="H"){var z=new r.default.Line({x:-k.getStage().x(),y:-k.getStage().y(),points:[-6e3,L.lineGuide,6e3,L.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});A==null||A.add(z),k.batchDraw()}else L.orientation==="V"&&(z=new r.default.Line({x:-k.getStage().x(),y:-k.getStage().y(),points:[L.lineGuide,-6e3,L.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),A==null||A.add(z))})}const T=C=>{const M=C.target.getLayer().children.find($=>$.name()==="line-guides");M==null||M.destroyChildren();var k=E(x(C.target.nodes()),f(C.target));if(!k.length)return;N(k);const A=C.target.getAbsolutePosition(),L=(C.target.nodes().map($=>$.getAbsolutePosition()),Object.assign({},A));k.forEach($=>{switch($.snap){case"start":case"center":case"end":switch($.orientation){case"V":L.x=$.lineGuide+$.offset;break;case"H":L.y=$.lineGuide+$.offset}}});const z=L.x-A.x,Y=L.y-A.y;C.evt.ctrlKey||C.evt.metaKey||C.target.nodes().forEach($=>{const X=$.getAbsolutePosition();$.setAbsolutePosition({x:X.x+z,y:X.y+Y})})},I=(C,M,k)=>{var A;const L=O.current,z=L.getLayer().children.find(ee=>ee.name()==="line-guides");if(z==null||z.destroyChildren(),L.getActiveAnchor()==="rotater")return M;const Y=L.getActiveAnchor(),$=g[Y],X=(A=L.findOne(`.${$}`))===null||A===void 0?void 0:A.getAbsolutePosition();if(!X)return M;const q={x:C.x-X.x,y:C.y-X.y},D=y({x:M.x-C.x,y:M.y-C.y},q),B={x:C.x+D.x,y:C.y+D.y};var U=E(x(L.nodes()),{vertical:[{guide:B.x,offset:0,snap:"start",nodes:L.nodes()}],horizontal:[{guide:B.y,offset:0,snap:"start",nodes:L.nodes()}]});if(!U.length||(N(U),k.ctrlKey||k.metaKey))return M;const W=[];if(U.forEach(ee=>{const ne=v(B,X,{orientation:ee.orientation,lineGuide:ee.lineGuide});ne&&W.push(ne)}),W.length>0){let ee=W[0],ne=Math.sqrt(Math.pow(B.x-ee.x,2)+Math.pow(B.y-ee.y,2));if(W.forEach(te=>{const Z=Math.sqrt(Math.pow(B.x-te.x,2)+Math.pow(B.y-te.y,2));Z<ne&&(ne=Z,ee=te)}),ne<10)return ee}return B},R=C=>{if(!C.target)return;const M=C.target.getLayer(),k=M.children.find(A=>A.name()==="line-guides");k==null||k.destroyChildren(),M.batchDraw()};t.default.useEffect(()=>{O.current&&(O.current.anchorDragBoundFunc(I),O.current.on("dragstart",C=>{setTimeout(()=>{if(r.default.DD._dragElements.size===0)return;const M=[...r.default.DD._dragElements.entries()],k=M.find(([A,L])=>L.node instanceof r.default.Transformer);k&&(M.splice(M.indexOf(k),1),M.unshift(k),r.default.DD._dragElements.clear(),M.forEach(([A,L])=>{r.default.DD._dragElements.set(A,L)}))})}),O.current.on("dragmove",T),O.current.on("dragend",R),O.current.on("transformend",R),O.current.on("transform",C=>{var M,k;C.evt.ctrlKey||C.evt.metaKey?(M=O.current)===null||M===void 0||M.rotationSnapTolerance(0):(k=O.current)===null||k===void 0||k.rotationSnapTolerance(5)}))},[])}function S(O){return{vertical:[{guide:O.absolutePosition().x,offset:0,snap:"center",nodes:[O]}],horizontal:[{guide:O.absolutePosition().y,offset:0,snap:"center",nodes:[O]}]}}function w(O,h,p){const m=T=>T.hasName("element")||T.hasName("line-anchor")||T.hasName("page-background")||T.hasName("elements-area"),x=T=>{const I=T.target.getLayer().children.find(L=>L.name()==="line-guides");I==null||I.destroyChildren();var R=E(function(L){var z;const Y=(z=O.current)===null||z===void 0?void 0:z.getStage();var $=[],X=[];return Y.find(m).forEach(q=>{if(!(L.indexOf(q)>=0)){var D=q.getClientRect({skipShadow:!0,skipStroke:!0});q.hasName("line-anchor")&&(D={x:q.absolutePosition().x,y:q.absolutePosition().y,width:0,height:0}),$.push({offset:D.x,node:q,snap:"start"},{offset:D.x+D.width,node:q,snap:"end"},{offset:D.x+D.width/2,node:q,snap:"center"}),X.push({offset:D.y,node:q,snap:"start"},{offset:D.y+D.height,node:q,snap:"end"},{offset:D.y+D.height/2,node:q,snap:"center"})}}),{vertical:$,horizontal:X}}([T.target,...h.map(L=>L.current)]),S(T.target));if(!R.length)return;(function(L){var z;const Y=(z=O.current)===null||z===void 0?void 0:z.getLayer(),$=Y==null?void 0:Y.children.find(X=>X.name()==="line-guides");L.forEach(X=>{if(X.orientation==="H"){var q=new r.default.Line({points:[-6e3,X.lineGuide,6e3,X.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});$==null||$.add(q),Y.batchDraw()}else X.orientation==="V"&&(q=new r.default.Line({points:[X.lineGuide,-6e3,X.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),$==null||$.add(q))})})(R);const C=T.target.getAbsolutePosition(),M=Object.assign({},C);R.forEach(L=>{switch(L.snap){case"start":case"center":case"end":switch(L.orientation){case"V":M.x=L.lineGuide+L.offset;break;case"H":M.y=L.lineGuide+L.offset}}});const k=M.x-C.x,A=M.y-C.y;if(!(T.evt.ctrlKey||T.evt.metaKey)){const L=T.target.getAbsolutePosition();T.target.absolutePosition({x:L.x+k,y:L.y+A})}},N=T=>{if(!T.target)return;const I=T.target.getLayer(),R=I.children.find(C=>C.name()==="line-guides");R==null||R.destroyChildren(),I.batchDraw()};t.default.useEffect(()=>{O.current&&(O.current.on("dragmove",x),O.current.on("dragend",N))},p)}function b(O,h){return O.x*h.x+O.y*h.y}function y(O,h){const p=b(O,h)/b(h,h);return{x:p*h.x,y:p*h.y}}function v(O,h,p){if(p.orientation==="V"){const m=p.lineGuide;if(Math.abs(h.x-O.x)<1e-4)return null;const x=(h.y-O.y)/(h.x-O.x);return{x:m,y:x*m+(O.y-x*O.x)}}{const m=p.lineGuide;if(Math.abs(h.y-O.y)<1e-4)return null;const x=(h.y-O.y)/(h.x-O.x);return{x:(m-O.y)/x+O.x,y:m}}}e.setSnapFilterFunc=c;const g={"top-left":"bottom-right","top-center":"bottom-center","top-right":"bottom-left","middle-right":"middle-left","bottom-right":"top-left","bottom-center":"top-center","bottom-left":"top-right","middle-left":"middle-right"}}(yd)),yd}var g3;function oP(){return g3||(g3=1,function(e){var i=md&&md.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=_,e.getLinePositionFromMiddlePoints=S;const t=i(Ar()),r=qi,a=mo,l=Wd(),s=xc,c=nu(),f=Q4(),E=ss();function _(y){const{x:v,y:g,width:O,height:h,rotation:p}=y.a,m=p*Math.PI/180,x={x:v+h/2*Math.cos(m+Math.PI/2),y:g+h/2*Math.sin(m+Math.PI/2)};return{middleLeft:x,middleRight:{x:x.x+O*Math.cos(m),y:x.y+O*Math.sin(m)}}}function S(y,v,g){const O=Math.sqrt(Math.pow(v.x-y.x,2)+Math.pow(v.y-y.y,2)),h=Math.atan2(v.y-y.y,v.x-y.x),p=180*h/Math.PI;return{x:y.x+Math.cos(h-Math.PI/2)*g/2,y:y.y+Math.sin(h-Math.PI/2)*g/2,width:O,height:g,rotation:p}}const w=(y,v)=>({offsetX:5/y,offsetY:5/y,width:10/y,height:10/y,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:g=>{g.target.getStage().container().style.cursor="crosshair"},onMouseLeave:g=>{g.target.getStage().container().style.cursor=""},onDragStart:g=>{v.history.startTransaction()},onDragEnd:g=>{v.history.endTransaction()}}),b=(0,r.observer)(({element:y,type:v})=>{const g=(0,l.useColor)(y,y.a.color,"fill"),O=(0,l.useColor)(y,y.a.color,"stroke"),h=Object.assign(Object.assign(Object.assign({strokeWidth:y.height,lineCap:"round",lineJoin:"round"},O),g),{opacity:y.a.opacity,hideInExport:!y.showInExport});return t.default.createElement(t.default.Fragment,null,v==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*y.height,2*-y.height,0,0,3*y.height,2*y.height]},h)),v==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*y.height,2*-y.height,0,0,3*y.height,2*y.height],closed:!0},h)),v==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-y.height,0,2*y.height],closed:!0},h)),v==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-y.height,4*y.height,2*-y.height,4*y.height,2*y.height,0,2*y.height],closed:!0},h)),v==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*y.height,y:0,radius:2*y.height},h)))});e.LineElement=(0,r.observer)(({element:y,store:v})=>{const g=t.default.useRef(null),O=t.default.useRef(null),h=t.default.useRef(null),p=y.selectable||v.role==="admin",m=(0,E.isTouchDevice)(),[x,N]=t.default.useState(!1),T=v.selectedElements.indexOf(y)>=0&&v.selectedElements.length===1,I=v.selectedShapes.indexOf(y)>=0,{middleLeft:R,middleRight:C}=_(y);(0,f.useAnchorSnap)(O,[g],[T]),(0,f.useAnchorSnap)(h,[g],[T]);const M=(0,l.useColor)(y,y.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:g,name:"element",id:y.id,x:y.a.x,y:y.a.y,points:[0,0,y.a.width,0],offsetY:-y.a.height/2,strokeWidth:y.a.height,hitStrokeWidth:Math.max(y.a.height,20),dash:y.dash.map(k=>k*y.a.height)},M,{rotation:y.a.rotation,opacity:y.animated("opacity"),shadowEnabled:y.shadowEnabled,shadowBlur:y.shadowBlur,shadowOffsetX:y.shadowOffsetX,shadowOffsetY:y.shadowOffsetY,shadowColor:y.shadowColor,shadowOpacity:y.shadowOpacity,listening:p,draggable:m?y.draggable&&I:y.draggable,preventDefault:!m||I,hideInExport:!y.showInExport,onMouseEnter:()=>{N(!0)},onMouseLeave:()=>{N(!1)},onDragMove:k=>{y.set({x:k.target.x(),y:k.target.y()})},onDragEnd:k=>{y.set({x:k.target.x(),y:k.target.y()})},onTransform:k=>{const A=k.target.scaleX();k.target.scaleX(1),k.target.scaleY(1),y.set({height:y.height*A,width:y.width*A,x:k.target.x(),y:k.target.y(),rotation:k.target.rotation()})}})),t.default.createElement(a.Group,{x:R.x,y:R.y,rotation:y.rotation,hideInExport:!y.showInExport},t.default.createElement(b,{element:y,type:y.startHead})),t.default.createElement(a.Group,{x:C.x,y:C.y,rotation:y.rotation+180},t.default.createElement(b,{element:y,type:y.endHead})),(x||I&&!T)&&t.default.createElement(c.Highlighter,{element:y}),T&&y.resizable&&t.default.createElement(s.Portal,{selector:".page-abs-container",enabled:!0},t.default.createElement(a.Group,{visible:T},t.default.createElement(a.Rect,Object.assign({x:R.x,y:R.y,ref:O,name:"line-anchor"},w(v.scale,v),{onDragMove:k=>{const A=S(k.target.position(),C,y.height);y.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:C.x,y:C.y,ref:h,name:"line-anchor"},w(v.scale,v),{onDragMove:k=>{const A=S(R,k.target.position(),y.height);y.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})))))})}(md)),md}var Ca={},v3;function J4(){return v3||(v3=1,function(e){var i=Ca&&Ca.__createBinding||(Object.create?function(q,D,B,U){U===void 0&&(U=B);var W=Object.getOwnPropertyDescriptor(D,B);W&&!("get"in W?!D.__esModule:W.writable||W.configurable)||(W={enumerable:!0,get:function(){return D[B]}}),Object.defineProperty(q,U,W)}:function(q,D,B,U){U===void 0&&(U=B),q[U]=D[B]}),t=Ca&&Ca.__setModuleDefault||(Object.create?function(q,D){Object.defineProperty(q,"default",{enumerable:!0,value:D})}:function(q,D){q.default=D}),r=Ca&&Ca.__importStar||function(){var q=function(D){return q=Object.getOwnPropertyNames||function(B){var U=[];for(var W in B)Object.prototype.hasOwnProperty.call(B,W)&&(U[U.length]=W);return U},q(D)};return function(D){if(D&&D.__esModule)return D;var B={};if(D!=null)for(var U=q(D),W=0;W<U.length;W++)U[W]!=="default"&&i(B,D,U[W]);return t(B,D),B}}(),a=Ca&&Ca.__importDefault||function(q){return q&&q.__esModule?q:{default:q}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useLoader=e.setVideoLoaderHook=e.useCornerRadiusAndCrop=void 0;const l=a(Ar()),s=qi,c=oa,f=mo,E=a(Gp()),_=a(Hi()),S=xc,w=nu(),b=ru(),y=r(Zd()),v=ls(),g=Kd(),O=tu(),h=ss();function p(){return document.createElement("canvas")}async function m(q){if(!(q.indexOf("data:image/svg+xml")>=0||q.indexOf(".svg")>=0))return q;const D=await y.urlToString(q),B=y.fixSize(D);return y.svgToURL(B)}const x=q=>{const[D,B]=l.default.useState(q);return l.default.useEffect(()=>{(async()=>{const U=await m(q);U!==D&&B(U)})()},[q]),D},N=new window.Image;N.src=y.svgToURL(`
|
|
228
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
229
|
-
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
230
|
-
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
231
|
-
</svg>
|
|
232
|
-
`);const T=new window.Image;T.src=y.svgToURL(`
|
|
233
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
234
|
-
<path opacity="0.6" d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" fill="white"/>
|
|
235
|
-
<path opacity="0.6" d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" fill="white"/>
|
|
236
|
-
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
237
|
-
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
238
|
-
</svg>
|
|
239
|
-
`);function I(q,D,B,U,W,ee,ne){for(var te=new ImageData(D,B),Z=new Int32Array(q.data.buffer),ae=q.width,H=new Int32Array(te.data.buffer),J=te.width,ie=D/ee,le=B/ne,ue=Math.round(1/ie),he=Math.round(1/le),ye=ue*he,Ce=0;Ce<te.height;Ce++)for(var pe=0;pe<J;pe++){for(var fe=U+Math.round(pe/ie)+(W+Math.round(Ce/le))*ae,ve=0,xe=0,Te=0,ce=0,me=0;me<he;me++)for(var Oe=0;Oe<ue;Oe++){var Ne=Z[fe+Oe+me*ae];ve+=Ne<<24>>>24,xe+=Ne<<16>>>24,Te+=Ne<<8>>>24,ce+=Ne>>>24}ve=Math.round(ve/ye),xe=Math.round(xe/ye),Te=Math.round(Te/ye),ce=Math.round(ce/ye),H[pe+Ce*J]=ce<<24|Te<<16|xe<<8|ve}return te}function R(q,D){var B,U;const W=p();W.width=q.width,W.height=q.height,(B=W.getContext("2d"))===null||B===void 0||B.drawImage(q,0,0,W.width,W.height);const ee=I(W.getContext("2d").getImageData(0,0,W.width,W.height),Math.floor(W.width*D),Math.floor(W.height*D),0,0,W.width,W.height);return W.width=Math.floor(W.width*D),W.height=Math.floor(W.height*D),(U=W.getContext("2d"))===null||U===void 0||U.putImageData(ee,0,0),W}const C=(q,D,B,U,W=0,ee=!1)=>{const ne=Math.floor(Math.max(q.width*U,1)),te=Math.floor(Math.max(q.height*U,1)),Z=Math.min(W*U,ne/2,te/2),ae=Math.max(q.width/B.width,q.height/B.height)*U,H=q.page._exportingOrRendering&&v.flags.imageDownScalingEnabled&&ae<1&&!ee,J=B.x===0&&B.y===0&&B.width===(D==null?void 0:D.width)&&B.height===(D==null?void 0:D.height),ie=l.default.useMemo(()=>{if(!(!D||!D.width||!D.height))return J&&Z===0&&!H?void 0:p()},[D,Z,H,J]),le=()=>{if(!ie||!D)return;ie.width=ne,ie.height=te;const ue=ie.getContext("2d");if(!ue)return;Z&&(ue.beginPath(),ue.moveTo(Z,0),ue.lineTo(ne-Z,0),ue.arc(ne-Z,Z,Z,3*Math.PI/2,0,!1),ue.lineTo(ne,te-Z),ue.arc(ne-Z,te-Z,Z,0,Math.PI/2,!1),ue.lineTo(Z,te),ue.arc(Z,te-Z,Z,Math.PI/2,Math.PI,!1),ue.lineTo(0,Z),ue.arc(Z,Z,Z,Math.PI,3*Math.PI/2,!1),ue.clip());const he=H?R(D,ae):D,ye=H?{x:Math.floor(B.x*ae),y:Math.floor(B.y*ae),width:Math.floor(B.width*ae),height:Math.floor(B.height*ae)}:B;ue.drawImage(he,ye.x,ye.y,ye.width,ye.height,0,0,ie.width,ie.height)};return l.default.useLayoutEffect(()=>{le()},[ie,q.width,q.height,B.x,B.y,B.width,B.height,W,U,ee,q.page._exportingOrRendering,H]),l.default.useEffect(()=>()=>{ie&&ie.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ie)},[ie]),[ie||D,le]};e.useCornerRadiusAndCrop=C;const M=(q,D,B,U)=>{const W=x(q.clipSrc||""),[ee,ne]=(0,E.default)(W,"anonymous"),te=q.clipSrc?ne:"loaded";(0,e.useLoader)(te,q.clipSrc,q.id);const Z=l.default.useMemo(()=>{if(D&&ee)return p()},[D,ee]);function ae(){var H;if(!ee||!D||!D.width||!D.height||!ee||!ee.width||!ee.height||!Z)return;const J=p(),ie=Math.max(q.width/ee.width*B,q.height/ee.height*B);J.width=ee.width*ie,J.height=ee.height*ie,(H=J.getContext("2d"))===null||H===void 0||H.drawImage(ee,0,0,J.width,J.height),Z.width=Math.max(D.width,1),Z.height=Math.max(D.height,1);const le=Z.getContext("2d");le&&(le.save(),le.drawImage(J,0,0,D.width,D.height),_.default.Util.releaseCanvas(J),le.globalCompositeOperation="source-in",le.drawImage(D,0,0,Z.width,Z.height),le.restore())}return l.default.useLayoutEffect(()=>{ae()},[Z,D,ee,q.width,q.height,B,...U]),[q.clipSrc&&ee?Z:D,ae]},k=p(),A=(0,s.observer)(({element:q})=>{const D=Math.min(30,q.width/4,q.height/4),B=l.default.useRef(null);return l.default.useEffect(()=>{const U=B.current;if(!U)return;const W=new _.default.Animation(ee=>{U.rotate(((ee==null?void 0:ee.timeDiff)||0)/2)},U.getLayer());return W.start(),()=>{W.stop()}}),l.default.createElement(f.Group,{x:q.a.x,y:q.a.y,rotation:q.a.rotation,listening:!1,opacity:q.a.opacity,hideInExport:!q.showInExport},l.default.createElement(f.Rect,{width:q.width,height:q.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(f.Arc,{ref:B,x:q.width/2,y:q.height/2,fill:"white",outerRadius:Math.abs(D),innerRadius:Math.max(1,D-5),angle:270}))}),L=(0,s.observer)(({element:q})=>{const D="Can not load the video...",B=Math.max(10,Math.min(30,q.width/25));return l.default.createElement(f.Group,{x:q.a.x,y:q.a.y,rotation:q.a.rotation,listening:!1,opacity:q.a.opacity,hideInExport:!q.showInExport},l.default.createElement(f.Rect,{width:q.width,height:q.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(f.Text,{text:D,fontSize:B,width:q.width,height:q.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});function z(q,D,B){const U=l.default.useRef("loading"),W=l.default.useRef(null),[ee,ne]=l.default.useState(0),te=l.default.useRef(),Z=l.default.useRef(),ae=l.default.useRef();return te.current===q&&Z.current===D&&ae.current===B||(U.current="loading",W.current=void 0,te.current=q,Z.current=D,ae.current=B),l.default.useLayoutEffect(function(){if(q){var H=document.createElement("video");return H.addEventListener("canplay",J),H.addEventListener("error",ie),D&&(H.crossOrigin=D),B&&(H.referrerpolicy=B),H.src=q,H.load(),function(){H.removeEventListener("canplay",J),H.removeEventListener("error",ie)}}function J(){U.current="loaded",W.current=H,W.current.currentTime=0,ne(Math.random()),W.current.removeEventListener("canplay",J)}function ie(le){U.current="failed",W.current=void 0,ne(Math.random())}},[q,D,B]),[W.current,U.current]}let Y=z;const $=q=>{Y=q};e.setVideoLoaderHook=$;const X=(q,D,B)=>{const U=l.default.useRef(),W=()=>{var ee;(ee=U.current)===null||ee===void 0||ee.call(U),U.current=void 0};l.default.useEffect(()=>W,[]),l.default.useLayoutEffect(()=>{const ee=D.slice(0,200),ne=`video with id ${B} url: ${ee}`;q!=="loading"||U.current||(U.current=(0,b.incrementLoader)(ne)),q!=="loading"&&W(),q==="failed"&&(0,b.triggerLoadError)(ne)},[q])};e.useLoader=X,e.VideoElement=(0,s.observer)(({element:q,store:D})=>{var B;const[U,W]=l.default.useState(!1),ee=l.default.useRef(null),ne=l.default.useRef(null),[te,Z]=l.default.useState(!1),ae=D.selectedShapes.indexOf(q)>=0,[H,J]=l.default.useState(!1),[ie,le]=Y(q.src,"anonymous"),ue=D.activePage===q.page;(0,e.useLoader)(le,q.src,q.id),ie&&(ie.width=ie.videoWidth,ie.height=ie.videoHeight,ie.playsInline=!0);const he=ie||k;l.default.useEffect(()=>{ie&&D.history.ignore(()=>{q.set({duration:1e3*ie.duration})})},[ie]),l.default.useEffect(()=>{var Ve;if(!ie)return;const at=D.animatedElementsIds,bt=(!at.length||at.includes(q.id))&&D.isPlaying,Ot=ue&&(bt||H);if(!Ot)return void ie.pause();Ot&&(ie.currentTime=q.startTime*ie.duration,ie.play());const je=new _.default.Animation(()=>{lt()},(Ve=ee.current)===null||Ve===void 0?void 0:Ve.getLayer());je.start();const Ze=()=>{J(!1),ie.currentTime=q.startTime*ie.duration},ct=()=>{ie.currentTime>=q.endTime*ie.duration&&(ie.pause(),ie.currentTime=q.startTime*ie.duration,J(!1))};return ie.addEventListener("ended",Ze),ie.addEventListener("timeupdate",ct),()=>{ie.pause(),je.stop(),ie.removeEventListener("ended",Ze),ie.removeEventListener("timeupdate",ct)}},[ie,H,D.isPlaying,ue]),l.default.useEffect(()=>{ie&&(ie.volume=q.volume)},[ie,q.volume]);const ye=l.default.useRef();l.default.useEffect(()=>{const Ve=(0,c.autorun)(()=>{var at,bt;if(ie){const Ot=D.animatedElementsIds;if(Ot.length&&!Ot.includes(q.id))return;const je=(D.currentTime-q.page.startTime)%q.duration;if(Math.abs(1e3*ie.currentTime-je)>500||!D.isPlaying){const Ze=je/1e3;Ze!==ie.currentTime&&(ie.currentTime=Ze),ie.readyState!==4&&!D.isPlaying&&!ye.current&&(ye.current=(0,b.incrementLoader)(`video ${q.id}`))}lt(),(bt=(at=ee.current)===null||at===void 0?void 0:at.getLayer())===null||bt===void 0||bt.batchDraw()}});return()=>{Ve(),ye.current&&(ye.current(),ye.current=null)}},[D,ie]),l.default.useEffect(()=>{if(!ie)return;const Ve=()=>{var bt,Ot;ie.readyState!==4&&q.page._exportingOrRendering||ye.current&&(lt(),(Ot=(bt=ee.current)===null||bt===void 0?void 0:bt.getLayer())===null||Ot===void 0||Ot.batchDraw(),ye.current(),ye.current=null)};let at;return q.page._exportingOrRendering&&(at=setInterval(Ve,50)),ie.addEventListener("timeupdate",Ve),ie.addEventListener("canplay",Ve),()=>{clearInterval(at),ie.removeEventListener("timeupdate",Ve),ie.removeEventListener("canplay",Ve)}},[q.page._exportingOrRendering,ie,q.id,b.incrementLoader]);let{cropX:Ce,cropY:pe,cropWidth:fe,cropHeight:ve}=q;le!=="loaded"&&(Ce=pe=0,fe=ve=1);const xe=he.width*fe,Te=he.height*ve,ce=q.width/q.height;let me,Oe;const Ne=xe/Te,tt=q.type==="svg";tt?(me=xe,Oe=Te):ce>=Ne?(me=xe,Oe=xe/ce):(me=Te*ce,Oe=Te);const rt={x:he.width*Ce,y:he.height*pe,width:me,height:Oe},He=(B=q.cornerRadius)!==null&&B!==void 0?B:0,[$e,Xe]=(0,e.useCornerRadiusAndCrop)(q,he,rt,D._elementsPixelRatio,He,U||q._cropModeEnabled||q.type==="svg");let[De,Ye]=M(q,$e,D._elementsPixelRatio,[rt,He,D._elementsPixelRatio]);function lt(){Xe(),Ye()}const wt=Math.max(q.width/me,q.height/Oe);l.default.useEffect(()=>{var Ve;if(!q._cropModeEnabled)return;const at=(Ve=ee.current)===null||Ve===void 0?void 0:Ve.getStage();function bt(je){q._cropModeEnabled&&je.target!==ne.current&&q.toggleCropMode(!1)}function Ot(je){q._cropModeEnabled&&je.target.parentNode!==at.content&&q.toggleCropMode(!1)}return document.body.addEventListener("click",Ot),at==null||at.on("click",bt),at==null||at.on("tap",bt),()=>{document.body.removeEventListener("click",Ot),document.body.removeEventListener("touchstart",Ot),at==null||at.off("click",bt),at==null||at.off("click",bt)}},[q._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(U||q._cropModeEnabled))return(0,g.applyFilter)(ee.current,q),(0,c.autorun)(()=>{(0,g.applyFilter)(ee.current,q)},{delay:100})},[he,U,fe,ve,q._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Ve;U||q._cropModeEnabled?(Ve=ee.current)===null||Ve===void 0||Ve.clearCache():(0,g.applyFilter)(ee.current,q)},[U,q.width,q.height,q._cropModeEnabled]),l.default.useEffect(()=>{(0,g.applyFilter)(ee.current,q)},[q.shadowEnabled,q.shadowBlur,q.cornerRadius,q.shadowColor,q.shadowOffsetX,q.shadowOffsetY,q.shadowOpacity]);const zt=l.default.useRef(null),_e=l.default.useRef(null),Se=l.default.useRef(null);l.default.useLayoutEffect(()=>{q._cropModeEnabled&&(_e.current.nodes([zt.current]),Se.current.nodes([ne.current]))},[q._cropModeEnabled]);const xt=Ve=>{Math.round(Ve.target.x())>0&&(Ve.target.x(0),Ve.target.scaleX(1)),Math.round(Ve.target.y())>0&&(Ve.target.y(0),Ve.target.scaleY(1));const at=Ve.target.width()*Ve.target.scaleX(),bt=Ve.target.height()*Ve.target.scaleY(),Ot=Math.min(1,me/at),je=Math.min(1,Oe/bt),Ze=1-Ot,ct=Math.min(Ze,Math.max(0,Math.round(-Ve.target.x())/at)),Ie=1-je,_t=Math.min(Ie,Math.max(0,Math.round(-Ve.target.y())/bt));Ve.target.setAttrs({x:-ct*he.width,y:-_t*he.height,scaleX:1,scaleY:1}),q.set({cropX:ct,cropY:_t,cropWidth:Ot,cropHeight:je})},ht=()=>{q.type!=="svg"&&q.contentEditable&&setTimeout(()=>{q.toggleCropMode(!0)})},At=le==="loading",vt=le==="failed",Tr=!At&&!vt,Pr=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),tr=Tr?q.a.opacity:0;(0,O.useFadeIn)(ee,tr);const mr=q.selectable||D.role==="admin",Pn=(0,h.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,At&&l.default.createElement(A,{element:q}),vt&&l.default.createElement(L,{element:q}),l.default.createElement(f.Image,{ref:ee,name:"element",id:q.id,image:De,x:q.a.x,y:q.a.y,width:q.a.width||1,height:q.a.height||1,rotation:q.a.rotation,opacity:tr,shadowEnabled:q.shadowEnabled,shadowBlur:q.shadowBlur,shadowOffsetX:q.shadowOffsetX,shadowOffsetY:q.shadowOffsetY,shadowColor:q.shadowColor,shadowOpacity:q.shadowOpacity,customCrop:rt,listening:mr,draggable:Pn?q.draggable&&ae:q.draggable,preventDefault:!Pn||ae,hideInExport:!q.showInExport,onMouseEnter:()=>{Z(!0)},onMouseLeave:()=>{Z(!1)},onDragMove:Ve=>{q.set({x:Ve.target.x(),y:Ve.target.y()})},onDragEnd:Ve=>{q.set({x:Ve.target.x(),y:Ve.target.y()})},onDblClick:ht,onDblTap:ht,onTransformStart:()=>{W(!0),Pr.current={cropX:q.cropX,cropY:q.cropY,cropWidth:q.cropWidth,cropHeight:q.cropHeight}},onTransform:Ve=>{var at;const bt=Ve.currentTarget,Ot=Math.abs(bt.scaleX()-1)<1e-7?1:bt.scaleX(),je=Math.abs(bt.scaleY()-1)<1e-7?1:bt.scaleY();bt.scaleX(1),bt.scaleY(1);const Ze=(at=Ve.target.getStage())===null||at===void 0?void 0:at.findOne("Transformer"),ct=1-me/he.width,Ie=Math.min(ct,Math.max(0,q.cropX)),_t=1-Oe/he.height,Fe=Math.min(_t,Math.max(0,q.cropY)),mt=Ze.getActiveAnchor(),ir=!(mt.indexOf("middle")>=0||mt.indexOf("center")>=0),Vt=!ir&&Ot<1&&Pr.current.cropHeight>Oe/he.height;let pn=ir?q.cropWidth:q.cropWidth*Ot;Vt&&(pn=q.cropWidth);const Lr=!ir&&je<1&&Pr.current.cropWidth>me/he.width;let et=ir?q.cropHeight:q.cropHeight*je;Lr&&(et=q.cropHeight),tt&&(pn=q.cropWidth,et=q.cropHeight),q.set({cropX:Ie,cropY:Fe,x:bt.x(),y:bt.y(),width:bt.width()*Ot,height:bt.height()*je,rotation:Ve.target.rotation(),cropWidth:Math.min(pn,1-Ie),cropHeight:Math.min(et,1-Fe)})},onTransformEnd:Ve=>{const at=Ve.currentTarget;q.set({width:at.width(),height:at.height(),x:at.x(),y:at.y(),rotation:Ve.target.rotation(),cropWidth:me/he.width,cropHeight:Oe/he.height}),W(!1)}}),l.default.createElement(f.Rect,{x:q.a.x,y:q.a.y,width:Math.max(q.a.width-q.borderSize,0),height:Math.max(q.a.height-q.borderSize,0),opacity:tr,offsetX:-q.borderSize/2,offsetY:-q.borderSize/2,stroke:q.borderColor,strokeWidth:q.borderSize,listening:!1,visible:!!q.borderSize,rotation:q.rotation,cornerRadius:Math.max(0,He-q.borderSize),hideInExport:!q.showInExport}),!D.isPlaying&&l.default.createElement(f.Image,{image:H?T:N,x:q.a.x,y:q.a.y,offsetX:-q.a.width/2+15/D.scale,offsetY:-q.a.height/2+15/D.scale,rotation:q.a.rotation,width:30/D.scale,height:30/D.scale,hideInExport:!0,onClick:()=>J(!H),onTap:()=>J(!H)}),q._cropModeEnabled&&l.default.createElement(S.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(f.Rect,{x:-window.innerWidth/D.scale,y:-window.innerWidth/D.scale,width:window.innerWidth/D.scale*3,height:window.innerWidth/D.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(f.Image,{listening:!1,image:De,x:q.a.x,y:q.a.y,width:q.a.width,height:q.a.height,rotation:q.a.rotation,shadowEnabled:q.shadowEnabled,shadowBlur:q.shadowBlur}),l.default.createElement(f.Group,{x:q.a.x,y:q.a.y,rotation:q.a.rotation,scaleX:wt,scaleY:wt},l.default.createElement(f.Image,{image:he,ref:ne,opacity:.4,draggable:!0,x:-q.cropX*he.width,y:-q.cropY*he.height,onDragMove:xt,onTransform:xt}),l.default.createElement(f.Transformer,{ref:Se,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ve,at)=>at.width<5||at.height<5?Ve:at,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(f.Rect,{width:me,height:Oe,ref:zt,listening:!1,onTransform:Ve=>{Ve.target.x()<-q.cropX*he.width-1e-9&&(Ve.target.x(-q.cropX*he.width),Ve.target.scaleX(1)),Ve.target.y()<-q.cropY*he.height-1e-9&&(Ve.target.y(-q.cropY*he.height),Ve.target.scaleY(1));const at=Math.min(1,Math.max(0,q.cropX+Ve.target.x()/he.width)),bt=Math.min(1,Math.max(0,Ve.target.y()/he.height+q.cropY)),Ot=Ve.target.width()*Ve.target.scaleX(),je=Ve.target.height()*Ve.target.scaleY(),Ze=Math.min(1-at,Ot/he.width),ct=Math.min(1-bt,je/he.height),Ie=Ve.target.getAbsolutePosition(Ve.target.getParent().getParent());Ve.target.scale({x:1,y:1}),Ve.target.position({x:0,y:0}),q.set({x:Ie.x,y:Ie.y,cropX:at,cropY:bt,cropWidth:Ze,cropHeight:ct,width:Math.min(Ot*wt,he.width*(1-at)*wt),height:Math.min(je*wt,he.height*(1-bt)*wt)})}}),l.default.createElement(f.Transformer,{ref:_e,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ve,at)=>at.width<5||at.height<5?Ve:at,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2,visible:q.resizable}))),(te||ae)&&l.default.createElement(w.Highlighter,{element:q}))})}(Ca)),Ca}var bd={},v1={},m3;function Qv(){return m3||(m3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0,e.starPath=l,e.diamondPath=s,e.pentagonPath=c,e.hexagonPath=f,e.speechBubblePath=_,e.crossPath=S,e.subTypeToPathDataFunc=w,e.figureToSvg=y;const i=({width:v,height:g,cornerRadius:O})=>{if(O>0){const h=Math.min(O,v/2,g/2);return`M 0 ${h} A ${h} ${h} 0 0 1 ${h} 0 L ${v-h} 0 A ${h} ${h} 0 0 1 ${v} ${h} L ${v} ${g-h} A ${h} ${h} 0 0 1 ${v-h} ${g} L ${h} ${g} A ${h} ${h} 0 0 1 0 ${g-h} Z`}return`M 0 0 L ${v} 0 L ${v} ${g} L 0 ${g} Z`};e.rectData=i;const t=({width:v,height:g})=>`M ${v/2} 0 L ${v} ${g} L 0 ${g} Z`;e.triangleData=t;const r=({width:v,height:g})=>`M 0 0 L ${v} 0 L 0 ${g} Z`;e.rightTriangleData=r;const a=({width:v,height:g})=>`M ${v/2} ${g/2} m -${v/2}, 0 a ${v/2},${g/2} 0 1,0 ${v},0 a ${v/2},${g/2} 0 1,0 -${v},0`;function l({width:v,height:g}){const O=v/2,h=g/2,p=v/2,m=g/2,x=p/2,N=m/2;let T="",I=Math.PI/5;for(let R=0;R<10;R++){const C=R%2==0?m:N,M=O+(R%2==0?p:x)*Math.sin(R*I),k=h-C*Math.cos(R*I);R===0?T=`M ${M} ${k}`:T+=` L ${M} ${k}`}return T+" Z"}function s({width:v,height:g}){const O=v/2,h=g/2;return`M ${O} 0 L ${v} ${h} L ${O} ${g} L 0 ${h} Z`}function c({width:v,height:g}){const O=v/2,h=g/2,p=v/2,m=g/2;let x="",N=2*Math.PI/5;for(let T=0;T<5;T++){const I=m,R=O+p*Math.sin(T*N),C=h-I*Math.cos(T*N);T===0?x=`M ${R} ${C}`:x+=` L ${R} ${C}`}return x+" Z"}function f({width:v,height:g}){const O=v/2,h=g/2,p=v/2,m=g/2;let x="",N=2*Math.PI/6;for(let T=0;T<6;T++){const I=m,R=O+p*Math.sin(T*N),C=h-I*Math.cos(T*N);T===0?x=`M ${R} ${C}`:x+=` L ${R} ${C}`}return x+" Z"}function E({path:v,aspectRatio:g,width:O,height:h}){return{path:v,scaleX:O/g.width,scaleY:h/g.height}}function _({width:v,height:g}){const O=.1*Math.min(v,g),h=.2*v,p=.2*g,m=.5*v;let x=`M ${O},0`;return x+=" H "+(v-O),x+=` A ${O},${O} 0 0 1 ${v},${O}`,x+=" V "+(g-O-p),x+=` A ${O},${O} 0 0 1 ${v-O},${g-p}`,x+=` H ${m+h/2}`,x+=` L ${m},${g}`,x+=` L ${m-h/2},${g-p}`,x+=` H ${O}`,x+=` A ${O},${O} 0 0 1 0,${g-O-p}`,x+=` V ${O}`,x+=` A ${O},${O} 0 0 1 ${O},0`,x+=" Z",x}function S({width:v,height:g}){const O=.3*v,h=.3*g,p=v/2,m=g/2,x=p-O/2,N=p+O/2,T=m-h/2,I=m+h/2;let R=`M ${x},0 `;return R+=`H ${N} `,R+=`V ${T} `,R+=`H ${v} `,R+=`V ${I} `,R+=`H ${N} `,R+=`V ${g} `,R+=`H ${x} `,R+=`V ${I} `,R+="H 0 ",R+=`V ${T} `,R+=`H ${x} `,R+="V 0 ",R+="Z",R}function w(v){return e.TYPES[v]||e.rectData}function b(v,g){const{width:O,height:h,fill:p,stroke:m,strokeWidth:x,dash:N}=v,T=(N||[]).map(k=>k*x);let I=g(v),R=1,C=1;typeof I!="string"&&(R=I.scaleX,C=I.scaleY,I=I.path);const M=`clip-${v.id||Math.random()}`;return`
|
|
240
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${O}" height="${h}">
|
|
241
|
-
<defs>
|
|
242
|
-
<clipPath id="${M}">
|
|
243
|
-
<path d="${I}" />
|
|
244
|
-
</clipPath>
|
|
245
|
-
</defs>
|
|
246
|
-
|
|
247
|
-
<!-- Path for the fill -->
|
|
248
|
-
<path d="${I}" fill="${p}" transform="scale(${R}, ${C})"/>
|
|
249
|
-
|
|
250
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
251
|
-
<path d="${I}" fill="none" stroke="${m}" stroke-width="${2*x}" clip-path="url(#${M})" transform="scale(${R}, ${C})" stroke-dasharray="${T.join(" ")}"/>
|
|
252
|
-
</svg>
|
|
253
|
-
`}function y(v){const{subType:g}=v,O=w(g);return O?b(v,O):(0,e.rectData)(v)}e.circleData=a,e.TYPES={rect:e.rectData,circle:e.circleData,star:l,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:s,pentagon:c,hexagon:f,speechBubble:_,cross:S,arc:({width:v,height:g})=>E({path:"M234 117C234 85.97 221.673 56.21 199.731 34.269C177.79 12.327 148.03 0 117 0C85.97 0 56.2103 12.327 34.2685 34.268C12.3268 56.21 0 85.97 0 117H117H234Z",aspectRatio:{width:234,height:117},width:v,height:g}),cloud:({width:v,height:g})=>E({path:"M216.41 57.006C216.961 54.084 217.249 51.069 217.249 47.986C217.249 21.4841 195.972 0 169.725 0C153.666 0 139.467 8.043 130.865 20.3575C122.606 13.3566 111.954 9.1402 100.327 9.1402C74.3322 9.1402 53.2123 30.2136 52.8094 56.364H52.8035C23.6407 56.364 0 80.235 0 109.682C0 139.129 23.6407 163 52.8035 163H208.197C237.359 163 261 139.129 261 109.682C261 83.056 241.672 60.99 216.41 57.006Z",aspectRatio:{width:261,height:163},width:v,height:g}),rightArrow:({width:v,height:g})=>{const O=.6*v;return`M 0 ${g/4} L ${O} ${g/4} L ${O} 0 L ${v} ${g/2} L ${O} ${g} L ${O} ${.75*g} L 0 ${.75*g} Z`},leftArrow:({width:v,height:g})=>{const O=.4*v;return`M ${v} ${g/4} L ${O} ${g/4} L ${O} 0 L 0 ${g/2} L ${O} ${g} L ${O} ${.75*g} L ${v} ${.75*g} Z`},downArrow:({width:v,height:g})=>{const O=.6*g;return`M ${v/4} 0 L ${v/4} ${O} L 0 ${O} L ${v/2} ${g} L ${v} ${O} L ${.75*v} ${O} L ${.75*v} 0 Z`},upArrow:({width:v,height:g})=>{const O=.4*g;return`M ${v/4} ${g} L ${v/4} ${O} L 0 ${O} L ${v/2} 0 L ${v} ${O} L ${.75*v} ${O} L ${.75*v} ${g} Z`},asterisk1:({width:v,height:g})=>E({path:"M45.5265 218.498C51.5466 222.87 58.5359 224.98 65.4742 224.98C75.916 224.98 86.221 220.2 92.853 211.217C92.872 211.198 92.89 211.178 92.907 211.157C92.923 211.136 92.939 211.115 92.954 211.094L92.977 211.061C92.993 211.039 93.008 211.017 93.023 210.996L116.491 178.725L139.959 210.996C139.982 211.031 140.006 211.058 140.029 211.088C140.04 211.102 140.05 211.116 140.061 211.132C151.115 226.188 172.355 229.505 187.473 218.515C202.608 207.526 205.992 186.278 195.074 171.104L195.05 171.066C195.03 171.034 195.014 171.01 194.989 170.985L171.572 138.696L209.512 126.346C227.334 120.545 237.129 101.305 231.33 83.476C225.532 65.648 206.315 55.8493 188.476 61.6334L150.537 73.933L150.52 34.0064C150.502 15.2594 135.248 0 116.508 0C97.768 0 82.514 15.2594 82.497 34.0234L82.463 73.916L44.5233 61.6163C44.5083 61.6163 44.49 61.613 44.4716 61.6078C44.4477 61.6014 44.4232 61.5918 44.4041 61.5823C26.5992 55.8664 7.45076 65.665 1.66886 83.46C-4.11314 101.254 5.61427 120.426 23.3511 126.278C23.3675 126.283 23.3822 126.289 23.3963 126.295L23.4588 126.319L23.4873 126.329L61.4098 138.679L37.9929 170.968C37.9844 170.985 37.9718 171.002 37.9591 171.019C37.9462 171.036 37.9336 171.053 37.9251 171.07C26.9903 186.244 30.3915 207.509 45.5265 218.498Z",aspectRatio:{width:233,height:225},width:v,height:g}),asterisk2:({width:v,height:g})=>E({path:"M46.0556 112L0 85.388L33.9456 26.6121L80.028 53.1781L80.054 0H147.946L147.972 53.1781L194.054 26.6121L228 85.388L181.944 112L228 138.612L194.054 197.388L147.972 170.822L147.946 224H80.054L80.028 170.822L33.9456 197.388L0 138.612L46.0556 112Z",aspectRatio:{width:228,height:224},width:v,height:g}),bookmark:({width:v,height:g})=>E({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:v,height:g}),butterfly:({width:v,height:g})=>E({path:"M94.5 100.713C91.935 150.916 50.703 190.909 0 191.493V0C50.703 0.5845 91.935 40.5767 94.5 90.78C97.031 41.2385 137.217 1.6407 187 0.0438004V191.45C137.217 189.853 97.031 150.255 94.5 100.713Z",aspectRatio:{width:187,height:192},width:v,height:g}),cylinder:({width:v,height:g})=>E({path:"M169 36.8497V218.15C169 238.502 131.168 255 84.5 255C37.832 255 0 238.502 0 218.15V36.8497C0 16.4982 37.832 0 84.5 0C131.168 0 169 16.4982 169 36.8497Z",aspectRatio:{width:169,height:255},width:v,height:g}),diamond2:({width:v,height:g})=>E({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:v,height:g}),door:({width:v,height:g})=>E({path:"M140 69.697C140 31.2044 108.66 0 70 0C31.34 0 0 31.2044 0 69.697V207H140V69.697Z",aspectRatio:{width:140,height:207},width:v,height:g}),drop1:({width:v,height:g})=>E({path:"M167 150.687C167 196.328 129.407 234 83.139 234C37.593 234 0 196.328 0 150.687C0 100.7 51.329 36.9474 83.139 0C114.948 39.1207 167 98.526 167 150.687Z",aspectRatio:{width:167,height:234},width:v,height:g}),drop2:({width:v,height:g})=>E({path:"M73 239C53.64 239 35.071 231.315 21.3812 217.634C7.691 203.954 0 185.4 0 166.054C0 136.091 13.8696 113.633 30.768 86.27C43.912 64.9877 58.888 40.7377 70.597 7.6816C71.281 5.7496 72.989 0 72.989 0C72.989 0 72.993 0.0124998 73 0.0363998C73.007 0.0124998 73.011 0 73.011 0C73.011 0 74.719 5.7496 75.403 7.6816C87.112 40.7377 102.088 64.9877 115.232 86.27C132.13 113.633 146 136.091 146 166.054C146 185.4 138.309 203.954 124.619 217.634C111.025 231.218 92.225 239 73 239Z",aspectRatio:{width:146,height:239},width:v,height:g}),explosion:({width:v,height:g})=>E({path:"M165.802 184.465L118.997 260L125.343 182.079L34.9058 219.45L99.164 159.817L0 163.792L78.538 134.373L0 74.7401L86.471 89.052V0L118.997 89.052L165.802 10.3364L149.143 97.798L217.368 29.419L165.802 112.905L245.927 81.101L165.802 143.914H261L165.802 184.465Z",aspectRatio:{width:261,height:260},width:v,height:g}),flag:({width:v,height:g})=>E({path:"M0 142.161C0 142.161 51.9956 118.626 103 137.469C159.992 158.525 206 141.31 206 141.31V11.1373C206 11.1373 160 28.3218 103.016 7.28273C52 -11.553 0 12.0974 0 12.0974V142.161Z",aspectRatio:{width:206,height:148},width:v,height:g}),flower:({width:v,height:g})=>E({path:"M135.351 66.1893C196.683 -5.00591 256.536 100.304 164.908 117.361C256.536 135.16 195.944 239.728 135.351 168.532C166.386 257.526 45.9394 256.785 76.975 168.532C15.643 239.728 -44.2109 135.16 47.4173 117.361C-44.9498 100.304 15.643 -4.26431 76.975 66.1893C45.2005 -22.0631 166.386 -22.0631 135.351 66.1893ZM105.793 104.012C113.183 104.012 119.833 109.945 119.833 117.361C119.833 124.777 113.183 131.452 105.793 131.452C98.404 131.452 92.492 124.777 92.492 117.361C92.492 109.945 98.404 104.012 105.793 104.012Z",aspectRatio:{width:212,height:235},width:v,height:g}),frame:({width:v,height:g})=>E({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:v,height:g}),heart1:({width:v,height:g})=>E({path:"M215.886 56.157C215.886 24.729 191.112 0 160.584 0C135.933 0 115.08 16.983 107.937 39.93C100.788 16.986 79.935 0.591 55.284 0.591C24.75 0.591 0 24.615 0 56.055C0 71.919 6.321 83.127 16.494 95.121L107.988 189.447L199.377 95.121C209.559 83.127 215.886 72.009 215.886 56.157Z",aspectRatio:{width:216,height:190},width:v,height:g}),home:({width:v,height:g})=>E({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:v,height:g}),home2:({width:v,height:g})=>E({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:v,height:g}),hourglass:({width:v,height:g})=>E({path:"M0.392782 0H187.607C193.014 43.3688 140.804 53.797 140.804 97.5C140.804 141.203 193.014 151.631 187.607 195H0.392782C-5.01452 151.631 47.196 141.203 47.196 97.5C47.196 53.797 -5.01452 43.3688 0.392782 0Z",aspectRatio:{width:188,height:195},width:v,height:g}),house:({width:v,height:g})=>E({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:v,height:g}),keyhole:({width:v,height:g})=>E({path:"M115 57.0494C115 25.5387 89.416 0 57.863 0C26.311 0 0.726898 25.5414 0.726898 57.0494C0.726898 78.652 12.759 97.451 30.505 107.136L0 219H114.845L84.448 107.524C102.608 97.962 115 78.959 115 57.0494Z",aspectRatio:{width:115,height:219},width:v,height:g}),kiss:({width:v,height:g})=>E({path:"M124.5 17.1468C80.036 -36.5162 0 52.9218 0 52.9218C0 52.9218 44.4643 120 124.5 120C204.536 120 249 52.9218 249 52.9218C249 52.9218 168.964 -36.5162 124.5 17.1468Z",aspectRatio:{width:249,height:120},width:v,height:g}),leaf:({width:v,height:g})=>E({path:"M204.414 0.0151567C204.414 0.0151567 206.837 93.9509 150.394 150.394C93.9507 206.837 0.0151569 204.413 0.0151569 204.413C0.0151569 204.413 -2.40835 110.478 54.0347 54.0349C110.478 -2.40834 204.414 0.0151567 204.414 0.0151567Z",aspectRatio:{width:205,height:205},width:v,height:g}),lightning1:({width:v,height:g})=>E({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:v,height:g}),lightning2:({width:v,height:g})=>E({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:v,height:g}),magnet:({width:v,height:g})=>E({path:"M88.402 0H0V67.669H88.402C105.271 67.669 118.957 81.308 118.957 98C118.957 114.689 105.271 128.331 88.402 128.331H0V196H88.402C142.747 196 187 152.072 187 98C187 43.9279 142.747 0 88.402 0Z",aspectRatio:{width:187,height:196},width:v,height:g}),mithosis:({width:v,height:g})=>E({path:"M150.996 136.45C137.141 128.926 117.559 128.7 103.532 135.896C93.843 140.867 82.875 143.67 71.2577 143.67C31.9033 143.67 0 111.508 0 71.835C0 32.161 31.9033 0 71.2577 0C83.467 0 94.959 3.0955 105.004 8.5504C118.859 16.0745 138.441 16.3 152.467 9.1038C162.157 4.1328 173.125 1.3303 184.742 1.3303C224.097 1.3303 256 33.492 256 73.165C256 112.839 224.097 145 184.742 145C172.533 145 161.041 141.905 150.996 136.45Z",aspectRatio:{width:256,height:145},width:v,height:g}),orangeRicky:({width:v,height:g})=>E({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:v,height:g}),party:({width:v,height:g})=>E({path:"M134.622 0L144.682 68.2539L174.415 5.9977L163.91 74.1846L210.671 23.4578L180.535 85.519L240.169 50.8289L193.079 101.25L260.29 85.679L200.43 119.98L269.245 124.911L201.934 140.044L266.237 165.04L197.456 159.661L251.535 202.5L187.396 177.086L226.445 233.962L172.646 190.771L193.197 256.631L154.518 199.501L154.743 268.492L134.622 202.5L114.501 268.492L114.727 199.501L76.0482 256.631L96.5985 190.771L42.7992 233.962L81.8489 177.086L17.7091 202.5L71.7885 159.661L3.0072 165.04L67.3112 140.044L0 124.911L68.8149 119.98L8.9545 85.679L76.1658 101.25L29.0753 50.8289L88.7105 85.519L58.5743 23.4578L105.335 74.1846L94.8305 5.9977L124.562 68.2539L134.622 0Z",aspectRatio:{width:270,height:269},width:v,height:g}),pillow:({width:v,height:g})=>E({path:"M176 0.00169945C157.812 16.9062 125.203 28.174 88.001 28.174C50.798 28.174 18.1881 16.9054 0 0V258.421C18.1882 241.516 50.798 230.248 88 230.248C125.202 230.248 157.812 241.516 176 258.421V0.00169945Z",aspectRatio:{width:176,height:259},width:v,height:g}),polygon:({width:v,height:g})=>E({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:v,height:g}),rainbow:({width:v,height:g})=>E({path:"M186.907 141H282C282 63.128 218.872 0 141 0C63.1278 0 0 63.128 0 141H95.093C95.093 115.646 115.646 95.093 141 95.093C166.354 95.093 186.907 115.646 186.907 141Z",aspectRatio:{width:282,height:141},width:v,height:g}),rhodeIsland:({width:v,height:g})=>E({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:v,height:g}),shell:({width:v,height:g})=>E({path:"M109 0C169.199 0 218 48.743 218 108.87C185.392 108.87 158.958 135.273 158.958 167.842C158.958 179.736 158.958 191 158.958 191H59.042C59.042 191 59.042 179.736 59.042 167.842C59.042 135.273 32.6077 108.87 0 108.87C0 48.743 48.8007 0 109 0Z",aspectRatio:{width:218,height:191},width:v,height:g}),shield1:({width:v,height:g})=>E({path:"M203.184 30.7277C142.457 30.7277 102.853 0 102.853 0C102.853 0 63.249 30.7277 3.05098 30.7277C3.05098 30.7277 -3.81372 128.209 3.05098 162.115C9.38758 193.902 102.853 249 102.853 249C102.853 249 196.319 193.902 203.184 162.115C209.52 128.738 203.184 30.7277 203.184 30.7277Z",aspectRatio:{width:206,height:249},width:v,height:g}),shield2:({width:v,height:g})=>E({path:"M0 12.9585C64.624 -4.3195 136.376 -4.3195 201 12.9585C201 51.0564 201 89.154 201 127.252C201 184.396 100.498 240 100.498 240C100.498 240 0 184.406 0 127.252C0 89.154 0 51.0564 0 12.9585Z",aspectRatio:{width:201,height:240},width:v,height:g}),skewedRectangle:({width:v,height:g})=>E({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:v,height:g}),softFlower:({width:v,height:g})=>E({path:"M109 0C80.073 0 56.6234 23.4498 56.6234 52.3766C56.6234 54.722 54.722 56.6234 52.3766 56.6234C23.4498 56.6234 0 80.073 0 109C0 137.927 23.4498 161.377 52.3766 161.377C54.722 161.377 56.6234 163.278 56.6234 165.623C56.6234 194.55 80.073 218 109 218C137.927 218 161.377 194.55 161.377 165.623C161.377 163.278 163.278 161.377 165.623 161.377C194.55 161.377 218 137.927 218 109C218 80.073 194.55 56.6234 165.623 56.6234C163.278 56.6234 161.377 54.722 161.377 52.3766C161.377 23.4498 137.927 0 109 0Z",aspectRatio:{width:218,height:218},width:v,height:g}),softStar:({width:v,height:g})=>E({path:"M130.424 3.17662C130.927 -1.05888 137.073 -1.05888 137.576 3.17662L141.792 38.7086C147.236 84.59 183.41 120.764 229.291 126.208L264.823 130.424C269.059 130.927 269.059 137.073 264.823 137.576L229.291 141.792C183.41 147.236 147.236 183.41 141.792 229.291L137.576 264.823C137.073 269.059 130.927 269.059 130.424 264.823L126.208 229.291C120.764 183.41 84.59 147.236 38.7086 141.792L3.17662 137.576C-1.05888 137.073 -1.05888 130.927 3.17662 130.424L38.7086 126.208C84.59 120.764 120.764 84.59 126.208 38.7086L130.424 3.17662Z",aspectRatio:{width:268,height:268},width:v,height:g}),stairs1:({width:v,height:g})=>E({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:v,height:g}),stairs2:({width:v,height:g})=>E({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:v,height:g}),teewee:({width:v,height:g})=>E({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:v,height:g}),blob1:({width:v,height:g})=>E({path:"M172.979 19.611C191.285 33.0858 204.505 54.442 210.861 78.5949C217.471 103.002 217.471 130.46 205.776 151.816C194.335 173.427 171.454 189.444 147.047 196.054C122.639 202.919 96.7069 200.631 75.3506 190.715C54.2486 180.546 37.7229 163.003 23.4855 142.155C9.5022 121.307 -2.19289 97.4087 0.349524 74.7813C3.14617 52.1538 19.9261 30.7976 40.2654 17.8313C60.6046 4.61077 84.5033 -0.474048 108.148 0.0344341C131.538 0.542916 154.928 6.13621 172.979 19.611Z",aspectRatio:{width:216,height:200},width:v,height:g}),blob10:({width:v,height:g})=>E({path:"M188.684 8.95173C205.601 24.3309 200.988 63.0866 191.453 99.3816C182.225 135.677 168.076 169.511 146.238 175.355C124.399 181.507 94.871 159.668 66.5733 143.059C37.9679 126.449 10.5929 115.068 2.59569 95.0754C-5.4015 75.0824 5.97912 46.1694 24.4342 30.4826C42.8893 14.7958 68.4188 12.0276 100.715 6.79864C132.704 1.5697 171.767 -6.42749 188.684 8.95173Z",aspectRatio:{width:200,height:177},width:v,height:g}),blob11:({width:v,height:g})=>E({path:"M137.368 29.4923C148.97 46.7605 146.542 72.1231 148.161 99.1046C149.779 126.086 155.715 154.956 144.113 174.383C132.781 193.81 103.911 203.793 80.4369 198.666C56.963 193.27 38.6156 173.034 28.3626 153.607C17.8398 134.181 15.4115 115.833 9.47555 91.5498C3.53961 67.2664 -5.63411 37.3169 4.61887 20.0488C15.1417 2.51078 45.0911 -1.80626 72.8821 0.622074C100.673 2.78059 126.036 12.2241 137.368 29.4923Z",aspectRatio:{width:152,height:200},width:v,height:g}),blob12:({width:v,height:g})=>E({path:"M158.391 17.923C172.491 28.5703 180.261 48.1384 187.743 70.5842C194.937 93.3177 202.419 118.641 194.649 138.785C187.167 158.928 164.146 173.317 138.535 184.54C112.923 196.05 84.4347 204.108 58.8235 197.777C33.2123 191.446 10.191 170.439 2.99688 146.267C-4.48504 121.807 3.57241 94.181 10.4788 68.282C17.0974 42.0953 22.565 17.6352 37.8166 7.27563C53.0682 -3.37171 78.1038 0.081487 100.837 2.67138C123.859 5.26127 144.29 7.27563 158.391 17.923Z",aspectRatio:{width:198,height:200},width:v,height:g}),blob13:({width:v,height:g})=>E({path:"M149.668 1.37595C170.663 5.22017 193.728 17.3442 198.755 34.7911C204.078 52.2379 191.363 75.3032 178.943 93.9329C166.819 112.563 154.99 126.757 140.501 145.386C126.011 164.312 108.86 187.673 92.5957 186.194C76.3317 185.011 60.9549 159.285 45.8737 140.655C30.4968 122.321 15.7114 110.788 7.43151 95.1157C-0.848339 79.4432 -2.32688 59.0392 3.5873 41.5924C9.50148 23.8498 23.1041 8.76868 38.7767 3.44592C54.745 -1.87685 73.3746 2.55879 91.7086 2.26308C110.338 2.26308 128.968 -2.17256 149.668 1.37595Z",aspectRatio:{width:200,height:187},width:v,height:g}),blob14:({width:v,height:g})=>E({path:"M137.838 28.6426C150.711 40.5617 165.014 46.5213 178.363 58.2021C191.474 69.8828 203.87 87.0464 198.864 99.6807C193.858 112.315 171.689 120.42 157.862 135.676C144.275 151.171 139.269 173.579 126.873 182.161C114.477 190.505 94.9294 185.022 76.8123 178.109C58.4568 171.196 41.5316 163.091 28.1822 150.456C14.5943 137.822 4.58225 120.42 1.24488 101.826C-2.09248 83.2322 1.00651 62.9697 13.8792 52.4809C26.7519 41.992 49.1598 41.0385 65.6083 30.788C82.0567 20.5376 92.0688 0.990158 103.034 0.0366268C113.762 -0.916905 125.204 16.9618 137.838 28.6426Z",aspectRatio:{width:200,height:187},width:v,height:g}),blob15:({width:v,height:g})=>E({path:"M185.203 1.52939C197.679 7.62217 200 32.2835 200 51.7223C200 71.1612 197.389 85.3777 197.679 100.175C198.259 114.681 201.741 129.768 198.259 143.114C194.778 156.46 184.623 168.356 171.567 173.868C158.801 179.671 143.134 179.091 130.368 174.739C117.312 170.387 106.867 162.263 86.8482 160.812C66.539 159.362 36.9454 164.294 18.9572 155.3C0.968966 146.306 -5.41395 123.095 5.03083 105.977C15.4756 88.5692 42.4579 77.5442 55.5139 59.5559C68.2798 41.8578 67.1192 17.4867 76.9837 9.6531C86.5581 2.10965 107.158 11.3939 128.627 9.6531C150.097 8.20244 172.728 -4.27327 185.203 1.52939Z",aspectRatio:{width:200,height:179},width:v,height:g}),blob16:({width:v,height:g})=>E({path:"M158.441 55.3221C167.253 80.2399 160.264 105.462 147.501 134.938C134.738 164.717 116.81 199.055 97.0576 199.967C77.3057 201.182 55.7305 168.668 34.4592 133.722C13.1879 99.0802 -7.77953 62.3112 2.85612 36.4818C13.4918 10.6523 56.0344 -3.93369 90.0685 0.928322C123.799 6.09421 149.324 30.7081 158.441 55.3221Z",aspectRatio:{width:163,height:200},width:v,height:g}),blob17:({width:v,height:g})=>E({path:"M168.917 36.7587C178.871 53.2457 175.138 76.5764 172.961 106.129C170.472 135.37 169.85 170.832 150.563 187.63C131.276 204.739 93.3252 203.495 65.0173 187.63C36.7095 172.077 18.0449 142.213 7.77943 107.373C-2.79714 72.2213 -4.35252 32.7147 14.312 14.0502C32.9765 -4.3033 72.1721 -1.50361 103.591 4.7179C135.32 10.6283 158.962 20.2717 168.917 36.7587Z",aspectRatio:{width:176,height:200},width:v,height:g}),blob18:({width:v,height:g})=>E({path:"M178.188 21.1464C193.012 36.3069 196.381 62.9219 198.739 88.1893C200.76 113.12 201.771 136.366 190.316 149.168C178.862 162.307 155.279 164.665 135.065 167.697C115.188 170.73 99.0168 174.098 72.4018 177.131C46.1237 180.163 9.40176 182.521 1.65309 168.371C-6.09559 154.221 15.4659 123.564 23.5515 92.9059C31.6371 62.2481 26.2467 31.2534 38.3751 15.4192C50.1665 -0.0781831 79.8136 -1.08888 107.776 0.595609C136.076 1.9432 163.028 5.64909 178.188 21.1464Z",aspectRatio:{width:200,height:180},width:v,height:g}),blob19:({width:v,height:g})=>E({path:"M148.621 13.3857C171.945 24.3818 194.937 41.3756 192.938 60.702C190.605 80.3615 163.282 101.687 149.953 123.346C136.958 145.005 137.958 166.664 128.295 174.661C118.631 182.325 98.3054 175.994 73.6476 181.991C48.9899 187.989 20.0004 205.983 11.0036 197.986C1.67366 189.989 12.6697 156.001 12.3365 131.343C12.0033 106.685 0.340809 91.0243 0.00759636 75.0301C-0.325616 59.0359 10.3372 42.3753 25.3318 28.7135C39.9931 15.0518 58.9863 4.05578 80.3119 1.05687C101.638 -2.27526 124.962 2.38972 148.621 13.3857Z",aspectRatio:{width:194,height:200},width:v,height:g}),blob2:({width:v,height:g})=>E({path:"M140.464 18.6393C156.081 28.3718 169.887 39.9149 178.714 54.853C187.541 69.5649 191.389 87.6717 189.578 104.421C187.768 121.396 180.525 137.239 172.377 153.535C164.455 169.832 155.854 186.58 142.048 194.276C128.241 201.971 109.456 200.613 92.4804 197.671C75.2789 194.502 60.1144 189.749 45.1762 182.733C30.4644 175.716 16.2052 166.21 8.28346 153.083C0.361703 139.729 -1.44898 122.527 1.04072 106.91C3.30408 91.2931 9.64147 76.8076 15.9789 60.5114C22.0899 44.2153 28.201 26.1084 40.6495 14.7916C53.0979 3.24849 71.8838 -1.27823 89.7643 0.306124C107.871 1.66414 124.846 9.13322 140.464 18.6393Z",aspectRatio:{width:191,height:200},width:v,height:g}),blob20:({width:v,height:g})=>E({path:"M150.035 13.2464C157.376 24.9386 153.026 48.323 157.92 65.7254C163.087 83.1277 177.498 94.2761 182.392 108.415C187.287 122.555 182.392 139.957 173.147 156.272C163.63 172.587 149.763 187.814 132.089 195.155C114.414 202.225 93.2053 201.137 73.6276 194.611C54.3219 188.357 36.9196 176.937 25.7712 161.438C14.8947 145.667 10.5441 126.09 5.92163 105.696C1.57105 85.0311 -3.05145 63.5501 2.65869 45.0601C8.64075 26.5701 24.6835 11.0711 43.1735 4.54524C61.6635 -1.98064 82.6007 0.194657 102.722 1.01039C122.844 1.82613 142.421 1.55421 150.035 13.2464Z",aspectRatio:{width:185,height:200},width:v,height:g}),blob21:({width:v,height:g})=>E({path:"M152.611 0.184799C172.596 -0.723643 197.73 1.39606 199.85 13.8114C201.969 26.2268 181.075 48.9379 174.716 68.0151C168.357 87.0924 176.533 102.536 174.11 114.649C171.991 127.064 159.575 136.148 146.252 139.782C132.928 143.719 118.696 141.902 105.977 139.176C93.562 136.451 82.6606 132.212 63.2805 131.909C43.9004 131.606 16.0416 135.24 5.44306 125.853C-5.15543 116.465 1.50648 94.0572 10.2881 76.4939C18.7669 59.2335 29.6682 46.8182 38.7526 35.3112C48.1398 23.5015 56.3158 12.903 66.9143 8.36078C77.5128 4.12138 91.1394 6.24108 104.766 5.63546C118.696 4.72701 132.928 1.09324 152.611 0.184799Z",aspectRatio:{width:200,height:143},width:v,height:g}),blob22:({width:v,height:g})=>E({path:"M195.507 15.5715C206.818 33.1668 193.622 69.3001 190.166 101.663C186.71 134.34 193.308 163.561 181.996 178.014C170.685 192.153 141.464 191.525 114.443 189.326C87.1072 187.44 62.2852 183.67 40.6052 169.531C19.2395 155.077 1.6441 130.255 0.0730908 103.862C-1.18372 77.4694 13.898 49.5054 35.2638 31.91C56.6296 14.0004 84.5936 6.45958 116.328 2.37494C148.063 -1.70969 184.196 -2.3381 195.507 15.5715Z",aspectRatio:{width:200,height:191},width:v,height:g}),blob23:({width:v,height:g})=>E({path:"M135.742 9.14189C157.815 19.2326 179.258 38.4681 176.105 56.7576C172.951 74.7317 145.202 92.0751 127.858 109.734C110.83 127.077 104.523 145.052 87.4953 164.918C70.4672 184.468 42.7177 206.227 27.5816 198.343C12.4455 190.46 9.60747 153.566 6.45411 126.762C2.98542 100.274 -0.798607 84.1917 0.147399 67.1636C0.77807 50.4508 6.76944 32.4767 19.0675 20.8093C31.0503 9.14189 49.6551 3.78119 70.4672 1.2585C90.964 -1.26418 113.668 -0.633508 135.742 9.14189Z",aspectRatio:{width:177,height:200},width:v,height:g}),blob24:({width:v,height:g})=>E({path:"M165.663 24.3715C171.555 44.4059 158.003 76.2254 151.816 96.2598C145.923 116.294 147.691 124.544 148.28 135.445C148.575 146.346 147.396 159.309 140.62 170.8C133.549 181.996 120.88 191.424 104.381 196.432C87.8821 201.441 67.553 202.03 54.8841 192.602C41.9207 183.469 36.6174 164.023 25.1271 143.105C13.3421 122.187 -4.33535 99.7953 0.967891 85.0641C6.27113 70.6275 34.2604 63.8511 56.0626 48.5307C77.5702 33.5048 92.8907 9.93489 113.22 2.56928C133.843 -4.79633 159.77 4.04241 165.663 24.3715Z",aspectRatio:{width:168,height:200},width:v,height:g}),blob25:({width:v,height:g})=>E({path:"M180.115 1.256C192.651 2.1962 189.83 34.163 190.771 58.2947C191.711 82.4265 196.098 98.4099 198.606 117.214C201.113 136.018 201.426 157.642 189.204 165.791C177.294 173.626 153.163 167.671 135.299 163.91C117.749 159.836 106.466 157.956 85.7818 162.97C65.0974 168.298 35.3244 180.521 18.7143 174.253C1.79068 167.985 -1.97012 142.913 0.850478 120.975C3.67107 99.0367 13.0731 79.6059 18.4009 54.8473C23.7287 30.0888 24.9823 -0.310996 40.0254 0.00240332C54.7552 0.00240332 82.9612 31.029 111.167 31.029C139.373 31.029 167.579 0.315802 180.115 1.256Z",aspectRatio:{width:200,height:176},width:v,height:g}),blob26:({width:v,height:g})=>E({path:"M142.571 0.586925C159.976 3.39414 176.258 15.1844 184.96 30.9048C193.662 46.6253 194.224 66.8372 189.171 83.6805C183.837 100.805 172.327 114.56 163.064 129.157C153.8 143.755 146.501 158.914 134.43 173.231C122.359 187.828 105.516 201.303 89.5146 199.899C73.2327 198.776 58.0738 182.775 42.9148 169.862C28.0366 157.23 13.7198 147.685 6.42103 134.491C-0.877729 121.297 -1.15845 103.892 1.64876 88.4528C4.45598 72.7324 10.0704 58.6963 18.4921 47.4674C27.1944 36.2386 38.4233 27.8169 50.4943 22.2025C62.846 16.3073 75.7592 13.5001 91.1989 8.72785C106.919 4.23631 125.166 -1.93957 142.571 0.586925Z",aspectRatio:{width:193,height:200},width:v,height:g}),blob27:({width:v,height:g})=>E({path:"M112.602 54.9337C129.225 71.8646 155.391 78.9448 158.777 89.719C162.471 100.493 143.693 114.654 127.07 135.586C110.447 156.519 96.2866 184.224 71.0442 194.998C46.1096 205.465 10.4008 199.308 2.0893 178.375C-6.22223 157.443 12.5557 121.734 18.4045 92.1817C24.5612 62.6296 17.7889 38.9263 26.4082 21.9954C34.7197 5.06454 58.423 -5.40183 73.5069 2.9097C88.8986 10.9134 95.9788 38.0028 112.602 54.9337Z",aspectRatio:{width:160,height:200},width:v,height:g}),blob28:({width:v,height:g})=>E({path:"M125.281 68.5835C142.15 82.9923 165.344 90.021 181.862 108.998C198.028 127.624 207.516 158.902 192.405 166.634C177.293 174.716 137.581 159.605 112.629 156.442C87.326 152.928 77.1344 161.713 59.9142 165.579C43.0453 169.445 19.1478 168.391 11.7677 157.496C4.73907 146.25 14.2278 124.813 11.4163 94.2382C8.2534 63.6634 -6.85825 23.9514 3.68476 8.48836C14.2278 -7.32615 50.4254 1.10826 73.9715 16.2199C97.5175 31.683 108.412 54.1747 125.281 68.5835Z",aspectRatio:{width:200,height:169},width:v,height:g}),blob29:({width:v,height:g})=>E({path:"M162.987 10.2348C169.16 25.1809 154.864 58.6471 147.066 79.4417C139.268 100.236 138.293 108.359 134.719 114.532C131.47 120.706 125.297 124.93 119.448 143.45C113.6 161.97 107.426 194.461 98.004 199.335C88.5814 204.209 75.5849 181.14 55.7651 167.494C35.6203 153.522 8.65241 148.648 1.8292 135.327C-4.994 122.33 8.65241 100.561 20.0244 82.041C31.3964 63.5208 40.1691 48.2498 53.4906 35.5782C66.8122 22.9065 84.0326 13.159 106.452 6.33584C128.871 -0.812285 156.489 -4.71127 162.987 10.2348Z",aspectRatio:{width:165,height:200},width:v,height:g}),blob3:({width:v,height:g})=>E({path:"M158.095 64.2637C176.543 95.19 192.277 129.1 181.697 155.686C171.117 182.001 133.951 201.533 99.4982 199.905C64.7739 198.549 33.0338 176.032 15.4004 145.377C-2.23296 114.994 -5.75963 76.2002 10.2461 46.6303C26.2518 17.0605 61.5185 -3.557 89.732 0.512241C118.217 4.58149 139.377 33.0662 158.095 64.2637Z",aspectRatio:{width:186,height:200},width:v,height:g}),blob30:({width:v,height:g})=>E({path:"M146.076 34.4585C157.052 54.582 155.833 80.1936 164.675 100.622C173.212 121.355 191.201 136.905 189.372 149.711C187.542 162.212 165.285 171.969 146.99 175.018C129.001 178.372 114.671 174.713 103.39 175.018C92.1083 175.018 83.876 178.982 66.8015 186.299C49.7271 193.617 23.8105 204.288 14.3586 198.19C4.90665 191.787 11.6145 168.615 10.3949 147.882C8.87037 127.148 -0.581561 108.549 0.0282404 89.3407C0.638042 70.1319 11.6145 50.6182 28.384 32.934C44.8487 15.5546 67.4113 0.309578 89.974 0.00467694C112.537 -0.300224 135.099 14.335 146.076 34.4585Z",aspectRatio:{width:190,height:200},width:v,height:g}),blob31:({width:v,height:g})=>E({path:"M134.218 44.0392C153.568 36.4264 184.97 26.9105 195.755 33.2544C206.222 39.9156 195.755 62.1194 181.481 76.3933C166.89 90.35 148.175 96.0596 145.638 116.36C143.1 136.661 156.74 171.235 151.664 183.923C146.589 196.928 123.434 187.413 105.036 178.531C86.6388 169.967 73.3165 161.72 52.0643 158.548C30.812 155.058 1.62986 156.644 0.0438693 145.225C-1.22492 133.806 25.4197 109.382 29.2261 86.8609C32.7152 64.3398 13.6834 44.0392 11.7802 26.9105C9.877 9.46461 24.7853 -4.80928 42.5484 1.53467C59.9942 7.87863 79.9777 34.5232 93.6172 45.308C107.257 56.4099 114.869 51.3347 134.218 44.0392Z",aspectRatio:{width:200,height:191},width:v,height:g}),blob32:({width:v,height:g})=>E({path:"M200 100.339C200 149.831 145.763 197.966 95.5932 197.966C45.7627 197.966 0 149.831 0 100.339C0 50.8475 45.7627 0 95.5932 0C145.763 0 200 50.8475 200 100.339Z",aspectRatio:{width:200,height:198},width:v,height:g}),blob4:({width:v,height:g})=>E({path:"M183.427 38.712C198.21 63.2519 196.141 95.1833 189.341 126.523C182.836 157.863 171.305 188.908 150.609 197.482C130.208 205.76 100.642 192.16 69.8936 177.968C39.4405 164.072 7.80478 150.176 1.30024 128.593C-5.2043 107.01 13.718 77.7393 35.3012 51.7211C56.5888 25.9986 81.1287 3.23272 108.921 0.276112C137.009 -2.38484 168.349 14.4678 183.427 38.712Z",aspectRatio:{width:195,height:200},width:v,height:g}),blob5:({width:v,height:g})=>E({path:"M166.251 30.6913C183.816 48.5185 195.875 71.8512 199.021 98.8542C202.429 125.595 197.186 155.744 179.359 169.115C161.794 182.223 131.645 178.815 103.331 176.979C75.0171 175.144 48.8006 174.882 29.6625 161.512C10.7866 148.141 -0.748681 121.925 0.0378149 96.2326C0.824311 70.8025 14.1947 46.159 33.0706 28.3318C52.2087 10.5045 76.8522 -0.5064 100.971 0.0179307C125.091 0.804426 148.423 12.864 166.251 30.6913Z",aspectRatio:{width:200,height:179},width:v,height:g}),blob6:({width:v,height:g})=>E({path:"M149.146 50.5452C161.911 68.0278 171.901 81.9028 176.619 97.9979C181.336 114.37 180.781 133.241 173.011 149.891C165.519 166.541 151.366 180.693 133.051 189.851C114.736 199.008 92.2586 202.893 71.446 197.621C50.6334 192.348 30.9308 177.918 18.1658 158.216C5.12323 138.791 -0.981801 113.815 0.128204 87.7304C1.51571 61.6453 10.6733 34.1726 29.2658 17.5226C48.1359 1.14999 76.996 -4.40004 98.9186 3.6475C120.841 11.695 136.381 32.7851 149.146 50.5452Z",aspectRatio:{width:180,height:200},width:v,height:g}),blob7:({width:v,height:g})=>E({path:"M158.662 41.8295C178.593 57.8305 204.138 64.5677 213.402 79.7266C222.666 94.6047 215.367 118.466 203.015 135.028C190.383 151.871 172.698 161.977 156.416 168.434C140.134 174.89 124.975 177.697 104.483 185.277C83.9903 192.856 58.1642 205.208 44.9704 197.629C31.4959 190.33 31.2152 163.1 21.9514 138.116C12.9684 112.851 -4.71688 90.1132 1.17822 75.5158C7.35404 61.1991 36.8295 55.5847 58.7256 40.1452C80.9024 24.7056 95.4998 -0.278374 109.816 0.00234533C124.414 0.283064 138.45 25.8285 158.662 41.8295Z",aspectRatio:{width:218,height:200},width:v,height:g}),blob8:({width:v,height:g})=>E({path:"M153.53 11.0108C168.179 18.1858 181.931 29.5461 192.993 44.4939C203.755 59.4417 212.425 78.2759 210.631 96.5122C209.136 114.748 197.477 132.088 182.529 142.252C167.581 152.716 148.747 156.004 128.717 168.262C108.687 180.22 87.1622 201.147 69.8228 199.951C52.7823 198.456 39.6283 174.54 32.4533 153.015C25.2784 131.49 24.0826 112.357 16.6087 91.131C9.13477 70.2041 -4.31825 46.8855 1.36191 31.9377C7.04207 16.691 31.8554 9.51607 52.7823 5.33069C73.4103 0.846349 90.4507 -0.648433 106.594 0.248435C123.037 1.1453 138.882 4.13486 153.53 11.0108Z",aspectRatio:{width:211,height:200},width:v,height:g}),blob9:({width:v,height:g})=>E({path:"M140.289 20.2182C156.96 27.7956 176.661 32.0895 189.29 43.9608C201.667 55.5796 206.718 75.0283 202.424 91.6987C198.131 108.622 184.491 122.766 175.651 140.952C166.81 158.885 162.769 180.607 150.393 191.216C138.016 201.824 117.052 201.572 98.866 197.025C80.6802 192.479 65.2727 183.891 48.3497 175.808C31.4268 167.726 13.2409 160.148 5.1583 146.761C-2.67172 133.122 -0.398493 113.673 4.14797 96.7504C8.69444 80.08 15.5141 65.6828 23.3442 52.296C31.4268 38.6566 40.5197 25.775 52.6436 15.6717C65.0201 5.82101 80.6802 -1.50385 95.3299 0.264221C109.98 1.77971 123.619 12.6407 140.289 20.2182Z",aspectRatio:{width:204,height:200},width:v,height:g})}}(v1)),v1}var y3;function lP(){return y3||(y3=1,function(e){var i=bd&&bd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=i(Ar()),r=qi,a=mo,l=Qv(),s=nu(),c=ss(),f=Wd(),E={};e.FigureElement=(0,r.observer)(({element:_,store:S})=>{const w=_.selectable||S.role==="admin",b=(0,c.isTouchDevice)(),[y,v]=t.default.useState(!1),g=S.selectedShapes.indexOf(_)>=0,O=Math.min(_.strokeWidth,_.width/2,_.height/2),h=Math.max(0,Math.min(_.width/2,_.height/2,_.cornerRadius)),p=(0,f.useColor)(_,_.a.fill,"fill"),m=Object.assign(Object.assign({width:_.a.width,height:_.a.height},p),{cornerRadius:h,opacity:_.animated("opacity"),shadowEnabled:_.shadowEnabled,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,shadowColor:_.shadowColor,shadowOpacity:_.shadowOpacity,preventDefault:!b||g,hideInExport:!_.showInExport}),x=(0,f.useColor)(_,_.stroke,"stroke"),N=Object.assign(Object.assign({visible:O>0,x:O/2,y:O/2,width:_.a.width-O,height:_.a.height-O},x),{strokeWidth:O,cornerRadius:Math.max(0,h-O),dash:_.dash.map(C=>C*O),opacity:_.animated("opacity"),hideInExport:!_.showInExport,listening:!1}),T=(I=_.subType,E[I]||(E[I]=(R=(0,l.subTypeToPathDataFunc)(I),(0,r.observer)(({element:C,fillProps:M,strokeProps:k})=>{let A=R({width:C.a.width,height:C.a.height,cornerRadius:C.cornerRadius}),L=1,z=1;typeof A!="string"&&(L=A.scaleX,z=A.scaleY,A=A.path);const Y=t.default.useRef(null);return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Rect,{width:C.width,height:C.height,fill:"transparent"}),t.default.createElement(a.Path,Object.assign({},M,{ref:Y,data:A,scaleX:L,scaleY:z})),t.default.createElement(a.Group,{clipFunc:$=>{const X=Y.current;if(X){var q=X.dataArray;$.beginPath();for(var D=0;D<q.length;D++){var B=q[D].command,U=q[D].points;switch(B){case"L":$.lineTo(U[0],U[1]);break;case"M":$.moveTo(U[0],U[1]);break;case"C":$.bezierCurveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case"Q":$.quadraticCurveTo(U[0],U[1],U[2],U[3]);break;case"A":var W=U[0],ee=U[1],ne=U[2],te=U[3],Z=U[4],ae=U[5],H=U[6],J=U[7],ie=ne>te?ne:te,le=ne>te?1:ne/te,ue=ne>te?te/ne:1;$.translate(W,ee),$.rotate(H),$.scale(le,ue),$.arc(0,0,ie,Z,Z+ae,1-J),$.scale(1/le,1/ue),$.rotate(-H),$.translate(-W,-ee);break;case"z":$.closePath()}}}},scaleX:L,scaleY:z},t.default.createElement(a.Path,Object.assign({},k,{x:0,y:0,data:A,strokeWidth:2*k.strokeWidth,dash:k.dash.map($=>$)}))))}))),E[I]||a.Group);var I,R;return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Group,{id:_.id,x:_.a.x,y:_.a.y,rotation:_.a.rotation,opacity:_.a.opacity,listening:w,draggable:b?_.draggable&&g:_.draggable,name:"element",onMouseEnter:()=>{v(!0)},onMouseLeave:()=>{v(!1)},onDragMove:C=>{_.set({x:C.target.x(),y:C.target.y()})},onDragEnd:C=>{_.set({x:C.target.x(),y:C.target.y()})},onTransform:C=>{const M=C.target.scale();C.target.scaleX(1),C.target.scaleY(1),_.set({width:_.width*M.x,height:_.height*M.y,x:C.target.x(),y:C.target.y(),rotation:C.target.rotation()})}},t.default.createElement(T,{element:_,fillProps:m,strokeProps:N})),(y||g)&&t.default.createElement(s.Highlighter,{element:_}))})}(bd)),bd}var wd={},Zo={},m1={},Qo={},b3;function e_(){if(b3)return Qo;b3=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.loop=Qo.conditional=Qo.parse=void 0;var e=function r(a,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:s;if(Array.isArray(l))l.forEach(function(E){return r(a,E,s,c)});else if(typeof l=="function")l(a,s,c,r);else{var f=Object.keys(l)[0];Array.isArray(l[f])?(c[f]={},r(a,l[f],s,c[f])):c[f]=l[f](a,s,c,r)}return s};Qo.parse=e;var i=function(a,l){return function(s,c,f,E){l(s,c,f)&&E(s,a,c,f)}};Qo.conditional=i;var t=function(a,l){return function(s,c,f,E){for(var _=[],S=s.pos;l(s,c,f);){var w={};if(E(s,a,c,w),s.pos===S)break;S=s.pos,_.push(w)}return _}};return Qo.loop=t,Qo}var Wr={},w3;function t_(){if(w3)return Wr;w3=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.readBits=Wr.readArray=Wr.readUnsigned=Wr.readString=Wr.peekBytes=Wr.readBytes=Wr.peekByte=Wr.readByte=Wr.buildStream=void 0;var e=function(S){return{data:S,pos:0}};Wr.buildStream=e;var i=function(){return function(S){return S.data[S.pos++]}};Wr.readByte=i;var t=function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(w){return w.data[w.pos+S]}};Wr.peekByte=t;var r=function(S){return function(w){return w.data.subarray(w.pos,w.pos+=S)}};Wr.readBytes=r;var a=function(S){return function(w){return w.data.subarray(w.pos,w.pos+S)}};Wr.peekBytes=a;var l=function(S){return function(w){return Array.from(r(S)(w)).map(function(b){return String.fromCharCode(b)}).join("")}};Wr.readString=l;var s=function(S){return function(w){var b=r(2)(w);return S?(b[1]<<8)+b[0]:(b[0]<<8)+b[1]}};Wr.readUnsigned=s;var c=function(S,w){return function(b,y,v){for(var g=typeof w=="function"?w(b,y,v):w,O=r(S),h=new Array(g),p=0;p<g;p++)h[p]=O(b);return h}};Wr.readArray=c;var f=function(S,w,b){for(var y=0,v=0;v<b;v++)y+=S[w+v]&&Math.pow(2,b-v-1);return y},E=function(S){return function(w){for(var b=i()(w),y=new Array(8),v=0;v<8;v++)y[7-v]=!!(b&1<<v);return Object.keys(S).reduce(function(g,O){var h=S[O];return h.length?g[O]=f(y,h.index,h.length):g[O]=y[h.index],g},{})}};return Wr.readBits=E,Wr}var _3;function sP(){return _3||(_3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=e_(),t=t_(),r={blocks:function(w){for(var b=0,y=[],v=w.data.length,g=0,O=(0,t.readByte)()(w);O!==b&&O;O=(0,t.readByte)()(w)){if(w.pos+O>=v){var h=v-w.pos;y.push((0,t.readBytes)(h)(w)),g+=h;break}y.push((0,t.readBytes)(O)(w)),g+=O}for(var p=new Uint8Array(g),m=0,x=0;x<y.length;x++)p.set(y[x],m),m+=y[x].length;return p}},a=(0,i.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},function(S){var w=(0,t.peekBytes)(2)(S);return w[0]===33&&w[1]===249}),l=(0,i.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,i.conditional)({lct:(0,t.readArray)(3,function(S,w,b){return Math.pow(2,b.descriptor.lct.size+1)})},function(S,w,b){return b.descriptor.lct.exists}),{data:[{minCodeSize:(0,t.readByte)()},r]}]},function(S){return(0,t.peekByte)()(S)===44}),s=(0,i.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(w,b,y){return(0,t.readBytes)(y.text.blockSize)(w)}},r]},function(S){var w=(0,t.peekBytes)(2)(S);return w[0]===33&&w[1]===1}),c=(0,i.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(w,b,y){return(0,t.readString)(y.blockSize)(w)}},r]},function(S){var w=(0,t.peekBytes)(2)(S);return w[0]===33&&w[1]===255}),f=(0,i.conditional)({comment:[{codes:(0,t.readBytes)(2)},r]},function(S){var w=(0,t.peekBytes)(2)(S);return w[0]===33&&w[1]===254}),E=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,i.conditional)({gct:(0,t.readArray)(3,function(S,w){return Math.pow(2,w.lsd.gct.size+1)})},function(S,w){return w.lsd.gct.exists}),{frames:(0,i.loop)([a,c,f,l,s],function(S){var w=(0,t.peekByte)()(S);return w===33||w===44})}],_=E;e.default=_}(m1)),m1}var _d={},S3;function uP(){if(S3)return _d;S3=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.deinterlace=void 0;var e=function(t,r){for(var a=new Array(t.length),l=t.length/r,s=function(b,y){var v=t.slice(y*r,(y+1)*r);a.splice.apply(a,[b*r,r].concat(v))},c=[0,4,2,1],f=[8,8,4,2],E=0,_=0;_<4;_++)for(var S=c[_];S<l;S+=f[_])s(S,E),E++;return a};return _d.deinterlace=e,_d}var Sd={},E3;function cP(){if(E3)return Sd;E3=1,Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.lzw=void 0;var e=function(t,r,a){var l=4096,s=-1,c=a,f,E,_,S,w,b,y,T,v,g,N,O,I,R,M,C,h=new Array(a),p=new Array(l),m=new Array(l),x=new Array(l+1);for(O=t,E=1<<O,w=E+1,f=E+2,y=s,S=O+1,_=(1<<S)-1,v=0;v<E;v++)p[v]=0,m[v]=v;var N,T,I,R,C,M;for(N=T=I=R=C=M=0,g=0;g<c;){if(R===0){if(T<S){N+=r[M]<<T,T+=8,M++;continue}if(v=N&_,N>>=S,T-=S,v>f||v==w)break;if(v==E){S=O+1,_=(1<<S)-1,f=E+2,y=s;continue}if(y==s){x[R++]=m[v],y=v,I=v;continue}for(b=v,v==f&&(x[R++]=I,v=y);v>E;)x[R++]=m[v],v=p[v];I=m[v]&255,x[R++]=I,f<l&&(p[f]=y,m[f]=I,f++,(f&_)===0&&f<l&&(S++,_+=f)),y=b}R--,h[C++]=x[R],g++}for(g=C;g<c;g++)h[g]=0;return h};return Sd.lzw=e,Sd}var x3;function fP(){if(x3)return Zo;x3=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.decompressFrames=Zo.decompressFrame=Zo.parseGIF=void 0;var e=l(sP()),i=e_(),t=t_(),r=uP(),a=cP();function l(_){return _&&_.__esModule?_:{default:_}}var s=function(S){var w=new Uint8Array(S);return(0,i.parse)((0,t.buildStream)(w),e.default)};Zo.parseGIF=s;var c=function(S){for(var w=S.pixels.length,b=new Uint8ClampedArray(w*4),y=0;y<w;y++){var v=y*4,g=S.pixels[y],O=S.colorTable[g]||[0,0,0];b[v]=O[0],b[v+1]=O[1],b[v+2]=O[2],b[v+3]=g!==S.transparentIndex?255:0}return b},f=function(S,w,b){if(!S.image){console.warn("gif frame does not have associated image.");return}var y=S.image,v=y.descriptor.width*y.descriptor.height,g=(0,a.lzw)(y.data.minCodeSize,y.data.blocks,v);y.descriptor.lct.interlaced&&(g=(0,r.deinterlace)(g,y.descriptor.width));var O={pixels:g,dims:{top:S.image.descriptor.top,left:S.image.descriptor.left,width:S.image.descriptor.width,height:S.image.descriptor.height}};return y.descriptor.lct&&y.descriptor.lct.exists?O.colorTable=y.lct:O.colorTable=w,S.gce&&(O.delay=(S.gce.delay||10)*10,O.disposalType=S.gce.extras.disposal,S.gce.extras.transparentColorGiven&&(O.transparentIndex=S.gce.transparentColorIndex)),b&&(O.patch=c(O)),O};Zo.decompressFrame=f;var E=function(S,w){return S.frames.filter(function(b){return b.image}).map(function(b){return f(b,S.gct,w)})};return Zo.decompressFrames=E,Zo}var O3;function dP(){return O3||(O3=1,function(e){var i=wd&&wd.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const t=i(Ar()),r=qi,a=oa,l=mo,s=i(Hi()),c=fP(),f=nu(),E=J4(),_=Wv(),S=Kd(),w=tu(),b=ss();function y(){return document.createElement("canvas")}function v(p){const[m,x]=t.default.useState([]),[N,T]=t.default.useState(0),[I,R]=t.default.useState("loading"),[C,M]=t.default.useState({width:0,height:0});return t.default.useEffect(()=>{(async()=>{try{const k=await fetch(p),A=await k.arrayBuffer(),L=(0,c.parseGIF)(A),z=(0,c.decompressFrames)(L,!0),Y=L.lsd.width,$=L.lsd.height;M({width:Y,height:$});const X=z.map(D=>({patch:new Uint8ClampedArray(D.patch),delay:D.delay,width:D.dims.width,height:D.dims.height,left:D.dims.left,top:D.dims.top,disposalType:D.disposalType})),q=X.reduce((D,B)=>D+B.delay,0);x(X),T(q),R("loaded")}catch{R("failed")}})()},[p]),[m,N,C,I]}function g(p,m,x){const N=m.getContext("2d"),T=x.getContext("2d");if(!N||!T)return;p.disposalType===2&&N.clearRect(0,0,m.width,m.height),x.width=p.width,x.height=p.height;const I=T.createImageData(p.width,p.height);I.data.set(p.patch),T.putImageData(I,0,0),N.drawImage(x,p.left,p.top)}const O=(0,r.observer)(({element:p})=>{const m=Math.min(30,p.width/4,p.height/4),x=t.default.useRef(null);return t.default.useEffect(()=>{const N=x.current;if(!N)return;const T=new s.default.Animation(I=>{N.rotate(((I==null?void 0:I.timeDiff)||0)/2)},N.getLayer());return T.start(),()=>{T.stop()}},[]),t.default.createElement(l.Group,{x:p.a.x,y:p.a.y,rotation:p.a.rotation,listening:!1,opacity:p.a.opacity,hideInExport:!p.showInExport},t.default.createElement(l.Rect,{width:p.width,height:p.height,fill:"rgba(124, 173, 212, 0.8)"}),t.default.createElement(l.Arc,{ref:x,x:p.width/2,y:p.height/2,fill:"white",outerRadius:Math.abs(m),innerRadius:Math.max(1,m-5),angle:270}))}),h=(0,r.observer)(({element:p})=>{const m="Cannot load the GIF...",x=Math.max(10,Math.min(30,p.width/22));return t.default.createElement(l.Group,{x:p.a.x,y:p.a.y,rotation:p.a.rotation,listening:!1,opacity:p.a.opacity,hideInExport:!p.showInExport},t.default.createElement(l.Rect,{width:p.width,height:p.height,fill:"rgba(223, 102, 102, 0.8)"}),t.default.createElement(l.Text,{text:m,fontSize:x,width:p.width,height:p.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});e.GifElement=(0,r.observer)(({element:p,store:m})=>{var x;const[N,T]=t.default.useState(!1),[I,R]=t.default.useState(!1),C=m.selectedShapes.indexOf(p)>=0,M=t.default.useRef(null),k=t.default.useRef(),[A,L,z,Y]=v(p.src);(0,_.useImageLoader)(Y,p.src,p.id),t.default.useEffect(()=>(k.current=y(),()=>{k.current&&s.default.Util.releaseCanvas(k.current)}),[]),t.default.useEffect(()=>{if(Y==="loaded"&&k.current&&(k.current.width=z.width,k.current.height=z.height,A.length>0)){const J=k.current.getContext("2d");if(J){J.clearRect(0,0,z.width,z.height);const ie=document.createElement("canvas");g(A[0],k.current,ie)}}},[z,Y,A]),t.default.useEffect(()=>{if(!A.length||!k.current)return;const J=k.current;J.width=z.width,J.height=z.height;const ie=document.createElement("canvas"),le=J.getContext("2d");le&&le.clearRect(0,0,J.width,J.height);let ue=-1;g(A[0],J,ie),ee(),ue=0;const he=ye=>{const Ce=(pe=>{const fe=pe%L;let ve=0;for(let xe=0;xe<A.length;xe++)if(ve+=A[xe].delay,ve>fe)return xe;return 0})(ye);Ce!==ue&&(g(A[Ce],J,ie),ee(),M.current.getLayer().draw(),ue=Ce)};if(m.isPlaying||p.page._exportingOrRendering)return(0,a.autorun)(()=>{he(m.currentTime-p.page.startTime)});{const ye=window.setInterval(()=>{he(m.currentTime||performance.now())},16);return()=>{clearInterval(ye)}}},[m.isPlaying,A,L,p.page._exportingOrRendering]),t.default.useEffect(()=>{L&&m.history.ignore(()=>{p.set({duration:L})})},[L]);let{cropX:$,cropY:X,cropWidth:q,cropHeight:D}=p;Y!=="loaded"&&($=X=0,q=D=1);const B={x:z.width*$,y:z.height*X,width:z.width*q,height:z.height*D},U=(x=p.cornerRadius)!==null&&x!==void 0?x:0,[W,ee]=(0,E.useCornerRadiusAndCrop)(p,k.current,B,m._elementsPixelRatio,U,N||p._cropModeEnabled);t.default.useLayoutEffect(()=>{if(!N&&!p._cropModeEnabled&&M.current)return(0,S.applyFilter)(M.current,p),(0,a.autorun)(()=>{(0,S.applyFilter)(M.current,p)},{delay:100})},[k.current,N,q,D,p._cropModeEnabled,z.width,z.height]);const ne=Y==="loading",te=Y==="failed",Z=!ne&&!te?p.a.opacity:0;(0,w.useFadeIn)(M,Z);const ae=p.selectable||m.role==="admin",H=(0,b.isTouchDevice)();return t.default.createElement(t.default.Fragment,null,ne&&t.default.createElement(O,{element:p}),te&&t.default.createElement(h,{element:p}),t.default.createElement(l.Image,{ref:M,name:"element",id:p.id,image:W,x:p.a.x,y:p.a.y,width:p.a.width||1,height:p.a.height||1,rotation:p.a.rotation,opacity:Z,shadowEnabled:p.shadowEnabled,shadowBlur:p.shadowBlur,shadowOffsetX:p.shadowOffsetX,shadowOffsetY:p.shadowOffsetY,shadowColor:p.shadowColor,shadowOpacity:p.shadowOpacity,customCrop:B,listening:ae,draggable:H?p.draggable&&C:p.draggable,preventDefault:!H||C,hideInExport:!p.showInExport,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),onDragMove:J=>{p.set({x:J.target.x(),y:J.target.y()})},onDragEnd:J=>{p.set({x:J.target.x(),y:J.target.y()})},onTransformStart:()=>T(!0),onTransform:J=>{const ie=J.currentTarget,le=Math.abs(ie.scaleX()-1)<1e-7?1:ie.scaleX(),ue=Math.abs(ie.scaleY()-1)<1e-7?1:ie.scaleY();ie.scaleX(1),ie.scaleY(1),p.set({x:ie.x(),y:ie.y(),width:ie.width()*le,height:ie.height()*ue,rotation:ie.rotation()})},onTransformEnd:()=>T(!1)}),t.default.createElement(l.Rect,{x:p.a.x,y:p.a.y,width:Math.max(p.a.width-p.borderSize,0),height:Math.max(p.a.height-p.borderSize,0),opacity:Z,offsetX:-p.borderSize/2,offsetY:-p.borderSize/2,stroke:p.borderColor,strokeWidth:p.borderSize,listening:!1,visible:!!p.borderSize,rotation:p.rotation,cornerRadius:Math.max(0,U-p.borderSize),hideInExport:!p.showInExport}),(I||C)&&t.default.createElement(f.Highlighter,{element:p}))})}(wd)),wd}var P3;function hP(){return P3||(P3=1,function(e){var i=ud&&ud.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=v;const t=i(Ar()),r=qi,a=D4(),l=Wv(),s=aP(),c=oP(),f=J4(),E=lP(),_=dP(),S=mo,w=ls(),b=(0,r.observer)(O=>{const{element:h,store:p}=O,{children:m}=h,x=h.selectable||p.role==="admin";return t.default.createElement(S.Group,{opacity:h.opacity,listening:x,hideInExport:!h.showInExport},m.map(N=>t.default.createElement(g,Object.assign({},O,{key:N.id,store:p,element:N}))))}),y={text:a.TextElement,image:l.ImageElement,svg:l.ImageElement,line:c.LineElement,video:f.VideoElement,figure:E.FigureElement,group:b,gif:_.GifElement};function v(O,h){y[O]=h}const g=(0,r.observer)(O=>{let h=y[O.element.type];return O.element.type==="text"&&w.flags.htmlRenderEnabled&&(h=s.HTMLElement),O.element.visible&&h?t.default.createElement(h,Object.assign({},O)):null});e.default=g}(ud)),ud}var y1={},C3;function pP(){return C3||(C3=1,function(e){function i(t,r,a="scale"){const l=r.width/r.height;let s,c;l>=t.width/t.height?(s=t.width,c=t.width/l):(s=t.height*l,c=t.height);let f=0,E=0;return a==="left-top"?(f=0,E=0):a==="left-middle"?(f=0,E=(t.height-c)/2):a==="left-bottom"?(f=0,E=t.height-c):a==="center-top"?(f=(t.width-s)/2,E=0):a==="center-middle"?(f=(t.width-s)/2,E=(t.height-c)/2):a==="center-bottom"?(f=(t.width-s)/2,E=t.height-c):a==="right-top"?(f=t.width-s,E=0):a==="right-middle"?(f=t.width-s,E=(t.height-c)/2):a==="right-bottom"?(f=t.width-s,E=t.height-c):a==="scale"&&(f=0,E=0,s=t.width,c=t.height),{cropX:f,cropY:E,cropWidth:s,cropHeight:c}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=i}(y1)),y1}var Jo={},b1={},k3;function gP(){return k3||(k3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setAPI=e.iconscoutDownload=e.iconscoutList=e.svgapiDownload=e.svgapiList=e.unsplashDownload=e.unsplashList=e.textTemplateList=e.templateList=e.removeBackground=e.polotnoShapesList=e.getGoogleFontImage=e.getGoogleFontsListAPI=e.URLS=e.getAPI=e.API=e.URL=void 0;const i=Jv();e.URL="https://api.polotno.com",e.API=`${e.URL}/api`;const t=()=>e.URL+"/api";e.getAPI=t;const r={},a=(h,p)=>{r[h]||(r[h]=!0)};e.URLS={unsplashList:({query:h,page:p=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${h}&per_page=20&page=${p}&KEY=${(0,i.getKey)()}`,unsplashDownload:h=>`${(0,e.getAPI)()}/download-unsplash?id=${h}&KEY=${(0,i.getKey)()}`,svgapiList:({query:h,page:p=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${h}&page=${p}&per_page=20&KEY=${(0,i.getKey)()}`,svgapiDownload:h=>`${(0,e.getAPI)()}/download-svgapi?path=${h}&KEY=${(0,i.getKey)()}`,iconscoutList:({query:h,page:p=1})=>(a("iconscout"),`${(0,e.getAPI)()}/get-iconscout?query=${h}&page=${p}&KEY=${(0,i.getKey)()}`),iconscoutDownload:h=>(a("iconscout"),`${(0,e.getAPI)()}/download-iconscout?uuid=${h}&KEY=${(0,i.getKey)()}`),nounProjectList:({query:h,page:p=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${h}&page=${p}&KEY=${(0,i.getKey)()}`,nounProjectDownload:h=>`${(0,e.getAPI)()}/download-nounproject?id=${h}&KEY=${(0,i.getKey)()}`,templateList:({query:h,page:p=1,sizeQuery:m})=>`${(0,e.getAPI)()}/get-templates?${m}&query=${h}&per_page=30&page=${p}&KEY=${(0,i.getKey)()}`,googleFontsList:()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,i.getKey)()}`,googleFontImage:h=>{return`${e.URL}/google-fonts-previews/black/${p=h,m=" ",x="-",p.replace(new RegExp(m,"g"),x)}.png`;var p,m,x},textTemplateList:()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,i.getKey)()}`,removeBackground:()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,i.getKey)()}`,aiText:()=>`${(0,e.getAPI)()}/ai/text?KEY=${(0,i.getKey)()}`};const l=()=>e.URLS.googleFontsList();e.getGoogleFontsListAPI=l;const s=h=>e.URLS.googleFontImage(h);e.getGoogleFontImage=s;const c=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,i.getKey)()}`;e.polotnoShapesList=c;const f=()=>e.URLS.removeBackground();e.removeBackground=f;const E=h=>e.URLS.templateList(h);e.templateList=E;const _=()=>e.URLS.textTemplateList();e.textTemplateList=_;const S=h=>e.URLS.unsplashList(h);e.unsplashList=S;const w=h=>e.URLS.unsplashDownload(h);e.unsplashDownload=w;const b=h=>e.URLS.svgapiList(h);e.svgapiList=b;const y=h=>e.URLS.svgapiDownload(h);e.svgapiDownload=y;const v=h=>e.URLS.iconscoutList(h);e.iconscoutList=v;const g=h=>e.URLS.iconscoutDownload(h);e.iconscoutDownload=g;const O=(h,p)=>{e.URLS[h]=p};e.setAPI=O}(b1)),b1}var A3;function Jv(){return A3||(A3=1,function(e){var i=Jo&&Jo.__createBinding||(Object.create?function(m,x,N,T){T===void 0&&(T=N);var I=Object.getOwnPropertyDescriptor(x,N);I&&!("get"in I?!x.__esModule:I.writable||I.configurable)||(I={enumerable:!0,get:function(){return x[N]}}),Object.defineProperty(m,T,I)}:function(m,x,N,T){T===void 0&&(T=N),m[T]=x[N]}),t=Jo&&Jo.__setModuleDefault||(Object.create?function(m,x){Object.defineProperty(m,"default",{enumerable:!0,value:x})}:function(m,x){m.default=x}),r=Jo&&Jo.__importStar||function(){var m=function(x){return m=Object.getOwnPropertyNames||function(N){var T=[];for(var I in N)Object.prototype.hasOwnProperty.call(N,I)&&(T[T.length]=I);return T},m(x)};return function(x){if(x&&x.__esModule)return x;var N={};if(x!=null)for(var T=m(x),I=0;I<T.length;I++)T[I]!=="default"&&i(N,x,T[I]);return t(N,x),N}}();Object.defineProperty(e,"__esModule",{value:!0}),e.__=e.getKey=e.isCreditVisible=e.___=void 0,e.isKeyPaid=h,e.validateKey=p;const a=r(oa),l=gP(),s=ls(),c=a.observable({value:!1}),f=a.observable({value:"v1"}),E=()=>f.value;e.___=E;const _=()=>c.value;e.isCreditVisible=_;const S=a.action(()=>{c.value=!0});let w="";const b=()=>w||"";e.getKey=b;const y=5,v=3e3;navigator.userAgent.indexOf("Headless")>-1,navigator.userAgent.indexOf("Electron")>-1;let g=fetch;const O=m=>{g=m};async function h(m){for(let x=0;x<y;x++)try{const N=await g((0,l.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:m,site:location.host,skdVersion:"2.21.2"})});if(f.value=N.headers.get("x-api-version"),!m)return!1;if(N.status!==200){await new Promise(I=>setTimeout(I,v));continue}const T=await N.json();return T.is_valid,T.is_paid,T.is_domain_valid,(0,s.useRemoveBackground)(T.remove_background_enabled),T.is_paid||!1}catch{await new Promise(T=>setTimeout(T,v))}return!0}async function p(m,x){w=m,await h(m)&&!x||S()}e.__=O}(Jo)),Jo}var w1={},T3;function em(){return T3||(T3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0;const i=({px:l,unit:s="px",dpi:c})=>{switch(s){case"pt":default:return l;case"mm":return l/(c/25.4);case"cm":return l/(c/2.54);case"in":return l/c}};e.pxToUnit=i;const t=({px:l,precious:s=2,dpi:c=72,unit:f="px"})=>parseFloat((0,e.pxToUnit)({px:l,dpi:c,unit:f}).toFixed(s));e.pxToUnitRounded=t;const r=({unitVal:l,dpi:s,unit:c})=>l/(0,e.pxToUnit)({px:1,unit:c,dpi:s});e.unitToPx=r;const a=l=>{const s=parseFloat((0,e.pxToUnit)(l).toFixed(1));switch(l.unit){case"pt":return`${Math.round(s)}pt`;case"mm":return`${s}mm`;case"cm":return`${s}cm`;case"in":return`${s}in`;default:return`${Math.round(s)}px`}};e.pxToUnitString=a}(w1)),w1}var R3;function vP(){return R3||(R3=1,function(e){var i=Us&&Us.__rest||function(H,J){var ie={};for(var le in H)Object.prototype.hasOwnProperty.call(H,le)&&J.indexOf(le)<0&&(ie[le]=H[le]);if(H!=null&&typeof Object.getOwnPropertySymbols=="function"){var ue=0;for(le=Object.getOwnPropertySymbols(H);ue<le.length;ue++)J.indexOf(le[ue])<0&&Object.prototype.propertyIsEnumerable.call(H,le[ue])&&(ie[le[ue]]=H[le[ue]])}return ie},t=Us&&Us.__importDefault||function(H){return H&&H.__esModule?H:{default:H}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.useContextMenu=e.setTransformerStyle=void 0,e.registerTransformerAttrs=k;const r=t(Ar()),a=qi,l=oa,s=mo,c=t(Gp()),f=t(Hi()),E=t(hP()),_=Q4(),S=Wv(),w=pP(),b=Jv(),y=Cc(),v=em(),g=ls(),O=ss(),h=Wd(),p=Iv(),m=xc,x=f.default.DD._drag;window.removeEventListener("mousemove",x),f.default.DD._drag=function(H){(0,l.runInAction)(()=>{x.call(this,H)})},window.addEventListener("mousemove",f.default.DD._drag);const N=new f.default.Group,T=20;N.add(new f.default.Rect({width:T,height:T,fill:"white"})),N.add(new f.default.Path({scaleX:T/24,scaleY:T/24,data:"M4.98313549,11.0001422 C5.49589839,10.9914935 5.92501998,11.3703506 5.99116425,11.8666444 L5.99985778,11.9831355 L6.00348884,12.2068855 C6.11245031,15.4321748 8.76323537,17.9999971 11.9999971,17.9999971 C12.1869612,17.9999971 12.3726725,17.9914753 12.5567465,17.9745765 L12.2928932,17.7071068 C11.9023689,17.3165825 11.9023689,16.6834175 12.2928932,16.2928932 C12.6834175,15.9023689 13.3165825,15.9023689 13.7071068,16.2928932 L15.7071068,18.2928932 C16.0976311,18.6834175 16.0976311,19.3165825 15.7071068,19.7071068 L13.7071068,21.7071068 C13.3165825,22.0976311 12.6834175,22.0976311 12.2928932,21.7071068 C11.9023689,21.3165825 11.9023689,20.6834175 12.2928932,20.2928932 L12.6111505,19.9769552 C12.4086045,19.9922816 12.2047796,19.9999971 11.9999971,19.9999971 C7.7687005,19.9999971 4.28886152,16.7094374 4.01666425,12.5105203 L4.00420123,12.2575143 L4.00014222,12.0168645 C3.9908282,11.4646583 4.43092928,11.0094562 4.98313549,11.0001422 Z M11.7071068,2.29289322 C12.0675907,2.65337718 12.0953203,3.22060824 11.7902954,3.61289944 L11.7071068,3.70710678 L11.3891629,4.0230186 C11.5916051,4.00770767 11.7953244,4 12,4 C16.418278,4 20,7.581722 20,12 C20,12.5522847 19.5522847,13 19,13 C18.4477153,13 18,12.5522847 18,12 C18,8.6862915 15.3137085,6 12,6 C11.8129339,6 11.6271216,6.00853145 11.4429483,6.02544919 L11.7071068,6.29289322 C12.0976311,6.68341751 12.0976311,7.31658249 11.7071068,7.70710678 C11.3466228,8.06759074 10.7793918,8.09532028 10.3871006,7.79029539 L10.2928932,7.70710678 L8.29289322,5.70710678 C7.93240926,5.34662282 7.90467972,4.77939176 8.20970461,4.38710056 L8.29289322,4.29289322 L10.2928932,2.29289322 C10.6834175,1.90236893 11.3165825,1.90236893 11.7071068,2.29289322 Z",fill:"black"}));const I=N.toCanvas({pixelRatio:2,width:T,height:T}),R={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:H=>{H.hasName("rotater")&&H.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:I,fillPatternScaleX:20/T/2,fillPatternScaleY:20/T/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},C=H=>{Object.assign(R,H)};e.setTransformerStyle=C;const M={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},gif:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},line:{enabledAnchors:[],borderEnabled:!1,rotateEnabled:!1},image:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},many:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]},group:{enabledAnchors:["top-left","top-right","bottom-left","bottom-right"]}};function k(H,J){M[H]=M[H]||J,Object.assign(M[H],J)}const A=H=>r.default.createElement(s.Rect,Object.assign({},H,{preventDefault:!1})),L=H=>{var{url:J}=H,ie=i(H,["url"]);const[le,ue]=(0,c.default)(J,"anonymous"),he=le?(0,w.getCrop)(le,{width:ie.width,height:ie.height},"center-middle"):{};return(0,S.useImageLoader)(ue,J,"page background"),r.default.createElement(s.Image,Object.assign({image:le},ie,he))},z=H=>{const J=(0,h.useColor)({fill:H.fill,a:{width:H.width,height:H.height}});return r.default.createElement(s.Rect,Object.assign({},H,J))},Y=H=>{const{background:J,scale:ie,borderColor:le}=H,ue=i(H,["background","scale","borderColor"]),he=r.default.useMemo(()=>!!f.default.Util.colorToRGBA(J)||(0,p.isGradient)(J),[J]),ye=r.default.useMemo(()=>{const Ce=document.createElement("canvas"),pe=30;Ce.width=60,Ce.height=60;const fe=Ce.getContext("2d");return fe&&(fe.fillStyle="black",fe.fillRect(pe,0,pe,pe),fe.fillRect(0,pe,pe,pe)),Ce},[]);return r.default.createElement(r.default.Fragment,null,r.default.createElement(s.Rect,Object.assign({fillPatternImage:ye},ue,{opacity:.1,hideInExport:!0})),he?r.default.createElement(z,Object.assign({fill:J},ue)):r.default.createElement(L,Object.assign({url:J},ue)))},$=(0,a.observer)(({selection:H})=>H.visible?r.default.createElement(s.Rect,{name:"selection",x:Math.min(H.x1,H.x2),y:Math.min(H.y1,H.y2),width:Math.abs(H.x1-H.x2),height:Math.abs(H.y1-H.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),X=(0,a.observer)(({x:H,y:J,width:ie,height:le,rotation:ue,anchor:he,store:ye})=>{const Ce=(0,y.getClientRect)({x:H,y:J,width:ie,height:le,rotation:f.default.Util.radToDeg(ue)});if(he===void 0)return null;const pe=(le/2+70)*Math.cos(ue-Math.PI/2),fe=(le/2+70)*Math.sin(ue-Math.PI/2),ve=(0,v.pxToUnitRounded)({unit:ye.unit,dpi:ye.dpi,px:ie/ye.scale,precious:ye.unit==="px"?0:1})+" x "+(0,v.pxToUnitRounded)({unit:ye.unit,dpi:ye.dpi,px:le/ye.scale,precious:ye.unit==="px"?0:1})+(ye.unit==="px"?"":" "+ye.unit);return r.default.createElement(r.default.Fragment,null,r.default.createElement(s.Label,{x:(Ce.minX+Ce.maxX)/2+pe,y:(Ce.minY+Ce.maxY)/2+fe,offsetX:14,offsetY:14,visible:he==="rotater"},r.default.createElement(s.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),r.default.createElement(s.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(f.default.Util.radToDeg(ue)).toString()+"°"})),r.default.createElement(s.Label,{x:(Ce.minX+Ce.maxX)/2,y:Ce.maxY+20,visible:he!=="rotater"},r.default.createElement(s.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),r.default.createElement(s.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:ve})))}),q=(0,a.observer)(({elements:H,store:J})=>{const ie=H.filter(ue=>ue.alwaysOnTop),le=H.filter(ue=>!ue.alwaysOnTop).concat(ie);return r.default.createElement(r.default.Fragment,null,le.map(ue=>r.default.createElement(E.default,{key:ue.id,store:J,element:ue,onClick:()=>{}})))}),D=({store:H})=>{const[J,ie]=r.default.useState(!1),[le,ue]=r.default.useState({x:0,y:0});return{open:r.default.useCallback(ye=>{ie(!0),ue(ye)},[]),close:r.default.useCallback(()=>{ie(!1)},[]),props:{isOpen:J,offset:le,setIsOpen:ie}}};e.useContextMenu=D;let B=null;const U=H=>{B=H};e.registerNextDomDrop=U;const W=100,ee=({stageRef:H,containerRef:J,viewportSize:ie})=>{r.default.useEffect(()=>{var le;const ue=(le=J.current)===null||le===void 0?void 0:le.closest(".polotno-workspace-inner");function he(){var ye;if(!H.current)return;const Ce=(ye=J.current)===null||ye===void 0?void 0:ye.getBoundingClientRect(),pe=ue==null?void 0:ue.getBoundingClientRect(),fe=Math.max(0,pe.left-Ce.left-W),ve=Math.max(0,pe.top-Ce.top-W);H.current.position({x:-fe,y:-ve}),H.current.container().style.transform=`translate(${fe}px, ${ve}px)`}return he(),ue.addEventListener("scroll",he),()=>{ue.removeEventListener("scroll",he)}},[ie.width,ie.height])},ne=atob("UG9sb3RubyBmcmVlIGxpY2Vuc2UgbGltaXRhdGlvbiBleGNlZWRlZCAtIFBsZWFzZSB1cGdyYWRlIHlvdXIgYWNjb3VudC4="),te=atob("cmVk"),Z=atob("djAuOS4y"),ae=H=>r.default.createElement(r.default.Fragment,null,r.default.createElement(s.Label,{fill:te,height:200},r.default.createElement(s.Tag,{fill:te}),r.default.createElement(s.Text,Object.assign({},H,{fill:"white",text:ne,height:void 0,padding:10,fontSize:20}))));e.default=(0,a.observer)(({store:H,page:J,width:ie,height:le,pageControlsEnabled:ue,backColor:he,pageBorderColor:ye,activePageBorderColor:Ce,components:pe,bleedColor:fe,altCloneEnabled:ve,viewportSize:xe})=>{const Te=H.bleedVisible?J.bleed:0,ce=J.computedWidth+2*Te,me=J.computedHeight+2*Te,Oe=(ie-ce*H.scale)/2,Ne=(le-me*H.scale)/2,tt=r.default.useRef(null),rt=r.default.useRef(null),He=r.default.useRef(null),$e=ue==null||ue,[Xe,De]=r.default.useState(null),[Ye,lt]=r.default.useState({}),wt=(0,e.useContextMenu)({store:H}),zt=H.selectedElements.find(je=>je._cropModeEnabled),_e=H.selectedShapes.filter(je=>!je.resizable).length>0,Se=H.selectedShapes.filter(je=>!je.draggable).length>0,xt=H.selectedElements.filter(je=>!je.visible).length>0;r.default.useLayoutEffect(()=>{var je,Ze,ct;if(!tt.current)return;const Ie=tt.current.getStage(),_t=H.selectedShapes.map(mt=>mt._cropModeEnabled?null:Ie.findOne("#"+mt.id)).filter(mt=>mt),Fe=H.selectedElements.length===1&&((je=H.selectedElements[0])===null||je===void 0?void 0:je.type)||"many";M[Fe]?(tt.current.setAttrs(Object.assign(Object.assign({},R),M[Fe])),Fe!=="svg"&&Fe!=="image"&&Fe!=="gif"||H.selectedElements[0].keepRatio||tt.current.setAttrs({enabledAnchors:R.enabledAnchors}),Fe==="text"&&g.flags.textVerticalResizeEnabled&&tt.current.setAttrs({enabledAnchors:(Ze=M.text.enabledAnchors)===null||Ze===void 0?void 0:Ze.concat(["bottom-center"])})):tt.current.setAttrs(R),_e&&tt.current.enabledAnchors([]),Se&&tt.current.rotateEnabled(!1),_t.find(mt=>mt==null?void 0:mt.isDragging())&&_t.forEach(mt=>{mt.isDragging()||mt==null||mt.startDrag()}),tt.current.nodes(_t),(ct=tt.current.getLayer())===null||ct===void 0||ct.batchDraw()},[H.selectedElements,zt,_e,xt,Se]);const ht=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),At=r.default.useRef(!1),vt=(0,O.isTouchDevice)(),Tr=(0,l.action)(je=>{var Ze,ct,Ie,_t;if(vt)return;At.current=!1;const Fe=je.target.findAncestor(".elements-container"),mt=je.target.findAncestor("Transformer"),ir=je.target.findAncestor(".page-abs-container");if(Fe||mt||ir)return;const Vt=(Ze=je.target.getStage())===null||Ze===void 0?void 0:Ze.getPointerPosition();Vt.x-=(ct=je.target.getStage())===null||ct===void 0?void 0:ct.x(),Vt.y-=(Ie=je.target.getStage())===null||Ie===void 0?void 0:Ie.y(),Vt&&(ht.visible=!0,ht.x1=Vt.x,ht.y1=Vt.y,ht.x2=Vt.x,ht.y2=Vt.y,((_t=je.target.getStage())===null||_t===void 0?void 0:_t.getPointersPositions().length)>=2&&(ht.visible=!1))});ee({stageRef:rt,containerRef:He,viewportSize:xe}),r.default.useEffect(()=>{const je=(0,l.action)(ct=>{var Ie,_t,Fe,mt;if(!ht.visible)return;(Ie=rt.current)===null||Ie===void 0||Ie.setPointersPositions(ct);let ir=(_t=rt.current)===null||_t===void 0?void 0:_t.getPointerPosition();ir?(ir.x-=(Fe=rt.current)===null||Fe===void 0?void 0:Fe.x(),ir.y-=(mt=rt.current)===null||mt===void 0?void 0:mt.y()):ir={x:ht.x2,y:ht.y2},ht.x2=ir.x,ht.y2=ir.y}),Ze=(0,l.action)(()=>{if(!ht.visible||!rt.current)return;const ct=rt.current.findOne(".selection"),Ie=ct?ct.getClientRect():{width:0,height:0,x:0,y:0};if(Ie.width&&Ie.height){const _t=[];rt.current.find(".element").forEach(mt=>{const ir=mt.getClientRect(),Vt=H.getElementById(mt.id()),pn=Vt==null?void 0:Vt.draggable,Lr=Vt==null?void 0:Vt.selectable;f.default.Util.haveIntersection(Ie,ir)&&pn&&Lr&&_t.push(Vt.top.id)});const Fe=[...new Set(_t)];H.selectElements(Fe)}ht.visible=!1,At.current=!0});return window.addEventListener("mousemove",je),window.addEventListener("touchmove",je),window.addEventListener("mouseup",Ze),window.addEventListener("touchend",Ze),()=>{window.removeEventListener("mousemove",je),window.removeEventListener("touchmove",je),window.removeEventListener("mouseup",Ze),window.removeEventListener("touchend",Ze)}},[]);const Pr=r.default.useRef(!1);r.default.useEffect(()=>{var je;let Ze;const ct=(je=He.current)===null||je===void 0?void 0:je.closest(".polotno-workspace-inner"),Ie=()=>{Pr.current=!0,clearTimeout(Ze),Ze=setTimeout(()=>{Pr.current=!1},300)};return ct.addEventListener("scroll",Ie),()=>{clearTimeout(Ze),ct.removeEventListener("scroll",Ie)}},[]);const tr=je=>{if(H.activePage!==J&&J.select(),Pr.current||At.current)return;const Ze=je.evt.ctrlKey||je.evt.metaKey||je.evt.shiftKey,ct=je.target.findAncestor(".elements-container"),Ie=je.target.findAncestor(".page-abs-container"),_t=je.target.findAncestor("Transformer");if(!(Ze||ct||_t||Ie))return void H.selectElements([]);const Fe=je.target.findAncestor(".element",!0),mt=H.getElementById(Fe==null?void 0:Fe.id()),ir=mt==null?void 0:mt.top,Vt=ir==null?void 0:ir.id,pn=H.selectedElementsIds.indexOf(Vt)>=0;Vt&&Ze&&!pn?H.selectElements(H.selectedElementsIds.concat([Vt])):Vt&&Ze&&pn?H.selectElements(H.selectedElementsIds.filter(Lr=>Lr!==Vt)):!Vt||Ze||pn||H.selectElements([Vt])};(0,_.useSnap)(tt,H);const mr=H.activePage===J,Pn=pe==null?void 0:pe.PageControls,Ve=pe==null?void 0:pe.Tooltip,at=pe==null?void 0:pe.ContextMenu,bt=1/H.scale,Ot=0/H.scale;return r.default.createElement("div",{ref:He,onDragOver:je=>je.preventDefault(),onDrop:je=>{if(je.preventDefault(),!rt.current)return;rt.current.setPointersPositions(je);const Ze=rt.current.findOne(".elements-container").getRelativePointerPosition(),ct=rt.current.getPointerPosition(),Ie=rt.current.getAllIntersections(ct).map(mt=>mt.findAncestor(".element",!0)).filter(Boolean),_t=[...new Set(Ie.reverse())].map(mt=>H.getElementById(mt.id())),Fe=_t[0];B&&(B(Ze,Fe,{elements:_t,page:J}),B=null)},style:{position:"relative",width:ie+"px",height:le+"px",overflow:"hidden"},className:"polotno-page-container"+(mr?" active-page":"")},r.default.createElement(s.Stage,{ref:rt,width:Math.min(ie,xe.width+200),height:Math.min(xe.height+200,le),onClick:tr,onTap:tr,onContextMenu:je=>{je.evt.preventDefault();const Ze=je.target.findAncestor(".element",!0),ct=H.getElementById(Ze==null?void 0:Ze.id()),Ie=ct==null?void 0:ct.top,_t=Ie==null?void 0:Ie.id;_t?H.selectedElementsIds.indexOf(_t)>=0||H.selectElements([_t]):H.selectElements([]),wt.open({x:je.evt.clientX,y:je.evt.clientY})},onMouseDown:Tr,onMouseMove:je=>{if(!je.evt.altKey&&Xe)return void De(null);if(!je.evt.altKey)return;const Ze=je.target.findAncestor(".element",!0),ct=Ze==null?void 0:Ze.id();if(!H.selectedElements[0]||H.selectedElementsIds.includes(ct))return;const Ie=(0,y.getTotalClientRect)(H.selectedShapes),_t=ct?H.getElementById(ct):{x:0,y:0,width:J.computedWidth,height:J.computedHeight,rotation:0},Fe=(0,y.getClientRect)(_t),mt=[];Ie.minX>Fe.maxX&&mt.push({distance:Ie.minX-Fe.maxX,box1:Ie,box2:Fe,points:[{x:Ie.minX,y:Ie.minY+Ie.height/2},{x:Fe.maxX,y:Ie.minY+Ie.height/2},{x:Fe.maxX,y:Fe.minY+Fe.height/2}]}),Ie.maxX<Fe.minX&&mt.push({distance:Fe.minX-Ie.maxX,box1:Ie,box2:Fe,points:[{x:Ie.maxX,y:Ie.minY+Ie.height/2},{x:Fe.minX,y:Ie.minY+Ie.height/2},{x:Fe.minX,y:Fe.minY+Fe.height/2}]}),Ie.minY>Fe.maxY&&mt.push({box1:Ie,box2:Fe,distance:Ie.minY-Fe.maxY,points:[{x:Ie.minX+Ie.width/2,y:Ie.minY},{x:Ie.minX+Ie.width/2,y:Fe.maxY},{x:Fe.minX+Fe.width/2,y:Fe.maxY}]}),Ie.maxY<Fe.minY&&mt.push({box1:Ie,box2:Fe,distance:Fe.minY-Ie.maxY,points:[{x:Ie.minX+Ie.width/2,y:Ie.maxY},{x:Ie.minX+Ie.width/2,y:Fe.minY},{x:Fe.minX+Fe.width/2,y:Fe.minY}]}),Ie.minX>=Fe.minX&&Ie.maxX<=Fe.maxX&&Ie.minY>=Fe.minY&&Ie.maxY<=Fe.maxY&&(mt.push({distance:Ie.minX-Fe.minX,box1:Ie,box2:Fe,points:[{x:Ie.minX,y:Ie.minY+Ie.height/2},{x:Fe.minX,y:Ie.minY+Ie.height/2},{x:Fe.minX,y:Fe.minY+Fe.height/2}]}),mt.push({distance:Fe.maxX-Ie.maxX,box1:Ie,box2:Fe,points:[{x:Ie.maxX,y:Ie.minY+Ie.height/2},{x:Fe.maxX,y:Ie.minY+Ie.height/2},{x:Fe.maxX,y:Fe.minY+Fe.height/2}]}),mt.push({box1:Ie,box2:Fe,distance:Ie.minY-Fe.minY,points:[{x:Ie.minX+Ie.width/2,y:Ie.minY},{x:Ie.minX+Ie.width/2,y:Fe.minY},{x:Fe.minX+Fe.width/2,y:Fe.minY}]}),mt.push({box1:Ie,box2:Fe,distance:Fe.maxY-Ie.maxY,points:[{x:Ie.minX+Ie.width/2,y:Ie.maxY},{x:Ie.minX+Ie.width/2,y:Fe.maxY},{x:Fe.minX+Fe.width/2,y:Fe.maxY}]})),JSON.stringify(Xe)!==JSON.stringify(mt)&&De(mt)},onDragStart:je=>{var Ze;const ct=je.target.findAncestor(".element",!0);if(ct){const Ie=H.getElementById(ct==null?void 0:ct.id()),_t=Ie==null?void 0:Ie.top,Fe=_t==null?void 0:_t.id;!(H.selectedElementsIds.indexOf(Fe)>=0)&&Fe&&(H.selectElements([Fe]),je.target.stopDrag(),je.target.startDrag(je),(Ze=tt.current)===null||Ze===void 0||Ze.startDrag(je))}Xe&&De(null)},pageId:J.id,style:{position:"absolute",overflow:"hidden",top:0,left:0}},r.default.createElement(s.Layer,null,r.default.createElement(A,{width:ie,height:le,fill:he}),r.default.createElement(s.Group,{x:Oe,y:Ne,scaleX:H.scale,scaleY:H.scale,name:"page-container"},r.default.createElement(s.Group,{name:"page-container-2"},r.default.createElement(s.Group,{name:"page-background-group",x:Te,y:Te},r.default.createElement(Y,{x:-J.bleed,y:-J.bleed,width:J.computedWidth+2*J.bleed,height:J.computedHeight+2*J.bleed,background:J.background,name:"page-background",preventDefault:!1,scale:H.scale})),r.default.createElement(s.Group,{x:Te,y:Te,name:"elements-container",listening:!H.isPlaying},r.default.createElement(s.Rect,{name:"elements-area",width:J.computedWidth,height:J.computedHeight,listening:!1}),r.default.createElement(q,{elements:J.children,store:H})),r.default.createElement(s.Rect,{stroke:fe,name:"bleed",strokeWidth:J.bleed,x:J.bleed/2,y:J.bleed/2,width:J.computedWidth+J.bleed,height:J.computedHeight+J.bleed,listening:!1,visible:J.bleed>0&&H.bleedVisible,hideInExport:!0}),(0,b.___)()===Z&&r.default.createElement(ae,{name:"hit-detection",x:-bt/2-Ot,y:-bt/2-Ot,width:ce+bt+2*Ot,height:me+bt+2*Ot}))),r.default.createElement(s.Line,{name:"workspace-background",points:[0,0,ie,0,ie,le,0,le,0,0,Oe,Ne,Oe,le-Ne,ie-Oe,le-Ne,ie-Oe,Ne,Oe,Ne],listening:!1,closed:!0,fill:he}),r.default.createElement(s.Group,{x:Oe,y:Ne,scaleX:H.scale,scaleY:H.scale},r.default.createElement(s.Rect,{name:"page-highlight",hideInExport:!0,x:-bt/2-Ot,y:-bt/2-Ot,width:ce+bt+2*Ot,height:me+bt+2*Ot,stroke:mr&&H.pages.length>1?Ce:ye,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),r.default.createElement(s.Group,{x:Oe+Te*H.scale,y:Ne+Te*H.scale,scaleX:H.scale,scaleY:H.scale,name:"page-abs-container"},r.default.createElement(s.Transformer,{ref:tt,onDragStart:je=>{var Ze;!((Ze=je.evt)===null||Ze===void 0)&&Ze.altKey&&ve&&H.selectedElements.forEach(ct=>{const Ie=ct.clone({},{skipSelect:!0}),_t=J.children.indexOf(ct);J.setElementZIndex(Ie.id,_t)}),H.history.startTransaction()},onDragEnd:()=>{H.history.endTransaction()},onTransformStart:()=>{H.history.startTransaction()},boundBoxFunc:(je,Ze)=>{const ct=Math.abs(Ze.width)<1||Math.abs(Ze.height)<1,Ie=Math.abs(je.width)<1||Math.abs(je.height)<1;return ct&&!Ie?je:Ze},onTransform:je=>{var Ze,ct;const Ie=tt.current.nodes(),_t=Ie[Ie.length-1];if(je.target!==_t)return;const Fe=(Ze=tt.current)===null||Ze===void 0?void 0:Ze.__getNodeRect(),mt=(ct=tt.current)===null||ct===void 0?void 0:ct.getActiveAnchor();lt({anchor:mt,x:Fe.x,y:Fe.y,rotation:Fe.rotation,width:Fe.width,height:Fe.height})},onTransformEnd:je=>{lt({}),H.history.endTransaction()},visible:!H.isPlaying}),Xe&&Xe.map(({points:je,distance:Ze,box1:ct,box2:Ie},_t)=>r.default.createElement(s.Group,{name:"distances-container",hideInExport:!0,key:_t,listening:!1},r.default.createElement(s.Rect,Object.assign({},ct,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),r.default.createElement(s.Rect,Object.assign({},Ie,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),r.default.createElement(s.Line,{points:[je[0].x,je[0].y,je[1].x,je[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),r.default.createElement(s.Line,{points:[je[1].x,je[1].y,je[2].x,je[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),r.default.createElement(s.Label,{x:(je[0].x+je[1].x)/2,y:(je[0].y+je[1].y)/2,offsetY:-10,scaleX:1/H.scale,scaleY:1/H.scale},r.default.createElement(s.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),r.default.createElement(s.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,v.pxToUnitString)({unit:H.unit,dpi:H.dpi,px:Ze})})))),J._rendering&&r.default.createElement(s.Group,null,r.default.createElement(s.Rect,{width:ce,height:me,fill:"rgba(255,255,255,0.9)"}),r.default.createElement(s.Text,{text:"Rendering...",fontSize:60,width:ce,height:me,align:"center",verticalAlign:"middle"})),Ve&&r.default.createElement(Ve,{components:pe,store:H,page:J,stageRef:rt}),at&&r.default.createElement(m.Html,null,r.default.createElement(at,Object.assign({components:pe,store:H},wt.props)))),r.default.createElement(X,Object.assign({},Ye,{store:H})),r.default.createElement($,{selection:ht}),(0,b.isCreditVisible)()&&r.default.createElement(s.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:ie-170,y:le-18,onMouseEnter:je=>{je.target.getStage().container().style.cursor="pointer"},onMouseLeave:je=>{je.target.getStage().container().style.cursor=""},onTouchStart:je=>{je.cancelBubble=!0},onMouseDown:je=>{je.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),r.default.createElement(s.Group,{name:"line-guides"}))),$e&&Pn&&r.default.createElement(Pn,{store:H,page:J,xPadding:Oe,yPadding:Ne}))})}(Us)),Us}var Ed={},M3;function mP(){return M3||(M3=1,function(e){var i=Ed&&Ed.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=y;const t=i(Ar()),r=Cc(),a=em(),l=qi,s=Z4(),c=(0,s.styled)("div",t.default.forwardRef)`
|
|
254
|
-
position: absolute;
|
|
255
|
-
top: 0;
|
|
256
|
-
left: 0;
|
|
257
|
-
pointer-events: none;
|
|
258
|
-
`,f=(0,s.styled)("div",t.default.forwardRef)`
|
|
259
|
-
height: 14px;
|
|
260
|
-
position: sticky;
|
|
261
|
-
font-size: 8px;
|
|
262
|
-
line-height: 14px;
|
|
263
|
-
top: 0;
|
|
264
|
-
left: 0;
|
|
265
|
-
color: grey;
|
|
266
|
-
border-bottom: 1px solid grey;
|
|
267
|
-
background-color: #e8e8e8;
|
|
268
|
-
overflow: hidden;
|
|
269
|
-
`,E=(0,s.styled)("div",t.default.forwardRef)`
|
|
270
|
-
left: 0;
|
|
271
|
-
width: 14px;
|
|
272
|
-
position: sticky;
|
|
273
|
-
font-size: 8px;
|
|
274
|
-
line-height: 14px;
|
|
275
|
-
color: grey;
|
|
276
|
-
border-right: 1px solid grey;
|
|
277
|
-
background-color: #e8e8e8;
|
|
278
|
-
overflow: hidden;
|
|
279
|
-
`,_=(0,s.styled)("div",t.default.forwardRef)`
|
|
280
|
-
position: absolute;
|
|
281
|
-
border-left: 1px solid grey;
|
|
282
|
-
padding-left: 2px;
|
|
283
|
-
`,S=(0,s.styled)("div",t.default.forwardRef)`
|
|
284
|
-
position: absolute;
|
|
285
|
-
left: 14px;
|
|
286
|
-
border-left: 1px solid grey;
|
|
287
|
-
padding-left: 2px;
|
|
288
|
-
transform: rotate(90deg);
|
|
289
|
-
transform-origin: left top;
|
|
290
|
-
overflow: hidden;
|
|
291
|
-
`,w=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4],b=30;function y(){return t.default.createElement("div",null,t.default.createElement("h1",null,"Top rules"))}e.TopRules=(0,l.observer)(({store:v,width:g,height:O})=>{const h=t.default.useRef(null);if(!v.activePage)return null;const p=v.activePage,m=(v.bleedVisible&&p.bleed,p.computedWidth*v.scale),x=p.computedHeight*v.scale,N=(g-m)/2,T=(I=A=>(0,a.unitToPx)({unitVal:A,dpi:v.dpi,unit:v.unit})*v.scale,w.find(A=>I(A)>b)||1e4);var I;const R=(0,a.unitToPx)({unitVal:T,dpi:v.dpi,unit:v.unit})*v.scale,C=Math.round(m/R)+1,M=Math.round(x/R)+1,k=(0,r.getTotalClientRect)(v.selectedShapes);return t.default.createElement(c,{ref:h,className:"polotno-rulers"},t.default.createElement(f,{style:{width:g+"px"},className:"polotno-x-ruler"},[...Array(C)].map((A,L)=>t.default.createElement(_,{key:L,style:{left:N+L*R+"px",width:R+"px"}},v.unit==="px"||T>=1?Math.round(T*L):(T*L).toFixed(1))),!!v.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:N+k.x*v.scale+"px",height:"14px",width:k.width*v.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),v.pages.map((A,L)=>{var z;const Y=A.computedHeight*v.scale,$=(O-Y)/2;return t.default.createElement(E,{key:A.id,style:{height:O+"px"},className:"polotno-y-ruler"},[...Array(M)].map((X,q)=>t.default.createElement(S,{key:q,style:{top:$+q*R-14+"px",width:R+"px"}},v.unit==="px"||T>=1?Math.round(T*q):(T*q).toFixed(1))),((z=v.selectedShapes[0])===null||z===void 0?void 0:z.page)===A&&t.default.createElement("div",{style:{position:"absolute",top:$+k.y*v.scale-14+"px",width:"14px",height:k.height*v.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(Ed)),Ed}var xd={},L3;function yP(){return L3||(L3=1,function(e){var i=xd&&xd.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.AudioElement=void 0;const t=i(Ar()),r=qi,a=oa;function l(s){const[c,f]=t.default.useState(null),[E,_]=t.default.useState("loading");return t.default.useEffect(()=>{const S=new Audio(s),w=()=>{_("loaded"),f(S)},b=()=>{_("failed"),f(null)};return S.addEventListener("canplay",w),S.addEventListener("error",b),()=>{S.removeEventListener("canplay",w),S.removeEventListener("error",b)}},[s]),[c,E]}e.AudioElement=(0,r.observer)(({audio:s,store:c})=>{const[f,E]=l(s.src);return t.default.useEffect(()=>{f&&c.history.ignore(()=>{s.set({duration:1e3*f.duration})})},[f,s,c.history]),t.default.useEffect(()=>{if(!f)return;const _=()=>{f.currentTime=s.startTime*s.duration/1e3},S=()=>{const b=s.endTime*s.duration/1e3;f.currentTime>=b&&(f.pause(),f.currentTime=s.startTime*s.duration/1e3)};f.addEventListener("ended",_),f.addEventListener("timeupdate",S);const w=(0,a.autorun)(()=>{const b=c.animatedElementsIds;if(b.length&&!b.includes(s.id))return;const y=c.currentTime-s.delay,v=s.duration*(s.endTime-s.startTime),g=y>=0&&y<v;if(!(c.isPlaying&&c.animatedElementsIds.length===0&&g))return void f.pause();f.volume=s.volume,f.paused&&f.play();const O=y%v/1e3+s.startTime*s.duration/1e3,h=f.currentTime;Math.abs(h-O)>.5&&O!==h&&(f.currentTime=O)});return()=>{f.pause(),f.removeEventListener("ended",_),f.removeEventListener("timeupdate",S),w()}},[c.isPlaying,s.startTime,s.endTime,s.volume,f]),null})}(xd)),xd}var _1={},S1={},Od={};let bP="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",r_=e=>crypto.getRandomValues(new Uint8Array(e)),n_=(e,i,t)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*r*i/e.length);return(l=i)=>{let s="";for(;;){let c=t(a),f=a;for(;f--;)if(s+=e[c[f]&r]||"",s.length===l)return s}}},wP=(e,i=21)=>n_(e,i,r_),_P=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((i,t)=>(t&=63,t<36?i+=t.toString(36):t<62?i+=(t-26).toString(36).toUpperCase():t>62?i+="-":i+="_",i),"");const SP=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:wP,customRandom:n_,nanoid:_P,random:r_,urlAlphabet:bP},Symbol.toStringTag,{value:"Module"})),Zp=rs(SP);var E1={},ji={},x1={},O1={},N3;function i_(){return N3||(N3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0;const i=function(t,r){if(t===r)return!0;if(typeof t=="object"&&t!=null&&typeof r=="object"&&r!=null){if(Object.keys(t).length!=Object.keys(r).length)return!1;for(var a in t)if(!r.hasOwnProperty(a)||!(0,e.deepEqual)(t[a],r[a]))return!1;return!0}return!1};e.deepEqual=i}(O1)),O1}var I3;function EP(){return I3||(I3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const i=la,t=i_();Object.assign(i.types),e.UndoManager=i.types.model("UndoManager",{history:i.types.array(i.types.frozen()),undoIdx:-1,targetPath:""}).views(r=>({get canUndo(){return r.undoIdx>0},get canRedo(){return r.undoIdx<r.history.length-1}})).actions(r=>{let a,l,s=!1,c=null,f=0,E=0;const _=()=>E>0;function S(){const b=(0,i.getSnapshot)(a);return{pages:b.pages,width:b.width,height:b.height,custom:b.custom}}function w(b){const y=a.pages.map(h=>h.id),v=b.pages.map(h=>h.id),g=!(0,t.deepEqual)(y,v),O=!(0,t.deepEqual)(a.custom,b.custom);g?(0,i.applySnapshot)(a.pages,b.pages):a.pages.forEach((h,p)=>{(0,i.applySnapshot)(h,b.pages[p])}),O&&a.set({custom:b.custom}),a.setSize(b.width,b.height)}return{startTransaction(){E++},endTransaction(b){E--,b||this.requestAddState(S())},async ignore(b,y=!1,v=!1){v&&await new Promise(m=>setTimeout(m,10)),f&&r.addUndoState();let g=_();r.startTransaction();let O=E;try{await b()}catch(m){setTimeout(()=>{throw m})}const h=O!==E,p=!h;r.endTransaction(p),y||g||r.replaceState(),h||(clearTimeout(f),f=0)},async transaction(b){await r.ignore(b,!0),this.addUndoState()},requestAddState(b){c=b,f||_()||(s?s=!1:f=setTimeout(()=>{f=0,clearTimeout(f),_()||this.addUndoState()},100))},addUndoState(){if(s)return void(s=!1);const b=r.history[r.undoIdx];!(0,t.deepEqual)(c,b)&&(clearTimeout(f),f=0,r.history.splice(r.undoIdx+1),r.history.push(c),r.undoIdx=r.history.length-1)},afterCreate(){if(a=(0,i.resolvePath)(r,".."),!a)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");l=(0,i.onSnapshot)(a,()=>{this.requestAddState(S())}),r.history.length===0&&this.requestAddState(S())},clear(){clearTimeout(f),f=0,r.history.splice(0,r.history.length),r.undoIdx=-1,r.addUndoState(S())},beforeDestroy(){l()},undo(){f&&this.addUndoState(),r.canUndo&&(r.undoIdx--,s=!0,w(r.history[r.undoIdx]))},redo(){f&&this.addUndoState(),r.canRedo&&(r.undoIdx++,s=!0,w(r.history[r.undoIdx]))},replaceState(){r.history[r.undoIdx]=S()}}}),e.default=e.UndoManager}(x1)),x1}var P1={},j3;function xP(){return j3||(j3=1,function(e){async function i(t,r){const a=await(await fetch(t)).blob(),l=document.createElement("a"),s=URL.createObjectURL(a);l.href=s,l.download=r,document.body.appendChild(l),l.click(),setTimeout(function(){document.body.removeChild(l),window.URL.revokeObjectURL(s)},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=i}(P1)),P1}var C1={},D3;function OP(){return D3||(D3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=r;const i="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let t;function r(){return t?Promise.resolve(t):new Promise(a=>{var l=document.createElement("script");l.onload=function(){t=window.jspdf.jsPDF,a(t)},l.src=i,document.head.appendChild(l)})}}(C1)),C1}var k1={},F3;function PP(){return F3||(F3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getGIF=t,e.createGIF=r;const i="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function t(){return window.GIF?Promise.resolve(window.GIF):new Promise(a=>{var l=document.createElement("script");l.onload=function(){a(window.GIF)},l.src=i,document.head.appendChild(l)})}async function r({width:a,height:l}){return new(await t())({workers:4,width:a,height:l,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
292
|
-
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
|
|
293
|
-
`],{type:"application/javascript"}))})}}(k1)),k1}var A1={},z3;function CP(){return z3||(z3=1,function(e){async function i(t){for(let r=0;r<30;r++){const a=await t();if(a)return a;await new Promise(l=>setTimeout(l,50))}}Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=i}(A1)),A1}var ka={},T1={},B3;function kp(){return B3||(B3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=t,e.loadImage=r,e.cropImage=a,e.getCrop=l;const i=Zd();function t(s){return new Promise(c=>{const f=document.createElement("img");f.onload=async()=>{f.width===0||f.height===0?c(await(0,i.getSvgSize)(s)):c({width:f.width,height:f.height})},f.crossOrigin="anonymous",f.src=s})}function r(s){return new Promise((c,f)=>{const E=document.createElement("img");E.onload=()=>{c(E)},E.onerror=_=>{f(_)},E.crossOrigin="anonymous",E.src=s})}async function a(s,c){const f=await r(s),E=document.createElement("canvas");E.width=2*f.width,E.height=2*f.height,E.getContext("2d").drawImage(f,0,0,E.width,E.height);const _=document.createElement("canvas");_.width=c.width,_.height=c.height;const S=_.getContext("2d");let{cropX:w,cropY:b}=c;const y=E.width*c.cropWidth,v=E.height*c.cropHeight,g=c.width/c.height;let O,h;const p=y/v;return c.type==="svg"?(O=y,h=v):g>=p?(O=y,h=y/g):(O=v*g,h=v),S.drawImage(E,w*E.width,b*E.height,O,h,0,0,_.width,_.height),_.toDataURL("image/png")}function l(s,c){const{width:f,height:E}=s,_=f/E;let S,w;_>=c.width/c.height?(S=c.width,w=c.width/_):(S=c.height*_,w=c.height);const b=(c.width-S)/2,y=(c.height-w)/2;return{cropX:b/c.width,cropY:y/c.height,cropWidth:S/c.width,cropHeight:w/c.height}}}(T1)),T1}var R1={},U3;function a_(){return U3||(U3=1,function(e){var i;function t(r){let a={filter:"",html:void 0};switch(r){case i.warm:return a.filter="sepia(0.5) saturate(1.5) brightness(1.1) contrast(1.1)",a;case i.cold:return a.filter="url(#blue-boost)",a.html=`
|
|
294
|
-
<svg style="display: none">
|
|
295
|
-
<filter id="blue-boost">
|
|
296
|
-
<feColorMatrix
|
|
297
|
-
type="matrix"
|
|
298
|
-
values="
|
|
299
|
-
0.85 0 0 0 0
|
|
300
|
-
0 0.9 0 0 0
|
|
301
|
-
0 0 1.15 0 0
|
|
302
|
-
0 0 0 1 0"
|
|
303
|
-
/>
|
|
304
|
-
</filter>
|
|
305
|
-
</svg>`,a;case"natural":return a.filter="saturate(1.3) brightness(1.1) contrast(1.2)",a;default:return null}}Object.defineProperty(e,"__esModule",{value:!0}),e.Effects=void 0,e.shapeFilterToCSS=t,function(r){r.sepia="sepia",r.grayscale="grayscale",r.natural="natural",r.warm="warm",r.cold="cold"}(i||(e.Effects=i={}))}(R1)),R1}var M1={},q3;function kP(){return q3||(q3=1,function(e){async function i(l){return new Promise(s=>{const c=document.createElement("video");c.crossOrigin="anonymous",c.src=l,c.addEventListener("loadedmetadata",()=>{const{videoWidth:f,videoHeight:E}=c;s({width:f,height:E})})})}async function t(l){return new Promise(s=>{const c=document.createElement("video");c.crossOrigin="anonymous",c.src=l,c.addEventListener("loadedmetadata",()=>{const{duration:f}=c;s(f)})})}async function r(l,s=5){return new Promise((c,f)=>{var E=document.createElement("video"),_=document.createElement("canvas");_.width=480,_.height=360;var S=_.getContext("2d");E.crossOrigin="anonymous",E.src=l,E.addEventListener("error",w=>{f(w)}),E.addEventListener("loadeddata",function(){const w=E.videoWidth/E.videoHeight;_.width=480,_.height=480/w,E.currentTime=s}),E.addEventListener("seeked",function(){S.drawImage(E,0,0,_.width,_.height);try{var w=_.toDataURL();c(w)}catch(b){f(b)}})})}async function a(l,s,c){return new Promise((f,E)=>{const _=s.getContext("2d"),S=()=>{try{_.drawImage(l,0,0,s.width,s.height);const w=s.toDataURL();f(w),l.removeEventListener("seeked",S)}catch(w){E(w),l.removeEventListener("seeked",S)}};l.addEventListener("seeked",S),l.currentTime=c})}Object.defineProperty(e,"__esModule",{value:!0}),e.getVideoSize=i,e.getVideoDuration=t,e.getVideoPreview=r,e.getVideoObjectPreview=a}(M1)),M1}var H3;function AP(){return H3||(H3=1,function(e){var i=ka&&ka.__createBinding||(Object.create?function(k,A,L,z){z===void 0&&(z=L);var Y=Object.getOwnPropertyDescriptor(A,L);Y&&!("get"in Y?!A.__esModule:Y.writable||Y.configurable)||(Y={enumerable:!0,get:function(){return A[L]}}),Object.defineProperty(k,z,Y)}:function(k,A,L,z){z===void 0&&(z=L),k[z]=A[L]}),t=ka&&ka.__setModuleDefault||(Object.create?function(k,A){Object.defineProperty(k,"default",{enumerable:!0,value:A})}:function(k,A){k.default=A}),r=ka&&ka.__importStar||function(){var k=function(A){return k=Object.getOwnPropertyNames||function(L){var z=[];for(var Y in L)Object.prototype.hasOwnProperty.call(L,Y)&&(z[z.length]=Y);return z},k(A)};return function(A){if(A&&A.__esModule)return A;var L={};if(A!=null)for(var z=k(A),Y=0;Y<z.length;Y++)z[Y]!=="default"&&i(L,A,z[Y]);return t(L,A),L}}(),a=ka&&ka.__rest||function(k,A){var L={};for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&A.indexOf(z)<0&&(L[z]=k[z]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function"){var Y=0;for(z=Object.getOwnPropertySymbols(k);Y<z.length;Y++)A.indexOf(z[Y])<0&&Object.prototype.propertyIsEnumerable.call(k,z[Y])&&(L[z[Y]]=k[z[Y]])}return L};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=b,e.jsonToDOM=I,e.jsonToHTML=M;const l=kp(),s=r(Zd()),c=kp(),f=Qv(),E=X4(),_=a_(),S=kP(),w=(k,A,...L)=>({type:k,props:A,children:L||[]});function b(k){var A=new DOMParser().parseFromString(k,"image/svg+xml");return A.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(A)}const y=async({element:k,page:A,store:L})=>{let{src:z}=k;if(k.type==="svg"&&Object.keys(k.colorsReplace).length){const le=await s.urlToString(z);z=s.replaceColors(le,new Map(Object.entries(k.colorsReplace)))}let Y="";k.flipX&&(Y+="scaleX(-1)"),k.flipY&&(Y+="scaleY(-1)"),Y||(Y="none");const $={};if(k.clipSrc){const le=await s.urlToBase64(k.clipSrc);$["clip-path"]=`url(${le})`}const X=await(0,c.loadImage)(z),q=X.width*k.cropWidth,D=X.height*k.cropHeight,B=k.width/k.height;let U,W;const ee=q/D;k.type==="svg"?(U=q,W=D):B>=ee?(U=q,W=q/B):(U=D*B,W=D);const ne=U/X.width,te=W/X.height,Z=U/W>k.width/k.height?k.height/W:k.width/U,ae=U*Z/ne,H=W*Z/te,J=k.cropX*Z*X.width,ie=k.cropY*Z*X.height;return w("div",{style:Object.assign(Object.assign({},$),{width:"100%",height:"100%","border-radius":k.cornerRadius+"px",border:k.borderSize?`${k.borderSize}px solid ${k.borderColor}`:"none",background:`url(${z})`,transform:Y,"background-size":`${Math.round(ae)}px ${Math.round(H)}px`,"background-position-x":-Math.round(J)+"px","background-position-y":-Math.round(ie)+"px"})})},v=async({element:k,page:A,store:L})=>{let z={top:0,left:0};k.fill.indexOf("gradient")>=0&&(z=Object.assign(Object.assign({},z),{"background-color":k.fill,"background-image":k.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const Y=k.backgroundPadding*(k.fontSize*k.lineHeight),$=w("div",{style:{position:"absolute",top:-Y/2+"px",left:-Y/2+"px",display:k.backgroundEnabled?"block":"none",width:k.width+Y+"px",height:k.height+Y+"px","background-color":k.backgroundColor,"border-radius":k.backgroundCornerRadius*(k.fontSize*k.lineHeight*.5)+"px"}});k.verticalAlign==="middle"?(z.top="50%",z.transform="translateY(-50%)"):k.verticalAlign==="bottom"&&(z.bottom=0);const X=/<[a-z][\s\S]*>/i.test(k.text),q=Object.assign(Object.assign({},z),{position:"absolute",width:k.width+"px",color:k.fill,"white-space":"pre-wrap","font-size":k.fontSize+"px","text-align":k.align,"font-family":k.fontFamily,"text-decoration":k.textDecoration||"none","line-height":k.lineHeight,"letter-spacing":k.letterSpacing+"em","font-style":k.fontStyle,"font-weight":k.fontWeight,"-webkit-text-stroke":`${k.strokeWidth}px ${k.stroke}`,"text-stroke":`${k.strokeWidth}px ${k.stroke}`}),D="el-"+k.id,B=X?{id:D}:{},U=`<style>#${D} {${E.resetStyleContent}}</style>`,W=w("div",Object.assign(Object.assign({style:q},B),{innerHTML:X?`${U}${k.text}`:k.text.split(`
|
|
306
|
-
`).join("<br />")}));return w("div",{style:{position:"relative",width:"100%",height:"100%"}},$,W)},g=({element:k,type:A})=>{const L={"stroke-width":k.height,stroke:k.color,"line-cap":"round","stroke-linejoin":"round",opacity:k.opacity};return A==="arrow"||A==="triangle"?w("polyline",Object.assign({points:`${3*k.height},${2*-k.height} 0,0 ${3*k.height},${2*k.height}`},L)):A==="bar"?w("polyline",Object.assign({points:`0,${2*-k.height} 0,${2*k.height}`},L)):A==="circle"?w("circle",Object.assign({r:k.height},L)):A==="square"?w("polyline",Object.assign({points:`${-k.height},${-k.height} ${-k.height},${k.height} ${k.height},${k.height} ${k.height},${-k.height}`},L)):null},O=async({element:k,page:A,store:L})=>w("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},w("rect",{x:0,y:0,width:k.width,height:k.height,fill:k.color}),w("g",{transform:`translate(0 ${k.height/2})`},g({element:k,type:k.startHead})),w("g",{transform:`translate(${k.width} ${k.height/2}) rotate(180)`},g({element:k,type:k.endHead}))),h=async({element:k,page:A,store:L,elementHook:z})=>{const Y=await Promise.all(k.children.map(X=>N({element:X,page:A,store:L,elementHook:z}))),$=w("div",{style:{"transform-origin":"top left",opacity:k.opacity}},...Y);return z&&z({dom:$,element:k})||$},p=async({element:k,page:A,store:L,elementHook:z})=>{const Y=(0,f.figureToSvg)(k),$=w("div",{innerHTML:Y});return z&&z({dom:$,element:k})||$},m=async({element:k,page:A,store:L,elementHook:z})=>{const{cropX:Y,cropY:$,cropWidth:X,cropHeight:q}=k,D=await(0,S.getVideoSize)(k.src),B=D.width*X,U=D.height*q,W=k.width/k.height;let ee,ne;W>=B/U?(ee=B,ne=B/W):(ee=U*W,ne=U);const te=ee/X,Z=ne/q,ae=Y*D.width,H=$*D.height,J=Math.max(k.width/D.width,k.height/D.height),ie={position:"absolute",width:`${Math.round(te*J)}px`,height:`${Math.round(Z*J)}px`,left:-Math.round(ae*J)+"px",top:-Math.round(H*J)+"px","object-fit":"fill"},le=`video-${k.id}`,ue=w("div",{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden","border-radius":k.cornerRadius+"px",border:k.borderSize?`${k.borderSize}px solid ${k.borderColor}`:"none"}},w("video",{id:le,src:k.src,style:ie,controls:!0,playsInline:!0,muted:!0,volume:k.volume}));return z&&z({dom:ue,element:k})||ue},x={image:y,svg:y,text:v,line:O,figure:p,group:h,video:m,gif:y};async function N({element:k,page:A,store:L,elementHook:z}){let Y=await x[k.type];Y||(Y=()=>w("div",{}));const $=await Y({element:k,page:A,store:L}),X=[],q=[];if(k.blurEnabled&&X.push(`blur(${k.blurRadius/2}px)`),k.brightnessEnabled&&X.push(`brightness(${100*k.brightness+100}%)`),k.sepiaEnabled&&X.push("sepia()"),k.grayscaleEnabled&&X.push("grayscale()"),k.filters)for(const B of Object.keys(k.filters)){const U=(0,_.shapeFilterToCSS)(_.Effects[B]);U&&(X.push(U.filter),U.html&&q.push(U.html))}k.shadowEnabled&&X.push(`drop-shadow(${k.shadowOffsetX}px ${k.shadowOffsetY}px ${k.shadowBlur}px ${k.shadowColor})`);const D=w("div",{id:k.id,style:{position:"absolute",left:k.x+"px",top:k.y+"px",width:k.width+"px",height:k.height+"px",transform:`rotate(${k.rotation}deg)`,"transform-origin":"top left",opacity:k.opacity,display:k.visible&&k.showInExport?"block":"none",filter:X.join(" ")||"none"}},$,...q);return z&&z({dom:D,element:k})||D}async function T({page:k,store:A,elementHook:L}){const z=await Promise.all(k.children.map(q=>N({element:q,page:k,store:A,elementHook:L}))),Y=k.width==="auto"?A.width:k.width,$=k.height==="auto"?A.height:k.height;let X={};if(k.background.indexOf("url")>=0||k.background.indexOf("http")>=0||k.background.indexOf(".jpg")>=0||k.background.indexOf(".png")>=0||k.background.indexOf(".jpeg")>=0){const{width:q,height:D}=await(0,c.loadImage)(k.background),B=await y({element:Object.assign({x:0,y:0,width:q,height:D,src:k.background,cornerRadius:0},(0,l.getCrop)({width:q,height:D},{width:q,height:D})),page:k,store:A});z.unshift(B)}else X=Object.assign(Object.assign({},X),{"background-color":k.background});return w("div",{className:"page",id:k.id,style:Object.assign(Object.assign({},X),{width:Y+"px",height:$+"px",border:"1px solid grey",overflow:"hidden",position:"relative"})},...z)}async function I({json:k,elementHook:A}){const L=await Promise.all(k.pages.map($=>T({page:$,store:k,elementHook:A}))),z=[];k.pages.forEach($=>{$.children.forEach(X=>{X.type==="text"&&z.indexOf(X.fontFamily)===-1&&z.push(X.fontFamily)})});const Y=z.map($=>k.fonts.find(X=>X.fontFamily===$)?w("style",{},""):w("link",{href:`https://fonts.googleapis.com/css?family=${$}`,rel:"stylesheet"}));return w("div",{className:"design"},...Y,...L)}const R=(k,A)=>typeof A=="object"?`${k}="${Object.keys(A).map(L=>`${L}:${A[L]};`).join(" ")}"`:`${k}="${A}"`,C=({dom:k})=>{if(typeof k=="string")return k;if(!k)return"";const A=k.props,{innerHTML:L}=A,z=a(A,["innerHTML"]);return`<${k.type} ${Object.keys(z).map(Y=>R(Y,k.props[Y])).join(" ")}>${L||k.children.map(Y=>C({dom:Y})).join("")}</${k.type}>`};async function M({json:k,elementHook:A}){const L=await I({json:k,elementHook:A});return C({dom:L})}}(ka)),ka}var Aa={},G3;function TP(){return G3||(G3=1,function(e){var i=Aa&&Aa.__createBinding||(Object.create?function(L,z,Y,$){$===void 0&&($=Y);var X=Object.getOwnPropertyDescriptor(z,Y);X&&!("get"in X?!z.__esModule:X.writable||X.configurable)||(X={enumerable:!0,get:function(){return z[Y]}}),Object.defineProperty(L,$,X)}:function(L,z,Y,$){$===void 0&&($=Y),L[$]=z[Y]}),t=Aa&&Aa.__setModuleDefault||(Object.create?function(L,z){Object.defineProperty(L,"default",{enumerable:!0,value:z})}:function(L,z){L.default=z}),r=Aa&&Aa.__importStar||function(){var L=function(z){return L=Object.getOwnPropertyNames||function(Y){var $=[];for(var X in Y)Object.prototype.hasOwnProperty.call(Y,X)&&($[$.length]=X);return $},L(z)};return function(z){if(z&&z.__esModule)return z;var Y={};if(z!=null)for(var $=L(z),X=0;X<$.length;X++)$[X]!=="default"&&i(Y,z,$[X]);return t(Y,z),Y}}(),a=Aa&&Aa.__rest||function(L,z){var Y={};for(var $ in L)Object.prototype.hasOwnProperty.call(L,$)&&z.indexOf($)<0&&(Y[$]=L[$]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function"){var X=0;for($=Object.getOwnPropertySymbols(L);X<$.length;X++)z.indexOf($[X])<0&&Object.prototype.propertyIsEnumerable.call(L,$[X])&&(Y[$[X]]=L[$[X]])}return Y};Object.defineProperty(e,"__esModule",{value:!0}),e.forEveryChild=void 0,e.fixRatio=w,e.jsonToDOM=C,e.jsonToSVG=A;const l=kp(),s=r(Zd()),c=kp(),f=Qv(),E=a_(),_=(L,z)=>{if(L.children)for(const Y of L.children){if(z(Y)===!0)break;(0,e.forEveryChild)(Y,z)}};e.forEveryChild=_;const S=(L,z,...Y)=>({type:L,props:z,children:Y||[]});function w(L){var z=new DOMParser().parseFromString(L,"image/svg+xml");return z.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(z)}const b=async L=>{try{const z=await fetch(L);if(typeof Buffer<"u"){const Y=await z.arrayBuffer(),$=Buffer.from(Y).toString("base64");return`data:${z.headers.get("content-type")||"image/png"};base64,${$}`}{const Y=await z.blob();return new Promise(($,X)=>{const q=new FileReader;q.onloadend=()=>$(q.result),q.onerror=X,q.readAsDataURL(Y)})}}catch{return L}},y=async({element:L,page:z,store:Y})=>{let{src:$}=L;if(L.type==="svg"){const ye=await s.urlToString($);$=s.replaceColors(ye,new Map(Object.entries(L.colorsReplace)))}else $=await b($);let X="";L.flipX&&(X+="scaleX(-1)"),L.flipY&&(X+="scaleY(-1)"),L.clipSrc&&await s.urlToBase64(L.clipSrc);const q=await(0,c.loadImage)($),D=q.width*L.cropWidth,B=q.height*L.cropHeight,U=L.width/L.height;let W,ee;const ne=D/B;L.type==="svg"?(W=D,ee=B):U>=ne?(W=D,ee=D/U):(W=B*U,ee=B);const te=W/q.width,Z=ee/q.height,ae=W/ee>L.width/L.height?L.height/ee:L.width/W,H=W*ae/te,J=ee*ae/Z,ie=L.cropX*q.width*ae,le=L.cropY*q.height*ae,ue=`clip-${L.id}`,he=$.replace(/&/g,"&");return S("g",{style:{transform:X}},S("defs",{},S("clipPath",{id:ue},S("rect",{x:0,y:0,width:L.width,height:L.height}))),S("image",{href:he,x:-ie,y:-le,width:H,height:J,preserveAspectRatio:"none","clip-path":`url(#${ue})`}))},v=async({element:L,page:z,store:Y})=>{const $=(U,W,ee,ne,te)=>{const Z=document.createElement("canvas").getContext("2d");return Z.font=`${te} ${ne} ${W}px ${ee}`,Z.measureText(U).width},X=((U,W,ee,ne,te,Z)=>{const ae=[];return U.split(`
|
|
307
|
-
`).forEach(H=>{const J=H.split(" ");let ie="";for(let le=0;le<J.length;le++){const ue=ie+J[le]+" ";$(ue,ee,ne,te,Z)>W+.5&&le>0?(ae.push(ie.trim()),ie=J[le]+" "):ie=ue}ae.push(ie.trim())}),ae})(L.text,L.width,L.fontSize,L.fontFamily,L.fontWeight,L.fontStyle),q=L.fontSize*L.lineHeight,D=L.align==="center"?"middle":L.align==="right"?"end":"start",B=X.map((U,W)=>S("tspan",{x:L.align==="center"?L.width/2:L.align==="right"?L.width:0,dy:W===0?0:q,innerHTML:U}));return S("g",{},S("text",{fill:L.fill,y:L.fontSize,"font-size":L.fontSize+"px","text-anchor":D,"font-family":L.fontFamily,"font-style":L.fontStyle,"font-weight":L.fontWeight,"text-decoration":L.textDecoration,"line-height":L.lineHeight,"letter-spacing":L.letterSpacing+"em","stroke-width":L.strokeWidth,stroke:L.stroke},...B))},g=({element:L,type:z})=>{const Y={"stroke-width":L.height,stroke:L.color,"line-cap":"round","stroke-linejoin":"round",opacity:L.opacity};return z==="arrow"||z==="triangle"?S("polyline",Object.assign({points:`${3*L.height},${2*-L.height} 0,0 ${3*L.height},${2*L.height}`},Y)):z==="bar"?S("polyline",Object.assign({points:`0,${2*-L.height} 0,${2*L.height}`},Y)):z==="circle"?S("circle",Object.assign({r:L.height},Y)):z==="square"?S("polyline",Object.assign({points:`${-L.height},${-L.height} ${-L.height},${L.height} ${L.height},${L.height} ${L.height},${-L.height}`},Y)):null},O=async({element:L,page:z,store:Y})=>S("g",{},S("line",{x1:0,y1:L.height/2,x2:L.width,y2:L.height/2,stroke:L.color,"stroke-width":L.height}),S("g",{transform:`translate(0 ${L.height/2})`},g({element:L,type:L.startHead})),S("g",{transform:`translate(${L.width} ${L.height/2}) rotate(180)`},g({element:L,type:L.endHead}))),h=async({element:L,page:z,store:Y,elementHook:$})=>{const X=await Promise.all(L.children.map(D=>N({element:D,page:z,store:Y,elementHook:$}))),q=S("g",{opacity:L.opacity,style:{"transform-origin":"top left"}},...X);return $&&$({dom:q,element:L})||q};function p(L){let z=L.replace(/<svg[^>]*>/,"");return z=z.replace(/<\/svg>/,""),z}const m=async({element:L,page:z,store:Y,elementHook:$})=>{const X=p((0,f.figureToSvg)(L)),q=S("g",{innerHTML:X});return $&&$({dom:q,element:L})||q},x={image:y,svg:y,text:v,line:O,figure:m,group:h,gif:y};async function N({element:L,page:z,store:Y,elementHook:$}){let X=await x[L.type];X||(X=()=>S("g",{}));const q=await X({element:L,page:z,store:Y}),D=[],B=[];if(L.blurEnabled&&D.push(`blur(${L.blurRadius/2}px)`),L.brightnessEnabled&&D.push(`brightness(${100*L.brightness+100}%)`),L.sepiaEnabled&&D.push("sepia()"),L.grayscaleEnabled&&D.push("grayscale()"),L.shadowEnabled&&D.push(`drop-shadow(${L.shadowOffsetX}px ${L.shadowOffsetY}px ${L.shadowBlur}px ${L.shadowColor})`),L.filters)for(const W of Object.keys(L.filters)){const ee=(0,E.shapeFilterToCSS)(E.Effects[W]);if(ee&&(D.push(ee.filter),ee.html)){const ne=ee.html.replace(/<svg([^>]*)>/,"<g$1>").replace(/<\/svg>/,"</g>");B.push(ne)}}const U=S("g",{className:"element",id:L.id,transform:L.type!=="group"?`translate(${L.x}, ${L.y}) rotate(${L.rotation})`:void 0,display:L.visible?void 0:"none",style:{"transform-origin":"top left",filter:D.join(" ")}},q,...B);return $&&$({dom:U,element:L})||U}async function T({page:L,store:z,elementHook:Y}){const $=await Promise.all(L.children.map(D=>N({element:D,page:L,store:z,elementHook:Y}))),X=L.background.indexOf("url")>=0||L.background.indexOf("http")>=0||L.background.indexOf(".jpg")>=0||L.background.indexOf(".png")>=0||L.background.indexOf(".jpeg")>=0;let q;if(X){const D=await(0,c.loadImage)(L.background);q=await(0,c.cropImage)(L.background,Object.assign({width:z.width,height:z.height,x:0,y:0},(0,l.getCrop)({width:z.width,height:z.height},{width:D.width,height:D.height})))}return S("g",{className:"page",style:{}},X?S("image",{"xlink:href":q,x:0,y:0,width:z.width,height:z.height,preserveAspectRatio:"none"}):S("rect",{x:0,y:0,width:z.width,height:z.height,fill:X?void 0:L.background}),...$)}async function I(L){try{const z=await fetch(L),Y=await z.blob();return new Promise(($,X)=>{const q=new FileReader;q.onloadend=()=>$(q.result),q.onerror=X,q.readAsDataURL(Y)})}catch{return L}}async function R(L,z){return await Promise.all(L.map(async Y=>{var $,X;const q=z.find(D=>D.fontFamily===Y);if(q){const D=await I(q.url);return S("style",{},`@font-face { font-family: ${Y}; src: url(${D}); }`)}{const D=`https://fonts.googleapis.com/css?family=${Y}:bi,normal,i,b`;try{const B=await fetch(D),U=await B.text(),W=(X=($=U.match(/url\((.*?)\)/g))===null||$===void 0?void 0:$.map(ne=>ne.replace(/url\((.*?)\)/,"$1")))===null||X===void 0?void 0:X.filter(ne=>ne.startsWith("https"));if(!(W!=null&&W.length))throw new Error("No font URLs found");const ee=await Promise.all(W.map(async ne=>{const te=await I(ne),Z=U.match(/font-style:\s*(.*?);/),ae=U.match(/font-weight:\s*(.*?);/),H=Z?Z[1]:"normal",J=ae?ae[1]:"normal";return`@font-face {
|
|
308
|
-
font-family: ${Y};
|
|
309
|
-
font-style: ${H};
|
|
310
|
-
font-weight: ${J};
|
|
311
|
-
src: url(${te});
|
|
312
|
-
}`}));return S("style",{},ee.join(`
|
|
313
|
-
`))}catch{return S("defs",{},S("style",{type:"text/css",innerHTML:`@import url('${D}');`.replace(/&/g,"&")}))}}}))}async function C({json:L,elementHook:z}){const Y=await Promise.all(L.pages.map(q=>T({page:q,store:L,elementHook:z}))),$=[];(0,e.forEveryChild)({children:L.pages},q=>{q.type==="text"&&$.indexOf(q.fontFamily)===-1&&$.push(q.fontFamily)});const X=await R($,L.fonts);return S("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${L.width} ${L.height}`,width:L.width,height:L.height},...X,...Y)}const M=(L,z)=>typeof z=="object"?`${L}="${Object.keys(z).map(Y=>`${Y}:${z[Y]};`).join(" ")}"`:z==null||z===""?"":`${L}="${z}"`,k=({dom:L,nestLevel:z=0})=>{if(typeof L=="string")return L;if(!L)return"";const Y=L.props,{innerHTML:$}=Y,X=a(Y,["innerHTML"]),q=" ".repeat(z);return`${q}<${L.type} ${Object.keys(X).map(D=>M(D,X[D])).join(" ")}>${$||`
|
|
314
|
-
`+L.children.map(D=>k({dom:D,nestLevel:z+1})).join("")}${q}</${L.type}>
|
|
315
|
-
`};async function A({json:L,elementHook:z}){const Y=await C({json:L,elementHook:z});return k({dom:Y})}}(Aa)),Aa}var L1={},V3;function o_(){return V3||(V3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const i=la,t=Zp,r=Fd(),a=tm(),l=Fd(),s=Cc();e.Page=i.types.model("Page",{id:i.types.identifier,children:i.types.array(i.types.late(()=>r.ElementTypes)),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(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(c=>{const f=Object.assign({},c),E={};for(var _ in f)_[0]!=="_"&&(E[_]=c[_]);return E}).views(c=>({get store(){return(0,i.getParentOfType)(c,a.Store)}})).views(c=>({get startTime(){let f=0;for(const E of c.store.pages){if(E.id===c.id)return f;f+=E.duration}return f},get _exportingOrRendering(){return c._exporting||c._rendering}})).views(c=>({get computedWidth(){return c.width==="auto"?c.store.width:c.width},get computedHeight(){return c.height==="auto"?c.store.height:c.height}})).actions(c=>({toJSON:()=>JSON.parse(JSON.stringify((0,i.getSnapshot)(c))),_forEachElementUp(f,E){const _=f.map(S=>({id:S,index:c.children.findIndex(w=>w.id===S)}));_.sort((S,w)=>w.index-S.index);for(const{index:S}of _){if(S==-1)continue;const w=S<c.children.length-1&&c.children[S+1],b=f.indexOf(w==null?void 0:w.id)>=0;S===c.children.length-1||b||E(S)}},_forEachElementDown(f,E){const _=f.map(S=>({id:S,index:c.children.findIndex(w=>w.id===S)}));_.sort((S,w)=>S.index-w.index);for(const{index:S}of _){if(S==-1)continue;const w=S>0&&c.children[S-1],b=f.indexOf(w==null?void 0:w.id)>=0;S===0||b||E(S)}return!1}})).actions(c=>({clone(f={}){const E=c.toJSON();E.children.forEach(b=>{b.id=(0,t.nanoid)(10),(0,l.forEveryChild)(b,y=>{y.id=(0,t.nanoid)(10)})});const _=Object.assign(Object.assign(Object.assign({},E),{id:(0,t.nanoid)(10)}),f),S=c.store.addPage(_),w=c.store.pages.indexOf(c);S.setZIndex(w+1),S.select()},setZIndex(f){c.store.setPageZIndex(c.id,f)},set(f){Object.assign(c,f)},select(){c.store.selectPage(c.id)},addElement(f,{skipSelect:E=!1}={}){const _=l.TYPES_MAP[f.type];if(!_)return;"children"in f&&Array.isArray(f.children)&&f.children.forEach(w=>{w.id=(0,t.nanoid)(10)});const S=_.create(Object.assign({id:(0,t.nanoid)(10)},f));return c.children.push(S),S.selectable&&!E&&c.store.selectElements([S.id]),S},canMoveElementsUp(f){let E=!1;return c._forEachElementUp(f,()=>{E=E||!0}),E},moveElementsUp(f){c._forEachElementUp(f,E=>{const _=c.children[E];(0,i.detach)(_),c.children.splice(E+1,0,_)})},canMoveElementsTop(f){return this.canMoveElementsUp(f)},moveElementsTop(f){const E=[],_=[];c.children.forEach(S=>{f.indexOf(S.id)>=0?E.push(S):_.push(S)}),c.children.replace(_.concat(E))},canMoveElementsDown(f){let E=!1;return c._forEachElementDown(f,()=>{E=E||!0}),E},moveElementsDown(f){c._forEachElementDown(f,E=>{const _=c.children[E];(0,i.detach)(_),c.children.splice(E-1,0,_)})},canMoveElementsBottom(f){return this.canMoveElementsDown(f)},moveElementsBottom(f){const E=[],_=[];c.children.forEach(S=>{f.indexOf(S.id)>=0?E.push(S):_.push(S)}),c.children.replace(E.concat(_))},setElementZIndex(f,E){const _=c.children.find(S=>S.id===f);_&&((0,i.detach)(_),c.children.remove(_),c.children.splice(E,0,_))},setSize({width:f,height:E,useMagic:_,softChange:S}){if(_){const w=[],b=A=>A.type==="image"&&A.x<1&&A.y<1&&A.width>=c.computedWidth-2&&A.height>=c.computedHeight-2;(0,l.forEveryChild)(c,A=>{A.type!=="group"&&(b(A)||w.push(A))});const y=w.length?(0,s.getTotalClientRect)(w):{x:0,y:0,width:c.computedWidth,height:c.computedHeight},v=1/4,g=Math.max(0,Math.min(y.x,c.computedWidth-y.x-y.width)),O=c.computedWidth*v,h=Math.max(0,g-O),p=Math.max(0,Math.min(y.y,c.computedHeight-y.y-y.height)),m=c.computedHeight*v,x=Math.max(0,p-m),N=c.computedWidth-2*h,T=c.computedHeight-2*x,I=f/N,R=E/T,C=Math.min(I,R),M=(f-N*C)/2-h*C,k=(E-T*C)/2-x*C;(0,l.forEveryChild)(c,A=>{A.type!=="group"&&(b(A)?A.set({x:A.x*C,y:A.y*C,width:A.width*I,height:A.height*R,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(A.set({x:M+A.x*C,y:k+A.y*C,width:A.width*C,height:A.height*C}),A.type==="text"?A.set({fontSize:A.fontSize*C}):A.type==="figure"&&A.set({strokeWidth:A.strokeWidth*C})))})}S||(c.width=f),S||(c.height=E)}})).actions(c=>({moveElementUp(f){c.moveElementsUp([f])},moveElementDown(f){c.moveElementsDown([f])},moveElementTop(f){c.moveElementsTop([f])},moveElementBottom(f){c.moveElementsBottom([f])},play(){c.store.play({startTime:c.startTime,endTime:c.startTime+c.duration})}}))}(L1)),L1}var N1={},$3;function RP(){return $3||($3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;const i=la;e.Audio=i.types.model("Audio",{id:i.types.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(t=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(t))})).actions(t=>({set(r){Object.assign(t,r)}}))}(N1)),N1}var W3;function tm(){return W3||(W3=1,function(e){var i=ji&&ji.__createBinding||(Object.create?function(R,C,M,k){k===void 0&&(k=M);var A=Object.getOwnPropertyDescriptor(C,M);A&&!("get"in A?!C.__esModule:A.writable||A.configurable)||(A={enumerable:!0,get:function(){return C[M]}}),Object.defineProperty(R,k,A)}:function(R,C,M,k){k===void 0&&(k=M),R[k]=C[M]}),t=ji&&ji.__setModuleDefault||(Object.create?function(R,C){Object.defineProperty(R,"default",{enumerable:!0,value:C})}:function(R,C){R.default=C}),r=ji&&ji.__importStar||function(){var R=function(C){return R=Object.getOwnPropertyNames||function(M){var k=[];for(var A in M)Object.prototype.hasOwnProperty.call(M,A)&&(k[k.length]=A);return k},R(C)};return function(C){if(C&&C.__esModule)return C;var M={};if(C!=null)for(var k=R(C),A=0;A<k.length;A++)k[A]!=="default"&&i(M,C,k[A]);return t(M,C),M}}(),a=ji&&ji.__rest||function(R,C){var M={};for(var k in R)Object.prototype.hasOwnProperty.call(R,k)&&C.indexOf(k)<0&&(M[k]=R[k]);if(R!=null&&typeof Object.getOwnPropertySymbols=="function"){var A=0;for(k=Object.getOwnPropertySymbols(R);A<k.length;A++)C.indexOf(k[A])<0&&Object.prototype.propertyIsEnumerable.call(R,k[A])&&(M[k[A]]=R[k[A]])}return M},l=ji&&ji.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=I;const s=la,c=EP(),f=Zp,E=l(Hi()),_=xP(),S=OP(),w=PP(),b=Jv(),y=r(Yd()),v=ru(),g=em(),O=i_(),h=CP(),p=AP(),m=TP(),x=o_(),N=Fd(),T=RP();function I({key:R,showCredit:C}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:C,_key:R})}(0,s.setLivelinessChecking)("ignore"),e.Font=s.types.model("Font",{fontFamily:s.types.string,url:s.types.optional(s.types.string,""),styles:s.types.frozen()}).preProcessSnapshot(R=>Object.assign(Object.assign({},R),{fontFamily:R.fontFamily||R.name})),e.Store=s.types.model("Store",{role:"",pages:s.types.array(x.Page),fonts:s.types.array(e.Font),audios:s.types.array(T.Audio),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:s.types.frozen(),selectedElementsIds:s.types.array(s.types.string),animatedElementsIds:s.types.array(s.types.string),history:s.types.optional(c.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(R=>({get _bleedVisible(){return R.bleedVisible},get selectedElements(){return R.selectedElementsIds.map(C=>{for(const M of R.pages)for(const k of M.children)if(k.id===C)return k}).filter(C=>!!C)},get children(){return R.pages},get selectedShapes(){const C=[];return(0,N.forEveryChild)({children:R.selectedElements},M=>{M.type!=="group"&&C.push(M)}),C},get activePage(){return R.pages.slice().find(C=>C.id===R._activePageId)||(R.pages.length?R.pages[0]:null)},get duration(){let C=0;return R.pages.forEach(M=>{C+=M.duration}),C},get _hasCroppedImages(){return R.find(C=>C.type==="image"&&C._cropModeEnabled)},find(C){let M;return(0,N.forEveryChild)({children:R.pages},k=>{if(!M&&C(k))return M=k,!0}),M},getElementById:C=>R.find(M=>M.id===C)})).actions(R=>{let C=0,M=null,k=!1;return{afterCreate(){R.history.canUndo},setCurrentTime(A){R.currentTime=A},_togglePlaying(A=!R.isPlaying){R.isPlaying=A},play({animatedElementsIds:A=[],startTime:L=0,currentTime:z=0,endTime:Y=R.duration,repeat:$=!1}={}){z&&(L=z),R.animatedElementsIds=(0,s.cast)(A),R.currentTime=L,R.isPlaying=!0,C=Date.now(),M=Y,k=$,requestAnimationFrame(R.seek)},checkActivePage(){let A=0;for(const L of R.pages){if(R.currentTime>=L.startTime&&R.currentTime<L.startTime+L.duration){R.selectPage(L.id);break}A+=L.duration}},seek(){if(!R.isPlaying)return;const A=Date.now(),L=A-C;C=A,R.currentTime+=L,R.checkActivePage();const z=M||R.duration;R.isPlaying&&R.currentTime<z?requestAnimationFrame(R.seek):R.isPlaying&&k?(R.currentTime=0,requestAnimationFrame(R.seek)):R.stop()},stop(){R.isPlaying=!1,R.currentTime=0,R.animatedElementsIds=(0,s.cast)([]),R.checkActivePage()}}}).actions(R=>({__(){R._validated||((0,b.validateKey)(R._key,R._forceShowCredit),R._validated=!0)},set(C){Object.assign(R,C)},setUnit({unit:C,dpi:M}){R.unit=C||R.unit,R.dpi=M||R.dpi},setRole(C){R.role=C},addPage(C){const M=x.Page.create(Object.assign({id:(0,f.nanoid)(10)},C));return R.pages.push(M),R._activePageId=M.id,M},selectPage(C){R._activePageId=C},selectElements(C){const M=C.map(k=>R.getElementById(k)).sort((k,A)=>k.page.children.indexOf(k)-k.page.children.indexOf(A)).filter(k=>!!k).map(k=>k.id);R.selectedElementsIds=(0,s.cast)(M)},toggleBleed(C){R.bleedVisible=C??!R.bleedVisible},toggleRulers(C){R.rulesVisible=C??!R.rulesVisible},openSidePanel(C){R.openedSidePanel!==C&&(R.previousOpenedSidePanel=R.openedSidePanel,R.openedSidePanel=C)},setScale(C){R.scale=C},_setScaleToFit(C){R.scaleToFit=C},setElementsPixelRatio(C){R._elementsPixelRatio=C},setSize(C,M,k){R.pages.forEach(A=>{A.setSize({width:C,height:M,useMagic:k,softChange:!0})}),R.width=C,R.height=M},setPageZIndex(C,M){const k=R.pages.find(A=>A.id===C);k&&((0,s.detach)(k),R.pages.remove(k),R.pages.splice(M,0,k))},deletePages(C){const M=R.pages.indexOf(R.activePage);C.forEach(L=>{const z=R.pages.find(Y=>Y.id===L);(0,s.destroy)(z)});const k=Math.min(R.pages.length-1,M),A=R.pages[k];A&&(R._activePageId=A.id),R.selectedElementsIds=(0,s.cast)(R.selectedElementsIds.filter(L=>R.getElementById(L)))},groupElements(C){const M=C.map(L=>R.getElementById(L));M.forEach(L=>{L&&(0,s.detach)(L)});const k=R.activePage,A={id:(0,f.nanoid)(10),children:M,type:"group"};return k.children.push(A),R.selectedElementsIds=(0,s.cast)([A.id]),k.children.find(L=>L.id===A.id)},ungroupElements(C){const M=C.map(A=>R.getElementById(A)),k=[];M.forEach(A=>{if(A&&A.type==="group"){const L=A.page,z=L.children.indexOf(A);A.children.forEach(Y=>{k.push(Y.id)}),A.children.forEach(Y=>{(0,s.detach)(Y),L.children.push(Y)}),L.children.splice(z,1)}}),R.selectedElementsIds=(0,s.cast)(k)},deleteElements(C){const M=[];R.find(k=>(C.includes(k.id)&&M.push(k),!1)),M.forEach(k=>{(0,s.destroy)(k)}),R.selectedElementsIds=(0,s.cast)(R.selectedElementsIds.filter(k=>R.getElementById(k)))},on(C,M){if(C==="change"){let k=R.toJSON();return(0,s.onSnapshot)(R,A=>{const L=R.toJSON();!(0,O.deepEqual)(k,L)&&(k=L,M(L))})}},async _toCanvas({pixelRatio:C,ignoreBackground:M,pageId:k,mimeType:A,includeBleed:L,_skipTimeout:z,quickMode:Y=!1}={}){var $;const X=C||1;k=k||(($=R.pages[0])===null||$===void 0?void 0:$.id);const q=R.pages.find(pe=>pe.id===k);if(!q)throw new Error(`No page for export with id ${k}`);Y?q==null||q.set({_forceMount:!0}):q==null||q.set({_exporting:!0});const D=await(0,h.waitTillAvailable)(()=>E.default.stages.find(pe=>pe.getAttr("pageId")===k));if(!D)throw q==null||q.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can not find stage for page ${k}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const B=!!D.findOne(".page-container"),U=R._elementsPixelRatio;X>R._elementsPixelRatio&&R.setElementsPixelRatio(X),await R.waitLoading({_skipTimeout:z});const W=D.findOne(".page-container");if(!W)throw R.setElementsPixelRatio(U),q==null||q.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can't find page container. ${B}`);const ee=D.position();D.position({x:0,y:0}),D.find("Transformer").forEach(pe=>{pe.setAttr("oldVisible",pe.visible()),pe.visible(!1)}),W.find(".page-background").forEach(pe=>pe.shadowEnabled(!1)),W.find(".page-background").forEach(pe=>pe.strokeEnabled(!1)),W.find(".highlighter").forEach(pe=>pe.visible(!1));const ne=W.findOne(".page-background-group"),te=ne.clip();ne.clip({x:null,y:null,width:null,height:null});const Z=W.findOne(".elements-container"),ae=Z.clip();Z.clip({x:null,y:null,width:null,height:null});const H=W.find(pe=>pe.getAttr("hideInExport"));H.forEach(pe=>{pe.setAttr("oldVisible",pe.visible()),pe.hide()});const J=W.find(pe=>!pe.visible()&&pe.getAttr("editModeEnabled"));J.forEach(pe=>{pe.setAttr("oldVisible",pe.visible()),pe.show()}),M&&W.find(".page-background").forEach(pe=>pe.hide());const ie=L?q.bleed:0;let le=ie;!R.bleedVisible&&L||(R.bleedVisible||L?R.bleedVisible&&L?le=0:R.bleedVisible&&!L&&(le=-q.bleed):le=0);const ue=document.createElement("canvas");ue.width=Math.round((q.computedWidth+2*ie)*X),ue.height=Math.round((q.computedHeight+2*ie)*X);const he=ue.getContext("2d");A==="image/jpeg"&&(he.fillStyle="white",he.fillRect(0,0,ue.width,ue.height));const ye=W.scale();W.scale({x:1,y:1});const Ce=W.toCanvas({x:W.x()-le,y:W.y()-le,width:q.computedWidth+2*ie,height:q.computedHeight+2*ie,pixelRatio:X});return W.scale(ye),he.drawImage(Ce,0,0,ue.width,ue.height),E.default.Util.releaseCanvas(Ce),M&&W.find(".page-background").forEach(pe=>pe.show()),H.forEach(pe=>{pe.visible(pe.getAttr("oldVisible"))}),J.forEach(pe=>{pe.visible(pe.getAttr("oldVisible"))}),W.find(".page-background").forEach(pe=>pe.shadowEnabled(!0)),W.find(".page-background").forEach(pe=>pe.strokeEnabled(!0)),D.find("Transformer").forEach(pe=>{pe.visible(pe.getAttr("oldVisible"))}),W.find(".highlighter").forEach(pe=>pe.visible(!0)),ne.clip(te),Z.clip(ae),D.position(ee),R.setElementsPixelRatio(U),q==null||q.set({_exporting:!1,_forceMount:!1}),ue},async toDataURL(C={}){var{mimeType:M,quality:k}=C,A=a(C,["mimeType","quality"]);const L=await R._toCanvas(Object.assign({mimeType:M},A)),z=L.toDataURL(M,k);return E.default.Util.releaseCanvas(L),z},async toBlob(C={}){var{mimeType:M,quality:k}=C,A=a(C,["mimeType","quality"]);const L=await R._toCanvas(Object.assign({mimeType:M},A)),z=await new Promise(Y=>{L.toBlob(Y,M,k)});return E.default.Util.releaseCanvas(L),z},async saveAsImage(C={}){var{fileName:M}=C,k=a(C,["fileName"]);const A=k.mimeType||"image/png",L=A.split("/")[1];(0,_.downloadFile)(await R.toDataURL(k),M||"polotno."+L,A)},async _toPDF(C){const M=C.dpi||R.dpi,k=C.parallel||1,A=C.unit||(R.unit==="px"?"mm":R.unit),L=C.pixelRatio||1,z=C.pageIds||R.pages.map(ae=>ae.id),Y=R.pages.filter(ae=>z.includes(ae.id)),$=await(0,S.getJsPDF)(),X=ae=>(0,g.pxToUnit)({px:ae,unit:A,dpi:M}),q=C.cropMarkSize||0,D=X(q),B=Y[0]||{},U=C.includeBleed?B.bleed:0,W=X(B.computedWidth+2*U+2*D),ee=X(B.computedHeight+2*U+2*D);var ne=new $({unit:A,orientation:W>ee?"landscape":"portrait",format:[W,ee],compress:!0,putOnlyUsedFonts:!0});ne.deletePage(1);const te=((ae,H)=>{for(var J=[],ie=0;ie<ae.length;ie+=H)J.push(ae.slice(ie,ie+H));return J})(Y,k);let Z=0;for(const ae of te){const H=ae.map(async J=>{const ie=C.includeBleed?J.bleed:0,le=J.computedWidth+2*ie+2*q,ue=J.computedHeight+2*ie+2*q,he=X(le),ye=X(ue);let Ce=0,pe=L;for(;Ce<10;){Ce+=1;const fe=await R.toDataURL(Object.assign(Object.assign({},C),{pageId:J.id,pixelRatio:pe}));if(fe.length>20)return C.onProgress&&C.onProgress(++Z/z.length*.9),{url:fe,width:he,height:ye,widthPx:le,heightPx:ue};pe*=.8}});(await Promise.all(H)).forEach(({url:J,width:ie,height:le,widthPx:ue,heightPx:he})=>{ne.addPage([ie,le],ie>le?"landscape":"portrait");const ye=ne.getCurrentPageInfo();var Ce;switch(A){case"pt":Ce=1;break;case"mm":Ce=72/25.4;break;case"cm":Ce=72/2.54;break;case"in":Ce=72;break;case"px":Ce=.75;break;case"pc":case"em":Ce=12;break;case"ex":Ce=6;break;default:throw"Invalid unit: "+A}if(ye.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:ie*Ce,topRightY:le*Ce},ye.pageContext.artBox={bottomLeftX:X(q+U)*Ce,bottomLeftY:X(q+U)*Ce,topRightX:X(ue-q-U)*Ce,topRightY:X(he-q-U)*Ce},ye.pageContext.bleedBox={bottomLeftX:X(q+U)*Ce,bottomLeftY:X(q+U)*Ce,topRightX:X(ue-q-U)*Ce,topRightY:X(he-q-U)*Ce},D){ne.setLineWidth(X(1));const pe=D+X(U);ne.line(pe,0,pe,D),ne.line(0,pe,D,pe),ne.line(ie-pe,0,ie-pe,D),ne.line(ie,pe,ie-D,pe),ne.line(0,le-pe,D,le-pe),ne.line(pe,le,pe,le-D),ne.line(ie,le-pe,ie-D,le-pe),ne.line(ie-pe,le,ie-pe,le-D)}ne.addImage(J,D,D,ie-2*D,le-2*D,void 0,"FAST")})}return ne},toPDFDataURL:async C=>(await R._toPDF(Object.assign({mimeType:"image/jpeg"},C))).output("datauristring"),async toGIFDataURL(C={}){const M=C.pixelRatio||1,k=await(0,w.createGIF)({width:R.width*M,height:R.height*M}),A=1e3/(C.fps||10),L=R.duration/A;for(let z=0;z<L-1;z++){const Y=z*A||1;R.setCurrentTime(Y);let $=0,X="";for(const D of R.pages)if($+=D.duration,D.set({_rendering:$>Y}),$>Y){X=D.id;break}const q=await R._toCanvas({pixelRatio:M,pageId:X,_skipTimeout:!0});k.addFrame(q.getContext("2d"),{delay:A,copy:!0})}for(const z of R.pages)z.set({_rendering:!1});return R.stop(),k.render(),new Promise(z=>{k.on("finished",function(Y){(function($,X){var q=new FileReader;q.onload=function(D){X(D.target.result)},q.readAsDataURL($)})(Y,z)})})},async saveAsGIF(C={}){var{fileName:M}=C,k=a(C,["fileName"]);const A=await R.toGIFDataURL(k);(0,_.downloadFile)(A,M||"polotno.gif")},async toHTML({elementHook:C}={elementHook:void 0}){const M=R.toJSON();return(0,p.jsonToHTML)({json:M,elementHook:C})},async saveAsHTML({fileName:C}={}){const M=await R.toHTML(),k="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(M)));(0,_.downloadFile)(k,C||"polotno.html")},async toSVG({elementHook:C,pageId:M}={elementHook:void 0,pageId:void 0}){var k;const A=R.toJSON();M=M||((k=A.pages[0])===null||k===void 0?void 0:k.id);const L=A.pages.find(z=>z.id===M);return(0,m.jsonToSVG)({json:Object.assign(Object.assign({},A),{pages:L?[L]:[]}),elementHook:C})},async saveAsSVG({fileName:C,elementHook:M,pageId:k}={}){const A=await R.toSVG({elementHook:M,pageId:k}),L="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(A)));(0,_.downloadFile)(L,C||"polotno.svg")},async saveAsPDF(C={}){var{fileName:M}=C,k=a(C,["fileName"]);(await R._toPDF(Object.assign({mimeType:"image/jpeg"},k))).save(M||"polotno.pdf")},async waitLoading({_skipTimeout:C=!1}={}){C||await new Promise(M=>setTimeout(M,50)),await(0,v.whenLoaded)()},toJSON:()=>({width:R.width,height:R.height,fonts:(0,s.getSnapshot)(R.fonts),pages:(0,s.getSnapshot)(R.pages),audios:(0,s.getSnapshot)(R.audios),unit:R.unit,dpi:R.dpi,custom:R.custom}),loadJSON(C,M=!1){var k;const A=Object.assign({},C),L=R.pages.indexOf(R.activePage);let z=(k=A.pages[L]||A.pages[0])===null||k===void 0?void 0:k.id;A._activePageId=z;const Y=Object.assign({},(0,s.getSnapshot)(R));Object.assign(Y,A),Y.history=M?R.history.toJSON():{history:[],undoIdx:-1},(0,s.applySnapshot)(R,Y)},clear({keepHistory:C=!1}={}){const M=R.pages.map(k=>k.id);R.deletePages(M),R.custom=null,C||R.history.clear()},addFont(C){R.removeFont(C.fontFamily),R.fonts.push(C),R.loadFont(C.fontFamily)},removeFont(C){R.fonts.filter(M=>M.fontFamily===C).forEach(M=>(0,s.destroy)(M))},addAudio(C){const M=T.Audio.create(Object.assign({id:(0,f.nanoid)(10)},C));R.audios.push(M)},removeAudio(C){const M=R.audios.find(k=>k.id===C);M&&R.audios.remove(M)},async loadFont(C){const M=R.fonts.find(A=>A.fontFamily===C)||y.globalFonts.find(A=>A.fontFamily===C);let k=[{fontStyle:"normal",fontWeight:"normal"}];return M?(M.styles&&(k=M.styles.map(A=>({fontStyle:A.fontStyle||"normal",fontWeight:A.fontWeight||"normal"}))),y.injectCustomFont(M)):y.injectGoogleFont(C),Promise.all(k.map(A=>y.loadFont(C,A.fontStyle,A.fontWeight)))},validate:C=>e.Store.validate(C,[{path:"",type:e.Store}]).map(M=>({path:"store"+M.context.map(k=>k.path).join("."),message:M.message}))})),e.default=I}(ji)),ji}var Y3;function l_(){return Y3||(Y3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const i=la,t=Zp,r=tm(),a=o_(),l=Fd();e.Node=i.types.model("Node",{id:i.types.identifier,type:"none",name:"",opacity:1,custom:i.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(s=>{for(var c in s)s[c]===null&&(s[c]=void 0);return s}).postProcessSnapshot(s=>{const c=Object.assign({},s),f={};for(var E in c)E[0]!=="_"&&(f[E]=s[E]);return f}).views(s=>({get locked(){return!(s.draggable||s.contentEditable||s.styleEditable||s.resizable)},get page(){return(0,i.getParentOfType)(s,a.Page)},get store(){return(0,i.getParentOfType)(s,r.Store)},get top(){let c=s;for(;;){if(!(0,i.hasParentOfType)(c,l.GroupElement))return c;c=(0,i.getParentOfType)(c,l.GroupElement)}},get parent(){return(0,i.hasParentOfType)(s,l.GroupElement)?(0,i.getParentOfType)(s,l.GroupElement):(0,i.hasParentOfType)(s,a.Page)?(0,i.getParentOfType)(s,a.Page):(0,i.hasParentOfType)(s,r.Store)?(0,i.getParentOfType)(s,r.Store):null},get zIndex(){return s.parent.children.indexOf(s)}})).actions(s=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(s))})).actions(s=>({clone(c={},{skipSelect:f=!1}={}){const E=JSON.parse(JSON.stringify(s.toJSON()));return c.id=c.id||(0,t.nanoid)(10),(0,l.forEveryChild)(E,_=>{_.id=(0,t.nanoid)(10)}),Object.assign(E,c),s.page.addElement(E,{skipSelect:f})},set(c){Object.assign(s,c)},moveUp(){s.page.moveElementsUp([s.id])},moveTop(){s.page.moveElementsTop([s.id])},moveDown(){s.page.moveElementsDown([s.id])},moveBottom(){s.page.moveElementsBottom([s.id])},setZIndex(c){s.parent.setElementZIndex(s.id,c)},beforeDestroy(){}}))}(E1)),E1}var I1={},j1={},K3;function MP(){return K3||(K3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const i=Cc(),t={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}},r={right:{cropX:-1},left:{cropX:1},up:{cropY:1},down:{cropY:-1}};e.animations={fade:({dTime:s,element:c,animation:f})=>{const E=s/f.duration;return f.type==="enter"?{opacity:E*c.opacity}:{opacity:(1-E)*c.opacity}},rotate:({dTime:s,element:c,animation:f})=>{const E=s/f.duration*360;return(0,i.rotateAroundCenter)({x:c.x,y:c.y,width:c.width,height:c.height,rotation:c.rotation},E)},blink:({dTime:s,element:c,animation:f})=>{const E=f.duration,_=s%E/(E/2),S=_<=1?_:2-_;return{opacity:c.opacity*S}},bounce:({dTime:s,element:c,animation:f})=>{var E;const _=f.duration,S=_/2,w=(E=f.data.strength)!==null&&E!==void 0?E:1,b={},y={x:c.x+c.width/3*w,y:c.y+c.height/3*w,width:c.width/3*w,height:c.height/3*w,fontSize:c.fontSize/3*w},v={x:c.x,y:c.y,width:c.width,height:c.height,fontSize:c.fontSize},g=s%_/S,O=g<=1?g:2-g;for(let h in y){const p=y[h],m=v[h]-p;b[h]=p+O*m}return b},move:({dTime:s,element:c,animation:f})=>{var E;const _=t[f.data.direction]||t.right,S=(E=f.data.strength)!==null&&E!==void 0?E:1,w={};for(var b in _.from){let y=_.from[b],v=_.to[b];f.type==="exit"&&(y=_.to[b],v=-_.from[b]),y*=S,v*=S;const g=c[b]+y,O=c[b]+v-g;w[b]=g+s/f.duration*O}return w},zoom:({dTime:s,element:c,animation:f})=>{var E;const _={},S=f.data.direction||"in",w=1+((S==="in"?3/4:5/4)-1)*((E=f.data.strength)!==null&&E!==void 0?E:1),b=c.rotation*Math.PI/180,y=Math.cos(b),v=Math.sin(b),g=c.width*(1-w),O=c.height*(1-w),h=(g*y-O*v)/2,p=(g*v+O*y)/2,m={x:c.x+h,y:c.y+p,width:c.width*w,height:c.height*w,fontSize:c.fontSize*w},x={x:c.x,y:c.y,width:c.width,height:c.height,fontSize:c.fontSize};for(var N in m){let T=m[N],I=x[N];if(f.type==="exit"){const C=T;T=I,I=C}const R=I-T;_[N]=T+s/f.duration*R}return _},cameraZoom:({dTime:s,element:c,animation:f})=>{var E,_,S;const w={},b=f.data.direction||"right",y=r[b]||r.right,v=(E=f.data.movementStrength)!==null&&E!==void 0?E:.1,g=(_=f.data.shakeStrength)!==null&&_!==void 0?_:.015;S=f.data.zoomStrength;const O=s/f.duration,h=g*(1-O),p=Math.sin(12*O)*h*.7+Math.sin(8*O)*h*.3;f.type==="exit"&&Math.max(c.cropWidth||1,c.cropHeight||1),f.type;const m=1-Math.pow(1-O,2),x=c.cropX||0,N=c.cropY||0,T=c.cropWidth||1,I=c.cropHeight||1,R=T,C=I;let M,k,A=0,L=0;if(y.cropX){const z=y.cropX>0?1-(x+T):x;A=Math.min(z,Math.abs(v))*y.cropX}if(y.cropY){const z=y.cropY>0?1-(N+I):N;L=Math.min(z,Math.abs(v))*y.cropY}return f.type==="enter"?(M=y.cropX?x+A*(1-m):x,k=y.cropY?N+L*(1-m):N):(M=y.cropX?x+A*m:x,k=y.cropY?N+L*m:N),w.cropX=Math.max(0,Math.min(1-R,M+p*R)),w.cropY=Math.max(0,Math.min(1-C,k+p*C)),w.cropWidth=R,w.cropHeight=C,w}};const a=({element:s,dTime:c,animation:f})=>{const E=e.animations[f.name];return E?E({element:s,dTime:c,animation:f}):{}};e.animate=a;const l=(s,c)=>{e.animations[s],e.animations[s]=c};e.registerAnimation=l}(j1)),j1}var X3;function kc(){return X3||(X3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.ShapeFilter=e.getDiff=e.Animation=void 0;const i=la,t=MP(),r=oa,a=l_();e.Animation=i.types.model("Animation",{delay:0,duration:500,enabled:!0,type:i.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:i.types.frozen({})});const l=(s,c)=>{const f={};for(const E in c)if(typeof s[E]=="number"&&typeof c[E]=="number"){const _=c[E]-s[E];_!==0&&(f[E]=_)}return f};e.getDiff=l,e.ShapeFilter=i.types.model("ShapeFilter",{intensity:1}),e.Shape=a.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:i.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,filters:i.types.map(e.ShapeFilter),shadowEnabled:!1,shadowBlur:5,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"black",shadowOpacity:1,visible:!0,draggable:!0,resizable:!0,selectable:!0,contentEditable:!0,styleEditable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(s=>{const c=Object.assign(Object.assign({},s),{x:s.x||0,y:s.y||0,filters:Array.isArray(s.filters)?{}:s.filters});return"width"in s&&(c.width=c.width||1),"height"in s&&(c.height=c.height||1),s.locked&&(c.draggable=!1,c.contentEditable=!1,c.styleEditable=!1,c.resizable=!1,c.removable=!1),c}).views(s=>{const c=(0,r.observable)({x:s.x,y:s.y,width:s.width,height:s.height,rotation:s.rotation,opacity:s.opacity,color:s.color,fontSize:s.fontSize}),f=(0,r.action)(_=>{Object.assign(c,_)}),E=(0,r.action)(_=>{for(const S in _)typeof c[S]=="number"&&(c[S]=c[S]+_[S])});return{get a(){const{currentTime:_}=s.store;if(f({x:s.x,y:s.y,width:s.width,height:s.height,rotation:s.rotation,opacity:s.opacity,color:s.color,fontSize:s.fontSize,cropX:s.cropX,cropY:s.cropY,cropWidth:s.cropWidth,cropHeight:s.cropHeight}),_===0)return c;const S=_-s.page.startTime;if(S>s.page.duration||S<0)return c;const w=s.store.animatedElementsIds;if(w.length&&!w.includes(s.id))return c;const b=s.animations.find(h=>h.type==="enter"),y=(b==null?void 0:b.enabled)&&S<b.delay;y&&f({opacity:0});const v=(b==null?void 0:b.enabled)&&S>=b.delay&&S<=b.delay+b.duration;if(v){const h=S-b.delay,p=(0,t.animate)({element:s,animation:b,dTime:h}),m=(0,e.getDiff)(s,p);E(m)}const g=s.animations.find(h=>h.type==="exit");if(!y&&!v&&(g!=null&&g.enabled)&&S>=s.page.duration-g.duration-g.delay&&S<=s.page.duration-g.delay){const h=S-(s.page.duration-g.duration-g.delay),p=(0,t.animate)({element:s,animation:g,dTime:h}),m=(0,e.getDiff)(s,p);E(m)}g!=null&&g.enabled&&S>=s.page.duration-g.delay&&f({opacity:0});const O=s.animations.find(h=>h.type==="loop");if(O!=null&&O.enabled){const h=S,p=(0,t.animate)({element:s,animation:O,dTime:h}),m=(0,e.getDiff)(s,p);E(m)}return c},animated:_=>s.a[_]}}).actions(s=>({setAnimation(c,f){const E=s.animations.find(_=>_.type===c);E?Object.assign(E,f):s.animations.push(Object.assign({type:c},f))},setFilter(c,f){s.filters.clear(),f!==0&&s.filters.set(c,{intensity:f})}}))}(I1)),I1}var D1={},Z3;function LP(){return Z3||(Z3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const i=la,t=kc();e.TextElement=t.Shape.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:i.types.optional(i.types.union(i.types.number,i.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(r=>Object.assign({},r)).actions(r=>({toggleEditMode(a){r._editModeEnabled=a??!r._editModeEnabled,r._editModeEnabled?r.store.history.startTransaction():r.store.history.endTransaction()}}))}(D1)),D1}var F1={},Q3;function rm(){return Q3||(Q3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const i=kc();e.ImageElement=i.Shape.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,keepRatio:!1,_cropModeEnabled:!1}).actions(t=>({toggleCropMode(r){t._cropModeEnabled=r??!t._cropModeEnabled,t._cropModeEnabled?t.store.history.startTransaction():t.store.history.endTransaction()},beforeDestroy(){t._cropModeEnabled&&t.store.history.endTransaction()}}))}(F1)),F1}var z1={},J3;function NP(){return J3||(J3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const i=rm();e.VideoElement=i.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(z1)),z1}var B1={},e5;function IP(){return e5||(e5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const i=la,t=kc();e.LineElement=t.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:i.types.array(i.types.number),startHead:"",endHead:""}).actions(r=>({}))}(B1)),B1}var U1={},t5;function jP(){return t5||(t5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const i=la,t=kc();e.SVGElement=t.Shape.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:i.types.map(i.types.string)}).preProcessSnapshot(r=>Object.assign(Object.assign({},r),{src:r.src||r.svgSource,colorsReplace:Array.isArray(r.colorsReplace)?{}:r.colorsReplace})).actions(r=>({replaceColor(a,l){r.colorsReplace.set(a,l)}}))}(U1)),U1}var q1={},r5;function DP(){return r5||(r5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const i=la,t=kc();e.FigureElement=t.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:i.types.array(i.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(q1)),q1}var H1={},n5;function FP(){return n5||(n5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GifElement=void 0;const i=rm();e.GifElement=i.ImageElement.named("Gif").props({type:"gif",duration:0,keepRatio:!0})}(H1)),H1}var i5;function Fd(){return i5||(i5=1,function(e){var i=Od&&Od.__rest||function(O,h){var p={};for(var m in O)Object.prototype.hasOwnProperty.call(O,m)&&h.indexOf(m)<0&&(p[m]=O[m]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var x=0;for(m=Object.getOwnPropertySymbols(O);x<m.length;x++)h.indexOf(m[x])<0&&Object.prototype.propertyIsEnumerable.call(O,m[x])&&(p[m[x]]=O[m[x]])}return p};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=g;const t=la,r=Zp,a=l_(),l=kc(),s=LP(),c=rm(),f=NP(),E=IP(),_=jP(),S=DP(),w=FP(),b=(O,h)=>{if(O.children)for(const p of O.children){if(h(p)===!0)break;(0,e.forEveryChild)(p,h)}};e.forEveryChild=b;const y=[...new Array(20)].map((O,h)=>t.types.late(()=>v[h]));e.ElementTypes=t.types.union({dispatcher:O=>{const h=e.TYPES_MAP[O.type];if(!h)throw new Error(`Unknown element type: "${O.type}"`);return h}},_.SVGElement,s.TextElement,c.ImageElement,E.LineElement,f.VideoElement,S.FigureElement,w.GifElement,t.types.late(()=>e.GroupElement),...y),e.GroupElement=a.Node.named("Group").props({type:"group",children:t.types.array(e.ElementTypes)}).views(O=>({get draggable(){let h=!0;return(0,e.forEveryChild)(O,p=>{p.draggable||(h=!1)}),h},get resizable(){let h=!0;return(0,e.forEveryChild)(O,p=>{p.resizable||(h=!1)}),h},get contentEditable(){let h=!0;return(0,e.forEveryChild)(O,p=>{p.contentEditable||(h=!1)}),h},get styleEditable(){let h=!0;return(0,e.forEveryChild)(O,p=>{p.styleEditable||(h=!1)}),h},get locked(){let h=!0;return(0,e.forEveryChild)(O,p=>{p.locked||(h=!1)}),h}})).actions(O=>({set(h){var{draggable:p,contentEditable:m,styleEditable:x,resizable:N}=h,T=i(h,["draggable","contentEditable","styleEditable","resizable"]);p!==void 0&&(0,e.forEveryChild)(O,I=>{I.set({draggable:p})}),m!==void 0&&(0,e.forEveryChild)(O,I=>{I.set({contentEditable:m})}),x!==void 0&&(0,e.forEveryChild)(O,I=>{I.set({styleEditable:x})}),N!==void 0&&(0,e.forEveryChild)(O,I=>{I.set({resizable:N})}),Object.assign(O,T)},addElement(h,{skipSelect:p=!1}={}){const m=e.TYPES_MAP[h.type];if(!m)return;h.children&&h.children.forEach(N=>{N.id=(0,r.nanoid)(10)});const x=m.create(Object.assign({id:(0,r.nanoid)(10)},h));return O.children.push(x),x.selectable&&!p&&O.store.selectElements([x.id]),x},setElementZIndex(h,p){const m=O.children.find(x=>x.id===h);m&&((0,t.detach)(m),O.children.remove(m),O.children.splice(p,0,m))}}));const v=[];function g(O,h){const p=O.type;if(!p)throw new Error('You must pass "type" attribute to custom model.');let m=l.Shape.named(p).props(O);h&&(m=h(m)),e.TYPES_MAP[p]=m,v.push(m)}e.TYPES_MAP={svg:_.SVGElement,text:s.TextElement,image:c.ImageElement,group:e.GroupElement,line:E.LineElement,video:f.VideoElement,figure:S.FigureElement,gif:w.GifElement}}(Od)),Od}var a5;function zP(){return a5||(a5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isClipboardEmpty=e.paste=e.cut=e.copy=void 0;const i=Fd(),t=Cc();let r={data:[],pageId:""};const a="polotno_clipboard",l=(S,w)=>{r={data:JSON.parse(JSON.stringify(S)),pageId:w};try{localStorage.setItem(a,JSON.stringify(S)),localStorage.setItem(a+"_page",w)}catch{}},s=()=>{try{const S=localStorage.getItem(a),w=localStorage.getItem(a+"_page");if(S)return{data:JSON.parse(S),pageId:w}}catch{}return r},c=S=>{var w;S.selectedElements.length!==0&&l(S.selectedElements.map(b=>b.toJSON()),(w=S.activePage)===null||w===void 0?void 0:w.id)};e.copy=c;const f=S=>{var w;l(S.selectedElements.map(y=>y.toJSON()),(w=S.activePage)===null||w===void 0?void 0:w.id);let b=S.selectedElements.filter(y=>y.removable).map(y=>y.id);S.deleteElements(b)};e.cut=f;const E=S=>{S.history.transaction(()=>{var w,b;let y=0,v=0;const{data:g,pageId:O}=s();if(O===((w=S.activePage)===null||w===void 0?void 0:w.id))y=S.width/20,v=S.height/20;else{const p=[];(0,i.forEveryChild)({children:g},x=>{x.type!=="group"&&p.push(x)});const m=(0,t.getTotalClientRect)(p);m.maxX>S.width&&(y=-m.minX),m.maxY>S.height&&(v=-m.minY)}const h=[];(0,i.forEveryChild)({children:g},p=>{delete p.id,p.type!=="group"&&(p.x+=y,p.y+=v)}),g.forEach(p=>{var m;const x=(m=S.activePage)===null||m===void 0?void 0:m.addElement(p);x&&h.push(x.id)}),l(g,(b=S.activePage)===null||b===void 0?void 0:b.id),S.selectElements(h)})};e.paste=E;const _=()=>s().data.length===0;e.isClipboardEmpty=_}(S1)),S1}var o5;function BP(){return o5||(o5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=t;const i=zP();function t(r,a){var l,s,c,f;if(((l=document.activeElement)===null||l===void 0?void 0:l.tagName)==="INPUT"||((s=document.activeElement)===null||s===void 0?void 0:s.tagName)==="TEXTAREA"||((c=document.activeElement)===null||c===void 0?void 0:c.contentEditable)==="true")return;const E=a.selectedElements.filter(w=>w.removable).map(w=>w.id);r.keyCode!==46&&r.keyCode!==8||a.deleteElements(E);const _=r.ctrlKey||r.metaKey,S=r.shiftKey;if(!_||S||r.key.toLowerCase()!=="z"&&r.key.toLowerCase()!=="y"||(r.preventDefault(),a.history.undo()),_&&S&&(r.key.toLowerCase()==="z"||r.key.toLowerCase()==="y")&&(r.preventDefault(),a.history.redo()),_&&r.code==="KeyA"){r.preventDefault();const w=(f=a.activePage)===null||f===void 0?void 0:f.children.filter(y=>y.selectable),b=(w==null?void 0:w.map(y=>y.id))||[];a.selectElements(b)}_&&r.code==="KeyC"&&(r.preventDefault(),(0,i.copy)(a)),_&&r.code==="KeyX"&&(r.preventDefault(),(0,i.cut)(a)),_&&r.code==="KeyV"&&(r.preventDefault(),(0,i.paste)(a)),r.code==="ArrowDown"&&(r.preventDefault(),a.selectedElements.forEach(w=>{w.draggable&&w.set({y:w.y+1})})),r.code==="ArrowUp"&&(r.preventDefault(),a.selectedElements.forEach(w=>{w.draggable&&w.set({y:w.y-1})})),r.code==="ArrowLeft"&&(r.preventDefault(),a.selectedElements.forEach(w=>{w.draggable&&w.set({x:w.x-1})})),r.code==="ArrowRight"&&(r.preventDefault(),a.selectedElements.forEach(w=>{w.draggable&&w.set({x:w.x+1})}))}}(_1)),_1}var G1={},l5;function UP(){return l5||(l5=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const i=oa,t=(0,i.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",filters:"Filters",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",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",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",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",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",strength:"Strength",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},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",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"Add file",uploadTip:"Upload your assets",background:"Background",resize:"Resize",layers:"Layers",animate:"Animate",layerTypes:{image:"Image",text:"Text",svg:"SVG",line:"Line",figure:"Figure",group:"Group"},layersTip:"Elements on your active page:",noLayers:"No elements on the page...",namePlaceholder:"Type element name...",useMagicResize:"Use magic resize",clipImage:"Mask image",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"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"},contextMenu:{duplicate:"Duplicate",remove:"Remove",lock:"Lock",unlock:"Unlock",copy:"Copy",paste:"Paste",copyStyle:"Copy style",moveUp:"Move up",moveDown:"Move down",moveBack:"Move back",moveForward:"Move forward"}});function r(_,S){var w,b=S.split("."),y=_;for(w=0;w<b.length;++w){if(y[b[w]]==null)return;y=y[b[w]]}return y}const a=_=>_&&typeof _=="object";function l(_,S){Object.keys(S).forEach(w=>{const b=_[w],y=S[w];a(y)&&a(b)?l(b,y):_[w]=y})}function s(_,S,w=""){Object.keys(S).forEach(b=>{const y=S[b],v=w?`${w}.${b}`:b;a(y)?a(_[b])&&s(_[b],y,v):_[b]})}e.setTranslations=(0,i.action)((_,{validate:S=!1}={})=>{S&&s(_,t),l(t,_)});const c=()=>(0,i.toJS)(t);e.getTranslations=c;const f={},E=_=>{const S=r(t,_);if(S!==void 0)return S;f[_]||(f[_]=!0);const w=_.split("."),b=w[w.length-1]||" ";return b.charAt(0).toUpperCase()+b.slice(1)};e.t=E}(G1)),G1}var s5;function qP(){return s5||(s5=1,function(e){var i=_f&&_f.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=i(Ar()),r=qi,a=i(vP()),l=mP(),s=yP(),c=BP(),f=UP(),E=(y,v,g,O,h,p)=>{const m=t.default.useRef({width:v,height:g}),x=t.default.useRef({top:0,left:0}),N=t.default.useRef(!1),T=t.default.useRef(h.pages.length);N.current=T.current!==h.pages.length,T.current=h.pages.length,t.default.useEffect(()=>{const I=y.current,R=C=>{x.current={top:I.scrollTop,left:I.scrollLeft}};return I.addEventListener("scroll",R),()=>{I.removeEventListener("scroll",R)}},[]),t.default.useLayoutEffect(()=>{if(!y.current||N.current)return;const I=y.current,R=(x.current.left+I.offsetWidth/2)/m.current.width,C=(x.current.top+I.offsetHeight/2)/m.current.height;p.current=!0,I.scrollLeft=R*v-I.offsetWidth/2,I.scrollTop=C*g-I.offsetHeight/2,m.current={width:v,height:g}},[O,v,g])},_=({element:y,scrollTop:v=0,duration:g=300,onFinish:O=()=>{}})=>{const h=y.scrollTop,p=v-h;let m=0,x=!1;if(g===0)return y.scrollTop=v,()=>{};const N=()=>{if(x)return;m+=20;const I=T(m,h,p,g);y.scrollTop=I,m<g?setTimeout(N,20):O()},T=(I,R,C,M)=>(I/=M/2)<1?C/2*I*I+R:-C/2*(--I*(I-2)-1)+R;return N(),()=>{x=!0}},S=(y,v,g,O,h,p)=>{const m=t.default.useRef(!1),x=t.default.useRef(null),N=t.default.useRef(!1);t.default.useEffect(()=>{const I=y.current,R=()=>{h.current};return I.addEventListener("scroll",R),()=>{I.removeEventListener("scroll",R)}},[]);const T=g.pages.indexOf(g.activePage);return t.default.useLayoutEffect(()=>{if(!g.activePage||!y.current||m.current)return;const I=y.current,R=g.pages.indexOf(g.activePage)*v;let C=()=>{};return(Math.abs(R-I.scrollTop)>.5*v||N.current)&&(N.current=!0,C=_({element:I,scrollTop:R,onFinish:()=>{N.current=!1},duration:g.isPlaying?0:300})),C},[g.activePage,T,g.isPlaying]),{handleScroll:I=>{if(p||N.current)return;m.current=!0,clearTimeout(x.current),x.current=setTimeout(()=>{m.current=!1},300);const R=I.currentTarget.childNodes[0].offsetHeight,C=I.currentTarget.scrollTop,M=Math.floor((C+O.height/3)/R),k=g.pages[M];k&&g.activePage!==k&&k.select()}}},w=({store:y})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,f.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{y.addPage()}},(0,f.t)("workspace.addPage"))),b=({width:y,height:v,xPadding:g,yPadding:O,backgroundColor:h})=>t.default.createElement("div",{style:{width:y+"px",height:v+"px",backgroundColor:h,paddingLeft:g+"px",paddingRight:g+"px",paddingTop:O+"px",paddingBottom:O+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,r.observer)(({store:y,pageControlsEnabled:v,backgroundColor:g,pageBorderColor:O,activePageBorderColor:h,bleedColor:p,components:m,onKeyDown:x,paddingX:N,paddingY:T,altCloneEnabled:I=!0,visiblePagesOffset:R,renderOnlyActivePage:C})=>{var M;const k=N??20,A=T??55,[L,z]=t.default.useState({width:100,height:100}),Y=t.default.useRef(L),$=t.default.useRef(null),X=t.default.useRef(null),q=y.bleedVisible?Math.max(0,...y.pages.map(pe=>pe.bleed)):0,D=Math.max(...y.pages.map(pe=>pe.computedWidth)),B=Math.max(...y.pages.map(pe=>pe.computedHeight)),U=((M=y.activePage)===null||M===void 0?void 0:M.computedHeight)||0,W=D+2*q,ee=(C?U:B)+2*q,ne=async({skipTimeout:pe}={skipTimeout:!1})=>{if(pe||await new Promise(Ne=>setTimeout(Ne,50)),$.current===null)return;const fe=$.current.getBoundingClientRect();fe.width===0||fe.height;const ve=X.current.clientWidth||fe.width,xe={width:ve,height:fe.height};(Y.current.width!==xe.width||Y.current.height!==xe.height)&&(z(xe),Y.current=xe);const Te=(ve-2*k)/W,ce=y.pages.length>1?3.1:2,me=(fe.height-A*ce)/ee,Oe=Math.max(Math.min(Te,me),.01);y.scaleToFit!==Oe&&(y.setScale(Oe),y._setScaleToFit(Oe))};t.default.useLayoutEffect(()=>{ne({skipTimeout:!0})},[]),t.default.useEffect(()=>{ne()},[W,ee]),t.default.useEffect(()=>{y.__()},[]),t.default.useEffect(()=>{const pe=$.current;if(window.ResizeObserver){const fe=new ResizeObserver(()=>{ne({skipTimeout:!0})});return fe.observe(pe),()=>fe.unobserve(pe)}{const fe=setInterval(()=>{ne({skipTimeout:!0})},100);return()=>clearInterval(fe)}},[W,ee]);const te=Math.max(k,(L.width-W*y.scale)/2),Z=C?1:y.pages.length,ae=ee*y.scale*Z,H=Math.max(A,(L.height-ae)/Z/2);t.default.useEffect(()=>{const pe=fe=>{(x||c.handleHotkey)(fe,y)};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[]),t.default.useEffect(()=>{var pe;const fe=ve=>{if(ve.ctrlKey||ve.metaKey){ve.preventDefault();const me=Math.max(3,y.scaleToFit),Oe=Math.min(.1,y.scaleToFit),Ne=(xe=ve.deltaY<0?1.02*y.scale:y.scale/1.02,Te=Oe,ce=me,Math.max(Te,Math.min(ce,xe)));y.setScale(Ne)}else var xe,Te,ce};return(pe=X.current)===null||pe===void 0||pe.addEventListener("wheel",fe),()=>{var ve;return(ve=X.current)===null||ve===void 0?void 0:ve.removeEventListener("wheel",fe)}},[]);const J=t.default.useRef(!1);E(X,W*y.scale+2*te,ee*y.scale+2*H,y.scale,y,J);const{handleScroll:ie}=S(X,ee*y.scale+2*H,y,L,J,C),le=L.width>=W*y.scale+2*te,ue=g||"rgba(232, 232, 232, 0.9)",he=y.pages.indexOf(y.activePage),ye=(m==null?void 0:m.NoPages)||w,Ce=R??Math.min(3,Math.max(1,Math.ceil(L.height/2/(ee*y.scale))));return t.default.createElement("div",{ref:$,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:ue,overflow:"hidden"},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:X,onScroll:ie,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:le?"hidden":"auto"},className:"polotno-workspace-inner"},y.pages.map((pe,fe)=>{const ve=pe===y.activePage;if(C&&!ve&&!pe._exportingOrRendering&&!pe._forceMount)return null;if(!(Math.abs(fe-he)<=Ce||pe._exportingOrRendering||pe._forceMount))return t.default.createElement(b,{key:pe.id,width:W*y.scale+2*te,height:ee*y.scale+2*H,backgroundColor:ue,xPadding:te,yPadding:H});const xe=t.default.createElement(a.default,{key:pe.id,page:pe,xPadding:te,yPadding:H,width:W*y.scale+2*te,height:ee*y.scale+2*H,store:y,pageControlsEnabled:v,backColor:ue,pageBorderColor:O||"lightgrey",activePageBorderColor:h||"rgb(0, 161, 255)",altCloneEnabled:I,bleedColor:p||"rgba(255, 0, 0, 0.1)",components:m,viewportSize:L});return(pe._exportingOrRendering||pe._forceMount)&&!ve&&C?t.default.createElement("div",{style:{display:"none"},key:pe.id},xe):xe}),y.rulesVisible&&t.default.createElement(l.TopRules,{store:y,xPadding:te,yPadding:H,width:W*y.scale+2*te,height:ee*y.scale+2*H}),y.pages.length===0&&t.default.createElement(ye,{store:y}),y.audios.map(pe=>t.default.createElement(s.AudioElement,{key:pe.id,audio:pe,store:y}))))}),e.default=e.WorkspaceCanvas}(_f)),_f}var HP=qP(),GP=tm(),VP=tu(),Cd=ls(),V1=ru(),$P=Yd();VP.toggleFadeInAnimation(!1);Cd.setTextOverflow("change-font-size");const WP=new URLSearchParams(location.search).get("key"),s_=GP.createStore({key:WP});window.store=s_;window.config={addGlobalFont:$P.addGlobalFont,unstable_useHtmlTextRender:Cd.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:Cd.setTextVerticalResizeEnabled,unstable_setTextOverflow:Cd.setTextOverflow,onLoadError:V1.onLoadError,setAssetLoadTimeout:V1.setAssetLoadTimeout,setFontLoadTimeout:V1.setFontLoadTimeout,unstable_setTextSplitAllowed:Cd.setTextSplitAllowed};const YP=c5.createRoot(document.getElementById("root"));YP.render(Gt.createElement(HP.WorkspaceCanvas,{visiblePagesOffset:0,store:s_,components:{PageControls:()=>null,Tooltip:()=>null}}));
|