import{d as CO,a1 as Zi,g as cf,a6 as iI,s as xO,C as oI,a2 as t6,I as Vo,H as aI,q as n6,D as uI,a0 as sI,af as r6,a3 as lI,N as i6,ag as cI}from"./index.4d061c66.js";const fI=CO({id:"pure-app",state:()=>{var e,t,n,r;return{sidebar:{opened:(t=(e=Zi.getItem("responsive-layout"))==null?void 0:e.sidebarStatus)!=null?t:cf().SidebarStatus,withoutAnimation:!1,isClickCollapse:!1},layout:(r=(n=Zi.getItem("responsive-layout"))==null?void 0:n.layout)!=null?r:cf().Layout,device:iI()?"mobile":"desktop"}},getters:{getSidebarStatus(){return this.sidebar.opened},getDevice(){return this.device}},actions:{TOGGLE_SIDEBAR(e,t){const n=Zi.getItem("responsive-layout");e&&t?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!0,n.sidebarStatus=!0):!e&&t?(this.sidebar.withoutAnimation=!0,this.sidebar.opened=!1,n.sidebarStatus=!1):!e&&!t&&(this.sidebar.withoutAnimation=!1,this.sidebar.opened=!this.sidebar.opened,this.sidebar.isClickCollapse=!this.sidebar.opened,n.sidebarStatus=this.sidebar.opened),Zi.setItem("responsive-layout",n)},async toggleSideBar(e,t){await this.TOGGLE_SIDEBAR(e,t)},toggleDevice(e){this.device=e},setLayout(e){this.layout=e}}});function dI(){return fI(xO)}var a1;if(typeof global>"u"){if("ActiveXObject"in window){var o6="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";o6+=` Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(o6)}a6(),u6()}else global&&((a1=global.navigator)===null||a1===void 0?void 0:a1.userAgent.match("QQBrowser"))&&(a6(),u6());function a6(){typeof globalThis>"u"&&(window.globalThis=window)}function u6(){typeof AggregateError>"u"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var pI=Object.getOwnPropertyDescriptor(global,"window");(!global.window||pI.set)&&(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function s6(e){return Object.prototype.toString.call(e)==="[object Object]"}function nn(e){var t,n;return s6(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(s6(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function qt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:aw(e)?2:uw(e)?3:0}function K2(e,t){return zs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hI(e,t){return zs(e)===2?e.get(t):e[t]}function AO(e,t,n){var r=zs(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function gI(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function aw(e){return bI&&e instanceof Map}function uw(e){return $I&&e instanceof Set}function na(e){return e.o||e.t}function sw(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=SI(e);delete t[Fn];for(var n=dw(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vI),Object.freeze(e),t&&ff(e,function(n,r){return lw(r,!0)},!0)),e}function vI(){qt(2)}function cw(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function di(e){var t=DI[e];return t||qt(18,e),t}function l6(){return ps||qt(0),ps}function u1(e,t){t&&(di("Patches"),e.u=[],e.s=[],e.v=t)}function Oh(e){Y2(e),e.p.forEach(mI),e.p=null}function Y2(e){e===ps&&(ps=e.l)}function c6(e){return ps={p:[],l:ps,h:e,m:!0,_:0}}function mI(e){var t=e[Fn];t.i===0||t.i===1?t.j():t.O=!0}function s1(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||di("ES5").S(t,e,r),r?(n[Fn].P&&(Oh(t),qt(4)),Ia(e)&&(e=Bh(t,e),t.l||Fh(t,e)),t.u&&di("Patches").M(n[Fn],e,t.u,t.s)):e=Bh(t,n,[]),Oh(t),t.u&&t.v(t.u,t.s),e!==OO?e:void 0}function Bh(e,t,n){if(cw(t))return t;var r=t[Fn];if(!r)return ff(t,function(o,a){return f6(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Fh(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=sw(r.k):r.o;ff(r.i===3?new Set(i):i,function(o,a){return f6(e,r,i,o,a,n)}),Fh(e,i,!1),n&&e.u&&di("Patches").R(r,n,e.u,e.s)}return r.o}function f6(e,t,n,r,i,o){if(i===n&&qt(5),Na(i)){var a=Bh(e,i,o&&t&&t.i!==3&&!K2(t.D,r)?o.concat(r):void 0);if(AO(n,r,a),!Na(a))return;e.m=!1}if(Ia(i)&&!cw(i)){if(!e.h.F&&e._<1)return;Bh(e,i),t&&t.A.l||Fh(e,i)}}function Fh(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&lw(t,n)}function l1(e,t){var n=e[Fn];return(n?na(n):e)[t]}function d6(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function X2(e){e.P||(e.P=!0,e.l&&X2(e.l))}function c1(e){e.o||(e.o=sw(e.t))}function J2(e,t,n){var r=aw(t)?di("MapSet").N(t,n):uw(t)?di("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:l6(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=eh;a&&(s=[u],l=th);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):di("ES5").J(t,n);return(n?n.A:l6()).p.push(r),r}function yI(e){return Na(e)||qt(22,e),function t(n){if(!Ia(n))return n;var r,i=n[Fn],o=zs(n);if(i){if(!i.P&&(i.i<4||!di("ES5").K(i)))return i.t;i.I=!0,r=p6(n,o),i.I=!1}else r=p6(n,o);return ff(r,function(a,u){i&&hI(i.t,a)===u||AO(r,a,t(u))}),o===3?new Set(r):r}(e)}function p6(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return sw(e)}var h6,ps,fw=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",bI=typeof Map<"u",$I=typeof Set<"u",g6=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",OO=fw?Symbol.for("immer-nothing"):((h6={})["immer-nothing"]=!0,h6),v6=fw?Symbol.for("immer-draftable"):"__$immer_draftable",Fn=fw?Symbol.for("immer-state"):"__$immer_state",wI={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(e){return"Cannot apply patch, path doesn't resolve: "+e},16:'Sets cannot have "replace" patches.',17:function(e){return"Unsupported patch operation: "+e},18:function(e){return"The plugin for '"+e+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+e+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(e){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+e+"'"},22:function(e){return"'current' expects a draft, got: "+e},23:function(e){return"'original' expects a draft, got: "+e},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},EI=""+Object.prototype.constructor,dw=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,SI=Object.getOwnPropertyDescriptors||function(e){var t={};return dw(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},DI={},eh={get:function(e,t){if(t===Fn)return e;var n=na(e);if(!K2(n,t))return function(i,o,a){var u,s=d6(o,a);return s?"value"in s?s.value:(u=s.get)===null||u===void 0?void 0:u.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Ia(r)?r:r===l1(e.t,t)?(c1(e),e.o[t]=J2(e.A.h,r,e)):r},has:function(e,t){return t in na(e)},ownKeys:function(e){return Reflect.ownKeys(na(e))},set:function(e,t,n){var r=d6(na(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=l1(na(e),t),o=i==null?void 0:i[Fn];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(gI(n,i)&&(n!==void 0||K2(e.t,t)))return!0;c1(e),X2(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return l1(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,c1(e),X2(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=na(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){qt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){qt(12)}},th={};ff(eh,function(e,t){th[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),th.deleteProperty=function(e,t){return isNaN(parseInt(t))&&qt(13),eh.deleteProperty.call(this,e[0],t)},th.set=function(e,t,n){return t!=="length"&&isNaN(parseInt(t))&&qt(14),eh.set.call(this,e[0],t,n,e[0])};var CI=function(){function e(n){var r=this;this.g=g6,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var u=o;o=i;var s=r;return function(p){var m=this;p===void 0&&(p=u);for(var v=arguments.length,g=Array(v>1?v-1:0),y=1;y1?l-1:0),f=1;f=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=di("Patches").$;return Na(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},e}(),Tn=new CI,v0=Tn.produce;Tn.produceWithPatches.bind(Tn);Tn.setAutoFreeze.bind(Tn);Tn.setUseProxies.bind(Tn);Tn.applyPatches.bind(Tn);var m6=Tn.createDraft.bind(Tn),y6=Tn.finishDraft.bind(Tn);function Yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Th=new WeakMap,vl=new WeakMap,b6=new WeakMap,$6=new WeakMap,w6=new WeakMap,E6=new WeakMap;function S6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of E.pathRefs(e))rj.transform(n,t);for(var r of E.pointRefs(e))ij.transform(r,t);for(var i of E.rangeRefs(e))uj.transform(i,t);var o=new Set,a=[],u=p=>{if(p){var m=p.join(",");o.has(m)||(o.add(m),a.push(p))}},s=Th.get(e)||[],l=AI(t);for(var c of s){var f=P.transform(c,t);u(f)}for(var d of l)u(d);Th.set(e,a),N.transform(e,t),e.operations.push(t),E.normalize(e),t.type==="set_selection"&&(e.marks=null),vl.get(e)||(vl.set(e,!0),Promise.resolve().then(()=>{vl.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(R.isExpanded(r))N.setNodes(e,{[t]:n},{match:Z.isText,split:!0});else{var i=Jd(Jd({},E.marks(e)||{}),{},{[t]:n});e.marks=i,vl.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&N.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&R.isCollapsed(n)&&N.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&R.isExpanded(n)&&N.delete(e,{reverse:t==="backward"})},getFragment:()=>{var{selection:t}=e;return t?q.fragment(e,t):[]},insertBreak:()=>{N.splitNodes(e,{always:!0})},insertFragment:t=>{N.insertFragment(e,t)},insertNode:t=>{N.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var i=Jd({text:t},r);N.insertNodes(e,i)}else N.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!Z.isText(n)){if(te.isElement(n)&&n.children.length===0){var i={text:""};N.insertNodes(e,i,{at:r.concat(0),voids:!0});return}for(var o=E.isEditor(n)?!1:te.isElement(n)&&(e.isInline(n)||n.children.length===0||Z.isText(n.children[0])||e.isInline(n.children[0])),a=0,u=0;u{var{selection:n}=e;if(n)if(R.isExpanded(n))N.unsetNodes(e,t,{match:Z.isText,split:!0});else{var r=Jd({},E.marks(e)||{});delete r[t],e.marks=r,vl.get(e)||e.onChange()}}};return e},AI=e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":{var{path:t}=e;return P.levels(t)}case"insert_node":{var{node:n,path:r}=e,i=P.levels(r),o=Z.isText(n)?[]:Array.from(q.nodes(n),j=>{var[,H]=j;return r.concat(H)});return[...i,...o]}case"merge_node":{var{path:a}=e,u=P.ancestors(a),s=P.previous(a);return[...u,s]}case"move_node":{var{path:l,newPath:c}=e;if(P.equals(l,c))return[];var f=[],d=[];for(var p of P.ancestors(l)){var m=P.transform(p,e);f.push(m)}for(var v of P.ancestors(c)){var g=P.transform(v,e);d.push(g)}var y=d[d.length-1],h=c[c.length-1],$=y.concat(h);return[...f,...d,$]}case"remove_node":{var{path:w}=e,S=P.ancestors(w);return[...S]}case"split_node":{var{path:D}=e,x=P.levels(D),_=P.next(D);return[...x,_]}default:return[]}};function OI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function mi(e,t){if(e==null)return{};var n=OI(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var pw=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?_I(t):t,o=ge.None,a=ge.None,u=0,s=null,l=null;for(var c of i){var f=c.codePointAt(0);if(!f)break;var d=GI(c,f);if([o,a]=r?[a,d]:[d,o],Yu(o,ge.ZWJ)&&Yu(a,ge.ExtPict)&&(r?s=D6(t.substring(0,u)):s=D6(t.substring(0,t.length-u)),!s)||Yu(o,ge.RI)&&Yu(a,ge.RI)&&(l!==null?l=!l:r?l=!0:l=JI(t.substring(0,t.length-u)),!l)||o!==ge.None&&a!==ge.None&&KI(o,a))break;u+=c.length}return u||1},BI=/\s/,FI=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,TI=/['\u2018\u2019]/,kI=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;t.length>0;){var o=pw(t,n),[a,u]=hw(t,o,n);if(PI(a,u,n))i=!0,r+=o;else if(!i)r+=o;else break;t=u}return r},hw=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},PI=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(BI.test(t))return!1;if(TI.test(t)){var i=pw(n,r),[o,a]=hw(n,i,r);if(e(o,a,r))return!0}return!FI.test(t)},_I=function*(t){for(var n=t.length-1,r=0;re>=55296&&e<=56319,II=e=>e>=56320&&e<=57343,ge;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(ge||(ge={}));var jI=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,RI=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,LI=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,MI=/^[\u1100-\u115F\uA960-\uA97C]$/,zI=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,HI=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,UI=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,VI=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,WI=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,GI=(e,t)=>{var n=ge.Any;return e.search(jI)!==-1&&(n|=ge.Extend),t===8205&&(n|=ge.ZWJ),t>=127462&&t<=127487&&(n|=ge.RI),e.search(RI)!==-1&&(n|=ge.Prepend),e.search(LI)!==-1&&(n|=ge.SpacingMark),e.search(MI)!==-1&&(n|=ge.L),e.search(zI)!==-1&&(n|=ge.V),e.search(HI)!==-1&&(n|=ge.T),e.search(UI)!==-1&&(n|=ge.LV),e.search(VI)!==-1&&(n|=ge.LVT),e.search(WI)!==-1&&(n|=ge.ExtPict),n};function Yu(e,t){return(e&t)!==0}var qI=[[ge.L,ge.L|ge.V|ge.LV|ge.LVT],[ge.LV|ge.V,ge.V|ge.T],[ge.LVT|ge.T,ge.T],[ge.Any,ge.Extend|ge.ZWJ],[ge.Any,ge.SpacingMark],[ge.Prepend,ge.Any],[ge.ZWJ,ge.ExtPict],[ge.RI,ge.RI]];function KI(e,t){return qI.findIndex(n=>Yu(e,n[0])&&Yu(t,n[1]))===-1}var YI=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,D6=e=>e.search(YI)!==-1,XI=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,JI=e=>{var t=e.match(XI);if(t===null)return!1;var n=t[0].length/2;return n%2===1},C6=e=>nn(e)&&q.isNodeList(e.children)&&!E.isEditor(e),te={isAncestor(e){return nn(e)&&q.isNodeList(e.children)},isElement:C6,isElementList(e){return Array.isArray(e)&&e.every(t=>te.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return C6(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},ZI=["text"],QI=["text"];function x6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pu(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:i=e.selection,match:o}=t;if(!!i){var a=E.path(e,i),u=r==="lowest";for(var[s,l]of E.levels(e,{at:a,voids:n,match:o,reverse:u}))if(!Z.isText(s)&&!P.equals(a,l))return[s,l]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.point(e,t,{edge:"end"}),i=E.end(e,[]),o={anchor:r,focus:i},{distance:a=1}=n,u=0,s;for(var l of E.positions(e,pu(pu({},n),{},{at:o}))){if(u>a)break;u!==0&&(s=l),u++}return s},before(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.start(e,[]),i=E.point(e,t,{edge:"start"}),o={anchor:r,focus:i},{distance:a=1}=n,u=0,s;for(var l of E.positions(e,pu(pu({},n),{},{at:o,reverse:!0}))){if(u>a)break;u!==0&&(s=l),u++}return s},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges(e,t){return[E.start(e,t),E.end(e,t)]},end(e,t){return E.point(e,t,{edge:"end"})},first(e,t){var n=E.path(e,t,{edge:"start"});return E.node(e,n)},fragment(e,t){var n=E.range(e,t),r=q.fragment(e,n);return r},hasBlocks(e,t){return t.children.some(n=>E.isBlock(e,n))},hasInlines(e,t){return t.children.some(n=>Z.isText(n)||E.isInline(e,n))},hasTexts(e,t){return t.children.every(n=>Z.isText(n))},insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock(e,t){return te.isElement(t)&&!e.isInline(t)},isEditor(e){if(!nn(e))return!1;var t=A6.get(e);if(t!==void 0)return t;var n=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteBackward=="function"&&typeof e.deleteForward=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isInline=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&(e.marks===null||nn(e.marks))&&(e.selection===null||R.isRange(e.selection))&&q.isNodeList(e.children)&&Qi.isOperationList(e.operations);return A6.set(e,n),n},isEnd(e,t,n){var r=E.end(e,n);return we.equals(t,r)},isEdge(e,t,n){return E.isStart(e,t,n)||E.isEnd(e,t,n)},isEmpty(e,t){var{children:n}=t,[r]=n;return n.length===0||n.length===1&&Z.isText(r)&&r.text===""&&!e.isVoid(t)},isInline(e,t){return te.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=b6.get(e);return t===void 0?!0:t},isStart(e,t,n){if(t.offset!==0)return!1;var r=E.start(e,n);return we.equals(t,r)},isVoid(e,t){return te.isElement(t)&&e.isVoid(t)},last(e,t){var n=E.path(e,t,{edge:"end"});return E.node(e,n)},leaf(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=q.leaf(e,r);return[i,r]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!n){var a=[],u=E.path(e,n);for(var[s,l]of q.levels(e,u))if(!!o(s,l)&&(a.push([s,l]),!i&&E.isVoid(e,s)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(R.isExpanded(n)){var[r]=E.nodes(e,{match:Z.isText});if(r){var[i]=r,o=mi(i,ZI);return o}else return{}}var{anchor:a}=n,{path:u}=a,[s]=E.leaf(e,u);if(a.offset===0){var l=E.previous(e,{at:u,match:Z.isText}),c=E.above(e,{match:v=>E.isBlock(e,v)});if(l&&c){var[f,d]=l,[,p]=c;P.isAncestor(p,d)&&(s=f)}}var m=mi(s,QI);return m},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.after(e,o,{voids:r});if(!!a){var[,u]=E.last(e,[]),s=[a.path,u];if(P.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(P.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{at:s,match:i,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=q.get(e,r);return[i,r]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:u}=t;if(u||(u=()=>!0),!!n){var s,l;if(ej.isSpan(n))s=n[0],l=n[1];else{var c=E.path(e,n,{edge:"start"}),f=E.path(e,n,{edge:"end"});s=o?f:c,l=o?c:f}var d=q.nodes(e,{reverse:o,from:s,to:l,pass:$=>{var[w]=$;return a?!1:E.isVoid(e,w)}}),p=[],m;for(var[v,g]of d){var y=m&&P.compare(g,m[1])===0;if(!(r==="highest"&&y)){if(!u(v,g)){if(i&&!y&&Z.isText(v))return;continue}if(r==="lowest"&&y){m=[v,g];continue}var h=r==="lowest"?m:[v,g];h&&(i?p.push(h):yield h),m=[v,g]}}r==="lowest"&&m&&(i?p.push(m):yield m),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:n=!1}=t,r=o=>Th.get(o)||[];if(!!E.isNormalizing(e)){if(n){var i=Array.from(q.nodes(e),o=>{var[,a]=o;return a});Th.set(e,i)}r(e).length!==0&&E.withoutNormalizing(e,()=>{for(var o of r(e))if(q.has(e,o)){var a=E.node(e,o),[u,s]=a;te.isElement(u)&&u.children.length===0&&e.normalizeNode(a)}for(var l=r(e).length*42,c=0;r(e).length!==0;){if(c>l)throw new Error(` Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state. `));var f=r(e).pop();if(q.has(e,f)){var d=E.node(e,f);e.normalizeNode(d)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=P.parent(r),o=E.node(e,i);return o},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(P.isPath(t)){if(i==="start"){var[,o]=q.first(e,t);t=o}else if(i==="end"){var[,a]=q.last(e,t);t=a}}return R.isRange(t)&&(i==="start"?t=R.start(t):i==="end"?t=R.end(t):t=P.common(t.anchor.path,t.focus.path)),we.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return q.has(e,t)},pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pathRefs(e);return u.delete(i),i.current=null,a}},o=E.pathRefs(e);return o.add(i),i},pathRefs(e){var t=$6.get(e);return t||(t=new Set,$6.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(P.isPath(t)){var i;if(r==="end"){var[,o]=q.last(e,t);i=o}else{var[,a]=q.first(e,t);i=a}var u=q.get(e,i);if(!Z.isText(u))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:i,offset:r==="end"?u.text.length:0}}if(R.isRange(t)){var[s,l]=R.edges(t);return r==="start"?s:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pointRefs(e);return u.delete(i),i.current=null,a}},o=E.pointRefs(e);return o.add(i),i},pointRefs(e){var t=w6.get(e);return t||(t=new Set,w6.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(!n)return;var a=E.range(e,n),[u,s]=R.edges(a),l=i?s:u,c=!1,f="",d=0,p=0,m=0;for(var[v,g]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(v)){if(!o&&e.isVoid(v)){yield E.start(e,g);continue}if(e.isInline(v))continue;if(E.hasInlines(e,v)){var y=P.isAncestor(g,s.path)?s:E.end(e,g),h=P.isAncestor(g,u.path)?u:E.start(e,g);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(Z.isText(v)){var $=P.equals(g,l.path);for($?(p=i?l.offset:v.text.length-l.offset,m=l.offset):(p=v.text.length,m=i?p:0),($||c||r==="offset")&&(yield{path:g,offset:m},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=hw(f,d,i)[1]}if(m=i?m-d:m+d,p=p-d,p<0){d=-p;break}d=0,yield{path:g,offset:m}}}}function w(S,D,x){return D==="character"?pw(S,x):D==="word"?kI(S,x):D==="line"||D==="block"?S.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.before(e,o,{voids:r});if(!!a){var[,u]=E.first(e,[]),s=[a.path,u];if(P.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(P.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return c}}},range(e,t,n){if(R.isRange(t)&&!n)return t;var r=E.start(e,t),i=E.end(e,n||t);return{anchor:r,focus:i}},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.rangeRefs(e);return u.delete(i),i.current=null,a}},o=E.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=E6.get(e);return t||(t=new Set,E6.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){b6.set(e,t)},start(e,t){return E.point(e,t,{edge:"start"})},string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=E.range(e,t),[o,a]=R.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:Z.isText,voids:r})){var c=s.text;P.equals(l,a.path)&&(c=c.slice(0,a.offset)),P.equals(l,o.path)&&(c=c.slice(o.offset)),u+=c}return u},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,o]=R.edges(t);if(i.offset!==0||o.offset!==0||R.isCollapsed(t))return t;var a=E.above(e,{at:o,match:p=>E.isBlock(e,p)}),u=a?a[1]:[],s=E.start(e,[]),l={anchor:s,focus:o},c=!0;for(var[f,d]of E.nodes(e,{at:l,match:Z.isText,reverse:!0,voids:r})){if(c){c=!1;continue}if(f.text!==""||P.isBefore(d,u)){o={path:d,offset:f.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return E.above(e,pu(pu({},t),{},{match:n=>E.isVoid(e,n)}))},withoutNormalizing(e,t){var n=E.isNormalizing(e);E.setNormalizing(e,!1);try{t()}finally{E.setNormalizing(e,n)}E.normalize(e)}},ej={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(P.isPath)}},tj=["children"],nj=["text"],O6=new WeakMap,q={ancestor(e,t){var n=q.get(e,t);if(Z.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of P.ancestors(t,n)){var i=q.ancestor(e,r),o=[i,r];yield o}},child(e,t){if(Z.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(n==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:r=!1}=n,i=q.ancestor(e,t),{children:o}=i,a=r?o.length-1:0;r?a>=0:a1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of q.nodes(e,t))r.length!==0&&(yield[n,r])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of q.nodes(e,t))te.isElement(n)&&(yield[n,r])},extractProps(e){if(te.isAncestor(e)){var t=mi(e,tj);return t}else{var t=mi(e,nj);return t}},first(e,t){for(var n=t.slice(),r=q.get(e,n);r&&!(Z.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(Z.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=v0({children:e.children},r=>{var[i,o]=R.edges(t),a=q.nodes(r,{reverse:!0,pass:d=>{var[,p]=d;return!R.includes(t,p)}});for(var[,u]of a){if(!R.includes(t,u)){var s=q.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(P.equals(u,o.path)){var c=q.leaf(r,u);c.text=c.text.slice(0,o.offset)}if(P.equals(u,i.path)){var f=q.leaf(r,u);f.text=f.text.slice(i.offset)}}E.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;rq.isNode(r));return O6.set(e,n),n},last(e,t){for(var n=t.slice(),r=q.get(e,n);r&&!(Z.isText(r)||r.children.length===0);){var i=r.children.length-1;r=r.children[i],n.push(i)}return[r,n]},leaf(e,t){var n=q.get(e,t);if(!Z.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var r of P.levels(t,n)){var i=q.get(e,r);yield[i,r]}},matches(e,t){return te.isElement(e)&&te.isElementProps(t)&&te.matches(e,t)||Z.isText(e)&&Z.isTextProps(t)&&Z.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:i=[],to:o}=t,a=new Set,u=[],s=e;!(o&&(r?P.isBefore(u,o):P.isAfter(u,o)));){if(a.has(s)||(yield[s,u]),!a.has(s)&&!Z.isText(s)&&s.children.length!==0&&(n==null||n([s,u])===!1)){a.add(s);var l=r?s.children.length-1:0;P.isAncestor(u,i)&&(l=i[u.length]),u=u.concat(l),s=q.get(e,u);continue}if(u.length===0)break;if(!r){var c=P.next(u);if(q.has(e,c)){u=c,s=q.get(e,u);continue}}if(r&&u[u.length-1]!==0){var f=P.previous(u);u=f,s=q.get(e,u);continue}u=P.parent(u),s=q.get(e,u),a.add(s)}},parent(e,t){var n=P.parent(t),r=q.get(e,n);if(Z.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string(e){return Z.isText(e)?e.text:e.children.map(q.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of q.nodes(e,t))Z.isText(n)&&(yield[n,r])}};function B6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nt(e){for(var t=1;tQi.isOperation(t))},isSelectionOperation(e){return Qi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Qi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return nt(nt({},e),{},{type:"remove_node"});case"insert_text":return nt(nt({},e),{},{type:"remove_text"});case"merge_node":return nt(nt({},e),{},{type:"split_node",path:P.previous(e.path)});case"move_node":{var{newPath:t,path:n}=e;if(P.equals(t,n))return e;if(P.isSibling(n,t))return nt(nt({},e),{},{path:t,newPath:n});var r=P.transform(n,e),i=P.transform(P.next(n),e);return nt(nt({},e),{},{path:r,newPath:i})}case"remove_node":return nt(nt({},e),{},{type:"insert_node"});case"remove_text":return nt(nt({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return nt(nt({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:u,newProperties:s}=e;return u==null?nt(nt({},e),{},{properties:s,newProperties:null}):s==null?nt(nt({},e),{},{properties:null,newProperties:u}):nt(nt({},e),{},{properties:s,newProperties:u})}case"split_node":return nt(nt({},e),{},{type:"merge_node",path:P.next(e.path)})}}},P={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=P.levels(e,t);return n?r=r.slice(1):r=r.slice(0,-1),r},common(e,t){for(var n=[],r=0;rt[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return P.equals(r,i)&&o>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),i=t.slice(0,n);return P.equals(r,i)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),i=t.slice(0,n),o=e[n],a=t[n];return P.equals(r,i)&&on===t[r])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return P.compare(e,t)===1},isAncestor(e,t){return e.lengtht.length&&P.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&P.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1),i=e[e.length-1],o=t[t.length-1];return i!==o&&P.equals(n,r)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,r=[],i=0;i<=e.length;i++)r.push(e.slice(0,i));return n&&r.reverse(),r},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!P.isAncestor(t,e)&&!P.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return v0(e,r=>{var{affinity:i="forward"}=n;if(!(!e||(e==null?void 0:e.length)===0)){if(r===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(P.equals(o,r)||P.endsBefore(o,r)||P.isAncestor(o,r))&&(r[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(P.equals(a,r)||P.isAncestor(a,r))return null;P.endsBefore(a,r)&&(r[a.length-1]-=1);break}case"merge_node":{var{path:u,position:s}=t;P.equals(u,r)||P.endsBefore(u,r)?r[u.length-1]-=1:P.isAncestor(u,r)&&(r[u.length-1]-=1,r[u.length]+=s);break}case"split_node":{var{path:l,position:c}=t;if(P.equals(l,r)){if(i==="forward")r[r.length-1]+=1;else if(i!=="backward")return null}else P.endsBefore(l,r)?r[l.length-1]+=1:P.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break}case"move_node":{var{path:f,newPath:d}=t;if(P.equals(f,d))return;if(P.isAncestor(f,r)||P.equals(f,r)){var p=d.slice();return P.endsBefore(f,d)&&f.lengtht.offset?1:0:n},isAfter(e,t){return we.compare(e,t)===1},isBefore(e,t){return we.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&P.equals(e.path,t.path)},isPoint(e){return nn(e)&&typeof e.offset=="number"&&P.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return v0(e,r=>{if(r===null)return null;var{affinity:i="forward"}=n,{path:o,offset:a}=r;switch(t.type){case"insert_node":case"move_node":{r.path=P.transform(o,t,n);break}case"insert_text":{P.equals(t.path,o)&&t.offset<=a&&(r.offset+=t.text.length);break}case"merge_node":{P.equals(t.path,o)&&(r.offset+=t.position),r.path=P.transform(o,t,n);break}case"remove_text":{P.equals(t.path,o)&&t.offset<=a&&(r.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(P.equals(t.path,o)||P.isAncestor(t.path,o))return null;r.path=P.transform(o,t,n);break}case"split_node":{if(P.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.position1&&arguments[1]!==void 0?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:i}=e;return R.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=R.edges(e);return t},equals(e,t){return we.equals(e.anchor,t.anchor)&&we.equals(e.focus,t.focus)},includes(e,t){if(R.isRange(t)){if(R.includes(e,t.anchor)||R.includes(e,t.focus))return!0;var[n,r]=R.edges(e),[i,o]=R.edges(t);return we.isBefore(n,i)&&we.isAfter(r,o)}var[a,u]=R.edges(e),s=!1,l=!1;return we.isPoint(t)?(s=we.compare(t,a)>=0,l=we.compare(t,u)<=0):(s=P.compare(t,a.path)>=0,l=P.compare(t,u.path)<=0),s&&l},intersection(e,t){var n=mi(e,oj),[r,i]=R.edges(e),[o,a]=R.edges(t),u=we.isBefore(r,o)?o:r,s=we.isBefore(i,a)?i:a;return we.isBefore(s,u)?null:aj({anchor:u,focus:s},n)},isBackward(e){var{anchor:t,focus:n}=e;return we.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return we.equals(t,n)},isExpanded(e){return!R.isCollapsed(e)},isForward(e){return!R.isBackward(e)},isRange(e){return nn(e)&&we.isPoint(e.anchor)&&we.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=R.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return v0(e,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,a;if(i==="inward"){var u=R.isCollapsed(r);R.isForward(r)?(o="forward",a=u?o:"backward"):(o="backward",a=u?o:"forward")}else i==="outward"?R.isForward(r)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var s=we.transform(r.anchor,t,{affinity:o}),l=we.transform(r.focus,t,{affinity:a});if(!s||!l)return null;r.anchor=s,r.focus=l})}},uj={transform(e,t){var{current:n,affinity:r}=e;if(n!=null){var i=R.transform(n,t,{affinity:r});e.current=i,i==null&&e.unref()}}},BO=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(nn(r)&&nn(i)){if(!BO(r,i))return!1}else if(Array.isArray(r)&&Array.isArray(i)){if(r.length!==i.length)return!1;for(var o=0;o2&&arguments[2]!==void 0?arguments[2]:{},{loose:r=!1}=n;function i(o){var a=mi(o,sj);return a}return BO(r?i(e):e,r?i(t):t)},isText(e){return nn(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>Z.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var n in t)if(n!=="text"&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[ri({},e)];for(var r of t){var i=mi(r,lj),[o,a]=R.edges(r),u=[],s=0;for(var l of n){var{length:c}=l.text,f=s;if(s+=c,o.offset<=f&&a.offset>=s){Object.assign(l,i),u.push(l);continue}if(o.offset!==a.offset&&(o.offset===s||a.offset===f)||o.offset>s||a.offsetf){var g=o.offset-f;p=ri(ri({},d),{},{text:d.text.slice(0,g)}),d=ri(ri({},d),{},{text:d.text.slice(g)})}Object.assign(d,i),p&&u.push(p),u.push(d),m&&u.push(m)}n=u}return n}};function _6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ml(e){for(var t=1;t{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=q.parent(e,r),a=r[r.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[u,s]of R.points(t))t[s]=we.transform(u,n);break}case"insert_text":{var{path:l,offset:c,text:f}=n;if(f.length===0)break;var d=q.leaf(e,l),p=d.text.slice(0,c),m=d.text.slice(c);if(d.text=p+f+m,t)for(var[v,g]of R.points(t))t[g]=we.transform(v,n);break}case"merge_node":{var{path:y}=n,h=q.get(e,y),$=P.previous(y),w=q.get(e,$),S=q.parent(e,y),D=y[y.length-1];if(Z.isText(h)&&Z.isText(w))w.text+=h.text;else if(!Z.isText(h)&&!Z.isText(w))w.children.push(...h.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(y,"] to nodes of different interfaces: ").concat(h," ").concat(w));if(S.children.splice(D,1),t)for(var[x,_]of R.points(t))t[_]=we.transform(x,n);break}case"move_node":{var{path:j,newPath:H}=n;if(P.isAncestor(j,H))throw new Error("Cannot move a path [".concat(j,"] to new path [").concat(H,"] because the destination is inside itself."));var W=q.get(e,j),G=q.parent(e,j),J=j[j.length-1];G.children.splice(J,1);var ne=P.transform(j,n),Q=q.get(e,P.parent(ne)),ue=ne[ne.length-1];if(Q.children.splice(ue,0,W),t)for(var[pe,_e]of R.points(t))t[_e]=we.transform(pe,n);break}case"remove_node":{var{path:me}=n,oe=me[me.length-1],Ie=q.parent(e,me);if(Ie.children.splice(oe,1),t)for(var[T,F]of R.points(t)){var k=we.transform(T,n);if(t!=null&&k!=null)t[F]=k;else{var I=void 0,U=void 0;for(var[L,ee]of q.texts(e))if(P.compare(ee,me)===-1)I=[L,ee];else{U=[L,ee];break}var ce=!1;I&&U&&(P.equals(U[1],me)?ce=!P.hasPrevious(U[1]):ce=P.common(I[1],me).length2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1,mode:o="lowest"}=n,{at:a,match:u,select:s}=n;if(q.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=E.end(e,[]):a=[0],s=!0),s==null&&(s=!1),R.isRange(a))if(r||(a=E.unhangRange(e,a)),R.isCollapsed(a))a=a.anchor;else{var[,c]=R.edges(a),f=E.pointRef(e,c);N.delete(e,{at:a}),a=f.unref()}if(we.isPoint(a)){u==null&&(Z.isText(l)?u=D=>Z.isText(D):e.isInline(l)?u=D=>Z.isText(D)||E.isInline(e,D):u=D=>E.isBlock(e,D));var[d]=E.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(d){var[,p]=d,m=E.pathRef(e,p),v=E.isEnd(e,a,p);N.splitNodes(e,{at:a,match:u,mode:o,voids:i});var g=m.unref();a=v?P.next(g):g}else return}var y=P.parent(a),h=a[a.length-1];if(!(!i&&E.void(e,{at:y}))){for(var $ of t){var w=y.concat(h);h++,e.apply({type:"insert_node",path:w,node:$}),a=P.next(a)}if(a=P.previous(a),s){var S=E.end(e,a);S&&N.select(e,S)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=P.isPath(n)?hu(e,n):$=>E.isBlock(e,$)),!!n){var a=E.nodes(e,{at:n,match:o,mode:r,voids:i}),u=Array.from(a,$=>{var[,w]=$;return E.pathRef(e,w)});for(var s of u){var l=s.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=E.node(e,P.parent(l)),[f,d]=c,p=l[l.length-1],{length:m}=f.children;if(m===1){var v=P.next(d);N.moveNodes(e,{at:l,to:v,voids:i}),N.removeNodes(e,{at:d,voids:i})}else if(p===0)N.moveNodes(e,{at:l,to:d,voids:i});else if(p===m-1){var g=P.next(d);N.moveNodes(e,{at:l,to:g,voids:i})}else{var y=P.next(l),h=P.next(d);N.splitNodes(e,{at:y,voids:i}),N.moveNodes(e,{at:l,to:h,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(!!r){if(n==null)if(P.isPath(r)){var[u]=E.parent(e,r);n=j=>u.children.includes(j)}else n=j=>E.isBlock(e,j);if(!i&&R.isRange(r)&&(r=E.unhangRange(e,r)),R.isRange(r))if(R.isCollapsed(r))r=r.anchor;else{var[,s]=R.edges(r),l=E.pointRef(e,s);N.delete(e,{at:r}),r=l.unref(),t.at==null&&N.select(e,r)}var[c]=E.nodes(e,{at:r,match:n,voids:o,mode:a}),f=E.previous(e,{at:r,match:n,voids:o,mode:a});if(!(!c||!f)){var[d,p]=c,[m,v]=f;if(!(p.length===0||v.length===0)){var g=P.next(v),y=P.common(p,v),h=P.isSibling(p,v),$=Array.from(E.levels(e,{at:p}),j=>{var[H]=j;return H}).slice(y.length).slice(0,-1),w=E.above(e,{at:p,mode:"highest",match:j=>$.includes(j)&&FO(e,j)}),S=w&&E.pathRef(e,w[1]),D,x;if(Z.isText(d)&&Z.isText(m)){var _=mi(d,dj);x=m.text.length,D=_}else if(te.isElement(d)&&te.isElement(m)){var _=mi(d,pj);x=m.children.length,D=_}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(m)));h||N.moveNodes(e,{at:p,to:g,voids:o}),S&&N.removeNodes(e,{at:S.current,voids:o}),te.isElement(m)&&E.isEmpty(e,m)||Z.isText(m)&&m.text===""&&v[v.length-1]!==0?N.removeNodes(e,{at:v,voids:o}):e.apply({type:"merge_node",path:g,position:x,properties:D}),S&&S.unref()}}}})},moveNodes(e,t){E.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(!!r){a==null&&(a=P.isPath(r)?hu(e,r):p=>E.isBlock(e,p));var u=E.pathRef(e,n),s=E.nodes(e,{at:r,match:a,mode:i,voids:o}),l=Array.from(s,p=>{var[,m]=p;return E.pathRef(e,m)});for(var c of l){var f=c.unref(),d=u.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:d}),u.current&&P.isSibling(d,f)&&P.isAfter(d,f)&&(u.current=P.next(u.current))}u.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(!!o){a==null&&(a=P.isPath(o)?hu(e,o):d=>E.isBlock(e,d)),!n&&R.isRange(o)&&(o=E.unhangRange(e,o));var u=E.nodes(e,{at:o,match:a,mode:i,voids:r}),s=Array.from(u,d=>{var[,p]=d;return E.pathRef(e,p)});for(var l of s){var c=l.unref();if(c){var[f]=E.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},setNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{match:r,at:i=e.selection}=n,{hanging:o=!1,mode:a="lowest",split:u=!1,voids:s=!1}=n;if(!!i){if(r==null&&(r=P.isPath(i)?hu(e,i):S=>E.isBlock(e,S)),!o&&R.isRange(i)&&(i=E.unhangRange(e,i)),u&&R.isRange(i)){if(R.isCollapsed(i)&&E.leaf(e,i.anchor)[0].text.length>0)return;var l=E.rangeRef(e,i,{affinity:"inward"}),[c,f]=R.edges(i),d=a==="lowest"?"lowest":"highest",p=E.isEnd(e,f,f.path);N.splitNodes(e,{at:f,match:r,mode:d,voids:s,always:!p});var m=E.isStart(e,c,c.path);N.splitNodes(e,{at:c,match:r,mode:d,voids:s,always:!m}),i=l.unref(),n.at==null&&N.select(e,i)}for(var[v,g]of E.nodes(e,{at:i,match:r,mode:a,voids:s})){var y={},h={};if(g.length!==0){var $=!1;for(var w in t)w==="children"||w==="text"||t[w]!==v[w]&&($=!0,v.hasOwnProperty(w)&&(y[w]=v[w]),t[w]!=null&&(h[w]=t[w]));$&&e.apply({type:"set_node",path:g,properties:y,newProperties:h})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection,height:a=0,always:u=!1}=t;if(i==null&&(i=pe=>E.isBlock(e,pe)),R.isRange(o)&&(o=gj(e,o)),P.isPath(o)){var s=o,l=E.point(e,s),[c]=E.parent(e,s);i=pe=>pe===c,a=l.path.length-s.length+1,o=l,u=!0}if(!!o){var f=E.pointRef(e,o,{affinity:"backward"}),[d]=E.nodes(e,{at:o,match:i,mode:n,voids:r});if(!!d){var p=E.void(e,{at:o,mode:"highest"}),m=0;if(!r&&p){var[v,g]=p;if(te.isElement(v)&&e.isInline(v)){var y=E.after(e,g);if(!y){var h={text:""},$=P.next(g);N.insertNodes(e,h,{at:$,voids:r}),y=E.point(e,$)}o=y,u=!0}var w=o.path.length-g.length;a=w+1,u=!0}var S=E.pointRef(e,o),D=o.path.length-a,[,x]=d,_=o.path.slice(0,D),j=a===0?o.offset:o.path[D]+m;for(var[H,W]of E.levels(e,{at:_,reverse:!0,voids:r})){var G=!1;if(W.length2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;N.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(!!o){a==null&&(a=P.isPath(o)?hu(e,o):d=>E.isBlock(e,d)),P.isPath(o)&&(o=E.range(e,o));var u=R.isRange(o)?E.rangeRef(e,o):null,s=E.nodes(e,{at:o,match:a,mode:n,voids:i}),l=Array.from(s,d=>{var[,p]=d;return E.pathRef(e,p)}).reverse(),c=function(p){var m=p.unref(),[v]=E.node(e,m),g=E.range(e,m);r&&u&&(g=R.intersection(u.current,g)),N.liftNodes(e,{at:g,match:y=>te.isAncestor(v)&&v.children.includes(y),voids:i})};for(var f of l)c(f);u&&u.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{mode:r="lowest",split:i=!1,voids:o=!1}=n,{match:a,at:u=e.selection}=n;if(!!u){if(a==null&&(P.isPath(u)?a=hu(e,u):e.isInline(t)?a=g=>E.isInline(e,g)||Z.isText(g):a=g=>E.isBlock(e,g)),i&&R.isRange(u)){var[s,l]=R.edges(u),c=E.rangeRef(e,u,{affinity:"inward"});N.splitNodes(e,{at:l,match:a,voids:o}),N.splitNodes(e,{at:s,match:a,voids:o}),u=c.unref(),n.at==null&&N.select(e,u)}var f=Array.from(E.nodes(e,{at:u,match:e.isInline(t)?g=>E.isBlock(e,g):g=>E.isEditor(g),mode:"lowest",voids:o}));for(var[,d]of f){var p=R.isRange(u)?R.intersection(u,E.range(e,d)):u;if(!!p){var m=Array.from(E.nodes(e,{at:p,match:a,mode:r,voids:o}));if(m.length>0){var v=function(){var[g]=m,y=m[m.length-1],[,h]=g,[,$]=y;if(h.length===0&&$.length===0)return"continue";var w=P.equals(h,$)?P.parent(h):P.common(h,$),S=E.range(e,h,$),D=E.node(e,w),[x]=D,_=w.length+1,j=P.next($.slice(0,_)),H=I6(I6({},t),{},{children:[]});N.insertNodes(e,H,{at:j,voids:o}),N.moveNodes(e,{at:S,match:W=>te.isAncestor(x)&&x.children.includes(W),to:j.concat(0),voids:o})}();if(v==="continue")continue}}}}})}},FO=(e,t)=>{if(te.isElement(t)){var n=t;return E.isVoid(e,t)?!0:n.children.length===1?FO(e,n.children[0]):!1}else return!E.isEditor(t)},gj=(e,t)=>{if(R.isCollapsed(t))return t.anchor;var[,n]=R.edges(t),r=E.pointRef(e,n);return N.delete(e,{at:t}),r.unref()},hu=(e,t)=>{var[n]=E.node(e,t);return r=>r===n};function j6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function R6(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")N.select(e,r.anchor);else if(n==="focus")N.select(e,r.focus);else if(n==="start"){var[i]=R.edges(r);N.select(e,i)}else if(n==="end"){var[,o]=R.edges(r);N.select(e,o)}}else return},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(!!n){a==="start"&&(a=R.isBackward(n)?"focus":"anchor"),a==="end"&&(a=R.isBackward(n)?"anchor":"focus");var{anchor:u,focus:s}=n,l={distance:r,unit:i},c={};if(a==null||a==="anchor"){var f=o?E.before(e,u,l):E.after(e,u,l);f&&(c.anchor=f)}if(a==null||a==="focus"){var d=o?E.before(e,s,l):E.after(e,s,l);d&&(c.focus=d)}N.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=E.range(e,t),n){N.setSelection(e,t);return}if(!R.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})},setPoint(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:r}=e,{edge:i="both"}=n;if(!!r){i==="start"&&(i=R.isBackward(r)?"focus":"anchor"),i==="end"&&(i=R.isBackward(r)?"anchor":"focus");var{anchor:o,focus:a}=r,u=i==="anchor"?o:a;N.setSelection(e,{[i==="anchor"?"anchor":"focus"]:R6(R6({},u),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(!!n){for(var o in t)(o==="anchor"&&t.anchor!=null&&!we.equals(t.anchor,n.anchor)||o==="focus"&&t.focus!=null&&!we.equals(t.focus,n.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==n[o])&&(r[o]=n[o],i[o]=t[o]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:i})}}},mj={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};E.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:u=!1}=t;if(!!a){if(R.isRange(a)&&R.isCollapsed(a)&&(a=a.anchor),we.isPoint(a)){var s=E.void(e,{at:a,mode:"highest"});if(!o&&s){var[,l]=s;a=l}else{var c={unit:r,distance:i},f=n?E.before(e,a,c)||E.start(e,[]):E.after(e,a,c)||E.end(e,[]);a={anchor:a,focus:f},u=!0}}if(P.isPath(a)){N.removeNodes(e,{at:a,voids:o});return}if(!R.isCollapsed(a)){if(!u){var[,d]=R.edges(a),p=E.end(e,[]);we.equals(d,p)||(a=E.unhangRange(e,a,{voids:o}))}var[m,v]=R.edges(a),g=E.above(e,{match:ce=>E.isBlock(e,ce),at:m,voids:o}),y=E.above(e,{match:ce=>E.isBlock(e,ce),at:v,voids:o}),h=g&&y&&!P.equals(g[1],y[1]),$=P.equals(m.path,v.path),w=o?null:E.void(e,{at:m,mode:"highest"}),S=o?null:E.void(e,{at:v,mode:"highest"});if(w){var D=E.before(e,m);D&&g&&P.isAncestor(g[1],D.path)&&(m=D)}if(S){var x=E.after(e,v);x&&y&&P.isAncestor(y[1],x.path)&&(v=x)}var _=[],j;for(var H of E.nodes(e,{at:a,voids:o})){var[W,G]=H;j&&P.compare(G,j)===0||(!o&&E.isVoid(e,W)||!P.isCommon(G,m.path)&&!P.isCommon(G,v.path))&&(_.push(H),j=G)}var J=Array.from(_,ce=>{var[,Ee]=ce;return E.pathRef(e,Ee)}),ne=E.pointRef(e,m),Q=E.pointRef(e,v);if(!$&&!w){var ue=ne.current,[pe]=E.leaf(e,ue),{path:_e}=ue,{offset:me}=m,oe=pe.text.slice(me);oe.length>0&&e.apply({type:"remove_text",path:_e,offset:me,text:oe})}for(var Ie of J){var T=Ie.unref();N.removeNodes(e,{at:T,voids:o})}if(!S){var F=Q.current,[k]=E.leaf(e,F),{path:I}=F,U=$?m.offset:0,L=k.text.slice(U,v.offset);L.length>0&&e.apply({type:"remove_text",path:I,offset:U,text:L})}!$&&h&&Q.current&&ne.current&&N.mergeNodes(e,{at:Q.current,hanging:!0,voids:o});var ee=n?ne.unref()||Q.unref():Q.unref()||ne.unref();t.at==null&&ee&&N.select(e,ee)}}})},insertFragment(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:i=!1}=n,{at:o=e.selection}=n;if(!!t.length){if(o)if(R.isRange(o))if(r||(o=E.unhangRange(e,o)),R.isCollapsed(o))o=o.anchor;else{var[,a]=R.edges(o);if(!i&&E.void(e,{at:a}))return;var u=E.pointRef(e,a);N.delete(e,{at:o}),o=u.unref()}else P.isPath(o)&&(o=E.start(e,o));else return;if(!(!i&&E.void(e,{at:o}))){var s=E.above(e,{at:o,match:k=>E.isInline(e,k),mode:"highest",voids:i});if(s){var[,l]=s;if(E.isEnd(e,o,l)){var c=E.after(e,l);o=c}else if(E.isStart(e,o,l)){var f=E.before(e,l);o=f}}var d=E.above(e,{match:k=>E.isBlock(e,k),at:o,voids:i}),[,p]=d,m=E.isStart(e,o,p),v=E.isEnd(e,o,p),g=m&&v,y=!m||m&&v,h=!v,[,$]=q.first({children:t},[]),[,w]=q.last({children:t},[]),S=[],D=k=>{var[I,U]=k,L=U.length===0;return L?!1:g?!0:!(y&&P.isAncestor(U,$)&&te.isElement(I)&&!e.isVoid(I)&&!e.isInline(I)||h&&P.isAncestor(U,w)&&te.isElement(I)&&!e.isVoid(I)&&!e.isInline(I))};for(var x of q.nodes({children:t},{pass:D}))D(x)&&S.push(x);var _=[],j=[],H=[],W=!0,G=!1;for(var[J]of S)te.isElement(J)&&!e.isInline(J)?(W=!1,G=!0,j.push(J)):W?_.push(J):H.push(J);var[ne]=E.nodes(e,{at:o,match:k=>Z.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),[,Q]=ne,ue=E.isStart(e,o,Q),pe=E.isEnd(e,o,Q),_e=E.pathRef(e,v?P.next(p):p),me=E.pathRef(e,pe?P.next(Q):Q),oe=E.pathRef(e,p);N.splitNodes(e,{at:o,match:k=>G?E.isBlock(e,k):Z.isText(k)||E.isInline(e,k),mode:G?"lowest":"highest",voids:i});var Ie=E.pathRef(e,!ue||ue&&pe?P.next(Q):Q);if(N.insertNodes(e,_,{at:Ie.current,match:k=>Z.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),g&&j.length&&N.delete(e,{at:oe.unref(),voids:i}),N.insertNodes(e,j,{at:_e.current,match:k=>E.isBlock(e,k),mode:"lowest",voids:i}),N.insertNodes(e,H,{at:me.current,match:k=>Z.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),!n.at){var T;H.length>0?T=P.previous(me.current):j.length>0?T=P.previous(_e.current):T=P.previous(Ie.current);var F=E.end(e,T);N.select(e,F)}Ie.unref(),_e.unref(),me.unref()}}})},insertText(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};E.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:i=e.selection}=n;if(!!i){if(P.isPath(i)&&(i=E.range(e,i)),R.isRange(i))if(R.isCollapsed(i))i=i.anchor;else{var o=R.end(i);if(!r&&E.void(e,{at:o}))return;var a=E.pointRef(e,o);N.delete(e,{at:i,voids:r}),i=a.unref(),N.setSelection(e,{anchor:i,focus:i})}if(!(!r&&E.void(e,{at:i}))){var{path:u,offset:s}=i;t.length>0&&e.apply({type:"insert_text",path:u,offset:s,text:t})}}})}};function L6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zd(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=TO}function VO(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function WO(e){return!!e&&typeof e=="object"}function hR(e){return typeof e=="string"||!HO(e)&&WO(e)&&rd.call(e)==Ej}function gR(e){if(!e)return[];if(mw(e))return hR(e)?Gj(e):uR(e);if(d1&&e[d1])return Hj(e[d1]());var t=ra(e),n=t==Z2?Uj:t==Q2?Wj:mR;return n(e)}function vR(e){return mw(e)?rR(e):aR(e)}function mR(e){return e?Rj(e,vR(e)):[]}var W6=gR;function G6(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function yw(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){typeof e[n]>"u"?e[n]=t[n]:G6(t[n])&&G6(e[n])&&Object.keys(t[n]).length>0&&yw(e[n],t[n])})}var GO={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function od(){var e=typeof document<"u"?document:{};return yw(e,GO),e}var yR={document:GO,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){typeof setTimeout>"u"||clearTimeout(e)}};function Ja(){var e=typeof window<"u"?window:{};return yw(e,yR),e}function bR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function ub(e){return ub=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ub(e)}function kh(e,t){return kh=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},kh(e,t)}function $R(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function nh(e,t,n){return $R()?nh=Reflect.construct:nh=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&kh(l,a.prototype),l},nh.apply(null,arguments)}function wR(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function sb(e){var t=typeof Map=="function"?new Map:void 0;return sb=function(r){if(r===null||!wR(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,i)}function i(){return nh(r,arguments,ub(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),kh(i,r)},sb(e)}function ER(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SR(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(r){t.__proto__=r}})}var eo=function(e){bR(t,e);function t(n){var r;return r=e.call.apply(e,[this].concat(n))||this,SR(ER(r)),r}return t}(sb(Array));function b0(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,b0(n)):t.push(n)}),t}function qO(e,t){return Array.prototype.filter.call(e,t)}function DR(e){for(var t=[],n=0;n=0&&o.indexOf(">")>=0){var a="div";o.indexOf("0}).length>0}function Qn(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n=0&&(t[CR(i.name.split("data-")[1])]=i.value)}for(var o in t)t[o]==="false"?t[o]=!1:t[o]==="true"?t[o]=!0:parseFloat(t[o])===t[o]*1&&(t[o]*=1);return t}}function Ur(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var n=[],r=0;r=0;else o.value=e}return this}function Vr(){for(var e=arguments.length,t=new Array(e),n=0;n=0;p-=1){var m=d[p];o&&m.listener===o||o&&m.listener&&m.listener.dom7proxy&&m.listener.dom7proxy===o?(f.removeEventListener(l,m.proxyListener,a),d.splice(p,1)):o||(f.removeEventListener(l,m.proxyListener,a),d.splice(p,1))}}return this}function _h(){var e=Ja();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Nh(){var e=Ja();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function K6(){if(this.length>0){var e=Ja(),t=od(),n=this[0],r=n.getBoundingClientRect(),i=t.body,o=n.clientTop||i.clientTop||0,a=n.clientLeft||i.clientLeft||0,u=n===e?e.scrollY:n.scrollTop,s=n===e?e.scrollX:n.scrollLeft;return{top:r.top+u-o,left:r.left+s-a}}return null}function ys(){for(var e=0;e"u")return this[0]?this[0].innerHTML:null;for(var t=0;t"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t"u")return!1;if(typeof e=="string"){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(i=O(e),o=0;o=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(e instanceof eo)for(r=0;r"u"){for(var o=0;o-1&&e%1==0&&e-1&&e%1==0&&e<=YO}function JR(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ZR(e){return!!e&&typeof e=="object"}function QR(e){return $w(e)?jR(e):zR(e)}function eL(e){return e}var ww=GR;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let ZO=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var QO="Expected a function",Q6=0/0,tL="[object Symbol]",nL=/^\s+|\s+$/g,rL=/^[-+]0x[0-9a-f]+$/i,iL=/^0b[01]+$/i,oL=/^0o[0-7]+$/i,aL=parseInt,uL=typeof ot=="object"&&ot&&ot.Object===Object&&ot,sL=typeof self=="object"&&self&&self.Object===Object&&self,lL=uL||sL||Function("return this")(),cL=Object.prototype,fL=cL.toString,dL=Math.max,pL=Math.min,p1=function(){return lL.Date.now()};function hL(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(QO);t=eS(t)||0,zh(n)&&(c=!!n.leading,f="maxWait"in n,o=f?dL(eS(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var x=r,_=i;return r=i=void 0,l=D,a=e.apply(_,x),a}function m(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var x=D-s,_=D-l,j=t-x;return f?pL(j,o-_):j}function g(D){var x=D-s,_=D-l;return s===void 0||x>=t||x<0||f&&_>=o}function y(){var D=p1();if(g(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(p1())}function S(){var D=p1(),x=g(D);if(r=arguments,i=this,s=D,x){if(u===void 0)return m(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return S.cancel=$,S.flush=w,S}function gL(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(QO);return zh(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),hL(e,t,{leading:r,maxWait:t,trailing:i})}function zh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function vL(e){return!!e&&typeof e=="object"}function mL(e){return typeof e=="symbol"||vL(e)&&fL.call(e)==tL}function eS(e){if(typeof e=="number")return e;if(mL(e))return Q6;if(zh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=zh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(nL,"");var n=iL.test(e);return n||oL.test(e)?aL(e.slice(2),n?2:8):rL.test(e)?Q6:+e}var ja=gL;function yL(e,t){return document.createElement(e,t)}function bL(e,t,n){return document.createElementNS(e,t,n)}function $L(e){return document.createTextNode(e)}function wL(e){return document.createComment(e)}function EL(e,t,n){e.insertBefore(t,n)}function SL(e,t){e.removeChild(t)}function DL(e,t){e.appendChild(t)}function CL(e){return e.parentNode}function xL(e){return e.nextSibling}function AL(e){return e.tagName}function OL(e,t){e.textContent=t}function BL(e){return e.textContent}function FL(e){return e.nodeType===1}function TL(e){return e.nodeType===3}function kL(e){return e.nodeType===8}const PL={createElement:yL,createElementNS:bL,createTextNode:$L,createComment:wL,insertBefore:EL,removeChild:SL,appendChild:DL,parentNode:CL,nextSibling:xL,tagName:AL,setTextContent:OL,getTextContent:BL,isElement:FL,isText:TL,isComment:kL};function df(e,t,n,r,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:n,text:r,elm:i,key:o}}const lb=Array.isArray;function rh(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function h1(e){return e===void 0}function Dn(e){return e!==void 0}const tS=df("",{},[],void 0,void 0);function yl(e,t){var n,r;const i=e.key===t.key,o=((n=e.data)===null||n===void 0?void 0:n.is)===((r=t.data)===null||r===void 0?void 0:r.is);return e.sel===t.sel&&i&&o}function _L(e){return e.sel!==void 0}function NL(e,t,n){var r;const i={};for(let o=t;o<=n;++o){const a=(r=e[o])===null||r===void 0?void 0:r.key;a!==void 0&&(i[a]=o)}return i}const IL=["create","update","remove","destroy","pre","post"];function jL(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t!==void 0?t:PL;for(const d of IL)for(const p of e){const m=p[d];m!==void 0&&n[d].push(m)}function i(d){const p=d.id?"#"+d.id:"",m=d.getAttribute("class"),v=m?"."+m.split(" ").join("."):"";return df(r.tagName(d).toLowerCase()+p+v,{},[],void 0,d)}function o(d,p){return function(){if(--p===0){const v=r.parentNode(d);r.removeChild(v,d)}}}function a(d,p){var m,v;let g,y=d.data;if(y!==void 0){const w=(m=y.hook)===null||m===void 0?void 0:m.init;Dn(w)&&(w(d),y=d.data)}const h=d.children,$=d.sel;if($==="!")h1(d.text)&&(d.text=""),d.elm=r.createComment(d.text);else if($!==void 0){const w=$.indexOf("#"),S=$.indexOf(".",w),D=w>0?w:$.length,x=S>0?S:$.length,_=w!==-1||S!==-1?$.slice(0,Math.min(D,x)):$,j=d.elm=Dn(y)&&Dn(g=y.ns)?r.createElementNS(g,_,y):r.createElement(_,y);for(D0&&j.setAttribute("class",$.slice(x+1).replace(/\./g," ")),g=0;gh?(W=m[S+1]==null?null:m[S+1].elm,u(d,W,m,y,S,v)):l(d,p,g,h))}function f(d,p,m){var v,g,y,h,$;const w=(v=p.data)===null||v===void 0?void 0:v.hook;(g=w==null?void 0:w.prepatch)===null||g===void 0||g.call(w,d,p);const S=p.elm=d.elm,D=d.children,x=p.children;if(d!==p){if(p.data!==void 0){for(let _=0;_i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:IM(e,t,n)}function LM(e){return function(t){t=E0(t);var n=yB(t)?TM(t):void 0,r=n?n[0]:t.charAt(0),i=n?RM(n,1).join(""):t.slice(1);return r[e]()+i}}function MM(e){return function(t){return CM(qM(WM(t).replace(gM,"")),e,"")}}function zM(e){return!!e&&typeof e=="object"}function HM(e){return typeof e=="symbol"||zM(e)&&NM.call(e)==tM}function E0(e){return e==null?"":jM(e)}var UM=MM(function(e,t,n){return t=t.toLowerCase(),e+(n?VM(t):t)});function VM(e){return GM(E0(e).toLowerCase())}function WM(e){return e=E0(e),e&&e.replace(rM,BM).replace(vM,"")}var GM=LM("toUpperCase");function qM(e,t,n){return e=E0(e),t=n?void 0:t,t===void 0?FM(e)?PM(e):AM(e):e.match(t)||[]}var KM=UM,YM=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),v1={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},bB={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:YM?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Cw={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222};for(var Qd=1;Qd<20;Qd++)Cw["f"+Qd]=111+Qd;function $B(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(a){return JM(a,t)}),i=function(u){return r.some(function(s){return ZM(s,u)})},o=n==null?i:i(n);return o}function XM(e,t){return $B(e,{byKey:!0},t)}function JM(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in v1)r[v1[a]]=!1;var u=!0,s=!1,l=void 0;try{for(var c=i[Symbol.iterator](),f;!(u=(f=c.next()).done);u=!0){var d=f.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var m=wB(d),v=v1[m];if(d.length>1&&!v&&!bB[d]&&!Cw[m])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!v)&&(n?r.key=m:r.which=QM(d)),v&&(r[v]=p?null:!0)}}catch(g){s=!0,l=g}finally{try{!u&&c.return&&c.return()}finally{if(s)throw l}}return r}function ZM(e,t){for(var n in e){var r=e[n],i=void 0;if(r!=null&&(n==="key"&&t.key!=null?i=t.key.toLowerCase():n==="which"?i=r===91&&t.which===93?91:t.which:i=t[n],!(i==null&&r===!1)&&i!==r))return!1}return!0}function QM(e){e=wB(e);var t=Cw[e]||e.toUpperCase().charCodeAt(0);return t}function wB(e){return e=e.toLowerCase(),e=bB[e]||e,e}var ez=$B,m1=XM,tz="Expected a function",mS=0/0,nz="[object Symbol]",rz=/^\s+|\s+$/g,iz=/^[-+]0x[0-9a-f]+$/i,oz=/^0b[01]+$/i,az=/^0o[0-7]+$/i,uz=parseInt,sz=typeof ot=="object"&&ot&&ot.Object===Object&&ot,lz=typeof self=="object"&&self&&self.Object===Object&&self,cz=sz||lz||Function("return this")(),fz=Object.prototype,dz=fz.toString,pz=Math.max,hz=Math.min,y1=function(){return cz.Date.now()};function gz(e,t,n){var r,i,o,a,u,s,l=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(tz);t=yS(t)||0,db(n)&&(c=!!n.leading,f="maxWait"in n,o=f?pz(yS(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d);function p(D){var x=r,_=i;return r=i=void 0,l=D,a=e.apply(_,x),a}function m(D){return l=D,u=setTimeout(y,t),c?p(D):a}function v(D){var x=D-s,_=D-l,j=t-x;return f?hz(j,o-_):j}function g(D){var x=D-s,_=D-l;return s===void 0||x>=t||x<0||f&&_>=o}function y(){var D=y1();if(g(D))return h(D);u=setTimeout(y,v(D))}function h(D){return u=void 0,d&&r?p(D):(r=i=void 0,a)}function $(){u!==void 0&&clearTimeout(u),l=0,r=s=i=u=void 0}function w(){return u===void 0?a:h(y1())}function S(){var D=y1(),x=g(D);if(r=arguments,i=this,s=D,x){if(u===void 0)return m(s);if(f)return u=setTimeout(y,t),p(s)}return u===void 0&&(u=setTimeout(y,t)),a}return S.cancel=$,S.flush=w,S}function db(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function vz(e){return!!e&&typeof e=="object"}function mz(e){return typeof e=="symbol"||vz(e)&&dz.call(e)==nz}function yS(e){if(typeof e=="number")return e;if(mz(e))return mS;if(db(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=db(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(rz,"");var n=oz.test(e);return n||az.test(e)?uz(e.slice(2),n?2:8):iz.test(e)?mS:+e}var EB=gz,SB=gw(function(e,t){var n=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",u="[object Boolean]",s="[object Date]",l="[object Error]",c="[object Function]",f="[object GeneratorFunction]",d="[object Map]",p="[object Number]",m="[object Object]",v="[object Promise]",g="[object RegExp]",y="[object Set]",h="[object String]",$="[object Symbol]",w="[object WeakMap]",S="[object ArrayBuffer]",D="[object DataView]",x="[object Float32Array]",_="[object Float64Array]",j="[object Int8Array]",H="[object Int16Array]",W="[object Int32Array]",G="[object Uint8Array]",J="[object Uint8ClampedArray]",ne="[object Uint16Array]",Q="[object Uint32Array]",ue=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,_e=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,oe={};oe[o]=oe[a]=oe[S]=oe[D]=oe[u]=oe[s]=oe[x]=oe[_]=oe[j]=oe[H]=oe[W]=oe[d]=oe[p]=oe[m]=oe[g]=oe[y]=oe[h]=oe[$]=oe[G]=oe[J]=oe[ne]=oe[Q]=!0,oe[l]=oe[c]=oe[w]=!1;var Ie=typeof ot=="object"&&ot&&ot.Object===Object&&ot,T=typeof self=="object"&&self&&self.Object===Object&&self,F=Ie||T||Function("return this")(),k=t&&!t.nodeType&&t,I=k&&!0&&e&&!e.nodeType&&e,U=I&&I.exports===k;function L(b,C){return b.set(C[0],C[1]),b}function ee(b,C){return b.add(C),b}function ce(b,C){for(var B=-1,M=b?b.length:0;++B-1}function Fv(b,C){var B=this.__data__,M=lu(B,b);return M<0?B.push([b,C]):B[M][1]=C,this}Vt.prototype.clear=xv,Vt.prototype.delete=Av,Vt.prototype.get=Ov,Vt.prototype.has=Bv,Vt.prototype.set=Fv;function Zt(b){var C=-1,B=b?b.length:0;for(this.clear();++C-1&&b%1==0&&b-1&&b%1==0&&b<=i}function Cr(b){var C=typeof b;return!!b&&(C=="object"||C=="function")}function Kd(b){return!!b&&typeof b=="object"}function gl(b){return du(b)?su(b):Wv(b)}function i1(){return[]}function o1(){return!1}e.exports=Vd}),yz=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},gu;function bS(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var bz=0;function $z(e){return"__private_"+bz+++"_"+e}function wz(e,t,n){const r=[];return e.forEach(i=>typeof i!="string"?r.push(i):t[Symbol.split](i).forEach((o,a,u)=>{o!==""&&r.push(o),a"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let xB=e=>crypto.getRandomValues(new Uint8Array(e)),AB=(e,t,n)=>{let r=(2<{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},xz=(e,t)=>AB(e,t,xB),Az=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var Oz={nanoid:Az,customAlphabet:xz,customRandom:AB,urlAlphabet:Cz,random:xB},b1=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var n=t<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(t=-t),t<1)return(n?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),r.length-1);t=Number(t/Math.pow(1024,i));var o=r[i];return t>=10||t%1===0?(n?"-":"")+t.toFixed(0)+" "+o:(n?"-":"")+t.toFixed(1)+" "+o};function OB(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}OB.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),r=0;t&&r=2}return t?n(t.split(";")[0]):n};function kz(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Pz=0;function _z(e){return"__private_"+Pz+++"_"+e}var $1=_z("publish");class BB{constructor(){Object.defineProperty(this,$1,{value:Nz}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,kz(this,$1)[$1](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function Nz(){for(var e=arguments.length,t=new Array(e),n=0;n{r(...t)})}BB.VERSION="2.0.3";var Iz=function(){return new BB},FB=function(t){const n=t.lastIndexOf(".");return n===-1||n===t.length-1?{name:t,extension:void 0}:{name:t.slice(0,n),extension:t.slice(n+1)}},wS={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"},jz=function(t){var n;if(t.type)return t.type;const r=t.name?(n=FB(t.name).extension)==null?void 0:n.toLowerCase():null;return r&&r in wS?wS[r]:"application/octet-stream"};function Rz(e){return e.charCodeAt(0).toString(32)}function ES(e){let t="";return e.replace(/[^A-Z0-9]/ig,n=>(t+=`-${Rz(n)}`,"/"))+t}var Lz=function(t){let n="uppy";return typeof t.name=="string"&&(n+=`-${ES(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${ES(t.meta.relativePath.toLowerCase())}`),t.data.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n},Mz=function(t){if(t==null&&(t=typeof navigator<"u"?navigator.userAgent:null),!t)return!0;const n=/Edge\/(\d+\.\d+)/.exec(t);if(!n)return!0;const r=n[1];let[i,o]=r.split(".");return i=parseInt(i,10),o=parseInt(o,10),i<15||i===15&&o<15063||i>18||i===18&&o>=18218},zz=function(t,n){return n.name?n.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function w1(e){return e<10?`0${e}`:e.toString()}var ih=function(){const t=new Date,n=w1(t.getHours()),r=w1(t.getMinutes()),i=w1(t.getSeconds());return`${n}:${r}:${i}`};const Hz={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),n=0;n"u"&&(globalThis.AggregateError=class extends Error{constructor(t,n){super(n),this.errors=t}});class Yz extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var Gt=kt("plugins"),bl=kt("storeUnsubscribe"),ii=kt("emitter"),ua=kt("preProcessors"),sa=kt("uploaders"),li=kt("postProcessors"),Rc=kt("checkRestrictions"),E1=kt("checkMinNumberOfFiles"),pf=kt("checkRequiredMetaFieldsOnFile"),S1=kt("checkRequiredMetaFields"),_t=kt("showOrLogErrorAndThrow"),$l=kt("assertNewUploadAllowed"),wl=kt("checkAndCreateFileStateObject"),El=kt("startIfAutoProceed"),D1=kt("addListeners"),sr=kt("updateOnlineStatus"),oi=kt("createUpload"),C1=kt("getUpload"),da=kt("removeUpload"),ai=kt("runUpload");PB=Symbol.for("uppy test: getPlugins");_B=Symbol.for("uppy test: createUpload");class NB{constructor(t){Object.defineProperty(this,ai,{value:sH}),Object.defineProperty(this,da,{value:uH}),Object.defineProperty(this,C1,{value:aH}),Object.defineProperty(this,oi,{value:oH}),Object.defineProperty(this,D1,{value:iH}),Object.defineProperty(this,El,{value:rH}),Object.defineProperty(this,wl,{value:nH}),Object.defineProperty(this,$l,{value:tH}),Object.defineProperty(this,_t,{value:eH}),Object.defineProperty(this,S1,{value:Qz}),Object.defineProperty(this,pf,{value:Zz}),Object.defineProperty(this,E1,{value:Jz}),Object.defineProperty(this,Rc,{value:Xz}),Object.defineProperty(this,Gt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,bl,{writable:!0,value:void 0}),Object.defineProperty(this,ii,{writable:!0,value:CB()}),Object.defineProperty(this,ua,{writable:!0,value:new Set}),Object.defineProperty(this,sa,{writable:!0,value:new Set}),Object.defineProperty(this,li,{writable:!0,value:new Set}),Object.defineProperty(this,sr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Vz;const n={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:{maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]},meta:{},onBeforeFileAdded:r=>r,onBeforeUpload:r=>r,store:Iz(),logger:qz,infoTimeout:5e3};if(this.opts={...n,...t,restrictions:{...n.restrictions,...t&&t.restrictions}},t&&t.logger&&t.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):t&&t.debug&&(this.opts.logger=Kz),this.log(`Using Core v${this.constructor.VERSION}`),this.opts.restrictions.allowedFileTypes&&this.opts.restrictions.allowedFileTypes!==null&&!Array.isArray(this.opts.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");this.i18nInit(),this.calculateProgress=ja(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:Mz(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),re(this,bl)[bl]=this.store.subscribe((r,i,o)=>{this.emit("state-update",r,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),re(this,D1)[D1]()}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{n.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,n){if(!this.getState().files[t])throw new Error(`Can\u2019t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...n}}})}i18nInit(){const t=new DB([this.defaultLocale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.locale=t.locale}setOptions(t){this.opts={...this.opts,...t,restrictions:{...this.opts.restrictions,...t&&t.restrictions}},t.meta&&this.setMeta(t.meta),this.i18nInit(),t.locale&&this.iteratePlugins(n=>{n.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},n={...this.getState().files},r={};Object.keys(n).forEach(i=>{const o={...n[i]};o.progress={...o.progress,...t},r[i]=o}),this.setState({files:r,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){re(this,ua)[ua].add(t)}removePreProcessor(t){return re(this,ua)[ua].delete(t)}addPostProcessor(t){re(this,li)[li].add(t)}removePostProcessor(t){return re(this,li)[li].delete(t)}addUploader(t){re(this,sa)[sa].add(t)}removeUploader(t){return re(this,sa)[sa].delete(t)}setMeta(t){const n={...this.getState().meta,...t},r={...this.getState().files};Object.keys(r).forEach(i=>{r[i]={...r[i],meta:{...r[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:n,files:r})}setFileMeta(t,n){const r={...this.getState().files};if(!r[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...r[t].meta,...n};r[t]={...r[t],meta:i},this.setState({files:r})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:n,error:r}=this.getState(),i=Object.values(t),o=i.filter(m=>{let{progress:v}=m;return!v.uploadComplete&&v.uploadStarted}),a=i.filter(m=>!m.progress.uploadStarted),u=i.filter(m=>m.progress.uploadStarted||m.progress.preprocess||m.progress.postprocess),s=i.filter(m=>m.progress.uploadStarted),l=i.filter(m=>m.isPaused),c=i.filter(m=>m.progress.uploadComplete),f=i.filter(m=>m.error),d=o.filter(m=>!m.isPaused),p=i.filter(m=>m.progress.preprocess||m.progress.postprocess);return{newFiles:a,startedFiles:u,uploadStartedFiles:s,pausedFiles:l,completeFiles:c,erroredFiles:f,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===i.length&&p.length===0,isAllErrored:!!r&&f.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(m=>m.isGhost)}}validateRestrictions(t,n){try{return re(this,Rc)[Rc](t,n),{result:!0}}catch(r){return{result:!1,reason:r.message}}}checkIfFileAlreadyExists(t){const{files:n}=this.getState();return!!(n[t]&&!n[t].isGhost)}addFile(t){re(this,$l)[$l](t);const{files:n}=this.getState();let r=re(this,wl)[wl](n,t);return n[r.id]&&n[r.id].isGhost&&(r={...n[r.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${r.name}, ${r.id}`)),this.setState({files:{...n,[r.id]:r}}),this.emit("file-added",r),this.emit("files-added",[r]),this.log(`Added file: ${r.name}, ${r.id}, mime type: ${r.type}`),re(this,El)[El](),r.id}addFiles(t){re(this,$l)[$l]();const n={...this.getState().files},r=[],i=[];for(let o=0;o{this.emit("file-added",o)}),this.emit("files-added",r),r.length>5?this.log(`Added batch of ${r.length} files`):Object.keys(r).forEach(o=>{this.log(`Added file: ${r[o].name} id: ${r[o].id} type: ${r[o].type}`)}),r.length>0&&re(this,El)[El](),i.length>0){let o=`Multiple errors occurred while adding files: `;if(i.forEach(a=>{o+=` * ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,n){const{files:r,currentUploads:i}=this.getState(),o={...r},a={...i},u=Object.create(null);t.forEach(f=>{r[f]&&(u[f]=r[f],delete o[f])});function s(f){return u[f]===void 0}Object.keys(a).forEach(f=>{const d=i[f].fileIDs.filter(s);if(d.length===0){delete a[f];return}a[f]={...i[f],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const r=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",t,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(i=>t[i].error);if(n.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=re(this,oi)[oi](n,{forceAllowNewUpload:!0});return re(this,ai)[ai](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=re(this,oi)[oi]([t],{forceAllowNewUpload:!0});return re(this,ai)[ai](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const r=n.filter(l=>l.progress.bytesTotal!=null),i=n.filter(l=>l.progress.bytesTotal==null);if(r.length===0){const l=n.length*100,c=i.reduce((d,p)=>d+p.progress.percentage,0),f=Math.round(c/l*100);this.setState({totalProgress:f});return}let o=r.reduce((l,c)=>l+c.progress.bytesTotal,0);const a=o/r.length;o+=a*i.length;let u=0;r.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(t,n){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was imported and spelled correctly.`;throw new TypeError(a)}const r=new t(this,n),i=r.id;if(!i)throw new Error("Your plugin must have an id");if(!r.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(i);if(o){const a=`Already found a plugin named '${o.id}'. Tried to use: '${i}'. Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in re(this,Gt)[Gt]?re(this,Gt)[Gt][r.type].push(r):re(this,Gt)[Gt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(re(this,Gt)[Gt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[PB](t){return re(this,Gt)[Gt][t]}iteratePlugins(t){Object.values(re(this,Gt)[Gt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=re(this,Gt)[Gt][t.type],r=n.findIndex(a=>a.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),re(this,bl)[bl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",re(this,sr)[sr]),window.removeEventListener("offline",re(this,sr)[sr]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?re(this,ai)[ai](t):(re(this,da)[da](t),Promise.reject(new Error("Nonexistent upload")))}[_B](){return re(this,oi)[oi](...arguments)}addResultData(t,n){if(!re(this,C1)[C1](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}upload(){var t;(t=re(this,Gt)[Gt].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{re(this,E1)[E1](n),re(this,S1)[S1](n)}).catch(i=>{re(this,_t)[_t](i)}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=re(this,oi)[oi](a);return re(this,ai)[ai](u)}).catch(i=>{re(this,_t)[_t](i,{showInformer:!1})}))}}function Xz(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new _r(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?Tz(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new _r(this.i18n("youCanOnlyUploadFileTypes",{types:s}))}if(i&&e.size!=null){let u=0;if(u+=e.size,t.forEach(s=>{u+=s.size}),u>i)throw new _r(this.i18n("exceedsSize",{size:b1(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new _r(this.i18n("exceedsSize",{size:b1(n),file:e.name}));if(r&&e.size!=null&&e.size{const r=this.getFile(n);return re(this,pf)[pf](r)});if(t.length)throw new Yz(t,`${this.i18n("missingRequiredMetaField")}`)}function eH(e,t){let{showInformer:n=!0,file:r=null,throwErr:i=!0}=t===void 0?{}:t;const o=typeof e=="object"?e.message:e,a=typeof e=="object"&&e.details?e.details:"";let u=o;if(a&&(u+=` ${a}`),e.isRestriction?(this.log(u),this.emit("restriction-failed",r,e)):this.log(u,"error"),n&&this.info({message:o,details:a},"error",this.opts.infoTimeout),i)throw typeof e=="object"?e:new Error(e)}function tH(e){const{allowNewUpload:t}=this.getState();t===!1&&re(this,_t)[_t](new _r(this.i18n("noMoreFilesAllowed")),{file:e})}function nH(e,t){const n=jz(t),r=zz(n,t),i=FB(r).extension,o=Boolean(t.isRemote),a=Lz({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const f=new _r(this.i18n("noDuplicates",{fileName:r}));re(this,_t)[_t](f,{file:t})}const u=t.meta||{};u.name=r,u.type=n;const s=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:r,extension:i||"",meta:{...this.getState().meta,...u},type:n,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:s,uploadComplete:!1,uploadStarted:null},size:s,isRemote:o,remote:t.remote||"",preview:t.preview};const c=this.opts.onBeforeFileAdded(l,e);c===!1?re(this,_t)[_t](new _r("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):typeof c=="object"&&c!==null&&(l=c);try{const f=Object.keys(e).map(d=>e[d]);re(this,Rc)[Rc](l,f)}catch(f){re(this,_t)[_t](f,{file:l})}return l}function rH(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function iH(){const e=(t,n,r)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),n!=null&&n.id in this.getState().files&&this.setFileState(n.id,{error:i,response:r})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),typeof n=="object"&&n.message){const i=new Error(n.message);i.details=n.message,n.details&&(i.details+=` ${n.details}`),i.message=this.i18n("failedToUpload",{file:t.name}),re(this,_t)[_t](i,{throwErr:!1})}else re(this,_t)[_t](n,{throwErr:!1})}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:t.size}})}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...r,postprocess:re(this,li)[li].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:r.bytesTotal},response:n,uploadURL:n.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:n.bytesUploaded||r.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:n}})}),this.on("preprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.preprocess,this.setState({files:n})}),this.on("postprocess-progress",(t,n)=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:n}})}),this.on("postprocess-complete",t=>{if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const n={...this.getState().files};n[t.id]={...n[t.id],progress:{...n[t.id].progress}},delete n[t.id].progress.postprocess,this.setState({files:n})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&re(this,pf)[pf](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",re(this,sr)[sr]),window.addEventListener("offline",re(this,sr)[sr]),setTimeout(re(this,sr)[sr],3e3))}function oH(e,t){t===void 0&&(t={});const{forceAllowNewUpload:n=!1}=t,{allowNewUpload:r,currentUploads:i}=this.getState();if(!r&&!n)throw new Error("Cannot create a new upload: already uploading.");const o=Gz();return this.emit("upload",{id:o,fileIDs:e}),this.setState({allowNewUpload:this.opts.allowMultipleUploadBatches!==!1&&this.opts.allowMultipleUploads!==!1,currentUploads:{...i,[o]:{fileIDs:e,step:0,result:{}}}}),o}function aH(e){const{currentUploads:t}=this.getState();return t[e]}function uH(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function sH(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...re(this,ua)[ua],...re(this,sa)[sa],...re(this,li)[li]];try{for(let a=r;a{const c=this.getFile(l);c&&c.progress.postprocess&&this.emit("postprocess-complete",c)});const a=n.fileIDs.map(l=>this.getFile(l)),u=a.filter(l=>!l.error),s=a.filter(l=>l.error);await this.addResultData(e,{successful:u,failed:s,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let o;return n&&(o=n.result,this.emit("complete",o),re(this,da)[da](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}NB.VERSION="2.1.3";var IB=NB,lH=gw(function(e,t){var n,r,i,o,a,u,s,l,c={},f=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(T,F){for(var k in F)T[k]=F[k];return T}function m(T){var F=T.parentNode;F&&F.removeChild(T)}function v(T,F,k){var I,U,L,ee={};for(L in F)L=="key"?I=F[L]:L=="ref"?U=F[L]:ee[L]=F[L];if(arguments.length>2&&(ee.children=arguments.length>3?n.call(arguments,2):k),typeof T=="function"&&T.defaultProps!=null)for(L in T.defaultProps)ee[L]===void 0&&(ee[L]=T.defaultProps[L]);return g(T,ee,I,U,null)}function g(T,F,k,I,U){var L={type:T,props:F,key:k,ref:I,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:U==null?++i:U};return U==null&&r.vnode!=null&&r.vnode(L),L}function y(T){return T.children}function h(T,F){this.props=T,this.context=F}function $(T,F){if(F==null)return T.__?$(T.__,T.__.__k.indexOf(T)+1):null;for(var k;F0?g(se.type,se.props,se.key,null,se.__v):se)!=null){if(se.__=k,se.__b=k.__b+1,(be=lt[z])===null||be&&se.key==be.key&&se.type===be.type)lt[z]=void 0;else for(ze=0;ze2&&(ee.children=arguments.length>3?n.call(arguments,2):k),g(T.type,ee,I||T.key,U||T.ref,null)},t.createContext=function(T,F){var k={__c:F="__cC"+l++,__:T,Consumer:function(I,U){return I.children(U)},Provider:function(I){var U,L;return this.getChildContext||(U=[],(L={})[F]=this,this.getChildContext=function(){return L},this.shouldComponentUpdate=function(ee){this.props.value!==ee.value&&U.some(S)},this.sub=function(ee){U.push(ee);var ce=ee.componentWillUnmount;ee.componentWillUnmount=function(){U.splice(U.indexOf(ee),1),ce&&ce.call(ee)}}),I.children}};return k.Provider.__=k.Consumer.contextType=k},t.createElement=v,t.createRef=function(){return{current:null}},t.h=v,t.hydrate=function T(F,k){Ie(F,k,T)},t.isValidElement=o,t.options=r,t.render=Ie,t.toChildArray=function T(F,k){return k=k||[],F==null||typeof F=="boolean"||(Array.isArray(F)?F.some(function(I){T(I,k)}):k.push(F)),k}}),cH=function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE},fH=function(t,n){return n===void 0&&(n=document),typeof t=="string"?n.querySelector(t):cH(t)?t:null},xw=class{constructor(t,n){n===void 0&&(n={}),this.uppy=t,this.opts=n}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:n}=this.uppy.getState();this.uppy.setState({plugins:{...n,[this.id]:{...n[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new DB([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}};function SS(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var dH=0;function pH(e){return"__private_"+dH+++"_"+e}const{render:DS}=lH;function hH(e){let t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o(t=null,e(...n)))),t}}var Sl=pH("updateUI");class Aw extends xw{constructor(){super(...arguments),Object.defineProperty(this,Sl,{writable:!0,value:void 0})}mount(t,n){const r=n.id,i=fH(t);if(i){this.isTargetDOMEl=!0;const u=document.createDocumentFragment();return SS(this,Sl)[Sl]=hH(s=>{!this.uppy.getPlugin(this.id)||(DS(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),DS(this.render(this.uppy.getState()),u),this.el=u.firstElementChild,i.appendChild(u),this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof Aw)o=t;else if(typeof t=="function"){const u=t;this.uppy.iteratePlugins(s=>{if(s instanceof u)return o=s,!1})}if(o)return this.uppy.log(`Installing ${r} to ${o.id}`),this.parent=o,this.el=o.addTarget(n),this.onMount(),this.el;this.uppy.log(`Not installing ${r}`);let a=`Invalid target option given to ${r}.`;throw typeof t=="function"?a+=" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":a+="If you meant to target an HTML element, please make sure that the element exists. Check that the