polotno-node 2.9.27 → 2.9.28
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-BorBURbT.js +288 -0
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/video-parallel.js +2 -1
- package/dist/assets/index-e9srJuha.js +0 -281
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Do(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var G_={exports:{}},_t={};/**
|
|
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 rf=Symbol.for("react.element"),SE=Symbol.for("react.portal"),EE=Symbol.for("react.fragment"),OE=Symbol.for("react.strict_mode"),xE=Symbol.for("react.profiler"),PE=Symbol.for("react.provider"),CE=Symbol.for("react.context"),TE=Symbol.for("react.forward_ref"),AE=Symbol.for("react.suspense"),kE=Symbol.for("react.memo"),RE=Symbol.for("react.lazy"),g3=Symbol.iterator;function LE(e){return e===null||typeof e!="object"?null:(e=g3&&e[g3]||e["@@iterator"],typeof e=="function"?e:null)}var $_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V_=Object.assign,q_={};function pu(e,t,r){this.props=e,this.context=t,this.refs=q_,this.updater=r||$_}pu.prototype.isReactComponent={};pu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};pu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function W_(){}W_.prototype=pu.prototype;function Fm(e,t,r){this.props=e,this.context=t,this.refs=q_,this.updater=r||$_}var jm=Fm.prototype=new W_;jm.constructor=Fm;V_(jm,pu.prototype);jm.isPureReactComponent=!0;var v3=Array.isArray,Y_=Object.prototype.hasOwnProperty,zm={current:null},K_={key:!0,ref:!0,__self:!0,__source:!0};function X_(e,t,r){var n,i={},a=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)Y_.call(t,n)&&!K_.hasOwnProperty(n)&&(i[n]=t[n]);var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){for(var u=Array(l),f=0;f<l;f++)u[f]=arguments[f+2];i.children=u}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)i[n]===void 0&&(i[n]=l[n]);return{$$typeof:rf,type:e,key:a,ref:o,props:i,_owner:zm.current}}function ME(e,t){return{$$typeof:rf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bm(e){return typeof e=="object"&&e!==null&&e.$$typeof===rf}function NE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var m3=/\/+/g;function T1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?NE(""+e.key):t.toString(36)}function $d(e,t,r,n,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case rf:case SE:o=!0}}if(o)return o=e,i=i(o),e=n===""?"."+T1(o,0):n,v3(i)?(r="",e!=null&&(r=e.replace(m3,"$&/")+"/"),$d(i,t,r,"",function(f){return f})):i!=null&&(Bm(i)&&(i=ME(i,r+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(m3,"$&/")+"/")+e)),t.push(i)),1;if(o=0,n=n===""?".":n+":",v3(e))for(var l=0;l<e.length;l++){a=e[l];var u=n+T1(a,l);o+=$d(a,t,r,u,i)}else if(u=LE(e),typeof u=="function")for(e=u.call(e),l=0;!(a=e.next()).done;)a=a.value,u=n+T1(a,l++),o+=$d(a,t,r,u,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function vd(e,t,r){if(e==null)return e;var n=[],i=0;return $d(e,n,"","",function(a){return t.call(r,a,i++)}),n}function IE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var pn={current:null},Vd={transition:null},DE={ReactCurrentDispatcher:pn,ReactCurrentBatchConfig:Vd,ReactCurrentOwner:zm};function Z_(){throw Error("act(...) is not supported in production builds of React.")}_t.Children={map:vd,forEach:function(e,t,r){vd(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return vd(e,function(){t++}),t},toArray:function(e){return vd(e,function(t){return t})||[]},only:function(e){if(!Bm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};_t.Component=pu;_t.Fragment=EE;_t.Profiler=xE;_t.PureComponent=Fm;_t.StrictMode=OE;_t.Suspense=AE;_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DE;_t.act=Z_;_t.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=V_({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=zm.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)Y_.call(t,u)&&!K_.hasOwnProperty(u)&&(n[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)n.children=r;else if(1<u){l=Array(u);for(var f=0;f<u;f++)l[f]=arguments[f+2];n.children=l}return{$$typeof:rf,type:e.type,key:i,ref:a,props:n,_owner:o}};_t.createContext=function(e){return e={$$typeof:CE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:PE,_context:e},e.Consumer=e};_t.createElement=X_;_t.createFactory=function(e){var t=X_.bind(null,e);return t.type=e,t};_t.createRef=function(){return{current:null}};_t.forwardRef=function(e){return{$$typeof:TE,render:e}};_t.isValidElement=Bm;_t.lazy=function(e){return{$$typeof:RE,_payload:{_status:-1,_result:e},_init:IE}};_t.memo=function(e,t){return{$$typeof:kE,type:e,compare:t===void 0?null:t}};_t.startTransition=function(e){var t=Vd.transition;Vd.transition={};try{e()}finally{Vd.transition=t}};_t.unstable_act=Z_;_t.useCallback=function(e,t){return pn.current.useCallback(e,t)};_t.useContext=function(e){return pn.current.useContext(e)};_t.useDebugValue=function(){};_t.useDeferredValue=function(e){return pn.current.useDeferredValue(e)};_t.useEffect=function(e,t){return pn.current.useEffect(e,t)};_t.useId=function(){return pn.current.useId()};_t.useImperativeHandle=function(e,t,r){return pn.current.useImperativeHandle(e,t,r)};_t.useInsertionEffect=function(e,t){return pn.current.useInsertionEffect(e,t)};_t.useLayoutEffect=function(e,t){return pn.current.useLayoutEffect(e,t)};_t.useMemo=function(e,t){return pn.current.useMemo(e,t)};_t.useReducer=function(e,t,r){return pn.current.useReducer(e,t,r)};_t.useRef=function(e){return pn.current.useRef(e)};_t.useState=function(e){return pn.current.useState(e)};_t.useSyncExternalStore=function(e,t,r){return pn.current.useSyncExternalStore(e,t,r)};_t.useTransition=function(){return pn.current.useTransition()};_t.version="18.3.1";G_.exports=_t;var at=G_.exports;const bt=Kh(at);var oh={},Q_={exports:{}},qn={},J_={exports:{}},e6={};/**
|
|
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
|
-
*/(function(e){function t(N,H){var R=N.length;N.push(H);e:for(;0<R;){var D=R-1>>>1,z=N[D];if(0<i(z,H))N[D]=H,N[R]=z,R=D;else break e}}function r(N){return N.length===0?null:N[0]}function n(N){if(N.length===0)return null;var H=N[0],R=N.pop();if(R!==H){N[0]=R;e:for(var D=0,z=N.length,F=z>>>1;D<F;){var V=2*(D+1)-1,Y=N[V],q=V+1,G=N[q];if(0>i(Y,R))q<z&&0>i(G,Y)?(N[D]=G,N[q]=R,D=q):(N[D]=Y,N[V]=R,D=V);else if(q<z&&0>i(G,R))N[D]=G,N[q]=R,D=q;else break e}}return H}function i(N,H){var R=N.sortIndex-H.sortIndex;return R!==0?R:N.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],f=[],v=1,w=null,_=3,h=!1,E=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(N){for(var H=r(f);H!==null;){if(H.callback===null)n(f);else if(H.startTime<=N)n(f),H.sortIndex=H.expirationTime,t(u,H);else break;H=r(f)}}function b(N){if(m=!1,d(N),!E)if(r(u)!==null)E=!0,Z(O);else{var H=r(f);H!==null&&B(b,H.startTime-N)}}function O(N,H){E=!1,m&&(m=!1,p(S),S=-1),h=!0;var R=_;try{for(d(H),w=r(u);w!==null&&(!(w.expirationTime>H)||N&&!T());){var D=w.callback;if(typeof D=="function"){w.callback=null,_=w.priorityLevel;var z=D(w.expirationTime<=H);H=e.unstable_now(),typeof z=="function"?w.callback=z:w===r(u)&&n(u),d(H)}else n(u);w=r(u)}if(w!==null)var F=!0;else{var V=r(f);V!==null&&B(b,V.startTime-H),F=!1}return F}finally{w=null,_=R,h=!1}}var k=!1,C=null,S=-1,x=5,P=-1;function T(){return!(e.unstable_now()-P<x)}function L(){if(C!==null){var N=e.unstable_now();P=N;var H=!0;try{H=C(!0,N)}finally{H?M():(k=!1,C=null)}}else k=!1}var M;if(typeof g=="function")M=function(){g(L)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,$=U.port2;U.port1.onmessage=L,M=function(){$.postMessage(null)}}else M=function(){y(L,0)};function Z(N){C=N,k||(k=!0,M())}function B(N,H){S=y(function(){N(e.unstable_now())},H)}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(N){N.callback=null},e.unstable_continueExecution=function(){E||h||(E=!0,Z(O))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(N){switch(_){case 1:case 2:case 3:var H=3;break;default:H=_}var R=_;_=H;try{return N()}finally{_=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,H){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var R=_;_=N;try{return H()}finally{_=R}},e.unstable_scheduleCallback=function(N,H,R){var D=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?D+R:D):R=D,N){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=R+z,N={id:v++,callback:H,priorityLevel:N,startTime:R,expirationTime:z,sortIndex:-1},R>D?(N.sortIndex=R,t(f,N),r(u)===null&&N===r(f)&&(m?(p(S),S=-1):m=!0,B(b,R-D))):(N.sortIndex=z,t(u,N),E||h||(E=!0,Z(O))),N},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(N){var H=_;return function(){var R=_;_=H;try{return N.apply(this,arguments)}finally{_=R}}}})(e6);J_.exports=e6;var pc=J_.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 FE=at,$n=pc;function Ce(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t6=new Set,Tc={};function Rl(e,t){Vs(e,t),Vs(e+"Capture",t)}function Vs(e,t){for(Tc[e]=t,e=0;e<t.length;e++)t6.add(t[e])}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_v=Object.prototype.hasOwnProperty,jE=/^[: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]*$/,y3={},b3={};function zE(e){return _v.call(b3,e)?!0:_v.call(y3,e)?!1:jE.test(e)?b3[e]=!0:(y3[e]=!0,!1)}function BE(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UE(e,t,r,n){if(t===null||typeof t>"u"||BE(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function gn(e,t,r,n,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Wr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wr[e]=new gn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wr[t]=new gn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wr[e]=new gn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wr[e]=new gn(e,2,!1,e,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(e){Wr[e]=new gn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wr[e]=new gn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wr[e]=new gn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wr[e]=new gn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wr[e]=new gn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Um=/[\-:]([a-z])/g;function Hm(e){return e[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(e){var t=e.replace(Um,Hm);Wr[t]=new gn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Um,Hm);Wr[t]=new gn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Um,Hm);Wr[t]=new gn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wr[e]=new gn(e,1,!1,e.toLowerCase(),null,!1,!1)});Wr.xlinkHref=new gn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wr[e]=new gn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gm(e,t,r,n){var i=Wr.hasOwnProperty(t)?Wr[t]:null;(i!==null?i.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(UE(t,r,i,n)&&(r=null),n||i===null?zE(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):i.mustUseProperty?e[i.propertyName]=r===null?i.type===3?!1:"":r:(t=i.attributeName,n=i.attributeNamespace,r===null?e.removeAttribute(t):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Ha=FE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,md=Symbol.for("react.element"),Es=Symbol.for("react.portal"),Os=Symbol.for("react.fragment"),$m=Symbol.for("react.strict_mode"),wv=Symbol.for("react.profiler"),r6=Symbol.for("react.provider"),n6=Symbol.for("react.context"),Vm=Symbol.for("react.forward_ref"),Sv=Symbol.for("react.suspense"),Ev=Symbol.for("react.suspense_list"),qm=Symbol.for("react.memo"),ho=Symbol.for("react.lazy"),i6=Symbol.for("react.offscreen"),_3=Symbol.iterator;function Zu(e){return e===null||typeof e!="object"?null:(e=_3&&e[_3]||e["@@iterator"],typeof e=="function"?e:null)}var nr=Object.assign,A1;function uc(e){if(A1===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);A1=t&&t[1]||""}return`
|
|
26
|
-
`+A1+e}var k1=!1;function R1(e,t){if(!e||k1)return"";k1=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var n=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){n=f}e.call(t.prototype)}else{try{throw Error()}catch(f){n=f}e()}}catch(f){if(f&&n&&typeof f.stack=="string"){for(var i=f.stack.split(`
|
|
27
|
-
`),a=n.stack.split(`
|
|
28
|
-
`),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var u=`
|
|
29
|
-
`+i[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{k1=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?uc(e):""}function HE(e){switch(e.tag){case 5:return uc(e.type);case 16:return uc("Lazy");case 13:return uc("Suspense");case 19:return uc("SuspenseList");case 0:case 2:case 15:return e=R1(e.type,!1),e;case 11:return e=R1(e.type.render,!1),e;case 1:return e=R1(e.type,!0),e;default:return""}}function Ov(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Os:return"Fragment";case Es:return"Portal";case wv:return"Profiler";case $m:return"StrictMode";case Sv:return"Suspense";case Ev:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n6:return(e.displayName||"Context")+".Consumer";case r6:return(e._context.displayName||"Context")+".Provider";case Vm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qm:return t=e.displayName||null,t!==null?t:Ov(e.type)||"Memo";case ho:t=e._payload,e=e._init;try{return Ov(e(t))}catch{}}return null}function GE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ov(t);case 8:return t===$m?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ro(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function a6(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $E(e){var t=a6(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yd(e){e._valueTracker||(e._valueTracker=$E(e))}function o6(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=a6(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function lh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function xv(e,t){var r=t.checked;return nr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function w3(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ro(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function l6(e,t){t=t.checked,t!=null&&Gm(e,"checked",t,!1)}function Pv(e,t){l6(e,t);var r=Ro(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cv(e,t.type,r):t.hasOwnProperty("defaultValue")&&Cv(e,t.type,Ro(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function S3(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Cv(e,t,r){(t!=="number"||lh(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var cc=Array.isArray;function js(e,t,r,n){if(e=e.options,t){t={};for(var i=0;i<r.length;i++)t["$"+r[i]]=!0;for(r=0;r<e.length;r++)i=t.hasOwnProperty("$"+e[r].value),e[r].selected!==i&&(e[r].selected=i),i&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ro(r),t=null,i=0;i<e.length;i++){if(e[i].value===r){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Tv(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ce(91));return nr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function E3(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Ce(92));if(cc(r)){if(1<r.length)throw Error(Ce(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ro(r)}}function s6(e,t){var r=Ro(t.value),n=Ro(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function O3(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function u6(e){switch(e){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 Av(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?u6(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var bd,c6=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,i){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(bd=bd||document.createElement("div"),bd.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=bd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ac(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var gc={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},VE=["Webkit","ms","Moz","O"];Object.keys(gc).forEach(function(e){VE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gc[t]=gc[e]})});function f6(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||gc.hasOwnProperty(e)&&gc[e]?(""+t).trim():t+"px"}function d6(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=f6(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,i):e[r]=i}}var qE=nr({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 kv(e,t){if(t){if(qE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ce(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ce(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ce(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ce(62))}}function Rv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Lv=null;function Wm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mv=null,zs=null,Bs=null;function x3(e){if(e=of(e)){if(typeof Mv!="function")throw Error(Ce(280));var t=e.stateNode;t&&(t=ep(t),Mv(e.stateNode,e.type,t))}}function h6(e){zs?Bs?Bs.push(e):Bs=[e]:zs=e}function p6(){if(zs){var e=zs,t=Bs;if(Bs=zs=null,x3(e),t)for(e=0;e<t.length;e++)x3(t[e])}}function g6(e,t){return e(t)}function v6(){}var L1=!1;function m6(e,t,r){if(L1)return e(t,r);L1=!0;try{return g6(e,t,r)}finally{L1=!1,(zs!==null||Bs!==null)&&(v6(),p6())}}function kc(e,t){var r=e.stateNode;if(r===null)return null;var n=ep(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Ce(231,t,typeof r));return r}var Nv=!1;if(Da)try{var Qu={};Object.defineProperty(Qu,"passive",{get:function(){Nv=!0}}),window.addEventListener("test",Qu,Qu),window.removeEventListener("test",Qu,Qu)}catch{Nv=!1}function WE(e,t,r,n,i,a,o,l,u){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(v){this.onError(v)}}var vc=!1,sh=null,uh=!1,Iv=null,YE={onError:function(e){vc=!0,sh=e}};function KE(e,t,r,n,i,a,o,l,u){vc=!1,sh=null,WE.apply(YE,arguments)}function XE(e,t,r,n,i,a,o,l,u){if(KE.apply(this,arguments),vc){if(vc){var f=sh;vc=!1,sh=null}else throw Error(Ce(198));uh||(uh=!0,Iv=f)}}function Ll(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function y6(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function P3(e){if(Ll(e)!==e)throw Error(Ce(188))}function ZE(e){var t=e.alternate;if(!t){if(t=Ll(e),t===null)throw Error(Ce(188));return t!==e?null:e}for(var r=e,n=t;;){var i=r.return;if(i===null)break;var a=i.alternate;if(a===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===r)return P3(i),e;if(a===n)return P3(i),t;a=a.sibling}throw Error(Ce(188))}if(r.return!==n.return)r=i,n=a;else{for(var o=!1,l=i.child;l;){if(l===r){o=!0,r=i,n=a;break}if(l===n){o=!0,n=i,r=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===r){o=!0,r=a,n=i;break}if(l===n){o=!0,n=a,r=i;break}l=l.sibling}if(!o)throw Error(Ce(189))}}if(r.alternate!==n)throw Error(Ce(190))}if(r.tag!==3)throw Error(Ce(188));return r.stateNode.current===r?e:t}function b6(e){return e=ZE(e),e!==null?_6(e):null}function _6(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_6(e);if(t!==null)return t;e=e.sibling}return null}var w6=$n.unstable_scheduleCallback,C3=$n.unstable_cancelCallback,QE=$n.unstable_shouldYield,JE=$n.unstable_requestPaint,pr=$n.unstable_now,eO=$n.unstable_getCurrentPriorityLevel,Ym=$n.unstable_ImmediatePriority,S6=$n.unstable_UserBlockingPriority,ch=$n.unstable_NormalPriority,tO=$n.unstable_LowPriority,E6=$n.unstable_IdlePriority,Xh=null,aa=null;function rO(e){if(aa&&typeof aa.onCommitFiberRoot=="function")try{aa.onCommitFiberRoot(Xh,e,void 0,(e.current.flags&128)===128)}catch{}}var Li=Math.clz32?Math.clz32:aO,nO=Math.log,iO=Math.LN2;function aO(e){return e>>>=0,e===0?32:31-(nO(e)/iO|0)|0}var _d=64,wd=4194304;function fc(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fh(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,i=e.suspendedLanes,a=e.pingedLanes,o=r&268435455;if(o!==0){var l=o&~i;l!==0?n=fc(l):(a&=o,a!==0&&(n=fc(a)))}else o=r&~i,o!==0?n=fc(o):a!==0&&(n=fc(a));if(n===0)return 0;if(t!==0&&t!==n&&!(t&i)&&(i=n&-n,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Li(t),i=1<<r,n|=e[r],t&=~i;return n}function oO(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 lO(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Li(a),l=1<<o,u=i[o];u===-1?(!(l&r)||l&n)&&(i[o]=oO(l,t)):u<=t&&(e.expiredLanes|=l),a&=~l}}function Dv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function O6(){var e=_d;return _d<<=1,!(_d&4194240)&&(_d=64),e}function M1(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function nf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Li(t),e[t]=r}function sO(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var i=31-Li(r),a=1<<i;t[i]=0,n[i]=-1,e[i]=-1,r&=~a}}function Km(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Li(r),i=1<<n;i&t|e[n]&t&&(e[n]|=t),r&=~i}}var Lt=0;function x6(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var P6,Xm,C6,T6,A6,Fv=!1,Sd=[],wo=null,So=null,Eo=null,Rc=new Map,Lc=new Map,go=[],uO="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 T3(e,t){switch(e){case"focusin":case"focusout":wo=null;break;case"dragenter":case"dragleave":So=null;break;case"mouseover":case"mouseout":Eo=null;break;case"pointerover":case"pointerout":Rc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lc.delete(t.pointerId)}}function Ju(e,t,r,n,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:a,targetContainers:[i]},t!==null&&(t=of(t),t!==null&&Xm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function cO(e,t,r,n,i){switch(t){case"focusin":return wo=Ju(wo,e,t,r,n,i),!0;case"dragenter":return So=Ju(So,e,t,r,n,i),!0;case"mouseover":return Eo=Ju(Eo,e,t,r,n,i),!0;case"pointerover":var a=i.pointerId;return Rc.set(a,Ju(Rc.get(a)||null,e,t,r,n,i)),!0;case"gotpointercapture":return a=i.pointerId,Lc.set(a,Ju(Lc.get(a)||null,e,t,r,n,i)),!0}return!1}function k6(e){var t=dl(e.target);if(t!==null){var r=Ll(t);if(r!==null){if(t=r.tag,t===13){if(t=y6(r),t!==null){e.blockedOn=t,A6(e.priority,function(){C6(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=jv(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Lv=n,r.target.dispatchEvent(n),Lv=null}else return t=of(r),t!==null&&Xm(t),e.blockedOn=r,!1;t.shift()}return!0}function A3(e,t,r){qd(e)&&r.delete(t)}function fO(){Fv=!1,wo!==null&&qd(wo)&&(wo=null),So!==null&&qd(So)&&(So=null),Eo!==null&&qd(Eo)&&(Eo=null),Rc.forEach(A3),Lc.forEach(A3)}function ec(e,t){e.blockedOn===t&&(e.blockedOn=null,Fv||(Fv=!0,$n.unstable_scheduleCallback($n.unstable_NormalPriority,fO)))}function Mc(e){function t(i){return ec(i,e)}if(0<Sd.length){ec(Sd[0],e);for(var r=1;r<Sd.length;r++){var n=Sd[r];n.blockedOn===e&&(n.blockedOn=null)}}for(wo!==null&&ec(wo,e),So!==null&&ec(So,e),Eo!==null&&ec(Eo,e),Rc.forEach(t),Lc.forEach(t),r=0;r<go.length;r++)n=go[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<go.length&&(r=go[0],r.blockedOn===null);)k6(r),r.blockedOn===null&&go.shift()}var Us=Ha.ReactCurrentBatchConfig,dh=!0;function dO(e,t,r,n){var i=Lt,a=Us.transition;Us.transition=null;try{Lt=1,Zm(e,t,r,n)}finally{Lt=i,Us.transition=a}}function hO(e,t,r,n){var i=Lt,a=Us.transition;Us.transition=null;try{Lt=4,Zm(e,t,r,n)}finally{Lt=i,Us.transition=a}}function Zm(e,t,r,n){if(dh){var i=jv(e,t,r,n);if(i===null)G1(e,t,n,hh,r),T3(e,n);else if(cO(i,e,t,r,n))n.stopPropagation();else if(T3(e,n),t&4&&-1<uO.indexOf(e)){for(;i!==null;){var a=of(i);if(a!==null&&P6(a),a=jv(e,t,r,n),a===null&&G1(e,t,n,hh,r),a===i)break;i=a}i!==null&&n.stopPropagation()}else G1(e,t,n,null,r)}}var hh=null;function jv(e,t,r,n){if(hh=null,e=Wm(n),e=dl(e),e!==null)if(t=Ll(e),t===null)e=null;else if(r=t.tag,r===13){if(e=y6(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return hh=e,null}function R6(e){switch(e){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(eO()){case Ym:return 1;case S6:return 4;case ch:case tO:return 16;case E6:return 536870912;default:return 16}default:return 16}}var yo=null,Qm=null,Wd=null;function L6(){if(Wd)return Wd;var e,t=Qm,r=t.length,n,i="value"in yo?yo.value:yo.textContent,a=i.length;for(e=0;e<r&&t[e]===i[e];e++);var o=r-e;for(n=1;n<=o&&t[r-n]===i[a-n];n++);return Wd=i.slice(e,1<n?1-n:void 0)}function Yd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ed(){return!0}function k3(){return!1}function Wn(e){function t(r,n,i,a,o){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ed:k3,this.isPropagationStopped=k3,this}return nr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ed)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ed)},persist:function(){},isPersistent:Ed}),t}var gu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jm=Wn(gu),af=nr({},gu,{view:0,detail:0}),pO=Wn(af),N1,I1,tc,Zh=nr({},af,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ey,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==tc&&(tc&&e.type==="mousemove"?(N1=e.screenX-tc.screenX,I1=e.screenY-tc.screenY):I1=N1=0,tc=e),N1)},movementY:function(e){return"movementY"in e?e.movementY:I1}}),R3=Wn(Zh),gO=nr({},Zh,{dataTransfer:0}),vO=Wn(gO),mO=nr({},af,{relatedTarget:0}),D1=Wn(mO),yO=nr({},gu,{animationName:0,elapsedTime:0,pseudoElement:0}),bO=Wn(yO),_O=nr({},gu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wO=Wn(_O),SO=nr({},gu,{data:0}),L3=Wn(SO),EO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},OO={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"},xO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function PO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xO[e])?!!t[e]:!1}function ey(){return PO}var CO=nr({},af,{key:function(e){if(e.key){var t=EO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?OO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ey,charCode:function(e){return e.type==="keypress"?Yd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),TO=Wn(CO),AO=nr({},Zh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),M3=Wn(AO),kO=nr({},af,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ey}),RO=Wn(kO),LO=nr({},gu,{propertyName:0,elapsedTime:0,pseudoElement:0}),MO=Wn(LO),NO=nr({},Zh,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),IO=Wn(NO),DO=[9,13,27,32],ty=Da&&"CompositionEvent"in window,mc=null;Da&&"documentMode"in document&&(mc=document.documentMode);var FO=Da&&"TextEvent"in window&&!mc,M6=Da&&(!ty||mc&&8<mc&&11>=mc),N3=" ",I3=!1;function N6(e,t){switch(e){case"keyup":return DO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I6(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xs=!1;function jO(e,t){switch(e){case"compositionend":return I6(t);case"keypress":return t.which!==32?null:(I3=!0,N3);case"textInput":return e=t.data,e===N3&&I3?null:e;default:return null}}function zO(e,t){if(xs)return e==="compositionend"||!ty&&N6(e,t)?(e=L6(),Wd=Qm=yo=null,xs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return M6&&t.locale!=="ko"?null:t.data;default:return null}}var BO={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 D3(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BO[e.type]:t==="textarea"}function D6(e,t,r,n){h6(n),t=ph(t,"onChange"),0<t.length&&(r=new Jm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var yc=null,Nc=null;function UO(e){W6(e,0)}function Qh(e){var t=Ts(e);if(o6(t))return e}function HO(e,t){if(e==="change")return t}var F6=!1;if(Da){var F1;if(Da){var j1="oninput"in document;if(!j1){var F3=document.createElement("div");F3.setAttribute("oninput","return;"),j1=typeof F3.oninput=="function"}F1=j1}else F1=!1;F6=F1&&(!document.documentMode||9<document.documentMode)}function j3(){yc&&(yc.detachEvent("onpropertychange",j6),Nc=yc=null)}function j6(e){if(e.propertyName==="value"&&Qh(Nc)){var t=[];D6(t,Nc,e,Wm(e)),m6(UO,t)}}function GO(e,t,r){e==="focusin"?(j3(),yc=t,Nc=r,yc.attachEvent("onpropertychange",j6)):e==="focusout"&&j3()}function $O(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qh(Nc)}function VO(e,t){if(e==="click")return Qh(t)}function qO(e,t){if(e==="input"||e==="change")return Qh(t)}function WO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ji=typeof Object.is=="function"?Object.is:WO;function Ic(e,t){if(ji(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!_v.call(t,i)||!ji(e[i],t[i]))return!1}return!0}function z3(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function B3(e,t){var r=z3(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=z3(r)}}function z6(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z6(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function B6(){for(var e=window,t=lh();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=lh(e.document)}return t}function ry(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function YO(e){var t=B6(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&z6(r.ownerDocument.documentElement,r)){if(n!==null&&ry(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=r.textContent.length,a=Math.min(n.start,i);n=n.end===void 0?a:Math.min(n.end,i),!e.extend&&a>n&&(i=n,n=a,a=i),i=B3(r,a);var o=B3(r,n);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var KO=Da&&"documentMode"in document&&11>=document.documentMode,Ps=null,zv=null,bc=null,Bv=!1;function U3(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bv||Ps==null||Ps!==lh(n)||(n=Ps,"selectionStart"in n&&ry(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),bc&&Ic(bc,n)||(bc=n,n=ph(zv,"onSelect"),0<n.length&&(t=new Jm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ps)))}function Od(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Cs={animationend:Od("Animation","AnimationEnd"),animationiteration:Od("Animation","AnimationIteration"),animationstart:Od("Animation","AnimationStart"),transitionend:Od("Transition","TransitionEnd")},z1={},U6={};Da&&(U6=document.createElement("div").style,"AnimationEvent"in window||(delete Cs.animationend.animation,delete Cs.animationiteration.animation,delete Cs.animationstart.animation),"TransitionEvent"in window||delete Cs.transitionend.transition);function Jh(e){if(z1[e])return z1[e];if(!Cs[e])return e;var t=Cs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in U6)return z1[e]=t[r];return e}var H6=Jh("animationend"),G6=Jh("animationiteration"),$6=Jh("animationstart"),V6=Jh("transitionend"),q6=new Map,H3="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 Fo(e,t){q6.set(e,t),Rl(t,[e])}for(var B1=0;B1<H3.length;B1++){var U1=H3[B1],XO=U1.toLowerCase(),ZO=U1[0].toUpperCase()+U1.slice(1);Fo(XO,"on"+ZO)}Fo(H6,"onAnimationEnd");Fo(G6,"onAnimationIteration");Fo($6,"onAnimationStart");Fo("dblclick","onDoubleClick");Fo("focusin","onFocus");Fo("focusout","onBlur");Fo(V6,"onTransitionEnd");Vs("onMouseEnter",["mouseout","mouseover"]);Vs("onMouseLeave",["mouseout","mouseover"]);Vs("onPointerEnter",["pointerout","pointerover"]);Vs("onPointerLeave",["pointerout","pointerover"]);Rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Rl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var dc="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(" "),QO=new Set("cancel close invalid load scroll toggle".split(" ").concat(dc));function G3(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,XE(n,t,void 0,e),e.currentTarget=null}function W6(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],i=n.event;n=n.listeners;e:{var a=void 0;if(t)for(var o=n.length-1;0<=o;o--){var l=n[o],u=l.instance,f=l.currentTarget;if(l=l.listener,u!==a&&i.isPropagationStopped())break e;G3(i,l,f),a=u}else for(o=0;o<n.length;o++){if(l=n[o],u=l.instance,f=l.currentTarget,l=l.listener,u!==a&&i.isPropagationStopped())break e;G3(i,l,f),a=u}}}if(uh)throw e=Iv,uh=!1,Iv=null,e}function qt(e,t){var r=t[Vv];r===void 0&&(r=t[Vv]=new Set);var n=e+"__bubble";r.has(n)||(Y6(t,e,2,!1),r.add(n))}function H1(e,t,r){var n=0;t&&(n|=4),Y6(r,e,n,t)}var xd="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[xd]){e[xd]=!0,t6.forEach(function(r){r!=="selectionchange"&&(QO.has(r)||H1(r,!1,e),H1(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,H1("selectionchange",!1,t))}}function Y6(e,t,r,n){switch(R6(t)){case 1:var i=dO;break;case 4:i=hO;break;default:i=Zm}r=i.bind(null,t,r,e),i=void 0,!Nv||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,r,{capture:!0,passive:i}):e.addEventListener(t,r,!0):i!==void 0?e.addEventListener(t,r,{passive:i}):e.addEventListener(t,r,!1)}function G1(e,t,r,n,i){var a=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var l=n.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=n.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===i||u.nodeType===8&&u.parentNode===i))return;o=o.return}for(;l!==null;){if(o=dl(l),o===null)return;if(u=o.tag,u===5||u===6){n=a=o;continue e}l=l.parentNode}}n=n.return}m6(function(){var f=a,v=Wm(r),w=[];e:{var _=q6.get(e);if(_!==void 0){var h=Jm,E=e;switch(e){case"keypress":if(Yd(r)===0)break e;case"keydown":case"keyup":h=TO;break;case"focusin":E="focus",h=D1;break;case"focusout":E="blur",h=D1;break;case"beforeblur":case"afterblur":h=D1;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=R3;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=vO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=RO;break;case H6:case G6:case $6:h=bO;break;case V6:h=MO;break;case"scroll":h=pO;break;case"wheel":h=IO;break;case"copy":case"cut":case"paste":h=wO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=M3}var m=(t&4)!==0,y=!m&&e==="scroll",p=m?_!==null?_+"Capture":null:_;m=[];for(var g=f,d;g!==null;){d=g;var b=d.stateNode;if(d.tag===5&&b!==null&&(d=b,p!==null&&(b=kc(g,p),b!=null&&m.push(Fc(g,b,d)))),y)break;g=g.return}0<m.length&&(_=new h(_,E,null,r,v),w.push({event:_,listeners:m}))}}if(!(t&7)){e:{if(_=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",_&&r!==Lv&&(E=r.relatedTarget||r.fromElement)&&(dl(E)||E[Fa]))break e;if((h||_)&&(_=v.window===v?v:(_=v.ownerDocument)?_.defaultView||_.parentWindow:window,h?(E=r.relatedTarget||r.toElement,h=f,E=E?dl(E):null,E!==null&&(y=Ll(E),E!==y||E.tag!==5&&E.tag!==6)&&(E=null)):(h=null,E=f),h!==E)){if(m=R3,b="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=M3,b="onPointerLeave",p="onPointerEnter",g="pointer"),y=h==null?_:Ts(h),d=E==null?_:Ts(E),_=new m(b,g+"leave",h,r,v),_.target=y,_.relatedTarget=d,b=null,dl(v)===f&&(m=new m(p,g+"enter",E,r,v),m.target=d,m.relatedTarget=y,b=m),y=b,h&&E)t:{for(m=h,p=E,g=0,d=m;d;d=ms(d))g++;for(d=0,b=p;b;b=ms(b))d++;for(;0<g-d;)m=ms(m),g--;for(;0<d-g;)p=ms(p),d--;for(;g--;){if(m===p||p!==null&&m===p.alternate)break t;m=ms(m),p=ms(p)}m=null}else m=null;h!==null&&$3(w,_,h,m,!1),E!==null&&y!==null&&$3(w,y,E,m,!0)}}e:{if(_=f?Ts(f):window,h=_.nodeName&&_.nodeName.toLowerCase(),h==="select"||h==="input"&&_.type==="file")var O=HO;else if(D3(_))if(F6)O=qO;else{O=$O;var k=GO}else(h=_.nodeName)&&h.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(O=VO);if(O&&(O=O(e,f))){D6(w,O,r,v);break e}k&&k(e,_,f),e==="focusout"&&(k=_._wrapperState)&&k.controlled&&_.type==="number"&&Cv(_,"number",_.value)}switch(k=f?Ts(f):window,e){case"focusin":(D3(k)||k.contentEditable==="true")&&(Ps=k,zv=f,bc=null);break;case"focusout":bc=zv=Ps=null;break;case"mousedown":Bv=!0;break;case"contextmenu":case"mouseup":case"dragend":Bv=!1,U3(w,r,v);break;case"selectionchange":if(KO)break;case"keydown":case"keyup":U3(w,r,v)}var C;if(ty)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else xs?N6(e,r)&&(S="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(S="onCompositionStart");S&&(M6&&r.locale!=="ko"&&(xs||S!=="onCompositionStart"?S==="onCompositionEnd"&&xs&&(C=L6()):(yo=v,Qm="value"in yo?yo.value:yo.textContent,xs=!0)),k=ph(f,S),0<k.length&&(S=new L3(S,e,null,r,v),w.push({event:S,listeners:k}),C?S.data=C:(C=I6(r),C!==null&&(S.data=C)))),(C=FO?jO(e,r):zO(e,r))&&(f=ph(f,"onBeforeInput"),0<f.length&&(v=new L3("onBeforeInput","beforeinput",null,r,v),w.push({event:v,listeners:f}),v.data=C))}W6(w,t)})}function Fc(e,t,r){return{instance:e,listener:t,currentTarget:r}}function ph(e,t){for(var r=t+"Capture",n=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=kc(e,r),a!=null&&n.unshift(Fc(e,a,i)),a=kc(e,t),a!=null&&n.push(Fc(e,a,i))),e=e.return}return n}function ms(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $3(e,t,r,n,i){for(var a=t._reactName,o=[];r!==null&&r!==n;){var l=r,u=l.alternate,f=l.stateNode;if(u!==null&&u===n)break;l.tag===5&&f!==null&&(l=f,i?(u=kc(r,a),u!=null&&o.unshift(Fc(r,u,l))):i||(u=kc(r,a),u!=null&&o.push(Fc(r,u,l)))),r=r.return}o.length!==0&&e.push({event:t,listeners:o})}var JO=/\r\n?/g,ex=/\u0000|\uFFFD/g;function V3(e){return(typeof e=="string"?e:""+e).replace(JO,`
|
|
30
|
-
`).replace(ex,"")}function Pd(e,t,r){if(t=V3(t),V3(e)!==t&&r)throw Error(Ce(425))}function gh(){}var Uv=null,Hv=null;function Gv(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $v=typeof setTimeout=="function"?setTimeout:void 0,tx=typeof clearTimeout=="function"?clearTimeout:void 0,q3=typeof Promise=="function"?Promise:void 0,rx=typeof queueMicrotask=="function"?queueMicrotask:typeof q3<"u"?function(e){return q3.resolve(null).then(e).catch(nx)}:$v;function nx(e){setTimeout(function(){throw e})}function $1(e,t){var r=t,n=0;do{var i=r.nextSibling;if(e.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){e.removeChild(i),Mc(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Mc(t)}function Oo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function W3(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var vu=Math.random().toString(36).slice(2),ta="__reactFiber$"+vu,jc="__reactProps$"+vu,Fa="__reactContainer$"+vu,Vv="__reactEvents$"+vu,ix="__reactListeners$"+vu,ax="__reactHandles$"+vu;function dl(e){var t=e[ta];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Fa]||r[ta]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=W3(e);e!==null;){if(r=e[ta])return r;e=W3(e)}return t}e=r,r=e.parentNode}return null}function of(e){return e=e[ta]||e[Fa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ce(33))}function ep(e){return e[jc]||null}var qv=[],As=-1;function jo(e){return{current:e}}function Wt(e){0>As||(e.current=qv[As],qv[As]=null,As--)}function Ut(e,t){As++,qv[As]=e.current,e.current=t}var Lo={},nn=jo(Lo),Cn=jo(!1),_l=Lo;function qs(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in r)i[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Tn(e){return e=e.childContextTypes,e!=null}function vh(){Wt(Cn),Wt(nn)}function Y3(e,t,r){if(nn.current!==Lo)throw Error(Ce(168));Ut(nn,t),Ut(Cn,r)}function K6(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in t))throw Error(Ce(108,GE(e)||"Unknown",i));return nr({},r,n)}function mh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,_l=nn.current,Ut(nn,e),Ut(Cn,Cn.current),!0}function K3(e,t,r){var n=e.stateNode;if(!n)throw Error(Ce(169));r?(e=K6(e,t,_l),n.__reactInternalMemoizedMergedChildContext=e,Wt(Cn),Wt(nn),Ut(nn,e)):Wt(Cn),Ut(Cn,r)}var Ta=null,tp=!1,V1=!1;function X6(e){Ta===null?Ta=[e]:Ta.push(e)}function ox(e){tp=!0,X6(e)}function zo(){if(!V1&&Ta!==null){V1=!0;var e=0,t=Lt;try{var r=Ta;for(Lt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ta=null,tp=!1}catch(i){throw Ta!==null&&(Ta=Ta.slice(e+1)),w6(Ym,zo),i}finally{Lt=t,V1=!1}}return null}var ks=[],Rs=0,yh=null,bh=0,li=[],si=0,wl=null,Aa=1,ka="";function cl(e,t){ks[Rs++]=bh,ks[Rs++]=yh,yh=e,bh=t}function Z6(e,t,r){li[si++]=Aa,li[si++]=ka,li[si++]=wl,wl=e;var n=Aa;e=ka;var i=32-Li(n)-1;n&=~(1<<i),r+=1;var a=32-Li(t)+i;if(30<a){var o=i-i%5;a=(n&(1<<o)-1).toString(32),n>>=o,i-=o,Aa=1<<32-Li(t)+i|r<<i|n,ka=a+e}else Aa=1<<a|r<<i|n,ka=e}function ny(e){e.return!==null&&(cl(e,1),Z6(e,1,0))}function iy(e){for(;e===yh;)yh=ks[--Rs],ks[Rs]=null,bh=ks[--Rs],ks[Rs]=null;for(;e===wl;)wl=li[--si],li[si]=null,ka=li[--si],li[si]=null,Aa=li[--si],li[si]=null}var Gn=null,Hn=null,Zt=!1,Ri=null;function Q6(e,t){var r=fi(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function X3(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Gn=e,Hn=Oo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gn=e,Hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=wl!==null?{id:Aa,overflow:ka}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=fi(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Gn=e,Hn=null,!0):!1;default:return!1}}function Wv(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yv(e){if(Zt){var t=Hn;if(t){var r=t;if(!X3(e,t)){if(Wv(e))throw Error(Ce(418));t=Oo(r.nextSibling);var n=Gn;t&&X3(e,t)?Q6(n,r):(e.flags=e.flags&-4097|2,Zt=!1,Gn=e)}}else{if(Wv(e))throw Error(Ce(418));e.flags=e.flags&-4097|2,Zt=!1,Gn=e}}}function Z3(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gn=e}function Cd(e){if(e!==Gn)return!1;if(!Zt)return Z3(e),Zt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gv(e.type,e.memoizedProps)),t&&(t=Hn)){if(Wv(e))throw J6(),Error(Ce(418));for(;t;)Q6(e,t),t=Oo(t.nextSibling)}if(Z3(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Hn=Oo(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Hn=null}}else Hn=Gn?Oo(e.stateNode.nextSibling):null;return!0}function J6(){for(var e=Hn;e;)e=Oo(e.nextSibling)}function Ws(){Hn=Gn=null,Zt=!1}function ay(e){Ri===null?Ri=[e]:Ri.push(e)}var lx=Ha.ReactCurrentBatchConfig;function rc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Ce(309));var n=r.stateNode}if(!n)throw Error(Ce(147,e));var i=n,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=i.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(Ce(284));if(!r._owner)throw Error(Ce(290,e))}return e}function Td(e,t){throw e=Object.prototype.toString.call(t),Error(Ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Q3(e){var t=e._init;return t(e._payload)}function ew(e){function t(p,g){if(e){var d=p.deletions;d===null?(p.deletions=[g],p.flags|=16):d.push(g)}}function r(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function n(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function i(p,g){return p=To(p,g),p.index=0,p.sibling=null,p}function a(p,g,d){return p.index=d,e?(d=p.alternate,d!==null?(d=d.index,d<g?(p.flags|=2,g):d):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,g,d,b){return g===null||g.tag!==6?(g=Q1(d,p.mode,b),g.return=p,g):(g=i(g,d),g.return=p,g)}function u(p,g,d,b){var O=d.type;return O===Os?v(p,g,d.props.children,b,d.key):g!==null&&(g.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===ho&&Q3(O)===g.type)?(b=i(g,d.props),b.ref=rc(p,g,d),b.return=p,b):(b=th(d.type,d.key,d.props,null,p.mode,b),b.ref=rc(p,g,d),b.return=p,b)}function f(p,g,d,b){return g===null||g.tag!==4||g.stateNode.containerInfo!==d.containerInfo||g.stateNode.implementation!==d.implementation?(g=J1(d,p.mode,b),g.return=p,g):(g=i(g,d.children||[]),g.return=p,g)}function v(p,g,d,b,O){return g===null||g.tag!==7?(g=ml(d,p.mode,b,O),g.return=p,g):(g=i(g,d),g.return=p,g)}function w(p,g,d){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Q1(""+g,p.mode,d),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case md:return d=th(g.type,g.key,g.props,null,p.mode,d),d.ref=rc(p,null,g),d.return=p,d;case Es:return g=J1(g,p.mode,d),g.return=p,g;case ho:var b=g._init;return w(p,b(g._payload),d)}if(cc(g)||Zu(g))return g=ml(g,p.mode,d,null),g.return=p,g;Td(p,g)}return null}function _(p,g,d,b){var O=g!==null?g.key:null;if(typeof d=="string"&&d!==""||typeof d=="number")return O!==null?null:l(p,g,""+d,b);if(typeof d=="object"&&d!==null){switch(d.$$typeof){case md:return d.key===O?u(p,g,d,b):null;case Es:return d.key===O?f(p,g,d,b):null;case ho:return O=d._init,_(p,g,O(d._payload),b)}if(cc(d)||Zu(d))return O!==null?null:v(p,g,d,b,null);Td(p,d)}return null}function h(p,g,d,b,O){if(typeof b=="string"&&b!==""||typeof b=="number")return p=p.get(d)||null,l(g,p,""+b,O);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case md:return p=p.get(b.key===null?d:b.key)||null,u(g,p,b,O);case Es:return p=p.get(b.key===null?d:b.key)||null,f(g,p,b,O);case ho:var k=b._init;return h(p,g,d,k(b._payload),O)}if(cc(b)||Zu(b))return p=p.get(d)||null,v(g,p,b,O,null);Td(g,b)}return null}function E(p,g,d,b){for(var O=null,k=null,C=g,S=g=0,x=null;C!==null&&S<d.length;S++){C.index>S?(x=C,C=null):x=C.sibling;var P=_(p,C,d[S],b);if(P===null){C===null&&(C=x);break}e&&C&&P.alternate===null&&t(p,C),g=a(P,g,S),k===null?O=P:k.sibling=P,k=P,C=x}if(S===d.length)return r(p,C),Zt&&cl(p,S),O;if(C===null){for(;S<d.length;S++)C=w(p,d[S],b),C!==null&&(g=a(C,g,S),k===null?O=C:k.sibling=C,k=C);return Zt&&cl(p,S),O}for(C=n(p,C);S<d.length;S++)x=h(C,p,S,d[S],b),x!==null&&(e&&x.alternate!==null&&C.delete(x.key===null?S:x.key),g=a(x,g,S),k===null?O=x:k.sibling=x,k=x);return e&&C.forEach(function(T){return t(p,T)}),Zt&&cl(p,S),O}function m(p,g,d,b){var O=Zu(d);if(typeof O!="function")throw Error(Ce(150));if(d=O.call(d),d==null)throw Error(Ce(151));for(var k=O=null,C=g,S=g=0,x=null,P=d.next();C!==null&&!P.done;S++,P=d.next()){C.index>S?(x=C,C=null):x=C.sibling;var T=_(p,C,P.value,b);if(T===null){C===null&&(C=x);break}e&&C&&T.alternate===null&&t(p,C),g=a(T,g,S),k===null?O=T:k.sibling=T,k=T,C=x}if(P.done)return r(p,C),Zt&&cl(p,S),O;if(C===null){for(;!P.done;S++,P=d.next())P=w(p,P.value,b),P!==null&&(g=a(P,g,S),k===null?O=P:k.sibling=P,k=P);return Zt&&cl(p,S),O}for(C=n(p,C);!P.done;S++,P=d.next())P=h(C,p,S,P.value,b),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?S:P.key),g=a(P,g,S),k===null?O=P:k.sibling=P,k=P);return e&&C.forEach(function(L){return t(p,L)}),Zt&&cl(p,S),O}function y(p,g,d,b){if(typeof d=="object"&&d!==null&&d.type===Os&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case md:e:{for(var O=d.key,k=g;k!==null;){if(k.key===O){if(O=d.type,O===Os){if(k.tag===7){r(p,k.sibling),g=i(k,d.props.children),g.return=p,p=g;break e}}else if(k.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===ho&&Q3(O)===k.type){r(p,k.sibling),g=i(k,d.props),g.ref=rc(p,k,d),g.return=p,p=g;break e}r(p,k);break}else t(p,k);k=k.sibling}d.type===Os?(g=ml(d.props.children,p.mode,b,d.key),g.return=p,p=g):(b=th(d.type,d.key,d.props,null,p.mode,b),b.ref=rc(p,g,d),b.return=p,p=b)}return o(p);case Es:e:{for(k=d.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===d.containerInfo&&g.stateNode.implementation===d.implementation){r(p,g.sibling),g=i(g,d.children||[]),g.return=p,p=g;break e}else{r(p,g);break}else t(p,g);g=g.sibling}g=J1(d,p.mode,b),g.return=p,p=g}return o(p);case ho:return k=d._init,y(p,g,k(d._payload),b)}if(cc(d))return E(p,g,d,b);if(Zu(d))return m(p,g,d,b);Td(p,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,g!==null&&g.tag===6?(r(p,g.sibling),g=i(g,d),g.return=p,p=g):(r(p,g),g=Q1(d,p.mode,b),g.return=p,p=g),o(p)):r(p,g)}return y}var Ys=ew(!0),tw=ew(!1),_h=jo(null),wh=null,Ls=null,oy=null;function ly(){oy=Ls=wh=null}function sy(e){var t=_h.current;Wt(_h),e._currentValue=t}function Kv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Hs(e,t){wh=e,oy=Ls=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(On=!0),e.firstContext=null)}function pi(e){var t=e._currentValue;if(oy!==e)if(e={context:e,memoizedValue:t,next:null},Ls===null){if(wh===null)throw Error(Ce(308));Ls=e,wh.dependencies={lanes:0,firstContext:e}}else Ls=Ls.next=e;return t}var hl=null;function uy(e){hl===null?hl=[e]:hl.push(e)}function rw(e,t,r,n){var i=t.interleaved;return i===null?(r.next=r,uy(t)):(r.next=i.next,i.next=r),t.interleaved=r,ja(e,n)}function ja(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var po=!1;function cy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ra(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xo(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Ot&2){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,ja(e,r)}return i=n.interleaved,i===null?(t.next=t,uy(n)):(t.next=i.next,i.next=t),n.interleaved=t,ja(e,r)}function Kd(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Km(e,r)}}function J3(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?i=a=o:a=a.next=o,r=r.next}while(r!==null);a===null?i=a=t:a=a.next=t}else i=a=t;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Sh(e,t,r,n){var i=e.updateQueue;po=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var u=l,f=u.next;u.next=null,o===null?a=f:o.next=f,o=u;var v=e.alternate;v!==null&&(v=v.updateQueue,l=v.lastBaseUpdate,l!==o&&(l===null?v.firstBaseUpdate=f:l.next=f,v.lastBaseUpdate=u))}if(a!==null){var w=i.baseState;o=0,v=f=u=null,l=a;do{var _=l.lane,h=l.eventTime;if((n&_)===_){v!==null&&(v=v.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var E=e,m=l;switch(_=t,h=r,m.tag){case 1:if(E=m.payload,typeof E=="function"){w=E.call(h,w,_);break e}w=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=m.payload,_=typeof E=="function"?E.call(h,w,_):E,_==null)break e;w=nr({},w,_);break e;case 2:po=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,_=i.effects,_===null?i.effects=[l]:_.push(l))}else h={eventTime:h,lane:_,tag:l.tag,payload:l.payload,callback:l.callback,next:null},v===null?(f=v=h,u=w):v=v.next=h,o|=_;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;_=l,l=_.next,_.next=null,i.lastBaseUpdate=_,i.shared.pending=null}}while(!0);if(v===null&&(u=w),i.baseState=u,i.firstBaseUpdate=f,i.lastBaseUpdate=v,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);El|=o,e.lanes=o,e.memoizedState=w}}function e5(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Ce(191,i));i.call(n)}}}var lf={},oa=jo(lf),zc=jo(lf),Bc=jo(lf);function pl(e){if(e===lf)throw Error(Ce(174));return e}function fy(e,t){switch(Ut(Bc,t),Ut(zc,e),Ut(oa,lf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Av(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Av(t,e)}Wt(oa),Ut(oa,t)}function Ks(){Wt(oa),Wt(zc),Wt(Bc)}function iw(e){pl(Bc.current);var t=pl(oa.current),r=Av(t,e.type);t!==r&&(Ut(zc,e),Ut(oa,r))}function dy(e){zc.current===e&&(Wt(oa),Wt(zc))}var tr=jo(0);function Eh(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var q1=[];function hy(){for(var e=0;e<q1.length;e++)q1[e]._workInProgressVersionPrimary=null;q1.length=0}var Xd=Ha.ReactCurrentDispatcher,W1=Ha.ReactCurrentBatchConfig,Sl=0,rr=null,xr=null,Fr=null,Oh=!1,_c=!1,Uc=0,sx=0;function en(){throw Error(Ce(321))}function py(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ji(e[r],t[r]))return!1;return!0}function gy(e,t,r,n,i,a){if(Sl=a,rr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xd.current=e===null||e.memoizedState===null?dx:hx,e=r(n,i),_c){a=0;do{if(_c=!1,Uc=0,25<=a)throw Error(Ce(301));a+=1,Fr=xr=null,t.updateQueue=null,Xd.current=px,e=r(n,i)}while(_c)}if(Xd.current=xh,t=xr!==null&&xr.next!==null,Sl=0,Fr=xr=rr=null,Oh=!1,t)throw Error(Ce(300));return e}function vy(){var e=Uc!==0;return Uc=0,e}function ea(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fr===null?rr.memoizedState=Fr=e:Fr=Fr.next=e,Fr}function gi(){if(xr===null){var e=rr.alternate;e=e!==null?e.memoizedState:null}else e=xr.next;var t=Fr===null?rr.memoizedState:Fr.next;if(t!==null)Fr=t,xr=e;else{if(e===null)throw Error(Ce(310));xr=e,e={memoizedState:xr.memoizedState,baseState:xr.baseState,baseQueue:xr.baseQueue,queue:xr.queue,next:null},Fr===null?rr.memoizedState=Fr=e:Fr=Fr.next=e}return Fr}function Hc(e,t){return typeof t=="function"?t(e):t}function Y1(e){var t=gi(),r=t.queue;if(r===null)throw Error(Ce(311));r.lastRenderedReducer=e;var n=xr,i=n.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}n.baseQueue=i=a,r.pending=null}if(i!==null){a=i.next,n=n.baseState;var l=o=null,u=null,f=a;do{var v=f.lane;if((Sl&v)===v)u!==null&&(u=u.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),n=f.hasEagerState?f.eagerState:e(n,f.action);else{var w={lane:v,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};u===null?(l=u=w,o=n):u=u.next=w,rr.lanes|=v,El|=v}f=f.next}while(f!==null&&f!==a);u===null?o=n:u.next=l,ji(n,t.memoizedState)||(On=!0),t.memoizedState=n,t.baseState=o,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){i=e;do a=i.lane,rr.lanes|=a,El|=a,i=i.next;while(i!==e)}else i===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function K1(e){var t=gi(),r=t.queue;if(r===null)throw Error(Ce(311));r.lastRenderedReducer=e;var n=r.dispatch,i=r.pending,a=t.memoizedState;if(i!==null){r.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);ji(a,t.memoizedState)||(On=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,n]}function aw(){}function ow(e,t){var r=rr,n=gi(),i=t(),a=!ji(n.memoizedState,i);if(a&&(n.memoizedState=i,On=!0),n=n.queue,my(uw.bind(null,r,n,e),[e]),n.getSnapshot!==t||a||Fr!==null&&Fr.memoizedState.tag&1){if(r.flags|=2048,Gc(9,sw.bind(null,r,n,i,t),void 0,null),jr===null)throw Error(Ce(349));Sl&30||lw(r,t,i)}return i}function lw(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=rr.updateQueue,t===null?(t={lastEffect:null,stores:null},rr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function sw(e,t,r,n){t.value=r,t.getSnapshot=n,cw(t)&&fw(e)}function uw(e,t,r){return r(function(){cw(t)&&fw(e)})}function cw(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ji(e,r)}catch{return!0}}function fw(e){var t=ja(e,1);t!==null&&Mi(t,e,1,-1)}function t5(e){var t=ea();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hc,lastRenderedState:e},t.queue=e,e=e.dispatch=fx.bind(null,rr,e),[t.memoizedState,e]}function Gc(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=rr.updateQueue,t===null?(t={lastEffect:null,stores:null},rr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function dw(){return gi().memoizedState}function Zd(e,t,r,n){var i=ea();rr.flags|=e,i.memoizedState=Gc(1|t,r,void 0,n===void 0?null:n)}function rp(e,t,r,n){var i=gi();n=n===void 0?null:n;var a=void 0;if(xr!==null){var o=xr.memoizedState;if(a=o.destroy,n!==null&&py(n,o.deps)){i.memoizedState=Gc(t,r,a,n);return}}rr.flags|=e,i.memoizedState=Gc(1|t,r,a,n)}function r5(e,t){return Zd(8390656,8,e,t)}function my(e,t){return rp(2048,8,e,t)}function hw(e,t){return rp(4,2,e,t)}function pw(e,t){return rp(4,4,e,t)}function gw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vw(e,t,r){return r=r!=null?r.concat([e]):null,rp(4,4,gw.bind(null,t,e),r)}function yy(){}function mw(e,t){var r=gi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&py(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function yw(e,t){var r=gi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&py(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function bw(e,t,r){return Sl&21?(ji(r,t)||(r=O6(),rr.lanes|=r,El|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,On=!0),e.memoizedState=r)}function ux(e,t){var r=Lt;Lt=r!==0&&4>r?r:4,e(!0);var n=W1.transition;W1.transition={};try{e(!1),t()}finally{Lt=r,W1.transition=n}}function _w(){return gi().memoizedState}function cx(e,t,r){var n=Co(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},ww(e))Sw(t,r);else if(r=rw(e,t,r,n),r!==null){var i=dn();Mi(r,e,n,i),Ew(r,t,n)}}function fx(e,t,r){var n=Co(e),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(ww(e))Sw(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,r);if(i.hasEagerState=!0,i.eagerState=l,ji(l,o)){var u=t.interleaved;u===null?(i.next=i,uy(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}r=rw(e,t,i,n),r!==null&&(i=dn(),Mi(r,e,n,i),Ew(r,t,n))}}function ww(e){var t=e.alternate;return e===rr||t!==null&&t===rr}function Sw(e,t){_c=Oh=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Ew(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Km(e,r)}}var xh={readContext:pi,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useInsertionEffect:en,useLayoutEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useMutableSource:en,useSyncExternalStore:en,useId:en,unstable_isNewReconciler:!1},dx={readContext:pi,useCallback:function(e,t){return ea().memoizedState=[e,t===void 0?null:t],e},useContext:pi,useEffect:r5,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Zd(4194308,4,gw.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Zd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zd(4,2,e,t)},useMemo:function(e,t){var r=ea();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=ea();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=cx.bind(null,rr,e),[n.memoizedState,e]},useRef:function(e){var t=ea();return e={current:e},t.memoizedState=e},useState:t5,useDebugValue:yy,useDeferredValue:function(e){return ea().memoizedState=e},useTransition:function(){var e=t5(!1),t=e[0];return e=ux.bind(null,e[1]),ea().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=rr,i=ea();if(Zt){if(r===void 0)throw Error(Ce(407));r=r()}else{if(r=t(),jr===null)throw Error(Ce(349));Sl&30||lw(n,t,r)}i.memoizedState=r;var a={value:r,getSnapshot:t};return i.queue=a,r5(uw.bind(null,n,a,e),[e]),n.flags|=2048,Gc(9,sw.bind(null,n,a,r,t),void 0,null),r},useId:function(){var e=ea(),t=jr.identifierPrefix;if(Zt){var r=ka,n=Aa;r=(n&~(1<<32-Li(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Uc++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=sx++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},hx={readContext:pi,useCallback:mw,useContext:pi,useEffect:my,useImperativeHandle:vw,useInsertionEffect:hw,useLayoutEffect:pw,useMemo:yw,useReducer:Y1,useRef:dw,useState:function(){return Y1(Hc)},useDebugValue:yy,useDeferredValue:function(e){var t=gi();return bw(t,xr.memoizedState,e)},useTransition:function(){var e=Y1(Hc)[0],t=gi().memoizedState;return[e,t]},useMutableSource:aw,useSyncExternalStore:ow,useId:_w,unstable_isNewReconciler:!1},px={readContext:pi,useCallback:mw,useContext:pi,useEffect:my,useImperativeHandle:vw,useInsertionEffect:hw,useLayoutEffect:pw,useMemo:yw,useReducer:K1,useRef:dw,useState:function(){return K1(Hc)},useDebugValue:yy,useDeferredValue:function(e){var t=gi();return xr===null?t.memoizedState=e:bw(t,xr.memoizedState,e)},useTransition:function(){var e=K1(Hc)[0],t=gi().memoizedState;return[e,t]},useMutableSource:aw,useSyncExternalStore:ow,useId:_w,unstable_isNewReconciler:!1};function Ai(e,t){if(e&&e.defaultProps){t=nr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Xv(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:nr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var np={isMounted:function(e){return(e=e._reactInternals)?Ll(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=dn(),i=Co(e),a=Ra(n,i);a.payload=t,r!=null&&(a.callback=r),t=xo(e,a,i),t!==null&&(Mi(t,e,i,n),Kd(t,e,i))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=dn(),i=Co(e),a=Ra(n,i);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=xo(e,a,i),t!==null&&(Mi(t,e,i,n),Kd(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=dn(),n=Co(e),i=Ra(r,n);i.tag=2,t!=null&&(i.callback=t),t=xo(e,i,n),t!==null&&(Mi(t,e,n,r),Kd(t,e,n))}};function n5(e,t,r,n,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ic(r,n)||!Ic(i,a):!0}function Ow(e,t,r){var n=!1,i=Lo,a=t.contextType;return typeof a=="object"&&a!==null?a=pi(a):(i=Tn(t)?_l:nn.current,n=t.contextTypes,a=(n=n!=null)?qs(e,i):Lo),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=np,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function i5(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&np.enqueueReplaceState(t,t.state,null)}function Zv(e,t,r,n){var i=e.stateNode;i.props=r,i.state=e.memoizedState,i.refs={},cy(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=pi(a):(a=Tn(t)?_l:nn.current,i.context=qs(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Xv(e,t,a,r),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&np.enqueueReplaceState(i,i.state,null),Sh(e,r,i,n),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Xs(e,t){try{var r="",n=t;do r+=HE(n),n=n.return;while(n);var i=r}catch(a){i=`
|
|
31
|
-
Error generating stack: `+a.message+`
|
|
32
|
-
`+a.stack}return{value:e,source:t,stack:i,digest:null}}function X1(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Qv(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var gx=typeof WeakMap=="function"?WeakMap:Map;function xw(e,t,r){r=Ra(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ch||(Ch=!0,sm=n),Qv(e,t)},r}function Pw(e,t,r){r=Ra(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var i=t.value;r.payload=function(){return n(i)},r.callback=function(){Qv(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Qv(e,t),typeof n!="function"&&(Po===null?Po=new Set([this]):Po.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),r}function a5(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new gx;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(r)||(i.add(r),e=Ax.bind(null,e,t,r),t.then(e,e))}function o5(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function l5(e,t,r,n,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Ra(-1,1),t.tag=2,xo(r,t,1))),r.lanes|=1),e)}var vx=Ha.ReactCurrentOwner,On=!1;function fn(e,t,r,n){t.child=e===null?tw(t,null,r,n):Ys(t,e.child,r,n)}function s5(e,t,r,n,i){r=r.render;var a=t.ref;return Hs(t,i),n=gy(e,t,r,n,a,i),r=vy(),e!==null&&!On?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,za(e,t,i)):(Zt&&r&&ny(t),t.flags|=1,fn(e,t,n,i),t.child)}function u5(e,t,r,n,i){if(e===null){var a=r.type;return typeof a=="function"&&!Py(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,Cw(e,t,a,n,i)):(e=th(r.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(r=r.compare,r=r!==null?r:Ic,r(o,n)&&e.ref===t.ref)return za(e,t,i)}return t.flags|=1,e=To(a,n),e.ref=t.ref,e.return=t,t.child=e}function Cw(e,t,r,n,i){if(e!==null){var a=e.memoizedProps;if(Ic(a,n)&&e.ref===t.ref)if(On=!1,t.pendingProps=n=a,(e.lanes&i)!==0)e.flags&131072&&(On=!0);else return t.lanes=e.lanes,za(e,t,i)}return Jv(e,t,r,n,i)}function Tw(e,t,r){var n=t.pendingProps,i=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ut(Ns,Bn),Bn|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ut(Ns,Bn),Bn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,Ut(Ns,Bn),Bn|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,Ut(Ns,Bn),Bn|=n;return fn(e,t,i,r),t.child}function Aw(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Jv(e,t,r,n,i){var a=Tn(r)?_l:nn.current;return a=qs(t,a),Hs(t,i),r=gy(e,t,r,n,a,i),n=vy(),e!==null&&!On?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,za(e,t,i)):(Zt&&n&&ny(t),t.flags|=1,fn(e,t,r,i),t.child)}function c5(e,t,r,n,i){if(Tn(r)){var a=!0;mh(t)}else a=!1;if(Hs(t,i),t.stateNode===null)Qd(e,t),Ow(t,r,n),Zv(t,r,n,i),n=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var u=o.context,f=r.contextType;typeof f=="object"&&f!==null?f=pi(f):(f=Tn(r)?_l:nn.current,f=qs(t,f));var v=r.getDerivedStateFromProps,w=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function";w||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==n||u!==f)&&i5(t,o,n,f),po=!1;var _=t.memoizedState;o.state=_,Sh(t,n,o,i),u=t.memoizedState,l!==n||_!==u||Cn.current||po?(typeof v=="function"&&(Xv(t,r,v,n),u=t.memoizedState),(l=po||n5(t,r,l,n,_,u,f))?(w||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=u),o.props=n,o.state=u,o.context=f,n=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{o=t.stateNode,nw(e,t),l=t.memoizedProps,f=t.type===t.elementType?l:Ai(t.type,l),o.props=f,w=t.pendingProps,_=o.context,u=r.contextType,typeof u=="object"&&u!==null?u=pi(u):(u=Tn(r)?_l:nn.current,u=qs(t,u));var h=r.getDerivedStateFromProps;(v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==w||_!==u)&&i5(t,o,n,u),po=!1,_=t.memoizedState,o.state=_,Sh(t,n,o,i);var E=t.memoizedState;l!==w||_!==E||Cn.current||po?(typeof h=="function"&&(Xv(t,r,h,n),E=t.memoizedState),(f=po||n5(t,r,f,n,_,E,u)||!1)?(v||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,E,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,E,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=E),o.props=n,o.state=E,o.context=u,n=f):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),n=!1)}return em(e,t,r,n,a,i)}function em(e,t,r,n,i,a){Aw(e,t);var o=(t.flags&128)!==0;if(!n&&!o)return i&&K3(t,r,!1),za(e,t,a);n=t.stateNode,vx.current=t;var l=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&o?(t.child=Ys(t,e.child,null,a),t.child=Ys(t,null,l,a)):fn(e,t,l,a),t.memoizedState=n.state,i&&K3(t,r,!0),t.child}function kw(e){var t=e.stateNode;t.pendingContext?Y3(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Y3(e,t.context,!1),fy(e,t.containerInfo)}function f5(e,t,r,n,i){return Ws(),ay(i),t.flags|=256,fn(e,t,r,n),t.child}var tm={dehydrated:null,treeContext:null,retryLane:0};function rm(e){return{baseLanes:e,cachePool:null,transitions:null}}function Rw(e,t,r){var n=t.pendingProps,i=tr.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ut(tr,i&1),e===null)return Yv(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=n.children,e=n.fallback,a?(n=t.mode,a=t.child,o={mode:"hidden",children:o},!(n&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=op(o,n,0,null),e=ml(e,n,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=rm(r),t.memoizedState=tm,e):by(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return mx(e,t,o,n,l,i,r);if(a){a=n.fallback,o=t.mode,i=e.child,l=i.sibling;var u={mode:"hidden",children:n.children};return!(o&1)&&t.child!==i?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=To(i,u),n.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=To(l,a):(a=ml(a,o,r,null),a.flags|=2),a.return=t,n.return=t,n.sibling=a,t.child=n,n=a,a=t.child,o=e.child.memoizedState,o=o===null?rm(r):{baseLanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~r,t.memoizedState=tm,n}return a=e.child,e=a.sibling,n=To(a,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function by(e,t){return t=op({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ad(e,t,r,n){return n!==null&&ay(n),Ys(t,e.child,null,r),e=by(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mx(e,t,r,n,i,a,o){if(r)return t.flags&256?(t.flags&=-257,n=X1(Error(Ce(422))),Ad(e,t,o,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=n.fallback,i=t.mode,n=op({mode:"visible",children:n.children},i,0,null),a=ml(a,i,o,null),a.flags|=2,n.return=t,a.return=t,n.sibling=a,t.child=n,t.mode&1&&Ys(t,e.child,null,o),t.child.memoizedState=rm(o),t.memoizedState=tm,a);if(!(t.mode&1))return Ad(e,t,o,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var l=n.dgst;return n=l,a=Error(Ce(419)),n=X1(a,n,void 0),Ad(e,t,o,n)}if(l=(o&e.childLanes)!==0,On||l){if(n=jr,n!==null){switch(o&-o){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,ja(e,i),Mi(n,e,i,-1))}return xy(),n=X1(Error(Ce(421))),Ad(e,t,o,n)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=kx.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Hn=Oo(i.nextSibling),Gn=t,Zt=!0,Ri=null,e!==null&&(li[si++]=Aa,li[si++]=ka,li[si++]=wl,Aa=e.id,ka=e.overflow,wl=t),t=by(t,n.children),t.flags|=4096,t)}function d5(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Kv(e.return,t,r)}function Z1(e,t,r,n,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=n,a.tail=r,a.tailMode=i)}function Lw(e,t,r){var n=t.pendingProps,i=n.revealOrder,a=n.tail;if(fn(e,t,n.children,r),n=tr.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&d5(e,r,t);else if(e.tag===19)d5(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ut(tr,n),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(r=t.child,i=null;r!==null;)e=r.alternate,e!==null&&Eh(e)===null&&(i=r),r=r.sibling;r=i,r===null?(i=t.child,t.child=null):(i=r.sibling,r.sibling=null),Z1(t,!1,i,r,a);break;case"backwards":for(r=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eh(e)===null){t.child=i;break}e=i.sibling,i.sibling=r,r=i,i=e}Z1(t,!0,r,null,a);break;case"together":Z1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qd(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function za(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),El|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Ce(153));if(t.child!==null){for(e=t.child,r=To(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=To(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function yx(e,t,r){switch(t.tag){case 3:kw(t),Ws();break;case 5:iw(t);break;case 1:Tn(t.type)&&mh(t);break;case 4:fy(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,i=t.memoizedProps.value;Ut(_h,n._currentValue),n._currentValue=i;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ut(tr,tr.current&1),t.flags|=128,null):r&t.child.childLanes?Rw(e,t,r):(Ut(tr,tr.current&1),e=za(e,t,r),e!==null?e.sibling:null);Ut(tr,tr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return Lw(e,t,r);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ut(tr,tr.current),n)break;return null;case 22:case 23:return t.lanes=0,Tw(e,t,r)}return za(e,t,r)}var Mw,nm,Nw,Iw;Mw=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};nm=function(){};Nw=function(e,t,r,n){var i=e.memoizedProps;if(i!==n){e=t.stateNode,pl(oa.current);var a=null;switch(r){case"input":i=xv(e,i),n=xv(e,n),a=[];break;case"select":i=nr({},i,{value:void 0}),n=nr({},n,{value:void 0}),a=[];break;case"textarea":i=Tv(e,i),n=Tv(e,n),a=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=gh)}kv(r,n);var o;r=null;for(f in i)if(!n.hasOwnProperty(f)&&i.hasOwnProperty(f)&&i[f]!=null)if(f==="style"){var l=i[f];for(o in l)l.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(Tc.hasOwnProperty(f)?a||(a=[]):(a=a||[]).push(f,null));for(f in n){var u=n[f];if(l=i!=null?i[f]:void 0,n.hasOwnProperty(f)&&u!==l&&(u!=null||l!=null))if(f==="style")if(l){for(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(r||(r={}),r[o]=u[o])}else r||(a||(a=[]),a.push(f,r)),r=u;else f==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(a=a||[]).push(f,u)):f==="children"?typeof u!="string"&&typeof u!="number"||(a=a||[]).push(f,""+u):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(Tc.hasOwnProperty(f)?(u!=null&&f==="onScroll"&&qt("scroll",e),a||l===u||(a=[])):(a=a||[]).push(f,u))}r&&(a=a||[]).push("style",r);var f=a;(t.updateQueue=f)&&(t.flags|=4)}};Iw=function(e,t,r,n){r!==n&&(t.flags|=4)};function nc(e,t){if(!Zt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function tn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function bx(e,t,r){var n=t.pendingProps;switch(iy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tn(t),null;case 1:return Tn(t.type)&&vh(),tn(t),null;case 3:return n=t.stateNode,Ks(),Wt(Cn),Wt(nn),hy(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Cd(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ri!==null&&(fm(Ri),Ri=null))),nm(e,t),tn(t),null;case 5:dy(t);var i=pl(Bc.current);if(r=t.type,e!==null&&t.stateNode!=null)Nw(e,t,r,n,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(Ce(166));return tn(t),null}if(e=pl(oa.current),Cd(t)){n=t.stateNode,r=t.type;var a=t.memoizedProps;switch(n[ta]=t,n[jc]=a,e=(t.mode&1)!==0,r){case"dialog":qt("cancel",n),qt("close",n);break;case"iframe":case"object":case"embed":qt("load",n);break;case"video":case"audio":for(i=0;i<dc.length;i++)qt(dc[i],n);break;case"source":qt("error",n);break;case"img":case"image":case"link":qt("error",n),qt("load",n);break;case"details":qt("toggle",n);break;case"input":w3(n,a),qt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!a.multiple},qt("invalid",n);break;case"textarea":E3(n,a),qt("invalid",n)}kv(r,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?n.textContent!==l&&(a.suppressHydrationWarning!==!0&&Pd(n.textContent,l,e),i=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Pd(n.textContent,l,e),i=["children",""+l]):Tc.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&qt("scroll",n)}switch(r){case"input":yd(n),S3(n,a,!0);break;case"textarea":yd(n),O3(n);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(n.onclick=gh)}n=i,t.updateQueue=n,n!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=u6(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[ta]=t,e[jc]=n,Mw(e,t,!1,!1),t.stateNode=e;e:{switch(o=Rv(r,n),r){case"dialog":qt("cancel",e),qt("close",e),i=n;break;case"iframe":case"object":case"embed":qt("load",e),i=n;break;case"video":case"audio":for(i=0;i<dc.length;i++)qt(dc[i],e);i=n;break;case"source":qt("error",e),i=n;break;case"img":case"image":case"link":qt("error",e),qt("load",e),i=n;break;case"details":qt("toggle",e),i=n;break;case"input":w3(e,n),i=xv(e,n),qt("invalid",e);break;case"option":i=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},i=nr({},n,{value:void 0}),qt("invalid",e);break;case"textarea":E3(e,n),i=Tv(e,n),qt("invalid",e);break;default:i=n}kv(r,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var u=l[a];a==="style"?d6(e,u):a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&c6(e,u)):a==="children"?typeof u=="string"?(r!=="textarea"||u!=="")&&Ac(e,u):typeof u=="number"&&Ac(e,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Tc.hasOwnProperty(a)?u!=null&&a==="onScroll"&&qt("scroll",e):u!=null&&Gm(e,a,u,o))}switch(r){case"input":yd(e),S3(e,n,!1);break;case"textarea":yd(e),O3(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Ro(n.value));break;case"select":e.multiple=!!n.multiple,a=n.value,a!=null?js(e,!!n.multiple,a,!1):n.defaultValue!=null&&js(e,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=gh)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return tn(t),null;case 6:if(e&&t.stateNode!=null)Iw(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(Ce(166));if(r=pl(Bc.current),pl(oa.current),Cd(t)){if(n=t.stateNode,r=t.memoizedProps,n[ta]=t,(a=n.nodeValue!==r)&&(e=Gn,e!==null))switch(e.tag){case 3:Pd(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Pd(n.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ta]=t,t.stateNode=n}return tn(t),null;case 13:if(Wt(tr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Zt&&Hn!==null&&t.mode&1&&!(t.flags&128))J6(),Ws(),t.flags|=98560,a=!1;else if(a=Cd(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(Ce(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ce(317));a[ta]=t}else Ws(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;tn(t),a=!1}else Ri!==null&&(fm(Ri),Ri=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||tr.current&1?Cr===0&&(Cr=3):xy())),t.updateQueue!==null&&(t.flags|=4),tn(t),null);case 4:return Ks(),nm(e,t),e===null&&Dc(t.stateNode.containerInfo),tn(t),null;case 10:return sy(t.type._context),tn(t),null;case 17:return Tn(t.type)&&vh(),tn(t),null;case 19:if(Wt(tr),a=t.memoizedState,a===null)return tn(t),null;if(n=(t.flags&128)!==0,o=a.rendering,o===null)if(n)nc(a,!1);else{if(Cr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eh(e),o!==null){for(t.flags|=128,nc(a,!1),n=o.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)a=r,e=n,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ut(tr,tr.current&1|2),t.child}e=e.sibling}a.tail!==null&&pr()>Zs&&(t.flags|=128,n=!0,nc(a,!1),t.lanes=4194304)}else{if(!n)if(e=Eh(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),nc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Zt)return tn(t),null}else 2*pr()-a.renderingStartTime>Zs&&r!==1073741824&&(t.flags|=128,n=!0,nc(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(r=a.last,r!==null?r.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=pr(),t.sibling=null,r=tr.current,Ut(tr,n?r&1|2:r&1),t):(tn(t),null);case 22:case 23:return Oy(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Bn&1073741824&&(tn(t),t.subtreeFlags&6&&(t.flags|=8192)):tn(t),null;case 24:return null;case 25:return null}throw Error(Ce(156,t.tag))}function _x(e,t){switch(iy(t),t.tag){case 1:return Tn(t.type)&&vh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ks(),Wt(Cn),Wt(nn),hy(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return dy(t),null;case 13:if(Wt(tr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ce(340));Ws()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Wt(tr),null;case 4:return Ks(),null;case 10:return sy(t.type._context),null;case 22:case 23:return Oy(),null;case 24:return null;default:return null}}var kd=!1,rn=!1,wx=typeof WeakSet=="function"?WeakSet:Set,$e=null;function Ms(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){sr(e,t,n)}else r.current=null}function im(e,t,r){try{r()}catch(n){sr(e,t,n)}}var h5=!1;function Sx(e,t){if(Uv=dh,e=B6(),ry(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,a=n.focusNode;n=n.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var o=0,l=-1,u=-1,f=0,v=0,w=e,_=null;t:for(;;){for(var h;w!==r||i!==0&&w.nodeType!==3||(l=o+i),w!==a||n!==0&&w.nodeType!==3||(u=o+n),w.nodeType===3&&(o+=w.nodeValue.length),(h=w.firstChild)!==null;)_=w,w=h;for(;;){if(w===e)break t;if(_===r&&++f===i&&(l=o),_===a&&++v===n&&(u=o),(h=w.nextSibling)!==null)break;w=_,_=w.parentNode}w=h}r=l===-1||u===-1?null:{start:l,end:u}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hv={focusedElem:e,selectionRange:r},dh=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var m=E.memoizedProps,y=E.memoizedState,p=t.stateNode,g=p.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ai(t.type,m),y);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ce(163))}}catch(b){sr(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return E=h5,h5=!1,E}function wc(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&im(t,r,a)}i=i.next}while(i!==n)}}function ip(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function am(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Dw(e){var t=e.alternate;t!==null&&(e.alternate=null,Dw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ta],delete t[jc],delete t[Vv],delete t[ix],delete t[ax])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Fw(e){return e.tag===5||e.tag===3||e.tag===4}function p5(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Fw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function om(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gh));else if(n!==4&&(e=e.child,e!==null))for(om(e,t,r),e=e.sibling;e!==null;)om(e,t,r),e=e.sibling}function lm(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(lm(e,t,r),e=e.sibling;e!==null;)lm(e,t,r),e=e.sibling}var $r=null,ki=!1;function uo(e,t,r){for(r=r.child;r!==null;)jw(e,t,r),r=r.sibling}function jw(e,t,r){if(aa&&typeof aa.onCommitFiberUnmount=="function")try{aa.onCommitFiberUnmount(Xh,r)}catch{}switch(r.tag){case 5:rn||Ms(r,t);case 6:var n=$r,i=ki;$r=null,uo(e,t,r),$r=n,ki=i,$r!==null&&(ki?(e=$r,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):$r.removeChild(r.stateNode));break;case 18:$r!==null&&(ki?(e=$r,r=r.stateNode,e.nodeType===8?$1(e.parentNode,r):e.nodeType===1&&$1(e,r),Mc(e)):$1($r,r.stateNode));break;case 4:n=$r,i=ki,$r=r.stateNode.containerInfo,ki=!0,uo(e,t,r),$r=n,ki=i;break;case 0:case 11:case 14:case 15:if(!rn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&im(r,t,o),i=i.next}while(i!==n)}uo(e,t,r);break;case 1:if(!rn&&(Ms(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){sr(r,t,l)}uo(e,t,r);break;case 21:uo(e,t,r);break;case 22:r.mode&1?(rn=(n=rn)||r.memoizedState!==null,uo(e,t,r),rn=n):uo(e,t,r);break;default:uo(e,t,r)}}function g5(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new wx),t.forEach(function(n){var i=Rx.bind(null,e,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Pi(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:$r=l.stateNode,ki=!1;break e;case 3:$r=l.stateNode.containerInfo,ki=!0;break e;case 4:$r=l.stateNode.containerInfo,ki=!0;break e}l=l.return}if($r===null)throw Error(Ce(160));jw(a,o,i),$r=null,ki=!1;var u=i.alternate;u!==null&&(u.return=null),i.return=null}catch(f){sr(i,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)zw(t,e),t=t.sibling}function zw(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pi(t,e),Qi(e),n&4){try{wc(3,e,e.return),ip(3,e)}catch(m){sr(e,e.return,m)}try{wc(5,e,e.return)}catch(m){sr(e,e.return,m)}}break;case 1:Pi(t,e),Qi(e),n&512&&r!==null&&Ms(r,r.return);break;case 5:if(Pi(t,e),Qi(e),n&512&&r!==null&&Ms(r,r.return),e.flags&32){var i=e.stateNode;try{Ac(i,"")}catch(m){sr(e,e.return,m)}}if(n&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=r!==null?r.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&l6(i,a),Rv(l,o);var f=Rv(l,a);for(o=0;o<u.length;o+=2){var v=u[o],w=u[o+1];v==="style"?d6(i,w):v==="dangerouslySetInnerHTML"?c6(i,w):v==="children"?Ac(i,w):Gm(i,v,w,f)}switch(l){case"input":Pv(i,a);break;case"textarea":s6(i,a);break;case"select":var _=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var h=a.value;h!=null?js(i,!!a.multiple,h,!1):_!==!!a.multiple&&(a.defaultValue!=null?js(i,!!a.multiple,a.defaultValue,!0):js(i,!!a.multiple,a.multiple?[]:"",!1))}i[jc]=a}catch(m){sr(e,e.return,m)}}break;case 6:if(Pi(t,e),Qi(e),n&4){if(e.stateNode===null)throw Error(Ce(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){sr(e,e.return,m)}}break;case 3:if(Pi(t,e),Qi(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Mc(t.containerInfo)}catch(m){sr(e,e.return,m)}break;case 4:Pi(t,e),Qi(e);break;case 13:Pi(t,e),Qi(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(Sy=pr())),n&4&&g5(e);break;case 22:if(v=r!==null&&r.memoizedState!==null,e.mode&1?(rn=(f=rn)||v,Pi(t,e),rn=f):Pi(t,e),Qi(e),n&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!v&&e.mode&1)for($e=e,v=e.child;v!==null;){for(w=$e=v;$e!==null;){switch(_=$e,h=_.child,_.tag){case 0:case 11:case 14:case 15:wc(4,_,_.return);break;case 1:Ms(_,_.return);var E=_.stateNode;if(typeof E.componentWillUnmount=="function"){n=_,r=_.return;try{t=n,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(m){sr(n,r,m)}}break;case 5:Ms(_,_.return);break;case 22:if(_.memoizedState!==null){m5(w);continue}}h!==null?(h.return=_,$e=h):m5(w)}v=v.sibling}e:for(v=null,w=e;;){if(w.tag===5){if(v===null){v=w;try{i=w.stateNode,f?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=w.stateNode,u=w.memoizedProps.style,o=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=f6("display",o))}catch(m){sr(e,e.return,m)}}}else if(w.tag===6){if(v===null)try{w.stateNode.nodeValue=f?"":w.memoizedProps}catch(m){sr(e,e.return,m)}}else if((w.tag!==22&&w.tag!==23||w.memoizedState===null||w===e)&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===e)break e;for(;w.sibling===null;){if(w.return===null||w.return===e)break e;v===w&&(v=null),w=w.return}v===w&&(v=null),w.sibling.return=w.return,w=w.sibling}}break;case 19:Pi(t,e),Qi(e),n&4&&g5(e);break;case 21:break;default:Pi(t,e),Qi(e)}}function Qi(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Fw(r)){var n=r;break e}r=r.return}throw Error(Ce(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(Ac(i,""),n.flags&=-33);var a=p5(e);lm(e,a,i);break;case 3:case 4:var o=n.stateNode.containerInfo,l=p5(e);om(e,l,o);break;default:throw Error(Ce(161))}}catch(u){sr(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ex(e,t,r){$e=e,Bw(e)}function Bw(e,t,r){for(var n=(e.mode&1)!==0;$e!==null;){var i=$e,a=i.child;if(i.tag===22&&n){var o=i.memoizedState!==null||kd;if(!o){var l=i.alternate,u=l!==null&&l.memoizedState!==null||rn;l=kd;var f=rn;if(kd=o,(rn=u)&&!f)for($e=i;$e!==null;)o=$e,u=o.child,o.tag===22&&o.memoizedState!==null?y5(i):u!==null?(u.return=o,$e=u):y5(i);for(;a!==null;)$e=a,Bw(a),a=a.sibling;$e=i,kd=l,rn=f}v5(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,$e=a):v5(e)}}function v5(e){for(;$e!==null;){var t=$e;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:rn||ip(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!rn)if(r===null)n.componentDidMount();else{var i=t.elementType===t.type?r.memoizedProps:Ai(t.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&e5(t,a,n);break;case 3:var o=t.updateQueue;if(o!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}e5(t,o,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&r.focus();break;case"img":u.src&&(r.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var v=f.memoizedState;if(v!==null){var w=v.dehydrated;w!==null&&Mc(w)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ce(163))}rn||t.flags&512&&am(t)}catch(_){sr(t,t.return,_)}}if(t===e){$e=null;break}if(r=t.sibling,r!==null){r.return=t.return,$e=r;break}$e=t.return}}function m5(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$e=r;break}$e=t.return}}function y5(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{ip(4,t)}catch(u){sr(t,r,u)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var i=t.return;try{n.componentDidMount()}catch(u){sr(t,i,u)}}var a=t.return;try{am(t)}catch(u){sr(t,a,u)}break;case 5:var o=t.return;try{am(t)}catch(u){sr(t,o,u)}}}catch(u){sr(t,t.return,u)}if(t===e){$e=null;break}var l=t.sibling;if(l!==null){l.return=t.return,$e=l;break}$e=t.return}}var Ox=Math.ceil,Ph=Ha.ReactCurrentDispatcher,_y=Ha.ReactCurrentOwner,di=Ha.ReactCurrentBatchConfig,Ot=0,jr=null,_r=null,qr=0,Bn=0,Ns=jo(0),Cr=0,$c=null,El=0,ap=0,wy=0,Sc=null,En=null,Sy=0,Zs=1/0,Ca=null,Ch=!1,sm=null,Po=null,Rd=!1,bo=null,Th=0,Ec=0,um=null,Jd=-1,eh=0;function dn(){return Ot&6?pr():Jd!==-1?Jd:Jd=pr()}function Co(e){return e.mode&1?Ot&2&&qr!==0?qr&-qr:lx.transition!==null?(eh===0&&(eh=O6()),eh):(e=Lt,e!==0||(e=window.event,e=e===void 0?16:R6(e.type)),e):1}function Mi(e,t,r,n){if(50<Ec)throw Ec=0,um=null,Error(Ce(185));nf(e,r,n),(!(Ot&2)||e!==jr)&&(e===jr&&(!(Ot&2)&&(ap|=r),Cr===4&&vo(e,qr)),An(e,n),r===1&&Ot===0&&!(t.mode&1)&&(Zs=pr()+500,tp&&zo()))}function An(e,t){var r=e.callbackNode;lO(e,t);var n=fh(e,e===jr?qr:0);if(n===0)r!==null&&C3(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&C3(r),t===1)e.tag===0?ox(b5.bind(null,e)):X6(b5.bind(null,e)),rx(function(){!(Ot&6)&&zo()}),r=null;else{switch(x6(n)){case 1:r=Ym;break;case 4:r=S6;break;case 16:r=ch;break;case 536870912:r=E6;break;default:r=ch}r=Yw(r,Uw.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Uw(e,t){if(Jd=-1,eh=0,Ot&6)throw Error(Ce(327));var r=e.callbackNode;if(Gs()&&e.callbackNode!==r)return null;var n=fh(e,e===jr?qr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Ah(e,n);else{t=n;var i=Ot;Ot|=2;var a=Gw();(jr!==e||qr!==t)&&(Ca=null,Zs=pr()+500,vl(e,t));do try{Cx();break}catch(l){Hw(e,l)}while(!0);ly(),Ph.current=a,Ot=i,_r!==null?t=0:(jr=null,qr=0,t=Cr)}if(t!==0){if(t===2&&(i=Dv(e),i!==0&&(n=i,t=cm(e,i))),t===1)throw r=$c,vl(e,0),vo(e,n),An(e,pr()),r;if(t===6)vo(e,n);else{if(i=e.current.alternate,!(n&30)&&!xx(i)&&(t=Ah(e,n),t===2&&(a=Dv(e),a!==0&&(n=a,t=cm(e,a))),t===1))throw r=$c,vl(e,0),vo(e,n),An(e,pr()),r;switch(e.finishedWork=i,e.finishedLanes=n,t){case 0:case 1:throw Error(Ce(345));case 2:fl(e,En,Ca);break;case 3:if(vo(e,n),(n&130023424)===n&&(t=Sy+500-pr(),10<t)){if(fh(e,0)!==0)break;if(i=e.suspendedLanes,(i&n)!==n){dn(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=$v(fl.bind(null,e,En,Ca),t);break}fl(e,En,Ca);break;case 4:if(vo(e,n),(n&4194240)===n)break;for(t=e.eventTimes,i=-1;0<n;){var o=31-Li(n);a=1<<o,o=t[o],o>i&&(i=o),n&=~a}if(n=i,n=pr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ox(n/1960))-n,10<n){e.timeoutHandle=$v(fl.bind(null,e,En,Ca),n);break}fl(e,En,Ca);break;case 5:fl(e,En,Ca);break;default:throw Error(Ce(329))}}}return An(e,pr()),e.callbackNode===r?Uw.bind(null,e):null}function cm(e,t){var r=Sc;return e.current.memoizedState.isDehydrated&&(vl(e,t).flags|=256),e=Ah(e,t),e!==2&&(t=En,En=r,t!==null&&fm(t)),e}function fm(e){En===null?En=e:En.push.apply(En,e)}function xx(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],a=i.getSnapshot;i=i.value;try{if(!ji(a(),i))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vo(e,t){for(t&=~wy,t&=~ap,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Li(t),n=1<<r;e[r]=-1,t&=~n}}function b5(e){if(Ot&6)throw Error(Ce(327));Gs();var t=fh(e,0);if(!(t&1))return An(e,pr()),null;var r=Ah(e,t);if(e.tag!==0&&r===2){var n=Dv(e);n!==0&&(t=n,r=cm(e,n))}if(r===1)throw r=$c,vl(e,0),vo(e,t),An(e,pr()),r;if(r===6)throw Error(Ce(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fl(e,En,Ca),An(e,pr()),null}function Ey(e,t){var r=Ot;Ot|=1;try{return e(t)}finally{Ot=r,Ot===0&&(Zs=pr()+500,tp&&zo())}}function Ol(e){bo!==null&&bo.tag===0&&!(Ot&6)&&Gs();var t=Ot;Ot|=1;var r=di.transition,n=Lt;try{if(di.transition=null,Lt=1,e)return e()}finally{Lt=n,di.transition=r,Ot=t,!(Ot&6)&&zo()}}function Oy(){Bn=Ns.current,Wt(Ns)}function vl(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,tx(r)),_r!==null)for(r=_r.return;r!==null;){var n=r;switch(iy(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&vh();break;case 3:Ks(),Wt(Cn),Wt(nn),hy();break;case 5:dy(n);break;case 4:Ks();break;case 13:Wt(tr);break;case 19:Wt(tr);break;case 10:sy(n.type._context);break;case 22:case 23:Oy()}r=r.return}if(jr=e,_r=e=To(e.current,null),qr=Bn=t,Cr=0,$c=null,wy=ap=El=0,En=Sc=null,hl!==null){for(t=0;t<hl.length;t++)if(r=hl[t],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,a=r.pending;if(a!==null){var o=a.next;a.next=i,n.next=o}r.pending=n}hl=null}return e}function Hw(e,t){do{var r=_r;try{if(ly(),Xd.current=xh,Oh){for(var n=rr.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Oh=!1}if(Sl=0,Fr=xr=rr=null,_c=!1,Uc=0,_y.current=null,r===null||r.return===null){Cr=1,$c=t,_r=null;break}e:{var a=e,o=r.return,l=r,u=t;if(t=qr,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=u,v=l,w=v.tag;if(!(v.mode&1)&&(w===0||w===11||w===15)){var _=v.alternate;_?(v.updateQueue=_.updateQueue,v.memoizedState=_.memoizedState,v.lanes=_.lanes):(v.updateQueue=null,v.memoizedState=null)}var h=o5(o);if(h!==null){h.flags&=-257,l5(h,o,l,a,t),h.mode&1&&a5(a,f,t),t=h,u=f;var E=t.updateQueue;if(E===null){var m=new Set;m.add(u),t.updateQueue=m}else E.add(u);break e}else{if(!(t&1)){a5(a,f,t),xy();break e}u=Error(Ce(426))}}else if(Zt&&l.mode&1){var y=o5(o);if(y!==null){!(y.flags&65536)&&(y.flags|=256),l5(y,o,l,a,t),ay(Xs(u,l));break e}}a=u=Xs(u,l),Cr!==4&&(Cr=2),Sc===null?Sc=[a]:Sc.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var p=xw(a,u,t);J3(a,p);break e;case 1:l=u;var g=a.type,d=a.stateNode;if(!(a.flags&128)&&(typeof g.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Po===null||!Po.has(d)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=Pw(a,l,t);J3(a,b);break e}}a=a.return}while(a!==null)}Vw(r)}catch(O){t=O,_r===r&&r!==null&&(_r=r=r.return);continue}break}while(!0)}function Gw(){var e=Ph.current;return Ph.current=xh,e===null?xh:e}function xy(){(Cr===0||Cr===3||Cr===2)&&(Cr=4),jr===null||!(El&268435455)&&!(ap&268435455)||vo(jr,qr)}function Ah(e,t){var r=Ot;Ot|=2;var n=Gw();(jr!==e||qr!==t)&&(Ca=null,vl(e,t));do try{Px();break}catch(i){Hw(e,i)}while(!0);if(ly(),Ot=r,Ph.current=n,_r!==null)throw Error(Ce(261));return jr=null,qr=0,Cr}function Px(){for(;_r!==null;)$w(_r)}function Cx(){for(;_r!==null&&!QE();)$w(_r)}function $w(e){var t=Ww(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?Vw(e):_r=t,_y.current=null}function Vw(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=_x(r,t),r!==null){r.flags&=32767,_r=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Cr=6,_r=null;return}}else if(r=bx(r,t,Bn),r!==null){_r=r;return}if(t=t.sibling,t!==null){_r=t;return}_r=t=e}while(t!==null);Cr===0&&(Cr=5)}function fl(e,t,r){var n=Lt,i=di.transition;try{di.transition=null,Lt=1,Tx(e,t,r,n)}finally{di.transition=i,Lt=n}return null}function Tx(e,t,r,n){do Gs();while(bo!==null);if(Ot&6)throw Error(Ce(327));r=e.finishedWork;var i=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Ce(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(sO(e,a),e===jr&&(_r=jr=null,qr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Rd||(Rd=!0,Yw(ch,function(){return Gs(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=di.transition,di.transition=null;var o=Lt;Lt=1;var l=Ot;Ot|=4,_y.current=null,Sx(e,r),zw(r,e),YO(Hv),dh=!!Uv,Hv=Uv=null,e.current=r,Ex(r),JE(),Ot=l,Lt=o,di.transition=a}else e.current=r;if(Rd&&(Rd=!1,bo=e,Th=i),a=e.pendingLanes,a===0&&(Po=null),rO(r.stateNode),An(e,pr()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)i=t[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(Ch)throw Ch=!1,e=sm,sm=null,e;return Th&1&&e.tag!==0&&Gs(),a=e.pendingLanes,a&1?e===um?Ec++:(Ec=0,um=e):Ec=0,zo(),null}function Gs(){if(bo!==null){var e=x6(Th),t=di.transition,r=Lt;try{if(di.transition=null,Lt=16>e?16:e,bo===null)var n=!1;else{if(e=bo,bo=null,Th=0,Ot&6)throw Error(Ce(331));var i=Ot;for(Ot|=4,$e=e.current;$e!==null;){var a=$e,o=a.child;if($e.flags&16){var l=a.deletions;if(l!==null){for(var u=0;u<l.length;u++){var f=l[u];for($e=f;$e!==null;){var v=$e;switch(v.tag){case 0:case 11:case 15:wc(8,v,a)}var w=v.child;if(w!==null)w.return=v,$e=w;else for(;$e!==null;){v=$e;var _=v.sibling,h=v.return;if(Dw(v),v===f){$e=null;break}if(_!==null){_.return=h,$e=_;break}$e=h}}}var E=a.alternate;if(E!==null){var m=E.child;if(m!==null){E.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}$e=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,$e=o;else e:for(;$e!==null;){if(a=$e,a.flags&2048)switch(a.tag){case 0:case 11:case 15:wc(9,a,a.return)}var p=a.sibling;if(p!==null){p.return=a.return,$e=p;break e}$e=a.return}}var g=e.current;for($e=g;$e!==null;){o=$e;var d=o.child;if(o.subtreeFlags&2064&&d!==null)d.return=o,$e=d;else e:for(o=g;$e!==null;){if(l=$e,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:ip(9,l)}}catch(O){sr(l,l.return,O)}if(l===o){$e=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,$e=b;break e}$e=l.return}}if(Ot=i,zo(),aa&&typeof aa.onPostCommitFiberRoot=="function")try{aa.onPostCommitFiberRoot(Xh,e)}catch{}n=!0}return n}finally{Lt=r,di.transition=t}}return!1}function _5(e,t,r){t=Xs(r,t),t=xw(e,t,1),e=xo(e,t,1),t=dn(),e!==null&&(nf(e,1,t),An(e,t))}function sr(e,t,r){if(e.tag===3)_5(e,e,r);else for(;t!==null;){if(t.tag===3){_5(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Po===null||!Po.has(n))){e=Xs(r,e),e=Pw(t,e,1),t=xo(t,e,1),e=dn(),t!==null&&(nf(t,1,e),An(t,e));break}}t=t.return}}function Ax(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=dn(),e.pingedLanes|=e.suspendedLanes&r,jr===e&&(qr&r)===r&&(Cr===4||Cr===3&&(qr&130023424)===qr&&500>pr()-Sy?vl(e,0):wy|=r),An(e,t)}function qw(e,t){t===0&&(e.mode&1?(t=wd,wd<<=1,!(wd&130023424)&&(wd=4194304)):t=1);var r=dn();e=ja(e,t),e!==null&&(nf(e,t,r),An(e,r))}function kx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),qw(e,r)}function Rx(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(Ce(314))}n!==null&&n.delete(t),qw(e,r)}var Ww;Ww=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cn.current)On=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return On=!1,yx(e,t,r);On=!!(e.flags&131072)}else On=!1,Zt&&t.flags&1048576&&Z6(t,bh,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Qd(e,t),e=t.pendingProps;var i=qs(t,nn.current);Hs(t,r),i=gy(null,t,n,e,i,r);var a=vy();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Tn(n)?(a=!0,mh(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,cy(t),i.updater=np,t.stateNode=i,i._reactInternals=t,Zv(t,n,e,r),t=em(null,t,n,!0,a,r)):(t.tag=0,Zt&&a&&ny(t),fn(null,t,i,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Qd(e,t),e=t.pendingProps,i=n._init,n=i(n._payload),t.type=n,i=t.tag=Mx(n),e=Ai(n,e),i){case 0:t=Jv(null,t,n,e,r);break e;case 1:t=c5(null,t,n,e,r);break e;case 11:t=s5(null,t,n,e,r);break e;case 14:t=u5(null,t,n,Ai(n.type,e),r);break e}throw Error(Ce(306,n,""))}return t;case 0:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ai(n,i),Jv(e,t,n,i,r);case 1:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ai(n,i),c5(e,t,n,i,r);case 3:e:{if(kw(t),e===null)throw Error(Ce(387));n=t.pendingProps,a=t.memoizedState,i=a.element,nw(e,t),Sh(t,n,null,r);var o=t.memoizedState;if(n=o.element,a.isDehydrated)if(a={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Xs(Error(Ce(423)),t),t=f5(e,t,n,r,i);break e}else if(n!==i){i=Xs(Error(Ce(424)),t),t=f5(e,t,n,r,i);break e}else for(Hn=Oo(t.stateNode.containerInfo.firstChild),Gn=t,Zt=!0,Ri=null,r=tw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ws(),n===i){t=za(e,t,r);break e}fn(e,t,n,r)}t=t.child}return t;case 5:return iw(t),e===null&&Yv(t),n=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Gv(n,i)?o=null:a!==null&&Gv(n,a)&&(t.flags|=32),Aw(e,t),fn(e,t,o,r),t.child;case 6:return e===null&&Yv(t),null;case 13:return Rw(e,t,r);case 4:return fy(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ys(t,null,n,r):fn(e,t,n,r),t.child;case 11:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ai(n,i),s5(e,t,n,i,r);case 7:return fn(e,t,t.pendingProps,r),t.child;case 8:return fn(e,t,t.pendingProps.children,r),t.child;case 12:return fn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,Ut(_h,n._currentValue),n._currentValue=o,a!==null)if(ji(a.value,o)){if(a.children===i.children&&!Cn.current){t=za(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var u=l.firstContext;u!==null;){if(u.context===n){if(a.tag===1){u=Ra(-1,r&-r),u.tag=2;var f=a.updateQueue;if(f!==null){f=f.shared;var v=f.pending;v===null?u.next=u:(u.next=v.next,v.next=u),f.pending=u}}a.lanes|=r,u=a.alternate,u!==null&&(u.lanes|=r),Kv(a.return,r,t),l.lanes|=r;break}u=u.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(Ce(341));o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Kv(o,r,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}fn(e,t,i.children,r),t=t.child}return t;case 9:return i=t.type,n=t.pendingProps.children,Hs(t,r),i=pi(i),n=n(i),t.flags|=1,fn(e,t,n,r),t.child;case 14:return n=t.type,i=Ai(n,t.pendingProps),i=Ai(n.type,i),u5(e,t,n,i,r);case 15:return Cw(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,i=t.pendingProps,i=t.elementType===n?i:Ai(n,i),Qd(e,t),t.tag=1,Tn(n)?(e=!0,mh(t)):e=!1,Hs(t,r),Ow(t,n,i),Zv(t,n,i,r),em(null,t,n,!0,e,r);case 19:return Lw(e,t,r);case 22:return Tw(e,t,r)}throw Error(Ce(156,t.tag))};function Yw(e,t){return w6(e,t)}function Lx(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fi(e,t,r,n){return new Lx(e,t,r,n)}function Py(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mx(e){if(typeof e=="function")return Py(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vm)return 11;if(e===qm)return 14}return 2}function To(e,t){var r=e.alternate;return r===null?(r=fi(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function th(e,t,r,n,i,a){var o=2;if(n=e,typeof e=="function")Py(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Os:return ml(r.children,i,a,t);case $m:o=8,i|=8;break;case wv:return e=fi(12,r,t,i|2),e.elementType=wv,e.lanes=a,e;case Sv:return e=fi(13,r,t,i),e.elementType=Sv,e.lanes=a,e;case Ev:return e=fi(19,r,t,i),e.elementType=Ev,e.lanes=a,e;case i6:return op(r,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case r6:o=10;break e;case n6:o=9;break e;case Vm:o=11;break e;case qm:o=14;break e;case ho:o=16,n=null;break e}throw Error(Ce(130,e==null?e:typeof e,""))}return t=fi(o,r,t,i),t.elementType=e,t.type=n,t.lanes=a,t}function ml(e,t,r,n){return e=fi(7,e,n,t),e.lanes=r,e}function op(e,t,r,n){return e=fi(22,e,n,t),e.elementType=i6,e.lanes=r,e.stateNode={isHidden:!1},e}function Q1(e,t,r){return e=fi(6,e,null,t),e.lanes=r,e}function J1(e,t,r){return t=fi(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nx(e,t,r,n,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=M1(0),this.expirationTimes=M1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=M1(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Cy(e,t,r,n,i,a,o,l,u){return e=new Nx(e,t,r,l,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=fi(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},cy(a),e}function Ix(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Es,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function Kw(e){if(!e)return Lo;e=e._reactInternals;e:{if(Ll(e)!==e||e.tag!==1)throw Error(Ce(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Tn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ce(171))}if(e.tag===1){var r=e.type;if(Tn(r))return K6(e,r,t)}return t}function Xw(e,t,r,n,i,a,o,l,u){return e=Cy(r,n,!0,e,i,a,o,l,u),e.context=Kw(null),r=e.current,n=dn(),i=Co(r),a=Ra(n,i),a.callback=t??null,xo(r,a,i),e.current.lanes=i,nf(e,i,n),An(e,n),e}function lp(e,t,r,n){var i=t.current,a=dn(),o=Co(i);return r=Kw(r),t.context===null?t.context=r:t.pendingContext=r,t=Ra(a,o),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=xo(i,t,o),e!==null&&(Mi(e,i,o,a),Kd(e,i,o)),o}function kh(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function w5(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ty(e,t){w5(e,t),(e=e.alternate)&&w5(e,t)}function Dx(){return null}var Zw=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ay(e){this._internalRoot=e}sp.prototype.render=Ay.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ce(409));lp(e,t,null,null)};sp.prototype.unmount=Ay.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ol(function(){lp(null,e,null,null)}),t[Fa]=null}};function sp(e){this._internalRoot=e}sp.prototype.unstable_scheduleHydration=function(e){if(e){var t=T6();e={blockedOn:null,target:e,priority:t};for(var r=0;r<go.length&&t!==0&&t<go[r].priority;r++);go.splice(r,0,e),r===0&&k6(e)}};function ky(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function up(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function S5(){}function Fx(e,t,r,n,i){if(i){if(typeof n=="function"){var a=n;n=function(){var f=kh(o);a.call(f)}}var o=Xw(t,n,e,0,null,!1,!1,"",S5);return e._reactRootContainer=o,e[Fa]=o.current,Dc(e.nodeType===8?e.parentNode:e),Ol(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof n=="function"){var l=n;n=function(){var f=kh(u);l.call(f)}}var u=Cy(e,0,!1,null,null,!1,!1,"",S5);return e._reactRootContainer=u,e[Fa]=u.current,Dc(e.nodeType===8?e.parentNode:e),Ol(function(){lp(t,u,r,n)}),u}function cp(e,t,r,n,i){var a=r._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var u=kh(o);l.call(u)}}lp(t,o,e,i)}else o=Fx(r,t,e,i,n);return kh(o)}P6=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fc(t.pendingLanes);r!==0&&(Km(t,r|1),An(t,pr()),!(Ot&6)&&(Zs=pr()+500,zo()))}break;case 13:Ol(function(){var n=ja(e,1);if(n!==null){var i=dn();Mi(n,e,1,i)}}),Ty(e,1)}};Xm=function(e){if(e.tag===13){var t=ja(e,134217728);if(t!==null){var r=dn();Mi(t,e,134217728,r)}Ty(e,134217728)}};C6=function(e){if(e.tag===13){var t=Co(e),r=ja(e,t);if(r!==null){var n=dn();Mi(r,e,t,n)}Ty(e,t)}};T6=function(){return Lt};A6=function(e,t){var r=Lt;try{return Lt=e,t()}finally{Lt=r}};Mv=function(e,t,r){switch(t){case"input":if(Pv(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var i=ep(n);if(!i)throw Error(Ce(90));o6(n),Pv(n,i)}}}break;case"textarea":s6(e,r);break;case"select":t=r.value,t!=null&&js(e,!!r.multiple,t,!1)}};g6=Ey;v6=Ol;var jx={usingClientEntryPoint:!1,Events:[of,Ts,ep,h6,p6,Ey]},ic={findFiberByHostInstance:dl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},zx={bundleType:ic.bundleType,version:ic.version,rendererPackageName:ic.rendererPackageName,rendererConfig:ic.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ha.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=b6(e),e===null?null:e.stateNode},findFiberByHostInstance:ic.findFiberByHostInstance||Dx,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 Ld=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ld.isDisabled&&Ld.supportsFiber)try{Xh=Ld.inject(zx),aa=Ld}catch{}}qn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jx;qn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ky(t))throw Error(Ce(200));return Ix(e,t,null,r)};qn.createRoot=function(e,t){if(!ky(e))throw Error(Ce(299));var r=!1,n="",i=Zw;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Cy(e,1,!1,null,null,r,!1,n,i),e[Fa]=t.current,Dc(e.nodeType===8?e.parentNode:e),new Ay(t)};qn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ce(188)):(e=Object.keys(e).join(","),Error(Ce(268,e)));return e=b6(t),e=e===null?null:e.stateNode,e};qn.flushSync=function(e){return Ol(e)};qn.hydrate=function(e,t,r){if(!up(t))throw Error(Ce(200));return cp(null,e,t,!0,r)};qn.hydrateRoot=function(e,t,r){if(!ky(e))throw Error(Ce(405));var n=r!=null&&r.hydratedSources||null,i=!1,a="",o=Zw;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),t=Xw(t,null,e,1,r??null,i,!1,a,o),e[Fa]=t.current,Dc(e),n)for(e=0;e<n.length;e++)r=n[e],i=r._getVersion,i=i(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,i]:t.mutableSourceEagerHydrationData.push(r,i);return new sp(t)};qn.render=function(e,t,r){if(!up(t))throw Error(Ce(200));return cp(null,e,t,!1,r)};qn.unmountComponentAtNode=function(e){if(!up(e))throw Error(Ce(40));return e._reactRootContainer?(Ol(function(){cp(null,null,e,!1,function(){e._reactRootContainer=null,e[Fa]=null})}),!0):!1};qn.unstable_batchedUpdates=Ey;qn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!up(r))throw Error(Ce(200));if(e==null||e._reactInternals===void 0)throw Error(Ce(38));return cp(e,t,r,!1,n)};qn.version="18.3.1-next-f1338f8080-20240426";function Qw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qw)}catch(e){console.error(e)}}Qw(),Q_.exports=qn;var Jw=Q_.exports,E5=Jw;oh.createRoot=E5.createRoot,oh.hydrateRoot=E5.hydrateRoot;var e8={};function ot(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(r.length?" "+r.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var Bx={};function Ry(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:Bx}var t8=Object.assign,Rh=Object.getOwnPropertyDescriptor,la=Object.defineProperty,sf=Object.prototype,dm=[];Object.freeze(dm);var Ly={};Object.freeze(Ly);var Ux=typeof Proxy<"u",Hx=Object.toString();function r8(){Ux||ot("Proxy not available")}function n8(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Is=function(){};function Vn(e){return typeof e=="function"}function xl(e){var t=typeof e;switch(t){case"string":case"symbol":case"number":return!0}return!1}function fp(e){return e!==null&&typeof e=="object"}function Ba(e){if(!fp(e))return!1;var t=Object.getPrototypeOf(e);if(t==null)return!0;var r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r.toString()===Hx}function i8(e){var t=e==null?void 0:e.constructor;return t?t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction":!1}function uf(e,t,r){la(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function a8(e,t,r){la(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Bo(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return fp(n)&&n[r]===!0}}function mu(e){return e instanceof Map}function cf(e){return e instanceof Set}var o8=typeof Object.getOwnPropertySymbols<"u";function Gx(e){var t=Object.keys(e);if(!o8)return t;var r=Object.getOwnPropertySymbols(e);return r.length?[].concat(t,r.filter(function(n){return sf.propertyIsEnumerable.call(e,n)})):t}var Qs=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:o8?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function l8(e){return e===null?null:typeof e=="object"?""+e:e}function La(e,t){return sf.hasOwnProperty.call(e,t)}var $x=Object.getOwnPropertyDescriptors||function(t){var r={};return Qs(t).forEach(function(n){r[n]=Rh(t,n)}),r};function Vx(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Yx(n.key),n)}}function My(e,t,r){return t&&Vx(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Mo(){return Mo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mo.apply(this,arguments)}function s8(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,hm(e,t)}function hm(e,t){return hm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},hm(e,t)}function eg(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qx(e,t){if(e){if(typeof e=="string")return O5(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O5(e,t)}}function O5(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ds(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=qx(e))||t){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}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 Wx(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Yx(e){var t=Wx(e,"string");return typeof t=="symbol"?t:String(t)}var ia=Symbol("mobx-stored-annotations");function Ni(e){function t(r,n){if(ff(n))return e.decorate_20223_(r,n);yu(r,n,e)}return Object.assign(t,e)}function yu(e,t,r){La(e,ia)||uf(e,ia,Mo({},e[ia])),nP(r)||(e[ia][t]=r)}function Kx(e){return La(e,ia)||uf(e,ia,Mo({},e[ia])),e[ia]}function ff(e){return typeof e=="object"&&typeof e.kind=="string"}var Xe=Symbol("mobx administration"),df=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Tt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return A8(this)},t.reportChanged=function(){xn(),k8(this),Pn()},t.toString=function(){return this.name_},e}(),Ny=Bo("Atom",df);function Vc(e,t,r){t===void 0&&(t=Is),r===void 0&&(r=Is);var n=new df(e);return t!==Is&&z8(n,t),r!==Is&&By(n,r),n}function Xx(e,t){return e===t}function Zx(e,t){return Xy(e,t)}function Qx(e,t){return Xy(e,t,1)}function Jx(e,t){return Object.is?Object.is(e,t):e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Pl={identity:Xx,structural:Zx,default:Jx,shallow:Qx};function Cl(e,t,r){return bp(e)?e:Array.isArray(e)?Ft.array(e,{name:r}):Ba(e)?Ft.object(e,void 0,{name:r}):mu(e)?Ft.map(e,{name:r}):cf(e)?Ft.set(e,{name:r}):typeof e=="function"&&!pf(e)&&!nu(e)?i8(e)?Al(e):tu(r,e):e}function eP(e,t,r){if(e==null||zr(e)||vn(e)||Yr(e)||hn(e))return e;if(Array.isArray(e))return Ft.array(e,{name:r,deep:!1});if(Ba(e))return Ft.object(e,void 0,{name:r,deep:!1});if(mu(e))return Ft.map(e,{name:r,deep:!1});if(cf(e))return Ft.set(e,{name:r,deep:!1})}function dp(e){return e}function tP(e,t){return Xy(e,t)?t:e}var u8="override",rP=Ni({annotationType_:u8,make_:iP,extend_:aP,decorate_20223_:oP});function nP(e){return e.annotationType_===u8}function iP(e,t){return 0}function aP(e,t,r,n){ot("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function oP(e,t){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function hf(e,t){return{annotationType_:e,options_:t,make_:lP,extend_:sP,decorate_20223_:uP}}function lP(e,t,r,n){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,r,!1)===null?0:1;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if(pf(r.value))return 1;var a=c8(e,this,t,r,!1);return la(n,t,a),2}function sP(e,t,r,n){var i=c8(e,this,t,r);return e.defineProperty_(t,i,n)}function uP(e,t){var r=t.kind,n=t.name,i=t.addInitializer,a=this,o=function(f){var v,w,_,h;return No((v=(w=a.options_)==null?void 0:w.name)!=null?v:n.toString(),f,(_=(h=a.options_)==null?void 0:h.autoAction)!=null?_:!1)};if(r=="field"){i(function(){yu(this,n,a)});return}if(r=="method"){var l;return pf(e)||(e=o(e)),(l=this.options_)!=null&&l.bound&&i(function(){var u=this,f=u[n].bind(u);f.isMobxAction=!0,u[n]=f}),e}ot("Cannot apply '"+a.annotationType_+"' to '"+String(n)+"' (kind: "+r+"):"+(`
|
|
34
|
-
'`+a.annotationType_+"' can only be used on properties with a function value."))}function cP(e,t,r,n){t.annotationType_,n.value}function c8(e,t,r,n,i){var a,o,l,u,f,v,w;i===void 0&&(i=Me.safeDescriptors),cP(e,t,r,n);var _=n.value;if((a=t.options_)!=null&&a.bound){var h;_=_.bind((h=e.proxy_)!=null?h:e.target_)}return{value:No((o=(l=t.options_)==null?void 0:l.name)!=null?o:r.toString(),_,(u=(f=t.options_)==null?void 0:f.autoAction)!=null?u:!1,(v=t.options_)!=null&&v.bound?(w=e.proxy_)!=null?w:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:!i}}function f8(e,t){return{annotationType_:e,options_:t,make_:fP,extend_:dP,decorate_20223_:hP}}function fP(e,t,r,n){var i;if(n===e.target_)return this.extend_(e,t,r,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!La(e.target_,t)||!nu(e.target_[t]))&&this.extend_(e,t,r,!1)===null)return 0;if(nu(r.value))return 1;var a=d8(e,this,t,r,!1,!1);return la(n,t,a),2}function dP(e,t,r,n){var i,a=d8(e,this,t,r,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,a,n)}function hP(e,t){var r,n=t.name,i=t.addInitializer;return nu(e)||(e=Al(e)),(r=this.options_)!=null&&r.bound&&i(function(){var a=this,o=a[n].bind(a);o.isMobXFlow=!0,a[n]=o}),e}function pP(e,t,r,n){t.annotationType_,n.value}function d8(e,t,r,n,i,a){a===void 0&&(a=Me.safeDescriptors),pP(e,t,r,n);var o=n.value;if(nu(o)||(o=Al(o)),i){var l;o=o.bind((l=e.proxy_)!=null?l:e.target_),o.isMobXFlow=!0}return{value:o,configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function Iy(e,t){return{annotationType_:e,options_:t,make_:gP,extend_:vP,decorate_20223_:mP}}function gP(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function vP(e,t,r,n){return yP(e,this,t,r),e.defineComputedProperty_(t,Mo({},this.options_,{get:r.get,set:r.set}),n)}function mP(e,t){var r=this,n=t.name,i=t.addInitializer;return i(function(){var a=Il(this)[Xe],o=Mo({},r.options_,{get:e,context:this});o.name||(o.name="ObservableObject."+n.toString()),a.values_.set(n,new Js(o))}),function(){return this[Xe].getObservablePropValue_(n)}}function yP(e,t,r,n){t.annotationType_,n.get}function hp(e,t){return{annotationType_:e,options_:t,make_:bP,extend_:_P,decorate_20223_:wP}}function bP(e,t,r){return this.extend_(e,t,r,!1)===null?0:1}function _P(e,t,r,n){var i,a;return SP(e,this),e.defineObservableProperty_(t,r.value,(i=(a=this.options_)==null?void 0:a.enhancer)!=null?i:Cl,n)}function wP(e,t){var r=this,n=t.kind,i=t.name,a=new WeakSet;function o(l,u){var f,v,w=Il(l)[Xe],_=new Ao(u,(f=(v=r.options_)==null?void 0:v.enhancer)!=null?f:Cl,"ObservableObject."+i.toString(),!1);w.values_.set(i,_),a.add(l)}if(n=="accessor")return{get:function(){return a.has(this)||o(this,e.get.call(this)),this[Xe].getObservablePropValue_(i)},set:function(u){return a.has(this)||o(this,u),this[Xe].setObservablePropValue_(i,u)},init:function(u){return a.has(this)||o(this,u),u}}}function SP(e,t,r,n){t.annotationType_}var EP="true",OP=h8();function h8(e){return{annotationType_:EP,options_:e,make_:xP,extend_:PP,decorate_20223_:CP}}function xP(e,t,r,n){var i,a;if(r.get)return Ml.make_(e,t,r,n);if(r.set){var o=No(t.toString(),r.set);return n===e.target_?e.defineProperty_(t,{configurable:Me.safeDescriptors?e.isPlainObject_:!0,set:o})===null?0:2:(la(n,t,{configurable:!0,set:o}),2)}if(n!==e.target_&&typeof r.value=="function"){var l;if(i8(r.value)){var u,f=(u=this.options_)!=null&&u.autoBind?Al.bound:Al;return f.make_(e,t,r,n)}var v=(l=this.options_)!=null&&l.autoBind?tu.bound:tu;return v.make_(e,t,r,n)}var w=((i=this.options_)==null?void 0:i.deep)===!1?Ft.ref:Ft;if(typeof r.value=="function"&&(a=this.options_)!=null&&a.autoBind){var _;r.value=r.value.bind((_=e.proxy_)!=null?_:e.target_)}return w.make_(e,t,r,n)}function PP(e,t,r,n){var i,a;if(r.get)return Ml.extend_(e,t,r,n);if(r.set)return e.defineProperty_(t,{configurable:Me.safeDescriptors?e.isPlainObject_:!0,set:No(t.toString(),r.set)},n);if(typeof r.value=="function"&&(i=this.options_)!=null&&i.autoBind){var o;r.value=r.value.bind((o=e.proxy_)!=null?o:e.target_)}var l=((a=this.options_)==null?void 0:a.deep)===!1?Ft.ref:Ft;return l.extend_(e,t,r,n)}function CP(e,t){ot("'"+this.annotationType_+"' cannot be used as a decorator")}var TP="observable",AP="observable.ref",kP="observable.shallow",RP="observable.struct",p8={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(p8);function Md(e){return e||p8}var pm=hp(TP),LP=hp(AP,{enhancer:dp}),MP=hp(kP,{enhancer:eP}),NP=hp(RP,{enhancer:tP}),g8=Ni(pm);function Nd(e){return e.deep===!0?Cl:e.deep===!1?dp:DP(e.defaultDecorator)}function IP(e){var t;return e?(t=e.defaultDecorator)!=null?t:h8(e):void 0}function DP(e){var t,r;return e&&(t=(r=e.options_)==null?void 0:r.enhancer)!=null?t:Cl}function v8(e,t,r){if(ff(t))return pm.decorate_20223_(e,t);if(xl(t)){yu(e,t,pm);return}return bp(e)?e:Ba(e)?Ft.object(e,t,r):Array.isArray(e)?Ft.array(e,t):mu(e)?Ft.map(e,t):cf(e)?Ft.set(e,t):typeof e=="object"&&e!==null?e:Ft.box(e,t)}t8(v8,g8);var FP={box:function(t,r){var n=Md(r);return new Ao(t,Nd(n),n.name,!0,n.equals)},array:function(t,r){var n=Md(r);return(Me.useProxies===!1||n.proxy===!1?GC:MC)(t,Nd(n),n.name)},map:function(t,r){var n=Md(r);return new wp(t,Nd(n),n.name)},set:function(t,r){var n=Md(r);return new Yy(t,Nd(n),n.name)},object:function(t,r,n){return Uo(function(){return Uy(Me.useProxies===!1||(n==null?void 0:n.proxy)===!1?Il({},n):AC({},n),t,r)})},ref:Ni(LP),shallow:Ni(MP),deep:g8,struct:Ni(NP)},Ft=t8(v8,FP),m8="computed",jP="computed.struct",gm=Iy(m8),zP=Iy(jP,{equals:Pl.structural}),Ml=function(t,r){if(ff(r))return gm.decorate_20223_(t,r);if(xl(r))return yu(t,r,gm);if(Ba(t))return Ni(Iy(m8,t));var n=Ba(r)?r:{};return n.get=t,n.name||(n.name=t.name||""),new Js(n)};Object.assign(Ml,gm);Ml.struct=Ni(zP);var x5,P5,Lh=0,BP=1,UP=(x5=(P5=Rh(function(){},"name"))==null?void 0:P5.configurable)!=null?x5:!1,C5={value:"action",configurable:!0,writable:!1,enumerable:!1};function No(e,t,r,n){r===void 0&&(r=!1);function i(){return y8(e,r,t,n||this,arguments)}return i.isMobxAction=!0,i.toString=function(){return t.toString()},UP&&(C5.value=e,la(i,"name",C5)),i}function y8(e,t,r,n,i){var a=b8(e,t);try{return r.apply(n,i)}catch(o){throw a.error_=o,o}finally{_8(a)}}function b8(e,t,r,n){var i=!1,a=0,o=Me.trackingDerivation,l=!t||!o;xn();var u=Me.allowStateChanges;l&&(Nl(),u=pp(!0));var f=vp(!0),v={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:f,notifySpy_:i,startTime_:a,actionId_:BP++,parentActionId_:Lh};return Lh=v.actionId_,v}function _8(e){Lh!==e.actionId_&&ot(30),Lh=e.parentActionId_,e.error_!==void 0&&(Me.suppressReactionErrors=!0),gp(e.prevAllowStateChanges_),$s(e.prevAllowStateReads_),Pn(),e.runAsAction_&&Ma(e.prevDerivation_),Me.suppressReactionErrors=!1}function Dy(e,t){var r=pp(e);try{return t()}finally{gp(r)}}function pp(e){var t=Me.allowStateChanges;return Me.allowStateChanges=e,t}function gp(e){Me.allowStateChanges=e}var w8;w8=Symbol.toPrimitive;var Ao=function(e){s8(t,e);function t(n,i,a,o,l){var u;return a===void 0&&(a="ObservableValue"),l===void 0&&(l=Pl.default),u=e.call(this,a)||this,u.enhancer=void 0,u.name_=void 0,u.equals=void 0,u.hasUnreportedChange_=!1,u.interceptors_=void 0,u.changeListeners_=void 0,u.value_=void 0,u.dehancer=void 0,u.enhancer=i,u.name_=a,u.equals=l,u.value_=i(n,void 0,a),u}var r=t.prototype;return r.dehanceValue=function(i){return this.dehancer!==void 0?this.dehancer(i):i},r.set=function(i){this.value_,i=this.prepareNewValue_(i),i!==Me.UNCHANGED&&this.setNewValue_(i)},r.prepareNewValue_=function(i){if(ui(this)){var a=ci(this,{object:this,type:sa,newValue:i});if(!a)return Me.UNCHANGED;i=a.newValue}return i=this.enhancer(i,this.value_,this.name_),this.equals(this.value_,i)?Me.UNCHANGED:i},r.setNewValue_=function(i){var a=this.value_;this.value_=i,this.reportChanged(),Ii(this)&&Di(this,{type:sa,object:this,newValue:i,oldValue:a})},r.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},r.intercept_=function(i){return gf(this,i)},r.observe_=function(i,a){return a&&i({observableKind:"value",debugObjectName:this.name_,object:this,type:sa,newValue:this.value_,oldValue:void 0}),vf(this,i)},r.raw=function(){return this.value_},r.toJSON=function(){return this.get()},r.toString=function(){return this.name_+"["+this.value_+"]"},r.valueOf=function(){return l8(this.get())},r[w8]=function(){return this.valueOf()},t}(df),Fy=Bo("ObservableValue",Ao),S8;S8=Symbol.toPrimitive;var Js=function(){function e(r){this.dependenciesState_=Tt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Tt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Nh(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Mh.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,r.get||ot(31),this.derivation=r.get,this.name_=r.name||"ComputedValue",r.set&&(this.setter_=No("ComputedValue-setter",r.set)),this.equals_=r.equals||(r.compareStructural||r.struct?Pl.structural:Pl.default),this.scope_=r.context,this.requiresReaction_=r.requiresReaction,this.keepAlive_=!!r.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){ZP(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.get=function(){if(this.isComputing_&&ot(32,this.name_,this.derivation),Me.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)vm(this)&&(this.warnAboutUntrackedRead_(),xn(),this.value_=this.computeValue_(!1),Pn());else if(A8(this),vm(this)){var n=Me.trackingContext;this.keepAlive_&&!n&&(Me.trackingContext=this),this.trackAndCompute()&&XP(this),Me.trackingContext=n}var i=this.value_;if(rh(i))throw i.cause;return i},t.set=function(n){if(this.setter_){this.isRunningSetter_&&ot(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter_=!1}}else ot(34,this.name_)},t.trackAndCompute=function(){var n=this.value_,i=this.dependenciesState_===Tt.NOT_TRACKING_,a=this.computeValue_(!0),o=i||rh(n)||rh(a)||!this.equals_(n,a);return o&&(this.value_=a),o},t.computeValue_=function(n){this.isComputing_=!0;var i=pp(!1),a;if(n)a=E8(this,this.derivation,this.scope_);else if(Me.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new Nh(o)}return gp(i),this.isComputing_=!1,a},t.suspend_=function(){this.keepAlive_||(mm(this),this.value_=void 0)},t.observe_=function(n,i){var a=this,o=!0,l=void 0;return zy(function(){var u=a.get();if(!o||i){var f=Nl();n({observableKind:"computed",debugObjectName:a.name_,type:sa,object:a,newValue:u,oldValue:l}),Ma(f)}o=!1,l=u})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return l8(this.get())},t[S8]=function(){return this.valueOf()},e}(),Tl=Bo("ComputedValue",Js),Tt;(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_"})(Tt||(Tt={}));var Mh;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(Mh||(Mh={}));var Nh=function(t){this.cause=void 0,this.cause=t};function rh(e){return e instanceof Nh}function vm(e){switch(e.dependenciesState_){case Tt.UP_TO_DATE_:return!1;case Tt.NOT_TRACKING_:case Tt.STALE_:return!0;case Tt.POSSIBLY_STALE_:{for(var t=vp(!0),r=Nl(),n=e.observing_,i=n.length,a=0;a<i;a++){var o=n[a];if(Tl(o)){if(Me.disableErrorBoundaries)o.get();else try{o.get()}catch{return Ma(r),$s(t),!0}if(e.dependenciesState_===Tt.STALE_)return Ma(r),$s(t),!0}}return O8(e),Ma(r),$s(t),!1}}}function HP(){return Me.trackingDerivation!==null}function E8(e,t,r){var n=vp(!0);O8(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Me.runId;var i=Me.trackingDerivation;Me.trackingDerivation=e,Me.inBatch++;var a;if(Me.disableErrorBoundaries===!0)a=t.call(r);else try{a=t.call(r)}catch(o){a=new Nh(o)}return Me.inBatch--,Me.trackingDerivation=i,GP(e),$s(n),a}function GP(e){for(var t=e.observing_,r=e.observing_=e.newObserving_,n=Tt.UP_TO_DATE_,i=0,a=e.unboundDepsCount_,o=0;o<a;o++){var l=r[o];l.diffValue_===0&&(l.diffValue_=1,i!==o&&(r[i]=l),i++),l.dependenciesState_>n&&(n=l.dependenciesState_)}for(r.length=i,e.newObserving_=null,a=t.length;a--;){var u=t[a];u.diffValue_===0&&C8(u,e),u.diffValue_=0}for(;i--;){var f=r[i];f.diffValue_===1&&(f.diffValue_=0,KP(f,e))}n!==Tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function mm(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)C8(t[r],e);e.dependenciesState_=Tt.NOT_TRACKING_}function jy(e){var t=Nl();try{return e()}finally{Ma(t)}}function Nl(){var e=Me.trackingDerivation;return Me.trackingDerivation=null,e}function Ma(e){Me.trackingDerivation=e}function vp(e){var t=Me.allowStateReads;return Me.allowStateReads=e,t}function $s(e){Me.allowStateReads=e}function O8(e){if(e.dependenciesState_!==Tt.UP_TO_DATE_){e.dependenciesState_=Tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=Tt.UP_TO_DATE_}}var $P=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],Oc=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},nh=!0,x8=!1,Me=function(){var e=Ry();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(nh=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new Oc().version&&(nh=!1),nh?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Oc):(setTimeout(function(){x8||ot(35)},1),new Oc)}();function VP(){if((Me.pendingReactions.length||Me.inBatch||Me.isRunningReactions)&&ot(36),x8=!0,nh){var e=Ry();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),Me=new Oc}}function P8(){return Me}function qP(){var e=new Oc;for(var t in e)$P.indexOf(t)===-1&&(Me[t]=e[t]);Me.allowStateChanges=!Me.enforceActions}function WP(e){return e.observers_&&e.observers_.size>0}function YP(e){return e.observers_}function KP(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function C8(e,t){e.observers_.delete(t),e.observers_.size===0&&T8(e)}function T8(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,Me.pendingUnobservations.push(e))}function xn(){Me.inBatch++}function Pn(){if(--Me.inBatch===0){R8();for(var e=Me.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation_=!1,r.observers_.size===0&&(r.isBeingObserved_&&(r.isBeingObserved_=!1,r.onBUO()),r instanceof Js&&r.suspend_())}Me.pendingUnobservations=[]}}function A8(e){var t=Me.trackingDerivation;return t!==null?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved_&&Me.trackingContext&&(e.isBeingObserved_=!0,e.onBO())),e.isBeingObserved_):(e.observers_.size===0&&Me.inBatch>0&&T8(e),!1)}function k8(e){e.lowestObserverState_!==Tt.STALE_&&(e.lowestObserverState_=Tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Tt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=Tt.STALE_}))}function XP(e){e.lowestObserverState_!==Tt.STALE_&&(e.lowestObserverState_=Tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Tt.POSSIBLY_STALE_?t.dependenciesState_=Tt.STALE_:t.dependenciesState_===Tt.UP_TO_DATE_&&(e.lowestObserverState_=Tt.UP_TO_DATE_)}))}function ZP(e){e.lowestObserverState_===Tt.UP_TO_DATE_&&(e.lowestObserverState_=Tt.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Tt.UP_TO_DATE_&&(t.dependenciesState_=Tt.POSSIBLY_STALE_,t.onBecomeStale_())}))}var eu=function(){function e(r,n,i,a){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Tt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Mh.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=i,this.requiresObservable_=a}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,Me.pendingReactions.push(this),R8())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){xn(),this.isScheduled_=!1;var n=Me.trackingContext;if(Me.trackingContext=this,vm(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(i){this.reportExceptionInDerivation_(i)}}Me.trackingContext=n,Pn()}},t.track=function(n){if(!this.isDisposed_){xn(),this.isRunning_=!0;var i=Me.trackingContext;Me.trackingContext=this;var a=E8(this,n,void 0);Me.trackingContext=i,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&mm(this),rh(a)&&this.reportExceptionInDerivation_(a.cause),Pn()}},t.reportExceptionInDerivation_=function(n){var i=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(Me.disableErrorBoundaries)throw n;var a="[mobx] uncaught error in '"+this+"'";Me.suppressReactionErrors||console.error(a,n),Me.globalReactionErrorHandlers.forEach(function(o){return o(n,i)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(xn(),mm(this),Pn()))},t.getDisposer_=function(n){var i=this,a=function o(){i.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",a),a[Xe]=this,a},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}();function QP(e){return Me.globalReactionErrorHandlers.push(e),function(){var t=Me.globalReactionErrorHandlers.indexOf(e);t>=0&&Me.globalReactionErrorHandlers.splice(t,1)}}var JP=100,ym=function(t){return t()};function R8(){Me.inBatch>0||Me.isRunningReactions||ym(eC)}function eC(){Me.isRunningReactions=!0;for(var e=Me.pendingReactions,t=0;e.length>0;){++t===JP&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction_()}Me.isRunningReactions=!1}var Ih=Bo("Reaction",eu);function tC(e){var t=ym;ym=function(n){return e(function(){return t(n)})}}function xc(){return!1}function L8(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var M8="action",rC="action.bound",N8="autoAction",nC="autoAction.bound",I8="<unnamed action>",bm=hf(M8),iC=hf(rC,{bound:!0}),_m=hf(N8,{autoAction:!0}),aC=hf(nC,{autoAction:!0,bound:!0});function D8(e){var t=function(n,i){if(Vn(n))return No(n.name||I8,n,e);if(Vn(i))return No(n,i,e);if(ff(i))return(e?_m:bm).decorate_20223_(n,i);if(xl(i))return yu(n,i,e?_m:bm);if(xl(n))return Ni(hf(e?N8:M8,{name:n,autoAction:e}))};return t}var wr=D8(!1);Object.assign(wr,bm);var tu=D8(!0);Object.assign(tu,_m);wr.bound=Ni(iC);tu.bound=Ni(aC);function ru(e){return y8(e.name||I8,!1,e,this,void 0)}function pf(e){return Vn(e)&&e.isMobxAction===!0}function zy(e,t){var r,n,i,a,o;t===void 0&&(t=Ly);var l=(r=(n=t)==null?void 0:n.name)!=null?r:"Autorun",u=!t.scheduler&&!t.delay,f;if(u)f=new eu(l,function(){this.track(_)},t.onError,t.requiresObservable);else{var v=F8(t),w=!1;f=new eu(l,function(){w||(w=!0,v(function(){w=!1,f.isDisposed_||f.track(_)}))},t.onError,t.requiresObservable)}function _(){e(f)}return(i=t)!=null&&(a=i.signal)!=null&&a.aborted||f.schedule_(),f.getDisposer_((o=t)==null?void 0:o.signal)}var oC=function(t){return t()};function F8(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:oC}function j8(e,t,r){var n,i,a,o;r===void 0&&(r=Ly);var l=(n=r.name)!=null?n:"Reaction",u=wr(l,r.onError?lC(r.onError,t):t),f=!r.scheduler&&!r.delay,v=F8(r),w=!0,_=!1,h,E=r.compareStructural?Pl.structural:r.equals||Pl.default,m=new eu(l,function(){w||f?y():_||(_=!0,v(y))},r.onError,r.requiresObservable);function y(){if(_=!1,!m.isDisposed_){var p=!1,g=h;m.track(function(){var d=Dy(!1,function(){return e(m)});p=w||!E(h,d),h=d}),(w&&r.fireImmediately||!w&&p)&&u(h,g,m),w=!1}}return(i=r)!=null&&(a=i.signal)!=null&&a.aborted||m.schedule_(),m.getDisposer_((o=r)==null?void 0:o.signal)}function lC(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}var sC="onBO",uC="onBUO";function z8(e,t,r){return B8(sC,e,t,r)}function By(e,t,r){return B8(uC,e,t,r)}function B8(e,t,r,n){var i=typeof n=="function"?ca(t,r):ca(t),a=Vn(n)?n:r,o=e+"L";return i[o]?i[o].add(a):i[o]=new Set([a]),function(){var l=i[o];l&&(l.delete(a),l.size===0&&delete i[o])}}var cC="never",Id="always",fC="observed";function U8(e){e.isolateGlobalState===!0&&VP();var t=e.useProxies,r=e.enforceActions;if(t!==void 0&&(Me.useProxies=t===Id?!0:t===cC?!1:typeof Proxy<"u"),t==="ifavailable"&&(Me.verifyProxies=!0),r!==void 0){var n=r===Id?Id:r===fC;Me.enforceActions=n,Me.allowStateChanges=!(n===!0||n===Id)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(i){i in e&&(Me[i]=!!e[i])}),Me.allowStateReads=!Me.observableRequiresReaction,e.reactionScheduler&&tC(e.reactionScheduler)}function Uy(e,t,r,n){var i=$x(t);return Uo(function(){var a=Il(e,n)[Xe];Qs(i).forEach(function(o){a.extend_(o,i[o],r&&o in r?r[o]:!0)})}),e}function H8(e,t){return G8(ca(e,t))}function G8(e){var t={name:e.name_};return e.observing_&&e.observing_.length>0&&(t.dependencies=hC(e.observing_).map(G8)),t}function dC(e,t){return $8(ca(e,t))}function $8(e){var t={name:e.name_};return WP(e)&&(t.observers=Array.from(YP(e)).map($8)),t}function hC(e){return Array.from(new Set(e))}var pC=0;function mp(){this.message="FLOW_CANCELLED"}mp.prototype=Object.create(Error.prototype);function gC(e){return e instanceof mp}var tg=f8("flow"),vC=f8("flow.bound",{bound:!0}),Al=Object.assign(function(t,r){if(ff(r))return tg.decorate_20223_(t,r);if(xl(r))return yu(t,r,tg);var n=t,i=n.name||"<unnamed flow>",a=function(){var l=this,u=arguments,f=++pC,v=wr(i+" - runid: "+f+" - init",n).apply(l,u),w,_=void 0,h=new Promise(function(E,m){var y=0;w=m;function p(b){_=void 0;var O;try{O=wr(i+" - runid: "+f+" - yield "+y++,v.next).call(v,b)}catch(k){return m(k)}d(O)}function g(b){_=void 0;var O;try{O=wr(i+" - runid: "+f+" - yield "+y++,v.throw).call(v,b)}catch(k){return m(k)}d(O)}function d(b){if(Vn(b==null?void 0:b.then)){b.then(d,m);return}return b.done?E(b.value):(_=Promise.resolve(b.value),_.then(p,g))}p(void 0)});return h.cancel=wr(i+" - runid: "+f+" - cancel",function(){try{_&&T5(_);var E=v.return(void 0),m=Promise.resolve(E.value);m.then(Is,Is),T5(m),w(new mp)}catch(y){w(y)}}),h};return a.isMobXFlow=!0,a},tg);Al.bound=Ni(vC);function T5(e){Vn(e.cancel)&&e.cancel()}function mC(e){return e}function nu(e){return(e==null?void 0:e.isMobXFlow)===!0}function Hy(e,t,r){var n;return Yr(e)||vn(e)||Fy(e)?n=zi(e):zr(e)&&(n=zi(e,t)),n.dehancer=typeof t=="function"?t:r,function(){n.dehancer=void 0}}function yp(e,t,r){return Vn(r)?bC(e,t,r):yC(e,t)}function yC(e,t){return zi(e).intercept_(t)}function bC(e,t,r){return zi(e,t).intercept_(r)}function V8(e,t){if(t===void 0)return Tl(e);if(zr(e)===!1||!e[Xe].values_.has(t))return!1;var r=ca(e,t);return Tl(r)}function _C(e){return V8(e)}function q8(e,t){return V8(e,t)}function W8(e,t){return e?t!==void 0?zr(e)?e[Xe].values_.has(t):!1:zr(e)||!!e[Xe]||Ny(e)||Ih(e)||Tl(e):!1}function bp(e){return W8(e)}function Y8(e,t){return W8(e,t)}function qc(e){if(zr(e))return e[Xe].keys_();if(Yr(e)||hn(e))return Array.from(e.keys());if(vn(e))return e.map(function(t,r){return r});ot(5)}function Gy(e){if(zr(e))return qc(e).map(function(t){return e[t]});if(Yr(e))return qc(e).map(function(t){return e.get(t)});if(hn(e))return Array.from(e.values());if(vn(e))return e.slice();ot(6)}function K8(e){if(zr(e))return qc(e).map(function(t){return[t,e[t]]});if(Yr(e))return qc(e).map(function(t){return[t,e.get(t)]});if(hn(e))return Array.from(e.entries());if(vn(e))return e.map(function(t,r){return[r,t]});ot(7)}function $y(e,t,r){if(arguments.length===2&&!hn(e)){xn();var n=t;try{for(var i in n)$y(e,i,n[i])}finally{Pn()}return}zr(e)?e[Xe].set_(t,r):Yr(e)?e.set(t,r):hn(e)?e.add(t):vn(e)?(typeof t!="number"&&(t=parseInt(t,10)),t<0&&ot("Invalid index: '"+t+"'"),xn(),t>=e.length&&(e.length=t+1),e[t]=r,Pn()):ot(8)}function wC(e,t){zr(e)?e[Xe].delete_(t):Yr(e)||hn(e)?e.delete(t):vn(e)?(typeof t!="number"&&(t=parseInt(t,10)),e.splice(t,1)):ot(9)}function X8(e,t){if(zr(e))return e[Xe].has_(t);if(Yr(e))return e.has(t);if(hn(e))return e.has(t);if(vn(e))return t>=0&&t<e.length;ot(10)}function SC(e,t){if(X8(e,t)){if(zr(e))return e[Xe].get_(t);if(Yr(e))return e.get(t);if(vn(e))return e[t];ot(11)}}function Vy(e,t,r){if(zr(e))return e[Xe].defineProperty_(t,r);ot(39)}function Z8(e){if(zr(e))return e[Xe].ownKeys_();ot(38)}function _p(e,t,r,n){return Vn(r)?OC(e,t,r,n):EC(e,t,r)}function EC(e,t,r){return zi(e).observe_(t,r)}function OC(e,t,r,n){return zi(e,t).observe_(r,n)}function Dd(e,t,r){return e.set(t,r),r}function Ss(e,t){if(e==null||typeof e!="object"||e instanceof Date||!bp(e))return e;if(Fy(e)||Tl(e))return Ss(e.get(),t);if(t.has(e))return t.get(e);if(vn(e)){var r=Dd(t,e,new Array(e.length));return e.forEach(function(o,l){r[l]=Ss(o,t)}),r}if(hn(e)){var n=Dd(t,e,new Set);return e.forEach(function(o){n.add(Ss(o,t))}),n}if(Yr(e)){var i=Dd(t,e,new Map);return e.forEach(function(o,l){i.set(l,Ss(o,t))}),i}else{var a=Dd(t,e,{});return Z8(e).forEach(function(o){sf.propertyIsEnumerable.call(e,o)&&(a[o]=Ss(e[o],t))}),a}}function xC(e,t){return Ss(e,new Map)}function PC(){}function ra(e,t){t===void 0&&(t=void 0),xn();try{return e.apply(t)}finally{Pn()}}function wm(e,t,r){return arguments.length===1||t&&typeof t=="object"?CC(e,t):Q8(e,t,r||{})}function Q8(e,t,r){var n;if(typeof r.timeout=="number"){var i=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!o[Xe].isDisposed_)if(o(),r.onError)r.onError(i);else throw i},r.timeout)}r.name="When";var a=No("When-effect",t),o=zy(function(l){var u=Dy(!1,e);u&&(l.dispose(),n&&clearTimeout(n),a())},r);return o}function CC(e,t){var r;if(t!=null&&(r=t.signal)!=null&&r.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,i,a=new Promise(function(o,l){var u,f=Q8(e,o,Mo({},t,{onError:l}));n=function(){f(),l(new Error("WHEN_CANCELLED"))},i=function(){f(),l(new Error("WHEN_ABORTED"))},t==null||(u=t.signal)==null||u.addEventListener==null||u.addEventListener("abort",i)}).finally(function(){var o;return t==null||(o=t.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",i)});return a.cancel=n,a}function ys(e){return e[Xe]}var TC={has:function(t,r){return ys(t).has_(r)},get:function(t,r){return ys(t).get_(r)},set:function(t,r,n){var i;return xl(r)?(i=ys(t).set_(r,n,!0))!=null?i:!0:!1},deleteProperty:function(t,r){var n;return xl(r)?(n=ys(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var i;return(i=ys(t).defineProperty_(r,n))!=null?i:!0},ownKeys:function(t){return ys(t).ownKeys_()},preventExtensions:function(t){ot(13)}};function AC(e,t){var r,n;return r8(),e=Il(e,t),(n=(r=e[Xe]).proxy_)!=null?n:r.proxy_=new Proxy(e,TC)}function ui(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function gf(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),n8(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function ci(e,t){var r=Nl();try{for(var n=[].concat(e.interceptors_||[]),i=0,a=n.length;i<a&&(t=n[i](t),t&&!t.type&&ot(14),!!t);i++);return t}finally{Ma(r)}}function Ii(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function vf(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),n8(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Di(e,t){var r=Nl(),n=e.changeListeners_;if(n){n=n.slice();for(var i=0,a=n.length;i<a;i++)n[i](t);Ma(r)}}function qy(e,t,r){return Uo(function(){var n,i=Il(e,r)[Xe];(n=t)!=null||(t=Kx(e)),Qs(t).forEach(function(a){return i.make_(a,t[a])})}),e}var rg=Symbol("mobx-keys");function kC(e,t,r){return Ba(e)?Uy(e,e,t,r):(Uo(function(){var n=Il(e,r)[Xe];if(!e[rg]){var i=Object.getPrototypeOf(e),a=new Set([].concat(Qs(e),Qs(i)));a.delete("constructor"),a.delete(Xe),uf(i,rg,a)}e[rg].forEach(function(o){return n.make_(o,t&&o in t?t[o]:!0)})}),e)}var A5="splice",sa="update",RC=1e4,LC={get:function(t,r){var n=t[Xe];return r===Xe?n:r==="length"?n.getArrayLength_():typeof r=="string"&&!isNaN(r)?n.get_(parseInt(r)):La(Dh,r)?Dh[r]:t[r]},set:function(t,r,n){var i=t[Xe];return r==="length"&&i.setArrayLength_(n),typeof r=="symbol"||isNaN(r)?t[r]=n:i.set_(parseInt(r),n),!0},preventExtensions:function(){ot(15)}},Wy=function(){function e(r,n,i,a){r===void 0&&(r="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_=i,this.legacyMode_=a,this.atom_=new df(r),this.enhancer_=function(o,l){return n(o,l,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},t.intercept_=function(n){return gf(this,n)},t.observe_=function(n,i){return i===void 0&&(i=!1),i&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),vf(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&ot("Out of range: "+n);var i=this.values_.length;if(n!==i)if(n>i){for(var a=new Array(n-i),o=0;o<n-i;o++)a[o]=void 0;this.spliceWithArray_(i,0,a)}else this.spliceWithArray_(n,i-n)},t.updateArrayLength_=function(n,i){n!==this.lastKnownLength_&&ot(16),this.lastKnownLength_+=i,this.legacyMode_&&i>0&&l9(n+i+1)},t.spliceWithArray_=function(n,i,a){var o=this;this.atom_;var l=this.values_.length;if(n===void 0?n=0:n>l?n=l:n<0&&(n=Math.max(0,l+n)),arguments.length===1?i=l-n:i==null?i=0:i=Math.max(0,Math.min(i,l-n)),a===void 0&&(a=dm),ui(this)){var u=ci(this,{object:this.proxy_,type:A5,index:n,removedCount:i,added:a});if(!u)return dm;i=u.removedCount,a=u.added}if(a=a.length===0?a:a.map(function(w){return o.enhancer_(w,void 0)}),this.legacyMode_){var f=a.length-i;this.updateArrayLength_(l,f)}var v=this.spliceItemsIntoValues_(n,i,a);return(i!==0||a.length!==0)&&this.notifyArraySplice_(n,a,v),this.dehanceValues_(v)},t.spliceItemsIntoValues_=function(n,i,a){if(a.length<RC){var o;return(o=this.values_).splice.apply(o,[n,i].concat(a))}else{var l=this.values_.slice(n,n+i),u=this.values_.slice(n+i);this.values_.length+=a.length-i;for(var f=0;f<a.length;f++)this.values_[n+f]=a[f];for(var v=0;v<u.length;v++)this.values_[n+a.length+v]=u[v];return l}},t.notifyArrayChildUpdate_=function(n,i,a){var o=!this.owned_&&xc(),l=Ii(this),u=l||o?{observableKind:"array",object:this.proxy_,type:sa,debugObjectName:this.atom_.name_,index:n,newValue:i,oldValue:a}:null;this.atom_.reportChanged(),l&&Di(this,u)},t.notifyArraySplice_=function(n,i,a){var o=!this.owned_&&xc(),l=Ii(this),u=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:A5,index:n,removed:a,added:i,removedCount:a.length,addedCount:i.length}:null;this.atom_.reportChanged(),l&&Di(this,u)},t.get_=function(n){if(this.legacyMode_&&n>=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,i){var a=this.values_;if(this.legacyMode_&&n>a.length&&ot(17,n,a.length),n<a.length){this.atom_;var o=a[n];if(ui(this)){var l=ci(this,{type:sa,object:this.proxy_,index:n,newValue:i});if(!l)return;i=l.newValue}i=this.enhancer_(i,o);var u=i!==o;u&&(a[n]=i,this.notifyArrayChildUpdate_(n,i,o))}else{for(var f=new Array(n+1-a.length),v=0;v<f.length-1;v++)f[v]=void 0;f[f.length-1]=i,this.spliceWithArray_(a.length,0,f)}},e}();function MC(e,t,r,n){return r===void 0&&(r="ObservableArray"),n===void 0&&(n=!1),r8(),Uo(function(){var i=new Wy(r,t,n,!1);a8(i.values_,Xe,i);var a=new Proxy(i.values_,LC);return i.proxy_=a,e&&e.length&&i.spliceWithArray_(0,0,e),a})}var Dh={clear:function(){return this.splice(0)},replace:function(t){var r=this[Xe];return r.spliceWithArray_(0,r.values_.length,t)},toJSON:function(){return this.slice()},splice:function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];var o=this[Xe];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(t);case 2:return o.spliceWithArray_(t,r)}return o.spliceWithArray_(t,r,i)},spliceWithArray:function(t,r,n){return this[Xe].spliceWithArray_(t,r,n)},push:function(){for(var t=this[Xe],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(t.values_.length,0,n),t.values_.length},pop:function(){return this.splice(Math.max(this[Xe].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[Xe],r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return t.spliceWithArray_(0,0,n),t.values_.length},reverse:function(){return Me.trackingDerivation&&ot(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Me.trackingDerivation&&ot(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var r=this[Xe],n=r.dehanceValues_(r.values_).indexOf(t);return n>-1?(this.splice(n,1),!0):!1}};Ht("at",Yn);Ht("concat",Yn);Ht("flat",Yn);Ht("includes",Yn);Ht("indexOf",Yn);Ht("join",Yn);Ht("lastIndexOf",Yn);Ht("slice",Yn);Ht("toString",Yn);Ht("toLocaleString",Yn);Ht("toSorted",Yn);Ht("toSpliced",Yn);Ht("with",Yn);Ht("every",Bi);Ht("filter",Bi);Ht("find",Bi);Ht("findIndex",Bi);Ht("findLast",Bi);Ht("findLastIndex",Bi);Ht("flatMap",Bi);Ht("forEach",Bi);Ht("map",Bi);Ht("some",Bi);Ht("toReversed",Bi);Ht("reduce",J8);Ht("reduceRight",J8);function Ht(e,t){typeof Array.prototype[e]=="function"&&(Dh[e]=t(e))}function Yn(e){return function(){var t=this[Xe];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function Bi(e){return function(t,r){var n=this,i=this[Xe];i.atom_.reportObserved();var a=i.dehanceValues_(i.values_);return a[e](function(o,l){return t.call(r,o,l,n)})}}function J8(e){return function(){var t=this,r=this[Xe];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),i=arguments[0];return arguments[0]=function(a,o,l){return i(a,o,l,t)},n[e].apply(n,arguments)}}var NC=Bo("ObservableArrayAdministration",Wy);function vn(e){return fp(e)&&NC(e[Xe])}var e9,t9,IC={},_o="add",Fh="delete";e9=Symbol.iterator;t9=Symbol.toStringTag;var wp=function(){function e(r,n,i){var a=this;n===void 0&&(n=Cl),i===void 0&&(i="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Xe]=IC,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_=n,this.name_=i,Vn(Map)||ot(18),Uo(function(){a.keysAtom_=Vc("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,r&&a.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var i=this;if(!Me.trackingDerivation)return this.has_(n);var a=this.hasMap_.get(n);if(!a){var o=a=new Ao(this.has_(n),dp,"ObservableMap.key?",!1);this.hasMap_.set(n,o),By(o,function(){return i.hasMap_.delete(n)})}return a.get()},t.set=function(n,i){var a=this.has_(n);if(ui(this)){var o=ci(this,{type:a?sa:_o,object:this,newValue:i,name:n});if(!o)return this;i=o.newValue}return a?this.updateValue_(n,i):this.addValue_(n,i),this},t.delete=function(n){var i=this;if(this.keysAtom_,ui(this)){var a=ci(this,{type:Fh,object:this,name:n});if(!a)return!1}if(this.has_(n)){var o=xc(),l=Ii(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:Fh,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return ra(function(){var f;i.keysAtom_.reportChanged(),(f=i.hasMap_.get(n))==null||f.setNewValue_(!1);var v=i.data_.get(n);v.setNewValue_(void 0),i.data_.delete(n)}),l&&Di(this,u),!0}return!1},t.updateValue_=function(n,i){var a=this.data_.get(n);if(i=a.prepareNewValue_(i),i!==Me.UNCHANGED){var o=xc(),l=Ii(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:sa,object:this,oldValue:a.value_,name:n,newValue:i}:null;a.setNewValue_(i),l&&Di(this,u)}},t.addValue_=function(n,i){var a=this;this.keysAtom_,ra(function(){var f,v=new Ao(i,a.enhancer_,"ObservableMap.key",!1);a.data_.set(n,v),i=v.value_,(f=a.hasMap_.get(n))==null||f.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=xc(),l=Ii(this),u=l||o?{observableKind:"map",debugObjectName:this.name_,type:_o,object:this,name:n,newValue:i}:null;l&&Di(this,u)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,i=this.keys();return Wc({next:function(){var o=i.next(),l=o.done,u=o.value;return{done:l,value:l?void 0:n.get(u)}}})},t.entries=function(){var n=this,i=this.keys();return Wc({next:function(){var o=i.next(),l=o.done,u=o.value;return{done:l,value:l?void 0:[u,n.get(u)]}}})},t[e9]=function(){return this.entries()},t.forEach=function(n,i){for(var a=Ds(this),o;!(o=a()).done;){var l=o.value,u=l[0],f=l[1];n.call(i,f,u,this)}},t.merge=function(n){var i=this;return Yr(n)&&(n=new Map(n)),ra(function(){Ba(n)?Gx(n).forEach(function(a){return i.set(a,n[a])}):Array.isArray(n)?n.forEach(function(a){var o=a[0],l=a[1];return i.set(o,l)}):mu(n)?(n.constructor!==Map&&ot(19,n),n.forEach(function(a,o){return i.set(o,a)})):n!=null&&ot(20,n)}),this},t.clear=function(){var n=this;ra(function(){jy(function(){for(var i=Ds(n.keys()),a;!(a=i()).done;){var o=a.value;n.delete(o)}})})},t.replace=function(n){var i=this;return ra(function(){for(var a=DC(n),o=new Map,l=!1,u=Ds(i.data_.keys()),f;!(f=u()).done;){var v=f.value;if(!a.has(v)){var w=i.delete(v);if(w)l=!0;else{var _=i.data_.get(v);o.set(v,_)}}}for(var h=Ds(a.entries()),E;!(E=h()).done;){var m=E.value,y=m[0],p=m[1],g=i.data_.has(y);if(i.set(y,p),i.data_.has(y)){var d=i.data_.get(y);o.set(y,d),g||(l=!0)}}if(!l)if(i.data_.size!==o.size)i.keysAtom_.reportChanged();else for(var b=i.data_.keys(),O=o.keys(),k=b.next(),C=O.next();!k.done;){if(k.value!==C.value){i.keysAtom_.reportChanged();break}k=b.next(),C=O.next()}i.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,i){return vf(this,n)},t.intercept_=function(n){return gf(this,n)},My(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:t9,get:function(){return"Map"}}]),e}(),Yr=Bo("ObservableMap",wp);function DC(e){if(mu(e)||Yr(e))return e;if(Array.isArray(e))return new Map(e);if(Ba(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return ot(21,e)}var r9,n9,FC={};r9=Symbol.iterator;n9=Symbol.toStringTag;var Yy=function(){function e(r,n,i){var a=this;n===void 0&&(n=Cl),i===void 0&&(i="ObservableSet"),this.name_=void 0,this[Xe]=FC,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_=i,Vn(Set)||ot(22),this.enhancer_=function(o,l){return n(o,l,i)},Uo(function(){a.atom_=Vc(a.name_),r&&a.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;ra(function(){jy(function(){for(var i=Ds(n.data_.values()),a;!(a=i()).done;){var o=a.value;n.delete(o)}})})},t.forEach=function(n,i){for(var a=Ds(this),o;!(o=a()).done;){var l=o.value;n.call(i,l,l,this)}},t.add=function(n){var i=this;if(this.atom_,ui(this)){var a=ci(this,{type:_o,object:this,newValue:n});if(!a)return this}if(!this.has(n)){ra(function(){i.data_.add(i.enhancer_(n,void 0)),i.atom_.reportChanged()});var o=!1,l=Ii(this),u=l||o?{observableKind:"set",debugObjectName:this.name_,type:_o,object:this,newValue:n}:null;l&&Di(this,u)}return this},t.delete=function(n){var i=this;if(ui(this)){var a=ci(this,{type:Fh,object:this,oldValue:n});if(!a)return!1}if(this.has(n)){var o=!1,l=Ii(this),u=l||o?{observableKind:"set",debugObjectName:this.name_,type:Fh,object:this,oldValue:n}:null;return ra(function(){i.atom_.reportChanged(),i.data_.delete(n)}),l&&Di(this,u),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,i=Array.from(this.keys()),a=Array.from(this.values());return Wc({next:function(){var l=n;return n+=1,l<a.length?{value:[i[l],a[l]],done:!1}:{done:!0}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var n=this,i=0,a=Array.from(this.data_.values());return Wc({next:function(){return i<a.length?{value:n.dehanceValue_(a[i++]),done:!1}:{done:!0}}})},t.replace=function(n){var i=this;return hn(n)&&(n=new Set(n)),ra(function(){Array.isArray(n)?(i.clear(),n.forEach(function(a){return i.add(a)})):cf(n)?(i.clear(),n.forEach(function(a){return i.add(a)})):n!=null&&ot("Cannot initialize set from "+n)}),this},t.observe_=function(n,i){return vf(this,n)},t.intercept_=function(n){return gf(this,n)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[r9]=function(){return this.values()},My(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:n9,get:function(){return"Set"}}]),e}(),hn=Bo("ObservableSet",Yy),k5=Object.create(null),R5="remove",i9=function(){function e(r,n,i,a){n===void 0&&(n=new Map),a===void 0&&(a=OP),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_=r,this.values_=n,this.name_=i,this.defaultAnnotation_=a,this.keysAtom_=new df("ObservableObject.keys"),this.isPlainObject_=Ba(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(n){return this.values_.get(n).get()},t.setObservablePropValue_=function(n,i){var a=this.values_.get(n);if(a instanceof Js)return a.set(i),!0;if(ui(this)){var o=ci(this,{type:sa,object:this.proxy_||this.target_,name:n,newValue:i});if(!o)return null;i=o.newValue}if(i=a.prepareNewValue_(i),i!==Me.UNCHANGED){var l=Ii(this),u=!1,f=l||u?{type:sa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:n,newValue:i}:null;a.setNewValue_(i),l&&Di(this,f)}return!0},t.get_=function(n){return Me.trackingDerivation&&!La(this.target_,n)&&this.has_(n),this.target_[n]},t.set_=function(n,i,a){return a===void 0&&(a=!1),La(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,i):a?Reflect.set(this.target_,n,i):(this.target_[n]=i,!0):this.extend_(n,{value:i,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},t.has_=function(n){if(!Me.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var i=this.pendingKeys_.get(n);return i||(i=new Ao(n in this.target_,dp,"ObservableObject.key?",!1),this.pendingKeys_.set(n,i)),i.get()},t.make_=function(n,i){if(i===!0&&(i=this.defaultAnnotation_),i!==!1){if(!(n in this.target_)){var a;if((a=this.target_[ia])!=null&&a[n])return;ot(1,i.annotationType_,this.name_+"."+n.toString())}for(var o=this.target_;o&&o!==sf;){var l=Rh(o,n);if(l){var u=i.make_(this,n,l,o);if(u===0)return;if(u===1)break}o=Object.getPrototypeOf(o)}M5(this,i,n)}},t.extend_=function(n,i,a,o){if(o===void 0&&(o=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(n,i,o);var l=a.extend_(this,n,i,o);return l&&M5(this,a,n),l},t.defineProperty_=function(n,i,a){a===void 0&&(a=!1),this.keysAtom_;try{xn();var o=this.delete_(n);if(!o)return o;if(ui(this)){var l=ci(this,{object:this.proxy_||this.target_,name:n,type:_o,newValue:i.value});if(!l)return null;var u=l.newValue;i.value!==u&&(i=Mo({},i,{value:u}))}if(a){if(!Reflect.defineProperty(this.target_,n,i))return!1}else la(this.target_,n,i);this.notifyPropertyAddition_(n,i.value)}finally{Pn()}return!0},t.defineObservableProperty_=function(n,i,a,o){o===void 0&&(o=!1),this.keysAtom_;try{xn();var l=this.delete_(n);if(!l)return l;if(ui(this)){var u=ci(this,{object:this.proxy_||this.target_,name:n,type:_o,newValue:i});if(!u)return null;i=u.newValue}var f=L5(n),v={configurable:Me.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:f.get,set:f.set};if(o){if(!Reflect.defineProperty(this.target_,n,v))return!1}else la(this.target_,n,v);var w=new Ao(i,a,"ObservableObject.key",!1);this.values_.set(n,w),this.notifyPropertyAddition_(n,w.value_)}finally{Pn()}return!0},t.defineComputedProperty_=function(n,i,a){a===void 0&&(a=!1),this.keysAtom_;try{xn();var o=this.delete_(n);if(!o)return o;if(ui(this)){var l=ci(this,{object:this.proxy_||this.target_,name:n,type:_o,newValue:void 0});if(!l)return null}i.name||(i.name="ObservableObject.key"),i.context=this.proxy_||this.target_;var u=L5(n),f={configurable:Me.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:u.get,set:u.set};if(a){if(!Reflect.defineProperty(this.target_,n,f))return!1}else la(this.target_,n,f);this.values_.set(n,new Js(i)),this.notifyPropertyAddition_(n,void 0)}finally{Pn()}return!0},t.delete_=function(n,i){if(i===void 0&&(i=!1),this.keysAtom_,!La(this.target_,n))return!0;if(ui(this)){var a=ci(this,{object:this.proxy_||this.target_,name:n,type:R5});if(!a)return null}try{var o,l;xn();var u=Ii(this),f=!1,v=this.values_.get(n),w=void 0;if(!v&&(u||f)){var _;w=(_=Rh(this.target_,n))==null?void 0:_.value}if(i){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(v&&(this.values_.delete(n),v instanceof Ao&&(w=v.value_),k8(v)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(l=o.get(n))==null||l.set(n in this.target_),u||f){var h={type:R5,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:w,name:n};u&&Di(this,h)}}finally{Pn()}return!0},t.observe_=function(n,i){return vf(this,n)},t.intercept_=function(n){return gf(this,n)},t.notifyPropertyAddition_=function(n,i){var a,o,l=Ii(this),u=!1;if(l||u){var f=l||u?{type:_o,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:i}:null;l&&Di(this,f)}(a=this.pendingKeys_)==null||(o=a.get(n))==null||o.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),Qs(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Il(e,t){var r;if(La(e,Xe))return e;var n=(r=t==null?void 0:t.name)!=null?r:"ObservableObject",i=new i9(e,new Map,String(n),IP(t));return uf(e,Xe,i),e}var jC=Bo("ObservableObjectAdministration",i9);function L5(e){return k5[e]||(k5[e]={get:function(){return this[Xe].getObservablePropValue_(e)},set:function(r){return this[Xe].setObservablePropValue_(e,r)}})}function zr(e){return fp(e)?jC(e[Xe]):!1}function M5(e,t,r){var n;(n=e.target_[ia])==null||delete n[r]}var zC=o9(0),BC=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),ng=0,a9=function(){};function UC(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,t):e.prototype.__proto__!==void 0?e.prototype.__proto__=t:e.prototype=t}UC(a9,Array.prototype);var Ky=function(e,t,r){s8(n,e);function n(a,o,l,u){var f;return l===void 0&&(l="ObservableArray"),u===void 0&&(u=!1),f=e.call(this)||this,Uo(function(){var v=new Wy(l,o,u,!0);v.proxy_=eg(f),a8(eg(f),Xe,v),a&&a.length&&f.spliceWithArray(0,0,a),BC&&Object.defineProperty(eg(f),"0",zC)}),f}var i=n.prototype;return i.concat=function(){this[Xe].atom_.reportObserved();for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),l.map(function(f){return vn(f)?f.slice():f}))},i[r]=function(){var a=this,o=0;return Wc({next:function(){return o<a.length?{value:a[o++],done:!1}:{done:!0,value:void 0}}})},My(n,[{key:"length",get:function(){return this[Xe].getArrayLength_()},set:function(o){this[Xe].setArrayLength_(o)}},{key:t,get:function(){return"Array"}}]),n}(a9,Symbol.toStringTag,Symbol.iterator);Object.entries(Dh).forEach(function(e){var t=e[0],r=e[1];t!=="concat"&&uf(Ky.prototype,t,r)});function o9(e){return{enumerable:!1,configurable:!0,get:function(){return this[Xe].get_(e)},set:function(r){this[Xe].set_(e,r)}}}function HC(e){la(Ky.prototype,""+e,o9(e))}function l9(e){if(e>ng){for(var t=ng;t<e+100;t++)HC(t);ng=e}}l9(1e3);function GC(e,t,r){return new Ky(e,t,r)}function ca(e,t){if(typeof e=="object"&&e!==null){if(vn(e))return t!==void 0&&ot(23),e[Xe].atom_;if(hn(e))return e.atom_;if(Yr(e)){if(t===void 0)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||ot(25,t,jh(e)),r}if(zr(e)){if(!t)return ot(26);var n=e[Xe].values_.get(t);return n||ot(27,t,jh(e)),n}if(Ny(e)||Tl(e)||Ih(e))return e}else if(Vn(e)&&Ih(e[Xe]))return e[Xe];ot(28)}function zi(e,t){if(e||ot(29),t!==void 0)return zi(ca(e,t));if(Ny(e)||Tl(e)||Ih(e)||Yr(e)||hn(e))return e;if(e[Xe])return e[Xe];ot(24,e)}function jh(e,t){var r;if(t!==void 0)r=ca(e,t);else{if(pf(e))return e.name;zr(e)||Yr(e)||hn(e)?r=zi(e):r=ca(e)}return r.name_}function Uo(e){var t=Nl(),r=pp(!0);xn();try{return e()}finally{Pn(),gp(r),Ma(t)}}var N5=sf.toString;function Xy(e,t,r){return r===void 0&&(r=-1),Sm(e,t,r)}function Sm(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var o=N5.call(e);if(o!==N5.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=I5(e),t=I5(t);var l=o==="[object Array]";if(!l){if(typeof e!="object"||typeof t!="object")return!1;var u=e.constructor,f=t.constructor;if(u!==f&&!(Vn(u)&&u instanceof u&&Vn(f)&&f instanceof f)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var v=n.length;v--;)if(n[v]===e)return i[v]===t;if(n.push(e),i.push(t),l){if(v=e.length,v!==t.length)return!1;for(;v--;)if(!Sm(e[v],t[v],r-1,n,i))return!1}else{var w=Object.keys(e),_;if(v=w.length,Object.keys(t).length!==v)return!1;for(;v--;)if(_=w[v],!(La(t,_)&&Sm(e[_],t[_],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function I5(e){return vn(e)?e.slice():mu(e)||Yr(e)||cf(e)||hn(e)?Array.from(e.entries()):e}function Wc(e){return e[Symbol.iterator]=$C,e}function $C(){return this}["Symbol","Map","Set"].forEach(function(e){var t=Ry();typeof t[e]>"u"&&ot("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:L8,extras:{getDebugName:jh},$mobx:Xe});const VC=Object.freeze(Object.defineProperty({__proto__:null,$mobx:Xe,FlowCancellationError:mp,ObservableMap:wp,ObservableSet:Yy,Reaction:eu,_allowStateChanges:Dy,_allowStateChangesInsideComputed:ru,_allowStateReadsEnd:$s,_allowStateReadsStart:vp,_autoAction:tu,_endAction:_8,_getAdministration:zi,_getGlobalState:P8,_interceptReads:Hy,_isComputingDerivation:HP,_resetGlobalState:qP,_startAction:b8,action:wr,autorun:zy,comparer:Pl,computed:Ml,configure:U8,createAtom:Vc,defineProperty:Vy,entries:K8,extendObservable:Uy,flow:Al,flowResult:mC,get:SC,getAtom:ca,getDebugName:jh,getDependencyTree:H8,getObserverTree:dC,has:X8,intercept:yp,isAction:pf,isBoxedObservable:Fy,isComputed:_C,isComputedProp:q8,isFlow:nu,isFlowCancellationError:gC,isObservable:bp,isObservableArray:vn,isObservableMap:Yr,isObservableObject:zr,isObservableProp:Y8,isObservableSet:hn,keys:qc,makeAutoObservable:kC,makeObservable:qy,observable:Ft,observe:_p,onBecomeObserved:z8,onBecomeUnobserved:By,onReactionError:QP,override:rP,ownKeys:Z8,reaction:j8,remove:wC,runInAction:ru,set:$y,spy:L8,toJS:xC,trace:PC,transaction:ra,untracked:jy,values:Gy,when:wm},Symbol.toStringTag,{value:"Module"}));if(!at.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!qy)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function qC(e){e()}function s9(e){e||(e=qC),U8({reactionScheduler:e})}var WC=function(){return!0};function YC(e){return H8(e)}var u9=!1;function c9(e){u9=e}function Zy(){return u9}var KC=1e4,XC=1e4,ZC=function(){function e(t){var r=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:t}),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(n){n===void 0&&(n=KC),clearTimeout(r.sweepTimeout),r.sweepTimeout=void 0;var i=Date.now();r.registrations.forEach(function(a,o){i-a.registeredAt>=n&&(r.finalize(a.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,XC))}}),e}(),QC=typeof FinalizationRegistry<"u"?FinalizationRegistry:ZC,zh=new QC(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),f9={exports:{}},d9={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.min.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Facebook, Inc. and its 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 iu=at;function JC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var eT=typeof Object.is=="function"?Object.is:JC,tT=iu.useState,rT=iu.useEffect,nT=iu.useLayoutEffect,iT=iu.useDebugValue;function aT(e,t){var r=t(),n=tT({inst:{value:r,getSnapshot:t}}),i=n[0].inst,a=n[1];return nT(function(){i.value=r,i.getSnapshot=t,ig(i)&&a({inst:i})},[e,r,t]),rT(function(){return ig(i)&&a({inst:i}),e(function(){ig(i)&&a({inst:i})})},[e]),iT(r),r}function ig(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!eT(e,r)}catch{return!0}}function oT(e,t){return t()}var lT=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oT:aT;d9.useSyncExternalStore=iu.useSyncExternalStore!==void 0?iu.useSyncExternalStore:lT;f9.exports=d9;var sT=f9.exports;function D5(e){e.reaction=new eu("observer".concat(e.name),function(){var t;e.stateVersion=Symbol(),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function Qy(e,t){if(t===void 0&&(t="observed"),Zy())return e();var r=bt.useRef(null);if(!r.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(l){return zh.unregister(n),n.onStoreChange=l,n.reaction||(D5(n),n.stateVersion=Symbol()),function(){var u;n.onStoreChange=null,(u=n.reaction)===null||u===void 0||u.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};r.current=n}var i=r.current;i.reaction||(D5(i),zh.register(r,i,i)),bt.useDebugValue(i.reaction,YC),sT.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getSnapshot);var a,o;if(i.reaction.track(function(){try{a=e()}catch(l){o=l}}),o)throw o;return a}var ag,og,h9=typeof Symbol=="function"&&Symbol.for,uT=(og=(ag=Object.getOwnPropertyDescriptor(function(){},"name"))===null||ag===void 0?void 0:ag.configurable)!==null&&og!==void 0?og:!1,F5=h9?Symbol.for("react.forward_ref"):typeof at.forwardRef=="function"&&at.forwardRef(function(e){return null}).$$typeof,j5=h9?Symbol.for("react.memo"):typeof at.memo=="function"&&at.memo(function(e){return null}).$$typeof;function cT(e,t){var r;if(j5&&e.$$typeof===j5)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(Zy())return e;var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,i=e,a=e.displayName||e.name;if(F5&&e.$$typeof===F5&&(n=!0,i=e.render,typeof i!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(l,u){return Qy(function(){return i(l,u)},a)};return o.displayName=e.displayName,uT&&Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=at.forwardRef(o)),o=at.memo(o),dT(e,o),o}var fT={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function dT(e,t){Object.keys(e).forEach(function(r){fT[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}function p9(e){var t=e.children,r=e.render,n=t||r;return typeof n!="function"?null:Qy(n)}p9.displayName="Observer";function hT(e,t){return at.useState(function(){return Ft(e(),t,{autoBind:!0})})[0]}function g9(e){var t=at.useState(function(){return Ft(e,{},{deep:!1})})[0];return ru(function(){Object.assign(t,e)}),t}function pT(e,t){var r=t&&g9(t);return at.useState(function(){return Ft(e(r),void 0,{autoBind:!0})})[0]}var lg;s9(Jw.unstable_batchedUpdates);var gT=(lg=zh.finalizeAllImmediately)!==null&&lg!==void 0?lg:function(){};function vT(e,t){return t===void 0&&(t="observed"),Qy(e,t)}function mT(e){c9(e)}const yT=Object.freeze(Object.defineProperty({__proto__:null,Observer:p9,_observerFinalizationRegistry:zh,clearTimers:gT,enableStaticRendering:c9,isObserverBatched:WC,isUsingStaticRendering:Zy,observer:cT,observerBatching:s9,useAsObservableSource:g9,useLocalObservable:hT,useLocalStore:pT,useObserver:vT,useStaticRendering:mT},Symbol.toStringTag,{value:"Module"})),Ui=Do(yT);var v9={};const ha=Do(VC);var Jy={exports:{}},Sp={},Bh={},gt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function r(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof we<"u"?we:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.11",isBrowser:r(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return e.Konva.angleDeg?i*t:i},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 i;return(i=e.Konva.Transformer)===null||i===void 0?void 0:i.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(i){e.glob.Konva=i}};const n=i=>{e.Konva[i.prototype.getClassName()]=i};e._registerNode=n,e.Konva._injectGlobal(e.Konva)})(gt);var ir={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=gt;class r{constructor(b=[1,0,0,1,0,0]){this.dirty=!1,this.m=b&&b.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 r(this.m)}copyInto(b){b.m[0]=this.m[0],b.m[1]=this.m[1],b.m[2]=this.m[2],b.m[3]=this.m[3],b.m[4]=this.m[4],b.m[5]=this.m[5]}point(b){var O=this.m;return{x:O[0]*b.x+O[2]*b.y+O[4],y:O[1]*b.x+O[3]*b.y+O[5]}}translate(b,O){return this.m[4]+=this.m[0]*b+this.m[2]*O,this.m[5]+=this.m[1]*b+this.m[3]*O,this}scale(b,O){return this.m[0]*=b,this.m[1]*=b,this.m[2]*=O,this.m[3]*=O,this}rotate(b){var O=Math.cos(b),k=Math.sin(b),C=this.m[0]*O+this.m[2]*k,S=this.m[1]*O+this.m[3]*k,x=this.m[0]*-k+this.m[2]*O,P=this.m[1]*-k+this.m[3]*O;return this.m[0]=C,this.m[1]=S,this.m[2]=x,this.m[3]=P,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(b,O){var k=this.m[0]+this.m[2]*O,C=this.m[1]+this.m[3]*O,S=this.m[2]+this.m[0]*b,x=this.m[3]+this.m[1]*b;return this.m[0]=k,this.m[1]=C,this.m[2]=S,this.m[3]=x,this}multiply(b){var O=this.m[0]*b.m[0]+this.m[2]*b.m[1],k=this.m[1]*b.m[0]+this.m[3]*b.m[1],C=this.m[0]*b.m[2]+this.m[2]*b.m[3],S=this.m[1]*b.m[2]+this.m[3]*b.m[3],x=this.m[0]*b.m[4]+this.m[2]*b.m[5]+this.m[4],P=this.m[1]*b.m[4]+this.m[3]*b.m[5]+this.m[5];return this.m[0]=O,this.m[1]=k,this.m[2]=C,this.m[3]=S,this.m[4]=x,this.m[5]=P,this}invert(){var b=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),O=this.m[3]*b,k=-this.m[1]*b,C=-this.m[2]*b,S=this.m[0]*b,x=b*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),P=b*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=O,this.m[1]=k,this.m[2]=C,this.m[3]=S,this.m[4]=x,this.m[5]=P,this}getMatrix(){return this.m}decompose(){var b=this.m[0],O=this.m[1],k=this.m[2],C=this.m[3],S=this.m[4],x=this.m[5],P=b*C-O*k;let T={x:S,y:x,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(b!=0||O!=0){var L=Math.sqrt(b*b+O*O);T.rotation=O>0?Math.acos(b/L):-Math.acos(b/L),T.scaleX=L,T.scaleY=P/L,T.skewX=(b*k+O*C)/P,T.skewY=0}else if(k!=0||C!=0){var M=Math.sqrt(k*k+C*C);T.rotation=Math.PI/2-(C>0?Math.acos(-k/M):-Math.acos(k/M)),T.scaleX=P/M,T.scaleY=M,T.skewX=0,T.skewY=(b*k+O*C)/P}return T.rotation=e.Util._getRotation(T.rotation),T}}e.Transform=r;var n="[object Array]",i="[object Number]",a="[object String]",o="[object Boolean]",l=Math.PI/180,u=180/Math.PI,f="#",v="",w="0",_="Konva warning: ",h="Konva error: ",E="rgb(",m={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]},y=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,p=[];const g=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(d){setTimeout(d,60)};e.Util={_isElement(d){return!!(d&&d.nodeType==1)},_isFunction(d){return!!(d&&d.constructor&&d.call&&d.apply)},_isPlainObject(d){return!!d&&d.constructor===Object},_isArray(d){return Object.prototype.toString.call(d)===n},_isNumber(d){return Object.prototype.toString.call(d)===i&&!isNaN(d)&&isFinite(d)},_isString(d){return Object.prototype.toString.call(d)===a},_isBoolean(d){return Object.prototype.toString.call(d)===o},isObject(d){return d instanceof Object},isValidSelector(d){if(typeof d!="string")return!1;var b=d[0];return b==="#"||b==="."||b===b.toUpperCase()},_sign(d){return d===0||d>0?1:-1},requestAnimFrame(d){p.push(d),p.length===1&&g(function(){const b=p;p=[],b.forEach(function(O){O()})})},createCanvasElement(){var d=document.createElement("canvas");try{d.style=d.style||{}}catch{}return d},createImageElement(){return document.createElement("img")},_isInDocument(d){for(;d=d.parentNode;)if(d==document)return!0;return!1},_urlToImage(d,b){var O=e.Util.createImageElement();O.onload=function(){b(O)},O.src=d},_rgbToHex(d,b,O){return((1<<24)+(d<<16)+(b<<8)+O).toString(16).slice(1)},_hexToRgb(d){d=d.replace(f,v);var b=parseInt(d,16);return{r:b>>16&255,g:b>>8&255,b:b&255}},getRandomColor(){for(var d=(Math.random()*16777215<<0).toString(16);d.length<6;)d=w+d;return f+d},getRGB(d){var b;return d in m?(b=m[d],{r:b[0],g:b[1],b:b[2]}):d[0]===f?this._hexToRgb(d.substring(1)):d.substr(0,4)===E?(b=y.exec(d.replace(/ /g,"")),{r:parseInt(b[1],10),g:parseInt(b[2],10),b:parseInt(b[3],10)}):{r:0,g:0,b:0}},colorToRGBA(d){return d=d||"black",e.Util._namedColorToRBA(d)||e.Util._hex3ColorToRGBA(d)||e.Util._hex4ColorToRGBA(d)||e.Util._hex6ColorToRGBA(d)||e.Util._hex8ColorToRGBA(d)||e.Util._rgbColorToRGBA(d)||e.Util._rgbaColorToRGBA(d)||e.Util._hslColorToRGBA(d)},_namedColorToRBA(d){var b=m[d.toLowerCase()];return b?{r:b[0],g:b[1],b:b[2],a:1}:null},_rgbColorToRGBA(d){if(d.indexOf("rgb(")===0){d=d.match(/rgb\(([^)]+)\)/)[1];var b=d.split(/ *, */).map(Number);return{r:b[0],g:b[1],b:b[2],a:1}}},_rgbaColorToRGBA(d){if(d.indexOf("rgba(")===0){d=d.match(/rgba\(([^)]+)\)/)[1];var b=d.split(/ *, */).map((O,k)=>O.slice(-1)==="%"?k===3?parseInt(O)/100:parseInt(O)/100*255:Number(O));return{r:b[0],g:b[1],b:b[2],a:b[3]}}},_hex8ColorToRGBA(d){if(d[0]==="#"&&d.length===9)return{r:parseInt(d.slice(1,3),16),g:parseInt(d.slice(3,5),16),b:parseInt(d.slice(5,7),16),a:parseInt(d.slice(7,9),16)/255}},_hex6ColorToRGBA(d){if(d[0]==="#"&&d.length===7)return{r:parseInt(d.slice(1,3),16),g:parseInt(d.slice(3,5),16),b:parseInt(d.slice(5,7),16),a:1}},_hex4ColorToRGBA(d){if(d[0]==="#"&&d.length===5)return{r:parseInt(d[1]+d[1],16),g:parseInt(d[2]+d[2],16),b:parseInt(d[3]+d[3],16),a:parseInt(d[4]+d[4],16)/255}},_hex3ColorToRGBA(d){if(d[0]==="#"&&d.length===4)return{r:parseInt(d[1]+d[1],16),g:parseInt(d[2]+d[2],16),b:parseInt(d[3]+d[3],16),a:1}},_hslColorToRGBA(d){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(d)){const[b,...O]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(d),k=Number(O[0])/360,C=Number(O[1])/100,S=Number(O[2])/100;let x,P,T;if(C===0)return T=S*255,{r:Math.round(T),g:Math.round(T),b:Math.round(T),a:1};S<.5?x=S*(1+C):x=S+C-S*C;const L=2*S-x,M=[0,0,0];for(let U=0;U<3;U++)P=k+1/3*-(U-1),P<0&&P++,P>1&&P--,6*P<1?T=L+(x-L)*6*P:2*P<1?T=x:3*P<2?T=L+(x-L)*(2/3-P)*6:T=L,M[U]=T*255;return{r:Math.round(M[0]),g:Math.round(M[1]),b:Math.round(M[2]),a:1}}},haveIntersection(d,b){return!(b.x>d.x+d.width||b.x+b.width<d.x||b.y>d.y+d.height||b.y+b.height<d.y)},cloneObject(d){var b={};for(var O in d)this._isPlainObject(d[O])?b[O]=this.cloneObject(d[O]):this._isArray(d[O])?b[O]=this.cloneArray(d[O]):b[O]=d[O];return b},cloneArray(d){return d.slice(0)},degToRad(d){return d*l},radToDeg(d){return d*u},_degToRad(d){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(d)},_radToDeg(d){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(d)},_getRotation(d){return t.Konva.angleDeg?e.Util.radToDeg(d):d},_capitalize(d){return d.charAt(0).toUpperCase()+d.slice(1)},throw(d){throw new Error(h+d)},error(d){console.error(h+d)},warn(d){t.Konva.showWarnings&&console.warn(_+d)},each(d,b){for(var O in d)b(O,d[O])},_inRange(d,b,O){return b<=d&&d<O},_getProjectionToSegment(d,b,O,k,C,S){var x,P,T,L=(d-O)*(d-O)+(b-k)*(b-k);if(L==0)x=d,P=b,T=(C-O)*(C-O)+(S-k)*(S-k);else{var M=((C-d)*(O-d)+(S-b)*(k-b))/L;M<0?(x=d,P=b,T=(d-C)*(d-C)+(b-S)*(b-S)):M>1?(x=O,P=k,T=(O-C)*(O-C)+(k-S)*(k-S)):(x=d+M*(O-d),P=b+M*(k-b),T=(x-C)*(x-C)+(P-S)*(P-S))}return[x,P,T]},_getProjectionToLine(d,b,O){var k=e.Util.cloneObject(d),C=Number.MAX_VALUE;return b.forEach(function(S,x){if(!(!O&&x===b.length-1)){var P=b[(x+1)%b.length],T=e.Util._getProjectionToSegment(S.x,S.y,P.x,P.y,d.x,d.y),L=T[0],M=T[1],U=T[2];U<C&&(k.x=L,k.y=M,C=U)}}),k},_prepareArrayForTween(d,b,O){var k,C=[],S=[];if(d.length>b.length){var x=b;b=d,d=x}for(k=0;k<d.length;k+=2)C.push({x:d[k],y:d[k+1]});for(k=0;k<b.length;k+=2)S.push({x:b[k],y:b[k+1]});var P=[];return S.forEach(function(T){var L=e.Util._getProjectionToLine(T,C,O);P.push(L.x),P.push(L.y)}),P},_prepareToStringify(d){var b;d.visitedByCircularReferenceRemoval=!0;for(var O in d)if(d.hasOwnProperty(O)&&d[O]&&typeof d[O]=="object"){if(b=Object.getOwnPropertyDescriptor(d,O),d[O].visitedByCircularReferenceRemoval||e.Util._isElement(d[O]))if(b.configurable)delete d[O];else return null;else if(e.Util._prepareToStringify(d[O])===null)if(b.configurable)delete d[O];else return null}return delete d.visitedByCircularReferenceRemoval,d},_assign(d,b){for(var O in b)d[O]=b[O];return d},_getFirstPointerId(d){return d.touches?d.changedTouches[0].identifier:d.pointerId||999},releaseCanvas(...d){t.Konva.releaseCanvasOnDestroy&&d.forEach(b=>{b.width=0,b.height=0})},drawRoundedRectPath(d,b,O,k){let C=0,S=0,x=0,P=0;typeof k=="number"?C=S=x=P=Math.min(k,b/2,O/2):(C=Math.min(k[0]||0,b/2,O/2),S=Math.min(k[1]||0,b/2,O/2),P=Math.min(k[2]||0,b/2,O/2),x=Math.min(k[3]||0,b/2,O/2)),d.moveTo(C,0),d.lineTo(b-S,0),d.arc(b-S,S,S,Math.PI*3/2,0,!1),d.lineTo(b,O-P),d.arc(b-P,O-P,P,0,Math.PI/2,!1),d.lineTo(x,O),d.arc(x,O-x,x,Math.PI/2,Math.PI,!1),d.lineTo(0,C),d.arc(C,C,C,Math.PI,Math.PI*3/2,!1)}}})(ir);var Qt={},vt={},Ye={};Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getComponentValidator=Ye.getBooleanValidator=Ye.getNumberArrayValidator=Ye.getFunctionValidator=Ye.getStringOrGradientValidator=Ye.getStringValidator=Ye.getNumberOrAutoValidator=Ye.getNumberOrArrayOfNumbersValidator=Ye.getNumberValidator=Ye.alphaComponent=Ye.RGBComponent=void 0;const Ga=gt,ur=ir;function $a(e){return ur.Util._isString(e)?'"'+e+'"':Object.prototype.toString.call(e)==="[object Number]"||ur.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}function bT(e){return e>255?255:e<0?0:Math.round(e)}Ye.RGBComponent=bT;function _T(e){return e>1?1:e<1e-4?1e-4:e}Ye.alphaComponent=_T;function wT(){if(Ga.Konva.isUnminified)return function(e,t){return ur.Util._isNumber(e)||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}Ye.getNumberValidator=wT;function ST(e){if(Ga.Konva.isUnminified)return function(t,r){let n=ur.Util._isNumber(t),i=ur.Util._isArray(t)&&t.length==e;return!n&&!i&&ur.Util.warn($a(t)+' is a not valid value for "'+r+'" attribute. The value should be a number or Array<number>('+e+")"),t}}Ye.getNumberOrArrayOfNumbersValidator=ST;function ET(){if(Ga.Konva.isUnminified)return function(e,t){var r=ur.Util._isNumber(e),n=e==="auto";return r||n||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}Ye.getNumberOrAutoValidator=ET;function OT(){if(Ga.Konva.isUnminified)return function(e,t){return ur.Util._isString(e)||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}Ye.getStringValidator=OT;function xT(){if(Ga.Konva.isUnminified)return function(e,t){const r=ur.Util._isString(e),n=Object.prototype.toString.call(e)==="[object CanvasGradient]"||e&&e.addColorStop;return r||n||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}Ye.getStringOrGradientValidator=xT;function PT(){if(Ga.Konva.isUnminified)return function(e,t){return ur.Util._isFunction(e)||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}}Ye.getFunctionValidator=PT;function CT(){if(Ga.Konva.isUnminified)return function(e,t){const r=Int8Array?Object.getPrototypeOf(Int8Array):null;return r&&e instanceof r||(ur.Util._isArray(e)?e.forEach(function(n){ur.Util._isNumber(n)||ur.Util.warn('"'+t+'" attribute has non numeric element '+n+". Make sure that all elements are numbers.")}):ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}}Ye.getNumberArrayValidator=CT;function TT(){if(Ga.Konva.isUnminified)return function(e,t){var r=e===!0||e===!1;return r||ur.Util.warn($a(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}Ye.getBooleanValidator=TT;function AT(e){if(Ga.Konva.isUnminified)return function(t,r){return t==null||ur.Util.isObject(t)||ur.Util.warn($a(t)+' is a not valid value for "'+r+'" attribute. The value should be an object with properties '+e),t}}Ye.getComponentValidator=AT;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=ir,r=Ye;var n="get",i="set";e.Factory={addGetterSetter(a,o,l,u,f){e.Factory.addGetter(a,o,l),e.Factory.addSetter(a,o,u,f),e.Factory.addOverloadedGetterSetter(a,o)},addGetter(a,o,l){var u=n+t.Util._capitalize(o);a.prototype[u]=a.prototype[u]||function(){var f=this.attrs[o];return f===void 0?l:f}},addSetter(a,o,l,u){var f=i+t.Util._capitalize(o);a.prototype[f]||e.Factory.overWriteSetter(a,o,l,u)},overWriteSetter(a,o,l,u){var f=i+t.Util._capitalize(o);a.prototype[f]=function(v){return l&&v!==void 0&&v!==null&&(v=l.call(this,v,o)),this._setAttr(o,v),u&&u.call(this),this}},addComponentsGetterSetter(a,o,l,u,f){var v=l.length,w=t.Util._capitalize,_=n+w(o),h=i+w(o),E,m;a.prototype[_]=function(){var p={};for(E=0;E<v;E++)m=l[E],p[m]=this.getAttr(o+w(m));return p};var y=(0,r.getComponentValidator)(l);a.prototype[h]=function(p){var g=this.attrs[o],d;u&&(p=u.call(this,p)),y&&y.call(this,p,o);for(d in p)p.hasOwnProperty(d)&&this._setAttr(o+w(d),p[d]);return p||l.forEach(b=>{this._setAttr(o+w(b),void 0)}),this._fireChangeEvent(o,g,p),f&&f.call(this),this},e.Factory.addOverloadedGetterSetter(a,o)},addOverloadedGetterSetter(a,o){var l=t.Util._capitalize(o),u=i+l,f=n+l;a.prototype[o]=function(){return arguments.length?(this[u](arguments[0]),this):this[f]()}},addDeprecatedGetterSetter(a,o,l,u){t.Util.error("Adding deprecated "+o);var f=n+t.Util._capitalize(o),v=o+" property is deprecated and will be removed soon. Look at Konva change log for more information.";a.prototype[f]=function(){t.Util.error(v);var w=this.attrs[o];return w===void 0?l:w},e.Factory.addSetter(a,o,u,function(){t.Util.error(v)}),e.Factory.addOverloadedGetterSetter(a,o)},backCompat(a,o){t.Util.each(o,function(l,u){var f=a.prototype[u],v=n+t.Util._capitalize(l),w=i+t.Util._capitalize(l);function _(){f.apply(this,arguments),t.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+u+'" instead.')}a.prototype[l]=_,a.prototype[v]=_,a.prototype[w]=_})},afterSetFilter(){this._filterUpToDate=!1}}})(vt);var Fi={},Na={};Object.defineProperty(Na,"__esModule",{value:!0});Na.HitContext=Na.SceneContext=Na.Context=void 0;const m9=ir,kT=gt;function RT(e){var t=[],r=e.length,n=m9.Util,i,a;for(i=0;i<r;i++)a=e[i],n._isNumber(a)?a=Math.round(a*1e3)/1e3:n._isString(a)||(a=a+""),t.push(a);return t}var z5=",",LT="(",MT=")",NT="([",IT="])",DT=";",FT="()",jT="=",B5=["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"],zT=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const BT=100;class Ep{constructor(t){this.canvas=t,kT.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,r){var n=this.traceArr,i=n.length,a="",o,l,u,f;for(o=0;o<i;o++)l=n[o],u=l.method,u?(f=l.args,a+=u,t?a+=FT:m9.Util._isArray(f[0])?a+=NT+f.join(z5)+IT:(r&&(f=f.map(v=>typeof v=="number"?Math.floor(v):v)),a+=LT+f.join(z5)+MT)):(a+=l.property,t||(a+=jT+l.val)),a+=DT;return a}clearTrace(){this.traceArr=[]}_trace(t){var r=this.traceArr,n;r.push(t),n=r.length,n>=BT&&r.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var r=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,r.getWidth()/r.pixelRatio,r.getHeight()/r.pixelRatio)}_applyLineCap(t){const r=t.attrs.lineCap;r&&this.setAttr("lineCap",r)}_applyOpacity(t){var r=t.getAbsoluteOpacity();r!==1&&this.setAttr("globalAlpha",r)}_applyLineJoin(t){const r=t.attrs.lineJoin;r&&this.setAttr("lineJoin",r)}setAttr(t,r){this._context[t]=r}arc(t,r,n,i,a,o){this._context.arc(t,r,n,i,a,o)}arcTo(t,r,n,i,a){this._context.arcTo(t,r,n,i,a)}beginPath(){this._context.beginPath()}bezierCurveTo(t,r,n,i,a,o){this._context.bezierCurveTo(t,r,n,i,a,o)}clearRect(t,r,n,i){this._context.clearRect(t,r,n,i)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,r){var n=arguments;if(n.length===2)return this._context.createImageData(t,r);if(n.length===1)return this._context.createImageData(t)}createLinearGradient(t,r,n,i){return this._context.createLinearGradient(t,r,n,i)}createPattern(t,r){return this._context.createPattern(t,r)}createRadialGradient(t,r,n,i,a,o){return this._context.createRadialGradient(t,r,n,i,a,o)}drawImage(t,r,n,i,a,o,l,u,f){var v=arguments,w=this._context;v.length===3?w.drawImage(t,r,n):v.length===5?w.drawImage(t,r,n,i,a):v.length===9&&w.drawImage(t,r,n,i,a,o,l,u,f)}ellipse(t,r,n,i,a,o,l,u){this._context.ellipse(t,r,n,i,a,o,l,u)}isPointInPath(t,r,n,i){return n?this._context.isPointInPath(n,t,r,i):this._context.isPointInPath(t,r,i)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,r,n,i){this._context.fillRect(t,r,n,i)}strokeRect(t,r,n,i){this._context.strokeRect(t,r,n,i)}fillText(t,r,n,i){i?this._context.fillText(t,r,n,i):this._context.fillText(t,r,n)}measureText(t){return this._context.measureText(t)}getImageData(t,r,n,i){return this._context.getImageData(t,r,n,i)}lineTo(t,r){this._context.lineTo(t,r)}moveTo(t,r){this._context.moveTo(t,r)}rect(t,r,n,i){this._context.rect(t,r,n,i)}roundRect(t,r,n,i,a){this._context.roundRect(t,r,n,i,a)}putImageData(t,r,n){this._context.putImageData(t,r,n)}quadraticCurveTo(t,r,n,i){this._context.quadraticCurveTo(t,r,n,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,r){this._context.scale(t,r)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,r,n,i,a,o){this._context.setTransform(t,r,n,i,a,o)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,r,n,i){this._context.strokeText(t,r,n,i)}transform(t,r,n,i,a,o){this._context.transform(t,r,n,i,a,o)}translate(t,r){this._context.translate(t,r)}_enableTrace(){var t=this,r=B5.length,n=this.setAttr,i,a,o=function(l){var u=t[l],f;t[l]=function(){return a=RT(Array.prototype.slice.call(arguments,0)),f=u.apply(t,arguments),t._trace({method:l,args:a}),f}};for(i=0;i<r;i++)o(B5[i]);t.setAttr=function(){n.apply(t,arguments);var l=arguments[0],u=arguments[1];(l==="shadowOffsetX"||l==="shadowOffsetY"||l==="shadowBlur")&&(u=u/this.canvas.getPixelRatio()),t._trace({property:l,val:u})}}_applyGlobalCompositeOperation(t){const r=t.attrs.globalCompositeOperation;var n=!r||r==="source-over";n||this.setAttr("globalCompositeOperation",r)}}Na.Context=Ep;zT.forEach(function(e){Object.defineProperty(Ep.prototype,e,{get(){return this._context[e]},set(t){this._context[e]=t}})});class UT extends Ep{constructor(t,{willReadFrequently:r=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:r})}_fillColor(t){var r=t.fill();this.setAttr("fillStyle",r),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var r=t._getLinearGradient();r&&(this.setAttr("fillStyle",r),t._fillFunc(this))}_fillRadialGradient(t){const r=t._getRadialGradient();r&&(this.setAttr("fillStyle",r),t._fillFunc(this))}_fill(t){const r=t.fill(),n=t.getFillPriority();if(r&&n==="color"){this._fillColor(t);return}const i=t.getFillPatternImage();if(i&&n==="pattern"){this._fillPattern(t);return}const a=t.getFillLinearGradientColorStops();if(a&&n==="linear-gradient"){this._fillLinearGradient(t);return}const o=t.getFillRadialGradientColorStops();if(o&&n==="radial-gradient"){this._fillRadialGradient(t);return}r?this._fillColor(t):i?this._fillPattern(t):a?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const r=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),a=this.createLinearGradient(r.x,r.y,n.x,n.y);if(i){for(var o=0;o<i.length;o+=2)a.addColorStop(i[o],i[o+1]);this.setAttr("strokeStyle",a)}}_stroke(t){var r=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),r&&t.dashEnabled()&&(this.setLineDash(r),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var a=t.getStrokeLinearGradientColorStops();a?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var r,n,i,a=(r=t.getShadowRGBA())!==null&&r!==void 0?r:"black",o=(n=t.getShadowBlur())!==null&&n!==void 0?n:5,l=(i=t.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},u=t.getAbsoluteScale(),f=this.canvas.getPixelRatio(),v=u.x*f,w=u.y*f;this.setAttr("shadowColor",a),this.setAttr("shadowBlur",o*Math.min(Math.abs(v),Math.abs(w))),this.setAttr("shadowOffsetX",l.x*v),this.setAttr("shadowOffsetY",l.y*w)}}Na.SceneContext=UT;class HT extends Ep{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const a=t.getStrokeScaleEnabled();if(!a){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(t);var n=t.hitStrokeWidth(),i=n==="auto"?t.strokeWidth():n;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),a||this.restore()}}}Na.HitContext=HT;Object.defineProperty(Fi,"__esModule",{value:!0});Fi.HitCanvas=Fi.SceneCanvas=Fi.Canvas=void 0;const Uh=ir,y9=Na,b9=gt,GT=vt,$T=Ye;var Fd;function VT(){if(Fd)return Fd;var e=Uh.Util.createCanvasElement(),t=e.getContext("2d");return Fd=function(){var r=b9.Konva._global.devicePixelRatio||1,n=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return r/n}(),Uh.Util.releaseCanvas(e),Fd}class Op{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var r=t||{},n=r.pixelRatio||b9.Konva.pixelRatio||VT();this.pixelRatio=n,this._canvas=Uh.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(t){var r=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/r,this.getHeight()/r)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var r=this.pixelRatio,n=this.getContext()._context;n.scale(r,r)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var r=this.pixelRatio,n=this.getContext()._context;n.scale(r,r)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,r){this.setWidth(t||0),this.setHeight(r||0)}toDataURL(t,r){try{return this._canvas.toDataURL(t,r)}catch{try{return this._canvas.toDataURL()}catch(i){return Uh.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}Fi.Canvas=Op;GT.Factory.addGetterSetter(Op,"pixelRatio",void 0,(0,$T.getNumberValidator)());class qT extends Op{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new y9.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}Fi.SceneCanvas=qT;class WT extends Op{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new y9.HitContext(this),this.setSize(t.width,t.height)}}Fi.HitCanvas=WT;var xp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const t=gt,r=ir;e.DD={get isDragging(){var n=!1;return e.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){var n;return e.DD._dragElements.forEach(i=>{n=i.node}),n},_dragElements:new Map,_drag(n){const i=[];e.DD._dragElements.forEach((a,o)=>{const{node:l}=a,u=l.getStage();u.setPointersPositions(n),a.pointerId===void 0&&(a.pointerId=r.Util._getFirstPointerId(n));const f=u._changedPointerPositions.find(_=>_.id===a.pointerId);if(f){if(a.dragStatus!=="dragging"){var v=l.dragDistance(),w=Math.max(Math.abs(f.x-a.startPointerPos.x),Math.abs(f.y-a.startPointerPos.y));if(w<v||(l.startDrag({evt:n}),!l.isDragging()))return}l._setDragPosition(n,a),i.push(l)}}),i.forEach(a=>{a.fire("dragmove",{type:"dragmove",target:a,evt:n},!0)})},_endDragBefore(n){const i=[];e.DD._dragElements.forEach(a=>{const{node:o}=a,l=o.getStage();if(n&&l.setPointersPositions(n),!l._changedPointerPositions.find(v=>v.id===a.pointerId))return;(a.dragStatus==="dragging"||a.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,a.dragStatus="stopped");const f=a.node.getLayer()||a.node instanceof t.Konva.Stage&&a.node;f&&i.indexOf(f)===-1&&i.push(f)}),i.forEach(a=>{a.draw()})},_endDragAfter(n){e.DD._dragElements.forEach((i,a)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:n},!0),i.dragStatus!=="dragging"&&e.DD._dragElements.delete(a)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",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))})(xp);Object.defineProperty(Qt,"__esModule",{value:!0});Qt.Node=void 0;const wt=ir,mf=vt,ac=Fi,co=gt,oi=xp,gr=Ye;var ih="absoluteOpacity",jd="allEventListeners",Pa="absoluteTransform",U5="absoluteScale",ll="canvas",YT="Change",KT="children",XT="konva",Em="listening",H5="mouseenter",G5="mouseleave",$5="set",V5="Shape",ah=" ",q5="stage",fo="transform",ZT="Stage",Om="visible",QT=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(ah);let JT=1,ct=class xm{constructor(t){this._id=JT++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===fo||t===Pa)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,r){var n=this._cache.get(t),i=t===fo||t===Pa,a=n===void 0||i&&n.dirty===!0;return a&&(n=r.call(this),this._cache.set(t,n)),n}_calculate(t,r,n){if(!this._attachedDepsListeners.get(t)){const i=r.map(a=>a+"Change.konva").join(ah);this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(ll)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===Pa&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(ll)){const{scene:t,filter:r,hit:n}=this._cache.get(ll);wt.Util.releaseCanvas(t,r,n),this._cache.delete(ll)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var r=t||{},n={};(r.x===void 0||r.y===void 0||r.width===void 0||r.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(r.width||n.width),a=Math.ceil(r.height||n.height),o=r.pixelRatio,l=r.x===void 0?Math.floor(n.x):r.x,u=r.y===void 0?Math.floor(n.y):r.y,f=r.offset||0,v=r.drawBorder||!1,w=r.hitCanvasPixelRatio||1;if(!i||!a){wt.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const _=Math.abs(Math.round(n.x)-l)>.5?1:0,h=Math.abs(Math.round(n.y)-u)>.5?1:0;i+=f*2+_,a+=f*2+h,l-=f,u-=f;var E=new ac.SceneCanvas({pixelRatio:o,width:i,height:a}),m=new ac.SceneCanvas({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),y=new ac.HitCanvas({pixelRatio:w,width:i,height:a}),p=E.getContext(),g=y.getContext();return y.isCache=!0,E.isCache=!0,this._cache.delete(ll),this._filterUpToDate=!1,r.imageSmoothingEnabled===!1&&(E.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),p.save(),g.save(),p.translate(-l,-u),g.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(ih),this._clearSelfAndDescendantCache(U5),this.drawScene(E,this),this.drawHit(y,this),this._isUnderCache=!1,p.restore(),g.restore(),v&&(p.save(),p.beginPath(),p.rect(0,0,i,a),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(ll,{scene:E,filter:m,hit:y,x:l,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(ll)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,r){var n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],i=1/0,a=1/0,o=-1/0,l=-1/0,u=this.getAbsoluteTransform(r);return n.forEach(function(f){var v=u.point(f);i===void 0&&(i=o=v.x,a=l=v.y),i=Math.min(i,v.x),a=Math.min(a,v.y),o=Math.max(o,v.x),l=Math.max(l,v.y)}),{x:i,y:a,width:o-i,height:l-a}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const r=this._getCanvasCache();t.translate(r.x,r.y);var n=this._getCachedSceneCanvas(),i=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/i,n.height/i),t.restore()}_drawCachedHitCanvas(t){var r=this._getCanvasCache(),n=r.hit;t.save(),t.translate(r.x,r.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t=this.filters(),r=this._getCanvasCache(),n=r.scene,i=r.filter,a=i.getContext(),o,l,u,f;if(t){if(!this._filterUpToDate){var v=n.pixelRatio;i.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(o=t.length,a.clear(),a.drawImage(n._canvas,0,0,n.getWidth()/v,n.getHeight()/v),l=a.getImageData(0,0,i.getWidth(),i.getHeight()),u=0;u<o;u++){if(f=t[u],typeof f!="function"){wt.Util.error("Filter should be type of function, but got "+typeof f+" instead. Please check correct filters");continue}f.call(this,l),a.putImageData(l,0,0)}}catch(w){wt.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 i}return n}on(t,r){if(this._cache&&this._cache.delete(jd),arguments.length===3)return this._delegate.apply(this,arguments);var n=t.split(ah),i=n.length,a,o,l,u,f;for(a=0;a<i;a++)o=n[a],l=o.split("."),u=l[0],f=l[1]||"",this.eventListeners[u]||(this.eventListeners[u]=[]),this.eventListeners[u].push({name:f,handler:r});return this}off(t,r){var n=(t||"").split(ah),i=n.length,a,o,l,u,f,v;if(this._cache&&this._cache.delete(jd),!t)for(o in this.eventListeners)this._off(o);for(a=0;a<i;a++)if(l=n[a],u=l.split("."),f=u[0],v=u[1],f)this.eventListeners[f]&&this._off(f,v,r);else for(o in this.eventListeners)this._off(o,v,r);return this}dispatchEvent(t){var r={target:this,type:t.type,evt:t};return this.fire(t.type,r),this}addEventListener(t,r){return this.on(t,function(n){r.call(this,n.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,r,n){var i=this;this.on(t,function(a){for(var o=a.target.findAncestors(r,!0,i),l=0;l<o.length;l++)a=wt.Util.cloneObject(a),a.currentTarget=o[l],n.call(o[l],a)})}remove(){return this.isDragging()&&this.stopDrag(),oi.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(Pa),this._clearSelfAndDescendantCache(ih),this._clearSelfAndDescendantCache(U5),this._clearSelfAndDescendantCache(q5),this._clearSelfAndDescendantCache(Om),this._clearSelfAndDescendantCache(Em)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){var r="get"+wt.Util._capitalize(t);return wt.Util._isFunction(this[r])?this[r]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),r=[];t;)r.push(t),t=t.getParent();return r}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{var r,n;if(!t)return this;for(r in t)r!==KT&&(n=$5+wt.Util._capitalize(r),wt.Util._isFunction(this[n])?this[n](t[r]):this._setAttr(r,t[r]))}),this}isListening(){return this._getCache(Em,this._isListening)}_isListening(t){if(!this.listening())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isListening(t):!0}isVisible(){return this._getCache(Om,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const n=this.getParent();return n&&n!==t&&this!==t?n._isVisible(t):!0}shouldDrawHit(t,r=!1){if(t)return this._isVisible(t)&&this._isListening(t);var n=this.getLayer(),i=!1;oi.DD._dragElements.forEach(o=>{o.dragStatus==="dragging"&&(o.node.nodeType==="Stage"||o.node.getLayer()===n)&&(i=!0)});var a=!r&&!co.Konva.hitOnDragEnabled&&(i||co.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t=this.getDepth(),r=this,n=0,i,a,o,l;function u(v){for(i=[],a=v.length,o=0;o<a;o++)l=v[o],n++,l.nodeType!==V5&&(i=i.concat(l.getChildren().slice())),l._id===r._id&&(o=a);i.length>0&&i[0].getDepth()<=t&&u(i)}const f=this.getStage();return r.nodeType!==ZT&&f&&u(f.getChildren()),n}getDepth(){for(var t=0,r=this.parent;r;)t++,r=r.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(fo),this._clearSelfAndDescendantCache(Pa)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;var r=t.getPointerPosition();if(!r)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(r)}getAbsolutePosition(t){let r=!1,n=this.parent;for(;n;){if(n.isCached()){r=!0;break}n=n.parent}r&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),a=new wt.Transform,o=this.offset();return a.m=i.slice(),a.translate(o.x,o.y),a.getTranslation()}setAbsolutePosition(t){const{x:r,y:n,...i}=this._clearTransform();this.attrs.x=r,this.attrs.y=n,this._clearCache(fo);var a=this._getAbsoluteTransform().copy();return a.invert(),a.translate(t.x,t.y),t={x:this.attrs.x+a.getTranslation().x,y:this.attrs.y+a.getTranslation().y},this._setTransform(i),this.setPosition({x:t.x,y:t.y}),this._clearCache(fo),this._clearSelfAndDescendantCache(Pa),this}_setTransform(t){var r;for(r in t)this.attrs[r]=t[r]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var r=t.x,n=t.y,i=this.x(),a=this.y();return r!==void 0&&(i+=r),n!==void 0&&(a+=n),this.setPosition({x:i,y:a}),this}_eachAncestorReverse(t,r){var n=[],i=this.getParent(),a,o;if(!(r&&r._id===this._id)){for(n.unshift(this);i&&(!r||i._id!==r._id);)n.unshift(i),i=i.parent;for(a=n.length,o=0;o<a;o++)t(n[o])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return wt.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,r=this.parent.getChildren().length;return t<r-1?(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return wt.Util.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,r=this.parent.getChildren().length;return t<r-1?(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return wt.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return wt.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0?(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(t){if(!this.parent)return wt.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&wt.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var r=this.index;return this.parent.children.splice(r,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(ih,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),r=this.getParent();return r&&!r._isUnderCache&&(t*=r.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t=this.getAttrs(),r,n,i,a,o;const l={attrs:{},className:this.getClassName()};for(r in t)n=t[r],o=wt.Util.isObject(n)&&!wt.Util._isPlainObject(n)&&!wt.Util._isArray(n),!o&&(i=typeof this[r]=="function"&&this[r],delete t[r],a=i?i.call(this):null,t[r]=n,a!==n&&(l.attrs[r]=n));return wt.Util._prepareToStringify(l)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,r,n){var i=[];r&&this._isMatch(t)&&i.push(this);for(var a=this.parent;a;){if(a===n)return i;a._isMatch(t)&&i.push(a),a=a.parent}return i}isAncestorOf(t){return!1}findAncestor(t,r,n){return this.findAncestors(t,r,n)[0]}_isMatch(t){if(!t)return!1;if(typeof t=="function")return t(this);var r=t.replace(/ /g,"").split(","),n=r.length,i,a;for(i=0;i<n;i++)if(a=r[i],wt.Util.isValidSelector(a)||(wt.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),wt.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),wt.Util.warn("Konva is awesome, right?")),a.charAt(0)==="#"){if(this.id()===a.slice(1))return!0}else if(a.charAt(0)==="."){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(q5,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():null}fire(t,r={},n){return r.target=r.target||this,n?this._fireAndBubble(t,r):this._fire(t,r),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(Pa,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var r;if(t)return r=new wt.Transform,this._eachAncestorReverse(function(i){var a=i.transformsEnabled();a==="all"?r.multiply(i.getTransform()):a==="position"&&r.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},t),r;r=this._cache.get(Pa)||new wt.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(r):r.reset();var n=this.transformsEnabled();if(n==="all")r.multiply(this.getTransform());else if(n==="position"){const i=this.attrs.x||0,a=this.attrs.y||0,o=this.attrs.offsetX||0,l=this.attrs.offsetY||0;r.translate(i-o,a-l)}return r.dirty=!1,r}getAbsoluteScale(t){for(var r=this;r;)r._isUnderCache&&(t=r),r=r.getParent();const i=this.getAbsoluteTransform(t).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(fo,this._getTransform)}_getTransform(){var t,r,n=this._cache.get(fo)||new wt.Transform;n.reset();var i=this.x(),a=this.y(),o=co.Konva.getAngle(this.rotation()),l=(t=this.attrs.scaleX)!==null&&t!==void 0?t:1,u=(r=this.attrs.scaleY)!==null&&r!==void 0?r:1,f=this.attrs.skewX||0,v=this.attrs.skewY||0,w=this.attrs.offsetX||0,_=this.attrs.offsetY||0;return(i!==0||a!==0)&&n.translate(i,a),o!==0&&n.rotate(o),(f!==0||v!==0)&&n.skew(f,v),(l!==1||u!==1)&&n.scale(l,u),(w!==0||_!==0)&&n.translate(-1*w,-1*_),n.dirty=!1,n}clone(t){var r=wt.Util.cloneObject(this.attrs),n,i,a,o,l;for(n in t)r[n]=t[n];var u=new this.constructor(r);for(n in this.eventListeners)for(i=this.eventListeners[n],a=i.length,o=0;o<a;o++)l=i[o],l.name.indexOf(XT)<0&&(u.eventListeners[n]||(u.eventListeners[n]=[]),u.eventListeners[n].push(l));return u}_toKonvaCanvas(t){t=t||{};var r=this.getClientRect(),n=this.getStage(),i=t.x!==void 0?t.x:Math.floor(r.x),a=t.y!==void 0?t.y:Math.floor(r.y),o=t.pixelRatio||1,l=new ac.SceneCanvas({width:t.width||Math.ceil(r.width)||(n?n.width():0),height:t.height||Math.ceil(r.height)||(n?n.height():0),pixelRatio:o}),u=l.getContext();const f=new ac.SceneCanvas({width:l.width/l.pixelRatio+Math.abs(i),height:l.height/l.pixelRatio+Math.abs(a),pixelRatio:l.pixelRatio});return t.imageSmoothingEnabled===!1&&(u._context.imageSmoothingEnabled=!1),u.save(),(i||a)&&u.translate(-1*i,-1*a),this.drawScene(l,void 0,f),u.restore(),l}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var r=t.mimeType||null,n=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(r,n);return t.callback&&t.callback(i),i}toImage(t){return new Promise((r,n)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,wt.Util._urlToImage(this.toDataURL(t),function(a){r(a),i==null||i(a)})}catch(i){n(i)}})}toBlob(t){return new Promise((r,n)=>{try{const i=t==null?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(a=>{r(a),i==null||i(a)},t==null?void 0:t.mimeType,t==null?void 0:t.quality)}catch(i){n(i)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():co.Konva.dragDistance}_off(t,r,n){var i=this.eventListeners[t],a,o,l;for(a=0;a<i.length;a++)if(o=i[a].name,l=i[a].handler,(o!=="konva"||r==="konva")&&(!r||o===r)&&(!n||n===l)){if(i.splice(a,1),i.length===0){delete this.eventListeners[t];break}a--}}_fireChangeEvent(t,r,n){this._fire(t+YT,{oldVal:r,newVal:n})}addName(t){if(!this.hasName(t)){var r=this.name(),n=r?r+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const r=this.name();if(!r)return!1;var n=(r||"").split(/\s/g);return n.indexOf(t)!==-1}removeName(t){var r=(this.name()||"").split(/\s/g),n=r.indexOf(t);return n!==-1&&(r.splice(n,1),this.name(r.join(" "))),this}setAttr(t,r){var n=this[$5+wt.Util._capitalize(t)];return wt.Util._isFunction(n)?n.call(this,r):this._setAttr(t,r),this}_requestDraw(){if(co.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();t==null||t.batchDraw()}}_setAttr(t,r){var n=this.attrs[t];n===r&&!wt.Util.isObject(r)||(r==null?delete this.attrs[t]:this.attrs[t]=r,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,r),this._requestDraw())}_setComponentAttr(t,r,n){var i;n!==void 0&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][r]=n,this._fireChangeEvent(t,i,n))}_fireAndBubble(t,r,n){r&&this.nodeType===V5&&(r.target=this);var i=(t===H5||t===G5)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType==="Stage"&&!n);if(!i){this._fire(t,r);var a=(t===H5||t===G5)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(r&&!r.cancelBubble||!r)&&this.parent&&this.parent.isListening()&&!a&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,r,n):this._fireAndBubble.call(this.parent,t,r))}}_getProtoListeners(t){var r,n,i;const a=(r=this._cache.get(jd))!==null&&r!==void 0?r:{};let o=a==null?void 0:a[t];if(o===void 0){o=[];let l=Object.getPrototypeOf(this);for(;l;){const u=(i=(n=l.eventListeners)===null||n===void 0?void 0:n[t])!==null&&i!==void 0?i:[];o.push(...u),l=Object.getPrototypeOf(l)}a[t]=o,this._cache.set(jd,a)}return o}_fire(t,r){r=r||{},r.currentTarget=this,r.type=t;const n=this._getProtoListeners(t);if(n)for(var i=0;i<n.length;i++)n[i].handler.call(this,r);const a=this.eventListeners[t];if(a)for(var i=0;i<a.length;i++)a[i].handler.call(this,r)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var r=t?t.pointerId:void 0,n=this.getStage(),i=this.getAbsolutePosition();if(n){var a=n._getPointerById(r)||n._changedPointerPositions[0]||i;oi.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-i.x,y:a.y-i.y},dragStatus:"ready",pointerId:r})}}startDrag(t,r=!0){oi.DD._dragElements.has(this._id)||this._createDragElement(t);const n=oi.DD._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},r)}_setDragPosition(t,r){const n=this.getStage()._getPointerById(r.pointerId);if(n){var i={x:n.x-r.offset.x,y:n.y-r.offset.y},a=this.dragBoundFunc();if(a!==void 0){const o=a.call(this,i,t);o?i=o:wt.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!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const r=oi.DD._dragElements.get(this._id);r&&(r.dragStatus="stopped"),oi.DD._endDragBefore(t),oi.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=oi.DD._dragElements.get(this._id);return t?t.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){var r=t.evt.button!==void 0,n=!r||co.Konva.dragButtons.indexOf(t.evt.button)>=0;if(n&&!this.isDragging()){var i=!1;oi.DD._dragElements.forEach(a=>{this.isAncestorOf(a.node)&&(i=!0)}),i||this._createDragElement(t)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const r=oi.DD._dragElements.get(this._id),n=r&&r.dragStatus==="dragging",i=r&&r.dragStatus==="ready";n?this.stopDrag():i&&oi.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const r=this.getStage();if(!r)return!1;const n={x:-t.x,y:-t.y,width:r.width()+2*t.x,height:r.height()+2*t.y};return wt.Util.haveIntersection(n,this.getClientRect())}static create(t,r){return wt.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,r)}static _createNode(t,r){var n=xm.prototype.getClassName.call(t),i=t.children,a,o,l;r&&(t.attrs.container=r),co.Konva[n]||(wt.Util.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape");const u=co.Konva[n];if(a=new u(t.attrs),i)for(o=i.length,l=0;l<o;l++)a.add(xm._createNode(i[l]));return a}};Qt.Node=ct;ct.prototype.nodeType="Node";ct.prototype._attrsAffectingSize=[];ct.prototype.eventListeners={};ct.prototype.on.call(ct.prototype,QT,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(fo),this._clearSelfAndDescendantCache(Pa)});ct.prototype.on.call(ct.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Om)});ct.prototype.on.call(ct.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(Em)});ct.prototype.on.call(ct.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(ih)});const zt=mf.Factory.addGetterSetter;zt(ct,"zIndex");zt(ct,"absolutePosition");zt(ct,"position");zt(ct,"x",0,(0,gr.getNumberValidator)());zt(ct,"y",0,(0,gr.getNumberValidator)());zt(ct,"globalCompositeOperation","source-over",(0,gr.getStringValidator)());zt(ct,"opacity",1,(0,gr.getNumberValidator)());zt(ct,"name","",(0,gr.getStringValidator)());zt(ct,"id","",(0,gr.getStringValidator)());zt(ct,"rotation",0,(0,gr.getNumberValidator)());mf.Factory.addComponentsGetterSetter(ct,"scale",["x","y"]);zt(ct,"scaleX",1,(0,gr.getNumberValidator)());zt(ct,"scaleY",1,(0,gr.getNumberValidator)());mf.Factory.addComponentsGetterSetter(ct,"skew",["x","y"]);zt(ct,"skewX",0,(0,gr.getNumberValidator)());zt(ct,"skewY",0,(0,gr.getNumberValidator)());mf.Factory.addComponentsGetterSetter(ct,"offset",["x","y"]);zt(ct,"offsetX",0,(0,gr.getNumberValidator)());zt(ct,"offsetY",0,(0,gr.getNumberValidator)());zt(ct,"dragDistance",null,(0,gr.getNumberValidator)());zt(ct,"width",0,(0,gr.getNumberValidator)());zt(ct,"height",0,(0,gr.getNumberValidator)());zt(ct,"listening",!0,(0,gr.getBooleanValidator)());zt(ct,"preventDefault",!0,(0,gr.getBooleanValidator)());zt(ct,"filters",null,function(e){return this._filterUpToDate=!1,e});zt(ct,"visible",!0,(0,gr.getBooleanValidator)());zt(ct,"transformsEnabled","all",(0,gr.getStringValidator)());zt(ct,"size");zt(ct,"dragBoundFunc");zt(ct,"draggable",!1,(0,gr.getBooleanValidator)());mf.Factory.backCompat(ct,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var Dl={};Object.defineProperty(Dl,"__esModule",{value:!0});Dl.Container=void 0;const bu=vt,sg=Qt,Pp=Ye;class Fl extends sg.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const r=this.children||[];var n=[];return r.forEach(function(i){t(i)&&n.push(i)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(t.length===0)return this;if(t.length>1){for(var r=0;r<t.length;r++)this.add(t[r]);return this}const n=t[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var r=this._generalFind(t,!0);return r.length>0?r[0]:void 0}_generalFind(t,r){var n=[];return this._descendants(i=>{const a=i._isMatch(t);return a&&n.push(i),!!(a&&r)}),n}_descendants(t){let r=!1;const n=this.getChildren();for(const i of n){if(r=t(i),r)return!0;if(i.hasChildren()&&(r=i._descendants(t),r))return!0}return!1}toObject(){var t=sg.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(r=>{t.children.push(r.toObject())}),t}isAncestorOf(t){for(var r=t.getParent();r;){if(r._id===this._id)return!0;r=r.getParent()}return!1}clone(t){var r=sg.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(n){r.add(n.clone())}),r}getAllIntersections(t){var r=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(t)&&r.push(n)}),r}_clearSelfAndDescendantCache(t){var r;super._clearSelfAndDescendantCache(t),!this.isCached()&&((r=this.children)===null||r===void 0||r.forEach(function(n){n._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;(t=this.children)===null||t===void 0||t.forEach(function(r,n){r.index=n}),this._requestDraw()}drawScene(t,r,n){var i=this.getLayer(),a=t||i&&i.getCanvas(),o=a&&a.getContext(),l=this._getCanvasCache(),u=l&&l.scene,f=a&&a.isCache;if(!this.isVisible()&&!f)return this;if(u){o.save();var v=this.getAbsoluteTransform(r).getMatrix();o.transform(v[0],v[1],v[2],v[3],v[4],v[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",a,r,n);return this}drawHit(t,r){if(!this.shouldDrawHit(r))return this;var n=this.getLayer(),i=t||n&&n.hitCanvas,a=i&&i.getContext(),o=this._getCanvasCache(),l=o&&o.hit;if(l){a.save();var u=this.getAbsoluteTransform(r).getMatrix();a.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(a),a.restore()}else this._drawChildren("drawHit",i,r);return this}_drawChildren(t,r,n,i){var a,o=r&&r.getContext(),l=this.clipWidth(),u=this.clipHeight(),f=this.clipFunc(),v=typeof l=="number"&&typeof u=="number"||f;const w=n===this;if(v){o.save();var _=this.getAbsoluteTransform(n),h=_.getMatrix();o.transform(h[0],h[1],h[2],h[3],h[4],h[5]),o.beginPath();let p;if(f)p=f.call(this,o,this);else{var E=this.clipX(),m=this.clipY();o.rect(E||0,m||0,l,u)}o.clip.apply(o,p),h=_.copy().invert().getMatrix(),o.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var y=!w&&this.globalCompositeOperation()!=="source-over"&&t==="drawScene";y&&(o.save(),o._applyGlobalCompositeOperation(this)),(a=this.children)===null||a===void 0||a.forEach(function(p){p[t](r,n,i)}),y&&o.restore(),v&&o.restore()}getClientRect(t={}){var r,n=t.skipTransform,i=t.relativeTo,a,o,l,u,f={x:1/0,y:1/0,width:0,height:0},v=this;(r=this.children)===null||r===void 0||r.forEach(function(m){if(m.visible()){var y=m.getClientRect({relativeTo:v,skipShadow:t.skipShadow,skipStroke:t.skipStroke});y.width===0&&y.height===0||(a===void 0?(a=y.x,o=y.y,l=y.x+y.width,u=y.y+y.height):(a=Math.min(a,y.x),o=Math.min(o,y.y),l=Math.max(l,y.x+y.width),u=Math.max(u,y.y+y.height)))}});for(var w=this.find("Shape"),_=!1,h=0;h<w.length;h++){var E=w[h];if(E._isVisible(this)){_=!0;break}}return _&&a!==void 0?f={x:a,y:o,width:l-a,height:u-o}:f={x:0,y:0,width:0,height:0},n?f:this._transformedRect(f,i)}}Dl.Container=Fl;bu.Factory.addComponentsGetterSetter(Fl,"clip",["x","y","width","height"]);bu.Factory.addGetterSetter(Fl,"clipX",void 0,(0,Pp.getNumberValidator)());bu.Factory.addGetterSetter(Fl,"clipY",void 0,(0,Pp.getNumberValidator)());bu.Factory.addGetterSetter(Fl,"clipWidth",void 0,(0,Pp.getNumberValidator)());bu.Factory.addGetterSetter(Fl,"clipHeight",void 0,(0,Pp.getNumberValidator)());bu.Factory.addGetterSetter(Fl,"clipFunc");var _9={},Un={};Object.defineProperty(Un,"__esModule",{value:!0});Un.releaseCapture=Un.setPointerCapture=Un.hasPointerCapture=Un.createEvent=Un.getCapturedShape=void 0;const eA=gt,Yc=new Map,w9=eA.Konva._global.PointerEvent!==void 0;function tA(e){return Yc.get(e)}Un.getCapturedShape=tA;function e2(e){return{evt:e,pointerId:e.pointerId}}Un.createEvent=e2;function rA(e,t){return Yc.get(e)===t}Un.hasPointerCapture=rA;function nA(e,t){S9(e),t.getStage()&&(Yc.set(e,t),w9&&t._fire("gotpointercapture",e2(new PointerEvent("gotpointercapture"))))}Un.setPointerCapture=nA;function S9(e,t){const r=Yc.get(e);if(!r)return;const n=r.getStage();n&&n.content,Yc.delete(e),w9&&r._fire("lostpointercapture",e2(new PointerEvent("lostpointercapture")))}Un.releaseCapture=S9;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const t=ir,r=vt,n=Dl,i=gt,a=Fi,o=xp,l=gt,u=Un;var f="Stage",v="string",w="px",_="mouseout",h="mouseleave",E="mouseover",m="mouseenter",y="mousemove",p="mousedown",g="mouseup",d="pointermove",b="pointerdown",O="pointerup",k="pointercancel",C="lostpointercapture",S="pointerout",x="pointerleave",P="pointerover",T="pointerenter",L="contextmenu",M="touchstart",U="touchend",$="touchmove",Z="touchcancel",B="wheel",N=5,H=[[m,"_pointerenter"],[p,"_pointerdown"],[y,"_pointermove"],[g,"_pointerup"],[h,"_pointerleave"],[M,"_pointerdown"],[$,"_pointermove"],[U,"_pointerup"],[Z,"_pointercancel"],[E,"_pointerover"],[B,"_wheel"],[L,"_contextmenu"],[b,"_pointerdown"],[d,"_pointermove"],[O,"_pointerup"],[k,"_pointercancel"],[C,"_lostpointercapture"]];const R={mouse:{[S]:_,[x]:h,[P]:E,[T]:m,[d]:y,[b]:p,[O]:g,[k]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[S]:"touchout",[x]:"touchleave",[P]:"touchover",[T]:"touchenter",[d]:$,[b]:M,[O]:U,[k]:Z,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[S]:S,[x]:x,[P]:P,[T]:T,[d]:d,[b]:b,[O]:O,[k]:k,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},D=q=>q.indexOf("pointer")>=0?"pointer":q.indexOf("touch")>=0?"touch":"mouse",z=q=>{const G=D(q);if(G==="pointer")return i.Konva.pointerEventsEnabled&&R.pointer;if(G==="touch")return R.touch;if(G==="mouse")return R.mouse};function F(q={}){return(q.clipFunc||q.clipWidth||q.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),q}const V="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 Y extends n.Container{constructor(G){super(F(G)),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",()=>{F(this.attrs)}),this._checkVisibility()}_validateAdd(G){const K=G.getType()==="Layer",X=G.getType()==="FastLayer";K||X||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const G=this.visible()?"":"none";this.content.style.display=G}setContainer(G){if(typeof G===v){if(G.charAt(0)==="."){var K=G.slice(1);G=document.getElementsByClassName(K)[0]}else{var X;G.charAt(0)!=="#"?X=G:X=G.slice(1),G=document.getElementById(X)}if(!G)throw"Can not find container in document with id "+X}return this._setAttr("container",G),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),G.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var G=this.children,K=G.length,X;for(X=0;X<K;X++)G[X].clear();return this}clone(G){return G||(G={}),G.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,G)}destroy(){super.destroy();var G=this.content;G&&t.Util._isInDocument(G)&&this.container().removeChild(G);var K=e.stages.indexOf(this);return K>-1&&e.stages.splice(K,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const G=this._pointerPositions[0]||this._changedPointerPositions[0];return G?{x:G.x,y:G.y}:(t.Util.warn(V),null)}_getPointerById(G){return this._pointerPositions.find(K=>K.id===G)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(G){G=G||{},G.x=G.x||0,G.y=G.y||0,G.width=G.width||this.width(),G.height=G.height||this.height();var K=new a.SceneCanvas({width:G.width,height:G.height,pixelRatio:G.pixelRatio||1}),X=K.getContext()._context,Q=this.children;return(G.x||G.y)&&X.translate(-1*G.x,-1*G.y),Q.forEach(function(te){if(te.isVisible()){var ee=te._toKonvaCanvas(G);X.drawImage(ee._canvas,G.x,G.y,ee.getWidth()/ee.getPixelRatio(),ee.getHeight()/ee.getPixelRatio())}}),K}getIntersection(G){if(!G)return null;var K=this.children,X=K.length,Q=X-1,te;for(te=Q;te>=0;te--){const ee=K[te].getIntersection(G);if(ee)return ee}return null}_resizeDOM(){var G=this.width(),K=this.height();this.content&&(this.content.style.width=G+w,this.content.style.height=K+w),this.bufferCanvas.setSize(G,K),this.bufferHitCanvas.setSize(G,K),this.children.forEach(X=>{X.setSize({width:G,height:K}),X.draw()})}add(G,...K){if(arguments.length>1){for(var X=0;X<arguments.length;X++)this.add(arguments[X]);return this}super.add(G);var Q=this.children.length;return Q>N&&t.Util.warn("The stage has "+Q+" 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."),G.setSize({width:this.width(),height:this.height()}),G.draw(),i.Konva.isBrowser&&this.content.appendChild(G.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(G){return u.hasPointerCapture(G,this)}setPointerCapture(G){u.setPointerCapture(G,this)}releaseCapture(G){u.releaseCapture(G,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&H.forEach(([G,K])=>{this.content.addEventListener(G,X=>{this[K](X)},{passive:!1})})}_pointerenter(G){this.setPointersPositions(G);const K=z(G.type);K&&this._fire(K.pointerenter,{evt:G,target:this,currentTarget:this})}_pointerover(G){this.setPointersPositions(G);const K=z(G.type);K&&this._fire(K.pointerover,{evt:G,target:this,currentTarget:this})}_getTargetShape(G){let K=this[G+"targetShape"];return K&&!K.getStage()&&(K=null),K}_pointerleave(G){const K=z(G.type),X=D(G.type);if(K){this.setPointersPositions(G);var Q=this._getTargetShape(X),te=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;Q&&te?(Q._fireAndBubble(K.pointerout,{evt:G}),Q._fireAndBubble(K.pointerleave,{evt:G}),this._fire(K.pointerleave,{evt:G,target:this,currentTarget:this}),this[X+"targetShape"]=null):te&&(this._fire(K.pointerleave,{evt:G,target:this,currentTarget:this}),this._fire(K.pointerout,{evt:G,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(G){const K=z(G.type),X=D(G.type);if(K){this.setPointersPositions(G);var Q=!1;this._changedPointerPositions.forEach(te=>{var ee=this.getIntersection(te);if(o.DD.justDragged=!1,i.Konva["_"+X+"ListenClick"]=!0,!ee||!ee.isListening()){this[X+"ClickStartShape"]=void 0;return}i.Konva.capturePointerEventsEnabled&&ee.setPointerCapture(te.id),this[X+"ClickStartShape"]=ee,ee._fireAndBubble(K.pointerdown,{evt:G,pointerId:te.id}),Q=!0;const ae=G.type.indexOf("touch")>=0;ee.preventDefault()&&G.cancelable&&ae&&G.preventDefault()}),Q||this._fire(K.pointerdown,{evt:G,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(G){const K=z(G.type),X=D(G.type);if(!K)return;i.Konva.isDragging()&&o.DD.node.preventDefault()&&G.cancelable&&G.preventDefault(),this.setPointersPositions(G);var Q=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;if(!Q)return;var te={};let ee=!1;var ae=this._getTargetShape(X);this._changedPointerPositions.forEach(oe=>{const le=u.getCapturedShape(oe.id)||this.getIntersection(oe),Te=oe.id,Fe={evt:G,pointerId:Te};var fe=ae!==le;if(fe&&ae&&(ae._fireAndBubble(K.pointerout,{...Fe},le),ae._fireAndBubble(K.pointerleave,{...Fe},le)),le){if(te[le._id])return;te[le._id]=!0}le&&le.isListening()?(ee=!0,fe&&(le._fireAndBubble(K.pointerover,{...Fe},ae),le._fireAndBubble(K.pointerenter,{...Fe},ae),this[X+"targetShape"]=le),le._fireAndBubble(K.pointermove,{...Fe})):ae&&(this._fire(K.pointerover,{evt:G,target:this,currentTarget:this,pointerId:Te}),this[X+"targetShape"]=null)}),ee||this._fire(K.pointermove,{evt:G,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(G){const K=z(G.type),X=D(G.type);if(!K)return;this.setPointersPositions(G);const Q=this[X+"ClickStartShape"],te=this[X+"ClickEndShape"];var ee={};let ae=!1;this._changedPointerPositions.forEach(oe=>{const le=u.getCapturedShape(oe.id)||this.getIntersection(oe);if(le){if(le.releaseCapture(oe.id),ee[le._id])return;ee[le._id]=!0}const Te=oe.id,Fe={evt:G,pointerId:Te};let fe=!1;i.Konva["_"+X+"InDblClickWindow"]?(fe=!0,clearTimeout(this[X+"DblTimeout"])):o.DD.justDragged||(i.Konva["_"+X+"InDblClickWindow"]=!0,clearTimeout(this[X+"DblTimeout"])),this[X+"DblTimeout"]=setTimeout(function(){i.Konva["_"+X+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),le&&le.isListening()?(ae=!0,this[X+"ClickEndShape"]=le,le._fireAndBubble(K.pointerup,{...Fe}),i.Konva["_"+X+"ListenClick"]&&Q&&Q===le&&(le._fireAndBubble(K.pointerclick,{...Fe}),fe&&te&&te===le&&le._fireAndBubble(K.pointerdblclick,{...Fe}))):(this[X+"ClickEndShape"]=null,i.Konva["_"+X+"ListenClick"]&&this._fire(K.pointerclick,{evt:G,target:this,currentTarget:this,pointerId:Te}),fe&&this._fire(K.pointerdblclick,{evt:G,target:this,currentTarget:this,pointerId:Te}))}),ae||this._fire(K.pointerup,{evt:G,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+X+"ListenClick"]=!1,G.cancelable&&X!=="touch"&&G.preventDefault()}_contextmenu(G){this.setPointersPositions(G);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(L,{evt:G}):this._fire(L,{evt:G,target:this,currentTarget:this})}_wheel(G){this.setPointersPositions(G);var K=this.getIntersection(this.getPointerPosition());K&&K.isListening()?K._fireAndBubble(B,{evt:G}):this._fire(B,{evt:G,target:this,currentTarget:this})}_pointercancel(G){this.setPointersPositions(G);const K=u.getCapturedShape(G.pointerId)||this.getIntersection(this.getPointerPosition());K&&K._fireAndBubble(O,u.createEvent(G)),u.releaseCapture(G.pointerId)}_lostpointercapture(G){u.releaseCapture(G.pointerId)}setPointersPositions(G){var K=this._getContentPosition(),X=null,Q=null;G=G||window.event,G.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(G.touches,te=>{this._pointerPositions.push({id:te.identifier,x:(te.clientX-K.left)/K.scaleX,y:(te.clientY-K.top)/K.scaleY})}),Array.prototype.forEach.call(G.changedTouches||G.touches,te=>{this._changedPointerPositions.push({id:te.identifier,x:(te.clientX-K.left)/K.scaleX,y:(te.clientY-K.top)/K.scaleY})})):(X=(G.clientX-K.left)/K.scaleX,Q=(G.clientY-K.top)/K.scaleY,this.pointerPos={x:X,y:Q},this._pointerPositions=[{x:X,y:Q,id:t.Util._getFirstPointerId(G)}],this._changedPointerPositions=[{x:X,y:Q,id:t.Util._getFirstPointerId(G)}])}_setPointerPosition(G){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(G)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var G=this.content.getBoundingClientRect();return{top:G.top,left:G.left,scaleX:G.width/this.content.clientWidth||1,scaleY:G.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var G=this.container();if(!G)throw"Stage has no container. A container is required.";G.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"),G.appendChild(this.content),this._resizeDOM()}}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(G){G.batchDraw()}),this}}e.Stage=Y,Y.prototype.nodeType=f,(0,l._registerNode)(Y),r.Factory.addGetterSetter(Y,"container"),i.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(q=>{q.batchDraw()})})})(_9);var yf={},Ar={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=gt,r=ir,n=vt,i=Qt,a=Ye,o=gt,l=Un;var u="hasShadow",f="shadowRGBA",v="patternImage",w="linearGradient",_="radialGradient";let h;function E(){return h||(h=r.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function m(x){const P=this.attrs.fillRule;P?x.fill(P):x.fill()}function y(x){x.stroke()}function p(x){x.fill()}function g(x){x.stroke()}function d(){this._clearCache(u)}function b(){this._clearCache(f)}function O(){this._clearCache(v)}function k(){this._clearCache(w)}function C(){this._clearCache(_)}class S extends i.Node{constructor(P){super(P);let T;for(;T=r.Util.getRandomColor(),!(T&&!(T in e.shapes)););this.colorKey=T,e.shapes[T]=this}getContext(){return r.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return r.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(u,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(v,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var P=E();const T=P.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(T&&T.setTransform){const L=new r.Transform;L.translate(this.fillPatternX(),this.fillPatternY()),L.rotate(t.Konva.getAngle(this.fillPatternRotation())),L.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),L.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const M=L.getMatrix(),U=typeof DOMMatrix>"u"?{a:M[0],b:M[1],c:M[2],d:M[3],e:M[4],f:M[5]}:new DOMMatrix(M);T.setTransform(U)}return T}}_getLinearGradient(){return this._getCache(w,this.__getLinearGradient)}__getLinearGradient(){var P=this.fillLinearGradientColorStops();if(P){for(var T=E(),L=this.fillLinearGradientStartPoint(),M=this.fillLinearGradientEndPoint(),U=T.createLinearGradient(L.x,L.y,M.x,M.y),$=0;$<P.length;$+=2)U.addColorStop(P[$],P[$+1]);return U}}_getRadialGradient(){return this._getCache(_,this.__getRadialGradient)}__getRadialGradient(){var P=this.fillRadialGradientColorStops();if(P){for(var T=E(),L=this.fillRadialGradientStartPoint(),M=this.fillRadialGradientEndPoint(),U=T.createRadialGradient(L.x,L.y,this.fillRadialGradientStartRadius(),M.x,M.y,this.fillRadialGradientEndRadius()),$=0;$<P.length;$+=2)U.addColorStop(P[$],P[$+1]);return U}}getShadowRGBA(){return this._getCache(f,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var P=r.Util.colorToRGBA(this.shadowColor());if(P)return"rgba("+P.r+","+P.g+","+P.b+","+P.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 P=this.hitStrokeWidth();return P==="auto"?this.hasStroke():this.strokeEnabled()&&!!P}intersects(P){var T=this.getStage();if(!T)return!1;const L=T.bufferHitCanvas;return L.getContext().clear(),this.drawHit(L,void 0,!0),L.context.getImageData(Math.round(P.x),Math.round(P.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(P){var T;if(!((T=this.attrs.perfectDrawEnabled)!==null&&T!==void 0?T:!0))return!1;const M=P||this.hasFill(),U=this.hasStroke(),$=this.getAbsoluteOpacity()!==1;if(M&&U&&$)return!0;const Z=this.hasShadow(),B=this.shadowForStrokeEnabled();return!!(M&&U&&Z&&B)}setStrokeHitEnabled(P){r.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),P?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var P=this.size();return{x:this._centroid?-P.width/2:0,y:this._centroid?-P.height/2:0,width:P.width,height:P.height}}getClientRect(P={}){const T=P.skipTransform,L=P.relativeTo,M=this.getSelfRect(),$=!P.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,Z=M.width+$,B=M.height+$,N=!P.skipShadow&&this.hasShadow(),H=N?this.shadowOffsetX():0,R=N?this.shadowOffsetY():0,D=Z+Math.abs(H),z=B+Math.abs(R),F=N&&this.shadowBlur()||0,V=D+F*2,Y=z+F*2,q={width:V,height:Y,x:-($/2+F)+Math.min(H,0)+M.x,y:-($/2+F)+Math.min(R,0)+M.y};return T?q:this._transformedRect(q,L)}drawScene(P,T,L){var M=this.getLayer(),U=P||M.getCanvas(),$=U.getContext(),Z=this._getCanvasCache(),B=this.getSceneFunc(),N=this.hasShadow(),H,R,D=U.isCache,z=T===this;if(!this.isVisible()&&!z)return this;if(Z){$.save();var F=this.getAbsoluteTransform(T).getMatrix();return $.transform(F[0],F[1],F[2],F[3],F[4],F[5]),this._drawCachedSceneCanvas($),$.restore(),this}if(!B)return this;if($.save(),this._useBufferCanvas()&&!D){H=this.getStage();const q=L||H.bufferCanvas;R=q.getContext(),R.clear(),R.save(),R._applyLineJoin(this);var V=this.getAbsoluteTransform(T).getMatrix();R.transform(V[0],V[1],V[2],V[3],V[4],V[5]),B.call(this,R,this),R.restore();var Y=q.pixelRatio;N&&$._applyShadow(this),$._applyOpacity(this),$._applyGlobalCompositeOperation(this),$.drawImage(q._canvas,0,0,q.width/Y,q.height/Y)}else{if($._applyLineJoin(this),!z){var V=this.getAbsoluteTransform(T).getMatrix();$.transform(V[0],V[1],V[2],V[3],V[4],V[5]),$._applyOpacity(this),$._applyGlobalCompositeOperation(this)}N&&$._applyShadow(this),B.call(this,$,this)}return $.restore(),this}drawHit(P,T,L=!1){if(!this.shouldDrawHit(T,L))return this;var M=this.getLayer(),U=P||M.hitCanvas,$=U&&U.getContext(),Z=this.hitFunc()||this.sceneFunc(),B=this._getCanvasCache(),N=B&&B.hit;if(this.colorKey||r.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()"),N){$.save();var H=this.getAbsoluteTransform(T).getMatrix();return $.transform(H[0],H[1],H[2],H[3],H[4],H[5]),this._drawCachedHitCanvas($),$.restore(),this}if(!Z)return this;if($.save(),$._applyLineJoin(this),!(this===T)){var D=this.getAbsoluteTransform(T).getMatrix();$.transform(D[0],D[1],D[2],D[3],D[4],D[5])}return Z.call(this,$,this),$.restore(),this}drawHitFromCache(P=0){var T=this._getCanvasCache(),L=this._getCachedSceneCanvas(),M=T.hit,U=M.getContext(),$=M.getWidth(),Z=M.getHeight(),B,N,H,R,D,z;U.clear(),U.drawImage(L._canvas,0,0,$,Z);try{for(B=U.getImageData(0,0,$,Z),N=B.data,H=N.length,R=r.Util._hexToRgb(this.colorKey),D=0;D<H;D+=4)z=N[D+3],z>P?(N[D]=R.r,N[D+1]=R.g,N[D+2]=R.b,N[D+3]=255):N[D+3]=0;U.putImageData(B,0,0)}catch(F){r.Util.error("Unable to draw hit graph from cached scene canvas. "+F.message)}return this}hasPointerCapture(P){return l.hasPointerCapture(P,this)}setPointerCapture(P){l.setPointerCapture(P,this)}releaseCapture(P){l.releaseCapture(P,this)}}e.Shape=S,S.prototype._fillFunc=m,S.prototype._strokeFunc=y,S.prototype._fillFuncHit=p,S.prototype._strokeFuncHit=g,S.prototype._centroid=!1,S.prototype.nodeType="Shape",(0,o._registerNode)(S),S.prototype.eventListeners={},S.prototype.on.call(S.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",d),S.prototype.on.call(S.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),S.prototype.on.call(S.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",O),S.prototype.on.call(S.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",k),S.prototype.on.call(S.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",C),n.Factory.addGetterSetter(S,"stroke",void 0,(0,a.getStringOrGradientValidator)()),n.Factory.addGetterSetter(S,"strokeWidth",2,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(S,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(S,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),n.Factory.addGetterSetter(S,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),n.Factory.addGetterSetter(S,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),n.Factory.addGetterSetter(S,"lineJoin"),n.Factory.addGetterSetter(S,"lineCap"),n.Factory.addGetterSetter(S,"sceneFunc"),n.Factory.addGetterSetter(S,"hitFunc"),n.Factory.addGetterSetter(S,"dash"),n.Factory.addGetterSetter(S,"dashOffset",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"shadowColor",void 0,(0,a.getStringValidator)()),n.Factory.addGetterSetter(S,"shadowBlur",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"shadowOpacity",1,(0,a.getNumberValidator)()),n.Factory.addComponentsGetterSetter(S,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(S,"shadowOffsetX",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"shadowOffsetY",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillPatternImage"),n.Factory.addGetterSetter(S,"fill",void 0,(0,a.getStringOrGradientValidator)()),n.Factory.addGetterSetter(S,"fillPatternX",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillPatternY",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(S,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(S,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(S,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(S,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(S,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(S,"fillEnabled",!0),n.Factory.addGetterSetter(S,"strokeEnabled",!0),n.Factory.addGetterSetter(S,"shadowEnabled",!0),n.Factory.addGetterSetter(S,"dashEnabled",!0),n.Factory.addGetterSetter(S,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(S,"fillPriority","color"),n.Factory.addComponentsGetterSetter(S,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(S,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),n.Factory.addComponentsGetterSetter(S,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(S,"fillPatternScaleX",1,(0,a.getNumberValidator)()),n.Factory.addGetterSetter(S,"fillPatternScaleY",1,(0,a.getNumberValidator)()),n.Factory.addComponentsGetterSetter(S,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(S,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(S,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(S,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(S,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(S,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(S,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(S,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(S,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(S,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(S,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(S,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(S,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(S,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(S,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(S,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(S,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(S,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(S,"fillPatternRotation",0),n.Factory.addGetterSetter(S,"fillRule",void 0,(0,a.getStringValidator)()),n.Factory.backCompat(S,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Ar);Object.defineProperty(yf,"__esModule",{value:!0});yf.Layer=void 0;const xa=ir,ug=Dl,bs=Qt,t2=vt,W5=Fi,iA=Ye,aA=Ar,oA=gt;var lA="#",sA="beforeDraw",uA="draw",E9=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],cA=E9.length;let _u=class extends ug.Container{constructor(t){super(t),this.canvas=new W5.SceneCanvas,this.hitCanvas=new W5.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(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var r=this.getStage();return r&&r.content&&(r.content.removeChild(this.getNativeCanvasElement()),t<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[t+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){bs.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=bs.Node.prototype.moveUp.call(this);if(!t)return!1;var r=this.getStage();return!r||!r.content?!1:(r.content.removeChild(this.getNativeCanvasElement()),this.index<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[this.index+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(bs.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var r=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),r[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(bs.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var r=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),r[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return bs.Node.prototype.remove.call(this),t&&t.parentNode&&xa.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:r}){return this.canvas.setSize(t,r),this.hitCanvas.setSize(t,r),this._setSmoothEnabled(),this}_validateAdd(t){var r=t.getType();r!=="Group"&&r!=="Shape"&&xa.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=t.x!==void 0?t.x:this.x(),t.y=t.y!==void 0?t.y:this.y(),bs.Node.prototype._toKonvaCanvas.call(this,t)}_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(){xa.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){xa.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,xa.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;for(var r=1,n=!1;;){for(let i=0;i<cA;i++){const a=E9[i],o=this._getIntersection({x:t.x+a.x*r,y:t.y+a.y*r}),l=o.shape;if(l)return l;if(n=!!o.antialiased,!o.antialiased)break}if(n)r+=1;else return null}}_getIntersection(t){const r=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*r),Math.round(t.y*r),1,1).data,i=n[3];if(i===255){const a=xa.Util._rgbToHex(n[0],n[1],n[2]),o=aA.shapes[lA+a];return o?{shape:o}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(t,r){var n=this.getLayer(),i=t||n&&n.getCanvas();return this._fire(sA,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),ug.Container.prototype.drawScene.call(this,i,r),this._fire(uA,{node:this}),this}drawHit(t,r){var n=this.getLayer(),i=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),ug.Container.prototype.drawHit.call(this,i,r),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){xa.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return xa.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var t=this.parent,r=!!this.hitCanvas._canvas.parentNode;r?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}destroy(){return xa.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};yf.Layer=_u;_u.prototype.nodeType="Layer";(0,oA._registerNode)(_u);t2.Factory.addGetterSetter(_u,"imageSmoothingEnabled",!0);t2.Factory.addGetterSetter(_u,"clearBeforeDraw",!0);t2.Factory.addGetterSetter(_u,"hitGraphEnabled",!0,(0,iA.getBooleanValidator)());var Cp={};Object.defineProperty(Cp,"__esModule",{value:!0});Cp.FastLayer=void 0;const fA=ir,dA=yf,hA=gt;let r2=class extends dA.Layer{constructor(t){super(t),this.listening(!1),fA.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};Cp.FastLayer=r2;r2.prototype.nodeType="FastLayer";(0,hA._registerNode)(r2);var wu={};Object.defineProperty(wu,"__esModule",{value:!0});wu.Group=void 0;const pA=ir,gA=Dl,vA=gt;let n2=class extends gA.Container{_validateAdd(t){var r=t.getType();r!=="Group"&&r!=="Shape"&&pA.Util.throw("You may only add groups and shapes to groups.")}};wu.Group=n2;n2.prototype.nodeType="Group";(0,vA._registerNode)(n2);var Su={};Object.defineProperty(Su,"__esModule",{value:!0});Su.Animation=void 0;const cg=gt,Y5=ir,fg=function(){return cg.glob.performance&&cg.glob.performance.now?function(){return cg.glob.performance.now()}:function(){return new Date().getTime()}}();class na{constructor(t,r){this.id=na.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:fg(),frameRate:0},this.func=t,this.setLayers(r)}setLayers(t){let r=[];return t&&(r=Array.isArray(t)?t:[t]),this.layers=r,this}getLayers(){return this.layers}addLayer(t){const r=this.layers,n=r.length;for(let i=0;i<n;i++)if(r[i]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const r=na.animations,n=r.length;for(let i=0;i<n;i++)if(r[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=fg(),na._addAnimation(this),this}stop(){return na._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const r=t.id,n=this.animations,i=n.length;for(let a=0;a<i;a++)if(n[a].id===r){this.animations.splice(a,1);break}}static _runFrames(){const t={},r=this.animations;for(let n=0;n<r.length;n++){const i=r[n],a=i.layers,o=i.func;i._updateFrameObject(fg());const l=a.length;let u;if(o?u=o.call(i,i.frame)!==!1:u=!0,!!u)for(let f=0;f<l;f++){const v=a[f];v._id!==void 0&&(t[v._id]=v)}}for(let n in t)t.hasOwnProperty(n)&&t[n].batchDraw()}static _animationLoop(){const t=na;t.animations.length?(t._runFrames(),Y5.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,Y5.Util.requestAnimFrame(this._animationLoop))}}Su.Animation=na;na.animations=[];na.animIdCounter=0;na.animRunning=!1;var O9={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const t=ir,r=Su,n=Qt,i=gt;var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},o=1,l=2,u=3,f=0,v=["fill","stroke","shadowColor"];class w{constructor(E,m,y,p,g,d,b){this.prop=E,this.propFunc=m,this.begin=p,this._pos=p,this.duration=d,this._change=0,this.prevPos=0,this.yoyo=b,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=y,this._change=g-this.begin,this.pause()}fire(E){var m=this[E];m&&m()}setTime(E){E>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():E<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=E,this.update())}getTime(){return this._time}setPosition(E){this.prevPos=this._pos,this.propFunc(E),this._pos=E}getPosition(E){return E===void 0&&(E=this._time),this.func(E,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=u,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(E){this.pause(),this._time=E,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(){var E=this.getTimer()-this._startTime;this.state===l?this.setTime(E):this.state===u&&this.setTime(this.duration-E)}pause(){this.state=o,this.fire("onPause")}getTimer(){return new Date().getTime()}}class _{constructor(E){var m=this,y=E.node,p=y._id,g,d=E.easing||e.Easings.Linear,b=!!E.yoyo,O;typeof E.duration>"u"?g=.3:E.duration===0?g=.001:g=E.duration,this.node=y,this._id=f++;var k=y.getLayer()||(y instanceof i.Konva.Stage?y.getLayers():null);k||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new r.Animation(function(){m.tween.onEnterFrame()},k),this.tween=new w(O,function(C){m._tweenFunc(C)},d,0,1,g*1e3,b),this._addListeners(),_.attrs[p]||(_.attrs[p]={}),_.attrs[p][this._id]||(_.attrs[p][this._id]={}),_.tweens[p]||(_.tweens[p]={});for(O in E)a[O]===void 0&&this._addAttr(O,E[O]);this.reset(),this.onFinish=E.onFinish,this.onReset=E.onReset,this.onUpdate=E.onUpdate}_addAttr(E,m){var y=this.node,p=y._id,g,d,b,O,k,C,S,x;if(b=_.tweens[p][E],b&&delete _.attrs[p][b][E],g=y.getAttr(E),t.Util._isArray(m))if(d=[],k=Math.max(m.length,g.length),E==="points"&&m.length!==g.length&&(m.length>g.length?(S=g,g=t.Util._prepareArrayForTween(g,m,y.closed())):(C=m,m=t.Util._prepareArrayForTween(m,g,y.closed()))),E.indexOf("fill")===0)for(O=0;O<k;O++)if(O%2===0)d.push(m[O]-g[O]);else{var P=t.Util.colorToRGBA(g[O]);x=t.Util.colorToRGBA(m[O]),g[O]=P,d.push({r:x.r-P.r,g:x.g-P.g,b:x.b-P.b,a:x.a-P.a})}else for(O=0;O<k;O++)d.push(m[O]-g[O]);else v.indexOf(E)!==-1?(g=t.Util.colorToRGBA(g),x=t.Util.colorToRGBA(m),d={r:x.r-g.r,g:x.g-g.g,b:x.b-g.b,a:x.a-g.a}):d=m-g;_.attrs[p][this._id][E]={start:g,diff:d,end:m,trueEnd:C,trueStart:S},_.tweens[p][E]=this._id}_tweenFunc(E){var m=this.node,y=_.attrs[m._id][this._id],p,g,d,b,O,k,C,S;for(p in y){if(g=y[p],d=g.start,b=g.diff,S=g.end,t.Util._isArray(d))if(O=[],C=Math.max(d.length,S.length),p.indexOf("fill")===0)for(k=0;k<C;k++)k%2===0?O.push((d[k]||0)+b[k]*E):O.push("rgba("+Math.round(d[k].r+b[k].r*E)+","+Math.round(d[k].g+b[k].g*E)+","+Math.round(d[k].b+b[k].b*E)+","+(d[k].a+b[k].a*E)+")");else for(k=0;k<C;k++)O.push((d[k]||0)+b[k]*E);else v.indexOf(p)!==-1?O="rgba("+Math.round(d.r+b.r*E)+","+Math.round(d.g+b.g*E)+","+Math.round(d.b+b.b*E)+","+(d.a+b.a*E)+")":O=d+b*E;m.setAttr(p,O)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var E=this.node,m=_.attrs[E._id][this._id];m.points&&m.points.trueEnd&&E.setAttr("points",m.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var E=this.node,m=_.attrs[E._id][this._id];m.points&&m.points.trueStart&&E.points(m.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(E){return this.tween.seek(E*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var E=this.node._id,m=this._id,y=_.tweens[E],p;this.pause();for(p in y)delete _.tweens[E][p];delete _.attrs[E][m]}}e.Tween=_,_.attrs={},_.tweens={},n.Node.prototype.to=function(h){var E=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),E&&E()};var m=new _(h);m.play()},e.Easings={BackEaseIn(h,E,m,y){var p=1.70158;return m*(h/=y)*h*((p+1)*h-p)+E},BackEaseOut(h,E,m,y){var p=1.70158;return m*((h=h/y-1)*h*((p+1)*h+p)+1)+E},BackEaseInOut(h,E,m,y){var p=1.70158;return(h/=y/2)<1?m/2*(h*h*(((p*=1.525)+1)*h-p))+E:m/2*((h-=2)*h*(((p*=1.525)+1)*h+p)+2)+E},ElasticEaseIn(h,E,m,y,p,g){var d=0;return h===0?E:(h/=y)===1?E+m:(g||(g=y*.3),!p||p<Math.abs(m)?(p=m,d=g/4):d=g/(2*Math.PI)*Math.asin(m/p),-(p*Math.pow(2,10*(h-=1))*Math.sin((h*y-d)*(2*Math.PI)/g))+E)},ElasticEaseOut(h,E,m,y,p,g){var d=0;return h===0?E:(h/=y)===1?E+m:(g||(g=y*.3),!p||p<Math.abs(m)?(p=m,d=g/4):d=g/(2*Math.PI)*Math.asin(m/p),p*Math.pow(2,-10*h)*Math.sin((h*y-d)*(2*Math.PI)/g)+m+E)},ElasticEaseInOut(h,E,m,y,p,g){var d=0;return h===0?E:(h/=y/2)===2?E+m:(g||(g=y*(.3*1.5)),!p||p<Math.abs(m)?(p=m,d=g/4):d=g/(2*Math.PI)*Math.asin(m/p),h<1?-.5*(p*Math.pow(2,10*(h-=1))*Math.sin((h*y-d)*(2*Math.PI)/g))+E:p*Math.pow(2,-10*(h-=1))*Math.sin((h*y-d)*(2*Math.PI)/g)*.5+m+E)},BounceEaseOut(h,E,m,y){return(h/=y)<1/2.75?m*(7.5625*h*h)+E:h<2/2.75?m*(7.5625*(h-=1.5/2.75)*h+.75)+E:h<2.5/2.75?m*(7.5625*(h-=2.25/2.75)*h+.9375)+E:m*(7.5625*(h-=2.625/2.75)*h+.984375)+E},BounceEaseIn(h,E,m,y){return m-e.Easings.BounceEaseOut(y-h,0,m,y)+E},BounceEaseInOut(h,E,m,y){return h<y/2?e.Easings.BounceEaseIn(h*2,0,m,y)*.5+E:e.Easings.BounceEaseOut(h*2-y,0,m,y)*.5+m*.5+E},EaseIn(h,E,m,y){return m*(h/=y)*h+E},EaseOut(h,E,m,y){return-m*(h/=y)*(h-2)+E},EaseInOut(h,E,m,y){return(h/=y/2)<1?m/2*h*h+E:-m/2*(--h*(h-2)-1)+E},StrongEaseIn(h,E,m,y){return m*(h/=y)*h*h*h*h+E},StrongEaseOut(h,E,m,y){return m*((h=h/y-1)*h*h*h*h+1)+E},StrongEaseInOut(h,E,m,y){return(h/=y/2)<1?m/2*h*h*h*h*h+E:m/2*((h-=2)*h*h*h*h+2)+E},Linear(h,E,m,y){return m*h/y+E}}})(O9);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const t=gt,r=ir,n=Qt,i=Dl,a=_9,o=yf,l=Cp,u=wu,f=xp,v=Ar,w=Su,_=O9,h=Na,E=Fi;e.Konva=r.Util._assign(t.Konva,{Util:r.Util,Transform:r.Transform,Node:n.Node,Container:i.Container,Stage:a.Stage,stages:a.stages,Layer:o.Layer,FastLayer:l.FastLayer,Group:u.Group,DD:f.DD,Shape:v.Shape,shapes:v.shapes,Animation:w.Animation,Tween:_.Tween,Easings:_.Easings,Context:h.Context,Canvas:E.Canvas}),e.default=e.Konva})(Bh);var Tp={};Object.defineProperty(Tp,"__esModule",{value:!0});Tp.Arc=void 0;const Ap=vt,mA=Ar,K5=gt,kp=Ye,yA=gt;let Va=class extends mA.Shape{_sceneFunc(t){var r=K5.Konva.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,r,n),t.arc(0,0,this.innerRadius(),r,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),r=this.outerRadius(),n=this.clockwise(),i=K5.Konva.getAngle(n?360-this.angle():this.angle()),a=Math.cos(Math.min(i,Math.PI)),o=1,l=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),u=Math.sin(Math.min(i,Math.PI/2)),f=a*(a>0?t:r),v=o*r,w=l*(l>0?t:r),_=u*(u>0?r:t);return{x:f,y:n?-1*_:w,width:v-f,height:_-w}}};Tp.Arc=Va;Va.prototype._centroid=!0;Va.prototype.className="Arc";Va.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,yA._registerNode)(Va);Ap.Factory.addGetterSetter(Va,"innerRadius",0,(0,kp.getNumberValidator)());Ap.Factory.addGetterSetter(Va,"outerRadius",0,(0,kp.getNumberValidator)());Ap.Factory.addGetterSetter(Va,"angle",0,(0,kp.getNumberValidator)());Ap.Factory.addGetterSetter(Va,"clockwise",!1,(0,kp.getBooleanValidator)());var Rp={},bf={};Object.defineProperty(bf,"__esModule",{value:!0});bf.Line=void 0;const Lp=vt,bA=Ar,x9=Ye,_A=gt;function Pm(e,t,r,n,i,a,o){var l=Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2)),u=Math.sqrt(Math.pow(i-r,2)+Math.pow(a-n,2)),f=o*l/(l+u),v=o*u/(l+u),w=r-f*(i-e),_=n-f*(a-t),h=r+v*(i-e),E=n+v*(a-t);return[w,_,h,E]}function X5(e,t){var r=e.length,n=[],i,a;for(i=2;i<r-2;i+=2)a=Pm(e[i-2],e[i-1],e[i],e[i+1],e[i+2],e[i+3],t),!isNaN(a[0])&&(n.push(a[0]),n.push(a[1]),n.push(e[i]),n.push(e[i+1]),n.push(a[2]),n.push(a[3]));return n}let Ho=class extends bA.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){var r=this.points(),n=r.length,i=this.tension(),a=this.closed(),o=this.bezier(),l,u,f;if(n){if(t.beginPath(),t.moveTo(r[0],r[1]),i!==0&&n>4){for(l=this.getTensionPoints(),u=l.length,f=a?0:4,a||t.quadraticCurveTo(l[0],l[1],l[2],l[3]);f<u-2;)t.bezierCurveTo(l[f++],l[f++],l[f++],l[f++],l[f++],l[f++]);a||t.quadraticCurveTo(l[u-2],l[u-1],r[n-2],r[n-1])}else if(o)for(f=2;f<n;)t.bezierCurveTo(r[f++],r[f++],r[f++],r[f++],r[f++],r[f++]);else for(f=2;f<n;f+=2)t.lineTo(r[f],r[f+1]);a?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():X5(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),r=t.length,n=this.tension(),i=Pm(t[r-2],t[r-1],t[0],t[1],t[2],t[3],n),a=Pm(t[r-4],t[r-3],t[r-2],t[r-1],t[0],t[1],n),o=X5(t,n),l=[i[2],i[3]].concat(o).concat([a[0],a[1],t[r-2],t[r-1],a[2],a[3],i[0],i[1],t[0],t[1]]);return l}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};this.tension()!==0?t=[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:t=this.points();for(var r=t[0],n=t[0],i=t[1],a=t[1],o,l,u=0;u<t.length/2;u++)o=t[u*2],l=t[u*2+1],r=Math.min(r,o),n=Math.max(n,o),i=Math.min(i,l),a=Math.max(a,l);return{x:r,y:i,width:n-r,height:a-i}}};bf.Line=Ho;Ho.prototype.className="Line";Ho.prototype._attrsAffectingSize=["points","bezier","tension"];(0,_A._registerNode)(Ho);Lp.Factory.addGetterSetter(Ho,"closed",!1);Lp.Factory.addGetterSetter(Ho,"bezier",!1);Lp.Factory.addGetterSetter(Ho,"tension",0,(0,x9.getNumberValidator)());Lp.Factory.addGetterSetter(Ho,"points",[],(0,x9.getNumberArrayValidator)());var Eu={},P9={};(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 t=(o,l,u)=>{let f,v,w;f=u/2,v=0;for(let h=0;h<20;h++)w=f*e.tValues[20][h]+f,v+=e.cValues[20][h]*n(o,l,w);return f*v};e.getCubicArcLength=t;const r=(o,l,u)=>{u===void 0&&(u=1);const f=o[0]-2*o[1]+o[2],v=l[0]-2*l[1]+l[2],w=2*o[1]-2*o[0],_=2*l[1]-2*l[0],h=4*(f*f+v*v),E=4*(f*w+v*_),m=w*w+_*_;if(h===0)return u*Math.sqrt(Math.pow(o[2]-o[0],2)+Math.pow(l[2]-l[0],2));const y=E/(2*h),p=m/h,g=u+y,d=p-y*y,b=g*g+d>0?Math.sqrt(g*g+d):0,O=y*y+d>0?Math.sqrt(y*y+d):0,k=y+Math.sqrt(y*y+d)!==0?d*Math.log(Math.abs((g+b)/(y+O))):0;return Math.sqrt(h)/2*(g*b-y*O+k)};e.getQuadraticArcLength=r;function n(o,l,u){const f=i(1,u,o),v=i(1,u,l),w=f*f+v*v;return Math.sqrt(w)}const i=(o,l,u)=>{const f=u.length-1;let v,w;if(f===0)return 0;if(o===0){w=0;for(let _=0;_<=f;_++)w+=e.binomialCoefficients[f][_]*Math.pow(1-l,f-_)*Math.pow(l,_)*u[_];return w}else{v=new Array(f);for(let _=0;_<f;_++)v[_]=f*(u[_+1]-u[_]);return i(o-1,l,v)}},a=(o,l,u)=>{let f=1,v=o/l,w=(o-u(v))/l,_=0;for(;f>.001;){const h=u(v+w),E=Math.abs(o-h)/l;if(E<f)f=E,v+=w;else{const m=u(v-w),y=Math.abs(o-m)/l;y<f?(f=y,v-=w):w/=2}if(_++,_>500)break}return v};e.t2length=a})(P9);Object.defineProperty(Eu,"__esModule",{value:!0});Eu.Path=void 0;const wA=vt,SA=Ar,EA=gt,_s=P9;let _f=class Sn extends SA.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Sn.parsePathData(this.data()),this.pathLength=Sn.getPathLength(this.dataArray)}_sceneFunc(t){var r=this.dataArray;t.beginPath();for(var n=!1,i=0;i<r.length;i++){var a=r[i].command,o=r[i].points;switch(a){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var l=o[0],u=o[1],f=o[2],v=o[3],w=o[4],_=o[5],h=o[6],E=o[7],m=f>v?f:v,y=f>v?1:f/v,p=f>v?v/f:1;t.translate(l,u),t.rotate(h),t.scale(y,p),t.arc(0,0,m,w,w+_,1-E),t.scale(1/y,1/p),t.rotate(-h),t.translate(-l,-u);break;case"z":n=!0,t.closePath();break}}!n&&!this.hasFill()?t.strokeShape(this):t.fillStrokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach(function(f){if(f.command==="A"){var v=f.points[4],w=f.points[5],_=f.points[4]+w,h=Math.PI/180;if(Math.abs(v-_)<h&&(h=Math.abs(v-_)),w<0)for(let E=v-h;E>_;E-=h){const m=Sn.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],E,0);t.push(m.x,m.y)}else for(let E=v+h;E<_;E+=h){const m=Sn.getPointOnEllipticalArc(f.points[0],f.points[1],f.points[2],f.points[3],E,0);t.push(m.x,m.y)}}else if(f.command==="C")for(let E=0;E<=1;E+=.01){const m=Sn.getPointOnCubicBezier(E,f.start.x,f.start.y,f.points[0],f.points[1],f.points[2],f.points[3],f.points[4],f.points[5]);t.push(m.x,m.y)}else t=t.concat(f.points)});for(var r=t[0],n=t[0],i=t[1],a=t[1],o,l,u=0;u<t.length/2;u++)o=t[u*2],l=t[u*2+1],isNaN(o)||(r=Math.min(r,o),n=Math.max(n,o)),isNaN(l)||(i=Math.min(i,l),a=Math.max(a,l));return{x:r,y:i,width:n-r,height:a-i}}getLength(){return this.pathLength}getPointAtLength(t){return Sn.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,r,n,i){return Math.sqrt((n-t)*(n-t)+(i-r)*(i-r))}static getPathLength(t){let r=0;for(var n=0;n<t.length;++n)r+=t[n].pathLength;return r}static getPointAtLengthOfDataArray(t,r){var n,i=0,a=r.length;if(!a)return null;for(;i<a&&t>r[i].pathLength;)t-=r[i].pathLength,++i;if(i===a)return n=r[i-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return n=r[i].points.slice(0,2),{x:n[0],y:n[1]};var o=r[i],l=o.points;switch(o.command){case"L":return Sn.getPointOnLine(t,o.start.x,o.start.y,l[0],l[1]);case"C":return Sn.getPointOnCubicBezier((0,_s.t2length)(t,Sn.getPathLength(r),m=>(0,_s.getCubicArcLength)([o.start.x,l[0],l[2],l[4]],[o.start.y,l[1],l[3],l[5]],m)),o.start.x,o.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return Sn.getPointOnQuadraticBezier((0,_s.t2length)(t,Sn.getPathLength(r),m=>(0,_s.getQuadraticArcLength)([o.start.x,l[0],l[2]],[o.start.y,l[1],l[3]],m)),o.start.x,o.start.y,l[0],l[1],l[2],l[3]);case"A":var u=l[0],f=l[1],v=l[2],w=l[3],_=l[4],h=l[5],E=l[6];return _+=h*t/o.pathLength,Sn.getPointOnEllipticalArc(u,f,v,w,_,E)}return null}static getPointOnLine(t,r,n,i,a,o,l){o===void 0&&(o=r),l===void 0&&(l=n);var u=(a-n)/(i-r+1e-8),f=Math.sqrt(t*t/(1+u*u));i<r&&(f*=-1);var v=u*f,w;if(i===r)w={x:o,y:l+v};else if((l-n)/(o-r+1e-8)===u)w={x:o+f,y:l+v};else{var _,h,E=this.getLineLength(r,n,i,a),m=(o-r)*(i-r)+(l-n)*(a-n);m=m/(E*E),_=r+m*(i-r),h=n+m*(a-n);var y=this.getLineLength(o,l,_,h),p=Math.sqrt(t*t-y*y);f=Math.sqrt(p*p/(1+u*u)),i<r&&(f*=-1),v=u*f,w={x:_+f,y:h+v}}return w}static getPointOnCubicBezier(t,r,n,i,a,o,l,u,f){function v(y){return y*y*y}function w(y){return 3*y*y*(1-y)}function _(y){return 3*y*(1-y)*(1-y)}function h(y){return(1-y)*(1-y)*(1-y)}var E=u*v(t)+o*w(t)+i*_(t)+r*h(t),m=f*v(t)+l*w(t)+a*_(t)+n*h(t);return{x:E,y:m}}static getPointOnQuadraticBezier(t,r,n,i,a,o,l){function u(h){return h*h}function f(h){return 2*h*(1-h)}function v(h){return(1-h)*(1-h)}var w=o*u(t)+i*f(t)+r*v(t),_=l*u(t)+a*f(t)+n*v(t);return{x:w,y:_}}static getPointOnEllipticalArc(t,r,n,i,a,o){var l=Math.cos(o),u=Math.sin(o),f={x:n*Math.cos(a),y:i*Math.sin(a)};return{x:t+(f.x*l-f.y*u),y:r+(f.x*u+f.y*l)}}static parsePathData(t){if(!t)return[];var r=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];r=r.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)r=r.replace(new RegExp(n[i],"g"),"|"+n[i]);var a=r.split("|"),o=[],l=[],u=0,f=0,v=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,w;for(i=1;i<a.length;i++){var _=a[i],h=_.charAt(0);for(_=_.slice(1),l.length=0;w=v.exec(_);)l.push(w[0]);for(var E=[],m=0,y=l.length;m<y;m++){if(l[m]==="00"){E.push(0,0);continue}var p=parseFloat(l[m]);isNaN(p)?E.push(0):E.push(p)}for(;E.length>0&&!isNaN(E[0]);){var g="",d=[],b=u,O=f,k,C,S,x,P,T,L,M,U,$;switch(h){case"l":u+=E.shift(),f+=E.shift(),g="L",d.push(u,f);break;case"L":u=E.shift(),f=E.shift(),d.push(u,f);break;case"m":var Z=E.shift(),B=E.shift();if(u+=Z,f+=B,g="M",o.length>2&&o[o.length-1].command==="z"){for(var N=o.length-2;N>=0;N--)if(o[N].command==="M"){u=o[N].points[0]+Z,f=o[N].points[1]+B;break}}d.push(u,f),h="l";break;case"M":u=E.shift(),f=E.shift(),g="M",d.push(u,f),h="L";break;case"h":u+=E.shift(),g="L",d.push(u,f);break;case"H":u=E.shift(),g="L",d.push(u,f);break;case"v":f+=E.shift(),g="L",d.push(u,f);break;case"V":f=E.shift(),g="L",d.push(u,f);break;case"C":d.push(E.shift(),E.shift(),E.shift(),E.shift()),u=E.shift(),f=E.shift(),d.push(u,f);break;case"c":d.push(u+E.shift(),f+E.shift(),u+E.shift(),f+E.shift()),u+=E.shift(),f+=E.shift(),g="C",d.push(u,f);break;case"S":C=u,S=f,k=o[o.length-1],k.command==="C"&&(C=u+(u-k.points[2]),S=f+(f-k.points[3])),d.push(C,S,E.shift(),E.shift()),u=E.shift(),f=E.shift(),g="C",d.push(u,f);break;case"s":C=u,S=f,k=o[o.length-1],k.command==="C"&&(C=u+(u-k.points[2]),S=f+(f-k.points[3])),d.push(C,S,u+E.shift(),f+E.shift()),u+=E.shift(),f+=E.shift(),g="C",d.push(u,f);break;case"Q":d.push(E.shift(),E.shift()),u=E.shift(),f=E.shift(),d.push(u,f);break;case"q":d.push(u+E.shift(),f+E.shift()),u+=E.shift(),f+=E.shift(),g="Q",d.push(u,f);break;case"T":C=u,S=f,k=o[o.length-1],k.command==="Q"&&(C=u+(u-k.points[0]),S=f+(f-k.points[1])),u=E.shift(),f=E.shift(),g="Q",d.push(C,S,u,f);break;case"t":C=u,S=f,k=o[o.length-1],k.command==="Q"&&(C=u+(u-k.points[0]),S=f+(f-k.points[1])),u+=E.shift(),f+=E.shift(),g="Q",d.push(C,S,u,f);break;case"A":x=E.shift(),P=E.shift(),T=E.shift(),L=E.shift(),M=E.shift(),U=u,$=f,u=E.shift(),f=E.shift(),g="A",d=this.convertEndpointToCenterParameterization(U,$,u,f,L,M,x,P,T);break;case"a":x=E.shift(),P=E.shift(),T=E.shift(),L=E.shift(),M=E.shift(),U=u,$=f,u+=E.shift(),f+=E.shift(),g="A",d=this.convertEndpointToCenterParameterization(U,$,u,f,L,M,x,P,T);break}o.push({command:g||h,points:d,start:{x:b,y:O},pathLength:this.calcLength(b,O,g||h,d)})}(h==="z"||h==="Z")&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,r,n,i){var a,o,l,u,f=Sn;switch(n){case"L":return f.getLineLength(t,r,i[0],i[1]);case"C":return(0,_s.getCubicArcLength)([t,i[0],i[2],i[4]],[r,i[1],i[3],i[5]],1);case"Q":return(0,_s.getQuadraticArcLength)([t,i[0],i[2]],[r,i[1],i[3]],1);case"A":a=0;var v=i[4],w=i[5],_=i[4]+w,h=Math.PI/180;if(Math.abs(v-_)<h&&(h=Math.abs(v-_)),o=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],v,0),w<0)for(u=v-h;u>_;u-=h)l=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),a+=f.getLineLength(o.x,o.y,l.x,l.y),o=l;else for(u=v+h;u<_;u+=h)l=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),a+=f.getLineLength(o.x,o.y,l.x,l.y),o=l;return l=f.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],_,0),a+=f.getLineLength(o.x,o.y,l.x,l.y),a}return 0}static convertEndpointToCenterParameterization(t,r,n,i,a,o,l,u,f){var v=f*(Math.PI/180),w=Math.cos(v)*(t-n)/2+Math.sin(v)*(r-i)/2,_=-1*Math.sin(v)*(t-n)/2+Math.cos(v)*(r-i)/2,h=w*w/(l*l)+_*_/(u*u);h>1&&(l*=Math.sqrt(h),u*=Math.sqrt(h));var E=Math.sqrt((l*l*(u*u)-l*l*(_*_)-u*u*(w*w))/(l*l*(_*_)+u*u*(w*w)));a===o&&(E*=-1),isNaN(E)&&(E=0);var m=E*l*_/u,y=E*-u*w/l,p=(t+n)/2+Math.cos(v)*m-Math.sin(v)*y,g=(r+i)/2+Math.sin(v)*m+Math.cos(v)*y,d=function(P){return Math.sqrt(P[0]*P[0]+P[1]*P[1])},b=function(P,T){return(P[0]*T[0]+P[1]*T[1])/(d(P)*d(T))},O=function(P,T){return(P[0]*T[1]<P[1]*T[0]?-1:1)*Math.acos(b(P,T))},k=O([1,0],[(w-m)/l,(_-y)/u]),C=[(w-m)/l,(_-y)/u],S=[(-1*w-m)/l,(-1*_-y)/u],x=O(C,S);return b(C,S)<=-1&&(x=Math.PI),b(C,S)>=1&&(x=0),o===0&&x>0&&(x=x-2*Math.PI),o===1&&x<0&&(x=x+2*Math.PI),[p,g,l,u,k,x,v,o]}};Eu.Path=_f;_f.prototype.className="Path";_f.prototype._attrsAffectingSize=["data"];(0,EA._registerNode)(_f);wA.Factory.addGetterSetter(_f,"data");Object.defineProperty(Rp,"__esModule",{value:!0});Rp.Arrow=void 0;const Mp=vt,OA=bf,C9=Ye,xA=gt,Z5=Eu;let jl=class extends OA.Line{_sceneFunc(t){super._sceneFunc(t);var r=Math.PI*2,n=this.points(),i=n,a=this.tension()!==0&&n.length>4;a&&(i=this.getTensionPoints());var o=this.pointerLength(),l=n.length,u,f;if(a){const _=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],n[l-2],n[l-1]],h=Z5.Path.calcLength(i[i.length-4],i[i.length-3],"C",_),E=Z5.Path.getPointOnQuadraticBezier(Math.min(1,1-o/h),_[0],_[1],_[2],_[3],_[4],_[5]);u=n[l-2]-E.x,f=n[l-1]-E.y}else u=n[l-2]-n[l-4],f=n[l-1]-n[l-3];var v=(Math.atan2(f,u)+r)%r,w=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[l-2],n[l-1]),t.rotate(v),t.moveTo(0,0),t.lineTo(-o,w/2),t.lineTo(-o,-w/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),a?(u=(i[0]+i[2])/2-n[0],f=(i[1]+i[3])/2-n[1]):(u=n[2]-n[0],f=n[3]-n[1]),t.rotate((Math.atan2(-f,-u)+r)%r),t.moveTo(0,0),t.lineTo(-o,w/2),t.lineTo(-o,-w/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var r=this.dashEnabled();r&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),r&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),r=this.pointerWidth()/2;return{x:t.x-r,y:t.y-r,width:t.width+r*2,height:t.height+r*2}}};Rp.Arrow=jl;jl.prototype.className="Arrow";(0,xA._registerNode)(jl);Mp.Factory.addGetterSetter(jl,"pointerLength",10,(0,C9.getNumberValidator)());Mp.Factory.addGetterSetter(jl,"pointerWidth",10,(0,C9.getNumberValidator)());Mp.Factory.addGetterSetter(jl,"pointerAtBeginning",!1);Mp.Factory.addGetterSetter(jl,"pointerAtEnding",!0);var Np={};Object.defineProperty(Np,"__esModule",{value:!0});Np.Circle=void 0;const PA=vt,CA=Ar,TA=Ye,AA=gt;let Ou=class extends CA.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}};Np.Circle=Ou;Ou.prototype._centroid=!0;Ou.prototype.className="Circle";Ou.prototype._attrsAffectingSize=["radius"];(0,AA._registerNode)(Ou);PA.Factory.addGetterSetter(Ou,"radius",0,(0,TA.getNumberValidator)());var Ip={};Object.defineProperty(Ip,"__esModule",{value:!0});Ip.Ellipse=void 0;const i2=vt,kA=Ar,T9=Ye,RA=gt;let Go=class extends kA.Shape{_sceneFunc(t){var r=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),r!==n&&t.scale(1,n/r),t.arc(0,0,r,0,Math.PI*2,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}};Ip.Ellipse=Go;Go.prototype.className="Ellipse";Go.prototype._centroid=!0;Go.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,RA._registerNode)(Go);i2.Factory.addComponentsGetterSetter(Go,"radius",["x","y"]);i2.Factory.addGetterSetter(Go,"radiusX",0,(0,T9.getNumberValidator)());i2.Factory.addGetterSetter(Go,"radiusY",0,(0,T9.getNumberValidator)());var Dp={};Object.defineProperty(Dp,"__esModule",{value:!0});Dp.Image=void 0;const dg=ir,zl=vt,LA=Ar,MA=gt,wf=Ye;let pa=class A9 extends LA.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&t.readyState===4||t&&t.addEventListener&&t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const r=this.getWidth(),n=this.getHeight(),i=this.cornerRadius(),a=this.attrs.image;let o;if(a){const l=this.attrs.cropWidth,u=this.attrs.cropHeight;l&&u?o=[a,this.cropX(),this.cropY(),l,u,0,0,r,n]:o=[a,0,0,r,n]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?dg.Util.drawRoundedRectPath(t,r,n,i):t.rect(0,0,r,n),t.closePath(),t.fillStrokeShape(this)),a&&(i&&t.clip(),t.drawImage.apply(t,o))}_hitFunc(t){var r=this.width(),n=this.height(),i=this.cornerRadius();t.beginPath(),i?dg.Util.drawRoundedRectPath(t,r,n,i):t.rect(0,0,r,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,r;return(t=this.attrs.width)!==null&&t!==void 0?t:(r=this.image())===null||r===void 0?void 0:r.width}getHeight(){var t,r;return(t=this.attrs.height)!==null&&t!==void 0?t:(r=this.image())===null||r===void 0?void 0:r.height}static fromURL(t,r,n=null){var i=dg.Util.createImageElement();i.onload=function(){var a=new A9({image:i});r(a)},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}};Dp.Image=pa;pa.prototype.className="Image";(0,MA._registerNode)(pa);zl.Factory.addGetterSetter(pa,"cornerRadius",0,(0,wf.getNumberOrArrayOfNumbersValidator)(4));zl.Factory.addGetterSetter(pa,"image");zl.Factory.addComponentsGetterSetter(pa,"crop",["x","y","width","height"]);zl.Factory.addGetterSetter(pa,"cropX",0,(0,wf.getNumberValidator)());zl.Factory.addGetterSetter(pa,"cropY",0,(0,wf.getNumberValidator)());zl.Factory.addGetterSetter(pa,"cropWidth",0,(0,wf.getNumberValidator)());zl.Factory.addGetterSetter(pa,"cropHeight",0,(0,wf.getNumberValidator)());var au={};Object.defineProperty(au,"__esModule",{value:!0});au.Tag=au.Label=void 0;const Fp=vt,NA=Ar,IA=wu,a2=Ye,k9=gt;var R9=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],DA="Change.konva",FA="none",Cm="up",Tm="right",Am="down",km="left",jA=R9.length;let o2=class extends IA.Group{constructor(t){super(t),this.on("add.konva",function(r){this._addListeners(r.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var r=this,n,i=function(){r._sync()};for(n=0;n<jA;n++)t.on(R9[n]+DA,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t=this.getText(),r=this.getTag(),n,i,a,o,l,u,f;if(t&&r){switch(n=t.width(),i=t.height(),a=r.pointerDirection(),o=r.pointerWidth(),f=r.pointerHeight(),l=0,u=0,a){case Cm:l=n/2,u=-1*f;break;case Tm:l=n+o,u=i/2;break;case Am:l=n/2,u=i+f;break;case km:l=-1*o,u=i/2;break}r.setAttrs({x:-1*l,y:-1*u,width:n,height:i}),t.setAttrs({x:-1*l,y:-1*u})}}};au.Label=o2;o2.prototype.className="Label";(0,k9._registerNode)(o2);let Bl=class extends NA.Shape{_sceneFunc(t){var r=this.width(),n=this.height(),i=this.pointerDirection(),a=this.pointerWidth(),o=this.pointerHeight(),l=this.cornerRadius();let u=0,f=0,v=0,w=0;typeof l=="number"?u=f=v=w=Math.min(l,r/2,n/2):(u=Math.min(l[0]||0,r/2,n/2),f=Math.min(l[1]||0,r/2,n/2),w=Math.min(l[2]||0,r/2,n/2),v=Math.min(l[3]||0,r/2,n/2)),t.beginPath(),t.moveTo(u,0),i===Cm&&(t.lineTo((r-a)/2,0),t.lineTo(r/2,-1*o),t.lineTo((r+a)/2,0)),t.lineTo(r-f,0),t.arc(r-f,f,f,Math.PI*3/2,0,!1),i===Tm&&(t.lineTo(r,(n-o)/2),t.lineTo(r+a,n/2),t.lineTo(r,(n+o)/2)),t.lineTo(r,n-w),t.arc(r-w,n-w,w,0,Math.PI/2,!1),i===Am&&(t.lineTo((r+a)/2,n),t.lineTo(r/2,n+o),t.lineTo((r-a)/2,n)),t.lineTo(v,n),t.arc(v,n-v,v,Math.PI/2,Math.PI,!1),i===km&&(t.lineTo(0,(n+o)/2),t.lineTo(-1*a,n/2),t.lineTo(0,(n-o)/2)),t.lineTo(0,u),t.arc(u,u,u,Math.PI,Math.PI*3/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,r=0,n=this.pointerWidth(),i=this.pointerHeight(),a=this.pointerDirection(),o=this.width(),l=this.height();return a===Cm?(r-=i,l+=i):a===Am?l+=i:a===km?(t-=n*1.5,o+=n):a===Tm&&(o+=n*1.5),{x:t,y:r,width:o,height:l}}};au.Tag=Bl;Bl.prototype.className="Tag";(0,k9._registerNode)(Bl);Fp.Factory.addGetterSetter(Bl,"pointerDirection",FA);Fp.Factory.addGetterSetter(Bl,"pointerWidth",0,(0,a2.getNumberValidator)());Fp.Factory.addGetterSetter(Bl,"pointerHeight",0,(0,a2.getNumberValidator)());Fp.Factory.addGetterSetter(Bl,"cornerRadius",0,(0,a2.getNumberOrArrayOfNumbersValidator)(4));var Sf={};Object.defineProperty(Sf,"__esModule",{value:!0});Sf.Rect=void 0;const zA=vt,BA=Ar,UA=gt,HA=ir,GA=Ye;let jp=class extends BA.Shape{_sceneFunc(t){var r=this.cornerRadius(),n=this.width(),i=this.height();t.beginPath(),r?HA.Util.drawRoundedRectPath(t,n,i,r):t.rect(0,0,n,i),t.closePath(),t.fillStrokeShape(this)}};Sf.Rect=jp;jp.prototype.className="Rect";(0,UA._registerNode)(jp);zA.Factory.addGetterSetter(jp,"cornerRadius",0,(0,GA.getNumberOrArrayOfNumbersValidator)(4));var zp={};Object.defineProperty(zp,"__esModule",{value:!0});zp.RegularPolygon=void 0;const L9=vt,$A=Ar,M9=Ye,VA=gt;let Ul=class extends $A.Shape{_sceneFunc(t){const r=this._getPoints();t.beginPath(),t.moveTo(r[0].x,r[0].y);for(var n=1;n<r.length;n++)t.lineTo(r[n].x,r[n].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,r=this.attrs.radius||0,n=[];for(var i=0;i<t;i++)n.push({x:r*Math.sin(i*2*Math.PI/t),y:-1*r*Math.cos(i*2*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();var r=t[0].x,n=t[0].y,i=t[0].x,a=t[0].y;return t.forEach(o=>{r=Math.min(r,o.x),n=Math.max(n,o.x),i=Math.min(i,o.y),a=Math.max(a,o.y)}),{x:r,y:i,width:n-r,height:a-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}};zp.RegularPolygon=Ul;Ul.prototype.className="RegularPolygon";Ul.prototype._centroid=!0;Ul.prototype._attrsAffectingSize=["radius"];(0,VA._registerNode)(Ul);L9.Factory.addGetterSetter(Ul,"radius",0,(0,M9.getNumberValidator)());L9.Factory.addGetterSetter(Ul,"sides",0,(0,M9.getNumberValidator)());var Bp={};Object.defineProperty(Bp,"__esModule",{value:!0});Bp.Ring=void 0;const N9=vt,qA=Ar,I9=Ye,WA=gt;var Q5=Math.PI*2;let Hl=class extends qA.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,Q5,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),Q5,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}};Bp.Ring=Hl;Hl.prototype.className="Ring";Hl.prototype._centroid=!0;Hl.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,WA._registerNode)(Hl);N9.Factory.addGetterSetter(Hl,"innerRadius",0,(0,I9.getNumberValidator)());N9.Factory.addGetterSetter(Hl,"outerRadius",0,(0,I9.getNumberValidator)());var Up={};Object.defineProperty(Up,"__esModule",{value:!0});Up.Sprite=void 0;const Gl=vt,YA=Ar,KA=Su,D9=Ye,XA=gt;let ga=class extends YA.Shape{constructor(t){super(t),this._updated=!0,this.anim=new KA.Animation(()=>{var r=this._updated;return this._updated=!1,r}),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(t){var r=this.animation(),n=this.frameIndex(),i=n*4,a=this.animations()[r],o=this.frameOffsets(),l=a[i+0],u=a[i+1],f=a[i+2],v=a[i+3],w=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,f,v),t.closePath(),t.fillStrokeShape(this)),w)if(o){var _=o[r],h=n*2;t.drawImage(w,l,u,f,v,_[h+0],_[h+1],f,v)}else t.drawImage(w,l,u,f,v,0,0,f,v)}_hitFunc(t){var r=this.animation(),n=this.frameIndex(),i=n*4,a=this.animations()[r],o=this.frameOffsets(),l=a[i+2],u=a[i+3];if(t.beginPath(),o){var f=o[r],v=n*2;t.rect(f[v+0],f[v+1],l,u)}else t.rect(0,0,l,u);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),r=this.animation(),n=this.animations(),i=n[r],a=i.length/4;t<a-1?this.frameIndex(t+1):this.frameIndex(0)}};Up.Sprite=ga;ga.prototype.className="Sprite";(0,XA._registerNode)(ga);Gl.Factory.addGetterSetter(ga,"animation");Gl.Factory.addGetterSetter(ga,"animations");Gl.Factory.addGetterSetter(ga,"frameOffsets");Gl.Factory.addGetterSetter(ga,"image");Gl.Factory.addGetterSetter(ga,"frameIndex",0,(0,D9.getNumberValidator)());Gl.Factory.addGetterSetter(ga,"frameRate",17,(0,D9.getNumberValidator)());Gl.Factory.backCompat(ga,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var Hp={};Object.defineProperty(Hp,"__esModule",{value:!0});Hp.Star=void 0;const l2=vt,ZA=Ar,s2=Ye,QA=gt;let $o=class extends ZA.Shape{_sceneFunc(t){var r=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var a=1;a<i*2;a++){var o=a%2===0?n:r,l=o*Math.sin(a*Math.PI/i),u=-1*o*Math.cos(a*Math.PI/i);t.lineTo(l,u)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}};Hp.Star=$o;$o.prototype.className="Star";$o.prototype._centroid=!0;$o.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,QA._registerNode)($o);l2.Factory.addGetterSetter($o,"numPoints",5,(0,s2.getNumberValidator)());l2.Factory.addGetterSetter($o,"innerRadius",0,(0,s2.getNumberValidator)());l2.Factory.addGetterSetter($o,"outerRadius",0,(0,s2.getNumberValidator)());var kl={};Object.defineProperty(kl,"__esModule",{value:!0});kl.Text=kl.stringToArray=void 0;const Rm=ir,on=vt,JA=Ar,hg=gt,Vo=Ye,ek=gt;function F9(e){return Array.from(e)}kl.stringToArray=F9;var ws="auto",tk="center",j9="inherit",oc="justify",rk="Change.konva",nk="2d",J5="-",z9="left",ik="text",ak="Text",ok="top",lk="bottom",e4="middle",B9="normal",sk="px ",zd=" ",uk="right",t4="rtl",ck="word",fk="char",r4="none",pg="…",U9=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],dk=U9.length;function hk(e){return e.split(",").map(t=>{t=t.trim();const r=t.indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return r&&!n&&(t=`"${t}"`),t}).join(", ")}var Bd;function gg(){return Bd||(Bd=Rm.Util.createCanvasElement().getContext(nk),Bd)}function pk(e){e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function gk(e){e.setAttr("miterLimit",2),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function vk(e){return e=e||{},!e.fillLinearGradientColorStops&&!e.fillRadialGradientColorStops&&!e.fillPatternImage&&(e.fill=e.fill||"black"),e}let cr=class extends JA.Shape{constructor(t){super(vk(t)),this._partialTextX=0,this._partialTextY=0;for(var r=0;r<dk;r++)this.on(U9[r]+rk,this._setTextData);this._setTextData()}_sceneFunc(t){var r=this.textArr,n=r.length;if(this.text()){var i=this.padding(),a=this.fontSize(),o=this.lineHeight()*a,l=this.verticalAlign(),u=this.direction(),f=0,v=this.align(),w=this.getWidth(),_=this.letterSpacing(),h=this.fill(),E=this.textDecoration(),m=E.indexOf("underline")!==-1,y=E.indexOf("line-through")!==-1,p;u=u===j9?t.direction:u;var g=o/2,d=e4;if(hg.Konva._fixTextRendering){var b=this.measureSize("M");d="alphabetic",g=(b.fontBoundingBoxAscent-b.fontBoundingBoxDescent)/2+o/2}var O=0,k=0;for(u===t4&&t.setAttr("direction",u),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",d),t.setAttr("textAlign",z9),l===e4?f=(this.getHeight()-n*o-i*2)/2:l===lk&&(f=this.getHeight()-n*o-i*2),t.translate(i,f+i),p=0;p<n;p++){var O=0,k=0,C=r[p],S=C.text,x=C.width,P=C.lastInParagraph,T,L,M;if(t.save(),v===uk?O+=w-x-i*2:v===tk&&(O+=(w-x-i*2)/2),m){t.save(),t.beginPath();let H=hg.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2);const R=O,D=g+k+H;t.moveTo(R,D),T=S.split(" ").length-1,L=T===0,M=v===oc&&!P?w-i*2:x,t.lineTo(R+Math.round(M),D),t.lineWidth=a/15;const z=this._getLinearGradient();t.strokeStyle=z||h,t.stroke(),t.restore()}if(y){t.save(),t.beginPath();let H=hg.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(O,g+k+H),T=S.split(" ").length-1,L=T===0,M=v===oc&&P&&!L?w-i*2:x,t.lineTo(O+Math.round(M),g+k+H),t.lineWidth=a/15;const R=this._getLinearGradient();t.strokeStyle=R||h,t.stroke(),t.restore()}if(u!==t4&&(_!==0||v===oc)){T=S.split(" ").length-1;for(var U=F9(S),$=0;$<U.length;$++){var Z=U[$];Z===" "&&!P&&v===oc&&(O+=(w-i*2-x)/T),this._partialTextX=O,this._partialTextY=g+k,this._partialText=Z,t.fillStrokeShape(this),O+=this.measureSize(Z).width+_}}else _!==0&&t.setAttr("letterSpacing",`${_}px`),this._partialTextX=O,this._partialTextY=g+k,this._partialText=S,t.fillStrokeShape(this);t.restore(),n>1&&(g+=o)}}}_hitFunc(t){var r=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,r,n),t.closePath(),t.fillStrokeShape(this)}setText(t){var r=Rm.Util._isString(t)?t:t==null?"":t+"";return this._setAttr(ik,r),this}getWidth(){var t=this.attrs.width===ws||this.attrs.width===void 0;return t?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var t=this.attrs.height===ws||this.attrs.height===void 0;return t?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Rm.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var r=gg(),n=this.fontSize(),i;return r.save(),r.font=this._getContextFont(),i=r.measureText(t),r.restore(),{actualBoundingBoxAscent:i.actualBoundingBoxAscent,actualBoundingBoxDescent:i.actualBoundingBoxDescent,actualBoundingBoxLeft:i.actualBoundingBoxLeft,actualBoundingBoxRight:i.actualBoundingBoxRight,alphabeticBaseline:i.alphabeticBaseline,emHeightAscent:i.emHeightAscent,emHeightDescent:i.emHeightDescent,fontBoundingBoxAscent:i.fontBoundingBoxAscent,fontBoundingBoxDescent:i.fontBoundingBoxDescent,hangingBaseline:i.hangingBaseline,ideographicBaseline:i.ideographicBaseline,width:i.width,height:n}}_getContextFont(){return this.fontStyle()+zd+this.fontVariant()+zd+(this.fontSize()+sk)+hk(this.fontFamily())}_addTextLine(t){this.align()===oc&&(t=t.trim());var n=this._getTextWidth(t);return this.textArr.push({text:t,width:n,lastInParagraph:!1})}_getTextWidth(t){var r=this.letterSpacing(),n=t.length;return gg().measureText(t).width+(n?r*(n-1):0)}_setTextData(){var t=this.text().split(`
|
|
43
|
-
`),r=+this.fontSize(),n=0,i=this.lineHeight()*r,a=this.attrs.width,o=this.attrs.height,l=a!==ws&&a!==void 0,u=o!==ws&&o!==void 0,f=this.padding(),v=a-f*2,w=o-f*2,_=0,h=this.wrap(),E=h!==r4,m=h!==fk&&E,y=this.ellipsis();this.textArr=[],gg().font=this._getContextFont();for(var p=y?this._getTextWidth(pg):0,g=0,d=t.length;g<d;++g){var b=t[g],O=this._getTextWidth(b);if(l&&O>v)for(;b.length>0;){for(var k=0,C=b.length,S="",x=0;k<C;){var P=k+C>>>1,T=b.slice(0,P+1),L=this._getTextWidth(T)+p;L<=v?(k=P+1,S=T,x=L):C=P}if(S){if(m){var M,U=b[S.length],$=U===zd||U===J5;$&&x<=v?M=S.length:M=Math.max(S.lastIndexOf(zd),S.lastIndexOf(J5))+1,M>0&&(k=M,S=S.slice(0,k),x=this._getTextWidth(S))}S=S.trimRight(),this._addTextLine(S),n=Math.max(n,x),_+=i;var Z=this._shouldHandleEllipsis(_);if(Z){this._tryToAddEllipsisToLastLine();break}if(b=b.slice(k),b=b.trimLeft(),b.length>0&&(O=this._getTextWidth(b),O<=v)){this._addTextLine(b),_+=i,n=Math.max(n,O);break}}else break}else this._addTextLine(b),_+=i,n=Math.max(n,O),this._shouldHandleEllipsis(_)&&g<d-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),u&&_+i>w)break}this.textHeight=r,this.textWidth=n}_shouldHandleEllipsis(t){var r=+this.fontSize(),n=this.lineHeight()*r,i=this.attrs.height,a=i!==ws&&i!==void 0,o=this.padding(),l=i-o*2,u=this.wrap(),f=u!==r4;return!f||a&&t+n>l}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,r=t!==ws&&t!==void 0,n=this.padding(),i=t-n*2,a=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(!(!o||!a)){if(r){var l=this._getTextWidth(o.text+pg)<i;l||(o.text=o.text.slice(0,o.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(o.text+pg)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,r=this.hasShadow();return t&&r?!0:super._useBufferCanvas()}};kl.Text=cr;cr.prototype._fillFunc=pk;cr.prototype._strokeFunc=gk;cr.prototype.className=ak;cr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,ek._registerNode)(cr);on.Factory.overWriteSetter(cr,"width",(0,Vo.getNumberOrAutoValidator)());on.Factory.overWriteSetter(cr,"height",(0,Vo.getNumberOrAutoValidator)());on.Factory.addGetterSetter(cr,"direction",j9);on.Factory.addGetterSetter(cr,"fontFamily","Arial");on.Factory.addGetterSetter(cr,"fontSize",12,(0,Vo.getNumberValidator)());on.Factory.addGetterSetter(cr,"fontStyle",B9);on.Factory.addGetterSetter(cr,"fontVariant",B9);on.Factory.addGetterSetter(cr,"padding",0,(0,Vo.getNumberValidator)());on.Factory.addGetterSetter(cr,"align",z9);on.Factory.addGetterSetter(cr,"verticalAlign",ok);on.Factory.addGetterSetter(cr,"lineHeight",1,(0,Vo.getNumberValidator)());on.Factory.addGetterSetter(cr,"wrap",ck);on.Factory.addGetterSetter(cr,"ellipsis",!1,(0,Vo.getBooleanValidator)());on.Factory.addGetterSetter(cr,"letterSpacing",0,(0,Vo.getNumberValidator)());on.Factory.addGetterSetter(cr,"text","",(0,Vo.getStringValidator)());on.Factory.addGetterSetter(cr,"textDecoration","");var Gp={};Object.defineProperty(Gp,"__esModule",{value:!0});Gp.TextPath=void 0;const vg=ir,Hi=vt,mk=Ar,lc=Eu,mg=kl,H9=Ye,yk=gt;var bk="",G9="normal";function $9(e){e.fillText(this.partialText,0,0)}function V9(e){e.strokeText(this.partialText,0,0)}let kr=class extends mk.Shape{constructor(t){super(t),this.dummyCanvas=vg.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 lc.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;const r=this.pathLength;return t-1>r?null:lc.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=lc.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var r=this.textDecoration(),n=this.fill(),i=this.fontSize(),a=this.glyphInfo;r==="underline"&&t.beginPath();for(var o=0;o<a.length;o++){t.save();var l=a[o].p0;t.translate(l.x,l.y),t.rotate(a[o].rotation),this.partialText=a[o].text,t.fillStrokeShape(this),r==="underline"&&(o===0&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}r==="underline"&&(t.strokeStyle=n,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var r=this.glyphInfo;if(r.length>=1){var n=r[0].p0;t.moveTo(n.x,n.y)}for(var i=0;i<r.length;i++){var a=r[i].p1;t.lineTo(a.x,a.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return vg.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return mg.Text.prototype.setText.call(this,t)}_getContextFont(){return mg.Text.prototype._getContextFont.call(this)}_getTextSize(t){var r=this.dummyCanvas,n=r.getContext("2d");n.save(),n.font=this._getContextFont();var i=n.measureText(t);return n.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:r}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=r,this.glyphInfo=[],!this.attrs.data)return null;const n=this.letterSpacing(),i=this.align(),a=this.kerningFunc(),o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);let l=0;i==="center"&&(l=Math.max(0,this.pathLength/2-o/2)),i==="right"&&(l=Math.max(0,this.pathLength-o));const u=(0,mg.stringToArray)(this.text());let f=l;for(var v=0;v<u.length;v++){const w=this._getPointAtLength(f);if(!w)return;let _=this._getTextSize(u[v]).width+n;if(u[v]===" "&&i==="justify"){const g=this.text().split(" ").length-1;_+=(this.pathLength-o)/g}const h=this._getPointAtLength(f+_);if(!h)return;const E=lc.Path.getLineLength(w.x,w.y,h.x,h.y);let m=0;if(a)try{m=a(u[v-1],u[v])*this.fontSize()}catch{m=0}w.x+=m,h.x+=m,this.textWidth+=m;const y=lc.Path.getPointOnLine(m+E/2,w.x,w.y,h.x,h.y),p=Math.atan2(h.y-w.y,h.x-w.x);this.glyphInfo.push({transposeX:y.x,transposeY:y.y,text:u[v],rotation:p,p0:w,p1:h}),f+=_}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach(function(v){t.push(v.p0.x),t.push(v.p0.y),t.push(v.p1.x),t.push(v.p1.y)});for(var r=t[0]||0,n=t[0]||0,i=t[1]||0,a=t[1]||0,o,l,u=0;u<t.length/2;u++)o=t[u*2],l=t[u*2+1],r=Math.min(r,o),n=Math.max(n,o),i=Math.min(i,l),a=Math.max(a,l);var f=this.fontSize();return{x:r-f/2,y:i-f/2,width:n-r+f,height:a-i+f}}destroy(){return vg.Util.releaseCanvas(this.dummyCanvas),super.destroy()}};Gp.TextPath=kr;kr.prototype._fillFunc=$9;kr.prototype._strokeFunc=V9;kr.prototype._fillFuncHit=$9;kr.prototype._strokeFuncHit=V9;kr.prototype.className="TextPath";kr.prototype._attrsAffectingSize=["text","fontSize","data"];(0,yk._registerNode)(kr);Hi.Factory.addGetterSetter(kr,"data");Hi.Factory.addGetterSetter(kr,"fontFamily","Arial");Hi.Factory.addGetterSetter(kr,"fontSize",12,(0,H9.getNumberValidator)());Hi.Factory.addGetterSetter(kr,"fontStyle",G9);Hi.Factory.addGetterSetter(kr,"align","left");Hi.Factory.addGetterSetter(kr,"letterSpacing",0,(0,H9.getNumberValidator)());Hi.Factory.addGetterSetter(kr,"textBaseline","middle");Hi.Factory.addGetterSetter(kr,"fontVariant",G9);Hi.Factory.addGetterSetter(kr,"text",bk);Hi.Factory.addGetterSetter(kr,"textDecoration",null);Hi.Factory.addGetterSetter(kr,"kerningFunc",null);var $p={};Object.defineProperty($p,"__esModule",{value:!0});$p.Transformer=void 0;const Dt=ir,At=vt,n4=Qt,_k=Ar,wk=Sf,i4=wu,Ci=gt,qo=Ye,Sk=gt;var q9="tr-konva",Ek=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(e=>e+`.${q9}`).join(" "),a4="nodesRect",Ok=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],xk={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const Pk="ontouchstart"in Ci.Konva._global;function Ck(e,t,r){if(e==="rotater")return r;t+=Dt.Util.degToRad(xk[e]||0);var n=(Dt.Util.radToDeg(t)%360+360)%360;return Dt.Util._inRange(n,315+22.5,360)||Dt.Util._inRange(n,0,22.5)?"ns-resize":Dt.Util._inRange(n,45-22.5,45+22.5)?"nesw-resize":Dt.Util._inRange(n,90-22.5,90+22.5)?"ew-resize":Dt.Util._inRange(n,135-22.5,135+22.5)?"nwse-resize":Dt.Util._inRange(n,180-22.5,180+22.5)?"ns-resize":Dt.Util._inRange(n,225-22.5,225+22.5)?"nesw-resize":Dt.Util._inRange(n,270-22.5,270+22.5)?"ew-resize":Dt.Util._inRange(n,315-22.5,315+22.5)?"nwse-resize":(Dt.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var Hh=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],o4=1e8;function Tk(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function W9(e,t,r){const n=r.x+(e.x-r.x)*Math.cos(t)-(e.y-r.y)*Math.sin(t),i=r.y+(e.x-r.x)*Math.sin(t)+(e.y-r.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:n,y:i}}function Ak(e,t){const r=Tk(e);return W9(e,t,r)}function kk(e,t,r){let n=t;for(let i=0;i<e.length;i++){const a=Ci.Konva.getAngle(e[i]),o=Math.abs(a-t)%(Math.PI*2);Math.min(o,Math.PI*2-o)<r&&(n=a)}return n}let Lm=0,Et=class extends i4.Group{constructor(t){super(t),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(Ek,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return Dt.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return q9+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const r=t.filter(i=>i.isAncestorOf(this)?(Dt.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=t=r,t.length===1&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const a=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},o=i._attrsAffectingSize.map(l=>l+"Change."+this._getEventNamespace()).join(" ");i.on(o,a),i.on(Ok.map(l=>l+`.${this._getEventNamespace()}`).join(" "),a),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,a),this._proxyDrag(i)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(t){let r;t.on(`dragstart.${this._getEventNamespace()}`,n=>{r=t.getAbsolutePosition(),!this.isDragging()&&t!==this.findOne(".back")&&this.startDrag(n,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!r)return;const i=t.getAbsolutePosition(),a=i.x-r.x,o=i.y-r.y;this.nodes().forEach(l=>{if(l===t||l.isDragging())return;const u=l.getAbsolutePosition();l.setAbsolutePosition({x:u.x+a,y:u.y+o}),l.startDrag(n)}),r=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(a4),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(a4,this.__getNodeRect)}__getNodeShape(t,r=this.rotation(),n){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),a=t.getAbsoluteScale(n),o=t.getAbsolutePosition(n),l=i.x*a.x-t.offsetX()*a.x,u=i.y*a.y-t.offsetY()*a.y;const f=(Ci.Konva.getAngle(t.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),v={x:o.x+l*Math.cos(f)+u*Math.sin(-f),y:o.y+u*Math.cos(f)+l*Math.sin(f),width:i.width*a.x,height:i.height*a.y,rotation:f};return W9(v,-Ci.Konva.getAngle(r),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-o4,y:-o4,width:0,height:0,rotation:0};const r=[];this.nodes().map(f=>{const v=f.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var w=[{x:v.x,y:v.y},{x:v.x+v.width,y:v.y},{x:v.x+v.width,y:v.y+v.height},{x:v.x,y:v.y+v.height}],_=f.getAbsoluteTransform();w.forEach(function(h){var E=_.point(h);r.push(E)})});const n=new Dt.Transform;n.rotate(-Ci.Konva.getAngle(this.rotation()));var i=1/0,a=1/0,o=-1/0,l=-1/0;r.forEach(function(f){var v=n.point(f);i===void 0&&(i=o=v.x,a=l=v.y),i=Math.min(i,v.x),a=Math.min(a,v.y),o=Math.max(o,v.x),l=Math.max(l,v.y)}),n.invert();const u=n.point({x:i,y:a});return{x:u.x,y:u.y,width:o-i,height:l-a,rotation:Ci.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(),Hh.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){var r=new wk.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:Pk?10:"auto"}),n=this;r.on("mousedown touchstart",function(i){n._handleMouseDown(i)}),r.on("dragstart",i=>{r.stopDrag(),i.cancelBubble=!0}),r.on("dragend",i=>{i.cancelBubble=!0}),r.on("mouseenter",()=>{var i=Ci.Konva.getAngle(this.rotation()),a=this.rotateAnchorCursor(),o=Ck(t,i,a);r.getStage().content&&(r.getStage().content.style.cursor=o),this._cursorChange=!0}),r.on("mouseout",()=>{r.getStage().content&&(r.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(r)}_createBack(){var t=new _k.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(r,n){var i=n.getParent(),a=i.padding();r.beginPath(),r.rect(-a,-a,n.width()+a*2,n.height()+a*2),r.moveTo(n.width()/2,-a),i.rotateEnabled()&&i.rotateLineVisible()&&r.lineTo(n.width()/2,-i.rotateAnchorOffset()*Dt.Util._sign(n.height())-a),r.fillStrokeShape(n)},hitFunc:(r,n)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();r.beginPath(),r.rect(-i,-i,n.width()+i*2,n.height()+i*2),r.fillStrokeShape(n)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",r=>{r.cancelBubble=!0}),t.on("dragmove",r=>{r.cancelBubble=!0}),t.on("dragend",r=>{r.cancelBubble=!0}),this.on("dragmove",r=>{this.update()})}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var r=this._getNodeRect(),n=r.width,i=r.height,a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=Math.abs(i/a),this.cos=Math.abs(n/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;var o=t.target.getAbsolutePosition(),l=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:l.x-o.x,y:l.y-o.y},Lm++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(u=>{u._fire("transformstart",{evt:t.evt,target:u})})}_handleMouseMove(t){var r,n,i,a=this.findOne("."+this._movingAnchorName),o=a.getStage();o.setPointersPositions(t);const l=o.getPointerPosition();let u={x:l.x-this._anchorDragOffset.x,y:l.y-this._anchorDragOffset.y};const f=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(u=this.anchorDragBoundFunc()(f,u,t)),a.setAbsolutePosition(u);const v=a.getAbsolutePosition();if(!(f.x===v.x&&f.y===v.y)){if(this._movingAnchorName==="rotater"){var w=this._getNodeRect();r=a.x()-w.width/2,n=-a.y()+w.height/2;let M=Math.atan2(-n,r)+Math.PI/2;w.height<0&&(M-=Math.PI);var _=Ci.Konva.getAngle(this.rotation());const U=_+M,$=Ci.Konva.getAngle(this.rotationSnapTolerance()),B=kk(this.rotationSnaps(),U,$)-w.rotation,N=Ak(w,B);this._fitNodesInto(N,t);return}var h=this.shiftBehavior(),E;h==="inverted"?E=this.keepRatio()&&!t.shiftKey:h==="none"?E=this.keepRatio():E=this.keepRatio()||t.shiftKey;var d=this.centeredScaling()||t.altKey;if(this._movingAnchorName==="top-left"){if(E){var m=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(m.x-a.x(),2)+Math.pow(m.y-a.y(),2));var y=this.findOne(".top-left").x()>m.x?-1:1,p=this.findOne(".top-left").y()>m.y?-1:1;r=i*this.cos*y,n=i*this.sin*p,this.findOne(".top-left").x(m.x-r),this.findOne(".top-left").y(m.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(a.y());else if(this._movingAnchorName==="top-right"){if(E){var m=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(a.x()-m.x,2)+Math.pow(m.y-a.y(),2));var y=this.findOne(".top-right").x()<m.x?-1:1,p=this.findOne(".top-right").y()>m.y?-1:1;r=i*this.cos*y,n=i*this.sin*p,this.findOne(".top-right").x(m.x+r),this.findOne(".top-right").y(m.y-n)}var g=a.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.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(E){var m=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(m.x-a.x(),2)+Math.pow(a.y()-m.y,2));var y=m.x<a.x()?-1:1,p=a.y()<m.y?-1:1;r=i*this.cos*y,n=i*this.sin*p,a.x(m.x-r),a.y(m.y+n)}g=a.position(),this.findOne(".top-left").x(g.x),this.findOne(".bottom-right").y(g.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(a.y());else if(this._movingAnchorName==="bottom-right"){if(E){var m=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(a.x()-m.x,2)+Math.pow(a.y()-m.y,2));var y=this.findOne(".bottom-right").x()<m.x?-1:1,p=this.findOne(".bottom-right").y()<m.y?-1:1;r=i*this.cos*y,n=i*this.sin*p,this.findOne(".bottom-right").x(m.x+r),this.findOne(".bottom-right").y(m.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var d=this.centeredScaling()||t.altKey;if(d){var b=this.findOne(".top-left"),O=this.findOne(".bottom-right"),k=b.x(),C=b.y(),S=this.getWidth()-O.x(),x=this.getHeight()-O.y();O.move({x:-k,y:-C}),b.move({x:S,y:x})}var P=this.findOne(".top-left").getAbsolutePosition();r=P.x,n=P.y;var T=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),L=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:r,y:n,width:T,height:L,rotation:Ci.Konva.getAngle(this.rotation())},t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var r;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));var n=this.getNode();Lm--,this._fire("transformend",{evt:t,target:n}),(r=this.getLayer())===null||r===void 0||r.batchDraw(),n&&this._nodes.forEach(i=>{var a;i._fire("transformend",{evt:t,target:i}),(a=i.getLayer())===null||a===void 0||a.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,r){var n=this._getNodeRect();const i=1;if(Dt.Util._inRange(t.width,-this.padding()*2-i,i)){this.update();return}if(Dt.Util._inRange(t.height,-this.padding()*2-i,i)){this.update();return}var a=new Dt.Transform;if(a.rotate(Ci.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const _=a.point({x:-this.padding()*2,y:0});t.x+=_.x,t.y+=_.y,t.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const _=a.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,t.width+=this.padding()*2}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const _=a.point({x:0,y:-this.padding()*2});t.x+=_.x,t.y+=_.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,t.height+=this.padding()*2}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const _=a.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=_.x,this._anchorDragOffset.y-=_.y,t.height+=this.padding()*2}if(this.boundBoxFunc()){const _=this.boundBoxFunc()(n,t);_?t=_:Dt.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const o=1e7,l=new Dt.Transform;l.translate(n.x,n.y),l.rotate(n.rotation),l.scale(n.width/o,n.height/o);const u=new Dt.Transform,f=t.width/o,v=t.height/o;this.flipEnabled()===!1?(u.translate(t.x,t.y),u.rotate(t.rotation),u.translate(t.width<0?t.width:0,t.height<0?t.height:0),u.scale(Math.abs(f),Math.abs(v))):(u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(f,v));const w=u.multiply(l.invert());this._nodes.forEach(_=>{var h;const E=_.getParent().getAbsoluteTransform(),m=_.getTransform().copy();m.translate(_.offsetX(),_.offsetY());const y=new Dt.Transform;y.multiply(E.copy().invert()).multiply(w).multiply(E).multiply(m);const p=y.decompose();_.setAttrs(p),(h=_.getLayer())===null||h===void 0||h.batchDraw()}),this.rotation(Dt.Util._getRotation(t.rotation)),this._nodes.forEach(_=>{this._fire("transform",{evt:r,target:_}),_._fire("transform",{evt:r,target:_})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,r){this.findOne(t).setAttrs(r)}update(){var t,r=this._getNodeRect();this.rotation(Dt.Util._getRotation(r.rotation));var n=r.width,i=r.height,a=this.enabledAnchors(),o=this.resizeEnabled(),l=this.padding(),u=this.anchorSize();const f=this.find("._anchor");f.forEach(w=>{w.setAttrs({width:u,height:u,offsetX:u/2,offsetY:u/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:u/2+l,offsetY:u/2+l,visible:o&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:u/2+l,visible:o&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:u/2-l,offsetY:u/2+l,visible:o&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:u/2+l,visible:o&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:u/2-l,visible:o&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:u/2+l,offsetY:u/2-l,visible:o&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:u/2-l,visible:o&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:u/2-l,offsetY:u/2-l,visible:o&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*Dt.Util._sign(i)-l,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const v=this.anchorStyleFunc();v&&f.forEach(w=>{v(w)}),(t=this.getLayer())===null||t===void 0||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),i4.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return n4.Node.prototype.toObject.call(this)}clone(t){var r=n4.Node.prototype.clone.call(this,t);return r}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};$p.Transformer=Et;Et.isTransforming=()=>Lm>0;function Rk(e){return e instanceof Array||Dt.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach(function(t){Hh.indexOf(t)===-1&&Dt.Util.warn("Unknown anchor name: "+t+". Available names are: "+Hh.join(", "))}),e||[]}Et.prototype.className="Transformer";(0,Sk._registerNode)(Et);At.Factory.addGetterSetter(Et,"enabledAnchors",Hh,Rk);At.Factory.addGetterSetter(Et,"flipEnabled",!0,(0,qo.getBooleanValidator)());At.Factory.addGetterSetter(Et,"resizeEnabled",!0);At.Factory.addGetterSetter(Et,"anchorSize",10,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"rotateEnabled",!0);At.Factory.addGetterSetter(Et,"rotateLineVisible",!0);At.Factory.addGetterSetter(Et,"rotationSnaps",[]);At.Factory.addGetterSetter(Et,"rotateAnchorOffset",50,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"rotateAnchorCursor","crosshair");At.Factory.addGetterSetter(Et,"rotationSnapTolerance",5,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"borderEnabled",!0);At.Factory.addGetterSetter(Et,"anchorStroke","rgb(0, 161, 255)");At.Factory.addGetterSetter(Et,"anchorStrokeWidth",1,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"anchorFill","white");At.Factory.addGetterSetter(Et,"anchorCornerRadius",0,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"borderStroke","rgb(0, 161, 255)");At.Factory.addGetterSetter(Et,"borderStrokeWidth",1,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"borderDash");At.Factory.addGetterSetter(Et,"keepRatio",!0);At.Factory.addGetterSetter(Et,"shiftBehavior","default");At.Factory.addGetterSetter(Et,"centeredScaling",!1);At.Factory.addGetterSetter(Et,"ignoreStroke",!1);At.Factory.addGetterSetter(Et,"padding",0,(0,qo.getNumberValidator)());At.Factory.addGetterSetter(Et,"node");At.Factory.addGetterSetter(Et,"nodes");At.Factory.addGetterSetter(Et,"boundBoxFunc");At.Factory.addGetterSetter(Et,"anchorDragBoundFunc");At.Factory.addGetterSetter(Et,"anchorStyleFunc");At.Factory.addGetterSetter(Et,"shouldOverdrawWholeArea",!1);At.Factory.addGetterSetter(Et,"useSingleNodeRotation",!0);At.Factory.backCompat(Et,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var Vp={};Object.defineProperty(Vp,"__esModule",{value:!0});Vp.Wedge=void 0;const qp=vt,Lk=Ar,Mk=gt,Y9=Ye,Nk=gt;let qa=class extends Lk.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,Mk.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}};Vp.Wedge=qa;qa.prototype.className="Wedge";qa.prototype._centroid=!0;qa.prototype._attrsAffectingSize=["radius"];(0,Nk._registerNode)(qa);qp.Factory.addGetterSetter(qa,"radius",0,(0,Y9.getNumberValidator)());qp.Factory.addGetterSetter(qa,"angle",0,(0,Y9.getNumberValidator)());qp.Factory.addGetterSetter(qa,"clockwise",!1);qp.Factory.backCompat(qa,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0});Wp.Blur=void 0;const l4=vt,Ik=Qt,Dk=Ye;function s4(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Fk=[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],jk=[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 zk(e,t){var r=e.data,n=e.width,i=e.height,a,o,l,u,f,v,w,_,h,E,m,y,p,g,d,b,O,k,C,S,x,P,T,L,M=t+t+1,U=n-1,$=i-1,Z=t+1,B=Z*(Z+1)/2,N=new s4,H=null,R=N,D=null,z=null,F=Fk[t],V=jk[t];for(l=1;l<M;l++)R=R.next=new s4,l===Z&&(H=R);for(R.next=N,w=v=0,o=0;o<i;o++){for(b=O=k=C=_=h=E=m=0,y=Z*(S=r[v]),p=Z*(x=r[v+1]),g=Z*(P=r[v+2]),d=Z*(T=r[v+3]),_+=B*S,h+=B*x,E+=B*P,m+=B*T,R=N,l=0;l<Z;l++)R.r=S,R.g=x,R.b=P,R.a=T,R=R.next;for(l=1;l<Z;l++)u=v+((U<l?U:l)<<2),_+=(R.r=S=r[u])*(L=Z-l),h+=(R.g=x=r[u+1])*L,E+=(R.b=P=r[u+2])*L,m+=(R.a=T=r[u+3])*L,b+=S,O+=x,k+=P,C+=T,R=R.next;for(D=N,z=H,a=0;a<n;a++)r[v+3]=T=m*F>>V,T!==0?(T=255/T,r[v]=(_*F>>V)*T,r[v+1]=(h*F>>V)*T,r[v+2]=(E*F>>V)*T):r[v]=r[v+1]=r[v+2]=0,_-=y,h-=p,E-=g,m-=d,y-=D.r,p-=D.g,g-=D.b,d-=D.a,u=w+((u=a+t+1)<U?u:U)<<2,b+=D.r=r[u],O+=D.g=r[u+1],k+=D.b=r[u+2],C+=D.a=r[u+3],_+=b,h+=O,E+=k,m+=C,D=D.next,y+=S=z.r,p+=x=z.g,g+=P=z.b,d+=T=z.a,b-=S,O-=x,k-=P,C-=T,z=z.next,v+=4;w+=n}for(a=0;a<n;a++){for(O=k=C=b=h=E=m=_=0,v=a<<2,y=Z*(S=r[v]),p=Z*(x=r[v+1]),g=Z*(P=r[v+2]),d=Z*(T=r[v+3]),_+=B*S,h+=B*x,E+=B*P,m+=B*T,R=N,l=0;l<Z;l++)R.r=S,R.g=x,R.b=P,R.a=T,R=R.next;for(f=n,l=1;l<=t;l++)v=f+a<<2,_+=(R.r=S=r[v])*(L=Z-l),h+=(R.g=x=r[v+1])*L,E+=(R.b=P=r[v+2])*L,m+=(R.a=T=r[v+3])*L,b+=S,O+=x,k+=P,C+=T,R=R.next,l<$&&(f+=n);for(v=a,D=N,z=H,o=0;o<i;o++)u=v<<2,r[u+3]=T=m*F>>V,T>0?(T=255/T,r[u]=(_*F>>V)*T,r[u+1]=(h*F>>V)*T,r[u+2]=(E*F>>V)*T):r[u]=r[u+1]=r[u+2]=0,_-=y,h-=p,E-=g,m-=d,y-=D.r,p-=D.g,g-=D.b,d-=D.a,u=a+((u=o+Z)<$?u:$)*n<<2,_+=b+=D.r=r[u],h+=O+=D.g=r[u+1],E+=k+=D.b=r[u+2],m+=C+=D.a=r[u+3],D=D.next,y+=S=z.r,p+=x=z.g,g+=P=z.b,d+=T=z.a,b-=S,O-=x,k-=P,C-=T,z=z.next,v+=n}}const Bk=function(t){var r=Math.round(this.blurRadius());r>0&&zk(t,r)};Wp.Blur=Bk;l4.Factory.addGetterSetter(Ik.Node,"blurRadius",0,(0,Dk.getNumberValidator)(),l4.Factory.afterSetFilter);var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.Brighten=void 0;const u4=vt,Uk=Qt,Hk=Ye,Gk=function(e){var t=this.brightness()*255,r=e.data,n=r.length,i;for(i=0;i<n;i+=4)r[i]+=t,r[i+1]+=t,r[i+2]+=t};Yp.Brighten=Gk;u4.Factory.addGetterSetter(Uk.Node,"brightness",0,(0,Hk.getNumberValidator)(),u4.Factory.afterSetFilter);var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.Contrast=void 0;const c4=vt,$k=Qt,Vk=Ye,qk=function(e){var t=Math.pow((this.contrast()+100)/100,2),r=e.data,n=r.length,i=150,a=150,o=150,l;for(l=0;l<n;l+=4)i=r[l],a=r[l+1],o=r[l+2],i/=255,i-=.5,i*=t,i+=.5,i*=255,a/=255,a-=.5,a*=t,a+=.5,a*=255,o/=255,o-=.5,o*=t,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,r[l]=i,r[l+1]=a,r[l+2]=o};Kp.Contrast=qk;c4.Factory.addGetterSetter($k.Node,"contrast",0,(0,Vk.getNumberValidator)(),c4.Factory.afterSetFilter);var Xp={};Object.defineProperty(Xp,"__esModule",{value:!0});Xp.Emboss=void 0;const Io=vt,Zp=Qt,Wk=ir,K9=Ye,Yk=function(e){var t=this.embossStrength()*10,r=this.embossWhiteLevel()*255,n=this.embossDirection(),i=this.embossBlend(),a=0,o=0,l=e.data,u=e.width,f=e.height,v=u*4,w=f;switch(n){case"top-left":a=-1,o=-1;break;case"top":a=-1,o=0;break;case"top-right":a=-1,o=1;break;case"right":a=0,o=1;break;case"bottom-right":a=1,o=1;break;case"bottom":a=1,o=0;break;case"bottom-left":a=1,o=-1;break;case"left":a=0,o=-1;break;default:Wk.Util.error("Unknown emboss direction: "+n)}do{var _=(w-1)*v,h=a;w+h<1&&(h=0),w+h>f&&(h=0);var E=(w-1+h)*u*4,m=u;do{var y=_+(m-1)*4,p=o;m+p<1&&(p=0),m+p>u&&(p=0);var g=E+(m-1+p)*4,d=l[y]-l[g],b=l[y+1]-l[g+1],O=l[y+2]-l[g+2],k=d,C=k>0?k:-k,S=b>0?b:-b,x=O>0?O:-O;if(S>C&&(k=b),x>C&&(k=O),k*=t,i){var P=l[y]+k,T=l[y+1]+k,L=l[y+2]+k;l[y]=P>255?255:P<0?0:P,l[y+1]=T>255?255:T<0?0:T,l[y+2]=L>255?255:L<0?0:L}else{var M=r-k;M<0?M=0:M>255&&(M=255),l[y]=l[y+1]=l[y+2]=M}}while(--m)}while(--w)};Xp.Emboss=Yk;Io.Factory.addGetterSetter(Zp.Node,"embossStrength",.5,(0,K9.getNumberValidator)(),Io.Factory.afterSetFilter);Io.Factory.addGetterSetter(Zp.Node,"embossWhiteLevel",.5,(0,K9.getNumberValidator)(),Io.Factory.afterSetFilter);Io.Factory.addGetterSetter(Zp.Node,"embossDirection","top-left",null,Io.Factory.afterSetFilter);Io.Factory.addGetterSetter(Zp.Node,"embossBlend",!1,null,Io.Factory.afterSetFilter);var Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.Enhance=void 0;const f4=vt,Kk=Qt,Xk=Ye;function yg(e,t,r,n,i){var a=r-t,o=i-n,l;return a===0?n+o/2:o===0?n:(l=(e-t)/a,l=o*l+n,l)}const Zk=function(e){var t=e.data,r=t.length,n=t[0],i=n,a,o=t[1],l=o,u,f=t[2],v=f,w,_,h=this.enhance();if(h!==0){for(_=0;_<r;_+=4)a=t[_+0],a<n?n=a:a>i&&(i=a),u=t[_+1],u<o?o=u:u>l&&(l=u),w=t[_+2],w<f?f=w:w>v&&(v=w);i===n&&(i=255,n=0),l===o&&(l=255,o=0),v===f&&(v=255,f=0);var E,m,y,p,g,d,b,O,k;for(h>0?(m=i+h*(255-i),y=n-h*(n-0),g=l+h*(255-l),d=o-h*(o-0),O=v+h*(255-v),k=f-h*(f-0)):(E=(i+n)*.5,m=i+h*(i-E),y=n+h*(n-E),p=(l+o)*.5,g=l+h*(l-p),d=o+h*(o-p),b=(v+f)*.5,O=v+h*(v-b),k=f+h*(f-b)),_=0;_<r;_+=4)t[_+0]=yg(t[_+0],n,i,y,m),t[_+1]=yg(t[_+1],o,l,d,g),t[_+2]=yg(t[_+2],f,v,k,O)}};Qp.Enhance=Zk;f4.Factory.addGetterSetter(Kk.Node,"enhance",0,(0,Xk.getNumberValidator)(),f4.Factory.afterSetFilter);var Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.Grayscale=void 0;const Qk=function(e){var t=e.data,r=t.length,n,i;for(n=0;n<r;n+=4)i=.34*t[n]+.5*t[n+1]+.16*t[n+2],t[n]=i,t[n+1]=i,t[n+2]=i};Jp.Grayscale=Qk;var e0={};Object.defineProperty(e0,"__esModule",{value:!0});e0.HSL=void 0;const ou=vt,u2=Qt,c2=Ye;ou.Factory.addGetterSetter(u2.Node,"hue",0,(0,c2.getNumberValidator)(),ou.Factory.afterSetFilter);ou.Factory.addGetterSetter(u2.Node,"saturation",0,(0,c2.getNumberValidator)(),ou.Factory.afterSetFilter);ou.Factory.addGetterSetter(u2.Node,"luminance",0,(0,c2.getNumberValidator)(),ou.Factory.afterSetFilter);const Jk=function(e){var t=e.data,r=t.length,n=1,i=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,o=this.luminance()*127,l,u=n*i*Math.cos(a*Math.PI/180),f=n*i*Math.sin(a*Math.PI/180),v=.299*n+.701*u+.167*f,w=.587*n-.587*u+.33*f,_=.114*n-.114*u-.497*f,h=.299*n-.299*u-.328*f,E=.587*n+.413*u+.035*f,m=.114*n-.114*u+.293*f,y=.299*n-.3*u+1.25*f,p=.587*n-.586*u-1.05*f,g=.114*n+.886*u-.2*f,d,b,O,k;for(l=0;l<r;l+=4)d=t[l+0],b=t[l+1],O=t[l+2],k=t[l+3],t[l+0]=v*d+w*b+_*O+o,t[l+1]=h*d+E*b+m*O+o,t[l+2]=y*d+p*b+g*O+o,t[l+3]=k};e0.HSL=Jk;var t0={};Object.defineProperty(t0,"__esModule",{value:!0});t0.HSV=void 0;const lu=vt,f2=Qt,d2=Ye,eR=function(e){var t=e.data,r=t.length,n=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,o,l=n*i*Math.cos(a*Math.PI/180),u=n*i*Math.sin(a*Math.PI/180),f=.299*n+.701*l+.167*u,v=.587*n-.587*l+.33*u,w=.114*n-.114*l-.497*u,_=.299*n-.299*l-.328*u,h=.587*n+.413*l+.035*u,E=.114*n-.114*l+.293*u,m=.299*n-.3*l+1.25*u,y=.587*n-.586*l-1.05*u,p=.114*n+.886*l-.2*u,g,d,b,O;for(o=0;o<r;o+=4)g=t[o+0],d=t[o+1],b=t[o+2],O=t[o+3],t[o+0]=f*g+v*d+w*b,t[o+1]=_*g+h*d+E*b,t[o+2]=m*g+y*d+p*b,t[o+3]=O};t0.HSV=eR;lu.Factory.addGetterSetter(f2.Node,"hue",0,(0,d2.getNumberValidator)(),lu.Factory.afterSetFilter);lu.Factory.addGetterSetter(f2.Node,"saturation",0,(0,d2.getNumberValidator)(),lu.Factory.afterSetFilter);lu.Factory.addGetterSetter(f2.Node,"value",0,(0,d2.getNumberValidator)(),lu.Factory.afterSetFilter);var r0={};Object.defineProperty(r0,"__esModule",{value:!0});r0.Invert=void 0;const tR=function(e){var t=e.data,r=t.length,n;for(n=0;n<r;n+=4)t[n]=255-t[n],t[n+1]=255-t[n+1],t[n+2]=255-t[n+2]};r0.Invert=tR;var n0={};Object.defineProperty(n0,"__esModule",{value:!0});n0.Kaleidoscope=void 0;const Gh=vt,X9=Qt,d4=ir,Z9=Ye;var rR=function(e,t,r){var n=e.data,i=t.data,a=e.width,o=e.height,l=r.polarCenterX||a/2,u=r.polarCenterY||o/2,f,v,w,_=0,h=0,E=0,m=0,y,p=Math.sqrt(l*l+u*u);v=a-l,w=o-u,y=Math.sqrt(v*v+w*w),p=y>p?y:p;var g=o,d=a,b,O,k=360/d*Math.PI/180,C,S;for(O=0;O<d;O+=1)for(C=Math.sin(O*k),S=Math.cos(O*k),b=0;b<g;b+=1)v=Math.floor(l+p*b/g*S),w=Math.floor(u+p*b/g*C),f=(w*a+v)*4,_=n[f+0],h=n[f+1],E=n[f+2],m=n[f+3],f=(O+b*a)*4,i[f+0]=_,i[f+1]=h,i[f+2]=E,i[f+3]=m},nR=function(e,t,r){var n=e.data,i=t.data,a=e.width,o=e.height,l=r.polarCenterX||a/2,u=r.polarCenterY||o/2,f,v,w,_,h,E=0,m=0,y=0,p=0,g,d=Math.sqrt(l*l+u*u);v=a-l,w=o-u,g=Math.sqrt(v*v+w*w),d=g>d?g:d;var b=o,O=a,k,C,S=0,x,P;for(v=0;v<a;v+=1)for(w=0;w<o;w+=1)_=v-l,h=w-u,k=Math.sqrt(_*_+h*h)*b/d,C=(Math.atan2(h,_)*180/Math.PI+360+S)%360,C=C*O/360,x=Math.floor(C),P=Math.floor(k),f=(P*a+x)*4,E=n[f+0],m=n[f+1],y=n[f+2],p=n[f+3],f=(w*a+v)*4,i[f+0]=E,i[f+1]=m,i[f+2]=y,i[f+3]=p};const iR=function(e){var t=e.width,r=e.height,n,i,a,o,l,u,f,v,w,_,h=Math.round(this.kaleidoscopePower()),E=Math.round(this.kaleidoscopeAngle()),m=Math.floor(t*(E%360)/360);if(!(h<1)){var y=d4.Util.createCanvasElement();y.width=t,y.height=r;var p=y.getContext("2d").getImageData(0,0,t,r);d4.Util.releaseCanvas(y),rR(e,p,{polarCenterX:t/2,polarCenterY:r/2});for(var g=t/Math.pow(2,h);g<=8;)g=g*2,h-=1;g=Math.ceil(g);var d=g,b=0,O=d,k=1;for(m+g>t&&(b=d,O=0,k=-1),i=0;i<r;i+=1)for(n=b;n!==O;n+=k)a=Math.round(n+m)%t,w=(t*i+a)*4,l=p.data[w+0],u=p.data[w+1],f=p.data[w+2],v=p.data[w+3],_=(t*i+n)*4,p.data[_+0]=l,p.data[_+1]=u,p.data[_+2]=f,p.data[_+3]=v;for(i=0;i<r;i+=1)for(d=Math.floor(g),o=0;o<h;o+=1){for(n=0;n<d+1;n+=1)w=(t*i+n)*4,l=p.data[w+0],u=p.data[w+1],f=p.data[w+2],v=p.data[w+3],_=(t*i+d*2-n-1)*4,p.data[_+0]=l,p.data[_+1]=u,p.data[_+2]=f,p.data[_+3]=v;d*=2}nR(p,e,{polarRotation:0})}};n0.Kaleidoscope=iR;Gh.Factory.addGetterSetter(X9.Node,"kaleidoscopePower",2,(0,Z9.getNumberValidator)(),Gh.Factory.afterSetFilter);Gh.Factory.addGetterSetter(X9.Node,"kaleidoscopeAngle",0,(0,Z9.getNumberValidator)(),Gh.Factory.afterSetFilter);var i0={};Object.defineProperty(i0,"__esModule",{value:!0});i0.Mask=void 0;const h4=vt,aR=Qt,oR=Ye;function Ud(e,t,r){var n=(r*e.width+t)*4,i=[];return i.push(e.data[n++],e.data[n++],e.data[n++],e.data[n++]),i}function sc(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}function lR(e){for(var t=[0,0,0],r=0;r<e.length;r++)t[0]+=e[r][0],t[1]+=e[r][1],t[2]+=e[r][2];return t[0]/=e.length,t[1]/=e.length,t[2]/=e.length,t}function sR(e,t){var r=Ud(e,0,0),n=Ud(e,e.width-1,0),i=Ud(e,0,e.height-1),a=Ud(e,e.width-1,e.height-1),o=t||10;if(sc(r,n)<o&&sc(n,a)<o&&sc(a,i)<o&&sc(i,r)<o){for(var l=lR([n,r,a,i]),u=[],f=0;f<e.width*e.height;f++){var v=sc(l,[e.data[f*4],e.data[f*4+1],e.data[f*4+2]]);u[f]=v<o?0:255}return u}}function uR(e,t){for(var r=0;r<e.width*e.height;r++)e.data[4*r+3]=t[r]}function cR(e,t,r){for(var n=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),o=[],l=0;l<r;l++)for(var u=0;u<t;u++){for(var f=l*t+u,v=0,w=0;w<i;w++)for(var _=0;_<i;_++){var h=l+w-a,E=u+_-a;if(h>=0&&h<r&&E>=0&&E<t){var m=h*t+E,y=n[w*i+_];v+=e[m]*y}}o[f]=v===255*8?255:0}return o}function fR(e,t,r){for(var n=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),o=[],l=0;l<r;l++)for(var u=0;u<t;u++){for(var f=l*t+u,v=0,w=0;w<i;w++)for(var _=0;_<i;_++){var h=l+w-a,E=u+_-a;if(h>=0&&h<r&&E>=0&&E<t){var m=h*t+E,y=n[w*i+_];v+=e[m]*y}}o[f]=v>=255*4?255:0}return o}function dR(e,t,r){for(var n=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(n.length)),a=Math.floor(i/2),o=[],l=0;l<r;l++)for(var u=0;u<t;u++){for(var f=l*t+u,v=0,w=0;w<i;w++)for(var _=0;_<i;_++){var h=l+w-a,E=u+_-a;if(h>=0&&h<r&&E>=0&&E<t){var m=h*t+E,y=n[w*i+_];v+=e[m]*y}}o[f]=v}return o}const hR=function(e){var t=this.threshold(),r=sR(e,t);return r&&(r=cR(r,e.width,e.height),r=fR(r,e.width,e.height),r=dR(r,e.width,e.height),uR(e,r)),e};i0.Mask=hR;h4.Factory.addGetterSetter(aR.Node,"threshold",0,(0,oR.getNumberValidator)(),h4.Factory.afterSetFilter);var a0={};Object.defineProperty(a0,"__esModule",{value:!0});a0.Noise=void 0;const p4=vt,pR=Qt,gR=Ye,vR=function(e){var t=this.noise()*255,r=e.data,n=r.length,i=t/2,a;for(a=0;a<n;a+=4)r[a+0]+=i-2*i*Math.random(),r[a+1]+=i-2*i*Math.random(),r[a+2]+=i-2*i*Math.random()};a0.Noise=vR;p4.Factory.addGetterSetter(pR.Node,"noise",.2,(0,gR.getNumberValidator)(),p4.Factory.afterSetFilter);var o0={};Object.defineProperty(o0,"__esModule",{value:!0});o0.Pixelate=void 0;const g4=vt,mR=ir,yR=Qt,bR=Ye,_R=function(e){var t=Math.ceil(this.pixelSize()),r=e.width,n=e.height,i,a,o,l,u,f,v,w=Math.ceil(r/t),_=Math.ceil(n/t),h,E,m,y,p,g,d,b=e.data;if(t<=0){mR.Util.error("pixelSize value can not be <= 0");return}for(p=0;p<w;p+=1)for(g=0;g<_;g+=1){for(l=0,u=0,f=0,v=0,h=p*t,E=h+t,m=g*t,y=m+t,d=0,i=h;i<E;i+=1)if(!(i>=r))for(a=m;a<y;a+=1)a>=n||(o=(r*a+i)*4,l+=b[o+0],u+=b[o+1],f+=b[o+2],v+=b[o+3],d+=1);for(l=l/d,u=u/d,f=f/d,v=v/d,i=h;i<E;i+=1)if(!(i>=r))for(a=m;a<y;a+=1)a>=n||(o=(r*a+i)*4,b[o+0]=l,b[o+1]=u,b[o+2]=f,b[o+3]=v)}};o0.Pixelate=_R;g4.Factory.addGetterSetter(yR.Node,"pixelSize",8,(0,bR.getNumberValidator)(),g4.Factory.afterSetFilter);var l0={};Object.defineProperty(l0,"__esModule",{value:!0});l0.Posterize=void 0;const v4=vt,wR=Qt,SR=Ye,ER=function(e){var t=Math.round(this.levels()*254)+1,r=e.data,n=r.length,i=255/t,a;for(a=0;a<n;a+=1)r[a]=Math.floor(r[a]/i)*i};l0.Posterize=ER;v4.Factory.addGetterSetter(wR.Node,"levels",.5,(0,SR.getNumberValidator)(),v4.Factory.afterSetFilter);var s0={};Object.defineProperty(s0,"__esModule",{value:!0});s0.RGB=void 0;const $h=vt,h2=Qt,OR=Ye,xR=function(e){var t=e.data,r=t.length,n=this.red(),i=this.green(),a=this.blue(),o,l;for(o=0;o<r;o+=4)l=(.34*t[o]+.5*t[o+1]+.16*t[o+2])/255,t[o]=l*n,t[o+1]=l*i,t[o+2]=l*a,t[o+3]=t[o+3]};s0.RGB=xR;$h.Factory.addGetterSetter(h2.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});$h.Factory.addGetterSetter(h2.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});$h.Factory.addGetterSetter(h2.Node,"blue",0,OR.RGBComponent,$h.Factory.afterSetFilter);var u0={};Object.defineProperty(u0,"__esModule",{value:!0});u0.RGBA=void 0;const Kc=vt,c0=Qt,PR=Ye,CR=function(e){var t=e.data,r=t.length,n=this.red(),i=this.green(),a=this.blue(),o=this.alpha(),l,u;for(l=0;l<r;l+=4)u=1-o,t[l]=n*o+t[l]*u,t[l+1]=i*o+t[l+1]*u,t[l+2]=a*o+t[l+2]*u};u0.RGBA=CR;Kc.Factory.addGetterSetter(c0.Node,"red",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Kc.Factory.addGetterSetter(c0.Node,"green",0,function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)});Kc.Factory.addGetterSetter(c0.Node,"blue",0,PR.RGBComponent,Kc.Factory.afterSetFilter);Kc.Factory.addGetterSetter(c0.Node,"alpha",1,function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e});var f0={};Object.defineProperty(f0,"__esModule",{value:!0});f0.Sepia=void 0;const TR=function(e){var t=e.data,r=t.length,n,i,a,o;for(n=0;n<r;n+=4)i=t[n+0],a=t[n+1],o=t[n+2],t[n+0]=Math.min(255,i*.393+a*.769+o*.189),t[n+1]=Math.min(255,i*.349+a*.686+o*.168),t[n+2]=Math.min(255,i*.272+a*.534+o*.131)};f0.Sepia=TR;var d0={};Object.defineProperty(d0,"__esModule",{value:!0});d0.Solarize=void 0;const AR=function(e){var t=e.data,r=e.width,n=e.height,i=r*4,a=n;do{var o=(a-1)*i,l=r;do{var u=o+(l-1)*4,f=t[u],v=t[u+1],w=t[u+2];f>127&&(f=255-f),v>127&&(v=255-v),w>127&&(w=255-w),t[u]=f,t[u+1]=v,t[u+2]=w}while(--l)}while(--a)};d0.Solarize=AR;var h0={};Object.defineProperty(h0,"__esModule",{value:!0});h0.Threshold=void 0;const m4=vt,kR=Qt,RR=Ye,LR=function(e){var t=this.threshold()*255,r=e.data,n=r.length,i;for(i=0;i<n;i+=1)r[i]=r[i]<t?0:255};h0.Threshold=LR;m4.Factory.addGetterSetter(kR.Node,"threshold",.5,(0,RR.getNumberValidator)(),m4.Factory.afterSetFilter);Object.defineProperty(Sp,"__esModule",{value:!0});Sp.Konva=void 0;const y4=Bh,MR=Tp,NR=Rp,IR=Np,DR=Ip,FR=Dp,b4=au,jR=bf,zR=Eu,BR=Sf,UR=zp,HR=Bp,GR=Up,$R=Hp,VR=kl,qR=Gp,WR=$p,YR=Vp,KR=Wp,XR=Yp,ZR=Kp,QR=Xp,JR=Qp,eL=Jp,tL=e0,rL=t0,nL=r0,iL=n0,aL=i0,oL=a0,lL=o0,sL=l0,uL=s0,cL=u0,fL=f0,dL=d0,hL=h0;Sp.Konva=y4.Konva.Util._assign(y4.Konva,{Arc:MR.Arc,Arrow:NR.Arrow,Circle:IR.Circle,Ellipse:DR.Ellipse,Image:FR.Image,Label:b4.Label,Tag:b4.Tag,Line:jR.Line,Path:zR.Path,Rect:BR.Rect,RegularPolygon:UR.RegularPolygon,Ring:HR.Ring,Sprite:GR.Sprite,Star:$R.Star,Text:VR.Text,TextPath:qR.TextPath,Transformer:WR.Transformer,Wedge:YR.Wedge,Filters:{Blur:KR.Blur,Brighten:XR.Brighten,Contrast:ZR.Contrast,Emboss:QR.Emboss,Enhance:JR.Enhance,Grayscale:eL.Grayscale,HSL:tL.HSL,HSV:rL.HSV,Invert:nL.Invert,Kaleidoscope:iL.Kaleidoscope,Mask:aL.Mask,Noise:oL.Noise,Pixelate:lL.Pixelate,Posterize:sL.Posterize,RGB:uL.RGB,RGBA:cL.RGBA,Sepia:fL.Sepia,Solarize:dL.Solarize,Threshold:hL.Threshold}});var pL=Jy.exports;Object.defineProperty(pL,"__esModule",{value:!0});const gL=Sp;Jy.exports=gL.Konva;var Gi=Jy.exports,Mm={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;var r=Bh;Object.defineProperty(t,"Konva",{enumerable:!0,get:function(){return r.Konva}});const n=Bh;e.exports=n.Konva})(Mm,Mm.exports);var vL=Mm.exports;const Xc=Kh(vL);var Q9={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 mL=function(t){var r={},n=at,i=pc,a=Object.assign;function o(s){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+s,A=1;A<arguments.length;A++)c+="&args[]="+encodeURIComponent(arguments[A]);return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),f=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),E=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),O=Symbol.iterator;function k(s){return s===null||typeof s!="object"?null:(s=O&&s[O]||s["@@iterator"],typeof s=="function"?s:null)}function C(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case f:return"Portal";case _:return"Profiler";case w:return"StrictMode";case y:return"Suspense";case p:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case E:return(s.displayName||"Context")+".Consumer";case h:return(s._context.displayName||"Context")+".Provider";case m:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case g:return c=s.displayName||null,c!==null?c:C(s.type)||"Memo";case d:c=s._payload,s=s._init;try{return C(s(c))}catch{}}return null}function S(s){var c=s.type;switch(s.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=c.render,s=s.displayName||s.name||"",c.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return C(c);case 8:return c===w?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function x(s){var c=s,A=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,c.flags&4098&&(A=c.return),s=c.return;while(s)}return c.tag===3?A:null}function P(s){if(x(s)!==s)throw Error(o(188))}function T(s){var c=s.alternate;if(!c){if(c=x(s),c===null)throw Error(o(188));return c!==s?null:s}for(var A=s,I=c;;){var j=A.return;if(j===null)break;var W=j.alternate;if(W===null){if(I=j.return,I!==null){A=I;continue}break}if(j.child===W.child){for(W=j.child;W;){if(W===A)return P(j),s;if(W===I)return P(j),c;W=W.sibling}throw Error(o(188))}if(A.return!==I.return)A=j,I=W;else{for(var J=!1,se=j.child;se;){if(se===A){J=!0,A=j,I=W;break}if(se===I){J=!0,I=j,A=W;break}se=se.sibling}if(!J){for(se=W.child;se;){if(se===A){J=!0,A=W,I=j;break}if(se===I){J=!0,I=W,A=j;break}se=se.sibling}if(!J)throw Error(o(189))}}if(A.alternate!==I)throw Error(o(190))}if(A.tag!==3)throw Error(o(188));return A.stateNode.current===A?s:c}function L(s){return s=T(s),s!==null?M(s):null}function M(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var c=M(s);if(c!==null)return c;s=s.sibling}return null}function U(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){if(s.tag!==4){var c=U(s);if(c!==null)return c}s=s.sibling}return null}var $=Array.isArray,Z=t.getPublicInstance,B=t.getRootHostContext,N=t.getChildHostContext,H=t.prepareForCommit,R=t.resetAfterCommit,D=t.createInstance,z=t.appendInitialChild,F=t.finalizeInitialChildren,V=t.prepareUpdate,Y=t.shouldSetTextContent,q=t.createTextInstance,G=t.scheduleTimeout,K=t.cancelTimeout,X=t.noTimeout,Q=t.isPrimaryRenderer,te=t.supportsMutation,ee=t.supportsPersistence,ae=t.supportsHydration,oe=t.getInstanceFromNode,le=t.preparePortalMount,Te=t.getCurrentEventPriority,Fe=t.detachDeletedInstance,fe=t.supportsMicrotasks,ne=t.scheduleMicrotask,ge=t.supportsTestSelectors,pe=t.findFiberRoot,re=t.getBoundingRect,de=t.getTextContent,be=t.isHiddenSubtree,ye=t.matchAccessibilityRole,Ie=t.setFocusIfFocusable,Ee=t.setupIntersectionObserver,ke=t.appendChild,Ze=t.appendChildToContainer,We=t.commitTextUpdate,dt=t.commitMount,Bt=t.commitUpdate,ue=t.insertBefore,he=t.insertInContainerBefore,nt=t.removeChild,Oe=t.removeChildFromContainer,je=t.resetTextContent,Le=t.hideInstance,Se=t.hideTextInstance,et=t.unhideInstance,xe=t.unhideTextInstance,Ke=t.clearContainer,Sr=t.cloneInstance,Pe=t.createContainerChildSet,He=t.appendChildToContainerChildSet,Je=t.finalizeContainerChildren,yt=t.replaceContainerChildren,xt=t.cloneHiddenInstance,ar=t.cloneHiddenTextInstance,Rr=t.canHydrateInstance,Lr=t.canHydrateTextInstance,ln=t.canHydrateSuspenseInstance,De=t.isSuspenseInstancePending,it=t.isSuspenseInstanceFallback,Qe=t.getSuspenseInstanceFallbackErrorDetails,kt=t.registerSuspenseInstanceRetry,tt=t.getNextHydratableSibling,fr=t.getFirstHydratableChild,ht=t.getFirstHydratableChildWithinContainer,$t=t.getFirstHydratableChildWithinSuspenseInstance,Br=t.hydrateInstance,vr=t.hydrateTextInstance,Mr=t.hydrateSuspenseInstance,Mn=t.getNextHydratableInstanceAfterSuspenseInstance,vi=t.commitHydratedContainer,mn=t.commitHydratedSuspenseInstance,sn=t.clearSuspenseBoundary,Kn=t.clearSuspenseBoundaryFromContainer,Ka=t.shouldDeleteUnhydratedTailInstances,mi=t.didNotMatchHydratedContainerTextInstance,Kl=t.didNotMatchHydratedTextInstance,Xa;function Za(s){if(Xa===void 0)try{throw Error()}catch(A){var c=A.stack.trim().match(/\n( *(at )?)/);Xa=c&&c[1]||""}return`
|
|
52
|
-
`+Xa+s}var Xl=!1;function Ru(s,c){if(!s||Xl)return"";Xl=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(c)if(c=function(){throw Error()},Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(Re){var I=Re}Reflect.construct(s,[],c)}else{try{c.call()}catch(Re){I=Re}s.call(c.prototype)}else{try{throw Error()}catch(Re){I=Re}s()}}catch(Re){if(Re&&I&&typeof Re.stack=="string"){for(var j=Re.stack.split(`
|
|
53
|
-
`),W=I.stack.split(`
|
|
54
|
-
`),J=j.length-1,se=W.length-1;1<=J&&0<=se&&j[J]!==W[se];)se--;for(;1<=J&&0<=se;J--,se--)if(j[J]!==W[se]){if(J!==1||se!==1)do if(J--,se--,0>se||j[J]!==W[se]){var me=`
|
|
55
|
-
`+j[J].replace(" at new "," at ");return s.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",s.displayName)),me}while(1<=J&&0<=se);break}}}finally{Xl=!1,Error.prepareStackTrace=A}return(s=s?s.displayName||s.name:"")?Za(s):""}var Lu=Object.prototype.hasOwnProperty,va=[],Nn=-1;function un(s){return{current:s}}function Nt(s){0>Nn||(s.current=va[Nn],va[Nn]=null,Nn--)}function Rt(s,c){Nn++,va[Nn]=s.current,s.current=c}var yi={},mr=un(yi),Ur=un(!1),Xn=yi;function bi(s,c){var A=s.type.contextTypes;if(!A)return yi;var I=s.stateNode;if(I&&I.__reactInternalMemoizedUnmaskedChildContext===c)return I.__reactInternalMemoizedMaskedChildContext;var j={},W;for(W in A)j[W]=c[W];return I&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=c,s.__reactInternalMemoizedMaskedChildContext=j),j}function Yt(s){return s=s.childContextTypes,s!=null}function _i(){Nt(Ur),Nt(mr)}function Zl(s,c,A){if(mr.current!==yi)throw Error(o(168));Rt(mr,c),Rt(Ur,A)}function Ql(s,c,A){var I=s.stateNode;if(c=c.childContextTypes,typeof I.getChildContext!="function")return A;I=I.getChildContext();for(var j in I)if(!(j in c))throw Error(o(108,S(s)||"Unknown",j));return a({},A,I)}function Jl(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||yi,Xn=mr.current,Rt(mr,s),Rt(Ur,Ur.current),!0}function ma(s,c,A){var I=s.stateNode;if(!I)throw Error(o(169));A?(s=Ql(s,c,Xn),I.__reactInternalMemoizedMergedChildContext=s,Nt(Ur),Nt(mr),Rt(mr,s)):Nt(Ur),Rt(Ur,A)}var In=Math.clz32?Math.clz32:Qa,E0=Math.log,yr=Math.LN2;function Qa(s){return s>>>=0,s===0?32:31-(E0(s)/yr|0)|0}var es=64,Xo=4194304;function ya(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function Zo(s,c){var A=s.pendingLanes;if(A===0)return 0;var I=0,j=s.suspendedLanes,W=s.pingedLanes,J=A&268435455;if(J!==0){var se=J&~j;se!==0?I=ya(se):(W&=J,W!==0&&(I=ya(W)))}else J=A&~j,J!==0?I=ya(J):W!==0&&(I=ya(W));if(I===0)return 0;if(c!==0&&c!==I&&!(c&j)&&(j=I&-I,W=c&-c,j>=W||j===16&&(W&4194240)!==0))return c;if(I&4&&(I|=A&16),c=s.entangledLanes,c!==0)for(s=s.entanglements,c&=I;0<c;)A=31-In(c),j=1<<A,I|=s[A],c&=~j;return I}function Tf(s,c){switch(s){case 1:case 2:case 4:return c+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 c+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 O0(s,c){for(var A=s.suspendedLanes,I=s.pingedLanes,j=s.expirationTimes,W=s.pendingLanes;0<W;){var J=31-In(W),se=1<<J,me=j[J];me===-1?(!(se&A)||se&I)&&(j[J]=Tf(se,c)):me<=c&&(s.expiredLanes|=se),W&=~se}}function Ja(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function ts(){var s=es;return es<<=1,!(es&4194240)&&(es=64),s}function Mu(s){for(var c=[],A=0;31>A;A++)c.push(s);return c}function Dn(s,c,A){s.pendingLanes|=c,c!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,c=31-In(c),s[c]=A}function Nu(s,c){var A=s.pendingLanes&~c;s.pendingLanes=c,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=c,s.mutableReadLanes&=c,s.entangledLanes&=c,c=s.entanglements;var I=s.eventTimes;for(s=s.expirationTimes;0<A;){var j=31-In(A),W=1<<j;c[j]=0,I[j]=-1,s[j]=-1,A&=~W}}function rs(s,c){var A=s.entangledLanes|=c;for(s=s.entanglements;A;){var I=31-In(A),j=1<<I;j&c|s[I]&c&&(s[I]|=c),A&=~j}}var St=0;function Af(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var eo=i.unstable_scheduleCallback,Zn=i.unstable_cancelCallback,kf=i.unstable_shouldYield,Rf=i.unstable_requestPaint,dr=i.unstable_now,ns=i.unstable_ImmediatePriority,x0=i.unstable_UserBlockingPriority,ie=i.unstable_NormalPriority,Ae=i.unstable_IdlePriority,Ne=null,ft=null;function or(s){if(ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Ne,s,void 0,(s.current.flags&128)===128)}catch{}}function Kr(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var lr=typeof Object.is=="function"?Object.is:Kr,It=null,wi=!1,is=!1;function P0(s){It===null?It=[s]:It.push(s)}function GS(s){wi=!0,P0(s)}function Vi(){if(!is&&It!==null){is=!0;var s=0,c=St;try{var A=It;for(St=1;s<A.length;s++){var I=A[s];do I=I(!0);while(I!==null)}It=null,wi=!1}catch(j){throw It!==null&&(It=It.slice(s+1)),eo(ns,Vi),j}finally{St=c,is=!1}}return null}var as=[],os=0,Lf=null,Mf=0,Qn=[],Jn=0,Qo=null,ba=1,_a="";function Jo(s,c){as[os++]=Mf,as[os++]=Lf,Lf=s,Mf=c}function U2(s,c,A){Qn[Jn++]=ba,Qn[Jn++]=_a,Qn[Jn++]=Qo,Qo=s;var I=ba;s=_a;var j=32-In(I)-1;I&=~(1<<j),A+=1;var W=32-In(c)+j;if(30<W){var J=j-j%5;W=(I&(1<<J)-1).toString(32),I>>=J,j-=J,ba=1<<32-In(c)+j|A<<j|I,_a=W+s}else ba=1<<W|A<<j|I,_a=s}function C0(s){s.return!==null&&(Jo(s,1),U2(s,1,0))}function T0(s){for(;s===Lf;)Lf=as[--os],as[os]=null,Mf=as[--os],as[os]=null;for(;s===Qo;)Qo=Qn[--Jn],Qn[Jn]=null,_a=Qn[--Jn],Qn[Jn]=null,ba=Qn[--Jn],Qn[Jn]=null}var Fn=null,ei=null,Kt=!1,Iu=!1,Si=null;function H2(s,c){var A=ai(5,null,null,0);A.elementType="DELETED",A.stateNode=c,A.return=s,c=s.deletions,c===null?(s.deletions=[A],s.flags|=16):c.push(A)}function G2(s,c){switch(s.tag){case 5:return c=Rr(c,s.type,s.pendingProps),c!==null?(s.stateNode=c,Fn=s,ei=fr(c),!0):!1;case 6:return c=Lr(c,s.pendingProps),c!==null?(s.stateNode=c,Fn=s,ei=null,!0):!1;case 13:if(c=ln(c),c!==null){var A=Qo!==null?{id:ba,overflow:_a}:null;return s.memoizedState={dehydrated:c,treeContext:A,retryLane:1073741824},A=ai(18,null,null,0),A.stateNode=c,A.return=s,s.child=A,Fn=s,ei=null,!0}return!1;default:return!1}}function A0(s){return(s.mode&1)!==0&&(s.flags&128)===0}function k0(s){if(Kt){var c=ei;if(c){var A=c;if(!G2(s,c)){if(A0(s))throw Error(o(418));c=tt(A);var I=Fn;c&&G2(s,c)?H2(I,A):(s.flags=s.flags&-4097|2,Kt=!1,Fn=s)}}else{if(A0(s))throw Error(o(418));s.flags=s.flags&-4097|2,Kt=!1,Fn=s}}}function $2(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Fn=s}function Nf(s){if(!ae||s!==Fn)return!1;if(!Kt)return $2(s),Kt=!0,!1;if(s.tag!==3&&(s.tag!==5||Ka(s.type)&&!Y(s.type,s.memoizedProps))){var c=ei;if(c){if(A0(s))throw V2(),Error(o(418));for(;c;)H2(s,c),c=tt(c)}}if($2(s),s.tag===13){if(!ae)throw Error(o(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));ei=Mn(s)}else ei=Fn?tt(s.stateNode):null;return!0}function V2(){for(var s=ei;s;)s=tt(s)}function ls(){ae&&(ei=Fn=null,Iu=Kt=!1)}function R0(s){Si===null?Si=[s]:Si.push(s)}var $S=l.ReactCurrentBatchConfig;function If(s,c){if(lr(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var A=Object.keys(s),I=Object.keys(c);if(A.length!==I.length)return!1;for(I=0;I<A.length;I++){var j=A[I];if(!Lu.call(c,j)||!lr(s[j],c[j]))return!1}return!0}function VS(s){switch(s.tag){case 5:return Za(s.type);case 16:return Za("Lazy");case 13:return Za("Suspense");case 19:return Za("SuspenseList");case 0:case 2:case 15:return s=Ru(s.type,!1),s;case 11:return s=Ru(s.type.render,!1),s;case 1:return s=Ru(s.type,!0),s;default:return""}}function Du(s,c,A){if(s=A.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(A._owner){if(A=A._owner,A){if(A.tag!==1)throw Error(o(309));var I=A.stateNode}if(!I)throw Error(o(147,s));var j=I,W=""+s;return c!==null&&c.ref!==null&&typeof c.ref=="function"&&c.ref._stringRef===W?c.ref:(c=function(J){var se=j.refs;J===null?delete se[W]:se[W]=J},c._stringRef=W,c)}if(typeof s!="string")throw Error(o(284));if(!A._owner)throw Error(o(290,s))}return s}function Df(s,c){throw s=Object.prototype.toString.call(c),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s))}function q2(s){var c=s._init;return c(s._payload)}function W2(s){function c(ve,ce){if(s){var _e=ve.deletions;_e===null?(ve.deletions=[ce],ve.flags|=16):_e.push(ce)}}function A(ve,ce){if(!s)return null;for(;ce!==null;)c(ve,ce),ce=ce.sibling;return null}function I(ve,ce){for(ve=new Map;ce!==null;)ce.key!==null?ve.set(ce.key,ce):ve.set(ce.index,ce),ce=ce.sibling;return ve}function j(ve,ce){return ve=lo(ve,ce),ve.index=0,ve.sibling=null,ve}function W(ve,ce,_e){return ve.index=_e,s?(_e=ve.alternate,_e!==null?(_e=_e.index,_e<ce?(ve.flags|=2,ce):_e):(ve.flags|=2,ce)):(ve.flags|=1048576,ce)}function J(ve){return s&&ve.alternate===null&&(ve.flags|=2),ve}function se(ve,ce,_e,Be){return ce===null||ce.tag!==6?(ce=P1(_e,ve.mode,Be),ce.return=ve,ce):(ce=j(ce,_e),ce.return=ve,ce)}function me(ve,ce,_e,Be){var rt=_e.type;return rt===v?Ve(ve,ce,_e.props.children,Be,_e.key):ce!==null&&(ce.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===d&&q2(rt)===ce.type)?(Be=j(ce,_e.props),Be.ref=Du(ve,ce,_e),Be.return=ve,Be):(Be=hd(_e.type,_e.key,_e.props,null,ve.mode,Be),Be.ref=Du(ve,ce,_e),Be.return=ve,Be)}function Re(ve,ce,_e,Be){return ce===null||ce.tag!==4||ce.stateNode.containerInfo!==_e.containerInfo||ce.stateNode.implementation!==_e.implementation?(ce=C1(_e,ve.mode,Be),ce.return=ve,ce):(ce=j(ce,_e.children||[]),ce.return=ve,ce)}function Ve(ve,ce,_e,Be,rt){return ce===null||ce.tag!==7?(ce=ol(_e,ve.mode,Be,rt),ce.return=ve,ce):(ce=j(ce,_e),ce.return=ve,ce)}function lt(ve,ce,_e){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return ce=P1(""+ce,ve.mode,_e),ce.return=ve,ce;if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case u:return _e=hd(ce.type,ce.key,ce.props,null,ve.mode,_e),_e.ref=Du(ve,null,ce),_e.return=ve,_e;case f:return ce=C1(ce,ve.mode,_e),ce.return=ve,ce;case d:var Be=ce._init;return lt(ve,Be(ce._payload),_e)}if($(ce)||k(ce))return ce=ol(ce,ve.mode,_e,null),ce.return=ve,ce;Df(ve,ce)}return null}function ze(ve,ce,_e,Be){var rt=ce!==null?ce.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number")return rt!==null?null:se(ve,ce,""+_e,Be);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case u:return _e.key===rt?me(ve,ce,_e,Be):null;case f:return _e.key===rt?Re(ve,ce,_e,Be):null;case d:return rt=_e._init,ze(ve,ce,rt(_e._payload),Be)}if($(_e)||k(_e))return rt!==null?null:Ve(ve,ce,_e,Be,null);Df(ve,_e)}return null}function Vt(ve,ce,_e,Be,rt){if(typeof Be=="string"&&Be!==""||typeof Be=="number")return ve=ve.get(_e)||null,se(ce,ve,""+Be,rt);if(typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case u:return ve=ve.get(Be.key===null?_e:Be.key)||null,me(ce,ve,Be,rt);case f:return ve=ve.get(Be.key===null?_e:Be.key)||null,Re(ce,ve,Be,rt);case d:var pt=Be._init;return Vt(ve,ce,_e,pt(Be._payload),rt)}if($(Be)||k(Be))return ve=ve.get(_e)||null,Ve(ce,ve,Be,rt,null);Df(ce,Be)}return null}function jt(ve,ce,_e,Be){for(var rt=null,pt=null,st=ce,Pt=ce=0,Dr=null;st!==null&&Pt<_e.length;Pt++){st.index>Pt?(Dr=st,st=null):Dr=st.sibling;var Ct=ze(ve,st,_e[Pt],Be);if(Ct===null){st===null&&(st=Dr);break}s&&st&&Ct.alternate===null&&c(ve,st),ce=W(Ct,ce,Pt),pt===null?rt=Ct:pt.sibling=Ct,pt=Ct,st=Dr}if(Pt===_e.length)return A(ve,st),Kt&&Jo(ve,Pt),rt;if(st===null){for(;Pt<_e.length;Pt++)st=lt(ve,_e[Pt],Be),st!==null&&(ce=W(st,ce,Pt),pt===null?rt=st:pt.sibling=st,pt=st);return Kt&&Jo(ve,Pt),rt}for(st=I(ve,st);Pt<_e.length;Pt++)Dr=Vt(st,ve,Pt,_e[Pt],Be),Dr!==null&&(s&&Dr.alternate!==null&&st.delete(Dr.key===null?Pt:Dr.key),ce=W(Dr,ce,Pt),pt===null?rt=Dr:pt.sibling=Dr,pt=Dr);return s&&st.forEach(function(so){return c(ve,so)}),Kt&&Jo(ve,Pt),rt}function wn(ve,ce,_e,Be){var rt=k(_e);if(typeof rt!="function")throw Error(o(150));if(_e=rt.call(_e),_e==null)throw Error(o(151));for(var pt=rt=null,st=ce,Pt=ce=0,Dr=null,Ct=_e.next();st!==null&&!Ct.done;Pt++,Ct=_e.next()){st.index>Pt?(Dr=st,st=null):Dr=st.sibling;var so=ze(ve,st,Ct.value,Be);if(so===null){st===null&&(st=Dr);break}s&&st&&so.alternate===null&&c(ve,st),ce=W(so,ce,Pt),pt===null?rt=so:pt.sibling=so,pt=so,st=Dr}if(Ct.done)return A(ve,st),Kt&&Jo(ve,Pt),rt;if(st===null){for(;!Ct.done;Pt++,Ct=_e.next())Ct=lt(ve,Ct.value,Be),Ct!==null&&(ce=W(Ct,ce,Pt),pt===null?rt=Ct:pt.sibling=Ct,pt=Ct);return Kt&&Jo(ve,Pt),rt}for(st=I(ve,st);!Ct.done;Pt++,Ct=_e.next())Ct=Vt(st,ve,Pt,Ct.value,Be),Ct!==null&&(s&&Ct.alternate!==null&&st.delete(Ct.key===null?Pt:Ct.key),ce=W(Ct,ce,Pt),pt===null?rt=Ct:pt.sibling=Ct,pt=Ct);return s&&st.forEach(function(wE){return c(ve,wE)}),Kt&&Jo(ve,Pt),rt}function Oa(ve,ce,_e,Be){if(typeof _e=="object"&&_e!==null&&_e.type===v&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case u:e:{for(var rt=_e.key,pt=ce;pt!==null;){if(pt.key===rt){if(rt=_e.type,rt===v){if(pt.tag===7){A(ve,pt.sibling),ce=j(pt,_e.props.children),ce.return=ve,ve=ce;break e}}else if(pt.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===d&&q2(rt)===pt.type){A(ve,pt.sibling),ce=j(pt,_e.props),ce.ref=Du(ve,pt,_e),ce.return=ve,ve=ce;break e}A(ve,pt);break}else c(ve,pt);pt=pt.sibling}_e.type===v?(ce=ol(_e.props.children,ve.mode,Be,_e.key),ce.return=ve,ve=ce):(Be=hd(_e.type,_e.key,_e.props,null,ve.mode,Be),Be.ref=Du(ve,ce,_e),Be.return=ve,ve=Be)}return J(ve);case f:e:{for(pt=_e.key;ce!==null;){if(ce.key===pt)if(ce.tag===4&&ce.stateNode.containerInfo===_e.containerInfo&&ce.stateNode.implementation===_e.implementation){A(ve,ce.sibling),ce=j(ce,_e.children||[]),ce.return=ve,ve=ce;break e}else{A(ve,ce);break}else c(ve,ce);ce=ce.sibling}ce=C1(_e,ve.mode,Be),ce.return=ve,ve=ce}return J(ve);case d:return pt=_e._init,Oa(ve,ce,pt(_e._payload),Be)}if($(_e))return jt(ve,ce,_e,Be);if(k(_e))return wn(ve,ce,_e,Be);Df(ve,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"?(_e=""+_e,ce!==null&&ce.tag===6?(A(ve,ce.sibling),ce=j(ce,_e),ce.return=ve,ve=ce):(A(ve,ce),ce=P1(_e,ve.mode,Be),ce.return=ve,ve=ce),J(ve)):A(ve,ce)}return Oa}var ss=W2(!0),Y2=W2(!1),Ff=un(null),jf=null,us=null,L0=null;function M0(){L0=us=jf=null}function K2(s,c,A){Q?(Rt(Ff,c._currentValue),c._currentValue=A):(Rt(Ff,c._currentValue2),c._currentValue2=A)}function N0(s){var c=Ff.current;Nt(Ff),Q?s._currentValue=c:s._currentValue2=c}function I0(s,c,A){for(;s!==null;){var I=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,I!==null&&(I.childLanes|=c)):I!==null&&(I.childLanes&c)!==c&&(I.childLanes|=c),s===A)break;s=s.return}}function cs(s,c){jf=s,L0=us=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&c&&(yn=!0),s.firstContext=null)}function ti(s){var c=Q?s._currentValue:s._currentValue2;if(L0!==s)if(s={context:s,memoizedValue:c,next:null},us===null){if(jf===null)throw Error(o(308));us=s,jf.dependencies={lanes:0,firstContext:s}}else us=us.next=s;return c}var el=null;function D0(s){el===null?el=[s]:el.push(s)}function X2(s,c,A,I){var j=c.interleaved;return j===null?(A.next=A,D0(c)):(A.next=j.next,j.next=A),c.interleaved=A,qi(s,I)}function qi(s,c){s.lanes|=c;var A=s.alternate;for(A!==null&&(A.lanes|=c),A=s,s=s.return;s!==null;)s.childLanes|=c,A=s.alternate,A!==null&&(A.childLanes|=c),A=s,s=s.return;return A.tag===3?A.stateNode:null}var to=!1;function F0(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z2(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function wa(s,c){return{eventTime:s,lane:c,tag:0,payload:null,callback:null,next:null}}function ro(s,c,A){var I=s.updateQueue;if(I===null)return null;if(I=I.shared,mt&2){var j=I.pending;return j===null?c.next=c:(c.next=j.next,j.next=c),I.pending=c,qi(s,A)}return j=I.interleaved,j===null?(c.next=c,D0(I)):(c.next=j.next,j.next=c),I.interleaved=c,qi(s,A)}function zf(s,c,A){if(c=c.updateQueue,c!==null&&(c=c.shared,(A&4194240)!==0)){var I=c.lanes;I&=s.pendingLanes,A|=I,c.lanes=A,rs(s,A)}}function Q2(s,c){var A=s.updateQueue,I=s.alternate;if(I!==null&&(I=I.updateQueue,A===I)){var j=null,W=null;if(A=A.firstBaseUpdate,A!==null){do{var J={eventTime:A.eventTime,lane:A.lane,tag:A.tag,payload:A.payload,callback:A.callback,next:null};W===null?j=W=J:W=W.next=J,A=A.next}while(A!==null);W===null?j=W=c:W=W.next=c}else j=W=c;A={baseState:I.baseState,firstBaseUpdate:j,lastBaseUpdate:W,shared:I.shared,effects:I.effects},s.updateQueue=A;return}s=A.lastBaseUpdate,s===null?A.firstBaseUpdate=c:s.next=c,A.lastBaseUpdate=c}function Bf(s,c,A,I){var j=s.updateQueue;to=!1;var W=j.firstBaseUpdate,J=j.lastBaseUpdate,se=j.shared.pending;if(se!==null){j.shared.pending=null;var me=se,Re=me.next;me.next=null,J===null?W=Re:J.next=Re,J=me;var Ve=s.alternate;Ve!==null&&(Ve=Ve.updateQueue,se=Ve.lastBaseUpdate,se!==J&&(se===null?Ve.firstBaseUpdate=Re:se.next=Re,Ve.lastBaseUpdate=me))}if(W!==null){var lt=j.baseState;J=0,Ve=Re=me=null,se=W;do{var ze=se.lane,Vt=se.eventTime;if((I&ze)===ze){Ve!==null&&(Ve=Ve.next={eventTime:Vt,lane:0,tag:se.tag,payload:se.payload,callback:se.callback,next:null});e:{var jt=s,wn=se;switch(ze=c,Vt=A,wn.tag){case 1:if(jt=wn.payload,typeof jt=="function"){lt=jt.call(Vt,lt,ze);break e}lt=jt;break e;case 3:jt.flags=jt.flags&-65537|128;case 0:if(jt=wn.payload,ze=typeof jt=="function"?jt.call(Vt,lt,ze):jt,ze==null)break e;lt=a({},lt,ze);break e;case 2:to=!0}}se.callback!==null&&se.lane!==0&&(s.flags|=64,ze=j.effects,ze===null?j.effects=[se]:ze.push(se))}else Vt={eventTime:Vt,lane:ze,tag:se.tag,payload:se.payload,callback:se.callback,next:null},Ve===null?(Re=Ve=Vt,me=lt):Ve=Ve.next=Vt,J|=ze;if(se=se.next,se===null){if(se=j.shared.pending,se===null)break;ze=se,se=ze.next,ze.next=null,j.lastBaseUpdate=ze,j.shared.pending=null}}while(!0);if(Ve===null&&(me=lt),j.baseState=me,j.firstBaseUpdate=Re,j.lastBaseUpdate=Ve,c=j.shared.interleaved,c!==null){j=c;do J|=j.lane,j=j.next;while(j!==c)}else W===null&&(j.shared.lanes=0);rl|=J,s.lanes=J,s.memoizedState=lt}}function J2(s,c,A){if(s=c.effects,c.effects=null,s!==null)for(c=0;c<s.length;c++){var I=s[c],j=I.callback;if(j!==null){if(I.callback=null,I=A,typeof j!="function")throw Error(o(191,j));j.call(I)}}}var Fu={},ri=un(Fu),ju=un(Fu),fs=un(Fu);function Wi(s){if(s===Fu)throw Error(o(174));return s}function j0(s,c){Rt(fs,c),Rt(ju,s),Rt(ri,Fu),s=B(c),Nt(ri),Rt(ri,s)}function ds(){Nt(ri),Nt(ju),Nt(fs)}function eb(s){var c=Wi(fs.current),A=Wi(ri.current);c=N(A,s.type,c),A!==c&&(Rt(ju,s),Rt(ri,c))}function z0(s){ju.current===s&&(Nt(ri),Nt(ju))}var Jt=un(0);function Uf(s){for(var c=s;c!==null;){if(c.tag===13){var A=c.memoizedState;if(A!==null&&(A=A.dehydrated,A===null||De(A)||it(A)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var B0=[];function U0(){for(var s=0;s<B0.length;s++){var c=B0[s];Q?c._workInProgressVersionPrimary=null:c._workInProgressVersionSecondary=null}B0.length=0}var Hf=l.ReactCurrentDispatcher,H0=l.ReactCurrentBatchConfig,tl=0,er=null,Er=null,Nr=null,Gf=!1,zu=!1,Bu=0,qS=0;function Xr(){throw Error(o(321))}function G0(s,c){if(c===null)return!1;for(var A=0;A<c.length&&A<s.length;A++)if(!lr(s[A],c[A]))return!1;return!0}function $0(s,c,A,I,j,W){if(tl=W,er=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,Hf.current=s===null||s.memoizedState===null?XS:ZS,s=A(I,j),zu){W=0;do{if(zu=!1,Bu=0,25<=W)throw Error(o(301));W+=1,Nr=Er=null,c.updateQueue=null,Hf.current=QS,s=A(I,j)}while(zu)}if(Hf.current=qf,c=Er!==null&&Er.next!==null,tl=0,Nr=Er=er=null,Gf=!1,c)throw Error(o(300));return s}function V0(){var s=Bu!==0;return Bu=0,s}function Yi(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Nr===null?er.memoizedState=Nr=s:Nr=Nr.next=s,Nr}function ni(){if(Er===null){var s=er.alternate;s=s!==null?s.memoizedState:null}else s=Er.next;var c=Nr===null?er.memoizedState:Nr.next;if(c!==null)Nr=c,Er=s;else{if(s===null)throw Error(o(310));Er=s,s={memoizedState:Er.memoizedState,baseState:Er.baseState,baseQueue:Er.baseQueue,queue:Er.queue,next:null},Nr===null?er.memoizedState=Nr=s:Nr=Nr.next=s}return Nr}function Uu(s,c){return typeof c=="function"?c(s):c}function q0(s){var c=ni(),A=c.queue;if(A===null)throw Error(o(311));A.lastRenderedReducer=s;var I=Er,j=I.baseQueue,W=A.pending;if(W!==null){if(j!==null){var J=j.next;j.next=W.next,W.next=J}I.baseQueue=j=W,A.pending=null}if(j!==null){W=j.next,I=I.baseState;var se=J=null,me=null,Re=W;do{var Ve=Re.lane;if((tl&Ve)===Ve)me!==null&&(me=me.next={lane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),I=Re.hasEagerState?Re.eagerState:s(I,Re.action);else{var lt={lane:Ve,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null};me===null?(se=me=lt,J=I):me=me.next=lt,er.lanes|=Ve,rl|=Ve}Re=Re.next}while(Re!==null&&Re!==W);me===null?J=I:me.next=se,lr(I,c.memoizedState)||(yn=!0),c.memoizedState=I,c.baseState=J,c.baseQueue=me,A.lastRenderedState=I}if(s=A.interleaved,s!==null){j=s;do W=j.lane,er.lanes|=W,rl|=W,j=j.next;while(j!==s)}else j===null&&(A.lanes=0);return[c.memoizedState,A.dispatch]}function W0(s){var c=ni(),A=c.queue;if(A===null)throw Error(o(311));A.lastRenderedReducer=s;var I=A.dispatch,j=A.pending,W=c.memoizedState;if(j!==null){A.pending=null;var J=j=j.next;do W=s(W,J.action),J=J.next;while(J!==j);lr(W,c.memoizedState)||(yn=!0),c.memoizedState=W,c.baseQueue===null&&(c.baseState=W),A.lastRenderedState=W}return[W,I]}function tb(){}function rb(s,c){var A=er,I=ni(),j=c(),W=!lr(I.memoizedState,j);if(W&&(I.memoizedState=j,yn=!0),I=I.queue,Y0(ab.bind(null,A,I,s),[s]),I.getSnapshot!==c||W||Nr!==null&&Nr.memoizedState.tag&1){if(A.flags|=2048,Hu(9,ib.bind(null,A,I,j,c),void 0,null),Ir===null)throw Error(o(349));tl&30||nb(A,c,j)}return j}function nb(s,c,A){s.flags|=16384,s={getSnapshot:c,value:A},c=er.updateQueue,c===null?(c={lastEffect:null,stores:null},er.updateQueue=c,c.stores=[s]):(A=c.stores,A===null?c.stores=[s]:A.push(s))}function ib(s,c,A,I){c.value=A,c.getSnapshot=I,ob(c)&&lb(s)}function ab(s,c,A){return A(function(){ob(c)&&lb(s)})}function ob(s){var c=s.getSnapshot;s=s.value;try{var A=c();return!lr(s,A)}catch{return!0}}function lb(s){var c=qi(s,1);c!==null&&ii(c,s,1,-1)}function sb(s){var c=Yi();return typeof s=="function"&&(s=s()),c.memoizedState=c.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uu,lastRenderedState:s},c.queue=s,s=s.dispatch=KS.bind(null,er,s),[c.memoizedState,s]}function Hu(s,c,A,I){return s={tag:s,create:c,destroy:A,deps:I,next:null},c=er.updateQueue,c===null?(c={lastEffect:null,stores:null},er.updateQueue=c,c.lastEffect=s.next=s):(A=c.lastEffect,A===null?c.lastEffect=s.next=s:(I=A.next,A.next=s,s.next=I,c.lastEffect=s)),s}function ub(){return ni().memoizedState}function $f(s,c,A,I){var j=Yi();er.flags|=s,j.memoizedState=Hu(1|c,A,void 0,I===void 0?null:I)}function Vf(s,c,A,I){var j=ni();I=I===void 0?null:I;var W=void 0;if(Er!==null){var J=Er.memoizedState;if(W=J.destroy,I!==null&&G0(I,J.deps)){j.memoizedState=Hu(c,A,W,I);return}}er.flags|=s,j.memoizedState=Hu(1|c,A,W,I)}function cb(s,c){return $f(8390656,8,s,c)}function Y0(s,c){return Vf(2048,8,s,c)}function fb(s,c){return Vf(4,2,s,c)}function db(s,c){return Vf(4,4,s,c)}function hb(s,c){if(typeof c=="function")return s=s(),c(s),function(){c(null)};if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function pb(s,c,A){return A=A!=null?A.concat([s]):null,Vf(4,4,hb.bind(null,c,s),A)}function K0(){}function gb(s,c){var A=ni();c=c===void 0?null:c;var I=A.memoizedState;return I!==null&&c!==null&&G0(c,I[1])?I[0]:(A.memoizedState=[s,c],s)}function vb(s,c){var A=ni();c=c===void 0?null:c;var I=A.memoizedState;return I!==null&&c!==null&&G0(c,I[1])?I[0]:(s=s(),A.memoizedState=[s,c],s)}function mb(s,c,A){return tl&21?(lr(A,c)||(A=ts(),er.lanes|=A,rl|=A,s.baseState=!0),c):(s.baseState&&(s.baseState=!1,yn=!0),s.memoizedState=A)}function WS(s,c){var A=St;St=A!==0&&4>A?A:4,s(!0);var I=H0.transition;H0.transition={};try{s(!1),c()}finally{St=A,H0.transition=I}}function yb(){return ni().memoizedState}function YS(s,c,A){var I=ao(s);if(A={lane:I,action:A,hasEagerState:!1,eagerState:null,next:null},bb(s))_b(c,A);else if(A=X2(s,c,A,I),A!==null){var j=Jr();ii(A,s,I,j),wb(A,c,I)}}function KS(s,c,A){var I=ao(s),j={lane:I,action:A,hasEagerState:!1,eagerState:null,next:null};if(bb(s))_b(c,j);else{var W=s.alternate;if(s.lanes===0&&(W===null||W.lanes===0)&&(W=c.lastRenderedReducer,W!==null))try{var J=c.lastRenderedState,se=W(J,A);if(j.hasEagerState=!0,j.eagerState=se,lr(se,J)){var me=c.interleaved;me===null?(j.next=j,D0(c)):(j.next=me.next,me.next=j),c.interleaved=j;return}}catch{}finally{}A=X2(s,c,j,I),A!==null&&(j=Jr(),ii(A,s,I,j),wb(A,c,I))}}function bb(s){var c=s.alternate;return s===er||c!==null&&c===er}function _b(s,c){zu=Gf=!0;var A=s.pending;A===null?c.next=c:(c.next=A.next,A.next=c),s.pending=c}function wb(s,c,A){if(A&4194240){var I=c.lanes;I&=s.pendingLanes,A|=I,c.lanes=A,rs(s,A)}}var qf={readContext:ti,useCallback:Xr,useContext:Xr,useEffect:Xr,useImperativeHandle:Xr,useInsertionEffect:Xr,useLayoutEffect:Xr,useMemo:Xr,useReducer:Xr,useRef:Xr,useState:Xr,useDebugValue:Xr,useDeferredValue:Xr,useTransition:Xr,useMutableSource:Xr,useSyncExternalStore:Xr,useId:Xr,unstable_isNewReconciler:!1},XS={readContext:ti,useCallback:function(s,c){return Yi().memoizedState=[s,c===void 0?null:c],s},useContext:ti,useEffect:cb,useImperativeHandle:function(s,c,A){return A=A!=null?A.concat([s]):null,$f(4194308,4,hb.bind(null,c,s),A)},useLayoutEffect:function(s,c){return $f(4194308,4,s,c)},useInsertionEffect:function(s,c){return $f(4,2,s,c)},useMemo:function(s,c){var A=Yi();return c=c===void 0?null:c,s=s(),A.memoizedState=[s,c],s},useReducer:function(s,c,A){var I=Yi();return c=A!==void 0?A(c):c,I.memoizedState=I.baseState=c,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:c},I.queue=s,s=s.dispatch=YS.bind(null,er,s),[I.memoizedState,s]},useRef:function(s){var c=Yi();return s={current:s},c.memoizedState=s},useState:sb,useDebugValue:K0,useDeferredValue:function(s){return Yi().memoizedState=s},useTransition:function(){var s=sb(!1),c=s[0];return s=WS.bind(null,s[1]),Yi().memoizedState=s,[c,s]},useMutableSource:function(){},useSyncExternalStore:function(s,c,A){var I=er,j=Yi();if(Kt){if(A===void 0)throw Error(o(407));A=A()}else{if(A=c(),Ir===null)throw Error(o(349));tl&30||nb(I,c,A)}j.memoizedState=A;var W={value:A,getSnapshot:c};return j.queue=W,cb(ab.bind(null,I,W,s),[s]),I.flags|=2048,Hu(9,ib.bind(null,I,W,A,c),void 0,null),A},useId:function(){var s=Yi(),c=Ir.identifierPrefix;if(Kt){var A=_a,I=ba;A=(I&~(1<<32-In(I)-1)).toString(32)+A,c=":"+c+"R"+A,A=Bu++,0<A&&(c+="H"+A.toString(32)),c+=":"}else A=qS++,c=":"+c+"r"+A.toString(32)+":";return s.memoizedState=c},unstable_isNewReconciler:!1},ZS={readContext:ti,useCallback:gb,useContext:ti,useEffect:Y0,useImperativeHandle:pb,useInsertionEffect:fb,useLayoutEffect:db,useMemo:vb,useReducer:q0,useRef:ub,useState:function(){return q0(Uu)},useDebugValue:K0,useDeferredValue:function(s){var c=ni();return mb(c,Er.memoizedState,s)},useTransition:function(){var s=q0(Uu)[0],c=ni().memoizedState;return[s,c]},useMutableSource:tb,useSyncExternalStore:rb,useId:yb,unstable_isNewReconciler:!1},QS={readContext:ti,useCallback:gb,useContext:ti,useEffect:Y0,useImperativeHandle:pb,useInsertionEffect:fb,useLayoutEffect:db,useMemo:vb,useReducer:W0,useRef:ub,useState:function(){return W0(Uu)},useDebugValue:K0,useDeferredValue:function(s){var c=ni();return Er===null?c.memoizedState=s:mb(c,Er.memoizedState,s)},useTransition:function(){var s=W0(Uu)[0],c=ni().memoizedState;return[s,c]},useMutableSource:tb,useSyncExternalStore:rb,useId:yb,unstable_isNewReconciler:!1};function Ei(s,c){if(s&&s.defaultProps){c=a({},c),s=s.defaultProps;for(var A in s)c[A]===void 0&&(c[A]=s[A]);return c}return c}function X0(s,c,A,I){c=s.memoizedState,A=A(I,c),A=A==null?c:a({},c,A),s.memoizedState=A,s.lanes===0&&(s.updateQueue.baseState=A)}var Wf={isMounted:function(s){return(s=s._reactInternals)?x(s)===s:!1},enqueueSetState:function(s,c,A){s=s._reactInternals;var I=Jr(),j=ao(s),W=wa(I,j);W.payload=c,A!=null&&(W.callback=A),c=ro(s,W,j),c!==null&&(ii(c,s,j,I),zf(c,s,j))},enqueueReplaceState:function(s,c,A){s=s._reactInternals;var I=Jr(),j=ao(s),W=wa(I,j);W.tag=1,W.payload=c,A!=null&&(W.callback=A),c=ro(s,W,j),c!==null&&(ii(c,s,j,I),zf(c,s,j))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var A=Jr(),I=ao(s),j=wa(A,I);j.tag=2,c!=null&&(j.callback=c),c=ro(s,j,I),c!==null&&(ii(c,s,I,A),zf(c,s,I))}};function Sb(s,c,A,I,j,W,J){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(I,W,J):c.prototype&&c.prototype.isPureReactComponent?!If(A,I)||!If(j,W):!0}function Eb(s,c,A){var I=!1,j=yi,W=c.contextType;return typeof W=="object"&&W!==null?W=ti(W):(j=Yt(c)?Xn:mr.current,I=c.contextTypes,W=(I=I!=null)?bi(s,j):yi),c=new c(A,W),s.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Wf,s.stateNode=c,c._reactInternals=s,I&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=j,s.__reactInternalMemoizedMaskedChildContext=W),c}function Ob(s,c,A,I){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(A,I),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(A,I),c.state!==s&&Wf.enqueueReplaceState(c,c.state,null)}function Z0(s,c,A,I){var j=s.stateNode;j.props=A,j.state=s.memoizedState,j.refs={},F0(s);var W=c.contextType;typeof W=="object"&&W!==null?j.context=ti(W):(W=Yt(c)?Xn:mr.current,j.context=bi(s,W)),j.state=s.memoizedState,W=c.getDerivedStateFromProps,typeof W=="function"&&(X0(s,c,W,A),j.state=s.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(c=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),c!==j.state&&Wf.enqueueReplaceState(j,j.state,null),Bf(s,A,j,I),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308)}function hs(s,c){try{var A="",I=c;do A+=VS(I),I=I.return;while(I);var j=A}catch(W){j=`
|
|
56
|
-
Error generating stack: `+W.message+`
|
|
57
|
-
`+W.stack}return{value:s,source:c,stack:j,digest:null}}function Q0(s,c,A){return{value:s,source:null,stack:A??null,digest:c??null}}function J0(s,c){try{console.error(c.value)}catch(A){setTimeout(function(){throw A})}}var JS=typeof WeakMap=="function"?WeakMap:Map;function xb(s,c,A){A=wa(-1,A),A.tag=3,A.payload={element:null};var I=c.value;return A.callback=function(){ld||(ld=!0,b1=I),J0(s,c)},A}function Pb(s,c,A){A=wa(-1,A),A.tag=3;var I=s.type.getDerivedStateFromError;if(typeof I=="function"){var j=c.value;A.payload=function(){return I(j)},A.callback=function(){J0(s,c)}}var W=s.stateNode;return W!==null&&typeof W.componentDidCatch=="function"&&(A.callback=function(){J0(s,c),typeof I!="function"&&(no===null?no=new Set([this]):no.add(this));var J=c.stack;this.componentDidCatch(c.value,{componentStack:J!==null?J:""})}),A}function Cb(s,c,A){var I=s.pingCache;if(I===null){I=s.pingCache=new JS;var j=new Set;I.set(c,j)}else j=I.get(c),j===void 0&&(j=new Set,I.set(c,j));j.has(A)||(j.add(A),s=hE.bind(null,s,c,A),c.then(s,s))}function Tb(s){do{var c;if((c=s.tag===13)&&(c=s.memoizedState,c=c!==null?c.dehydrated!==null:!0),c)return s;s=s.return}while(s!==null);return null}function Ab(s,c,A,I,j){return s.mode&1?(s.flags|=65536,s.lanes=j,s):(s===c?s.flags|=65536:(s.flags|=128,A.flags|=131072,A.flags&=-52805,A.tag===1&&(A.alternate===null?A.tag=17:(c=wa(-1,1),c.tag=2,ro(A,c,1))),A.lanes|=1),s)}var eE=l.ReactCurrentOwner,yn=!1;function cn(s,c,A,I){c.child=s===null?Y2(c,null,A,I):ss(c,s.child,A,I)}function kb(s,c,A,I,j){A=A.render;var W=c.ref;return cs(c,j),I=$0(s,c,A,I,W,j),A=V0(),s!==null&&!yn?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~j,Sa(s,c,j)):(Kt&&A&&C0(c),c.flags|=1,cn(s,c,I,j),c.child)}function Rb(s,c,A,I,j){if(s===null){var W=A.type;return typeof W=="function"&&!x1(W)&&W.defaultProps===void 0&&A.compare===null&&A.defaultProps===void 0?(c.tag=15,c.type=W,Lb(s,c,W,I,j)):(s=hd(A.type,null,I,c,c.mode,j),s.ref=c.ref,s.return=c,c.child=s)}if(W=s.child,!(s.lanes&j)){var J=W.memoizedProps;if(A=A.compare,A=A!==null?A:If,A(J,I)&&s.ref===c.ref)return Sa(s,c,j)}return c.flags|=1,s=lo(W,I),s.ref=c.ref,s.return=c,c.child=s}function Lb(s,c,A,I,j){if(s!==null){var W=s.memoizedProps;if(If(W,I)&&s.ref===c.ref)if(yn=!1,c.pendingProps=I=W,(s.lanes&j)!==0)s.flags&131072&&(yn=!0);else return c.lanes=s.lanes,Sa(s,c,j)}return e1(s,c,A,I,j)}function Mb(s,c,A){var I=c.pendingProps,j=I.children,W=s!==null?s.memoizedState:null;if(I.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(gs,jn),jn|=A;else{if(!(A&1073741824))return s=W!==null?W.baseLanes|A:A,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:s,cachePool:null,transitions:null},c.updateQueue=null,Rt(gs,jn),jn|=s,null;c.memoizedState={baseLanes:0,cachePool:null,transitions:null},I=W!==null?W.baseLanes:A,Rt(gs,jn),jn|=I}else W!==null?(I=W.baseLanes|A,c.memoizedState=null):I=A,Rt(gs,jn),jn|=I;return cn(s,c,j,A),c.child}function Nb(s,c){var A=c.ref;(s===null&&A!==null||s!==null&&s.ref!==A)&&(c.flags|=512,c.flags|=2097152)}function e1(s,c,A,I,j){var W=Yt(A)?Xn:mr.current;return W=bi(c,W),cs(c,j),A=$0(s,c,A,I,W,j),I=V0(),s!==null&&!yn?(c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~j,Sa(s,c,j)):(Kt&&I&&C0(c),c.flags|=1,cn(s,c,A,j),c.child)}function Ib(s,c,A,I,j){if(Yt(A)){var W=!0;Jl(c)}else W=!1;if(cs(c,j),c.stateNode===null)Kf(s,c),Eb(c,A,I),Z0(c,A,I,j),I=!0;else if(s===null){var J=c.stateNode,se=c.memoizedProps;J.props=se;var me=J.context,Re=A.contextType;typeof Re=="object"&&Re!==null?Re=ti(Re):(Re=Yt(A)?Xn:mr.current,Re=bi(c,Re));var Ve=A.getDerivedStateFromProps,lt=typeof Ve=="function"||typeof J.getSnapshotBeforeUpdate=="function";lt||typeof J.UNSAFE_componentWillReceiveProps!="function"&&typeof J.componentWillReceiveProps!="function"||(se!==I||me!==Re)&&Ob(c,J,I,Re),to=!1;var ze=c.memoizedState;J.state=ze,Bf(c,I,J,j),me=c.memoizedState,se!==I||ze!==me||Ur.current||to?(typeof Ve=="function"&&(X0(c,A,Ve,I),me=c.memoizedState),(se=to||Sb(c,A,se,I,ze,me,Re))?(lt||typeof J.UNSAFE_componentWillMount!="function"&&typeof J.componentWillMount!="function"||(typeof J.componentWillMount=="function"&&J.componentWillMount(),typeof J.UNSAFE_componentWillMount=="function"&&J.UNSAFE_componentWillMount()),typeof J.componentDidMount=="function"&&(c.flags|=4194308)):(typeof J.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=I,c.memoizedState=me),J.props=I,J.state=me,J.context=Re,I=se):(typeof J.componentDidMount=="function"&&(c.flags|=4194308),I=!1)}else{J=c.stateNode,Z2(s,c),se=c.memoizedProps,Re=c.type===c.elementType?se:Ei(c.type,se),J.props=Re,lt=c.pendingProps,ze=J.context,me=A.contextType,typeof me=="object"&&me!==null?me=ti(me):(me=Yt(A)?Xn:mr.current,me=bi(c,me));var Vt=A.getDerivedStateFromProps;(Ve=typeof Vt=="function"||typeof J.getSnapshotBeforeUpdate=="function")||typeof J.UNSAFE_componentWillReceiveProps!="function"&&typeof J.componentWillReceiveProps!="function"||(se!==lt||ze!==me)&&Ob(c,J,I,me),to=!1,ze=c.memoizedState,J.state=ze,Bf(c,I,J,j);var jt=c.memoizedState;se!==lt||ze!==jt||Ur.current||to?(typeof Vt=="function"&&(X0(c,A,Vt,I),jt=c.memoizedState),(Re=to||Sb(c,A,Re,I,ze,jt,me)||!1)?(Ve||typeof J.UNSAFE_componentWillUpdate!="function"&&typeof J.componentWillUpdate!="function"||(typeof J.componentWillUpdate=="function"&&J.componentWillUpdate(I,jt,me),typeof J.UNSAFE_componentWillUpdate=="function"&&J.UNSAFE_componentWillUpdate(I,jt,me)),typeof J.componentDidUpdate=="function"&&(c.flags|=4),typeof J.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof J.componentDidUpdate!="function"||se===s.memoizedProps&&ze===s.memoizedState||(c.flags|=4),typeof J.getSnapshotBeforeUpdate!="function"||se===s.memoizedProps&&ze===s.memoizedState||(c.flags|=1024),c.memoizedProps=I,c.memoizedState=jt),J.props=I,J.state=jt,J.context=me,I=Re):(typeof J.componentDidUpdate!="function"||se===s.memoizedProps&&ze===s.memoizedState||(c.flags|=4),typeof J.getSnapshotBeforeUpdate!="function"||se===s.memoizedProps&&ze===s.memoizedState||(c.flags|=1024),I=!1)}return t1(s,c,A,I,W,j)}function t1(s,c,A,I,j,W){Nb(s,c);var J=(c.flags&128)!==0;if(!I&&!J)return j&&ma(c,A,!1),Sa(s,c,W);I=c.stateNode,eE.current=c;var se=J&&typeof A.getDerivedStateFromError!="function"?null:I.render();return c.flags|=1,s!==null&&J?(c.child=ss(c,s.child,null,W),c.child=ss(c,null,se,W)):cn(s,c,se,W),c.memoizedState=I.state,j&&ma(c,A,!0),c.child}function Db(s){var c=s.stateNode;c.pendingContext?Zl(s,c.pendingContext,c.pendingContext!==c.context):c.context&&Zl(s,c.context,!1),j0(s,c.containerInfo)}function Fb(s,c,A,I,j){return ls(),R0(j),c.flags|=256,cn(s,c,A,I),c.child}var r1={dehydrated:null,treeContext:null,retryLane:0};function n1(s){return{baseLanes:s,cachePool:null,transitions:null}}function jb(s,c,A){var I=c.pendingProps,j=Jt.current,W=!1,J=(c.flags&128)!==0,se;if((se=J)||(se=s!==null&&s.memoizedState===null?!1:(j&2)!==0),se?(W=!0,c.flags&=-129):(s===null||s.memoizedState!==null)&&(j|=1),Rt(Jt,j&1),s===null)return k0(c),s=c.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(c.mode&1?it(s)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(J=I.children,s=I.fallback,W?(I=c.mode,W=c.child,J={mode:"hidden",children:J},!(I&1)&&W!==null?(W.childLanes=0,W.pendingProps=J):W=pd(J,I,0,null),s=ol(s,I,A,null),W.return=c,s.return=c,W.sibling=s,c.child=W,c.child.memoizedState=n1(A),c.memoizedState=r1,s):i1(c,J));if(j=s.memoizedState,j!==null&&(se=j.dehydrated,se!==null))return tE(s,c,J,I,se,j,A);if(W){W=I.fallback,J=c.mode,j=s.child,se=j.sibling;var me={mode:"hidden",children:I.children};return!(J&1)&&c.child!==j?(I=c.child,I.childLanes=0,I.pendingProps=me,c.deletions=null):(I=lo(j,me),I.subtreeFlags=j.subtreeFlags&14680064),se!==null?W=lo(se,W):(W=ol(W,J,A,null),W.flags|=2),W.return=c,I.return=c,I.sibling=W,c.child=I,I=W,W=c.child,J=s.child.memoizedState,J=J===null?n1(A):{baseLanes:J.baseLanes|A,cachePool:null,transitions:J.transitions},W.memoizedState=J,W.childLanes=s.childLanes&~A,c.memoizedState=r1,I}return W=s.child,s=W.sibling,I=lo(W,{mode:"visible",children:I.children}),!(c.mode&1)&&(I.lanes=A),I.return=c,I.sibling=null,s!==null&&(A=c.deletions,A===null?(c.deletions=[s],c.flags|=16):A.push(s)),c.child=I,c.memoizedState=null,I}function i1(s,c){return c=pd({mode:"visible",children:c},s.mode,0,null),c.return=s,s.child=c}function Yf(s,c,A,I){return I!==null&&R0(I),ss(c,s.child,null,A),s=i1(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function tE(s,c,A,I,j,W,J){if(A)return c.flags&256?(c.flags&=-257,I=Q0(Error(o(422))),Yf(s,c,J,I)):c.memoizedState!==null?(c.child=s.child,c.flags|=128,null):(W=I.fallback,j=c.mode,I=pd({mode:"visible",children:I.children},j,0,null),W=ol(W,j,J,null),W.flags|=2,I.return=c,W.return=c,I.sibling=W,c.child=I,c.mode&1&&ss(c,s.child,null,J),c.child.memoizedState=n1(J),c.memoizedState=r1,W);if(!(c.mode&1))return Yf(s,c,J,null);if(it(j))return I=Qe(j).digest,W=Error(o(419)),I=Q0(W,I,void 0),Yf(s,c,J,I);if(A=(J&s.childLanes)!==0,yn||A){if(I=Ir,I!==null){switch(J&-J){case 4:j=2;break;case 16:j=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:j=32;break;case 536870912:j=268435456;break;default:j=0}j=j&(I.suspendedLanes|J)?0:j,j!==0&&j!==W.retryLane&&(W.retryLane=j,qi(s,j),ii(I,s,j,-1))}return O1(),I=Q0(Error(o(421))),Yf(s,c,J,I)}return De(j)?(c.flags|=128,c.child=s.child,c=pE.bind(null,s),kt(j,c),null):(s=W.treeContext,ae&&(ei=$t(j),Fn=c,Kt=!0,Si=null,Iu=!1,s!==null&&(Qn[Jn++]=ba,Qn[Jn++]=_a,Qn[Jn++]=Qo,ba=s.id,_a=s.overflow,Qo=c)),c=i1(c,I.children),c.flags|=4096,c)}function zb(s,c,A){s.lanes|=c;var I=s.alternate;I!==null&&(I.lanes|=c),I0(s.return,c,A)}function a1(s,c,A,I,j){var W=s.memoizedState;W===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:I,tail:A,tailMode:j}:(W.isBackwards=c,W.rendering=null,W.renderingStartTime=0,W.last=I,W.tail=A,W.tailMode=j)}function Bb(s,c,A){var I=c.pendingProps,j=I.revealOrder,W=I.tail;if(cn(s,c,I.children,A),I=Jt.current,I&2)I=I&1|2,c.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&zb(s,A,c);else if(s.tag===19)zb(s,A,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}I&=1}if(Rt(Jt,I),!(c.mode&1))c.memoizedState=null;else switch(j){case"forwards":for(A=c.child,j=null;A!==null;)s=A.alternate,s!==null&&Uf(s)===null&&(j=A),A=A.sibling;A=j,A===null?(j=c.child,c.child=null):(j=A.sibling,A.sibling=null),a1(c,!1,j,A,W);break;case"backwards":for(A=null,j=c.child,c.child=null;j!==null;){if(s=j.alternate,s!==null&&Uf(s)===null){c.child=j;break}s=j.sibling,j.sibling=A,A=j,j=s}a1(c,!0,A,null,W);break;case"together":a1(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function Kf(s,c){!(c.mode&1)&&s!==null&&(s.alternate=null,c.alternate=null,c.flags|=2)}function Sa(s,c,A){if(s!==null&&(c.dependencies=s.dependencies),rl|=c.lanes,!(A&c.childLanes))return null;if(s!==null&&c.child!==s.child)throw Error(o(153));if(c.child!==null){for(s=c.child,A=lo(s,s.pendingProps),c.child=A,A.return=c;s.sibling!==null;)s=s.sibling,A=A.sibling=lo(s,s.pendingProps),A.return=c;A.sibling=null}return c.child}function rE(s,c,A){switch(c.tag){case 3:Db(c),ls();break;case 5:eb(c);break;case 1:Yt(c.type)&&Jl(c);break;case 4:j0(c,c.stateNode.containerInfo);break;case 10:K2(c,c.type._context,c.memoizedProps.value);break;case 13:var I=c.memoizedState;if(I!==null)return I.dehydrated!==null?(Rt(Jt,Jt.current&1),c.flags|=128,null):A&c.child.childLanes?jb(s,c,A):(Rt(Jt,Jt.current&1),s=Sa(s,c,A),s!==null?s.sibling:null);Rt(Jt,Jt.current&1);break;case 19:if(I=(A&c.childLanes)!==0,s.flags&128){if(I)return Bb(s,c,A);c.flags|=128}var j=c.memoizedState;if(j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),Rt(Jt,Jt.current),I)break;return null;case 22:case 23:return c.lanes=0,Mb(s,c,A)}return Sa(s,c,A)}function Ki(s){s.flags|=4}function Ub(s,c){if(s!==null&&s.child===c.child)return!0;if(c.flags&16)return!1;for(s=c.child;s!==null;){if(s.flags&12854||s.subtreeFlags&12854)return!1;s=s.sibling}return!0}var Gu,$u,Xf,Zf;if(te)Gu=function(s,c){for(var A=c.child;A!==null;){if(A.tag===5||A.tag===6)z(s,A.stateNode);else if(A.tag!==4&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===c)break;for(;A.sibling===null;){if(A.return===null||A.return===c)return;A=A.return}A.sibling.return=A.return,A=A.sibling}},$u=function(){},Xf=function(s,c,A,I,j){if(s=s.memoizedProps,s!==I){var W=c.stateNode,J=Wi(ri.current);A=V(W,A,s,I,j,J),(c.updateQueue=A)&&Ki(c)}},Zf=function(s,c,A,I){A!==I&&Ki(c)};else if(ee){Gu=function(s,c,A,I){for(var j=c.child;j!==null;){if(j.tag===5){var W=j.stateNode;A&&I&&(W=xt(W,j.type,j.memoizedProps,j)),z(s,W)}else if(j.tag===6)W=j.stateNode,A&&I&&(W=ar(W,j.memoizedProps,j)),z(s,W);else if(j.tag!==4){if(j.tag===22&&j.memoizedState!==null)W=j.child,W!==null&&(W.return=j),Gu(s,j,!0,!0);else if(j.child!==null){j.child.return=j,j=j.child;continue}}if(j===c)break;for(;j.sibling===null;){if(j.return===null||j.return===c)return;j=j.return}j.sibling.return=j.return,j=j.sibling}};var Hb=function(s,c,A,I){for(var j=c.child;j!==null;){if(j.tag===5){var W=j.stateNode;A&&I&&(W=xt(W,j.type,j.memoizedProps,j)),He(s,W)}else if(j.tag===6)W=j.stateNode,A&&I&&(W=ar(W,j.memoizedProps,j)),He(s,W);else if(j.tag!==4){if(j.tag===22&&j.memoizedState!==null)W=j.child,W!==null&&(W.return=j),Hb(s,j,!0,!0);else if(j.child!==null){j.child.return=j,j=j.child;continue}}if(j===c)break;for(;j.sibling===null;){if(j.return===null||j.return===c)return;j=j.return}j.sibling.return=j.return,j=j.sibling}};$u=function(s,c){var A=c.stateNode;if(!Ub(s,c)){s=A.containerInfo;var I=Pe(s);Hb(I,c,!1,!1),A.pendingChildren=I,Ki(c),Je(s,I)}},Xf=function(s,c,A,I,j){var W=s.stateNode,J=s.memoizedProps;if((s=Ub(s,c))&&J===I)c.stateNode=W;else{var se=c.stateNode,me=Wi(ri.current),Re=null;J!==I&&(Re=V(se,A,J,I,j,me)),s&&Re===null?c.stateNode=W:(W=Sr(W,Re,A,J,I,c,s,se),F(W,A,I,j,me)&&Ki(c),c.stateNode=W,s?Ki(c):Gu(W,c,!1,!1))}},Zf=function(s,c,A,I){A!==I?(s=Wi(fs.current),A=Wi(ri.current),c.stateNode=q(I,s,A,c),Ki(c)):c.stateNode=s.stateNode}}else $u=function(){},Xf=function(){},Zf=function(){};function Vu(s,c){if(!Kt)switch(s.tailMode){case"hidden":c=s.tail;for(var A=null;c!==null;)c.alternate!==null&&(A=c),c=c.sibling;A===null?s.tail=null:A.sibling=null;break;case"collapsed":A=s.tail;for(var I=null;A!==null;)A.alternate!==null&&(I=A),A=A.sibling;I===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:I.sibling=null}}function Zr(s){var c=s.alternate!==null&&s.alternate.child===s.child,A=0,I=0;if(c)for(var j=s.child;j!==null;)A|=j.lanes|j.childLanes,I|=j.subtreeFlags&14680064,I|=j.flags&14680064,j.return=s,j=j.sibling;else for(j=s.child;j!==null;)A|=j.lanes|j.childLanes,I|=j.subtreeFlags,I|=j.flags,j.return=s,j=j.sibling;return s.subtreeFlags|=I,s.childLanes=A,c}function nE(s,c,A){var I=c.pendingProps;switch(T0(c),c.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zr(c),null;case 1:return Yt(c.type)&&_i(),Zr(c),null;case 3:return A=c.stateNode,ds(),Nt(Ur),Nt(mr),U0(),A.pendingContext&&(A.context=A.pendingContext,A.pendingContext=null),(s===null||s.child===null)&&(Nf(c)?Ki(c):s===null||s.memoizedState.isDehydrated&&!(c.flags&256)||(c.flags|=1024,Si!==null&&(S1(Si),Si=null))),$u(s,c),Zr(c),null;case 5:z0(c),A=Wi(fs.current);var j=c.type;if(s!==null&&c.stateNode!=null)Xf(s,c,j,I,A),s.ref!==c.ref&&(c.flags|=512,c.flags|=2097152);else{if(!I){if(c.stateNode===null)throw Error(o(166));return Zr(c),null}if(s=Wi(ri.current),Nf(c)){if(!ae)throw Error(o(175));s=Br(c.stateNode,c.type,c.memoizedProps,A,s,c,!Iu),c.updateQueue=s,s!==null&&Ki(c)}else{var W=D(j,I,A,s,c);Gu(W,c,!1,!1),c.stateNode=W,F(W,j,I,A,s)&&Ki(c)}c.ref!==null&&(c.flags|=512,c.flags|=2097152)}return Zr(c),null;case 6:if(s&&c.stateNode!=null)Zf(s,c,s.memoizedProps,I);else{if(typeof I!="string"&&c.stateNode===null)throw Error(o(166));if(s=Wi(fs.current),A=Wi(ri.current),Nf(c)){if(!ae)throw Error(o(176));if(s=c.stateNode,A=c.memoizedProps,(I=vr(s,A,c,!Iu))&&(j=Fn,j!==null))switch(j.tag){case 3:mi(j.stateNode.containerInfo,s,A,(j.mode&1)!==0);break;case 5:Kl(j.type,j.memoizedProps,j.stateNode,s,A,(j.mode&1)!==0)}I&&Ki(c)}else c.stateNode=q(I,s,A,c)}return Zr(c),null;case 13:if(Nt(Jt),I=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Kt&&ei!==null&&c.mode&1&&!(c.flags&128))V2(),ls(),c.flags|=98560,j=!1;else if(j=Nf(c),I!==null&&I.dehydrated!==null){if(s===null){if(!j)throw Error(o(318));if(!ae)throw Error(o(344));if(j=c.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(o(317));Mr(j,c)}else ls(),!(c.flags&128)&&(c.memoizedState=null),c.flags|=4;Zr(c),j=!1}else Si!==null&&(S1(Si),Si=null),j=!0;if(!j)return c.flags&65536?c:null}return c.flags&128?(c.lanes=A,c):(A=I!==null,A!==(s!==null&&s.memoizedState!==null)&&A&&(c.child.flags|=8192,c.mode&1&&(s===null||Jt.current&1?Or===0&&(Or=3):O1())),c.updateQueue!==null&&(c.flags|=4),Zr(c),null);case 4:return ds(),$u(s,c),s===null&&le(c.stateNode.containerInfo),Zr(c),null;case 10:return N0(c.type._context),Zr(c),null;case 17:return Yt(c.type)&&_i(),Zr(c),null;case 19:if(Nt(Jt),j=c.memoizedState,j===null)return Zr(c),null;if(I=(c.flags&128)!==0,W=j.rendering,W===null)if(I)Vu(j,!1);else{if(Or!==0||s!==null&&s.flags&128)for(s=c.child;s!==null;){if(W=Uf(s),W!==null){for(c.flags|=128,Vu(j,!1),s=W.updateQueue,s!==null&&(c.updateQueue=s,c.flags|=4),c.subtreeFlags=0,s=A,A=c.child;A!==null;)I=A,j=s,I.flags&=14680066,W=I.alternate,W===null?(I.childLanes=0,I.lanes=j,I.child=null,I.subtreeFlags=0,I.memoizedProps=null,I.memoizedState=null,I.updateQueue=null,I.dependencies=null,I.stateNode=null):(I.childLanes=W.childLanes,I.lanes=W.lanes,I.child=W.child,I.subtreeFlags=0,I.deletions=null,I.memoizedProps=W.memoizedProps,I.memoizedState=W.memoizedState,I.updateQueue=W.updateQueue,I.type=W.type,j=W.dependencies,I.dependencies=j===null?null:{lanes:j.lanes,firstContext:j.firstContext}),A=A.sibling;return Rt(Jt,Jt.current&1|2),c.child}s=s.sibling}j.tail!==null&&dr()>y1&&(c.flags|=128,I=!0,Vu(j,!1),c.lanes=4194304)}else{if(!I)if(s=Uf(W),s!==null){if(c.flags|=128,I=!0,s=s.updateQueue,s!==null&&(c.updateQueue=s,c.flags|=4),Vu(j,!0),j.tail===null&&j.tailMode==="hidden"&&!W.alternate&&!Kt)return Zr(c),null}else 2*dr()-j.renderingStartTime>y1&&A!==1073741824&&(c.flags|=128,I=!0,Vu(j,!1),c.lanes=4194304);j.isBackwards?(W.sibling=c.child,c.child=W):(s=j.last,s!==null?s.sibling=W:c.child=W,j.last=W)}return j.tail!==null?(c=j.tail,j.rendering=c,j.tail=c.sibling,j.renderingStartTime=dr(),c.sibling=null,s=Jt.current,Rt(Jt,I?s&1|2:s&1),c):(Zr(c),null);case 22:case 23:return E1(),A=c.memoizedState!==null,s!==null&&s.memoizedState!==null!==A&&(c.flags|=8192),A&&c.mode&1?jn&1073741824&&(Zr(c),te&&c.subtreeFlags&6&&(c.flags|=8192)):Zr(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}function iE(s,c){switch(T0(c),c.tag){case 1:return Yt(c.type)&&_i(),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return ds(),Nt(Ur),Nt(mr),U0(),s=c.flags,s&65536&&!(s&128)?(c.flags=s&-65537|128,c):null;case 5:return z0(c),null;case 13:if(Nt(Jt),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(o(340));ls()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return Nt(Jt),null;case 4:return ds(),null;case 10:return N0(c.type._context),null;case 22:case 23:return E1(),null;case 24:return null;default:return null}}var Qf=!1,Qr=!1,aE=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function ps(s,c){var A=s.ref;if(A!==null)if(typeof A=="function")try{A(null)}catch(I){Xt(s,c,I)}else A.current=null}function o1(s,c,A){try{A()}catch(I){Xt(s,c,I)}}var Gb=!1;function oE(s,c){for(H(s.containerInfo),Ge=c;Ge!==null;)if(s=Ge,c=s.child,(s.subtreeFlags&1028)!==0&&c!==null)c.return=s,Ge=c;else for(;Ge!==null;){s=Ge;try{var A=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var I=A.memoizedProps,j=A.memoizedState,W=s.stateNode,J=W.getSnapshotBeforeUpdate(s.elementType===s.type?I:Ei(s.type,I),j);W.__reactInternalSnapshotBeforeUpdate=J}break;case 3:te&&Ke(s.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(se){Xt(s,s.return,se)}if(c=s.sibling,c!==null){c.return=s.return,Ge=c;break}Ge=s.return}return A=Gb,Gb=!1,A}function qu(s,c,A){var I=c.updateQueue;if(I=I!==null?I.lastEffect:null,I!==null){var j=I=I.next;do{if((j.tag&s)===s){var W=j.destroy;j.destroy=void 0,W!==void 0&&o1(c,A,W)}j=j.next}while(j!==I)}}function Jf(s,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var A=c=c.next;do{if((A.tag&s)===s){var I=A.create;A.destroy=I()}A=A.next}while(A!==c)}}function l1(s){var c=s.ref;if(c!==null){var A=s.stateNode;switch(s.tag){case 5:s=Z(A);break;default:s=A}typeof c=="function"?c(s):c.current=s}}function $b(s){var c=s.alternate;c!==null&&(s.alternate=null,$b(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&Fe(c)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Vb(s){return s.tag===5||s.tag===3||s.tag===4}function qb(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Vb(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function s1(s,c,A){var I=s.tag;if(I===5||I===6)s=s.stateNode,c?he(A,s,c):Ze(A,s);else if(I!==4&&(s=s.child,s!==null))for(s1(s,c,A),s=s.sibling;s!==null;)s1(s,c,A),s=s.sibling}function u1(s,c,A){var I=s.tag;if(I===5||I===6)s=s.stateNode,c?ue(A,s,c):ke(A,s);else if(I!==4&&(s=s.child,s!==null))for(u1(s,c,A),s=s.sibling;s!==null;)u1(s,c,A),s=s.sibling}var Hr=null,Oi=!1;function Xi(s,c,A){for(A=A.child;A!==null;)c1(s,c,A),A=A.sibling}function c1(s,c,A){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Ne,A)}catch{}switch(A.tag){case 5:Qr||ps(A,c);case 6:if(te){var I=Hr,j=Oi;Hr=null,Xi(s,c,A),Hr=I,Oi=j,Hr!==null&&(Oi?Oe(Hr,A.stateNode):nt(Hr,A.stateNode))}else Xi(s,c,A);break;case 18:te&&Hr!==null&&(Oi?Kn(Hr,A.stateNode):sn(Hr,A.stateNode));break;case 4:te?(I=Hr,j=Oi,Hr=A.stateNode.containerInfo,Oi=!0,Xi(s,c,A),Hr=I,Oi=j):(ee&&(I=A.stateNode.containerInfo,j=Pe(I),yt(I,j)),Xi(s,c,A));break;case 0:case 11:case 14:case 15:if(!Qr&&(I=A.updateQueue,I!==null&&(I=I.lastEffect,I!==null))){j=I=I.next;do{var W=j,J=W.destroy;W=W.tag,J!==void 0&&(W&2||W&4)&&o1(A,c,J),j=j.next}while(j!==I)}Xi(s,c,A);break;case 1:if(!Qr&&(ps(A,c),I=A.stateNode,typeof I.componentWillUnmount=="function"))try{I.props=A.memoizedProps,I.state=A.memoizedState,I.componentWillUnmount()}catch(se){Xt(A,c,se)}Xi(s,c,A);break;case 21:Xi(s,c,A);break;case 22:A.mode&1?(Qr=(I=Qr)||A.memoizedState!==null,Xi(s,c,A),Qr=I):Xi(s,c,A);break;default:Xi(s,c,A)}}function Wb(s){var c=s.updateQueue;if(c!==null){s.updateQueue=null;var A=s.stateNode;A===null&&(A=s.stateNode=new aE),c.forEach(function(I){var j=gE.bind(null,s,I);A.has(I)||(A.add(I),I.then(j,j))})}}function xi(s,c){var A=c.deletions;if(A!==null)for(var I=0;I<A.length;I++){var j=A[I];try{var W=s,J=c;if(te){var se=J;e:for(;se!==null;){switch(se.tag){case 5:Hr=se.stateNode,Oi=!1;break e;case 3:Hr=se.stateNode.containerInfo,Oi=!0;break e;case 4:Hr=se.stateNode.containerInfo,Oi=!0;break e}se=se.return}if(Hr===null)throw Error(o(160));c1(W,J,j),Hr=null,Oi=!1}else c1(W,J,j);var me=j.alternate;me!==null&&(me.return=null),j.return=null}catch(Re){Xt(j,c,Re)}}if(c.subtreeFlags&12854)for(c=c.child;c!==null;)Yb(c,s),c=c.sibling}function Yb(s,c){var A=s.alternate,I=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(xi(c,s),Zi(s),I&4){try{qu(3,s,s.return),Jf(3,s)}catch(ze){Xt(s,s.return,ze)}try{qu(5,s,s.return)}catch(ze){Xt(s,s.return,ze)}}break;case 1:xi(c,s),Zi(s),I&512&&A!==null&&ps(A,A.return);break;case 5:if(xi(c,s),Zi(s),I&512&&A!==null&&ps(A,A.return),te){if(s.flags&32){var j=s.stateNode;try{je(j)}catch(ze){Xt(s,s.return,ze)}}if(I&4&&(j=s.stateNode,j!=null)){var W=s.memoizedProps;if(A=A!==null?A.memoizedProps:W,I=s.type,c=s.updateQueue,s.updateQueue=null,c!==null)try{Bt(j,c,I,A,W,s)}catch(ze){Xt(s,s.return,ze)}}}break;case 6:if(xi(c,s),Zi(s),I&4&&te){if(s.stateNode===null)throw Error(o(162));j=s.stateNode,W=s.memoizedProps,A=A!==null?A.memoizedProps:W;try{We(j,A,W)}catch(ze){Xt(s,s.return,ze)}}break;case 3:if(xi(c,s),Zi(s),I&4){if(te&&ae&&A!==null&&A.memoizedState.isDehydrated)try{vi(c.containerInfo)}catch(ze){Xt(s,s.return,ze)}if(ee){j=c.containerInfo,W=c.pendingChildren;try{yt(j,W)}catch(ze){Xt(s,s.return,ze)}}}break;case 4:if(xi(c,s),Zi(s),I&4&&ee){W=s.stateNode,j=W.containerInfo,W=W.pendingChildren;try{yt(j,W)}catch(ze){Xt(s,s.return,ze)}}break;case 13:xi(c,s),Zi(s),j=s.child,j.flags&8192&&(W=j.memoizedState!==null,j.stateNode.isHidden=W,!W||j.alternate!==null&&j.alternate.memoizedState!==null||(m1=dr())),I&4&&Wb(s);break;case 22:var J=A!==null&&A.memoizedState!==null;if(s.mode&1?(Qr=(A=Qr)||J,xi(c,s),Qr=A):xi(c,s),Zi(s),I&8192){if(A=s.memoizedState!==null,(s.stateNode.isHidden=A)&&!J&&s.mode&1)for(Ge=s,I=s.child;I!==null;){for(c=Ge=I;Ge!==null;){J=Ge;var se=J.child;switch(J.tag){case 0:case 11:case 14:case 15:qu(4,J,J.return);break;case 1:ps(J,J.return);var me=J.stateNode;if(typeof me.componentWillUnmount=="function"){var Re=J,Ve=J.return;try{var lt=Re;me.props=lt.memoizedProps,me.state=lt.memoizedState,me.componentWillUnmount()}catch(ze){Xt(Re,Ve,ze)}}break;case 5:ps(J,J.return);break;case 22:if(J.memoizedState!==null){Zb(c);continue}}se!==null?(se.return=J,Ge=se):Zb(c)}I=I.sibling}if(te){e:if(I=null,te)for(c=s;;){if(c.tag===5){if(I===null){I=c;try{j=c.stateNode,A?Le(j):et(c.stateNode,c.memoizedProps)}catch(ze){Xt(s,s.return,ze)}}}else if(c.tag===6){if(I===null)try{W=c.stateNode,A?Se(W):xe(W,c.memoizedProps)}catch(ze){Xt(s,s.return,ze)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===s)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;I===c&&(I=null),c=c.return}I===c&&(I=null),c.sibling.return=c.return,c=c.sibling}}}break;case 19:xi(c,s),Zi(s),I&4&&Wb(s);break;case 21:break;default:xi(c,s),Zi(s)}}function Zi(s){var c=s.flags;if(c&2){try{if(te){e:{for(var A=s.return;A!==null;){if(Vb(A)){var I=A;break e}A=A.return}throw Error(o(160))}switch(I.tag){case 5:var j=I.stateNode;I.flags&32&&(je(j),I.flags&=-33);var W=qb(s);u1(s,W,j);break;case 3:case 4:var J=I.stateNode.containerInfo,se=qb(s);s1(s,se,J);break;default:throw Error(o(161))}}}catch(me){Xt(s,s.return,me)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function lE(s,c,A){Ge=s,Kb(s)}function Kb(s,c,A){for(var I=(s.mode&1)!==0;Ge!==null;){var j=Ge,W=j.child;if(j.tag===22&&I){var J=j.memoizedState!==null||Qf;if(!J){var se=j.alternate,me=se!==null&&se.memoizedState!==null||Qr;se=Qf;var Re=Qr;if(Qf=J,(Qr=me)&&!Re)for(Ge=j;Ge!==null;)J=Ge,me=J.child,J.tag===22&&J.memoizedState!==null?Qb(j):me!==null?(me.return=J,Ge=me):Qb(j);for(;W!==null;)Ge=W,Kb(W),W=W.sibling;Ge=j,Qf=se,Qr=Re}Xb(s)}else j.subtreeFlags&8772&&W!==null?(W.return=j,Ge=W):Xb(s)}}function Xb(s){for(;Ge!==null;){var c=Ge;if(c.flags&8772){var A=c.alternate;try{if(c.flags&8772)switch(c.tag){case 0:case 11:case 15:Qr||Jf(5,c);break;case 1:var I=c.stateNode;if(c.flags&4&&!Qr)if(A===null)I.componentDidMount();else{var j=c.elementType===c.type?A.memoizedProps:Ei(c.type,A.memoizedProps);I.componentDidUpdate(j,A.memoizedState,I.__reactInternalSnapshotBeforeUpdate)}var W=c.updateQueue;W!==null&&J2(c,W,I);break;case 3:var J=c.updateQueue;if(J!==null){if(A=null,c.child!==null)switch(c.child.tag){case 5:A=Z(c.child.stateNode);break;case 1:A=c.child.stateNode}J2(c,J,A)}break;case 5:var se=c.stateNode;A===null&&c.flags&4&&dt(se,c.type,c.memoizedProps,c);break;case 6:break;case 4:break;case 12:break;case 13:if(ae&&c.memoizedState===null){var me=c.alternate;if(me!==null){var Re=me.memoizedState;if(Re!==null){var Ve=Re.dehydrated;Ve!==null&&mn(Ve)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Qr||c.flags&512&&l1(c)}catch(lt){Xt(c,c.return,lt)}}if(c===s){Ge=null;break}if(A=c.sibling,A!==null){A.return=c.return,Ge=A;break}Ge=c.return}}function Zb(s){for(;Ge!==null;){var c=Ge;if(c===s){Ge=null;break}var A=c.sibling;if(A!==null){A.return=c.return,Ge=A;break}Ge=c.return}}function Qb(s){for(;Ge!==null;){var c=Ge;try{switch(c.tag){case 0:case 11:case 15:var A=c.return;try{Jf(4,c)}catch(me){Xt(c,A,me)}break;case 1:var I=c.stateNode;if(typeof I.componentDidMount=="function"){var j=c.return;try{I.componentDidMount()}catch(me){Xt(c,j,me)}}var W=c.return;try{l1(c)}catch(me){Xt(c,W,me)}break;case 5:var J=c.return;try{l1(c)}catch(me){Xt(c,J,me)}}}catch(me){Xt(c,c.return,me)}if(c===s){Ge=null;break}var se=c.sibling;if(se!==null){se.return=c.return,Ge=se;break}Ge=c.return}}var ed=0,td=1,rd=2,nd=3,id=4;if(typeof Symbol=="function"&&Symbol.for){var Wu=Symbol.for;ed=Wu("selector.component"),td=Wu("selector.has_pseudo_class"),rd=Wu("selector.role"),nd=Wu("selector.test_id"),id=Wu("selector.text")}function f1(s){var c=oe(s);if(c!=null){if(typeof c.memoizedProps["data-testname"]!="string")throw Error(o(364));return c}if(s=pe(s),s===null)throw Error(o(362));return s.stateNode.current}function d1(s,c){switch(c.$$typeof){case ed:if(s.type===c.value)return!0;break;case td:e:{c=c.value,s=[s,0];for(var A=0;A<s.length;){var I=s[A++],j=s[A++],W=c[j];if(I.tag!==5||!be(I)){for(;W!=null&&d1(I,W);)j++,W=c[j];if(j===c.length){c=!0;break e}else for(I=I.child;I!==null;)s.push(I,j),I=I.sibling}}c=!1}return c;case rd:if(s.tag===5&&ye(s.stateNode,c.value))return!0;break;case id:if((s.tag===5||s.tag===6)&&(s=de(s),s!==null&&0<=s.indexOf(c.value)))return!0;break;case nd:if(s.tag===5&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===c.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function h1(s){switch(s.$$typeof){case ed:return"<"+(C(s.value)||"Unknown")+">";case td:return":has("+(h1(s)||"")+")";case rd:return'[role="'+s.value+'"]';case id:return'"'+s.value+'"';case nd:return'[data-testname="'+s.value+'"]';default:throw Error(o(365))}}function Jb(s,c){var A=[];s=[s,0];for(var I=0;I<s.length;){var j=s[I++],W=s[I++],J=c[W];if(j.tag!==5||!be(j)){for(;J!=null&&d1(j,J);)W++,J=c[W];if(W===c.length)A.push(j);else for(j=j.child;j!==null;)s.push(j,W),j=j.sibling}}return A}function p1(s,c){if(!ge)throw Error(o(363));s=f1(s),s=Jb(s,c),c=[],s=Array.from(s);for(var A=0;A<s.length;){var I=s[A++];if(I.tag===5)be(I)||c.push(I.stateNode);else for(I=I.child;I!==null;)s.push(I),I=I.sibling}return c}var sE=Math.ceil,ad=l.ReactCurrentDispatcher,g1=l.ReactCurrentOwner,hr=l.ReactCurrentBatchConfig,mt=0,Ir=null,br=null,Gr=0,jn=0,gs=un(0),Or=0,Yu=null,rl=0,od=0,v1=0,Ku=null,bn=null,m1=0,y1=1/0,Ea=null;function vs(){y1=dr()+500}var ld=!1,b1=null,no=null,sd=!1,io=null,ud=0,Xu=0,_1=null,cd=-1,fd=0;function Jr(){return mt&6?dr():cd!==-1?cd:cd=dr()}function ao(s){return s.mode&1?mt&2&&Gr!==0?Gr&-Gr:$S.transition!==null?(fd===0&&(fd=ts()),fd):(s=St,s!==0?s:Te()):1}function ii(s,c,A,I){if(50<Xu)throw Xu=0,_1=null,Error(o(185));Dn(s,A,I),(!(mt&2)||s!==Ir)&&(s===Ir&&(!(mt&2)&&(od|=A),Or===4&&oo(s,Gr)),_n(s,I),A===1&&mt===0&&!(c.mode&1)&&(vs(),wi&&Vi()))}function _n(s,c){var A=s.callbackNode;O0(s,c);var I=Zo(s,s===Ir?Gr:0);if(I===0)A!==null&&Zn(A),s.callbackNode=null,s.callbackPriority=0;else if(c=I&-I,s.callbackPriority!==c){if(A!=null&&Zn(A),c===1)s.tag===0?GS(t3.bind(null,s)):P0(t3.bind(null,s)),fe?ne(function(){!(mt&6)&&Vi()}):eo(ns,Vi),A=null;else{switch(Af(I)){case 1:A=ns;break;case 4:A=x0;break;case 16:A=ie;break;case 536870912:A=Ae;break;default:A=ie}A=c3(A,e3.bind(null,s))}s.callbackPriority=c,s.callbackNode=A}}function e3(s,c){if(cd=-1,fd=0,mt&6)throw Error(o(327));var A=s.callbackNode;if(al()&&s.callbackNode!==A)return null;var I=Zo(s,s===Ir?Gr:0);if(I===0)return null;if(I&30||I&s.expiredLanes||c)c=dd(s,I);else{c=I;var j=mt;mt|=2;var W=i3();(Ir!==s||Gr!==c)&&(Ea=null,vs(),nl(s,c));do try{fE();break}catch(se){n3(s,se)}while(!0);M0(),ad.current=W,mt=j,br!==null?c=0:(Ir=null,Gr=0,c=Or)}if(c!==0){if(c===2&&(j=Ja(s),j!==0&&(I=j,c=w1(s,j))),c===1)throw A=Yu,nl(s,0),oo(s,I),_n(s,dr()),A;if(c===6)oo(s,I);else{if(j=s.current.alternate,!(I&30)&&!uE(j)&&(c=dd(s,I),c===2&&(W=Ja(s),W!==0&&(I=W,c=w1(s,W))),c===1))throw A=Yu,nl(s,0),oo(s,I),_n(s,dr()),A;switch(s.finishedWork=j,s.finishedLanes=I,c){case 0:case 1:throw Error(o(345));case 2:il(s,bn,Ea);break;case 3:if(oo(s,I),(I&130023424)===I&&(c=m1+500-dr(),10<c)){if(Zo(s,0)!==0)break;if(j=s.suspendedLanes,(j&I)!==I){Jr(),s.pingedLanes|=s.suspendedLanes&j;break}s.timeoutHandle=G(il.bind(null,s,bn,Ea),c);break}il(s,bn,Ea);break;case 4:if(oo(s,I),(I&4194240)===I)break;for(c=s.eventTimes,j=-1;0<I;){var J=31-In(I);W=1<<J,J=c[J],J>j&&(j=J),I&=~W}if(I=j,I=dr()-I,I=(120>I?120:480>I?480:1080>I?1080:1920>I?1920:3e3>I?3e3:4320>I?4320:1960*sE(I/1960))-I,10<I){s.timeoutHandle=G(il.bind(null,s,bn,Ea),I);break}il(s,bn,Ea);break;case 5:il(s,bn,Ea);break;default:throw Error(o(329))}}}return _n(s,dr()),s.callbackNode===A?e3.bind(null,s):null}function w1(s,c){var A=Ku;return s.current.memoizedState.isDehydrated&&(nl(s,c).flags|=256),s=dd(s,c),s!==2&&(c=bn,bn=A,c!==null&&S1(c)),s}function S1(s){bn===null?bn=s:bn.push.apply(bn,s)}function uE(s){for(var c=s;;){if(c.flags&16384){var A=c.updateQueue;if(A!==null&&(A=A.stores,A!==null))for(var I=0;I<A.length;I++){var j=A[I],W=j.getSnapshot;j=j.value;try{if(!lr(W(),j))return!1}catch{return!1}}}if(A=c.child,c.subtreeFlags&16384&&A!==null)A.return=c,c=A;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function oo(s,c){for(c&=~v1,c&=~od,s.suspendedLanes|=c,s.pingedLanes&=~c,s=s.expirationTimes;0<c;){var A=31-In(c),I=1<<A;s[A]=-1,c&=~I}}function t3(s){if(mt&6)throw Error(o(327));al();var c=Zo(s,0);if(!(c&1))return _n(s,dr()),null;var A=dd(s,c);if(s.tag!==0&&A===2){var I=Ja(s);I!==0&&(c=I,A=w1(s,I))}if(A===1)throw A=Yu,nl(s,0),oo(s,c),_n(s,dr()),A;if(A===6)throw Error(o(345));return s.finishedWork=s.current.alternate,s.finishedLanes=c,il(s,bn,Ea),_n(s,dr()),null}function r3(s){io!==null&&io.tag===0&&!(mt&6)&&al();var c=mt;mt|=1;var A=hr.transition,I=St;try{if(hr.transition=null,St=1,s)return s()}finally{St=I,hr.transition=A,mt=c,!(mt&6)&&Vi()}}function E1(){jn=gs.current,Nt(gs)}function nl(s,c){s.finishedWork=null,s.finishedLanes=0;var A=s.timeoutHandle;if(A!==X&&(s.timeoutHandle=X,K(A)),br!==null)for(A=br.return;A!==null;){var I=A;switch(T0(I),I.tag){case 1:I=I.type.childContextTypes,I!=null&&_i();break;case 3:ds(),Nt(Ur),Nt(mr),U0();break;case 5:z0(I);break;case 4:ds();break;case 13:Nt(Jt);break;case 19:Nt(Jt);break;case 10:N0(I.type._context);break;case 22:case 23:E1()}A=A.return}if(Ir=s,br=s=lo(s.current,null),Gr=jn=c,Or=0,Yu=null,v1=od=rl=0,bn=Ku=null,el!==null){for(c=0;c<el.length;c++)if(A=el[c],I=A.interleaved,I!==null){A.interleaved=null;var j=I.next,W=A.pending;if(W!==null){var J=W.next;W.next=j,I.next=J}A.pending=I}el=null}return s}function n3(s,c){do{var A=br;try{if(M0(),Hf.current=qf,Gf){for(var I=er.memoizedState;I!==null;){var j=I.queue;j!==null&&(j.pending=null),I=I.next}Gf=!1}if(tl=0,Nr=Er=er=null,zu=!1,Bu=0,g1.current=null,A===null||A.return===null){Or=1,Yu=c,br=null;break}e:{var W=s,J=A.return,se=A,me=c;if(c=Gr,se.flags|=32768,me!==null&&typeof me=="object"&&typeof me.then=="function"){var Re=me,Ve=se,lt=Ve.tag;if(!(Ve.mode&1)&&(lt===0||lt===11||lt===15)){var ze=Ve.alternate;ze?(Ve.updateQueue=ze.updateQueue,Ve.memoizedState=ze.memoizedState,Ve.lanes=ze.lanes):(Ve.updateQueue=null,Ve.memoizedState=null)}var Vt=Tb(J);if(Vt!==null){Vt.flags&=-257,Ab(Vt,J,se,W,c),Vt.mode&1&&Cb(W,Re,c),c=Vt,me=Re;var jt=c.updateQueue;if(jt===null){var wn=new Set;wn.add(me),c.updateQueue=wn}else jt.add(me);break e}else{if(!(c&1)){Cb(W,Re,c),O1();break e}me=Error(o(426))}}else if(Kt&&se.mode&1){var Oa=Tb(J);if(Oa!==null){!(Oa.flags&65536)&&(Oa.flags|=256),Ab(Oa,J,se,W,c),R0(hs(me,se));break e}}W=me=hs(me,se),Or!==4&&(Or=2),Ku===null?Ku=[W]:Ku.push(W),W=J;do{switch(W.tag){case 3:W.flags|=65536,c&=-c,W.lanes|=c;var ve=xb(W,me,c);Q2(W,ve);break e;case 1:se=me;var ce=W.type,_e=W.stateNode;if(!(W.flags&128)&&(typeof ce.getDerivedStateFromError=="function"||_e!==null&&typeof _e.componentDidCatch=="function"&&(no===null||!no.has(_e)))){W.flags|=65536,c&=-c,W.lanes|=c;var Be=Pb(W,se,c);Q2(W,Be);break e}}W=W.return}while(W!==null)}o3(A)}catch(rt){c=rt,br===A&&A!==null&&(br=A=A.return);continue}break}while(!0)}function i3(){var s=ad.current;return ad.current=qf,s===null?qf:s}function O1(){(Or===0||Or===3||Or===2)&&(Or=4),Ir===null||!(rl&268435455)&&!(od&268435455)||oo(Ir,Gr)}function dd(s,c){var A=mt;mt|=2;var I=i3();(Ir!==s||Gr!==c)&&(Ea=null,nl(s,c));do try{cE();break}catch(j){n3(s,j)}while(!0);if(M0(),mt=A,ad.current=I,br!==null)throw Error(o(261));return Ir=null,Gr=0,Or}function cE(){for(;br!==null;)a3(br)}function fE(){for(;br!==null&&!kf();)a3(br)}function a3(s){var c=u3(s.alternate,s,jn);s.memoizedProps=s.pendingProps,c===null?o3(s):br=c,g1.current=null}function o3(s){var c=s;do{var A=c.alternate;if(s=c.return,c.flags&32768){if(A=iE(A,c),A!==null){A.flags&=32767,br=A;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Or=6,br=null;return}}else if(A=nE(A,c,jn),A!==null){br=A;return}if(c=c.sibling,c!==null){br=c;return}br=c=s}while(c!==null);Or===0&&(Or=5)}function il(s,c,A){var I=St,j=hr.transition;try{hr.transition=null,St=1,dE(s,c,A,I)}finally{hr.transition=j,St=I}return null}function dE(s,c,A,I){do al();while(io!==null);if(mt&6)throw Error(o(327));A=s.finishedWork;var j=s.finishedLanes;if(A===null)return null;if(s.finishedWork=null,s.finishedLanes=0,A===s.current)throw Error(o(177));s.callbackNode=null,s.callbackPriority=0;var W=A.lanes|A.childLanes;if(Nu(s,W),s===Ir&&(br=Ir=null,Gr=0),!(A.subtreeFlags&2064)&&!(A.flags&2064)||sd||(sd=!0,c3(ie,function(){return al(),null})),W=(A.flags&15990)!==0,A.subtreeFlags&15990||W){W=hr.transition,hr.transition=null;var J=St;St=1;var se=mt;mt|=4,g1.current=null,oE(s,A),Yb(A,s),R(s.containerInfo),s.current=A,lE(A),Rf(),mt=se,St=J,hr.transition=W}else s.current=A;if(sd&&(sd=!1,io=s,ud=j),W=s.pendingLanes,W===0&&(no=null),or(A.stateNode),_n(s,dr()),c!==null)for(I=s.onRecoverableError,A=0;A<c.length;A++)j=c[A],I(j.value,{componentStack:j.stack,digest:j.digest});if(ld)throw ld=!1,s=b1,b1=null,s;return ud&1&&s.tag!==0&&al(),W=s.pendingLanes,W&1?s===_1?Xu++:(Xu=0,_1=s):Xu=0,Vi(),null}function al(){if(io!==null){var s=Af(ud),c=hr.transition,A=St;try{if(hr.transition=null,St=16>s?16:s,io===null)var I=!1;else{if(s=io,io=null,ud=0,mt&6)throw Error(o(331));var j=mt;for(mt|=4,Ge=s.current;Ge!==null;){var W=Ge,J=W.child;if(Ge.flags&16){var se=W.deletions;if(se!==null){for(var me=0;me<se.length;me++){var Re=se[me];for(Ge=Re;Ge!==null;){var Ve=Ge;switch(Ve.tag){case 0:case 11:case 15:qu(8,Ve,W)}var lt=Ve.child;if(lt!==null)lt.return=Ve,Ge=lt;else for(;Ge!==null;){Ve=Ge;var ze=Ve.sibling,Vt=Ve.return;if($b(Ve),Ve===Re){Ge=null;break}if(ze!==null){ze.return=Vt,Ge=ze;break}Ge=Vt}}}var jt=W.alternate;if(jt!==null){var wn=jt.child;if(wn!==null){jt.child=null;do{var Oa=wn.sibling;wn.sibling=null,wn=Oa}while(wn!==null)}}Ge=W}}if(W.subtreeFlags&2064&&J!==null)J.return=W,Ge=J;else e:for(;Ge!==null;){if(W=Ge,W.flags&2048)switch(W.tag){case 0:case 11:case 15:qu(9,W,W.return)}var ve=W.sibling;if(ve!==null){ve.return=W.return,Ge=ve;break e}Ge=W.return}}var ce=s.current;for(Ge=ce;Ge!==null;){J=Ge;var _e=J.child;if(J.subtreeFlags&2064&&_e!==null)_e.return=J,Ge=_e;else e:for(J=ce;Ge!==null;){if(se=Ge,se.flags&2048)try{switch(se.tag){case 0:case 11:case 15:Jf(9,se)}}catch(rt){Xt(se,se.return,rt)}if(se===J){Ge=null;break e}var Be=se.sibling;if(Be!==null){Be.return=se.return,Ge=Be;break e}Ge=se.return}}if(mt=j,Vi(),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Ne,s)}catch{}I=!0}return I}finally{St=A,hr.transition=c}}return!1}function l3(s,c,A){c=hs(A,c),c=xb(s,c,1),s=ro(s,c,1),c=Jr(),s!==null&&(Dn(s,1,c),_n(s,c))}function Xt(s,c,A){if(s.tag===3)l3(s,s,A);else for(;c!==null;){if(c.tag===3){l3(c,s,A);break}else if(c.tag===1){var I=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof I.componentDidCatch=="function"&&(no===null||!no.has(I))){s=hs(A,s),s=Pb(c,s,1),c=ro(c,s,1),s=Jr(),c!==null&&(Dn(c,1,s),_n(c,s));break}}c=c.return}}function hE(s,c,A){var I=s.pingCache;I!==null&&I.delete(c),c=Jr(),s.pingedLanes|=s.suspendedLanes&A,Ir===s&&(Gr&A)===A&&(Or===4||Or===3&&(Gr&130023424)===Gr&&500>dr()-m1?nl(s,0):v1|=A),_n(s,c)}function s3(s,c){c===0&&(s.mode&1?(c=Xo,Xo<<=1,!(Xo&130023424)&&(Xo=4194304)):c=1);var A=Jr();s=qi(s,c),s!==null&&(Dn(s,c,A),_n(s,A))}function pE(s){var c=s.memoizedState,A=0;c!==null&&(A=c.retryLane),s3(s,A)}function gE(s,c){var A=0;switch(s.tag){case 13:var I=s.stateNode,j=s.memoizedState;j!==null&&(A=j.retryLane);break;case 19:I=s.stateNode;break;default:throw Error(o(314))}I!==null&&I.delete(c),s3(s,A)}var u3;u3=function(s,c,A){if(s!==null)if(s.memoizedProps!==c.pendingProps||Ur.current)yn=!0;else{if(!(s.lanes&A)&&!(c.flags&128))return yn=!1,rE(s,c,A);yn=!!(s.flags&131072)}else yn=!1,Kt&&c.flags&1048576&&U2(c,Mf,c.index);switch(c.lanes=0,c.tag){case 2:var I=c.type;Kf(s,c),s=c.pendingProps;var j=bi(c,mr.current);cs(c,A),j=$0(null,c,I,s,j,A);var W=V0();return c.flags|=1,typeof j=="object"&&j!==null&&typeof j.render=="function"&&j.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Yt(I)?(W=!0,Jl(c)):W=!1,c.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,F0(c),j.updater=Wf,c.stateNode=j,j._reactInternals=c,Z0(c,I,s,A),c=t1(null,c,I,!0,W,A)):(c.tag=0,Kt&&W&&C0(c),cn(null,c,j,A),c=c.child),c;case 16:I=c.elementType;e:{switch(Kf(s,c),s=c.pendingProps,j=I._init,I=j(I._payload),c.type=I,j=c.tag=mE(I),s=Ei(I,s),j){case 0:c=e1(null,c,I,s,A);break e;case 1:c=Ib(null,c,I,s,A);break e;case 11:c=kb(null,c,I,s,A);break e;case 14:c=Rb(null,c,I,Ei(I.type,s),A);break e}throw Error(o(306,I,""))}return c;case 0:return I=c.type,j=c.pendingProps,j=c.elementType===I?j:Ei(I,j),e1(s,c,I,j,A);case 1:return I=c.type,j=c.pendingProps,j=c.elementType===I?j:Ei(I,j),Ib(s,c,I,j,A);case 3:e:{if(Db(c),s===null)throw Error(o(387));I=c.pendingProps,W=c.memoizedState,j=W.element,Z2(s,c),Bf(c,I,null,A);var J=c.memoizedState;if(I=J.element,ae&&W.isDehydrated)if(W={element:I,isDehydrated:!1,cache:J.cache,pendingSuspenseBoundaries:J.pendingSuspenseBoundaries,transitions:J.transitions},c.updateQueue.baseState=W,c.memoizedState=W,c.flags&256){j=hs(Error(o(423)),c),c=Fb(s,c,I,A,j);break e}else if(I!==j){j=hs(Error(o(424)),c),c=Fb(s,c,I,A,j);break e}else for(ae&&(ei=ht(c.stateNode.containerInfo),Fn=c,Kt=!0,Si=null,Iu=!1),A=Y2(c,null,I,A),c.child=A;A;)A.flags=A.flags&-3|4096,A=A.sibling;else{if(ls(),I===j){c=Sa(s,c,A);break e}cn(s,c,I,A)}c=c.child}return c;case 5:return eb(c),s===null&&k0(c),I=c.type,j=c.pendingProps,W=s!==null?s.memoizedProps:null,J=j.children,Y(I,j)?J=null:W!==null&&Y(I,W)&&(c.flags|=32),Nb(s,c),cn(s,c,J,A),c.child;case 6:return s===null&&k0(c),null;case 13:return jb(s,c,A);case 4:return j0(c,c.stateNode.containerInfo),I=c.pendingProps,s===null?c.child=ss(c,null,I,A):cn(s,c,I,A),c.child;case 11:return I=c.type,j=c.pendingProps,j=c.elementType===I?j:Ei(I,j),kb(s,c,I,j,A);case 7:return cn(s,c,c.pendingProps,A),c.child;case 8:return cn(s,c,c.pendingProps.children,A),c.child;case 12:return cn(s,c,c.pendingProps.children,A),c.child;case 10:e:{if(I=c.type._context,j=c.pendingProps,W=c.memoizedProps,J=j.value,K2(c,I,J),W!==null)if(lr(W.value,J)){if(W.children===j.children&&!Ur.current){c=Sa(s,c,A);break e}}else for(W=c.child,W!==null&&(W.return=c);W!==null;){var se=W.dependencies;if(se!==null){J=W.child;for(var me=se.firstContext;me!==null;){if(me.context===I){if(W.tag===1){me=wa(-1,A&-A),me.tag=2;var Re=W.updateQueue;if(Re!==null){Re=Re.shared;var Ve=Re.pending;Ve===null?me.next=me:(me.next=Ve.next,Ve.next=me),Re.pending=me}}W.lanes|=A,me=W.alternate,me!==null&&(me.lanes|=A),I0(W.return,A,c),se.lanes|=A;break}me=me.next}}else if(W.tag===10)J=W.type===c.type?null:W.child;else if(W.tag===18){if(J=W.return,J===null)throw Error(o(341));J.lanes|=A,se=J.alternate,se!==null&&(se.lanes|=A),I0(J,A,c),J=W.sibling}else J=W.child;if(J!==null)J.return=W;else for(J=W;J!==null;){if(J===c){J=null;break}if(W=J.sibling,W!==null){W.return=J.return,J=W;break}J=J.return}W=J}cn(s,c,j.children,A),c=c.child}return c;case 9:return j=c.type,I=c.pendingProps.children,cs(c,A),j=ti(j),I=I(j),c.flags|=1,cn(s,c,I,A),c.child;case 14:return I=c.type,j=Ei(I,c.pendingProps),j=Ei(I.type,j),Rb(s,c,I,j,A);case 15:return Lb(s,c,c.type,c.pendingProps,A);case 17:return I=c.type,j=c.pendingProps,j=c.elementType===I?j:Ei(I,j),Kf(s,c),c.tag=1,Yt(I)?(s=!0,Jl(c)):s=!1,cs(c,A),Eb(c,I,j),Z0(c,I,j,A),t1(null,c,I,!0,s,A);case 19:return Bb(s,c,A);case 22:return Mb(s,c,A)}throw Error(o(156,c.tag))};function c3(s,c){return eo(s,c)}function vE(s,c,A,I){this.tag=s,this.key=A,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=I,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(s,c,A,I){return new vE(s,c,A,I)}function x1(s){return s=s.prototype,!(!s||!s.isReactComponent)}function mE(s){if(typeof s=="function")return x1(s)?1:0;if(s!=null){if(s=s.$$typeof,s===m)return 11;if(s===g)return 14}return 2}function lo(s,c){var A=s.alternate;return A===null?(A=ai(s.tag,c,s.key,s.mode),A.elementType=s.elementType,A.type=s.type,A.stateNode=s.stateNode,A.alternate=s,s.alternate=A):(A.pendingProps=c,A.type=s.type,A.flags=0,A.subtreeFlags=0,A.deletions=null),A.flags=s.flags&14680064,A.childLanes=s.childLanes,A.lanes=s.lanes,A.child=s.child,A.memoizedProps=s.memoizedProps,A.memoizedState=s.memoizedState,A.updateQueue=s.updateQueue,c=s.dependencies,A.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},A.sibling=s.sibling,A.index=s.index,A.ref=s.ref,A}function hd(s,c,A,I,j,W){var J=2;if(I=s,typeof s=="function")x1(s)&&(J=1);else if(typeof s=="string")J=5;else e:switch(s){case v:return ol(A.children,j,W,c);case w:J=8,j|=8;break;case _:return s=ai(12,A,c,j|2),s.elementType=_,s.lanes=W,s;case y:return s=ai(13,A,c,j),s.elementType=y,s.lanes=W,s;case p:return s=ai(19,A,c,j),s.elementType=p,s.lanes=W,s;case b:return pd(A,j,W,c);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case h:J=10;break e;case E:J=9;break e;case m:J=11;break e;case g:J=14;break e;case d:J=16,I=null;break e}throw Error(o(130,s==null?s:typeof s,""))}return c=ai(J,A,c,j),c.elementType=s,c.type=I,c.lanes=W,c}function ol(s,c,A,I){return s=ai(7,s,I,c),s.lanes=A,s}function pd(s,c,A,I){return s=ai(22,s,I,c),s.elementType=b,s.lanes=A,s.stateNode={isHidden:!1},s}function P1(s,c,A){return s=ai(6,s,null,c),s.lanes=A,s}function C1(s,c,A){return c=ai(4,s.children!==null?s.children:[],s.key,c),c.lanes=A,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}function yE(s,c,A,I,j){this.tag=c,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=X,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mu(0),this.expirationTimes=Mu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mu(0),this.identifierPrefix=I,this.onRecoverableError=j,ae&&(this.mutableSourceEagerHydrationData=null)}function f3(s,c,A,I,j,W,J,se,me){return s=new yE(s,c,A,se,me),c===1?(c=1,W===!0&&(c|=8)):c=0,W=ai(3,null,null,c),s.current=W,W.stateNode=s,W.memoizedState={element:I,isDehydrated:A,cache:null,transitions:null,pendingSuspenseBoundaries:null},F0(W),s}function d3(s){if(!s)return yi;s=s._reactInternals;e:{if(x(s)!==s||s.tag!==1)throw Error(o(170));var c=s;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Yt(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(s.tag===1){var A=s.type;if(Yt(A))return Ql(s,A,c)}return c}function h3(s){var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=L(c),s===null?null:s.stateNode}function p3(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var A=s.retryLane;s.retryLane=A!==0&&A<c?A:c}}function gd(s,c){p3(s,c),(s=s.alternate)&&p3(s,c)}function bE(s){return s=L(s),s===null?null:s.stateNode}function _E(){return null}return r.attemptContinuousHydration=function(s){if(s.tag===13){var c=qi(s,134217728);if(c!==null){var A=Jr();ii(c,s,134217728,A)}gd(s,134217728)}},r.attemptDiscreteHydration=function(s){if(s.tag===13){var c=qi(s,1);if(c!==null){var A=Jr();ii(c,s,1,A)}gd(s,1)}},r.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var c=ao(s),A=qi(s,c);if(A!==null){var I=Jr();ii(A,s,c,I)}gd(s,c)}},r.attemptSynchronousHydration=function(s){switch(s.tag){case 3:var c=s.stateNode;if(c.current.memoizedState.isDehydrated){var A=ya(c.pendingLanes);A!==0&&(rs(c,A|1),_n(c,dr()),!(mt&6)&&(vs(),Vi()))}break;case 13:r3(function(){var I=qi(s,1);if(I!==null){var j=Jr();ii(I,s,1,j)}}),gd(s,1)}},r.batchedUpdates=function(s,c){var A=mt;mt|=1;try{return s(c)}finally{mt=A,mt===0&&(vs(),wi&&Vi())}},r.createComponentSelector=function(s){return{$$typeof:ed,value:s}},r.createContainer=function(s,c,A,I,j,W,J){return f3(s,c,!1,null,A,I,j,W,J)},r.createHasPseudoClassSelector=function(s){return{$$typeof:td,value:s}},r.createHydrationContainer=function(s,c,A,I,j,W,J,se,me){return s=f3(A,I,!0,s,j,W,J,se,me),s.context=d3(null),A=s.current,I=Jr(),j=ao(A),W=wa(I,j),W.callback=c??null,ro(A,W,j),s.current.lanes=j,Dn(s,j,I),_n(s,I),s},r.createPortal=function(s,c,A){var I=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:I==null?null:""+I,children:s,containerInfo:c,implementation:A}},r.createRoleSelector=function(s){return{$$typeof:rd,value:s}},r.createTestNameSelector=function(s){return{$$typeof:nd,value:s}},r.createTextSelector=function(s){return{$$typeof:id,value:s}},r.deferredUpdates=function(s){var c=St,A=hr.transition;try{return hr.transition=null,St=16,s()}finally{St=c,hr.transition=A}},r.discreteUpdates=function(s,c,A,I,j){var W=St,J=hr.transition;try{return hr.transition=null,St=1,s(c,A,I,j)}finally{St=W,hr.transition=J,mt===0&&vs()}},r.findAllNodes=p1,r.findBoundingRects=function(s,c){if(!ge)throw Error(o(363));c=p1(s,c),s=[];for(var A=0;A<c.length;A++)s.push(re(c[A]));for(c=s.length-1;0<c;c--){A=s[c];for(var I=A.x,j=I+A.width,W=A.y,J=W+A.height,se=c-1;0<=se;se--)if(c!==se){var me=s[se],Re=me.x,Ve=Re+me.width,lt=me.y,ze=lt+me.height;if(I>=Re&&W>=lt&&j<=Ve&&J<=ze){s.splice(c,1);break}else if(I!==Re||A.width!==me.width||ze<W||lt>J){if(!(W!==lt||A.height!==me.height||Ve<I||Re>j)){Re>I&&(me.width+=Re-I,me.x=I),Ve<j&&(me.width=j-Re),s.splice(c,1);break}}else{lt>W&&(me.height+=lt-W,me.y=W),ze<J&&(me.height=J-lt),s.splice(c,1);break}}}return s},r.findHostInstance=h3,r.findHostInstanceWithNoPortals=function(s){return s=T(s),s=s!==null?U(s):null,s===null?null:s.stateNode},r.findHostInstanceWithWarning=function(s){return h3(s)},r.flushControlled=function(s){var c=mt;mt|=1;var A=hr.transition,I=St;try{hr.transition=null,St=1,s()}finally{St=I,hr.transition=A,mt=c,mt===0&&(vs(),Vi())}},r.flushPassiveEffects=al,r.flushSync=r3,r.focusWithin=function(s,c){if(!ge)throw Error(o(363));for(s=f1(s),c=Jb(s,c),c=Array.from(c),s=0;s<c.length;){var A=c[s++];if(!be(A)){if(A.tag===5&&Ie(A.stateNode))return!0;for(A=A.child;A!==null;)c.push(A),A=A.sibling}}return!1},r.getCurrentUpdatePriority=function(){return St},r.getFindAllNodesFailureDescription=function(s,c){if(!ge)throw Error(o(363));var A=0,I=[];s=[f1(s),0];for(var j=0;j<s.length;){var W=s[j++],J=s[j++],se=c[J];if((W.tag!==5||!be(W))&&(d1(W,se)&&(I.push(h1(se)),J++,J>A&&(A=J)),J<c.length))for(W=W.child;W!==null;)s.push(W,J),W=W.sibling}if(A<c.length){for(s=[];A<c.length;A++)s.push(h1(c[A]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(I.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+s.join(" > ")}return null},r.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return Z(s.child.stateNode);default:return s.child.stateNode}},r.injectIntoDevTools=function(s){if(s={bundleType:s.bundleType,version:s.version,rendererPackageName:s.rendererPackageName,rendererConfig:s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:bE,findFiberByHostInstance:s.findFiberByHostInstance||_E,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)s=!0;else{try{Ne=c.inject(s),ft=c}catch{}s=!!c.checkDCE}}return s},r.isAlreadyRendering=function(){return!1},r.observeVisibleRects=function(s,c,A,I){if(!ge)throw Error(o(363));s=p1(s,c);var j=Ee(s,A,I).disconnect;return{disconnect:function(){j()}}},r.registerMutableSourceForHydration=function(s,c){var A=c._getVersion;A=A(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,A]:s.mutableSourceEagerHydrationData.push(c,A)},r.runWithPriority=function(s,c){var A=St;try{return St=s,c()}finally{St=A}},r.shouldError=function(){return null},r.shouldSuspend=function(){return!1},r.updateContainer=function(s,c,A,I){var j=c.current,W=Jr(),J=ao(j);return A=d3(A),c.context===null?c.context=A:c.pendingContext=A,c=wa(W,J),c.payload={element:s},I=I===void 0?null:I,I!==null&&(c.callback=I),s=ro(j,c,J),s!==null&&(ii(s,j,J,W),zf(s,j,J)),J},r};Q9.exports=mL;var yL=Q9.exports;const bL=Kh(yL);var J9={exports:{}},$l={};/**
|
|
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
|
-
*/$l.ConcurrentRoot=1;$l.ContinuousEventPriority=4;$l.DefaultEventPriority=16;$l.DiscreteEventPriority=1;$l.IdleEventPriority=536870912;$l.LegacyRoot=0;J9.exports=$l;var e7=J9.exports;const _4={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let w4=!1,S4=!1;const p2=".react-konva-event";let t7=!1;function _L(e){t7=e}const wL=`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
|
-
`,SL=`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
|
-
`,EL={};function p0(e,t,r=EL){if(!w4&&"zIndex"in t&&(console.warn(SL),w4=!0),!S4&&t.draggable){var n=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;n&&!i&&(console.warn(wL),S4=!0)}for(var a in r)if(!_4[a]){var o=a.slice(0,2)==="on",l=r[a]!==t[a];if(o&&l){var u=a.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),e.off(u,r[a])}var f=!t.hasOwnProperty(a);f&&e.setAttr(a,void 0)}var v=t7||t._useStrictMode,w={},_=!1;const h={};for(var a in t)if(!_4[a]){var o=a.slice(0,2)==="on",E=r[a]!==t[a];if(o&&E){var u=a.substr(2).toLowerCase();u.substr(0,7)==="content"&&(u="content"+u.substr(7,1).toUpperCase()+u.substr(8)),t[a]&&(h[u]=t[a])}!o&&(t[a]!==r[a]||v&&t[a]!==e.getAttr(a))&&(_=!0,w[a]=t[a])}_&&(e.setAttrs(w),Wo(e));for(var u in h)e.on(u+p2,h[u])}function Wo(e){if(!gt.Konva.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}const r7={},OL={};Xc.Node.prototype._applyProps=p0;function xL(e,t){if(typeof t=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`);return}e.add(t),Wo(e)}function PL(e,t,r){let n=Xc[e];n||(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`),n=Xc.Group);const i={},a={};for(var o in t){var l=o.slice(0,2)==="on";l?a[o]=t[o]:i[o]=t[o]}const u=new n(i);return p0(u,a),u}function CL(e,t,r){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function TL(e,t,r){return!1}function AL(e){return e}function kL(){return null}function RL(){return null}function LL(e,t,r,n){return OL}function ML(){}function NL(e){}function IL(e,t){return!1}function DL(){return r7}function FL(){return r7}const jL=setTimeout,zL=clearTimeout,BL=-1;function UL(e,t){return!1}const HL=!1,GL=!0,$L=!0;function VL(e,t){t.parent===e?t.moveToTop():e.add(t),Wo(e)}function qL(e,t){t.parent===e?t.moveToTop():e.add(t),Wo(e)}function n7(e,t,r){t._remove(),e.add(t),t.setZIndex(r.getZIndex()),Wo(e)}function WL(e,t,r){n7(e,t,r)}function YL(e,t){t.destroy(),t.off(p2),Wo(e)}function KL(e,t){t.destroy(),t.off(p2),Wo(e)}function XL(e,t,r){console.error(`Text components are not yet supported in ReactKonva. You text is: "${r}"`)}function ZL(e,t,r){}function QL(e,t,r,n,i){p0(e,i,n)}function JL(e){e.hide(),Wo(e)}function eM(e){}function tM(e,t){(t.visible==null||t.visible)&&e.show()}function rM(e,t){}function nM(e){}function iM(){}const aM=()=>e7.DefaultEventPriority,oM=Object.freeze(Object.defineProperty({__proto__:null,appendChild:VL,appendChildToContainer:qL,appendInitialChild:xL,cancelTimeout:zL,clearContainer:nM,commitMount:ZL,commitTextUpdate:XL,commitUpdate:QL,createInstance:PL,createTextInstance:CL,detachDeletedInstance:iM,finalizeInitialChildren:TL,getChildHostContext:FL,getCurrentEventPriority:aM,getPublicInstance:AL,getRootHostContext:DL,hideInstance:JL,hideTextInstance:eM,idlePriority:pc.unstable_IdlePriority,insertBefore:n7,insertInContainerBefore:WL,isPrimaryRenderer:HL,noTimeout:BL,now:pc.unstable_now,prepareForCommit:kL,preparePortalMount:RL,prepareUpdate:LL,removeChild:YL,removeChildFromContainer:KL,resetAfterCommit:ML,resetTextContent:NL,run:pc.unstable_runWithPriority,scheduleTimeout:jL,shouldDeprioritizeSubtree:IL,shouldSetTextContent:UL,supportsMutation:$L,unhideInstance:tM,unhideTextInstance:rM,warnsIfNotActing:GL},Symbol.toStringTag,{value:"Module"}));var lM=Object.defineProperty,sM=Object.defineProperties,uM=Object.getOwnPropertyDescriptors,E4=Object.getOwnPropertySymbols,cM=Object.prototype.hasOwnProperty,fM=Object.prototype.propertyIsEnumerable,O4=(e,t,r)=>t in e?lM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x4=(e,t)=>{for(var r in t||(t={}))cM.call(t,r)&&O4(e,r,t[r]);if(E4)for(var r of E4(t))fM.call(t,r)&&O4(e,r,t[r]);return e},dM=(e,t)=>sM(e,uM(t)),P4,C4;typeof window<"u"&&((P4=window.document)!=null&&P4.createElement||((C4=window.navigator)==null?void 0:C4.product)==="ReactNative")?at.useLayoutEffect:at.useEffect;function i7(e,t,r){if(!e)return;if(r(e)===!0)return e;let n=e.child;for(;n;){const i=i7(n,t,r);if(i)return i;n=n.sibling}}function a7(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const T4=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=T4;return}return T4.apply(this,arguments)};const g2=a7(at.createContext(null));class o7 extends at.Component{render(){return at.createElement(g2.Provider,{value:this._reactInternals},this.props.children)}}function hM(){const e=at.useContext(g2);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=at.useId();return at.useMemo(()=>{for(const n of[e,e==null?void 0:e.alternate]){if(!n)continue;const i=i7(n,!1,a=>{let o=a.memoizedState;for(;o;){if(o.memoizedState===t)return!0;o=o.next}});if(i)return i}},[e,t])}function pM(){const e=hM(),[t]=at.useState(()=>new Map);t.clear();let r=e;for(;r;){if(r.type&&typeof r.type=="object"){const i=r.type._context===void 0&&r.type.Provider===r.type?r.type:r.type._context;i&&i!==g2&&!t.has(i)&&t.set(i,at.useContext(a7(i)))}r=r.return}return t}function l7(){const e=pM();return at.useMemo(()=>Array.from(e.keys()).reduce((t,r)=>n=>at.createElement(t,null,at.createElement(r.Provider,dM(x4({},n),{value:e.get(r)}))),t=>at.createElement(o7,x4({},t))),[e])}function gM(e){const t=bt.useRef({});return bt.useLayoutEffect(()=>{t.current=e}),bt.useLayoutEffect(()=>()=>{t.current={}},[]),t.current}const vM=e=>{const t=bt.useRef(),r=bt.useRef(),n=bt.useRef(),i=gM(e),a=l7(),o=l=>{const{forwardedRef:u}=e;u&&(typeof u=="function"?u(l):u.current=l)};return bt.useLayoutEffect(()=>(r.current=new Xc.Stage({width:e.width,height:e.height,container:t.current}),o(r.current),n.current=Fs.createContainer(r.current,e7.LegacyRoot,!1,null),Fs.updateContainer(bt.createElement(a,{},e.children),n.current),()=>{Xc.isBrowser&&(o(null),Fs.updateContainer(null,n.current,null),r.current.destroy())}),[]),bt.useLayoutEffect(()=>{o(r.current),p0(r.current,e,i),Fs.updateContainer(bt.createElement(a,{},e.children),n.current,null)}),bt.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},mM="Layer",yM="FastLayer",Vh="Group",bM="Label",_M="Rect",wM="Circle",SM="Ellipse",EM="Wedge",OM="Line",xM="Sprite",PM="Image",CM="Text",TM="TextPath",AM="Star",kM="Ring",RM="Arc",LM="Tag",MM="Path",NM="RegularPolygon",IM="Arrow",DM="Shape",FM="Transformer",Fs=bL(oM);Fs.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:bt.version,rendererPackageName:"react-konva"});const jM=bt.forwardRef((e,t)=>bt.createElement(o7,{},bt.createElement(vM,{...e,forwardedRef:t}))),zM=_L,BM=Object.freeze(Object.defineProperty({__proto__:null,Arc:RM,Arrow:IM,Circle:wM,Ellipse:SM,FastLayer:yM,Group:Vh,Image:PM,KonvaRenderer:Fs,Label:bM,Layer:mM,Line:OM,Path:MM,Rect:_M,RegularPolygon:NM,Ring:kM,Shape:DM,Sprite:xM,Stage:jM,Star:AM,Tag:LM,Text:CM,TextPath:TM,Transformer:FM,Wedge:EM,useStrictMode:zM},Symbol.toStringTag,{value:"Module"})),Wa=Do(BM);var sl=at,g0=function(t,r,n){const i=sl.useRef("loading"),a=sl.useRef(),[o,l]=sl.useState(0),u=sl.useRef(),f=sl.useRef(),v=sl.useRef();return(u.current!==t||f.current!==r||v.current!==n)&&(i.current="loading",a.current=void 0,u.current=t,f.current=r,v.current=n),sl.useLayoutEffect(function(){if(!t)return;var w=document.createElement("img");function _(){i.current="loaded",a.current=w,l(Math.random())}function h(){i.current="failed",a.current=void 0,l(Math.random())}return w.addEventListener("load",_),w.addEventListener("error",h),r&&(w.crossOrigin=r),n&&(w.referrerPolicy=n),w.src=t,function(){w.removeEventListener("load",_),w.removeEventListener("error",h)}},[t,r,n]),[a.current,i.current]};const UM=Kh(g0);var s7={},v2={},HM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const GM=e=>{const t=window.getComputedStyle(e).position;return!(t==="absolute"||t==="relative")};function u7(e=()=>{}){const t=bt.useRef(e);return t.current=e,bt.useCallback((...r)=>t.current.apply(null,r),[])}const $M=({children:e,groupProps:t,divProps:r,transform:n,transformFunc:i})=>{const a=l7(),o=bt.useRef(null);bt.useRef();const[l]=bt.useState(()=>document.createElement("div")),u=bt.useMemo(()=>oh.createRoot(l),[l]),f=n??!0,v=u7(()=>{if(f&&o.current){let m=o.current.getAbsoluteTransform().decompose();i&&(m=i(m)),l.style.position="absolute",l.style.zIndex="10",l.style.top="0px",l.style.left="0px",l.style.transform=`translate(${m.x}px, ${m.y}px) rotate(${m.rotation}deg) scaleX(${m.scaleX}) scaleY(${m.scaleY})`,l.style.transformOrigin="top left"}else l.style.position="",l.style.zIndex="",l.style.top="",l.style.left="",l.style.transform="",l.style.transformOrigin="";const w=r||{},{style:_}=w,h=HM(w,["style"]);Object.assign(l.style,_),Object.assign(l,h)});return bt.useLayoutEffect(()=>{var w;const _=o.current;if(!_)return;const h=(w=_.getStage())===null||w===void 0?void 0:w.container();if(h)return h.appendChild(l),f&&GM(h)&&(h.style.position="relative"),_.on("absoluteTransformChange",v),v(),()=>{var E;_.off("absoluteTransformChange",v),(E=l.parentNode)===null||E===void 0||E.removeChild(l)}},[f]),bt.useLayoutEffect(()=>{v()},[r,i]),bt.useLayoutEffect(()=>{u.render(bt.createElement(a,null,e))}),bt.useLayoutEffect(()=>()=>{setTimeout(()=>{u.unmount()})},[]),bt.createElement(Vh,Object.assign({ref:o},t))},VM=({selector:e,enabled:t,children:r})=>{const n=bt.useRef(null),i=bt.useRef(null),a=bt.useRef(),o=t??!0;return bt.useLayoutEffect(()=>{if(!n.current||!i.current)return;a.current=i.current;const u=n.current.getStage().findOne(e);o&&u?i.current.moveTo(u):i.current.moveTo(n.current);const f=n.current.getLayer();if(f&&(f.batchDraw(),u)){const v=u.getLayer();if(!v)return;v.batchDraw()}},[e,o]),bt.useEffect(()=>()=>{var l;(l=a.current)===null||l===void 0||l.destroy()},[]),bt.createElement(Vh,{name:"_outer_portal",ref:n},bt.createElement(Vh,{name:"_inner_portal",ref:i},r))},qM=Object.freeze(Object.defineProperty({__proto__:null,Html:$M,Portal:VM,useEvent:u7,useImage:UM},Symbol.toStringTag,{value:"Module"})),Ef=Do(qM);function WM(e,t){return Object.keys(e.values).forEach(r=>e.values[r]=e.values[r]&&parseFloat(e.values[r].toFixed(t))),e}function c7(e,t,r){const n=t-1,i=r[d7(n,r.length)];return i.marker!=="Z"?i:c7(e,n,r)}function f7(e,t,r){const n=t+1,i=r[d7(n,r.length)];return i.marker==="Z"?f7(e,n,r):i}function YM(e,t,r){let n=r[t-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+=n.values.x,e.values.y+=n.values.y;break;case"L":case"A":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"H":e.marker="L",e.values.x+=n.values.x,e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x,e.values.y+=n.values.y;break;case"C":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"S":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"Q":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y;break;case"T":e.values.x+=n.values.x,e.values.y+=n.values.y;break}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x;break}if(e.marker==="Z"){let a=function(l,u){return l[u].marker==="M"?l[u]:a(l,u-1)};var i=a;let o=a(r,t);e.values.x=o.values.x,e.values.y=o.values.y}return e}function KM(e,t){const r=[];switch(e.toUpperCase()){case"M":for(let n=0;n<t.length;n+=2){let i;e===e.toUpperCase()?i=n===0?"M":"L":i=n===0?"m":"l",r.push({marker:i,values:{x:t[n],y:t[n+1]}})}break;case"L":for(let n=0;n<t.length;n+=2)r.push({marker:e,values:{x:t[n],y:t[n+1]}});break;case"H":for(let n=0;n<t.length;n++)r.push({marker:e,values:{x:t[n],y:0}});break;case"V":for(let n=0;n<t.length;n++)r.push({marker:e,values:{x:0,y:t[n]}});break;case"C":for(let n=0;n<t.length;n+=6)r.push({marker:e,values:{x1:t[n],y1:t[n+1],x2:t[n+2],y2:t[n+3],x:t[n+4],y:t[n+5]}});break;case"S":for(let n=0;n<t.length;n+=4)r.push({marker:e,values:{x2:t[n],y2:t[n+1],x:t[n+2],y:t[n+3]}});break;case"Q":for(let n=0;n<t.length;n+=4)r.push({marker:e,values:{x1:t[n],y1:t[n+1],x:t[n+2],y:t[n+3]}});break;case"T":for(let n=0;n<t.length;n+=2)r.push({marker:e,values:{x:t[n],y:t[n+1]}});break;case"A":for(let n=0;n<t.length;n+=7)r.push({marker:e,values:{radiusX:t[n],radiusY:t[n+1],rotation:t[n+2],largeArc:t[n+3],sweep:t[n+4],x:t[n+5],y:t[n+6]}});break;case"Z":r.push({marker:e,values:{x:0,y:0}});break}return r}function d7(e,t){return(e%t+t)%t}function XM(e,t,r){if(t!==0&&e.marker==="L"){let n=r[t-1];["x","y"].every(a=>Math.round(Math.abs(n.values[a]-e.values[a]))===0)&&(e.overlap=!0)}return e}function Nm(e,t){const r=["x","y"].every(n=>Math.round(Math.abs(e[t].values[n]-e[0].values[n]))===0);e[t].marker==="L"&&r&&(e[t].overlap=!0,Nm(e,t-1)),e[t].marker==="Z"&&Nm(e,t-1)}function ZM(e,t,r){const n=k4(e.values,r.values),i=k4(t.values,e.values);return Math.min(i,n)}function A4(e,t){return Math.atan2(t.x-e.x,t.y-e.y)}function k4(e,t){const r=e.x-t.x,n=e.y-t.y;return Math.sqrt(Math.pow(r,2)+Math.pow(n,2))}function R4(e,t){return Math.sin(e)*t}function L4(e,t){return Math.cos(e)*t}function M4(e,t){const r=t/Math.tan(e);return r===1/0||r===-1/0||isNaN(r)?t:r}function QM(e,t){return t*Math.tan(e)}function JM(e,t){let r,n=0,i=e*(180/Math.PI);return i<0&&i>=-180||i>180&&i<360?r=M4(e/2,-t):(r=M4(e/2,t),n=1,r===1/0&&(r=t)),{offset:r,sweepFlag:n}}function eN(e){const t=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(r=>{let n="";if(r.marker!=="Z"){const i=Object.keys(r.values);n=t.filter(a=>i.indexOf(a)!==-1).map(a=>r.values[a]).join()}return`${r.marker}${n}`}).join("").trim()}function h7(e){const t=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,r=/-?[0-9]*\.?\d+/g;return[...e.matchAll(t)].map(n=>({marker:n[0],index:n.index})).reduceRight((n,i)=>{const a=e.substring(i.index,n.length?n[n.length-1].index:e.length);return n.concat([{marker:i.marker,index:i.index,chunk:a.length>0?a.substr(1,a.length-1):a}])},[]).reverse().flatMap(n=>{const i=n.chunk.match(r),a=i?i.map(parseFloat):[];return KM(n.marker,a)}).map(YM)}function p7(e,t,r){let n=[],i=[];return r&&e.forEach(a=>WM(a,r)),e.forEach(a=>{a.marker==="M"&&n.push([]),n[n.length-1].push(a)}),n.forEach(a=>{a.map(XM),Nm(a,a.length-1);const o=a[a.length-1].marker=="Z";a.filter(l=>!l.overlap).map((l,u,f)=>{const w=c7(l,u,f),_=f7(l,u,f),h=A4(l.values,w.values),E=A4(l.values,_.values),m=E-h,y=m*(180/Math.PI),p=ZM(l,w,_),g=Math.abs(QM(m/2,p/2)),d=Math.min(t,g),b=JM(m,d),O=b.offset,k=b.sweepFlag,C=(u==0||u==f.length-1)&&!o;switch(l.marker){case"M":case"L":const S=[l.values.x+R4(h,O),l.values.y+L4(h,O)],x=[l.values.x+R4(E,O),l.values.y+L4(E,O)];C?i.push({marker:l.marker,values:l.values}):i.push({marker:l.marker,values:{x:parseFloat(S[0].toFixed(3)),y:parseFloat(S[1].toFixed(3))}}),!C&&(_.marker==="L"||_.marker==="M")&&i.push({marker:"A",radius:d,values:{radiusX:parseFloat(d.toFixed(3)),radiusY:parseFloat(d.toFixed(3)),rotation:y,largeArc:0,sweep:k,x:parseFloat(x[0].toFixed(3)),y:parseFloat(x[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":i.push({marker:l.marker,values:l.values});break}})}),{path:eN(i),commands:i}}function tN(e,t,r){return p7([...h7(e)],t,r)}const rN=Object.freeze(Object.defineProperty({__proto__:null,parsePath:h7,roundCommands:p7,roundCorners:tN},Symbol.toStringTag,{value:"Module"})),nN=Do(rN);var Of={},m2={},y2={},Vl=Vl||{};Vl.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),i=e.visit(t.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.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 e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,i=e.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(i,a){r+=e.visit(i),a<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Vl=Vl||{};Vl.parse=function(){var e={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(B){var N=new Error(t+": "+B);throw N.source=t,N}function n(){var B=i();return t.length>0&&r("Invalid input not EOF"),B}function i(){return d(a)}function a(){return o("linear-gradient",e.linearGradient,u)||o("repeating-linear-gradient",e.repeatingLinearGradient,u)||o("radial-gradient",e.radialGradient,w)||o("repeating-radial-gradient",e.repeatingRadialGradient,w)}function o(B,N,H){return l(N,function(R){var D=H();return D&&($(e.comma)||r("Missing comma before color stops")),{type:B,orientation:D,colorStops:d(b)}})}function l(B,N){var H=$(B);if(H){$(e.startCall)||r("Missing (");var R=N(H);return $(e.endCall)||r("Missing )"),R}}function u(){return f()||v()}function f(){return U("directional",e.sideOrCorner,1)}function v(){return U("angular",e.angleValue,1)}function w(){var B,N=_(),H;return N&&(B=[],B.push(N),H=t,$(e.comma)&&(N=_(),N?B.push(N):t=H)),B}function _(){var B=h()||E();if(B)B.at=y();else{var N=m();if(N){B=N;var H=y();H&&(B.at=H)}else{var R=p();R&&(B={type:"default-radial",at:R})}}return B}function h(){var B=U("shape",/^(circle)/i,0);return B&&(B.style=M()||m()),B}function E(){var B=U("shape",/^(ellipse)/i,0);return B&&(B.style=T()||m()),B}function m(){return U("extent-keyword",e.extentKeywords,1)}function y(){if(U("position",/^at/,0)){var B=p();return B||r("Missing positioning value"),B}}function p(){var B=g();if(B.x||B.y)return{type:"position",value:B}}function g(){return{x:T(),y:T()}}function d(B){var N=B(),H=[];if(N)for(H.push(N);$(e.comma);)N=B(),N?H.push(N):r("One extra comma");return H}function b(){var B=O();return B||r("Expected color definition"),B.length=T(),B}function O(){return C()||x()||S()||k()}function k(){return U("literal",e.literalColor,0)}function C(){return U("hex",e.hexColor,1)}function S(){return l(e.rgbColor,function(){return{type:"rgb",value:d(P)}})}function x(){return l(e.rgbaColor,function(){return{type:"rgba",value:d(P)}})}function P(){return $(e.number)[1]}function T(){return U("%",e.percentageValue,1)||L()||M()}function L(){return U("position-keyword",e.positionKeywords,1)}function M(){return U("px",e.pixelValue,1)||U("em",e.emValue,1)}function U(B,N,H){var R=$(N);if(R)return{type:B,value:R[H]}}function $(B){var N,H;return H=/^[\n\r\t\s]+/.exec(t),H&&Z(H[0].length),N=B.exec(t),N&&Z(N[0].length),N}function Z(B){t=t.substr(B)}return function(B){return t=B.toString(),n()}}();y2.parse=Vl.parse;y2.stringify=Vl.stringify;(function(e){var t=we&&we.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const r=t(y2),n=o=>o.indexOf("linear-gradient")>=0;e.isGradient=n;const i=o=>o.type==="hex"?"#"+o.value:o.type==="literal"?o.value:`${o.type}(${o.value.join(",")})`,a=o=>{if(!(0,e.isGradient)(o))return{rotation:0,stops:[{offset:0,color:o},{offset:1,color:o}]};const l=r.default.parse(o)[0];return{rotation:parseFloat(l.orientation.value),stops:l.colorStops.map((u,f)=>({color:i(u),offset:u.length?parseFloat(u.length.value)/100:f/(l.colorStops.length-1)}))}};e.parseColor=a})(m2);(function(e){var t=we&&we.__createBinding||(Object.create?function(f,v,w,_){_===void 0&&(_=w);var h=Object.getOwnPropertyDescriptor(v,w);h&&!("get"in h?!v.__esModule:h.writable||h.configurable)||(h={enumerable:!0,get:function(){return v[w]}}),Object.defineProperty(f,_,h)}:function(f,v,w,_){_===void 0&&(_=w),f[_]=v[w]}),r=we&&we.__setModuleDefault||(Object.create?function(f,v){Object.defineProperty(f,"default",{enumerable:!0,value:v})}:function(f,v){f.default=v}),n=we&&we.__importStar||function(f){if(f&&f.__esModule)return f;var v={};if(f!=null)for(var w in f)w!=="default"&&Object.prototype.hasOwnProperty.call(f,w)&&t(v,f,w);return r(v,f),v},i=we&&we.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const a=i(at),o=n(m2),l=i(Gi),u=(f,v=f.fill,w="fill")=>a.default.useMemo(()=>{if(!o.isGradient(v))return{[w]:v};const{stops:_,rotation:h}=o.parseColor(v),E={x:f.a.width/2,y:f.a.height/2},m=Math.sqrt(Math.pow(E.x,2)+Math.pow(E.y,2)),y=l.default.Util.degToRad(h)-Math.PI/2,p=[];return _.forEach(({offset:g,color:d})=>{p.push(g,d)}),w==="fill"?{fillLinearGradientStartPointX:E.x-m*Math.cos(y),fillLinearGradientStartPointY:E.y-m*Math.sin(y),fillLinearGradientColorStops:p,fillLinearGradientEndPointX:E.x+m*Math.cos(y),fillLinearGradientEndPointY:E.y+m*Math.sin(y),fill:_[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:E.x-m*Math.cos(y),strokeLinearGradientStartPointY:E.y-m*Math.sin(y),strokeLinearGradientColorStops:p,strokeLinearGradientEndPointX:E.x+m*Math.cos(y),strokeLinearGradientEndPointY:E.y+m*Math.sin(y)}},[v,f.width,f.height]);e.useColor=u})(Of);var ua={},ql={};(function(e){var t=we&&we.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.useFadeIn=e.isAnimationUsed=e.toggleFadeInAnimation=void 0;const r=t(at),n=t(Gi);let i=!1;const a=(u=!i)=>{i=u};e.toggleFadeInAnimation=a;const o=()=>i;function l(u,f){const v=r.default.useRef();r.default.useLayoutEffect(()=>{v.current&&v.current.destroy()},[f]),r.default.useLayoutEffect(()=>{if(!i)return;const w=u.current.opacity();return w?(u.current.opacity(0),v.current=new n.default.Tween({node:u.current,opacity:w,onFinish:()=>{var _;(_=v.current)===null||_===void 0||_.destroy()}}),v.current.play(),()=>{var _;(_=v.current)===null||_===void 0||_.destroy()}):void 0},[])}e.isAnimationUsed=o,e.useFadeIn=l})(ql);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.triggerLoadError=e.onLoadError=e.whenLoaded=e.decrementLoader=e.incrementLoader=e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0;const t=ql;let r=0,n=[],i=3e4;const a=p=>{i=p};e.setAssetLoadTimeout=a;const o=()=>i;e.getAssetLoadTimeout=o;let l=6e3;const u=p=>{l=p};e.setFontLoadTimeout=u;const f=()=>l;function v(p){r+=1;let g=!1;const d=setTimeout(()=>{g||(y(`Timeout loading asset ${p}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",p),g=!0,w())},i);return()=>{g||(clearTimeout(d),w())}}function w(){r-=1,r===0&&(n.forEach(p=>p()),n=[])}function _(p){r===0?p():n.push(p)}function h(){return new Promise(p=>_(()=>{(0,t.isAnimationUsed)()?setTimeout(p,300):p(!0)}))}e.getFontLoadTimeout=f,e.incrementLoader=v,e.decrementLoader=w,e.whenLoaded=h;let E=[];function m(p){E.push(p)}function y(p){E.forEach(g=>g(p))}e.onLoadError=m,e.triggerLoadError=y})(ua);var xu={};(function(e){var t=we&&we.__createBinding||(Object.create?function(M,U,$,Z){Z===void 0&&(Z=$);var B=Object.getOwnPropertyDescriptor(U,$);B&&!("get"in B?!U.__esModule:B.writable||B.configurable)||(B={enumerable:!0,get:function(){return U[$]}}),Object.defineProperty(M,Z,B)}:function(M,U,$,Z){Z===void 0&&(Z=$),M[Z]=U[$]}),r=we&&we.__setModuleDefault||(Object.create?function(M,U){Object.defineProperty(M,"default",{enumerable:!0,value:U})}:function(M,U){M.default=U}),n=we&&we.__importStar||function(M){if(M&&M.__esModule)return M;var U={};if(M!=null)for(var $ in M)$!=="default"&&Object.prototype.hasOwnProperty.call(M,$)&&t(U,M,$);return r(U,M),U};Object.defineProperty(e,"__esModule",{value:!0}),e.injectCustomFont=e.injectGoogleFont=e.getGoogleFontsVariants=e.setGoogleFontsVariants=e.loadFont=e.isFontLoaded=e.replaceGlobalFonts=e.removeGlobalFont=e.addGlobalFont=e.globalFonts=e.getFontsList=e.setGoogleFonts=e.isGoogleFontChanged=void 0;const i=n(ha),a=ua;let o=i.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),l=i.observable({value:!1});function u(){return l.value}function f(M){M!=="default"?(l.value=!0,o.splice(0,o.length),o.push(...M)):l.value=!1}function v(){return o}function w(M){e.globalFonts.push(M)}function _(M){const U=e.globalFonts.findIndex($=>$.fontFamily===M);U!==-1&&e.globalFonts.splice(U,1)}function h(M){e.globalFonts.replace(M)}e.isGoogleFontChanged=u,e.setGoogleFonts=f,e.getFontsList=v,e.globalFonts=i.observable([]),e.addGlobalFont=w,e.removeGlobalFont=_,e.replaceGlobalFonts=h;var E="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",m=document.createElement("canvas");function y(){return g("Arial")}function p(){return g("Times","Times")}function g(M,U="Arial"){var $=m.getContext("2d");return $.font=`normal 40px '${M}', ${U}`,$.measureText(E).width}const d={Arial:!0},b=M=>!!d[M];async function O(M){var U;if(d[M])return;const $=!!(!((U=document.fonts)===null||U===void 0)&&U.load),Z=y();if($)try{await document.fonts.load(`16px '${M}'`);const R=g(M);if(Z!==R)return void(d[M]=!0)}catch{}const B=p(),N=g(M),H=Math.min(6e3,(0,a.getFontLoadTimeout)())/60;for(let R=0;R<H;R++){const D=g(M,"Arial"),z=g(M,"Times");if(D!==N||D!==Z||z!==B)return void(d[M]=!0);await new Promise(F=>setTimeout(F,60))}console.warn(`Timeout for loading font "${M}". Looks like polotno can't load it. Is it a correct font family?`),(0,a.triggerLoadError)(`Timeout for loading font "${M}"`)}e.isFontLoaded=b,e.loadFont=O;const k={};let C="400,400italic,700,700italic";function S(M){C=M}function x(){return C}function P(M){if(k[M])return;const U=`https://fonts.googleapis.com/css?family=${M.replace(/ /g,"+")}:${C}`,$=document.createElement("link");$.type="text/css",$.href=U,$.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild($),k[M]=!0}e.setGoogleFontsVariants=S,e.getGoogleFontsVariants=x,e.injectGoogleFont=P;const T={};function L(M){const U=M.fontFamily;if(T[U]||!M.url&&!M.styles)return;const $=document.createElement("style");$.type="text/css";const Z=M.styles||(M.url?[{src:`url("${M.url}")`}]:[]);let B="";Z.forEach(N=>{B+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${U}';
|
|
79
|
-
src: ${N.src};
|
|
80
|
-
font-style: ${N.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${N.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),$.innerHTML=B,document.getElementsByTagName("head")[0].appendChild($),T[M.fontFamily]=!0}e.injectCustomFont=L})(xu);var hi={};(function(e){var t=we&&we.__createBinding||(Object.create?function(a,o,l,u){u===void 0&&(u=l);var f=Object.getOwnPropertyDescriptor(o,l);f&&!("get"in f?!o.__esModule:f.writable||f.configurable)||(f={enumerable:!0,get:function(){return o[l]}}),Object.defineProperty(a,u,f)}:function(a,o,l,u){u===void 0&&(u=l),a[u]=o[l]}),r=we&&we.__setModuleDefault||(Object.create?function(a,o){Object.defineProperty(a,"default",{enumerable:!0,value:o})}:function(a,o){a.default=o}),n=we&&we.__importStar||function(a){if(a&&a.__esModule)return a;var o={};if(a!=null)for(var l in a)l!=="default"&&Object.prototype.hasOwnProperty.call(a,l)&&t(o,a,l);return r(o,a),o};Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const i=n(ha);e.flags=i.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",animationsEnabled:!1}),e.setTextVerticalResizeEnabled=i.action(a=>{e.flags.textVerticalResizeEnabled=a}),e.useRemoveBackground=i.action(a=>{e.flags.removeBackgroundEnabled=a}),e.useHtmlTextRender=i.action(a=>{e.flags.htmlRenderEnabled=a}),e.setDownScalingEnabled=i.action(a=>{e.flags.imageDownScalingEnabled=a}),e.useDownScaling=i.action(a=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),(0,e.setDownScalingEnabled)(a)}),e.setForceTextFit=i.action(a=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),e.flags.textOverflow="change-font-size"}),e.setTextOverflow=i.action(a=>{e.flags.textOverflow=a}),e.setAnimationsEnabled=i.action(a=>{e.flags.animationsEnabled=a})})(hi);var b2={};(function(e){function t(r=""){return(r=r.replace(/<\/p>/gi,`
|
|
84
|
-
`)).replace(/(<([^>]+)>)/gi,"")}Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=void 0,e.removeTags=t})(b2);var xf={};(function(e){var t=we&&we.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=void 0;const r=t(Gi);function n(i,a){var o;const l={filters:[]};a.brightnessEnabled&&(l.filters.push(r.default.Filters.Brighten),l.brightness=a.brightness),a.blurEnabled&&(l.filters.push(r.default.Filters.Blur),l.blurRadius=a.blurRadius),a.sepiaEnabled&&l.filters.push(r.default.Filters.Sepia),a.grayscaleEnabled&&l.filters.push(r.default.Filters.Grayscale),i.setAttrs(l),l.filters.length?i.cache({pixelRatio:a.store._elementsPixelRatio}):i.clearCache(),(o=i.getLayer())===null||o===void 0||o.batchDraw()}e.applyFilter=n})(xf);var Wl={};(function(e){var t=we&&we.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const r=t(at),n=Ui,i=Wa,a={stroke:"rgb(0, 161, 255)",strokeWidth:2},o=l=>{Object.assign(a,l)};e.setHighlighterStyle=o,e.Highlighter=(0,n.observer)(({element:l})=>r.default.createElement(i.Rect,Object.assign({name:"highlighter",x:l.a.x,y:l.a.y,rotation:l.a.rotation,width:l.a.width,height:l.a.height,listening:!1,strokeScaleEnabled:!1},a)))})(Wl);var Yo={};(function(e){var t=we&&we.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const r=t(at);e.MOBILE_BREAKPOINT=800;const n=()=>window.innerWidth<=e.MOBILE_BREAKPOINT;e.isMobile=n;const i=o=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${o}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${o}
|
|
91
|
-
}
|
|
92
|
-
`;e.mobileStyle=i;const a=()=>{const[o,l]=r.default.useState((0,e.isMobile)());return r.default.useEffect(()=>{const u=()=>{l((0,e.isMobile)())};return window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u)}},[]),o};e.useMobile=a})(Yo);var N4={},g7="warn";function v7(e){g7=e}function m7(){return g7}function iN(e){v7(e)}var Pr;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(Pr||(Pr={}));var Im=function(e,t){return Im=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Im(e,t)};function Gt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Im(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Tr=function(){return Tr=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Tr.apply(this,arguments)};function aN(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function y7(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(f){return function(v){return u([f,v])}}function u(f){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,f[0]&&(r=0)),r;)try{if(n=1,i&&(a=f[0]&2?i.return:f[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,f[1])).done)return a;switch(i=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,i=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=t.call(e,r)}catch(v){f=[6,v],i=0}finally{n=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}}function Pc(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function fa(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function da(e,t,r){if(arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function Pf(e){return qe(e).type}function oN(e,t){return qe(e).getChildType(t)}function b7(e,t){return qe(e).onPatch(t)}function lN(e,t){return qe(e).onSnapshot(t)}function su(e,t){qe(e).applyPatches(C2(t))}function sN(e,t){var r={patches:[],inversePatches:[]},n={},i,a={get recording(){return!!i},get patches(){return n.patches||(n.patches=r.patches.slice()),n.patches},get reversedInversePatches(){return n.reversedInversePatches||(n.reversedInversePatches=r.inversePatches.slice().reverse()),n.reversedInversePatches},get inversePatches(){return n.inversePatches||(n.inversePatches=r.inversePatches.slice()),n.inversePatches},stop:function(){i&&(i(),i=void 0)},resume:function(){i||(i=b7(e,function(o,l){t&&!t(o,l,E2())||(r.patches.push(o),r.inversePatches.push(l),n.patches=void 0,n.inversePatches=void 0,n.reversedInversePatches=void 0)}))},replay:function(o){su(o||e,r.patches)},undo:function(o){su(o||e,r.inversePatches.slice().reverse())}};return a.resume(),a}function uN(e){var t=qe(e);if(!t.isRoot)throw new Ue("`protect` can only be invoked on root nodes");t.isProtectionEnabled=!0}function cN(e){var t=qe(e);if(!t.isRoot)throw new Ue("`unprotect` can only be invoked on root nodes");t.isProtectionEnabled=!1}function fN(e){return qe(e).isProtected}function _7(e,t){return qe(e).applySnapshot(t)}function _2(e,t){t===void 0&&(t=!0);var r=qe(e);return t?r.snapshot:r.type.getSnapshot(r,!1)}function dN(e,t){t===void 0&&(t=1);for(var r=qe(e).parent;r;){if(--t===0)return!0;r=r.parent}return!1}function hN(e,t){t===void 0&&(t=1);for(var r=t,n=qe(e).parent;n;){if(--r===0)return n.storedValue;n=n.parent}throw new Ue("Failed to find the parent of ".concat(qe(e)," at depth ").concat(t))}function pN(e,t){for(var r=qe(e).parent;r;){if(t.is(r.storedValue))return!0;r=r.parent}return!1}function gN(e,t){for(var r=qe(e).parent;r;){if(t.is(r.storedValue))return r.storedValue;r=r.parent}throw new Ue("Failed to find the parent of ".concat(qe(e)," of a given type"))}function w7(e){return qe(e).root.storedValue}function S7(e){return qe(e).path}function vN(e){return hu(qe(e).path)}function mN(e){return qe(e).isRoot}function yN(e,t){var r=B7(qe(e),t);return r?r.value:void 0}function bN(e,t,r){var n=qe(t).root.identifierCache.resolve(e,Pu(r));return n==null?void 0:n.value}function E7(e){return qe(e).identifier}function _N(e,t){t===void 0&&(t=!0);try{var r=e();if(r==null)return;if(Mt(r))return t?w2(r)?r:void 0:r;throw new Ue("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof T2)return;throw n}}function wN(e,t){t===void 0&&(t=!0);try{var r=e();if(r==null)return!1;if(Mt(r))return t?w2(r):!0;throw new Ue("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof T2)return!1;throw n}}function O7(e,t){var r=B7(qe(e),t,!1);if(r!==void 0)try{return r.value}catch{return}}function SN(e,t){return z7(qe(e),qe(t))}function EN(e,t){t===void 0&&(t=!0);var r=qe(e);return r.type.create(r.snapshot,t===!0?r.root.environment:t===!1?void 0:t)}function ON(e){return qe(e).detach(),e}function xN(e){var t=qe(e);t.isRoot?t.die():t.parent.removeChild(t.subpath)}function w2(e){return qe(e).observableIsAlive}function PN(e,t){var r=qe(e);return r.addDisposer(t),t}function CN(e){var t=qe(e),r=t.root.environment;if(!r)throw new Ue("Failed to find the environment of ".concat(t," ").concat(t.path));return r}function TN(e){var t=qe(e),r=t.root.environment;return!!r}function x7(e,t){var r=qe(e);r.getChildren().forEach(function(n){Mt(n.storedValue)&&x7(n.storedValue,t)}),t(r.storedValue)}function P7(e){var t;return Mt(e)?t=Pf(e):t=e,{name:t.name,properties:Tr({},t.properties)}}function AN(e){var t=qe(e).type,r=Tr(Tr({},P7(t)),{actions:[],volatile:[],views:[],flowActions:[]}),n=Object.getOwnPropertyNames(e);return n.forEach(function(i){if(!(i in r.properties)){var a=Object.getOwnPropertyDescriptor(e,i);if(a.get){q8(e,i)?r.views.push(i):r.volatile.push(i);return}a.value._isFlowAction===!0&&r.flowActions.push(i),a.value._isMSTAction===!0?r.actions.push(i):Y8(e,i)?r.volatile.push(i):r.views.push(i)}}),r}function kN(e){return e}function RN(e){return e}function LN(e){return e}function MN(e){return qe(e).nodeId}var C7=function(){function e(t,r,n,i){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:i}),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:Vr.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=i,this.baseSetParent(r,n)}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(t){var r=this.isAlive;this._state=t;var n=this.isAlive;this.aliveAtom&&r!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._hookSubscribers&&this._hookSubscribers.emit(t,this,t)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return this._hookSubscribers||(this._hookSubscribers=new V7),this._hookSubscribers.register(t,r)}}),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(t,r){this._parent=t,this._subpath=r,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(t){return t&&(this.pathAtom||(this.pathAtom=Vc("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?ko(this._subpath):""),this.parent.getEscapedPath(t)+"/"+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!==Vr.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Vr.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Vc("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.state===Vr.CREATED){if(this.parent){if(this.parent.state!==Vr.FINALIZED)return;this.fireHook(Pr.afterAttach)}this.state=Vr.FINALIZED,t&&t()}}}),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=Vr.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(Pr.beforeDestroy)}}),e}(),Zc=function(e){Gt(t,e);function t(r,n,i,a,o){var l=e.call(this,r,n,i,a)||this;try{l.storedValue=r.createNewInstance(o)}catch(u){throw l.state=Vr.DEAD,u}return l.state=Vr.CREATED,l.finalizeCreation(),l}return Object.defineProperty(t.prototype,"root",{get:function(){if(!this.parent)throw new Ue("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.parent!==r,a=this.subpath!==n;!i&&!a||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(r).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Vr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.fireInternalHook(r)}}),t}(C7);Zc.prototype.die=wr(Zc.prototype.die);var NN=1,Ti;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Ti||(Ti={}));var zn;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(zn||(zn={}));var IN={onError:function(e){throw e}},kn=function(e){Gt(t,e);function t(r,n,i,a,o){var l=e.call(this,r,n,i,a)||this;if(Object.defineProperty(l,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++NN}),Object.defineProperty(l,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(l,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Ti.UNINITIALIZED}),Object.defineProperty(l,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(l,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),l._snapshotComputed=Ml(function(){return l.getSnapshot()}),l.unbox=l.unbox.bind(l),l._initialSnapshot=o,l.identifierAttribute=r.identifierAttribute,n||(l.identifierCache=new tI),l._childNodes=r.initializeChildNodes(l,l._initialSnapshot),l.identifier=null,l.unnormalizedIdentifier=null,l.identifierAttribute&&l._initialSnapshot){var u=l._initialSnapshot[l.identifierAttribute];if(u===void 0){var f=l._childNodes[l.identifierAttribute];f&&(u=f.value)}if(typeof u!="string"&&typeof u!="number")throw new Ue("Instance identifier '".concat(l.identifierAttribute,"' for type '").concat(l.type.name,"' must be a string or a number"));l.identifier=Pu(u),l.unnormalizedIdentifier=u}return n?n.root.identifierCache.addNodeToCache(l):l.identifierCache.addNodeToCache(l),l}return Object.defineProperty(t.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applyPatches(r)}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.createObservableInstanceIfNeeded(),this._applySnapshot(r)}}),Object.defineProperty(t.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(r){r===void 0&&(r=!0),this._observableInstanceState===Ti.UNINITIALIZED&&this.createObservableInstance(r)}}),Object.defineProperty(t.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n,i,a,o;r===void 0&&(r=!0),this._observableInstanceState=Ti.CREATING;for(var l=[],u=this.parent;u&&u._observableInstanceState===Ti.UNINITIALIZED;)l.unshift(u),u=u.parent;try{for(var f=Pc(l),v=f.next();!v.done;v=f.next()){var w=v.value;w.createObservableInstanceIfNeeded(!1)}}catch(m){n={error:m}}finally{try{v&&!v.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}var _=this.type;try{this.storedValue=_.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,_.finalizeNewInstance(this,this.storedValue)}catch(m){throw this.state=Vr.DEAD,m}finally{this._isRunningAction=!1}if(this._observableInstanceState=Ti.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=fu,this.state=Vr.CREATED,r){this.fireHook(Pr.afterCreate),this.finalizeCreation();try{for(var h=Pc(l.reverse()),E=h.next();!E.done;E=h.next()){var w=E.value;w.fireHook(Pr.afterCreate),w.finalizeCreation()}}catch(m){a={error:m}}finally{try{E&&!E.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}}}}),Object.defineProperty(t.prototype,"root",{get:function(){var r=this.parent;return r?r.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(Pr.beforeDetach);var r=this.state;this.state=Vr.DETACHING;var n=this.root,i=n.environment,a=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=i,this.identifierCache=a}finally{this.state=r}}}}),Object.defineProperty(t.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r!==this.parent,a=n!==this.subpath;!i&&!a||(i?(this.environment=void 0,r.root.identifierCache.mergeCache(this),this.baseSetParent(r,n),this.fireHook(Pr.afterAttach)):a&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(t.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.fireInternalHook(r);var i=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[r];typeof i=="function"&&(ru?ru(function(){i.apply(n.storedValue)}):i.apply(this.storedValue))}}),Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Ti.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(t.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(t.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var r=this.type,n=this._childNodes,i=this._initialSnapshot;this._cachedInitialSnapshot=r.processInitialSnapshot(n,i),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(t.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(t.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=m7();if(!this.isAlive&&n!=="ignore"){var i=this._getAssertAliveError(r);switch(n){case"error":throw new Ue(i);case"warn":pI(i)}}}}),Object.defineProperty(t.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",i=r.subpath&&ko(r.subpath)||"",a=r.actionContext||S2();a&&a.type!=="action"&&a.parentActionEvent&&(a=a.parentActionEvent);var o="";if(a&&a.name!=null){var l=a&&a.context&&S7(a.context)||n;o="".concat(l,".").concat(a.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(n,"', Subpath: '").concat(i,"', Action: '").concat(o,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.assertAlive({subpath:r}),this._autoUnbox=!1;try{return this._observableInstanceState===Ti.CREATED?this.type.getChildNode(this,r):this._childNodes[r]}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(fu),this._autoUnbox=!1;try{return this._observableInstanceState===Ti.CREATED?this.type.getChildren(this):H7(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.type.getChildType(r)}}),Object.defineProperty(t.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.assertAlive(r),!this.isRunningAction()&&this.isProtected)throw new Ue("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this.type.removeChild(this,r)}}),Object.defineProperty(t.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r&&(this.assertAlive({subpath:r.subpath||r.subpathUponDeath}),this._autoUnbox?r.value:r)}}),Object.defineProperty(t.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(r).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(t.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this.baseFinalizeCreation(function(){var n,i;try{for(var a=Pc(r.getChildren()),o=a.next();!o.done;o=a.next()){var l=o.value;l.finalizeCreation()}}catch(u){n={error:u}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}r.fireInternalHook(Pr.afterCreationFinalization)})}}),Object.defineProperty(t.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new Ue("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(t.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;this._applyPatches=Qc(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(i){if(!i.path){r.type.applySnapshot(r,i.value);return}var a=hu(i.path),o=U7(r,a.slice(0,-1));o.applyPatchLocally(a[a.length-1],i)})}),this._applySnapshot=Qc(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==r.snapshot)return r.type.applySnapshot(r,n)}),yl(this.storedValue,"$treenode",this),yl(this.storedValue,"toJSON",nI)}}),Object.defineProperty(t.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Vr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(t.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Ti.UNINITIALIZED&&(this.getChildren().forEach(function(r){r.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(zn.Dispose),this._internalEventsClear(zn.Dispose))}}),Object.defineProperty(t.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var r=this.snapshot;this._snapshotUponDeath=r,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(t.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._addSnapshotReaction(),this._internalEventsRegister(zn.Snapshot,r)}}),Object.defineProperty(t.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEventsEmit(zn.Snapshot,r)}}),Object.defineProperty(t.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsRegister(zn.Patch,r)}}),Object.defineProperty(t.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._internalEventsHasSubscribers(zn.Patch)){var i=n.path.substr(this.path.length)+(r.path?"/"+r.path:""),a=fI({},r,{path:i}),o=fa(_I(a),2),l=o[0],u=o[1];this._internalEventsEmit(zn.Patch,l,u)}this.parent&&this.parent.emitPatch(r,n)}}),Object.defineProperty(t.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._internalEventsHas(zn.Dispose,r)}}),Object.defineProperty(t.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this.hasDisposer(r)){this._internalEventsRegister(zn.Dispose,r,!0);return}throw new Ue("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(t.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._internalEventsHas(zn.Dispose,r))throw new Ue("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(zn.Dispose,r)}}),Object.defineProperty(t.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(this.middlewares){var n=this.middlewares.indexOf(r);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(t.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var a={handler:r,includeHooks:n};return this.middlewares?this.middlewares.push(a):this.middlewares=[a],function(){i.removeMiddleware(a)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this.assertWritable({subpath:r}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,r,n)}}),Object.defineProperty(t.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;if(!this._hasSnapshotReaction){var n=j8(function(){return r.snapshot},function(i){return r.emitSnapshot(i)},IN);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(t.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return!!this._internalEvents&&this._internalEvents.hasSubscribers(r)}}),Object.defineProperty(t.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){return i===void 0&&(i=!1),this._internalEvents||(this._internalEvents=new V7),this._internalEvents.register(r,n,i)}}),Object.defineProperty(t.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!!this._internalEvents&&this._internalEvents.has(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){this._internalEvents&&this._internalEvents.unregister(r,n)}}),Object.defineProperty(t.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(r){for(var n,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];this._internalEvents&&(n=this._internalEvents).emit.apply(n,da([r],fa(i),!1))}}),Object.defineProperty(t.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(r){this._internalEvents&&this._internalEvents.clear(r)}}),Object.defineProperty(t.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),t}(C7);kn.prototype.createObservableInstance=wr(kn.prototype.createObservableInstance);kn.prototype.detach=wr(kn.prototype.detach);kn.prototype.die=wr(kn.prototype.die);var T7,ut;(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"})(ut||(ut={}));var A7="cannotDetermine",DN=Symbol("$type"),Ua=function(){function e(t){Object.defineProperty(this,T7,{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=t}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){return Ia(this,t),this.instantiate(null,"",r,t).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){throw new Ue("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=j7(t);if(n){var i=Pf(t);return this.isAssignableFrom(i)?Rn():Ln(r,t)}return this.isValidSnapshot(t,r)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.validate(t,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new Ue("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 Ue("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 Ue("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 Ue("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}();T7=DN;Ua.prototype.create=wr(Ua.prototype.create);var uu=function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(t.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r===void 0&&(r=this.getDefaultSnapshot()),e.prototype.create.call(this,r,n)}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.createObservableInstanceIfNeeded(),r.storedValue}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return!r.identifierAttribute||r.identifier===Pu(n[r.identifierAttribute])}}),Object.defineProperty(t.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return r.isDetaching?!1:r.snapshot===n||Mt(n)&&qe(n)===r?!0:r.type===this&&G7(n)&&!Mt(n)&&this.isMatchingSnapshotId(r,n)?(r.applySnapshot(n),!0):!1}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this.tryToReconcileNode(r,n);if(o)return r.setParent(i,a),r;if(r.die(),Mt(n)&&this.isAssignableFrom(Pf(n))){var l=qe(n);return l.setParent(i,a),l}return this.instantiate(i,a,void 0,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(Ua);uu.prototype.create=wr(uu.prototype.create);var Yl=function(e){Gt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r}}),Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(!r.isDetaching&&r.type===this&&r.storedValue===n)return r;var o=this.instantiate(i,a,void 0,n);return r.die(),o}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),t}(Ua);function an(e){return typeof e=="object"&&e&&e.isType===!0}var Ji=new Map;function FN(e){return function(r,n,i){switch(r.type){case"action":if(!e.filter||e.filter(r)===!0){var a=e.onStart(r);e.onResume(r,a),Ji.set(r.id,{call:r,context:a,async:!1});try{var o=n(r);return e.onSuspend(r,a),Ji.get(r.id).async===!1&&(Ji.delete(r.id),e.onSuccess(r,a,o)),o}catch(u){throw Ji.delete(r.id),e.onFail(r,a,u),u}}else return n(r);case"flow_spawn":{var l=Ji.get(r.rootId);return l.async=!0,n(r)}case"flow_resume":case"flow_resume_error":{var l=Ji.get(r.rootId);e.onResume(r,l.context);try{return n(r)}finally{e.onSuspend(r,l.context)}}case"flow_throw":{var l=Ji.get(r.rootId);return Ji.delete(r.rootId),e.onFail(r,l.context,r.args[0]),n(r)}case"flow_return":{var l=Ji.get(r.rootId);return Ji.delete(r.rootId),e.onSuccess(r,l.context,r.args[0]),n(r)}}}}var jN=function(){function e(t,r){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),t&&t.onStart(r)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,t))}}),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 zN(e){var t=new Map;return function(n,i){var a=n.parentActionEvent?t.get(n.parentActionEvent.id):void 0;if(n.type==="action"){var o=Tr(Tr({},n),{env:a&&a.call.env,parentCall:a&&a.call}),l=!e.filter||e.filter(o),u=l?e:void 0,f=new jN(u,o);t.set(n.id,f);var v=void 0;try{v=i(n)}catch(_){throw t.delete(n.id),f.finish(_),_}return f.hasFlowsPending||(t.delete(n.id),f.finish()),v}else{if(!a)return i(n);switch(n.type){case"flow_spawn":return a.incFlowsPending(),i(n);case"flow_resume":case"flow_resume_error":return i(n);case"flow_throw":{var w=n.args[0];try{return i(n)}finally{a.decFlowsPending(),a.hasFlowsPending||(t.delete(n.parentActionEvent.id),a.finish(w))}}case"flow_return":try{return i(n)}finally{a.decFlowsPending(),a.hasFlowsPending||(t.delete(n.parentActionEvent.id),a.finish())}}}}}function BN(e,t,r,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(du(n))return n;if(Mt(n))return Hd("[MSTNode: ".concat(Pf(n).name,"]"));if(typeof n=="function")return Hd("[function]");if(typeof n=="object"&&!gl(n)&&!P2(n))return Hd("[object ".concat(n&&n.constructor&&n.constructor.name||"Complex Object","]"));try{return JSON.stringify(n),n}catch(i){return Hd(""+i)}}function UN(e,t){return t&&typeof t=="object"&&"$MST_DATE"in t?new Date(t.$MST_DATE):t}function Hd(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function k7(e,t){ru(function(){C2(t).forEach(function(r){return HN(e,r)})})}function HN(e,t){var r=O7(e,t.path||"");if(!r)throw new Ue("Invalid action path: ".concat(t.path||""));var n=qe(r);if(t.name==="@APPLY_PATCHES")return su.call(null,r,t.args[0]);if(t.name==="@APPLY_SNAPSHOT")return _7.call(null,r,t.args[0]);if(typeof r[t.name]!="function")throw new Ue("Action '".concat(t.name,"' does not exist in '").concat(n.path,"'"));return r[t.name].apply(r,t.args?t.args.map(function(i){return UN(n,i)}):[])}function GN(e,t){var r=[],n=function(o){var l=t?t(o,E2()):!0;l&&r.push(o)},i,a={actions:r,get recording(){return!!i},stop:function(){i&&(i(),i=void 0)},resume:function(){i||(i=R7(e,n))},replay:function(o){k7(o,r)}};return a.resume(),a}function R7(e,t,r){return r===void 0&&(r=!1),N7(e,function(i,a){if(i.type==="action"&&i.id===i.rootId){var o=qe(i.context),l={name:i.name,path:z7(qe(e),o),args:i.args.map(function(f,v){return BN(o,i.name,v,f)})};if(r){var u=a(i);return t(l),u}else return t(l),a(i)}else return a(i)})}var $N=1,Cc;function S2(){return Cc}function L7(){return $N++}function Dm(e,t){var r=qe(e.context);e.type==="action"&&r.assertAlive({actionContext:e});var n=r._isRunningAction;r._isRunningAction=!0;var i=Cc;Cc=e;try{return WN(r,e,t)}finally{Cc=i,r._isRunningAction=n}}function M7(e){if(e)return e.type==="action"?e:e.parentActionEvent}function Qc(e,t,r){var n=function(){var i=L7(),a=Cc,o=M7(a);return Dm({type:"action",name:t,id:i,args:q7(arguments),context:e,tree:w7(e),rootId:a?a.rootId:i,parentId:a?a.id:0,allParentIds:a?da(da([],fa(a.allParentIds),!1),[a.id],!1):[],parentEvent:a,parentActionEvent:o},r)};return n._isMSTAction=!0,n._isFlowAction=r._isFlowAction,n}function N7(e,t,r){r===void 0&&(r=!0);var n=qe(e);return n.addMiddleWare(t,r)}function VN(e,t,r){r===void 0&&(r=!0);var n={handler:e,includeHooks:r};return t.$mst_middleware=t.$mst_middleware||[],t.$mst_middleware.push(n),t}var qN=function(){function e(t,r){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:[]}),r.$mst_middleware&&this.middlewares.push(r.$mst_middleware);for(var n=t;n;)n.middlewares&&this.middlewares.push(n.middlewares),n=n.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 t=this.middlewares[this.arrayIndex];if(t){var r=t[this.inArrayIndex++];return r||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function WN(e,t,r){var n=new qN(e,r);if(n.isEmpty)return wr(r).apply(null,t.args);var i=null;function a(o){var l=n.getNextMiddleware(),u=l&&l.handler;if(!u)return wr(r).apply(null,o.args);if(!l.includeHooks&&Pr[o.name])return a(o);function f(w,_){i=a(w),_&&(i=_(i))}function v(w){i=w}return u(o,f,v),i}return a(t)}function E2(){for(var e=S2();e&&e.type!=="action";)e=e.parentActionEvent;return e}function I7(e,t,r){for(var n=typeof t=="number"?t:t.id,i=r?e:e.parentActionEvent;i;){if(i.id===n)return!0;i=i.parentActionEvent}return!1}function YN(e,t){return I7(e,t,!1)}function KN(e,t){return I7(e,t,!0)}function XN(e){try{return JSON.stringify(e)}catch(t){return"<Unserializable: ".concat(t,">")}}function D7(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):Mt(e)?"<".concat(e,">"):"`".concat(XN(e),"`")}function ZN(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function QN(e){var t=e.value,r=e.context[e.context.length-1].type,n=e.context.map(function(l){var u=l.path;return u}).filter(function(l){return l.length>0}).join("/"),i=n.length>0?'at path "/'.concat(n,'" '):"",a=Mt(t)?"value of type ".concat(qe(t).type.name,":"):du(t)?"value":"snapshot",o=r&&Mt(t)&&r.is(qe(t).snapshot);return"".concat(i).concat(a," ").concat(D7(t)," is not assignable ").concat(r?"to type: `".concat(r.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(r?aS(r)||du(t)?".":", expected an instance of `".concat(r.name,"` or a snapshot like `").concat(r.describe(),"` instead.")+(o?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function O2(e,t,r){return e.concat([{path:t,type:r}])}function Rn(){return cu}function Ln(e,t,r){return[{context:e,value:t,message:r}]}function v0(e){return e.reduce(function(t,r){return t.concat(r)},[])}function Ia(e,t){gI()&&F7(e,t)}function F7(e,t){var r=e.validate(t,[{path:"",type:e}]);if(r.length>0)throw new Ue(JN(e,t,r))}function JN(e,t,r){if(r.length!==0)return"Error while converting ".concat(ZN(D7(t))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+r.map(QN).join(`
|
|
95
|
-
`)}var eI=0,tI=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:eI++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:Ft.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:Ft.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t);this.lastCacheModificationPerId.set(t,r===void 0?1:r+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.lastCacheModificationPerId.get(t)||0;return"".concat(this.cacheId,"-").concat(r)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){if(r===void 0&&(r=!0),t.identifierAttribute){var n=t.identifier;this.cache.has(n)||this.cache.set(n,Ft.array([],m0));var i=this.cache.get(n);if(i.indexOf(t)!==-1)throw new Ue("Already registered");i.push(t),r&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this;Gy(t.identifierCache.cache).forEach(function(n){return n.forEach(function(i){r.addNodeToCache(i)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.identifierAttribute){var r=t.identifier,n=this.cache.get(r);n&&(n.remove(t),n.length||this.cache.delete(r),this.updateLastCacheModificationPerId(t.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this,n=new e,i=t.path+"/";return K8(this.cache).forEach(function(a){for(var o=fa(a,2),l=o[0],u=o[1],f=!1,v=u.length-1;v>=0;v--){var w=u[v];(w===t||w.path.indexOf(i)===0)&&(n.addNodeToCache(w,!1),u.splice(v,1),u.length||r.cache.delete(l),f=!0)}f&&r.updateLastCacheModificationPerId(l)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);return n?n.some(function(i){return t.isAssignableFrom(i.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.cache.get(r);if(!n)return null;var i=n.filter(function(a){return t.isAssignableFrom(a.type)});switch(i.length){case 0:return null;case 1:return i[0];default:throw new Ue("Cannot resolve a reference to type '".concat(t.name,"' with id: '").concat(r,"' unambigously, there are multiple candidates: ").concat(i.map(function(a){return a.path}).join(", ")))}}}),e}();function x2(e,t,r,n,i){var a=j7(i);if(a){if(a.parent)throw new Ue("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(t?t.path:"","/").concat(r,"', but it lives already at '").concat(a.path,"'"));return t&&a.setParent(t,r),a}return new kn(e,t,r,n,i)}function Ko(e,t,r,n,i){return new Zc(e,t,r,n,i)}function rI(e){return e instanceof Zc||e instanceof kn}var Vr;(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"})(Vr||(Vr={}));function Mt(e){return!!(e&&e.$treenode)}function qe(e){if(!Mt(e))throw new Ue("Value ".concat(e," is no MST Node"));return e.$treenode}function j7(e){return e&&e.$treenode||null}function nI(){return qe(this).snapshot}var iI=function(e){return".."};function z7(e,t){if(e.root!==t.root)throw new Ue("Cannot calculate relative path: objects '".concat(e,"' and '").concat(t,"' are not part of the same object tree"));for(var r=hu(e.path),n=hu(t.path),i=0;i<r.length&&r[i]===n[i];i++);return r.slice(i).map(iI).join("/")+qh(n.slice(i))}function B7(e,t,r){return r===void 0&&(r=!0),U7(e,hu(t),r)}function U7(e,t,r){r===void 0&&(r=!0);var n=e;try{for(var i=0;i<t.length;i++){var a=t[i];if(a===".."){if(n=n.parent,n)continue}else{if(a===".")continue;if(n){if(n instanceof Zc){var o=n.value;Mt(o)&&(n=qe(o))}if(n instanceof kn){var l=n.getChildType(a);if(l&&(n=n.getChildNode(a),n))continue}}}throw new Ue("Could not resolve '".concat(a,"' in path '").concat(qh(t.slice(0,i))||"/","' while resolving '").concat(qh(t),"'"))}}catch(u){if(!r)return;throw u}return n}function H7(e){if(!e)return cu;var t=Object.keys(e);if(!t.length)return cu;var r=new Array(t.length);return t.forEach(function(n,i){r[i]=e[n]}),r}function aI(e){return W7(),Y7(e)}var oI=Object.toString(),cu=Object.freeze([]),fu=Object.freeze({}),m0=P8().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(m0);var Ue=function(e){Gt(t,e);function t(r){return r===void 0&&(r="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(r))||this}return t}(Error);function lI(e){return e}var sI=Number.isInteger;function uI(e){return Number(e)===e&&e%1!==0}function cI(e){return Number.isFinite(e)}function P2(e){return Array.isArray(e)||vn(e)}function C2(e){return e?P2(e)?e:[e]:cu}function fI(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=0;n<t.length;n++){var i=t[n];for(var a in i)e[a]=i[a]}return e}function gl(e){var t;if(e===null||typeof e!="object")return!1;var r=Object.getPrototypeOf(e);return r==null?!0:((t=r.constructor)===null||t===void 0?void 0:t.toString())===oI}function G7(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function du(e,t){return t===void 0&&(t=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||t&&e instanceof Date}function $7(e){return typeof e!="function"}function dI(e,t,r){zr(e)?Vy(e,t,r):Object.defineProperty(e,t,r)}function yl(e,t,r){dI(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}var hI=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(t,r){var n=this;return r===void 0&&(r=!1),r?this.handlers.unshift(t):this.handlers.push(t),function(){n.unregister(t)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.handlers.indexOf(t)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=this.handlers.indexOf(t);r>=0&&this.handlers.splice(r,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 t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.handlers.slice();n.forEach(function(i){return i.apply(void 0,da([],fa(t),!1))})}}),e}(),V7=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(t){var r=this.eventHandlers&&this.eventHandlers[t];return!!r&&r.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var i=this.eventHandlers[t];return i||(i=this.eventHandlers[t]=new hI),i.register(r,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];return!!n&&n.has(r)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r){var n=this.eventHandlers&&this.eventHandlers[t];n&&n.unregister(r)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.eventHandlers&&delete this.eventHandlers[t]}}),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(t){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=this.eventHandlers&&this.eventHandlers[t];a&&(r=a).emit.apply(r,da([],fa(n),!1))}}),e}();function q7(e){for(var t=new Array(e.length),r=0;r<e.length;r++)t[r]=e[r];return t}function bg(e,t){return e.indexOf(t)===0}var W7=function(e,t){};W7.ids={};function pI(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function gI(){return typeof process<"u"&&N4&&N4.ENABLE_TYPE_CHECK==="true"}function _g(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function Y7(e){return bI(e.name,e)}function vI(e){return e}function mI(e){return function(){var t,r=[];for(t=0;t<arguments.length;t++)r[t]=arguments[t];return y7(this,function(n){switch(n.label){case 0:return[4,e.apply(void 0,da([],fa(r),!1))];case 1:return[2,n.sent()]}})}}function yI(e){return y7(this,function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()]}})}function bI(e,t){var r=function(){var i=L7(),a=S2();if(!a)throw new Ue("a mst flow must always have a parent context");var o=M7(a);if(!o)throw new Ue("a mst flow must always have a parent action context");var l={name:e,id:i,tree:a.tree,context:a.context,parentId:a.id,allParentIds:da(da([],fa(a.allParentIds),!1),[a.id],!1),rootId:a.rootId,parentEvent:a,parentActionEvent:o},u=arguments;function f(v,w,_){return v.$mst_middleware=r.$mst_middleware,Dm(Tr(Tr({},l),{type:w,args:[_]}),v)}return new Promise(function(v,w){var _,h=function(){_=t.apply(null,arguments),E(void 0)};h.$mst_middleware=r.$mst_middleware,Dm(Tr(Tr({},l),{type:"flow_spawn",args:q7(u)}),h);function E(p){var g;try{var d=f(function(b){g=_.next(b)},"flow_resume",p);d instanceof Error&&(g=_.throw(d))}catch(b){_g(function(){f(function(O){w(b)},"flow_throw",b)});return}y(g)}function m(p){var g;try{f(function(d){g=_.throw(d)},"flow_resume_error",p)}catch(d){_g(function(){f(function(b){w(d)},"flow_throw",d)});return}y(g)}function y(p){if(p.done){_g(function(){f(function(g){v(g)},"flow_return",p.value)});return}if(!p.value||typeof p.value.then!="function")throw new Ue("Only promises can be yielded to `async`, got: "+p);return p.value.then(E,m)}})};return r._isFlowAction=!0,r}function _I(e){if(!("oldValue"in e))throw new Ue("Patches without `oldValue` field cannot be inversed");return[wI(e),SI(e)]}function wI(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 SI(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 EI(e){return typeof e=="number"}function ko(e){return EI(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function K7(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qh(e){if(e.length===0)return"";var t=function(r){return r.map(ko).join("/")};return e[0]==="."||e[0]===".."?t(e):"/"+t(e)}function hu(e){var t=e.split("/").map(K7),r=e===""||e==="."||e===".."||bg(e,"/")||bg(e,"./")||bg(e,"../");if(!r)throw new Ue("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return t[0]===""&&t.shift(),t}var wg=Symbol("$preProcessorFailed"),OI=function(e){Gt(t,e);function t(r,n,i){var a=e.call(this,i||r.name)||this;return Object.defineProperty(a,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),a}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ut.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(t.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._processors.preProcessor?this._processors.preProcessor.call(null,r):r}}),Object.defineProperty(t.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(r){try{return this.preProcessSnapshot(r)}catch{return wg}}}),Object.defineProperty(t.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,r,n.storedValue):r}}),Object.defineProperty(t.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;xI(r.type,this,"create"),r instanceof kn&&(r.hasSnapshotPostProcessor=!!this._processors.postProcessor);var i=r.getSnapshot;r.getSnapshot=function(){return n.postProcessSnapshot(i.call(r),r)},lS(this._subtype)||(r.getReconciliationType=function(){return n})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=Mt(a)?a:this.preProcessSnapshot(a),l=this._subtype.instantiate(r,n,i,o);return this._fixNode(l),l}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this._subtype.reconcile(r,Mt(n)?n:this.preProcessSnapshot(n),i,a);return o!==r&&this._fixNode(o),o}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=!0);var i=this._subtype.getSnapshot(r);return n?this.postProcessSnapshot(i,r):i}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.preProcessSnapshotSafe(r);return i===wg?Ln(n,r,"Failed to preprocess value"):this._subtype.validate(i,n)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(t.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=an(r)?this._subtype:Mt(r)?_2(r,!1):this.preProcessSnapshotSafe(r);return n===wg?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!(this._subtype instanceof uu))return!1;var i=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(r,i)}}),t}(Ua);function xI(e,t){for(var r,n,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];try{for(var o=Pc(i),l=o.next();!l.done;l=o.next()){var u=l.value;e[u]=t[u].bind(t)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}function PI(e,t,r){return new OI(e,t,r)}var I4="Map.put can only be used to store complex values that have an identifier type attribute";function X7(e,t){var r,n,i=e.getSubTypes();if(i===A7)return!1;if(i){var a=C2(i);try{for(var o=Pc(a),l=o.next();!l.done;l=o.next()){var u=l.value;if(!X7(u,t))return!1}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}}return e instanceof Jc&&t.push(e),!0}var mo;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(mo||(mo={}));var CI=function(e){Gt(t,e);function t(r,n){return e.call(this,r,Ft.ref.enhancer,n)||this}return Object.defineProperty(t.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.get.call(this,""+r)}}),Object.defineProperty(t.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.has.call(this,""+r)}}),Object.defineProperty(t.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return e.prototype.delete.call(this,""+r)}}),Object.defineProperty(t.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return e.prototype.set.call(this,""+r,n)}}),Object.defineProperty(t.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!r)throw new Ue("Map.put cannot be used to set empty values");if(Mt(r)){var n=qe(r);if(n.identifier===null)throw new Ue(I4);return this.set(n.identifier,r),r}else if(G7(r)){var i=qe(this),a=i.type;if(a.identifierMode!==mo.YES)throw new Ue(I4);var o=a.mapIdentifierAttribute,l=r[o];if(!A2(l)){var u=this.put(a.getChildType().create(r,i.environment));return this.put(_2(u))}var f=Pu(l);return this.set(f,r),this.get(f)}else throw new Ue("Map.put can only be used to store complex values")}}),t}(wp),Wh=function(e){Gt(t,e);function t(r,n,i){i===void 0&&(i=[]);var a=e.call(this,r)||this;return Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:mo.UNKNOWN}),Object.defineProperty(a,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Map}),Object.defineProperty(a,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),a._determineIdentifierMode(),a.hookInitializers=i,a}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this._determineIdentifierMode(),x2(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===mo.UNKNOWN){var r=[];if(X7(this._subType,r)){var n=r.reduce(function(i,a){if(!a.identifierAttribute)return i;if(i&&i!==a.identifierAttribute)throw new Ue("The objects in a map should all have the same identifier attribute, expected '".concat(i,"', but child of type '").concat(a.name,"' declared attribute '").concat(a.identifierAttribute,"' as identifier"));return a.identifierAttribute},void 0);n?(this.identifierMode=mo.YES,this.mapIdentifierAttribute=n):this.identifierMode=mo.NO}}}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type._subType,a={};return Object.keys(n).forEach(function(o){a[o]=i.instantiate(r,o,void 0,n[o])}),a}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new CI(r,this.name)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Hy(n,r.unbox);var i=r.type;i.hookInitializers.forEach(function(a){var o=a(n);Object.keys(o).forEach(function(l){var u=o[l],f=Qc(n,l,u);yl(n,l,f)})}),yp(n,this.willChange),_p(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return Gy(r.storedValue)}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=r.storedValue.get(""+n);if(!i)throw new Ue("Not a child "+n);return i}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=qe(r.object),i=r.name;n.assertWritable({subpath:i});var a=n.type,o=a._subType;switch(r.type){case"update":{var l=r.newValue,u=r.object.get(i);if(l===u)return null;Ia(o,l),r.newValue=o.reconcile(n.getChildNode(i),r.newValue,n,i),a.processIdentifier(i,r.newValue)}break;case"add":Ia(o,r.newValue),r.newValue=o.instantiate(n,i,void 0,r.newValue),a.processIdentifier(i,r.newValue);break}return r}}),Object.defineProperty(t.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.identifierMode===mo.YES&&n instanceof kn){var i=n.identifier;if(i!==r)throw new Ue("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(i,"', but expected: '").concat(r,"'"))}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return r.getChildren().forEach(function(i){n[i.subpath]=i.snapshot}),n}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=qe(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:ko(r.name),value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:ko(r.name),value:r.newValue.snapshot,oldValue:void 0},n);case"delete":var i=r.oldValue.snapshot;return r.oldValue.die(),void n.emitPatch({op:"remove",path:ko(r.name),oldValue:i},n)}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var a=r.storedValue;switch(i.op){case"add":case"replace":a.set(n,i.value);break;case"remove":a.delete(n);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Ia(this,n);var i=r.storedValue,a={};if(Array.from(i.keys()).forEach(function(l){a[l]=!1}),n)for(var o in n)i.set(o,n[o]),a[""+o]=!0;Object.keys(a).forEach(function(l){a[l]===!1&&i.delete(l)})}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return gl(r)?v0(Object.keys(r).map(function(a){return i._subType.validate(r[a],O2(n,a,i._subType))})):Ln(n,r,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return fu}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.delete(n)}}),t}(uu);Wh.prototype.applySnapshot=wr(Wh.prototype.applySnapshot);function TI(e){return new Wh("Map<string, ".concat(e.name,">"),e)}function AI(e){return an(e)&&(e.flags&ut.Map)>0}var Yh=function(e){Gt(t,e);function t(r,n,i){i===void 0&&(i=[]);var a=e.call(this,r)||this;return Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Array}),Object.defineProperty(a,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),a.hookInitializers=i,a}return Object.defineProperty(t.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.hookInitializers.length>0?this.hookInitializers.concat(r):[r];return new t(this.name,this._subType,n)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return x2(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n=[]);var i=r.type._subType,a={};return n.forEach(function(o,l){var u=""+l;a[u]=i.instantiate(r,u,void 0,o)}),a}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Tr(Tr({},m0),{name:this.name});return Ft.array(H7(r),n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){zi(n).dehancer=r.unbox;var i=r.type;i.hookInitializers.forEach(function(a){var o=a(n);Object.keys(o).forEach(function(l){var u=o[l],f=Qc(n,l,u);yl(n,l,f)})}),yp(n,this.willChange),_p(n,this.didChange)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue.slice()}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=Number(n);if(i<r.storedValue.length)return r.storedValue[i];throw new Ue("Not a child: "+n)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=qe(r.object);n.assertWritable({subpath:""+r.index});var i=n.type._subType,a=n.getChildren();switch(r.type){case"update":{if(r.newValue===r.object[r.index])return null;var o=D4(n,i,[a[r.index]],[r.newValue],[r.index]);if(!o)return null;r.newValue=o[0]}break;case"splice":{var l=r.index,u=r.removedCount,f=r.added,v=D4(n,i,a.slice(l,l+u),f,f.map(function(_,h){return l+h}));if(!v)return null;r.added=v;for(var w=l+u;w<a.length;w++)a[w].setParent(n,""+(w+f.length-u))}break}return r}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=[];return Object.keys(r).forEach(function(i){n.push(r[i].getSnapshot())}),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=qe(r.object);switch(r.type){case"update":return void n.emitPatch({op:"replace",path:""+r.index,value:r.newValue.snapshot,oldValue:r.oldValue?r.oldValue.snapshot:void 0},n);case"splice":if(r.removedCount&&r.addedCount===r.object.length)return void n.emitPatch({op:"replace",path:"",value:n.snapshot,oldValue:r.removed.map(function(a){return a.snapshot})},n);for(var i=r.removedCount-1;i>=0;i--)n.emitPatch({op:"remove",path:""+(r.index+i),oldValue:r.removed[i].snapshot},n);for(var i=0;i<r.addedCount;i++)n.emitPatch({op:"add",path:""+(r.index+i),value:r.added[i].snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var a=r.storedValue,o=n==="-"?a.length:Number(n);switch(i.op){case"replace":a[o]=i.value;break;case"add":a.splice(o,0,i.value);break;case"remove":a.splice(o,1);break}}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Ia(this,n);var i=r.storedValue;i.replace(n)}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;return P2(r)?v0(r.map(function(a,o){return i._subType.validate(a,O2(n,""+o,i._subType))})):Ln(n,r,"Value is not an array")}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return cu}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue.splice(Number(n),1)}}),t}(uu);Yh.prototype.applySnapshot=wr(Yh.prototype.applySnapshot);function kI(e){return new Yh("".concat(e.name,"[]"),e)}function D4(e,t,r,n,i){for(var a=!0,o=0;;o++){var l=o<=n.length-1,u=r[o],f=l?n[o]:void 0,v=""+i[o];if(rI(f)&&(f=f.storedValue),!u&&!l)break;if(!l)a=!1,r.splice(o,1),u instanceof kn&&u.createObservableInstanceIfNeeded(),u.die(),o--;else if(u)if(F4(u,f))r[o]=Sg(t,e,v,f,u);else{for(var _=void 0,h=o;h<r.length;h++)if(F4(r[h],f)){_=r.splice(h,1)[0];break}a=!1;var w=Sg(t,e,v,f,_);r.splice(o,0,w)}else{if(Mt(f)&&qe(f).parent===e)throw new Ue("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(v,"', but it lives already at '").concat(qe(f).path,"'"));a=!1;var w=Sg(t,e,v,f);r.splice(o,0,w)}}return a?null:r}function Sg(e,t,r,n,i){Ia(e,n);function a(){if(Mt(n)){var l=qe(n);if(l.assertAlive(fu),l.parent!==null&&l.parent===t)return l.setParent(t,r),l}return i?e.reconcile(i,n,t,r):e.instantiate(t,r,void 0,n)}var o=a();return i&&i!==o&&(i instanceof kn&&i.createObservableInstanceIfNeeded(),i.die()),o}function F4(e,t){if(!e.isAlive)return!1;if(Mt(t)){var r=qe(t);return r.isAlive&&r===e}if(e.snapshot===t)return!0;if(!(e instanceof kn))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&gl(t)&&n.is(t)&&n.isMatchingSnapshotId(e,t)}function RI(e){return an(e)&&(e.flags&ut.Array)>0}var j4="preProcessSnapshot",z4="postProcessSnapshot";function LI(){return qe(this).toString()}var B4={name:"AnonymousModel",properties:{},initializers:cu};function MI(e){var t=Object.keys(e),r=new Set;return t.forEach(function(n){if(r.has(n))throw new Ue("".concat(n," is declared twice in the model. Model should not contain the same keys"));r.add(n)}),t.reduce(function(n,i){if(i in Pr)throw new Ue("Hook '".concat(i,"' was defined as property. Hooks should be defined as part of the actions"));var a=Object.getOwnPropertyDescriptor(e,i);if("get"in a)throw new Ue("Getters are not supported as properties. Please use views instead");var o=a.value;if(o==null)throw new Ue("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(du(o))n[i]=bl(zI(o),o);else if(o instanceof Wh)n[i]=bl(o,{});else if(o instanceof Yh)n[i]=bl(o,[]);else if(!an(o))throw new Ue("Invalid type definition for property '".concat(i,"', cannot infer a type from a value like '").concat(o,"' (").concat(typeof o,")"));return n},Tr({},e))}var Jc=function(e){Gt(t,e);function t(r){var n=e.call(this,r.name||B4.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({name:i})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(i){return n.cloneAndEnhance({properties:i})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var a=n.preProcessor;return a?n.cloneAndEnhance({preProcessor:function(o){return a(i(o))}}):n.cloneAndEnhance({preProcessor:i})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(i){var a=n.postProcessor;return a?n.cloneAndEnhance({postProcessor:function(o){return i(a(o))}}):n.cloneAndEnhance({postProcessor:i})}}),Object.assign(n,B4,r),n.properties=MI(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(t.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=void 0;return this.forAllProps(function(n,i){if(i.flags&ut.Identifier){if(r)throw new Ue("Cannot define property '".concat(n,"' as object identifier, property '").concat(r,"' is already defined as identifier property"));r=n}}),r}}),Object.defineProperty(t.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return new t({name:r.name||this.name,properties:Object.assign({},this.properties,r.properties),initializers:this.initializers.concat(r.initializers||[]),preProcessor:r.preProcessor||this.preProcessor,postProcessor:r.postProcessor||this.postProcessor})}}),Object.defineProperty(t.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(a){return n.instantiateActions(a,r(a)),a};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!gl(n))throw new Ue("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(i){if(i===j4)throw new Ue("Cannot define action '".concat(j4,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(i===z4)throw new Ue("Cannot define action '".concat(z4,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var a=n[i],o=r[i];if(i in Pr&&o){var l=a;a=function(){o.apply(null,arguments),l.apply(null,arguments)}}var u=a.$mst_middleware,f=a.bind(n);f._isFlowAction=a._isFlowAction||!1,f.$mst_middleware=u;var v=Qc(r,i,f);n[i]=v,yl(r,i,v)})}}),Object.defineProperty(t.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;if(typeof r!="function")throw new Ue("You passed an ".concat(typeof r," to volatile state as an argument, when function is expected"));var i=function(a){return n.instantiateVolatileState(a,r(a)),a};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!gl(n))throw new Ue("volatile state initializer should return a plain object containing state");$y(r,n)}}),Object.defineProperty(t.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(a){var o=r(a),l=o.actions,u=o.views,f=o.state,v=aN(o,["actions","views","state"]);for(var w in v)throw new Ue("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(w,"'"));return f&&n.instantiateVolatileState(a,f),u&&n.instantiateViews(a,u),l&&n.instantiateActions(a,l),a};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=function(a){return n.instantiateViews(a,r(a)),a};return this.cloneAndEnhance({initializers:[i]})}}),Object.defineProperty(t.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(!gl(n))throw new Ue("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(i){var a,o=Object.getOwnPropertyDescriptor(n,i);if("get"in o)Vy(r,i,o),qy(r,(a={},a[i]=Ml,a));else if(typeof o.value=="function")yl(r,i,o.value);else throw new Ue("A view member should either be a function or getter based property")})}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=Mt(a)?a:this.applySnapshotPreProcessor(a);return x2(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){n===void 0&&(n={});var i=r.type,a={};return i.forAllProps(function(o,l){a[o]=l.instantiate(r,o,void 0,n[o])}),a}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=Tr(Tr({},m0),{name:this.name});return Ft.object(r,fu,n)}}),Object.defineProperty(t.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){yl(n,"toString",LI),this.forAllProps(function(i){Hy(n,i,r.unbox)}),this.initializers.reduce(function(i,a){return a(i)},n),yp(n,this.willChange),_p(n,this.didChange)}}),Object.defineProperty(t.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=qe(n.object),a=n.name;i.assertWritable({subpath:a});var o=i.type.properties[a];return o&&(Ia(o,n.newValue),n.newValue=o.reconcile(i.getChildNode(a),n.newValue,i,a)),n}}),Object.defineProperty(t.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r,i=qe(n.object),a=i.type.properties[n.name];if(a){var o=n.oldValue?n.oldValue.snapshot:void 0;i.emitPatch({op:"replace",path:ko(n.name),value:n.newValue.snapshot,oldValue:o},i)}}}),Object.defineProperty(t.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this,i=[];return this.forAllProps(function(a){i.push(n.getChildNode(r,a))}),i}}),Object.defineProperty(t.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i;if(!(n in this.properties))throw new Ue("Not a value property: "+n);var a=zi(r.storedValue,n),o=(i=a.raw)===null||i===void 0?void 0:i.call(a);if(!o)throw new Ue("Node not available for property "+n);return o}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this;n===void 0&&(n=!0);var a={};return this.forAllProps(function(o,l){try{var u=ca(r.storedValue,o);u.reportObserved()}catch{throw new Ue("".concat(o," property is declared twice"))}a[o]=i.getChildNode(r,o).snapshot}),n?this.applySnapshotPostProcessor(a):a}}),Object.defineProperty(t.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n={};return Object.keys(r).forEach(function(i){n[i]=r[i].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(t.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){if(!(i.op==="replace"||i.op==="add"))throw new Ue("object does not support operation ".concat(i.op));r.storedValue[n]=i.value}}),Object.defineProperty(t.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){Ia(this,n);var i=this.applySnapshotPreProcessor(n);this.forAllProps(function(a){r.storedValue[a]=i[a]})}}),Object.defineProperty(t.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.preProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.postProcessor;return n?n.call(null,r):r}}),Object.defineProperty(t.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.properties[r]}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,a=this.applySnapshotPreProcessor(r);return gl(a)?v0(this.propertyNames.map(function(o){return i.properties[o].validate(a[o],O2(n,o,i.properties[o]))})):Ln(n,a,"Value is not a plain object")}}),Object.defineProperty(t.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this;this.propertyNames.forEach(function(i){return r(i,n.properties[i])})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this;return"{ "+this.propertyNames.map(function(n){return n+": "+r.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(t.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return fu}}),Object.defineProperty(t.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){r.storedValue[n]=void 0}}),t}(uu);Jc.prototype.applySnapshot=wr(Jc.prototype.applySnapshot);function NI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new Jc({name:r,properties:n})}function II(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string",n=r?e[0]:"AnonymousModel";return r&&e.shift(),e.reduce(function(i,a){return i.cloneAndEnhance({name:i.name+"_"+a.name,properties:a.properties,initializers:a.initializers,preProcessor:function(o){return a.applySnapshotPreProcessor(i.applySnapshotPreProcessor(o))},postProcessor:function(o){return a.applySnapshotPostProcessor(i.applySnapshotPostProcessor(o))}})}).named(n)}function Z7(e){return an(e)&&(e.flags&ut.Object)>0}var Ya=function(e){Gt(t,e);function t(r,n,i,a){a===void 0&&(a=lI);var o=e.call(this,r)||this;return Object.defineProperty(o,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"checker",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(o,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:a}),o.flags=n,o}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return Ko(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.initializer(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(du(r)&&this.checker(r))return Rn();var i=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return Ln(n,r,"Value is not a ".concat(i))}}),t}(Yl),Q7=new Ya("string",ut.String,function(e){return typeof e=="string"}),J7=new Ya("number",ut.Number,function(e){return typeof e=="number"}),DI=new Ya("integer",ut.Integer,function(e){return sI(e)}),FI=new Ya("float",ut.Float,function(e){return uI(e)}),jI=new Ya("finite",ut.Finite,function(e){return cI(e)}),eS=new Ya("boolean",ut.Boolean,function(e){return typeof e=="boolean"}),tS=new Ya("null",ut.Null,function(e){return e===null}),rS=new Ya("undefined",ut.Undefined,function(e){return e===void 0}),nS=new Ya("Date",ut.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});nS.getSnapshot=function(e){return e.storedValue.getTime()};var iS=nS;function zI(e){switch(typeof e){case"string":return Q7;case"number":return J7;case"boolean":return eS;case"object":if(e instanceof Date)return iS}throw new Ue("Cannot determine primitive type from value "+e)}function aS(e){return an(e)&&(e.flags&(ut.String|ut.Number|ut.Integer|ut.Boolean|ut.Date))>0}var BI=function(e){Gt(t,e);function t(r){var n=e.call(this,JSON.stringify(r))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Literal}),n.value=r,n}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return Ko(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return du(r)&&r===this.value?Rn():Ln(n,r,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),t}(Yl);function oS(e){return new BI(e)}function UI(e){return an(e)&&(e.flags&ut.Literal)>0}var HI=function(e){Gt(t,e);function t(r,n,i,a){var o=e.call(this,r)||this;return Object.defineProperty(o,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(o,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(o,"_message",{enumerable:!0,configurable:!0,writable:!0,value:a}),o}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ut.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this._subtype.instantiate(r,n,i,a)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this._subtype.validate(r,n);if(i.length>0)return i;var a=Mt(r)?qe(r).snapshot:r;return this._predicate(a)?Rn():Ln(n,r,this._message(r))}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this._subtype.reconcile(r,n,i,a)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(Ua);function GI(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=typeof e[0]=="string"?e.shift():an(e[0])?e[0].name:null,n=e[0],i=e[1],a=e[2]?e[2]:function(o){return"Value does not respect the refinement predicate"};return new HI(r,n,i,a)}function $I(e){return(e.flags&ut.Refinement)>0}function VI(e,t){var r=typeof e=="string"?t:e,n=y0.apply(void 0,da([],fa(r.map(function(i){return oS(""+i)})),!1));return typeof e=="string"&&(n.name=e),n}var qI=function(e){Gt(t,e);function t(r,n,i){var a=e.call(this,r)||this;return Object.defineProperty(a,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(a,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),i=Tr({eager:!0,dispatcher:void 0},i),a._dispatcher=i.dispatcher,i.eager||(a._eager=!1),a}return Object.defineProperty(t.prototype,"flags",{get:function(){var r=ut.Union;return this._types.forEach(function(n){r|=n.flags}),r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._types.some(function(n){return n.isAssignableFrom(r)})}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(r){return r.describe()}).join(" | ")+")"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this.determineType(a,void 0);if(!o)throw new Ue("No matching type for union "+this.describe());return o.instantiate(r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this.determineType(n,r.getReconciliationType());if(!o)throw new Ue("No matching type for union "+this.describe());return o.reconcile(r,n,i,a)}}),Object.defineProperty(t.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this._dispatcher?this._dispatcher(r):n?n.is(r)?n:this._types.filter(function(i){return i!==n}).find(function(i){return i.is(r)}):this._types.find(function(i){return i.is(r)})}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this._dispatcher)return this._dispatcher(r).validate(r,n);for(var i=[],a=0,o=0;o<this._types.length;o++){var l=this._types[o],u=l.validate(r,n);if(u.length===0){if(this._eager)return Rn();a++}else i.push(u)}return a===1?Rn():Ln(n,r,"No type is applicable for the union").concat(v0(i))}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),t}(Ua);function y0(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=an(e)?void 0:e,i=an(e)?da([e],fa(t),!1):t,a="("+i.map(function(o){return o.name}).join(" | ")+")";return new qI(a,i,n)}function lS(e){return(e.flags&ut.Union)>0}var WI=function(e){Gt(t,e);function t(r,n,i){var a=e.call(this,r.name)||this;return Object.defineProperty(a,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(a,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:i}),a}return Object.defineProperty(t.prototype,"flags",{get:function(){return this._subtype.flags|ut.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(this.optionalValues.indexOf(a)>=0){var o=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(r,n,i,o)}return this._subtype.instantiate(r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this._subtype.reconcile(r,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),i,a)}}),Object.defineProperty(t.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&Ia(this,r),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.optionalValues.indexOf(r)>=0?Rn():this._subtype.validate(r,n)}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this._subtype.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),t}(Ua);function YI(e,t){if(typeof t!="function"&&Mt(t))throw new Ue("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function bl(e,t,r){return YI(e,t),new WI(e,t,r||KI)}var KI=[void 0];function XI(e){return an(e)&&(e.flags&ut.Optional)>0}var ZI=bl(rS,void 0),QI=bl(tS,null);function sS(e){return y0(e,ZI)}function JI(e){return y0(e,QI)}var eD=function(e){Gt(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),i}return Object.defineProperty(t.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|ut.Late},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(!this._subType){var n=void 0;try{n=this._definition()}catch(i){if(i instanceof ReferenceError)n=void 0;else throw i}if(r&&n===void 0)throw new Ue("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this.getSubType(!0).instantiate(r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this.getSubType(!0).reconcile(r,n,i,a)}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r?r.name:"<uknown late type>"}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this.getSubType(!1);return i?i.validate(r,n):Rn()}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=this.getSubType(!1);return n?n.isAssignableFrom(r):!1}}),Object.defineProperty(t.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var r=this.getSubType(!1);return r||A7}}),t}(Ua);function tD(e,t){var r=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?t:e;return new eD(r,n)}function rD(e){return an(e)&&(e.flags&ut.Late)>0}function nD(e,t){return new iD(e,t)}var iD=function(e){Gt(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Lazy}),Object.defineProperty(i,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(i,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:Ft.array()}),wm(function(){return i.pendingNodeList.length>0&&i.pendingNodeList.some(function(a){return a.isAlive&&i.options.shouldLoadPredicate(a.parent?a.parent.value:null)})},function(){i.options.loadType().then(wr(function(a){i.loadedType=a,i.pendingNodeList.forEach(function(o){o.parent&&i.loadedType&&o.parent.applyPatches([{op:"replace",path:"/".concat(o.subpath),value:o.snapshot}])})}))}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this;if(this.loadedType)return this.loadedType.instantiate(r,n,i,a);var l=Ko(this,r,n,i,a);return this.pendingNodeList.push(l),wm(function(){return!l.isAlive},function(){return o.pendingNodeList.splice(o.pendingNodeList.indexOf(l),1)}),l}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return this.loadedType?this.loadedType.validate(r,n):$7(r)?Rn():Ln(n,r,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return this.loadedType?(r.die(),this.loadedType.instantiate(i,a,i.environment,n)):e.prototype.reconcile.call(this,r,n,i,a)}}),t}(Yl),uS=function(e){Gt(t,e);function t(r){var n=e.call(this,r?"frozen(".concat(r.name,")"):"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Frozen}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){return Ko(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return $7(r)?this.subType?this.subType.validate(r,n):Rn():Ln(n,r,"Value is not serializable and cannot be frozen")}}),t}(Yl),U4=new uS;function aD(e){return arguments.length===0?U4:an(e)?new uS(e):bl(U4,e)}function oD(e){return an(e)&&(e.flags&ut.Frozen)>0}function lD(e){switch(e){case Pr.beforeDestroy:return"destroy";case Pr.beforeDetach:return"detach";default:return}}var sD=function(){function e(t,r){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),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}),A2(t))this.identifier=t;else if(Mt(t)){var n=qe(t);if(!n.identifierAttribute)throw new Ue("Can only store references with a defined identifier attribute.");var i=n.unnormalizedIdentifier;if(i==null)throw new Ue("Can only store references to tree nodes with a defined identifier.");this.identifier=i}else throw new Ue("Can only store references to tree nodes or identifiers, got: '".concat(t,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var r=Pu(this.identifier),n=t.root,i=n.identifierCache.getLastCacheModificationPerId(r);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==i){var a=this.targetType,o=n.identifierCache.resolve(a,r);if(!o)throw new T2("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(t.path,")"));this.resolvedReference={node:o,lastCacheModification:i}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),T2=function(e){Gt(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error),cS=function(e){Gt(t,e);function t(r,n){var i=e.call(this,"reference(".concat(r.name,")"))||this;return Object.defineProperty(i,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(i,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Reference}),i}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.targetType.isAssignableFrom(r)}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return A2(r)?Rn():Ln(n,r,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(t.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=n.parent;if(!(!o||!o.isAlive)){var l=o.storedValue;l&&this.onInvalidated({cause:r,parent:l,invalidTarget:a?a.storedValue:void 0,invalidId:i,replaceRef:function(u){su(n.root.storedValue,{op:"replace",value:u,path:n.path})},removeRef:function(){Z7(o.type)?this.replaceRef(void 0):su(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(t.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){var i=this,a=this.getValue(r);if(a){var o=qe(a),l=function(v,w){var _=lD(w);_&&i.fireInvalidated(_,r,n,o)},u=o.registerHook(Pr.beforeDetach,l),f=o.registerHook(Pr.beforeDestroy,l);return function(){u(),f()}}}}),Object.defineProperty(t.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i){var a=this;if(this.onInvalidated){var o;r.registerHook(Pr.beforeDestroy,function(){o&&o()});var l=function(u){o&&o();var f=r.parent,v=f&&f.storedValue;if(f&&f.isAlive&&v){var w=void 0;i?w=!!i.get(n,v):w=r.root.identifierCache.has(a.targetType,Pu(n)),w?o=a.addTargetNodeWatcher(r,n):u||a.fireInvalidated("invalidSnapshotReference",r,n,null)}};r.state===Vr.FINALIZED?l(!0):(r.isRoot||r.root.registerHook(Pr.afterCreationFinalization,function(){r.parent&&r.parent.createObservableInstanceIfNeeded()}),r.registerHook(Pr.afterAttach,function(){l(!1)}))}}}),t}(Yl),uD=function(e){Gt(t,e);function t(r,n){return e.call(this,r,n)||this}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=r.storedValue;return n.resolvedValue}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){var n=r.storedValue;return n.identifier}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=Mt(a)?E7(a):a,l=new sD(a,this.targetType),u=Ko(this,r,n,i,l);return l.node=u,this.watchTargetNodeForInvalidations(u,o,void 0),u}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(!r.isDetaching&&r.type===this){var o=Mt(n),l=r.storedValue;if(!o&&l.identifier===n||o&&l.resolvedValue===n)return r.setParent(i,a),r}var u=this.instantiate(i,a,void 0,n);return r.die(),u}}),t}(cS),cD=function(e){Gt(t,e);function t(r,n,i){var a=e.call(this,r,i)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),a}return Object.defineProperty(t.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(r){if(r.isAlive){var n=this.options.get(r.storedValue,r.parent?r.parent.storedValue:null);return n}}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=Mt(a)?this.options.set(a,r?r.storedValue:null):a,l=Ko(this,r,n,i,o);return this.watchTargetNodeForInvalidations(l,o,this.options),l}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=Mt(n)?this.options.set(n,r?r.storedValue:null):n;if(!r.isDetaching&&r.type===this&&r.storedValue===o)return r.setParent(i,a),r;var l=this.instantiate(i,a,void 0,o);return r.die(),l}}),t}(cS);function fS(e,t){var r=t||void 0,n=t?t.onInvalidated:void 0;return r&&(r.get||r.set)?new cD(e,{get:r.get,set:r.set},n):new uD(e,n)}function fD(e){return(e.flags&ut.Reference)>0}function dD(e,t){var r=fS(e,Tr(Tr({},t),{onInvalidated:function(n){t&&t.onInvalidated&&t.onInvalidated(n),n.removeRef()}}));return t&&t.acceptsUndefined===!1?r:sS(r)}var dS=function(e){Gt(t,e);function t(r,n){var i=e.call(this,r)||this;return Object.defineProperty(i,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(i,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Identifier}),i}return Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(!r||!(r.type instanceof Jc))throw new Ue("Identifier types can only be instantiated as direct child of a model type");return Ko(this,r,n,i,a)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){if(r.storedValue!==n)throw new Ue("Tried to change identifier from '".concat(r.storedValue,"' to '").concat(n,"'. Changing identifiers is not allowed."));return r.setParent(i,a),r}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){return typeof r!==this.validType?Ln(n,r,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):Rn()}}),t}(Yl),hD=function(e){Gt(t,e);function t(){var r=e.call(this,"identifier","string")||this;return Object.defineProperty(r,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Identifier}),r}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),t}(dS),pD=function(e){Gt(t,e);function t(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return r.storedValue}}),Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),t}(dS),gD=new hD,vD=new pD;function mD(e){return an(e)&&(e.flags&ut.Identifier)>0}function Pu(e){return""+e}function A2(e){return typeof e=="string"||typeof e=="number"}function yD(e){return new bD(e)}var bD=function(e){Gt(t,e);function t(r){var n=e.call(this,r.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:ut.Custom}),n}return Object.defineProperty(t.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(t.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n){if(this.options.isTargetType(r))return Rn();var i=this.options.getValidationMessage(r);return i?Ln(n,r,"Invalid value for type '".concat(this.name,"': ").concat(i)):Rn()}}),Object.defineProperty(t.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(r){return this.options.toSnapshot(r.storedValue)}}),Object.defineProperty(t.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=this.options.isTargetType(a)?a:this.options.fromSnapshot(a,r&&r.root.environment);return Ko(this,r,n,i,o)}}),Object.defineProperty(t.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(r,n,i,a){var o=!this.options.isTargetType(n);if(!r.isDetaching){var l=r.type===this&&(o?n===r.snapshot:n===r.storedValue);if(l)return r.setParent(i,a),r}var u=o?this.options.fromSnapshot(n,i.root.environment):n,f=this.instantiate(i,a,void 0,u);return r.die(),f}}),t}(Yl),H4={enumeration:VI,model:NI,compose:II,custom:yD,reference:fS,safeReference:dD,union:y0,optional:bl,literal:oS,maybe:sS,maybeNull:JI,refinement:GI,string:Q7,boolean:eS,number:J7,integer:DI,float:FI,finite:jI,Date:iS,map:TI,array:kI,frozen:aD,identifier:gD,identifierNumber:vD,late:tD,lazy:nD,undefined:rS,null:tS,snapshotProcessor:PI};const _D=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:PN,addMiddleware:N7,applyAction:k7,applyPatch:su,applySnapshot:_7,cast:kN,castFlowReturn:vI,castToReferenceSnapshot:LN,castToSnapshot:RN,clone:EN,createActionTrackingMiddleware:FN,createActionTrackingMiddleware2:zN,decorate:VN,destroy:xN,detach:ON,escapeJsonPath:ko,flow:Y7,getChildType:oN,getEnv:CN,getIdentifier:E7,getLivelinessChecking:m7,getMembers:AN,getNodeId:MN,getParent:hN,getParentOfType:gN,getPath:S7,getPathParts:vN,getPropertyMembers:P7,getRelativePath:SN,getRoot:w7,getRunningActionContext:E2,getSnapshot:_2,getType:Pf,hasEnv:TN,hasParent:dN,hasParentOfType:pN,isActionContextChildOf:YN,isActionContextThisOrChildOf:KN,isAlive:w2,isArrayType:RI,isFrozenType:oD,isIdentifierType:mD,isLateType:rD,isLiteralType:UI,isMapType:AI,isModelType:Z7,isOptionalType:XI,isPrimitiveType:aS,isProtected:fN,isReferenceType:fD,isRefinementType:$I,isRoot:mN,isStateTreeNode:Mt,isType:an,isUnionType:lS,isValidReference:wN,joinJsonPath:qh,onAction:R7,onPatch:b7,onSnapshot:lN,process:aI,protect:uN,recordActions:GN,recordPatches:sN,resolveIdentifier:bN,resolvePath:yN,setLivelinessChecking:v7,setLivelynessChecking:iN,splitJsonPath:hu,t:H4,toGenerator:yI,toGeneratorFunction:mI,tryReference:_N,tryResolve:O7,typecheck:F7,types:H4,unescapeJsonPath:K7,unprotect:cN,walk:x7},Symbol.toStringTag,{value:"Module"})),$i=Do(_D);(function(e){var t=we&&we.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.usePrevious=e.getLineHeight=e.useFontLoader=e.getDir=e.isRTLText=void 0;const r=t(at),n=Ui,i=Wa,a=Ef,o=ha,l=t(Gi),u=nN,f=Of,v=ua,w=xu,_=hi,h=b2,E=xf,m=ql,y=Wl,p=Yo,g=$i;l.default._fixTextRendering=!0;const d=document.createElement("style");d.type="text/css",document.head.appendChild(d);const b={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function O(N){var H="֑-߿יִ-﷽ﹰ-ﻼ";return new RegExp("^[^"+H+"]*?["+H+"]").test(N)}function k(N){N=N.replace(/\s/g,"");let H=0;for(var R=0;R<N.length;R++)O(N[R])&&(H+=1);return H>N.length/2}function C(N){return k(N)?"rtl":"ltr"}e.isRTLText=k,e.getDir=C;const S=(0,n.observer)(({textNodeRef:N,element:H,onBlur:R,selectAll:D,cursorPosition:z})=>{const[F,V]=r.default.useState(b),Y=N.current;r.default.useLayoutEffect(()=>{const Q={};Q.width=Y.width()-2*Y.padding()+"px",Q.height=Y.height()-2*Y.padding()+Y.fontSize()*Y.lineHeight()+"px",Q.fontSize=Y.fontSize()+"px",Q.lineHeight=Y.lineHeight()+.01,Q.fontFamily=Y.fontFamily(),Q.textAlign=Y.align(),Q.color=Y.fill(),Q.fontWeight=H.fontWeight,Q.fontStyle=H.fontStyle,Q.letterSpacing=H.letterSpacing+"em";const te=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${F.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;d.innerHTML="",d.appendChild(document.createTextNode(te)),JSON.stringify(Q)!==JSON.stringify(F)&&V(Q)});const q=r.default.useRef(null);r.default.useEffect(()=>{const Q=setTimeout(()=>{var te;const ee=q.current;if(!ee)return;(te=q.current)===null||te===void 0||te.focus();const ae=z||ee.value.length;ee.selectionStart=ee.selectionEnd=ae,D&&(ee==null||ee.select(),document.execCommand("selectAll",!1,null))});return()=>{clearTimeout(Q)}},[]),r.default.useEffect(()=>{window.addEventListener("blur",R);const Q=te=>{var ee;!((ee=q.current)===null||ee===void 0)&&ee.contains(te.target)||R()};return window.addEventListener("touchstart",Q),()=>{window.removeEventListener("blur",R),window.removeEventListener("touchstart",Q)}},[]);let G=0;const K=Y.textArr.length*Y.lineHeight()*Y.fontSize();H.verticalAlign==="middle"&&(G=(H.a.height-K)/2),H.verticalAlign==="bottom"&&(G=H.a.height-K);const X=(0,h.removeTags)(H.text);return r.default.createElement(a.Html,null,r.default.createElement("textarea",{className:"polotno-input",ref:q,dir:C(X),style:Object.assign(Object.assign(Object.assign({},b),F),{paddingTop:G+"px"}),value:X,onChange:Q=>{H.set({text:Q.target.value})},placeholder:H.placeholder,onBlur:R}))}),x=N=>{const[H,R]=r.default.useState(!1),D=r.default.useRef(!1);return r.default.useEffect(()=>{var z=!0;return setTimeout(()=>{z&&(N._editModeEnabled&&(D.current=!0),R(!0),setTimeout(()=>{D.current=!1},50))},50),()=>{z=!1}},[]),{editorEnabled:H&&N._editModeEnabled,selectAll:D.current}},P=(N,H)=>{const[R,D]=r.default.useReducer(F=>F+1,0),z=r.default.useRef((0,w.isFontLoaded)(H));return r.default.useLayoutEffect(()=>{if(z.current=(0,w.isFontLoaded)(H),z.current)return;let F=!0;return(async()=>{z.current=!1,D();const V=(0,v.incrementLoader)(`text ${H}`);await N.loadFont(H),setTimeout(V,100),F&&(z.current=!0,D())})(),()=>{F=!1}},[H]),[z.current]};e.useFontLoader=P;const T=({fontLoaded:N,fontFamily:H,fontSize:R,lineHeight:D})=>r.default.useMemo(()=>{if(typeof D=="number")return D;const z=document.createElement("div");z.style.fontFamily=H,z.style.fontSize=R+"px",z.style.lineHeight=D,z.innerText="Test text",document.body.appendChild(z);const F=z.offsetHeight;return document.body.removeChild(z),F/R},[N,H,R,D]);function L(N){var H=N.getAbsoluteTransform().copy();H.invert();var R=N.getStage().getPointerPosition();return H.point(R)}function M(N){var H;const R=N.target,D=L(R),z=R.textArr,F=Math.floor(D.y/(R.fontSize()*R.lineHeight())),V=z.slice(0,F).reduce((G,K)=>G+K.text.length,F),Y=(H=z[F])!==null&&H!==void 0?H:z[0];let q=0;return R.align()==="right"?q=R.width()-Y.width:R.align()==="center"&&(q=R.width()/2-Y.width/2),V+Math.round((D.x-q)/Y.width*Y.text.length)}function U(N){const H=r.default.useRef(N),R=r.default.useRef(N);return r.default.useMemo(()=>{R.current=H.current,H.current=N},[N]),R.current}function $(N){return/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(N)}function Z(N,H){const R=N.fontSize(),D=N.height(),z=(0,h.removeTags)(H.text);let F=H.a.fontSize;N.height(void 0);const V=Math.round(2*H.a.fontSize)-1;for(let Y=1;Y<V;Y++){const q=H.a.height&&N.height()>H.a.height;let G=z.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((Q,te)=>$(te)?Q.concat(te.split("")):Q.concat(te),[]),K=N.textArr.map(Q=>Q.text).join(";");const X=G.find(Q=>!K.includes(Q)||(K=K.replace(Q,""),!1));if(!(q||X))break;F-=.5,N.fontSize(F)}return N.fontSize(R),N.height(D),F}function B({lines:N,lineHeight:H,width:R,align:D="left",padding:z=0,cornerRadius:F=0}){var V;N.forEach((K,X)=>{K.cx=R/2,D==="right"?K.cx=R-K.width/2:D==="left"&&(K.cx=K.width/2),D!=="justify"||K.lastInParagraph||(K.width=R),D==="justify"&&(K.cx=K.width/2)});let Y=`M ${(V=N[0])===null||V===void 0?void 0:V.cx} ${-z}`;N.forEach((K,X)=>{const{cx:Q}=K,te=N[X-1];te&&te.width>K.width?Y+=` L ${Q+K.width/2+z} ${X*H+z}`:Y+=` L ${Q+K.width/2+z} ${X*H-z}`;const ee=N[X+1];ee&&ee.width>K.width?Y+=` L ${Q+K.width/2+z} ${(X+1)*H-z}`:Y+=` L ${Q+K.width/2+z} ${(X+1)*H+z}`});for(var q=N.length-1;q>=0;q--){const K=N[q],{cx:X}=K,Q=N[q+1];Q&&Q.width>K.width?Y+=` L ${X-K.width/2-z} ${(q+1)*H-z}`:Y+=` L ${X-K.width/2-z} ${(q+1)*H+z}`;const te=N[q-1];te&&te.width>K.width?Y+=` L ${X-K.width/2-z} ${q*H+z}`:Y+=` L ${X-K.width/2-z} ${q*H-z}`}Y+=" Z";const G=(0,u.parsePath)(Y);return(0,u.roundCommands)(G,F).path}e.getLineHeight=T,e.usePrevious=U,e.TextElement=(0,n.observer)(({element:N,store:H})=>{const R=r.default.useRef(null),D=r.default.useRef(null),{editorEnabled:z,selectAll:F}=x(N),[V,Y]=r.default.useState(!1),[q,G]=r.default.useState(!1),K=r.default.useRef(N.a.height),X=H.selectedElements.indexOf(N)>=0,{textVerticalResizeEnabled:Q}=_.flags,te=U(N.fontFamily),[ee,ae]=r.default.useState([]);r.default.useEffect(()=>{var Ee,ke;const Ze=(ke=(Ee=R.current)===null||Ee===void 0?void 0:Ee.textArr)!==null&&ke!==void 0?ke:[];JSON.stringify(Ze)!==JSON.stringify(ee)&&ae(Ze)}),r.default.useEffect(()=>{if(N.a.width)return;const Ee=R.current;Ee.width(600),N.set({width:1.4*Ee.getTextWidth()})},[]),r.default.useLayoutEffect(()=>(0,o.autorun)(()=>{const Ee=R.current;(0,E.applyFilter)(Ee,N)}));const[oe]=(0,e.useFontLoader)(H,N.fontFamily),le=(0,h.removeTags)(N.text),Te=()=>{const Ee=R.current.clone({height:void 0}),ke=Math.ceil(Ee.fontSize()*Ee.lineHeight()*Ee.textArr.length+1);return Ee.destroy(),ke};r.default.useLayoutEffect(()=>{if(!oe)return;const{textOverflow:Ee}=_.flags;if(N.a.height)if(Ee!=="change-font-size"||q||H.isPlaying){if(Ee==="resize"){const ke=Te();Q&&N.a.height<ke&&H.history.ignore(()=>{var Ze;(0,g.isAlive)(N)&&N.set({height:ke}),(Ze=R.current)===null||Ze===void 0||Ze.height(ke)},!1,!0),Q||N.a.height===ke||H.history.ignore(()=>{var Ze;(0,g.isAlive)(N)&&N.set({height:ke}),(Ze=R.current)===null||Ze===void 0||Ze.height(ke)},!1,!0)}}else{const ke=Z(R.current,N);if(ke!==N.a.fontSize)return void H.history.ignore(()=>{N.set({fontSize:ke})},!1,!0);const Ze=Te();N.a.height===Ze||Q||H.history.ignore(()=>{N.set({height:Ze})},!1,!0)}else{const ke=Te();H.history.ignore(()=>{N.set({height:ke})},!1,!0)}}),r.default.useLayoutEffect(()=>{const Ee=R.current;Ee&&(Ee.width(Ee.width()+1e-8),Ee._setTextData(),(0,E.applyFilter)(Ee,N))},[oe]);const Fe=r.default.useRef(null),fe=r.default.useRef(0),ne=Ee=>{Ee.evt.preventDefault(),H.selectedShapes.find(Ze=>Ze===N)&&N.contentEditable&&(fe.current=M(Ee),N.toggleEditMode())},ge=!le&&N.placeholder?.6:N.a.opacity;(0,m.useFadeIn)(R,ge);const pe=(0,e.getLineHeight)({fontLoaded:oe,fontFamily:N.fontFamily,fontSize:N.a.fontSize,lineHeight:N.lineHeight}),re=N.selectable||H.role==="admin",de=(0,f.useColor)(N),be=r.default.useMemo(()=>N.backgroundEnabled?B({lines:JSON.parse(JSON.stringify(ee)),cornerRadius:N.backgroundCornerRadius*(N.a.fontSize*pe*.5),lineHeight:pe*N.a.fontSize,padding:N.backgroundPadding*(N.a.fontSize*pe*.5),width:N.a.width,align:N.align}):"",[N.backgroundEnabled,N.backgroundCornerRadius,N.a.fontSize,pe,N.backgroundPadding,N.a.width,N.align,ee]),ye=(0,p.useMobile)();let Ie=0;return N.verticalAlign==="middle"?Ie=(N.a.height-ee.length*pe*N.a.fontSize)/2:N.verticalAlign==="bottom"&&(Ie=N.a.height-ee.length*pe*N.a.fontSize),r.default.createElement(r.default.Fragment,null,r.default.createElement(i.Path,{ref:D,x:N.a.x,y:N.a.y,rotation:N.a.rotation,hideInExport:!N.showInExport,listening:!1,visible:N.backgroundEnabled,opacity:N.backgroundOpacity*ge,data:be,fill:N.backgroundColor,offsetY:-Ie}),r.default.createElement(i.Text,Object.assign({ref:R,id:N.id,name:"element",hideInExport:!N.showInExport,editModeEnabled:N._editModeEnabled,x:N.a.x,y:N.a.y,rotation:N.a.rotation,width:N.a.width,height:N.a.height,text:le||N.placeholder},de,{stroke:N.stroke,lineJoin:"round",strokeWidth:N.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:N.a.fontSize,fontFamily:`"${N.fontFamily}", "${te}"`,fontStyle:N.fontStyle+" "+N.fontWeight,textDecoration:N.textDecoration,align:N.align,verticalAlign:N.verticalAlign,draggable:ye?N.draggable&&X:N.draggable,preventDefault:!ye||X,opacity:ge,visible:!N._editModeEnabled,ellipsis:_.flags.textOverflow==="ellipsis",shadowEnabled:N.shadowEnabled,shadowBlur:N.shadowBlur,shadowOffsetX:N.shadowOffsetX,shadowOffsetY:N.shadowOffsetY,shadowColor:N.shadowColor,shadowOpacity:N.shadowOpacity,lineHeight:pe,letterSpacing:N.letterSpacing*N.a.fontSize,listening:re,onDragMove:Ee=>{N.set({x:Ee.target.x(),y:Ee.target.y()})},onDragEnd:Ee=>{N.set({x:Ee.target.x(),y:Ee.target.y()})},onMouseEnter:()=>{Y(!0)},onMouseLeave:()=>{Y(!1)},onClick:ne,onTap:ne,onTransformStart:()=>{G(!0),K.current=R.current.height()},onTransform:Ee=>{var ke,Ze;const We=Ee.target;(ke=D.current)===null||ke===void 0||ke.setAttrs({x:We.x(),y:We.y(),rotation:We.rotation(),scale:We.scale()});const dt=((Ze=We.getStage())===null||Ze===void 0?void 0:Ze.findOne("Transformer")).getActiveAnchor();if(dt==="middle-left"||dt==="middle-right"){const Bt=We.scaleX(),ue=We.width()*Bt,he=N.a.fontSize;let nt=ue;ue<he&&(nt=he,Fe.current&&We.position(Fe.current)),We.width(nt),We.scaleX(1),We.scaleY(1);const Oe=Te();if(_.flags.textOverflow!=="ellipsis"){const je=Math.max(Oe,K.current);We.height(je),N.set({height:We.height()})}N.set({x:We.x(),y:We.y(),width:We.width(),rotation:We.rotation()}),(0,E.applyFilter)(We,N)}if(dt==="top-center"||dt==="bottom-center"){let Bt=_.flags.textOverflow==="resize"?Te():pe*N.a.fontSize;Ee.target.height(Math.max(Bt,Ee.target.height()*Ee.target.scaleY())),Ee.target.scaleY(1)}Fe.current=Ee.target.position()},onTransformEnd:Ee=>{var ke;const Ze=Ee.target.scaleX();Ee.target.scaleX(1),Ee.target.scaleY(1),N.set({fontSize:Math.round(N.a.fontSize*Ze),width:Math.ceil(Ee.target.width()*Ze),x:Ee.target.x(),y:Ee.target.y(),rotation:Ee.target.rotation(),height:Ee.target.height()*Ze,shadowBlur:N.shadowBlur*Ze,shadowOffsetX:N.shadowOffsetX*Ze,shadowOffsetY:N.shadowOffsetY*Ze,strokeWidth:N.strokeWidth*Ze}),(ke=D.current)===null||ke===void 0||ke.setAttrs({scaleX:1,scaleY:1}),G(!1)}})),z&&r.default.createElement(i.Group,{x:N.a.x,y:N.a.y,rotation:N.a.rotation},r.default.createElement(S,{textNodeRef:R,element:N,selectAll:F,cursorPosition:fe.current,onBlur:()=>{N.toggleEditMode(!1)}})),!q&&(V||X)&&r.default.createElement(y.Highlighter,{element:N}))})})(v2);var k2={},Cu={};(function(e){var t=we&&we.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.replaceColors=e.sameColors=e.fixSize=e.getSvgSize=e.svgToURL=e.getColors=e.urlToString=e.urlToBase64=void 0;const r=t(Gi),n=t(at),i=m2;function a(d){for(;d.parentNode;){if(d.nodeName==="defs")return!0;d=d.parentNode}return!1}function o(d){const b={fill:"",stroke:""};if(d.getAttribute("fill")&&d.getAttribute("fill")!=="none"&&(b.fill=d.getAttribute("fill")),!b.fill&&d.style.fill&&d.style.fill!=="none"&&(b.fill=d.style.fill),d.getAttribute("stroke")&&(b.stroke=d.getAttribute("stroke")),!b.stroke&&d.style.stroke&&(b.stroke=d.style.stroke),!b.stroke&&!b.fill){const O=d.ownerSVGElement,k=O&&O!==d&&o(O);(k==null?void 0:k.fill)==="currentColor"||(k==null?void 0:k.stroke)==="currentColor"||(b.fill="black")}return b}const l=["path","rect","circle"];function u(d){for(var b=[],O=d.getElementsByTagName("*"),k=0,C=O.length;k<C;k++){const S=O[k];a(S)||(S.getAttribute("fill")!==null&&b.push(S),(S.getAttribute("stroke")!==null||S.style&&S.style.fill||l.indexOf(S.nodeName)>=0)&&b.push(S))}return b}async function f(d){const b=await fetch(d);return _(await b.text())}async function v(d){return await(await fetch(d,{mode:"cors"})).text()}function w(d){const b=u(new DOMParser().parseFromString(d,"image/svg+xml")),O=[];return b.forEach(k=>{const{fill:C,stroke:S}=o(k);[C,S].forEach(x=>{x&&(x==="currentColor"&&(x="black"),r.default.Util.colorToRGBA(x)&&O.indexOf(x)===-1&&O.push(x))})}),O}function _(d){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(d)))}async function h(d){const b=await v(d),O=new DOMParser().parseFromString(b,"image/svg+xml").documentElement.getAttribute("viewBox"),[k,C,S,x]=(O==null?void 0:O.split(" "))||[];return{width:parseFloat(S),height:parseFloat(x)}}function E(d){var b=new DOMParser().parseFromString(d,"image/svg+xml");const O=b.documentElement.getAttribute("viewBox"),[k,C,S,x]=(O==null?void 0:O.split(" "))||[],P=b.documentElement.getAttribute("width");!P&&b.documentElement.setAttribute("width",S+"px");const T=b.documentElement.getAttribute("height");if((!T||T.indexOf("%")>=0)&&b.documentElement.setAttribute("height",x+"px"),P&&P.indexOf("%")>=0&&T&&T.indexOf("%")===-1){const L=parseFloat(T)/parseFloat(x);b.documentElement.setAttribute("width",L*parseFloat(S)+"px")}if(T&&T.indexOf("%")>=0&&P&&P.indexOf("%")===-1){const L=parseFloat(P)/parseFloat(S);b.documentElement.setAttribute("height",L*parseFloat(x)+"px")}return P==="100%"&&T==="100%"&&(b.documentElement.setAttribute("width",S+"px"),b.documentElement.setAttribute("height",x+"px")),new XMLSerializer().serializeToString(b)}e.urlToBase64=f,e.urlToString=v,e.getColors=w,e.svgToURL=_,e.getSvgSize=h,e.fixSize=E;const m=(d,b)=>{if(!d||!b)return!1;if(b==="currentColor"&&d==="black")return!0;const O=r.default.Util.colorToRGBA(d),k=r.default.Util.colorToRGBA(b);return O&&k?O.r===k.r&&O.g===k.g&&O.b===k.b&&O.a===k.a:void 0};function y(d,b,O,k){var C=d.namespaceURI,S=document.createElementNS(C,"linearGradient");const x=r.default.Util.degToRad(O+90),P=(Math.cos(x)+1)/2,T=(Math.sin(x)+1)/2,L=(Math.cos(x+Math.PI)+1)/2,M=(Math.sin(x+Math.PI)+1)/2;S.setAttribute("x1",100*P+"%"),S.setAttribute("y1",100*T+"%"),S.setAttribute("x2",100*L+"%"),S.setAttribute("y2",100*M+"%"),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("id",b);for(var U=0;U<k.length;U++){var $=k[U],Z=document.createElementNS(C,"stop");for(var B in $)$.hasOwnProperty(B)&&Z.setAttribute(B,$[B]);S.appendChild(Z)}return(d.querySelector("defs")||d.insertBefore(document.createElementNS(C,"defs"),d.firstChild)).appendChild(S)}function p(d,b){var O=new DOMParser().parseFromString(d,"image/svg+xml");const k=u(O),C=Array.from(b.keys());return k.forEach(S=>{const{fill:x,stroke:P}=o(S);[{prop:"fill",color:x},{prop:"stroke",color:P}].forEach(({prop:T,color:L})=>{const M=C.find(U=>(0,e.sameColors)(U,L));if(M){const U=b.get(M);if((0,i.isGradient)(U)){const{rotation:$,stops:Z}=(0,i.parseColor)(U),B=Z.map(H=>({offset:100*H.offset+"%","stop-color":H.color})),N="color"+Math.round(1e8*Math.random());y(O.children[0],N,$,B),S.style[T]=null,S.setAttribute(T,`url('#${N}')`)}else S.style[T]=b.get(M)}})}),_(new XMLSerializer().serializeToString(O))}e.sameColors=m,e.replaceColors=p;const g=d=>{const[b,O]=n.default.useState([]);return n.default.useEffect(()=>{let k=!1;return(async()=>{O([]);const C=w(await v(d));k||O(C)})(),()=>{k=!0}},[d]),b};e.useSvgColors=g})(Cu);(function(e){var t=we&&we.__createBinding||(Object.create?function(F,V,Y,q){q===void 0&&(q=Y);var G=Object.getOwnPropertyDescriptor(V,Y);G&&!("get"in G?!V.__esModule:G.writable||G.configurable)||(G={enumerable:!0,get:function(){return V[Y]}}),Object.defineProperty(F,q,G)}:function(F,V,Y,q){q===void 0&&(q=Y),F[q]=V[Y]}),r=we&&we.__setModuleDefault||(Object.create?function(F,V){Object.defineProperty(F,"default",{enumerable:!0,value:V})}:function(F,V){F.default=V}),n=we&&we.__importStar||function(F){if(F&&F.__esModule)return F;var V={};if(F!=null)for(var Y in F)Y!=="default"&&Object.prototype.hasOwnProperty.call(F,Y)&&t(V,F,Y);return r(V,F),V},i=we&&we.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=void 0;const a=i(at),o=Ui,l=ha,u=Wa,f=i(g0),v=i(Gi),w=Ef,_=Wl,h=ua,E=n(Cu),m=hi,y=xf,p=ql,g=Yo;function d(){return document.createElement("canvas")}async function b(F){if(!(F.indexOf("data:image/svg+xml")>=0||F.indexOf(".svg")>=0))return F;const V=await E.urlToString(F),Y=E.fixSize(V);return E.svgToURL(Y)}const O=F=>{const[V,Y]=a.default.useState(F);return a.default.useEffect(()=>{(async()=>{const q=await b(F);q!==V&&Y(q)})()},[F]),V};function k(F,V){return Math.sqrt(Math.pow(V.x-F.x,2)+Math.pow(V.y-F.y,2))}function C(F,V){return{x:(F.x+V.x)/2,y:(F.y+V.y)/2}}const S=(F,V,Y)=>{const q=a.default.useMemo(()=>{var G,K;const{flipX:X,flipY:Q}=F,te=F.type==="svg"||F.src.indexOf("data:image/svg+xml")>=0||F.src.indexOf(".svg")>=0,ee=navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&te||F.maskSrc;if(!X&&!Q&&!ee)return V;if(!V||!V.width||!V.height)return null;const ae=d();let oe=1;F.type==="svg"&&(oe=Math.max(F.a.width/V.width*Y,F.a.height/V.height*Y)),ae.width=Math.max(V.width*oe,1),ae.height=Math.max(V.height*oe,1);let le=X?-ae.width:0,Te=Q?-ae.height:0;return(G=ae.getContext("2d"))===null||G===void 0||G.scale(X?-1:1,Q?-1:1),(K=ae.getContext("2d"))===null||K===void 0||K.drawImage(V,le,Te,ae.width,ae.height),ae},[F.maskSrc,F.flipX,F.flipY,V,F.a.width,F.a.height,Y]);return a.default.useEffect(()=>()=>{q&&q.nodeName==="CANVAS"&&v.default.Util.releaseCanvas(q)},[q]),q};function x(F,V){const Y=V.width/V.height;let q,G;return Y>=F.width/F.height?(q=F.width,G=F.width/Y):(q=F.height*Y,G=F.height),{x:(F.width-q)/2,y:(F.height-G)/2,width:q,height:G}}function P(F,V,Y,q,G,K,X){for(var Q=new ImageData(V,Y),te=new Int32Array(F.data.buffer),ee=F.width,ae=new Int32Array(Q.data.buffer),oe=Q.width,le=V/K,Te=Y/X,Fe=Math.round(1/le),fe=Math.round(1/Te),ne=Fe*fe,ge=0;ge<Q.height;ge++)for(var pe=0;pe<oe;pe++){for(var re=q+Math.round(pe/le)+(G+Math.round(ge/Te))*ee,de=0,be=0,ye=0,Ie=0,Ee=0;Ee<fe;Ee++)for(var ke=0;ke<Fe;ke++){var Ze=te[re+ke+Ee*ee];de+=Ze<<24>>>24,be+=Ze<<16>>>24,ye+=Ze<<8>>>24,Ie+=Ze>>>24}de=Math.round(de/ne),be=Math.round(be/ne),ye=Math.round(ye/ne),Ie=Math.round(Ie/ne),ae[pe+ge*oe]=Ie<<24|ye<<16|be<<8|de}return Q}function T(F,V){var Y,q;const G=d();G.width=F.width,G.height=F.height;const K=Math.max(1,Math.floor(G.width*V)),X=Math.max(1,Math.floor(G.height*V));(Y=G.getContext("2d"))===null||Y===void 0||Y.drawImage(F,0,0,G.width,G.height);const Q=P(G.getContext("2d").getImageData(0,0,G.width,G.height),K,X,0,0,G.width,G.height);return G.width=K,G.height=X,(q=G.getContext("2d"))===null||q===void 0||q.putImageData(Q,0,0),G}const L=(F,V)=>{const[Y,q]=N(F.maskSrc,"anonymous"),G=F.maskSrc?q:"loaded";return(0,e.useImageLoader)(G,F.id+"-mask"),a.default.useMemo(()=>{if(!Y||!V||!V.width||!V.height)return V;const K=d();K.width=Math.max(V.width,1),K.height=Math.max(V.height,1);const X=K.getContext("2d");if(!X)return V;X.drawImage(V,0,0),X.globalCompositeOperation="source-in";const Q=x(Y,F);return X.drawImage(Y,Q.x,Q.y,Q.width,Q.height,0,0,V.width,V.height),K},[V,Y,F.a.width,F.a.height])},M=(F,V,Y,q,G=0,K=!1)=>{const X=Math.floor(Math.max(F.a.width*q,1)),Q=Math.floor(Math.max(F.a.height*q,1)),te=Math.min(G*q,X/2,Q/2),ee=Math.max(F.a.width/Y.width,F.a.height/Y.height)*q,ae=F.page._exportingOrRendering&&m.flags.imageDownScalingEnabled&&ee<1&&!K,oe=Y.x===0&&Y.y===0&&Y.width===(V==null?void 0:V.width)&&Y.height===(V==null?void 0:V.height),le=a.default.useMemo(()=>{if(!(!V||!V.width||!V.height))return oe&&te===0&&!ae?void 0:d()},[V,te,ae,oe]);return a.default.useLayoutEffect(()=>{if(!le||!V)return;le.width=X,le.height=Q;const Te=le.getContext("2d");if(!Te)return;te&&(Te.beginPath(),Te.moveTo(te,0),Te.lineTo(X-te,0),Te.arc(X-te,te,te,3*Math.PI/2,0,!1),Te.lineTo(X,Q-te),Te.arc(X-te,Q-te,te,0,Math.PI/2,!1),Te.lineTo(te,Q),Te.arc(te,Q-te,te,Math.PI/2,Math.PI,!1),Te.lineTo(0,te),Te.arc(te,te,te,Math.PI,3*Math.PI/2,!1),Te.clip());const Fe=ae?T(V,ee):V,fe=ae?{x:Math.floor(Y.x*ee),y:Math.floor(Y.y*ee),width:Math.floor(Y.width*ee),height:Math.floor(Y.height*ee)}:Y;Te.drawImage(Fe,fe.x,fe.y,fe.width,fe.height,0,0,le.width,le.height)},[le,F.a.width,F.a.height,Y.x,Y.y,Y.width,Y.height,G,q,K,F.page._exportingOrRendering,ae]),a.default.useEffect(()=>()=>{le&&le.nodeName==="CANVAS"&&v.default.Util.releaseCanvas(le)},[le]),le||V},U=(F,V,Y,q)=>{const G=O(F.clipSrc||""),[K,X]=N(G,"anonymous"),Q=F.clipSrc?X:"loaded";(0,e.useImageLoader)(Q,F.id+"-clip");const te=a.default.useMemo(()=>{if(V&&K)return d()},[V,K]);return a.default.useLayoutEffect(()=>{var ee;if(!K||!V||!V.width||!V.height||!K||!K.width||!K.height||!te)return;const ae=d(),oe=Math.max(F.a.width/K.width*Y,F.a.height/K.height*Y);ae.width=K.width*oe,ae.height=K.height*oe,(ee=ae.getContext("2d"))===null||ee===void 0||ee.drawImage(K,0,0,ae.width,ae.height),te.width=Math.max(V.width,1),te.height=Math.max(V.height,1);const le=te.getContext("2d");le&&(le.save(),le.drawImage(ae,0,0,V.width,V.height),v.default.Util.releaseCanvas(ae),le.globalCompositeOperation="source-in",le.drawImage(V,0,0,te.width,te.height),le.restore())},[te,V,K,F.a.width,F.a.height,Y,...q]),F.clipSrc&&K?te:V},$=d(),Z=(0,o.observer)(({element:F})=>{const V=Math.min(30,F.a.width/4,F.a.height/4),Y=a.default.useRef(null);return a.default.useEffect(()=>{const q=Y.current;if(!q)return;const G=new v.default.Animation(K=>{q.rotate(((K==null?void 0:K.timeDiff)||0)/2)},q.getLayer());return G.start(),()=>{G.stop()}}),a.default.createElement(u.Group,{x:F.x,y:F.y,rotation:F.rotation,listening:!1,opacity:F.a.opacity,hideInExport:!F.showInExport},a.default.createElement(u.Rect,{width:F.a.width,height:F.a.height,fill:"rgba(124, 173, 212, 0.8)"}),a.default.createElement(u.Arc,{ref:Y,x:F.a.width/2,y:F.a.height/2,fill:"white",outerRadius:Math.abs(V),innerRadius:Math.max(1,V-5),angle:270}))}),B=(0,o.observer)(({element:F})=>{const V="Can not load the image...",Y=Math.max(10,Math.min(30,F.a.width/25));return a.default.createElement(u.Group,{x:F.x,y:F.y,rotation:F.rotation,listening:!1,opacity:F.a.opacity,hideInExport:!F.showInExport},a.default.createElement(u.Rect,{width:F.a.width,height:F.a.height,fill:"rgba(223, 102, 102, 0.8)"}),a.default.createElement(u.Text,{text:V,fontSize:Y,width:F.a.width,height:F.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let N=f.default;const H=F=>{N=F};e.setImageLoaderHook=H;const R=(F,V)=>{const Y=a.default.useRef(),q=()=>{var G;(G=Y.current)===null||G===void 0||G.call(Y),Y.current=void 0};a.default.useEffect(()=>q,[]),a.default.useLayoutEffect(()=>{F!=="loading"||Y.current||(Y.current=(0,h.incrementLoader)(`image ${V}`)),F!=="loading"&&q(),F==="failed"&&(0,h.triggerLoadError)(`image ${V}`)},[F])};e.useImageLoader=R;const D=({image:F,status:V,type:Y})=>{const q=a.default.useRef();return a.default.useEffect(()=>{q.current=F||q.current},[F]),V!=="failed"||V!=="failed"&&Y==="svg"?q.current:void 0},z=F=>{const[V,Y]=a.default.useReducer(X=>X+1,0),q=a.default.useRef("loading"),G=a.default.useRef(F.src),K=a.default.useRef(F.src);return K.current!==F.src&&(K.current=F.src,q.current="loading"),a.default.useEffect(()=>{if(F.type!=="svg"||!F.src)return;let X=!1;return(async()=>{q.current="loading",Y();const Q=await E.urlToString(F.src),te=E.fixSize(Q),ee=E.replaceColors(te,F.colorsReplace);X||(G.current=ee,q.current="loaded",Y())})(),()=>{X=!0}},[F.src,JSON.stringify(F.colorsReplace)]),F.type!=="svg"?[F.src,"loaded"]:[G.current,q.current]};e.ImageElement=(0,o.observer)(({element:F,store:V})=>{var Y;const[q,G]=a.default.useState(!1),K=a.default.useRef(null),X=a.default.useRef(null),[Q,te]=a.default.useState(!1),ee=V.selectedElements.indexOf(F)>=0,[ae,oe]=z(F),[le,Te]=N(ae,"anonymous"),Fe=F.type!=="svg"||oe==="loaded"?Te:"loading";(0,e.useImageLoader)(Fe,F.id);const fe=D({image:le,status:Te,type:F.type}),ne=L(F,S(F,le||fe,V._elementsPixelRatio))||$;let{cropX:ge,cropY:pe,cropWidth:re,cropHeight:de}=F;Te!=="loaded"&&(ge=pe=0,re=de=1);const be=ne.width*re,ye=ne.height*de,Ie=F.a.width/F.a.height;let Ee,ke;const Ze=be/ye,We=F.type==="svg";We?(Ee=be,ke=ye):Ie>=Ze?(Ee=be,ke=be/Ie):(Ee=ye*Ie,ke=ye);const dt={x:ne.width*ge,y:ne.height*pe,width:Ee,height:ke},Bt=(Y=F.cornerRadius)!==null&&Y!==void 0?Y:0,ue=F.page._exportingOrRendering?1:Math.min(2,V.scale),he=V._elementsPixelRatio*ue;let nt=U(F,M(F,ne,dt,he,Bt,q||F._cropModeEnabled||F.type==="svg"),he,[dt,Bt,he]);const Oe=Math.max(F.a.width/Ee,F.a.height/ke);a.default.useEffect(()=>{var De;if(!F._cropModeEnabled)return;const it=(De=K.current)===null||De===void 0?void 0:De.getStage();function Qe(tt){F._cropModeEnabled&&tt.target!==X.current&&F.toggleCropMode(!1)}function kt(tt){F._cropModeEnabled&&tt.target.parentNode!==it.content&&F.toggleCropMode(!1)}return document.body.addEventListener("click",kt),it==null||it.on("click",Qe),it==null||it.on("tap",Qe),()=>{document.body.removeEventListener("click",kt),document.body.removeEventListener("touchstart",kt),it==null||it.off("click",Qe),it==null||it.off("click",Qe)}},[F._cropModeEnabled]),a.default.useLayoutEffect(()=>{if(!(q||F._cropModeEnabled))return(0,y.applyFilter)(K.current,F),(0,l.autorun)(()=>{(0,y.applyFilter)(K.current,F)},{delay:100})},[nt,F.page._exportingOrRendering,q,re,de,F._cropModeEnabled]),a.default.useLayoutEffect(()=>{var De;q||F._cropModeEnabled?(De=K.current)===null||De===void 0||De.clearCache():(0,y.applyFilter)(K.current,F)},[q,F.a.width,F.a.height,F._cropModeEnabled]),a.default.useEffect(()=>{(0,y.applyFilter)(K.current,F)},[F.shadowEnabled,F.shadowBlur,F.cornerRadius,F.shadowColor,F.shadowOffsetX,F.shadowOffsetY,F.shadowOpacity]);const je=a.default.useRef(null),Le=a.default.useRef(null),Se=a.default.useRef(null);a.default.useLayoutEffect(()=>{F._cropModeEnabled&&(Le.current.nodes([je.current]),Se.current.nodes([X.current]))},[F._cropModeEnabled]);var et=a.default.useRef(null),xe=a.default.useRef(0),Ke=a.default.useRef(!1);const Sr=De=>{var it;((it=De.evt.touches)===null||it===void 0?void 0:it.length)>2&&De.target.stopDrag(),Math.round(De.target.x())>0&&(De.target.x(0),De.target.scaleX(1)),Math.round(De.target.y())>0&&(De.target.y(0),De.target.scaleY(1));const Qe=De.target.width()*De.target.scaleX(),kt=De.target.height()*De.target.scaleY(),tt=Math.min(1,Ee/Qe),fr=Math.min(1,ke/kt),ht=1-tt,$t=Math.min(ht,Math.max(0,Math.round(-De.target.x())/Qe)),Br=1-fr,vr=Math.min(Br,Math.max(0,Math.round(-De.target.y())/kt));De.target.setAttrs({x:-$t*ne.width,y:-vr*ne.height,scaleX:1,scaleY:1}),F.set({cropX:$t,cropY:vr,cropWidth:tt,cropHeight:fr})},Pe=()=>{F.type!=="svg"&&F.contentEditable&&setTimeout(()=>{F.toggleCropMode(!0)})},He=F.type==="svg"&&fe,Je=Te==="loading"&&!He,yt=Te==="failed",xt=!Je&&!yt,ar=a.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Rr=xt?F.a.opacity:0;(0,p.useFadeIn)(K,Rr);const Lr=F.selectable||V.role==="admin",ln=(0,g.useMobile)();return a.default.createElement(a.default.Fragment,null,Je&&a.default.createElement(Z,{element:F}),yt&&a.default.createElement(B,{element:F}),a.default.createElement(u.Image,{ref:K,name:"element",id:F.id,image:nt,x:F.a.x,y:F.a.y,width:F.a.width||1,height:F.a.height||1,rotation:F.a.rotation,opacity:Rr,shadowEnabled:F.shadowEnabled,shadowBlur:F.shadowBlur,shadowOffsetX:F.shadowOffsetX,shadowOffsetY:F.shadowOffsetY,shadowColor:F.shadowColor,shadowOpacity:F.shadowOpacity,customCrop:dt,listening:Lr,draggable:ln?F.draggable&&ee:F.draggable,preventDefault:!ln||ee,hideInExport:!F.showInExport,onMouseEnter:()=>{te(!0)},onMouseLeave:()=>{te(!1)},onDragMove:De=>{F.set({x:De.target.x(),y:De.target.y()})},onDragEnd:De=>{F.set({x:De.target.x(),y:De.target.y()})},onDblClick:Pe,onDblTap:Pe,onTransformStart:()=>{G(!0),ar.current={cropX:F.cropX,cropY:F.cropY,cropWidth:F.cropWidth,cropHeight:F.cropHeight}},onTransform:De=>{var it;const Qe=De.currentTarget,kt=Math.abs(Qe.scaleX()-1)<1e-7?1:Qe.scaleX(),tt=Math.abs(Qe.scaleY()-1)<1e-7?1:Qe.scaleY();Qe.scaleX(1),Qe.scaleY(1);const fr=(it=De.target.getStage())===null||it===void 0?void 0:it.findOne("Transformer"),ht=1-Ee/ne.width,$t=Math.min(ht,Math.max(0,F.cropX)),Br=1-ke/ne.height,vr=Math.min(Br,Math.max(0,F.cropY)),Mr=fr.getActiveAnchor(),Mn=!(Mr.indexOf("middle")>=0||Mr.indexOf("center")>=0),vi=!Mn&&kt<1&&ar.current.cropHeight>ke/ne.height;let mn=Mn?F.cropWidth:F.cropWidth*kt;vi&&(mn=F.cropWidth);const sn=!Mn&&tt<1&&ar.current.cropWidth>Ee/ne.width;let Kn=Mn?F.cropHeight:F.cropHeight*tt;sn&&(Kn=F.cropHeight),We&&(mn=F.cropWidth,Kn=F.cropHeight),F.set({cropX:$t,cropY:vr,x:Qe.x(),y:Qe.y(),width:Qe.width()*kt,height:Qe.height()*tt,rotation:De.target.rotation(),cropWidth:Math.min(mn,1-$t),cropHeight:Math.min(Kn,1-vr)})},onTransformEnd:De=>{const it=De.currentTarget;F.set({width:it.width(),height:it.height(),x:it.x(),y:it.y(),rotation:De.target.rotation(),cropWidth:Ee/ne.width,cropHeight:ke/ne.height}),G(!1)}}),a.default.createElement(u.Rect,{x:F.x,y:F.y,width:Math.max(F.a.width-F.borderSize,0),height:Math.max(F.a.height-F.borderSize,0),opacity:Rr,offsetX:-F.borderSize/2,offsetY:-F.borderSize/2,stroke:F.borderColor,strokeWidth:F.borderSize,listening:!1,visible:!!F.borderSize,rotation:F.rotation,cornerRadius:Math.max(0,Bt-F.borderSize),hideInExport:!F.showInExport}),F._cropModeEnabled&&a.default.createElement(w.Portal,{selector:".page-abs-container",enabled:!0},a.default.createElement(u.Rect,{x:-window.innerWidth/V.scale,y:-window.innerWidth/V.scale,width:window.innerWidth/V.scale*3,height:window.innerWidth/V.scale*3,fill:"rgba(0,0,0,0.3)"}),a.default.createElement(u.Image,{listening:!1,image:nt,x:F.x,y:F.y,width:F.a.width,height:F.a.height,rotation:F.rotation,shadowEnabled:F.shadowEnabled,shadowBlur:F.shadowBlur}),a.default.createElement(u.Group,{x:F.x,y:F.y,rotation:F.rotation,scaleX:Oe,scaleY:Oe},a.default.createElement(u.Image,{image:ne,ref:X,opacity:.4,draggable:!0,x:-F.cropX*ne.width,y:-F.cropY*ne.height,onDragMove:Sr,onTransform:Sr,onTouchMove:De=>{De.evt.preventDefault();const it=De.target.getStage().getPointersPositions();var Qe=it[0],kt=it[1];const tt=De.target;if(Qe&&!kt&&!tt.isDragging()&&Ke.current&&(tt.startDrag(),Ke.current=!1),Qe&&kt){v.default.hitOnDragEnabled=!0,tt.isDragging()&&(Ke.current=!0,tt.stopDrag());const sn=De.target.getAbsoluteTransform().copy();sn.invert();var fr={x:Qe.x,y:Qe.y},ht={x:kt.x,y:kt.y};if(!et.current)return void(et.current=C(fr,ht));var $t=C(fr,ht),Br=k(fr,ht);xe.current||(xe.current=Br);const Kn=tt.position();var vr={x:$t.x-Kn.x,y:$t.y-Kn.y},Mr=Br/xe.current;tt.scaleX(Mr),tt.scaleY(Mr);const Ka=sn.point($t),mi=sn.point(et.current);var Mn=Ka.x-mi.x,vi=Ka.y-mi.y,mn={x:Math.min(0,$t.x-vr.x*Mr+Mn),y:Math.min(0,$t.y-vr.y*Mr+vi)};tt.position(mn),xe.current=Br,et.current=$t,Sr(De)}},onTouchEnd:De=>{xe.current=0,et.current=null,v.default.hitOnDragEnabled=!1}}),a.default.createElement(u.Transformer,{ref:Se,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(De,it)=>it.width<5||it.height<5?De:it,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),a.default.createElement(u.Rect,{width:Ee,height:ke,ref:je,listening:!1,onTransform:De=>{De.target.x()<-F.cropX*ne.width-1e-9&&(De.target.x(-F.cropX*ne.width),De.target.scaleX(1)),De.target.y()<-F.cropY*ne.height-1e-9&&(De.target.y(-F.cropY*ne.height),De.target.scaleY(1));const it=Math.min(1,Math.max(0,F.cropX+De.target.x()/ne.width)),Qe=Math.min(1,Math.max(0,De.target.y()/ne.height+F.cropY)),kt=De.target.width()*De.target.scaleX(),tt=De.target.height()*De.target.scaleY(),fr=Math.min(1-it,kt/ne.width),ht=Math.min(1-Qe,tt/ne.height),$t=De.target.getAbsolutePosition(De.target.getParent().getParent());De.target.scale({x:1,y:1}),De.target.position({x:0,y:0}),F.set({x:$t.x,y:$t.y,cropX:it,cropY:Qe,cropWidth:fr,cropHeight:ht,width:Math.min(kt*Oe,ne.width*(1-it)*Oe),height:Math.min(tt*Oe,ne.height*(1-Qe)*Oe)})}}),a.default.createElement(u.Transformer,{ref:Le,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(De,it)=>it.width<5||it.height<5?De:it,visible:F.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(Q||ee)&&a.default.createElement(_.Highlighter,{element:F}))})})(k2);var hS={},pS={exports:{}};/*!
|
|
102
|
-
* Quill Editor v1.3.7
|
|
103
|
-
* https://quilljs.com/
|
|
104
|
-
* Copyright (c) 2014, Jason Chen
|
|
105
|
-
* Copyright (c) 2013, salesforce.com
|
|
106
|
-
*/(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:we,function(){return function(r){var n={};function i(a){if(n[a])return n[a].exports;var o=n[a]={i:a,l:!1,exports:{}};return r[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=r,i.c=n,i.d=function(a,o,l){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),o=i(18),l=i(19),u=i(45),f=i(46),v=i(47),w=i(48),_=i(49),h=i(12),E=i(32),m=i(33),y=i(31),p=i(1),g={Scope:p.Scope,create:p.create,find:p.find,query:p.query,register:p.register,Container:a.default,Format:o.default,Leaf:l.default,Embed:w.default,Scroll:u.default,Block:v.default,Inline:f.default,Text:_.default,Attributor:{Attribute:h.default,Class:E.default,Style:m.default,Store:y.default}};n.default=g},function(r,n,i){var a=this&&this.__extends||function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,g){p.__proto__=g}||function(p,g){for(var d in g)g.hasOwnProperty(d)&&(p[d]=g[d])};return function(p,g){y(p,g);function d(){this.constructor=p}p.prototype=g===null?Object.create(g):(d.prototype=g.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=function(y){a(p,y);function p(g){var d=this;return g="[Parchment] "+g,d=y.call(this,g)||this,d.message=g,d.name=d.constructor.name,d}return p}(Error);n.ParchmentError=o;var l={},u={},f={},v={};n.DATA_KEY="__blot";var w;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(w=n.Scope||(n.Scope={}));function _(y,p){var g=E(y);if(g==null)throw new o("Unable to create "+y+" blot");var d=g,b=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:d.create(p);return new d(b,p)}n.create=_;function h(y,p){return p===void 0&&(p=!1),y==null?null:y[n.DATA_KEY]!=null?y[n.DATA_KEY].blot:p?h(y.parentNode,p):null}n.find=h;function E(y,p){p===void 0&&(p=w.ANY);var g;if(typeof y=="string")g=v[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)g=v.text;else if(typeof y=="number")y&w.LEVEL&w.BLOCK?g=v.block:y&w.LEVEL&w.INLINE&&(g=v.inline);else if(y instanceof HTMLElement){var d=(y.getAttribute("class")||"").split(/\s+/);for(var b in d)if(g=u[d[b]],g)break;g=g||f[y.tagName]}return g==null?null:p&w.LEVEL&g.scope&&p&w.TYPE&g.scope?g:null}n.query=E;function m(){for(var y=[],p=0;p<arguments.length;p++)y[p]=arguments[p];if(y.length>1)return y.map(function(b){return m(b)});var g=y[0];if(typeof g.blotName!="string"&&typeof g.attrName!="string")throw new o("Invalid definition");if(g.blotName==="abstract")throw new o("Cannot register abstract class");if(v[g.blotName||g.attrName]=g,typeof g.keyName=="string")l[g.keyName]=g;else if(g.className!=null&&(u[g.className]=g),g.tagName!=null){Array.isArray(g.tagName)?g.tagName=g.tagName.map(function(b){return b.toUpperCase()}):g.tagName=g.tagName.toUpperCase();var d=Array.isArray(g.tagName)?g.tagName:[g.tagName];d.forEach(function(b){(f[b]==null||g.className==null)&&(f[b]=g)})}return g}n.register=m},function(r,n,i){var a=i(51),o=i(11),l=i(3),u=i(20),f="\0",v=function(w){Array.isArray(w)?this.ops=w:w!=null&&Array.isArray(w.ops)?this.ops=w.ops:this.ops=[]};v.prototype.insert=function(w,_){var h={};return w.length===0?this:(h.insert=w,_!=null&&typeof _=="object"&&Object.keys(_).length>0&&(h.attributes=_),this.push(h))},v.prototype.delete=function(w){return w<=0?this:this.push({delete:w})},v.prototype.retain=function(w,_){if(w<=0)return this;var h={retain:w};return _!=null&&typeof _=="object"&&Object.keys(_).length>0&&(h.attributes=_),this.push(h)},v.prototype.push=function(w){var _=this.ops.length,h=this.ops[_-1];if(w=l(!0,{},w),typeof h=="object"){if(typeof w.delete=="number"&&typeof h.delete=="number")return this.ops[_-1]={delete:h.delete+w.delete},this;if(typeof h.delete=="number"&&w.insert!=null&&(_-=1,h=this.ops[_-1],typeof h!="object"))return this.ops.unshift(w),this;if(o(w.attributes,h.attributes)){if(typeof w.insert=="string"&&typeof h.insert=="string")return this.ops[_-1]={insert:h.insert+w.insert},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this;if(typeof w.retain=="number"&&typeof h.retain=="number")return this.ops[_-1]={retain:h.retain+w.retain},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this}}return _===this.ops.length?this.ops.push(w):this.ops.splice(_,0,w),this},v.prototype.chop=function(){var w=this.ops[this.ops.length-1];return w&&w.retain&&!w.attributes&&this.ops.pop(),this},v.prototype.filter=function(w){return this.ops.filter(w)},v.prototype.forEach=function(w){this.ops.forEach(w)},v.prototype.map=function(w){return this.ops.map(w)},v.prototype.partition=function(w){var _=[],h=[];return this.forEach(function(E){var m=w(E)?_:h;m.push(E)}),[_,h]},v.prototype.reduce=function(w,_){return this.ops.reduce(w,_)},v.prototype.changeLength=function(){return this.reduce(function(w,_){return _.insert?w+u.length(_):_.delete?w-_.delete:w},0)},v.prototype.length=function(){return this.reduce(function(w,_){return w+u.length(_)},0)},v.prototype.slice=function(w,_){w=w||0,typeof _!="number"&&(_=1/0);for(var h=[],E=u.iterator(this.ops),m=0;m<_&&E.hasNext();){var y;m<w?y=E.next(w-m):(y=E.next(_-m),h.push(y)),m+=u.length(y)}return new v(h)},v.prototype.compose=function(w){var _=u.iterator(this.ops),h=u.iterator(w.ops),E=[],m=h.peek();if(m!=null&&typeof m.retain=="number"&&m.attributes==null){for(var y=m.retain;_.peekType()==="insert"&&_.peekLength()<=y;)y-=_.peekLength(),E.push(_.next());m.retain-y>0&&h.next(m.retain-y)}for(var p=new v(E);_.hasNext()||h.hasNext();)if(h.peekType()==="insert")p.push(h.next());else if(_.peekType()==="delete")p.push(_.next());else{var g=Math.min(_.peekLength(),h.peekLength()),d=_.next(g),b=h.next(g);if(typeof b.retain=="number"){var O={};typeof d.retain=="number"?O.retain=g:O.insert=d.insert;var k=u.attributes.compose(d.attributes,b.attributes,typeof d.retain=="number");if(k&&(O.attributes=k),p.push(O),!h.hasNext()&&o(p.ops[p.ops.length-1],O)){var C=new v(_.rest());return p.concat(C).chop()}}else typeof b.delete=="number"&&typeof d.retain=="number"&&p.push(b)}return p.chop()},v.prototype.concat=function(w){var _=new v(this.ops.slice());return w.ops.length>0&&(_.push(w.ops[0]),_.ops=_.ops.concat(w.ops.slice(1))),_},v.prototype.diff=function(w,_){if(this.ops===w.ops)return new v;var h=[this,w].map(function(g){return g.map(function(d){if(d.insert!=null)return typeof d.insert=="string"?d.insert:f;var b=g===w?"on":"with";throw new Error("diff() called "+b+" non-document")}).join("")}),E=new v,m=a(h[0],h[1],_),y=u.iterator(this.ops),p=u.iterator(w.ops);return m.forEach(function(g){for(var d=g[1].length;d>0;){var b=0;switch(g[0]){case a.INSERT:b=Math.min(p.peekLength(),d),E.push(p.next(b));break;case a.DELETE:b=Math.min(d,y.peekLength()),y.next(b),E.delete(b);break;case a.EQUAL:b=Math.min(y.peekLength(),p.peekLength(),d);var O=y.next(b),k=p.next(b);o(O.insert,k.insert)?E.retain(b,u.attributes.diff(O.attributes,k.attributes)):E.push(k).delete(b);break}d-=b}}),E.chop()},v.prototype.eachLine=function(w,_){_=_||`
|
|
107
|
-
`;for(var h=u.iterator(this.ops),E=new v,m=0;h.hasNext();){if(h.peekType()!=="insert")return;var y=h.peek(),p=u.length(y)-h.peekLength(),g=typeof y.insert=="string"?y.insert.indexOf(_,p)-p:-1;if(g<0)E.push(h.next());else if(g>0)E.push(h.next(g));else{if(w(E,h.next(1).attributes||{},m)===!1)return;m+=1,E=new v}}E.length()>0&&w(E,{},m)},v.prototype.transform=function(w,_){if(_=!!_,typeof w=="number")return this.transformPosition(w,_);for(var h=u.iterator(this.ops),E=u.iterator(w.ops),m=new v;h.hasNext()||E.hasNext();)if(h.peekType()==="insert"&&(_||E.peekType()!=="insert"))m.retain(u.length(h.next()));else if(E.peekType()==="insert")m.push(E.next());else{var y=Math.min(h.peekLength(),E.peekLength()),p=h.next(y),g=E.next(y);if(p.delete)continue;g.delete?m.push(g):m.retain(y,u.attributes.transform(p.attributes,g.attributes,_))}return m.chop()},v.prototype.transformPosition=function(w,_){_=!!_;for(var h=u.iterator(this.ops),E=0;h.hasNext()&&E<=w;){var m=h.peekLength(),y=h.peekType();if(h.next(),y==="delete"){w-=Math.min(m,w-E);continue}else y==="insert"&&(E<w||!_)&&(w+=m);E+=m}return w},r.exports=v},function(r,n){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):a.call(h)==="[object Array]"},f=function(h){if(!h||a.call(h)!=="[object Object]")return!1;var E=i.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&i.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!E&&!m)return!1;var y;for(y in h);return typeof y>"u"||i.call(h,y)},v=function(h,E){o&&E.name==="__proto__"?o(h,E.name,{enumerable:!0,configurable:!0,value:E.newValue,writable:!0}):h[E.name]=E.newValue},w=function(h,E){if(E==="__proto__")if(i.call(h,E)){if(l)return l(h,E).value}else return;return h[E]};r.exports=function _(){var h,E,m,y,p,g,d=arguments[0],b=1,O=arguments.length,k=!1;for(typeof d=="boolean"&&(k=d,d=arguments[1]||{},b=2),(d==null||typeof d!="object"&&typeof d!="function")&&(d={});b<O;++b)if(h=arguments[b],h!=null)for(E in h)m=w(d,E),y=w(h,E),d!==y&&(k&&y&&(f(y)||(p=u(y)))?(p?(p=!1,g=m&&u(m)?m:[]):g=m&&f(m)?m:{},v(d,{name:E,newValue:_(k,g,y)})):typeof y<"u"&&v(d,{name:E,newValue:y}));return d}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var a=function(){function T(L,M){for(var U=0;U<M.length;U++){var $=M[U];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(L,$.key,$)}}return function(L,M,U){return M&&T(L.prototype,M),U&&T(L,U),L}}(),o=function T(L,M,U){L===null&&(L=Function.prototype);var $=Object.getOwnPropertyDescriptor(L,M);if($===void 0){var Z=Object.getPrototypeOf(L);return Z===null?void 0:T(Z,M,U)}else{if("value"in $)return $.value;var B=$.get;return B===void 0?void 0:B.call(U)}},l=i(3),u=d(l),f=i(2),v=d(f),w=i(0),_=d(w),h=i(16),E=d(h),m=i(6),y=d(m),p=i(7),g=d(p);function d(T){return T&&T.__esModule?T:{default:T}}function b(T,L){if(!(T instanceof L))throw new TypeError("Cannot call a class as a function")}function O(T,L){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:T}function k(T,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);T.prototype=Object.create(L&&L.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(T,L):T.__proto__=L)}var C=1,S=function(T){k(L,T);function L(){return b(this,L),O(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return a(L,[{key:"attach",value:function(){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"attach",this).call(this),this.attributes=new _.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new v.default().insert(this.value(),(0,u.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(U,$){var Z=_.default.query(U,_.default.Scope.BLOCK_ATTRIBUTE);Z!=null&&this.attributes.attribute(Z,$)}},{key:"formatAt",value:function(U,$,Z,B){this.format(Z,B)}},{key:"insertAt",value:function(U,$,Z){if(typeof $=="string"&&$.endsWith(`
|
|
108
|
-
`)){var B=_.default.create(x.blotName);this.parent.insertBefore(B,U===0?this:this.next),B.insertAt(0,$.slice(0,-1))}else o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,U,$,Z)}}]),L}(_.default.Embed);S.scope=_.default.Scope.BLOCK_BLOT;var x=function(T){k(L,T);function L(M){b(this,L);var U=O(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,M));return U.cache={},U}return a(L,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(_.default.Leaf).reduce(function(U,$){return $.length()===0?U:U.insert($.value(),P($))},new v.default).insert(`
|
|
109
|
-
`,P(this))),this.cache.delta}},{key:"deleteAt",value:function(U,$){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"deleteAt",this).call(this,U,$),this.cache={}}},{key:"formatAt",value:function(U,$,Z,B){$<=0||(_.default.query(Z,_.default.Scope.BLOCK)?U+$===this.length()&&this.format(Z,B):o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"formatAt",this).call(this,U,Math.min($,this.length()-U-1),Z,B),this.cache={})}},{key:"insertAt",value:function(U,$,Z){if(Z!=null)return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,U,$,Z);if($.length!==0){var B=$.split(`
|
|
110
|
-
`),N=B.shift();N.length>0&&(U<this.length()-1||this.children.tail==null?o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertAt",this).call(this,Math.min(U,this.length()-1),N):this.children.tail.insertAt(this.children.tail.length(),N),this.cache={});var H=this;B.reduce(function(R,D){return H=H.split(R,!0),H.insertAt(0,D),D.length},U+N.length)}}},{key:"insertBefore",value:function(U,$){var Z=this.children.head;o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"insertBefore",this).call(this,U,$),Z instanceof E.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"length",this).call(this)+C),this.cache.length}},{key:"moveChildren",value:function(U,$){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"moveChildren",this).call(this,U,$),this.cache={}}},{key:"optimize",value:function(U){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,U),this.cache={}}},{key:"path",value:function(U){return o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"path",this).call(this,U,!0)}},{key:"removeChild",value:function(U){o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"removeChild",this).call(this,U),this.cache={}}},{key:"split",value:function(U){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if($&&(U===0||U>=this.length()-C)){var Z=this.clone();return U===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var B=o(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"split",this).call(this,U,$);return this.cache={},B}}}]),L}(_.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[y.default,_.default.Embed,g.default];function P(T){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T==null||(typeof T.formats=="function"&&(L=(0,u.default)(L,T.formats())),T.parent==null||T.parent.blotName=="scroll"||T.parent.statics.scope!==T.statics.scope)?L:P(T.parent,L)}n.bubbleFormats=P,n.BlockEmbed=S,n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},o=function(){function H(R,D){var z=[],F=!0,V=!1,Y=void 0;try{for(var q=R[Symbol.iterator](),G;!(F=(G=q.next()).done)&&(z.push(G.value),!(D&&z.length===D));F=!0);}catch(K){V=!0,Y=K}finally{try{!F&&q.return&&q.return()}finally{if(V)throw Y}}return z}return function(R,D){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return H(R,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function H(R,D){for(var z=0;z<D.length;z++){var F=D[z];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(R,F.key,F)}}return function(R,D,z){return D&&H(R.prototype,D),z&&H(R,z),R}}();i(50);var u=i(2),f=P(u),v=i(14),w=P(v),_=i(8),h=P(_),E=i(9),m=P(E),y=i(0),p=P(y),g=i(15),d=P(g),b=i(3),O=P(b),k=i(10),C=P(k),S=i(34),x=P(S);function P(H){return H&&H.__esModule?H:{default:H}}function T(H,R,D){return R in H?Object.defineProperty(H,R,{value:D,enumerable:!0,configurable:!0,writable:!0}):H[R]=D,H}function L(H,R){if(!(H instanceof R))throw new TypeError("Cannot call a class as a function")}var M=(0,C.default)("quill"),U=function(){l(H,null,[{key:"debug",value:function(D){D===!0&&(D="log"),C.default.level(D)}},{key:"find",value:function(D){return D.__quill||p.default.find(D)}},{key:"import",value:function(D){return this.imports[D]==null&&M.error("Cannot import "+D+". Are you sure it was registered?"),this.imports[D]}},{key:"register",value:function(D,z){var F=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof D!="string"){var Y=D.attrName||D.blotName;typeof Y=="string"?this.register("formats/"+Y,D,z):Object.keys(D).forEach(function(q){F.register(q,D[q],z)})}else this.imports[D]!=null&&!V&&M.warn("Overwriting "+D+" with",z),this.imports[D]=z,(D.startsWith("blots/")||D.startsWith("formats/"))&&z.blotName!=="abstract"?p.default.register(z):D.startsWith("modules")&&typeof z.register=="function"&&z.register()}}]);function H(R){var D=this,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L(this,H),this.options=$(R,z),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",R);this.options.debug&&H.debug(this.options.debug);var F=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 h.default,this.scroll=p.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new w.default(this.scroll),this.selection=new d.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(h.default.events.EDITOR_CHANGE,function(Y){Y===h.default.events.TEXT_CHANGE&&D.root.classList.toggle("ql-blank",D.editor.isBlank())}),this.emitter.on(h.default.events.SCROLL_UPDATE,function(Y,q){var G=D.selection.lastRange,K=G&&G.length===0?G.index:void 0;Z.call(D,function(){return D.editor.update(null,q,K)},Y)});var V=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+F+"<p><br></p></div>");this.setContents(V),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(H,[{key:"addContainer",value:function(D){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof D=="string"){var F=D;D=document.createElement("div"),D.classList.add(F)}return this.container.insertBefore(D,z),D}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(D,z,F){var V=this,Y=B(D,z,F),q=o(Y,4);return D=q[0],z=q[1],F=q[3],Z.call(this,function(){return V.editor.deleteText(D,z)},F,D,-1*z)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(D),this.container.classList.toggle("ql-disabled",!D)}},{key:"focus",value:function(){var D=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=D,this.scrollIntoView()}},{key:"format",value:function(D,z){var F=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:h.default.sources.API;return Z.call(this,function(){var Y=F.getSelection(!0),q=new f.default;if(Y==null)return q;if(p.default.query(D,p.default.Scope.BLOCK))q=F.editor.formatLine(Y.index,Y.length,T({},D,z));else{if(Y.length===0)return F.selection.format(D,z),q;q=F.editor.formatText(Y.index,Y.length,T({},D,z))}return F.setSelection(Y,h.default.sources.SILENT),q},V)}},{key:"formatLine",value:function(D,z,F,V,Y){var q=this,G=void 0,K=B(D,z,F,V,Y),X=o(K,4);return D=X[0],z=X[1],G=X[2],Y=X[3],Z.call(this,function(){return q.editor.formatLine(D,z,G)},Y,D,0)}},{key:"formatText",value:function(D,z,F,V,Y){var q=this,G=void 0,K=B(D,z,F,V,Y),X=o(K,4);return D=X[0],z=X[1],G=X[2],Y=X[3],Z.call(this,function(){return q.editor.formatText(D,z,G)},Y,D,0)}},{key:"getBounds",value:function(D){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=void 0;typeof D=="number"?F=this.selection.getBounds(D,z):F=this.selection.getBounds(D.index,D.length);var V=this.container.getBoundingClientRect();return{bottom:F.bottom-V.top,height:F.height,left:F.left-V.left,right:F.right-V.left,top:F.top-V.top,width:F.width}}},{key:"getContents",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-D,F=B(D,z),V=o(F,2);return D=V[0],z=V[1],this.editor.getContents(D,z)}},{key:"getFormat",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof D=="number"?this.editor.getFormat(D,z):this.editor.getFormat(D.index,D.length)}},{key:"getIndex",value:function(D){return D.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(D){return this.scroll.leaf(D)}},{key:"getLine",value:function(D){return this.scroll.line(D)}},{key:"getLines",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof D!="number"?this.scroll.lines(D.index,D.length):this.scroll.lines(D,z)}},{key:"getModule",value:function(D){return this.theme.modules[D]}},{key:"getSelection",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return D&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-D,F=B(D,z),V=o(F,2);return D=V[0],z=V[1],this.editor.getText(D,z)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(D,z,F){var V=this,Y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return Z.call(this,function(){return V.editor.insertEmbed(D,z,F)},Y,D)}},{key:"insertText",value:function(D,z,F,V,Y){var q=this,G=void 0,K=B(D,0,F,V,Y),X=o(K,4);return D=X[0],G=X[2],Y=X[3],Z.call(this,function(){return q.editor.insertText(D,z,G)},Y,D,z.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(D,z,F){this.clipboard.dangerouslyPasteHTML(D,z,F)}},{key:"removeFormat",value:function(D,z,F){var V=this,Y=B(D,z,F),q=o(Y,4);return D=q[0],z=q[1],F=q[3],Z.call(this,function(){return V.editor.removeFormat(D,z)},F,D)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(D){var z=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return Z.call(this,function(){D=new f.default(D);var V=z.getLength(),Y=z.editor.deleteText(0,V),q=z.editor.applyDelta(D),G=q.ops[q.ops.length-1];G!=null&&typeof G.insert=="string"&&G.insert[G.insert.length-1]===`
|
|
111
|
-
`&&(z.editor.deleteText(z.getLength()-1,1),q.delete(1));var K=Y.compose(q);return K},F)}},{key:"setSelection",value:function(D,z,F){if(D==null)this.selection.setRange(null,z||H.sources.API);else{var V=B(D,z,F),Y=o(V,4);D=Y[0],z=Y[1],F=Y[3],this.selection.setRange(new g.Range(D,z),F),F!==h.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(D){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API,F=new f.default().insert(D);return this.setContents(F,z)}},{key:"update",value:function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:h.default.sources.USER,z=this.scroll.update(D);return this.selection.update(D),z}},{key:"updateContents",value:function(D){var z=this,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:h.default.sources.API;return Z.call(this,function(){return D=new f.default(D),z.editor.applyDelta(D,F)},F,!0)}}]),H}();U.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},U.events=h.default.events,U.sources=h.default.sources,U.version="1.3.7",U.imports={delta:f.default,parchment:p.default,"core/module":m.default,"core/theme":x.default};function $(H,R){if(R=(0,O.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},R),!R.theme||R.theme===U.DEFAULTS.theme)R.theme=x.default;else if(R.theme=U.import("themes/"+R.theme),R.theme==null)throw new Error("Invalid theme "+R.theme+". Did you register it?");var D=(0,O.default)(!0,{},R.theme.DEFAULTS);[D,R].forEach(function(V){V.modules=V.modules||{},Object.keys(V.modules).forEach(function(Y){V.modules[Y]===!0&&(V.modules[Y]={})})});var z=Object.keys(D.modules).concat(Object.keys(R.modules)),F=z.reduce(function(V,Y){var q=U.import("modules/"+Y);return q==null?M.error("Cannot load "+Y+" module. Are you sure you registered it?"):V[Y]=q.DEFAULTS||{},V},{});return R.modules!=null&&R.modules.toolbar&&R.modules.toolbar.constructor!==Object&&(R.modules.toolbar={container:R.modules.toolbar}),R=(0,O.default)(!0,{},U.DEFAULTS,{modules:F},D,R),["bounds","container","scrollingContainer"].forEach(function(V){typeof R[V]=="string"&&(R[V]=document.querySelector(R[V]))}),R.modules=Object.keys(R.modules).reduce(function(V,Y){return R.modules[Y]&&(V[Y]=R.modules[Y]),V},{}),R}function Z(H,R,D,z){if(this.options.strict&&!this.isEnabled()&&R===h.default.sources.USER)return new f.default;var F=D==null?null:this.getSelection(),V=this.editor.delta,Y=H();if(F!=null&&(D===!0&&(D=F.index),z==null?F=N(F,Y,R):z!==0&&(F=N(F,D,z,R)),this.setSelection(F,h.default.sources.SILENT)),Y.length()>0){var q,G=[h.default.events.TEXT_CHANGE,Y,V,R];if((q=this.emitter).emit.apply(q,[h.default.events.EDITOR_CHANGE].concat(G)),R!==h.default.sources.SILENT){var K;(K=this.emitter).emit.apply(K,G)}}return Y}function B(H,R,D,z,F){var V={};return typeof H.index=="number"&&typeof H.length=="number"?typeof R!="number"?(F=z,z=D,D=R,R=H.length,H=H.index):(R=H.length,H=H.index):typeof R!="number"&&(F=z,z=D,D=R,R=0),(typeof D>"u"?"undefined":a(D))==="object"?(V=D,F=z):typeof D=="string"&&(z!=null?V[D]=z:F=D),F=F||h.default.sources.API,[H,R,V,F]}function N(H,R,D,z){if(H==null)return null;var F=void 0,V=void 0;if(R instanceof f.default){var Y=[H.index,H.index+H.length].map(function(X){return R.transformPosition(X,z!==h.default.sources.USER)}),q=o(Y,2);F=q[0],V=q[1]}else{var G=[H.index,H.index+H.length].map(function(X){return X<R||X===R&&z===h.default.sources.USER?X:D>=0?X+D:Math.max(R,X+D)}),K=o(G,2);F=K[0],V=K[1]}return new g.Range(F,V-F)}n.expandConfig=$,n.overload=B,n.default=U},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(p,g){for(var d=0;d<g.length;d++){var b=g[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,g,d){return g&&y(p.prototype,g),d&&y(p,d),p}}(),o=function y(p,g,d){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,g);if(b===void 0){var O=Object.getPrototypeOf(p);return O===null?void 0:y(O,g,d)}else{if("value"in b)return b.value;var k=b.get;return k===void 0?void 0:k.call(d)}},l=i(7),u=w(l),f=i(0),v=w(f);function w(y){return y&&y.__esModule?y:{default:y}}function _(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}function h(y,p){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:y}function E(y,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);y.prototype=Object.create(p&&p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(y,p):y.__proto__=p)}var m=function(y){E(p,y);function p(){return _(this,p),h(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"formatAt",value:function(d,b,O,k){if(p.compare(this.statics.blotName,O)<0&&v.default.query(O,v.default.Scope.BLOT)){var C=this.isolate(d,b);k&&C.wrap(O,k)}else o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"formatAt",this).call(this,d,b,O,k)}},{key:"optimize",value:function(d){if(o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,d),this.parent instanceof p&&p.compare(this.statics.blotName,this.parent.statics.blotName)>0){var b=this.parent.isolate(this.offset(),this.length());this.moveChildren(b),b.wrap(this)}}}],[{key:"compare",value:function(d,b){var O=p.order.indexOf(d),k=p.order.indexOf(b);return O>=0||k>=0?O-k:d===b?0:d<b?-1:1}}]),p}(v.default.Inline);m.allowedChildren=[m,v.default.Embed,u.default],m.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}function u(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function f(_,h){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:_}function v(_,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);_.prototype=Object.create(h&&h.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(_,h):_.__proto__=h)}var w=function(_){v(h,_);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default.Text);n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function g(d,b){for(var O=0;O<b.length;O++){var k=b[O];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(d,k.key,k)}}return function(d,b,O){return b&&g(d.prototype,b),O&&g(d,O),d}}(),o=function g(d,b,O){d===null&&(d=Function.prototype);var k=Object.getOwnPropertyDescriptor(d,b);if(k===void 0){var C=Object.getPrototypeOf(d);return C===null?void 0:g(C,b,O)}else{if("value"in k)return k.value;var S=k.get;return S===void 0?void 0:S.call(O)}},l=i(54),u=w(l),f=i(10),v=w(f);function w(g){return g&&g.__esModule?g:{default:g}}function _(g,d){if(!(g instanceof d))throw new TypeError("Cannot call a class as a function")}function h(g,d){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:g}function E(g,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);g.prototype=Object.create(d&&d.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(g,d):g.__proto__=d)}var m=(0,v.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(g){document.addEventListener(g,function(){for(var d=arguments.length,b=Array(d),O=0;O<d;O++)b[O]=arguments[O];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(k){if(k.__quill&&k.__quill.emitter){var C;(C=k.__quill.emitter).handleDOM.apply(C,b)}})})});var p=function(g){E(d,g);function d(){_(this,d);var b=h(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return b.listeners={},b.on("error",m.error),b}return a(d,[{key:"emit",value:function(){m.log.apply(m,arguments),o(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(O){for(var k=arguments.length,C=Array(k>1?k-1:0),S=1;S<k;S++)C[S-1]=arguments[S];(this.listeners[O.type]||[]).forEach(function(x){var P=x.node,T=x.handler;(O.target===P||P.contains(O.target))&&T.apply(void 0,[O].concat(C))})}},{key:"listenDOM",value:function(O,k,C){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push({node:k,handler:C})}}]),d}(u.default);p.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"},p.sources={API:"api",SILENT:"silent",USER:"user"},n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function a(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}var o=function l(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,l),this.quill=u,this.options=f};o.DEFAULTS={},n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=["error","warn","log","info"],o="warn";function l(f){if(a.indexOf(f)<=a.indexOf(o)){for(var v,w=arguments.length,_=Array(w>1?w-1:0),h=1;h<w;h++)_[h-1]=arguments[h];(v=console)[f].apply(v,_)}}function u(f){return a.reduce(function(v,w){return v[w]=l.bind(console,w,f),v},{})}l.level=u.level=function(f){o=f},n.default=u},function(r,n,i){var a=Array.prototype.slice,o=i(52),l=i(53),u=r.exports=function(_,h,E){return E||(E={}),_===h?!0:_ instanceof Date&&h instanceof Date?_.getTime()===h.getTime():!_||!h||typeof _!="object"&&typeof h!="object"?E.strict?_===h:_==h:w(_,h,E)};function f(_){return _==null}function v(_){return!(!_||typeof _!="object"||typeof _.length!="number"||typeof _.copy!="function"||typeof _.slice!="function"||_.length>0&&typeof _[0]!="number")}function w(_,h,E){var m,y;if(f(_)||f(h)||_.prototype!==h.prototype)return!1;if(l(_))return l(h)?(_=a.call(_),h=a.call(h),u(_,h,E)):!1;if(v(_)){if(!v(h)||_.length!==h.length)return!1;for(m=0;m<_.length;m++)if(_[m]!==h[m])return!1;return!0}try{var p=o(_),g=o(h)}catch{return!1}if(p.length!=g.length)return!1;for(p.sort(),g.sort(),m=p.length-1;m>=0;m--)if(p[m]!=g[m])return!1;for(m=p.length-1;m>=0;m--)if(y=p[m],!u(_[y],h[y],E))return!1;return typeof _==typeof h}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=function(){function l(u,f,v){v===void 0&&(v={}),this.attrName=u,this.keyName=f;var w=a.Scope.TYPE&a.Scope.ATTRIBUTE;v.scope!=null?this.scope=v.scope&a.Scope.LEVEL|w:this.scope=a.Scope.ATTRIBUTE,v.whitelist!=null&&(this.whitelist=v.whitelist)}return l.keys=function(u){return[].map.call(u.attributes,function(f){return f.name})},l.prototype.add=function(u,f){return this.canAdd(u,f)?(u.setAttribute(this.keyName,f),!0):!1},l.prototype.canAdd=function(u,f){var v=a.query(u,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return v==null?!1:this.whitelist==null?!0:typeof f=="string"?this.whitelist.indexOf(f.replace(/["']/g,""))>-1:this.whitelist.indexOf(f)>-1},l.prototype.remove=function(u){u.removeAttribute(this.keyName)},l.prototype.value=function(u){var f=u.getAttribute(this.keyName);return this.canAdd(u,f)&&f?f:""},l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var a=function(){function S(x,P){var T=[],L=!0,M=!1,U=void 0;try{for(var $=x[Symbol.iterator](),Z;!(L=(Z=$.next()).done)&&(T.push(Z.value),!(P&&T.length===P));L=!0);}catch(B){M=!0,U=B}finally{try{!L&&$.return&&$.return()}finally{if(M)throw U}}return T}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return S(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(x,P){for(var T=0;T<P.length;T++){var L=P[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(x,L.key,L)}}return function(x,P,T){return P&&S(x.prototype,P),T&&S(x,T),x}}(),l=function S(x,P,T){x===null&&(x=Function.prototype);var L=Object.getOwnPropertyDescriptor(x,P);if(L===void 0){var M=Object.getPrototypeOf(x);return M===null?void 0:S(M,P,T)}else{if("value"in L)return L.value;var U=L.get;return U===void 0?void 0:U.call(T)}},u=i(2),f=g(u),v=i(0),w=g(v),_=i(4),h=g(_),E=i(6),m=g(E),y=i(7),p=g(y);function g(S){return S&&S.__esModule?S:{default:S}}function d(S,x){if(!(S instanceof x))throw new TypeError("Cannot call a class as a function")}function b(S,x){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:S}function O(S,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);S.prototype=Object.create(x&&x.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(S,x):S.__proto__=x)}var k=function(S){O(x,S);function x(){return d(this,x),b(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x}(m.default);k.blotName="code",k.tagName="CODE";var C=function(S){O(x,S);function x(){return d(this,x),b(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,[{key:"delta",value:function(){var T=this,L=this.domNode.textContent;return L.endsWith(`
|
|
112
|
-
`)&&(L=L.slice(0,-1)),L.split(`
|
|
113
|
-
`).reduce(function(M,U){return M.insert(U).insert(`
|
|
114
|
-
`,T.formats())},new f.default)}},{key:"format",value:function(T,L){if(!(T===this.statics.blotName&&L)){var M=this.descendant(p.default,this.length()-1),U=a(M,1),$=U[0];$!=null&&$.deleteAt($.length()-1,1),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,T,L)}}},{key:"formatAt",value:function(T,L,M,U){if(L!==0&&!(w.default.query(M,w.default.Scope.BLOCK)==null||M===this.statics.blotName&&U===this.statics.formats(this.domNode))){var $=this.newlineIndex(T);if(!($<0||$>=T+L)){var Z=this.newlineIndex(T,!0)+1,B=$-Z+1,N=this.isolate(Z,B),H=N.next;N.format(M,U),H instanceof x&&H.formatAt(0,T-Z+L-B,M,U)}}}},{key:"insertAt",value:function(T,L,M){if(M==null){var U=this.descendant(p.default,T),$=a(U,2),Z=$[0],B=$[1];Z.insertAt(B,L)}}},{key:"length",value:function(){var T=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
115
|
-
`)?T:T+1}},{key:"newlineIndex",value:function(T){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(L)return this.domNode.textContent.slice(0,T).lastIndexOf(`
|
|
116
|
-
`);var M=this.domNode.textContent.slice(T).indexOf(`
|
|
117
|
-
`);return M>-1?T+M:-1}},{key:"optimize",value:function(T){this.domNode.textContent.endsWith(`
|
|
118
|
-
`)||this.appendChild(w.default.create("text",`
|
|
119
|
-
`)),l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,T);var L=this.next;L!=null&&L.prev===this&&L.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===L.statics.formats(L.domNode)&&(L.optimize(T),L.moveChildren(this),L.remove())}},{key:"replace",value:function(T){l(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,T),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(L){var M=w.default.find(L);M==null?L.parentNode.removeChild(L):M instanceof w.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(T){var L=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,T);return L.setAttribute("spellcheck",!1),L}},{key:"formats",value:function(){return!0}}]),x}(h.default);C.blotName="code-block",C.tagName="PRE",C.TAB=" ",n.Code=k,n.default=C},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},o=function(){function H(R,D){var z=[],F=!0,V=!1,Y=void 0;try{for(var q=R[Symbol.iterator](),G;!(F=(G=q.next()).done)&&(z.push(G.value),!(D&&z.length===D));F=!0);}catch(K){V=!0,Y=K}finally{try{!F&&q.return&&q.return()}finally{if(V)throw Y}}return z}return function(R,D){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return H(R,D);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function H(R,D){for(var z=0;z<D.length;z++){var F=D[z];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(R,F.key,F)}}return function(R,D,z){return D&&H(R.prototype,D),z&&H(R,z),R}}(),u=i(2),f=L(u),v=i(20),w=L(v),_=i(0),h=L(_),E=i(13),m=L(E),y=i(24),p=L(y),g=i(4),d=L(g),b=i(16),O=L(b),k=i(21),C=L(k),S=i(11),x=L(S),P=i(3),T=L(P);function L(H){return H&&H.__esModule?H:{default:H}}function M(H,R,D){return R in H?Object.defineProperty(H,R,{value:D,enumerable:!0,configurable:!0,writable:!0}):H[R]=D,H}function U(H,R){if(!(H instanceof R))throw new TypeError("Cannot call a class as a function")}var $=/^[ -~]*$/,Z=function(){function H(R){U(this,H),this.scroll=R,this.delta=this.getDelta()}return l(H,[{key:"applyDelta",value:function(D){var z=this,F=!1;this.scroll.update();var V=this.scroll.length();return this.scroll.batchStart(),D=N(D),D.reduce(function(Y,q){var G=q.retain||q.delete||q.insert.length||1,K=q.attributes||{};if(q.insert!=null){if(typeof q.insert=="string"){var X=q.insert;X.endsWith(`
|
|
120
|
-
`)&&F&&(F=!1,X=X.slice(0,-1)),Y>=V&&!X.endsWith(`
|
|
121
|
-
`)&&(F=!0),z.scroll.insertAt(Y,X);var Q=z.scroll.line(Y),te=o(Q,2),ee=te[0],ae=te[1],oe=(0,T.default)({},(0,g.bubbleFormats)(ee));if(ee instanceof d.default){var le=ee.descendant(h.default.Leaf,ae),Te=o(le,1),Fe=Te[0];oe=(0,T.default)(oe,(0,g.bubbleFormats)(Fe))}K=w.default.attributes.diff(oe,K)||{}}else if(a(q.insert)==="object"){var fe=Object.keys(q.insert)[0];if(fe==null)return Y;z.scroll.insertAt(Y,fe,q.insert[fe])}V+=G}return Object.keys(K).forEach(function(ne){z.scroll.formatAt(Y,G,ne,K[ne])}),Y+G},0),D.reduce(function(Y,q){return typeof q.delete=="number"?(z.scroll.deleteAt(Y,q.delete),Y):Y+(q.retain||q.insert.length||1)},0),this.scroll.batchEnd(),this.update(D)}},{key:"deleteText",value:function(D,z){return this.scroll.deleteAt(D,z),this.update(new f.default().retain(D).delete(z))}},{key:"formatLine",value:function(D,z){var F=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(V).forEach(function(Y){if(!(F.scroll.whitelist!=null&&!F.scroll.whitelist[Y])){var q=F.scroll.lines(D,Math.max(z,1)),G=z;q.forEach(function(K){var X=K.length();if(!(K instanceof m.default))K.format(Y,V[Y]);else{var Q=D-K.offset(F.scroll),te=K.newlineIndex(Q+G)-Q+1;K.formatAt(Q,te,Y,V[Y])}G-=X})}}),this.scroll.optimize(),this.update(new f.default().retain(D).retain(z,(0,C.default)(V)))}},{key:"formatText",value:function(D,z){var F=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(V).forEach(function(Y){F.scroll.formatAt(D,z,Y,V[Y])}),this.update(new f.default().retain(D).retain(z,(0,C.default)(V)))}},{key:"getContents",value:function(D,z){return this.delta.slice(D,D+z)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(D,z){return D.concat(z.delta())},new f.default)}},{key:"getFormat",value:function(D){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,F=[],V=[];z===0?this.scroll.path(D).forEach(function(q){var G=o(q,1),K=G[0];K instanceof d.default?F.push(K):K instanceof h.default.Leaf&&V.push(K)}):(F=this.scroll.lines(D,z),V=this.scroll.descendants(h.default.Leaf,D,z));var Y=[F,V].map(function(q){if(q.length===0)return{};for(var G=(0,g.bubbleFormats)(q.shift());Object.keys(G).length>0;){var K=q.shift();if(K==null)return G;G=B((0,g.bubbleFormats)(K),G)}return G});return T.default.apply(T.default,Y)}},{key:"getText",value:function(D,z){return this.getContents(D,z).filter(function(F){return typeof F.insert=="string"}).map(function(F){return F.insert}).join("")}},{key:"insertEmbed",value:function(D,z,F){return this.scroll.insertAt(D,z,F),this.update(new f.default().retain(D).insert(M({},z,F)))}},{key:"insertText",value:function(D,z){var F=this,V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return z=z.replace(/\r\n/g,`
|
|
122
|
-
`).replace(/\r/g,`
|
|
123
|
-
`),this.scroll.insertAt(D,z),Object.keys(V).forEach(function(Y){F.scroll.formatAt(D,z.length,Y,V[Y])}),this.update(new f.default().retain(D).insert(z,(0,C.default)(V)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var D=this.scroll.children.head;return D.statics.blotName!==d.default.blotName||D.children.length>1?!1:D.children.head instanceof O.default}},{key:"removeFormat",value:function(D,z){var F=this.getText(D,z),V=this.scroll.line(D+z),Y=o(V,2),q=Y[0],G=Y[1],K=0,X=new f.default;q!=null&&(q instanceof m.default?K=q.newlineIndex(G)-G+1:K=q.length()-G,X=q.delta().slice(G,G+K-1).insert(`
|
|
124
|
-
`));var Q=this.getContents(D,z+K),te=Q.diff(new f.default().insert(F).concat(X)),ee=new f.default().retain(D).concat(te);return this.applyDelta(ee)}},{key:"update",value:function(D){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,V=this.delta;if(z.length===1&&z[0].type==="characterData"&&z[0].target.data.match($)&&h.default.find(z[0].target)){var Y=h.default.find(z[0].target),q=(0,g.bubbleFormats)(Y),G=Y.offset(this.scroll),K=z[0].oldValue.replace(p.default.CONTENTS,""),X=new f.default().insert(K),Q=new f.default().insert(Y.value()),te=new f.default().retain(G).concat(X.diff(Q,F));D=te.reduce(function(ee,ae){return ae.insert?ee.insert(ae.insert,q):ee.push(ae)},new f.default),this.delta=V.compose(D)}else this.delta=this.getDelta(),(!D||!(0,x.default)(V.compose(D),this.delta))&&(D=V.diff(this.delta,F));return D}}]),H}();function B(H,R){return Object.keys(R).reduce(function(D,z){return H[z]==null||(R[z]===H[z]?D[z]=R[z]:Array.isArray(R[z])?R[z].indexOf(H[z])<0&&(D[z]=R[z].concat([H[z]])):D[z]=[R[z],H[z]]),D},{})}function N(H){return H.reduce(function(R,D){if(D.insert===1){var z=(0,C.default)(D.attributes);return delete z.image,R.insert({image:D.attributes.image},z)}if(D.attributes!=null&&(D.attributes.list===!0||D.attributes.bullet===!0)&&(D=(0,C.default)(D),D.attributes.list?D.attributes.list="ordered":(D.attributes.list="bullet",delete D.attributes.bullet)),typeof D.insert=="string"){var F=D.insert.replace(/\r\n/g,`
|
|
125
|
-
`).replace(/\r/g,`
|
|
126
|
-
`);return R.insert(F,D.attributes)}return R.push(D)},new f.default)}n.default=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var a=function(){function S(x,P){var T=[],L=!0,M=!1,U=void 0;try{for(var $=x[Symbol.iterator](),Z;!(L=(Z=$.next()).done)&&(T.push(Z.value),!(P&&T.length===P));L=!0);}catch(B){M=!0,U=B}finally{try{!L&&$.return&&$.return()}finally{if(M)throw U}}return T}return function(x,P){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return S(x,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function S(x,P){for(var T=0;T<P.length;T++){var L=P[T];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(x,L.key,L)}}return function(x,P,T){return P&&S(x.prototype,P),T&&S(x,T),x}}(),l=i(0),u=p(l),f=i(21),v=p(f),w=i(11),_=p(w),h=i(8),E=p(h),m=i(10),y=p(m);function p(S){return S&&S.__esModule?S:{default:S}}function g(S){if(Array.isArray(S)){for(var x=0,P=Array(S.length);x<S.length;x++)P[x]=S[x];return P}else return Array.from(S)}function d(S,x){if(!(S instanceof x))throw new TypeError("Cannot call a class as a function")}var b=(0,y.default)("quill:selection"),O=function S(x){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;d(this,S),this.index=x,this.length=P},k=function(){function S(x,P){var T=this;d(this,S),this.emitter=P,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=u.default.create("cursor",this),this.lastRange=this.savedRange=new O(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){T.mouseDown||setTimeout(T.update.bind(T,E.default.sources.USER),1)}),this.emitter.on(E.default.events.EDITOR_CHANGE,function(L,M){L===E.default.events.TEXT_CHANGE&&M.length()>0&&T.update(E.default.sources.SILENT)}),this.emitter.on(E.default.events.SCROLL_BEFORE_UPDATE,function(){if(T.hasFocus()){var L=T.getNativeRange();L!=null&&L.start.node!==T.cursor.textNode&&T.emitter.once(E.default.events.SCROLL_UPDATE,function(){try{T.setNativeRange(L.start.node,L.start.offset,L.end.node,L.end.offset)}catch{}})}}),this.emitter.on(E.default.events.SCROLL_OPTIMIZE,function(L,M){if(M.range){var U=M.range,$=U.startNode,Z=U.startOffset,B=U.endNode,N=U.endOffset;T.setNativeRange($,Z,B,N)}}),this.update(E.default.sources.SILENT)}return o(S,[{key:"handleComposition",value:function(){var P=this;this.root.addEventListener("compositionstart",function(){P.composing=!0}),this.root.addEventListener("compositionend",function(){if(P.composing=!1,P.cursor.parent){var T=P.cursor.restore();if(!T)return;setTimeout(function(){P.setNativeRange(T.startNode,T.startOffset,T.endNode,T.endOffset)},1)}})}},{key:"handleDragging",value:function(){var P=this;this.emitter.listenDOM("mousedown",document.body,function(){P.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){P.mouseDown=!1,P.update(E.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(P,T){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[P])){this.scroll.update();var L=this.getNativeRange();if(!(L==null||!L.native.collapsed||u.default.query(P,u.default.Scope.BLOCK))){if(L.start.node!==this.cursor.textNode){var M=u.default.find(L.start.node,!1);if(M==null)return;if(M instanceof u.default.Leaf){var U=M.split(L.start.offset);M.parent.insertBefore(this.cursor,U)}else M.insertBefore(this.cursor,L.start.node);this.cursor.attach()}this.cursor.format(P,T),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,L=this.scroll.length();P=Math.min(P,L-1),T=Math.min(P+T,L-1)-P;var M=void 0,U=this.scroll.leaf(P),$=a(U,2),Z=$[0],B=$[1];if(Z==null)return null;var N=Z.position(B,!0),H=a(N,2);M=H[0],B=H[1];var R=document.createRange();if(T>0){R.setStart(M,B);var D=this.scroll.leaf(P+T),z=a(D,2);if(Z=z[0],B=z[1],Z==null)return null;var F=Z.position(B,!0),V=a(F,2);return M=V[0],B=V[1],R.setEnd(M,B),R.getBoundingClientRect()}else{var Y="left",q=void 0;return M instanceof Text?(B<M.data.length?(R.setStart(M,B),R.setEnd(M,B+1)):(R.setStart(M,B-1),R.setEnd(M,B),Y="right"),q=R.getBoundingClientRect()):(q=Z.domNode.getBoundingClientRect(),B>0&&(Y="right")),{bottom:q.top+q.height,height:q.height,left:q[Y],right:q[Y],top:q.top,width:0}}}},{key:"getNativeRange",value:function(){var P=document.getSelection();if(P==null||P.rangeCount<=0)return null;var T=P.getRangeAt(0);if(T==null)return null;var L=this.normalizeNative(T);return b.info("getNativeRange",L),L}},{key:"getRange",value:function(){var P=this.getNativeRange();if(P==null)return[null,null];var T=this.normalizedToRange(P);return[T,P]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(P){var T=this,L=[[P.start.node,P.start.offset]];P.native.collapsed||L.push([P.end.node,P.end.offset]);var M=L.map(function(Z){var B=a(Z,2),N=B[0],H=B[1],R=u.default.find(N,!0),D=R.offset(T.scroll);return H===0?D:R instanceof u.default.Container?D+R.length():D+R.index(N,H)}),U=Math.min(Math.max.apply(Math,g(M)),this.scroll.length()-1),$=Math.min.apply(Math,[U].concat(g(M)));return new O($,U-$)}},{key:"normalizeNative",value:function(P){if(!C(this.root,P.startContainer)||!P.collapsed&&!C(this.root,P.endContainer))return null;var T={start:{node:P.startContainer,offset:P.startOffset},end:{node:P.endContainer,offset:P.endOffset},native:P};return[T.start,T.end].forEach(function(L){for(var M=L.node,U=L.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>U)M=M.childNodes[U],U=0;else if(M.childNodes.length===U)M=M.lastChild,U=M instanceof Text?M.data.length:M.childNodes.length+1;else break;L.node=M,L.offset=U}),T}},{key:"rangeToNative",value:function(P){var T=this,L=P.collapsed?[P.index]:[P.index,P.index+P.length],M=[],U=this.scroll.length();return L.forEach(function($,Z){$=Math.min(U-1,$);var B=void 0,N=T.scroll.leaf($),H=a(N,2),R=H[0],D=H[1],z=R.position(D,Z!==0),F=a(z,2);B=F[0],D=F[1],M.push(B,D)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(P){var T=this.lastRange;if(T!=null){var L=this.getBounds(T.index,T.length);if(L!=null){var M=this.scroll.length()-1,U=this.scroll.line(Math.min(T.index,M)),$=a(U,1),Z=$[0],B=Z;if(T.length>0){var N=this.scroll.line(Math.min(T.index+T.length,M)),H=a(N,1);B=H[0]}if(!(Z==null||B==null)){var R=P.getBoundingClientRect();L.top<R.top?P.scrollTop-=R.top-L.top:L.bottom>R.bottom&&(P.scrollTop+=L.bottom-R.bottom)}}}}},{key:"setNativeRange",value:function(P,T){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T,U=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(b.info("setNativeRange",P,T,L,M),!(P!=null&&(this.root.parentNode==null||P.parentNode==null||L.parentNode==null))){var $=document.getSelection();if($!=null)if(P!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||U||P!==Z.startContainer||T!==Z.startOffset||L!==Z.endContainer||M!==Z.endOffset){P.tagName=="BR"&&(T=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode),L.tagName=="BR"&&(M=[].indexOf.call(L.parentNode.childNodes,L),L=L.parentNode);var B=document.createRange();B.setStart(P,T),B.setEnd(L,M),$.removeAllRanges(),$.addRange(B)}}else $.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:E.default.sources.API;if(typeof T=="string"&&(L=T,T=!1),b.info("setRange",P),P!=null){var M=this.rangeToNative(P);this.setNativeRange.apply(this,g(M).concat([T]))}else this.setNativeRange(null);this.update(L)}},{key:"update",value:function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E.default.sources.USER,T=this.lastRange,L=this.getRange(),M=a(L,2),U=M[0],$=M[1];if(this.lastRange=U,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,_.default)(T,this.lastRange)){var Z;!this.composing&&$!=null&&$.native.collapsed&&$.start.node!==this.cursor.textNode&&this.cursor.restore();var B=[E.default.events.SELECTION_CHANGE,(0,v.default)(this.lastRange),(0,v.default)(T),P];if((Z=this.emitter).emit.apply(Z,[E.default.events.EDITOR_CHANGE].concat(B)),P!==E.default.sources.SILENT){var N;(N=this.emitter).emit.apply(N,B)}}}}]),S}();function C(S,x){try{x.parentNode}catch{return!1}return x instanceof Text&&(x=x.parentNode),S.contains(x)}n.Range=O,n.default=k},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(m,y){for(var p=0;p<y.length;p++){var g=y[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,y,p){return y&&E(m.prototype,y),p&&E(m,p),m}}(),o=function E(m,y,p){m===null&&(m=Function.prototype);var g=Object.getOwnPropertyDescriptor(m,y);if(g===void 0){var d=Object.getPrototypeOf(m);return d===null?void 0:E(d,y,p)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(p)}},l=i(0),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(){return v(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"insertInto",value:function(p,g){p.children.length===0?o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"insertInto",this).call(this,p,g):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),m}(u.default.Embed);h.blotName="break",h.tagName="BR",n.default=h},function(r,n,i){var a=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,h){_.__proto__=h}||function(_,h){for(var E in h)h.hasOwnProperty(E)&&(_[E]=h[E])};return function(_,h){w(_,h);function E(){this.constructor=_}_.prototype=h===null?Object.create(h):(E.prototype=h.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(44),l=i(30),u=i(1),f=function(w){a(_,w);function _(h){var E=w.call(this,h)||this;return E.build(),E}return _.prototype.appendChild=function(h){this.insertBefore(h)},_.prototype.attach=function(){w.prototype.attach.call(this),this.children.forEach(function(h){h.attach()})},_.prototype.build=function(){var h=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(E){try{var m=v(E);h.insertBefore(m,h.children.head||void 0)}catch(y){if(y instanceof u.ParchmentError)return;throw y}})},_.prototype.deleteAt=function(h,E){if(h===0&&E===this.length())return this.remove();this.children.forEachAt(h,E,function(m,y,p){m.deleteAt(y,p)})},_.prototype.descendant=function(h,E){var m=this.children.find(E),y=m[0],p=m[1];return h.blotName==null&&h(y)||h.blotName!=null&&y instanceof h?[y,p]:y instanceof _?y.descendant(h,p):[null,-1]},_.prototype.descendants=function(h,E,m){E===void 0&&(E=0),m===void 0&&(m=Number.MAX_VALUE);var y=[],p=m;return this.children.forEachAt(E,m,function(g,d,b){(h.blotName==null&&h(g)||h.blotName!=null&&g instanceof h)&&y.push(g),g instanceof _&&(y=y.concat(g.descendants(h,d,p))),p-=b}),y},_.prototype.detach=function(){this.children.forEach(function(h){h.detach()}),w.prototype.detach.call(this)},_.prototype.formatAt=function(h,E,m,y){this.children.forEachAt(h,E,function(p,g,d){p.formatAt(g,d,m,y)})},_.prototype.insertAt=function(h,E,m){var y=this.children.find(h),p=y[0],g=y[1];if(p)p.insertAt(g,E,m);else{var d=m==null?u.create("text",E):u.create(E,m);this.appendChild(d)}},_.prototype.insertBefore=function(h,E){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(m){return h instanceof m}))throw new u.ParchmentError("Cannot insert "+h.statics.blotName+" into "+this.statics.blotName);h.insertInto(this,E)},_.prototype.length=function(){return this.children.reduce(function(h,E){return h+E.length()},0)},_.prototype.moveChildren=function(h,E){this.children.forEach(function(m){h.insertBefore(m,E)})},_.prototype.optimize=function(h){if(w.prototype.optimize.call(this,h),this.children.length===0)if(this.statics.defaultChild!=null){var E=u.create(this.statics.defaultChild);this.appendChild(E),E.optimize(h)}else this.remove()},_.prototype.path=function(h,E){E===void 0&&(E=!1);var m=this.children.find(h,E),y=m[0],p=m[1],g=[[this,h]];return y instanceof _?g.concat(y.path(p,E)):(y!=null&&g.push([y,p]),g)},_.prototype.removeChild=function(h){this.children.remove(h)},_.prototype.replace=function(h){h instanceof _&&h.moveChildren(this),w.prototype.replace.call(this,h)},_.prototype.split=function(h,E){if(E===void 0&&(E=!1),!E){if(h===0)return this;if(h===this.length())return this.next}var m=this.clone();return this.parent.insertBefore(m,this.next),this.children.forEachAt(h,this.length(),function(y,p,g){y=y.split(p,E),m.appendChild(y)}),m},_.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},_.prototype.update=function(h,E){var m=this,y=[],p=[];h.forEach(function(g){g.target===m.domNode&&g.type==="childList"&&(y.push.apply(y,g.addedNodes),p.push.apply(p,g.removedNodes))}),p.forEach(function(g){if(!(g.parentNode!=null&&g.tagName!=="IFRAME"&&document.body.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var d=u.find(g);d!=null&&(d.domNode.parentNode==null||d.domNode.parentNode===m.domNode)&&d.detach()}}),y.filter(function(g){return g.parentNode==m.domNode}).sort(function(g,d){return g===d?0:g.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(g){var d=null;g.nextSibling!=null&&(d=u.find(g.nextSibling));var b=v(g);(b.next!=d||b.next==null)&&(b.parent!=null&&b.parent.removeChild(m),m.insertBefore(b,d||void 0))})},_}(l.default);function v(w){var _=u.find(w);if(_==null)try{_=u.create(w)}catch{_=u.create(u.Scope.INLINE),[].slice.call(w.childNodes).forEach(function(E){_.domNode.appendChild(E)}),w.parentNode&&w.parentNode.replaceChild(_.domNode,w),_.attach()}return _}n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,h){_.__proto__=h}||function(_,h){for(var E in h)h.hasOwnProperty(E)&&(_[E]=h[E])};return function(_,h){w(_,h);function E(){this.constructor=_}_.prototype=h===null?Object.create(h):(E.prototype=h.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),l=i(31),u=i(17),f=i(1),v=function(w){a(_,w);function _(h){var E=w.call(this,h)||this;return E.attributes=new l.default(E.domNode),E}return _.formats=function(h){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return h.tagName.toLowerCase()},_.prototype.format=function(h,E){var m=f.query(h);m instanceof o.default?this.attributes.attribute(m,E):E&&m!=null&&(h!==this.statics.blotName||this.formats()[h]!==E)&&this.replaceWith(h,E)},_.prototype.formats=function(){var h=this.attributes.values(),E=this.statics.formats(this.domNode);return E!=null&&(h[this.statics.blotName]=E),h},_.prototype.replaceWith=function(h,E){var m=w.prototype.replaceWith.call(this,h,E);return this.attributes.copy(m),m},_.prototype.update=function(h,E){var m=this;w.prototype.update.call(this,h,E),h.some(function(y){return y.target===m.domNode&&y.type==="attributes"})&&this.attributes.build()},_.prototype.wrap=function(h,E){var m=w.prototype.wrap.call(this,h,E);return m instanceof _&&m.statics.scope===this.statics.scope&&this.attributes.move(m),m},_}(u.default);n.default=v},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])};return function(v,w){f(v,w);function _(){this.constructor=v}v.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(30),l=i(1),u=function(f){a(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.value=function(w){return!0},v.prototype.index=function(w,_){return this.domNode===w||this.domNode.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(_,1):-1},v.prototype.position=function(w,_){var h=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return w>0&&(h+=1),[this.parent.domNode,h]},v.prototype.value=function(){var w;return w={},w[this.statics.blotName]=this.statics.value(this.domNode)||!0,w},v.scope=l.Scope.INLINE_BLOT,v}(o.default);n.default=u},function(r,n,i){var a=i(11),o=i(3),l={attributes:{compose:function(f,v,w){typeof f!="object"&&(f={}),typeof v!="object"&&(v={});var _=o(!0,{},v);w||(_=Object.keys(_).reduce(function(E,m){return _[m]!=null&&(E[m]=_[m]),E},{}));for(var h in f)f[h]!==void 0&&v[h]===void 0&&(_[h]=f[h]);return Object.keys(_).length>0?_:void 0},diff:function(f,v){typeof f!="object"&&(f={}),typeof v!="object"&&(v={});var w=Object.keys(f).concat(Object.keys(v)).reduce(function(_,h){return a(f[h],v[h])||(_[h]=v[h]===void 0?null:v[h]),_},{});return Object.keys(w).length>0?w:void 0},transform:function(f,v,w){if(typeof f!="object")return v;if(typeof v=="object"){if(!w)return v;var _=Object.keys(v).reduce(function(h,E){return f[E]===void 0&&(h[E]=v[E]),h},{});return Object.keys(_).length>0?_:void 0}}},iterator:function(f){return new u(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function u(f){this.ops=f,this.index=0,this.offset=0}u.prototype.hasNext=function(){return this.peekLength()<1/0},u.prototype.next=function(f){f||(f=1/0);var v=this.ops[this.index];if(v){var w=this.offset,_=l.length(v);if(f>=_-w?(f=_-w,this.index+=1,this.offset=0):this.offset+=f,typeof v.delete=="number")return{delete:f};var h={};return v.attributes&&(h.attributes=v.attributes),typeof v.retain=="number"?h.retain=f:typeof v.insert=="string"?h.insert=v.insert.substr(w,f):h.insert=v.insert,h}else return{retain:1/0}},u.prototype.peek=function(){return this.ops[this.index]},u.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},u.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"},u.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,v=this.index,w=this.next(),_=this.ops.slice(this.index);return this.offset=f,this.index=v,[w].concat(_)}else return[]},r.exports=l},function(r,n){var i=function(){function a(m,y){return y!=null&&m instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var u;try{u=Promise}catch{u=function(){}}function f(m,y,p,g,d){typeof y=="object"&&(p=y.depth,g=y.prototype,d=y.includeNonEnumerable,y=y.circular);var b=[],O=[],k=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof p>"u"&&(p=1/0);function C(S,x){if(S===null)return null;if(x===0)return S;var P,T;if(typeof S!="object")return S;if(a(S,o))P=new o;else if(a(S,l))P=new l;else if(a(S,u))P=new u(function(R,D){S.then(function(z){R(C(z,x-1))},function(z){D(C(z,x-1))})});else if(f.__isArray(S))P=[];else if(f.__isRegExp(S))P=new RegExp(S.source,E(S)),S.lastIndex&&(P.lastIndex=S.lastIndex);else if(f.__isDate(S))P=new Date(S.getTime());else{if(k&&Buffer.isBuffer(S))return Buffer.allocUnsafe?P=Buffer.allocUnsafe(S.length):P=new Buffer(S.length),S.copy(P),P;a(S,Error)?P=Object.create(S):typeof g>"u"?(T=Object.getPrototypeOf(S),P=Object.create(T)):(P=Object.create(g),T=g)}if(y){var L=b.indexOf(S);if(L!=-1)return O[L];b.push(S),O.push(P)}a(S,o)&&S.forEach(function(R,D){var z=C(D,x-1),F=C(R,x-1);P.set(z,F)}),a(S,l)&&S.forEach(function(R){var D=C(R,x-1);P.add(D)});for(var M in S){var U;T&&(U=Object.getOwnPropertyDescriptor(T,M)),!(U&&U.set==null)&&(P[M]=C(S[M],x-1))}if(Object.getOwnPropertySymbols)for(var $=Object.getOwnPropertySymbols(S),M=0;M<$.length;M++){var Z=$[M],B=Object.getOwnPropertyDescriptor(S,Z);B&&!B.enumerable&&!d||(P[Z]=C(S[Z],x-1),B.enumerable||Object.defineProperty(P,Z,{enumerable:!1}))}if(d)for(var N=Object.getOwnPropertyNames(S),M=0;M<N.length;M++){var H=N[M],B=Object.getOwnPropertyDescriptor(S,H);B&&B.enumerable||(P[H]=C(S[H],x-1),Object.defineProperty(P,H,{enumerable:!1}))}return P}return C(m,p)}f.clonePrototype=function(y){if(y===null)return null;var p=function(){};return p.prototype=y,new p};function v(m){return Object.prototype.toString.call(m)}f.__objToStr=v;function w(m){return typeof m=="object"&&v(m)==="[object Date]"}f.__isDate=w;function _(m){return typeof m=="object"&&v(m)==="[object Array]"}f.__isArray=_;function h(m){return typeof m=="object"&&v(m)==="[object RegExp]"}f.__isRegExp=h;function E(m){var y="";return m.global&&(y+="g"),m.ignoreCase&&(y+="i"),m.multiline&&(y+="m"),y}return f.__getRegExpFlags=E,f}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function P(T,L){var M=[],U=!0,$=!1,Z=void 0;try{for(var B=T[Symbol.iterator](),N;!(U=(N=B.next()).done)&&(M.push(N.value),!(L&&M.length===L));U=!0);}catch(H){$=!0,Z=H}finally{try{!U&&B.return&&B.return()}finally{if($)throw Z}}return M}return function(T,L){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return P(T,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function P(T,L){for(var M=0;M<L.length;M++){var U=L[M];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(T,U.key,U)}}return function(T,L,M){return L&&P(T.prototype,L),M&&P(T,M),T}}(),l=function P(T,L,M){T===null&&(T=Function.prototype);var U=Object.getOwnPropertyDescriptor(T,L);if(U===void 0){var $=Object.getPrototypeOf(T);return $===null?void 0:P($,L,M)}else{if("value"in U)return U.value;var Z=U.get;return Z===void 0?void 0:Z.call(M)}},u=i(0),f=b(u),v=i(8),w=b(v),_=i(4),h=b(_),E=i(16),m=b(E),y=i(13),p=b(y),g=i(25),d=b(g);function b(P){return P&&P.__esModule?P:{default:P}}function O(P,T){if(!(P instanceof T))throw new TypeError("Cannot call a class as a function")}function k(P,T){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:P}function C(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(P,T):P.__proto__=T)}function S(P){return P instanceof h.default||P instanceof _.BlockEmbed}var x=function(P){C(T,P);function T(L,M){O(this,T);var U=k(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,L));return U.emitter=M.emitter,Array.isArray(M.whitelist)&&(U.whitelist=M.whitelist.reduce(function($,Z){return $[Z]=!0,$},{})),U.domNode.addEventListener("DOMNodeInserted",function(){}),U.optimize(),U.enable(),U}return o(T,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,U){var $=this.line(M),Z=a($,2),B=Z[0],N=Z[1],H=this.line(M+U),R=a(H,1),D=R[0];if(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"deleteAt",this).call(this,M,U),D!=null&&B!==D&&N>0){if(B instanceof _.BlockEmbed||D instanceof _.BlockEmbed){this.optimize();return}if(B instanceof p.default){var z=B.newlineIndex(B.length(),!0);if(z>-1&&(B=B.split(z+1),B===D)){this.optimize();return}}else if(D instanceof p.default){var F=D.newlineIndex(0);F>-1&&D.split(F+1)}var V=D.children.head instanceof m.default?null:D.children.head;B.moveChildren(D,V),B.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,U,$,Z){this.whitelist!=null&&!this.whitelist[$]||(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"formatAt",this).call(this,M,U,$,Z),this.optimize())}},{key:"insertAt",value:function(M,U,$){if(!($!=null&&this.whitelist!=null&&!this.whitelist[U])){if(M>=this.length())if($==null||f.default.query(U,f.default.Scope.BLOCK)==null){var Z=f.default.create(this.statics.defaultChild);this.appendChild(Z),$==null&&U.endsWith(`
|
|
127
|
-
`)&&(U=U.slice(0,-1)),Z.insertAt(0,U,$)}else{var B=f.default.create(U,$);this.appendChild(B)}else l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertAt",this).call(this,M,U,$);this.optimize()}}},{key:"insertBefore",value:function(M,U){if(M.statics.scope===f.default.Scope.INLINE_BLOT){var $=f.default.create(this.statics.defaultChild);$.appendChild(M),M=$}l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertBefore",this).call(this,M,U)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(S,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,$=function Z(B,N,H){var R=[],D=H;return B.children.forEachAt(N,H,function(z,F,V){S(z)?R.push(z):z instanceof f.default.Container&&(R=R.concat(Z(z,F,D))),D-=V}),R};return $(this,M,U)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,M,U),M.length>0&&this.emitter.emit(w.default.events.SCROLL_OPTIMIZE,M,U))}},{key:"path",value:function(M){return l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var U=w.default.sources.USER;typeof M=="string"&&(U=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(w.default.events.SCROLL_BEFORE_UPDATE,U,M),l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(w.default.events.SCROLL_UPDATE,U,M)}}}]),T}(f.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[h.default,_.BlockEmbed,d.default],n.default=x},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var a=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},o=function(){function q(G,K){var X=[],Q=!0,te=!1,ee=void 0;try{for(var ae=G[Symbol.iterator](),oe;!(Q=(oe=ae.next()).done)&&(X.push(oe.value),!(K&&X.length===K));Q=!0);}catch(le){te=!0,ee=le}finally{try{!Q&&ae.return&&ae.return()}finally{if(te)throw ee}}return X}return function(G,K){if(Array.isArray(G))return G;if(Symbol.iterator in Object(G))return q(G,K);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function q(G,K){for(var X=0;X<K.length;X++){var Q=K[X];Q.enumerable=Q.enumerable||!1,Q.configurable=!0,"value"in Q&&(Q.writable=!0),Object.defineProperty(G,Q.key,Q)}}return function(G,K,X){return K&&q(G.prototype,K),X&&q(G,X),G}}(),u=i(21),f=P(u),v=i(11),w=P(v),_=i(3),h=P(_),E=i(2),m=P(E),y=i(20),p=P(y),g=i(0),d=P(g),b=i(5),O=P(b),k=i(10),C=P(k),S=i(9),x=P(S);function P(q){return q&&q.__esModule?q:{default:q}}function T(q,G,K){return G in q?Object.defineProperty(q,G,{value:K,enumerable:!0,configurable:!0,writable:!0}):q[G]=K,q}function L(q,G){if(!(q instanceof G))throw new TypeError("Cannot call a class as a function")}function M(q,G){if(!q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:q}function U(q,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);q.prototype=Object.create(G&&G.prototype,{constructor:{value:q,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(q,G):q.__proto__=G)}var $=(0,C.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",B=function(q){U(G,q),l(G,null,[{key:"match",value:function(X,Q){return Q=Y(Q),["altKey","ctrlKey","metaKey","shiftKey"].some(function(te){return!!Q[te]!==X[te]&&Q[te]!==null})?!1:Q.key===(X.which||X.keyCode)}}]);function G(K,X){L(this,G);var Q=M(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,K,X));return Q.bindings={},Object.keys(Q.options.bindings).forEach(function(te){te==="list autofill"&&K.scroll.whitelist!=null&&!K.scroll.whitelist.list||Q.options.bindings[te]&&Q.addBinding(Q.options.bindings[te])}),Q.addBinding({key:G.keys.ENTER,shiftKey:null},z),Q.addBinding({key:G.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(Q.addBinding({key:G.keys.BACKSPACE},{collapsed:!0},H),Q.addBinding({key:G.keys.DELETE},{collapsed:!0},R)):(Q.addBinding({key:G.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},H),Q.addBinding({key:G.keys.DELETE},{collapsed:!0,suffix:/^.?$/},R)),Q.addBinding({key:G.keys.BACKSPACE},{collapsed:!1},D),Q.addBinding({key:G.keys.DELETE},{collapsed:!1},D),Q.addBinding({key:G.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},H),Q.listen(),Q}return l(G,[{key:"addBinding",value:function(X){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ee=Y(X);if(ee==null||ee.key==null)return $.warn("Attempted to add invalid keyboard binding",ee);typeof Q=="function"&&(Q={handler:Q}),typeof te=="function"&&(te={handler:te}),ee=(0,h.default)(ee,Q,te),this.bindings[ee.key]=this.bindings[ee.key]||[],this.bindings[ee.key].push(ee)}},{key:"listen",value:function(){var X=this;this.quill.root.addEventListener("keydown",function(Q){if(!Q.defaultPrevented){var te=Q.which||Q.keyCode,ee=(X.bindings[te]||[]).filter(function(We){return G.match(Q,We)});if(ee.length!==0){var ae=X.quill.getSelection();if(!(ae==null||!X.quill.hasFocus())){var oe=X.quill.getLine(ae.index),le=o(oe,2),Te=le[0],Fe=le[1],fe=X.quill.getLeaf(ae.index),ne=o(fe,2),ge=ne[0],pe=ne[1],re=ae.length===0?[ge,pe]:X.quill.getLeaf(ae.index+ae.length),de=o(re,2),be=de[0],ye=de[1],Ie=ge instanceof d.default.Text?ge.value().slice(0,pe):"",Ee=be instanceof d.default.Text?be.value().slice(ye):"",ke={collapsed:ae.length===0,empty:ae.length===0&&Te.length()<=1,format:X.quill.getFormat(ae),offset:Fe,prefix:Ie,suffix:Ee},Ze=ee.some(function(We){if(We.collapsed!=null&&We.collapsed!==ke.collapsed||We.empty!=null&&We.empty!==ke.empty||We.offset!=null&&We.offset!==ke.offset)return!1;if(Array.isArray(We.format)){if(We.format.every(function(dt){return ke.format[dt]==null}))return!1}else if(a(We.format)==="object"&&!Object.keys(We.format).every(function(dt){return We.format[dt]===!0?ke.format[dt]!=null:We.format[dt]===!1?ke.format[dt]==null:(0,w.default)(We.format[dt],ke.format[dt])}))return!1;return We.prefix!=null&&!We.prefix.test(ke.prefix)||We.suffix!=null&&!We.suffix.test(ke.suffix)?!1:We.handler.call(X,ae,ke)!==!0});Ze&&Q.preventDefault()}}}})}}]),G}(x.default);B.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},B.DEFAULTS={bindings:{bold:V("bold"),italic:V("italic"),underline:V("underline"),indent:{key:B.keys.TAB,format:["blockquote","indent","list"],handler:function(G,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","+1",O.default.sources.USER)}},outdent:{key:B.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(G,K){if(K.collapsed&&K.offset!==0)return!0;this.quill.format("indent","-1",O.default.sources.USER)}},"outdent backspace":{key:B.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(G,K){K.format.indent!=null?this.quill.format("indent","-1",O.default.sources.USER):K.format.list!=null&&this.quill.format("list",!1,O.default.sources.USER)}},"indent code-block":F(!0),"outdent code-block":F(!1),"remove tab":{key:B.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(G){this.quill.deleteText(G.index-1,1,O.default.sources.USER)}},tab:{key:B.keys.TAB,handler:function(G){this.quill.history.cutoff();var K=new m.default().retain(G.index).delete(G.length).insert(" ");this.quill.updateContents(K,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(G.index+1,O.default.sources.SILENT)}},"list empty enter":{key:B.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(G,K){this.quill.format("list",!1,O.default.sources.USER),K.format.indent&&this.quill.format("indent",!1,O.default.sources.USER)}},"checklist enter":{key:B.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(G){var K=this.quill.getLine(G.index),X=o(K,2),Q=X[0],te=X[1],ee=(0,h.default)({},Q.formats(),{list:"checked"}),ae=new m.default().retain(G.index).insert(`
|
|
128
|
-
`,ee).retain(Q.length()-te-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,O.default.sources.USER),this.quill.setSelection(G.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:B.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(G,K){var X=this.quill.getLine(G.index),Q=o(X,2),te=Q[0],ee=Q[1],ae=new m.default().retain(G.index).insert(`
|
|
129
|
-
`,K.format).retain(te.length()-ee-1).retain(1,{header:null});this.quill.updateContents(ae,O.default.sources.USER),this.quill.setSelection(G.index+1,O.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(G,K){var X=K.prefix.length,Q=this.quill.getLine(G.index),te=o(Q,2),ee=te[0],ae=te[1];if(ae>X)return!0;var oe=void 0;switch(K.prefix.trim()){case"[]":case"[ ]":oe="unchecked";break;case"[x]":oe="checked";break;case"-":case"*":oe="bullet";break;default:oe="ordered"}this.quill.insertText(G.index," ",O.default.sources.USER),this.quill.history.cutoff();var le=new m.default().retain(G.index-ae).delete(X+1).retain(ee.length()-2-ae).retain(1,{list:oe});this.quill.updateContents(le,O.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(G.index-X,O.default.sources.SILENT)}},"code exit":{key:B.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(G){var K=this.quill.getLine(G.index),X=o(K,2),Q=X[0],te=X[1],ee=new m.default().retain(G.index+Q.length()-te-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ee,O.default.sources.USER)}},"embed left":N(B.keys.LEFT,!1),"embed left shift":N(B.keys.LEFT,!0),"embed right":N(B.keys.RIGHT,!1),"embed right shift":N(B.keys.RIGHT,!0)}};function N(q,G){var K,X=q===B.keys.LEFT?"prefix":"suffix";return K={key:q,shiftKey:G,altKey:null},T(K,X,/^$/),T(K,"handler",function(te){var ee=te.index;q===B.keys.RIGHT&&(ee+=te.length+1);var ae=this.quill.getLeaf(ee),oe=o(ae,1),le=oe[0];return le instanceof d.default.Embed?(q===B.keys.LEFT?G?this.quill.setSelection(te.index-1,te.length+1,O.default.sources.USER):this.quill.setSelection(te.index-1,O.default.sources.USER):G?this.quill.setSelection(te.index,te.length+1,O.default.sources.USER):this.quill.setSelection(te.index+te.length+1,O.default.sources.USER),!1):!0}),K}function H(q,G){if(!(q.index===0||this.quill.getLength()<=1)){var K=this.quill.getLine(q.index),X=o(K,1),Q=X[0],te={};if(G.offset===0){var ee=this.quill.getLine(q.index-1),ae=o(ee,1),oe=ae[0];if(oe!=null&&oe.length()>1){var le=Q.formats(),Te=this.quill.getFormat(q.index-1,1);te=p.default.attributes.diff(le,Te)||{}}}var Fe=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(G.prefix)?2:1;this.quill.deleteText(q.index-Fe,Fe,O.default.sources.USER),Object.keys(te).length>0&&this.quill.formatLine(q.index-Fe,Fe,te,O.default.sources.USER),this.quill.focus()}}function R(q,G){var K=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(G.suffix)?2:1;if(!(q.index>=this.quill.getLength()-K)){var X={},Q=0,te=this.quill.getLine(q.index),ee=o(te,1),ae=ee[0];if(G.offset>=ae.length()-1){var oe=this.quill.getLine(q.index+1),le=o(oe,1),Te=le[0];if(Te){var Fe=ae.formats(),fe=this.quill.getFormat(q.index,1);X=p.default.attributes.diff(Fe,fe)||{},Q=Te.length()}}this.quill.deleteText(q.index,K,O.default.sources.USER),Object.keys(X).length>0&&this.quill.formatLine(q.index+Q-1,K,X,O.default.sources.USER)}}function D(q){var G=this.quill.getLines(q),K={};if(G.length>1){var X=G[0].formats(),Q=G[G.length-1].formats();K=p.default.attributes.diff(Q,X)||{}}this.quill.deleteText(q,O.default.sources.USER),Object.keys(K).length>0&&this.quill.formatLine(q.index,1,K,O.default.sources.USER),this.quill.setSelection(q.index,O.default.sources.SILENT),this.quill.focus()}function z(q,G){var K=this;q.length>0&&this.quill.scroll.deleteAt(q.index,q.length);var X=Object.keys(G.format).reduce(function(Q,te){return d.default.query(te,d.default.Scope.BLOCK)&&!Array.isArray(G.format[te])&&(Q[te]=G.format[te]),Q},{});this.quill.insertText(q.index,`
|
|
130
|
-
`,X,O.default.sources.USER),this.quill.setSelection(q.index+1,O.default.sources.SILENT),this.quill.focus(),Object.keys(G.format).forEach(function(Q){X[Q]==null&&(Array.isArray(G.format[Q])||Q!=="link"&&K.quill.format(Q,G.format[Q],O.default.sources.USER))})}function F(q){return{key:B.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(K){var X=d.default.query("code-block"),Q=K.index,te=K.length,ee=this.quill.scroll.descendant(X,Q),ae=o(ee,2),oe=ae[0],le=ae[1];if(oe!=null){var Te=this.quill.getIndex(oe),Fe=oe.newlineIndex(le,!0)+1,fe=oe.newlineIndex(Te+le+te),ne=oe.domNode.textContent.slice(Fe,fe).split(`
|
|
131
|
-
`);le=0,ne.forEach(function(ge,pe){q?(oe.insertAt(Fe+le,X.TAB),le+=X.TAB.length,pe===0?Q+=X.TAB.length:te+=X.TAB.length):ge.startsWith(X.TAB)&&(oe.deleteAt(Fe+le,X.TAB.length),le-=X.TAB.length,pe===0?Q-=X.TAB.length:te-=X.TAB.length),le+=ge.length+1}),this.quill.update(O.default.sources.USER),this.quill.setSelection(Q,te,O.default.sources.SILENT)}}}}function V(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(K,X){this.quill.format(q,!X.format[q],O.default.sources.USER)}}}function Y(q){if(typeof q=="string"||typeof q=="number")return Y({key:q});if((typeof q>"u"?"undefined":a(q))==="object"&&(q=(0,f.default)(q,!1)),typeof q.key=="string")if(B.keys[q.key.toUpperCase()]!=null)q.key=B.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[Z]=q.shortKey,delete q.shortKey),q}n.default=B,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function p(g,d){var b=[],O=!0,k=!1,C=void 0;try{for(var S=g[Symbol.iterator](),x;!(O=(x=S.next()).done)&&(b.push(x.value),!(d&&b.length===d));O=!0);}catch(P){k=!0,C=P}finally{try{!O&&S.return&&S.return()}finally{if(k)throw C}}return b}return function(g,d){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return p(g,d);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function p(g,d,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,d);if(O===void 0){var k=Object.getPrototypeOf(g);return k===null?void 0:p(k,d,b)}else{if("value"in O)return O.value;var C=O.get;return C===void 0?void 0:C.call(b)}},l=function(){function p(g,d){for(var b=0;b<d.length;b++){var O=d[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,d,b){return d&&p(g.prototype,d),b&&p(g,b),g}}(),u=i(0),f=_(u),v=i(7),w=_(v);function _(p){return p&&p.__esModule?p:{default:p}}function h(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function E(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function m(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var y=function(p){m(g,p),l(g,null,[{key:"value",value:function(){}}]);function g(d,b){h(this,g);var O=E(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return O.selection=b,O.textNode=document.createTextNode(g.CONTENTS),O.domNode.appendChild(O.textNode),O._length=0,O}return l(g,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(b,O){if(this._length!==0)return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,b,O);for(var k=this,C=0;k!=null&&k.statics.scope!==f.default.Scope.BLOCK_BLOT;)C+=k.offset(k.parent),k=k.parent;k!=null&&(this._length=g.CONTENTS.length,k.optimize(),k.formatAt(C,g.CONTENTS.length,b,O),this._length=0)}},{key:"index",value:function(b,O){return b===this.textNode?0:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,b,O)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var b=this.textNode,O=this.selection.getNativeRange(),k=void 0,C=void 0,S=void 0;if(O!=null&&O.start.node===b&&O.end.node===b){var x=[b,O.start.offset,O.end.offset];k=x[0],C=x[1],S=x[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==g.CONTENTS){var P=this.textNode.data.split(g.CONTENTS).join("");this.next instanceof w.default?(k=this.next.domNode,this.next.insertAt(0,P),this.textNode.data=g.CONTENTS):(this.textNode.data=P,this.parent.insertBefore(f.default.create(this.textNode),this),this.textNode=document.createTextNode(g.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),C!=null){var T=[C,S].map(function(M){return Math.max(0,Math.min(k.data.length,M-1))}),L=a(T,2);return C=L[0],S=L[1],{startNode:k,startOffset:C,endNode:k,endOffset:S}}}}},{key:"update",value:function(b,O){var k=this;if(b.some(function(S){return S.type==="characterData"&&S.target===k.textNode})){var C=this.restore();C&&(O.range=C)}}},{key:"value",value:function(){return""}}]),g}(f.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=f(a),l=i(4),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(){return v(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m}(o.default.Container);h.allowedChildren=[u.default,l.BlockEmbed,h],n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var a=function(){function y(p,g){for(var d=0;d<g.length;d++){var b=g[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,g,d){return g&&y(p.prototype,g),d&&y(p,d),p}}(),o=function y(p,g,d){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,g);if(b===void 0){var O=Object.getPrototypeOf(p);return O===null?void 0:y(O,g,d)}else{if("value"in b)return b.value;var k=b.get;return k===void 0?void 0:k.call(d)}},l=i(0),u=f(l);function f(y){return y&&y.__esModule?y:{default:y}}function v(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}function w(y,p){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:y}function _(y,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);y.prototype=Object.create(p&&p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(y,p):y.__proto__=p)}var h=function(y){_(p,y);function p(){return v(this,p),w(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"value",value:function(d){var b=o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"value",this).call(this,d);return b.startsWith("rgb(")?(b=b.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+b.split(",").map(function(O){return("00"+parseInt(O).toString(16)).slice(-2)}).join("")):b}}]),p}(u.default.Attributor.Style),E=new u.default.Attributor.Class("color","ql-color",{scope:u.default.Scope.INLINE}),m=new h("color","color",{scope:u.default.Scope.INLINE});n.ColorAttributor=h,n.ColorClass=E,n.ColorStyle=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var a=function(){function m(y,p){for(var g=0;g<p.length;g++){var d=p[g];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(y,d.key,d)}}return function(y,p,g){return p&&m(y.prototype,p),g&&m(y,g),y}}(),o=function m(y,p,g){y===null&&(y=Function.prototype);var d=Object.getOwnPropertyDescriptor(y,p);if(d===void 0){var b=Object.getPrototypeOf(y);return b===null?void 0:m(b,p,g)}else{if("value"in d)return d.value;var O=d.get;return O===void 0?void 0:O.call(g)}},l=i(6),u=f(l);function f(m){return m&&m.__esModule?m:{default:m}}function v(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function w(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function _(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var h=function(m){_(y,m);function y(){return v(this,y),w(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(g,d){if(g!==this.statics.blotName||!d)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,g,d);d=this.constructor.sanitize(d),this.domNode.setAttribute("href",d)}}],[{key:"create",value:function(g){var d=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,g);return g=this.sanitize(g),d.setAttribute("href",g),d.setAttribute("rel","noopener noreferrer"),d.setAttribute("target","_blank"),d}},{key:"formats",value:function(g){return g.getAttribute("href")}},{key:"sanitize",value:function(g){return E(g,this.PROTOCOL_WHITELIST)?g:this.SANITIZED_URL}}]),y}(u.default);h.blotName="link",h.tagName="A",h.SANITIZED_URL="about:blank",h.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function E(m,y){var p=document.createElement("a");p.href=m;var g=p.href.slice(0,p.href.indexOf(":"));return y.indexOf(g)>-1}n.default=h,n.sanitize=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=function(){function y(p,g){for(var d=0;d<g.length;d++){var b=g[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,g,d){return g&&y(p.prototype,g),d&&y(p,d),p}}(),l=i(23),u=w(l),f=i(107),v=w(f);function w(y){return y&&y.__esModule?y:{default:y}}function _(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}var h=0;function E(y,p){y.setAttribute(p,y.getAttribute(p)!=="true")}var m=function(){function y(p){var g=this;_(this,y),this.select=p,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(){g.togglePicker()}),this.label.addEventListener("keydown",function(d){switch(d.keyCode){case u.default.keys.ENTER:g.togglePicker();break;case u.default.keys.ESCAPE:g.escape(),d.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),E(this.label,"aria-expanded"),E(this.options,"aria-hidden")}},{key:"buildItem",value:function(g){var d=this,b=document.createElement("span");return b.tabIndex="0",b.setAttribute("role","button"),b.classList.add("ql-picker-item"),g.hasAttribute("value")&&b.setAttribute("data-value",g.getAttribute("value")),g.textContent&&b.setAttribute("data-label",g.textContent),b.addEventListener("click",function(){d.selectItem(b,!0)}),b.addEventListener("keydown",function(O){switch(O.keyCode){case u.default.keys.ENTER:d.selectItem(b,!0),O.preventDefault();break;case u.default.keys.ESCAPE:d.escape(),O.preventDefault();break}}),b}},{key:"buildLabel",value:function(){var g=document.createElement("span");return g.classList.add("ql-picker-label"),g.innerHTML=v.default,g.tabIndex="0",g.setAttribute("role","button"),g.setAttribute("aria-expanded","false"),this.container.appendChild(g),g}},{key:"buildOptions",value:function(){var g=this,d=document.createElement("span");d.classList.add("ql-picker-options"),d.setAttribute("aria-hidden","true"),d.tabIndex="-1",d.id="ql-picker-options-"+h,h+=1,this.label.setAttribute("aria-controls",d.id),this.options=d,[].slice.call(this.select.options).forEach(function(b){var O=g.buildItem(b);d.appendChild(O),b.selected===!0&&g.selectItem(O)}),this.container.appendChild(d)}},{key:"buildPicker",value:function(){var g=this;[].slice.call(this.select.attributes).forEach(function(d){g.container.setAttribute(d.name,d.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var g=this;this.close(),setTimeout(function(){return g.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(g){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,b=this.container.querySelector(".ql-selected");if(g!==b&&(b!=null&&b.classList.remove("ql-selected"),g!=null&&(g.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(g.parentNode.children,g),g.hasAttribute("data-value")?this.label.setAttribute("data-value",g.getAttribute("data-value")):this.label.removeAttribute("data-value"),g.hasAttribute("data-label")?this.label.setAttribute("data-label",g.getAttribute("data-label")):this.label.removeAttribute("data-label"),d))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var O=document.createEvent("Event");O.initEvent("change",!0,!0),this.select.dispatchEvent(O)}this.close()}}},{key:"update",value:function(){var g=void 0;if(this.select.selectedIndex>-1){var d=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];g=this.select.options[this.select.selectedIndex],this.selectItem(d)}else this.selectItem(null);var b=g!=null&&g!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",b)}}]),y}();n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(0),o=$(a),l=i(5),u=$(l),f=i(4),v=$(f),w=i(16),_=$(w),h=i(25),E=$(h),m=i(24),y=$(m),p=i(35),g=$(p),d=i(6),b=$(d),O=i(22),k=$(O),C=i(7),S=$(C),x=i(55),P=$(x),T=i(42),L=$(T),M=i(23),U=$(M);function $(Z){return Z&&Z.__esModule?Z:{default:Z}}u.default.register({"blots/block":v.default,"blots/block/embed":f.BlockEmbed,"blots/break":_.default,"blots/container":E.default,"blots/cursor":y.default,"blots/embed":g.default,"blots/inline":b.default,"blots/scroll":k.default,"blots/text":S.default,"modules/clipboard":P.default,"modules/history":L.default,"modules/keyboard":U.default}),o.default.register(v.default,_.default,y.default,b.default,k.default,S.default),n.default=u.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(1),o=function(){function l(u){this.domNode=u,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(u){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof u=="string"&&(u=u.toUpperCase(),parseInt(u).toString()===u&&(u=parseInt(u))),typeof u=="number"?f=document.createElement(this.tagName[u-1]):this.tagName.indexOf(u)>-1?f=document.createElement(u):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var u=this.domNode.cloneNode(!1);return a.create(u)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},l.prototype.deleteAt=function(u,f){var v=this.isolate(u,f);v.remove()},l.prototype.formatAt=function(u,f,v,w){var _=this.isolate(u,f);if(a.query(v,a.Scope.BLOT)!=null&&w)_.wrap(v,w);else if(a.query(v,a.Scope.ATTRIBUTE)!=null){var h=a.create(this.statics.scope);_.wrap(h),h.format(v,w)}},l.prototype.insertAt=function(u,f,v){var w=v==null?a.create("text",f):a.create(f,v),_=this.split(u);this.parent.insertBefore(w,_)},l.prototype.insertInto=function(u,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var v=null;u.children.insertBefore(this,f),f!=null&&(v=f.domNode),(this.domNode.parentNode!=u.domNode||this.domNode.nextSibling!=v)&&u.domNode.insertBefore(this.domNode,v),this.parent=u,this.attach()},l.prototype.isolate=function(u,f){var v=this.split(u);return v.split(f),v},l.prototype.length=function(){return 1},l.prototype.offset=function(u){return u===void 0&&(u=this.parent),this.parent==null||this==u?0:this.parent.children.offset(this)+this.parent.offset(u)},l.prototype.optimize=function(u){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(u){u.parent!=null&&(u.parent.insertBefore(this,u.next),u.remove())},l.prototype.replaceWith=function(u,f){var v=typeof u=="string"?a.create(u,f):u;return v.replace(this),v},l.prototype.split=function(u,f){return u===0?this:this.next},l.prototype.update=function(u,f){},l.prototype.wrap=function(u,f){var v=typeof u=="string"?a.create(u,f):u;return this.parent!=null&&this.parent.insertBefore(v,this.next),v.appendChild(this),v},l.blotName="abstract",l}();n.default=o},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),o=i(32),l=i(33),u=i(1),f=function(){function v(w){this.attributes={},this.domNode=w,this.build()}return v.prototype.attribute=function(w,_){_?w.add(this.domNode,_)&&(w.value(this.domNode)!=null?this.attributes[w.attrName]=w:delete this.attributes[w.attrName]):(w.remove(this.domNode),delete this.attributes[w.attrName])},v.prototype.build=function(){var w=this;this.attributes={};var _=a.default.keys(this.domNode),h=o.default.keys(this.domNode),E=l.default.keys(this.domNode);_.concat(h).concat(E).forEach(function(m){var y=u.query(m,u.Scope.ATTRIBUTE);y instanceof a.default&&(w.attributes[y.attrName]=y)})},v.prototype.copy=function(w){var _=this;Object.keys(this.attributes).forEach(function(h){var E=_.attributes[h].value(_.domNode);w.format(h,E)})},v.prototype.move=function(w){var _=this;this.copy(w),Object.keys(this.attributes).forEach(function(h){_.attributes[h].remove(_.domNode)}),this.attributes={}},v.prototype.values=function(){var w=this;return Object.keys(this.attributes).reduce(function(_,h){return _[h]=w.attributes[h].value(w.domNode),_},{})},v}();n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])};return function(v,w){f(v,w);function _(){this.constructor=v}v.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12);function l(f,v){var w=f.getAttribute("class")||"";return w.split(/\s+/).filter(function(_){return _.indexOf(v+"-")===0})}var u=function(f){a(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.keys=function(w){return(w.getAttribute("class")||"").split(/\s+/).map(function(_){return _.split("-").slice(0,-1).join("-")})},v.prototype.add=function(w,_){return this.canAdd(w,_)?(this.remove(w),w.classList.add(this.keyName+"-"+_),!0):!1},v.prototype.remove=function(w){var _=l(w,this.keyName);_.forEach(function(h){w.classList.remove(h)}),w.classList.length===0&&w.removeAttribute("class")},v.prototype.value=function(w){var _=l(w,this.keyName)[0]||"",h=_.slice(this.keyName.length+1);return this.canAdd(w,h)?h:""},v}(o.default);n.default=u},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])};return function(v,w){f(v,w);function _(){this.constructor=v}v.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(12);function l(f){var v=f.split("-"),w=v.slice(1).map(function(_){return _[0].toUpperCase()+_.slice(1)}).join("");return v[0]+w}var u=function(f){a(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.keys=function(w){return(w.getAttribute("style")||"").split(";").map(function(_){var h=_.split(":");return h[0].trim()})},v.prototype.add=function(w,_){return this.canAdd(w,_)?(w.style[l(this.keyName)]=_,!0):!1},v.prototype.remove=function(w){w.style[l(this.keyName)]="",w.getAttribute("style")||w.removeAttribute("style")},v.prototype.value=function(w){var _=w.style[l(this.keyName)];return this.canAdd(w,_)?_:""},v}(o.default);n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function u(f,v){for(var w=0;w<v.length;w++){var _=v[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(f,_.key,_)}}return function(f,v,w){return v&&u(f.prototype,v),w&&u(f,w),f}}();function o(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(f,v){o(this,u),this.quill=f,this.options=v,this.modules={}}return a(u,[{key:"init",value:function(){var v=this;Object.keys(this.options.modules).forEach(function(w){v.modules[w]==null&&v.addModule(w)})}},{key:"addModule",value:function(v){var w=this.quill.constructor.import("modules/"+v);return this.modules[v]=new w(this.quill,this.options.modules[v]||{}),this.modules[v]}}]),u}();l.DEFAULTS={modules:{}},l.themes={default:l},n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function p(g,d){for(var b=0;b<d.length;b++){var O=d[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,d,b){return d&&p(g.prototype,d),b&&p(g,b),g}}(),o=function p(g,d,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,d);if(O===void 0){var k=Object.getPrototypeOf(g);return k===null?void 0:p(k,d,b)}else{if("value"in O)return O.value;var C=O.get;return C===void 0?void 0:C.call(b)}},l=i(0),u=w(l),f=i(7),v=w(f);function w(p){return p&&p.__esModule?p:{default:p}}function _(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function h(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function E(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var m="\uFEFF",y=function(p){E(g,p);function g(d){_(this,g);var b=h(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,d));return b.contentNode=document.createElement("span"),b.contentNode.setAttribute("contenteditable",!1),[].slice.call(b.domNode.childNodes).forEach(function(O){b.contentNode.appendChild(O)}),b.leftGuard=document.createTextNode(m),b.rightGuard=document.createTextNode(m),b.domNode.appendChild(b.leftGuard),b.domNode.appendChild(b.contentNode),b.domNode.appendChild(b.rightGuard),b}return a(g,[{key:"index",value:function(b,O){return b===this.leftGuard?0:b===this.rightGuard?1:o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,b,O)}},{key:"restore",value:function(b){var O=void 0,k=void 0,C=b.data.split(m).join("");if(b===this.leftGuard)if(this.prev instanceof v.default){var S=this.prev.length();this.prev.insertAt(S,C),O={startNode:this.prev.domNode,startOffset:S+C.length}}else k=document.createTextNode(C),this.parent.insertBefore(u.default.create(k),this),O={startNode:k,startOffset:C.length};else b===this.rightGuard&&(this.next instanceof v.default?(this.next.insertAt(0,C),O={startNode:this.next.domNode,startOffset:C.length}):(k=document.createTextNode(C),this.parent.insertBefore(u.default.create(k),this.next),O={startNode:k,startOffset:C.length}));return b.data=m,O}},{key:"update",value:function(b,O){var k=this;b.forEach(function(C){if(C.type==="characterData"&&(C.target===k.leftGuard||C.target===k.rightGuard)){var S=k.restore(C.target);S&&(O.range=S)}})}}]),g}(u.default.Embed);n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var a=i(0),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}var u={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},f=new o.default.Attributor.Attribute("align","align",u),v=new o.default.Attributor.Class("align","ql-align",u),w=new o.default.Attributor.Style("align","text-align",u);n.AlignAttribute=f,n.AlignClass=v,n.AlignStyle=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var a=i(0),o=u(a),l=i(26);function u(w){return w&&w.__esModule?w:{default:w}}var f=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),v=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});n.BackgroundClass=f,n.BackgroundStyle=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var a=i(0),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}var u={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},f=new o.default.Attributor.Attribute("direction","dir",u),v=new o.default.Attributor.Class("direction","ql-direction",u),w=new o.default.Attributor.Style("direction","direction",u);n.DirectionAttribute=f,n.DirectionClass=v,n.DirectionStyle=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var a=function(){function p(g,d){for(var b=0;b<d.length;b++){var O=d[b];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(g,O.key,O)}}return function(g,d,b){return d&&p(g.prototype,d),b&&p(g,b),g}}(),o=function p(g,d,b){g===null&&(g=Function.prototype);var O=Object.getOwnPropertyDescriptor(g,d);if(O===void 0){var k=Object.getPrototypeOf(g);return k===null?void 0:p(k,d,b)}else{if("value"in O)return O.value;var C=O.get;return C===void 0?void 0:C.call(b)}},l=i(0),u=f(l);function f(p){return p&&p.__esModule?p:{default:p}}function v(p,g){if(!(p instanceof g))throw new TypeError("Cannot call a class as a function")}function w(p,g){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:p}function _(p,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);p.prototype=Object.create(g&&g.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(p,g):p.__proto__=g)}var h={scope:u.default.Scope.INLINE,whitelist:["serif","monospace"]},E=new u.default.Attributor.Class("font","ql-font",h),m=function(p){_(g,p);function g(){return v(this,g),w(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return a(g,[{key:"value",value:function(b){return o(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,b).replace(/["']/g,"")}}]),g}(u.default.Attributor.Style),y=new m("font","font-family",h);n.FontStyle=y,n.FontClass=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var a=i(0),o=l(a);function l(v){return v&&v.__esModule?v:{default:v}}var u=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),f=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=u,n.SizeStyle=f},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var a=function(){function d(b,O){for(var k=0;k<O.length;k++){var C=O[k];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}return function(b,O,k){return O&&d(b.prototype,O),k&&d(b,k),b}}(),o=i(0),l=_(o),u=i(5),f=_(u),v=i(9),w=_(v);function _(d){return d&&d.__esModule?d:{default:d}}function h(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")}function E(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:d}function m(d,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var y=function(d){m(b,d);function b(O,k){h(this,b);var C=E(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,O,k));return C.lastRecorded=0,C.ignoreChange=!1,C.clear(),C.quill.on(f.default.events.EDITOR_CHANGE,function(S,x,P,T){S!==f.default.events.TEXT_CHANGE||C.ignoreChange||(!C.options.userOnly||T===f.default.sources.USER?C.record(x,P):C.transform(x))}),C.quill.keyboard.addBinding({key:"Z",shortKey:!0},C.undo.bind(C)),C.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},C.redo.bind(C)),/Win/i.test(navigator.platform)&&C.quill.keyboard.addBinding({key:"Y",shortKey:!0},C.redo.bind(C)),C}return a(b,[{key:"change",value:function(k,C){if(this.stack[k].length!==0){var S=this.stack[k].pop();this.stack[C].push(S),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(S[k],f.default.sources.USER),this.ignoreChange=!1;var x=g(S[k]);this.quill.setSelection(x)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(k,C){if(k.ops.length!==0){this.stack.redo=[];var S=this.quill.getContents().diff(C),x=Date.now();if(this.lastRecorded+this.options.delay>x&&this.stack.undo.length>0){var P=this.stack.undo.pop();S=S.compose(P.undo),k=P.redo.compose(k)}else this.lastRecorded=x;this.stack.undo.push({redo:k,undo:S}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(C){C.undo=k.transform(C.undo,!0),C.redo=k.transform(C.redo,!0)}),this.stack.redo.forEach(function(C){C.undo=k.transform(C.undo,!0),C.redo=k.transform(C.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),b}(w.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function p(d){var b=d.ops[d.ops.length-1];return b==null?!1:b.insert!=null?typeof b.insert=="string"&&b.insert.endsWith(`
|
|
132
|
-
`):b.attributes!=null?Object.keys(b.attributes).some(function(O){return l.default.query(O,l.default.Scope.BLOCK)!=null}):!1}function g(d){var b=d.reduce(function(k,C){return k+=C.delete||0,k},0),O=d.length()-b;return p(d)&&(O-=1),O}n.default=y,n.getLastChangeIndex=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var a=function(){function z(F,V){for(var Y=0;Y<V.length;Y++){var q=V[Y];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(F,q.key,q)}}return function(F,V,Y){return V&&z(F.prototype,V),Y&&z(F,Y),F}}(),o=function z(F,V,Y){F===null&&(F=Function.prototype);var q=Object.getOwnPropertyDescriptor(F,V);if(q===void 0){var G=Object.getPrototypeOf(F);return G===null?void 0:z(G,V,Y)}else{if("value"in q)return q.value;var K=q.get;return K===void 0?void 0:K.call(Y)}},l=i(3),u=x(l),f=i(2),v=x(f),w=i(8),_=x(w),h=i(23),E=x(h),m=i(34),y=x(m),p=i(59),g=x(p),d=i(60),b=x(d),O=i(28),k=x(O),C=i(61),S=x(C);function x(z){return z&&z.__esModule?z:{default:z}}function P(z,F){if(!(z instanceof F))throw new TypeError("Cannot call a class as a function")}function T(z,F){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:z}function L(z,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);z.prototype=Object.create(F&&F.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(z,F):z.__proto__=F)}var M=[!1,"center","right","justify"],U=["#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"],$=[!1,"serif","monospace"],Z=["1","2","3",!1],B=["small",!1,"large","huge"],N=function(z){L(F,z);function F(V,Y){P(this,F);var q=T(this,(F.__proto__||Object.getPrototypeOf(F)).call(this,V,Y)),G=function K(X){if(!document.body.contains(V.root))return document.body.removeEventListener("click",K);q.tooltip!=null&&!q.tooltip.root.contains(X.target)&&document.activeElement!==q.tooltip.textbox&&!q.quill.hasFocus()&&q.tooltip.hide(),q.pickers!=null&&q.pickers.forEach(function(Q){Q.container.contains(X.target)||Q.close()})};return V.emitter.listenDOM("click",document.body,G),q}return a(F,[{key:"addModule",value:function(Y){var q=o(F.prototype.__proto__||Object.getPrototypeOf(F.prototype),"addModule",this).call(this,Y);return Y==="toolbar"&&this.extendToolbar(q),q}},{key:"buildButtons",value:function(Y,q){Y.forEach(function(G){var K=G.getAttribute("class")||"";K.split(/\s+/).forEach(function(X){if(X.startsWith("ql-")&&(X=X.slice(3),q[X]!=null))if(X==="direction")G.innerHTML=q[X][""]+q[X].rtl;else if(typeof q[X]=="string")G.innerHTML=q[X];else{var Q=G.value||"";Q!=null&&q[X][Q]&&(G.innerHTML=q[X][Q])}})})}},{key:"buildPickers",value:function(Y,q){var G=this;this.pickers=Y.map(function(X){if(X.classList.contains("ql-align"))return X.querySelector("option")==null&&D(X,M),new b.default(X,q.align);if(X.classList.contains("ql-background")||X.classList.contains("ql-color")){var Q=X.classList.contains("ql-background")?"background":"color";return X.querySelector("option")==null&&D(X,U,Q==="background"?"#ffffff":"#000000"),new g.default(X,q[Q])}else return X.querySelector("option")==null&&(X.classList.contains("ql-font")?D(X,$):X.classList.contains("ql-header")?D(X,Z):X.classList.contains("ql-size")&&D(X,B)),new k.default(X)});var K=function(){G.pickers.forEach(function(Q){Q.update()})};this.quill.on(_.default.events.EDITOR_CHANGE,K)}}]),F}(y.default);N.DEFAULTS=(0,u.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var F=this,V=this.container.querySelector("input.ql-image[type=file]");V==null&&(V=document.createElement("input"),V.setAttribute("type","file"),V.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),V.classList.add("ql-image"),V.addEventListener("change",function(){if(V.files!=null&&V.files[0]!=null){var Y=new FileReader;Y.onload=function(q){var G=F.quill.getSelection(!0);F.quill.updateContents(new v.default().retain(G.index).delete(G.length).insert({image:q.target.result}),_.default.sources.USER),F.quill.setSelection(G.index+1,_.default.sources.SILENT),V.value=""},Y.readAsDataURL(V.files[0])}}),this.container.appendChild(V)),V.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var H=function(z){L(F,z);function F(V,Y){P(this,F);var q=T(this,(F.__proto__||Object.getPrototypeOf(F)).call(this,V,Y));return q.textbox=q.root.querySelector('input[type="text"]'),q.listen(),q}return a(F,[{key:"listen",value:function(){var Y=this;this.textbox.addEventListener("keydown",function(q){E.default.match(q,"enter")?(Y.save(),q.preventDefault()):E.default.match(q,"escape")&&(Y.cancel(),q.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:Y!==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-"+Y)||""),this.root.setAttribute("data-mode",Y)}},{key:"restoreFocus",value:function(){var Y=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=Y}},{key:"save",value:function(){var Y=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",Y,_.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",Y,_.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":Y=R(Y);case"formula":{if(!Y)break;var G=this.quill.getSelection(!0);if(G!=null){var K=G.index+G.length;this.quill.insertEmbed(K,this.root.getAttribute("data-mode"),Y,_.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(K+1," ",_.default.sources.USER),this.quill.setSelection(K+2,_.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),F}(S.default);function R(z){var F=z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return F?(F[1]||"https")+"://www.youtube.com/embed/"+F[2]+"?showinfo=0":(F=z.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(F[1]||"https")+"://player.vimeo.com/video/"+F[2]+"/":z}function D(z,F){var V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;F.forEach(function(Y){var q=document.createElement("option");Y===V?q.setAttribute("selected","selected"):q.setAttribute("value",Y),z.appendChild(q)})}n.BaseTooltip=H,n.default=N},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var u,f=this.iterator();u=f();)if(u===l)return!0;return!1},o.prototype.insertBefore=function(l,u){l&&(l.next=u,u!=null?(l.prev=u.prev,u.prev!=null&&(u.prev.next=l),u.prev=l,u===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var u=0,f=this.head;f!=null;){if(f===l)return u;u+=f.length(),f=f.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var u=l;return l!=null&&(l=l.next),u}},o.prototype.find=function(l,u){u===void 0&&(u=!1);for(var f,v=this.iterator();f=v();){var w=f.length();if(l<w||u&&l===w&&(f.next==null||f.next.length()!==0))return[f,l];l-=w}return[null,0]},o.prototype.forEach=function(l){for(var u,f=this.iterator();u=f();)l(u)},o.prototype.forEachAt=function(l,u,f){if(!(u<=0))for(var v=this.find(l),w=v[0],_=v[1],h,E=l-_,m=this.iterator(w);(h=m())&&E<l+u;){var y=h.length();l>E?f(h,l-E,Math.min(u,E+y-l)):f(h,0,Math.min(y,l+u-E)),E+=y}},o.prototype.map=function(l){return this.reduce(function(u,f){return u.push(l(f)),u},[])},o.prototype.reduce=function(l,u){for(var f,v=this.iterator();f=v();)u=l(u,f);return u},o}();n.default=a},function(r,n,i){var a=this&&this.__extends||function(){var w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,h){_.__proto__=h}||function(_,h){for(var E in h)h.hasOwnProperty(E)&&(_[E]=h[E])};return function(_,h){w(_,h);function E(){this.constructor=_}_.prototype=h===null?Object.create(h):(E.prototype=h.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),l=i(1),u={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,v=function(w){a(_,w);function _(h){var E=w.call(this,h)||this;return E.scroll=E,E.observer=new MutationObserver(function(m){E.update(m)}),E.observer.observe(E.domNode,u),E.attach(),E}return _.prototype.detach=function(){w.prototype.detach.call(this),this.observer.disconnect()},_.prototype.deleteAt=function(h,E){this.update(),h===0&&E===this.length()?this.children.forEach(function(m){m.remove()}):w.prototype.deleteAt.call(this,h,E)},_.prototype.formatAt=function(h,E,m,y){this.update(),w.prototype.formatAt.call(this,h,E,m,y)},_.prototype.insertAt=function(h,E,m){this.update(),w.prototype.insertAt.call(this,h,E,m)},_.prototype.optimize=function(h,E){var m=this;h===void 0&&(h=[]),E===void 0&&(E={}),w.prototype.optimize.call(this,E);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)h.push(y.pop());for(var p=function(O,k){k===void 0&&(k=!0),!(O==null||O===m)&&O.domNode.parentNode!=null&&(O.domNode[l.DATA_KEY].mutations==null&&(O.domNode[l.DATA_KEY].mutations=[]),k&&p(O.parent))},g=function(O){O.domNode[l.DATA_KEY]==null||O.domNode[l.DATA_KEY].mutations==null||(O instanceof o.default&&O.children.forEach(g),O.optimize(E))},d=h,b=0;d.length>0;b+=1){if(b>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(d.forEach(function(O){var k=l.find(O.target,!0);k!=null&&(k.domNode===O.target&&(O.type==="childList"?(p(l.find(O.previousSibling,!1)),[].forEach.call(O.addedNodes,function(C){var S=l.find(C,!1);p(S,!1),S instanceof o.default&&S.children.forEach(function(x){p(x,!1)})})):O.type==="attributes"&&p(k.prev)),p(k))}),this.children.forEach(g),d=[].slice.call(this.observer.takeRecords()),y=d.slice();y.length>0;)h.push(y.pop())}},_.prototype.update=function(h,E){var m=this;E===void 0&&(E={}),h=h||this.observer.takeRecords(),h.map(function(y){var p=l.find(y.target,!0);return p==null?null:p.domNode[l.DATA_KEY].mutations==null?(p.domNode[l.DATA_KEY].mutations=[y],p):(p.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===m||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],E)}),this.domNode[l.DATA_KEY].mutations!=null&&w.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,E),this.optimize(h,E)},_.blotName="scroll",_.defaultChild="block",_.scope=l.Scope.BLOCK_BLOT,_.tagName="DIV",_}(o.default);n.default=v},function(r,n,i){var a=this&&this.__extends||function(){var v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,_){w.__proto__=_}||function(w,_){for(var h in _)_.hasOwnProperty(h)&&(w[h]=_[h])};return function(w,_){v(w,_);function h(){this.constructor=w}w.prototype=_===null?Object.create(_):(h.prototype=_.prototype,new h)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(18),l=i(1);function u(v,w){if(Object.keys(v).length!==Object.keys(w).length)return!1;for(var _ in v)if(v[_]!==w[_])return!1;return!0}var f=function(v){a(w,v);function w(){return v!==null&&v.apply(this,arguments)||this}return w.formats=function(_){if(_.tagName!==w.tagName)return v.formats.call(this,_)},w.prototype.format=function(_,h){var E=this;_===this.statics.blotName&&!h?(this.children.forEach(function(m){m instanceof o.default||(m=m.wrap(w.blotName,!0)),E.attributes.copy(m)}),this.unwrap()):v.prototype.format.call(this,_,h)},w.prototype.formatAt=function(_,h,E,m){if(this.formats()[E]!=null||l.query(E,l.Scope.ATTRIBUTE)){var y=this.isolate(_,h);y.format(E,m)}else v.prototype.formatAt.call(this,_,h,E,m)},w.prototype.optimize=function(_){v.prototype.optimize.call(this,_);var h=this.formats();if(Object.keys(h).length===0)return this.unwrap();var E=this.next;E instanceof w&&E.prev===this&&u(h,E.formats())&&(E.moveChildren(this),E.remove())},w.blotName="inline",w.scope=l.Scope.INLINE_BLOT,w.tagName="SPAN",w}(o.default);n.default=f},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])};return function(v,w){f(v,w);function _(){this.constructor=v}v.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(18),l=i(1),u=function(f){a(v,f);function v(){return f!==null&&f.apply(this,arguments)||this}return v.formats=function(w){var _=l.query(v.blotName).tagName;if(w.tagName!==_)return f.formats.call(this,w)},v.prototype.format=function(w,_){l.query(w,l.Scope.BLOCK)!=null&&(w===this.statics.blotName&&!_?this.replaceWith(v.blotName):f.prototype.format.call(this,w,_))},v.prototype.formatAt=function(w,_,h,E){l.query(h,l.Scope.BLOCK)!=null?this.format(h,E):f.prototype.formatAt.call(this,w,_,h,E)},v.prototype.insertAt=function(w,_,h){if(h==null||l.query(_,l.Scope.INLINE)!=null)f.prototype.insertAt.call(this,w,_,h);else{var E=this.split(w),m=l.create(_,h);E.parent.insertBefore(m,E)}},v.prototype.update=function(w,_){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,w,_)},v.blotName="block",v.scope=l.Scope.BLOCK_BLOT,v.tagName="P",v}(o.default);n.default=u},function(r,n,i){var a=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,v){f.__proto__=v}||function(f,v){for(var w in v)v.hasOwnProperty(w)&&(f[w]=v[w])};return function(f,v){u(f,v);function w(){this.constructor=f}f.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(19),l=function(u){a(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.formats=function(v){},f.prototype.format=function(v,w){u.prototype.formatAt.call(this,0,this.length(),v,w)},f.prototype.formatAt=function(v,w,_,h){v===0&&w===this.length()?this.format(_,h):u.prototype.formatAt.call(this,v,w,_,h)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f}(o.default);n.default=l},function(r,n,i){var a=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,w){v.__proto__=w}||function(v,w){for(var _ in w)w.hasOwnProperty(_)&&(v[_]=w[_])};return function(v,w){f(v,w);function _(){this.constructor=v}v.prototype=w===null?Object.create(w):(_.prototype=w.prototype,new _)}}();Object.defineProperty(n,"__esModule",{value:!0});var o=i(19),l=i(1),u=function(f){a(v,f);function v(w){var _=f.call(this,w)||this;return _.text=_.statics.value(_.domNode),_}return v.create=function(w){return document.createTextNode(w)},v.value=function(w){var _=w.data;return _.normalize&&(_=_.normalize()),_},v.prototype.deleteAt=function(w,_){this.domNode.data=this.text=this.text.slice(0,w)+this.text.slice(w+_)},v.prototype.index=function(w,_){return this.domNode===w?_:-1},v.prototype.insertAt=function(w,_,h){h==null?(this.text=this.text.slice(0,w)+_+this.text.slice(w),this.domNode.data=this.text):f.prototype.insertAt.call(this,w,_,h)},v.prototype.length=function(){return this.text.length},v.prototype.optimize=function(w){f.prototype.optimize.call(this,w),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof v&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},v.prototype.position=function(w,_){return[this.domNode,w]},v.prototype.split=function(w,_){if(_===void 0&&(_=!1),!_){if(w===0)return this;if(w===this.length())return this.next}var h=l.create(this.domNode.splitText(w));return this.parent.insertBefore(h,this.next),this.text=this.statics.value(this.domNode),h},v.prototype.update=function(w,_){var h=this;w.some(function(E){return E.type==="characterData"&&E.target===h.domNode})&&(this.text=this.statics.value(this.domNode))},v.prototype.value=function(){return this.text},v.blotName="text",v.scope=l.Scope.INLINE_BLOT,v}(o.default);n.default=u},function(r,n,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,u){return arguments.length>1&&!this.contains(l)==!u?u:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,u){return u=u||0,this.substr(u,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,u){var f=this.toString();(typeof u!="number"||!isFinite(u)||Math.floor(u)!==u||u>f.length)&&(u=f.length),u-=l.length;var v=f.indexOf(l,u);return v!==-1&&v===u}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(u){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof u!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),v=f.length>>>0,w=arguments[1],_,h=0;h<v;h++)if(_=f[h],u.call(w,_,h,f))return _}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,a=1,o=0;function l(b,O,k){if(b==O)return b?[[o,b]]:[];(k<0||b.length<k)&&(k=null);var C=w(b,O),S=b.substring(0,C);b=b.substring(C),O=O.substring(C),C=_(b,O);var x=b.substring(b.length-C);b=b.substring(0,b.length-C),O=O.substring(0,O.length-C);var P=u(b,O);return S&&P.unshift([o,S]),x&&P.push([o,x]),E(P),k!=null&&(P=p(P,k)),P=g(P),P}function u(b,O){var k;if(!b)return[[a,O]];if(!O)return[[i,b]];var C=b.length>O.length?b:O,S=b.length>O.length?O:b,x=C.indexOf(S);if(x!=-1)return k=[[a,C.substring(0,x)],[o,S],[a,C.substring(x+S.length)]],b.length>O.length&&(k[0][0]=k[2][0]=i),k;if(S.length==1)return[[i,b],[a,O]];var P=h(b,O);if(P){var T=P[0],L=P[1],M=P[2],U=P[3],$=P[4],Z=l(T,M),B=l(L,U);return Z.concat([[o,$]],B)}return f(b,O)}function f(b,O){for(var k=b.length,C=O.length,S=Math.ceil((k+C)/2),x=S,P=2*S,T=new Array(P),L=new Array(P),M=0;M<P;M++)T[M]=-1,L[M]=-1;T[x+1]=0,L[x+1]=0;for(var U=k-C,$=U%2!=0,Z=0,B=0,N=0,H=0,R=0;R<S;R++){for(var D=-R+Z;D<=R-B;D+=2){var z=x+D,F;D==-R||D!=R&&T[z-1]<T[z+1]?F=T[z+1]:F=T[z-1]+1;for(var V=F-D;F<k&&V<C&&b.charAt(F)==O.charAt(V);)F++,V++;if(T[z]=F,F>k)B+=2;else if(V>C)Z+=2;else if($){var Y=x+U-D;if(Y>=0&&Y<P&&L[Y]!=-1){var q=k-L[Y];if(F>=q)return v(b,O,F,V)}}}for(var G=-R+N;G<=R-H;G+=2){var Y=x+G,q;G==-R||G!=R&&L[Y-1]<L[Y+1]?q=L[Y+1]:q=L[Y-1]+1;for(var K=q-G;q<k&&K<C&&b.charAt(k-q-1)==O.charAt(C-K-1);)q++,K++;if(L[Y]=q,q>k)H+=2;else if(K>C)N+=2;else if(!$){var z=x+U-G;if(z>=0&&z<P&&T[z]!=-1){var F=T[z],V=x+F-z;if(q=k-q,F>=q)return v(b,O,F,V)}}}}return[[i,b],[a,O]]}function v(b,O,k,C){var S=b.substring(0,k),x=O.substring(0,C),P=b.substring(k),T=O.substring(C),L=l(S,x),M=l(P,T);return L.concat(M)}function w(b,O){if(!b||!O||b.charAt(0)!=O.charAt(0))return 0;for(var k=0,C=Math.min(b.length,O.length),S=C,x=0;k<S;)b.substring(x,S)==O.substring(x,S)?(k=S,x=k):C=S,S=Math.floor((C-k)/2+k);return S}function _(b,O){if(!b||!O||b.charAt(b.length-1)!=O.charAt(O.length-1))return 0;for(var k=0,C=Math.min(b.length,O.length),S=C,x=0;k<S;)b.substring(b.length-S,b.length-x)==O.substring(O.length-S,O.length-x)?(k=S,x=k):C=S,S=Math.floor((C-k)/2+k);return S}function h(b,O){var k=b.length>O.length?b:O,C=b.length>O.length?O:b;if(k.length<4||C.length*2<k.length)return null;function S(B,N,H){for(var R=B.substring(H,H+Math.floor(B.length/4)),D=-1,z="",F,V,Y,q;(D=N.indexOf(R,D+1))!=-1;){var G=w(B.substring(H),N.substring(D)),K=_(B.substring(0,H),N.substring(0,D));z.length<K+G&&(z=N.substring(D-K,D)+N.substring(D,D+G),F=B.substring(0,H-K),V=B.substring(H+G),Y=N.substring(0,D-K),q=N.substring(D+G))}return z.length*2>=B.length?[F,V,Y,q,z]:null}var x=S(k,C,Math.ceil(k.length/4)),P=S(k,C,Math.ceil(k.length/2)),T;if(!x&&!P)return null;P?x?T=x[4].length>P[4].length?x:P:T=P:T=x;var L,M,U,$;b.length>O.length?(L=T[0],M=T[1],U=T[2],$=T[3]):(U=T[0],$=T[1],L=T[2],M=T[3]);var Z=T[4];return[L,M,U,$,Z]}function E(b){b.push([o,""]);for(var O=0,k=0,C=0,S="",x="",P;O<b.length;)switch(b[O][0]){case a:C++,x+=b[O][1],O++;break;case i:k++,S+=b[O][1],O++;break;case o:k+C>1?(k!==0&&C!==0&&(P=w(x,S),P!==0&&(O-k-C>0&&b[O-k-C-1][0]==o?b[O-k-C-1][1]+=x.substring(0,P):(b.splice(0,0,[o,x.substring(0,P)]),O++),x=x.substring(P),S=S.substring(P)),P=_(x,S),P!==0&&(b[O][1]=x.substring(x.length-P)+b[O][1],x=x.substring(0,x.length-P),S=S.substring(0,S.length-P))),k===0?b.splice(O-C,k+C,[a,x]):C===0?b.splice(O-k,k+C,[i,S]):b.splice(O-k-C,k+C,[i,S],[a,x]),O=O-k-C+(k?1:0)+(C?1:0)+1):O!==0&&b[O-1][0]==o?(b[O-1][1]+=b[O][1],b.splice(O,1)):O++,C=0,k=0,S="",x="";break}b[b.length-1][1]===""&&b.pop();var T=!1;for(O=1;O<b.length-1;)b[O-1][0]==o&&b[O+1][0]==o&&(b[O][1].substring(b[O][1].length-b[O-1][1].length)==b[O-1][1]?(b[O][1]=b[O-1][1]+b[O][1].substring(0,b[O][1].length-b[O-1][1].length),b[O+1][1]=b[O-1][1]+b[O+1][1],b.splice(O-1,1),T=!0):b[O][1].substring(0,b[O+1][1].length)==b[O+1][1]&&(b[O-1][1]+=b[O+1][1],b[O][1]=b[O][1].substring(b[O+1][1].length)+b[O+1][1],b.splice(O+1,1),T=!0)),O++;T&&E(b)}var m=l;m.INSERT=a,m.DELETE=i,m.EQUAL=o,r.exports=m;function y(b,O){if(O===0)return[o,b];for(var k=0,C=0;C<b.length;C++){var S=b[C];if(S[0]===i||S[0]===o){var x=k+S[1].length;if(O===x)return[C+1,b];if(O<x){b=b.slice();var P=O-k,T=[S[0],S[1].slice(0,P)],L=[S[0],S[1].slice(P)];return b.splice(C,1,T,L),[C+1,b]}else k=x}}throw new Error("cursor_pos is out of bounds!")}function p(b,O){var k=y(b,O),C=k[1],S=k[0],x=C[S],P=C[S+1];if(x==null)return b;if(x[0]!==o)return b;if(P!=null&&x[1]+P[1]===P[1]+x[1])return C.splice(S,2,P,x),d(C,S,2);if(P!=null&&P[1].indexOf(x[1])===0){C.splice(S,2,[P[0],x[1]],[0,x[1]]);var T=P[1].slice(x[1].length);return T.length>0&&C.splice(S+2,0,[P[0],T]),d(C,S,3)}else return b}function g(b){for(var O=!1,k=function(P){return P.charCodeAt(0)>=56320&&P.charCodeAt(0)<=57343},C=function(P){return P.charCodeAt(P.length-1)>=55296&&P.charCodeAt(P.length-1)<=56319},S=2;S<b.length;S+=1)b[S-2][0]===o&&C(b[S-2][1])&&b[S-1][0]===i&&k(b[S-1][1])&&b[S][0]===a&&k(b[S][1])&&(O=!0,b[S-1][1]=b[S-2][1].slice(-1)+b[S-1][1],b[S][1]=b[S-2][1].slice(-1)+b[S][1],b[S-2][1]=b[S-2][1].slice(0,-1));if(!O)return b;for(var x=[],S=0;S<b.length;S+=1)b[S][1].length>0&&x.push(b[S]);return x}function d(b,O,k){for(var C=O+k-1;C>=0&&C>=O-1;C--)if(C+1<b.length){var S=b[C],x=b[C+1];S[0]===x[1]&&b.splice(C,2,[S[0],S[1]+x[1]])}return b}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(a){var o=[];for(var l in a)o.push(l);return o}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?a:o,n.supported=a;function a(l){return Object.prototype.toString.call(l)=="[object Arguments]"}n.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,a="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(a=!1));function l(f,v,w){this.fn=f,this.context=v,this.once=w||!1}function u(){this._events=new o,this._eventsCount=0}u.prototype.eventNames=function(){var v=[],w,_;if(this._eventsCount===0)return v;for(_ in w=this._events)i.call(w,_)&&v.push(a?_.slice(1):_);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(w)):v},u.prototype.listeners=function(v,w){var _=a?a+v:v,h=this._events[_];if(w)return!!h;if(!h)return[];if(h.fn)return[h.fn];for(var E=0,m=h.length,y=new Array(m);E<m;E++)y[E]=h[E].fn;return y},u.prototype.emit=function(v,w,_,h,E,m){var y=a?a+v:v;if(!this._events[y])return!1;var p=this._events[y],g=arguments.length,d,b;if(p.fn){switch(p.once&&this.removeListener(v,p.fn,void 0,!0),g){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,w),!0;case 3:return p.fn.call(p.context,w,_),!0;case 4:return p.fn.call(p.context,w,_,h),!0;case 5:return p.fn.call(p.context,w,_,h,E),!0;case 6:return p.fn.call(p.context,w,_,h,E,m),!0}for(b=1,d=new Array(g-1);b<g;b++)d[b-1]=arguments[b];p.fn.apply(p.context,d)}else{var O=p.length,k;for(b=0;b<O;b++)switch(p[b].once&&this.removeListener(v,p[b].fn,void 0,!0),g){case 1:p[b].fn.call(p[b].context);break;case 2:p[b].fn.call(p[b].context,w);break;case 3:p[b].fn.call(p[b].context,w,_);break;case 4:p[b].fn.call(p[b].context,w,_,h);break;default:if(!d)for(k=1,d=new Array(g-1);k<g;k++)d[k-1]=arguments[k];p[b].fn.apply(p[b].context,d)}}return!0},u.prototype.on=function(v,w,_){var h=new l(w,_||this),E=a?a+v:v;return this._events[E]?this._events[E].fn?this._events[E]=[this._events[E],h]:this._events[E].push(h):(this._events[E]=h,this._eventsCount++),this},u.prototype.once=function(v,w,_){var h=new l(w,_||this,!0),E=a?a+v:v;return this._events[E]?this._events[E].fn?this._events[E]=[this._events[E],h]:this._events[E].push(h):(this._events[E]=h,this._eventsCount++),this},u.prototype.removeListener=function(v,w,_,h){var E=a?a+v:v;if(!this._events[E])return this;if(!w)return--this._eventsCount===0?this._events=new o:delete this._events[E],this;var m=this._events[E];if(m.fn)m.fn===w&&(!h||m.once)&&(!_||m.context===_)&&(--this._eventsCount===0?this._events=new o:delete this._events[E]);else{for(var y=0,p=[],g=m.length;y<g;y++)(m[y].fn!==w||h&&!m[y].once||_&&m[y].context!==_)&&p.push(m[y]);p.length?this._events[E]=p.length===1?p[0]:p:--this._eventsCount===0?this._events=new o:delete this._events[E]}return this},u.prototype.removeAllListeners=function(v){var w;return v?(w=a?a+v:v,this._events[w]&&(--this._eventsCount===0?this._events=new o:delete this._events[w])):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prototype.setMaxListeners=function(){return this},u.prefixed=a,u.EventEmitter=u,typeof r<"u"&&(r.exports=u)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var a=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},o=function(){function fe(ne,ge){var pe=[],re=!0,de=!1,be=void 0;try{for(var ye=ne[Symbol.iterator](),Ie;!(re=(Ie=ye.next()).done)&&(pe.push(Ie.value),!(ge&&pe.length===ge));re=!0);}catch(Ee){de=!0,be=Ee}finally{try{!re&&ye.return&&ye.return()}finally{if(de)throw be}}return pe}return function(ne,ge){if(Array.isArray(ne))return ne;if(Symbol.iterator in Object(ne))return fe(ne,ge);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function fe(ne,ge){for(var pe=0;pe<ge.length;pe++){var re=ge[pe];re.enumerable=re.enumerable||!1,re.configurable=!0,"value"in re&&(re.writable=!0),Object.defineProperty(ne,re.key,re)}}return function(ne,ge,pe){return ge&&fe(ne.prototype,ge),pe&&fe(ne,pe),ne}}(),u=i(3),f=L(u),v=i(2),w=L(v),_=i(0),h=L(_),E=i(5),m=L(E),y=i(10),p=L(y),g=i(9),d=L(g),b=i(36),O=i(37),k=i(13),C=L(k),S=i(26),x=i(38),P=i(39),T=i(40);function L(fe){return fe&&fe.__esModule?fe:{default:fe}}function M(fe,ne,ge){return ne in fe?Object.defineProperty(fe,ne,{value:ge,enumerable:!0,configurable:!0,writable:!0}):fe[ne]=ge,fe}function U(fe,ne){if(!(fe instanceof ne))throw new TypeError("Cannot call a class as a function")}function $(fe,ne){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne&&(typeof ne=="object"||typeof ne=="function")?ne:fe}function Z(fe,ne){if(typeof ne!="function"&&ne!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ne);fe.prototype=Object.create(ne&&ne.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ne&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ne):fe.__proto__=ne)}var B=(0,p.default)("quill:clipboard"),N="__ql-matcher",H=[[Node.TEXT_NODE,Fe],[Node.TEXT_NODE,oe],["br",te],[Node.ELEMENT_NODE,oe],[Node.ELEMENT_NODE,Q],[Node.ELEMENT_NODE,le],[Node.ELEMENT_NODE,X],[Node.ELEMENT_NODE,Te],["li",ae],["b",K.bind(K,"bold")],["i",K.bind(K,"italic")],["style",ee]],R=[b.AlignAttribute,x.DirectionAttribute].reduce(function(fe,ne){return fe[ne.keyName]=ne,fe},{}),D=[b.AlignStyle,O.BackgroundStyle,S.ColorStyle,x.DirectionStyle,P.FontStyle,T.SizeStyle].reduce(function(fe,ne){return fe[ne.keyName]=ne,fe},{}),z=function(fe){Z(ne,fe);function ne(ge,pe){U(this,ne);var re=$(this,(ne.__proto__||Object.getPrototypeOf(ne)).call(this,ge,pe));return re.quill.root.addEventListener("paste",re.onPaste.bind(re)),re.container=re.quill.addContainer("ql-clipboard"),re.container.setAttribute("contenteditable",!0),re.container.setAttribute("tabindex",-1),re.matchers=[],H.concat(re.options.matchers).forEach(function(de){var be=o(de,2),ye=be[0],Ie=be[1];!pe.matchVisual&&Ie===le||re.addMatcher(ye,Ie)}),re}return l(ne,[{key:"addMatcher",value:function(pe,re){this.matchers.push([pe,re])}},{key:"convert",value:function(pe){if(typeof pe=="string")return this.container.innerHTML=pe.replace(/\>\r?\n +\</g,"><"),this.convert();var re=this.quill.getFormat(this.quill.selection.savedRange.index);if(re[C.default.blotName]){var de=this.container.innerText;return this.container.innerHTML="",new w.default().insert(de,M({},C.default.blotName,re[C.default.blotName]))}var be=this.prepareMatching(),ye=o(be,2),Ie=ye[0],Ee=ye[1],ke=G(this.container,Ie,Ee);return Y(ke,`
|
|
133
|
-
`)&&ke.ops[ke.ops.length-1].attributes==null&&(ke=ke.compose(new w.default().retain(ke.length()-1).delete(1))),B.log("convert",this.container.innerHTML,ke),this.container.innerHTML="",ke}},{key:"dangerouslyPasteHTML",value:function(pe,re){var de=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;if(typeof pe=="string")this.quill.setContents(this.convert(pe),re),this.quill.setSelection(0,m.default.sources.SILENT);else{var be=this.convert(re);this.quill.updateContents(new w.default().retain(pe).concat(be),de),this.quill.setSelection(pe+be.length(),m.default.sources.SILENT)}}},{key:"onPaste",value:function(pe){var re=this;if(!(pe.defaultPrevented||!this.quill.isEnabled())){var de=this.quill.getSelection(),be=new w.default().retain(de.index),ye=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(m.default.sources.SILENT),setTimeout(function(){be=be.concat(re.convert()).delete(de.length),re.quill.updateContents(be,m.default.sources.USER),re.quill.setSelection(be.length()-de.length,m.default.sources.SILENT),re.quill.scrollingContainer.scrollTop=ye,re.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var pe=this,re=[],de=[];return this.matchers.forEach(function(be){var ye=o(be,2),Ie=ye[0],Ee=ye[1];switch(Ie){case Node.TEXT_NODE:de.push(Ee);break;case Node.ELEMENT_NODE:re.push(Ee);break;default:[].forEach.call(pe.container.querySelectorAll(Ie),function(ke){ke[N]=ke[N]||[],ke[N].push(Ee)});break}}),[re,de]}}]),ne}(d.default);z.DEFAULTS={matchers:[],matchVisual:!0};function F(fe,ne,ge){return(typeof ne>"u"?"undefined":a(ne))==="object"?Object.keys(ne).reduce(function(pe,re){return F(pe,re,ne[re])},fe):fe.reduce(function(pe,re){return re.attributes&&re.attributes[ne]?pe.push(re):pe.insert(re.insert,(0,f.default)({},M({},ne,ge),re.attributes))},new w.default)}function V(fe){if(fe.nodeType!==Node.ELEMENT_NODE)return{};var ne="__ql-computed-style";return fe[ne]||(fe[ne]=window.getComputedStyle(fe))}function Y(fe,ne){for(var ge="",pe=fe.ops.length-1;pe>=0&&ge.length<ne.length;--pe){var re=fe.ops[pe];if(typeof re.insert!="string")break;ge=re.insert+ge}return ge.slice(-1*ne.length)===ne}function q(fe){if(fe.childNodes.length===0)return!1;var ne=V(fe);return["block","list-item"].indexOf(ne.display)>-1}function G(fe,ne,ge){return fe.nodeType===fe.TEXT_NODE?ge.reduce(function(pe,re){return re(fe,pe)},new w.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(pe,re){var de=G(re,ne,ge);return re.nodeType===fe.ELEMENT_NODE&&(de=ne.reduce(function(be,ye){return ye(re,be)},de),de=(re[N]||[]).reduce(function(be,ye){return ye(re,be)},de)),pe.concat(de)},new w.default):new w.default}function K(fe,ne,ge){return F(ge,fe,!0)}function X(fe,ne){var ge=h.default.Attributor.Attribute.keys(fe),pe=h.default.Attributor.Class.keys(fe),re=h.default.Attributor.Style.keys(fe),de={};return ge.concat(pe).concat(re).forEach(function(be){var ye=h.default.query(be,h.default.Scope.ATTRIBUTE);ye!=null&&(de[ye.attrName]=ye.value(fe),de[ye.attrName])||(ye=R[be],ye!=null&&(ye.attrName===be||ye.keyName===be)&&(de[ye.attrName]=ye.value(fe)||void 0),ye=D[be],ye!=null&&(ye.attrName===be||ye.keyName===be)&&(ye=D[be],de[ye.attrName]=ye.value(fe)||void 0))}),Object.keys(de).length>0&&(ne=F(ne,de)),ne}function Q(fe,ne){var ge=h.default.query(fe);if(ge==null)return ne;if(ge.prototype instanceof h.default.Embed){var pe={},re=ge.value(fe);re!=null&&(pe[ge.blotName]=re,ne=new w.default().insert(pe,ge.formats(fe)))}else typeof ge.formats=="function"&&(ne=F(ne,ge.blotName,ge.formats(fe)));return ne}function te(fe,ne){return Y(ne,`
|
|
134
|
-
`)||ne.insert(`
|
|
135
|
-
`),ne}function ee(){return new w.default}function ae(fe,ne){var ge=h.default.query(fe);if(ge==null||ge.blotName!=="list-item"||!Y(ne,`
|
|
136
|
-
`))return ne;for(var pe=-1,re=fe.parentNode;!re.classList.contains("ql-clipboard");)(h.default.query(re)||{}).blotName==="list"&&(pe+=1),re=re.parentNode;return pe<=0?ne:ne.compose(new w.default().retain(ne.length()-1).retain(1,{indent:pe}))}function oe(fe,ne){return Y(ne,`
|
|
137
|
-
`)||(q(fe)||ne.length()>0&&fe.nextSibling&&q(fe.nextSibling))&&ne.insert(`
|
|
138
|
-
`),ne}function le(fe,ne){if(q(fe)&&fe.nextElementSibling!=null&&!Y(ne,`
|
|
139
|
-
|
|
140
|
-
`)){var ge=fe.offsetHeight+parseFloat(V(fe).marginTop)+parseFloat(V(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+ge*1.5&&ne.insert(`
|
|
141
|
-
`)}return ne}function Te(fe,ne){var ge={},pe=fe.style||{};return pe.fontStyle&&V(fe).fontStyle==="italic"&&(ge.italic=!0),pe.fontWeight&&(V(fe).fontWeight.startsWith("bold")||parseInt(V(fe).fontWeight)>=700)&&(ge.bold=!0),Object.keys(ge).length>0&&(ne=F(ne,ge)),parseFloat(pe.textIndent||0)>0&&(ne=new w.default().insert(" ").concat(ne)),ne}function Fe(fe,ne){var ge=fe.data;if(fe.parentNode.tagName==="O:P")return ne.insert(ge.trim());if(ge.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return ne;if(!V(fe.parentNode).whiteSpace.startsWith("pre")){var pe=function(de,be){return be=be.replace(/[^\u00a0]/g,""),be.length<1&&de?" ":be};ge=ge.replace(/\r\n/g," ").replace(/\n/g," "),ge=ge.replace(/\s\s+/g,pe.bind(pe,!0)),(fe.previousSibling==null&&q(fe.parentNode)||fe.previousSibling!=null&&q(fe.previousSibling))&&(ge=ge.replace(/^\s+/,pe.bind(pe,!1))),(fe.nextSibling==null&&q(fe.parentNode)||fe.nextSibling!=null&&q(fe.nextSibling))&&(ge=ge.replace(/\s+$/,pe.bind(pe,!1)))}return ne.insert(ge)}n.default=z,n.matchAttributor=X,n.matchBlot=Q,n.matchNewline=oe,n.matchSpacing=le,n.matchText=Fe},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(m,y){for(var p=0;p<y.length;p++){var g=y[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,y,p){return y&&E(m.prototype,y),p&&E(m,p),m}}(),o=function E(m,y,p){m===null&&(m=Function.prototype);var g=Object.getOwnPropertyDescriptor(m,y);if(g===void 0){var d=Object.getPrototypeOf(m);return d===null?void 0:E(d,y,p)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(p)}},l=i(6),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(){return v(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,[{key:"optimize",value:function(p){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,p),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),m}(u.default);h.blotName="bold",h.tagName=["STRONG","B"],n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var a=function(){function T(L,M){var U=[],$=!0,Z=!1,B=void 0;try{for(var N=L[Symbol.iterator](),H;!($=(H=N.next()).done)&&(U.push(H.value),!(M&&U.length===M));$=!0);}catch(R){Z=!0,B=R}finally{try{!$&&N.return&&N.return()}finally{if(Z)throw B}}return U}return function(L,M){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return T(L,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function T(L,M){for(var U=0;U<M.length;U++){var $=M[U];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(L,$.key,$)}}return function(L,M,U){return M&&T(L.prototype,M),U&&T(L,U),L}}(),l=i(2),u=p(l),f=i(0),v=p(f),w=i(5),_=p(w),h=i(10),E=p(h),m=i(9),y=p(m);function p(T){return T&&T.__esModule?T:{default:T}}function g(T,L,M){return L in T?Object.defineProperty(T,L,{value:M,enumerable:!0,configurable:!0,writable:!0}):T[L]=M,T}function d(T,L){if(!(T instanceof L))throw new TypeError("Cannot call a class as a function")}function b(T,L){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:T}function O(T,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);T.prototype=Object.create(L&&L.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(T,L):T.__proto__=L)}var k=(0,E.default)("quill:toolbar"),C=function(T){O(L,T);function L(M,U){d(this,L);var $=b(this,(L.__proto__||Object.getPrototypeOf(L)).call(this,M,U));if(Array.isArray($.options.container)){var Z=document.createElement("div");x(Z,$.options.container),M.container.parentNode.insertBefore(Z,M.container),$.container=Z}else typeof $.options.container=="string"?$.container=document.querySelector($.options.container):$.container=$.options.container;if(!($.container instanceof HTMLElement)){var B;return B=k.error("Container required for toolbar",$.options),b($,B)}return $.container.classList.add("ql-toolbar"),$.controls=[],$.handlers={},Object.keys($.options.handlers).forEach(function(N){$.addHandler(N,$.options.handlers[N])}),[].forEach.call($.container.querySelectorAll("button, select"),function(N){$.attach(N)}),$.quill.on(_.default.events.EDITOR_CHANGE,function(N,H){N===_.default.events.SELECTION_CHANGE&&$.update(H)}),$.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){var N=$.quill.selection.getRange(),H=a(N,1),R=H[0];$.update(R)}),$}return o(L,[{key:"addHandler",value:function(U,$){this.handlers[U]=$}},{key:"attach",value:function(U){var $=this,Z=[].find.call(U.classList,function(N){return N.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),U.tagName==="BUTTON"&&U.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){k.warn("ignoring attaching to disabled format",Z,U);return}if(v.default.query(Z)==null){k.warn("ignoring attaching to nonexistent format",Z,U);return}}var B=U.tagName==="SELECT"?"change":"click";U.addEventListener(B,function(N){var H=void 0;if(U.tagName==="SELECT"){if(U.selectedIndex<0)return;var R=U.options[U.selectedIndex];R.hasAttribute("selected")?H=!1:H=R.value||!1}else U.classList.contains("ql-active")?H=!1:H=U.value||!U.hasAttribute("value"),N.preventDefault();$.quill.focus();var D=$.quill.selection.getRange(),z=a(D,1),F=z[0];if($.handlers[Z]!=null)$.handlers[Z].call($,H);else if(v.default.query(Z).prototype instanceof v.default.Embed){if(H=prompt("Enter "+Z),!H)return;$.quill.updateContents(new u.default().retain(F.index).delete(F.length).insert(g({},Z,H)),_.default.sources.USER)}else $.quill.format(Z,H,_.default.sources.USER);$.update(F)}),this.controls.push([Z,U])}}},{key:"update",value:function(U){var $=U==null?{}:this.quill.getFormat(U);this.controls.forEach(function(Z){var B=a(Z,2),N=B[0],H=B[1];if(H.tagName==="SELECT"){var R=void 0;if(U==null)R=null;else if($[N]==null)R=H.querySelector("option[selected]");else if(!Array.isArray($[N])){var D=$[N];typeof D=="string"&&(D=D.replace(/\"/g,'\\"')),R=H.querySelector('option[value="'+D+'"]')}R==null?(H.value="",H.selectedIndex=-1):R.selected=!0}else if(U==null)H.classList.remove("ql-active");else if(H.hasAttribute("value")){var z=$[N]===H.getAttribute("value")||$[N]!=null&&$[N].toString()===H.getAttribute("value")||$[N]==null&&!H.getAttribute("value");H.classList.toggle("ql-active",z)}else H.classList.toggle("ql-active",$[N]!=null)})}}]),L}(y.default);C.DEFAULTS={};function S(T,L,M){var U=document.createElement("button");U.setAttribute("type","button"),U.classList.add("ql-"+L),M!=null&&(U.value=M),T.appendChild(U)}function x(T,L){Array.isArray(L[0])||(L=[L]),L.forEach(function(M){var U=document.createElement("span");U.classList.add("ql-formats"),M.forEach(function($){if(typeof $=="string")S(U,$);else{var Z=Object.keys($)[0],B=$[Z];Array.isArray(B)?P(U,Z,B):S(U,Z,B)}}),T.appendChild(U)})}function P(T,L,M){var U=document.createElement("select");U.classList.add("ql-"+L),M.forEach(function($){var Z=document.createElement("option");$!==!1?Z.setAttribute("value",$):Z.setAttribute("selected","selected"),U.appendChild(Z)}),T.appendChild(U)}C.DEFAULTS={container:null,handlers:{clean:function(){var L=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var U=this.quill.getFormat();Object.keys(U).forEach(function($){v.default.query($,v.default.Scope.INLINE)!=null&&L.quill.format($,!1)})}else this.quill.removeFormat(M,_.default.sources.USER)},direction:function(L){var M=this.quill.getFormat().align;L==="rtl"&&M==null?this.quill.format("align","right",_.default.sources.USER):!L&&M==="right"&&this.quill.format("align",!1,_.default.sources.USER),this.quill.format("direction",L,_.default.sources.USER)},indent:function(L){var M=this.quill.getSelection(),U=this.quill.getFormat(M),$=parseInt(U.indent||0);if(L==="+1"||L==="-1"){var Z=L==="+1"?1:-1;U.direction==="rtl"&&(Z*=-1),this.quill.format("indent",$+Z,_.default.sources.USER)}},link:function(L){L===!0&&(L=prompt("Enter link URL:")),this.quill.format("link",L,_.default.sources.USER)},list:function(L){var M=this.quill.getSelection(),U=this.quill.getFormat(M);L==="check"?U.list==="checked"||U.list==="unchecked"?this.quill.format("list",!1,_.default.sources.USER):this.quill.format("list","unchecked",_.default.sources.USER):this.quill.format("list",L,_.default.sources.USER)}}},n.default=C,n.addControls=x},function(r,n){r.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(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(m,y){for(var p=0;p<y.length;p++){var g=y[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,y,p){return y&&E(m.prototype,y),p&&E(m,p),m}}(),o=function E(m,y,p){m===null&&(m=Function.prototype);var g=Object.getOwnPropertyDescriptor(m,y);if(g===void 0){var d=Object.getPrototypeOf(m);return d===null?void 0:E(d,y,p)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(p)}},l=i(28),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(y,p){v(this,m);var g=w(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,y));return g.label.innerHTML=p,g.container.classList.add("ql-color-picker"),[].slice.call(g.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(d){d.classList.add("ql-primary")}),g}return a(m,[{key:"buildItem",value:function(p){var g=o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"buildItem",this).call(this,p);return g.style.backgroundColor=p.getAttribute("value")||"",g}},{key:"selectItem",value:function(p,g){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,p,g);var d=this.label.querySelector(".ql-color-label"),b=p&&p.getAttribute("data-value")||"";d&&(d.tagName==="line"?d.style.stroke=b:d.style.fill=b)}}]),m}(u.default);n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(m,y){for(var p=0;p<y.length;p++){var g=y[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,y,p){return y&&E(m.prototype,y),p&&E(m,p),m}}(),o=function E(m,y,p){m===null&&(m=Function.prototype);var g=Object.getOwnPropertyDescriptor(m,y);if(g===void 0){var d=Object.getPrototypeOf(m);return d===null?void 0:E(d,y,p)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(p)}},l=i(28),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(y,p){v(this,m);var g=w(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,y));return g.container.classList.add("ql-icon-picker"),[].forEach.call(g.container.querySelectorAll(".ql-picker-item"),function(d){d.innerHTML=p[d.getAttribute("data-value")||""]}),g.defaultItem=g.container.querySelector(".ql-selected"),g.selectItem(g.defaultItem),g}return a(m,[{key:"selectItem",value:function(p,g){o(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"selectItem",this).call(this,p,g),p=p||this.defaultItem,this.label.innerHTML=p.innerHTML}}]),m}(u.default);n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function u(f,v){for(var w=0;w<v.length;w++){var _=v[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(f,_.key,_)}}return function(f,v,w){return v&&u(f.prototype,v),w&&u(f,w),f}}();function o(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var l=function(){function u(f,v){var w=this;o(this,u),this.quill=f,this.boundsContainer=v||document.body,this.root=f.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){w.root.style.marginTop=-1*w.quill.root.scrollTop+"px"}),this.hide()}return a(u,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(v){var w=v.left+v.width/2-this.root.offsetWidth/2,_=v.bottom+this.quill.root.scrollTop;this.root.style.left=w+"px",this.root.style.top=_+"px",this.root.classList.remove("ql-flip");var h=this.boundsContainer.getBoundingClientRect(),E=this.root.getBoundingClientRect(),m=0;if(E.right>h.right&&(m=h.right-E.right,this.root.style.left=w+m+"px"),E.left<h.left&&(m=h.left-E.left,this.root.style.left=w+m+"px"),E.bottom>h.bottom){var y=E.bottom-E.top,p=v.bottom-v.top+y;this.root.style.top=_-p+"px",this.root.classList.add("ql-flip")}return m}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function P(T,L){var M=[],U=!0,$=!1,Z=void 0;try{for(var B=T[Symbol.iterator](),N;!(U=(N=B.next()).done)&&(M.push(N.value),!(L&&M.length===L));U=!0);}catch(H){$=!0,Z=H}finally{try{!U&&B.return&&B.return()}finally{if($)throw Z}}return M}return function(T,L){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return P(T,L);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function P(T,L,M){T===null&&(T=Function.prototype);var U=Object.getOwnPropertyDescriptor(T,L);if(U===void 0){var $=Object.getPrototypeOf(T);return $===null?void 0:P($,L,M)}else{if("value"in U)return U.value;var Z=U.get;return Z===void 0?void 0:Z.call(M)}},l=function(){function P(T,L){for(var M=0;M<L.length;M++){var U=L[M];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(T,U.key,U)}}return function(T,L,M){return L&&P(T.prototype,L),M&&P(T,M),T}}(),u=i(3),f=d(u),v=i(8),w=d(v),_=i(43),h=d(_),E=i(27),m=d(E),y=i(15),p=i(41),g=d(p);function d(P){return P&&P.__esModule?P:{default:P}}function b(P,T){if(!(P instanceof T))throw new TypeError("Cannot call a class as a function")}function O(P,T){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:P}function k(P,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);P.prototype=Object.create(T&&T.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(P,T):P.__proto__=T)}var C=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],S=function(P){k(T,P);function T(L,M){b(this,T),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=C);var U=O(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,L,M));return U.quill.container.classList.add("ql-snow"),U}return l(T,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),g.default),this.tooltip=new x(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(U,$){M.handlers.link.call(M,!$.format.link)})}}]),T}(h.default);S.DEFAULTS=(0,f.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){if(T){var L=this.quill.getSelection();if(L==null||L.length==0)return;var M=this.quill.getText(L);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var U=this.quill.theme.tooltip;U.edit("link",M)}else this.quill.format("link",!1)}}}}});var x=function(P){k(T,P);function T(L,M){b(this,T);var U=O(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,L,M));return U.preview=U.root.querySelector("a.ql-preview"),U}return l(T,[{key:"listen",value:function(){var M=this;o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(U){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),U.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(U){if(M.linkRange!=null){var $=M.linkRange;M.restoreFocus(),M.quill.formatText($,"link",!1,w.default.sources.USER),delete M.linkRange}U.preventDefault(),M.hide()}),this.quill.on(w.default.events.SELECTION_CHANGE,function(U,$,Z){if(U!=null){if(U.length===0&&Z===w.default.sources.USER){var B=M.quill.scroll.descendant(m.default,U.index),N=a(B,2),H=N[0],R=N[1];if(H!=null){M.linkRange=new y.Range(U.index-R,H.length());var D=m.default.formats(H.domNode);M.preview.textContent=D,M.preview.setAttribute("href",D),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){o(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),T}(_.BaseTooltip);x.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(""),n.default=S},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(29),o=re(a),l=i(36),u=i(38),f=i(64),v=i(65),w=re(v),_=i(66),h=re(_),E=i(67),m=re(E),y=i(37),p=i(26),g=i(39),d=i(40),b=i(56),O=re(b),k=i(68),C=re(k),S=i(27),x=re(S),P=i(69),T=re(P),L=i(70),M=re(L),U=i(71),$=re(U),Z=i(72),B=re(Z),N=i(73),H=re(N),R=i(13),D=re(R),z=i(74),F=re(z),V=i(75),Y=re(V),q=i(57),G=re(q),K=i(41),X=re(K),Q=i(28),te=re(Q),ee=i(59),ae=re(ee),oe=i(60),le=re(oe),Te=i(61),Fe=re(Te),fe=i(108),ne=re(fe),ge=i(62),pe=re(ge);function re(de){return de&&de.__esModule?de:{default:de}}o.default.register({"attributors/attribute/direction":u.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":p.ColorClass,"attributors/class/direction":u.DirectionClass,"attributors/class/font":g.FontClass,"attributors/class/size":d.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":p.ColorStyle,"attributors/style/direction":u.DirectionStyle,"attributors/style/font":g.FontStyle,"attributors/style/size":d.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":u.DirectionClass,"formats/indent":f.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":p.ColorStyle,"formats/font":g.FontClass,"formats/size":d.SizeClass,"formats/blockquote":w.default,"formats/code-block":D.default,"formats/header":h.default,"formats/list":m.default,"formats/bold":O.default,"formats/code":R.Code,"formats/italic":C.default,"formats/link":x.default,"formats/script":T.default,"formats/strike":M.default,"formats/underline":$.default,"formats/image":B.default,"formats/video":H.default,"formats/list/item":E.ListItem,"modules/formula":F.default,"modules/syntax":Y.default,"modules/toolbar":G.default,"themes/bubble":ne.default,"themes/snow":pe.default,"ui/icons":X.default,"ui/picker":te.default,"ui/icon-picker":le.default,"ui/color-picker":ae.default,"ui/tooltip":Fe.default},!0),n.default=o.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var a=function(){function m(y,p){for(var g=0;g<p.length;g++){var d=p[g];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(y,d.key,d)}}return function(y,p,g){return p&&m(y.prototype,p),g&&m(y,g),y}}(),o=function m(y,p,g){y===null&&(y=Function.prototype);var d=Object.getOwnPropertyDescriptor(y,p);if(d===void 0){var b=Object.getPrototypeOf(y);return b===null?void 0:m(b,p,g)}else{if("value"in d)return d.value;var O=d.get;return O===void 0?void 0:O.call(g)}},l=i(0),u=f(l);function f(m){return m&&m.__esModule?m:{default:m}}function v(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function w(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function _(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var h=function(m){_(y,m);function y(){return v(this,y),w(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"add",value:function(g,d){if(d==="+1"||d==="-1"){var b=this.value(g)||0;d=d==="+1"?b+1:b-1}return d===0?(this.remove(g),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,g,d)}},{key:"canAdd",value:function(g,d){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,g,d)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,g,parseInt(d))}},{key:"value",value:function(g){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,g))||void 0}}]),y}(u.default.Attributor.Class),E=new h("indent","ql-indent",{scope:u.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=E},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(4),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}function u(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function f(_,h){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:_}function v(_,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);_.prototype=Object.create(h&&h.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(_,h):_.__proto__=h)}var w=function(_){v(h,_);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);w.blotName="blockquote",w.tagName="blockquote",n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function h(E,m){for(var y=0;y<m.length;y++){var p=m[y];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(E,p.key,p)}}return function(E,m,y){return m&&h(E.prototype,m),y&&h(E,y),E}}(),o=i(4),l=u(o);function u(h){return h&&h.__esModule?h:{default:h}}function f(h,E){if(!(h instanceof E))throw new TypeError("Cannot call a class as a function")}function v(h,E){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:h}function w(h,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);h.prototype=Object.create(E&&E.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(h,E):h.__proto__=E)}var _=function(h){w(E,h);function E(){return f(this,E),v(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return a(E,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),E}(l.default);_.blotName="header",_.tagName=["H1","H2","H3","H4","H5","H6"],n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var a=function(){function b(O,k){for(var C=0;C<k.length;C++){var S=k[C];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(O,S.key,S)}}return function(O,k,C){return k&&b(O.prototype,k),C&&b(O,C),O}}(),o=function b(O,k,C){O===null&&(O=Function.prototype);var S=Object.getOwnPropertyDescriptor(O,k);if(S===void 0){var x=Object.getPrototypeOf(O);return x===null?void 0:b(x,k,C)}else{if("value"in S)return S.value;var P=S.get;return P===void 0?void 0:P.call(C)}},l=i(0),u=h(l),f=i(4),v=h(f),w=i(25),_=h(w);function h(b){return b&&b.__esModule?b:{default:b}}function E(b,O,k){return O in b?Object.defineProperty(b,O,{value:k,enumerable:!0,configurable:!0,writable:!0}):b[O]=k,b}function m(b,O){if(!(b instanceof O))throw new TypeError("Cannot call a class as a function")}function y(b,O){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:b}function p(b,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);b.prototype=Object.create(O&&O.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(b,O):b.__proto__=O)}var g=function(b){p(O,b);function O(){return m(this,O),y(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return a(O,[{key:"format",value:function(C,S){C===d.blotName&&!S?this.replaceWith(u.default.create(this.statics.scope)):o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,C,S)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(C,S){return this.parent.isolate(this.offset(this.parent),this.length()),C===this.parent.statics.blotName?(this.parent.replaceWith(C,S),this):(this.parent.unwrap(),o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,C,S))}}],[{key:"formats",value:function(C){return C.tagName===this.tagName?void 0:o(O.__proto__||Object.getPrototypeOf(O),"formats",this).call(this,C)}}]),O}(v.default);g.blotName="list-item",g.tagName="LI";var d=function(b){p(O,b),a(O,null,[{key:"create",value:function(C){var S=C==="ordered"?"OL":"UL",x=o(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,S);return(C==="checked"||C==="unchecked")&&x.setAttribute("data-checked",C==="checked"),x}},{key:"formats",value:function(C){if(C.tagName==="OL")return"ordered";if(C.tagName==="UL")return C.hasAttribute("data-checked")?C.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function O(k){m(this,O);var C=y(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,k)),S=function(P){if(P.target.parentNode===k){var T=C.statics.formats(k),L=u.default.find(P.target);T==="checked"?L.format("list","unchecked"):T==="unchecked"&&L.format("list","checked")}};return k.addEventListener("touchstart",S),k.addEventListener("mousedown",S),C}return a(O,[{key:"format",value:function(C,S){this.children.length>0&&this.children.tail.format(C,S)}},{key:"formats",value:function(){return E({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(C,S){if(C instanceof g)o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"insertBefore",this).call(this,C,S);else{var x=S==null?this.length():S.offset(this),P=this.split(x);P.parent.insertBefore(C,P)}}},{key:"optimize",value:function(C){o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,C);var S=this.next;S!=null&&S.prev===this&&S.statics.blotName===this.statics.blotName&&S.domNode.tagName===this.domNode.tagName&&S.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(S.moveChildren(this),S.remove())}},{key:"replace",value:function(C){if(C.statics.blotName!==this.statics.blotName){var S=u.default.create(this.statics.defaultChild);C.moveChildren(S),this.appendChild(S)}o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replace",this).call(this,C)}}]),O}(_.default);d.blotName="list",d.scope=u.default.Scope.BLOCK_BLOT,d.tagName=["OL","UL"],d.defaultChild="list-item",d.allowedChildren=[g],n.ListItem=g,n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(56),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}function u(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function f(_,h){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:_}function v(_,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);_.prototype=Object.create(h&&h.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(_,h):_.__proto__=h)}var w=function(_){v(h,_);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);w.blotName="italic",w.tagName=["EM","I"],n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function E(m,y){for(var p=0;p<y.length;p++){var g=y[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(m,g.key,g)}}return function(m,y,p){return y&&E(m.prototype,y),p&&E(m,p),m}}(),o=function E(m,y,p){m===null&&(m=Function.prototype);var g=Object.getOwnPropertyDescriptor(m,y);if(g===void 0){var d=Object.getPrototypeOf(m);return d===null?void 0:E(d,y,p)}else{if("value"in g)return g.value;var b=g.get;return b===void 0?void 0:b.call(p)}},l=i(6),u=f(l);function f(E){return E&&E.__esModule?E:{default:E}}function v(E,m){if(!(E instanceof m))throw new TypeError("Cannot call a class as a function")}function w(E,m){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:E}function _(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);E.prototype=Object.create(m&&m.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(E,m):E.__proto__=m)}var h=function(E){_(m,E);function m(){return v(this,m),w(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return a(m,null,[{key:"create",value:function(p){return p==="super"?document.createElement("sup"):p==="sub"?document.createElement("sub"):o(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,p)}},{key:"formats",value:function(p){if(p.tagName==="SUB")return"sub";if(p.tagName==="SUP")return"super"}}]),m}(u.default);h.blotName="script",h.tagName=["SUB","SUP"],n.default=h},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}function u(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function f(_,h){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:_}function v(_,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);_.prototype=Object.create(h&&h.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(_,h):_.__proto__=h)}var w=function(_){v(h,_);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);w.blotName="strike",w.tagName="S",n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=i(6),o=l(a);function l(_){return _&&_.__esModule?_:{default:_}}function u(_,h){if(!(_ instanceof h))throw new TypeError("Cannot call a class as a function")}function f(_,h){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:_}function v(_,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);_.prototype=Object.create(h&&h.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(_,h):_.__proto__=h)}var w=function(_){v(h,_);function h(){return u(this,h),f(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return h}(o.default);w.blotName="underline",w.tagName="U",n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(p,g){for(var d=0;d<g.length;d++){var b=g[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,g,d){return g&&y(p.prototype,g),d&&y(p,d),p}}(),o=function y(p,g,d){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,g);if(b===void 0){var O=Object.getPrototypeOf(p);return O===null?void 0:y(O,g,d)}else{if("value"in b)return b.value;var k=b.get;return k===void 0?void 0:k.call(d)}},l=i(0),u=v(l),f=i(27);function v(y){return y&&y.__esModule?y:{default:y}}function w(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}function _(y,p){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:y}function h(y,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);y.prototype=Object.create(p&&p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(y,p):y.__proto__=p)}var E=["alt","height","width"],m=function(y){h(p,y);function p(){return w(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"format",value:function(d,b){E.indexOf(d)>-1?b?this.domNode.setAttribute(d,b):this.domNode.removeAttribute(d):o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,d,b)}}],[{key:"create",value:function(d){var b=o(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,d);return typeof d=="string"&&b.setAttribute("src",this.sanitize(d)),b}},{key:"formats",value:function(d){return E.reduce(function(b,O){return d.hasAttribute(O)&&(b[O]=d.getAttribute(O)),b},{})}},{key:"match",value:function(d){return/\.(jpe?g|gif|png)$/.test(d)||/^data:image\/.+;base64/.test(d)}},{key:"sanitize",value:function(d){return(0,f.sanitize)(d,["http","https","data"])?d:"//:0"}},{key:"value",value:function(d){return d.getAttribute("src")}}]),p}(u.default.Embed);m.blotName="image",m.tagName="IMG",n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function y(p,g){for(var d=0;d<g.length;d++){var b=g[d];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(p,b.key,b)}}return function(p,g,d){return g&&y(p.prototype,g),d&&y(p,d),p}}(),o=function y(p,g,d){p===null&&(p=Function.prototype);var b=Object.getOwnPropertyDescriptor(p,g);if(b===void 0){var O=Object.getPrototypeOf(p);return O===null?void 0:y(O,g,d)}else{if("value"in b)return b.value;var k=b.get;return k===void 0?void 0:k.call(d)}},l=i(4),u=i(27),f=v(u);function v(y){return y&&y.__esModule?y:{default:y}}function w(y,p){if(!(y instanceof p))throw new TypeError("Cannot call a class as a function")}function _(y,p){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:y}function h(y,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);y.prototype=Object.create(p&&p.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(y,p):y.__proto__=p)}var E=["height","width"],m=function(y){h(p,y);function p(){return w(this,p),_(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return a(p,[{key:"format",value:function(d,b){E.indexOf(d)>-1?b?this.domNode.setAttribute(d,b):this.domNode.removeAttribute(d):o(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,d,b)}}],[{key:"create",value:function(d){var b=o(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,d);return b.setAttribute("frameborder","0"),b.setAttribute("allowfullscreen",!0),b.setAttribute("src",this.sanitize(d)),b}},{key:"formats",value:function(d){return E.reduce(function(b,O){return d.hasAttribute(O)&&(b[O]=d.getAttribute(O)),b},{})}},{key:"sanitize",value:function(d){return f.default.sanitize(d)}},{key:"value",value:function(d){return d.getAttribute("src")}}]),p}(l.BlockEmbed);m.blotName="video",m.className="ql-video",m.tagName="IFRAME",n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var a=function(){function d(b,O){for(var k=0;k<O.length;k++){var C=O[k];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(b,C.key,C)}}return function(b,O,k){return O&&d(b.prototype,O),k&&d(b,k),b}}(),o=function d(b,O,k){b===null&&(b=Function.prototype);var C=Object.getOwnPropertyDescriptor(b,O);if(C===void 0){var S=Object.getPrototypeOf(b);return S===null?void 0:d(S,O,k)}else{if("value"in C)return C.value;var x=C.get;return x===void 0?void 0:x.call(k)}},l=i(35),u=h(l),f=i(5),v=h(f),w=i(9),_=h(w);function h(d){return d&&d.__esModule?d:{default:d}}function E(d,b){if(!(d instanceof b))throw new TypeError("Cannot call a class as a function")}function m(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:d}function y(d,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var p=function(d){y(b,d);function b(){return E(this,b),m(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,null,[{key:"create",value:function(k){var C=o(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,k);return typeof k=="string"&&(window.katex.render(k,C,{throwOnError:!1,errorColor:"#f00"}),C.setAttribute("data-value",k)),C}},{key:"value",value:function(k){return k.getAttribute("data-value")}}]),b}(u.default);p.blotName="formula",p.className="ql-formula",p.tagName="SPAN";var g=function(d){y(b,d),a(b,null,[{key:"register",value:function(){v.default.register(p,!0)}}]);function b(){E(this,b);var O=m(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return O}return b}(_.default);n.FormulaBlot=p,n.default=g},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var a=function(){function k(C,S){for(var x=0;x<S.length;x++){var P=S[x];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(C,P.key,P)}}return function(C,S,x){return S&&k(C.prototype,S),x&&k(C,x),C}}(),o=function k(C,S,x){C===null&&(C=Function.prototype);var P=Object.getOwnPropertyDescriptor(C,S);if(P===void 0){var T=Object.getPrototypeOf(C);return T===null?void 0:k(T,S,x)}else{if("value"in P)return P.value;var L=P.get;return L===void 0?void 0:L.call(x)}},l=i(0),u=m(l),f=i(5),v=m(f),w=i(9),_=m(w),h=i(13),E=m(h);function m(k){return k&&k.__esModule?k:{default:k}}function y(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function p(k,C){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:k}function g(k,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);k.prototype=Object.create(C&&C.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(k,C):k.__proto__=C)}var d=function(k){g(C,k);function C(){return y(this,C),p(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return a(C,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var P=this.domNode.textContent;this.cachedText!==P&&((P.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(P),this.domNode.normalize(),this.attach()),this.cachedText=P)}}]),C}(E.default);d.className="ql-syntax";var b=new u.default.Attributor.Class("token","hljs",{scope:u.default.Scope.INLINE}),O=function(k){g(C,k),a(C,null,[{key:"register",value:function(){v.default.register(b,!0),v.default.register(d,!0)}}]);function C(S,x){y(this,C);var P=p(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,S,x));if(typeof P.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var T=null;return P.quill.on(v.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(T),T=setTimeout(function(){P.highlight(),T=null},P.options.interval)}),P.highlight(),P}return a(C,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(v.default.sources.USER);var P=this.quill.getSelection();this.quill.scroll.descendants(d).forEach(function(T){T.highlight(x.options.highlight)}),this.quill.update(v.default.sources.SILENT),P!=null&&this.quill.setSelection(P,v.default.sources.SILENT)}}}]),C}(_.default);O.DEFAULTS={highlight:function(){return window.hljs==null?null:function(k){var C=window.hljs.highlightAuto(k);return C.value}}(),interval:1e3},n.CodeBlock=d,n.CodeToken=b,n.default=O},function(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n){r.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(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var a=function C(S,x,P){S===null&&(S=Function.prototype);var T=Object.getOwnPropertyDescriptor(S,x);if(T===void 0){var L=Object.getPrototypeOf(S);return L===null?void 0:C(L,x,P)}else{if("value"in T)return T.value;var M=T.get;return M===void 0?void 0:M.call(P)}},o=function(){function C(S,x){for(var P=0;P<x.length;P++){var T=x[P];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(S,T.key,T)}}return function(S,x,P){return x&&C(S.prototype,x),P&&C(S,P),S}}(),l=i(3),u=y(l),f=i(8),v=y(f),w=i(43),_=y(w),h=i(15),E=i(41),m=y(E);function y(C){return C&&C.__esModule?C:{default:C}}function p(C,S){if(!(C instanceof S))throw new TypeError("Cannot call a class as a function")}function g(C,S){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:C}function d(C,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);C.prototype=Object.create(S&&S.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(C,S):C.__proto__=S)}var b=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],O=function(C){d(S,C);function S(x,P){p(this,S),P.modules.toolbar!=null&&P.modules.toolbar.container==null&&(P.modules.toolbar.container=b);var T=g(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,x,P));return T.quill.container.classList.add("ql-bubble"),T}return o(S,[{key:"extendToolbar",value:function(P){this.tooltip=new k(this.quill,this.options.bounds),this.tooltip.root.appendChild(P.container),this.buildButtons([].slice.call(P.container.querySelectorAll("button")),m.default),this.buildPickers([].slice.call(P.container.querySelectorAll("select")),m.default)}}]),S}(_.default);O.DEFAULTS=(0,u.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(S){S?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var k=function(C){d(S,C);function S(x,P){p(this,S);var T=g(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,x,P));return T.quill.on(v.default.events.EDITOR_CHANGE,function(L,M,U,$){if(L===v.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&$===v.default.sources.USER){T.show(),T.root.style.left="0px",T.root.style.width="",T.root.style.width=T.root.offsetWidth+"px";var Z=T.quill.getLines(M.index,M.length);if(Z.length===1)T.position(T.quill.getBounds(M));else{var B=Z[Z.length-1],N=T.quill.getIndex(B),H=Math.min(B.length()-1,M.index+M.length-N),R=T.quill.getBounds(new h.Range(N,H));T.position(R)}}else document.activeElement!==T.textbox&&T.quill.hasFocus()&&T.hide()}),T}return o(S,[{key:"listen",value:function(){var P=this;a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){P.root.classList.remove("ql-editing")}),this.quill.on(v.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!P.root.classList.contains("ql-hidden")){var T=P.quill.getSelection();T!=null&&P.position(P.quill.getBounds(T))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(P){var T=a(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"position",this).call(this,P),L=this.root.querySelector(".ql-tooltip-arrow");if(L.style.marginLeft="",T===0)return T;L.style.marginLeft=-1*T-L.offsetWidth/2+"px"}}]),S}(w.BaseTooltip);k.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(""),n.BubbleTooltip=k,n.default=O},function(r,n,i){r.exports=i(63)}]).default})})(pS);var gS=pS.exports,wD={exports:{}};(function(e,t){(function(r,n){e.exports=n(gS)})(window,function(r){return function(n){var i={};function a(o){if(i[o])return i[o].exports;var l=i[o]={i:o,l:!1,exports:{}};return n[o].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=n,a.c=i,a.d=function(o,l,u){a.o(o,l)||Object.defineProperty(o,l,{enumerable:!0,get:u})},a.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},a.t=function(o,l){if(1&l&&(o=a(o)),8&l||4&l&&typeof o=="object"&&o&&o.__esModule)return o;var u=Object.create(null);if(a.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:o}),2&l&&typeof o!="string")for(var f in o)a.d(u,f,(function(v){return o[v]}).bind(null,f));return u},a.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(l,"a",l),l},a.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},a.p="",a(a.s=2)}([function(n,i,a){/*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */n.exports=function(){const{entries:o,setPrototypeOf:l,isFrozen:u,getPrototypeOf:f,getOwnPropertyDescriptor:v}=Object;let{freeze:w,seal:_,create:h}=Object,{apply:E,construct:m}=typeof Reflect<"u"&&Reflect;E||(E=function(ne,ge,pe){return ne.apply(ge,pe)}),w||(w=function(ne){return ne}),_||(_=function(ne){return ne}),m||(m=function(ne,ge){return new ne(...ge)});const y=L(Array.prototype.forEach),p=L(Array.prototype.pop),g=L(Array.prototype.push),d=L(String.prototype.toLowerCase),b=L(String.prototype.toString),O=L(String.prototype.match),k=L(String.prototype.replace),C=L(String.prototype.indexOf),S=L(String.prototype.trim),x=L(RegExp.prototype.test),P=(T=TypeError,function(){for(var ne=arguments.length,ge=new Array(ne),pe=0;pe<ne;pe++)ge[pe]=arguments[pe];return m(T,ge)});var T;function L(ne){return function(ge){for(var pe=arguments.length,re=new Array(pe>1?pe-1:0),de=1;de<pe;de++)re[de-1]=arguments[de];return E(ne,ge,re)}}function M(ne,ge,pe){var re;pe=(re=pe)!==null&&re!==void 0?re:d,l&&l(ne,null);let de=ge.length;for(;de--;){let be=ge[de];if(typeof be=="string"){const ye=pe(be);ye!==be&&(u(ge)||(ge[de]=ye),be=ye)}ne[be]=!0}return ne}function U(ne){const ge=h(null);for(const[pe,re]of o(ne))ge[pe]=re;return ge}function $(ne,ge){for(;ne!==null;){const pe=v(ne,ge);if(pe){if(pe.get)return L(pe.get);if(typeof pe.value=="function")return L(pe.value)}ne=f(ne)}return function(pe){return console.warn("fallback value for",pe),null}}const Z=w(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),B=w(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),N=w(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),H=w(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),R=w(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=w(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),z=w(["#text"]),F=w(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),V=w(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Y=w(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),q=w(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=_(/\{\{[\w\W]*|[\w\W]*\}\}/gm),K=_(/<%[\w\W]*|[\w\W]*%>/gm),X=_(/\${[\w\W]*}/gm),Q=_(/^data-[\-\w.\u00B7-\uFFFF]/),te=_(/^aria-[\-\w]+$/),ee=_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ae=_(/^(?:\w+script|data):/i),oe=_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),le=_(/^html$/i);var Te=Object.freeze({__proto__:null,MUSTACHE_EXPR:G,ERB_EXPR:K,TMPLIT_EXPR:X,DATA_ATTR:Q,ARIA_ATTR:te,IS_ALLOWED_URI:ee,IS_SCRIPT_OR_DATA:ae,ATTR_WHITESPACE:oe,DOCTYPE_NAME:le});const Fe=()=>typeof window>"u"?null:window,fe=function(ne,ge){if(typeof ne!="object"||typeof ne.createPolicy!="function")return null;let pe=null;ge&&ge.hasAttribute("data-tt-policy-suffix")&&(pe=ge.getAttribute("data-tt-policy-suffix"));const re="dompurify"+(pe?"#"+pe:"");try{return ne.createPolicy(re,{createHTML:de=>de,createScriptURL:de=>de})}catch{return console.warn("TrustedTypes policy "+re+" could not be created."),null}};return function ne(){let ge=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fe();const pe=ie=>ne(ie);if(pe.version="3.0.5",pe.removed=[],!ge||!ge.document||ge.document.nodeType!==9)return pe.isSupported=!1,pe;const re=ge.document,de=re.currentScript;let{document:be}=ge;const{DocumentFragment:ye,HTMLTemplateElement:Ie,Node:Ee,Element:ke,NodeFilter:Ze,NamedNodeMap:We=ge.NamedNodeMap||ge.MozNamedAttrMap,HTMLFormElement:dt,DOMParser:Bt,trustedTypes:ue}=ge,he=ke.prototype,nt=$(he,"cloneNode"),Oe=$(he,"nextSibling"),je=$(he,"childNodes"),Le=$(he,"parentNode");if(typeof Ie=="function"){const ie=be.createElement("template");ie.content&&ie.content.ownerDocument&&(be=ie.content.ownerDocument)}let Se,et="";const{implementation:xe,createNodeIterator:Ke,createDocumentFragment:Sr,getElementsByTagName:Pe}=be,{importNode:He}=re;let Je={};pe.isSupported=typeof o=="function"&&typeof Le=="function"&&xe&&xe.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:yt,ERB_EXPR:xt,TMPLIT_EXPR:ar,DATA_ATTR:Rr,ARIA_ATTR:Lr,IS_SCRIPT_OR_DATA:ln,ATTR_WHITESPACE:De}=Te;let{IS_ALLOWED_URI:it}=Te,Qe=null;const kt=M({},[...Z,...B,...N,...R,...z]);let tt=null;const fr=M({},[...F,...V,...Y,...q]);let ht=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$t=null,Br=null,vr=!0,Mr=!0,Mn=!1,vi=!0,mn=!1,sn=!1,Kn=!1,Ka=!1,mi=!1,Kl=!1,Xa=!1,Za=!0,Xl=!1;const Ru="user-content-";let Lu=!0,va=!1,Nn={},un=null;const Nt=M({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Rt=null;const yi=M({},["audio","video","img","source","image","track"]);let mr=null;const Ur=M({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xn="http://www.w3.org/1998/Math/MathML",bi="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let _i=Yt,Zl=!1,Ql=null;const Jl=M({},[Xn,bi,Yt],b);let ma;const In=["application/xhtml+xml","text/html"],E0="text/html";let yr,Qa=null;const es=be.createElement("form"),Xo=function(ie){return ie instanceof RegExp||ie instanceof Function},ya=function(ie){if(!Qa||Qa!==ie){if(ie&&typeof ie=="object"||(ie={}),ie=U(ie),ma=ma=In.indexOf(ie.PARSER_MEDIA_TYPE)===-1?E0:ie.PARSER_MEDIA_TYPE,yr=ma==="application/xhtml+xml"?b:d,Qe="ALLOWED_TAGS"in ie?M({},ie.ALLOWED_TAGS,yr):kt,tt="ALLOWED_ATTR"in ie?M({},ie.ALLOWED_ATTR,yr):fr,Ql="ALLOWED_NAMESPACES"in ie?M({},ie.ALLOWED_NAMESPACES,b):Jl,mr="ADD_URI_SAFE_ATTR"in ie?M(U(Ur),ie.ADD_URI_SAFE_ATTR,yr):Ur,Rt="ADD_DATA_URI_TAGS"in ie?M(U(yi),ie.ADD_DATA_URI_TAGS,yr):yi,un="FORBID_CONTENTS"in ie?M({},ie.FORBID_CONTENTS,yr):Nt,$t="FORBID_TAGS"in ie?M({},ie.FORBID_TAGS,yr):{},Br="FORBID_ATTR"in ie?M({},ie.FORBID_ATTR,yr):{},Nn="USE_PROFILES"in ie&&ie.USE_PROFILES,vr=ie.ALLOW_ARIA_ATTR!==!1,Mr=ie.ALLOW_DATA_ATTR!==!1,Mn=ie.ALLOW_UNKNOWN_PROTOCOLS||!1,vi=ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,mn=ie.SAFE_FOR_TEMPLATES||!1,sn=ie.WHOLE_DOCUMENT||!1,mi=ie.RETURN_DOM||!1,Kl=ie.RETURN_DOM_FRAGMENT||!1,Xa=ie.RETURN_TRUSTED_TYPE||!1,Ka=ie.FORCE_BODY||!1,Za=ie.SANITIZE_DOM!==!1,Xl=ie.SANITIZE_NAMED_PROPS||!1,Lu=ie.KEEP_CONTENT!==!1,va=ie.IN_PLACE||!1,it=ie.ALLOWED_URI_REGEXP||ee,_i=ie.NAMESPACE||Yt,ht=ie.CUSTOM_ELEMENT_HANDLING||{},ie.CUSTOM_ELEMENT_HANDLING&&Xo(ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ht.tagNameCheck=ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&Xo(ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ht.attributeNameCheck=ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ie.CUSTOM_ELEMENT_HANDLING&&typeof ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ht.allowCustomizedBuiltInElements=ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),mn&&(Mr=!1),Kl&&(mi=!0),Nn&&(Qe=M({},[...z]),tt=[],Nn.html===!0&&(M(Qe,Z),M(tt,F)),Nn.svg===!0&&(M(Qe,B),M(tt,V),M(tt,q)),Nn.svgFilters===!0&&(M(Qe,N),M(tt,V),M(tt,q)),Nn.mathMl===!0&&(M(Qe,R),M(tt,Y),M(tt,q))),ie.ADD_TAGS&&(Qe===kt&&(Qe=U(Qe)),M(Qe,ie.ADD_TAGS,yr)),ie.ADD_ATTR&&(tt===fr&&(tt=U(tt)),M(tt,ie.ADD_ATTR,yr)),ie.ADD_URI_SAFE_ATTR&&M(mr,ie.ADD_URI_SAFE_ATTR,yr),ie.FORBID_CONTENTS&&(un===Nt&&(un=U(un)),M(un,ie.FORBID_CONTENTS,yr)),Lu&&(Qe["#text"]=!0),sn&&M(Qe,["html","head","body"]),Qe.table&&(M(Qe,["tbody"]),delete $t.tbody),ie.TRUSTED_TYPES_POLICY){if(typeof ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw P('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Se=ie.TRUSTED_TYPES_POLICY,et=Se.createHTML("")}else Se===void 0&&(Se=fe(ue,de)),Se!==null&&typeof et=="string"&&(et=Se.createHTML(""));w&&w(ie),Qa=ie}},Zo=M({},["mi","mo","mn","ms","mtext"]),Tf=M({},["foreignobject","desc","title","annotation-xml"]),O0=M({},["title","style","font","a","script"]),Ja=M({},B);M(Ja,N),M(Ja,H);const ts=M({},R);M(ts,D);const Mu=function(ie){let Ae=Le(ie);Ae&&Ae.tagName||(Ae={namespaceURI:_i,tagName:"template"});const Ne=d(ie.tagName),ft=d(Ae.tagName);return!!Ql[ie.namespaceURI]&&(ie.namespaceURI===bi?Ae.namespaceURI===Yt?Ne==="svg":Ae.namespaceURI===Xn?Ne==="svg"&&(ft==="annotation-xml"||Zo[ft]):!!Ja[Ne]:ie.namespaceURI===Xn?Ae.namespaceURI===Yt?Ne==="math":Ae.namespaceURI===bi?Ne==="math"&&Tf[ft]:!!ts[Ne]:ie.namespaceURI===Yt?!(Ae.namespaceURI===bi&&!Tf[ft])&&!(Ae.namespaceURI===Xn&&!Zo[ft])&&!ts[Ne]&&(O0[Ne]||!Ja[Ne]):!(ma!=="application/xhtml+xml"||!Ql[ie.namespaceURI]))},Dn=function(ie){g(pe.removed,{element:ie});try{ie.parentNode.removeChild(ie)}catch{ie.remove()}},Nu=function(ie,Ae){try{g(pe.removed,{attribute:Ae.getAttributeNode(ie),from:Ae})}catch{g(pe.removed,{attribute:null,from:Ae})}if(Ae.removeAttribute(ie),ie==="is"&&!tt[ie])if(mi||Kl)try{Dn(Ae)}catch{}else try{Ae.setAttribute(ie,"")}catch{}},rs=function(ie){let Ae,Ne;if(Ka)ie="<remove></remove>"+ie;else{const Kr=O(ie,/^[\r\n\t ]+/);Ne=Kr&&Kr[0]}ma==="application/xhtml+xml"&&_i===Yt&&(ie='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ie+"</body></html>");const ft=Se?Se.createHTML(ie):ie;if(_i===Yt)try{Ae=new Bt().parseFromString(ft,ma)}catch{}if(!Ae||!Ae.documentElement){Ae=xe.createDocument(_i,"template",null);try{Ae.documentElement.innerHTML=Zl?et:ft}catch{}}const or=Ae.body||Ae.documentElement;return ie&&Ne&&or.insertBefore(be.createTextNode(Ne),or.childNodes[0]||null),_i===Yt?Pe.call(Ae,sn?"html":"body")[0]:sn?Ae.documentElement:or},St=function(ie){return Ke.call(ie.ownerDocument||ie,ie,Ze.SHOW_ELEMENT|Ze.SHOW_COMMENT|Ze.SHOW_TEXT,null,!1)},Af=function(ie){return ie instanceof dt&&(typeof ie.nodeName!="string"||typeof ie.textContent!="string"||typeof ie.removeChild!="function"||!(ie.attributes instanceof We)||typeof ie.removeAttribute!="function"||typeof ie.setAttribute!="function"||typeof ie.namespaceURI!="string"||typeof ie.insertBefore!="function"||typeof ie.hasChildNodes!="function")},eo=function(ie){return typeof Ee=="object"?ie instanceof Ee:ie&&typeof ie=="object"&&typeof ie.nodeType=="number"&&typeof ie.nodeName=="string"},Zn=function(ie,Ae,Ne){Je[ie]&&y(Je[ie],ft=>{ft.call(pe,Ae,Ne,Qa)})},kf=function(ie){let Ae;if(Zn("beforeSanitizeElements",ie,null),Af(ie))return Dn(ie),!0;const Ne=yr(ie.nodeName);if(Zn("uponSanitizeElement",ie,{tagName:Ne,allowedTags:Qe}),ie.hasChildNodes()&&!eo(ie.firstElementChild)&&(!eo(ie.content)||!eo(ie.content.firstElementChild))&&x(/<[/\w]/g,ie.innerHTML)&&x(/<[/\w]/g,ie.textContent))return Dn(ie),!0;if(!Qe[Ne]||$t[Ne]){if(!$t[Ne]&&dr(Ne)&&(ht.tagNameCheck instanceof RegExp&&x(ht.tagNameCheck,Ne)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(Ne)))return!1;if(Lu&&!un[Ne]){const ft=Le(ie)||ie.parentNode,or=je(ie)||ie.childNodes;if(or&&ft)for(let Kr=or.length-1;Kr>=0;--Kr)ft.insertBefore(nt(or[Kr],!0),Oe(ie))}return Dn(ie),!0}return ie instanceof ke&&!Mu(ie)?(Dn(ie),!0):Ne!=="noscript"&&Ne!=="noembed"&&Ne!=="noframes"||!x(/<\/no(script|embed|frames)/i,ie.innerHTML)?(mn&&ie.nodeType===3&&(Ae=ie.textContent,Ae=k(Ae,yt," "),Ae=k(Ae,xt," "),Ae=k(Ae,ar," "),ie.textContent!==Ae&&(g(pe.removed,{element:ie.cloneNode()}),ie.textContent=Ae)),Zn("afterSanitizeElements",ie,null),!1):(Dn(ie),!0)},Rf=function(ie,Ae,Ne){if(Za&&(Ae==="id"||Ae==="name")&&(Ne in be||Ne in es))return!1;if(!(Mr&&!Br[Ae]&&x(Rr,Ae))){if(!(vr&&x(Lr,Ae))){if(!tt[Ae]||Br[Ae]){if(!(dr(ie)&&(ht.tagNameCheck instanceof RegExp&&x(ht.tagNameCheck,ie)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(ie))&&(ht.attributeNameCheck instanceof RegExp&&x(ht.attributeNameCheck,Ae)||ht.attributeNameCheck instanceof Function&&ht.attributeNameCheck(Ae))||Ae==="is"&&ht.allowCustomizedBuiltInElements&&(ht.tagNameCheck instanceof RegExp&&x(ht.tagNameCheck,Ne)||ht.tagNameCheck instanceof Function&&ht.tagNameCheck(Ne))))return!1}else if(!mr[Ae]){if(!x(it,k(Ne,De,""))){if((Ae!=="src"&&Ae!=="xlink:href"&&Ae!=="href"||ie==="script"||C(Ne,"data:")!==0||!Rt[ie])&&!(Mn&&!x(ln,k(Ne,De,"")))){if(Ne)return!1}}}}}return!0},dr=function(ie){return ie.indexOf("-")>0},ns=function(ie){let Ae,Ne,ft,or;Zn("beforeSanitizeAttributes",ie,null);const{attributes:Kr}=ie;if(!Kr)return;const lr={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:tt};for(or=Kr.length;or--;){Ae=Kr[or];const{name:It,namespaceURI:wi}=Ae;if(Ne=It==="value"?Ae.value:S(Ae.value),ft=yr(It),lr.attrName=ft,lr.attrValue=Ne,lr.keepAttr=!0,lr.forceKeepAttr=void 0,Zn("uponSanitizeAttribute",ie,lr),Ne=lr.attrValue,lr.forceKeepAttr||(Nu(It,ie),!lr.keepAttr))continue;if(!vi&&x(/\/>/i,Ne)){Nu(It,ie);continue}mn&&(Ne=k(Ne,yt," "),Ne=k(Ne,xt," "),Ne=k(Ne,ar," "));const is=yr(ie.nodeName);if(Rf(is,ft,Ne)){if(!Xl||ft!=="id"&&ft!=="name"||(Nu(It,ie),Ne=Ru+Ne),Se&&typeof ue=="object"&&typeof ue.getAttributeType=="function"&&!wi)switch(ue.getAttributeType(is,ft)){case"TrustedHTML":Ne=Se.createHTML(Ne);break;case"TrustedScriptURL":Ne=Se.createScriptURL(Ne)}try{wi?ie.setAttributeNS(wi,It,Ne):ie.setAttribute(It,Ne),p(pe.removed)}catch{}}}Zn("afterSanitizeAttributes",ie,null)},x0=function ie(Ae){let Ne;const ft=St(Ae);for(Zn("beforeSanitizeShadowDOM",Ae,null);Ne=ft.nextNode();)Zn("uponSanitizeShadowNode",Ne,null),kf(Ne)||(Ne.content instanceof ye&&ie(Ne.content),ns(Ne));Zn("afterSanitizeShadowDOM",Ae,null)};return pe.sanitize=function(ie){let Ae,Ne,ft,or,Kr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Zl=!ie,Zl&&(ie="<!-->"),typeof ie!="string"&&!eo(ie)){if(typeof ie.toString!="function")throw P("toString is not a function");if(typeof(ie=ie.toString())!="string")throw P("dirty is not a string, aborting")}if(!pe.isSupported)return ie;if(Kn||ya(Kr),pe.removed=[],typeof ie=="string"&&(va=!1),va){if(ie.nodeName){const wi=yr(ie.nodeName);if(!Qe[wi]||$t[wi])throw P("root node is forbidden and cannot be sanitized in-place")}}else if(ie instanceof Ee)Ae=rs("<!---->"),Ne=Ae.ownerDocument.importNode(ie,!0),Ne.nodeType===1&&Ne.nodeName==="BODY"||Ne.nodeName==="HTML"?Ae=Ne:Ae.appendChild(Ne);else{if(!mi&&!mn&&!sn&&ie.indexOf("<")===-1)return Se&&Xa?Se.createHTML(ie):ie;if(Ae=rs(ie),!Ae)return mi?null:Xa?et:""}Ae&&Ka&&Dn(Ae.firstChild);const lr=St(va?ie:Ae);for(;ft=lr.nextNode();)kf(ft)||(ft.content instanceof ye&&x0(ft.content),ns(ft));if(va)return ie;if(mi){if(Kl)for(or=Sr.call(Ae.ownerDocument);Ae.firstChild;)or.appendChild(Ae.firstChild);else or=Ae;return(tt.shadowroot||tt.shadowrootmode)&&(or=He.call(re,or,!0)),or}let It=sn?Ae.outerHTML:Ae.innerHTML;return sn&&Qe["!doctype"]&&Ae.ownerDocument&&Ae.ownerDocument.doctype&&Ae.ownerDocument.doctype.name&&x(le,Ae.ownerDocument.doctype.name)&&(It="<!DOCTYPE "+Ae.ownerDocument.doctype.name+`>
|
|
142
|
-
`+It),mn&&(It=k(It,yt," "),It=k(It,xt," "),It=k(It,ar," ")),Se&&Xa?Se.createHTML(It):It},pe.setConfig=function(ie){ya(ie),Kn=!0},pe.clearConfig=function(){Qa=null,Kn=!1},pe.isValidAttribute=function(ie,Ae,Ne){Qa||ya({});const ft=yr(ie),or=yr(Ae);return Rf(ft,or,Ne)},pe.addHook=function(ie,Ae){typeof Ae=="function"&&(Je[ie]=Je[ie]||[],g(Je[ie],Ae))},pe.removeHook=function(ie){if(Je[ie])return p(Je[ie])},pe.removeHooks=function(ie){Je[ie]&&(Je[ie]=[])},pe.removeAllHooks=function(){Je={}},pe}()}()},function(n,i){n.exports=r},function(n,i,a){a.r(i);var o=a(1),l=a.n(o),u=a(0),f=a.n(u);function v(k){return(v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C})(k)}function w(k,C){var S=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);C&&(x=x.filter(function(P){return Object.getOwnPropertyDescriptor(k,P).enumerable})),S.push.apply(S,x)}return S}function _(k){for(var C=1;C<arguments.length;C++){var S=arguments[C]!=null?arguments[C]:{};C%2?w(Object(S),!0).forEach(function(x){h(k,x,S[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(S)):w(Object(S)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(S,x))})}return k}function h(k,C,S){return C in k?Object.defineProperty(k,C,{value:S,enumerable:!0,configurable:!0,writable:!0}):k[C]=S,k}function E(k,C){for(var S=0;S<C.length;S++){var x=C[S];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(k,x.key,x)}}function m(k,C){return(m=Object.setPrototypeOf||function(S,x){return S.__proto__=x,S})(k,C)}function y(k){var C=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var S,x=g(k);if(C){var P=g(this).constructor;S=Reflect.construct(x,arguments,P)}else S=x.apply(this,arguments);return p(this,S)}}function p(k,C){return!C||v(C)!=="object"&&typeof C!="function"?function(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}(k):C}function g(k){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(C){return C.__proto__||Object.getPrototypeOf(C)})(k)}var d=l.a.import("modules/clipboard"),b=l.a.import("delta"),O=function(k){(function(T,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(L&&L.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),L&&m(T,L)})(P,k);var C,S,x=y(P);function P(T,L){var M;return function(U,$){if(!(U instanceof $))throw new TypeError("Cannot call a class as a function")}(this,P),(M=x.call(this,T,L)).allowed=L.allowed,M.keepSelection=L.keepSelection,M.substituteBlockElements=L.substituteBlockElements,M.magicPasteLinks=L.magicPasteLinks,M.hooks=L.hooks,M}return C=P,(S=[{key:"onPaste",value:function(T){var L=this;T.preventDefault();var M,U,$,Z,B,N=this.quill.getSelection();T.clipboardData&&T.clipboardData.getData||!window.clipboardData||!window.clipboardData.getData?(M=T.clipboardData.getData("text/plain"),U=T.clipboardData.getData("text/html"),$=(Z=T.clipboardData)===null||Z===void 0||(B=Z.items)===null||B===void 0?void 0:B[0]):M=window.clipboardData.getData("Text");var H=new b().retain(N.index).delete(N.length),R=this.getDOMPurifyOptions(),D=!1,z=M;if(!U&&R.ALLOWED_TAGS.includes("a")&&this.isURL(M)&&N.length>0&&this.magicPasteLinks)z=this.quill.getText(N.index,N.length),H=H.insert(z,{link:M});else if(!U&&R.ALLOWED_TAGS.includes("img")&&$&&$.kind==="file"&&$.type.match(/^image\//i)){var F=$.getAsFile(),V=new FileReader;V.onload=function(oe){L.quill.insertEmbed(N.index,"image",oe.target.result),L.keepSelection||L.quill.setSelection(N.index+1)},V.readAsDataURL(F)}else{var Y,q,G,K,X,Q,te,ee,ae;U||(D=!0,U=z),typeof((Y=this.hooks)===null||Y===void 0?void 0:Y.beforeSanitizeElements)=="function"&&f.a.addHook("beforeSanitizeElements",this.hooks.beforeSanitizeElements),typeof((q=this.hooks)===null||q===void 0?void 0:q.uponSanitizeElement)=="function"&&f.a.addHook("uponSanitizeElement",this.hooks.uponSanitizeElement),typeof((G=this.hooks)===null||G===void 0?void 0:G.afterSanitizeElements)=="function"&&f.a.addHook("afterSanitizeElements",this.hooks.afterSanitizeElements),typeof((K=this.hooks)===null||K===void 0?void 0:K.beforeSanitizeAttributes)=="function"&&f.a.addHook("beforeSanitizeAttributes",this.hooks.beforeSanitizeAttributes),typeof((X=this.hooks)===null||X===void 0?void 0:X.uponSanitizeAttribute)=="function"&&f.a.addHook("uponSanitizeAttribute",this.hooks.uponSanitizeAttribute),typeof((Q=this.hooks)===null||Q===void 0?void 0:Q.afterSanitizeAttributes)=="function"&&f.a.addHook("afterSanitizeAttributes",this.hooks.afterSanitizeAttributes),typeof((te=this.hooks)===null||te===void 0?void 0:te.beforeSanitizeShadowDOM)=="function"&&f.a.addHook("beforeSanitizeShadowDOM",this.hooks.beforeSanitizeShadowDOM),typeof((ee=this.hooks)===null||ee===void 0?void 0:ee.uponSanitizeShadowNode)=="function"&&f.a.addHook("uponSanitizeShadowNode",this.hooks.uponSanitizeShadowNode),typeof((ae=this.hooks)===null||ae===void 0?void 0:ae.afterSanitizeShadowDOM)=="function"&&f.a.addHook("afterSanitizeShadowDOM",this.hooks.afterSanitizeShadowDOM),D?(z=f.a.sanitize(U,R),H=H.insert(z)):(z=this.substituteBlockElements!==!1?(U=this.substitute(U,R)).innerHTML:f.a.sanitize(U,R),H=H.concat(this.convert(z)))}this.quill.updateContents(H,l.a.sources.USER),D||(H=this.convert(z)),this.keepSelection?this.quill.setSelection(N.index,H.length(),l.a.sources.SILENT):this.quill.setSelection(N.index+H.length(),l.a.sources.SILENT),this.quill.scrollIntoView(),f.a.removeAllHooks()}},{key:"getDOMPurifyOptions",value:function(){var T,L,M={};if((T=this.allowed)!==null&&T!==void 0&&T.tags&&(M.ALLOWED_TAGS=this.allowed.tags),(L=this.allowed)!==null&&L!==void 0&&L.attributes&&(M.ALLOWED_ATTR=this.allowed.attributes),M.ALLOWED_TAGS===void 0||M.ALLOWED_ATTR===void 0){var U,$=!1;M.ALLOWED_TAGS===void 0&&($=!0,M.ALLOWED_TAGS=["p","br","span"]);var Z=!1;M.ALLOWED_ATTR===void 0&&(Z=!0,M.ALLOWED_ATTR=["class"]);var B=this.quill.getModule("toolbar");B==null||(U=B.controls)===null||U===void 0||U.forEach(function(N){switch(N[0]){case"bold":$&&(M.ALLOWED_TAGS.push("b"),M.ALLOWED_TAGS.push("strong"));break;case"italic":$&&(M.ALLOWED_TAGS.push("i"),M.ALLOWED_TAGS.push("em"));break;case"underline":$&&M.ALLOWED_TAGS.push("u");break;case"strike":$&&M.ALLOWED_TAGS.push("s");break;case"color":case"background":Z&&M.ALLOWED_ATTR.push("style");break;case"script":$&&(N[1].value==="super"?M.ALLOWED_TAGS.push("sup"):N[1].value==="sub"&&M.ALLOWED_TAGS.push("sub"));break;case"header":if($){var H=function(R){R==="1"?M.ALLOWED_TAGS.push("h1"):R==="2"?M.ALLOWED_TAGS.push("h2"):R==="3"?M.ALLOWED_TAGS.push("h3"):R==="4"?M.ALLOWED_TAGS.push("h4"):R==="5"?M.ALLOWED_TAGS.push("h5"):R==="6"&&M.ALLOWED_TAGS.push("h6")};N[1].value?H(N[1].value):N[1].options&&N[1].options.length&&[].forEach.call(N[1].options,function(R){R.value&&H(R.value)})}break;case"code-block":$&&M.ALLOWED_TAGS.push("pre"),Z&&M.ALLOWED_ATTR.push("spellcheck");break;case"list":$&&(N[1].value==="ordered"?M.ALLOWED_TAGS.push("ol"):N[1].value==="bullet"&&M.ALLOWED_TAGS.push("ul"),M.ALLOWED_TAGS.push("li"));break;case"link":$&&M.ALLOWED_TAGS.push("a"),Z&&(M.ALLOWED_ATTR.push("href"),M.ALLOWED_ATTR.push("target"),M.ALLOWED_ATTR.push("rel"));break;case"image":$&&M.ALLOWED_TAGS.push("img"),Z&&(M.ALLOWED_ATTR.push("src"),M.ALLOWED_ATTR.push("title"),M.ALLOWED_ATTR.push("alt"));break;case"video":$&&M.ALLOWED_TAGS.push("iframe"),Z&&(M.ALLOWED_ATTR.push("frameborder"),M.ALLOWED_ATTR.push("allowfullscreen"),M.ALLOWED_ATTR.push("src"));break;case"blockquote":$&&M.ALLOWED_TAGS.push(N[0])}})}return M}},{key:"substitute",value:function(T,L){var M,U=["h1","h2","h3","h4","h5","h6"],$=["p","div","section","article","fieldset","address","aside","blockquote","canvas","dl","figcaption","figure","footer","form","header","main","nav","noscript","ol","pre","table","tfoot","ul","video"],Z=["li","dt","dd","hr"];f.a.addHook("uponSanitizeElement",function(D,z,F){for(var V=0;!M&&V<3;)L.ALLOWED_TAGS.includes($[V])&&(M=$[V]),++V;if(M&&D.tagName&&!L.ALLOWED_TAGS.includes(D.tagName.toLowerCase())){var Y=D.tagName.toLowerCase();U.includes(Y)?D.innerHTML="<".concat(M,"><b>").concat(D.innerHTML,"</b></").concat(M,">"):$.includes(Y)?D.innerHTML="<".concat(M,">").concat(D.innerHTML,"</").concat(M,">"):Z.includes(Y)&&(D.innerHTML="".concat(D.innerHTML,"<br>"))}}),T=f.a.sanitize(T,_(_({},L),{RETURN_DOM:!0,WHOLE_DOCUMENT:!1})),f.a.removeAllHooks();var B,N=function(D){var z=document.createElement(D.tagName.toLowerCase()),F=D.attributes;return F.length&&Array.from(F).forEach(function(V){return z.setAttribute(V.nodeName,V.value)}),z},H=0,R=document.createElement("body");return function D(z,F){for(F(z,H),z=H<=1?z.firstChild:void 0;z;)++H,D(z,F),z=z.nextSibling;--H}(T,function(D,z){if(z===1)if(D.tagName&&$.includes(D.tagName.toLowerCase())){B&&(B=void 0);var F=N(D);F.innerHTML=D.innerHTML,R.appendChild(F)}else if(B===void 0&&(B=document.createElement(M),R.appendChild(B)),D.tagName){var V=N(D);D.innerHTML&&(V.innerHTML=D.innerHTML),B.appendChild(V)}else{var Y=document.createTextNode(D.textContent);B.appendChild(Y)}}),R}},{key:"isURL",value:function(T){return!!/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\x2D?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:(?![\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])*)?$/i.test(T)}}])&&E(C.prototype,S),P}(d);l.a.register("modules/clipboard",O,!0),i.default=O}])})})(wD);var vS={},mS={exports:{}},ul={},hc={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */hc.exports;var G4;function SD(){return G4||(G4=1,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof we=="object"&&we;(a.global===a||a.window===a||a.self===a)&&(r=a);var o,l=2147483647,u=36,f=1,v=26,w=38,_=700,h=72,E=128,m="-",y=/^xn--/,p=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=u-f,O=Math.floor,k=String.fromCharCode,C;function S(R){throw new RangeError(d[R])}function x(R,D){for(var z=R.length,F=[];z--;)F[z]=D(R[z]);return F}function P(R,D){var z=R.split("@"),F="";z.length>1&&(F=z[0]+"@",R=z[1]),R=R.replace(g,".");var V=R.split("."),Y=x(V,D).join(".");return F+Y}function T(R){for(var D=[],z=0,F=R.length,V,Y;z<F;)V=R.charCodeAt(z++),V>=55296&&V<=56319&&z<F?(Y=R.charCodeAt(z++),(Y&64512)==56320?D.push(((V&1023)<<10)+(Y&1023)+65536):(D.push(V),z--)):D.push(V);return D}function L(R){return x(R,function(D){var z="";return D>65535&&(D-=65536,z+=k(D>>>10&1023|55296),D=56320|D&1023),z+=k(D),z}).join("")}function M(R){return R-48<10?R-22:R-65<26?R-65:R-97<26?R-97:u}function U(R,D){return R+22+75*(R<26)-((D!=0)<<5)}function $(R,D,z){var F=0;for(R=z?O(R/_):R>>1,R+=O(R/D);R>b*v>>1;F+=u)R=O(R/b);return O(F+(b+1)*R/(R+w))}function Z(R){var D=[],z=R.length,F,V=0,Y=E,q=h,G,K,X,Q,te,ee,ae,oe,le;for(G=R.lastIndexOf(m),G<0&&(G=0),K=0;K<G;++K)R.charCodeAt(K)>=128&&S("not-basic"),D.push(R.charCodeAt(K));for(X=G>0?G+1:0;X<z;){for(Q=V,te=1,ee=u;X>=z&&S("invalid-input"),ae=M(R.charCodeAt(X++)),(ae>=u||ae>O((l-V)/te))&&S("overflow"),V+=ae*te,oe=ee<=q?f:ee>=q+v?v:ee-q,!(ae<oe);ee+=u)le=u-oe,te>O(l/le)&&S("overflow"),te*=le;F=D.length+1,q=$(V-Q,F,Q==0),O(V/F)>l-Y&&S("overflow"),Y+=O(V/F),V%=F,D.splice(V++,0,Y)}return L(D)}function B(R){var D,z,F,V,Y,q,G,K,X,Q,te,ee=[],ae,oe,le,Te;for(R=T(R),ae=R.length,D=E,z=0,Y=h,q=0;q<ae;++q)te=R[q],te<128&&ee.push(k(te));for(F=V=ee.length,V&&ee.push(m);F<ae;){for(G=l,q=0;q<ae;++q)te=R[q],te>=D&&te<G&&(G=te);for(oe=F+1,G-D>O((l-z)/oe)&&S("overflow"),z+=(G-D)*oe,D=G,q=0;q<ae;++q)if(te=R[q],te<D&&++z>l&&S("overflow"),te==D){for(K=z,X=u;Q=X<=Y?f:X>=Y+v?v:X-Y,!(K<Q);X+=u)Te=K-Q,le=u-Q,ee.push(k(U(Q+Te%le,0))),K=O(Te/le);ee.push(k(U(K,0))),Y=$(z,oe,F==V),z=0,++F}++z,++D}return ee.join("")}function N(R){return P(R,function(D){return y.test(D)?Z(D.slice(4).toLowerCase()):D})}function H(R){return P(R,function(D){return p.test(D)?"xn--"+B(D):D})}if(o={version:"1.4.1",ucs2:{decode:T,encode:L},decode:Z,encode:B,toASCII:H,toUnicode:N},n&&i)if(e.exports==n)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(n[C]=o[C]);else r.punycode=o})(we)}(hc,hc.exports)),hc.exports}var Eg,$4;function ED(){return $4||($4=1,Eg=Error),Eg}var Og,V4;function OD(){return V4||(V4=1,Og=EvalError),Og}var xg,q4;function xD(){return q4||(q4=1,xg=RangeError),xg}var Pg,W4;function PD(){return W4||(W4=1,Pg=ReferenceError),Pg}var Cg,Y4;function yS(){return Y4||(Y4=1,Cg=SyntaxError),Cg}var Tg,K4;function Cf(){return K4||(K4=1,Tg=TypeError),Tg}var Ag,X4;function CD(){return X4||(X4=1,Ag=URIError),Ag}var kg,Z4;function TD(){return Z4||(Z4=1,kg=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),kg}var Rg,Q4;function AD(){if(Q4)return Rg;Q4=1;var e=typeof Symbol<"u"&&Symbol,t=TD();return Rg=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Rg}var Lg,J4;function kD(){if(J4)return Lg;J4=1;var e={__proto__:null,foo:{}},t=Object;return Lg=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof t)},Lg}var Mg,e_;function RD(){if(e_)return Mg;e_=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(u,f){for(var v=[],w=0;w<u.length;w+=1)v[w]=u[w];for(var _=0;_<f.length;_+=1)v[_+u.length]=f[_];return v},a=function(u,f){for(var v=[],w=f,_=0;w<u.length;w+=1,_+=1)v[_]=u[w];return v},o=function(l,u){for(var f="",v=0;v<l.length;v+=1)f+=l[v],v+1<l.length&&(f+=u);return f};return Mg=function(u){var f=this;if(typeof f!="function"||t.apply(f)!==n)throw new TypeError(e+f);for(var v=a(arguments,1),w,_=function(){if(this instanceof w){var p=f.apply(this,i(v,arguments));return Object(p)===p?p:this}return f.apply(u,i(v,arguments))},h=r(0,f.length-v.length),E=[],m=0;m<h;m++)E[m]="$"+m;if(w=Function("binder","return function ("+o(E,",")+"){ return binder.apply(this,arguments); }")(_),f.prototype){var y=function(){};y.prototype=f.prototype,w.prototype=new y,y.prototype=null}return w},Mg}var Ng,t_;function R2(){if(t_)return Ng;t_=1;var e=RD();return Ng=Function.prototype.bind||e,Ng}var Ig,r_;function LD(){if(r_)return Ig;r_=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=R2();return Ig=r.call(e,t),Ig}var Dg,n_;function Tu(){if(n_)return Dg;n_=1;var e,t=ED(),r=OD(),n=xD(),i=PD(),a=yS(),o=Cf(),l=CD(),u=Function,f=function(B){try{return u('"use strict"; return ('+B+").constructor;")()}catch{}},v=Object.getOwnPropertyDescriptor;if(v)try{v({},"")}catch{v=null}var w=function(){throw new o},_=v?function(){try{return arguments.callee,w}catch{try{return v(arguments,"callee").get}catch{return w}}}():w,h=AD()(),E=kD()(),m=Object.getPrototypeOf||(E?function(B){return B.__proto__}:null),y={},p=typeof Uint8Array>"u"||!m?e:m(Uint8Array),g={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":h&&m?m([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%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,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&m?m(m([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!h||!m?e:m(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":n,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!h||!m?e:m(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&m?m(""[Symbol.iterator]()):e,"%Symbol%":h?Symbol:e,"%SyntaxError%":a,"%ThrowTypeError%":_,"%TypedArray%":p,"%TypeError%":o,"%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%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(m)try{null.error}catch(B){var d=m(m(B));g["%Error.prototype%"]=d}var b=function B(N){var H;if(N==="%AsyncFunction%")H=f("async function () {}");else if(N==="%GeneratorFunction%")H=f("function* () {}");else if(N==="%AsyncGeneratorFunction%")H=f("async function* () {}");else if(N==="%AsyncGenerator%"){var R=B("%AsyncGeneratorFunction%");R&&(H=R.prototype)}else if(N==="%AsyncIteratorPrototype%"){var D=B("%AsyncGenerator%");D&&m&&(H=m(D.prototype))}return g[N]=H,H},O={__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"]},k=R2(),C=LD(),S=k.call(Function.call,Array.prototype.concat),x=k.call(Function.apply,Array.prototype.splice),P=k.call(Function.call,String.prototype.replace),T=k.call(Function.call,String.prototype.slice),L=k.call(Function.call,RegExp.prototype.exec),M=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,$=function(N){var H=T(N,0,1),R=T(N,-1);if(H==="%"&&R!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(R==="%"&&H!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var D=[];return P(N,M,function(z,F,V,Y){D[D.length]=V?P(Y,U,"$1"):F||z}),D},Z=function(N,H){var R=N,D;if(C(O,R)&&(D=O[R],R="%"+D[0]+"%"),C(g,R)){var z=g[R];if(z===y&&(z=b(R)),typeof z>"u"&&!H)throw new o("intrinsic "+N+" exists, but is not available. Please file an issue!");return{alias:D,name:R,value:z}}throw new a("intrinsic "+N+" does not exist!")};return Dg=function(N,H){if(typeof N!="string"||N.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof H!="boolean")throw new o('"allowMissing" argument must be a boolean');if(L(/^%?[^%]*%?$/,N)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var R=$(N),D=R.length>0?R[0]:"",z=Z("%"+D+"%",H),F=z.name,V=z.value,Y=!1,q=z.alias;q&&(D=q[0],x(R,S([0,1],q)));for(var G=1,K=!0;G<R.length;G+=1){var X=R[G],Q=T(X,0,1),te=T(X,-1);if((Q==='"'||Q==="'"||Q==="`"||te==='"'||te==="'"||te==="`")&&Q!==te)throw new a("property names with quotes must have matching quotes");if((X==="constructor"||!K)&&(Y=!0),D+="."+X,F="%"+D+"%",C(g,F))V=g[F];else if(V!=null){if(!(X in V)){if(!H)throw new o("base intrinsic for "+N+" exists, but the property is not available.");return}if(v&&G+1>=R.length){var ee=v(V,X);K=!!ee,K&&"get"in ee&&!("originalValue"in ee.get)?V=ee.get:V=V[X]}else K=C(V,X),V=V[X];K&&!Y&&(g[F]=V)}}return V},Dg}var Fg={exports:{}},jg,i_;function L2(){if(i_)return jg;i_=1;var e=Tu(),t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return jg=t,jg}var zg,a_;function bS(){if(a_)return zg;a_=1;var e=Tu(),t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return zg=t,zg}var Bg,o_;function MD(){if(o_)return Bg;o_=1;var e=L2(),t=yS(),r=Cf(),n=bS();return Bg=function(a,o,l){if(!a||typeof a!="object"&&typeof a!="function")throw new r("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,w=arguments.length>6?arguments[6]:!1,_=!!n&&n(a,o);if(e)e(a,o,{configurable:v===null&&_?_.configurable:!v,enumerable:u===null&&_?_.enumerable:!u,value:l,writable:f===null&&_?_.writable:!f});else if(w||!u&&!f&&!v)a[o]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Bg}var Ug,l_;function ND(){if(l_)return Ug;l_=1;var e=L2(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},Ug=t,Ug}var Hg,s_;function ID(){if(s_)return Hg;s_=1;var e=Tu(),t=MD(),r=ND()(),n=bS(),i=Cf(),a=e("%Math.floor%");return Hg=function(l,u){if(typeof l!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||a(u)!==u)throw new i("`length` must be a positive 32-bit integer");var f=arguments.length>2&&!!arguments[2],v=!0,w=!0;if("length"in l&&n){var _=n(l,"length");_&&!_.configurable&&(v=!1),_&&!_.writable&&(w=!1)}return(v||w||!f)&&(r?t(l,"length",u,!0,!0):t(l,"length",u)),l},Hg}var u_;function DD(){return u_||(u_=1,function(e){var t=R2(),r=Tu(),n=ID(),i=Cf(),a=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),l=r("%Reflect.apply%",!0)||t.call(o,a),u=L2(),f=r("%Math.max%");e.exports=function(_){if(typeof _!="function")throw new i("a function is required");var h=l(t,o,arguments);return n(h,1+f(0,_.length-(arguments.length-1)),!0)};var v=function(){return l(t,a,arguments)};u?u(e.exports,"apply",{value:v}):e.exports.apply=v}(Fg)),Fg.exports}var Gg,c_;function FD(){if(c_)return Gg;c_=1;var e=Tu(),t=DD(),r=t(e("String.prototype.indexOf"));return Gg=function(i,a){var o=e(i,!!a);return typeof o=="function"&&r(i,".prototype.")>-1?t(o):o},Gg}const jD={},zD=Object.freeze(Object.defineProperty({__proto__:null,default:jD},Symbol.toStringTag,{value:"Module"})),BD=Do(zD);var $g,f_;function UD(){if(f_)return $g;f_=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,r=e&&t&&typeof t.get=="function"?t.get:null,n=e&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=i&&a&&typeof a.get=="function"?a.get:null,l=i&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,f=u?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,w=v?WeakSet.prototype.has:null,_=typeof WeakRef=="function"&&WeakRef.prototype,h=_?WeakRef.prototype.deref:null,E=Boolean.prototype.valueOf,m=Object.prototype.toString,y=Function.prototype.toString,p=String.prototype.match,g=String.prototype.slice,d=String.prototype.replace,b=String.prototype.toUpperCase,O=String.prototype.toLowerCase,k=RegExp.prototype.test,C=Array.prototype.concat,S=Array.prototype.join,x=Array.prototype.slice,P=Math.floor,T=typeof BigInt=="function"?BigInt.prototype.valueOf:null,L=Object.getOwnPropertySymbols,M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,U=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===U||!0)?Symbol.toStringTag:null,Z=Object.prototype.propertyIsEnumerable,B=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(ue){return ue.__proto__}:null);function N(ue,he){if(ue===1/0||ue===-1/0||ue!==ue||ue&&ue>-1e3&&ue<1e3||k.call(/e/,he))return he;var nt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof ue=="number"){var Oe=ue<0?-P(-ue):P(ue);if(Oe!==ue){var je=String(Oe),Le=g.call(he,je.length+1);return d.call(je,nt,"$&_")+"."+d.call(d.call(Le,/([0-9]{3})/g,"$&_"),/_$/,"")}}return d.call(he,nt,"$&_")}var H=BD,R=H.custom,D=te(R)?R:null;$g=function ue(he,nt,Oe,je){var Le=nt||{};if(oe(Le,"quoteStyle")&&Le.quoteStyle!=="single"&&Le.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(oe(Le,"maxStringLength")&&(typeof Le.maxStringLength=="number"?Le.maxStringLength<0&&Le.maxStringLength!==1/0:Le.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Se=oe(Le,"customInspect")?Le.customInspect:!0;if(typeof Se!="boolean"&&Se!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(oe(Le,"indent")&&Le.indent!==null&&Le.indent!==" "&&!(parseInt(Le.indent,10)===Le.indent&&Le.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(oe(Le,"numericSeparator")&&typeof Le.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var et=Le.numericSeparator;if(typeof he>"u")return"undefined";if(he===null)return"null";if(typeof he=="boolean")return he?"true":"false";if(typeof he=="string")return be(he,Le);if(typeof he=="number"){if(he===0)return 1/0/he>0?"0":"-0";var xe=String(he);return et?N(he,xe):xe}if(typeof he=="bigint"){var Ke=String(he)+"n";return et?N(he,Ke):Ke}var Sr=typeof Le.depth>"u"?5:Le.depth;if(typeof Oe>"u"&&(Oe=0),Oe>=Sr&&Sr>0&&typeof he=="object")return V(he)?"[Array]":"[Object]";var Pe=We(Le,Oe);if(typeof je>"u")je=[];else if(Fe(je,he)>=0)return"[Circular]";function He(vr,Mr,Mn){if(Mr&&(je=x.call(je),je.push(Mr)),Mn){var vi={depth:Le.depth};return oe(Le,"quoteStyle")&&(vi.quoteStyle=Le.quoteStyle),ue(vr,vi,Oe+1,je)}return ue(vr,Le,Oe+1,je)}if(typeof he=="function"&&!q(he)){var Je=Te(he),yt=Bt(he,He);return"[Function"+(Je?": "+Je:" (anonymous)")+"]"+(yt.length>0?" { "+S.call(yt,", ")+" }":"")}if(te(he)){var xt=U?d.call(String(he),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(he);return typeof he=="object"&&!U?Ie(xt):xt}if(de(he)){for(var ar="<"+O.call(String(he.nodeName)),Rr=he.attributes||[],Lr=0;Lr<Rr.length;Lr++)ar+=" "+Rr[Lr].name+"="+z(F(Rr[Lr].value),"double",Le);return ar+=">",he.childNodes&&he.childNodes.length&&(ar+="..."),ar+="</"+O.call(String(he.nodeName))+">",ar}if(V(he)){if(he.length===0)return"[]";var ln=Bt(he,He);return Pe&&!Ze(ln)?"["+dt(ln,Pe)+"]":"[ "+S.call(ln,", ")+" ]"}if(G(he)){var De=Bt(he,He);return!("cause"in Error.prototype)&&"cause"in he&&!Z.call(he,"cause")?"{ ["+String(he)+"] "+S.call(C.call("[cause]: "+He(he.cause),De),", ")+" }":De.length===0?"["+String(he)+"]":"{ ["+String(he)+"] "+S.call(De,", ")+" }"}if(typeof he=="object"&&Se){if(D&&typeof he[D]=="function"&&H)return H(he,{depth:Sr-Oe});if(Se!=="symbol"&&typeof he.inspect=="function")return he.inspect()}if(fe(he)){var it=[];return n&&n.call(he,function(vr,Mr){it.push(He(Mr,he,!0)+" => "+He(vr,he))}),ke("Map",r.call(he),it,Pe)}if(pe(he)){var Qe=[];return l&&l.call(he,function(vr){Qe.push(He(vr,he))}),ke("Set",o.call(he),Qe,Pe)}if(ne(he))return Ee("WeakMap");if(re(he))return Ee("WeakSet");if(ge(he))return Ee("WeakRef");if(X(he))return Ie(He(Number(he)));if(ee(he))return Ie(He(T.call(he)));if(Q(he))return Ie(E.call(he));if(K(he))return Ie(He(String(he)));if(typeof window<"u"&&he===window)return"{ [object Window] }";if(he===we)return"{ [object globalThis] }";if(!Y(he)&&!q(he)){var kt=Bt(he,He),tt=B?B(he)===Object.prototype:he instanceof Object||he.constructor===Object,fr=he instanceof Object?"":"null prototype",ht=!tt&&$&&Object(he)===he&&$ in he?g.call(le(he),8,-1):fr?"Object":"",$t=tt||typeof he.constructor!="function"?"":he.constructor.name?he.constructor.name+" ":"",Br=$t+(ht||fr?"["+S.call(C.call([],ht||[],fr||[]),": ")+"] ":"");return kt.length===0?Br+"{}":Pe?Br+"{"+dt(kt,Pe)+"}":Br+"{ "+S.call(kt,", ")+" }"}return String(he)};function z(ue,he,nt){var Oe=(nt.quoteStyle||he)==="double"?'"':"'";return Oe+ue+Oe}function F(ue){return d.call(String(ue),/"/g,""")}function V(ue){return le(ue)==="[object Array]"&&(!$||!(typeof ue=="object"&&$ in ue))}function Y(ue){return le(ue)==="[object Date]"&&(!$||!(typeof ue=="object"&&$ in ue))}function q(ue){return le(ue)==="[object RegExp]"&&(!$||!(typeof ue=="object"&&$ in ue))}function G(ue){return le(ue)==="[object Error]"&&(!$||!(typeof ue=="object"&&$ in ue))}function K(ue){return le(ue)==="[object String]"&&(!$||!(typeof ue=="object"&&$ in ue))}function X(ue){return le(ue)==="[object Number]"&&(!$||!(typeof ue=="object"&&$ in ue))}function Q(ue){return le(ue)==="[object Boolean]"&&(!$||!(typeof ue=="object"&&$ in ue))}function te(ue){if(U)return ue&&typeof ue=="object"&&ue instanceof Symbol;if(typeof ue=="symbol")return!0;if(!ue||typeof ue!="object"||!M)return!1;try{return M.call(ue),!0}catch{}return!1}function ee(ue){if(!ue||typeof ue!="object"||!T)return!1;try{return T.call(ue),!0}catch{}return!1}var ae=Object.prototype.hasOwnProperty||function(ue){return ue in this};function oe(ue,he){return ae.call(ue,he)}function le(ue){return m.call(ue)}function Te(ue){if(ue.name)return ue.name;var he=p.call(y.call(ue),/^function\s*([\w$]+)/);return he?he[1]:null}function Fe(ue,he){if(ue.indexOf)return ue.indexOf(he);for(var nt=0,Oe=ue.length;nt<Oe;nt++)if(ue[nt]===he)return nt;return-1}function fe(ue){if(!r||!ue||typeof ue!="object")return!1;try{r.call(ue);try{o.call(ue)}catch{return!0}return ue instanceof Map}catch{}return!1}function ne(ue){if(!f||!ue||typeof ue!="object")return!1;try{f.call(ue,f);try{w.call(ue,w)}catch{return!0}return ue instanceof WeakMap}catch{}return!1}function ge(ue){if(!h||!ue||typeof ue!="object")return!1;try{return h.call(ue),!0}catch{}return!1}function pe(ue){if(!o||!ue||typeof ue!="object")return!1;try{o.call(ue);try{r.call(ue)}catch{return!0}return ue instanceof Set}catch{}return!1}function re(ue){if(!w||!ue||typeof ue!="object")return!1;try{w.call(ue,w);try{f.call(ue,f)}catch{return!0}return ue instanceof WeakSet}catch{}return!1}function de(ue){return!ue||typeof ue!="object"?!1:typeof HTMLElement<"u"&&ue instanceof HTMLElement?!0:typeof ue.nodeName=="string"&&typeof ue.getAttribute=="function"}function be(ue,he){if(ue.length>he.maxStringLength){var nt=ue.length-he.maxStringLength,Oe="... "+nt+" more character"+(nt>1?"s":"");return be(g.call(ue,0,he.maxStringLength),he)+Oe}var je=d.call(d.call(ue,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ye);return z(je,"single",he)}function ye(ue){var he=ue.charCodeAt(0),nt={8:"b",9:"t",10:"n",12:"f",13:"r"}[he];return nt?"\\"+nt:"\\x"+(he<16?"0":"")+b.call(he.toString(16))}function Ie(ue){return"Object("+ue+")"}function Ee(ue){return ue+" { ? }"}function ke(ue,he,nt,Oe){var je=Oe?dt(nt,Oe):S.call(nt,", ");return ue+" ("+he+") {"+je+"}"}function Ze(ue){for(var he=0;he<ue.length;he++)if(Fe(ue[he],`
|
|
143
|
-
`)>=0)return!1;return!0}function We(ue,he){var nt;if(ue.indent===" ")nt=" ";else if(typeof ue.indent=="number"&&ue.indent>0)nt=S.call(Array(ue.indent+1)," ");else return null;return{base:nt,prev:S.call(Array(he+1),nt)}}function dt(ue,he){if(ue.length===0)return"";var nt=`
|
|
144
|
-
`+he.prev+he.base;return nt+S.call(ue,","+nt)+`
|
|
145
|
-
`+he.prev}function Bt(ue,he){var nt=V(ue),Oe=[];if(nt){Oe.length=ue.length;for(var je=0;je<ue.length;je++)Oe[je]=oe(ue,je)?he(ue[je],ue):""}var Le=typeof L=="function"?L(ue):[],Se;if(U){Se={};for(var et=0;et<Le.length;et++)Se["$"+Le[et]]=Le[et]}for(var xe in ue)oe(ue,xe)&&(nt&&String(Number(xe))===xe&&xe<ue.length||U&&Se["$"+xe]instanceof Symbol||(k.call(/[^\w$]/,xe)?Oe.push(he(xe,ue)+": "+he(ue[xe],ue)):Oe.push(xe+": "+he(ue[xe],ue))));if(typeof L=="function")for(var Ke=0;Ke<Le.length;Ke++)Z.call(ue,Le[Ke])&&Oe.push("["+he(Le[Ke])+"]: "+he(ue[Le[Ke]],ue));return Oe}return $g}var Vg,d_;function HD(){if(d_)return Vg;d_=1;var e=Tu(),t=FD(),r=UD(),n=Cf(),i=e("%WeakMap%",!0),a=e("%Map%",!0),o=t("WeakMap.prototype.get",!0),l=t("WeakMap.prototype.set",!0),u=t("WeakMap.prototype.has",!0),f=t("Map.prototype.get",!0),v=t("Map.prototype.set",!0),w=t("Map.prototype.has",!0),_=function(y,p){for(var g=y,d;(d=g.next)!==null;g=d)if(d.key===p)return g.next=d.next,d.next=y.next,y.next=d,d},h=function(y,p){var g=_(y,p);return g&&g.value},E=function(y,p,g){var d=_(y,p);d?d.value=g:y.next={key:p,next:y.next,value:g}},m=function(y,p){return!!_(y,p)};return Vg=function(){var p,g,d,b={assert:function(O){if(!b.has(O))throw new n("Side channel does not contain "+r(O))},get:function(O){if(i&&O&&(typeof O=="object"||typeof O=="function")){if(p)return o(p,O)}else if(a){if(g)return f(g,O)}else if(d)return h(d,O)},has:function(O){if(i&&O&&(typeof O=="object"||typeof O=="function")){if(p)return u(p,O)}else if(a){if(g)return w(g,O)}else if(d)return m(d,O);return!1},set:function(O,k){i&&O&&(typeof O=="object"||typeof O=="function")?(p||(p=new i),l(p,O,k)):a?(g||(g=new a),v(g,O,k)):(d||(d={key:{},next:null}),E(d,O,k))}};return b},Vg}var qg,h_;function M2(){if(h_)return qg;h_=1;var e=String.prototype.replace,t=/%20/g,r={RFC1738:"RFC1738",RFC3986:"RFC3986"};return qg={default:r.RFC3986,formatters:{RFC1738:function(n){return e.call(n,t,"+")},RFC3986:function(n){return String(n)}},RFC1738:r.RFC1738,RFC3986:r.RFC3986},qg}var Wg,p_;function _S(){if(p_)return Wg;p_=1;var e=M2(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n=function(){for(var y=[],p=0;p<256;++p)y.push("%"+((p<16?"0":"")+p.toString(16)).toUpperCase());return y}(),i=function(p){for(;p.length>1;){var g=p.pop(),d=g.obj[g.prop];if(r(d)){for(var b=[],O=0;O<d.length;++O)typeof d[O]<"u"&&b.push(d[O]);g.obj[g.prop]=b}}},a=function(p,g){for(var d=g&&g.plainObjects?Object.create(null):{},b=0;b<p.length;++b)typeof p[b]<"u"&&(d[b]=p[b]);return d},o=function y(p,g,d){if(!g)return p;if(typeof g!="object"){if(r(p))p.push(g);else if(p&&typeof p=="object")(d&&(d.plainObjects||d.allowPrototypes)||!t.call(Object.prototype,g))&&(p[g]=!0);else return[p,g];return p}if(!p||typeof p!="object")return[p].concat(g);var b=p;return r(p)&&!r(g)&&(b=a(p,d)),r(p)&&r(g)?(g.forEach(function(O,k){if(t.call(p,k)){var C=p[k];C&&typeof C=="object"&&O&&typeof O=="object"?p[k]=y(C,O,d):p.push(O)}else p[k]=O}),p):Object.keys(g).reduce(function(O,k){var C=g[k];return t.call(O,k)?O[k]=y(O[k],C,d):O[k]=C,O},b)},l=function(p,g){return Object.keys(g).reduce(function(d,b){return d[b]=g[b],d},p)},u=function(y,p,g){var d=y.replace(/\+/g," ");if(g==="iso-8859-1")return d.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(d)}catch{return d}},f=1024,v=function(p,g,d,b,O){if(p.length===0)return p;var k=p;if(typeof p=="symbol"?k=Symbol.prototype.toString.call(p):typeof p!="string"&&(k=String(p)),d==="iso-8859-1")return escape(k).replace(/%u[0-9a-f]{4}/gi,function(M){return"%26%23"+parseInt(M.slice(2),16)+"%3B"});for(var C="",S=0;S<k.length;S+=f){for(var x=k.length>=f?k.slice(S,S+f):k,P=[],T=0;T<x.length;++T){var L=x.charCodeAt(T);if(L===45||L===46||L===95||L===126||L>=48&&L<=57||L>=65&&L<=90||L>=97&&L<=122||O===e.RFC1738&&(L===40||L===41)){P[P.length]=x.charAt(T);continue}if(L<128){P[P.length]=n[L];continue}if(L<2048){P[P.length]=n[192|L>>6]+n[128|L&63];continue}if(L<55296||L>=57344){P[P.length]=n[224|L>>12]+n[128|L>>6&63]+n[128|L&63];continue}T+=1,L=65536+((L&1023)<<10|x.charCodeAt(T)&1023),P[P.length]=n[240|L>>18]+n[128|L>>12&63]+n[128|L>>6&63]+n[128|L&63]}C+=P.join("")}return C},w=function(p){for(var g=[{obj:{o:p},prop:"o"}],d=[],b=0;b<g.length;++b)for(var O=g[b],k=O.obj[O.prop],C=Object.keys(k),S=0;S<C.length;++S){var x=C[S],P=k[x];typeof P=="object"&&P!==null&&d.indexOf(P)===-1&&(g.push({obj:k,prop:x}),d.push(P))}return i(g),p},_=function(p){return Object.prototype.toString.call(p)==="[object RegExp]"},h=function(p){return!p||typeof p!="object"?!1:!!(p.constructor&&p.constructor.isBuffer&&p.constructor.isBuffer(p))},E=function(p,g){return[].concat(p,g)},m=function(p,g){if(r(p)){for(var d=[],b=0;b<p.length;b+=1)d.push(g(p[b]));return d}return g(p)};return Wg={arrayToObject:a,assign:l,combine:E,compact:w,decode:u,encode:v,isBuffer:h,isRegExp:_,maybeMap:m,merge:o},Wg}var Yg,g_;function GD(){if(g_)return Yg;g_=1;var e=HD(),t=_S(),r=M2(),n=Object.prototype.hasOwnProperty,i={brackets:function(y){return y+"[]"},comma:"comma",indices:function(y,p){return y+"["+p+"]"},repeat:function(y){return y}},a=Array.isArray,o=Array.prototype.push,l=function(m,y){o.apply(m,a(y)?y:[y])},u=Date.prototype.toISOString,f=r.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,format:f,formatter:r.formatters[f],indices:!1,serializeDate:function(y){return u.call(y)},skipNulls:!1,strictNullHandling:!1},w=function(y){return typeof y=="string"||typeof y=="number"||typeof y=="boolean"||typeof y=="symbol"||typeof y=="bigint"},_={},h=function m(y,p,g,d,b,O,k,C,S,x,P,T,L,M,U,$,Z,B){for(var N=y,H=B,R=0,D=!1;(H=H.get(_))!==void 0&&!D;){var z=H.get(y);if(R+=1,typeof z<"u"){if(z===R)throw new RangeError("Cyclic object value");D=!0}typeof H.get(_)>"u"&&(R=0)}if(typeof x=="function"?N=x(p,N):N instanceof Date?N=L(N):g==="comma"&&a(N)&&(N=t.maybeMap(N,function(le){return le instanceof Date?L(le):le})),N===null){if(O)return S&&!$?S(p,v.encoder,Z,"key",M):p;N=""}if(w(N)||t.isBuffer(N)){if(S){var F=$?p:S(p,v.encoder,Z,"key",M);return[U(F)+"="+U(S(N,v.encoder,Z,"value",M))]}return[U(p)+"="+U(String(N))]}var V=[];if(typeof N>"u")return V;var Y;if(g==="comma"&&a(N))$&&S&&(N=t.maybeMap(N,S)),Y=[{value:N.length>0?N.join(",")||null:void 0}];else if(a(x))Y=x;else{var q=Object.keys(N);Y=P?q.sort(P):q}var G=C?p.replace(/\./g,"%2E"):p,K=d&&a(N)&&N.length===1?G+"[]":G;if(b&&a(N)&&N.length===0)return K+"[]";for(var X=0;X<Y.length;++X){var Q=Y[X],te=typeof Q=="object"&&typeof Q.value<"u"?Q.value:N[Q];if(!(k&&te===null)){var ee=T&&C?Q.replace(/\./g,"%2E"):Q,ae=a(N)?typeof g=="function"?g(K,ee):K:K+(T?"."+ee:"["+ee+"]");B.set(y,R);var oe=e();oe.set(_,B),l(V,m(te,ae,g,d,b,O,k,C,g==="comma"&&$&&a(N)?null:S,x,P,T,L,M,U,$,Z,oe))}}return V},E=function(y){if(!y)return v;if(typeof y.allowEmptyArrays<"u"&&typeof y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof y.encodeDotInKeys<"u"&&typeof y.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(y.encoder!==null&&typeof y.encoder<"u"&&typeof y.encoder!="function")throw new TypeError("Encoder has to be a function.");var p=y.charset||v.charset;if(typeof y.charset<"u"&&y.charset!=="utf-8"&&y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var g=r.default;if(typeof y.format<"u"){if(!n.call(r.formatters,y.format))throw new TypeError("Unknown format option provided.");g=y.format}var d=r.formatters[g],b=v.filter;(typeof y.filter=="function"||a(y.filter))&&(b=y.filter);var O;if(y.arrayFormat in i?O=y.arrayFormat:"indices"in y?O=y.indices?"indices":"repeat":O=v.arrayFormat,"commaRoundTrip"in y&&typeof y.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var k=typeof y.allowDots>"u"?y.encodeDotInKeys===!0?!0:v.allowDots:!!y.allowDots;return{addQueryPrefix:typeof y.addQueryPrefix=="boolean"?y.addQueryPrefix:v.addQueryPrefix,allowDots:k,allowEmptyArrays:typeof y.allowEmptyArrays=="boolean"?!!y.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:O,charset:p,charsetSentinel:typeof y.charsetSentinel=="boolean"?y.charsetSentinel:v.charsetSentinel,commaRoundTrip:y.commaRoundTrip,delimiter:typeof y.delimiter>"u"?v.delimiter:y.delimiter,encode:typeof y.encode=="boolean"?y.encode:v.encode,encodeDotInKeys:typeof y.encodeDotInKeys=="boolean"?y.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof y.encoder=="function"?y.encoder:v.encoder,encodeValuesOnly:typeof y.encodeValuesOnly=="boolean"?y.encodeValuesOnly:v.encodeValuesOnly,filter:b,format:g,formatter:d,serializeDate:typeof y.serializeDate=="function"?y.serializeDate:v.serializeDate,skipNulls:typeof y.skipNulls=="boolean"?y.skipNulls:v.skipNulls,sort:typeof y.sort=="function"?y.sort:null,strictNullHandling:typeof y.strictNullHandling=="boolean"?y.strictNullHandling:v.strictNullHandling}};return Yg=function(m,y){var p=m,g=E(y),d,b;typeof g.filter=="function"?(b=g.filter,p=b("",p)):a(g.filter)&&(b=g.filter,d=b);var O=[];if(typeof p!="object"||p===null)return"";var k=i[g.arrayFormat],C=k==="comma"&&g.commaRoundTrip;d||(d=Object.keys(p)),g.sort&&d.sort(g.sort);for(var S=e(),x=0;x<d.length;++x){var P=d[x];g.skipNulls&&p[P]===null||l(O,h(p[P],P,k,C,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,S))}var T=O.join(g.delimiter),L=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?L+="utf8=%26%2310003%3B&":L+="utf8=%E2%9C%93&"),T.length>0?L+T:""},Yg}var Kg,v_;function $D(){if(v_)return Kg;v_=1;var e=_S(),t=Object.prototype.hasOwnProperty,r=Array.isArray,n={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,strictNullHandling:!1},i=function(_){return _.replace(/&#(\d+);/g,function(h,E){return String.fromCharCode(parseInt(E,10))})},a=function(_,h){return _&&typeof _=="string"&&h.comma&&_.indexOf(",")>-1?_.split(","):_},o="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(h,E){var m={__proto__:null},y=E.ignoreQueryPrefix?h.replace(/^\?/,""):h,p=E.parameterLimit===1/0?void 0:E.parameterLimit,g=y.split(E.delimiter,p),d=-1,b,O=E.charset;if(E.charsetSentinel)for(b=0;b<g.length;++b)g[b].indexOf("utf8=")===0&&(g[b]===l?O="utf-8":g[b]===o&&(O="iso-8859-1"),d=b,b=g.length);for(b=0;b<g.length;++b)if(b!==d){var k=g[b],C=k.indexOf("]="),S=C===-1?k.indexOf("="):C+1,x,P;S===-1?(x=E.decoder(k,n.decoder,O,"key"),P=E.strictNullHandling?null:""):(x=E.decoder(k.slice(0,S),n.decoder,O,"key"),P=e.maybeMap(a(k.slice(S+1),E),function(L){return E.decoder(L,n.decoder,O,"value")})),P&&E.interpretNumericEntities&&O==="iso-8859-1"&&(P=i(P)),k.indexOf("[]=")>-1&&(P=r(P)?[P]:P);var T=t.call(m,x);T&&E.duplicates==="combine"?m[x]=e.combine(m[x],P):(!T||E.duplicates==="last")&&(m[x]=P)}return m},f=function(_,h,E,m){for(var y=m?h:a(h,E),p=_.length-1;p>=0;--p){var g,d=_[p];if(d==="[]"&&E.parseArrays)g=E.allowEmptyArrays&&y===""?[]:[].concat(y);else{g=E.plainObjects?Object.create(null):{};var b=d.charAt(0)==="["&&d.charAt(d.length-1)==="]"?d.slice(1,-1):d,O=E.decodeDotInKeys?b.replace(/%2E/g,"."):b,k=parseInt(O,10);!E.parseArrays&&O===""?g={0:y}:!isNaN(k)&&d!==O&&String(k)===O&&k>=0&&E.parseArrays&&k<=E.arrayLimit?(g=[],g[k]=y):O!=="__proto__"&&(g[O]=y)}y=g}return y},v=function(h,E,m,y){if(h){var p=m.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h,g=/(\[[^[\]]*])/,d=/(\[[^[\]]*])/g,b=m.depth>0&&g.exec(p),O=b?p.slice(0,b.index):p,k=[];if(O){if(!m.plainObjects&&t.call(Object.prototype,O)&&!m.allowPrototypes)return;k.push(O)}for(var C=0;m.depth>0&&(b=d.exec(p))!==null&&C<m.depth;){if(C+=1,!m.plainObjects&&t.call(Object.prototype,b[1].slice(1,-1))&&!m.allowPrototypes)return;k.push(b[1])}return b&&k.push("["+p.slice(b.index)+"]"),f(k,E,m,y)}},w=function(h){if(!h)return n;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.decodeDotInKeys<"u"&&typeof h.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(h.decoder!==null&&typeof h.decoder<"u"&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var E=typeof h.charset>"u"?n.charset:h.charset,m=typeof h.duplicates>"u"?n.duplicates:h.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var y=typeof h.allowDots>"u"?h.decodeDotInKeys===!0?!0:n.allowDots:!!h.allowDots;return{allowDots:y,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:n.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:n.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:n.arrayLimit,charset:E,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:n.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:n.comma,decodeDotInKeys:typeof h.decodeDotInKeys=="boolean"?h.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof h.decoder=="function"?h.decoder:n.decoder,delimiter:typeof h.delimiter=="string"||e.isRegExp(h.delimiter)?h.delimiter:n.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:n.depth,duplicates:m,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:n.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:n.plainObjects,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:n.strictNullHandling}};return Kg=function(_,h){var E=w(h);if(_===""||_===null||typeof _>"u")return E.plainObjects?Object.create(null):{};for(var m=typeof _=="string"?u(_,E):_,y=E.plainObjects?Object.create(null):{},p=Object.keys(m),g=0;g<p.length;++g){var d=p[g],b=v(d,m[d],E,typeof _=="string");y=e.merge(y,b,E)}return E.allowSparse===!0?y:e.compact(y)},Kg}var Xg,m_;function VD(){if(m_)return Xg;m_=1;var e=GD(),t=$D(),r=M2();return Xg={formats:r,parse:t,stringify:e},Xg}var y_;function wS(){if(y_)return ul;y_=1;var e=SD();function t(){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 r=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,i=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,a=["<",">",'"',"`"," ","\r",`
|
|
146
|
-
`," "],o=["{","}","|","\\","^","`"].concat(a),l=["'"].concat(o),u=["%","/","?",";","#"].concat(l),f=["/","?","#"],v=255,w=/^[+a-z0-9A-Z_-]{0,63}$/,_=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,h={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=VD();function p(O,k,C){if(O&&typeof O=="object"&&O instanceof t)return O;var S=new t;return S.parse(O,k,C),S}t.prototype.parse=function(O,k,C){if(typeof O!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof O);var S=O.indexOf("?"),x=S!==-1&&S<O.indexOf("#")?"?":"#",P=O.split(x),T=/\\/g;P[0]=P[0].replace(T,"/"),O=P.join(x);var L=O;if(L=L.trim(),!C&&O.split("#").length===1){var M=i.exec(L);if(M)return this.path=L,this.href=L,this.pathname=M[1],M[2]?(this.search=M[2],k?this.query=y.parse(this.search.substr(1)):this.query=this.search.substr(1)):k&&(this.search="",this.query={}),this}var U=r.exec(L);if(U){U=U[0];var $=U.toLowerCase();this.protocol=$,L=L.substr(U.length)}if(C||U||L.match(/^\/\/[^@/]+@[^@/]+/)){var Z=L.substr(0,2)==="//";Z&&!(U&&E[U])&&(L=L.substr(2),this.slashes=!0)}if(!E[U]&&(Z||U&&!m[U])){for(var B=-1,N=0;N<f.length;N++){var H=L.indexOf(f[N]);H!==-1&&(B===-1||H<B)&&(B=H)}var R,D;B===-1?D=L.lastIndexOf("@"):D=L.lastIndexOf("@",B),D!==-1&&(R=L.slice(0,D),L=L.slice(D+1),this.auth=decodeURIComponent(R)),B=-1;for(var N=0;N<u.length;N++){var H=L.indexOf(u[N]);H!==-1&&(B===-1||H<B)&&(B=H)}B===-1&&(B=L.length),this.host=L.slice(0,B),L=L.slice(B),this.parseHost(),this.hostname=this.hostname||"";var z=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!z)for(var F=this.hostname.split(/\./),N=0,V=F.length;N<V;N++){var Y=F[N];if(Y&&!Y.match(w)){for(var q="",G=0,K=Y.length;G<K;G++)Y.charCodeAt(G)>127?q+="x":q+=Y[G];if(!q.match(w)){var X=F.slice(0,N),Q=F.slice(N+1),te=Y.match(_);te&&(X.push(te[1]),Q.unshift(te[2])),Q.length&&(L="/"+Q.join(".")+L),this.hostname=X.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),z||(this.hostname=e.toASCII(this.hostname));var ee=this.port?":"+this.port:"",ae=this.hostname||"";this.host=ae+ee,this.href+=this.host,z&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),L[0]!=="/"&&(L="/"+L))}if(!h[$])for(var N=0,V=l.length;N<V;N++){var oe=l[N];if(L.indexOf(oe)!==-1){var le=encodeURIComponent(oe);le===oe&&(le=escape(oe)),L=L.split(oe).join(le)}}var Te=L.indexOf("#");Te!==-1&&(this.hash=L.substr(Te),L=L.slice(0,Te));var Fe=L.indexOf("?");if(Fe!==-1?(this.search=L.substr(Fe),this.query=L.substr(Fe+1),k&&(this.query=y.parse(this.query)),L=L.slice(0,Fe)):k&&(this.search="",this.query={}),L&&(this.pathname=L),m[$]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ee=this.pathname||"",fe=this.search||"";this.path=ee+fe}return this.href=this.format(),this};function g(O){return typeof O=="string"&&(O=p(O)),O instanceof t?O.format():t.prototype.format.call(O)}t.prototype.format=function(){var O=this.auth||"";O&&(O=encodeURIComponent(O),O=O.replace(/%3A/i,":"),O+="@");var k=this.protocol||"",C=this.pathname||"",S=this.hash||"",x=!1,P="";this.host?x=O+this.host:this.hostname&&(x=O+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(P=y.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var T=this.search||P&&"?"+P||"";return k&&k.substr(-1)!==":"&&(k+=":"),this.slashes||(!k||m[k])&&x!==!1?(x="//"+(x||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):x||(x=""),S&&S.charAt(0)!=="#"&&(S="#"+S),T&&T.charAt(0)!=="?"&&(T="?"+T),C=C.replace(/[?#]/g,function(L){return encodeURIComponent(L)}),T=T.replace("#","%23"),k+x+C+T+S};function d(O,k){return p(O,!1,!0).resolve(k)}t.prototype.resolve=function(O){return this.resolveObject(p(O,!1,!0)).format()};function b(O,k){return O?p(O,!1,!0).resolveObject(k):k}return t.prototype.resolveObject=function(O){if(typeof O=="string"){var k=new t;k.parse(O,!1,!0),O=k}for(var C=new t,S=Object.keys(this),x=0;x<S.length;x++){var P=S[x];C[P]=this[P]}if(C.hash=O.hash,O.href==="")return C.href=C.format(),C;if(O.slashes&&!O.protocol){for(var T=Object.keys(O),L=0;L<T.length;L++){var M=T[L];M!=="protocol"&&(C[M]=O[M])}return m[C.protocol]&&C.hostname&&!C.pathname&&(C.pathname="/",C.path=C.pathname),C.href=C.format(),C}if(O.protocol&&O.protocol!==C.protocol){if(!m[O.protocol]){for(var U=Object.keys(O),$=0;$<U.length;$++){var Z=U[$];C[Z]=O[Z]}return C.href=C.format(),C}if(C.protocol=O.protocol,!O.host&&!E[O.protocol]){for(var V=(O.pathname||"").split("/");V.length&&!(O.host=V.shift()););O.host||(O.host=""),O.hostname||(O.hostname=""),V[0]!==""&&V.unshift(""),V.length<2&&V.unshift(""),C.pathname=V.join("/")}else C.pathname=O.pathname;if(C.search=O.search,C.query=O.query,C.host=O.host||"",C.auth=O.auth,C.hostname=O.hostname||O.host,C.port=O.port,C.pathname||C.search){var B=C.pathname||"",N=C.search||"";C.path=B+N}return C.slashes=C.slashes||O.slashes,C.href=C.format(),C}var H=C.pathname&&C.pathname.charAt(0)==="/",R=O.host||O.pathname&&O.pathname.charAt(0)==="/",D=R||H||C.host&&O.pathname,z=D,F=C.pathname&&C.pathname.split("/")||[],V=O.pathname&&O.pathname.split("/")||[],Y=C.protocol&&!m[C.protocol];if(Y&&(C.hostname="",C.port=null,C.host&&(F[0]===""?F[0]=C.host:F.unshift(C.host)),C.host="",O.protocol&&(O.hostname=null,O.port=null,O.host&&(V[0]===""?V[0]=O.host:V.unshift(O.host)),O.host=null),D=D&&(V[0]===""||F[0]==="")),R)C.host=O.host||O.host===""?O.host:C.host,C.hostname=O.hostname||O.hostname===""?O.hostname:C.hostname,C.search=O.search,C.query=O.query,F=V;else if(V.length)F||(F=[]),F.pop(),F=F.concat(V),C.search=O.search,C.query=O.query;else if(O.search!=null){if(Y){C.host=F.shift(),C.hostname=C.host;var q=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;q&&(C.auth=q.shift(),C.hostname=q.shift(),C.host=C.hostname)}return C.search=O.search,C.query=O.query,(C.pathname!==null||C.search!==null)&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!F.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var G=F.slice(-1)[0],K=(C.host||O.host||F.length>1)&&(G==="."||G==="..")||G==="",X=0,Q=F.length;Q>=0;Q--)G=F[Q],G==="."?F.splice(Q,1):G===".."?(F.splice(Q,1),X++):X&&(F.splice(Q,1),X--);if(!D&&!z)for(;X--;X)F.unshift("..");D&&F[0]!==""&&(!F[0]||F[0].charAt(0)!=="/")&&F.unshift(""),K&&F.join("/").substr(-1)!=="/"&&F.push("");var te=F[0]===""||F[0]&&F[0].charAt(0)==="/";if(Y){C.hostname=te?"":F.length?F.shift():"",C.host=C.hostname;var q=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;q&&(C.auth=q.shift(),C.hostname=q.shift(),C.host=C.hostname)}return D=D||C.host&&F.length,D&&!te&&F.unshift(""),F.length>0?C.pathname=F.join("/"):(C.pathname=null,C.path=null),(C.pathname!==null||C.search!==null)&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=O.auth||C.auth,C.slashes=C.slashes||O.slashes,C.href=C.format(),C},t.prototype.parseHost=function(){var O=this.host,k=n.exec(O);k&&(k=k[0],k!==":"&&(this.port=k.substr(1)),O=O.substr(0,O.length-k.length)),O&&(this.hostname=O)},ul.parse=p,ul.resolve=d,ul.resolveObject=b,ul.format=g,ul.Url=t,ul}var Zg={exports:{}},b_;function qD(){return b_||(b_=1,function(e){(function(t,r){e.exports?e.exports=r():t.xmlserializer=r()})(we,function(){var t=function(h){return h.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},r=function(h){return h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n=function(h){return h.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},i=function(h){var E=h.value;return" "+h.name+'="'+r(E)+'"'},a=function(h){var E=h.tagName;return h.namespaceURI==="http://www.w3.org/1999/xhtml"&&(E=E.toLowerCase()),E},o=function(h,E){var m=Array.prototype.map.call(h.attributes||h.attrs,function(y){return y.name}).indexOf("xmlns")>=0;return!m&&(E||h.namespaceURI!==h.parentNode.namespaceURI)?' xmlns="'+h.namespaceURI+'"':""},l=function(h){return Array.prototype.map.call(h.childNodes,function(E){return _(E)}).join("")},u=function(h,E){var m="<"+a(h);return m+=o(h,E),Array.prototype.forEach.call(h.attributes||h.attrs,function(y){m+=i(y)}),h.childNodes.length>0?(m+=">",m+=l(h),m+="</"+a(h)+">"):m+="/>",m},f=function(h){var E=h.nodeValue||h.value||"";return n(E)},v=function(h){return"<!--"+h.data.replace(/-/g,"-")+"-->"},w=function(h){return"<![CDATA["+h.nodeValue+"]]>"},_=function(h,E){var m=E&&E.rootNode;if(h.nodeName==="#document"||h.nodeName==="#document-fragment")return l(h);if(h.tagName)return u(h,m);if(h.nodeName==="#text")return f(h);if(h.nodeName==="#comment")return v(h);if(h.nodeName==="#cdata-section")return w(h)};return{serializeToString:function(h){return t(_(h,{rootNode:!0}))}}})}(Zg)),Zg.exports}var Qg={},__;function WD(){if(__)return Qg;__=1;var e=function(a){var o=new XMLSerializer;return Array.prototype.map.call(a.childNodes,function(l){return o.serializeToString(l)}).join("")},t=function(a){if(a.documentElement.tagName==="parsererror"&&a.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return a.documentElement;if((a.documentElement.tagName==="xml"||a.documentElement.tagName==="html")&&a.documentElement.childNodes&&a.documentElement.childNodes.length>0&&a.documentElement.childNodes[0].nodeName==="parsererror")return a.documentElement.childNodes[0];if(a.documentElement.tagName==="html"&&a.documentElement.childNodes&&a.documentElement.childNodes.length>0&&a.documentElement.childNodes[0].nodeName==="body"&&a.documentElement.childNodes[0].childNodes&&a.documentElement.childNodes[0].childNodes.length&&a.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return a.documentElement.childNodes[0].childNodes[0]},r=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
147
|
-
?</div>`),new RegExp(`^(.+)
|
|
148
|
-
`)],n=function(a){var o=e(a),l,u;for(l=0;l<r.length;l++)if(u=r[l].exec(o),u)return u[1]},i=function(a){var o;if(a===null)throw new Error("Parse error");var l=t(a);if(l!==void 0)throw o=n(l)||"Parse error",new Error(o)};return Qg.failOnParseError=function(a){return i(a),a},Qg}var Jg={},ev={},w_;function b0(){return w_||(w_=1,function(e){var t=wS();e.getDocumentBaseUrl=function(l){return l.baseURI!=="about:blank"?l.baseURI:null},e.clone=function(l){var u={},f;for(f in l)l.hasOwnProperty(f)&&(u[f]=l[f]);return u},e.cloneArray=function(l){return Array.prototype.slice.apply(l,[0])},e.joinUrl=function(l,u){return l?t.resolve(l,u):u},e.isDataUri=function(l){return/^data:/.test(l)},e.collectAndReportErrors=function(l){var u=[];return Promise.all(l.map(function(f){return f.catch(function(v){u.push(v)})})).then(function(){return u})};var r=null,n=function(l,u){return u===!1||u==="none"||u==="repeated"?((r===null||u!=="repeated")&&(r=Date.now()),l+"?_="+r):l};e.ajax=function(l,u){return new Promise(function(f,v){var w=new window.XMLHttpRequest,_=e.joinUrl(u.baseUrl,l),h,E=function(){v({msg:"Unable to load url",url:_})};h=n(_,u.cache),w.addEventListener("load",function(){w.status===200||w.status===0?f(w.response):E()},!1),w.addEventListener("error",E,!1);try{w.open("GET",h,!0),w.overrideMimeType(u.mimeType),w.send(null)}catch{E()}})},e.binaryAjax=function(l,u){var f=e.clone(u);return f.mimeType="text/plain; charset=x-user-defined",e.ajax(l,f).then(function(v){for(var w="",_=0;_<v.length;_++)w+=String.fromCharCode(v.charCodeAt(_)&255);return w})};var i=function(l){var u=function(f,v){return f.substring(0,v.length)===v};return u(l,"<?xml")||u(l,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(l,u){return e.binaryAjax(l,u).then(function(f){var v=btoa(f),w=i(f);return"data:"+w+";base64,"+v})};var a=[],o=function(l){return a.indexOf(l)<0&&a.push(l),a.indexOf(l)};e.memoize=function(l,u,f){if(typeof f!="object")throw new Error("cacheBucket is not an object");return function(){var v=Array.prototype.slice.call(arguments),w=u(v),_=o(l),h;return f[_]&&f[_][w]?f[_][w]:(h=l.apply(null,v),f[_]=f[_]||{},f[_][w]=h,h)}}}(ev)),ev}var tv={},S_;function YD(){if(S_)return tv;S_=1;var e=b0(),t=function(a,o){var l=null;a.hasAttribute("src")?l=a.getAttribute("src"):a.hasAttributeNS("http://www.w3.org/1999/xlink","href")?l=a.getAttributeNS("http://www.w3.org/1999/xlink","href"):a.hasAttribute("href")&&(l=a.getAttribute("href"));var u=e.getDocumentBaseUrl(a.ownerDocument),f=e.clone(o);return!f.baseUrl&&u&&(f.baseUrl=u),e.getDataURIForImageURL(l,f).then(function(v){return v},function(v){throw{resourceType:"image",url:v.url,msg:"Unable to load image "+v.url}})},r=function(a){return a.filter(function(o){var l=null;return o.hasAttribute("src")?l=o.getAttribute("src"):o.hasAttributeNS("http://www.w3.org/1999/xlink","href")?l=o.getAttributeNS("http://www.w3.org/1999/xlink","href"):o.hasAttribute("href")&&(l=o.getAttribute("href")),l!==null&&!e.isDataUri(l)})},n=function(a){return Array.prototype.filter.call(a,function(o){return o.type==="image"})},i=function(a){return Array.prototype.slice.call(a)};return tv.inline=function(a,o){var l=i(a.getElementsByTagName("img")),u=i(a.getElementsByTagName("image")),f=n(a.getElementsByTagName("input"));l=l.concat(u),l=l.concat(f);var v=r(l);return e.collectAndReportErrors(v.map(function(w){return t(w,o).then(function(_){w.attributes.src?w.attributes.src.value=_:w.attributes["xlink:href"]?w.attributes["xlink:href"].value=_:w.attributes.href&&(w.attributes.href.value=_)})}))},tv}var rv={},E_;function KD(){if(E_)return rv;E_=1;var e=b0(),t=function(a,o){var l=a.attributes.src.value,u=e.getDocumentBaseUrl(a.ownerDocument),f=e.clone(o);return!f.baseUrl&&u&&(f.baseUrl=u),e.ajax(l,f).catch(function(v){throw{resourceType:"script",url:v.url,msg:"Unable to load script "+v.url}})},r=function(a){return a.replace(/<\//g,"<\\/")},n=function(a,o){a.attributes.removeNamedItem("src"),a.textContent=r(o)},i=function(a){var o=a.getElementsByTagName("script");return Array.prototype.filter.call(o,function(l){return!!l.attributes.src})};return rv.inline=function(a,o){var l=i(a);return e.collectAndReportErrors(l.map(function(u){return t(u,o).then(function(f){n(u,f)})}))},rv}var nv={},iv={},O_;function N2(){return O_||(O_=1,function(e){e.unquoteString=function(t){var r=/^"(.*)"$/,n=/^'(.*)'$/;return r.test(t)?t.replace(r,"$1"):n.test(t)?t.replace(n,"$1"):t},e.rulesForCssText=function(t){var r=document.implementation.createHTMLDocument(""),n=document.createElement("style"),i;return n.textContent=t,r.body.appendChild(n),i=n.sheet.cssRules,Array.prototype.slice.call(i)},e.cssRulesToText=function(t){return t.reduce(function(r,n){return r+n.cssText},"")},e.exchangeRule=function(t,r,n){var i=t.indexOf(r);t[i]=e.rulesForCssText(n)[0]},e.changeFontFaceRuleSrc=function(t,r,n){var i="@font-face { font-family: "+r.style.getPropertyValue("font-family")+"; ";r.style.getPropertyValue("font-style")&&(i+="font-style: "+r.style.getPropertyValue("font-style")+"; "),r.style.getPropertyValue("font-weight")&&(i+="font-weight: "+r.style.getPropertyValue("font-weight")+"; "),r.style.getPropertyValue("unicode-range")&&(i+="unicode-range: "+r.style.getPropertyValue("unicode-range")+"; "),i+="src: "+n+"}",e.exchangeRule(t,r,i)}}(iv)),iv}var av={},x_;function XD(){return x_||(x_=1,function(e){var t=N2(),r=function(a){var o=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return a.replace(o,"$1")};e.extractCssUrl=function(a){var o=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,l;if(!o.test(a))throw new Error("Invalid url");return l=o.exec(a)[1],t.unquoteString(r(l))};var n=function(a){var o=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,l="(url\\("+o+"\\)|[^,\\s]+)",u="(?:\\s*"+l+")+",f="^\\s*("+u+")(?:\\s*,\\s*("+u+"))*\\s*$",v=new RegExp(u,"g"),w,_=[],h=function(E){var m=new RegExp(l,"g"),y=[],p;for(p=m.exec(E);p;)y.push(p[1]),p=m.exec(E);return y};if(a.match(new RegExp(f))){for(w=v.exec(a);w;)_.push(h(w[0])),w=v.exec(a);return _}return[]},i=function(a){var o,l;for(o=0;o<a.length;o++)try{return l=e.extractCssUrl(a[o]),{url:l,idx:o}}catch{}};e.parse=function(a){var o=n(a);return o.map(function(l){var u=i(l);return u?{preUrl:l.slice(0,u.idx),url:u.url,postUrl:l.slice(u.idx+1)}:{preUrl:l}})},e.serialize=function(a){var o=a.map(function(l){var u=[].concat(l.preUrl);return l.url&&u.push('url("'+l.url+'")'),l.postUrl&&(u=u.concat(l.postUrl)),u.join(" ")});return o.join(", ")}}(av)),av}function Gd(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 ov={exports:{}},P_;function ZD(){return P_||(P_=1,function(e,t){(function(r){e.exports=r()})(function(){return function r(n,i,a){function o(f,v){if(!i[f]){if(!n[f]){var w=typeof Gd=="function"&&Gd;if(!v&&w)return w(f,!0);if(l)return l(f,!0);var _=new Error("Cannot find module '"+f+"'");throw _.code="MODULE_NOT_FOUND",_}var h=i[f]={exports:{}};n[f][0].call(h.exports,function(E){var m=n[f][1][E];return o(m||E)},h,h.exports,r,n,i,a)}return i[f].exports}for(var l=typeof Gd=="function"&&Gd,u=0;u<a.length;u++)o(a[u]);return o}({1:[function(r,n,i){function a(u,f){function v(){this.constructor=u}v.prototype=f.prototype,u.prototype=new v}function o(u,f,v,w){this.message=u,this.expected=f,this.found=v,this.location=w,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o)}a(o,Error),o.buildMessage=function(u,f){var v={literal:function(p){return'"'+_(p.text)+'"'},class:function(p){var g="",d;for(d=0;d<p.parts.length;d++)g+=p.parts[d]instanceof Array?h(p.parts[d][0])+"-"+h(p.parts[d][1]):h(p.parts[d]);return"["+(p.inverted?"^":"")+g+"]"},any:function(p){return"any character"},end:function(p){return"end of input"},other:function(p){return p.description}};function w(p){return p.charCodeAt(0).toString(16).toUpperCase()}function _(p){return p.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(g){return"\\x0"+w(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+w(g)})}function h(p){return p.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(g){return"\\x0"+w(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+w(g)})}function E(p){return v[p.type](p)}function m(p){var g=new Array(p.length),d,b;for(d=0;d<p.length;d++)g[d]=E(p[d]);if(g.sort(),g.length>0){for(d=1,b=1;d<g.length;d++)g[d-1]!==g[d]&&(g[b]=g[d],b++);g.length=b}switch(g.length){case 1:return g[0];case 2:return g[0]+" or "+g[1];default:return g.slice(0,-1).join(", ")+", or "+g[g.length-1]}}function y(p){return p?'"'+_(p)+'"':"end of input"}return"Expected "+m(u)+" but "+y(f)+" found."};function l(u,f){f=f!==void 0?f:{};var v={},w={start:ee},_=ee,h="",E=function(){return[]},m=",",y=Y(",",!1),p=function(re,de){return[re].concat(de)},g=function(re){return[re]},d=function(re,de){return{url:re,format:de}},b=function(re){return{url:re}},O="url(",k=Y("url(",!1),C=")",S=Y(")",!1),x=function(re){return re},P="format(",T=Y("format(",!1),L="local(",M=Y("local(",!1),U=function(re){return{local:re}},$=/^[^)]/,Z=q([")"],!0,!1),B=function(re){return pe.extractValue(re.join(""))},N=/^[ \t\r\n\f]/,H=q([" "," ","\r",`
|
|
149
|
-
`,"\f"],!1,!1),R=0,D=[{line:1,column:1}],z=0,F=[],V;if("startRule"in f){if(!(f.startRule in w))throw new Error(`Can't start parsing from rule "`+f.startRule+'".');_=w[f.startRule]}function Y(re,de){return{type:"literal",text:re,ignoreCase:de}}function q(re,de,be){return{type:"class",parts:re,inverted:de,ignoreCase:be}}function G(){return{type:"end"}}function K(re){var de=D[re],be;if(de)return de;for(be=re-1;!D[be];)be--;for(de=D[be],de={line:de.line,column:de.column};be<re;)u.charCodeAt(be)===10?(de.line++,de.column=1):de.column++,be++;return D[re]=de,de}function X(re,de){var be=K(re),ye=K(de);return{start:{offset:re,line:be.line,column:be.column},end:{offset:de,line:ye.line,column:ye.column}}}function Q(re){R<z||(R>z&&(z=R,F=[]),F.push(re))}function te(re,de,be){return new o(o.buildMessage(re,de),re,de,be)}function ee(){var re,de;return re=ae(),re===v&&(re=R,de=h,de!==v&&(de=E()),re=de),re}function ae(){var re,de,be,ye,Ie,Ee;if(re=R,de=oe(),de!==v){for(be=[],ye=ge();ye!==v;)be.push(ye),ye=ge();if(be!==v)if(u.charCodeAt(R)===44?(ye=m,R++):(ye=v,Q(y)),ye!==v){for(Ie=[],Ee=ge();Ee!==v;)Ie.push(Ee),Ee=ge();Ie!==v?(Ee=ae(),Ee!==v?(de=p(de,Ee),re=de):(R=re,re=v)):(R=re,re=v)}else R=re,re=v;else R=re,re=v}else R=re,re=v;return re===v&&(re=R,de=oe(),de!==v&&(de=g(de)),re=de),re}function oe(){var re;return re=le(),re===v&&(re=fe()),re}function le(){var re,de,be,ye;if(re=R,de=Te(),de!==v){if(be=[],ye=ge(),ye!==v)for(;ye!==v;)be.push(ye),ye=ge();else be=v;be!==v?(ye=Fe(),ye!==v?(de=d(de,ye),re=de):(R=re,re=v)):(R=re,re=v)}else R=re,re=v;return re===v&&(re=R,de=Te(),de!==v&&(de=b(de)),re=de),re}function Te(){var re,de,be,ye;return re=R,u.substr(R,4)===O?(de=O,R+=4):(de=v,Q(k)),de!==v?(be=ne(),be!==v?(u.charCodeAt(R)===41?(ye=C,R++):(ye=v,Q(S)),ye!==v?(de=x(be),re=de):(R=re,re=v)):(R=re,re=v)):(R=re,re=v),re}function Fe(){var re,de,be,ye;return re=R,u.substr(R,7)===P?(de=P,R+=7):(de=v,Q(T)),de!==v?(be=ne(),be!==v?(u.charCodeAt(R)===41?(ye=C,R++):(ye=v,Q(S)),ye!==v?(de=x(be),re=de):(R=re,re=v)):(R=re,re=v)):(R=re,re=v),re}function fe(){var re,de,be,ye;return re=R,u.substr(R,6)===L?(de=L,R+=6):(de=v,Q(M)),de!==v?(be=ne(),be!==v?(u.charCodeAt(R)===41?(ye=C,R++):(ye=v,Q(S)),ye!==v?(de=U(be),re=de):(R=re,re=v)):(R=re,re=v)):(R=re,re=v),re}function ne(){var re,de,be;if(re=R,de=[],$.test(u.charAt(R))?(be=u.charAt(R),R++):(be=v,Q(Z)),be!==v)for(;be!==v;)de.push(be),$.test(u.charAt(R))?(be=u.charAt(R),R++):(be=v,Q(Z));else de=v;return de!==v&&(de=B(de)),re=de,re}function ge(){var re;return N.test(u.charAt(R))?(re=u.charAt(R),R++):(re=v,Q(H)),re}var pe=r("../util");if(V=_(),V!==v&&R===u.length)return V;throw V!==v&&R<u.length&&Q(G()),te(F,z<u.length?u.charAt(z):null,z<u.length?X(z,z+1):X(z,z))}n.exports={SyntaxError:o,parse:l}},{"../util":3}],2:[function(r,n,i){var a=r("./grammar");i.SyntaxError=function(o,l){this.message=o,this.offset=l},i.parse=function(o){try{return a.parse(o)}catch(l){throw new i.SyntaxError(l.message,l.offset)}},i.serialize=function(o){return o.map(function(l){var u;return l.url?(u='url("'+l.url+'")',l.format&&(u+=' format("'+l.format+'")')):u='local("'+l.local+'")',u}).join(", ")}},{"./grammar":1}],3:[function(r,n,i){var a=function(l){var u=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return l.replace(u,"$1")},o=function(l){var u=/^"(.*)"$/,f=/^'(.*)'$/;return u.test(l)?l.replace(u,"$1"):f.test(l)?l.replace(f,"$1"):l};i.extractValue=function(l){return o(a(l))}},{}]},{},[2])(2)})}(ov)),ov.exports}var C_;function QD(){return C_||(C_=1,function(e){var t=b0(),r=N2(),n=XD(),i=ZD(),a=function(g,d,b){g.style.setProperty(d,b,g.style.getPropertyPriority(d))},o=function(g){return g.filter(function(d){return d.type===window.CSSRule.STYLE_RULE&&(d.style.getPropertyValue("background-image")||d.style.getPropertyValue("background"))})},l=function(g){var d=[];return g.forEach(function(b){b.style.getPropertyValue("background-image")?d.push({property:"background-image",value:b.style.getPropertyValue("background-image"),rule:b}):b.style.getPropertyValue("background")&&d.push({property:"background",value:b.style.getPropertyValue("background"),rule:b})}),d},u=function(g){return g.filter(function(d){return d.type===window.CSSRule.FONT_FACE_RULE&&d.style.getPropertyValue("src")})},f=function(g){return g.filter(function(d){return d.type===window.CSSRule.IMPORT_RULE&&d.href})},v=function(g){var d=[];return g.forEach(function(b,O){b.url&&!t.isDataUri(b.url)&&d.push(O)}),d},w=function(g){var d=[];return g.forEach(function(b,O){b.url&&!t.isDataUri(b.url)&&d.push(O)}),d};e.adjustPathsOfCssResources=function(g,d){var b=o(d),O=l(b),k=!1;return O.forEach(function(C){var S=n.parse(C.value),x=v(S),P;x.length>0&&(x.forEach(function(T){var L=S[T].url,M=t.joinUrl(g,L);S[T].url=M}),P=n.serialize(S),a(C.rule,C.property,P),k=!0)}),u(d).forEach(function(C){var S=C.style.getPropertyValue("src"),x,P;try{x=i.parse(S)}catch{return}P=w(x),P.length>0&&(P.forEach(function(T){var L=x[T].url,M=t.joinUrl(g,L);x[T].url=M}),r.changeFontFaceRuleSrc(d,C,i.serialize(x)),k=!0)}),f(d).forEach(function(C){var S=C.href,x=t.joinUrl(g,S);r.exchangeRule(d,C,"@import url("+x+");"),k=!0}),k};var _=function(g,d,b){var O=g.indexOf(d);g.splice(O,1),b.forEach(function(k,C){g.splice(O+C,0,k)})},h=function(g,d,b,O){var k=d.href,C;return k=r.unquoteString(k),C=t.joinUrl(O.baseUrl,k),b.indexOf(C)>=0?(_(g,d,[]),Promise.resolve([])):(b.push(C),t.ajax(k,O).then(function(S){var x=r.rulesForCssText(S);return e.loadCSSImportsForRules(x,b,O).then(function(P){return e.adjustPathsOfCssResources(k,x),_(g,d,x),P.errors})},function(S){throw{resourceType:"stylesheet",url:S.url,msg:"Unable to load stylesheet "+S.url}}))};e.loadCSSImportsForRules=function(g,d,b){var O=f(g),k=[],C=!1;return Promise.all(O.map(function(S){return h(g,S,d,b).then(function(x){k=k.concat(x),C=!0},function(x){k.push(x)})})).then(function(){return{hasChanges:C,errors:k}})};var E=function(g,d){var b=n.parse(g),O=v(b),k=!1;return t.collectAndReportErrors(O.map(function(C){var S=b[C].url;return t.getDataURIForImageURL(S,d).then(function(x){b[C].url=x,k=!0},function(x){throw{resourceType:"backgroundImage",url:x.url,msg:"Unable to load background-image "+x.url}})})).then(function(C){return{backgroundValue:n.serialize(b),hasChanges:k,errors:C}})},m=function(g,d){var b=o(g),O=l(b),k=[],C=!1;return Promise.all(O.map(function(S){return E(S.value,d).then(function(x){x.hasChanges&&(a(S.rule,S.property,x.backgroundValue),C=!0),k=k.concat(x.errors)})})).then(function(){return{hasChanges:C,errors:k}})},y=function(g,d){var b=!1,O,k;try{O=i.parse(g)}catch{O=[]}return k=w(O),t.collectAndReportErrors(k.map(function(C){var S=O[C],x=S.format||"woff";return t.binaryAjax(S.url,d).then(function(P){var T=btoa(P);S.url="data:font/"+x+";base64,"+T,b=!0},function(P){throw{resourceType:"fontFace",url:P.url,msg:"Unable to load font-face "+P.url}})})).then(function(C){return{srcDeclarationValue:i.serialize(O),hasChanges:b,errors:C}})},p=function(g,d){var b=u(g),O=[],k=!1;return Promise.all(b.map(function(C){var S=C.style.getPropertyValue("src");return y(S,d).then(function(x){x.hasChanges&&(r.changeFontFaceRuleSrc(g,C,x.srcDeclarationValue),k=!0),O=O.concat(x.errors)})})).then(function(){return{hasChanges:k,errors:O}})};e.loadAndInlineCSSResourcesForRules=function(g,d){var b=!1,O=[];return Promise.all([m,p].map(function(k){return k(g,d).then(function(C){b=b||C.hasChanges,O=O.concat(C.errors)})})).then(function(){return{hasChanges:b,errors:O}})}}(nv)),nv}var T_;function JD(){return T_||(T_=1,function(e){var t=b0(),r=YD(),n=KD(),i=QD(),a=N2(),o=function(y){return t.joinUrl(y,".")},l=function(y){var p=y.map(function(g,d){return d===y.length-1&&(g={baseUrl:o(g.baseUrl)}),JSON.stringify(g)});return p},u=function(y,p){return p.cache!==!1&&p.cache!=="none"&&p.cacheBucket?t.memoize(y,l,p.cacheBucket):y},f=function(y,p,g){var d=a.rulesForCssText(y);return i.loadCSSImportsForRules(d,p,g).then(function(b){return i.loadAndInlineCSSResourcesForRules(d,g).then(function(O){var k=b.errors.concat(O.errors),C=b.hasChanges||O.hasChanges;return C&&(y=a.cssRulesToText(d)),{hasChanges:C,content:y,errors:k}})})},v=function(y,p,g){var d=y.textContent,b=u(f,p);return b(d,g,p).then(function(O){return O.hasChanges&&(y.childNodes[0].nodeValue=O.content),t.cloneArray(O.errors)})},w=function(y){var p=y.getElementsByTagName("style");return Array.prototype.filter.call(p,function(g){return!g.attributes.type||g.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(y,p){var g=w(y),d=[],b=[],O;return O=t.clone(p),O.baseUrl=O.baseUrl||t.getDocumentBaseUrl(y),Promise.all(g.map(function(k){return v(k,O,b).then(function(C){d=d.concat(C)})})).then(function(){return d})};var _=function(y,p){var g=y.parentNode,d;p=p.trim(),p&&(d=y.ownerDocument.createElement("style"),d.type="text/css",d.appendChild(y.ownerDocument.createTextNode(p)),g.insertBefore(d,y)),g.removeChild(y)},h=function(y,p){return t.ajax(y,p).then(function(g){var d=a.rulesForCssText(g);return{content:g,cssRules:d}}).then(function(g){var d=i.adjustPathsOfCssResources(y,g.cssRules);return{content:g.content,cssRules:g.cssRules,hasChanges:d}}).then(function(g){return i.loadCSSImportsForRules(g.cssRules,[],p).then(function(d){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||d.hasChanges,errors:d.errors}})}).then(function(g){return i.loadAndInlineCSSResourcesForRules(g.cssRules,p).then(function(d){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||d.hasChanges,errors:g.errors.concat(d.errors)}})}).then(function(g){var d=g.content;return g.hasChanges&&(d=a.cssRulesToText(g.cssRules)),{content:d,errors:g.errors}})},E=function(y,p){var g=y.attributes.href.value,d=t.getDocumentBaseUrl(y.ownerDocument),b=t.clone(p);!b.baseUrl&&d&&(b.baseUrl=d);var O=u(h,p);return O(g,b).then(function(k){return{content:k.content,errors:t.cloneArray(k.errors)}})},m=function(y){var p=y.getElementsByTagName("link");return Array.prototype.filter.call(p,function(g){return g.attributes.rel&&g.attributes.rel.value==="stylesheet"&&(!g.attributes.type||g.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(y,p){var g=m(y),d=[];return Promise.all(g.map(function(b){return E(b,p).then(function(O){_(b,O.content+`
|
|
150
|
-
`),d=d.concat(O.errors)},function(O){d.push({resourceType:"stylesheet",url:O.url,msg:"Unable to load stylesheet "+O.url})})})).then(function(){return d})},e.loadAndInlineImages=r.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(y,p){var g=[],d=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return p.inlineScripts!==!1&&d.push(e.loadAndInlineScript),Promise.all(d.map(function(b){return b(y,p).then(function(O){g=g.concat(O)})})).then(function(){return g})}}(Jg)),Jg}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
151
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
152
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */(function(e){(function(t,r){t===void 0&&window!==void 0&&(t=window),e.exports?e.exports=r(wS(),qD(),WD(),JD()):t.rasterizeHTML=r(t.url,t.xmlserializer,t.sanedomparsererror,t.inlineresources)})(we,function(t,r,n,i){var a=function(E){var m={},y=[];m.joinUrl=function(d,b){return d?E.resolve(d,b):b},m.getConstantUniqueIdFor=function(d){return y.indexOf(d)<0&&y.push(d),y.indexOf(d)},m.clone=function(d){var b={},O;for(O in d)d.hasOwnProperty(O)&&(b[O]=d[O]);return b};var p=function(d){return typeof d=="object"&&d!==null},g=function(d){return p(d)&&Object.prototype.toString.apply(d).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return m.parseOptionalParameters=function(d){var b={canvas:null,options:{}};return d[0]==null||g(d[0])?(b.canvas=d[0]||null,b.options=m.clone(d[1])):b.options=m.clone(d[0]),b},m}(t),o=function(E){var m={},y=function(p,g,d){var b=p[g];return p[g]=function(){var O=Array.prototype.slice.call(arguments);return d.apply(this,[O,b])},b};return m.baseUrlRespectingXhr=function(p,g){var d=function(){var b=new p;return y(b,"open",function(O,k){var C=O.shift(),S=O.shift(),x=E.joinUrl(g,S);return k.apply(this,[C,x].concat(O))}),b};return d},m.finishNotifyingXhr=function(p){var g=0,d=0,b=!1,O,k=new Promise(function(S){O=function(){var x=g-d;x<=0&&b&&S({totalCount:g})}}),C=function(){var S=new p;return y(S,"send",function(x,P){return g+=1,P.apply(this,arguments)}),S.addEventListener("load",function(){d+=1,O()}),S};return C.waitForRequestsToFinish=function(){return b=!0,O(),k},C},m}(a),l=function(){var E={},m=function(C){return Array.prototype.slice.call(C)};E.addClassName=function(C,S){C.className+=" "+S},E.addClassNameRecursively=function(C,S){E.addClassName(C,S),C.parentNode!==C.ownerDocument&&E.addClassNameRecursively(C.parentNode,S)};var y=function(C,S){var x=C.parentStyleSheet,P=m(x.cssRules).indexOf(C);x.insertRule(S,P+1),x.deleteRule(P)},p=function(C,S){var x=C.cssText.replace(/^[^\{]+/,""),P=S+" "+x;y(C,P)},g=function(C){return m(C).reduce(function(S,x){return S+x.cssText},"")},d=function(C){C.textContent=g(C.sheet.cssRules)},b=function(C){var S=document.implementation.createHTMLDocument(""),x=document.createElement("style");x.textContent=C.textContent,S.body.appendChild(x),C.sheet=x.sheet},O=function(C){return"((?:^|[^.#:\\w])|(?=\\W))("+C.join("|")+")(?=\\W|$)"},k=function(C,S,x){var P=O(S);m(C.querySelectorAll("style")).forEach(function(T){typeof T.sheet>"u"&&b(T);var L=m(T.sheet.cssRules).filter(function(M){return M.selectorText&&new RegExp(P,"i").test(M.selectorText)});L.length&&(L.forEach(function(M){var U=M.selectorText.replace(new RegExp(P,"gi"),function($,Z,B){return Z+x(B)});U!==M.selectorText&&p(M,U)}),d(T))})};return E.rewriteCssSelectorWith=function(C,S,x){k(C,[S],function(){return x})},E.lowercaseCssTypeSelectors=function(C,S){k(C,S,function(x){return x.toLowerCase()})},E.findHtmlOnlyNodeNames=function(C){var S=C.ownerDocument.createTreeWalker(C,NodeFilter.SHOW_ELEMENT),x={},P={},T;do T=S.currentNode.tagName.toLowerCase(),S.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?x[T]=!0:P[T]=!0;while(S.nextNode());return Object.keys(x).filter(function(L){return!P[L]})},E}(),u=function(E){var m={},y=function(g){return Array.prototype.slice.call(g)},p={active:!0,hover:!0,focus:!1,target:!1};return m.fakeUserAction=function(g,d,b){var O=g.querySelector(d),k=":"+b,C="rasterizehtml"+b;O&&(p[b]?E.addClassNameRecursively(O,C):E.addClassName(O,C),E.rewriteCssSelectorWith(g,k,"."+C))},m.persistInputValues=function(g){var d=g.querySelectorAll("input"),b=g.querySelectorAll("textarea"),O=function(k){return k.type==="checkbox"||k.type==="radio"};y(d).filter(O).forEach(function(k){k.checked?k.setAttribute("checked",""):k.removeAttribute("checked")}),y(d).filter(function(k){return!O(k)}).forEach(function(k){k.setAttribute("value",k.value)}),y(b).forEach(function(k){k.textContent=k.value})},m.rewriteTagNameSelectorsToLowerCase=function(g){E.lowercaseCssTypeSelectors(g,E.findHtmlOnlyNodeNames(g))},m}(l),f=function(E,m,y,p){var g={},d=function(B,N,H,R){var D=B.createElement(N);return D.style.visibility="hidden",D.style.width=H+"px",D.style.height=R+"px",D.style.position="absolute",D.style.top=-1e4-R+"px",D.style.left=-1e4-H+"px",B.getElementsByTagName("body")[0].appendChild(D),D},b=function(B){return B>0?new Promise(function(N){setTimeout(N,B)}):Promise.resolve()};g.executeJavascript=function(B,N){return new Promise(function(H){var R=d(p.document,"iframe",N.width,N.height),D=B.outerHTML,z=[],F=N.executeJsTimeout||0,V=function(){p.document.getElementsByTagName("body")[0].removeChild(R)},Y=function(){var X=R.contentDocument;H({document:X,errors:z,cleanUp:V})},q=R.contentWindow.XMLHttpRequest,G=m.finishNotifyingXhr(q),K=m.baseUrlRespectingXhr(G,N.baseUrl);R.onload=function(){b(F).then(G.waitForRequestsToFinish).then(Y)},R.contentDocument.open(),R.contentWindow.XMLHttpRequest=K,R.contentWindow.onerror=function(X){z.push({resourceType:"scriptExecution",msg:X})},R.contentDocument.write("<!DOCTYPE html>"),R.contentDocument.write(D),R.contentDocument.close()})};var O=function(B,N,H){var R=B.createElement("iframe");return R.style.width=N+"px",R.style.height=H+"px",R.style.visibility="hidden",R.style.position="absolute",R.style.top=-1e4-H+"px",R.style.left=-1e4-N+"px",R.style.borderWidth=0,R.sandbox="allow-same-origin",R.scrolling="no",R},k=function(B,N,H){var R=Math.floor(B/H),D=Math.floor(N/H);return O(p.document,R,D)},C=function(B,N,H,R){return{width:Math.max(B.width*R,N),height:Math.max(B.height*R,H)}},S=function(B,N){var H=B.querySelector(N);if(H)return H;if(B.ownerDocument.querySelector(N)===B)return B;throw{message:"Clipping selector not found"}},x=function(B,N,H,R,D){var z=Math.max(B.scrollWidth,B.clientWidth),F=Math.max(B.scrollHeight,B.clientHeight),V,Y,q,G,K,X,Q,te;return N?(X=S(B,N),Q=X.getBoundingClientRect(),V=Q.top,Y=Q.left,q=Q.width,G=Q.height):(V=0,Y=0,q=z,G=F),te=C({width:q,height:G},H,R,D),K=p.getComputedStyle(B.ownerDocument.documentElement).fontSize,{left:Y,top:V,width:te.width,height:te.height,viewportWidth:z,viewportHeight:F,rootFontSize:K}},P=function(B,N){var H=B.tagName;return N.querySelector(H)},T=function(B){var N=B.tagName.toLowerCase();return N==="html"||N==="body"?B.outerHTML:'<body style="margin: 0;">'+B.outerHTML+"</body>"};g.calculateDocumentContentSize=function(B,N){return new Promise(function(H,R){var D=N.zoom||1,z;z=k(N.width,N.height,D),p.document.getElementsByTagName("body")[0].appendChild(z),z.onload=function(){var F=z.contentDocument,V;try{V=x(P(B,F),N.clip,N.width,N.height,D),H(V)}catch(Y){R(Y)}finally{p.document.getElementsByTagName("body")[0].removeChild(z)}},z.contentDocument.open(),z.contentDocument.write("<!DOCTYPE html>"),z.contentDocument.write(T(B)),z.contentDocument.close()})},g.parseHtmlFragment=function(B){var N=p.document.implementation.createHTMLDocument("");N.documentElement.innerHTML=B;var H=N.querySelector("body").firstChild;if(!H)throw"Invalid source";return H};var L=function(B,N){var H=/<html((?:\s+[^>]*)?)>/im.exec(N),R=p.document.implementation.createHTMLDocument(""),D,z,F,V;if(H)for(D="<div"+H[1]+"></div>",R.documentElement.innerHTML=D,F=R.querySelector("div"),z=0;z<F.attributes.length;z++)V=F.attributes[z],B.documentElement.setAttribute(V.name,V.value)};g.parseHTML=function(B){var N=p.document.implementation.createHTMLDocument("");return N.documentElement.innerHTML=B,L(N,B),N};var M=function(B){try{return y.failOnParseError(B)}catch(N){throw{message:"Invalid source",originalError:N}}};g.validateXHTML=function(B){var N=new DOMParser,H=N.parseFromString(B,"application/xml");M(H)};var U=null,$=function(B,N){return N==="none"||N==="repeated"?((U===null||N!=="repeated")&&(U=Date.now()),B+"?_="+U):B},Z=function(B,N){return new Promise(function(H,R){var D=new window.XMLHttpRequest,z=E.joinUrl(N.baseUrl,B),F=$(z,N.cache),V=function(Y){R({message:"Unable to load page",originalError:Y})};D.addEventListener("load",function(){D.status===200||D.status===0?H(D.responseXML):V(D.statusText)},!1),D.addEventListener("error",function(Y){V(Y)},!1);try{D.open("GET",F,!0),D.responseType="document",D.send(null)}catch(Y){V(Y)}})};return g.loadDocument=function(B,N){return Z(B,N).then(function(H){return M(H)})},g}(a,o,n,window),v=function(E){var m={},y=function(P,T){return T?URL.createObjectURL(new Blob([P],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(P)},p=function(P){P instanceof Blob&&URL.revokeObjectURL(P)},g='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',d=function(P){return new Promise(function(T,L){var M=document.createElement("canvas"),U=new Image;U.onload=function(){var $=M.getContext("2d");try{$.drawImage(U,0,0),M.toDataURL("image/png"),T(!0)}catch{T(!1)}},U.onerror=L,U.src=P})},b=function(){var P=y(g,!0);return d(P).then(function(T){return p(P),T?!1:d(y(g,!1)).then(function(L){return L})},function(){return!1})},O=function(){if(E.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},k=function(){return new Promise(function(P,T){O()&&E.URL?b().then(function(L){P(!L)},function(){T()}):P(!1)})},C,S=function(){return C===void 0&&(C=k()),C},x=function(P){return S().then(function(T){return y(P,T)})};return m.renderSvg=function(P){return new Promise(function(T,L){var M,U,$=function(){U.onload=null,U.onerror=null},Z=function(){M&&p(M)};U=new Image,U.onload=function(){$(),Z(),T(U)},U.onerror=function(){Z(),L()},x(P).then(function(B){M=B,U.src=M},L)})},m}(window),w=function(E,m,y,p){var g={},d=function(P,T){var L=T||1,M={width:P.width,height:P.height,"font-size":P.rootFontSize};return L!==1&&(M.style="transform:scale("+L+"); transform-origin: 0 0;"),M},b=function(P){var T,L,M,U;T=Math.round(P.viewportWidth),L=Math.round(P.viewportHeight),M=-P.left,U=-P.top;var $={x:M,y:U,width:T,height:L};return $},O=function(P){var T=P.style||"";P.style=T+"float: left;"},k=function(P){P.externalResourcesRequired=!0},C=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},S=function(P){var T=Object.keys(P);return T.length?" "+T.map(function(L){return L+'="'+P[L]+'"'}).join(" "):""},x=function(P,T,L){var M=p.serializeToString(P);m.validateXHTML(M);var U=b(T);return O(U),k(U),'<svg xmlns="http://www.w3.org/2000/svg"'+S(d(T,L))+">"+C()+"<foreignObject"+S(U)+">"+M+"</foreignObject></svg>"};return g.getSvgForDocument=function(P,T,L){return y.rewriteTagNameSelectorsToLowerCase(P),x(P,T,L)},g.drawDocumentAsSvg=function(P,T){return["hover","active","focus","target"].forEach(function(L){T[L]&&y.fakeUserAction(P,T[L],L)}),m.calculateDocumentContentSize(P,T).then(function(L){return g.getSvgForDocument(P,L,T.zoom)})},g}(a,f,u,r),_=function(E,m,y,p,g,d){var b={},O=function(P){return{message:"Error rendering page",originalError:P}},k=function(P){return g.renderSvg(P).then(function(T){return{image:T,svg:P}},function(T){throw O(T)})},C=function(P,T){try{T.getContext("2d").drawImage(P,0,0)}catch(L){throw O(L)}},S=function(P,T,L){return p.drawDocumentAsSvg(P,L).then(k).then(function(M){return T&&C(M.image,T),M})},x=function(P,T){return m.executeJavascript(P,T).then(function(L){var M=L.document;return y.persistInputValues(M),{document:M,errors:L.errors,cleanUp:L.cleanUp}})};return b.rasterize=function(P,T,L){var M;return M=E.clone(L),M.inlineScripts=L.executeJs===!0,d.inlineReferences(P,M).then(function(U){return L.executeJs?x(P,L).then(function($){return{element:$.document.documentElement,errors:U.concat($.errors),cleanUp:$.cleanUp}}):{element:P,errors:U,cleanUp:function(){}}}).then(function(U){return S(U.element,T,L).then(function($){return U.cleanUp(),{image:$.image,svg:$.svg,errors:U.errors}})})},b}(a,f,u,w,v,i),h=function(E,m,y){var p={},g=function(C,S){var x=300,P=200,T=C?C.width:x,L=C?C.height:P,M=S.width!==void 0?S.width:T,U=S.height!==void 0?S.height:L;return{width:M,height:U}},d=function(C){var S=g(C.canvas,C.options),x;return x=E.clone(C.options),x.width=S.width,x.height=S.height,x};p.drawDocument=function(){var C=arguments[0],S=Array.prototype.slice.call(arguments,1),x=E.parseOptionalParameters(S),P=C.documentElement?C.documentElement:C;return y.rasterize(P,x.canvas,d(x))};var b=function(C,S,x){var P=m.parseHTML(C);return p.drawDocument(P,S,x)};p.drawHTML=function(){var C=arguments[0],S=Array.prototype.slice.call(arguments,1),x=E.parseOptionalParameters(S);return b(C,x.canvas,x.options)};var O=function(C,S,x){var P=document.implementation.createHTMLDocument("");P.replaceChild(C.documentElement,P.documentElement);var T=x?E.clone(x):{};return x.baseUrl||(T.baseUrl=S),{document:P,options:T}},k=function(C,S,x){return m.loadDocument(C,x).then(function(P){var T=O(P,C,x);return p.drawDocument(T.document,S,T.options)})};return p.drawURL=function(){var C=arguments[0],S=Array.prototype.slice.call(arguments,1),x=E.parseOptionalParameters(S);return k(C,x.canvas,x.options)},p}(a,f,_);return h})})(mS);var eF=mS.exports;(function(e){var t=we&&we.__createBinding||(Object.create?function(w,_,h,E){E===void 0&&(E=h);var m=Object.getOwnPropertyDescriptor(_,h);m&&!("get"in m?!_.__esModule:m.writable||m.configurable)||(m={enumerable:!0,get:function(){return _[h]}}),Object.defineProperty(w,E,m)}:function(w,_,h,E){E===void 0&&(E=h),w[E]=_[h]}),r=we&&we.__setModuleDefault||(Object.create?function(w,_){Object.defineProperty(w,"default",{enumerable:!0,value:_})}:function(w,_){w.default=_}),n=we&&we.__importStar||function(w){if(w&&w.__esModule)return w;var _={};if(w!=null)for(var h in w)h!=="default"&&Object.prototype.hasOwnProperty.call(w,h)&&t(_,w,h);return r(_,w),_};Object.defineProperty(e,"__esModule",{value:!0}),e.htmlToCanvas=e.detectSize=e.resetStyleContent=void 0;const i=n(eF),a=xu;e.resetStyleContent=`
|
|
153
|
-
p {
|
|
154
|
-
margin: 0;
|
|
155
|
-
padding: 0;
|
|
156
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
157
|
-
}
|
|
158
|
-
ul, ol {
|
|
159
|
-
list-style-position: outside;
|
|
160
|
-
margin: 0;
|
|
161
|
-
padding: 0;
|
|
162
|
-
display: inline-block;
|
|
163
|
-
text-align: left;
|
|
164
|
-
}
|
|
165
|
-
li {
|
|
166
|
-
margin-left: 1.7em;
|
|
167
|
-
padding-left: 0.5em; /* This should match the margin-left value */
|
|
168
|
-
}
|
|
169
|
-
`;const o=`
|
|
170
|
-
<style>
|
|
171
|
-
html, body {
|
|
172
|
-
padding: 0;
|
|
173
|
-
margin: 0;
|
|
174
|
-
}
|
|
175
|
-
${e.resetStyleContent}
|
|
176
|
-
</style>
|
|
177
|
-
`;let l;const u=()=>(l||(l=document.createElement("div"),l.id="polotno-hidden-do-not-touch",l.style.overflow="hidden",l.style.position="relative",document.body.appendChild(l),l.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),l);function f(w){const _=document.createElement("div");_.innerHTML=w,_.style.display="inline-block",_.style.position="fixed",_.style.top="0px",_.style.left="0px",_.style.zIndex="1000";const h=u();h.appendChild(_);const E=_.getBoundingClientRect();return h.removeChild(_),{width:E.width,height:E.height}}async function v({html:w,width:_,height:h,fontFamily:E,padding:m,font:y,pixelRatio:p}){const g=document.createElement("canvas");if(E!=="Arial"&&!y){const O=(0,a.getGoogleFontsVariants)();w+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${E}:${O}" rel="stylesheet">`}if(y){const O=y.styles||(y.url?[{src:`url("${y.url}")`}]:[]);w+="<style>",O.forEach(k=>{w+=`
|
|
178
|
-
@font-face {
|
|
179
|
-
font-family: '${E}';
|
|
180
|
-
src: ${k.src};
|
|
181
|
-
font-style: ${k.fontStyle||"normal"};
|
|
182
|
-
font-weight: ${k.fontWeight||"normal"};
|
|
183
|
-
}
|
|
184
|
-
`}),w+="</style>"}w+=o;const d=await i.drawHTML(`<div style="padding: ${m}px;">${w}</div>`,g,{width:_+2*m,height:h+2*m});g.width=(_+2*m)*p,g.height=(h+2*m)*p;const b=g.getContext("2d");return b==null||b.drawImage(d.image,0,0,d.image.width*p,d.image.height*p),g}e.detectSize=f,e.htmlToCanvas=v})(vS);var I2={},D2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.styled=e.setup=e.keyframes=e.glob=e.extractCss=e.css=void 0;let t={data:""},r=d=>typeof window=="object"?((d?d.querySelector("#_goober"):window._goober)||Object.assign((d||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:d||t,n=d=>{let b=r(d),O=b.data;return b.data="",O},i=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/|\s\s+|\n/g,o=(d,b)=>{let O="",k="",C="";for(let S in d){let x=d[S];S[0]=="@"?S[1]=="i"?O=S+" "+x+";":k+=S[1]=="f"?o(x,S):S+"{"+o(x,S[1]=="k"?"":b)+"}":typeof x=="object"?k+=o(x,b?b.replace(/([^,])+/g,P=>S.replace(/(^:.*)|([^,])+/g,T=>/&/.test(T)?T.replace(/&/g,P):P?P+" "+T:T)):S):x!=null&&(S=S.replace(/[A-Z]/g,"-$&").toLowerCase(),C+=o.p?o.p(S,x):S+":"+x+";")}return O+(b&&C?b+"{"+C+"}":C)+k},l={},u=d=>{if(typeof d=="object"){let b="";for(let O in d)b+=O+u(d[O]);return b}return d},f=(d,b,O,k,C)=>{let S=u(d),x=l[S]||(l[S]=(P=>{let T=0,L=11;for(;T<P.length;)L=101*L+P.charCodeAt(T++)>>>0;return"go"+L})(S));if(!l[x]){let P=S!==d?d:(T=>{let L,M=[{}];for(;L=i.exec(T.replace(a,""));)L[4]?M.shift():L[3]?M.unshift(M[0][L[3]]=M[0][L[3]]||{}):M[0][L[1]]=L[2];return M[0]})(d);l[x]=o(C?{["@keyframes "+x]:P}:P,O?"":"."+x)}return((P,T,L)=>{T.data.indexOf(P)==-1&&(T.data=L?P+T.data:T.data+P)})(l[x],b,k),x},v=(d,b,O)=>d.reduce((k,C,S)=>{let x=b[S];if(x&&x.call){let P=x(O),T=P&&P.props&&P.props.className||/^go/.test(P)&&P;x=T?"."+T:P&&typeof P=="object"?P.props?"":o(P,""):P===!1?"":P}return k+C+(x??"")},"");function w(d){let b=this||{},O=d.call?d(b.p):d;return f(O.unshift?O.raw?v(O,[].slice.call(arguments,1),b.p):O.reduce((k,C)=>Object.assign(k,C&&C.call?C(b.p):C),{}):O,r(b.target),b.g,b.o,b.k)}e.extractCss=n,e.css=w;let _,h,E,m=w.bind({g:1}),y=w.bind({k:1});function p(d,b,O,k){o.p=b,_=d,h=O,E=k}function g(d,b){let O=this||{};return function(){let k=arguments;function C(S,x){let P=Object.assign({},S),T=P.className||C.className;O.p=Object.assign({theme:h&&h()},P),O.o=/ *go\d+/.test(T),P.className=w.apply(O,k)+(T?" "+T:""),b&&(P.ref=x);let L=d;return d[0]&&(L=P.as||d,delete P.as),E&&L[0]&&E(P),_(L,P)}return b?b(C):C}}e.glob=m,e.keyframes=y,e.setup=p,e.styled=g})(D2);var tF=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(I2,"__esModule",{value:!0});const rF=tF(at),A_=D2;(0,A_.setup)(rF.default.createElement),I2.default=A_.styled;(function(e){var t=we&&we.__createBinding||(Object.create?function(B,N,H,R){R===void 0&&(R=H);var D=Object.getOwnPropertyDescriptor(N,H);D&&!("get"in D?!N.__esModule:D.writable||D.configurable)||(D={enumerable:!0,get:function(){return N[H]}}),Object.defineProperty(B,R,D)}:function(B,N,H,R){R===void 0&&(R=H),B[R]=N[H]}),r=we&&we.__setModuleDefault||(Object.create?function(B,N){Object.defineProperty(B,"default",{enumerable:!0,value:N})}:function(B,N){B.default=N}),n=we&&we.__importStar||function(B){if(B&&B.__esModule)return B;var N={};if(B!=null)for(var H in B)H!=="default"&&Object.prototype.hasOwnProperty.call(B,H)&&t(N,B,H);return r(N,B),N},i=we&&we.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.createQuill=e.quillRef=void 0;const a=i(at),o=Ui,l=Wa,u=i(gS),f=i(Gi),v=n(ha),w=hi,_=xf,h=v2,E=Of,m=vS,y=ql,p=Wl,g=Ef,d=i(I2),b=ua,O=b2,k=n(xu),C=Yo;e.quillRef=v.observable({enabled:!1,currentFormat:{},editor:v.observable.object({instance:null},{},{deep:!1})});const S=(0,d.default)("div",a.default.forwardRef)`
|
|
185
|
-
.ql-editor {
|
|
186
|
-
outline: none;
|
|
187
|
-
}
|
|
188
|
-
${m.resetStyleContent}
|
|
189
|
-
strong {
|
|
190
|
-
font-weight: 700;
|
|
191
|
-
}
|
|
192
|
-
.ql-direction-rtl {
|
|
193
|
-
direction: rtl;
|
|
194
|
-
}
|
|
195
|
-
`,x=B=>new u.default(B,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["background","bold","color","font","italic","size","strike","underline","indent","list","align","direction"]});e.createQuill=x;const P=({html:B,onBlur:N,onChange:H,element:R})=>{const D=a.default.useRef(null);a.default.useEffect(()=>{if(!D.current)return;const F=(0,e.createQuill)(D.current);return e.quillRef.editor.instance=F,window.__polotnoQuill=F,F.on("text-change",()=>{F.getSelection()&&(e.quillRef.currentFormat=F.getFormat()),setTimeout(()=>{var V;H((V=D.current)===null||V===void 0?void 0:V.childNodes[0].innerHTML)},10)}),F.setSelection(0,0,"api"),F.on("selection-change",V=>{V||N(),V&&(e.quillRef.currentFormat=F.getFormat())}),D.current.childNodes[0].addEventListener("blur",V=>{var Y;!((Y=V.relatedTarget)===null||Y===void 0)&&Y.classList.contains("ql-clipboard")||N()}),()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={},delete window.__polotnoQuill}},[]),a.default.useEffect(()=>{var F;const V=e.quillRef.editor.instance;if(!V)return;const Y=V.getSelection();if(((F=D.current)===null||F===void 0?void 0:F.childNodes[0].innerHTML)!==R.text){var q=V.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+B+"<p><br></p></div>");V.setContents(q),V.history.clear(),Y&&(V.setSelection(Y.index,Y.length),e.quillRef.currentFormat=V.getFormat())}},[R.text]);const z={color:R.fill};return R.fill.indexOf("gradient")>=0&&(z["background-color"]=R.fill,z["background-image"]=R.fill,z["background-size"]="100% 100%",z["background-repeat"]="repeat",z["-webkit-background-clip"]="text",z["-moz-background-clip"]="text",z["-webkit-text-fill-color"]="transparent",z["-moz-text-fill-color"]="transparent"),a.default.createElement(S,{ref:D,style:Object.assign(Object.assign({},z),{fontSize:R.fontSize,width:R.a.width,fontFamily:R.fontFamily,lineHeight:R.lineHeight,letterSpacing:R.letterSpacing+"rem",textAlign:R.align}),dir:(0,h.getDir)((0,O.removeTags)(R.text))})};function T(B,N,H){return a.default.useMemo(()=>(0,m.detectSize)(B),[B,N.width,H])}function L(B){const N=B.getContext("2d").getImageData(0,0,B.width,B.height).data;for(let H=0;H<N.length;H+=4)if(N[H+3]!==0)return!0;return!1}function M(B){return!L(B)}function U(B,{fontFamily:N="",color:H="black"}={}){let R=`color: ${H||B.fill}`;return B.fill.indexOf("gradient")>=0&&(R=`
|
|
196
|
-
background-color: ${H};
|
|
197
|
-
background-image: ${B.fill};
|
|
198
|
-
background-size: 100% 100%;
|
|
199
|
-
background-repeat: repeat;
|
|
200
|
-
-webkit-background-clip: text;
|
|
201
|
-
-moz-background-clip: text;
|
|
202
|
-
-webkit-text-fill-color: transparent;
|
|
203
|
-
-moz-text-fill-color: transparent;
|
|
204
|
-
`),`<div style="white-space: unset; width: ${Math.round(B.width||100)}px; ${R}; font-size: ${B.fontSize}px; font-family: '${N}'; text-decoration: ${B.textDecoration}; text-align: ${B.align}; line-height: ${B.lineHeight}; letter-spacing: ${B.letterSpacing}rem; font-style: ${B.fontStyle}; font-weight: ${B.fontWeight}; -webkit-text-stroke: ${B.strokeWidth}px ${B.stroke};" contentEditable dir="${(0,h.getDir)((0,O.removeTags)(B.text))}">${B.text.replaceAll(`
|
|
205
|
-
`,"</br>")}</div>`}const $=B=>{let N=B.fontSize;for(let H=1;H<50;H++){const R=U(Object.assign(Object.assign({},B.toJSON()),{fontSize:N}),{fontFamily:B.fontFamily}),{height:D}=(0,m.detectSize)(R);if(!(B.height&&D>B.height))break;N-=.5}return N},Z=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,o.observer)(({element:B,store:N})=>{const H=a.default.useRef(null),[R,D]=a.default.useState(),[z,F]=a.default.useState(!1),[V,Y]=a.default.useState(!0),[q,G]=a.default.useState(!1),K=a.default.useRef(B.height),X=N.selectedElements.indexOf(B)>=0,Q=B.fontSize/3,{textVerticalResizeEnabled:te}=w.flags,ee=(0,h.usePrevious)(B.fontFamily),[ae]=(0,h.useFontLoader)(N,B.fontFamily),oe=B._editModeEnabled;(0,y.useFadeIn)(H);const le=ae?B.fontFamily:ee!==B.fontFamily?ee:"Arial",Te=(0,E.useColor)(B).fill,Fe=U(B,{fontFamily:le,color:Te}),{width:fe,height:ne}=T(Fe,B,ae);a.default.useEffect(()=>{if(!ae)return;if(!B.height)return void B.set({height:ne});const{textOverflow:ye}=w.flags;if(ye!=="change-font-size"||z)ye==="resize"&&(te&&B.height<ne&&N.history.ignore(()=>{B.set({height:ne})}),te||B.height===ne||N.history.ignore(()=>{B.set({height:ne})}));else{const Ie=$(B);Ie!==B.fontSize?N.history.ignore(()=>{B.set({fontSize:Ie})}):B.height!==ne&&(te&&B.height<ne?N.history.ignore(()=>{B.set({height:ne})}):te||N.history.ignore(()=>{B.set({height:ne})}))}});const ge=a.default.useRef(0);a.default.useEffect(()=>{z||oe||(async()=>{ge.current++;const ye=ge.current,Ie=(0,b.incrementLoader)(`text ${B.id}`);Y(!0);let Ee=null;const ke=Z?5:1;for(let Ze=0;Ze<ke;Ze++){if(Ee=await(0,m.htmlToCanvas)({html:Fe,width:B.width||1,height:B.height||ne||1,fontFamily:le,padding:Q,pixelRatio:N._elementsPixelRatio,font:N.fonts.find(We=>We.fontFamily===le)||k.globalFonts.find(We=>We.fontFamily===le)}),ye!==ge.current)return void Ie();M(Ee)&&Z&&await new Promise(We=>setTimeout(We,50*(Ze+1)))}Ee?(D(Ee),Y(!1),f.default.Util.requestAnimFrame(Ie)):Ie()})()},[Fe,z,ne,oe,le,B.height,N._elementsPixelRatio]);const pe=z||V;a.default.useEffect(()=>v.autorun(()=>{const ye=H.current;(0,_.applyFilter)(ye,B)}),[R,pe,B.shadowColor,B.shadowOffsetX,B.shadowOffsetY,B.shadowOpacity]);let re=0;B.verticalAlign==="middle"&&(re=(B.height-ne)/2),B.verticalAlign==="bottom"&&(re=B.height-ne);const de=(0,h.getLineHeight)({fontLoaded:ae,fontFamily:B.fontFamily,fontSize:B.fontSize,lineHeight:B.lineHeight}),be=(0,C.useMobile)();return a.default.createElement(a.default.Fragment,null,a.default.createElement(l.Rect,{x:B.a.x,y:B.a.y,offsetX:B.backgroundPadding*(B.fontSize*de*.5),offsetY:B.backgroundPadding*(B.fontSize*de*.5),rotation:B.a.rotation,hideInExport:!B.showInExport,listening:!1,visible:B.backgroundEnabled,opacity:B.backgroundOpacity*B.a.opacity,fill:B.backgroundColor,width:B.a.width+B.backgroundPadding*(B.fontSize*de),height:B.a.height+B.backgroundPadding*(B.fontSize*de),cornerRadius:B.backgroundCornerRadius*(B.fontSize*de*.5)}),a.default.createElement(l.Rect,{ref:H,name:"element",x:B.a.x,y:B.a.y,listening:B.selectable,rotation:B.a.rotation,width:B.a.width,height:B.a.height,visible:!pe,draggable:be?B.draggable&&X:B.draggable,preventDefault:!be||X,opacity:oe?0:B.a.opacity,hideInExport:!B.showInExport,onMouseEnter:()=>{G(!0)},onMouseLeave:()=>{G(!1)},onDragMove:ye=>{B.set({x:ye.target.x(),y:ye.target.y()})},onDragEnd:ye=>{B.set({x:ye.target.x(),y:ye.target.y()})},id:B.id,onDblClick:()=>{B.contentEditable&&B.toggleEditMode(!0)},onDblTap:()=>{B.contentEditable&&B.toggleEditMode(!0)},onTransformStart:ye=>{F(!0),K.current=B.height},onTransform:ye=>{var Ie;const Ee=ye.target,ke=((Ie=Ee.getStage())===null||Ie===void 0?void 0:Ie.findOne("Transformer")).getActiveAnchor(),Ze=ke==="middle-left"||ke==="middle-right",We=ke==="top-center"||ke==="bottom-center",dt=Ee.scaleX();if(Ze){const Bt=Ee.scaleX(),ue=Math.max(Ee.width()*Bt,B.fontSize);if(Ee.width(ue),Ee.scaleX(1),w.flags.textVerticalResizeEnabled){const he=Math.max(ne,K.current);B.set({height:he})}B.set({width:ue,x:Ee.x(),y:Ee.y()})}else if(We){let Bt=w.flags.textOverflow==="resize"?ne:B.lineHeight*B.fontSize;const ue=Math.max(Bt,ye.target.height()*ye.target.scaleY());Ee.scaleY(1),B.set({x:Ee.x(),y:Ee.y(),height:ue,rotation:Ee.rotation()})}else Ee.scaleX(1),Ee.scaleY(1),B.set({fontSize:B.fontSize*dt,width:Ee.width()*dt,x:Ee.x(),y:Ee.y(),rotation:Ee.rotation(),height:Ee.height()*dt})},onTransformEnd:ye=>{F(!1),Y(!0);const Ie=ye.target.scaleX();ye.target.scaleX(1),ye.target.scaleY(1),B.set({fontSize:B.fontSize*Ie,width:ye.target.width()*Ie,x:ye.target.x(),y:ye.target.y(),rotation:ye.target.rotation(),shadowBlur:B.shadowBlur*Ie,shadowOffsetX:B.shadowOffsetX*Ie,shadowOffsetY:B.shadowOffsetY*Ie,strokeWidth:B.strokeWidth*Ie})}}),a.default.createElement(l.Image,{ref:H,image:R,x:B.a.x,y:B.a.y,offsetX:Q,offsetY:Q-re,listening:!1,rotation:B.rotation,width:B.a.width+2*Q,height:B.a.height+2*Q,visible:!pe,opacity:oe?0:B.a.opacity,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur,shadowOffsetX:B.shadowOffsetX,shadowOffsetY:B.shadowOffsetY,shadowColor:B.shadowColor,shadowOpacity:B.shadowOpacity,hideInExport:!B.showInExport}),pe&&a.default.createElement(l.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-re},a.default.createElement(g.Html,{divProps:{style:{pointerEvents:"none"}}},a.default.createElement(S,{dangerouslySetInnerHTML:{__html:Fe},style:{pointerEvents:"none",display:"inline-block"}}))),oe&&a.default.createElement(l.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-re},a.default.createElement(g.Html,null,a.default.createElement(P,{html:Fe,element:B,onChange:ye=>{B.set({text:ye})},onBlur:ye=>{B.toggleEditMode(!1)}}))),(X||q)&&a.default.createElement(p.Highlighter,{element:B}))})})(hS);var SS={},F2={},Au={};(function(e){function t(u){return u/180*Math.PI}function r(u,f,v,w,_){const h=Math.sqrt(v*v+w*w);return _+=Math.atan2(w,v),{x:u+h*Math.cos(_),y:f+h*Math.sin(_)}}function n(u){const{x:f,y:v,width:w,height:_}=u,h=t(u.rotation),E=r(f,v,0,0,h),m=r(f,v,w,0,h),y=r(f,v,w,_,h),p=r(f,v,0,_,h),g=Math.min(E.x,m.x,y.x,p.x),d=Math.min(E.y,m.y,y.y,p.y),b=Math.max(E.x,m.x,y.x,p.x),O=Math.max(E.y,m.y,y.y,p.y);return{x:g,y:d,width:b-g,height:O-d,minX:g,minY:d,maxX:b,maxY:O}}function i(u){const f=u.map(E=>n(E)),v=Math.min(...f.map(E=>E.minX)),w=Math.min(...f.map(E=>E.minY)),_=Math.max(...f.map(E=>E.maxX)),h=Math.max(...f.map(E=>E.maxY));return{x:v,y:w,width:_-v,height:h-w,minX:v,minY:w,maxX:_,maxY:h}}function a(u){const f=t(u.rotation||0);return{x:u.x+u.width/2*Math.cos(f)+u.height/2*Math.sin(-f),y:u.y+u.height/2*Math.cos(f)+u.width/2*Math.sin(f)}}function o(u,f,v){const w=t(f),_=v.x+(u.x-v.x)*Math.cos(w)-(u.y-v.y)*Math.sin(w),h=v.y+(u.x-v.x)*Math.sin(w)+(u.y-v.y)*Math.cos(w);return Object.assign(Object.assign({},u),{rotation:u.rotation+f,x:_,y:h})}function l(u,f){return o(u,f,a(u))}Object.defineProperty(e,"__esModule",{value:!0}),e.rotateAroundCenter=e.rotateAroundPoint=e.getCenter=e.getTotalClientRect=e.getClientRect=e.degToRad=void 0,e.degToRad=t,e.getClientRect=n,e.getTotalClientRect=i,e.getCenter=a,e.rotateAroundPoint=o,e.rotateAroundCenter=l})(Au);(function(e){var t=we&&we.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.useAnchorSnap=e.useSnap=void 0;const r=t(at),n=t(Gi),i=Au;var a=5;function o(w){const _=w.__getNodeRect(),h=(0,i.getClientRect)(Object.assign(Object.assign({},_),{rotation:n.default.Util.radToDeg(_.rotation)})),E=w.getAbsolutePosition();return{vertical:[{guide:h.x,offset:E.x-h.x,snap:"start"},{guide:h.x+h.width/2,offset:E.x-h.x-h.width/2,snap:"center"},{guide:h.x+h.width,offset:E.x-h.x-h.width,snap:"end"}],horizontal:[{guide:h.y,offset:E.y-h.y,snap:"start"},{guide:h.y+h.height/2,offset:E.y-h.y-h.height/2,snap:"center"},{guide:h.y+h.height,offset:E.y-h.y-h.height,snap:"end"}]}}function l(w,_){var h=[],E=[];w.vertical.forEach(b=>{_.vertical.forEach(O=>{var k=Math.abs(b-O.guide);k<a&&h.push({lineGuide:b,diff:k,snap:O.snap,offset:O.offset})})}),w.horizontal.forEach(b=>{_.horizontal.forEach(O=>{var k=Math.abs(b-O.guide);k<a&&E.push({lineGuide:b,diff:k,snap:O.snap,offset:O.offset})})});var m=[];const y=h.sort((b,O)=>b.diff-O.diff),p=E.sort((b,O)=>b.diff-O.diff);var g=y[0],d=p[0];return g&&y.filter(b=>Math.abs(b.diff-g.diff)<.1).forEach(b=>{m.push(Object.assign({orientation:"V"},b))}),d&&p.filter(b=>Math.abs(b.diff-d.diff)<.1).forEach(b=>{m.push(Object.assign({orientation:"H"},b))}),m}function u(w,_){const h=r.default.useRef(),E=O=>O.hasName("element")||O.hasName("page-background")||!h.current&&O.hasName("elements-area");function m(O){var k;const C=(k=w.current)===null||k===void 0?void 0:k.getStage();var S=[],x=[];return C.find(E).forEach(P=>{if(!(O.indexOf(P)>=0)){var T=P.getClientRect({skipShadow:!0,skipStroke:!0});S.push(T.x,T.x+T.width,T.x+T.width/2),x.push(T.y,T.y+T.height,T.y+T.height/2)}}),{vertical:S,horizontal:x}}function y(O){var k;const C=(k=w.current)===null||k===void 0?void 0:k.getLayer(),S=C==null?void 0:C.children.find(x=>x.name()==="line-guides");O.forEach(x=>{if(x.orientation==="H"){var P=new n.default.Line({points:[-6e3,x.lineGuide,6e3,x.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});S==null||S.add(P),C.batchDraw()}else x.orientation==="V"&&(P=new n.default.Line({points:[x.lineGuide,-6e3,x.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),S==null||S.add(P))})}const p=O=>{O.target.getLayer().children.find(T=>T.name()==="line-guides").destroyChildren();var k=l(m(O.target.nodes()),o(O.target));if(!k.length)return;y(k);const C=O.target.getAbsolutePosition(),S=Object.assign({},C);k.forEach(T=>{switch(T.snap){case"start":case"center":case"end":switch(T.orientation){case"V":S.x=T.lineGuide+T.offset;break;case"H":S.y=T.lineGuide+T.offset}}});const x=S.x-C.x,P=S.y-C.y;O.evt.ctrlKey||O.evt.metaKey||O.target.nodes().forEach(T=>{const L=T.getAbsolutePosition();T.setAbsolutePosition({x:L.x+x,y:L.y+P})})},g=(O,k,C)=>{const S=w.current,x=S.getLayer();if(x.children.find($=>$.name()==="line-guides").destroyChildren(),S.getActiveAnchor()==="rotater"||Math.sqrt(Math.pow(k.x-O.x,2)+Math.pow(k.y-O.y,2))>50||!x)return k;var P=l(m(S.nodes()),{vertical:[{guide:k.x,offset:0,snap:"start"}],horizontal:[{guide:k.y,offset:0,snap:"start"}]});if(!P.length||(y(P),C.ctrlKey||C.metaKey))return k;let T=k.x,L=k.x;P.forEach($=>{switch($.orientation){case"V":T=$.lineGuide;break;case"H":L=$.lineGuide}});const M=Math.abs(k.x-T)<10,U=Math.abs(k.y-L)<10;return M&&!U?{x:T,y:O.y}:U&&!M?{x:O.x,y:L}:M&&U?{x:T,y:L}:k},d=O=>{if(h.current=!1,!O.target)return;const k=O.target.getLayer();k.children.find(C=>C.name()==="line-guides").destroyChildren(),k.batchDraw()},b=()=>{const O=w.current.nodes().map(C=>C.id()),k=_.getElementById(O[0]);h.current=(k==null?void 0:k.type)==="image"};r.default.useEffect(()=>{w.current&&(w.current.anchorDragBoundFunc(g),w.current.on("dragstart",()=>{setTimeout(()=>{const O=[...n.default.DD._dragElements.entries()];O.reverse(),n.default.DD._dragElements.clear(),O.forEach(([k,C])=>{n.default.DD._dragElements.set(k,C)})}),b()}),w.current.on("dragmove",p),w.current.on("dragend",d),w.current.on("transformstart",()=>{b()}),w.current.on("transformend",d),w.current.on("transform",O=>{var k,C;O.evt.ctrlKey||O.evt.metaKey?(k=w.current)===null||k===void 0||k.rotationSnapTolerance(0):(C=w.current)===null||C===void 0||C.rotationSnapTolerance(5)}))},[])}function f(w){return{vertical:[{guide:w.absolutePosition().x,offset:0,snap:"center"}],horizontal:[{guide:w.absolutePosition().y,offset:0,snap:"center"}]}}function v(w,_,h){const E=p=>p.hasName("element")||p.hasName("line-anchor")||p.hasName("page-background")||p.hasName("elements-area"),m=p=>{p.target.getLayer().children.find(C=>C.name()==="line-guides").destroyChildren();var g=l(function(C){var S;const x=(S=w.current)===null||S===void 0?void 0:S.getStage();var P=[],T=[];return x.find(E).forEach(L=>{if(!(C.indexOf(L)>=0)){var M=L.getClientRect({skipShadow:!0,skipStroke:!0});L.hasName("line-anchor")&&(M={x:L.absolutePosition().x,y:L.absolutePosition().y,width:0,height:0}),P.push(M.x,M.x+M.width,M.x+M.width/2),T.push(M.y,M.y+M.height,M.y+M.height/2)}}),{vertical:P,horizontal:T}}([p.target,..._.map(C=>C.current)]),f(p.target));if(!g.length)return;(function(C){var S;const x=(S=w.current)===null||S===void 0?void 0:S.getLayer(),P=x==null?void 0:x.children.find(T=>T.name()==="line-guides");C.forEach(T=>{if(T.orientation==="H"){var L=new n.default.Line({points:[-6e3,T.lineGuide,6e3,T.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});P==null||P.add(L),x.batchDraw()}else T.orientation==="V"&&(L=new n.default.Line({points:[T.lineGuide,-6e3,T.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),P==null||P.add(L))})})(g);const d=p.target.getAbsolutePosition(),b=Object.assign({},d);g.forEach(C=>{switch(C.snap){case"start":case"center":case"end":switch(C.orientation){case"V":b.x=C.lineGuide+C.offset;break;case"H":b.y=C.lineGuide+C.offset}}});const O=b.x-d.x,k=b.y-d.y;if(!(p.evt.ctrlKey||p.evt.metaKey)){const C=p.target.getAbsolutePosition();p.target.absolutePosition({x:C.x+O,y:C.y+k})}},y=p=>{if(!p.target)return;const g=p.target.getLayer();g.children.find(d=>d.name()==="line-guides").destroyChildren(),g.batchDraw()};r.default.useEffect(()=>{w.current&&(w.current.on("dragmove",m),w.current.on("dragend",y))},h)}e.useSnap=u,e.useAnchorSnap=v})(F2);(function(e){var t=we&&we.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=e.getLinePositionFromMiddlePoints=e.getMiddlePoints=void 0;const r=t(at),n=Ui,i=Wa,a=Of,o=Ef,l=Wl,u=F2,f=Yo;function v(E){const{x:m,y,width:p,height:g,rotation:d}=E.a,b=d*Math.PI/180,O={x:m+g/2*Math.cos(b+Math.PI/2),y:y+g/2*Math.sin(b+Math.PI/2)};return{middleLeft:O,middleRight:{x:O.x+p*Math.cos(b),y:O.y+p*Math.sin(b)}}}function w(E,m,y){const p=Math.sqrt(Math.pow(m.x-E.x,2)+Math.pow(m.y-E.y,2)),g=Math.atan2(m.y-E.y,m.x-E.x),d=180*g/Math.PI;return{x:E.x+Math.cos(g-Math.PI/2)*y/2,y:E.y+Math.sin(g-Math.PI/2)*y/2,width:p,height:y,rotation:d}}e.getMiddlePoints=v,e.getLinePositionFromMiddlePoints=w;const _=(E,m)=>({offsetX:5/E,offsetY:5/E,width:10/E,height:10/E,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:y=>{y.target.getStage().container().style.cursor="crosshair"},onMouseLeave:y=>{y.target.getStage().container().style.cursor=""},onDragStart:y=>{m.history.startTransaction()},onDragEnd:y=>{m.history.endTransaction()}}),h=(0,n.observer)(({element:E,type:m})=>{const y=(0,a.useColor)(E,E.a.color,"fill"),p=(0,a.useColor)(E,E.a.color,"stroke"),g=Object.assign(Object.assign(Object.assign({strokeWidth:E.height,lineCap:"round",lineJoin:"round"},p),y),{opacity:E.a.opacity,hideInExport:!E.showInExport});return r.default.createElement(r.default.Fragment,null,m==="arrow"&&r.default.createElement(i.Line,Object.assign({points:[3*E.height,2*-E.height,0,0,3*E.height,2*E.height]},g)),m==="triangle"&&r.default.createElement(i.Line,Object.assign({points:[3*E.height,2*-E.height,0,0,3*E.height,2*E.height],closed:!0},g)),m==="bar"&&r.default.createElement(i.Line,Object.assign({points:[0,2*-E.height,0,2*E.height],closed:!0},g)),m==="square"&&r.default.createElement(i.Line,Object.assign({points:[0,2*-E.height,4*E.height,2*-E.height,4*E.height,2*E.height,0,2*E.height],closed:!0},g)),m==="circle"&&r.default.createElement(i.Circle,Object.assign({x:2*E.height,y:0,radius:2*E.height},g)))});e.LineElement=(0,n.observer)(({element:E,store:m})=>{const y=r.default.useRef(null),p=r.default.useRef(null),g=r.default.useRef(null),d=E.selectable||m.role==="admin",b=(0,f.useMobile)(),[O,k]=r.default.useState(!1),C=m.selectedElements.indexOf(E)>=0&&m.selectedElements.length===1,{middleLeft:S,middleRight:x}=v(E);(0,u.useAnchorSnap)(p,[y],[C]),(0,u.useAnchorSnap)(g,[y],[C]);const P=(0,a.useColor)(E,E.a.color,"stroke");return r.default.createElement(r.default.Fragment,null,r.default.createElement(i.Line,Object.assign({ref:y,name:"element",id:E.id,x:E.a.x,y:E.a.y,points:[0,0,E.a.width,0],offsetY:-E.a.height/2,strokeWidth:E.a.height,hitStrokeWidth:Math.max(E.a.height,20),dash:E.dash.map(T=>T*E.a.height)},P,{rotation:E.a.rotation,opacity:E.animated("opacity"),shadowEnabled:E.shadowEnabled,shadowBlur:E.shadowBlur,shadowOffsetX:E.shadowOffsetX,shadowOffsetY:E.shadowOffsetY,shadowColor:E.shadowColor,shadowOpacity:E.shadowOpacity,listening:d,draggable:b?E.draggable&&C:E.draggable,preventDefault:!b||C,hideInExport:!E.showInExport,onMouseEnter:()=>{k(!0)},onMouseLeave:()=>{k(!1)},onDragMove:T=>{E.set({x:T.target.x(),y:T.target.y()})},onDragEnd:T=>{E.set({x:T.target.x(),y:T.target.y()})},onTransform:T=>{const L=T.target.scaleX();T.target.scaleX(1),T.target.scaleY(1),E.set({height:E.height*L,width:E.width*L,x:T.target.x(),y:T.target.y(),rotation:T.target.rotation()})}})),r.default.createElement(i.Group,{x:S.x,y:S.y,rotation:E.rotation,hideInExport:!E.showInExport},r.default.createElement(h,{element:E,type:E.startHead})),r.default.createElement(i.Group,{x:x.x,y:x.y,rotation:E.rotation+180},r.default.createElement(h,{element:E,type:E.endHead})),O&&!C&&r.default.createElement(l.Highlighter,{element:E}),C&&E.resizable&&r.default.createElement(o.Portal,{selector:".page-abs-container",enabled:!0},r.default.createElement(i.Group,{visible:C},r.default.createElement(i.Rect,Object.assign({x:S.x,y:S.y,ref:p,name:"line-anchor"},_(m.scale,m),{onDragMove:T=>{const L=w(T.target.position(),x,E.height);E.set({x:L.x,y:L.y,width:L.width,rotation:L.rotation})}})),r.default.createElement(i.Rect,Object.assign({x:x.x,y:x.y,ref:g,name:"line-anchor"},_(m.scale,m),{onDragMove:T=>{const L=w(S,T.target.position(),E.height);E.set({x:L.x,y:L.y,width:L.width,rotation:L.rotation})}})))))})})(SS);var ES={};(function(e){var t=we&&we.__createBinding||(Object.create?function(R,D,z,F){F===void 0&&(F=z);var V=Object.getOwnPropertyDescriptor(D,z);V&&!("get"in V?!D.__esModule:V.writable||V.configurable)||(V={enumerable:!0,get:function(){return D[z]}}),Object.defineProperty(R,F,V)}:function(R,D,z,F){F===void 0&&(F=z),R[F]=D[z]}),r=we&&we.__setModuleDefault||(Object.create?function(R,D){Object.defineProperty(R,"default",{enumerable:!0,value:D})}:function(R,D){R.default=D}),n=we&&we.__importStar||function(R){if(R&&R.__esModule)return R;var D={};if(R!=null)for(var z in R)z!=="default"&&Object.prototype.hasOwnProperty.call(R,z)&&t(D,R,z);return r(D,R),D},i=we&&we.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useImageLoader=e.setImageLoaderHook=void 0;const a=i(at),o=Ui,l=ha,u=Wa,f=i(g0),v=i(Gi),w=Ef,_=Wl,h=ua,E=n(Cu),m=hi,y=xf,p=ql,g=Yo;function d(){return document.createElement("canvas")}async function b(R){if(!(R.indexOf("data:image/svg+xml")>=0||R.indexOf(".svg")>=0))return R;const D=await E.urlToString(R),z=E.fixSize(D);return E.svgToURL(z)}const O=R=>{const[D,z]=a.default.useState(R);return a.default.useEffect(()=>{(async()=>{const F=await b(R);F!==D&&z(F)})()},[R]),D},k=new window.Image;k.src=E.svgToURL(`
|
|
206
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
207
|
-
<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"/>
|
|
208
|
-
<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"/>
|
|
209
|
-
</svg>
|
|
210
|
-
`);const C=new window.Image;C.src=E.svgToURL(`
|
|
211
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
212
|
-
<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"/>
|
|
213
|
-
<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"/>
|
|
214
|
-
<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"/>
|
|
215
|
-
<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"/>
|
|
216
|
-
</svg>
|
|
217
|
-
`);function S(R,D,z,F,V,Y,q){for(var G=new ImageData(D,z),K=new Int32Array(R.data.buffer),X=R.width,Q=new Int32Array(G.data.buffer),te=G.width,ee=D/Y,ae=z/q,oe=Math.round(1/ee),le=Math.round(1/ae),Te=oe*le,Fe=0;Fe<G.height;Fe++)for(var fe=0;fe<te;fe++){for(var ne=F+Math.round(fe/ee)+(V+Math.round(Fe/ae))*X,ge=0,pe=0,re=0,de=0,be=0;be<le;be++)for(var ye=0;ye<oe;ye++){var Ie=K[ne+ye+be*X];ge+=Ie<<24>>>24,pe+=Ie<<16>>>24,re+=Ie<<8>>>24,de+=Ie>>>24}ge=Math.round(ge/Te),pe=Math.round(pe/Te),re=Math.round(re/Te),de=Math.round(de/Te),Q[fe+Fe*te]=de<<24|re<<16|pe<<8|ge}return G}function x(R,D){var z,F;const V=d();V.width=R.width,V.height=R.height,(z=V.getContext("2d"))===null||z===void 0||z.drawImage(R,0,0,V.width,V.height);const Y=S(V.getContext("2d").getImageData(0,0,V.width,V.height),Math.floor(V.width*D),Math.floor(V.height*D),0,0,V.width,V.height);return V.width=Math.floor(V.width*D),V.height=Math.floor(V.height*D),(F=V.getContext("2d"))===null||F===void 0||F.putImageData(Y,0,0),V}const P=(R,D,z,F,V=0,Y=!1)=>{const q=Math.floor(Math.max(R.width*F,1)),G=Math.floor(Math.max(R.height*F,1)),K=Math.min(V*F,q/2,G/2),X=Math.max(R.width/z.width,R.height/z.height)*F,Q=R.page._exportingOrRendering&&m.flags.imageDownScalingEnabled&&X<1&&!Y,te=z.x===0&&z.y===0&&z.width===(D==null?void 0:D.width)&&z.height===(D==null?void 0:D.height),ee=a.default.useMemo(()=>{if(!(!D||!D.width||!D.height))return te&&K===0&&!Q?void 0:d()},[D,K,Q,te]);return a.default.useLayoutEffect(()=>{if(!ee||!D)return;ee.width=q,ee.height=G;const ae=ee.getContext("2d");if(!ae)return;K&&(ae.beginPath(),ae.moveTo(K,0),ae.lineTo(q-K,0),ae.arc(q-K,K,K,3*Math.PI/2,0,!1),ae.lineTo(q,G-K),ae.arc(q-K,G-K,K,0,Math.PI/2,!1),ae.lineTo(K,G),ae.arc(K,G-K,K,Math.PI/2,Math.PI,!1),ae.lineTo(0,K),ae.arc(K,K,K,Math.PI,3*Math.PI/2,!1),ae.clip());const oe=Q?x(D,X):D,le=Q?{x:Math.floor(z.x*X),y:Math.floor(z.y*X),width:Math.floor(z.width*X),height:Math.floor(z.height*X)}:z;ae.drawImage(oe,le.x,le.y,le.width,le.height,0,0,ee.width,ee.height)},[ee,R.width,R.height,z.x,z.y,z.width,z.height,V,F,Y,R.page._exportingOrRendering,Q]),a.default.useEffect(()=>()=>{ee&&ee.nodeName==="CANVAS"&&v.default.Util.releaseCanvas(ee)},[ee]),ee||D},T=(R,D,z,F)=>{const V=O(R.clipSrc||""),[Y,q]=$(V,"anonymous"),G=R.clipSrc?q:"loaded";(0,e.useImageLoader)(G,R.id+"-clip");const K=a.default.useMemo(()=>{if(D&&Y)return d()},[D,Y]);return a.default.useLayoutEffect(()=>{var X;if(!Y||!D||!D.width||!D.height||!Y||!Y.width||!Y.height||!K)return;const Q=d(),te=Math.max(R.width/Y.width*z,R.height/Y.height*z);Q.width=Y.width*te,Q.height=Y.height*te,(X=Q.getContext("2d"))===null||X===void 0||X.drawImage(Y,0,0,Q.width,Q.height),K.width=Math.max(D.width,1),K.height=Math.max(D.height,1);const ee=K.getContext("2d");ee&&(ee.save(),ee.drawImage(Q,0,0,D.width,D.height),v.default.Util.releaseCanvas(Q),ee.globalCompositeOperation="source-in",ee.drawImage(D,0,0,K.width,K.height),ee.restore())},[K,D,Y,R.width,R.height,z,...F]),R.clipSrc&&Y?K:D},L=d(),M=(0,o.observer)(({element:R})=>{const D=Math.min(30,R.width/4,R.height/4),z=a.default.useRef(null);return a.default.useEffect(()=>{const F=z.current;if(!F)return;const V=new v.default.Animation(Y=>{F.rotate(((Y==null?void 0:Y.timeDiff)||0)/2)},F.getLayer());return V.start(),()=>{V.stop()}}),a.default.createElement(u.Group,{x:R.x,y:R.y,rotation:R.rotation,listening:!1,opacity:R.a.opacity,hideInExport:!R.showInExport},a.default.createElement(u.Rect,{width:R.width,height:R.height,fill:"rgba(124, 173, 212, 0.8)"}),a.default.createElement(u.Arc,{ref:z,x:R.width/2,y:R.height/2,fill:"white",outerRadius:Math.abs(D),innerRadius:Math.max(1,D-5),angle:270}))}),U=(0,o.observer)(({element:R})=>{const D="Can not load the video...",z=Math.max(10,Math.min(30,R.width/25));return a.default.createElement(u.Group,{x:R.x,y:R.y,rotation:R.rotation,listening:!1,opacity:R.a.opacity,hideInExport:!R.showInExport},a.default.createElement(u.Rect,{width:R.width,height:R.height,fill:"rgba(223, 102, 102, 0.8)"}),a.default.createElement(u.Text,{text:D,fontSize:z,width:R.width,height:R.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let $=f.default;const Z=R=>{$=R};e.setImageLoaderHook=Z;const B=(R,D)=>{const z=a.default.useRef(),F=()=>{var V;(V=z.current)===null||V===void 0||V.call(z),z.current=void 0};a.default.useEffect(()=>F,[]),a.default.useLayoutEffect(()=>{R!=="loading"||z.current||(z.current=(0,h.incrementLoader)(`video ${D}`)),R!=="loading"&&F(),R==="failed"&&(0,h.triggerLoadError)(`video ${D}`)},[R])};e.useImageLoader=B;function N(R,D){for(var z=R.buffered,F=0;F<z.length;F++)if(D>=z.start(F)&&D<=z.end(F))return!0;return!1}function H(R,D,z){const F=a.default.useRef("loading"),V=a.default.useRef(),[Y,q]=a.default.useState(0),G=a.default.useRef(),K=a.default.useRef(),X=a.default.useRef();return G.current===R&&K.current===D&&X.current===z||(F.current="loading",V.current=void 0,G.current=R,K.current=D,X.current=z),a.default.useLayoutEffect(function(){if(R){var Q=document.createElement("video");return Q.addEventListener("canplay",te),Q.addEventListener("error",ee),Q.crossOrigin=D,Q.src=R,function(){Q.removeEventListener("canplay",te),Q.removeEventListener("error",ee)}}function te(){F.current="loaded",V.current=Q,V.current.currentTime=0,q(Math.random()),V.current.removeEventListener("canplay",te)}function ee(ae){F.current="failed",V.current=void 0,q(Math.random())}},[R,D,z]),[V.current,F.current]}e.VideoElement=(0,o.observer)(({element:R,store:D})=>{var z;const[F,V]=a.default.useState(!1),Y=a.default.useRef(null),q=a.default.useRef(null),[G,K]=a.default.useState(!1),X=D.selectedElements.indexOf(R)>=0,[Q,te]=a.default.useState(!1),[ee,ae]=H(R.src,"anonymous"),oe=D.activePage===R.page;(0,e.useImageLoader)(ae,R.id+"-video"),ee&&(ee.width=ee.videoWidth,ee.height=ee.videoHeight);const le=ee||L;a.default.useEffect(()=>{ee&&D.history.ignore(()=>{R.set({duration:1e3*ee.duration})})},[ee]),a.default.useEffect(()=>{var Pe;if(!ee)return;const He=oe&&(D.isPlaying||Q);if(!He)return void ee.pause();He&&(ee.currentTime=R.startTime*ee.duration,ee.play());const Je=new v.default.Animation(()=>{},(Pe=Y.current)===null||Pe===void 0?void 0:Pe.getLayer());Je.start();const yt=()=>{te(!1),ee.currentTime=R.startTime*ee.duration},xt=()=>{ee.currentTime>=R.endTime*ee.duration&&(ee.pause(),ee.currentTime=R.startTime*ee.duration,te(!1))};return ee.addEventListener("ended",yt),ee.addEventListener("timeupdate",xt),()=>{Je.stop(),ee.removeEventListener("ended",yt),ee.removeEventListener("timeupdate",xt)}},[ee,Q,D.isPlaying,oe]);const Te=a.default.useRef();a.default.useEffect(()=>{const Pe=(0,l.autorun)(()=>{var He,Je;if(ee){const yt=(D.currentTime-R.page.startTime)%R.duration;(Math.abs(1e3*ee.currentTime-yt)>500||!D.isPlaying)&&(ee.currentTime=yt/1e3,D.isPlaying||ee.currentTime===0||(Te.current=(0,h.incrementLoader)(`video ${R.id}`))),(Je=(He=Y.current)===null||He===void 0?void 0:He.getLayer())===null||Je===void 0||Je.batchDraw()}});return()=>{Pe(),Te.current&&(Te.current(),Te.current=null)}},[D,ee]),a.default.useEffect(()=>{if(!ee)return;let Pe=null;const He=()=>{var yt,xt;Te.current&&((xt=(yt=Y.current)===null||yt===void 0?void 0:yt.getLayer())===null||xt===void 0||xt.batchDraw(),Te.current(),Te.current=null),N(ee,ee.currentTime)||(Pe&&(console.error("finish already exists"),Pe()),Pe=(0,h.incrementLoader)(`video ${R.id}`))},Je=()=>{Pe&&(Pe(),Pe=null)};return ee.addEventListener("timeupdate",He),ee.addEventListener("canplay",Je),()=>{ee.removeEventListener("timeupdate",He),ee.removeEventListener("canplay",Je)}},[ee,R.id,h.incrementLoader]);let{cropX:Fe,cropY:fe,cropWidth:ne,cropHeight:ge}=R;ae!=="loaded"&&(Fe=fe=0,ne=ge=1);const pe=le.width*ne,re=le.height*ge,de=R.width/R.height;let be,ye;const Ie=pe/re,Ee=R.type==="svg";Ee?(be=pe,ye=re):de>=Ie?(be=pe,ye=pe/de):(be=re*de,ye=re);const ke={x:le.width*Fe,y:le.height*fe,width:be,height:ye},Ze=(z=R.cornerRadius)!==null&&z!==void 0?z:0;let We=T(R,P(R,le,ke,D._elementsPixelRatio,Ze,F||R._cropModeEnabled||R.type==="svg"),D._elementsPixelRatio,[ke,Ze,D._elementsPixelRatio]);const dt=Math.max(R.width/be,R.height/ye);a.default.useEffect(()=>{var Pe;if(!R._cropModeEnabled)return;const He=(Pe=Y.current)===null||Pe===void 0?void 0:Pe.getStage();function Je(xt){R._cropModeEnabled&&xt.target!==q.current&&R.toggleCropMode(!1)}function yt(xt){R._cropModeEnabled&&xt.target.parentNode!==He.content&&R.toggleCropMode(!1)}return document.body.addEventListener("click",yt),He==null||He.on("click",Je),He==null||He.on("tap",Je),()=>{document.body.removeEventListener("click",yt),document.body.removeEventListener("touchstart",yt),He==null||He.off("click",Je),He==null||He.off("click",Je)}},[R._cropModeEnabled]),a.default.useLayoutEffect(()=>{if(!(F||R._cropModeEnabled))return(0,y.applyFilter)(Y.current,R),(0,l.autorun)(()=>{(0,y.applyFilter)(Y.current,R)},{delay:100})},[le,F,ne,ge,R._cropModeEnabled]),a.default.useLayoutEffect(()=>{var Pe;F||R._cropModeEnabled?(Pe=Y.current)===null||Pe===void 0||Pe.clearCache():(0,y.applyFilter)(Y.current,R)},[F,R.width,R.height,R._cropModeEnabled]),a.default.useEffect(()=>{(0,y.applyFilter)(Y.current,R)},[R.shadowEnabled,R.shadowBlur,R.cornerRadius,R.shadowColor,R.shadowOffsetX,R.shadowOffsetY,R.shadowOpacity]);const Bt=a.default.useRef(null),ue=a.default.useRef(null),he=a.default.useRef(null);a.default.useLayoutEffect(()=>{R._cropModeEnabled&&(ue.current.nodes([Bt.current]),he.current.nodes([q.current]))},[R._cropModeEnabled]);const nt=Pe=>{Math.round(Pe.target.x())>0&&(Pe.target.x(0),Pe.target.scaleX(1)),Math.round(Pe.target.y())>0&&(Pe.target.y(0),Pe.target.scaleY(1));const He=Pe.target.width()*Pe.target.scaleX(),Je=Pe.target.height()*Pe.target.scaleY(),yt=Math.min(1,be/He),xt=Math.min(1,ye/Je),ar=1-yt,Rr=Math.min(ar,Math.max(0,Math.round(-Pe.target.x())/He)),Lr=1-xt,ln=Math.min(Lr,Math.max(0,Math.round(-Pe.target.y())/Je));Pe.target.setAttrs({x:-Rr*le.width,y:-ln*le.height,scaleX:1,scaleY:1}),R.set({cropX:Rr,cropY:ln,cropWidth:yt,cropHeight:xt})},Oe=()=>{R.type!=="svg"&&R.contentEditable&&setTimeout(()=>{R.toggleCropMode(!0)})},je=ae==="loading",Le=ae==="failed",Se=!je&&!Le,et=a.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),xe=Se?R.a.opacity:0;(0,p.useFadeIn)(Y,xe);const Ke=R.selectable||D.role==="admin",Sr=(0,g.useMobile)();return a.default.createElement(a.default.Fragment,null,je&&a.default.createElement(M,{element:R}),Le&&a.default.createElement(U,{element:R}),a.default.createElement(u.Image,{ref:Y,name:"element",id:R.id,image:le,x:R.x,y:R.y,width:R.width||1,height:R.height||1,rotation:R.rotation,opacity:xe,shadowEnabled:R.shadowEnabled,shadowBlur:R.shadowBlur,shadowOffsetX:R.shadowOffsetX,shadowOffsetY:R.shadowOffsetY,shadowColor:R.shadowColor,shadowOpacity:R.shadowOpacity,customCrop:ke,listening:Ke,cropX:ke.x,cropY:ke.y,cropWidth:ke.width,cropHeight:ke.height,draggable:Sr?R.draggable&&X:R.draggable,preventDefault:!Sr||X,hideInExport:!R.showInExport,onMouseEnter:()=>{K(!0)},onMouseLeave:()=>{K(!1)},onDragMove:Pe=>{R.set({x:Pe.target.x(),y:Pe.target.y()})},onDragEnd:Pe=>{R.set({x:Pe.target.x(),y:Pe.target.y()})},onDblClick:Oe,onDblTap:Oe,onTransformStart:()=>{V(!0),et.current={cropX:R.cropX,cropY:R.cropY,cropWidth:R.cropWidth,cropHeight:R.cropHeight}},onTransform:Pe=>{var He;const Je=Pe.currentTarget,yt=Math.abs(Je.scaleX()-1)<1e-7?1:Je.scaleX(),xt=Math.abs(Je.scaleY()-1)<1e-7?1:Je.scaleY();Je.scaleX(1),Je.scaleY(1);const ar=(He=Pe.target.getStage())===null||He===void 0?void 0:He.findOne("Transformer"),Rr=1-be/le.width,Lr=Math.min(Rr,Math.max(0,R.cropX)),ln=1-ye/le.height,De=Math.min(ln,Math.max(0,R.cropY)),it=ar.getActiveAnchor(),Qe=!(it.indexOf("middle")>=0||it.indexOf("center")>=0),kt=!Qe&&yt<1&&et.current.cropHeight>ye/le.height;let tt=Qe?R.cropWidth:R.cropWidth*yt;kt&&(tt=R.cropWidth);const fr=!Qe&&xt<1&&et.current.cropWidth>be/le.width;let ht=Qe?R.cropHeight:R.cropHeight*xt;fr&&(ht=R.cropHeight),Ee&&(tt=R.cropWidth,ht=R.cropHeight),R.set({cropX:Lr,cropY:De,x:Je.x(),y:Je.y(),width:Je.width()*yt,height:Je.height()*xt,rotation:Pe.target.rotation(),cropWidth:Math.min(tt,1-Lr),cropHeight:Math.min(ht,1-De)})},onTransformEnd:Pe=>{const He=Pe.currentTarget;R.set({width:He.width(),height:He.height(),x:He.x(),y:He.y(),rotation:Pe.target.rotation(),cropWidth:be/le.width,cropHeight:ye/le.height}),V(!1)}}),a.default.createElement(u.Rect,{x:R.x,y:R.y,width:Math.max(R.width-R.borderSize,0),height:Math.max(R.height-R.borderSize,0),opacity:xe,offsetX:-R.borderSize/2,offsetY:-R.borderSize/2,stroke:R.borderColor,strokeWidth:R.borderSize,listening:!1,visible:!!R.borderSize,rotation:R.rotation,cornerRadius:Math.max(0,Ze-R.borderSize),hideInExport:!R.showInExport}),!Q&&!D.isPlaying&&a.default.createElement(u.Image,{image:k,x:R.x+R.width/2-15/D.scale,y:R.y+R.height/2-15/D.scale,width:30/D.scale,height:30/D.scale,hideInExport:!0,onClick:()=>{te(!0)}}),Q&&!D.isPlaying&&a.default.createElement(u.Image,{image:C,x:R.x+R.width/2-15/D.scale,y:R.y+R.height/2-15/D.scale,width:30/D.scale,height:30/D.scale,hideInExport:!0,onClick:()=>{te(!1)}}),R._cropModeEnabled&&a.default.createElement(w.Portal,{selector:".page-abs-container",enabled:!0},a.default.createElement(u.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)"}),a.default.createElement(u.Image,{listening:!1,image:We,x:R.x,y:R.y,width:R.width,height:R.height,rotation:R.rotation,shadowEnabled:R.shadowEnabled,shadowBlur:R.shadowBlur}),a.default.createElement(u.Group,{x:R.x,y:R.y,rotation:R.rotation,scaleX:dt,scaleY:dt},a.default.createElement(u.Image,{image:le,ref:q,opacity:.4,draggable:!0,x:-R.cropX*le.width,y:-R.cropY*le.height,onDragMove:nt,onTransform:nt}),a.default.createElement(u.Transformer,{ref:he,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Pe,He)=>He.width<5||He.height<5?Pe:He,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),a.default.createElement(u.Rect,{width:be,height:ye,ref:Bt,listening:!1,onTransform:Pe=>{Pe.target.x()<-R.cropX*le.width-1e-9&&(Pe.target.x(-R.cropX*le.width),Pe.target.scaleX(1)),Pe.target.y()<-R.cropY*le.height-1e-9&&(Pe.target.y(-R.cropY*le.height),Pe.target.scaleY(1));const He=Math.min(1,Math.max(0,R.cropX+Pe.target.x()/le.width)),Je=Math.min(1,Math.max(0,Pe.target.y()/le.height+R.cropY)),yt=Pe.target.width()*Pe.target.scaleX(),xt=Pe.target.height()*Pe.target.scaleY(),ar=Math.min(1-He,yt/le.width),Rr=Math.min(1-Je,xt/le.height),Lr=Pe.target.getAbsolutePosition(Pe.target.getParent().getParent());Pe.target.scale({x:1,y:1}),Pe.target.position({x:0,y:0}),R.set({x:Lr.x,y:Lr.y,cropX:He,cropY:Je,cropWidth:ar,cropHeight:Rr,width:Math.min(yt*dt,le.width*(1-He)*dt),height:Math.min(xt*dt,le.height*(1-Je)*dt)})}}),a.default.createElement(u.Transformer,{ref:ue,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Pe,He)=>He.width<5||He.height<5?Pe:He,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(G||X)&&a.default.createElement(_.Highlighter,{element:R}))})})(ES);var OS={},_0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.figureToSvg=e.subTypeToPathDataFunc=e.TYPES=e.crossPath=e.speechBubblePath=e.hexagonPath=e.pentagonPath=e.diamondPath=e.starPath=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0;const t=({width:m,height:y,cornerRadius:p})=>{if(p>0){const g=Math.min(p,m/2,y/2);return`M 0 ${g} A ${g} ${g} 0 0 1 ${g} 0 L ${m-g} 0 A ${g} ${g} 0 0 1 ${m} ${g} L ${m} ${y-g} A ${g} ${g} 0 0 1 ${m-g} ${y} L ${g} ${y} A ${g} ${g} 0 0 1 0 ${y-g} Z`}return`M 0 0 L ${m} 0 L ${m} ${y} L 0 ${y} Z`};e.rectData=t;const r=({width:m,height:y})=>`M ${m/2} 0 L ${m} ${y} L 0 ${y} Z`;e.triangleData=r;const n=({width:m,height:y})=>`M 0 0 L ${m} 0 L 0 ${y} Z`;e.rightTriangleData=n;const i=({width:m,height:y})=>`M ${m/2} ${y/2} m -${m/2}, 0 a ${m/2},${y/2} 0 1,0 ${m},0 a ${m/2},${y/2} 0 1,0 -${m},0`;function a({width:m,height:y}){const p=m/2,g=y/2,d=m/2,b=y/2,O=d/2,k=b/2;let C="",S=Math.PI/5;for(let x=0;x<10;x++){const P=x%2==0?b:k,T=p+(x%2==0?d:O)*Math.sin(x*S),L=g-P*Math.cos(x*S);x===0?C=`M ${T} ${L}`:C+=` L ${T} ${L}`}return C+" Z"}function o({width:m,height:y}){const p=m/2,g=y/2;return`M ${p} 0 L ${m} ${g} L ${p} ${y} L 0 ${g} Z`}function l({width:m,height:y}){const p=m/2,g=y/2,d=m/2,b=y/2;let O="",k=2*Math.PI/5;for(let C=0;C<5;C++){const S=b,x=p+d*Math.sin(C*k),P=g-S*Math.cos(C*k);C===0?O=`M ${x} ${P}`:O+=` L ${x} ${P}`}return O+" Z"}function u({width:m,height:y}){const p=m/2,g=y/2,d=m/2,b=y/2;let O="",k=2*Math.PI/6;for(let C=0;C<6;C++){const S=b,x=p+d*Math.sin(C*k),P=g-S*Math.cos(C*k);C===0?O=`M ${x} ${P}`:O+=` L ${x} ${P}`}return O+" Z"}function f({path:m,aspectRatio:y,width:p,height:g}){return{path:m,scaleX:p/y.width,scaleY:g/y.height}}function v({width:m,height:y}){const p=.1*Math.min(m,y),g=.2*m,d=.2*y,b=.5*m;let O=`M ${p},0`;return O+=" H "+(m-p),O+=` A ${p},${p} 0 0 1 ${m},${p}`,O+=" V "+(y-p-d),O+=` A ${p},${p} 0 0 1 ${m-p},${y-d}`,O+=` H ${b+g/2}`,O+=` L ${b},${y}`,O+=` L ${b-g/2},${y-d}`,O+=` H ${p}`,O+=` A ${p},${p} 0 0 1 0,${y-p-d}`,O+=` V ${p}`,O+=` A ${p},${p} 0 0 1 ${p},0`,O+=" Z",O}function w({width:m,height:y}){const p=.3*m,g=.3*y,d=m/2,b=y/2,O=d-p/2,k=d+p/2,C=b-g/2,S=b+g/2;let x=`M ${O},0 `;return x+=`H ${k} `,x+=`V ${C} `,x+=`H ${m} `,x+=`V ${S} `,x+=`H ${k} `,x+=`V ${y} `,x+=`H ${O} `,x+=`V ${S} `,x+="H 0 ",x+=`V ${C} `,x+=`H ${O} `,x+="V 0 ",x+="Z",x}function _(m){return e.TYPES[m]||e.rectData}function h(m,y){const{width:p,height:g,fill:d,stroke:b,strokeWidth:O,dash:k}=m,C=(k||[]).map(L=>L*O);let S=y(m),x=1,P=1;typeof S!="string"&&(x=S.scaleX,P=S.scaleY,S=S.path);const T=`clip-${m.id||Math.random()}`;return`
|
|
218
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${g}">
|
|
219
|
-
<defs>
|
|
220
|
-
<clipPath id="${T}">
|
|
221
|
-
<path d="${S}" />
|
|
222
|
-
</clipPath>
|
|
223
|
-
</defs>
|
|
224
|
-
|
|
225
|
-
<!-- Path for the fill -->
|
|
226
|
-
<path d="${S}" fill="${d}" transform="scale(${x}, ${P})"/>
|
|
227
|
-
|
|
228
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
229
|
-
<path d="${S}" fill="none" stroke="${b}" stroke-width="${2*O}" clip-path="url(#${T})" transform="scale(${x}, ${P})" stroke-dasharray="${C.join(" ")}"/>
|
|
230
|
-
</svg>
|
|
231
|
-
`}function E(m){const{subType:y}=m,p=_(y);return p?h(m,p):(console.error(`Polotno error: Can not convert ${m.subType} figure to svg.`),(0,e.rectData)(m))}e.circleData=i,e.starPath=a,e.diamondPath=o,e.pentagonPath=l,e.hexagonPath=u,e.speechBubblePath=v,e.crossPath=w,e.TYPES={rect:e.rectData,circle:e.circleData,star:a,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:o,pentagon:l,hexagon:u,speechBubble:v,cross:w,arc:({width:m,height:y})=>f({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:m,height:y}),cloud:({width:m,height:y})=>f({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:m,height:y}),rightArrow:({width:m,height:y})=>{const p=.6*m;return`M 0 ${y/4} L ${p} ${y/4} L ${p} 0 L ${m} ${y/2} L ${p} ${y} L ${p} ${.75*y} L 0 ${.75*y} Z`},leftArrow:({width:m,height:y})=>{const p=.4*m;return`M ${m} ${y/4} L ${p} ${y/4} L ${p} 0 L 0 ${y/2} L ${p} ${y} L ${p} ${.75*y} L ${m} ${.75*y} Z`},downArrow:({width:m,height:y})=>{const p=.6*y;return`M ${m/4} 0 L ${m/4} ${p} L 0 ${p} L ${m/2} ${y} L ${m} ${p} L ${.75*m} ${p} L ${.75*m} 0 Z`},upArrow:({width:m,height:y})=>{const p=.4*y;return`M ${m/4} ${y} L ${m/4} ${p} L 0 ${p} L ${m/2} 0 L ${m} ${p} L ${.75*m} ${p} L ${.75*m} ${y} Z`},asterisk1:({width:m,height:y})=>f({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:m,height:y}),asterisk2:({width:m,height:y})=>f({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:m,height:y}),bookmark:({width:m,height:y})=>f({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:m,height:y}),butterfly:({width:m,height:y})=>f({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:m,height:y}),cylinder:({width:m,height:y})=>f({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:m,height:y}),diamond2:({width:m,height:y})=>f({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:m,height:y}),door:({width:m,height:y})=>f({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:m,height:y}),drop1:({width:m,height:y})=>f({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:m,height:y}),drop2:({width:m,height:y})=>f({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:m,height:y}),explosion:({width:m,height:y})=>f({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:m,height:y}),flag:({width:m,height:y})=>f({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:m,height:y}),flower:({width:m,height:y})=>f({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:m,height:y}),frame:({width:m,height:y})=>f({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:m,height:y}),heart1:({width:m,height:y})=>f({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:m,height:y}),home:({width:m,height:y})=>f({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:m,height:y}),home2:({width:m,height:y})=>f({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:m,height:y}),hourglass:({width:m,height:y})=>f({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:m,height:y}),house:({width:m,height:y})=>f({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:m,height:y}),keyhole:({width:m,height:y})=>f({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:m,height:y}),kiss:({width:m,height:y})=>f({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:m,height:y}),leaf:({width:m,height:y})=>f({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:m,height:y}),lightning1:({width:m,height:y})=>f({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:m,height:y}),lightning2:({width:m,height:y})=>f({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:m,height:y}),magnet:({width:m,height:y})=>f({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:m,height:y}),mithosis:({width:m,height:y})=>f({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:m,height:y}),orangeRicky:({width:m,height:y})=>f({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:m,height:y}),party:({width:m,height:y})=>f({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:m,height:y}),pillow:({width:m,height:y})=>f({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:m,height:y}),polygon:({width:m,height:y})=>f({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:m,height:y}),rainbow:({width:m,height:y})=>f({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:m,height:y}),rhodeIsland:({width:m,height:y})=>f({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:m,height:y}),shell:({width:m,height:y})=>f({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:m,height:y}),shield1:({width:m,height:y})=>f({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:m,height:y}),shield2:({width:m,height:y})=>f({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:m,height:y}),skewedRectangle:({width:m,height:y})=>f({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:m,height:y}),softFlower:({width:m,height:y})=>f({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:m,height:y}),softStar:({width:m,height:y})=>f({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:m,height:y}),stairs1:({width:m,height:y})=>f({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:m,height:y}),stairs2:({width:m,height:y})=>f({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:m,height:y}),teewee:({width:m,height:y})=>f({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:m,height:y}),blob1:({width:m,height:y})=>f({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:m,height:y}),blob10:({width:m,height:y})=>f({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:m,height:y}),blob11:({width:m,height:y})=>f({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:m,height:y}),blob12:({width:m,height:y})=>f({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:m,height:y}),blob13:({width:m,height:y})=>f({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:m,height:y}),blob14:({width:m,height:y})=>f({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:m,height:y}),blob15:({width:m,height:y})=>f({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:m,height:y}),blob16:({width:m,height:y})=>f({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:m,height:y}),blob17:({width:m,height:y})=>f({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:m,height:y}),blob18:({width:m,height:y})=>f({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:m,height:y}),blob19:({width:m,height:y})=>f({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:m,height:y}),blob2:({width:m,height:y})=>f({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:m,height:y}),blob20:({width:m,height:y})=>f({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:m,height:y}),blob21:({width:m,height:y})=>f({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:m,height:y}),blob22:({width:m,height:y})=>f({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:m,height:y}),blob23:({width:m,height:y})=>f({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:m,height:y}),blob24:({width:m,height:y})=>f({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:m,height:y}),blob25:({width:m,height:y})=>f({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:m,height:y}),blob26:({width:m,height:y})=>f({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:m,height:y}),blob27:({width:m,height:y})=>f({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:m,height:y}),blob28:({width:m,height:y})=>f({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:m,height:y}),blob29:({width:m,height:y})=>f({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:m,height:y}),blob3:({width:m,height:y})=>f({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:m,height:y}),blob30:({width:m,height:y})=>f({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:m,height:y}),blob31:({width:m,height:y})=>f({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:m,height:y}),blob32:({width:m,height:y})=>f({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:m,height:y}),blob4:({width:m,height:y})=>f({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:m,height:y}),blob5:({width:m,height:y})=>f({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:m,height:y}),blob6:({width:m,height:y})=>f({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:m,height:y}),blob7:({width:m,height:y})=>f({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:m,height:y}),blob8:({width:m,height:y})=>f({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:m,height:y}),blob9:({width:m,height:y})=>f({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:m,height:y})},e.subTypeToPathDataFunc=_,e.figureToSvg=E})(_0);(function(e){var t=we&&we.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const r=t(at),n=Ui,i=Wa,a=_0,o=Wl,l=Yo,u=Of,f={};e.FigureElement=(0,n.observer)(({element:v,store:w})=>{const _=v.selectable||w.role==="admin",h=(0,l.useMobile)(),[E,m]=r.default.useState(!1),y=w.selectedElements.indexOf(v)>=0&&w.selectedElements.length===1,p=Math.min(v.strokeWidth,v.width/2,v.height/2),g=Math.max(0,Math.min(v.width/2,v.height/2,v.cornerRadius)),d=(0,u.useColor)(v,v.a.fill,"fill"),b=Object.assign(Object.assign({width:v.a.width,height:v.a.height},d),{cornerRadius:g,opacity:v.animated("opacity"),shadowEnabled:v.shadowEnabled,shadowBlur:v.shadowBlur,shadowOffsetX:v.shadowOffsetX,shadowOffsetY:v.shadowOffsetY,shadowColor:v.shadowColor,shadowOpacity:v.shadowOpacity,listening:_,preventDefault:!h||y,hideInExport:!v.showInExport}),O=(0,u.useColor)(v,v.stroke,"stroke"),k=Object.assign(Object.assign({visible:p>0,x:p/2,y:p/2,width:v.a.width-p,height:v.a.height-p},O),{strokeWidth:p,cornerRadius:Math.max(0,g-p),dash:v.dash.map(P=>P*p),opacity:v.animated("opacity"),hideInExport:!v.showInExport,listening:!1}),C=(S=v.subType,f[S]||(f[S]=(x=(0,a.subTypeToPathDataFunc)(S),(0,n.observer)(({element:P,fillProps:T,strokeProps:L})=>{let M=x({width:P.a.width,height:P.a.height,cornerRadius:P.cornerRadius}),U=1,$=1;typeof M!="string"&&(U=M.scaleX,$=M.scaleY,M=M.path);const Z=r.default.useRef(null);return r.default.createElement(r.default.Fragment,null,r.default.createElement(i.Rect,{width:P.width,height:P.height,fill:"transparent"}),r.default.createElement(i.Path,Object.assign({},T,{ref:Z,data:M,scaleX:U,scaleY:$})),r.default.createElement(i.Group,{clipFunc:B=>{const N=Z.current;if(N){var H=N.dataArray;B.beginPath();for(var R=0;R<H.length;R++){var D=H[R].command,z=H[R].points;switch(D){case"L":B.lineTo(z[0],z[1]);break;case"M":B.moveTo(z[0],z[1]);break;case"C":B.bezierCurveTo(z[0],z[1],z[2],z[3],z[4],z[5]);break;case"Q":B.quadraticCurveTo(z[0],z[1],z[2],z[3]);break;case"A":var F=z[0],V=z[1],Y=z[2],q=z[3],G=z[4],K=z[5],X=z[6],Q=z[7],te=Y>q?Y:q,ee=Y>q?1:Y/q,ae=Y>q?q/Y:1;B.translate(F,V),B.rotate(X),B.scale(ee,ae),B.arc(0,0,te,G,G+K,1-Q),B.scale(1/ee,1/ae),B.rotate(-X),B.translate(-F,-V);break;case"z":B.closePath()}}}},scaleX:U,scaleY:$},r.default.createElement(i.Path,Object.assign({},L,{x:0,y:0,data:M,strokeWidth:2*L.strokeWidth,dash:L.dash.map(B=>B)}))))}))),f[S]||i.Group);var S,x;return r.default.createElement(r.default.Fragment,null,r.default.createElement(i.Group,{id:v.id,x:v.a.x,y:v.a.y,rotation:v.a.rotation,opacity:v.a.opacity,draggable:h?v.draggable&&y:v.draggable,name:"element",onMouseEnter:()=>{m(!0)},onMouseLeave:()=>{m(!1)},onDragMove:P=>{v.set({x:P.target.x(),y:P.target.y()})},onDragEnd:P=>{v.set({x:P.target.x(),y:P.target.y()})},onTransform:P=>{const T=P.target.scale();P.target.scaleX(1),P.target.scaleY(1),v.set({width:v.width*T.x,height:v.height*T.y,x:P.target.x(),y:P.target.y(),rotation:P.target.rotation()})}},r.default.createElement(C,{element:v,fillProps:b,strokeProps:k})),E&&!y&&r.default.createElement(o.Highlighter,{element:v}))})})(OS);(function(e){var t=we&&we.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=void 0;const r=t(at),n=Ui,i=v2,a=k2,o=hS,l=SS,u=ES,f=OS,v=Wa,w=hi,_=(0,n.observer)(y=>{const{element:p,store:g}=y,{children:d}=p,b=p.selectable||g.role==="admin";return r.default.createElement(v.Group,{opacity:p.opacity,listening:b,hideInExport:!p.showInExport},d.map(O=>r.default.createElement(m,Object.assign({},y,{key:O.id,store:g,element:O}))))}),h={text:i.TextElement,image:a.ImageElement,svg:a.ImageElement,line:l.LineElement,video:u.VideoElement,figure:f.FigureElement,group:_};function E(y,p){h[y]=p}e.registerShapeComponent=E;const m=(0,n.observer)(y=>{let p=h[y.element.type];return y.element.type==="text"&&w.flags.htmlRenderEnabled&&(p=o.HTMLElement),y.element.visible?p?r.default.createElement(p,Object.assign({},y)):(console.error("Can not find component for "+y.element.type),null):null});e.default=m})(s7);var xS={};(function(e){function t(r,n,i="scale"){const a=n.width/n.height;let o,l;a>=r.width/r.height?(o=r.width,l=r.width/a):(o=r.height*a,l=r.height);let u=0,f=0;return i==="left-top"?(u=0,f=0):i==="left-middle"?(u=0,f=(r.height-l)/2):i==="left-bottom"?(u=0,f=r.height-l):i==="center-top"?(u=(r.width-o)/2,f=0):i==="center-middle"?(u=(r.width-o)/2,f=(r.height-l)/2):i==="center-bottom"?(u=(r.width-o)/2,f=r.height-l):i==="right-top"?(u=r.width-o,f=0):i==="right-middle"?(u=r.width-o,f=(r.height-l)/2):i==="right-bottom"?(u=r.width-o,f=r.height-l):i==="scale"?(u=0,f=0,o=r.width,l=r.height):console.error(new Error("Unknown clip position property - "+i)),{cropX:u,cropY:f,cropWidth:o,cropHeight:l}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=void 0,e.getCrop=t})(xS);var lv={},sv={},k_;function nF(){return k_||(k_=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._dangerous=e.getAPI=e.getDomain=e.API=e.URL=void 0;const t=j2();e.URL="https://api.polotno.com",e.API="https://api.polotno.com/api";let r=e.URL;const n=()=>r;e.getDomain=n;const i=()=>r+"/api";e.getAPI=i;const a=k=>{r=k};e._dangerous=a;const o={},l=(k,C)=>{o[k]||(o[k]=!0,console.error(C))},u=`API for iconscout is provided as a demonstration.
|
|
232
|
-
For production usage you have to use your own API endpoint.
|
|
233
|
-
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
234
|
-
https://polotno.com/docs/server-api`;e.URLS={unsplashList:({query:k,page:C=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${k}&per_page=20&page=${C}&KEY=${(0,t.getKey)()}`,unsplashDownload:k=>`${(0,e.getAPI)()}/download-unsplash?id=${k}&KEY=${(0,t.getKey)()}`,svgapiList:({query:k,page:C=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${k}&page=${C}&per_page=20&KEY=${(0,t.getKey)()}`,svgapiDownload:k=>`${(0,e.getAPI)()}/download-svgapi?path=${k}&KEY=${(0,t.getKey)()}`,iconscoutList:({query:k,page:C=1})=>(l("iconscout",u),`${(0,e.getAPI)()}/get-iconscout?query=${k}&page=${C}&KEY=${(0,t.getKey)()}`),iconscoutDownload:k=>(l("iconscout",u),`${(0,e.getAPI)()}/download-iconscout?uuid=${k}&KEY=${(0,t.getKey)()}`),templateList:({query:k,page:C=1,sizeQuery:S})=>`${(0,e.getAPI)()}/get-templates?${S}&query=${k}&per_page=30&page=${C}&KEY=${(0,t.getKey)()}`};const f=()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,t.getKey)()}`;e.getGoogleFontsListAPI=f;const v=k=>{return`${(0,e.getDomain)()}/google-fonts-previews/black/${C=k,S=" ",x="-",C.replace(new RegExp(S,"g"),x)}.png`;var C,S,x};e.getGoogleFontImage=v;const w=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,t.getKey)()}`;e.polotnoShapesList=w;const _=()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,t.getKey)()}`;e.removeBackground=_;const h=k=>e.URLS.templateList(k);e.templateList=h;const E=()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,t.getKey)()}`;e.textTemplateList=E;const m=k=>e.URLS.unsplashList(k);e.unsplashList=m;const y=k=>e.URLS.unsplashDownload(k);e.unsplashDownload=y;const p=k=>e.URLS.svgapiList(k);e.svgapiList=p;const g=k=>e.URLS.svgapiDownload(k);e.svgapiDownload=g;const d=k=>e.URLS.iconscoutList(k);e.iconscoutList=d;const b=k=>e.URLS.iconscoutDownload(k);e.iconscoutDownload=b;const O=(k,C)=>{e.URLS[k]=C};e.setAPI=O}(sv)),sv}var R_;function j2(){return R_||(R_=1,function(e){var t=we&&we.__createBinding||(Object.create?function(k,C,S,x){x===void 0&&(x=S);var P=Object.getOwnPropertyDescriptor(C,S);P&&!("get"in P?!C.__esModule:P.writable||P.configurable)||(P={enumerable:!0,get:function(){return C[S]}}),Object.defineProperty(k,x,P)}:function(k,C,S,x){x===void 0&&(x=S),k[x]=C[S]}),r=we&&we.__setModuleDefault||(Object.create?function(k,C){Object.defineProperty(k,"default",{enumerable:!0,value:C})}:function(k,C){k.default=C}),n=we&&we.__importStar||function(k){if(k&&k.__esModule)return k;var C={};if(k!=null)for(var S in k)S!=="default"&&Object.prototype.hasOwnProperty.call(k,S)&&t(C,k,S);return r(C,k),C};Object.defineProperty(e,"__esModule",{value:!0}),e.validateKey=e.isKeyPaid=e.getKey=e.shouldShowCredit=void 0;const i=n(ha),a=nF(),o=hi;e.shouldShowCredit=i.observable({value:!1});const l=i.action(()=>{e.shouldShowCredit.value=!0});let u="";const f=()=>u||"";e.getKey=f;const v=5,w=3e3,_="Polotno API is initialized without API key. It may lead to unexpected behavior and stop working. Please create API key here: https://polotno.com/cabinet",h="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",E="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",m="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let y=window.location.origin;const p=navigator.userAgent.indexOf("Headless")>-1,g=navigator.userAgent.indexOf("Electron")>-1;y==="file://"&&p&&(y="headless"),y==="file://"&&g&&(y="electron");const d=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${y}" here: https://polotno.com/cabinet`;async function b(k){for(let C=0;C<v;C++)try{const S=await fetch((0,a.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:k,site:location.host})});if(!k)return console.warn(_),!1;if(S.status!==200){await new Promise(P=>setTimeout(P,w));continue}const x=await S.json();return x.is_valid||console.warn(h),x.is_paid||console.log(m,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),x.is_domain_valid||console.log(d,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,o.useRemoveBackground)(x.remove_background_enabled),x.is_paid||!1}catch{await new Promise(x=>setTimeout(x,w))}return console.error(E),!0}async function O(k,C){u=k,await b(k)&&!C||l()}e.isKeyPaid=b,e.validateKey=O}(lv)),lv}var w0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0;const t=({px:a,unit:o="px",dpi:l})=>{switch(o){case"pt":default:return a;case"mm":return a/(l/25.4);case"cm":return a/(l/2.54);case"in":return a/l}};e.pxToUnit=t;const r=({px:a,precious:o=2,dpi:l=72,unit:u="px"})=>parseFloat((0,e.pxToUnit)({px:a,dpi:l,unit:u}).toFixed(o));e.pxToUnitRounded=r;const n=({unitVal:a,dpi:o,unit:l})=>a/(0,e.pxToUnit)({px:1,unit:l,dpi:o});e.unitToPx=n;const i=a=>{const o=parseFloat((0,e.pxToUnit)(a).toFixed(1));switch(a.unit){case"pt":return`${Math.round(o)}pt`;case"mm":return`${o}mm`;case"cm":return`${o}cm`;case"in":return`${o}in`;default:return`${Math.round(o)}px`}};e.pxToUnitString=i})(w0);(function(e){var t=we&&we.__rest||function(N,H){var R={};for(var D in N)Object.prototype.hasOwnProperty.call(N,D)&&H.indexOf(D)<0&&(R[D]=N[D]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function"){var z=0;for(D=Object.getOwnPropertySymbols(N);z<D.length;z++)H.indexOf(D[z])<0&&Object.prototype.propertyIsEnumerable.call(N,D[z])&&(R[D[z]]=N[D[z]])}return R},r=we&&we.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.registerTransformerAttrs=e.setTransformerStyle=void 0;const n=r(at),i=Ui,a=ha,o=Wa,l=r(g0),u=r(Gi),f=r(s7),v=F2,w=k2,_=xS,h=j2(),E=Au,m=w0,y=hi,p=Yo,g=u.default.DD._drag;window.removeEventListener("mousemove",g),u.default.DD._drag=function(N){(0,a.runInAction)(()=>{g.call(this,N)})},window.addEventListener("mousemove",u.default.DD._drag);const d=new u.default.Group;d.add(new u.default.Rect({width:20,height:20,fill:"white"})),d.add(new u.default.Path({scaleX:20/24,scaleY:20/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 b=d.toCanvas({pixelRatio:2,width:20,height:20}),O={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:N=>{N.hasName("rotater")&&N.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:b,fillPatternScaleX:20/20/2,fillPatternScaleY:20/20/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},k=N=>{Object.assign(O,N)};e.setTransformerStyle=k;const C={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{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 S(N,H){C[N]=C[N]||H,Object.assign(C[N],H)}e.registerTransformerAttrs=S;const x=N=>n.default.createElement(o.Rect,Object.assign({},N,{preventDefault:!1})),P=N=>{var{url:H}=N,R=t(N,["url"]);const[D,z]=(0,l.default)(H,"anonymous"),F=D?(0,_.getCrop)(D,{width:R.width,height:R.height},"center-middle"):{};return(0,w.useImageLoader)(z,"background"),n.default.createElement(o.Image,Object.assign({image:D},R,F))},T=N=>n.default.createElement(o.Rect,Object.assign({},N)),L=N=>{const{background:H,scale:R,borderColor:D}=N,z=t(N,["background","scale","borderColor"]),F=n.default.useMemo(()=>!!u.default.Util.colorToRGBA(H),[H]),V=n.default.useMemo(()=>{const Y=document.createElement("canvas"),q=30;Y.width=60,Y.height=60;const G=Y.getContext("2d");return G&&(G.fillStyle="black",G.fillRect(q,0,q,q),G.fillRect(0,q,q,q)),Y},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Rect,Object.assign({fillPatternImage:V},z,{opacity:.1,hideInExport:!0})),F?n.default.createElement(T,Object.assign({fill:H},z)):n.default.createElement(P,Object.assign({url:H},z)))},M=(0,i.observer)(({selection:N})=>N.visible?n.default.createElement(o.Rect,{name:"selection",x:Math.min(N.x1,N.x2),y:Math.min(N.y1,N.y2),width:Math.abs(N.x1-N.x2),height:Math.abs(N.y1-N.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),U=(0,i.observer)(({x:N,y:H,width:R,height:D,rotation:z,anchor:F,store:V})=>{const Y=(0,E.getClientRect)({x:N,y:H,width:R,height:D,rotation:u.default.Util.radToDeg(z)});if(F===void 0)return null;const q=(D/2+70)*Math.cos(z-Math.PI/2),G=(D/2+70)*Math.sin(z-Math.PI/2),K=(0,m.pxToUnitRounded)({unit:V.unit,dpi:V.dpi,px:R/V.scale,precious:V.unit==="px"?0:1})+" x "+(0,m.pxToUnitRounded)({unit:V.unit,dpi:V.dpi,px:D/V.scale,precious:V.unit==="px"?0:1})+(V.unit==="px"?"":" "+V.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(o.Label,{x:(Y.minX+Y.maxX)/2+q,y:(Y.minY+Y.maxY)/2+G,offsetX:14,offsetY:14,visible:F==="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(u.default.Util.radToDeg(z)).toString()+"°"})),n.default.createElement(o.Label,{x:(Y.minX+Y.maxX)/2,y:Y.maxY+20,visible:F!=="rotater"},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:K})))}),$=(0,i.observer)(({elements:N,store:H})=>{const R=N.filter(z=>z.alwaysOnTop),D=N.filter(z=>!z.alwaysOnTop).concat(R);return n.default.createElement(n.default.Fragment,null,D.map(z=>n.default.createElement(f.default,{key:z.id,store:H,element:z,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let Z=null;const B=N=>{Z=N};e.registerNextDomDrop=B,e.default=(0,i.observer)(({store:N,page:H,width:R,height:D,pageControlsEnabled:z,backColor:F,pageBorderColor:V,activePageBorderColor:Y,components:q,bleedColor:G,altCloneEnabled:K})=>{const X=N.bleedVisible?H.bleed:0,Q=H.computedWidth+2*X,te=H.computedHeight+2*X,ee=(R-Q*N.scale)/2,ae=(D-te*N.scale)/2,oe=n.default.useRef(null),le=n.default.useRef(null),Te=n.default.useRef(null),Fe=z==null||z,[fe,ne]=n.default.useState(null),[ge,pe]=n.default.useState({}),re=N.selectedElements.find(Oe=>Oe._cropModeEnabled),de=N.selectedShapes.filter(Oe=>!Oe.resizable).length>0,be=N.selectedShapes.filter(Oe=>!Oe.draggable).length>0,ye=N.selectedElements.filter(Oe=>!Oe.visible).length>0;n.default.useLayoutEffect(()=>{var Oe,je,Le;if(!oe.current)return;const Se=oe.current.getStage(),et=N.selectedShapes.map(Ke=>Ke._cropModeEnabled?null:Se.findOne("#"+Ke.id)).filter(Ke=>Ke),xe=N.selectedElements.length===1&&((Oe=N.selectedElements[0])===null||Oe===void 0?void 0:Oe.type)||"many";C[xe]?(oe.current.setAttrs(Object.assign(Object.assign({},O),C[xe])),xe!=="svg"&&xe!=="image"||N.selectedElements[0].keepRatio||oe.current.setAttrs({enabledAnchors:O.enabledAnchors}),xe==="text"&&y.flags.textVerticalResizeEnabled&&oe.current.setAttrs({enabledAnchors:(je=C.text.enabledAnchors)===null||je===void 0?void 0:je.concat(["bottom-center"])})):oe.current.setAttrs(O),de&&oe.current.enabledAnchors([]),be&&oe.current.rotateEnabled(!1),et.find(Ke=>Ke==null?void 0:Ke.isDragging())&&et.forEach(Ke=>{Ke.isDragging()||Ke==null||Ke.startDrag()}),oe.current.nodes(et),(Le=oe.current.getLayer())===null||Le===void 0||Le.batchDraw()},[N.selectedElements,re,de,ye,be]);const Ie=(0,i.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),Ee=n.default.useRef(!1),ke=(0,p.useMobile)(),Ze=(0,a.action)(Oe=>{var je,Le;if(ke)return;Ee.current=!1;const Se=Oe.target.findAncestor(".elements-container"),et=Oe.target.findAncestor("Transformer"),xe=Oe.target.findAncestor(".page-abs-container");if(Se||et||xe)return;const Ke=(je=Oe.target.getStage())===null||je===void 0?void 0:je.getPointerPosition();Ke&&(Ie.visible=!0,Ie.x1=Ke.x,Ie.y1=Ke.y,Ie.x2=Ke.x,Ie.y2=Ke.y,((Le=Oe.target.getStage())===null||Le===void 0?void 0:Le.getPointersPositions().length)>=2&&(Ie.visible=!1))});n.default.useEffect(()=>{const Oe=(0,a.action)(Le=>{var Se,et;if(!Ie.visible)return;(Se=le.current)===null||Se===void 0||Se.setPointersPositions(Le);let xe=((et=le.current)===null||et===void 0?void 0:et.getPointerPosition())||{x:Ie.x2,y:Ie.y2};Ie.x2=xe.x,Ie.y2=xe.y}),je=(0,a.action)(()=>{if(!Ie.visible||!le.current)return;const Le=le.current.findOne(".selection"),Se=Le?Le.getClientRect():{width:0,height:0,x:0,y:0};if(Se.width&&Se.height){const et=[];le.current.find(".element").forEach(Ke=>{const Sr=Ke.getClientRect(),Pe=N.getElementById(Ke.id()),He=Pe==null?void 0:Pe.draggable,Je=Pe==null?void 0:Pe.selectable;u.default.Util.haveIntersection(Se,Sr)&&He&&Je&&et.push(Pe.top.id)});const xe=[...new Set(et)];N.selectElements(xe)}Ie.visible=!1,Ee.current=!0});return window.addEventListener("mousemove",Oe),window.addEventListener("touchmove",Oe),window.addEventListener("mouseup",je),window.addEventListener("touchend",je),()=>{window.removeEventListener("mousemove",Oe),window.removeEventListener("touchmove",Oe),window.removeEventListener("mouseup",je),window.removeEventListener("touchend",je)}},[]);const We=Oe=>{if(N.activePage!==H&&H.select(),Ee.current)return;const je=Oe.evt.ctrlKey||Oe.evt.metaKey||Oe.evt.shiftKey,Le=Oe.target.findAncestor(".elements-container"),Se=Oe.target.findAncestor(".page-abs-container"),et=Oe.target.findAncestor("Transformer");if(!(je||Le||et||Se))return void N.selectElements([]);const xe=Oe.target.findAncestor(".element",!0),Ke=N.getElementById(xe==null?void 0:xe.id()),Sr=Ke==null?void 0:Ke.top,Pe=Sr==null?void 0:Sr.id,He=N.selectedElementsIds.indexOf(Pe)>=0;Pe&&je&&!He?N.selectElements(N.selectedElementsIds.concat([Pe])):Pe&&je&&He?N.selectElements(N.selectedElementsIds.filter(Je=>Je!==Pe)):!Pe||je||He||N.selectElements([Pe])};(0,v.useSnap)(oe,N);const dt=N.activePage===H,Bt=q==null?void 0:q.PageControls,ue=q==null?void 0:q.Tooltip,he=1/N.scale,nt=0/N.scale;return n.default.createElement("div",{ref:Te,onDragOver:Oe=>Oe.preventDefault(),onDrop:Oe=>{if(Oe.preventDefault(),!le.current)return;le.current.setPointersPositions(Oe);const je=le.current.findOne(".elements-container").getRelativePointerPosition(),Le=le.current.getPointerPosition(),Se=le.current.getAllIntersections(Le).map(Ke=>Ke.findAncestor(".element",!0)).filter(Boolean),et=[...new Set(Se.reverse())].map(Ke=>N.getElementById(Ke.id())),xe=et[0];Z&&(Z(je,xe,{elements:et,page:H}),Z=null)},style:{position:"relative",width:R+"px"},className:"polotno-page-container"+(dt?" active-page":"")},n.default.createElement(o.Stage,{ref:le,width:Math.min(R,4*window.innerWidth),height:Math.min(D,4*window.innerHeight),onClick:We,onTap:We,onMouseDown:Ze,onMouseMove:Oe=>{if(!Oe.evt.altKey&&fe)return void ne(null);if(!Oe.evt.altKey)return;const je=Oe.target.findAncestor(".element",!0),Le=je==null?void 0:je.id();if(!N.selectedElements[0]||N.selectedElementsIds.includes(Le))return;const Se=(0,E.getTotalClientRect)(N.selectedShapes),et=Le?N.getElementById(Le):{x:0,y:0,width:H.computedWidth,height:H.computedHeight,rotation:0},xe=(0,E.getClientRect)(et),Ke=[];Se.minX>xe.maxX&&Ke.push({distance:Se.minX-xe.maxX,box1:Se,box2:xe,points:[{x:Se.minX,y:Se.minY+Se.height/2},{x:xe.maxX,y:Se.minY+Se.height/2},{x:xe.maxX,y:xe.minY+xe.height/2}]}),Se.maxX<xe.minX&&Ke.push({distance:xe.minX-Se.maxX,box1:Se,box2:xe,points:[{x:Se.maxX,y:Se.minY+Se.height/2},{x:xe.minX,y:Se.minY+Se.height/2},{x:xe.minX,y:xe.minY+xe.height/2}]}),Se.minY>xe.maxY&&Ke.push({box1:Se,box2:xe,distance:Se.minY-xe.maxY,points:[{x:Se.minX+Se.width/2,y:Se.minY},{x:Se.minX+Se.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:xe.maxY}]}),Se.maxY<xe.minY&&Ke.push({box1:Se,box2:xe,distance:xe.minY-Se.maxY,points:[{x:Se.minX+Se.width/2,y:Se.maxY},{x:Se.minX+Se.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:xe.minY}]}),Se.minX>=xe.minX&&Se.maxX<=xe.maxX&&Se.minY>=xe.minY&&Se.maxY<=xe.maxY&&(Ke.push({distance:Se.minX-xe.minX,box1:Se,box2:xe,points:[{x:Se.minX,y:Se.minY+Se.height/2},{x:xe.minX,y:Se.minY+Se.height/2},{x:xe.minX,y:xe.minY+xe.height/2}]}),Ke.push({distance:xe.maxX-Se.maxX,box1:Se,box2:xe,points:[{x:Se.maxX,y:Se.minY+Se.height/2},{x:xe.maxX,y:Se.minY+Se.height/2},{x:xe.maxX,y:xe.minY+xe.height/2}]}),Ke.push({box1:Se,box2:xe,distance:Se.minY-xe.minY,points:[{x:Se.minX+Se.width/2,y:Se.minY},{x:Se.minX+Se.width/2,y:xe.minY},{x:xe.minX+xe.width/2,y:xe.minY}]}),Ke.push({box1:Se,box2:xe,distance:xe.maxY-Se.maxY,points:[{x:Se.minX+Se.width/2,y:Se.maxY},{x:Se.minX+Se.width/2,y:xe.maxY},{x:xe.minX+xe.width/2,y:xe.maxY}]})),JSON.stringify(fe)!==JSON.stringify(Ke)&&ne(Ke)},onTouchStart:Ze,onDragStart:Oe=>{var je;const Le=Oe.target.findAncestor(".element",!0);if(Le){const Se=N.getElementById(Le==null?void 0:Le.id()),et=Se==null?void 0:Se.top,xe=et==null?void 0:et.id;!(N.selectedElementsIds.indexOf(xe)>=0)&&xe&&(N.selectElements([xe]),Oe.target.stopDrag(),Oe.target.startDrag(Oe),(je=oe.current)===null||je===void 0||je.startDrag(Oe))}fe&&ne(null)},pageId:H.id,style:{position:"relative"}},n.default.createElement(o.Layer,null,n.default.createElement(x,{width:R,height:D,fill:F}),n.default.createElement(o.Group,{x:ee,y:ae,scaleX:N.scale,scaleY:N.scale,name:"page-container"},n.default.createElement(o.Group,{name:"page-container-2"},n.default.createElement(o.Group,{name:"page-background-group",x:X,y:X},n.default.createElement(L,{x:-H.bleed,y:-H.bleed,width:H.computedWidth+2*H.bleed,height:H.computedHeight+2*H.bleed,background:H.background,name:"page-background",preventDefault:!1,scale:N.scale})),n.default.createElement(o.Group,{x:X,y:X,name:"elements-container",listening:!N.isPlaying},n.default.createElement(o.Rect,{name:"elements-area",width:H.computedWidth,height:H.computedHeight,listening:!1}),n.default.createElement($,{elements:H.children,store:N})),n.default.createElement(o.Rect,{stroke:G,name:"bleed",strokeWidth:H.bleed,x:H.bleed/2,y:H.bleed/2,width:H.computedWidth+H.bleed,height:H.computedHeight+H.bleed,listening:!1,visible:H.bleed>0&&N.bleedVisible,hideInExport:!0}))),n.default.createElement(o.Line,{name:"workspace-background",points:[0,0,R,0,R,D,0,D,0,0,ee,ae,ee,D-ae,R-ee,D-ae,R-ee,ae,ee,ae],listening:!1,closed:!0,fill:F}),n.default.createElement(o.Group,{x:ee,y:ae,scaleX:N.scale,scaleY:N.scale},n.default.createElement(o.Rect,{name:"page-highlight",hideInExport:!0,x:-he/2-nt,y:-he/2-nt,width:Q+he+2*nt,height:te+he+2*nt,stroke:dt&&N.pages.length>1?Y:V,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(o.Group,{x:ee+X*N.scale,y:ae+X*N.scale,scaleX:N.scale,scaleY:N.scale,name:"page-abs-container"},n.default.createElement(o.Transformer,{ref:oe,onDragStart:Oe=>{var je;!((je=Oe.evt)===null||je===void 0)&&je.altKey&&K&&N.selectedElements.forEach(Le=>{const Se=Le.clone({},{skipSelect:!0}),et=H.children.indexOf(Le);H.setElementZIndex(Se.id,et)}),N.history.startTransaction()},onDragEnd:()=>{N.history.endTransaction()},onTransformStart:()=>{N.history.startTransaction()},boundBoxFunc:(Oe,je)=>{const Le=Math.abs(je.width)<1||Math.abs(je.height)<1,Se=Math.abs(Oe.width)<1||Math.abs(Oe.height)<1;return Le&&!Se?Oe:je},onTransform:Oe=>{var je,Le;const Se=oe.current.nodes(),et=Se[Se.length-1];if(Oe.target!==et)return;const xe=(je=oe.current)===null||je===void 0?void 0:je.__getNodeRect(),Ke=(Le=oe.current)===null||Le===void 0?void 0:Le.getActiveAnchor();pe({anchor:Ke,x:xe.x,y:xe.y,rotation:xe.rotation,width:xe.width,height:xe.height})},onTransformEnd:Oe=>{pe({}),N.history.endTransaction()},visible:!N.isPlaying}),fe&&fe.map(({points:Oe,distance:je,box1:Le,box2:Se},et)=>n.default.createElement(o.Group,{name:"distances-container",hideInExport:!0,key:et,listening:!1},n.default.createElement(o.Rect,Object.assign({},Le,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Rect,Object.assign({},Se,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(o.Line,{points:[Oe[0].x,Oe[0].y,Oe[1].x,Oe[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Line,{points:[Oe[1].x,Oe[1].y,Oe[2].x,Oe[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(o.Label,{x:(Oe[0].x+Oe[1].x)/2,y:(Oe[0].y+Oe[1].y)/2,offsetY:-10,scaleX:1/N.scale,scaleY:1/N.scale},n.default.createElement(o.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),n.default.createElement(o.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,m.pxToUnitString)({unit:N.unit,dpi:N.dpi,px:je})})))),H._rendering&&n.default.createElement(o.Group,null,n.default.createElement(o.Rect,{width:Q,height:te,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(o.Text,{text:"Rendering...",fontSize:60,width:Q,height:te,align:"center",verticalAlign:"middle"})),ue&&n.default.createElement(ue,{components:q,store:N,page:H,stageRef:le})),n.default.createElement(U,Object.assign({},ge,{store:N})),n.default.createElement(M,{selection:Ie}),h.shouldShowCredit.value&&n.default.createElement(o.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:R-170,y:D-18,onMouseEnter:Oe=>{Oe.target.getStage().container().style.cursor="pointer"},onMouseLeave:Oe=>{Oe.target.getStage().container().style.cursor=""},onTouchStart:Oe=>{Oe.cancelBubble=!0},onMouseDown:Oe=>{Oe.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),n.default.createElement(o.Group,{name:"line-guides"}))),Fe&&dt&&Bt&&n.default.createElement(Bt,{store:N,page:H,xPadding:ee,yPadding:ae}))})})(v9);var PS={};(function(e){var t=we&&we.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.LeftRules=e.TopRules=void 0;const r=t(at),n=Au,i=w0,a=Ui,o=D2,l=(0,o.styled)("div",r.default.forwardRef)`
|
|
235
|
-
position: absolute;
|
|
236
|
-
top: 0;
|
|
237
|
-
left: 0;
|
|
238
|
-
pointer-events: none;
|
|
239
|
-
`,u=(0,o.styled)("div",r.default.forwardRef)`
|
|
240
|
-
height: 14px;
|
|
241
|
-
position: sticky;
|
|
242
|
-
font-size: 8px;
|
|
243
|
-
line-height: 14px;
|
|
244
|
-
top: 0;
|
|
245
|
-
left: 0;
|
|
246
|
-
color: grey;
|
|
247
|
-
border-bottom: 1px solid grey;
|
|
248
|
-
background-color: #e8e8e8;
|
|
249
|
-
overflow: hidden;
|
|
250
|
-
`,f=(0,o.styled)("div",r.default.forwardRef)`
|
|
251
|
-
left: 0;
|
|
252
|
-
width: 14px;
|
|
253
|
-
position: sticky;
|
|
254
|
-
font-size: 8px;
|
|
255
|
-
line-height: 14px;
|
|
256
|
-
color: grey;
|
|
257
|
-
border-right: 1px solid grey;
|
|
258
|
-
background-color: #e8e8e8;
|
|
259
|
-
overflow: hidden;
|
|
260
|
-
`,v=(0,o.styled)("div",r.default.forwardRef)`
|
|
261
|
-
position: absolute;
|
|
262
|
-
border-left: 1px solid grey;
|
|
263
|
-
padding-left: 2px;
|
|
264
|
-
`,w=(0,o.styled)("div",r.default.forwardRef)`
|
|
265
|
-
position: absolute;
|
|
266
|
-
left: 14px;
|
|
267
|
-
border-left: 1px solid grey;
|
|
268
|
-
padding-left: 2px;
|
|
269
|
-
transform: rotate(90deg);
|
|
270
|
-
transform-origin: left top;
|
|
271
|
-
overflow: hidden;
|
|
272
|
-
`,_=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4];function h(){return r.default.createElement("div",null,r.default.createElement("h1",null,"Top rules"))}e.TopRules=(0,a.observer)(({store:E,width:m,height:y})=>{const p=r.default.useRef(null);if(!E.activePage)return null;const g=E.activePage,d=(E.bleedVisible&&g.bleed,g.computedWidth*E.scale),b=g.computedHeight*E.scale,O=(m-d)/2,k=(C=L=>(0,i.unitToPx)({unitVal:L,dpi:E.dpi,unit:E.unit})*E.scale,_.find(L=>C(L)>30)||1e4);var C;const S=(0,i.unitToPx)({unitVal:k,dpi:E.dpi,unit:E.unit})*E.scale,x=Math.round(d/S)+1,P=Math.round(b/S)+1,T=(0,n.getTotalClientRect)(E.selectedShapes);return r.default.createElement(l,{ref:p,className:"polotno-rulers"},r.default.createElement(u,{style:{width:m+"px"},className:"polotno-x-ruler"},[...Array(x)].map((L,M)=>r.default.createElement(v,{key:M,style:{left:O+M*S+"px",width:S+"px"}},E.unit==="px"||k>=1?Math.round(k*M):(k*M).toFixed(1))),!!E.selectedShapes.length&&r.default.createElement("div",{style:{position:"absolute",left:O+T.x*E.scale+"px",height:"14px",width:T.width*E.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),E.pages.map((L,M)=>{var U;const $=L.computedHeight*E.scale,Z=(y-$)/2;return r.default.createElement(f,{key:L.id,style:{height:y+"px"},className:"polotno-y-ruler"},[...Array(P)].map((B,N)=>r.default.createElement(w,{key:N,style:{top:Z+N*S-14+"px",width:S+"px"}},E.unit==="px"||k>=1?Math.round(k*N):(k*N).toFixed(1))),((U=E.selectedShapes[0])===null||U===void 0?void 0:U.page)===L&&r.default.createElement("div",{style:{position:"absolute",top:Z+T.y*E.scale-14+"px",width:"14px",height:T.height*E.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))}),e.LeftRules=h})(PS);var CS={},uv={};let iF="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",TS=e=>crypto.getRandomValues(new Uint8Array(e)),AS=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*n*t/e.length);return(a=t)=>{let o="";for(;;){let l=r(i),u=i;for(;u--;)if(o+=e[l[u]&n]||"",o.length===a)return o}}},aF=(e,t=21)=>AS(e,t,TS),oF=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const lF=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:aF,customRandom:AS,nanoid:oF,random:TS,urlAlphabet:iF},Symbol.toStringTag,{value:"Module"})),S0=Do(lF);var cv={},fv={},kS={},z2={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0;const t=function(r,n){if(r===n)return!0;if(typeof r=="object"&&r!=null&&typeof n=="object"&&n!=null){if(Object.keys(r).length!=Object.keys(n).length)return!1;for(var i in r)if(!n.hasOwnProperty(i)||!(0,e.deepEqual)(r[i],n[i]))return!1;return!0}return!1};e.deepEqual=t})(z2);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const t=$i,r=z2;Object.assign(t.types),e.UndoManager=t.types.model("UndoManager",{history:t.types.array(t.types.frozen()),undoIdx:-1,targetPath:""}).views(n=>({get canUndo(){return n.undoIdx>0},get canRedo(){return n.undoIdx<n.history.length-1}})).actions(n=>{let i,a,o=!1,l=null,u=0,f=0;const v=()=>f>0;function w(){const h=(0,t.getSnapshot)(i);return{pages:h.pages,width:h.width,height:h.height,custom:h.custom}}function _(h){const E=i.pages.map(y=>y.id),m=h.pages.map(y=>y.id);(0,r.deepEqual)(E,m)?i.pages.forEach((y,p)=>{(0,t.applySnapshot)(y,h.pages[p])}):(0,t.applySnapshot)(i.pages,h.pages),i.setSize(h.width,h.height)}return{startTransaction(){f++},endTransaction(h){f--,h||this.requestAddState(w())},async ignore(h,E=!1,m=!1){m&&await new Promise(b=>setTimeout(b,10)),u&&n.addUndoState();let y=v();n.startTransaction();let p=f;try{await h()}catch(b){setTimeout(()=>{throw b})}const g=p!==f,d=!g;n.endTransaction(d),E||y||n.replaceState(),g||(clearTimeout(u),u=0)},async transaction(h){await n.ignore(h,!0),this.addUndoState()},requestAddState(h){l=h,u||v()||(o?o=!1:u=setTimeout(()=>{u=0,clearTimeout(u),v()||this.addUndoState()},100))},addUndoState(){if(o)return void(o=!1);const h=n.history[n.undoIdx];!(0,r.deepEqual)(l,h)&&(clearTimeout(u),u=0,n.history.splice(n.undoIdx+1),n.history.push(l),n.undoIdx=n.history.length-1)},afterCreate(){if(i=(0,t.resolvePath)(n,".."),!i)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");a=(0,t.onSnapshot)(i,()=>{this.requestAddState(w())}),n.history.length===0&&this.requestAddState(w())},clear(){clearTimeout(u),u=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(w())},beforeDestroy(){a()},undo(){u&&this.addUndoState(),n.canUndo?(n.undoIdx--,o=!0,_(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){u&&this.addUndoState(),n.canRedo?(n.undoIdx++,o=!0,_(n.history[n.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){n.history[n.undoIdx]=w()}}}),e.default=e.UndoManager})(kS);var RS={};(function(e){async function t(r,n){const i=await(await fetch(r)).blob(),a=document.createElement("a"),o=URL.createObjectURL(i);a.href=o,a.download=n,document.body.appendChild(a),a.click(),setTimeout(function(){document.body.removeChild(a),window.URL.revokeObjectURL(o)},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=void 0,e.downloadFile=t})(RS);var LS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=void 0;const t="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let r;function n(){return r?Promise.resolve(r):new Promise(i=>{var a=document.createElement("script");a.onload=function(){r=window.jspdf.jsPDF,i(r)},a.src=t,document.head.appendChild(a)})}e.getJsPDF=n})(LS);var MS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createGIF=e.getGIF=void 0;const t="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function r(){return window.GIF?Promise.resolve(window.GIF):new Promise(i=>{var a=document.createElement("script");a.onload=function(){i(window.GIF)},a.src=t,document.head.appendChild(a)})}async function n({width:i,height:a}){return new(await r())({workers:4,width:i,height:a,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
273
|
-
(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]);
|
|
274
|
-
`],{type:"application/javascript"}))})}e.getGIF=r,e.createGIF=n})(MS);var NS={};(function(e){async function t(r){for(let n=0;n<30;n++){const i=await r();if(i)return i;await new Promise(a=>setTimeout(a,50))}}Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=void 0,e.waitTillAvailable=t})(NS);var IS={},ef={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=e.cropImage=e.loadImage=e.getImageSize=void 0;const t=Cu;function r(o){return new Promise(l=>{const u=document.createElement("img");u.onload=async()=>{u.width===0||u.height===0?l(await(0,t.getSvgSize)(o)):l({width:u.width,height:u.height})},u.crossOrigin="anonymous",u.src=o})}function n(o){return new Promise((l,u)=>{const f=document.createElement("img");f.onload=()=>{l(f)},f.onerror=v=>{u(v)},f.crossOrigin="anonymous",f.src=o})}async function i(o,l){const u=await n(o),f=document.createElement("canvas");f.width=2*u.width,f.height=2*u.height,f.getContext("2d").drawImage(u,0,0,f.width,f.height);const v=document.createElement("canvas");v.width=l.width,v.height=l.height;const w=v.getContext("2d");let{cropX:_,cropY:h}=l;const E=f.width*l.cropWidth,m=f.height*l.cropHeight,y=l.width/l.height;let p,g;const d=E/m;return l.type==="svg"?(p=E,g=m):y>=d?(p=E,g=E/y):(p=m*y,g=m),w.drawImage(f,_*f.width,h*f.height,p,g,0,0,v.width,v.height),v.toDataURL("image/png")}function a(o,l){const{width:u,height:f}=o,v=u/f;let w,_;v>=l.width/l.height?(w=l.width,_=l.width/v):(w=l.height*v,_=l.height);const h=(l.width-w)/2,E=(l.height-_)/2;return{cropX:h/l.width,cropY:E/l.height,cropWidth:w/l.width,cropHeight:_/l.height}}e.getImageSize=r,e.loadImage=n,e.cropImage=i,e.getCrop=a})(ef);(function(e){var t=we&&we.__createBinding||(Object.create?function(S,x,P,T){T===void 0&&(T=P);var L=Object.getOwnPropertyDescriptor(x,P);L&&!("get"in L?!x.__esModule:L.writable||L.configurable)||(L={enumerable:!0,get:function(){return x[P]}}),Object.defineProperty(S,T,L)}:function(S,x,P,T){T===void 0&&(T=P),S[T]=x[P]}),r=we&&we.__setModuleDefault||(Object.create?function(S,x){Object.defineProperty(S,"default",{enumerable:!0,value:x})}:function(S,x){S.default=x}),n=we&&we.__importStar||function(S){if(S&&S.__esModule)return S;var x={};if(S!=null)for(var P in S)P!=="default"&&Object.prototype.hasOwnProperty.call(S,P)&&t(x,S,P);return r(x,S),x},i=we&&we.__rest||function(S,x){var P={};for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&x.indexOf(T)<0&&(P[T]=S[T]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var L=0;for(T=Object.getOwnPropertySymbols(S);L<T.length;L++)x.indexOf(T[L])<0&&Object.prototype.propertyIsEnumerable.call(S,T[L])&&(P[T[L]]=S[T[L]])}return P};Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToHTML=e.jsonToDOM=e.fixRatio=void 0;const a=ef,o=n(Cu),l=ef,u=_0,f=(S,x,...P)=>({type:S,props:x,children:P||[]});function v(S){var x=new DOMParser().parseFromString(S,"image/svg+xml");return x.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(x)}e.fixRatio=v;const w=async({element:S,page:x,store:P})=>{let{src:T}=S;if(S.type==="svg"&&Object.keys(S.colorsReplace).length){const K=await o.urlToString(T);T=o.replaceColors(K,new Map(Object.entries(S.colorsReplace)))}let L="";S.flipX&&(L+="scaleX(-1)"),S.flipY&&(L+="scaleY(-1)"),L||(L="none");const M={};if(S.clipSrc){const K=await o.urlToBase64(S.clipSrc);M["clip-path"]=`url(${K})`}const U=await(0,l.loadImage)(T),$=U.width*S.cropWidth,Z=U.height*S.cropHeight,B=S.width/S.height;let N,H;const R=$/Z;S.type==="svg"?(N=$,H=Z):B>=R?(N=$,H=$/B):(N=Z*B,H=Z);const D=N/U.width,z=H/U.height,F=N/H>S.width/S.height?S.height/H:S.width/N,V=N*F/D,Y=H*F/z,q=S.cropX*F*U.width,G=S.cropY*F*U.height;return f("div",{style:Object.assign(Object.assign({},M),{width:"100%",height:"100%","border-radius":S.cornerRadius+"px",border:S.borderSize?`${S.borderSize}px solid ${S.borderColor}`:"none",background:`url(${T})`,transform:L,"background-size":`${Math.round(V)}px ${Math.round(Y)}px`,"background-position-x":-Math.round(q)+"px","background-position-y":-Math.round(G)+"px"})})},_=async({element:S,page:x,store:P})=>{let T={};S.fill.indexOf("gradient")>=0&&(T=Object.assign(Object.assign({},T),{"background-color":S.fill,"background-image":S.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const L=S.backgroundPadding*(S.fontSize*S.lineHeight),M=f("div",{style:{position:"absolute",top:-L/2+"px",left:-L/2+"px",display:S.backgroundEnabled?"block":"none",width:S.width+L+"px",height:S.height+L+"px","background-color":S.backgroundColor,"border-radius":S.backgroundCornerRadius*(S.fontSize*S.lineHeight*.5)+"px"}}),U=f("div",{style:Object.assign(Object.assign({},T),{position:"absolute",top:0,left:0,width:S.width+"px",color:S.fill,"white-space":"pre-wrap","font-size":S.fontSize+"px","text-align":S.align,"font-family":S.fontFamily,"text-decoration":S.textDecoration||"none","line-height":S.lineHeight,"letter-spacing":S.letterSpacing+"em","font-style":S.fontStyle,"font-weight":S.fontWeight,"-webkit-text-stroke":`${S.strokeWidth}px ${S.stroke}`,"text-stroke":`${S.strokeWidth}px ${S.stroke}`})},S.text.split(`
|
|
275
|
-
`).join("<br />"));return f("div",{style:{position:"relative"}},M,U)},h=({element:S,type:x})=>{const P={"stroke-width":S.height,stroke:S.color,"line-cap":"round","stroke-linejoin":"round",opacity:S.opacity};return x==="arrow"||x==="triangle"?f("polyline",Object.assign({points:`${3*S.height},${2*-S.height} 0,0 ${3*S.height},${2*S.height}`},P)):x==="bar"?f("polyline",Object.assign({points:`0,${2*-S.height} 0,${2*S.height}`},P)):x==="circle"?f("circle",Object.assign({r:S.height},P)):x==="square"?f("polyline",Object.assign({points:`${-S.height},${-S.height} ${-S.height},${S.height} ${S.height},${S.height} ${S.height},${-S.height}`},P)):null},E=async({element:S,page:x,store:P})=>f("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},f("rect",{x:0,y:0,width:S.width,height:S.height,fill:S.color}),f("g",{transform:`translate(0 ${S.height/2})`},h({element:S,type:S.startHead})),f("g",{transform:`translate(${S.width} ${S.height/2}) rotate(180)`},h({element:S,type:S.endHead}))),m=async({element:S,page:x,store:P,elementHook:T})=>{const L=await Promise.all(S.children.map(U=>g({element:U,page:x,store:P,elementHook:T}))),M=f("div",{style:{"transform-origin":"top left",opacity:S.opacity}},...L);return T&&T({dom:M,element:S})||M},y=async({element:S,page:x,store:P,elementHook:T})=>{const L=(0,u.figureToSvg)(S),M=f("div",{innerHTML:L});return T&&T({dom:M,element:S})||M},p={image:w,svg:w,text:_,line:E,figure:y,group:m};async function g({element:S,page:x,store:P,elementHook:T}){let L=await p[S.type];L||(L=()=>f("div",{}),console.error(`HTML export does not support ${S.type} type...`));const M=await L({element:S,page:x,store:P}),U=[];S.blurEnabled&&U.push(`blur(${S.blurRadius/2}px)`),S.brightnessEnabled&&U.push(`brightness(${100*S.brightness+100}%)`),S.sepiaEnabled&&U.push("sepia()"),S.grayscaleEnabled&&U.push("grayscale()"),S.shadowEnabled&&U.push(`drop-shadow(${S.shadowOffsetX}px ${S.shadowOffsetY}px ${S.shadowBlur}px ${S.shadowColor})`);const $=f("div",{style:{position:"absolute",left:S.x+"px",top:S.y+"px",width:S.width+"px",height:S.height+"px",transform:`rotate(${S.rotation}deg)`,"transform-origin":"top left",opacity:S.opacity,filter:U.join(" ")||"none"}},M);return T&&T({dom:$,element:S})||$}async function d({page:S,store:x,elementHook:P}){const T=await Promise.all(S.children.map($=>g({element:$,page:S,store:x,elementHook:P}))),L=S.width==="auto"?x.width:S.width,M=S.height==="auto"?x.height:S.height;let U={};if(S.background.indexOf("url")>=0||S.background.indexOf("http")>=0||S.background.indexOf(".jpg")>=0||S.background.indexOf(".png")>=0||S.background.indexOf(".jpeg")>=0){const{width:$,height:Z}=await(0,l.loadImage)(S.background),B=await w({element:Object.assign({x:0,y:0,width:$,height:Z,src:S.background,cornerRadius:0},(0,a.getCrop)({width:$,height:Z},{width:$,height:Z})),page:S,store:x});T.unshift(B)}else U=Object.assign(Object.assign({},U),{"background-color":S.background});return f("div",{className:"page",style:Object.assign(Object.assign({},U),{width:L+"px",height:M+"px",border:"1px solid grey",overflow:"hidden",position:"relative"})},...T)}async function b({json:S,elementHook:x}){const P=await Promise.all(S.pages.map(M=>d({page:M,store:S,elementHook:x}))),T=[];S.pages.forEach(M=>{M.children.forEach(U=>{U.type==="text"&&T.indexOf(U.fontFamily)===-1&&T.push(U.fontFamily)})});const L=T.map(M=>S.fonts.find(U=>U.fontFamily===M)?f("style",{},""):f("link",{href:`https://fonts.googleapis.com/css?family=${M}`,rel:"stylesheet"}));return f("div",{className:"design"},...L,...P)}e.jsonToDOM=b;const O=(S,x)=>typeof x=="object"?`${S}="${Object.keys(x).map(P=>`${P}:${x[P]};`).join(" ")}"`:`${S}="${x}"`,k=({dom:S})=>{if(typeof S=="string")return S;if(!S)return"";const x=S.props,{innerHTML:P}=x,T=i(x,["innerHTML"]);return`<${S.type} ${Object.keys(T).map(L=>O(L,S.props[L])).join(" ")}>${P||S.children.map(L=>k({dom:L})).join("")}</${S.type}>`};async function C({json:S,elementHook:x}){const P=await b({json:S,elementHook:x});return k({dom:P})}e.jsonToHTML=C})(IS);var DS={};(function(e){var t=we&&we.__createBinding||(Object.create?function(x,P,T,L){L===void 0&&(L=T);var M=Object.getOwnPropertyDescriptor(P,T);M&&!("get"in M?!P.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return P[T]}}),Object.defineProperty(x,L,M)}:function(x,P,T,L){L===void 0&&(L=T),x[L]=P[T]}),r=we&&we.__setModuleDefault||(Object.create?function(x,P){Object.defineProperty(x,"default",{enumerable:!0,value:P})}:function(x,P){x.default=P}),n=we&&we.__importStar||function(x){if(x&&x.__esModule)return x;var P={};if(x!=null)for(var T in x)T!=="default"&&Object.prototype.hasOwnProperty.call(x,T)&&t(P,x,T);return r(P,x),P},i=we&&we.__rest||function(x,P){var T={};for(var L in x)Object.prototype.hasOwnProperty.call(x,L)&&P.indexOf(L)<0&&(T[L]=x[L]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function"){var M=0;for(L=Object.getOwnPropertySymbols(x);M<L.length;M++)P.indexOf(L[M])<0&&Object.prototype.propertyIsEnumerable.call(x,L[M])&&(T[L[M]]=x[L[M]])}return T};Object.defineProperty(e,"__esModule",{value:!0}),e.jsonToSVG=e.jsonToDOM=e.fixRatio=void 0;const a=ef,o=n(Cu),l=ef,u=_0,f=(x,P,...T)=>({type:x,props:P,children:T||[]});function v(x){var P=new DOMParser().parseFromString(x,"image/svg+xml");return P.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(P)}e.fixRatio=v;const w=async({element:x,page:P,store:T})=>{let{src:L}=x;if(x.type==="svg"){const Q=await o.urlToString(L);L=o.replaceColors(Q,new Map(Object.entries(x.colorsReplace)))}let M="";x.flipX&&(M+="scaleX(-1)"),x.flipY&&(M+="scaleY(-1)"),x.clipSrc&&await o.urlToBase64(x.clipSrc);const U=await(0,l.loadImage)(L),$=U.width*x.cropWidth,Z=U.height*x.cropHeight,B=x.width/x.height;let N,H;const R=$/Z;x.type==="svg"?(N=$,H=Z):B>=R?(N=$,H=$/B):(N=Z*B,H=Z);const D=N/U.width,z=H/U.height,F=N/H>x.width/x.height?x.height/H:x.width/N,V=N*F/D,Y=H*F/z,q=x.cropX*U.width*F,G=x.cropY*U.height*F,K=`clip-${x.id}`,X=L.replace(/&/g,"&");return f("g",{style:{transform:M}},f("defs",{},f("clipPath",{id:K},f("rect",{x:0,y:0,width:x.width,height:x.height}))),f("image",{"xlink:href":X,x:-q,y:-G,width:V,height:Y,preserveAspectRatio:"none","clip-path":`url(#${K})`}))},_=async({element:x,page:P,store:T})=>{const L=(B,N,H,R,D)=>{const z=document.createElement("canvas").getContext("2d");return z.font=`${D} ${R} ${N}px ${H}`,z.measureText(B).width},M=((B,N,H,R,D,z)=>{const F=[];return B.split(`
|
|
276
|
-
`).forEach(V=>{const Y=V.split(" ");let q="";for(let G=0;G<Y.length;G++){const K=q+Y[G]+" ";L(K,H,R,D,z)>N&&G>0?(F.push(q.trim()),q=Y[G]+" "):q=K}F.push(q.trim())}),F})(x.text,x.width,x.fontSize,x.fontFamily,x.fontWeight,x.fontStyle),U=x.fontSize*x.lineHeight,$=x.align==="center"?"middle":x.align==="right"?"end":"start",Z=M.map((B,N)=>f("tspan",{x:x.align==="center"?x.width/2:x.align==="right"?x.width:0,dy:N===0?0:U,innerHTML:B}));return f("g",{},f("text",{fill:x.fill,y:x.fontSize,"font-size":x.fontSize+"px","text-anchor":$,"font-family":x.fontFamily,"font-style":x.fontStyle,"font-weight":x.fontWeight,"text-decoration":x.textDecoration,"line-height":x.lineHeight,"letter-spacing":x.letterSpacing+"em","stroke-width":x.strokeWidth,stroke:x.stroke},...Z))},h=({element:x,type:P})=>{const T={"stroke-width":x.height,stroke:x.color,"line-cap":"round","stroke-linejoin":"round",opacity:x.opacity};return P==="arrow"||P==="triangle"?f("polyline",Object.assign({points:`${3*x.height},${2*-x.height} 0,0 ${3*x.height},${2*x.height}`},T)):P==="bar"?f("polyline",Object.assign({points:`0,${2*-x.height} 0,${2*x.height}`},T)):P==="circle"?f("circle",Object.assign({r:x.height},T)):P==="square"?f("polyline",Object.assign({points:`${-x.height},${-x.height} ${-x.height},${x.height} ${x.height},${x.height} ${x.height},${-x.height}`},T)):null},E=async({element:x,page:P,store:T})=>f("g",{},f("line",{x1:0,y1:x.height/2,x2:x.width,y2:x.height/2,stroke:x.color,"stroke-width":x.height}),f("g",{transform:`translate(0 ${x.height/2})`},h({element:x,type:x.startHead})),f("g",{transform:`translate(${x.width} ${x.height/2}) rotate(180)`},h({element:x,type:x.endHead}))),m=async({element:x,page:P,store:T,elementHook:L})=>{const M=await Promise.all(x.children.map($=>d({element:$,page:P,store:T,elementHook:L}))),U=f("g",{opacity:x.opacity,transform:`translate(${x.x}, ${x.y}) rotate(${x.rotation})`,style:{"transform-origin":"top left"}},...M);return L&&L({dom:U,element:x})||U};function y(x){let P=x.replace(/<svg[^>]*>/,"");return P=P.replace(/<\/svg>/,""),P}const p=async({element:x,page:P,store:T,elementHook:L})=>{const M=y((0,u.figureToSvg)(x)),U=f("g",{innerHTML:M});return L&&L({dom:U,element:x})||U},g={image:w,svg:w,text:_,line:E,figure:p,group:m};async function d({element:x,page:P,store:T,elementHook:L}){let M=await g[x.type];M||(M=()=>f("g",{}),console.error(`SVG export does not support ${x.type} type...`));const U=await M({element:x,page:P,store:T}),$=[];x.blurEnabled&&$.push(`blur(${x.blurRadius/2}px)`),x.brightnessEnabled&&$.push(`brightness(${100*x.brightness+100}%)`),x.sepiaEnabled&&$.push("sepia()"),x.grayscaleEnabled&&$.push("grayscale()"),x.shadowEnabled&&$.push(`drop-shadow(${x.shadowOffsetX}px ${x.shadowOffsetY}px ${x.shadowBlur}px ${x.shadowColor})`);const Z=f("g",{className:"element",id:x.id,transform:`translate(${x.x}, ${x.y}) rotate(${x.rotation})`,display:x.visible?void 0:"none",style:{"transform-origin":"top left",filter:$.join(" ")}},U);return L&&L({dom:Z,element:x})||Z}async function b({page:x,store:P,elementHook:T}){const L=await Promise.all(x.children.map(U=>d({element:U,page:x,store:P,elementHook:T})));let M={};if(x.background.indexOf("url")>=0||x.background.indexOf("http")>=0||x.background.indexOf(".jpg")>=0||x.background.indexOf(".png")>=0||x.background.indexOf(".jpeg")>=0){const U=await(0,l.loadImage)(x.background),$=await(0,l.cropImage)(x.background,Object.assign({width:P.width,height:P.height,x:0,y:0},(0,a.getCrop)({width:P.width,height:P.height},{width:U.width,height:U.height})));M=Object.assign(Object.assign({},M),{"background-image":`url(${$})`})}return f("g",{className:"page",style:Object.assign(Object.assign({},M),{background:x.background})},f("rect",{x:0,y:0,width:P.width,height:P.height,fill:x.background}),...L)}async function O({json:x,elementHook:P}){const T=await Promise.all(x.pages.map(U=>b({page:U,store:x,elementHook:P}))),L=[];x.pages.forEach(U=>{U.children.forEach($=>{$.type==="text"&&L.indexOf($.fontFamily)===-1&&L.push($.fontFamily)})});const M=L.map(U=>x.fonts.find($=>$.fontFamily===U)?f("style",{},""):f("defs",{},f("style",{type:"text/css",innerHTML:`@import url('https://fonts.googleapis.com/css?family=${U}:bi,normal,i,b');`.replace(/&/g,"&")})));return f("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${x.width} ${x.height}`},...M,...T)}e.jsonToDOM=O;const k=(x,P)=>typeof P=="object"?`${x}="${Object.keys(P).map(T=>`${T}:${P[T]};`).join(" ")}"`:P==null||P===""?"":`${x}="${P}"`,C=({dom:x,nestLevel:P=0})=>{if(typeof x=="string")return x;if(!x)return"";const T=x.props,{innerHTML:L}=T,M=i(T,["innerHTML"]),U=" ".repeat(P);return`${U}<${x.type} ${Object.keys(M).map($=>k($,M[$])).join(" ")}>${L||`
|
|
277
|
-
`+x.children.map($=>C({dom:$,nestLevel:P+1})).join("")}${U}</${x.type}>
|
|
278
|
-
`};async function S({json:x,elementHook:P}){const T=await O({json:x,elementHook:P});return C({dom:T})}e.jsonToSVG=S})(DS);var dv={},L_;function FS(){return L_||(L_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const t=$i,r=S0,n=tf(),i=B2(),a=tf(),o=Au;e.Page=t.types.model("Page",{id:t.types.identifier,children:t.types.array(t.types.late(()=>n.ElementTypes)),width:t.types.optional(t.types.union(t.types.number,t.types.literal("auto")),"auto"),height:t.types.optional(t.types.union(t.types.number,t.types.literal("auto")),"auto"),background:"white",bleed:0,custom:t.types.frozen(),duration:5e3,_exporting:!1,_rendering:!1}).postProcessSnapshot(l=>{const u=Object.assign({},l),f={};for(var v in u)v[0]!=="_"&&(f[v]=l[v]);return f}).views(l=>({get store(){return(0,t.getParentOfType)(l,i.Store)},get startTime(){let u=0;for(const f of l.store.pages){if(f.id===l.id)return u;u+=f.duration}return u},get _exportingOrRendering(){return l._exporting||l._rendering}})).views(l=>({get computedWidth(){return l.width==="auto"?l.store.width:l.width},get computedHeight(){return l.height==="auto"?l.store.height:l.height}})).actions(l=>({toJSON:()=>JSON.parse(JSON.stringify((0,t.getSnapshot)(l))),_forEachElementUp(u,f){const v=u.map(w=>({id:w,index:l.children.findIndex(_=>_.id===w)}));v.sort((w,_)=>_.index-w.index);for(const{index:w}of v){if(w==-1)continue;const _=w<l.children.length-1&&l.children[w+1],h=u.indexOf(_==null?void 0:_.id)>=0;w===l.children.length-1||h||f(w)}},_forEachElementDown(u,f){const v=u.map(w=>({id:w,index:l.children.findIndex(_=>_.id===w)}));v.sort((w,_)=>w.index-_.index);for(const{index:w}of v){if(w==-1)continue;const _=w>0&&l.children[w-1],h=u.indexOf(_==null?void 0:_.id)>=0;w===0||h||f(w)}return!1}})).actions(l=>({clone(u={}){const f=l.toJSON();f.children.forEach(h=>{h.id=(0,r.nanoid)(10),(0,a.forEveryChild)(h,E=>{E.id=(0,r.nanoid)(10)})});const v=Object.assign(Object.assign(Object.assign({},f),{id:(0,r.nanoid)(10)}),u),w=l.store.addPage(v),_=l.store.pages.indexOf(l);w.setZIndex(_+1),w.select()},setZIndex(u){l.store.setPageZIndex(l.id,u)},set(u){Object.assign(l,u)},select(){l.store.selectPage(l.id)},addElement(u,{skipSelect:f=!1}={}){const v=a.TYPES_MAP[u.type];if(!v)return void console.error("Can not find model with type "+u.type);u.children&&u.children.forEach(_=>{_.id=(0,r.nanoid)(10)});const w=v.create(Object.assign({id:(0,r.nanoid)(10)},u));return l.children.push(w),w.selectable&&!f&&l.store.selectElements([w.id]),w},canMoveElementsUp(u){let f=!1;return l._forEachElementUp(u,()=>{f=f||!0}),f},moveElementsUp(u){l._forEachElementUp(u,f=>{const v=l.children[f];(0,t.detach)(v),l.children.splice(f+1,0,v)})},canMoveElementsTop(u){return this.canMoveElementsUp(u)},moveElementsTop(u){const f=[],v=[];l.children.forEach(w=>{u.indexOf(w.id)>=0?f.push(w):v.push(w)}),l.children.replace(v.concat(f))},canMoveElementsDown(u){let f=!1;return l._forEachElementDown(u,()=>{f=f||!0}),f},moveElementsDown(u){l._forEachElementDown(u,f=>{const v=l.children[f];(0,t.detach)(v),l.children.splice(f-1,0,v)})},canMoveElementsBottom(u){return this.canMoveElementsDown(u)},moveElementsBottom(u){const f=[],v=[];l.children.forEach(w=>{u.indexOf(w.id)>=0?f.push(w):v.push(w)}),l.children.replace(f.concat(v))},setElementZIndex(u,f){const v=l.children.find(w=>w.id===u);v&&((0,t.detach)(v),l.children.remove(v),l.children.splice(f,0,v))},setSize({width:u,height:f,useMagic:v,softChange:w}){if(v){const _=[],h=M=>M.type==="image"&&M.x<1&&M.y<1&&M.width>=l.computedWidth-2&&M.height>=l.computedHeight-2;(0,a.forEveryChild)(l,M=>{M.type!=="group"&&(h(M)||_.push(M))});const E=(0,o.getTotalClientRect)(_),m=0,y=Math.max(0,Math.min(E.x,l.computedWidth-E.x-E.width)),p=l.computedWidth*m,g=Math.max(0,y-p),d=Math.max(0,Math.min(E.y,l.computedHeight-E.y-E.height)),b=l.computedHeight*m,O=Math.max(0,d-b),k=l.computedWidth-2*g,C=l.computedHeight-2*O,S=u/k,x=f/C,P=Math.min(S,x),T=(u-k*P)/2-g*P,L=(f-C*P)/2-O*P;(0,a.forEveryChild)(l,M=>{M.type!=="group"&&(h(M)?M.set({x:M.x*P,y:M.y*P,width:M.width*S,height:M.height*x,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(M.set({x:T+M.x*P,y:L+M.y*P,width:M.width*P,height:M.height*P}),M.type==="text"?M.set({fontSize:M.fontSize*P}):M.type==="figure"&&M.set({strokeWidth:M.strokeWidth*P})))})}w||(l.width=u),w||(l.height=f)}})).actions(l=>({moveElementUp(u){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),l.moveElementsUp([u])},moveElementDown(u){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),l.moveElementsDown([u])},moveElementTop(u){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),l.moveElementsTop([u])},moveElementBottom(u){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),l.moveElementsBottom([u])},play(){l.store.play({startTime:l.startTime,endTime:l.startTime+l.duration})}}))}(dv)),dv}var M_;function B2(){return M_||(M_=1,function(e){var t=we&&we.__createBinding||(Object.create?function(S,x,P,T){T===void 0&&(T=P);var L=Object.getOwnPropertyDescriptor(x,P);L&&!("get"in L?!x.__esModule:L.writable||L.configurable)||(L={enumerable:!0,get:function(){return x[P]}}),Object.defineProperty(S,T,L)}:function(S,x,P,T){T===void 0&&(T=P),S[T]=x[P]}),r=we&&we.__setModuleDefault||(Object.create?function(S,x){Object.defineProperty(S,"default",{enumerable:!0,value:x})}:function(S,x){S.default=x}),n=we&&we.__importStar||function(S){if(S&&S.__esModule)return S;var x={};if(S!=null)for(var P in S)P!=="default"&&Object.prototype.hasOwnProperty.call(S,P)&&t(x,S,P);return r(x,S),x},i=we&&we.__rest||function(S,x){var P={};for(var T in S)Object.prototype.hasOwnProperty.call(S,T)&&x.indexOf(T)<0&&(P[T]=S[T]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function"){var L=0;for(T=Object.getOwnPropertySymbols(S);L<T.length;L++)x.indexOf(T[L])<0&&Object.prototype.propertyIsEnumerable.call(S,T[L])&&(P[T[L]]=S[T[L]])}return P},a=we&&we.__importDefault||function(S){return S&&S.__esModule?S:{default:S}};Object.defineProperty(e,"__esModule",{value:!0}),e.createStore=e.Store=e.Font=void 0;const o=$i,l=kS,u=S0,f=a(Gi),v=RS,w=LS,_=MS,h=j2(),E=n(xu),m=ua,y=w0,p=z2,g=NS,d=IS,b=DS,O=FS(),k=tf();function C({key:S,showCredit:x}={key:"",showCredit:!1}){const P=e.Store.create();return(0,h.validateKey)(S,x),P}(0,o.setLivelinessChecking)("ignore"),e.Font=o.types.model("Font",{fontFamily:o.types.string,url:o.types.optional(o.types.string,""),styles:o.types.frozen()}).preProcessSnapshot(S=>Object.assign(Object.assign({},S),{fontFamily:S.fontFamily||S.name})),e.Store=o.types.model("Store",{role:"",pages:o.types.array(O.Page),fonts:o.types.array(e.Font),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:o.types.frozen(),selectedElementsIds:o.types.array(o.types.string),animatedElementsIds:o.types.array(o.types.string),history:o.types.optional(l.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:2,_activePageId:""}).views(S=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),S.bleedVisible},get selectedElements(){return S.selectedElementsIds.map(x=>{for(const P of S.pages)for(const T of P.children)if(T.id===x)return T}).filter(x=>!!x)},get children(){return S.pages},get selectedShapes(){const x=[];return(0,k.forEveryChild)({children:S.selectedElements},P=>{P.type!=="group"&&x.push(P)}),x},get activePage(){return S.pages.slice().find(x=>x.id===S._activePageId)||(S.pages.length?S.pages[0]:null)},get duration(){let x=0;return S.pages.forEach(P=>{x+=P.duration}),x},get _hasCroppedImages(){return S.find(x=>x.type==="image"&&x._cropModeEnabled)},find(x){let P;return(0,k.forEveryChild)({children:S.pages},T=>{if(!P&&x(T))return P=T,!0}),P},getElementById:x=>S.find(P=>P.id===x)})).actions(S=>{let x=0,P=null,T=!1;return{afterCreate(){S.history.canUndo},setCurrentTime(L){S.currentTime=L},play({animatedElementsIds:L=[],startTime:M=0,currentTime:U=0,endTime:$=S.duration,repeat:Z=!1}={}){U&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),M=U),S.animatedElementsIds=(0,o.cast)(L),S.currentTime=M,S.isPlaying=!0,x=Date.now(),P=$,T=Z,requestAnimationFrame(S.seek)},checkActivePage(){let L=0;for(const M of S.pages){if(S.currentTime>=M.startTime&&S.currentTime<M.startTime+M.duration){S.selectPage(M.id);break}L+=M.duration}},seek(){if(!S.isPlaying)return;const L=Date.now(),M=L-x;x=L,S.currentTime+=M,S.checkActivePage();const U=P||S.duration;S.isPlaying&&S.currentTime<U?requestAnimationFrame(S.seek):S.isPlaying&&T?(S.currentTime=0,requestAnimationFrame(S.seek)):S.stop()},stop(){S.isPlaying=!1,S.currentTime=0,S.animatedElementsIds=(0,o.cast)([]),S.checkActivePage()}}}).actions(S=>({set(x){Object.assign(S,x)},setUnit({unit:x,dpi:P}){S.unit=x||S.unit,S.dpi=P||S.dpi},setRole(x){S.role=x},addPage(x){const P=O.Page.create(Object.assign({id:(0,u.nanoid)(10)},x));return S.pages.push(P),S._activePageId=P.id,P},selectPage(x){S._activePageId=x},selectElements(x){const P=x.map(T=>S.getElementById(T)).sort((T,L)=>T.page.children.indexOf(T)-T.page.children.indexOf(L)).filter(T=>!!T).map(T=>T.id);S.selectedElementsIds=(0,o.cast)(P)},toggleBleed(x){S.bleedVisible=x??!S.bleedVisible},toggleRulers(x){S.rulesVisible=x??!S.rulesVisible},openSidePanel(x){S.openedSidePanel!==x&&(S.previousOpenedSidePanel=S.openedSidePanel,S.openedSidePanel=x)},setScale(x){S.scale=x},_setScaleToFit(x){S.scaleToFit=x},setElementsPixelRatio(x){S._elementsPixelRatio=x},setSize(x,P,T){S.pages.forEach(L=>{L.setSize({width:x,height:P,useMagic:T,softChange:!0})}),S.width=x,S.height=P},setPageZIndex(x,P){const T=S.pages.find(L=>L.id===x);T&&((0,o.detach)(T),S.pages.remove(T),S.pages.splice(P,0,T))},deletePages(x){const P=S.pages.indexOf(S.activePage);x.forEach(M=>{const U=S.pages.find($=>$.id===M);(0,o.destroy)(U)});const T=Math.min(S.pages.length-1,P),L=S.pages[T];L&&(S._activePageId=L.id),S.selectedElementsIds=(0,o.cast)(S.selectedElementsIds.filter(M=>S.getElementById(M)))},groupElements(x){const P=x.map(M=>S.getElementById(M));P.forEach(M=>{M&&(0,o.detach)(M)});const T=S.activePage,L={id:(0,u.nanoid)(10),children:P,type:"group"};return T.children.push(L),S.selectedElementsIds=(0,o.cast)([L.id]),L},ungroupElements(x){const P=x.map(L=>S.getElementById(L)),T=[];P.forEach(L=>{if(L&&L.type==="group"){const M=L.page,U=M.children.indexOf(L);L.children.forEach($=>{T.push($.id)}),L.children.forEach($=>{(0,o.detach)($),M.children.push($)}),M.children.splice(U,1)}}),S.selectedElementsIds=(0,o.cast)(T)},deleteElements(x){const P=[];S.find(T=>(x.includes(T.id)&&P.push(T),!1)),P.forEach(T=>{(0,o.destroy)(T)}),S.selectedElementsIds=(0,o.cast)(S.selectedElementsIds.filter(T=>S.getElementById(T)))},on(x,P){if(x==="change"){let T=S.toJSON();return(0,o.onSnapshot)(S,L=>{const M=S.toJSON();!(0,p.deepEqual)(T,M)&&(T=M,P(M))})}},async _toCanvas({pixelRatio:x,ignoreBackground:P,pageId:T,mimeType:L,includeBleed:M,_skipTimeout:U}={}){var $;const Z=x||1;T=T||(($=S.pages[0])===null||$===void 0?void 0:$.id);const B=S.pages.find(oe=>oe.id===T);if(!B)throw new Error(`No page for export with id ${T}`);B==null||B.set({_exporting:!0});const N=await(0,g.waitTillAvailable)(()=>f.default.stages.find(oe=>oe.getAttr("pageId")===T));if(!N)throw new Error(`Export is failed. Can not find stage for page ${T}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const H=!!N.findOne(".page-container"),R=S._elementsPixelRatio;Z>S._elementsPixelRatio&&S.setElementsPixelRatio(Z),await S.waitLoading({_skipTimeout:U});const D=N.findOne(".page-container");if(!D)throw S.setElementsPixelRatio(R),new Error(`Export is failed. Can't find page container. ${H}`);N.find("Transformer").forEach(oe=>oe.visible(!1)),D.find(".page-background").forEach(oe=>oe.shadowEnabled(!1)),D.find(".page-background").forEach(oe=>oe.strokeEnabled(!1)),D.find(".highlighter").forEach(oe=>oe.visible(!1));const z=D.findOne(".page-background-group"),F=z.clip();z.clip({x:null,y:null,width:null,height:null});const V=D.findOne(".elements-container"),Y=V.clip();V.clip({x:null,y:null,width:null,height:null});const q=D.find(oe=>oe.getAttr("hideInExport"));q.forEach(oe=>{oe.setAttr("oldVisible",oe.visible()),oe.hide()});const G=D.find(oe=>!oe.visible()&&oe.getAttr("editModeEnabled"));G.forEach(oe=>{oe.setAttr("oldVisible",oe.visible()),oe.show()}),P&&D.find(".page-background").forEach(oe=>oe.hide());const K=M?B.bleed:0;let X=K;!S.bleedVisible&&M||(S.bleedVisible||M?S.bleedVisible&&M?X=0:S.bleedVisible&&!M&&(X=-B.bleed):X=0);const Q=document.createElement("canvas");Q.width=Math.round((B.computedWidth+2*K)*Z),Q.height=Math.round((B.computedHeight+2*K)*Z);const te=Q.getContext("2d");L==="image/jpeg"&&(te.fillStyle="white",te.fillRect(0,0,Q.width,Q.height));const ee=D.scale();D.scale({x:1,y:1});const ae=D.toCanvas({x:D.x()-X,y:D.y()-X,width:B.computedWidth+2*K,height:B.computedHeight+2*K,pixelRatio:Z});return D.scale(ee),te.drawImage(ae,0,0,Q.width,Q.height),f.default.Util.releaseCanvas(ae),P&&D.find(".page-background").forEach(oe=>oe.show()),q.forEach(oe=>{oe.visible(oe.getAttr("oldVisible"))}),G.forEach(oe=>{oe.visible(oe.getAttr("oldVisible"))}),D.find(".page-background").forEach(oe=>oe.shadowEnabled(!0)),D.find(".page-background").forEach(oe=>oe.strokeEnabled(!0)),N.find("Transformer").forEach(oe=>oe.visible(!0)),D.find(".highlighter").forEach(oe=>oe.visible(!0)),z.clip(F),V.clip(Y),S.setElementsPixelRatio(R),B==null||B.set({_exporting:!1}),Q},async toDataURL(x={}){var{mimeType:P,quality:T}=x,L=i(x,["mimeType","quality"]);const M=await S._toCanvas(Object.assign({mimeType:P},L)),U=M.toDataURL(P,T);return f.default.Util.releaseCanvas(M),U},async toBlob(x={}){var{mimeType:P,quality:T}=x,L=i(x,["mimeType","quality"]);const M=await S._toCanvas(Object.assign({mimeType:P},L)),U=new Promise($=>{M.toBlob($,P,T)});return f.default.Util.releaseCanvas(M),U},async saveAsImage(x={}){var{fileName:P}=x,T=i(x,["fileName"]);const L=T.mimeType||"image/png",M=L.split("/")[1];(0,v.downloadFile)(await S.toDataURL(T),P||"polotno."+M,L)},async _toPDF(x){const P=x.dpi||S.dpi,T=x.parallel||1,L=x.unit||(S.unit==="px"?"mm":S.unit),M=x.pixelRatio||1,U=x.pageIds||S.pages.map(Y=>Y.id),$=S.pages.filter(Y=>U.includes(Y.id)),Z=await(0,w.getJsPDF)(),B=Y=>(0,y.pxToUnit)({px:Y,unit:L,dpi:P}),N=B(x.cropMarkSize||0),H=$[0]||{},R=x.includeBleed?H.bleed:0,D=B(H.computedWidth+2*R)+2*N,z=B(H.computedHeight+2*R)+2*N;var F=new Z({unit:L,orientation:D>z?"landscape":"portrait",format:[D,z],compress:!0,putOnlyUsedFonts:!0});F.deletePage(1);const V=((Y,q)=>{for(var G=[],K=0;K<Y.length;K+=q)G.push(Y.slice(K,K+q));return G})($,T);for(const Y of V){const q=Y.map(async G=>{const K=x.includeBleed?G.bleed:0,X=B(G.computedWidth+2*K)+2*N,Q=B(G.computedHeight+2*K)+2*N;let te=0,ee=M;for(;te<10;){te+=1,te===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const ae=await S.toDataURL(Object.assign(Object.assign({},x),{pageId:G.id,pixelRatio:ee}));if(ae.length>20)return{url:ae,width:X,height:Q};ee*=.8}});(await Promise.all(q)).forEach(({url:G,width:K,height:X})=>{F.addPage([K,X],K>X?"landscape":"portrait"),N&&(F.setLineWidth(B(1)),F.line(2*N,0,2*N,N),F.line(0,2*N,N,2*N),F.line(K-2*N,0,K-2*N,N),F.line(K,2*N,K-N,2*N),F.line(0,X-2*N,N,X-2*N),F.line(2*N,X,2*N,X-N),F.line(K,X-2*N,K-N,X-2*N),F.line(K-2*N,X,K-2*N,X-N)),F.addImage(G,N,N,K-2*N,X-2*N,void 0,"FAST")})}return F},toPDFDataURL:async x=>(await S._toPDF(Object.assign({mimeType:"image/jpeg"},x))).output("datauristring"),async toGIFDataURL(x={}){const P=x.pixelRatio||1,T=await(0,_.createGIF)({width:S.width*P,height:S.height*P}),L=1e3/(x.fps||10),M=S.duration/L;for(let U=0;U<M-1;U++){const $=U*L||1;S.setCurrentTime($);let Z=0,B="";for(const H of S.pages)if(Z+=H.duration,H.set({_rendering:Z>$}),Z>$){B=H.id;break}const N=await S._toCanvas({pixelRatio:P,pageId:B,_skipTimeout:!0});T.addFrame(N.getContext("2d"),{delay:L,copy:!0})}for(const U of S.pages)U.set({_rendering:!1});return S.stop(),T.render(),new Promise(U=>{T.on("finished",function($){(function(Z,B){var N=new FileReader;N.onload=function(H){B(H.target.result)},N.readAsDataURL(Z)})($,U)})})},async saveAsGIF(x={}){var{fileName:P}=x,T=i(x,["fileName"]);const L=await S.toGIFDataURL(T);(0,v.downloadFile)(L,P||"polotno.gif")},async toHTML({elementHook:x}={elementHook:void 0}){const P=S.toJSON();return(0,d.jsonToHTML)({json:P,elementHook:x})},async saveAsHTML({fileName:x}={}){const P=await S.toHTML(),T="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(P)));(0,v.downloadFile)(T,x||"polotno.html")},async toSVG({elementHook:x}={elementHook:void 0}){const P=S.toJSON();return(0,b.jsonToSVG)({json:P,elementHook:x})},async saveAsSVG({fileName:x,elementHook:P}={}){const T=await S.toSVG({elementHook:P}),L="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(T)));(0,v.downloadFile)(L,x||"polotno.svg")},async saveAsPDF(x={}){var{fileName:P}=x,T=i(x,["fileName"]);(await S._toPDF(Object.assign({mimeType:"image/jpeg"},T))).save(P||"polotno.pdf")},async waitLoading({_skipTimeout:x=!1}={}){x||await new Promise(P=>setTimeout(P,50)),await(0,m.whenLoaded)()},toJSON:()=>({width:S.width,height:S.height,fonts:(0,o.getSnapshot)(S.fonts),pages:(0,o.getSnapshot)(S.pages),unit:S.unit,dpi:S.dpi,custom:S.custom}),loadJSON(x,P=!1){var T;const L=Object.assign({},x),M=S.pages.indexOf(S.activePage);let U=(T=L.pages[M]||L.pages[0])===null||T===void 0?void 0:T.id;L._activePageId=U;const $=Object.assign({},(0,o.getSnapshot)(S));Object.assign($,L),$.history=P?S.history.toJSON():{history:[],undoIdx:-1},(0,o.applySnapshot)(S,$)},clear({keepHistory:x=!1}={}){const P=S.pages.map(T=>T.id);S.deletePages(P),x||S.history.clear()},addFont(x){S.removeFont(x.fontFamily),S.fonts.push(x),S.loadFont(x.fontFamily)},removeFont(x){S.fonts.filter(P=>P.fontFamily===x).forEach(P=>(0,o.destroy)(P))},async loadFont(x){const P=S.fonts.find(T=>T.fontFamily===x)||E.globalFonts.find(T=>T.fontFamily===x);P?E.injectCustomFont(P):E.injectGoogleFont(x),await E.loadFont(x)},validate:x=>e.Store.validate(x,[{path:"",type:e.Store}]).map(P=>({path:"store"+P.context.map(T=>T.path).join("."),message:P.message}))})),e.createStore=C,e.default=C}(fv)),fv}var N_;function jS(){return N_||(N_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const t=$i,r=S0,n=B2(),i=FS(),a=tf();e.Node=t.types.model("Node",{id:t.types.identifier,type:"none",name:"",opacity:1,custom:t.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(o=>{for(var l in o)o[l]===null&&(o[l]=void 0);return o}).postProcessSnapshot(o=>{const l=Object.assign({},o),u={};for(var f in l)f[0]!=="_"&&(u[f]=o[f]);return u}).views(o=>({get locked(){return!(o.draggable||o.contentEditable||o.styleEditable||o.resizable)},get page(){return(0,t.getParentOfType)(o,i.Page)},get store(){return(0,t.getParentOfType)(o,n.Store)},get top(){let l=o;for(;;){if(!(0,t.hasParentOfType)(l,a.GroupElement))return l;l=(0,t.getParentOfType)(l,a.GroupElement)}},get parent(){return(0,t.hasParentOfType)(o,a.GroupElement)?(0,t.getParentOfType)(o,a.GroupElement):(0,t.hasParentOfType)(o,i.Page)?(0,t.getParentOfType)(o,i.Page):(0,t.hasParentOfType)(o,n.Store)?(0,t.getParentOfType)(o,n.Store):null},get zIndex(){return o.parent.children.indexOf(o)}})).actions(o=>({toJSON:()=>Object.assign({},(0,t.getSnapshot)(o))})).actions(o=>({clone(l={},{skipSelect:u=!1}={}){const f=JSON.parse(JSON.stringify(o.toJSON()));return l.id=l.id||(0,r.nanoid)(10),(0,a.forEveryChild)(f,v=>{v.id=(0,r.nanoid)(10)}),Object.assign(f,l),o.page.addElement(f,{skipSelect:u})},set(l){Object.assign(o,l)},moveUp(){o.page.moveElementsUp([o.id])},moveTop(){o.page.moveElementsTop([o.id])},moveDown(){o.page.moveElementsDown([o.id])},moveBottom(){o.page.moveElementsBottom([o.id])},setZIndex(l){o.parent.setElementZIndex(o.id,l)},beforeDestroy(){}}))}(cv)),cv}var hv={},zS={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const t=Au,r={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}}};e.animations={fade:({dTime:a,element:o,animation:l})=>{const u=a/l.duration;return l.type==="enter"?{opacity:u*o.opacity}:{opacity:(1-u)*o.opacity}},rotate:({dTime:a,element:o,animation:l})=>{const u=a/l.duration*360;return(0,t.rotateAroundCenter)({x:o.x,y:o.y,width:o.width,height:o.height,rotation:o.rotation},u)},blink:({dTime:a,element:o,animation:l})=>{const u=l.duration,f=a%u/(u/2),v=f<=1?f:2-f;return{opacity:o.opacity*v}},bounce:({dTime:a,element:o,animation:l})=>{const u=l.duration,f=u/2,v={},w={x:o.x+o.width/3,y:o.y+o.height/3,width:o.width/3,height:o.height/3,fontSize:o.fontSize/3},_={x:o.x,y:o.y,width:o.width,height:o.height,fontSize:o.fontSize},h=a%u/f,E=h<=1?h:2-h;for(let m in w){const y=w[m],p=_[m]-y;v[m]=y+E*p}return v},move:({dTime:a,element:o,animation:l})=>{const u=r[l.data.direction]||r.right,f={};for(var v in u.from){let w=u.from[v],_=u.to[v];l.type==="exit"&&(w=u.to[v],_=-u.from[v]);const h=o[v]+w,E=o[v]+_-h;f[v]=h+a/l.duration*E}return f},zoom:({dTime:a,element:o,animation:l})=>{const u={},f={x:o.x+o.width/3,y:o.y+o.height/3,width:o.width/3,height:o.height/3,fontSize:o.fontSize/3},v={x:o.x,y:o.y,width:o.width,height:o.height,fontSize:o.fontSize};for(var w in f){let _=f[w],h=v[w];if(l.type==="exit"){const m=_;_=h,h=m}const E=h-_;u[w]=_+a/l.duration*E}return u}};const n=({element:a,dTime:o,animation:l})=>{const u=e.animations[l.name];return u?u({element:a,dTime:o,animation:l}):(console.error("Can not find animation type: "+l.name),{})};e.animate=n;const i=(a,o)=>{};e.registerAnimation=i})(zS);var I_;function ku(){return I_||(I_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.Animation=void 0;const t=$i,r=zS,n=ha,i=jS();e.Animation=t.types.model("Animation",{delay:0,duration:500,enabled:!0,type:t.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:t.types.frozen({})}),e.Shape=i.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:t.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,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(a=>{const o=Object.assign(Object.assign({},a),{x:a.x||0,y:a.y||0});return"width"in a&&(o.width=o.width||1),"height"in a&&(o.height=o.height||1),a.locked&&(o.draggable=!1,o.contentEditable=!1,o.styleEditable=!1,o.resizable=!1),o}).views(a=>{const o=(0,n.observable)({x:a.x,y:a.y,width:a.width,height:a.height,rotation:a.rotation,opacity:a.opacity,color:a.color,fontSize:a.fontSize}),l=(0,n.action)(u=>{Object.assign(o,u)});return{get a(){const{currentTime:u}=a.store;if(l({x:a.x,y:a.y,width:a.width,height:a.height,rotation:a.rotation,opacity:a.opacity,color:a.color,fontSize:a.fontSize}),u===0)return o;const f=u-a.page.startTime;if(f>a.page.duration||f<0)return o;const v=a.store.animatedElementsIds;if(v.length&&!v.includes(a.id))return o;const w=a.animations.find(E=>E.type==="enter");if(w!=null&&w.enabled&&f<w.delay&&l({opacity:0}),w!=null&&w.enabled&&f>=w.delay&&f<=w.delay+w.duration){const E=f-w.delay,m=(0,r.animate)({element:a,animation:w,dTime:E});l(m)}const _=a.animations.find(E=>E.type==="exit");if(_!=null&&_.enabled&&f>=a.page.duration-_.duration-_.delay&&f<=a.page.duration-_.delay){const E=f-(a.page.duration-_.duration),m=(0,r.animate)({element:a,animation:_,dTime:E});l(m)}const h=a.animations.find(E=>E.type==="loop");if(h!=null&&h.enabled){const E=f,m=(0,r.animate)({element:a,animation:h,dTime:E});l(m)}return o},animated:u=>a.a[u]}}).actions(a=>({setAnimation(o,l){const u=a.animations.find(f=>f.type===o);u?Object.assign(u,l):a.animations.push(Object.assign({type:o},l))}}))}(hv)),hv}var pv={},D_;function sF(){return D_||(D_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const t=$i,r=ku();e.TextElement=r.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:t.types.optional(t.types.union(t.types.number,t.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(n=>Object.assign({},n)).actions(n=>({toggleEditMode(i){n._editModeEnabled=i??!n._editModeEnabled,n._editModeEnabled?n.store.history.startTransaction():n.store.history.endTransaction()}}))}(pv)),pv}var gv={},F_;function BS(){return F_||(F_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const t=ku();e.ImageElement=t.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(r=>({toggleCropMode(n){r._cropModeEnabled=n??!r._cropModeEnabled,r._cropModeEnabled?r.store.history.startTransaction():r.store.history.endTransaction()},beforeDestroy(){r._cropModeEnabled&&r.store.history.endTransaction()}}))}(gv)),gv}var vv={},j_;function uF(){return j_||(j_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const t=BS();e.VideoElement=t.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1})}(vv)),vv}var mv={},z_;function cF(){return z_||(z_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const t=$i,r=ku();e.LineElement=r.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:t.types.array(t.types.number),startHead:"",endHead:""}).actions(n=>({}))}(mv)),mv}var yv={},B_;function fF(){return B_||(B_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const t=$i,r=ku();e.SVGElement=r.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:t.types.map(t.types.string)}).preProcessSnapshot(n=>Object.assign(Object.assign({},n),{src:n.src||n.svgSource})).actions(n=>({replaceColor(i,a){n.colorsReplace.set(i,a)}}))}(yv)),yv}var bv={},U_;function dF(){return U_||(U_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=$i,r=ku();e.FigureElement=r.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:t.types.array(t.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(bv)),bv}var H_;function tf(){return H_||(H_=1,function(e){var t=we&&we.__rest||function(y,p){var g={};for(var d in y)Object.prototype.hasOwnProperty.call(y,d)&&p.indexOf(d)<0&&(g[d]=y[d]);if(y!=null&&typeof Object.getOwnPropertySymbols=="function"){var b=0;for(d=Object.getOwnPropertySymbols(y);b<d.length;b++)p.indexOf(d[b])<0&&Object.prototype.propertyIsEnumerable.call(y,d[b])&&(g[d[b]]=y[d[b]])}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeModel=e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0;const r=$i,n=S0,i=jS(),a=ku(),o=sF(),l=BS(),u=uF(),f=cF(),v=fF(),w=dF(),_=(y,p)=>{if(y.children)for(const g of y.children){if(p(g)===!0)break;(0,e.forEveryChild)(g,p)}};e.forEveryChild=_;const h=[...new Array(20)].map((y,p)=>r.types.late(()=>E[p]));e.ElementTypes=r.types.union({dispatcher:y=>{const p=e.TYPES_MAP[y.type];if(!p)throw new Error(`Unknown element type: "${y.type}"`);return p}},v.SVGElement,o.TextElement,l.ImageElement,f.LineElement,u.VideoElement,w.FigureElement,r.types.late(()=>e.GroupElement),...h),e.GroupElement=i.Node.named("Group").props({type:"group",children:r.types.array(e.ElementTypes)}).views(y=>({get draggable(){let p=!0;return(0,e.forEveryChild)(y,g=>{g.draggable||(p=!1)}),p},get resizable(){let p=!0;return(0,e.forEveryChild)(y,g=>{g.resizable||(p=!1)}),p},get contentEditable(){let p=!0;return(0,e.forEveryChild)(y,g=>{g.contentEditable||(p=!1)}),p},get styleEditable(){let p=!0;return(0,e.forEveryChild)(y,g=>{g.styleEditable||(p=!1)}),p},get locked(){let p=!0;return(0,e.forEveryChild)(y,g=>{g.locked||(p=!1)}),p}})).actions(y=>({set(p){var{draggable:g,contentEditable:d,styleEditable:b,resizable:O}=p,k=t(p,["draggable","contentEditable","styleEditable","resizable"]);g!==void 0&&(0,e.forEveryChild)(y,C=>{C.set({draggable:g})}),d!==void 0&&(0,e.forEveryChild)(y,C=>{C.set({contentEditable:d})}),b!==void 0&&(0,e.forEveryChild)(y,C=>{C.set({styleEditable:b})}),O!==void 0&&(0,e.forEveryChild)(y,C=>{C.set({resizable:O})}),Object.assign(y,k)},addElement(p,{skipSelect:g=!1}={}){const d=e.TYPES_MAP[p.type];if(!d)return void console.error("Can not find model with type "+p.type);p.children&&p.children.forEach(O=>{O.id=(0,n.nanoid)(10)});const b=d.create(Object.assign({id:(0,n.nanoid)(10)},p));return y.children.push(b),b.selectable&&!g&&y.store.selectElements([b.id]),b},setElementZIndex(p,g){const d=y.children.find(b=>b.id===p);d&&((0,r.detach)(d),y.children.remove(d),y.children.splice(g,0,d))}}));const E=[];function m(y,p){const g=y.type;if(!g)throw new Error('You must pass "type" attribute to custom model.');let d=a.Shape.named(g).props(y);p&&(d=p(d)),e.TYPES_MAP[g]=d,E.push(d)}e.TYPES_MAP={svg:v.SVGElement,text:o.TextElement,image:l.ImageElement,group:e.GroupElement,line:f.LineElement,video:u.VideoElement,figure:w.FigureElement},e.registerShapeModel=m}(uv)),uv}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=void 0;const t=tf();let r=[],n="";const i="polotno_clipboard",a=u=>{r=JSON.parse(JSON.stringify(u));try{localStorage.setItem(i,JSON.stringify(u))}catch{}},o=()=>{try{const u=localStorage.getItem(i);if(u)return JSON.parse(u)}catch{}return r};function l(u,f){var v,w,_,h,E,m,y,p;if(((v=document.activeElement)===null||v===void 0?void 0:v.tagName)==="INPUT"||((w=document.activeElement)===null||w===void 0?void 0:w.tagName)==="TEXTAREA"||((_=document.activeElement)===null||_===void 0?void 0:_.contentEditable)==="true")return;const g=f.selectedElements.filter(k=>k.removable),d=g.map(k=>k.id);u.keyCode!==46&&u.keyCode!==8||f.deleteElements(d);const b=u.ctrlKey||u.metaKey,O=u.shiftKey;if(b&&!O&&u.code==="KeyZ"&&(u.preventDefault(),f.history.undo()),b&&O&&u.code==="KeyZ"&&(u.preventDefault(),f.history.redo()),b&&u.code==="KeyA"){u.preventDefault();const k=(h=f.activePage)===null||h===void 0?void 0:h.children.filter(S=>S.selectable),C=(k==null?void 0:k.map(S=>S.id))||[];f.selectElements(C)}if(b&&u.code==="KeyC"&&(u.preventDefault(),n=(E=f.activePage)===null||E===void 0?void 0:E.id,a(f.selectedElements.map(k=>k.toJSON()))),b&&u.code==="KeyX"&&(u.preventDefault(),n=(m=f.activePage)===null||m===void 0?void 0:m.id,a(f.selectedElements.map(k=>k.toJSON())),f.deleteElements(g)),b&&u.code==="KeyV"){u.preventDefault();let k=0;n===((y=f.activePage)===null||y===void 0?void 0:y.id)&&(k=f.width/20),n=(p=f.activePage)===null||p===void 0?void 0:p.id,f.history.transaction(()=>{const C=[],S=o();(0,t.forEveryChild)({children:S},x=>{delete x.id,x.type!=="group"&&(x.x+=k,x.y+=k)}),S.forEach(x=>{var P;const T=(P=f.activePage)===null||P===void 0?void 0:P.addElement(x);T&&C.push(T.id)}),a(S),f.selectElements(C)})}u.code==="ArrowDown"&&(u.preventDefault(),f.selectedElements.forEach(k=>{k.set({y:k.y+1})})),u.code==="ArrowUp"&&(u.preventDefault(),f.selectedElements.forEach(k=>{k.set({y:k.y-1})})),u.code==="ArrowLeft"&&(u.preventDefault(),f.selectedElements.forEach(k=>{k.set({x:k.x-1})})),u.code==="ArrowRight"&&(u.preventDefault(),f.selectedElements.forEach(k=>{k.set({x:k.x+1})}))}e.handleHotkey=l})(CS);var US={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const t=ha,r=(0,t.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",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",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear"}},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:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",layers:"Layers",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"}});function n(f,v){var w,_=v.split("."),h=f;for(w=0;w<_.length;++w){if(h[_[w]]==null)return;h=h[_[w]]}return h}const i=f=>f&&typeof f=="object";function a(f,v){Object.keys(v).forEach(w=>{const _=f[w],h=v[w];i(h)&&i(_)?a(_,h):f[w]=h})}e.setTranslations=(0,t.action)(f=>{a(r,f)});const o=()=>(0,t.toJS)(r);e.getTranslations=o;const l={},u=f=>{const v=n(r,f);if(v!==void 0)return v;l[f]||(l[f]=!0,console.warn(`Missing translation '${f}'`));const w=f.split("."),_=w[w.length-1]||" ";return _.charAt(0).toUpperCase()+_.slice(1)};e.t=u})(US);(function(e){var t=we&&we.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const r=t(at),n=Ui,i=t(v9),a=PS,o=CS,l=US,u=`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
279
|
-
Width or height of parent elements is equal 0.
|
|
280
|
-
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
281
|
-
For simpler debugging here is the log of the parent element:`,f=(h,E,m,y,p,g)=>{const d=r.default.useRef({width:E,height:m}),b=r.default.useRef({top:0,left:0}),O=r.default.useRef(!1),k=r.default.useRef(p.pages.length);O.current=k.current!==p.pages.length,k.current=p.pages.length,r.default.useEffect(()=>{const C=h.current,S=x=>{b.current={top:C.scrollTop,left:C.scrollLeft}};return C.addEventListener("scroll",S),()=>{C.removeEventListener("scroll",S)}},[]),r.default.useLayoutEffect(()=>{if(!h.current||O.current)return;const C=h.current,S=(b.current.left+C.offsetWidth/2)/d.current.width,x=(b.current.top+C.offsetHeight/2)/d.current.height;g.current=!0,C.scrollLeft=S*E-C.offsetWidth/2,C.scrollTop=x*m-C.offsetHeight/2,d.current={width:E,height:m}},[y,E,m])},v=(h,E,m,y,p)=>{const g=r.default.useRef(!1),d=r.default.useRef(null);r.default.useEffect(()=>{const O=h.current,k=()=>{p.current};return O.addEventListener("scroll",k),()=>{O.removeEventListener("scroll",k)}},[]);const b=m.pages.indexOf(m.activePage);return r.default.useLayoutEffect(()=>{if(!m.activePage||!h.current||g.current)return;const O=h.current,k=m.pages.indexOf(m.activePage)*E;Math.abs(k-O.scrollTop)>.5*E&&(p.current=!0,O.scrollTop=k)},[m.activePage,b]),{handleScroll:O=>{if(p.current)return void(p.current=!1);g.current=!0,clearTimeout(d.current),d.current=setTimeout(()=>{g.current=!1},300);const k=O.currentTarget.childNodes[0].offsetHeight,C=O.currentTarget.scrollTop,S=Math.floor((C+y.height/3)/k),x=m.pages[S];x&&x.select()}}},w=({store:h})=>r.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},r.default.createElement("p",null,(0,l.t)("workspace.noPages")),r.default.createElement("button",{onClick:()=>{h.addPage()}},(0,l.t)("workspace.addPage"))),_=({width:h,height:E,xPadding:m,yPadding:y,backgroundColor:p})=>r.default.createElement("div",{style:{width:h+"px",height:E+"px",backgroundColor:p,paddingLeft:m+"px",paddingRight:m+"px",paddingTop:y+"px",paddingBottom:y+"px"}},r.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:h,pageControlsEnabled:E,backgroundColor:m,pageBorderColor:y,activePageBorderColor:p,bleedColor:g,components:d,onKeyDown:b,paddingX:O,paddingY:k,altCloneEnabled:C=!0,visiblePagesOffset:S})=>{const x=O??20,P=k??55,[T,L]=r.default.useState({width:100,height:100}),M=r.default.useRef(T),U=r.default.useRef(null),$=r.default.useRef(null),Z=h.bleedVisible?Math.max(0,...h.pages.map(ee=>ee.bleed)):0,B=Math.max(...h.pages.map(ee=>ee.computedWidth)),N=Math.max(...h.pages.map(ee=>ee.computedHeight)),H=B+2*Z,R=N+2*Z,D=async({skipTimeout:ee}={skipTimeout:!1})=>{if(ee||await new Promise(ne=>setTimeout(ne,50)),U.current===null)return;const ae=U.current.getBoundingClientRect();ae.width!==0&&ae.height!==0||(console.warn(u),console.log(U.current));const oe=$.current.clientWidth||ae.width,le={width:oe,height:ae.height};(M.current.width!==le.width||M.current.height!==le.height)&&(L(le),M.current=le);const Te=(oe-2*x)/H,Fe=(ae.height-2*P)/R,fe=Math.max(Math.min(Te,Fe),.01);h.scaleToFit!==fe&&(h.setScale(fe),h._setScaleToFit(fe))};r.default.useLayoutEffect(()=>{D({skipTimeout:!0})},[]),r.default.useEffect(()=>{D()},[H,R]),r.default.useEffect(()=>{const ee=U.current;if(window.ResizeObserver){const ae=new ResizeObserver(()=>{D({skipTimeout:!0})});return ae.observe(ee),()=>ae.unobserve(ee)}{const ae=setInterval(()=>{D({skipTimeout:!0})},100);return()=>clearInterval(ae)}},[H,R]);const z=Math.max(x,(T.width-H*h.scale)/2),F=R*h.scale*h.pages.length,V=Math.max(P,(T.height-F)/h.pages.length/2);r.default.useEffect(()=>{const ee=ae=>{(b||o.handleHotkey)(ae,h)};return window.addEventListener("keydown",ee),()=>window.removeEventListener("keydown",ee)},[]),r.default.useEffect(()=>{var ee;const ae=oe=>{if(oe.ctrlKey||oe.metaKey){oe.preventDefault();const fe=Math.max(3,h.scaleToFit),ne=Math.min(.1,h.scaleToFit),ge=(le=oe.deltaY<0?1.05*h.scale:h.scale/1.05,Te=ne,Fe=fe,Math.max(Te,Math.min(Fe,le)));h.setScale(ge)}else var le,Te,Fe};return(ee=$.current)===null||ee===void 0||ee.addEventListener("wheel",ae),()=>{var oe;return(oe=$.current)===null||oe===void 0?void 0:oe.removeEventListener("wheel",ae)}},[]);const Y=r.default.useRef(!1);f($,H*h.scale+2*z,R*h.scale+2*V,h.scale,h,Y);const{handleScroll:q}=v($,R*h.scale+2*V,h,T,Y),G=T.width>=H*h.scale+2*z,K=m||"rgba(232, 232, 232, 0.9)",X=h.pages.indexOf(h.activePage),Q=(d==null?void 0:d.NoPages)||w,te=S??Math.min(3,Math.max(1,Math.ceil(T.height/2/(R*h.scale))));return r.default.createElement("div",{ref:U,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:K},tabIndex:0,className:"polotno-workspace-container"},r.default.createElement("div",{ref:$,onScroll:q,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:G?"hidden":"auto"},className:"polotno-workspace-inner"},h.pages.map((ee,ae)=>Math.abs(ae-X)<=te||ee._exportingOrRendering?r.default.createElement(i.default,{key:ee.id,page:ee,xPadding:z,yPadding:V,width:H*h.scale+2*z,height:R*h.scale+2*V,store:h,pageControlsEnabled:E,backColor:K,pageBorderColor:y||"lightgrey",activePageBorderColor:p||"rgb(0, 161, 255)",altCloneEnabled:C,bleedColor:g||"rgba(255, 0, 0, 0.1)",components:d}):r.default.createElement(_,{key:ee.id,width:H*h.scale+2*z,height:R*h.scale+2*V,backgroundColor:K,xPadding:z,yPadding:V})),h.rulesVisible&&r.default.createElement(a.TopRules,{store:h,xPadding:z,yPadding:V,width:H*h.scale+2*z,height:R*h.scale+2*V}),h.pages.length===0&&r.default.createElement(Q,{store:h})))}),e.default=e.WorkspaceCanvas})(e8);var hF=B2();ql.toggleFadeInAnimation(!1);hi.setTextOverflow("change-font-size");const pF=new URLSearchParams(location.search).get("key"),HS=hF.createStore({key:pF});window.store=HS;window.config={addGlobalFont:xu.addGlobalFont,unstable_useHtmlTextRender:hi.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:hi.setTextVerticalResizeEnabled,unstable_setTextOverflow:hi.setTextOverflow,onLoadError:ua.onLoadError,setAssetLoadTimeout:ua.setAssetLoadTimeout,setFontLoadTimeout:ua.setFontLoadTimeout};const gF=oh.createRoot(document.getElementById("root"));gF.render(bt.createElement(e8.WorkspaceCanvas,{visiblePagesOffset:0,store:HS,components:{PageControls:()=>null,Tooltip:()=>null}}));
|