@wangeditor-next/yjs-for-react 0.1.1 → 0.1.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.
@@ -2,7 +2,7 @@ import { CursorState } from '@wangeditor-next/yjs';
2
2
  import { RefObject } from 'react';
3
3
  import { BaseRange, NodeMatch, Text } from 'slate';
4
4
  import { CaretPosition, SelectionRect } from '../utils/getOverlayPosition';
5
- export declare type UseRemoteCursorOverlayPositionsOptions<T extends HTMLElement> = {
5
+ export type UseRemoteCursorOverlayPositionsOptions<T extends HTMLElement> = {
6
6
  shouldGenerateOverlay?: NodeMatch<Text>;
7
7
  } & ({
8
8
  containerRef?: undefined;
@@ -10,7 +10,7 @@ export declare type UseRemoteCursorOverlayPositionsOptions<T extends HTMLElement
10
10
  containerRef: RefObject<T>;
11
11
  refreshOnResize?: boolean | 'debounced';
12
12
  });
13
- export declare type CursorOverlayData<TCursorData extends Record<string, unknown>> = CursorState<TCursorData> & {
13
+ export type CursorOverlayData<TCursorData extends Record<string, unknown>> = CursorState<TCursorData> & {
14
14
  range: BaseRange | null;
15
15
  caretPosition: CaretPosition | null;
16
16
  selectionRects: SelectionRect[];
@@ -1,4 +1,4 @@
1
1
  import { CursorState } from '@wangeditor-next/yjs';
2
2
  import { Store } from '../types';
3
- export declare type CursorStore<TCursorData extends Record<string, unknown> = Record<string, unknown>> = Store<Record<string, CursorState<TCursorData>>>;
3
+ export type CursorStore<TCursorData extends Record<string, unknown> = Record<string, unknown>> = Store<Record<string, CursorState<TCursorData>>>;
4
4
  export declare function useRemoteCursorStateStore<TCursorData extends Record<string, unknown> = Record<string, unknown>>(): CursorStore<TCursorData>;
@@ -1,3 +1,3 @@
1
1
  import { RefObject } from 'react';
2
- export declare function useRequestRerender(): (immediately?: any) => void;
2
+ export declare function useRequestRerender(): (immediately?: boolean) => void;
3
3
  export declare function useOnResize<T extends HTMLElement>(ref: RefObject<T> | undefined, onResize: () => void): void;
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import t,{createContext as e,useContext as r,useReducer as n,useRef as o,useEffect as i,useCallback as u,useState as a,useLayoutEffect as c,useMemo as f}from"react";import{Node as s,Text as l,Path as v,Editor as p,Range as h}from"slate";import*as d from"yjs";import{DomEditor as y}from"@wangeditor-next/editor";var g=e(null),b=function(){var t=r(g);return t||console.warn("The `useEditorStatic` hook must be used inside the <EditorContext> component's context."),t},m=function(){return m=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},m.apply(this,arguments)};function w(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t){var e={exports:{}};return t(e,e.exports),e.exports
1
+ import t,{createContext as e,useContext as n,useReducer as r,useRef as o,useEffect as i,useCallback as u,useState as c,useLayoutEffect as a,useMemo as f}from"react";import{CursorEditor as s,relativeRangeToSlateRange as l}from"@wangeditor-next/yjs";import{Range as v,Editor as p,Text as h,Path as y}from"slate";import{DomEditor as d}from"@wangeditor-next/editor";var g=e(null),b=function(){var t=n(g);return t||console.warn("The `useEditorStatic` hook must be used inside the <EditorContext> component's context."),t},m=function(){return m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},m.apply(this,arguments)};function w(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}"function"==typeof SuppressedError&&SuppressedError;var O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t){var e={exports:{}};return t(e,e.exports),e.exports
2
2
  /**
3
3
  * @license React
4
4
  * use-sync-external-store-shim.production.min.js
@@ -7,7 +7,7 @@ import t,{createContext as e,useContext as r,useReducer as n,useRef as o,useEffe
7
7
  *
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
- */}var x="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},E=t.useState,j=t.useEffect,T=t.useLayoutEffect,P=t.useDebugValue;function A(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!x(t,r)}catch(t){return!0}}var R="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var r=e(),n=E({inst:{value:r,getSnapshot:e}}),o=n[0].inst,i=n[1];return T((function(){o.value=r,o.getSnapshot=e,A(o)&&i({inst:o})}),[t,r,e]),j((function(){return A(o)&&i({inst:o}),t((function(){A(o)&&i({inst:o})}))}),[t]),P(r),r},k={useSyncExternalStore:void 0!==t.useSyncExternalStore?t.useSyncExternalStore:R};
10
+ */}var j="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},E=t.useState,x=t.useEffect,A=t.useLayoutEffect,P=t.useDebugValue;function R(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!j(t,n)}catch(t){return!0}}var T="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=E({inst:{value:n,getSnapshot:e}}),o=r[0].inst,i=r[1];return A((function(){o.value=n,o.getSnapshot=e,R(o)&&i({inst:o})}),[t,n,e]),x((function(){return R(o)&&i({inst:o}),t((function(){R(o)&&i({inst:o})}))}),[t]),P(n),n},k={useSyncExternalStore:void 0!==t.useSyncExternalStore?t.useSyncExternalStore:T};
11
11
  /**
12
12
  * @license React
13
13
  * use-sync-external-store-shim.development.js
@@ -17,7 +17,7 @@ import t,{createContext as e,useContext as r,useReducer as n,useRef as o,useEffe
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
19
  */
20
- S((function(t,e){}));var L=S((function(t){t.exports=k}));
20
+ S((function(t,e){}));var z=S((function(t){t.exports=k}));
21
21
  /**
22
22
  * @license React
23
23
  * use-sync-external-store-shim/with-selector.production.min.js
@@ -26,7 +26,7 @@ S((function(t,e){}));var L=S((function(t){t.exports=k}));
26
26
  *
27
27
  * This source code is licensed under the MIT license found in the
28
28
  * LICENSE file in the root directory of this source tree.
29
- */var I="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},C=L.useSyncExternalStore,z=t.useRef,F=t.useEffect,M=t.useMemo,_=t.useDebugValue,D={useSyncExternalStoreWithSelector:function(t,e,r,n,o){var i=z(null);if(null===i.current){var u={hasValue:!1,value:null};i.current=u}else u=i.current;i=M((function(){function t(t){if(!c){if(c=!0,i=t,t=n(t),void 0!==o&&u.hasValue){var e=u.value;if(o(e,t))return a=e}return a=t}if(e=a,I(i,t))return e;var r=n(t);return void 0!==o&&o(e,r)?e:(i=t,a=r)}var i,a,c=!1,f=void 0===r?null:r;return[function(){return t(e())},null===f?void 0:function(){return t(f())}]}),[e,r,n,o]);var a=C(t,i[0],i[1]);return F((function(){u.hasValue=!0,u.value=a}),[a]),_(a),a}};
29
+ */var I="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},L=z.useSyncExternalStore,C=t.useRef,M=t.useEffect,F=t.useMemo,_=t.useDebugValue,D={useSyncExternalStoreWithSelector:function(t,e,n,r,o){var i=C(null);if(null===i.current){var u={hasValue:!1,value:null};i.current=u}else u=i.current;i=F((function(){function t(t){if(!a){if(a=!0,i=t,t=r(t),void 0!==o&&u.hasValue){var e=u.value;if(o(e,t))return c=e}return c=t}if(e=c,I(i,t))return e;var n=r(t);return void 0!==o&&o(e,n)?e:(i=t,c=n)}var i,c,a=!1,f=void 0===n?null:n;return[function(){return t(e())},null===f?void 0:function(){return t(f())}]}),[e,n,r,o]);var c=L(t,i[0],i[1]);return M((function(){u.hasValue=!0,u.value=c}),[c]),_(c),c}};
30
30
  /**
31
31
  * @license React
32
32
  * use-sync-external-store-shim/with-selector.development.js
@@ -36,5 +36,5 @@ S((function(t,e){}));var L=S((function(t){t.exports=k}));
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
38
  */
39
- S((function(t,e){}));var N,W,G=S((function(t){t.exports=D})),B=function(t){return t&&t.Math==Math&&t},V=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof O&&O)||function(){return this}()||Function("return this")(),X=Function.prototype,U=X.bind,Y=X.call,q=U&&U.bind(Y),H=U?function(t){return t&&q(Y,t)}:function(t){return t&&function(){return Y.apply(t,arguments)}},K=function(t){try{return!!t()}catch(t){return!0}},$=H({}.toString),J=H("".slice),Q=function(t){return J($(t),8,-1)},Z=V.Object,tt=H("".split),et=K((function(){return!Z("z").propertyIsEnumerable(0)}))?function(t){return"String"==Q(t)?tt(t,""):Z(t)}:Z,rt=V.TypeError,nt=function(t){if(null==t)throw rt("Can't call method on "+t);return t},ot=function(t){return et(nt(t))},it=Object.defineProperty,ut=function(t,e){try{it(V,t,{value:e,configurable:!0,writable:!0})}catch(r){V[t]=e}return e},at="__core-js_shared__",ct=V[at]||ut(at,{}),ft=S((function(t){(t.exports=function(t,e){return ct[t]||(ct[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),st=V.Object,lt=function(t){return st(nt(t))},vt=H({}.hasOwnProperty),pt=Object.hasOwn||function(t,e){return vt(lt(t),e)},ht=0,dt=Math.random(),yt=H(1..toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+yt(++ht+dt,36)},bt=function(t){return"function"==typeof t},mt=function(t,e){return arguments.length<2?(r=V[t],bt(r)?r:void 0):V[t]&&V[t][e];var r},wt=mt("navigator","userAgent")||"",Ot=V.process,St=V.Deno,xt=Ot&&Ot.versions||St&&St.version,Et=xt&&xt.v8;Et&&(W=(N=Et.split("."))[0]>0&&N[0]<4?1:+(N[0]+N[1])),!W&&wt&&(!(N=wt.match(/Edge\/(\d+)/))||N[1]>=74)&&(N=wt.match(/Chrome\/(\d+)/))&&(W=+N[1]);var jt,Tt=W,Pt=!!Object.getOwnPropertySymbols&&!K((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Tt&&Tt<41})),At=Pt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Rt=ft("wks"),kt=V.Symbol,Lt=kt&&kt.for,It=At?kt:kt&&kt.withoutSetter||gt,Ct=function(t){if(!pt(Rt,t)||!Pt&&"string"!=typeof Rt[t]){var e="Symbol."+t;Pt&&pt(kt,t)?Rt[t]=kt[t]:Rt[t]=At&&Lt?Lt(e):It(e)}return Rt[t]},zt=function(t){return"object"==typeof t?null!==t:bt(t)},Ft=V.String,Mt=V.TypeError,_t=function(t){if(zt(t))return t;throw Mt(Ft(t)+" is not an object")},Dt=!K((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Nt=V.document,Wt=zt(Nt)&&zt(Nt.createElement),Gt=function(t){return Wt?Nt.createElement(t):{}},Bt=!Dt&&!K((function(){return 7!=Object.defineProperty(Gt("div"),"a",{get:function(){return 7}}).a})),Vt=Function.prototype.call,Xt=Vt.bind?Vt.bind(Vt):function(){return Vt.apply(Vt,arguments)},Ut=H({}.isPrototypeOf),Yt=V.Object,qt=At?function(t){return"symbol"==typeof t}:function(t){var e=mt("Symbol");return bt(e)&&Ut(e.prototype,Yt(t))},Ht=V.String,Kt=function(t){try{return Ht(t)}catch(t){return"Object"}},$t=V.TypeError,Jt=function(t){if(bt(t))return t;throw $t(Kt(t)+" is not a function")},Qt=function(t,e){var r=t[e];return null==r?void 0:Jt(r)},Zt=V.TypeError,te=V.TypeError,ee=Ct("toPrimitive"),re=function(t,e){if(!zt(t)||qt(t))return t;var r,n=Qt(t,ee);if(n){if(void 0===e&&(e="default"),r=Xt(n,t,e),!zt(r)||qt(r))return r;throw te("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&bt(r=t.toString)&&!zt(n=Xt(r,t)))return n;if(bt(r=t.valueOf)&&!zt(n=Xt(r,t)))return n;if("string"!==e&&bt(r=t.toString)&&!zt(n=Xt(r,t)))return n;throw Zt("Can't convert object to primitive value")}(t,e)},ne=function(t){var e=re(t,"string");return qt(e)?e:e+""},oe=V.TypeError,ie=Object.defineProperty,ue=Dt?ie:function(t,e,r){if(_t(t),e=ne(e),_t(r),Bt)try{return ie(t,e,r)}catch(t){}if("get"in r||"set"in r)throw oe("Accessors not supported");return"value"in r&&(t[e]=r.value),t},ae={f:ue},ce=Math.ceil,fe=Math.floor,se=function(t){var e=+t;return e!=e||0===e?0:(e>0?fe:ce)(e)},le=Math.max,ve=Math.min,pe=function(t,e){var r=se(t);return r<0?le(r+e,0):ve(r,e)},he=Math.min,de=function(t){return(e=t.length)>0?he(se(e),9007199254740991):0;var e},ye=function(t){return function(e,r,n){var o,i=ot(e),u=de(i),a=pe(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},ge={includes:ye(!0),indexOf:ye(!1)},be={},me=ge.indexOf,we=H([].push),Oe=function(t,e){var r,n=ot(t),o=0,i=[];for(r in n)!pt(be,r)&&pt(n,r)&&we(i,r);for(;e.length>o;)pt(n,r=e[o++])&&(~me(i,r)||we(i,r));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xe=Object.keys||function(t){return Oe(t,Se)},Ee=Dt?Object.defineProperties:function(t,e){_t(t);for(var r,n=ot(e),o=xe(e),i=o.length,u=0;i>u;)ae.f(t,r=o[u++],n[r]);return t},je=mt("document","documentElement"),Te=ft("keys"),Pe=function(t){return Te[t]||(Te[t]=gt(t))},Ae="prototype",Re="script",ke=Pe("IE_PROTO"),Le=function(){},Ie=function(t){return"<"+Re+">"+t+"</"+Re+">"},Ce=function(t){t.write(Ie("")),t.close();var e=t.parentWindow.Object;return t=null,e},ze=function(){try{jt=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;ze="undefined"!=typeof document?document.domain&&jt?Ce(jt):(e=Gt("iframe"),r="java"+Re+":",e.style.display="none",je.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(Ie("document.F=Object")),t.close(),t.F):Ce(jt);for(var n=Se.length;n--;)delete ze[Ae][Se[n]];return ze()};be[ke]=!0;var Fe=Object.create||function(t,e){var r;return null!==t?(Le[Ae]=_t(t),r=new Le,Le[Ae]=null,r[ke]=t):r=ze(),void 0===e?r:Ee(r,e)},Me=Ct("unscopables"),_e=Array.prototype;null==_e[Me]&&ae.f(_e,Me,{configurable:!0,value:Fe(null)});var De=function(t){_e[Me][t]=!0},Ne={},We=H(Function.toString);bt(ct.inspectSource)||(ct.inspectSource=function(t){return We(t)});var Ge,Be,Ve,Xe=ct.inspectSource,Ue=V.WeakMap,Ye=bt(Ue)&&/native code/.test(Xe(Ue)),qe=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},He=Dt?function(t,e,r){return ae.f(t,e,qe(1,r))}:function(t,e,r){return t[e]=r,t},Ke="Object already initialized",$e=V.TypeError,Je=V.WeakMap;if(Ye||ct.state){var Qe=ct.state||(ct.state=new Je),Ze=H(Qe.get),tr=H(Qe.has),er=H(Qe.set);Ge=function(t,e){if(tr(Qe,t))throw new $e(Ke);return e.facade=t,er(Qe,t,e),e},Be=function(t){return Ze(Qe,t)||{}},Ve=function(t){return tr(Qe,t)}}else{var rr=Pe("state");be[rr]=!0,Ge=function(t,e){if(pt(t,rr))throw new $e(Ke);return e.facade=t,He(t,rr,e),e},Be=function(t){return pt(t,rr)?t[rr]:{}},Ve=function(t){return pt(t,rr)}}var nr,or,ir,ur={set:Ge,get:Be,has:Ve,enforce:function(t){return Ve(t)?Be(t):Ge(t,{})},getterFor:function(t){return function(e){var r;if(!zt(e)||(r=Be(e)).type!==t)throw $e("Incompatible receiver, "+t+" required");return r}}},ar={}.propertyIsEnumerable,cr=Object.getOwnPropertyDescriptor,fr=cr&&!ar.call({1:2},1)?function(t){var e=cr(this,t);return!!e&&e.enumerable}:ar,sr={f:fr},lr=Object.getOwnPropertyDescriptor,vr=Dt?lr:function(t,e){if(t=ot(t),e=ne(e),Bt)try{return lr(t,e)}catch(t){}if(pt(t,e))return qe(!Xt(sr.f,t,e),t[e])},pr={f:vr},hr=Function.prototype,dr=Dt&&Object.getOwnPropertyDescriptor,yr=pt(hr,"name"),gr={EXISTS:yr,PROPER:yr&&"something"===function(){}.name,CONFIGURABLE:yr&&(!Dt||Dt&&dr(hr,"name").configurable)},br=S((function(t){var e=gr.CONFIGURABLE,r=ur.get,n=ur.enforce,o=String(String).split("String");(t.exports=function(t,r,i,u){var a,c=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,s=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:r;bt(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!pt(i,"name")||e&&i.name!==l)&&He(i,"name",l),(a=n(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==V?(c?!s&&t[r]&&(f=!0):delete t[r],f?t[r]=i:He(t,r,i)):f?t[r]=i:ut(r,i)})(Function.prototype,"toString",(function(){return bt(this)&&r(this).source||Xe(this)}))})),mr=Se.concat("length","prototype"),wr=Object.getOwnPropertyNames||function(t){return Oe(t,mr)},Or={f:wr},Sr={f:Object.getOwnPropertySymbols},xr=H([].concat),Er=mt("Reflect","ownKeys")||function(t){var e=Or.f(_t(t)),r=Sr.f;return r?xr(e,r(t)):e},jr=function(t,e){for(var r=Er(e),n=ae.f,o=pr.f,i=0;i<r.length;i++){var u=r[i];pt(t,u)||n(t,u,o(e,u))}},Tr=/#|\.prototype\./,Pr=function(t,e){var r=Rr[Ar(t)];return r==Lr||r!=kr&&(bt(e)?K(e):!!e)},Ar=Pr.normalize=function(t){return String(t).replace(Tr,".").toLowerCase()},Rr=Pr.data={},kr=Pr.NATIVE="N",Lr=Pr.POLYFILL="P",Ir=Pr,Cr=pr.f,zr=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?V:f?V[a]||ut(a,{}):(V[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(u=Cr(r,n))&&u.value:r[n],!Ir(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;jr(i,o)}(t.sham||o&&o.sham)&&He(i,"sham",!0),br(r,n,i,t)}},Fr=!K((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Mr=Pe("IE_PROTO"),_r=V.Object,Dr=_r.prototype,Nr=Fr?_r.getPrototypeOf:function(t){var e=lt(t);if(pt(e,Mr))return e[Mr];var r=e.constructor;return bt(r)&&e instanceof r?r.prototype:e instanceof _r?Dr:null},Wr=Ct("iterator"),Gr=!1;[].keys&&("next"in(ir=[].keys())?(or=Nr(Nr(ir)))!==Object.prototype&&(nr=or):Gr=!0);var Br=null==nr||K((function(){var t={};return nr[Wr].call(t)!==t}));Br&&(nr={}),bt(nr[Wr])||br(nr,Wr,(function(){return this}));var Vr={IteratorPrototype:nr,BUGGY_SAFARI_ITERATORS:Gr},Xr=ae.f,Ur=Ct("toStringTag"),Yr=function(t,e,r){t&&!pt(t=r?t:t.prototype,Ur)&&Xr(t,Ur,{configurable:!0,value:e})},qr=Vr.IteratorPrototype,Hr=function(){return this},Kr=V.String,$r=V.TypeError,Jr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=H(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return _t(r),function(t){if("object"==typeof t||bt(t))return t;throw $r("Can't set "+Kr(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),Qr=gr.PROPER,Zr=gr.CONFIGURABLE,tn=Vr.IteratorPrototype,en=Vr.BUGGY_SAFARI_ITERATORS,rn=Ct("iterator"),nn="keys",on="values",un="entries",an=function(){return this},cn=function(t,e,r,n,o,i,u){!function(t,e,r,n){var o=e+" Iterator";t.prototype=Fe(qr,{next:qe(+!n,r)}),Yr(t,o,!1),Ne[o]=Hr}(r,e,n);var a,c,f,s=function(t){if(t===o&&d)return d;if(!en&&t in p)return p[t];switch(t){case nn:case on:case un:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",v=!1,p=t.prototype,h=p[rn]||p["@@iterator"]||o&&p[o],d=!en&&h||s(o),y="Array"==e&&p.entries||h;if(y&&(a=Nr(y.call(new t)))!==Object.prototype&&a.next&&(Nr(a)!==tn&&(Jr?Jr(a,tn):bt(a[rn])||br(a,rn,an)),Yr(a,l,!0)),Qr&&o==on&&h&&h.name!==on&&(Zr?He(p,"name",on):(v=!0,d=function(){return Xt(h,this)})),o)if(c={values:s(on),keys:i?d:s(nn),entries:s(un)},u)for(f in c)(en||v||!(f in p))&&br(p,f,c[f]);else zr({target:e,proto:!0,forced:en||v},c);return p[rn]!==d&&br(p,rn,d,{name:o}),Ne[e]=d,c},fn="Array Iterator",sn=ur.set,ln=ur.getterFor(fn),vn=cn(Array,"Array",(function(t,e){sn(this,{type:fn,target:ot(t),index:0,kind:e})}),(function(){var t=ln(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Ne.Arguments=Ne.Array,De("keys"),De("values"),De("entries");var pn={};pn[Ct("toStringTag")]="z";var hn="[object z]"===String(pn),dn=Ct("toStringTag"),yn=V.Object,gn="Arguments"==Q(function(){return arguments}()),bn=hn?Q:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=yn(t),dn))?r:gn?Q(e):"Object"==(n=Q(e))&&bt(e.callee)?"Arguments":n},mn=hn?{}.toString:function(){return"[object "+bn(this)+"]"};hn||br(Object.prototype,"toString",mn,{unsafe:!0});var wn=V.String,On=function(t){if("Symbol"===bn(t))throw TypeError("Cannot convert a Symbol value to a string");return wn(t)},Sn=gr.PROPER,xn="toString",En=RegExp.prototype,jn=En[xn],Tn=H((function(){var t=_t(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e})),Pn=K((function(){return"/a/b"!=jn.call({source:"a",flags:"b"})})),An=Sn&&jn.name!=xn;(Pn||An)&&br(RegExp.prototype,xn,(function(){var t=_t(this),e=On(t.source),r=t.flags;return"/"+e+"/"+On(void 0===r&&Ut(En,t)&&!("flags"in En)?Tn(t):r)}),{unsafe:!0});var Rn=function(t,e,r){var n=ne(e);n in t?ae.f(t,n,qe(0,r)):t[n]=r},kn=V.Array,Ln=Math.max,In=Or.f,Cn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zn=function(t){try{return In(t)}catch(t){return function(t,e,r){for(var n=de(t),o=pe(e,n),i=pe(void 0===r?n:r,n),u=kn(Ln(i-o,0)),a=0;o<i;o++,a++)Rn(u,a,t[o]);return u.length=a,u}(Cn)}},Fn={f:function(t){return Cn&&"Window"==Q(t)?zn(t):In(ot(t))}},Mn=K((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),_n=Object.isExtensible,Dn=K((function(){_n(1)}))||Mn?function(t){return!!zt(t)&&((!Mn||"ArrayBuffer"!=Q(t))&&(!_n||_n(t)))}:_n,Nn=!K((function(){return Object.isExtensible(Object.preventExtensions({}))})),Wn=S((function(t){var e=ae.f,r=!1,n=gt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=Or.f,e=H([].splice),o={};o[n]=1,t(o).length&&(Or.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},zr({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Fn.f}))},fastKey:function(t,e){if(!zt(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!pt(t,n)){if(!Dn(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!pt(t,n)){if(!Dn(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Nn&&r&&Dn(t)&&!pt(t,n)&&i(t),t}};be[n]=!0})),Gn=H(H.bind),Bn=function(t,e){return Jt(t),void 0===e?t:Gn?Gn(t,e):function(){return t.apply(e,arguments)}},Vn=Ct("iterator"),Xn=Array.prototype,Un=Ct("iterator"),Yn=function(t){if(null!=t)return Qt(t,Un)||Qt(t,"@@iterator")||Ne[bn(t)]},qn=V.TypeError,Hn=function(t,e,r){var n,o;_t(t);try{if(!(n=Qt(t,"return"))){if("throw"===e)throw r;return r}n=Xt(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return _t(n),r},Kn=V.TypeError,$n=function(t,e){this.stopped=t,this.result=e},Jn=$n.prototype,Qn=function(t,e,r){var n,o,i,u,a,c,f,s=r&&r.that,l=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=Bn(e,s),d=function(t){return n&&Hn(n,"normal",t),new $n(!0,t)},y=function(t){return l?(_t(t),p?h(t[0],t[1],d):h(t[0],t[1])):p?h(t,d):h(t)};if(v)n=t;else{if(!(o=Yn(t)))throw Kn(Kt(t)+" is not iterable");if(function(t){return void 0!==t&&(Ne.Array===t||Xn[Vn]===t)}(o)){for(i=0,u=de(t);u>i;i++)if((a=y(t[i]))&&Ut(Jn,a))return a;return new $n(!1)}n=function(t,e){var r=arguments.length<2?Yn(t):e;if(Jt(r))return _t(Xt(r,t));throw qn(Kt(t)+" is not iterable")}(t,o)}for(c=n.next;!(f=Xt(c,n)).done;){try{a=y(f.value)}catch(t){Hn(n,"throw",t)}if("object"==typeof a&&a&&Ut(Jn,a))return a}return new $n(!1)},Zn=V.TypeError,to=function(t,e){if(Ut(e,t))return t;throw Zn("Incorrect invocation")},eo=Ct("iterator"),ro=!1;try{var no=0,oo={next:function(){return{done:!!no++}},return:function(){ro=!0}};oo[eo]=function(){return this},Array.from(oo,(function(){throw 2}))}catch(t){}var io=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=V[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=H(a[t]);br(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!zt(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!zt(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!zt(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ir(t,!bt(u)||!(o||a.forEach&&!K((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),Wn.enable();else if(Ir(t,!0)){var l=new c,v=l[i](o?{}:-0,1)!=l,p=K((function(){l.has(1)})),h=function(t,e){if(!e&&!ro)return!1;var r=!1;try{var n={};n[eo]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r}((function(t){new u(t)})),d=!o&&K((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((c=e((function(t,e){to(t,a);var r=function(t,e,r){var n,o;return Jr&&bt(n=e.constructor)&&n!==r&&zt(o=n.prototype)&&o!==r.prototype&&Jr(t,o),t}(new u,t,c);return null!=e&&Qn(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(p||d)&&(s("delete"),s("has"),n&&s("get")),(d||v)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,zr({global:!0,forced:c!=u},f),Yr(c,t),o||r.setStrong(c,t,n),c},uo=function(t,e,r){for(var n in e)br(t,n,e[n],r);return t},ao=Ct("species"),co=ae.f,fo=Wn.fastKey,so=ur.set,lo=ur.getterFor,vo={getConstructor:function(t,e,r,n){var o=t((function(t,o){to(t,i),so(t,{type:e,index:Fe(null),first:void 0,last:void 0,size:0}),Dt||(t.size=0),null!=o&&Qn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=lo(e),a=function(t,e,r){var n,o,i=u(t),a=c(t,e);return a?a.value=r:(i.last=a={index:o=fo(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),Dt?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},c=function(t,e){var r,n=u(t),o=fo(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return uo(i,{clear:function(){for(var t=u(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,Dt?t.size=0:this.size=0},delete:function(t){var e=this,r=u(e),n=c(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),Dt?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=u(this),n=Bn(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),uo(i,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),Dt&&co(i,"size",{get:function(){return u(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=lo(e),i=lo(n);cn(t,e,(function(t,e){so(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),function(t){var e=mt(t),r=ae.f;Dt&&e&&!e[ao]&&r(e,ao,{configurable:!0,get:function(){return this}})}(e)}};io("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),vo);var po=H("".charAt),ho=H("".charCodeAt),yo=H("".slice),go=function(t){return function(e,r){var n,o,i=On(nt(e)),u=se(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=ho(i,u))<55296||n>56319||u+1===a||(o=ho(i,u+1))<56320||o>57343?t?po(i,u):n:t?yo(i,u,u+2):o-56320+(n-55296<<10)+65536}},bo={codeAt:go(!1),charAt:go(!0)}.charAt,mo="String Iterator",wo=ur.set,Oo=ur.getterFor(mo);cn(String,"String",(function(t){wo(this,{type:mo,string:On(t),index:0})}),(function(){var t,e=Oo(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=bo(r,n),e.index+=t.length,{value:t,done:!1})}));var So=Array.isArray||function(t){return"Array"==Q(t)},xo=function(){},Eo=[],jo=mt("Reflect","construct"),To=/^\s*(?:class|function)\b/,Po=H(To.exec),Ao=!To.exec(xo),Ro=function(t){if(!bt(t))return!1;try{return jo(xo,Eo,t),!0}catch(t){return!1}},ko=!jo||K((function(){var t;return Ro(Ro.call)||!Ro(Object)||!Ro((function(){t=!0}))||t}))?function(t){if(!bt(t))return!1;switch(bn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ao||!!Po(To,Xe(t))}:Ro,Lo=Ct("species"),Io=V.Array,Co=function(t,e){return new(function(t){var e;return So(t)&&(e=t.constructor,(ko(e)&&(e===Io||So(e.prototype))||zt(e)&&null===(e=e[Lo]))&&(e=void 0)),void 0===e?Io:e}(t))(0===e?0:e)},zo=H([].push),Fo=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var v,p,h=lt(c),d=et(h),y=Bn(f,s),g=de(d),b=0,m=l||Co,w=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in d)&&(p=y(v=d[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:zo(w,v)}else switch(t){case 4:return!1;case 7:zo(w,v)}return i?-1:n||o?o:w}},Mo={forEach:Fo(0),map:Fo(1),filter:Fo(2),some:Fo(3),every:Fo(4),find:Fo(5),findIndex:Fo(6),filterReject:Fo(7)},_o=Wn.getWeakData,Do=ur.set,No=ur.getterFor,Wo=Mo.find,Go=Mo.findIndex,Bo=H([].splice),Vo=0,Xo=function(t){return t.frozen||(t.frozen=new Uo)},Uo=function(){this.entries=[]},Yo=function(t,e){return Wo(t.entries,(function(t){return t[0]===e}))};Uo.prototype={get:function(t){var e=Yo(this,t);if(e)return e[1]},has:function(t){return!!Yo(this,t)},set:function(t,e){var r=Yo(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Go(this.entries,(function(e){return e[0]===t}));return~e&&Bo(this.entries,e,1),!!~e}};var qo,Ho={getConstructor:function(t,e,r,n){var o=t((function(t,o){to(t,i),Do(t,{type:e,id:Vo++,frozen:void 0}),null!=o&&Qn(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=No(e),a=function(t,e,r){var n=u(t),o=_o(_t(e),!0);return!0===o?Xo(n).set(e,r):o[n.id]=r,t};return uo(i,{delete:function(t){var e=u(this);if(!zt(t))return!1;var r=_o(t);return!0===r?Xo(e).delete(t):r&&pt(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!zt(t))return!1;var r=_o(t);return!0===r?Xo(e).has(t):r&&pt(r,e.id)}}),uo(i,r?{get:function(t){var e=u(this);if(zt(t)){var r=_o(t);return!0===r?Xo(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ko=ur.enforce,$o=!V.ActiveXObject&&"ActiveXObject"in V,Jo=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Qo=io("WeakMap",Jo,Ho);if(Ye&&$o){qo=Ho.getConstructor(Jo,"WeakMap",!0),Wn.enable();var Zo=Qo.prototype,ti=H(Zo.delete),ei=H(Zo.has),ri=H(Zo.get),ni=H(Zo.set);uo(Zo,{delete:function(t){if(zt(t)&&!Dn(t)){var e=Ko(this);return e.frozen||(e.frozen=new qo),ti(this,t)||e.frozen.delete(t)}return ti(this,t)},has:function(t){if(zt(t)&&!Dn(t)){var e=Ko(this);return e.frozen||(e.frozen=new qo),ei(this,t)||e.frozen.has(t)}return ei(this,t)},get:function(t){if(zt(t)&&!Dn(t)){var e=Ko(this);return e.frozen||(e.frozen=new qo),ei(this,t)?ri(this,t):e.frozen.get(t)}return ri(this,t)},set:function(t,e){if(zt(t)&&!Dn(t)){var r=Ko(this);r.frozen||(r.frozen=new qo),ei(this,t)?ni(this,t,e):r.frozen.set(t,e)}else ni(this,t,e);return this}})}var oi,ii,ui={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ai=Gt("span").classList,ci=ai&&ai.constructor&&ai.constructor.prototype,fi=ci===Object.prototype?void 0:ci,si=Mo.forEach,li=!!(ii=[]["forEach"])&&K((function(){ii.call(null,oi||function(){throw 1},1)}))?[].forEach:function(t){return si(this,t,arguments.length>1?arguments[1]:void 0)},vi=function(t){if(t&&t.forEach!==li)try{He(t,"forEach",li)}catch(e){t.forEach=li}};for(var pi in ui)ui[pi]&&vi(V[pi]&&V[pi].prototype);vi(fi);var hi=Ct("iterator"),di=Ct("toStringTag"),yi=vn.values,gi=function(t,e){if(t){if(t[hi]!==yi)try{He(t,hi,yi)}catch(e){t[hi]=yi}if(t[di]||He(t,di,e),ui[e])for(var r in vn)if(t[r]!==vn[r])try{He(t,r,vn[r])}catch(e){t[r]=vn[r]}}};for(var bi in ui)gi(V[bi]&&V[bi].prototype,bi);gi(fi,"DOMTokenList");var mi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function wi(t){var e={exports:{}};return t(e,e.exports),e.exports}var Oi,Si,xi=function(t){return t&&t.Math==Math&&t},Ei=xi("object"==typeof globalThis&&globalThis)||xi("object"==typeof window&&window)||xi("object"==typeof self&&self)||xi("object"==typeof mi&&mi)||function(){return this}()||Function("return this")(),ji=function(t){try{return!!t()}catch(t){return!0}},Ti=!ji((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Pi=Function.prototype.call,Ai=Pi.bind?Pi.bind(Pi):function(){return Pi.apply(Pi,arguments)},Ri={}.propertyIsEnumerable,ki=Object.getOwnPropertyDescriptor,Li=ki&&!Ri.call({1:2},1)?function(t){var e=ki(this,t);return!!e&&e.enumerable}:Ri,Ii={f:Li},Ci=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},zi=Function.prototype,Fi=zi.bind,Mi=zi.call,_i=Fi&&Fi.bind(Mi),Di=Fi?function(t){return t&&_i(Mi,t)}:function(t){return t&&function(){return Mi.apply(t,arguments)}},Ni=Di({}.toString),Wi=Di("".slice),Gi=function(t){return Wi(Ni(t),8,-1)},Bi=Ei.Object,Vi=Di("".split),Xi=ji((function(){return!Bi("z").propertyIsEnumerable(0)}))?function(t){return"String"==Gi(t)?Vi(t,""):Bi(t)}:Bi,Ui=Ei.TypeError,Yi=function(t){if(null==t)throw Ui("Can't call method on "+t);return t},qi=function(t){return Xi(Yi(t))},Hi=function(t){return"function"==typeof t},Ki=function(t){return"object"==typeof t?null!==t:Hi(t)},$i=function(t,e){return arguments.length<2?(r=Ei[t],Hi(r)?r:void 0):Ei[t]&&Ei[t][e];var r},Ji=Di({}.isPrototypeOf),Qi=$i("navigator","userAgent")||"",Zi=Ei.process,tu=Ei.Deno,eu=Zi&&Zi.versions||tu&&tu.version,ru=eu&&eu.v8;ru&&(Si=(Oi=ru.split("."))[0]>0&&Oi[0]<4?1:+(Oi[0]+Oi[1])),!Si&&Qi&&(!(Oi=Qi.match(/Edge\/(\d+)/))||Oi[1]>=74)&&(Oi=Qi.match(/Chrome\/(\d+)/))&&(Si=+Oi[1]);var nu=Si,ou=!!Object.getOwnPropertySymbols&&!ji((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&nu&&nu<41})),iu=ou&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,uu=Ei.Object,au=iu?function(t){return"symbol"==typeof t}:function(t){var e=$i("Symbol");return Hi(e)&&Ji(e.prototype,uu(t))},cu=Ei.String,fu=function(t){try{return cu(t)}catch(t){return"Object"}},su=Ei.TypeError,lu=function(t){if(Hi(t))return t;throw su(fu(t)+" is not a function")},vu=function(t,e){var r=t[e];return null==r?void 0:lu(r)},pu=Ei.TypeError,hu=Object.defineProperty,du=function(t,e){try{hu(Ei,t,{value:e,configurable:!0,writable:!0})}catch(r){Ei[t]=e}return e},yu="__core-js_shared__",gu=Ei[yu]||du(yu,{}),bu=wi((function(t){(t.exports=function(t,e){return gu[t]||(gu[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),mu=Ei.Object,wu=function(t){return mu(Yi(t))},Ou=Di({}.hasOwnProperty),Su=Object.hasOwn||function(t,e){return Ou(wu(t),e)},xu=0,Eu=Math.random(),ju=Di(1..toString),Tu=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ju(++xu+Eu,36)},Pu=bu("wks"),Au=Ei.Symbol,Ru=Au&&Au.for,ku=iu?Au:Au&&Au.withoutSetter||Tu,Lu=function(t){if(!Su(Pu,t)||!ou&&"string"!=typeof Pu[t]){var e="Symbol."+t;ou&&Su(Au,t)?Pu[t]=Au[t]:Pu[t]=iu&&Ru?Ru(e):ku(e)}return Pu[t]},Iu=Ei.TypeError,Cu=Lu("toPrimitive"),zu=function(t){var e=function(t,e){if(!Ki(t)||au(t))return t;var r,n=vu(t,Cu);if(n){if(void 0===e&&(e="default"),r=Ai(n,t,e),!Ki(r)||au(r))return r;throw Iu("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&Hi(r=t.toString)&&!Ki(n=Ai(r,t)))return n;if(Hi(r=t.valueOf)&&!Ki(n=Ai(r,t)))return n;if("string"!==e&&Hi(r=t.toString)&&!Ki(n=Ai(r,t)))return n;throw pu("Can't convert object to primitive value")}(t,e)}(t,"string");return au(e)?e:e+""},Fu=Ei.document,Mu=Ki(Fu)&&Ki(Fu.createElement),_u=function(t){return Mu?Fu.createElement(t):{}},Du=!Ti&&!ji((function(){return 7!=Object.defineProperty(_u("div"),"a",{get:function(){return 7}}).a})),Nu=Object.getOwnPropertyDescriptor,Wu={f:Ti?Nu:function(t,e){if(t=qi(t),e=zu(e),Du)try{return Nu(t,e)}catch(t){}if(Su(t,e))return Ci(!Ai(Ii.f,t,e),t[e])}},Gu=Ei.String,Bu=Ei.TypeError,Vu=function(t){if(Ki(t))return t;throw Bu(Gu(t)+" is not an object")},Xu=Ei.TypeError,Uu=Object.defineProperty,Yu={f:Ti?Uu:function(t,e,r){if(Vu(t),e=zu(e),Vu(r),Du)try{return Uu(t,e,r)}catch(t){}if("get"in r||"set"in r)throw Xu("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},qu=Ti?function(t,e,r){return Yu.f(t,e,Ci(1,r))}:function(t,e,r){return t[e]=r,t},Hu=Di(Function.toString);Hi(gu.inspectSource)||(gu.inspectSource=function(t){return Hu(t)});var Ku,$u,Ju,Qu=gu.inspectSource,Zu=Ei.WeakMap,ta=Hi(Zu)&&/native code/.test(Qu(Zu)),ea=bu("keys"),ra=function(t){return ea[t]||(ea[t]=Tu(t))},na={},oa="Object already initialized",ia=Ei.TypeError,ua=Ei.WeakMap;if(ta||gu.state){var aa=gu.state||(gu.state=new ua),ca=Di(aa.get),fa=Di(aa.has),sa=Di(aa.set);Ku=function(t,e){if(fa(aa,t))throw new ia(oa);return e.facade=t,sa(aa,t,e),e},$u=function(t){return ca(aa,t)||{}},Ju=function(t){return fa(aa,t)}}else{var la=ra("state");na[la]=!0,Ku=function(t,e){if(Su(t,la))throw new ia(oa);return e.facade=t,qu(t,la,e),e},$u=function(t){return Su(t,la)?t[la]:{}},Ju=function(t){return Su(t,la)}}var va={set:Ku,get:$u,has:Ju,enforce:function(t){return Ju(t)?$u(t):Ku(t,{})},getterFor:function(t){return function(e){var r;if(!Ki(e)||(r=$u(e)).type!==t)throw ia("Incompatible receiver, "+t+" required");return r}}},pa=Function.prototype,ha=Ti&&Object.getOwnPropertyDescriptor,da=Su(pa,"name"),ya={EXISTS:da,PROPER:da&&"something"===function(){}.name,CONFIGURABLE:da&&(!Ti||Ti&&ha(pa,"name").configurable)},ga=wi((function(t){var e=ya.CONFIGURABLE,r=va.get,n=va.enforce,o=String(String).split("String");(t.exports=function(t,r,i,u){var a,c=!!u&&!!u.unsafe,f=!!u&&!!u.enumerable,s=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:r;Hi(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Su(i,"name")||e&&i.name!==l)&&qu(i,"name",l),(a=n(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==Ei?(c?!s&&t[r]&&(f=!0):delete t[r],f?t[r]=i:qu(t,r,i)):f?t[r]=i:du(r,i)})(Function.prototype,"toString",(function(){return Hi(this)&&r(this).source||Qu(this)}))})),ba=Math.ceil,ma=Math.floor,wa=function(t){var e=+t;return e!=e||0===e?0:(e>0?ma:ba)(e)},Oa=Math.max,Sa=Math.min,xa=function(t,e){var r=wa(t);return r<0?Oa(r+e,0):Sa(r,e)},Ea=Math.min,ja=function(t){return t>0?Ea(wa(t),9007199254740991):0},Ta=function(t){return ja(t.length)},Pa=function(t){return function(e,r,n){var o,i=qi(e),u=Ta(i),a=xa(n,u);if(t&&r!=r){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},Aa={includes:Pa(!0),indexOf:Pa(!1)},Ra=Aa.indexOf,ka=Di([].push),La=function(t,e){var r,n=qi(t),o=0,i=[];for(r in n)!Su(na,r)&&Su(n,r)&&ka(i,r);for(;e.length>o;)Su(n,r=e[o++])&&(~Ra(i,r)||ka(i,r));return i},Ia=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ca=Ia.concat("length","prototype"),za={f:Object.getOwnPropertyNames||function(t){return La(t,Ca)}},Fa={f:Object.getOwnPropertySymbols},Ma=Di([].concat),_a=$i("Reflect","ownKeys")||function(t){var e=za.f(Vu(t)),r=Fa.f;return r?Ma(e,r(t)):e},Da=function(t,e){for(var r=_a(e),n=Yu.f,o=Wu.f,i=0;i<r.length;i++){var u=r[i];Su(t,u)||n(t,u,o(e,u))}},Na=/#|\.prototype\./,Wa=function(t,e){var r=Ba[Ga(t)];return r==Xa||r!=Va&&(Hi(e)?ji(e):!!e)},Ga=Wa.normalize=function(t){return String(t).replace(Na,".").toLowerCase()},Ba=Wa.data={},Va=Wa.NATIVE="N",Xa=Wa.POLYFILL="P",Ua=Wa,Ya=Wu.f,qa=function(t,e){var r,n,o,i,u,a=t.target,c=t.global,f=t.stat;if(r=c?Ei:f?Ei[a]||du(a,{}):(Ei[a]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(u=Ya(r,n))&&u.value:r[n],!Ua(c?n:a+(f?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Da(i,o)}(t.sham||o&&o.sham)&&qu(i,"sham",!0),ga(r,n,i,t)}},Ha=Function.prototype,Ka=Ha.apply,$a=Ha.bind,Ja=Ha.call,Qa="object"==typeof Reflect&&Reflect.apply||($a?Ja.bind(Ka):function(){return Ja.apply(Ka,arguments)}),Za=Array.isArray||function(t){return"Array"==Gi(t)},tc={};tc[Lu("toStringTag")]="z";var ec,rc="[object z]"===String(tc),nc=Lu("toStringTag"),oc=Ei.Object,ic="Arguments"==Gi(function(){return arguments}()),uc=rc?Gi:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=oc(t),nc))?r:ic?Gi(e):"Object"==(n=Gi(e))&&Hi(e.callee)?"Arguments":n},ac=Ei.String,cc=function(t){if("Symbol"===uc(t))throw TypeError("Cannot convert a Symbol value to a string");return ac(t)},fc=Object.keys||function(t){return La(t,Ia)},sc=Ti?Object.defineProperties:function(t,e){Vu(t);for(var r,n=qi(e),o=fc(e),i=o.length,u=0;i>u;)Yu.f(t,r=o[u++],n[r]);return t},lc=$i("document","documentElement"),vc="prototype",pc="script",hc=ra("IE_PROTO"),dc=function(){},yc=function(t){return"<"+pc+">"+t+"</"+pc+">"},gc=function(t){t.write(yc("")),t.close();var e=t.parentWindow.Object;return t=null,e},bc=function(){try{ec=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;bc="undefined"!=typeof document?document.domain&&ec?gc(ec):(e=_u("iframe"),r="java"+pc+":",e.style.display="none",lc.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(yc("document.F=Object")),t.close(),t.F):gc(ec);for(var n=Ia.length;n--;)delete bc[vc][Ia[n]];return bc()};na[hc]=!0;var mc=Object.create||function(t,e){var r;return null!==t?(dc[vc]=Vu(t),r=new dc,dc[vc]=null,r[hc]=t):r=bc(),void 0===e?r:sc(r,e)},wc=function(t,e,r){var n=zu(e);n in t?Yu.f(t,n,Ci(0,r)):t[n]=r},Oc=Ei.Array,Sc=Math.max,xc=za.f,Ec="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],jc={f:function(t){return Ec&&"Window"==Gi(t)?function(t){try{return xc(t)}catch(t){return function(t){for(var e=Ta(t),r=xa(void 0,e),n=xa(e,e),o=Oc(Sc(n-r,0)),i=0;r<n;r++,i++)wc(o,i,t[r]);return o.length=i,o}(Ec)}}(t):xc(qi(t))}},Tc=Di([].slice),Pc={f:Lu},Ac=Ei,Rc=Yu.f,kc=Yu.f,Lc=Lu("toStringTag"),Ic=function(t,e,r){t&&!Su(t=r?t:t.prototype,Lc)&&kc(t,Lc,{configurable:!0,value:e})},Cc=Di(Di.bind),zc=function(t,e){return lu(t),void 0===e?t:Cc?Cc(t,e):function(){return t.apply(e,arguments)}},Fc=function(){},Mc=[],_c=$i("Reflect","construct"),Dc=/^\s*(?:class|function)\b/,Nc=Di(Dc.exec),Wc=!Dc.exec(Fc),Gc=function(t){if(!Hi(t))return!1;try{return _c(Fc,Mc,t),!0}catch(t){return!1}},Bc=!_c||ji((function(){var t;return Gc(Gc.call)||!Gc(Object)||!Gc((function(){t=!0}))||t}))?function(t){if(!Hi(t))return!1;switch(uc(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Wc||!!Nc(Dc,Qu(t))}:Gc,Vc=Lu("species"),Xc=Ei.Array,Uc=function(t,e){return new(function(t){var e;return Za(t)&&(e=t.constructor,(Bc(e)&&(e===Xc||Za(e.prototype))||Ki(e)&&null===(e=e[Vc]))&&(e=void 0)),void 0===e?Xc:e}(t))(0===e?0:e)},Yc=Di([].push),qc=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,f,s,l){for(var v,p,h=wu(c),d=Xi(h),y=zc(f,s),g=Ta(d),b=0,m=l||Uc,w=e?m(c,g):r||u?m(c,0):void 0;g>b;b++)if((a||b in d)&&(p=y(v=d[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:Yc(w,v)}else switch(t){case 4:return!1;case 7:Yc(w,v)}return i?-1:n||o?o:w}},Hc={forEach:qc(0),map:qc(1),filter:qc(2),some:qc(3),every:qc(4),find:qc(5),findIndex:qc(6),filterReject:qc(7)},Kc=Hc.forEach,$c=ra("hidden"),Jc="Symbol",Qc="prototype",Zc=Lu("toPrimitive"),tf=va.set,ef=va.getterFor(Jc),rf=Object[Qc],nf=Ei.Symbol,of=nf&&nf[Qc],uf=Ei.TypeError,af=Ei.QObject,cf=$i("JSON","stringify"),ff=Wu.f,sf=Yu.f,lf=jc.f,vf=Ii.f,pf=Di([].push),hf=bu("symbols"),df=bu("op-symbols"),yf=bu("string-to-symbol-registry"),gf=bu("symbol-to-string-registry"),bf=bu("wks"),mf=!af||!af[Qc]||!af[Qc].findChild,wf=Ti&&ji((function(){return 7!=mc(sf({},"a",{get:function(){return sf(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=ff(rf,e);n&&delete rf[e],sf(t,e,r),n&&t!==rf&&sf(rf,e,n)}:sf,Of=function(t,e){var r=hf[t]=mc(of);return tf(r,{type:Jc,tag:t,description:e}),Ti||(r.description=e),r},Sf=function(t,e,r){t===rf&&Sf(df,e,r),Vu(t);var n=zu(e);return Vu(r),Su(hf,n)?(r.enumerable?(Su(t,$c)&&t[$c][n]&&(t[$c][n]=!1),r=mc(r,{enumerable:Ci(0,!1)})):(Su(t,$c)||sf(t,$c,Ci(1,{})),t[$c][n]=!0),wf(t,n,r)):sf(t,n,r)},xf=function(t,e){Vu(t);var r=qi(e),n=fc(r).concat(Pf(r));return Kc(n,(function(e){Ti&&!Ai(Ef,r,e)||Sf(t,e,r[e])})),t},Ef=function(t){var e=zu(t),r=Ai(vf,this,e);return!(this===rf&&Su(hf,e)&&!Su(df,e))&&(!(r||!Su(this,e)||!Su(hf,e)||Su(this,$c)&&this[$c][e])||r)},jf=function(t,e){var r=qi(t),n=zu(e);if(r!==rf||!Su(hf,n)||Su(df,n)){var o=ff(r,n);return!o||!Su(hf,n)||Su(r,$c)&&r[$c][n]||(o.enumerable=!0),o}},Tf=function(t){var e=lf(qi(t)),r=[];return Kc(e,(function(t){Su(hf,t)||Su(na,t)||pf(r,t)})),r},Pf=function(t){var e=t===rf,r=lf(e?df:qi(t)),n=[];return Kc(r,(function(t){!Su(hf,t)||e&&!Su(rf,t)||pf(n,hf[t])})),n};if(ou||(of=(nf=function(){if(Ji(of,this))throw uf("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?cc(arguments[0]):void 0,e=Tu(t),r=function(t){this===rf&&Ai(r,df,t),Su(this,$c)&&Su(this[$c],e)&&(this[$c][e]=!1),wf(this,e,Ci(1,t))};return Ti&&mf&&wf(rf,e,{configurable:!0,set:r}),Of(e,t)})[Qc],ga(of,"toString",(function(){return ef(this).tag})),ga(nf,"withoutSetter",(function(t){return Of(Tu(t),t)})),Ii.f=Ef,Yu.f=Sf,Wu.f=jf,za.f=jc.f=Tf,Fa.f=Pf,Pc.f=function(t){return Of(Lu(t),t)},Ti&&(sf(of,"description",{configurable:!0,get:function(){return ef(this).description}}),ga(rf,"propertyIsEnumerable",Ef,{unsafe:!0}))),qa({global:!0,wrap:!0,forced:!ou,sham:!ou},{Symbol:nf}),Kc(fc(bf),(function(t){!function(t){var e=Ac.Symbol||(Ac.Symbol={});Su(e,t)||Rc(e,t,{value:Pc.f(t)})}(t)})),qa({target:Jc,stat:!0,forced:!ou},{for:function(t){var e=cc(t);if(Su(yf,e))return yf[e];var r=nf(e);return yf[e]=r,gf[r]=e,r},keyFor:function(t){if(!au(t))throw uf(t+" is not a symbol");if(Su(gf,t))return gf[t]},useSetter:function(){mf=!0},useSimple:function(){mf=!1}}),qa({target:"Object",stat:!0,forced:!ou,sham:!Ti},{create:function(t,e){return void 0===e?mc(t):xf(mc(t),e)},defineProperty:Sf,defineProperties:xf,getOwnPropertyDescriptor:jf}),qa({target:"Object",stat:!0,forced:!ou},{getOwnPropertyNames:Tf,getOwnPropertySymbols:Pf}),qa({target:"Object",stat:!0,forced:ji((function(){Fa.f(1)}))},{getOwnPropertySymbols:function(t){return Fa.f(wu(t))}}),cf){var Af=!ou||ji((function(){var t=nf();return"[null]"!=cf([t])||"{}"!=cf({a:t})||"{}"!=cf(Object(t))}));qa({target:"JSON",stat:!0,forced:Af},{stringify:function(t,e,r){var n=Tc(arguments),o=e;if((Ki(e)||void 0!==t)&&!au(t))return Za(e)||(e=function(t,e){if(Hi(o)&&(e=Ai(o,this,t,e)),!au(e))return e}),n[1]=e,Qa(cf,null,n)}})}if(!of[Zc]){var Rf=of.valueOf;ga(of,Zc,(function(t){return Ai(Rf,this)}))}Ic(nf,Jc),na[$c]=!0;var kf=Yu.f,Lf=Ei.Symbol,If=Lf&&Lf.prototype;if(Ti&&Hi(Lf)&&(!("description"in If)||void 0!==Lf().description)){var Cf={},zf=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:cc(arguments[0]),e=Ji(If,this)?new Lf(t):void 0===t?Lf():Lf(t);return""===t&&(Cf[e]=!0),e};Da(zf,Lf),zf.prototype=If,If.constructor=zf;var Ff="Symbol(test)"==String(Lf("test")),Mf=Di(If.toString),_f=Di(If.valueOf),Df=/^Symbol\((.*)\)[^)]+$/,Nf=Di("".replace),Wf=Di("".slice);kf(If,"description",{configurable:!0,get:function(){var t=_f(this),e=Mf(t);if(Su(Cf,t))return"";var r=Ff?Wf(e,7,-1):Nf(e,Df,"$1");return""===r?void 0:r}}),qa({global:!0,forced:!0},{Symbol:zf})}var Gf=Lu("unscopables"),Bf=Array.prototype;null==Bf[Gf]&&Yu.f(Bf,Gf,{configurable:!0,value:mc(null)});var Vf,Xf,Uf,Yf=function(t){Bf[Gf][t]=!0},qf={},Hf=!ji((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Kf=ra("IE_PROTO"),$f=Ei.Object,Jf=$f.prototype,Qf=Hf?$f.getPrototypeOf:function(t){var e=wu(t);if(Su(e,Kf))return e[Kf];var r=e.constructor;return Hi(r)&&e instanceof r?r.prototype:e instanceof $f?Jf:null},Zf=Lu("iterator"),ts=!1;[].keys&&("next"in(Uf=[].keys())?(Xf=Qf(Qf(Uf)))!==Object.prototype&&(Vf=Xf):ts=!0);var es=null==Vf||ji((function(){var t={};return Vf[Zf].call(t)!==t}));es&&(Vf={}),Hi(Vf[Zf])||ga(Vf,Zf,(function(){return this}));var rs={IteratorPrototype:Vf,BUGGY_SAFARI_ITERATORS:ts},ns=rs.IteratorPrototype,os=function(){return this},is=Ei.String,us=Ei.TypeError,as=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Di(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Vu(r),function(t){if("object"==typeof t||Hi(t))return t;throw us("Can't set "+is(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),cs=ya.PROPER,fs=ya.CONFIGURABLE,ss=rs.IteratorPrototype,ls=rs.BUGGY_SAFARI_ITERATORS,vs=Lu("iterator"),ps="keys",hs="values",ds="entries",ys=function(){return this},gs=function(t,e,r,n,o,i,u){!function(t,e,r){var n=e+" Iterator";t.prototype=mc(ns,{next:Ci(1,r)}),Ic(t,n,!1),qf[n]=os}(r,e,n);var a,c,f,s=function(t){if(t===o&&d)return d;if(!ls&&t in p)return p[t];switch(t){case ps:case hs:case ds:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",v=!1,p=t.prototype,h=p[vs]||p["@@iterator"]||o&&p[o],d=!ls&&h||s(o),y="Array"==e&&p.entries||h;if(y&&(a=Qf(y.call(new t)))!==Object.prototype&&a.next&&(Qf(a)!==ss&&(as?as(a,ss):Hi(a[vs])||ga(a,vs,ys)),Ic(a,l,!0)),cs&&o==hs&&h&&h.name!==hs&&(fs?qu(p,"name",hs):(v=!0,d=function(){return Ai(h,this)})),o)if(c={values:s(hs),keys:i?d:s(ps),entries:s(ds)},u)for(f in c)(ls||v||!(f in p))&&ga(p,f,c[f]);else qa({target:e,proto:!0,forced:ls||v},c);return p[vs]!==d&&ga(p,vs,d,{name:o}),qf[e]=d,c},bs="Array Iterator",ms=va.set,ws=va.getterFor(bs),Os=gs(Array,"Array",(function(t,e){ms(this,{type:bs,target:qi(t),index:0,kind:e})}),(function(){var t=ws(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");qf.Arguments=qf.Array,Yf("keys"),Yf("values"),Yf("entries");var Ss=rc?{}.toString:function(){return"[object "+uc(this)+"]"};rc||ga(Object.prototype,"toString",Ss,{unsafe:!0});var xs=Di("".charAt),Es=Di("".charCodeAt),js=Di("".slice),Ts=function(t){return function(e,r){var n,o,i=cc(Yi(e)),u=wa(r),a=i.length;return u<0||u>=a?t?"":void 0:(n=Es(i,u))<55296||n>56319||u+1===a||(o=Es(i,u+1))<56320||o>57343?t?xs(i,u):n:t?js(i,u,u+2):o-56320+(n-55296<<10)+65536}},Ps=(Ts(!1),Ts(!0)),As="String Iterator",Rs=va.set,ks=va.getterFor(As);gs(String,"String",(function(t){Rs(this,{type:As,string:cc(t),index:0})}),(function(){var t,e=ks(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Ps(r,n),e.index+=t.length,{value:t,done:!1})}));var Ls=function(t,e,r){for(var n in e)ga(t,n,e[n],r);return t},Is=ji((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Cs=Object.isExtensible,zs=ji((function(){Cs(1)}))||Is?function(t){return!!Ki(t)&&(!Is||"ArrayBuffer"!=Gi(t))&&(!Cs||Cs(t))}:Cs,Fs=!ji((function(){return Object.isExtensible(Object.preventExtensions({}))})),Ms=wi((function(t){var e=Yu.f,r=!1,n=Tu("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},r=!0;var t=za.f,e=Di([].splice),o={};o[n]=1,t(o).length&&(za.f=function(r){for(var o=t(r),i=0,u=o.length;i<u;i++)if(o[i]===n){e(o,i,1);break}return o},qa({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:jc.f}))},fastKey:function(t,e){if(!Ki(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Su(t,n)){if(!zs(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!Su(t,n)){if(!zs(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return Fs&&r&&zs(t)&&!Su(t,n)&&i(t),t}};na[n]=!0})),_s=Lu("iterator"),Ds=Array.prototype,Ns=function(t){return void 0!==t&&(qf.Array===t||Ds[_s]===t)},Ws=Lu("iterator"),Gs=function(t){if(null!=t)return vu(t,Ws)||vu(t,"@@iterator")||qf[uc(t)]},Bs=Ei.TypeError,Vs=function(t,e){var r=arguments.length<2?Gs(t):e;if(lu(r))return Vu(Ai(r,t));throw Bs(fu(t)+" is not iterable")},Xs=function(t,e,r){var n,o;Vu(t);try{if(!(n=vu(t,"return"))){if("throw"===e)throw r;return r}n=Ai(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Vu(n),r},Us=Ei.TypeError,Ys=function(t,e){this.stopped=t,this.result=e},qs=Ys.prototype,Hs=function(t,e,r){var n,o,i,u,a,c,f,s=r&&r.that,l=!(!r||!r.AS_ENTRIES),v=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=zc(e,s),d=function(t){return n&&Xs(n,"normal",t),new Ys(!0,t)},y=function(t){return l?(Vu(t),p?h(t[0],t[1],d):h(t[0],t[1])):p?h(t,d):h(t)};if(v)n=t;else{if(!(o=Gs(t)))throw Us(fu(t)+" is not iterable");if(Ns(o)){for(i=0,u=Ta(t);u>i;i++)if((a=y(t[i]))&&Ji(qs,a))return a;return new Ys(!1)}n=Vs(t,o)}for(c=n.next;!(f=Ai(c,n)).done;){try{a=y(f.value)}catch(t){Xs(n,"throw",t)}if("object"==typeof a&&a&&Ji(qs,a))return a}return new Ys(!1)},Ks=Ei.TypeError,$s=function(t,e){if(Ji(e,t))return t;throw Ks("Incorrect invocation")},Js=Lu("iterator"),Qs=!1;try{var Zs=0,tl={next:function(){return{done:!!Zs++}},return:function(){Qs=!0}};tl[Js]=function(){return this},Array.from(tl,(function(){throw 2}))}catch(z){}var el=function(t,e){if(!e&&!Qs)return!1;var r=!1;try{var n={};n[Js]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},rl=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",u=Ei[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=Di(a[t]);ga(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!Ki(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!Ki(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!Ki(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ua(t,!Hi(u)||!(o||a.forEach&&!ji((function(){(new u).entries().next()})))))c=r.getConstructor(e,t,n,i),Ms.enable();else if(Ua(t,!0)){var l=new c,v=l[i](o?{}:-0,1)!=l,p=ji((function(){l.has(1)})),h=el((function(t){new u(t)})),d=!o&&ji((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((c=e((function(t,e){$s(t,a);var r=function(t,e,r){var n,o;return as&&Hi(n=e.constructor)&&n!==r&&Ki(o=n.prototype)&&o!==r.prototype&&as(t,o),t}(new u,t,c);return null!=e&&Hs(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=a,a.constructor=c),(p||d)&&(s("delete"),s("has"),n&&s("get")),(d||v)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,qa({global:!0,forced:c!=u},f),Ic(c,t),o||r.setStrong(c,t,n),c},nl=Ms.getWeakData,ol=va.set,il=va.getterFor,ul=Hc.find,al=Hc.findIndex,cl=Di([].splice),fl=0,sl=function(t){return t.frozen||(t.frozen=new ll)},ll=function(){this.entries=[]},vl=function(t,e){return ul(t.entries,(function(t){return t[0]===e}))};ll.prototype={get:function(t){var e=vl(this,t);if(e)return e[1]},has:function(t){return!!vl(this,t)},set:function(t,e){var r=vl(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=al(this.entries,(function(e){return e[0]===t}));return~e&&cl(this.entries,e,1),!!~e}};var pl,hl={getConstructor:function(t,e,r,n){var o=t((function(t,o){$s(t,i),ol(t,{type:e,id:fl++,frozen:void 0}),null!=o&&Hs(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=il(e),a=function(t,e,r){var n=u(t),o=nl(Vu(e),!0);return!0===o?sl(n).set(e,r):o[n.id]=r,t};return Ls(i,{delete:function(t){var e=u(this);if(!Ki(t))return!1;var r=nl(t);return!0===r?sl(e).delete(t):r&&Su(r,e.id)&&delete r[e.id]},has:function(t){var e=u(this);if(!Ki(t))return!1;var r=nl(t);return!0===r?sl(e).has(t):r&&Su(r,e.id)}}),Ls(i,r?{get:function(t){var e=u(this);if(Ki(t)){var r=nl(t);return!0===r?sl(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},dl=va.enforce,yl=!Ei.ActiveXObject&&"ActiveXObject"in Ei,gl=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},bl=rl("WeakMap",gl,hl);if(ta&&yl){pl=hl.getConstructor(gl,"WeakMap",!0),Ms.enable();var ml=bl.prototype,wl=Di(ml.delete),Ol=Di(ml.has),Sl=Di(ml.get),xl=Di(ml.set);Ls(ml,{delete:function(t){if(Ki(t)&&!zs(t)){var e=dl(this);return e.frozen||(e.frozen=new pl),wl(this,t)||e.frozen.delete(t)}return wl(this,t)},has:function(t){if(Ki(t)&&!zs(t)){var e=dl(this);return e.frozen||(e.frozen=new pl),Ol(this,t)||e.frozen.has(t)}return Ol(this,t)},get:function(t){if(Ki(t)&&!zs(t)){var e=dl(this);return e.frozen||(e.frozen=new pl),Ol(this,t)?Sl(this,t):e.frozen.get(t)}return Sl(this,t)},set:function(t,e){if(Ki(t)&&!zs(t)){var r=dl(this);r.frozen||(r.frozen=new pl),Ol(this,t)?xl(this,t,e):r.frozen.set(t,e)}else xl(this,t,e);return this}})}rl("WeakSet",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),hl);var El,jl={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Tl=_u("span").classList,Pl=Tl&&Tl.constructor&&Tl.constructor.prototype,Al=Pl===Object.prototype?void 0:Pl,Rl=Hc.forEach,kl=(El=[].forEach)&&ji((function(){El.call(null,(function(){throw 1}),1)}))?[].forEach:function(t){return Rl(this,t,arguments.length>1?arguments[1]:void 0)},Ll=function(t){if(t&&t.forEach!==kl)try{qu(t,"forEach",kl)}catch(e){t.forEach=kl}};for(var Il in jl)jl[Il]&&Ll(Ei[Il]&&Ei[Il].prototype);Ll(Al);var Cl=Lu("iterator"),zl=Lu("toStringTag"),Fl=Os.values,Ml=function(t,e){if(t){if(t[Cl]!==Fl)try{qu(t,Cl,Fl)}catch(e){t[Cl]=Fl}if(t[zl]||qu(t,zl,e),jl[e])for(var r in Os)if(t[r]!==Os[r])try{qu(t,r,Os[r])}catch(e){t[r]=Os[r]}}};for(var _l in jl)Ml(Ei[_l]&&Ei[_l].prototype,_l);Ml(Al,"DOMTokenList");var Dl=function(){return Dl=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Dl.apply(this,arguments)};function Nl(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Wl(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function Gl(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Bl=function(t,e,r,n){try{return n?e(Vu(r)[0],r[1]):e(r)}catch(e){Xs(t,"throw",e)}},Vl=Ei.Array,Xl=!el((function(t){Array.from(t)}));qa({target:"Array",stat:!0,forced:Xl},{from:function(t){var e=wu(t),r=Bc(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=zc(o,n>2?arguments[2]:void 0));var u,a,c,f,s,l,v=Gs(e),p=0;if(!v||this==Vl&&Ns(v))for(u=Ta(e),a=r?new this(u):Vl(u);u>p;p++)l=i?o(e[p],p):e[p],wc(a,p,l);else for(s=(f=Vs(e,v)).next,a=r?new this:[];!(c=Ai(s,f)).done;p++)l=i?Bl(f,o,[c.value,p],!0):c.value,wc(a,p,l);return a.length=p,a}});var Ul=Lu("species"),Yl=function(t){return nu>=51||!ji((function(){var e=[];return(e.constructor={})[Ul]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ql=Hc.map,Hl=Yl("map");qa({target:"Array",proto:!0,forced:!Hl},{map:function(t){return ql(this,t,arguments.length>1?arguments[1]:void 0)}});var Kl=Yl("slice"),$l=Lu("species"),Jl=Ei.Array,Ql=Math.max;qa({target:"Array",proto:!0,forced:!Kl},{slice:function(t,e){var r,n,o,i=qi(this),u=Ta(i),a=xa(t,u),c=xa(void 0===e?u:e,u);if(Za(i)&&(r=i.constructor,(Bc(r)&&(r===Jl||Za(r.prototype))||Ki(r)&&null===(r=r[$l]))&&(r=void 0),r===Jl||void 0===r))return Tc(i,a,c);for(n=new(void 0===r?Jl:r)(Ql(c-a,0)),o=0;a<c;a++,o++)a in i&&wc(n,o,i[a]);return n.length=o,n}}),qa({target:"Object",stat:!0},{fromEntries:function(t){var e={};return Hs(t,(function(t,r){wc(e,t,r)}),{AS_ENTRIES:!0}),e}});var Zl=ji((function(){fc(1)}));qa({target:"Object",stat:!0,forced:Zl},{keys:function(t){return fc(wu(t))}});var tv=Ii.f,ev=Di(tv),rv=Di([].push),nv=function(t){return function(e){for(var r,n=qi(e),o=fc(n),i=o.length,u=0,a=[];i>u;)r=o[u++],Ti&&!ev(n,r)||rv(a,t?[r,n[r]]:n[r]);return a}},ov=[nv(!0),nv(!1)][0];qa({target:"Object",stat:!0},{entries:function(t){return ov(t)}});var iv=Hc.filter,uv=Yl("filter");qa({target:"Array",proto:!0,forced:!uv},{filter:function(t){return iv(this,t,arguments.length>1?arguments[1]:void 0)}});var av=Aa.includes;qa({target:"Array",proto:!0},{includes:function(t){return av(this,t,arguments.length>1?arguments[1]:void 0)}}),Yf("includes");var cv=ya.PROPER,fv="toString",sv=RegExp.prototype,lv=sv[fv],vv=Di((function(){var t=Vu(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e})),pv=ji((function(){return"/a/b"!=lv.call({source:"a",flags:"b"})})),hv=cv&&lv.name!=fv;function dv(t){return"[object Object]"===Object.prototype.toString.call(t)}function yv(t){if(!dv(t))return!1;var e=t.constructor;if(void 0===e)return!0;var r=e.prototype;return!1!==dv(r)&&!Object.prototype.hasOwnProperty.call(r,"isPrototypeOfOf")}function gv(t,e){for(var r in t){var n=t[r],o=e[r];if(yv(n)&&yv(o)){if(!gv(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var i=0;i<n.length;i++)if(n[i]!==o[i])return!1}else if(n!==o)return!1}for(var r in e)if(void 0===t[r]&&void 0!==e[r])return!1;return!0}function bv(t){return function(t){var e,r,n,o,i=[];try{for(var u=Nl(t),a=u.next();!a.done;a=u.next()){var c=a.value;if("string"!=typeof c.insert||0!==c.insert.length){var f=i[i.length-1];f&&"string"==typeof f.insert&&"string"==typeof c.insert&&(f.attributes===c.attributes||!f.attributes==!c.attributes&&gv(null!==(n=f.attributes)&&void 0!==n?n:{},null!==(o=c.attributes)&&void 0!==o?o:{}))?f.insert+=c.insert:i.push(c)}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(e)throw e.error}}return i}(t.toDelta())}function mv(t){var e=t.insert;return"string"==typeof e?e.length:1}function wv(t){return t.reduce((function(t,e){return t+mv(e)}),0)}function Ov(t,e,r){if(r<1)return[];for(var n=0,o=[],i=e+r,u=0;u<t.length&&!(n>=i);u++){var a=t[u],c=mv(a);if(n+c<=e)n+=c;else if("string"==typeof a.insert){var f=Math.max(0,e-n),s=Math.min(c,c-(n+c-i));o.push(Dl(Dl({},a),{insert:a.insert.slice(f,s)})),n+=c}else n+=c,o.push(a)}return o}function Sv(t){return function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return Object.fromEntries(Object.entries(t).filter((function(t){var r=Wl(t,1)[0];return!e.includes(r)})))}(t,l.isText(t)?"text":"children")}function xv(t){var e=t.children,r=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["children"]),n=new d.XmlText;return Object.entries(r).forEach((function(t){var e=Wl(t,2),r=e[0],o=e[1];n.setAttribute(r,o)})),n.applyDelta(function(t){return t.map((function(t){return l.isText(t)?{insert:t.text,attributes:Sv(t)}:{insert:xv(t)}}))}(e),{sanitize:!1}),n}(pv||hv)&&ga(RegExp.prototype,fv,(function(){var t=Vu(this),e=cc(t.source),r=t.flags;return"/"+e+"/"+cc(void 0===r&&Ji(sv,t)&&!("flags"in sv)?vv(t):r)}),{unsafe:!0});var Ev=Lu("isConcatSpreadable"),jv=9007199254740991,Tv="Maximum allowed index exceeded",Pv=Ei.TypeError,Av=nu>=51||!ji((function(){var t=[];return t[Ev]=!1,t.concat()[0]!==t})),Rv=Yl("concat"),kv=function(t){if(!Ki(t))return!1;var e=t[Ev];return void 0!==e?!!e:Za(t)};function Lv(t){return t?l.isText(t)?t.text.length:1:0}function Iv(t,e,r){var n;if(0===r.length)throw new Error("Path has to a have a length >= 1");if(l.isText(e))throw new Error("Cannot descent into slate text");var o=Wl(r),i=o[0],u=o.slice(1),a=function(t,e){return t.children.slice(0,e).reduce((function(t,e){return t+Lv(e)}),0)}(e,i),c=e.children[i],f=bv(t),s=Lv(c),v=Ov(f,a,s);if(v.length>1)throw new Error("Path doesn't match yText, yTarget spans multiple nodes");var p=null===(n=v[0])||void 0===n?void 0:n.insert;if(u.length>0){if(!(p instanceof d.XmlText))throw new Error("Path doesn't match yText, cannot descent into non-yText");return Iv(p,c,u)}return{yParent:t,textRange:{start:a,end:a+s},yTarget:p instanceof d.XmlText?p:void 0,slateParent:e,slateTarget:c,targetDelta:v}}function Cv(t,e,r){void 0===r&&(r={});for(var n=r.assoc,o=void 0===n?0:n,i=r.insert,u=void 0!==i&&i,a=0,c=0,f=0;f<t.children.length;f++){var s=t.children[f],v=l.isText(s)?s.text.length:1;v>0&&(c=f);var p=a+v;if(v>0&&(o>=0?p>e:p>=e))return[f,e-a];a+=v}if(e>a+(u?1:0))throw new Error("yOffset out of bounds");if(u)return[t.children.length,0];var h=t.children[c];return[c,l.isText(h)?h.text.length:1]}function zv(t){return t.map((function(t){return"string"==typeof t.insert?t:Dl(Dl({},t),{insert:Fv(t.insert)})}))}function Fv(t){var e=new d.XmlText,r=t.getAttributes();return Object.entries(r).forEach((function(t){var r=Wl(t,2),n=r[0],o=r[1];e.setAttribute(n,o)})),e.applyDelta(zv(bv(t)),{sanitize:!1}),e}qa({target:"Array",proto:!0,forced:!Av||!Rv},{concat:function(t){var e,r,n,o,i,u=wu(this),a=Uc(u,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(kv(i=-1===e?u:arguments[e])){if(c+(o=Ta(i))>jv)throw Pv(Tv);for(r=0;r<o;r++,c++)r in i&&wc(a,c,i[r])}else{if(c>=jv)throw Pv(Tv);wc(a,c++,i)}return a.length=c,a}});var Mv=Object.assign,_v=Object.defineProperty,Dv=Di([].concat),Nv=!Mv||ji((function(){if(Ti&&1!==Mv({b:1},Mv(_v({},"a",{enumerable:!0,get:function(){_v(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=Mv({},t)[r]||fc(Mv({},e)).join("")!=n}))?function(t,e){for(var r=wu(t),n=arguments.length,o=1,i=Fa.f,u=Ii.f;n>o;)for(var a,c=Xi(arguments[o++]),f=i?Dv(fc(c),i(c)):fc(c),s=f.length,l=0;s>l;)a=f[l++],Ti&&!Ai(u,c,a)||(r[a]=c[a]);return r}:Mv;qa({target:"Object",stat:!0,forced:Object.assign!==Nv},{assign:Nv});var Wv,Gv=Lu("match"),Bv=Ei.TypeError,Vv=Lu("match"),Xv=Wu.f,Uv=Di("".startsWith),Yv=Di("".slice),qv=Math.min,Hv=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Vv]=!1,"/./"[t](e)}catch(t){}}return!1}("startsWith"),Kv=!(Hv||(Wv=Xv(String.prototype,"startsWith"),!Wv||Wv.writable));qa({target:"String",proto:!0,forced:!Kv&&!Hv},{startsWith:function(t){var e=cc(Yi(this));!function(t){if(function(t){var e;return Ki(t)&&(void 0!==(e=t[Gv])?!!e:"RegExp"==Gi(t))}(t))throw Bv("The method doesn't accept regular expressions")}(t);var r=ja(qv(arguments.length>1?arguments[1]:void 0,e.length)),n=cc(t);return Uv?Uv(e,n,r):Yv(e,r,r+n.length)===n}});var $v=/"/g,Jv=Di("".replace);function Qv(t){if(!t.doc)throw new Error("shared type isn't attached to a document")}qa({target:"String",proto:!0,forced:ji((function(){var t="".anchor('"');return t!==t.toLowerCase()||t.split('"').length>3}))},{anchor:function(t){return e=t,r=cc(Yi(this)),n="<a",(n+=' name="'+Jv(cc(e),$v,"&quot;")+'"')+">"+r+"</a>";var e,r,n}});var Zv="__slateYjsStoredPosition_";function tp(t,e,r){var n=Iv(t,e,r.path),o=n.yTarget,i=n.yParent,u=n.textRange;if(o)throw new Error("Slate point points to a non-text element inside sharedRoot");var a=u.start+r.offset;return d.createRelativePositionFromTypeIndex(i,a,a===u.end?-1:0)}function ep(t,e,r){if(!t.doc)throw new Error("sharedRoot isn't attach to a yDoc");var n=d.createAbsolutePositionFromRelativePosition(r,t.doc);return n&&function(t,e,r){var n=r.type,o=r.index,i=r.assoc;if(!(n instanceof d.XmlText))throw new Error("Absolute position points to a non-XMLText");var u=function(t,e,r){for(var n=[r];n[0]!==t;){var o=n[0].parent;if(!o)throw new Error("yText isn't a descendant of root element");if(!(o instanceof d.XmlText))throw new Error("Unexpected y parent type");n.unshift(o)}if(n.length<2)return[];var i=e;return n.reduce((function(t,e,r){var o,u,a=n[r+1];if(!a)return t;var c=0,f=bv(e);try{for(var s=Nl(f),v=s.next();!v.done;v=s.next()){var p=v.value;if(p.insert===a)break;c+="string"==typeof p.insert?p.insert.length:1}}catch(t){o={error:t}}finally{try{v&&!v.done&&(u=s.return)&&u.call(s)}finally{if(o)throw o.error}}if(l.isText(i))throw new Error("Cannot descent into slate text");var h=Wl(Cv(i,c),1)[0];return i=i.children[h],t.concat(h)}),[])}(t,e,n),a=s.get(e,u);if(l.isText(a))throw new Error("Absolute position doesn't match slateRoot, cannot descent into text");var c=Wl(Cv(a,o,{assoc:i}),2),f=c[0],v=c[1],p=a.children[f];return l.isText(p)?{path:Gl(Gl([],Wl(u)),[f]),offset:v}:null}(t,e,n)}function rp(t,e,r){t.setAttribute(Zv+e,d.encodeRelativePosition(r))}function np(t,e,r){return Object.fromEntries(Object.entries(t).filter((function(t){var n=Wl(t,2)[1];return n.type===e&&(!r||(n.assoc>=0?n.index>=r.start&&n.index<r.end:n.index>r.start&&n.index>=r.end))})))}function op(t,e,r){var n;void 0===r&&(r="");var o=((n={})[r]=np(t,e),n);return bv(e).forEach((function(e,n){var i=e.insert;i instanceof d.XmlText&&Object.assign(o,op(t,i,r?r+"."+n:n.toString()))})),o}function ip(t,e,r,n){void 0===n&&(n=0);var o=function(t){return Qv(t),Object.fromEntries(Object.entries(t.getAttributes()).filter((function(t){return Wl(t,1)[0].startsWith(Zv)})).map((function(e){var r=Wl(e,2),n=r[0],o=r[1];return[n.slice(Zv.length),d.createAbsolutePositionFromRelativePosition(d.decodeRelativePosition(o),t.doc)]})).filter((function(t){return Wl(t,2)[1]})))}(t),i={"":np(o,e,{start:n,end:n+wv(r)})};return r.forEach((function(t,e){var r=t.insert;r instanceof d.XmlText&&Object.assign(i,op(o,r,e.toString()))})),i}function up(t,e,r,n,o,i,u){void 0===o&&(o=0),void 0===i&&(i=0),void 0===u&&(u="");var a=r[u];a&&Object.entries(a).forEach((function(r){var n=Wl(r,2),u=n[0],a=n[1];rp(t,u,d.createRelativePositionFromTypeIndex(e,a.index-i+o,a.assoc))})),n.forEach((function(e,n){var o=e.insert;o instanceof d.XmlText&&up(t,o,r,bv(o),0,0,u?u+"."+n:n.toString())}))}var ap={insert_node:function(t,e,r){var n=Iv(t,e,r.path),o=n.yParent,i=n.textRange;if(l.isText(r.node))return o.insert(i.start,r.node.text,Sv(r.node));o.insertEmbed(i.start,xv(r.node))},remove_node:function(t,e,r){var n=Iv(t,e,r.path),o=n.yParent,i=n.textRange;o.delete(i.start,i.end-i.start)},set_node:function(t,e,r){var n=Iv(t,e,r.path),o=n.yTarget,i=n.textRange,u=n.yParent;if(o)return Object.entries(r.newProperties).forEach((function(t){var e=Wl(t,2),r=e[0],n=e[1];if(null===n)return o.removeAttribute(r);o.setAttribute(r,n)})),Object.entries(r.properties).forEach((function(t){var e=Wl(t,1)[0];Object.prototype.hasOwnProperty.call(r.newProperties,e)||o.removeAttribute(e)}));var a=Object.fromEntries(Object.keys(r.properties).map((function(t){return[t,null]}))),c=Dl(Dl({},a),r.newProperties);u.format(i.start,i.end-i.start,c)},merge_node:function(t,e,r){var n=Iv(t,e,r.path),o=Iv(n.yParent,n.slateParent,v.previous(r.path.slice(-1)));if(!n.yTarget!=!o.yTarget)throw new Error("Cannot merge y text with y element");if(!o.yTarget||!n.yTarget){var i=n.yParent,u=n.textRange,a=n.slateTarget;if(!a)throw new Error("Expected Slate target node for merge op.");var c=s.get(e,v.previous(r.path));if(!l.isText(c))throw new Error("Path points to Y.Text but not a Slate text node.");var f=Sv(a),p=Sv(c),h=Object.keys(f).reduce((function(t,e){var r;return e in p?t:Dl(Dl({},t),((r={})[e]=null,r))}),{});return i.format(u.start,u.end-u.start,Dl(Dl({},h),p))}var d=o.yTarget.length,y=bv(n.yTarget),g=zv(y),b=ip(t,n.yTarget,y,d),m=Gl([{retain:d}],Wl(g));o.yTarget.applyDelta(m,{sanitize:!1}),n.yParent.delete(n.textRange.start,n.textRange.end-n.textRange.start),up(t,o.yTarget,b,g,d)},move_node:function(t,e,r){var n=v.parent(r.newPath),o=r.newPath[r.newPath.length-1],i=s.get(e,n);if(l.isText(i))throw new Error("Cannot move slate node into text element");var u=Gl(Gl([],Wl(n)),[Math.min(o,i.children.length)]),a=Iv(t,e,r.path),c=Iv(t,e,u),f=zv(a.targetDelta),p=ip(t,a.yParent,a.targetDelta);a.yParent.delete(a.textRange.start,a.textRange.end-a.textRange.start);var h=wv(bv(c.yParent)),d=Math.min(c.textRange.start,h),y=Gl([{retain:d}],Wl(f));c.yParent.applyDelta(y,{sanitize:!1}),up(t,c.yParent,p,f,d,a.textRange.start)},split_node:function(t,e,r){var n=Iv(t,e,r.path);if(!n.slateTarget)throw new Error("Y target without corresponding slate node");if(!n.yTarget){if(!l.isText(n.slateTarget))throw new Error("Mismatch node type between y target and slate node");var o={};return n.targetDelta.forEach((function(t){t.attributes&&Object.keys(t.attributes).forEach((function(t){o[t]=null}))})),n.yParent.format(n.textRange.start,n.textRange.end-n.textRange.start,Dl(Dl({},o),r.properties))}if(l.isText(n.slateTarget))throw new Error("Mismatch node type between y target and slate node");var i=Iv(n.yTarget,n.slateTarget,[r.position]),u=n.slateTarget.children.slice(0,r.position).reduce((function(t,e){return t+Lv(e)}),0),a=n.slateTarget.children.reduce((function(t,e){return t+Lv(e)}),0),c=Ov(bv(n.yTarget),u,a-u),f=zv(c),s=ip(t,n.yTarget,c,u),v=new d.XmlText;v.applyDelta(f,{sanitize:!1}),Object.entries(r.properties).forEach((function(t){var e=Wl(t,2),r=e[0],n=e[1];v.setAttribute(r,n)})),n.yTarget.delete(i.textRange.start,n.yTarget.length-i.textRange.start),n.yParent.insertEmbed(n.textRange.end,v),up(t,v,s,f,0,u)}};Dl(Dl(Dl({},{insert_text:function(t,e,r){var n=Iv(t,e,r.path),o=n.yParent,i=n.textRange,u=s.get(e,r.path);if(!l.isText(u))throw new Error("Cannot insert text into non-text node");o.insert(i.start+r.offset,r.text,Sv(u))},remove_text:function(t,e,r){var n=Iv(t,e,r.path),o=n.yParent,i=n.textRange;o.delete(i.start+r.offset,r.text.length)}}),ap),{set_selection:function(){}});var cp=new WeakMap,fp=new WeakMap,sp=new WeakSet,lp={isYjsEditor:function(t){return p.isEditor(t)&&t.sharedRoot instanceof d.XmlText&&"localOrigin"in t&&"positionStorageOrigin"in t&&"function"==typeof t.applyRemoteEvents&&"function"==typeof t.storeLocalChange&&"function"==typeof t.flushLocalChanges&&"function"==typeof t.isLocalOrigin&&"function"==typeof t.connect&&"function"==typeof t.disconnect},localChanges:function(t){var e;return null!==(e=fp.get(t))&&void 0!==e?e:[]},applyRemoteEvents:function(t,e,r){t.applyRemoteEvents(e,r)},storeLocalChange:function(t,e){t.storeLocalChange(e)},flushLocalChanges:function(t){t.flushLocalChanges()},connected:function(t){return sp.has(t)},connect:function(t){t.connect()},disconnect:function(t){t.disconnect()},isLocal:function(t){return t.isLocalOrigin(lp.origin(t))},origin:function(t){var e=cp.get(t);return void 0!==e?e:t.localOrigin},withOrigin:function(t,e,r){var n=lp.origin(t);cp.set(t,e),r(),cp.set(t,n)},storePosition:function(t,e,r){var n=t.sharedRoot,o=t.positionStorageOrigin;Qv(n);var i=tp(n,t,r);n.doc.transact((function(){rp(n,e,i)}),o)},removeStoredPosition:function(t,e){var r=t.sharedRoot,n=t.positionStorageOrigin;Qv(r),r.doc.transact((function(){!function(t,e){t.removeAttribute(Zv+e)}(r,e)}),n)},position:function(t,e){var r=function(t,e){var r=t.getAttribute(Zv+e);return r?d.decodeRelativePosition(r):null}(t.sharedRoot,e);if(r)return ep(t.sharedRoot,t,r)},storedPositionsRelative:function(t){return e=t.sharedRoot,Object.fromEntries(Object.entries(e.getAttributes()).filter((function(t){return Wl(t,1)[0].startsWith(Zv)})).map((function(t){var e=Wl(t,2),r=e[0],n=e[1];return[r.slice(Zv.length),d.createRelativePositionFromJSON(n)]})));var e}},vp=Lu("species"),pp=Yu.f,hp=Ms.fastKey,dp=va.set,yp=va.getterFor,gp={getConstructor:function(t,e,r,n){var o=t((function(t,o){$s(t,i),dp(t,{type:e,index:mc(null),first:void 0,last:void 0,size:0}),Ti||(t.size=0),null!=o&&Hs(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,u=yp(e),a=function(t,e,r){var n,o,i=u(t),a=c(t,e);return a?a.value=r:(i.last=a={index:o=hp(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=a),n&&(n.next=a),Ti?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},c=function(t,e){var r,n=u(t),o=hp(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return Ls(i,{clear:function(){for(var t=u(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,Ti?t.size=0:this.size=0},delete:function(t){var e=this,r=u(e),n=c(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),Ti?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=u(this),n=zc(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),Ls(i,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),Ti&&pp(i,"size",{get:function(){return u(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=yp(e),i=yp(n);gs(t,e,(function(t,e){dp(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),function(t){var e=$i(t),r=Yu.f;Ti&&e&&!e[vp]&&r(e,vp,{configurable:!0,get:function(){return this}})}(e)}};rl("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),gp);var bp=new WeakMap,mp={isCursorEditor:function(t){return lp.isYjsEditor(t)&&t.awareness&&"string"==typeof t.cursorDataField&&"string"==typeof t.selectionStateField&&"function"==typeof t.sendCursorPosition&&"function"==typeof t.sendCursorData},sendCursorPosition:function(t,e){void 0===e&&(e=t.selection),t.sendCursorPosition(e)},sendCursorData:function(t,e){t.sendCursorData(e)},on:function(t,e,r){var n;if("change"===e){var o=null!==(n=bp.get(t))&&void 0!==n?n:new Set;o.add(r),t&&bp.set(t,o)}},off:function(t,e,r){if("change"===e){var n=bp.get(t);n&&n.delete(r)}},cursorState:function(t,e){var r;if(e===t.awareness.clientID||!lp.connected(t))return null;var n=t.awareness.getStates().get(e);return n?{relativeSelection:null!==(r=n[t.selectionStateField])&&void 0!==r?r:null,data:n[t.cursorDataField],clientId:e}:null},cursorStates:function(t){return lp.connected(t)?Object.fromEntries(Array.from(t.awareness.getStates().entries(),(function(e){var r=Wl(e,2),n=r[0],o=r[1];return n!==t.awareness.clientID&&o?[n,{relativeSelection:o[t.selectionStateField],data:o[t.cursorDataField]}]:null})).filter(Array.isArray)):{}}};function wp(){var t=b();return mp.isCursorEditor(t)||console.warn("Cannot use useSyncExternalStore outside the context of a RemoteCursorEditor"),t}var Op=new WeakMap;function Sp(t){var e=Op.get(t);if(e)return e;var r=function(t){var e={},r=new Set,n=r.add.bind(r),o=new Set,i=null;return[function(e){return o.add(e),i||(i=function(t){t.added.forEach(n),t.removed.forEach(n),t.updated.forEach(n),o.forEach((function(t){return t()}))},mp.on(t,"change",i)),function(){o.delete(e),i&&0===o.size&&(mp.off(t,"change",i),i=null)}},function(){return 0===r.size?e:(r.forEach((function(r){var n=mp.cursorState(t,r);null!==n?e[r]=n:delete e[r.toString()]})),r.clear(),e=m({},e))}]}(t);return t&&Op.set(t,r),r}function xp(){return Sp(wp())}function Ep(){var t=w(xp(),2),e=t[0],r=t[1];return L.useSyncExternalStore(e,r)}function jp(t,e){var r=w(xp(),2),n=r[0],o=r[1];return G.useSyncExternalStoreWithSelector(n,o,null,t,e)}var Tp=new WeakMap;function Pp(t,e){if(!e.relativeSelection)return null;var r=Tp.get(t.children);r||(r=new WeakMap,Tp.set(t.children,r));var n=r.get(e);if(void 0===n)try{n=function(t,e,r){var n=ep(t,e,r.anchor);if(!n)return null;var o=ep(t,e,r.focus);return o?{anchor:n,focus:o}:null}(t.sharedRoot,t,e.relativeSelection),r.set(e,n)}catch(t){return null}return n}var Ap=Ct("species"),Rp=Mo.map,kp=function(t){return Tt>=51||!K((function(){var e=[];return(e.constructor={})[Ap]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("map");zr({target:"Array",proto:!0,forced:!kp},{map:function(t){return Rp(this,t,arguments.length>1?arguments[1]:void 0)}});var Lp=H(sr.f),Ip=H([].push),Cp=function(t){return function(e){for(var r,n=ot(e),o=xe(n),i=o.length,u=0,a=[];i>u;)r=o[u++],Dt&&!Lp(n,r)||Ip(a,t?[r,n[r]]:n[r]);return a}},zp={entries:Cp(!0),values:Cp(!1)}.entries;zr({target:"Object",stat:!0},{entries:function(t){return zp(t)}});var Fp=Wn.onFreeze,Mp=Object.freeze,_p=K((function(){Mp(1)}));zr({target:"Object",stat:!0,forced:_p,sham:!Nn},{freeze:function(t){return Mp&&zt(t)?Mp(Fp(t)):t}}),zr({target:"Object",stat:!0},{fromEntries:function(t){var e={};return Qn(t,(function(t,r){Rn(e,t,r)}),{AS_ENTRIES:!0}),e}});var Dp=K((function(){xe(1)}));function Np(t,e,r){var n,o,i=r.yOffset,u=r.xOffset,a=r.shouldGenerateOverlay,c=w(h.edges(e),2),f=c[0],s=c[1],d=function(t,e){try{return y.toDOMRange(t,e)}catch(t){return null}}(t,e);if(!d)return{caretPosition:null,selectionRects:[]};var g=[],b=p.nodes(t,{at:e,match:function(t,e){return l.isText(t)&&(!a||a(t,e))}}),m=null,O=h.isBackward(e);try{for(var S=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),x=S.next();!x.done;x=S.next()){var E=w(x.value,2),j=E[0],T=E[1],P=y.toDOMNode(t,j),A=v.equals(T,f.path),R=v.equals(T,s.path),k=null;if(A||R){var L=document.createRange();L.selectNode(P),A&&L.setStart(d.startContainer,d.startOffset),R&&L.setEnd(d.endContainer,d.endOffset),k=L.getClientRects()}else k=P.getClientRects();for(var I=O?A:R,C=0;C<k.length;C++){var z=k.item(C);if(z){var F=I&&(O?0===C:C===k.length-1),M=z.top-i,_=z.left-u;F&&(m={height:z.height,top:M,left:_+(O||h.isCollapsed(e)?0:z.width)}),g.push({width:z.width,height:z.height,top:M,left:_})}}}}catch(t){n={error:t}}finally{try{x&&!x.done&&(o=S.return)&&o.call(S)}finally{if(n)throw n.error}}return{selectionRects:g,caretPosition:m}}zr({target:"Object",stat:!0,forced:Dp},{keys:function(t){return xe(lt(t))}});var Wp=Object.freeze([]);function Gp(t){var e;void 0===t&&(t={});var r=t.containerRef,s=t.shouldGenerateOverlay,l=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["containerRef","shouldGenerateOverlay"]),v=wp(),p=Ep(),h=function(){var t=w(n((function(t){return t+1}),0),2),e=t[1],r=o(null),a=function(){r.current&&(cancelAnimationFrame(r.current),r.current=0)};return i(a),i((function(){return a}),[]),u((function(t){void 0===t&&(t=!1),t?e():r.current||(r.current=requestAnimationFrame(e))}),[])}(),d=o(new WeakMap),y=w(a({}),2),g=y[0],b=y[1],O=!("refreshOnResize"in l)||(null===(e=l.refreshOnResize)||void 0===e||e);!function(t,e){var r=o(e);r.current=e;var n=w(a((function(){return new ResizeObserver((function(){r.current()}))})),1)[0];i((function(){if(null==t?void 0:t.current){var e=t.current;return n.observe(e),function(){return n.unobserve(e)}}}),[n,t])}(O?r:void 0,(function(){d.current=new WeakMap,h("debounced"!==O)})),c((function(){var t,e,n;if(!r||r.current){var o=null===(t=null==r?void 0:r.current)||void 0===t?void 0:t.getBoundingClientRect(),i=null!==(e=null==o?void 0:o.x)&&void 0!==e?e:0,u=null!==(n=null==o?void 0:o.y)&&void 0!==n?n:0,a=Object.keys(g).length!==Object.keys(p).length,c=Object.fromEntries(Object.entries(p).map((function(t){var e=w(t,2),r=e[0],n=e[1],o=n.relativeSelection&&Pp(v,n);if(!o)return[r,Wp];var c=d.current.get(o);if(c)return[r,c];var f=Np(v,o,{xOffset:i,yOffset:u,shouldGenerateOverlay:s});return a=!0,d.current.set(o,f),[r,f]})));a&&b(c)}}));var S=f((function(){return Object.entries(p).map((function(t){var e,r,n=w(t,2),o=n[0],i=n[1],u=i.relativeSelection&&Pp(v,i),a=g[o];return m(m({},i),{range:u,caretPosition:null!==(e=null==a?void 0:a.caretPosition)&&void 0!==e?e:null,selectionRects:null!==(r=null==a?void 0:a.selectionRects)&&void 0!==r?r:Wp})}))}),[p,v,g]);return[S,u((function(){d.current=new WeakMap,h(!0)}),[h])]}export{g as EditorContext,Pp as getCursorRange,b as useEditorStatic,Gp as useRemoteCursorOverlayPositions,Ep as useRemoteCursorStates,jp as useRemoteCursorStatesSelector};
39
+ S((function(t,e){}));var N,G,W=S((function(t){t.exports=D})),V=function(t){try{return!!t()}catch(t){return!0}},B=!V((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),U=Function.prototype,q=U.call,H=B&&U.bind.bind(q,q),X=B?H:function(t){return function(){return q.apply(t,arguments)}},K=X({}.toString),Y=X("".slice),$=function(t){return Y(K(t),8,-1)},J=Object,Q=X("".split),Z=V((function(){return!J("z").propertyIsEnumerable(0)}))?function(t){return"String"===$(t)?Q(t,""):J(t)}:J,tt=function(t){return null==t},et=TypeError,nt=function(t){if(tt(t))throw new et("Can't call method on "+t);return t},rt=function(t){return Z(nt(t))},ot=function(t){return t&&t.Math===Math&&t},it=ot("object"==typeof globalThis&&globalThis)||ot("object"==typeof window&&window)||ot("object"==typeof self&&self)||ot("object"==typeof O&&O)||ot("object"==typeof O&&O)||function(){return this}()||Function("return this")(),ut=Object.defineProperty,ct=function(t,e){try{ut(it,t,{value:e,configurable:!0,writable:!0})}catch(n){it[t]=e}return e},at=S((function(t){var e="__core-js_shared__",n=t.exports=it[e]||ct(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ft=function(t,e){return at[t]||(at[t]=e||{})},st=Object,lt=function(t){return st(nt(t))},vt=X({}.hasOwnProperty),pt=Object.hasOwn||function(t,e){return vt(lt(t),e)},ht=0,yt=Math.random(),dt=X(1..toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+dt(++ht+yt,36)},bt=it.navigator,mt=bt&&bt.userAgent,wt=mt?String(mt):"",Ot=it.process,St=it.Deno,jt=Ot&&Ot.versions||St&&St.version,Et=jt&&jt.v8;Et&&(G=(N=Et.split("."))[0]>0&&N[0]<4?1:+(N[0]+N[1])),!G&&wt&&(!(N=wt.match(/Edge\/(\d+)/))||N[1]>=74)&&(N=wt.match(/Chrome\/(\d+)/))&&(G=+N[1]);var xt,At=G,Pt=it.String,Rt=!!Object.getOwnPropertySymbols&&!V((function(){var t=Symbol("symbol detection");return!Pt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&At&&At<41})),Tt=Rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kt=it.Symbol,zt=ft("wks"),It=Tt?kt.for||kt:kt&&kt.withoutSetter||gt,Lt=function(t){return pt(zt,t)||(zt[t]=Rt&&pt(kt,t)?kt[t]:It("Symbol."+t)),zt[t]},Ct="object"==typeof document&&document.all,Mt=void 0===Ct&&void 0!==Ct?function(t){return"function"==typeof t||t===Ct}:function(t){return"function"==typeof t},Ft=function(t){return"object"==typeof t?null!==t:Mt(t)},_t=String,Dt=TypeError,Nt=function(t){if(Ft(t))return t;throw new Dt(_t(t)+" is not an object")},Gt=!V((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Wt=Gt&&V((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Vt=it.document,Bt=Ft(Vt)&&Ft(Vt.createElement),Ut=function(t){return Bt?Vt.createElement(t):{}},qt=!Gt&&!V((function(){return 7!==Object.defineProperty(Ut("div"),"a",{get:function(){return 7}}).a})),Ht=Function.prototype.call,Xt=B?Ht.bind(Ht):function(){return Ht.apply(Ht,arguments)},Kt=function(t,e){return arguments.length<2?(n=it[t],Mt(n)?n:void 0):it[t]&&it[t][e];var n},Yt=X({}.isPrototypeOf),$t=Object,Jt=Tt?function(t){return"symbol"==typeof t}:function(t){var e=Kt("Symbol");return Mt(e)&&Yt(e.prototype,$t(t))},Qt=String,Zt=function(t){try{return Qt(t)}catch(t){return"Object"}},te=TypeError,ee=function(t){if(Mt(t))return t;throw new te(Zt(t)+" is not a function")},ne=function(t,e){var n=t[e];return tt(n)?void 0:ee(n)},re=TypeError,oe=TypeError,ie=Lt("toPrimitive"),ue=function(t,e){if(!Ft(t)||Jt(t))return t;var n,r=ne(t,ie);if(r){if(void 0===e&&(e="default"),n=Xt(r,t,e),!Ft(n)||Jt(n))return n;throw new oe("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&Mt(n=t.toString)&&!Ft(r=Xt(n,t)))return r;if(Mt(n=t.valueOf)&&!Ft(r=Xt(n,t)))return r;if("string"!==e&&Mt(n=t.toString)&&!Ft(r=Xt(n,t)))return r;throw new re("Can't convert object to primitive value")}(t,e)},ce=function(t){var e=ue(t,"string");return Jt(e)?e:e+""},ae=TypeError,fe=Object.defineProperty,se=Object.getOwnPropertyDescriptor,le="enumerable",ve="configurable",pe="writable",he={f:Gt?Wt?function(t,e,n){if(Nt(t),e=ce(e),Nt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&pe in n&&!n[pe]){var r=se(t,e);r&&r[pe]&&(t[e]=n.value,n={configurable:ve in n?n[ve]:r[ve],enumerable:le in n?n[le]:r[le],writable:!1})}return fe(t,e,n)}:fe:function(t,e,n){if(Nt(t),e=ce(e),Nt(n),qt)try{return fe(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new ae("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},ye=Math.ceil,de=Math.floor,ge=Math.trunc||function(t){var e=+t;return(e>0?de:ye)(e)},be=function(t){var e=+t;return e!=e||0===e?0:ge(e)},me=Math.max,we=Math.min,Oe=Math.min,Se=function(t){return e=t.length,(n=be(e))>0?Oe(n,9007199254740991):0;var e,n},je=function(t){return function(e,n,r){var o=rt(e),i=Se(o);if(0===i)return!t&&-1;var u,c=function(t,e){var n=be(t);return n<0?me(n+e,0):we(n,e)}(r,i);if(t&&n!=n){for(;i>c;)if((u=o[c++])!=u)return!0}else for(;i>c;c++)if((t||c in o)&&o[c]===n)return t||c||0;return!t&&-1}},Ee={includes:je(!0),indexOf:je(!1)},xe={},Ae=Ee.indexOf,Pe=X([].push),Re=function(t,e){var n,r=rt(t),o=0,i=[];for(n in r)!pt(xe,n)&&pt(r,n)&&Pe(i,n);for(;e.length>o;)pt(r,n=e[o++])&&(~Ae(i,n)||Pe(i,n));return i},Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ke=Object.keys||function(t){return Re(t,Te)},ze=Gt&&!Wt?Object.defineProperties:function(t,e){Nt(t);for(var n,r=rt(e),o=ke(e),i=o.length,u=0;i>u;)he.f(t,n=o[u++],r[n]);return t},Ie={f:ze},Le=Kt("document","documentElement"),Ce=ft("keys"),Me=function(t){return Ce[t]||(Ce[t]=gt(t))},Fe="prototype",_e="script",De=Me("IE_PROTO"),Ne=function(){},Ge=function(t){return"<"+_e+">"+t+"</"+_e+">"},We=function(t){t.write(Ge("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ve=function(){try{xt=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Ve="undefined"!=typeof document?document.domain&&xt?We(xt):(e=Ut("iframe"),n="java"+_e+":",e.style.display="none",Le.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Ge("document.F=Object")),t.close(),t.F):We(xt);for(var r=Te.length;r--;)delete Ve[Fe][Te[r]];return Ve()};xe[De]=!0;var Be=Object.create||function(t,e){var n;return null!==t?(Ne[Fe]=Nt(t),n=new Ne,Ne[Fe]=null,n[De]=t):n=Ve(),void 0===e?n:Ie.f(n,e)},Ue=he.f,qe=Lt("unscopables"),He=Array.prototype;void 0===He[qe]&&Ue(He,qe,{configurable:!0,value:Be(null)});var Xe,Ke,Ye,$e=function(t){He[qe][t]=!0},Je={},Qe=it.WeakMap,Ze=Mt(Qe)&&/native code/.test(String(Qe)),tn=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},en=Gt?function(t,e,n){return he.f(t,e,tn(1,n))}:function(t,e,n){return t[e]=n,t},nn="Object already initialized",rn=it.TypeError,on=it.WeakMap;if(Ze||at.state){var un=at.state||(at.state=new on);un.get=un.get,un.has=un.has,un.set=un.set,Xe=function(t,e){if(un.has(t))throw new rn(nn);return e.facade=t,un.set(t,e),e},Ke=function(t){return un.get(t)||{}},Ye=function(t){return un.has(t)}}else{var cn=Me("state");xe[cn]=!0,Xe=function(t,e){if(pt(t,cn))throw new rn(nn);return e.facade=t,en(t,cn,e),e},Ke=function(t){return pt(t,cn)?t[cn]:{}},Ye=function(t){return pt(t,cn)}}var an={set:Xe,get:Ke,has:Ye,enforce:function(t){return Ye(t)?Ke(t):Xe(t,{})},getterFor:function(t){return function(e){var n;if(!Ft(e)||(n=Ke(e)).type!==t)throw new rn("Incompatible receiver, "+t+" required");return n}}},fn={}.propertyIsEnumerable,sn=Object.getOwnPropertyDescriptor,ln={f:sn&&!fn.call({1:2},1)?function(t){var e=sn(this,t);return!!e&&e.enumerable}:fn},vn=Object.getOwnPropertyDescriptor,pn={f:Gt?vn:function(t,e){if(t=rt(t),e=ce(e),qt)try{return vn(t,e)}catch(t){}if(pt(t,e))return tn(!Xt(ln.f,t,e),t[e])}},hn=Function.prototype,yn=Gt&&Object.getOwnPropertyDescriptor,dn=pt(hn,"name"),gn={EXISTS:dn,PROPER:dn&&"something"===function(){}.name,CONFIGURABLE:dn&&(!Gt||Gt&&yn(hn,"name").configurable)},bn=X(Function.toString);Mt(at.inspectSource)||(at.inspectSource=function(t){return bn(t)});var mn,wn,On,Sn=at.inspectSource,jn=S((function(t){var e=gn.CONFIGURABLE,n=an.enforce,r=an.get,o=String,i=Object.defineProperty,u=X("".slice),c=X("".replace),a=X([].join),f=Gt&&!V((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!pt(t,"name")||e&&t.name!==r)&&(Gt?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&pt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&pt(l,"constructor")&&l.constructor?Gt&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var v=n(t);return pt(v,"source")||(v.source=a(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return Mt(this)&&r(this).source||Sn(this)}),"toString")})),En=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(Mt(n)&&jn(n,i,r),r.global)o?t[e]=n:ct(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:he.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},xn=Te.concat("length","prototype"),An={f:Object.getOwnPropertyNames||function(t){return Re(t,xn)}},Pn={f:Object.getOwnPropertySymbols},Rn=X([].concat),Tn=Kt("Reflect","ownKeys")||function(t){var e=An.f(Nt(t)),n=Pn.f;return n?Rn(e,n(t)):e},kn=function(t,e,n){for(var r=Tn(e),o=he.f,i=pn.f,u=0;u<r.length;u++){var c=r[u];pt(t,c)||n&&pt(n,c)||o(t,c,i(e,c))}},zn=/#|\.prototype\./,In=function(t,e){var n=Cn[Ln(t)];return n===Fn||n!==Mn&&(Mt(e)?V(e):!!e)},Ln=In.normalize=function(t){return String(t).replace(zn,".").toLowerCase()},Cn=In.data={},Mn=In.NATIVE="N",Fn=In.POLYFILL="P",_n=In,Dn=pn.f,Nn=function(t,e){var n,r,o,i,u,c=t.target,a=t.global,f=t.stat;if(n=a?it:f?it[c]||ct(c,{}):it[c]&&it[c].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Dn(n,r))&&u.value:n[r],!_n(a?r:c+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;kn(i,o)}(t.sham||o&&o.sham)&&en(i,"sham",!0),En(n,r,i,t)}},Gn=!V((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Wn=Me("IE_PROTO"),Vn=Object,Bn=Vn.prototype,Un=Gn?Vn.getPrototypeOf:function(t){var e=lt(t);if(pt(e,Wn))return e[Wn];var n=e.constructor;return Mt(n)&&e instanceof n?n.prototype:e instanceof Vn?Bn:null},qn=Lt("iterator"),Hn=!1;[].keys&&("next"in(On=[].keys())?(wn=Un(Un(On)))!==Object.prototype&&(mn=wn):Hn=!0);var Xn=!Ft(mn)||V((function(){var t={};return mn[qn].call(t)!==t}));Xn&&(mn={}),Mt(mn[qn])||En(mn,qn,(function(){return this}));var Kn={IteratorPrototype:mn,BUGGY_SAFARI_ITERATORS:Hn},Yn=he.f,$n=Lt("toStringTag"),Jn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!pt(t,$n)&&Yn(t,$n,{configurable:!0,value:e})},Qn=Kn.IteratorPrototype,Zn=function(){return this},tr=String,er=TypeError,nr=function(t){if(function(t){return Ft(t)||null===t}(t))return t;throw new er("Can't set "+tr(t)+" as a prototype")},rr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=function(t,e,n){try{return X(ee(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return nt(n),nr(r),Ft(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),or=gn.PROPER,ir=gn.CONFIGURABLE,ur=Kn.IteratorPrototype,cr=Kn.BUGGY_SAFARI_ITERATORS,ar=Lt("iterator"),fr="keys",sr="values",lr="entries",vr=function(){return this},pr=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Be(Qn,{next:tn(+!r,n)}),Jn(t,o,!1),Je[o]=Zn}(n,e,r);var c,a,f,s=function(t){if(t===o&&y)return y;if(!cr&&t&&t in p)return p[t];switch(t){case fr:case sr:case lr:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",v=!1,p=t.prototype,h=p[ar]||p["@@iterator"]||o&&p[o],y=!cr&&h||s(o),d="Array"===e&&p.entries||h;if(d&&(c=Un(d.call(new t)))!==Object.prototype&&c.next&&(Un(c)!==ur&&(rr?rr(c,ur):Mt(c[ar])||En(c,ar,vr)),Jn(c,l,!0)),or&&o===sr&&h&&h.name!==sr&&(ir?en(p,"name",sr):(v=!0,y=function(){return Xt(h,this)})),o)if(a={values:s(sr),keys:i?y:s(fr),entries:s(lr)},u)for(f in a)(cr||v||!(f in p))&&En(p,f,a[f]);else Nn({target:e,proto:!0,forced:cr||v},a);return p[ar]!==y&&En(p,ar,y,{name:o}),Je[e]=y,a},hr=function(t,e){return{value:t,done:e}},yr=he.f,dr="Array Iterator",gr=an.set,br=an.getterFor(dr),mr=pr(Array,"Array",(function(t,e){gr(this,{type:dr,target:rt(t),index:0,kind:e})}),(function(){var t=br(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,hr(void 0,!0);switch(t.kind){case"keys":return hr(n,!1);case"values":return hr(e[n],!1)}return hr([n,e[n]],!1)}),"values"),wr=Je.Arguments=Je.Array;if($e("keys"),$e("values"),$e("entries"),Gt&&"values"!==wr.name)try{yr(wr,"name",{value:"values"})}catch(t){}var Or={};Or[Lt("toStringTag")]="z";var Sr="[object z]"===String(Or),jr=Lt("toStringTag"),Er=Object,xr="Arguments"===$(function(){return arguments}()),Ar=Sr?$:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Er(t),jr))?n:xr?$(e):"Object"===(r=$(e))&&Mt(e.callee)?"Arguments":r},Pr=Sr?{}.toString:function(){return"[object "+Ar(this)+"]"};Sr||En(Object.prototype,"toString",Pr,{unsafe:!0});var Rr=String,Tr=function(t){if("Symbol"===Ar(t))throw new TypeError("Cannot convert a Symbol value to a string");return Rr(t)},kr=function(){var t=Nt(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},zr=RegExp.prototype,Ir=gn.PROPER,Lr="toString",Cr=RegExp.prototype,Mr=Cr[Lr],Fr=V((function(){return"/a/b"!==Mr.call({source:"a",flags:"b"})})),_r=Ir&&Mr.name!==Lr;(Fr||_r)&&En(Cr,Lr,(function(){var t=Nt(this),e=Tr(t.source),n=Tr(function(t){var e=t.flags;return void 0!==e||"flags"in zr||pt(t,"flags")||!Yt(zr,t)?e:Xt(kr,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var Dr=X([].slice),Nr=An.f,Gr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Wr={f:function(t){return Gr&&"Window"===$(t)?function(t){try{return Nr(t)}catch(t){return Dr(Gr)}}(t):Nr(rt(t))}},Vr=V((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Br=Object.isExtensible,Ur=V((function(){Br(1)}))||Vr?function(t){return!!Ft(t)&&((!Vr||"ArrayBuffer"!==$(t))&&(!Br||Br(t)))}:Br,qr=!V((function(){return Object.isExtensible(Object.preventExtensions({}))})),Hr=S((function(t){var e=he.f,n=!1,r=gt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=An.f,e=X([].splice),o={};o[r]=1,t(o).length&&(An.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},Nn({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Wr.f}))},fastKey:function(t,e){if(!Ft(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!pt(t,r)){if(!Ur(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!pt(t,r)){if(!Ur(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return qr&&n&&Ur(t)&&!pt(t,r)&&i(t),t}};xe[r]=!0})),Xr=function(t){if("Function"===$(t))return X(t)},Kr=Xr(Xr.bind),Yr=function(t,e){return ee(t),void 0===e?t:B?Kr(t,e):function(){return t.apply(e,arguments)}},$r=Lt("iterator"),Jr=Array.prototype,Qr=Lt("iterator"),Zr=function(t){if(!tt(t))return ne(t,Qr)||ne(t,"@@iterator")||Je[Ar(t)]},to=TypeError,eo=function(t,e,n){var r,o;Nt(t);try{if(!(r=ne(t,"return"))){if("throw"===e)throw n;return n}r=Xt(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Nt(r),n},no=TypeError,ro=function(t,e){this.stopped=t,this.result=e},oo=ro.prototype,io=function(t,e,n){var r,o,i,u,c,a,f,s,l=n&&n.that,v=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),h=!(!n||!n.IS_ITERATOR),y=!(!n||!n.INTERRUPTED),d=Yr(e,l),g=function(t){return r&&eo(r,"normal",t),new ro(!0,t)},b=function(t){return v?(Nt(t),y?d(t[0],t[1],g):d(t[0],t[1])):y?d(t,g):d(t)};if(p)r=t.iterator;else if(h)r=t;else{if(!(o=Zr(t)))throw new no(Zt(t)+" is not iterable");if(void 0!==(s=o)&&(Je.Array===s||Jr[$r]===s)){for(i=0,u=Se(t);u>i;i++)if((c=b(t[i]))&&Yt(oo,c))return c;return new ro(!1)}r=function(t,e){var n=arguments.length<2?Zr(t):e;if(ee(n))return Nt(Xt(n,t));throw new to(Zt(t)+" is not iterable")}(t,o)}for(a=p?t.next:r.next;!(f=Xt(a,r)).done;){try{c=b(f.value)}catch(t){eo(r,"throw",t)}if("object"==typeof c&&c&&Yt(oo,c))return c}return new ro(!1)},uo=TypeError,co=function(t,e){if(Yt(e,t))return t;throw new uo("Incorrect invocation")},ao=Lt("iterator"),fo=!1;try{var so=0,lo={next:function(){return{done:!!so++}},return:function(){fo=!0}};lo[ao]=function(){return this},Array.from(lo,(function(){throw 2}))}catch(t){}var vo=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=it[t],c=u&&u.prototype,a=u,f={},s=function(t){var e=X(c[t]);En(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!Ft(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!Ft(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!Ft(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(_n(t,!Mt(u)||!(o||c.forEach&&!V((function(){(new u).entries().next()})))))a=n.getConstructor(e,t,r,i),Hr.enable();else if(_n(t,!0)){var l=new a,v=l[i](o?{}:-0,1)!==l,p=V((function(){l.has(1)})),h=function(t,e){try{if(!e&&!fo)return!1}catch(t){return!1}var n=!1;try{var r={};r[ao]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){new u(t)})),y=!o&&V((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((a=e((function(t,e){co(t,c);var n=function(t,e,n){var r,o;return rr&&Mt(r=e.constructor)&&r!==n&&Ft(o=r.prototype)&&o!==n.prototype&&rr(t,o),t}(new u,t,a);return tt(e)||io(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=c,c.constructor=a),(p||y)&&(s("delete"),s("has"),r&&s("get")),(y||v)&&s(i),o&&c.clear&&delete c.clear}return f[t]=a,Nn({global:!0,constructor:!0,forced:a!==u},f),Jn(a,t),o||n.setStrong(a,t,r),a},po=function(t,e,n){return n.get&&jn(n.get,e,{getter:!0}),n.set&&jn(n.set,e,{setter:!0}),he.f(t,e,n)},ho=function(t,e,n){for(var r in e)En(t,r,e[r],n);return t},yo=Lt("species"),go=Hr.fastKey,bo=an.set,mo=an.getterFor,wo={getConstructor:function(t,e,n,r){var o=t((function(t,o){co(t,i),bo(t,{type:e,index:Be(null),first:null,last:null,size:0}),Gt||(t.size=0),tt(o)||io(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=mo(e),c=function(t,e,n){var r,o,i=u(t),c=a(t,e);return c?c.value=n:(i.last=c={index:o=go(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=c),r&&(r.next=c),Gt?i.size++:t.size++,"F"!==o&&(i.index[o]=c)),t},a=function(t,e){var n,r=u(t),o=go(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return ho(i,{clear:function(){for(var t=u(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Be(null),Gt?t.size=0:this.size=0},delete:function(t){var e=this,n=u(e),r=a(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),Gt?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=u(this),r=Yr(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!a(this,t)}}),ho(i,n?{get:function(t){var e=a(this,t);return e&&e.value},set:function(t,e){return c(this,0===t?0:t,e)}}:{add:function(t){return c(this,t=0===t?0:t,t)}}),Gt&&po(i,"size",{configurable:!0,get:function(){return u(this).size}}),o},setStrong:function(t,e,n){var r=e+" Iterator",o=mo(e),i=mo(r);pr(t,e,(function(t,e){bo(this,{type:r,target:t,state:o(t),kind:e,last:null})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?hr("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,hr(void 0,!0))}),n?"entries":"values",!n,!0),function(t){var e=Kt(t);Gt&&e&&!e[yo]&&po(e,yo,{configurable:!0,get:function(){return this}})}(e)}};vo("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),wo);var Oo=X("".charAt),So=X("".charCodeAt),jo=X("".slice),Eo=function(t){return function(e,n){var r,o,i=Tr(nt(e)),u=be(n),c=i.length;return u<0||u>=c?t?"":void 0:(r=So(i,u))<55296||r>56319||u+1===c||(o=So(i,u+1))<56320||o>57343?t?Oo(i,u):r:t?jo(i,u,u+2):o-56320+(r-55296<<10)+65536}},xo={codeAt:Eo(!1),charAt:Eo(!0)}.charAt,Ao="String Iterator",Po=an.set,Ro=an.getterFor(Ao);pr(String,"String",(function(t){Po(this,{type:Ao,string:Tr(t),index:0})}),(function(){var t,e=Ro(this),n=e.string,r=e.index;return r>=n.length?hr(void 0,!0):(t=xo(n,r),e.index+=t.length,hr(t,!1))}));var To=Array.isArray||function(t){return"Array"===$(t)},ko=function(){},zo=Kt("Reflect","construct"),Io=/^\s*(?:class|function)\b/,Lo=X(Io.exec),Co=!Io.test(ko),Mo=function(t){if(!Mt(t))return!1;try{return zo(ko,[],t),!0}catch(t){return!1}},Fo=function(t){if(!Mt(t))return!1;switch(Ar(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Co||!!Lo(Io,Sn(t))}catch(t){return!0}};Fo.sham=!0;var _o=!zo||V((function(){var t;return Mo(Mo.call)||!Mo(Object)||!Mo((function(){t=!0}))||t}))?Fo:Mo,Do=Lt("species"),No=Array,Go=function(t,e){return new(function(t){var e;return To(t)&&(e=t.constructor,(_o(e)&&(e===No||To(e.prototype))||Ft(e)&&null===(e=e[Do]))&&(e=void 0)),void 0===e?No:e}(t))(0===e?0:e)},Wo=X([].push),Vo=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,c=5===t||i;return function(a,f,s,l){for(var v,p,h=lt(a),y=Z(h),d=Se(y),g=Yr(f,s),b=0,m=l||Go,w=e?m(a,d):n||u?m(a,0):void 0;d>b;b++)if((c||b in y)&&(p=g(v=y[b],b,h),t))if(e)w[b]=p;else if(p)switch(t){case 3:return!0;case 5:return v;case 6:return b;case 2:Wo(w,v)}else switch(t){case 4:return!1;case 7:Wo(w,v)}return i?-1:r||o?o:w}},Bo={forEach:Vo(0),map:Vo(1),filter:Vo(2),some:Vo(3),every:Vo(4),find:Vo(5),findIndex:Vo(6),filterReject:Vo(7)},Uo=Hr.getWeakData,qo=an.set,Ho=an.getterFor,Xo=Bo.find,Ko=Bo.findIndex,Yo=X([].splice),$o=0,Jo=function(t){return t.frozen||(t.frozen=new Qo)},Qo=function(){this.entries=[]},Zo=function(t,e){return Xo(t.entries,(function(t){return t[0]===e}))};Qo.prototype={get:function(t){var e=Zo(this,t);if(e)return e[1]},has:function(t){return!!Zo(this,t)},set:function(t,e){var n=Zo(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ko(this.entries,(function(e){return e[0]===t}));return~e&&Yo(this.entries,e,1),!!~e}};var ti,ei={getConstructor:function(t,e,n,r){var o=t((function(t,o){co(t,i),qo(t,{type:e,id:$o++,frozen:null}),tt(o)||io(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ho(e),c=function(t,e,n){var r=u(t),o=Uo(Nt(e),!0);return!0===o?Jo(r).set(e,n):o[r.id]=n,t};return ho(i,{delete:function(t){var e=u(this);if(!Ft(t))return!1;var n=Uo(t);return!0===n?Jo(e).delete(t):n&&pt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!Ft(t))return!1;var n=Uo(t);return!0===n?Jo(e).has(t):n&&pt(n,e.id)}}),ho(i,n?{get:function(t){var e=u(this);if(Ft(t)){var n=Uo(t);if(!0===n)return Jo(e).get(t);if(n)return n[e.id]}},set:function(t,e){return c(this,t,e)}}:{add:function(t){return c(this,t,!0)}}),o}},ni=an.enforce,ri=Object,oi=Array.isArray,ii=ri.isExtensible,ui=ri.isFrozen,ci=ri.isSealed,ai=ri.freeze,fi=ri.seal,si=!it.ActiveXObject&&"ActiveXObject"in it,li=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},vi=vo("WeakMap",li,ei),pi=vi.prototype,hi=X(pi.set);if(Ze)if(si){ti=ei.getConstructor(li,"WeakMap",!0),Hr.enable();var yi=X(pi.delete),di=X(pi.has),gi=X(pi.get);ho(pi,{delete:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),yi(this,t)||e.frozen.delete(t)}return yi(this,t)},has:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),di(this,t)||e.frozen.has(t)}return di(this,t)},get:function(t){if(Ft(t)&&!ii(t)){var e=ni(this);return e.frozen||(e.frozen=new ti),di(this,t)?gi(this,t):e.frozen.get(t)}return gi(this,t)},set:function(t,e){if(Ft(t)&&!ii(t)){var n=ni(this);n.frozen||(n.frozen=new ti),di(this,t)?hi(this,t,e):n.frozen.set(t,e)}else hi(this,t,e);return this}})}else qr&&V((function(){var t=ai([]);return hi(new vi,t,1),!ui(t)}))&&ho(pi,{set:function(t,e){var n;return oi(t)&&(ui(t)?n=ai:ci(t)&&(n=fi)),hi(this,t,e),n&&n(t),this}});var bi,mi,wi={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Oi=Ut("span").classList,Si=Oi&&Oi.constructor&&Oi.constructor.prototype,ji=Si===Object.prototype?void 0:Si,Ei=Bo.forEach,xi=!!(mi=[]["forEach"])&&V((function(){mi.call(null,bi||function(){return 1},1)}))?[].forEach:function(t){return Ei(this,t,arguments.length>1?arguments[1]:void 0)},Ai=function(t){if(t&&t.forEach!==xi)try{en(t,"forEach",xi)}catch(e){t.forEach=xi}};for(var Pi in wi)wi[Pi]&&Ai(it[Pi]&&it[Pi].prototype);Ai(ji);var Ri=Lt("iterator"),Ti=mr.values,ki=function(t,e){if(t){if(t[Ri]!==Ti)try{en(t,Ri,Ti)}catch(e){t[Ri]=Ti}if(Jn(t,e,!0),wi[e])for(var n in mr)if(t[n]!==mr[n])try{en(t,n,mr[n])}catch(e){t[n]=mr[n]}}};for(var zi in wi)ki(it[zi]&&it[zi].prototype,zi);function Ii(){var t=b();return s.isCursorEditor(t)||console.warn("Cannot use useSyncExternalStore outside the context of a RemoteCursorEditor"),t}ki(ji,"DOMTokenList");var Li=new WeakMap;function Ci(t){var e=Li.get(t);if(e)return e;var n=function(t){var e={},n=new Set,r=n.add.bind(n),o=new Set,i=null;return[function(e){return o.add(e),i||(i=function(t){t.added.forEach(r),t.removed.forEach(r),t.updated.forEach(r),o.forEach((function(t){return t()}))},s.on(t,"change",i)),function(){o.delete(e),i&&0===o.size&&(s.off(t,"change",i),i=null)}},function(){return 0===n.size?e:(n.forEach((function(n){var r=s.cursorState(t,n);null!==r?e[n]=r:delete e[n.toString()]})),n.clear(),e=m({},e))}]}(t);return t&&Li.set(t,n),n}function Mi(){return Ci(Ii())}function Fi(){var t=w(Mi(),2),e=t[0],n=t[1];return z.useSyncExternalStore(e,n)}function _i(t,e){var n=w(Mi(),2),r=n[0],o=n[1];return W.useSyncExternalStoreWithSelector(r,o,null,t,e)}var Di=new WeakMap;function Ni(t,e){if(!e.relativeSelection)return null;var n=Di.get(t.children);n||(n=new WeakMap,Di.set(t.children,n));var r=n.get(e);if(void 0===r)try{r=l(t.sharedRoot,t,e.relativeSelection),n.set(e,r)}catch(t){return null}return r}var Gi=Lt("species"),Wi=Bo.map,Vi=function(t){return At>=51||!V((function(){var e=[];return(e.constructor={})[Gi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("map");Nn({target:"Array",proto:!0,forced:!Vi},{map:function(t){return Wi(this,t,arguments.length>1?arguments[1]:void 0)}});var Bi=X(ln.f),Ui=X([].push),qi=Gt&&V((function(){var t=Object.create(null);return t[2]=2,!Bi(t,2)})),Hi=function(t){return function(e){for(var n,r=rt(e),o=ke(r),i=qi&&null===Un(r),u=o.length,c=0,a=[];u>c;)n=o[c++],Gt&&!(i?n in r:Bi(r,n))||Ui(a,t?[n,r[n]]:r[n]);return a}},Xi={entries:Hi(!0),values:Hi(!1)}.entries;Nn({target:"Object",stat:!0},{entries:function(t){return Xi(t)}});var Ki=Hr.onFreeze,Yi=Object.freeze,$i=V((function(){Yi(1)}));Nn({target:"Object",stat:!0,forced:$i,sham:!qr},{freeze:function(t){return Yi&&Ft(t)?Yi(Ki(t)):t}});Nn({target:"Object",stat:!0},{fromEntries:function(t){var e={};return io(t,(function(t,n){var r,o,i;r=e,o=t,i=n,Gt?he.f(r,o,tn(0,i)):r[o]=i}),{AS_ENTRIES:!0}),e}});var Ji=V((function(){ke(1)}));function Qi(t,e,n){var r,o,i=n.yOffset,u=n.xOffset,c=n.shouldGenerateOverlay,a=w(v.edges(e),2),f=a[0],s=a[1],l=function(t,e){try{return d.toDOMRange(t,e)}catch(t){return null}}(t,e);if(!l)return{caretPosition:null,selectionRects:[]};var g=[],b=p.nodes(t,{at:e,match:function(t,e){return h.isText(t)&&(!c||c(t,e))}}),m=null,O=v.isBackward(e);try{for(var S=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),j=S.next();!j.done;j=S.next()){var E=w(j.value,2),x=E[0],A=E[1],P=d.toDOMNode(t,x),R=y.equals(A,f.path),T=y.equals(A,s.path),k=null;if(R||T){var z=document.createRange();z.selectNode(P),R&&z.setStart(l.startContainer,l.startOffset),T&&z.setEnd(l.endContainer,l.endOffset),k=z.getClientRects()}else k=P.getClientRects();for(var I=O?R:T,L=0;L<k.length;L++){var C=k.item(L);if(C){var M=I&&(O?0===L:L===k.length-1),F=C.top-i,_=C.left-u;M&&(m={height:C.height,top:F,left:_+(O||v.isCollapsed(e)?0:C.width)}),g.push({width:C.width,height:C.height,top:F,left:_})}}}}catch(t){r={error:t}}finally{try{j&&!j.done&&(o=S.return)&&o.call(S)}finally{if(r)throw r.error}}return{selectionRects:g,caretPosition:m}}Nn({target:"Object",stat:!0,forced:Ji},{keys:function(t){return ke(lt(t))}});var Zi=Object.freeze([]);function tu(t){var e;void 0===t&&(t={});var n,s,l,v=t.containerRef,p=t.shouldGenerateOverlay,h=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}(t,["containerRef","shouldGenerateOverlay"]),y=Ii(),d=Fi(),g=(n=w(r((function(t){return t+1}),0),2)[1],s=o(null),i(l=function(){s.current&&(cancelAnimationFrame(s.current),s.current=0)}),i((function(){return l}),[]),u((function(t){void 0===t&&(t=!1),t?n():s.current||(s.current=requestAnimationFrame(n))}),[])),b=o(new WeakMap),O=w(c({}),2),S=O[0],j=O[1],E=!("refreshOnResize"in h)||(null===(e=h.refreshOnResize)||void 0===e||e);!function(t,e){var n=o(e);n.current=e;var r=w(c((function(){return new ResizeObserver((function(){n.current()}))})),1)[0];i((function(){if(null==t?void 0:t.current){var e=t.current;return r.observe(e),function(){return r.unobserve(e)}}}),[r,t])}(E?v:void 0,(function(){b.current=new WeakMap,g("debounced"!==E)})),a((function(){var t,e,n;if(!v||v.current){var r=null===(t=null==v?void 0:v.current)||void 0===t?void 0:t.getBoundingClientRect(),o=null!==(e=null==r?void 0:r.x)&&void 0!==e?e:0,i=null!==(n=null==r?void 0:r.y)&&void 0!==n?n:0,u=Object.keys(S).length!==Object.keys(d).length,c=Object.fromEntries(Object.entries(d).map((function(t){var e=w(t,2),n=e[0],r=e[1],c=r.relativeSelection&&Ni(y,r);if(!c)return[n,Zi];var a=b.current.get(c);if(a)return[n,a];var f=Qi(y,c,{xOffset:o,yOffset:i,shouldGenerateOverlay:p});return u=!0,b.current.set(c,f),[n,f]})));u&&j(c)}}));var x=f((function(){return Object.entries(d).map((function(t){var e,n,r=w(t,2),o=r[0],i=r[1],u=i.relativeSelection&&Ni(y,i),c=S[o];return m(m({},i),{range:u,caretPosition:null!==(e=null==c?void 0:c.caretPosition)&&void 0!==e?e:null,selectionRects:null!==(n=null==c?void 0:c.selectionRects)&&void 0!==n?n:Zi})}))}),[d,y,S]);return[x,u((function(){b.current=new WeakMap,g(!0)}),[g])]}export{g as EditorContext,Ni as getCursorRange,b as useEditorStatic,tu as useRemoteCursorOverlayPositions,Fi as useRemoteCursorStates,_i as useRemoteCursorStatesSelector};
40
40
  //# sourceMappingURL=index.esm.js.map