polotno-node 2.11.1 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-BQWckKFo.js +321 -0
- package/dist/index.html +1 -1
- package/package.json +5 -5
- package/dist/assets/index-Bm15lglz.js +0 -303
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function t(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=t(a);fetch(a.href,l)}})();var ic=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xl(e){if(e.__esModule)return e;var i=e.default;if(typeof i=="function"){var t=function n(){return this instanceof n?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};t.prototype=i.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var S0={exports:{}},Dt={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var tm;function b_(){if(tm)return Dt;tm=1;var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),k=Symbol.iterator;function E(F){return F===null||typeof F!="object"?null:(F=k&&F[k]||F["@@iterator"],typeof F=="function"?F:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,g={};function p(F,H,$){this.props=F,this.context=H,this.refs=g,this.updater=$||v}p.prototype.isReactComponent={},p.prototype.setState=function(F,H){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,H,"setState")},p.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function P(){}P.prototype=p.prototype;function d(F,H,$){this.props=F,this.context=H,this.refs=g,this.updater=$||v}var m=d.prototype=new P;m.constructor=d,O(m,p.prototype),m.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,N={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function D(F,H,$){var ee,V={},X=null,Y=null;if(H!=null)for(ee in H.ref!==void 0&&(Y=H.ref),H.key!==void 0&&(X=""+H.key),H)w.call(H,ee)&&!R.hasOwnProperty(ee)&&(V[ee]=H[ee]);var te=arguments.length-2;if(te===1)V.children=$;else if(1<te){for(var re=Array(te),ie=0;ie<te;ie++)re[ie]=arguments[ie+2];V.children=re}if(F&&F.defaultProps)for(ee in te=F.defaultProps,te)V[ee]===void 0&&(V[ee]=te[ee]);return{$$typeof:e,type:F,key:X,ref:Y,props:V,_owner:N.current}}function x(F,H){return{$$typeof:e,type:F.type,key:H,ref:F.ref,props:F.props,_owner:F._owner}}function S(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function A(F){var H={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function($){return H[$]})}var M=/\/+/g;function T(F,H){return typeof F=="object"&&F!==null&&F.key!=null?A(""+F.key):H.toString(36)}function z(F,H,$,ee,V){var X=typeof F;(X==="undefined"||X==="boolean")&&(F=null);var Y=!1;if(F===null)Y=!0;else switch(X){case"string":case"number":Y=!0;break;case"object":switch(F.$$typeof){case e:case i:Y=!0}}if(Y)return Y=F,V=V(Y),F=ee===""?"."+T(Y,0):ee,y(V)?($="",F!=null&&($=F.replace(M,"$&/")+"/"),z(V,H,$,"",function(ie){return ie})):V!=null&&(S(V)&&(V=x(V,$+(!V.key||Y&&Y.key===V.key?"":(""+V.key).replace(M,"$&/")+"/")+F)),H.push(V)),1;if(Y=0,ee=ee===""?".":ee+":",y(F))for(var te=0;te<F.length;te++){X=F[te];var re=ee+T(X,te);Y+=z(X,H,$,re,V)}else if(re=E(F),typeof re=="function")for(F=re.call(F),te=0;!(X=F.next()).done;)X=X.value,re=ee+T(X,te++),Y+=z(X,H,$,re,V);else if(X==="object")throw H=String(F),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return Y}function U(F,H,$){if(F==null)return F;var ee=[],V=0;return z(F,ee,"","",function(X){return H.call($,X,V++)}),ee}function Q(F){if(F._status===-1){var H=F._result;H=H(),H.then(function($){(F._status===0||F._status===-1)&&(F._status=1,F._result=$)},function($){(F._status===0||F._status===-1)&&(F._status=2,F._result=$)}),F._status===-1&&(F._status=0,F._result=H)}if(F._status===1)return F._result.default;throw F._result}var K={current:null},J={transition:null},B={ReactCurrentDispatcher:K,ReactCurrentBatchConfig:J,ReactCurrentOwner:N};function L(){throw Error("act(...) is not supported in production builds of React.")}return Dt.Children={map:U,forEach:function(F,H,$){U(F,function(){H.apply(this,arguments)},$)},count:function(F){var H=0;return U(F,function(){H++}),H},toArray:function(F){return U(F,function(H){return H})||[]},only:function(F){if(!S(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},Dt.Component=p,Dt.Fragment=t,Dt.Profiler=a,Dt.PureComponent=d,Dt.StrictMode=n,Dt.Suspense=h,Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,Dt.act=L,Dt.cloneElement=function(F,H,$){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var ee=O({},F.props),V=F.key,X=F.ref,Y=F._owner;if(H!=null){if(H.ref!==void 0&&(X=H.ref,Y=N.current),H.key!==void 0&&(V=""+H.key),F.type&&F.type.defaultProps)var te=F.type.defaultProps;for(re in H)w.call(H,re)&&!R.hasOwnProperty(re)&&(ee[re]=H[re]===void 0&&te!==void 0?te[re]:H[re])}var re=arguments.length-2;if(re===1)ee.children=$;else if(1<re){te=Array(re);for(var ie=0;ie<re;ie++)te[ie]=arguments[ie+2];ee.children=te}return{$$typeof:e,type:F.type,key:V,ref:X,props:ee,_owner:Y}},Dt.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:l,_context:F},F.Consumer=F},Dt.createElement=D,Dt.createFactory=function(F){var H=D.bind(null,F);return H.type=F,H},Dt.createRef=function(){return{current:null}},Dt.forwardRef=function(F){return{$$typeof:c,render:F}},Dt.isValidElement=S,Dt.lazy=function(F){return{$$typeof:_,_payload:{_status:-1,_result:F},_init:Q}},Dt.memo=function(F,H){return{$$typeof:b,type:F,compare:H===void 0?null:H}},Dt.startTransition=function(F){var H=J.transition;J.transition={};try{F()}finally{J.transition=H}},Dt.unstable_act=L,Dt.useCallback=function(F,H){return K.current.useCallback(F,H)},Dt.useContext=function(F){return K.current.useContext(F)},Dt.useDebugValue=function(){},Dt.useDeferredValue=function(F){return K.current.useDeferredValue(F)},Dt.useEffect=function(F,H){return K.current.useEffect(F,H)},Dt.useId=function(){return K.current.useId()},Dt.useImperativeHandle=function(F,H,$){return K.current.useImperativeHandle(F,H,$)},Dt.useInsertionEffect=function(F,H){return K.current.useInsertionEffect(F,H)},Dt.useLayoutEffect=function(F,H){return K.current.useLayoutEffect(F,H)},Dt.useMemo=function(F,H){return K.current.useMemo(F,H)},Dt.useReducer=function(F,H,$){return K.current.useReducer(F,H,$)},Dt.useRef=function(F){return K.current.useRef(F)},Dt.useState=function(F){return K.current.useState(F)},Dt.useSyncExternalStore=function(F,H,$){return K.current.useSyncExternalStore(F,H,$)},Dt.useTransition=function(){return K.current.useTransition()},Dt.version="18.3.1",Dt}var nm;function Tn(){return nm||(nm=1,S0.exports=b_()),S0.exports}var On=Tn();const zt=Ad(On);var Wh={},E0={exports:{}},pi={},O0={exports:{}},x0={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var rm;function __(){return rm||(rm=1,function(e){function i(J,B){var L=J.length;J.push(B);e:for(;0<L;){var F=L-1>>>1,H=J[F];if(0<a(H,B))J[F]=B,J[L]=H,L=F;else break e}}function t(J){return J.length===0?null:J[0]}function n(J){if(J.length===0)return null;var B=J[0],L=J.pop();if(L!==B){J[0]=L;e:for(var F=0,H=J.length,$=H>>>1;F<$;){var ee=2*(F+1)-1,V=J[ee],X=ee+1,Y=J[X];if(0>a(V,L))X<H&&0>a(Y,V)?(J[F]=Y,J[X]=L,F=X):(J[F]=V,J[ee]=L,F=ee);else if(X<H&&0>a(Y,L))J[F]=Y,J[X]=L,F=X;else break e}}return B}function a(J,B){var L=J.sortIndex-B.sortIndex;return L!==0?L:J.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],b=[],_=1,k=null,E=3,v=!1,O=!1,g=!1,p=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(J){for(var B=t(b);B!==null;){if(B.callback===null)n(b);else if(B.startTime<=J)n(b),B.sortIndex=B.expirationTime,i(h,B);else break;B=t(b)}}function y(J){if(g=!1,m(J),!O)if(t(h)!==null)O=!0,Q(w);else{var B=t(b);B!==null&&K(y,B.startTime-J)}}function w(J,B){O=!1,g&&(g=!1,P(D),D=-1),v=!0;var L=E;try{for(m(B),k=t(h);k!==null&&(!(k.expirationTime>B)||J&&!A());){var F=k.callback;if(typeof F=="function"){k.callback=null,E=k.priorityLevel;var H=F(k.expirationTime<=B);B=e.unstable_now(),typeof H=="function"?k.callback=H:k===t(h)&&n(h),m(B)}else n(h);k=t(h)}if(k!==null)var $=!0;else{var ee=t(b);ee!==null&&K(y,ee.startTime-B),$=!1}return $}finally{k=null,E=L,v=!1}}var N=!1,R=null,D=-1,x=5,S=-1;function A(){return!(e.unstable_now()-S<x)}function M(){if(R!==null){var J=e.unstable_now();S=J;var B=!0;try{B=R(!0,J)}finally{B?T():(N=!1,R=null)}}else N=!1}var T;if(typeof d=="function")T=function(){d(M)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=M,T=function(){U.postMessage(null)}}else T=function(){p(M,0)};function Q(J){R=J,N||(N=!0,T())}function K(J,B){D=p(function(){J(e.unstable_now())},B)}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(J){J.callback=null},e.unstable_continueExecution=function(){O||v||(O=!0,Q(w))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_getFirstCallbackNode=function(){return t(h)},e.unstable_next=function(J){switch(E){case 1:case 2:case 3:var B=3;break;default:B=E}var L=E;E=B;try{return J()}finally{E=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,B){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var L=E;E=J;try{return B()}finally{E=L}},e.unstable_scheduleCallback=function(J,B,L){var F=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?F+L:F):L=F,J){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=L+H,J={id:_++,callback:B,priorityLevel:J,startTime:L,expirationTime:H,sortIndex:-1},L>F?(J.sortIndex=L,i(b,J),t(h)===null&&J===t(b)&&(g?(P(D),D=-1):g=!0,K(y,L-F))):(J.sortIndex=H,i(h,J),O||v||(O=!0,Q(w))),J},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(J){var B=E;return function(){var L=E;E=B;try{return J.apply(this,arguments)}finally{E=L}}}}(x0)),x0}var im;function Mg(){return im||(im=1,O0.exports=__()),O0.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 om;function w_(){if(om)return pi;om=1;var e=Tn(),i=Mg();function t(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,C=1;C<arguments.length;C++)o+="&args[]="+encodeURIComponent(arguments[C]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function l(r,o){u(r,o),u(r+"Capture",o)}function u(r,o){for(a[r]=o,r=0;r<o.length;r++)n.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,b=/^[: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]*$/,_={},k={};function E(r){return h.call(k,r)?!0:h.call(_,r)?!1:b.test(r)?k[r]=!0:(_[r]=!0,!1)}function v(r,o,C,j){if(C!==null&&C.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return j?!1:C!==null?!C.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function O(r,o,C,j){if(o===null||typeof o>"u"||v(r,o,C,j))return!0;if(j)return!1;if(C!==null)switch(C.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function g(r,o,C,j,G,Z,oe){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=j,this.attributeNamespace=G,this.mustUseProperty=C,this.propertyName=r,this.type=o,this.sanitizeURL=Z,this.removeEmptyString=oe}var p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){p[r]=new g(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];p[o]=new g(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){p[r]=new g(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){p[r]=new g(r,2,!1,r,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(r){p[r]=new g(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){p[r]=new g(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){p[r]=new g(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){p[r]=new g(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){p[r]=new g(r,5,!1,r.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function d(r){return r[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(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){p[r]=new g(r,1,!1,r.toLowerCase(),null,!1,!1)}),p.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){p[r]=new g(r,1,!1,r.toLowerCase(),null,!0,!0)});function m(r,o,C,j){var G=p.hasOwnProperty(o)?p[o]:null;(G!==null?G.type!==0:j||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(O(o,C,G,j)&&(C=null),j||G===null?E(o)&&(C===null?r.removeAttribute(o):r.setAttribute(o,""+C)):G.mustUseProperty?r[G.propertyName]=C===null?G.type===3?!1:"":C:(o=G.attributeName,j=G.attributeNamespace,C===null?r.removeAttribute(o):(G=G.type,C=G===3||G===4&&C===!0?"":""+C,j?r.setAttributeNS(j,o,C):r.setAttribute(o,C))))}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),K=Symbol.for("react.offscreen"),J=Symbol.iterator;function B(r){return r===null||typeof r!="object"?null:(r=J&&r[J]||r["@@iterator"],typeof r=="function"?r:null)}var L=Object.assign,F;function H(r){if(F===void 0)try{throw Error()}catch(C){var o=C.stack.trim().match(/\n( *(at )?)/);F=o&&o[1]||""}return`
|
|
26
|
-
`+F+r}var $=!1;function ee(r,o){if(!r||$)return"";$=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Te){var j=Te}Reflect.construct(r,[],o)}else{try{o.call()}catch(Te){j=Te}r.call(o.prototype)}else{try{throw Error()}catch(Te){j=Te}r()}}catch(Te){if(Te&&j&&typeof Te.stack=="string"){for(var G=Te.stack.split(`
|
|
27
|
-
`),Z=j.stack.split(`
|
|
28
|
-
`),oe=G.length-1,ce=Z.length-1;1<=oe&&0<=ce&&G[oe]!==Z[ce];)ce--;for(;1<=oe&&0<=ce;oe--,ce--)if(G[oe]!==Z[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,0>ce||G[oe]!==Z[ce]){var he=`
|
|
29
|
-
`+G[oe].replace(" at new "," at ");return r.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",r.displayName)),he}while(1<=oe&&0<=ce);break}}}finally{$=!1,Error.prepareStackTrace=C}return(r=r?r.displayName||r.name:"")?H(r):""}function V(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=ee(r.type,!1),r;case 11:return r=ee(r.type.render,!1),r;case 1:return r=ee(r.type,!0),r;default:return""}}function X(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case N:return"Portal";case x:return"Profiler";case D:return"StrictMode";case T:return"Suspense";case z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case A:return(r.displayName||"Context")+".Consumer";case S:return(r._context.displayName||"Context")+".Provider";case M:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return o=r.displayName||null,o!==null?o:X(r.type)||"Memo";case Q:o=r._payload,r=r._init;try{return X(r(o))}catch{}}return null}function Y(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(o);case 8:return o===D?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function te(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function re(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ie(r){var o=re(r)?"checked":"value",C=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),j=""+r[o];if(!r.hasOwnProperty(o)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var G=C.get,Z=C.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return G.call(this)},set:function(oe){j=""+oe,Z.call(this,oe)}}),Object.defineProperty(r,o,{enumerable:C.enumerable}),{getValue:function(){return j},setValue:function(oe){j=""+oe},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function ae(r){r._valueTracker||(r._valueTracker=ie(r))}function ue(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var C=o.getValue(),j="";return r&&(j=re(r)?r.checked?"true":"false":r.value),r=j,r!==C?(o.setValue(r),!0):!1}function de(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function pe(r,o){var C=o.checked;return L({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:C??r._wrapperState.initialChecked})}function Oe(r,o){var C=o.defaultValue==null?"":o.defaultValue,j=o.checked!=null?o.checked:o.defaultChecked;C=te(o.value!=null?o.value:C),r._wrapperState={initialChecked:j,initialValue:C,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function _e(r,o){o=o.checked,o!=null&&m(r,"checked",o,!1)}function Le(r,o){_e(r,o);var C=te(o.value),j=o.type;if(C!=null)j==="number"?(C===0&&r.value===""||r.value!=C)&&(r.value=""+C):r.value!==""+C&&(r.value=""+C);else if(j==="submit"||j==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?ge(r,o.type,C):o.hasOwnProperty("defaultValue")&&ge(r,o.type,te(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function fe(r,o,C){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var j=o.type;if(!(j!=="submit"&&j!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,C||o===r.value||(r.value=o),r.defaultValue=o}C=r.name,C!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,C!==""&&(r.name=C)}function ge(r,o,C){(o!=="number"||de(r.ownerDocument)!==r)&&(C==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+C&&(r.defaultValue=""+C))}var Ce=Array.isArray;function Ae(r,o,C,j){if(r=r.options,o){o={};for(var G=0;G<C.length;G++)o["$"+C[G]]=!0;for(C=0;C<r.length;C++)G=o.hasOwnProperty("$"+r[C].value),r[C].selected!==G&&(r[C].selected=G),G&&j&&(r[C].defaultSelected=!0)}else{for(C=""+te(C),o=null,G=0;G<r.length;G++){if(r[G].value===C){r[G].selected=!0,j&&(r[G].defaultSelected=!0);return}o!==null||r[G].disabled||(o=r[G])}o!==null&&(o.selected=!0)}}function se(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return L({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function me(r,o){var C=o.value;if(C==null){if(C=o.children,o=o.defaultValue,C!=null){if(o!=null)throw Error(t(92));if(Ce(C)){if(1<C.length)throw Error(t(93));C=C[0]}o=C}o==null&&(o=""),C=o}r._wrapperState={initialValue:te(C)}}function xe(r,o){var C=te(o.value),j=te(o.defaultValue);C!=null&&(C=""+C,C!==r.value&&(r.value=C),o.defaultValue==null&&r.defaultValue!==C&&(r.defaultValue=C)),j!=null&&(r.defaultValue=""+j)}function Ne(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function ct(r){switch(r){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 at(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?ct(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var De,Fe=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,C,j,G){MSApp.execUnsafeLocalFunction(function(){return r(o,C,j,G)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(De=De||document.createElement("div"),De.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=De.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function He(r,o){if(o){var C=r.firstChild;if(C&&C===r.lastChild&&C.nodeType===3){C.nodeValue=o;return}}r.textContent=o}var Xe={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},ft=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(r){ft.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Xe[o]=Xe[r]})});function At(r,o,C){return o==null||typeof o=="boolean"||o===""?"":C||typeof o!="number"||o===0||Xe.hasOwnProperty(r)&&Xe[r]?(""+o).trim():o+"px"}function xt(r,o){r=r.style;for(var C in o)if(o.hasOwnProperty(C)){var j=C.indexOf("--")===0,G=At(C,o[C],j);C==="float"&&(C="cssFloat"),j?r.setProperty(C,G):r[C]=G}}var be=L({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 Se(r,o){if(o){if(be[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function vt(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){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 Pt=null;function Ie(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ge=null,rt=null,je=null;function mt(r){if(r=_s(r)){if(typeof Ge!="function")throw Error(t(280));var o=r.stateNode;o&&(o=Yn(o),Ge(r.stateNode,r.type,o))}}function ze(r){rt?je?je.push(r):je=[r]:rt=r}function pt(){if(rt){var r=rt,o=je;if(je=rt=null,mt(r),o)for(r=0;r<o.length;r++)mt(o[r])}}function _n(r,o){return r(o)}function Be(){}var lt=!1;function _t(r,o,C){if(lt)return r(o,C);lt=!0;try{return _n(r,o,C)}finally{lt=!1,(rt!==null||je!==null)&&(Be(),pt())}}function Ut(r,o){var C=r.stateNode;if(C===null)return null;var j=Yn(C);if(j===null)return null;C=j[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(j=!j.disabled)||(r=r.type,j=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!j;break e;default:r=!1}if(r)return null;if(C&&typeof C!="function")throw Error(t(231,o,typeof C));return C}var Ht=!1;if(c)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch{Ht=!1}function In(r,o,C,j,G,Z,oe,ce,he){var Te=Array.prototype.slice.call(arguments,3);try{o.apply(C,Te)}catch(qe){this.onError(qe)}}var wn=!1,Qn=null,ii=!1,Sr=null,Ze={onError:function(r){wn=!0,Qn=r}};function St(r,o,C,j,G,Z,oe,ce,he){wn=!1,Qn=null,In.apply(Ze,arguments)}function Mt(r,o,C,j,G,Z,oe,ce,he){if(St.apply(this,arguments),wn){if(wn){var Te=Qn;wn=!1,Qn=null}else throw Error(t(198));ii||(ii=!0,Sr=Te)}}function Vt(r){var o=r,C=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,o.flags&4098&&(C=o.return),r=o.return;while(r)}return o.tag===3?C:null}function $t(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Jn(r){if(Vt(r)!==r)throw Error(t(188))}function Gn(r){var o=r.alternate;if(!o){if(o=Vt(r),o===null)throw Error(t(188));return o!==r?null:r}for(var C=r,j=o;;){var G=C.return;if(G===null)break;var Z=G.alternate;if(Z===null){if(j=G.return,j!==null){C=j;continue}break}if(G.child===Z.child){for(Z=G.child;Z;){if(Z===C)return Jn(G),r;if(Z===j)return Jn(G),o;Z=Z.sibling}throw Error(t(188))}if(C.return!==j.return)C=G,j=Z;else{for(var oe=!1,ce=G.child;ce;){if(ce===C){oe=!0,C=G,j=Z;break}if(ce===j){oe=!0,j=G,C=Z;break}ce=ce.sibling}if(!oe){for(ce=Z.child;ce;){if(ce===C){oe=!0,C=Z,j=G;break}if(ce===j){oe=!0,j=Z,C=G;break}ce=ce.sibling}if(!oe)throw Error(t(189))}}if(C.alternate!==j)throw Error(t(190))}if(C.tag!==3)throw Error(t(188));return C.stateNode.current===C?r:o}function Sn(r){return r=Gn(r),r!==null?oi(r):null}function oi(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=oi(r);if(o!==null)return o;r=r.sibling}return null}var Ir=i.unstable_scheduleCallback,Ii=i.unstable_cancelCallback,No=i.unstable_shouldYield,rs=i.unstable_requestPaint,Jt=i.unstable_now,to=i.unstable_getCurrentPriorityLevel,Dr=i.unstable_ImmediatePriority,ha=i.unstable_UserBlockingPriority,no=i.unstable_NormalPriority,Gp=i.unstable_LowPriority,Qs=i.unstable_IdlePriority,ro=null,er=null;function un(r){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(ro,r,void 0,(r.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:jr,Io=Math.log,fr=Math.LN2;function jr(r){return r>>>=0,r===0?32:31-(Io(r)/fr|0)|0}var Di=64,io=4194304;function Vn(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function pa(r,o){var C=r.pendingLanes;if(C===0)return 0;var j=0,G=r.suspendedLanes,Z=r.pingedLanes,oe=C&268435455;if(oe!==0){var ce=oe&~G;ce!==0?j=Vn(ce):(Z&=oe,Z!==0&&(j=Vn(Z)))}else oe=C&~G,oe!==0?j=Vn(oe):Z!==0&&(j=Vn(Z));if(j===0)return 0;if(o!==0&&o!==j&&!(o&G)&&(G=j&-j,Z=o&-o,G>=Z||G===16&&(Z&4194240)!==0))return o;if(j&4&&(j|=C&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=j;0<o;)C=31-Nt(o),G=1<<C,j|=r[C],o&=~G;return j}function Vd(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $d(r,o){for(var C=r.suspendedLanes,j=r.pingedLanes,G=r.expirationTimes,Z=r.pendingLanes;0<Z;){var oe=31-Nt(Z),ce=1<<oe,he=G[oe];he===-1?(!(ce&C)||ce&j)&&(G[oe]=Vd(ce,o)):he<=o&&(r.expiredLanes|=ce),Z&=~ce}}function tl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Ec(){var r=Di;return Di<<=1,!(Di&4194240)&&(Di=64),r}function Gr(r){for(var o=[],C=0;31>C;C++)o.push(r);return o}function is(r,o,C){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Nt(o),r[o]=C}function Vp(r,o){var C=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var j=r.eventTimes;for(r=r.expirationTimes;0<C;){var G=31-Nt(C),Z=1<<G;o[G]=0,j[G]=-1,r[G]=-1,C&=~Z}}function Oc(r,o){var C=r.entangledLanes|=o;for(r=r.entanglements;C;){var j=31-Nt(C),G=1<<j;G&o|r[j]&o&&(r[j]|=o),C&=~G}}var Gt=0;function os(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var nl,rl,Wd,Yd,Js,eu=!1,il=[],ai=null,Do=null,ji=null,It=new Map,ol=new Map,Fi=[],Kd="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 Xd(r,o){switch(r){case"focusin":case"focusout":ai=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":It.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(o.pointerId)}}function as(r,o,C,j,G,Z){return r===null||r.nativeEvent!==Z?(r={blockedOn:o,domEventName:C,eventSystemFlags:j,nativeEvent:Z,targetContainers:[G]},o!==null&&(o=_s(o),o!==null&&rl(o)),r):(r.eventSystemFlags|=j,o=r.targetContainers,G!==null&&o.indexOf(G)===-1&&o.push(G),r)}function $n(r,o,C,j,G){switch(o){case"focusin":return ai=as(ai,r,o,C,j,G),!0;case"dragenter":return Do=as(Do,r,o,C,j,G),!0;case"mouseover":return ji=as(ji,r,o,C,j,G),!0;case"pointerover":var Z=G.pointerId;return It.set(Z,as(It.get(Z)||null,r,o,C,j,G)),!0;case"gotpointercapture":return Z=G.pointerId,ol.set(Z,as(ol.get(Z)||null,r,o,C,j,G)),!0}return!1}function tu(r){var o=$o(r.target);if(o!==null){var C=Vt(o);if(C!==null){if(o=C.tag,o===13){if(o=$t(C),o!==null){r.blockedOn=o,Js(r.priority,function(){Wd(C)});return}}else if(o===3&&C.stateNode.current.memoizedState.isDehydrated){r.blockedOn=C.tag===3?C.stateNode.containerInfo:null;return}}}r.blockedOn=null}function nu(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var C=ou(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(C===null){C=r.nativeEvent;var j=new C.constructor(C.type,C);Pt=j,C.target.dispatchEvent(j),Pt=null}else return o=_s(C),o!==null&&rl(o),r.blockedOn=C,!1;o.shift()}return!0}function ru(r,o,C){nu(r)&&C.delete(o)}function $p(){eu=!1,ai!==null&&nu(ai)&&(ai=null),Do!==null&&nu(Do)&&(Do=null),ji!==null&&nu(ji)&&(ji=null),It.forEach(ru),ol.forEach(ru)}function jo(r,o){r.blockedOn===o&&(r.blockedOn=null,eu||(eu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$p)))}function Fr(r){function o(G){return jo(G,r)}if(0<il.length){jo(il[0],r);for(var C=1;C<il.length;C++){var j=il[C];j.blockedOn===r&&(j.blockedOn=null)}}for(ai!==null&&jo(ai,r),Do!==null&&jo(Do,r),ji!==null&&jo(ji,r),It.forEach(o),ol.forEach(o),C=0;C<Fi.length;C++)j=Fi[C],j.blockedOn===r&&(j.blockedOn=null);for(;0<Fi.length&&(C=Fi[0],C.blockedOn===null);)tu(C),C.blockedOn===null&&Fi.shift()}var al=y.ReactCurrentBatchConfig,iu=!0;function wi(r,o,C,j){var G=Gt,Z=al.transition;al.transition=null;try{Gt=1,ll(r,o,C,j)}finally{Gt=G,al.transition=Z}}function oo(r,o,C,j){var G=Gt,Z=al.transition;al.transition=null;try{Gt=4,ll(r,o,C,j)}finally{Gt=G,al.transition=Z}}function ll(r,o,C,j){if(iu){var G=ou(r,o,C,j);if(G===null)wu(r,o,j,sl,C),Xd(r,j);else if($n(G,r,o,C,j))j.stopPropagation();else if(Xd(r,j),o&4&&-1<Kd.indexOf(r)){for(;G!==null;){var Z=_s(G);if(Z!==null&&nl(Z),Z=ou(r,o,C,j),Z===null&&wu(r,o,j,sl,C),Z===G)break;G=Z}G!==null&&j.stopPropagation()}else wu(r,o,j,null,C)}}var sl=null;function ou(r,o,C,j){if(sl=null,r=Ie(j),r=$o(r),r!==null)if(o=Vt(r),o===null)r=null;else if(C=o.tag,C===13){if(r=$t(o),r!==null)return r;r=null}else if(C===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return sl=r,null}function Zd(r){switch(r){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(to()){case Dr:return 1;case ha:return 4;case no:case Gp:return 16;case Qs:return 536870912;default:return 16}default:return 16}}var tr=null,Fo=null,ao=null;function ls(){if(ao)return ao;var r,o=Fo,C=o.length,j,G="value"in tr?tr.value:tr.textContent,Z=G.length;for(r=0;r<C&&o[r]===G[r];r++);var oe=C-r;for(j=1;j<=oe&&o[C-j]===G[Z-j];j++);return ao=G.slice(r,1<j?1-j:void 0)}function ga(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Er(){return!0}function Vr(){return!1}function Dn(r){function o(C,j,G,Z,oe){this._reactName=C,this._targetInst=G,this.type=j,this.nativeEvent=Z,this.target=oe,this.currentTarget=null;for(var ce in r)r.hasOwnProperty(ce)&&(C=r[ce],this[ce]=C?C(Z):Z[ce]);return this.isDefaultPrevented=(Z.defaultPrevented!=null?Z.defaultPrevented:Z.returnValue===!1)?Er:Vr,this.isPropagationStopped=Vr,this}return L(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var C=this.nativeEvent;C&&(C.preventDefault?C.preventDefault():typeof C.returnValue!="unknown"&&(C.returnValue=!1),this.isDefaultPrevented=Er)},stopPropagation:function(){var C=this.nativeEvent;C&&(C.stopPropagation?C.stopPropagation():typeof C.cancelBubble!="unknown"&&(C.cancelBubble=!0),this.isPropagationStopped=Er)},persist:function(){},isPersistent:Er}),o}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Si=Dn(zr),Ei=L({},zr,{view:0,detail:0}),Qd=Dn(Ei),ss,us,nr,Or=L({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ma,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==nr&&(nr&&r.type==="mousemove"?(ss=r.screenX-nr.screenX,us=r.screenY-nr.screenY):us=ss=0,nr=r),ss)},movementY:function(r){return"movementY"in r?r.movementY:us}}),cn=Dn(Or),cs=L({},Or,{dataTransfer:0}),Oi=Dn(cs),Jd=L({},Ei,{relatedTarget:0}),au=Dn(Jd),xc=L({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Pc=Dn(xc),eh=L({},zr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lu=Dn(eh),th=L({},zr,{data:0}),va=Dn(th),Cc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wp={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"},su={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yp(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=su[r])?!!o[r]:!1}function ma(){return Yp}var uu=L({},Ei,{key:function(r){if(r.key){var o=Cc[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=ga(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Wp[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ma,charCode:function(r){return r.type==="keypress"?ga(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ga(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),nh=Dn(uu),rh=L({},Or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ya=Dn(rh),ih=L({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ma}),cu=Dn(ih),fu=L({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ul=Dn(fu),kc=L({},Or,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Tc=Dn(kc),oh=[9,13,27,32],fs=c&&"CompositionEvent"in window,ba=null;c&&"documentMode"in document&&(ba=document.documentMode);var cl=c&&"TextEvent"in window&&!ba,$r=c&&(!fs||ba&&8<ba&&11>=ba),zo=" ",du=!1;function Ac(r,o){switch(r){case"keyup":return oh.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xi(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Wr=!1;function Rc(r,o){switch(r){case"compositionend":return xi(o);case"keypress":return o.which!==32?null:(du=!0,zo);case"textInput":return r=o.data,r===zo&&du?null:r;default:return null}}function ah(r,o){if(Wr)return r==="compositionend"||!fs&&Ac(r,o)?(r=ls(),ao=Fo=tr=null,Wr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return $r&&o.locale!=="ko"?null:o.data;default:return null}}var lo={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 so(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!lo[r.type]:o==="textarea"}function ds(r,o,C,j){ze(j),o=Su(o,"onChange"),0<o.length&&(C=new Si("onChange","change",null,C,j),r.push({event:C,listeners:o}))}var fl=null,Bo=null;function lh(r){qc(r,0)}function Uo(r){var o=Fn(r);if(ue(o))return r}function li(r,o){if(r==="change")return o}var dl=!1;if(c){var qo;if(c){var si="oninput"in document;if(!si){var hu=document.createElement("div");hu.setAttribute("oninput","return;"),si=typeof hu.oninput=="function"}qo=si}else qo=!1;dl=qo&&(!document.documentMode||9<document.documentMode)}function _a(){fl&&(fl.detachEvent("onpropertychange",Mc),Bo=fl=null)}function Mc(r){if(r.propertyName==="value"&&Uo(Bo)){var o=[];ds(o,Bo,r,Ie(r)),_t(lh,o)}}function Lc(r,o,C){r==="focusin"?(_a(),fl=o,Bo=C,fl.attachEvent("onpropertychange",Mc)):r==="focusout"&&_a()}function En(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Uo(Bo)}function pu(r,o){if(r==="click")return Uo(o)}function Nc(r,o){if(r==="input"||r==="change")return Uo(o)}function Ic(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Br=typeof Object.is=="function"?Object.is:Ic;function wa(r,o){if(Br(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var C=Object.keys(r),j=Object.keys(o);if(C.length!==j.length)return!1;for(j=0;j<C.length;j++){var G=C[j];if(!h.call(o,G)||!Br(r[G],o[G]))return!1}return!0}function Ho(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function pn(r,o){var C=Ho(r);r=0;for(var j;C;){if(C.nodeType===3){if(j=r+C.textContent.length,r<=o&&j>=o)return{node:C,offset:o-r};r=j}e:{for(;C;){if(C.nextSibling){C=C.nextSibling;break e}C=C.parentNode}C=void 0}C=Ho(C)}}function An(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?An(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function jn(){for(var r=window,o=de();o instanceof r.HTMLIFrameElement;){try{var C=typeof o.contentWindow.location.href=="string"}catch{C=!1}if(C)r=o.contentWindow;else break;o=de(r.document)}return o}function hl(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function hs(r){var o=jn(),C=r.focusedElem,j=r.selectionRange;if(o!==C&&C&&C.ownerDocument&&An(C.ownerDocument.documentElement,C)){if(j!==null&&hl(C)){if(o=j.start,r=j.end,r===void 0&&(r=o),"selectionStart"in C)C.selectionStart=o,C.selectionEnd=Math.min(r,C.value.length);else if(r=(o=C.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var G=C.textContent.length,Z=Math.min(j.start,G);j=j.end===void 0?Z:Math.min(j.end,G),!r.extend&&Z>j&&(G=j,j=Z,Z=G),G=pn(C,Z);var oe=pn(C,j);G&&oe&&(r.rangeCount!==1||r.anchorNode!==G.node||r.anchorOffset!==G.offset||r.focusNode!==oe.node||r.focusOffset!==oe.offset)&&(o=o.createRange(),o.setStart(G.node,G.offset),r.removeAllRanges(),Z>j?(r.addRange(o),r.extend(oe.node,oe.offset)):(o.setEnd(oe.node,oe.offset),r.addRange(o)))}}for(o=[],r=C;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<o.length;C++)r=o[C],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var ps=c&&"documentMode"in document&&11>=document.documentMode,pl=null,Wn=null,Sa=null,gs=!1;function gu(r,o,C){var j=C.window===C?C.document:C.nodeType===9?C:C.ownerDocument;gs||pl==null||pl!==de(j)||(j=pl,"selectionStart"in j&&hl(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),Sa&&wa(Sa,j)||(Sa=j,j=Su(Wn,"onSelect"),0<j.length&&(o=new Si("onSelect","select",null,o,C),r.push({event:o,listeners:j}),o.target=pl)))}function Yr(r,o){var C={};return C[r.toLowerCase()]=o.toLowerCase(),C["Webkit"+r]="webkit"+o,C["Moz"+r]="moz"+o,C}var rr={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionend:Yr("Transition","TransitionEnd")},Ea={},vu={};c&&(vu=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function gl(r){if(Ea[r])return Ea[r];if(!rr[r])return r;var o=rr[r],C;for(C in o)if(o.hasOwnProperty(C)&&C in vu)return Ea[r]=o[C];return r}var Dc=gl("animationend"),jc=gl("animationiteration"),Fc=gl("animationstart"),zc=gl("transitionend"),Bc=new Map,Uc="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 uo(r,o){Bc.set(r,o),l(o,[r])}for(var mu=0;mu<Uc.length;mu++){var Oa=Uc[mu],sh=Oa.toLowerCase(),yu=Oa[0].toUpperCase()+Oa.slice(1);uo(sh,"on"+yu)}uo(Dc,"onAnimationEnd"),uo(jc,"onAnimationIteration"),uo(Fc,"onAnimationStart"),uo("dblclick","onDoubleClick"),uo("focusin","onFocus"),uo("focusout","onBlur"),uo(zc,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Go="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(" "),uh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Go));function bu(r,o,C){var j=r.type||"unknown-event";r.currentTarget=C,Mt(j,o,void 0,r),r.currentTarget=null}function qc(r,o){o=(o&4)!==0;for(var C=0;C<r.length;C++){var j=r[C],G=j.event;j=j.listeners;e:{var Z=void 0;if(o)for(var oe=j.length-1;0<=oe;oe--){var ce=j[oe],he=ce.instance,Te=ce.currentTarget;if(ce=ce.listener,he!==Z&&G.isPropagationStopped())break e;bu(G,ce,Te),Z=he}else for(oe=0;oe<j.length;oe++){if(ce=j[oe],he=ce.instance,Te=ce.currentTarget,ce=ce.listener,he!==Z&&G.isPropagationStopped())break e;bu(G,ce,Te),Z=he}}}if(ii)throw r=Sr,ii=!1,Sr=null,r}function rn(r,o){var C=o[Ou];C===void 0&&(C=o[Ou]=new Set);var j=r+"__bubble";C.has(j)||(Hc(o,r,2,!1),C.add(j))}function _u(r,o,C){var j=0;o&&(j|=4),Hc(C,r,j,o)}var vs="_reactListening"+Math.random().toString(36).slice(2);function xa(r){if(!r[vs]){r[vs]=!0,n.forEach(function(C){C!=="selectionchange"&&(uh.has(C)||_u(C,!1,r),_u(C,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[vs]||(o[vs]=!0,_u("selectionchange",!1,o))}}function Hc(r,o,C,j){switch(Zd(o)){case 1:var G=wi;break;case 4:G=oo;break;default:G=ll}C=G.bind(null,o,C,r),G=void 0,!Ht||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(G=!0),j?G!==void 0?r.addEventListener(o,C,{capture:!0,passive:G}):r.addEventListener(o,C,!0):G!==void 0?r.addEventListener(o,C,{passive:G}):r.addEventListener(o,C,!1)}function wu(r,o,C,j,G){var Z=j;if(!(o&1)&&!(o&2)&&j!==null)e:for(;;){if(j===null)return;var oe=j.tag;if(oe===3||oe===4){var ce=j.stateNode.containerInfo;if(ce===G||ce.nodeType===8&&ce.parentNode===G)break;if(oe===4)for(oe=j.return;oe!==null;){var he=oe.tag;if((he===3||he===4)&&(he=oe.stateNode.containerInfo,he===G||he.nodeType===8&&he.parentNode===G))return;oe=oe.return}for(;ce!==null;){if(oe=$o(ce),oe===null)return;if(he=oe.tag,he===5||he===6){j=Z=oe;continue e}ce=ce.parentNode}}j=j.return}_t(function(){var Te=Z,qe=Ie(C),Ve=[];e:{var Ue=Bc.get(r);if(Ue!==void 0){var et=Si,ot=r;switch(r){case"keypress":if(ga(C)===0)break e;case"keydown":case"keyup":et=nh;break;case"focusin":ot="focus",et=au;break;case"focusout":ot="blur",et=au;break;case"beforeblur":case"afterblur":et=au;break;case"click":if(C.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":et=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":et=Oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":et=cu;break;case Dc:case jc:case Fc:et=Pc;break;case zc:et=ul;break;case"scroll":et=Qd;break;case"wheel":et=Tc;break;case"copy":case"cut":case"paste":et=lu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":et=ya}var ut=(o&4)!==0,qn=!ut&&r==="scroll",Ee=ut?Ue!==null?Ue+"Capture":null:Ue;ut=[];for(var ve=Te,Pe;ve!==null;){Pe=ve;var We=Pe.stateNode;if(Pe.tag===5&&We!==null&&(Pe=We,Ee!==null&&(We=Ut(ve,Ee),We!=null&&ut.push(vl(ve,We,Pe)))),qn)break;ve=ve.return}0<ut.length&&(Ue=new et(Ue,ot,null,C,qe),Ve.push({event:Ue,listeners:ut}))}}if(!(o&7)){e:{if(Ue=r==="mouseover"||r==="pointerover",et=r==="mouseout"||r==="pointerout",Ue&&C!==Pt&&(ot=C.relatedTarget||C.fromElement)&&($o(ot)||ot[Bi]))break e;if((et||Ue)&&(Ue=qe.window===qe?qe:(Ue=qe.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,et?(ot=C.relatedTarget||C.toElement,et=Te,ot=ot?$o(ot):null,ot!==null&&(qn=Vt(ot),ot!==qn||ot.tag!==5&&ot.tag!==6)&&(ot=null)):(et=null,ot=Te),et!==ot)){if(ut=cn,We="onMouseLeave",Ee="onMouseEnter",ve="mouse",(r==="pointerout"||r==="pointerover")&&(ut=ya,We="onPointerLeave",Ee="onPointerEnter",ve="pointer"),qn=et==null?Ue:Fn(et),Pe=ot==null?Ue:Fn(ot),Ue=new ut(We,ve+"leave",et,C,qe),Ue.target=qn,Ue.relatedTarget=Pe,We=null,$o(qe)===Te&&(ut=new ut(Ee,ve+"enter",ot,C,qe),ut.target=Pe,ut.relatedTarget=qn,We=ut),qn=We,et&&ot)t:{for(ut=et,Ee=ot,ve=0,Pe=ut;Pe;Pe=Pa(Pe))ve++;for(Pe=0,We=Ee;We;We=Pa(We))Pe++;for(;0<ve-Pe;)ut=Pa(ut),ve--;for(;0<Pe-ve;)Ee=Pa(Ee),Pe--;for(;ve--;){if(ut===Ee||Ee!==null&&ut===Ee.alternate)break t;ut=Pa(ut),Ee=Pa(Ee)}ut=null}else ut=null;et!==null&&ch(Ve,Ue,et,ut,!1),ot!==null&&qn!==null&&ch(Ve,qn,ot,ut,!0)}}e:{if(Ue=Te?Fn(Te):window,et=Ue.nodeName&&Ue.nodeName.toLowerCase(),et==="select"||et==="input"&&Ue.type==="file")var dt=li;else if(so(Ue))if(dl)dt=Nc;else{dt=En;var yt=Lc}else(et=Ue.nodeName)&&et.toLowerCase()==="input"&&(Ue.type==="checkbox"||Ue.type==="radio")&&(dt=pu);if(dt&&(dt=dt(r,Te))){ds(Ve,dt,C,qe);break e}yt&&yt(r,Ue,Te),r==="focusout"&&(yt=Ue._wrapperState)&&yt.controlled&&Ue.type==="number"&&ge(Ue,"number",Ue.value)}switch(yt=Te?Fn(Te):window,r){case"focusin":(so(yt)||yt.contentEditable==="true")&&(pl=yt,Wn=Te,Sa=null);break;case"focusout":Sa=Wn=pl=null;break;case"mousedown":gs=!0;break;case"contextmenu":case"mouseup":case"dragend":gs=!1,gu(Ve,C,qe);break;case"selectionchange":if(ps)break;case"keydown":case"keyup":gu(Ve,C,qe)}var bt;if(fs)e:{switch(r){case"compositionstart":var wt="onCompositionStart";break e;case"compositionend":wt="onCompositionEnd";break e;case"compositionupdate":wt="onCompositionUpdate";break e}wt=void 0}else Wr?Ac(r,C)&&(wt="onCompositionEnd"):r==="keydown"&&C.keyCode===229&&(wt="onCompositionStart");wt&&($r&&C.locale!=="ko"&&(Wr||wt!=="onCompositionStart"?wt==="onCompositionEnd"&&Wr&&(bt=ls()):(tr=qe,Fo="value"in tr?tr.value:tr.textContent,Wr=!0)),yt=Su(Te,wt),0<yt.length&&(wt=new va(wt,r,null,C,qe),Ve.push({event:wt,listeners:yt}),bt?wt.data=bt:(bt=xi(C),bt!==null&&(wt.data=bt)))),(bt=cl?Rc(r,C):ah(r,C))&&(Te=Su(Te,"onBeforeInput"),0<Te.length&&(qe=new va("onBeforeInput","beforeinput",null,C,qe),Ve.push({event:qe,listeners:Te}),qe.data=bt))}qc(Ve,o)})}function vl(r,o,C){return{instance:r,listener:o,currentTarget:C}}function Su(r,o){for(var C=o+"Capture",j=[];r!==null;){var G=r,Z=G.stateNode;G.tag===5&&Z!==null&&(G=Z,Z=Ut(r,C),Z!=null&&j.unshift(vl(r,Z,G)),Z=Ut(r,o),Z!=null&&j.push(vl(r,Z,G))),r=r.return}return j}function Pa(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function ch(r,o,C,j,G){for(var Z=o._reactName,oe=[];C!==null&&C!==j;){var ce=C,he=ce.alternate,Te=ce.stateNode;if(he!==null&&he===j)break;ce.tag===5&&Te!==null&&(ce=Te,G?(he=Ut(C,Z),he!=null&&oe.unshift(vl(C,he,ce))):G||(he=Ut(C,Z),he!=null&&oe.push(vl(C,he,ce)))),C=C.return}oe.length!==0&&r.push({event:o,listeners:oe})}var Kp=/\r\n?/g,fh=/\u0000|\uFFFD/g;function Gc(r){return(typeof r=="string"?r:""+r).replace(Kp,`
|
|
30
|
-
`).replace(fh,"")}function ms(r,o,C){if(o=Gc(o),Gc(r)!==o&&C)throw Error(t(425))}function Ca(){}var Vc=null,$c=null;function Wc(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Kr=typeof setTimeout=="function"?setTimeout:void 0,Yc=typeof clearTimeout=="function"?clearTimeout:void 0,ys=typeof Promise=="function"?Promise:void 0,dh=typeof queueMicrotask=="function"?queueMicrotask:typeof ys<"u"?function(r){return ys.resolve(null).then(r).catch(hh)}:Kr;function hh(r){setTimeout(function(){throw r})}function Eu(r,o){var C=o,j=0;do{var G=C.nextSibling;if(r.removeChild(C),G&&G.nodeType===8)if(C=G.data,C==="/$"){if(j===0){r.removeChild(G),Fr(o);return}j--}else C!=="$"&&C!=="$?"&&C!=="$!"||j++;C=G}while(C);Fr(o)}function zi(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function ka(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var C=r.data;if(C==="$"||C==="$!"||C==="$?"){if(o===0)return r;o--}else C==="/$"&&o++}r=r.previousSibling}return null}var Vo=Math.random().toString(36).slice(2),ui="__reactFiber$"+Vo,bs="__reactProps$"+Vo,Bi="__reactContainer$"+Vo,Ou="__reactEvents$"+Vo,ph="__reactListeners$"+Vo,gh="__reactHandles$"+Vo;function $o(r){var o=r[ui];if(o)return o;for(var C=r.parentNode;C;){if(o=C[Bi]||C[ui]){if(C=o.alternate,o.child!==null||C!==null&&C.child!==null)for(r=ka(r);r!==null;){if(C=r[ui])return C;r=ka(r)}return o}r=C,C=r.parentNode}return null}function _s(r){return r=r[ui]||r[Bi],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Fn(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(t(33))}function Yn(r){return r[bs]||null}var xu=[],Ta=-1;function co(r){return{current:r}}function on(r){0>Ta||(r.current=xu[Ta],xu[Ta]=null,Ta--)}function en(r,o){Ta++,xu[Ta]=r.current,r.current=o}var Ui={},ir=co(Ui),dr=co(!1),Wo=Ui;function Aa(r,o){var C=r.type.contextTypes;if(!C)return Ui;var j=r.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===o)return j.__reactInternalMemoizedMaskedChildContext;var G={},Z;for(Z in C)G[Z]=o[Z];return j&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=G),G}function hr(r){return r=r.childContextTypes,r!=null}function ml(){on(dr),on(ir)}function Kc(r,o,C){if(ir.current!==Ui)throw Error(t(168));en(ir,o),en(dr,C)}function Pu(r,o,C){var j=r.stateNode;if(o=o.childContextTypes,typeof j.getChildContext!="function")return C;j=j.getChildContext();for(var G in j)if(!(G in o))throw Error(t(108,Y(r)||"Unknown",G));return L({},C,j)}function Ra(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Ui,Wo=ir.current,en(ir,r),en(dr,dr.current),!0}function vh(r,o,C){var j=r.stateNode;if(!j)throw Error(t(169));C?(r=Pu(r,o,Wo),j.__reactInternalMemoizedMergedChildContext=r,on(dr),on(ir),en(ir,r)):on(dr),en(dr,C)}var qi=null,yl=!1,Cu=!1;function ws(r){qi===null?qi=[r]:qi.push(r)}function fo(r){yl=!0,ws(r)}function Yo(){if(!Cu&&qi!==null){Cu=!0;var r=0,o=Gt;try{var C=qi;for(Gt=1;r<C.length;r++){var j=C[r];do j=j(!0);while(j!==null)}qi=null,yl=!1}catch(G){throw qi!==null&&(qi=qi.slice(r+1)),Ir(Dr,Yo),G}finally{Gt=o,Cu=!1}}return null}var xr=[],Ma=0,Ko=null,Xo=0,Pr=[],Cr=0,Zo=null,Xr=1,gn="";function La(r,o){xr[Ma++]=Xo,xr[Ma++]=Ko,Ko=r,Xo=o}function mh(r,o,C){Pr[Cr++]=Xr,Pr[Cr++]=gn,Pr[Cr++]=Zo,Zo=r;var j=Xr;r=gn;var G=32-Nt(j)-1;j&=~(1<<G),C+=1;var Z=32-Nt(o)+G;if(30<Z){var oe=G-G%5;Z=(j&(1<<oe)-1).toString(32),j>>=oe,G-=oe,Xr=1<<32-Nt(o)+G|C<<G|j,gn=Z+r}else Xr=1<<Z|C<<G|j,gn=r}function bl(r){r.return!==null&&(La(r,1),mh(r,1,0))}function Kn(r){for(;r===Ko;)Ko=xr[--Ma],xr[Ma]=null,Xo=xr[--Ma],xr[Ma]=null;for(;r===Zo;)Zo=Pr[--Cr],Pr[Cr]=null,gn=Pr[--Cr],Pr[Cr]=null,Xr=Pr[--Cr],Pr[Cr]=null}var Zr=null,Ke=null,Xt=!1,Qr=null;function Xc(r,o){var C=Ki(5,null,null,0);C.elementType="DELETED",C.stateNode=o,C.return=r,o=r.deletions,o===null?(r.deletions=[C],r.flags|=16):o.push(C)}function yh(r,o){switch(r.tag){case 5:var C=r.type;return o=o.nodeType!==1||C.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,Zr=r,Ke=zi(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,Zr=r,Ke=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(C=Zo!==null?{id:Xr,overflow:gn}:null,r.memoizedState={dehydrated:o,treeContext:C,retryLane:1073741824},C=Ki(18,null,null,0),C.stateNode=o,C.return=r,r.child=C,Zr=r,Ke=null,!0):!1;default:return!1}}function Na(r){return(r.mode&1)!==0&&(r.flags&128)===0}function _l(r){if(Xt){var o=Ke;if(o){var C=o;if(!yh(r,o)){if(Na(r))throw Error(t(418));o=zi(C.nextSibling);var j=Zr;o&&yh(r,o)?Xc(j,C):(r.flags=r.flags&-4097|2,Xt=!1,Zr=r)}}else{if(Na(r))throw Error(t(418));r.flags=r.flags&-4097|2,Xt=!1,Zr=r}}}function ku(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Zr=r}function Ss(r){if(r!==Zr)return!1;if(!Xt)return ku(r),Xt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Wc(r.type,r.memoizedProps)),o&&(o=Ke)){if(Na(r))throw Zc(),Error(t(418));for(;o;)Xc(r,o),o=zi(o.nextSibling)}if(ku(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(t(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var C=r.data;if(C==="/$"){if(o===0){Ke=zi(r.nextSibling);break e}o--}else C!=="$"&&C!=="$!"&&C!=="$?"||o++}r=r.nextSibling}Ke=null}}else Ke=Zr?zi(r.stateNode.nextSibling):null;return!0}function Zc(){for(var r=Ke;r;)r=zi(r.nextSibling)}function Ia(){Ke=Zr=null,Xt=!1}function Es(r){Qr===null?Qr=[r]:Qr.push(r)}var Qc=y.ReactCurrentBatchConfig;function Cn(r,o,C){if(r=C.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(C._owner){if(C=C._owner,C){if(C.tag!==1)throw Error(t(309));var j=C.stateNode}if(!j)throw Error(t(147,r));var G=j,Z=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===Z?o.ref:(o=function(oe){var ce=G.refs;oe===null?delete ce[Z]:ce[Z]=oe},o._stringRef=Z,o)}if(typeof r!="string")throw Error(t(284));if(!C._owner)throw Error(t(290,r))}return r}function Ur(r,o){throw r=Object.prototype.toString.call(o),Error(t(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function Pi(r){var o=r._init;return o(r._payload)}function Tu(r){function o(Ee,ve){if(r){var Pe=Ee.deletions;Pe===null?(Ee.deletions=[ve],Ee.flags|=16):Pe.push(ve)}}function C(Ee,ve){if(!r)return null;for(;ve!==null;)o(Ee,ve),ve=ve.sibling;return null}function j(Ee,ve){for(Ee=new Map;ve!==null;)ve.key!==null?Ee.set(ve.key,ve):Ee.set(ve.index,ve),ve=ve.sibling;return Ee}function G(Ee,ve){return Ee=Bl(Ee,ve),Ee.index=0,Ee.sibling=null,Ee}function Z(Ee,ve,Pe){return Ee.index=Pe,r?(Pe=Ee.alternate,Pe!==null?(Pe=Pe.index,Pe<ve?(Ee.flags|=2,ve):Pe):(Ee.flags|=2,ve)):(Ee.flags|=1048576,ve)}function oe(Ee){return r&&Ee.alternate===null&&(Ee.flags|=2),Ee}function ce(Ee,ve,Pe,We){return ve===null||ve.tag!==6?(ve=v0(Pe,Ee.mode,We),ve.return=Ee,ve):(ve=G(ve,Pe),ve.return=Ee,ve)}function he(Ee,ve,Pe,We){var dt=Pe.type;return dt===R?qe(Ee,ve,Pe.props.children,We,Pe.key):ve!==null&&(ve.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===Q&&Pi(dt)===ve.type)?(We=G(ve,Pe.props),We.ref=Cn(Ee,ve,Pe),We.return=Ee,We):(We=zh(Pe.type,Pe.key,Pe.props,null,Ee.mode,We),We.ref=Cn(Ee,ve,Pe),We.return=Ee,We)}function Te(Ee,ve,Pe,We){return ve===null||ve.tag!==4||ve.stateNode.containerInfo!==Pe.containerInfo||ve.stateNode.implementation!==Pe.implementation?(ve=m0(Pe,Ee.mode,We),ve.return=Ee,ve):(ve=G(ve,Pe.children||[]),ve.return=Ee,ve)}function qe(Ee,ve,Pe,We,dt){return ve===null||ve.tag!==7?(ve=Ns(Pe,Ee.mode,We,dt),ve.return=Ee,ve):(ve=G(ve,Pe),ve.return=Ee,ve)}function Ve(Ee,ve,Pe){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return ve=v0(""+ve,Ee.mode,Pe),ve.return=Ee,ve;if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case w:return Pe=zh(ve.type,ve.key,ve.props,null,Ee.mode,Pe),Pe.ref=Cn(Ee,null,ve),Pe.return=Ee,Pe;case N:return ve=m0(ve,Ee.mode,Pe),ve.return=Ee,ve;case Q:var We=ve._init;return Ve(Ee,We(ve._payload),Pe)}if(Ce(ve)||B(ve))return ve=Ns(ve,Ee.mode,Pe,null),ve.return=Ee,ve;Ur(Ee,ve)}return null}function Ue(Ee,ve,Pe,We){var dt=ve!==null?ve.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number")return dt!==null?null:ce(Ee,ve,""+Pe,We);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case w:return Pe.key===dt?he(Ee,ve,Pe,We):null;case N:return Pe.key===dt?Te(Ee,ve,Pe,We):null;case Q:return dt=Pe._init,Ue(Ee,ve,dt(Pe._payload),We)}if(Ce(Pe)||B(Pe))return dt!==null?null:qe(Ee,ve,Pe,We,null);Ur(Ee,Pe)}return null}function et(Ee,ve,Pe,We,dt){if(typeof We=="string"&&We!==""||typeof We=="number")return Ee=Ee.get(Pe)||null,ce(ve,Ee,""+We,dt);if(typeof We=="object"&&We!==null){switch(We.$$typeof){case w:return Ee=Ee.get(We.key===null?Pe:We.key)||null,he(ve,Ee,We,dt);case N:return Ee=Ee.get(We.key===null?Pe:We.key)||null,Te(ve,Ee,We,dt);case Q:var yt=We._init;return et(Ee,ve,Pe,yt(We._payload),dt)}if(Ce(We)||B(We))return Ee=Ee.get(Pe)||null,qe(ve,Ee,We,dt,null);Ur(ve,We)}return null}function ot(Ee,ve,Pe,We){for(var dt=null,yt=null,bt=ve,wt=ve=0,br=null;bt!==null&&wt<Pe.length;wt++){bt.index>wt?(br=bt,bt=null):br=bt.sibling;var Yt=Ue(Ee,bt,Pe[wt],We);if(Yt===null){bt===null&&(bt=br);break}r&&bt&&Yt.alternate===null&&o(Ee,bt),ve=Z(Yt,ve,wt),yt===null?dt=Yt:yt.sibling=Yt,yt=Yt,bt=br}if(wt===Pe.length)return C(Ee,bt),Xt&&La(Ee,wt),dt;if(bt===null){for(;wt<Pe.length;wt++)bt=Ve(Ee,Pe[wt],We),bt!==null&&(ve=Z(bt,ve,wt),yt===null?dt=bt:yt.sibling=bt,yt=bt);return Xt&&La(Ee,wt),dt}for(bt=j(Ee,bt);wt<Pe.length;wt++)br=et(bt,Ee,wt,Pe[wt],We),br!==null&&(r&&br.alternate!==null&&bt.delete(br.key===null?wt:br.key),ve=Z(br,ve,wt),yt===null?dt=br:yt.sibling=br,yt=br);return r&&bt.forEach(function(Ul){return o(Ee,Ul)}),Xt&&La(Ee,wt),dt}function ut(Ee,ve,Pe,We){var dt=B(Pe);if(typeof dt!="function")throw Error(t(150));if(Pe=dt.call(Pe),Pe==null)throw Error(t(151));for(var yt=dt=null,bt=ve,wt=ve=0,br=null,Yt=Pe.next();bt!==null&&!Yt.done;wt++,Yt=Pe.next()){bt.index>wt?(br=bt,bt=null):br=bt.sibling;var Ul=Ue(Ee,bt,Yt.value,We);if(Ul===null){bt===null&&(bt=br);break}r&&bt&&Ul.alternate===null&&o(Ee,bt),ve=Z(Ul,ve,wt),yt===null?dt=Ul:yt.sibling=Ul,yt=Ul,bt=br}if(Yt.done)return C(Ee,bt),Xt&&La(Ee,wt),dt;if(bt===null){for(;!Yt.done;wt++,Yt=Pe.next())Yt=Ve(Ee,Yt.value,We),Yt!==null&&(ve=Z(Yt,ve,wt),yt===null?dt=Yt:yt.sibling=Yt,yt=Yt);return Xt&&La(Ee,wt),dt}for(bt=j(Ee,bt);!Yt.done;wt++,Yt=Pe.next())Yt=et(bt,Ee,wt,Yt.value,We),Yt!==null&&(r&&Yt.alternate!==null&&bt.delete(Yt.key===null?wt:Yt.key),ve=Z(Yt,ve,wt),yt===null?dt=Yt:yt.sibling=Yt,yt=Yt);return r&&bt.forEach(function(y_){return o(Ee,y_)}),Xt&&La(Ee,wt),dt}function qn(Ee,ve,Pe,We){if(typeof Pe=="object"&&Pe!==null&&Pe.type===R&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case w:e:{for(var dt=Pe.key,yt=ve;yt!==null;){if(yt.key===dt){if(dt=Pe.type,dt===R){if(yt.tag===7){C(Ee,yt.sibling),ve=G(yt,Pe.props.children),ve.return=Ee,Ee=ve;break e}}else if(yt.elementType===dt||typeof dt=="object"&&dt!==null&&dt.$$typeof===Q&&Pi(dt)===yt.type){C(Ee,yt.sibling),ve=G(yt,Pe.props),ve.ref=Cn(Ee,yt,Pe),ve.return=Ee,Ee=ve;break e}C(Ee,yt);break}else o(Ee,yt);yt=yt.sibling}Pe.type===R?(ve=Ns(Pe.props.children,Ee.mode,We,Pe.key),ve.return=Ee,Ee=ve):(We=zh(Pe.type,Pe.key,Pe.props,null,Ee.mode,We),We.ref=Cn(Ee,ve,Pe),We.return=Ee,Ee=We)}return oe(Ee);case N:e:{for(yt=Pe.key;ve!==null;){if(ve.key===yt)if(ve.tag===4&&ve.stateNode.containerInfo===Pe.containerInfo&&ve.stateNode.implementation===Pe.implementation){C(Ee,ve.sibling),ve=G(ve,Pe.children||[]),ve.return=Ee,Ee=ve;break e}else{C(Ee,ve);break}else o(Ee,ve);ve=ve.sibling}ve=m0(Pe,Ee.mode,We),ve.return=Ee,Ee=ve}return oe(Ee);case Q:return yt=Pe._init,qn(Ee,ve,yt(Pe._payload),We)}if(Ce(Pe))return ot(Ee,ve,Pe,We);if(B(Pe))return ut(Ee,ve,Pe,We);Ur(Ee,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,ve!==null&&ve.tag===6?(C(Ee,ve.sibling),ve=G(ve,Pe),ve.return=Ee,Ee=ve):(C(Ee,ve),ve=v0(Pe,Ee.mode,We),ve.return=Ee,Ee=ve),oe(Ee)):C(Ee,ve)}return qn}var Da=Tu(!0),ci=Tu(!1),Os=co(null),Jr=null,wl=null,Au=null;function Ru(){Au=wl=Jr=null}function Mu(r){var o=Os.current;on(Os),r._currentValue=o}function Lu(r,o,C){for(;r!==null;){var j=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,j!==null&&(j.childLanes|=o)):j!==null&&(j.childLanes&o)!==o&&(j.childLanes|=o),r===C)break;r=r.return}}function ho(r,o){Jr=r,Au=wl=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&o&&(ne=!0),r.firstContext=null)}function kr(r){var o=r._currentValue;if(Au!==r)if(r={context:r,memoizedValue:o,next:null},wl===null){if(Jr===null)throw Error(t(308));wl=r,Jr.dependencies={lanes:0,firstContext:r}}else wl=wl.next=r;return o}var Hi=null;function Sl(r){Hi===null?Hi=[r]:Hi.push(r)}function xs(r,o,C,j){var G=o.interleaved;return G===null?(C.next=C,Sl(o)):(C.next=G.next,G.next=C),o.interleaved=C,ei(r,j)}function ei(r,o){r.lanes|=o;var C=r.alternate;for(C!==null&&(C.lanes|=o),C=r,r=r.return;r!==null;)r.childLanes|=o,C=r.alternate,C!==null&&(C.childLanes|=o),C=r,r=r.return;return C.tag===3?C.stateNode:null}var Gi=!1;function Ps(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nu(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Vi(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function $i(r,o,C){var j=r.updateQueue;if(j===null)return null;if(j=j.shared,Wt&2){var G=j.pending;return G===null?o.next=o:(o.next=G.next,G.next=o),j.pending=o,ei(r,C)}return G=j.interleaved,G===null?(o.next=o,Sl(j)):(o.next=G.next,G.next=o),j.interleaved=o,ei(r,C)}function Iu(r,o,C){if(o=o.updateQueue,o!==null&&(o=o.shared,(C&4194240)!==0)){var j=o.lanes;j&=r.pendingLanes,C|=j,o.lanes=C,Oc(r,C)}}function Cs(r,o){var C=r.updateQueue,j=r.alternate;if(j!==null&&(j=j.updateQueue,C===j)){var G=null,Z=null;if(C=C.firstBaseUpdate,C!==null){do{var oe={eventTime:C.eventTime,lane:C.lane,tag:C.tag,payload:C.payload,callback:C.callback,next:null};Z===null?G=Z=oe:Z=Z.next=oe,C=C.next}while(C!==null);Z===null?G=Z=o:Z=Z.next=o}else G=Z=o;C={baseState:j.baseState,firstBaseUpdate:G,lastBaseUpdate:Z,shared:j.shared,effects:j.effects},r.updateQueue=C;return}r=C.lastBaseUpdate,r===null?C.firstBaseUpdate=o:r.next=o,C.lastBaseUpdate=o}function El(r,o,C,j){var G=r.updateQueue;Gi=!1;var Z=G.firstBaseUpdate,oe=G.lastBaseUpdate,ce=G.shared.pending;if(ce!==null){G.shared.pending=null;var he=ce,Te=he.next;he.next=null,oe===null?Z=Te:oe.next=Te,oe=he;var qe=r.alternate;qe!==null&&(qe=qe.updateQueue,ce=qe.lastBaseUpdate,ce!==oe&&(ce===null?qe.firstBaseUpdate=Te:ce.next=Te,qe.lastBaseUpdate=he))}if(Z!==null){var Ve=G.baseState;oe=0,qe=Te=he=null,ce=Z;do{var Ue=ce.lane,et=ce.eventTime;if((j&Ue)===Ue){qe!==null&&(qe=qe.next={eventTime:et,lane:0,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null});e:{var ot=r,ut=ce;switch(Ue=o,et=C,ut.tag){case 1:if(ot=ut.payload,typeof ot=="function"){Ve=ot.call(et,Ve,Ue);break e}Ve=ot;break e;case 3:ot.flags=ot.flags&-65537|128;case 0:if(ot=ut.payload,Ue=typeof ot=="function"?ot.call(et,Ve,Ue):ot,Ue==null)break e;Ve=L({},Ve,Ue);break e;case 2:Gi=!0}}ce.callback!==null&&ce.lane!==0&&(r.flags|=64,Ue=G.effects,Ue===null?G.effects=[ce]:Ue.push(ce))}else et={eventTime:et,lane:Ue,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null},qe===null?(Te=qe=et,he=Ve):qe=qe.next=et,oe|=Ue;if(ce=ce.next,ce===null){if(ce=G.shared.pending,ce===null)break;Ue=ce,ce=Ue.next,Ue.next=null,G.lastBaseUpdate=Ue,G.shared.pending=null}}while(!0);if(qe===null&&(he=Ve),G.baseState=he,G.firstBaseUpdate=Te,G.lastBaseUpdate=qe,o=G.shared.interleaved,o!==null){G=o;do oe|=G.lane,G=G.next;while(G!==o)}else Z===null&&(G.shared.lanes=0);As|=oe,r.lanes=oe,r.memoizedState=Ve}}function xn(r,o,C){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var j=r[o],G=j.callback;if(G!==null){if(j.callback=null,j=C,typeof G!="function")throw Error(t(191,G));G.call(j)}}}var Ct={},tn=co(Ct),vn=co(Ct),kn=co(Ct);function zn(r){if(r===Ct)throw Error(t(174));return r}function Qo(r,o){switch(en(kn,o),en(vn,r),en(tn,Ct),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:at(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=at(o,r)}on(tn),en(tn,o)}function mn(){on(tn),on(vn),on(kn)}function Ol(r){zn(kn.current);var o=zn(tn.current),C=at(o,r.type);o!==C&&(en(vn,r),en(tn,C))}function po(r){vn.current===r&&(on(tn),on(vn))}var an=co(0);function xl(r){for(var o=r;o!==null;){if(o.tag===13){var C=o.memoizedState;if(C!==null&&(C=C.dehydrated,C===null||C.data==="$?"||C.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ja=[];function pr(){for(var r=0;r<ja.length;r++)ja[r]._workInProgressVersionPrimary=null;ja.length=0}var Pl=y.ReactCurrentDispatcher,ks=y.ReactCurrentBatchConfig,Tr=0,Qt=null,Pn=null,Rn=null,Ci=!1,Jo=!1,fi=0,Du=0;function Mn(){throw Error(t(321))}function Ts(r,o){if(o===null)return!1;for(var C=0;C<o.length&&C<r.length;C++)if(!Br(r[C],o[C]))return!1;return!0}function Cl(r,o,C,j,G,Z){if(Tr=Z,Qt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Pl.current=r===null||r.memoizedState===null?Zp:na,r=C(j,G),Jo){Z=0;do{if(Jo=!1,fi=0,25<=Z)throw Error(t(301));Z+=1,Rn=Pn=null,o.updateQueue=null,Pl.current=Uu,r=C(j,G)}while(Jo)}if(Pl.current=Rl,o=Pn!==null&&Pn.next!==null,Tr=0,Rn=Pn=Qt=null,Ci=!1,o)throw Error(t(300));return r}function kl(){var r=fi!==0;return fi=0,r}function fn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rn===null?Qt.memoizedState=Rn=r:Rn=Rn.next=r,Rn}function Bn(){if(Pn===null){var r=Qt.alternate;r=r!==null?r.memoizedState:null}else r=Pn.next;var o=Rn===null?Qt.memoizedState:Rn.next;if(o!==null)Rn=o,Pn=r;else{if(r===null)throw Error(t(310));Pn=r,r={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},Rn===null?Qt.memoizedState=Rn=r:Rn=Rn.next=r}return Rn}function gr(r,o){return typeof o=="function"?o(r):o}function vr(r){var o=Bn(),C=o.queue;if(C===null)throw Error(t(311));C.lastRenderedReducer=r;var j=Pn,G=j.baseQueue,Z=C.pending;if(Z!==null){if(G!==null){var oe=G.next;G.next=Z.next,Z.next=oe}j.baseQueue=G=Z,C.pending=null}if(G!==null){Z=G.next,j=j.baseState;var ce=oe=null,he=null,Te=Z;do{var qe=Te.lane;if((Tr&qe)===qe)he!==null&&(he=he.next={lane:0,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null}),j=Te.hasEagerState?Te.eagerState:r(j,Te.action);else{var Ve={lane:qe,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null};he===null?(ce=he=Ve,oe=j):he=he.next=Ve,Qt.lanes|=qe,As|=qe}Te=Te.next}while(Te!==null&&Te!==Z);he===null?oe=j:he.next=ce,Br(j,o.memoizedState)||(ne=!0),o.memoizedState=j,o.baseState=oe,o.baseQueue=he,C.lastRenderedState=j}if(r=C.interleaved,r!==null){G=r;do Z=G.lane,Qt.lanes|=Z,As|=Z,G=G.next;while(G!==r)}else G===null&&(C.lanes=0);return[o.memoizedState,C.dispatch]}function ju(r){var o=Bn(),C=o.queue;if(C===null)throw Error(t(311));C.lastRenderedReducer=r;var j=C.dispatch,G=C.pending,Z=o.memoizedState;if(G!==null){C.pending=null;var oe=G=G.next;do Z=r(Z,oe.action),oe=oe.next;while(oe!==G);Br(Z,o.memoizedState)||(ne=!0),o.memoizedState=Z,o.baseQueue===null&&(o.baseState=Z),C.lastRenderedState=Z}return[Z,j]}function Fu(){}function zu(r,o){var C=Qt,j=Bn(),G=o(),Z=!Br(j.memoizedState,G);if(Z&&(j.memoizedState=G,ne=!0),j=j.queue,nf(Jc.bind(null,C,j,r),[r]),j.getSnapshot!==o||Z||Rn!==null&&Rn.memoizedState.tag&1){if(C.flags|=2048,Tl(9,go.bind(null,C,j,G,o),void 0,null),yr===null)throw Error(t(349));Tr&30||bh(C,o,G)}return G}function bh(r,o,C){r.flags|=16384,r={getSnapshot:o,value:C},o=Qt.updateQueue,o===null?(o={lastEffect:null,stores:null},Qt.updateQueue=o,o.stores=[r]):(C=o.stores,C===null?o.stores=[r]:C.push(r))}function go(r,o,C,j){o.value=C,o.getSnapshot=j,ef(o)&&Bu(r)}function Jc(r,o,C){return C(function(){ef(o)&&Bu(r)})}function ef(r){var o=r.getSnapshot;r=r.value;try{var C=o();return!Br(r,C)}catch{return!0}}function Bu(r){var o=ei(r,1);o!==null&&bo(o,r,1,-1)}function ea(r){var o=fn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:r},o.queue=r,r=r.dispatch=xh.bind(null,Qt,r),[o.memoizedState,r]}function Tl(r,o,C,j){return r={tag:r,create:o,destroy:C,deps:j,next:null},o=Qt.updateQueue,o===null?(o={lastEffect:null,stores:null},Qt.updateQueue=o,o.lastEffect=r.next=r):(C=o.lastEffect,C===null?o.lastEffect=r.next=r:(j=C.next,C.next=r,r.next=j,o.lastEffect=r)),r}function tf(){return Bn().memoizedState}function Al(r,o,C,j){var G=fn();Qt.flags|=r,G.memoizedState=Tl(1|o,C,void 0,j===void 0?null:j)}function Fa(r,o,C,j){var G=Bn();j=j===void 0?null:j;var Z=void 0;if(Pn!==null){var oe=Pn.memoizedState;if(Z=oe.destroy,j!==null&&Ts(j,oe.deps)){G.memoizedState=Tl(o,C,Z,j);return}}Qt.flags|=r,G.memoizedState=Tl(1|o,C,Z,j)}function _h(r,o){return Al(8390656,8,r,o)}function nf(r,o){return Fa(2048,8,r,o)}function rf(r,o){return Fa(4,2,r,o)}function of(r,o){return Fa(4,4,r,o)}function ta(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function wh(r,o,C){return C=C!=null?C.concat([r]):null,Fa(4,4,ta.bind(null,o,r),C)}function vo(){}function af(r,o){var C=Bn();o=o===void 0?null:o;var j=C.memoizedState;return j!==null&&o!==null&&Ts(o,j[1])?j[0]:(C.memoizedState=[r,o],r)}function dn(r,o){var C=Bn();o=o===void 0?null:o;var j=C.memoizedState;return j!==null&&o!==null&&Ts(o,j[1])?j[0]:(r=r(),C.memoizedState=[r,o],r)}function Sh(r,o,C){return Tr&21?(Br(C,o)||(C=Ec(),Qt.lanes|=C,As|=C,r.baseState=!0),o):(r.baseState&&(r.baseState=!1,ne=!0),r.memoizedState=C)}function Eh(r,o){var C=Gt;Gt=C!==0&&4>C?C:4,r(!0);var j=ks.transition;ks.transition={};try{r(!1),o()}finally{Gt=C,ks.transition=j}}function Oh(){return Bn().memoizedState}function Xp(r,o,C){var j=Fl(r);if(C={lane:j,action:C,hasEagerState:!1,eagerState:null,next:null},lf(r))Ph(o,C);else if(C=xs(r,o,C,j),C!==null){var G=ni();bo(C,r,j,G),ti(C,o,j)}}function xh(r,o,C){var j=Fl(r),G={lane:j,action:C,hasEagerState:!1,eagerState:null,next:null};if(lf(r))Ph(o,G);else{var Z=r.alternate;if(r.lanes===0&&(Z===null||Z.lanes===0)&&(Z=o.lastRenderedReducer,Z!==null))try{var oe=o.lastRenderedState,ce=Z(oe,C);if(G.hasEagerState=!0,G.eagerState=ce,Br(ce,oe)){var he=o.interleaved;he===null?(G.next=G,Sl(o)):(G.next=he.next,he.next=G),o.interleaved=G;return}}catch{}finally{}C=xs(r,o,G,j),C!==null&&(G=ni(),bo(C,r,j,G),ti(C,o,j))}}function lf(r){var o=r.alternate;return r===Qt||o!==null&&o===Qt}function Ph(r,o){Jo=Ci=!0;var C=r.pending;C===null?o.next=o:(o.next=C.next,C.next=o),r.pending=o}function ti(r,o,C){if(C&4194240){var j=o.lanes;j&=r.pendingLanes,C|=j,o.lanes=C,Oc(r,C)}}var Rl={readContext:kr,useCallback:Mn,useContext:Mn,useEffect:Mn,useImperativeHandle:Mn,useInsertionEffect:Mn,useLayoutEffect:Mn,useMemo:Mn,useReducer:Mn,useRef:Mn,useState:Mn,useDebugValue:Mn,useDeferredValue:Mn,useTransition:Mn,useMutableSource:Mn,useSyncExternalStore:Mn,useId:Mn,unstable_isNewReconciler:!1},Zp={readContext:kr,useCallback:function(r,o){return fn().memoizedState=[r,o===void 0?null:o],r},useContext:kr,useEffect:_h,useImperativeHandle:function(r,o,C){return C=C!=null?C.concat([r]):null,Al(4194308,4,ta.bind(null,o,r),C)},useLayoutEffect:function(r,o){return Al(4194308,4,r,o)},useInsertionEffect:function(r,o){return Al(4,2,r,o)},useMemo:function(r,o){var C=fn();return o=o===void 0?null:o,r=r(),C.memoizedState=[r,o],r},useReducer:function(r,o,C){var j=fn();return o=C!==void 0?C(o):o,j.memoizedState=j.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},j.queue=r,r=r.dispatch=Xp.bind(null,Qt,r),[j.memoizedState,r]},useRef:function(r){var o=fn();return r={current:r},o.memoizedState=r},useState:ea,useDebugValue:vo,useDeferredValue:function(r){return fn().memoizedState=r},useTransition:function(){var r=ea(!1),o=r[0];return r=Eh.bind(null,r[1]),fn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,C){var j=Qt,G=fn();if(Xt){if(C===void 0)throw Error(t(407));C=C()}else{if(C=o(),yr===null)throw Error(t(349));Tr&30||bh(j,o,C)}G.memoizedState=C;var Z={value:C,getSnapshot:o};return G.queue=Z,_h(Jc.bind(null,j,Z,r),[r]),j.flags|=2048,Tl(9,go.bind(null,j,Z,C,o),void 0,null),C},useId:function(){var r=fn(),o=yr.identifierPrefix;if(Xt){var C=gn,j=Xr;C=(j&~(1<<32-Nt(j)-1)).toString(32)+C,o=":"+o+"R"+C,C=fi++,0<C&&(o+="H"+C.toString(32)),o+=":"}else C=Du++,o=":"+o+"r"+C.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},na={readContext:kr,useCallback:af,useContext:kr,useEffect:nf,useImperativeHandle:wh,useInsertionEffect:rf,useLayoutEffect:of,useMemo:dn,useReducer:vr,useRef:tf,useState:function(){return vr(gr)},useDebugValue:vo,useDeferredValue:function(r){var o=Bn();return Sh(o,Pn.memoizedState,r)},useTransition:function(){var r=vr(gr)[0],o=Bn().memoizedState;return[r,o]},useMutableSource:Fu,useSyncExternalStore:zu,useId:Oh,unstable_isNewReconciler:!1},Uu={readContext:kr,useCallback:af,useContext:kr,useEffect:nf,useImperativeHandle:wh,useInsertionEffect:rf,useLayoutEffect:of,useMemo:dn,useReducer:ju,useRef:tf,useState:function(){return ju(gr)},useDebugValue:vo,useDeferredValue:function(r){var o=Bn();return Pn===null?o.memoizedState=r:Sh(o,Pn.memoizedState,r)},useTransition:function(){var r=ju(gr)[0],o=Bn().memoizedState;return[r,o]},useMutableSource:Fu,useSyncExternalStore:zu,useId:Oh,unstable_isNewReconciler:!1};function or(r,o){if(r&&r.defaultProps){o=L({},o),r=r.defaultProps;for(var C in r)o[C]===void 0&&(o[C]=r[C]);return o}return o}function Ml(r,o,C,j){o=r.memoizedState,C=C(j,o),C=C==null?o:L({},o,C),r.memoizedState=C,r.lanes===0&&(r.updateQueue.baseState=C)}var Ll={isMounted:function(r){return(r=r._reactInternals)?Vt(r)===r:!1},enqueueSetState:function(r,o,C){r=r._reactInternals;var j=ni(),G=Fl(r),Z=Vi(j,G);Z.payload=o,C!=null&&(Z.callback=C),o=$i(r,Z,G),o!==null&&(bo(o,r,G,j),Iu(o,r,G))},enqueueReplaceState:function(r,o,C){r=r._reactInternals;var j=ni(),G=Fl(r),Z=Vi(j,G);Z.tag=1,Z.payload=o,C!=null&&(Z.callback=C),o=$i(r,Z,G),o!==null&&(bo(o,r,G,j),Iu(o,r,G))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var C=ni(),j=Fl(r),G=Vi(C,j);G.tag=2,o!=null&&(G.callback=o),o=$i(r,G,j),o!==null&&(bo(o,r,j,C),Iu(o,r,j))}};function qu(r,o,C,j,G,Z,oe){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(j,Z,oe):o.prototype&&o.prototype.isPureReactComponent?!wa(C,j)||!wa(G,Z):!0}function Ch(r,o,C){var j=!1,G=Ui,Z=o.contextType;return typeof Z=="object"&&Z!==null?Z=kr(Z):(G=hr(o)?Wo:ir.current,j=o.contextTypes,Z=(j=j!=null)?Aa(r,G):Ui),o=new o(C,Z),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ll,r.stateNode=o,o._reactInternals=r,j&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=G,r.__reactInternalMemoizedMaskedChildContext=Z),o}function sf(r,o,C,j){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(C,j),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(C,j),o.state!==r&&Ll.enqueueReplaceState(o,o.state,null)}function Hu(r,o,C,j){var G=r.stateNode;G.props=C,G.state=r.memoizedState,G.refs={},Ps(r);var Z=o.contextType;typeof Z=="object"&&Z!==null?G.context=kr(Z):(Z=hr(o)?Wo:ir.current,G.context=Aa(r,Z)),G.state=r.memoizedState,Z=o.getDerivedStateFromProps,typeof Z=="function"&&(Ml(r,o,Z,C),G.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof G.getSnapshotBeforeUpdate=="function"||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(o=G.state,typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount(),o!==G.state&&Ll.enqueueReplaceState(G,G.state,null),El(r,C,G,j),G.state=r.memoizedState),typeof G.componentDidMount=="function"&&(r.flags|=4194308)}function za(r,o){try{var C="",j=o;do C+=V(j),j=j.return;while(j);var G=C}catch(Z){G=`
|
|
31
|
-
Error generating stack: `+Z.message+`
|
|
32
|
-
`+Z.stack}return{value:r,source:o,stack:G,digest:null}}function Gu(r,o,C){return{value:r,source:null,stack:C??null,digest:o??null}}function Nl(r,o){try{console.error(o.value)}catch(C){setTimeout(function(){throw C})}}var Qp=typeof WeakMap=="function"?WeakMap:Map;function kh(r,o,C){C=Vi(-1,C),C.tag=3,C.payload={element:null};var j=o.value;return C.callback=function(){Lh||(Lh=!0,s0=j),Nl(r,o)},C}function s(r,o,C){C=Vi(-1,C),C.tag=3;var j=r.type.getDerivedStateFromError;if(typeof j=="function"){var G=o.value;C.payload=function(){return j(G)},C.callback=function(){Nl(r,o)}}var Z=r.stateNode;return Z!==null&&typeof Z.componentDidCatch=="function"&&(C.callback=function(){Nl(r,o),typeof j!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var oe=o.stack;this.componentDidCatch(o.value,{componentStack:oe!==null?oe:""})}),C}function f(r,o,C){var j=r.pingCache;if(j===null){j=r.pingCache=new Qp;var G=new Set;j.set(o,G)}else G=j.get(o),G===void 0&&(G=new Set,j.set(o,G));G.has(C)||(G.add(C),r=l_.bind(null,r,o,C),o.then(r,r))}function I(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function q(r,o,C,j,G){return r.mode&1?(r.flags|=65536,r.lanes=G,r):(r===o?r.flags|=65536:(r.flags|=128,C.flags|=131072,C.flags&=-52805,C.tag===1&&(C.alternate===null?C.tag=17:(o=Vi(-1,1),o.tag=2,$i(C,o,1))),C.lanes|=1),r)}var W=y.ReactCurrentOwner,ne=!1;function le(r,o,C,j){o.child=r===null?ci(o,null,C,j):Da(o,r.child,C,j)}function ye(r,o,C,j,G){C=C.render;var Z=o.ref;return ho(o,G),j=Cl(r,o,C,j,Z,G),C=kl(),r!==null&&!ne?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Xt&&C&&bl(o),o.flags|=1,le(r,o,j,G),o.child)}function Re(r,o,C,j,G){if(r===null){var Z=C.type;return typeof Z=="function"&&!g0(Z)&&Z.defaultProps===void 0&&C.compare===null&&C.defaultProps===void 0?(o.tag=15,o.type=Z,$e(r,o,Z,j,G)):(r=zh(C.type,null,j,o,o.mode,G),r.ref=o.ref,r.return=o,o.child=r)}if(Z=r.child,!(r.lanes&G)){var oe=Z.memoizedProps;if(C=C.compare,C=C!==null?C:wa,C(oe,j)&&r.ref===o.ref)return mr(r,o,G)}return o.flags|=1,r=Bl(Z,j),r.ref=o.ref,r.return=o,o.child=r}function $e(r,o,C,j,G){if(r!==null){var Z=r.memoizedProps;if(wa(Z,j)&&r.ref===o.ref)if(ne=!1,o.pendingProps=j=Z,(r.lanes&G)!==0)r.flags&131072&&(ne=!0);else return o.lanes=r.lanes,mr(r,o,G)}return Qe(r,o,C,j,G)}function nt(r,o,C){var j=o.pendingProps,G=j.children,Z=r!==null?r.memoizedState:null;if(j.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},en($u,ki),ki|=C;else{if(!(C&1073741824))return r=Z!==null?Z.baseLanes|C:C,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,en($u,ki),ki|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},j=Z!==null?Z.baseLanes:C,en($u,ki),ki|=j}else Z!==null?(j=Z.baseLanes|C,o.memoizedState=null):j=C,en($u,ki),ki|=j;return le(r,o,G,C),o.child}function Et(r,o){var C=o.ref;(r===null&&C!==null||r!==null&&r.ref!==C)&&(o.flags|=512,o.flags|=2097152)}function Qe(r,o,C,j,G){var Z=hr(C)?Wo:ir.current;return Z=Aa(o,Z),ho(o,G),C=Cl(r,o,C,j,Z,G),j=kl(),r!==null&&!ne?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Xt&&j&&bl(o),o.flags|=1,le(r,o,C,G),o.child)}function ln(r,o,C,j,G){if(hr(C)){var Z=!0;Ra(o)}else Z=!1;if(ho(o,G),o.stateNode===null)Ft(r,o),Ch(o,C,j),Hu(o,C,j,G),j=!0;else if(r===null){var oe=o.stateNode,ce=o.memoizedProps;oe.props=ce;var he=oe.context,Te=C.contextType;typeof Te=="object"&&Te!==null?Te=kr(Te):(Te=hr(C)?Wo:ir.current,Te=Aa(o,Te));var qe=C.getDerivedStateFromProps,Ve=typeof qe=="function"||typeof oe.getSnapshotBeforeUpdate=="function";Ve||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==j||he!==Te)&&sf(o,oe,j,Te),Gi=!1;var Ue=o.memoizedState;oe.state=Ue,El(o,j,oe,G),he=o.memoizedState,ce!==j||Ue!==he||dr.current||Gi?(typeof qe=="function"&&(Ml(o,C,qe,j),he=o.memoizedState),(ce=Gi||qu(o,C,ce,j,Ue,he,Te))?(Ve||typeof oe.UNSAFE_componentWillMount!="function"&&typeof oe.componentWillMount!="function"||(typeof oe.componentWillMount=="function"&&oe.componentWillMount(),typeof oe.UNSAFE_componentWillMount=="function"&&oe.UNSAFE_componentWillMount()),typeof oe.componentDidMount=="function"&&(o.flags|=4194308)):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=j,o.memoizedState=he),oe.props=j,oe.state=he,oe.context=Te,j=ce):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),j=!1)}else{oe=o.stateNode,Nu(r,o),ce=o.memoizedProps,Te=o.type===o.elementType?ce:or(o.type,ce),oe.props=Te,Ve=o.pendingProps,Ue=oe.context,he=C.contextType,typeof he=="object"&&he!==null?he=kr(he):(he=hr(C)?Wo:ir.current,he=Aa(o,he));var et=C.getDerivedStateFromProps;(qe=typeof et=="function"||typeof oe.getSnapshotBeforeUpdate=="function")||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==Ve||Ue!==he)&&sf(o,oe,j,he),Gi=!1,Ue=o.memoizedState,oe.state=Ue,El(o,j,oe,G);var ot=o.memoizedState;ce!==Ve||Ue!==ot||dr.current||Gi?(typeof et=="function"&&(Ml(o,C,et,j),ot=o.memoizedState),(Te=Gi||qu(o,C,Te,j,Ue,ot,he)||!1)?(qe||typeof oe.UNSAFE_componentWillUpdate!="function"&&typeof oe.componentWillUpdate!="function"||(typeof oe.componentWillUpdate=="function"&&oe.componentWillUpdate(j,ot,he),typeof oe.UNSAFE_componentWillUpdate=="function"&&oe.UNSAFE_componentWillUpdate(j,ot,he)),typeof oe.componentDidUpdate=="function"&&(o.flags|=4),typeof oe.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=1024),o.memoizedProps=j,o.memoizedState=ot),oe.props=j,oe.state=ot,oe.context=he,j=Te):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=1024),j=!1)}return Zt(r,o,C,j,Z,G)}function Zt(r,o,C,j,G,Z){Et(r,o);var oe=(o.flags&128)!==0;if(!j&&!oe)return G&&vh(o,C,!1),mr(r,o,Z);j=o.stateNode,W.current=o;var ce=oe&&typeof C.getDerivedStateFromError!="function"?null:j.render();return o.flags|=1,r!==null&&oe?(o.child=Da(o,r.child,null,Z),o.child=Da(o,null,ce,Z)):le(r,o,ce,Z),o.memoizedState=j.state,G&&vh(o,C,!0),o.child}function Ar(r){var o=r.stateNode;o.pendingContext?Kc(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Kc(r,o.context,!1),Qo(r,o.containerInfo)}function Wi(r,o,C,j,G){return Ia(),Es(G),o.flags|=256,le(r,o,C,j),o.child}var ke={dehydrated:null,treeContext:null,retryLane:0};function we(r){return{baseLanes:r,cachePool:null,transitions:null}}function Me(r,o,C){var j=o.pendingProps,G=an.current,Z=!1,oe=(o.flags&128)!==0,ce;if((ce=oe)||(ce=r!==null&&r.memoizedState===null?!1:(G&2)!==0),ce?(Z=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(G|=1),en(an,G&1),r===null)return _l(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(o.mode&1?r.data==="$!"?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(oe=j.children,r=j.fallback,Z?(j=o.mode,Z=o.child,oe={mode:"hidden",children:oe},!(j&1)&&Z!==null?(Z.childLanes=0,Z.pendingProps=oe):Z=Bh(oe,j,0,null),r=Ns(r,j,C,null),Z.return=o,r.return=o,Z.sibling=r,o.child=Z,o.child.memoizedState=we(C),o.memoizedState=ke,r):Je(o,oe));if(G=r.memoizedState,G!==null&&(ce=G.dehydrated,ce!==null))return Rt(r,o,oe,j,ce,G,C);if(Z){Z=j.fallback,oe=o.mode,G=r.child,ce=G.sibling;var he={mode:"hidden",children:j.children};return!(oe&1)&&o.child!==G?(j=o.child,j.childLanes=0,j.pendingProps=he,o.deletions=null):(j=Bl(G,he),j.subtreeFlags=G.subtreeFlags&14680064),ce!==null?Z=Bl(ce,Z):(Z=Ns(Z,oe,C,null),Z.flags|=2),Z.return=o,j.return=o,j.sibling=Z,o.child=j,j=Z,Z=o.child,oe=r.child.memoizedState,oe=oe===null?we(C):{baseLanes:oe.baseLanes|C,cachePool:null,transitions:oe.transitions},Z.memoizedState=oe,Z.childLanes=r.childLanes&~C,o.memoizedState=ke,j}return Z=r.child,r=Z.sibling,j=Bl(Z,{mode:"visible",children:j.children}),!(o.mode&1)&&(j.lanes=C),j.return=o,j.sibling=null,r!==null&&(C=o.deletions,C===null?(o.deletions=[r],o.flags|=16):C.push(r)),o.child=j,o.memoizedState=null,j}function Je(r,o){return o=Bh({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function gt(r,o,C,j){return j!==null&&Es(j),Da(o,r.child,null,C),r=Je(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Rt(r,o,C,j,G,Z,oe){if(C)return o.flags&256?(o.flags&=-257,j=Gu(Error(t(422))),gt(r,o,oe,j)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(Z=j.fallback,G=o.mode,j=Bh({mode:"visible",children:j.children},G,0,null),Z=Ns(Z,G,oe,null),Z.flags|=2,j.return=o,Z.return=o,j.sibling=Z,o.child=j,o.mode&1&&Da(o,r.child,null,oe),o.child.memoizedState=we(oe),o.memoizedState=ke,Z);if(!(o.mode&1))return gt(r,o,oe,null);if(G.data==="$!"){if(j=G.nextSibling&&G.nextSibling.dataset,j)var ce=j.dgst;return j=ce,Z=Error(t(419)),j=Gu(Z,j,void 0),gt(r,o,oe,j)}if(ce=(oe&r.childLanes)!==0,ne||ce){if(j=yr,j!==null){switch(oe&-oe){case 4:G=2;break;case 16:G=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:G=32;break;case 536870912:G=268435456;break;default:G=0}G=G&(j.suspendedLanes|oe)?0:G,G!==0&&G!==Z.retryLane&&(Z.retryLane=G,ei(r,G),bo(j,r,G,-1))}return p0(),j=Gu(Error(t(421))),gt(r,o,oe,j)}return G.data==="$?"?(o.flags|=128,o.child=r.child,o=s_.bind(null,r),G._reactRetry=o,null):(r=Z.treeContext,Ke=zi(G.nextSibling),Zr=o,Xt=!0,Qr=null,r!==null&&(Pr[Cr++]=Xr,Pr[Cr++]=gn,Pr[Cr++]=Zo,Xr=r.id,gn=r.overflow,Zo=o),o=Je(o,j.children),o.flags|=4096,o)}function Ot(r,o,C){r.lanes|=o;var j=r.alternate;j!==null&&(j.lanes|=o),Lu(r.return,o,C)}function qt(r,o,C,j,G){var Z=r.memoizedState;Z===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:j,tail:C,tailMode:G}:(Z.isBackwards=o,Z.rendering=null,Z.renderingStartTime=0,Z.last=j,Z.tail=C,Z.tailMode=G)}function Un(r,o,C){var j=o.pendingProps,G=j.revealOrder,Z=j.tail;if(le(r,o,j.children,C),j=an.current,j&2)j=j&1|2,o.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ot(r,C,o);else if(r.tag===19)Ot(r,C,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}j&=1}if(en(an,j),!(o.mode&1))o.memoizedState=null;else switch(G){case"forwards":for(C=o.child,G=null;C!==null;)r=C.alternate,r!==null&&xl(r)===null&&(G=C),C=C.sibling;C=G,C===null?(G=o.child,o.child=null):(G=C.sibling,C.sibling=null),qt(o,!1,G,C,Z);break;case"backwards":for(C=null,G=o.child,o.child=null;G!==null;){if(r=G.alternate,r!==null&&xl(r)===null){o.child=G;break}r=G.sibling,G.sibling=C,C=G,G=r}qt(o,!0,C,null,Z);break;case"together":qt(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Ft(r,o){!(o.mode&1)&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function mr(r,o,C){if(r!==null&&(o.dependencies=r.dependencies),As|=o.lanes,!(C&o.childLanes))return null;if(r!==null&&o.child!==r.child)throw Error(t(153));if(o.child!==null){for(r=o.child,C=Bl(r,r.pendingProps),o.child=C,C.return=o;r.sibling!==null;)r=r.sibling,C=C.sibling=Bl(r,r.pendingProps),C.return=o;C.sibling=null}return o.child}function Jp(r,o,C){switch(o.tag){case 3:Ar(o),Ia();break;case 5:Ol(o);break;case 1:hr(o.type)&&Ra(o);break;case 4:Qo(o,o.stateNode.containerInfo);break;case 10:var j=o.type._context,G=o.memoizedProps.value;en(Os,j._currentValue),j._currentValue=G;break;case 13:if(j=o.memoizedState,j!==null)return j.dehydrated!==null?(en(an,an.current&1),o.flags|=128,null):C&o.child.childLanes?Me(r,o,C):(en(an,an.current&1),r=mr(r,o,C),r!==null?r.sibling:null);en(an,an.current&1);break;case 19:if(j=(C&o.childLanes)!==0,r.flags&128){if(j)return Un(r,o,C);o.flags|=128}if(G=o.memoizedState,G!==null&&(G.rendering=null,G.tail=null,G.lastEffect=null),en(an,an.current),j)break;return null;case 22:case 23:return o.lanes=0,nt(r,o,C)}return mr(r,o,C)}var Pv,e0,Cv,kv;Pv=function(r,o){for(var C=o.child;C!==null;){if(C.tag===5||C.tag===6)r.appendChild(C.stateNode);else if(C.tag!==4&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break;for(;C.sibling===null;){if(C.return===null||C.return===o)return;C=C.return}C.sibling.return=C.return,C=C.sibling}},e0=function(){},Cv=function(r,o,C,j){var G=r.memoizedProps;if(G!==j){r=o.stateNode,zn(tn.current);var Z=null;switch(C){case"input":G=pe(r,G),j=pe(r,j),Z=[];break;case"select":G=L({},G,{value:void 0}),j=L({},j,{value:void 0}),Z=[];break;case"textarea":G=se(r,G),j=se(r,j),Z=[];break;default:typeof G.onClick!="function"&&typeof j.onClick=="function"&&(r.onclick=Ca)}Se(C,j);var oe;C=null;for(Te in G)if(!j.hasOwnProperty(Te)&&G.hasOwnProperty(Te)&&G[Te]!=null)if(Te==="style"){var ce=G[Te];for(oe in ce)ce.hasOwnProperty(oe)&&(C||(C={}),C[oe]="")}else Te!=="dangerouslySetInnerHTML"&&Te!=="children"&&Te!=="suppressContentEditableWarning"&&Te!=="suppressHydrationWarning"&&Te!=="autoFocus"&&(a.hasOwnProperty(Te)?Z||(Z=[]):(Z=Z||[]).push(Te,null));for(Te in j){var he=j[Te];if(ce=G!=null?G[Te]:void 0,j.hasOwnProperty(Te)&&he!==ce&&(he!=null||ce!=null))if(Te==="style")if(ce){for(oe in ce)!ce.hasOwnProperty(oe)||he&&he.hasOwnProperty(oe)||(C||(C={}),C[oe]="");for(oe in he)he.hasOwnProperty(oe)&&ce[oe]!==he[oe]&&(C||(C={}),C[oe]=he[oe])}else C||(Z||(Z=[]),Z.push(Te,C)),C=he;else Te==="dangerouslySetInnerHTML"?(he=he?he.__html:void 0,ce=ce?ce.__html:void 0,he!=null&&ce!==he&&(Z=Z||[]).push(Te,he)):Te==="children"?typeof he!="string"&&typeof he!="number"||(Z=Z||[]).push(Te,""+he):Te!=="suppressContentEditableWarning"&&Te!=="suppressHydrationWarning"&&(a.hasOwnProperty(Te)?(he!=null&&Te==="onScroll"&&rn("scroll",r),Z||ce===he||(Z=[])):(Z=Z||[]).push(Te,he))}C&&(Z=Z||[]).push("style",C);var Te=Z;(o.updateQueue=Te)&&(o.flags|=4)}},kv=function(r,o,C,j){C!==j&&(o.flags|=4)};function uf(r,o){if(!Xt)switch(r.tailMode){case"hidden":o=r.tail;for(var C=null;o!==null;)o.alternate!==null&&(C=o),o=o.sibling;C===null?r.tail=null:C.sibling=null;break;case"collapsed":C=r.tail;for(var j=null;C!==null;)C.alternate!==null&&(j=C),C=C.sibling;j===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:j.sibling=null}}function qr(r){var o=r.alternate!==null&&r.alternate.child===r.child,C=0,j=0;if(o)for(var G=r.child;G!==null;)C|=G.lanes|G.childLanes,j|=G.subtreeFlags&14680064,j|=G.flags&14680064,G.return=r,G=G.sibling;else for(G=r.child;G!==null;)C|=G.lanes|G.childLanes,j|=G.subtreeFlags,j|=G.flags,G.return=r,G=G.sibling;return r.subtreeFlags|=j,r.childLanes=C,o}function Z4(r,o,C){var j=o.pendingProps;switch(Kn(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qr(o),null;case 1:return hr(o.type)&&ml(),qr(o),null;case 3:return j=o.stateNode,mn(),on(dr),on(ir),pr(),j.pendingContext&&(j.context=j.pendingContext,j.pendingContext=null),(r===null||r.child===null)&&(Ss(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,Qr!==null&&(f0(Qr),Qr=null))),e0(r,o),qr(o),null;case 5:po(o);var G=zn(kn.current);if(C=o.type,r!==null&&o.stateNode!=null)Cv(r,o,C,j,G),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!j){if(o.stateNode===null)throw Error(t(166));return qr(o),null}if(r=zn(tn.current),Ss(o)){j=o.stateNode,C=o.type;var Z=o.memoizedProps;switch(j[ui]=o,j[bs]=Z,r=(o.mode&1)!==0,C){case"dialog":rn("cancel",j),rn("close",j);break;case"iframe":case"object":case"embed":rn("load",j);break;case"video":case"audio":for(G=0;G<Go.length;G++)rn(Go[G],j);break;case"source":rn("error",j);break;case"img":case"image":case"link":rn("error",j),rn("load",j);break;case"details":rn("toggle",j);break;case"input":Oe(j,Z),rn("invalid",j);break;case"select":j._wrapperState={wasMultiple:!!Z.multiple},rn("invalid",j);break;case"textarea":me(j,Z),rn("invalid",j)}Se(C,Z),G=null;for(var oe in Z)if(Z.hasOwnProperty(oe)){var ce=Z[oe];oe==="children"?typeof ce=="string"?j.textContent!==ce&&(Z.suppressHydrationWarning!==!0&&ms(j.textContent,ce,r),G=["children",ce]):typeof ce=="number"&&j.textContent!==""+ce&&(Z.suppressHydrationWarning!==!0&&ms(j.textContent,ce,r),G=["children",""+ce]):a.hasOwnProperty(oe)&&ce!=null&&oe==="onScroll"&&rn("scroll",j)}switch(C){case"input":ae(j),fe(j,Z,!0);break;case"textarea":ae(j),Ne(j);break;case"select":case"option":break;default:typeof Z.onClick=="function"&&(j.onclick=Ca)}j=G,o.updateQueue=j,j!==null&&(o.flags|=4)}else{oe=G.nodeType===9?G:G.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=ct(C)),r==="http://www.w3.org/1999/xhtml"?C==="script"?(r=oe.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof j.is=="string"?r=oe.createElement(C,{is:j.is}):(r=oe.createElement(C),C==="select"&&(oe=r,j.multiple?oe.multiple=!0:j.size&&(oe.size=j.size))):r=oe.createElementNS(r,C),r[ui]=o,r[bs]=j,Pv(r,o,!1,!1),o.stateNode=r;e:{switch(oe=vt(C,j),C){case"dialog":rn("cancel",r),rn("close",r),G=j;break;case"iframe":case"object":case"embed":rn("load",r),G=j;break;case"video":case"audio":for(G=0;G<Go.length;G++)rn(Go[G],r);G=j;break;case"source":rn("error",r),G=j;break;case"img":case"image":case"link":rn("error",r),rn("load",r),G=j;break;case"details":rn("toggle",r),G=j;break;case"input":Oe(r,j),G=pe(r,j),rn("invalid",r);break;case"option":G=j;break;case"select":r._wrapperState={wasMultiple:!!j.multiple},G=L({},j,{value:void 0}),rn("invalid",r);break;case"textarea":me(r,j),G=se(r,j),rn("invalid",r);break;default:G=j}Se(C,G),ce=G;for(Z in ce)if(ce.hasOwnProperty(Z)){var he=ce[Z];Z==="style"?xt(r,he):Z==="dangerouslySetInnerHTML"?(he=he?he.__html:void 0,he!=null&&Fe(r,he)):Z==="children"?typeof he=="string"?(C!=="textarea"||he!=="")&&He(r,he):typeof he=="number"&&He(r,""+he):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(a.hasOwnProperty(Z)?he!=null&&Z==="onScroll"&&rn("scroll",r):he!=null&&m(r,Z,he,oe))}switch(C){case"input":ae(r),fe(r,j,!1);break;case"textarea":ae(r),Ne(r);break;case"option":j.value!=null&&r.setAttribute("value",""+te(j.value));break;case"select":r.multiple=!!j.multiple,Z=j.value,Z!=null?Ae(r,!!j.multiple,Z,!1):j.defaultValue!=null&&Ae(r,!!j.multiple,j.defaultValue,!0);break;default:typeof G.onClick=="function"&&(r.onclick=Ca)}switch(C){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}}j&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return qr(o),null;case 6:if(r&&o.stateNode!=null)kv(r,o,r.memoizedProps,j);else{if(typeof j!="string"&&o.stateNode===null)throw Error(t(166));if(C=zn(kn.current),zn(tn.current),Ss(o)){if(j=o.stateNode,C=o.memoizedProps,j[ui]=o,(Z=j.nodeValue!==C)&&(r=Zr,r!==null))switch(r.tag){case 3:ms(j.nodeValue,C,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ms(j.nodeValue,C,(r.mode&1)!==0)}Z&&(o.flags|=4)}else j=(C.nodeType===9?C:C.ownerDocument).createTextNode(j),j[ui]=o,o.stateNode=j}return qr(o),null;case 13:if(on(an),j=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xt&&Ke!==null&&o.mode&1&&!(o.flags&128))Zc(),Ia(),o.flags|=98560,Z=!1;else if(Z=Ss(o),j!==null&&j.dehydrated!==null){if(r===null){if(!Z)throw Error(t(318));if(Z=o.memoizedState,Z=Z!==null?Z.dehydrated:null,!Z)throw Error(t(317));Z[ui]=o}else Ia(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;qr(o),Z=!1}else Qr!==null&&(f0(Qr),Qr=null),Z=!0;if(!Z)return o.flags&65536?o:null}return o.flags&128?(o.lanes=C,o):(j=j!==null,j!==(r!==null&&r.memoizedState!==null)&&j&&(o.child.flags|=8192,o.mode&1&&(r===null||an.current&1?ar===0&&(ar=3):p0())),o.updateQueue!==null&&(o.flags|=4),qr(o),null);case 4:return mn(),e0(r,o),r===null&&xa(o.stateNode.containerInfo),qr(o),null;case 10:return Mu(o.type._context),qr(o),null;case 17:return hr(o.type)&&ml(),qr(o),null;case 19:if(on(an),Z=o.memoizedState,Z===null)return qr(o),null;if(j=(o.flags&128)!==0,oe=Z.rendering,oe===null)if(j)uf(Z,!1);else{if(ar!==0||r!==null&&r.flags&128)for(r=o.child;r!==null;){if(oe=xl(r),oe!==null){for(o.flags|=128,uf(Z,!1),j=oe.updateQueue,j!==null&&(o.updateQueue=j,o.flags|=4),o.subtreeFlags=0,j=C,C=o.child;C!==null;)Z=C,r=j,Z.flags&=14680066,oe=Z.alternate,oe===null?(Z.childLanes=0,Z.lanes=r,Z.child=null,Z.subtreeFlags=0,Z.memoizedProps=null,Z.memoizedState=null,Z.updateQueue=null,Z.dependencies=null,Z.stateNode=null):(Z.childLanes=oe.childLanes,Z.lanes=oe.lanes,Z.child=oe.child,Z.subtreeFlags=0,Z.deletions=null,Z.memoizedProps=oe.memoizedProps,Z.memoizedState=oe.memoizedState,Z.updateQueue=oe.updateQueue,Z.type=oe.type,r=oe.dependencies,Z.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),C=C.sibling;return en(an,an.current&1|2),o.child}r=r.sibling}Z.tail!==null&&Jt()>Wu&&(o.flags|=128,j=!0,uf(Z,!1),o.lanes=4194304)}else{if(!j)if(r=xl(oe),r!==null){if(o.flags|=128,j=!0,C=r.updateQueue,C!==null&&(o.updateQueue=C,o.flags|=4),uf(Z,!0),Z.tail===null&&Z.tailMode==="hidden"&&!oe.alternate&&!Xt)return qr(o),null}else 2*Jt()-Z.renderingStartTime>Wu&&C!==1073741824&&(o.flags|=128,j=!0,uf(Z,!1),o.lanes=4194304);Z.isBackwards?(oe.sibling=o.child,o.child=oe):(C=Z.last,C!==null?C.sibling=oe:o.child=oe,Z.last=oe)}return Z.tail!==null?(o=Z.tail,Z.rendering=o,Z.tail=o.sibling,Z.renderingStartTime=Jt(),o.sibling=null,C=an.current,en(an,j?C&1|2:C&1),o):(qr(o),null);case 22:case 23:return h0(),j=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==j&&(o.flags|=8192),j&&o.mode&1?ki&1073741824&&(qr(o),o.subtreeFlags&6&&(o.flags|=8192)):qr(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function Q4(r,o){switch(Kn(o),o.tag){case 1:return hr(o.type)&&ml(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return mn(),on(dr),on(ir),pr(),r=o.flags,r&65536&&!(r&128)?(o.flags=r&-65537|128,o):null;case 5:return po(o),null;case 13:if(on(an),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(t(340));Ia()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return on(an),null;case 4:return mn(),null;case 10:return Mu(o.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var Th=!1,Hr=!1,J4=typeof WeakSet=="function"?WeakSet:Set,it=null;function Vu(r,o){var C=r.ref;if(C!==null)if(typeof C=="function")try{C(null)}catch(j){Ln(r,o,j)}else C.current=null}function t0(r,o,C){try{C()}catch(j){Ln(r,o,j)}}var Tv=!1;function e_(r,o){if(Vc=iu,r=jn(),hl(r)){if("selectionStart"in r)var C={start:r.selectionStart,end:r.selectionEnd};else e:{C=(C=r.ownerDocument)&&C.defaultView||window;var j=C.getSelection&&C.getSelection();if(j&&j.rangeCount!==0){C=j.anchorNode;var G=j.anchorOffset,Z=j.focusNode;j=j.focusOffset;try{C.nodeType,Z.nodeType}catch{C=null;break e}var oe=0,ce=-1,he=-1,Te=0,qe=0,Ve=r,Ue=null;t:for(;;){for(var et;Ve!==C||G!==0&&Ve.nodeType!==3||(ce=oe+G),Ve!==Z||j!==0&&Ve.nodeType!==3||(he=oe+j),Ve.nodeType===3&&(oe+=Ve.nodeValue.length),(et=Ve.firstChild)!==null;)Ue=Ve,Ve=et;for(;;){if(Ve===r)break t;if(Ue===C&&++Te===G&&(ce=oe),Ue===Z&&++qe===j&&(he=oe),(et=Ve.nextSibling)!==null)break;Ve=Ue,Ue=Ve.parentNode}Ve=et}C=ce===-1||he===-1?null:{start:ce,end:he}}else C=null}C=C||{start:0,end:0}}else C=null;for($c={focusedElem:r,selectionRange:C},iu=!1,it=o;it!==null;)if(o=it,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,it=r;else for(;it!==null;){o=it;try{var ot=o.alternate;if(o.flags&1024)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ot!==null){var ut=ot.memoizedProps,qn=ot.memoizedState,Ee=o.stateNode,ve=Ee.getSnapshotBeforeUpdate(o.elementType===o.type?ut:or(o.type,ut),qn);Ee.__reactInternalSnapshotBeforeUpdate=ve}break;case 3:var Pe=o.stateNode.containerInfo;Pe.nodeType===1?Pe.textContent="":Pe.nodeType===9&&Pe.documentElement&&Pe.removeChild(Pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(We){Ln(o,o.return,We)}if(r=o.sibling,r!==null){r.return=o.return,it=r;break}it=o.return}return ot=Tv,Tv=!1,ot}function cf(r,o,C){var j=o.updateQueue;if(j=j!==null?j.lastEffect:null,j!==null){var G=j=j.next;do{if((G.tag&r)===r){var Z=G.destroy;G.destroy=void 0,Z!==void 0&&t0(o,C,Z)}G=G.next}while(G!==j)}}function Ah(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var C=o=o.next;do{if((C.tag&r)===r){var j=C.create;C.destroy=j()}C=C.next}while(C!==o)}}function n0(r){var o=r.ref;if(o!==null){var C=r.stateNode;switch(r.tag){case 5:r=C;break;default:r=C}typeof o=="function"?o(r):o.current=r}}function Av(r){var o=r.alternate;o!==null&&(r.alternate=null,Av(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[ui],delete o[bs],delete o[Ou],delete o[ph],delete o[gh])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Rv(r){return r.tag===5||r.tag===3||r.tag===4}function Mv(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Rv(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function r0(r,o,C){var j=r.tag;if(j===5||j===6)r=r.stateNode,o?C.nodeType===8?C.parentNode.insertBefore(r,o):C.insertBefore(r,o):(C.nodeType===8?(o=C.parentNode,o.insertBefore(r,C)):(o=C,o.appendChild(r)),C=C._reactRootContainer,C!=null||o.onclick!==null||(o.onclick=Ca));else if(j!==4&&(r=r.child,r!==null))for(r0(r,o,C),r=r.sibling;r!==null;)r0(r,o,C),r=r.sibling}function i0(r,o,C){var j=r.tag;if(j===5||j===6)r=r.stateNode,o?C.insertBefore(r,o):C.appendChild(r);else if(j!==4&&(r=r.child,r!==null))for(i0(r,o,C),r=r.sibling;r!==null;)i0(r,o,C),r=r.sibling}var Rr=null,mo=!1;function Il(r,o,C){for(C=C.child;C!==null;)Lv(r,o,C),C=C.sibling}function Lv(r,o,C){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(ro,C)}catch{}switch(C.tag){case 5:Hr||Vu(C,o);case 6:var j=Rr,G=mo;Rr=null,Il(r,o,C),Rr=j,mo=G,Rr!==null&&(mo?(r=Rr,C=C.stateNode,r.nodeType===8?r.parentNode.removeChild(C):r.removeChild(C)):Rr.removeChild(C.stateNode));break;case 18:Rr!==null&&(mo?(r=Rr,C=C.stateNode,r.nodeType===8?Eu(r.parentNode,C):r.nodeType===1&&Eu(r,C),Fr(r)):Eu(Rr,C.stateNode));break;case 4:j=Rr,G=mo,Rr=C.stateNode.containerInfo,mo=!0,Il(r,o,C),Rr=j,mo=G;break;case 0:case 11:case 14:case 15:if(!Hr&&(j=C.updateQueue,j!==null&&(j=j.lastEffect,j!==null))){G=j=j.next;do{var Z=G,oe=Z.destroy;Z=Z.tag,oe!==void 0&&(Z&2||Z&4)&&t0(C,o,oe),G=G.next}while(G!==j)}Il(r,o,C);break;case 1:if(!Hr&&(Vu(C,o),j=C.stateNode,typeof j.componentWillUnmount=="function"))try{j.props=C.memoizedProps,j.state=C.memoizedState,j.componentWillUnmount()}catch(ce){Ln(C,o,ce)}Il(r,o,C);break;case 21:Il(r,o,C);break;case 22:C.mode&1?(Hr=(j=Hr)||C.memoizedState!==null,Il(r,o,C),Hr=j):Il(r,o,C);break;default:Il(r,o,C)}}function Nv(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var C=r.stateNode;C===null&&(C=r.stateNode=new J4),o.forEach(function(j){var G=u_.bind(null,r,j);C.has(j)||(C.add(j),j.then(G,G))})}}function yo(r,o){var C=o.deletions;if(C!==null)for(var j=0;j<C.length;j++){var G=C[j];try{var Z=r,oe=o,ce=oe;e:for(;ce!==null;){switch(ce.tag){case 5:Rr=ce.stateNode,mo=!1;break e;case 3:Rr=ce.stateNode.containerInfo,mo=!0;break e;case 4:Rr=ce.stateNode.containerInfo,mo=!0;break e}ce=ce.return}if(Rr===null)throw Error(t(160));Lv(Z,oe,G),Rr=null,mo=!1;var he=G.alternate;he!==null&&(he.return=null),G.return=null}catch(Te){Ln(G,o,Te)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Iv(o,r),o=o.sibling}function Iv(r,o){var C=r.alternate,j=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(yo(o,r),ra(r),j&4){try{cf(3,r,r.return),Ah(3,r)}catch(ut){Ln(r,r.return,ut)}try{cf(5,r,r.return)}catch(ut){Ln(r,r.return,ut)}}break;case 1:yo(o,r),ra(r),j&512&&C!==null&&Vu(C,C.return);break;case 5:if(yo(o,r),ra(r),j&512&&C!==null&&Vu(C,C.return),r.flags&32){var G=r.stateNode;try{He(G,"")}catch(ut){Ln(r,r.return,ut)}}if(j&4&&(G=r.stateNode,G!=null)){var Z=r.memoizedProps,oe=C!==null?C.memoizedProps:Z,ce=r.type,he=r.updateQueue;if(r.updateQueue=null,he!==null)try{ce==="input"&&Z.type==="radio"&&Z.name!=null&&_e(G,Z),vt(ce,oe);var Te=vt(ce,Z);for(oe=0;oe<he.length;oe+=2){var qe=he[oe],Ve=he[oe+1];qe==="style"?xt(G,Ve):qe==="dangerouslySetInnerHTML"?Fe(G,Ve):qe==="children"?He(G,Ve):m(G,qe,Ve,Te)}switch(ce){case"input":Le(G,Z);break;case"textarea":xe(G,Z);break;case"select":var Ue=G._wrapperState.wasMultiple;G._wrapperState.wasMultiple=!!Z.multiple;var et=Z.value;et!=null?Ae(G,!!Z.multiple,et,!1):Ue!==!!Z.multiple&&(Z.defaultValue!=null?Ae(G,!!Z.multiple,Z.defaultValue,!0):Ae(G,!!Z.multiple,Z.multiple?[]:"",!1))}G[bs]=Z}catch(ut){Ln(r,r.return,ut)}}break;case 6:if(yo(o,r),ra(r),j&4){if(r.stateNode===null)throw Error(t(162));G=r.stateNode,Z=r.memoizedProps;try{G.nodeValue=Z}catch(ut){Ln(r,r.return,ut)}}break;case 3:if(yo(o,r),ra(r),j&4&&C!==null&&C.memoizedState.isDehydrated)try{Fr(o.containerInfo)}catch(ut){Ln(r,r.return,ut)}break;case 4:yo(o,r),ra(r);break;case 13:yo(o,r),ra(r),G=r.child,G.flags&8192&&(Z=G.memoizedState!==null,G.stateNode.isHidden=Z,!Z||G.alternate!==null&&G.alternate.memoizedState!==null||(l0=Jt())),j&4&&Nv(r);break;case 22:if(qe=C!==null&&C.memoizedState!==null,r.mode&1?(Hr=(Te=Hr)||qe,yo(o,r),Hr=Te):yo(o,r),ra(r),j&8192){if(Te=r.memoizedState!==null,(r.stateNode.isHidden=Te)&&!qe&&r.mode&1)for(it=r,qe=r.child;qe!==null;){for(Ve=it=qe;it!==null;){switch(Ue=it,et=Ue.child,Ue.tag){case 0:case 11:case 14:case 15:cf(4,Ue,Ue.return);break;case 1:Vu(Ue,Ue.return);var ot=Ue.stateNode;if(typeof ot.componentWillUnmount=="function"){j=Ue,C=Ue.return;try{o=j,ot.props=o.memoizedProps,ot.state=o.memoizedState,ot.componentWillUnmount()}catch(ut){Ln(j,C,ut)}}break;case 5:Vu(Ue,Ue.return);break;case 22:if(Ue.memoizedState!==null){Fv(Ve);continue}}et!==null?(et.return=Ue,it=et):Fv(Ve)}qe=qe.sibling}e:for(qe=null,Ve=r;;){if(Ve.tag===5){if(qe===null){qe=Ve;try{G=Ve.stateNode,Te?(Z=G.style,typeof Z.setProperty=="function"?Z.setProperty("display","none","important"):Z.display="none"):(ce=Ve.stateNode,he=Ve.memoizedProps.style,oe=he!=null&&he.hasOwnProperty("display")?he.display:null,ce.style.display=At("display",oe))}catch(ut){Ln(r,r.return,ut)}}}else if(Ve.tag===6){if(qe===null)try{Ve.stateNode.nodeValue=Te?"":Ve.memoizedProps}catch(ut){Ln(r,r.return,ut)}}else if((Ve.tag!==22&&Ve.tag!==23||Ve.memoizedState===null||Ve===r)&&Ve.child!==null){Ve.child.return=Ve,Ve=Ve.child;continue}if(Ve===r)break e;for(;Ve.sibling===null;){if(Ve.return===null||Ve.return===r)break e;qe===Ve&&(qe=null),Ve=Ve.return}qe===Ve&&(qe=null),Ve.sibling.return=Ve.return,Ve=Ve.sibling}}break;case 19:yo(o,r),ra(r),j&4&&Nv(r);break;case 21:break;default:yo(o,r),ra(r)}}function ra(r){var o=r.flags;if(o&2){try{e:{for(var C=r.return;C!==null;){if(Rv(C)){var j=C;break e}C=C.return}throw Error(t(160))}switch(j.tag){case 5:var G=j.stateNode;j.flags&32&&(He(G,""),j.flags&=-33);var Z=Mv(r);i0(r,Z,G);break;case 3:case 4:var oe=j.stateNode.containerInfo,ce=Mv(r);r0(r,ce,oe);break;default:throw Error(t(161))}}catch(he){Ln(r,r.return,he)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function t_(r,o,C){it=r,Dv(r)}function Dv(r,o,C){for(var j=(r.mode&1)!==0;it!==null;){var G=it,Z=G.child;if(G.tag===22&&j){var oe=G.memoizedState!==null||Th;if(!oe){var ce=G.alternate,he=ce!==null&&ce.memoizedState!==null||Hr;ce=Th;var Te=Hr;if(Th=oe,(Hr=he)&&!Te)for(it=G;it!==null;)oe=it,he=oe.child,oe.tag===22&&oe.memoizedState!==null?zv(G):he!==null?(he.return=oe,it=he):zv(G);for(;Z!==null;)it=Z,Dv(Z),Z=Z.sibling;it=G,Th=ce,Hr=Te}jv(r)}else G.subtreeFlags&8772&&Z!==null?(Z.return=G,it=Z):jv(r)}}function jv(r){for(;it!==null;){var o=it;if(o.flags&8772){var C=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:Hr||Ah(5,o);break;case 1:var j=o.stateNode;if(o.flags&4&&!Hr)if(C===null)j.componentDidMount();else{var G=o.elementType===o.type?C.memoizedProps:or(o.type,C.memoizedProps);j.componentDidUpdate(G,C.memoizedState,j.__reactInternalSnapshotBeforeUpdate)}var Z=o.updateQueue;Z!==null&&xn(o,Z,j);break;case 3:var oe=o.updateQueue;if(oe!==null){if(C=null,o.child!==null)switch(o.child.tag){case 5:C=o.child.stateNode;break;case 1:C=o.child.stateNode}xn(o,oe,C)}break;case 5:var ce=o.stateNode;if(C===null&&o.flags&4){C=ce;var he=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":he.autoFocus&&C.focus();break;case"img":he.src&&(C.src=he.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Te=o.alternate;if(Te!==null){var qe=Te.memoizedState;if(qe!==null){var Ve=qe.dehydrated;Ve!==null&&Fr(Ve)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Hr||o.flags&512&&n0(o)}catch(Ue){Ln(o,o.return,Ue)}}if(o===r){it=null;break}if(C=o.sibling,C!==null){C.return=o.return,it=C;break}it=o.return}}function Fv(r){for(;it!==null;){var o=it;if(o===r){it=null;break}var C=o.sibling;if(C!==null){C.return=o.return,it=C;break}it=o.return}}function zv(r){for(;it!==null;){var o=it;try{switch(o.tag){case 0:case 11:case 15:var C=o.return;try{Ah(4,o)}catch(he){Ln(o,C,he)}break;case 1:var j=o.stateNode;if(typeof j.componentDidMount=="function"){var G=o.return;try{j.componentDidMount()}catch(he){Ln(o,G,he)}}var Z=o.return;try{n0(o)}catch(he){Ln(o,Z,he)}break;case 5:var oe=o.return;try{n0(o)}catch(he){Ln(o,oe,he)}}}catch(he){Ln(o,o.return,he)}if(o===r){it=null;break}var ce=o.sibling;if(ce!==null){ce.return=o.return,it=ce;break}it=o.return}}var n_=Math.ceil,Rh=y.ReactCurrentDispatcher,o0=y.ReactCurrentOwner,Yi=y.ReactCurrentBatchConfig,Wt=0,yr=null,Xn=null,Mr=0,ki=0,$u=co(0),ar=0,ff=null,As=0,Mh=0,a0=0,df=null,di=null,l0=0,Wu=1/0,Ba=null,Lh=!1,s0=null,Dl=null,Nh=!1,jl=null,Ih=0,hf=0,u0=null,Dh=-1,jh=0;function ni(){return Wt&6?Jt():Dh!==-1?Dh:Dh=Jt()}function Fl(r){return r.mode&1?Wt&2&&Mr!==0?Mr&-Mr:Qc.transition!==null?(jh===0&&(jh=Ec()),jh):(r=Gt,r!==0||(r=window.event,r=r===void 0?16:Zd(r.type)),r):1}function bo(r,o,C,j){if(50<hf)throw hf=0,u0=null,Error(t(185));is(r,C,j),(!(Wt&2)||r!==yr)&&(r===yr&&(!(Wt&2)&&(Mh|=C),ar===4&&zl(r,Mr)),hi(r,j),C===1&&Wt===0&&!(o.mode&1)&&(Wu=Jt()+500,yl&&Yo()))}function hi(r,o){var C=r.callbackNode;$d(r,o);var j=pa(r,r===yr?Mr:0);if(j===0)C!==null&&Ii(C),r.callbackNode=null,r.callbackPriority=0;else if(o=j&-j,r.callbackPriority!==o){if(C!=null&&Ii(C),o===1)r.tag===0?fo(Uv.bind(null,r)):ws(Uv.bind(null,r)),dh(function(){!(Wt&6)&&Yo()}),C=null;else{switch(os(j)){case 1:C=Dr;break;case 4:C=ha;break;case 16:C=no;break;case 536870912:C=Qs;break;default:C=no}C=Kv(C,Bv.bind(null,r))}r.callbackPriority=o,r.callbackNode=C}}function Bv(r,o){if(Dh=-1,jh=0,Wt&6)throw Error(t(327));var C=r.callbackNode;if(Yu()&&r.callbackNode!==C)return null;var j=pa(r,r===yr?Mr:0);if(j===0)return null;if(j&30||j&r.expiredLanes||o)o=Fh(r,j);else{o=j;var G=Wt;Wt|=2;var Z=Hv();(yr!==r||Mr!==o)&&(Ba=null,Wu=Jt()+500,Ms(r,o));do try{o_();break}catch(ce){qv(r,ce)}while(!0);Ru(),Rh.current=Z,Wt=G,Xn!==null?o=0:(yr=null,Mr=0,o=ar)}if(o!==0){if(o===2&&(G=tl(r),G!==0&&(j=G,o=c0(r,G))),o===1)throw C=ff,Ms(r,0),zl(r,j),hi(r,Jt()),C;if(o===6)zl(r,j);else{if(G=r.current.alternate,!(j&30)&&!r_(G)&&(o=Fh(r,j),o===2&&(Z=tl(r),Z!==0&&(j=Z,o=c0(r,Z))),o===1))throw C=ff,Ms(r,0),zl(r,j),hi(r,Jt()),C;switch(r.finishedWork=G,r.finishedLanes=j,o){case 0:case 1:throw Error(t(345));case 2:Ls(r,di,Ba);break;case 3:if(zl(r,j),(j&130023424)===j&&(o=l0+500-Jt(),10<o)){if(pa(r,0)!==0)break;if(G=r.suspendedLanes,(G&j)!==j){ni(),r.pingedLanes|=r.suspendedLanes&G;break}r.timeoutHandle=Kr(Ls.bind(null,r,di,Ba),o);break}Ls(r,di,Ba);break;case 4:if(zl(r,j),(j&4194240)===j)break;for(o=r.eventTimes,G=-1;0<j;){var oe=31-Nt(j);Z=1<<oe,oe=o[oe],oe>G&&(G=oe),j&=~Z}if(j=G,j=Jt()-j,j=(120>j?120:480>j?480:1080>j?1080:1920>j?1920:3e3>j?3e3:4320>j?4320:1960*n_(j/1960))-j,10<j){r.timeoutHandle=Kr(Ls.bind(null,r,di,Ba),j);break}Ls(r,di,Ba);break;case 5:Ls(r,di,Ba);break;default:throw Error(t(329))}}}return hi(r,Jt()),r.callbackNode===C?Bv.bind(null,r):null}function c0(r,o){var C=df;return r.current.memoizedState.isDehydrated&&(Ms(r,o).flags|=256),r=Fh(r,o),r!==2&&(o=di,di=C,o!==null&&f0(o)),r}function f0(r){di===null?di=r:di.push.apply(di,r)}function r_(r){for(var o=r;;){if(o.flags&16384){var C=o.updateQueue;if(C!==null&&(C=C.stores,C!==null))for(var j=0;j<C.length;j++){var G=C[j],Z=G.getSnapshot;G=G.value;try{if(!Br(Z(),G))return!1}catch{return!1}}}if(C=o.child,o.subtreeFlags&16384&&C!==null)C.return=o,o=C;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function zl(r,o){for(o&=~a0,o&=~Mh,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var C=31-Nt(o),j=1<<C;r[C]=-1,o&=~j}}function Uv(r){if(Wt&6)throw Error(t(327));Yu();var o=pa(r,0);if(!(o&1))return hi(r,Jt()),null;var C=Fh(r,o);if(r.tag!==0&&C===2){var j=tl(r);j!==0&&(o=j,C=c0(r,j))}if(C===1)throw C=ff,Ms(r,0),zl(r,o),hi(r,Jt()),C;if(C===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Ls(r,di,Ba),hi(r,Jt()),null}function d0(r,o){var C=Wt;Wt|=1;try{return r(o)}finally{Wt=C,Wt===0&&(Wu=Jt()+500,yl&&Yo())}}function Rs(r){jl!==null&&jl.tag===0&&!(Wt&6)&&Yu();var o=Wt;Wt|=1;var C=Yi.transition,j=Gt;try{if(Yi.transition=null,Gt=1,r)return r()}finally{Gt=j,Yi.transition=C,Wt=o,!(Wt&6)&&Yo()}}function h0(){ki=$u.current,on($u)}function Ms(r,o){r.finishedWork=null,r.finishedLanes=0;var C=r.timeoutHandle;if(C!==-1&&(r.timeoutHandle=-1,Yc(C)),Xn!==null)for(C=Xn.return;C!==null;){var j=C;switch(Kn(j),j.tag){case 1:j=j.type.childContextTypes,j!=null&&ml();break;case 3:mn(),on(dr),on(ir),pr();break;case 5:po(j);break;case 4:mn();break;case 13:on(an);break;case 19:on(an);break;case 10:Mu(j.type._context);break;case 22:case 23:h0()}C=C.return}if(yr=r,Xn=r=Bl(r.current,null),Mr=ki=o,ar=0,ff=null,a0=Mh=As=0,di=df=null,Hi!==null){for(o=0;o<Hi.length;o++)if(C=Hi[o],j=C.interleaved,j!==null){C.interleaved=null;var G=j.next,Z=C.pending;if(Z!==null){var oe=Z.next;Z.next=G,j.next=oe}C.pending=j}Hi=null}return r}function qv(r,o){do{var C=Xn;try{if(Ru(),Pl.current=Rl,Ci){for(var j=Qt.memoizedState;j!==null;){var G=j.queue;G!==null&&(G.pending=null),j=j.next}Ci=!1}if(Tr=0,Rn=Pn=Qt=null,Jo=!1,fi=0,o0.current=null,C===null||C.return===null){ar=1,ff=o,Xn=null;break}e:{var Z=r,oe=C.return,ce=C,he=o;if(o=Mr,ce.flags|=32768,he!==null&&typeof he=="object"&&typeof he.then=="function"){var Te=he,qe=ce,Ve=qe.tag;if(!(qe.mode&1)&&(Ve===0||Ve===11||Ve===15)){var Ue=qe.alternate;Ue?(qe.updateQueue=Ue.updateQueue,qe.memoizedState=Ue.memoizedState,qe.lanes=Ue.lanes):(qe.updateQueue=null,qe.memoizedState=null)}var et=I(oe);if(et!==null){et.flags&=-257,q(et,oe,ce,Z,o),et.mode&1&&f(Z,Te,o),o=et,he=Te;var ot=o.updateQueue;if(ot===null){var ut=new Set;ut.add(he),o.updateQueue=ut}else ot.add(he);break e}else{if(!(o&1)){f(Z,Te,o),p0();break e}he=Error(t(426))}}else if(Xt&&ce.mode&1){var qn=I(oe);if(qn!==null){!(qn.flags&65536)&&(qn.flags|=256),q(qn,oe,ce,Z,o),Es(za(he,ce));break e}}Z=he=za(he,ce),ar!==4&&(ar=2),df===null?df=[Z]:df.push(Z),Z=oe;do{switch(Z.tag){case 3:Z.flags|=65536,o&=-o,Z.lanes|=o;var Ee=kh(Z,he,o);Cs(Z,Ee);break e;case 1:ce=he;var ve=Z.type,Pe=Z.stateNode;if(!(Z.flags&128)&&(typeof ve.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&(Dl===null||!Dl.has(Pe)))){Z.flags|=65536,o&=-o,Z.lanes|=o;var We=s(Z,ce,o);Cs(Z,We);break e}}Z=Z.return}while(Z!==null)}Vv(C)}catch(dt){o=dt,Xn===C&&C!==null&&(Xn=C=C.return);continue}break}while(!0)}function Hv(){var r=Rh.current;return Rh.current=Rl,r===null?Rl:r}function p0(){(ar===0||ar===3||ar===2)&&(ar=4),yr===null||!(As&268435455)&&!(Mh&268435455)||zl(yr,Mr)}function Fh(r,o){var C=Wt;Wt|=2;var j=Hv();(yr!==r||Mr!==o)&&(Ba=null,Ms(r,o));do try{i_();break}catch(G){qv(r,G)}while(!0);if(Ru(),Wt=C,Rh.current=j,Xn!==null)throw Error(t(261));return yr=null,Mr=0,ar}function i_(){for(;Xn!==null;)Gv(Xn)}function o_(){for(;Xn!==null&&!No();)Gv(Xn)}function Gv(r){var o=Yv(r.alternate,r,ki);r.memoizedProps=r.pendingProps,o===null?Vv(r):Xn=o,o0.current=null}function Vv(r){var o=r;do{var C=o.alternate;if(r=o.return,o.flags&32768){if(C=Q4(C,o),C!==null){C.flags&=32767,Xn=C;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ar=6,Xn=null;return}}else if(C=Z4(C,o,ki),C!==null){Xn=C;return}if(o=o.sibling,o!==null){Xn=o;return}Xn=o=r}while(o!==null);ar===0&&(ar=5)}function Ls(r,o,C){var j=Gt,G=Yi.transition;try{Yi.transition=null,Gt=1,a_(r,o,C,j)}finally{Yi.transition=G,Gt=j}return null}function a_(r,o,C,j){do Yu();while(jl!==null);if(Wt&6)throw Error(t(327));C=r.finishedWork;var G=r.finishedLanes;if(C===null)return null;if(r.finishedWork=null,r.finishedLanes=0,C===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var Z=C.lanes|C.childLanes;if(Vp(r,Z),r===yr&&(Xn=yr=null,Mr=0),!(C.subtreeFlags&2064)&&!(C.flags&2064)||Nh||(Nh=!0,Kv(no,function(){return Yu(),null})),Z=(C.flags&15990)!==0,C.subtreeFlags&15990||Z){Z=Yi.transition,Yi.transition=null;var oe=Gt;Gt=1;var ce=Wt;Wt|=4,o0.current=null,e_(r,C),Iv(C,r),hs($c),iu=!!Vc,$c=Vc=null,r.current=C,t_(C),rs(),Wt=ce,Gt=oe,Yi.transition=Z}else r.current=C;if(Nh&&(Nh=!1,jl=r,Ih=G),Z=r.pendingLanes,Z===0&&(Dl=null),un(C.stateNode),hi(r,Jt()),o!==null)for(j=r.onRecoverableError,C=0;C<o.length;C++)G=o[C],j(G.value,{componentStack:G.stack,digest:G.digest});if(Lh)throw Lh=!1,r=s0,s0=null,r;return Ih&1&&r.tag!==0&&Yu(),Z=r.pendingLanes,Z&1?r===u0?hf++:(hf=0,u0=r):hf=0,Yo(),null}function Yu(){if(jl!==null){var r=os(Ih),o=Yi.transition,C=Gt;try{if(Yi.transition=null,Gt=16>r?16:r,jl===null)var j=!1;else{if(r=jl,jl=null,Ih=0,Wt&6)throw Error(t(331));var G=Wt;for(Wt|=4,it=r.current;it!==null;){var Z=it,oe=Z.child;if(it.flags&16){var ce=Z.deletions;if(ce!==null){for(var he=0;he<ce.length;he++){var Te=ce[he];for(it=Te;it!==null;){var qe=it;switch(qe.tag){case 0:case 11:case 15:cf(8,qe,Z)}var Ve=qe.child;if(Ve!==null)Ve.return=qe,it=Ve;else for(;it!==null;){qe=it;var Ue=qe.sibling,et=qe.return;if(Av(qe),qe===Te){it=null;break}if(Ue!==null){Ue.return=et,it=Ue;break}it=et}}}var ot=Z.alternate;if(ot!==null){var ut=ot.child;if(ut!==null){ot.child=null;do{var qn=ut.sibling;ut.sibling=null,ut=qn}while(ut!==null)}}it=Z}}if(Z.subtreeFlags&2064&&oe!==null)oe.return=Z,it=oe;else e:for(;it!==null;){if(Z=it,Z.flags&2048)switch(Z.tag){case 0:case 11:case 15:cf(9,Z,Z.return)}var Ee=Z.sibling;if(Ee!==null){Ee.return=Z.return,it=Ee;break e}it=Z.return}}var ve=r.current;for(it=ve;it!==null;){oe=it;var Pe=oe.child;if(oe.subtreeFlags&2064&&Pe!==null)Pe.return=oe,it=Pe;else e:for(oe=ve;it!==null;){if(ce=it,ce.flags&2048)try{switch(ce.tag){case 0:case 11:case 15:Ah(9,ce)}}catch(dt){Ln(ce,ce.return,dt)}if(ce===oe){it=null;break e}var We=ce.sibling;if(We!==null){We.return=ce.return,it=We;break e}it=ce.return}}if(Wt=G,Yo(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(ro,r)}catch{}j=!0}return j}finally{Gt=C,Yi.transition=o}}return!1}function $v(r,o,C){o=za(C,o),o=kh(r,o,1),r=$i(r,o,1),o=ni(),r!==null&&(is(r,1,o),hi(r,o))}function Ln(r,o,C){if(r.tag===3)$v(r,r,C);else for(;o!==null;){if(o.tag===3){$v(o,r,C);break}else if(o.tag===1){var j=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&(Dl===null||!Dl.has(j))){r=za(C,r),r=s(o,r,1),o=$i(o,r,1),r=ni(),o!==null&&(is(o,1,r),hi(o,r));break}}o=o.return}}function l_(r,o,C){var j=r.pingCache;j!==null&&j.delete(o),o=ni(),r.pingedLanes|=r.suspendedLanes&C,yr===r&&(Mr&C)===C&&(ar===4||ar===3&&(Mr&130023424)===Mr&&500>Jt()-l0?Ms(r,0):a0|=C),hi(r,o)}function Wv(r,o){o===0&&(r.mode&1?(o=io,io<<=1,!(io&130023424)&&(io=4194304)):o=1);var C=ni();r=ei(r,o),r!==null&&(is(r,o,C),hi(r,C))}function s_(r){var o=r.memoizedState,C=0;o!==null&&(C=o.retryLane),Wv(r,C)}function u_(r,o){var C=0;switch(r.tag){case 13:var j=r.stateNode,G=r.memoizedState;G!==null&&(C=G.retryLane);break;case 19:j=r.stateNode;break;default:throw Error(t(314))}j!==null&&j.delete(o),Wv(r,C)}var Yv;Yv=function(r,o,C){if(r!==null)if(r.memoizedProps!==o.pendingProps||dr.current)ne=!0;else{if(!(r.lanes&C)&&!(o.flags&128))return ne=!1,Jp(r,o,C);ne=!!(r.flags&131072)}else ne=!1,Xt&&o.flags&1048576&&mh(o,Xo,o.index);switch(o.lanes=0,o.tag){case 2:var j=o.type;Ft(r,o),r=o.pendingProps;var G=Aa(o,ir.current);ho(o,C),G=Cl(null,o,j,r,G,C);var Z=kl();return o.flags|=1,typeof G=="object"&&G!==null&&typeof G.render=="function"&&G.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,hr(j)?(Z=!0,Ra(o)):Z=!1,o.memoizedState=G.state!==null&&G.state!==void 0?G.state:null,Ps(o),G.updater=Ll,o.stateNode=G,G._reactInternals=o,Hu(o,j,r,C),o=Zt(null,o,j,!0,Z,C)):(o.tag=0,Xt&&Z&&bl(o),le(null,o,G,C),o=o.child),o;case 16:j=o.elementType;e:{switch(Ft(r,o),r=o.pendingProps,G=j._init,j=G(j._payload),o.type=j,G=o.tag=f_(j),r=or(j,r),G){case 0:o=Qe(null,o,j,r,C);break e;case 1:o=ln(null,o,j,r,C);break e;case 11:o=ye(null,o,j,r,C);break e;case 14:o=Re(null,o,j,or(j.type,r),C);break e}throw Error(t(306,j,""))}return o;case 0:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),Qe(r,o,j,G,C);case 1:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),ln(r,o,j,G,C);case 3:e:{if(Ar(o),r===null)throw Error(t(387));j=o.pendingProps,Z=o.memoizedState,G=Z.element,Nu(r,o),El(o,j,null,C);var oe=o.memoizedState;if(j=oe.element,Z.isDehydrated)if(Z={element:j,isDehydrated:!1,cache:oe.cache,pendingSuspenseBoundaries:oe.pendingSuspenseBoundaries,transitions:oe.transitions},o.updateQueue.baseState=Z,o.memoizedState=Z,o.flags&256){G=za(Error(t(423)),o),o=Wi(r,o,j,C,G);break e}else if(j!==G){G=za(Error(t(424)),o),o=Wi(r,o,j,C,G);break e}else for(Ke=zi(o.stateNode.containerInfo.firstChild),Zr=o,Xt=!0,Qr=null,C=ci(o,null,j,C),o.child=C;C;)C.flags=C.flags&-3|4096,C=C.sibling;else{if(Ia(),j===G){o=mr(r,o,C);break e}le(r,o,j,C)}o=o.child}return o;case 5:return Ol(o),r===null&&_l(o),j=o.type,G=o.pendingProps,Z=r!==null?r.memoizedProps:null,oe=G.children,Wc(j,G)?oe=null:Z!==null&&Wc(j,Z)&&(o.flags|=32),Et(r,o),le(r,o,oe,C),o.child;case 6:return r===null&&_l(o),null;case 13:return Me(r,o,C);case 4:return Qo(o,o.stateNode.containerInfo),j=o.pendingProps,r===null?o.child=Da(o,null,j,C):le(r,o,j,C),o.child;case 11:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),ye(r,o,j,G,C);case 7:return le(r,o,o.pendingProps,C),o.child;case 8:return le(r,o,o.pendingProps.children,C),o.child;case 12:return le(r,o,o.pendingProps.children,C),o.child;case 10:e:{if(j=o.type._context,G=o.pendingProps,Z=o.memoizedProps,oe=G.value,en(Os,j._currentValue),j._currentValue=oe,Z!==null)if(Br(Z.value,oe)){if(Z.children===G.children&&!dr.current){o=mr(r,o,C);break e}}else for(Z=o.child,Z!==null&&(Z.return=o);Z!==null;){var ce=Z.dependencies;if(ce!==null){oe=Z.child;for(var he=ce.firstContext;he!==null;){if(he.context===j){if(Z.tag===1){he=Vi(-1,C&-C),he.tag=2;var Te=Z.updateQueue;if(Te!==null){Te=Te.shared;var qe=Te.pending;qe===null?he.next=he:(he.next=qe.next,qe.next=he),Te.pending=he}}Z.lanes|=C,he=Z.alternate,he!==null&&(he.lanes|=C),Lu(Z.return,C,o),ce.lanes|=C;break}he=he.next}}else if(Z.tag===10)oe=Z.type===o.type?null:Z.child;else if(Z.tag===18){if(oe=Z.return,oe===null)throw Error(t(341));oe.lanes|=C,ce=oe.alternate,ce!==null&&(ce.lanes|=C),Lu(oe,C,o),oe=Z.sibling}else oe=Z.child;if(oe!==null)oe.return=Z;else for(oe=Z;oe!==null;){if(oe===o){oe=null;break}if(Z=oe.sibling,Z!==null){Z.return=oe.return,oe=Z;break}oe=oe.return}Z=oe}le(r,o,G.children,C),o=o.child}return o;case 9:return G=o.type,j=o.pendingProps.children,ho(o,C),G=kr(G),j=j(G),o.flags|=1,le(r,o,j,C),o.child;case 14:return j=o.type,G=or(j,o.pendingProps),G=or(j.type,G),Re(r,o,j,G,C);case 15:return $e(r,o,o.type,o.pendingProps,C);case 17:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),Ft(r,o),o.tag=1,hr(j)?(r=!0,Ra(o)):r=!1,ho(o,C),Ch(o,j,G),Hu(o,j,G,C),Zt(null,o,j,!0,r,C);case 19:return Un(r,o,C);case 22:return nt(r,o,C)}throw Error(t(156,o.tag))};function Kv(r,o){return Ir(r,o)}function c_(r,o,C,j){this.tag=r,this.key=C,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=j,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ki(r,o,C,j){return new c_(r,o,C,j)}function g0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function f_(r){if(typeof r=="function")return g0(r)?1:0;if(r!=null){if(r=r.$$typeof,r===M)return 11;if(r===U)return 14}return 2}function Bl(r,o){var C=r.alternate;return C===null?(C=Ki(r.tag,o,r.key,r.mode),C.elementType=r.elementType,C.type=r.type,C.stateNode=r.stateNode,C.alternate=r,r.alternate=C):(C.pendingProps=o,C.type=r.type,C.flags=0,C.subtreeFlags=0,C.deletions=null),C.flags=r.flags&14680064,C.childLanes=r.childLanes,C.lanes=r.lanes,C.child=r.child,C.memoizedProps=r.memoizedProps,C.memoizedState=r.memoizedState,C.updateQueue=r.updateQueue,o=r.dependencies,C.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},C.sibling=r.sibling,C.index=r.index,C.ref=r.ref,C}function zh(r,o,C,j,G,Z){var oe=2;if(j=r,typeof r=="function")g0(r)&&(oe=1);else if(typeof r=="string")oe=5;else e:switch(r){case R:return Ns(C.children,G,Z,o);case D:oe=8,G|=8;break;case x:return r=Ki(12,C,o,G|2),r.elementType=x,r.lanes=Z,r;case T:return r=Ki(13,C,o,G),r.elementType=T,r.lanes=Z,r;case z:return r=Ki(19,C,o,G),r.elementType=z,r.lanes=Z,r;case K:return Bh(C,G,Z,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case S:oe=10;break e;case A:oe=9;break e;case M:oe=11;break e;case U:oe=14;break e;case Q:oe=16,j=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return o=Ki(oe,C,o,G),o.elementType=r,o.type=j,o.lanes=Z,o}function Ns(r,o,C,j){return r=Ki(7,r,j,o),r.lanes=C,r}function Bh(r,o,C,j){return r=Ki(22,r,j,o),r.elementType=K,r.lanes=C,r.stateNode={isHidden:!1},r}function v0(r,o,C){return r=Ki(6,r,null,o),r.lanes=C,r}function m0(r,o,C){return o=Ki(4,r.children!==null?r.children:[],r.key,o),o.lanes=C,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function d_(r,o,C,j,G){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gr(0),this.expirationTimes=Gr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gr(0),this.identifierPrefix=j,this.onRecoverableError=G,this.mutableSourceEagerHydrationData=null}function y0(r,o,C,j,G,Z,oe,ce,he){return r=new d_(r,o,C,ce,he),o===1?(o=1,Z===!0&&(o|=8)):o=0,Z=Ki(3,null,null,o),r.current=Z,Z.stateNode=r,Z.memoizedState={element:j,isDehydrated:C,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ps(Z),r}function h_(r,o,C){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N,key:j==null?null:""+j,children:r,containerInfo:o,implementation:C}}function Xv(r){if(!r)return Ui;r=r._reactInternals;e:{if(Vt(r)!==r||r.tag!==1)throw Error(t(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(hr(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(r.tag===1){var C=r.type;if(hr(C))return Pu(r,C,o)}return o}function Zv(r,o,C,j,G,Z,oe,ce,he){return r=y0(C,j,!0,r,G,Z,oe,ce,he),r.context=Xv(null),C=r.current,j=ni(),G=Fl(C),Z=Vi(j,G),Z.callback=o??null,$i(C,Z,G),r.current.lanes=G,is(r,G,j),hi(r,j),r}function Uh(r,o,C,j){var G=o.current,Z=ni(),oe=Fl(G);return C=Xv(C),o.context===null?o.context=C:o.pendingContext=C,o=Vi(Z,oe),o.payload={element:r},j=j===void 0?null:j,j!==null&&(o.callback=j),r=$i(G,o,oe),r!==null&&(bo(r,G,oe,Z),Iu(r,G,oe)),oe}function qh(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Qv(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var C=r.retryLane;r.retryLane=C!==0&&C<o?C:o}}function b0(r,o){Qv(r,o),(r=r.alternate)&&Qv(r,o)}function p_(){return null}var Jv=typeof reportError=="function"?reportError:function(r){console.error(r)};function _0(r){this._internalRoot=r}Hh.prototype.render=_0.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(t(409));Uh(r,o,null,null)},Hh.prototype.unmount=_0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Rs(function(){Uh(null,r,null,null)}),o[Bi]=null}};function Hh(r){this._internalRoot=r}Hh.prototype.unstable_scheduleHydration=function(r){if(r){var o=Yd();r={blockedOn:null,target:r,priority:o};for(var C=0;C<Fi.length&&o!==0&&o<Fi[C].priority;C++);Fi.splice(C,0,r),C===0&&tu(r)}};function w0(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Gh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function em(){}function g_(r,o,C,j,G){if(G){if(typeof j=="function"){var Z=j;j=function(){var Te=qh(oe);Z.call(Te)}}var oe=Zv(o,j,r,0,null,!1,!1,"",em);return r._reactRootContainer=oe,r[Bi]=oe.current,xa(r.nodeType===8?r.parentNode:r),Rs(),oe}for(;G=r.lastChild;)r.removeChild(G);if(typeof j=="function"){var ce=j;j=function(){var Te=qh(he);ce.call(Te)}}var he=y0(r,0,!1,null,null,!1,!1,"",em);return r._reactRootContainer=he,r[Bi]=he.current,xa(r.nodeType===8?r.parentNode:r),Rs(function(){Uh(o,he,C,j)}),he}function Vh(r,o,C,j,G){var Z=C._reactRootContainer;if(Z){var oe=Z;if(typeof G=="function"){var ce=G;G=function(){var he=qh(oe);ce.call(he)}}Uh(o,oe,r,G)}else oe=g_(C,o,r,G,j);return qh(oe)}nl=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var C=Vn(o.pendingLanes);C!==0&&(Oc(o,C|1),hi(o,Jt()),!(Wt&6)&&(Wu=Jt()+500,Yo()))}break;case 13:Rs(function(){var j=ei(r,1);if(j!==null){var G=ni();bo(j,r,1,G)}}),b0(r,1)}},rl=function(r){if(r.tag===13){var o=ei(r,134217728);if(o!==null){var C=ni();bo(o,r,134217728,C)}b0(r,134217728)}},Wd=function(r){if(r.tag===13){var o=Fl(r),C=ei(r,o);if(C!==null){var j=ni();bo(C,r,o,j)}b0(r,o)}},Yd=function(){return Gt},Js=function(r,o){var C=Gt;try{return Gt=r,o()}finally{Gt=C}},Ge=function(r,o,C){switch(o){case"input":if(Le(r,C),o=C.name,C.type==="radio"&&o!=null){for(C=r;C.parentNode;)C=C.parentNode;for(C=C.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<C.length;o++){var j=C[o];if(j!==r&&j.form===r.form){var G=Yn(j);if(!G)throw Error(t(90));ue(j),Le(j,G)}}}break;case"textarea":xe(r,C);break;case"select":o=C.value,o!=null&&Ae(r,!!C.multiple,o,!1)}},_n=d0,Be=Rs;var v_={usingClientEntryPoint:!1,Events:[_s,Fn,Yn,ze,pt,d0]},pf={findFiberByHostInstance:$o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m_={bundleType:pf.bundleType,version:pf.version,rendererPackageName:pf.rendererPackageName,rendererConfig:pf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Sn(r),r===null?null:r.stateNode},findFiberByHostInstance:pf.findFiberByHostInstance||p_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$h.isDisabled&&$h.supportsFiber)try{ro=$h.inject(m_),er=$h}catch{}}return pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v_,pi.createPortal=function(r,o){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w0(o))throw Error(t(200));return h_(r,o,null,C)},pi.createRoot=function(r,o){if(!w0(r))throw Error(t(299));var C=!1,j="",G=Jv;return o!=null&&(o.unstable_strictMode===!0&&(C=!0),o.identifierPrefix!==void 0&&(j=o.identifierPrefix),o.onRecoverableError!==void 0&&(G=o.onRecoverableError)),o=y0(r,1,!1,null,null,C,!1,j,G),r[Bi]=o.current,xa(r.nodeType===8?r.parentNode:r),new _0(o)},pi.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=Sn(o),r=r===null?null:r.stateNode,r},pi.flushSync=function(r){return Rs(r)},pi.hydrate=function(r,o,C){if(!Gh(o))throw Error(t(200));return Vh(null,r,o,!0,C)},pi.hydrateRoot=function(r,o,C){if(!w0(r))throw Error(t(405));var j=C!=null&&C.hydratedSources||null,G=!1,Z="",oe=Jv;if(C!=null&&(C.unstable_strictMode===!0&&(G=!0),C.identifierPrefix!==void 0&&(Z=C.identifierPrefix),C.onRecoverableError!==void 0&&(oe=C.onRecoverableError)),o=Zv(o,null,r,1,C??null,G,!1,Z,oe),r[Bi]=o.current,xa(r),j)for(r=0;r<j.length;r++)C=j[r],G=C._getVersion,G=G(C._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[C,G]:o.mutableSourceEagerHydrationData.push(C,G);return new Hh(o)},pi.render=function(r,o,C){if(!Gh(o))throw Error(t(200));return Vh(null,r,o,!1,C)},pi.unmountComponentAtNode=function(r){if(!Gh(r))throw Error(t(40));return r._reactRootContainer?(Rs(function(){Vh(null,null,r,!1,function(){r._reactRootContainer=null,r[Bi]=null})}),!0):!1},pi.unstable_batchedUpdates=d0,pi.unstable_renderSubtreeIntoContainer=function(r,o,C,j){if(!Gh(C))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return Vh(r,o,C,!1,j)},pi.version="18.3.1-next-f1338f8080-20240426",pi}var am;function i3(){if(am)return E0.exports;am=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(i){console.error(i)}}return e(),E0.exports=w_(),E0.exports}var lm;function S_(){if(lm)return Wh;lm=1;var e=i3();return Wh.createRoot=e.createRoot,Wh.hydrateRoot=e.hydrateRoot,Wh}var E_=S_();const o3=Ad(E_);var gf={};function kt(e){for(var i=arguments.length,t=new Array(i>1?i-1:0),n=1;n<i;n++)t[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var O_={};function Sp(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:O_}var a3=Object.assign,sp=Object.getOwnPropertyDescriptor,la=Object.defineProperty,Rd=Object.prototype,mg=[];Object.freeze(mg);var Lg={};Object.freeze(Lg);var x_=typeof Proxy<"u",P_=Object.toString();function l3(){x_||kt("Proxy not available")}function s3(e){var i=!1;return function(){if(!i)return i=!0,e.apply(this,arguments)}}var ec=function(){};function Li(e){return typeof e=="function"}function Us(e){var i=typeof e;switch(i){case"string":case"symbol":case"number":return!0}return!1}function Ep(e){return e!==null&&typeof e=="object"}function Za(e){if(!Ep(e))return!1;var i=Object.getPrototypeOf(e);if(i==null)return!0;var t=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t.toString()===P_}function u3(e){var i=e==null?void 0:e.constructor;return i?i.name==="GeneratorFunction"||i.displayName==="GeneratorFunction":!1}function Md(e,i,t){la(e,i,{enumerable:!1,writable:!0,configurable:!0,value:t})}function c3(e,i,t){la(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}function Zl(e,i){var t="isMobX"+e;return i.prototype[t]=!0,function(n){return Ep(n)&&n[t]===!0}}function vc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function C_(e){var i=Object.getPrototypeOf(e),t=Object.getPrototypeOf(i),n=Object.getPrototypeOf(t);return n===null}function Wa(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var f3=typeof Object.getOwnPropertySymbols<"u";function k_(e){var i=Object.keys(e);if(!f3)return i;var t=Object.getOwnPropertySymbols(e);return t.length?[].concat(i,t.filter(function(n){return Rd.propertyIsEnumerable.call(e,n)})):i}var oc=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:f3?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function d3(e){return e===null?null:typeof e=="object"?""+e:e}function Ya(e,i){return Rd.hasOwnProperty.call(e,i)}var T_=Object.getOwnPropertyDescriptors||function(i){var t={};return oc(i).forEach(function(n){t[n]=sp(i,n)}),t};function Ri(e,i){return!!(e&i)}function Mi(e,i,t){return t?e|=i:e&=~i,e}function sm(e,i){(i==null||i>e.length)&&(i=e.length);for(var t=0,n=Array(i);t<i;t++)n[t]=e[t];return n}function A_(e,i){for(var t=0;t<i.length;t++){var n=i[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M_(n.key),n)}}function mc(e,i,t){return i&&A_(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function tc(e,i){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=L_(e))||i){t&&(e=t);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 Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Yl.apply(null,arguments)}function h3(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,yg(e,i)}function yg(e,i){return yg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},yg(e,i)}function R_(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,i);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function M_(e){var i=R_(e,"string");return typeof i=="symbol"?i:i+""}function L_(e,i){if(e){if(typeof e=="string")return sm(e,i);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?sm(e,i):void 0}}var aa=Symbol("mobx-stored-annotations");function Co(e){function i(t,n){if(Nd(n))return e.decorate_20223_(t,n);Ld(t,n,e)}return Object.assign(i,e)}function Ld(e,i,t){Ya(e,aa)||Md(e,aa,Yl({},e[aa])),q_(t)||(e[aa][i]=t)}function N_(e){return Ya(e,aa)||Md(e,aa,Yl({},e[aa])),e[aa]}function Nd(e){return typeof e=="object"&&typeof e.kind=="string"}var ht=Symbol("mobx administration"),Ql=function(){function e(t){t===void 0&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Kt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var i=e.prototype;return i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},i.reportObserved=function(){return M3(this)},i.reportChanged=function(){vi(),L3(this),mi()},i.toString=function(){return this.name_},mc(e,[{key:"isBeingObserved",get:function(){return Ri(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Ri(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ql.isBeingObservedMask_=1;Ql.isPendingUnobservationMask_=2;Ql.diffValueMask_=4;var Ng=Zl("Atom",Ql);function Ed(e,i,t){i===void 0&&(i=ec),t===void 0&&(t=ec);var n=new Ql(e);return i!==ec&&q3(n,i),t!==ec&&Bg(n,t),n}function I_(e,i){return e===i}function D_(e,i){return Xg(e,i)}function j_(e,i){return Xg(e,i,1)}function F_(e,i){return Object.is?Object.is(e,i):e===i?e!==0||1/e===1/i:e!==e&&i!==i}var qs={identity:I_,structural:D_,default:F_,shallow:j_};function Hs(e,i,t){return Rp(e)?e:Array.isArray(e)?sn.array(e,{name:t}):Za(e)?sn.object(e,void 0,{name:t}):vc(e)?sn.map(e,{name:t}):Wa(e)?sn.set(e,{name:t}):typeof e=="function"&&!sc(e)&&!uc(e)?u3(e)?Vs(e):ac(t,e):e}function z_(e,i,t){if(e==null||_r(e)||ri(e)||Nr(e)||lr(e))return e;if(Array.isArray(e))return sn.array(e,{name:t,deep:!1});if(Za(e))return sn.object(e,void 0,{name:t,deep:!1});if(vc(e))return sn.map(e,{name:t,deep:!1});if(Wa(e))return sn.set(e,{name:t,deep:!1})}function Op(e){return e}function B_(e,i){return Xg(e,i)?i:e}var p3="override",U_=Co({annotationType_:p3,make_:H_,extend_:G_,decorate_20223_:V_});function q_(e){return e.annotationType_===p3}function H_(e,i){return 0}function G_(e,i,t,n){kt("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function V_(e,i){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Id(e,i){return{annotationType_:e,options_:i,make_:$_,extend_:W_,decorate_20223_:Y_}}function $_(e,i,t,n){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,i,t,!1)===null?0:1;if(n===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if(sc(t.value))return 1;var l=g3(e,this,i,t,!1);return la(n,i,l),2}function W_(e,i,t,n){var a=g3(e,this,i,t);return e.defineProperty_(i,a,n)}function Y_(e,i){var t=i.kind,n=i.name,a=i.addInitializer,l=this,u=function(b){var _,k,E,v;return Kl((_=(k=l.options_)==null?void 0:k.name)!=null?_:n.toString(),b,(E=(v=l.options_)==null?void 0:v.autoAction)!=null?E:!1)};if(t=="field")return function(h){var b,_=h;return sc(_)||(_=u(_)),(b=l.options_)!=null&&b.bound&&(_=_.bind(this),_.isMobxAction=!0),_};if(t=="method"){var c;return sc(e)||(e=u(e)),(c=this.options_)!=null&&c.bound&&a(function(){var h=this,b=h[n].bind(h);b.isMobxAction=!0,h[n]=b}),e}kt("Cannot apply '"+l.annotationType_+"' to '"+String(n)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+l.annotationType_+"' can only be used on properties with a function value."))}function K_(e,i,t,n){i.annotationType_,n.value}function g3(e,i,t,n,a){var l,u,c,h,b,_,k;a===void 0&&(a=Ye.safeDescriptors),K_(e,i,t,n);var E=n.value;if((l=i.options_)!=null&&l.bound){var v;E=E.bind((v=e.proxy_)!=null?v:e.target_)}return{value:Kl((u=(c=i.options_)==null?void 0:c.name)!=null?u:t.toString(),E,(h=(b=i.options_)==null?void 0:b.autoAction)!=null?h:!1,(_=i.options_)!=null&&_.bound?(k=e.proxy_)!=null?k:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function v3(e,i){return{annotationType_:e,options_:i,make_:X_,extend_:Z_,decorate_20223_:Q_}}function X_(e,i,t,n){var a;if(n===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!Ya(e.target_,i)||!uc(e.target_[i]))&&this.extend_(e,i,t,!1)===null)return 0;if(uc(t.value))return 1;var l=m3(e,this,i,t,!1,!1);return la(n,i,l),2}function Z_(e,i,t,n){var a,l=m3(e,this,i,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(i,l,n)}function Q_(e,i){var t,n=i.name,a=i.addInitializer;return uc(e)||(e=Vs(e)),(t=this.options_)!=null&&t.bound&&a(function(){var l=this,u=l[n].bind(l);u.isMobXFlow=!0,l[n]=u}),e}function J_(e,i,t,n){i.annotationType_,n.value}function m3(e,i,t,n,a,l){l===void 0&&(l=Ye.safeDescriptors),J_(e,i,t,n);var u=n.value;if(uc(u)||(u=Vs(u)),a){var c;u=u.bind((c=e.proxy_)!=null?c:e.target_),u.isMobXFlow=!0}return{value:u,configurable:l?e.isPlainObject_:!0,enumerable:!1,writable:!l}}function Ig(e,i){return{annotationType_:e,options_:i,make_:e6,extend_:t6,decorate_20223_:n6}}function e6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function t6(e,i,t,n){return r6(e,this,i,t),e.defineComputedProperty_(i,Yl({},this.options_,{get:t.get,set:t.set}),n)}function n6(e,i){var t=this,n=i.name,a=i.addInitializer;return a(function(){var l=Ys(this)[ht],u=Yl({},t.options_,{get:e,context:this});u.name||(u.name="ObservableObject."+n.toString()),l.values_.set(n,new Ao(u))}),function(){return this[ht].getObservablePropValue_(n)}}function r6(e,i,t,n){i.annotationType_,n.get}function xp(e,i){return{annotationType_:e,options_:i,make_:i6,extend_:o6,decorate_20223_:a6}}function i6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function o6(e,i,t,n){var a,l;return l6(e,this),e.defineObservableProperty_(i,t.value,(a=(l=this.options_)==null?void 0:l.enhancer)!=null?a:Hs,n)}function a6(e,i){var t=this,n=i.kind,a=i.name,l=new WeakSet;function u(c,h){var b,_,k=Ys(c)[ht],E=new $l(h,(b=(_=t.options_)==null?void 0:_.enhancer)!=null?b:Hs,"ObservableObject."+a.toString(),!1);k.values_.set(a,E),l.add(c)}if(n=="accessor")return{get:function(){return l.has(this)||u(this,e.get.call(this)),this[ht].getObservablePropValue_(a)},set:function(h){return l.has(this)||u(this,h),this[ht].setObservablePropValue_(a,h)},init:function(h){return l.has(this)||u(this,h),h}}}function l6(e,i,t,n){i.annotationType_}var s6="true",u6=y3();function y3(e){return{annotationType_:s6,options_:e,make_:c6,extend_:f6,decorate_20223_:d6}}function c6(e,i,t,n){var a,l;if(t.get)return $s.make_(e,i,t,n);if(t.set){var u=Kl(i.toString(),t.set);return n===e.target_?e.defineProperty_(i,{configurable:Ye.safeDescriptors?e.isPlainObject_:!0,set:u})===null?0:2:(la(n,i,{configurable:!0,set:u}),2)}if(n!==e.target_&&typeof t.value=="function"){var c;if(u3(t.value)){var h,b=(h=this.options_)!=null&&h.autoBind?Vs.bound:Vs;return b.make_(e,i,t,n)}var _=(c=this.options_)!=null&&c.autoBind?ac.bound:ac;return _.make_(e,i,t,n)}var k=((a=this.options_)==null?void 0:a.deep)===!1?sn.ref:sn;if(typeof t.value=="function"&&(l=this.options_)!=null&&l.autoBind){var E;t.value=t.value.bind((E=e.proxy_)!=null?E:e.target_)}return k.make_(e,i,t,n)}function f6(e,i,t,n){var a,l;if(t.get)return $s.extend_(e,i,t,n);if(t.set)return e.defineProperty_(i,{configurable:Ye.safeDescriptors?e.isPlainObject_:!0,set:Kl(i.toString(),t.set)},n);if(typeof t.value=="function"&&(a=this.options_)!=null&&a.autoBind){var u;t.value=t.value.bind((u=e.proxy_)!=null?u:e.target_)}var c=((l=this.options_)==null?void 0:l.deep)===!1?sn.ref:sn;return c.extend_(e,i,t,n)}function d6(e,i){kt("'"+this.annotationType_+"' cannot be used as a decorator")}var h6="observable",p6="observable.ref",g6="observable.shallow",v6="observable.struct",b3={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(b3);function Yh(e){return e||b3}var bg=xp(h6),m6=xp(p6,{enhancer:Op}),y6=xp(g6,{enhancer:z_}),b6=xp(v6,{enhancer:B_}),_3=Co(bg);function Kh(e){return e.deep===!0?Hs:e.deep===!1?Op:w6(e.defaultDecorator)}function _6(e){var i;return e?(i=e.defaultDecorator)!=null?i:y3(e):void 0}function w6(e){var i,t;return e&&(i=(t=e.options_)==null?void 0:t.enhancer)!=null?i:Hs}function w3(e,i,t){if(Nd(i))return bg.decorate_20223_(e,i);if(Us(i)){Ld(e,i,bg);return}return Rp(e)?e:Za(e)?sn.object(e,i,t):Array.isArray(e)?sn.array(e,i):vc(e)?sn.map(e,i):Wa(e)?sn.set(e,i):typeof e=="object"&&e!==null?e:sn.box(e,i)}a3(w3,_3);var S6={box:function(i,t){var n=Yh(t);return new $l(i,Kh(n),n.name,!0,n.equals)},array:function(i,t){var n=Yh(t);return(Ye.useProxies===!1||n.proxy===!1?kw:yw)(i,Kh(n),n.name)},map:function(i,t){var n=Yh(t);return new Lp(i,Kh(n),n.name)},set:function(i,t){var n=Yh(t);return new Yg(i,Kh(n),n.name)},object:function(i,t,n){return Jl(function(){return Ug(Ye.useProxies===!1||(n==null?void 0:n.proxy)===!1?Ys({},n):pw({},n),i,t)})},ref:Co(m6),shallow:Co(y6),deep:_3,struct:Co(b6)},sn=a3(w3,S6),S3="computed",E6="computed.struct",_g=Ig(S3),O6=Ig(E6,{equals:qs.structural}),$s=function(i,t){if(Nd(t))return _g.decorate_20223_(i,t);if(Us(t))return Ld(i,t,_g);if(Za(i))return Co(Ig(S3,i));var n=Za(t)?t:{};return n.get=i,n.name||(n.name=i.name||""),new Ao(n)};Object.assign($s,_g);$s.struct=Co(O6);var um,cm,up=0,x6=1,P6=(um=(cm=sp(function(){},"name"))==null?void 0:cm.configurable)!=null?um:!1,fm={value:"action",configurable:!0,writable:!1,enumerable:!1};function Kl(e,i,t,n){t===void 0&&(t=!1);function a(){return E3(e,t,i,n||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return i.toString()},P6&&(fm.value=e,la(a,"name",fm)),a}function E3(e,i,t,n,a){var l=O3(e,i);try{return t.apply(n,a)}catch(u){throw l.error_=u,u}finally{x3(l)}}function O3(e,i,t,n){var a=!1,l=0,u=Ye.trackingDerivation,c=!i||!u;vi();var h=Ye.allowStateChanges;c&&(Ws(),h=Pp(!0));var b=kp(!0),_={runAsAction_:c,prevDerivation_:u,prevAllowStateChanges_:h,prevAllowStateReads_:b,notifySpy_:a,startTime_:l,actionId_:x6++,parentActionId_:up};return up=_.actionId_,_}function x3(e){up!==e.actionId_&&kt(30),up=e.parentActionId_,e.error_!==void 0&&(Ye.suppressReactionErrors=!0),Cp(e.prevAllowStateChanges_),rc(e.prevAllowStateReads_),mi(),e.runAsAction_&&Ka(e.prevDerivation_),Ye.suppressReactionErrors=!1}function Dg(e,i){var t=Pp(e);try{return i()}finally{Cp(t)}}function Pp(e){var i=Ye.allowStateChanges;return Ye.allowStateChanges=e,i}function Cp(e){Ye.allowStateChanges=e}var $l=function(e){function i(n,a,l,u,c){var h;return l===void 0&&(l="ObservableValue"),c===void 0&&(c=qs.default),h=e.call(this,l)||this,h.enhancer=void 0,h.name_=void 0,h.equals=void 0,h.hasUnreportedChange_=!1,h.interceptors_=void 0,h.changeListeners_=void 0,h.value_=void 0,h.dehancer=void 0,h.enhancer=a,h.name_=l,h.equals=c,h.value_=a(n,void 0,l),h}h3(i,e);var t=i.prototype;return t.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},t.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==Ye.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(Xi(this)){var l=Zi(this,{object:this,type:sa,newValue:a});if(!l)return Ye.UNCHANGED;a=l.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?Ye.UNCHANGED:a},t.setNewValue_=function(a){var l=this.value_;this.value_=a,this.reportChanged(),ko(this)&&To(this,{type:sa,object:this,newValue:a,oldValue:l})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(a){return Dd(this,a)},t.observe_=function(a,l){return l&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:sa,newValue:this.value_,oldValue:void 0}),jd(this,a)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return d3(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},i}(Ql),jg=Zl("ObservableValue",$l),Ao=function(){function e(t){this.dependenciesState_=Kt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Kt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new fp(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=cp.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||kt(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=Kl("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?qs.structural:qs.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var i=e.prototype;return i.onBecomeStale_=function(){D6(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},i.get=function(){if(this.isComputing&&kt(32,this.name_,this.derivation),Ye.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)wg(this)&&(this.warnAboutUntrackedRead_(),vi(),this.value_=this.computeValue_(!1),mi());else if(M3(this),wg(this)){var n=Ye.trackingContext;this.keepAlive_&&!n&&(Ye.trackingContext=this),this.trackAndCompute()&&I6(this),Ye.trackingContext=n}var a=this.value_;if(np(a))throw a.cause;return a},i.set=function(n){if(this.setter_){this.isRunningSetter&&kt(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else kt(34,this.name_)},i.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===Kt.NOT_TRACKING_,l=this.computeValue_(!0),u=a||np(n)||np(l)||!this.equals_(n,l);return u&&(this.value_=l),u},i.computeValue_=function(n){this.isComputing=!0;var a=Pp(!1),l;if(n)l=P3(this,this.derivation,this.scope_);else if(Ye.disableErrorBoundaries===!0)l=this.derivation.call(this.scope_);else try{l=this.derivation.call(this.scope_)}catch(u){l=new fp(u)}return Cp(a),this.isComputing=!1,l},i.suspend_=function(){this.keepAlive_||(Sg(this),this.value_=void 0)},i.observe_=function(n,a){var l=this,u=!0,c=void 0;return zg(function(){var h=l.get();if(!u||a){var b=Ws();n({observableKind:"computed",debugObjectName:l.name_,type:sa,object:l,newValue:h,oldValue:c}),Ka(b)}u=!1,c=h})},i.warnAboutUntrackedRead_=function(){},i.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},i.valueOf=function(){return d3(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},mc(e,[{key:"isComputing",get:function(){return Ri(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return Ri(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return Ri(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Ri(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ao.isComputingMask_=1;Ao.isRunningSetterMask_=2;Ao.isBeingObservedMask_=4;Ao.isPendingUnobservationMask_=8;Ao.diffValueMask_=16;var Gs=Zl("ComputedValue",Ao),Kt;(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_"})(Kt||(Kt={}));var cp;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(cp||(cp={}));var fp=function(i){this.cause=void 0,this.cause=i};function np(e){return e instanceof fp}function wg(e){switch(e.dependenciesState_){case Kt.UP_TO_DATE_:return!1;case Kt.NOT_TRACKING_:case Kt.STALE_:return!0;case Kt.POSSIBLY_STALE_:{for(var i=kp(!0),t=Ws(),n=e.observing_,a=n.length,l=0;l<a;l++){var u=n[l];if(Gs(u)){if(Ye.disableErrorBoundaries)u.get();else try{u.get()}catch{return Ka(t),rc(i),!0}if(e.dependenciesState_===Kt.STALE_)return Ka(t),rc(i),!0}}return C3(e),Ka(t),rc(i),!1}}}function C6(){return Ye.trackingDerivation!==null}function P3(e,i,t){var n=kp(!0);C3(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Ye.runId;var a=Ye.trackingDerivation;Ye.trackingDerivation=e,Ye.inBatch++;var l;if(Ye.disableErrorBoundaries===!0)l=i.call(t);else try{l=i.call(t)}catch(u){l=new fp(u)}return Ye.inBatch--,Ye.trackingDerivation=a,k6(e),rc(n),l}function k6(e){for(var i=e.observing_,t=e.observing_=e.newObserving_,n=Kt.UP_TO_DATE_,a=0,l=e.unboundDepsCount_,u=0;u<l;u++){var c=t[u];c.diffValue===0&&(c.diffValue=1,a!==u&&(t[a]=c),a++),c.dependenciesState_>n&&(n=c.dependenciesState_)}for(t.length=a,e.newObserving_=null,l=i.length;l--;){var h=i[l];h.diffValue===0&&A3(h,e),h.diffValue=0}for(;a--;){var b=t[a];b.diffValue===1&&(b.diffValue=0,N6(b,e))}n!==Kt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Sg(e){var i=e.observing_;e.observing_=[];for(var t=i.length;t--;)A3(i[t],e);e.dependenciesState_=Kt.NOT_TRACKING_}function Fg(e){var i=Ws();try{return e()}finally{Ka(i)}}function Ws(){var e=Ye.trackingDerivation;return Ye.trackingDerivation=null,e}function Ka(e){Ye.trackingDerivation=e}function kp(e){var i=Ye.allowStateReads;return Ye.allowStateReads=e,i}function rc(e){Ye.allowStateReads=e}function C3(e){if(e.dependenciesState_!==Kt.UP_TO_DATE_){e.dependenciesState_=Kt.UP_TO_DATE_;for(var i=e.observing_,t=i.length;t--;)i[t].lowestObserverState_=Kt.UP_TO_DATE_}}var T6=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],bd=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},rp=!0,k3=!1,Ye=function(){var e=Sp();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(rp=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new bd().version&&(rp=!1),rp?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new bd):(setTimeout(function(){k3||kt(35)},1),new bd)}();function A6(){if((Ye.pendingReactions.length||Ye.inBatch||Ye.isRunningReactions)&&kt(36),k3=!0,rp){var e=Sp();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),Ye=new bd}}function T3(){return Ye}function R6(){var e=new bd;for(var i in e)T6.indexOf(i)===-1&&(Ye[i]=e[i]);Ye.allowStateChanges=!Ye.enforceActions}function M6(e){return e.observers_&&e.observers_.size>0}function L6(e){return e.observers_}function N6(e,i){e.observers_.add(i),e.lowestObserverState_>i.dependenciesState_&&(e.lowestObserverState_=i.dependenciesState_)}function A3(e,i){e.observers_.delete(i),e.observers_.size===0&&R3(e)}function R3(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,Ye.pendingUnobservations.push(e))}function vi(){Ye.inBatch++}function mi(){if(--Ye.inBatch===0){N3();for(var e=Ye.pendingUnobservations,i=0;i<e.length;i++){var t=e[i];t.isPendingUnobservation=!1,t.observers_.size===0&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof Ao&&t.suspend_())}Ye.pendingUnobservations=[]}}function M3(e){var i=Ye.trackingDerivation;return i!==null?(i.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=i.runId_,i.newObserving_[i.unboundDepsCount_++]=e,!e.isBeingObserved&&Ye.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&Ye.inBatch>0&&R3(e),!1)}function L3(e){e.lowestObserverState_!==Kt.STALE_&&(e.lowestObserverState_=Kt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.UP_TO_DATE_&&i.onBecomeStale_(),i.dependenciesState_=Kt.STALE_}))}function I6(e){e.lowestObserverState_!==Kt.STALE_&&(e.lowestObserverState_=Kt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.POSSIBLY_STALE_?i.dependenciesState_=Kt.STALE_:i.dependenciesState_===Kt.UP_TO_DATE_&&(e.lowestObserverState_=Kt.UP_TO_DATE_)}))}function D6(e){e.lowestObserverState_===Kt.UP_TO_DATE_&&(e.lowestObserverState_=Kt.POSSIBLY_STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.UP_TO_DATE_&&(i.dependenciesState_=Kt.POSSIBLY_STALE_,i.onBecomeStale_())}))}var Ro=function(){function e(t,n,a,l){t===void 0&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Kt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=cp.NONE,this.name_=t,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=l}var i=e.prototype;return i.onBecomeStale_=function(){this.schedule_()},i.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Ye.pendingReactions.push(this),N3())},i.runReaction_=function(){if(!this.isDisposed){vi(),this.isScheduled=!1;var n=Ye.trackingContext;if(Ye.trackingContext=this,wg(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}Ye.trackingContext=n,mi()}},i.track=function(n){if(!this.isDisposed){vi(),this.isRunning=!0;var a=Ye.trackingContext;Ye.trackingContext=this;var l=P3(this,n,void 0);Ye.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Sg(this),np(l)&&this.reportExceptionInDerivation_(l.cause),mi()}},i.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(Ye.disableErrorBoundaries)throw n;var l="[mobx] uncaught error in '"+this+"'";Ye.suppressReactionErrors||console.error(l,n),Ye.globalReactionErrorHandlers.forEach(function(u){return u(n,a)})},i.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(vi(),Sg(this),mi()))},i.getDisposer_=function(n){var a=this,l=function u(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",u)};return n==null||n.addEventListener==null||n.addEventListener("abort",l),l[ht]=this,l},i.toString=function(){return"Reaction["+this.name_+"]"},i.trace=function(n){},mc(e,[{key:"isDisposed",get:function(){return Ri(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return Ri(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return Ri(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return Ri(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ro.isDisposedMask_=1;Ro.isScheduledMask_=2;Ro.isTrackPendingMask_=4;Ro.isRunningMask_=8;Ro.diffValueMask_=16;function j6(e){return Ye.globalReactionErrorHandlers.push(e),function(){var i=Ye.globalReactionErrorHandlers.indexOf(e);i>=0&&Ye.globalReactionErrorHandlers.splice(i,1)}}var F6=100,Eg=function(i){return i()};function N3(){Ye.inBatch>0||Ye.isRunningReactions||Eg(z6)}function z6(){Ye.isRunningReactions=!0;for(var e=Ye.pendingReactions,i=0;e.length>0;){++i===F6&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var t=e.splice(0),n=0,a=t.length;n<a;n++)t[n].runReaction_()}Ye.isRunningReactions=!1}var dp=Zl("Reaction",Ro);function B6(e){var i=Eg;Eg=function(n){return e(function(){return i(n)})}}function _d(){return!1}function I3(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var D3="action",U6="action.bound",j3="autoAction",q6="autoAction.bound",F3="<unnamed action>",Og=Id(D3),H6=Id(U6,{bound:!0}),xg=Id(j3,{autoAction:!0}),G6=Id(q6,{autoAction:!0,bound:!0});function z3(e){var i=function(n,a){if(Li(n))return Kl(n.name||F3,n,e);if(Li(a))return Kl(n,a,e);if(Nd(a))return(e?xg:Og).decorate_20223_(n,a);if(Us(a))return Ld(n,a,e?xg:Og);if(Us(n))return Co(Id(e?j3:D3,{name:n,autoAction:e}))};return i}var Zn=z3(!1);Object.assign(Zn,Og);var ac=z3(!0);Object.assign(ac,xg);Zn.bound=Co(H6);ac.bound=Co(G6);function lc(e){return E3(e.name||F3,!1,e,this,void 0)}function sc(e){return Li(e)&&e.isMobxAction===!0}function zg(e,i){var t,n,a,l;i===void 0&&(i=Lg);var u=(t=(n=i)==null?void 0:n.name)!=null?t:"Autorun",c=!i.scheduler&&!i.delay,h;if(c)h=new Ro(u,function(){this.track(k)},i.onError,i.requiresObservable);else{var b=B3(i),_=!1;h=new Ro(u,function(){_||(_=!0,b(function(){_=!1,h.isDisposed||h.track(k)}))},i.onError,i.requiresObservable)}function k(){e(h)}return(a=i)!=null&&(a=a.signal)!=null&&a.aborted||h.schedule_(),h.getDisposer_((l=i)==null?void 0:l.signal)}var V6=function(i){return i()};function B3(e){return e.scheduler?e.scheduler:e.delay?function(i){return setTimeout(i,e.delay)}:V6}function U3(e,i,t){var n,a,l;t===void 0&&(t=Lg);var u=(n=t.name)!=null?n:"Reaction",c=Zn(u,t.onError?$6(t.onError,i):i),h=!t.scheduler&&!t.delay,b=B3(t),_=!0,k=!1,E,v=t.compareStructural?qs.structural:t.equals||qs.default,O=new Ro(u,function(){_||h?g():k||(k=!0,b(g))},t.onError,t.requiresObservable);function g(){if(k=!1,!O.isDisposed){var p=!1,P=E;O.track(function(){var d=Dg(!1,function(){return e(O)});p=_||!v(E,d),E=d}),(_&&t.fireImmediately||!_&&p)&&c(E,P,O),_=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||O.schedule_(),O.getDisposer_((l=t)==null?void 0:l.signal)}function $6(e,i){return function(){try{return i.apply(this,arguments)}catch(t){e.call(this,t)}}}var W6="onBO",Y6="onBUO";function q3(e,i,t){return H3(W6,e,i,t)}function Bg(e,i,t){return H3(Y6,e,i,t)}function H3(e,i,t,n){var a=typeof n=="function"?ua(i,t):ua(i),l=Li(n)?n:t,u=e+"L";return a[u]?a[u].add(l):a[u]=new Set([l]),function(){var c=a[u];c&&(c.delete(l),c.size===0&&delete a[u])}}var K6="never",Xh="always",X6="observed";function G3(e){e.isolateGlobalState===!0&&A6();var i=e.useProxies,t=e.enforceActions;if(i!==void 0&&(Ye.useProxies=i===Xh?!0:i===K6?!1:typeof Proxy<"u"),i==="ifavailable"&&(Ye.verifyProxies=!0),t!==void 0){var n=t===Xh?Xh:t===X6;Ye.enforceActions=n,Ye.allowStateChanges=!(n===!0||n===Xh)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(Ye[a]=!!e[a])}),Ye.allowStateReads=!Ye.observableRequiresReaction,e.reactionScheduler&&B6(e.reactionScheduler)}function Ug(e,i,t,n){var a=T_(i);return Jl(function(){var l=Ys(e,n)[ht];oc(a).forEach(function(u){l.extend_(u,a[u],t&&u in t?t[u]:!0)})}),e}function V3(e,i){return $3(ua(e,i))}function $3(e){var i={name:e.name_};return e.observing_&&e.observing_.length>0&&(i.dependencies=Q6(e.observing_).map($3)),i}function Z6(e,i){return W3(ua(e,i))}function W3(e){var i={name:e.name_};return M6(e)&&(i.observers=Array.from(L6(e)).map(W3)),i}function Q6(e){return Array.from(new Set(e))}var J6=0;function Tp(){this.message="FLOW_CANCELLED"}Tp.prototype=Object.create(Error.prototype);function ew(e){return e instanceof Tp}var P0=v3("flow"),tw=v3("flow.bound",{bound:!0}),Vs=Object.assign(function(i,t){if(Nd(t))return P0.decorate_20223_(i,t);if(Us(t))return Ld(i,t,P0);var n=i,a=n.name||"<unnamed flow>",l=function(){var c=this,h=arguments,b=++J6,_=Zn(a+" - runid: "+b+" - init",n).apply(c,h),k,E=void 0,v=new Promise(function(O,g){var p=0;k=g;function P(y){E=void 0;var w;try{w=Zn(a+" - runid: "+b+" - yield "+p++,_.next).call(_,y)}catch(N){return g(N)}m(w)}function d(y){E=void 0;var w;try{w=Zn(a+" - runid: "+b+" - yield "+p++,_.throw).call(_,y)}catch(N){return g(N)}m(w)}function m(y){if(Li(y==null?void 0:y.then)){y.then(m,g);return}return y.done?O(y.value):(E=Promise.resolve(y.value),E.then(P,d))}P(void 0)});return v.cancel=Zn(a+" - runid: "+b+" - cancel",function(){try{E&&dm(E);var O=_.return(void 0),g=Promise.resolve(O.value);g.then(ec,ec),dm(g),k(new Tp)}catch(p){k(p)}}),v};return l.isMobXFlow=!0,l},P0);Vs.bound=Co(tw);function dm(e){Li(e.cancel)&&e.cancel()}function nw(e){return e}function uc(e){return(e==null?void 0:e.isMobXFlow)===!0}function qg(e,i,t){var n;return Nr(e)||ri(e)||jg(e)?n=Mo(e):_r(e)&&(n=Mo(e,i)),n.dehancer=typeof i=="function"?i:t,function(){n.dehancer=void 0}}function Ap(e,i,t){return Li(t)?iw(e,i,t):rw(e,i)}function rw(e,i){return Mo(e).intercept_(i)}function iw(e,i,t){return Mo(e,i).intercept_(t)}function Y3(e,i){if(i===void 0)return Gs(e);if(_r(e)===!1||!e[ht].values_.has(i))return!1;var t=ua(e,i);return Gs(t)}function ow(e){return Y3(e)}function K3(e,i){return Y3(e,i)}function X3(e,i){return e?i!==void 0?_r(e)?e[ht].values_.has(i):!1:_r(e)||!!e[ht]||Ng(e)||dp(e)||Gs(e):!1}function Rp(e){return X3(e)}function Z3(e,i){return X3(e,i)}function Od(e){if(_r(e))return e[ht].keys_();if(Nr(e)||lr(e))return Array.from(e.keys());if(ri(e))return e.map(function(i,t){return t});kt(5)}function Hg(e){if(_r(e))return Od(e).map(function(i){return e[i]});if(Nr(e))return Od(e).map(function(i){return e.get(i)});if(lr(e))return Array.from(e.values());if(ri(e))return e.slice();kt(6)}function Q3(e){if(_r(e))return Od(e).map(function(i){return[i,e[i]]});if(Nr(e))return Od(e).map(function(i){return[i,e.get(i)]});if(lr(e))return Array.from(e.entries());if(ri(e))return e.map(function(i,t){return[t,i]});kt(7)}function Gg(e,i,t){if(arguments.length===2&&!lr(e)){vi();var n=i;try{for(var a in n)Gg(e,a,n[a])}finally{mi()}return}_r(e)?e[ht].set_(i,t):Nr(e)?e.set(i,t):lr(e)?e.add(i):ri(e)?(typeof i!="number"&&(i=parseInt(i,10)),i<0&&kt("Invalid index: '"+i+"'"),vi(),i>=e.length&&(e.length=i+1),e[i]=t,mi()):kt(8)}function aw(e,i){_r(e)?e[ht].delete_(i):Nr(e)||lr(e)?e.delete(i):ri(e)?(typeof i!="number"&&(i=parseInt(i,10)),e.splice(i,1)):kt(9)}function J3(e,i){if(_r(e))return e[ht].has_(i);if(Nr(e))return e.has(i);if(lr(e))return e.has(i);if(ri(e))return i>=0&&i<e.length;kt(10)}function lw(e,i){if(J3(e,i)){if(_r(e))return e[ht].get_(i);if(Nr(e))return e.get(i);if(ri(e))return e[i];kt(11)}}function Vg(e,i,t){if(_r(e))return e[ht].defineProperty_(i,t);kt(39)}function e5(e){if(_r(e))return e[ht].ownKeys_();kt(38)}function Mp(e,i,t,n){return Li(t)?uw(e,i,t,n):sw(e,i,t)}function sw(e,i,t){return Mo(e).observe_(i,t)}function uw(e,i,t,n){return Mo(e,i).observe_(t,n)}function Zh(e,i,t){return e.set(i,t),t}function Qu(e,i){if(e==null||typeof e!="object"||e instanceof Date||!Rp(e))return e;if(jg(e)||Gs(e))return Qu(e.get(),i);if(i.has(e))return i.get(e);if(ri(e)){var t=Zh(i,e,new Array(e.length));return e.forEach(function(u,c){t[c]=Qu(u,i)}),t}if(lr(e)){var n=Zh(i,e,new Set);return e.forEach(function(u){n.add(Qu(u,i))}),n}if(Nr(e)){var a=Zh(i,e,new Map);return e.forEach(function(u,c){a.set(c,Qu(u,i))}),a}else{var l=Zh(i,e,{});return e5(e).forEach(function(u){Rd.propertyIsEnumerable.call(e,u)&&(l[u]=Qu(e[u],i))}),l}}function cw(e,i){return Qu(e,new Map)}function fw(){}function oa(e,i){i===void 0&&(i=void 0),vi();try{return e.apply(i)}finally{mi()}}function Pg(e,i,t){return arguments.length===1||i&&typeof i=="object"?dw(e,i):t5(e,i,t||{})}function t5(e,i,t){var n;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!u[ht].isDisposed)if(u(),t.onError)t.onError(a);else throw a},t.timeout)}t.name="When";var l=Kl("When-effect",i),u=zg(function(c){var h=Dg(!1,e);h&&(c.dispose(),n&&clearTimeout(n),l())},t);return u}function dw(e,i){var t;if(i!=null&&(t=i.signal)!=null&&t.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,a,l=new Promise(function(u,c){var h,b=t5(e,u,Yl({},i,{onError:c}));n=function(){b(),c(new Error("WHEN_CANCELLED"))},a=function(){b(),c(new Error("WHEN_ABORTED"))},i==null||(h=i.signal)==null||h.addEventListener==null||h.addEventListener("abort",a)}).finally(function(){var u;return i==null||(u=i.signal)==null||u.removeEventListener==null?void 0:u.removeEventListener("abort",a)});return l.cancel=n,l}function Ku(e){return e[ht]}var hw={has:function(i,t){return Ku(i).has_(t)},get:function(i,t){return Ku(i).get_(t)},set:function(i,t,n){var a;return Us(t)?(a=Ku(i).set_(t,n,!0))!=null?a:!0:!1},deleteProperty:function(i,t){var n;return Us(t)?(n=Ku(i).delete_(t,!0))!=null?n:!0:!1},defineProperty:function(i,t,n){var a;return(a=Ku(i).defineProperty_(t,n))!=null?a:!0},ownKeys:function(i){return Ku(i).ownKeys_()},preventExtensions:function(i){kt(13)}};function pw(e,i){var t,n;return l3(),e=Ys(e,i),(n=(t=e[ht]).proxy_)!=null?n:t.proxy_=new Proxy(e,hw)}function Xi(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Dd(e,i){var t=e.interceptors_||(e.interceptors_=[]);return t.push(i),s3(function(){var n=t.indexOf(i);n!==-1&&t.splice(n,1)})}function Zi(e,i){var t=Ws();try{for(var n=[].concat(e.interceptors_||[]),a=0,l=n.length;a<l&&(i=n[a](i),i&&!i.type&&kt(14),!!i);a++);return i}finally{Ka(t)}}function ko(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function jd(e,i){var t=e.changeListeners_||(e.changeListeners_=[]);return t.push(i),s3(function(){var n=t.indexOf(i);n!==-1&&t.splice(n,1)})}function To(e,i){var t=Ws(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,l=n.length;a<l;a++)n[a](i);Ka(t)}}function $g(e,i,t){return Jl(function(){var n,a=Ys(e,t)[ht];(n=i)!=null||(i=N_(e)),oc(i).forEach(function(l){return a.make_(l,i[l])})}),e}var C0=Symbol("mobx-keys");function gw(e,i,t){return Za(e)?Ug(e,e,i,t):(Jl(function(){var n=Ys(e,t)[ht];if(!e[C0]){var a=Object.getPrototypeOf(e),l=new Set([].concat(oc(e),oc(a)));l.delete("constructor"),l.delete(ht),Md(a,C0,l)}e[C0].forEach(function(u){return n.make_(u,i&&u in i?i[u]:!0)})}),e)}var hm="splice",sa="update",vw=1e4,mw={get:function(i,t){var n=i[ht];return t===ht?n:t==="length"?n.getArrayLength_():typeof t=="string"&&!isNaN(t)?n.get_(parseInt(t)):Ya(hp,t)?hp[t]:i[t]},set:function(i,t,n){var a=i[ht];return t==="length"&&a.setArrayLength_(n),typeof t=="symbol"||isNaN(t)?i[t]=n:a.set_(parseInt(t),n),!0},preventExtensions:function(){kt(15)}},Wg=function(){function e(t,n,a,l){t===void 0&&(t="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=a,this.legacyMode_=l,this.atom_=new Ql(t),this.enhancer_=function(u,c){return n(u,c,"ObservableArray[..]")}}var i=e.prototype;return i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},i.intercept_=function(n){return Dd(this,n)},i.observe_=function(n,a){return a===void 0&&(a=!1),a&&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}),jd(this,n)},i.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},i.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&kt("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var l=new Array(n-a),u=0;u<n-a;u++)l[u]=void 0;this.spliceWithArray_(a,0,l)}else this.spliceWithArray_(n,a-n)},i.updateArrayLength_=function(n,a){n!==this.lastKnownLength_&&kt(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&a5(n+a+1)},i.spliceWithArray_=function(n,a,l){var u=this;this.atom_;var c=this.values_.length;if(n===void 0?n=0:n>c?n=c:n<0&&(n=Math.max(0,c+n)),arguments.length===1?a=c-n:a==null?a=0:a=Math.max(0,Math.min(a,c-n)),l===void 0&&(l=mg),Xi(this)){var h=Zi(this,{object:this.proxy_,type:hm,index:n,removedCount:a,added:l});if(!h)return mg;a=h.removedCount,l=h.added}if(l=l.length===0?l:l.map(function(k){return u.enhancer_(k,void 0)}),this.legacyMode_){var b=l.length-a;this.updateArrayLength_(c,b)}var _=this.spliceItemsIntoValues_(n,a,l);return(a!==0||l.length!==0)&&this.notifyArraySplice_(n,l,_),this.dehanceValues_(_)},i.spliceItemsIntoValues_=function(n,a,l){if(l.length<vw){var u;return(u=this.values_).splice.apply(u,[n,a].concat(l))}else{var c=this.values_.slice(n,n+a),h=this.values_.slice(n+a);this.values_.length+=l.length-a;for(var b=0;b<l.length;b++)this.values_[n+b]=l[b];for(var _=0;_<h.length;_++)this.values_[n+l.length+_]=h[_];return c}},i.notifyArrayChildUpdate_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),h=c||u?{observableKind:"array",object:this.proxy_,type:sa,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:l}:null;this.atom_.reportChanged(),c&&To(this,h)},i.notifyArraySplice_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),h=c||u?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:hm,index:n,removed:l,added:a,removedCount:l.length,addedCount:a.length}:null;this.atom_.reportChanged(),c&&To(this,h)},i.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])},i.set_=function(n,a){var l=this.values_;if(this.legacyMode_&&n>l.length&&kt(17,n,l.length),n<l.length){this.atom_;var u=l[n];if(Xi(this)){var c=Zi(this,{type:sa,object:this.proxy_,index:n,newValue:a});if(!c)return;a=c.newValue}a=this.enhancer_(a,u);var h=a!==u;h&&(l[n]=a,this.notifyArrayChildUpdate_(n,a,u))}else{for(var b=new Array(n+1-l.length),_=0;_<b.length-1;_++)b[_]=void 0;b[b.length-1]=a,this.spliceWithArray_(l.length,0,b)}},e}();function yw(e,i,t,n){return t===void 0&&(t="ObservableArray"),n===void 0&&(n=!1),l3(),Jl(function(){var a=new Wg(t,i,n,!1);c3(a.values_,ht,a);var l=new Proxy(a.values_,mw);return a.proxy_=l,e&&e.length&&a.spliceWithArray_(0,0,e),l})}var hp={clear:function(){return this.splice(0)},replace:function(i){var t=this[ht];return t.spliceWithArray_(0,t.values_.length,i)},toJSON:function(){return this.slice()},splice:function(i,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),l=2;l<n;l++)a[l-2]=arguments[l];var u=this[ht];switch(arguments.length){case 0:return[];case 1:return u.spliceWithArray_(i);case 2:return u.spliceWithArray_(i,t)}return u.spliceWithArray_(i,t,a)},spliceWithArray:function(i,t,n){return this[ht].spliceWithArray_(i,t,n)},push:function(){for(var i=this[ht],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return i.spliceWithArray_(i.values_.length,0,n),i.values_.length},pop:function(){return this.splice(Math.max(this[ht].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var i=this[ht],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return i.spliceWithArray_(0,0,n),i.values_.length},reverse:function(){return Ye.trackingDerivation&&kt(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Ye.trackingDerivation&&kt(37,"sort");var i=this.slice();return i.sort.apply(i,arguments),this.replace(i),this},remove:function(i){var t=this[ht],n=t.dehanceValues_(t.values_).indexOf(i);return n>-1?(this.splice(n,1),!0):!1}};yn("at",Ni);yn("concat",Ni);yn("flat",Ni);yn("includes",Ni);yn("indexOf",Ni);yn("join",Ni);yn("lastIndexOf",Ni);yn("slice",Ni);yn("toString",Ni);yn("toLocaleString",Ni);yn("toSorted",Ni);yn("toSpliced",Ni);yn("with",Ni);yn("every",Lo);yn("filter",Lo);yn("find",Lo);yn("findIndex",Lo);yn("findLast",Lo);yn("findLastIndex",Lo);yn("flatMap",Lo);yn("forEach",Lo);yn("map",Lo);yn("some",Lo);yn("toReversed",Lo);yn("reduce",n5);yn("reduceRight",n5);function yn(e,i){typeof Array.prototype[e]=="function"&&(hp[e]=i(e))}function Ni(e){return function(){var i=this[ht];i.atom_.reportObserved();var t=i.dehanceValues_(i.values_);return t[e].apply(t,arguments)}}function Lo(e){return function(i,t){var n=this,a=this[ht];a.atom_.reportObserved();var l=a.dehanceValues_(a.values_);return l[e](function(u,c){return i.call(t,u,c,n)})}}function n5(e){return function(){var i=this,t=this[ht];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=function(l,u,c){return a(l,u,c,i)},n[e].apply(n,arguments)}}var bw=Zl("ObservableArrayAdministration",Wg);function ri(e){return Ep(e)&&bw(e[ht])}var _w={},Vl="add",pp="delete",Lp=function(){function e(t,n,a){var l=this;n===void 0&&(n=Hs),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[ht]=_w,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_=a,Li(Map)||kt(18),Jl(function(){l.keysAtom_=Ed("ObservableMap.keys()"),l.data_=new Map,l.hasMap_=new Map,t&&l.merge(t)})}var i=e.prototype;return i.has_=function(n){return this.data_.has(n)},i.has=function(n){var a=this;if(!Ye.trackingDerivation)return this.has_(n);var l=this.hasMap_.get(n);if(!l){var u=l=new $l(this.has_(n),Op,"ObservableMap.key?",!1);this.hasMap_.set(n,u),Bg(u,function(){return a.hasMap_.delete(n)})}return l.get()},i.set=function(n,a){var l=this.has_(n);if(Xi(this)){var u=Zi(this,{type:l?sa:Vl,object:this,newValue:a,name:n});if(!u)return this;a=u.newValue}return l?this.updateValue_(n,a):this.addValue_(n,a),this},i.delete=function(n){var a=this;if(this.keysAtom_,Xi(this)){var l=Zi(this,{type:pp,object:this,name:n});if(!l)return!1}if(this.has_(n)){var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:pp,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return oa(function(){var b;a.keysAtom_.reportChanged(),(b=a.hasMap_.get(n))==null||b.setNewValue_(!1);var _=a.data_.get(n);_.setNewValue_(void 0),a.data_.delete(n)}),c&&To(this,h),!0}return!1},i.updateValue_=function(n,a){var l=this.data_.get(n);if(a=l.prepareNewValue_(a),a!==Ye.UNCHANGED){var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:sa,object:this,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&To(this,h)}},i.addValue_=function(n,a){var l=this;this.keysAtom_,oa(function(){var b,_=new $l(a,l.enhancer_,"ObservableMap.key",!1);l.data_.set(n,_),a=_.value_,(b=l.hasMap_.get(n))==null||b.setNewValue_(!0),l.keysAtom_.reportChanged()});var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:Vl,object:this,name:n,newValue:a}:null;c&&To(this,h)},i.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},i.values=function(){var n=this,a=this.keys();return pm({next:function(){var u=a.next(),c=u.done,h=u.value;return{done:c,value:c?void 0:n.get(h)}}})},i.entries=function(){var n=this,a=this.keys();return pm({next:function(){var u=a.next(),c=u.done,h=u.value;return{done:c,value:c?void 0:[h,n.get(h)]}}})},i[Symbol.iterator]=function(){return this.entries()},i.forEach=function(n,a){for(var l=tc(this),u;!(u=l()).done;){var c=u.value,h=c[0],b=c[1];n.call(a,b,h,this)}},i.merge=function(n){var a=this;return Nr(n)&&(n=new Map(n)),oa(function(){Za(n)?k_(n).forEach(function(l){return a.set(l,n[l])}):Array.isArray(n)?n.forEach(function(l){var u=l[0],c=l[1];return a.set(u,c)}):vc(n)?(C_(n)||kt(19,n),n.forEach(function(l,u){return a.set(u,l)})):n!=null&&kt(20,n)}),this},i.clear=function(){var n=this;oa(function(){Fg(function(){for(var a=tc(n.keys()),l;!(l=a()).done;){var u=l.value;n.delete(u)}})})},i.replace=function(n){var a=this;return oa(function(){for(var l=ww(n),u=new Map,c=!1,h=tc(a.data_.keys()),b;!(b=h()).done;){var _=b.value;if(!l.has(_)){var k=a.delete(_);if(k)c=!0;else{var E=a.data_.get(_);u.set(_,E)}}}for(var v=tc(l.entries()),O;!(O=v()).done;){var g=O.value,p=g[0],P=g[1],d=a.data_.has(p);if(a.set(p,P),a.data_.has(p)){var m=a.data_.get(p);u.set(p,m),d||(c=!0)}}if(!c)if(a.data_.size!==u.size)a.keysAtom_.reportChanged();else for(var y=a.data_.keys(),w=u.keys(),N=y.next(),R=w.next();!N.done;){if(N.value!==R.value){a.keysAtom_.reportChanged();break}N=y.next(),R=w.next()}a.data_=u}),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},mc(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Nr=Zl("ObservableMap",Lp);function pm(e){return e[Symbol.toStringTag]="MapIterator",Zg(e)}function ww(e){if(vc(e)||Nr(e))return e;if(Array.isArray(e))return new Map(e);if(Za(e)){var i=new Map;for(var t in e)i.set(t,e[t]);return i}else return kt(21,e)}var Sw={},Yg=function(){function e(t,n,a){var l=this;n===void 0&&(n=Hs),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[ht]=Sw,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Li(Set)||kt(22),this.enhancer_=function(u,c){return n(u,c,a)},Jl(function(){l.atom_=Ed(l.name_),t&&l.replace(t)})}var i=e.prototype;return i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.clear=function(){var n=this;oa(function(){Fg(function(){for(var a=tc(n.data_.values()),l;!(l=a()).done;){var u=l.value;n.delete(u)}})})},i.forEach=function(n,a){for(var l=tc(this),u;!(u=l()).done;){var c=u.value;n.call(a,c,c,this)}},i.add=function(n){var a=this;if(this.atom_,Xi(this)){var l=Zi(this,{type:Vl,object:this,newValue:n});if(!l)return this}if(!this.has(n)){oa(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var u=!1,c=ko(this),h=c||u?{observableKind:"set",debugObjectName:this.name_,type:Vl,object:this,newValue:n}:null;c&&To(this,h)}return this},i.delete=function(n){var a=this;if(Xi(this)){var l=Zi(this,{type:pp,object:this,oldValue:n});if(!l)return!1}if(this.has(n)){var u=!1,c=ko(this),h=c||u?{observableKind:"set",debugObjectName:this.name_,type:pp,object:this,oldValue:n}:null;return oa(function(){a.atom_.reportChanged(),a.data_.delete(n)}),c&&To(this,h),!0}return!1},i.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},i.entries=function(){var n=0,a=Array.from(this.keys()),l=Array.from(this.values());return gm({next:function(){var c=n;return n+=1,c<l.length?{value:[a[c],l[c]],done:!1}:{value:void 0,done:!0}}})},i.keys=function(){return this.values()},i.values=function(){this.atom_.reportObserved();var n=this,a=0,l=Array.from(this.data_.values());return gm({next:function(){return a<l.length?{value:n.dehanceValue_(l[a++]),done:!1}:{value:void 0,done:!0}}})},i.intersection=function(n){if(Wa(n)&&!lr(n))return n.intersection(this);var a=new Set(this);return a.intersection(n)},i.union=function(n){if(Wa(n)&&!lr(n))return n.union(this);var a=new Set(this);return a.union(n)},i.difference=function(n){return new Set(this).difference(n)},i.symmetricDifference=function(n){if(Wa(n)&&!lr(n))return n.symmetricDifference(this);var a=new Set(this);return a.symmetricDifference(n)},i.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},i.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},i.isDisjointFrom=function(n){if(Wa(n)&&!lr(n))return n.isDisjointFrom(this);var a=new Set(this);return a.isDisjointFrom(n)},i.replace=function(n){var a=this;return lr(n)&&(n=new Set(n)),oa(function(){Array.isArray(n)?(a.clear(),n.forEach(function(l){return a.add(l)})):Wa(n)?(a.clear(),n.forEach(function(l){return a.add(l)})):n!=null&&kt("Cannot initialize set from "+n)}),this},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Symbol.iterator]=function(){return this.values()},mc(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),lr=Zl("ObservableSet",Yg);function gm(e){return e[Symbol.toStringTag]="SetIterator",Zg(e)}var vm=Object.create(null),mm="remove",r5=function(){function e(t,n,a,l){n===void 0&&(n=new Map),l===void 0&&(l=u6),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=t,this.values_=n,this.name_=a,this.defaultAnnotation_=l,this.keysAtom_=new Ql("ObservableObject.keys"),this.isPlainObject_=Za(this.target_)}var i=e.prototype;return i.getObservablePropValue_=function(n){return this.values_.get(n).get()},i.setObservablePropValue_=function(n,a){var l=this.values_.get(n);if(l instanceof Ao)return l.set(a),!0;if(Xi(this)){var u=Zi(this,{type:sa,object:this.proxy_||this.target_,name:n,newValue:a});if(!u)return null;a=u.newValue}if(a=l.prepareNewValue_(a),a!==Ye.UNCHANGED){var c=ko(this),h=!1,b=c||h?{type:sa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&To(this,b)}return!0},i.get_=function(n){return Ye.trackingDerivation&&!Ya(this.target_,n)&&this.has_(n),this.target_[n]},i.set_=function(n,a,l){return l===void 0&&(l=!1),Ya(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,a):l?Reflect.set(this.target_,n,a):(this.target_[n]=a,!0):this.extend_(n,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,l)},i.has_=function(n){if(!Ye.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(n);return a||(a=new $l(n in this.target_,Op,"ObservableObject.key?",!1),this.pendingKeys_.set(n,a)),a.get()},i.make_=function(n,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(n in this.target_)){var l;if((l=this.target_[aa])!=null&&l[n])return;kt(1,a.annotationType_,this.name_+"."+n.toString())}for(var u=this.target_;u&&u!==Rd;){var c=sp(u,n);if(c){var h=a.make_(this,n,c,u);if(h===0)return;if(h===1)break}u=Object.getPrototypeOf(u)}bm(this,a,n)}},i.extend_=function(n,a,l,u){if(u===void 0&&(u=!1),l===!0&&(l=this.defaultAnnotation_),l===!1)return this.defineProperty_(n,a,u);var c=l.extend_(this,n,a,u);return c&&bm(this,l,n),c},i.defineProperty_=function(n,a,l){l===void 0&&(l=!1),this.keysAtom_;try{vi();var u=this.delete_(n);if(!u)return u;if(Xi(this)){var c=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:a.value});if(!c)return null;var h=c.newValue;a.value!==h&&(a=Yl({},a,{value:h}))}if(l){if(!Reflect.defineProperty(this.target_,n,a))return!1}else la(this.target_,n,a);this.notifyPropertyAddition_(n,a.value)}finally{mi()}return!0},i.defineObservableProperty_=function(n,a,l,u){u===void 0&&(u=!1),this.keysAtom_;try{vi();var c=this.delete_(n);if(!c)return c;if(Xi(this)){var h=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:a});if(!h)return null;a=h.newValue}var b=ym(n),_={configurable:Ye.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:b.get,set:b.set};if(u){if(!Reflect.defineProperty(this.target_,n,_))return!1}else la(this.target_,n,_);var k=new $l(a,l,"ObservableObject.key",!1);this.values_.set(n,k),this.notifyPropertyAddition_(n,k.value_)}finally{mi()}return!0},i.defineComputedProperty_=function(n,a,l){l===void 0&&(l=!1),this.keysAtom_;try{vi();var u=this.delete_(n);if(!u)return u;if(Xi(this)){var c=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:void 0});if(!c)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var h=ym(n),b={configurable:Ye.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:h.get,set:h.set};if(l){if(!Reflect.defineProperty(this.target_,n,b))return!1}else la(this.target_,n,b);this.values_.set(n,new Ao(a)),this.notifyPropertyAddition_(n,void 0)}finally{mi()}return!0},i.delete_=function(n,a){if(a===void 0&&(a=!1),this.keysAtom_,!Ya(this.target_,n))return!0;if(Xi(this)){var l=Zi(this,{object:this.proxy_||this.target_,name:n,type:mm});if(!l)return null}try{var u;vi();var c=ko(this),h=!1,b=this.values_.get(n),_=void 0;if(!b&&(c||h)){var k;_=(k=sp(this.target_,n))==null?void 0:k.value}if(a){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(b&&(this.values_.delete(n),b instanceof $l&&(_=b.value_),L3(b)),this.keysAtom_.reportChanged(),(u=this.pendingKeys_)==null||(u=u.get(n))==null||u.set(n in this.target_),c||h){var E={type:mm,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:_,name:n};c&&To(this,E)}}finally{mi()}return!0},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},i.notifyPropertyAddition_=function(n,a){var l,u=ko(this),c=!1;if(u||c){var h=u||c?{type:Vl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;u&&To(this,h)}(l=this.pendingKeys_)==null||(l=l.get(n))==null||l.set(!0),this.keysAtom_.reportChanged()},i.ownKeys_=function(){return this.keysAtom_.reportObserved(),oc(this.target_)},i.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ys(e,i){var t;if(Ya(e,ht))return e;var n=(t=i==null?void 0:i.name)!=null?t:"ObservableObject",a=new r5(e,new Map,String(n),_6(i));return Md(e,ht,a),e}var Ew=Zl("ObservableObjectAdministration",r5);function ym(e){return vm[e]||(vm[e]={get:function(){return this[ht].getObservablePropValue_(e)},set:function(t){return this[ht].setObservablePropValue_(e,t)}})}function _r(e){return Ep(e)?Ew(e[ht]):!1}function bm(e,i,t){var n;(n=e.target_[aa])==null||delete n[t]}var Ow=o5(0),xw=function(){var e=!1,i={};return Object.defineProperty(i,"0",{set:function(){e=!0}}),Object.create(i)[0]=1,e===!1}(),k0=0,i5=function(){};function Pw(e,i){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,i):e.prototype.__proto__!==void 0?e.prototype.__proto__=i:e.prototype=i}Pw(i5,Array.prototype);var Kg=function(e){function i(n,a,l,u){var c;return l===void 0&&(l="ObservableArray"),u===void 0&&(u=!1),c=e.call(this)||this,Jl(function(){var h=new Wg(l,a,u,!0);h.proxy_=c,c3(c,ht,h),n&&n.length&&c.spliceWithArray(0,0,n),xw&&Object.defineProperty(c,"0",Ow)}),c}h3(i,e);var t=i.prototype;return t.concat=function(){this[ht].atom_.reportObserved();for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),l.map(function(c){return ri(c)?c.slice():c}))},t[Symbol.iterator]=function(){var n=this,a=0;return Zg({next:function(){return a<n.length?{value:n[a++],done:!1}:{done:!0,value:void 0}}})},mc(i,[{key:"length",get:function(){return this[ht].getArrayLength_()},set:function(a){this[ht].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(i5);Object.entries(hp).forEach(function(e){var i=e[0],t=e[1];i!=="concat"&&Md(Kg.prototype,i,t)});function o5(e){return{enumerable:!1,configurable:!0,get:function(){return this[ht].get_(e)},set:function(t){this[ht].set_(e,t)}}}function Cw(e){la(Kg.prototype,""+e,o5(e))}function a5(e){if(e>k0){for(var i=k0;i<e+100;i++)Cw(i);k0=e}}a5(1e3);function kw(e,i,t){return new Kg(e,i,t)}function ua(e,i){if(typeof e=="object"&&e!==null){if(ri(e))return i!==void 0&&kt(23),e[ht].atom_;if(lr(e))return e.atom_;if(Nr(e)){if(i===void 0)return e.keysAtom_;var t=e.data_.get(i)||e.hasMap_.get(i);return t||kt(25,i,gp(e)),t}if(_r(e)){if(!i)return kt(26);var n=e[ht].values_.get(i);return n||kt(27,i,gp(e)),n}if(Ng(e)||Gs(e)||dp(e))return e}else if(Li(e)&&dp(e[ht]))return e[ht];kt(28)}function Mo(e,i){if(e||kt(29),i!==void 0)return Mo(ua(e,i));if(Ng(e)||Gs(e)||dp(e)||Nr(e)||lr(e))return e;if(e[ht])return e[ht];kt(24,e)}function gp(e,i){var t;if(i!==void 0)t=ua(e,i);else{if(sc(e))return e.name;_r(e)||Nr(e)||lr(e)?t=Mo(e):t=ua(e)}return t.name_}function Jl(e){var i=Ws(),t=Pp(!0);vi();try{return e()}finally{mi(),Cp(t),Ka(i)}}var _m=Rd.toString;function Xg(e,i,t){return t===void 0&&(t=-1),Cg(e,i,t)}function Cg(e,i,t,n,a){if(e===i)return e!==0||1/e===1/i;if(e==null||i==null)return!1;if(e!==e)return i!==i;var l=typeof e;if(l!=="function"&&l!=="object"&&typeof i!="object")return!1;var u=_m.call(e);if(u!==_m.call(i))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+i;case"[object Number]":return+e!=+e?+i!=+i:+e==0?1/+e===1/i:+e==+i;case"[object Date]":case"[object Boolean]":return+e==+i;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(i);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=wm(e),i=wm(i);var c=u==="[object Array]";if(!c){if(typeof e!="object"||typeof i!="object")return!1;var h=e.constructor,b=i.constructor;if(h!==b&&!(Li(h)&&h instanceof h&&Li(b)&&b instanceof b)&&"constructor"in e&&"constructor"in i)return!1}if(t===0)return!1;t<0&&(t=-1),n=n||[],a=a||[];for(var _=n.length;_--;)if(n[_]===e)return a[_]===i;if(n.push(e),a.push(i),c){if(_=e.length,_!==i.length)return!1;for(;_--;)if(!Cg(e[_],i[_],t-1,n,a))return!1}else{var k=Object.keys(e),E;if(_=k.length,Object.keys(i).length!==_)return!1;for(;_--;)if(E=k[_],!(Ya(i,E)&&Cg(e[E],i[E],t-1,n,a)))return!1}return n.pop(),a.pop(),!0}function wm(e){return ri(e)?e.slice():vc(e)||Nr(e)||Wa(e)||lr(e)?Array.from(e.entries()):e}var Sm,Tw=((Sm=Sp().Iterator)==null?void 0:Sm.prototype)||{};function Zg(e){return e[Symbol.iterator]=Aw,Object.assign(Object.create(Tw),e)}function Aw(){return this}["Symbol","Map","Set"].forEach(function(e){var i=Sp();typeof i[e]>"u"&&kt("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:I3,extras:{getDebugName:gp},$mobx:ht});const Rw=Object.freeze(Object.defineProperty({__proto__:null,$mobx:ht,FlowCancellationError:Tp,ObservableMap:Lp,ObservableSet:Yg,Reaction:Ro,_allowStateChanges:Dg,_allowStateChangesInsideComputed:lc,_allowStateReadsEnd:rc,_allowStateReadsStart:kp,_autoAction:ac,_endAction:x3,_getAdministration:Mo,_getGlobalState:T3,_interceptReads:qg,_isComputingDerivation:C6,_resetGlobalState:R6,_startAction:O3,action:Zn,autorun:zg,comparer:qs,computed:$s,configure:G3,createAtom:Ed,defineProperty:Vg,entries:Q3,extendObservable:Ug,flow:Vs,flowResult:nw,get:lw,getAtom:ua,getDebugName:gp,getDependencyTree:V3,getObserverTree:Z6,has:J3,intercept:Ap,isAction:sc,isBoxedObservable:jg,isComputed:ow,isComputedProp:K3,isFlow:uc,isFlowCancellationError:ew,isObservable:Rp,isObservableArray:ri,isObservableMap:Nr,isObservableObject:_r,isObservableProp:Z3,isObservableSet:lr,keys:Od,makeAutoObservable:gw,makeObservable:$g,observable:sn,observe:Mp,onBecomeObserved:q3,onBecomeUnobserved:Bg,onReactionError:j6,override:U_,ownKeys:e5,reaction:U3,remove:aw,runInAction:lc,set:Gg,spy:I3,toJS:cw,trace:fw,transaction:oa,untracked:Fg,values:Hg,when:Pg},Symbol.toStringTag,{value:"Module"}));if(!On.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!$g)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var Mw=i3();function Lw(e){e()}function l5(e){e||(e=Lw),G3({reactionScheduler:e})}var Nw=function(){return!0};function Iw(e){return V3(e)}var s5=!1;function u5(e){s5=e}function Qg(){return s5}var Dw=1e4,jw=1e4,Fw=function(){function e(i){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(n){n===void 0&&(n=Dw),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var a=Date.now();t.registrations.forEach(function(l,u){a-l.registeredAt>=n&&(t.finalize(l.value),t.registrations.delete(u))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.registrations.delete(i)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,jw))}}),e}(),zw=typeof FinalizationRegistry<"u"?FinalizationRegistry:Fw,vp=new zw(function(e){var i;(i=e.reaction)===null||i===void 0||i.dispose(),e.reaction=null}),T0={exports:{}},A0={};/**
|
|
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 Em;function Bw(){if(Em)return A0;Em=1;var e=Tn();function i(k,E){return k===E&&(k!==0||1/k===1/E)||k!==k&&E!==E}var t=typeof Object.is=="function"?Object.is:i,n=e.useState,a=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(k,E){var v=E(),O=n({inst:{value:v,getSnapshot:E}}),g=O[0].inst,p=O[1];return l(function(){g.value=v,g.getSnapshot=E,h(g)&&p({inst:g})},[k,v,E]),a(function(){return h(g)&&p({inst:g}),k(function(){h(g)&&p({inst:g})})},[k]),u(v),v}function h(k){var E=k.getSnapshot;k=k.value;try{var v=E();return!t(k,v)}catch{return!0}}function b(k,E){return E()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:c;return A0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,A0}var Om;function Uw(){return Om||(Om=1,T0.exports=Bw()),T0.exports}var qw=Uw();function xm(e){e.reaction=new Ro("observer".concat(e.name),function(){var i;e.stateVersion=Symbol(),(i=e.onStoreChange)===null||i===void 0||i.call(e)})}function Jg(e,i){if(i===void 0&&(i="observed"),Qg())return e();var t=zt.useRef(null);if(!t.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:i,subscribe:function(c){return vp.unregister(n),n.onStoreChange=c,n.reaction||(xm(n),n.stateVersion=Symbol()),function(){var h;n.onStoreChange=null,(h=n.reaction)===null||h===void 0||h.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};t.current=n}var a=t.current;a.reaction||(xm(a),vp.register(t,a,a)),zt.useDebugValue(a.reaction,Iw),qw.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);var l,u;if(a.reaction.track(function(){try{l=e()}catch(c){u=c}}),u)throw u;return l}var R0,M0,c5=typeof Symbol=="function"&&Symbol.for,Hw=(M0=(R0=Object.getOwnPropertyDescriptor(function(){},"name"))===null||R0===void 0?void 0:R0.configurable)!==null&&M0!==void 0?M0:!1,Pm=c5?Symbol.for("react.forward_ref"):typeof On.forwardRef=="function"&&On.forwardRef(function(e){return null}).$$typeof,Cm=c5?Symbol.for("react.memo"):typeof On.memo=="function"&&On.memo(function(e){return null}).$$typeof;function Gw(e,i){var t;if(Cm&&e.$$typeof===Cm)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(Qg())return e;var n=(t=i==null?void 0:i.forwardRef)!==null&&t!==void 0?t:!1,a=e,l=e.displayName||e.name;if(Pm&&e.$$typeof===Pm&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var u=function(c,h){return Jg(function(){return a(c,h)},l)};return u.displayName=e.displayName,Hw&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes),n&&(u=On.forwardRef(u)),u=On.memo(u),$w(e,u),u}var Vw={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function $w(e,i){Object.keys(e).forEach(function(t){Vw[t]||Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})}function f5(e){var i=e.children,t=e.render,n=i||t;return typeof n!="function"?null:Jg(n)}f5.displayName="Observer";function Ww(e,i){return On.useState(function(){return sn(e(),i,{autoBind:!0})})[0]}function d5(e){var i=On.useState(function(){return sn(e,{},{deep:!1})})[0];return lc(function(){Object.assign(i,e)}),i}function Yw(e,i){var t=i&&d5(i);return On.useState(function(){return sn(e(t),void 0,{autoBind:!0})})[0]}var L0;l5(Mw.unstable_batchedUpdates);var Kw=(L0=vp.finalizeAllImmediately)!==null&&L0!==void 0?L0:function(){};function Xw(e,i){return i===void 0&&(i="observed"),Jg(e,i)}function Zw(e){u5(e)}const Qw=Object.freeze(Object.defineProperty({__proto__:null,Observer:f5,_observerFinalizationRegistry:vp,clearTimers:Kw,enableStaticRendering:u5,isObserverBatched:Nw,isUsingStaticRendering:Qg,observer:Gw,observerBatching:l5,useAsObservableSource:d5,useLocalObservable:Ww,useLocalStore:Yw,useObserver:Xw,useStaticRendering:Zw},Symbol.toStringTag,{value:"Module"})),Qi=Xl(Qw);var Is={};const da=Xl(Rw);var ip={exports:{}},vf={},N0={},I0={},km;function Lt(){return km||(km=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const i=Math.PI/180;function t(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof ic<"u"?ic:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.16",isBrowser:t(),isUnminified:/param/.test((function(a){}).toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*i:a},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const n=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=n,e.Konva._injectGlobal(e.Konva)}(I0)),I0}var D0={},Tm;function Nn(){return Tm||(Tm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const i=Lt();class t{constructor(y=[1,0,0,1,0,0]){this.dirty=!1,this.m=y&&y.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(y){y.m[0]=this.m[0],y.m[1]=this.m[1],y.m[2]=this.m[2],y.m[3]=this.m[3],y.m[4]=this.m[4],y.m[5]=this.m[5]}point(y){const w=this.m;return{x:w[0]*y.x+w[2]*y.y+w[4],y:w[1]*y.x+w[3]*y.y+w[5]}}translate(y,w){return this.m[4]+=this.m[0]*y+this.m[2]*w,this.m[5]+=this.m[1]*y+this.m[3]*w,this}scale(y,w){return this.m[0]*=y,this.m[1]*=y,this.m[2]*=w,this.m[3]*=w,this}rotate(y){const w=Math.cos(y),N=Math.sin(y),R=this.m[0]*w+this.m[2]*N,D=this.m[1]*w+this.m[3]*N,x=this.m[0]*-N+this.m[2]*w,S=this.m[1]*-N+this.m[3]*w;return this.m[0]=R,this.m[1]=D,this.m[2]=x,this.m[3]=S,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(y,w){const N=this.m[0]+this.m[2]*w,R=this.m[1]+this.m[3]*w,D=this.m[2]+this.m[0]*y,x=this.m[3]+this.m[1]*y;return this.m[0]=N,this.m[1]=R,this.m[2]=D,this.m[3]=x,this}multiply(y){const w=this.m[0]*y.m[0]+this.m[2]*y.m[1],N=this.m[1]*y.m[0]+this.m[3]*y.m[1],R=this.m[0]*y.m[2]+this.m[2]*y.m[3],D=this.m[1]*y.m[2]+this.m[3]*y.m[3],x=this.m[0]*y.m[4]+this.m[2]*y.m[5]+this.m[4],S=this.m[1]*y.m[4]+this.m[3]*y.m[5]+this.m[5];return this.m[0]=w,this.m[1]=N,this.m[2]=R,this.m[3]=D,this.m[4]=x,this.m[5]=S,this}invert(){const y=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),w=this.m[3]*y,N=-this.m[1]*y,R=-this.m[2]*y,D=this.m[0]*y,x=y*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),S=y*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=w,this.m[1]=N,this.m[2]=R,this.m[3]=D,this.m[4]=x,this.m[5]=S,this}getMatrix(){return this.m}decompose(){const y=this.m[0],w=this.m[1],N=this.m[2],R=this.m[3],D=this.m[4],x=this.m[5],S=y*R-w*N,A={x:D,y:x,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(y!=0||w!=0){const M=Math.sqrt(y*y+w*w);A.rotation=w>0?Math.acos(y/M):-Math.acos(y/M),A.scaleX=M,A.scaleY=S/M,A.skewX=(y*N+w*R)/S,A.skewY=0}else if(N!=0||R!=0){const M=Math.sqrt(N*N+R*R);A.rotation=Math.PI/2-(R>0?Math.acos(-N/M):-Math.acos(N/M)),A.scaleX=S/M,A.scaleY=M,A.skewX=0,A.skewY=(y*N+w*R)/S}return A.rotation=e.Util._getRotation(A.rotation),A}}e.Transform=t;let n="[object Array]",a="[object Number]",l="[object String]",u="[object Boolean]",c=Math.PI/180,h=180/Math.PI,b="#",_="",k="0",E="Konva warning: ",v="Konva error: ",O="rgb(",g={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]},p=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,P=[];const d=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};e.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===n},_isNumber(m){return Object.prototype.toString.call(m)===a&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===l},_isBoolean(m){return Object.prototype.toString.call(m)===u},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;const y=m[0];return y==="#"||y==="."||y===y.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){P.push(m),P.length===1&&d(function(){const y=P;P=[],y.forEach(function(w){w()})})},createCanvasElement(){const m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,y){const w=e.Util.createImageElement();w.onload=function(){y(w)},w.src=m},_rgbToHex(m,y,w){return((1<<24)+(m<<16)+(y<<8)+w).toString(16).slice(1)},_hexToRgb(m){m=m.replace(b,_);const y=parseInt(m,16);return{r:y>>16&255,g:y>>8&255,b:y&255}},getRandomColor(){let m=(Math.random()*16777215<<0).toString(16);for(;m.length<6;)m=k+m;return b+m},getRGB(m){let y;return m in g?(y=g[m],{r:y[0],g:y[1],b:y[2]}):m[0]===b?this._hexToRgb(m.substring(1)):m.substr(0,4)===O?(y=p.exec(m.replace(/ /g,"")),{r:parseInt(y[1],10),g:parseInt(y[2],10),b:parseInt(y[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",e.Util._namedColorToRBA(m)||e.Util._hex3ColorToRGBA(m)||e.Util._hex4ColorToRGBA(m)||e.Util._hex6ColorToRGBA(m)||e.Util._hex8ColorToRGBA(m)||e.Util._rgbColorToRGBA(m)||e.Util._rgbaColorToRGBA(m)||e.Util._hslColorToRGBA(m)},_namedColorToRBA(m){const y=g[m.toLowerCase()];return y?{r:y[0],g:y[1],b:y[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];const y=m.split(/ *, */).map(Number);return{r:y[0],g:y[1],b:y[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];const y=m.split(/ *, */).map((w,N)=>w.slice(-1)==="%"?N===3?parseInt(w)/100:parseInt(w)/100*255:Number(w));return{r:y[0],g:y[1],b:y[2],a:y[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[y,...w]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),N=Number(w[0])/360,R=Number(w[1])/100,D=Number(w[2])/100;let x,S,A;if(R===0)return A=D*255,{r:Math.round(A),g:Math.round(A),b:Math.round(A),a:1};D<.5?x=D*(1+R):x=D+R-D*R;const M=2*D-x,T=[0,0,0];for(let z=0;z<3;z++)S=N+1/3*-(z-1),S<0&&S++,S>1&&S--,6*S<1?A=M+(x-M)*6*S:2*S<1?A=x:3*S<2?A=M+(x-M)*(2/3-S)*6:A=M,T[z]=A*255;return{r:Math.round(T[0]),g:Math.round(T[1]),b:Math.round(T[2]),a:1}}},haveIntersection(m,y){return!(y.x>m.x+m.width||y.x+y.width<m.x||y.y>m.y+m.height||y.y+y.height<m.y)},cloneObject(m){const y={};for(const w in m)this._isPlainObject(m[w])?y[w]=this.cloneObject(m[w]):this._isArray(m[w])?y[w]=this.cloneArray(m[w]):y[w]=m[w];return y},cloneArray(m){return m.slice(0)},degToRad(m){return m*c},radToDeg(m){return m*h},_degToRad(m){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(m)},_radToDeg(m){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(m)},_getRotation(m){return i.Konva.angleDeg?e.Util.radToDeg(m):m},_capitalize(m){return m.charAt(0).toUpperCase()+m.slice(1)},throw(m){throw new Error(v+m)},error(m){console.error(v+m)},warn(m){i.Konva.showWarnings&&console.warn(E+m)},each(m,y){for(const w in m)y(w,m[w])},_inRange(m,y,w){return y<=m&&m<w},_getProjectionToSegment(m,y,w,N,R,D){let x,S,A;const M=(m-w)*(m-w)+(y-N)*(y-N);if(M==0)x=m,S=y,A=(R-w)*(R-w)+(D-N)*(D-N);else{const T=((R-m)*(w-m)+(D-y)*(N-y))/M;T<0?(x=m,S=y,A=(m-R)*(m-R)+(y-D)*(y-D)):T>1?(x=w,S=N,A=(w-R)*(w-R)+(N-D)*(N-D)):(x=m+T*(w-m),S=y+T*(N-y),A=(x-R)*(x-R)+(S-D)*(S-D))}return[x,S,A]},_getProjectionToLine(m,y,w){const N=e.Util.cloneObject(m);let R=Number.MAX_VALUE;return y.forEach(function(D,x){if(!w&&x===y.length-1)return;const S=y[(x+1)%y.length],A=e.Util._getProjectionToSegment(D.x,D.y,S.x,S.y,m.x,m.y),M=A[0],T=A[1],z=A[2];z<R&&(N.x=M,N.y=T,R=z)}),N},_prepareArrayForTween(m,y,w){let N,R=[],D=[];if(m.length>y.length){const S=y;y=m,m=S}for(N=0;N<m.length;N+=2)R.push({x:m[N],y:m[N+1]});for(N=0;N<y.length;N+=2)D.push({x:y[N],y:y[N+1]});const x=[];return D.forEach(function(S){const A=e.Util._getProjectionToLine(S,R,w);x.push(A.x),x.push(A.y)}),x},_prepareToStringify(m){let y;m.visitedByCircularReferenceRemoval=!0;for(const w in m)if(m.hasOwnProperty(w)&&m[w]&&typeof m[w]=="object"){if(y=Object.getOwnPropertyDescriptor(m,w),m[w].visitedByCircularReferenceRemoval||e.Util._isElement(m[w]))if(y.configurable)delete m[w];else return null;else if(e.Util._prepareToStringify(m[w])===null)if(y.configurable)delete m[w];else return null}return delete m.visitedByCircularReferenceRemoval,m},_assign(m,y){for(const w in y)m[w]=y[w];return m},_getFirstPointerId(m){return m.touches?m.changedTouches[0].identifier:m.pointerId||999},releaseCanvas(...m){i.Konva.releaseCanvasOnDestroy&&m.forEach(y=>{y.width=0,y.height=0})},drawRoundedRectPath(m,y,w,N){let R=0,D=0,x=0,S=0;typeof N=="number"?R=D=x=S=Math.min(N,y/2,w/2):(R=Math.min(N[0]||0,y/2,w/2),D=Math.min(N[1]||0,y/2,w/2),S=Math.min(N[2]||0,y/2,w/2),x=Math.min(N[3]||0,y/2,w/2)),m.moveTo(R,0),m.lineTo(y-D,0),m.arc(y-D,D,D,Math.PI*3/2,0,!1),m.lineTo(y,w-S),m.arc(y-S,w-S,S,0,Math.PI/2,!1),m.lineTo(x,w),m.arc(x,w-x,x,Math.PI/2,Math.PI,!1),m.lineTo(0,R),m.arc(R,R,R,Math.PI,Math.PI*3/2,!1)}}}(D0)),D0}var mf={},j0={},gi={},Am;function Bt(){if(Am)return gi;Am=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.RGBComponent=n,gi.alphaComponent=a,gi.getNumberValidator=l,gi.getNumberOrArrayOfNumbersValidator=u,gi.getNumberOrAutoValidator=c,gi.getStringValidator=h,gi.getStringOrGradientValidator=b,gi.getFunctionValidator=_,gi.getNumberArrayValidator=k,gi.getBooleanValidator=E,gi.getComponentValidator=v;const e=Lt(),i=Nn();function t(O){return i.Util._isString(O)?'"'+O+'"':Object.prototype.toString.call(O)==="[object Number]"||i.Util._isBoolean(O)?O:Object.prototype.toString.call(O)}function n(O){return O>255?255:O<0?0:Math.round(O)}function a(O){return O>1?1:O<1e-4?1e-4:O}function l(){if(e.Konva.isUnminified)return function(O,g){return i.Util._isNumber(O)||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a number.'),O}}function u(O){if(e.Konva.isUnminified)return function(g,p){const P=i.Util._isNumber(g),d=i.Util._isArray(g)&&g.length==O;return!P&&!d&&i.Util.warn(t(g)+' is a not valid value for "'+p+'" attribute. The value should be a number or Array<number>('+O+")"),g}}function c(){if(e.Konva.isUnminified)return function(O,g){return i.Util._isNumber(O)||O==="auto"||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a number or "auto".'),O}}function h(){if(e.Konva.isUnminified)return function(O,g){return i.Util._isString(O)||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a string.'),O}}function b(){if(e.Konva.isUnminified)return function(O,g){const p=i.Util._isString(O),P=Object.prototype.toString.call(O)==="[object CanvasGradient]"||O&&O.addColorStop;return p||P||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a string or a native gradient.'),O}}function _(){if(e.Konva.isUnminified)return function(O,g){return i.Util._isFunction(O)||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a function.'),O}}function k(){if(e.Konva.isUnminified)return function(O,g){const p=Int8Array?Object.getPrototypeOf(Int8Array):null;return p&&O instanceof p||(i.Util._isArray(O)?O.forEach(function(P){i.Util._isNumber(P)||i.Util.warn('"'+g+'" attribute has non numeric element '+P+". Make sure that all elements are numbers.")}):i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a array of numbers.')),O}}function E(){if(e.Konva.isUnminified)return function(O,g){return O===!0||O===!1||i.Util.warn(t(O)+' is a not valid value for "'+g+'" attribute. The value should be a boolean.'),O}}function v(O){if(e.Konva.isUnminified)return function(g,p){return g==null||i.Util.isObject(g)||i.Util.warn(t(g)+' is a not valid value for "'+p+'" attribute. The value should be an object with properties '+O),g}}return gi}var Rm;function jt(){return Rm||(Rm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const i=Nn(),t=Bt(),n="get",a="set";e.Factory={addGetterSetter(l,u,c,h,b){e.Factory.addGetter(l,u,c),e.Factory.addSetter(l,u,h,b),e.Factory.addOverloadedGetterSetter(l,u)},addGetter(l,u,c){const h=n+i.Util._capitalize(u);l.prototype[h]=l.prototype[h]||function(){const b=this.attrs[u];return b===void 0?c:b}},addSetter(l,u,c,h){const b=a+i.Util._capitalize(u);l.prototype[b]||e.Factory.overWriteSetter(l,u,c,h)},overWriteSetter(l,u,c,h){const b=a+i.Util._capitalize(u);l.prototype[b]=function(_){return c&&_!==void 0&&_!==null&&(_=c.call(this,_,u)),this._setAttr(u,_),h&&h.call(this),this}},addComponentsGetterSetter(l,u,c,h,b){let _=c.length,k=i.Util._capitalize,E=n+k(u),v=a+k(u),O,g;l.prototype[E]=function(){const P={};for(O=0;O<_;O++)g=c[O],P[g]=this.getAttr(u+k(g));return P};const p=(0,t.getComponentValidator)(c);l.prototype[v]=function(P){let d=this.attrs[u],m;h&&(P=h.call(this,P)),p&&p.call(this,P,u);for(m in P)P.hasOwnProperty(m)&&this._setAttr(u+k(m),P[m]);return P||c.forEach(y=>{this._setAttr(u+k(y),void 0)}),this._fireChangeEvent(u,d,P),b&&b.call(this),this},e.Factory.addOverloadedGetterSetter(l,u)},addOverloadedGetterSetter(l,u){const c=i.Util._capitalize(u),h=a+c,b=n+c;l.prototype[u]=function(){return arguments.length?(this[h](arguments[0]),this):this[b]()}},addDeprecatedGetterSetter(l,u,c,h){i.Util.error("Adding deprecated "+u);const b=n+i.Util._capitalize(u),_=u+" property is deprecated and will be removed soon. Look at Konva change log for more information.";l.prototype[b]=function(){i.Util.error(_);const k=this.attrs[u];return k===void 0?c:k},e.Factory.addSetter(l,u,h,function(){i.Util.error(_)}),e.Factory.addOverloadedGetterSetter(l,u)},backCompat(l,u){i.Util.each(u,function(c,h){const b=l.prototype[h],_=n+i.Util._capitalize(c),k=a+i.Util._capitalize(c);function E(){b.apply(this,arguments),i.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+h+'" instead.')}l.prototype[c]=E,l.prototype[_]=E,l.prototype[k]=E})},afterSetFilter(){this._filterUpToDate=!1}}}(j0)),j0}var Ua={},qa={},Mm;function h5(){if(Mm)return qa;Mm=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.HitContext=qa.SceneContext=qa.Context=void 0;const e=Nn(),i=Lt();function t(P){let d=[],m=P.length,y=e.Util,w,N;for(w=0;w<m;w++)N=P[w],y._isNumber(N)?N=Math.round(N*1e3)/1e3:y._isString(N)||(N=N+""),d.push(N);return d}const n=",",a="(",l=")",u="([",c="])",h=";",b="()",_="=",k=["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"],E=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],v=100;let O=class{constructor(d){this.canvas=d,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(d){d.fillEnabled()&&this._fill(d)}_fill(d){}strokeShape(d){d.hasStroke()&&this._stroke(d)}_stroke(d){}fillStrokeShape(d){d.attrs.fillAfterStrokeEnabled?(this.strokeShape(d),this.fillShape(d)):(this.fillShape(d),this.strokeShape(d))}getTrace(d,m){let y=this.traceArr,w=y.length,N="",R,D,x,S;for(R=0;R<w;R++)D=y[R],x=D.method,x?(S=D.args,N+=x,d?N+=b:e.Util._isArray(S[0])?N+=u+S.join(n)+c:(m&&(S=S.map(A=>typeof A=="number"?Math.floor(A):A)),N+=a+S.join(n)+l)):(N+=D.property,d||(N+=_+D.val)),N+=h;return N}clearTrace(){this.traceArr=[]}_trace(d){let m=this.traceArr,y;m.push(d),y=m.length,y>=v&&m.shift()}reset(){const d=this.getCanvas().getPixelRatio();this.setTransform(1*d,0,0,1*d,0,0)}getCanvas(){return this.canvas}clear(d){const m=this.getCanvas();d?this.clearRect(d.x||0,d.y||0,d.width||0,d.height||0):this.clearRect(0,0,m.getWidth()/m.pixelRatio,m.getHeight()/m.pixelRatio)}_applyLineCap(d){const m=d.attrs.lineCap;m&&this.setAttr("lineCap",m)}_applyOpacity(d){const m=d.getAbsoluteOpacity();m!==1&&this.setAttr("globalAlpha",m)}_applyLineJoin(d){const m=d.attrs.lineJoin;m&&this.setAttr("lineJoin",m)}setAttr(d,m){this._context[d]=m}arc(d,m,y,w,N,R){this._context.arc(d,m,y,w,N,R)}arcTo(d,m,y,w,N){this._context.arcTo(d,m,y,w,N)}beginPath(){this._context.beginPath()}bezierCurveTo(d,m,y,w,N,R){this._context.bezierCurveTo(d,m,y,w,N,R)}clearRect(d,m,y,w){this._context.clearRect(d,m,y,w)}clip(...d){this._context.clip.apply(this._context,d)}closePath(){this._context.closePath()}createImageData(d,m){const y=arguments;if(y.length===2)return this._context.createImageData(d,m);if(y.length===1)return this._context.createImageData(d)}createLinearGradient(d,m,y,w){return this._context.createLinearGradient(d,m,y,w)}createPattern(d,m){return this._context.createPattern(d,m)}createRadialGradient(d,m,y,w,N,R){return this._context.createRadialGradient(d,m,y,w,N,R)}drawImage(d,m,y,w,N,R,D,x,S){const A=arguments,M=this._context;A.length===3?M.drawImage(d,m,y):A.length===5?M.drawImage(d,m,y,w,N):A.length===9&&M.drawImage(d,m,y,w,N,R,D,x,S)}ellipse(d,m,y,w,N,R,D,x){this._context.ellipse(d,m,y,w,N,R,D,x)}isPointInPath(d,m,y,w){return y?this._context.isPointInPath(y,d,m,w):this._context.isPointInPath(d,m,w)}fill(...d){this._context.fill.apply(this._context,d)}fillRect(d,m,y,w){this._context.fillRect(d,m,y,w)}strokeRect(d,m,y,w){this._context.strokeRect(d,m,y,w)}fillText(d,m,y,w){w?this._context.fillText(d,m,y,w):this._context.fillText(d,m,y)}measureText(d){return this._context.measureText(d)}getImageData(d,m,y,w){return this._context.getImageData(d,m,y,w)}lineTo(d,m){this._context.lineTo(d,m)}moveTo(d,m){this._context.moveTo(d,m)}rect(d,m,y,w){this._context.rect(d,m,y,w)}roundRect(d,m,y,w,N){this._context.roundRect(d,m,y,w,N)}putImageData(d,m,y){this._context.putImageData(d,m,y)}quadraticCurveTo(d,m,y,w){this._context.quadraticCurveTo(d,m,y,w)}restore(){this._context.restore()}rotate(d){this._context.rotate(d)}save(){this._context.save()}scale(d,m){this._context.scale(d,m)}setLineDash(d){this._context.setLineDash?this._context.setLineDash(d):"mozDash"in this._context?this._context.mozDash=d:"webkitLineDash"in this._context&&(this._context.webkitLineDash=d)}getLineDash(){return this._context.getLineDash()}setTransform(d,m,y,w,N,R){this._context.setTransform(d,m,y,w,N,R)}stroke(d){d?this._context.stroke(d):this._context.stroke()}strokeText(d,m,y,w){this._context.strokeText(d,m,y,w)}transform(d,m,y,w,N,R){this._context.transform(d,m,y,w,N,R)}translate(d,m){this._context.translate(d,m)}_enableTrace(){let d=this,m=k.length,y=this.setAttr,w,N;const R=function(D){let x=d[D],S;d[D]=function(){return N=t(Array.prototype.slice.call(arguments,0)),S=x.apply(d,arguments),d._trace({method:D,args:N}),S}};for(w=0;w<m;w++)R(k[w]);d.setAttr=function(){y.apply(d,arguments);const D=arguments[0];let x=arguments[1];(D==="shadowOffsetX"||D==="shadowOffsetY"||D==="shadowBlur")&&(x=x/this.canvas.getPixelRatio()),d._trace({property:D,val:x})}}_applyGlobalCompositeOperation(d){const m=d.attrs.globalCompositeOperation;!m||m==="source-over"||this.setAttr("globalCompositeOperation",m)}};qa.Context=O,E.forEach(function(P){Object.defineProperty(O.prototype,P,{get(){return this._context[P]},set(d){this._context[P]=d}})});class g extends O{constructor(d,{willReadFrequently:m=!1}={}){super(d),this._context=d._canvas.getContext("2d",{willReadFrequently:m})}_fillColor(d){const m=d.fill();this.setAttr("fillStyle",m),d._fillFunc(this)}_fillPattern(d){this.setAttr("fillStyle",d._getFillPattern()),d._fillFunc(this)}_fillLinearGradient(d){const m=d._getLinearGradient();m&&(this.setAttr("fillStyle",m),d._fillFunc(this))}_fillRadialGradient(d){const m=d._getRadialGradient();m&&(this.setAttr("fillStyle",m),d._fillFunc(this))}_fill(d){const m=d.fill(),y=d.getFillPriority();if(m&&y==="color"){this._fillColor(d);return}const w=d.getFillPatternImage();if(w&&y==="pattern"){this._fillPattern(d);return}const N=d.getFillLinearGradientColorStops();if(N&&y==="linear-gradient"){this._fillLinearGradient(d);return}const R=d.getFillRadialGradientColorStops();if(R&&y==="radial-gradient"){this._fillRadialGradient(d);return}m?this._fillColor(d):w?this._fillPattern(d):N?this._fillLinearGradient(d):R&&this._fillRadialGradient(d)}_strokeLinearGradient(d){const m=d.getStrokeLinearGradientStartPoint(),y=d.getStrokeLinearGradientEndPoint(),w=d.getStrokeLinearGradientColorStops(),N=this.createLinearGradient(m.x,m.y,y.x,y.y);if(w){for(let R=0;R<w.length;R+=2)N.addColorStop(w[R],w[R+1]);this.setAttr("strokeStyle",N)}}_stroke(d){const m=d.dash(),y=d.getStrokeScaleEnabled();if(d.hasStroke()){if(!y){this.save();const N=this.getCanvas().getPixelRatio();this.setTransform(N,0,0,N,0,0)}this._applyLineCap(d),m&&d.dashEnabled()&&(this.setLineDash(m),this.setAttr("lineDashOffset",d.dashOffset())),this.setAttr("lineWidth",d.strokeWidth()),d.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),d.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(d):this.setAttr("strokeStyle",d.stroke()),d._strokeFunc(this),y||this.restore()}}_applyShadow(d){var m,y,w;const N=(m=d.getShadowRGBA())!==null&&m!==void 0?m:"black",R=(y=d.getShadowBlur())!==null&&y!==void 0?y:5,D=(w=d.getShadowOffset())!==null&&w!==void 0?w:{x:0,y:0},x=d.getAbsoluteScale(),S=this.canvas.getPixelRatio(),A=x.x*S,M=x.y*S;this.setAttr("shadowColor",N),this.setAttr("shadowBlur",R*Math.min(Math.abs(A),Math.abs(M))),this.setAttr("shadowOffsetX",D.x*A),this.setAttr("shadowOffsetY",D.y*M)}}qa.SceneContext=g;class p extends O{constructor(d){super(d),this._context=d._canvas.getContext("2d",{willReadFrequently:!0})}_fill(d){this.save(),this.setAttr("fillStyle",d.colorKey),d._fillFuncHit(this),this.restore()}strokeShape(d){d.hasHitStroke()&&this._stroke(d)}_stroke(d){if(d.hasHitStroke()){const m=d.getStrokeScaleEnabled();if(!m){this.save();const N=this.getCanvas().getPixelRatio();this.setTransform(N,0,0,N,0,0)}this._applyLineCap(d);const y=d.hitStrokeWidth(),w=y==="auto"?d.strokeWidth():y;this.setAttr("lineWidth",w),this.setAttr("strokeStyle",d.colorKey),d._strokeFuncHit(this),m||this.restore()}}}return qa.HitContext=p,qa}var Lm;function Np(){if(Lm)return Ua;Lm=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.HitCanvas=Ua.SceneCanvas=Ua.Canvas=void 0;const e=Nn(),i=h5(),t=Lt(),n=jt(),a=Bt();let l;function u(){if(l)return l;const _=e.Util.createCanvasElement(),k=_.getContext("2d");return l=function(){const E=t.Konva._global.devicePixelRatio||1,v=k.webkitBackingStorePixelRatio||k.mozBackingStorePixelRatio||k.msBackingStorePixelRatio||k.oBackingStorePixelRatio||k.backingStorePixelRatio||1;return E/v}(),e.Util.releaseCanvas(_),l}let c=class{constructor(k){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const v=(k||{}).pixelRatio||t.Konva.pixelRatio||u();this.pixelRatio=v,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(k){const E=this.pixelRatio;this.pixelRatio=k,this.setSize(this.getWidth()/E,this.getHeight()/E)}setWidth(k){this.width=this._canvas.width=k*this.pixelRatio,this._canvas.style.width=k+"px";const E=this.pixelRatio;this.getContext()._context.scale(E,E)}setHeight(k){this.height=this._canvas.height=k*this.pixelRatio,this._canvas.style.height=k+"px";const E=this.pixelRatio;this.getContext()._context.scale(E,E)}getWidth(){return this.width}getHeight(){return this.height}setSize(k,E){this.setWidth(k||0),this.setHeight(E||0)}toDataURL(k,E){try{return this._canvas.toDataURL(k,E)}catch{try{return this._canvas.toDataURL()}catch(O){return e.Util.error("Unable to get data URL. "+O.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};Ua.Canvas=c,n.Factory.addGetterSetter(c,"pixelRatio",void 0,(0,a.getNumberValidator)());class h extends c{constructor(k={width:0,height:0,willReadFrequently:!1}){super(k),this.context=new i.SceneContext(this,{willReadFrequently:k.willReadFrequently}),this.setSize(k.width,k.height)}}Ua.SceneCanvas=h;class b extends c{constructor(k={width:0,height:0}){super(k),this.hitCanvas=!0,this.context=new i.HitContext(this),this.setSize(k.width,k.height)}}return Ua.HitCanvas=b,Ua}var F0={},Nm;function ev(){return Nm||(Nm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const i=Lt(),t=Nn();e.DD={get isDragging(){let n=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return e.DD._dragElements.forEach(a=>{n=a.node}),n},_dragElements:new Map,_drag(n){const a=[];e.DD._dragElements.forEach((l,u)=>{const{node:c}=l,h=c.getStage();h.setPointersPositions(n),l.pointerId===void 0&&(l.pointerId=t.Util._getFirstPointerId(n));const b=h._changedPointerPositions.find(_=>_.id===l.pointerId);if(b){if(l.dragStatus!=="dragging"){const _=c.dragDistance();if(Math.max(Math.abs(b.x-l.startPointerPos.x),Math.abs(b.y-l.startPointerPos.y))<_||(c.startDrag({evt:n}),!c.isDragging()))return}c._setDragPosition(n,l),a.push(c)}}),a.forEach(l=>{l.fire("dragmove",{type:"dragmove",target:l,evt:n},!0)})},_endDragBefore(n){const a=[];e.DD._dragElements.forEach(l=>{const{node:u}=l,c=u.getStage();if(n&&c.setPointersPositions(n),!c._changedPointerPositions.find(_=>_.id===l.pointerId))return;(l.dragStatus==="dragging"||l.dragStatus==="stopped")&&(e.DD.justDragged=!0,i.Konva._mouseListenClick=!1,i.Konva._touchListenClick=!1,i.Konva._pointerListenClick=!1,l.dragStatus="stopped");const b=l.node.getLayer()||l.node instanceof i.Konva.Stage&&l.node;b&&a.indexOf(b)===-1&&a.push(b)}),a.forEach(l=>{l.draw()})},_endDragAfter(n){e.DD._dragElements.forEach((a,l)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:n},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(l)})}},i.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(F0)),F0}var Im;function Hn(){if(Im)return mf;Im=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.Node=void 0;const e=Nn(),i=jt(),t=Np(),n=Lt(),a=ev(),l=Bt(),u="absoluteOpacity",c="allEventListeners",h="absoluteTransform",b="absoluteScale",_="canvas",k="Change",E="children",v="konva",O="listening",g="mouseenter",p="mouseleave",P="set",d="Shape",m=" ",y="stage",w="transform",N="Stage",R="visible",D=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(m);let x=1;class S{constructor(T){this._id=x++,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===w||T===h)&&this._cache.get(T)?this._cache.get(T).dirty=!0:T?this._cache.delete(T):this._cache.clear()}_getCache(T,z){let U=this._cache.get(T);return(U===void 0||(T===w||T===h)&&U.dirty===!0)&&(U=z.call(this),this._cache.set(T,U)),U}_calculate(T,z,U){if(!this._attachedDepsListeners.get(T)){const Q=z.map(K=>K+"Change.konva").join(m);this.on(Q,()=>{this._clearCache(T)}),this._attachedDepsListeners.set(T,!0)}return this._getCache(T,U)}_getCanvasCache(){return this._cache.get(_)}_clearSelfAndDescendantCache(T){this._clearCache(T),T===h&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(_)){const{scene:T,filter:z,hit:U}=this._cache.get(_);e.Util.releaseCanvas(T,z,U),this._cache.delete(_)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(T){const z=T||{};let U={};(z.x===void 0||z.y===void 0||z.width===void 0||z.height===void 0)&&(U=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let Q=Math.ceil(z.width||U.width),K=Math.ceil(z.height||U.height),J=z.pixelRatio,B=z.x===void 0?Math.floor(U.x):z.x,L=z.y===void 0?Math.floor(U.y):z.y,F=z.offset||0,H=z.drawBorder||!1,$=z.hitCanvasPixelRatio||1;if(!Q||!K){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const ee=Math.abs(Math.round(U.x)-B)>.5?1:0,V=Math.abs(Math.round(U.y)-L)>.5?1:0;Q+=F*2+ee,K+=F*2+V,B-=F,L-=F;const X=new t.SceneCanvas({pixelRatio:J,width:Q,height:K}),Y=new t.SceneCanvas({pixelRatio:J,width:0,height:0,willReadFrequently:!0}),te=new t.HitCanvas({pixelRatio:$,width:Q,height:K}),re=X.getContext(),ie=te.getContext();return te.isCache=!0,X.isCache=!0,this._cache.delete(_),this._filterUpToDate=!1,z.imageSmoothingEnabled===!1&&(X.getContext()._context.imageSmoothingEnabled=!1,Y.getContext()._context.imageSmoothingEnabled=!1),re.save(),ie.save(),re.translate(-B,-L),ie.translate(-B,-L),this._isUnderCache=!0,this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(b),this.drawScene(X,this),this.drawHit(te,this),this._isUnderCache=!1,re.restore(),ie.restore(),H&&(re.save(),re.beginPath(),re.rect(0,0,Q,K),re.closePath(),re.setAttr("strokeStyle","red"),re.setAttr("lineWidth",5),re.stroke(),re.restore()),this._cache.set(_,{scene:X,filter:Y,hit:te,x:B,y:L}),this._requestDraw(),this}isCached(){return this._cache.has(_)}getClientRect(T){throw new Error('abstract "getClientRect" method call')}_transformedRect(T,z){const U=[{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}];let Q=1/0,K=1/0,J=-1/0,B=-1/0;const L=this.getAbsoluteTransform(z);return U.forEach(function(F){const H=L.point(F);Q===void 0&&(Q=J=H.x,K=B=H.y),Q=Math.min(Q,H.x),K=Math.min(K,H.y),J=Math.max(J,H.x),B=Math.max(B,H.y)}),{x:Q,y:K,width:J-Q,height:B-K}}_drawCachedSceneCanvas(T){T.save(),T._applyOpacity(this),T._applyGlobalCompositeOperation(this);const z=this._getCanvasCache();T.translate(z.x,z.y);const U=this._getCachedSceneCanvas(),Q=U.pixelRatio;T.drawImage(U._canvas,0,0,U.width/Q,U.height/Q),T.restore()}_drawCachedHitCanvas(T){const z=this._getCanvasCache(),U=z.hit;T.save(),T.translate(z.x,z.y),T.drawImage(U._canvas,0,0,U.width/U.pixelRatio,U.height/U.pixelRatio),T.restore()}_getCachedSceneCanvas(){let T=this.filters(),z=this._getCanvasCache(),U=z.scene,Q=z.filter,K=Q.getContext(),J,B,L,F;if(T){if(!this._filterUpToDate){const H=U.pixelRatio;Q.setSize(U.width/U.pixelRatio,U.height/U.pixelRatio);try{for(J=T.length,K.clear(),K.drawImage(U._canvas,0,0,U.getWidth()/H,U.getHeight()/H),B=K.getImageData(0,0,Q.getWidth(),Q.getHeight()),L=0;L<J;L++){if(F=T[L],typeof F!="function"){e.Util.error("Filter should be type of function, but got "+typeof F+" instead. Please check correct filters");continue}F.call(this,B),K.putImageData(B,0,0)}}catch($){e.Util.error("Unable to apply filter. "+$.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return Q}return U}on(T,z){if(this._cache&&this._cache.delete(c),arguments.length===3)return this._delegate.apply(this,arguments);let U=T.split(m),Q=U.length,K,J,B,L,F;for(K=0;K<Q;K++)J=U[K],B=J.split("."),L=B[0],F=B[1]||"",this.eventListeners[L]||(this.eventListeners[L]=[]),this.eventListeners[L].push({name:F,handler:z});return this}off(T,z){let U=(T||"").split(m),Q=U.length,K,J,B,L,F,H;if(this._cache&&this._cache.delete(c),!T)for(J in this.eventListeners)this._off(J);for(K=0;K<Q;K++)if(B=U[K],L=B.split("."),F=L[0],H=L[1],F)this.eventListeners[F]&&this._off(F,H,z);else for(J in this.eventListeners)this._off(J,H,z);return this}dispatchEvent(T){const z={target:this,type:T.type,evt:T};return this.fire(T.type,z),this}addEventListener(T,z){return this.on(T,function(U){z.call(this,U.evt)}),this}removeEventListener(T){return this.off(T),this}_delegate(T,z,U){const Q=this;this.on(T,function(K){const J=K.target.findAncestors(z,!0,Q);for(let B=0;B<J.length;B++)K=e.Util.cloneObject(K),K.currentTarget=J[B],U.call(J[B],K)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(y),this._clearSelfAndDescendantCache(R),this._clearSelfAndDescendantCache(O)}_remove(){this._clearCaches();const 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){const z="get"+e.Util._capitalize(T);return e.Util._isFunction(this[z])?this[z]():this.attrs[T]}getAncestors(){let T=this.getParent(),z=[];for(;T;)z.push(T),T=T.getParent();return z}getAttrs(){return this.attrs||{}}setAttrs(T){return this._batchTransformChanges(()=>{let z,U;if(!T)return this;for(z in T)z!==E&&(U=P+e.Util._capitalize(z),e.Util._isFunction(this[U])?this[U](T[z]):this._setAttr(z,T[z]))}),this}isListening(){return this._getCache(O,this._isListening)}_isListening(T){if(!this.listening())return!1;const U=this.getParent();return U&&U!==T&&this!==T?U._isListening(T):!0}isVisible(){return this._getCache(R,this._isVisible)}_isVisible(T){if(!this.visible())return!1;const U=this.getParent();return U&&U!==T&&this!==T?U._isVisible(T):!0}shouldDrawHit(T,z=!1){if(T)return this._isVisible(T)&&this._isListening(T);const U=this.getLayer();let Q=!1;a.DD._dragElements.forEach(J=>{J.dragStatus==="dragging"&&(J.node.nodeType==="Stage"||J.node.getLayer()===U)&&(Q=!0)});const K=!z&&!n.Konva.hitOnDragEnabled&&(Q||n.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!K}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let T=this.getDepth(),z=this,U=0,Q,K,J,B;function L(H){for(Q=[],K=H.length,J=0;J<K;J++)B=H[J],U++,B.nodeType!==d&&(Q=Q.concat(B.getChildren().slice())),B._id===z._id&&(J=K);Q.length>0&&Q[0].getDepth()<=T&&L(Q)}const F=this.getStage();return z.nodeType!==N&&F&&L(F.getChildren()),U}getDepth(){let T=0,z=this.parent;for(;z;)T++,z=z.parent;return T}_batchTransformChanges(T){this._batchingTransformChange=!0,T(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(w),this._clearSelfAndDescendantCache(h)),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;const z=T.getPointerPosition();if(!z)return null;const U=this.getAbsoluteTransform().copy();return U.invert(),U.point(z)}getAbsolutePosition(T){let z=!1,U=this.parent;for(;U;){if(U.isCached()){z=!0;break}U=U.parent}z&&!T&&(T=!0);const Q=this.getAbsoluteTransform(T).getMatrix(),K=new e.Transform,J=this.offset();return K.m=Q.slice(),K.translate(J.x,J.y),K.getTranslation()}setAbsolutePosition(T){const{x:z,y:U,...Q}=this._clearTransform();this.attrs.x=z,this.attrs.y=U,this._clearCache(w);const K=this._getAbsoluteTransform().copy();return K.invert(),K.translate(T.x,T.y),T={x:this.attrs.x+K.getTranslation().x,y:this.attrs.y+K.getTranslation().y},this._setTransform(Q),this.setPosition({x:T.x,y:T.y}),this._clearCache(w),this._clearSelfAndDescendantCache(h),this}_setTransform(T){let z;for(z in T)this.attrs[z]=T[z]}_clearTransform(){const 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){let z=T.x,U=T.y,Q=this.x(),K=this.y();return z!==void 0&&(Q+=z),U!==void 0&&(K+=U),this.setPosition({x:Q,y:K}),this}_eachAncestorReverse(T,z){let U=[],Q=this.getParent(),K,J;if(!(z&&z._id===this._id)){for(U.unshift(this);Q&&(!z||Q._id!==z._id);)U.unshift(Q),Q=Q.parent;for(K=U.length,J=0;J<K;J++)T(U[J])}}rotate(T){return this.rotation(this.rotation()+T),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const T=this.index,z=this.parent.getChildren().length;return T<z-1?(this.parent.children.splice(T,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const T=this.index,z=this.parent.getChildren().length;return T<z-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 e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const 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 e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const 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 e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(T<0||T>=this.parent.children.length)&&e.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)+".");const z=this.index;return this.parent.children.splice(z,1),this.parent.children.splice(T,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(u,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let T=this.opacity();const z=this.getParent();return z&&!z._isUnderCache&&(T*=z.getAbsoluteOpacity()),T}moveTo(T){return this.getParent()!==T&&(this._remove(),T.add(this)),this}toObject(){let T=this.getAttrs(),z,U,Q,K,J;const B={attrs:{},className:this.getClassName()};for(z in T)U=T[z],J=e.Util.isObject(U)&&!e.Util._isPlainObject(U)&&!e.Util._isArray(U),!J&&(Q=typeof this[z]=="function"&&this[z],delete T[z],K=Q?Q.call(this):null,T[z]=U,K!==U&&(B.attrs[z]=U));return e.Util._prepareToStringify(B)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(T,z,U){const Q=[];z&&this._isMatch(T)&&Q.push(this);let K=this.parent;for(;K;){if(K===U)return Q;K._isMatch(T)&&Q.push(K),K=K.parent}return Q}isAncestorOf(T){return!1}findAncestor(T,z,U){return this.findAncestors(T,z,U)[0]}_isMatch(T){if(!T)return!1;if(typeof T=="function")return T(this);let z=T.replace(/ /g,"").split(","),U=z.length,Q,K;for(Q=0;Q<U;Q++)if(K=z[Q],e.Util.isValidSelector(K)||(e.Util.warn('Selector "'+K+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),K.charAt(0)==="#"){if(this.id()===K.slice(1))return!0}else if(K.charAt(0)==="."){if(this.hasName(K.slice(1)))return!0}else if(this.className===K||this.nodeType===K)return!0;return!1}getLayer(){const T=this.getParent();return T?T.getLayer():null}getStage(){return this._getCache(y,this._getStage)}_getStage(){const T=this.getParent();return T?T.getStage():null}fire(T,z={},U){return z.target=z.target||this,U?this._fireAndBubble(T,z):this._fire(T,z),this}getAbsoluteTransform(T){return T?this._getAbsoluteTransform(T):this._getCache(h,this._getAbsoluteTransform)}_getAbsoluteTransform(T){let z;if(T)return z=new e.Transform,this._eachAncestorReverse(function(U){const Q=U.transformsEnabled();Q==="all"?z.multiply(U.getTransform()):Q==="position"&&z.translate(U.x()-U.offsetX(),U.y()-U.offsetY())},T),z;{z=this._cache.get(h)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(z):z.reset();const U=this.transformsEnabled();if(U==="all")z.multiply(this.getTransform());else if(U==="position"){const Q=this.attrs.x||0,K=this.attrs.y||0,J=this.attrs.offsetX||0,B=this.attrs.offsetY||0;z.translate(Q-J,K-B)}return z.dirty=!1,z}}getAbsoluteScale(T){let z=this;for(;z;)z._isUnderCache&&(T=z),z=z.getParent();const Q=this.getAbsoluteTransform(T).decompose();return{x:Q.scaleX,y:Q.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(w,this._getTransform)}_getTransform(){var T,z;const U=this._cache.get(w)||new e.Transform;U.reset();const Q=this.x(),K=this.y(),J=n.Konva.getAngle(this.rotation()),B=(T=this.attrs.scaleX)!==null&&T!==void 0?T:1,L=(z=this.attrs.scaleY)!==null&&z!==void 0?z:1,F=this.attrs.skewX||0,H=this.attrs.skewY||0,$=this.attrs.offsetX||0,ee=this.attrs.offsetY||0;return(Q!==0||K!==0)&&U.translate(Q,K),J!==0&&U.rotate(J),(F!==0||H!==0)&&U.skew(F,H),(B!==1||L!==1)&&U.scale(B,L),($!==0||ee!==0)&&U.translate(-1*$,-1*ee),U.dirty=!1,U}clone(T){let z=e.Util.cloneObject(this.attrs),U,Q,K,J,B;for(U in T)z[U]=T[U];const L=new this.constructor(z);for(U in this.eventListeners)for(Q=this.eventListeners[U],K=Q.length,J=0;J<K;J++)B=Q[J],B.name.indexOf(v)<0&&(L.eventListeners[U]||(L.eventListeners[U]=[]),L.eventListeners[U].push(B));return L}_toKonvaCanvas(T){T=T||{};const z=this.getClientRect(),U=this.getStage(),Q=T.x!==void 0?T.x:Math.floor(z.x),K=T.y!==void 0?T.y:Math.floor(z.y),J=T.pixelRatio||1,B=new t.SceneCanvas({width:T.width||Math.ceil(z.width)||(U?U.width():0),height:T.height||Math.ceil(z.height)||(U?U.height():0),pixelRatio:J}),L=B.getContext(),F=new t.SceneCanvas({width:B.width/B.pixelRatio+Math.abs(Q),height:B.height/B.pixelRatio+Math.abs(K),pixelRatio:B.pixelRatio});return T.imageSmoothingEnabled===!1&&(L._context.imageSmoothingEnabled=!1),L.save(),(Q||K)&&L.translate(-1*Q,-1*K),this.drawScene(B,void 0,F),L.restore(),B}toCanvas(T){return this._toKonvaCanvas(T)._canvas}toDataURL(T){T=T||{};const z=T.mimeType||null,U=T.quality||null,Q=this._toKonvaCanvas(T).toDataURL(z,U);return T.callback&&T.callback(Q),Q}toImage(T){return new Promise((z,U)=>{try{const Q=T==null?void 0:T.callback;Q&&delete T.callback,e.Util._urlToImage(this.toDataURL(T),function(K){z(K),Q==null||Q(K)})}catch(Q){U(Q)}})}toBlob(T){return new Promise((z,U)=>{try{const Q=T==null?void 0:T.callback;Q&&delete T.callback,this.toCanvas(T).toBlob(K=>{z(K),Q==null||Q(K)},T==null?void 0:T.mimeType,T==null?void 0:T.quality)}catch(Q){U(Q)}})}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():n.Konva.dragDistance}_off(T,z,U){let Q=this.eventListeners[T],K,J,B;for(K=0;K<Q.length;K++)if(J=Q[K].name,B=Q[K].handler,(J!=="konva"||z==="konva")&&(!z||J===z)&&(!U||U===B)){if(Q.splice(K,1),Q.length===0){delete this.eventListeners[T];break}K--}}_fireChangeEvent(T,z,U){this._fire(T+k,{oldVal:z,newVal:U})}addName(T){if(!this.hasName(T)){const z=this.name(),U=z?z+" "+T:T;this.name(U)}return this}hasName(T){if(!T)return!1;const z=this.name();return z?(z||"").split(/\s/g).indexOf(T)!==-1:!1}removeName(T){const z=(this.name()||"").split(/\s/g),U=z.indexOf(T);return U!==-1&&(z.splice(U,1),this.name(z.join(" "))),this}setAttr(T,z){const U=this[P+e.Util._capitalize(T)];return e.Util._isFunction(U)?U.call(this,z):this._setAttr(T,z),this}_requestDraw(){if(n.Konva.autoDrawEnabled){const T=this.getLayer()||this.getStage();T==null||T.batchDraw()}}_setAttr(T,z){const U=this.attrs[T];U===z&&!e.Util.isObject(z)||(z==null?delete this.attrs[T]:this.attrs[T]=z,this._shouldFireChangeEvents&&this._fireChangeEvent(T,U,z),this._requestDraw())}_setComponentAttr(T,z,U){let Q;U!==void 0&&(Q=this.attrs[T],Q||(this.attrs[T]=this.getAttr(T)),this.attrs[T][z]=U,this._fireChangeEvent(T,Q,U))}_fireAndBubble(T,z,U){if(z&&this.nodeType===d&&(z.target=this),!((T===g||T===p)&&(U&&(this===U||this.isAncestorOf&&this.isAncestorOf(U))||this.nodeType==="Stage"&&!U))){this._fire(T,z);const K=(T===g||T===p)&&U&&U.isAncestorOf&&U.isAncestorOf(this)&&!U.isAncestorOf(this.parent);(z&&!z.cancelBubble||!z)&&this.parent&&this.parent.isListening()&&!K&&(U&&U.parent?this._fireAndBubble.call(this.parent,T,z,U):this._fireAndBubble.call(this.parent,T,z))}}_getProtoListeners(T){var z,U,Q;const K=(z=this._cache.get(c))!==null&&z!==void 0?z:{};let J=K==null?void 0:K[T];if(J===void 0){J=[];let B=Object.getPrototypeOf(this);for(;B;){const L=(Q=(U=B.eventListeners)===null||U===void 0?void 0:U[T])!==null&&Q!==void 0?Q:[];J.push(...L),B=Object.getPrototypeOf(B)}K[T]=J,this._cache.set(c,K)}return J}_fire(T,z){z=z||{},z.currentTarget=this,z.type=T;const U=this._getProtoListeners(T);if(U)for(var Q=0;Q<U.length;Q++)U[Q].handler.call(this,z);const K=this.eventListeners[T];if(K)for(var Q=0;Q<K.length;Q++)K[Q].handler.call(this,z)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(T){const z=T?T.pointerId:void 0,U=this.getStage(),Q=this.getAbsolutePosition();if(!U)return;const K=U._getPointerById(z)||U._changedPointerPositions[0]||Q;a.DD._dragElements.set(this._id,{node:this,startPointerPos:K,offset:{x:K.x-Q.x,y:K.y-Q.y},dragStatus:"ready",pointerId:z})}startDrag(T,z=!0){a.DD._dragElements.has(this._id)||this._createDragElement(T);const U=a.DD._dragElements.get(this._id);U.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:T&&T.evt},z)}_setDragPosition(T,z){const U=this.getStage()._getPointerById(z.pointerId);if(!U)return;let Q={x:U.x-z.offset.x,y:U.y-z.offset.y};const K=this.dragBoundFunc();if(K!==void 0){const J=K.call(this,Q,T);J?Q=J:e.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==Q.x||this._lastPos.y!==Q.y)&&(this.setAbsolutePosition(Q),this._requestDraw()),this._lastPos=Q}stopDrag(T){const z=a.DD._dragElements.get(this._id);z&&(z.dragStatus="stopped"),a.DD._endDragBefore(T),a.DD._endDragAfter(T)}setDraggable(T){this._setAttr("draggable",T),this._dragChange()}isDragging(){const T=a.DD._dragElements.get(this._id);return T?T.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(T){if(!(!(T.evt.button!==void 0)||n.Konva.dragButtons.indexOf(T.evt.button)>=0)||this.isDragging())return;let Q=!1;a.DD._dragElements.forEach(K=>{this.isAncestorOf(K.node)&&(Q=!0)}),Q||this._createDragElement(T)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const z=a.DD._dragElements.get(this._id),U=z&&z.dragStatus==="dragging",Q=z&&z.dragStatus==="ready";U?this.stopDrag():Q&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(T={x:0,y:0}){const z=this.getStage();if(!z)return!1;const U={x:-T.x,y:-T.y,width:z.width()+2*T.x,height:z.height()+2*T.y};return e.Util.haveIntersection(U,this.getClientRect())}static create(T,z){return e.Util._isString(T)&&(T=JSON.parse(T)),this._createNode(T,z)}static _createNode(T,z){let U=S.prototype.getClassName.call(T),Q=T.children,K,J,B;z&&(T.attrs.container=z),n.Konva[U]||(e.Util.warn('Can not find a node with class name "'+U+'". Fallback to "Shape".'),U="Shape");const L=n.Konva[U];if(K=new L(T.attrs),Q)for(J=Q.length,B=0;B<J;B++)K.add(S._createNode(Q[B]));return K}}mf.Node=S,S.prototype.nodeType="Node",S.prototype._attrsAffectingSize=[],S.prototype.eventListeners={},S.prototype.on.call(S.prototype,D,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(w),this._clearSelfAndDescendantCache(h)}),S.prototype.on.call(S.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(R)}),S.prototype.on.call(S.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(O)}),S.prototype.on.call(S.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(u)});const A=i.Factory.addGetterSetter;return A(S,"zIndex"),A(S,"absolutePosition"),A(S,"position"),A(S,"x",0,(0,l.getNumberValidator)()),A(S,"y",0,(0,l.getNumberValidator)()),A(S,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),A(S,"opacity",1,(0,l.getNumberValidator)()),A(S,"name","",(0,l.getStringValidator)()),A(S,"id","",(0,l.getStringValidator)()),A(S,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"scale",["x","y"]),A(S,"scaleX",1,(0,l.getNumberValidator)()),A(S,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"skew",["x","y"]),A(S,"skewX",0,(0,l.getNumberValidator)()),A(S,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"offset",["x","y"]),A(S,"offsetX",0,(0,l.getNumberValidator)()),A(S,"offsetY",0,(0,l.getNumberValidator)()),A(S,"dragDistance",null,(0,l.getNumberValidator)()),A(S,"width",0,(0,l.getNumberValidator)()),A(S,"height",0,(0,l.getNumberValidator)()),A(S,"listening",!0,(0,l.getBooleanValidator)()),A(S,"preventDefault",!0,(0,l.getBooleanValidator)()),A(S,"filters",null,function(M){return this._filterUpToDate=!1,M}),A(S,"visible",!0,(0,l.getBooleanValidator)()),A(S,"transformsEnabled","all",(0,l.getStringValidator)()),A(S,"size"),A(S,"dragBoundFunc"),A(S,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(S,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),mf}var yf={},Dm;function Ip(){if(Dm)return yf;Dm=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.Container=void 0;const e=jt(),i=Hn(),t=Bt();let n=class extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(l){if(!l)return this.children||[];const u=this.children||[],c=[];return u.forEach(function(h){l(h)&&c.push(h)}),c}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.destroy()}),this.children=[],this._requestDraw(),this}add(...l){if(l.length===0)return this;if(l.length>1){for(let c=0;c<l.length;c++)this.add(l[c]);return this}const u=l[0];return u.getParent()?(u.moveTo(this),this):(this._validateAdd(u),u.index=this.getChildren().length,u.parent=this,u._clearCaches(),this.getChildren().push(u),this._fire("add",{child:u}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(l){return this._generalFind(l,!1)}findOne(l){const u=this._generalFind(l,!0);return u.length>0?u[0]:void 0}_generalFind(l,u){const c=[];return this._descendants(h=>{const b=h._isMatch(l);return b&&c.push(h),!!(b&&u)}),c}_descendants(l){let u=!1;const c=this.getChildren();for(const h of c){if(u=l(h),u)return!0;if(h.hasChildren()&&(u=h._descendants(l),u))return!0}return!1}toObject(){const l=i.Node.prototype.toObject.call(this);return l.children=[],this.getChildren().forEach(u=>{l.children.push(u.toObject())}),l}isAncestorOf(l){let u=l.getParent();for(;u;){if(u._id===this._id)return!0;u=u.getParent()}return!1}clone(l){const u=i.Node.prototype.clone.call(this,l);return this.getChildren().forEach(function(c){u.add(c.clone())}),u}getAllIntersections(l){const u=[];return this.find("Shape").forEach(c=>{c.isVisible()&&c.intersects(l)&&u.push(c)}),u}_clearSelfAndDescendantCache(l){var u;super._clearSelfAndDescendantCache(l),!this.isCached()&&((u=this.children)===null||u===void 0||u.forEach(function(c){c._clearSelfAndDescendantCache(l)}))}_setChildrenIndices(){var l;(l=this.children)===null||l===void 0||l.forEach(function(u,c){u.index=c}),this._requestDraw()}drawScene(l,u,c){const h=this.getLayer(),b=l||h&&h.getCanvas(),_=b&&b.getContext(),k=this._getCanvasCache(),E=k&&k.scene,v=b&&b.isCache;if(!this.isVisible()&&!v)return this;if(E){_.save();const O=this.getAbsoluteTransform(u).getMatrix();_.transform(O[0],O[1],O[2],O[3],O[4],O[5]),this._drawCachedSceneCanvas(_),_.restore()}else this._drawChildren("drawScene",b,u,c);return this}drawHit(l,u){if(!this.shouldDrawHit(u))return this;const c=this.getLayer(),h=l||c&&c.hitCanvas,b=h&&h.getContext(),_=this._getCanvasCache();if(_&&_.hit){b.save();const E=this.getAbsoluteTransform(u).getMatrix();b.transform(E[0],E[1],E[2],E[3],E[4],E[5]),this._drawCachedHitCanvas(b),b.restore()}else this._drawChildren("drawHit",h,u);return this}_drawChildren(l,u,c,h){var b;const _=u&&u.getContext(),k=this.clipWidth(),E=this.clipHeight(),v=this.clipFunc(),O=typeof k=="number"&&typeof E=="number"||v,g=c===this;if(O){_.save();const P=this.getAbsoluteTransform(c);let d=P.getMatrix();_.transform(d[0],d[1],d[2],d[3],d[4],d[5]),_.beginPath();let m;if(v)m=v.call(this,_,this);else{const y=this.clipX(),w=this.clipY();_.rect(y||0,w||0,k,E)}_.clip.apply(_,m),d=P.copy().invert().getMatrix(),_.transform(d[0],d[1],d[2],d[3],d[4],d[5])}const p=!g&&this.globalCompositeOperation()!=="source-over"&&l==="drawScene";p&&(_.save(),_._applyGlobalCompositeOperation(this)),(b=this.children)===null||b===void 0||b.forEach(function(P){P[l](u,c,h)}),p&&_.restore(),O&&_.restore()}getClientRect(l={}){var u;const c=l.skipTransform,h=l.relativeTo;let b,_,k,E,v={x:1/0,y:1/0,width:0,height:0};const O=this;(u=this.children)===null||u===void 0||u.forEach(function(P){if(!P.visible())return;const d=P.getClientRect({relativeTo:O,skipShadow:l.skipShadow,skipStroke:l.skipStroke});d.width===0&&d.height===0||(b===void 0?(b=d.x,_=d.y,k=d.x+d.width,E=d.y+d.height):(b=Math.min(b,d.x),_=Math.min(_,d.y),k=Math.max(k,d.x+d.width),E=Math.max(E,d.y+d.height)))});const g=this.find("Shape");let p=!1;for(let P=0;P<g.length;P++)if(g[P]._isVisible(this)){p=!0;break}return p&&b!==void 0?v={x:b,y:_,width:k-b,height:E-_}:v={x:0,y:0,width:0,height:0},c?v:this._transformedRect(v,h)}};return yf.Container=n,e.Factory.addComponentsGetterSetter(n,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(n,"clipX",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipY",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipWidth",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipHeight",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipFunc"),yf}var z0={},ql={},jm;function p5(){if(jm)return ql;jm=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.getCapturedShape=n,ql.createEvent=a,ql.hasPointerCapture=l,ql.setPointerCapture=u,ql.releaseCapture=c;const e=Lt(),i=new Map,t=e.Konva._global.PointerEvent!==void 0;function n(h){return i.get(h)}function a(h){return{evt:h,pointerId:h.pointerId}}function l(h,b){return i.get(h)===b}function u(h,b){c(h),b.getStage()&&(i.set(h,b),t&&b._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function c(h,b){const _=i.get(h);if(!_)return;const k=_.getStage();k&&k.content,i.delete(h),t&&_._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return ql}var Fm;function Jw(){return Fm||(Fm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const i=Nn(),t=jt(),n=Ip(),a=Lt(),l=Np(),u=ev(),c=Lt(),h=p5(),b="Stage",_="string",k="px",E="mouseout",v="mouseleave",O="mouseover",g="mouseenter",p="mousemove",P="mousedown",d="mouseup",m="pointermove",y="pointerdown",w="pointerup",N="pointercancel",R="lostpointercapture",D="pointerout",x="pointerleave",S="pointerover",A="pointerenter",M="contextmenu",T="touchstart",z="touchend",U="touchmove",Q="touchcancel",K="wheel",J=5,B=[[g,"_pointerenter"],[P,"_pointerdown"],[p,"_pointermove"],[d,"_pointerup"],[v,"_pointerleave"],[T,"_pointerdown"],[U,"_pointermove"],[z,"_pointerup"],[Q,"_pointercancel"],[O,"_pointerover"],[K,"_wheel"],[M,"_contextmenu"],[y,"_pointerdown"],[m,"_pointermove"],[w,"_pointerup"],[N,"_pointercancel"],[R,"_lostpointercapture"]],L={mouse:{[D]:E,[x]:v,[S]:O,[A]:g,[m]:p,[y]:P,[w]:d,[N]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[D]:"touchout",[x]:"touchleave",[S]:"touchover",[A]:"touchenter",[m]:U,[y]:T,[w]:z,[N]:Q,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[D]:D,[x]:x,[S]:S,[A]:A,[m]:m,[y]:y,[w]:w,[N]:N,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},F=X=>X.indexOf("pointer")>=0?"pointer":X.indexOf("touch")>=0?"touch":"mouse",H=X=>{const Y=F(X);if(Y==="pointer")return a.Konva.pointerEventsEnabled&&L.pointer;if(Y==="touch")return L.touch;if(Y==="mouse")return L.mouse};function $(X={}){return(X.clipFunc||X.clipWidth||X.clipHeight)&&i.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),X}const ee="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class V extends n.Container{constructor(Y){super($(Y)),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",()=>{$(this.attrs)}),this._checkVisibility()}_validateAdd(Y){const te=Y.getType()==="Layer",re=Y.getType()==="FastLayer";te||re||i.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const Y=this.visible()?"":"none";this.content.style.display=Y}setContainer(Y){if(typeof Y===_){if(Y.charAt(0)==="."){const re=Y.slice(1);Y=document.getElementsByClassName(re)[0]}else{var te;Y.charAt(0)!=="#"?te=Y:te=Y.slice(1),Y=document.getElementById(te)}if(!Y)throw"Can not find container in document with id "+te}return this._setAttr("container",Y),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),Y.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){let Y=this.children,te=Y.length,re;for(re=0;re<te;re++)Y[re].clear();return this}clone(Y){return Y||(Y={}),Y.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,Y)}destroy(){super.destroy();const Y=this.content;Y&&i.Util._isInDocument(Y)&&this.container().removeChild(Y);const te=e.stages.indexOf(this);return te>-1&&e.stages.splice(te,1),i.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const Y=this._pointerPositions[0]||this._changedPointerPositions[0];return Y?{x:Y.x,y:Y.y}:(i.Util.warn(ee),null)}_getPointerById(Y){return this._pointerPositions.find(te=>te.id===Y)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(Y){Y=Y||{},Y.x=Y.x||0,Y.y=Y.y||0,Y.width=Y.width||this.width(),Y.height=Y.height||this.height();const te=new l.SceneCanvas({width:Y.width,height:Y.height,pixelRatio:Y.pixelRatio||1}),re=te.getContext()._context,ie=this.children;return(Y.x||Y.y)&&re.translate(-1*Y.x,-1*Y.y),ie.forEach(function(ae){if(!ae.isVisible())return;const ue=ae._toKonvaCanvas(Y);re.drawImage(ue._canvas,Y.x,Y.y,ue.getWidth()/ue.getPixelRatio(),ue.getHeight()/ue.getPixelRatio())}),te}getIntersection(Y){if(!Y)return null;let te=this.children,re=te.length,ie=re-1,ae;for(ae=ie;ae>=0;ae--){const ue=te[ae].getIntersection(Y);if(ue)return ue}return null}_resizeDOM(){const Y=this.width(),te=this.height();this.content&&(this.content.style.width=Y+k,this.content.style.height=te+k),this.bufferCanvas.setSize(Y,te),this.bufferHitCanvas.setSize(Y,te),this.children.forEach(re=>{re.setSize({width:Y,height:te}),re.draw()})}add(Y,...te){if(arguments.length>1){for(let ie=0;ie<arguments.length;ie++)this.add(arguments[ie]);return this}super.add(Y);const re=this.children.length;return re>J&&i.Util.warn("The stage has "+re+" 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."),Y.setSize({width:this.width(),height:this.height()}),Y.draw(),a.Konva.isBrowser&&this.content.appendChild(Y.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(Y){return h.hasPointerCapture(Y,this)}setPointerCapture(Y){h.setPointerCapture(Y,this)}releaseCapture(Y){h.releaseCapture(Y,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&B.forEach(([Y,te])=>{this.content.addEventListener(Y,re=>{this[te](re)},{passive:!1})})}_pointerenter(Y){this.setPointersPositions(Y);const te=H(Y.type);te&&this._fire(te.pointerenter,{evt:Y,target:this,currentTarget:this})}_pointerover(Y){this.setPointersPositions(Y);const te=H(Y.type);te&&this._fire(te.pointerover,{evt:Y,target:this,currentTarget:this})}_getTargetShape(Y){let te=this[Y+"targetShape"];return te&&!te.getStage()&&(te=null),te}_pointerleave(Y){const te=H(Y.type),re=F(Y.type);if(!te)return;this.setPointersPositions(Y);const ie=this._getTargetShape(re),ae=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;ie&&ae?(ie._fireAndBubble(te.pointerout,{evt:Y}),ie._fireAndBubble(te.pointerleave,{evt:Y}),this._fire(te.pointerleave,{evt:Y,target:this,currentTarget:this}),this[re+"targetShape"]=null):ae&&(this._fire(te.pointerleave,{evt:Y,target:this,currentTarget:this}),this._fire(te.pointerout,{evt:Y,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(Y){const te=H(Y.type),re=F(Y.type);if(!te)return;this.setPointersPositions(Y);let ie=!1;this._changedPointerPositions.forEach(ae=>{const ue=this.getIntersection(ae);if(u.DD.justDragged=!1,a.Konva["_"+re+"ListenClick"]=!0,!ue||!ue.isListening()){this[re+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&ue.setPointerCapture(ae.id),this[re+"ClickStartShape"]=ue,ue._fireAndBubble(te.pointerdown,{evt:Y,pointerId:ae.id}),ie=!0;const de=Y.type.indexOf("touch")>=0;ue.preventDefault()&&Y.cancelable&&de&&Y.preventDefault()}),ie||this._fire(te.pointerdown,{evt:Y,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(Y){const te=H(Y.type),re=F(Y.type);if(!te||(a.Konva.isDragging()&&u.DD.node.preventDefault()&&Y.cancelable&&Y.preventDefault(),this.setPointersPositions(Y),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const ae={};let ue=!1;const de=this._getTargetShape(re);this._changedPointerPositions.forEach(pe=>{const Oe=h.getCapturedShape(pe.id)||this.getIntersection(pe),_e=pe.id,Le={evt:Y,pointerId:_e},fe=de!==Oe;if(fe&&de&&(de._fireAndBubble(te.pointerout,{...Le},Oe),de._fireAndBubble(te.pointerleave,{...Le},Oe)),Oe){if(ae[Oe._id])return;ae[Oe._id]=!0}Oe&&Oe.isListening()?(ue=!0,fe&&(Oe._fireAndBubble(te.pointerover,{...Le},de),Oe._fireAndBubble(te.pointerenter,{...Le},de),this[re+"targetShape"]=Oe),Oe._fireAndBubble(te.pointermove,{...Le})):de&&(this._fire(te.pointerover,{evt:Y,target:this,currentTarget:this,pointerId:_e}),this[re+"targetShape"]=null)}),ue||this._fire(te.pointermove,{evt:Y,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(Y){const te=H(Y.type),re=F(Y.type);if(!te)return;this.setPointersPositions(Y);const ie=this[re+"ClickStartShape"],ae=this[re+"ClickEndShape"],ue={};let de=!1;this._changedPointerPositions.forEach(pe=>{const Oe=h.getCapturedShape(pe.id)||this.getIntersection(pe);if(Oe){if(Oe.releaseCapture(pe.id),ue[Oe._id])return;ue[Oe._id]=!0}const _e=pe.id,Le={evt:Y,pointerId:_e};let fe=!1;a.Konva["_"+re+"InDblClickWindow"]?(fe=!0,clearTimeout(this[re+"DblTimeout"])):u.DD.justDragged||(a.Konva["_"+re+"InDblClickWindow"]=!0,clearTimeout(this[re+"DblTimeout"])),this[re+"DblTimeout"]=setTimeout(function(){a.Konva["_"+re+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),Oe&&Oe.isListening()?(de=!0,this[re+"ClickEndShape"]=Oe,Oe._fireAndBubble(te.pointerup,{...Le}),a.Konva["_"+re+"ListenClick"]&&ie&&ie===Oe&&(Oe._fireAndBubble(te.pointerclick,{...Le}),fe&&ae&&ae===Oe&&Oe._fireAndBubble(te.pointerdblclick,{...Le}))):(this[re+"ClickEndShape"]=null,a.Konva["_"+re+"ListenClick"]&&this._fire(te.pointerclick,{evt:Y,target:this,currentTarget:this,pointerId:_e}),fe&&this._fire(te.pointerdblclick,{evt:Y,target:this,currentTarget:this,pointerId:_e}))}),de||this._fire(te.pointerup,{evt:Y,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+re+"ListenClick"]=!1,Y.cancelable&&re!=="touch"&&Y.preventDefault()}_contextmenu(Y){this.setPointersPositions(Y);const te=this.getIntersection(this.getPointerPosition());te&&te.isListening()?te._fireAndBubble(M,{evt:Y}):this._fire(M,{evt:Y,target:this,currentTarget:this})}_wheel(Y){this.setPointersPositions(Y);const te=this.getIntersection(this.getPointerPosition());te&&te.isListening()?te._fireAndBubble(K,{evt:Y}):this._fire(K,{evt:Y,target:this,currentTarget:this})}_pointercancel(Y){this.setPointersPositions(Y);const te=h.getCapturedShape(Y.pointerId)||this.getIntersection(this.getPointerPosition());te&&te._fireAndBubble(w,h.createEvent(Y)),h.releaseCapture(Y.pointerId)}_lostpointercapture(Y){h.releaseCapture(Y.pointerId)}setPointersPositions(Y){let te=this._getContentPosition(),re=null,ie=null;Y=Y||window.event,Y.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(Y.touches,ae=>{this._pointerPositions.push({id:ae.identifier,x:(ae.clientX-te.left)/te.scaleX,y:(ae.clientY-te.top)/te.scaleY})}),Array.prototype.forEach.call(Y.changedTouches||Y.touches,ae=>{this._changedPointerPositions.push({id:ae.identifier,x:(ae.clientX-te.left)/te.scaleX,y:(ae.clientY-te.top)/te.scaleY})})):(re=(Y.clientX-te.left)/te.scaleX,ie=(Y.clientY-te.top)/te.scaleY,this.pointerPos={x:re,y:ie},this._pointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId(Y)}],this._changedPointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId(Y)}])}_setPointerPosition(Y){i.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(Y)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const Y=this.content.getBoundingClientRect();return{top:Y.top,left:Y.left,scaleX:Y.width/this.content.clientWidth||1,scaleY:Y.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new l.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new l.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!a.Konva.isBrowser)return;const Y=this.container();if(!Y)throw"Stage has no container. A container is required.";Y.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"),Y.appendChild(this.content),this._resizeDOM()}cache(){return i.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(Y){Y.batchDraw()}),this}}e.Stage=V,V.prototype.nodeType=b,(0,c._registerNode)(V),t.Factory.addGetterSetter(V,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(X=>{X.batchDraw()})})}(z0)),z0}var bf={},B0={},zm;function wr(){return zm||(zm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const i=Lt(),t=Nn(),n=jt(),a=Hn(),l=Bt(),u=Lt(),c=p5(),h="hasShadow",b="shadowRGBA",_="patternImage",k="linearGradient",E="radialGradient";let v;function O(){return v||(v=t.Util.createCanvasElement().getContext("2d"),v)}e.shapes={};function g(x){const S=this.attrs.fillRule;S?x.fill(S):x.fill()}function p(x){x.stroke()}function P(x){const S=this.attrs.fillRule;S?x.fill(S):x.fill()}function d(x){x.stroke()}function m(){this._clearCache(h)}function y(){this._clearCache(b)}function w(){this._clearCache(_)}function N(){this._clearCache(k)}function R(){this._clearCache(E)}class D extends a.Node{constructor(S){super(S);let A;for(;A=t.Util.getRandomColor(),!(A&&!(A in e.shapes)););this.colorKey=A,e.shapes[A]=this}getContext(){return t.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return t.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(h,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const A=O().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(A&&A.setTransform){const M=new t.Transform;M.translate(this.fillPatternX(),this.fillPatternY()),M.rotate(i.Konva.getAngle(this.fillPatternRotation())),M.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),M.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const T=M.getMatrix(),z=typeof DOMMatrix>"u"?{a:T[0],b:T[1],c:T[2],d:T[3],e:T[4],f:T[5]}:new DOMMatrix(T);A.setTransform(z)}return A}}_getLinearGradient(){return this._getCache(k,this.__getLinearGradient)}__getLinearGradient(){const S=this.fillLinearGradientColorStops();if(S){const A=O(),M=this.fillLinearGradientStartPoint(),T=this.fillLinearGradientEndPoint(),z=A.createLinearGradient(M.x,M.y,T.x,T.y);for(let U=0;U<S.length;U+=2)z.addColorStop(S[U],S[U+1]);return z}}_getRadialGradient(){return this._getCache(E,this.__getRadialGradient)}__getRadialGradient(){const S=this.fillRadialGradientColorStops();if(S){const A=O(),M=this.fillRadialGradientStartPoint(),T=this.fillRadialGradientEndPoint(),z=A.createRadialGradient(M.x,M.y,this.fillRadialGradientStartRadius(),T.x,T.y,this.fillRadialGradientEndRadius());for(let U=0;U<S.length;U+=2)z.addColorStop(S[U],S[U+1]);return z}}getShadowRGBA(){return this._getCache(b,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const S=t.Util.colorToRGBA(this.shadowColor());if(S)return"rgba("+S.r+","+S.g+","+S.b+","+S.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 S=this.hitStrokeWidth();return S==="auto"?this.hasStroke():this.strokeEnabled()&&!!S}intersects(S){const A=this.getStage();if(!A)return!1;const M=A.bufferHitCanvas;return M.getContext().clear(),this.drawHit(M,void 0,!0),M.context.getImageData(Math.round(S.x),Math.round(S.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(S){var A;if(!((A=this.attrs.perfectDrawEnabled)!==null&&A!==void 0?A:!0))return!1;const T=S||this.hasFill(),z=this.hasStroke(),U=this.getAbsoluteOpacity()!==1;if(T&&z&&U)return!0;const Q=this.hasShadow(),K=this.shadowForStrokeEnabled();return!!(T&&z&&Q&&K)}setStrokeHitEnabled(S){t.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),S?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const S=this.size();return{x:this._centroid?-S.width/2:0,y:this._centroid?-S.height/2:0,width:S.width,height:S.height}}getClientRect(S={}){let A=!1,M=this.getParent();for(;M;){if(M.isCached()){A=!0;break}M=M.getParent()}const T=S.skipTransform,z=S.relativeTo||A&&this.getStage()||void 0,U=this.getSelfRect(),K=!S.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,J=U.width+K,B=U.height+K,L=!S.skipShadow&&this.hasShadow(),F=L?this.shadowOffsetX():0,H=L?this.shadowOffsetY():0,$=J+Math.abs(F),ee=B+Math.abs(H),V=L&&this.shadowBlur()||0,X=$+V*2,Y=ee+V*2,te={width:X,height:Y,x:-(K/2+V)+Math.min(F,0)+U.x,y:-(K/2+V)+Math.min(H,0)+U.y};return T?te:this._transformedRect(te,z)}drawScene(S,A,M){const T=this.getLayer();let z=S||T.getCanvas(),U=z.getContext(),Q=this._getCanvasCache(),K=this.getSceneFunc(),J=this.hasShadow(),B,L;const F=z.isCache,H=A===this;if(!this.isVisible()&&!H)return this;if(Q){U.save();const ee=this.getAbsoluteTransform(A).getMatrix();return U.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(U),U.restore(),this}if(!K)return this;if(U.save(),this._useBufferCanvas()&&!F){B=this.getStage();const ee=M||B.bufferCanvas;L=ee.getContext(),L.clear(),L.save(),L._applyLineJoin(this);var $=this.getAbsoluteTransform(A).getMatrix();L.transform($[0],$[1],$[2],$[3],$[4],$[5]),K.call(this,L,this),L.restore();const V=ee.pixelRatio;J&&U._applyShadow(this),U._applyOpacity(this),U._applyGlobalCompositeOperation(this),U.drawImage(ee._canvas,0,0,ee.width/V,ee.height/V)}else{if(U._applyLineJoin(this),!H){var $=this.getAbsoluteTransform(A).getMatrix();U.transform($[0],$[1],$[2],$[3],$[4],$[5]),U._applyOpacity(this),U._applyGlobalCompositeOperation(this)}J&&U._applyShadow(this),K.call(this,U,this)}return U.restore(),this}drawHit(S,A,M=!1){if(!this.shouldDrawHit(A,M))return this;const T=this.getLayer(),z=S||T.hitCanvas,U=z&&z.getContext(),Q=this.hitFunc()||this.sceneFunc(),K=this._getCanvasCache(),J=K&&K.hit;if(this.colorKey||t.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),J){U.save();const L=this.getAbsoluteTransform(A).getMatrix();return U.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedHitCanvas(U),U.restore(),this}if(!Q)return this;if(U.save(),U._applyLineJoin(this),!(this===A)){const L=this.getAbsoluteTransform(A).getMatrix();U.transform(L[0],L[1],L[2],L[3],L[4],L[5])}return Q.call(this,U,this),U.restore(),this}drawHitFromCache(S=0){let A=this._getCanvasCache(),M=this._getCachedSceneCanvas(),T=A.hit,z=T.getContext(),U=T.getWidth(),Q=T.getHeight(),K,J,B,L,F,H;z.clear(),z.drawImage(M._canvas,0,0,U,Q);try{for(K=z.getImageData(0,0,U,Q),J=K.data,B=J.length,L=t.Util._hexToRgb(this.colorKey),F=0;F<B;F+=4)H=J[F+3],H>S?(J[F]=L.r,J[F+1]=L.g,J[F+2]=L.b,J[F+3]=255):J[F+3]=0;z.putImageData(K,0,0)}catch($){t.Util.error("Unable to draw hit graph from cached scene canvas. "+$.message)}return this}hasPointerCapture(S){return c.hasPointerCapture(S,this)}setPointerCapture(S){c.setPointerCapture(S,this)}releaseCapture(S){c.releaseCapture(S,this)}}e.Shape=D,D.prototype._fillFunc=g,D.prototype._strokeFunc=p,D.prototype._fillFuncHit=P,D.prototype._strokeFuncHit=d,D.prototype._centroid=!1,D.prototype.nodeType="Shape",(0,u._registerNode)(D),D.prototype.eventListeners={},D.prototype.on.call(D.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),D.prototype.on.call(D.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",y),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",w),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",N),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R),n.Factory.addGetterSetter(D,"stroke",void 0,(0,l.getStringOrGradientValidator)()),n.Factory.addGetterSetter(D,"strokeWidth",2,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(D,"hitStrokeWidth","auto",(0,l.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(D,"strokeHitEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"perfectDrawEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"shadowForStrokeEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"lineJoin"),n.Factory.addGetterSetter(D,"lineCap"),n.Factory.addGetterSetter(D,"sceneFunc"),n.Factory.addGetterSetter(D,"hitFunc"),n.Factory.addGetterSetter(D,"dash"),n.Factory.addGetterSetter(D,"dashOffset",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowColor",void 0,(0,l.getStringValidator)()),n.Factory.addGetterSetter(D,"shadowBlur",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowOpacity",1,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(D,"shadowOffsetX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowOffsetY",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternImage"),n.Factory.addGetterSetter(D,"fill",void 0,(0,l.getStringOrGradientValidator)()),n.Factory.addGetterSetter(D,"fillPatternX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternY",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(D,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(D,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(D,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(D,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(D,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(D,"fillEnabled",!0),n.Factory.addGetterSetter(D,"strokeEnabled",!0),n.Factory.addGetterSetter(D,"shadowEnabled",!0),n.Factory.addGetterSetter(D,"dashEnabled",!0),n.Factory.addGetterSetter(D,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(D,"fillPriority","color"),n.Factory.addComponentsGetterSetter(D,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(D,"fillPatternOffsetX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternOffsetY",0,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(D,"fillPatternScaleX",1,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternScaleY",1,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(D,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(D,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(D,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(D,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(D,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(D,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(D,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(D,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(D,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(D,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(D,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(D,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(D,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(D,"fillPatternRotation",0),n.Factory.addGetterSetter(D,"fillRule",void 0,(0,l.getStringValidator)()),n.Factory.backCompat(D,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(B0)),B0}var Bm;function g5(){if(Bm)return bf;Bm=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Layer=void 0;const e=Nn(),i=Ip(),t=Hn(),n=jt(),a=Np(),l=Bt(),u=wr(),c=Lt(),h="#",b="beforeDraw",_="draw",k=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],E=k.length;class v extends i.Container{constructor(g){super(g),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(g){return this.getContext().clear(g),this.getHitCanvas().getContext().clear(g),this}setZIndex(g){super.setZIndex(g);const p=this.getStage();return p&&p.content&&(p.content.removeChild(this.getNativeCanvasElement()),g<p.children.length-1?p.content.insertBefore(this.getNativeCanvasElement(),p.children[g+1].getCanvas()._canvas):p.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const g=this.getStage();return g&&g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const p=this.getStage();return!p||!p.content?!1:(p.content.removeChild(this.getNativeCanvasElement()),this.index<p.children.length-1?p.content.insertBefore(this.getNativeCanvasElement(),p.children[this.index+1].getCanvas()._canvas):p.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const g=this.getStage();if(g){const p=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),p[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const g=this.getStage();if(g){const p=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),p[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const g=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),g&&g.parentNode&&e.Util._isInDocument(g)&&g.parentNode.removeChild(g),this}getStage(){return this.parent}setSize({width:g,height:p}){return this.canvas.setSize(g,p),this.hitCanvas.setSize(g,p),this._setSmoothEnabled(),this}_validateAdd(g){const p=g.getType();p!=="Group"&&p!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(g){return g=g||{},g.width=g.width||this.getWidth(),g.height=g.height||this.getHeight(),g.x=g.x!==void 0?g.x:this.x(),g.y=g.y!==void 0?g.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,g)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(g){if(!this.isListening()||!this.isVisible())return null;let p=1,P=!1;for(;;){for(let d=0;d<E;d++){const m=k[d],y=this._getIntersection({x:g.x+m.x*p,y:g.y+m.y*p}),w=y.shape;if(w)return w;if(P=!!y.antialiased,!y.antialiased)break}if(P)p+=1;else return null}}_getIntersection(g){const p=this.hitCanvas.pixelRatio,P=this.hitCanvas.context.getImageData(Math.round(g.x*p),Math.round(g.y*p),1,1).data,d=P[3];if(d===255){const m=e.Util._rgbToHex(P[0],P[1],P[2]),y=u.shapes[h+m];return y?{shape:y}:{antialiased:!0}}else if(d>0)return{antialiased:!0};return{}}drawScene(g,p){const P=this.getLayer(),d=g||P&&P.getCanvas();return this._fire(b,{node:this}),this.clearBeforeDraw()&&d.getContext().clear(),i.Container.prototype.drawScene.call(this,d,p),this._fire(_,{node:this}),this}drawHit(g,p){const P=this.getLayer(),d=g||P&&P.hitCanvas;return P&&P.clearBeforeDraw()&&P.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,d,p),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(g){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(g)}getHitGraphEnabled(g){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const g=this.parent;!!this.hitCanvas._canvas.parentNode?g.content.removeChild(this.hitCanvas._canvas):g.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}return bf.Layer=v,v.prototype.nodeType="Layer",(0,c._registerNode)(v),n.Factory.addGetterSetter(v,"imageSmoothingEnabled",!0),n.Factory.addGetterSetter(v,"clearBeforeDraw",!0),n.Factory.addGetterSetter(v,"hitGraphEnabled",!0,(0,l.getBooleanValidator)()),bf}var _f={},Um;function e8(){if(Um)return _f;Um=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.FastLayer=void 0;const e=Nn(),i=g5(),t=Lt();class n extends i.Layer{constructor(l){super(l),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}return _f.FastLayer=n,n.prototype.nodeType="FastLayer",(0,t._registerNode)(n),_f}var wf={},qm;function tv(){if(qm)return wf;qm=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.Group=void 0;const e=Nn(),i=Ip(),t=Lt();class n extends i.Container{_validateAdd(l){const u=l.getType();u!=="Group"&&u!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}}return wf.Group=n,n.prototype.nodeType="Group",(0,t._registerNode)(n),wf}var Sf={},Hm;function nv(){if(Hm)return Sf;Hm=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Animation=void 0;const e=Lt(),i=Nn(),t=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let n=class Ju{constructor(l,u){this.id=Ju.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t(),frameRate:0},this.func=l,this.setLayers(u)}setLayers(l){let u=[];return l&&(u=Array.isArray(l)?l:[l]),this.layers=u,this}getLayers(){return this.layers}addLayer(l){const u=this.layers,c=u.length;for(let h=0;h<c;h++)if(u[h]._id===l._id)return!1;return this.layers.push(l),!0}isRunning(){const u=Ju.animations,c=u.length;for(let h=0;h<c;h++)if(u[h].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=t(),Ju._addAnimation(this),this}stop(){return Ju._removeAnimation(this),this}_updateFrameObject(l){this.frame.timeDiff=l-this.frame.lastTime,this.frame.lastTime=l,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(l){this.animations.push(l),this._handleAnimation()}static _removeAnimation(l){const u=l.id,c=this.animations,h=c.length;for(let b=0;b<h;b++)if(c[b].id===u){this.animations.splice(b,1);break}}static _runFrames(){const l={},u=this.animations;for(let c=0;c<u.length;c++){const h=u[c],b=h.layers,_=h.func;h._updateFrameObject(t());const k=b.length;let E;if(_?E=_.call(h,h.frame)!==!1:E=!0,!!E)for(let v=0;v<k;v++){const O=b[v];O._id!==void 0&&(l[O._id]=O)}}for(const c in l)l.hasOwnProperty(c)&&l[c].batchDraw()}static _animationLoop(){const l=Ju;l.animations.length?(l._runFrames(),i.Util.requestAnimFrame(l._animationLoop)):l.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,i.Util.requestAnimFrame(this._animationLoop))}};return Sf.Animation=n,n.animations=[],n.animIdCounter=0,n.animRunning=!1,Sf}var U0={},Gm;function t8(){return Gm||(Gm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const i=Nn(),t=nv(),n=Hn(),a=Lt();let l={node:1,duration:1,easing:1,onFinish:1,yoyo:1},u=1,c=2,h=3,b=0,_=["fill","stroke","shadowColor"];class k{constructor(O,g,p,P,d,m,y){this.prop=O,this.propFunc=g,this.begin=P,this._pos=P,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=y,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=p,this._change=d-this.begin,this.pause()}fire(O){const g=this[O];g&&g()}setTime(O){O>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():O<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=O,this.update())}getTime(){return this._time}setPosition(O){this.prevPos=this._pos,this.propFunc(O),this._pos=O}getPosition(O){return O===void 0&&(O=this._time),this.func(O,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=h,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(O){this.pause(),this._time=O,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const O=this.getTimer()-this._startTime;this.state===c?this.setTime(O):this.state===h&&this.setTime(this.duration-O)}pause(){this.state=u,this.fire("onPause")}getTimer(){return new Date().getTime()}}class E{constructor(O){let g=this,p=O.node,P=p._id,d,m=O.easing||e.Easings.Linear,y=!!O.yoyo,w;typeof O.duration>"u"?d=.3:O.duration===0?d=.001:d=O.duration,this.node=p,this._id=b++;const N=p.getLayer()||(p instanceof a.Konva.Stage?p.getLayers():null);N||i.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new t.Animation(function(){g.tween.onEnterFrame()},N),this.tween=new k(w,function(R){g._tweenFunc(R)},m,0,1,d*1e3,y),this._addListeners(),E.attrs[P]||(E.attrs[P]={}),E.attrs[P][this._id]||(E.attrs[P][this._id]={}),E.tweens[P]||(E.tweens[P]={});for(w in O)l[w]===void 0&&this._addAttr(w,O[w]);this.reset(),this.onFinish=O.onFinish,this.onReset=O.onReset,this.onUpdate=O.onUpdate}_addAttr(O,g){let p=this.node,P=p._id,d,m,y,w,N,R,D,x;if(y=E.tweens[P][O],y&&delete E.attrs[P][y][O],d=p.getAttr(O),i.Util._isArray(g))if(m=[],N=Math.max(g.length,d.length),O==="points"&&g.length!==d.length&&(g.length>d.length?(D=d,d=i.Util._prepareArrayForTween(d,g,p.closed())):(R=g,g=i.Util._prepareArrayForTween(g,d,p.closed()))),O.indexOf("fill")===0)for(w=0;w<N;w++)if(w%2===0)m.push(g[w]-d[w]);else{const S=i.Util.colorToRGBA(d[w]);x=i.Util.colorToRGBA(g[w]),d[w]=S,m.push({r:x.r-S.r,g:x.g-S.g,b:x.b-S.b,a:x.a-S.a})}else for(w=0;w<N;w++)m.push(g[w]-d[w]);else _.indexOf(O)!==-1?(d=i.Util.colorToRGBA(d),x=i.Util.colorToRGBA(g),m={r:x.r-d.r,g:x.g-d.g,b:x.b-d.b,a:x.a-d.a}):m=g-d;E.attrs[P][this._id][O]={start:d,diff:m,end:g,trueEnd:R,trueStart:D},E.tweens[P][O]=this._id}_tweenFunc(O){let g=this.node,p=E.attrs[g._id][this._id],P,d,m,y,w,N,R,D;for(P in p){if(d=p[P],m=d.start,y=d.diff,D=d.end,i.Util._isArray(m))if(w=[],R=Math.max(m.length,D.length),P.indexOf("fill")===0)for(N=0;N<R;N++)N%2===0?w.push((m[N]||0)+y[N]*O):w.push("rgba("+Math.round(m[N].r+y[N].r*O)+","+Math.round(m[N].g+y[N].g*O)+","+Math.round(m[N].b+y[N].b*O)+","+(m[N].a+y[N].a*O)+")");else for(N=0;N<R;N++)w.push((m[N]||0)+y[N]*O);else _.indexOf(P)!==-1?w="rgba("+Math.round(m.r+y.r*O)+","+Math.round(m.g+y.g*O)+","+Math.round(m.b+y.b*O)+","+(m.a+y.a*O)+")":w=m+y*O;g.setAttr(P,w)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const O=this.node,g=E.attrs[O._id][this._id];g.points&&g.points.trueEnd&&O.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const O=this.node,g=E.attrs[O._id][this._id];g.points&&g.points.trueStart&&O.points(g.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(O){return this.tween.seek(O*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let O=this.node._id,g=this._id,p=E.tweens[O],P;this.pause();for(P in p)delete E.tweens[O][P];delete E.attrs[O][g]}}e.Tween=E,E.attrs={},E.tweens={},n.Node.prototype.to=function(v){const O=v.onFinish;v.node=this,v.onFinish=function(){this.destroy(),O&&O()},new E(v).play()},e.Easings={BackEaseIn(v,O,g,p){return g*(v/=p)*v*((1.70158+1)*v-1.70158)+O},BackEaseOut(v,O,g,p){return g*((v=v/p-1)*v*((1.70158+1)*v+1.70158)+1)+O},BackEaseInOut(v,O,g,p){let P=1.70158;return(v/=p/2)<1?g/2*(v*v*(((P*=1.525)+1)*v-P))+O:g/2*((v-=2)*v*(((P*=1.525)+1)*v+P)+2)+O},ElasticEaseIn(v,O,g,p,P,d){let m=0;return v===0?O:(v/=p)===1?O+g:(d||(d=p*.3),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),-(P*Math.pow(2,10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d))+O)},ElasticEaseOut(v,O,g,p,P,d){let m=0;return v===0?O:(v/=p)===1?O+g:(d||(d=p*.3),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),P*Math.pow(2,-10*v)*Math.sin((v*p-m)*(2*Math.PI)/d)+g+O)},ElasticEaseInOut(v,O,g,p,P,d){let m=0;return v===0?O:(v/=p/2)===2?O+g:(d||(d=p*(.3*1.5)),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),v<1?-.5*(P*Math.pow(2,10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d))+O:P*Math.pow(2,-10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d)*.5+g+O)},BounceEaseOut(v,O,g,p){return(v/=p)<1/2.75?g*(7.5625*v*v)+O:v<2/2.75?g*(7.5625*(v-=1.5/2.75)*v+.75)+O:v<2.5/2.75?g*(7.5625*(v-=2.25/2.75)*v+.9375)+O:g*(7.5625*(v-=2.625/2.75)*v+.984375)+O},BounceEaseIn(v,O,g,p){return g-e.Easings.BounceEaseOut(p-v,0,g,p)+O},BounceEaseInOut(v,O,g,p){return v<p/2?e.Easings.BounceEaseIn(v*2,0,g,p)*.5+O:e.Easings.BounceEaseOut(v*2-p,0,g,p)*.5+g*.5+O},EaseIn(v,O,g,p){return g*(v/=p)*v+O},EaseOut(v,O,g,p){return-g*(v/=p)*(v-2)+O},EaseInOut(v,O,g,p){return(v/=p/2)<1?g/2*v*v+O:-g/2*(--v*(v-2)-1)+O},StrongEaseIn(v,O,g,p){return g*(v/=p)*v*v*v*v+O},StrongEaseOut(v,O,g,p){return g*((v=v/p-1)*v*v*v*v+1)+O},StrongEaseInOut(v,O,g,p){return(v/=p/2)<1?g/2*v*v*v*v*v+O:g/2*((v-=2)*v*v*v*v+2)+O},Linear(v,O,g,p){return g*v/p+O}}}(U0)),U0}var Vm;function kg(){return Vm||(Vm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const i=Lt(),t=Nn(),n=Hn(),a=Ip(),l=Jw(),u=g5(),c=e8(),h=tv(),b=ev(),_=wr(),k=nv(),E=t8(),v=h5(),O=Np();e.Konva=t.Util._assign(i.Konva,{Util:t.Util,Transform:t.Transform,Node:n.Node,Container:a.Container,Stage:l.Stage,stages:l.stages,Layer:u.Layer,FastLayer:c.FastLayer,Group:h.Group,DD:b.DD,Shape:_.Shape,shapes:_.shapes,Animation:k.Animation,Tween:E.Tween,Easings:E.Easings,Context:v.Context,Canvas:O.Canvas}),e.default=e.Konva}(N0)),N0}var Ef={},$m;function n8(){if($m)return Ef;$m=1,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Arc=void 0;const e=jt(),i=wr(),t=Lt(),n=Bt(),a=Lt();class l extends i.Shape{_sceneFunc(c){const h=t.Konva.getAngle(this.angle()),b=this.clockwise();c.beginPath(),c.arc(0,0,this.outerRadius(),0,h,b),c.arc(0,0,this.innerRadius(),h,0,!b),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}getSelfRect(){const c=this.innerRadius(),h=this.outerRadius(),b=this.clockwise(),_=t.Konva.getAngle(b?360-this.angle():this.angle()),k=Math.cos(Math.min(_,Math.PI)),E=1,v=Math.sin(Math.min(Math.max(Math.PI,_),3*Math.PI/2)),O=Math.sin(Math.min(_,Math.PI/2)),g=k*(k>0?c:h),p=E*h,P=v*(v>0?c:h),d=O*(O>0?h:c);return{x:g,y:b?-1*d:P,width:p-g,height:d-P}}}return Ef.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1,(0,n.getBooleanValidator)()),Ef}var Of={},xf={},Wm;function v5(){if(Wm)return xf;Wm=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.Line=void 0;const e=jt(),i=Lt(),t=wr(),n=Bt();function a(c,h,b,_,k,E,v){const O=Math.sqrt(Math.pow(b-c,2)+Math.pow(_-h,2)),g=Math.sqrt(Math.pow(k-b,2)+Math.pow(E-_,2)),p=v*O/(O+g),P=v*g/(O+g),d=b-p*(k-c),m=_-p*(E-h),y=b+P*(k-c),w=_+P*(E-h);return[d,m,y,w]}function l(c,h){const b=c.length,_=[];for(let k=2;k<b-2;k+=2){const E=a(c[k-2],c[k-1],c[k],c[k+1],c[k+2],c[k+3],h);isNaN(E[0])||(_.push(E[0]),_.push(E[1]),_.push(c[k]),_.push(c[k+1]),_.push(E[2]),_.push(E[3]))}return _}class u extends t.Shape{constructor(h){super(h),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(h){let b=this.points(),_=b.length,k=this.tension(),E=this.closed(),v=this.bezier(),O,g,p;if(_){if(h.beginPath(),h.moveTo(b[0],b[1]),k!==0&&_>4){for(O=this.getTensionPoints(),g=O.length,p=E?0:4,E||h.quadraticCurveTo(O[0],O[1],O[2],O[3]);p<g-2;)h.bezierCurveTo(O[p++],O[p++],O[p++],O[p++],O[p++],O[p++]);E||h.quadraticCurveTo(O[g-2],O[g-1],b[_-2],b[_-1])}else if(v)for(p=2;p<_;)h.bezierCurveTo(b[p++],b[p++],b[p++],b[p++],b[p++],b[p++]);else for(p=2;p<_;p+=2)h.lineTo(b[p],b[p+1]);E?(h.closePath(),h.fillStrokeShape(this)):h.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){const h=this.points(),b=h.length,_=this.tension(),k=a(h[b-2],h[b-1],h[0],h[1],h[2],h[3],_),E=a(h[b-4],h[b-3],h[b-2],h[b-1],h[0],h[1],_),v=l(h,_);return[k[2],k[3]].concat(v).concat([E[0],E[1],h[b-2],h[b-1],E[2],E[3],k[0],k[1],h[0],h[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let h=this.points();if(h.length<4)return{x:h[0]||0,y:h[1]||0,width:0,height:0};this.tension()!==0?h=[h[0],h[1],...this._getTensionPoints(),h[h.length-2],h[h.length-1]]:h=this.points();let b=h[0],_=h[0],k=h[1],E=h[1],v,O;for(let g=0;g<h.length/2;g++)v=h[g*2],O=h[g*2+1],b=Math.min(b,v),_=Math.max(_,v),k=Math.min(k,O),E=Math.max(E,O);return{x:b,y:k,width:_-b,height:E-k}}}return xf.Line=u,u.prototype.className="Line",u.prototype._attrsAffectingSize=["points","bezier","tension"],(0,i._registerNode)(u),e.Factory.addGetterSetter(u,"closed",!1),e.Factory.addGetterSetter(u,"bezier",!1),e.Factory.addGetterSetter(u,"tension",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(u,"points",[],(0,n.getNumberArrayValidator)()),xf}var Pf={},q0={},Ym;function r8(){return Ym||(Ym=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const i=(u,c,h)=>{let b,_;const E=h/2;b=0;for(let v=0;v<20;v++)_=E*e.tValues[20][v]+E,b+=e.cValues[20][v]*n(u,c,_);return E*b};e.getCubicArcLength=i;const t=(u,c,h)=>{h===void 0&&(h=1);const b=u[0]-2*u[1]+u[2],_=c[0]-2*c[1]+c[2],k=2*u[1]-2*u[0],E=2*c[1]-2*c[0],v=4*(b*b+_*_),O=4*(b*k+_*E),g=k*k+E*E;if(v===0)return h*Math.sqrt(Math.pow(u[2]-u[0],2)+Math.pow(c[2]-c[0],2));const p=O/(2*v),P=g/v,d=h+p,m=P-p*p,y=d*d+m>0?Math.sqrt(d*d+m):0,w=p*p+m>0?Math.sqrt(p*p+m):0,N=p+Math.sqrt(p*p+m)!==0?m*Math.log(Math.abs((d+y)/(p+w))):0;return Math.sqrt(v)/2*(d*y-p*w+N)};e.getQuadraticArcLength=t;function n(u,c,h){const b=a(1,h,u),_=a(1,h,c),k=b*b+_*_;return Math.sqrt(k)}const a=(u,c,h)=>{const b=h.length-1;let _,k;if(b===0)return 0;if(u===0){k=0;for(let E=0;E<=b;E++)k+=e.binomialCoefficients[b][E]*Math.pow(1-c,b-E)*Math.pow(c,E)*h[E];return k}else{_=new Array(b);for(let E=0;E<b;E++)_[E]=b*(h[E+1]-h[E]);return a(u-1,c,_)}},l=(u,c,h)=>{let b=1,_=u/c,k=(u-h(_))/c,E=0;for(;b>.001;){const v=h(_+k),O=Math.abs(u-v)/c;if(O<b)b=O,_+=k;else{const g=h(_-k),p=Math.abs(u-g)/c;p<b?(b=p,_-=k):k/=2}if(E++,E>500)break}return _};e.t2length=l}(q0)),q0}var Km;function rv(){if(Km)return Pf;Km=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.Path=void 0;const e=jt(),i=wr(),t=Lt(),n=r8();class a extends i.Shape{constructor(u){super(u),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(u){const c=this.dataArray;u.beginPath();let h=!1;for(let y=0;y<c.length;y++){const w=c[y].command,N=c[y].points;switch(w){case"L":u.lineTo(N[0],N[1]);break;case"M":u.moveTo(N[0],N[1]);break;case"C":u.bezierCurveTo(N[0],N[1],N[2],N[3],N[4],N[5]);break;case"Q":u.quadraticCurveTo(N[0],N[1],N[2],N[3]);break;case"A":var b=N[0],_=N[1],k=N[2],E=N[3],v=N[4],O=N[5],g=N[6],p=N[7],P=k>E?k:E,d=k>E?1:k/E,m=k>E?E/k:1;u.translate(b,_),u.rotate(g),u.scale(d,m),u.arc(0,0,P,v,v+O,1-p),u.scale(1/d,1/m),u.rotate(-g),u.translate(-b,-_);break;case"z":h=!0,u.closePath();break}}!h&&!this.hasFill()?u.strokeShape(this):u.fillStrokeShape(this)}getSelfRect(){let u=[];this.dataArray.forEach(function(v){if(v.command==="A"){const O=v.points[4],g=v.points[5],p=v.points[4]+g;let P=Math.PI/180;if(Math.abs(O-p)<P&&(P=Math.abs(O-p)),g<0)for(let d=O-P;d>p;d-=P){const m=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],d,0);u.push(m.x,m.y)}else for(let d=O+P;d<p;d+=P){const m=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],d,0);u.push(m.x,m.y)}}else if(v.command==="C")for(let O=0;O<=1;O+=.01){const g=a.getPointOnCubicBezier(O,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3],v.points[4],v.points[5]);u.push(g.x,g.y)}else u=u.concat(v.points)});let c=u[0],h=u[0],b=u[1],_=u[1],k,E;for(let v=0;v<u.length/2;v++)k=u[v*2],E=u[v*2+1],isNaN(k)||(c=Math.min(c,k),h=Math.max(h,k)),isNaN(E)||(b=Math.min(b,E),_=Math.max(_,E));return{x:c,y:b,width:h-c,height:_-b}}getLength(){return this.pathLength}getPointAtLength(u){return a.getPointAtLengthOfDataArray(u,this.dataArray)}static getLineLength(u,c,h,b){return Math.sqrt((h-u)*(h-u)+(b-c)*(b-c))}static getPathLength(u){let c=0;for(let h=0;h<u.length;++h)c+=u[h].pathLength;return c}static getPointAtLengthOfDataArray(u,c){let h,b=0,_=c.length;if(!_)return null;for(;b<_&&u>c[b].pathLength;)u-=c[b].pathLength,++b;if(b===_)return h=c[b-1].points.slice(-2),{x:h[0],y:h[1]};if(u<.01)return h=c[b].points.slice(0,2),{x:h[0],y:h[1]};const k=c[b],E=k.points;switch(k.command){case"L":return a.getPointOnLine(u,k.start.x,k.start.y,E[0],E[1]);case"C":return a.getPointOnCubicBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getCubicArcLength)([k.start.x,E[0],E[2],E[4]],[k.start.y,E[1],E[3],E[5]],y)),k.start.x,k.start.y,E[0],E[1],E[2],E[3],E[4],E[5]);case"Q":return a.getPointOnQuadraticBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getQuadraticArcLength)([k.start.x,E[0],E[2]],[k.start.y,E[1],E[3]],y)),k.start.x,k.start.y,E[0],E[1],E[2],E[3]);case"A":var v=E[0],O=E[1],g=E[2],p=E[3],P=E[4],d=E[5],m=E[6];return P+=d*u/k.pathLength,a.getPointOnEllipticalArc(v,O,g,p,P,m)}return null}static getPointOnLine(u,c,h,b,_,k,E){k=k??c,E=E??h;const v=this.getLineLength(c,h,b,_);if(v<1e-10)return{x:c,y:h};if(b===c)return{x:k,y:E+(_>h?u:-u)};const O=(_-h)/(b-c),g=Math.sqrt(u*u/(1+O*O))*(b<c?-1:1),p=O*g;if(Math.abs(E-h-O*(k-c))<1e-10)return{x:k+g,y:E+p};const P=((k-c)*(b-c)+(E-h)*(_-h))/(v*v),d=c+P*(b-c),m=h+P*(_-h),y=this.getLineLength(k,E,d,m),w=Math.sqrt(u*u-y*y),N=Math.sqrt(w*w/(1+O*O))*(b<c?-1:1),R=O*N;return{x:d+N,y:m+R}}static getPointOnCubicBezier(u,c,h,b,_,k,E,v,O){function g(w){return w*w*w}function p(w){return 3*w*w*(1-w)}function P(w){return 3*w*(1-w)*(1-w)}function d(w){return(1-w)*(1-w)*(1-w)}const m=v*g(u)+k*p(u)+b*P(u)+c*d(u),y=O*g(u)+E*p(u)+_*P(u)+h*d(u);return{x:m,y}}static getPointOnQuadraticBezier(u,c,h,b,_,k,E){function v(d){return d*d}function O(d){return 2*d*(1-d)}function g(d){return(1-d)*(1-d)}const p=k*v(u)+b*O(u)+c*g(u),P=E*v(u)+_*O(u)+h*g(u);return{x:p,y:P}}static getPointOnEllipticalArc(u,c,h,b,_,k){const E=Math.cos(k),v=Math.sin(k),O={x:h*Math.cos(_),y:b*Math.sin(_)};return{x:u+(O.x*E-O.y*v),y:c+(O.x*v+O.y*E)}}static parsePathData(u){if(!u)return[];let c=u;const h=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];c=c.replace(new RegExp(" ","g"),",");for(var b=0;b<h.length;b++)c=c.replace(new RegExp(h[b],"g"),"|"+h[b]);const _=c.split("|"),k=[],E=[];let v=0,O=0;const g=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let p;for(b=1;b<_.length;b++){let T=_[b],z=T.charAt(0);for(T=T.slice(1),E.length=0;p=g.exec(T);)E.push(p[0]);const U=[];for(let Q=0,K=E.length;Q<K;Q++){if(E[Q]==="00"){U.push(0,0);continue}const J=parseFloat(E[Q]);isNaN(J)?U.push(0):U.push(J)}for(;U.length>0&&!isNaN(U[0]);){let Q="",K=[];const J=v,B=O;var P,d,m,y,w,N,R,D,x,S;switch(z){case"l":v+=U.shift(),O+=U.shift(),Q="L",K.push(v,O);break;case"L":v=U.shift(),O=U.shift(),K.push(v,O);break;case"m":var A=U.shift(),M=U.shift();if(v+=A,O+=M,Q="M",k.length>2&&k[k.length-1].command==="z"){for(let L=k.length-2;L>=0;L--)if(k[L].command==="M"){v=k[L].points[0]+A,O=k[L].points[1]+M;break}}K.push(v,O),z="l";break;case"M":v=U.shift(),O=U.shift(),Q="M",K.push(v,O),z="L";break;case"h":v+=U.shift(),Q="L",K.push(v,O);break;case"H":v=U.shift(),Q="L",K.push(v,O);break;case"v":O+=U.shift(),Q="L",K.push(v,O);break;case"V":O=U.shift(),Q="L",K.push(v,O);break;case"C":K.push(U.shift(),U.shift(),U.shift(),U.shift()),v=U.shift(),O=U.shift(),K.push(v,O);break;case"c":K.push(v+U.shift(),O+U.shift(),v+U.shift(),O+U.shift()),v+=U.shift(),O+=U.shift(),Q="C",K.push(v,O);break;case"S":d=v,m=O,P=k[k.length-1],P.command==="C"&&(d=v+(v-P.points[2]),m=O+(O-P.points[3])),K.push(d,m,U.shift(),U.shift()),v=U.shift(),O=U.shift(),Q="C",K.push(v,O);break;case"s":d=v,m=O,P=k[k.length-1],P.command==="C"&&(d=v+(v-P.points[2]),m=O+(O-P.points[3])),K.push(d,m,v+U.shift(),O+U.shift()),v+=U.shift(),O+=U.shift(),Q="C",K.push(v,O);break;case"Q":K.push(U.shift(),U.shift()),v=U.shift(),O=U.shift(),K.push(v,O);break;case"q":K.push(v+U.shift(),O+U.shift()),v+=U.shift(),O+=U.shift(),Q="Q",K.push(v,O);break;case"T":d=v,m=O,P=k[k.length-1],P.command==="Q"&&(d=v+(v-P.points[0]),m=O+(O-P.points[1])),v=U.shift(),O=U.shift(),Q="Q",K.push(d,m,v,O);break;case"t":d=v,m=O,P=k[k.length-1],P.command==="Q"&&(d=v+(v-P.points[0]),m=O+(O-P.points[1])),v+=U.shift(),O+=U.shift(),Q="Q",K.push(d,m,v,O);break;case"A":y=U.shift(),w=U.shift(),N=U.shift(),R=U.shift(),D=U.shift(),x=v,S=O,v=U.shift(),O=U.shift(),Q="A",K=this.convertEndpointToCenterParameterization(x,S,v,O,R,D,y,w,N);break;case"a":y=U.shift(),w=U.shift(),N=U.shift(),R=U.shift(),D=U.shift(),x=v,S=O,v+=U.shift(),O+=U.shift(),Q="A",K=this.convertEndpointToCenterParameterization(x,S,v,O,R,D,y,w,N);break}k.push({command:Q||z,points:K,start:{x:J,y:B},pathLength:this.calcLength(J,B,Q||z,K)})}(z==="z"||z==="Z")&&k.push({command:"z",points:[],start:void 0,pathLength:0})}return k}static calcLength(u,c,h,b){let _,k,E,v;const O=a;switch(h){case"L":return O.getLineLength(u,c,b[0],b[1]);case"C":return(0,n.getCubicArcLength)([u,b[0],b[2],b[4]],[c,b[1],b[3],b[5]],1);case"Q":return(0,n.getQuadraticArcLength)([u,b[0],b[2]],[c,b[1],b[3]],1);case"A":_=0;var g=b[4],p=b[5],P=b[4]+p,d=Math.PI/180;if(Math.abs(g-P)<d&&(d=Math.abs(g-P)),k=O.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],g,0),p<0)for(v=g-d;v>P;v-=d)E=O.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],v,0),_+=O.getLineLength(k.x,k.y,E.x,E.y),k=E;else for(v=g+d;v<P;v+=d)E=O.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],v,0),_+=O.getLineLength(k.x,k.y,E.x,E.y),k=E;return E=O.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],P,0),_+=O.getLineLength(k.x,k.y,E.x,E.y),_}return 0}static convertEndpointToCenterParameterization(u,c,h,b,_,k,E,v,O){const g=O*(Math.PI/180),p=Math.cos(g)*(u-h)/2+Math.sin(g)*(c-b)/2,P=-1*Math.sin(g)*(u-h)/2+Math.cos(g)*(c-b)/2,d=p*p/(E*E)+P*P/(v*v);d>1&&(E*=Math.sqrt(d),v*=Math.sqrt(d));let m=Math.sqrt((E*E*(v*v)-E*E*(P*P)-v*v*(p*p))/(E*E*(P*P)+v*v*(p*p)));_===k&&(m*=-1),isNaN(m)&&(m=0);const y=m*E*P/v,w=m*-v*p/E,N=(u+h)/2+Math.cos(g)*y-Math.sin(g)*w,R=(c+b)/2+Math.sin(g)*y+Math.cos(g)*w,D=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},x=function(U,Q){return(U[0]*Q[0]+U[1]*Q[1])/(D(U)*D(Q))},S=function(U,Q){return(U[0]*Q[1]<U[1]*Q[0]?-1:1)*Math.acos(x(U,Q))},A=S([1,0],[(p-y)/E,(P-w)/v]),M=[(p-y)/E,(P-w)/v],T=[(-1*p-y)/E,(-1*P-w)/v];let z=S(M,T);return x(M,T)<=-1&&(z=Math.PI),x(M,T)>=1&&(z=0),k===0&&z>0&&(z=z-2*Math.PI),k===1&&z<0&&(z=z+2*Math.PI),[N,R,E,v,A,z,g,k]}}return Pf.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),Pf}var Xm;function i8(){if(Xm)return Of;Xm=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.Arrow=void 0;const e=jt(),i=v5(),t=Bt(),n=Lt(),a=rv();class l extends i.Line{_sceneFunc(c){super._sceneFunc(c);const h=Math.PI*2,b=this.points();let _=b;const k=this.tension()!==0&&b.length>4;k&&(_=this.getTensionPoints());const E=this.pointerLength(),v=b.length;let O,g;if(k){const d=[_[_.length-4],_[_.length-3],_[_.length-2],_[_.length-1],b[v-2],b[v-1]],m=a.Path.calcLength(_[_.length-4],_[_.length-3],"C",d),y=a.Path.getPointOnQuadraticBezier(Math.min(1,1-E/m),d[0],d[1],d[2],d[3],d[4],d[5]);O=b[v-2]-y.x,g=b[v-1]-y.y}else O=b[v-2]-b[v-4],g=b[v-1]-b[v-3];const p=(Math.atan2(g,O)+h)%h,P=this.pointerWidth();this.pointerAtEnding()&&(c.save(),c.beginPath(),c.translate(b[v-2],b[v-1]),c.rotate(p),c.moveTo(0,0),c.lineTo(-E,P/2),c.lineTo(-E,-P/2),c.closePath(),c.restore(),this.__fillStroke(c)),this.pointerAtBeginning()&&(c.save(),c.beginPath(),c.translate(b[0],b[1]),k?(O=(_[0]+_[2])/2-b[0],g=(_[1]+_[3])/2-b[1]):(O=b[2]-b[0],g=b[3]-b[1]),c.rotate((Math.atan2(-g,-O)+h)%h),c.moveTo(0,0),c.lineTo(-E,P/2),c.lineTo(-E,-P/2),c.closePath(),c.restore(),this.__fillStroke(c))}__fillStroke(c){const h=this.dashEnabled();h&&(this.attrs.dashEnabled=!1,c.setLineDash([])),c.fillStrokeShape(this),h&&(this.attrs.dashEnabled=!0)}getSelfRect(){const c=super.getSelfRect(),h=this.pointerWidth()/2;return{x:c.x-h,y:c.y-h,width:c.width+h*2,height:c.height+h*2}}}return Of.Arrow=l,l.prototype.className="Arrow",(0,n._registerNode)(l),e.Factory.addGetterSetter(l,"pointerLength",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerWidth",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerAtBeginning",!1),e.Factory.addGetterSetter(l,"pointerAtEnding",!0),Of}var Cf={},Zm;function o8(){if(Zm)return Cf;Zm=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Circle=void 0;const e=jt(),i=wr(),t=Bt(),n=Lt();class a extends i.Shape{_sceneFunc(u){u.beginPath(),u.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(u){this.radius()!==u/2&&this.radius(u/2)}setHeight(u){this.radius()!==u/2&&this.radius(u/2)}}return Cf.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),Cf}var kf={},Qm;function a8(){if(Qm)return kf;Qm=1,Object.defineProperty(kf,"__esModule",{value:!0}),kf.Ellipse=void 0;const e=jt(),i=wr(),t=Bt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this.radiusX(),h=this.radiusY();u.beginPath(),u.save(),c!==h&&u.scale(1,h/c),u.arc(0,0,c,0,Math.PI*2,!1),u.restore(),u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(u){this.radiusX(u/2)}setHeight(u){this.radiusY(u/2)}}return kf.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,n._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,t.getNumberValidator)()),kf}var Tf={},Jm;function l8(){if(Jm)return Tf;Jm=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.Image=void 0;const e=Nn(),i=jt(),t=wr(),n=Lt(),a=Bt();class l extends t.Shape{constructor(c){super(c),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const c=this.image();c&&c.complete||c&&c.readyState===4||c&&c.addEventListener&&c.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const c=!!this.cornerRadius(),h=this.hasShadow();return c&&h?!0:super._useBufferCanvas(!0)}_sceneFunc(c){const h=this.getWidth(),b=this.getHeight(),_=this.cornerRadius(),k=this.attrs.image;let E;if(k){const v=this.attrs.cropWidth,O=this.attrs.cropHeight;v&&O?E=[k,this.cropX(),this.cropY(),v,O,0,0,h,b]:E=[k,0,0,h,b]}(this.hasFill()||this.hasStroke()||_)&&(c.beginPath(),_?e.Util.drawRoundedRectPath(c,h,b,_):c.rect(0,0,h,b),c.closePath(),c.fillStrokeShape(this)),k&&(_&&c.clip(),c.drawImage.apply(c,E))}_hitFunc(c){const h=this.width(),b=this.height(),_=this.cornerRadius();c.beginPath(),_?e.Util.drawRoundedRectPath(c,h,b,_):c.rect(0,0,h,b),c.closePath(),c.fillStrokeShape(this)}getWidth(){var c,h;return(c=this.attrs.width)!==null&&c!==void 0?c:(h=this.image())===null||h===void 0?void 0:h.width}getHeight(){var c,h;return(c=this.attrs.height)!==null&&c!==void 0?c:(h=this.image())===null||h===void 0?void 0:h.height}static fromURL(c,h,b=null){const _=e.Util.createImageElement();_.onload=function(){const k=new l({image:_});h(k)},_.onerror=b,_.crossOrigin="Anonymous",_.src=c}}return Tf.Image=l,l.prototype.className="Image",(0,n._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,a.getNumberValidator)()),Tf}var Ds={},ey;function s8(){if(ey)return Ds;ey=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.Tag=Ds.Label=void 0;const e=jt(),i=wr(),t=tv(),n=Bt(),a=Lt(),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],u="Change.konva",c="none",h="up",b="right",_="down",k="left",E=l.length;class v extends t.Group{constructor(p){super(p),this.on("add.konva",function(P){this._addListeners(P.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(p){let P=this,d;const m=function(){P._sync()};for(d=0;d<E;d++)p.on(l[d]+u,m)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let p=this.getText(),P=this.getTag(),d,m,y,w,N,R,D;if(p&&P){switch(d=p.width(),m=p.height(),y=P.pointerDirection(),w=P.pointerWidth(),D=P.pointerHeight(),N=0,R=0,y){case h:N=d/2,R=-1*D;break;case b:N=d+w,R=m/2;break;case _:N=d/2,R=m+D;break;case k:N=-1*w,R=m/2;break}P.setAttrs({x:-1*N,y:-1*R,width:d,height:m}),p.setAttrs({x:-1*N,y:-1*R})}}}Ds.Label=v,v.prototype.className="Label",(0,a._registerNode)(v);class O extends i.Shape{_sceneFunc(p){const P=this.width(),d=this.height(),m=this.pointerDirection(),y=this.pointerWidth(),w=this.pointerHeight(),N=this.cornerRadius();let R=0,D=0,x=0,S=0;typeof N=="number"?R=D=x=S=Math.min(N,P/2,d/2):(R=Math.min(N[0]||0,P/2,d/2),D=Math.min(N[1]||0,P/2,d/2),S=Math.min(N[2]||0,P/2,d/2),x=Math.min(N[3]||0,P/2,d/2)),p.beginPath(),p.moveTo(R,0),m===h&&(p.lineTo((P-y)/2,0),p.lineTo(P/2,-1*w),p.lineTo((P+y)/2,0)),p.lineTo(P-D,0),p.arc(P-D,D,D,Math.PI*3/2,0,!1),m===b&&(p.lineTo(P,(d-w)/2),p.lineTo(P+y,d/2),p.lineTo(P,(d+w)/2)),p.lineTo(P,d-S),p.arc(P-S,d-S,S,0,Math.PI/2,!1),m===_&&(p.lineTo((P+y)/2,d),p.lineTo(P/2,d+w),p.lineTo((P-y)/2,d)),p.lineTo(x,d),p.arc(x,d-x,x,Math.PI/2,Math.PI,!1),m===k&&(p.lineTo(0,(d+w)/2),p.lineTo(-1*y,d/2),p.lineTo(0,(d-w)/2)),p.lineTo(0,R),p.arc(R,R,R,Math.PI,Math.PI*3/2,!1),p.closePath(),p.fillStrokeShape(this)}getSelfRect(){let p=0,P=0,d=this.pointerWidth(),m=this.pointerHeight(),y=this.pointerDirection(),w=this.width(),N=this.height();return y===h?(P-=m,N+=m):y===_?N+=m:y===k?(p-=d*1.5,w+=d):y===b&&(w+=d*1.5),{x:p,y:P,width:w,height:N}}}return Ds.Tag=O,O.prototype.className="Tag",(0,a._registerNode)(O),e.Factory.addGetterSetter(O,"pointerDirection",c),e.Factory.addGetterSetter(O,"pointerWidth",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(O,"pointerHeight",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(O,"cornerRadius",0,(0,n.getNumberOrArrayOfNumbersValidator)(4)),Ds}var Af={},ty;function m5(){if(ty)return Af;ty=1,Object.defineProperty(Af,"__esModule",{value:!0}),Af.Rect=void 0;const e=jt(),i=wr(),t=Lt(),n=Nn(),a=Bt();class l extends i.Shape{_sceneFunc(c){const h=this.cornerRadius(),b=this.width(),_=this.height();c.beginPath(),h?n.Util.drawRoundedRectPath(c,b,_,h):c.rect(0,0,b,_),c.closePath(),c.fillStrokeShape(this)}}return Af.Rect=l,l.prototype.className="Rect",(0,t._registerNode)(l),e.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),Af}var Rf={},ny;function u8(){if(ny)return Rf;ny=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.RegularPolygon=void 0;const e=jt(),i=wr(),t=Bt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this._getPoints();u.beginPath(),u.moveTo(c[0].x,c[0].y);for(let h=1;h<c.length;h++)u.lineTo(c[h].x,c[h].y);u.closePath(),u.fillStrokeShape(this)}_getPoints(){const u=this.attrs.sides,c=this.attrs.radius||0,h=[];for(let b=0;b<u;b++)h.push({x:c*Math.sin(b*2*Math.PI/u),y:-1*c*Math.cos(b*2*Math.PI/u)});return h}getSelfRect(){const u=this._getPoints();let c=u[0].x,h=u[0].y,b=u[0].x,_=u[0].y;return u.forEach(k=>{c=Math.min(c,k.x),h=Math.max(h,k.x),b=Math.min(b,k.y),_=Math.max(_,k.y)}),{x:c,y:b,width:h-c,height:_-b}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(u){this.radius(u/2)}setHeight(u){this.radius(u/2)}}return Rf.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"sides",0,(0,t.getNumberValidator)()),Rf}var Mf={},ry;function c8(){if(ry)return Mf;ry=1,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.Ring=void 0;const e=jt(),i=wr(),t=Bt(),n=Lt(),a=Math.PI*2;class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.innerRadius(),0,a,!1),c.moveTo(this.outerRadius(),0),c.arc(0,0,this.outerRadius(),a,0,!0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}}return Mf.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,t.getNumberValidator)()),Mf}var Lf={},iy;function f8(){if(iy)return Lf;iy=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.Sprite=void 0;const e=jt(),i=wr(),t=nv(),n=Bt(),a=Lt();class l extends i.Shape{constructor(c){super(c),this._updated=!0,this.anim=new t.Animation(()=>{const h=this._updated;return this._updated=!1,h}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(c){const h=this.animation(),b=this.frameIndex(),_=b*4,k=this.animations()[h],E=this.frameOffsets(),v=k[_+0],O=k[_+1],g=k[_+2],p=k[_+3],P=this.image();if((this.hasFill()||this.hasStroke())&&(c.beginPath(),c.rect(0,0,g,p),c.closePath(),c.fillStrokeShape(this)),P)if(E){const d=E[h],m=b*2;c.drawImage(P,v,O,g,p,d[m+0],d[m+1],g,p)}else c.drawImage(P,v,O,g,p,0,0,g,p)}_hitFunc(c){const h=this.animation(),b=this.frameIndex(),_=b*4,k=this.animations()[h],E=this.frameOffsets(),v=k[_+2],O=k[_+3];if(c.beginPath(),E){const g=E[h],p=b*2;c.rect(g[p+0],g[p+1],v,O)}else c.rect(0,0,v,O);c.closePath(),c.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const c=this;this.interval=setInterval(function(){c._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const c=this.getLayer();this.anim.setLayers(c),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const c=this.frameIndex(),h=this.animation(),b=this.animations(),_=b[h],k=_.length/4;c<k-1?this.frameIndex(c+1):this.frameIndex(0)}}return Lf.Sprite=l,l.prototype.className="Sprite",(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"animation"),e.Factory.addGetterSetter(l,"animations"),e.Factory.addGetterSetter(l,"frameOffsets"),e.Factory.addGetterSetter(l,"image"),e.Factory.addGetterSetter(l,"frameIndex",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"frameRate",17,(0,n.getNumberValidator)()),e.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),Lf}var Nf={},oy;function d8(){if(oy)return Nf;oy=1,Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.Star=void 0;const e=jt(),i=wr(),t=Bt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this.innerRadius(),h=this.outerRadius(),b=this.numPoints();u.beginPath(),u.moveTo(0,0-h);for(let _=1;_<b*2;_++){const k=_%2===0?h:c,E=k*Math.sin(_*Math.PI/b),v=-1*k*Math.cos(_*Math.PI/b);u.lineTo(E,v)}u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(u){this.outerRadius(u/2)}setHeight(u){this.outerRadius(u/2)}}return Nf.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"numPoints",5,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"outerRadius",0,(0,t.getNumberValidator)()),Nf}var Xu={},ay;function y5(){if(ay)return Xu;ay=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.Text=void 0,Xu.stringToArray=u;const e=Nn(),i=jt(),t=wr(),n=Lt(),a=Bt(),l=Lt();function u(H){return[...H].reduce(($,ee,V,X)=>(new RegExp("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?(?:\\u200D\\p{Emoji_Presentation})+","u").test(ee)?$.push(ee):new RegExp("\\p{Regional_Indicator}{2}","u").test(ee+(X[V+1]||""))?$.push(ee+X[V+1]):V>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(ee)?$[$.length-1]+=ee:$.push(ee),$),[])}const c="auto",h="center",b="inherit",_="justify",k="Change.konva",E="2d",v="-",O="left",g="text",p="Text",P="top",d="bottom",m="middle",y="normal",w="px ",N=" ",R="right",D="rtl",x="word",S="char",A="none",M="…",T=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],z=T.length;function U(H){return H.split(",").map($=>{$=$.trim();const ee=$.indexOf(" ")>=0,V=$.indexOf('"')>=0||$.indexOf("'")>=0;return ee&&!V&&($=`"${$}"`),$}).join(", ")}let Q;function K(){return Q||(Q=e.Util.createCanvasElement().getContext(E),Q)}function J(H){H.fillText(this._partialText,this._partialTextX,this._partialTextY)}function B(H){H.setAttr("miterLimit",2),H.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function L(H){return H=H||{},!H.fillLinearGradientColorStops&&!H.fillRadialGradientColorStops&&!H.fillPatternImage&&(H.fill=H.fill||"black"),H}class F extends t.Shape{constructor($){super(L($)),this._partialTextX=0,this._partialTextY=0;for(let ee=0;ee<z;ee++)this.on(T[ee]+k,this._setTextData);this._setTextData()}_sceneFunc($){const ee=this.textArr,V=ee.length;if(!this.text())return;let X=this.padding(),Y=this.fontSize(),te=this.lineHeight()*Y,re=this.verticalAlign(),ie=this.direction(),ae=0,ue=this.align(),de=this.getWidth(),pe=this.letterSpacing(),Oe=this.fill(),_e=this.textDecoration(),Le=_e.indexOf("underline")!==-1,fe=_e.indexOf("line-through")!==-1,ge;ie=ie===b?$.direction:ie;let Ce=te/2,Ae=m;if(n.Konva._fixTextRendering){const Xe=this.measureSize("M");Ae="alphabetic",Ce=(Xe.fontBoundingBoxAscent-Xe.fontBoundingBoxDescent)/2+te/2}var se=0,me=0;for(ie===D&&$.setAttr("direction",ie),$.setAttr("font",this._getContextFont()),$.setAttr("textBaseline",Ae),$.setAttr("textAlign",O),re===m?ae=(this.getHeight()-V*te-X*2)/2:re===d&&(ae=this.getHeight()-V*te-X*2),$.translate(X,ae+X),ge=0;ge<V;ge++){var se=0,me=0,xe=ee[ge],Ne=xe.text,ct=xe.width,at=xe.lastInParagraph,De,Fe,He;if($.save(),ue===R?se+=de-ct-X*2:ue===h&&(se+=(de-ct-X*2)/2),Le){$.save(),$.beginPath();const At=n.Konva._fixTextRendering?Math.round(Y/4):Math.round(Y/2),xt=se,be=Ce+me+At;$.moveTo(xt,be),De=Ne.split(" ").length-1,Fe=De===0,He=ue===_&&!at?de-X*2:ct,$.lineTo(xt+Math.round(He),be),$.lineWidth=Y/15;const Se=this._getLinearGradient();$.strokeStyle=Se||Oe,$.stroke(),$.restore()}if(fe){$.save(),$.beginPath();const At=n.Konva._fixTextRendering?-Math.round(Y/4):0;$.moveTo(se,Ce+me+At),De=Ne.split(" ").length-1,Fe=De===0,He=ue===_&&at&&!Fe?de-X*2:ct,$.lineTo(se+Math.round(He),Ce+me+At),$.lineWidth=Y/15;const xt=this._getLinearGradient();$.strokeStyle=xt||Oe,$.stroke(),$.restore()}if(ie!==D&&(pe!==0||ue===_)){De=Ne.split(" ").length-1;const At=u(Ne);for(let xt=0;xt<At.length;xt++){const be=At[xt];be===" "&&!at&&ue===_&&(se+=(de-X*2-ct)/De),this._partialTextX=se,this._partialTextY=Ce+me,this._partialText=be,$.fillStrokeShape(this),se+=this.measureSize(be).width+pe}}else pe!==0&&$.setAttr("letterSpacing",`${pe}px`),this._partialTextX=se,this._partialTextY=Ce+me,this._partialText=Ne,$.fillStrokeShape(this);$.restore(),V>1&&(Ce+=te)}}_hitFunc($){const ee=this.getWidth(),V=this.getHeight();$.beginPath(),$.rect(0,0,ee,V),$.closePath(),$.fillStrokeShape(this)}setText($){const ee=e.Util._isString($)?$:$==null?"":$+"";return this._setAttr(g,ee),this}getWidth(){return this.attrs.width===c||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===c||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize($){var ee,V,X,Y,te,re,ie,ae,ue,de,pe;let Oe=K(),_e=this.fontSize(),Le;Oe.save(),Oe.font=this._getContextFont(),Le=Oe.measureText($),Oe.restore();const fe=_e/100;return{actualBoundingBoxAscent:(ee=Le.actualBoundingBoxAscent)!==null&&ee!==void 0?ee:71.58203125*fe,actualBoundingBoxDescent:(V=Le.actualBoundingBoxDescent)!==null&&V!==void 0?V:0,actualBoundingBoxLeft:(X=Le.actualBoundingBoxLeft)!==null&&X!==void 0?X:-7.421875*fe,actualBoundingBoxRight:(Y=Le.actualBoundingBoxRight)!==null&&Y!==void 0?Y:75.732421875*fe,alphabeticBaseline:(te=Le.alphabeticBaseline)!==null&&te!==void 0?te:0,emHeightAscent:(re=Le.emHeightAscent)!==null&&re!==void 0?re:100*fe,emHeightDescent:(ie=Le.emHeightDescent)!==null&&ie!==void 0?ie:-20*fe,fontBoundingBoxAscent:(ae=Le.fontBoundingBoxAscent)!==null&&ae!==void 0?ae:91*fe,fontBoundingBoxDescent:(ue=Le.fontBoundingBoxDescent)!==null&&ue!==void 0?ue:21*fe,hangingBaseline:(de=Le.hangingBaseline)!==null&&de!==void 0?de:72.80000305175781*fe,ideographicBaseline:(pe=Le.ideographicBaseline)!==null&&pe!==void 0?pe:-21*fe,width:Le.width,height:_e}}_getContextFont(){return this.fontStyle()+N+this.fontVariant()+N+(this.fontSize()+w)+U(this.fontFamily())}_addTextLine($){this.align()===_&&($=$.trim());const V=this._getTextWidth($);return this.textArr.push({text:$,width:V,lastInParagraph:!1})}_getTextWidth($){const ee=this.letterSpacing(),V=$.length;return K().measureText($).width+(V?ee*(V-1):0)}_setTextData(){let $=this.text().split(`
|
|
43
|
-
`),ee=+this.fontSize(),V=0,X=this.lineHeight()*ee,Y=this.attrs.width,te=this.attrs.height,re=Y!==c&&Y!==void 0,ie=te!==c&&te!==void 0,ae=this.padding(),ue=Y-ae*2,de=te-ae*2,pe=0,Oe=this.wrap(),_e=Oe!==A,Le=Oe!==S&&_e,fe=this.ellipsis();this.textArr=[],K().font=this._getContextFont();const ge=fe?this._getTextWidth(M):0;for(let Ae=0,se=$.length;Ae<se;++Ae){let me=$[Ae],xe=this._getTextWidth(me);if(re&&xe>ue)for(;me.length>0;){let Ne=0,ct=me.length,at="",De=0;for(;Ne<ct;){const Fe=Ne+ct>>>1,He=me.slice(0,Fe+1),Xe=this._getTextWidth(He)+ge;Xe<=ue?(Ne=Fe+1,at=He,De=Xe):ct=Fe}if(at){if(Le){var Ce;const He=me[at.length];(He===N||He===v)&&De<=ue?Ce=at.length:Ce=Math.max(at.lastIndexOf(N),at.lastIndexOf(v))+1,Ce>0&&(Ne=Ce,at=at.slice(0,Ne),De=this._getTextWidth(at))}if(at=at.trimRight(),this._addTextLine(at),V=Math.max(V,De),pe+=X,this._shouldHandleEllipsis(pe)){this._tryToAddEllipsisToLastLine();break}if(me=me.slice(Ne),me=me.trimLeft(),me.length>0&&(xe=this._getTextWidth(me),xe<=ue)){this._addTextLine(me),pe+=X,V=Math.max(V,xe);break}}else break}else this._addTextLine(me),pe+=X,V=Math.max(V,xe),this._shouldHandleEllipsis(pe)&&Ae<se-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),ie&&pe+X>de)break}this.textHeight=ee,this.textWidth=V}_shouldHandleEllipsis($){const ee=+this.fontSize(),V=this.lineHeight()*ee,X=this.attrs.height,Y=X!==c&&X!==void 0,te=this.padding(),re=X-te*2;return!(this.wrap()!==A)||Y&&$+V>re}_tryToAddEllipsisToLastLine(){const $=this.attrs.width,ee=$!==c&&$!==void 0,V=this.padding(),X=$-V*2,Y=this.ellipsis(),te=this.textArr[this.textArr.length-1];!te||!Y||(ee&&(this._getTextWidth(te.text+M)<X||(te.text=te.text.slice(0,te.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(te.text+M))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const $=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,ee=this.hasShadow();return $&&ee?!0:super._useBufferCanvas()}}return Xu.Text=F,F.prototype._fillFunc=J,F.prototype._strokeFunc=B,F.prototype.className=p,F.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(F),i.Factory.overWriteSetter(F,"width",(0,a.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(F,"height",(0,a.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(F,"direction",b),i.Factory.addGetterSetter(F,"fontFamily","Arial"),i.Factory.addGetterSetter(F,"fontSize",12,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"fontStyle",y),i.Factory.addGetterSetter(F,"fontVariant",y),i.Factory.addGetterSetter(F,"padding",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"align",O),i.Factory.addGetterSetter(F,"verticalAlign",P),i.Factory.addGetterSetter(F,"lineHeight",1,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"wrap",x),i.Factory.addGetterSetter(F,"ellipsis",!1,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(F,"letterSpacing",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"text","",(0,a.getStringValidator)()),i.Factory.addGetterSetter(F,"textDecoration",""),Xu}var If={},ly;function h8(){if(ly)return If;ly=1,Object.defineProperty(If,"__esModule",{value:!0}),If.TextPath=void 0;const e=Nn(),i=jt(),t=wr(),n=rv(),a=y5(),l=Bt(),u=Lt(),c="",h="normal";function b(E){E.fillText(this.partialText,0,0)}function _(E){E.strokeText(this.partialText,0,0)}class k extends t.Shape{constructor(v){super(v),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return n.Path.getPathLength(this.dataArray)}_getPointAtLength(v){if(!this.attrs.data)return null;const O=this.pathLength;return v-1>O?null:n.Path.getPointAtLengthOfDataArray(v,this.dataArray)}_readDataAttribute(){this.dataArray=n.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(v){v.setAttr("font",this._getContextFont()),v.setAttr("textBaseline",this.textBaseline()),v.setAttr("textAlign","left"),v.save();const O=this.textDecoration(),g=this.fill(),p=this.fontSize(),P=this.glyphInfo;O==="underline"&&v.beginPath();for(let d=0;d<P.length;d++){v.save();const m=P[d].p0;v.translate(m.x,m.y),v.rotate(P[d].rotation),this.partialText=P[d].text,v.fillStrokeShape(this),O==="underline"&&(d===0&&v.moveTo(0,p/2+1),v.lineTo(p,p/2+1)),v.restore()}O==="underline"&&(v.strokeStyle=g,v.lineWidth=p/20,v.stroke()),v.restore()}_hitFunc(v){v.beginPath();const O=this.glyphInfo;if(O.length>=1){const g=O[0].p0;v.moveTo(g.x,g.y)}for(let g=0;g<O.length;g++){const p=O[g].p1;v.lineTo(p.x,p.y)}v.setAttr("lineWidth",this.fontSize()),v.setAttr("strokeStyle",this.colorKey),v.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(v){return a.Text.prototype.setText.call(this,v)}_getContextFont(){return a.Text.prototype._getContextFont.call(this)}_getTextSize(v){const g=this.dummyCanvas.getContext("2d");g.save(),g.font=this._getContextFont();const p=g.measureText(v);return g.restore(),{width:p.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:v,height:O}=this._getTextSize(this.attrs.text);if(this.textWidth=v,this.textHeight=O,this.glyphInfo=[],!this.attrs.data)return null;const g=this.letterSpacing(),p=this.align(),P=this.kerningFunc(),d=Math.max(this.textWidth+((this.attrs.text||"").length-1)*g,0);let m=0;p==="center"&&(m=Math.max(0,this.pathLength/2-d/2)),p==="right"&&(m=Math.max(0,this.pathLength-d));const y=(0,a.stringToArray)(this.text());let w=m;for(let N=0;N<y.length;N++){const R=this._getPointAtLength(w);if(!R)return;let D=this._getTextSize(y[N]).width+g;if(y[N]===" "&&p==="justify"){const z=this.text().split(" ").length-1;D+=(this.pathLength-d)/z}const x=this._getPointAtLength(w+D);if(!x)return;const S=n.Path.getLineLength(R.x,R.y,x.x,x.y);let A=0;if(P)try{A=P(y[N-1],y[N])*this.fontSize()}catch{A=0}R.x+=A,x.x+=A,this.textWidth+=A;const M=n.Path.getPointOnLine(A+S/2,R.x,R.y,x.x,x.y),T=Math.atan2(x.y-R.y,x.x-R.x);this.glyphInfo.push({transposeX:M.x,transposeY:M.y,text:y[N],rotation:T,p0:R,p1:x}),w+=D}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const v=[];this.glyphInfo.forEach(function(w){v.push(w.p0.x),v.push(w.p0.y),v.push(w.p1.x),v.push(w.p1.y)});let O=v[0]||0,g=v[0]||0,p=v[1]||0,P=v[1]||0,d,m;for(let w=0;w<v.length/2;w++)d=v[w*2],m=v[w*2+1],O=Math.min(O,d),g=Math.max(g,d),p=Math.min(p,m),P=Math.max(P,m);const y=this.fontSize();return{x:O-y/2,y:p-y/2,width:g-O+y,height:P-p+y}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return If.TextPath=k,k.prototype._fillFunc=b,k.prototype._strokeFunc=_,k.prototype._fillFuncHit=b,k.prototype._strokeFuncHit=_,k.prototype.className="TextPath",k.prototype._attrsAffectingSize=["text","fontSize","data"],(0,u._registerNode)(k),i.Factory.addGetterSetter(k,"data"),i.Factory.addGetterSetter(k,"fontFamily","Arial"),i.Factory.addGetterSetter(k,"fontSize",12,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(k,"fontStyle",h),i.Factory.addGetterSetter(k,"align","left"),i.Factory.addGetterSetter(k,"letterSpacing",0,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(k,"textBaseline","middle"),i.Factory.addGetterSetter(k,"fontVariant",h),i.Factory.addGetterSetter(k,"text",c),i.Factory.addGetterSetter(k,"textDecoration",null),i.Factory.addGetterSetter(k,"kerningFunc",null),If}var Df={},sy;function p8(){if(sy)return Df;sy=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.Transformer=void 0;const e=Nn(),i=jt(),t=Hn(),n=wr(),a=m5(),l=tv(),u=Lt(),c=Bt(),h=Lt(),b="tr-konva",_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(x=>x+`.${b}`).join(" "),k="nodesRect",E=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],v={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},O="ontouchstart"in u.Konva._global;function g(x,S,A){if(x==="rotater")return A;S+=e.Util.degToRad(v[x]||0);const M=(e.Util.radToDeg(S)%360+360)%360;return e.Util._inRange(M,315+22.5,360)||e.Util._inRange(M,0,22.5)?"ns-resize":e.Util._inRange(M,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(M,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(M,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(M,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(M,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(M,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(M,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+M),"pointer")}const p=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],P=1e8;function d(x){return{x:x.x+x.width/2*Math.cos(x.rotation)+x.height/2*Math.sin(-x.rotation),y:x.y+x.height/2*Math.cos(x.rotation)+x.width/2*Math.sin(x.rotation)}}function m(x,S,A){const M=A.x+(x.x-A.x)*Math.cos(S)-(x.y-A.y)*Math.sin(S),T=A.y+(x.x-A.x)*Math.sin(S)+(x.y-A.y)*Math.cos(S);return{...x,rotation:x.rotation+S,x:M,y:T}}function y(x,S){const A=d(x);return m(x,S,A)}function w(x,S,A){let M=S;for(let T=0;T<x.length;T++){const z=u.Konva.getAngle(x[T]),U=Math.abs(z-S)%(Math.PI*2);Math.min(U,Math.PI*2-U)<A&&(M=z)}return M}let N=0;class R extends l.Group{constructor(S){super(S),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(_,this.update),this.getNode()&&this.update()}attachTo(S){return this.setNode(S),this}setNode(S){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([S])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return b+this._id}setNodes(S=[]){this._nodes&&this._nodes.length&&this.detach();const A=S.filter(T=>T.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=S=A,S.length===1&&this.useSingleNodeRotation()?this.rotation(S[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(T=>{const z=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},U=T._attrsAffectingSize.map(Q=>Q+"Change."+this._getEventNamespace()).join(" ");T.on(U,z),T.on(E.map(Q=>Q+`.${this._getEventNamespace()}`).join(" "),z),T.on(`absoluteTransformChange.${this._getEventNamespace()}`,z),this._proxyDrag(T)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(S){let A;S.on(`dragstart.${this._getEventNamespace()}`,M=>{A=S.getAbsolutePosition(),!this.isDragging()&&S!==this.findOne(".back")&&this.startDrag(M,!1)}),S.on(`dragmove.${this._getEventNamespace()}`,M=>{if(!A)return;const T=S.getAbsolutePosition(),z=T.x-A.x,U=T.y-A.y;this.nodes().forEach(Q=>{if(Q===S||Q.isDragging())return;const K=Q.getAbsolutePosition();Q.setAbsolutePosition({x:K.x+z,y:K.y+U}),Q.startDrag(M)}),A=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(S=>{S.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(k),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(k,this.__getNodeRect)}__getNodeShape(S,A=this.rotation(),M){const T=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),z=S.getAbsoluteScale(M),U=S.getAbsolutePosition(M),Q=T.x*z.x-S.offsetX()*z.x,K=T.y*z.y-S.offsetY()*z.y,J=(u.Konva.getAngle(S.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),B={x:U.x+Q*Math.cos(J)+K*Math.sin(-J),y:U.y+K*Math.cos(J)+Q*Math.sin(J),width:T.width*z.x,height:T.height*z.y,rotation:J};return m(B,-u.Konva.getAngle(A),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-P,y:-P,width:0,height:0,rotation:0};const A=[];this.nodes().map(J=>{const B=J.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),L=[{x:B.x,y:B.y},{x:B.x+B.width,y:B.y},{x:B.x+B.width,y:B.y+B.height},{x:B.x,y:B.y+B.height}],F=J.getAbsoluteTransform();L.forEach(function(H){const $=F.point(H);A.push($)})});const M=new e.Transform;M.rotate(-u.Konva.getAngle(this.rotation()));let T=1/0,z=1/0,U=-1/0,Q=-1/0;A.forEach(function(J){const B=M.point(J);T===void 0&&(T=U=B.x,z=Q=B.y),T=Math.min(T,B.x),z=Math.min(z,B.y),U=Math.max(U,B.x),Q=Math.max(Q,B.y)}),M.invert();const K=M.point({x:T,y:z});return{x:K.x,y:K.y,width:U-T,height:Q-z,rotation:u.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(),p.forEach(S=>{this._createAnchor(S)}),this._createAnchor("rotater")}_createAnchor(S){const A=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:S+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:O?10:"auto"}),M=this;A.on("mousedown touchstart",function(T){M._handleMouseDown(T)}),A.on("dragstart",T=>{A.stopDrag(),T.cancelBubble=!0}),A.on("dragend",T=>{T.cancelBubble=!0}),A.on("mouseenter",()=>{const T=u.Konva.getAngle(this.rotation()),z=this.rotateAnchorCursor(),U=g(S,T,z);A.getStage().content&&(A.getStage().content.style.cursor=U),this._cursorChange=!0}),A.on("mouseout",()=>{A.getStage().content&&(A.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(A)}_createBack(){const S=new n.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(A,M){const T=M.getParent(),z=T.padding();A.beginPath(),A.rect(-z,-z,M.width()+z*2,M.height()+z*2),A.moveTo(M.width()/2,-z),T.rotateEnabled()&&T.rotateLineVisible()&&A.lineTo(M.width()/2,-T.rotateAnchorOffset()*e.Util._sign(M.height())-z),A.fillStrokeShape(M)},hitFunc:(A,M)=>{if(!this.shouldOverdrawWholeArea())return;const T=this.padding();A.beginPath(),A.rect(-T,-T,M.width()+T*2,M.height()+T*2),A.fillStrokeShape(M)}});this.add(S),this._proxyDrag(S),S.on("dragstart",A=>{A.cancelBubble=!0}),S.on("dragmove",A=>{A.cancelBubble=!0}),S.on("dragend",A=>{A.cancelBubble=!0}),this.on("dragmove",A=>{this.update()})}_handleMouseDown(S){if(this._transforming)return;this._movingAnchorName=S.target.name().split(" ")[0];const A=this._getNodeRect(),M=A.width,T=A.height,z=Math.sqrt(Math.pow(M,2)+Math.pow(T,2));this.sin=Math.abs(T/z),this.cos=Math.abs(M/z),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const U=S.target.getAbsolutePosition(),Q=S.target.getStage().getPointerPosition();this._anchorDragOffset={x:Q.x-U.x,y:Q.y-U.y},N++,this._fire("transformstart",{evt:S.evt,target:this.getNode()}),this._nodes.forEach(K=>{K._fire("transformstart",{evt:S.evt,target:K})})}_handleMouseMove(S){let A,M,T;const z=this.findOne("."+this._movingAnchorName),U=z.getStage();U.setPointersPositions(S);const Q=U.getPointerPosition();let K={x:Q.x-this._anchorDragOffset.x,y:Q.y-this._anchorDragOffset.y};const J=z.getAbsolutePosition();this.anchorDragBoundFunc()&&(K=this.anchorDragBoundFunc()(J,K,S)),z.setAbsolutePosition(K);const B=z.getAbsolutePosition();if(J.x===B.x&&J.y===B.y)return;if(this._movingAnchorName==="rotater"){const ie=this._getNodeRect();A=z.x()-ie.width/2,M=-z.y()+ie.height/2;let ae=Math.atan2(-M,A)+Math.PI/2;ie.height<0&&(ae-=Math.PI);const de=u.Konva.getAngle(this.rotation())+ae,pe=u.Konva.getAngle(this.rotationSnapTolerance()),_e=w(this.rotationSnaps(),de,pe)-ie.rotation,Le=y(ie,_e);this._fitNodesInto(Le,S);return}const L=this.shiftBehavior();let F;L==="inverted"?F=this.keepRatio()&&!S.shiftKey:L==="none"?F=this.keepRatio():F=this.keepRatio()||S.shiftKey;var X=this.centeredScaling()||S.altKey;if(this._movingAnchorName==="top-left"){if(F){var H=X?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};T=Math.sqrt(Math.pow(H.x-z.x(),2)+Math.pow(H.y-z.y(),2));var $=this.findOne(".top-left").x()>H.x?-1:1,ee=this.findOne(".top-left").y()>H.y?-1:1;A=T*this.cos*$,M=T*this.sin*ee,this.findOne(".top-left").x(H.x-A),this.findOne(".top-left").y(H.y-M)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(z.y());else if(this._movingAnchorName==="top-right"){if(F){var H=X?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};T=Math.sqrt(Math.pow(z.x()-H.x,2)+Math.pow(H.y-z.y(),2));var $=this.findOne(".top-right").x()<H.x?-1:1,ee=this.findOne(".top-right").y()>H.y?-1:1;A=T*this.cos*$,M=T*this.sin*ee,this.findOne(".top-right").x(H.x+A),this.findOne(".top-right").y(H.y-M)}var V=z.position();this.findOne(".top-left").y(V.y),this.findOne(".bottom-right").x(V.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(z.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(z.x());else if(this._movingAnchorName==="bottom-left"){if(F){var H=X?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};T=Math.sqrt(Math.pow(H.x-z.x(),2)+Math.pow(z.y()-H.y,2));var $=H.x<z.x()?-1:1,ee=z.y()<H.y?-1:1;A=T*this.cos*$,M=T*this.sin*ee,z.x(H.x-A),z.y(H.y+M)}V=z.position(),this.findOne(".top-left").x(V.x),this.findOne(".bottom-right").y(V.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(z.y());else if(this._movingAnchorName==="bottom-right"){if(F){var H=X?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};T=Math.sqrt(Math.pow(z.x()-H.x,2)+Math.pow(z.y()-H.y,2));var $=this.findOne(".bottom-right").x()<H.x?-1:1,ee=this.findOne(".bottom-right").y()<H.y?-1:1;A=T*this.cos*$,M=T*this.sin*ee,this.findOne(".bottom-right").x(H.x+A),this.findOne(".bottom-right").y(H.y+M)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var X=this.centeredScaling()||S.altKey;if(X){const ie=this.findOne(".top-left"),ae=this.findOne(".bottom-right"),ue=ie.x(),de=ie.y(),pe=this.getWidth()-ae.x(),Oe=this.getHeight()-ae.y();ae.move({x:-ue,y:-de}),ie.move({x:pe,y:Oe})}const Y=this.findOne(".top-left").getAbsolutePosition();A=Y.x,M=Y.y;const te=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),re=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:A,y:M,width:te,height:re,rotation:u.Konva.getAngle(this.rotation())},S)}_handleMouseUp(S){this._removeEvents(S)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(S){var A;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const M=this.getNode();N--,this._fire("transformend",{evt:S,target:M}),(A=this.getLayer())===null||A===void 0||A.batchDraw(),M&&this._nodes.forEach(T=>{var z;T._fire("transformend",{evt:S,target:T}),(z=T.getLayer())===null||z===void 0||z.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(S,A){const M=this._getNodeRect(),T=1;if(e.Util._inRange(S.width,-this.padding()*2-T,T)){this.update();return}if(e.Util._inRange(S.height,-this.padding()*2-T,T)){this.update();return}const z=new e.Transform;if(z.rotate(u.Konva.getAngle(this.rotation())),this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("left")>=0){const F=z.point({x:-this.padding()*2,y:0});S.x+=F.x,S.y+=F.y,S.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y}else if(this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("right")>=0){const F=z.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.width+=this.padding()*2}if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("top")>=0){const F=z.point({x:0,y:-this.padding()*2});S.x+=F.x,S.y+=F.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.height+=this.padding()*2}else if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const F=z.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.height+=this.padding()*2}if(this.boundBoxFunc()){const F=this.boundBoxFunc()(M,S);F?S=F:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const U=1e7,Q=new e.Transform;Q.translate(M.x,M.y),Q.rotate(M.rotation),Q.scale(M.width/U,M.height/U);const K=new e.Transform,J=S.width/U,B=S.height/U;this.flipEnabled()===!1?(K.translate(S.x,S.y),K.rotate(S.rotation),K.translate(S.width<0?S.width:0,S.height<0?S.height:0),K.scale(Math.abs(J),Math.abs(B))):(K.translate(S.x,S.y),K.rotate(S.rotation),K.scale(J,B));const L=K.multiply(Q.invert());this._nodes.forEach(F=>{var H;const $=F.getParent().getAbsoluteTransform(),ee=F.getTransform().copy();ee.translate(F.offsetX(),F.offsetY());const V=new e.Transform;V.multiply($.copy().invert()).multiply(L).multiply($).multiply(ee);const X=V.decompose();F.setAttrs(X),(H=F.getLayer())===null||H===void 0||H.batchDraw()}),this.rotation(e.Util._getRotation(S.rotation)),this._nodes.forEach(F=>{this._fire("transform",{evt:A,target:F}),F._fire("transform",{evt:A,target:F})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(S,A){this.findOne(S).setAttrs(A)}update(){var S;const A=this._getNodeRect();this.rotation(e.Util._getRotation(A.rotation));const M=A.width,T=A.height,z=this.enabledAnchors(),U=this.resizeEnabled(),Q=this.padding(),K=this.anchorSize(),J=this.find("._anchor");J.forEach(L=>{L.setAttrs({width:K,height:K,offsetX:K/2,offsetY:K/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:K/2+Q,offsetY:K/2+Q,visible:U&&z.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:M/2,y:0,offsetY:K/2+Q,visible:U&&z.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:M,y:0,offsetX:K/2-Q,offsetY:K/2+Q,visible:U&&z.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:T/2,offsetX:K/2+Q,visible:U&&z.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:M,y:T/2,offsetX:K/2-Q,visible:U&&z.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:T,offsetX:K/2+Q,offsetY:K/2-Q,visible:U&&z.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:M/2,y:T,offsetY:K/2-Q,visible:U&&z.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:M,y:T,offsetX:K/2-Q,offsetY:K/2-Q,visible:U&&z.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:M/2,y:-this.rotateAnchorOffset()*e.Util._sign(T)-Q,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:M,height:T,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const B=this.anchorStyleFunc();B&&J.forEach(L=>{B(L)}),(S=this.getLayer())===null||S===void 0||S.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const S=this.findOne("."+this._movingAnchorName);S&&S.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return t.Node.prototype.toObject.call(this)}clone(S){return t.Node.prototype.clone.call(this,S)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Df.Transformer=R,R.isTransforming=()=>N>0;function D(x){return x instanceof Array||e.Util.warn("enabledAnchors value should be an array"),x instanceof Array&&x.forEach(function(S){p.indexOf(S)===-1&&e.Util.warn("Unknown anchor name: "+S+". Available names are: "+p.join(", "))}),x||[]}return R.prototype.className="Transformer",(0,h._registerNode)(R),i.Factory.addGetterSetter(R,"enabledAnchors",p,D),i.Factory.addGetterSetter(R,"flipEnabled",!0,(0,c.getBooleanValidator)()),i.Factory.addGetterSetter(R,"resizeEnabled",!0),i.Factory.addGetterSetter(R,"anchorSize",10,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"rotateEnabled",!0),i.Factory.addGetterSetter(R,"rotateLineVisible",!0),i.Factory.addGetterSetter(R,"rotationSnaps",[]),i.Factory.addGetterSetter(R,"rotateAnchorOffset",50,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(R,"rotationSnapTolerance",5,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderEnabled",!0),i.Factory.addGetterSetter(R,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(R,"anchorStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"anchorFill","white"),i.Factory.addGetterSetter(R,"anchorCornerRadius",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(R,"borderStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderDash"),i.Factory.addGetterSetter(R,"keepRatio",!0),i.Factory.addGetterSetter(R,"shiftBehavior","default"),i.Factory.addGetterSetter(R,"centeredScaling",!1),i.Factory.addGetterSetter(R,"ignoreStroke",!1),i.Factory.addGetterSetter(R,"padding",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"node"),i.Factory.addGetterSetter(R,"nodes"),i.Factory.addGetterSetter(R,"boundBoxFunc"),i.Factory.addGetterSetter(R,"anchorDragBoundFunc"),i.Factory.addGetterSetter(R,"anchorStyleFunc"),i.Factory.addGetterSetter(R,"shouldOverdrawWholeArea",!1),i.Factory.addGetterSetter(R,"useSingleNodeRotation",!0),i.Factory.backCompat(R,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),Df}var jf={},uy;function g8(){if(uy)return jf;uy=1,Object.defineProperty(jf,"__esModule",{value:!0}),jf.Wedge=void 0;const e=jt(),i=wr(),t=Lt(),n=Bt(),a=Lt();class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.radius(),0,t.Konva.getAngle(this.angle()),this.clockwise()),c.lineTo(0,0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(c){this.radius(c/2)}setHeight(c){this.radius(c/2)}}return jf.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1),e.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),jf}var Ff={},cy;function v8(){if(cy)return Ff;cy=1,Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.Blur=void 0;const e=jt(),i=Hn(),t=Bt();function n(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function u(h,b){const _=h.data,k=h.width,E=h.height;let v,O,g,p,P,d,m,y,w,N,R,D,x,S,A,M,T,z,U,Q,K,J,B,L,F=b+b+1,H=k-1,$=E-1,ee=b+1,V=ee*(ee+1)/2,X=new n,Y=null,te=X,re=null,ie=null,ae=a[b],ue=l[b];for(g=1;g<F;g++)te=te.next=new n,g===ee&&(Y=te);for(te.next=X,m=d=0,O=0;O<E;O++){for(M=T=z=U=y=w=N=R=0,D=ee*(Q=_[d]),x=ee*(K=_[d+1]),S=ee*(J=_[d+2]),A=ee*(B=_[d+3]),y+=V*Q,w+=V*K,N+=V*J,R+=V*B,te=X,g=0;g<ee;g++)te.r=Q,te.g=K,te.b=J,te.a=B,te=te.next;for(g=1;g<ee;g++)p=d+((H<g?H:g)<<2),y+=(te.r=Q=_[p])*(L=ee-g),w+=(te.g=K=_[p+1])*L,N+=(te.b=J=_[p+2])*L,R+=(te.a=B=_[p+3])*L,M+=Q,T+=K,z+=J,U+=B,te=te.next;for(re=X,ie=Y,v=0;v<k;v++)_[d+3]=B=R*ae>>ue,B!==0?(B=255/B,_[d]=(y*ae>>ue)*B,_[d+1]=(w*ae>>ue)*B,_[d+2]=(N*ae>>ue)*B):_[d]=_[d+1]=_[d+2]=0,y-=D,w-=x,N-=S,R-=A,D-=re.r,x-=re.g,S-=re.b,A-=re.a,p=m+((p=v+b+1)<H?p:H)<<2,M+=re.r=_[p],T+=re.g=_[p+1],z+=re.b=_[p+2],U+=re.a=_[p+3],y+=M,w+=T,N+=z,R+=U,re=re.next,D+=Q=ie.r,x+=K=ie.g,S+=J=ie.b,A+=B=ie.a,M-=Q,T-=K,z-=J,U-=B,ie=ie.next,d+=4;m+=k}for(v=0;v<k;v++){for(T=z=U=M=w=N=R=y=0,d=v<<2,D=ee*(Q=_[d]),x=ee*(K=_[d+1]),S=ee*(J=_[d+2]),A=ee*(B=_[d+3]),y+=V*Q,w+=V*K,N+=V*J,R+=V*B,te=X,g=0;g<ee;g++)te.r=Q,te.g=K,te.b=J,te.a=B,te=te.next;for(P=k,g=1;g<=b;g++)d=P+v<<2,y+=(te.r=Q=_[d])*(L=ee-g),w+=(te.g=K=_[d+1])*L,N+=(te.b=J=_[d+2])*L,R+=(te.a=B=_[d+3])*L,M+=Q,T+=K,z+=J,U+=B,te=te.next,g<$&&(P+=k);for(d=v,re=X,ie=Y,O=0;O<E;O++)p=d<<2,_[p+3]=B=R*ae>>ue,B>0?(B=255/B,_[p]=(y*ae>>ue)*B,_[p+1]=(w*ae>>ue)*B,_[p+2]=(N*ae>>ue)*B):_[p]=_[p+1]=_[p+2]=0,y-=D,w-=x,N-=S,R-=A,D-=re.r,x-=re.g,S-=re.b,A-=re.a,p=v+((p=O+ee)<$?p:$)*k<<2,y+=M+=re.r=_[p],w+=T+=re.g=_[p+1],N+=z+=re.b=_[p+2],R+=U+=re.a=_[p+3],re=re.next,D+=Q=ie.r,x+=K=ie.g,S+=J=ie.b,A+=B=ie.a,M-=Q,T-=K,z-=J,U-=B,ie=ie.next,d+=k}}const c=function(b){const _=Math.round(this.blurRadius());_>0&&u(b,_)};return Ff.Blur=c,e.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Ff}var zf={},fy;function m8(){if(fy)return zf;fy=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.Brighten=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){let l=this.brightness()*255,u=a.data,c=u.length,h;for(h=0;h<c;h+=4)u[h]+=l,u[h+1]+=l,u[h+2]+=l};return zf.Brighten=n,e.Factory.addGetterSetter(i.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),zf}var Bf={},dy;function y8(){if(dy)return Bf;dy=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Contrast=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){const l=Math.pow((this.contrast()+100)/100,2);let u=a.data,c=u.length,h=150,b=150,_=150,k;for(k=0;k<c;k+=4)h=u[k],b=u[k+1],_=u[k+2],h/=255,h-=.5,h*=l,h+=.5,h*=255,b/=255,b-=.5,b*=l,b+=.5,b*=255,_/=255,_-=.5,_*=l,_+=.5,_*=255,h=h<0?0:h>255?255:h,b=b<0?0:b>255?255:b,_=_<0?0:_>255?255:_,u[k]=h,u[k+1]=b,u[k+2]=_};return Bf.Contrast=n,e.Factory.addGetterSetter(i.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Bf}var Uf={},hy;function b8(){if(hy)return Uf;hy=1,Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.Emboss=void 0;const e=jt(),i=Hn(),t=Nn(),n=Bt(),a=function(l){let u=this.embossStrength()*10,c=this.embossWhiteLevel()*255,h=this.embossDirection(),b=this.embossBlend(),_=0,k=0,E=l.data,v=l.width,O=l.height,g=v*4,p=O;switch(h){case"top-left":_=-1,k=-1;break;case"top":_=-1,k=0;break;case"top-right":_=-1,k=1;break;case"right":_=0,k=1;break;case"bottom-right":_=1,k=1;break;case"bottom":_=1,k=0;break;case"bottom-left":_=1,k=-1;break;case"left":_=0,k=-1;break;default:t.Util.error("Unknown emboss direction: "+h)}do{const P=(p-1)*g;let d=_;p+d<1&&(d=0),p+d>O&&(d=0);const m=(p-1+d)*v*4;let y=v;do{const w=P+(y-1)*4;let N=k;y+N<1&&(N=0),y+N>v&&(N=0);const R=m+(y-1+N)*4,D=E[w]-E[R],x=E[w+1]-E[R+1],S=E[w+2]-E[R+2];let A=D;const M=A>0?A:-A,T=x>0?x:-x,z=S>0?S:-S;if(T>M&&(A=x),z>M&&(A=S),A*=u,b){const U=E[w]+A,Q=E[w+1]+A,K=E[w+2]+A;E[w]=U>255?255:U<0?0:U,E[w+1]=Q>255?255:Q<0?0:Q,E[w+2]=K>255?255:K<0?0:K}else{let U=c-A;U<0?U=0:U>255&&(U=255),E[w]=E[w+1]=E[w+2]=U}}while(--y)}while(--p)};return Uf.Emboss=a,e.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,e.Factory.afterSetFilter),Uf}var qf={},py;function _8(){if(py)return qf;py=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.Enhance=void 0;const e=jt(),i=Hn(),t=Bt();function n(l,u,c,h,b){let _=c-u,k=b-h,E;return _===0?h+k/2:k===0?h:(E=(l-u)/_,E=k*E+h,E)}const a=function(l){let u=l.data,c=u.length,h=u[0],b=h,_,k=u[1],E=k,v,O=u[2],g=O,p,P;const d=this.enhance();if(d===0)return;for(P=0;P<c;P+=4)_=u[P+0],_<h?h=_:_>b&&(b=_),v=u[P+1],v<k?k=v:v>E&&(E=v),p=u[P+2],p<O?O=p:p>g&&(g=p);b===h&&(b=255,h=0),E===k&&(E=255,k=0),g===O&&(g=255,O=0);let m,y,w,N,R,D,x,S,A;for(d>0?(y=b+d*(255-b),w=h-d*(h-0),R=E+d*(255-E),D=k-d*(k-0),S=g+d*(255-g),A=O-d*(O-0)):(m=(b+h)*.5,y=b+d*(b-m),w=h+d*(h-m),N=(E+k)*.5,R=E+d*(E-N),D=k+d*(k-N),x=(g+O)*.5,S=g+d*(g-x),A=O+d*(O-x)),P=0;P<c;P+=4)u[P+0]=n(u[P+0],h,b,w,y),u[P+1]=n(u[P+1],k,E,D,R),u[P+2]=n(u[P+2],O,g,A,S)};return qf.Enhance=a,e.Factory.addGetterSetter(i.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),qf}var Hf={},gy;function w8(){if(gy)return Hf;gy=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.Grayscale=void 0;const e=function(i){let t=i.data,n=t.length,a,l;for(a=0;a<n;a+=4)l=.34*t[a]+.5*t[a+1]+.16*t[a+2],t[a]=l,t[a+1]=l,t[a+2]=l};return Hf.Grayscale=e,Hf}var Gf={},vy;function S8(){if(vy)return Gf;vy=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.HSL=void 0;const e=jt(),i=Hn(),t=Bt();e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"luminance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter);const n=function(a){let l=a.data,u=l.length,c=1,h=Math.pow(2,this.saturation()),b=Math.abs(this.hue()+360)%360,_=this.luminance()*127,k;const E=c*h*Math.cos(b*Math.PI/180),v=c*h*Math.sin(b*Math.PI/180),O=.299*c+.701*E+.167*v,g=.587*c-.587*E+.33*v,p=.114*c-.114*E-.497*v,P=.299*c-.299*E-.328*v,d=.587*c+.413*E+.035*v,m=.114*c-.114*E+.293*v,y=.299*c-.3*E+1.25*v,w=.587*c-.586*E-1.05*v,N=.114*c+.886*E-.2*v;let R,D,x,S;for(k=0;k<u;k+=4)R=l[k+0],D=l[k+1],x=l[k+2],S=l[k+3],l[k+0]=O*R+g*D+p*x+_,l[k+1]=P*R+d*D+m*x+_,l[k+2]=y*R+w*D+N*x+_,l[k+3]=S};return Gf.HSL=n,Gf}var Vf={},my;function E8(){if(my)return Vf;my=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.HSV=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){const l=a.data,u=l.length,c=Math.pow(2,this.value()),h=Math.pow(2,this.saturation()),b=Math.abs(this.hue()+360)%360,_=c*h*Math.cos(b*Math.PI/180),k=c*h*Math.sin(b*Math.PI/180),E=.299*c+.701*_+.167*k,v=.587*c-.587*_+.33*k,O=.114*c-.114*_-.497*k,g=.299*c-.299*_-.328*k,p=.587*c+.413*_+.035*k,P=.114*c-.114*_+.293*k,d=.299*c-.3*_+1.25*k,m=.587*c-.586*_-1.05*k,y=.114*c+.886*_-.2*k;let w,N,R,D;for(let x=0;x<u;x+=4)w=l[x+0],N=l[x+1],R=l[x+2],D=l[x+3],l[x+0]=E*w+v*N+O*R,l[x+1]=g*w+p*N+P*R,l[x+2]=d*w+m*N+y*R,l[x+3]=D};return Vf.HSV=n,e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"value",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Vf}var $f={},yy;function O8(){if(yy)return $f;yy=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.Invert=void 0;const e=function(i){let t=i.data,n=t.length,a;for(a=0;a<n;a+=4)t[a]=255-t[a],t[a+1]=255-t[a+1],t[a+2]=255-t[a+2]};return $f.Invert=e,$f}var Wf={},by;function x8(){if(by)return Wf;by=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.Kaleidoscope=void 0;const e=jt(),i=Hn(),t=Nn(),n=Bt(),a=function(c,h,b){let _=c.data,k=h.data,E=c.width,v=c.height,O=b.polarCenterX||E/2,g=b.polarCenterY||v/2,p,P,d,m=0,y=0,w=0,N=0,R,D=Math.sqrt(O*O+g*g);P=E-O,d=v-g,R=Math.sqrt(P*P+d*d),D=R>D?R:D;let x=v,S=E,A,M,T=360/S*Math.PI/180,z,U;for(M=0;M<S;M+=1)for(z=Math.sin(M*T),U=Math.cos(M*T),A=0;A<x;A+=1)P=Math.floor(O+D*A/x*U),d=Math.floor(g+D*A/x*z),p=(d*E+P)*4,m=_[p+0],y=_[p+1],w=_[p+2],N=_[p+3],p=(M+A*E)*4,k[p+0]=m,k[p+1]=y,k[p+2]=w,k[p+3]=N},l=function(c,h,b){let _=c.data,k=h.data,E=c.width,v=c.height,O=b.polarCenterX||E/2,g=b.polarCenterY||v/2,p,P,d,m,y,w=0,N=0,R=0,D=0,x,S=Math.sqrt(O*O+g*g);P=E-O,d=v-g,x=Math.sqrt(P*P+d*d),S=x>S?x:S;let A=v,M=E,T,z,U=0,Q,K;for(P=0;P<E;P+=1)for(d=0;d<v;d+=1)m=P-O,y=d-g,T=Math.sqrt(m*m+y*y)*A/S,z=(Math.atan2(y,m)*180/Math.PI+360+U)%360,z=z*M/360,Q=Math.floor(z),K=Math.floor(T),p=(K*E+Q)*4,w=_[p+0],N=_[p+1],R=_[p+2],D=_[p+3],p=(d*E+P)*4,k[p+0]=w,k[p+1]=N,k[p+2]=R,k[p+3]=D},u=function(c){const h=c.width,b=c.height;let _,k,E,v,O,g,p,P,d,m,y=Math.round(this.kaleidoscopePower());const w=Math.round(this.kaleidoscopeAngle()),N=Math.floor(h*(w%360)/360);if(y<1)return;const R=t.Util.createCanvasElement();R.width=h,R.height=b;const D=R.getContext("2d").getImageData(0,0,h,b);t.Util.releaseCanvas(R),a(c,D,{polarCenterX:h/2,polarCenterY:b/2});let x=h/Math.pow(2,y);for(;x<=8;)x=x*2,y-=1;x=Math.ceil(x);let S=x,A=0,M=S,T=1;for(N+x>h&&(A=S,M=0,T=-1),k=0;k<b;k+=1)for(_=A;_!==M;_+=T)E=Math.round(_+N)%h,d=(h*k+E)*4,O=D.data[d+0],g=D.data[d+1],p=D.data[d+2],P=D.data[d+3],m=(h*k+_)*4,D.data[m+0]=O,D.data[m+1]=g,D.data[m+2]=p,D.data[m+3]=P;for(k=0;k<b;k+=1)for(S=Math.floor(x),v=0;v<y;v+=1){for(_=0;_<S+1;_+=1)d=(h*k+_)*4,O=D.data[d+0],g=D.data[d+1],p=D.data[d+2],P=D.data[d+3],m=(h*k+S*2-_-1)*4,D.data[m+0]=O,D.data[m+1]=g,D.data[m+2]=p,D.data[m+3]=P;S*=2}l(D,c,{polarRotation:0})};return Wf.Kaleidoscope=u,e.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Wf}var Yf={},_y;function P8(){if(_y)return Yf;_y=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.Mask=void 0;const e=jt(),i=Hn(),t=Bt();function n(E,v,O){let g=(O*E.width+v)*4;const p=[];return p.push(E.data[g++],E.data[g++],E.data[g++],E.data[g++]),p}function a(E,v){return Math.sqrt(Math.pow(E[0]-v[0],2)+Math.pow(E[1]-v[1],2)+Math.pow(E[2]-v[2],2))}function l(E){const v=[0,0,0];for(let O=0;O<E.length;O++)v[0]+=E[O][0],v[1]+=E[O][1],v[2]+=E[O][2];return v[0]/=E.length,v[1]/=E.length,v[2]/=E.length,v}function u(E,v){const O=n(E,0,0),g=n(E,E.width-1,0),p=n(E,0,E.height-1),P=n(E,E.width-1,E.height-1),d=v||10;if(a(O,g)<d&&a(g,P)<d&&a(P,p)<d&&a(p,O)<d){const m=l([g,O,P,p]),y=[];for(let w=0;w<E.width*E.height;w++){const N=a(m,[E.data[w*4],E.data[w*4+1],E.data[w*4+2]]);y[w]=N<d?0:255}return y}}function c(E,v){for(let O=0;O<E.width*E.height;O++)E.data[4*O+3]=v[O]}function h(E,v,O){const g=[1,1,1,1,0,1,1,1,1],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<O;m++)for(let y=0;y<v;y++){const w=m*v+y;let N=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const x=m+R-P,S=y+D-P;if(x>=0&&x<O&&S>=0&&S<v){const A=x*v+S,M=g[R*p+D];N+=E[A]*M}}d[w]=N===255*8?255:0}return d}function b(E,v,O){const g=[1,1,1,1,1,1,1,1,1],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<O;m++)for(let y=0;y<v;y++){const w=m*v+y;let N=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const x=m+R-P,S=y+D-P;if(x>=0&&x<O&&S>=0&&S<v){const A=x*v+S,M=g[R*p+D];N+=E[A]*M}}d[w]=N>=255*4?255:0}return d}function _(E,v,O){const g=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<O;m++)for(let y=0;y<v;y++){const w=m*v+y;let N=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const x=m+R-P,S=y+D-P;if(x>=0&&x<O&&S>=0&&S<v){const A=x*v+S,M=g[R*p+D];N+=E[A]*M}}d[w]=N}return d}const k=function(E){let v=this.threshold(),O=u(E,v);return O&&(O=h(O,E.width,E.height),O=b(O,E.width,E.height),O=_(O,E.width,E.height),c(E,O)),E};return Yf.Mask=k,e.Factory.addGetterSetter(i.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Yf}var Kf={},wy;function C8(){if(wy)return Kf;wy=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.Noise=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){const l=this.noise()*255,u=a.data,c=u.length,h=l/2;for(let b=0;b<c;b+=4)u[b+0]+=h-2*h*Math.random(),u[b+1]+=h-2*h*Math.random(),u[b+2]+=h-2*h*Math.random()};return Kf.Noise=n,e.Factory.addGetterSetter(i.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Kf}var Xf={},Sy;function k8(){if(Sy)return Xf;Sy=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.Pixelate=void 0;const e=jt(),i=Nn(),t=Hn(),n=Bt(),a=function(l){let u=Math.ceil(this.pixelSize()),c=l.width,h=l.height,b,_,k,E,v,O,g,p=Math.ceil(c/u),P=Math.ceil(h/u),d,m,y,w,N,R,D,x=l.data;if(u<=0){i.Util.error("pixelSize value can not be <= 0");return}for(N=0;N<p;N+=1)for(R=0;R<P;R+=1){for(E=0,v=0,O=0,g=0,d=N*u,m=d+u,y=R*u,w=y+u,D=0,b=d;b<m;b+=1)if(!(b>=c))for(_=y;_<w;_+=1)_>=h||(k=(c*_+b)*4,E+=x[k+0],v+=x[k+1],O+=x[k+2],g+=x[k+3],D+=1);for(E=E/D,v=v/D,O=O/D,g=g/D,b=d;b<m;b+=1)if(!(b>=c))for(_=y;_<w;_+=1)_>=h||(k=(c*_+b)*4,x[k+0]=E,x[k+1]=v,x[k+2]=O,x[k+3]=g)}};return Xf.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Xf}var Zf={},Ey;function T8(){if(Ey)return Zf;Ey=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.Posterize=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){let l=Math.round(this.levels()*254)+1,u=a.data,c=u.length,h=255/l,b;for(b=0;b<c;b+=1)u[b]=Math.floor(u[b]/h)*h};return Zf.Posterize=n,e.Factory.addGetterSetter(i.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Zf}var Qf={},Oy;function A8(){if(Oy)return Qf;Oy=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.RGB=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){let l=a.data,u=l.length,c=this.red(),h=this.green(),b=this.blue(),_,k;for(_=0;_<u;_+=4)k=(.34*l[_]+.5*l[_+1]+.16*l[_+2])/255,l[_]=k*c,l[_+1]=k*h,l[_+2]=k*b,l[_+3]=l[_+3]};return Qf.RGB=n,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),Qf}var Jf={},xy;function R8(){if(xy)return Jf;xy=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.RGBA=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){const l=a.data,u=l.length,c=this.red(),h=this.green(),b=this.blue(),_=this.alpha();for(let k=0;k<u;k+=4){const E=1-_;l[k]=c*_+l[k]*E,l[k+1]=h*_+l[k+1]*E,l[k+2]=b*_+l[k+2]*E}};return Jf.RGBA=n,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"alpha",1,function(a){return this._filterUpToDate=!1,a>1?1:a<0?0:a}),Jf}var ed={},Py;function M8(){if(Py)return ed;Py=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.Sepia=void 0;const e=function(i){let t=i.data,n=t.length,a,l,u,c;for(a=0;a<n;a+=4)l=t[a+0],u=t[a+1],c=t[a+2],t[a+0]=Math.min(255,l*.393+u*.769+c*.189),t[a+1]=Math.min(255,l*.349+u*.686+c*.168),t[a+2]=Math.min(255,l*.272+u*.534+c*.131)};return ed.Sepia=e,ed}var td={},Cy;function L8(){if(Cy)return td;Cy=1,Object.defineProperty(td,"__esModule",{value:!0}),td.Solarize=void 0;const e=function(i){const t=i.data,n=i.width,a=i.height,l=n*4;let u=a;do{const c=(u-1)*l;let h=n;do{const b=c+(h-1)*4;let _=t[b],k=t[b+1],E=t[b+2];_>127&&(_=255-_),k>127&&(k=255-k),E>127&&(E=255-E),t[b]=_,t[b+1]=k,t[b+2]=E}while(--h)}while(--u)};return td.Solarize=e,td}var nd={},ky;function N8(){if(ky)return nd;ky=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Threshold=void 0;const e=jt(),i=Hn(),t=Bt(),n=function(a){const l=this.threshold()*255,u=a.data,c=u.length;for(let h=0;h<c;h+=1)u[h]=u[h]<l?0:255};return nd.Threshold=n,e.Factory.addGetterSetter(i.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),nd}var Ty;function I8(){if(Ty)return vf;Ty=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.Konva=void 0;const e=kg(),i=n8(),t=i8(),n=o8(),a=a8(),l=l8(),u=s8(),c=v5(),h=rv(),b=m5(),_=u8(),k=c8(),E=f8(),v=d8(),O=y5(),g=h8(),p=p8(),P=g8(),d=v8(),m=m8(),y=y8(),w=b8(),N=_8(),R=w8(),D=S8(),x=E8(),S=O8(),A=x8(),M=P8(),T=C8(),z=k8(),U=T8(),Q=A8(),K=R8(),J=M8(),B=L8(),L=N8();return vf.Konva=e.Konva.Util._assign(e.Konva,{Arc:i.Arc,Arrow:t.Arrow,Circle:n.Circle,Ellipse:a.Ellipse,Image:l.Image,Label:u.Label,Tag:u.Tag,Line:c.Line,Path:h.Path,Rect:b.Rect,RegularPolygon:_.RegularPolygon,Ring:k.Ring,Sprite:E.Sprite,Star:v.Star,Text:O.Text,TextPath:g.TextPath,Transformer:p.Transformer,Wedge:P.Wedge,Filters:{Blur:d.Blur,Brighten:m.Brighten,Contrast:y.Contrast,Emboss:w.Emboss,Enhance:N.Enhance,Grayscale:R.Grayscale,HSL:D.HSL,HSV:x.HSV,Invert:S.Invert,Kaleidoscope:A.Kaleidoscope,Mask:M.Mask,Noise:T.Noise,Pixelate:z.Pixelate,Posterize:U.Posterize,RGB:Q.RGB,RGBA:K.RGBA,Sepia:J.Sepia,Solarize:B.Solarize,Threshold:L.Threshold}}),vf}var D8=ip.exports,Ay;function Ji(){if(Ay)return ip.exports;Ay=1,Object.defineProperty(D8,"__esModule",{value:!0});const e=I8();return ip.exports=e.Konva,ip.exports}Ji();var Qh={exports:{}},Ry;function j8(){return Ry||(Ry=1,function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Konva=void 0;var t=kg();Object.defineProperty(i,"Konva",{enumerable:!0,get:function(){return t.Konva}});const n=kg();e.exports=n.Konva}(Qh,Qh.exports)),Qh.exports}var F8=j8();const xd=Ad(F8);var H0={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 G0,My;function z8(){return My||(My=1,G0=function(i){var t={},n=Tn(),a=Mg(),l=Object.assign;function u(s){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+s,I=1;I<arguments.length;I++)f+="&args[]="+encodeURIComponent(arguments[I]);return"Minified React error #"+s+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,h=Symbol.for("react.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),O=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),w=Symbol.iterator;function N(s){return s===null||typeof s!="object"?null:(s=w&&s[w]||s["@@iterator"],typeof s=="function"?s:null)}function R(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 _:return"Fragment";case b:return"Portal";case E:return"Profiler";case k:return"StrictMode";case p:return"Suspense";case P:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case O:return(s.displayName||"Context")+".Consumer";case v:return(s._context.displayName||"Context")+".Provider";case g:var f=s.render;return s=s.displayName,s||(s=f.displayName||f.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case d:return f=s.displayName||null,f!==null?f:R(s.type)||"Memo";case m:f=s._payload,s=s._init;try{return R(s(f))}catch{}}return null}function D(s){var f=s.type;switch(s.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=f.render,s=s.displayName||s.name||"",f.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(f);case 8:return f===k?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function x(s){var f=s,I=s;if(s.alternate)for(;f.return;)f=f.return;else{s=f;do f=s,f.flags&4098&&(I=f.return),s=f.return;while(s)}return f.tag===3?I:null}function S(s){if(x(s)!==s)throw Error(u(188))}function A(s){var f=s.alternate;if(!f){if(f=x(s),f===null)throw Error(u(188));return f!==s?null:s}for(var I=s,q=f;;){var W=I.return;if(W===null)break;var ne=W.alternate;if(ne===null){if(q=W.return,q!==null){I=q;continue}break}if(W.child===ne.child){for(ne=W.child;ne;){if(ne===I)return S(W),s;if(ne===q)return S(W),f;ne=ne.sibling}throw Error(u(188))}if(I.return!==q.return)I=W,q=ne;else{for(var le=!1,ye=W.child;ye;){if(ye===I){le=!0,I=W,q=ne;break}if(ye===q){le=!0,q=W,I=ne;break}ye=ye.sibling}if(!le){for(ye=ne.child;ye;){if(ye===I){le=!0,I=ne,q=W;break}if(ye===q){le=!0,q=ne,I=W;break}ye=ye.sibling}if(!le)throw Error(u(189))}}if(I.alternate!==q)throw Error(u(190))}if(I.tag!==3)throw Error(u(188));return I.stateNode.current===I?s:f}function M(s){return s=A(s),s!==null?T(s):null}function T(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var f=T(s);if(f!==null)return f;s=s.sibling}return null}function z(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){if(s.tag!==4){var f=z(s);if(f!==null)return f}s=s.sibling}return null}var U=Array.isArray,Q=i.getPublicInstance,K=i.getRootHostContext,J=i.getChildHostContext,B=i.prepareForCommit,L=i.resetAfterCommit,F=i.createInstance,H=i.appendInitialChild,$=i.finalizeInitialChildren,ee=i.prepareUpdate,V=i.shouldSetTextContent,X=i.createTextInstance,Y=i.scheduleTimeout,te=i.cancelTimeout,re=i.noTimeout,ie=i.isPrimaryRenderer,ae=i.supportsMutation,ue=i.supportsPersistence,de=i.supportsHydration,pe=i.getInstanceFromNode,Oe=i.preparePortalMount,_e=i.getCurrentEventPriority,Le=i.detachDeletedInstance,fe=i.supportsMicrotasks,ge=i.scheduleMicrotask,Ce=i.supportsTestSelectors,Ae=i.findFiberRoot,se=i.getBoundingRect,me=i.getTextContent,xe=i.isHiddenSubtree,Ne=i.matchAccessibilityRole,ct=i.setFocusIfFocusable,at=i.setupIntersectionObserver,De=i.appendChild,Fe=i.appendChildToContainer,He=i.commitTextUpdate,Xe=i.commitMount,ft=i.commitUpdate,At=i.insertBefore,xt=i.insertInContainerBefore,be=i.removeChild,Se=i.removeChildFromContainer,vt=i.resetTextContent,Pt=i.hideInstance,Ie=i.hideTextInstance,Ge=i.unhideInstance,rt=i.unhideTextInstance,je=i.clearContainer,mt=i.cloneInstance,ze=i.createContainerChildSet,pt=i.appendChildToContainerChildSet,_n=i.finalizeContainerChildren,Be=i.replaceContainerChildren,lt=i.cloneHiddenInstance,_t=i.cloneHiddenTextInstance,Ut=i.canHydrateInstance,Ht=i.canHydrateTextInstance,hn=i.canHydrateSuspenseInstance,In=i.isSuspenseInstancePending,wn=i.isSuspenseInstanceFallback,Qn=i.getSuspenseInstanceFallbackErrorDetails,ii=i.registerSuspenseInstanceRetry,Sr=i.getNextHydratableSibling,Ze=i.getFirstHydratableChild,St=i.getFirstHydratableChildWithinContainer,Mt=i.getFirstHydratableChildWithinSuspenseInstance,Vt=i.hydrateInstance,$t=i.hydrateTextInstance,Jn=i.hydrateSuspenseInstance,Gn=i.getNextHydratableInstanceAfterSuspenseInstance,Sn=i.commitHydratedContainer,oi=i.commitHydratedSuspenseInstance,Ir=i.clearSuspenseBoundary,Ii=i.clearSuspenseBoundaryFromContainer,No=i.shouldDeleteUnhydratedTailInstances,rs=i.didNotMatchHydratedContainerTextInstance,Jt=i.didNotMatchHydratedTextInstance,to;function Dr(s){if(to===void 0)try{throw Error()}catch(I){var f=I.stack.trim().match(/\n( *(at )?)/);to=f&&f[1]||""}return`
|
|
52
|
-
`+to+s}var ha=!1;function no(s,f){if(!s||ha)return"";ha=!0;var I=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch($e){var q=$e}Reflect.construct(s,[],f)}else{try{f.call()}catch($e){q=$e}s.call(f.prototype)}else{try{throw Error()}catch($e){q=$e}s()}}catch($e){if($e&&q&&typeof $e.stack=="string"){for(var W=$e.stack.split(`
|
|
53
|
-
`),ne=q.stack.split(`
|
|
54
|
-
`),le=W.length-1,ye=ne.length-1;1<=le&&0<=ye&&W[le]!==ne[ye];)ye--;for(;1<=le&&0<=ye;le--,ye--)if(W[le]!==ne[ye]){if(le!==1||ye!==1)do if(le--,ye--,0>ye||W[le]!==ne[ye]){var Re=`
|
|
55
|
-
`+W[le].replace(" at new "," at ");return s.displayName&&Re.includes("<anonymous>")&&(Re=Re.replace("<anonymous>",s.displayName)),Re}while(1<=le&&0<=ye);break}}}finally{ha=!1,Error.prepareStackTrace=I}return(s=s?s.displayName||s.name:"")?Dr(s):""}var Gp=Object.prototype.hasOwnProperty,Qs=[],ro=-1;function er(s){return{current:s}}function un(s){0>ro||(s.current=Qs[ro],Qs[ro]=null,ro--)}function Nt(s,f){ro++,Qs[ro]=s.current,s.current=f}var Io={},fr=er(Io),jr=er(!1),Di=Io;function io(s,f){var I=s.type.contextTypes;if(!I)return Io;var q=s.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===f)return q.__reactInternalMemoizedMaskedChildContext;var W={},ne;for(ne in I)W[ne]=f[ne];return q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=f,s.__reactInternalMemoizedMaskedChildContext=W),W}function Vn(s){return s=s.childContextTypes,s!=null}function pa(){un(jr),un(fr)}function Vd(s,f,I){if(fr.current!==Io)throw Error(u(168));Nt(fr,f),Nt(jr,I)}function $d(s,f,I){var q=s.stateNode;if(f=f.childContextTypes,typeof q.getChildContext!="function")return I;q=q.getChildContext();for(var W in q)if(!(W in f))throw Error(u(108,D(s)||"Unknown",W));return l({},I,q)}function tl(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Io,Di=fr.current,Nt(fr,s),Nt(jr,jr.current),!0}function Ec(s,f,I){var q=s.stateNode;if(!q)throw Error(u(169));I?(s=$d(s,f,Di),q.__reactInternalMemoizedMergedChildContext=s,un(jr),un(fr),Nt(fr,s)):un(jr),Nt(jr,I)}var Gr=Math.clz32?Math.clz32:Oc,is=Math.log,Vp=Math.LN2;function Oc(s){return s>>>=0,s===0?32:31-(is(s)/Vp|0)|0}var Gt=64,os=4194304;function nl(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 rl(s,f){var I=s.pendingLanes;if(I===0)return 0;var q=0,W=s.suspendedLanes,ne=s.pingedLanes,le=I&268435455;if(le!==0){var ye=le&~W;ye!==0?q=nl(ye):(ne&=le,ne!==0&&(q=nl(ne)))}else le=I&~W,le!==0?q=nl(le):ne!==0&&(q=nl(ne));if(q===0)return 0;if(f!==0&&f!==q&&!(f&W)&&(W=q&-q,ne=f&-f,W>=ne||W===16&&(ne&4194240)!==0))return f;if(q&4&&(q|=I&16),f=s.entangledLanes,f!==0)for(s=s.entanglements,f&=q;0<f;)I=31-Gr(f),W=1<<I,q|=s[I],f&=~W;return q}function Wd(s,f){switch(s){case 1:case 2:case 4:return f+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 f+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 Yd(s,f){for(var I=s.suspendedLanes,q=s.pingedLanes,W=s.expirationTimes,ne=s.pendingLanes;0<ne;){var le=31-Gr(ne),ye=1<<le,Re=W[le];Re===-1?(!(ye&I)||ye&q)&&(W[le]=Wd(ye,f)):Re<=f&&(s.expiredLanes|=ye),ne&=~ye}}function Js(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function eu(){var s=Gt;return Gt<<=1,!(Gt&4194240)&&(Gt=64),s}function il(s){for(var f=[],I=0;31>I;I++)f.push(s);return f}function ai(s,f,I){s.pendingLanes|=f,f!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,f=31-Gr(f),s[f]=I}function Do(s,f){var I=s.pendingLanes&~f;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=f,s.mutableReadLanes&=f,s.entangledLanes&=f,f=s.entanglements;var q=s.eventTimes;for(s=s.expirationTimes;0<I;){var W=31-Gr(I),ne=1<<W;f[W]=0,q[W]=-1,s[W]=-1,I&=~ne}}function ji(s,f){var I=s.entangledLanes|=f;for(s=s.entanglements;I;){var q=31-Gr(I),W=1<<q;W&f|s[q]&f&&(s[q]|=f),I&=~W}}var It=0;function ol(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Fi=a.unstable_scheduleCallback,Kd=a.unstable_cancelCallback,Xd=a.unstable_shouldYield,as=a.unstable_requestPaint,$n=a.unstable_now,tu=a.unstable_ImmediatePriority,nu=a.unstable_UserBlockingPriority,ru=a.unstable_NormalPriority,$p=a.unstable_IdlePriority,jo=null,Fr=null;function al(s){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(jo,s,void 0,(s.current.flags&128)===128)}catch{}}function iu(s,f){return s===f&&(s!==0||1/s===1/f)||s!==s&&f!==f}var wi=typeof Object.is=="function"?Object.is:iu,oo=null,ll=!1,sl=!1;function ou(s){oo===null?oo=[s]:oo.push(s)}function Zd(s){ll=!0,ou(s)}function tr(){if(!sl&&oo!==null){sl=!0;var s=0,f=It;try{var I=oo;for(It=1;s<I.length;s++){var q=I[s];do q=q(!0);while(q!==null)}oo=null,ll=!1}catch(W){throw oo!==null&&(oo=oo.slice(s+1)),Fi(tu,tr),W}finally{It=f,sl=!1}}return null}var Fo=[],ao=0,ls=null,ga=0,Er=[],Vr=0,Dn=null,zr=1,Si="";function Ei(s,f){Fo[ao++]=ga,Fo[ao++]=ls,ls=s,ga=f}function Qd(s,f,I){Er[Vr++]=zr,Er[Vr++]=Si,Er[Vr++]=Dn,Dn=s;var q=zr;s=Si;var W=32-Gr(q)-1;q&=~(1<<W),I+=1;var ne=32-Gr(f)+W;if(30<ne){var le=W-W%5;ne=(q&(1<<le)-1).toString(32),q>>=le,W-=le,zr=1<<32-Gr(f)+W|I<<W|q,Si=ne+s}else zr=1<<ne|I<<W|q,Si=s}function ss(s){s.return!==null&&(Ei(s,1),Qd(s,1,0))}function us(s){for(;s===ls;)ls=Fo[--ao],Fo[ao]=null,ga=Fo[--ao],Fo[ao]=null;for(;s===Dn;)Dn=Er[--Vr],Er[Vr]=null,Si=Er[--Vr],Er[Vr]=null,zr=Er[--Vr],Er[Vr]=null}var nr=null,Or=null,cn=!1,cs=!1,Oi=null;function Jd(s,f){var I=ti(5,null,null,0);I.elementType="DELETED",I.stateNode=f,I.return=s,f=s.deletions,f===null?(s.deletions=[I],s.flags|=16):f.push(I)}function au(s,f){switch(s.tag){case 5:return f=Ut(f,s.type,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=Ze(f),!0):!1;case 6:return f=Ht(f,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=null,!0):!1;case 13:if(f=hn(f),f!==null){var I=Dn!==null?{id:zr,overflow:Si}:null;return s.memoizedState={dehydrated:f,treeContext:I,retryLane:1073741824},I=ti(18,null,null,0),I.stateNode=f,I.return=s,s.child=I,nr=s,Or=null,!0}return!1;default:return!1}}function xc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Pc(s){if(cn){var f=Or;if(f){var I=f;if(!au(s,f)){if(xc(s))throw Error(u(418));f=Sr(I);var q=nr;f&&au(s,f)?Jd(q,I):(s.flags=s.flags&-4097|2,cn=!1,nr=s)}}else{if(xc(s))throw Error(u(418));s.flags=s.flags&-4097|2,cn=!1,nr=s}}}function eh(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;nr=s}function lu(s){if(!de||s!==nr)return!1;if(!cn)return eh(s),cn=!0,!1;if(s.tag!==3&&(s.tag!==5||No(s.type)&&!V(s.type,s.memoizedProps))){var f=Or;if(f){if(xc(s))throw th(),Error(u(418));for(;f;)Jd(s,f),f=Sr(f)}}if(eh(s),s.tag===13){if(!de)throw Error(u(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));Or=Gn(s)}else Or=nr?Sr(s.stateNode):null;return!0}function th(){for(var s=Or;s;)s=Sr(s)}function va(){de&&(Or=nr=null,cs=cn=!1)}function Cc(s){Oi===null?Oi=[s]:Oi.push(s)}var Wp=c.ReactCurrentBatchConfig;function su(s,f){if(wi(s,f))return!0;if(typeof s!="object"||s===null||typeof f!="object"||f===null)return!1;var I=Object.keys(s),q=Object.keys(f);if(I.length!==q.length)return!1;for(q=0;q<I.length;q++){var W=I[q];if(!Gp.call(f,W)||!wi(s[W],f[W]))return!1}return!0}function Yp(s){switch(s.tag){case 5:return Dr(s.type);case 16:return Dr("Lazy");case 13:return Dr("Suspense");case 19:return Dr("SuspenseList");case 0:case 2:case 15:return s=no(s.type,!1),s;case 11:return s=no(s.type.render,!1),s;case 1:return s=no(s.type,!0),s;default:return""}}function ma(s,f,I){if(s=I.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(I._owner){if(I=I._owner,I){if(I.tag!==1)throw Error(u(309));var q=I.stateNode}if(!q)throw Error(u(147,s));var W=q,ne=""+s;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===ne?f.ref:(f=function(le){var ye=W.refs;le===null?delete ye[ne]:ye[ne]=le},f._stringRef=ne,f)}if(typeof s!="string")throw Error(u(284));if(!I._owner)throw Error(u(290,s))}return s}function uu(s,f){throw s=Object.prototype.toString.call(f),Error(u(31,s==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":s))}function nh(s){var f=s._init;return f(s._payload)}function rh(s){function f(ke,we){if(s){var Me=ke.deletions;Me===null?(ke.deletions=[we],ke.flags|=16):Me.push(we)}}function I(ke,we){if(!s)return null;for(;we!==null;)f(ke,we),we=we.sibling;return null}function q(ke,we){for(ke=new Map;we!==null;)we.key!==null?ke.set(we.key,we):ke.set(we.index,we),we=we.sibling;return ke}function W(ke,we){return ke=na(ke,we),ke.index=0,ke.sibling=null,ke}function ne(ke,we,Me){return ke.index=Me,s?(Me=ke.alternate,Me!==null?(Me=Me.index,Me<we?(ke.flags|=2,we):Me):(ke.flags|=2,we)):(ke.flags|=1048576,we)}function le(ke){return s&&ke.alternate===null&&(ke.flags|=2),ke}function ye(ke,we,Me,Je){return we===null||we.tag!==6?(we=Ll(Me,ke.mode,Je),we.return=ke,we):(we=W(we,Me),we.return=ke,we)}function Re(ke,we,Me,Je){var gt=Me.type;return gt===_?nt(ke,we,Me.props.children,Je,Me.key):we!==null&&(we.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===m&&nh(gt)===we.type)?(Je=W(we,Me.props),Je.ref=ma(ke,we,Me),Je.return=ke,Je):(Je=Uu(Me.type,Me.key,Me.props,null,ke.mode,Je),Je.ref=ma(ke,we,Me),Je.return=ke,Je)}function $e(ke,we,Me,Je){return we===null||we.tag!==4||we.stateNode.containerInfo!==Me.containerInfo||we.stateNode.implementation!==Me.implementation?(we=qu(Me,ke.mode,Je),we.return=ke,we):(we=W(we,Me.children||[]),we.return=ke,we)}function nt(ke,we,Me,Je,gt){return we===null||we.tag!==7?(we=or(Me,ke.mode,Je,gt),we.return=ke,we):(we=W(we,Me),we.return=ke,we)}function Et(ke,we,Me){if(typeof we=="string"&&we!==""||typeof we=="number")return we=Ll(""+we,ke.mode,Me),we.return=ke,we;if(typeof we=="object"&&we!==null){switch(we.$$typeof){case h:return Me=Uu(we.type,we.key,we.props,null,ke.mode,Me),Me.ref=ma(ke,null,we),Me.return=ke,Me;case b:return we=qu(we,ke.mode,Me),we.return=ke,we;case m:var Je=we._init;return Et(ke,Je(we._payload),Me)}if(U(we)||N(we))return we=or(we,ke.mode,Me,null),we.return=ke,we;uu(ke,we)}return null}function Qe(ke,we,Me,Je){var gt=we!==null?we.key:null;if(typeof Me=="string"&&Me!==""||typeof Me=="number")return gt!==null?null:ye(ke,we,""+Me,Je);if(typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case h:return Me.key===gt?Re(ke,we,Me,Je):null;case b:return Me.key===gt?$e(ke,we,Me,Je):null;case m:return gt=Me._init,Qe(ke,we,gt(Me._payload),Je)}if(U(Me)||N(Me))return gt!==null?null:nt(ke,we,Me,Je,null);uu(ke,Me)}return null}function ln(ke,we,Me,Je,gt){if(typeof Je=="string"&&Je!==""||typeof Je=="number")return ke=ke.get(Me)||null,ye(we,ke,""+Je,gt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case h:return ke=ke.get(Je.key===null?Me:Je.key)||null,Re(we,ke,Je,gt);case b:return ke=ke.get(Je.key===null?Me:Je.key)||null,$e(we,ke,Je,gt);case m:var Rt=Je._init;return ln(ke,we,Me,Rt(Je._payload),gt)}if(U(Je)||N(Je))return ke=ke.get(Me)||null,nt(we,ke,Je,gt,null);uu(we,Je)}return null}function Zt(ke,we,Me,Je){for(var gt=null,Rt=null,Ot=we,qt=we=0,Un=null;Ot!==null&&qt<Me.length;qt++){Ot.index>qt?(Un=Ot,Ot=null):Un=Ot.sibling;var Ft=Qe(ke,Ot,Me[qt],Je);if(Ft===null){Ot===null&&(Ot=Un);break}s&&Ot&&Ft.alternate===null&&f(ke,Ot),we=ne(Ft,we,qt),Rt===null?gt=Ft:Rt.sibling=Ft,Rt=Ft,Ot=Un}if(qt===Me.length)return I(ke,Ot),cn&&Ei(ke,qt),gt;if(Ot===null){for(;qt<Me.length;qt++)Ot=Et(ke,Me[qt],Je),Ot!==null&&(we=ne(Ot,we,qt),Rt===null?gt=Ot:Rt.sibling=Ot,Rt=Ot);return cn&&Ei(ke,qt),gt}for(Ot=q(ke,Ot);qt<Me.length;qt++)Un=ln(Ot,ke,qt,Me[qt],Je),Un!==null&&(s&&Un.alternate!==null&&Ot.delete(Un.key===null?qt:Un.key),we=ne(Un,we,qt),Rt===null?gt=Un:Rt.sibling=Un,Rt=Un);return s&&Ot.forEach(function(mr){return f(ke,mr)}),cn&&Ei(ke,qt),gt}function Ar(ke,we,Me,Je){var gt=N(Me);if(typeof gt!="function")throw Error(u(150));if(Me=gt.call(Me),Me==null)throw Error(u(151));for(var Rt=gt=null,Ot=we,qt=we=0,Un=null,Ft=Me.next();Ot!==null&&!Ft.done;qt++,Ft=Me.next()){Ot.index>qt?(Un=Ot,Ot=null):Un=Ot.sibling;var mr=Qe(ke,Ot,Ft.value,Je);if(mr===null){Ot===null&&(Ot=Un);break}s&&Ot&&mr.alternate===null&&f(ke,Ot),we=ne(mr,we,qt),Rt===null?gt=mr:Rt.sibling=mr,Rt=mr,Ot=Un}if(Ft.done)return I(ke,Ot),cn&&Ei(ke,qt),gt;if(Ot===null){for(;!Ft.done;qt++,Ft=Me.next())Ft=Et(ke,Ft.value,Je),Ft!==null&&(we=ne(Ft,we,qt),Rt===null?gt=Ft:Rt.sibling=Ft,Rt=Ft);return cn&&Ei(ke,qt),gt}for(Ot=q(ke,Ot);!Ft.done;qt++,Ft=Me.next())Ft=ln(Ot,ke,qt,Ft.value,Je),Ft!==null&&(s&&Ft.alternate!==null&&Ot.delete(Ft.key===null?qt:Ft.key),we=ne(Ft,we,qt),Rt===null?gt=Ft:Rt.sibling=Ft,Rt=Ft);return s&&Ot.forEach(function(Jp){return f(ke,Jp)}),cn&&Ei(ke,qt),gt}function Wi(ke,we,Me,Je){if(typeof Me=="object"&&Me!==null&&Me.type===_&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case h:e:{for(var gt=Me.key,Rt=we;Rt!==null;){if(Rt.key===gt){if(gt=Me.type,gt===_){if(Rt.tag===7){I(ke,Rt.sibling),we=W(Rt,Me.props.children),we.return=ke,ke=we;break e}}else if(Rt.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===m&&nh(gt)===Rt.type){I(ke,Rt.sibling),we=W(Rt,Me.props),we.ref=ma(ke,Rt,Me),we.return=ke,ke=we;break e}I(ke,Rt);break}else f(ke,Rt);Rt=Rt.sibling}Me.type===_?(we=or(Me.props.children,ke.mode,Je,Me.key),we.return=ke,ke=we):(Je=Uu(Me.type,Me.key,Me.props,null,ke.mode,Je),Je.ref=ma(ke,we,Me),Je.return=ke,ke=Je)}return le(ke);case b:e:{for(Rt=Me.key;we!==null;){if(we.key===Rt)if(we.tag===4&&we.stateNode.containerInfo===Me.containerInfo&&we.stateNode.implementation===Me.implementation){I(ke,we.sibling),we=W(we,Me.children||[]),we.return=ke,ke=we;break e}else{I(ke,we);break}else f(ke,we);we=we.sibling}we=qu(Me,ke.mode,Je),we.return=ke,ke=we}return le(ke);case m:return Rt=Me._init,Wi(ke,we,Rt(Me._payload),Je)}if(U(Me))return Zt(ke,we,Me,Je);if(N(Me))return Ar(ke,we,Me,Je);uu(ke,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,we!==null&&we.tag===6?(I(ke,we.sibling),we=W(we,Me),we.return=ke,ke=we):(I(ke,we),we=Ll(Me,ke.mode,Je),we.return=ke,ke=we),le(ke)):I(ke,we)}return Wi}var ya=rh(!0),ih=rh(!1),cu=er(null),fu=null,ul=null,kc=null;function Tc(){kc=ul=fu=null}function oh(s,f,I){ie?(Nt(cu,f._currentValue),f._currentValue=I):(Nt(cu,f._currentValue2),f._currentValue2=I)}function fs(s){var f=cu.current;un(cu),ie?s._currentValue=f:s._currentValue2=f}function ba(s,f,I){for(;s!==null;){var q=s.alternate;if((s.childLanes&f)!==f?(s.childLanes|=f,q!==null&&(q.childLanes|=f)):q!==null&&(q.childLanes&f)!==f&&(q.childLanes|=f),s===I)break;s=s.return}}function cl(s,f){fu=s,kc=ul=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&f&&(Fn=!0),s.firstContext=null)}function $r(s){var f=ie?s._currentValue:s._currentValue2;if(kc!==s)if(s={context:s,memoizedValue:f,next:null},ul===null){if(fu===null)throw Error(u(308));ul=s,fu.dependencies={lanes:0,firstContext:s}}else ul=ul.next=s;return f}var zo=null;function du(s){zo===null?zo=[s]:zo.push(s)}function Ac(s,f,I,q){var W=f.interleaved;return W===null?(I.next=I,du(f)):(I.next=W.next,W.next=I),f.interleaved=I,xi(s,q)}function xi(s,f){s.lanes|=f;var I=s.alternate;for(I!==null&&(I.lanes|=f),I=s,s=s.return;s!==null;)s.childLanes|=f,I=s.alternate,I!==null&&(I.childLanes|=f),I=s,s=s.return;return I.tag===3?I.stateNode:null}var Wr=!1;function Rc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ah(s,f){s=s.updateQueue,f.updateQueue===s&&(f.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function lo(s,f){return{eventTime:s,lane:f,tag:0,payload:null,callback:null,next:null}}function so(s,f,I){var q=s.updateQueue;if(q===null)return null;if(q=q.shared,Ct&2){var W=q.pending;return W===null?f.next=f:(f.next=W.next,W.next=f),q.pending=f,xi(s,I)}return W=q.interleaved,W===null?(f.next=f,du(q)):(f.next=W.next,W.next=f),q.interleaved=f,xi(s,I)}function ds(s,f,I){if(f=f.updateQueue,f!==null&&(f=f.shared,(I&4194240)!==0)){var q=f.lanes;q&=s.pendingLanes,I|=q,f.lanes=I,ji(s,I)}}function fl(s,f){var I=s.updateQueue,q=s.alternate;if(q!==null&&(q=q.updateQueue,I===q)){var W=null,ne=null;if(I=I.firstBaseUpdate,I!==null){do{var le={eventTime:I.eventTime,lane:I.lane,tag:I.tag,payload:I.payload,callback:I.callback,next:null};ne===null?W=ne=le:ne=ne.next=le,I=I.next}while(I!==null);ne===null?W=ne=f:ne=ne.next=f}else W=ne=f;I={baseState:q.baseState,firstBaseUpdate:W,lastBaseUpdate:ne,shared:q.shared,effects:q.effects},s.updateQueue=I;return}s=I.lastBaseUpdate,s===null?I.firstBaseUpdate=f:s.next=f,I.lastBaseUpdate=f}function Bo(s,f,I,q){var W=s.updateQueue;Wr=!1;var ne=W.firstBaseUpdate,le=W.lastBaseUpdate,ye=W.shared.pending;if(ye!==null){W.shared.pending=null;var Re=ye,$e=Re.next;Re.next=null,le===null?ne=$e:le.next=$e,le=Re;var nt=s.alternate;nt!==null&&(nt=nt.updateQueue,ye=nt.lastBaseUpdate,ye!==le&&(ye===null?nt.firstBaseUpdate=$e:ye.next=$e,nt.lastBaseUpdate=Re))}if(ne!==null){var Et=W.baseState;le=0,nt=$e=Re=null,ye=ne;do{var Qe=ye.lane,ln=ye.eventTime;if((q&Qe)===Qe){nt!==null&&(nt=nt.next={eventTime:ln,lane:0,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null});e:{var Zt=s,Ar=ye;switch(Qe=f,ln=I,Ar.tag){case 1:if(Zt=Ar.payload,typeof Zt=="function"){Et=Zt.call(ln,Et,Qe);break e}Et=Zt;break e;case 3:Zt.flags=Zt.flags&-65537|128;case 0:if(Zt=Ar.payload,Qe=typeof Zt=="function"?Zt.call(ln,Et,Qe):Zt,Qe==null)break e;Et=l({},Et,Qe);break e;case 2:Wr=!0}}ye.callback!==null&&ye.lane!==0&&(s.flags|=64,Qe=W.effects,Qe===null?W.effects=[ye]:Qe.push(ye))}else ln={eventTime:ln,lane:Qe,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null},nt===null?($e=nt=ln,Re=Et):nt=nt.next=ln,le|=Qe;if(ye=ye.next,ye===null){if(ye=W.shared.pending,ye===null)break;Qe=ye,ye=Qe.next,Qe.next=null,W.lastBaseUpdate=Qe,W.shared.pending=null}}while(!0);if(nt===null&&(Re=Et),W.baseState=Re,W.firstBaseUpdate=$e,W.lastBaseUpdate=nt,f=W.shared.interleaved,f!==null){W=f;do le|=W.lane,W=W.next;while(W!==f)}else ne===null&&(W.shared.lanes=0);po|=le,s.lanes=le,s.memoizedState=Et}}function lh(s,f,I){if(s=f.effects,f.effects=null,s!==null)for(f=0;f<s.length;f++){var q=s[f],W=q.callback;if(W!==null){if(q.callback=null,q=I,typeof W!="function")throw Error(u(191,W));W.call(q)}}}var Uo={},li=er(Uo),dl=er(Uo),qo=er(Uo);function si(s){if(s===Uo)throw Error(u(174));return s}function hu(s,f){Nt(qo,f),Nt(dl,s),Nt(li,Uo),s=K(f),un(li),Nt(li,s)}function _a(){un(li),un(dl),un(qo)}function Mc(s){var f=si(qo.current),I=si(li.current);f=J(I,s.type,f),I!==f&&(Nt(dl,s),Nt(li,f))}function Lc(s){dl.current===s&&(un(li),un(dl))}var En=er(0);function pu(s){for(var f=s;f!==null;){if(f.tag===13){var I=f.memoizedState;if(I!==null&&(I=I.dehydrated,I===null||In(I)||wn(I)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Nc=[];function Ic(){for(var s=0;s<Nc.length;s++){var f=Nc[s];ie?f._workInProgressVersionPrimary=null:f._workInProgressVersionSecondary=null}Nc.length=0}var Br=c.ReactCurrentDispatcher,wa=c.ReactCurrentBatchConfig,Ho=0,pn=null,An=null,jn=null,hl=!1,hs=!1,ps=0,pl=0;function Wn(){throw Error(u(321))}function Sa(s,f){if(f===null)return!1;for(var I=0;I<f.length&&I<s.length;I++)if(!wi(s[I],f[I]))return!1;return!0}function gs(s,f,I,q,W,ne){if(Ho=ne,pn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,Br.current=s===null||s.memoizedState===null?Vc:$c,s=I(q,W),hs){ne=0;do{if(hs=!1,ps=0,25<=ne)throw Error(u(301));ne+=1,jn=An=null,f.updateQueue=null,Br.current=Wc,s=I(q,W)}while(hs)}if(Br.current=Ca,f=An!==null&&An.next!==null,Ho=0,jn=An=pn=null,hl=!1,f)throw Error(u(300));return s}function gu(){var s=ps!==0;return ps=0,s}function Yr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?pn.memoizedState=jn=s:jn=jn.next=s,jn}function rr(){if(An===null){var s=pn.alternate;s=s!==null?s.memoizedState:null}else s=An.next;var f=jn===null?pn.memoizedState:jn.next;if(f!==null)jn=f,An=s;else{if(s===null)throw Error(u(310));An=s,s={memoizedState:An.memoizedState,baseState:An.baseState,baseQueue:An.baseQueue,queue:An.queue,next:null},jn===null?pn.memoizedState=jn=s:jn=jn.next=s}return jn}function Ea(s,f){return typeof f=="function"?f(s):f}function vu(s){var f=rr(),I=f.queue;if(I===null)throw Error(u(311));I.lastRenderedReducer=s;var q=An,W=q.baseQueue,ne=I.pending;if(ne!==null){if(W!==null){var le=W.next;W.next=ne.next,ne.next=le}q.baseQueue=W=ne,I.pending=null}if(W!==null){ne=W.next,q=q.baseState;var ye=le=null,Re=null,$e=ne;do{var nt=$e.lane;if((Ho&nt)===nt)Re!==null&&(Re=Re.next={lane:0,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null}),q=$e.hasEagerState?$e.eagerState:s(q,$e.action);else{var Et={lane:nt,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null};Re===null?(ye=Re=Et,le=q):Re=Re.next=Et,pn.lanes|=nt,po|=nt}$e=$e.next}while($e!==null&&$e!==ne);Re===null?le=q:Re.next=ye,wi(q,f.memoizedState)||(Fn=!0),f.memoizedState=q,f.baseState=le,f.baseQueue=Re,I.lastRenderedState=q}if(s=I.interleaved,s!==null){W=s;do ne=W.lane,pn.lanes|=ne,po|=ne,W=W.next;while(W!==s)}else W===null&&(I.lanes=0);return[f.memoizedState,I.dispatch]}function gl(s){var f=rr(),I=f.queue;if(I===null)throw Error(u(311));I.lastRenderedReducer=s;var q=I.dispatch,W=I.pending,ne=f.memoizedState;if(W!==null){I.pending=null;var le=W=W.next;do ne=s(ne,le.action),le=le.next;while(le!==W);wi(ne,f.memoizedState)||(Fn=!0),f.memoizedState=ne,f.baseQueue===null&&(f.baseState=ne),I.lastRenderedState=ne}return[ne,q]}function Dc(){}function jc(s,f){var I=pn,q=rr(),W=f(),ne=!wi(q.memoizedState,W);if(ne&&(q.memoizedState=W,Fn=!0),q=q.queue,bu(Bc.bind(null,I,q,s),[s]),q.getSnapshot!==f||ne||jn!==null&&jn.memoizedState.tag&1){if(I.flags|=2048,Oa(9,zc.bind(null,I,q,W,f),void 0,null),tn===null)throw Error(u(349));Ho&30||Fc(I,f,W)}return W}function Fc(s,f,I){s.flags|=16384,s={getSnapshot:f,value:I},f=pn.updateQueue,f===null?(f={lastEffect:null,stores:null},pn.updateQueue=f,f.stores=[s]):(I=f.stores,I===null?f.stores=[s]:I.push(s))}function zc(s,f,I,q){f.value=I,f.getSnapshot=q,Uc(f)&&uo(s)}function Bc(s,f,I){return I(function(){Uc(f)&&uo(s)})}function Uc(s){var f=s.getSnapshot;s=s.value;try{var I=f();return!wi(s,I)}catch{return!0}}function uo(s){var f=xi(s,1);f!==null&&gr(f,s,1,-1)}function mu(s){var f=Yr();return typeof s=="function"&&(s=s()),f.memoizedState=f.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:s},f.queue=s,s=s.dispatch=Kp.bind(null,pn,s),[f.memoizedState,s]}function Oa(s,f,I,q){return s={tag:s,create:f,destroy:I,deps:q,next:null},f=pn.updateQueue,f===null?(f={lastEffect:null,stores:null},pn.updateQueue=f,f.lastEffect=s.next=s):(I=f.lastEffect,I===null?f.lastEffect=s.next=s:(q=I.next,I.next=s,s.next=q,f.lastEffect=s)),s}function sh(){return rr().memoizedState}function yu(s,f,I,q){var W=Yr();pn.flags|=s,W.memoizedState=Oa(1|f,I,void 0,q===void 0?null:q)}function Go(s,f,I,q){var W=rr();q=q===void 0?null:q;var ne=void 0;if(An!==null){var le=An.memoizedState;if(ne=le.destroy,q!==null&&Sa(q,le.deps)){W.memoizedState=Oa(f,I,ne,q);return}}pn.flags|=s,W.memoizedState=Oa(1|f,I,ne,q)}function uh(s,f){return yu(8390656,8,s,f)}function bu(s,f){return Go(2048,8,s,f)}function qc(s,f){return Go(4,2,s,f)}function rn(s,f){return Go(4,4,s,f)}function _u(s,f){if(typeof f=="function")return s=s(),f(s),function(){f(null)};if(f!=null)return s=s(),f.current=s,function(){f.current=null}}function vs(s,f,I){return I=I!=null?I.concat([s]):null,Go(4,4,_u.bind(null,f,s),I)}function xa(){}function Hc(s,f){var I=rr();f=f===void 0?null:f;var q=I.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(I.memoizedState=[s,f],s)}function wu(s,f){var I=rr();f=f===void 0?null:f;var q=I.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(s=s(),I.memoizedState=[s,f],s)}function vl(s,f,I){return Ho&21?(wi(I,f)||(I=eu(),pn.lanes|=I,po|=I,s.baseState=!0),f):(s.baseState&&(s.baseState=!1,Fn=!0),s.memoizedState=I)}function Su(s,f){var I=It;It=I!==0&&4>I?I:4,s(!0);var q=wa.transition;wa.transition={};try{s(!1),f()}finally{It=I,wa.transition=q}}function Pa(){return rr().memoizedState}function ch(s,f,I){var q=Bn(s);if(I={lane:q,action:I,hasEagerState:!1,eagerState:null,next:null},fh(s))Gc(f,I);else if(I=Ac(s,f,I,q),I!==null){var W=fn();gr(I,s,q,W),ms(I,f,q)}}function Kp(s,f,I){var q=Bn(s),W={lane:q,action:I,hasEagerState:!1,eagerState:null,next:null};if(fh(s))Gc(f,W);else{var ne=s.alternate;if(s.lanes===0&&(ne===null||ne.lanes===0)&&(ne=f.lastRenderedReducer,ne!==null))try{var le=f.lastRenderedState,ye=ne(le,I);if(W.hasEagerState=!0,W.eagerState=ye,wi(ye,le)){var Re=f.interleaved;Re===null?(W.next=W,du(f)):(W.next=Re.next,Re.next=W),f.interleaved=W;return}}catch{}finally{}I=Ac(s,f,W,q),I!==null&&(W=fn(),gr(I,s,q,W),ms(I,f,q))}}function fh(s){var f=s.alternate;return s===pn||f!==null&&f===pn}function Gc(s,f){hs=hl=!0;var I=s.pending;I===null?f.next=f:(f.next=I.next,I.next=f),s.pending=f}function ms(s,f,I){if(I&4194240){var q=f.lanes;q&=s.pendingLanes,I|=q,f.lanes=I,ji(s,I)}}var Ca={readContext:$r,useCallback:Wn,useContext:Wn,useEffect:Wn,useImperativeHandle:Wn,useInsertionEffect:Wn,useLayoutEffect:Wn,useMemo:Wn,useReducer:Wn,useRef:Wn,useState:Wn,useDebugValue:Wn,useDeferredValue:Wn,useTransition:Wn,useMutableSource:Wn,useSyncExternalStore:Wn,useId:Wn,unstable_isNewReconciler:!1},Vc={readContext:$r,useCallback:function(s,f){return Yr().memoizedState=[s,f===void 0?null:f],s},useContext:$r,useEffect:uh,useImperativeHandle:function(s,f,I){return I=I!=null?I.concat([s]):null,yu(4194308,4,_u.bind(null,f,s),I)},useLayoutEffect:function(s,f){return yu(4194308,4,s,f)},useInsertionEffect:function(s,f){return yu(4,2,s,f)},useMemo:function(s,f){var I=Yr();return f=f===void 0?null:f,s=s(),I.memoizedState=[s,f],s},useReducer:function(s,f,I){var q=Yr();return f=I!==void 0?I(f):f,q.memoizedState=q.baseState=f,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:f},q.queue=s,s=s.dispatch=ch.bind(null,pn,s),[q.memoizedState,s]},useRef:function(s){var f=Yr();return s={current:s},f.memoizedState=s},useState:mu,useDebugValue:xa,useDeferredValue:function(s){return Yr().memoizedState=s},useTransition:function(){var s=mu(!1),f=s[0];return s=Su.bind(null,s[1]),Yr().memoizedState=s,[f,s]},useMutableSource:function(){},useSyncExternalStore:function(s,f,I){var q=pn,W=Yr();if(cn){if(I===void 0)throw Error(u(407));I=I()}else{if(I=f(),tn===null)throw Error(u(349));Ho&30||Fc(q,f,I)}W.memoizedState=I;var ne={value:I,getSnapshot:f};return W.queue=ne,uh(Bc.bind(null,q,ne,s),[s]),q.flags|=2048,Oa(9,zc.bind(null,q,ne,I,f),void 0,null),I},useId:function(){var s=Yr(),f=tn.identifierPrefix;if(cn){var I=Si,q=zr;I=(q&~(1<<32-Gr(q)-1)).toString(32)+I,f=":"+f+"R"+I,I=ps++,0<I&&(f+="H"+I.toString(32)),f+=":"}else I=pl++,f=":"+f+"r"+I.toString(32)+":";return s.memoizedState=f},unstable_isNewReconciler:!1},$c={readContext:$r,useCallback:Hc,useContext:$r,useEffect:bu,useImperativeHandle:vs,useInsertionEffect:qc,useLayoutEffect:rn,useMemo:wu,useReducer:vu,useRef:sh,useState:function(){return vu(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return vl(f,An.memoizedState,s)},useTransition:function(){var s=vu(Ea)[0],f=rr().memoizedState;return[s,f]},useMutableSource:Dc,useSyncExternalStore:jc,useId:Pa,unstable_isNewReconciler:!1},Wc={readContext:$r,useCallback:Hc,useContext:$r,useEffect:bu,useImperativeHandle:vs,useInsertionEffect:qc,useLayoutEffect:rn,useMemo:wu,useReducer:gl,useRef:sh,useState:function(){return gl(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return An===null?f.memoizedState=s:vl(f,An.memoizedState,s)},useTransition:function(){var s=gl(Ea)[0],f=rr().memoizedState;return[s,f]},useMutableSource:Dc,useSyncExternalStore:jc,useId:Pa,unstable_isNewReconciler:!1};function Kr(s,f){if(s&&s.defaultProps){f=l({},f),s=s.defaultProps;for(var I in s)f[I]===void 0&&(f[I]=s[I]);return f}return f}function Yc(s,f,I,q){f=s.memoizedState,I=I(q,f),I=I==null?f:l({},f,I),s.memoizedState=I,s.lanes===0&&(s.updateQueue.baseState=I)}var ys={isMounted:function(s){return(s=s._reactInternals)?x(s)===s:!1},enqueueSetState:function(s,f,I){s=s._reactInternals;var q=fn(),W=Bn(s),ne=lo(q,W);ne.payload=f,I!=null&&(ne.callback=I),f=so(s,ne,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueReplaceState:function(s,f,I){s=s._reactInternals;var q=fn(),W=Bn(s),ne=lo(q,W);ne.tag=1,ne.payload=f,I!=null&&(ne.callback=I),f=so(s,ne,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueForceUpdate:function(s,f){s=s._reactInternals;var I=fn(),q=Bn(s),W=lo(I,q);W.tag=2,f!=null&&(W.callback=f),f=so(s,W,q),f!==null&&(gr(f,s,q,I),ds(f,s,q))}};function dh(s,f,I,q,W,ne,le){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(q,ne,le):f.prototype&&f.prototype.isPureReactComponent?!su(I,q)||!su(W,ne):!0}function hh(s,f,I){var q=!1,W=Io,ne=f.contextType;return typeof ne=="object"&&ne!==null?ne=$r(ne):(W=Vn(f)?Di:fr.current,q=f.contextTypes,ne=(q=q!=null)?io(s,W):Io),f=new f(I,ne),s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ys,s.stateNode=f,f._reactInternals=s,q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=W,s.__reactInternalMemoizedMaskedChildContext=ne),f}function Eu(s,f,I,q){s=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(I,q),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(I,q),f.state!==s&&ys.enqueueReplaceState(f,f.state,null)}function zi(s,f,I,q){var W=s.stateNode;W.props=I,W.state=s.memoizedState,W.refs={},Rc(s);var ne=f.contextType;typeof ne=="object"&&ne!==null?W.context=$r(ne):(ne=Vn(f)?Di:fr.current,W.context=io(s,ne)),W.state=s.memoizedState,ne=f.getDerivedStateFromProps,typeof ne=="function"&&(Yc(s,f,ne,I),W.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof W.getSnapshotBeforeUpdate=="function"||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(f=W.state,typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount(),f!==W.state&&ys.enqueueReplaceState(W,W.state,null),Bo(s,I,W,q),W.state=s.memoizedState),typeof W.componentDidMount=="function"&&(s.flags|=4194308)}function ka(s,f){try{var I="",q=f;do I+=Yp(q),q=q.return;while(q);var W=I}catch(ne){W=`
|
|
56
|
-
Error generating stack: `+ne.message+`
|
|
57
|
-
`+ne.stack}return{value:s,source:f,stack:W,digest:null}}function Vo(s,f,I){return{value:s,source:null,stack:I??null,digest:f??null}}function ui(s,f){try{console.error(f.value)}catch(I){setTimeout(function(){throw I})}}var bs=typeof WeakMap=="function"?WeakMap:Map;function Bi(s,f,I){I=lo(-1,I),I.tag=3,I.payload={element:null};var q=f.value;return I.callback=function(){Pn||(Pn=!0,Rn=q),ui(s,f)},I}function Ou(s,f,I){I=lo(-1,I),I.tag=3;var q=s.type.getDerivedStateFromError;if(typeof q=="function"){var W=f.value;I.payload=function(){return q(W)},I.callback=function(){ui(s,f)}}var ne=s.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(I.callback=function(){ui(s,f),typeof q!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var le=f.stack;this.componentDidCatch(f.value,{componentStack:le!==null?le:""})}),I}function ph(s,f,I){var q=s.pingCache;if(q===null){q=s.pingCache=new bs;var W=new Set;q.set(f,W)}else W=q.get(f),W===void 0&&(W=new Set,q.set(f,W));W.has(I)||(W.add(I),s=Sh.bind(null,s,f,I),f.then(s,s))}function gh(s){do{var f;if((f=s.tag===13)&&(f=s.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return s;s=s.return}while(s!==null);return null}function $o(s,f,I,q,W){return s.mode&1?(s.flags|=65536,s.lanes=W,s):(s===f?s.flags|=65536:(s.flags|=128,I.flags|=131072,I.flags&=-52805,I.tag===1&&(I.alternate===null?I.tag=17:(f=lo(-1,1),f.tag=2,so(I,f,1))),I.lanes|=1),s)}var _s=c.ReactCurrentOwner,Fn=!1;function Yn(s,f,I,q){f.child=s===null?ih(f,null,I,q):ya(f,s.child,I,q)}function xu(s,f,I,q,W){I=I.render;var ne=f.ref;return cl(f,W),q=gs(s,f,I,q,ne,W),I=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(cn&&I&&ss(f),f.flags|=1,Yn(s,f,q,W),f.child)}function Ta(s,f,I,q,W){if(s===null){var ne=I.type;return typeof ne=="function"&&!Rl(ne)&&ne.defaultProps===void 0&&I.compare===null&&I.defaultProps===void 0?(f.tag=15,f.type=ne,co(s,f,ne,q,W)):(s=Uu(I.type,null,q,f,f.mode,W),s.ref=f.ref,s.return=f,f.child=s)}if(ne=s.child,!(s.lanes&W)){var le=ne.memoizedProps;if(I=I.compare,I=I!==null?I:su,I(le,q)&&s.ref===f.ref)return fo(s,f,W)}return f.flags|=1,s=na(ne,q),s.ref=f.ref,s.return=f,f.child=s}function co(s,f,I,q,W){if(s!==null){var ne=s.memoizedProps;if(su(ne,q)&&s.ref===f.ref)if(Fn=!1,f.pendingProps=q=ne,(s.lanes&W)!==0)s.flags&131072&&(Fn=!0);else return f.lanes=s.lanes,fo(s,f,W)}return Ui(s,f,I,q,W)}function on(s,f,I){var q=f.pendingProps,W=q.children,ne=s!==null?s.memoizedState:null;if(q.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Nt(Qo,zn),zn|=I;else{if(!(I&1073741824))return s=ne!==null?ne.baseLanes|I:I,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:s,cachePool:null,transitions:null},f.updateQueue=null,Nt(Qo,zn),zn|=s,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},q=ne!==null?ne.baseLanes:I,Nt(Qo,zn),zn|=q}else ne!==null?(q=ne.baseLanes|I,f.memoizedState=null):q=I,Nt(Qo,zn),zn|=q;return Yn(s,f,W,I),f.child}function en(s,f){var I=f.ref;(s===null&&I!==null||s!==null&&s.ref!==I)&&(f.flags|=512,f.flags|=2097152)}function Ui(s,f,I,q,W){var ne=Vn(I)?Di:fr.current;return ne=io(f,ne),cl(f,W),I=gs(s,f,I,q,ne,W),q=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(cn&&q&&ss(f),f.flags|=1,Yn(s,f,I,W),f.child)}function ir(s,f,I,q,W){if(Vn(I)){var ne=!0;tl(f)}else ne=!1;if(cl(f,W),f.stateNode===null)ws(s,f),hh(f,I,q),zi(f,I,q,W),q=!0;else if(s===null){var le=f.stateNode,ye=f.memoizedProps;le.props=ye;var Re=le.context,$e=I.contextType;typeof $e=="object"&&$e!==null?$e=$r($e):($e=Vn(I)?Di:fr.current,$e=io(f,$e));var nt=I.getDerivedStateFromProps,Et=typeof nt=="function"||typeof le.getSnapshotBeforeUpdate=="function";Et||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==q||Re!==$e)&&Eu(f,le,q,$e),Wr=!1;var Qe=f.memoizedState;le.state=Qe,Bo(f,q,le,W),Re=f.memoizedState,ye!==q||Qe!==Re||jr.current||Wr?(typeof nt=="function"&&(Yc(f,I,nt,q),Re=f.memoizedState),(ye=Wr||dh(f,I,ye,q,Qe,Re,$e))?(Et||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount()),typeof le.componentDidMount=="function"&&(f.flags|=4194308)):(typeof le.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=q,f.memoizedState=Re),le.props=q,le.state=Re,le.context=$e,q=ye):(typeof le.componentDidMount=="function"&&(f.flags|=4194308),q=!1)}else{le=f.stateNode,ah(s,f),ye=f.memoizedProps,$e=f.type===f.elementType?ye:Kr(f.type,ye),le.props=$e,Et=f.pendingProps,Qe=le.context,Re=I.contextType,typeof Re=="object"&&Re!==null?Re=$r(Re):(Re=Vn(I)?Di:fr.current,Re=io(f,Re));var ln=I.getDerivedStateFromProps;(nt=typeof ln=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==Et||Qe!==Re)&&Eu(f,le,q,Re),Wr=!1,Qe=f.memoizedState,le.state=Qe,Bo(f,q,le,W);var Zt=f.memoizedState;ye!==Et||Qe!==Zt||jr.current||Wr?(typeof ln=="function"&&(Yc(f,I,ln,q),Zt=f.memoizedState),($e=Wr||dh(f,I,$e,q,Qe,Zt,Re)||!1)?(nt||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(q,Zt,Re),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(q,Zt,Re)),typeof le.componentDidUpdate=="function"&&(f.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=1024),f.memoizedProps=q,f.memoizedState=Zt),le.props=q,le.state=Zt,le.context=Re,q=$e):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=1024),q=!1)}return dr(s,f,I,q,ne,W)}function dr(s,f,I,q,W,ne){en(s,f);var le=(f.flags&128)!==0;if(!q&&!le)return W&&Ec(f,I,!1),fo(s,f,ne);q=f.stateNode,_s.current=f;var ye=le&&typeof I.getDerivedStateFromError!="function"?null:q.render();return f.flags|=1,s!==null&&le?(f.child=ya(f,s.child,null,ne),f.child=ya(f,null,ye,ne)):Yn(s,f,ye,ne),f.memoizedState=q.state,W&&Ec(f,I,!0),f.child}function Wo(s){var f=s.stateNode;f.pendingContext?Vd(s,f.pendingContext,f.pendingContext!==f.context):f.context&&Vd(s,f.context,!1),hu(s,f.containerInfo)}function Aa(s,f,I,q,W){return va(),Cc(W),f.flags|=256,Yn(s,f,I,q),f.child}var hr={dehydrated:null,treeContext:null,retryLane:0};function ml(s){return{baseLanes:s,cachePool:null,transitions:null}}function Kc(s,f,I){var q=f.pendingProps,W=En.current,ne=!1,le=(f.flags&128)!==0,ye;if((ye=le)||(ye=s!==null&&s.memoizedState===null?!1:(W&2)!==0),ye?(ne=!0,f.flags&=-129):(s===null||s.memoizedState!==null)&&(W|=1),Nt(En,W&1),s===null)return Pc(f),s=f.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(f.mode&1?wn(s)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(le=q.children,s=q.fallback,ne?(q=f.mode,ne=f.child,le={mode:"hidden",children:le},!(q&1)&&ne!==null?(ne.childLanes=0,ne.pendingProps=le):ne=Ml(le,q,0,null),s=or(s,q,I,null),ne.return=f,s.return=f,ne.sibling=s,f.child=ne,f.child.memoizedState=ml(I),f.memoizedState=hr,s):Pu(f,le));if(W=s.memoizedState,W!==null&&(ye=W.dehydrated,ye!==null))return vh(s,f,le,q,ye,W,I);if(ne){ne=q.fallback,le=f.mode,W=s.child,ye=W.sibling;var Re={mode:"hidden",children:q.children};return!(le&1)&&f.child!==W?(q=f.child,q.childLanes=0,q.pendingProps=Re,f.deletions=null):(q=na(W,Re),q.subtreeFlags=W.subtreeFlags&14680064),ye!==null?ne=na(ye,ne):(ne=or(ne,le,I,null),ne.flags|=2),ne.return=f,q.return=f,q.sibling=ne,f.child=q,q=ne,ne=f.child,le=s.child.memoizedState,le=le===null?ml(I):{baseLanes:le.baseLanes|I,cachePool:null,transitions:le.transitions},ne.memoizedState=le,ne.childLanes=s.childLanes&~I,f.memoizedState=hr,q}return ne=s.child,s=ne.sibling,q=na(ne,{mode:"visible",children:q.children}),!(f.mode&1)&&(q.lanes=I),q.return=f,q.sibling=null,s!==null&&(I=f.deletions,I===null?(f.deletions=[s],f.flags|=16):I.push(s)),f.child=q,f.memoizedState=null,q}function Pu(s,f){return f=Ml({mode:"visible",children:f},s.mode,0,null),f.return=s,s.child=f}function Ra(s,f,I,q){return q!==null&&Cc(q),ya(f,s.child,null,I),s=Pu(f,f.pendingProps.children),s.flags|=2,f.memoizedState=null,s}function vh(s,f,I,q,W,ne,le){if(I)return f.flags&256?(f.flags&=-257,q=Vo(Error(u(422))),Ra(s,f,le,q)):f.memoizedState!==null?(f.child=s.child,f.flags|=128,null):(ne=q.fallback,W=f.mode,q=Ml({mode:"visible",children:q.children},W,0,null),ne=or(ne,W,le,null),ne.flags|=2,q.return=f,ne.return=f,q.sibling=ne,f.child=q,f.mode&1&&ya(f,s.child,null,le),f.child.memoizedState=ml(le),f.memoizedState=hr,ne);if(!(f.mode&1))return Ra(s,f,le,null);if(wn(W))return q=Qn(W).digest,ne=Error(u(419)),q=Vo(ne,q,void 0),Ra(s,f,le,q);if(I=(le&s.childLanes)!==0,Fn||I){if(q=tn,q!==null){switch(le&-le){case 4:W=2;break;case 16:W=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:W=32;break;case 536870912:W=268435456;break;default:W=0}W=W&(q.suspendedLanes|le)?0:W,W!==0&&W!==ne.retryLane&&(ne.retryLane=W,xi(s,W),gr(q,s,W,-1))}return Al(),q=Vo(Error(u(421))),Ra(s,f,le,q)}return In(W)?(f.flags|=128,f.child=s.child,f=Oh.bind(null,s),ii(W,f),null):(s=ne.treeContext,de&&(Or=Mt(W),nr=f,cn=!0,Oi=null,cs=!1,s!==null&&(Er[Vr++]=zr,Er[Vr++]=Si,Er[Vr++]=Dn,zr=s.id,Si=s.overflow,Dn=f)),f=Pu(f,q.children),f.flags|=4096,f)}function qi(s,f,I){s.lanes|=f;var q=s.alternate;q!==null&&(q.lanes|=f),ba(s.return,f,I)}function yl(s,f,I,q,W){var ne=s.memoizedState;ne===null?s.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:q,tail:I,tailMode:W}:(ne.isBackwards=f,ne.rendering=null,ne.renderingStartTime=0,ne.last=q,ne.tail=I,ne.tailMode=W)}function Cu(s,f,I){var q=f.pendingProps,W=q.revealOrder,ne=q.tail;if(Yn(s,f,q.children,I),q=En.current,q&2)q=q&1|2,f.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=f.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&qi(s,I,f);else if(s.tag===19)qi(s,I,f);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===f)break e;for(;s.sibling===null;){if(s.return===null||s.return===f)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}q&=1}if(Nt(En,q),!(f.mode&1))f.memoizedState=null;else switch(W){case"forwards":for(I=f.child,W=null;I!==null;)s=I.alternate,s!==null&&pu(s)===null&&(W=I),I=I.sibling;I=W,I===null?(W=f.child,f.child=null):(W=I.sibling,I.sibling=null),yl(f,!1,W,I,ne);break;case"backwards":for(I=null,W=f.child,f.child=null;W!==null;){if(s=W.alternate,s!==null&&pu(s)===null){f.child=W;break}s=W.sibling,W.sibling=I,I=W,W=s}yl(f,!0,I,null,ne);break;case"together":yl(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function ws(s,f){!(f.mode&1)&&s!==null&&(s.alternate=null,f.alternate=null,f.flags|=2)}function fo(s,f,I){if(s!==null&&(f.dependencies=s.dependencies),po|=f.lanes,!(I&f.childLanes))return null;if(s!==null&&f.child!==s.child)throw Error(u(153));if(f.child!==null){for(s=f.child,I=na(s,s.pendingProps),f.child=I,I.return=f;s.sibling!==null;)s=s.sibling,I=I.sibling=na(s,s.pendingProps),I.return=f;I.sibling=null}return f.child}function Yo(s,f,I){switch(f.tag){case 3:Wo(f),va();break;case 5:Mc(f);break;case 1:Vn(f.type)&&tl(f);break;case 4:hu(f,f.stateNode.containerInfo);break;case 10:oh(f,f.type._context,f.memoizedProps.value);break;case 13:var q=f.memoizedState;if(q!==null)return q.dehydrated!==null?(Nt(En,En.current&1),f.flags|=128,null):I&f.child.childLanes?Kc(s,f,I):(Nt(En,En.current&1),s=fo(s,f,I),s!==null?s.sibling:null);Nt(En,En.current&1);break;case 19:if(q=(I&f.childLanes)!==0,s.flags&128){if(q)return Cu(s,f,I);f.flags|=128}var W=f.memoizedState;if(W!==null&&(W.rendering=null,W.tail=null,W.lastEffect=null),Nt(En,En.current),q)break;return null;case 22:case 23:return f.lanes=0,on(s,f,I)}return fo(s,f,I)}function xr(s){s.flags|=4}function Ma(s,f){if(s!==null&&s.child===f.child)return!0;if(f.flags&16)return!1;for(s=f.child;s!==null;){if(s.flags&12854||s.subtreeFlags&12854)return!1;s=s.sibling}return!0}var Ko,Xo,Pr,Cr;if(ae)Ko=function(s,f){for(var I=f.child;I!==null;){if(I.tag===5||I.tag===6)H(s,I.stateNode);else if(I.tag!==4&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===f)break;for(;I.sibling===null;){if(I.return===null||I.return===f)return;I=I.return}I.sibling.return=I.return,I=I.sibling}},Xo=function(){},Pr=function(s,f,I,q,W){if(s=s.memoizedProps,s!==q){var ne=f.stateNode,le=si(li.current);I=ee(ne,I,s,q,W,le),(f.updateQueue=I)&&xr(f)}},Cr=function(s,f,I,q){I!==q&&xr(f)};else if(ue){Ko=function(s,f,I,q){for(var W=f.child;W!==null;){if(W.tag===5){var ne=W.stateNode;I&&q&&(ne=lt(ne,W.type,W.memoizedProps,W)),H(s,ne)}else if(W.tag===6)ne=W.stateNode,I&&q&&(ne=_t(ne,W.memoizedProps,W)),H(s,ne);else if(W.tag!==4){if(W.tag===22&&W.memoizedState!==null)ne=W.child,ne!==null&&(ne.return=W),Ko(s,W,!0,!0);else if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===f)break;for(;W.sibling===null;){if(W.return===null||W.return===f)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};var Zo=function(s,f,I,q){for(var W=f.child;W!==null;){if(W.tag===5){var ne=W.stateNode;I&&q&&(ne=lt(ne,W.type,W.memoizedProps,W)),pt(s,ne)}else if(W.tag===6)ne=W.stateNode,I&&q&&(ne=_t(ne,W.memoizedProps,W)),pt(s,ne);else if(W.tag!==4){if(W.tag===22&&W.memoizedState!==null)ne=W.child,ne!==null&&(ne.return=W),Zo(s,W,!0,!0);else if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===f)break;for(;W.sibling===null;){if(W.return===null||W.return===f)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};Xo=function(s,f){var I=f.stateNode;if(!Ma(s,f)){s=I.containerInfo;var q=ze(s);Zo(q,f,!1,!1),I.pendingChildren=q,xr(f),_n(s,q)}},Pr=function(s,f,I,q,W){var ne=s.stateNode,le=s.memoizedProps;if((s=Ma(s,f))&&le===q)f.stateNode=ne;else{var ye=f.stateNode,Re=si(li.current),$e=null;le!==q&&($e=ee(ye,I,le,q,W,Re)),s&&$e===null?f.stateNode=ne:(ne=mt(ne,$e,I,le,q,f,s,ye),$(ne,I,q,W,Re)&&xr(f),f.stateNode=ne,s?xr(f):Ko(ne,f,!1,!1))}},Cr=function(s,f,I,q){I!==q?(s=si(qo.current),I=si(li.current),f.stateNode=X(q,s,I,f),xr(f)):f.stateNode=s.stateNode}}else Xo=function(){},Pr=function(){},Cr=function(){};function Xr(s,f){if(!cn)switch(s.tailMode){case"hidden":f=s.tail;for(var I=null;f!==null;)f.alternate!==null&&(I=f),f=f.sibling;I===null?s.tail=null:I.sibling=null;break;case"collapsed":I=s.tail;for(var q=null;I!==null;)I.alternate!==null&&(q=I),I=I.sibling;q===null?f||s.tail===null?s.tail=null:s.tail.sibling=null:q.sibling=null}}function gn(s){var f=s.alternate!==null&&s.alternate.child===s.child,I=0,q=0;if(f)for(var W=s.child;W!==null;)I|=W.lanes|W.childLanes,q|=W.subtreeFlags&14680064,q|=W.flags&14680064,W.return=s,W=W.sibling;else for(W=s.child;W!==null;)I|=W.lanes|W.childLanes,q|=W.subtreeFlags,q|=W.flags,W.return=s,W=W.sibling;return s.subtreeFlags|=q,s.childLanes=I,f}function La(s,f,I){var q=f.pendingProps;switch(us(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gn(f),null;case 1:return Vn(f.type)&&pa(),gn(f),null;case 3:return I=f.stateNode,_a(),un(jr),un(fr),Ic(),I.pendingContext&&(I.context=I.pendingContext,I.pendingContext=null),(s===null||s.child===null)&&(lu(f)?xr(f):s===null||s.memoizedState.isDehydrated&&!(f.flags&256)||(f.flags|=1024,Oi!==null&&(zu(Oi),Oi=null))),Xo(s,f),gn(f),null;case 5:Lc(f),I=si(qo.current);var W=f.type;if(s!==null&&f.stateNode!=null)Pr(s,f,W,q,I),s.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!q){if(f.stateNode===null)throw Error(u(166));return gn(f),null}if(s=si(li.current),lu(f)){if(!de)throw Error(u(175));s=Vt(f.stateNode,f.type,f.memoizedProps,I,s,f,!cs),f.updateQueue=s,s!==null&&xr(f)}else{var ne=F(W,q,I,s,f);Ko(ne,f,!1,!1),f.stateNode=ne,$(ne,W,q,I,s)&&xr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return gn(f),null;case 6:if(s&&f.stateNode!=null)Cr(s,f,s.memoizedProps,q);else{if(typeof q!="string"&&f.stateNode===null)throw Error(u(166));if(s=si(qo.current),I=si(li.current),lu(f)){if(!de)throw Error(u(176));if(s=f.stateNode,I=f.memoizedProps,(q=$t(s,I,f,!cs))&&(W=nr,W!==null))switch(W.tag){case 3:rs(W.stateNode.containerInfo,s,I,(W.mode&1)!==0);break;case 5:Jt(W.type,W.memoizedProps,W.stateNode,s,I,(W.mode&1)!==0)}q&&xr(f)}else f.stateNode=X(q,s,I,f)}return gn(f),null;case 13:if(un(En),q=f.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(cn&&Or!==null&&f.mode&1&&!(f.flags&128))th(),va(),f.flags|=98560,W=!1;else if(W=lu(f),q!==null&&q.dehydrated!==null){if(s===null){if(!W)throw Error(u(318));if(!de)throw Error(u(344));if(W=f.memoizedState,W=W!==null?W.dehydrated:null,!W)throw Error(u(317));Jn(W,f)}else va(),!(f.flags&128)&&(f.memoizedState=null),f.flags|=4;gn(f),W=!1}else Oi!==null&&(zu(Oi),Oi=null),W=!0;if(!W)return f.flags&65536?f:null}return f.flags&128?(f.lanes=I,f):(I=q!==null,I!==(s!==null&&s.memoizedState!==null)&&I&&(f.child.flags|=8192,f.mode&1&&(s===null||En.current&1?mn===0&&(mn=3):Al())),f.updateQueue!==null&&(f.flags|=4),gn(f),null);case 4:return _a(),Xo(s,f),s===null&&Oe(f.stateNode.containerInfo),gn(f),null;case 10:return fs(f.type._context),gn(f),null;case 17:return Vn(f.type)&&pa(),gn(f),null;case 19:if(un(En),W=f.memoizedState,W===null)return gn(f),null;if(q=(f.flags&128)!==0,ne=W.rendering,ne===null)if(q)Xr(W,!1);else{if(mn!==0||s!==null&&s.flags&128)for(s=f.child;s!==null;){if(ne=pu(s),ne!==null){for(f.flags|=128,Xr(W,!1),s=ne.updateQueue,s!==null&&(f.updateQueue=s,f.flags|=4),f.subtreeFlags=0,s=I,I=f.child;I!==null;)q=I,W=s,q.flags&=14680066,ne=q.alternate,ne===null?(q.childLanes=0,q.lanes=W,q.child=null,q.subtreeFlags=0,q.memoizedProps=null,q.memoizedState=null,q.updateQueue=null,q.dependencies=null,q.stateNode=null):(q.childLanes=ne.childLanes,q.lanes=ne.lanes,q.child=ne.child,q.subtreeFlags=0,q.deletions=null,q.memoizedProps=ne.memoizedProps,q.memoizedState=ne.memoizedState,q.updateQueue=ne.updateQueue,q.type=ne.type,W=ne.dependencies,q.dependencies=W===null?null:{lanes:W.lanes,firstContext:W.firstContext}),I=I.sibling;return Nt(En,En.current&1|2),f.child}s=s.sibling}W.tail!==null&&$n()>ks&&(f.flags|=128,q=!0,Xr(W,!1),f.lanes=4194304)}else{if(!q)if(s=pu(ne),s!==null){if(f.flags|=128,q=!0,s=s.updateQueue,s!==null&&(f.updateQueue=s,f.flags|=4),Xr(W,!0),W.tail===null&&W.tailMode==="hidden"&&!ne.alternate&&!cn)return gn(f),null}else 2*$n()-W.renderingStartTime>ks&&I!==1073741824&&(f.flags|=128,q=!0,Xr(W,!1),f.lanes=4194304);W.isBackwards?(ne.sibling=f.child,f.child=ne):(s=W.last,s!==null?s.sibling=ne:f.child=ne,W.last=ne)}return W.tail!==null?(f=W.tail,W.rendering=f,W.tail=f.sibling,W.renderingStartTime=$n(),f.sibling=null,s=En.current,Nt(En,q?s&1|2:s&1),f):(gn(f),null);case 22:case 23:return Bu(),I=f.memoizedState!==null,s!==null&&s.memoizedState!==null!==I&&(f.flags|=8192),I&&f.mode&1?zn&1073741824&&(gn(f),ae&&f.subtreeFlags&6&&(f.flags|=8192)):gn(f),null;case 24:return null;case 25:return null}throw Error(u(156,f.tag))}function mh(s,f){switch(us(f),f.tag){case 1:return Vn(f.type)&&pa(),s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 3:return _a(),un(jr),un(fr),Ic(),s=f.flags,s&65536&&!(s&128)?(f.flags=s&-65537|128,f):null;case 5:return Lc(f),null;case 13:if(un(En),s=f.memoizedState,s!==null&&s.dehydrated!==null){if(f.alternate===null)throw Error(u(340));va()}return s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 19:return un(En),null;case 4:return _a(),null;case 10:return fs(f.type._context),null;case 22:case 23:return Bu(),null;case 24:return null;default:return null}}var bl=!1,Kn=!1,Zr=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Xt(s,f){var I=s.ref;if(I!==null)if(typeof I=="function")try{I(null)}catch(q){dn(s,f,q)}else I.current=null}function Qr(s,f,I){try{I()}catch(q){dn(s,f,q)}}var Xc=!1;function yh(s,f){for(B(s.containerInfo),Ke=f;Ke!==null;)if(s=Ke,f=s.child,(s.subtreeFlags&1028)!==0&&f!==null)f.return=s,Ke=f;else for(;Ke!==null;){s=Ke;try{var I=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var q=I.memoizedProps,W=I.memoizedState,ne=s.stateNode,le=ne.getSnapshotBeforeUpdate(s.elementType===s.type?q:Kr(s.type,q),W);ne.__reactInternalSnapshotBeforeUpdate=le}break;case 3:ae&&je(s.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(ye){dn(s,s.return,ye)}if(f=s.sibling,f!==null){f.return=s.return,Ke=f;break}Ke=s.return}return I=Xc,Xc=!1,I}function Na(s,f,I){var q=f.updateQueue;if(q=q!==null?q.lastEffect:null,q!==null){var W=q=q.next;do{if((W.tag&s)===s){var ne=W.destroy;W.destroy=void 0,ne!==void 0&&Qr(f,I,ne)}W=W.next}while(W!==q)}}function _l(s,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var I=f=f.next;do{if((I.tag&s)===s){var q=I.create;I.destroy=q()}I=I.next}while(I!==f)}}function ku(s){var f=s.ref;if(f!==null){var I=s.stateNode;switch(s.tag){case 5:s=Q(I);break;default:s=I}typeof f=="function"?f(s):f.current=s}}function Ss(s){var f=s.alternate;f!==null&&(s.alternate=null,Ss(f)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(f=s.stateNode,f!==null&&Le(f)),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 Zc(s){return s.tag===5||s.tag===3||s.tag===4}function Ia(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Zc(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 Es(s,f,I){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?xt(I,s,f):Fe(I,s);else if(q!==4&&(s=s.child,s!==null))for(Es(s,f,I),s=s.sibling;s!==null;)Es(s,f,I),s=s.sibling}function Qc(s,f,I){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?At(I,s,f):De(I,s);else if(q!==4&&(s=s.child,s!==null))for(Qc(s,f,I),s=s.sibling;s!==null;)Qc(s,f,I),s=s.sibling}var Cn=null,Ur=!1;function Pi(s,f,I){for(I=I.child;I!==null;)Tu(s,f,I),I=I.sibling}function Tu(s,f,I){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(jo,I)}catch{}switch(I.tag){case 5:Kn||Xt(I,f);case 6:if(ae){var q=Cn,W=Ur;Cn=null,Pi(s,f,I),Cn=q,Ur=W,Cn!==null&&(Ur?Se(Cn,I.stateNode):be(Cn,I.stateNode))}else Pi(s,f,I);break;case 18:ae&&Cn!==null&&(Ur?Ii(Cn,I.stateNode):Ir(Cn,I.stateNode));break;case 4:ae?(q=Cn,W=Ur,Cn=I.stateNode.containerInfo,Ur=!0,Pi(s,f,I),Cn=q,Ur=W):(ue&&(q=I.stateNode.containerInfo,W=ze(q),Be(q,W)),Pi(s,f,I));break;case 0:case 11:case 14:case 15:if(!Kn&&(q=I.updateQueue,q!==null&&(q=q.lastEffect,q!==null))){W=q=q.next;do{var ne=W,le=ne.destroy;ne=ne.tag,le!==void 0&&(ne&2||ne&4)&&Qr(I,f,le),W=W.next}while(W!==q)}Pi(s,f,I);break;case 1:if(!Kn&&(Xt(I,f),q=I.stateNode,typeof q.componentWillUnmount=="function"))try{q.props=I.memoizedProps,q.state=I.memoizedState,q.componentWillUnmount()}catch(ye){dn(I,f,ye)}Pi(s,f,I);break;case 21:Pi(s,f,I);break;case 22:I.mode&1?(Kn=(q=Kn)||I.memoizedState!==null,Pi(s,f,I),Kn=q):Pi(s,f,I);break;default:Pi(s,f,I)}}function Da(s){var f=s.updateQueue;if(f!==null){s.updateQueue=null;var I=s.stateNode;I===null&&(I=s.stateNode=new Zr),f.forEach(function(q){var W=Xp.bind(null,s,q);I.has(q)||(I.add(q),q.then(W,W))})}}function ci(s,f){var I=f.deletions;if(I!==null)for(var q=0;q<I.length;q++){var W=I[q];try{var ne=s,le=f;if(ae){var ye=le;e:for(;ye!==null;){switch(ye.tag){case 5:Cn=ye.stateNode,Ur=!1;break e;case 3:Cn=ye.stateNode.containerInfo,Ur=!0;break e;case 4:Cn=ye.stateNode.containerInfo,Ur=!0;break e}ye=ye.return}if(Cn===null)throw Error(u(160));Tu(ne,le,W),Cn=null,Ur=!1}else Tu(ne,le,W);var Re=W.alternate;Re!==null&&(Re.return=null),W.return=null}catch($e){dn(W,f,$e)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Os(f,s),f=f.sibling}function Os(s,f){var I=s.alternate,q=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ci(f,s),Jr(s),q&4){try{Na(3,s,s.return),_l(3,s)}catch(Qe){dn(s,s.return,Qe)}try{Na(5,s,s.return)}catch(Qe){dn(s,s.return,Qe)}}break;case 1:ci(f,s),Jr(s),q&512&&I!==null&&Xt(I,I.return);break;case 5:if(ci(f,s),Jr(s),q&512&&I!==null&&Xt(I,I.return),ae){if(s.flags&32){var W=s.stateNode;try{vt(W)}catch(Qe){dn(s,s.return,Qe)}}if(q&4&&(W=s.stateNode,W!=null)){var ne=s.memoizedProps;if(I=I!==null?I.memoizedProps:ne,q=s.type,f=s.updateQueue,s.updateQueue=null,f!==null)try{ft(W,f,q,I,ne,s)}catch(Qe){dn(s,s.return,Qe)}}}break;case 6:if(ci(f,s),Jr(s),q&4&&ae){if(s.stateNode===null)throw Error(u(162));W=s.stateNode,ne=s.memoizedProps,I=I!==null?I.memoizedProps:ne;try{He(W,I,ne)}catch(Qe){dn(s,s.return,Qe)}}break;case 3:if(ci(f,s),Jr(s),q&4){if(ae&&de&&I!==null&&I.memoizedState.isDehydrated)try{Sn(f.containerInfo)}catch(Qe){dn(s,s.return,Qe)}if(ue){W=f.containerInfo,ne=f.pendingChildren;try{Be(W,ne)}catch(Qe){dn(s,s.return,Qe)}}}break;case 4:if(ci(f,s),Jr(s),q&4&&ue){ne=s.stateNode,W=ne.containerInfo,ne=ne.pendingChildren;try{Be(W,ne)}catch(Qe){dn(s,s.return,Qe)}}break;case 13:ci(f,s),Jr(s),W=s.child,W.flags&8192&&(ne=W.memoizedState!==null,W.stateNode.isHidden=ne,!ne||W.alternate!==null&&W.alternate.memoizedState!==null||(Pl=$n())),q&4&&Da(s);break;case 22:var le=I!==null&&I.memoizedState!==null;if(s.mode&1?(Kn=(I=Kn)||le,ci(f,s),Kn=I):ci(f,s),Jr(s),q&8192){if(I=s.memoizedState!==null,(s.stateNode.isHidden=I)&&!le&&s.mode&1)for(Ke=s,q=s.child;q!==null;){for(f=Ke=q;Ke!==null;){le=Ke;var ye=le.child;switch(le.tag){case 0:case 11:case 14:case 15:Na(4,le,le.return);break;case 1:Xt(le,le.return);var Re=le.stateNode;if(typeof Re.componentWillUnmount=="function"){var $e=le,nt=le.return;try{var Et=$e;Re.props=Et.memoizedProps,Re.state=Et.memoizedState,Re.componentWillUnmount()}catch(Qe){dn($e,nt,Qe)}}break;case 5:Xt(le,le.return);break;case 22:if(le.memoizedState!==null){Mu(f);continue}}ye!==null?(ye.return=le,Ke=ye):Mu(f)}q=q.sibling}if(ae){e:if(q=null,ae)for(f=s;;){if(f.tag===5){if(q===null){q=f;try{W=f.stateNode,I?Pt(W):Ge(f.stateNode,f.memoizedProps)}catch(Qe){dn(s,s.return,Qe)}}}else if(f.tag===6){if(q===null)try{ne=f.stateNode,I?Ie(ne):rt(ne,f.memoizedProps)}catch(Qe){dn(s,s.return,Qe)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===s)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===s)break e;for(;f.sibling===null;){if(f.return===null||f.return===s)break e;q===f&&(q=null),f=f.return}q===f&&(q=null),f.sibling.return=f.return,f=f.sibling}}}break;case 19:ci(f,s),Jr(s),q&4&&Da(s);break;case 21:break;default:ci(f,s),Jr(s)}}function Jr(s){var f=s.flags;if(f&2){try{if(ae){e:{for(var I=s.return;I!==null;){if(Zc(I)){var q=I;break e}I=I.return}throw Error(u(160))}switch(q.tag){case 5:var W=q.stateNode;q.flags&32&&(vt(W),q.flags&=-33);var ne=Ia(s);Qc(s,ne,W);break;case 3:case 4:var le=q.stateNode.containerInfo,ye=Ia(s);Es(s,ye,le);break;default:throw Error(u(161))}}}catch(Re){dn(s,s.return,Re)}s.flags&=-3}f&4096&&(s.flags&=-4097)}function wl(s,f,I){Ke=s,Au(s)}function Au(s,f,I){for(var q=(s.mode&1)!==0;Ke!==null;){var W=Ke,ne=W.child;if(W.tag===22&&q){var le=W.memoizedState!==null||bl;if(!le){var ye=W.alternate,Re=ye!==null&&ye.memoizedState!==null||Kn;ye=bl;var $e=Kn;if(bl=le,(Kn=Re)&&!$e)for(Ke=W;Ke!==null;)le=Ke,Re=le.child,le.tag===22&&le.memoizedState!==null?Lu(W):Re!==null?(Re.return=le,Ke=Re):Lu(W);for(;ne!==null;)Ke=ne,Au(ne),ne=ne.sibling;Ke=W,bl=ye,Kn=$e}Ru(s)}else W.subtreeFlags&8772&&ne!==null?(ne.return=W,Ke=ne):Ru(s)}}function Ru(s){for(;Ke!==null;){var f=Ke;if(f.flags&8772){var I=f.alternate;try{if(f.flags&8772)switch(f.tag){case 0:case 11:case 15:Kn||_l(5,f);break;case 1:var q=f.stateNode;if(f.flags&4&&!Kn)if(I===null)q.componentDidMount();else{var W=f.elementType===f.type?I.memoizedProps:Kr(f.type,I.memoizedProps);q.componentDidUpdate(W,I.memoizedState,q.__reactInternalSnapshotBeforeUpdate)}var ne=f.updateQueue;ne!==null&&lh(f,ne,q);break;case 3:var le=f.updateQueue;if(le!==null){if(I=null,f.child!==null)switch(f.child.tag){case 5:I=Q(f.child.stateNode);break;case 1:I=f.child.stateNode}lh(f,le,I)}break;case 5:var ye=f.stateNode;I===null&&f.flags&4&&Xe(ye,f.type,f.memoizedProps,f);break;case 6:break;case 4:break;case 12:break;case 13:if(de&&f.memoizedState===null){var Re=f.alternate;if(Re!==null){var $e=Re.memoizedState;if($e!==null){var nt=$e.dehydrated;nt!==null&&oi(nt)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}Kn||f.flags&512&&ku(f)}catch(Et){dn(f,f.return,Et)}}if(f===s){Ke=null;break}if(I=f.sibling,I!==null){I.return=f.return,Ke=I;break}Ke=f.return}}function Mu(s){for(;Ke!==null;){var f=Ke;if(f===s){Ke=null;break}var I=f.sibling;if(I!==null){I.return=f.return,Ke=I;break}Ke=f.return}}function Lu(s){for(;Ke!==null;){var f=Ke;try{switch(f.tag){case 0:case 11:case 15:var I=f.return;try{_l(4,f)}catch(Re){dn(f,I,Re)}break;case 1:var q=f.stateNode;if(typeof q.componentDidMount=="function"){var W=f.return;try{q.componentDidMount()}catch(Re){dn(f,W,Re)}}var ne=f.return;try{ku(f)}catch(Re){dn(f,ne,Re)}break;case 5:var le=f.return;try{ku(f)}catch(Re){dn(f,le,Re)}}}catch(Re){dn(f,f.return,Re)}if(f===s){Ke=null;break}var ye=f.sibling;if(ye!==null){ye.return=f.return,Ke=ye;break}Ke=f.return}}var ho=0,kr=1,Hi=2,Sl=3,xs=4;if(typeof Symbol=="function"&&Symbol.for){var ei=Symbol.for;ho=ei("selector.component"),kr=ei("selector.has_pseudo_class"),Hi=ei("selector.role"),Sl=ei("selector.test_id"),xs=ei("selector.text")}function Gi(s){var f=pe(s);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(u(364));return f}if(s=Ae(s),s===null)throw Error(u(362));return s.stateNode.current}function Ps(s,f){switch(f.$$typeof){case ho:if(s.type===f.value)return!0;break;case kr:e:{f=f.value,s=[s,0];for(var I=0;I<s.length;){var q=s[I++],W=s[I++],ne=f[W];if(q.tag!==5||!xe(q)){for(;ne!=null&&Ps(q,ne);)W++,ne=f[W];if(W===f.length){f=!0;break e}else for(q=q.child;q!==null;)s.push(q,W),q=q.sibling}}f=!1}return f;case Hi:if(s.tag===5&&Ne(s.stateNode,f.value))return!0;break;case xs:if((s.tag===5||s.tag===6)&&(s=me(s),s!==null&&0<=s.indexOf(f.value)))return!0;break;case Sl:if(s.tag===5&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===f.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function Nu(s){switch(s.$$typeof){case ho:return"<"+(R(s.value)||"Unknown")+">";case kr:return":has("+(Nu(s)||"")+")";case Hi:return'[role="'+s.value+'"]';case xs:return'"'+s.value+'"';case Sl:return'[data-testname="'+s.value+'"]';default:throw Error(u(365))}}function Vi(s,f){var I=[];s=[s,0];for(var q=0;q<s.length;){var W=s[q++],ne=s[q++],le=f[ne];if(W.tag!==5||!xe(W)){for(;le!=null&&Ps(W,le);)ne++,le=f[ne];if(ne===f.length)I.push(W);else for(W=W.child;W!==null;)s.push(W,ne),W=W.sibling}}return I}function $i(s,f){if(!Ce)throw Error(u(363));s=Gi(s),s=Vi(s,f),f=[],s=Array.from(s);for(var I=0;I<s.length;){var q=s[I++];if(q.tag===5)xe(q)||f.push(q.stateNode);else for(q=q.child;q!==null;)s.push(q),q=q.sibling}return f}var Iu=Math.ceil,Cs=c.ReactCurrentDispatcher,El=c.ReactCurrentOwner,xn=c.ReactCurrentBatchConfig,Ct=0,tn=null,vn=null,kn=0,zn=0,Qo=er(0),mn=0,Ol=null,po=0,an=0,xl=0,ja=null,pr=null,Pl=0,ks=1/0,Tr=null;function Qt(){ks=$n()+500}var Pn=!1,Rn=null,Ci=null,Jo=!1,fi=null,Du=0,Mn=0,Ts=null,Cl=-1,kl=0;function fn(){return Ct&6?$n():Cl!==-1?Cl:Cl=$n()}function Bn(s){return s.mode&1?Ct&2&&kn!==0?kn&-kn:Wp.transition!==null?(kl===0&&(kl=eu()),kl):(s=It,s!==0?s:_e()):1}function gr(s,f,I,q){if(50<Mn)throw Mn=0,Ts=null,Error(u(185));ai(s,I,q),(!(Ct&2)||s!==tn)&&(s===tn&&(!(Ct&2)&&(an|=I),mn===4&&go(s,kn)),vr(s,q),I===1&&Ct===0&&!(f.mode&1)&&(Qt(),ll&&tr()))}function vr(s,f){var I=s.callbackNode;Yd(s,f);var q=rl(s,s===tn?kn:0);if(q===0)I!==null&&Kd(I),s.callbackNode=null,s.callbackPriority=0;else if(f=q&-q,s.callbackPriority!==f){if(I!=null&&Kd(I),f===1)s.tag===0?Zd(Jc.bind(null,s)):ou(Jc.bind(null,s)),fe?ge(function(){!(Ct&6)&&tr()}):Fi(tu,tr),I=null;else{switch(ol(q)){case 1:I=tu;break;case 4:I=nu;break;case 16:I=ru;break;case 536870912:I=$p;break;default:I=ru}I=lf(I,ju.bind(null,s))}s.callbackPriority=f,s.callbackNode=I}}function ju(s,f){if(Cl=-1,kl=0,Ct&6)throw Error(u(327));var I=s.callbackNode;if(vo()&&s.callbackNode!==I)return null;var q=rl(s,s===tn?kn:0);if(q===0)return null;if(q&30||q&s.expiredLanes||f)f=Fa(s,q);else{f=q;var W=Ct;Ct|=2;var ne=tf();(tn!==s||kn!==f)&&(Tr=null,Qt(),ea(s,f));do try{nf();break}catch(ye){Tl(s,ye)}while(!0);Tc(),Cs.current=ne,Ct=W,vn!==null?f=0:(tn=null,kn=0,f=mn)}if(f!==0){if(f===2&&(W=Js(s),W!==0&&(q=W,f=Fu(s,W))),f===1)throw I=Ol,ea(s,0),go(s,q),vr(s,$n()),I;if(f===6)go(s,q);else{if(W=s.current.alternate,!(q&30)&&!bh(W)&&(f=Fa(s,q),f===2&&(ne=Js(s),ne!==0&&(q=ne,f=Fu(s,ne))),f===1))throw I=Ol,ea(s,0),go(s,q),vr(s,$n()),I;switch(s.finishedWork=W,s.finishedLanes=q,f){case 0:case 1:throw Error(u(345));case 2:ta(s,pr,Tr);break;case 3:if(go(s,q),(q&130023424)===q&&(f=Pl+500-$n(),10<f)){if(rl(s,0)!==0)break;if(W=s.suspendedLanes,(W&q)!==q){fn(),s.pingedLanes|=s.suspendedLanes&W;break}s.timeoutHandle=Y(ta.bind(null,s,pr,Tr),f);break}ta(s,pr,Tr);break;case 4:if(go(s,q),(q&4194240)===q)break;for(f=s.eventTimes,W=-1;0<q;){var le=31-Gr(q);ne=1<<le,le=f[le],le>W&&(W=le),q&=~ne}if(q=W,q=$n()-q,q=(120>q?120:480>q?480:1080>q?1080:1920>q?1920:3e3>q?3e3:4320>q?4320:1960*Iu(q/1960))-q,10<q){s.timeoutHandle=Y(ta.bind(null,s,pr,Tr),q);break}ta(s,pr,Tr);break;case 5:ta(s,pr,Tr);break;default:throw Error(u(329))}}}return vr(s,$n()),s.callbackNode===I?ju.bind(null,s):null}function Fu(s,f){var I=ja;return s.current.memoizedState.isDehydrated&&(ea(s,f).flags|=256),s=Fa(s,f),s!==2&&(f=pr,pr=I,f!==null&&zu(f)),s}function zu(s){pr===null?pr=s:pr.push.apply(pr,s)}function bh(s){for(var f=s;;){if(f.flags&16384){var I=f.updateQueue;if(I!==null&&(I=I.stores,I!==null))for(var q=0;q<I.length;q++){var W=I[q],ne=W.getSnapshot;W=W.value;try{if(!wi(ne(),W))return!1}catch{return!1}}}if(I=f.child,f.subtreeFlags&16384&&I!==null)I.return=f,f=I;else{if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function go(s,f){for(f&=~xl,f&=~an,s.suspendedLanes|=f,s.pingedLanes&=~f,s=s.expirationTimes;0<f;){var I=31-Gr(f),q=1<<I;s[I]=-1,f&=~q}}function Jc(s){if(Ct&6)throw Error(u(327));vo();var f=rl(s,0);if(!(f&1))return vr(s,$n()),null;var I=Fa(s,f);if(s.tag!==0&&I===2){var q=Js(s);q!==0&&(f=q,I=Fu(s,q))}if(I===1)throw I=Ol,ea(s,0),go(s,f),vr(s,$n()),I;if(I===6)throw Error(u(345));return s.finishedWork=s.current.alternate,s.finishedLanes=f,ta(s,pr,Tr),vr(s,$n()),null}function ef(s){fi!==null&&fi.tag===0&&!(Ct&6)&&vo();var f=Ct;Ct|=1;var I=xn.transition,q=It;try{if(xn.transition=null,It=1,s)return s()}finally{It=q,xn.transition=I,Ct=f,!(Ct&6)&&tr()}}function Bu(){zn=Qo.current,un(Qo)}function ea(s,f){s.finishedWork=null,s.finishedLanes=0;var I=s.timeoutHandle;if(I!==re&&(s.timeoutHandle=re,te(I)),vn!==null)for(I=vn.return;I!==null;){var q=I;switch(us(q),q.tag){case 1:q=q.type.childContextTypes,q!=null&&pa();break;case 3:_a(),un(jr),un(fr),Ic();break;case 5:Lc(q);break;case 4:_a();break;case 13:un(En);break;case 19:un(En);break;case 10:fs(q.type._context);break;case 22:case 23:Bu()}I=I.return}if(tn=s,vn=s=na(s.current,null),kn=zn=f,mn=0,Ol=null,xl=an=po=0,pr=ja=null,zo!==null){for(f=0;f<zo.length;f++)if(I=zo[f],q=I.interleaved,q!==null){I.interleaved=null;var W=q.next,ne=I.pending;if(ne!==null){var le=ne.next;ne.next=W,q.next=le}I.pending=q}zo=null}return s}function Tl(s,f){do{var I=vn;try{if(Tc(),Br.current=Ca,hl){for(var q=pn.memoizedState;q!==null;){var W=q.queue;W!==null&&(W.pending=null),q=q.next}hl=!1}if(Ho=0,jn=An=pn=null,hs=!1,ps=0,El.current=null,I===null||I.return===null){mn=1,Ol=f,vn=null;break}e:{var ne=s,le=I.return,ye=I,Re=f;if(f=kn,ye.flags|=32768,Re!==null&&typeof Re=="object"&&typeof Re.then=="function"){var $e=Re,nt=ye,Et=nt.tag;if(!(nt.mode&1)&&(Et===0||Et===11||Et===15)){var Qe=nt.alternate;Qe?(nt.updateQueue=Qe.updateQueue,nt.memoizedState=Qe.memoizedState,nt.lanes=Qe.lanes):(nt.updateQueue=null,nt.memoizedState=null)}var ln=gh(le);if(ln!==null){ln.flags&=-257,$o(ln,le,ye,ne,f),ln.mode&1&&ph(ne,$e,f),f=ln,Re=$e;var Zt=f.updateQueue;if(Zt===null){var Ar=new Set;Ar.add(Re),f.updateQueue=Ar}else Zt.add(Re);break e}else{if(!(f&1)){ph(ne,$e,f),Al();break e}Re=Error(u(426))}}else if(cn&&ye.mode&1){var Wi=gh(le);if(Wi!==null){!(Wi.flags&65536)&&(Wi.flags|=256),$o(Wi,le,ye,ne,f),Cc(ka(Re,ye));break e}}ne=Re=ka(Re,ye),mn!==4&&(mn=2),ja===null?ja=[ne]:ja.push(ne),ne=le;do{switch(ne.tag){case 3:ne.flags|=65536,f&=-f,ne.lanes|=f;var ke=Bi(ne,Re,f);fl(ne,ke);break e;case 1:ye=Re;var we=ne.type,Me=ne.stateNode;if(!(ne.flags&128)&&(typeof we.getDerivedStateFromError=="function"||Me!==null&&typeof Me.componentDidCatch=="function"&&(Ci===null||!Ci.has(Me)))){ne.flags|=65536,f&=-f,ne.lanes|=f;var Je=Ou(ne,ye,f);fl(ne,Je);break e}}ne=ne.return}while(ne!==null)}of(I)}catch(gt){f=gt,vn===I&&I!==null&&(vn=I=I.return);continue}break}while(!0)}function tf(){var s=Cs.current;return Cs.current=Ca,s===null?Ca:s}function Al(){(mn===0||mn===3||mn===2)&&(mn=4),tn===null||!(po&268435455)&&!(an&268435455)||go(tn,kn)}function Fa(s,f){var I=Ct;Ct|=2;var q=tf();(tn!==s||kn!==f)&&(Tr=null,ea(s,f));do try{_h();break}catch(W){Tl(s,W)}while(!0);if(Tc(),Ct=I,Cs.current=q,vn!==null)throw Error(u(261));return tn=null,kn=0,mn}function _h(){for(;vn!==null;)rf(vn)}function nf(){for(;vn!==null&&!Xd();)rf(vn)}function rf(s){var f=xh(s.alternate,s,zn);s.memoizedProps=s.pendingProps,f===null?of(s):vn=f,El.current=null}function of(s){var f=s;do{var I=f.alternate;if(s=f.return,f.flags&32768){if(I=mh(I,f),I!==null){I.flags&=32767,vn=I;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{mn=6,vn=null;return}}else if(I=La(I,f,zn),I!==null){vn=I;return}if(f=f.sibling,f!==null){vn=f;return}vn=f=s}while(f!==null);mn===0&&(mn=5)}function ta(s,f,I){var q=It,W=xn.transition;try{xn.transition=null,It=1,wh(s,f,I,q)}finally{xn.transition=W,It=q}return null}function wh(s,f,I,q){do vo();while(fi!==null);if(Ct&6)throw Error(u(327));I=s.finishedWork;var W=s.finishedLanes;if(I===null)return null;if(s.finishedWork=null,s.finishedLanes=0,I===s.current)throw Error(u(177));s.callbackNode=null,s.callbackPriority=0;var ne=I.lanes|I.childLanes;if(Do(s,ne),s===tn&&(vn=tn=null,kn=0),!(I.subtreeFlags&2064)&&!(I.flags&2064)||Jo||(Jo=!0,lf(ru,function(){return vo(),null})),ne=(I.flags&15990)!==0,I.subtreeFlags&15990||ne){ne=xn.transition,xn.transition=null;var le=It;It=1;var ye=Ct;Ct|=4,El.current=null,yh(s,I),Os(I,s),L(s.containerInfo),s.current=I,wl(I),as(),Ct=ye,It=le,xn.transition=ne}else s.current=I;if(Jo&&(Jo=!1,fi=s,Du=W),ne=s.pendingLanes,ne===0&&(Ci=null),al(I.stateNode),vr(s,$n()),f!==null)for(q=s.onRecoverableError,I=0;I<f.length;I++)W=f[I],q(W.value,{componentStack:W.stack,digest:W.digest});if(Pn)throw Pn=!1,s=Rn,Rn=null,s;return Du&1&&s.tag!==0&&vo(),ne=s.pendingLanes,ne&1?s===Ts?Mn++:(Mn=0,Ts=s):Mn=0,tr(),null}function vo(){if(fi!==null){var s=ol(Du),f=xn.transition,I=It;try{if(xn.transition=null,It=16>s?16:s,fi===null)var q=!1;else{if(s=fi,fi=null,Du=0,Ct&6)throw Error(u(331));var W=Ct;for(Ct|=4,Ke=s.current;Ke!==null;){var ne=Ke,le=ne.child;if(Ke.flags&16){var ye=ne.deletions;if(ye!==null){for(var Re=0;Re<ye.length;Re++){var $e=ye[Re];for(Ke=$e;Ke!==null;){var nt=Ke;switch(nt.tag){case 0:case 11:case 15:Na(8,nt,ne)}var Et=nt.child;if(Et!==null)Et.return=nt,Ke=Et;else for(;Ke!==null;){nt=Ke;var Qe=nt.sibling,ln=nt.return;if(Ss(nt),nt===$e){Ke=null;break}if(Qe!==null){Qe.return=ln,Ke=Qe;break}Ke=ln}}}var Zt=ne.alternate;if(Zt!==null){var Ar=Zt.child;if(Ar!==null){Zt.child=null;do{var Wi=Ar.sibling;Ar.sibling=null,Ar=Wi}while(Ar!==null)}}Ke=ne}}if(ne.subtreeFlags&2064&&le!==null)le.return=ne,Ke=le;else e:for(;Ke!==null;){if(ne=Ke,ne.flags&2048)switch(ne.tag){case 0:case 11:case 15:Na(9,ne,ne.return)}var ke=ne.sibling;if(ke!==null){ke.return=ne.return,Ke=ke;break e}Ke=ne.return}}var we=s.current;for(Ke=we;Ke!==null;){le=Ke;var Me=le.child;if(le.subtreeFlags&2064&&Me!==null)Me.return=le,Ke=Me;else e:for(le=we;Ke!==null;){if(ye=Ke,ye.flags&2048)try{switch(ye.tag){case 0:case 11:case 15:_l(9,ye)}}catch(gt){dn(ye,ye.return,gt)}if(ye===le){Ke=null;break e}var Je=ye.sibling;if(Je!==null){Je.return=ye.return,Ke=Je;break e}Ke=ye.return}}if(Ct=W,tr(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(jo,s)}catch{}q=!0}return q}finally{It=I,xn.transition=f}}return!1}function af(s,f,I){f=ka(I,f),f=Bi(s,f,1),s=so(s,f,1),f=fn(),s!==null&&(ai(s,1,f),vr(s,f))}function dn(s,f,I){if(s.tag===3)af(s,s,I);else for(;f!==null;){if(f.tag===3){af(f,s,I);break}else if(f.tag===1){var q=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof q.componentDidCatch=="function"&&(Ci===null||!Ci.has(q))){s=ka(I,s),s=Ou(f,s,1),f=so(f,s,1),s=fn(),f!==null&&(ai(f,1,s),vr(f,s));break}}f=f.return}}function Sh(s,f,I){var q=s.pingCache;q!==null&&q.delete(f),f=fn(),s.pingedLanes|=s.suspendedLanes&I,tn===s&&(kn&I)===I&&(mn===4||mn===3&&(kn&130023424)===kn&&500>$n()-Pl?ea(s,0):xl|=I),vr(s,f)}function Eh(s,f){f===0&&(s.mode&1?(f=os,os<<=1,!(os&130023424)&&(os=4194304)):f=1);var I=fn();s=xi(s,f),s!==null&&(ai(s,f,I),vr(s,I))}function Oh(s){var f=s.memoizedState,I=0;f!==null&&(I=f.retryLane),Eh(s,I)}function Xp(s,f){var I=0;switch(s.tag){case 13:var q=s.stateNode,W=s.memoizedState;W!==null&&(I=W.retryLane);break;case 19:q=s.stateNode;break;default:throw Error(u(314))}q!==null&&q.delete(f),Eh(s,I)}var xh;xh=function(s,f,I){if(s!==null)if(s.memoizedProps!==f.pendingProps||jr.current)Fn=!0;else{if(!(s.lanes&I)&&!(f.flags&128))return Fn=!1,Yo(s,f,I);Fn=!!(s.flags&131072)}else Fn=!1,cn&&f.flags&1048576&&Qd(f,ga,f.index);switch(f.lanes=0,f.tag){case 2:var q=f.type;ws(s,f),s=f.pendingProps;var W=io(f,fr.current);cl(f,I),W=gs(null,f,q,s,W,I);var ne=gu();return f.flags|=1,typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Vn(q)?(ne=!0,tl(f)):ne=!1,f.memoizedState=W.state!==null&&W.state!==void 0?W.state:null,Rc(f),W.updater=ys,f.stateNode=W,W._reactInternals=f,zi(f,q,s,I),f=dr(null,f,q,!0,ne,I)):(f.tag=0,cn&&ne&&ss(f),Yn(null,f,W,I),f=f.child),f;case 16:q=f.elementType;e:{switch(ws(s,f),s=f.pendingProps,W=q._init,q=W(q._payload),f.type=q,W=f.tag=Zp(q),s=Kr(q,s),W){case 0:f=Ui(null,f,q,s,I);break e;case 1:f=ir(null,f,q,s,I);break e;case 11:f=xu(null,f,q,s,I);break e;case 14:f=Ta(null,f,q,Kr(q.type,s),I);break e}throw Error(u(306,q,""))}return f;case 0:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),Ui(s,f,q,W,I);case 1:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),ir(s,f,q,W,I);case 3:e:{if(Wo(f),s===null)throw Error(u(387));q=f.pendingProps,ne=f.memoizedState,W=ne.element,ah(s,f),Bo(f,q,null,I);var le=f.memoizedState;if(q=le.element,de&&ne.isDehydrated)if(ne={element:q,isDehydrated:!1,cache:le.cache,pendingSuspenseBoundaries:le.pendingSuspenseBoundaries,transitions:le.transitions},f.updateQueue.baseState=ne,f.memoizedState=ne,f.flags&256){W=ka(Error(u(423)),f),f=Aa(s,f,q,I,W);break e}else if(q!==W){W=ka(Error(u(424)),f),f=Aa(s,f,q,I,W);break e}else for(de&&(Or=St(f.stateNode.containerInfo),nr=f,cn=!0,Oi=null,cs=!1),I=ih(f,null,q,I),f.child=I;I;)I.flags=I.flags&-3|4096,I=I.sibling;else{if(va(),q===W){f=fo(s,f,I);break e}Yn(s,f,q,I)}f=f.child}return f;case 5:return Mc(f),s===null&&Pc(f),q=f.type,W=f.pendingProps,ne=s!==null?s.memoizedProps:null,le=W.children,V(q,W)?le=null:ne!==null&&V(q,ne)&&(f.flags|=32),en(s,f),Yn(s,f,le,I),f.child;case 6:return s===null&&Pc(f),null;case 13:return Kc(s,f,I);case 4:return hu(f,f.stateNode.containerInfo),q=f.pendingProps,s===null?f.child=ya(f,null,q,I):Yn(s,f,q,I),f.child;case 11:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),xu(s,f,q,W,I);case 7:return Yn(s,f,f.pendingProps,I),f.child;case 8:return Yn(s,f,f.pendingProps.children,I),f.child;case 12:return Yn(s,f,f.pendingProps.children,I),f.child;case 10:e:{if(q=f.type._context,W=f.pendingProps,ne=f.memoizedProps,le=W.value,oh(f,q,le),ne!==null)if(wi(ne.value,le)){if(ne.children===W.children&&!jr.current){f=fo(s,f,I);break e}}else for(ne=f.child,ne!==null&&(ne.return=f);ne!==null;){var ye=ne.dependencies;if(ye!==null){le=ne.child;for(var Re=ye.firstContext;Re!==null;){if(Re.context===q){if(ne.tag===1){Re=lo(-1,I&-I),Re.tag=2;var $e=ne.updateQueue;if($e!==null){$e=$e.shared;var nt=$e.pending;nt===null?Re.next=Re:(Re.next=nt.next,nt.next=Re),$e.pending=Re}}ne.lanes|=I,Re=ne.alternate,Re!==null&&(Re.lanes|=I),ba(ne.return,I,f),ye.lanes|=I;break}Re=Re.next}}else if(ne.tag===10)le=ne.type===f.type?null:ne.child;else if(ne.tag===18){if(le=ne.return,le===null)throw Error(u(341));le.lanes|=I,ye=le.alternate,ye!==null&&(ye.lanes|=I),ba(le,I,f),le=ne.sibling}else le=ne.child;if(le!==null)le.return=ne;else for(le=ne;le!==null;){if(le===f){le=null;break}if(ne=le.sibling,ne!==null){ne.return=le.return,le=ne;break}le=le.return}ne=le}Yn(s,f,W.children,I),f=f.child}return f;case 9:return W=f.type,q=f.pendingProps.children,cl(f,I),W=$r(W),q=q(W),f.flags|=1,Yn(s,f,q,I),f.child;case 14:return q=f.type,W=Kr(q,f.pendingProps),W=Kr(q.type,W),Ta(s,f,q,W,I);case 15:return co(s,f,f.type,f.pendingProps,I);case 17:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),ws(s,f),f.tag=1,Vn(q)?(s=!0,tl(f)):s=!1,cl(f,I),hh(f,q,W),zi(f,q,W,I),dr(null,f,q,!0,s,I);case 19:return Cu(s,f,I);case 22:return on(s,f,I)}throw Error(u(156,f.tag))};function lf(s,f){return Fi(s,f)}function Ph(s,f,I,q){this.tag=s,this.key=I,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(s,f,I,q){return new Ph(s,f,I,q)}function Rl(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Zp(s){if(typeof s=="function")return Rl(s)?1:0;if(s!=null){if(s=s.$$typeof,s===g)return 11;if(s===d)return 14}return 2}function na(s,f){var I=s.alternate;return I===null?(I=ti(s.tag,f,s.key,s.mode),I.elementType=s.elementType,I.type=s.type,I.stateNode=s.stateNode,I.alternate=s,s.alternate=I):(I.pendingProps=f,I.type=s.type,I.flags=0,I.subtreeFlags=0,I.deletions=null),I.flags=s.flags&14680064,I.childLanes=s.childLanes,I.lanes=s.lanes,I.child=s.child,I.memoizedProps=s.memoizedProps,I.memoizedState=s.memoizedState,I.updateQueue=s.updateQueue,f=s.dependencies,I.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},I.sibling=s.sibling,I.index=s.index,I.ref=s.ref,I}function Uu(s,f,I,q,W,ne){var le=2;if(q=s,typeof s=="function")Rl(s)&&(le=1);else if(typeof s=="string")le=5;else e:switch(s){case _:return or(I.children,W,ne,f);case k:le=8,W|=8;break;case E:return s=ti(12,I,f,W|2),s.elementType=E,s.lanes=ne,s;case p:return s=ti(13,I,f,W),s.elementType=p,s.lanes=ne,s;case P:return s=ti(19,I,f,W),s.elementType=P,s.lanes=ne,s;case y:return Ml(I,W,ne,f);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case v:le=10;break e;case O:le=9;break e;case g:le=11;break e;case d:le=14;break e;case m:le=16,q=null;break e}throw Error(u(130,s==null?s:typeof s,""))}return f=ti(le,I,f,W),f.elementType=s,f.type=q,f.lanes=ne,f}function or(s,f,I,q){return s=ti(7,s,q,f),s.lanes=I,s}function Ml(s,f,I,q){return s=ti(22,s,q,f),s.elementType=y,s.lanes=I,s.stateNode={isHidden:!1},s}function Ll(s,f,I){return s=ti(6,s,null,f),s.lanes=I,s}function qu(s,f,I){return f=ti(4,s.children!==null?s.children:[],s.key,f),f.lanes=I,f.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},f}function Ch(s,f,I,q,W){this.tag=f,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=re,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=il(0),this.expirationTimes=il(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=il(0),this.identifierPrefix=q,this.onRecoverableError=W,de&&(this.mutableSourceEagerHydrationData=null)}function sf(s,f,I,q,W,ne,le,ye,Re){return s=new Ch(s,f,I,ye,Re),f===1?(f=1,ne===!0&&(f|=8)):f=0,ne=ti(3,null,null,f),s.current=ne,ne.stateNode=s,ne.memoizedState={element:q,isDehydrated:I,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rc(ne),s}function Hu(s){if(!s)return Io;s=s._reactInternals;e:{if(x(s)!==s||s.tag!==1)throw Error(u(170));var f=s;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Vn(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(u(171))}if(s.tag===1){var I=s.type;if(Vn(I))return $d(s,I,f)}return f}function za(s){var f=s._reactInternals;if(f===void 0)throw typeof s.render=="function"?Error(u(188)):(s=Object.keys(s).join(","),Error(u(268,s)));return s=M(f),s===null?null:s.stateNode}function Gu(s,f){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var I=s.retryLane;s.retryLane=I!==0&&I<f?I:f}}function Nl(s,f){Gu(s,f),(s=s.alternate)&&Gu(s,f)}function Qp(s){return s=M(s),s===null?null:s.stateNode}function kh(){return null}return t.attemptContinuousHydration=function(s){if(s.tag===13){var f=xi(s,134217728);if(f!==null){var I=fn();gr(f,s,134217728,I)}Nl(s,134217728)}},t.attemptDiscreteHydration=function(s){if(s.tag===13){var f=xi(s,1);if(f!==null){var I=fn();gr(f,s,1,I)}Nl(s,1)}},t.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var f=Bn(s),I=xi(s,f);if(I!==null){var q=fn();gr(I,s,f,q)}Nl(s,f)}},t.attemptSynchronousHydration=function(s){switch(s.tag){case 3:var f=s.stateNode;if(f.current.memoizedState.isDehydrated){var I=nl(f.pendingLanes);I!==0&&(ji(f,I|1),vr(f,$n()),!(Ct&6)&&(Qt(),tr()))}break;case 13:ef(function(){var q=xi(s,1);if(q!==null){var W=fn();gr(q,s,1,W)}}),Nl(s,1)}},t.batchedUpdates=function(s,f){var I=Ct;Ct|=1;try{return s(f)}finally{Ct=I,Ct===0&&(Qt(),ll&&tr())}},t.createComponentSelector=function(s){return{$$typeof:ho,value:s}},t.createContainer=function(s,f,I,q,W,ne,le){return sf(s,f,!1,null,I,q,W,ne,le)},t.createHasPseudoClassSelector=function(s){return{$$typeof:kr,value:s}},t.createHydrationContainer=function(s,f,I,q,W,ne,le,ye,Re){return s=sf(I,q,!0,s,W,ne,le,ye,Re),s.context=Hu(null),I=s.current,q=fn(),W=Bn(I),ne=lo(q,W),ne.callback=f??null,so(I,ne,W),s.current.lanes=W,ai(s,W,q),vr(s,q),s},t.createPortal=function(s,f,I){var q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:q==null?null:""+q,children:s,containerInfo:f,implementation:I}},t.createRoleSelector=function(s){return{$$typeof:Hi,value:s}},t.createTestNameSelector=function(s){return{$$typeof:Sl,value:s}},t.createTextSelector=function(s){return{$$typeof:xs,value:s}},t.deferredUpdates=function(s){var f=It,I=xn.transition;try{return xn.transition=null,It=16,s()}finally{It=f,xn.transition=I}},t.discreteUpdates=function(s,f,I,q,W){var ne=It,le=xn.transition;try{return xn.transition=null,It=1,s(f,I,q,W)}finally{It=ne,xn.transition=le,Ct===0&&Qt()}},t.findAllNodes=$i,t.findBoundingRects=function(s,f){if(!Ce)throw Error(u(363));f=$i(s,f),s=[];for(var I=0;I<f.length;I++)s.push(se(f[I]));for(f=s.length-1;0<f;f--){I=s[f];for(var q=I.x,W=q+I.width,ne=I.y,le=ne+I.height,ye=f-1;0<=ye;ye--)if(f!==ye){var Re=s[ye],$e=Re.x,nt=$e+Re.width,Et=Re.y,Qe=Et+Re.height;if(q>=$e&&ne>=Et&&W<=nt&&le<=Qe){s.splice(f,1);break}else if(q!==$e||I.width!==Re.width||Qe<ne||Et>le){if(!(ne!==Et||I.height!==Re.height||nt<q||$e>W)){$e>q&&(Re.width+=$e-q,Re.x=q),nt<W&&(Re.width=W-$e),s.splice(f,1);break}}else{Et>ne&&(Re.height+=Et-ne,Re.y=ne),Qe<le&&(Re.height=le-Et),s.splice(f,1);break}}}return s},t.findHostInstance=za,t.findHostInstanceWithNoPortals=function(s){return s=A(s),s=s!==null?z(s):null,s===null?null:s.stateNode},t.findHostInstanceWithWarning=function(s){return za(s)},t.flushControlled=function(s){var f=Ct;Ct|=1;var I=xn.transition,q=It;try{xn.transition=null,It=1,s()}finally{It=q,xn.transition=I,Ct=f,Ct===0&&(Qt(),tr())}},t.flushPassiveEffects=vo,t.flushSync=ef,t.focusWithin=function(s,f){if(!Ce)throw Error(u(363));for(s=Gi(s),f=Vi(s,f),f=Array.from(f),s=0;s<f.length;){var I=f[s++];if(!xe(I)){if(I.tag===5&&ct(I.stateNode))return!0;for(I=I.child;I!==null;)f.push(I),I=I.sibling}}return!1},t.getCurrentUpdatePriority=function(){return It},t.getFindAllNodesFailureDescription=function(s,f){if(!Ce)throw Error(u(363));var I=0,q=[];s=[Gi(s),0];for(var W=0;W<s.length;){var ne=s[W++],le=s[W++],ye=f[le];if((ne.tag!==5||!xe(ne))&&(Ps(ne,ye)&&(q.push(Nu(ye)),le++,le>I&&(I=le)),le<f.length))for(ne=ne.child;ne!==null;)s.push(ne,le),ne=ne.sibling}if(I<f.length){for(s=[];I<f.length;I++)s.push(Nu(f[I]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(q.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+s.join(" > ")}return null},t.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return Q(s.child.stateNode);default:return s.child.stateNode}},t.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:c.ReactCurrentDispatcher,findHostInstanceByFiber:Qp,findFiberByHostInstance:s.findFiberByHostInstance||kh,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)s=!0;else{try{jo=f.inject(s),Fr=f}catch{}s=!!f.checkDCE}}return s},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(s,f,I,q){if(!Ce)throw Error(u(363));s=$i(s,f);var W=at(s,I,q).disconnect;return{disconnect:function(){W()}}},t.registerMutableSourceForHydration=function(s,f){var I=f._getVersion;I=I(f._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[f,I]:s.mutableSourceEagerHydrationData.push(f,I)},t.runWithPriority=function(s,f){var I=It;try{return It=s,f()}finally{It=I}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(s,f,I,q){var W=f.current,ne=fn(),le=Bn(W);return I=Hu(I),f.context===null?f.context=I:f.pendingContext=I,f=lo(ne,le),f.payload={element:s},q=q===void 0?null:q,q!==null&&(f.callback=q),s=so(W,f,le),s!==null&&(gr(s,W,le,ne),ds(s,W,le)),le},t}),G0}var Ly;function B8(){return Ly||(Ly=1,H0.exports=z8()),H0.exports}var U8=B8();const q8=Ad(U8);var V0={exports:{}},Hl={};/**
|
|
62
|
-
* @license React
|
|
63
|
-
* react-reconciler-constants.production.min.js
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the MIT license found in the
|
|
68
|
-
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var Ny;function H8(){return Ny||(Ny=1,Hl.ConcurrentRoot=1,Hl.ContinuousEventPriority=4,Hl.DefaultEventPriority=16,Hl.DiscreteEventPriority=1,Hl.IdleEventPriority=536870912,Hl.LegacyRoot=0),Hl}var Iy;function G8(){return Iy||(Iy=1,V0.exports=H8()),V0.exports}var b5=G8(),V8=Lt();const Dy={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let jy=!1,Fy=!1;const iv=".react-konva-event";let _5=!1;function $8(e){_5=e}const W8=`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
|
-
`,Y8=`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
|
-
`,K8={};function Dp(e,i,t=K8){if(!jy&&"zIndex"in i&&(console.warn(Y8),jy=!0),!Fy&&i.draggable){var n=i.x!==void 0||i.y!==void 0,a=i.onDragEnd||i.onDragMove;n&&!a&&(console.warn(W8),Fy=!0)}for(var l in t)if(!Dy[l]){var u=l.slice(0,2)==="on",c=t[l]!==i[l];if(u&&c){var h=l.substr(2).toLowerCase();h.substr(0,7)==="content"&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),e.off(h,t[l])}var b=!i.hasOwnProperty(l);b&&e.setAttr(l,void 0)}var _=_5||i._useStrictMode,k={},E=!1;const v={};for(var l in i)if(!Dy[l]){var u=l.slice(0,2)==="on",O=t[l]!==i[l];if(u&&O){var h=l.substr(2).toLowerCase();h.substr(0,7)==="content"&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),i[l]&&(v[h]=i[l])}!u&&(i[l]!==t[l]||_&&i[l]!==e.getAttr(l))&&(E=!0,k[l]=i[l])}E&&(e.setAttrs(k),es(e));for(var h in v)e.on(h+iv,v[h])}function es(e){if(!V8.Konva.autoDrawEnabled){var i=e.getLayer()||e.getStage();i&&i.batchDraw()}}var $0=Mg();const w5={},X8={};xd.Node.prototype._applyProps=Dp;function Z8(e,i){if(typeof i=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${i}`);return}e.add(i),es(e)}function Q8(e,i,t){let n=xd[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=xd.Group);const a={},l={};for(var u in i){var c=u.slice(0,2)==="on";c?l[u]=i[u]:a[u]=i[u]}const h=new n(a);return Dp(h,l),h}function J8(e,i,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function e9(e,i,t){return!1}function t9(e){return e}function n9(){return null}function r9(){return null}function i9(e,i,t,n){return X8}function o9(){}function a9(e){}function l9(e,i){return!1}function s9(){return w5}function u9(){return w5}const c9=setTimeout,f9=clearTimeout,d9=-1;function h9(e,i){return!1}const p9=!1,g9=!0,v9=!0;function m9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function y9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function S5(e,i,t){i._remove(),e.add(i),i.setZIndex(t.getZIndex()),es(e)}function b9(e,i,t){S5(e,i,t)}function _9(e,i){i.destroy(),i.off(iv),es(e)}function w9(e,i){i.destroy(),i.off(iv),es(e)}function S9(e,i,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function E9(e,i,t){}function O9(e,i,t,n,a){Dp(e,a,n)}function x9(e){e.hide(),es(e)}function P9(e){}function C9(e,i){(i.visible==null||i.visible)&&e.show()}function k9(e,i){}function T9(e){}function A9(){}const R9=()=>b5.DefaultEventPriority,M9=Object.freeze(Object.defineProperty({__proto__:null,appendChild:m9,appendChildToContainer:y9,appendInitialChild:Z8,cancelTimeout:f9,clearContainer:T9,commitMount:E9,commitTextUpdate:S9,commitUpdate:O9,createInstance:Q8,createTextInstance:J8,detachDeletedInstance:A9,finalizeInitialChildren:e9,getChildHostContext:u9,getCurrentEventPriority:R9,getPublicInstance:t9,getRootHostContext:s9,hideInstance:x9,hideTextInstance:P9,idlePriority:$0.unstable_IdlePriority,insertBefore:S5,insertInContainerBefore:b9,isPrimaryRenderer:p9,noTimeout:d9,now:$0.unstable_now,prepareForCommit:n9,preparePortalMount:r9,prepareUpdate:i9,removeChild:_9,removeChildFromContainer:w9,resetAfterCommit:o9,resetTextContent:a9,run:$0.unstable_runWithPriority,scheduleTimeout:c9,shouldDeprioritizeSubtree:l9,shouldSetTextContent:h9,supportsMutation:v9,unhideInstance:C9,unhideTextInstance:k9,warnsIfNotActing:g9},Symbol.toStringTag,{value:"Module"}));var L9=Object.defineProperty,N9=Object.defineProperties,I9=Object.getOwnPropertyDescriptors,zy=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,j9=Object.prototype.propertyIsEnumerable,By=(e,i,t)=>i in e?L9(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,Uy=(e,i)=>{for(var t in i||(i={}))D9.call(i,t)&&By(e,t,i[t]);if(zy)for(var t of zy(i))j9.call(i,t)&&By(e,t,i[t]);return e},F9=(e,i)=>N9(e,I9(i)),qy,Hy;typeof window<"u"&&((qy=window.document)!=null&&qy.createElement||((Hy=window.navigator)==null?void 0:Hy.product)==="ReactNative")?On.useLayoutEffect:On.useEffect;function E5(e,i,t){if(!e)return;if(t(e)===!0)return e;let n=e.child;for(;n;){const a=E5(n,i,t);if(a)return a;n=n.sibling}}function O5(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Gy=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=Gy;return}return Gy.apply(this,arguments)};const ov=O5(On.createContext(null));class x5 extends On.Component{render(){return On.createElement(ov.Provider,{value:this._reactInternals},this.props.children)}}function z9(){const e=On.useContext(ov);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const i=On.useId();return On.useMemo(()=>{for(const n of[e,e==null?void 0:e.alternate]){if(!n)continue;const a=E5(n,!1,l=>{let u=l.memoizedState;for(;u;){if(u.memoizedState===i)return!0;u=u.next}});if(a)return a}},[e,i])}function B9(){const e=z9(),[i]=On.useState(()=>new Map);i.clear();let t=e;for(;t;){if(t.type&&typeof t.type=="object"){const a=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;a&&a!==ov&&!i.has(a)&&i.set(a,On.useContext(O5(a)))}t=t.return}return i}function P5(){const e=B9();return On.useMemo(()=>Array.from(e.keys()).reduce((i,t)=>n=>On.createElement(i,null,On.createElement(t.Provider,F9(Uy({},n),{value:e.get(t)}))),i=>On.createElement(x5,Uy({},i))),[e])}function U9(e){const i=zt.useRef({});return zt.useLayoutEffect(()=>{i.current=e}),zt.useLayoutEffect(()=>()=>{i.current={}},[]),i.current}const q9=e=>{const i=zt.useRef(),t=zt.useRef(),n=zt.useRef(),a=U9(e),l=P5(),u=c=>{const{forwardedRef:h}=e;h&&(typeof h=="function"?h(c):h.current=c)};return zt.useLayoutEffect(()=>(t.current=new xd.Stage({width:e.width,height:e.height,container:i.current}),u(t.current),n.current=nc.createContainer(t.current,b5.LegacyRoot,!1,null),nc.updateContainer(zt.createElement(l,{},e.children),n.current),()=>{xd.isBrowser&&(u(null),nc.updateContainer(null,n.current,null),t.current.destroy())}),[]),zt.useLayoutEffect(()=>{u(t.current),Dp(t.current,e,a),nc.updateContainer(zt.createElement(l,{},e.children),n.current,null)}),zt.createElement("div",{ref:i,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},H9="Layer",G9="FastLayer",mp="Group",V9="Label",$9="Rect",W9="Circle",Y9="Ellipse",K9="Wedge",X9="Line",Z9="Sprite",Q9="Image",J9="Text",e7="TextPath",t7="Star",n7="Ring",r7="Arc",i7="Tag",o7="Path",a7="RegularPolygon",l7="Arrow",s7="Shape",u7="Transformer",nc=q8(M9);nc.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:zt.version,rendererPackageName:"react-konva"});const c7=zt.forwardRef((e,i)=>zt.createElement(x5,{},zt.createElement(q9,{...e,forwardedRef:i}))),f7=$8,d7=Object.freeze(Object.defineProperty({__proto__:null,Arc:r7,Arrow:l7,Circle:W9,Ellipse:Y9,FastLayer:G9,Group:mp,Image:Q9,KonvaRenderer:nc,Label:V9,Layer:H9,Line:X9,Path:o7,Rect:$9,RegularPolygon:a7,Ring:n7,Shape:s7,Sprite:Z9,Stage:c7,Star:t7,Tag:i7,Text:J9,TextPath:e7,Transformer:u7,Wedge:K9,useStrictMode:f7},Symbol.toStringTag,{value:"Module"})),Ja=Xl(d7);var W0,Vy;function jp(){if(Vy)return W0;Vy=1;var e=Tn();return W0=function(t,n,a){const l=e.useRef("loading"),u=e.useRef(),[c,h]=e.useState(0),b=e.useRef(),_=e.useRef(),k=e.useRef();return(b.current!==t||_.current!==n||k.current!==a)&&(l.current="loading",u.current=void 0,b.current=t,_.current=n,k.current=a),e.useLayoutEffect(function(){if(!t)return;var E=document.createElement("img");function v(){l.current="loaded",u.current=E,h(Math.random())}function O(){l.current="failed",u.current=void 0,h(Math.random())}return E.addEventListener("load",v),E.addEventListener("error",O),n&&(E.crossOrigin=n),a&&(E.referrerPolicy=a),E.src=t,function(){E.removeEventListener("load",v),E.removeEventListener("error",O)}},[t,n,a]),[u.current,l.current]},W0}var rd={},id={},h7=function(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)i.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const p7=e=>{const i=window.getComputedStyle(e).position;return!(i==="absolute"||i==="relative")};function C5(e=()=>{}){const i=zt.useRef(e);return i.current=e,zt.useCallback((...t)=>i.current.apply(null,t),[])}const g7=({children:e,groupProps:i,divProps:t,transform:n,transformFunc:a})=>{const l=P5(),u=zt.useRef(null);zt.useRef();const[c]=zt.useState(()=>document.createElement("div")),h=zt.useMemo(()=>o3.createRoot(c),[c]),b=n??!0,_=C5(()=>{if(b&&u.current){let g=u.current.getAbsoluteTransform().decompose();a&&(g=a(g)),c.style.position="absolute",c.style.zIndex="10",c.style.top="0px",c.style.left="0px",c.style.transform=`translate(${g.x}px, ${g.y}px) rotate(${g.rotation}deg) scaleX(${g.scaleX}) scaleY(${g.scaleY})`,c.style.transformOrigin="top left"}else c.style.position="",c.style.zIndex="",c.style.top="",c.style.left="",c.style.transform="",c.style.transformOrigin="";const k=t||{},{style:E}=k,v=h7(k,["style"]);Object.assign(c.style,E),Object.assign(c,v)});return zt.useLayoutEffect(()=>{var k;const E=u.current;if(!E)return;const v=(k=E.getStage())===null||k===void 0?void 0:k.container();if(v)return v.appendChild(c),b&&p7(v)&&(v.style.position="relative"),E.on("absoluteTransformChange",_),_(),()=>{var O;E.off("absoluteTransformChange",_),(O=c.parentNode)===null||O===void 0||O.removeChild(c)}},[b]),zt.useLayoutEffect(()=>{_()},[t,a]),zt.useLayoutEffect(()=>{h.render(zt.createElement(l,null,e))}),zt.useLayoutEffect(()=>()=>{setTimeout(()=>{h.unmount()})},[]),zt.createElement(mp,Object.assign({ref:u},i))},v7=({selector:e,enabled:i,children:t})=>{const n=zt.useRef(null),a=zt.useRef(null),l=zt.useRef(),u=i??!0;return zt.useLayoutEffect(()=>{if(!n.current||!a.current)return;l.current=a.current;const h=n.current.getStage().findOne(e);u&&h?a.current.moveTo(h):a.current.moveTo(n.current);const b=n.current.getLayer();if(b&&(b.batchDraw(),h)){const _=h.getLayer();if(!_)return;_.batchDraw()}},[e,u]),zt.useEffect(()=>()=>{var c;(c=l.current)===null||c===void 0||c.destroy()},[]),zt.createElement(mp,{name:"_outer_portal",ref:n},zt.createElement(mp,{name:"_inner_portal",ref:a},t))};var m7=jp();const y7=Ad(m7),b7=Object.freeze(Object.defineProperty({__proto__:null,Html:g7,Portal:v7,useEvent:C5,useImage:y7},Symbol.toStringTag,{value:"Module"})),Fd=Xl(b7);function _7(e,i){return Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(i))),e}function k5(e,i,t){const n=i-1,a=t[A5(n,t.length)];return a.marker!=="Z"?a:k5(e,n,t)}function T5(e,i,t){const n=i+1,a=t[A5(n,t.length)];return a.marker==="Z"?T5(e,n,t):a}function w7(e,i,t){let n=t[i-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":e.values.x+=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 l=function(c,h){return c[h].marker==="M"?c[h]:l(c,h-1)};var a=l;let u=l(t,i);e.values.x=u.values.x,e.values.y=u.values.y}return e}function S7(e,i){const t=[];switch(e.toUpperCase()){case"M":for(let n=0;n<i.length;n+=2){let a;e===e.toUpperCase()?a=n===0?"M":"L":a=n===0?"m":"l",t.push({marker:a,values:{x:i[n],y:i[n+1]}})}break;case"L":for(let n=0;n<i.length;n+=2)t.push({marker:e,values:{x:i[n],y:i[n+1]}});break;case"H":for(let n=0;n<i.length;n++)t.push({marker:e,values:{x:i[n],y:0}});break;case"V":for(let n=0;n<i.length;n++)t.push({marker:e,values:{x:0,y:i[n]}});break;case"C":for(let n=0;n<i.length;n+=6)t.push({marker:e,values:{x1:i[n],y1:i[n+1],x2:i[n+2],y2:i[n+3],x:i[n+4],y:i[n+5]}});break;case"S":for(let n=0;n<i.length;n+=4)t.push({marker:e,values:{x2:i[n],y2:i[n+1],x:i[n+2],y:i[n+3]}});break;case"Q":for(let n=0;n<i.length;n+=4)t.push({marker:e,values:{x1:i[n],y1:i[n+1],x:i[n+2],y:i[n+3]}});break;case"T":for(let n=0;n<i.length;n+=2)t.push({marker:e,values:{x:i[n],y:i[n+1]}});break;case"A":for(let n=0;n<i.length;n+=7)t.push({marker:e,values:{radiusX:i[n],radiusY:i[n+1],rotation:i[n+2],largeArc:i[n+3],sweep:i[n+4],x:i[n+5],y:i[n+6]}});break;case"Z":t.push({marker:e,values:{x:0,y:0}});break}return t}function A5(e,i){return(e%i+i)%i}function E7(e,i,t){if(i!==0&&e.marker==="L"){let n=t[i-1];["x","y"].every(l=>Math.round(Math.abs(n.values[l]-e.values[l]))===0)&&(e.overlap=!0)}return e}function Tg(e,i){const t=["x","y"].every(n=>Math.round(Math.abs(e[i].values[n]-e[0].values[n]))===0);e[i].marker==="L"&&t&&(e[i].overlap=!0,Tg(e,i-1)),e[i].marker==="Z"&&Tg(e,i-1)}function O7(e,i,t){const n=Wy(e.values,t.values),a=Wy(i.values,e.values);return Math.min(a,n)}function $y(e,i){return Math.atan2(i.x-e.x,i.y-e.y)}function Wy(e,i){const t=e.x-i.x,n=e.y-i.y;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}function Yy(e,i){return Math.sin(e)*i}function Ky(e,i){return Math.cos(e)*i}function Xy(e,i){const t=i/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?i:t}function x7(e,i){return i*Math.tan(e)}function P7(e,i){let t,n=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=Xy(e/2,-i):(t=Xy(e/2,i),n=1,t===1/0&&(t=i)),{offset:t,sweepFlag:n}}function C7(e){const i=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(t=>{let n="";if(t.marker!=="Z"){const a=Object.keys(t.values);n=i.filter(l=>a.indexOf(l)!==-1).map(l=>t.values[l]).join()}return`${t.marker}${n}`}).join("").trim()}function R5(e){const i=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(i)].map(n=>({marker:n[0],index:n.index})).reduceRight((n,a)=>{const l=e.substring(a.index,n.length?n[n.length-1].index:e.length);return n.concat([{marker:a.marker,index:a.index,chunk:l.length>0?l.substr(1,l.length-1):l}])},[]).reverse().flatMap(n=>{const a=n.chunk.match(t),l=a?a.map(parseFloat):[];return S7(n.marker,l)}).map(w7)}function M5(e,i,t){let n=[],a=[];return t&&e.forEach(l=>_7(l,t)),e.forEach(l=>{l.marker==="M"&&n.push([]),n[n.length-1].push(l)}),n.forEach(l=>{l.map(E7),Tg(l,l.length-1);const u=l[l.length-1].marker=="Z";l.filter(c=>!c.overlap).map((c,h,b)=>{const k=k5(c,h,b),E=T5(c,h,b),v=$y(c.values,k.values),O=$y(c.values,E.values),g=O-v,p=g*(180/Math.PI),P=O7(c,k,E),d=Math.abs(x7(g/2,P/2)),m=Math.min(i,d),y=P7(g,m),w=y.offset,N=y.sweepFlag,R=(h==0||h==b.length-1)&&!u;switch(c.marker){case"M":case"L":const D=[c.values.x+Yy(v,w),c.values.y+Ky(v,w)],x=[c.values.x+Yy(O,w),c.values.y+Ky(O,w)];R?a.push({marker:c.marker,values:c.values}):a.push({marker:c.marker,values:{x:parseFloat(D[0].toFixed(3)),y:parseFloat(D[1].toFixed(3))}}),!R&&(E.marker==="L"||E.marker==="M")&&a.push({marker:"A",radius:m,values:{radiusX:parseFloat(m.toFixed(3)),radiusY:parseFloat(m.toFixed(3)),rotation:p,largeArc:0,sweep:N,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":a.push({marker:c.marker,values:c.values});break}})}),{path:C7(a),commands:a}}function k7(e,i,t){return M5([...R5(e)],i,t)}const T7=Object.freeze(Object.defineProperty({__proto__:null,parsePath:R5,roundCommands:M5,roundCorners:k7},Symbol.toStringTag,{value:"Module"})),A7=Xl(T7);var _o={},od={},Jh={},Zy;function R7(){if(Zy)return Jh;Zy=1;var e=e||{};e.stringify=function(){var i={"visit_linear-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return i.visit_gradient(t)},"visit_radial-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return i.visit_gradient(t)},visit_gradient:function(t){var n=i.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+i.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,a=i.visit(t.at),l=i.visit(t.style);return l&&(n+=" "+l),a&&(n+=" at "+a),n},"visit_default-radial":function(t){var n="",a=i.visit(t.at);return a&&(n+=a),n},"visit_extent-keyword":function(t){var n=t.value,a=i.visit(t.at);return a&&(n+=" at "+a),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return i.visit(t.value.x)+" "+i.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return i.visit_color(t.value,t)},visit_hex:function(t){return i.visit_color("#"+t.value,t)},visit_rgb:function(t){return i.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return i.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var a=t,l=i.visit(n.length);return l&&(a+=" "+l),a},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",a=t.length;return t.forEach(function(l,u){n+=i.visit(l),u<a-1&&(n+=", ")}),n},visit:function(t){if(!t)return"";var n="";if(t instanceof Array)return i.visit_array(t,n);if(t.type){var a=i["visit_"+t.type];if(a)return a(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return i.visit(t)}}();var e=e||{};return e.parse=function(){var i={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(J){var B=new Error(t+": "+J);throw B.source=t,B}function a(){var J=l();return t.length>0&&n("Invalid input not EOF"),J}function l(){return y(u)}function u(){return c("linear-gradient",i.linearGradient,b)||c("repeating-linear-gradient",i.repeatingLinearGradient,b)||c("radial-gradient",i.radialGradient,E)||c("repeating-radial-gradient",i.repeatingRadialGradient,E)}function c(J,B,L){return h(B,function(F){var H=L();return H&&(Q(i.comma)||n("Missing comma before color stops")),{type:J,orientation:H,colorStops:y(w)}})}function h(J,B){var L=Q(J);if(L){Q(i.startCall)||n("Missing (");var F=B(L);return Q(i.endCall)||n("Missing )"),F}}function b(){return _()||k()}function _(){return U("directional",i.sideOrCorner,1)}function k(){return U("angular",i.angleValue,1)}function E(){var J,B=v(),L;return B&&(J=[],J.push(B),L=t,Q(i.comma)&&(B=v(),B?J.push(B):t=L)),J}function v(){var J=O()||g();if(J)J.at=P();else{var B=p();if(B){J=B;var L=P();L&&(J.at=L)}else{var F=d();F&&(J={type:"default-radial",at:F})}}return J}function O(){var J=U("shape",/^(circle)/i,0);return J&&(J.style=z()||p()),J}function g(){var J=U("shape",/^(ellipse)/i,0);return J&&(J.style=M()||p()),J}function p(){return U("extent-keyword",i.extentKeywords,1)}function P(){if(U("position",/^at/,0)){var J=d();return J||n("Missing positioning value"),J}}function d(){var J=m();if(J.x||J.y)return{type:"position",value:J}}function m(){return{x:M(),y:M()}}function y(J){var B=J(),L=[];if(B)for(L.push(B);Q(i.comma);)B=J(),B?L.push(B):n("One extra comma");return L}function w(){var J=N();return J||n("Expected color definition"),J.length=M(),J}function N(){return D()||S()||x()||R()}function R(){return U("literal",i.literalColor,0)}function D(){return U("hex",i.hexColor,1)}function x(){return h(i.rgbColor,function(){return{type:"rgb",value:y(A)}})}function S(){return h(i.rgbaColor,function(){return{type:"rgba",value:y(A)}})}function A(){return Q(i.number)[1]}function M(){return U("%",i.percentageValue,1)||T()||z()}function T(){return U("position-keyword",i.positionKeywords,1)}function z(){return U("px",i.pixelValue,1)||U("em",i.emValue,1)}function U(J,B,L){var F=Q(B);if(F)return{type:J,value:F[L]}}function Q(J){var B,L;return L=/^[\n\r\t\s]+/.exec(t),L&&K(L[0].length),B=J.exec(t),B&&K(B[0].length),B}function K(J){t=t.substr(J)}return function(J){return t=J.toString(),a()}}(),Jh.parse=e.parse,Jh.stringify=e.stringify,Jh}var Qy;function av(){return Qy||(Qy=1,function(e){var i=od&&od.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const t=i(R7()),n=u=>u.indexOf("linear-gradient")>=0;e.isGradient=n;const a=u=>u.type==="hex"?"#"+u.value:u.type==="literal"?u.value:`${u.type}(${u.value.join(",")})`,l=u=>{if(!(0,e.isGradient)(u))return{rotation:0,stops:[{offset:0,color:u},{offset:1,color:u}]};const c=t.default.parse(u)[0];return{rotation:parseFloat(c.orientation.value),stops:c.colorStops.map((h,b)=>({color:a(h),offset:h.length?parseFloat(h.length.value)/100:b/(c.colorStops.length-1)}))}};e.parseColor=l}(od)),od}var Jy;function zd(){return Jy||(Jy=1,function(e){var i=_o&&_o.__createBinding||(Object.create?function(b,_,k,E){E===void 0&&(E=k);var v=Object.getOwnPropertyDescriptor(_,k);v&&!("get"in v?!_.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return _[k]}}),Object.defineProperty(b,E,v)}:function(b,_,k,E){E===void 0&&(E=k),b[E]=_[k]}),t=_o&&_o.__setModuleDefault||(Object.create?function(b,_){Object.defineProperty(b,"default",{enumerable:!0,value:_})}:function(b,_){b.default=_}),n=_o&&_o.__importStar||function(){var b=function(_){return b=Object.getOwnPropertyNames||function(k){var E=[];for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&(E[E.length]=v);return E},b(_)};return function(_){if(_&&_.__esModule)return _;var k={};if(_!=null)for(var E=b(_),v=0;v<E.length;v++)E[v]!=="default"&&i(k,_,E[v]);return t(k,_),k}}(),a=_o&&_o.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const l=a(Tn()),u=n(av()),c=a(Ji()),h=(b,_=b.fill,k="fill")=>l.default.useMemo(()=>{if(!u.isGradient(_))return{[k]:_};const{stops:E,rotation:v}=u.parseColor(_),O={x:b.a.width/2,y:b.a.height/2},g=Math.sqrt(Math.pow(O.x,2)+Math.pow(O.y,2)),p=c.default.Util.degToRad(v)-Math.PI/2,P=[];return E.forEach(({offset:d,color:m})=>{P.push(d,m)}),k==="fill"?{fillLinearGradientStartPointX:O.x-g*Math.cos(p),fillLinearGradientStartPointY:O.y-g*Math.sin(p),fillLinearGradientColorStops:P,fillLinearGradientEndPointX:O.x+g*Math.cos(p),fillLinearGradientEndPointY:O.y+g*Math.sin(p),fill:E[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:O.x-g*Math.cos(p),strokeLinearGradientStartPointY:O.y-g*Math.sin(p),strokeLinearGradientColorStops:P,strokeLinearGradientEndPointX:O.x+g*Math.cos(p),strokeLinearGradientEndPointY:O.y+g*Math.sin(p)}},[_,b.width,b.height]);e.useColor=h}(_o)),_o}var Y0={},ad={},e2;function yc(){return e2||(e2=1,function(e){var i=ad&&ad.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=c;const t=i(Tn()),n=i(Ji());let a=!1;const l=(h=!a)=>{a=h};e.toggleFadeInAnimation=l;const u=()=>a;function c(h,b){const _=t.default.useRef();t.default.useLayoutEffect(()=>{_.current&&_.current.destroy()},[b]),t.default.useLayoutEffect(()=>{if(!a)return;const k=h.current.opacity();return k?(h.current.opacity(0),_.current=new n.default.Tween({node:h.current,opacity:k,onFinish:()=>{var E;(E=_.current)===null||E===void 0||E.destroy()}}),_.current.play(),()=>{var E;(E=_.current)===null||E===void 0||E.destroy()}):void 0},[])}e.isAnimationUsed=u}(ad)),ad}var t2;function Ks(){return t2||(t2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0,e.incrementLoader=_,e.decrementLoader=k,e.whenLoaded=v,e.onLoadError=g,e.triggerLoadError=p;const i=yc();let t=0,n=[],a=3e4;const l=P=>{a=P};e.setAssetLoadTimeout=l;const u=()=>a;e.getAssetLoadTimeout=u;let c=6e3;const h=P=>{c=P};e.setFontLoadTimeout=h;const b=()=>c;function _(P){t+=1;let d=!1;const m=setTimeout(()=>{d||(p(`Timeout loading asset ${P}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",P),d=!0,k())},a);return()=>{d||(clearTimeout(m),k())}}function k(){t-=1,t===0&&(n.forEach(P=>P()),n=[])}function E(P){t===0?P():n.push(P)}function v(){return new Promise(P=>E(()=>{(0,i.isAnimationUsed)()?setTimeout(P,300):P(!0)}))}e.getFontLoadTimeout=b;let O=[];function g(P){O.push(P)}function p(P){O.forEach(d=>d(P))}}(Y0)),Y0}var Ha={},n2;function Bd(){return n2||(n2=1,function(e){var i=Ha&&Ha.__createBinding||(Object.create?function(A,M,T,z){z===void 0&&(z=T);var U=Object.getOwnPropertyDescriptor(M,T);U&&!("get"in U?!M.__esModule:U.writable||U.configurable)||(U={enumerable:!0,get:function(){return M[T]}}),Object.defineProperty(A,z,U)}:function(A,M,T,z){z===void 0&&(z=T),A[z]=M[T]}),t=Ha&&Ha.__setModuleDefault||(Object.create?function(A,M){Object.defineProperty(A,"default",{enumerable:!0,value:M})}:function(A,M){A.default=M}),n=Ha&&Ha.__importStar||function(){var A=function(M){return A=Object.getOwnPropertyNames||function(T){var z=[];for(var U in T)Object.prototype.hasOwnProperty.call(T,U)&&(z[z.length]=U);return z},A(M)};return function(M){if(M&&M.__esModule)return M;var T={};if(M!=null)for(var z=A(M),U=0;U<z.length;U++)z[U]!=="default"&&i(T,M,z[U]);return t(T,M),T}}();Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=h,e.setGoogleFonts=b,e.getFontsList=_,e.addGlobalFont=k,e.removeGlobalFont=E,e.replaceGlobalFonts=v,e.loadFont=m,e.setGoogleFontsVariants=N,e.getGoogleFontsVariants=R,e.injectGoogleFont=D,e.injectCustomFont=S;const a=n(da),l=Ks();let u=a.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),c=a.observable({value:!1});function h(){return c.value}function b(A){A!=="default"?(c.value=!0,u.splice(0,u.length),u.push(...A)):c.value=!1}function _(){return u}function k(A){e.globalFonts.push(A)}function E(A){const M=e.globalFonts.findIndex(T=>T.fontFamily===A);M!==-1&&e.globalFonts.splice(M,1)}function v(A){e.globalFonts.replace(A)}e.globalFonts=a.observable([]);var O="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",g=document.createElement("canvas");function p(A,M="Arial",T="normal",z="normal"){var U=g.getContext("2d");return U.font=`${T} ${z} 40px '${A}', ${M}`,U.measureText(O).width}const P={Arial:!0},d=A=>!!P[A];async function m(A,M,T){var z;if(P[A])return;const U=!!(!((z=document.fonts)===null||z===void 0)&&z.load),Q=p("Arial","Arial",M,T);if(U)try{await document.fonts.load(`16px '${A}', ${M} ${T}`);const L=p(A,"Arial",M,T);if(Q!==L)return void(P[A]=!0)}catch{}const K=p("Times","Times",M,T),J=p(A,"Arial",M,T),B=Math.min(6e3,(0,l.getFontLoadTimeout)())/60;for(let L=0;L<B;L++){const F=p(A,"Arial",M,T),H=p(A,"Times",M,T);if(F!==J||F!==Q||H!==K)return void(P[A]=!0);await new Promise($=>setTimeout($,60))}console.warn(`Timeout for loading font "${A}". Looks like polotno can't load it. Is it a correct font family?`),(0,l.triggerLoadError)(`Timeout for loading font "${A}"`)}e.isFontLoaded=d;const y={};let w="400,400italic,700,700italic";function N(A){w=A}function R(){return w}function D(A){if(y[A])return;const M=`https://fonts.googleapis.com/css?family=${A.replace(/ /g,"+")}:${w}`,T=document.createElement("link");T.type="text/css",T.href=M,T.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(T),y[A]=!0}const x={};function S(A){const M=A.fontFamily;if(x[M]||!A.url&&!A.styles)return;const T=document.createElement("style");T.type="text/css";const z=A.styles||(A.url?[{src:`url("${A.url}")`}]:[]);let U="";z.forEach(Q=>{U+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${M}';
|
|
79
|
-
src: ${Q.src};
|
|
80
|
-
font-style: ${Q.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${Q.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),T.innerHTML=U,document.getElementsByTagName("head")[0].appendChild(T),x[A.fontFamily]=!0}}(Ha)),Ha}var Ga={},r2;function ts(){return r2||(r2=1,function(e){var i=Ga&&Ga.__createBinding||(Object.create?function(l,u,c,h){h===void 0&&(h=c);var b=Object.getOwnPropertyDescriptor(u,c);b&&!("get"in b?!u.__esModule:b.writable||b.configurable)||(b={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(l,h,b)}:function(l,u,c,h){h===void 0&&(h=c),l[h]=u[c]}),t=Ga&&Ga.__setModuleDefault||(Object.create?function(l,u){Object.defineProperty(l,"default",{enumerable:!0,value:u})}:function(l,u){l.default=u}),n=Ga&&Ga.__importStar||function(){var l=function(u){return l=Object.getOwnPropertyNames||function(c){var h=[];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(h[h.length]=b);return h},l(u)};return function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var h=l(u),b=0;b<h.length;b++)h[b]!=="default"&&i(c,u,h[b]);return t(c,u),c}}();Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextSplitAllowed=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const a=n(da);e.flags=a.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),e.setTextVerticalResizeEnabled=a.action(l=>{e.flags.textVerticalResizeEnabled=l}),e.useRemoveBackground=a.action(l=>{e.flags.removeBackgroundEnabled=l}),e.useHtmlTextRender=a.action(l=>{e.flags.htmlRenderEnabled=l}),e.setDownScalingEnabled=a.action(l=>{e.flags.imageDownScalingEnabled=l}),e.useDownScaling=a.action(l=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),(0,e.setDownScalingEnabled)(l)}),e.setForceTextFit=a.action(l=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),e.flags.textOverflow="change-font-size"}),e.setTextOverflow=a.action(l=>{e.flags.textOverflow=l}),e.setTextSplitAllowed=a.action(l=>{e.flags.textSplitAllowed=l}),e.setAnimationsEnabled=a.action(l=>{e.flags.animationsEnabled=l})}(Ga)),Ga}var K0={},i2;function L5(){return i2||(i2=1,function(e){function i(t=""){return(t.match(/<\/p>/gi)||[]).length>1&&(t=t.replace(/<\/p>/gi,(n,a,l)=>(l.slice(a+n.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
|
-
`:n)),t.replace(/(<([^>]+)>)/gi,"")}Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=i}(K0)),K0}var ld={},o2;function Fp(){return o2||(o2=1,function(e){var i=ld&&ld.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=n;const t=i(Ji());function n(a,l){var u;const c={filters:[]};l.brightnessEnabled&&(c.filters.push(t.default.Filters.Brighten),c.brightness=l.brightness),l.blurEnabled&&(c.filters.push(t.default.Filters.Blur),c.blurRadius=l.blurRadius),l.sepiaEnabled&&c.filters.push(t.default.Filters.Sepia),l.grayscaleEnabled&&c.filters.push(t.default.Filters.Grayscale),a.setAttrs(c),c.filters.length?a.cache({pixelRatio:l.store._elementsPixelRatio}):a.clearCache(),(u=a.getLayer())===null||u===void 0||u.batchDraw()}}(ld)),ld}var sd={},a2;function bc(){return a2||(a2=1,function(e){var i=sd&&sd.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const t=i(Tn()),n=Qi,a=Ja,l={stroke:"rgb(0, 161, 255)",strokeWidth:2},u=c=>{Object.assign(l,c)};e.setHighlighterStyle=u,e.Highlighter=(0,n.observer)(({element:c})=>t.default.createElement(a.Rect,Object.assign({name:"highlighter",x:c.a.x,y:c.a.y,rotation:c.a.rotation,width:c.a.width,height:c.a.height,listening:!1,strokeScaleEnabled:!1},l)))}(sd)),sd}var ud={},l2;function Xs(){return l2||(l2=1,function(e){var i=ud&&ud.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.isTouchDevice=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const t=i(Tn());e.MOBILE_BREAKPOINT=800;const n=()=>window.innerWidth<=e.MOBILE_BREAKPOINT;e.isMobile=n;const a=c=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${c}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${c}
|
|
91
|
-
}
|
|
92
|
-
`;e.mobileStyle=a;const l=()=>"ontouchstart"in window||navigator.maxTouchPoints>0;e.isTouchDevice=l;const u=()=>{const[c,h]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const b=()=>{h((0,e.isMobile)())};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}},[]),c};e.useMobile=u}(ud)),ud}var s2={},N5="warn";function I5(e){N5=e}function D5(){return N5}function M7(e){I5(e)}var sr;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(sr||(sr={}));var Ag=function(e,i){return Ag=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Ag(e,i)};function bn(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Ag(e,i);function t(){this.constructor=e}e.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var ur=function(){return ur=Object.assign||function(i){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(i[l]=t[l])}return i},ur.apply(this,arguments)};function L7(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)i.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t}function j5(e,i){var t={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},n,a,l,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(b){return function(_){return h([b,_])}}function h(b){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,b[0]&&(t=0)),t;)try{if(n=1,a&&(l=b[0]&2?a.return:b[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,b[1])).done)return l;switch(a=0,l&&(b=[b[0]&2,l.value]),b[0]){case 0:case 1:l=b;break;case 4:return t.label++,{value:b[1],done:!1};case 5:t.label++,a=b[1],b=[0];continue;case 7:b=t.ops.pop(),t.trys.pop();continue;default:if(l=t.trys,!(l=l.length>0&&l[l.length-1])&&(b[0]===6||b[0]===2)){t=0;continue}if(b[0]===3&&(!l||b[1]>l[0]&&b[1]<l[3])){t.label=b[1];break}if(b[0]===6&&t.label<l[1]){t.label=l[1],l=b;break}if(l&&t.label<l[2]){t.label=l[2],t.ops.push(b);break}l[2]&&t.ops.pop(),t.trys.pop();continue}b=i.call(e,t)}catch(_){b=[6,_],a=0}finally{n=l=0}if(b[0]&5)throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}}function wd(e){var i=typeof Symbol=="function"&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.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(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function ca(e,i){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),a,l=[],u;try{for(;(i===void 0||i-- >0)&&!(a=n.next()).done;)l.push(a.value)}catch(c){u={error:c}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(u)throw u.error}}return l}function fa(e,i,t){if(arguments.length===2)for(var n=0,a=i.length,l;n<a;n++)(l||!(n in i))&&(l||(l=Array.prototype.slice.call(i,0,n)),l[n]=i[n]);return e.concat(l||Array.prototype.slice.call(i))}function Ud(e){return st(e).type}function N7(e,i){return st(e).getChildType(i)}function F5(e,i){return st(e).onPatch(i)}function I7(e,i){return st(e).onSnapshot(i)}function cc(e,i){st(e).applyPatches(pv(i))}function D7(e,i){var t={patches:[],inversePatches:[]},n={},a,l={get recording(){return!!a},get patches(){return n.patches||(n.patches=t.patches.slice()),n.patches},get reversedInversePatches(){return n.reversedInversePatches||(n.reversedInversePatches=t.inversePatches.slice().reverse()),n.reversedInversePatches},get inversePatches(){return n.inversePatches||(n.inversePatches=t.inversePatches.slice()),n.inversePatches},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=F5(e,function(u,c){i&&!i(u,c,cv())||(t.patches.push(u),t.inversePatches.push(c),n.patches=void 0,n.inversePatches=void 0,n.reversedInversePatches=void 0)}))},replay:function(u){cc(u||e,t.patches)},undo:function(u){cc(u||e,t.inversePatches.slice().reverse())}};return l.resume(),l}function j7(e){var i=st(e);if(!i.isRoot)throw new tt("`protect` can only be invoked on root nodes");i.isProtectionEnabled=!0}function F7(e){var i=st(e);if(!i.isRoot)throw new tt("`unprotect` can only be invoked on root nodes");i.isProtectionEnabled=!1}function z7(e){return st(e).isProtected}function z5(e,i){return st(e).applySnapshot(i)}function lv(e,i){i===void 0&&(i=!0);var t=st(e);return i?t.snapshot:t.type.getSnapshot(t,!1)}function B7(e,i){i===void 0&&(i=1);for(var t=st(e).parent;t;){if(--i===0)return!0;t=t.parent}return!1}function U7(e,i){i===void 0&&(i=1);for(var t=i,n=st(e).parent;n;){if(--t===0)return n.storedValue;n=n.parent}throw new tt("Failed to find the parent of ".concat(st(e)," at depth ").concat(i))}function q7(e,i){for(var t=st(e).parent;t;){if(i.is(t.storedValue))return!0;t=t.parent}return!1}function H7(e,i){for(var t=st(e).parent;t;){if(i.is(t.storedValue))return t.storedValue;t=t.parent}throw new tt("Failed to find the parent of ".concat(st(e)," of a given type"))}function B5(e){return st(e).root.storedValue}function U5(e){return st(e).path}function G7(e){return gc(st(e).path)}function V7(e){return st(e).isRoot}function $7(e,i){var t=o4(st(e),i);return t?t.value:void 0}function W7(e,i,t){var n=st(i).root.identifierCache.resolve(e,_c(t));return n==null?void 0:n.value}function q5(e){return st(e).identifier}function Y7(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return;if(nn(t))return i?sv(t)?t:void 0:t;throw new tt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gv)return;throw n}}function K7(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return!1;if(nn(t))return i?sv(t):!0;throw new tt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof gv)return!1;throw n}}function H5(e,i){var t=o4(st(e),i,!1);if(t!==void 0)try{return t.value}catch{return}}function X7(e,i){return i4(st(e),st(i))}function Z7(e,i){i===void 0&&(i=!0);var t=st(e);return t.type.create(t.snapshot,i===!0?t.root.environment:i===!1?void 0:i)}function Q7(e){return st(e).detach(),e}function J7(e){var i=st(e);i.isRoot?i.die():i.parent.removeChild(i.subpath)}function sv(e){return st(e).observableIsAlive}function eS(e,i){var t=st(e);return t.addDisposer(i),i}function tS(e){var i=st(e),t=i.root.environment;if(!t)throw new tt("Failed to find the environment of ".concat(i," ").concat(i.path));return t}function nS(e){var i=st(e),t=i.root.environment;return!!t}function G5(e,i){var t=st(e);t.getChildren().forEach(function(n){nn(n.storedValue)&&G5(n.storedValue,i)}),i(t.storedValue)}function V5(e){var i;return nn(e)?i=Ud(e):i=e,{name:i.name,properties:ur({},i.properties)}}function rS(e){var i=st(e).type,t=ur(ur({},V5(i)),{actions:[],volatile:[],views:[],flowActions:[]}),n=Object.getOwnPropertyNames(e);return n.forEach(function(a){if(!(a in t.properties)){var l=Object.getOwnPropertyDescriptor(e,a);if(l.get){K3(e,a)?t.views.push(a):t.volatile.push(a);return}l.value._isFlowAction===!0&&t.flowActions.push(a),l.value._isMSTAction===!0?t.actions.push(a):Z3(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function iS(e){return e}function oS(e){return e}function aS(e){return e}function lS(e){return st(e).nodeId}var $5=function(){function e(i,t,n,a){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(this,"_escapedSubpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_subpathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_pathUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"storedValue",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"aliveAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_state",{enumerable:!0,configurable:!0,writable:!0,value:Lr.INITIALIZING}),Object.defineProperty(this,"_hookSubscribers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"_parent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pathAtom",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.environment=a,this.baseSetParent(t,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(i){var t=this.isAlive;this._state=i;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this._hookSubscribers&&this._hookSubscribers.emit(i,this,i)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return this._hookSubscribers||(this._hookSubscribers=new c4),this._hookSubscribers.register(i,t)}}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getReconciliationType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type}}),Object.defineProperty(e.prototype,"baseSetParent",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){this._parent=i,this._subpath=t,this._escapedSubpath=void 0,this.pathAtom&&this.pathAtom.reportChanged()}}),Object.defineProperty(e.prototype,"path",{get:function(){return this.getEscapedPath(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"getEscapedPath",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return i&&(this.pathAtom||(this.pathAtom=Ed("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Wl(this._subpath):""),this.parent.getEscapedPath(i)+"/"+this._escapedSubpath):""}}),Object.defineProperty(e.prototype,"isRoot",{get:function(){return this.parent===null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAlive",{get:function(){return this.state!==Lr.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Lr.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Ed("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(this.state===Lr.CREATED){if(this.parent){if(this.parent.state!==Lr.FINALIZED)return;this.fireHook(sr.afterAttach)}this.state=Lr.FINALIZED,i&&i()}}}),Object.defineProperty(e.prototype,"baseFinalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._hookSubscribers&&this._hookSubscribers.clearAll(),this._subpathUponDeath=this._subpath,this._pathUponDeath=this.getEscapedPath(!1),this.baseSetParent(null,""),this.state=Lr.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(sr.beforeDestroy)}}),e}(),Pd=function(e){bn(i,e);function i(t,n,a,l,u){var c=e.call(this,t,n,a,l)||this;try{c.storedValue=t.createNewInstance(u)}catch(h){throw c.state=Lr.DEAD,h}return c.state=Lr.CREATED,c.finalizeCreation(),c}return Object.defineProperty(i.prototype,"root",{get:function(){if(!this.parent)throw new tt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.parent!==t,l=this.subpath!==n;!a&&!l||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(t).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Lr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.fireInternalHook(t)}}),i}($5);Pd.prototype.die=Zn(Pd.prototype.die);var sS=1,Po;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Po||(Po={}));var Ai;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Ai||(Ai={}));var uS={onError:function(e){throw e}},yi=function(e){bn(i,e);function i(t,n,a,l,u){var c=e.call(this,t,n,a,l)||this;if(Object.defineProperty(c,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++sS}),Object.defineProperty(c,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Po.UNINITIALIZED}),Object.defineProperty(c,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),c._snapshotComputed=$s(function(){return c.getSnapshot()}),c.unbox=c.unbox.bind(c),c._initialSnapshot=u,c.identifierAttribute=t.identifierAttribute,n||(c.identifierCache=new TS),c._childNodes=t.initializeChildNodes(c,c._initialSnapshot),c.identifier=null,c.unnormalizedIdentifier=null,c.identifierAttribute&&c._initialSnapshot){var h=c._initialSnapshot[c.identifierAttribute];if(h===void 0){var b=c._childNodes[c.identifierAttribute];b&&(h=b.value)}if(typeof h!="string"&&typeof h!="number")throw new tt("Instance identifier '".concat(c.identifierAttribute,"' for type '").concat(c.type.name,"' must be a string or a number"));c.identifier=_c(h),c.unnormalizedIdentifier=h}return n?n.root.identifierCache.addNodeToCache(c):c.identifierCache.addNodeToCache(c),c}return Object.defineProperty(i.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)}}),Object.defineProperty(i.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(t){t===void 0&&(t=!0),this._observableInstanceState===Po.UNINITIALIZED&&this.createObservableInstance(t)}}),Object.defineProperty(i.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,a,l,u;t===void 0&&(t=!0),this._observableInstanceState=Po.CREATING;for(var c=[],h=this.parent;h&&h._observableInstanceState===Po.UNINITIALIZED;)c.unshift(h),h=h.parent;try{for(var b=wd(c),_=b.next();!_.done;_=b.next()){var k=_.value;k.createObservableInstanceIfNeeded(!1)}}catch(g){n={error:g}}finally{try{_&&!_.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}var E=this.type;try{this.storedValue=E.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,E.finalizeNewInstance(this,this.storedValue)}catch(g){throw this.state=Lr.DEAD,g}finally{this._isRunningAction=!1}if(this._observableInstanceState=Po.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=hc,this.state=Lr.CREATED,t){this.fireHook(sr.afterCreate),this.finalizeCreation();try{for(var v=wd(c.reverse()),O=v.next();!O.done;O=v.next()){var k=O.value;k.fireHook(sr.afterCreate),k.finalizeCreation()}}catch(g){l={error:g}}finally{try{O&&!O.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}}}}),Object.defineProperty(i.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(sr.beforeDetach);var t=this.state;this.state=Lr.DETACHING;var n=this.root,a=n.environment,l=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=a,this.identifierCache=l}finally{this.state=t}}}}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t!==this.parent,l=n!==this.subpath;!a&&!l||(a?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,n),this.fireHook(sr.afterAttach)):l&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.fireInternalHook(t);var a=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[t];typeof a=="function"&&(lc?lc(function(){a.apply(n.storedValue)}):a.apply(this.storedValue))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Po.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(i.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,n=this._childNodes,a=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(n,a),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(i.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(i.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=D5();if(!this.isAlive&&n!=="ignore"){var a=this._getAssertAliveError(t);switch(n){case"error":throw new tt(a);case"warn":qS(a)}}}}),Object.defineProperty(i.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",a=t.subpath&&Wl(t.subpath)||"",l=t.actionContext||uv();l&&l.type!=="action"&&l.parentActionEvent&&(l=l.parentActionEvent);var u="";if(l&&l.name!=null){var c=l&&l.context&&U5(l.context)||n;u="".concat(c,".").concat(l.name,"()")}return"You are trying to read or write to an object that is no longer part of a state tree. (Object type: '".concat(this.type.name,"', Path upon death: '").concat(n,"', Subpath: '").concat(a,"', Action: '").concat(u,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return this._observableInstanceState===Po.CREATED?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(hc),this._autoUnbox=!1;try{return this._observableInstanceState===Po.CREATED?this.type.getChildren(this):l4(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.type.getChildType(t)}}),Object.defineProperty(i.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw new tt("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.type.removeChild(this,t)}}),Object.defineProperty(i.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(t).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this.baseFinalizeCreation(function(){var n,a;try{for(var l=wd(t.getChildren()),u=l.next();!u.done;u=l.next()){var c=u.value;c.finalizeCreation()}}catch(h){n={error:h}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}t.fireInternalHook(sr.afterCreationFinalization)})}}),Object.defineProperty(i.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new tt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(i.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this._applyPatches=Cd(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(a){if(!a.path){t.type.applySnapshot(t,a.value);return}var l=gc(a.path),u=a4(t,l.slice(0,-1));u.applyPatchLocally(l[l.length-1],a)})}),this._applySnapshot=Cd(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==t.snapshot)return t.type.applySnapshot(t,n)}),zs(this.storedValue,"$treenode",this),zs(this.storedValue,"toJSON",RS)}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Lr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Po.UNINITIALIZED&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Ai.Dispose),this._internalEventsClear(Ai.Dispose))}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._addSnapshotReaction(),this._internalEventsRegister(Ai.Snapshot,t)}}),Object.defineProperty(i.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Ai.Snapshot,t)}}),Object.defineProperty(i.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Ai.Patch,t)}}),Object.defineProperty(i.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._internalEventsHasSubscribers(Ai.Patch)){var a=n.path.substr(this.path.length)+(t.path?"/"+t.path:""),l=zS({},t,{path:a}),u=ca(YS(l),2),c=u[0],h=u[1];this._internalEventsEmit(Ai.Patch,c,h)}this.parent&&this.parent.emitPatch(t,n)}}),Object.defineProperty(i.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Ai.Dispose,t)}}),Object.defineProperty(i.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Ai.Dispose,t,!0);return}throw new tt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(i.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._internalEventsHas(Ai.Dispose,t))throw new tt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Ai.Dispose,t)}}),Object.defineProperty(i.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.middlewares){var n=this.middlewares.indexOf(t);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(i.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var l={handler:t,includeHooks:n};return this.middlewares?this.middlewares.push(l):this.middlewares=[l],function(){a.removeMiddleware(l)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,n)}}),Object.defineProperty(i.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;if(!this._hasSnapshotReaction){var n=U3(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},uS);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(i.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)}}),Object.defineProperty(i.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){return a===void 0&&(a=!1),this._internalEvents||(this._internalEvents=new c4),this._internalEvents.register(t,n,a)}}),Object.defineProperty(i.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!!this._internalEvents&&this._internalEvents.has(t,n)}}),Object.defineProperty(i.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this._internalEvents&&this._internalEvents.unregister(t,n)}}),Object.defineProperty(i.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var n,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];this._internalEvents&&(n=this._internalEvents).emit.apply(n,fa([t],ca(a),!1))}}),Object.defineProperty(i.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEvents&&this._internalEvents.clear(t)}}),Object.defineProperty(i.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),i}($5);yi.prototype.createObservableInstance=Zn(yi.prototype.createObservableInstance);yi.prototype.detach=Zn(yi.prototype.detach);yi.prototype.die=Zn(yi.prototype.die);var W5,Tt;(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"})(Tt||(Tt={}));var Y5="cannotDetermine",cS=Symbol("$type"),Qa=function(){function e(i){Object.defineProperty(this,W5,{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"C",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"S",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"T",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"N",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"isType",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return Xa(this,i),this.instantiate(null,"",t,i).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){throw new tt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return i===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=r4(i);if(n){var a=Ud(i);return this.isAssignableFrom(a)?bi():_i(t,i)}return this.isValidSnapshot(i,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.validate(i,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new tt("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 tt("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 tt("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 tt("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}();W5=cS;Qa.prototype.create=Zn(Qa.prototype.create);var fc=function(e){bn(i,e);function i(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(i.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t===void 0&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.createObservableInstanceIfNeeded(),t.storedValue}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!t.identifierAttribute||t.identifier===_c(n[t.identifierAttribute])}}),Object.defineProperty(i.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t.isDetaching?!1:t.snapshot===n||nn(n)&&st(n)===t?!0:t.type===this&&s4(n)&&!nn(n)&&this.isMatchingSnapshotId(t,n)?(t.applySnapshot(n),!0):!1}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.tryToReconcileNode(t,n);if(u)return t.setParent(a,l),t;if(t.die(),nn(n)&&this.isAssignableFrom(Ud(n))){var c=st(n);return c.setParent(a,l),c}return this.instantiate(a,l,void 0,n)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(Qa);fc.prototype.create=Zn(fc.prototype.create);var Zs=function(e){bn(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t.isDetaching&&t.type===this&&t.storedValue===n)return t;var u=this.instantiate(a,l,void 0,n);return t.die(),u}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(Qa);function cr(e){return typeof e=="object"&&e&&e.isType===!0}var ia=new Map;function fS(e){return function(t,n,a){switch(t.type){case"action":if(!e.filter||e.filter(t)===!0){var l=e.onStart(t);e.onResume(t,l),ia.set(t.id,{call:t,context:l,async:!1});try{var u=n(t);return e.onSuspend(t,l),ia.get(t.id).async===!1&&(ia.delete(t.id),e.onSuccess(t,l,u)),u}catch(h){throw ia.delete(t.id),e.onFail(t,l,h),h}}else return n(t);case"flow_spawn":{var c=ia.get(t.rootId);return c.async=!0,n(t)}case"flow_resume":case"flow_resume_error":{var c=ia.get(t.rootId);e.onResume(t,c.context);try{return n(t)}finally{e.onSuspend(t,c.context)}}case"flow_throw":{var c=ia.get(t.rootId);return ia.delete(t.rootId),e.onFail(t,c.context,t.args[0]),n(t)}case"flow_return":{var c=ia.get(t.rootId);return ia.delete(t.rootId),e.onSuccess(t,c.context,t.args[0]),n(t)}}}}var dS=function(){function e(i,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),i&&i.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,i))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function hS(e){var i=new Map;return function(n,a){var l=n.parentActionEvent?i.get(n.parentActionEvent.id):void 0;if(n.type==="action"){var u=ur(ur({},n),{env:l&&l.call.env,parentCall:l&&l.call}),c=!e.filter||e.filter(u),h=c?e:void 0,b=new dS(h,u);i.set(n.id,b);var _=void 0;try{_=a(n)}catch(E){throw i.delete(n.id),b.finish(E),E}return b.hasFlowsPending||(i.delete(n.id),b.finish()),_}else{if(!l)return a(n);switch(n.type){case"flow_spawn":return l.incFlowsPending(),a(n);case"flow_resume":case"flow_resume_error":return a(n);case"flow_throw":{var k=n.args[0];try{return a(n)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(n.parentActionEvent.id),l.finish(k))}}case"flow_return":try{return a(n)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(n.parentActionEvent.id),l.finish())}}}}}function pS(e,i,t,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(pc(n))return n;if(nn(n))return ep("[MSTNode: ".concat(Ud(n).name,"]"));if(typeof n=="function")return ep("[function]");if(typeof n=="object"&&!Fs(n)&&!hv(n))return ep("[object ".concat(n&&n.constructor&&n.constructor.name||"Complex Object","]"));try{return JSON.stringify(n),n}catch(a){return ep(""+a)}}function gS(e,i){return i&&typeof i=="object"&&"$MST_DATE"in i?new Date(i.$MST_DATE):i}function ep(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function K5(e,i){lc(function(){pv(i).forEach(function(t){return vS(e,t)})})}function vS(e,i){var t=H5(e,i.path||"");if(!t)throw new tt("Invalid action path: ".concat(i.path||""));var n=st(t);if(i.name==="@APPLY_PATCHES")return cc.call(null,t,i.args[0]);if(i.name==="@APPLY_SNAPSHOT")return z5.call(null,t,i.args[0]);if(typeof t[i.name]!="function")throw new tt("Action '".concat(i.name,"' does not exist in '").concat(n.path,"'"));return t[i.name].apply(t,i.args?i.args.map(function(a){return gS(n,a)}):[])}function mS(e,i){var t=[],n=function(u){var c=i?i(u,cv()):!0;c&&t.push(u)},a,l={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=X5(e,n))},replay:function(u){K5(u,t)}};return l.resume(),l}function X5(e,i,t){return t===void 0&&(t=!1),J5(e,function(a,l){if(a.type==="action"&&a.id===a.rootId){var u=st(a.context),c={name:a.name,path:i4(st(e),u),args:a.args.map(function(b,_){return pS(u,a.name,_,b)})};if(t){var h=l(a);return i(c),h}else return i(c),l(a)}else return l(a)})}var yS=1,Sd;function uv(){return Sd}function Z5(){return yS++}function Rg(e,i){var t=st(e.context);e.type==="action"&&t.assertAlive({actionContext:e});var n=t._isRunningAction;t._isRunningAction=!0;var a=Sd;Sd=e;try{return wS(t,e,i)}finally{Sd=a,t._isRunningAction=n}}function Q5(e){if(e)return e.type==="action"?e:e.parentActionEvent}function Cd(e,i,t){var n=function(){var a=Z5(),l=Sd,u=Q5(l);return Rg({type:"action",name:i,id:a,args:f4(arguments),context:e,tree:B5(e),rootId:l?l.rootId:a,parentId:l?l.id:0,allParentIds:l?fa(fa([],ca(l.allParentIds),!1),[l.id],!1):[],parentEvent:l,parentActionEvent:u},t)};return n._isMSTAction=!0,n._isFlowAction=t._isFlowAction,n}function J5(e,i,t){t===void 0&&(t=!0);var n=st(e);return n.addMiddleWare(i,t)}function bS(e,i,t){t===void 0&&(t=!0);var n={handler:e,includeHooks:t};return i.$mst_middleware=i.$mst_middleware||[],i.$mst_middleware.push(n),i}var _S=function(){function e(i,t){Object.defineProperty(this,"arrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"inArrayIndex",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=i;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 i=this.middlewares[this.arrayIndex];if(i){var t=i[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function wS(e,i,t){var n=new _S(e,t);if(n.isEmpty)return Zn(t).apply(null,i.args);var a=null;function l(u){var c=n.getNextMiddleware(),h=c&&c.handler;if(!h)return Zn(t).apply(null,u.args);if(!c.includeHooks&&sr[u.name])return l(u);function b(k,E){a=l(k),E&&(a=E(a))}function _(k){a=k}return h(u,b,_),a}return l(i)}function cv(){for(var e=uv();e&&e.type!=="action";)e=e.parentActionEvent;return e}function e4(e,i,t){for(var n=typeof i=="number"?i:i.id,a=t?e:e.parentActionEvent;a;){if(a.id===n)return!0;a=a.parentActionEvent}return!1}function SS(e,i){return e4(e,i,!1)}function ES(e,i){return e4(e,i,!0)}function OS(e){try{return JSON.stringify(e)}catch(i){return"<Unserializable: ".concat(i,">")}}function t4(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):nn(e)?"<".concat(e,">"):"`".concat(OS(e),"`")}function xS(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function PS(e){var i=e.value,t=e.context[e.context.length-1].type,n=e.context.map(function(c){var h=c.path;return h}).filter(function(c){return c.length>0}).join("/"),a=n.length>0?'at path "/'.concat(n,'" '):"",l=nn(i)?"value of type ".concat(st(i).type.name,":"):pc(i)?"value":"snapshot",u=t&&nn(i)&&t.is(st(i).snapshot);return"".concat(a).concat(l," ").concat(t4(i)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?O4(t)||pc(i)?".":", expected an instance of `".concat(t.name,"` or a snapshot like `").concat(t.describe(),"` instead.")+(u?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function fv(e,i,t){return e.concat([{path:i,type:t}])}function bi(){return dc}function _i(e,i,t){return[{context:e,value:i,message:t}]}function zp(e){return e.reduce(function(i,t){return i.concat(t)},[])}function Xa(e,i){HS()&&n4(e,i)}function n4(e,i){var t=e.validate(i,[{path:"",type:e}]);if(t.length>0)throw new tt(CS(e,i,t))}function CS(e,i,t){if(t.length!==0)return"Error while converting ".concat(xS(t4(i))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(PS).join(`
|
|
95
|
-
`)}var kS=0,TS=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:kS++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:sn.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:sn.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i);this.lastCacheModificationPerId.set(i,t===void 0?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i)||0;return"".concat(this.cacheId,"-").concat(t)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){if(t===void 0&&(t=!0),i.identifierAttribute){var n=i.identifier;this.cache.has(n)||this.cache.set(n,sn.array([],Bp));var a=this.cache.get(n);if(a.indexOf(i)!==-1)throw new tt("Already registered");a.push(i),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this;Hg(i.identifierCache.cache).forEach(function(n){return n.forEach(function(a){t.addNodeToCache(a)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(i.identifierAttribute){var t=i.identifier,n=this.cache.get(t);n&&(n.remove(i),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(i.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this,n=new e,a=i.path+"/";return Q3(this.cache).forEach(function(l){for(var u=ca(l,2),c=u[0],h=u[1],b=!1,_=h.length-1;_>=0;_--){var k=h[_];(k===i||k.path.indexOf(a)===0)&&(n.addNodeToCache(k,!1),h.splice(_,1),h.length||t.cache.delete(c),b=!0)}b&&t.updateLastCacheModificationPerId(c)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.cache.get(t);return n?n.some(function(a){return i.isAssignableFrom(a.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.cache.get(t);if(!n)return null;var a=n.filter(function(l){return i.isAssignableFrom(l.type)});switch(a.length){case 0:return null;case 1:return a[0];default:throw new tt("Cannot resolve a reference to type '".concat(i.name,"' with id: '").concat(t,"' unambigously, there are multiple candidates: ").concat(a.map(function(l){return l.path}).join(", ")))}}}),e}();function dv(e,i,t,n,a){var l=r4(a);if(l){if(l.parent)throw new tt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(i?i.path:"","/").concat(t,"', but it lives already at '").concat(l.path,"'"));return i&&l.setParent(i,t),l}return new yi(e,i,t,n,a)}function ns(e,i,t,n,a){return new Pd(e,i,t,n,a)}function AS(e){return e instanceof Pd||e instanceof yi}var Lr;(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"})(Lr||(Lr={}));function nn(e){return!!(e&&e.$treenode)}function st(e){if(!nn(e))throw new tt("Value ".concat(e," is no MST Node"));return e.$treenode}function r4(e){return e&&e.$treenode||null}function RS(){return st(this).snapshot}var MS=function(e){return".."};function i4(e,i){if(e.root!==i.root)throw new tt("Cannot calculate relative path: objects '".concat(e,"' and '").concat(i,"' are not part of the same object tree"));for(var t=gc(e.path),n=gc(i.path),a=0;a<t.length&&t[a]===n[a];a++);return t.slice(a).map(MS).join("/")+yp(n.slice(a))}function o4(e,i,t){return t===void 0&&(t=!0),a4(e,gc(i),t)}function a4(e,i,t){t===void 0&&(t=!0);var n=e;try{for(var a=0;a<i.length;a++){var l=i[a];if(l===".."){if(n=n.parent,n)continue}else{if(l===".")continue;if(n){if(n instanceof Pd){var u=n.value;nn(u)&&(n=st(u))}if(n instanceof yi){var c=n.getChildType(l);if(c&&(n=n.getChildNode(l),n))continue}}}throw new tt("Could not resolve '".concat(l,"' in path '").concat(yp(i.slice(0,a))||"/","' while resolving '").concat(yp(i),"'"))}}catch(h){if(!t)return;throw h}return n}function l4(e){if(!e)return dc;var i=Object.keys(e);if(!i.length)return dc;var t=new Array(i.length);return i.forEach(function(n,a){t[a]=e[n]}),t}function LS(e){return d4(),h4(e)}var NS=Object.toString(),dc=Object.freeze([]),hc=Object.freeze({}),Bp=T3().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(Bp);var tt=function(e){bn(i,e);function i(t){return t===void 0&&(t="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(t))||this}return i}(Error);function IS(e){return e}var DS=Number.isInteger;function jS(e){return Number(e)===e&&e%1!==0}function FS(e){return Number.isFinite(e)}function hv(e){return Array.isArray(e)||ri(e)}function pv(e){return e?hv(e)?e:[e]:dc}function zS(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];for(var n=0;n<i.length;n++){var a=i[n];for(var l in a)e[l]=a[l]}return e}function Fs(e){var i;if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t==null?!0:((i=t.constructor)===null||i===void 0?void 0:i.toString())===NS}function s4(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function pc(e,i){return i===void 0&&(i=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||i&&e instanceof Date}function u4(e){return typeof e!="function"}function BS(e,i,t){_r(e)?Vg(e,i,t):Object.defineProperty(e,i,t)}function zs(e,i,t){BS(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}var US=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this;return t===void 0&&(t=!1),t?this.handlers.unshift(i):this.handlers.push(i),function(){n.unregister(i)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.handlers.indexOf(i)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.handlers.indexOf(i);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var n=this.handlers.slice();n.forEach(function(a){return a.apply(void 0,fa([],ca(i),!1))})}}),e}(),c4=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.eventHandlers&&this.eventHandlers[i];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var a=this.eventHandlers[i];return a||(a=this.eventHandlers[i]=new US),a.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.eventHandlers&&this.eventHandlers[i];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.eventHandlers&&this.eventHandlers[i];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.eventHandlers&&delete this.eventHandlers[i]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(i){for(var t,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var l=this.eventHandlers&&this.eventHandlers[i];l&&(t=l).emit.apply(t,fa([],ca(n),!1))}}),e}();function f4(e){for(var i=new Array(e.length),t=0;t<e.length;t++)i[t]=e[t];return i}function X0(e,i){return e.indexOf(i)===0}var d4=function(e,i){};d4.ids={};function qS(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function HS(){return typeof process<"u"&&s2&&s2.ENABLE_TYPE_CHECK==="true"}function Z0(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function h4(e){return WS(e.name,e)}function GS(e){return e}function VS(e){return function(){var i,t=[];for(i=0;i<arguments.length;i++)t[i]=arguments[i];return j5(this,function(n){switch(n.label){case 0:return[4,e.apply(void 0,fa([],ca(t),!1))];case 1:return[2,n.sent()]}})}}function $S(e){return j5(this,function(i){switch(i.label){case 0:return[4,e];case 1:return[2,i.sent()]}})}function WS(e,i){var t=function(){var a=Z5(),l=uv();if(!l)throw new tt("a mst flow must always have a parent context");var u=Q5(l);if(!u)throw new tt("a mst flow must always have a parent action context");var c={name:e,id:a,tree:l.tree,context:l.context,parentId:l.id,allParentIds:fa(fa([],ca(l.allParentIds),!1),[l.id],!1),rootId:l.rootId,parentEvent:l,parentActionEvent:u},h=arguments;function b(_,k,E){return _.$mst_middleware=t.$mst_middleware,Rg(ur(ur({},c),{type:k,args:[E]}),_)}return new Promise(function(_,k){var E,v=function(){E=i.apply(null,arguments),O(void 0)};v.$mst_middleware=t.$mst_middleware,Rg(ur(ur({},c),{type:"flow_spawn",args:f4(h)}),v);function O(P){var d;try{var m=b(function(y){d=E.next(y)},"flow_resume",P);m instanceof Error&&(d=E.throw(m))}catch(y){Z0(function(){b(function(w){k(y)},"flow_throw",y)});return}p(d)}function g(P){var d;try{b(function(m){d=E.throw(m)},"flow_resume_error",P)}catch(m){Z0(function(){b(function(y){k(m)},"flow_throw",m)});return}p(d)}function p(P){if(P.done){Z0(function(){b(function(d){_(d)},"flow_return",P.value)});return}if(!P.value||typeof P.value.then!="function")throw new tt("Only promises can be yielded to `async`, got: "+P);return P.value.then(O,g)}})};return t._isFlowAction=!0,t}function YS(e){if(!("oldValue"in e))throw new tt("Patches without `oldValue` field cannot be inversed");return[KS(e),XS(e)]}function KS(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 XS(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 ZS(e){return typeof e=="number"}function Wl(e){return ZS(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function p4(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function yp(e){if(e.length===0)return"";var i=function(t){return t.map(Wl).join("/")};return e[0]==="."||e[0]===".."?i(e):"/"+i(e)}function gc(e){var i=e.split("/").map(p4),t=e===""||e==="."||e===".."||X0(e,"/")||X0(e,"./")||X0(e,"../");if(!t)throw new tt("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return i[0]===""&&i.shift(),i}var Q0=Symbol("$preProcessorFailed"),QS=function(e){bn(i,e);function i(t,n,a){var l=e.call(this,a||t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Tt.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(i.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t}}),Object.defineProperty(i.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(t){try{return this.preProcessSnapshot(t)}catch{return Q0}}}),Object.defineProperty(i.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,t,n.storedValue):t}}),Object.defineProperty(i.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;JS(t.type,this,"create"),t instanceof yi&&(t.hasSnapshotPostProcessor=!!this._processors.postProcessor);var a=t.getSnapshot;t.getSnapshot=function(){return n.postProcessSnapshot(a.call(t),t)},P4(this._subtype)||(t.getReconciliationType=function(){return n})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=nn(l)?l:this.preProcessSnapshot(l),c=this._subtype.instantiate(t,n,a,u);return this._fixNode(c),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this._subtype.reconcile(t,nn(n)?n:this.preProcessSnapshot(n),a,l);return u!==t&&this._fixNode(u),u}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=!0);var a=this._subtype.getSnapshot(t);return n?this.postProcessSnapshot(a,t):a}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.preProcessSnapshotSafe(t);return a===Q0?_i(n,t,"Failed to preprocess value"):this._subtype.validate(a,n)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(i.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=cr(t)?this._subtype:nn(t)?lv(t,!1):this.preProcessSnapshotSafe(t);return n===Q0?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!(this._subtype instanceof fc))return!1;var a=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(t,a)}}),i}(Qa);function JS(e,i){for(var t,n,a=[],l=2;l<arguments.length;l++)a[l-2]=arguments[l];try{for(var u=wd(a),c=u.next();!c.done;c=u.next()){var h=c.value;e[h]=i[h].bind(i)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}function eE(e,i,t){return new QS(e,i,t)}var u2="Map.put can only be used to store complex values that have an identifier type attribute";function g4(e,i){var t,n,a=e.getSubTypes();if(a===Y5)return!1;if(a){var l=pv(a);try{for(var u=wd(l),c=u.next();!c.done;c=u.next()){var h=c.value;if(!g4(h,i))return!1}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}return e instanceof kd&&i.push(e),!0}var Gl;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Gl||(Gl={}));var tE=function(e){bn(i,e);function i(t,n){return e.call(this,t,sn.ref.enhancer,n)||this}return Object.defineProperty(i.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(i.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(i.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(i.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(i.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!t)throw new tt("Map.put cannot be used to set empty values");if(nn(t)){var n=st(t);if(n.identifier===null)throw new tt(u2);return this.set(n.identifier,t),t}else if(s4(t)){var a=st(this),l=a.type;if(l.identifierMode!==Gl.YES)throw new tt(u2);var u=l.mapIdentifierAttribute,c=t[u];if(!vv(c)){var h=this.put(l.getChildType().create(t,a.environment));return this.put(lv(h))}var b=_c(c);return this.set(b,t),this.get(b)}else throw new tt("Map.put can only be used to store complex values")}}),i}(Lp),bp=function(e){bn(i,e);function i(t,n,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Gl.UNKNOWN}),Object.defineProperty(l,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Map}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l._determineIdentifierMode(),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,n)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._determineIdentifierMode(),dv(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Gl.UNKNOWN){var t=[];if(g4(this._subType,t)){var n=t.reduce(function(a,l){if(!l.identifierAttribute)return a;if(a&&a!==l.identifierAttribute)throw new tt("The objects in a map should all have the same identifier attribute, expected '".concat(a,"', but child of type '").concat(l.name,"' declared attribute '").concat(l.identifierAttribute,"' as identifier"));return l.identifierAttribute},void 0);n?(this.identifierMode=Gl.YES,this.mapIdentifierAttribute=n):this.identifierMode=Gl.NO}}}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type._subType,l={};return Object.keys(n).forEach(function(u){l[u]=a.instantiate(t,u,void 0,n[u])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new tE(t,this.name)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){qg(n,t.unbox);var a=t.type;a.hookInitializers.forEach(function(l){var u=l(n);Object.keys(u).forEach(function(c){var h=u[c],b=Cd(n,c,h);zs(n,c,b)})}),Ap(n,this.willChange),Mp(n,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return Hg(t.storedValue)}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t.storedValue.get(""+n);if(!a)throw new tt("Not a child "+n);return a}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=st(t.object),a=t.name;n.assertWritable({subpath:a});var l=n.type,u=l._subType;switch(t.type){case"update":{var c=t.newValue,h=t.object.get(a);if(c===h)return null;Xa(u,c),t.newValue=u.reconcile(n.getChildNode(a),t.newValue,n,a),l.processIdentifier(a,t.newValue)}break;case"add":Xa(u,t.newValue),t.newValue=u.instantiate(n,a,void 0,t.newValue),l.processIdentifier(a,t.newValue);break}return t}}),Object.defineProperty(i.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.identifierMode===Gl.YES&&n instanceof yi){var a=n.identifier;if(a!==t)throw new tt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(a,"', but expected: '").concat(t,"'"))}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return t.getChildren().forEach(function(a){n[a.subpath]=a.snapshot}),n}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=st(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:Wl(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Wl(t.name),value:t.newValue.snapshot,oldValue:void 0},n);case"delete":var a=t.oldValue.snapshot;return t.oldValue.die(),void n.emitPatch({op:"remove",path:Wl(t.name),oldValue:a},n)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=t.storedValue;switch(a.op){case"add":case"replace":l.set(n,a.value);break;case"remove":l.delete(n);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=t.storedValue,l={};if(Array.from(a.keys()).forEach(function(c){l[c]=!1}),n)for(var u in n)a.set(u,n[u]),l[""+u]=!0;Object.keys(l).forEach(function(c){l[c]===!1&&a.delete(c)})}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return Fs(t)?zp(Object.keys(t).map(function(l){return a._subType.validate(t[l],fv(n,l,a._subType))})):_i(n,t,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return hc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.delete(n)}}),i}(fc);bp.prototype.applySnapshot=Zn(bp.prototype.applySnapshot);function nE(e){return new bp("Map<string, ".concat(e.name,">"),e)}function rE(e){return cr(e)&&(e.flags&Tt.Map)>0}var _p=function(e){bn(i,e);function i(t,n,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Array}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,n)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return dv(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=[]);var a=t.type._subType,l={};return n.forEach(function(u,c){var h=""+c;l[h]=a.instantiate(t,h,void 0,u)}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ur(ur({},Bp),{name:this.name});return sn.array(l4(t),n)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Mo(n).dehancer=t.unbox;var a=t.type;a.hookInitializers.forEach(function(l){var u=l(n);Object.keys(u).forEach(function(c){var h=u[c],b=Cd(n,c,h);zs(n,c,b)})}),Ap(n,this.willChange),Mp(n,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue.slice()}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=Number(n);if(a<t.storedValue.length)return t.storedValue[a];throw new tt("Not a child: "+n)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=st(t.object);n.assertWritable({subpath:""+t.index});var a=n.type._subType,l=n.getChildren();switch(t.type){case"update":{if(t.newValue===t.object[t.index])return null;var u=c2(n,a,[l[t.index]],[t.newValue],[t.index]);if(!u)return null;t.newValue=u[0]}break;case"splice":{var c=t.index,h=t.removedCount,b=t.added,_=c2(n,a,l.slice(c,c+h),b,b.map(function(E,v){return c+v}));if(!_)return null;t.added=_;for(var k=c+h;k<l.length;k++)l[k].setParent(n,""+(k+b.length-h))}break}return t}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=[];return Object.keys(t).forEach(function(a){n.push(t[a].getSnapshot())}),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=st(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"splice":if(t.removedCount&&t.addedCount===t.object.length)return void n.emitPatch({op:"replace",path:"",value:n.snapshot,oldValue:t.removed.map(function(l){return l.snapshot})},n);for(var a=t.removedCount-1;a>=0;a--)n.emitPatch({op:"remove",path:""+(t.index+a),oldValue:t.removed[a].snapshot},n);for(var a=0;a<t.addedCount;a++)n.emitPatch({op:"add",path:""+(t.index+a),value:t.added[a].snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=t.storedValue,u=n==="-"?l.length:Number(n);switch(a.op){case"replace":l[u]=a.value;break;case"add":l.splice(u,0,a.value);break;case"remove":l.splice(u,1);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=t.storedValue;a.replace(n)}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return hv(t)?zp(t.map(function(l,u){return a._subType.validate(l,fv(n,""+u,a._subType))})):_i(n,t,"Value is not an array")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return dc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.splice(Number(n),1)}}),i}(fc);_p.prototype.applySnapshot=Zn(_p.prototype.applySnapshot);function iE(e){return new _p("".concat(e.name,"[]"),e)}function c2(e,i,t,n,a){for(var l=!0,u=0;;u++){var c=u<=n.length-1,h=t[u],b=c?n[u]:void 0,_=""+a[u];if(AS(b)&&(b=b.storedValue),!h&&!c)break;if(!c)l=!1,t.splice(u,1),h instanceof yi&&h.createObservableInstanceIfNeeded(),h.die(),u--;else if(h)if(f2(h,b))t[u]=J0(i,e,_,b,h);else{for(var E=void 0,v=u;v<t.length;v++)if(f2(t[v],b)){E=t.splice(v,1)[0];break}l=!1;var k=J0(i,e,_,b,E);t.splice(u,0,k)}else{if(nn(b)&&st(b).parent===e)throw new tt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(e.path,"/").concat(_,"', but it lives already at '").concat(st(b).path,"'"));l=!1;var k=J0(i,e,_,b);t.splice(u,0,k)}}return l?null:t}function J0(e,i,t,n,a){Xa(e,n);function l(){if(nn(n)){var c=st(n);if(c.assertAlive(hc),c.parent!==null&&c.parent===i)return c.setParent(i,t),c}return a?e.reconcile(a,n,i,t):e.instantiate(i,t,void 0,n)}var u=l();return a&&a!==u&&(a instanceof yi&&a.createObservableInstanceIfNeeded(),a.die()),u}function f2(e,i){if(!e.isAlive)return!1;if(nn(i)){var t=st(i);return t.isAlive&&t===e}if(e.snapshot===i)return!0;if(!(e instanceof yi))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&Fs(i)&&n.is(i)&&n.isMatchingSnapshotId(e,i)}function oE(e){return cr(e)&&(e.flags&Tt.Array)>0}var d2="preProcessSnapshot",h2="postProcessSnapshot";function aE(){return st(this).toString()}var p2={name:"AnonymousModel",properties:{},initializers:dc};function lE(e){var i=Object.keys(e),t=new Set;return i.forEach(function(n){if(t.has(n))throw new tt("".concat(n," is declared twice in the model. Model should not contain the same keys"));t.add(n)}),i.reduce(function(n,a){if(a in sr)throw new tt("Hook '".concat(a,"' was defined as property. Hooks should be defined as part of the actions"));var l=Object.getOwnPropertyDescriptor(e,a);if("get"in l)throw new tt("Getters are not supported as properties. Please use views instead");var u=l.value;if(u==null)throw new tt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(pc(u))n[a]=Bs(hE(u),u);else if(u instanceof bp)n[a]=Bs(u,{});else if(u instanceof _p)n[a]=Bs(u,[]);else if(!cr(u))throw new tt("Invalid type definition for property '".concat(a,"', cannot infer a type from a value like '").concat(u,"' (").concat(typeof u,")"));return n},ur({},e))}var kd=function(e){bn(i,e);function i(t){var n=e.call(this,t.name||p2.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.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(a){return n.cloneAndEnhance({name:a})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({properties:a})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=n.preProcessor;return l?n.cloneAndEnhance({preProcessor:function(u){return l(a(u))}}):n.cloneAndEnhance({preProcessor:a})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=n.postProcessor;return l?n.cloneAndEnhance({postProcessor:function(u){return a(l(u))}}):n.cloneAndEnhance({postProcessor:a})}}),Object.assign(n,p2,t),n.properties=lE(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(i.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=void 0;return this.forAllProps(function(n,a){if(a.flags&Tt.Identifier){if(t)throw new tt("Cannot define property '".concat(n,"' as object identifier, property '").concat(t,"' is already defined as identifier property"));t=n}}),t}}),Object.defineProperty(i.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new i({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})}}),Object.defineProperty(i.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){return n.instantiateActions(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new tt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(a){if(a===d2)throw new tt("Cannot define action '".concat(d2,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===h2)throw new tt("Cannot define action '".concat(h2,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var l=n[a],u=t[a];if(a in sr&&u){var c=l;l=function(){u.apply(null,arguments),c.apply(null,arguments)}}var h=l.$mst_middleware,b=l.bind(n);b._isFlowAction=l._isFlowAction||!1,b.$mst_middleware=h;var _=Cd(t,a,b);n[a]=_,zs(t,a,_)})}}),Object.defineProperty(i.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;if(typeof t!="function")throw new tt("You passed an ".concat(typeof t," to volatile state as an argument, when function is expected"));var a=function(l){return n.instantiateVolatileState(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new tt("volatile state initializer should return a plain object containing state");Gg(t,n)}}),Object.defineProperty(i.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){var u=t(l),c=u.actions,h=u.views,b=u.state,_=L7(u,["actions","views","state"]);for(var k in _)throw new tt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(k,"'"));return b&&n.instantiateVolatileState(l,b),h&&n.instantiateViews(l,h),c&&n.instantiateActions(l,c),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){return n.instantiateViews(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new tt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(a){var l,u=Object.getOwnPropertyDescriptor(n,a);if("get"in u)Vg(t,a,u),$g(t,(l={},l[a]=$s,l));else if(typeof u.value=="function")zs(t,a,u.value);else throw new tt("A view member should either be a function or getter based property")})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=nn(l)?l:this.applySnapshotPreProcessor(l);return dv(this,t,n,a,u)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type,l={};return a.forAllProps(function(u,c){l[u]=c.instantiate(t,u,void 0,n[u])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ur(ur({},Bp),{name:this.name});return sn.object(t,hc,n)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){zs(n,"toString",aE),this.forAllProps(function(a){qg(n,a,t.unbox)}),this.initializers.reduce(function(a,l){return l(a)},n),Ap(n,this.willChange),Mp(n,this.didChange)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=st(n.object),l=n.name;a.assertWritable({subpath:l});var u=a.type.properties[l];return u&&(Xa(u,n.newValue),n.newValue=u.reconcile(a.getChildNode(l),n.newValue,a,l)),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=st(n.object),l=a.type.properties[n.name];if(l){var u=n.oldValue?n.oldValue.snapshot:void 0;a.emitPatch({op:"replace",path:Wl(n.name),value:n.newValue.snapshot,oldValue:u},a)}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=[];return this.forAllProps(function(l){a.push(n.getChildNode(t,l))}),a}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a;if(!(n in this.properties))throw new tt("Not a value property: "+n);var l=Mo(t.storedValue,n),u=(a=l.raw)===null||a===void 0?void 0:a.call(l);if(!u)throw new tt("Node not available for property "+n);return u}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var l={};return this.forAllProps(function(u,c){try{var h=ua(t.storedValue,u);h.reportObserved()}catch{throw new tt("".concat(u," property is declared twice"))}l[u]=a.getChildNode(t,u).snapshot}),n?this.applySnapshotPostProcessor(l):l}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){if(!(a.op==="replace"||a.op==="add"))throw new tt("object does not support operation ".concat(a.op));t.storedValue[n]=a.value}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=this.applySnapshotPreProcessor(n);this.forAllProps(function(l){t.storedValue[l]=a[l]})}}),Object.defineProperty(i.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.preProcessor;return n?n.call(null,t):t}}),Object.defineProperty(i.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.postProcessor;return n?n.call(null,t):t}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.properties[t]}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,l=this.applySnapshotPreProcessor(t);return Fs(l)?zp(this.propertyNames.map(function(u){return a.properties[u].validate(l[u],fv(n,u,a.properties[u]))})):_i(n,l,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.propertyNames.forEach(function(a){return t(a,n.properties[a])})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;return"{ "+this.propertyNames.map(function(n){return n+": "+t.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return hc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue[n]=void 0}}),i}(fc);kd.prototype.applySnapshot=Zn(kd.prototype.applySnapshot);function sE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new kd({name:t,properties:n})}function uE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string",n=t?e[0]:"AnonymousModel";return t&&e.shift(),e.reduce(function(a,l){return a.cloneAndEnhance({name:a.name+"_"+l.name,properties:l.properties,initializers:l.initializers,preProcessor:function(u){return l.applySnapshotPreProcessor(a.applySnapshotPreProcessor(u))},postProcessor:function(u){return l.applySnapshotPostProcessor(a.applySnapshotPostProcessor(u))}})}).named(n)}function v4(e){return cr(e)&&(e.flags&Tt.Object)>0}var el=function(e){bn(i,e);function i(t,n,a,l){l===void 0&&(l=IS);var u=e.call(this,t)||this;return Object.defineProperty(u,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(u,"checker",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(u,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:l}),u.flags=n,u}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.initializer(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(pc(t)&&this.checker(t))return bi();var a=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return _i(n,t,"Value is not a ".concat(a))}}),i}(Zs),m4=new el("string",Tt.String,function(e){return typeof e=="string"}),y4=new el("number",Tt.Number,function(e){return typeof e=="number"}),cE=new el("integer",Tt.Integer,function(e){return DS(e)}),fE=new el("float",Tt.Float,function(e){return jS(e)}),dE=new el("finite",Tt.Finite,function(e){return FS(e)}),b4=new el("boolean",Tt.Boolean,function(e){return typeof e=="boolean"}),_4=new el("null",Tt.Null,function(e){return e===null}),w4=new el("undefined",Tt.Undefined,function(e){return e===void 0}),S4=new el("Date",Tt.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});S4.getSnapshot=function(e){return e.storedValue.getTime()};var E4=S4;function hE(e){switch(typeof e){case"string":return m4;case"number":return y4;case"boolean":return b4;case"object":if(e instanceof Date)return E4}throw new tt("Cannot determine primitive type from value "+e)}function O4(e){return cr(e)&&(e.flags&(Tt.String|Tt.Number|Tt.Integer|Tt.Boolean|Tt.Date))>0}var pE=function(e){bn(i,e);function i(t){var n=e.call(this,JSON.stringify(t))||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:Tt.Literal}),n.value=t,n}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return pc(t)&&t===this.value?bi():_i(n,t,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),i}(Zs);function x4(e){return new pE(e)}function gE(e){return cr(e)&&(e.flags&Tt.Literal)>0}var vE=function(e){bn(i,e);function i(t,n,a,l){var u=e.call(this,t)||this;return Object.defineProperty(u,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(u,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(u,"_message",{enumerable:!0,configurable:!0,writable:!0,value:l}),u}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Tt.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this._subtype.validate(t,n);if(a.length>0)return a;var l=nn(t)?st(t).snapshot:t;return this._predicate(l)?bi():_i(n,t,this._message(t))}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(Qa);function mE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():cr(e[0])?e[0].name:null,n=e[0],a=e[1],l=e[2]?e[2]:function(u){return"Value does not respect the refinement predicate"};return new vE(t,n,a,l)}function yE(e){return cr(e)&&(e.flags&Tt.Refinement)>0}function bE(e,i){var t=typeof e=="string"?i:e,n=Up.apply(void 0,fa([],ca(t.map(function(a){return x4(""+a)})),!1));return typeof e=="string"&&(n.name=e),n}var _E=function(e){bn(i,e);function i(t,n,a){var l=e.call(this,t)||this;return Object.defineProperty(l,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),a=ur({eager:!0,dispatcher:void 0},a),l._dispatcher=a.dispatcher,a.eager||(l._eager=!1),l}return Object.defineProperty(i.prototype,"flags",{get:function(){var t=Tt.Union;return this._types.forEach(function(n){t|=n.flags}),t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._types.some(function(n){return n.isAssignableFrom(t)})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.determineType(l,void 0);if(!u)throw new tt("No matching type for union "+this.describe());return u.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.determineType(n,t.getReconciliationType());if(!u)throw new tt("No matching type for union "+this.describe());return u.reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._dispatcher?this._dispatcher(t):n?n.is(t)?n:this._types.filter(function(a){return a!==n}).find(function(a){return a.is(t)}):this._types.find(function(a){return a.is(t)})}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._dispatcher)return this._dispatcher(t).validate(t,n);for(var a=[],l=0,u=0;u<this._types.length;u++){var c=this._types[u],h=c.validate(t,n);if(h.length===0){if(this._eager)return bi();l++}else a.push(h)}return l===1?bi():_i(n,t,"No type is applicable for the union").concat(zp(a))}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),i}(Qa);function Up(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];var n=cr(e)?void 0:e,a=cr(e)?fa([e],ca(i),!1):i,l="("+a.map(function(u){return u.name}).join(" | ")+")";return new _E(l,a,n)}function P4(e){return cr(e)&&(e.flags&Tt.Union)>0}var wE=function(e){bn(i,e);function i(t,n,a){var l=e.call(this,t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:a}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Tt.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(this.optionalValues.indexOf(l)>=0){var u=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,n,a,u)}return this._subtype.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.reconcile(t,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),a,l)}}),Object.defineProperty(i.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&Xa(this,t),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.optionalValues.indexOf(t)>=0?bi():this._subtype.validate(t,n)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(Qa);function SE(e,i){if(typeof i!="function"&&nn(i))throw new tt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Bs(e,i,t){return SE(e,i),new wE(e,i,t||EE)}var EE=[void 0];function OE(e){return cr(e)&&(e.flags&Tt.Optional)>0}var xE=Bs(w4,void 0),PE=Bs(_4,null);function C4(e){return Up(e,xE)}function CE(e){return Up(e,PE)}var kE=function(e){bn(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a}return Object.defineProperty(i.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Tt.Late},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(a){if(a instanceof ReferenceError)n=void 0;else throw a}if(t&&n===void 0)throw new tt("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.getSubType(!0).instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.getSubType(!0).reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.getSubType(!1);return a?a.validate(t,n):bi()}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getSubType(!1);return n?n.isAssignableFrom(t):!1}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t||Y5}}),i}(Qa);function TE(e,i){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?i:e;return new kE(t,n)}function AE(e){return cr(e)&&(e.flags&Tt.Late)>0}function RE(e,i){return new ME(e,i)}var ME=function(e){bn(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:sn.array()}),Pg(function(){return a.pendingNodeList.length>0&&a.pendingNodeList.some(function(l){return l.isAlive&&a.options.shouldLoadPredicate(l.parent?l.parent.value:null)})},function(){a.options.loadType().then(Zn(function(l){a.loadedType=l,a.pendingNodeList.forEach(function(u){u.parent&&a.loadedType&&u.parent.applyPatches([{op:"replace",path:"/".concat(u.subpath),value:u.snapshot}])})}))}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this;if(this.loadedType)return this.loadedType.instantiate(t,n,a,l);var c=ns(this,t,n,a,l);return this.pendingNodeList.push(c),Pg(function(){return!c.isAlive},function(){return u.pendingNodeList.splice(u.pendingNodeList.indexOf(c),1)}),c}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.loadedType?this.loadedType.validate(t,n):u4(t)?bi():_i(n,t,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.loadedType?(t.die(),this.loadedType.instantiate(a,l,a.environment,n)):e.prototype.reconcile.call(this,t,n,a,l)}}),i}(Zs),k4=function(e){bn(i,e);function i(t){var n=e.call(this,t?"frozen(".concat(t.name,")"):"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Frozen}),n}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return u4(t)?this.subType?this.subType.validate(t,n):bi():_i(n,t,"Value is not serializable and cannot be frozen")}}),i}(Zs),g2=new k4;function LE(e){return arguments.length===0?g2:cr(e)?new k4(e):Bs(g2,e)}function NE(e){return cr(e)&&(e.flags&Tt.Frozen)>0}function IE(e){switch(e){case sr.beforeDestroy:return"destroy";case sr.beforeDetach:return"detach";default:return}}var DE=function(){function e(i,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),vv(i))this.identifier=i;else if(nn(i)){var n=st(i);if(!n.identifierAttribute)throw new tt("Can only store references with a defined identifier attribute.");var a=n.unnormalizedIdentifier;if(a==null)throw new tt("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new tt("Can only store references to tree nodes or identifiers, got: '".concat(i,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=_c(this.identifier),n=i.root,a=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==a){var l=this.targetType,u=n.identifierCache.resolve(l,t);if(!u)throw new gv("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(i.path,")"));this.resolvedReference={node:u,lastCacheModification:a}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),gv=function(e){bn(i,e);function i(t){var n=e.call(this,t)||this;return Object.setPrototypeOf(n,i.prototype),n}return i}(Error),T4=function(e){bn(i,e);function i(t,n){var a=e.call(this,"reference(".concat(t.name,")"))||this;return Object.defineProperty(a,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(a,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Reference}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.targetType.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return vv(t)?bi():_i(n,t,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(i.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=n.parent;if(!(!u||!u.isAlive)){var c=u.storedValue;c&&this.onInvalidated({cause:t,parent:c,invalidTarget:l?l.storedValue:void 0,invalidId:a,replaceRef:function(h){cc(n.root.storedValue,{op:"replace",value:h,path:n.path})},removeRef:function(){v4(u.type)?this.replaceRef(void 0):cc(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(i.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,l=this.getValue(t);if(l){var u=st(l),c=function(_,k){var E=IE(k);E&&a.fireInvalidated(E,t,n,u)},h=u.registerHook(sr.beforeDetach,c),b=u.registerHook(sr.beforeDestroy,c);return function(){h(),b()}}}}),Object.defineProperty(i.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=this;if(this.onInvalidated){var u;t.registerHook(sr.beforeDestroy,function(){u&&u()});var c=function(h){u&&u();var b=t.parent,_=b&&b.storedValue;if(b&&b.isAlive&&_){var k=void 0;a?k=!!a.get(n,_):k=t.root.identifierCache.has(l.targetType,_c(n)),k?u=l.addTargetNodeWatcher(t,n):h||l.fireInvalidated("invalidSnapshotReference",t,n,null)}};t.state===Lr.FINALIZED?c(!0):(t.isRoot||t.root.registerHook(sr.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(sr.afterAttach,function(){c(!1)}))}}}),i}(Zs),jE=function(e){bn(i,e);function i(t,n){return e.call(this,t,n)||this}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=t.storedValue;return n.resolvedValue}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.storedValue;return n.identifier}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=nn(l)?q5(l):l,c=new DE(l,this.targetType),h=ns(this,t,n,a,c);return c.node=h,this.watchTargetNodeForInvalidations(h,u,void 0),h}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t.isDetaching&&t.type===this){var u=nn(n),c=t.storedValue;if(!u&&c.identifier===n||u&&c.resolvedValue===n)return t.setParent(a,l),t}var h=this.instantiate(a,l,void 0,n);return t.die(),h}}),i}(T4),FE=function(e){bn(i,e);function i(t,n,a){var l=e.call(this,t,a)||this;return Object.defineProperty(l,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),l}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=this.options.get(t.storedValue,t.parent?t.parent.storedValue:null);return n}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=nn(l)?this.options.set(l,t?t.storedValue:null):l,c=ns(this,t,n,a,u);return this.watchTargetNodeForInvalidations(c,u,this.options),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=nn(n)?this.options.set(n,t?t.storedValue:null):n;if(!t.isDetaching&&t.type===this&&t.storedValue===u)return t.setParent(a,l),t;var c=this.instantiate(a,l,void 0,u);return t.die(),c}}),i}(T4);function A4(e,i){var t=i||void 0,n=i?i.onInvalidated:void 0;return t&&(t.get||t.set)?new FE(e,{get:t.get,set:t.set},n):new jE(e,n)}function zE(e){return cr(e)&&(e.flags&Tt.Reference)>0}function BE(e,i){var t=A4(e,ur(ur({},i),{onInvalidated:function(n){i&&i.onInvalidated&&i.onInvalidated(n),n.removeRef()}}));return i&&i.acceptsUndefined===!1?t:C4(t)}var R4=function(e){bn(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Identifier}),a}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t||!(t.type instanceof kd))throw new tt("Identifier types can only be instantiated as direct child of a model type");return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(t.storedValue!==n)throw new tt("Tried to change identifier from '".concat(t.storedValue,"' to '").concat(n,"'. Changing identifiers is not allowed."));return t.setParent(a,l),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return typeof t!==this.validType?_i(n,t,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):bi()}}),i}(Zs),UE=function(e){bn(i,e);function i(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Identifier}),t}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),i}(R4),qE=function(e){bn(i,e);function i(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),i}(R4),HE=new UE,GE=new qE;function VE(e){return cr(e)&&(e.flags&Tt.Identifier)>0}function _c(e){return""+e}function vv(e){return typeof e=="string"||typeof e=="number"}function $E(e){return new WE(e)}var WE=function(e){bn(i,e);function i(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Custom}),n}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.options.isTargetType(t))return bi();var a=this.options.getValidationMessage(t);return a?_i(n,t,"Invalid value for type '".concat(this.name,"': ").concat(a)):bi()}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.options.toSnapshot(t.storedValue)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.options.isTargetType(l)?l:this.options.fromSnapshot(l,t&&t.root.environment);return ns(this,t,n,a,u)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=!this.options.isTargetType(n);if(!t.isDetaching){var c=t.type===this&&(u?n===t.snapshot:n===t.storedValue);if(c)return t.setParent(a,l),t}var h=u?this.options.fromSnapshot(n,a.root.environment):n,b=this.instantiate(a,l,void 0,h);return t.die(),b}}),i}(Zs),v2={enumeration:bE,model:sE,compose:uE,custom:$E,reference:A4,safeReference:BE,union:Up,optional:Bs,literal:x4,maybe:C4,maybeNull:CE,refinement:mE,string:m4,boolean:b4,number:y4,integer:cE,float:fE,finite:dE,Date:E4,map:nE,array:iE,frozen:LE,identifier:HE,identifierNumber:GE,late:TE,lazy:RE,undefined:w4,null:_4,snapshotProcessor:eE};const YE=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:eS,addMiddleware:J5,applyAction:K5,applyPatch:cc,applySnapshot:z5,cast:iS,castFlowReturn:GS,castToReferenceSnapshot:aS,castToSnapshot:oS,clone:Z7,createActionTrackingMiddleware:fS,createActionTrackingMiddleware2:hS,decorate:bS,destroy:J7,detach:Q7,escapeJsonPath:Wl,flow:h4,getChildType:N7,getEnv:tS,getIdentifier:q5,getLivelinessChecking:D5,getMembers:rS,getNodeId:lS,getParent:U7,getParentOfType:H7,getPath:U5,getPathParts:G7,getPropertyMembers:V5,getRelativePath:X7,getRoot:B5,getRunningActionContext:cv,getSnapshot:lv,getType:Ud,hasEnv:nS,hasParent:B7,hasParentOfType:q7,isActionContextChildOf:SS,isActionContextThisOrChildOf:ES,isAlive:sv,isArrayType:oE,isFrozenType:NE,isIdentifierType:VE,isLateType:AE,isLiteralType:gE,isMapType:rE,isModelType:v4,isOptionalType:OE,isPrimitiveType:O4,isProtected:z7,isReferenceType:zE,isRefinementType:yE,isRoot:V7,isStateTreeNode:nn,isType:cr,isUnionType:P4,isValidReference:K7,joinJsonPath:yp,onAction:X5,onPatch:F5,onSnapshot:I7,process:LS,protect:j7,recordActions:mS,recordPatches:D7,resolveIdentifier:W7,resolvePath:$7,setLivelinessChecking:I5,setLivelynessChecking:M7,splitJsonPath:gc,t:v2,toGenerator:$S,toGeneratorFunction:VS,tryReference:Y7,tryResolve:H5,typecheck:n4,types:v2,unescapeJsonPath:p4,unprotect:F7,walk:G5},Symbol.toStringTag,{value:"Module"})),eo=Xl(YE);var e1={},m2;function M4(){return m2||(m2=1,function(e){function i({oldText:t,newText:n,element:a}){if(!(n.length/Math.max(20,t.length)>=4))return a.fontSize;const l=a.width*a.page.computedHeight/n.length,u=1.5*Math.sqrt(l),c=a.fontSize;return Math.min(c,Math.max(5,Math.round(u)))}Object.defineProperty(e,"__esModule",{value:!0}),e.getLimitedFontSize=i}(e1)),e1}var y2;function L4(){return y2||(y2=1,function(e){var i=id&&id.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=R,e.getDir=D,e.usePrevious=Q;const t=i(Tn()),n=Qi,a=Ja,l=Fd,u=da,c=i(Ji()),h=A7,b=zd(),_=Ks(),k=Bd(),E=ts(),v=L5(),O=Fp(),g=yc(),p=bc(),P=Xs(),d=eo,m=M4();c.default._fixTextRendering=!0;const y=document.createElement("style");y.type="text/css",document.head.appendChild(y);const w={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function N(L){var F="֑-߿יִ-﷽ﹰ-ﻼ";return new RegExp("^[^"+F+"]*?["+F+"]").test(L)}function R(L){L=L.replace(/\s/g,"");let F=0;for(var H=0;H<L.length;H++)N(L[H])&&(F+=1);return F>L.length/2}function D(L){return R(L)?"rtl":"ltr"}const x=(0,n.observer)(({textNodeRef:L,element:F,onBlur:H,selectAll:$,cursorPosition:ee})=>{const[V,X]=t.default.useState(w),Y=L.current;t.default.useLayoutEffect(()=>{const ue={};ue.width=Y.width()-2*Y.padding()+"px",ue.height=Y.height()-2*Y.padding()+Y.fontSize()*Y.lineHeight()+"px",ue.fontSize=Y.fontSize()+"px",ue.lineHeight=Y.lineHeight()+.01,ue.fontFamily=Y.fontFamily(),ue.textAlign=Y.align(),ue.color=Y.fill(),ue.fontWeight=F.fontWeight,ue.fontStyle=F.fontStyle,ue.letterSpacing=F.letterSpacing+"em";const de=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${V.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;y.innerHTML="",y.appendChild(document.createTextNode(de)),JSON.stringify(ue)!==JSON.stringify(V)&&X(ue)});const te=t.default.useRef(null);t.default.useLayoutEffect(()=>{var ue;const de=te.current;if(!de)return;(ue=te.current)===null||ue===void 0||ue.focus();const pe=ee||de.value.length;de.selectionStart=de.selectionEnd=pe,$&&(de==null||de.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",H);const ue=de=>{var pe;!((pe=te.current)===null||pe===void 0)&&pe.contains(de.target)||H()};return window.addEventListener("touchstart",ue),()=>{window.removeEventListener("blur",H),window.removeEventListener("touchstart",ue)}},[]);let re=0;const ie=Y.textArr.length*Y.lineHeight()*Y.fontSize();F.verticalAlign==="middle"&&(re=(F.a.height-ie)/2),F.verticalAlign==="bottom"&&(re=F.a.height-ie);const ae=(0,v.removeTags)(F.text);return t.default.createElement("textarea",{className:"polotno-input",ref:te,dir:D(ae),style:Object.assign(Object.assign(Object.assign({},w),V),{paddingTop:re+"px"}),value:ae,onChange:ue=>{const de=(0,m.getLimitedFontSize)({oldText:F.text,newText:ue.target.value,element:F});F.set({text:ue.target.value,fontSize:de})},placeholder:F.placeholder,onBlur:H})}),S=L=>t.default.createElement(l.Html,null,t.default.createElement(x,Object.assign({},L))),A=L=>{const[F,H]=t.default.useState(!1),$=t.default.useRef(!1);return t.default.useEffect(()=>{var ee=!0;return setTimeout(()=>{ee&&(L._editModeEnabled&&($.current=!0),H(!0),setTimeout(()=>{$.current=!1},50))},50),()=>{ee=!1}},[]),{editorEnabled:F&&L._editModeEnabled,selectAll:$.current}},M=(L,F)=>{const[H,$]=t.default.useReducer(V=>V+1,0),ee=t.default.useRef((0,k.isFontLoaded)(F));return t.default.useLayoutEffect(()=>{if(ee.current=(0,k.isFontLoaded)(F),ee.current)return;let V=!0;return(async()=>{ee.current=!1,$();const X=(0,_.incrementLoader)(`text ${F}`);await L.loadFont(F),setTimeout(X,100),V&&(ee.current=!0,$())})(),()=>{V=!1}},[F]),[ee.current]};e.useFontLoader=M;const T=({fontLoaded:L,fontFamily:F,fontSize:H,lineHeight:$})=>t.default.useMemo(()=>{if(typeof $=="number")return $;const ee=document.createElement("div");ee.style.fontFamily=F,ee.style.fontSize=H+"px",ee.style.lineHeight=$,ee.innerText="Test text",document.body.appendChild(ee);const V=ee.offsetHeight;return document.body.removeChild(ee),V/H},[L,F,H,$]);function z(L){var F=L.getAbsoluteTransform().copy();F.invert();var H=L.getStage().getPointerPosition();return F.point(H)}function U(L){var F;const H=L.target,$=z(H),ee=H.textArr,V=Math.floor($.y/(H.fontSize()*H.lineHeight())),X=ee.slice(0,V).reduce((re,ie)=>re+ie.text.length,V),Y=(F=ee[V])!==null&&F!==void 0?F:ee[0];let te=0;return H.align()==="right"?te=H.width()-Y.width:H.align()==="center"&&(te=H.width()/2-Y.width/2),X+Math.round(($.x-te)/Y.width*Y.text.length)}function Q(L){const F=t.default.useRef(L),H=t.default.useRef(L);return t.default.useMemo(()=>{H.current=F.current,F.current=L},[L]),H.current}function K(L){return/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(L)}function J(L,F,H=!1){const $=L.fontSize(),ee=L.height(),V=(0,v.removeTags)(F.text);let X=F.a.fontSize;L.height(void 0);const Y=Math.round(2*F.a.fontSize)-1;for(let te=1;te<Y;te++){const re=F.a.height&&L.height()>F.a.height;let ie=V.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((de,pe)=>K(pe)?de.concat(pe.split("")):de.concat(pe),[]),ae=L.textArr.map(de=>de.text).join(";");const ue=ie.find(de=>!ae.includes(de)||(ae=ae.replace(de,""),!1));if(!(re||ue&&!H))break;X-=.5,L.fontSize(X)}return L.fontSize($),L.height(ee),X}function B({lines:L,lineHeight:F,width:H,align:$="left",padding:ee=0,cornerRadius:V=0}){var X;L.forEach((ie,ae)=>{ie.cx=H/2,$==="right"?ie.cx=H-ie.width/2:$==="left"&&(ie.cx=ie.width/2),$!=="justify"||ie.lastInParagraph||(ie.width=H),$==="justify"&&(ie.cx=ie.width/2)});let Y=`M ${(X=L[0])===null||X===void 0?void 0:X.cx} ${-ee}`;L.forEach((ie,ae)=>{const{cx:ue}=ie,de=L[ae-1];de&&de.width>ie.width?Y+=` L ${ue+ie.width/2+ee} ${ae*F+ee}`:Y+=` L ${ue+ie.width/2+ee} ${ae*F-ee}`;const pe=L[ae+1];pe&&pe.width>ie.width?Y+=` L ${ue+ie.width/2+ee} ${(ae+1)*F-ee}`:Y+=` L ${ue+ie.width/2+ee} ${(ae+1)*F+ee}`});for(var te=L.length-1;te>=0;te--){const ie=L[te],{cx:ae}=ie,ue=L[te+1];ue&&ue.width>ie.width?Y+=` L ${ae-ie.width/2-ee} ${(te+1)*F-ee}`:Y+=` L ${ae-ie.width/2-ee} ${(te+1)*F+ee}`;const de=L[te-1];de&&de.width>ie.width?Y+=` L ${ae-ie.width/2-ee} ${te*F+ee}`:Y+=` L ${ae-ie.width/2-ee} ${te*F-ee}`}Y+=" Z";const re=(0,h.parsePath)(Y);return(0,h.roundCommands)(re,V).path}e.getLineHeight=T,e.TextElement=(0,n.observer)(({element:L,store:F})=>{const H=t.default.useRef(null),$=t.default.useRef(null),{editorEnabled:ee,selectAll:V}=A(L),[X,Y]=t.default.useState(!1),[te,re]=t.default.useState(!1),ie=t.default.useRef(L.a.height),ae=F.selectedShapes.indexOf(L)>=0,{textVerticalResizeEnabled:ue}=E.flags,de=Q(L.fontFamily),[pe,Oe]=t.default.useState([]);t.default.useEffect(()=>{var Fe,He;const Xe=(He=(Fe=H.current)===null||Fe===void 0?void 0:Fe.textArr)!==null&&He!==void 0?He:[];JSON.stringify(Xe)!==JSON.stringify(pe)&&Oe(Xe)}),t.default.useEffect(()=>{if(L.a.width)return;const Fe=H.current;Fe.width(600),L.set({width:1.4*Fe.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,u.autorun)(()=>{const Fe=H.current;(0,O.applyFilter)(Fe,L)}));const[_e]=(0,e.useFontLoader)(F,L.fontFamily),Le=(0,v.removeTags)(L.text),fe=()=>{const Fe=H.current.clone({height:void 0}),He=Math.ceil(Fe.fontSize()*Fe.lineHeight()*Fe.textArr.length+1);return Fe.destroy(),He};t.default.useLayoutEffect(()=>{if(!_e)return;const{textOverflow:Fe,textSplitAllowed:He}=E.flags;if(L.a.height){if(!F.isPlaying)if(Fe!=="change-font-size"||te){if(Fe==="resize"){const Xe=fe();ue&&L.a.height<Xe&&F.history.ignore(()=>{var ft;(0,d.isAlive)(L)&&L.set({height:Xe}),(ft=H.current)===null||ft===void 0||ft.height(Xe)},!1,!0),ue||L.a.height===Xe||F.history.ignore(()=>{var ft;(0,d.isAlive)(L)&&L.set({height:Xe}),(ft=H.current)===null||ft===void 0||ft.height(Xe)},!1,!0)}}else{const Xe=J(H.current,L,He);if(Xe!==L.a.fontSize)return void F.history.ignore(()=>{L.set({fontSize:Xe})},!1,!0);const ft=fe();L.a.height===ft||ue||F.history.ignore(()=>{L.set({height:ft})},!1,!0)}}else{const Xe=fe();F.history.ignore(()=>{L.set({height:Xe})},!1,!0)}}),t.default.useLayoutEffect(()=>{const Fe=H.current;Fe&&(Fe.width(Fe.width()+1e-8),Fe._setTextData(),(0,O.applyFilter)(Fe,L))},[_e]);const ge=t.default.useRef(null),Ce=t.default.useRef(0),Ae=Fe=>{Fe.evt.preventDefault(),F.selectedShapes.find(Xe=>Xe===L)&&L.contentEditable&&(Ce.current=U(Fe),L.toggleEditMode())},se=!Le&&L.placeholder?.6:L.a.opacity;(0,g.useFadeIn)(H,se);const me=(0,e.getLineHeight)({fontLoaded:_e,fontFamily:L.fontFamily,fontSize:L.a.fontSize,lineHeight:L.lineHeight}),xe=L.selectable||F.role==="admin",Ne=(0,b.useColor)(L),ct=t.default.useMemo(()=>L.backgroundEnabled?B({lines:JSON.parse(JSON.stringify(pe)),cornerRadius:L.backgroundCornerRadius*(L.a.fontSize*me*.5),lineHeight:me*L.a.fontSize,padding:L.backgroundPadding*(L.a.fontSize*me*.5),width:L.a.width,align:L.align}):"",[L.backgroundEnabled,L.backgroundCornerRadius,L.a.fontSize,me,L.backgroundPadding,L.a.width,L.align,pe]),at=(0,P.isTouchDevice)();let De=0;return L.verticalAlign==="middle"?De=(L.a.height-pe.length*me*L.a.fontSize)/2:L.verticalAlign==="bottom"&&(De=L.a.height-pe.length*me*L.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:$,x:L.a.x,y:L.a.y,rotation:L.a.rotation,hideInExport:!L.showInExport,listening:!1,visible:L.backgroundEnabled,opacity:L.backgroundOpacity*se,data:ct,fill:L.backgroundColor,offsetY:-De}),t.default.createElement(a.Text,Object.assign({ref:H,id:L.id,name:"element",hideInExport:!L.showInExport,editModeEnabled:L._editModeEnabled,x:L.a.x,y:L.a.y,rotation:L.a.rotation,width:L.a.width,height:L.a.height,text:Le||L.placeholder,direction:D(Le)},Ne,{stroke:L.stroke,lineJoin:"round",strokeWidth:L.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:L.a.fontSize,fontFamily:`"${L.fontFamily}", "${de}"`,fontStyle:L.fontStyle+" "+L.fontWeight,textDecoration:L.textDecoration,align:L.align,verticalAlign:L.verticalAlign,draggable:at?L.draggable&&ae:L.draggable,preventDefault:!at||ae,opacity:se,visible:!L._editModeEnabled,ellipsis:E.flags.textOverflow==="ellipsis",shadowEnabled:L.shadowEnabled,shadowBlur:L.shadowBlur,shadowOffsetX:L.shadowOffsetX,shadowOffsetY:L.shadowOffsetY,shadowColor:L.shadowColor,shadowOpacity:L.shadowOpacity,lineHeight:me,letterSpacing:L.letterSpacing*L.a.fontSize,listening:xe,onDragMove:Fe=>{L.set({x:Fe.target.x(),y:Fe.target.y()})},onDragEnd:Fe=>{L.set({x:Fe.target.x(),y:Fe.target.y()})},onMouseEnter:()=>{Y(!0)},onMouseLeave:()=>{Y(!1)},onClick:Ae,onTap:Ae,onTransformStart:()=>{re(!0),ie.current=H.current.height()},onTransform:Fe=>{var He,Xe;const ft=Fe.target;(He=$.current)===null||He===void 0||He.setAttrs({x:ft.x(),y:ft.y(),rotation:ft.rotation(),scale:ft.scale()});const At=((Xe=ft.getStage())===null||Xe===void 0?void 0:Xe.findOne("Transformer")).getActiveAnchor();if(At==="middle-left"||At==="middle-right"){const xt=ft.scaleX(),be=ft.width()*xt,Se=L.a.fontSize;let vt=be;be<Se&&(vt=Se,ge.current&&ft.position(ge.current)),ft.width(vt),ft.scaleX(1),ft.scaleY(1);const Pt=fe();if(E.flags.textOverflow!=="ellipsis"){const Ie=Math.max(Pt,ie.current);ft.height(Ie),L.set({height:ft.height()})}L.set({x:ft.x(),y:ft.y(),width:ft.width(),rotation:ft.rotation()}),(0,O.applyFilter)(ft,L)}if(At==="top-center"||At==="bottom-center"){let xt=E.flags.textOverflow==="resize"?fe():me*L.a.fontSize;Fe.target.height(Math.max(xt,Fe.target.height()*Fe.target.scaleY())),Fe.target.scaleY(1)}ge.current=Fe.target.position()},onTransformEnd:Fe=>{var He;const Xe=Fe.target.scaleX();Fe.target.scaleX(1),Fe.target.scaleY(1),L.set({fontSize:Math.round(L.a.fontSize*Xe),width:Math.ceil(Fe.target.width()*Xe),x:Fe.target.x(),y:Fe.target.y(),rotation:Fe.target.rotation(),height:Fe.target.height()*Xe,shadowBlur:L.shadowBlur*Xe,shadowOffsetX:L.shadowOffsetX*Xe,shadowOffsetY:L.shadowOffsetY*Xe,strokeWidth:L.strokeWidth*Xe}),(He=$.current)===null||He===void 0||He.setAttrs({scaleX:1,scaleY:1}),re(!1)}})),ee&&t.default.createElement(a.Group,{x:L.a.x,y:L.a.y,rotation:L.a.rotation},t.default.createElement(S,{textNodeRef:H,element:L,selectAll:V,cursorPosition:Ce.current,onBlur:()=>{L.toggleEditMode(!1)}})),!te&&(X||ae)&&t.default.createElement(p.Highlighter,{element:L}))})}(id)),id}var wo={},cd={},t1={exports:{}},n1={exports:{}},b2;function mv(){return b2||(b2=1,function(e,i){e.exports=t;function t(a){return n.bind(null,a)}function n(a){var l=[].slice.call(arguments,1);l.unshift("["+a+"]"),process.stderr.write(l.join(" ")+`
|
|
102
|
-
`)}}(n1)),n1.exports}var _2;function N4(){return _2||(_2=1,function(e,i){mv()("lex"),e.exports=t;function t(n){var a="",l,u=0,c=-1,h=0,b=1,_="before-selector",k=[_],E={},v=[],O=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function g(){return D(),n[c]}function p(K){return K?k[k.length-1-K]:_}function P(K){var J=c+1;return K===n.slice(J,J+K.length)}function d(K){var J=n.slice(c).indexOf(K);return J>0?J:!1}function m(K){return K===y(1)}function y(K){return n[c+(K||1)]}function w(){var K=k.pop();return _=k[k.length-1],K}function N(K){return _=K,k.push(_),k.length}function R(K){var J=_;return k[k.length-1]=_=K,J}function D(K){if((K||1)==1)n[c]==`
|
|
103
|
-
`?(b++,u=1):u++,c++;else{var J=n.slice(c,c+K).split(`
|
|
104
|
-
`);J.length>1&&(b+=J.length-1,u=1),u+=J[J.length-1].length,c=c+K}}function x(){E.end={line:b,col:u},v.push(E),a="",E={}}function S(K){E={type:K,start:{line:b,col:u}}}for(;l=g();)switch(l){case" ":switch(p()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":a+=l;break}break;case`
|
|
105
|
-
`:case" ":case"\r":case"\f":switch(p()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":a+=l;break;case"at-value":l===`
|
|
106
|
-
`&&(E.value=a.trim(),x(),w());break}break;case":":switch(p()){case"name":E.name=a.trim(),a="",R("before-value");break;case"before-selector":a+=l,S("selector"),N("selector");break;case"before-value":R("value"),a+=l;break;default:a+=l;break}break;case";":switch(p()){case"name":case"before-value":case"value":a.trim().length>0&&(E.value=a.trim(),x()),R("before-name");break;case"value-paren":a+=l;break;case"at-value":E.value=a.trim(),x(),w();break;case"before-name":break;default:a+=l;break}break;case"{":switch(p()){case"selector":if(y(-1)==="\\"){a+=l;break}E.text=a.trim(),x(),R("before-name"),h=h+1;break;case"at-group":switch(E.name=a.trim(),E.type){case"font-face":case"viewport":case"page":N("before-name");break;default:N("before-selector")}x(),h=h+1;break;case"name":case"at-rule":E.name=a.trim(),x(),N("before-name"),h=h+1;break;case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break}break;case"}":switch(p()){case"before-name":case"name":case"before-value":case"value":a&&(E.value=a.trim()),E.name&&E.value&&x(),S("end"),x(),w(),p()==="at-group"&&(S("at-group-end"),x(),w()),h>0&&(h=h-1);break;case"at-group":case"before-selector":case"selector":if(y(-1)==="\\"){a+=l;break}h>0&&p(1)==="at-group"&&(S("at-group-end"),x()),h>1&&w(),h>0&&(h=h-1);break;case"double-string":case"single-string":case"comment":a+=l;break}break;case'"':case"'":switch(p()){case"double-string":l==='"'&&y(-1)!=="\\"&&w();break;case"single-string":l==="'"&&y(-1)!=="\\"&&w();break;case"before-at-value":R("at-value"),N(l==='"'?"double-string":"single-string");break;case"before-value":R("value"),N(l==='"'?"double-string":"single-string");break;case"comment":break;default:y(-1)!=="\\"&&N(l==='"'?"double-string":"single-string")}a+=l;break;case"/":switch(p()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":case"selector":case"name":case"value":if(m("*")){var A=d("*/");A&&D(A+1)}else p()=="before-value"&&R("value"),a+=l;break;default:m("*")?(S("comment"),N("comment"),D()):a+=l;break}break;case"*":switch(p()){case"comment":m("/")?(E.text=a,D(),x(),w()):a+=l;break;case"before-selector":a+=l,S("selector"),N("selector");break;case"before-value":R("value"),a+=l;break;default:a+=l}break;case"@":switch(p()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break;default:for(var M=!1,T,z,U=0,Q=O.length;!M&&U<Q;++U)z=O[U],T=z.name||z,P(T)&&(M=!0,S(T),N(z.state||"at-group"),D(T.length),z.prefix&&(E.prefix=z.prefix),z.type&&(E.type=z.type));M||(a+=l);break}break;case"(":switch(p()){case"value":N("value-paren");break;case"before-value":R("value");break}a+=l;break;case")":switch(p()){case"value-paren":w();break;case"before-value":R("value");break}a+=l;break;default:switch(p()){case"before-selector":S("selector"),N("selector");break;case"before-name":S("property"),R("name");break;case"before-value":R("value");break;case"before-at-value":R("at-value");break}a+=l;break}return v}}(t1)),t1.exports}var r1={exports:{}},w2;function KE(){return w2||(w2=1,function(e,i){mv()("parse");var t=N4();e.exports=c;var n,a,l,u;function c(w,N){N||(N={}),n=!!N.comments,l=!!N.position,a=0,u=Array.isArray(w)?w.slice():t(w);for(var R,D=[],x;x=b();)R=P(x),R&&D.push(R);return{type:"stylesheet",stylesheet:{rules:D}}}function h(w,N){N||(N={});for(var R,D=["type","name","value"],x={},S=0;S<D.length;++S)R=D[S],w[R]&&(x[R]=N[R]||w[R]);for(D=Object.keys(N),S=0;S<D.length;++S)R=D[S],x[R]||(x[R]=N[R]);return l&&(x.position={start:w.start,end:w.end}),x}function b(){var w=u.shift();return w}function _(w){a=a+1;var N={};switch(w.type){case"font-face":case"viewport":N.declarations=m();break;case"page":N.prefix=w.prefix,N.declarations=m();break;default:N.prefix=w.prefix,N.rules=y()}return h(w,N)}function k(w){return h(w)}function E(w){return h(w)}function v(w){return h(w,{text:w.text})}function O(w){return h(w)}function g(w){return h(w)}function p(w){function N(R){return R.trim()}return h(w,{type:"rule",selectors:w.text.split(",").map(N),declarations:m()})}function P(w){switch(w.type){case"property":return g(w);case"selector":return p(w);case"at-group-end":a=a-1;return;case"media":case"keyframes":return _(w);case"comment":if(n)return v(w);break;case"charset":return E(w);case"import":return k(w);case"namespace":return O(w);case"font-face":case"supports":case"viewport":case"document":case"page":return _(w)}}function d(w){for(var N,R=[],D;(D=b())&&w&&w(D);)N=P(D),N&&R.push(N);return D&&D.type!=="end"&&u.unshift(D),R}function m(){return d(function(w){return w.type==="property"||w.type==="comment"})}function y(){return d(function(){return a})}}(r1)),r1.exports}var i1={exports:{}},S2;function XE(){return S2||(S2=1,function(e,i){mv()("stringify");var t,n,a,l,u,c;e.exports=h;function h(y,w){w||(w={}),a=w.indentation||"",n=!!w.compress,t=!!w.comments,l=1,n?u=c="":(u=`
|
|
107
|
-
`,c=" ");var N=O(y.stylesheet.rules,d).join(`
|
|
108
|
-
`).trim();return N}function b(y){if(y){l+=y;return}return n?"":Array(l).join(a||"")}function _(y){return"@"+y.type+" "+y.value+";"+u}function k(y){var w="",N=y.prefix||"";y.name&&(w=" "+y.name);var R=y.type!=="page";return"@"+N+y.type+w+c+g(y,R)+u}function E(y){return t?"/*"+(y.text||"")+"*/"+u:""}function v(y){var w;return y.selectors?w=y.selectors.join(","+u):(w="@"+y.type,w+=y.name?" "+y.name:""),b()+w+c+g(y)+u}function O(y,w){return y.reduce(function(N,R){var D=R.type==="comment"?E(R):w(R);return D&&N.push(D),N},[])}function g(y,w){var N=y.declarations,R=P;return y.rules&&(N=y.rules,R=v),N=p(N,R),N&&(N=u+N+(w?"":u)),"{"+N+b()+"}"}function p(y,w){if(!y)return"";b(1);var N=O(y,w);return b(-1),N.length?N.join(u):""}function P(y){if(y.type==="property")return m(y)}function d(y){switch(y.type){case"rule":return v(y);case"media":case"keyframes":return k(y);case"comment":return E(y);case"import":case"charset":case"namespace":return _(y);case"font-face":case"supports":case"viewport":case"document":case"page":return k(y)}}function m(y){var w=y.name?y.name+":"+c:"";return b()+w+y.value+";"}}(i1)),i1.exports}var o1,E2;function ZE(){return E2||(E2=1,o1={lex:N4(),parse:KE(),stringify:XE()}),o1}var O2;function qd(){return O2||(O2=1,function(e){var i=cd&&cd.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=k,e.urlToString=E,e.getColors=v,e.svgToURL=O,e.getSvgSize=g,e.fixSize=p,e.replaceColors=m;const t=i(Ji()),n=i(Tn()),a=av(),l=i(ZE());function u(w){for(;w.parentNode;){if(w.nodeName==="defs")return!0;w=w.parentNode}return!1}function c(w){const N={};return w.querySelectorAll("style").forEach(R=>{const D=l.default.parse(R.textContent).stylesheet.rules;for(let x of D)x.selectors&&x.selectors.forEach(S=>{const A=N[S]||{};x.declarations.forEach(M=>{A[M.name]=M.value}),N[S]=A})}),N}function h(w,N){var R;const D={fill:"",stroke:""},x=((R=w.getAttribute("class"))===null||R===void 0?void 0:R.split(" "))||[],S=w.getAttribute("id");let A={};if(S&&N[`#${S}`]?A=N[`#${S}`]:x.forEach(M=>{N[`.${M}`]&&(A=Object.assign(Object.assign({},A),N[`.${M}`]))}),N[w.nodeName]&&(A=Object.assign(Object.assign({},A),N[w.nodeName])),w.getAttribute("fill")&&w.getAttribute("fill")!=="none"?D.fill=w.getAttribute("fill"):A.fill&&A.fill!=="none"&&(D.fill=A.fill),w.getAttribute("stroke")&&w.getAttribute("stroke")!=="none"?D.stroke=w.getAttribute("stroke"):A.stroke&&A.stroke!=="none"&&(D.stroke=A.stroke),!D.fill&&w.style.fill&&w.style.fill!=="none"&&(D.fill=w.style.fill),!D.stroke&&w.style.stroke&&w.style.stroke!=="none"&&(D.stroke=w.style.stroke),!D.stroke&&!D.fill){const M=w.ownerSVGElement,T=M&&M!==w&&h(M,N);(T==null?void 0:T.fill)==="currentColor"||(T==null?void 0:T.stroke)==="currentColor"||(D.fill="black")}return D}const b=["path","rect","circle","line","polygon","polyline","ellipse","text"];function _(w){for(var N=[],R=w.getElementsByTagName("*"),D=0,x=R.length;D<x;D++){const S=R[D];u(S)||(S.getAttribute("fill")!==null&&N.push(S),(S.getAttribute("stroke")!==null||S.style&&S.style.fill||b.indexOf(S.nodeName)>=0)&&N.push(S))}return N}async function k(w){const N=await fetch(w);return O(await N.text())}async function E(w){return await(await fetch(w,{mode:"cors"})).text()}function v(w){var N=new DOMParser().parseFromString(w,"image/svg+xml");const R=c(N),D=_(N),x=[];return D.forEach(S=>{const{fill:A,stroke:M}=h(S,R);[A,M].forEach(T=>{T&&(T==="currentColor"&&(T="black"),t.default.Util.colorToRGBA(T)&&x.indexOf(T)===-1&&x.push(T))})}),x}function O(w){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(w)))}async function g(w){const N=await E(w),R=new DOMParser().parseFromString(N,"image/svg+xml").documentElement.getAttribute("viewBox"),[D,x,S,A]=(R==null?void 0:R.split(" "))||[];return{width:parseFloat(S),height:parseFloat(A)}}function p(w){var N=new DOMParser().parseFromString(w,"image/svg+xml");const R=N.documentElement.getAttribute("viewBox"),[D,x,S,A]=(R==null?void 0:R.split(" "))||[],M=N.documentElement.getAttribute("width");!M&&N.documentElement.setAttribute("width",S+"px");const T=N.documentElement.getAttribute("height");if((!T||T.indexOf("%")>=0)&&N.documentElement.setAttribute("height",A+"px"),M&&M.indexOf("%")>=0&&T&&T.indexOf("%")===-1){const z=parseFloat(T)/parseFloat(A);N.documentElement.setAttribute("width",z*parseFloat(S)+"px")}if(T&&T.indexOf("%")>=0&&M&&M.indexOf("%")===-1){const z=parseFloat(M)/parseFloat(S);N.documentElement.setAttribute("height",z*parseFloat(A)+"px")}return M==="100%"&&T==="100%"&&(N.documentElement.setAttribute("width",S+"px"),N.documentElement.setAttribute("height",A+"px")),new XMLSerializer().serializeToString(N)}const P=(w,N)=>{if(!w||!N)return!1;if(N==="currentColor"&&w==="black")return!0;const R=t.default.Util.colorToRGBA(w),D=t.default.Util.colorToRGBA(N);return R&&D?R.r===D.r&&R.g===D.g&&R.b===D.b&&R.a===D.a:void 0};function d(w,N,R,D){var x=w.namespaceURI,S=document.createElementNS(x,"linearGradient");const A=t.default.Util.degToRad(R+90),M=(Math.cos(A)+1)/2,T=(Math.sin(A)+1)/2,z=(Math.cos(A+Math.PI)+1)/2,U=(Math.sin(A+Math.PI)+1)/2;S.setAttribute("x1",100*M+"%"),S.setAttribute("y1",100*T+"%"),S.setAttribute("x2",100*z+"%"),S.setAttribute("y2",100*U+"%"),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("id",N);for(var Q=0;Q<D.length;Q++){var K=D[Q],J=document.createElementNS(x,"stop");for(var B in K)K.hasOwnProperty(B)&&J.setAttribute(B,K[B]);S.appendChild(J)}return(w.querySelector("defs")||w.insertBefore(document.createElementNS(x,"defs"),w.firstChild)).appendChild(S)}function m(w,N){var R=new DOMParser().parseFromString(w,"image/svg+xml");const D=_(R),x=Array.from(N.keys()),S=c(R);return D.forEach(A=>{const{fill:M,stroke:T}=h(A,S);[{prop:"fill",color:M},{prop:"stroke",color:T}].forEach(({prop:z,color:U})=>{const Q=x.find(K=>(0,e.sameColors)(K,U));if(Q){const K=N.get(Q);if((0,a.isGradient)(K)){const{rotation:J,stops:B}=(0,a.parseColor)(K),L=B.map(H=>({offset:100*H.offset+"%","stop-color":H.color})),F="color"+Math.round(1e8*Math.random());d(R.children[0],F,J,L),A.style[z]=null,A.setAttribute(z,`url('#${F}')`)}else A.style[z]=N.get(Q)}})}),O(new XMLSerializer().serializeToString(R))}e.sameColors=P;const y=w=>{const[N,R]=n.default.useState([]);return n.default.useEffect(()=>{let D=!1;return(async()=>{R([]);const x=v(await E(w));D||R(x)})(),()=>{D=!0}},[w]),N};e.useSvgColors=y}(cd)),cd}var a1={},x2;function I4(){return x2||(x2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trySetCanvasSize=void 0;const i=(t,n,a)=>{let l=n,u=a,c=1;for(;l>0&&u>0;){t.width=l,t.height=u;const h=t.getContext("2d");if(!h)return;if(h.fillStyle="rgba(0,0,0,0.1)",h.fillRect(0,0,1,1),h.getImageData(0,0,1,1).data[3]!==0)return void h.clearRect(0,0,t.width,t.height);if(c*=.9,l=Math.floor(n*c),u=Math.floor(a*c),l=Math.max(l,1),u=Math.max(u,1),l<=1&&u<=1)return t.width=1,void(t.height=1)}};e.trySetCanvasSize=i}(a1)),a1}var P2;function D4(){return P2||(P2=1,function(e){var i=wo&&wo.__createBinding||(Object.create?function(V,X,Y,te){te===void 0&&(te=Y);var re=Object.getOwnPropertyDescriptor(X,Y);re&&!("get"in re?!X.__esModule:re.writable||re.configurable)||(re={enumerable:!0,get:function(){return X[Y]}}),Object.defineProperty(V,te,re)}:function(V,X,Y,te){te===void 0&&(te=Y),V[te]=X[Y]}),t=wo&&wo.__setModuleDefault||(Object.create?function(V,X){Object.defineProperty(V,"default",{enumerable:!0,value:X})}:function(V,X){V.default=X}),n=wo&&wo.__importStar||function(){var V=function(X){return V=Object.getOwnPropertyNames||function(Y){var te=[];for(var re in Y)Object.prototype.hasOwnProperty.call(Y,re)&&(te[te.length]=re);return te},V(X)};return function(X){if(X&&X.__esModule)return X;var Y={};if(X!=null)for(var te=V(X),re=0;re<te.length;re++)te[re]!=="default"&&i(Y,X,te[re]);return t(Y,X),Y}}(),a=wo&&wo.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=e.useSizeFixer=void 0;const l=a(Tn()),u=Qi,c=da,h=Ja,b=a(jp()),_=a(Ji()),k=Fd,E=bc(),v=Ks(),O=n(qd()),g=ts(),p=I4(),P=Fp(),d=yc(),m=Xs();function y(){return document.createElement("canvas")}async function w(V){if(!(V.indexOf("data:image/svg+xml")>=0||V.indexOf(".svg")>=0))return V;const X=await O.urlToString(V),Y=O.fixSize(X);return O.svgToURL(Y)}const N=V=>{const[X,Y]=l.default.useState(V);return l.default.useEffect(()=>{(async()=>{const te=await w(V);te!==X&&Y(te)})()},[V]),X};function R(V,X){return Math.sqrt(Math.pow(X.x-V.x,2)+Math.pow(X.y-V.y,2))}function D(V,X){return{x:(V.x+X.x)/2,y:(V.y+X.y)/2}}e.useSizeFixer=N;const x=(V,X,Y)=>{const te=l.default.useMemo(()=>{var re,ie;const{flipX:ae,flipY:ue}=V,de=V.type==="svg"||V.src.indexOf("data:image/svg+xml")>=0||V.src.indexOf(".svg")>=0,pe=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Oe=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||pe)&&de||V.maskSrc;if(!ae&&!ue&&!Oe)return X;if(!X||!X.width||!X.height)return null;const _e=y();let Le=1;V.type==="svg"&&(Le=Math.max(V.a.width/X.width*Y,V.a.height/X.height*Y)),(0,p.trySetCanvasSize)(_e,Math.max(X.width*Le,1),Math.max(X.height*Le,1));let fe=ae?-_e.width:0,ge=ue?-_e.height:0;return(re=_e.getContext("2d"))===null||re===void 0||re.scale(ae?-1:1,ue?-1:1),(ie=_e.getContext("2d"))===null||ie===void 0||ie.drawImage(X,fe,ge,_e.width,_e.height),_e},[V.maskSrc,V.flipX,V.flipY,X,V.a.width,V.a.height,Y]);return l.default.useEffect(()=>()=>{te&&te.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(te)},[te]),te};function S(V,X){const Y=X.width/X.height;let te,re;return Y>=V.width/V.height?(te=V.width,re=V.width/Y):(te=V.height*Y,re=V.height),{x:(V.width-te)/2,y:(V.height-re)/2,width:te,height:re}}function A(V,X,Y,te,re,ie,ae){for(var ue=new ImageData(X,Y),de=new Int32Array(V.data.buffer),pe=V.width,Oe=new Int32Array(ue.data.buffer),_e=ue.width,Le=X/ie,fe=Y/ae,ge=Math.round(1/Le),Ce=Math.round(1/fe),Ae=ge*Ce,se=0;se<ue.height;se++)for(var me=0;me<_e;me++){for(var xe=te+Math.round(me/Le)+(re+Math.round(se/fe))*pe,Ne=0,ct=0,at=0,De=0,Fe=0;Fe<Ce;Fe++)for(var He=0;He<ge;He++){var Xe=de[xe+He+Fe*pe];Ne+=Xe<<24>>>24,ct+=Xe<<16>>>24,at+=Xe<<8>>>24,De+=Xe>>>24}Ne=Math.round(Ne/Ae),ct=Math.round(ct/Ae),at=Math.round(at/Ae),De=Math.round(De/Ae),Oe[me+se*_e]=De<<24|at<<16|ct<<8|Ne}return ue}function M(V,X){var Y,te;const re=y();re.width=V.width,re.height=V.height;const ie=Math.max(1,Math.floor(re.width*X)),ae=Math.max(1,Math.floor(re.height*X));(Y=re.getContext("2d"))===null||Y===void 0||Y.drawImage(V,0,0,re.width,re.height);const ue=A(re.getContext("2d").getImageData(0,0,re.width,re.height),ie,ae,0,0,re.width,re.height);return re.width=ie,re.height=ae,(te=re.getContext("2d"))===null||te===void 0||te.putImageData(ue,0,0),re}const T=(V,X)=>{const[Y,te]=L(V.maskSrc,"anonymous"),re=V.maskSrc?te:"loaded";return(0,e.useImageLoader)(re,V.maskSrc||"",V.id),l.default.useMemo(()=>{if(!Y||!X||!X.width||!X.height)return X;const ie=y();ie.width=Math.max(X.width,1),ie.height=Math.max(X.height,1);const ae=ie.getContext("2d");if(!ae)return X;ae.drawImage(X,0,0),ae.globalCompositeOperation="source-in";const ue=S(Y,V);return ae.drawImage(Y,ue.x,ue.y,ue.width,ue.height,0,0,X.width,X.height),ie},[X,Y,V.a.width,V.a.height])},z=(V,X,Y)=>Math.max(X,Math.min(Y,V)),U=(V,X,Y,te,re=0,ie=!1,ae=!0)=>{const ue=Math.floor(z(V.a.width*te,1,1e4)),de=Math.floor(z(V.a.height*te,1,1e4)),pe=Math.min(re*te,ue/2,de/2),Oe=Math.max(V.a.width/Y.width,V.a.height/Y.height)*te,_e=V.page._exportingOrRendering&&g.flags.imageDownScalingEnabled&&Oe<1&&!ie,Le=Y.x===0&&Y.y===0&&Y.width===(X==null?void 0:X.width)&&Y.height===(X==null?void 0:X.height),fe=l.default.useMemo(()=>{if(!(!X||!X.width||!X.height))return Le&&pe===0&&!_e?void 0:y()},[X,pe,_e,Le]);return l.default.useLayoutEffect(()=>{if(!fe||!X)return;(0,p.trySetCanvasSize)(fe,ue,de);const ge=fe.getContext("2d");if(!ge)return;pe&&(ge.beginPath(),ge.moveTo(pe,0),ge.lineTo(ue-pe,0),ge.arc(ue-pe,pe,pe,3*Math.PI/2,0,!1),ge.lineTo(ue,de-pe),ge.arc(ue-pe,de-pe,pe,0,Math.PI/2,!1),ge.lineTo(pe,de),ge.arc(pe,de-pe,pe,Math.PI/2,Math.PI,!1),ge.lineTo(0,pe),ge.arc(pe,pe,pe,Math.PI,3*Math.PI/2,!1),ge.clip());const Ce=_e?M(X,Oe):X,Ae=_e?{x:Math.floor(Y.x*Oe),y:Math.floor(Y.y*Oe),width:Math.floor(Y.width*Oe),height:Math.floor(Y.height*Oe)}:Y;ge.drawImage(Ce,Ae.x,Ae.y,Ae.width,Ae.height,0,0,fe.width,fe.height)},[fe,V.a.width,V.a.height,Y.x,Y.y,Y.width,Y.height,re,te,ie,V.page._exportingOrRendering,_e]),l.default.useEffect(()=>()=>{fe&&fe.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(fe)},[fe]),fe||X},Q=(V,X,Y,te)=>{const re=(0,e.useSizeFixer)(V.clipSrc||""),[ie,ae]=L(re,"anonymous"),ue=V.clipSrc?ae:"loaded";(0,e.useImageLoader)(ue,V.clipSrc,V.id);const de=l.default.useMemo(()=>{if(X&&ie)return y()},[X,ie]);return l.default.useLayoutEffect(()=>{var pe;if(!ie||!X||!X.width||!X.height||!ie||!ie.width||!ie.height||!de)return;const Oe=y(),_e=Math.max(V.a.width/ie.width*Y,V.a.height/ie.height*Y);Oe.width=ie.width*_e,Oe.height=ie.height*_e,(pe=Oe.getContext("2d"))===null||pe===void 0||pe.drawImage(ie,0,0,Oe.width,Oe.height),de.width=Math.max(X.width,1),de.height=Math.max(X.height,1);const Le=de.getContext("2d");Le&&(Le.save(),Le.drawImage(Oe,0,0,X.width,X.height),_.default.Util.releaseCanvas(Oe),Le.globalCompositeOperation="source-in",Le.drawImage(X,0,0,de.width,de.height),Le.restore())},[de,X,ie,V.a.width,V.a.height,Y,...te]),V.clipSrc&&ie?de:X},K=y(),J=(0,u.observer)(({element:V})=>{const X=Math.min(30,V.a.width/4,V.a.height/4),Y=l.default.useRef(null);return l.default.useEffect(()=>{const te=Y.current;if(!te)return;const re=new _.default.Animation(ie=>{te.rotate(((ie==null?void 0:ie.timeDiff)||0)/2)},te.getLayer());return re.start(),()=>{re.stop()}}),l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(h.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(h.Arc,{ref:Y,x:V.a.width/2,y:V.a.height/2,fill:"white",outerRadius:Math.abs(X),innerRadius:Math.max(1,X-5),angle:270}))}),B=(0,u.observer)(({element:V})=>{const X="Can not load the image...",Y=Math.max(10,Math.min(30,V.a.width/25));return l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(h.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(h.Text,{text:X,fontSize:Y,width:V.a.width,height:V.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let L=b.default;const F=V=>{L=V};e.setImageLoaderHook=F;const H=(V,X="",Y="")=>{const te=l.default.useRef(),re=()=>{var ie;(ie=te.current)===null||ie===void 0||ie.call(te),te.current=void 0};l.default.useEffect(()=>re,[]),l.default.useLayoutEffect(()=>{const ie=X.slice(0,200),ae=`image with id ${Y} url: ${ie}`;V!=="loading"||te.current||(te.current=(0,v.incrementLoader)(ae)),V!=="loading"&&re(),V==="failed"&&(0,v.triggerLoadError)(ae)},[V])};e.useImageLoader=H;const $=({image:V,status:X,type:Y})=>{const te=l.default.useRef();return l.default.useEffect(()=>{te.current=V||te.current},[V]),X!=="failed"||X!=="failed"&&Y==="svg"?te.current:void 0},ee=V=>{const[X,Y]=l.default.useReducer(ae=>ae+1,0),te=l.default.useRef("loading"),re=l.default.useRef(V.src),ie=l.default.useRef(V.src);return ie.current!==V.src&&(ie.current=V.src,te.current="loading"),l.default.useEffect(()=>{if(V.type!=="svg"||!V.src)return;let ae=!1;return(async()=>{te.current="loading",Y();const ue=await O.urlToString(V.src),de=O.fixSize(ue),pe=O.replaceColors(de,V.colorsReplace);ae||(re.current=pe,te.current="loaded",Y())})(),()=>{ae=!0}},[V.src,JSON.stringify(V.colorsReplace)]),V.type!=="svg"?[V.src,"loaded"]:[re.current,te.current]};e.ImageElement=(0,u.observer)(({element:V,store:X})=>{var Y;const[te,re]=l.default.useState(!1),ie=l.default.useRef(null),ae=l.default.useRef(null),[ue,de]=l.default.useState(!1),pe=X.selectedShapes.indexOf(V)>=0,[Oe,_e]=ee(V),[Le,fe]=L(Oe,"anonymous"),ge=V.type!=="svg"||_e==="loaded"?fe:"loading";(0,e.useImageLoader)(ge,V.src,V.id);const Ce=V.page._exportingOrRendering?1:Math.max(1,X.scale),Ae=X._elementsPixelRatio*Ce,se=$({image:Le,status:fe,type:V.type}),me=x(V,Le||se,Ae),xe=T(V,me)||K;let{cropX:Ne,cropY:ct,cropWidth:at,cropHeight:De}=V;fe!=="loaded"&&(Ne=ct=0,at=De=1);const Fe=xe.width*at,He=xe.height*De,Xe=V.a.width/V.a.height;let ft,At;const xt=Fe/He,be=V.type==="svg";be?(ft=Fe,At=He):Xe>=xt?(ft=Fe,At=Fe/Xe):(ft=He*Xe,At=He);const Se={x:xe.width*Ne,y:xe.height*ct,width:ft,height:At},vt=(Y=V.cornerRadius)!==null&&Y!==void 0?Y:0,Pt=V.page._exportingOrRendering?1:Math.min(2,X.scale),Ie=X._elementsPixelRatio*Pt;let Ge=Q(V,U(V,xe,Se,Ie,vt,te||V._cropModeEnabled||V.type==="svg",!0),Ie,[Se,vt,Ie]);const rt=Math.max(V.a.width/ft,V.a.height/At);l.default.useEffect(()=>{var Ze;if(!V._cropModeEnabled)return;const St=(Ze=ie.current)===null||Ze===void 0?void 0:Ze.getStage();function Mt($t){V._cropModeEnabled&&$t.target!==ae.current&&V.toggleCropMode(!1)}function Vt($t){V._cropModeEnabled&&$t.target.parentNode!==St.content&&V.toggleCropMode(!1)}return document.body.addEventListener("click",Vt),St==null||St.on("click",Mt),St==null||St.on("tap",Mt),()=>{document.body.removeEventListener("click",Vt),document.body.removeEventListener("touchstart",Vt),St==null||St.off("click",Mt),St==null||St.off("click",Mt)}},[V._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(te||V._cropModeEnabled))return(0,P.applyFilter)(ie.current,V),(0,c.autorun)(()=>{(0,P.applyFilter)(ie.current,V)},{delay:100})},[Ge,V.page._exportingOrRendering,te,at,De,V._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Ze;te||V._cropModeEnabled?(Ze=ie.current)===null||Ze===void 0||Ze.clearCache():(0,P.applyFilter)(ie.current,V)},[te,V.a.width,V.a.height,V._cropModeEnabled]),l.default.useEffect(()=>{(0,P.applyFilter)(ie.current,V)},[V.shadowEnabled,V.shadowBlur,V.cornerRadius,V.shadowColor,V.shadowOffsetX,V.shadowOffsetY,V.shadowOpacity]);const je=l.default.useRef(null),mt=l.default.useRef(null),ze=l.default.useRef(null);l.default.useLayoutEffect(()=>{V._cropModeEnabled&&(mt.current.nodes([je.current]),ze.current.nodes([ae.current]))},[V._cropModeEnabled]);var pt=l.default.useRef(null),_n=l.default.useRef(0),Be=l.default.useRef(!1);const lt=Ze=>{var St;((St=Ze.evt.touches)===null||St===void 0?void 0:St.length)>2&&Ze.target.stopDrag(),Math.round(Ze.target.x())>0&&(Ze.target.x(0),Ze.target.scaleX(1)),Math.round(Ze.target.y())>0&&(Ze.target.y(0),Ze.target.scaleY(1));const Mt=Ze.target.width()*Ze.target.scaleX(),Vt=Ze.target.height()*Ze.target.scaleY(),$t=Math.min(1,ft/Mt),Jn=Math.min(1,At/Vt),Gn=1-$t,Sn=Math.min(Gn,Math.max(0,Math.round(-Ze.target.x())/Mt)),oi=1-Jn,Ir=Math.min(oi,Math.max(0,Math.round(-Ze.target.y())/Vt));Ze.target.setAttrs({x:-Sn*xe.width,y:-Ir*xe.height,scaleX:1,scaleY:1}),V.set({cropX:Sn,cropY:Ir,cropWidth:$t,cropHeight:Jn})},_t=()=>{V.type!=="svg"&&V.contentEditable&&setTimeout(()=>{V.toggleCropMode(!0)})},Ut=V.type==="svg"&&se,Ht=fe==="loading"&&!Ut,hn=fe==="failed",In=!Ht&&!hn,wn=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Qn=In?V.a.opacity:0;(0,d.useFadeIn)(ie,Qn);const ii=V.selectable||X.role==="admin",Sr=(0,m.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,Ht&&l.default.createElement(J,{element:V}),hn&&l.default.createElement(B,{element:V}),l.default.createElement(h.Image,{ref:ie,name:"element",id:V.id,image:Ge,x:V.a.x,y:V.a.y,width:V.a.width||1,height:V.a.height||1,rotation:V.a.rotation,opacity:Qn,shadowEnabled:V.shadowEnabled,shadowBlur:V.shadowBlur,shadowOffsetX:V.shadowOffsetX,shadowOffsetY:V.shadowOffsetY,shadowColor:V.shadowColor,shadowOpacity:V.shadowOpacity,customCrop:Se,listening:ii,draggable:Sr?V.draggable&&pe:V.draggable,preventDefault:!Sr||pe,hideInExport:!V.showInExport,onMouseEnter:()=>{de(!0)},onMouseLeave:()=>{de(!1)},onDragMove:Ze=>{V.set({x:Ze.target.x(),y:Ze.target.y()})},onDragEnd:Ze=>{V.set({x:Ze.target.x(),y:Ze.target.y()})},onDblClick:_t,onDblTap:_t,onTransformStart:()=>{re(!0),wn.current={cropX:V.cropX,cropY:V.cropY,cropWidth:V.cropWidth,cropHeight:V.cropHeight}},onTransform:Ze=>{var St;const Mt=Ze.currentTarget,Vt=Math.abs(Mt.scaleX()-1)<1e-7?1:Mt.scaleX(),$t=Math.abs(Mt.scaleY()-1)<1e-7?1:Mt.scaleY();Mt.scaleX(1),Mt.scaleY(1);const Jn=(St=Ze.target.getStage())===null||St===void 0?void 0:St.findOne("Transformer"),Gn=1-ft/xe.width,Sn=Math.min(Gn,Math.max(0,V.cropX)),oi=1-At/xe.height,Ir=Math.min(oi,Math.max(0,V.cropY)),Ii=Jn.getActiveAnchor(),No=!(Ii.indexOf("middle")>=0||Ii.indexOf("center")>=0),rs=!No&&Vt<1&&wn.current.cropHeight>At/xe.height;let Jt=No?V.cropWidth:V.cropWidth*Vt;rs&&(Jt=V.cropWidth);const to=!No&&$t<1&&wn.current.cropWidth>ft/xe.width;let Dr=No?V.cropHeight:V.cropHeight*$t;to&&(Dr=V.cropHeight),be&&(Jt=V.cropWidth,Dr=V.cropHeight),V.set({cropX:Sn,cropY:Ir,x:Mt.x(),y:Mt.y(),width:Mt.width()*Vt,height:Mt.height()*$t,rotation:Ze.target.rotation(),cropWidth:Math.min(Jt,1-Sn),cropHeight:Math.min(Dr,1-Ir)})},onTransformEnd:Ze=>{const St=Ze.currentTarget;V.set({width:St.width(),height:St.height(),x:St.x(),y:St.y(),rotation:Ze.target.rotation(),cropWidth:ft/xe.width,cropHeight:At/xe.height}),re(!1)}}),l.default.createElement(h.Rect,{x:V.x,y:V.y,width:Math.max(V.a.width-V.borderSize,0),height:Math.max(V.a.height-V.borderSize,0),opacity:Qn,offsetX:-V.borderSize/2,offsetY:-V.borderSize/2,stroke:V.borderColor,strokeWidth:V.borderSize,listening:!1,visible:!!V.borderSize,rotation:V.rotation,cornerRadius:Math.max(0,vt-V.borderSize),hideInExport:!V.showInExport}),V._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(h.Rect,{x:-window.innerWidth/X.scale,y:-window.innerWidth/X.scale,width:window.innerWidth/X.scale*3,height:window.innerWidth/X.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(h.Image,{listening:!1,image:Ge,x:V.x,y:V.y,width:V.a.width,height:V.a.height,rotation:V.rotation,shadowEnabled:V.shadowEnabled,shadowBlur:V.shadowBlur}),l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,scaleX:rt,scaleY:rt},l.default.createElement(h.Image,{image:xe,ref:ae,opacity:.4,draggable:!0,x:-V.cropX*xe.width,y:-V.cropY*xe.height,onDragMove:lt,onTransform:lt,onTouchMove:Ze=>{Ze.evt.preventDefault();const St=Ze.target.getStage().getPointersPositions();var Mt=St[0],Vt=St[1];const $t=Ze.target;if(Mt&&!Vt&&!$t.isDragging()&&Be.current&&($t.startDrag(),Be.current=!1),Mt&&Vt){_.default.hitOnDragEnabled=!0,$t.isDragging()&&(Be.current=!0,$t.stopDrag());const to=Ze.target.getAbsoluteTransform().copy();to.invert();var Jn={x:Mt.x,y:Mt.y},Gn={x:Vt.x,y:Vt.y};if(!pt.current)return void(pt.current=D(Jn,Gn));var Sn=D(Jn,Gn),oi=R(Jn,Gn);_n.current||(_n.current=oi);const Dr=$t.position();var Ir={x:Sn.x-Dr.x,y:Sn.y-Dr.y},Ii=oi/_n.current;$t.scaleX(Ii),$t.scaleY(Ii);const ha=to.point(Sn),no=to.point(pt.current);var No=ha.x-no.x,rs=ha.y-no.y,Jt={x:Math.min(0,Sn.x-Ir.x*Ii+No),y:Math.min(0,Sn.y-Ir.y*Ii+rs)};$t.position(Jt),_n.current=oi,pt.current=Sn,lt(Ze)}},onTouchEnd:Ze=>{_n.current=0,pt.current=null,_.default.hitOnDragEnabled=!1}}),l.default.createElement(h.Transformer,{ref:ze,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ze,St)=>St.width<5||St.height<5?Ze:St,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(h.Rect,{width:ft,height:At,ref:je,listening:!1,onTransform:Ze=>{Ze.target.x()<-V.cropX*xe.width-1e-9&&(Ze.target.x(-V.cropX*xe.width),Ze.target.scaleX(1)),Ze.target.y()<-V.cropY*xe.height-1e-9&&(Ze.target.y(-V.cropY*xe.height),Ze.target.scaleY(1));const St=Math.min(1,Math.max(0,V.cropX+Ze.target.x()/xe.width)),Mt=Math.min(1,Math.max(0,Ze.target.y()/xe.height+V.cropY)),Vt=Ze.target.width()*Ze.target.scaleX(),$t=Ze.target.height()*Ze.target.scaleY(),Jn=Math.min(1-St,Vt/xe.width),Gn=Math.min(1-Mt,$t/xe.height),Sn=Ze.target.getAbsolutePosition(Ze.target.getParent().getParent());Ze.target.scale({x:1,y:1}),Ze.target.position({x:0,y:0}),V.set({x:Sn.x,y:Sn.y,cropX:St,cropY:Mt,cropWidth:Jn,cropHeight:Gn,width:Math.min(Vt*rt,xe.width*(1-St)*rt),height:Math.min($t*rt,xe.height*(1-Mt)*rt)})}}),l.default.createElement(h.Transformer,{ref:mt,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ze,St)=>St.width<5||St.height<5?Ze:St,visible:V.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(ue||pe)&&l.default.createElement(E.Highlighter,{element:V}))})}(wo)),wo}var So={},op={exports:{}};/*!
|
|
109
|
-
* Quill Editor v1.3.7
|
|
110
|
-
* https://quilljs.com/
|
|
111
|
-
* Copyright (c) 2014, Jason Chen
|
|
112
|
-
* Copyright (c) 2013, salesforce.com
|
|
113
|
-
*/var QE=op.exports,C2;function JE(){return C2||(C2=1,function(e,i){(function(n,a){e.exports=a()})(typeof self<"u"?self:QE,function(){return function(t){var n={};function a(l){if(n[l])return n[l].exports;var u=n[l]={i:l,l:!1,exports:{}};return t[l].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=t,a.c=n,a.d=function(l,u,c){a.o(l,u)||Object.defineProperty(l,u,{configurable:!1,enumerable:!0,get:c})},a.n=function(l){var u=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(u,"a",u),u},a.o=function(l,u){return Object.prototype.hasOwnProperty.call(l,u)},a.p="",a(a.s=109)}([function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(17),u=a(18),c=a(19),h=a(45),b=a(46),_=a(47),k=a(48),E=a(49),v=a(12),O=a(32),g=a(33),p=a(31),P=a(1),d={Scope:P.Scope,create:P.create,find:P.find,query:P.query,register:P.register,Container:l.default,Format:u.default,Leaf:c.default,Embed:k.default,Scroll:h.default,Block:_.default,Inline:b.default,Text:E.default,Attributor:{Attribute:v.default,Class:O.default,Style:g.default,Store:p.default}};n.default=d},function(t,n,a){var l=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,d){P.__proto__=d}||function(P,d){for(var m in d)d.hasOwnProperty(m)&&(P[m]=d[m])};return function(P,d){p(P,d);function m(){this.constructor=P}P.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=function(p){l(P,p);function P(d){var m=this;return d="[Parchment] "+d,m=p.call(this,d)||this,m.message=d,m.name=m.constructor.name,m}return P}(Error);n.ParchmentError=u;var c={},h={},b={},_={};n.DATA_KEY="__blot";var k;(function(p){p[p.TYPE=3]="TYPE",p[p.LEVEL=12]="LEVEL",p[p.ATTRIBUTE=13]="ATTRIBUTE",p[p.BLOT=14]="BLOT",p[p.INLINE=7]="INLINE",p[p.BLOCK=11]="BLOCK",p[p.BLOCK_BLOT=10]="BLOCK_BLOT",p[p.INLINE_BLOT=6]="INLINE_BLOT",p[p.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",p[p.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",p[p.ANY=15]="ANY"})(k=n.Scope||(n.Scope={}));function E(p,P){var d=O(p);if(d==null)throw new u("Unable to create "+p+" blot");var m=d,y=p instanceof Node||p.nodeType===Node.TEXT_NODE?p:m.create(P);return new m(y,P)}n.create=E;function v(p,P){return P===void 0&&(P=!1),p==null?null:p[n.DATA_KEY]!=null?p[n.DATA_KEY].blot:P?v(p.parentNode,P):null}n.find=v;function O(p,P){P===void 0&&(P=k.ANY);var d;if(typeof p=="string")d=_[p]||c[p];else if(p instanceof Text||p.nodeType===Node.TEXT_NODE)d=_.text;else if(typeof p=="number")p&k.LEVEL&k.BLOCK?d=_.block:p&k.LEVEL&k.INLINE&&(d=_.inline);else if(p instanceof HTMLElement){var m=(p.getAttribute("class")||"").split(/\s+/);for(var y in m)if(d=h[m[y]],d)break;d=d||b[p.tagName]}return d==null?null:P&k.LEVEL&d.scope&&P&k.TYPE&d.scope?d:null}n.query=O;function g(){for(var p=[],P=0;P<arguments.length;P++)p[P]=arguments[P];if(p.length>1)return p.map(function(y){return g(y)});var d=p[0];if(typeof d.blotName!="string"&&typeof d.attrName!="string")throw new u("Invalid definition");if(d.blotName==="abstract")throw new u("Cannot register abstract class");if(_[d.blotName||d.attrName]=d,typeof d.keyName=="string")c[d.keyName]=d;else if(d.className!=null&&(h[d.className]=d),d.tagName!=null){Array.isArray(d.tagName)?d.tagName=d.tagName.map(function(y){return y.toUpperCase()}):d.tagName=d.tagName.toUpperCase();var m=Array.isArray(d.tagName)?d.tagName:[d.tagName];m.forEach(function(y){(b[y]==null||d.className==null)&&(b[y]=d)})}return d}n.register=g},function(t,n,a){var l=a(51),u=a(11),c=a(3),h=a(20),b="\0",_=function(k){Array.isArray(k)?this.ops=k:k!=null&&Array.isArray(k.ops)?this.ops=k.ops:this.ops=[]};_.prototype.insert=function(k,E){var v={};return k.length===0?this:(v.insert=k,E!=null&&typeof E=="object"&&Object.keys(E).length>0&&(v.attributes=E),this.push(v))},_.prototype.delete=function(k){return k<=0?this:this.push({delete:k})},_.prototype.retain=function(k,E){if(k<=0)return this;var v={retain:k};return E!=null&&typeof E=="object"&&Object.keys(E).length>0&&(v.attributes=E),this.push(v)},_.prototype.push=function(k){var E=this.ops.length,v=this.ops[E-1];if(k=c(!0,{},k),typeof v=="object"){if(typeof k.delete=="number"&&typeof v.delete=="number")return this.ops[E-1]={delete:v.delete+k.delete},this;if(typeof v.delete=="number"&&k.insert!=null&&(E-=1,v=this.ops[E-1],typeof v!="object"))return this.ops.unshift(k),this;if(u(k.attributes,v.attributes)){if(typeof k.insert=="string"&&typeof v.insert=="string")return this.ops[E-1]={insert:v.insert+k.insert},typeof k.attributes=="object"&&(this.ops[E-1].attributes=k.attributes),this;if(typeof k.retain=="number"&&typeof v.retain=="number")return this.ops[E-1]={retain:v.retain+k.retain},typeof k.attributes=="object"&&(this.ops[E-1].attributes=k.attributes),this}}return E===this.ops.length?this.ops.push(k):this.ops.splice(E,0,k),this},_.prototype.chop=function(){var k=this.ops[this.ops.length-1];return k&&k.retain&&!k.attributes&&this.ops.pop(),this},_.prototype.filter=function(k){return this.ops.filter(k)},_.prototype.forEach=function(k){this.ops.forEach(k)},_.prototype.map=function(k){return this.ops.map(k)},_.prototype.partition=function(k){var E=[],v=[];return this.forEach(function(O){var g=k(O)?E:v;g.push(O)}),[E,v]},_.prototype.reduce=function(k,E){return this.ops.reduce(k,E)},_.prototype.changeLength=function(){return this.reduce(function(k,E){return E.insert?k+h.length(E):E.delete?k-E.delete:k},0)},_.prototype.length=function(){return this.reduce(function(k,E){return k+h.length(E)},0)},_.prototype.slice=function(k,E){k=k||0,typeof E!="number"&&(E=1/0);for(var v=[],O=h.iterator(this.ops),g=0;g<E&&O.hasNext();){var p;g<k?p=O.next(k-g):(p=O.next(E-g),v.push(p)),g+=h.length(p)}return new _(v)},_.prototype.compose=function(k){var E=h.iterator(this.ops),v=h.iterator(k.ops),O=[],g=v.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var p=g.retain;E.peekType()==="insert"&&E.peekLength()<=p;)p-=E.peekLength(),O.push(E.next());g.retain-p>0&&v.next(g.retain-p)}for(var P=new _(O);E.hasNext()||v.hasNext();)if(v.peekType()==="insert")P.push(v.next());else if(E.peekType()==="delete")P.push(E.next());else{var d=Math.min(E.peekLength(),v.peekLength()),m=E.next(d),y=v.next(d);if(typeof y.retain=="number"){var w={};typeof m.retain=="number"?w.retain=d:w.insert=m.insert;var N=h.attributes.compose(m.attributes,y.attributes,typeof m.retain=="number");if(N&&(w.attributes=N),P.push(w),!v.hasNext()&&u(P.ops[P.ops.length-1],w)){var R=new _(E.rest());return P.concat(R).chop()}}else typeof y.delete=="number"&&typeof m.retain=="number"&&P.push(y)}return P.chop()},_.prototype.concat=function(k){var E=new _(this.ops.slice());return k.ops.length>0&&(E.push(k.ops[0]),E.ops=E.ops.concat(k.ops.slice(1))),E},_.prototype.diff=function(k,E){if(this.ops===k.ops)return new _;var v=[this,k].map(function(d){return d.map(function(m){if(m.insert!=null)return typeof m.insert=="string"?m.insert:b;var y=d===k?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),O=new _,g=l(v[0],v[1],E),p=h.iterator(this.ops),P=h.iterator(k.ops);return g.forEach(function(d){for(var m=d[1].length;m>0;){var y=0;switch(d[0]){case l.INSERT:y=Math.min(P.peekLength(),m),O.push(P.next(y));break;case l.DELETE:y=Math.min(m,p.peekLength()),p.next(y),O.delete(y);break;case l.EQUAL:y=Math.min(p.peekLength(),P.peekLength(),m);var w=p.next(y),N=P.next(y);u(w.insert,N.insert)?O.retain(y,h.attributes.diff(w.attributes,N.attributes)):O.push(N).delete(y);break}m-=y}}),O.chop()},_.prototype.eachLine=function(k,E){E=E||`
|
|
114
|
-
`;for(var v=h.iterator(this.ops),O=new _,g=0;v.hasNext();){if(v.peekType()!=="insert")return;var p=v.peek(),P=h.length(p)-v.peekLength(),d=typeof p.insert=="string"?p.insert.indexOf(E,P)-P:-1;if(d<0)O.push(v.next());else if(d>0)O.push(v.next(d));else{if(k(O,v.next(1).attributes||{},g)===!1)return;g+=1,O=new _}}O.length()>0&&k(O,{},g)},_.prototype.transform=function(k,E){if(E=!!E,typeof k=="number")return this.transformPosition(k,E);for(var v=h.iterator(this.ops),O=h.iterator(k.ops),g=new _;v.hasNext()||O.hasNext();)if(v.peekType()==="insert"&&(E||O.peekType()!=="insert"))g.retain(h.length(v.next()));else if(O.peekType()==="insert")g.push(O.next());else{var p=Math.min(v.peekLength(),O.peekLength()),P=v.next(p),d=O.next(p);if(P.delete)continue;d.delete?g.push(d):g.retain(p,h.attributes.transform(P.attributes,d.attributes,E))}return g.chop()},_.prototype.transformPosition=function(k,E){E=!!E;for(var v=h.iterator(this.ops),O=0;v.hasNext()&&O<=k;){var g=v.peekLength(),p=v.peekType();if(v.next(),p==="delete"){k-=Math.min(g,k-O);continue}else p==="insert"&&(O<k||!E)&&(k+=g);O+=g}return k},t.exports=_},function(t,n){var a=Object.prototype.hasOwnProperty,l=Object.prototype.toString,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h=function(v){return typeof Array.isArray=="function"?Array.isArray(v):l.call(v)==="[object Array]"},b=function(v){if(!v||l.call(v)!=="[object Object]")return!1;var O=a.call(v,"constructor"),g=v.constructor&&v.constructor.prototype&&a.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!O&&!g)return!1;var p;for(p in v);return typeof p>"u"||a.call(v,p)},_=function(v,O){u&&O.name==="__proto__"?u(v,O.name,{enumerable:!0,configurable:!0,value:O.newValue,writable:!0}):v[O.name]=O.newValue},k=function(v,O){if(O==="__proto__")if(a.call(v,O)){if(c)return c(v,O).value}else return;return v[O]};t.exports=function E(){var v,O,g,p,P,d,m=arguments[0],y=1,w=arguments.length,N=!1;for(typeof m=="boolean"&&(N=m,m=arguments[1]||{},y=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});y<w;++y)if(v=arguments[y],v!=null)for(O in v)g=k(m,O),p=k(v,O),m!==p&&(N&&p&&(b(p)||(P=h(p)))?(P?(P=!1,d=g&&h(g)?g:[]):d=g&&b(g)?g:{},_(m,{name:O,newValue:E(N,d,p)})):typeof p<"u"&&_(m,{name:O,newValue:p}));return m}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var l=function(){function A(M,T){for(var z=0;z<T.length;z++){var U=T[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,T,z){return T&&A(M.prototype,T),z&&A(M,z),M}}(),u=function A(M,T,z){M===null&&(M=Function.prototype);var U=Object.getOwnPropertyDescriptor(M,T);if(U===void 0){var Q=Object.getPrototypeOf(M);return Q===null?void 0:A(Q,T,z)}else{if("value"in U)return U.value;var K=U.get;return K===void 0?void 0:K.call(z)}},c=a(3),h=m(c),b=a(2),_=m(b),k=a(0),E=m(k),v=a(16),O=m(v),g=a(6),p=m(g),P=a(7),d=m(P);function m(A){return A&&A.__esModule?A:{default:A}}function y(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function w(A,M){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:A}function N(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var R=1,D=function(A){N(M,A);function M(){return y(this,M),w(this,(M.__proto__||Object.getPrototypeOf(M)).apply(this,arguments))}return l(M,[{key:"attach",value:function(){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"attach",this).call(this),this.attributes=new E.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new _.default().insert(this.value(),(0,h.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(z,U){var Q=E.default.query(z,E.default.Scope.BLOCK_ATTRIBUTE);Q!=null&&this.attributes.attribute(Q,U)}},{key:"formatAt",value:function(z,U,Q,K){this.format(Q,K)}},{key:"insertAt",value:function(z,U,Q){if(typeof U=="string"&&U.endsWith(`
|
|
115
|
-
`)){var K=E.default.create(x.blotName);this.parent.insertBefore(K,z===0?this:this.next),K.insertAt(0,U.slice(0,-1))}else u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,z,U,Q)}}]),M}(E.default.Embed);D.scope=E.default.Scope.BLOCK_BLOT;var x=function(A){N(M,A);function M(T){y(this,M);var z=w(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,T));return z.cache={},z}return l(M,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(E.default.Leaf).reduce(function(z,U){return U.length()===0?z:z.insert(U.value(),S(U))},new _.default).insert(`
|
|
116
|
-
`,S(this))),this.cache.delta}},{key:"deleteAt",value:function(z,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"deleteAt",this).call(this,z,U),this.cache={}}},{key:"formatAt",value:function(z,U,Q,K){U<=0||(E.default.query(Q,E.default.Scope.BLOCK)?z+U===this.length()&&this.format(Q,K):u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"formatAt",this).call(this,z,Math.min(U,this.length()-z-1),Q,K),this.cache={})}},{key:"insertAt",value:function(z,U,Q){if(Q!=null)return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,z,U,Q);if(U.length!==0){var K=U.split(`
|
|
117
|
-
`),J=K.shift();J.length>0&&(z<this.length()-1||this.children.tail==null?u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(z,this.length()-1),J):this.children.tail.insertAt(this.children.tail.length(),J),this.cache={});var B=this;K.reduce(function(L,F){return B=B.split(L,!0),B.insertAt(0,F),F.length},z+J.length)}}},{key:"insertBefore",value:function(z,U){var Q=this.children.head;u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,z,U),Q instanceof O.default&&Q.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"length",this).call(this)+R),this.cache.length}},{key:"moveChildren",value:function(z,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,z,U),this.cache={}}},{key:"optimize",value:function(z){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,z),this.cache={}}},{key:"path",value:function(z){return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,z,!0)}},{key:"removeChild",value:function(z){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,z),this.cache={}}},{key:"split",value:function(z){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(U&&(z===0||z>=this.length()-R)){var Q=this.clone();return z===0?(this.parent.insertBefore(Q,this),this):(this.parent.insertBefore(Q,this.next),Q)}else{var K=u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,z,U);return this.cache={},K}}}]),M}(E.default.Block);x.blotName="block",x.tagName="P",x.defaultChild="break",x.allowedChildren=[p.default,E.default.Embed,d.default];function S(A){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(M=(0,h.default)(M,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?M:S(A.parent,M)}n.bubbleFormats=S,n.BlockEmbed=D,n.default=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},u=function(){function B(L,F){var H=[],$=!0,ee=!1,V=void 0;try{for(var X=L[Symbol.iterator](),Y;!($=(Y=X.next()).done)&&(H.push(Y.value),!(F&&H.length===F));$=!0);}catch(te){ee=!0,V=te}finally{try{!$&&X.return&&X.return()}finally{if(ee)throw V}}return H}return function(L,F){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return B(L,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function B(L,F){for(var H=0;H<F.length;H++){var $=F[H];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(L,$.key,$)}}return function(L,F,H){return F&&B(L.prototype,F),H&&B(L,H),L}}();a(50);var h=a(2),b=S(h),_=a(14),k=S(_),E=a(8),v=S(E),O=a(9),g=S(O),p=a(0),P=S(p),d=a(15),m=S(d),y=a(3),w=S(y),N=a(10),R=S(N),D=a(34),x=S(D);function S(B){return B&&B.__esModule?B:{default:B}}function A(B,L,F){return L in B?Object.defineProperty(B,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):B[L]=F,B}function M(B,L){if(!(B instanceof L))throw new TypeError("Cannot call a class as a function")}var T=(0,R.default)("quill"),z=function(){c(B,null,[{key:"debug",value:function(F){F===!0&&(F="log"),R.default.level(F)}},{key:"find",value:function(F){return F.__quill||P.default.find(F)}},{key:"import",value:function(F){return this.imports[F]==null&&T.error("Cannot import "+F+". Are you sure it was registered?"),this.imports[F]}},{key:"register",value:function(F,H){var $=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof F!="string"){var V=F.attrName||F.blotName;typeof V=="string"?this.register("formats/"+V,F,H):Object.keys(F).forEach(function(X){$.register(X,F[X],H)})}else this.imports[F]!=null&&!ee&&T.warn("Overwriting "+F+" with",H),this.imports[F]=H,(F.startsWith("blots/")||F.startsWith("formats/"))&&H.blotName!=="abstract"?P.default.register(H):F.startsWith("modules")&&typeof H.register=="function"&&H.register()}}]);function B(L){var F=this,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,B),this.options=U(L,H),this.container=this.options.container,this.container==null)return T.error("Invalid Quill container",L);this.options.debug&&B.debug(this.options.debug);var $=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 v.default,this.scroll=P.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new k.default(this.scroll),this.selection=new m.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(v.default.events.EDITOR_CHANGE,function(V){V===v.default.events.TEXT_CHANGE&&F.root.classList.toggle("ql-blank",F.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(V,X){var Y=F.selection.lastRange,te=Y&&Y.length===0?Y.index:void 0;Q.call(F,function(){return F.editor.update(null,X,te)},V)});var ee=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+$+"<p><br></p></div>");this.setContents(ee),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(B,[{key:"addContainer",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof F=="string"){var $=F;F=document.createElement("div"),F.classList.add($)}return this.container.insertBefore(F,H),F}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(F,H,$){var ee=this,V=K(F,H,$),X=u(V,4);return F=X[0],H=X[1],$=X[3],Q.call(this,function(){return ee.editor.deleteText(F,H)},$,F,-1*H)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(F),this.container.classList.toggle("ql-disabled",!F)}},{key:"focus",value:function(){var F=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=F,this.scrollIntoView()}},{key:"format",value:function(F,H){var $=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Q.call(this,function(){var V=$.getSelection(!0),X=new b.default;if(V==null)return X;if(P.default.query(F,P.default.Scope.BLOCK))X=$.editor.formatLine(V.index,V.length,A({},F,H));else{if(V.length===0)return $.selection.format(F,H),X;X=$.editor.formatText(V.index,V.length,A({},F,H))}return $.setSelection(V,v.default.sources.SILENT),X},ee)}},{key:"formatLine",value:function(F,H,$,ee,V){var X=this,Y=void 0,te=K(F,H,$,ee,V),re=u(te,4);return F=re[0],H=re[1],Y=re[2],V=re[3],Q.call(this,function(){return X.editor.formatLine(F,H,Y)},V,F,0)}},{key:"formatText",value:function(F,H,$,ee,V){var X=this,Y=void 0,te=K(F,H,$,ee,V),re=u(te,4);return F=re[0],H=re[1],Y=re[2],V=re[3],Q.call(this,function(){return X.editor.formatText(F,H,Y)},V,F,0)}},{key:"getBounds",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=void 0;typeof F=="number"?$=this.selection.getBounds(F,H):$=this.selection.getBounds(F.index,F.length);var ee=this.container.getBoundingClientRect();return{bottom:$.bottom-ee.top,height:$.height,left:$.left-ee.left,right:$.right-ee.left,top:$.top-ee.top,width:$.width}}},{key:"getContents",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,$=K(F,H),ee=u($,2);return F=ee[0],H=ee[1],this.editor.getContents(F,H)}},{key:"getFormat",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof F=="number"?this.editor.getFormat(F,H):this.editor.getFormat(F.index,F.length)}},{key:"getIndex",value:function(F){return F.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(F){return this.scroll.leaf(F)}},{key:"getLine",value:function(F){return this.scroll.line(F)}},{key:"getLines",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof F!="number"?this.scroll.lines(F.index,F.length):this.scroll.lines(F,H)}},{key:"getModule",value:function(F){return this.theme.modules[F]}},{key:"getSelection",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return F&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,$=K(F,H),ee=u($,2);return F=ee[0],H=ee[1],this.editor.getText(F,H)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(F,H,$){var ee=this,V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B.sources.API;return Q.call(this,function(){return ee.editor.insertEmbed(F,H,$)},V,F)}},{key:"insertText",value:function(F,H,$,ee,V){var X=this,Y=void 0,te=K(F,0,$,ee,V),re=u(te,4);return F=re[0],Y=re[2],V=re[3],Q.call(this,function(){return X.editor.insertText(F,H,Y)},V,F,H.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(F,H,$){this.clipboard.dangerouslyPasteHTML(F,H,$)}},{key:"removeFormat",value:function(F,H,$){var ee=this,V=K(F,H,$),X=u(V,4);return F=X[0],H=X[1],$=X[3],Q.call(this,function(){return ee.editor.removeFormat(F,H)},$,F)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(F){var H=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Q.call(this,function(){F=new b.default(F);var ee=H.getLength(),V=H.editor.deleteText(0,ee),X=H.editor.applyDelta(F),Y=X.ops[X.ops.length-1];Y!=null&&typeof Y.insert=="string"&&Y.insert[Y.insert.length-1]===`
|
|
118
|
-
`&&(H.editor.deleteText(H.getLength()-1,1),X.delete(1));var te=V.compose(X);return te},$)}},{key:"setSelection",value:function(F,H,$){if(F==null)this.selection.setRange(null,H||B.sources.API);else{var ee=K(F,H,$),V=u(ee,4);F=V[0],H=V[1],$=V[3],this.selection.setRange(new d.Range(F,H),$),$!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,$=new b.default().insert(F);return this.setContents($,H)}},{key:"update",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,H=this.scroll.update(F);return this.selection.update(F),H}},{key:"updateContents",value:function(F){var H=this,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Q.call(this,function(){return F=new b.default(F),H.editor.applyDelta(F,$)},$,!0)}}]),B}();z.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},z.events=v.default.events,z.sources=v.default.sources,z.version="1.3.7",z.imports={delta:b.default,parchment:P.default,"core/module":g.default,"core/theme":x.default};function U(B,L){if(L=(0,w.default)(!0,{container:B,modules:{clipboard:!0,keyboard:!0,history:!0}},L),!L.theme||L.theme===z.DEFAULTS.theme)L.theme=x.default;else if(L.theme=z.import("themes/"+L.theme),L.theme==null)throw new Error("Invalid theme "+L.theme+". Did you register it?");var F=(0,w.default)(!0,{},L.theme.DEFAULTS);[F,L].forEach(function(ee){ee.modules=ee.modules||{},Object.keys(ee.modules).forEach(function(V){ee.modules[V]===!0&&(ee.modules[V]={})})});var H=Object.keys(F.modules).concat(Object.keys(L.modules)),$=H.reduce(function(ee,V){var X=z.import("modules/"+V);return X==null?T.error("Cannot load "+V+" module. Are you sure you registered it?"):ee[V]=X.DEFAULTS||{},ee},{});return L.modules!=null&&L.modules.toolbar&&L.modules.toolbar.constructor!==Object&&(L.modules.toolbar={container:L.modules.toolbar}),L=(0,w.default)(!0,{},z.DEFAULTS,{modules:$},F,L),["bounds","container","scrollingContainer"].forEach(function(ee){typeof L[ee]=="string"&&(L[ee]=document.querySelector(L[ee]))}),L.modules=Object.keys(L.modules).reduce(function(ee,V){return L.modules[V]&&(ee[V]=L.modules[V]),ee},{}),L}function Q(B,L,F,H){if(this.options.strict&&!this.isEnabled()&&L===v.default.sources.USER)return new b.default;var $=F==null?null:this.getSelection(),ee=this.editor.delta,V=B();if($!=null&&(F===!0&&(F=$.index),H==null?$=J($,V,L):H!==0&&($=J($,F,H,L)),this.setSelection($,v.default.sources.SILENT)),V.length()>0){var X,Y=[v.default.events.TEXT_CHANGE,V,ee,L];if((X=this.emitter).emit.apply(X,[v.default.events.EDITOR_CHANGE].concat(Y)),L!==v.default.sources.SILENT){var te;(te=this.emitter).emit.apply(te,Y)}}return V}function K(B,L,F,H,$){var ee={};return typeof B.index=="number"&&typeof B.length=="number"?typeof L!="number"?($=H,H=F,F=L,L=B.length,B=B.index):(L=B.length,B=B.index):typeof L!="number"&&($=H,H=F,F=L,L=0),(typeof F>"u"?"undefined":l(F))==="object"?(ee=F,$=H):typeof F=="string"&&(H!=null?ee[F]=H:$=F),$=$||v.default.sources.API,[B,L,ee,$]}function J(B,L,F,H){if(B==null)return null;var $=void 0,ee=void 0;if(L instanceof b.default){var V=[B.index,B.index+B.length].map(function(re){return L.transformPosition(re,H!==v.default.sources.USER)}),X=u(V,2);$=X[0],ee=X[1]}else{var Y=[B.index,B.index+B.length].map(function(re){return re<L||re===L&&H===v.default.sources.USER?re:F>=0?re+F:Math.max(L,re+F)}),te=u(Y,2);$=te[0],ee=te[1]}return new d.Range($,ee-$)}n.expandConfig=U,n.overload=K,n.default=z},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var N=y.get;return N===void 0?void 0:N.call(m)}},c=a(7),h=k(c),b=a(0),_=k(b);function k(p){return p&&p.__esModule?p:{default:p}}function E(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function v(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function O(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var g=function(p){O(P,p);function P(){return E(this,P),v(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"formatAt",value:function(m,y,w,N){if(P.compare(this.statics.blotName,w)<0&&_.default.query(w,_.default.Scope.BLOT)){var R=this.isolate(m,y);N&&R.wrap(w,N)}else u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"formatAt",this).call(this,m,y,w,N)}},{key:"optimize",value:function(m){if(u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,m),this.parent instanceof P&&P.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(m,y){var w=P.order.indexOf(m),N=P.order.indexOf(y);return w>=0||N>=0?w-N:m===y?0:m<y?-1:1}}]),P}(_.default.Inline);g.allowedChildren=[g,_.default.Embed,h.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,v){if(!(E instanceof v))throw new TypeError("Cannot call a class as a function")}function b(E,v){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:E}function _(E,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);E.prototype=Object.create(v&&v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(E,v):E.__proto__=v)}var k=function(E){_(v,E);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default.Text);n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function d(m,y){for(var w=0;w<y.length;w++){var N=y[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(m,N.key,N)}}return function(m,y,w){return y&&d(m.prototype,y),w&&d(m,w),m}}(),u=function d(m,y,w){m===null&&(m=Function.prototype);var N=Object.getOwnPropertyDescriptor(m,y);if(N===void 0){var R=Object.getPrototypeOf(m);return R===null?void 0:d(R,y,w)}else{if("value"in N)return N.value;var D=N.get;return D===void 0?void 0:D.call(w)}},c=a(54),h=k(c),b=a(10),_=k(b);function k(d){return d&&d.__esModule?d:{default:d}}function E(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function v(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function O(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var g=(0,_.default)("quill:events"),p=["selectionchange","mousedown","mouseup","click"];p.forEach(function(d){document.addEventListener(d,function(){for(var m=arguments.length,y=Array(m),w=0;w<m;w++)y[w]=arguments[w];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(N){if(N.__quill&&N.__quill.emitter){var R;(R=N.__quill.emitter).handleDOM.apply(R,y)}})})});var P=function(d){O(m,d);function m(){E(this,m);var y=v(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));return y.listeners={},y.on("error",g.error),y}return l(m,[{key:"emit",value:function(){g.log.apply(g,arguments),u(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(w){for(var N=arguments.length,R=Array(N>1?N-1:0),D=1;D<N;D++)R[D-1]=arguments[D];(this.listeners[w.type]||[]).forEach(function(x){var S=x.node,A=x.handler;(w.target===S||S.contains(w.target))&&A.apply(void 0,[w].concat(R))})}},{key:"listenDOM",value:function(w,N,R){this.listeners[w]||(this.listeners[w]=[]),this.listeners[w].push({node:N,handler:R})}}]),m}(h.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(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});function l(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function c(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(this,c),this.quill=h,this.options=b};u.DEFAULTS={},n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=["error","warn","log","info"],u="warn";function c(b){if(l.indexOf(b)<=l.indexOf(u)){for(var _,k=arguments.length,E=Array(k>1?k-1:0),v=1;v<k;v++)E[v-1]=arguments[v];(_=console)[b].apply(_,E)}}function h(b){return l.reduce(function(_,k){return _[k]=c.bind(console,k,b),_},{})}c.level=h.level=function(b){u=b},n.default=h},function(t,n,a){var l=Array.prototype.slice,u=a(52),c=a(53),h=t.exports=function(E,v,O){return O||(O={}),E===v?!0:E instanceof Date&&v instanceof Date?E.getTime()===v.getTime():!E||!v||typeof E!="object"&&typeof v!="object"?O.strict?E===v:E==v:k(E,v,O)};function b(E){return E==null}function _(E){return!(!E||typeof E!="object"||typeof E.length!="number"||typeof E.copy!="function"||typeof E.slice!="function"||E.length>0&&typeof E[0]!="number")}function k(E,v,O){var g,p;if(b(E)||b(v)||E.prototype!==v.prototype)return!1;if(c(E))return c(v)?(E=l.call(E),v=l.call(v),h(E,v,O)):!1;if(_(E)){if(!_(v)||E.length!==v.length)return!1;for(g=0;g<E.length;g++)if(E[g]!==v[g])return!1;return!0}try{var P=u(E),d=u(v)}catch{return!1}if(P.length!=d.length)return!1;for(P.sort(),d.sort(),g=P.length-1;g>=0;g--)if(P[g]!=d[g])return!1;for(g=P.length-1;g>=0;g--)if(p=P[g],!h(E[p],v[p],O))return!1;return typeof E==typeof v}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(h,b,_){_===void 0&&(_={}),this.attrName=h,this.keyName=b;var k=l.Scope.TYPE&l.Scope.ATTRIBUTE;_.scope!=null?this.scope=_.scope&l.Scope.LEVEL|k:this.scope=l.Scope.ATTRIBUTE,_.whitelist!=null&&(this.whitelist=_.whitelist)}return c.keys=function(h){return[].map.call(h.attributes,function(b){return b.name})},c.prototype.add=function(h,b){return this.canAdd(h,b)?(h.setAttribute(this.keyName,b),!0):!1},c.prototype.canAdd=function(h,b){var _=l.query(h,l.Scope.BLOT&(this.scope|l.Scope.TYPE));return _==null?!1:this.whitelist==null?!0:typeof b=="string"?this.whitelist.indexOf(b.replace(/["']/g,""))>-1:this.whitelist.indexOf(b)>-1},c.prototype.remove=function(h){h.removeAttribute(this.keyName)},c.prototype.value=function(h){var b=h.getAttribute(this.keyName);return this.canAdd(h,b)&&b?b:""},c}();n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var l=function(){function D(x,S){var A=[],M=!0,T=!1,z=void 0;try{for(var U=x[Symbol.iterator](),Q;!(M=(Q=U.next()).done)&&(A.push(Q.value),!(S&&A.length===S));M=!0);}catch(K){T=!0,z=K}finally{try{!M&&U.return&&U.return()}finally{if(T)throw z}}return A}return function(x,S){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return D(x,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(x,S){for(var A=0;A<S.length;A++){var M=S[A];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(x,M.key,M)}}return function(x,S,A){return S&&D(x.prototype,S),A&&D(x,A),x}}(),c=function D(x,S,A){x===null&&(x=Function.prototype);var M=Object.getOwnPropertyDescriptor(x,S);if(M===void 0){var T=Object.getPrototypeOf(x);return T===null?void 0:D(T,S,A)}else{if("value"in M)return M.value;var z=M.get;return z===void 0?void 0:z.call(A)}},h=a(2),b=d(h),_=a(0),k=d(_),E=a(4),v=d(E),O=a(6),g=d(O),p=a(7),P=d(p);function d(D){return D&&D.__esModule?D:{default:D}}function m(D,x){if(!(D instanceof x))throw new TypeError("Cannot call a class as a function")}function y(D,x){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:D}function w(D,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);D.prototype=Object.create(x&&x.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(D,x):D.__proto__=x)}var N=function(D){w(x,D);function x(){return m(this,x),y(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return x}(g.default);N.blotName="code",N.tagName="CODE";var R=function(D){w(x,D);function x(){return m(this,x),y(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return u(x,[{key:"delta",value:function(){var A=this,M=this.domNode.textContent;return M.endsWith(`
|
|
119
|
-
`)&&(M=M.slice(0,-1)),M.split(`
|
|
120
|
-
`).reduce(function(T,z){return T.insert(z).insert(`
|
|
121
|
-
`,A.formats())},new b.default)}},{key:"format",value:function(A,M){if(!(A===this.statics.blotName&&M)){var T=this.descendant(P.default,this.length()-1),z=l(T,1),U=z[0];U!=null&&U.deleteAt(U.length()-1,1),c(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,A,M)}}},{key:"formatAt",value:function(A,M,T,z){if(M!==0&&!(k.default.query(T,k.default.Scope.BLOCK)==null||T===this.statics.blotName&&z===this.statics.formats(this.domNode))){var U=this.newlineIndex(A);if(!(U<0||U>=A+M)){var Q=this.newlineIndex(A,!0)+1,K=U-Q+1,J=this.isolate(Q,K),B=J.next;J.format(T,z),B instanceof x&&B.formatAt(0,A-Q+M-K,T,z)}}}},{key:"insertAt",value:function(A,M,T){if(T==null){var z=this.descendant(P.default,A),U=l(z,2),Q=U[0],K=U[1];Q.insertAt(K,M)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?A:A+1}},{key:"newlineIndex",value:function(A){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M)return this.domNode.textContent.slice(0,A).lastIndexOf(`
|
|
123
|
-
`);var T=this.domNode.textContent.slice(A).indexOf(`
|
|
124
|
-
`);return T>-1?A+T:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(k.default.create("text",`
|
|
126
|
-
`)),c(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,A);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===M.statics.formats(M.domNode)&&(M.optimize(A),M.moveChildren(this),M.remove())}},{key:"replace",value:function(A){c(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var T=k.default.find(M);T==null?M.parentNode.removeChild(M):T instanceof k.default.Embed?T.remove():T.unwrap()})}}],[{key:"create",value:function(A){var M=c(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,A);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),x}(v.default);R.blotName="code-block",R.tagName="PRE",R.TAB=" ",n.Code=N,n.default=R},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},u=function(){function B(L,F){var H=[],$=!0,ee=!1,V=void 0;try{for(var X=L[Symbol.iterator](),Y;!($=(Y=X.next()).done)&&(H.push(Y.value),!(F&&H.length===F));$=!0);}catch(te){ee=!0,V=te}finally{try{!$&&X.return&&X.return()}finally{if(ee)throw V}}return H}return function(L,F){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return B(L,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function B(L,F){for(var H=0;H<F.length;H++){var $=F[H];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(L,$.key,$)}}return function(L,F,H){return F&&B(L.prototype,F),H&&B(L,H),L}}(),h=a(2),b=M(h),_=a(20),k=M(_),E=a(0),v=M(E),O=a(13),g=M(O),p=a(24),P=M(p),d=a(4),m=M(d),y=a(16),w=M(y),N=a(21),R=M(N),D=a(11),x=M(D),S=a(3),A=M(S);function M(B){return B&&B.__esModule?B:{default:B}}function T(B,L,F){return L in B?Object.defineProperty(B,L,{value:F,enumerable:!0,configurable:!0,writable:!0}):B[L]=F,B}function z(B,L){if(!(B instanceof L))throw new TypeError("Cannot call a class as a function")}var U=/^[ -~]*$/,Q=function(){function B(L){z(this,B),this.scroll=L,this.delta=this.getDelta()}return c(B,[{key:"applyDelta",value:function(F){var H=this,$=!1;this.scroll.update();var ee=this.scroll.length();return this.scroll.batchStart(),F=J(F),F.reduce(function(V,X){var Y=X.retain||X.delete||X.insert.length||1,te=X.attributes||{};if(X.insert!=null){if(typeof X.insert=="string"){var re=X.insert;re.endsWith(`
|
|
127
|
-
`)&&$&&($=!1,re=re.slice(0,-1)),V>=ee&&!re.endsWith(`
|
|
128
|
-
`)&&($=!0),H.scroll.insertAt(V,re);var ie=H.scroll.line(V),ae=u(ie,2),ue=ae[0],de=ae[1],pe=(0,A.default)({},(0,d.bubbleFormats)(ue));if(ue instanceof m.default){var Oe=ue.descendant(v.default.Leaf,de),_e=u(Oe,1),Le=_e[0];pe=(0,A.default)(pe,(0,d.bubbleFormats)(Le))}te=k.default.attributes.diff(pe,te)||{}}else if(l(X.insert)==="object"){var fe=Object.keys(X.insert)[0];if(fe==null)return V;H.scroll.insertAt(V,fe,X.insert[fe])}ee+=Y}return Object.keys(te).forEach(function(ge){H.scroll.formatAt(V,Y,ge,te[ge])}),V+Y},0),F.reduce(function(V,X){return typeof X.delete=="number"?(H.scroll.deleteAt(V,X.delete),V):V+(X.retain||X.insert.length||1)},0),this.scroll.batchEnd(),this.update(F)}},{key:"deleteText",value:function(F,H){return this.scroll.deleteAt(F,H),this.update(new b.default().retain(F).delete(H))}},{key:"formatLine",value:function(F,H){var $=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(ee).forEach(function(V){if(!($.scroll.whitelist!=null&&!$.scroll.whitelist[V])){var X=$.scroll.lines(F,Math.max(H,1)),Y=H;X.forEach(function(te){var re=te.length();if(!(te instanceof g.default))te.format(V,ee[V]);else{var ie=F-te.offset($.scroll),ae=te.newlineIndex(ie+Y)-ie+1;te.formatAt(ie,ae,V,ee[V])}Y-=re})}}),this.scroll.optimize(),this.update(new b.default().retain(F).retain(H,(0,R.default)(ee)))}},{key:"formatText",value:function(F,H){var $=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(ee).forEach(function(V){$.scroll.formatAt(F,H,V,ee[V])}),this.update(new b.default().retain(F).retain(H,(0,R.default)(ee)))}},{key:"getContents",value:function(F,H){return this.delta.slice(F,F+H)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(F,H){return F.concat(H.delta())},new b.default)}},{key:"getFormat",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,$=[],ee=[];H===0?this.scroll.path(F).forEach(function(X){var Y=u(X,1),te=Y[0];te instanceof m.default?$.push(te):te instanceof v.default.Leaf&&ee.push(te)}):($=this.scroll.lines(F,H),ee=this.scroll.descendants(v.default.Leaf,F,H));var V=[$,ee].map(function(X){if(X.length===0)return{};for(var Y=(0,d.bubbleFormats)(X.shift());Object.keys(Y).length>0;){var te=X.shift();if(te==null)return Y;Y=K((0,d.bubbleFormats)(te),Y)}return Y});return A.default.apply(A.default,V)}},{key:"getText",value:function(F,H){return this.getContents(F,H).filter(function($){return typeof $.insert=="string"}).map(function($){return $.insert}).join("")}},{key:"insertEmbed",value:function(F,H,$){return this.scroll.insertAt(F,H,$),this.update(new b.default().retain(F).insert(T({},H,$)))}},{key:"insertText",value:function(F,H){var $=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return H=H.replace(/\r\n/g,`
|
|
129
|
-
`).replace(/\r/g,`
|
|
130
|
-
`),this.scroll.insertAt(F,H),Object.keys(ee).forEach(function(V){$.scroll.formatAt(F,H.length,V,ee[V])}),this.update(new b.default().retain(F).insert(H,(0,R.default)(ee)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var F=this.scroll.children.head;return F.statics.blotName!==m.default.blotName||F.children.length>1?!1:F.children.head instanceof w.default}},{key:"removeFormat",value:function(F,H){var $=this.getText(F,H),ee=this.scroll.line(F+H),V=u(ee,2),X=V[0],Y=V[1],te=0,re=new b.default;X!=null&&(X instanceof g.default?te=X.newlineIndex(Y)-Y+1:te=X.length()-Y,re=X.delta().slice(Y,Y+te-1).insert(`
|
|
131
|
-
`));var ie=this.getContents(F,H+te),ae=ie.diff(new b.default().insert($).concat(re)),ue=new b.default().retain(F).concat(ae);return this.applyDelta(ue)}},{key:"update",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],$=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,ee=this.delta;if(H.length===1&&H[0].type==="characterData"&&H[0].target.data.match(U)&&v.default.find(H[0].target)){var V=v.default.find(H[0].target),X=(0,d.bubbleFormats)(V),Y=V.offset(this.scroll),te=H[0].oldValue.replace(P.default.CONTENTS,""),re=new b.default().insert(te),ie=new b.default().insert(V.value()),ae=new b.default().retain(Y).concat(re.diff(ie,$));F=ae.reduce(function(ue,de){return de.insert?ue.insert(de.insert,X):ue.push(de)},new b.default),this.delta=ee.compose(F)}else this.delta=this.getDelta(),(!F||!(0,x.default)(ee.compose(F),this.delta))&&(F=ee.diff(this.delta,$));return F}}]),B}();function K(B,L){return Object.keys(L).reduce(function(F,H){return B[H]==null||(L[H]===B[H]?F[H]=L[H]:Array.isArray(L[H])?L[H].indexOf(B[H])<0&&(F[H]=L[H].concat([B[H]])):F[H]=[L[H],B[H]]),F},{})}function J(B){return B.reduce(function(L,F){if(F.insert===1){var H=(0,R.default)(F.attributes);return delete H.image,L.insert({image:F.attributes.image},H)}if(F.attributes!=null&&(F.attributes.list===!0||F.attributes.bullet===!0)&&(F=(0,R.default)(F),F.attributes.list?F.attributes.list="ordered":(F.attributes.list="bullet",delete F.attributes.bullet)),typeof F.insert=="string"){var $=F.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return L.insert($,F.attributes)}return L.push(F)},new b.default)}n.default=Q},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var l=function(){function D(x,S){var A=[],M=!0,T=!1,z=void 0;try{for(var U=x[Symbol.iterator](),Q;!(M=(Q=U.next()).done)&&(A.push(Q.value),!(S&&A.length===S));M=!0);}catch(K){T=!0,z=K}finally{try{!M&&U.return&&U.return()}finally{if(T)throw z}}return A}return function(x,S){if(Array.isArray(x))return x;if(Symbol.iterator in Object(x))return D(x,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(x,S){for(var A=0;A<S.length;A++){var M=S[A];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(x,M.key,M)}}return function(x,S,A){return S&&D(x.prototype,S),A&&D(x,A),x}}(),c=a(0),h=P(c),b=a(21),_=P(b),k=a(11),E=P(k),v=a(8),O=P(v),g=a(10),p=P(g);function P(D){return D&&D.__esModule?D:{default:D}}function d(D){if(Array.isArray(D)){for(var x=0,S=Array(D.length);x<D.length;x++)S[x]=D[x];return S}else return Array.from(D)}function m(D,x){if(!(D instanceof x))throw new TypeError("Cannot call a class as a function")}var y=(0,p.default)("quill:selection"),w=function D(x){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;m(this,D),this.index=x,this.length=S},N=function(){function D(x,S){var A=this;m(this,D),this.emitter=S,this.scroll=x,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=h.default.create("cursor",this),this.lastRange=this.savedRange=new w(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,O.default.sources.USER),1)}),this.emitter.on(O.default.events.EDITOR_CHANGE,function(M,T){M===O.default.events.TEXT_CHANGE&&T.length()>0&&A.update(O.default.sources.SILENT)}),this.emitter.on(O.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var M=A.getNativeRange();M!=null&&M.start.node!==A.cursor.textNode&&A.emitter.once(O.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(O.default.events.SCROLL_OPTIMIZE,function(M,T){if(T.range){var z=T.range,U=z.startNode,Q=z.startOffset,K=z.endNode,J=z.endOffset;A.setNativeRange(U,Q,K,J)}}),this.update(O.default.sources.SILENT)}return u(D,[{key:"handleComposition",value:function(){var S=this;this.root.addEventListener("compositionstart",function(){S.composing=!0}),this.root.addEventListener("compositionend",function(){if(S.composing=!1,S.cursor.parent){var A=S.cursor.restore();if(!A)return;setTimeout(function(){S.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var S=this;this.emitter.listenDOM("mousedown",document.body,function(){S.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){S.mouseDown=!1,S.update(O.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(S,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[S])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||h.default.query(S,h.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var T=h.default.find(M.start.node,!1);if(T==null)return;if(T instanceof h.default.Leaf){var z=T.split(M.start.offset);T.parent.insertBefore(this.cursor,z)}else T.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(S,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(S){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();S=Math.min(S,M-1),A=Math.min(S+A,M-1)-S;var T=void 0,z=this.scroll.leaf(S),U=l(z,2),Q=U[0],K=U[1];if(Q==null)return null;var J=Q.position(K,!0),B=l(J,2);T=B[0],K=B[1];var L=document.createRange();if(A>0){L.setStart(T,K);var F=this.scroll.leaf(S+A),H=l(F,2);if(Q=H[0],K=H[1],Q==null)return null;var $=Q.position(K,!0),ee=l($,2);return T=ee[0],K=ee[1],L.setEnd(T,K),L.getBoundingClientRect()}else{var V="left",X=void 0;return T instanceof Text?(K<T.data.length?(L.setStart(T,K),L.setEnd(T,K+1)):(L.setStart(T,K-1),L.setEnd(T,K),V="right"),X=L.getBoundingClientRect()):(X=Q.domNode.getBoundingClientRect(),K>0&&(V="right")),{bottom:X.top+X.height,height:X.height,left:X[V],right:X[V],top:X.top,width:0}}}},{key:"getNativeRange",value:function(){var S=document.getSelection();if(S==null||S.rangeCount<=0)return null;var A=S.getRangeAt(0);if(A==null)return null;var M=this.normalizeNative(A);return y.info("getNativeRange",M),M}},{key:"getRange",value:function(){var S=this.getNativeRange();if(S==null)return[null,null];var A=this.normalizedToRange(S);return[A,S]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(S){var A=this,M=[[S.start.node,S.start.offset]];S.native.collapsed||M.push([S.end.node,S.end.offset]);var T=M.map(function(Q){var K=l(Q,2),J=K[0],B=K[1],L=h.default.find(J,!0),F=L.offset(A.scroll);return B===0?F:L instanceof h.default.Container?F+L.length():F+L.index(J,B)}),z=Math.min(Math.max.apply(Math,d(T)),this.scroll.length()-1),U=Math.min.apply(Math,[z].concat(d(T)));return new w(U,z-U)}},{key:"normalizeNative",value:function(S){if(!R(this.root,S.startContainer)||!S.collapsed&&!R(this.root,S.endContainer))return null;var A={start:{node:S.startContainer,offset:S.startOffset},end:{node:S.endContainer,offset:S.endOffset},native:S};return[A.start,A.end].forEach(function(M){for(var T=M.node,z=M.offset;!(T instanceof Text)&&T.childNodes.length>0;)if(T.childNodes.length>z)T=T.childNodes[z],z=0;else if(T.childNodes.length===z)T=T.lastChild,z=T instanceof Text?T.data.length:T.childNodes.length+1;else break;M.node=T,M.offset=z}),A}},{key:"rangeToNative",value:function(S){var A=this,M=S.collapsed?[S.index]:[S.index,S.index+S.length],T=[],z=this.scroll.length();return M.forEach(function(U,Q){U=Math.min(z-1,U);var K=void 0,J=A.scroll.leaf(U),B=l(J,2),L=B[0],F=B[1],H=L.position(F,Q!==0),$=l(H,2);K=$[0],F=$[1],T.push(K,F)}),T.length<2&&(T=T.concat(T)),T}},{key:"scrollIntoView",value:function(S){var A=this.lastRange;if(A!=null){var M=this.getBounds(A.index,A.length);if(M!=null){var T=this.scroll.length()-1,z=this.scroll.line(Math.min(A.index,T)),U=l(z,1),Q=U[0],K=Q;if(A.length>0){var J=this.scroll.line(Math.min(A.index+A.length,T)),B=l(J,1);K=B[0]}if(!(Q==null||K==null)){var L=S.getBoundingClientRect();M.top<L.top?S.scrollTop-=L.top-M.top:M.bottom>L.bottom&&(S.scrollTop+=M.bottom-L.bottom)}}}}},{key:"setNativeRange",value:function(S,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",S,A,M,T),!(S!=null&&(this.root.parentNode==null||S.parentNode==null||M.parentNode==null))){var U=document.getSelection();if(U!=null)if(S!=null){this.hasFocus()||this.root.focus();var Q=(this.getNativeRange()||{}).native;if(Q==null||z||S!==Q.startContainer||A!==Q.startOffset||M!==Q.endContainer||T!==Q.endOffset){S.tagName=="BR"&&(A=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode),M.tagName=="BR"&&(T=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var K=document.createRange();K.setStart(S,A),K.setEnd(M,T),U.removeAllRanges(),U.addRange(K)}}else U.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(S){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O.default.sources.API;if(typeof A=="string"&&(M=A,A=!1),y.info("setRange",S),S!=null){var T=this.rangeToNative(S);this.setNativeRange.apply(this,d(T).concat([A]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O.default.sources.USER,A=this.lastRange,M=this.getRange(),T=l(M,2),z=T[0],U=T[1];if(this.lastRange=z,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,E.default)(A,this.lastRange)){var Q;!this.composing&&U!=null&&U.native.collapsed&&U.start.node!==this.cursor.textNode&&this.cursor.restore();var K=[O.default.events.SELECTION_CHANGE,(0,_.default)(this.lastRange),(0,_.default)(A),S];if((Q=this.emitter).emit.apply(Q,[O.default.events.EDITOR_CHANGE].concat(K)),S!==O.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,K)}}}}]),D}();function R(D,x){try{x.parentNode}catch{return!1}return x instanceof Text&&(x=x.parentNode),D.contains(x)}n.Range=w,n.default=N},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function O(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&O(g.prototype,p),P&&O(g,P),g}}(),u=function O(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:O(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(0),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"insertInto",value:function(P,d){P.children.length===0?u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,P,d):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(h.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,v){E.__proto__=v}||function(E,v){for(var O in v)v.hasOwnProperty(O)&&(E[O]=v[O])};return function(E,v){k(E,v);function O(){this.constructor=E}E.prototype=v===null?Object.create(v):(O.prototype=v.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(44),c=a(30),h=a(1),b=function(k){l(E,k);function E(v){var O=k.call(this,v)||this;return O.build(),O}return E.prototype.appendChild=function(v){this.insertBefore(v)},E.prototype.attach=function(){k.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},E.prototype.build=function(){var v=this;this.children=new u.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(O){try{var g=_(O);v.insertBefore(g,v.children.head||void 0)}catch(p){if(p instanceof h.ParchmentError)return;throw p}})},E.prototype.deleteAt=function(v,O){if(v===0&&O===this.length())return this.remove();this.children.forEachAt(v,O,function(g,p,P){g.deleteAt(p,P)})},E.prototype.descendant=function(v,O){var g=this.children.find(O),p=g[0],P=g[1];return v.blotName==null&&v(p)||v.blotName!=null&&p instanceof v?[p,P]:p instanceof E?p.descendant(v,P):[null,-1]},E.prototype.descendants=function(v,O,g){O===void 0&&(O=0),g===void 0&&(g=Number.MAX_VALUE);var p=[],P=g;return this.children.forEachAt(O,g,function(d,m,y){(v.blotName==null&&v(d)||v.blotName!=null&&d instanceof v)&&p.push(d),d instanceof E&&(p=p.concat(d.descendants(v,m,P))),P-=y}),p},E.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),k.prototype.detach.call(this)},E.prototype.formatAt=function(v,O,g,p){this.children.forEachAt(v,O,function(P,d,m){P.formatAt(d,m,g,p)})},E.prototype.insertAt=function(v,O,g){var p=this.children.find(v),P=p[0],d=p[1];if(P)P.insertAt(d,O,g);else{var m=g==null?h.create("text",O):h.create(O,g);this.appendChild(m)}},E.prototype.insertBefore=function(v,O){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return v instanceof g}))throw new h.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,O)},E.prototype.length=function(){return this.children.reduce(function(v,O){return v+O.length()},0)},E.prototype.moveChildren=function(v,O){this.children.forEach(function(g){v.insertBefore(g,O)})},E.prototype.optimize=function(v){if(k.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var O=h.create(this.statics.defaultChild);this.appendChild(O),O.optimize(v)}else this.remove()},E.prototype.path=function(v,O){O===void 0&&(O=!1);var g=this.children.find(v,O),p=g[0],P=g[1],d=[[this,v]];return p instanceof E?d.concat(p.path(P,O)):(p!=null&&d.push([p,P]),d)},E.prototype.removeChild=function(v){this.children.remove(v)},E.prototype.replace=function(v){v instanceof E&&v.moveChildren(this),k.prototype.replace.call(this,v)},E.prototype.split=function(v,O){if(O===void 0&&(O=!1),!O){if(v===0)return this;if(v===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(v,this.length(),function(p,P,d){p=p.split(P,O),g.appendChild(p)}),g},E.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},E.prototype.update=function(v,O){var g=this,p=[],P=[];v.forEach(function(d){d.target===g.domNode&&d.type==="childList"&&(p.push.apply(p,d.addedNodes),P.push.apply(P,d.removedNodes))}),P.forEach(function(d){if(!(d.parentNode!=null&&d.tagName!=="IFRAME"&&document.body.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var m=h.find(d);m!=null&&(m.domNode.parentNode==null||m.domNode.parentNode===g.domNode)&&m.detach()}}),p.filter(function(d){return d.parentNode==g.domNode}).sort(function(d,m){return d===m?0:d.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(d){var m=null;d.nextSibling!=null&&(m=h.find(d.nextSibling));var y=_(d);(y.next!=m||y.next==null)&&(y.parent!=null&&y.parent.removeChild(g),g.insertBefore(y,m||void 0))})},E}(c.default);function _(k){var E=h.find(k);if(E==null)try{E=h.create(k)}catch{E=h.create(h.Scope.INLINE),[].slice.call(k.childNodes).forEach(function(O){E.domNode.appendChild(O)}),k.parentNode&&k.parentNode.replaceChild(E.domNode,k),E.attach()}return E}n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,v){E.__proto__=v}||function(E,v){for(var O in v)v.hasOwnProperty(O)&&(E[O]=v[O])};return function(E,v){k(E,v);function O(){this.constructor=E}E.prototype=v===null?Object.create(v):(O.prototype=v.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12),c=a(31),h=a(17),b=a(1),_=function(k){l(E,k);function E(v){var O=k.call(this,v)||this;return O.attributes=new c.default(O.domNode),O}return E.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},E.prototype.format=function(v,O){var g=b.query(v);g instanceof u.default?this.attributes.attribute(g,O):O&&g!=null&&(v!==this.statics.blotName||this.formats()[v]!==O)&&this.replaceWith(v,O)},E.prototype.formats=function(){var v=this.attributes.values(),O=this.statics.formats(this.domNode);return O!=null&&(v[this.statics.blotName]=O),v},E.prototype.replaceWith=function(v,O){var g=k.prototype.replaceWith.call(this,v,O);return this.attributes.copy(g),g},E.prototype.update=function(v,O){var g=this;k.prototype.update.call(this,v,O),v.some(function(p){return p.target===g.domNode&&p.type==="attributes"})&&this.attributes.build()},E.prototype.wrap=function(v,O){var g=k.prototype.wrap.call(this,v,O);return g instanceof E&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},E}(h.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var E in k)k.hasOwnProperty(E)&&(_[E]=k[E])};return function(_,k){b(_,k);function E(){this.constructor=_}_.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(30),c=a(1),h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.value=function(k){return!0},_.prototype.index=function(k,E){return this.domNode===k||this.domNode.compareDocumentPosition(k)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(E,1):-1},_.prototype.position=function(k,E){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return k>0&&(v+=1),[this.parent.domNode,v]},_.prototype.value=function(){var k;return k={},k[this.statics.blotName]=this.statics.value(this.domNode)||!0,k},_.scope=c.Scope.INLINE_BLOT,_}(u.default);n.default=h},function(t,n,a){var l=a(11),u=a(3),c={attributes:{compose:function(b,_,k){typeof b!="object"&&(b={}),typeof _!="object"&&(_={});var E=u(!0,{},_);k||(E=Object.keys(E).reduce(function(O,g){return E[g]!=null&&(O[g]=E[g]),O},{}));for(var v in b)b[v]!==void 0&&_[v]===void 0&&(E[v]=b[v]);return Object.keys(E).length>0?E:void 0},diff:function(b,_){typeof b!="object"&&(b={}),typeof _!="object"&&(_={});var k=Object.keys(b).concat(Object.keys(_)).reduce(function(E,v){return l(b[v],_[v])||(E[v]=_[v]===void 0?null:_[v]),E},{});return Object.keys(k).length>0?k:void 0},transform:function(b,_,k){if(typeof b!="object")return _;if(typeof _=="object"){if(!k)return _;var E=Object.keys(_).reduce(function(v,O){return b[O]===void 0&&(v[O]=_[O]),v},{});return Object.keys(E).length>0?E:void 0}}},iterator:function(b){return new h(b)},length:function(b){return typeof b.delete=="number"?b.delete:typeof b.retain=="number"?b.retain:typeof b.insert=="string"?b.insert.length:1}};function h(b){this.ops=b,this.index=0,this.offset=0}h.prototype.hasNext=function(){return this.peekLength()<1/0},h.prototype.next=function(b){b||(b=1/0);var _=this.ops[this.index];if(_){var k=this.offset,E=c.length(_);if(b>=E-k?(b=E-k,this.index+=1,this.offset=0):this.offset+=b,typeof _.delete=="number")return{delete:b};var v={};return _.attributes&&(v.attributes=_.attributes),typeof _.retain=="number"?v.retain=b:typeof _.insert=="string"?v.insert=_.insert.substr(k,b):v.insert=_.insert,v}else return{retain:1/0}},h.prototype.peek=function(){return this.ops[this.index]},h.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},h.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"},h.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var b=this.offset,_=this.index,k=this.next(),E=this.ops.slice(this.index);return this.offset=b,this.index=_,[k].concat(E)}else return[]},t.exports=c},function(t,n){var a=function(){function l(g,p){return p!=null&&g instanceof p}var u;try{u=Map}catch{u=function(){}}var c;try{c=Set}catch{c=function(){}}var h;try{h=Promise}catch{h=function(){}}function b(g,p,P,d,m){typeof p=="object"&&(P=p.depth,d=p.prototype,m=p.includeNonEnumerable,p=p.circular);var y=[],w=[],N=typeof Buffer<"u";typeof p>"u"&&(p=!0),typeof P>"u"&&(P=1/0);function R(D,x){if(D===null)return null;if(x===0)return D;var S,A;if(typeof D!="object")return D;if(l(D,u))S=new u;else if(l(D,c))S=new c;else if(l(D,h))S=new h(function(L,F){D.then(function(H){L(R(H,x-1))},function(H){F(R(H,x-1))})});else if(b.__isArray(D))S=[];else if(b.__isRegExp(D))S=new RegExp(D.source,O(D)),D.lastIndex&&(S.lastIndex=D.lastIndex);else if(b.__isDate(D))S=new Date(D.getTime());else{if(N&&Buffer.isBuffer(D))return Buffer.allocUnsafe?S=Buffer.allocUnsafe(D.length):S=new Buffer(D.length),D.copy(S),S;l(D,Error)?S=Object.create(D):typeof d>"u"?(A=Object.getPrototypeOf(D),S=Object.create(A)):(S=Object.create(d),A=d)}if(p){var M=y.indexOf(D);if(M!=-1)return w[M];y.push(D),w.push(S)}l(D,u)&&D.forEach(function(L,F){var H=R(F,x-1),$=R(L,x-1);S.set(H,$)}),l(D,c)&&D.forEach(function(L){var F=R(L,x-1);S.add(F)});for(var T in D){var z;A&&(z=Object.getOwnPropertyDescriptor(A,T)),!(z&&z.set==null)&&(S[T]=R(D[T],x-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(D),T=0;T<U.length;T++){var Q=U[T],K=Object.getOwnPropertyDescriptor(D,Q);K&&!K.enumerable&&!m||(S[Q]=R(D[Q],x-1),K.enumerable||Object.defineProperty(S,Q,{enumerable:!1}))}if(m)for(var J=Object.getOwnPropertyNames(D),T=0;T<J.length;T++){var B=J[T],K=Object.getOwnPropertyDescriptor(D,B);K&&K.enumerable||(S[B]=R(D[B],x-1),Object.defineProperty(S,B,{enumerable:!1}))}return S}return R(g,P)}b.clonePrototype=function(p){if(p===null)return null;var P=function(){};return P.prototype=p,new P};function _(g){return Object.prototype.toString.call(g)}b.__objToStr=_;function k(g){return typeof g=="object"&&_(g)==="[object Date]"}b.__isDate=k;function E(g){return typeof g=="object"&&_(g)==="[object Array]"}b.__isArray=E;function v(g){return typeof g=="object"&&_(g)==="[object RegExp]"}b.__isRegExp=v;function O(g){var p="";return g.global&&(p+="g"),g.ignoreCase&&(p+="i"),g.multiline&&(p+="m"),p}return b.__getRegExpFlags=O,b}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(A,M){var T=[],z=!0,U=!1,Q=void 0;try{for(var K=A[Symbol.iterator](),J;!(z=(J=K.next()).done)&&(T.push(J.value),!(M&&T.length===M));z=!0);}catch(B){U=!0,Q=B}finally{try{!z&&K.return&&K.return()}finally{if(U)throw Q}}return T}return function(A,M){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function S(A,M){for(var T=0;T<M.length;T++){var z=M[T];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(A,z.key,z)}}return function(A,M,T){return M&&S(A.prototype,M),T&&S(A,T),A}}(),c=function S(A,M,T){A===null&&(A=Function.prototype);var z=Object.getOwnPropertyDescriptor(A,M);if(z===void 0){var U=Object.getPrototypeOf(A);return U===null?void 0:S(U,M,T)}else{if("value"in z)return z.value;var Q=z.get;return Q===void 0?void 0:Q.call(T)}},h=a(0),b=y(h),_=a(8),k=y(_),E=a(4),v=y(E),O=a(16),g=y(O),p=a(13),P=y(p),d=a(25),m=y(d);function y(S){return S&&S.__esModule?S:{default:S}}function w(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function N(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function R(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}function D(S){return S instanceof v.default||S instanceof E.BlockEmbed}var x=function(S){R(A,S);function A(M,T){w(this,A);var z=N(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M));return z.emitter=T.emitter,Array.isArray(T.whitelist)&&(z.whitelist=T.whitelist.reduce(function(U,Q){return U[Q]=!0,U},{})),z.domNode.addEventListener("DOMNodeInserted",function(){}),z.optimize(),z.enable(),z}return u(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(T,z){var U=this.line(T),Q=l(U,2),K=Q[0],J=Q[1],B=this.line(T+z),L=l(B,1),F=L[0];if(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,T,z),F!=null&&K!==F&&J>0){if(K instanceof E.BlockEmbed||F instanceof E.BlockEmbed){this.optimize();return}if(K instanceof P.default){var H=K.newlineIndex(K.length(),!0);if(H>-1&&(K=K.split(H+1),K===F)){this.optimize();return}}else if(F instanceof P.default){var $=F.newlineIndex(0);$>-1&&F.split($+1)}var ee=F.children.head instanceof g.default?null:F.children.head;K.moveChildren(F,ee),K.remove()}this.optimize()}},{key:"enable",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",T)}},{key:"formatAt",value:function(T,z,U,Q){this.whitelist!=null&&!this.whitelist[U]||(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,T,z,U,Q),this.optimize())}},{key:"insertAt",value:function(T,z,U){if(!(U!=null&&this.whitelist!=null&&!this.whitelist[z])){if(T>=this.length())if(U==null||b.default.query(z,b.default.Scope.BLOCK)==null){var Q=b.default.create(this.statics.defaultChild);this.appendChild(Q),U==null&&z.endsWith(`
|
|
134
|
-
`)&&(z=z.slice(0,-1)),Q.insertAt(0,z,U)}else{var K=b.default.create(z,U);this.appendChild(K)}else c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,T,z,U);this.optimize()}}},{key:"insertBefore",value:function(T,z){if(T.statics.scope===b.default.Scope.INLINE_BLOT){var U=b.default.create(this.statics.defaultChild);U.appendChild(T),T=U}c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,T,z)}},{key:"leaf",value:function(T){return this.path(T).pop()||[null,-1]}},{key:"line",value:function(T){return T===this.length()?this.line(T-1):this.descendant(D,T)}},{key:"lines",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,U=function Q(K,J,B){var L=[],F=B;return K.children.forEachAt(J,B,function(H,$,ee){D(H)?L.push(H):H instanceof b.default.Container&&(L=L.concat(Q(H,$,F))),F-=ee}),L};return U(this,T,z)}},{key:"optimize",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,T,z),T.length>0&&this.emitter.emit(k.default.events.SCROLL_OPTIMIZE,T,z))}},{key:"path",value:function(T){return c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,T).slice(1)}},{key:"update",value:function(T){if(this.batch!==!0){var z=k.default.sources.USER;typeof T=="string"&&(z=T),Array.isArray(T)||(T=this.observer.takeRecords()),T.length>0&&this.emitter.emit(k.default.events.SCROLL_BEFORE_UPDATE,z,T),c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,T.concat([])),T.length>0&&this.emitter.emit(k.default.events.SCROLL_UPDATE,z,T)}}}]),A}(b.default.Scroll);x.blotName="scroll",x.className="ql-editor",x.tagName="DIV",x.defaultChild="block",x.allowedChildren=[v.default,E.BlockEmbed,m.default],n.default=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},u=function(){function X(Y,te){var re=[],ie=!0,ae=!1,ue=void 0;try{for(var de=Y[Symbol.iterator](),pe;!(ie=(pe=de.next()).done)&&(re.push(pe.value),!(te&&re.length===te));ie=!0);}catch(Oe){ae=!0,ue=Oe}finally{try{!ie&&de.return&&de.return()}finally{if(ae)throw ue}}return re}return function(Y,te){if(Array.isArray(Y))return Y;if(Symbol.iterator in Object(Y))return X(Y,te);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function X(Y,te){for(var re=0;re<te.length;re++){var ie=te[re];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(Y,ie.key,ie)}}return function(Y,te,re){return te&&X(Y.prototype,te),re&&X(Y,re),Y}}(),h=a(21),b=S(h),_=a(11),k=S(_),E=a(3),v=S(E),O=a(2),g=S(O),p=a(20),P=S(p),d=a(0),m=S(d),y=a(5),w=S(y),N=a(10),R=S(N),D=a(9),x=S(D);function S(X){return X&&X.__esModule?X:{default:X}}function A(X,Y,te){return Y in X?Object.defineProperty(X,Y,{value:te,enumerable:!0,configurable:!0,writable:!0}):X[Y]=te,X}function M(X,Y){if(!(X instanceof Y))throw new TypeError("Cannot call a class as a function")}function T(X,Y){if(!X)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y&&(typeof Y=="object"||typeof Y=="function")?Y:X}function z(X,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Y);X.prototype=Object.create(Y&&Y.prototype,{constructor:{value:X,enumerable:!1,writable:!0,configurable:!0}}),Y&&(Object.setPrototypeOf?Object.setPrototypeOf(X,Y):X.__proto__=Y)}var U=(0,R.default)("quill:keyboard"),Q=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",K=function(X){z(Y,X),c(Y,null,[{key:"match",value:function(re,ie){return ie=V(ie),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ae){return!!ie[ae]!==re[ae]&&ie[ae]!==null})?!1:ie.key===(re.which||re.keyCode)}}]);function Y(te,re){M(this,Y);var ie=T(this,(Y.__proto__||Object.getPrototypeOf(Y)).call(this,te,re));return ie.bindings={},Object.keys(ie.options.bindings).forEach(function(ae){ae==="list autofill"&&te.scroll.whitelist!=null&&!te.scroll.whitelist.list||ie.options.bindings[ae]&&ie.addBinding(ie.options.bindings[ae])}),ie.addBinding({key:Y.keys.ENTER,shiftKey:null},H),ie.addBinding({key:Y.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!0},B),ie.addBinding({key:Y.keys.DELETE},{collapsed:!0},L)):(ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},B),ie.addBinding({key:Y.keys.DELETE},{collapsed:!0,suffix:/^.?$/},L)),ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!1},F),ie.addBinding({key:Y.keys.DELETE},{collapsed:!1},F),ie.addBinding({key:Y.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},B),ie.listen(),ie}return c(Y,[{key:"addBinding",value:function(re){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ue=V(re);if(ue==null||ue.key==null)return U.warn("Attempted to add invalid keyboard binding",ue);typeof ie=="function"&&(ie={handler:ie}),typeof ae=="function"&&(ae={handler:ae}),ue=(0,v.default)(ue,ie,ae),this.bindings[ue.key]=this.bindings[ue.key]||[],this.bindings[ue.key].push(ue)}},{key:"listen",value:function(){var re=this;this.quill.root.addEventListener("keydown",function(ie){if(!ie.defaultPrevented){var ae=ie.which||ie.keyCode,ue=(re.bindings[ae]||[]).filter(function(He){return Y.match(ie,He)});if(ue.length!==0){var de=re.quill.getSelection();if(!(de==null||!re.quill.hasFocus())){var pe=re.quill.getLine(de.index),Oe=u(pe,2),_e=Oe[0],Le=Oe[1],fe=re.quill.getLeaf(de.index),ge=u(fe,2),Ce=ge[0],Ae=ge[1],se=de.length===0?[Ce,Ae]:re.quill.getLeaf(de.index+de.length),me=u(se,2),xe=me[0],Ne=me[1],ct=Ce instanceof m.default.Text?Ce.value().slice(0,Ae):"",at=xe instanceof m.default.Text?xe.value().slice(Ne):"",De={collapsed:de.length===0,empty:de.length===0&&_e.length()<=1,format:re.quill.getFormat(de),offset:Le,prefix:ct,suffix:at},Fe=ue.some(function(He){if(He.collapsed!=null&&He.collapsed!==De.collapsed||He.empty!=null&&He.empty!==De.empty||He.offset!=null&&He.offset!==De.offset)return!1;if(Array.isArray(He.format)){if(He.format.every(function(Xe){return De.format[Xe]==null}))return!1}else if(l(He.format)==="object"&&!Object.keys(He.format).every(function(Xe){return He.format[Xe]===!0?De.format[Xe]!=null:He.format[Xe]===!1?De.format[Xe]==null:(0,k.default)(He.format[Xe],De.format[Xe])}))return!1;return He.prefix!=null&&!He.prefix.test(De.prefix)||He.suffix!=null&&!He.suffix.test(De.suffix)?!1:He.handler.call(re,de,De)!==!0});Fe&&ie.preventDefault()}}}})}}]),Y}(x.default);K.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},K.DEFAULTS={bindings:{bold:ee("bold"),italic:ee("italic"),underline:ee("underline"),indent:{key:K.keys.TAB,format:["blockquote","indent","list"],handler:function(Y,te){if(te.collapsed&&te.offset!==0)return!0;this.quill.format("indent","+1",w.default.sources.USER)}},outdent:{key:K.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Y,te){if(te.collapsed&&te.offset!==0)return!0;this.quill.format("indent","-1",w.default.sources.USER)}},"outdent backspace":{key:K.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Y,te){te.format.indent!=null?this.quill.format("indent","-1",w.default.sources.USER):te.format.list!=null&&this.quill.format("list",!1,w.default.sources.USER)}},"indent code-block":$(!0),"outdent code-block":$(!1),"remove tab":{key:K.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Y){this.quill.deleteText(Y.index-1,1,w.default.sources.USER)}},tab:{key:K.keys.TAB,handler:function(Y){this.quill.history.cutoff();var te=new g.default().retain(Y.index).delete(Y.length).insert(" ");this.quill.updateContents(te,w.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Y.index+1,w.default.sources.SILENT)}},"list empty enter":{key:K.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Y,te){this.quill.format("list",!1,w.default.sources.USER),te.format.indent&&this.quill.format("indent",!1,w.default.sources.USER)}},"checklist enter":{key:K.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Y){var te=this.quill.getLine(Y.index),re=u(te,2),ie=re[0],ae=re[1],ue=(0,v.default)({},ie.formats(),{list:"checked"}),de=new g.default().retain(Y.index).insert(`
|
|
135
|
-
`,ue).retain(ie.length()-ae-1).retain(1,{list:"unchecked"});this.quill.updateContents(de,w.default.sources.USER),this.quill.setSelection(Y.index+1,w.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:K.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Y,te){var re=this.quill.getLine(Y.index),ie=u(re,2),ae=ie[0],ue=ie[1],de=new g.default().retain(Y.index).insert(`
|
|
136
|
-
`,te.format).retain(ae.length()-ue-1).retain(1,{header:null});this.quill.updateContents(de,w.default.sources.USER),this.quill.setSelection(Y.index+1,w.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Y,te){var re=te.prefix.length,ie=this.quill.getLine(Y.index),ae=u(ie,2),ue=ae[0],de=ae[1];if(de>re)return!0;var pe=void 0;switch(te.prefix.trim()){case"[]":case"[ ]":pe="unchecked";break;case"[x]":pe="checked";break;case"-":case"*":pe="bullet";break;default:pe="ordered"}this.quill.insertText(Y.index," ",w.default.sources.USER),this.quill.history.cutoff();var Oe=new g.default().retain(Y.index-de).delete(re+1).retain(ue.length()-2-de).retain(1,{list:pe});this.quill.updateContents(Oe,w.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Y.index-re,w.default.sources.SILENT)}},"code exit":{key:K.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Y){var te=this.quill.getLine(Y.index),re=u(te,2),ie=re[0],ae=re[1],ue=new g.default().retain(Y.index+ie.length()-ae-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ue,w.default.sources.USER)}},"embed left":J(K.keys.LEFT,!1),"embed left shift":J(K.keys.LEFT,!0),"embed right":J(K.keys.RIGHT,!1),"embed right shift":J(K.keys.RIGHT,!0)}};function J(X,Y){var te,re=X===K.keys.LEFT?"prefix":"suffix";return te={key:X,shiftKey:Y,altKey:null},A(te,re,/^$/),A(te,"handler",function(ae){var ue=ae.index;X===K.keys.RIGHT&&(ue+=ae.length+1);var de=this.quill.getLeaf(ue),pe=u(de,1),Oe=pe[0];return Oe instanceof m.default.Embed?(X===K.keys.LEFT?Y?this.quill.setSelection(ae.index-1,ae.length+1,w.default.sources.USER):this.quill.setSelection(ae.index-1,w.default.sources.USER):Y?this.quill.setSelection(ae.index,ae.length+1,w.default.sources.USER):this.quill.setSelection(ae.index+ae.length+1,w.default.sources.USER),!1):!0}),te}function B(X,Y){if(!(X.index===0||this.quill.getLength()<=1)){var te=this.quill.getLine(X.index),re=u(te,1),ie=re[0],ae={};if(Y.offset===0){var ue=this.quill.getLine(X.index-1),de=u(ue,1),pe=de[0];if(pe!=null&&pe.length()>1){var Oe=ie.formats(),_e=this.quill.getFormat(X.index-1,1);ae=P.default.attributes.diff(Oe,_e)||{}}}var Le=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Y.prefix)?2:1;this.quill.deleteText(X.index-Le,Le,w.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(X.index-Le,Le,ae,w.default.sources.USER),this.quill.focus()}}function L(X,Y){var te=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Y.suffix)?2:1;if(!(X.index>=this.quill.getLength()-te)){var re={},ie=0,ae=this.quill.getLine(X.index),ue=u(ae,1),de=ue[0];if(Y.offset>=de.length()-1){var pe=this.quill.getLine(X.index+1),Oe=u(pe,1),_e=Oe[0];if(_e){var Le=de.formats(),fe=this.quill.getFormat(X.index,1);re=P.default.attributes.diff(Le,fe)||{},ie=_e.length()}}this.quill.deleteText(X.index,te,w.default.sources.USER),Object.keys(re).length>0&&this.quill.formatLine(X.index+ie-1,te,re,w.default.sources.USER)}}function F(X){var Y=this.quill.getLines(X),te={};if(Y.length>1){var re=Y[0].formats(),ie=Y[Y.length-1].formats();te=P.default.attributes.diff(ie,re)||{}}this.quill.deleteText(X,w.default.sources.USER),Object.keys(te).length>0&&this.quill.formatLine(X.index,1,te,w.default.sources.USER),this.quill.setSelection(X.index,w.default.sources.SILENT),this.quill.focus()}function H(X,Y){var te=this;X.length>0&&this.quill.scroll.deleteAt(X.index,X.length);var re=Object.keys(Y.format).reduce(function(ie,ae){return m.default.query(ae,m.default.Scope.BLOCK)&&!Array.isArray(Y.format[ae])&&(ie[ae]=Y.format[ae]),ie},{});this.quill.insertText(X.index,`
|
|
137
|
-
`,re,w.default.sources.USER),this.quill.setSelection(X.index+1,w.default.sources.SILENT),this.quill.focus(),Object.keys(Y.format).forEach(function(ie){re[ie]==null&&(Array.isArray(Y.format[ie])||ie!=="link"&&te.quill.format(ie,Y.format[ie],w.default.sources.USER))})}function $(X){return{key:K.keys.TAB,shiftKey:!X,format:{"code-block":!0},handler:function(te){var re=m.default.query("code-block"),ie=te.index,ae=te.length,ue=this.quill.scroll.descendant(re,ie),de=u(ue,2),pe=de[0],Oe=de[1];if(pe!=null){var _e=this.quill.getIndex(pe),Le=pe.newlineIndex(Oe,!0)+1,fe=pe.newlineIndex(_e+Oe+ae),ge=pe.domNode.textContent.slice(Le,fe).split(`
|
|
138
|
-
`);Oe=0,ge.forEach(function(Ce,Ae){X?(pe.insertAt(Le+Oe,re.TAB),Oe+=re.TAB.length,Ae===0?ie+=re.TAB.length:ae+=re.TAB.length):Ce.startsWith(re.TAB)&&(pe.deleteAt(Le+Oe,re.TAB.length),Oe-=re.TAB.length,Ae===0?ie-=re.TAB.length:ae-=re.TAB.length),Oe+=Ce.length+1}),this.quill.update(w.default.sources.USER),this.quill.setSelection(ie,ae,w.default.sources.SILENT)}}}}function ee(X){return{key:X[0].toUpperCase(),shortKey:!0,handler:function(te,re){this.quill.format(X,!re.format[X],w.default.sources.USER)}}}function V(X){if(typeof X=="string"||typeof X=="number")return V({key:X});if((typeof X>"u"?"undefined":l(X))==="object"&&(X=(0,b.default)(X,!1)),typeof X.key=="string")if(K.keys[X.key.toUpperCase()]!=null)X.key=K.keys[X.key.toUpperCase()];else if(X.key.length===1)X.key=X.key.toUpperCase().charCodeAt(0);else return null;return X.shortKey&&(X[Q]=X.shortKey,delete X.shortKey),X}n.default=K,n.SHORTKEY=Q},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function P(d,m){var y=[],w=!0,N=!1,R=void 0;try{for(var D=d[Symbol.iterator](),x;!(w=(x=D.next()).done)&&(y.push(x.value),!(m&&y.length===m));w=!0);}catch(S){N=!0,R=S}finally{try{!w&&D.return&&D.return()}finally{if(N)throw R}}return y}return function(d,m){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return P(d,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var N=Object.getPrototypeOf(d);return N===null?void 0:P(N,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),h=a(0),b=E(h),_=a(7),k=E(_);function E(P){return P&&P.__esModule?P:{default:P}}function v(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function O(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function g(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var p=function(P){g(d,P),c(d,null,[{key:"value",value:function(){}}]);function d(m,y){v(this,d);var w=O(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,m));return w.selection=y,w.textNode=document.createTextNode(d.CONTENTS),w.domNode.appendChild(w.textNode),w._length=0,w}return c(d,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,w){if(this._length!==0)return u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"format",this).call(this,y,w);for(var N=this,R=0;N!=null&&N.statics.scope!==b.default.Scope.BLOCK_BLOT;)R+=N.offset(N.parent),N=N.parent;N!=null&&(this._length=d.CONTENTS.length,N.optimize(),N.formatAt(R,d.CONTENTS.length,y,w),this._length=0)}},{key:"index",value:function(y,w){return y===this.textNode?0:u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,w)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,w=this.selection.getNativeRange(),N=void 0,R=void 0,D=void 0;if(w!=null&&w.start.node===y&&w.end.node===y){var x=[y,w.start.offset,w.end.offset];N=x[0],R=x[1],D=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!==d.CONTENTS){var S=this.textNode.data.split(d.CONTENTS).join("");this.next instanceof k.default?(N=this.next.domNode,this.next.insertAt(0,S),this.textNode.data=d.CONTENTS):(this.textNode.data=S,this.parent.insertBefore(b.default.create(this.textNode),this),this.textNode=document.createTextNode(d.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),R!=null){var A=[R,D].map(function(T){return Math.max(0,Math.min(N.data.length,T-1))}),M=l(A,2);return R=M[0],D=M[1],{startNode:N,startOffset:R,endNode:N,endOffset:D}}}}},{key:"update",value:function(y,w){var N=this;if(y.some(function(D){return D.type==="characterData"&&D.target===N.textNode})){var R=this.restore();R&&(w.range=R)}}},{key:"value",value:function(){return""}}]),d}(b.default.Embed);p.blotName="cursor",p.className="ql-cursor",p.tagName="span",p.CONTENTS="\uFEFF",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=b(l),c=a(4),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(u.default.Container);v.allowedChildren=[h.default,c.BlockEmbed,v],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var N=y.get;return N===void 0?void 0:N.call(m)}},c=a(0),h=b(c);function b(p){return p&&p.__esModule?p:{default:p}}function _(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function k(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function E(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var v=function(p){E(P,p);function P(){return _(this,P),k(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"value",value:function(m){var y=u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"value",this).call(this,m);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(w){return("00"+parseInt(w).toString(16)).slice(-2)}).join("")):y}}]),P}(h.default.Attributor.Style),O=new h.default.Attributor.Class("color","ql-color",{scope:h.default.Scope.INLINE}),g=new v("color","color",{scope:h.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=O,n.ColorStyle=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var l=function(){function g(p,P){for(var d=0;d<P.length;d++){var m=P[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,P,d){return P&&g(p.prototype,P),d&&g(p,d),p}}(),u=function g(p,P,d){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,P);if(m===void 0){var y=Object.getPrototypeOf(p);return y===null?void 0:g(y,P,d)}else{if("value"in m)return m.value;var w=m.get;return w===void 0?void 0:w.call(d)}},c=a(6),h=b(c);function b(g){return g&&g.__esModule?g:{default:g}}function _(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function k(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function E(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var v=function(g){E(p,g);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"format",value:function(d,m){if(d!==this.statics.blotName||!m)return u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,d,m);m=this.constructor.sanitize(m),this.domNode.setAttribute("href",m)}}],[{key:"create",value:function(d){var m=u(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,d);return d=this.sanitize(d),m.setAttribute("href",d),m.setAttribute("rel","noopener noreferrer"),m.setAttribute("target","_blank"),m}},{key:"formats",value:function(d){return d.getAttribute("href")}},{key:"sanitize",value:function(d){return O(d,this.PROTOCOL_WHITELIST)?d:this.SANITIZED_URL}}]),p}(h.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function O(g,p){var P=document.createElement("a");P.href=g;var d=P.href.slice(0,P.href.indexOf(":"));return p.indexOf(d)>-1}n.default=v,n.sanitize=O},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),c=a(23),h=k(c),b=a(107),_=k(b);function k(p){return p&&p.__esModule?p:{default:p}}function E(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}var v=0;function O(p,P){p.setAttribute(P,p.getAttribute(P)!=="true")}var g=function(){function p(P){var d=this;E(this,p),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(){d.togglePicker()}),this.label.addEventListener("keydown",function(m){switch(m.keyCode){case h.default.keys.ENTER:d.togglePicker();break;case h.default.keys.ESCAPE:d.escape(),m.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return u(p,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),O(this.label,"aria-expanded"),O(this.options,"aria-hidden")}},{key:"buildItem",value:function(d){var m=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),d.hasAttribute("value")&&y.setAttribute("data-value",d.getAttribute("value")),d.textContent&&y.setAttribute("data-label",d.textContent),y.addEventListener("click",function(){m.selectItem(y,!0)}),y.addEventListener("keydown",function(w){switch(w.keyCode){case h.default.keys.ENTER:m.selectItem(y,!0),w.preventDefault();break;case h.default.keys.ESCAPE:m.escape(),w.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var d=document.createElement("span");return d.classList.add("ql-picker-label"),d.innerHTML=_.default,d.tabIndex="0",d.setAttribute("role","button"),d.setAttribute("aria-expanded","false"),this.container.appendChild(d),d}},{key:"buildOptions",value:function(){var d=this,m=document.createElement("span");m.classList.add("ql-picker-options"),m.setAttribute("aria-hidden","true"),m.tabIndex="-1",m.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",m.id),this.options=m,[].slice.call(this.select.options).forEach(function(y){var w=d.buildItem(y);m.appendChild(w),y.selected===!0&&d.selectItem(w)}),this.container.appendChild(m)}},{key:"buildPicker",value:function(){var d=this;[].slice.call(this.select.attributes).forEach(function(m){d.container.setAttribute(m.name,m.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var d=this;this.close(),setTimeout(function(){return d.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(d){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(d!==y&&(y!=null&&y.classList.remove("ql-selected"),d!=null&&(d.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(d.parentNode.children,d),d.hasAttribute("data-value")?this.label.setAttribute("data-value",d.getAttribute("data-value")):this.label.removeAttribute("data-value"),d.hasAttribute("data-label")?this.label.setAttribute("data-label",d.getAttribute("data-label")):this.label.removeAttribute("data-label"),m))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":l(Event))==="object"){var w=document.createEvent("Event");w.initEvent("change",!0,!0),this.select.dispatchEvent(w)}this.close()}}},{key:"update",value:function(){var d=void 0;if(this.select.selectedIndex>-1){var m=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];d=this.select.options[this.select.selectedIndex],this.selectItem(m)}else this.selectItem(null);var y=d!=null&&d!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),p}();n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=U(l),c=a(5),h=U(c),b=a(4),_=U(b),k=a(16),E=U(k),v=a(25),O=U(v),g=a(24),p=U(g),P=a(35),d=U(P),m=a(6),y=U(m),w=a(22),N=U(w),R=a(7),D=U(R),x=a(55),S=U(x),A=a(42),M=U(A),T=a(23),z=U(T);function U(Q){return Q&&Q.__esModule?Q:{default:Q}}h.default.register({"blots/block":_.default,"blots/block/embed":b.BlockEmbed,"blots/break":E.default,"blots/container":O.default,"blots/cursor":p.default,"blots/embed":d.default,"blots/inline":y.default,"blots/scroll":N.default,"blots/text":D.default,"modules/clipboard":S.default,"modules/history":M.default,"modules/keyboard":z.default}),u.default.register(_.default,E.default,p.default,y.default,N.default,D.default),n.default=h.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(h){this.domNode=h,this.domNode[l.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(h){if(this.tagName==null)throw new l.ParchmentError("Blot definition missing tagName");var b;return Array.isArray(this.tagName)?(typeof h=="string"&&(h=h.toUpperCase(),parseInt(h).toString()===h&&(h=parseInt(h))),typeof h=="number"?b=document.createElement(this.tagName[h-1]):this.tagName.indexOf(h)>-1?b=document.createElement(h):b=document.createElement(this.tagName[0])):b=document.createElement(this.tagName),this.className&&b.classList.add(this.className),b},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var h=this.domNode.cloneNode(!1);return l.create(h)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[l.DATA_KEY]},c.prototype.deleteAt=function(h,b){var _=this.isolate(h,b);_.remove()},c.prototype.formatAt=function(h,b,_,k){var E=this.isolate(h,b);if(l.query(_,l.Scope.BLOT)!=null&&k)E.wrap(_,k);else if(l.query(_,l.Scope.ATTRIBUTE)!=null){var v=l.create(this.statics.scope);E.wrap(v),v.format(_,k)}},c.prototype.insertAt=function(h,b,_){var k=_==null?l.create("text",b):l.create(b,_),E=this.split(h);this.parent.insertBefore(k,E)},c.prototype.insertInto=function(h,b){b===void 0&&(b=null),this.parent!=null&&this.parent.children.remove(this);var _=null;h.children.insertBefore(this,b),b!=null&&(_=b.domNode),(this.domNode.parentNode!=h.domNode||this.domNode.nextSibling!=_)&&h.domNode.insertBefore(this.domNode,_),this.parent=h,this.attach()},c.prototype.isolate=function(h,b){var _=this.split(h);return _.split(b),_},c.prototype.length=function(){return 1},c.prototype.offset=function(h){return h===void 0&&(h=this.parent),this.parent==null||this==h?0:this.parent.children.offset(this)+this.parent.offset(h)},c.prototype.optimize=function(h){this.domNode[l.DATA_KEY]!=null&&delete this.domNode[l.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(h){h.parent!=null&&(h.parent.insertBefore(this,h.next),h.remove())},c.prototype.replaceWith=function(h,b){var _=typeof h=="string"?l.create(h,b):h;return _.replace(this),_},c.prototype.split=function(h,b){return h===0?this:this.next},c.prototype.update=function(h,b){},c.prototype.wrap=function(h,b){var _=typeof h=="string"?l.create(h,b):h;return this.parent!=null&&this.parent.insertBefore(_,this.next),_.appendChild(this),_},c.blotName="abstract",c}();n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(12),u=a(32),c=a(33),h=a(1),b=function(){function _(k){this.attributes={},this.domNode=k,this.build()}return _.prototype.attribute=function(k,E){E?k.add(this.domNode,E)&&(k.value(this.domNode)!=null?this.attributes[k.attrName]=k:delete this.attributes[k.attrName]):(k.remove(this.domNode),delete this.attributes[k.attrName])},_.prototype.build=function(){var k=this;this.attributes={};var E=l.default.keys(this.domNode),v=u.default.keys(this.domNode),O=c.default.keys(this.domNode);E.concat(v).concat(O).forEach(function(g){var p=h.query(g,h.Scope.ATTRIBUTE);p instanceof l.default&&(k.attributes[p.attrName]=p)})},_.prototype.copy=function(k){var E=this;Object.keys(this.attributes).forEach(function(v){var O=E.attributes[v].value(E.domNode);k.format(v,O)})},_.prototype.move=function(k){var E=this;this.copy(k),Object.keys(this.attributes).forEach(function(v){E.attributes[v].remove(E.domNode)}),this.attributes={}},_.prototype.values=function(){var k=this;return Object.keys(this.attributes).reduce(function(E,v){return E[v]=k.attributes[v].value(k.domNode),E},{})},_}();n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var E in k)k.hasOwnProperty(E)&&(_[E]=k[E])};return function(_,k){b(_,k);function E(){this.constructor=_}_.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(b,_){var k=b.getAttribute("class")||"";return k.split(/\s+/).filter(function(E){return E.indexOf(_+"-")===0})}var h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("class")||"").split(/\s+/).map(function(E){return E.split("-").slice(0,-1).join("-")})},_.prototype.add=function(k,E){return this.canAdd(k,E)?(this.remove(k),k.classList.add(this.keyName+"-"+E),!0):!1},_.prototype.remove=function(k){var E=c(k,this.keyName);E.forEach(function(v){k.classList.remove(v)}),k.classList.length===0&&k.removeAttribute("class")},_.prototype.value=function(k){var E=c(k,this.keyName)[0]||"",v=E.slice(this.keyName.length+1);return this.canAdd(k,v)?v:""},_}(u.default);n.default=h},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var E in k)k.hasOwnProperty(E)&&(_[E]=k[E])};return function(_,k){b(_,k);function E(){this.constructor=_}_.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(b){var _=b.split("-"),k=_.slice(1).map(function(E){return E[0].toUpperCase()+E.slice(1)}).join("");return _[0]+k}var h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("style")||"").split(";").map(function(E){var v=E.split(":");return v[0].trim()})},_.prototype.add=function(k,E){return this.canAdd(k,E)?(k.style[c(this.keyName)]=E,!0):!1},_.prototype.remove=function(k){k.style[c(this.keyName)]="",k.getAttribute("style")||k.removeAttribute("style")},_.prototype.value=function(k){var E=k.style[c(this.keyName)];return this.canAdd(k,E)?E:""},_}(u.default);n.default=h},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(b,_){for(var k=0;k<_.length;k++){var E=_[k];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,_,k){return _&&h(b.prototype,_),k&&h(b,k),b}}();function u(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function h(b,_){u(this,h),this.quill=b,this.options=_,this.modules={}}return l(h,[{key:"init",value:function(){var _=this;Object.keys(this.options.modules).forEach(function(k){_.modules[k]==null&&_.addModule(k)})}},{key:"addModule",value:function(_){var k=this.quill.constructor.import("modules/"+_);return this.modules[_]=new k(this.quill,this.options.modules[_]||{}),this.modules[_]}}]),h}();c.DEFAULTS={modules:{}},c.themes={default:c},n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var N=Object.getPrototypeOf(d);return N===null?void 0:P(N,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=a(0),h=k(c),b=a(7),_=k(b);function k(P){return P&&P.__esModule?P:{default:P}}function E(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function v(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function O(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var g="\uFEFF",p=function(P){O(d,P);function d(m){E(this,d);var y=v(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,m));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(w){y.contentNode.appendChild(w)}),y.leftGuard=document.createTextNode(g),y.rightGuard=document.createTextNode(g),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return l(d,[{key:"index",value:function(y,w){return y===this.leftGuard?0:y===this.rightGuard?1:u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,w)}},{key:"restore",value:function(y){var w=void 0,N=void 0,R=y.data.split(g).join("");if(y===this.leftGuard)if(this.prev instanceof _.default){var D=this.prev.length();this.prev.insertAt(D,R),w={startNode:this.prev.domNode,startOffset:D+R.length}}else N=document.createTextNode(R),this.parent.insertBefore(h.default.create(N),this),w={startNode:N,startOffset:R.length};else y===this.rightGuard&&(this.next instanceof _.default?(this.next.insertAt(0,R),w={startNode:this.next.domNode,startOffset:R.length}):(N=document.createTextNode(R),this.parent.insertBefore(h.default.create(N),this.next),w={startNode:N,startOffset:R.length}));return y.data=g,w}},{key:"update",value:function(y,w){var N=this;y.forEach(function(R){if(R.type==="characterData"&&(R.target===N.leftGuard||R.target===N.rightGuard)){var D=N.restore(R.target);D&&(w.range=D)}})}}]),d}(h.default.Embed);n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var l=a(0),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}var h={scope:u.default.Scope.BLOCK,whitelist:["right","center","justify"]},b=new u.default.Attributor.Attribute("align","align",h),_=new u.default.Attributor.Class("align","ql-align",h),k=new u.default.Attributor.Style("align","text-align",h);n.AlignAttribute=b,n.AlignClass=_,n.AlignStyle=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var l=a(0),u=h(l),c=a(26);function h(k){return k&&k.__esModule?k:{default:k}}var b=new u.default.Attributor.Class("background","ql-bg",{scope:u.default.Scope.INLINE}),_=new c.ColorAttributor("background","background-color",{scope:u.default.Scope.INLINE});n.BackgroundClass=b,n.BackgroundStyle=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var l=a(0),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}var h={scope:u.default.Scope.BLOCK,whitelist:["rtl"]},b=new u.default.Attributor.Attribute("direction","dir",h),_=new u.default.Attributor.Class("direction","ql-direction",h),k=new u.default.Attributor.Style("direction","direction",h);n.DirectionAttribute=b,n.DirectionClass=_,n.DirectionStyle=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var l=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var N=Object.getPrototypeOf(d);return N===null?void 0:P(N,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=a(0),h=b(c);function b(P){return P&&P.__esModule?P:{default:P}}function _(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function k(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function E(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var v={scope:h.default.Scope.INLINE,whitelist:["serif","monospace"]},O=new h.default.Attributor.Class("font","ql-font",v),g=function(P){E(d,P);function d(){return _(this,d),k(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return l(d,[{key:"value",value:function(y){return u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),d}(h.default.Attributor.Style),p=new g("font","font-family",v);n.FontStyle=p,n.FontClass=O},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var l=a(0),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}var h=new u.default.Attributor.Class("size","ql-size",{scope:u.default.Scope.INLINE,whitelist:["small","large","huge"]}),b=new u.default.Attributor.Style("size","font-size",{scope:u.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=h,n.SizeStyle=b},function(t,n,a){t.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var l=function(){function m(y,w){for(var N=0;N<w.length;N++){var R=w[N];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,w,N){return w&&m(y.prototype,w),N&&m(y,N),y}}(),u=a(0),c=E(u),h=a(5),b=E(h),_=a(9),k=E(_);function E(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 O(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 g(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 p=function(m){g(y,m);function y(w,N){v(this,y);var R=O(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,w,N));return R.lastRecorded=0,R.ignoreChange=!1,R.clear(),R.quill.on(b.default.events.EDITOR_CHANGE,function(D,x,S,A){D!==b.default.events.TEXT_CHANGE||R.ignoreChange||(!R.options.userOnly||A===b.default.sources.USER?R.record(x,S):R.transform(x))}),R.quill.keyboard.addBinding({key:"Z",shortKey:!0},R.undo.bind(R)),R.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},R.redo.bind(R)),/Win/i.test(navigator.platform)&&R.quill.keyboard.addBinding({key:"Y",shortKey:!0},R.redo.bind(R)),R}return l(y,[{key:"change",value:function(N,R){if(this.stack[N].length!==0){var D=this.stack[N].pop();this.stack[R].push(D),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(D[N],b.default.sources.USER),this.ignoreChange=!1;var x=d(D[N]);this.quill.setSelection(x)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(N,R){if(N.ops.length!==0){this.stack.redo=[];var D=this.quill.getContents().diff(R),x=Date.now();if(this.lastRecorded+this.options.delay>x&&this.stack.undo.length>0){var S=this.stack.undo.pop();D=D.compose(S.undo),N=S.redo.compose(N)}else this.lastRecorded=x;this.stack.undo.push({redo:N,undo:D}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(N){this.stack.undo.forEach(function(R){R.undo=N.transform(R.undo,!0),R.redo=N.transform(R.redo,!0)}),this.stack.redo.forEach(function(R){R.undo=N.transform(R.undo,!0),R.redo=N.transform(R.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(k.default);p.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function P(m){var y=m.ops[m.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(`
|
|
139
|
-
`):y.attributes!=null?Object.keys(y.attributes).some(function(w){return c.default.query(w,c.default.Scope.BLOCK)!=null}):!1}function d(m){var y=m.reduce(function(N,R){return N+=R.delete||0,N},0),w=m.length()-y;return P(m)&&(w-=1),w}n.default=p,n.getLastChangeIndex=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var l=function(){function H($,ee){for(var V=0;V<ee.length;V++){var X=ee[V];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty($,X.key,X)}}return function($,ee,V){return ee&&H($.prototype,ee),V&&H($,V),$}}(),u=function H($,ee,V){$===null&&($=Function.prototype);var X=Object.getOwnPropertyDescriptor($,ee);if(X===void 0){var Y=Object.getPrototypeOf($);return Y===null?void 0:H(Y,ee,V)}else{if("value"in X)return X.value;var te=X.get;return te===void 0?void 0:te.call(V)}},c=a(3),h=x(c),b=a(2),_=x(b),k=a(8),E=x(k),v=a(23),O=x(v),g=a(34),p=x(g),P=a(59),d=x(P),m=a(60),y=x(m),w=a(28),N=x(w),R=a(61),D=x(R);function x(H){return H&&H.__esModule?H:{default:H}}function S(H,$){if(!(H instanceof $))throw new TypeError("Cannot call a class as a function")}function A(H,$){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $&&(typeof $=="object"||typeof $=="function")?$:H}function M(H,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof $);H.prototype=Object.create($&&$.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),$&&(Object.setPrototypeOf?Object.setPrototypeOf(H,$):H.__proto__=$)}var T=[!1,"center","right","justify"],z=["#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"],U=[!1,"serif","monospace"],Q=["1","2","3",!1],K=["small",!1,"large","huge"],J=function(H){M($,H);function $(ee,V){S(this,$);var X=A(this,($.__proto__||Object.getPrototypeOf($)).call(this,ee,V)),Y=function te(re){if(!document.body.contains(ee.root))return document.body.removeEventListener("click",te);X.tooltip!=null&&!X.tooltip.root.contains(re.target)&&document.activeElement!==X.tooltip.textbox&&!X.quill.hasFocus()&&X.tooltip.hide(),X.pickers!=null&&X.pickers.forEach(function(ie){ie.container.contains(re.target)||ie.close()})};return ee.emitter.listenDOM("click",document.body,Y),X}return l($,[{key:"addModule",value:function(V){var X=u($.prototype.__proto__||Object.getPrototypeOf($.prototype),"addModule",this).call(this,V);return V==="toolbar"&&this.extendToolbar(X),X}},{key:"buildButtons",value:function(V,X){V.forEach(function(Y){var te=Y.getAttribute("class")||"";te.split(/\s+/).forEach(function(re){if(re.startsWith("ql-")&&(re=re.slice(3),X[re]!=null))if(re==="direction")Y.innerHTML=X[re][""]+X[re].rtl;else if(typeof X[re]=="string")Y.innerHTML=X[re];else{var ie=Y.value||"";ie!=null&&X[re][ie]&&(Y.innerHTML=X[re][ie])}})})}},{key:"buildPickers",value:function(V,X){var Y=this;this.pickers=V.map(function(re){if(re.classList.contains("ql-align"))return re.querySelector("option")==null&&F(re,T),new y.default(re,X.align);if(re.classList.contains("ql-background")||re.classList.contains("ql-color")){var ie=re.classList.contains("ql-background")?"background":"color";return re.querySelector("option")==null&&F(re,z,ie==="background"?"#ffffff":"#000000"),new d.default(re,X[ie])}else return re.querySelector("option")==null&&(re.classList.contains("ql-font")?F(re,U):re.classList.contains("ql-header")?F(re,Q):re.classList.contains("ql-size")&&F(re,K)),new N.default(re)});var te=function(){Y.pickers.forEach(function(ie){ie.update()})};this.quill.on(E.default.events.EDITOR_CHANGE,te)}}]),$}(p.default);J.DEFAULTS=(0,h.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var $=this,ee=this.container.querySelector("input.ql-image[type=file]");ee==null&&(ee=document.createElement("input"),ee.setAttribute("type","file"),ee.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),ee.classList.add("ql-image"),ee.addEventListener("change",function(){if(ee.files!=null&&ee.files[0]!=null){var V=new FileReader;V.onload=function(X){var Y=$.quill.getSelection(!0);$.quill.updateContents(new _.default().retain(Y.index).delete(Y.length).insert({image:X.target.result}),E.default.sources.USER),$.quill.setSelection(Y.index+1,E.default.sources.SILENT),ee.value=""},V.readAsDataURL(ee.files[0])}}),this.container.appendChild(ee)),ee.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var B=function(H){M($,H);function $(ee,V){S(this,$);var X=A(this,($.__proto__||Object.getPrototypeOf($)).call(this,ee,V));return X.textbox=X.root.querySelector('input[type="text"]'),X.listen(),X}return l($,[{key:"listen",value:function(){var V=this;this.textbox.addEventListener("keydown",function(X){O.default.match(X,"enter")?(V.save(),X.preventDefault()):O.default.match(X,"escape")&&(V.cancel(),X.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),X!=null?this.textbox.value=X:V!==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-"+V)||""),this.root.setAttribute("data-mode",V)}},{key:"restoreFocus",value:function(){var V=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=V}},{key:"save",value:function(){var V=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var X=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",V,E.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",V,E.default.sources.USER)),this.quill.root.scrollTop=X;break}case"video":V=L(V);case"formula":{if(!V)break;var Y=this.quill.getSelection(!0);if(Y!=null){var te=Y.index+Y.length;this.quill.insertEmbed(te,this.root.getAttribute("data-mode"),V,E.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(te+1," ",E.default.sources.USER),this.quill.setSelection(te+2,E.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),$}(D.default);function L(H){var $=H.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||H.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return $?($[1]||"https")+"://www.youtube.com/embed/"+$[2]+"?showinfo=0":($=H.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?($[1]||"https")+"://player.vimeo.com/video/"+$[2]+"/":H}function F(H,$){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;$.forEach(function(V){var X=document.createElement("option");V===ee?X.setAttribute("selected","selected"):X.setAttribute("value",V),H.appendChild(X)})}n.BaseTooltip=B,n.default=J},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function u(){this.head=this.tail=null,this.length=0}return u.prototype.append=function(){for(var c=[],h=0;h<arguments.length;h++)c[h]=arguments[h];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},u.prototype.contains=function(c){for(var h,b=this.iterator();h=b();)if(h===c)return!0;return!1},u.prototype.insertBefore=function(c,h){c&&(c.next=h,h!=null?(c.prev=h.prev,h.prev!=null&&(h.prev.next=c),h.prev=c,h===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},u.prototype.offset=function(c){for(var h=0,b=this.head;b!=null;){if(b===c)return h;h+=b.length(),b=b.next}return-1},u.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},u.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var h=c;return c!=null&&(c=c.next),h}},u.prototype.find=function(c,h){h===void 0&&(h=!1);for(var b,_=this.iterator();b=_();){var k=b.length();if(c<k||h&&c===k&&(b.next==null||b.next.length()!==0))return[b,c];c-=k}return[null,0]},u.prototype.forEach=function(c){for(var h,b=this.iterator();h=b();)c(h)},u.prototype.forEachAt=function(c,h,b){if(!(h<=0))for(var _=this.find(c),k=_[0],E=_[1],v,O=c-E,g=this.iterator(k);(v=g())&&O<c+h;){var p=v.length();c>O?b(v,c-O,Math.min(h,O+p-c)):b(v,0,Math.min(p,c+h-O)),O+=p}},u.prototype.map=function(c){return this.reduce(function(h,b){return h.push(c(b)),h},[])},u.prototype.reduce=function(c,h){for(var b,_=this.iterator();b=_();)h=c(h,b);return h},u}();n.default=l},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,v){E.__proto__=v}||function(E,v){for(var O in v)v.hasOwnProperty(O)&&(E[O]=v[O])};return function(E,v){k(E,v);function O(){this.constructor=E}E.prototype=v===null?Object.create(v):(O.prototype=v.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(17),c=a(1),h={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},b=100,_=function(k){l(E,k);function E(v){var O=k.call(this,v)||this;return O.scroll=O,O.observer=new MutationObserver(function(g){O.update(g)}),O.observer.observe(O.domNode,h),O.attach(),O}return E.prototype.detach=function(){k.prototype.detach.call(this),this.observer.disconnect()},E.prototype.deleteAt=function(v,O){this.update(),v===0&&O===this.length()?this.children.forEach(function(g){g.remove()}):k.prototype.deleteAt.call(this,v,O)},E.prototype.formatAt=function(v,O,g,p){this.update(),k.prototype.formatAt.call(this,v,O,g,p)},E.prototype.insertAt=function(v,O,g){this.update(),k.prototype.insertAt.call(this,v,O,g)},E.prototype.optimize=function(v,O){var g=this;v===void 0&&(v=[]),O===void 0&&(O={}),k.prototype.optimize.call(this,O);for(var p=[].slice.call(this.observer.takeRecords());p.length>0;)v.push(p.pop());for(var P=function(w,N){N===void 0&&(N=!0),!(w==null||w===g)&&w.domNode.parentNode!=null&&(w.domNode[c.DATA_KEY].mutations==null&&(w.domNode[c.DATA_KEY].mutations=[]),N&&P(w.parent))},d=function(w){w.domNode[c.DATA_KEY]==null||w.domNode[c.DATA_KEY].mutations==null||(w instanceof u.default&&w.children.forEach(d),w.optimize(O))},m=v,y=0;m.length>0;y+=1){if(y>=b)throw new Error("[Parchment] Maximum optimize iterations reached");for(m.forEach(function(w){var N=c.find(w.target,!0);N!=null&&(N.domNode===w.target&&(w.type==="childList"?(P(c.find(w.previousSibling,!1)),[].forEach.call(w.addedNodes,function(R){var D=c.find(R,!1);P(D,!1),D instanceof u.default&&D.children.forEach(function(x){P(x,!1)})})):w.type==="attributes"&&P(N.prev)),P(N))}),this.children.forEach(d),m=[].slice.call(this.observer.takeRecords()),p=m.slice();p.length>0;)v.push(p.pop())}},E.prototype.update=function(v,O){var g=this;O===void 0&&(O={}),v=v||this.observer.takeRecords(),v.map(function(p){var P=c.find(p.target,!0);return P==null?null:P.domNode[c.DATA_KEY].mutations==null?(P.domNode[c.DATA_KEY].mutations=[p],P):(P.domNode[c.DATA_KEY].mutations.push(p),null)}).forEach(function(p){p==null||p===g||p.domNode[c.DATA_KEY]==null||p.update(p.domNode[c.DATA_KEY].mutations||[],O)}),this.domNode[c.DATA_KEY].mutations!=null&&k.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,O),this.optimize(v,O)},E.blotName="scroll",E.defaultChild="block",E.scope=c.Scope.BLOCK_BLOT,E.tagName="DIV",E}(u.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,E){k.__proto__=E}||function(k,E){for(var v in E)E.hasOwnProperty(v)&&(k[v]=E[v])};return function(k,E){_(k,E);function v(){this.constructor=k}k.prototype=E===null?Object.create(E):(v.prototype=E.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1);function h(_,k){if(Object.keys(_).length!==Object.keys(k).length)return!1;for(var E in _)if(_[E]!==k[E])return!1;return!0}var b=function(_){l(k,_);function k(){return _!==null&&_.apply(this,arguments)||this}return k.formats=function(E){if(E.tagName!==k.tagName)return _.formats.call(this,E)},k.prototype.format=function(E,v){var O=this;E===this.statics.blotName&&!v?(this.children.forEach(function(g){g instanceof u.default||(g=g.wrap(k.blotName,!0)),O.attributes.copy(g)}),this.unwrap()):_.prototype.format.call(this,E,v)},k.prototype.formatAt=function(E,v,O,g){if(this.formats()[O]!=null||c.query(O,c.Scope.ATTRIBUTE)){var p=this.isolate(E,v);p.format(O,g)}else _.prototype.formatAt.call(this,E,v,O,g)},k.prototype.optimize=function(E){_.prototype.optimize.call(this,E);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var O=this.next;O instanceof k&&O.prev===this&&h(v,O.formats())&&(O.moveChildren(this),O.remove())},k.blotName="inline",k.scope=c.Scope.INLINE_BLOT,k.tagName="SPAN",k}(u.default);n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var E in k)k.hasOwnProperty(E)&&(_[E]=k[E])};return function(_,k){b(_,k);function E(){this.constructor=_}_.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1),h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.formats=function(k){var E=c.query(_.blotName).tagName;if(k.tagName!==E)return b.formats.call(this,k)},_.prototype.format=function(k,E){c.query(k,c.Scope.BLOCK)!=null&&(k===this.statics.blotName&&!E?this.replaceWith(_.blotName):b.prototype.format.call(this,k,E))},_.prototype.formatAt=function(k,E,v,O){c.query(v,c.Scope.BLOCK)!=null?this.format(v,O):b.prototype.formatAt.call(this,k,E,v,O)},_.prototype.insertAt=function(k,E,v){if(v==null||c.query(E,c.Scope.INLINE)!=null)b.prototype.insertAt.call(this,k,E,v);else{var O=this.split(k),g=c.create(E,v);O.parent.insertBefore(g,O)}},_.prototype.update=function(k,E){navigator.userAgent.match(/Trident/)?this.build():b.prototype.update.call(this,k,E)},_.blotName="block",_.scope=c.Scope.BLOCK_BLOT,_.tagName="P",_}(u.default);n.default=h},function(t,n,a){var l=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,_){b.__proto__=_}||function(b,_){for(var k in _)_.hasOwnProperty(k)&&(b[k]=_[k])};return function(b,_){h(b,_);function k(){this.constructor=b}b.prototype=_===null?Object.create(_):(k.prototype=_.prototype,new k)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=function(h){l(b,h);function b(){return h!==null&&h.apply(this,arguments)||this}return b.formats=function(_){},b.prototype.format=function(_,k){h.prototype.formatAt.call(this,0,this.length(),_,k)},b.prototype.formatAt=function(_,k,E,v){_===0&&k===this.length()?this.format(E,v):h.prototype.formatAt.call(this,_,k,E,v)},b.prototype.formats=function(){return this.statics.formats(this.domNode)},b}(u.default);n.default=c},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var E in k)k.hasOwnProperty(E)&&(_[E]=k[E])};return function(_,k){b(_,k);function E(){this.constructor=_}_.prototype=k===null?Object.create(k):(E.prototype=k.prototype,new E)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=a(1),h=function(b){l(_,b);function _(k){var E=b.call(this,k)||this;return E.text=E.statics.value(E.domNode),E}return _.create=function(k){return document.createTextNode(k)},_.value=function(k){var E=k.data;return E.normalize&&(E=E.normalize()),E},_.prototype.deleteAt=function(k,E){this.domNode.data=this.text=this.text.slice(0,k)+this.text.slice(k+E)},_.prototype.index=function(k,E){return this.domNode===k?E:-1},_.prototype.insertAt=function(k,E,v){v==null?(this.text=this.text.slice(0,k)+E+this.text.slice(k),this.domNode.data=this.text):b.prototype.insertAt.call(this,k,E,v)},_.prototype.length=function(){return this.text.length},_.prototype.optimize=function(k){b.prototype.optimize.call(this,k),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof _&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},_.prototype.position=function(k,E){return[this.domNode,k]},_.prototype.split=function(k,E){if(E===void 0&&(E=!1),!E){if(k===0)return this;if(k===this.length())return this.next}var v=c.create(this.domNode.splitText(k));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},_.prototype.update=function(k,E){var v=this;k.some(function(O){return O.type==="characterData"&&O.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},_.prototype.value=function(){return this.text},_.blotName="text",_.scope=c.Scope.INLINE_BLOT,_}(u.default);n.default=h},function(t,n,a){var l=document.createElement("div");if(l.classList.toggle("test-class",!1),l.classList.contains("test-class")){var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,h){return arguments.length>1&&!this.contains(c)==!h?h:u.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,h){return h=h||0,this.substr(h,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,h){var b=this.toString();(typeof h!="number"||!isFinite(h)||Math.floor(h)!==h||h>b.length)&&(h=b.length),h-=c.length;var _=b.indexOf(c,h);return _!==-1&&_===h}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(h){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof h!="function")throw new TypeError("predicate must be a function");for(var b=Object(this),_=b.length>>>0,k=arguments[1],E,v=0;v<_;v++)if(E=b[v],h.call(k,E,v,b))return E}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,n){var a=-1,l=1,u=0;function c(y,w,N){if(y==w)return y?[[u,y]]:[];(N<0||y.length<N)&&(N=null);var R=k(y,w),D=y.substring(0,R);y=y.substring(R),w=w.substring(R),R=E(y,w);var x=y.substring(y.length-R);y=y.substring(0,y.length-R),w=w.substring(0,w.length-R);var S=h(y,w);return D&&S.unshift([u,D]),x&&S.push([u,x]),O(S),N!=null&&(S=P(S,N)),S=d(S),S}function h(y,w){var N;if(!y)return[[l,w]];if(!w)return[[a,y]];var R=y.length>w.length?y:w,D=y.length>w.length?w:y,x=R.indexOf(D);if(x!=-1)return N=[[l,R.substring(0,x)],[u,D],[l,R.substring(x+D.length)]],y.length>w.length&&(N[0][0]=N[2][0]=a),N;if(D.length==1)return[[a,y],[l,w]];var S=v(y,w);if(S){var A=S[0],M=S[1],T=S[2],z=S[3],U=S[4],Q=c(A,T),K=c(M,z);return Q.concat([[u,U]],K)}return b(y,w)}function b(y,w){for(var N=y.length,R=w.length,D=Math.ceil((N+R)/2),x=D,S=2*D,A=new Array(S),M=new Array(S),T=0;T<S;T++)A[T]=-1,M[T]=-1;A[x+1]=0,M[x+1]=0;for(var z=N-R,U=z%2!=0,Q=0,K=0,J=0,B=0,L=0;L<D;L++){for(var F=-L+Q;F<=L-K;F+=2){var H=x+F,$;F==-L||F!=L&&A[H-1]<A[H+1]?$=A[H+1]:$=A[H-1]+1;for(var ee=$-F;$<N&&ee<R&&y.charAt($)==w.charAt(ee);)$++,ee++;if(A[H]=$,$>N)K+=2;else if(ee>R)Q+=2;else if(U){var V=x+z-F;if(V>=0&&V<S&&M[V]!=-1){var X=N-M[V];if($>=X)return _(y,w,$,ee)}}}for(var Y=-L+J;Y<=L-B;Y+=2){var V=x+Y,X;Y==-L||Y!=L&&M[V-1]<M[V+1]?X=M[V+1]:X=M[V-1]+1;for(var te=X-Y;X<N&&te<R&&y.charAt(N-X-1)==w.charAt(R-te-1);)X++,te++;if(M[V]=X,X>N)B+=2;else if(te>R)J+=2;else if(!U){var H=x+z-Y;if(H>=0&&H<S&&A[H]!=-1){var $=A[H],ee=x+$-H;if(X=N-X,$>=X)return _(y,w,$,ee)}}}}return[[a,y],[l,w]]}function _(y,w,N,R){var D=y.substring(0,N),x=w.substring(0,R),S=y.substring(N),A=w.substring(R),M=c(D,x),T=c(S,A);return M.concat(T)}function k(y,w){if(!y||!w||y.charAt(0)!=w.charAt(0))return 0;for(var N=0,R=Math.min(y.length,w.length),D=R,x=0;N<D;)y.substring(x,D)==w.substring(x,D)?(N=D,x=N):R=D,D=Math.floor((R-N)/2+N);return D}function E(y,w){if(!y||!w||y.charAt(y.length-1)!=w.charAt(w.length-1))return 0;for(var N=0,R=Math.min(y.length,w.length),D=R,x=0;N<D;)y.substring(y.length-D,y.length-x)==w.substring(w.length-D,w.length-x)?(N=D,x=N):R=D,D=Math.floor((R-N)/2+N);return D}function v(y,w){var N=y.length>w.length?y:w,R=y.length>w.length?w:y;if(N.length<4||R.length*2<N.length)return null;function D(K,J,B){for(var L=K.substring(B,B+Math.floor(K.length/4)),F=-1,H="",$,ee,V,X;(F=J.indexOf(L,F+1))!=-1;){var Y=k(K.substring(B),J.substring(F)),te=E(K.substring(0,B),J.substring(0,F));H.length<te+Y&&(H=J.substring(F-te,F)+J.substring(F,F+Y),$=K.substring(0,B-te),ee=K.substring(B+Y),V=J.substring(0,F-te),X=J.substring(F+Y))}return H.length*2>=K.length?[$,ee,V,X,H]:null}var x=D(N,R,Math.ceil(N.length/4)),S=D(N,R,Math.ceil(N.length/2)),A;if(!x&&!S)return null;S?x?A=x[4].length>S[4].length?x:S:A=S:A=x;var M,T,z,U;y.length>w.length?(M=A[0],T=A[1],z=A[2],U=A[3]):(z=A[0],U=A[1],M=A[2],T=A[3]);var Q=A[4];return[M,T,z,U,Q]}function O(y){y.push([u,""]);for(var w=0,N=0,R=0,D="",x="",S;w<y.length;)switch(y[w][0]){case l:R++,x+=y[w][1],w++;break;case a:N++,D+=y[w][1],w++;break;case u:N+R>1?(N!==0&&R!==0&&(S=k(x,D),S!==0&&(w-N-R>0&&y[w-N-R-1][0]==u?y[w-N-R-1][1]+=x.substring(0,S):(y.splice(0,0,[u,x.substring(0,S)]),w++),x=x.substring(S),D=D.substring(S)),S=E(x,D),S!==0&&(y[w][1]=x.substring(x.length-S)+y[w][1],x=x.substring(0,x.length-S),D=D.substring(0,D.length-S))),N===0?y.splice(w-R,N+R,[l,x]):R===0?y.splice(w-N,N+R,[a,D]):y.splice(w-N-R,N+R,[a,D],[l,x]),w=w-N-R+(N?1:0)+(R?1:0)+1):w!==0&&y[w-1][0]==u?(y[w-1][1]+=y[w][1],y.splice(w,1)):w++,R=0,N=0,D="",x="";break}y[y.length-1][1]===""&&y.pop();var A=!1;for(w=1;w<y.length-1;)y[w-1][0]==u&&y[w+1][0]==u&&(y[w][1].substring(y[w][1].length-y[w-1][1].length)==y[w-1][1]?(y[w][1]=y[w-1][1]+y[w][1].substring(0,y[w][1].length-y[w-1][1].length),y[w+1][1]=y[w-1][1]+y[w+1][1],y.splice(w-1,1),A=!0):y[w][1].substring(0,y[w+1][1].length)==y[w+1][1]&&(y[w-1][1]+=y[w+1][1],y[w][1]=y[w][1].substring(y[w+1][1].length)+y[w+1][1],y.splice(w+1,1),A=!0)),w++;A&&O(y)}var g=c;g.INSERT=l,g.DELETE=a,g.EQUAL=u,t.exports=g;function p(y,w){if(w===0)return[u,y];for(var N=0,R=0;R<y.length;R++){var D=y[R];if(D[0]===a||D[0]===u){var x=N+D[1].length;if(w===x)return[R+1,y];if(w<x){y=y.slice();var S=w-N,A=[D[0],D[1].slice(0,S)],M=[D[0],D[1].slice(S)];return y.splice(R,1,A,M),[R+1,y]}else N=x}}throw new Error("cursor_pos is out of bounds!")}function P(y,w){var N=p(y,w),R=N[1],D=N[0],x=R[D],S=R[D+1];if(x==null)return y;if(x[0]!==u)return y;if(S!=null&&x[1]+S[1]===S[1]+x[1])return R.splice(D,2,S,x),m(R,D,2);if(S!=null&&S[1].indexOf(x[1])===0){R.splice(D,2,[S[0],x[1]],[0,x[1]]);var A=S[1].slice(x[1].length);return A.length>0&&R.splice(D+2,0,[S[0],A]),m(R,D,3)}else return y}function d(y){for(var w=!1,N=function(S){return S.charCodeAt(0)>=56320&&S.charCodeAt(0)<=57343},R=function(S){return S.charCodeAt(S.length-1)>=55296&&S.charCodeAt(S.length-1)<=56319},D=2;D<y.length;D+=1)y[D-2][0]===u&&R(y[D-2][1])&&y[D-1][0]===a&&N(y[D-1][1])&&y[D][0]===l&&N(y[D][1])&&(w=!0,y[D-1][1]=y[D-2][1].slice(-1)+y[D-1][1],y[D][1]=y[D-2][1].slice(-1)+y[D][1],y[D-2][1]=y[D-2][1].slice(0,-1));if(!w)return y;for(var x=[],D=0;D<y.length;D+=1)y[D][1].length>0&&x.push(y[D]);return x}function m(y,w,N){for(var R=w+N-1;R>=0&&R>=w-1;R--)if(R+1<y.length){var D=y[R],x=y[R+1];D[0]===x[1]&&y.splice(R,2,[D[0],D[1]+x[1]])}return y}},function(t,n){n=t.exports=typeof Object.keys=="function"?Object.keys:a,n.shim=a;function a(l){var u=[];for(var c in l)u.push(c);return u}},function(t,n){var a=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=t.exports=a?l:u,n.supported=l;function l(c){return Object.prototype.toString.call(c)=="[object Arguments]"}n.unsupported=u;function u(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}},function(t,n){var a=Object.prototype.hasOwnProperty,l="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(l=!1));function c(b,_,k){this.fn=b,this.context=_,this.once=k||!1}function h(){this._events=new u,this._eventsCount=0}h.prototype.eventNames=function(){var _=[],k,E;if(this._eventsCount===0)return _;for(E in k=this._events)a.call(k,E)&&_.push(l?E.slice(1):E);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(k)):_},h.prototype.listeners=function(_,k){var E=l?l+_:_,v=this._events[E];if(k)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var O=0,g=v.length,p=new Array(g);O<g;O++)p[O]=v[O].fn;return p},h.prototype.emit=function(_,k,E,v,O,g){var p=l?l+_:_;if(!this._events[p])return!1;var P=this._events[p],d=arguments.length,m,y;if(P.fn){switch(P.once&&this.removeListener(_,P.fn,void 0,!0),d){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,k),!0;case 3:return P.fn.call(P.context,k,E),!0;case 4:return P.fn.call(P.context,k,E,v),!0;case 5:return P.fn.call(P.context,k,E,v,O),!0;case 6:return P.fn.call(P.context,k,E,v,O,g),!0}for(y=1,m=new Array(d-1);y<d;y++)m[y-1]=arguments[y];P.fn.apply(P.context,m)}else{var w=P.length,N;for(y=0;y<w;y++)switch(P[y].once&&this.removeListener(_,P[y].fn,void 0,!0),d){case 1:P[y].fn.call(P[y].context);break;case 2:P[y].fn.call(P[y].context,k);break;case 3:P[y].fn.call(P[y].context,k,E);break;case 4:P[y].fn.call(P[y].context,k,E,v);break;default:if(!m)for(N=1,m=new Array(d-1);N<d;N++)m[N-1]=arguments[N];P[y].fn.apply(P[y].context,m)}}return!0},h.prototype.on=function(_,k,E){var v=new c(k,E||this),O=l?l+_:_;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],v]:this._events[O].push(v):(this._events[O]=v,this._eventsCount++),this},h.prototype.once=function(_,k,E){var v=new c(k,E||this,!0),O=l?l+_:_;return this._events[O]?this._events[O].fn?this._events[O]=[this._events[O],v]:this._events[O].push(v):(this._events[O]=v,this._eventsCount++),this},h.prototype.removeListener=function(_,k,E,v){var O=l?l+_:_;if(!this._events[O])return this;if(!k)return--this._eventsCount===0?this._events=new u:delete this._events[O],this;var g=this._events[O];if(g.fn)g.fn===k&&(!v||g.once)&&(!E||g.context===E)&&(--this._eventsCount===0?this._events=new u:delete this._events[O]);else{for(var p=0,P=[],d=g.length;p<d;p++)(g[p].fn!==k||v&&!g[p].once||E&&g[p].context!==E)&&P.push(g[p]);P.length?this._events[O]=P.length===1?P[0]:P:--this._eventsCount===0?this._events=new u:delete this._events[O]}return this},h.prototype.removeAllListeners=function(_){var k;return _?(k=l?l+_:_,this._events[k]&&(--this._eventsCount===0?this._events=new u:delete this._events[k])):(this._events=new u,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prototype.setMaxListeners=function(){return this},h.prefixed=l,h.EventEmitter=h,typeof t<"u"&&(t.exports=h)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},u=function(){function fe(ge,Ce){var Ae=[],se=!0,me=!1,xe=void 0;try{for(var Ne=ge[Symbol.iterator](),ct;!(se=(ct=Ne.next()).done)&&(Ae.push(ct.value),!(Ce&&Ae.length===Ce));se=!0);}catch(at){me=!0,xe=at}finally{try{!se&&Ne.return&&Ne.return()}finally{if(me)throw xe}}return Ae}return function(ge,Ce){if(Array.isArray(ge))return ge;if(Symbol.iterator in Object(ge))return fe(ge,Ce);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function fe(ge,Ce){for(var Ae=0;Ae<Ce.length;Ae++){var se=Ce[Ae];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(ge,se.key,se)}}return function(ge,Ce,Ae){return Ce&&fe(ge.prototype,Ce),Ae&&fe(ge,Ae),ge}}(),h=a(3),b=M(h),_=a(2),k=M(_),E=a(0),v=M(E),O=a(5),g=M(O),p=a(10),P=M(p),d=a(9),m=M(d),y=a(36),w=a(37),N=a(13),R=M(N),D=a(26),x=a(38),S=a(39),A=a(40);function M(fe){return fe&&fe.__esModule?fe:{default:fe}}function T(fe,ge,Ce){return ge in fe?Object.defineProperty(fe,ge,{value:Ce,enumerable:!0,configurable:!0,writable:!0}):fe[ge]=Ce,fe}function z(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function U(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function Q(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var K=(0,P.default)("quill:clipboard"),J="__ql-matcher",B=[[Node.TEXT_NODE,Le],[Node.TEXT_NODE,pe],["br",ae],[Node.ELEMENT_NODE,pe],[Node.ELEMENT_NODE,ie],[Node.ELEMENT_NODE,Oe],[Node.ELEMENT_NODE,re],[Node.ELEMENT_NODE,_e],["li",de],["b",te.bind(te,"bold")],["i",te.bind(te,"italic")],["style",ue]],L=[y.AlignAttribute,x.DirectionAttribute].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),F=[y.AlignStyle,w.BackgroundStyle,D.ColorStyle,x.DirectionStyle,S.FontStyle,A.SizeStyle].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),H=function(fe){Q(ge,fe);function ge(Ce,Ae){z(this,ge);var se=U(this,(ge.__proto__||Object.getPrototypeOf(ge)).call(this,Ce,Ae));return se.quill.root.addEventListener("paste",se.onPaste.bind(se)),se.container=se.quill.addContainer("ql-clipboard"),se.container.setAttribute("contenteditable",!0),se.container.setAttribute("tabindex",-1),se.matchers=[],B.concat(se.options.matchers).forEach(function(me){var xe=u(me,2),Ne=xe[0],ct=xe[1];!Ae.matchVisual&&ct===Oe||se.addMatcher(Ne,ct)}),se}return c(ge,[{key:"addMatcher",value:function(Ae,se){this.matchers.push([Ae,se])}},{key:"convert",value:function(Ae){if(typeof Ae=="string")return this.container.innerHTML=Ae.replace(/\>\r?\n +\</g,"><"),this.convert();var se=this.quill.getFormat(this.quill.selection.savedRange.index);if(se[R.default.blotName]){var me=this.container.innerText;return this.container.innerHTML="",new k.default().insert(me,T({},R.default.blotName,se[R.default.blotName]))}var xe=this.prepareMatching(),Ne=u(xe,2),ct=Ne[0],at=Ne[1],De=Y(this.container,ct,at);return V(De,`
|
|
140
|
-
`)&&De.ops[De.ops.length-1].attributes==null&&(De=De.compose(new k.default().retain(De.length()-1).delete(1))),K.log("convert",this.container.innerHTML,De),this.container.innerHTML="",De}},{key:"dangerouslyPasteHTML",value:function(Ae,se){var me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof Ae=="string")this.quill.setContents(this.convert(Ae),se),this.quill.setSelection(0,g.default.sources.SILENT);else{var xe=this.convert(se);this.quill.updateContents(new k.default().retain(Ae).concat(xe),me),this.quill.setSelection(Ae+xe.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(Ae){var se=this;if(!(Ae.defaultPrevented||!this.quill.isEnabled())){var me=this.quill.getSelection(),xe=new k.default().retain(me.index),Ne=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){xe=xe.concat(se.convert()).delete(me.length),se.quill.updateContents(xe,g.default.sources.USER),se.quill.setSelection(xe.length()-me.length,g.default.sources.SILENT),se.quill.scrollingContainer.scrollTop=Ne,se.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Ae=this,se=[],me=[];return this.matchers.forEach(function(xe){var Ne=u(xe,2),ct=Ne[0],at=Ne[1];switch(ct){case Node.TEXT_NODE:me.push(at);break;case Node.ELEMENT_NODE:se.push(at);break;default:[].forEach.call(Ae.container.querySelectorAll(ct),function(De){De[J]=De[J]||[],De[J].push(at)});break}}),[se,me]}}]),ge}(m.default);H.DEFAULTS={matchers:[],matchVisual:!0};function $(fe,ge,Ce){return(typeof ge>"u"?"undefined":l(ge))==="object"?Object.keys(ge).reduce(function(Ae,se){return $(Ae,se,ge[se])},fe):fe.reduce(function(Ae,se){return se.attributes&&se.attributes[ge]?Ae.push(se):Ae.insert(se.insert,(0,b.default)({},T({},ge,Ce),se.attributes))},new k.default)}function ee(fe){if(fe.nodeType!==Node.ELEMENT_NODE)return{};var ge="__ql-computed-style";return fe[ge]||(fe[ge]=window.getComputedStyle(fe))}function V(fe,ge){for(var Ce="",Ae=fe.ops.length-1;Ae>=0&&Ce.length<ge.length;--Ae){var se=fe.ops[Ae];if(typeof se.insert!="string")break;Ce=se.insert+Ce}return Ce.slice(-1*ge.length)===ge}function X(fe){if(fe.childNodes.length===0)return!1;var ge=ee(fe);return["block","list-item"].indexOf(ge.display)>-1}function Y(fe,ge,Ce){return fe.nodeType===fe.TEXT_NODE?Ce.reduce(function(Ae,se){return se(fe,Ae)},new k.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(Ae,se){var me=Y(se,ge,Ce);return se.nodeType===fe.ELEMENT_NODE&&(me=ge.reduce(function(xe,Ne){return Ne(se,xe)},me),me=(se[J]||[]).reduce(function(xe,Ne){return Ne(se,xe)},me)),Ae.concat(me)},new k.default):new k.default}function te(fe,ge,Ce){return $(Ce,fe,!0)}function re(fe,ge){var Ce=v.default.Attributor.Attribute.keys(fe),Ae=v.default.Attributor.Class.keys(fe),se=v.default.Attributor.Style.keys(fe),me={};return Ce.concat(Ae).concat(se).forEach(function(xe){var Ne=v.default.query(xe,v.default.Scope.ATTRIBUTE);Ne!=null&&(me[Ne.attrName]=Ne.value(fe),me[Ne.attrName])||(Ne=L[xe],Ne!=null&&(Ne.attrName===xe||Ne.keyName===xe)&&(me[Ne.attrName]=Ne.value(fe)||void 0),Ne=F[xe],Ne!=null&&(Ne.attrName===xe||Ne.keyName===xe)&&(Ne=F[xe],me[Ne.attrName]=Ne.value(fe)||void 0))}),Object.keys(me).length>0&&(ge=$(ge,me)),ge}function ie(fe,ge){var Ce=v.default.query(fe);if(Ce==null)return ge;if(Ce.prototype instanceof v.default.Embed){var Ae={},se=Ce.value(fe);se!=null&&(Ae[Ce.blotName]=se,ge=new k.default().insert(Ae,Ce.formats(fe)))}else typeof Ce.formats=="function"&&(ge=$(ge,Ce.blotName,Ce.formats(fe)));return ge}function ae(fe,ge){return V(ge,`
|
|
141
|
-
`)||ge.insert(`
|
|
142
|
-
`),ge}function ue(){return new k.default}function de(fe,ge){var Ce=v.default.query(fe);if(Ce==null||Ce.blotName!=="list-item"||!V(ge,`
|
|
143
|
-
`))return ge;for(var Ae=-1,se=fe.parentNode;!se.classList.contains("ql-clipboard");)(v.default.query(se)||{}).blotName==="list"&&(Ae+=1),se=se.parentNode;return Ae<=0?ge:ge.compose(new k.default().retain(ge.length()-1).retain(1,{indent:Ae}))}function pe(fe,ge){return V(ge,`
|
|
144
|
-
`)||(X(fe)||ge.length()>0&&fe.nextSibling&&X(fe.nextSibling))&&ge.insert(`
|
|
145
|
-
`),ge}function Oe(fe,ge){if(X(fe)&&fe.nextElementSibling!=null&&!V(ge,`
|
|
146
|
-
|
|
147
|
-
`)){var Ce=fe.offsetHeight+parseFloat(ee(fe).marginTop)+parseFloat(ee(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+Ce*1.5&&ge.insert(`
|
|
148
|
-
`)}return ge}function _e(fe,ge){var Ce={},Ae=fe.style||{};return Ae.fontStyle&&ee(fe).fontStyle==="italic"&&(Ce.italic=!0),Ae.fontWeight&&(ee(fe).fontWeight.startsWith("bold")||parseInt(ee(fe).fontWeight)>=700)&&(Ce.bold=!0),Object.keys(Ce).length>0&&(ge=$(ge,Ce)),parseFloat(Ae.textIndent||0)>0&&(ge=new k.default().insert(" ").concat(ge)),ge}function Le(fe,ge){var Ce=fe.data;if(fe.parentNode.tagName==="O:P")return ge.insert(Ce.trim());if(Ce.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return ge;if(!ee(fe.parentNode).whiteSpace.startsWith("pre")){var Ae=function(me,xe){return xe=xe.replace(/[^\u00a0]/g,""),xe.length<1&&me?" ":xe};Ce=Ce.replace(/\r\n/g," ").replace(/\n/g," "),Ce=Ce.replace(/\s\s+/g,Ae.bind(Ae,!0)),(fe.previousSibling==null&&X(fe.parentNode)||fe.previousSibling!=null&&X(fe.previousSibling))&&(Ce=Ce.replace(/^\s+/,Ae.bind(Ae,!1))),(fe.nextSibling==null&&X(fe.parentNode)||fe.nextSibling!=null&&X(fe.nextSibling))&&(Ce=Ce.replace(/\s+$/,Ae.bind(Ae,!1)))}return ge.insert(Ce)}n.default=H,n.matchAttributor=re,n.matchBlot=ie,n.matchNewline=pe,n.matchSpacing=Oe,n.matchText=Le},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function O(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&O(g.prototype,p),P&&O(g,P),g}}(),u=function O(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:O(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(6),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"optimize",value:function(P){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,P),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return u(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(h.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var l=function(){function A(M,T){var z=[],U=!0,Q=!1,K=void 0;try{for(var J=M[Symbol.iterator](),B;!(U=(B=J.next()).done)&&(z.push(B.value),!(T&&z.length===T));U=!0);}catch(L){Q=!0,K=L}finally{try{!U&&J.return&&J.return()}finally{if(Q)throw K}}return z}return function(M,T){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return A(M,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function A(M,T){for(var z=0;z<T.length;z++){var U=T[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,T,z){return T&&A(M.prototype,T),z&&A(M,z),M}}(),c=a(2),h=P(c),b=a(0),_=P(b),k=a(5),E=P(k),v=a(10),O=P(v),g=a(9),p=P(g);function P(A){return A&&A.__esModule?A:{default:A}}function d(A,M,T){return M in A?Object.defineProperty(A,M,{value:T,enumerable:!0,configurable:!0,writable:!0}):A[M]=T,A}function m(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function y(A,M){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:A}function w(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var N=(0,O.default)("quill:toolbar"),R=function(A){w(M,A);function M(T,z){m(this,M);var U=y(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,T,z));if(Array.isArray(U.options.container)){var Q=document.createElement("div");x(Q,U.options.container),T.container.parentNode.insertBefore(Q,T.container),U.container=Q}else typeof U.options.container=="string"?U.container=document.querySelector(U.options.container):U.container=U.options.container;if(!(U.container instanceof HTMLElement)){var K;return K=N.error("Container required for toolbar",U.options),y(U,K)}return U.container.classList.add("ql-toolbar"),U.controls=[],U.handlers={},Object.keys(U.options.handlers).forEach(function(J){U.addHandler(J,U.options.handlers[J])}),[].forEach.call(U.container.querySelectorAll("button, select"),function(J){U.attach(J)}),U.quill.on(E.default.events.EDITOR_CHANGE,function(J,B){J===E.default.events.SELECTION_CHANGE&&U.update(B)}),U.quill.on(E.default.events.SCROLL_OPTIMIZE,function(){var J=U.quill.selection.getRange(),B=l(J,1),L=B[0];U.update(L)}),U}return u(M,[{key:"addHandler",value:function(z,U){this.handlers[z]=U}},{key:"attach",value:function(z){var U=this,Q=[].find.call(z.classList,function(J){return J.indexOf("ql-")===0});if(Q){if(Q=Q.slice(3),z.tagName==="BUTTON"&&z.setAttribute("type","button"),this.handlers[Q]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Q]==null){N.warn("ignoring attaching to disabled format",Q,z);return}if(_.default.query(Q)==null){N.warn("ignoring attaching to nonexistent format",Q,z);return}}var K=z.tagName==="SELECT"?"change":"click";z.addEventListener(K,function(J){var B=void 0;if(z.tagName==="SELECT"){if(z.selectedIndex<0)return;var L=z.options[z.selectedIndex];L.hasAttribute("selected")?B=!1:B=L.value||!1}else z.classList.contains("ql-active")?B=!1:B=z.value||!z.hasAttribute("value"),J.preventDefault();U.quill.focus();var F=U.quill.selection.getRange(),H=l(F,1),$=H[0];if(U.handlers[Q]!=null)U.handlers[Q].call(U,B);else if(_.default.query(Q).prototype instanceof _.default.Embed){if(B=prompt("Enter "+Q),!B)return;U.quill.updateContents(new h.default().retain($.index).delete($.length).insert(d({},Q,B)),E.default.sources.USER)}else U.quill.format(Q,B,E.default.sources.USER);U.update($)}),this.controls.push([Q,z])}}},{key:"update",value:function(z){var U=z==null?{}:this.quill.getFormat(z);this.controls.forEach(function(Q){var K=l(Q,2),J=K[0],B=K[1];if(B.tagName==="SELECT"){var L=void 0;if(z==null)L=null;else if(U[J]==null)L=B.querySelector("option[selected]");else if(!Array.isArray(U[J])){var F=U[J];typeof F=="string"&&(F=F.replace(/\"/g,'\\"')),L=B.querySelector('option[value="'+F+'"]')}L==null?(B.value="",B.selectedIndex=-1):L.selected=!0}else if(z==null)B.classList.remove("ql-active");else if(B.hasAttribute("value")){var H=U[J]===B.getAttribute("value")||U[J]!=null&&U[J].toString()===B.getAttribute("value")||U[J]==null&&!B.getAttribute("value");B.classList.toggle("ql-active",H)}else B.classList.toggle("ql-active",U[J]!=null)})}}]),M}(p.default);R.DEFAULTS={};function D(A,M,T){var z=document.createElement("button");z.setAttribute("type","button"),z.classList.add("ql-"+M),T!=null&&(z.value=T),A.appendChild(z)}function x(A,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(T){var z=document.createElement("span");z.classList.add("ql-formats"),T.forEach(function(U){if(typeof U=="string")D(z,U);else{var Q=Object.keys(U)[0],K=U[Q];Array.isArray(K)?S(z,Q,K):D(z,Q,K)}}),A.appendChild(z)})}function S(A,M,T){var z=document.createElement("select");z.classList.add("ql-"+M),T.forEach(function(U){var Q=document.createElement("option");U!==!1?Q.setAttribute("value",U):Q.setAttribute("selected","selected"),z.appendChild(Q)}),A.appendChild(z)}R.DEFAULTS={container:null,handlers:{clean:function(){var M=this,T=this.quill.getSelection();if(T!=null)if(T.length==0){var z=this.quill.getFormat();Object.keys(z).forEach(function(U){_.default.query(U,_.default.Scope.INLINE)!=null&&M.quill.format(U,!1)})}else this.quill.removeFormat(T,E.default.sources.USER)},direction:function(M){var T=this.quill.getFormat().align;M==="rtl"&&T==null?this.quill.format("align","right",E.default.sources.USER):!M&&T==="right"&&this.quill.format("align",!1,E.default.sources.USER),this.quill.format("direction",M,E.default.sources.USER)},indent:function(M){var T=this.quill.getSelection(),z=this.quill.getFormat(T),U=parseInt(z.indent||0);if(M==="+1"||M==="-1"){var Q=M==="+1"?1:-1;z.direction==="rtl"&&(Q*=-1),this.quill.format("indent",U+Q,E.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,E.default.sources.USER)},list:function(M){var T=this.quill.getSelection(),z=this.quill.getFormat(T);M==="check"?z.list==="checked"||z.list==="unchecked"?this.quill.format("list",!1,E.default.sources.USER):this.quill.format("list","unchecked",E.default.sources.USER):this.quill.format("list",M,E.default.sources.USER)}}},n.default=R,n.addControls=x},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function O(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&O(g.prototype,p),P&&O(g,P),g}}(),u=function O(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:O(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(28),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(p,P){_(this,g);var d=k(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,p));return d.label.innerHTML=P,d.container.classList.add("ql-color-picker"),[].slice.call(d.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(m){m.classList.add("ql-primary")}),d}return l(g,[{key:"buildItem",value:function(P){var d=u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,P);return d.style.backgroundColor=P.getAttribute("value")||"",d}},{key:"selectItem",value:function(P,d){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,P,d);var m=this.label.querySelector(".ql-color-label"),y=P&&P.getAttribute("data-value")||"";m&&(m.tagName==="line"?m.style.stroke=y:m.style.fill=y)}}]),g}(h.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function O(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&O(g.prototype,p),P&&O(g,P),g}}(),u=function O(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:O(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(28),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(p,P){_(this,g);var d=k(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,p));return d.container.classList.add("ql-icon-picker"),[].forEach.call(d.container.querySelectorAll(".ql-picker-item"),function(m){m.innerHTML=P[m.getAttribute("data-value")||""]}),d.defaultItem=d.container.querySelector(".ql-selected"),d.selectItem(d.defaultItem),d}return l(g,[{key:"selectItem",value:function(P,d){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,P,d),P=P||this.defaultItem,this.label.innerHTML=P.innerHTML}}]),g}(h.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(b,_){for(var k=0;k<_.length;k++){var E=_[k];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(b,E.key,E)}}return function(b,_,k){return _&&h(b.prototype,_),k&&h(b,k),b}}();function u(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function h(b,_){var k=this;u(this,h),this.quill=b,this.boundsContainer=_||document.body,this.root=b.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){k.root.style.marginTop=-1*k.quill.root.scrollTop+"px"}),this.hide()}return l(h,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(_){var k=_.left+_.width/2-this.root.offsetWidth/2,E=_.bottom+this.quill.root.scrollTop;this.root.style.left=k+"px",this.root.style.top=E+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),O=this.root.getBoundingClientRect(),g=0;if(O.right>v.right&&(g=v.right-O.right,this.root.style.left=k+g+"px"),O.left<v.left&&(g=v.left-O.left,this.root.style.left=k+g+"px"),O.bottom>v.bottom){var p=O.bottom-O.top,P=_.bottom-_.top+p;this.root.style.top=E-P+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),h}();n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(A,M){var T=[],z=!0,U=!1,Q=void 0;try{for(var K=A[Symbol.iterator](),J;!(z=(J=K.next()).done)&&(T.push(J.value),!(M&&T.length===M));z=!0);}catch(B){U=!0,Q=B}finally{try{!z&&K.return&&K.return()}finally{if(U)throw Q}}return T}return function(A,M){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function S(A,M,T){A===null&&(A=Function.prototype);var z=Object.getOwnPropertyDescriptor(A,M);if(z===void 0){var U=Object.getPrototypeOf(A);return U===null?void 0:S(U,M,T)}else{if("value"in z)return z.value;var Q=z.get;return Q===void 0?void 0:Q.call(T)}},c=function(){function S(A,M){for(var T=0;T<M.length;T++){var z=M[T];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(A,z.key,z)}}return function(A,M,T){return M&&S(A.prototype,M),T&&S(A,T),A}}(),h=a(3),b=m(h),_=a(8),k=m(_),E=a(43),v=m(E),O=a(27),g=m(O),p=a(15),P=a(41),d=m(P);function m(S){return S&&S.__esModule?S:{default:S}}function y(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function w(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function N(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var R=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],D=function(S){N(A,S);function A(M,T){y(this,A),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=R);var z=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M,T));return z.quill.container.classList.add("ql-snow"),z}return c(A,[{key:"extendToolbar",value:function(T){T.container.classList.add("ql-snow"),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),d.default),this.tooltip=new x(this.quill,this.options.bounds),T.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(z,U){T.handlers.link.call(T,!U.format.link)})}}]),A}(v.default);D.DEFAULTS=(0,b.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var M=this.quill.getSelection();if(M==null||M.length==0)return;var T=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(T)&&T.indexOf("mailto:")!==0&&(T="mailto:"+T);var z=this.quill.theme.tooltip;z.edit("link",T)}else this.quill.format("link",!1)}}}}});var x=function(S){N(A,S);function A(M,T){y(this,A);var z=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M,T));return z.preview=z.root.querySelector("a.ql-preview"),z}return c(A,[{key:"listen",value:function(){var T=this;u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(z){T.root.classList.contains("ql-editing")?T.save():T.edit("link",T.preview.textContent),z.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(z){if(T.linkRange!=null){var U=T.linkRange;T.restoreFocus(),T.quill.formatText(U,"link",!1,k.default.sources.USER),delete T.linkRange}z.preventDefault(),T.hide()}),this.quill.on(k.default.events.SELECTION_CHANGE,function(z,U,Q){if(z!=null){if(z.length===0&&Q===k.default.sources.USER){var K=T.quill.scroll.descendant(g.default,z.index),J=l(K,2),B=J[0],L=J[1];if(B!=null){T.linkRange=new p.Range(z.index-L,B.length());var F=g.default.formats(B.domNode);T.preview.textContent=F,T.preview.setAttribute("href",F),T.show(),T.position(T.quill.getBounds(T.linkRange));return}}else delete T.linkRange;T.hide()}})}},{key:"show",value:function(){u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A}(E.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=D},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(29),u=se(l),c=a(36),h=a(38),b=a(64),_=a(65),k=se(_),E=a(66),v=se(E),O=a(67),g=se(O),p=a(37),P=a(26),d=a(39),m=a(40),y=a(56),w=se(y),N=a(68),R=se(N),D=a(27),x=se(D),S=a(69),A=se(S),M=a(70),T=se(M),z=a(71),U=se(z),Q=a(72),K=se(Q),J=a(73),B=se(J),L=a(13),F=se(L),H=a(74),$=se(H),ee=a(75),V=se(ee),X=a(57),Y=se(X),te=a(41),re=se(te),ie=a(28),ae=se(ie),ue=a(59),de=se(ue),pe=a(60),Oe=se(pe),_e=a(61),Le=se(_e),fe=a(108),ge=se(fe),Ce=a(62),Ae=se(Ce);function se(me){return me&&me.__esModule?me:{default:me}}u.default.register({"attributors/attribute/direction":h.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":p.BackgroundClass,"attributors/class/color":P.ColorClass,"attributors/class/direction":h.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":p.BackgroundStyle,"attributors/style/color":P.ColorStyle,"attributors/style/direction":h.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":m.SizeStyle},!0),u.default.register({"formats/align":c.AlignClass,"formats/direction":h.DirectionClass,"formats/indent":b.IndentClass,"formats/background":p.BackgroundStyle,"formats/color":P.ColorStyle,"formats/font":d.FontClass,"formats/size":m.SizeClass,"formats/blockquote":k.default,"formats/code-block":F.default,"formats/header":v.default,"formats/list":g.default,"formats/bold":w.default,"formats/code":L.Code,"formats/italic":R.default,"formats/link":x.default,"formats/script":A.default,"formats/strike":T.default,"formats/underline":U.default,"formats/image":K.default,"formats/video":B.default,"formats/list/item":O.ListItem,"modules/formula":$.default,"modules/syntax":V.default,"modules/toolbar":Y.default,"themes/bubble":ge.default,"themes/snow":Ae.default,"ui/icons":re.default,"ui/picker":ae.default,"ui/icon-picker":Oe.default,"ui/color-picker":de.default,"ui/tooltip":Le.default},!0),n.default=u.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var l=function(){function g(p,P){for(var d=0;d<P.length;d++){var m=P[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,P,d){return P&&g(p.prototype,P),d&&g(p,d),p}}(),u=function g(p,P,d){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,P);if(m===void 0){var y=Object.getPrototypeOf(p);return y===null?void 0:g(y,P,d)}else{if("value"in m)return m.value;var w=m.get;return w===void 0?void 0:w.call(d)}},c=a(0),h=b(c);function b(g){return g&&g.__esModule?g:{default:g}}function _(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function k(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function E(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var v=function(g){E(p,g);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"add",value:function(d,m){if(m==="+1"||m==="-1"){var y=this.value(d)||0;m=m==="+1"?y+1:y-1}return m===0?(this.remove(d),!0):u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"add",this).call(this,d,m)}},{key:"canAdd",value:function(d,m){return u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,d,m)||u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,d,parseInt(m))}},{key:"value",value:function(d){return parseInt(u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"value",this).call(this,d))||void 0}}]),p}(h.default.Attributor.Class),O=new v("indent","ql-indent",{scope:h.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=O},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(4),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,v){if(!(E instanceof v))throw new TypeError("Cannot call a class as a function")}function b(E,v){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:E}function _(E,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);E.prototype=Object.create(v&&v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(E,v):E.__proto__=v)}var k=function(E){_(v,E);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="blockquote",k.tagName="blockquote",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function v(O,g){for(var p=0;p<g.length;p++){var P=g[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(O,P.key,P)}}return function(O,g,p){return g&&v(O.prototype,g),p&&v(O,p),O}}(),u=a(4),c=h(u);function h(v){return v&&v.__esModule?v:{default:v}}function b(v,O){if(!(v instanceof O))throw new TypeError("Cannot call a class as a function")}function _(v,O){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:v}function k(v,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);v.prototype=Object.create(O&&O.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(v,O):v.__proto__=O)}var E=function(v){k(O,v);function O(){return b(this,O),_(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return l(O,null,[{key:"formats",value:function(p){return this.tagName.indexOf(p.tagName)+1}}]),O}(c.default);E.blotName="header",E.tagName=["H1","H2","H3","H4","H5","H6"],n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var l=function(){function y(w,N){for(var R=0;R<N.length;R++){var D=N[R];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(w,D.key,D)}}return function(w,N,R){return N&&y(w.prototype,N),R&&y(w,R),w}}(),u=function y(w,N,R){w===null&&(w=Function.prototype);var D=Object.getOwnPropertyDescriptor(w,N);if(D===void 0){var x=Object.getPrototypeOf(w);return x===null?void 0:y(x,N,R)}else{if("value"in D)return D.value;var S=D.get;return S===void 0?void 0:S.call(R)}},c=a(0),h=v(c),b=a(4),_=v(b),k=a(25),E=v(k);function v(y){return y&&y.__esModule?y:{default:y}}function O(y,w,N){return w in y?Object.defineProperty(y,w,{value:N,enumerable:!0,configurable:!0,writable:!0}):y[w]=N,y}function g(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function p(y,w){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:y}function P(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(y,w):y.__proto__=w)}var d=function(y){P(w,y);function w(){return g(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return l(w,[{key:"format",value:function(R,D){R===m.blotName&&!D?this.replaceWith(h.default.create(this.statics.scope)):u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,R,D)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(R,D){return this.parent.isolate(this.offset(this.parent),this.length()),R===this.parent.statics.blotName?(this.parent.replaceWith(R,D),this):(this.parent.unwrap(),u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replaceWith",this).call(this,R,D))}}],[{key:"formats",value:function(R){return R.tagName===this.tagName?void 0:u(w.__proto__||Object.getPrototypeOf(w),"formats",this).call(this,R)}}]),w}(_.default);d.blotName="list-item",d.tagName="LI";var m=function(y){P(w,y),l(w,null,[{key:"create",value:function(R){var D=R==="ordered"?"OL":"UL",x=u(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,D);return(R==="checked"||R==="unchecked")&&x.setAttribute("data-checked",R==="checked"),x}},{key:"formats",value:function(R){if(R.tagName==="OL")return"ordered";if(R.tagName==="UL")return R.hasAttribute("data-checked")?R.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function w(N){g(this,w);var R=p(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,N)),D=function(S){if(S.target.parentNode===N){var A=R.statics.formats(N),M=h.default.find(S.target);A==="checked"?M.format("list","unchecked"):A==="unchecked"&&M.format("list","checked")}};return N.addEventListener("touchstart",D),N.addEventListener("mousedown",D),R}return l(w,[{key:"format",value:function(R,D){this.children.length>0&&this.children.tail.format(R,D)}},{key:"formats",value:function(){return O({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(R,D){if(R instanceof d)u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,R,D);else{var x=D==null?this.length():D.offset(this),S=this.split(x);S.parent.insertBefore(R,S)}}},{key:"optimize",value:function(R){u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,R);var D=this.next;D!=null&&D.prev===this&&D.statics.blotName===this.statics.blotName&&D.domNode.tagName===this.domNode.tagName&&D.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(D.moveChildren(this),D.remove())}},{key:"replace",value:function(R){if(R.statics.blotName!==this.statics.blotName){var D=h.default.create(this.statics.defaultChild);R.moveChildren(D),this.appendChild(D)}u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replace",this).call(this,R)}}]),w}(E.default);m.blotName="list",m.scope=h.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[d],n.ListItem=d,n.default=m},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(56),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,v){if(!(E instanceof v))throw new TypeError("Cannot call a class as a function")}function b(E,v){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:E}function _(E,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);E.prototype=Object.create(v&&v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(E,v):E.__proto__=v)}var k=function(E){_(v,E);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="italic",k.tagName=["EM","I"],n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function O(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&O(g.prototype,p),P&&O(g,P),g}}(),u=function O(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:O(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(6),h=b(c);function b(O){return O&&O.__esModule?O:{default:O}}function _(O,g){if(!(O instanceof g))throw new TypeError("Cannot call a class as a function")}function k(O,g){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:O}function E(O,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);O.prototype=Object.create(g&&g.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(O,g):O.__proto__=g)}var v=function(O){E(g,O);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,null,[{key:"create",value:function(P){return P==="super"?document.createElement("sup"):P==="sub"?document.createElement("sub"):u(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,P)}},{key:"formats",value:function(P){if(P.tagName==="SUB")return"sub";if(P.tagName==="SUP")return"super"}}]),g}(h.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(6),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,v){if(!(E instanceof v))throw new TypeError("Cannot call a class as a function")}function b(E,v){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:E}function _(E,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);E.prototype=Object.create(v&&v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(E,v):E.__proto__=v)}var k=function(E){_(v,E);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="strike",k.tagName="S",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(6),u=c(l);function c(E){return E&&E.__esModule?E:{default:E}}function h(E,v){if(!(E instanceof v))throw new TypeError("Cannot call a class as a function")}function b(E,v){if(!E)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:E}function _(E,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);E.prototype=Object.create(v&&v.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(E,v):E.__proto__=v)}var k=function(E){_(v,E);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="underline",k.tagName="U",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var N=y.get;return N===void 0?void 0:N.call(m)}},c=a(0),h=_(c),b=a(27);function _(p){return p&&p.__esModule?p:{default:p}}function k(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function E(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function v(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var O=["alt","height","width"],g=function(p){v(P,p);function P(){return k(this,P),E(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"format",value:function(m,y){O.indexOf(m)>-1?y?this.domNode.setAttribute(m,y):this.domNode.removeAttribute(m):u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,m,y)}}],[{key:"create",value:function(m){var y=u(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,m);return typeof m=="string"&&y.setAttribute("src",this.sanitize(m)),y}},{key:"formats",value:function(m){return O.reduce(function(y,w){return m.hasAttribute(w)&&(y[w]=m.getAttribute(w)),y},{})}},{key:"match",value:function(m){return/\.(jpe?g|gif|png)$/.test(m)||/^data:image\/.+;base64/.test(m)}},{key:"sanitize",value:function(m){return(0,b.sanitize)(m,["http","https","data"])?m:"//:0"}},{key:"value",value:function(m){return m.getAttribute("src")}}]),P}(h.default.Embed);g.blotName="image",g.tagName="IMG",n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var N=y.get;return N===void 0?void 0:N.call(m)}},c=a(4),h=a(27),b=_(h);function _(p){return p&&p.__esModule?p:{default:p}}function k(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function E(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function v(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var O=["height","width"],g=function(p){v(P,p);function P(){return k(this,P),E(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"format",value:function(m,y){O.indexOf(m)>-1?y?this.domNode.setAttribute(m,y):this.domNode.removeAttribute(m):u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,m,y)}}],[{key:"create",value:function(m){var y=u(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,m);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(m)),y}},{key:"formats",value:function(m){return O.reduce(function(y,w){return m.hasAttribute(w)&&(y[w]=m.getAttribute(w)),y},{})}},{key:"sanitize",value:function(m){return b.default.sanitize(m)}},{key:"value",value:function(m){return m.getAttribute("src")}}]),P}(c.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var l=function(){function m(y,w){for(var N=0;N<w.length;N++){var R=w[N];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,w,N){return w&&m(y.prototype,w),N&&m(y,N),y}}(),u=function m(y,w,N){y===null&&(y=Function.prototype);var R=Object.getOwnPropertyDescriptor(y,w);if(R===void 0){var D=Object.getPrototypeOf(y);return D===null?void 0:m(D,w,N)}else{if("value"in R)return R.value;var x=R.get;return x===void 0?void 0:x.call(N)}},c=a(35),h=v(c),b=a(5),_=v(b),k=a(9),E=v(k);function v(m){return m&&m.__esModule?m:{default:m}}function O(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function g(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 p(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 P=function(m){p(y,m);function y(){return O(this,y),g(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return l(y,null,[{key:"create",value:function(N){var R=u(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,N);return typeof N=="string"&&(window.katex.render(N,R,{throwOnError:!1,errorColor:"#f00"}),R.setAttribute("data-value",N)),R}},{key:"value",value:function(N){return N.getAttribute("data-value")}}]),y}(h.default);P.blotName="formula",P.className="ql-formula",P.tagName="SPAN";var d=function(m){p(y,m),l(y,null,[{key:"register",value:function(){_.default.register(P,!0)}}]);function y(){O(this,y);var w=g(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return w}return y}(E.default);n.FormulaBlot=P,n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var l=function(){function N(R,D){for(var x=0;x<D.length;x++){var S=D[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(R,S.key,S)}}return function(R,D,x){return D&&N(R.prototype,D),x&&N(R,x),R}}(),u=function N(R,D,x){R===null&&(R=Function.prototype);var S=Object.getOwnPropertyDescriptor(R,D);if(S===void 0){var A=Object.getPrototypeOf(R);return A===null?void 0:N(A,D,x)}else{if("value"in S)return S.value;var M=S.get;return M===void 0?void 0:M.call(x)}},c=a(0),h=g(c),b=a(5),_=g(b),k=a(9),E=g(k),v=a(13),O=g(v);function g(N){return N&&N.__esModule?N:{default:N}}function p(N,R){if(!(N instanceof R))throw new TypeError("Cannot call a class as a function")}function P(N,R){if(!N)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:N}function d(N,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);N.prototype=Object.create(R&&R.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(N,R):N.__proto__=R)}var m=function(N){d(R,N);function R(){return p(this,R),P(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return l(R,[{key:"replaceWith",value:function(x){this.domNode.textContent=this.domNode.textContent,this.attach(),u(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replaceWith",this).call(this,x)}},{key:"highlight",value:function(x){var S=this.domNode.textContent;this.cachedText!==S&&((S.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=x(S),this.domNode.normalize(),this.attach()),this.cachedText=S)}}]),R}(O.default);m.className="ql-syntax";var y=new h.default.Attributor.Class("token","hljs",{scope:h.default.Scope.INLINE}),w=function(N){d(R,N),l(R,null,[{key:"register",value:function(){_.default.register(y,!0),_.default.register(m,!0)}}]);function R(D,x){p(this,R);var S=P(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D,x));if(typeof S.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return S.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){S.highlight(),A=null},S.options.interval)}),S.highlight(),S}return l(R,[{key:"highlight",value:function(){var x=this;if(!this.quill.selection.composing){this.quill.update(_.default.sources.USER);var S=this.quill.getSelection();this.quill.scroll.descendants(m).forEach(function(A){A.highlight(x.options.highlight)}),this.quill.update(_.default.sources.SILENT),S!=null&&this.quill.setSelection(S,_.default.sources.SILENT)}}}]),R}(E.default);w.DEFAULTS={highlight:function(){return window.hljs==null?null:function(N){var R=window.hljs.highlightAuto(N);return R.value}}(),interval:1e3},n.CodeBlock=m,n.CodeToken=y,n.default=w},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(t,n){t.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(t,n){t.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(t,n){t.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var l=function R(D,x,S){D===null&&(D=Function.prototype);var A=Object.getOwnPropertyDescriptor(D,x);if(A===void 0){var M=Object.getPrototypeOf(D);return M===null?void 0:R(M,x,S)}else{if("value"in A)return A.value;var T=A.get;return T===void 0?void 0:T.call(S)}},u=function(){function R(D,x){for(var S=0;S<x.length;S++){var A=x[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(D,A.key,A)}}return function(D,x,S){return x&&R(D.prototype,x),S&&R(D,S),D}}(),c=a(3),h=p(c),b=a(8),_=p(b),k=a(43),E=p(k),v=a(15),O=a(41),g=p(O);function p(R){return R&&R.__esModule?R:{default:R}}function P(R,D){if(!(R instanceof D))throw new TypeError("Cannot call a class as a function")}function d(R,D){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:R}function m(R,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);R.prototype=Object.create(D&&D.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(R,D):R.__proto__=D)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],w=function(R){m(D,R);function D(x,S){P(this,D),S.modules.toolbar!=null&&S.modules.toolbar.container==null&&(S.modules.toolbar.container=y);var A=d(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,x,S));return A.quill.container.classList.add("ql-bubble"),A}return u(D,[{key:"extendToolbar",value:function(S){this.tooltip=new N(this.quill,this.options.bounds),this.tooltip.root.appendChild(S.container),this.buildButtons([].slice.call(S.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(S.container.querySelectorAll("select")),g.default)}}]),D}(E.default);w.DEFAULTS=(0,h.default)(!0,{},E.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(D){D?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var N=function(R){m(D,R);function D(x,S){P(this,D);var A=d(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,x,S));return A.quill.on(_.default.events.EDITOR_CHANGE,function(M,T,z,U){if(M===_.default.events.SELECTION_CHANGE)if(T!=null&&T.length>0&&U===_.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var Q=A.quill.getLines(T.index,T.length);if(Q.length===1)A.position(A.quill.getBounds(T));else{var K=Q[Q.length-1],J=A.quill.getIndex(K),B=Math.min(K.length()-1,T.index+T.length-J),L=A.quill.getBounds(new v.Range(J,B));A.position(L)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return u(D,[{key:"listen",value:function(){var S=this;l(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){S.root.classList.remove("ql-editing")}),this.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!S.root.classList.contains("ql-hidden")){var A=S.quill.getSelection();A!=null&&S.position(S.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(S){var A=l(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"position",this).call(this,S),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",A===0)return A;M.style.marginLeft=-1*A-M.offsetWidth/2+"px"}}]),D}(k.BaseTooltip);N.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=N,n.default=w},function(t,n,a){t.exports=a(63)}]).default})}(op)),op.exports}var Va={},ap={exports:{}},js={},md={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var eO=md.exports,k2;function tO(){return k2||(k2=1,function(e,i){(function(t){var n=i&&!i.nodeType&&i,a=e&&!e.nodeType&&e,l=typeof ic=="object"&⁣(l.global===l||l.window===l||l.self===l)&&(t=l);var u,c=2147483647,h=36,b=1,_=26,k=38,E=700,v=72,O=128,g="-",p=/^xn--/,P=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=h-b,w=Math.floor,N=String.fromCharCode,R;function D(L){throw new RangeError(m[L])}function x(L,F){for(var H=L.length,$=[];H--;)$[H]=F(L[H]);return $}function S(L,F){var H=L.split("@"),$="";H.length>1&&($=H[0]+"@",L=H[1]),L=L.replace(d,".");var ee=L.split("."),V=x(ee,F).join(".");return $+V}function A(L){for(var F=[],H=0,$=L.length,ee,V;H<$;)ee=L.charCodeAt(H++),ee>=55296&&ee<=56319&&H<$?(V=L.charCodeAt(H++),(V&64512)==56320?F.push(((ee&1023)<<10)+(V&1023)+65536):(F.push(ee),H--)):F.push(ee);return F}function M(L){return x(L,function(F){var H="";return F>65535&&(F-=65536,H+=N(F>>>10&1023|55296),F=56320|F&1023),H+=N(F),H}).join("")}function T(L){return L-48<10?L-22:L-65<26?L-65:L-97<26?L-97:h}function z(L,F){return L+22+75*(L<26)-((F!=0)<<5)}function U(L,F,H){var $=0;for(L=H?w(L/E):L>>1,L+=w(L/F);L>y*_>>1;$+=h)L=w(L/y);return w($+(y+1)*L/(L+k))}function Q(L){var F=[],H=L.length,$,ee=0,V=O,X=v,Y,te,re,ie,ae,ue,de,pe,Oe;for(Y=L.lastIndexOf(g),Y<0&&(Y=0),te=0;te<Y;++te)L.charCodeAt(te)>=128&&D("not-basic"),F.push(L.charCodeAt(te));for(re=Y>0?Y+1:0;re<H;){for(ie=ee,ae=1,ue=h;re>=H&&D("invalid-input"),de=T(L.charCodeAt(re++)),(de>=h||de>w((c-ee)/ae))&&D("overflow"),ee+=de*ae,pe=ue<=X?b:ue>=X+_?_:ue-X,!(de<pe);ue+=h)Oe=h-pe,ae>w(c/Oe)&&D("overflow"),ae*=Oe;$=F.length+1,X=U(ee-ie,$,ie==0),w(ee/$)>c-V&&D("overflow"),V+=w(ee/$),ee%=$,F.splice(ee++,0,V)}return M(F)}function K(L){var F,H,$,ee,V,X,Y,te,re,ie,ae,ue=[],de,pe,Oe,_e;for(L=A(L),de=L.length,F=O,H=0,V=v,X=0;X<de;++X)ae=L[X],ae<128&&ue.push(N(ae));for($=ee=ue.length,ee&&ue.push(g);$<de;){for(Y=c,X=0;X<de;++X)ae=L[X],ae>=F&&ae<Y&&(Y=ae);for(pe=$+1,Y-F>w((c-H)/pe)&&D("overflow"),H+=(Y-F)*pe,F=Y,X=0;X<de;++X)if(ae=L[X],ae<F&&++H>c&&D("overflow"),ae==F){for(te=H,re=h;ie=re<=V?b:re>=V+_?_:re-V,!(te<ie);re+=h)_e=te-ie,Oe=h-ie,ue.push(N(z(ie+_e%Oe,0))),te=w(_e/Oe);ue.push(N(z(te,0))),V=U(H,pe,$==ee),H=0,++$}++H,++F}return ue.join("")}function J(L){return S(L,function(F){return p.test(F)?Q(F.slice(4).toLowerCase()):F})}function B(L){return S(L,function(F){return P.test(F)?"xn--"+K(F):F})}if(u={version:"1.4.1",ucs2:{decode:A,encode:M},decode:Q,encode:K,toASCII:B,toUnicode:J},n&&a)if(e.exports==n)a.exports=u;else for(R in u)u.hasOwnProperty(R)&&(n[R]=u[R]);else t.punycode=u})(eO)}(md,md.exports)),md.exports}var l1,T2;function nO(){return T2||(T2=1,l1=Error),l1}var s1,A2;function rO(){return A2||(A2=1,s1=EvalError),s1}var u1,R2;function iO(){return R2||(R2=1,u1=RangeError),u1}var c1,M2;function oO(){return M2||(M2=1,c1=ReferenceError),c1}var f1,L2;function j4(){return L2||(L2=1,f1=SyntaxError),f1}var d1,N2;function Hd(){return N2||(N2=1,d1=TypeError),d1}var h1,I2;function aO(){return I2||(I2=1,h1=URIError),h1}var p1,D2;function lO(){return D2||(D2=1,p1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;i[t]=a;for(t in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var l=Object.getOwnPropertySymbols(i);if(l.length!==1||l[0]!==t||!Object.prototype.propertyIsEnumerable.call(i,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(i,t);if(u.value!==a||u.enumerable!==!0)return!1}return!0}),p1}var g1,j2;function sO(){if(j2)return g1;j2=1;var e=typeof Symbol<"u"&&Symbol,i=lO();return g1=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},g1}var v1,F2;function uO(){if(F2)return v1;F2=1;var e={__proto__:null,foo:{}},i=Object;return v1=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof i)},v1}var m1,z2;function cO(){if(z2)return m1;z2=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,t=Math.max,n="[object Function]",a=function(h,b){for(var _=[],k=0;k<h.length;k+=1)_[k]=h[k];for(var E=0;E<b.length;E+=1)_[E+h.length]=b[E];return _},l=function(h,b){for(var _=[],k=b,E=0;k<h.length;k+=1,E+=1)_[E]=h[k];return _},u=function(c,h){for(var b="",_=0;_<c.length;_+=1)b+=c[_],_+1<c.length&&(b+=h);return b};return m1=function(h){var b=this;if(typeof b!="function"||i.apply(b)!==n)throw new TypeError(e+b);for(var _=l(arguments,1),k,E=function(){if(this instanceof k){var P=b.apply(this,a(_,arguments));return Object(P)===P?P:this}return b.apply(h,a(_,arguments))},v=t(0,b.length-_.length),O=[],g=0;g<v;g++)O[g]="$"+g;if(k=Function("binder","return function ("+u(O,",")+"){ return binder.apply(this,arguments); }")(E),b.prototype){var p=function(){};p.prototype=b.prototype,k.prototype=new p,p.prototype=null}return k},m1}var y1,B2;function yv(){if(B2)return y1;B2=1;var e=cO();return y1=Function.prototype.bind||e,y1}var b1,U2;function fO(){if(U2)return b1;U2=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,t=yv();return b1=t.call(e,i),b1}var _1,q2;function wc(){if(q2)return _1;q2=1;var e,i=nO(),t=rO(),n=iO(),a=oO(),l=j4(),u=Hd(),c=aO(),h=Function,b=function(K){try{return h('"use strict"; return ('+K+").constructor;")()}catch{}},_=Object.getOwnPropertyDescriptor;if(_)try{_({},"")}catch{_=null}var k=function(){throw new u},E=_?function(){try{return arguments.callee,k}catch{try{return _(arguments,"callee").get}catch{return k}}}():k,v=sO()(),O=uO()(),g=Object.getPrototypeOf||(O?function(K){return K.__proto__}:null),p={},P=typeof Uint8Array>"u"||!g?e:g(Uint8Array),d={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":v&&g?g([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%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%":i,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":p,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&g?g(g([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v||!g?e:g(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%":a,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v||!g?e:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&g?g(""[Symbol.iterator]()):e,"%Symbol%":v?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":E,"%TypedArray%":P,"%TypeError%":u,"%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%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(g)try{null.error}catch(K){var m=g(g(K));d["%Error.prototype%"]=m}var y=function K(J){var B;if(J==="%AsyncFunction%")B=b("async function () {}");else if(J==="%GeneratorFunction%")B=b("function* () {}");else if(J==="%AsyncGeneratorFunction%")B=b("async function* () {}");else if(J==="%AsyncGenerator%"){var L=K("%AsyncGeneratorFunction%");L&&(B=L.prototype)}else if(J==="%AsyncIteratorPrototype%"){var F=K("%AsyncGenerator%");F&&g&&(B=g(F.prototype))}return d[J]=B,B},w={__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"]},N=yv(),R=fO(),D=N.call(Function.call,Array.prototype.concat),x=N.call(Function.apply,Array.prototype.splice),S=N.call(Function.call,String.prototype.replace),A=N.call(Function.call,String.prototype.slice),M=N.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,z=/\\(\\)?/g,U=function(J){var B=A(J,0,1),L=A(J,-1);if(B==="%"&&L!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(L==="%"&&B!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var F=[];return S(J,T,function(H,$,ee,V){F[F.length]=ee?S(V,z,"$1"):$||H}),F},Q=function(J,B){var L=J,F;if(R(w,L)&&(F=w[L],L="%"+F[0]+"%"),R(d,L)){var H=d[L];if(H===p&&(H=y(L)),typeof H>"u"&&!B)throw new u("intrinsic "+J+" exists, but is not available. Please file an issue!");return{alias:F,name:L,value:H}}throw new l("intrinsic "+J+" does not exist!")};return _1=function(J,B){if(typeof J!="string"||J.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new u('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,J)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var L=U(J),F=L.length>0?L[0]:"",H=Q("%"+F+"%",B),$=H.name,ee=H.value,V=!1,X=H.alias;X&&(F=X[0],x(L,D([0,1],X)));for(var Y=1,te=!0;Y<L.length;Y+=1){var re=L[Y],ie=A(re,0,1),ae=A(re,-1);if((ie==='"'||ie==="'"||ie==="`"||ae==='"'||ae==="'"||ae==="`")&&ie!==ae)throw new l("property names with quotes must have matching quotes");if((re==="constructor"||!te)&&(V=!0),F+="."+re,$="%"+F+"%",R(d,$))ee=d[$];else if(ee!=null){if(!(re in ee)){if(!B)throw new u("base intrinsic for "+J+" exists, but the property is not available.");return}if(_&&Y+1>=L.length){var ue=_(ee,re);te=!!ue,te&&"get"in ue&&!("originalValue"in ue.get)?ee=ue.get:ee=ee[re]}else te=R(ee,re),ee=ee[re];te&&!V&&(d[$]=ee)}}return ee},_1}var w1={exports:{}},S1,H2;function bv(){if(H2)return S1;H2=1;var e=wc(),i=e("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return S1=i,S1}var E1,G2;function F4(){if(G2)return E1;G2=1;var e=wc(),i=e("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch{i=null}return E1=i,E1}var O1,V2;function dO(){if(V2)return O1;V2=1;var e=bv(),i=j4(),t=Hd(),n=F4();return O1=function(l,u,c){if(!l||typeof l!="object"&&typeof l!="function")throw new t("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,b=arguments.length>4?arguments[4]:null,_=arguments.length>5?arguments[5]:null,k=arguments.length>6?arguments[6]:!1,E=!!n&&n(l,u);if(e)e(l,u,{configurable:_===null&&E?E.configurable:!_,enumerable:h===null&&E?E.enumerable:!h,value:c,writable:b===null&&E?E.writable:!b});else if(k||!h&&!b&&!_)l[u]=c;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},O1}var x1,$2;function hO(){if($2)return x1;$2=1;var e=bv(),i=function(){return!!e};return i.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},x1=i,x1}var P1,W2;function pO(){if(W2)return P1;W2=1;var e=wc(),i=dO(),t=hO()(),n=F4(),a=Hd(),l=e("%Math.floor%");return P1=function(c,h){if(typeof c!="function")throw new a("`fn` is not a function");if(typeof h!="number"||h<0||h>4294967295||l(h)!==h)throw new a("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],_=!0,k=!0;if("length"in c&&n){var E=n(c,"length");E&&!E.configurable&&(_=!1),E&&!E.writable&&(k=!1)}return(_||k||!b)&&(t?i(c,"length",h,!0,!0):i(c,"length",h)),c},P1}var Y2;function gO(){return Y2||(Y2=1,function(e){var i=yv(),t=wc(),n=pO(),a=Hd(),l=t("%Function.prototype.apply%"),u=t("%Function.prototype.call%"),c=t("%Reflect.apply%",!0)||i.call(u,l),h=bv(),b=t("%Math.max%");e.exports=function(E){if(typeof E!="function")throw new a("a function is required");var v=c(i,u,arguments);return n(v,1+b(0,E.length-(arguments.length-1)),!0)};var _=function(){return c(i,l,arguments)};h?h(e.exports,"apply",{value:_}):e.exports.apply=_}(w1)),w1.exports}var C1,K2;function vO(){if(K2)return C1;K2=1;var e=wc(),i=gO(),t=i(e("String.prototype.indexOf"));return C1=function(a,l){var u=e(a,!!l);return typeof u=="function"&&t(a,".prototype.")>-1?i(u):u},C1}const mO={},yO=Object.freeze(Object.defineProperty({__proto__:null,default:mO},Symbol.toStringTag,{value:"Module"})),bO=Xl(yO);var k1,X2;function _O(){if(X2)return k1;X2=1;var e=typeof Map=="function"&&Map.prototype,i=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=e&&i&&typeof i.get=="function"?i.get:null,n=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=a&&l&&typeof l.get=="function"?l.get:null,c=a&&Set.prototype.forEach,h=typeof WeakMap=="function"&&WeakMap.prototype,b=h?WeakMap.prototype.has:null,_=typeof WeakSet=="function"&&WeakSet.prototype,k=_?WeakSet.prototype.has:null,E=typeof WeakRef=="function"&&WeakRef.prototype,v=E?WeakRef.prototype.deref:null,O=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,P=String.prototype.match,d=String.prototype.slice,m=String.prototype.replace,y=String.prototype.toUpperCase,w=String.prototype.toLowerCase,N=RegExp.prototype.test,R=Array.prototype.concat,D=Array.prototype.join,x=Array.prototype.slice,S=Math.floor,A=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===z||!0)?Symbol.toStringTag:null,Q=Object.prototype.propertyIsEnumerable,K=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(be){return be.__proto__}:null);function J(be,Se){if(be===1/0||be===-1/0||be!==be||be&&be>-1e3&&be<1e3||N.call(/e/,Se))return Se;var vt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof be=="number"){var Pt=be<0?-S(-be):S(be);if(Pt!==be){var Ie=String(Pt),Ge=d.call(Se,Ie.length+1);return m.call(Ie,vt,"$&_")+"."+m.call(m.call(Ge,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(Se,vt,"$&_")}var B=bO,L=B.custom,F=de(L)?L:null,H={__proto__:null,double:'"',single:"'"},$={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};k1=function be(Se,vt,Pt,Ie){var Ge=vt||{};if(_e(Ge,"quoteStyle")&&!_e(H,Ge.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(_e(Ge,"maxStringLength")&&(typeof Ge.maxStringLength=="number"?Ge.maxStringLength<0&&Ge.maxStringLength!==1/0:Ge.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var rt=_e(Ge,"customInspect")?Ge.customInspect:!0;if(typeof rt!="boolean"&&rt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(_e(Ge,"indent")&&Ge.indent!==null&&Ge.indent!==" "&&!(parseInt(Ge.indent,10)===Ge.indent&&Ge.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(_e(Ge,"numericSeparator")&&typeof Ge.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var je=Ge.numericSeparator;if(typeof Se>"u")return"undefined";if(Se===null)return"null";if(typeof Se=="boolean")return Se?"true":"false";if(typeof Se=="string")return ct(Se,Ge);if(typeof Se=="number"){if(Se===0)return 1/0/Se>0?"0":"-0";var mt=String(Se);return je?J(Se,mt):mt}if(typeof Se=="bigint"){var ze=String(Se)+"n";return je?J(Se,ze):ze}var pt=typeof Ge.depth>"u"?5:Ge.depth;if(typeof Pt>"u"&&(Pt=0),Pt>=pt&&pt>0&&typeof Se=="object")return X(Se)?"[Array]":"[Object]";var _n=ft(Ge,Pt);if(typeof Ie>"u")Ie=[];else if(ge(Ie,Se)>=0)return"[Circular]";function Be(Gn,Sn,oi){if(Sn&&(Ie=x.call(Ie),Ie.push(Sn)),oi){var Ir={depth:Ge.depth};return _e(Ge,"quoteStyle")&&(Ir.quoteStyle=Ge.quoteStyle),be(Gn,Ir,Pt+1,Ie)}return be(Gn,Ge,Pt+1,Ie)}if(typeof Se=="function"&&!te(Se)){var lt=fe(Se),_t=xt(Se,Be);return"[Function"+(lt?": "+lt:" (anonymous)")+"]"+(_t.length>0?" { "+D.call(_t,", ")+" }":"")}if(de(Se)){var Ut=z?m.call(String(Se),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(Se);return typeof Se=="object"&&!z?De(Ut):Ut}if(Ne(Se)){for(var Ht="<"+w.call(String(Se.nodeName)),hn=Se.attributes||[],In=0;In<hn.length;In++)Ht+=" "+hn[In].name+"="+ee(V(hn[In].value),"double",Ge);return Ht+=">",Se.childNodes&&Se.childNodes.length&&(Ht+="..."),Ht+="</"+w.call(String(Se.nodeName))+">",Ht}if(X(Se)){if(Se.length===0)return"[]";var wn=xt(Se,Be);return _n&&!Xe(wn)?"["+At(wn,_n)+"]":"[ "+D.call(wn,", ")+" ]"}if(re(Se)){var Qn=xt(Se,Be);return!("cause"in Error.prototype)&&"cause"in Se&&!Q.call(Se,"cause")?"{ ["+String(Se)+"] "+D.call(R.call("[cause]: "+Be(Se.cause),Qn),", ")+" }":Qn.length===0?"["+String(Se)+"]":"{ ["+String(Se)+"] "+D.call(Qn,", ")+" }"}if(typeof Se=="object"&&rt){if(F&&typeof Se[F]=="function"&&B)return B(Se,{depth:pt-Pt});if(rt!=="symbol"&&typeof Se.inspect=="function")return Se.inspect()}if(Ce(Se)){var ii=[];return n&&n.call(Se,function(Gn,Sn){ii.push(Be(Sn,Se,!0)+" => "+Be(Gn,Se))}),He("Map",t.call(Se),ii,_n)}if(me(Se)){var Sr=[];return c&&c.call(Se,function(Gn){Sr.push(Be(Gn,Se))}),He("Set",u.call(Se),Sr,_n)}if(Ae(Se))return Fe("WeakMap");if(xe(Se))return Fe("WeakSet");if(se(Se))return Fe("WeakRef");if(ae(Se))return De(Be(Number(Se)));if(pe(Se))return De(Be(A.call(Se)));if(ue(Se))return De(O.call(Se));if(ie(Se))return De(Be(String(Se)));if(typeof window<"u"&&Se===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Se===globalThis||typeof ic<"u"&&Se===ic)return"{ [object globalThis] }";if(!Y(Se)&&!te(Se)){var Ze=xt(Se,Be),St=K?K(Se)===Object.prototype:Se instanceof Object||Se.constructor===Object,Mt=Se instanceof Object?"":"null prototype",Vt=!St&&U&&Object(Se)===Se&&U in Se?d.call(Le(Se),8,-1):Mt?"Object":"",$t=St||typeof Se.constructor!="function"?"":Se.constructor.name?Se.constructor.name+" ":"",Jn=$t+(Vt||Mt?"["+D.call(R.call([],Vt||[],Mt||[]),": ")+"] ":"");return Ze.length===0?Jn+"{}":_n?Jn+"{"+At(Ze,_n)+"}":Jn+"{ "+D.call(Ze,", ")+" }"}return String(Se)};function ee(be,Se,vt){var Pt=vt.quoteStyle||Se,Ie=H[Pt];return Ie+be+Ie}function V(be){return m.call(String(be),/"/g,""")}function X(be){return Le(be)==="[object Array]"&&(!U||!(typeof be=="object"&&U in be))}function Y(be){return Le(be)==="[object Date]"&&(!U||!(typeof be=="object"&&U in be))}function te(be){return Le(be)==="[object RegExp]"&&(!U||!(typeof be=="object"&&U in be))}function re(be){return Le(be)==="[object Error]"&&(!U||!(typeof be=="object"&&U in be))}function ie(be){return Le(be)==="[object String]"&&(!U||!(typeof be=="object"&&U in be))}function ae(be){return Le(be)==="[object Number]"&&(!U||!(typeof be=="object"&&U in be))}function ue(be){return Le(be)==="[object Boolean]"&&(!U||!(typeof be=="object"&&U in be))}function de(be){if(z)return be&&typeof be=="object"&&be instanceof Symbol;if(typeof be=="symbol")return!0;if(!be||typeof be!="object"||!T)return!1;try{return T.call(be),!0}catch{}return!1}function pe(be){if(!be||typeof be!="object"||!A)return!1;try{return A.call(be),!0}catch{}return!1}var Oe=Object.prototype.hasOwnProperty||function(be){return be in this};function _e(be,Se){return Oe.call(be,Se)}function Le(be){return g.call(be)}function fe(be){if(be.name)return be.name;var Se=P.call(p.call(be),/^function\s*([\w$]+)/);return Se?Se[1]:null}function ge(be,Se){if(be.indexOf)return be.indexOf(Se);for(var vt=0,Pt=be.length;vt<Pt;vt++)if(be[vt]===Se)return vt;return-1}function Ce(be){if(!t||!be||typeof be!="object")return!1;try{t.call(be);try{u.call(be)}catch{return!0}return be instanceof Map}catch{}return!1}function Ae(be){if(!b||!be||typeof be!="object")return!1;try{b.call(be,b);try{k.call(be,k)}catch{return!0}return be instanceof WeakMap}catch{}return!1}function se(be){if(!v||!be||typeof be!="object")return!1;try{return v.call(be),!0}catch{}return!1}function me(be){if(!u||!be||typeof be!="object")return!1;try{u.call(be);try{t.call(be)}catch{return!0}return be instanceof Set}catch{}return!1}function xe(be){if(!k||!be||typeof be!="object")return!1;try{k.call(be,k);try{b.call(be,b)}catch{return!0}return be instanceof WeakSet}catch{}return!1}function Ne(be){return!be||typeof be!="object"?!1:typeof HTMLElement<"u"&&be instanceof HTMLElement?!0:typeof be.nodeName=="string"&&typeof be.getAttribute=="function"}function ct(be,Se){if(be.length>Se.maxStringLength){var vt=be.length-Se.maxStringLength,Pt="... "+vt+" more character"+(vt>1?"s":"");return ct(d.call(be,0,Se.maxStringLength),Se)+Pt}var Ie=$[Se.quoteStyle||"single"];Ie.lastIndex=0;var Ge=m.call(m.call(be,Ie,"\\$1"),/[\x00-\x1f]/g,at);return ee(Ge,"single",Se)}function at(be){var Se=be.charCodeAt(0),vt={8:"b",9:"t",10:"n",12:"f",13:"r"}[Se];return vt?"\\"+vt:"\\x"+(Se<16?"0":"")+y.call(Se.toString(16))}function De(be){return"Object("+be+")"}function Fe(be){return be+" { ? }"}function He(be,Se,vt,Pt){var Ie=Pt?At(vt,Pt):D.call(vt,", ");return be+" ("+Se+") {"+Ie+"}"}function Xe(be){for(var Se=0;Se<be.length;Se++)if(ge(be[Se],`
|
|
149
|
-
`)>=0)return!1;return!0}function ft(be,Se){var vt;if(be.indent===" ")vt=" ";else if(typeof be.indent=="number"&&be.indent>0)vt=D.call(Array(be.indent+1)," ");else return null;return{base:vt,prev:D.call(Array(Se+1),vt)}}function At(be,Se){if(be.length===0)return"";var vt=`
|
|
150
|
-
`+Se.prev+Se.base;return vt+D.call(be,","+vt)+`
|
|
151
|
-
`+Se.prev}function xt(be,Se){var vt=X(be),Pt=[];if(vt){Pt.length=be.length;for(var Ie=0;Ie<be.length;Ie++)Pt[Ie]=_e(be,Ie)?Se(be[Ie],be):""}var Ge=typeof M=="function"?M(be):[],rt;if(z){rt={};for(var je=0;je<Ge.length;je++)rt["$"+Ge[je]]=Ge[je]}for(var mt in be)_e(be,mt)&&(vt&&String(Number(mt))===mt&&mt<be.length||z&&rt["$"+mt]instanceof Symbol||(N.call(/[^\w$]/,mt)?Pt.push(Se(mt,be)+": "+Se(be[mt],be)):Pt.push(mt+": "+Se(be[mt],be))));if(typeof M=="function")for(var ze=0;ze<Ge.length;ze++)Q.call(be,Ge[ze])&&Pt.push("["+Se(Ge[ze])+"]: "+Se(be[Ge[ze]],be));return Pt}return k1}var T1,Z2;function wO(){if(Z2)return T1;Z2=1;var e=wc(),i=vO(),t=_O(),n=Hd(),a=e("%WeakMap%",!0),l=e("%Map%",!0),u=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),b=i("Map.prototype.get",!0),_=i("Map.prototype.set",!0),k=i("Map.prototype.has",!0),E=function(p,P){for(var d=p,m;(m=d.next)!==null;d=m)if(m.key===P)return d.next=m.next,m.next=p.next,p.next=m,m},v=function(p,P){var d=E(p,P);return d&&d.value},O=function(p,P,d){var m=E(p,P);m?m.value=d:p.next={key:P,next:p.next,value:d}},g=function(p,P){return!!E(p,P)};return T1=function(){var P,d,m,y={assert:function(w){if(!y.has(w))throw new n("Side channel does not contain "+t(w))},get:function(w){if(a&&w&&(typeof w=="object"||typeof w=="function")){if(P)return u(P,w)}else if(l){if(d)return b(d,w)}else if(m)return v(m,w)},has:function(w){if(a&&w&&(typeof w=="object"||typeof w=="function")){if(P)return h(P,w)}else if(l){if(d)return k(d,w)}else if(m)return g(m,w);return!1},set:function(w,N){a&&w&&(typeof w=="object"||typeof w=="function")?(P||(P=new a),c(P,w,N)):l?(d||(d=new l),_(d,w,N)):(m||(m={key:{},next:null}),O(m,w,N))}};return y},T1}var A1,Q2;function _v(){if(Q2)return A1;Q2=1;var e=String.prototype.replace,i=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return A1={default:t.RFC3986,formatters:{RFC1738:function(n){return e.call(n,i,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},A1}var R1,J2;function z4(){if(J2)return R1;J2=1;var e=_v(),i=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var p=[],P=0;P<256;++P)p.push("%"+((P<16?"0":"")+P.toString(16)).toUpperCase());return p}(),a=function(P){for(;P.length>1;){var d=P.pop(),m=d.obj[d.prop];if(t(m)){for(var y=[],w=0;w<m.length;++w)typeof m[w]<"u"&&y.push(m[w]);d.obj[d.prop]=y}}},l=function(P,d){for(var m=d&&d.plainObjects?Object.create(null):{},y=0;y<P.length;++y)typeof P[y]<"u"&&(m[y]=P[y]);return m},u=function p(P,d,m){if(!d)return P;if(typeof d!="object"){if(t(P))P.push(d);else if(P&&typeof P=="object")(m&&(m.plainObjects||m.allowPrototypes)||!i.call(Object.prototype,d))&&(P[d]=!0);else return[P,d];return P}if(!P||typeof P!="object")return[P].concat(d);var y=P;return t(P)&&!t(d)&&(y=l(P,m)),t(P)&&t(d)?(d.forEach(function(w,N){if(i.call(P,N)){var R=P[N];R&&typeof R=="object"&&w&&typeof w=="object"?P[N]=p(R,w,m):P.push(w)}else P[N]=w}),P):Object.keys(d).reduce(function(w,N){var R=d[N];return i.call(w,N)?w[N]=p(w[N],R,m):w[N]=R,w},y)},c=function(P,d){return Object.keys(d).reduce(function(m,y){return m[y]=d[y],m},P)},h=function(p,P,d){var m=p.replace(/\+/g," ");if(d==="iso-8859-1")return m.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(m)}catch{return m}},b=1024,_=function(P,d,m,y,w){if(P.length===0)return P;var N=P;if(typeof P=="symbol"?N=Symbol.prototype.toString.call(P):typeof P!="string"&&(N=String(P)),m==="iso-8859-1")return escape(N).replace(/%u[0-9a-f]{4}/gi,function(T){return"%26%23"+parseInt(T.slice(2),16)+"%3B"});for(var R="",D=0;D<N.length;D+=b){for(var x=N.length>=b?N.slice(D,D+b):N,S=[],A=0;A<x.length;++A){var M=x.charCodeAt(A);if(M===45||M===46||M===95||M===126||M>=48&&M<=57||M>=65&&M<=90||M>=97&&M<=122||w===e.RFC1738&&(M===40||M===41)){S[S.length]=x.charAt(A);continue}if(M<128){S[S.length]=n[M];continue}if(M<2048){S[S.length]=n[192|M>>6]+n[128|M&63];continue}if(M<55296||M>=57344){S[S.length]=n[224|M>>12]+n[128|M>>6&63]+n[128|M&63];continue}A+=1,M=65536+((M&1023)<<10|x.charCodeAt(A)&1023),S[S.length]=n[240|M>>18]+n[128|M>>12&63]+n[128|M>>6&63]+n[128|M&63]}R+=S.join("")}return R},k=function(P){for(var d=[{obj:{o:P},prop:"o"}],m=[],y=0;y<d.length;++y)for(var w=d[y],N=w.obj[w.prop],R=Object.keys(N),D=0;D<R.length;++D){var x=R[D],S=N[x];typeof S=="object"&&S!==null&&m.indexOf(S)===-1&&(d.push({obj:N,prop:x}),m.push(S))}return a(d),P},E=function(P){return Object.prototype.toString.call(P)==="[object RegExp]"},v=function(P){return!P||typeof P!="object"?!1:!!(P.constructor&&P.constructor.isBuffer&&P.constructor.isBuffer(P))},O=function(P,d){return[].concat(P,d)},g=function(P,d){if(t(P)){for(var m=[],y=0;y<P.length;y+=1)m.push(d(P[y]));return m}return d(P)};return R1={arrayToObject:l,assign:c,combine:O,compact:k,decode:h,encode:_,isBuffer:v,isRegExp:E,maybeMap:g,merge:u},R1}var M1,eb;function SO(){if(eb)return M1;eb=1;var e=wO(),i=z4(),t=_v(),n=Object.prototype.hasOwnProperty,a={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,P){return p+"["+P+"]"},repeat:function(p){return p}},l=Array.isArray,u=Array.prototype.push,c=function(g,p){u.apply(g,l(p)?p:[p])},h=Date.prototype.toISOString,b=t.default,_={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:b,formatter:t.formatters[b],indices:!1,serializeDate:function(p){return h.call(p)},skipNulls:!1,strictNullHandling:!1},k=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},E={},v=function g(p,P,d,m,y,w,N,R,D,x,S,A,M,T,z,U,Q,K){for(var J=p,B=K,L=0,F=!1;(B=B.get(E))!==void 0&&!F;){var H=B.get(p);if(L+=1,typeof H<"u"){if(H===L)throw new RangeError("Cyclic object value");F=!0}typeof B.get(E)>"u"&&(L=0)}if(typeof x=="function"?J=x(P,J):J instanceof Date?J=M(J):d==="comma"&&l(J)&&(J=i.maybeMap(J,function(Oe){return Oe instanceof Date?M(Oe):Oe})),J===null){if(w)return D&&!U?D(P,_.encoder,Q,"key",T):P;J=""}if(k(J)||i.isBuffer(J)){if(D){var $=U?P:D(P,_.encoder,Q,"key",T);return[z($)+"="+z(D(J,_.encoder,Q,"value",T))]}return[z(P)+"="+z(String(J))]}var ee=[];if(typeof J>"u")return ee;var V;if(d==="comma"&&l(J))U&&D&&(J=i.maybeMap(J,D)),V=[{value:J.length>0?J.join(",")||null:void 0}];else if(l(x))V=x;else{var X=Object.keys(J);V=S?X.sort(S):X}var Y=R?P.replace(/\./g,"%2E"):P,te=m&&l(J)&&J.length===1?Y+"[]":Y;if(y&&l(J)&&J.length===0)return te+"[]";for(var re=0;re<V.length;++re){var ie=V[re],ae=typeof ie=="object"&&typeof ie.value<"u"?ie.value:J[ie];if(!(N&&ae===null)){var ue=A&&R?ie.replace(/\./g,"%2E"):ie,de=l(J)?typeof d=="function"?d(te,ue):te:te+(A?"."+ue:"["+ue+"]");K.set(p,L);var pe=e();pe.set(E,K),c(ee,g(ae,de,d,m,y,w,N,R,d==="comma"&&U&&l(J)?null:D,x,S,A,M,T,z,U,Q,pe))}}return ee},O=function(p){if(!p)return _;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var P=p.charset||_.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var d=t.default;if(typeof p.format<"u"){if(!n.call(t.formatters,p.format))throw new TypeError("Unknown format option provided.");d=p.format}var m=t.formatters[d],y=_.filter;(typeof p.filter=="function"||l(p.filter))&&(y=p.filter);var w;if(p.arrayFormat in a?w=p.arrayFormat:"indices"in p?w=p.indices?"indices":"repeat":w=_.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var N=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:_.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:_.addQueryPrefix,allowDots:N,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:w,charset:P,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:_.charsetSentinel,commaRoundTrip:p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?_.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:_.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:_.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:_.encodeValuesOnly,filter:y,format:d,formatter:m,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:_.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:_.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:_.strictNullHandling}};return M1=function(g,p){var P=g,d=O(p),m,y;typeof d.filter=="function"?(y=d.filter,P=y("",P)):l(d.filter)&&(y=d.filter,m=y);var w=[];if(typeof P!="object"||P===null)return"";var N=a[d.arrayFormat],R=N==="comma"&&d.commaRoundTrip;m||(m=Object.keys(P)),d.sort&&m.sort(d.sort);for(var D=e(),x=0;x<m.length;++x){var S=m[x];d.skipNulls&&P[S]===null||c(w,v(P[S],S,N,R,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,D))}var A=w.join(d.delimiter),M=d.addQueryPrefix===!0?"?":"";return d.charsetSentinel&&(d.charset==="iso-8859-1"?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),A.length>0?M+A:""},M1}var L1,tb;function EO(){if(tb)return L1;tb=1;var e=z4(),i=Object.prototype.hasOwnProperty,t=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,strictDepth:!1,strictNullHandling:!1},a=function(E){return E.replace(/&#(\d+);/g,function(v,O){return String.fromCharCode(parseInt(O,10))})},l=function(E,v){return E&&typeof E=="string"&&v.comma&&E.indexOf(",")>-1?E.split(","):E},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(v,O){var g={__proto__:null},p=O.ignoreQueryPrefix?v.replace(/^\?/,""):v;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var P=O.parameterLimit===1/0?void 0:O.parameterLimit,d=p.split(O.delimiter,P),m=-1,y,w=O.charset;if(O.charsetSentinel)for(y=0;y<d.length;++y)d[y].indexOf("utf8=")===0&&(d[y]===c?w="utf-8":d[y]===u&&(w="iso-8859-1"),m=y,y=d.length);for(y=0;y<d.length;++y)if(y!==m){var N=d[y],R=N.indexOf("]="),D=R===-1?N.indexOf("="):R+1,x,S;D===-1?(x=O.decoder(N,n.decoder,w,"key"),S=O.strictNullHandling?null:""):(x=O.decoder(N.slice(0,D),n.decoder,w,"key"),S=e.maybeMap(l(N.slice(D+1),O),function(M){return O.decoder(M,n.decoder,w,"value")})),S&&O.interpretNumericEntities&&w==="iso-8859-1"&&(S=a(S)),N.indexOf("[]=")>-1&&(S=t(S)?[S]:S);var A=i.call(g,x);A&&O.duplicates==="combine"?g[x]=e.combine(g[x],S):(!A||O.duplicates==="last")&&(g[x]=S)}return g},b=function(E,v,O,g){for(var p=g?v:l(v,O),P=E.length-1;P>=0;--P){var d,m=E[P];if(m==="[]"&&O.parseArrays)d=O.allowEmptyArrays&&(p===""||O.strictNullHandling&&p===null)?[]:[].concat(p);else{d=O.plainObjects?Object.create(null):{};var y=m.charAt(0)==="["&&m.charAt(m.length-1)==="]"?m.slice(1,-1):m,w=O.decodeDotInKeys?y.replace(/%2E/g,"."):y,N=parseInt(w,10);!O.parseArrays&&w===""?d={0:p}:!isNaN(N)&&m!==w&&String(N)===w&&N>=0&&O.parseArrays&&N<=O.arrayLimit?(d=[],d[N]=p):w!=="__proto__"&&(d[w]=p)}p=d}return p},_=function(v,O,g,p){if(v){var P=g.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v,d=/(\[[^[\]]*])/,m=/(\[[^[\]]*])/g,y=g.depth>0&&d.exec(P),w=y?P.slice(0,y.index):P,N=[];if(w){if(!g.plainObjects&&i.call(Object.prototype,w)&&!g.allowPrototypes)return;N.push(w)}for(var R=0;g.depth>0&&(y=m.exec(P))!==null&&R<g.depth;){if(R+=1,!g.plainObjects&&i.call(Object.prototype,y[1].slice(1,-1))&&!g.allowPrototypes)return;N.push(y[1])}if(y){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");N.push("["+P.slice(y.index)+"]")}return b(N,O,g,p)}},k=function(v){if(!v)return n;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var O=typeof v.charset>"u"?n.charset:v.charset,g=typeof v.duplicates>"u"?n.duplicates:v.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:n.allowDots:!!v.allowDots;return{allowDots:p,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:n.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:n.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:n.arrayLimit,charset:O,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:n.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:n.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:n.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:n.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:n.depth,duplicates:g,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:n.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:n.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:n.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:n.strictNullHandling}};return L1=function(E,v){var O=k(v);if(E===""||E===null||typeof E>"u")return O.plainObjects?Object.create(null):{};for(var g=typeof E=="string"?h(E,O):E,p=O.plainObjects?Object.create(null):{},P=Object.keys(g),d=0;d<P.length;++d){var m=P[d],y=_(m,g[m],O,typeof E=="string");p=e.merge(p,y,O)}return O.allowSparse===!0?p:e.compact(p)},L1}var N1,nb;function OO(){if(nb)return N1;nb=1;var e=SO(),i=EO(),t=_v();return N1={formats:t,parse:i,stringify:e},N1}var rb;function B4(){if(rb)return js;rb=1;var e=tO();function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r",`
|
|
152
|
-
`," "],u=["{","}","|","\\","^","`"].concat(l),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),b=["/","?","#"],_=255,k=/^[+a-z0-9A-Z_-]{0,63}$/,E=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},O={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},p=OO();function P(w,N,R){if(w&&typeof w=="object"&&w instanceof i)return w;var D=new i;return D.parse(w,N,R),D}i.prototype.parse=function(w,N,R){if(typeof w!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof w);var D=w.indexOf("?"),x=D!==-1&&D<w.indexOf("#")?"?":"#",S=w.split(x),A=/\\/g;S[0]=S[0].replace(A,"/"),w=S.join(x);var M=w;if(M=M.trim(),!R&&w.split("#").length===1){var T=a.exec(M);if(T)return this.path=M,this.href=M,this.pathname=T[1],T[2]?(this.search=T[2],N?this.query=p.parse(this.search.substr(1)):this.query=this.search.substr(1)):N&&(this.search="",this.query={}),this}var z=t.exec(M);if(z){z=z[0];var U=z.toLowerCase();this.protocol=U,M=M.substr(z.length)}if(R||z||M.match(/^\/\/[^@/]+@[^@/]+/)){var Q=M.substr(0,2)==="//";Q&&!(z&&O[z])&&(M=M.substr(2),this.slashes=!0)}if(!O[z]&&(Q||z&&!g[z])){for(var K=-1,J=0;J<b.length;J++){var B=M.indexOf(b[J]);B!==-1&&(K===-1||B<K)&&(K=B)}var L,F;K===-1?F=M.lastIndexOf("@"):F=M.lastIndexOf("@",K),F!==-1&&(L=M.slice(0,F),M=M.slice(F+1),this.auth=decodeURIComponent(L)),K=-1;for(var J=0;J<h.length;J++){var B=M.indexOf(h[J]);B!==-1&&(K===-1||B<K)&&(K=B)}K===-1&&(K=M.length),this.host=M.slice(0,K),M=M.slice(K),this.parseHost(),this.hostname=this.hostname||"";var H=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!H)for(var $=this.hostname.split(/\./),J=0,ee=$.length;J<ee;J++){var V=$[J];if(V&&!V.match(k)){for(var X="",Y=0,te=V.length;Y<te;Y++)V.charCodeAt(Y)>127?X+="x":X+=V[Y];if(!X.match(k)){var re=$.slice(0,J),ie=$.slice(J+1),ae=V.match(E);ae&&(re.push(ae[1]),ie.unshift(ae[2])),ie.length&&(M="/"+ie.join(".")+M),this.hostname=re.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),H||(this.hostname=e.toASCII(this.hostname));var ue=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+ue,this.href+=this.host,H&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!v[U])for(var J=0,ee=c.length;J<ee;J++){var pe=c[J];if(M.indexOf(pe)!==-1){var Oe=encodeURIComponent(pe);Oe===pe&&(Oe=escape(pe)),M=M.split(pe).join(Oe)}}var _e=M.indexOf("#");_e!==-1&&(this.hash=M.substr(_e),M=M.slice(0,_e));var Le=M.indexOf("?");if(Le!==-1?(this.search=M.substr(Le),this.query=M.substr(Le+1),N&&(this.query=p.parse(this.query)),M=M.slice(0,Le)):N&&(this.search="",this.query={}),M&&(this.pathname=M),g[U]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ue=this.pathname||"",fe=this.search||"";this.path=ue+fe}return this.href=this.format(),this};function d(w){return typeof w=="string"&&(w=P(w)),w instanceof i?w.format():i.prototype.format.call(w)}i.prototype.format=function(){var w=this.auth||"";w&&(w=encodeURIComponent(w),w=w.replace(/%3A/i,":"),w+="@");var N=this.protocol||"",R=this.pathname||"",D=this.hash||"",x=!1,S="";this.host?x=w+this.host:this.hostname&&(x=w+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(x+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(S=p.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var A=this.search||S&&"?"+S||"";return N&&N.substr(-1)!==":"&&(N+=":"),this.slashes||(!N||g[N])&&x!==!1?(x="//"+(x||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):x||(x=""),D&&D.charAt(0)!=="#"&&(D="#"+D),A&&A.charAt(0)!=="?"&&(A="?"+A),R=R.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),A=A.replace("#","%23"),N+x+R+A+D};function m(w,N){return P(w,!1,!0).resolve(N)}i.prototype.resolve=function(w){return this.resolveObject(P(w,!1,!0)).format()};function y(w,N){return w?P(w,!1,!0).resolveObject(N):N}return i.prototype.resolveObject=function(w){if(typeof w=="string"){var N=new i;N.parse(w,!1,!0),w=N}for(var R=new i,D=Object.keys(this),x=0;x<D.length;x++){var S=D[x];R[S]=this[S]}if(R.hash=w.hash,w.href==="")return R.href=R.format(),R;if(w.slashes&&!w.protocol){for(var A=Object.keys(w),M=0;M<A.length;M++){var T=A[M];T!=="protocol"&&(R[T]=w[T])}return g[R.protocol]&&R.hostname&&!R.pathname&&(R.pathname="/",R.path=R.pathname),R.href=R.format(),R}if(w.protocol&&w.protocol!==R.protocol){if(!g[w.protocol]){for(var z=Object.keys(w),U=0;U<z.length;U++){var Q=z[U];R[Q]=w[Q]}return R.href=R.format(),R}if(R.protocol=w.protocol,!w.host&&!O[w.protocol]){for(var ee=(w.pathname||"").split("/");ee.length&&!(w.host=ee.shift()););w.host||(w.host=""),w.hostname||(w.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),R.pathname=ee.join("/")}else R.pathname=w.pathname;if(R.search=w.search,R.query=w.query,R.host=w.host||"",R.auth=w.auth,R.hostname=w.hostname||w.host,R.port=w.port,R.pathname||R.search){var K=R.pathname||"",J=R.search||"";R.path=K+J}return R.slashes=R.slashes||w.slashes,R.href=R.format(),R}var B=R.pathname&&R.pathname.charAt(0)==="/",L=w.host||w.pathname&&w.pathname.charAt(0)==="/",F=L||B||R.host&&w.pathname,H=F,$=R.pathname&&R.pathname.split("/")||[],ee=w.pathname&&w.pathname.split("/")||[],V=R.protocol&&!g[R.protocol];if(V&&(R.hostname="",R.port=null,R.host&&($[0]===""?$[0]=R.host:$.unshift(R.host)),R.host="",w.protocol&&(w.hostname=null,w.port=null,w.host&&(ee[0]===""?ee[0]=w.host:ee.unshift(w.host)),w.host=null),F=F&&(ee[0]===""||$[0]==="")),L)R.host=w.host||w.host===""?w.host:R.host,R.hostname=w.hostname||w.hostname===""?w.hostname:R.hostname,R.search=w.search,R.query=w.query,$=ee;else if(ee.length)$||($=[]),$.pop(),$=$.concat(ee),R.search=w.search,R.query=w.query;else if(w.search!=null){if(V){R.host=$.shift(),R.hostname=R.host;var X=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;X&&(R.auth=X.shift(),R.hostname=X.shift(),R.host=R.hostname)}return R.search=w.search,R.query=w.query,(R.pathname!==null||R.search!==null)&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!$.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var Y=$.slice(-1)[0],te=(R.host||w.host||$.length>1)&&(Y==="."||Y==="..")||Y==="",re=0,ie=$.length;ie>=0;ie--)Y=$[ie],Y==="."?$.splice(ie,1):Y===".."?($.splice(ie,1),re++):re&&($.splice(ie,1),re--);if(!F&&!H)for(;re--;re)$.unshift("..");F&&$[0]!==""&&(!$[0]||$[0].charAt(0)!=="/")&&$.unshift(""),te&&$.join("/").substr(-1)!=="/"&&$.push("");var ae=$[0]===""||$[0]&&$[0].charAt(0)==="/";if(V){R.hostname=ae?"":$.length?$.shift():"",R.host=R.hostname;var X=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;X&&(R.auth=X.shift(),R.hostname=X.shift(),R.host=R.hostname)}return F=F||R.host&&$.length,F&&!ae&&$.unshift(""),$.length>0?R.pathname=$.join("/"):(R.pathname=null,R.path=null),(R.pathname!==null||R.search!==null)&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=w.auth||R.auth,R.slashes=R.slashes||w.slashes,R.href=R.format(),R},i.prototype.parseHost=function(){var w=this.host,N=n.exec(w);N&&(N=N[0],N!==":"&&(this.port=N.substr(1)),w=w.substr(0,w.length-N.length)),w&&(this.hostname=w)},js.parse=P,js.resolve=m,js.resolveObject=y,js.format=d,js.Url=i,js}var lp={exports:{}},xO=lp.exports,ib;function PO(){return ib||(ib=1,function(e){(function(i,t){e.exports?e.exports=t():i.xmlserializer=t()})(xO,function(){var i=function(v){return v.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},t=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},a=function(v){var O=v.value;return" "+v.name+'="'+t(O)+'"'},l=function(v){var O=v.tagName;return v.namespaceURI==="http://www.w3.org/1999/xhtml"&&(O=O.toLowerCase()),O},u=function(v,O){var g=Array.prototype.map.call(v.attributes||v.attrs,function(p){return p.name}).indexOf("xmlns")>=0;return!g&&(O||v.namespaceURI!==v.parentNode.namespaceURI)?' xmlns="'+v.namespaceURI+'"':""},c=function(v){return Array.prototype.map.call(v.childNodes,function(O){return E(O)}).join("")},h=function(v,O){var g="<"+l(v);return g+=u(v,O),Array.prototype.forEach.call(v.attributes||v.attrs,function(p){g+=a(p)}),v.childNodes.length>0?(g+=">",g+=c(v),g+="</"+l(v)+">"):g+="/>",g},b=function(v){var O=v.nodeValue||v.value||"";return n(O)},_=function(v){return"<!--"+v.data.replace(/-/g,"-")+"-->"},k=function(v){return"<![CDATA["+v.nodeValue+"]]>"},E=function(v,O){var g=O&&O.rootNode;if(v.nodeName==="#document"||v.nodeName==="#document-fragment")return c(v);if(v.tagName)return h(v,g);if(v.nodeName==="#text")return b(v);if(v.nodeName==="#comment")return _(v);if(v.nodeName==="#cdata-section")return k(v)};return{serializeToString:function(v){return i(E(v,{rootNode:!0}))}}})}(lp)),lp.exports}var I1={},ob;function CO(){if(ob)return I1;ob=1;var e=function(l){var u=new XMLSerializer;return Array.prototype.map.call(l.childNodes,function(c){return u.serializeToString(c)}).join("")},i=function(l){if(l.documentElement.tagName==="parsererror"&&l.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return l.documentElement;if((l.documentElement.tagName==="xml"||l.documentElement.tagName==="html")&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0];if(l.documentElement.tagName==="html"&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="body"&&l.documentElement.childNodes[0].childNodes&&l.documentElement.childNodes[0].childNodes.length&&l.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0].childNodes[0]},t=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
153
|
-
?</div>`),new RegExp(`^(.+)
|
|
154
|
-
`)],n=function(l){var u=e(l),c,h;for(c=0;c<t.length;c++)if(h=t[c].exec(u),h)return h[1]},a=function(l){var u;if(l===null)throw new Error("Parse error");var c=i(l);if(c!==void 0)throw u=n(c)||"Parse error",new Error(u)};return I1.failOnParseError=function(l){return a(l),l},I1}var D1={},j1={},ab;function qp(){return ab||(ab=1,function(e){var i=B4();e.getDocumentBaseUrl=function(c){return c.baseURI!=="about:blank"?c.baseURI:null},e.clone=function(c){var h={},b;for(b in c)c.hasOwnProperty(b)&&(h[b]=c[b]);return h},e.cloneArray=function(c){return Array.prototype.slice.apply(c,[0])},e.joinUrl=function(c,h){return c?i.resolve(c,h):h},e.isDataUri=function(c){return/^data:/.test(c)},e.collectAndReportErrors=function(c){var h=[];return Promise.all(c.map(function(b){return b.catch(function(_){h.push(_)})})).then(function(){return h})};var t=null,n=function(c,h){return h===!1||h==="none"||h==="repeated"?((t===null||h!=="repeated")&&(t=Date.now()),c+"?_="+t):c};e.ajax=function(c,h){return new Promise(function(b,_){var k=new window.XMLHttpRequest,E=e.joinUrl(h.baseUrl,c),v,O=function(){_({msg:"Unable to load url",url:E})};v=n(E,h.cache),k.addEventListener("load",function(){k.status===200||k.status===0?b(k.response):O()},!1),k.addEventListener("error",O,!1);try{k.open("GET",v,!0),k.overrideMimeType(h.mimeType),k.send(null)}catch{O()}})},e.binaryAjax=function(c,h){var b=e.clone(h);return b.mimeType="text/plain; charset=x-user-defined",e.ajax(c,b).then(function(_){for(var k="",E=0;E<_.length;E++)k+=String.fromCharCode(_.charCodeAt(E)&255);return k})};var a=function(c){var h=function(b,_){return b.substring(0,_.length)===_};return h(c,"<?xml")||h(c,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(c,h){return e.binaryAjax(c,h).then(function(b){var _=btoa(b),k=a(b);return"data:"+k+";base64,"+_})};var l=[],u=function(c){return l.indexOf(c)<0&&l.push(c),l.indexOf(c)};e.memoize=function(c,h,b){if(typeof b!="object")throw new Error("cacheBucket is not an object");return function(){var _=Array.prototype.slice.call(arguments),k=h(_),E=u(c),v;return b[E]&&b[E][k]?b[E][k]:(v=c.apply(null,_),b[E]=b[E]||{},b[E][k]=v,v)}}}(j1)),j1}var F1={},lb;function kO(){if(lb)return F1;lb=1;var e=qp(),i=function(l,u){var c=null;l.hasAttribute("src")?c=l.getAttribute("src"):l.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=l.getAttributeNS("http://www.w3.org/1999/xlink","href"):l.hasAttribute("href")&&(c=l.getAttribute("href"));var h=e.getDocumentBaseUrl(l.ownerDocument),b=e.clone(u);return!b.baseUrl&&h&&(b.baseUrl=h),e.getDataURIForImageURL(c,b).then(function(_){return _},function(_){throw{resourceType:"image",url:_.url,msg:"Unable to load image "+_.url}})},t=function(l){return l.filter(function(u){var c=null;return u.hasAttribute("src")?c=u.getAttribute("src"):u.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=u.getAttributeNS("http://www.w3.org/1999/xlink","href"):u.hasAttribute("href")&&(c=u.getAttribute("href")),c!==null&&!e.isDataUri(c)})},n=function(l){return Array.prototype.filter.call(l,function(u){return u.type==="image"})},a=function(l){return Array.prototype.slice.call(l)};return F1.inline=function(l,u){var c=a(l.getElementsByTagName("img")),h=a(l.getElementsByTagName("image")),b=n(l.getElementsByTagName("input"));c=c.concat(h),c=c.concat(b);var _=t(c);return e.collectAndReportErrors(_.map(function(k){return i(k,u).then(function(E){k.attributes.src?k.attributes.src.value=E:k.attributes["xlink:href"]?k.attributes["xlink:href"].value=E:k.attributes.href&&(k.attributes.href.value=E)})}))},F1}var z1={},sb;function TO(){if(sb)return z1;sb=1;var e=qp(),i=function(l,u){var c=l.attributes.src.value,h=e.getDocumentBaseUrl(l.ownerDocument),b=e.clone(u);return!b.baseUrl&&h&&(b.baseUrl=h),e.ajax(c,b).catch(function(_){throw{resourceType:"script",url:_.url,msg:"Unable to load script "+_.url}})},t=function(l){return l.replace(/<\//g,"<\\/")},n=function(l,u){l.attributes.removeNamedItem("src"),l.textContent=t(u)},a=function(l){var u=l.getElementsByTagName("script");return Array.prototype.filter.call(u,function(c){return!!c.attributes.src})};return z1.inline=function(l,u){var c=a(l);return e.collectAndReportErrors(c.map(function(h){return i(h,u).then(function(b){n(h,b)})}))},z1}var B1={},U1={},ub;function wv(){return ub||(ub=1,function(e){e.unquoteString=function(i){var t=/^"(.*)"$/,n=/^'(.*)'$/;return t.test(i)?i.replace(t,"$1"):n.test(i)?i.replace(n,"$1"):i},e.rulesForCssText=function(i){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style"),a;return n.textContent=i,t.body.appendChild(n),a=n.sheet.cssRules,Array.prototype.slice.call(a)},e.cssRulesToText=function(i){return i.reduce(function(t,n){return t+n.cssText},"")},e.exchangeRule=function(i,t,n){var a=i.indexOf(t);i[a]=e.rulesForCssText(n)[0]},e.changeFontFaceRuleSrc=function(i,t,n){var a="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(a+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(a+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(a+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),a+="src: "+n+"}",e.exchangeRule(i,t,a)}}(U1)),U1}var q1={},cb;function AO(){return cb||(cb=1,function(e){var i=wv(),t=function(l){var u=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return l.replace(u,"$1")};e.extractCssUrl=function(l){var u=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,c;if(!u.test(l))throw new Error("Invalid url");return c=u.exec(l)[1],i.unquoteString(t(c))};var n=function(l){var u=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,c="(url\\("+u+"\\)|[^,\\s]+)",h="(?:\\s*"+c+")+",b="^\\s*("+h+")(?:\\s*,\\s*("+h+"))*\\s*$",_=new RegExp(h,"g"),k,E=[],v=function(O){var g=new RegExp(c,"g"),p=[],P;for(P=g.exec(O);P;)p.push(P[1]),P=g.exec(O);return p};if(l.match(new RegExp(b))){for(k=_.exec(l);k;)E.push(v(k[0])),k=_.exec(l);return E}return[]},a=function(l){var u,c;for(u=0;u<l.length;u++)try{return c=e.extractCssUrl(l[u]),{url:c,idx:u}}catch{}};e.parse=function(l){var u=n(l);return u.map(function(c){var h=a(c);return h?{preUrl:c.slice(0,h.idx),url:h.url,postUrl:c.slice(h.idx+1)}:{preUrl:c}})},e.serialize=function(l){var u=l.map(function(c){var h=[].concat(c.preUrl);return c.url&&h.push('url("'+c.url+'")'),c.postUrl&&(h=h.concat(c.postUrl)),h.join(" ")});return u.join(", ")}}(q1)),q1}function tp(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H1={exports:{}},fb;function RO(){return fb||(fb=1,function(e,i){(function(t){e.exports=t()})(function(){return function t(n,a,l){function u(b,_){if(!a[b]){if(!n[b]){var k=typeof tp=="function"&&tp;if(!_&&k)return k(b,!0);if(c)return c(b,!0);var E=new Error("Cannot find module '"+b+"'");throw E.code="MODULE_NOT_FOUND",E}var v=a[b]={exports:{}};n[b][0].call(v.exports,function(O){var g=n[b][1][O];return u(g||O)},v,v.exports,t,n,a,l)}return a[b].exports}for(var c=typeof tp=="function"&&tp,h=0;h<l.length;h++)u(l[h]);return u}({1:[function(t,n,a){function l(h,b){function _(){this.constructor=h}_.prototype=b.prototype,h.prototype=new _}function u(h,b,_,k){this.message=h,this.expected=b,this.found=_,this.location=k,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,u)}l(u,Error),u.buildMessage=function(h,b){var _={literal:function(P){return'"'+E(P.text)+'"'},class:function(P){var d="",m;for(m=0;m<P.parts.length;m++)d+=P.parts[m]instanceof Array?v(P.parts[m][0])+"-"+v(P.parts[m][1]):v(P.parts[m]);return"["+(P.inverted?"^":"")+d+"]"},any:function(P){return"any character"},end:function(P){return"end of input"},other:function(P){return P.description}};function k(P){return P.charCodeAt(0).toString(16).toUpperCase()}function E(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(d){return"\\x0"+k(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+k(d)})}function v(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(d){return"\\x0"+k(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+k(d)})}function O(P){return _[P.type](P)}function g(P){var d=new Array(P.length),m,y;for(m=0;m<P.length;m++)d[m]=O(P[m]);if(d.sort(),d.length>0){for(m=1,y=1;m<d.length;m++)d[m-1]!==d[m]&&(d[y]=d[m],y++);d.length=y}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function p(P){return P?'"'+E(P)+'"':"end of input"}return"Expected "+g(h)+" but "+p(b)+" found."};function c(h,b){b=b!==void 0?b:{};var _={},k={start:ue},E=ue,v="",O=function(){return[]},g=",",p=V(",",!1),P=function(se,me){return[se].concat(me)},d=function(se){return[se]},m=function(se,me){return{url:se,format:me}},y=function(se){return{url:se}},w="url(",N=V("url(",!1),R=")",D=V(")",!1),x=function(se){return se},S="format(",A=V("format(",!1),M="local(",T=V("local(",!1),z=function(se){return{local:se}},U=/^[^)]/,Q=X([")"],!0,!1),K=function(se){return Ae.extractValue(se.join(""))},J=/^[ \t\r\n\f]/,B=X([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),L=0,F=[{line:1,column:1}],H=0,$=[],ee;if("startRule"in b){if(!(b.startRule in k))throw new Error(`Can't start parsing from rule "`+b.startRule+'".');E=k[b.startRule]}function V(se,me){return{type:"literal",text:se,ignoreCase:me}}function X(se,me,xe){return{type:"class",parts:se,inverted:me,ignoreCase:xe}}function Y(){return{type:"end"}}function te(se){var me=F[se],xe;if(me)return me;for(xe=se-1;!F[xe];)xe--;for(me=F[xe],me={line:me.line,column:me.column};xe<se;)h.charCodeAt(xe)===10?(me.line++,me.column=1):me.column++,xe++;return F[se]=me,me}function re(se,me){var xe=te(se),Ne=te(me);return{start:{offset:se,line:xe.line,column:xe.column},end:{offset:me,line:Ne.line,column:Ne.column}}}function ie(se){L<H||(L>H&&(H=L,$=[]),$.push(se))}function ae(se,me,xe){return new u(u.buildMessage(se,me),se,me,xe)}function ue(){var se,me;return se=de(),se===_&&(se=L,me=v,me!==_&&(me=O()),se=me),se}function de(){var se,me,xe,Ne,ct,at;if(se=L,me=pe(),me!==_){for(xe=[],Ne=Ce();Ne!==_;)xe.push(Ne),Ne=Ce();if(xe!==_)if(h.charCodeAt(L)===44?(Ne=g,L++):(Ne=_,ie(p)),Ne!==_){for(ct=[],at=Ce();at!==_;)ct.push(at),at=Ce();ct!==_?(at=de(),at!==_?(me=P(me,at),se=me):(L=se,se=_)):(L=se,se=_)}else L=se,se=_;else L=se,se=_}else L=se,se=_;return se===_&&(se=L,me=pe(),me!==_&&(me=d(me)),se=me),se}function pe(){var se;return se=Oe(),se===_&&(se=fe()),se}function Oe(){var se,me,xe,Ne;if(se=L,me=_e(),me!==_){if(xe=[],Ne=Ce(),Ne!==_)for(;Ne!==_;)xe.push(Ne),Ne=Ce();else xe=_;xe!==_?(Ne=Le(),Ne!==_?(me=m(me,Ne),se=me):(L=se,se=_)):(L=se,se=_)}else L=se,se=_;return se===_&&(se=L,me=_e(),me!==_&&(me=y(me)),se=me),se}function _e(){var se,me,xe,Ne;return se=L,h.substr(L,4)===w?(me=w,L+=4):(me=_,ie(N)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(L)===41?(Ne=R,L++):(Ne=_,ie(D)),Ne!==_?(me=x(xe),se=me):(L=se,se=_)):(L=se,se=_)):(L=se,se=_),se}function Le(){var se,me,xe,Ne;return se=L,h.substr(L,7)===S?(me=S,L+=7):(me=_,ie(A)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(L)===41?(Ne=R,L++):(Ne=_,ie(D)),Ne!==_?(me=x(xe),se=me):(L=se,se=_)):(L=se,se=_)):(L=se,se=_),se}function fe(){var se,me,xe,Ne;return se=L,h.substr(L,6)===M?(me=M,L+=6):(me=_,ie(T)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(L)===41?(Ne=R,L++):(Ne=_,ie(D)),Ne!==_?(me=z(xe),se=me):(L=se,se=_)):(L=se,se=_)):(L=se,se=_),se}function ge(){var se,me,xe;if(se=L,me=[],U.test(h.charAt(L))?(xe=h.charAt(L),L++):(xe=_,ie(Q)),xe!==_)for(;xe!==_;)me.push(xe),U.test(h.charAt(L))?(xe=h.charAt(L),L++):(xe=_,ie(Q));else me=_;return me!==_&&(me=K(me)),se=me,se}function Ce(){var se;return J.test(h.charAt(L))?(se=h.charAt(L),L++):(se=_,ie(B)),se}var Ae=t("../util");if(ee=E(),ee!==_&&L===h.length)return ee;throw ee!==_&&L<h.length&&ie(Y()),ae($,H<h.length?h.charAt(H):null,H<h.length?re(H,H+1):re(H,H))}n.exports={SyntaxError:u,parse:c}},{"../util":3}],2:[function(t,n,a){var l=t("./grammar");a.SyntaxError=function(u,c){this.message=u,this.offset=c},a.parse=function(u){try{return l.parse(u)}catch(c){throw new a.SyntaxError(c.message,c.offset)}},a.serialize=function(u){return u.map(function(c){var h;return c.url?(h='url("'+c.url+'")',c.format&&(h+=' format("'+c.format+'")')):h='local("'+c.local+'")',h}).join(", ")}},{"./grammar":1}],3:[function(t,n,a){var l=function(c){var h=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return c.replace(h,"$1")},u=function(c){var h=/^"(.*)"$/,b=/^'(.*)'$/;return h.test(c)?c.replace(h,"$1"):b.test(c)?c.replace(b,"$1"):c};a.extractValue=function(c){return u(l(c))}},{}]},{},[2])(2)})}(H1)),H1.exports}var db;function MO(){return db||(db=1,function(e){var i=qp(),t=wv(),n=AO(),a=RO(),l=function(d,m,y){d.style.setProperty(m,y,d.style.getPropertyPriority(m))},u=function(d){return d.filter(function(m){return m.type===window.CSSRule.STYLE_RULE&&(m.style.getPropertyValue("background-image")||m.style.getPropertyValue("background"))})},c=function(d){var m=[];return d.forEach(function(y){y.style.getPropertyValue("background-image")?m.push({property:"background-image",value:y.style.getPropertyValue("background-image"),rule:y}):y.style.getPropertyValue("background")&&m.push({property:"background",value:y.style.getPropertyValue("background"),rule:y})}),m},h=function(d){return d.filter(function(m){return m.type===window.CSSRule.FONT_FACE_RULE&&m.style.getPropertyValue("src")})},b=function(d){return d.filter(function(m){return m.type===window.CSSRule.IMPORT_RULE&&m.href})},_=function(d){var m=[];return d.forEach(function(y,w){y.url&&!i.isDataUri(y.url)&&m.push(w)}),m},k=function(d){var m=[];return d.forEach(function(y,w){y.url&&!i.isDataUri(y.url)&&m.push(w)}),m};e.adjustPathsOfCssResources=function(d,m){var y=u(m),w=c(y),N=!1;return w.forEach(function(R){var D=n.parse(R.value),x=_(D),S;x.length>0&&(x.forEach(function(A){var M=D[A].url,T=i.joinUrl(d,M);D[A].url=T}),S=n.serialize(D),l(R.rule,R.property,S),N=!0)}),h(m).forEach(function(R){var D=R.style.getPropertyValue("src"),x,S;try{x=a.parse(D)}catch{return}S=k(x),S.length>0&&(S.forEach(function(A){var M=x[A].url,T=i.joinUrl(d,M);x[A].url=T}),t.changeFontFaceRuleSrc(m,R,a.serialize(x)),N=!0)}),b(m).forEach(function(R){var D=R.href,x=i.joinUrl(d,D);t.exchangeRule(m,R,"@import url("+x+");"),N=!0}),N};var E=function(d,m,y){var w=d.indexOf(m);d.splice(w,1),y.forEach(function(N,R){d.splice(w+R,0,N)})},v=function(d,m,y,w){var N=m.href,R;return N=t.unquoteString(N),R=i.joinUrl(w.baseUrl,N),y.indexOf(R)>=0?(E(d,m,[]),Promise.resolve([])):(y.push(R),i.ajax(N,w).then(function(D){var x=t.rulesForCssText(D);return e.loadCSSImportsForRules(x,y,w).then(function(S){return e.adjustPathsOfCssResources(N,x),E(d,m,x),S.errors})},function(D){throw{resourceType:"stylesheet",url:D.url,msg:"Unable to load stylesheet "+D.url}}))};e.loadCSSImportsForRules=function(d,m,y){var w=b(d),N=[],R=!1;return Promise.all(w.map(function(D){return v(d,D,m,y).then(function(x){N=N.concat(x),R=!0},function(x){N.push(x)})})).then(function(){return{hasChanges:R,errors:N}})};var O=function(d,m){var y=n.parse(d),w=_(y),N=!1;return i.collectAndReportErrors(w.map(function(R){var D=y[R].url;return i.getDataURIForImageURL(D,m).then(function(x){y[R].url=x,N=!0},function(x){throw{resourceType:"backgroundImage",url:x.url,msg:"Unable to load background-image "+x.url}})})).then(function(R){return{backgroundValue:n.serialize(y),hasChanges:N,errors:R}})},g=function(d,m){var y=u(d),w=c(y),N=[],R=!1;return Promise.all(w.map(function(D){return O(D.value,m).then(function(x){x.hasChanges&&(l(D.rule,D.property,x.backgroundValue),R=!0),N=N.concat(x.errors)})})).then(function(){return{hasChanges:R,errors:N}})},p=function(d,m){var y=!1,w,N;try{w=a.parse(d)}catch{w=[]}return N=k(w),i.collectAndReportErrors(N.map(function(R){var D=w[R],x=D.format||"woff";return i.binaryAjax(D.url,m).then(function(S){var A=btoa(S);D.url="data:font/"+x+";base64,"+A,y=!0},function(S){throw{resourceType:"fontFace",url:S.url,msg:"Unable to load font-face "+S.url}})})).then(function(R){return{srcDeclarationValue:a.serialize(w),hasChanges:y,errors:R}})},P=function(d,m){var y=h(d),w=[],N=!1;return Promise.all(y.map(function(R){var D=R.style.getPropertyValue("src");return p(D,m).then(function(x){x.hasChanges&&(t.changeFontFaceRuleSrc(d,R,x.srcDeclarationValue),N=!0),w=w.concat(x.errors)})})).then(function(){return{hasChanges:N,errors:w}})};e.loadAndInlineCSSResourcesForRules=function(d,m){var y=!1,w=[];return Promise.all([g,P].map(function(N){return N(d,m).then(function(R){y=y||R.hasChanges,w=w.concat(R.errors)})})).then(function(){return{hasChanges:y,errors:w}})}}(B1)),B1}var hb;function LO(){return hb||(hb=1,function(e){var i=qp(),t=kO(),n=TO(),a=MO(),l=wv(),u=function(p){return i.joinUrl(p,".")},c=function(p){var P=p.map(function(d,m){return m===p.length-1&&(d={baseUrl:u(d.baseUrl)}),JSON.stringify(d)});return P},h=function(p,P){return P.cache!==!1&&P.cache!=="none"&&P.cacheBucket?i.memoize(p,c,P.cacheBucket):p},b=function(p,P,d){var m=l.rulesForCssText(p);return a.loadCSSImportsForRules(m,P,d).then(function(y){return a.loadAndInlineCSSResourcesForRules(m,d).then(function(w){var N=y.errors.concat(w.errors),R=y.hasChanges||w.hasChanges;return R&&(p=l.cssRulesToText(m)),{hasChanges:R,content:p,errors:N}})})},_=function(p,P,d){var m=p.textContent,y=h(b,P);return y(m,d,P).then(function(w){return w.hasChanges&&(p.childNodes[0].nodeValue=w.content),i.cloneArray(w.errors)})},k=function(p){var P=p.getElementsByTagName("style");return Array.prototype.filter.call(P,function(d){return!d.attributes.type||d.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(p,P){var d=k(p),m=[],y=[],w;return w=i.clone(P),w.baseUrl=w.baseUrl||i.getDocumentBaseUrl(p),Promise.all(d.map(function(N){return _(N,w,y).then(function(R){m=m.concat(R)})})).then(function(){return m})};var E=function(p,P){var d=p.parentNode,m;P=P.trim(),P&&(m=p.ownerDocument.createElement("style"),m.type="text/css",m.appendChild(p.ownerDocument.createTextNode(P)),d.insertBefore(m,p)),d.removeChild(p)},v=function(p,P){return i.ajax(p,P).then(function(d){var m=l.rulesForCssText(d);return{content:d,cssRules:m}}).then(function(d){var m=a.adjustPathsOfCssResources(p,d.cssRules);return{content:d.content,cssRules:d.cssRules,hasChanges:m}}).then(function(d){return a.loadCSSImportsForRules(d.cssRules,[],P).then(function(m){return{content:d.content,cssRules:d.cssRules,hasChanges:d.hasChanges||m.hasChanges,errors:m.errors}})}).then(function(d){return a.loadAndInlineCSSResourcesForRules(d.cssRules,P).then(function(m){return{content:d.content,cssRules:d.cssRules,hasChanges:d.hasChanges||m.hasChanges,errors:d.errors.concat(m.errors)}})}).then(function(d){var m=d.content;return d.hasChanges&&(m=l.cssRulesToText(d.cssRules)),{content:m,errors:d.errors}})},O=function(p,P){var d=p.attributes.href.value,m=i.getDocumentBaseUrl(p.ownerDocument),y=i.clone(P);!y.baseUrl&&m&&(y.baseUrl=m);var w=h(v,P);return w(d,y).then(function(N){return{content:N.content,errors:i.cloneArray(N.errors)}})},g=function(p){var P=p.getElementsByTagName("link");return Array.prototype.filter.call(P,function(d){return d.attributes.rel&&d.attributes.rel.value==="stylesheet"&&(!d.attributes.type||d.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(p,P){var d=g(p),m=[];return Promise.all(d.map(function(y){return O(y,P).then(function(w){E(y,w.content+`
|
|
156
|
-
`),m=m.concat(w.errors)},function(w){m.push({resourceType:"stylesheet",url:w.url,msg:"Unable to load stylesheet "+w.url})})})).then(function(){return m})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(p,P){var d=[],m=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return P.inlineScripts!==!1&&m.push(e.loadAndInlineScript),Promise.all(m.map(function(y){return y(p,P).then(function(w){d=d.concat(w)})})).then(function(){return d})}}(D1)),D1}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
157
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
158
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */var NO=ap.exports,pb;function IO(){return pb||(pb=1,function(e){(function(i,t){i===void 0&&window!==void 0&&(i=window),e.exports?e.exports=t(B4(),PO(),CO(),LO()):i.rasterizeHTML=t(i.url,i.xmlserializer,i.sanedomparsererror,i.inlineresources)})(NO,function(i,t,n,a){var l=function(O){var g={},p=[];g.joinUrl=function(m,y){return m?O.resolve(m,y):y},g.getConstantUniqueIdFor=function(m){return p.indexOf(m)<0&&p.push(m),p.indexOf(m)},g.clone=function(m){var y={},w;for(w in m)m.hasOwnProperty(w)&&(y[w]=m[w]);return y};var P=function(m){return typeof m=="object"&&m!==null},d=function(m){return P(m)&&Object.prototype.toString.apply(m).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return g.parseOptionalParameters=function(m){var y={canvas:null,options:{}};return m[0]==null||d(m[0])?(y.canvas=m[0]||null,y.options=g.clone(m[1])):y.options=g.clone(m[0]),y},g}(i),u=function(O){var g={},p=function(P,d,m){var y=P[d];return P[d]=function(){var w=Array.prototype.slice.call(arguments);return m.apply(this,[w,y])},y};return g.baseUrlRespectingXhr=function(P,d){var m=function(){var y=new P;return p(y,"open",function(w,N){var R=w.shift(),D=w.shift(),x=O.joinUrl(d,D);return N.apply(this,[R,x].concat(w))}),y};return m},g.finishNotifyingXhr=function(P){var d=0,m=0,y=!1,w,N=new Promise(function(D){w=function(){var x=d-m;x<=0&&y&&D({totalCount:d})}}),R=function(){var D=new P;return p(D,"send",function(x,S){return d+=1,S.apply(this,arguments)}),D.addEventListener("load",function(){m+=1,w()}),D};return R.waitForRequestsToFinish=function(){return y=!0,w(),N},R},g}(l),c=function(){var O={},g=function(R){return Array.prototype.slice.call(R)};O.addClassName=function(R,D){R.className+=" "+D},O.addClassNameRecursively=function(R,D){O.addClassName(R,D),R.parentNode!==R.ownerDocument&&O.addClassNameRecursively(R.parentNode,D)};var p=function(R,D){var x=R.parentStyleSheet,S=g(x.cssRules).indexOf(R);x.insertRule(D,S+1),x.deleteRule(S)},P=function(R,D){var x=R.cssText.replace(/^[^\{]+/,""),S=D+" "+x;p(R,S)},d=function(R){return g(R).reduce(function(D,x){return D+x.cssText},"")},m=function(R){R.textContent=d(R.sheet.cssRules)},y=function(R){var D=document.implementation.createHTMLDocument(""),x=document.createElement("style");x.textContent=R.textContent,D.body.appendChild(x),R.sheet=x.sheet},w=function(R){return"((?:^|[^.#:\\w])|(?=\\W))("+R.join("|")+")(?=\\W|$)"},N=function(R,D,x){var S=w(D);g(R.querySelectorAll("style")).forEach(function(A){typeof A.sheet>"u"&&y(A);var M=g(A.sheet.cssRules).filter(function(T){return T.selectorText&&new RegExp(S,"i").test(T.selectorText)});M.length&&(M.forEach(function(T){var z=T.selectorText.replace(new RegExp(S,"gi"),function(U,Q,K){return Q+x(K)});z!==T.selectorText&&P(T,z)}),m(A))})};return O.rewriteCssSelectorWith=function(R,D,x){N(R,[D],function(){return x})},O.lowercaseCssTypeSelectors=function(R,D){N(R,D,function(x){return x.toLowerCase()})},O.findHtmlOnlyNodeNames=function(R){var D=R.ownerDocument.createTreeWalker(R,NodeFilter.SHOW_ELEMENT),x={},S={},A;do A=D.currentNode.tagName.toLowerCase(),D.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?x[A]=!0:S[A]=!0;while(D.nextNode());return Object.keys(x).filter(function(M){return!S[M]})},O}(),h=function(O){var g={},p=function(d){return Array.prototype.slice.call(d)},P={active:!0,hover:!0,focus:!1,target:!1};return g.fakeUserAction=function(d,m,y){var w=d.querySelector(m),N=":"+y,R="rasterizehtml"+y;w&&(P[y]?O.addClassNameRecursively(w,R):O.addClassName(w,R),O.rewriteCssSelectorWith(d,N,"."+R))},g.persistInputValues=function(d){var m=d.querySelectorAll("input"),y=d.querySelectorAll("textarea"),w=function(N){return N.type==="checkbox"||N.type==="radio"};p(m).filter(w).forEach(function(N){N.checked?N.setAttribute("checked",""):N.removeAttribute("checked")}),p(m).filter(function(N){return!w(N)}).forEach(function(N){N.setAttribute("value",N.value)}),p(y).forEach(function(N){N.textContent=N.value})},g.rewriteTagNameSelectorsToLowerCase=function(d){O.lowercaseCssTypeSelectors(d,O.findHtmlOnlyNodeNames(d))},g}(c),b=function(O,g,p,P){var d={},m=function(K,J,B,L){var F=K.createElement(J);return F.style.visibility="hidden",F.style.width=B+"px",F.style.height=L+"px",F.style.position="absolute",F.style.top=-1e4-L+"px",F.style.left=-1e4-B+"px",K.getElementsByTagName("body")[0].appendChild(F),F},y=function(K){return K>0?new Promise(function(J){setTimeout(J,K)}):Promise.resolve()};d.executeJavascript=function(K,J){return new Promise(function(B){var L=m(P.document,"iframe",J.width,J.height),F=K.outerHTML,H=[],$=J.executeJsTimeout||0,ee=function(){P.document.getElementsByTagName("body")[0].removeChild(L)},V=function(){var re=L.contentDocument;B({document:re,errors:H,cleanUp:ee})},X=L.contentWindow.XMLHttpRequest,Y=g.finishNotifyingXhr(X),te=g.baseUrlRespectingXhr(Y,J.baseUrl);L.onload=function(){y($).then(Y.waitForRequestsToFinish).then(V)},L.contentDocument.open(),L.contentWindow.XMLHttpRequest=te,L.contentWindow.onerror=function(re){H.push({resourceType:"scriptExecution",msg:re})},L.contentDocument.write("<!DOCTYPE html>"),L.contentDocument.write(F),L.contentDocument.close()})};var w=function(K,J,B){var L=K.createElement("iframe");return L.style.width=J+"px",L.style.height=B+"px",L.style.visibility="hidden",L.style.position="absolute",L.style.top=-1e4-B+"px",L.style.left=-1e4-J+"px",L.style.borderWidth=0,L.sandbox="allow-same-origin",L.scrolling="no",L},N=function(K,J,B){var L=Math.floor(K/B),F=Math.floor(J/B);return w(P.document,L,F)},R=function(K,J,B,L){return{width:Math.max(K.width*L,J),height:Math.max(K.height*L,B)}},D=function(K,J){var B=K.querySelector(J);if(B)return B;if(K.ownerDocument.querySelector(J)===K)return K;throw{message:"Clipping selector not found"}},x=function(K,J,B,L,F){var H=Math.max(K.scrollWidth,K.clientWidth),$=Math.max(K.scrollHeight,K.clientHeight),ee,V,X,Y,te,re,ie,ae;return J?(re=D(K,J),ie=re.getBoundingClientRect(),ee=ie.top,V=ie.left,X=ie.width,Y=ie.height):(ee=0,V=0,X=H,Y=$),ae=R({width:X,height:Y},B,L,F),te=P.getComputedStyle(K.ownerDocument.documentElement).fontSize,{left:V,top:ee,width:ae.width,height:ae.height,viewportWidth:H,viewportHeight:$,rootFontSize:te}},S=function(K,J){var B=K.tagName;return J.querySelector(B)},A=function(K){var J=K.tagName.toLowerCase();return J==="html"||J==="body"?K.outerHTML:'<body style="margin: 0;">'+K.outerHTML+"</body>"};d.calculateDocumentContentSize=function(K,J){return new Promise(function(B,L){var F=J.zoom||1,H;H=N(J.width,J.height,F),P.document.getElementsByTagName("body")[0].appendChild(H),H.onload=function(){var $=H.contentDocument,ee;try{ee=x(S(K,$),J.clip,J.width,J.height,F),B(ee)}catch(V){L(V)}finally{P.document.getElementsByTagName("body")[0].removeChild(H)}},H.contentDocument.open(),H.contentDocument.write("<!DOCTYPE html>"),H.contentDocument.write(A(K)),H.contentDocument.close()})},d.parseHtmlFragment=function(K){var J=P.document.implementation.createHTMLDocument("");J.documentElement.innerHTML=K;var B=J.querySelector("body").firstChild;if(!B)throw"Invalid source";return B};var M=function(K,J){var B=/<html((?:\s+[^>]*)?)>/im.exec(J),L=P.document.implementation.createHTMLDocument(""),F,H,$,ee;if(B)for(F="<div"+B[1]+"></div>",L.documentElement.innerHTML=F,$=L.querySelector("div"),H=0;H<$.attributes.length;H++)ee=$.attributes[H],K.documentElement.setAttribute(ee.name,ee.value)};d.parseHTML=function(K){var J=P.document.implementation.createHTMLDocument("");return J.documentElement.innerHTML=K,M(J,K),J};var T=function(K){try{return p.failOnParseError(K)}catch(J){throw{message:"Invalid source",originalError:J}}};d.validateXHTML=function(K){var J=new DOMParser,B=J.parseFromString(K,"application/xml");T(B)};var z=null,U=function(K,J){return J==="none"||J==="repeated"?((z===null||J!=="repeated")&&(z=Date.now()),K+"?_="+z):K},Q=function(K,J){return new Promise(function(B,L){var F=new window.XMLHttpRequest,H=O.joinUrl(J.baseUrl,K),$=U(H,J.cache),ee=function(V){L({message:"Unable to load page",originalError:V})};F.addEventListener("load",function(){F.status===200||F.status===0?B(F.responseXML):ee(F.statusText)},!1),F.addEventListener("error",function(V){ee(V)},!1);try{F.open("GET",$,!0),F.responseType="document",F.send(null)}catch(V){ee(V)}})};return d.loadDocument=function(K,J){return Q(K,J).then(function(B){return T(B)})},d}(l,u,n,window),_=function(O){var g={},p=function(S,A){return A?URL.createObjectURL(new Blob([S],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(S)},P=function(S){S instanceof Blob&&URL.revokeObjectURL(S)},d='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',m=function(S){return new Promise(function(A,M){var T=document.createElement("canvas"),z=new Image;z.onload=function(){var U=T.getContext("2d");try{U.drawImage(z,0,0),T.toDataURL("image/png"),A(!0)}catch{A(!1)}},z.onerror=M,z.src=S})},y=function(){var S=p(d,!0);return m(S).then(function(A){return P(S),A?!1:m(p(d,!1)).then(function(M){return M})},function(){return!1})},w=function(){if(O.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},N=function(){return new Promise(function(S,A){w()&&O.URL?y().then(function(M){S(!M)},function(){A()}):S(!1)})},R,D=function(){return R===void 0&&(R=N()),R},x=function(S){return D().then(function(A){return p(S,A)})};return g.renderSvg=function(S){return new Promise(function(A,M){var T,z,U=function(){z.onload=null,z.onerror=null},Q=function(){T&&P(T)};z=new Image,z.onload=function(){U(),Q(),A(z)},z.onerror=function(){Q(),M()},x(S).then(function(K){T=K,z.src=T},M)})},g}(window),k=function(O,g,p,P){var d={},m=function(S,A){var M=A||1,T={width:S.width,height:S.height,"font-size":S.rootFontSize};return M!==1&&(T.style="transform:scale("+M+"); transform-origin: 0 0;"),T},y=function(S){var A,M,T,z;A=Math.round(S.viewportWidth),M=Math.round(S.viewportHeight),T=-S.left,z=-S.top;var U={x:T,y:z,width:A,height:M};return U},w=function(S){var A=S.style||"";S.style=A+"float: left;"},N=function(S){S.externalResourcesRequired=!0},R=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},D=function(S){var A=Object.keys(S);return A.length?" "+A.map(function(M){return M+'="'+S[M]+'"'}).join(" "):""},x=function(S,A,M){var T=P.serializeToString(S);g.validateXHTML(T);var z=y(A);return w(z),N(z),'<svg xmlns="http://www.w3.org/2000/svg"'+D(m(A,M))+">"+R()+"<foreignObject"+D(z)+">"+T+"</foreignObject></svg>"};return d.getSvgForDocument=function(S,A,M){return p.rewriteTagNameSelectorsToLowerCase(S),x(S,A,M)},d.drawDocumentAsSvg=function(S,A){return["hover","active","focus","target"].forEach(function(M){A[M]&&p.fakeUserAction(S,A[M],M)}),g.calculateDocumentContentSize(S,A).then(function(M){return d.getSvgForDocument(S,M,A.zoom)})},d}(l,b,h,t),E=function(O,g,p,P,d,m){var y={},w=function(S){return{message:"Error rendering page",originalError:S}},N=function(S){return d.renderSvg(S).then(function(A){return{image:A,svg:S}},function(A){throw w(A)})},R=function(S,A){try{A.getContext("2d").drawImage(S,0,0)}catch(M){throw w(M)}},D=function(S,A,M){return P.drawDocumentAsSvg(S,M).then(N).then(function(T){return A&&R(T.image,A),T})},x=function(S,A){return g.executeJavascript(S,A).then(function(M){var T=M.document;return p.persistInputValues(T),{document:T,errors:M.errors,cleanUp:M.cleanUp}})};return y.rasterize=function(S,A,M){var T;return T=O.clone(M),T.inlineScripts=M.executeJs===!0,m.inlineReferences(S,T).then(function(z){return M.executeJs?x(S,M).then(function(U){return{element:U.document.documentElement,errors:z.concat(U.errors),cleanUp:U.cleanUp}}):{element:S,errors:z,cleanUp:function(){}}}).then(function(z){return D(z.element,A,M).then(function(U){return z.cleanUp(),{image:U.image,svg:U.svg,errors:z.errors}})})},y}(l,b,h,k,_,a),v=function(O,g,p){var P={},d=function(R,D){var x=300,S=200,A=R?R.width:x,M=R?R.height:S,T=D.width!==void 0?D.width:A,z=D.height!==void 0?D.height:M;return{width:T,height:z}},m=function(R){var D=d(R.canvas,R.options),x;return x=O.clone(R.options),x.width=D.width,x.height=D.height,x};P.drawDocument=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),x=O.parseOptionalParameters(D),S=R.documentElement?R.documentElement:R;return p.rasterize(S,x.canvas,m(x))};var y=function(R,D,x){var S=g.parseHTML(R);return P.drawDocument(S,D,x)};P.drawHTML=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),x=O.parseOptionalParameters(D);return y(R,x.canvas,x.options)};var w=function(R,D,x){var S=document.implementation.createHTMLDocument("");S.replaceChild(R.documentElement,S.documentElement);var A=x?O.clone(x):{};return x.baseUrl||(A.baseUrl=D),{document:S,options:A}},N=function(R,D,x){return g.loadDocument(R,x).then(function(S){var A=w(S,R,x);return P.drawDocument(A.document,D,A.options)})};return P.drawURL=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),x=O.parseOptionalParameters(D);return N(R,x.canvas,x.options)},P}(l,b,E);return v})}(ap)),ap.exports}var gb;function U4(){return gb||(gb=1,function(e){var i=Va&&Va.__createBinding||(Object.create?function(y,w,N,R){R===void 0&&(R=N);var D=Object.getOwnPropertyDescriptor(w,N);D&&!("get"in D?!w.__esModule:D.writable||D.configurable)||(D={enumerable:!0,get:function(){return w[N]}}),Object.defineProperty(y,R,D)}:function(y,w,N,R){R===void 0&&(R=N),y[R]=w[N]}),t=Va&&Va.__setModuleDefault||(Object.create?function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}:function(y,w){y.default=w}),n=Va&&Va.__importStar||function(){var y=function(w){return y=Object.getOwnPropertyNames||function(N){var R=[];for(var D in N)Object.prototype.hasOwnProperty.call(N,D)&&(R[R.length]=D);return R},y(w)};return function(w){if(w&&w.__esModule)return w;var N={};if(w!=null)for(var R=y(w),D=0;D<R.length;D++)R[D]!=="default"&&i(N,w,R[D]);return t(N,w),N}}();Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=v,e.detectSize=O,e.htmlToCanvas=m;const a=n(IO()),l=Bd(),u=I4();e.resetStyleContent=`
|
|
159
|
-
p {
|
|
160
|
-
margin: 0;
|
|
161
|
-
padding: 0;
|
|
162
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
163
|
-
/* a text may have several spaces, we need to preserve them */
|
|
164
|
-
white-space: pre-wrap;
|
|
165
|
-
}
|
|
166
|
-
ul, ol {
|
|
167
|
-
list-style-position: outside;
|
|
168
|
-
margin: 0;
|
|
169
|
-
padding: 0;
|
|
170
|
-
display: inline-block;
|
|
171
|
-
text-align: left;
|
|
172
|
-
width: 100%;
|
|
173
|
-
/*
|
|
174
|
-
* somehow display: inline-block is removing text-decoration
|
|
175
|
-
* let's try to restore it that way
|
|
176
|
-
*/
|
|
177
|
-
text-decoration: inherit;
|
|
178
|
-
}
|
|
179
|
-
li {
|
|
180
|
-
margin-left: 1.7em;
|
|
181
|
-
padding-left: 0.5em; /* This should match the margin-left value */
|
|
182
|
-
}
|
|
183
|
-
/* Add resets */
|
|
184
|
-
ul {
|
|
185
|
-
list-style-type: disc;
|
|
186
|
-
}
|
|
187
|
-
ol {
|
|
188
|
-
list-style-type: decimal;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
`;const c=`
|
|
192
|
-
<style>
|
|
193
|
-
html, body {
|
|
194
|
-
padding: 0;
|
|
195
|
-
margin: 0;
|
|
196
|
-
}
|
|
197
|
-
${e.resetStyleContent}
|
|
198
|
-
</style>
|
|
199
|
-
`;let h;const b=()=>(h||(h=document.createElement("div"),h.id="polotno-hidden-do-not-touch",h.style.overflow="hidden",h.style.position="relative",document.body.appendChild(h),h.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),h),_=new Map,k=navigator.userAgent.includes("Firefox"),E=async y=>{if(_.has(y))return _.get(y);const w=(async()=>{const N=`<div style="font-family: ${y}; font-size: 100px;">${y}<strong>${y}</strong></div>`,R=document.createElement("div");R.innerHTML=N,R.style.visibility="hidden",R.style.position="absolute";const D=b();D.appendChild(R);const x=k?180:50;await new Promise(S=>setTimeout(S,x)),D.removeChild(R)})();return _.set(y,w),w};function v({html:y}){const w=document.createElement("div");w.innerHTML=y,w.style.display="inline-block",w.style.position="fixed",w.style.top="0px",w.style.left="0px",w.style.zIndex="1000",w.style.whiteSpace="nowrap",w.style.visibility="hidden";const N=b();N.appendChild(w);const R=w.textContent,D=w.childNodes[0],x=R.split(/\s+/);let S=!1;for(let A=0;A<x.length;A++){const M=x[A];if(D.textContent=M,S=D.scrollWidth>w.clientWidth,S)break}return N.removeChild(w),S}function O(y){y.indexOf("Avellino");const w=document.createElement("div");w.innerHTML=y,w.style.display="inline-block",w.style.position="fixed",w.style.top="0px",w.style.left="0px",w.style.zIndex="1000";const N=b();N.appendChild(w);const R=w.getBoundingClientRect();return N.removeChild(w),{width:R.width,height:R.height}}e.prerenderFont=E;const g={};function p(y){const w=[];for(const N of document.styleSheets)try{for(const R of N.cssRules)R instanceof CSSFontFaceRule&&R.style.fontFamily.replace(/['"]/g,"")===y&&w.push(R)}catch(R){console.warn(`Could not access stylesheet: ${N.href}`,R)}return w}const P={},d=y=>{if(P[y])return P[y];const w=p(y).filter(N=>N.style.fontFamily.replace(/['"]/g,"")===y).map(N=>({src:N.style.src,fontStyle:N.style.fontStyle||"normal",fontWeight:N.style.fontWeight||"normal"}));return P[y]=w,w};async function m({html:y,width:w,height:N,fontFamily:R,padding:D,font:x,pixelRatio:S}){if(R!=="Arial"&&!x){const z=(0,l.getGoogleFontsVariants)();y+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${R}:${z}" rel="stylesheet">`}if(x){const z=x.styles||(x.url?[{src:`url("${x.url}")`}]:d(R));y+="<style>",z.forEach(U=>{y+=`
|
|
200
|
-
@font-face {
|
|
201
|
-
font-family: '${R}';
|
|
202
|
-
src: ${U.src};
|
|
203
|
-
font-style: ${U.fontStyle||"normal"};
|
|
204
|
-
font-weight: ${U.fontWeight||"normal"};
|
|
205
|
-
}
|
|
206
|
-
`}),y+="</style>"}y+=c;const A=document.createElement("canvas"),M=await a.drawHTML(`<div style="padding: ${D}px;">${y}</div>`,A,{width:w+2*D,height:N+2*D,cacheBucket:g});(0,u.trySetCanvasSize)(A,(w+2*D)*S,(N+2*D)*S);const T=A.getContext("2d");return T==null||T.drawImage(M.image,0,0,A.width,A.height),A}}(Va)),Va}var Zu={},G1={},vb;function q4(){return vb||(vb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=k,e.setup=P,e.styled=d;let i={data:""},t=m=>typeof window=="object"?((m?m.querySelector("#_goober"):window._goober)||Object.assign((m||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:m||i,n=m=>{let y=t(m),w=y.data;return y.data="",w},a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/|\s\s+|\n/g,u=(m,y)=>{let w="",N="",R="";for(let D in m){let x=m[D];D[0]=="@"?D[1]=="i"?w=D+" "+x+";":N+=D[1]=="f"?u(x,D):D+"{"+u(x,D[1]=="k"?"":y)+"}":typeof x=="object"?N+=u(x,y?y.replace(/([^,])+/g,S=>D.replace(/(^:.*)|([^,])+/g,A=>/&/.test(A)?A.replace(/&/g,S):S?S+" "+A:A)):D):x!=null&&(D=D.replace(/[A-Z]/g,"-$&").toLowerCase(),R+=u.p?u.p(D,x):D+":"+x+";")}return w+(y&&R?y+"{"+R+"}":R)+N},c={},h=m=>{if(typeof m=="object"){let y="";for(let w in m)y+=w+h(m[w]);return y}return m},b=(m,y,w,N,R)=>{let D=h(m),x=c[D]||(c[D]=(S=>{let A=0,M=11;for(;A<S.length;)M=101*M+S.charCodeAt(A++)>>>0;return"go"+M})(D));if(!c[x]){let S=D!==m?m:(A=>{let M,T=[{}];for(;M=a.exec(A.replace(l,""));)M[4]?T.shift():M[3]?T.unshift(T[0][M[3]]=T[0][M[3]]||{}):T[0][M[1]]=M[2];return T[0]})(m);c[x]=u(R?{["@keyframes "+x]:S}:S,w?"":"."+x)}return((S,A,M)=>{A.data.indexOf(S)==-1&&(A.data=M?S+A.data:A.data+S)})(c[x],y,N),x},_=(m,y,w)=>m.reduce((N,R,D)=>{let x=y[D];if(x&&x.call){let S=x(w),A=S&&S.props&&S.props.className||/^go/.test(S)&&S;x=A?"."+A:S&&typeof S=="object"?S.props?"":u(S,""):S===!1?"":S}return N+R+(x??"")},"");function k(m){let y=this||{},w=m.call?m(y.p):m;return b(w.unshift?w.raw?_(w,[].slice.call(arguments,1),y.p):w.reduce((N,R)=>Object.assign(N,R&&R.call?R(y.p):R),{}):w,t(y.target),y.g,y.o,y.k)}e.extractCss=n;let E,v,O,g=k.bind({g:1}),p=k.bind({k:1});function P(m,y,w,N){u.p=y,E=m,v=w,O=N}function d(m,y){let w=this||{};return function(){let N=arguments;function R(D,x){let S=Object.assign({},D),A=S.className||R.className;w.p=Object.assign({theme:v&&v()},S),w.o=/ *go\d+/.test(A),S.className=k.apply(w,N)+(A?" "+A:""),y&&(S.ref=x);let M=m;return m[0]&&(M=S.as||m,delete S.as),O&&M[0]&&O(S),E(M,S)}return y?y(R):R}}e.glob=g,e.keyframes=p}(G1)),G1}var mb;function DO(){if(mb)return Zu;mb=1;var e=Zu&&Zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zu,"__esModule",{value:!0});const i=e(Tn()),t=q4();return(0,t.setup)(i.default.createElement),Zu.default=t.styled,Zu}var yb;function jO(){return yb||(yb=1,function(e){var i=So&&So.__createBinding||(Object.create?function(B,L,F,H){H===void 0&&(H=F);var $=Object.getOwnPropertyDescriptor(L,F);$&&!("get"in $?!L.__esModule:$.writable||$.configurable)||($={enumerable:!0,get:function(){return L[F]}}),Object.defineProperty(B,H,$)}:function(B,L,F,H){H===void 0&&(H=F),B[H]=L[F]}),t=So&&So.__setModuleDefault||(Object.create?function(B,L){Object.defineProperty(B,"default",{enumerable:!0,value:L})}:function(B,L){B.default=L}),n=So&&So.__importStar||function(){var B=function(L){return B=Object.getOwnPropertyNames||function(F){var H=[];for(var $ in F)Object.prototype.hasOwnProperty.call(F,$)&&(H[H.length]=$);return H},B(L)};return function(L){if(L&&L.__esModule)return L;var F={};if(L!=null)for(var H=B(L),$=0;$<H.length;$++)H[$]!=="default"&&i(F,L,H[$]);return t(F,L),F}}(),a=So&&So.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.quillRef=void 0;const l=a(Tn()),u=Qi,c=Ja,h=a(JE()),b=a(Ji()),_=n(da),k=ts(),E=Fp(),v=L4(),O=zd(),g=U4(),p=yc(),P=bc(),d=Fd,m=a(DO()),y=Ks(),w=L5(),N=n(Bd()),R=Xs(),D=M4();e.quillRef=_.observable({enabled:!1,currentFormat:{},editor:_.observable.object({instance:null},{},{deep:!1})});const x=(0,m.default)("div",l.default.forwardRef)`
|
|
207
|
-
.ql-editor {
|
|
208
|
-
outline: none;
|
|
209
|
-
}
|
|
210
|
-
${g.resetStyleContent}
|
|
211
|
-
strong {
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
}
|
|
214
|
-
.ql-direction-rtl {
|
|
215
|
-
direction: rtl;
|
|
216
|
-
}
|
|
217
|
-
`,S=B=>new h.default(B,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["bold","color","font","italic","size","strike","underline","indent","list","direction"]});e.createQuill=S;const A=(B,L)=>{var F=B.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+L+"<p><br></p></div>");B.setContents(F),B.history.clear()};e.setQuillContent=A;const M=({html:B,onBlur:L,onChange:F,element:H})=>{const $=l.default.useRef(null);l.default.useEffect(()=>{if(!$.current)return;const V=(0,e.createQuill)($.current);return _.runInAction(()=>{e.quillRef.editor.instance=V}),window.__polotnoQuill=V,V.on("text-change",()=>{V.getSelection()&&_.runInAction(()=>{e.quillRef.currentFormat=V.getFormat()}),setTimeout(()=>{var X;const Y=(X=$.current)===null||X===void 0?void 0:X.childNodes[0];F(Y.innerHTML)},10)}),V.setSelection(0,0,"api"),V.on("selection-change",X=>{X||L(),X&&_.runInAction(()=>{e.quillRef.currentFormat=V.getFormat()})}),$.current.childNodes[0].addEventListener("blur",X=>{var Y;!((Y=X.relatedTarget)===null||Y===void 0)&&Y.classList.contains("ql-clipboard")||L()}),()=>{_.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),l.default.useEffect(()=>{var V;const X=e.quillRef.editor.instance;if(!X)return;const Y=X.getSelection();((V=$.current)===null||V===void 0?void 0:V.childNodes[0].innerHTML)===H.text||((0,e.setQuillContent)(X,B),Y&&(X.setSelection(Y.index,Y.length),_.runInAction(()=>{e.quillRef.currentFormat=X.getFormat()})))},[H.text]);const ee={color:H.fill};return H.fill.indexOf("gradient")>=0&&(ee.backgroundColor=H.fill,ee.backgroundImage=H.fill,ee.backgroundSize="100% 100%",ee.backgroundRepeat="repeat",ee.webkitBackgroundClip="text",ee.MozBackgroundClip="text",ee.WebkitTextFillColor="transparent",ee.MozTextFillColor="transparent"),l.default.createElement(x,{ref:$,style:Object.assign(Object.assign({},ee),{fontSize:H.fontSize,width:H.a.width,fontFamily:H.fontFamily,lineHeight:H.lineHeight,letterSpacing:H.letterSpacing+"rem",textAlign:H.align}),dir:(0,v.getDir)((0,w.removeTags)(H.text))})};function T(B,L,F){return l.default.useMemo(()=>(0,g.detectSize)(B),[B,L.width,F])}function z(B){const L=B.getContext("2d").getImageData(0,0,B.width,B.height).data;for(let F=0;F<L.length;F+=4)if(L[F+3]!==0)return!0;return!1}function U(B){return!z(B)}function Q(B,{fontFamily:L="",color:F="black"}={}){let H=`color: ${F||B.fill}`;return B.fill.indexOf("gradient")>=0&&(H=`
|
|
218
|
-
background-color: ${F};
|
|
219
|
-
background-image: ${B.fill};
|
|
220
|
-
background-size: 100% 100%;
|
|
221
|
-
background-repeat: repeat;
|
|
222
|
-
-webkit-background-clip: text;
|
|
223
|
-
-moz-background-clip: text;
|
|
224
|
-
-webkit-text-fill-color: transparent;
|
|
225
|
-
-moz-text-fill-color: transparent;
|
|
226
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(B.width||100)}px`,H,`font-size: ${B.fontSize}px`,`font-family: '${L}'`,`text-align: ${B.align}`,B.textDecoration?`text-decoration: ${B.textDecoration}`:"",B.lineHeight?`line-height: ${B.lineHeight}`:"",B.letterSpacing?`letter-spacing: ${B.letterSpacing}rem`:"",B.fontStyle?`font-style: ${B.fontStyle}`:"",B.fontWeight?`font-weight: ${B.fontWeight}`:"",B.strokeWidth?`-webkit-text-stroke: ${B.strokeWidth}px ${B.stroke}`:"",B.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,v.getDir)((0,w.removeTags)(B.text))}">${B.text.replaceAll(`
|
|
227
|
-
`,"</br>")}</div>`}const K=B=>{let L=B.fontSize;for(let F=1;F<50;F++){const H=Q(Object.assign(Object.assign({},B.toJSON()),{fontSize:L}),{fontFamily:B.fontFamily}),{height:$}=(0,g.detectSize)(H),ee=B.height&&$>B.height,V=(0,g.isContentWrapping)({html:H});if(!(ee||V))break;L-=.5}return L},J=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,u.observer)(({element:B,store:L})=>{const F=l.default.useRef(null),[H,$]=l.default.useState(),[ee,V]=l.default.useState(!1),[X,Y]=l.default.useState(!0),[te,re]=l.default.useState(!1),ie=l.default.useRef(B.height),ae=L.selectedShapes.indexOf(B)>=0,ue=B.fontSize/3,{textVerticalResizeEnabled:de}=k.flags,pe=(0,v.usePrevious)(B.fontFamily),[Oe]=(0,v.useFontLoader)(L,B.fontFamily),_e=B._editModeEnabled;(0,p.useFadeIn)(F);const Le=Oe?B.fontFamily:pe!==B.fontFamily?pe:"Arial",fe=(0,O.useColor)(B).fill,ge=Q(B,{fontFamily:Le,color:fe}),{width:Ce,height:Ae}=T(ge,B,Oe);l.default.useEffect(()=>{if(!Oe)return;if(!B.height)return void B.set({height:Ae});const{textOverflow:De}=k.flags;if(De!=="change-font-size"||ee)De==="resize"&&(de&&B.height<Ae&&L.history.ignore(()=>{B.set({height:Ae})}),de||B.height===Ae||L.history.ignore(()=>{B.set({height:Ae})}));else{const Fe=K(B);Fe!==B.fontSize?L.history.ignore(()=>{B.set({fontSize:Fe})}):B.height!==Ae&&(de&&B.height<Ae?L.history.ignore(()=>{B.set({height:Ae})}):de||L.history.ignore(()=>{B.set({height:Ae})}))}});const se=l.default.useRef(0),me=l.default.useMemo(()=>{const De={lastArgs:null,lastResult:null};return async function(Fe){return De.lastArgs&&De.lastResult&&(He=De.lastArgs,Xe=Fe,JSON.stringify(He)===JSON.stringify(Xe))||(De.lastResult=await(0,g.htmlToCanvas)(Fe),De.lastArgs=Object.assign({},Fe)),De.lastResult;var He,Xe}},[]);l.default.useEffect(()=>{ee||_e||(async()=>{se.current++;const De=se.current,Fe=(0,y.incrementLoader)(`text ${B.id}`);Y(!0);let He=null;const Xe=J?5:1;for(let ft=0;ft<Xe;ft++){if(He=await(ft>0?me:g.htmlToCanvas)({skipCache:ft>0,html:ge,width:B.width||1,height:B.height||Ae||1,fontFamily:Le,padding:ue,pixelRatio:L._elementsPixelRatio,font:L.fonts.find(xt=>xt.fontFamily===Le)||N.globalFonts.find(xt=>xt.fontFamily===Le)}),De!==se.current)return void Fe();U(He)&&J&&await new Promise(xt=>setTimeout(xt,50*(ft+1)))}He?($(He),Y(!1),b.default.Util.requestAnimFrame(Fe)):Fe()})()},[ge,ee,Ae,_e,Le,B.height,L._elementsPixelRatio,Oe]);const xe=ee||X;l.default.useEffect(()=>_.autorun(()=>{const De=F.current;(0,E.applyFilter)(De,B)}),[H,xe,B.shadowColor,B.shadowOffsetX,B.shadowOffsetY,B.shadowOpacity]);let Ne=0;B.verticalAlign==="middle"&&(Ne=(B.height-Ae)/2),B.verticalAlign==="bottom"&&(Ne=B.height-Ae);const ct=(0,v.getLineHeight)({fontLoaded:Oe,fontFamily:B.fontFamily,fontSize:B.fontSize,lineHeight:B.lineHeight}),at=(0,R.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,l.default.createElement(c.Rect,{x:B.a.x,y:B.a.y,offsetX:B.backgroundPadding*(B.fontSize*ct*.5),offsetY:B.backgroundPadding*(B.fontSize*ct*.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*ct),height:B.a.height+B.backgroundPadding*(B.fontSize*ct),cornerRadius:B.backgroundCornerRadius*(B.fontSize*ct*.5)}),l.default.createElement(c.Rect,{ref:F,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:!xe,draggable:at?B.draggable&&ae:B.draggable,preventDefault:!at||ae,opacity:_e?0:B.a.opacity,hideInExport:!B.showInExport,onMouseEnter:()=>{re(!0)},onMouseLeave:()=>{re(!1)},onDragMove:De=>{B.set({x:De.target.x(),y:De.target.y()})},onDragEnd:De=>{B.set({x:De.target.x(),y:De.target.y()})},id:B.id,onDblClick:()=>{B.contentEditable&&B.toggleEditMode(!0)},onDblTap:()=>{B.contentEditable&&B.toggleEditMode(!0)},onTransformStart:De=>{V(!0),ie.current=B.height},onTransform:De=>{var Fe;const He=De.target,Xe=((Fe=He.getStage())===null||Fe===void 0?void 0:Fe.findOne("Transformer")).getActiveAnchor(),ft=Xe==="middle-left"||Xe==="middle-right",At=Xe==="top-center"||Xe==="bottom-center",xt=He.scaleX();if(ft){const be=He.scaleX(),Se=Math.max(He.width()*be,B.fontSize);if(He.width(Se),He.scaleX(1),k.flags.textVerticalResizeEnabled){const vt=Math.max(Ae,ie.current);B.set({height:vt})}B.set({width:Se,x:He.x(),y:He.y()})}else if(At){let be=k.flags.textOverflow==="resize"?Ae:B.lineHeight*B.fontSize;const Se=Math.max(be,De.target.height()*De.target.scaleY());He.scaleY(1),B.set({x:He.x(),y:He.y(),height:Se,rotation:He.rotation()})}else He.scaleX(1),He.scaleY(1),B.set({fontSize:B.fontSize*xt,width:He.width()*xt,x:He.x(),y:He.y(),rotation:He.rotation(),height:He.height()*xt})},onTransformEnd:De=>{V(!1),Y(!0);const Fe=De.target.scaleX();De.target.scaleX(1),De.target.scaleY(1),B.set({fontSize:B.fontSize*Fe,width:De.target.width()*Fe,x:De.target.x(),y:De.target.y(),rotation:De.target.rotation(),shadowBlur:B.shadowBlur*Fe,shadowOffsetX:B.shadowOffsetX*Fe,shadowOffsetY:B.shadowOffsetY*Fe,strokeWidth:B.strokeWidth*Fe})}}),l.default.createElement(c.Image,{ref:F,image:H,x:B.a.x,y:B.a.y,offsetX:ue,offsetY:ue-Ne,listening:!1,rotation:B.rotation,width:B.a.width+2*ue,height:B.a.height+2*ue,visible:!xe,opacity:_e?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}),xe&&l.default.createElement(c.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-Ne},l.default.createElement(d.Html,{divProps:{style:{pointerEvents:"none"}}},l.default.createElement(x,{dangerouslySetInnerHTML:{__html:ge},style:{pointerEvents:"none",display:"inline-block"}}))),_e&&l.default.createElement(c.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-Ne},l.default.createElement(d.Html,null,l.default.createElement(M,{html:ge,element:B,onChange:De=>{const Fe=(0,D.getLimitedFontSize)({oldText:(0,w.removeTags)(B.text),newText:(0,w.removeTags)(De),element:B});B.set({text:De,fontSize:Fe})},onBlur:De=>{B.toggleEditMode(!1)}}))),(ae||te)&&l.default.createElement(P.Highlighter,{element:B}))})}(So)),So}var fd={},dd={},V1={},bb;function Gd(){return bb||(bb=1,function(e){function i(h){return h/180*Math.PI}function t(h,b,_,k,E){const v=Math.sqrt(_*_+k*k);return E+=Math.atan2(k,_),{x:h+v*Math.cos(E),y:b+v*Math.sin(E)}}function n(h){const{x:b,y:_,width:k,height:E}=h,v=i(h.rotation),O=t(b,_,0,0,v),g=t(b,_,k,0,v),p=t(b,_,k,E,v),P=t(b,_,0,E,v),d=Math.min(O.x,g.x,p.x,P.x),m=Math.min(O.y,g.y,p.y,P.y),y=Math.max(O.x,g.x,p.x,P.x),w=Math.max(O.y,g.y,p.y,P.y);return{x:d,y:m,width:y-d,height:w-m,minX:d,minY:m,maxX:y,maxY:w}}function a(h){const b=h.map(O=>n(O)),_=Math.min(...b.map(O=>O.minX)),k=Math.min(...b.map(O=>O.minY)),E=Math.max(...b.map(O=>O.maxX)),v=Math.max(...b.map(O=>O.maxY));return{x:_,y:k,width:E-_,height:v-k,minX:_,minY:k,maxX:E,maxY:v}}function l(h){const b=i(h.rotation||0);return{x:h.x+h.width/2*Math.cos(b)+h.height/2*Math.sin(-b),y:h.y+h.height/2*Math.cos(b)+h.width/2*Math.sin(b)}}function u(h,b,_){const k=i(b),E=_.x+(h.x-_.x)*Math.cos(k)-(h.y-_.y)*Math.sin(k),v=_.y+(h.x-_.x)*Math.sin(k)+(h.y-_.y)*Math.cos(k);return Object.assign(Object.assign({},h),{rotation:h.rotation+b,x:E,y:v})}function c(h,b){return u(h,b,l(h))}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=i,e.getClientRect=n,e.getTotalClientRect=a,e.getCenter=l,e.rotateAroundPoint=u,e.rotateAroundCenter=c}(V1)),V1}var _b;function H4(){return _b||(_b=1,function(e){var i=dd&&dd.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.setSnapFilterFunc=void 0,e.useSnap=_,e.useAnchorSnap=E;const t=i(Tn()),n=i(Ji()),a=Gd();var l=5;let u=({targetKonvaNodes:v,guideKonvaNode:O,distance:g,snapDirection:p})=>g<l;const c=v=>{u=v};function h(v){const O=v.__getNodeRect(),g=(0,a.getClientRect)(Object.assign(Object.assign({},O),{rotation:n.default.Util.radToDeg(O.rotation)})),p=v.getAbsolutePosition();return{vertical:[{guide:g.x,offset:p.x-g.x,snap:"start",nodes:v.nodes()},{guide:g.x+g.width/2,offset:p.x-g.x-g.width/2,snap:"center",nodes:v.nodes()},{guide:g.x+g.width,offset:p.x-g.x-g.width,snap:"end",nodes:v.nodes()}],horizontal:[{guide:g.y,offset:p.y-g.y,snap:"start",nodes:v.nodes()},{guide:g.y+g.height/2,offset:p.y-g.y-g.height/2,snap:"center",nodes:v.nodes()},{guide:g.y+g.height,offset:p.y-g.y-g.height,snap:"end",nodes:v.nodes()}]}}function b(v,O){var g=[],p=[];v.vertical.forEach(N=>{O.vertical.forEach(R=>{var D=Math.abs(N.offset-R.guide);u({targetKonvaNodes:R.nodes,guideKonvaNode:N.node,distance:D,snapDirection:N.snap})&&g.push({lineGuide:N.offset,diff:D,snap:R.snap,offset:R.offset})})}),v.horizontal.forEach(N=>{O.horizontal.forEach(R=>{var D=Math.abs(N.offset-R.guide);u({targetKonvaNodes:R.nodes,guideKonvaNode:N.node,distance:D,snapDirection:N.snap})&&p.push({lineGuide:N.offset,diff:D,snap:R.snap,offset:R.offset})})});var P=[];const d=g.sort((N,R)=>N.diff-R.diff),m=p.sort((N,R)=>N.diff-R.diff);var y=d[0],w=m[0];return y&&d.filter(N=>Math.abs(N.diff-y.diff)<.1).forEach(N=>{P.push(Object.assign({orientation:"V"},N))}),w&&m.filter(N=>Math.abs(N.diff-w.diff)<.1).forEach(N=>{P.push(Object.assign({orientation:"H"},N))}),P}function _(v,O){const g=t.default.useRef(),p=N=>N.hasName("element")||N.hasName("page-background")||!g.current&&N.hasName("elements-area");function P(N){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getStage(),x=[],S=[];return D.find(p).forEach(A=>{if(!(N.indexOf(A)>=0)){var M=A.getClientRect({skipShadow:!0,skipStroke:!0});x.push({offset:M.x,node:A,snap:"start"},{offset:M.x+M.width,node:A,snap:"end"},{offset:M.x+M.width/2,node:A,snap:"center"}),S.push({offset:M.y,node:A,snap:"start"},{offset:M.y+M.height,node:A,snap:"end"},{offset:M.y+M.height/2,node:A,snap:"center"})}}),{vertical:x,horizontal:S}}function d(N){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getLayer(),x=D==null?void 0:D.children.find(S=>S.name()==="line-guides");N.forEach(S=>{if(S.orientation==="H"){var A=new n.default.Line({points:[-6e3,S.lineGuide,6e3,S.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});x==null||x.add(A),D.batchDraw()}else S.orientation==="V"&&(A=new n.default.Line({points:[S.lineGuide,-6e3,S.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),x==null||x.add(A))})}const m=N=>{const R=N.target.getLayer().children.find(T=>T.name()==="line-guides");R==null||R.destroyChildren();var D=b(P(N.target.nodes()),h(N.target));if(!D.length)return;d(D);const x=N.target.getAbsolutePosition(),S=(N.target.nodes().map(T=>T.getAbsolutePosition()),Object.assign({},x));D.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 A=S.x-x.x,M=S.y-x.y;N.evt.ctrlKey||N.evt.metaKey||N.target.nodes().forEach(T=>{const z=T.getAbsolutePosition();T.setAbsolutePosition({x:z.x+A,y:z.y+M})})},y=(N,R,D)=>{const x=v.current,S=x.getLayer(),A=S.children.find(K=>K.name()==="line-guides");if(A==null||A.destroyChildren(),x.getActiveAnchor()==="rotater"||Math.sqrt(Math.pow(R.x-N.x,2)+Math.pow(R.y-N.y,2))>50||!S)return R;var M=b(P(x.nodes()),{vertical:[{guide:R.x,offset:0,snap:"start",nodes:x.nodes()}],horizontal:[{guide:R.y,offset:0,snap:"start",nodes:x.nodes()}]});if(!M.length||(d(M),D.ctrlKey||D.metaKey))return R;let T=R.x,z=R.x;M.forEach(K=>{switch(K.orientation){case"V":T=K.lineGuide;break;case"H":z=K.lineGuide}});const U=Math.abs(R.x-T)<10,Q=Math.abs(R.y-z)<10;return U&&!Q?{x:T,y:N.y}:Q&&!U?{x:N.x,y:z}:U&&Q?{x:T,y:z}:R},w=N=>{if(!N.target)return;const R=N.target.getLayer(),D=R.children.find(x=>x.name()==="line-guides");D==null||D.destroyChildren(),R.batchDraw()};t.default.useEffect(()=>{v.current&&(v.current.anchorDragBoundFunc(y),v.current.on("dragstart",N=>{setTimeout(()=>{if(n.default.DD._dragElements.size===0)return;const R=[...n.default.DD._dragElements.entries()],D=R.find(([x,S])=>S.node instanceof n.default.Transformer);D&&(R.splice(R.indexOf(D),1),R.unshift(D),n.default.DD._dragElements.clear(),R.forEach(([x,S])=>{n.default.DD._dragElements.set(x,S)}))})}),v.current.on("dragmove",m),v.current.on("dragend",w),v.current.on("transformend",w),v.current.on("transform",N=>{var R,D;N.evt.ctrlKey||N.evt.metaKey?(R=v.current)===null||R===void 0||R.rotationSnapTolerance(0):(D=v.current)===null||D===void 0||D.rotationSnapTolerance(5)}))},[])}function k(v){return{vertical:[{guide:v.absolutePosition().x,offset:0,snap:"center",nodes:[v]}],horizontal:[{guide:v.absolutePosition().y,offset:0,snap:"center",nodes:[v]}]}}function E(v,O,g){const p=m=>m.hasName("element")||m.hasName("line-anchor")||m.hasName("page-background")||m.hasName("elements-area"),P=m=>{const y=m.target.getLayer().children.find(S=>S.name()==="line-guides");y==null||y.destroyChildren();var w=b(function(S){var A;const M=(A=v.current)===null||A===void 0?void 0:A.getStage();var T=[],z=[];return M.find(p).forEach(U=>{if(!(S.indexOf(U)>=0)){var Q=U.getClientRect({skipShadow:!0,skipStroke:!0});U.hasName("line-anchor")&&(Q={x:U.absolutePosition().x,y:U.absolutePosition().y,width:0,height:0}),T.push({offset:Q.x,node:U,snap:"start"},{offset:Q.x+Q.width,node:U,snap:"end"},{offset:Q.x+Q.width/2,node:U,snap:"center"}),z.push({offset:Q.y,node:U,snap:"start"},{offset:Q.y+Q.height,node:U,snap:"end"},{offset:Q.y+Q.height/2,node:U,snap:"center"})}}),{vertical:T,horizontal:z}}([m.target,...O.map(S=>S.current)]),k(m.target));if(!w.length)return;(function(S){var A;const M=(A=v.current)===null||A===void 0?void 0:A.getLayer(),T=M==null?void 0:M.children.find(z=>z.name()==="line-guides");S.forEach(z=>{if(z.orientation==="H"){var U=new n.default.Line({points:[-6e3,z.lineGuide,6e3,z.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});T==null||T.add(U),M.batchDraw()}else z.orientation==="V"&&(U=new n.default.Line({points:[z.lineGuide,-6e3,z.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),T==null||T.add(U))})})(w);const N=m.target.getAbsolutePosition(),R=Object.assign({},N);w.forEach(S=>{switch(S.snap){case"start":case"center":case"end":switch(S.orientation){case"V":R.x=S.lineGuide+S.offset;break;case"H":R.y=S.lineGuide+S.offset}}});const D=R.x-N.x,x=R.y-N.y;if(!(m.evt.ctrlKey||m.evt.metaKey)){const S=m.target.getAbsolutePosition();m.target.absolutePosition({x:S.x+D,y:S.y+x})}},d=m=>{if(!m.target)return;const y=m.target.getLayer(),w=y.children.find(N=>N.name()==="line-guides");w==null||w.destroyChildren(),y.batchDraw()};t.default.useEffect(()=>{v.current&&(v.current.on("dragmove",P),v.current.on("dragend",d))},g)}e.setSnapFilterFunc=c}(dd)),dd}var wb;function FO(){return wb||(wb=1,function(e){var i=fd&&fd.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=_,e.getLinePositionFromMiddlePoints=k;const t=i(Tn()),n=Qi,a=Ja,l=zd(),u=Fd,c=bc(),h=H4(),b=Xs();function _(O){const{x:g,y:p,width:P,height:d,rotation:m}=O.a,y=m*Math.PI/180,w={x:g+d/2*Math.cos(y+Math.PI/2),y:p+d/2*Math.sin(y+Math.PI/2)};return{middleLeft:w,middleRight:{x:w.x+P*Math.cos(y),y:w.y+P*Math.sin(y)}}}function k(O,g,p){const P=Math.sqrt(Math.pow(g.x-O.x,2)+Math.pow(g.y-O.y,2)),d=Math.atan2(g.y-O.y,g.x-O.x),m=180*d/Math.PI;return{x:O.x+Math.cos(d-Math.PI/2)*p/2,y:O.y+Math.sin(d-Math.PI/2)*p/2,width:P,height:p,rotation:m}}const E=(O,g)=>({offsetX:5/O,offsetY:5/O,width:10/O,height:10/O,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:p=>{p.target.getStage().container().style.cursor="crosshair"},onMouseLeave:p=>{p.target.getStage().container().style.cursor=""},onDragStart:p=>{g.history.startTransaction()},onDragEnd:p=>{g.history.endTransaction()}}),v=(0,n.observer)(({element:O,type:g})=>{const p=(0,l.useColor)(O,O.a.color,"fill"),P=(0,l.useColor)(O,O.a.color,"stroke"),d=Object.assign(Object.assign(Object.assign({strokeWidth:O.height,lineCap:"round",lineJoin:"round"},P),p),{opacity:O.a.opacity,hideInExport:!O.showInExport});return t.default.createElement(t.default.Fragment,null,g==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*O.height,2*-O.height,0,0,3*O.height,2*O.height]},d)),g==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*O.height,2*-O.height,0,0,3*O.height,2*O.height],closed:!0},d)),g==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-O.height,0,2*O.height],closed:!0},d)),g==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-O.height,4*O.height,2*-O.height,4*O.height,2*O.height,0,2*O.height],closed:!0},d)),g==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*O.height,y:0,radius:2*O.height},d)))});e.LineElement=(0,n.observer)(({element:O,store:g})=>{const p=t.default.useRef(null),P=t.default.useRef(null),d=t.default.useRef(null),m=O.selectable||g.role==="admin",y=(0,b.isTouchDevice)(),[w,N]=t.default.useState(!1),R=g.selectedElements.indexOf(O)>=0&&g.selectedElements.length===1,D=g.selectedShapes.indexOf(O)>=0,{middleLeft:x,middleRight:S}=_(O);(0,h.useAnchorSnap)(P,[p],[R]),(0,h.useAnchorSnap)(d,[p],[R]);const A=(0,l.useColor)(O,O.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:p,name:"element",id:O.id,x:O.a.x,y:O.a.y,points:[0,0,O.a.width,0],offsetY:-O.a.height/2,strokeWidth:O.a.height,hitStrokeWidth:Math.max(O.a.height,20),dash:O.dash.map(M=>M*O.a.height)},A,{rotation:O.a.rotation,opacity:O.animated("opacity"),shadowEnabled:O.shadowEnabled,shadowBlur:O.shadowBlur,shadowOffsetX:O.shadowOffsetX,shadowOffsetY:O.shadowOffsetY,shadowColor:O.shadowColor,shadowOpacity:O.shadowOpacity,listening:m,draggable:y?O.draggable&&D:O.draggable,preventDefault:!y||D,hideInExport:!O.showInExport,onMouseEnter:()=>{N(!0)},onMouseLeave:()=>{N(!1)},onDragMove:M=>{O.set({x:M.target.x(),y:M.target.y()})},onDragEnd:M=>{O.set({x:M.target.x(),y:M.target.y()})},onTransform:M=>{const T=M.target.scaleX();M.target.scaleX(1),M.target.scaleY(1),O.set({height:O.height*T,width:O.width*T,x:M.target.x(),y:M.target.y(),rotation:M.target.rotation()})}})),t.default.createElement(a.Group,{x:x.x,y:x.y,rotation:O.rotation,hideInExport:!O.showInExport},t.default.createElement(v,{element:O,type:O.startHead})),t.default.createElement(a.Group,{x:S.x,y:S.y,rotation:O.rotation+180},t.default.createElement(v,{element:O,type:O.endHead})),(w||D&&!R)&&t.default.createElement(c.Highlighter,{element:O}),R&&O.resizable&&t.default.createElement(u.Portal,{selector:".page-abs-container",enabled:!0},t.default.createElement(a.Group,{visible:R},t.default.createElement(a.Rect,Object.assign({x:x.x,y:x.y,ref:P,name:"line-anchor"},E(g.scale,g),{onDragMove:M=>{const T=k(M.target.position(),S,O.height);O.set({x:T.x,y:T.y,width:T.width,rotation:T.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:S.x,y:S.y,ref:d,name:"line-anchor"},E(g.scale,g),{onDragMove:M=>{const T=k(x,M.target.position(),O.height);O.set({x:T.x,y:T.y,width:T.width,rotation:T.rotation})}})))))})}(fd)),fd}var Eo={},Sb;function zO(){return Sb||(Sb=1,function(e){var i=Eo&&Eo.__createBinding||(Object.create?function(B,L,F,H){H===void 0&&(H=F);var $=Object.getOwnPropertyDescriptor(L,F);$&&!("get"in $?!L.__esModule:$.writable||$.configurable)||($={enumerable:!0,get:function(){return L[F]}}),Object.defineProperty(B,H,$)}:function(B,L,F,H){H===void 0&&(H=F),B[H]=L[F]}),t=Eo&&Eo.__setModuleDefault||(Object.create?function(B,L){Object.defineProperty(B,"default",{enumerable:!0,value:L})}:function(B,L){B.default=L}),n=Eo&&Eo.__importStar||function(){var B=function(L){return B=Object.getOwnPropertyNames||function(F){var H=[];for(var $ in F)Object.prototype.hasOwnProperty.call(F,$)&&(H[H.length]=$);return H},B(L)};return function(L){if(L&&L.__esModule)return L;var F={};if(L!=null)for(var H=B(L),$=0;$<H.length;$++)H[$]!=="default"&&i(F,L,H[$]);return t(F,L),F}}(),a=Eo&&Eo.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useImageLoader=e.setImageLoaderHook=void 0;const l=a(Tn()),u=Qi,c=da,h=Ja,b=a(jp()),_=a(Ji()),k=Fd,E=bc(),v=Ks(),O=n(qd()),g=ts(),p=Fp(),P=yc(),d=Xs();function m(){return document.createElement("canvas")}async function y(B){if(!(B.indexOf("data:image/svg+xml")>=0||B.indexOf(".svg")>=0))return B;const L=await O.urlToString(B),F=O.fixSize(L);return O.svgToURL(F)}const w=B=>{const[L,F]=l.default.useState(B);return l.default.useEffect(()=>{(async()=>{const H=await y(B);H!==L&&F(H)})()},[B]),L},N=new window.Image;N.src=O.svgToURL(`
|
|
228
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
229
|
-
<path opacity="0.6" d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" fill="white"/>
|
|
230
|
-
<path d="M4 5.49683V18.5032C4 20.05 5.68077 21.0113 7.01404 20.227L18.0694 13.7239C19.384 12.9506 19.384 11.0494 18.0694 10.2761L7.01404 3.77296C5.68077 2.98869 4 3.95 4 5.49683Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
231
|
-
</svg>
|
|
232
|
-
`);const R=new window.Image;R.src=O.svgToURL(`
|
|
233
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
234
|
-
<path opacity="0.6" d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" fill="white"/>
|
|
235
|
-
<path opacity="0.6" d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" fill="white"/>
|
|
236
|
-
<path d="M14 19L14 5C14 3.89543 14.8954 3 16 3L17 3C18.1046 3 19 3.89543 19 5L19 19C19 20.1046 18.1046 21 17 21L16 21C14.8954 21 14 20.1046 14 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
237
|
-
<path d="M10 19L10 5C10 3.89543 9.10457 3 8 3L7 3C5.89543 3 5 3.89543 5 5L5 19C5 20.1046 5.89543 21 7 21L8 21C9.10457 21 10 20.1046 10 19Z" stroke="#323232" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
238
|
-
</svg>
|
|
239
|
-
`);function D(B,L,F,H,$,ee,V){for(var X=new ImageData(L,F),Y=new Int32Array(B.data.buffer),te=B.width,re=new Int32Array(X.data.buffer),ie=X.width,ae=L/ee,ue=F/V,de=Math.round(1/ae),pe=Math.round(1/ue),Oe=de*pe,_e=0;_e<X.height;_e++)for(var Le=0;Le<ie;Le++){for(var fe=H+Math.round(Le/ae)+($+Math.round(_e/ue))*te,ge=0,Ce=0,Ae=0,se=0,me=0;me<pe;me++)for(var xe=0;xe<de;xe++){var Ne=Y[fe+xe+me*te];ge+=Ne<<24>>>24,Ce+=Ne<<16>>>24,Ae+=Ne<<8>>>24,se+=Ne>>>24}ge=Math.round(ge/Oe),Ce=Math.round(Ce/Oe),Ae=Math.round(Ae/Oe),se=Math.round(se/Oe),re[Le+_e*ie]=se<<24|Ae<<16|Ce<<8|ge}return X}function x(B,L){var F,H;const $=m();$.width=B.width,$.height=B.height,(F=$.getContext("2d"))===null||F===void 0||F.drawImage(B,0,0,$.width,$.height);const ee=D($.getContext("2d").getImageData(0,0,$.width,$.height),Math.floor($.width*L),Math.floor($.height*L),0,0,$.width,$.height);return $.width=Math.floor($.width*L),$.height=Math.floor($.height*L),(H=$.getContext("2d"))===null||H===void 0||H.putImageData(ee,0,0),$}const S=(B,L,F,H,$=0,ee=!1)=>{const V=Math.floor(Math.max(B.width*H,1)),X=Math.floor(Math.max(B.height*H,1)),Y=Math.min($*H,V/2,X/2),te=Math.max(B.width/F.width,B.height/F.height)*H,re=B.page._exportingOrRendering&&g.flags.imageDownScalingEnabled&&te<1&&!ee,ie=F.x===0&&F.y===0&&F.width===(L==null?void 0:L.width)&&F.height===(L==null?void 0:L.height),ae=l.default.useMemo(()=>{if(!(!L||!L.width||!L.height))return ie&&Y===0&&!re?void 0:m()},[L,Y,re,ie]),ue=()=>{if(!ae||!L)return;ae.width=V,ae.height=X;const de=ae.getContext("2d");if(!de)return;Y&&(de.beginPath(),de.moveTo(Y,0),de.lineTo(V-Y,0),de.arc(V-Y,Y,Y,3*Math.PI/2,0,!1),de.lineTo(V,X-Y),de.arc(V-Y,X-Y,Y,0,Math.PI/2,!1),de.lineTo(Y,X),de.arc(Y,X-Y,Y,Math.PI/2,Math.PI,!1),de.lineTo(0,Y),de.arc(Y,Y,Y,Math.PI,3*Math.PI/2,!1),de.clip());const pe=re?x(L,te):L,Oe=re?{x:Math.floor(F.x*te),y:Math.floor(F.y*te),width:Math.floor(F.width*te),height:Math.floor(F.height*te)}:F;de.drawImage(pe,Oe.x,Oe.y,Oe.width,Oe.height,0,0,ae.width,ae.height)};return l.default.useLayoutEffect(()=>{ue()},[ae,B.width,B.height,F.x,F.y,F.width,F.height,$,H,ee,B.page._exportingOrRendering,re]),l.default.useEffect(()=>()=>{ae&&ae.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ae)},[ae]),[ae||L,ue]},A=(B,L,F,H)=>{const $=w(B.clipSrc||""),[ee,V]=U($,"anonymous"),X=B.clipSrc?V:"loaded";(0,e.useImageLoader)(X,B.clipSrc,B.id);const Y=l.default.useMemo(()=>{if(L&&ee)return m()},[L,ee]);function te(){var re;if(!ee||!L||!L.width||!L.height||!ee||!ee.width||!ee.height||!Y)return;const ie=m(),ae=Math.max(B.width/ee.width*F,B.height/ee.height*F);ie.width=ee.width*ae,ie.height=ee.height*ae,(re=ie.getContext("2d"))===null||re===void 0||re.drawImage(ee,0,0,ie.width,ie.height),Y.width=Math.max(L.width,1),Y.height=Math.max(L.height,1);const ue=Y.getContext("2d");ue&&(ue.save(),ue.drawImage(ie,0,0,L.width,L.height),_.default.Util.releaseCanvas(ie),ue.globalCompositeOperation="source-in",ue.drawImage(L,0,0,Y.width,Y.height),ue.restore())}return l.default.useLayoutEffect(()=>{te()},[Y,L,ee,B.width,B.height,F,...H]),[B.clipSrc&&ee?Y:L,te]},M=m(),T=(0,u.observer)(({element:B})=>{const L=Math.min(30,B.width/4,B.height/4),F=l.default.useRef(null);return l.default.useEffect(()=>{const H=F.current;if(!H)return;const $=new _.default.Animation(ee=>{H.rotate(((ee==null?void 0:ee.timeDiff)||0)/2)},H.getLayer());return $.start(),()=>{$.stop()}}),l.default.createElement(h.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,listening:!1,opacity:B.a.opacity,hideInExport:!B.showInExport},l.default.createElement(h.Rect,{width:B.width,height:B.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(h.Arc,{ref:F,x:B.width/2,y:B.height/2,fill:"white",outerRadius:Math.abs(L),innerRadius:Math.max(1,L-5),angle:270}))}),z=(0,u.observer)(({element:B})=>{const L="Can not load the video...",F=Math.max(10,Math.min(30,B.width/25));return l.default.createElement(h.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,listening:!1,opacity:B.a.opacity,hideInExport:!B.showInExport},l.default.createElement(h.Rect,{width:B.width,height:B.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(h.Text,{text:L,fontSize:F,width:B.width,height:B.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let U=b.default;const Q=B=>{U=B};e.setImageLoaderHook=Q;const K=(B,L,F)=>{const H=l.default.useRef(),$=()=>{var ee;(ee=H.current)===null||ee===void 0||ee.call(H),H.current=void 0};l.default.useEffect(()=>$,[]),l.default.useLayoutEffect(()=>{const ee=L.slice(0,200),V=`video with id ${F} url: ${ee}`;B!=="loading"||H.current||(H.current=(0,v.incrementLoader)(V)),B!=="loading"&&$(),B==="failed"&&(0,v.triggerLoadError)(V)},[B])};e.useImageLoader=K;function J(B,L,F){const H=l.default.useRef("loading"),$=l.default.useRef(null),[ee,V]=l.default.useState(0),X=l.default.useRef(),Y=l.default.useRef(),te=l.default.useRef();return X.current===B&&Y.current===L&&te.current===F||(H.current="loading",$.current=void 0,X.current=B,Y.current=L,te.current=F),l.default.useLayoutEffect(function(){if(B){var re=document.createElement("video");return re.addEventListener("canplay",ie),re.addEventListener("error",ae),re.crossOrigin=L,re.src=B,re.load(),function(){re.removeEventListener("canplay",ie),re.removeEventListener("error",ae)}}function ie(){H.current="loaded",$.current=re,$.current.currentTime=0,V(Math.random()),$.current.removeEventListener("canplay",ie)}function ae(ue){H.current="failed",$.current=void 0,V(Math.random())}},[B,L,F]),[$.current,H.current]}e.VideoElement=(0,u.observer)(({element:B,store:L})=>{var F;const[H,$]=l.default.useState(!1),ee=l.default.useRef(null),V=l.default.useRef(null),[X,Y]=l.default.useState(!1),te=L.selectedShapes.indexOf(B)>=0,[re,ie]=l.default.useState(!1),[ae,ue]=J(B.src,"anonymous"),de=L.activePage===B.page;(0,e.useImageLoader)(ue,B.src,B.id),ae&&(ae.width=ae.videoWidth,ae.height=ae.videoHeight,ae.playsInline=!0);const pe=ae||M;l.default.useEffect(()=>{ae&&L.history.ignore(()=>{B.set({duration:1e3*ae.duration})})},[ae]),l.default.useEffect(()=>{var Be;if(!ae)return;const lt=L.animatedElementsIds,_t=(!lt.length||lt.includes(B.id))&&L.isPlaying,Ut=de&&(_t||re);if(!Ut)return void ae.pause();Ut&&(ae.currentTime=B.startTime*ae.duration,ae.play());const Ht=new _.default.Animation(()=>{At()},(Be=ee.current)===null||Be===void 0?void 0:Be.getLayer());Ht.start();const hn=()=>{ie(!1),ae.currentTime=B.startTime*ae.duration},In=()=>{ae.currentTime>=B.endTime*ae.duration&&(ae.pause(),ae.currentTime=B.startTime*ae.duration,ie(!1))};return ae.addEventListener("ended",hn),ae.addEventListener("timeupdate",In),()=>{ae.pause(),Ht.stop(),ae.removeEventListener("ended",hn),ae.removeEventListener("timeupdate",In)}},[ae,re,L.isPlaying,de]),l.default.useEffect(()=>{ae&&(ae.volume=B.volume)},[ae,B.volume]);const Oe=l.default.useRef();l.default.useEffect(()=>{const Be=(0,c.autorun)(()=>{var lt,_t;if(ae){const Ut=L.animatedElementsIds;if(Ut.length&&!Ut.includes(B.id))return;const Ht=(L.currentTime-B.page.startTime)%B.duration;if(Math.abs(1e3*ae.currentTime-Ht)>500||!L.isPlaying){const hn=Ht/1e3;hn!==ae.currentTime&&(ae.currentTime=hn),ae.readyState!==4&&!L.isPlaying&&!Oe.current&&(Oe.current=(0,v.incrementLoader)(`video ${B.id}`))}At(),(_t=(lt=ee.current)===null||lt===void 0?void 0:lt.getLayer())===null||_t===void 0||_t.batchDraw()}});return()=>{Be(),Oe.current&&(Oe.current(),Oe.current=null)}},[L,ae]),l.default.useEffect(()=>{if(!ae)return;const Be=()=>{var _t,Ut;ae.readyState!==4&&B.page._exportingOrRendering||Oe.current&&(At(),(Ut=(_t=ee.current)===null||_t===void 0?void 0:_t.getLayer())===null||Ut===void 0||Ut.batchDraw(),Oe.current(),Oe.current=null)};let lt;return B.page._exportingOrRendering&&(lt=setInterval(Be,50)),ae.addEventListener("timeupdate",Be),ae.addEventListener("canplay",Be),()=>{clearInterval(lt),ae.removeEventListener("timeupdate",Be),ae.removeEventListener("canplay",Be)}},[B.page._exportingOrRendering,ae,B.id,v.incrementLoader]);let{cropX:_e,cropY:Le,cropWidth:fe,cropHeight:ge}=B;ue!=="loaded"&&(_e=Le=0,fe=ge=1);const Ce=pe.width*fe,Ae=pe.height*ge,se=B.width/B.height;let me,xe;const Ne=Ce/Ae,ct=B.type==="svg";ct?(me=Ce,xe=Ae):se>=Ne?(me=Ce,xe=Ce/se):(me=Ae*se,xe=Ae);const at={x:pe.width*_e,y:pe.height*Le,width:me,height:xe},De=(F=B.cornerRadius)!==null&&F!==void 0?F:0,[Fe,He]=S(B,pe,at,L._elementsPixelRatio,De,H||B._cropModeEnabled||B.type==="svg");let[Xe,ft]=A(B,Fe,L._elementsPixelRatio,[at,De,L._elementsPixelRatio]);function At(){He(),ft()}const xt=Math.max(B.width/me,B.height/xe);l.default.useEffect(()=>{var Be;if(!B._cropModeEnabled)return;const lt=(Be=ee.current)===null||Be===void 0?void 0:Be.getStage();function _t(Ht){B._cropModeEnabled&&Ht.target!==V.current&&B.toggleCropMode(!1)}function Ut(Ht){B._cropModeEnabled&&Ht.target.parentNode!==lt.content&&B.toggleCropMode(!1)}return document.body.addEventListener("click",Ut),lt==null||lt.on("click",_t),lt==null||lt.on("tap",_t),()=>{document.body.removeEventListener("click",Ut),document.body.removeEventListener("touchstart",Ut),lt==null||lt.off("click",_t),lt==null||lt.off("click",_t)}},[B._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(H||B._cropModeEnabled))return(0,p.applyFilter)(ee.current,B),(0,c.autorun)(()=>{(0,p.applyFilter)(ee.current,B)},{delay:100})},[pe,H,fe,ge,B._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Be;H||B._cropModeEnabled?(Be=ee.current)===null||Be===void 0||Be.clearCache():(0,p.applyFilter)(ee.current,B)},[H,B.width,B.height,B._cropModeEnabled]),l.default.useEffect(()=>{(0,p.applyFilter)(ee.current,B)},[B.shadowEnabled,B.shadowBlur,B.cornerRadius,B.shadowColor,B.shadowOffsetX,B.shadowOffsetY,B.shadowOpacity]);const be=l.default.useRef(null),Se=l.default.useRef(null),vt=l.default.useRef(null);l.default.useLayoutEffect(()=>{B._cropModeEnabled&&(Se.current.nodes([be.current]),vt.current.nodes([V.current]))},[B._cropModeEnabled]);const Pt=Be=>{Math.round(Be.target.x())>0&&(Be.target.x(0),Be.target.scaleX(1)),Math.round(Be.target.y())>0&&(Be.target.y(0),Be.target.scaleY(1));const lt=Be.target.width()*Be.target.scaleX(),_t=Be.target.height()*Be.target.scaleY(),Ut=Math.min(1,me/lt),Ht=Math.min(1,xe/_t),hn=1-Ut,In=Math.min(hn,Math.max(0,Math.round(-Be.target.x())/lt)),wn=1-Ht,Qn=Math.min(wn,Math.max(0,Math.round(-Be.target.y())/_t));Be.target.setAttrs({x:-In*pe.width,y:-Qn*pe.height,scaleX:1,scaleY:1}),B.set({cropX:In,cropY:Qn,cropWidth:Ut,cropHeight:Ht})},Ie=()=>{B.type!=="svg"&&B.contentEditable&&setTimeout(()=>{B.toggleCropMode(!0)})},Ge=ue==="loading",rt=ue==="failed",je=!Ge&&!rt,mt=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),ze=je?B.a.opacity:0;(0,P.useFadeIn)(ee,ze);const pt=B.selectable||L.role==="admin",_n=(0,d.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,Ge&&l.default.createElement(T,{element:B}),rt&&l.default.createElement(z,{element:B}),l.default.createElement(h.Image,{ref:ee,name:"element",id:B.id,image:Xe,x:B.a.x,y:B.a.y,width:B.a.width||1,height:B.a.height||1,rotation:B.a.rotation,opacity:ze,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur,shadowOffsetX:B.shadowOffsetX,shadowOffsetY:B.shadowOffsetY,shadowColor:B.shadowColor,shadowOpacity:B.shadowOpacity,customCrop:at,listening:pt,draggable:_n?B.draggable&&te:B.draggable,preventDefault:!_n||te,hideInExport:!B.showInExport,onMouseEnter:()=>{Y(!0)},onMouseLeave:()=>{Y(!1)},onDragMove:Be=>{B.set({x:Be.target.x(),y:Be.target.y()})},onDragEnd:Be=>{B.set({x:Be.target.x(),y:Be.target.y()})},onDblClick:Ie,onDblTap:Ie,onTransformStart:()=>{$(!0),mt.current={cropX:B.cropX,cropY:B.cropY,cropWidth:B.cropWidth,cropHeight:B.cropHeight}},onTransform:Be=>{var lt;const _t=Be.currentTarget,Ut=Math.abs(_t.scaleX()-1)<1e-7?1:_t.scaleX(),Ht=Math.abs(_t.scaleY()-1)<1e-7?1:_t.scaleY();_t.scaleX(1),_t.scaleY(1);const hn=(lt=Be.target.getStage())===null||lt===void 0?void 0:lt.findOne("Transformer"),In=1-me/pe.width,wn=Math.min(In,Math.max(0,B.cropX)),Qn=1-xe/pe.height,ii=Math.min(Qn,Math.max(0,B.cropY)),Sr=hn.getActiveAnchor(),Ze=!(Sr.indexOf("middle")>=0||Sr.indexOf("center")>=0),St=!Ze&&Ut<1&&mt.current.cropHeight>xe/pe.height;let Mt=Ze?B.cropWidth:B.cropWidth*Ut;St&&(Mt=B.cropWidth);const Vt=!Ze&&Ht<1&&mt.current.cropWidth>me/pe.width;let $t=Ze?B.cropHeight:B.cropHeight*Ht;Vt&&($t=B.cropHeight),ct&&(Mt=B.cropWidth,$t=B.cropHeight),B.set({cropX:wn,cropY:ii,x:_t.x(),y:_t.y(),width:_t.width()*Ut,height:_t.height()*Ht,rotation:Be.target.rotation(),cropWidth:Math.min(Mt,1-wn),cropHeight:Math.min($t,1-ii)})},onTransformEnd:Be=>{const lt=Be.currentTarget;B.set({width:lt.width(),height:lt.height(),x:lt.x(),y:lt.y(),rotation:Be.target.rotation(),cropWidth:me/pe.width,cropHeight:xe/pe.height}),$(!1)}}),l.default.createElement(h.Rect,{x:B.a.x,y:B.a.y,width:Math.max(B.a.width-B.borderSize,0),height:Math.max(B.a.height-B.borderSize,0),opacity:ze,offsetX:-B.borderSize/2,offsetY:-B.borderSize/2,stroke:B.borderColor,strokeWidth:B.borderSize,listening:!1,visible:!!B.borderSize,rotation:B.rotation,cornerRadius:Math.max(0,De-B.borderSize),hideInExport:!B.showInExport}),!L.isPlaying&&l.default.createElement(h.Image,{image:re?R:N,x:B.a.x,y:B.a.y,offsetX:-B.a.width/2+15/L.scale,offsetY:-B.a.height/2+15/L.scale,rotation:B.a.rotation,width:30/L.scale,height:30/L.scale,hideInExport:!0,onClick:()=>ie(!re),onTap:()=>ie(!re)}),B._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(h.Rect,{x:-window.innerWidth/L.scale,y:-window.innerWidth/L.scale,width:window.innerWidth/L.scale*3,height:window.innerWidth/L.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(h.Image,{listening:!1,image:Xe,x:B.a.x,y:B.a.y,width:B.a.width,height:B.a.height,rotation:B.a.rotation,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur}),l.default.createElement(h.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,scaleX:xt,scaleY:xt},l.default.createElement(h.Image,{image:pe,ref:V,opacity:.4,draggable:!0,x:-B.cropX*pe.width,y:-B.cropY*pe.height,onDragMove:Pt,onTransform:Pt}),l.default.createElement(h.Transformer,{ref:vt,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Be,lt)=>lt.width<5||lt.height<5?Be:lt,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(h.Rect,{width:me,height:xe,ref:be,listening:!1,onTransform:Be=>{Be.target.x()<-B.cropX*pe.width-1e-9&&(Be.target.x(-B.cropX*pe.width),Be.target.scaleX(1)),Be.target.y()<-B.cropY*pe.height-1e-9&&(Be.target.y(-B.cropY*pe.height),Be.target.scaleY(1));const lt=Math.min(1,Math.max(0,B.cropX+Be.target.x()/pe.width)),_t=Math.min(1,Math.max(0,Be.target.y()/pe.height+B.cropY)),Ut=Be.target.width()*Be.target.scaleX(),Ht=Be.target.height()*Be.target.scaleY(),hn=Math.min(1-lt,Ut/pe.width),In=Math.min(1-_t,Ht/pe.height),wn=Be.target.getAbsolutePosition(Be.target.getParent().getParent());Be.target.scale({x:1,y:1}),Be.target.position({x:0,y:0}),B.set({x:wn.x,y:wn.y,cropX:lt,cropY:_t,cropWidth:hn,cropHeight:In,width:Math.min(Ut*xt,pe.width*(1-lt)*xt),height:Math.min(Ht*xt,pe.height*(1-_t)*xt)})}}),l.default.createElement(h.Transformer,{ref:Se,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Be,lt)=>lt.width<5||lt.height<5?Be:lt,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(X||te)&&l.default.createElement(E.Highlighter,{element:B}))})}(Eo)),Eo}var hd={},$1={},Eb;function Sv(){return Eb||(Eb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0,e.starPath=l,e.diamondPath=u,e.pentagonPath=c,e.hexagonPath=h,e.speechBubblePath=_,e.crossPath=k,e.subTypeToPathDataFunc=E,e.figureToSvg=O;const i=({width:g,height:p,cornerRadius:P})=>{if(P>0){const d=Math.min(P,g/2,p/2);return`M 0 ${d} A ${d} ${d} 0 0 1 ${d} 0 L ${g-d} 0 A ${d} ${d} 0 0 1 ${g} ${d} L ${g} ${p-d} A ${d} ${d} 0 0 1 ${g-d} ${p} L ${d} ${p} A ${d} ${d} 0 0 1 0 ${p-d} Z`}return`M 0 0 L ${g} 0 L ${g} ${p} L 0 ${p} Z`};e.rectData=i;const t=({width:g,height:p})=>`M ${g/2} 0 L ${g} ${p} L 0 ${p} Z`;e.triangleData=t;const n=({width:g,height:p})=>`M 0 0 L ${g} 0 L 0 ${p} Z`;e.rightTriangleData=n;const a=({width:g,height:p})=>`M ${g/2} ${p/2} m -${g/2}, 0 a ${g/2},${p/2} 0 1,0 ${g},0 a ${g/2},${p/2} 0 1,0 -${g},0`;function l({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2,w=m/2,N=y/2;let R="",D=Math.PI/5;for(let x=0;x<10;x++){const S=x%2==0?y:N,A=P+(x%2==0?m:w)*Math.sin(x*D),M=d-S*Math.cos(x*D);x===0?R=`M ${A} ${M}`:R+=` L ${A} ${M}`}return R+" Z"}function u({width:g,height:p}){const P=g/2,d=p/2;return`M ${P} 0 L ${g} ${d} L ${P} ${p} L 0 ${d} Z`}function c({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2;let w="",N=2*Math.PI/5;for(let R=0;R<5;R++){const D=y,x=P+m*Math.sin(R*N),S=d-D*Math.cos(R*N);R===0?w=`M ${x} ${S}`:w+=` L ${x} ${S}`}return w+" Z"}function h({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2;let w="",N=2*Math.PI/6;for(let R=0;R<6;R++){const D=y,x=P+m*Math.sin(R*N),S=d-D*Math.cos(R*N);R===0?w=`M ${x} ${S}`:w+=` L ${x} ${S}`}return w+" Z"}function b({path:g,aspectRatio:p,width:P,height:d}){return{path:g,scaleX:P/p.width,scaleY:d/p.height}}function _({width:g,height:p}){const P=.1*Math.min(g,p),d=.2*g,m=.2*p,y=.5*g;let w=`M ${P},0`;return w+=" H "+(g-P),w+=` A ${P},${P} 0 0 1 ${g},${P}`,w+=" V "+(p-P-m),w+=` A ${P},${P} 0 0 1 ${g-P},${p-m}`,w+=` H ${y+d/2}`,w+=` L ${y},${p}`,w+=` L ${y-d/2},${p-m}`,w+=` H ${P}`,w+=` A ${P},${P} 0 0 1 0,${p-P-m}`,w+=` V ${P}`,w+=` A ${P},${P} 0 0 1 ${P},0`,w+=" Z",w}function k({width:g,height:p}){const P=.3*g,d=.3*p,m=g/2,y=p/2,w=m-P/2,N=m+P/2,R=y-d/2,D=y+d/2;let x=`M ${w},0 `;return x+=`H ${N} `,x+=`V ${R} `,x+=`H ${g} `,x+=`V ${D} `,x+=`H ${N} `,x+=`V ${p} `,x+=`H ${w} `,x+=`V ${D} `,x+="H 0 ",x+=`V ${R} `,x+=`H ${w} `,x+="V 0 ",x+="Z",x}function E(g){return e.TYPES[g]||e.rectData}function v(g,p){const{width:P,height:d,fill:m,stroke:y,strokeWidth:w,dash:N}=g,R=(N||[]).map(M=>M*w);let D=p(g),x=1,S=1;typeof D!="string"&&(x=D.scaleX,S=D.scaleY,D=D.path);const A=`clip-${g.id||Math.random()}`;return`
|
|
240
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${P}" height="${d}">
|
|
241
|
-
<defs>
|
|
242
|
-
<clipPath id="${A}">
|
|
243
|
-
<path d="${D}" />
|
|
244
|
-
</clipPath>
|
|
245
|
-
</defs>
|
|
246
|
-
|
|
247
|
-
<!-- Path for the fill -->
|
|
248
|
-
<path d="${D}" fill="${m}" transform="scale(${x}, ${S})"/>
|
|
249
|
-
|
|
250
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
251
|
-
<path d="${D}" fill="none" stroke="${y}" stroke-width="${2*w}" clip-path="url(#${A})" transform="scale(${x}, ${S})" stroke-dasharray="${R.join(" ")}"/>
|
|
252
|
-
</svg>
|
|
253
|
-
`}function O(g){const{subType:p}=g,P=E(p);return P?v(g,P):(console.error(`Polotno error: Can not convert ${g.subType} figure to svg.`),(0,e.rectData)(g))}e.circleData=a,e.TYPES={rect:e.rectData,circle:e.circleData,star:l,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:u,pentagon:c,hexagon:h,speechBubble:_,cross:k,arc:({width:g,height:p})=>b({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:g,height:p}),cloud:({width:g,height:p})=>b({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:g,height:p}),rightArrow:({width:g,height:p})=>{const P=.6*g;return`M 0 ${p/4} L ${P} ${p/4} L ${P} 0 L ${g} ${p/2} L ${P} ${p} L ${P} ${.75*p} L 0 ${.75*p} Z`},leftArrow:({width:g,height:p})=>{const P=.4*g;return`M ${g} ${p/4} L ${P} ${p/4} L ${P} 0 L 0 ${p/2} L ${P} ${p} L ${P} ${.75*p} L ${g} ${.75*p} Z`},downArrow:({width:g,height:p})=>{const P=.6*p;return`M ${g/4} 0 L ${g/4} ${P} L 0 ${P} L ${g/2} ${p} L ${g} ${P} L ${.75*g} ${P} L ${.75*g} 0 Z`},upArrow:({width:g,height:p})=>{const P=.4*p;return`M ${g/4} ${p} L ${g/4} ${P} L 0 ${P} L ${g/2} 0 L ${g} ${P} L ${.75*g} ${P} L ${.75*g} ${p} Z`},asterisk1:({width:g,height:p})=>b({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:g,height:p}),asterisk2:({width:g,height:p})=>b({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:g,height:p}),bookmark:({width:g,height:p})=>b({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:g,height:p}),butterfly:({width:g,height:p})=>b({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:g,height:p}),cylinder:({width:g,height:p})=>b({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:g,height:p}),diamond2:({width:g,height:p})=>b({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:g,height:p}),door:({width:g,height:p})=>b({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:g,height:p}),drop1:({width:g,height:p})=>b({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:g,height:p}),drop2:({width:g,height:p})=>b({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:g,height:p}),explosion:({width:g,height:p})=>b({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:g,height:p}),flag:({width:g,height:p})=>b({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:g,height:p}),flower:({width:g,height:p})=>b({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:g,height:p}),frame:({width:g,height:p})=>b({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:g,height:p}),heart1:({width:g,height:p})=>b({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:g,height:p}),home:({width:g,height:p})=>b({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:g,height:p}),home2:({width:g,height:p})=>b({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:g,height:p}),hourglass:({width:g,height:p})=>b({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:g,height:p}),house:({width:g,height:p})=>b({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:g,height:p}),keyhole:({width:g,height:p})=>b({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:g,height:p}),kiss:({width:g,height:p})=>b({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:g,height:p}),leaf:({width:g,height:p})=>b({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:g,height:p}),lightning1:({width:g,height:p})=>b({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:g,height:p}),lightning2:({width:g,height:p})=>b({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:g,height:p}),magnet:({width:g,height:p})=>b({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:g,height:p}),mithosis:({width:g,height:p})=>b({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:g,height:p}),orangeRicky:({width:g,height:p})=>b({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:g,height:p}),party:({width:g,height:p})=>b({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:g,height:p}),pillow:({width:g,height:p})=>b({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:g,height:p}),polygon:({width:g,height:p})=>b({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:g,height:p}),rainbow:({width:g,height:p})=>b({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:g,height:p}),rhodeIsland:({width:g,height:p})=>b({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:g,height:p}),shell:({width:g,height:p})=>b({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:g,height:p}),shield1:({width:g,height:p})=>b({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:g,height:p}),shield2:({width:g,height:p})=>b({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:g,height:p}),skewedRectangle:({width:g,height:p})=>b({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:g,height:p}),softFlower:({width:g,height:p})=>b({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:g,height:p}),softStar:({width:g,height:p})=>b({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:g,height:p}),stairs1:({width:g,height:p})=>b({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:g,height:p}),stairs2:({width:g,height:p})=>b({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:g,height:p}),teewee:({width:g,height:p})=>b({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:g,height:p}),blob1:({width:g,height:p})=>b({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:g,height:p}),blob10:({width:g,height:p})=>b({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:g,height:p}),blob11:({width:g,height:p})=>b({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:g,height:p}),blob12:({width:g,height:p})=>b({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:g,height:p}),blob13:({width:g,height:p})=>b({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:g,height:p}),blob14:({width:g,height:p})=>b({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:g,height:p}),blob15:({width:g,height:p})=>b({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:g,height:p}),blob16:({width:g,height:p})=>b({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:g,height:p}),blob17:({width:g,height:p})=>b({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:g,height:p}),blob18:({width:g,height:p})=>b({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:g,height:p}),blob19:({width:g,height:p})=>b({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:g,height:p}),blob2:({width:g,height:p})=>b({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:g,height:p}),blob20:({width:g,height:p})=>b({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:g,height:p}),blob21:({width:g,height:p})=>b({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:g,height:p}),blob22:({width:g,height:p})=>b({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:g,height:p}),blob23:({width:g,height:p})=>b({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:g,height:p}),blob24:({width:g,height:p})=>b({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:g,height:p}),blob25:({width:g,height:p})=>b({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:g,height:p}),blob26:({width:g,height:p})=>b({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:g,height:p}),blob27:({width:g,height:p})=>b({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:g,height:p}),blob28:({width:g,height:p})=>b({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:g,height:p}),blob29:({width:g,height:p})=>b({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:g,height:p}),blob3:({width:g,height:p})=>b({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:g,height:p}),blob30:({width:g,height:p})=>b({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:g,height:p}),blob31:({width:g,height:p})=>b({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:g,height:p}),blob32:({width:g,height:p})=>b({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:g,height:p}),blob4:({width:g,height:p})=>b({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:g,height:p}),blob5:({width:g,height:p})=>b({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:g,height:p}),blob6:({width:g,height:p})=>b({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:g,height:p}),blob7:({width:g,height:p})=>b({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:g,height:p}),blob8:({width:g,height:p})=>b({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:g,height:p}),blob9:({width:g,height:p})=>b({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:g,height:p})}}($1)),$1}var Ob;function BO(){return Ob||(Ob=1,function(e){var i=hd&&hd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=i(Tn()),n=Qi,a=Ja,l=Sv(),u=bc(),c=Xs(),h=zd(),b={};e.FigureElement=(0,n.observer)(({element:_,store:k})=>{const E=_.selectable||k.role==="admin",v=(0,c.isTouchDevice)(),[O,g]=t.default.useState(!1),p=k.selectedShapes.indexOf(_)>=0,P=Math.min(_.strokeWidth,_.width/2,_.height/2),d=Math.max(0,Math.min(_.width/2,_.height/2,_.cornerRadius)),m=(0,h.useColor)(_,_.a.fill,"fill"),y=Object.assign(Object.assign({width:_.a.width,height:_.a.height},m),{cornerRadius:d,opacity:_.animated("opacity"),shadowEnabled:_.shadowEnabled,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,shadowColor:_.shadowColor,shadowOpacity:_.shadowOpacity,preventDefault:!v||p,hideInExport:!_.showInExport}),w=(0,h.useColor)(_,_.stroke,"stroke"),N=Object.assign(Object.assign({visible:P>0,x:P/2,y:P/2,width:_.a.width-P,height:_.a.height-P},w),{strokeWidth:P,cornerRadius:Math.max(0,d-P),dash:_.dash.map(S=>S*P),opacity:_.animated("opacity"),hideInExport:!_.showInExport,listening:!1}),R=(D=_.subType,b[D]||(b[D]=(x=(0,l.subTypeToPathDataFunc)(D),(0,n.observer)(({element:S,fillProps:A,strokeProps:M})=>{let T=x({width:S.a.width,height:S.a.height,cornerRadius:S.cornerRadius}),z=1,U=1;typeof T!="string"&&(z=T.scaleX,U=T.scaleY,T=T.path);const Q=t.default.useRef(null);return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Rect,{width:S.width,height:S.height,fill:"transparent"}),t.default.createElement(a.Path,Object.assign({},A,{ref:Q,data:T,scaleX:z,scaleY:U})),t.default.createElement(a.Group,{clipFunc:K=>{const J=Q.current;if(J){var B=J.dataArray;K.beginPath();for(var L=0;L<B.length;L++){var F=B[L].command,H=B[L].points;switch(F){case"L":K.lineTo(H[0],H[1]);break;case"M":K.moveTo(H[0],H[1]);break;case"C":K.bezierCurveTo(H[0],H[1],H[2],H[3],H[4],H[5]);break;case"Q":K.quadraticCurveTo(H[0],H[1],H[2],H[3]);break;case"A":var $=H[0],ee=H[1],V=H[2],X=H[3],Y=H[4],te=H[5],re=H[6],ie=H[7],ae=V>X?V:X,ue=V>X?1:V/X,de=V>X?X/V:1;K.translate($,ee),K.rotate(re),K.scale(ue,de),K.arc(0,0,ae,Y,Y+te,1-ie),K.scale(1/ue,1/de),K.rotate(-re),K.translate(-$,-ee);break;case"z":K.closePath()}}}},scaleX:z,scaleY:U},t.default.createElement(a.Path,Object.assign({},M,{x:0,y:0,data:T,strokeWidth:2*M.strokeWidth,dash:M.dash.map(K=>K)}))))}))),b[D]||a.Group);var D,x;return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Group,{id:_.id,x:_.a.x,y:_.a.y,rotation:_.a.rotation,opacity:_.a.opacity,listening:E,draggable:v?_.draggable&&p:_.draggable,name:"element",onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onDragMove:S=>{_.set({x:S.target.x(),y:S.target.y()})},onDragEnd:S=>{_.set({x:S.target.x(),y:S.target.y()})},onTransform:S=>{const A=S.target.scale();S.target.scaleX(1),S.target.scaleY(1),_.set({width:_.width*A.x,height:_.height*A.y,x:S.target.x(),y:S.target.y(),rotation:S.target.rotation()})}},t.default.createElement(R,{element:_,fillProps:y,strokeProps:N})),(O||p)&&t.default.createElement(u.Highlighter,{element:_}))})}(hd)),hd}var xb;function UO(){return xb||(xb=1,function(e){var i=rd&&rd.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=O;const t=i(Tn()),n=Qi,a=L4(),l=D4(),u=jO(),c=FO(),h=zO(),b=BO(),_=Ja,k=ts(),E=(0,n.observer)(p=>{const{element:P,store:d}=p,{children:m}=P,y=P.selectable||d.role==="admin";return t.default.createElement(_.Group,{opacity:P.opacity,listening:y,hideInExport:!P.showInExport},m.map(w=>t.default.createElement(g,Object.assign({},p,{key:w.id,store:d,element:w}))))}),v={text:a.TextElement,image:l.ImageElement,svg:l.ImageElement,line:c.LineElement,video:h.VideoElement,figure:b.FigureElement,group:E};function O(p,P){v[p]=P}const g=(0,n.observer)(p=>{let P=v[p.element.type];return p.element.type==="text"&&k.flags.htmlRenderEnabled&&(P=u.HTMLElement),p.element.visible?P?t.default.createElement(P,Object.assign({},p)):(console.error("Can not find component for "+p.element.type),null):null});e.default=g}(rd)),rd}var W1={},Pb;function qO(){return Pb||(Pb=1,function(e){function i(t,n,a="scale"){const l=n.width/n.height;let u,c;l>=t.width/t.height?(u=t.width,c=t.width/l):(u=t.height*l,c=t.height);let h=0,b=0;return a==="left-top"?(h=0,b=0):a==="left-middle"?(h=0,b=(t.height-c)/2):a==="left-bottom"?(h=0,b=t.height-c):a==="center-top"?(h=(t.width-u)/2,b=0):a==="center-middle"?(h=(t.width-u)/2,b=(t.height-c)/2):a==="center-bottom"?(h=(t.width-u)/2,b=t.height-c):a==="right-top"?(h=t.width-u,b=0):a==="right-middle"?(h=t.width-u,b=(t.height-c)/2):a==="right-bottom"?(h=t.width-u,b=t.height-c):a==="scale"?(h=0,b=0,u=t.width,c=t.height):console.error(new Error("Unknown clip position property - "+a)),{cropX:h,cropY:b,cropWidth:u,cropHeight:c}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=i}(W1)),W1}var $a={},Y1={},Cb;function HO(){return Cb||(Cb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setAPI=e.iconscoutDownload=e.iconscoutList=e.svgapiDownload=e.svgapiList=e.unsplashDownload=e.unsplashList=e.textTemplateList=e.templateList=e.removeBackground=e.polotnoShapesList=e.getGoogleFontImage=e.getGoogleFontsListAPI=e.URLS=e.getAPI=e.API=e.URL=void 0;const i=Ev();e.URL="https://api.polotno.com",e.API="https://api.polotno.com/api";const t=()=>e.URL+"/api";e.getAPI=t;const n={},a=(m,y)=>{n[m]||(n[m]=!0,console.error(y))},l=`API for iconscout is provided as a demonstration.
|
|
254
|
-
For production usage you have to use your own API endpoint.
|
|
255
|
-
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
256
|
-
https://polotno.com/docs/server-api`;e.URLS={unsplashList:({query:m,page:y=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${m}&per_page=20&page=${y}&KEY=${(0,i.getKey)()}`,unsplashDownload:m=>`${(0,e.getAPI)()}/download-unsplash?id=${m}&KEY=${(0,i.getKey)()}`,svgapiList:({query:m,page:y=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${m}&page=${y}&per_page=20&KEY=${(0,i.getKey)()}`,svgapiDownload:m=>`${(0,e.getAPI)()}/download-svgapi?path=${m}&KEY=${(0,i.getKey)()}`,iconscoutList:({query:m,page:y=1})=>(a("iconscout",l),`${(0,e.getAPI)()}/get-iconscout?query=${m}&page=${y}&KEY=${(0,i.getKey)()}`),iconscoutDownload:m=>(a("iconscout",l),`${(0,e.getAPI)()}/download-iconscout?uuid=${m}&KEY=${(0,i.getKey)()}`),nounProjectList:({query:m,page:y=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${m}&page=${y}&KEY=${(0,i.getKey)()}`,nounProjectDownload:m=>`${(0,e.getAPI)()}/download-nounproject?id=${m}&KEY=${(0,i.getKey)()}`,templateList:({query:m,page:y=1,sizeQuery:w})=>`${(0,e.getAPI)()}/get-templates?${w}&query=${m}&per_page=30&page=${y}&KEY=${(0,i.getKey)()}`};const u=()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,i.getKey)()}`;e.getGoogleFontsListAPI=u;const c=m=>{return`${e.URL}/google-fonts-previews/black/${y=m,w=" ",N="-",y.replace(new RegExp(w,"g"),N)}.png`;var y,w,N};e.getGoogleFontImage=c;const h=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,i.getKey)()}`;e.polotnoShapesList=h;const b=()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,i.getKey)()}`;e.removeBackground=b;const _=m=>e.URLS.templateList(m);e.templateList=_;const k=()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,i.getKey)()}`;e.textTemplateList=k;const E=m=>e.URLS.unsplashList(m);e.unsplashList=E;const v=m=>e.URLS.unsplashDownload(m);e.unsplashDownload=v;const O=m=>e.URLS.svgapiList(m);e.svgapiList=O;const g=m=>e.URLS.svgapiDownload(m);e.svgapiDownload=g;const p=m=>e.URLS.iconscoutList(m);e.iconscoutList=p;const P=m=>e.URLS.iconscoutDownload(m);e.iconscoutDownload=P;const d=(m,y)=>{e.URLS[m]=y};e.setAPI=d}(Y1)),Y1}var kb;function Ev(){return kb||(kb=1,function(e){var i=$a&&$a.__createBinding||(Object.create?function(S,A,M,T){T===void 0&&(T=M);var z=Object.getOwnPropertyDescriptor(A,M);z&&!("get"in z?!A.__esModule:z.writable||z.configurable)||(z={enumerable:!0,get:function(){return A[M]}}),Object.defineProperty(S,T,z)}:function(S,A,M,T){T===void 0&&(T=M),S[T]=A[M]}),t=$a&&$a.__setModuleDefault||(Object.create?function(S,A){Object.defineProperty(S,"default",{enumerable:!0,value:A})}:function(S,A){S.default=A}),n=$a&&$a.__importStar||function(){var S=function(A){return S=Object.getOwnPropertyNames||function(M){var T=[];for(var z in M)Object.prototype.hasOwnProperty.call(M,z)&&(T[T.length]=z);return T},S(A)};return function(A){if(A&&A.__esModule)return A;var M={};if(A!=null)for(var T=S(A),z=0;z<T.length;z++)T[z]!=="default"&&i(M,A,T[z]);return t(M,A),M}}();Object.defineProperty(e,"__esModule",{value:!0}),e.__=e.getKey=e.isCreditVisible=void 0,e.isKeyPaid=D,e.validateKey=x;const a=n(da),l=HO(),u=ts(),c=a.observable({value:!1}),h=()=>c.value;e.isCreditVisible=h;const b=a.action(()=>{c.value=!0});let _="";const k=()=>_||"";e.getKey=k;const E=5,v=3e3,O="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",g="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",p="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",P="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let d=window.location.origin;const m=navigator.userAgent.indexOf("Headless")>-1,y=navigator.userAgent.indexOf("Electron")>-1;d==="file://"&&m&&(d="headless"),d==="file://"&&y&&(d="electron");const w=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${d}" here: https://polotno.com/cabinet`;let N=fetch;const R=S=>{console.log("here"),N=S};async function D(S){for(let A=0;A<E;A++)try{const M=await N((0,l.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:S,site:location.host})});if(!S)return console.warn(O),!1;if(M.status!==200){await new Promise(z=>setTimeout(z,v));continue}const T=await M.json();return T.is_valid||console.warn(g),T.is_paid||console.log(P,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),T.is_domain_valid||console.log(w,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,u.useRemoveBackground)(T.remove_background_enabled),T.is_paid||!1}catch{await new Promise(T=>setTimeout(T,v))}return console.error(p),!0}async function x(S,A){_=S,await D(S)&&!A||b()}e.__=R}($a)),$a}var K1={},Tb;function Ov(){return Tb||(Tb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0;const i=({px:l,unit:u="px",dpi:c})=>{switch(u){case"pt":default:return l;case"mm":return l/(c/25.4);case"cm":return l/(c/2.54);case"in":return l/c}};e.pxToUnit=i;const t=({px:l,precious:u=2,dpi:c=72,unit:h="px"})=>parseFloat((0,e.pxToUnit)({px:l,dpi:c,unit:h}).toFixed(u));e.pxToUnitRounded=t;const n=({unitVal:l,dpi:u,unit:c})=>l/(0,e.pxToUnit)({px:1,unit:c,dpi:u});e.unitToPx=n;const a=l=>{const u=parseFloat((0,e.pxToUnit)(l).toFixed(1));switch(l.unit){case"pt":return`${Math.round(u)}pt`;case"mm":return`${u}mm`;case"cm":return`${u}cm`;case"in":return`${u}in`;default:return`${Math.round(u)}px`}};e.pxToUnitString=a}(K1)),K1}var Ab;function GO(){return Ab||(Ab=1,function(e){var i=Is&&Is.__rest||function(L,F){var H={};for(var $ in L)Object.prototype.hasOwnProperty.call(L,$)&&F.indexOf($)<0&&(H[$]=L[$]);if(L!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for($=Object.getOwnPropertySymbols(L);ee<$.length;ee++)F.indexOf($[ee])<0&&Object.prototype.propertyIsEnumerable.call(L,$[ee])&&(H[$[ee]]=L[$[ee]])}return H},t=Is&&Is.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.setTransformerStyle=void 0,e.registerTransformerAttrs=S;const n=t(Tn()),a=Qi,l=da,u=Ja,c=t(jp()),h=t(Ji()),b=t(UO()),_=H4(),k=D4(),E=qO(),v=Ev(),O=Gd(),g=Ov(),p=ts(),P=Xs(),d=zd(),m=av(),y=h.default.DD._drag;window.removeEventListener("mousemove",y),h.default.DD._drag=function(L){(0,l.runInAction)(()=>{y.call(this,L)})},window.addEventListener("mousemove",h.default.DD._drag);const w=new h.default.Group;w.add(new h.default.Rect({width:20,height:20,fill:"white"})),w.add(new h.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 N=w.toCanvas({pixelRatio:2,width:20,height:20}),R={enabledAnchors:["top-left","top-center","top-right","middle-left","bottom-left","bottom-right","bottom-center","middle-right"],borderEnabled:!0,rotateEnabled:!0,rotationSnaps:[0,45,90,135,180,225,270,315],ignoreStroke:!0,flipEnabled:!1,anchorStrokeWidth:2,borderStrokeWidth:2,rotateAnchorOffset:30,anchorStyleFunc:L=>{L.hasName("rotater")&&L.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:N,fillPatternScaleX:20/20/2,fillPatternScaleY:20/20/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},D=L=>{Object.assign(R,L)};e.setTransformerStyle=D;const x={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(L,F){x[L]=x[L]||F,Object.assign(x[L],F)}const A=L=>n.default.createElement(u.Rect,Object.assign({},L,{preventDefault:!1})),M=L=>{var{url:F}=L,H=i(L,["url"]);const[$,ee]=(0,c.default)(F,"anonymous"),V=$?(0,E.getCrop)($,{width:H.width,height:H.height},"center-middle"):{};return(0,k.useImageLoader)(ee,F,"page background"),n.default.createElement(u.Image,Object.assign({image:$},H,V))},T=L=>{const F=(0,d.useColor)({fill:L.fill,a:{width:L.width,height:L.height}});return n.default.createElement(u.Rect,Object.assign({},L,F))},z=L=>{const{background:F,scale:H,borderColor:$}=L,ee=i(L,["background","scale","borderColor"]),V=n.default.useMemo(()=>!!h.default.Util.colorToRGBA(F)||(0,m.isGradient)(F),[F]),X=n.default.useMemo(()=>{const Y=document.createElement("canvas"),te=30;Y.width=60,Y.height=60;const re=Y.getContext("2d");return re&&(re.fillStyle="black",re.fillRect(te,0,te,te),re.fillRect(0,te,te,te)),Y},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Rect,Object.assign({fillPatternImage:X},ee,{opacity:.1,hideInExport:!0})),V?n.default.createElement(T,Object.assign({fill:F},ee)):n.default.createElement(M,Object.assign({url:F},ee)))},U=(0,a.observer)(({selection:L})=>L.visible?n.default.createElement(u.Rect,{name:"selection",x:Math.min(L.x1,L.x2),y:Math.min(L.y1,L.y2),width:Math.abs(L.x1-L.x2),height:Math.abs(L.y1-L.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),Q=(0,a.observer)(({x:L,y:F,width:H,height:$,rotation:ee,anchor:V,store:X})=>{const Y=(0,O.getClientRect)({x:L,y:F,width:H,height:$,rotation:h.default.Util.radToDeg(ee)});if(V===void 0)return null;const te=($/2+70)*Math.cos(ee-Math.PI/2),re=($/2+70)*Math.sin(ee-Math.PI/2),ie=(0,g.pxToUnitRounded)({unit:X.unit,dpi:X.dpi,px:H/X.scale,precious:X.unit==="px"?0:1})+" x "+(0,g.pxToUnitRounded)({unit:X.unit,dpi:X.dpi,px:$/X.scale,precious:X.unit==="px"?0:1})+(X.unit==="px"?"":" "+X.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Label,{x:(Y.minX+Y.maxX)/2+te,y:(Y.minY+Y.maxY)/2+re,offsetX:14,offsetY:14,visible:V==="rotater"},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(h.default.Util.radToDeg(ee)).toString()+"°"})),n.default.createElement(u.Label,{x:(Y.minX+Y.maxX)/2,y:Y.maxY+20,visible:V!=="rotater"},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:ie})))}),K=(0,a.observer)(({elements:L,store:F})=>{const H=L.filter(ee=>ee.alwaysOnTop),$=L.filter(ee=>!ee.alwaysOnTop).concat(H);return n.default.createElement(n.default.Fragment,null,$.map(ee=>n.default.createElement(b.default,{key:ee.id,store:F,element:ee,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let J=null;const B=L=>{J=L};e.registerNextDomDrop=B,e.default=(0,a.observer)(({store:L,page:F,width:H,height:$,pageControlsEnabled:ee,backColor:V,pageBorderColor:X,activePageBorderColor:Y,components:te,bleedColor:re,altCloneEnabled:ie})=>{const ae=L.bleedVisible?F.bleed:0,ue=F.computedWidth+2*ae,de=F.computedHeight+2*ae,pe=(H-ue*L.scale)/2,Oe=($-de*L.scale)/2,_e=n.default.useRef(null),Le=n.default.useRef(null),fe=n.default.useRef(null),ge=ee==null||ee,[Ce,Ae]=n.default.useState(null),[se,me]=n.default.useState({}),xe=L.selectedElements.find(Ie=>Ie._cropModeEnabled),Ne=L.selectedShapes.filter(Ie=>!Ie.resizable).length>0,ct=L.selectedShapes.filter(Ie=>!Ie.draggable).length>0,at=L.selectedElements.filter(Ie=>!Ie.visible).length>0;n.default.useLayoutEffect(()=>{var Ie,Ge,rt;if(!_e.current)return;const je=_e.current.getStage(),mt=L.selectedShapes.map(pt=>pt._cropModeEnabled?null:je.findOne("#"+pt.id)).filter(pt=>pt),ze=L.selectedElements.length===1&&((Ie=L.selectedElements[0])===null||Ie===void 0?void 0:Ie.type)||"many";x[ze]?(_e.current.setAttrs(Object.assign(Object.assign({},R),x[ze])),ze!=="svg"&&ze!=="image"||L.selectedElements[0].keepRatio||_e.current.setAttrs({enabledAnchors:R.enabledAnchors}),ze==="text"&&p.flags.textVerticalResizeEnabled&&_e.current.setAttrs({enabledAnchors:(Ge=x.text.enabledAnchors)===null||Ge===void 0?void 0:Ge.concat(["bottom-center"])})):_e.current.setAttrs(R),Ne&&_e.current.enabledAnchors([]),ct&&_e.current.rotateEnabled(!1),mt.find(pt=>pt==null?void 0:pt.isDragging())&&mt.forEach(pt=>{pt.isDragging()||pt==null||pt.startDrag()}),_e.current.nodes(mt),(rt=_e.current.getLayer())===null||rt===void 0||rt.batchDraw()},[L.selectedElements,xe,Ne,at,ct]);const De=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),Fe=n.default.useRef(!1),He=(0,P.isTouchDevice)(),Xe=(0,l.action)(Ie=>{var Ge,rt;if(He)return;Fe.current=!1;const je=Ie.target.findAncestor(".elements-container"),mt=Ie.target.findAncestor("Transformer"),ze=Ie.target.findAncestor(".page-abs-container");if(je||mt||ze)return;const pt=(Ge=Ie.target.getStage())===null||Ge===void 0?void 0:Ge.getPointerPosition();pt&&(De.visible=!0,De.x1=pt.x,De.y1=pt.y,De.x2=pt.x,De.y2=pt.y,((rt=Ie.target.getStage())===null||rt===void 0?void 0:rt.getPointersPositions().length)>=2&&(De.visible=!1))});n.default.useEffect(()=>{const Ie=(0,l.action)(rt=>{var je,mt;if(!De.visible)return;(je=Le.current)===null||je===void 0||je.setPointersPositions(rt);let ze=((mt=Le.current)===null||mt===void 0?void 0:mt.getPointerPosition())||{x:De.x2,y:De.y2};De.x2=ze.x,De.y2=ze.y}),Ge=(0,l.action)(()=>{if(!De.visible||!Le.current)return;const rt=Le.current.findOne(".selection"),je=rt?rt.getClientRect():{width:0,height:0,x:0,y:0};if(je.width&&je.height){const mt=[];Le.current.find(".element").forEach(pt=>{const _n=pt.getClientRect(),Be=L.getElementById(pt.id()),lt=Be==null?void 0:Be.draggable,_t=Be==null?void 0:Be.selectable;h.default.Util.haveIntersection(je,_n)&<&&_t&&mt.push(Be.top.id)});const ze=[...new Set(mt)];L.selectElements(ze)}De.visible=!1,Fe.current=!0});return window.addEventListener("mousemove",Ie),window.addEventListener("touchmove",Ie),window.addEventListener("mouseup",Ge),window.addEventListener("touchend",Ge),()=>{window.removeEventListener("mousemove",Ie),window.removeEventListener("touchmove",Ie),window.removeEventListener("mouseup",Ge),window.removeEventListener("touchend",Ge)}},[]);const ft=n.default.useRef(!1);n.default.useEffect(()=>{var Ie;let Ge;const rt=(Ie=fe.current)===null||Ie===void 0?void 0:Ie.closest(".polotno-workspace-inner"),je=()=>{ft.current=!0,clearTimeout(Ge),Ge=setTimeout(()=>{ft.current=!1},300)};return rt.addEventListener("scroll",je),()=>{clearTimeout(Ge),rt.removeEventListener("scroll",je)}},[]);const At=Ie=>{if(L.activePage!==F&&F.select(),ft.current||Fe.current)return;const Ge=Ie.evt.ctrlKey||Ie.evt.metaKey||Ie.evt.shiftKey,rt=Ie.target.findAncestor(".elements-container"),je=Ie.target.findAncestor(".page-abs-container"),mt=Ie.target.findAncestor("Transformer");if(!(Ge||rt||mt||je))return void L.selectElements([]);const ze=Ie.target.findAncestor(".element",!0),pt=L.getElementById(ze==null?void 0:ze.id()),_n=pt==null?void 0:pt.top,Be=_n==null?void 0:_n.id,lt=L.selectedElementsIds.indexOf(Be)>=0;Be&&Ge&&!lt?L.selectElements(L.selectedElementsIds.concat([Be])):Be&&Ge&<?L.selectElements(L.selectedElementsIds.filter(_t=>_t!==Be)):!Be||Ge||lt||L.selectElements([Be])};(0,_.useSnap)(_e,L);const xt=L.activePage===F,be=te==null?void 0:te.PageControls,Se=te==null?void 0:te.Tooltip,vt=1/L.scale,Pt=0/L.scale;return n.default.createElement("div",{ref:fe,onDragOver:Ie=>Ie.preventDefault(),onDrop:Ie=>{if(Ie.preventDefault(),!Le.current)return;Le.current.setPointersPositions(Ie);const Ge=Le.current.findOne(".elements-container").getRelativePointerPosition(),rt=Le.current.getPointerPosition(),je=Le.current.getAllIntersections(rt).map(pt=>pt.findAncestor(".element",!0)).filter(Boolean),mt=[...new Set(je.reverse())].map(pt=>L.getElementById(pt.id())),ze=mt[0];J&&(J(Ge,ze,{elements:mt,page:F}),J=null)},style:{position:"relative",width:H+"px"},className:"polotno-page-container"+(xt?" active-page":"")},n.default.createElement(u.Stage,{ref:Le,width:Math.min(H,10*window.innerWidth),height:Math.min($,10*window.innerHeight),onClick:At,onTap:At,onMouseDown:Xe,onMouseMove:Ie=>{if(!Ie.evt.altKey&&Ce)return void Ae(null);if(!Ie.evt.altKey)return;const Ge=Ie.target.findAncestor(".element",!0),rt=Ge==null?void 0:Ge.id();if(!L.selectedElements[0]||L.selectedElementsIds.includes(rt))return;const je=(0,O.getTotalClientRect)(L.selectedShapes),mt=rt?L.getElementById(rt):{x:0,y:0,width:F.computedWidth,height:F.computedHeight,rotation:0},ze=(0,O.getClientRect)(mt),pt=[];je.minX>ze.maxX&&pt.push({distance:je.minX-ze.maxX,box1:je,box2:ze,points:[{x:je.minX,y:je.minY+je.height/2},{x:ze.maxX,y:je.minY+je.height/2},{x:ze.maxX,y:ze.minY+ze.height/2}]}),je.maxX<ze.minX&&pt.push({distance:ze.minX-je.maxX,box1:je,box2:ze,points:[{x:je.maxX,y:je.minY+je.height/2},{x:ze.minX,y:je.minY+je.height/2},{x:ze.minX,y:ze.minY+ze.height/2}]}),je.minY>ze.maxY&&pt.push({box1:je,box2:ze,distance:je.minY-ze.maxY,points:[{x:je.minX+je.width/2,y:je.minY},{x:je.minX+je.width/2,y:ze.maxY},{x:ze.minX+ze.width/2,y:ze.maxY}]}),je.maxY<ze.minY&&pt.push({box1:je,box2:ze,distance:ze.minY-je.maxY,points:[{x:je.minX+je.width/2,y:je.maxY},{x:je.minX+je.width/2,y:ze.minY},{x:ze.minX+ze.width/2,y:ze.minY}]}),je.minX>=ze.minX&&je.maxX<=ze.maxX&&je.minY>=ze.minY&&je.maxY<=ze.maxY&&(pt.push({distance:je.minX-ze.minX,box1:je,box2:ze,points:[{x:je.minX,y:je.minY+je.height/2},{x:ze.minX,y:je.minY+je.height/2},{x:ze.minX,y:ze.minY+ze.height/2}]}),pt.push({distance:ze.maxX-je.maxX,box1:je,box2:ze,points:[{x:je.maxX,y:je.minY+je.height/2},{x:ze.maxX,y:je.minY+je.height/2},{x:ze.maxX,y:ze.minY+ze.height/2}]}),pt.push({box1:je,box2:ze,distance:je.minY-ze.minY,points:[{x:je.minX+je.width/2,y:je.minY},{x:je.minX+je.width/2,y:ze.minY},{x:ze.minX+ze.width/2,y:ze.minY}]}),pt.push({box1:je,box2:ze,distance:ze.maxY-je.maxY,points:[{x:je.minX+je.width/2,y:je.maxY},{x:je.minX+je.width/2,y:ze.maxY},{x:ze.minX+ze.width/2,y:ze.maxY}]})),JSON.stringify(Ce)!==JSON.stringify(pt)&&Ae(pt)},onDragStart:Ie=>{var Ge;const rt=Ie.target.findAncestor(".element",!0);if(rt){const je=L.getElementById(rt==null?void 0:rt.id()),mt=je==null?void 0:je.top,ze=mt==null?void 0:mt.id;!(L.selectedElementsIds.indexOf(ze)>=0)&&ze&&(L.selectElements([ze]),Ie.target.stopDrag(),Ie.target.startDrag(Ie),(Ge=_e.current)===null||Ge===void 0||Ge.startDrag(Ie))}Ce&&Ae(null)},pageId:F.id,style:{position:"relative"}},n.default.createElement(u.Layer,null,n.default.createElement(A,{width:H,height:$,fill:V}),n.default.createElement(u.Group,{x:pe,y:Oe,scaleX:L.scale,scaleY:L.scale,name:"page-container"},n.default.createElement(u.Group,{name:"page-container-2"},n.default.createElement(u.Group,{name:"page-background-group",x:ae,y:ae},n.default.createElement(z,{x:-F.bleed,y:-F.bleed,width:F.computedWidth+2*F.bleed,height:F.computedHeight+2*F.bleed,background:F.background,name:"page-background",preventDefault:!1,scale:L.scale})),n.default.createElement(u.Group,{x:ae,y:ae,name:"elements-container",listening:!L.isPlaying},n.default.createElement(u.Rect,{name:"elements-area",width:F.computedWidth,height:F.computedHeight,listening:!1}),n.default.createElement(K,{elements:F.children,store:L})),n.default.createElement(u.Rect,{stroke:re,name:"bleed",strokeWidth:F.bleed,x:F.bleed/2,y:F.bleed/2,width:F.computedWidth+F.bleed,height:F.computedHeight+F.bleed,listening:!1,visible:F.bleed>0&&L.bleedVisible,hideInExport:!0}))),n.default.createElement(u.Line,{name:"workspace-background",points:[0,0,H,0,H,$,0,$,0,0,pe,Oe,pe,$-Oe,H-pe,$-Oe,H-pe,Oe,pe,Oe],listening:!1,closed:!0,fill:V}),n.default.createElement(u.Group,{x:pe,y:Oe,scaleX:L.scale,scaleY:L.scale},n.default.createElement(u.Rect,{name:"page-highlight",hideInExport:!0,x:-vt/2-Pt,y:-vt/2-Pt,width:ue+vt+2*Pt,height:de+vt+2*Pt,stroke:xt&&L.pages.length>1?Y:X,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(u.Group,{x:pe+ae*L.scale,y:Oe+ae*L.scale,scaleX:L.scale,scaleY:L.scale,name:"page-abs-container"},n.default.createElement(u.Transformer,{ref:_e,onDragStart:Ie=>{var Ge;!((Ge=Ie.evt)===null||Ge===void 0)&&Ge.altKey&&ie&&L.selectedElements.forEach(rt=>{const je=rt.clone({},{skipSelect:!0}),mt=F.children.indexOf(rt);F.setElementZIndex(je.id,mt)}),L.history.startTransaction()},onDragEnd:()=>{L.history.endTransaction()},onTransformStart:()=>{L.history.startTransaction()},boundBoxFunc:(Ie,Ge)=>{const rt=Math.abs(Ge.width)<1||Math.abs(Ge.height)<1,je=Math.abs(Ie.width)<1||Math.abs(Ie.height)<1;return rt&&!je?Ie:Ge},onTransform:Ie=>{var Ge,rt;const je=_e.current.nodes(),mt=je[je.length-1];if(Ie.target!==mt)return;const ze=(Ge=_e.current)===null||Ge===void 0?void 0:Ge.__getNodeRect(),pt=(rt=_e.current)===null||rt===void 0?void 0:rt.getActiveAnchor();me({anchor:pt,x:ze.x,y:ze.y,rotation:ze.rotation,width:ze.width,height:ze.height})},onTransformEnd:Ie=>{me({}),L.history.endTransaction()},visible:!L.isPlaying}),Ce&&Ce.map(({points:Ie,distance:Ge,box1:rt,box2:je},mt)=>n.default.createElement(u.Group,{name:"distances-container",hideInExport:!0,key:mt,listening:!1},n.default.createElement(u.Rect,Object.assign({},rt,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(u.Rect,Object.assign({},je,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(u.Line,{points:[Ie[0].x,Ie[0].y,Ie[1].x,Ie[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(u.Line,{points:[Ie[1].x,Ie[1].y,Ie[2].x,Ie[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(u.Label,{x:(Ie[0].x+Ie[1].x)/2,y:(Ie[0].y+Ie[1].y)/2,offsetY:-10,scaleX:1/L.scale,scaleY:1/L.scale},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,g.pxToUnitString)({unit:L.unit,dpi:L.dpi,px:Ge})})))),F._rendering&&n.default.createElement(u.Group,null,n.default.createElement(u.Rect,{width:ue,height:de,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(u.Text,{text:"Rendering...",fontSize:60,width:ue,height:de,align:"center",verticalAlign:"middle"})),Se&&n.default.createElement(Se,{components:te,store:L,page:F,stageRef:Le})),n.default.createElement(Q,Object.assign({},se,{store:L})),n.default.createElement(U,{selection:De}),(0,v.isCreditVisible)()&&n.default.createElement(u.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:H-170,y:$-18,onMouseEnter:Ie=>{Ie.target.getStage().container().style.cursor="pointer"},onMouseLeave:Ie=>{Ie.target.getStage().container().style.cursor=""},onTouchStart:Ie=>{Ie.cancelBubble=!0},onMouseDown:Ie=>{Ie.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),n.default.createElement(u.Group,{name:"line-guides"}))),ge&&be&&n.default.createElement(be,{store:L,page:F,xPadding:pe,yPadding:Oe}))})}(Is)),Is}var pd={},Rb;function VO(){return Rb||(Rb=1,function(e){var i=pd&&pd.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=v;const t=i(Tn()),n=Gd(),a=Ov(),l=Qi,u=q4(),c=(0,u.styled)("div",t.default.forwardRef)`
|
|
257
|
-
position: absolute;
|
|
258
|
-
top: 0;
|
|
259
|
-
left: 0;
|
|
260
|
-
pointer-events: none;
|
|
261
|
-
`,h=(0,u.styled)("div",t.default.forwardRef)`
|
|
262
|
-
height: 14px;
|
|
263
|
-
position: sticky;
|
|
264
|
-
font-size: 8px;
|
|
265
|
-
line-height: 14px;
|
|
266
|
-
top: 0;
|
|
267
|
-
left: 0;
|
|
268
|
-
color: grey;
|
|
269
|
-
border-bottom: 1px solid grey;
|
|
270
|
-
background-color: #e8e8e8;
|
|
271
|
-
overflow: hidden;
|
|
272
|
-
`,b=(0,u.styled)("div",t.default.forwardRef)`
|
|
273
|
-
left: 0;
|
|
274
|
-
width: 14px;
|
|
275
|
-
position: sticky;
|
|
276
|
-
font-size: 8px;
|
|
277
|
-
line-height: 14px;
|
|
278
|
-
color: grey;
|
|
279
|
-
border-right: 1px solid grey;
|
|
280
|
-
background-color: #e8e8e8;
|
|
281
|
-
overflow: hidden;
|
|
282
|
-
`,_=(0,u.styled)("div",t.default.forwardRef)`
|
|
283
|
-
position: absolute;
|
|
284
|
-
border-left: 1px solid grey;
|
|
285
|
-
padding-left: 2px;
|
|
286
|
-
`,k=(0,u.styled)("div",t.default.forwardRef)`
|
|
287
|
-
position: absolute;
|
|
288
|
-
left: 14px;
|
|
289
|
-
border-left: 1px solid grey;
|
|
290
|
-
padding-left: 2px;
|
|
291
|
-
transform: rotate(90deg);
|
|
292
|
-
transform-origin: left top;
|
|
293
|
-
overflow: hidden;
|
|
294
|
-
`,E=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4];function v(){return t.default.createElement("div",null,t.default.createElement("h1",null,"Top rules"))}e.TopRules=(0,l.observer)(({store:O,width:g,height:p})=>{const P=t.default.useRef(null);if(!O.activePage)return null;const d=O.activePage,m=(O.bleedVisible&&d.bleed,d.computedWidth*O.scale),y=d.computedHeight*O.scale,w=(g-m)/2,N=(R=M=>(0,a.unitToPx)({unitVal:M,dpi:O.dpi,unit:O.unit})*O.scale,E.find(M=>R(M)>30)||1e4);var R;const D=(0,a.unitToPx)({unitVal:N,dpi:O.dpi,unit:O.unit})*O.scale,x=Math.round(m/D)+1,S=Math.round(y/D)+1,A=(0,n.getTotalClientRect)(O.selectedShapes);return t.default.createElement(c,{ref:P,className:"polotno-rulers"},t.default.createElement(h,{style:{width:g+"px"},className:"polotno-x-ruler"},[...Array(x)].map((M,T)=>t.default.createElement(_,{key:T,style:{left:w+T*D+"px",width:D+"px"}},O.unit==="px"||N>=1?Math.round(N*T):(N*T).toFixed(1))),!!O.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:w+A.x*O.scale+"px",height:"14px",width:A.width*O.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),O.pages.map((M,T)=>{var z;const U=M.computedHeight*O.scale,Q=(p-U)/2;return t.default.createElement(b,{key:M.id,style:{height:p+"px"},className:"polotno-y-ruler"},[...Array(S)].map((K,J)=>t.default.createElement(k,{key:J,style:{top:Q+J*D-14+"px",width:D+"px"}},O.unit==="px"||N>=1?Math.round(N*J):(N*J).toFixed(1))),((z=O.selectedShapes[0])===null||z===void 0?void 0:z.page)===M&&t.default.createElement("div",{style:{position:"absolute",top:Q+A.y*O.scale-14+"px",width:"14px",height:A.height*O.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(pd)),pd}var gd={},Mb;function $O(){return Mb||(Mb=1,function(e){var i=gd&&gd.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.AudioElement=void 0;const t=i(Tn()),n=Qi;function a(l){const[u,c]=t.default.useState(null),[h,b]=t.default.useState("loading");return t.default.useEffect(()=>{const _=new Audio(l),k=()=>{b("loaded"),c(_)},E=()=>{b("failed"),c(null)};return _.addEventListener("canplay",k),_.addEventListener("error",E),()=>{_.removeEventListener("canplay",k),_.removeEventListener("error",E)}},[l]),[u,h]}e.AudioElement=(0,n.observer)(({audio:l,store:u})=>{const[c,h]=a(l.src);return t.default.useEffect(()=>{c&&u.history.ignore(()=>{l.set({duration:1e3*c.duration})})},[c,l,u.history]),t.default.useEffect(()=>{if(!c)return;u.isPlaying&&u.animatedElementsIds.length===0?(c.currentTime=l.startTime*l.duration,c.volume=l.volume,c.play()):c.pause();const b=()=>{c.currentTime=l.startTime*l.duration},_=()=>{c.currentTime>=l.endTime*l.duration&&(c.pause(),c.currentTime=l.startTime*l.duration)};return c.addEventListener("ended",b),c.addEventListener("timeupdate",_),()=>{c.removeEventListener("ended",b),c.removeEventListener("timeupdate",_)}},[u.isPlaying,l.startTime,l.endTime,l.volume,c]),null})}(gd)),gd}var X1={},vd={};let WO="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G4=e=>crypto.getRandomValues(new Uint8Array(e)),V4=(e,i,t)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*n*i/e.length);return(l=i)=>{let u="";for(;;){let c=t(a),h=a;for(;h--;)if(u+=e[c[h]&n]||"",u.length===l)return u}}},YO=(e,i=21)=>V4(e,i,G4),KO=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((i,t)=>(t&=63,t<36?i+=t.toString(36):t<62?i+=(t-26).toString(36).toUpperCase():t>62?i+="-":i+="_",i),"");const XO=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:YO,customRandom:V4,nanoid:KO,random:G4,urlAlphabet:WO},Symbol.toStringTag,{value:"Module"})),Hp=Xl(XO);var Z1={},Ti={},Q1={},J1={},Lb;function $4(){return Lb||(Lb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0;const i=function(t,n){if(t===n)return!0;if(typeof t=="object"&&t!=null&&typeof n=="object"&&n!=null){if(Object.keys(t).length!=Object.keys(n).length)return!1;for(var a in t)if(!n.hasOwnProperty(a)||!(0,e.deepEqual)(t[a],n[a]))return!1;return!0}return!1};e.deepEqual=i}(J1)),J1}var Nb;function ZO(){return Nb||(Nb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const i=eo,t=$4();Object.assign(i.types),e.UndoManager=i.types.model("UndoManager",{history:i.types.array(i.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 a,l,u=!1,c=null,h=0,b=0;const _=()=>b>0;function k(){const v=(0,i.getSnapshot)(a);return{pages:v.pages,width:v.width,height:v.height,custom:v.custom}}function E(v){const O=a.pages.map(d=>d.id),g=v.pages.map(d=>d.id),p=!(0,t.deepEqual)(O,g),P=!(0,t.deepEqual)(a.custom,v.custom);p?(0,i.applySnapshot)(a.pages,v.pages):a.pages.forEach((d,m)=>{(0,i.applySnapshot)(d,v.pages[m])}),P&&a.set({custom:v.custom}),a.setSize(v.width,v.height)}return{startTransaction(){b++},endTransaction(v){b--,v||this.requestAddState(k())},async ignore(v,O=!1,g=!1){g&&await new Promise(y=>setTimeout(y,10)),h&&n.addUndoState();let p=_();n.startTransaction();let P=b;try{await v()}catch(y){setTimeout(()=>{throw y})}const d=P!==b,m=!d;n.endTransaction(m),O||p||n.replaceState(),d||(clearTimeout(h),h=0)},async transaction(v){await n.ignore(v,!0),this.addUndoState()},requestAddState(v){c=v,h||_()||(u?u=!1:h=setTimeout(()=>{h=0,clearTimeout(h),_()||this.addUndoState()},100))},addUndoState(){if(u)return void(u=!1);const v=n.history[n.undoIdx];!(0,t.deepEqual)(c,v)&&(clearTimeout(h),h=0,n.history.splice(n.undoIdx+1),n.history.push(c),n.undoIdx=n.history.length-1)},afterCreate(){if(a=(0,i.resolvePath)(n,".."),!a)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");l=(0,i.onSnapshot)(a,()=>{this.requestAddState(k())}),n.history.length===0&&this.requestAddState(k())},clear(){clearTimeout(h),h=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(k())},beforeDestroy(){l()},undo(){h&&this.addUndoState(),n.canUndo?(n.undoIdx--,u=!0,E(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){h&&this.addUndoState(),n.canRedo?(n.undoIdx++,u=!0,E(n.history[n.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){n.history[n.undoIdx]=k()}}}),e.default=e.UndoManager}(Q1)),Q1}var eg={},Ib;function QO(){return Ib||(Ib=1,function(e){async function i(t,n){const a=await(await fetch(t)).blob(),l=document.createElement("a"),u=URL.createObjectURL(a);l.href=u,l.download=n,document.body.appendChild(l),l.click(),setTimeout(function(){document.body.removeChild(l),window.URL.revokeObjectURL(u)},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=i}(eg)),eg}var tg={},Db;function JO(){return Db||(Db=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=n;const i="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let t;function n(){return t?Promise.resolve(t):new Promise(a=>{var l=document.createElement("script");l.onload=function(){t=window.jspdf.jsPDF,a(t)},l.src=i,document.head.appendChild(l)})}}(tg)),tg}var ng={},jb;function ex(){return jb||(jb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getGIF=t,e.createGIF=n;const i="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function t(){return window.GIF?Promise.resolve(window.GIF):new Promise(a=>{var l=document.createElement("script");l.onload=function(){a(window.GIF)},l.src=i,document.head.appendChild(l)})}async function n({width:a,height:l}){return new(await t())({workers:4,width:a,height:l,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
295
|
-
(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]);
|
|
296
|
-
`],{type:"application/javascript"}))})}}(ng)),ng}var rg={},Fb;function tx(){return Fb||(Fb=1,function(e){async function i(t){for(let n=0;n<30;n++){const a=await t();if(a)return a;await new Promise(l=>setTimeout(l,50))}}Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=i}(rg)),rg}var Oo={},ig={},zb;function wp(){return zb||(zb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=t,e.loadImage=n,e.cropImage=a,e.getCrop=l;const i=qd();function t(u){return new Promise(c=>{const h=document.createElement("img");h.onload=async()=>{h.width===0||h.height===0?c(await(0,i.getSvgSize)(u)):c({width:h.width,height:h.height})},h.crossOrigin="anonymous",h.src=u})}function n(u){return new Promise((c,h)=>{const b=document.createElement("img");b.onload=()=>{c(b)},b.onerror=_=>{h(_)},b.crossOrigin="anonymous",b.src=u})}async function a(u,c){const h=await n(u),b=document.createElement("canvas");b.width=2*h.width,b.height=2*h.height,b.getContext("2d").drawImage(h,0,0,b.width,b.height);const _=document.createElement("canvas");_.width=c.width,_.height=c.height;const k=_.getContext("2d");let{cropX:E,cropY:v}=c;const O=b.width*c.cropWidth,g=b.height*c.cropHeight,p=c.width/c.height;let P,d;const m=O/g;return c.type==="svg"?(P=O,d=g):p>=m?(P=O,d=O/p):(P=g*p,d=g),k.drawImage(b,E*b.width,v*b.height,P,d,0,0,_.width,_.height),_.toDataURL("image/png")}function l(u,c){const{width:h,height:b}=u,_=h/b;let k,E;_>=c.width/c.height?(k=c.width,E=c.width/_):(k=c.height*_,E=c.height);const v=(c.width-k)/2,O=(c.height-E)/2;return{cropX:v/c.width,cropY:O/c.height,cropWidth:k/c.width,cropHeight:E/c.height}}}(ig)),ig}var Bb;function nx(){return Bb||(Bb=1,function(e){var i=Oo&&Oo.__createBinding||(Object.create?function(x,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(x,M,T)}:function(x,S,A,M){M===void 0&&(M=A),x[M]=S[A]}),t=Oo&&Oo.__setModuleDefault||(Object.create?function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}:function(x,S){x.default=S}),n=Oo&&Oo.__importStar||function(){var x=function(S){return x=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},x(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=x(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=Oo&&Oo.__rest||function(x,S){var A={};for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&S.indexOf(M)<0&&(A[M]=x[M]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(x);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(x,M[T])&&(A[M[T]]=x[M[T]])}return A};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=k,e.jsonToDOM=w,e.jsonToHTML=D;const l=wp(),u=n(qd()),c=wp(),h=Sv(),b=U4(),_=(x,S,...A)=>({type:x,props:S,children:A||[]});function k(x){var S=new DOMParser().parseFromString(x,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const E=async({element:x,page:S,store:A})=>{let{src:M}=x;if(x.type==="svg"&&Object.keys(x.colorsReplace).length){const re=await u.urlToString(M);M=u.replaceColors(re,new Map(Object.entries(x.colorsReplace)))}let T="";x.flipX&&(T+="scaleX(-1)"),x.flipY&&(T+="scaleY(-1)"),T||(T="none");const z={};if(x.clipSrc){const re=await u.urlToBase64(x.clipSrc);z["clip-path"]=`url(${re})`}const U=await(0,c.loadImage)(M),Q=U.width*x.cropWidth,K=U.height*x.cropHeight,J=x.width/x.height;let B,L;const F=Q/K;x.type==="svg"?(B=Q,L=K):J>=F?(B=Q,L=Q/J):(B=K*J,L=K);const H=B/U.width,$=L/U.height,ee=B/L>x.width/x.height?x.height/L:x.width/B,V=B*ee/H,X=L*ee/$,Y=x.cropX*ee*U.width,te=x.cropY*ee*U.height;return _("div",{style:Object.assign(Object.assign({},z),{width:"100%",height:"100%","border-radius":x.cornerRadius+"px",border:x.borderSize?`${x.borderSize}px solid ${x.borderColor}`:"none",background:`url(${M})`,transform:T,"background-size":`${Math.round(V)}px ${Math.round(X)}px`,"background-position-x":-Math.round(Y)+"px","background-position-y":-Math.round(te)+"px"})})},v=async({element:x,page:S,store:A})=>{let M={top:0,left:0};x.fill.indexOf("gradient")>=0&&(M=Object.assign(Object.assign({},M),{"background-color":x.fill,"background-image":x.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const T=x.backgroundPadding*(x.fontSize*x.lineHeight),z=_("div",{style:{position:"absolute",top:-T/2+"px",left:-T/2+"px",display:x.backgroundEnabled?"block":"none",width:x.width+T+"px",height:x.height+T+"px","background-color":x.backgroundColor,"border-radius":x.backgroundCornerRadius*(x.fontSize*x.lineHeight*.5)+"px"}});x.verticalAlign==="middle"?(M.top="50%",M.transform="translateY(-50%)"):x.verticalAlign==="bottom"&&(M.bottom=0);const U=/<[a-z][\s\S]*>/i.test(x.text),Q=Object.assign(Object.assign({},M),{position:"absolute",width:x.width+"px",color:x.fill,"white-space":"pre-wrap","font-size":x.fontSize+"px","text-align":x.align,"font-family":x.fontFamily,"text-decoration":x.textDecoration||"none","line-height":x.lineHeight,"letter-spacing":x.letterSpacing+"em","font-style":x.fontStyle,"font-weight":x.fontWeight,"-webkit-text-stroke":`${x.strokeWidth}px ${x.stroke}`,"text-stroke":`${x.strokeWidth}px ${x.stroke}`}),K="el-"+x.id,J=U?{id:K}:{},B=`<style>#${K} {${b.resetStyleContent}}</style>`,L=_("div",Object.assign(Object.assign({style:Q},J),{innerHTML:U?`${B}${x.text}`:x.text.split(`
|
|
297
|
-
`).join("<br />")}));return _("div",{style:{position:"relative",width:"100%",height:"100%"}},z,L)},O=({element:x,type:S})=>{const A={"stroke-width":x.height,stroke:x.color,"line-cap":"round","stroke-linejoin":"round",opacity:x.opacity};return S==="arrow"||S==="triangle"?_("polyline",Object.assign({points:`${3*x.height},${2*-x.height} 0,0 ${3*x.height},${2*x.height}`},A)):S==="bar"?_("polyline",Object.assign({points:`0,${2*-x.height} 0,${2*x.height}`},A)):S==="circle"?_("circle",Object.assign({r:x.height},A)):S==="square"?_("polyline",Object.assign({points:`${-x.height},${-x.height} ${-x.height},${x.height} ${x.height},${x.height} ${x.height},${-x.height}`},A)):null},g=async({element:x,page:S,store:A})=>_("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},_("rect",{x:0,y:0,width:x.width,height:x.height,fill:x.color}),_("g",{transform:`translate(0 ${x.height/2})`},O({element:x,type:x.startHead})),_("g",{transform:`translate(${x.width} ${x.height/2}) rotate(180)`},O({element:x,type:x.endHead}))),p=async({element:x,page:S,store:A,elementHook:M})=>{const T=await Promise.all(x.children.map(U=>m({element:U,page:S,store:A,elementHook:M}))),z=_("div",{style:{"transform-origin":"top left",opacity:x.opacity}},...T);return M&&M({dom:z,element:x})||z},P=async({element:x,page:S,store:A,elementHook:M})=>{const T=(0,h.figureToSvg)(x),z=_("div",{innerHTML:T});return M&&M({dom:z,element:x})||z},d={image:E,svg:E,text:v,line:g,figure:P,group:p};async function m({element:x,page:S,store:A,elementHook:M}){let T=await d[x.type];T||(T=()=>_("div",{}),console.error(`HTML export does not support ${x.type} type...`));const z=await T({element:x,page:S,store:A}),U=[];x.blurEnabled&&U.push(`blur(${x.blurRadius/2}px)`),x.brightnessEnabled&&U.push(`brightness(${100*x.brightness+100}%)`),x.sepiaEnabled&&U.push("sepia()"),x.grayscaleEnabled&&U.push("grayscale()"),x.shadowEnabled&&U.push(`drop-shadow(${x.shadowOffsetX}px ${x.shadowOffsetY}px ${x.shadowBlur}px ${x.shadowColor})`);const Q=_("div",{id:x.id,style:{position:"absolute",left:x.x+"px",top:x.y+"px",width:x.width+"px",height:x.height+"px",transform:`rotate(${x.rotation}deg)`,"transform-origin":"top left",opacity:x.opacity,display:x.visible&&x.showInExport?"block":"none",filter:U.join(" ")||"none"}},z);return M&&M({dom:Q,element:x})||Q}async function y({page:x,store:S,elementHook:A}){const M=await Promise.all(x.children.map(Q=>m({element:Q,page:x,store:S,elementHook:A}))),T=x.width==="auto"?S.width:x.width,z=x.height==="auto"?S.height:x.height;let U={};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{width:Q,height:K}=await(0,c.loadImage)(x.background),J=await E({element:Object.assign({x:0,y:0,width:Q,height:K,src:x.background,cornerRadius:0},(0,l.getCrop)({width:Q,height:K},{width:Q,height:K})),page:x,store:S});M.unshift(J)}else U=Object.assign(Object.assign({},U),{"background-color":x.background});return _("div",{className:"page",id:x.id,style:Object.assign(Object.assign({},U),{width:T+"px",height:z+"px",border:"1px solid grey",overflow:"hidden",position:"relative"})},...M)}async function w({json:x,elementHook:S}){const A=await Promise.all(x.pages.map(z=>y({page:z,store:x,elementHook:S}))),M=[];x.pages.forEach(z=>{z.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const T=M.map(z=>x.fonts.find(U=>U.fontFamily===z)?_("style",{},""):_("link",{href:`https://fonts.googleapis.com/css?family=${z}`,rel:"stylesheet"}));return _("div",{className:"design"},...T,...A)}const N=(x,S)=>typeof S=="object"?`${x}="${Object.keys(S).map(A=>`${A}:${S[A]};`).join(" ")}"`:`${x}="${S}"`,R=({dom:x})=>{if(typeof x=="string")return x;if(!x)return"";const S=x.props,{innerHTML:A}=S,M=a(S,["innerHTML"]);return`<${x.type} ${Object.keys(M).map(T=>N(T,x.props[T])).join(" ")}>${A||x.children.map(T=>R({dom:T})).join("")}</${x.type}>`};async function D({json:x,elementHook:S}){const A=await w({json:x,elementHook:S});return R({dom:A})}}(Oo)),Oo}var xo={},Ub;function rx(){return Ub||(Ub=1,function(e){var i=xo&&xo.__createBinding||(Object.create?function(x,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(x,M,T)}:function(x,S,A,M){M===void 0&&(M=A),x[M]=S[A]}),t=xo&&xo.__setModuleDefault||(Object.create?function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}:function(x,S){x.default=S}),n=xo&&xo.__importStar||function(){var x=function(S){return x=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},x(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=x(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=xo&&xo.__rest||function(x,S){var A={};for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&S.indexOf(M)<0&&(A[M]=x[M]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(x);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(x,M[T])&&(A[M[T]]=x[M[T]])}return A};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=_,e.jsonToDOM=w,e.jsonToSVG=D;const l=wp(),u=n(qd()),c=wp(),h=Sv(),b=(x,S,...A)=>({type:x,props:S,children:A||[]});function _(x){var S=new DOMParser().parseFromString(x,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const k=async({element:x,page:S,store:A})=>{let{src:M}=x;if(x.type==="svg"){const ie=await u.urlToString(M);M=u.replaceColors(ie,new Map(Object.entries(x.colorsReplace)))}let T="";x.flipX&&(T+="scaleX(-1)"),x.flipY&&(T+="scaleY(-1)"),x.clipSrc&&await u.urlToBase64(x.clipSrc);const z=await(0,c.loadImage)(M),U=z.width*x.cropWidth,Q=z.height*x.cropHeight,K=x.width/x.height;let J,B;const L=U/Q;x.type==="svg"?(J=U,B=Q):K>=L?(J=U,B=U/K):(J=Q*K,B=Q);const F=J/z.width,H=B/z.height,$=J/B>x.width/x.height?x.height/B:x.width/J,ee=J*$/F,V=B*$/H,X=x.cropX*z.width*$,Y=x.cropY*z.height*$,te=`clip-${x.id}`,re=M.replace(/&/g,"&");return b("g",{style:{transform:T}},b("defs",{},b("clipPath",{id:te},b("rect",{x:0,y:0,width:x.width,height:x.height}))),b("image",{"xlink:href":re,x:-X,y:-Y,width:ee,height:V,preserveAspectRatio:"none","clip-path":`url(#${te})`}))},E=async({element:x,page:S,store:A})=>{const M=(K,J,B,L,F)=>{const H=document.createElement("canvas").getContext("2d");return H.font=`${F} ${L} ${J}px ${B}`,H.measureText(K).width},T=((K,J,B,L,F,H)=>{const $=[];return K.split(`
|
|
298
|
-
`).forEach(ee=>{const V=ee.split(" ");let X="";for(let Y=0;Y<V.length;Y++){const te=X+V[Y]+" ";M(te,B,L,F,H)>J+.5&&Y>0?($.push(X.trim()),X=V[Y]+" "):X=te}$.push(X.trim())}),$})(x.text,x.width,x.fontSize,x.fontFamily,x.fontWeight,x.fontStyle),z=x.fontSize*x.lineHeight,U=x.align==="center"?"middle":x.align==="right"?"end":"start",Q=T.map((K,J)=>b("tspan",{x:x.align==="center"?x.width/2:x.align==="right"?x.width:0,dy:J===0?0:z,innerHTML:K}));return b("g",{},b("text",{fill:x.fill,y:x.fontSize,"font-size":x.fontSize+"px","text-anchor":U,"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},...Q))},v=({element:x,type:S})=>{const A={"stroke-width":x.height,stroke:x.color,"line-cap":"round","stroke-linejoin":"round",opacity:x.opacity};return S==="arrow"||S==="triangle"?b("polyline",Object.assign({points:`${3*x.height},${2*-x.height} 0,0 ${3*x.height},${2*x.height}`},A)):S==="bar"?b("polyline",Object.assign({points:`0,${2*-x.height} 0,${2*x.height}`},A)):S==="circle"?b("circle",Object.assign({r:x.height},A)):S==="square"?b("polyline",Object.assign({points:`${-x.height},${-x.height} ${-x.height},${x.height} ${x.height},${x.height} ${x.height},${-x.height}`},A)):null},O=async({element:x,page:S,store:A})=>b("g",{},b("line",{x1:0,y1:x.height/2,x2:x.width,y2:x.height/2,stroke:x.color,"stroke-width":x.height}),b("g",{transform:`translate(0 ${x.height/2})`},v({element:x,type:x.startHead})),b("g",{transform:`translate(${x.width} ${x.height/2}) rotate(180)`},v({element:x,type:x.endHead}))),g=async({element:x,page:S,store:A,elementHook:M})=>{const T=await Promise.all(x.children.map(U=>m({element:U,page:S,store:A,elementHook:M}))),z=b("g",{opacity:x.opacity,transform:`translate(${x.x}, ${x.y}) rotate(${x.rotation})`,style:{"transform-origin":"top left"}},...T);return M&&M({dom:z,element:x})||z};function p(x){let S=x.replace(/<svg[^>]*>/,"");return S=S.replace(/<\/svg>/,""),S}const P=async({element:x,page:S,store:A,elementHook:M})=>{const T=p((0,h.figureToSvg)(x)),z=b("g",{innerHTML:T});return M&&M({dom:z,element:x})||z},d={image:k,svg:k,text:E,line:O,figure:P,group:g};async function m({element:x,page:S,store:A,elementHook:M}){let T=await d[x.type];T||(T=()=>b("g",{}),console.error(`SVG export does not support ${x.type} type...`));const z=await T({element:x,page:S,store:A}),U=[];x.blurEnabled&&U.push(`blur(${x.blurRadius/2}px)`),x.brightnessEnabled&&U.push(`brightness(${100*x.brightness+100}%)`),x.sepiaEnabled&&U.push("sepia()"),x.grayscaleEnabled&&U.push("grayscale()"),x.shadowEnabled&&U.push(`drop-shadow(${x.shadowOffsetX}px ${x.shadowOffsetY}px ${x.shadowBlur}px ${x.shadowColor})`);const Q=b("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:U.join(" ")}},z);return M&&M({dom:Q,element:x})||Q}async function y({page:x,store:S,elementHook:A}){const M=await Promise.all(x.children.map(U=>m({element:U,page:x,store:S,elementHook:A}))),T=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;let z;if(T){const U=await(0,c.loadImage)(x.background);z=await(0,c.cropImage)(x.background,Object.assign({width:S.width,height:S.height,x:0,y:0},(0,l.getCrop)({width:S.width,height:S.height},{width:U.width,height:U.height})))}return b("g",{className:"page",style:{}},T?b("image",{"xlink:href":z,x:0,y:0,width:S.width,height:S.height,preserveAspectRatio:"none"}):b("rect",{x:0,y:0,width:S.width,height:S.height,fill:T?void 0:x.background}),...M)}async function w({json:x,elementHook:S}){const A=await Promise.all(x.pages.map(z=>y({page:z,store:x,elementHook:S}))),M=[];x.pages.forEach(z=>{z.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const T=M.map(z=>x.fonts.find(U=>U.fontFamily===z)?b("style",{},""):b("defs",{},b("style",{type:"text/css",innerHTML:`@import url('https://fonts.googleapis.com/css?family=${z}:bi,normal,i,b');`.replace(/&/g,"&")})));return b("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${x.width} ${x.height}`,width:x.width,height:x.height},...T,...A)}const N=(x,S)=>typeof S=="object"?`${x}="${Object.keys(S).map(A=>`${A}:${S[A]};`).join(" ")}"`:S==null||S===""?"":`${x}="${S}"`,R=({dom:x,nestLevel:S=0})=>{if(typeof x=="string")return x;if(!x)return"";const A=x.props,{innerHTML:M}=A,T=a(A,["innerHTML"]),z=" ".repeat(S);return`${z}<${x.type} ${Object.keys(T).map(U=>N(U,T[U])).join(" ")}>${M||`
|
|
299
|
-
`+x.children.map(U=>R({dom:U,nestLevel:S+1})).join("")}${z}</${x.type}>
|
|
300
|
-
`};async function D({json:x,elementHook:S}){const A=await w({json:x,elementHook:S});return R({dom:A})}}(xo)),xo}var og={},qb;function W4(){return qb||(qb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const i=eo,t=Hp,n=Td(),a=xv(),l=Td(),u=Gd();e.Page=i.types.model("Page",{id:i.types.identifier,children:i.types.array(i.types.late(()=>n.ElementTypes)),width:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),height:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),background:"white",bleed:0,custom:i.types.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(c=>{const h=Object.assign({},c),b={};for(var _ in h)_[0]!=="_"&&(b[_]=c[_]);return b}).views(c=>({get store(){return(0,i.getParentOfType)(c,a.Store)}})).views(c=>({get startTime(){let h=0;for(const b of c.store.pages){if(b.id===c.id)return h;h+=b.duration}return h},get _exportingOrRendering(){return c._exporting||c._rendering}})).views(c=>({get computedWidth(){return c.width==="auto"?c.store.width:c.width},get computedHeight(){return c.height==="auto"?c.store.height:c.height}})).actions(c=>({toJSON:()=>JSON.parse(JSON.stringify((0,i.getSnapshot)(c))),_forEachElementUp(h,b){const _=h.map(k=>({id:k,index:c.children.findIndex(E=>E.id===k)}));_.sort((k,E)=>E.index-k.index);for(const{index:k}of _){if(k==-1)continue;const E=k<c.children.length-1&&c.children[k+1],v=h.indexOf(E==null?void 0:E.id)>=0;k===c.children.length-1||v||b(k)}},_forEachElementDown(h,b){const _=h.map(k=>({id:k,index:c.children.findIndex(E=>E.id===k)}));_.sort((k,E)=>k.index-E.index);for(const{index:k}of _){if(k==-1)continue;const E=k>0&&c.children[k-1],v=h.indexOf(E==null?void 0:E.id)>=0;k===0||v||b(k)}return!1}})).actions(c=>({clone(h={}){const b=c.toJSON();b.children.forEach(v=>{v.id=(0,t.nanoid)(10),(0,l.forEveryChild)(v,O=>{O.id=(0,t.nanoid)(10)})});const _=Object.assign(Object.assign(Object.assign({},b),{id:(0,t.nanoid)(10)}),h),k=c.store.addPage(_),E=c.store.pages.indexOf(c);k.setZIndex(E+1),k.select()},setZIndex(h){c.store.setPageZIndex(c.id,h)},set(h){Object.assign(c,h)},select(){c.store.selectPage(c.id)},addElement(h,{skipSelect:b=!1}={}){const _=l.TYPES_MAP[h.type];if(!_)return void console.error("Can not find model with type "+h.type);"children"in h&&Array.isArray(h.children)&&h.children.forEach(E=>{E.id=(0,t.nanoid)(10)});const k=_.create(Object.assign({id:(0,t.nanoid)(10)},h));return c.children.push(k),k.selectable&&!b&&c.store.selectElements([k.id]),k},canMoveElementsUp(h){let b=!1;return c._forEachElementUp(h,()=>{b=b||!0}),b},moveElementsUp(h){c._forEachElementUp(h,b=>{const _=c.children[b];(0,i.detach)(_),c.children.splice(b+1,0,_)})},canMoveElementsTop(h){return this.canMoveElementsUp(h)},moveElementsTop(h){const b=[],_=[];c.children.forEach(k=>{h.indexOf(k.id)>=0?b.push(k):_.push(k)}),c.children.replace(_.concat(b))},canMoveElementsDown(h){let b=!1;return c._forEachElementDown(h,()=>{b=b||!0}),b},moveElementsDown(h){c._forEachElementDown(h,b=>{const _=c.children[b];(0,i.detach)(_),c.children.splice(b-1,0,_)})},canMoveElementsBottom(h){return this.canMoveElementsDown(h)},moveElementsBottom(h){const b=[],_=[];c.children.forEach(k=>{h.indexOf(k.id)>=0?b.push(k):_.push(k)}),c.children.replace(b.concat(_))},setElementZIndex(h,b){const _=c.children.find(k=>k.id===h);_&&((0,i.detach)(_),c.children.remove(_),c.children.splice(b,0,_))},setSize({width:h,height:b,useMagic:_,softChange:k}){if(_){const E=[],v=T=>T.type==="image"&&T.x<1&&T.y<1&&T.width>=c.computedWidth-2&&T.height>=c.computedHeight-2;(0,l.forEveryChild)(c,T=>{T.type!=="group"&&(v(T)||E.push(T))});const O=E.length?(0,u.getTotalClientRect)(E):{x:0,y:0,width:c.computedWidth,height:c.computedHeight},g=1/4,p=Math.max(0,Math.min(O.x,c.computedWidth-O.x-O.width)),P=c.computedWidth*g,d=Math.max(0,p-P),m=Math.max(0,Math.min(O.y,c.computedHeight-O.y-O.height)),y=c.computedHeight*g,w=Math.max(0,m-y),N=c.computedWidth-2*d,R=c.computedHeight-2*w,D=h/N,x=b/R,S=Math.min(D,x),A=(h-N*S)/2-d*S,M=(b-R*S)/2-w*S;(0,l.forEveryChild)(c,T=>{T.type!=="group"&&(v(T)?T.set({x:T.x*S,y:T.y*S,width:T.width*D,height:T.height*x,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(T.set({x:A+T.x*S,y:M+T.y*S,width:T.width*S,height:T.height*S}),T.type==="text"?T.set({fontSize:T.fontSize*S}):T.type==="figure"&&T.set({strokeWidth:T.strokeWidth*S})))})}k||(c.width=h),k||(c.height=b)}})).actions(c=>({moveElementUp(h){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),c.moveElementsUp([h])},moveElementDown(h){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),c.moveElementsDown([h])},moveElementTop(h){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),c.moveElementsTop([h])},moveElementBottom(h){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),c.moveElementsBottom([h])},play(){c.store.play({startTime:c.startTime,endTime:c.startTime+c.duration})}}))}(og)),og}var ag={},Hb;function ix(){return Hb||(Hb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;const i=eo;e.Audio=i.types.model("Audio",{id:i.types.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(t=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(t))})).actions(t=>({set(n){Object.assign(t,n)}}))}(ag)),ag}var Gb;function xv(){return Gb||(Gb=1,function(e){var i=Ti&&Ti.__createBinding||(Object.create?function(x,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(x,M,T)}:function(x,S,A,M){M===void 0&&(M=A),x[M]=S[A]}),t=Ti&&Ti.__setModuleDefault||(Object.create?function(x,S){Object.defineProperty(x,"default",{enumerable:!0,value:S})}:function(x,S){x.default=S}),n=Ti&&Ti.__importStar||function(){var x=function(S){return x=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},x(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=x(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=Ti&&Ti.__rest||function(x,S){var A={};for(var M in x)Object.prototype.hasOwnProperty.call(x,M)&&S.indexOf(M)<0&&(A[M]=x[M]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(x);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(x,M[T])&&(A[M[T]]=x[M[T]])}return A},l=Ti&&Ti.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=D;const u=eo,c=ZO(),h=Hp,b=l(Ji()),_=QO(),k=JO(),E=ex(),v=Ev(),O=n(Bd()),g=Ks(),p=Ov(),P=$4(),d=tx(),m=nx(),y=rx(),w=W4(),N=Td(),R=ix();function D({key:x,showCredit:S}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:S,_key:x})}(0,u.setLivelinessChecking)("ignore"),e.Font=u.types.model("Font",{fontFamily:u.types.string,url:u.types.optional(u.types.string,""),styles:u.types.frozen()}).preProcessSnapshot(x=>Object.assign(Object.assign({},x),{fontFamily:x.fontFamily||x.name})),e.Store=u.types.model("Store",{role:"",pages:u.types.array(w.Page),fonts:u.types.array(e.Font),audios:u.types.array(R.Audio),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:u.types.frozen(),selectedElementsIds:u.types.array(u.types.string),animatedElementsIds:u.types.array(u.types.string),history:u.types.optional(c.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(x=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),x.bleedVisible},get selectedElements(){return x.selectedElementsIds.map(S=>{for(const A of x.pages)for(const M of A.children)if(M.id===S)return M}).filter(S=>!!S)},get children(){return x.pages},get selectedShapes(){const S=[];return(0,N.forEveryChild)({children:x.selectedElements},A=>{A.type!=="group"&&S.push(A)}),S},get activePage(){return x.pages.slice().find(S=>S.id===x._activePageId)||(x.pages.length?x.pages[0]:null)},get duration(){let S=0;return x.pages.forEach(A=>{S+=A.duration}),S},get _hasCroppedImages(){return x.find(S=>S.type==="image"&&S._cropModeEnabled)},find(S){let A;return(0,N.forEveryChild)({children:x.pages},M=>{if(!A&&S(M))return A=M,!0}),A},getElementById:S=>x.find(A=>A.id===S)})).actions(x=>{let S=0,A=null,M=!1;return{afterCreate(){x.history.canUndo},setCurrentTime(T){x.currentTime=T},_togglePlaying(T=!x.isPlaying){x.isPlaying=T},play({animatedElementsIds:T=[],startTime:z=0,currentTime:U=0,endTime:Q=x.duration,repeat:K=!1}={}){U&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),z=U),x.animatedElementsIds=(0,u.cast)(T),x.currentTime=z,x.isPlaying=!0,S=Date.now(),A=Q,M=K,requestAnimationFrame(x.seek)},checkActivePage(){let T=0;for(const z of x.pages){if(x.currentTime>=z.startTime&&x.currentTime<z.startTime+z.duration){x.selectPage(z.id);break}T+=z.duration}},seek(){if(!x.isPlaying)return;const T=Date.now(),z=T-S;S=T,x.currentTime+=z,x.checkActivePage();const U=A||x.duration;x.isPlaying&&x.currentTime<U?requestAnimationFrame(x.seek):x.isPlaying&&M?(x.currentTime=0,requestAnimationFrame(x.seek)):x.stop()},stop(){x.isPlaying=!1,x.currentTime=0,x.animatedElementsIds=(0,u.cast)([]),x.checkActivePage()}}}).actions(x=>({__(){x._validated||((0,v.validateKey)(x._key,x._forceShowCredit),x._validated=!0)},set(S){Object.assign(x,S)},setUnit({unit:S,dpi:A}){x.unit=S||x.unit,x.dpi=A||x.dpi},setRole(S){x.role=S},addPage(S){const A=w.Page.create(Object.assign({id:(0,h.nanoid)(10)},S));return x.pages.push(A),x._activePageId=A.id,A},selectPage(S){x._activePageId=S},selectElements(S){const A=S.map(M=>x.getElementById(M)).sort((M,T)=>M.page.children.indexOf(M)-M.page.children.indexOf(T)).filter(M=>!!M).map(M=>M.id);x.selectedElementsIds=(0,u.cast)(A)},toggleBleed(S){x.bleedVisible=S??!x.bleedVisible},toggleRulers(S){x.rulesVisible=S??!x.rulesVisible},openSidePanel(S){x.openedSidePanel!==S&&(x.previousOpenedSidePanel=x.openedSidePanel,x.openedSidePanel=S)},setScale(S){x.scale=S},_setScaleToFit(S){x.scaleToFit=S},setElementsPixelRatio(S){x._elementsPixelRatio=S},setSize(S,A,M){x.pages.forEach(T=>{T.setSize({width:S,height:A,useMagic:M,softChange:!0})}),x.width=S,x.height=A},setPageZIndex(S,A){const M=x.pages.find(T=>T.id===S);M&&((0,u.detach)(M),x.pages.remove(M),x.pages.splice(A,0,M))},deletePages(S){const A=x.pages.indexOf(x.activePage);S.forEach(z=>{const U=x.pages.find(Q=>Q.id===z);(0,u.destroy)(U)});const M=Math.min(x.pages.length-1,A),T=x.pages[M];T&&(x._activePageId=T.id),x.selectedElementsIds=(0,u.cast)(x.selectedElementsIds.filter(z=>x.getElementById(z)))},groupElements(S){const A=S.map(z=>x.getElementById(z));A.forEach(z=>{z&&(0,u.detach)(z)});const M=x.activePage,T={id:(0,h.nanoid)(10),children:A,type:"group"};return M.children.push(T),x.selectedElementsIds=(0,u.cast)([T.id]),M.children.find(z=>z.id===T.id)},ungroupElements(S){const A=S.map(T=>x.getElementById(T)),M=[];A.forEach(T=>{if(T&&T.type==="group"){const z=T.page,U=z.children.indexOf(T);T.children.forEach(Q=>{M.push(Q.id)}),T.children.forEach(Q=>{(0,u.detach)(Q),z.children.push(Q)}),z.children.splice(U,1)}}),x.selectedElementsIds=(0,u.cast)(M)},deleteElements(S){const A=[];x.find(M=>(S.includes(M.id)&&A.push(M),!1)),A.forEach(M=>{(0,u.destroy)(M)}),x.selectedElementsIds=(0,u.cast)(x.selectedElementsIds.filter(M=>x.getElementById(M)))},on(S,A){if(S==="change"){let M=x.toJSON();return(0,u.onSnapshot)(x,T=>{const z=x.toJSON();!(0,P.deepEqual)(M,z)&&(M=z,A(z))})}},async _toCanvas({pixelRatio:S,ignoreBackground:A,pageId:M,mimeType:T,includeBleed:z,_skipTimeout:U,quickMode:Q=!1}={}){var K;const J=S||1;M=M||((K=x.pages[0])===null||K===void 0?void 0:K.id);const B=x.pages.find(_e=>_e.id===M);if(!B)throw new Error(`No page for export with id ${M}`);Q?B==null||B.set({_forceMount:!0}):B==null||B.set({_exporting:!0});const L=await(0,d.waitTillAvailable)(()=>b.default.stages.find(_e=>_e.getAttr("pageId")===M));if(!L)throw B==null||B.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can not find stage for page ${M}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const F=!!L.findOne(".page-container"),H=x._elementsPixelRatio;J>x._elementsPixelRatio&&x.setElementsPixelRatio(J),await x.waitLoading({_skipTimeout:U});const $=L.findOne(".page-container");if(!$)throw x.setElementsPixelRatio(H),B==null||B.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can't find page container. ${F}`);L.find("Transformer").forEach(_e=>_e.visible(!1)),$.find(".page-background").forEach(_e=>_e.shadowEnabled(!1)),$.find(".page-background").forEach(_e=>_e.strokeEnabled(!1)),$.find(".highlighter").forEach(_e=>_e.visible(!1));const ee=$.findOne(".page-background-group"),V=ee.clip();ee.clip({x:null,y:null,width:null,height:null});const X=$.findOne(".elements-container"),Y=X.clip();X.clip({x:null,y:null,width:null,height:null});const te=$.find(_e=>_e.getAttr("hideInExport"));te.forEach(_e=>{_e.setAttr("oldVisible",_e.visible()),_e.hide()});const re=$.find(_e=>!_e.visible()&&_e.getAttr("editModeEnabled"));re.forEach(_e=>{_e.setAttr("oldVisible",_e.visible()),_e.show()}),A&&$.find(".page-background").forEach(_e=>_e.hide());const ie=z?B.bleed:0;let ae=ie;!x.bleedVisible&&z||(x.bleedVisible||z?x.bleedVisible&&z?ae=0:x.bleedVisible&&!z&&(ae=-B.bleed):ae=0);const ue=document.createElement("canvas");ue.width=Math.round((B.computedWidth+2*ie)*J),ue.height=Math.round((B.computedHeight+2*ie)*J);const de=ue.getContext("2d");T==="image/jpeg"&&(de.fillStyle="white",de.fillRect(0,0,ue.width,ue.height));const pe=$.scale();$.scale({x:1,y:1});const Oe=$.toCanvas({x:$.x()-ae,y:$.y()-ae,width:B.computedWidth+2*ie,height:B.computedHeight+2*ie,pixelRatio:J});return $.scale(pe),de.drawImage(Oe,0,0,ue.width,ue.height),b.default.Util.releaseCanvas(Oe),A&&$.find(".page-background").forEach(_e=>_e.show()),te.forEach(_e=>{_e.visible(_e.getAttr("oldVisible"))}),re.forEach(_e=>{_e.visible(_e.getAttr("oldVisible"))}),$.find(".page-background").forEach(_e=>_e.shadowEnabled(!0)),$.find(".page-background").forEach(_e=>_e.strokeEnabled(!0)),L.find("Transformer").forEach(_e=>_e.visible(!0)),$.find(".highlighter").forEach(_e=>_e.visible(!0)),ee.clip(V),X.clip(Y),x.setElementsPixelRatio(H),B==null||B.set({_exporting:!1,_forceMount:!1}),ue},async toDataURL(S={}){var{mimeType:A,quality:M}=S,T=a(S,["mimeType","quality"]);const z=await x._toCanvas(Object.assign({mimeType:A},T)),U=z.toDataURL(A,M);return b.default.Util.releaseCanvas(z),U},async toBlob(S={}){var{mimeType:A,quality:M}=S,T=a(S,["mimeType","quality"]);const z=await x._toCanvas(Object.assign({mimeType:A},T)),U=await new Promise(Q=>{z.toBlob(Q,A,M)});return b.default.Util.releaseCanvas(z),U},async saveAsImage(S={}){var{fileName:A}=S,M=a(S,["fileName"]);const T=M.mimeType||"image/png",z=T.split("/")[1];(0,_.downloadFile)(await x.toDataURL(M),A||"polotno."+z,T)},async _toPDF(S){const A=S.dpi||x.dpi,M=S.parallel||1,T=S.unit||(x.unit==="px"?"mm":x.unit),z=S.pixelRatio||1,U=S.pageIds||x.pages.map(te=>te.id),Q=x.pages.filter(te=>U.includes(te.id)),K=await(0,k.getJsPDF)(),J=te=>(0,p.pxToUnit)({px:te,unit:T,dpi:A}),B=S.cropMarkSize||0,L=J(B),F=Q[0]||{},H=S.includeBleed?F.bleed:0,$=J(F.computedWidth+2*H+2*L),ee=J(F.computedHeight+2*H+2*L);var V=new K({unit:T,orientation:$>ee?"landscape":"portrait",format:[$,ee],compress:!0,putOnlyUsedFonts:!0});V.deletePage(1);const X=((te,re)=>{for(var ie=[],ae=0;ae<te.length;ae+=re)ie.push(te.slice(ae,ae+re));return ie})(Q,M);let Y=0;for(const te of X){const re=te.map(async ie=>{const ae=S.includeBleed?ie.bleed:0,ue=ie.computedWidth+2*ae+2*B,de=ie.computedHeight+2*ae+2*B,pe=J(ue),Oe=J(de);let _e=0,Le=z;for(;_e<10;){_e+=1,_e===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const fe=await x.toDataURL(Object.assign(Object.assign({},S),{pageId:ie.id,pixelRatio:Le}));if(fe.length>20)return S.onProgress&&S.onProgress(++Y/U.length*.9),{url:fe,width:pe,height:Oe,widthPx:ue,heightPx:de};Le*=.8}});(await Promise.all(re)).forEach(({url:ie,width:ae,height:ue,widthPx:de,heightPx:pe})=>{V.addPage([ae,ue],ae>ue?"landscape":"portrait");const Oe=V.getCurrentPageInfo();var _e;switch(T){case"pt":_e=1;break;case"mm":_e=72/25.4;break;case"cm":_e=72/2.54;break;case"in":_e=72;break;case"px":_e=.75;break;case"pc":case"em":_e=12;break;case"ex":_e=6;break;default:throw"Invalid unit: "+T}Oe.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:ae*_e,topRightY:ue*_e},Oe.pageContext.bleedBox={bottomLeftX:J(B+H)*_e,bottomLeftY:J(B+H)*_e,topRightX:J(de-B-H)*_e,topRightY:J(pe-B-H)*_e},L&&(V.setLineWidth(J(1)),V.line(2*L,0,2*L,L),V.line(0,2*L,L,2*L),V.line(ae-2*L,0,ae-2*L,L),V.line(ae,2*L,ae-L,2*L),V.line(0,ue-2*L,L,ue-2*L),V.line(2*L,ue,2*L,ue-L),V.line(ae,ue-2*L,ae-L,ue-2*L),V.line(ae-2*L,ue,ae-2*L,ue-L)),V.addImage(ie,L,L,ae-2*L,ue-2*L,void 0,"FAST")})}return V},toPDFDataURL:async S=>(await x._toPDF(Object.assign({mimeType:"image/jpeg"},S))).output("datauristring"),async toGIFDataURL(S={}){const A=S.pixelRatio||1,M=await(0,E.createGIF)({width:x.width*A,height:x.height*A}),T=1e3/(S.fps||10),z=x.duration/T;for(let U=0;U<z-1;U++){const Q=U*T||1;x.setCurrentTime(Q);let K=0,J="";for(const L of x.pages)if(K+=L.duration,L.set({_rendering:K>Q}),K>Q){J=L.id;break}const B=await x._toCanvas({pixelRatio:A,pageId:J,_skipTimeout:!0});M.addFrame(B.getContext("2d"),{delay:T,copy:!0})}for(const U of x.pages)U.set({_rendering:!1});return x.stop(),M.render(),new Promise(U=>{M.on("finished",function(Q){(function(K,J){var B=new FileReader;B.onload=function(L){J(L.target.result)},B.readAsDataURL(K)})(Q,U)})})},async saveAsGIF(S={}){var{fileName:A}=S,M=a(S,["fileName"]);const T=await x.toGIFDataURL(M);(0,_.downloadFile)(T,A||"polotno.gif")},async toHTML({elementHook:S}={elementHook:void 0}){const A=x.toJSON();return(0,m.jsonToHTML)({json:A,elementHook:S})},async saveAsHTML({fileName:S}={}){const A=await x.toHTML(),M="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(A)));(0,_.downloadFile)(M,S||"polotno.html")},async toSVG({elementHook:S,pageId:A}={elementHook:void 0,pageId:void 0}){var M;const T=x.toJSON();A=A||((M=T.pages[0])===null||M===void 0?void 0:M.id);const z=T.pages.find(U=>U.id===A);return(0,y.jsonToSVG)({json:Object.assign(Object.assign({},T),{pages:z?[z]:[]}),elementHook:S})},async saveAsSVG({fileName:S,elementHook:A,pageId:M}={}){const T=await x.toSVG({elementHook:A,pageId:M}),z="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(T)));(0,_.downloadFile)(z,S||"polotno.svg")},async saveAsPDF(S={}){var{fileName:A}=S,M=a(S,["fileName"]);(await x._toPDF(Object.assign({mimeType:"image/jpeg"},M))).save(A||"polotno.pdf")},async waitLoading({_skipTimeout:S=!1}={}){S||await new Promise(A=>setTimeout(A,50)),await(0,g.whenLoaded)()},toJSON:()=>({width:x.width,height:x.height,fonts:(0,u.getSnapshot)(x.fonts),pages:(0,u.getSnapshot)(x.pages),audios:(0,u.getSnapshot)(x.audios),unit:x.unit,dpi:x.dpi,custom:x.custom}),loadJSON(S,A=!1){var M;const T=Object.assign({},S),z=x.pages.indexOf(x.activePage);let U=(M=T.pages[z]||T.pages[0])===null||M===void 0?void 0:M.id;T._activePageId=U;const Q=Object.assign({},(0,u.getSnapshot)(x));Object.assign(Q,T),Q.history=A?x.history.toJSON():{history:[],undoIdx:-1},(0,u.applySnapshot)(x,Q)},clear({keepHistory:S=!1}={}){const A=x.pages.map(M=>M.id);x.deletePages(A),x.custom=null,S||x.history.clear()},addFont(S){x.removeFont(S.fontFamily),x.fonts.push(S),x.loadFont(S.fontFamily)},removeFont(S){x.fonts.filter(A=>A.fontFamily===S).forEach(A=>(0,u.destroy)(A))},addAudio(S){const A=R.Audio.create(Object.assign({id:(0,h.nanoid)(10)},S));x.audios.push(A)},removeAudio(S){const A=x.audios.find(M=>M.id===S);A&&x.audios.remove(A)},async loadFont(S){const A=x.fonts.find(T=>T.fontFamily===S)||O.globalFonts.find(T=>T.fontFamily===S);let M=[{fontStyle:"normal",fontWeight:"normal"}];return A?(A.styles&&(M=A.styles.map(T=>({fontStyle:T.fontStyle||"normal",fontWeight:T.fontWeight||"normal"}))),O.injectCustomFont(A)):O.injectGoogleFont(S),Promise.all(M.map(T=>O.loadFont(S,T.fontStyle,T.fontWeight)))},validate:S=>e.Store.validate(S,[{path:"",type:e.Store}]).map(A=>({path:"store"+A.context.map(M=>M.path).join("."),message:A.message}))})),e.default=D}(Ti)),Ti}var Vb;function Y4(){return Vb||(Vb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const i=eo,t=Hp,n=xv(),a=W4(),l=Td();e.Node=i.types.model("Node",{id:i.types.identifier,type:"none",name:"",opacity:1,custom:i.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(u=>{for(var c in u)u[c]===null&&(u[c]=void 0);return u}).postProcessSnapshot(u=>{const c=Object.assign({},u),h={};for(var b in c)b[0]!=="_"&&(h[b]=u[b]);return h}).views(u=>({get locked(){return!(u.draggable||u.contentEditable||u.styleEditable||u.resizable)},get page(){return(0,i.getParentOfType)(u,a.Page)},get store(){return(0,i.getParentOfType)(u,n.Store)},get top(){let c=u;for(;;){if(!(0,i.hasParentOfType)(c,l.GroupElement))return c;c=(0,i.getParentOfType)(c,l.GroupElement)}},get parent(){return(0,i.hasParentOfType)(u,l.GroupElement)?(0,i.getParentOfType)(u,l.GroupElement):(0,i.hasParentOfType)(u,a.Page)?(0,i.getParentOfType)(u,a.Page):(0,i.hasParentOfType)(u,n.Store)?(0,i.getParentOfType)(u,n.Store):null},get zIndex(){return u.parent.children.indexOf(u)}})).actions(u=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(u))})).actions(u=>({clone(c={},{skipSelect:h=!1}={}){const b=JSON.parse(JSON.stringify(u.toJSON()));return c.id=c.id||(0,t.nanoid)(10),(0,l.forEveryChild)(b,_=>{_.id=(0,t.nanoid)(10)}),Object.assign(b,c),u.page.addElement(b,{skipSelect:h})},set(c){Object.assign(u,c)},moveUp(){u.page.moveElementsUp([u.id])},moveTop(){u.page.moveElementsTop([u.id])},moveDown(){u.page.moveElementsDown([u.id])},moveBottom(){u.page.moveElementsBottom([u.id])},setZIndex(c){u.parent.setElementZIndex(u.id,c)},beforeDestroy(){}}))}(Z1)),Z1}var lg={},sg={},$b;function ox(){return $b||($b=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const i=Gd(),t={right:{from:{x:-200},to:{x:0}},left:{from:{x:200},to:{x:0}},up:{from:{y:200},to:{y:0}},down:{from:{y:-200},to:{y:0}},"bottom-right":{from:{x:-200,y:-200},to:{x:0,y:0}},"bottom-left":{from:{x:200,y:-200},to:{x:0,y:0}},"top-right":{from:{x:-200,y:200},to:{x:0,y:0}},"top-left":{from:{x:200,y:200},to:{x:0,y:0}}};e.animations={fade:({dTime:l,element:u,animation:c})=>{const h=l/c.duration;return c.type==="enter"?{opacity:h*u.opacity}:{opacity:(1-h)*u.opacity}},rotate:({dTime:l,element:u,animation:c})=>{const h=l/c.duration*360;return(0,i.rotateAroundCenter)({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation},h)},blink:({dTime:l,element:u,animation:c})=>{const h=c.duration,b=l%h/(h/2),_=b<=1?b:2-b;return{opacity:u.opacity*_}},bounce:({dTime:l,element:u,animation:c})=>{const h=c.duration,b=h/2,_={},k={x:u.x+u.width/3,y:u.y+u.height/3,width:u.width/3,height:u.height/3,fontSize:u.fontSize/3},E={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize},v=l%h/b,O=v<=1?v:2-v;for(let g in k){const p=k[g],P=E[g]-p;_[g]=p+O*P}return _},move:({dTime:l,element:u,animation:c})=>{const h=t[c.data.direction]||t.right,b={};for(var _ in h.from){let k=h.from[_],E=h.to[_];c.type==="exit"&&(k=h.to[_],E=-h.from[_]);const v=u[_]+k,O=u[_]+E-v;b[_]=v+l/c.duration*O}return b},zoom:({dTime:l,element:u,animation:c})=>{const h={},b={x:u.x+u.width/3,y:u.y+u.height/3,width:u.width/3,height:u.height/3,fontSize:u.fontSize/3},_={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize};for(var k in b){let E=b[k],v=_[k];if(c.type==="exit"){const g=E;E=v,v=g}const O=v-E;h[k]=E+l/c.duration*O}return h}};const n=({element:l,dTime:u,animation:c})=>{const h=e.animations[c.name];return h?h({element:l,dTime:u,animation:c}):(console.error("Can not find animation type: "+c.name),{})};e.animate=n;const a=(l,u)=>{};e.registerAnimation=a}(sg)),sg}var Wb;function Sc(){return Wb||(Wb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.getDiff=e.Animation=void 0;const i=eo,t=ox(),n=da,a=Y4();e.Animation=i.types.model("Animation",{delay:0,duration:500,enabled:!0,type:i.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:i.types.frozen({})});const l=(u,c)=>{const h={};for(const b in c)if(typeof u[b]=="number"&&typeof c[b]=="number"){const _=c[b]-u[b];_!==0&&(h[b]=_)}return h};e.getDiff=l,e.Shape=a.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:i.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,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(u=>{const c=Object.assign(Object.assign({},u),{x:u.x||0,y:u.y||0});return"width"in u&&(c.width=c.width||1),"height"in u&&(c.height=c.height||1),u.locked&&(c.draggable=!1,c.contentEditable=!1,c.styleEditable=!1,c.resizable=!1,c.removable=!1),c}).views(u=>{const c=(0,n.observable)({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation,opacity:u.opacity,color:u.color,fontSize:u.fontSize}),h=(0,n.action)(_=>{Object.assign(c,_)}),b=(0,n.action)(_=>{for(const k in _)typeof c[k]=="number"&&(c[k]=c[k]+_[k])});return{get a(){const{currentTime:_}=u.store;if(h({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation,opacity:u.opacity,color:u.color,fontSize:u.fontSize}),_===0)return c;const k=_-u.page.startTime;if(k>u.page.duration||k<0)return c;const E=u.store.animatedElementsIds;if(E.length&&!E.includes(u.id))return c;const v=u.animations.find(d=>d.type==="enter"),O=(v==null?void 0:v.enabled)&&k<v.delay;O&&h({opacity:0});const g=(v==null?void 0:v.enabled)&&k>=v.delay&&k<=v.delay+v.duration;if(g){const d=k-v.delay,m=(0,t.animate)({element:u,animation:v,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}const p=u.animations.find(d=>d.type==="exit");if(!O&&!g&&(p!=null&&p.enabled)&&k>=u.page.duration-p.duration-p.delay&&k<=u.page.duration-p.delay){const d=k-(u.page.duration-p.duration-p.delay),m=(0,t.animate)({element:u,animation:p,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}p!=null&&p.enabled&&k>=u.page.duration-p.delay&&h({opacity:0});const P=u.animations.find(d=>d.type==="loop");if(P!=null&&P.enabled){const d=k,m=(0,t.animate)({element:u,animation:P,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}return c},animated:_=>u.a[_]}}).actions(u=>({setAnimation(c,h){const b=u.animations.find(_=>_.type===c);b?Object.assign(b,h):u.animations.push(Object.assign({type:c},h))}}))}(lg)),lg}var ug={},Yb;function ax(){return Yb||(Yb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const i=eo,t=Sc();e.TextElement=t.Shape.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:i.types.optional(i.types.union(i.types.number,i.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(n=>Object.assign({},n)).actions(n=>({toggleEditMode(a){n._editModeEnabled=a??!n._editModeEnabled,n._editModeEnabled?n.store.history.startTransaction():n.store.history.endTransaction()}}))}(ug)),ug}var cg={},Kb;function K4(){return Kb||(Kb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const i=Sc();e.ImageElement=i.Shape.named("Image").props({type:"image",width:100,height:100,src:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,cornerRadius:0,flipX:!1,flipY:!1,clipSrc:"",borderColor:"black",borderSize:0,keepRatio:!1,_cropModeEnabled:!1}).actions(t=>({toggleCropMode(n){t._cropModeEnabled=n??!t._cropModeEnabled,t._cropModeEnabled?t.store.history.startTransaction():t.store.history.endTransaction()},beforeDestroy(){t._cropModeEnabled&&t.store.history.endTransaction()}}))}(cg)),cg}var fg={},Xb;function lx(){return Xb||(Xb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const i=K4();e.VideoElement=i.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(fg)),fg}var dg={},Zb;function sx(){return Zb||(Zb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const i=eo,t=Sc();e.LineElement=t.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:i.types.array(i.types.number),startHead:"",endHead:""}).actions(n=>({}))}(dg)),dg}var hg={},Qb;function ux(){return Qb||(Qb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const i=eo,t=Sc();e.SVGElement=t.Shape.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:i.types.map(i.types.string)}).preProcessSnapshot(n=>Object.assign(Object.assign({},n),{src:n.src||n.svgSource})).actions(n=>({replaceColor(a,l){n.colorsReplace.set(a,l)}}))}(hg)),hg}var pg={},Jb;function cx(){return Jb||(Jb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const i=eo,t=Sc();e.FigureElement=t.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:i.types.array(i.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(pg)),pg}var e3;function Td(){return e3||(e3=1,function(e){var i=vd&&vd.__rest||function(p,P){var d={};for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&P.indexOf(m)<0&&(d[m]=p[m]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var y=0;for(m=Object.getOwnPropertySymbols(p);y<m.length;y++)P.indexOf(m[y])<0&&Object.prototype.propertyIsEnumerable.call(p,m[y])&&(d[m[y]]=p[m[y]])}return d};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=g;const t=eo,n=Hp,a=Y4(),l=Sc(),u=ax(),c=K4(),h=lx(),b=sx(),_=ux(),k=cx(),E=(p,P)=>{if(p.children)for(const d of p.children){if(P(d)===!0)break;(0,e.forEveryChild)(d,P)}};e.forEveryChild=E;const v=[...new Array(20)].map((p,P)=>t.types.late(()=>O[P]));e.ElementTypes=t.types.union({dispatcher:p=>{const P=e.TYPES_MAP[p.type];if(!P)throw new Error(`Unknown element type: "${p.type}"`);return P}},_.SVGElement,u.TextElement,c.ImageElement,b.LineElement,h.VideoElement,k.FigureElement,t.types.late(()=>e.GroupElement),...v),e.GroupElement=a.Node.named("Group").props({type:"group",children:t.types.array(e.ElementTypes)}).views(p=>({get draggable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.draggable||(P=!1)}),P},get resizable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.resizable||(P=!1)}),P},get contentEditable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.contentEditable||(P=!1)}),P},get styleEditable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.styleEditable||(P=!1)}),P},get locked(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.locked||(P=!1)}),P}})).actions(p=>({set(P){var{draggable:d,contentEditable:m,styleEditable:y,resizable:w}=P,N=i(P,["draggable","contentEditable","styleEditable","resizable"]);d!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({draggable:d})}),m!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({contentEditable:m})}),y!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({styleEditable:y})}),w!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({resizable:w})}),Object.assign(p,N)},addElement(P,{skipSelect:d=!1}={}){const m=e.TYPES_MAP[P.type];if(!m)return void console.error("Can not find model with type "+P.type);P.children&&P.children.forEach(w=>{w.id=(0,n.nanoid)(10)});const y=m.create(Object.assign({id:(0,n.nanoid)(10)},P));return p.children.push(y),y.selectable&&!d&&p.store.selectElements([y.id]),y},setElementZIndex(P,d){const m=p.children.find(y=>y.id===P);m&&((0,t.detach)(m),p.children.remove(m),p.children.splice(d,0,m))}}));const O=[];function g(p,P){const d=p.type;if(!d)throw new Error('You must pass "type" attribute to custom model.');let m=l.Shape.named(d).props(p);P&&(m=P(m)),e.TYPES_MAP[d]=m,O.push(m)}e.TYPES_MAP={svg:_.SVGElement,text:u.TextElement,image:c.ImageElement,group:e.GroupElement,line:b.LineElement,video:h.VideoElement,figure:k.FigureElement}}(vd)),vd}var t3;function fx(){return t3||(t3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=c;const i=Td();let t=[],n="";const a="polotno_clipboard",l=h=>{t=JSON.parse(JSON.stringify(h));try{localStorage.setItem(a,JSON.stringify(h))}catch{}},u=()=>{try{const h=localStorage.getItem(a);if(h)return JSON.parse(h)}catch{}return t};function c(h,b){var _,k,E,v,O,g,p,P;if(((_=document.activeElement)===null||_===void 0?void 0:_.tagName)==="INPUT"||((k=document.activeElement)===null||k===void 0?void 0:k.tagName)==="TEXTAREA"||((E=document.activeElement)===null||E===void 0?void 0:E.contentEditable)==="true")return;const d=b.selectedElements.filter(N=>N.removable),m=d.map(N=>N.id);h.keyCode!==46&&h.keyCode!==8||b.deleteElements(m);const y=h.ctrlKey||h.metaKey,w=h.shiftKey;if(y&&!w&&h.code==="KeyZ"&&(h.preventDefault(),b.history.undo()),y&&w&&h.code==="KeyZ"&&(h.preventDefault(),b.history.redo()),y&&h.code==="KeyA"){h.preventDefault();const N=(v=b.activePage)===null||v===void 0?void 0:v.children.filter(D=>D.selectable),R=(N==null?void 0:N.map(D=>D.id))||[];b.selectElements(R)}if(y&&h.code==="KeyC"&&(h.preventDefault(),n=(O=b.activePage)===null||O===void 0?void 0:O.id,l(b.selectedElements.map(N=>N.toJSON()))),y&&h.code==="KeyX"&&(h.preventDefault(),n=(g=b.activePage)===null||g===void 0?void 0:g.id,l(b.selectedElements.map(N=>N.toJSON())),b.deleteElements(d)),y&&h.code==="KeyV"){h.preventDefault();let N=0;n===((p=b.activePage)===null||p===void 0?void 0:p.id)&&(N=b.width/20),n=(P=b.activePage)===null||P===void 0?void 0:P.id,b.history.transaction(()=>{const R=[],D=u();(0,i.forEveryChild)({children:D},x=>{delete x.id,x.type!=="group"&&(x.x+=N,x.y+=N)}),D.forEach(x=>{var S;const A=(S=b.activePage)===null||S===void 0?void 0:S.addElement(x);A&&R.push(A.id)}),l(D),b.selectElements(R)})}h.code==="ArrowDown"&&(h.preventDefault(),b.selectedElements.forEach(N=>{N.draggable&&N.set({y:N.y+1})})),h.code==="ArrowUp"&&(h.preventDefault(),b.selectedElements.forEach(N=>{N.draggable&&N.set({y:N.y-1})})),h.code==="ArrowLeft"&&(h.preventDefault(),b.selectedElements.forEach(N=>{N.draggable&&N.set({x:N.x-1})})),h.code==="ArrowRight"&&(h.preventDefault(),b.selectedElements.forEach(N=>{N.draggable&&N.set({x:N.x+1})}))}}(X1)),X1}var gg={},n3;function dx(){return n3||(n3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const i=da,t=(0,i.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",copyStyle:"Copy style",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",alignLeft:"Align left",alignCenter:"Align center",alignRight:"Align right",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom",flip:"Flip",flipHorizontally:"Flip horizontally",flipVertically:"Flip vertically",fitToBackground:"Fit to page",removeBackground:"Remove background",removeBackgroundTitle:"Remove background from image",cancelRemoveBackground:"Cancel",confirmRemoveBackground:"Confirm",crop:"Crop",cropDone:"Done",cropCancel:"Cancel",clip:"Apply mask",removeClip:"Remove mask",removeMask:"Remove mask",transparency:"Transparency",lockedDescription:"Object is locked. Unlock it to allow changes from canvas.",unlockedDescription:"Object is unlocked. Lock it to prevent changes from canvas.",removeElements:"Remove elements",duplicateElements:"Duplicate elements",download:"Download",saveAsImage:"Save as image",saveAsPDF:"Save as PDF",lineHeight:"Line height",letterSpacing:"Letter spacing",offsetX:"Offset X",offsetY:"Offset Y",color:"Color",selectable:"Selectable",draggable:"Draggable",removable:"Removable",resizable:"Resizable",contentEditable:"Can change content",styleEditable:"Can change style",alwaysOnTop:"Always on top",showInExport:"Show in export",ungroupElements:"Ungroup",groupElements:"Group",lineSize:"Line size",fade:"Fade",move:"Move",zoom:"Zoom",animate:"Animate",rotate:"Rotate",none:"None",bounce:"Bounce",blink:"Blink",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear"},aiText:{aiWrite:"AI write",rewrite:"Rewrite",shorten:"Shorten",continue:"Continue writing",proofread:"Proofread",tones:"Tones",friendly:"Friendly",professional:"Professional",humorous:"Humorous",formal:"Formal",customPrompt:"Custom prompt",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"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"},pagesTimeline:{pages:"Pages",removePage:"Remove page",addPage:"Add page",duplicatePage:"Duplicate page",removeAudio:"Remove audio"}});function n(_,k){var E,v=k.split("."),O=_;for(E=0;E<v.length;++E){if(O[v[E]]==null)return;O=O[v[E]]}return O}const a=_=>_&&typeof _=="object";function l(_,k){Object.keys(k).forEach(E=>{const v=_[E],O=k[E];a(O)&&a(v)?l(v,O):_[E]=O})}function u(_,k,E=""){Object.keys(k).forEach(v=>{const O=k[v],g=E?`${E}.${v}`:v;a(O)?a(_[v])?u(_[v],O,g):console.warn(`Missing nested translation object at '${g}'`):_[v]===void 0&&console.warn(`Missing translation '${g}'`)})}e.setTranslations=(0,i.action)((_,{validate:k=!1}={})=>{k&&u(_,t),l(t,_)});const c=()=>(0,i.toJS)(t);e.getTranslations=c;const h={},b=_=>{const k=n(t,_);if(k!==void 0)return k;h[_]||(h[_]=!0,console.warn(`Missing translation '${_}'`));const E=_.split("."),v=E[E.length-1]||" ";return v.charAt(0).toUpperCase()+v.slice(1)};e.t=b}(gg)),gg}var r3;function hx(){return r3||(r3=1,function(e){var i=gf&&gf.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=i(Tn()),n=Qi,a=i(GO()),l=VO(),u=$O(),c=fx(),h=dx(),b=`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
301
|
-
Width or height of parent elements is equal 0.
|
|
302
|
-
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
303
|
-
For simpler debugging here is the log of the parent element:`,_=(g,p,P,d,m,y)=>{const w=t.default.useRef({width:p,height:P}),N=t.default.useRef({top:0,left:0}),R=t.default.useRef(!1),D=t.default.useRef(m.pages.length);R.current=D.current!==m.pages.length,D.current=m.pages.length,t.default.useEffect(()=>{const x=g.current,S=A=>{N.current={top:x.scrollTop,left:x.scrollLeft}};return x.addEventListener("scroll",S),()=>{x.removeEventListener("scroll",S)}},[]),t.default.useLayoutEffect(()=>{if(!g.current||R.current)return;const x=g.current,S=(N.current.left+x.offsetWidth/2)/w.current.width,A=(N.current.top+x.offsetHeight/2)/w.current.height;y.current=!0,x.scrollLeft=S*p-x.offsetWidth/2,x.scrollTop=A*P-x.offsetHeight/2,w.current={width:p,height:P}},[d,p,P])},k=({element:g,scrollTop:p=0,duration:P=300,onFinish:d=()=>{}})=>{const m=g.scrollTop,y=p-m;let w=0,N=!1;if(P===0)return g.scrollTop=p,()=>{};const R=()=>{if(N)return;w+=20;const x=D(w,m,y,P);g.scrollTop=x,w<P?setTimeout(R,20):d()},D=(x,S,A,M)=>(x/=M/2)<1?A/2*x*x+S:-A/2*(--x*(x-2)-1)+S;return R(),()=>{N=!0}},E=(g,p,P,d,m,y)=>{const w=t.default.useRef(!1),N=t.default.useRef(null),R=t.default.useRef(!1);t.default.useEffect(()=>{const x=g.current,S=()=>{m.current};return x.addEventListener("scroll",S),()=>{x.removeEventListener("scroll",S)}},[]);const D=P.pages.indexOf(P.activePage);return t.default.useLayoutEffect(()=>{if(!P.activePage||!g.current||w.current)return;const x=g.current,S=P.pages.indexOf(P.activePage)*p;let A=()=>{};return(Math.abs(S-x.scrollTop)>.5*p||R.current)&&(R.current=!0,A=k({element:x,scrollTop:S,onFinish:()=>{R.current=!1},duration:P.isPlaying?0:300})),A},[P.activePage,D,P.isPlaying]),{handleScroll:x=>{if(y||R.current)return;w.current=!0,clearTimeout(N.current),N.current=setTimeout(()=>{w.current=!1},300);const S=x.currentTarget.childNodes[0].offsetHeight,A=x.currentTarget.scrollTop,M=Math.floor((A+d.height/3)/S),T=P.pages[M];T&&P.activePage!==T&&T.select()}}},v=({store:g})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,h.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{g.addPage()}},(0,h.t)("workspace.addPage"))),O=({width:g,height:p,xPadding:P,yPadding:d,backgroundColor:m})=>t.default.createElement("div",{style:{width:g+"px",height:p+"px",backgroundColor:m,paddingLeft:P+"px",paddingRight:P+"px",paddingTop:d+"px",paddingBottom:d+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:g,pageControlsEnabled:p,backgroundColor:P,pageBorderColor:d,activePageBorderColor:m,bleedColor:y,components:w,onKeyDown:N,paddingX:R,paddingY:D,altCloneEnabled:x=!0,visiblePagesOffset:S,renderOnlyActivePage:A})=>{var M;const T=R??20,z=D??55,[U,Q]=t.default.useState({width:100,height:100}),K=t.default.useRef(U),J=t.default.useRef(null),B=t.default.useRef(null),L=g.bleedVisible?Math.max(0,...g.pages.map(fe=>fe.bleed)):0,F=Math.max(...g.pages.map(fe=>fe.computedWidth)),H=Math.max(...g.pages.map(fe=>fe.computedHeight)),$=((M=g.activePage)===null||M===void 0?void 0:M.computedHeight)||0,ee=F+2*L,V=(A?$:H)+2*L,X=async({skipTimeout:fe}={skipTimeout:!1})=>{if(fe||await new Promise(ct=>setTimeout(ct,50)),J.current===null)return;const ge=J.current.getBoundingClientRect();ge.width!==0&&ge.height!==0||(console.warn(b),console.log(J.current));const Ce=B.current.clientWidth||ge.width,Ae={width:Ce,height:ge.height};(K.current.width!==Ae.width||K.current.height!==Ae.height)&&(Q(Ae),K.current=Ae);const se=(Ce-2*T)/ee,me=g.pages.length>1?3.1:2,xe=(ge.height-z*me)/V,Ne=Math.max(Math.min(se,xe),.01);g.scaleToFit!==Ne&&(g.setScale(Ne),g._setScaleToFit(Ne))};t.default.useLayoutEffect(()=>{X({skipTimeout:!0})},[]),t.default.useEffect(()=>{X()},[ee,V]),t.default.useEffect(()=>{g.__()},[]),t.default.useEffect(()=>{const fe=J.current;if(window.ResizeObserver){const ge=new ResizeObserver(()=>{X({skipTimeout:!0})});return ge.observe(fe),()=>ge.unobserve(fe)}{const ge=setInterval(()=>{X({skipTimeout:!0})},100);return()=>clearInterval(ge)}},[ee,V]);const Y=Math.max(T,(U.width-ee*g.scale)/2),te=A?1:g.pages.length,re=V*g.scale*te,ie=Math.max(z,(U.height-re)/te/2);t.default.useEffect(()=>{const fe=ge=>{(N||c.handleHotkey)(ge,g)};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[]),t.default.useEffect(()=>{var fe;const ge=Ce=>{if(Ce.ctrlKey||Ce.metaKey){Ce.preventDefault();const xe=Math.max(3,g.scaleToFit),Ne=Math.min(.1,g.scaleToFit),ct=(Ae=Ce.deltaY<0?1.05*g.scale:g.scale/1.05,se=Ne,me=xe,Math.max(se,Math.min(me,Ae)));g.setScale(ct)}else var Ae,se,me};return(fe=B.current)===null||fe===void 0||fe.addEventListener("wheel",ge),()=>{var Ce;return(Ce=B.current)===null||Ce===void 0?void 0:Ce.removeEventListener("wheel",ge)}},[]);const ae=t.default.useRef(!1);_(B,ee*g.scale+2*Y,V*g.scale+2*ie,g.scale,g,ae);const{handleScroll:ue}=E(B,V*g.scale+2*ie,g,U,ae,A),de=U.width>=ee*g.scale+2*Y,pe=P||"rgba(232, 232, 232, 0.9)",Oe=g.pages.indexOf(g.activePage),_e=(w==null?void 0:w.NoPages)||v,Le=S??Math.min(3,Math.max(1,Math.ceil(U.height/2/(V*g.scale))));return t.default.createElement("div",{ref:J,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:pe},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:B,onScroll:ue,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:de?"hidden":"auto"},className:"polotno-workspace-inner"},g.pages.map((fe,ge)=>{const Ce=fe===g.activePage;if(A&&!Ce&&!fe._exportingOrRendering&&!fe._forceMount)return null;if(!(Math.abs(ge-Oe)<=Le||fe._exportingOrRendering||fe._forceMount))return t.default.createElement(O,{key:fe.id,width:ee*g.scale+2*Y,height:V*g.scale+2*ie,backgroundColor:pe,xPadding:Y,yPadding:ie});const Ae=t.default.createElement(a.default,{key:fe.id,page:fe,xPadding:Y,yPadding:ie,width:ee*g.scale+2*Y,height:V*g.scale+2*ie,store:g,pageControlsEnabled:p,backColor:pe,pageBorderColor:d||"lightgrey",activePageBorderColor:m||"rgb(0, 161, 255)",altCloneEnabled:x,bleedColor:y||"rgba(255, 0, 0, 0.1)",components:w});return(fe._exportingOrRendering||fe._forceMount)&&!Ce&&A?t.default.createElement("div",{style:{display:"none"},key:fe.id},Ae):Ae}),g.rulesVisible&&t.default.createElement(l.TopRules,{store:g,xPadding:Y,yPadding:ie,width:ee*g.scale+2*Y,height:V*g.scale+2*ie}),g.pages.length===0&&t.default.createElement(_e,{store:g}),g.audios.map(fe=>t.default.createElement(u.AudioElement,{key:fe.id,audio:fe,store:g}))))}),e.default=e.WorkspaceCanvas}(gf)),gf}var px=hx(),gx=xv(),vx=yc(),yd=ts(),vg=Ks(),mx=Bd();vx.toggleFadeInAnimation(!1);yd.setTextOverflow("change-font-size");const yx=new URLSearchParams(location.search).get("key"),X4=gx.createStore({key:yx});window.store=X4;window.config={addGlobalFont:mx.addGlobalFont,unstable_useHtmlTextRender:yd.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:yd.setTextVerticalResizeEnabled,unstable_setTextOverflow:yd.setTextOverflow,onLoadError:vg.onLoadError,setAssetLoadTimeout:vg.setAssetLoadTimeout,setFontLoadTimeout:vg.setFontLoadTimeout,unstable_setTextSplitAllowed:yd.setTextSplitAllowed};const bx=o3.createRoot(document.getElementById("root"));bx.render(zt.createElement(px.WorkspaceCanvas,{visiblePagesOffset:0,store:X4,components:{PageControls:()=>null,Tooltip:()=>null}}));
|