import{d as j9,a6 as qi,g as of,ab as nI,s as N9,m as rI,a7 as w6,e as Lo,S as iI,D as E6,P as oI,a5 as aI,aj as D6,a8 as uI,Y as S6,ak as sI}from"./index.4d3e3847.js";const lI=j9({id:"pure-app",state:()=>{var e,t,n,r;return{sidebar:{opened:(t=(e=qi.getItem("responsive-layout"))==null?void 0:e.sidebarStatus)!=null?t:of().SidebarStatus,withoutAnimation:!1,isClickCollapse:!1},layout:(r=(n=qi.getItem("responsive-layout"))==null?void 0:n.layout)!=null?r:of().Layout,device:nI()?"mobile":"desktop"}},getters:{getSidebarStatus(){return this.sidebar.opened},getDevice(){return this.device}},actions:{TOGGLE_SIDEBAR(e,t){const n=qi.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),qi.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 cI(){return lI(N9)}const fI=j9({id:"pure-epTheme",state:()=>{var e,t,n,r;return{epThemeColor:(t=(e=qi.getItem("responsive-layout"))==null?void 0:e.epThemeColor)!=null?t:of().EpThemeColor,epTheme:(r=(n=qi.getItem("responsive-layout"))==null?void 0:n.theme)!=null?r:of().Theme}},getters:{getEpThemeColor(){return this.epThemeColor},fill(){return this.epTheme==="light"?"#409eff":this.epTheme==="yellow"?"#d25f00":"#fff"}},actions:{setEpThemeColor(e){const t=qi.getItem("responsive-layout");this.epTheme=t==null?void 0:t.theme,this.epThemeColor=e,t.epThemeColor=e,qi.setItem("responsive-layout",t)}}});function dI(){return fI(N9)}var qv;if(typeof global>"u"){if("ActiveXObject"in window){var C6="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";C6+=` Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(C6)}x6(),A6()}else global&&((qv=global.navigator)===null||qv===void 0?void 0:qv.userAgent.match("QQBrowser"))&&(x6(),A6());function x6(){typeof globalThis>"u"&&(window.globalThis=window)}function A6(){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 O6(e){return Object.prototype.toString.call(e)==="[object Object]"}function tn(e){var t,n;return O6(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(O6(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Wt(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:I$(e)?2:j$(e)?3:0}function T2(e,t){return Is(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hI(e,t){return Is(e)===2?e.get(t):e[t]}function R9(e,t,n){var r=Is(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 I$(e){return bI&&e instanceof Map}function j$(e){return $I&&e instanceof Set}function Zo(e){return e.o||e.t}function N$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=DI(e);delete t[Bn];for(var n=z$(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=vI),Object.freeze(e),t&&af(e,function(n,r){return R$(r,!0)},!0)),e}function vI(){Wt(2)}function L$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ai(e){var t=SI[e];return t||Wt(18,e),t}function B6(){return os||Wt(0),os}function Kv(e,t){t&&(ai("Patches"),e.u=[],e.s=[],e.v=t)}function yh(e){k2(e),e.p.forEach(mI),e.p=null}function k2(e){e===os&&(os=e.l)}function F6(e){return os={p:[],l:os,h:e,m:!0,_:0}}function mI(e){var t=e[Bn];t.i===0||t.i===1?t.j():t.O=!0}function Yv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||ai("ES5").S(t,e,r),r?(n[Bn].P&&(yh(t),Wt(4)),Fa(e)&&(e=bh(t,e),t.l||$h(t,e)),t.u&&ai("Patches").M(n[Bn],e,t.u,t.s)):e=bh(t,n,[]),yh(t),t.u&&t.v(t.u,t.s),e!==L9?e:void 0}function bh(e,t,n){if(L$(t))return t;var r=t[Bn];if(!r)return af(t,function(o,a){return T6(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return $h(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=N$(r.k):r.o;af(r.i===3?new Set(i):i,function(o,a){return T6(e,r,i,o,a,n)}),$h(e,i,!1),n&&e.u&&ai("Patches").R(r,n,e.u,e.s)}return r.o}function T6(e,t,n,r,i,o){if(i===n&&Wt(5),Ba(i)){var a=bh(e,i,o&&t&&t.i!==3&&!T2(t.D,r)?o.concat(r):void 0);if(R9(n,r,a),!Ba(a))return;e.m=!1}if(Fa(i)&&!L$(i)){if(!e.h.F&&e._<1)return;bh(e,i),t&&t.A.l||$h(e,i)}}function $h(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&R$(t,n)}function Xv(e,t){var n=e[Bn];return(n?Zo(n):e)[t]}function k6(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 P2(e){e.P||(e.P=!0,e.l&&P2(e.l))}function Zv(e){e.o||(e.o=N$(e.t))}function _2(e,t,n){var r=I$(t)?ai("MapSet").N(t,n):j$(t)?ai("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:B6(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Wp;a&&(s=[u],l=Gp);var c=Proxy.revocable(s,l),d=c.revoke,f=c.proxy;return u.k=f,u.j=d,f}(t,n):ai("ES5").J(t,n);return(n?n.A:B6()).p.push(r),r}function yI(e){return Ba(e)||Wt(22,e),function t(n){if(!Fa(n))return n;var r,i=n[Bn],o=Is(n);if(i){if(!i.P&&(i.i<4||!ai("ES5").K(i)))return i.t;i.I=!0,r=P6(n,o),i.I=!1}else r=P6(n,o);return af(r,function(a,u){i&&hI(i.t,a)===u||R9(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 N$(e)}var _6,os,M$=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",bI=typeof Map<"u",$I=typeof Set<"u",I6=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",L9=M$?Symbol.for("immer-nothing"):((_6={})["immer-nothing"]=!0,_6),j6=M$?Symbol.for("immer-draftable"):"__$immer_draftable",Bn=M$?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,z$=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,DI=Object.getOwnPropertyDescriptors||function(e){var t={};return z$(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},SI={},Wp={get:function(e,t){if(t===Bn)return e;var n=Zo(e);if(!T2(n,t))return function(i,o,a){var u,s=k6(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||!Fa(r)?r:r===Xv(e.t,t)?(Zv(e),e.o[t]=_2(e.A.h,r,e)):r},has:function(e,t){return t in Zo(e)},ownKeys:function(e){return Reflect.ownKeys(Zo(e))},set:function(e,t,n){var r=k6(Zo(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=Xv(Zo(e),t),o=i==null?void 0:i[Bn];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(gI(n,i)&&(n!==void 0||T2(e.t,t)))return!0;Zv(e),P2(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 Xv(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,Zv(e),P2(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Zo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Wt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Wt(12)}},Gp={};af(Wp,function(e,t){Gp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gp.deleteProperty=function(e,t){return isNaN(parseInt(t))&&Wt(13),Wp.deleteProperty.call(this,e[0],t)},Gp.set=function(e,t,n){return t!=="length"&&isNaN(parseInt(t))&&Wt(14),Wp.set.call(this,e[0],t,n,e[0])};var CI=function(){function e(n){var r=this;this.g=I6,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 g=arguments.length,h=Array(g>1?g-1:0),v=1;v1?l-1:0),d=1;d=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=ai("Patches").$;return Ba(n)?a(n,r):this.produce(n,function(u){return a(u,r)})},e}(),Fn=new CI,ig=Fn.produce;Fn.produceWithPatches.bind(Fn);Fn.setAutoFreeze.bind(Fn);Fn.setUseProxies.bind(Fn);Fn.applyPatches.bind(Fn);var N6=Fn.createDraft.bind(Fn),R6=Fn.finishDraft.bind(Fn);function pi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var L6=new WeakMap,M6=new WeakMap,z6=new WeakMap,H6=new WeakMap,U6=new WeakMap;function xI(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 fi(e,t){if(e==null)return{};var n=xI(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 H$=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!n,i=n?kI(t):t,o=ge.None,a=ge.None,u=0,s=null,l=null;for(var c of i){var d=c.codePointAt(0);if(!d)break;var f=VI(c,d);if([o,a]=r?[a,f]:[f,o],Hu(o,ge.ZWJ)&&Hu(a,ge.ExtPict)&&(r?s=V6(t.substring(0,u)):s=V6(t.substring(0,t.length-u)),!s)||Hu(o,ge.RI)&&Hu(a,ge.RI)&&(l!==null?l=!l:r?l=!0:l=YI(t.substring(0,t.length-u)),!l)||o!==ge.None&&a!==ge.None&&GI(o,a))break;u+=c.length}return u||1},AI=/\s/,OI=/[\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]/,BI=/['\u2018\u2019]/,FI=function(t){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,i=!1;t.length>0;){var o=H$(t,n),[a,u]=U$(t,o,n);if(TI(a,u,n))i=!0,r+=o;else if(!i)r+=o;else break;t=u}return r},U$=(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)]},TI=function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(AI.test(t))return!1;if(BI.test(t)){var i=H$(n,r),[o,a]=U$(n,i,r);if(e(o,a,r))return!0}return!OI.test(t)},kI=function*(t){for(var n=t.length-1,r=0;re>=55296&&e<=56319,_I=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 II=/^(?:[\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])$/,jI=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,NI=/^(?:[\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])$/,RI=/^[\u1100-\u115F\uA960-\uA97C]$/,LI=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,MI=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,zI=/^[\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]$/,HI=/^[\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]$/,UI=/^(?:[\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])$/,VI=(e,t)=>{var n=ge.Any;return e.search(II)!==-1&&(n|=ge.Extend),t===8205&&(n|=ge.ZWJ),t>=127462&&t<=127487&&(n|=ge.RI),e.search(jI)!==-1&&(n|=ge.Prepend),e.search(NI)!==-1&&(n|=ge.SpacingMark),e.search(RI)!==-1&&(n|=ge.L),e.search(LI)!==-1&&(n|=ge.V),e.search(MI)!==-1&&(n|=ge.T),e.search(zI)!==-1&&(n|=ge.LV),e.search(HI)!==-1&&(n|=ge.LVT),e.search(UI)!==-1&&(n|=ge.ExtPict),n};function Hu(e,t){return(e&t)!==0}var WI=[[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 GI(e,t){return WI.findIndex(n=>Hu(e,n[0])&&Hu(t,n[1]))===-1}var qI=/(?:[\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$/,V6=e=>e.search(qI)!==-1,KI=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,YI=e=>{var t=e.match(KI);if(t===null)return!1;var n=t[0].length/2;return n%2===1},W6=e=>tn(e)&&K.isNodeList(e.children)&&!E.isEditor(e),se={isAncestor(e){return tn(e)&&K.isNodeList(e.children)},isElement:W6,isElementList(e){return Array.isArray(e)&&e.every(t=>se.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 W6(t)&&t[r]===n},matches(e,t){for(var n in t)if(n!=="children"&&e[n]!==t[n])return!1;return!0}},XI=["text"],ZI=["text"];function G6(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 au(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(!ee.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,au(au({},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,au(au({},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=K.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=>ee.isText(n)||E.isInline(e,n))},hasTexts(e,t){return t.children.every(n=>ee.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 se.isElement(t)&&!e.isInline(t)},isEditor(e){if(!tn(e))return!1;var t=q6.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||tn(e.marks))&&(e.selection===null||L.isRange(e.selection))&&K.isNodeList(e.children)&&Sc.isOperationList(e.operations);return q6.set(e,n),n},isEnd(e,t,n){var r=E.end(e,n);return Ae.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&&ee.isText(r)&&r.text===""&&!e.isVoid(t)},isInline(e,t){return se.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=M6.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 Ae.equals(t,r)},isVoid(e,t){return se.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=K.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 K.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(L.isExpanded(n)){var[r]=E.nodes(e,{match:ee.isText});if(r){var[i]=r,o=fi(i,XI);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:ee.isText}),c=E.above(e,{match:g=>E.isBlock(e,g)});if(l&&c){var[d,f]=l,[,p]=c;P.isAncestor(p,f)&&(s=d)}}var m=fi(s,ZI);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=d=>l.children.includes(d)}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=K.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(JI.isSpan(n))s=n[0],l=n[1];else{var c=E.path(e,n,{edge:"start"}),d=E.path(e,n,{edge:"end"});s=o?d:c,l=o?c:d}var f=K.nodes(e,{reverse:o,from:s,to:l,pass:$=>{var[w]=$;return a?!1:E.isVoid(e,w)}}),p=[],m;for(var[g,h]of f){var v=m&&P.compare(h,m[1])===0;if(!(r==="highest"&&v)){if(!u(g,h)){if(i&&!v&&ee.isText(g))return;continue}if(r==="lowest"&&v){m=[g,h];continue}var y=r==="lowest"?m:[g,h];y&&(i?p.push(y):yield y),m=[g,h]}}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=>L6.get(o)||[];if(!!E.isNormalizing(e)){if(n){var i=Array.from(K.nodes(e),o=>{var[,a]=o;return a});L6.set(e,i)}r(e).length!==0&&E.withoutNormalizing(e,()=>{for(var o of r(e))if(K.has(e,o)){var a=E.node(e,o),[u,s]=a;se.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 d=r(e).pop();if(K.has(e,d)){var f=E.node(e,d);e.normalizeNode(f)}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]=K.first(e,t);t=o}else if(i==="end"){var[,a]=K.last(e,t);t=a}}return L.isRange(t)&&(i==="start"?t=L.start(t):i==="end"?t=L.end(t):t=P.common(t.anchor.path,t.focus.path)),Ae.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return K.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=z6.get(e);return t||(t=new Set,z6.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]=K.last(e,t);i=o}else{var[,a]=K.first(e,t);i=a}var u=K.get(e,i);if(!ee.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(L.isRange(t)){var[s,l]=L.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=H6.get(e);return t||(t=new Set,H6.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]=L.edges(a),l=i?s:u,c=!1,d="",f=0,p=0,m=0;for(var[g,h]of E.nodes(e,{at:n,reverse:i,voids:o})){if(se.isElement(g)){if(!o&&e.isVoid(g)){yield E.start(e,h);continue}if(e.isInline(g))continue;if(E.hasInlines(e,g)){var v=P.isAncestor(h,s.path)?s:E.end(e,h),y=P.isAncestor(h,u.path)?u:E.start(e,h);d=E.string(e,{anchor:y,focus:v},{voids:o}),c=!0}}if(ee.isText(g)){var $=P.equals(h,l.path);for($?(p=i?l.offset:g.text.length-l.offset,m=l.offset):(p=g.text.length,m=i?p:0),($||c||r==="offset")&&(yield{path:h,offset:m},c=!1);;){if(f===0){if(d==="")break;f=w(d,r,i),d=U$(d,f,i)[1]}if(m=i?m-f:m+f,p=p-f,p<0){f=-p;break}f=0,yield{path:h,offset:m}}}}function w(S,C,x){return C==="character"?H$(S,x):C==="word"?FI(S,x):C==="line"||C==="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=d=>l.children.includes(d)}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(L.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=U6.get(e);return t||(t=new Set,U6.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){M6.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]=L.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:ee.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]=L.edges(t);if(i.offset!==0||o.offset!==0||L.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[d,f]of E.nodes(e,{at:l,match:ee.isText,reverse:!0,voids:r})){if(c){c=!1;continue}if(d.text!==""||P.isBefore(f,u)){o={path:f,offset:d.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,au(au({},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)}},JI={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(P.isPath)}},QI=["children"],ej=["text"],K6=new WeakMap,K={ancestor(e,t){var n=K.get(e,t);if(ee.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=K.ancestor(e,r),o=[i,r];yield o}},child(e,t){if(ee.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=K.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 K.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 K.nodes(e,t))se.isElement(n)&&(yield[n,r])},extractProps(e){if(se.isAncestor(e)){var t=fi(e,QI);return t}else{var t=fi(e,ej);return t}},first(e,t){for(var n=t.slice(),r=K.get(e,n);r&&!(ee.isText(r)||r.children.length===0);)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(ee.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=ig({children:e.children},r=>{var[i,o]=L.edges(t),a=K.nodes(r,{reverse:!0,pass:f=>{var[,p]=f;return!L.includes(t,p)}});for(var[,u]of a){if(!L.includes(t,u)){var s=K.parent(r,u),l=u[u.length-1];s.children.splice(l,1)}if(P.equals(u,o.path)){var c=K.leaf(r,u);c.text=c.text.slice(0,o.offset)}if(P.equals(u,i.path)){var d=K.leaf(r,u);d.text=d.text.slice(i.offset)}}E.isEditor(r)&&(r.selection=null)});return n.children},get(e,t){for(var n=e,r=0;rK.isNode(r));return K6.set(e,n),n},last(e,t){for(var n=t.slice(),r=K.get(e,n);r&&!(ee.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=K.get(e,t);if(!ee.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=K.get(e,r);yield[i,r]}},matches(e,t){return se.isElement(e)&&se.isElementProps(t)&&se.matches(e,t)||ee.isText(e)&&ee.isTextProps(t)&&ee.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)&&!ee.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=K.get(e,u);continue}if(u.length===0)break;if(!r){var c=P.next(u);if(K.has(e,c)){u=c,s=K.get(e,u);continue}}if(r&&u[u.length-1]!==0){var d=P.previous(u);u=d,s=K.get(e,u);continue}u=P.parent(u),s=K.get(e,u),a.add(s)}},parent(e,t){var n=P.parent(t),r=K.get(e,n);if(ee.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 ee.isText(e)?e.text:e.children.map(K.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[n,r]of K.nodes(e,t))ee.isText(n)&&(yield[n,r])}};function Y6(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 tt(e){for(var t=1;tSc.isOperation(t))},isSelectionOperation(e){return Sc.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Sc.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return tt(tt({},e),{},{type:"remove_node"});case"insert_text":return tt(tt({},e),{},{type:"remove_text"});case"merge_node":return tt(tt({},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 tt(tt({},e),{},{path:t,newPath:n});var r=P.transform(n,e),i=P.transform(P.next(n),e);return tt(tt({},e),{},{path:r,newPath:i})}case"remove_node":return tt(tt({},e),{},{type:"insert_node"});case"remove_text":return tt(tt({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return tt(tt({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:u,newProperties:s}=e;return u==null?tt(tt({},e),{},{properties:s,newProperties:null}):s==null?tt(tt({},e),{},{properties:null,newProperties:u}):tt(tt({},e),{},{properties:s,newProperties:u})}case"split_node":return tt(tt({},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 ig(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:d,newPath:f}=t;if(P.equals(d,f))return;if(P.isAncestor(d,r)||P.equals(d,r)){var p=f.slice();return P.endsBefore(d,f)&&d.lengtht.offset?1:0:n},isAfter(e,t){return Ae.compare(e,t)===1},isBefore(e,t){return Ae.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&P.equals(e.path,t.path)},isPoint(e){return tn(e)&&typeof e.offset=="number"&&P.isPath(e.path)},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ig(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 L.isBackward(e)===n?[r,i]:[i,r]},end(e){var[,t]=L.edges(e);return t},equals(e,t){return Ae.equals(e.anchor,t.anchor)&&Ae.equals(e.focus,t.focus)},includes(e,t){if(L.isRange(t)){if(L.includes(e,t.anchor)||L.includes(e,t.focus))return!0;var[n,r]=L.edges(e),[i,o]=L.edges(t);return Ae.isBefore(n,i)&&Ae.isAfter(r,o)}var[a,u]=L.edges(e),s=!1,l=!1;return Ae.isPoint(t)?(s=Ae.compare(t,a)>=0,l=Ae.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=fi(e,tj),[r,i]=L.edges(e),[o,a]=L.edges(t),u=Ae.isBefore(r,o)?o:r,s=Ae.isBefore(i,a)?i:a;return Ae.isBefore(s,u)?null:nj({anchor:u,focus:s},n)},isBackward(e){var{anchor:t,focus:n}=e;return Ae.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return Ae.equals(t,n)},isExpanded(e){return!L.isCollapsed(e)},isForward(e){return!L.isBackward(e)},isRange(e){return tn(e)&&Ae.isPoint(e.anchor)&&Ae.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=L.edges(e);return t},transform(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ig(e,r=>{if(r===null)return null;var{affinity:i="inward"}=n,o,a;if(i==="inward"){var u=L.isCollapsed(r);L.isForward(r)?(o="forward",a=u?o:"backward"):(o="backward",a=u?o:"forward")}else i==="outward"?L.isForward(r)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var s=Ae.transform(r.anchor,t,{affinity:o}),l=Ae.transform(r.focus,t,{affinity:a});if(!s||!l)return null;r.anchor=s,r.focus=l})}},M9=(e,t)=>{for(var n in e){var r=e[n],i=t[n];if(tn(r)&&tn(i)){if(!M9(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=fi(o,rj);return a}return M9(r?i(e):e,r?i(t):t)},isText(e){return tn(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>ee.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=[Zr({},e)];for(var r of t){var i=fi(r,ij),[o,a]=L.edges(r),u=[],s=0;for(var l of n){var{length:c}=l.text,d=s;if(s+=c,o.offset<=d&&a.offset>=s){Object.assign(l,i),u.push(l);continue}if(o.offset!==a.offset&&(o.offset===s||a.offset===d)||o.offset>s||a.offsetd){var h=o.offset-d;p=Zr(Zr({},f),{},{text:f.text.slice(0,h)}),f=Zr(Zr({},f),{},{text:f.text.slice(h)})}Object.assign(f,i),p&&u.push(p),u.push(f),m&&u.push(m)}n=u}return n}};function eE(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 cl(e){for(var t=1;t{switch(n.type){case"insert_node":{var{path:r,node:i}=n,o=K.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 L.points(t))t[s]=Ae.transform(u,n);break}case"insert_text":{var{path:l,offset:c,text:d}=n;if(d.length===0)break;var f=K.leaf(e,l),p=f.text.slice(0,c),m=f.text.slice(c);if(f.text=p+d+m,t)for(var[g,h]of L.points(t))t[h]=Ae.transform(g,n);break}case"merge_node":{var{path:v}=n,y=K.get(e,v),$=P.previous(v),w=K.get(e,$),S=K.parent(e,v),C=v[v.length-1];if(ee.isText(y)&&ee.isText(w))w.text+=y.text;else if(!ee.isText(y)&&!ee.isText(w))w.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(v,"] to nodes of different interfaces: ").concat(y," ").concat(w));if(S.children.splice(C,1),t)for(var[x,I]of L.points(t))t[I]=Ae.transform(x,n);break}case"move_node":{var{path:M,newPath:V}=n;if(P.isAncestor(M,V))throw new Error("Cannot move a path [".concat(M,"] to new path [").concat(V,"] because the destination is inside itself."));var Y=K.get(e,M),X=K.parent(e,M),Z=M[M.length-1];X.children.splice(Z,1);var ie=P.transform(M,n),re=K.get(e,P.parent(ie)),ae=ie[ie.length-1];if(re.children.splice(ae,0,Y),t)for(var[pe,Pe]of L.points(t))t[Pe]=Ae.transform(pe,n);break}case"remove_node":{var{path:me}=n,ne=me[me.length-1],Ie=K.parent(e,me);if(Ie.children.splice(ne,1),t)for(var[B,O]of L.points(t)){var k=Ae.transform(B,n);if(t!=null&&k!=null)t[O]=k;else{var _=void 0,H=void 0;for(var[N,J]of K.texts(e))if(P.compare(J,me)===-1)_=[N,J];else{H=[N,J];break}var ce=!1;_&&H&&(P.equals(H[1],me)?ce=!P.hasPrevious(H[1]):ce=P.common(_[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(K.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),L.isRange(a))if(r||(a=E.unhangRange(e,a)),L.isCollapsed(a))a=a.anchor;else{var[,c]=L.edges(a),d=E.pointRef(e,c);j.delete(e,{at:a}),a=d.unref()}if(Ae.isPoint(a)){u==null&&(ee.isText(l)?u=C=>ee.isText(C):e.isInline(l)?u=C=>ee.isText(C)||E.isInline(e,C):u=C=>E.isBlock(e,C));var[f]=E.nodes(e,{at:a.path,match:u,mode:o,voids:i});if(f){var[,p]=f,m=E.pathRef(e,p),g=E.isEnd(e,a,p);j.splitNodes(e,{at:a,match:u,mode:o,voids:i});var h=m.unref();a=g?P.next(h):h}else return}var v=P.parent(a),y=a[a.length-1];if(!(!i&&E.void(e,{at:v}))){for(var $ of t){var w=v.concat(y);y++,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&&j.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)?uu(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)),[d,f]=c,p=l[l.length-1],{length:m}=d.children;if(m===1){var g=P.next(f);j.moveNodes(e,{at:l,to:g,voids:i}),j.removeNodes(e,{at:f,voids:i})}else if(p===0)j.moveNodes(e,{at:l,to:f,voids:i});else if(p===m-1){var h=P.next(f);j.moveNodes(e,{at:l,to:h,voids:i})}else{var v=P.next(l),y=P.next(f);j.splitNodes(e,{at:v,voids:i}),j.moveNodes(e,{at:l,to:y,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=M=>u.children.includes(M)}else n=M=>E.isBlock(e,M);if(!i&&L.isRange(r)&&(r=E.unhangRange(e,r)),L.isRange(r))if(L.isCollapsed(r))r=r.anchor;else{var[,s]=L.edges(r),l=E.pointRef(e,s);j.delete(e,{at:r}),r=l.unref(),t.at==null&&j.select(e,r)}var[c]=E.nodes(e,{at:r,match:n,voids:o,mode:a}),d=E.previous(e,{at:r,match:n,voids:o,mode:a});if(!(!c||!d)){var[f,p]=c,[m,g]=d;if(!(p.length===0||g.length===0)){var h=P.next(g),v=P.common(p,g),y=P.isSibling(p,g),$=Array.from(E.levels(e,{at:p}),M=>{var[V]=M;return V}).slice(v.length).slice(0,-1),w=E.above(e,{at:p,mode:"highest",match:M=>$.includes(M)&&z9(e,M)}),S=w&&E.pathRef(e,w[1]),C,x;if(ee.isText(f)&&ee.isText(m)){var I=fi(f,uj);x=m.text.length,C=I}else if(se.isElement(f)&&se.isElement(m)){var I=fi(f,sj);x=m.children.length,C=I}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(f)," ").concat(JSON.stringify(m)));y||j.moveNodes(e,{at:p,to:h,voids:o}),S&&j.removeNodes(e,{at:S.current,voids:o}),se.isElement(m)&&E.isEmpty(e,m)||ee.isText(m)&&m.text===""&&g[g.length-1]!==0?j.removeNodes(e,{at:g,voids:o}):e.apply({type:"merge_node",path:h,position:x,properties:C}),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)?uu(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 d=c.unref(),f=u.current;d.length!==0&&e.apply({type:"move_node",path:d,newPath:f}),u.current&&P.isSibling(f,d)&&P.isAfter(f,d)&&(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)?uu(e,o):f=>E.isBlock(e,f)),!n&&L.isRange(o)&&(o=E.unhangRange(e,o));var u=E.nodes(e,{at:o,match:a,mode:i,voids:r}),s=Array.from(u,f=>{var[,p]=f;return E.pathRef(e,p)});for(var l of s){var c=l.unref();if(c){var[d]=E.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}})},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)?uu(e,i):S=>E.isBlock(e,S)),!o&&L.isRange(i)&&(i=E.unhangRange(e,i)),u&&L.isRange(i)){if(L.isCollapsed(i)&&E.leaf(e,i.anchor)[0].text.length>0)return;var l=E.rangeRef(e,i,{affinity:"inward"}),[c,d]=L.edges(i),f=a==="lowest"?"lowest":"highest",p=E.isEnd(e,d,d.path);j.splitNodes(e,{at:d,match:r,mode:f,voids:s,always:!p});var m=E.isStart(e,c,c.path);j.splitNodes(e,{at:c,match:r,mode:f,voids:s,always:!m}),i=l.unref(),n.at==null&&j.select(e,i)}for(var[g,h]of E.nodes(e,{at:i,match:r,mode:a,voids:s})){var v={},y={};if(h.length!==0){var $=!1;for(var w in t)w==="children"||w==="text"||t[w]!==g[w]&&($=!0,g.hasOwnProperty(w)&&(v[w]=g[w]),t[w]!=null&&(y[w]=t[w]));$&&e.apply({type:"set_node",path:h,properties:v,newProperties:y})}}}})},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)),L.isRange(o)&&(o=cj(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 d=E.pointRef(e,o,{affinity:"backward"}),[f]=E.nodes(e,{at:o,match:i,mode:n,voids:r});if(!!f){var p=E.void(e,{at:o,mode:"highest"}),m=0;if(!r&&p){var[g,h]=p;if(se.isElement(g)&&e.isInline(g)){var v=E.after(e,h);if(!v){var y={text:""},$=P.next(h);j.insertNodes(e,y,{at:$,voids:r}),v=E.point(e,$)}o=v,u=!0}var w=o.path.length-h.length;a=w+1,u=!0}var S=E.pointRef(e,o),C=o.path.length-a,[,x]=f,I=o.path.slice(0,C),M=a===0?o.offset:o.path[C]+m;for(var[V,Y]of E.levels(e,{at:I,reverse:!0,voids:r})){var X=!1;if(Y.length2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var i of t)r[i]=null;j.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)?uu(e,o):f=>E.isBlock(e,f)),P.isPath(o)&&(o=E.range(e,o));var u=L.isRange(o)?E.rangeRef(e,o):null,s=E.nodes(e,{at:o,match:a,mode:n,voids:i}),l=Array.from(s,f=>{var[,p]=f;return E.pathRef(e,p)}).reverse(),c=function(p){var m=p.unref(),[g]=E.node(e,m),h=E.range(e,m);r&&u&&(h=L.intersection(u.current,h)),j.liftNodes(e,{at:h,match:v=>se.isAncestor(g)&&g.children.includes(v),voids:i})};for(var d of l)c(d);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=uu(e,u):e.isInline(t)?a=h=>E.isInline(e,h)||ee.isText(h):a=h=>E.isBlock(e,h)),i&&L.isRange(u)){var[s,l]=L.edges(u),c=E.rangeRef(e,u,{affinity:"inward"});j.splitNodes(e,{at:l,match:a,voids:o}),j.splitNodes(e,{at:s,match:a,voids:o}),u=c.unref(),n.at==null&&j.select(e,u)}var d=Array.from(E.nodes(e,{at:u,match:e.isInline(t)?h=>E.isBlock(e,h):h=>E.isEditor(h),mode:"lowest",voids:o}));for(var[,f]of d){var p=L.isRange(u)?L.intersection(u,E.range(e,f)):u;if(!!p){var m=Array.from(E.nodes(e,{at:p,match:a,mode:r,voids:o}));if(m.length>0){var g=function(){var[h]=m,v=m[m.length-1],[,y]=h,[,$]=v;if(y.length===0&&$.length===0)return"continue";var w=P.equals(y,$)?P.parent(y):P.common(y,$),S=E.range(e,y,$),C=E.node(e,w),[x]=C,I=w.length+1,M=P.next($.slice(0,I)),V=nE(nE({},t),{},{children:[]});j.insertNodes(e,V,{at:M,voids:o}),j.moveNodes(e,{at:S,match:Y=>se.isAncestor(x)&&x.children.includes(Y),to:M.concat(0),voids:o})}();if(g==="continue")continue}}}}})}},z9=(e,t)=>{if(se.isElement(t)){var n=t;return E.isVoid(e,t)?!0:n.children.length===1?z9(e,n.children[0]):!1}else return!E.isEditor(t)},cj=(e,t)=>{if(L.isCollapsed(t))return t.anchor;var[,n]=L.edges(t),r=E.pointRef(e,n);return j.delete(e,{at:t}),r.unref()},uu=(e,t)=>{var[n]=E.node(e,t);return r=>r===n};function rE(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 iE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r){if(n==="anchor")j.select(e,r.anchor);else if(n==="focus")j.select(e,r.focus);else if(n==="start"){var[i]=L.edges(r);j.select(e,i)}else if(n==="end"){var[,o]=L.edges(r);j.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=L.isBackward(n)?"focus":"anchor"),a==="end"&&(a=L.isBackward(n)?"anchor":"focus");var{anchor:u,focus:s}=n,l={distance:r,unit:i},c={};if(a==null||a==="anchor"){var d=o?E.before(e,u,l):E.after(e,u,l);d&&(c.anchor=d)}if(a==null||a==="focus"){var f=o?E.before(e,s,l):E.after(e,s,l);f&&(c.focus=f)}j.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=E.range(e,t),n){j.setSelection(e,t);return}if(!L.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=L.isBackward(r)?"focus":"anchor"),i==="end"&&(i=L.isBackward(r)?"anchor":"focus");var{anchor:o,focus:a}=r,u=i==="anchor"?o:a;j.setSelection(e,{[i==="anchor"?"anchor":"focus"]:iE(iE({},u),t)})}},setSelection(e,t){var{selection:n}=e,r={},i={};if(!!n){for(var o in t)(o==="anchor"&&t.anchor!=null&&!Ae.equals(t.anchor,n.anchor)||o==="focus"&&t.focus!=null&&!Ae.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})}}},dj={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(L.isRange(a)&&L.isCollapsed(a)&&(a=a.anchor),Ae.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},d=n?E.before(e,a,c)||E.start(e,[]):E.after(e,a,c)||E.end(e,[]);a={anchor:a,focus:d},u=!0}}if(P.isPath(a)){j.removeNodes(e,{at:a,voids:o});return}if(!L.isCollapsed(a)){if(!u){var[,f]=L.edges(a),p=E.end(e,[]);Ae.equals(f,p)||(a=E.unhangRange(e,a,{voids:o}))}var[m,g]=L.edges(a),h=E.above(e,{match:ce=>E.isBlock(e,ce),at:m,voids:o}),v=E.above(e,{match:ce=>E.isBlock(e,ce),at:g,voids:o}),y=h&&v&&!P.equals(h[1],v[1]),$=P.equals(m.path,g.path),w=o?null:E.void(e,{at:m,mode:"highest"}),S=o?null:E.void(e,{at:g,mode:"highest"});if(w){var C=E.before(e,m);C&&h&&P.isAncestor(h[1],C.path)&&(m=C)}if(S){var x=E.after(e,g);x&&v&&P.isAncestor(v[1],x.path)&&(g=x)}var I=[],M;for(var V of E.nodes(e,{at:a,voids:o})){var[Y,X]=V;M&&P.compare(X,M)===0||(!o&&E.isVoid(e,Y)||!P.isCommon(X,m.path)&&!P.isCommon(X,g.path))&&(I.push(V),M=X)}var Z=Array.from(I,ce=>{var[,we]=ce;return E.pathRef(e,we)}),ie=E.pointRef(e,m),re=E.pointRef(e,g);if(!$&&!w){var ae=ie.current,[pe]=E.leaf(e,ae),{path:Pe}=ae,{offset:me}=m,ne=pe.text.slice(me);ne.length>0&&e.apply({type:"remove_text",path:Pe,offset:me,text:ne})}for(var Ie of Z){var B=Ie.unref();j.removeNodes(e,{at:B,voids:o})}if(!S){var O=re.current,[k]=E.leaf(e,O),{path:_}=O,H=$?m.offset:0,N=k.text.slice(H,g.offset);N.length>0&&e.apply({type:"remove_text",path:_,offset:H,text:N})}!$&&y&&re.current&&ie.current&&j.mergeNodes(e,{at:re.current,hanging:!0,voids:o});var J=n?ie.unref()||re.unref():re.unref()||ie.unref();t.at==null&&J&&j.select(e,J)}}})},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(L.isRange(o))if(r||(o=E.unhangRange(e,o)),L.isCollapsed(o))o=o.anchor;else{var[,a]=L.edges(o);if(!i&&E.void(e,{at:a}))return;var u=E.pointRef(e,a);j.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 d=E.before(e,l);o=d}}var f=E.above(e,{match:k=>E.isBlock(e,k),at:o,voids:i}),[,p]=f,m=E.isStart(e,o,p),g=E.isEnd(e,o,p),h=m&&g,v=!m||m&&g,y=!g,[,$]=K.first({children:t},[]),[,w]=K.last({children:t},[]),S=[],C=k=>{var[_,H]=k,N=H.length===0;return N?!1:h?!0:!(v&&P.isAncestor(H,$)&&se.isElement(_)&&!e.isVoid(_)&&!e.isInline(_)||y&&P.isAncestor(H,w)&&se.isElement(_)&&!e.isVoid(_)&&!e.isInline(_))};for(var x of K.nodes({children:t},{pass:C}))C(x)&&S.push(x);var I=[],M=[],V=[],Y=!0,X=!1;for(var[Z]of S)se.isElement(Z)&&!e.isInline(Z)?(Y=!1,X=!0,M.push(Z)):Y?I.push(Z):V.push(Z);var[ie]=E.nodes(e,{at:o,match:k=>ee.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),[,re]=ie,ae=E.isStart(e,o,re),pe=E.isEnd(e,o,re),Pe=E.pathRef(e,g?P.next(p):p),me=E.pathRef(e,pe?P.next(re):re),ne=E.pathRef(e,p);j.splitNodes(e,{at:o,match:k=>X?E.isBlock(e,k):ee.isText(k)||E.isInline(e,k),mode:X?"lowest":"highest",voids:i});var Ie=E.pathRef(e,!ae||ae&&pe?P.next(re):re);if(j.insertNodes(e,I,{at:Ie.current,match:k=>ee.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),h&&M.length&&j.delete(e,{at:ne.unref(),voids:i}),j.insertNodes(e,M,{at:Pe.current,match:k=>E.isBlock(e,k),mode:"lowest",voids:i}),j.insertNodes(e,V,{at:me.current,match:k=>ee.isText(k)||E.isInline(e,k),mode:"highest",voids:i}),!n.at){var B;V.length>0?B=P.previous(me.current):M.length>0?B=P.previous(Pe.current):B=P.previous(Ie.current);var O=E.end(e,B);j.select(e,O)}Ie.unref(),Pe.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)),L.isRange(i))if(L.isCollapsed(i))i=i.anchor;else{var o=L.end(i);if(!r&&E.void(e,{at:o}))return;var a=E.pointRef(e,o);j.delete(e,{at:i,voids:r}),i=a.unref(),j.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 oE(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 Vd(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=H9}function tO(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function nO(e){return!!e&&typeof e=="object"}function lN(e){return typeof e=="string"||!Q9(e)&&nO(e)&&Xf.call(e)==mj}function cN(e){if(!e)return[];if(G$(e))return lN(e)?zj(e):nN(e);if(Qv&&e[Qv])return Nj(e[Qv]());var t=Jo(e),n=t==I2?Rj:t==j2?Mj:dN;return n(e)}function fN(e){return G$(e)?Jj(e):tN(e)}function dN(e){return e?Pj(e,fN(e)):[]}var fE=cN;function dE(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function q$(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(n){typeof e[n]>"u"?e[n]=t[n]:dE(t[n])&&dE(e[n])&&Object.keys(t[n]).length>0&&q$(e[n],t[n])})}var rO={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 Jf(){var e=typeof document<"u"?document:{};return q$(e,rO),e}var pN={document:rO,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 Va(){var e=typeof window<"u"?window:{};return q$(e,pN),e}function hN(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function V2(e){return V2=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},V2(e)}function wh(e,t){return wh=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},wh(e,t)}function gN(){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 qp(e,t,n){return gN()?qp=Reflect.construct:qp=function(i,o,a){var u=[null];u.push.apply(u,o);var s=Function.bind.apply(i,u),l=new s;return a&&wh(l,a.prototype),l},qp.apply(null,arguments)}function vN(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function W2(e){var t=typeof Map=="function"?new Map:void 0;return W2=function(r){if(r===null||!vN(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 qp(r,arguments,V2(this).constructor)}return i.prototype=Object.create(r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),wh(i,r)},W2(e)}function mN(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yN(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(r){t.__proto__=r}})}var Ki=function(e){hN(t,e);function t(n){var r;return r=e.call.apply(e,[this].concat(n))||this,yN(mN(r)),r}return t}(W2(Array));function ug(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,ug(n)):t.push(n)}),t}function iO(e,t){return Array.prototype.filter.call(e,t)}function bN(e){for(var t=[],n=0;n=0&&o.indexOf(">")>=0){var a="div";o.indexOf("0}).length>0}function Xn(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[$N(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 Rr(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 Lr(){for(var e=arguments.length,t=new Array(e),n=0;n=0;p-=1){var m=f[p];o&&m.listener===o||o&&m.listener&&m.listener.dom7proxy&&m.listener.dom7proxy===o?(d.removeEventListener(l,m.proxyListener,a),f.splice(p,1)):o||(d.removeEventListener(l,m.proxyListener,a),f.splice(p,1))}}return this}function Dh(){var e=Va();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Sh(){var e=Va();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function hE(){if(this.length>0){var e=Va(),t=Jf(),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 cs(){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=F(e),o=0;o=0;r-=1)this[n].insertBefore(i.childNodes[r],this[n].childNodes[0])}else if(e instanceof Ki)for(r=0;r"u"){for(var o=0;o-1&&e%1==0&&e-1&&e%1==0&&e<=aO}function GN(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qN(e){return!!e&&typeof e=="object"}function KN(e){return Y$(e)?kN(e):jN(e)}function YN(e){return e}var lO=zN;{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 cO=(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 fO="Expected a function",bE=0/0,XN="[object Symbol]",ZN=/^\s+|\s+$/g,JN=/^[-+]0x[0-9a-f]+$/i,QN=/^0b[01]+$/i,eR=/^0o[0-7]+$/i,tR=parseInt,nR=typeof it=="object"&&it&&it.Object===Object&&it,rR=typeof self=="object"&&self&&self.Object===Object&&self,iR=nR||rR||Function("return this")(),oR=Object.prototype,aR=oR.toString,uR=Math.max,sR=Math.min,e1=function(){return iR.Date.now()};function lR(e,t,n){var r,i,o,a,u,s,l=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(fO);t=$E(t)||0,Fh(n)&&(c=!!n.leading,d="maxWait"in n,o=d?uR($E(n.maxWait)||0,t):o,f="trailing"in n?!!n.trailing:f);function p(C){var x=r,I=i;return r=i=void 0,l=C,a=e.apply(I,x),a}function m(C){return l=C,u=setTimeout(v,t),c?p(C):a}function g(C){var x=C-s,I=C-l,M=t-x;return d?sR(M,o-I):M}function h(C){var x=C-s,I=C-l;return s===void 0||x>=t||x<0||d&&I>=o}function v(){var C=e1();if(h(C))return y(C);u=setTimeout(v,g(C))}function y(C){return u=void 0,f&&r?p(C):(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:y(e1())}function S(){var C=e1(),x=h(C);if(r=arguments,i=this,s=C,x){if(u===void 0)return m(s);if(d)return u=setTimeout(v,t),p(s)}return u===void 0&&(u=setTimeout(v,t)),a}return S.cancel=$,S.flush=w,S}function cR(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(fO);return Fh(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),lR(e,t,{leading:r,maxWait:t,trailing:i})}function Fh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function fR(e){return!!e&&typeof e=="object"}function dR(e){return typeof e=="symbol"||fR(e)&&aR.call(e)==XN}function $E(e){if(typeof e=="number")return e;if(dR(e))return bE;if(Fh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(ZN,"");var n=QN.test(e);return n||eR.test(e)?tR(e.slice(2),n?2:8):JN.test(e)?bE:+e}var Ta=cR;function pR(e,t){return document.createElement(e,t)}function hR(e,t,n){return document.createElementNS(e,t,n)}function gR(e){return document.createTextNode(e)}function vR(e){return document.createComment(e)}function mR(e,t,n){e.insertBefore(t,n)}function yR(e,t){e.removeChild(t)}function bR(e,t){e.appendChild(t)}function $R(e){return e.parentNode}function wR(e){return e.nextSibling}function ER(e){return e.tagName}function DR(e,t){e.textContent=t}function SR(e){return e.textContent}function CR(e){return e.nodeType===1}function xR(e){return e.nodeType===3}function AR(e){return e.nodeType===8}const OR={createElement:pR,createElementNS:hR,createTextNode:gR,createComment:vR,insertBefore:mR,removeChild:yR,appendChild:bR,parentNode:$R,nextSibling:wR,tagName:ER,setTextContent:DR,getTextContent:SR,isElement:CR,isText:xR,isComment:AR};function uf(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 G2=Array.isArray;function Kp(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}function t1(e){return e===void 0}function Dn(e){return e!==void 0}const wE=uf("",{},[],void 0,void 0);function fl(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 BR(e){return e.sel!==void 0}function FR(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 TR=["create","update","remove","destroy","pre","post"];function kR(e,t){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},r=t!==void 0?t:OR;for(const f of TR)for(const p of e){const m=p[f];m!==void 0&&n[f].push(m)}function i(f){const p=f.id?"#"+f.id:"",m=f.getAttribute("class"),g=m?"."+m.split(" ").join("."):"";return uf(r.tagName(f).toLowerCase()+p+g,{},[],void 0,f)}function o(f,p){return function(){if(--p===0){const g=r.parentNode(f);r.removeChild(g,f)}}}function a(f,p){var m,g;let h,v=f.data;if(v!==void 0){const w=(m=v.hook)===null||m===void 0?void 0:m.init;Dn(w)&&(w(f),v=f.data)}const y=f.children,$=f.sel;if($==="!")t1(f.text)&&(f.text=""),f.elm=r.createComment(f.text);else if($!==void 0){const w=$.indexOf("#"),S=$.indexOf(".",w),C=w>0?w:$.length,x=S>0?S:$.length,I=w!==-1||S!==-1?$.slice(0,Math.min(C,x)):$,M=f.elm=Dn(v)&&Dn(h=v.ns)?r.createElementNS(h,I,v):r.createElement(I,v);for(C0&&M.setAttribute("class",$.slice(x+1).replace(/\./g," ")),h=0;hy?(Y=m[S+1]==null?null:m[S+1].elm,u(f,Y,m,v,S,g)):l(f,p,h,y))}function d(f,p,m){var g,h,v,y,$;const w=(g=p.data)===null||g===void 0?void 0:g.hook;(h=w==null?void 0:w.prepatch)===null||h===void 0||h.call(w,f,p);const S=p.elm=f.elm,C=f.children,x=p.children;if(f!==p){if(p.data!==void 0){for(let I=0;Ii?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:TL(e,t,n)}function _L(e){return function(t){t=cg(t);var n=FO(t)?xL(t):void 0,r=n?n[0]:t.charAt(0),i=n?PL(n,1).join(""):t.slice(1);return r[e]()+i}}function IL(e){return function(t){return $L(HL(ML(t).replace(cL,"")),e,"")}}function jL(e){return!!e&&typeof e=="object"}function NL(e){return typeof e=="symbol"||jL(e)&&FL.call(e)==XR}function cg(e){return e==null?"":kL(e)}var RL=IL(function(e,t,n){return t=t.toLowerCase(),e+(n?LL(t):t)});function LL(e){return zL(cg(e).toLowerCase())}function ML(e){return e=cg(e),e&&e.replace(JR,SL).replace(fL,"")}var zL=_L("toUpperCase");function HL(e,t,n){return e=cg(e),t=n?void 0:t,t===void 0?CL(e)?OL(e):EL(e):e.match(t)||[]}var UL=RL,VL=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),r1={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},TO={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:VL?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Q$={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 Wd=1;Wd<20;Wd++)Q$["f"+Wd]=111+Wd;function kO(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(a){return GL(a,t)}),i=function(u){return r.some(function(s){return qL(s,u)})},o=n==null?i:i(n);return o}function WL(e,t){return kO(e,{byKey:!0},t)}function GL(e,t){var n=t&&t.byKey,r={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in r1)r[r1[a]]=!1;var u=!0,s=!1,l=void 0;try{for(var c=i[Symbol.iterator](),d;!(u=(d=c.next()).done);u=!0){var f=d.value,p=f.endsWith("?")&&f.length>1;p&&(f=f.slice(0,-1));var m=PO(f),g=r1[m];if(f.length>1&&!g&&!TO[f]&&!Q$[m])throw new TypeError('Unknown modifier: "'+f+'"');(o===1||!g)&&(n?r.key=m:r.which=KL(f)),g&&(r[g]=p?null:!0)}}catch(h){s=!0,l=h}finally{try{!u&&c.return&&c.return()}finally{if(s)throw l}}return r}function qL(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 KL(e){e=PO(e);var t=Q$[e]||e.toUpperCase().charCodeAt(0);return t}function PO(e){return e=e.toLowerCase(),e=TO[e]||e,e}var YL=kO,i1=WL,XL=typeof it=="object"&&it&&it.Object===Object&&it,ZL=typeof self=="object"&&self&&self.Object===Object&&self;XL||ZL||Function("return this")();V$(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]",d="[object GeneratorFunction]",f="[object Map]",p="[object Number]",m="[object Object]",g="[object Promise]",h="[object RegExp]",v="[object Set]",y="[object String]",$="[object Symbol]",w="[object WeakMap]",S="[object ArrayBuffer]",C="[object DataView]",x="[object Float32Array]",I="[object Float64Array]",M="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",Z="[object Uint8ClampedArray]",ie="[object Uint16Array]",re="[object Uint32Array]",ae=/[\\^$.*+?()[\]{}|]/g,pe=/\w*$/,Pe=/^\[object .+?Constructor\]$/,me=/^(?:0|[1-9]\d*)$/,ne={};ne[o]=ne[a]=ne[S]=ne[C]=ne[u]=ne[s]=ne[x]=ne[I]=ne[M]=ne[V]=ne[Y]=ne[f]=ne[p]=ne[m]=ne[h]=ne[v]=ne[y]=ne[$]=ne[X]=ne[Z]=ne[ie]=ne[re]=!0,ne[l]=ne[c]=ne[w]=!1;var Ie=typeof it=="object"&&it&&it.Object===Object&&it,B=typeof self=="object"&&self&&self.Object===Object&&self,O=Ie||B||Function("return this")(),k=t&&!t.nodeType&&t,_=k&&!0&&e&&!e.nodeType&&e,H=_&&_.exports===k;function N(b,D){return b.set(D[0],D[1]),b}function J(b,D){return b.add(D),b}function ce(b,D){for(var A=-1,R=b?b.length:0;++A-1}function mv(b,D){var A=this.__data__,R=nu(A,b);return R<0?A.push([b,D]):A[R][1]=D,this}Ht.prototype.clear=pv,Ht.prototype.delete=hv,Ht.prototype.get=gv,Ht.prototype.has=vv,Ht.prototype.set=mv;function Xt(b){var D=-1,A=b?b.length:0;for(this.clear();++D-1&&b%1==0&&b-1&&b%1==0&&b<=i}function $r(b){var D=typeof b;return!!b&&(D=="object"||D=="function")}function zd(b){return!!b&&typeof b=="object"}function ll(b){return ou(b)?tu(b):kv(b)}function Wv(){return[]}function Gv(){return!1}e.exports=Nd});var JL=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},su;function NE(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var QL=0;function eM(e){return"__private_"+QL+++"_"+e}function tM(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 jO=e=>crypto.getRandomValues(new Uint8Array(e)),NO=(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}}},aM=(e,t)=>NO(e,t,jO),uM=(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 sM={nanoid:uM,customAlphabet:aM,customRandom:NO,urlAlphabet:oM,random:jO},o1=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 RO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}RO.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 dM(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var pM=0;function hM(e){return"__private_"+pM+++"_"+e}var a1=hM("publish");class LO{constructor(){Object.defineProperty(this,a1,{value:gM}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const n={...this.state},r={...this.state,...t};this.state=r,dM(this,a1)[a1](n,r,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}}function gM(){for(var e=arguments.length,t=new Array(e),n=0;n{r(...t)})}LO.VERSION="2.0.3";var vM=function(){return new LO},MO=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)}},LE={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"},mM=function(t){var n;if(t.type)return t.type;const r=t.name?(n=MO(t.name).extension)==null?void 0:n.toLowerCase():null;return r&&r in LE?LE[r]:"application/octet-stream"};function yM(e){return e.charCodeAt(0).toString(32)}function ME(e){let t="";return e.replace(/[^A-Z0-9]/ig,n=>(t+=`-${yM(n)}`,"/"))+t}var bM=function(t){let n="uppy";return typeof t.name=="string"&&(n+=`-${ME(t.name.toLowerCase())}`),t.type!==void 0&&(n+=`-${t.type}`),t.meta&&typeof t.meta.relativePath=="string"&&(n+=`-${ME(t.meta.relativePath.toLowerCase())}`),t.data.size!==void 0&&(n+=`-${t.data.size}`),t.data.lastModified!==void 0&&(n+=`-${t.data.lastModified}`),n},$M=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},wM=function(t,n){return n.name?n.name:t.split("/")[0]==="image"?`${t.split("/")[0]}.${t.split("/")[1]}`:"noname"};function u1(e){return e<10?`0${e}`:e.toString()}var Yp=function(){const t=new Date,n=u1(t.getHours()),r=u1(t.getMinutes()),i=u1(t.getSeconds());return`${n}:${r}:${i}`};const EM={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 BM extends AggregateError{constructor(){super(...arguments),this.isRestriction=!0}}var Vt=Tt("plugins"),dl=Tt("storeUnsubscribe"),Jr=Tt("emitter"),na=Tt("preProcessors"),ra=Tt("uploaders"),ri=Tt("postProcessors"),Pc=Tt("checkRestrictions"),s1=Tt("checkMinNumberOfFiles"),sf=Tt("checkRequiredMetaFieldsOnFile"),l1=Tt("checkRequiredMetaFields"),Pt=Tt("showOrLogErrorAndThrow"),pl=Tt("assertNewUploadAllowed"),hl=Tt("checkAndCreateFileStateObject"),gl=Tt("startIfAutoProceed"),c1=Tt("addListeners"),rr=Tt("updateOnlineStatus"),Qr=Tt("createUpload"),f1=Tt("getUpload"),ua=Tt("removeUpload"),ei=Tt("runUpload");UO=Symbol.for("uppy test: getPlugins");VO=Symbol.for("uppy test: createUpload");class WO{constructor(t){Object.defineProperty(this,ei,{value:HM}),Object.defineProperty(this,ua,{value:zM}),Object.defineProperty(this,f1,{value:MM}),Object.defineProperty(this,Qr,{value:LM}),Object.defineProperty(this,c1,{value:RM}),Object.defineProperty(this,gl,{value:NM}),Object.defineProperty(this,hl,{value:jM}),Object.defineProperty(this,pl,{value:IM}),Object.defineProperty(this,Pt,{value:_M}),Object.defineProperty(this,l1,{value:PM}),Object.defineProperty(this,sf,{value:kM}),Object.defineProperty(this,s1,{value:TM}),Object.defineProperty(this,Pc,{value:FM}),Object.defineProperty(this,Vt,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,dl,{writable:!0,value:void 0}),Object.defineProperty(this,Jr,{writable:!0,value:IO()}),Object.defineProperty(this,na,{writable:!0,value:new Set}),Object.defineProperty(this,ra,{writable:!0,value:new Set}),Object.defineProperty(this,ri,{writable:!0,value:new Set}),Object.defineProperty(this,rr,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=SM;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:vM(),logger:AM,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=OM),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=Ta(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:$M(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),Q(this,dl)[dl]=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),Q(this,c1)[c1]()}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 _O([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){Q(this,na)[na].add(t)}removePreProcessor(t){return Q(this,na)[na].delete(t)}addPostProcessor(t){Q(this,ri)[ri].add(t)}removePostProcessor(t){return Q(this,ri)[ri].delete(t)}addUploader(t){Q(this,ra)[ra].add(t)}removeUploader(t){return Q(this,ra)[ra].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:g}=m;return!g.uploadComplete&&g.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),d=i.filter(m=>m.error),f=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:d,inProgressFiles:o,inProgressNotPausedFiles:f,processingFiles:p,isUploadStarted:s.length>0,isAllComplete:n===100&&c.length===i.length&&p.length===0,isAllErrored:!!r&&d.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 Q(this,Pc)[Pc](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){Q(this,pl)[pl](t);const{files:n}=this.getState();let r=Q(this,hl)[hl](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}`),Q(this,gl)[gl](),r.id}addFiles(t){Q(this,pl)[pl]();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&&Q(this,gl)[gl](),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(d=>{r[d]&&(u[d]=r[d],delete o[d])});function s(d){return u[d]===void 0}Object.keys(a).forEach(d=>{const f=i[d].fileIDs.filter(s);if(f.length===0){delete a[d];return}a[d]={...i[d],fileIDs:f}});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(d=>{this.emit("file-removed",u[d],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=Q(this,Qr)[Qr](n,{forceAllowNewUpload:!0});return Q(this,ei)[ei](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=Q(this,Qr)[Qr]([t],{forceAllowNewUpload:!0});return Q(this,ei)[ei](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((f,p)=>f+p.progress.percentage,0),d=Math.round(c/l*100);this.setState({totalProgress:d});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 Q(this,Vt)[Vt]?Q(this,Vt)[Vt][r.type].push(r):Q(this,Vt)[Vt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(Q(this,Vt)[Vt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[UO](t){return Q(this,Vt)[Vt][t]}iteratePlugins(t){Object.values(Q(this,Vt)[Vt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=Q(this,Vt)[Vt][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(),Q(this,dl)[dl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",Q(this,rr)[rr]),window.removeEventListener("offline",Q(this,rr)[rr]))}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]?Q(this,ei)[ei](t):(Q(this,ua)[ua](t),Promise.reject(new Error("Nonexistent upload")))}[VO](){return Q(this,Qr)[Qr](...arguments)}addResultData(t,n){if(!Q(this,f1)[f1](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=Q(this,Vt)[Vt].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(()=>{Q(this,s1)[s1](n),Q(this,l1)[l1](n)}).catch(i=>{Q(this,Pt)[Pt](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=Q(this,Qr)[Qr](a);return Q(this,ei)[ei](u)}).catch(i=>{Q(this,Pt)[Pt](i,{showInformer:!1})}))}}function FM(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 Fr(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?fM(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new Fr(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 Fr(this.i18n("exceedsSize",{size:o1(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new Fr(this.i18n("exceedsSize",{size:o1(n),file:e.name}));if(r&&e.size!=null&&e.size{const r=this.getFile(n);return Q(this,sf)[sf](r)});if(t.length)throw new BM(t,`${this.i18n("missingRequiredMetaField")}`)}function _M(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 IM(e){const{allowNewUpload:t}=this.getState();t===!1&&Q(this,Pt)[Pt](new Fr(this.i18n("noMoreFilesAllowed")),{file:e})}function jM(e,t){const n=mM(t),r=wM(n,t),i=MO(r).extension,o=Boolean(t.isRemote),a=bM({...t,type:n});if(this.checkIfFileAlreadyExists(a)){const d=new Fr(this.i18n("noDuplicates",{fileName:r}));Q(this,Pt)[Pt](d,{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?Q(this,Pt)[Pt](new Fr("Cannot add the file because onBeforeFileAdded returned false."),{showInformer:!1,fileDescriptor:t}):typeof c=="object"&&c!==null&&(l=c);try{const d=Object.keys(e).map(f=>e[f]);Q(this,Pc)[Pc](l,d)}catch(d){Q(this,Pt)[Pt](d,{file:l})}return l}function NM(){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 RM(){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}),Q(this,Pt)[Pt](i,{throwErr:!1})}else Q(this,Pt)[Pt](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:Q(this,ri)[ri].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&&Q(this,sf)[sf](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",Q(this,rr)[rr]),window.addEventListener("offline",Q(this,rr)[rr]),setTimeout(Q(this,rr)[rr],3e3))}function LM(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=xM();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 MM(e){const{currentUploads:t}=this.getState();return t[e]}function zM(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function HM(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,i=[...Q(this,na)[na],...Q(this,ra)[ra],...Q(this,ri)[ri]];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),Q(this,ua)[ua](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}WO.VERSION="2.1.3";var GO=WO,UM=V$(function(e,t){var n,r,i,o,a,u,s,l,c={},d=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(B,O){for(var k in O)B[k]=O[k];return B}function m(B){var O=B.parentNode;O&&O.removeChild(B)}function g(B,O,k){var _,H,N,J={};for(N in O)N=="key"?_=O[N]:N=="ref"?H=O[N]:J[N]=O[N];if(arguments.length>2&&(J.children=arguments.length>3?n.call(arguments,2):k),typeof B=="function"&&B.defaultProps!=null)for(N in B.defaultProps)J[N]===void 0&&(J[N]=B.defaultProps[N]);return h(B,J,_,H,null)}function h(B,O,k,_,H){var N={type:B,props:O,key:k,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:H==null?++i:H};return H==null&&r.vnode!=null&&r.vnode(N),N}function v(B){return B.children}function y(B,O){this.props=B,this.context=O}function $(B,O){if(O==null)return B.__?$(B.__,B.__.__k.indexOf(B)+1):null;for(var k;O0?h(ue.type,ue.props,ue.key,null,ue.__v):ue)!=null){if(ue.__=k,ue.__b=k.__b+1,(be=st[z])===null||be&&ue.key==be.key&&ue.type===be.type)st[z]=void 0;else for(Me=0;Me2&&(J.children=arguments.length>3?n.call(arguments,2):k),h(B.type,J,_||B.key,H||B.ref,null)},t.createContext=function(B,O){var k={__c:O="__cC"+l++,__:B,Consumer:function(_,H){return _.children(H)},Provider:function(_){var H,N;return this.getChildContext||(H=[],(N={})[O]=this,this.getChildContext=function(){return N},this.shouldComponentUpdate=function(J){this.props.value!==J.value&&H.some(S)},this.sub=function(J){H.push(J);var ce=J.componentWillUnmount;J.componentWillUnmount=function(){H.splice(H.indexOf(J),1),ce&&ce.call(J)}}),_.children}};return k.Provider.__=k.Consumer.contextType=k},t.createElement=g,t.createRef=function(){return{current:null}},t.h=g,t.hydrate=function B(O,k){Ie(O,k,B)},t.isValidElement=o,t.options=r,t.render=Ie,t.toChildArray=function B(O,k){return k=k||[],O==null||typeof O=="boolean"||(Array.isArray(O)?O.some(function(_){B(_,k)}):k.push(O)),k}}),VM=function(t){return(t==null?void 0:t.nodeType)===Node.ELEMENT_NODE},WM=function(t,n){return n===void 0&&(n=document),typeof t=="string"?n.querySelector(t):VM(t)?t:null},e3=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 _O([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 zE(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var GM=0;function qM(e){return"__private_"+GM+++"_"+e}const{render:HE}=UM;function KM(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 vl=qM("updateUI");class t3 extends e3{constructor(){super(...arguments),Object.defineProperty(this,vl,{writable:!0,value:void 0})}mount(t,n){const r=n.id,i=WM(t);if(i){this.isTargetDOMEl=!0;const u=document.createDocumentFragment();return zE(this,vl)[vl]=KM(s=>{!this.uppy.getPlugin(this.id)||(HE(this.render(s),u),this.afterUpdate())}),this.uppy.log(`Installing ${r} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),HE(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 t3)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