officialblock 3.4.0 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-CHFxx1ZN.mjs → index-BrAxJ3-M.mjs} +1139 -1132
- package/dist/{index-BN85yr1I.js → index-CprQZCPg.js} +11 -11
- package/dist/{index-BO2b2Px3.mjs → index-DgiqHmpO.mjs} +19739 -19400
- package/dist/index-DqYKbflQ.js +533 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +1 -1
- package/dist/official-block.umd.js +52 -52
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-DSXNkZJa.js +0 -533
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";var q0=Object.defineProperty;var V0=(e,t,r)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ur=(e,t,r)=>V0(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("vue"),kc=require("@wangeditor/editor-for-vue"),Re=require("@wangeditor/editor"),se=require("./index-DSXNkZJa.js");function Tc(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function ll(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(r){typeof e[r]>"u"?e[r]=t[r]:Tc(t[r])&&Tc(e[r])&&Object.keys(t[r]).length>0&&ll(e[r],t[r])})}var rp={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 Da(){var e=typeof document<"u"?document:{};return ll(e,rp),e}var K0={document:rp,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 Ir(){var e=typeof window<"u"?window:{};return ll(e,K0),e}function G0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function lu(e){return lu=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},lu(e)}function Ro(e,t){return Ro=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ro(e,t)}function J0(){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 Oo(e,t,r){return J0()?Oo=Reflect.construct:Oo=function(i,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(i,s),l=new u;return a&&Ro(l,a.prototype),l},Oo.apply(null,arguments)}function X0(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function cu(e){var t=typeof Map=="function"?new Map:void 0;return cu=function(n){if(n===null||!X0(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Oo(n,arguments,lu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Ro(i,n)},cu(e)}function Y0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z0(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(n){t.__proto__=n}})}var Fr=function(e){G0(t,e);function t(r){var n;return n=e.call.apply(e,[this].concat(r))||this,Z0(Y0(n)),n}return t}(cu(Array));function Ca(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(r){Array.isArray(r)?t.push.apply(t,Ca(r)):t.push(r)}),t}function Q0(e,t){return Array.prototype.filter.call(e,t)}function em(e){for(var t=[],r=0;r<e.length;r+=1)t.indexOf(e[r])===-1&&t.push(e[r]);return t}function tm(e){return e.toLowerCase().replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function rm(e,t){if(typeof e!="string")return[e];for(var r=[],n=t.querySelectorAll(e),i=0;i<n.length;i+=1)r.push(n[i]);return r}function j(e,t){var r=Ir(),n=Da(),i=[];if(!t&&e instanceof Fr)return e;if(!e)return new Fr(i);if(typeof e=="string"){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var a="div";o.indexOf("<li")===0&&(a="ul"),o.indexOf("<tr")===0&&(a="tbody"),(o.indexOf("<td")===0||o.indexOf("<th")===0)&&(a="tr"),o.indexOf("<tbody")===0&&(a="table"),o.indexOf("<option")===0&&(a="select");var s=n.createElement(a);s.innerHTML=o;for(var u=0;u<s.childNodes.length;u+=1)i.push(s.childNodes[u])}else i=rm(e.trim(),t||n)}else if(e.nodeType||e===r||e===n)i.push(e);else if(Array.isArray(e)){if(e instanceof Fr)return e;i=e}return new Fr(em(i))}j.fn=Fr.prototype;function No(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ca(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).add.apply(o,n)}),this}function $o(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ca(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).remove.apply(o,n)}),this}function jc(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ca(t.map(function(i){return i.split(" ")}));return Q0(this,function(i){return n.filter(function(o){return i.classList.contains(o)}).length>0}).length>0}function Lo(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var r=0;r<this.length;r+=1)if(arguments.length===2)this[r].setAttribute(e,t);else for(var n in e)this[r][n]=e[n],this[r].setAttribute(n,e[n]);return this}function Rc(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Mo(){var e=this[0];if(e){var t={};if(e.dataset)for(var r in e.dataset)t[r]=e.dataset[r];else for(var n=0;n<e.attributes.length;n+=1){var i=e.attributes[n];i.name.indexOf("data-")>=0&&(t[tm(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 Io(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var r=[],n=0;n<t.selectedOptions.length;n+=1)r.push(t.selectedOptions[n].value);return r}return t.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(e)&&o.multiple&&o.nodeName.toLowerCase()==="select")for(var a=0;a<o.options.length;a+=1)o.options[a].selected=e.indexOf(o.options[a].value)>=0;else o.value=e}return this}function Uo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=t[2],a=t[3];typeof t[1]=="function"&&(n=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);function s(g){var v=g.target;if(v){var D=g.target.dom7EventData||[];if(D.indexOf(g)<0&&D.unshift(g),j(v).is(i))o.apply(v,D);else for(var C=j(v).parents(),b=0;b<C.length;b+=1)j(C[b]).is(i)&&o.apply(C[b],D)}}function u(g){var v=g&&g.target?g.target.dom7EventData||[]:[];v.indexOf(g)<0&&v.unshift(g),o.apply(this,v)}for(var l=n.split(" "),f,c=0;c<this.length;c+=1){var d=this[c];if(i)for(f=0;f<l.length;f+=1){var h=l[f];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[h]||(d.dom7LiveListeners[h]=[]),d.dom7LiveListeners[h].push({listener:o,proxyListener:s}),d.addEventListener(h,s,a)}else for(f=0;f<l.length;f+=1){var p=l[f];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[p]||(d.dom7Listeners[p]=[]),d.dom7Listeners[p].push({listener:o,proxyListener:u}),d.addEventListener(p,u,a)}}return this}function Nc(){var e=Ir();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function $c(){var e=Ir();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function Lc(){if(this.length>0){var e=Ir(),t=Da(),r=this[0],n=r.getBoundingClientRect(),i=t.body,o=r.clientTop||i.clientTop||0,a=r.clientLeft||i.clientLeft||0,s=r===e?e.scrollY:r.scrollTop,u=r===e?e.scrollX:r.scrollLeft;return{top:n.top+s-o,left:n.left+u-a}}return null}function Mc(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function Ic(){for(var e=Ir(),t=0;t<this.length;t+=1){var r=this[t];r.style.display==="none"&&(r.style.display=""),e.getComputedStyle(r,null).getPropertyValue("display")==="none"&&(r.style.display="block")}return this}function Uc(e,t){var r=Ir(),n;if(arguments.length===1)if(typeof e=="string"){if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(n=0;n<this.length;n+=1)for(var i in e)this[n].style[i]=e[i];return this}if(arguments.length===2&&typeof e=="string"){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function Ho(e){return e?(this.forEach(function(t,r){e.apply(t,[t,r])}),this):this}function zo(e){if(typeof e>"u")return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function Hc(e){if(typeof e>"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function zc(e){var t=Ir(),r=Da(),n=this[0],i,o;if(!n||typeof e>"u")return!1;if(typeof e=="string"){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(i=j(e),o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}if(e===r)return n===r;if(e===t)return n===t;if(e.nodeType||e instanceof Fr){for(i=e.nodeType?[e]:e,o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}return!1}function Wo(){for(var e,t=Da(),r=0;r<arguments.length;r+=1){e=r<0||arguments.length<=r?void 0:arguments[r];for(var n=0;n<this.length;n+=1)if(typeof e=="string"){var i=t.createElement("div");for(i.innerHTML=e;i.firstChild;)this[n].appendChild(i.firstChild)}else if(e instanceof Fr)for(var o=0;o<e.length;o+=1)this[n].appendChild(e[o]);else this[n].appendChild(e)}return this}function Wc(e){for(var t=[],r=0;r<this.length;r+=1)this[r].parentNode!==null&&(e?j(this[r].parentNode).is(e)&&t.push(this[r].parentNode):t.push(this[r].parentNode));return j(t)}function qc(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].parentNode;n;)e?j(n).is(e)&&t.push(n):t.push(n),n=n.parentNode;return j(t)}function qo(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].querySelectorAll(e),i=0;i<n.length;i+=1)t.push(n[i]);return j(t)}function Vo(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].children,i=0;i<n.length;i+=1)(!e||j(n[i]).is(e))&&t.push(n[i]);return j(t)}function Vc(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function Kc(){for(var e=0;e<this.length;e+=1){var t=this[e];if(t.nodeType===1){for(var r=0;r<t.childNodes.length;r+=1)t.childNodes[r].parentNode&&t.childNodes[r].parentNode.removeChild(t.childNodes[r]);t.textContent=""}}return this}var nm="resize scroll".split(" ");function im(e){function t(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];if(typeof n[0]>"u"){for(var o=0;o<this.length;o+=1)nm.indexOf(e)<0&&(e in this[o]?this[o][e]():j(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}return t}var Ko=im("focus");Wo&&(j.fn.append=Wo);Uo&&(j.fn.on=Uo);Ko&&(j.fn.focus=Ko);Lo&&(j.fn.attr=Lo);Io&&(j.fn.val=Io);zo&&(j.fn.html=zo);Mo&&(j.fn.dataset=Mo);No&&(j.fn.addClass=No);$o&&(j.fn.removeClass=$o);Vo&&(j.fn.children=Vo);Ho&&(j.fn.each=Ho);qo&&(j.fn.find=qo);function np(e){return e.length?e[0].tagName.toLowerCase():""}function ip(e,t){let r="";const i=(e.attr("style")||"").split(";"),o=i.length;for(let a=0;a<o;a++){const s=i[a];if(s){const u=s.split(":");u[0].trim()===t&&(r=u[1].trim())}}return r}const om=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","FIELDSET","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","OL","P","PRE","SECTION","UL"]);function Gc(e,t){var n;let r=(e==null?void 0:e[t])||null;for(;r;){if(r.nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE&&((n=r.textContent)!=null&&n.trim()))return!0;r=r[t]}return!1}function Jc(e){return e instanceof HTMLElement&&e.tagName==="BR"}function am(e){Array.from(e.children).filter(r=>om.has(r.tagName)).forEach(r=>{const n=r.nextSibling,i=Gc(r,"previousSibling"),o=Gc(r,"nextSibling");for(i&&!Jc(r.previousSibling)&&e.insertBefore(document.createElement("br"),r);r.firstChild;)e.insertBefore(r.firstChild,r);r.remove();const a=(n==null?void 0:n.previousSibling)||e.lastChild;o&&!Jc(a)&&e.insertBefore(document.createElement("br"),n)})}function sm(e){const t=j(e);if(np(t)!=="table")return e;const n=t[0];return Array.from(n.children).forEach(i=>{["THEAD","TBODY","TFOOT"].includes(i.tagName)&&(Array.from(i.children).forEach(o=>{o.tagName==="TR"&&n.insertBefore(o,i)}),i.remove())}),n.querySelectorAll("td, th").forEach(i=>am(i)),n}const um={selector:"table",preParseHtml:sm};/*!
|
|
1
|
+
"use strict";var q0=Object.defineProperty;var V0=(e,t,r)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ur=(e,t,r)=>V0(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const pe=require("vue"),kc=require("@wangeditor/editor-for-vue"),Re=require("@wangeditor/editor"),ae=require("./index-DqYKbflQ.js");/*!
|
|
2
2
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
5
5
|
* Released under the MIT License.
|
|
6
|
-
*/function Xc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Te(e){var t,r;return Xc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Xc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var i=vm[e],o=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(a){return"'"+a+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tr(e){return!!e&&!!e[Xe]}function jr(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===mm}(e)||Array.isArray(e)||!!e[of]||!!(!((t=e.constructor)===null||t===void 0)&&t[of])||cl(e)||fl(e))}function Oi(e,t,r){r===void 0&&(r=!1),Sn(e)===0?(r?Object.keys:vl)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Sn(e){var t=e[Xe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:cl(e)?2:fl(e)?3:0}function fu(e,t){return Sn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lm(e,t){return Sn(e)===2?e.get(t):e[t]}function op(e,t,r){var n=Sn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function cm(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function cl(e){return pm&&e instanceof Map}function fl(e){return gm&&e instanceof Set}function Dr(e){return e.o||e.t}function dl(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ym(e);delete t[Xe];for(var r=vl(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function hl(e,t){return t===void 0&&(t=!1),pl(e)||Tr(e)||!jr(e)||(Sn(e)>1&&(e.set=e.add=e.clear=e.delete=fm),Object.freeze(e),t&&Oi(e,function(r,n){return hl(n,!0)},!0)),e}function fm(){Pe(2)}function pl(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function gt(e){var t=Dm[e];return t||Pe(18,e),t}function Yc(){return process.env.NODE_ENV==="production"||yn||Pe(0),yn}function ns(e,t){t&&(gt("Patches"),e.u=[],e.s=[],e.v=t)}function Go(e){du(e),e.p.forEach(dm),e.p=null}function du(e){e===yn&&(yn=e.l)}function Zc(e){return yn={p:[],l:yn,h:e,m:!0,_:0}}function dm(e){var t=e[Xe];t.i===0||t.i===1?t.j():t.g=!0}function is(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||gt("ES5").S(t,e,n),n?(r[Xe].P&&(Go(t),Pe(4)),jr(e)&&(e=Jo(t,e),t.l||Xo(t,e)),t.u&>("Patches").M(r[Xe].t,e,t.u,t.s)):e=Jo(t,r,[]),Go(t),t.u&&t.v(t.u,t.s),e!==ap?e:void 0}function Jo(e,t,r){if(pl(t))return t;var n=t[Xe];if(!n)return Oi(t,function(s,u){return Qc(e,n,t,s,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return Xo(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=dl(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),Oi(o,function(s,u){return Qc(e,n,i,s,u,r,a)}),Xo(e,i,!1),r&&e.u&>("Patches").N(n,r,e.u,e.s)}return n.o}function Qc(e,t,r,n,i,o,a){if(process.env.NODE_ENV!=="production"&&i===r&&Pe(5),Tr(i)){var s=Jo(e,i,o&&t&&t.i!==3&&!fu(t.R,n)?o.concat(n):void 0);if(op(r,n,s),!Tr(s))return;e.m=!1}else a&&r.add(i);if(jr(i)&&!pl(i)){if(!e.h.D&&e._<1)return;Jo(e,i),t&&t.A.l||Xo(e,i)}}function Xo(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&hl(t,r)}function os(e,t){var r=e[Xe];return(r?Dr(r):e)[t]}function ef(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function hu(e){e.P||(e.P=!0,e.l&&hu(e.l))}function as(e){e.o||(e.o=dl(e.t))}function pu(e,t,r){var n=cl(t)?gt("MapSet").F(t,r):fl(t)?gt("MapSet").T(t,r):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:Yc(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=s,l=gu;a&&(u=[s],l=gi);var f=Proxy.revocable(u,l),c=f.revoke,d=f.proxy;return s.k=d,s.j=c,d}(t,r):gt("ES5").J(t,r);return(r?r.A:Yc()).p.push(n),n}function hm(e){return Tr(e)||Pe(22,e),function t(r){if(!jr(r))return r;var n,i=r[Xe],o=Sn(r);if(i){if(!i.P&&(i.i<4||!gt("ES5").K(i)))return i.t;i.I=!0,n=tf(r,o),i.I=!1}else n=tf(r,o);return Oi(n,function(a,s){i&&lm(i.t,a)===s||op(n,a,t(s))}),o===3?new Set(n):n}(e)}function tf(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return dl(e)}var rf,yn,gl=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",pm=typeof Map<"u",gm=typeof Set<"u",nf=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",ap=gl?Symbol.for("immer-nothing"):((rf={})["immer-nothing"]=!0,rf),of=gl?Symbol.for("immer-draftable"):"__$immer_draftable",Xe=gl?Symbol.for("immer-state"):"__$immer_state",vm={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"},mm=""+Object.prototype.constructor,vl=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ym=Object.getOwnPropertyDescriptors||function(e){var t={};return vl(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},Dm={},gu={get:function(e,t){if(t===Xe)return e;var r=Dr(e);if(!fu(r,t))return function(i,o,a){var s,u=ef(o,a);return u?"value"in u?u.value:(s=u.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!jr(n)?n:n===os(e.t,t)?(as(e),e.o[t]=pu(e.A.h,n,e)):n},has:function(e,t){return t in Dr(e)},ownKeys:function(e){return Reflect.ownKeys(Dr(e))},set:function(e,t,r){var n=ef(Dr(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=os(Dr(e),t),o=i==null?void 0:i[Xe];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(cm(r,i)&&(r!==void 0||fu(e.t,t)))return!0;as(e),hu(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return os(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,as(e),hu(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Dr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pe(12)}},gi={};Oi(gu,function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),gi.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Pe(13),gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Pe(14),gu.set.call(this,e[0],t,r,e[0])};var Cm=function(){function e(r){var n=this;this.O=nf,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var u=n;return function(g){var v=this;g===void 0&&(g=s);for(var D=arguments.length,C=Array(D>1?D-1:0),b=1;b<D;b++)C[b-1]=arguments[b];return u.produce(g,function(A){var E;return(E=o).call.apply(E,[v,A].concat(C))})}}var l;if(typeof o!="function"&&Pe(6),a!==void 0&&typeof a!="function"&&Pe(7),jr(i)){var f=Zc(n),c=pu(n,i,void 0),d=!0;try{l=o(c),d=!1}finally{d?Go(f):du(f)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(g){return ns(f,a),is(g,f)},function(g){throw Go(f),g}):(ns(f,a),is(l,f))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===ap&&(l=void 0),n.D&&hl(l,!0),a){var p=[],h=[];gt("Patches").M(i,l,p,h),a(p,h)}return l}Pe(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var f=arguments.length,c=Array(f>1?f-1:0),d=1;d<f;d++)c[d-1]=arguments[d];return n.produceWithPatches(l,function(p){return i.apply(void 0,[p].concat(c))})};var a,s,u=n.produce(i,o,function(l,f){a=l,s=f});return typeof Promise<"u"&&u instanceof Promise?u.then(function(l){return[l,a,s]}):[u,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){jr(r)||Pe(8),Tr(r)&&(r=hm(r));var n=Zc(this),i=pu(this,r,void 0);return i[Xe].C=!0,du(n),i},t.finishDraft=function(r,n){var i=r&&r[Xe];process.env.NODE_ENV!=="production"&&(i&&i.C||Pe(9),i.I&&Pe(10));var o=i.A;return ns(o,n),is(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!nf&&Pe(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=gt("Patches").$;return Tr(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},e}(),Ye=new Cm,ba=Ye.produce;Ye.produceWithPatches.bind(Ye);Ye.setAutoFreeze.bind(Ye);Ye.setUseProxies.bind(Ye);Ye.applyPatches.bind(Ye);var af=Ye.createDraft.bind(Ye),sf=Ye.finishDraft.bind(Ye);function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var uf=new WeakMap,lf=new WeakMap,cf=new WeakMap,ff=new WeakMap,df=new WeakMap,hf=new WeakMap;function bm(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Rt(e,t){if(e==null)return{};var r=bm(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ml=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?xm(t):t,o=K.None,a=K.None,s=0,u=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var d=Mm(f,c);if([o,a]=n?[a,d]:[d,o],ln(o,K.ZWJ)&&ln(a,K.ExtPict)&&(n?u=pf(t.substring(0,s)):u=pf(t.substring(0,t.length-s)),!u)||ln(o,K.RI)&&ln(a,K.RI)&&(l!==null?l=!l:n?l=!0:l=Wm(t.substring(0,t.length-s)),!l)||o!==K.None&&a!==K.None&&Um(o,a))break;s+=f.length}return s||1},wm=/\s/,Em=/[\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]/,Bm=/['\u2018\u2019]/,Am=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;t.length>0;){var o=ml(t,r),[a,s]=yl(t,o,r);if(Fm(a,s,r))i=!0,n+=o;else if(!i)n+=o;else break;t=s}return n},yl=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},Fm=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(wm.test(t))return!1;if(Bm.test(t)){var i=ml(r,n),[o,a]=yl(r,i,n);if(e(o,a,n))return!0}return!Em.test(t)},xm=function*(t){for(var r=t.length-1,n=0;n<t.length;n++){var i=t.charAt(r-n);if(Sm(i.charCodeAt(0))){var o=t.charAt(r-n-1);if(Om(o.charCodeAt(0))){yield o+i,n++;continue}}yield i}},Om=e=>e>=55296&&e<=56319,Sm=e=>e>=56320&&e<=57343,K;(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"})(K||(K={}));var _m=/^(?:[\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])$/,Pm=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,km=/^(?:[\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])$/,Tm=/^[\u1100-\u115F\uA960-\uA97C]$/,jm=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Rm=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Nm=/^[\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]$/,$m=/^[\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]$/,Lm=/^(?:[\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])$/,Mm=(e,t)=>{var r=K.Any;return e.search(_m)!==-1&&(r|=K.Extend),t===8205&&(r|=K.ZWJ),t>=127462&&t<=127487&&(r|=K.RI),e.search(Pm)!==-1&&(r|=K.Prepend),e.search(km)!==-1&&(r|=K.SpacingMark),e.search(Tm)!==-1&&(r|=K.L),e.search(jm)!==-1&&(r|=K.V),e.search(Rm)!==-1&&(r|=K.T),e.search(Nm)!==-1&&(r|=K.LV),e.search($m)!==-1&&(r|=K.LVT),e.search(Lm)!==-1&&(r|=K.ExtPict),r};function ln(e,t){return(e&t)!==0}var Im=[[K.L,K.L|K.V|K.LV|K.LVT],[K.LV|K.V,K.V|K.T],[K.LVT|K.T,K.T],[K.Any,K.Extend|K.ZWJ],[K.Any,K.SpacingMark],[K.Prepend,K.Any],[K.ZWJ,K.ExtPict],[K.RI,K.RI]];function Um(e,t){return Im.findIndex(r=>ln(e,r[0])&&ln(t,r[1]))===-1}var Hm=/(?:[\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$/,pf=e=>e.search(Hm)!==-1,zm=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Wm=e=>{var t=e.match(zm);if(t===null)return!1;var r=t[0].length/2;return r%2===1},gf=e=>Te(e)&&$.isNodeList(e.children)&&!m.isEditor(e),Q={isAncestor(e){return Te(e)&&$.isNodeList(e.children)},isElement:gf,isElementList(e){return Array.isArray(e)&&e.every(t=>Q.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return gf(t)&&t[n]===r},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},qm=["text"],Vm=["text"];function vf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mf=new WeakMap,m={above(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:i=e.selection,match:o}=t;if(i){var a=m.path(e,i),s=n==="lowest";for(var[u,l]of m.levels(e,{at:a,voids:r,match:o,reverse:s}))if(!W.isText(u)&&!w.equals(a,l))return[u,l]}},addMark(e,t,r){e.addMark(t,r)},after(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.point(e,t,{edge:"end"}),i=m.end(e,[]),o={anchor:n,focus:i},{distance:a=1}=r,s=0,u;for(var l of m.positions(e,Xr(Xr({},r),{},{at:o}))){if(s>a)break;s!==0&&(u=l),s++}return u},before(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.start(e,[]),i=m.point(e,t,{edge:"start"}),o={anchor:n,focus:i},{distance:a=1}=r,s=0,u;for(var l of m.positions(e,Xr(Xr({},r),{},{at:o,reverse:!0}))){if(s>a)break;s!==0&&(u=l),s++}return u},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:r="forward"}=t;e.deleteFragment(r)},edges(e,t){return[m.start(e,t),m.end(e,t)]},end(e,t){return m.point(e,t,{edge:"end"})},first(e,t){var r=m.path(e,t,{edge:"start"});return m.node(e,r)},fragment(e,t){var r=m.range(e,t),n=$.fragment(e,r);return n},hasBlocks(e,t){return t.children.some(r=>m.isBlock(e,r))},hasInlines(e,t){return t.children.some(r=>W.isText(r)||m.isInline(e,r))},hasTexts(e,t){return t.children.every(r=>W.isText(r))},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 Q.isElement(t)&&!e.isInline(t)},isEditor(e){if(!Te(e))return!1;var t=mf.get(e);if(t!==void 0)return t;var r=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||Te(e.marks))&&(e.selection===null||O.isRange(e.selection))&&$.isNodeList(e.children)&&vi.isOperationList(e.operations);return mf.set(e,r),r},isEnd(e,t,r){var n=m.end(e,r);return Y.equals(t,n)},isEdge(e,t,r){return m.isStart(e,t,r)||m.isEnd(e,t,r)},isEmpty(e,t){var{children:r}=t,[n]=r;return r.length===0||r.length===1&&W.isText(n)&&n.text===""&&!e.isVoid(t)},isInline(e,t){return Q.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=cf.get(e);return t===void 0?!0:t},isStart(e,t,r){if(t.offset!==0)return!1;var n=m.start(e,r);return Y.equals(t,n)},isVoid(e,t){return Q.isElement(t)&&e.isVoid(t)},last(e,t){var r=m.path(e,t,{edge:"end"});return m.node(e,r)},leaf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=$.leaf(e,n);return[i,n]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,reverse:n=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!r){var a=[],s=m.path(e,r);for(var[u,l]of $.levels(e,s))if(o(u,l)&&(a.push([u,l]),!i&&m.isVoid(e,u)))break;n&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:r}=e;if(!r)return null;if(t)return t;if(O.isExpanded(r)){var[n]=m.nodes(e,{match:W.isText});if(n){var[i]=n,o=Rt(i,qm);return o}else return{}}var{anchor:a}=r,{path:s}=a,[u]=m.leaf(e,s);if(a.offset===0){var l=m.previous(e,{at:s,match:W.isText}),f=m.above(e,{match:g=>m.isBlock(e,g)});if(l&&f){var[c,d]=l,[,p]=f;w.isAncestor(p,d)&&(u=c)}}var h=Rt(u,Vm);return h},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.after(e,o,{voids:n});if(a){var[,s]=m.last(e,[]),u=[a.path,s];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{at:u,match:i,mode:r,voids:n});return f}}},node(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=$.get(e,n);return[i,n]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,mode:n="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),!!r){var u,l;if(Km.isSpan(r))u=r[0],l=r[1];else{var f=m.path(e,r,{edge:"start"}),c=m.path(e,r,{edge:"end"});u=o?c:f,l=o?f:c}var d=$.nodes(e,{reverse:o,from:u,to:l,pass:b=>{var[A]=b;return a?!1:m.isVoid(e,A)}}),p=[],h;for(var[g,v]of d){var D=h&&w.compare(v,h[1])===0;if(!(n==="highest"&&D)){if(!s(g,v)){if(i&&!D&&W.isText(g))return;continue}if(n==="lowest"&&D){h=[g,v];continue}var C=n==="lowest"?h:[g,v];C&&(i?p.push(C):yield C),h=[g,v]}}n==="lowest"&&h&&(i?p.push(h):yield h),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1}=t,n=u=>uf.get(u)||[],i=u=>lf.get(u)||new Set,o=u=>{var l=n(u).pop(),f=l.join(",");return i(u).delete(f),l};if(m.isNormalizing(e)){if(r){var a=Array.from($.nodes(e),u=>{var[,l]=u;return l}),s=new Set(a.map(u=>u.join(",")));uf.set(e,a),lf.set(e,s)}n(e).length!==0&&m.withoutNormalizing(e,()=>{for(var u of n(e))if($.has(e,u)){var l=m.node(e,u),[f,c]=l;Q.isElement(f)&&f.children.length===0&&e.normalizeNode(l)}for(var d=n(e).length*42,p=0;n(e).length!==0;){if(p>d)throw new Error(`
|
|
6
|
+
*/function Tc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Te(e){var t,r;return Tc(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Tc(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Pe(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(process.env.NODE_ENV!=="production"){var i=em[e],o=i?typeof i=="function"?i.apply(null,r):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}throw Error("[Immer] minified error nr: "+e+(r.length?" "+r.map(function(a){return"'"+a+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Tr(e){return!!e&&!!e[Xe]}function jr(e){var t;return!!e&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===tm}(e)||Array.isArray(e)||!!e[Uc]||!!(!((t=e.constructor)===null||t===void 0)&&t[Uc])||ll(e)||cl(e))}function Oi(e,t,r){r===void 0&&(r=!1),Sn(e)===0?(r?Object.keys:gl)(e).forEach(function(n){r&&typeof n=="symbol"||t(n,e[n],e)}):e.forEach(function(n,i){return t(i,n,e)})}function Sn(e){var t=e[Xe];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:ll(e)?2:cl(e)?3:0}function lu(e,t){return Sn(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function K0(e,t){return Sn(e)===2?e.get(t):e[t]}function rp(e,t,r){var n=Sn(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function G0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ll(e){return Z0&&e instanceof Map}function cl(e){return Q0&&e instanceof Set}function Dr(e){return e.o||e.t}function fl(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=rm(e);delete t[Xe];for(var r=gl(t),n=0;n<r.length;n++){var i=r[n],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function dl(e,t){return t===void 0&&(t=!1),hl(e)||Tr(e)||!jr(e)||(Sn(e)>1&&(e.set=e.add=e.clear=e.delete=J0),Object.freeze(e),t&&Oi(e,function(r,n){return dl(n,!0)},!0)),e}function J0(){Pe(2)}function hl(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function gt(e){var t=nm[e];return t||Pe(18,e),t}function jc(){return process.env.NODE_ENV==="production"||yn||Pe(0),yn}function ns(e,t){t&&(gt("Patches"),e.u=[],e.s=[],e.v=t)}function Ro(e){cu(e),e.p.forEach(X0),e.p=null}function cu(e){e===yn&&(yn=e.l)}function Rc(e){return yn={p:[],l:yn,h:e,m:!0,_:0}}function X0(e){var t=e[Xe];t.i===0||t.i===1?t.j():t.g=!0}function is(e,t){t._=t.p.length;var r=t.p[0],n=e!==void 0&&e!==r;return t.h.O||gt("ES5").S(t,e,n),n?(r[Xe].P&&(Ro(t),Pe(4)),jr(e)&&(e=No(t,e),t.l||$o(t,e)),t.u&>("Patches").M(r[Xe].t,e,t.u,t.s)):e=No(t,r,[]),Ro(t),t.u&&t.v(t.u,t.s),e!==np?e:void 0}function No(e,t,r){if(hl(t))return t;var n=t[Xe];if(!n)return Oi(t,function(s,u){return Nc(e,n,t,s,u,r)},!0),t;if(n.A!==e)return t;if(!n.P)return $o(e,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=fl(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),Oi(o,function(s,u){return Nc(e,n,i,s,u,r,a)}),$o(e,i,!1),r&&e.u&>("Patches").N(n,r,e.u,e.s)}return n.o}function Nc(e,t,r,n,i,o,a){if(process.env.NODE_ENV!=="production"&&i===r&&Pe(5),Tr(i)){var s=No(e,i,o&&t&&t.i!==3&&!lu(t.R,n)?o.concat(n):void 0);if(rp(r,n,s),!Tr(s))return;e.m=!1}else a&&r.add(i);if(jr(i)&&!hl(i)){if(!e.h.D&&e._<1)return;No(e,i),t&&t.A.l||$o(e,i)}}function $o(e,t,r){r===void 0&&(r=!1),!e.l&&e.h.D&&e.m&&dl(t,r)}function os(e,t){var r=e[Xe];return(r?Dr(r):e)[t]}function $c(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Object.getPrototypeOf(r)}}function fu(e){e.P||(e.P=!0,e.l&&fu(e.l))}function as(e){e.o||(e.o=fl(e.t))}function du(e,t,r){var n=ll(t)?gt("MapSet").F(t,r):cl(t)?gt("MapSet").T(t,r):e.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:jc(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},u=s,l=hu;a&&(u=[s],l=gi);var f=Proxy.revocable(u,l),c=f.revoke,d=f.proxy;return s.k=d,s.j=c,d}(t,r):gt("ES5").J(t,r);return(r?r.A:jc()).p.push(n),n}function Y0(e){return Tr(e)||Pe(22,e),function t(r){if(!jr(r))return r;var n,i=r[Xe],o=Sn(r);if(i){if(!i.P&&(i.i<4||!gt("ES5").K(i)))return i.t;i.I=!0,n=Lc(r,o),i.I=!1}else n=Lc(r,o);return Oi(n,function(a,s){i&&K0(i.t,a)===s||rp(n,a,t(s))}),o===3?new Set(n):n}(e)}function Lc(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return fl(e)}var Mc,yn,pl=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Z0=typeof Map<"u",Q0=typeof Set<"u",Ic=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",np=pl?Symbol.for("immer-nothing"):((Mc={})["immer-nothing"]=!0,Mc),Uc=pl?Symbol.for("immer-draftable"):"__$immer_draftable",Xe=pl?Symbol.for("immer-state"):"__$immer_state",em={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"},tm=""+Object.prototype.constructor,gl=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,rm=Object.getOwnPropertyDescriptors||function(e){var t={};return gl(e).forEach(function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)}),t},nm={},hu={get:function(e,t){if(t===Xe)return e;var r=Dr(e);if(!lu(r,t))return function(i,o,a){var s,u=$c(o,a);return u?"value"in u?u.value:(s=u.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,r,t);var n=r[t];return e.I||!jr(n)?n:n===os(e.t,t)?(as(e),e.o[t]=du(e.A.h,n,e)):n},has:function(e,t){return t in Dr(e)},ownKeys:function(e){return Reflect.ownKeys(Dr(e))},set:function(e,t,r){var n=$c(Dr(e),t);if(n!=null&&n.set)return n.set.call(e.k,r),!0;if(!e.P){var i=os(Dr(e),t),o=i==null?void 0:i[Xe];if(o&&o.t===r)return e.o[t]=r,e.R[t]=!1,!0;if(G0(r,i)&&(r!==void 0||lu(e.t,t)))return!0;as(e),fu(e)}return e.o[t]===r&&(r!==void 0||t in e.o)||Number.isNaN(r)&&Number.isNaN(e.o[t])||(e.o[t]=r,e.R[t]=!0),!0},deleteProperty:function(e,t){return os(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,as(e),fu(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=Dr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty:function(){Pe(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Pe(12)}},gi={};Oi(hu,function(e,t){gi[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),gi.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Pe(13),gi.set.call(this,e,t,void 0)},gi.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Pe(14),hu.set.call(this,e[0],t,r,e[0])};var im=function(){function e(r){var n=this;this.O=Ic,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var u=n;return function(g){var v=this;g===void 0&&(g=s);for(var D=arguments.length,C=Array(D>1?D-1:0),b=1;b<D;b++)C[b-1]=arguments[b];return u.produce(g,function(A){var E;return(E=o).call.apply(E,[v,A].concat(C))})}}var l;if(typeof o!="function"&&Pe(6),a!==void 0&&typeof a!="function"&&Pe(7),jr(i)){var f=Rc(n),c=du(n,i,void 0),d=!0;try{l=o(c),d=!1}finally{d?Ro(f):cu(f)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(g){return ns(f,a),is(g,f)},function(g){throw Ro(f),g}):(ns(f,a),is(l,f))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===np&&(l=void 0),n.D&&dl(l,!0),a){var p=[],h=[];gt("Patches").M(i,l,p,h),a(p,h)}return l}Pe(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var f=arguments.length,c=Array(f>1?f-1:0),d=1;d<f;d++)c[d-1]=arguments[d];return n.produceWithPatches(l,function(p){return i.apply(void 0,[p].concat(c))})};var a,s,u=n.produce(i,o,function(l,f){a=l,s=f});return typeof Promise<"u"&&u instanceof Promise?u.then(function(l){return[l,a,s]}):[u,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var t=e.prototype;return t.createDraft=function(r){jr(r)||Pe(8),Tr(r)&&(r=Y0(r));var n=Rc(this),i=du(this,r,void 0);return i[Xe].C=!0,cu(n),i},t.finishDraft=function(r,n){var i=r&&r[Xe];process.env.NODE_ENV!=="production"&&(i&&i.C||Pe(9),i.I&&Pe(10));var o=i.A;return ns(o,n),is(void 0,o)},t.setAutoFreeze=function(r){this.D=r},t.setUseProxies=function(r){r&&!Ic&&Pe(20),this.O=r},t.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=gt("Patches").$;return Tr(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},e}(),Ye=new im,Da=Ye.produce;Ye.produceWithPatches.bind(Ye);Ye.setAutoFreeze.bind(Ye);Ye.setUseProxies.bind(Ye);Ye.applyPatches.bind(Ye);var Hc=Ye.createDraft.bind(Ye),zc=Ye.finishDraft.bind(Ye);function Nt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Wc=new WeakMap,qc=new WeakMap,Vc=new WeakMap,Kc=new WeakMap,Gc=new WeakMap,Jc=new WeakMap;function om(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,o;for(o=0;o<n.length;o++)i=n[o],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}function Rt(e,t){if(e==null)return{};var r=om(e,t),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var vl=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=!r,i=r?fm(t):t,o=K.None,a=K.None,s=0,u=null,l=null;for(var f of i){var c=f.codePointAt(0);if(!c)break;var d=Em(f,c);if([o,a]=n?[a,d]:[d,o],ln(o,K.ZWJ)&&ln(a,K.ExtPict)&&(n?u=Xc(t.substring(0,s)):u=Xc(t.substring(0,t.length-s)),!u)||ln(o,K.RI)&&ln(a,K.RI)&&(l!==null?l=!l:n?l=!0:l=Om(t.substring(0,t.length-s)),!l)||o!==K.None&&a!==K.None&&Am(o,a))break;s+=f.length}return s||1},am=/\s/,sm=/[\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]/,um=/['\u2018\u2019]/,lm=function(t){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=0,i=!1;t.length>0;){var o=vl(t,r),[a,s]=ml(t,o,r);if(cm(a,s,r))i=!0,n+=o;else if(!i)n+=o;else break;t=s}return n},ml=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},cm=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(am.test(t))return!1;if(um.test(t)){var i=vl(r,n),[o,a]=ml(r,i,n);if(e(o,a,n))return!0}return!sm.test(t)},fm=function*(t){for(var r=t.length-1,n=0;n<t.length;n++){var i=t.charAt(r-n);if(hm(i.charCodeAt(0))){var o=t.charAt(r-n-1);if(dm(o.charCodeAt(0))){yield o+i,n++;continue}}yield i}},dm=e=>e>=55296&&e<=56319,hm=e=>e>=56320&&e<=57343,K;(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"})(K||(K={}));var pm=/^(?:[\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])$/,gm=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,vm=/^(?:[\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])$/,mm=/^[\u1100-\u115F\uA960-\uA97C]$/,ym=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Dm=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Cm=/^[\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]$/,bm=/^[\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]$/,wm=/^(?:[\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])$/,Em=(e,t)=>{var r=K.Any;return e.search(pm)!==-1&&(r|=K.Extend),t===8205&&(r|=K.ZWJ),t>=127462&&t<=127487&&(r|=K.RI),e.search(gm)!==-1&&(r|=K.Prepend),e.search(vm)!==-1&&(r|=K.SpacingMark),e.search(mm)!==-1&&(r|=K.L),e.search(ym)!==-1&&(r|=K.V),e.search(Dm)!==-1&&(r|=K.T),e.search(Cm)!==-1&&(r|=K.LV),e.search(bm)!==-1&&(r|=K.LVT),e.search(wm)!==-1&&(r|=K.ExtPict),r};function ln(e,t){return(e&t)!==0}var Bm=[[K.L,K.L|K.V|K.LV|K.LVT],[K.LV|K.V,K.V|K.T],[K.LVT|K.T,K.T],[K.Any,K.Extend|K.ZWJ],[K.Any,K.SpacingMark],[K.Prepend,K.Any],[K.ZWJ,K.ExtPict],[K.RI,K.RI]];function Am(e,t){return Bm.findIndex(r=>ln(e,r[0])&&ln(t,r[1]))===-1}var Fm=/(?:[\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$/,Xc=e=>e.search(Fm)!==-1,xm=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Om=e=>{var t=e.match(xm);if(t===null)return!1;var r=t[0].length/2;return r%2===1},Yc=e=>Te(e)&&$.isNodeList(e.children)&&!m.isEditor(e),Q={isAncestor(e){return Te(e)&&$.isNodeList(e.children)},isElement:Yc,isElementList(e){return Array.isArray(e)&&e.every(t=>Q.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Yc(t)&&t[n]===r},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},Sm=["text"],_m=["text"];function Zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Xr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zc(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zc(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Qc=new WeakMap,m={above(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:i=e.selection,match:o}=t;if(i){var a=m.path(e,i),s=n==="lowest";for(var[u,l]of m.levels(e,{at:a,voids:r,match:o,reverse:s}))if(!W.isText(u)&&!w.equals(a,l))return[u,l]}},addMark(e,t,r){e.addMark(t,r)},after(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.point(e,t,{edge:"end"}),i=m.end(e,[]),o={anchor:n,focus:i},{distance:a=1}=r,s=0,u;for(var l of m.positions(e,Xr(Xr({},r),{},{at:o}))){if(s>a)break;s!==0&&(u=l),s++}return u},before(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.start(e,[]),i=m.point(e,t,{edge:"start"}),o={anchor:n,focus:i},{distance:a=1}=r,s=0,u;for(var l of m.positions(e,Xr(Xr({},r),{},{at:o,reverse:!0}))){if(s>a)break;s!==0&&(u=l),s++}return u},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{direction:r="forward"}=t;e.deleteFragment(r)},edges(e,t){return[m.start(e,t),m.end(e,t)]},end(e,t){return m.point(e,t,{edge:"end"})},first(e,t){var r=m.path(e,t,{edge:"start"});return m.node(e,r)},fragment(e,t){var r=m.range(e,t),n=$.fragment(e,r);return n},hasBlocks(e,t){return t.children.some(r=>m.isBlock(e,r))},hasInlines(e,t){return t.children.some(r=>W.isText(r)||m.isInline(e,r))},hasTexts(e,t){return t.children.every(r=>W.isText(r))},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 Q.isElement(t)&&!e.isInline(t)},isEditor(e){if(!Te(e))return!1;var t=Qc.get(e);if(t!==void 0)return t;var r=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||Te(e.marks))&&(e.selection===null||O.isRange(e.selection))&&$.isNodeList(e.children)&&vi.isOperationList(e.operations);return Qc.set(e,r),r},isEnd(e,t,r){var n=m.end(e,r);return Y.equals(t,n)},isEdge(e,t,r){return m.isStart(e,t,r)||m.isEnd(e,t,r)},isEmpty(e,t){var{children:r}=t,[n]=r;return r.length===0||r.length===1&&W.isText(n)&&n.text===""&&!e.isVoid(t)},isInline(e,t){return Q.isElement(t)&&e.isInline(t)},isNormalizing(e){var t=Vc.get(e);return t===void 0?!0:t},isStart(e,t,r){if(t.offset!==0)return!1;var n=m.start(e,r);return Y.equals(t,n)},isVoid(e,t){return Q.isElement(t)&&e.isVoid(t)},last(e,t){var r=m.path(e,t,{edge:"end"});return m.node(e,r)},leaf(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=$.leaf(e,n);return[i,n]},*levels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,reverse:n=!1,voids:i=!1}=t,{match:o}=t;if(o==null&&(o=()=>!0),!!r){var a=[],s=m.path(e,r);for(var[u,l]of $.levels(e,s))if(o(u,l)&&(a.push([u,l]),!i&&m.isVoid(e,u)))break;n&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:r}=e;if(!r)return null;if(t)return t;if(O.isExpanded(r)){var[n]=m.nodes(e,{match:W.isText});if(n){var[i]=n,o=Rt(i,Sm);return o}else return{}}var{anchor:a}=r,{path:s}=a,[u]=m.leaf(e,s);if(a.offset===0){var l=m.previous(e,{at:s,match:W.isText}),f=m.above(e,{match:g=>m.isBlock(e,g)});if(l&&f){var[c,d]=l,[,p]=f;w.isAncestor(p,d)&&(u=c)}}var h=Rt(u,_m);return h},next(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.after(e,o,{voids:n});if(a){var[,s]=m.last(e,[]),u=[a.path,s];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the next node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{at:u,match:i,mode:r,voids:n});return f}}},node(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=$.get(e,n);return[i,n]},*nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,mode:n="all",universal:i=!1,reverse:o=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),!!r){var u,l;if(Pm.isSpan(r))u=r[0],l=r[1];else{var f=m.path(e,r,{edge:"start"}),c=m.path(e,r,{edge:"end"});u=o?c:f,l=o?f:c}var d=$.nodes(e,{reverse:o,from:u,to:l,pass:b=>{var[A]=b;return a?!1:m.isVoid(e,A)}}),p=[],h;for(var[g,v]of d){var D=h&&w.compare(v,h[1])===0;if(!(n==="highest"&&D)){if(!s(g,v)){if(i&&!D&&W.isText(g))return;continue}if(n==="lowest"&&D){h=[g,v];continue}var C=n==="lowest"?h:[g,v];C&&(i?p.push(C):yield C),h=[g,v]}}n==="lowest"&&h&&(i?p.push(h):yield h),i&&(yield*p)}},normalize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1}=t,n=u=>Wc.get(u)||[],i=u=>qc.get(u)||new Set,o=u=>{var l=n(u).pop(),f=l.join(",");return i(u).delete(f),l};if(m.isNormalizing(e)){if(r){var a=Array.from($.nodes(e),u=>{var[,l]=u;return l}),s=new Set(a.map(u=>u.join(",")));Wc.set(e,a),qc.set(e,s)}n(e).length!==0&&m.withoutNormalizing(e,()=>{for(var u of n(e))if($.has(e,u)){var l=m.node(e,u),[f,c]=l;Q.isElement(f)&&f.children.length===0&&e.normalizeNode(l)}for(var d=n(e).length*42,p=0;n(e).length!==0;){if(p>d)throw new Error(`
|
|
7
7
|
Could not completely normalize the editor after `.concat(d,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
|
|
8
|
-
`));var h=o(e);if($.has(e,h)){var g=m.node(e,h);e.normalizeNode(g)}p++}})}},parent(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=w.parent(n),o=m.node(e,i);return o},path(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:i}=r;if(w.isPath(t)){if(i==="start"){var[,o]=$.first(e,t);t=o}else if(i==="end"){var[,a]=$.last(e,t);t=a}}return O.isRange(t)&&(i==="start"?t=O.start(t):i==="end"?t=O.end(t):t=w.common(t.anchor.path,t.focus.path)),Y.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},hasPath(e,t){return $.has(e,t)},pathRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.pathRefs(e);return s.delete(i),i.current=null,a}},o=m.pathRefs(e);return o.add(i),i},pathRefs(e){var t=ff.get(e);return t||(t=new Set,ff.set(e,t)),t},point(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(w.isPath(t)){var i;if(n==="end"){var[,o]=$.last(e,t);i=o}else{var[,a]=$.first(e,t);i=a}var s=$.get(e,i);if(!W.isText(s))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:i,offset:n==="end"?s.text.length:0}}if(O.isRange(t)){var[u,l]=O.edges(t);return n==="start"?u:l}return t},pointRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.pointRefs(e);return s.delete(i),i.current=null,a}},o=m.pointRefs(e);return o.add(i),i},pointRefs(e){var t=df.get(e);return t||(t=new Set,df.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,unit:n="offset",reverse:i=!1,voids:o=!1}=t;if(!r)return;var a=m.range(e,r),[s,u]=O.edges(a),l=i?u:s,f=!1,c="",d=0,p=0,h=0;for(var[g,v]of m.nodes(e,{at:r,reverse:i,voids:o})){if(Q.isElement(g)){if(!o&&e.isVoid(g)){yield m.start(e,v);continue}if(e.isInline(g))continue;if(m.hasInlines(e,g)){var D=w.isAncestor(v,u.path)?u:m.end(e,v),C=w.isAncestor(v,s.path)?s:m.start(e,v);c=m.string(e,{anchor:C,focus:D},{voids:o}),f=!0}}if(W.isText(g)){var b=w.equals(v,l.path);for(b?(p=i?l.offset:g.text.length-l.offset,h=l.offset):(p=g.text.length,h=i?p:0),(b||f||n==="offset")&&(yield{path:v,offset:h},f=!1);;){if(d===0){if(c==="")break;d=A(c,n,i),c=yl(c,d,i)[1]}if(h=i?h-d:h+d,p=p-d,p<0){d=-p;break}d=0,yield{path:v,offset:h}}}}function A(E,x,_){return x==="character"?ml(E,_):x==="word"?Am(E,_):x==="line"||x==="block"?E.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.before(e,o,{voids:n});if(a){var[,s]=m.first(e,[]),u=[a.path,s];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{reverse:!0,at:u,match:i,mode:r,voids:n});return f}}},range(e,t,r){if(O.isRange(t)&&!r)return t;var n=m.start(e,t),i=m.end(e,r||t);return{anchor:n,focus:i}},rangeRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.rangeRefs(e);return s.delete(i),i.current=null,a}},o=m.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=hf.get(e);return t||(t=new Set,hf.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){cf.set(e,t)},start(e,t){return m.point(e,t,{edge:"start"})},string(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,i=m.range(e,t),[o,a]=O.edges(i),s="";for(var[u,l]of m.nodes(e,{at:i,match:W.isText,voids:n})){var f=u.text;w.equals(l,a.path)&&(f=f.slice(0,a.offset)),w.equals(l,o.path)&&(f=f.slice(o.offset)),s+=f}return s},unhangRange(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[i,o]=O.edges(t);if(i.offset!==0||o.offset!==0||O.isCollapsed(t))return t;var a=m.above(e,{at:o,match:p=>m.isBlock(e,p)}),s=a?a[1]:[],u=m.start(e,i),l={anchor:u,focus:o},f=!0;for(var[c,d]of m.nodes(e,{at:l,match:W.isText,reverse:!0,voids:n})){if(f){f=!1;continue}if(c.text!==""||w.isBefore(d,s)){o={path:d,offset:c.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Xr(Xr({},t),{},{match:r=>m.isVoid(e,r)}))},withoutNormalizing(e,t){var r=m.isNormalizing(e);m.setNormalizing(e,!1);try{t()}finally{m.setNormalizing(e,r)}m.normalize(e)}},Km={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(w.isPath)}},Gm=["children"],Jm=["text"],yf=new WeakMap,$={ancestor(e,t){var r=$.get(e,t);if(W.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(r));return r},*ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.ancestors(t,r)){var i=$.ancestor(e,n),o=[i,n];yield o}},child(e,t){if(W.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return r},*children(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:n=!1}=r,i=$.ancestor(e,t),{children:o}=i,a=n?o.length-1:0;n?a>=0:a<o.length;){var s=$.child(i,a),u=t.concat(a);yield[s,u],a=n?a-1:a+1}},common(e,t,r){var n=w.common(t,r),i=$.get(e,n);return[i,n]},descendant(e,t){var r=$.get(e,t);if(m.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(r));return r},*descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))n.length!==0&&(yield[r,n])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))Q.isElement(r)&&(yield[r,n])},extractProps(e){if(Q.isAncestor(e)){var t=Rt(e,Gm);return t}else{var t=Rt(e,Jm);return t}},first(e,t){for(var r=t.slice(),n=$.get(e,r);n&&!(W.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(W.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var r=ba({children:e.children},n=>{var[i,o]=O.edges(t),a=$.nodes(n,{reverse:!0,pass:d=>{var[,p]=d;return!O.includes(t,p)}});for(var[,s]of a){if(!O.includes(t,s)){var u=$.parent(n,s),l=s[s.length-1];u.children.splice(l,1)}if(w.equals(s,o.path)){var f=$.leaf(n,s);f.text=f.text.slice(0,o.offset)}if(w.equals(s,i.path)){var c=$.leaf(n,s);c.text=c.text.slice(i.offset)}}m.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));r=r.children[i]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(e){return W.isText(e)||Q.isElement(e)||m.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=yf.get(e);if(t!==void 0)return t;var r=e.every(n=>$.isNode(n));return yf.set(e,r),r},last(e,t){for(var r=t.slice(),n=$.get(e,r);n&&!(W.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(e,t){var r=$.get(e,t);if(!W.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(r));return r},*levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.levels(t,r)){var i=$.get(e,n);yield[i,n]}},matches(e,t){return Q.isElement(e)&&Q.isElementProps(t)&&Q.matches(e,t)||W.isText(e)&&W.isTextProps(t)&&W.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:r,reverse:n=!1}=t,{from:i=[],to:o}=t,a=new Set,s=[],u=e;!(o&&(n?w.isBefore(s,o):w.isAfter(s,o)));){if(a.has(u)||(yield[u,s]),!a.has(u)&&!W.isText(u)&&u.children.length!==0&&(r==null||r([u,s])===!1)){a.add(u);var l=n?u.children.length-1:0;w.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=$.get(e,s);continue}if(s.length===0)break;if(!n){var f=w.next(s);if($.has(e,f)){s=f,u=$.get(e,s);continue}}if(n&&s[s.length-1]!==0){var c=w.previous(s);s=c,u=$.get(e,s);continue}s=w.parent(s),u=$.get(e,s),a.add(u)}},parent(e,t){var r=w.parent(t),n=$.get(e,r);if(W.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return W.isText(e)?e.text:e.children.map($.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))W.isText(r)&&(yield[r,n])}};function Df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vi={isNodeOperation(e){return vi.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Te(e))return!1;switch(e.type){case"insert_node":return w.isPath(e.path)&&$.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"merge_node":return typeof e.position=="number"&&w.isPath(e.path)&&Te(e.properties);case"move_node":return w.isPath(e.path)&&w.isPath(e.newPath);case"remove_node":return w.isPath(e.path)&&$.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"set_node":return w.isPath(e.path)&&Te(e.properties)&&Te(e.newProperties);case"set_selection":return e.properties===null&&O.isRange(e.newProperties)||e.newProperties===null&&O.isRange(e.properties)||Te(e.properties)&&Te(e.newProperties);case"split_node":return w.isPath(e.path)&&typeof e.position=="number"&&Te(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>vi.isOperation(t))},isSelectionOperation(e){return vi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return vi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return ge(ge({},e),{},{type:"remove_node"});case"insert_text":return ge(ge({},e),{},{type:"remove_text"});case"merge_node":return ge(ge({},e),{},{type:"split_node",path:w.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(w.equals(t,r))return e;if(w.isSibling(r,t))return ge(ge({},e),{},{path:t,newPath:r});var n=w.transform(r,e),i=w.transform(w.next(r),e);return ge(ge({},e),{},{path:n,newPath:i})}case"remove_node":return ge(ge({},e),{},{type:"insert_node"});case"remove_text":return ge(ge({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return ge(ge({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:s,newProperties:u}=e;return s==null?ge(ge({},e),{},{properties:u,newProperties:null}):u==null?ge(ge({},e),{},{properties:null,newProperties:s}):ge(ge({},e),{},{properties:u,newProperties:s})}case"split_node":return ge(ge({},e),{},{type:"merge_node",path:w.next(e.path)})}}},w={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=w.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var i=e[n],o=t[n];if(i!==o)break;r.push(i)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),i=t.slice(0,r);return w.equals(n,i)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o<a},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return w.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&w.compare(e,t)===0},isBefore(e,t){return w.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&w.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&w.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&w.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&w.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 r=e.slice(0,-1),n=t.slice(0,-1),i=e[e.length-1],o=t[t.length-1];return i!==o&&w.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],i=0;i<=e.length;i++)n.push(e.slice(0,i));return r&&n.reverse(),n},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)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!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(!w.isAncestor(t,e)&&!w.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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ba(e,n=>{var{affinity:i="forward"}=r;if(!(!e||(e==null?void 0:e.length)===0)){if(n===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(w.equals(o,n)||w.endsBefore(o,n)||w.isAncestor(o,n))&&(n[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(w.equals(a,n)||w.isAncestor(a,n))return null;w.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=t;w.equals(s,n)||w.endsBefore(s,n)?n[s.length-1]-=1:w.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=u);break}case"split_node":{var{path:l,position:f}=t;if(w.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else w.endsBefore(l,n)?n[l.length-1]+=1:w.isAncestor(l,n)&&e[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:d}=t;if(w.equals(c,d))return;if(w.isAncestor(c,n)||w.equals(c,n)){var p=d.slice();return w.endsBefore(c,d)&&c.length<d.length&&(p[c.length-1]-=1),p.concat(n.slice(c.length))}else w.isSibling(c,d)&&(w.isAncestor(d,n)||w.equals(d,n))?w.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:w.endsBefore(d,n)||w.equals(d,n)||w.isAncestor(d,n)?(w.endsBefore(c,n)&&(n[c.length-1]-=1),n[d.length-1]+=1):w.endsBefore(c,n)&&(w.equals(d,n)&&(n[d.length-1]+=1),n[c.length-1]-=1);break}}}})}};function Cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y={compare(e,t){var r=w.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Y.compare(e,t)===1},isBefore(e,t){return Y.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&w.equals(e.path,t.path)},isPoint(e){return Te(e)&&typeof e.offset=="number"&&w.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ba(e,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:o,offset:a}=n;switch(t.type){case"insert_node":case"move_node":{n.path=w.transform(o,t,r);break}case"insert_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset+=t.text.length);break}case"merge_node":{w.equals(t.path,o)&&(n.offset+=t.position),n.path=w.transform(o,t,r);break}case"remove_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(w.equals(t.path,o)||w.isAncestor(t.path,o))return null;n.path=w.transform(o,t,r);break}case"split_node":{if(w.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.position<a||t.position===a&&i==="forward")&&(n.offset-=t.position,n.path=w.transform(o,t,bf(bf({},r),{},{affinity:"forward"})))}else n.path=w.transform(o,t,r);break}}})}},Xm=["anchor","focus"];function wf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ym(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:i}=e;return O.isBackward(e)===r?[n,i]:[i,n]},end(e){var[,t]=O.edges(e);return t},equals(e,t){return Y.equals(e.anchor,t.anchor)&&Y.equals(e.focus,t.focus)},includes(e,t){if(O.isRange(t)){if(O.includes(e,t.anchor)||O.includes(e,t.focus))return!0;var[r,n]=O.edges(e),[i,o]=O.edges(t);return Y.isBefore(r,i)&&Y.isAfter(n,o)}var[a,s]=O.edges(e),u=!1,l=!1;return Y.isPoint(t)?(u=Y.compare(t,a)>=0,l=Y.compare(t,s)<=0):(u=w.compare(t,a.path)>=0,l=w.compare(t,s.path)<=0),u&&l},intersection(e,t){var r=Rt(e,Xm),[n,i]=O.edges(e),[o,a]=O.edges(t),s=Y.isBefore(n,o)?o:n,u=Y.isBefore(i,a)?i:a;return Y.isBefore(u,s)?null:Ym({anchor:s,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return Y.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Y.equals(t,r)},isExpanded(e){return!O.isCollapsed(e)},isForward(e){return!O.isBackward(e)},isRange(e){return Te(e)&&Y.isPoint(e.anchor)&&Y.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=O.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ba(e,n=>{if(n===null)return null;var{affinity:i="inward"}=r,o,a;if(i==="inward"){var s=O.isCollapsed(n);O.isForward(n)?(o="forward",a=s?o:"backward"):(o="backward",a=s?o:"forward")}else i==="outward"?O.isForward(n)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var u=Y.transform(n.anchor,t,{affinity:o}),l=Y.transform(n.focus,t,{affinity:a});if(!u||!l)return null;n.anchor=u,n.focus=l})}},sp=(e,t)=>{for(var r in e){var n=e[r],i=t[r];if(Te(n)&&Te(i)){if(!sp(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var o=0;o<n.length;o++)if(n[o]!==i[o])return!1}else if(n!==i)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},Zm=["text"],Qm=["anchor","focus"];function Ef(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ef(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ef(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var W={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(o){var a=Rt(o,Zm);return a}return sp(n?i(e):e,n?i(t):t)},isText(e){return Te(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>W.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[bt({},e)];for(var n of t){var i=Rt(n,Qm),[o,a]=O.edges(n),s=[],u=0;for(var l of r){var{length:f}=l.text,c=u;if(u+=f,o.offset<=c&&a.offset>=u){Object.assign(l,i),s.push(l);continue}if(o.offset!==a.offset&&(o.offset===u||a.offset===c)||o.offset>u||a.offset<c||a.offset===c&&c!==0){s.push(l);continue}var d=l,p=void 0,h=void 0;if(a.offset<u){var g=a.offset-c;h=bt(bt({},d),{},{text:d.text.slice(g)}),d=bt(bt({},d),{},{text:d.text.slice(0,g)})}if(o.offset>c){var v=o.offset-c;p=bt(bt({},d),{},{text:d.text.slice(0,v)}),d=bt(bt({},d),{},{text:d.text.slice(v)})}Object.assign(d,i),p&&s.push(p),s.push(d),h&&s.push(h)}r=s}return r}};function Bf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var e1=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,o=$.parent(e,n),a=n[n.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[s,u]of O.points(t))t[u]=Y.transform(s,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var d=$.leaf(e,l),p=d.text.slice(0,f),h=d.text.slice(f);if(d.text=p+c+h,t)for(var[g,v]of O.points(t))t[v]=Y.transform(g,r);break}case"merge_node":{var{path:D}=r,C=$.get(e,D),b=w.previous(D),A=$.get(e,b),E=$.parent(e,D),x=D[D.length-1];if(W.isText(C)&&W.isText(A))A.text+=C.text;else if(!W.isText(C)&&!W.isText(A))A.children.push(...C.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(C," ").concat(A));if(E.children.splice(x,1),t)for(var[_,T]of O.points(t))t[T]=Y.transform(_,r);break}case"move_node":{var{path:k,newPath:M}=r;if(w.isAncestor(k,M))throw new Error("Cannot move a path [".concat(k,"] to new path [").concat(M,"] because the destination is inside itself."));var R=$.get(e,k),S=$.parent(e,k),z=k[k.length-1];S.children.splice(z,1);var G=w.transform(k,r),X=$.get(e,w.parent(G)),te=G[G.length-1];if(X.children.splice(te,0,R),t)for(var[re,ke]of O.points(t))t[ke]=Y.transform(re,r);break}case"remove_node":{var{path:he}=r,V=he[he.length-1],Oe=$.parent(e,he);if(Oe.children.splice(V,1),t)for(var[ce,ue]of O.points(t)){var J=Y.transform(ce,r);if(t!=null&&J!=null)t[ue]=J;else{var ne=void 0,oe=void 0;for(var[De,Ie]of $.texts(e))if(w.compare(Ie,he)===-1)ne=[De,Ie];else{oe=[De,Ie];break}var Ue=!1;ne&&oe&&(w.equals(oe[1],he)?Ue=!w.hasPrevious(oe[1]):Ue=w.common(ne[1],he).length<w.common(oe[1],he).length),ne&&!Ue?(ce.path=ne[1],ce.offset=ne[0].text.length):oe?(ce.path=oe[1],ce.offset=0):t=null}}break}case"remove_text":{var{path:tr,offset:jn,text:eo}=r;if(eo.length===0)break;var Rn=$.leaf(e,tr),to=Rn.text.slice(0,jn),ro=Rn.text.slice(jn+eo.length);if(Rn.text=to+ro,t)for(var[Nn,no]of O.points(t))t[no]=Y.transform(Nn,r);break}case"set_node":{var{path:io,properties:Va,newProperties:It}=r;if(io.length===0)throw new Error("Cannot set properties on the root node!");var rr=$.get(e,io);for(var vt in It){if(vt==="children"||vt==="text")throw new Error('Cannot set the "'.concat(vt,'" property of nodes!'));var $n=It[vt];$n==null?delete rr[vt]:rr[vt]=$n}for(var nt in Va)It.hasOwnProperty(nt)||delete rr[nt];break}case"set_selection":{var{newProperties:Ze}=r;if(Ze==null)t=Ze;else{if(t==null){if(!O.isRange(Ze))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Ze)," when there is no current selection."));t=zn({},Ze)}for(var Ut in Ze){var Ln=Ze[Ut];if(Ln==null){if(Ut==="anchor"||Ut==="focus")throw new Error('Cannot remove the "'.concat(Ut,'" selection property'));delete t[Ut]}else t[Ut]=Ln}}break}case"split_node":{var{path:mt,position:nr,properties:oo}=r;if(mt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(mt,"] because the root node cannot be split."));var yt=$.get(e,mt),Ka=$.parent(e,mt),Ga=mt[mt.length-1],qr;if(W.isText(yt)){var Ja=yt.text.slice(0,nr),Xa=yt.text.slice(nr);yt.text=Ja,qr=zn(zn({},oo),{},{text:Xa})}else{var Mn=yt.children.slice(0,nr),ir=yt.children.slice(nr);yt.children=Mn,qr=zn(zn({},oo),{},{children:ir})}if(Ka.children.splice(Ga+1,0,qr),t)for(var[In,Un]of O.points(t))t[Un]=Y.transform(In,r);break}}return t},t1={transform(e,t){e.children=af(e.children);var r=e.selection&&af(e.selection);try{r=e1(e,r,t)}finally{e.children=sf(e.children),r?e.selection=Tr(r)?sf(r):r:e.selection=null}}},r1=["text"],n1=["children"];function Af(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Af(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Af(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var i1={insertNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:o="lowest"}=r,{at:a,match:s,select:u}=r;if($.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=m.end(e,[]):a=[0],u=!0),u==null&&(u=!1),O.isRange(a))if(n||(a=m.unhangRange(e,a)),O.isCollapsed(a))a=a.anchor;else{var[,f]=O.edges(a),c=m.pointRef(e,f);N.delete(e,{at:a}),a=c.unref()}if(Y.isPoint(a)){s==null&&(W.isText(l)?s=x=>W.isText(x):e.isInline(l)?s=x=>W.isText(x)||m.isInline(e,x):s=x=>m.isBlock(e,x));var[d]=m.nodes(e,{at:a.path,match:s,mode:o,voids:i});if(d){var[,p]=d,h=m.pathRef(e,p),g=m.isEnd(e,a,p);N.splitNodes(e,{at:a,match:s,mode:o,voids:i});var v=h.unref();a=g?w.next(v):v}else return}var D=w.parent(a),C=a[a.length-1];if(!(!i&&m.void(e,{at:D}))){for(var b of t){var A=D.concat(C);C++,e.apply({type:"insert_node",path:A,node:b}),a=w.next(a)}if(a=w.previous(a),u){var E=m.end(e,a);E&&N.select(e,E)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=w.isPath(r)?Yr(e,r):b=>m.isBlock(e,b)),!!r){var a=m.nodes(e,{at:r,match:o,mode:n,voids:i}),s=Array.from(a,b=>{var[,A]=b;return m.pathRef(e,A)});for(var u of s){var l=u.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 f=m.node(e,w.parent(l)),[c,d]=f,p=l[l.length-1],{length:h}=c.children;if(h===1){var g=w.next(d);N.moveNodes(e,{at:l,to:g,voids:i}),N.removeNodes(e,{at:d,voids:i})}else if(p===0)N.moveNodes(e,{at:l,to:d,voids:i});else if(p===h-1){var v=w.next(d);N.moveNodes(e,{at:l,to:v,voids:i})}else{var D=w.next(l),C=w.next(d);N.splitNodes(e,{at:D,voids:i}),N.moveNodes(e,{at:l,to:C,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(n){if(r==null)if(w.isPath(n)){var[s]=m.parent(e,n);r=k=>s.children.includes(k)}else r=k=>m.isBlock(e,k);if(!i&&O.isRange(n)&&(n=m.unhangRange(e,n)),O.isRange(n))if(O.isCollapsed(n))n=n.anchor;else{var[,u]=O.edges(n),l=m.pointRef(e,u);N.delete(e,{at:n}),n=l.unref(),t.at==null&&N.select(e,n)}var[f]=m.nodes(e,{at:n,match:r,voids:o,mode:a}),c=m.previous(e,{at:n,match:r,voids:o,mode:a});if(!(!f||!c)){var[d,p]=f,[h,g]=c;if(!(p.length===0||g.length===0)){var v=w.next(g),D=w.common(p,g),C=w.isSibling(p,g),b=Array.from(m.levels(e,{at:p}),k=>{var[M]=k;return M}).slice(D.length).slice(0,-1),A=m.above(e,{at:p,mode:"highest",match:k=>b.includes(k)&&up(e,k)}),E=A&&m.pathRef(e,A[1]),x,_;if(W.isText(d)&&W.isText(h)){var T=Rt(d,r1);_=h.text.length,x=T}else if(Q.isElement(d)&&Q.isElement(h)){var T=Rt(d,n1);_=h.children.length,x=T}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(h)));C||N.moveNodes(e,{at:p,to:v,voids:o}),E&&N.removeNodes(e,{at:E.current,voids:o}),Q.isElement(h)&&m.isEmpty(e,h)||W.isText(h)&&h.text===""&&g[g.length-1]!==0?N.removeNodes(e,{at:g,voids:o}):e.apply({type:"merge_node",path:v,position:_,properties:x}),E&&E.unref()}}}})},moveNodes(e,t){m.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(n){a==null&&(a=w.isPath(n)?Yr(e,n):p=>m.isBlock(e,p));var s=m.pathRef(e,r),u=m.nodes(e,{at:n,match:a,mode:i,voids:o}),l=Array.from(u,p=>{var[,h]=p;return m.pathRef(e,h)});for(var f of l){var c=f.unref(),d=s.current;c.length!==0&&e.apply({type:"move_node",path:c,newPath:d}),s.current&&w.isSibling(d,c)&&w.isAfter(d,c)&&(s.current=w.next(s.current))}s.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Yr(e,o):d=>m.isBlock(e,d)),!r&&O.isRange(o)&&(o=m.unhangRange(e,o));var s=m.nodes(e,{at:o,match:a,mode:i,voids:n}),u=Array.from(s,d=>{var[,p]=d;return m.pathRef(e,p)});for(var l of u){var f=l.unref();if(f){var[c]=m.node(e,f);e.apply({type:"remove_node",path:f,node:c})}}}})},setNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:o=!1,mode:a="lowest",split:s=!1,voids:u=!1}=r;if(i){if(n==null&&(n=w.isPath(i)?Yr(e,i):E=>m.isBlock(e,E)),!o&&O.isRange(i)&&(i=m.unhangRange(e,i)),s&&O.isRange(i)){if(O.isCollapsed(i)&&m.leaf(e,i.anchor)[0].text.length>0)return;var l=m.rangeRef(e,i,{affinity:"inward"}),[f,c]=O.edges(i),d=a==="lowest"?"lowest":"highest",p=m.isEnd(e,c,c.path);N.splitNodes(e,{at:c,match:n,mode:d,voids:u,always:!p});var h=m.isStart(e,f,f.path);N.splitNodes(e,{at:f,match:n,mode:d,voids:u,always:!h}),i=l.unref(),r.at==null&&N.select(e,i)}for(var[g,v]of m.nodes(e,{at:i,match:n,mode:a,voids:u})){var D={},C={};if(v.length!==0){var b=!1;for(var A in t)A==="children"||A==="text"||t[A]!==g[A]&&(b=!0,g.hasOwnProperty(A)&&(D[A]=g[A]),t[A]!=null&&(C[A]=t[A]));b&&e.apply({type:"set_node",path:v,properties:D,newProperties:C})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection,height:a=0,always:s=!1}=t;if(i==null&&(i=re=>m.isBlock(e,re)),O.isRange(o)&&(o=o1(e,o)),w.isPath(o)){var u=o,l=m.point(e,u),[f]=m.parent(e,u);i=re=>re===f,a=l.path.length-u.length+1,o=l,s=!0}if(o){var c=m.pointRef(e,o,{affinity:"backward"}),[d]=m.nodes(e,{at:o,match:i,mode:r,voids:n});if(d){var p=m.void(e,{at:o,mode:"highest"}),h=0;if(!n&&p){var[g,v]=p;if(Q.isElement(g)&&e.isInline(g)){var D=m.after(e,v);if(!D){var C={text:""},b=w.next(v);N.insertNodes(e,C,{at:b,voids:n}),D=m.point(e,b)}o=D,s=!0}var A=o.path.length-v.length;a=A+1,s=!0}var E=m.pointRef(e,o),x=o.path.length-a,[,_]=d,T=o.path.slice(0,x),k=a===0?o.offset:o.path[x]+h;for(var[M,R]of m.levels(e,{at:T,reverse:!0,voids:n})){var S=!1;if(R.length<_.length||R.length===0||!n&&m.isVoid(e,M))break;var z=c.current,G=m.isEnd(e,z,R);if(s||!c||!m.isEdge(e,z,R)){S=!0;var X=$.extractProps(M);e.apply({type:"split_node",path:R,position:k,properties:X})}k=R[R.length-1]+(S||G?1:0)}if(t.at==null){var te=E.current||m.end(e,[]);N.select(e,te)}c.unref(),E.unref()}}})},unsetNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var i of t)n[i]=null;N.setNodes(e,n,r)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Yr(e,o):d=>m.isBlock(e,d)),w.isPath(o)&&(o=m.range(e,o));var s=O.isRange(o)?m.rangeRef(e,o):null,u=m.nodes(e,{at:o,match:a,mode:r,voids:i}),l=Array.from(u,d=>{var[,p]=d;return m.pathRef(e,p)}).reverse(),f=function(p){var h=p.unref(),[g]=m.node(e,h),v=m.range(e,h);n&&s&&(v=O.intersection(s.current,v)),N.liftNodes(e,{at:v,match:D=>Q.isAncestor(g)&&g.children.includes(D),voids:i})};for(var c of l)f(c);s&&s.unref()}})},wrapNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:o=!1}=r,{match:a,at:s=e.selection}=r;if(s){if(a==null&&(w.isPath(s)?a=Yr(e,s):e.isInline(t)?a=v=>m.isInline(e,v)||W.isText(v):a=v=>m.isBlock(e,v)),i&&O.isRange(s)){var[u,l]=O.edges(s),f=m.rangeRef(e,s,{affinity:"inward"});N.splitNodes(e,{at:l,match:a,voids:o}),N.splitNodes(e,{at:u,match:a,voids:o}),s=f.unref(),r.at==null&&N.select(e,s)}var c=Array.from(m.nodes(e,{at:s,match:e.isInline(t)?v=>m.isBlock(e,v):v=>m.isEditor(v),mode:"lowest",voids:o}));for(var[,d]of c){var p=O.isRange(s)?O.intersection(s,m.range(e,d)):s;if(p){var h=Array.from(m.nodes(e,{at:p,match:a,mode:n,voids:o}));if(h.length>0){var g=function(){var[v]=h,D=h[h.length-1],[,C]=v,[,b]=D;if(C.length===0&&b.length===0)return"continue";var A=w.equals(C,b)?w.parent(C):w.common(C,b),E=m.range(e,C,b),x=m.node(e,A),[_]=x,T=A.length+1,k=w.next(b.slice(0,T)),M=Ff(Ff({},t),{},{children:[]});N.insertNodes(e,M,{at:k,voids:o}),N.moveNodes(e,{at:E,match:R=>Q.isAncestor(_)&&_.children.includes(R),to:k.concat(0),voids:o})}();if(g==="continue")continue}}}}})}},up=(e,t)=>{if(Q.isElement(t)){var r=t;return m.isVoid(e,t)?!0:r.children.length===1?up(e,r.children[0]):!1}else return!m.isEditor(t)},o1=(e,t)=>{if(O.isCollapsed(t))return t.anchor;var[,r]=O.edges(t),n=m.pointRef(e,r);return N.delete(e,{at:t}),n.unref()},Yr=(e,t)=>{var[r]=m.node(e,t);return n=>n===r};function xf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Of(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var a1={collapse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")N.select(e,n.anchor);else if(r==="focus")N.select(e,n.focus);else if(r==="start"){var[i]=O.edges(n);N.select(e,i)}else if(r==="end"){var[,o]=O.edges(n);N.select(e,o)}}else return},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(r){a==="start"&&(a=O.isBackward(r)?"focus":"anchor"),a==="end"&&(a=O.isBackward(r)?"anchor":"focus");var{anchor:s,focus:u}=r,l={distance:n,unit:i},f={};if(a==null||a==="anchor"){var c=o?m.before(e,s,l):m.after(e,s,l);c&&(f.anchor=c)}if(a==null||a==="focus"){var d=o?m.before(e,u,l):m.after(e,u,l);d&&(f.focus=d)}N.setSelection(e,f)}},select(e,t){var{selection:r}=e;if(t=m.range(e,t),r){N.setSelection(e,t);return}if(!O.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:r,newProperties:t})},setPoint(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:i="both"}=r;if(n){i==="start"&&(i=O.isBackward(n)?"focus":"anchor"),i==="end"&&(i=O.isBackward(n)?"anchor":"focus");var{anchor:o,focus:a}=n,s=i==="anchor"?o:a;N.setSelection(e,{[i==="anchor"?"anchor":"focus"]:Of(Of({},s),t)})}},setSelection(e,t){var{selection:r}=e,n={},i={};if(r){for(var o in t)(o==="anchor"&&t.anchor!=null&&!Y.equals(t.anchor,r.anchor)||o==="focus"&&t.focus!=null&&!Y.equals(t.focus,r.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==r[o])&&(n[o]=r[o],i[o]=t[o]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:i})}}},s1={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{reverse:r=!1,unit:n="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){if(O.isRange(a)&&O.isCollapsed(a)&&(a=a.anchor),Y.isPoint(a)){var u=m.void(e,{at:a,mode:"highest"});if(!o&&u){var[,l]=u;a=l}else{var f={unit:n,distance:i},c=r?m.before(e,a,f)||m.start(e,[]):m.after(e,a,f)||m.end(e,[]);a={anchor:a,focus:c},s=!0}}if(w.isPath(a)){N.removeNodes(e,{at:a,voids:o});return}if(!O.isCollapsed(a)){if(!s){var[,d]=O.edges(a),p=m.end(e,[]);Y.equals(d,p)||(a=m.unhangRange(e,a,{voids:o}))}var[h,g]=O.edges(a),v=m.above(e,{match:Ue=>m.isBlock(e,Ue),at:h,voids:o}),D=m.above(e,{match:Ue=>m.isBlock(e,Ue),at:g,voids:o}),C=v&&D&&!w.equals(v[1],D[1]),b=w.equals(h.path,g.path),A=o?null:m.void(e,{at:h,mode:"highest"}),E=o?null:m.void(e,{at:g,mode:"highest"});if(A){var x=m.before(e,h);x&&v&&w.isAncestor(v[1],x.path)&&(h=x)}if(E){var _=m.after(e,g);_&&D&&w.isAncestor(D[1],_.path)&&(g=_)}var T=[],k;for(var M of m.nodes(e,{at:a,voids:o})){var[R,S]=M;k&&w.compare(S,k)===0||(!o&&m.isVoid(e,R)||!w.isCommon(S,h.path)&&!w.isCommon(S,g.path))&&(T.push(M),k=S)}var z=Array.from(T,Ue=>{var[,tr]=Ue;return m.pathRef(e,tr)}),G=m.pointRef(e,h),X=m.pointRef(e,g);if(!b&&!A){var te=G.current,[re]=m.leaf(e,te),{path:ke}=te,{offset:he}=h,V=re.text.slice(he);V.length>0&&e.apply({type:"remove_text",path:ke,offset:he,text:V})}for(var Oe of z){var ce=Oe.unref();N.removeNodes(e,{at:ce,voids:o})}if(!E){var ue=X.current,[J]=m.leaf(e,ue),{path:ne}=ue,oe=b?h.offset:0,De=J.text.slice(oe,g.offset);De.length>0&&e.apply({type:"remove_text",path:ne,offset:oe,text:De})}!b&&C&&X.current&&G.current&&N.mergeNodes(e,{at:X.current,hanging:!0,voids:o});var Ie=r?G.unref()||X.unref():X.unref()||G.unref();t.at==null&&Ie&&N.select(e,Ie)}}})},insertFragment(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1}=r,{at:o=e.selection}=r;if(t.length){if(o)if(O.isRange(o))if(n||(o=m.unhangRange(e,o)),O.isCollapsed(o))o=o.anchor;else{var[,a]=O.edges(o);if(!i&&m.void(e,{at:a}))return;var s=m.pointRef(e,a);N.delete(e,{at:o}),o=s.unref()}else w.isPath(o)&&(o=m.start(e,o));else return;if(!(!i&&m.void(e,{at:o}))){var u=m.above(e,{at:o,match:J=>m.isInline(e,J),mode:"highest",voids:i});if(u){var[,l]=u;if(m.isEnd(e,o,l)){var f=m.after(e,l);o=f}else if(m.isStart(e,o,l)){var c=m.before(e,l);o=c}}var d=m.above(e,{match:J=>m.isBlock(e,J),at:o,voids:i}),[,p]=d,h=m.isStart(e,o,p),g=m.isEnd(e,o,p),v=h&&g,D=!h||h&&g,C=!g,[,b]=$.first({children:t},[]),[,A]=$.last({children:t},[]),E=[],x=J=>{var[ne,oe]=J,De=oe.length===0;return De?!1:v?!0:!(D&&w.isAncestor(oe,b)&&Q.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne)||C&&w.isAncestor(oe,A)&&Q.isElement(ne)&&!e.isVoid(ne)&&!e.isInline(ne))};for(var _ of $.nodes({children:t},{pass:x}))x(_)&&E.push(_);var T=[],k=[],M=[],R=!0,S=!1;for(var[z]of E)Q.isElement(z)&&!e.isInline(z)?(R=!1,S=!0,k.push(z)):R?T.push(z):M.push(z);var[G]=m.nodes(e,{at:o,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),[,X]=G,te=m.isStart(e,o,X),re=m.isEnd(e,o,X),ke=m.pathRef(e,g?w.next(p):p),he=m.pathRef(e,re?w.next(X):X),V=m.pathRef(e,p);N.splitNodes(e,{at:o,match:J=>S?m.isBlock(e,J):W.isText(J)||m.isInline(e,J),mode:S?"lowest":"highest",voids:i});var Oe=m.pathRef(e,!te||te&&re?w.next(X):X);if(N.insertNodes(e,T,{at:Oe.current,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),v&&k.length&&N.delete(e,{at:V.unref(),voids:i}),N.insertNodes(e,k,{at:ke.current,match:J=>m.isBlock(e,J),mode:"lowest",voids:i}),N.insertNodes(e,M,{at:he.current,match:J=>W.isText(J)||m.isInline(e,J),mode:"highest",voids:i}),!r.at){var ce;M.length>0?ce=w.previous(he.current):k.length>0?ce=w.previous(ke.current):ce=w.previous(Oe.current);var ue=m.end(e,ce);N.select(e,ue)}Oe.unref(),ke.unref(),he.unref()}}})},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:i=e.selection}=r;if(i){if(w.isPath(i)&&(i=m.range(e,i)),O.isRange(i))if(O.isCollapsed(i))i=i.anchor;else{var o=O.end(i);if(!n&&m.void(e,{at:o}))return;var a=O.start(i),s=m.pointRef(e,a);N.delete(e,{at:i,voids:n}),i=s.unref(),N.setSelection(e,{anchor:i,focus:i})}if(!(!n&&m.void(e,{at:i}))){var{path:u,offset:l}=i;t.length>0&&e.apply({type:"insert_text",path:u,offset:l,text:t})}}})}};function Sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Sf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N=co(co(co(co({},t1),i1),a1),s1),lp=9007199254740991,u1="[object Arguments]",l1="[object Function]",c1="[object GeneratorFunction]",vu="[object Map]",f1="[object Object]",_f="[object Promise]",mu="[object Set]",d1="[object String]",Pf="[object WeakMap]",kf="[object DataView]",h1=/[\\^$.*+?()[\]{}|]/g,p1=/^\[object .+?Constructor\]$/,g1=/^(?:0|[1-9]\d*)$/,Dl="\\ud800-\\udfff",cp="\\u0300-\\u036f\\ufe20-\\ufe23",fp="\\u20d0-\\u20f0",dp="\\ufe0e\\ufe0f",v1="["+Dl+"]",yu="["+cp+fp+"]",Du="\\ud83c[\\udffb-\\udfff]",m1="(?:"+yu+"|"+Du+")",hp="[^"+Dl+"]",pp="(?:\\ud83c[\\udde6-\\uddff]){2}",gp="[\\ud800-\\udbff][\\udc00-\\udfff]",vp="\\u200d",mp=m1+"?",yp="["+dp+"]?",y1="(?:"+vp+"(?:"+[hp,pp,gp].join("|")+")"+yp+mp+")*",D1=yp+mp+y1,C1="(?:"+[hp+yu+"?",yu,pp,gp,v1].join("|")+")",b1=RegExp(Du+"(?="+Du+")|"+C1+D1,"g"),w1=RegExp("["+vp+Dl+cp+fp+dp+"]"),E1=typeof se.c=="object"&&se.c&&se.c.Object===Object&&se.c,B1=typeof self=="object"&&self&&self.Object===Object&&self,Ur=E1||B1||Function("return this")();function A1(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function F1(e){return e.split("")}function x1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function O1(e,t){return A1(t,function(r){return e[r]})}function S1(e,t){return e==null?void 0:e[t]}function _1(e){return w1.test(e)}function P1(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function k1(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function T1(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function j1(e,t){return function(r){return e(t(r))}}function R1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function N1(e){return _1(e)?$1(e):F1(e)}function $1(e){return e.match(b1)||[]}var L1=Function.prototype,wa=Object.prototype,ss=Ur["__core-js_shared__"],Tf=function(){var e=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Dp=L1.toString,Ea=wa.hasOwnProperty,zi=wa.toString,M1=RegExp("^"+Dp.call(Ea).replace(h1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jf=Ur.Symbol,us=jf?jf.iterator:void 0,I1=wa.propertyIsEnumerable,U1=j1(Object.keys,Object),Cu=Wi(Ur,"DataView"),bu=Wi(Ur,"Map"),wu=Wi(Ur,"Promise"),Eu=Wi(Ur,"Set"),Bu=Wi(Ur,"WeakMap"),H1=Hr(Cu),z1=Hr(bu),W1=Hr(wu),q1=Hr(Eu),V1=Hr(Bu);function K1(e,t){var r=Cp(e)||ty(e)?x1(e.length,String):[],n=r.length,i=!!n;for(var o in e)Ea.call(e,o)&&!(i&&(o=="length"||Z1(o,n)))&&r.push(o);return r}function G1(e){return zi.call(e)}function J1(e){if(!wp(e)||Q1(e))return!1;var t=bp(e)||P1(e)?M1:p1;return t.test(Hr(e))}function X1(e){if(!ey(e))return U1(e);var t=[];for(var r in Object(e))Ea.call(e,r)&&r!="constructor"&&t.push(r);return t}function Y1(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Wi(e,t){var r=S1(e,t);return J1(r)?r:void 0}var Cr=G1;(Cu&&Cr(new Cu(new ArrayBuffer(1)))!=kf||bu&&Cr(new bu)!=vu||wu&&Cr(wu.resolve())!=_f||Eu&&Cr(new Eu)!=mu||Bu&&Cr(new Bu)!=Pf)&&(Cr=function(e){var t=zi.call(e),r=t==f1?e.constructor:void 0,n=r?Hr(r):void 0;if(n)switch(n){case H1:return kf;case z1:return vu;case W1:return _f;case q1:return mu;case V1:return Pf}return t});function Z1(e,t){return t=t??lp,!!t&&(typeof e=="number"||g1.test(e))&&e>-1&&e%1==0&&e<t}function Q1(e){return!!Tf&&Tf in e}function ey(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wa;return e===r}function Hr(e){if(e!=null){try{return Dp.call(e)}catch{}try{return e+""}catch{}}return""}function ty(e){return ry(e)&&Ea.call(e,"callee")&&(!I1.call(e,"callee")||zi.call(e)==u1)}var Cp=Array.isArray;function Cl(e){return e!=null&&ny(e.length)&&!bp(e)}function ry(e){return Ep(e)&&Cl(e)}function bp(e){var t=wp(e)?zi.call(e):"";return t==l1||t==c1}function ny(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lp}function wp(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ep(e){return!!e&&typeof e=="object"}function iy(e){return typeof e=="string"||!Cp(e)&&Ep(e)&&zi.call(e)==d1}function oy(e){if(!e)return[];if(Cl(e))return iy(e)?N1(e):Y1(e);if(us&&e[us])return k1(e[us]());var t=Cr(e),r=t==vu?T1:t==mu?R1:sy;return r(e)}function ay(e){return Cl(e)?K1(e):X1(e)}function sy(e){return e?O1(e,ay(e)):[]}var uy=oy;const Rf=se.g(uy);var Bp=9007199254740991,ly="[object Arguments]",cy="[object Function]",fy="[object GeneratorFunction]",dy=/^(?:0|[1-9]\d*)$/;function hy(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function py(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function gy(e,t){return function(r){return e(t(r))}}var Ba=Object.prototype,bl=Ba.hasOwnProperty,Ap=Ba.toString,vy=Ba.propertyIsEnumerable,my=gy(Object.keys,Object);function yy(e,t){var r=Fp(e)||Oy(e)?py(e.length,String):[],n=r.length,i=!!n;for(var o in e)bl.call(e,o)&&!(i&&(o=="length"||Ay(o,n)))&&r.push(o);return r}var Dy=Ey(by),Cy=By();function by(e,t){return e&&Cy(e,t,jy)}function wy(e){if(!Fy(e))return my(e);var t=[];for(var r in Object(e))bl.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ey(e,t){return function(r,n){if(r==null)return r;if(!wl(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}function By(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[++i];if(r(o[u],u,o)===!1)break}return t}}function Ay(e,t){return t=t??Bp,!!t&&(typeof e=="number"||dy.test(e))&&e>-1&&e%1==0&&e<t}function Fy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ba;return e===r}function xy(e,t){var r=Fp(e)?hy:Dy;return r(e,typeof t=="function"?t:Ry)}function Oy(e){return Sy(e)&&bl.call(e,"callee")&&(!vy.call(e,"callee")||Ap.call(e)==ly)}var Fp=Array.isArray;function wl(e){return e!=null&&Py(e.length)&&!_y(e)}function Sy(e){return Ty(e)&&wl(e)}function _y(e){var t=ky(e)?Ap.call(e):"";return t==cy||t==fy}function Py(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bp}function ky(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ty(e){return!!e&&typeof e=="object"}function jy(e){return wl(e)?yy(e):wy(e)}function Ry(e){return e}var Ny=xy;const $y=se.g(Ny);function Ly(e,t){return document.createElement(e,t)}function My(e,t,r){return document.createElementNS(e,t,r)}function Iy(){return Sr(document.createDocumentFragment())}function Uy(e){return document.createTextNode(e)}function Hy(e){return document.createComment(e)}function zy(e,t,r){if(kt(e)){let n=e;for(;n&&kt(n);)n=Sr(n).parent;e=n??e}kt(t)&&(t=Sr(t,e)),r&&kt(r)&&(r=Sr(r).firstChildNode),e.insertBefore(t,r)}function Wy(e,t){e.removeChild(t)}function qy(e,t){kt(t)&&(t=Sr(t,e)),e.appendChild(t)}function xp(e){if(kt(e)){for(;e&&kt(e);)e=Sr(e).parent;return e??null}return e.parentNode}function Vy(e){var t;if(kt(e)){const r=Sr(e),n=xp(r);if(n&&r.lastChildNode){const i=Array.from(n.childNodes),o=i.indexOf(r.lastChildNode);return(t=i[o+1])!==null&&t!==void 0?t:null}return null}return e.nextSibling}function Ky(e){return e.tagName}function Gy(e,t){e.textContent=t}function Jy(e){return e.textContent}function Xy(e){return e.nodeType===1}function Yy(e){return e.nodeType===3}function Zy(e){return e.nodeType===8}function kt(e){return e.nodeType===11}function Sr(e,t){var r,n,i;const o=e;return(r=o.parent)!==null&&r!==void 0||(o.parent=t??null),(n=o.firstChildNode)!==null&&n!==void 0||(o.firstChildNode=e.firstChild),(i=o.lastChildNode)!==null&&i!==void 0||(o.lastChildNode=e.lastChild),o}const Qy={createElement:Ly,createElementNS:My,createTextNode:Uy,createDocumentFragment:Iy,createComment:Hy,insertBefore:zy,removeChild:Wy,appendChild:qy,parentNode:xp,nextSibling:Vy,tagName:Ky,setTextContent:Gy,getTextContent:Jy,isElement:Xy,isText:Yy,isComment:Zy,isDocumentFragment:kt};function Dn(e,t,r,n,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:r,text:n,elm:i,key:o}}const Yo=Array.isArray;function So(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}const ls=Dn("",{},[],void 0,void 0);function Wn(e,t){var r,n;const i=e.key===t.key,o=((r=e.data)===null||r===void 0?void 0:r.is)===((n=t.data)===null||n===void 0?void 0:n.is),a=e.sel===t.sel,s=!e.sel&&e.sel===t.sel?typeof e.text==typeof t.text:!0;return a&&i&&o&&s}function eD(){throw new Error("The document fragment is not supported on this platform.")}function tD(e,t){return e.isElement(t)}function rD(e,t){return e.isDocumentFragment(t)}function nD(e,t,r){var n;const i={};for(let o=t;o<=r;++o){const a=(n=e[o])===null||n===void 0?void 0:n.key;a!==void 0&&(i[a]=o)}return i}const iD=["create","update","remove","destroy","pre","post"];function oD(e,t,r){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},i=Qy;for(const h of iD)for(const g of e){const v=g[h];v!==void 0&&n[h].push(v)}function o(h){const g=h.id?"#"+h.id:"",v=h.getAttribute("class"),D=v?"."+v.split(" ").join("."):"";return Dn(i.tagName(h).toLowerCase()+g+D,{},[],void 0,h)}function a(h){return Dn(void 0,{},[],void 0,h)}function s(h,g){return function(){if(--g===0){const D=i.parentNode(h);D!==null&&i.removeChild(D,h)}}}function u(h,g){var v,D,C,b,A;let E;const x=h.data,_=x==null?void 0:x.hook;(v=_==null?void 0:_.init)===null||v===void 0||v.call(_,h);const T=h.children,k=h.sel;if(k==="!")(D=h.text)!==null&&D!==void 0||(h.text=""),h.elm=i.createComment(h.text);else if(k==="")h.elm=i.createTextNode(h.text);else if(k!==void 0){const M=k.indexOf("#"),R=k.indexOf(".",M),S=M>0?M:k.length,z=R>0?R:k.length,G=M!==-1||R!==-1?k.slice(0,Math.min(S,z)):k,X=x==null?void 0:x.ns,te=X===void 0?i.createElement(G,x):i.createElementNS(X,G,x);for(h.elm=te,S<z&&te.setAttribute("id",k.slice(S+1,z)),R>0&&te.setAttribute("class",k.slice(z+1).replace(/\./g," ")),E=0;E<n.create.length;++E)n.create[E](ls,h);if(So(h.text)&&(!Yo(T)||T.length===0)&&i.appendChild(te,i.createTextNode(h.text)),Yo(T))for(E=0;E<T.length;++E){const re=T[E];re!=null&&i.appendChild(te,u(re,g))}_!==void 0&&((C=_.create)===null||C===void 0||C.call(_,ls,h),_.insert!==void 0&&g.push(h))}else if(!((b=void 0)===null||b===void 0)&&b.fragments&&h.children){for(h.elm=((A=i.createDocumentFragment)!==null&&A!==void 0?A:eD)(),E=0;E<n.create.length;++E)n.create[E](ls,h);for(E=0;E<h.children.length;++E){const M=h.children[E];M!=null&&i.appendChild(h.elm,u(M,g))}}else h.elm=i.createTextNode(h.text);return h.elm}function l(h,g,v,D,C,b){for(;D<=C;++D){const A=v[D];A!=null&&i.insertBefore(h,u(A,b),g)}}function f(h){var g,v;const D=h.data;if(D!==void 0){(v=(g=D==null?void 0:D.hook)===null||g===void 0?void 0:g.destroy)===null||v===void 0||v.call(g,h);for(let C=0;C<n.destroy.length;++C)n.destroy[C](h);if(h.children!==void 0)for(let C=0;C<h.children.length;++C){const b=h.children[C];b!=null&&typeof b!="string"&&f(b)}}}function c(h,g,v,D){for(var C,b;v<=D;++v){let A;const E=g[v];if(E!=null)if(E.sel!==void 0){f(E),A=n.remove.length+1;const x=s(E.elm,A);for(let T=0;T<n.remove.length;++T)n.remove[T](E,x);const _=(b=(C=E==null?void 0:E.data)===null||C===void 0?void 0:C.hook)===null||b===void 0?void 0:b.remove;_!==void 0?_(E,x):x()}else E.children?(f(E),c(h,E.children,0,E.children.length-1)):i.removeChild(h,E.elm)}}function d(h,g,v,D){let C=0,b=0,A=g.length-1,E=g[0],x=g[A],_=v.length-1,T=v[0],k=v[_],M,R,S,z;for(;C<=A&&b<=_;)E==null?E=g[++C]:x==null?x=g[--A]:T==null?T=v[++b]:k==null?k=v[--_]:Wn(E,T)?(p(E,T,D),E=g[++C],T=v[++b]):Wn(x,k)?(p(x,k,D),x=g[--A],k=v[--_]):Wn(E,k)?(p(E,k,D),i.insertBefore(h,E.elm,i.nextSibling(x.elm)),E=g[++C],k=v[--_]):Wn(x,T)?(p(x,T,D),i.insertBefore(h,x.elm,E.elm),x=g[--A],T=v[++b]):(M===void 0&&(M=nD(g,C,A)),R=M[T.key],R===void 0?(i.insertBefore(h,u(T,D),E.elm),T=v[++b]):M[k.key]===void 0?(i.insertBefore(h,u(k,D),i.nextSibling(x.elm)),k=v[--_]):(S=g[R],S.sel!==T.sel?i.insertBefore(h,u(T,D),E.elm):(p(S,T,D),g[R]=void 0,i.insertBefore(h,S.elm,E.elm)),T=v[++b]));b<=_&&(z=v[_+1]==null?null:v[_+1].elm,l(h,z,v,b,_,D)),C<=A&&c(h,g,C,A)}function p(h,g,v){var D,C,b,A,E,x,_,T;const k=(D=g.data)===null||D===void 0?void 0:D.hook;(C=k==null?void 0:k.prepatch)===null||C===void 0||C.call(k,h,g);const M=g.elm=h.elm;if(h===g)return;if(g.data!==void 0||g.text!==void 0&&g.text!==h.text){(b=g.data)!==null&&b!==void 0||(g.data={}),(A=h.data)!==null&&A!==void 0||(h.data={});for(let z=0;z<n.update.length;++z)n.update[z](h,g);(_=(x=(E=g.data)===null||E===void 0?void 0:E.hook)===null||x===void 0?void 0:x.update)===null||_===void 0||_.call(x,h,g)}const R=h.children,S=g.children;g.text===void 0?R!==void 0&&S!==void 0?R!==S&&d(M,R,S,v):S!==void 0?(h.text!==void 0&&i.setTextContent(M,""),l(M,null,S,0,S.length-1,v)):R!==void 0?c(M,R,0,R.length-1):h.text!==void 0&&i.setTextContent(M,""):h.text!==g.text&&(R!==void 0&&c(M,R,0,R.length-1),i.setTextContent(M,g.text)),(T=k==null?void 0:k.postpatch)===null||T===void 0||T.call(k,h,g)}return function(g,v){let D,C,b;const A=[];for(D=0;D<n.pre.length;++D)n.pre[D]();for(tD(i,g)?g=o(g):rD(i,g)&&(g=a(g)),Wn(g,v)?p(g,v,A):(C=g.elm,b=i.parentNode(C),u(v,A),b!==null&&(i.insertBefore(b,v.elm,i.nextSibling(C)),c(b,[g],0,0))),D=0;D<A.length;++D)A[D].data.hook.insert(A[D]);for(D=0;D<n.post.length;++D)n.post[D]();return v}}function Op(e,t,r){if(e.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&t!==void 0)for(let n=0;n<t.length;++n){const i=t[n];if(typeof i=="string")continue;const o=i.data;o!==void 0&&Op(o,i.children,i.sel)}}function tt(e,t,r){let n={},i,o,a;if(r!==void 0?(t!==null&&(n=t),Yo(r)?i=r:So(r)?o=r.toString():r&&r.sel&&(i=[r])):t!=null&&(Yo(t)?i=t:So(t)?o=t.toString():t&&t.sel?i=[t]:n=t),i!==void 0)for(a=0;a<i.length;++a)So(i[a])&&(i[a]=Dn(void 0,void 0,void 0,i[a],void 0));return e.startsWith("svg")&&(e.length===3||e[3]==="."||e[3]==="#")&&Op(n,i,e),Dn(e,n,i,o,void 0)}const aD="http://www.w3.org/1999/xlink",sD="http://www.w3.org/2000/xmlns/",uD="http://www.w3.org/XML/1998/namespace",Nf=58,lD=120,cD=109;function $f(e,t){let r;const n=t.elm;let i=e.data.attrs,o=t.data.attrs;if(!(!i&&!o)&&i!==o){i=i||{},o=o||{};for(r in o){const a=o[r];i[r]!==a&&(a===!0?n.setAttribute(r,""):a===!1?n.removeAttribute(r):r.charCodeAt(0)!==lD?n.setAttribute(r,a):r.charCodeAt(3)===Nf?n.setAttributeNS(uD,r,a):r.charCodeAt(5)===Nf?r.charCodeAt(1)===cD?n.setAttributeNS(sD,r,a):n.setAttributeNS(aD,r,a):n.setAttribute(r,a))}for(r in i)r in o||n.removeAttribute(r)}}const fD={create:$f,update:$f};function Lf(e,t){let r,n;const i=t.elm;let o=e.data.class,a=t.data.class;if(!(!o&&!a)&&o!==a){o=o||{},a=a||{};for(n in o)o[n]&&!Object.prototype.hasOwnProperty.call(a,n)&&i.classList.remove(n);for(n in a)r=a[n],r!==o[n]&&i.classList[r?"add":"remove"](n)}}const dD={create:Lf,update:Lf},Mf=/[A-Z]/g;function If(e,t){const r=t.elm;let n=e.data.dataset,i=t.data.dataset,o;if(!n&&!i||n===i)return;n=n||{},i=i||{};const a=r.dataset;for(o in n)o in i||(a?o in a&&delete a[o]:r.removeAttribute("data-"+o.replace(Mf,"-$&").toLowerCase()));for(o in i)n[o]!==i[o]&&(a?a[o]=i[o]:r.setAttribute("data-"+o.replace(Mf,"-$&").toLowerCase(),i[o]))}const hD={create:If,update:If};function Sp(e,t,r){if(typeof e=="function")e.call(t,r,t);else if(typeof e=="object")for(let n=0;n<e.length;n++)Sp(e[n],t,r)}function pD(e,t){const r=e.type,n=t.data.on;n&&n[r]&&Sp(n[r],t,e)}function gD(){return function e(t){pD(t,e.vnode)}}function cs(e,t){const r=e.data.on,n=e.listener,i=e.elm,o=t&&t.data.on,a=t&&t.elm;let s;if(r!==o){if(r&&n)if(o)for(s in r)o[s]||i.removeEventListener(s,n,!1);else for(s in r)i.removeEventListener(s,n,!1);if(o){const u=t.listener=e.listener||gD();if(u.vnode=t,r)for(s in o)r[s]||a.addEventListener(s,u,!1);else for(s in o)a.addEventListener(s,u,!1)}}}const vD={create:cs,update:cs,destroy:cs};function Uf(e,t){let r,n,i;const o=t.elm;let a=e.data.props,s=t.data.props;if(!(!a&&!s)&&a!==s){a=a||{},s=s||{};for(r in s)n=s[r],i=a[r],i!==n&&(r!=="value"||o[r]!==n)&&(o[r]=n)}}const mD={create:Uf,update:Uf},Hf=typeof(window==null?void 0:window.requestAnimationFrame)=="function"?window.requestAnimationFrame.bind(window):setTimeout,yD=e=>{Hf(()=>{Hf(e)})};let Au=!1;function DD(e,t,r){yD(()=>{e[t]=r})}function zf(e,t){let r,n;const i=t.elm;let o=e.data.style,a=t.data.style;if(!o&&!a||o===a)return;o=o||{},a=a||{};const s="delayed"in o;for(n in o)n in a||(n[0]==="-"&&n[1]==="-"?i.style.removeProperty(n):i.style[n]="");for(n in a)if(r=a[n],n==="delayed"&&a.delayed)for(const u in a.delayed)r=a.delayed[u],(!s||r!==o.delayed[u])&&DD(i.style,u,r);else n!=="remove"&&r!==o[n]&&(n[0]==="-"&&n[1]==="-"?i.style.setProperty(n,r):i.style[n]=r)}function CD(e){let t,r;const n=e.elm,i=e.data.style;if(!(!i||!(t=i.destroy)))for(r in t)n.style[r]=t[r]}function bD(e,t){const r=e.data.style;if(!r||!r.remove){t();return}Au||(e.elm.offsetLeft,Au=!0);let n;const i=e.elm;let o=0;const a=r.remove;let s=0;const u=[];for(n in a)u.push(n),i.style[n]=a[n];const f=getComputedStyle(i)["transition-property"].split(", ");for(;o<f.length;++o)u.indexOf(f[o])!==-1&&s++;i.addEventListener("transitionend",c=>{c.target===i&&--s,s===0&&t()})}function wD(){Au=!1}const ED={pre:wD,create:zf,update:zf,destroy:CD,remove:bD};function _p(e,t){for(const r of e)r!=null&&r!==!1&&r!==""&&(Array.isArray(r)?_p(r,t):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?t.push(Dn(void 0,void 0,void 0,String(r),void 0)):t.push(r));return t}function Xt(e,t,...r){const n=_p(r,[]);return typeof e=="function"?e(t,n):n.length===1&&!n[0].sel&&n[0].text?tt(e,t,n[0].text):tt(e,t,n)}var BD="[object Symbol]",AD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,FD=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Aa="\\ud800-\\udfff",Pp="\\u0300-\\u036f\\ufe20-\\ufe23",kp="\\u20d0-\\u20f0",Tp="\\u2700-\\u27bf",jp="a-z\\xdf-\\xf6\\xf8-\\xff",xD="\\xac\\xb1\\xd7\\xf7",OD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SD="\\u2000-\\u206f",_D=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rp="A-Z\\xc0-\\xd6\\xd8-\\xde",Np="\\ufe0e\\ufe0f",$p=xD+OD+SD+_D,El="['’]",PD="["+Aa+"]",Wf="["+$p+"]",Zo="["+Pp+kp+"]",Lp="\\d+",kD="["+Tp+"]",Mp="["+jp+"]",Ip="[^"+Aa+$p+Lp+Tp+jp+Rp+"]",Fu="\\ud83c[\\udffb-\\udfff]",TD="(?:"+Zo+"|"+Fu+")",Up="[^"+Aa+"]",Bl="(?:\\ud83c[\\udde6-\\uddff]){2}",Al="[\\ud800-\\udbff][\\udc00-\\udfff]",on="["+Rp+"]",Hp="\\u200d",qf="(?:"+Mp+"|"+Ip+")",jD="(?:"+on+"|"+Ip+")",Vf="(?:"+El+"(?:d|ll|m|re|s|t|ve))?",Kf="(?:"+El+"(?:D|LL|M|RE|S|T|VE))?",zp=TD+"?",Wp="["+Np+"]?",RD="(?:"+Hp+"(?:"+[Up,Bl,Al].join("|")+")"+Wp+zp+")*",qp=Wp+zp+RD,ND="(?:"+[kD,Bl,Al].join("|")+")"+qp,$D="(?:"+[Up+Zo+"?",Zo,Bl,Al,PD].join("|")+")",LD=RegExp(El,"g"),MD=RegExp(Zo,"g"),ID=RegExp(Fu+"(?="+Fu+")|"+$D+qp,"g"),UD=RegExp([on+"?"+Mp+"+"+Vf+"(?="+[Wf,on,"$"].join("|")+")",jD+"+"+Kf+"(?="+[Wf,on+qf,"$"].join("|")+")",on+"?"+qf+"+"+Vf,on+"+"+Kf,Lp,ND].join("|"),"g"),HD=RegExp("["+Hp+Aa+Pp+kp+Np+"]"),zD=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,WD={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},qD=typeof se.c=="object"&&se.c&&se.c.Object===Object&&se.c,VD=typeof self=="object"&&self&&self.Object===Object&&self,KD=qD||VD||Function("return this")();function GD(e,t,r,n){for(var i=-1,o=e?e.length:0;++i<o;)r=t(r,e[i],i,e);return r}function JD(e){return e.split("")}function XD(e){return e.match(AD)||[]}function YD(e){return function(t){return e==null?void 0:e[t]}}var ZD=YD(WD);function Vp(e){return HD.test(e)}function QD(e){return zD.test(e)}function eC(e){return Vp(e)?tC(e):JD(e)}function tC(e){return e.match(ID)||[]}function rC(e){return e.match(UD)||[]}var nC=Object.prototype,iC=nC.toString,Gf=KD.Symbol,Jf=Gf?Gf.prototype:void 0,Xf=Jf?Jf.toString:void 0;function oC(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function aC(e){if(typeof e=="string")return e;if(fC(e))return Xf?Xf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function sC(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:oC(e,t,r)}function uC(e){return function(t){t=Fa(t);var r=Vp(t)?eC(t):void 0,n=r?r[0]:t.charAt(0),i=r?sC(r,1).join(""):t.slice(1);return n[e]()+i}}function lC(e){return function(t){return GD(vC(pC(t).replace(LD,"")),e,"")}}function cC(e){return!!e&&typeof e=="object"}function fC(e){return typeof e=="symbol"||cC(e)&&iC.call(e)==BD}function Fa(e){return e==null?"":aC(e)}var dC=lC(function(e,t,r){return t=t.toLowerCase(),e+(r?hC(t):t)});function hC(e){return gC(Fa(e).toLowerCase())}function pC(e){return e=Fa(e),e&&e.replace(FD,ZD).replace(MD,"")}var gC=uC("toUpperCase");function vC(e,t,r){return e=Fa(e),t=t,t===void 0?QD(e)?rC(e):XD(e):e.match(t)||[]}var mC=dC;const yC=se.g(mC);var $t={};Object.defineProperty($t,"__esModule",{value:!0});var DC=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),fs={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Kp={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:DC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Fl={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 fo=1;fo<20;fo++)Fl["f"+fo]=111+fo;function xa(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(a){return Gp(a,t)}),i=function(s){return n.some(function(u){return Jp(u,s)})},o=r==null?i:i(r);return o}function CC(e,t){return xa(e,t)}function bC(e,t){return xa(e,{byKey:!0},t)}function Gp(e,t){var r=t&&t.byKey,n={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in fs)n[fs[a]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(s=(c=f.next()).done);s=!0){var d=c.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var h=xl(d),g=fs[h];if(d.length>1&&!g&&!Kp[d]&&!Fl[h])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!g)&&(r?n.key=h:n.which=Xp(d)),g&&(n[g]=p?null:!0)}}catch(v){u=!0,l=v}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return n}function Jp(e,t){for(var r in e){var n=e[r],i=void 0;if(n!=null&&(r==="key"&&t.key!=null?i=t.key.toLowerCase():r==="which"?i=n===91&&t.which===93?91:t.which:i=t[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function Xp(e){e=xl(e);var t=Fl[e]||e.toUpperCase().charCodeAt(0);return t}function xl(e){return e=e.toLowerCase(),e=Kp[e]||e,e}$t.default=xa;var wC=$t.isHotkey=xa;$t.isCodeHotkey=CC;var ds=$t.isKeyHotkey=bC;$t.parseHotkey=Gp;$t.compareHotkey=Jp;$t.toKeyCode=Xp;$t.toKeyName=xl;var EC=typeof se.c=="object"&&se.c&&se.c.Object===Object&&se.c,BC=typeof self=="object"&&self&&self.Object===Object&&self;EC||BC||Function("return this")();var Qo={exports:{}};Qo.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",u="[object Date]",l="[object Error]",f="[object Function]",c="[object GeneratorFunction]",d="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",v="[object RegExp]",D="[object Set]",C="[object String]",b="[object Symbol]",A="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",T="[object Float64Array]",k="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",S="[object Uint8Array]",z="[object Uint8ClampedArray]",G="[object Uint16Array]",X="[object Uint32Array]",te=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,ke=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,V={};V[o]=V[a]=V[E]=V[x]=V[s]=V[u]=V[_]=V[T]=V[k]=V[M]=V[R]=V[d]=V[p]=V[h]=V[v]=V[D]=V[C]=V[b]=V[S]=V[z]=V[G]=V[X]=!0,V[l]=V[f]=V[A]=!1;var Oe=typeof se.c=="object"&&se.c&&se.c.Object===Object&&se.c,ce=typeof self=="object"&&self&&self.Object===Object&&self,ue=Oe||ce||Function("return this")(),J=t&&!t.nodeType&&t,ne=J&&!0&&e&&!e.nodeType&&e,oe=ne&&ne.exports===J;function De(y,B){return y.set(B[0],B[1]),y}function Ie(y,B){return y.add(B),y}function Ue(y,B){for(var F=-1,H=y?y.length:0;++F<H&&B(y[F],F,y)!==!1;);return y}function tr(y,B){for(var F=-1,H=B.length,Se=y.length;++F<H;)y[Se+F]=B[F];return y}function jn(y,B,F,H){for(var Se=-1,He=y?y.length:0;++Se<He;)F=B(F,y[Se],Se,y);return F}function eo(y,B){for(var F=-1,H=Array(y);++F<y;)H[F]=B(F);return H}function Rn(y,B){return y==null?void 0:y[B]}function to(y){var B=!1;if(y!=null&&typeof y.toString!="function")try{B=!!(y+"")}catch{}return B}function ro(y){var B=-1,F=Array(y.size);return y.forEach(function(H,Se){F[++B]=[Se,H]}),F}function Nn(y,B){return function(F){return y(B(F))}}function no(y){var B=-1,F=Array(y.size);return y.forEach(function(H){F[++B]=H}),F}var io=Array.prototype,Va=Function.prototype,It=Object.prototype,rr=ue["__core-js_shared__"],vt=function(){var y=/[^.]+$/.exec(rr&&rr.keys&&rr.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),$n=Va.toString,nt=It.hasOwnProperty,Ze=It.toString,Ut=RegExp("^"+$n.call(nt).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ln=oe?ue.Buffer:void 0,mt=ue.Symbol,nr=ue.Uint8Array,oo=Nn(Object.getPrototypeOf,Object),yt=Object.create,Ka=It.propertyIsEnumerable,Ga=io.splice,qr=Object.getOwnPropertySymbols,Ja=Ln?Ln.isBuffer:void 0,Xa=Nn(Object.keys,Object),Mn=Gr(ue,"DataView"),ir=Gr(ue,"Map"),In=Gr(ue,"Promise"),Un=Gr(ue,"Set"),Ya=Gr(ue,"WeakMap"),Hn=Gr(Object,"create"),zv=sr(Mn),Wv=sr(ir),qv=sr(In),Vv=sr(Un),Kv=sr(Ya),Dc=mt?mt.prototype:void 0,Cc=Dc?Dc.valueOf:void 0;function or(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function Gv(){this.__data__=Hn?Hn(null):{}}function Jv(y){return this.has(y)&&delete this.__data__[y]}function Xv(y){var B=this.__data__;if(Hn){var F=B[y];return F===n?void 0:F}return nt.call(B,y)?B[y]:void 0}function Yv(y){var B=this.__data__;return Hn?B[y]!==void 0:nt.call(B,y)}function Zv(y,B){var F=this.__data__;return F[y]=Hn&&B===void 0?n:B,this}or.prototype.clear=Gv,or.prototype.delete=Jv,or.prototype.get=Xv,or.prototype.has=Yv,or.prototype.set=Zv;function Dt(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function Qv(){this.__data__=[]}function e0(y){var B=this.__data__,F=ao(B,y);if(F<0)return!1;var H=B.length-1;return F==H?B.pop():Ga.call(B,F,1),!0}function t0(y){var B=this.__data__,F=ao(B,y);return F<0?void 0:B[F][1]}function r0(y){return ao(this.__data__,y)>-1}function n0(y,B){var F=this.__data__,H=ao(F,y);return H<0?F.push([y,B]):F[H][1]=B,this}Dt.prototype.clear=Qv,Dt.prototype.delete=e0,Dt.prototype.get=t0,Dt.prototype.has=r0,Dt.prototype.set=n0;function Vr(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function i0(){this.__data__={hash:new or,map:new(ir||Dt),string:new or}}function o0(y){return so(this,y).delete(y)}function a0(y){return so(this,y).get(y)}function s0(y){return so(this,y).has(y)}function u0(y,B){return so(this,y).set(y,B),this}Vr.prototype.clear=i0,Vr.prototype.delete=o0,Vr.prototype.get=a0,Vr.prototype.has=s0,Vr.prototype.set=u0;function Kr(y){this.__data__=new Dt(y)}function l0(){this.__data__=new Dt}function c0(y){return this.__data__.delete(y)}function f0(y){return this.__data__.get(y)}function d0(y){return this.__data__.has(y)}function h0(y,B){var F=this.__data__;if(F instanceof Dt){var H=F.__data__;if(!ir||H.length<r-1)return H.push([y,B]),this;F=this.__data__=new Vr(H)}return F.set(y,B),this}Kr.prototype.clear=l0,Kr.prototype.delete=c0,Kr.prototype.get=f0,Kr.prototype.has=d0,Kr.prototype.set=h0;function p0(y,B){var F=es(y)||L0(y)?eo(y.length,String):[],H=F.length,Se=!!H;for(var He in y)nt.call(y,He)&&!(Se&&(He=="length"||j0(He,H)))&&F.push(He);return F}function bc(y,B,F){var H=y[B];(!(nt.call(y,B)&&Ac(H,F))||F===void 0&&!(B in y))&&(y[B]=F)}function ao(y,B){for(var F=y.length;F--;)if(Ac(y[F][0],B))return F;return-1}function g0(y,B){return y&&wc(B,ts(B),y)}function Za(y,B,F,H,Se,He,Ct){var ze;if(H&&(ze=He?H(y,Se,He,Ct):H(y)),ze!==void 0)return ze;if(!uo(y))return y;var Oc=es(y);if(Oc){if(ze=P0(y),!B)return O0(y,ze)}else{var Jr=ar(y),Sc=Jr==f||Jr==c;if(I0(y))return b0(y,B);if(Jr==h||Jr==o||Sc&&!He){if(to(y))return He?y:{};if(ze=k0(Sc?{}:y),!B)return S0(y,g0(ze,y))}else{if(!V[Jr])return He?y:{};ze=T0(y,Jr,Za,B)}}Ct||(Ct=new Kr);var _c=Ct.get(y);if(_c)return _c;if(Ct.set(y,ze),!Oc)var Pc=F?_0(y):ts(y);return Ue(Pc||y,function(rs,lo){Pc&&(lo=rs,rs=y[lo]),bc(ze,lo,Za(rs,B,F,H,lo,y,Ct))}),ze}function v0(y){return uo(y)?yt(y):{}}function m0(y,B,F){var H=B(y);return es(y)?H:tr(H,F(y))}function y0(y){return Ze.call(y)}function D0(y){if(!uo(y)||N0(y))return!1;var B=xc(y)||to(y)?Ut:ke;return B.test(sr(y))}function C0(y){if(!Bc(y))return Xa(y);var B=[];for(var F in Object(y))nt.call(y,F)&&F!="constructor"&&B.push(F);return B}function b0(y,B){if(B)return y.slice();var F=new y.constructor(y.length);return y.copy(F),F}function Qa(y){var B=new y.constructor(y.byteLength);return new nr(B).set(new nr(y)),B}function w0(y,B){var F=B?Qa(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.byteLength)}function E0(y,B,F){var H=B?F(ro(y),!0):ro(y);return jn(H,De,new y.constructor)}function B0(y){var B=new y.constructor(y.source,re.exec(y));return B.lastIndex=y.lastIndex,B}function A0(y,B,F){var H=B?F(no(y),!0):no(y);return jn(H,Ie,new y.constructor)}function F0(y){return Cc?Object(Cc.call(y)):{}}function x0(y,B){var F=B?Qa(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.length)}function O0(y,B){var F=-1,H=y.length;for(B||(B=Array(H));++F<H;)B[F]=y[F];return B}function wc(y,B,F,H){F||(F={});for(var Se=-1,He=B.length;++Se<He;){var Ct=B[Se],ze=void 0;bc(F,Ct,ze===void 0?y[Ct]:ze)}return F}function S0(y,B){return wc(y,Ec(y),B)}function _0(y){return m0(y,ts,Ec)}function so(y,B){var F=y.__data__;return R0(B)?F[typeof B=="string"?"string":"hash"]:F.map}function Gr(y,B){var F=Rn(y,B);return D0(F)?F:void 0}var Ec=qr?Nn(qr,Object):z0,ar=y0;(Mn&&ar(new Mn(new ArrayBuffer(1)))!=x||ir&&ar(new ir)!=d||In&&ar(In.resolve())!=g||Un&&ar(new Un)!=D||Ya&&ar(new Ya)!=A)&&(ar=function(y){var B=Ze.call(y),F=B==h?y.constructor:void 0,H=F?sr(F):void 0;if(H)switch(H){case zv:return x;case Wv:return d;case qv:return g;case Vv:return D;case Kv:return A}return B});function P0(y){var B=y.length,F=y.constructor(B);return B&&typeof y[0]=="string"&&nt.call(y,"index")&&(F.index=y.index,F.input=y.input),F}function k0(y){return typeof y.constructor=="function"&&!Bc(y)?v0(oo(y)):{}}function T0(y,B,F,H){var Se=y.constructor;switch(B){case E:return Qa(y);case s:case u:return new Se(+y);case x:return w0(y,H);case _:case T:case k:case M:case R:case S:case z:case G:case X:return x0(y,H);case d:return E0(y,H,F);case p:case C:return new Se(y);case v:return B0(y);case D:return A0(y,H,F);case b:return F0(y)}}function j0(y,B){return B=B??i,!!B&&(typeof y=="number"||he.test(y))&&y>-1&&y%1==0&&y<B}function R0(y){var B=typeof y;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?y!=="__proto__":y===null}function N0(y){return!!vt&&vt in y}function Bc(y){var B=y&&y.constructor,F=typeof B=="function"&&B.prototype||It;return y===F}function sr(y){if(y!=null){try{return $n.call(y)}catch{}try{return y+""}catch{}}return""}function $0(y){return Za(y,!0,!0)}function Ac(y,B){return y===B||y!==y&&B!==B}function L0(y){return M0(y)&&nt.call(y,"callee")&&(!Ka.call(y,"callee")||Ze.call(y)==o)}var es=Array.isArray;function Fc(y){return y!=null&&U0(y.length)&&!xc(y)}function M0(y){return H0(y)&&Fc(y)}var I0=Ja||W0;function xc(y){var B=uo(y)?Ze.call(y):"";return B==f||B==c}function U0(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function uo(y){var B=typeof y;return!!y&&(B=="object"||B=="function")}function H0(y){return!!y&&typeof y=="object"}function ts(y){return Fc(y)?p0(y):C0(y)}function z0(){return[]}function W0(){return!1}e.exports=$0})(Qo,Qo.exports);Qo.exports;var Yf={exports:{}},Rr={};function hs(e){return e<10?`0${e}`:e.toString()}function AC(){const e=new Date,t=hs(e.getHours()),r=hs(e.getMinutes()),n=hs(e.getSeconds());return`${t}:${r}:${n}`}var FC=AC;Object.defineProperty(Rr,"__esModule",{value:!0});Rr.justErrorsLogger=Rr.debugLogger=void 0;const _o=FC,xC={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${_o()}]`,...t)}};Rr.justErrorsLogger=xC;const OC={debug:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.debug(`[Uppy] [${_o()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.warn(`[Uppy] [${_o()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${_o()}]`,...t)}};Rr.debugLogger=OC;let SC="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_C=(e=21)=>{let t="",r=e|0;for(;r--;)t+=SC[Math.random()*64|0];return t};var Yp={nanoid:_C},Vt={},PC=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var r=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(r&&(t=-t),t<1)return(r?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,i));var o=n[i];return t>=10||t%1===0?(r?"-":"")+t.toFixed(0)+" "+o:(r?"-":"")+t.toFixed(1)+" "+o};function Zp(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}Zp.prototype.match=function(e){var t=!0,r=this.parts,n,i=r.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),n=0;t&&n<i;n++)r[n]!=="*"&&(n<o.length?t=r[n]===o[n]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],n=e.length;n--;)this.match(e[n])&&(t[t.length]=e[n]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var kC=function(e,t,r){var n=new Zp(e,r||/[\/\.]/);return typeof t<"u"?n.match(t):n},TC=kC,jC=/[\/\+\.]/,RC=function(e,t){function r(n){var i=TC(n,e,jC);return i&&i.length>=2}return t?r(t.split(";")[0]):r};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.defaultOptions=Vt.RestrictionError=Vt.Restricter=void 0;const ps=PC,NC=RC,$C={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};Vt.defaultOptions=$C;class Wt extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Vt.RestrictionError=Wt;typeof AggregateError>"u"&&(globalThis.AggregateError=class extends Error{constructor(t,r){super(r),this.errors=t}});class LC{constructor(t,r){this.i18n=r,this.getOpts=()=>{const n=t();if(n.restrictions.allowedFileTypes!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validate(t,r){const{maxFileSize:n,minFileSize:i,maxTotalFileSize:o,maxNumberOfFiles:a,allowedFileTypes:s}=this.getOpts().restrictions;if(a&&r.filter(l=>!l.isGhost).length+1>a)throw new Wt(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(s&&!s.some(l=>l.includes("/")?t.type?NC(t.type.replace(/;.*?$/,""),l):!1:l[0]==="."&&t.extension?t.extension.toLowerCase()===l.slice(1).toLowerCase():!1)){const l=s.join(", ");throw new Wt(this.i18n("youCanOnlyUploadFileTypes",{types:l}))}if(o&&t.size!=null&&r.reduce((l,f)=>l+f.size,t.size)>o)throw new Wt(this.i18n("exceedsSize",{size:ps(o),file:t.name}));if(n&&t.size!=null&&t.size>n)throw new Wt(this.i18n("exceedsSize",{size:ps(n),file:t.name}));if(i&&t.size!=null&&t.size<i)throw new Wt(this.i18n("inferiorSize",{size:ps(i)}))}validateMinNumberOfFiles(t){const{minNumberOfFiles:r}=this.getOpts().restrictions;if(Object.keys(t).length<r)throw new Wt(this.i18n("youHaveToAtLeastSelectX",{smart_count:r}))}getMissingRequiredMetaFields(t){const r=new Wt(this.i18n("missingRequiredMetaFieldOnFile",{fileName:t.name})),{requiredMetaFields:n}=this.getOpts().restrictions,i=Object.prototype.hasOwnProperty,o=[];for(const a of n)(!i.call(t.meta,a)||t.meta[a]==="")&&o.push(a);return{missingFields:o,error:r}}}Vt.Restricter=LC;function MC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Qp=MC;function Zf(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var IC=0;function UC(e){return"__private_"+IC+++"_"+e}const HC=Qp;function zC(e,t,r){const n=[];return e.forEach(i=>typeof i!="string"?n.push(i):t[Symbol.split](i).forEach((o,a,s)=>{o!==""&&n.push(o),a<s.length-1&&n.push(r)})),n}/**
|
|
8
|
+
`));var h=o(e);if($.has(e,h)){var g=m.node(e,h);e.normalizeNode(g)}p++}})}},parent(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=m.path(e,t,r),i=w.parent(n),o=m.node(e,i);return o},path(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:i}=r;if(w.isPath(t)){if(i==="start"){var[,o]=$.first(e,t);t=o}else if(i==="end"){var[,a]=$.last(e,t);t=a}}return O.isRange(t)&&(i==="start"?t=O.start(t):i==="end"?t=O.end(t):t=w.common(t.anchor.path,t.focus.path)),Y.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},hasPath(e,t){return $.has(e,t)},pathRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.pathRefs(e);return s.delete(i),i.current=null,a}},o=m.pathRefs(e);return o.add(i),i},pathRefs(e){var t=Kc.get(e);return t||(t=new Set,Kc.set(e,t)),t},point(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(w.isPath(t)){var i;if(n==="end"){var[,o]=$.last(e,t);i=o}else{var[,a]=$.first(e,t);i=a}var s=$.get(e,i);if(!W.isText(s))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:i,offset:n==="end"?s.text.length:0}}if(O.isRange(t)){var[u,l]=O.edges(t);return n==="start"?u:l}return t},pointRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.pointRefs(e);return s.delete(i),i.current=null,a}},o=m.pointRefs(e);return o.add(i),i},pointRefs(e){var t=Gc.get(e);return t||(t=new Set,Gc.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:r=e.selection,unit:n="offset",reverse:i=!1,voids:o=!1}=t;if(!r)return;var a=m.range(e,r),[s,u]=O.edges(a),l=i?u:s,f=!1,c="",d=0,p=0,h=0;for(var[g,v]of m.nodes(e,{at:r,reverse:i,voids:o})){if(Q.isElement(g)){if(!o&&e.isVoid(g)){yield m.start(e,v);continue}if(e.isInline(g))continue;if(m.hasInlines(e,g)){var D=w.isAncestor(v,u.path)?u:m.end(e,v),C=w.isAncestor(v,s.path)?s:m.start(e,v);c=m.string(e,{anchor:C,focus:D},{voids:o}),f=!0}}if(W.isText(g)){var b=w.equals(v,l.path);for(b?(p=i?l.offset:g.text.length-l.offset,h=l.offset):(p=g.text.length,h=i?p:0),(b||f||n==="offset")&&(yield{path:v,offset:h},f=!1);;){if(d===0){if(c==="")break;d=A(c,n,i),c=ml(c,d,i)[1]}if(h=i?h-d:h+d,p=p-d,p<0){d=-p;break}d=0,yield{path:v,offset:h}}}}function A(E,x,_){return x==="character"?vl(E,_):x==="word"?lm(E,_):x==="line"||x==="block"?E.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection}=t;if(o){var a=m.before(e,o,{voids:n});if(a){var[,s]=m.first(e,[]),u=[a.path,s];if(w.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(w.isPath(o)){var[l]=m.parent(e,o);i=c=>l.children.includes(c)}else i=()=>!0;var[f]=m.nodes(e,{reverse:!0,at:u,match:i,mode:r,voids:n});return f}}},range(e,t,r){if(O.isRange(t)&&!r)return t;var n=m.start(e,t),i=m.end(e,r||t);return{anchor:n,focus:i}},rangeRef(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,i={current:t,affinity:n,unref(){var{current:a}=i,s=m.rangeRefs(e);return s.delete(i),i.current=null,a}},o=m.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=Jc.get(e);return t||(t=new Set,Jc.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){Vc.set(e,t)},start(e,t){return m.point(e,t,{edge:"start"})},string(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,i=m.range(e,t),[o,a]=O.edges(i),s="";for(var[u,l]of m.nodes(e,{at:i,match:W.isText,voids:n})){var f=u.text;w.equals(l,a.path)&&(f=f.slice(0,a.offset)),w.equals(l,o.path)&&(f=f.slice(o.offset)),s+=f}return s},unhangRange(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[i,o]=O.edges(t);if(i.offset!==0||o.offset!==0||O.isCollapsed(t))return t;var a=m.above(e,{at:o,match:p=>m.isBlock(e,p)}),s=a?a[1]:[],u=m.start(e,i),l={anchor:u,focus:o},f=!0;for(var[c,d]of m.nodes(e,{at:l,match:W.isText,reverse:!0,voids:n})){if(f){f=!1;continue}if(c.text!==""||w.isBefore(d,s)){o={path:d,offset:c.text.length};break}}return{anchor:i,focus:o}},void(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return m.above(e,Xr(Xr({},t),{},{match:r=>m.isVoid(e,r)}))},withoutNormalizing(e,t){var r=m.isNormalizing(e);m.setNormalizing(e,!1);try{t()}finally{m.setNormalizing(e,r)}m.normalize(e)}},Pm={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(w.isPath)}},km=["children"],Tm=["text"],ef=new WeakMap,$={ancestor(e,t){var r=$.get(e,t);if(W.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(r));return r},*ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.ancestors(t,r)){var i=$.ancestor(e,n),o=[i,n];yield o}},child(e,t){if(W.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return r},*children(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{reverse:n=!1}=r,i=$.ancestor(e,t),{children:o}=i,a=n?o.length-1:0;n?a>=0:a<o.length;){var s=$.child(i,a),u=t.concat(a);yield[s,u],a=n?a-1:a+1}},common(e,t,r){var n=w.common(t,r),i=$.get(e,n);return[i,n]},descendant(e,t){var r=$.get(e,t);if(m.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(r));return r},*descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))n.length!==0&&(yield[r,n])},*elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))Q.isElement(r)&&(yield[r,n])},extractProps(e){if(Q.isAncestor(e)){var t=Rt(e,km);return t}else{var t=Rt(e,Tm);return t}},first(e,t){for(var r=t.slice(),n=$.get(e,r);n&&!(W.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(W.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var r=Da({children:e.children},n=>{var[i,o]=O.edges(t),a=$.nodes(n,{reverse:!0,pass:d=>{var[,p]=d;return!O.includes(t,p)}});for(var[,s]of a){if(!O.includes(t,s)){var u=$.parent(n,s),l=s[s.length-1];u.children.splice(l,1)}if(w.equals(s,o.path)){var f=$.leaf(n,s);f.text=f.text.slice(0,o.offset)}if(w.equals(s,i.path)){var c=$.leaf(n,s);c.text=c.text.slice(i.offset)}}m.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));r=r.children[i]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var i=t[n];if(W.isText(r)||!r.children[i])return!1;r=r.children[i]}return!0},isNode(e){return W.isText(e)||Q.isElement(e)||m.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=ef.get(e);if(t!==void 0)return t;var r=e.every(n=>$.isNode(n));return ef.set(e,r),r},last(e,t){for(var r=t.slice(),n=$.get(e,r);n&&!(W.isText(n)||n.children.length===0);){var i=n.children.length-1;n=n.children[i],r.push(i)}return[n,r]},leaf(e,t){var r=$.get(e,t);if(!W.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(r));return r},*levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};for(var n of w.levels(t,r)){var i=$.get(e,n);yield[i,n]}},matches(e,t){return Q.isElement(e)&&Q.isElementProps(t)&&Q.matches(e,t)||W.isText(e)&&W.isTextProps(t)&&W.matches(e,t)},*nodes(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{pass:r,reverse:n=!1}=t,{from:i=[],to:o}=t,a=new Set,s=[],u=e;!(o&&(n?w.isBefore(s,o):w.isAfter(s,o)));){if(a.has(u)||(yield[u,s]),!a.has(u)&&!W.isText(u)&&u.children.length!==0&&(r==null||r([u,s])===!1)){a.add(u);var l=n?u.children.length-1:0;w.isAncestor(s,i)&&(l=i[s.length]),s=s.concat(l),u=$.get(e,s);continue}if(s.length===0)break;if(!n){var f=w.next(s);if($.has(e,f)){s=f,u=$.get(e,s);continue}}if(n&&s[s.length-1]!==0){var c=w.previous(s);s=c,u=$.get(e,s);continue}s=w.parent(s),u=$.get(e,s),a.add(u)}},parent(e,t){var r=w.parent(t),n=$.get(e,r);if(W.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return W.isText(e)?e.text:e.children.map($.string).join("")},*texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var[r,n]of $.nodes(e,t))W.isText(r)&&(yield[r,n])}};function tf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ge(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var vi={isNodeOperation(e){return vi.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Te(e))return!1;switch(e.type){case"insert_node":return w.isPath(e.path)&&$.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"merge_node":return typeof e.position=="number"&&w.isPath(e.path)&&Te(e.properties);case"move_node":return w.isPath(e.path)&&w.isPath(e.newPath);case"remove_node":return w.isPath(e.path)&&$.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&w.isPath(e.path);case"set_node":return w.isPath(e.path)&&Te(e.properties)&&Te(e.newProperties);case"set_selection":return e.properties===null&&O.isRange(e.newProperties)||e.newProperties===null&&O.isRange(e.properties)||Te(e.properties)&&Te(e.newProperties);case"split_node":return w.isPath(e.path)&&typeof e.position=="number"&&Te(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>vi.isOperation(t))},isSelectionOperation(e){return vi.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return vi.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return ge(ge({},e),{},{type:"remove_node"});case"insert_text":return ge(ge({},e),{},{type:"remove_text"});case"merge_node":return ge(ge({},e),{},{type:"split_node",path:w.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(w.equals(t,r))return e;if(w.isSibling(r,t))return ge(ge({},e),{},{path:t,newPath:r});var n=w.transform(r,e),i=w.transform(w.next(r),e);return ge(ge({},e),{},{path:n,newPath:i})}case"remove_node":return ge(ge({},e),{},{type:"insert_node"});case"remove_text":return ge(ge({},e),{},{type:"insert_text"});case"set_node":{var{properties:o,newProperties:a}=e;return ge(ge({},e),{},{properties:a,newProperties:o})}case"set_selection":{var{properties:s,newProperties:u}=e;return s==null?ge(ge({},e),{},{properties:u,newProperties:null}):u==null?ge(ge({},e),{},{properties:null,newProperties:s}):ge(ge({},e),{},{properties:u,newProperties:s})}case"split_node":return ge(ge({},e),{},{type:"merge_node",path:w.next(e.path)})}}},w={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=w.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var i=e[n],o=t[n];if(i!==o)break;r.push(i)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o>a},endsAt(e,t){var r=e.length,n=e.slice(0,r),i=t.slice(0,r);return w.equals(n,i)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),i=t.slice(0,r),o=e[r],a=t[r];return w.equals(n,i)&&o<a},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return w.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&w.compare(e,t)===0},isBefore(e,t){return w.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&w.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&w.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&w.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&w.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 r=e.slice(0,-1),n=t.slice(0,-1),i=e[e.length-1],o=t[t.length-1];return i!==o&&w.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],i=0;i<=e.length;i++)n.push(e.slice(0,i));return r&&n.reverse(),n},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)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!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(!w.isAncestor(t,e)&&!w.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 r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Da(e,n=>{var{affinity:i="forward"}=r;if(!(!e||(e==null?void 0:e.length)===0)){if(n===null)return null;switch(t.type){case"insert_node":{var{path:o}=t;(w.equals(o,n)||w.endsBefore(o,n)||w.isAncestor(o,n))&&(n[o.length-1]+=1);break}case"remove_node":{var{path:a}=t;if(w.equals(a,n)||w.isAncestor(a,n))return null;w.endsBefore(a,n)&&(n[a.length-1]-=1);break}case"merge_node":{var{path:s,position:u}=t;w.equals(s,n)||w.endsBefore(s,n)?n[s.length-1]-=1:w.isAncestor(s,n)&&(n[s.length-1]-=1,n[s.length]+=u);break}case"split_node":{var{path:l,position:f}=t;if(w.equals(l,n)){if(i==="forward")n[n.length-1]+=1;else if(i!=="backward")return null}else w.endsBefore(l,n)?n[l.length-1]+=1:w.isAncestor(l,n)&&e[l.length]>=f&&(n[l.length-1]+=1,n[l.length]-=f);break}case"move_node":{var{path:c,newPath:d}=t;if(w.equals(c,d))return;if(w.isAncestor(c,n)||w.equals(c,n)){var p=d.slice();return w.endsBefore(c,d)&&c.length<d.length&&(p[c.length-1]-=1),p.concat(n.slice(c.length))}else w.isSibling(c,d)&&(w.isAncestor(d,n)||w.equals(d,n))?w.endsBefore(c,n)?n[c.length-1]-=1:n[c.length-1]+=1:w.endsBefore(d,n)||w.equals(d,n)||w.isAncestor(d,n)?(w.endsBefore(c,n)&&(n[c.length-1]-=1),n[d.length-1]+=1):w.endsBefore(c,n)&&(w.equals(d,n)&&(n[d.length-1]+=1),n[c.length-1]-=1);break}}}})}};function rf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Y={compare(e,t){var r=w.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return Y.compare(e,t)===1},isBefore(e,t){return Y.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&w.equals(e.path,t.path)},isPoint(e){return Te(e)&&typeof e.offset=="number"&&w.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Da(e,n=>{if(n===null)return null;var{affinity:i="forward"}=r,{path:o,offset:a}=n;switch(t.type){case"insert_node":case"move_node":{n.path=w.transform(o,t,r);break}case"insert_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset+=t.text.length);break}case"merge_node":{w.equals(t.path,o)&&(n.offset+=t.position),n.path=w.transform(o,t,r);break}case"remove_text":{w.equals(t.path,o)&&t.offset<=a&&(n.offset-=Math.min(a-t.offset,t.text.length));break}case"remove_node":{if(w.equals(t.path,o)||w.isAncestor(t.path,o))return null;n.path=w.transform(o,t,r);break}case"split_node":{if(w.equals(t.path,o)){if(t.position===a&&i==null)return null;(t.position<a||t.position===a&&i==="forward")&&(n.offset-=t.position,n.path=w.transform(o,t,nf(nf({},r),{},{affinity:"forward"})))}else n.path=w.transform(o,t,r);break}}})}},jm=["anchor","focus"];function of(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?of(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var O={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:i}=e;return O.isBackward(e)===r?[n,i]:[i,n]},end(e){var[,t]=O.edges(e);return t},equals(e,t){return Y.equals(e.anchor,t.anchor)&&Y.equals(e.focus,t.focus)},includes(e,t){if(O.isRange(t)){if(O.includes(e,t.anchor)||O.includes(e,t.focus))return!0;var[r,n]=O.edges(e),[i,o]=O.edges(t);return Y.isBefore(r,i)&&Y.isAfter(n,o)}var[a,s]=O.edges(e),u=!1,l=!1;return Y.isPoint(t)?(u=Y.compare(t,a)>=0,l=Y.compare(t,s)<=0):(u=w.compare(t,a.path)>=0,l=w.compare(t,s.path)<=0),u&&l},intersection(e,t){var r=Rt(e,jm),[n,i]=O.edges(e),[o,a]=O.edges(t),s=Y.isBefore(n,o)?o:n,u=Y.isBefore(i,a)?i:a;return Y.isBefore(u,s)?null:Rm({anchor:s,focus:u},r)},isBackward(e){var{anchor:t,focus:r}=e;return Y.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return Y.equals(t,r)},isExpanded(e){return!O.isCollapsed(e)},isForward(e){return!O.isBackward(e)},isRange(e){return Te(e)&&Y.isPoint(e.anchor)&&Y.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=O.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Da(e,n=>{if(n===null)return null;var{affinity:i="inward"}=r,o,a;if(i==="inward"){var s=O.isCollapsed(n);O.isForward(n)?(o="forward",a=s?o:"backward"):(o="backward",a=s?o:"forward")}else i==="outward"?O.isForward(n)?(o="backward",a="forward"):(o="forward",a="backward"):(o=i,a=i);var u=Y.transform(n.anchor,t,{affinity:o}),l=Y.transform(n.focus,t,{affinity:a});if(!u||!l)return null;n.anchor=u,n.focus=l})}},ip=(e,t)=>{for(var r in e){var n=e[r],i=t[r];if(Te(n)&&Te(i)){if(!ip(n,i))return!1}else if(Array.isArray(n)&&Array.isArray(i)){if(n.length!==i.length)return!1;for(var o=0;o<n.length;o++)if(n[o]!==i[o])return!1}else if(n!==i)return!1}for(var a in t)if(e[a]===void 0&&t[a]!==void 0)return!1;return!0},Nm=["text"],$m=["anchor","focus"];function af(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?af(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):af(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var W={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function i(o){var a=Rt(o,Nm);return a}return ip(n?i(e):e,n?i(t):t)},isText(e){return Te(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>W.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[bt({},e)];for(var n of t){var i=Rt(n,$m),[o,a]=O.edges(n),s=[],u=0;for(var l of r){var{length:f}=l.text,c=u;if(u+=f,o.offset<=c&&a.offset>=u){Object.assign(l,i),s.push(l);continue}if(o.offset!==a.offset&&(o.offset===u||a.offset===c)||o.offset>u||a.offset<c||a.offset===c&&c!==0){s.push(l);continue}var d=l,p=void 0,h=void 0;if(a.offset<u){var g=a.offset-c;h=bt(bt({},d),{},{text:d.text.slice(g)}),d=bt(bt({},d),{},{text:d.text.slice(0,g)})}if(o.offset>c){var v=o.offset-c;p=bt(bt({},d),{},{text:d.text.slice(0,v)}),d=bt(bt({},d),{},{text:d.text.slice(v)})}Object.assign(d,i),p&&s.push(p),s.push(d),h&&s.push(h)}r=s}return r}};function sf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Lm=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:i}=r,o=$.parent(e,n),a=n[n.length-1];if(a>o.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(o.children.splice(a,0,i),t)for(var[s,u]of O.points(t))t[u]=Y.transform(s,r);break}case"insert_text":{var{path:l,offset:f,text:c}=r;if(c.length===0)break;var d=$.leaf(e,l),p=d.text.slice(0,f),h=d.text.slice(f);if(d.text=p+c+h,t)for(var[g,v]of O.points(t))t[v]=Y.transform(g,r);break}case"merge_node":{var{path:D}=r,C=$.get(e,D),b=w.previous(D),A=$.get(e,b),E=$.parent(e,D),x=D[D.length-1];if(W.isText(C)&&W.isText(A))A.text+=C.text;else if(!W.isText(C)&&!W.isText(A))A.children.push(...C.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(D,"] to nodes of different interfaces: ").concat(C," ").concat(A));if(E.children.splice(x,1),t)for(var[_,T]of O.points(t))t[T]=Y.transform(_,r);break}case"move_node":{var{path:k,newPath:M}=r;if(w.isAncestor(k,M))throw new Error("Cannot move a path [".concat(k,"] to new path [").concat(M,"] because the destination is inside itself."));var R=$.get(e,k),S=$.parent(e,k),z=k[k.length-1];S.children.splice(z,1);var G=w.transform(k,r),J=$.get(e,w.parent(G)),oe=G[G.length-1];if(J.children.splice(oe,0,R),t)for(var[le,ke]of O.points(t))t[ke]=Y.transform(le,r);break}case"remove_node":{var{path:he}=r,V=he[he.length-1],Oe=$.parent(e,he);if(Oe.children.splice(V,1),t)for(var[ce,se]of O.points(t)){var X=Y.transform(ce,r);if(t!=null&&X!=null)t[se]=X;else{var te=void 0,ne=void 0;for(var[De,Ie]of $.texts(e))if(w.compare(Ie,he)===-1)te=[De,Ie];else{ne=[De,Ie];break}var Ue=!1;te&&ne&&(w.equals(ne[1],he)?Ue=!w.hasPrevious(ne[1]):Ue=w.common(te[1],he).length<w.common(ne[1],he).length),te&&!Ue?(ce.path=te[1],ce.offset=te[0].text.length):ne?(ce.path=ne[1],ce.offset=0):t=null}}break}case"remove_text":{var{path:tr,offset:jn,text:eo}=r;if(eo.length===0)break;var Rn=$.leaf(e,tr),to=Rn.text.slice(0,jn),ro=Rn.text.slice(jn+eo.length);if(Rn.text=to+ro,t)for(var[Nn,no]of O.points(t))t[no]=Y.transform(Nn,r);break}case"set_node":{var{path:io,properties:Va,newProperties:It}=r;if(io.length===0)throw new Error("Cannot set properties on the root node!");var rr=$.get(e,io);for(var vt in It){if(vt==="children"||vt==="text")throw new Error('Cannot set the "'.concat(vt,'" property of nodes!'));var $n=It[vt];$n==null?delete rr[vt]:rr[vt]=$n}for(var nt in Va)It.hasOwnProperty(nt)||delete rr[nt];break}case"set_selection":{var{newProperties:Ze}=r;if(Ze==null)t=Ze;else{if(t==null){if(!O.isRange(Ze))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Ze)," when there is no current selection."));t=zn({},Ze)}for(var Ut in Ze){var Ln=Ze[Ut];if(Ln==null){if(Ut==="anchor"||Ut==="focus")throw new Error('Cannot remove the "'.concat(Ut,'" selection property'));delete t[Ut]}else t[Ut]=Ln}}break}case"split_node":{var{path:mt,position:nr,properties:oo}=r;if(mt.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(mt,"] because the root node cannot be split."));var yt=$.get(e,mt),Ka=$.parent(e,mt),Ga=mt[mt.length-1],qr;if(W.isText(yt)){var Ja=yt.text.slice(0,nr),Xa=yt.text.slice(nr);yt.text=Ja,qr=zn(zn({},oo),{},{text:Xa})}else{var Mn=yt.children.slice(0,nr),ir=yt.children.slice(nr);yt.children=Mn,qr=zn(zn({},oo),{},{children:ir})}if(Ka.children.splice(Ga+1,0,qr),t)for(var[In,Un]of O.points(t))t[Un]=Y.transform(In,r);break}}return t},Mm={transform(e,t){e.children=Hc(e.children);var r=e.selection&&Hc(e.selection);try{r=Lm(e,r,t)}finally{e.children=zc(e.children),r?e.selection=Tr(r)?zc(r):r:e.selection=null}}},Im=["text"],Um=["children"];function uf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Hm={insertNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1,mode:o="lowest"}=r,{at:a,match:s,select:u}=r;if($.isNode(t)&&(t=[t]),t.length!==0){var[l]=t;if(a||(e.selection?a=e.selection:e.children.length>0?a=m.end(e,[]):a=[0],u=!0),u==null&&(u=!1),O.isRange(a))if(n||(a=m.unhangRange(e,a)),O.isCollapsed(a))a=a.anchor;else{var[,f]=O.edges(a),c=m.pointRef(e,f);N.delete(e,{at:a}),a=c.unref()}if(Y.isPoint(a)){s==null&&(W.isText(l)?s=x=>W.isText(x):e.isInline(l)?s=x=>W.isText(x)||m.isInline(e,x):s=x=>m.isBlock(e,x));var[d]=m.nodes(e,{at:a.path,match:s,mode:o,voids:i});if(d){var[,p]=d,h=m.pathRef(e,p),g=m.isEnd(e,a,p);N.splitNodes(e,{at:a,match:s,mode:o,voids:i});var v=h.unref();a=g?w.next(v):v}else return}var D=w.parent(a),C=a[a.length-1];if(!(!i&&m.void(e,{at:D}))){for(var b of t){var A=D.concat(C);C++,e.apply({type:"insert_node",path:A,node:b}),a=w.next(a)}if(a=w.previous(a),u){var E=m.end(e,a);E&&N.select(e,E)}}}})},liftNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:i=!1}=t,{match:o}=t;if(o==null&&(o=w.isPath(r)?Yr(e,r):b=>m.isBlock(e,b)),!!r){var a=m.nodes(e,{at:r,match:o,mode:n,voids:i}),s=Array.from(a,b=>{var[,A]=b;return m.pathRef(e,A)});for(var u of s){var l=u.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 f=m.node(e,w.parent(l)),[c,d]=f,p=l[l.length-1],{length:h}=c.children;if(h===1){var g=w.next(d);N.moveNodes(e,{at:l,to:g,voids:i}),N.removeNodes(e,{at:d,voids:i})}else if(p===0)N.moveNodes(e,{at:l,to:d,voids:i});else if(p===h-1){var v=w.next(d);N.moveNodes(e,{at:l,to:v,voids:i})}else{var D=w.next(l),C=w.next(d);N.splitNodes(e,{at:D,voids:i}),N.moveNodes(e,{at:l,to:C,voids:i})}}}})},mergeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:i=!1,voids:o=!1,mode:a="lowest"}=t;if(n){if(r==null)if(w.isPath(n)){var[s]=m.parent(e,n);r=k=>s.children.includes(k)}else r=k=>m.isBlock(e,k);if(!i&&O.isRange(n)&&(n=m.unhangRange(e,n)),O.isRange(n))if(O.isCollapsed(n))n=n.anchor;else{var[,u]=O.edges(n),l=m.pointRef(e,u);N.delete(e,{at:n}),n=l.unref(),t.at==null&&N.select(e,n)}var[f]=m.nodes(e,{at:n,match:r,voids:o,mode:a}),c=m.previous(e,{at:n,match:r,voids:o,mode:a});if(!(!f||!c)){var[d,p]=f,[h,g]=c;if(!(p.length===0||g.length===0)){var v=w.next(g),D=w.common(p,g),C=w.isSibling(p,g),b=Array.from(m.levels(e,{at:p}),k=>{var[M]=k;return M}).slice(D.length).slice(0,-1),A=m.above(e,{at:p,mode:"highest",match:k=>b.includes(k)&&op(e,k)}),E=A&&m.pathRef(e,A[1]),x,_;if(W.isText(d)&&W.isText(h)){var T=Rt(d,Im);_=h.text.length,x=T}else if(Q.isElement(d)&&Q.isElement(h)){var T=Rt(d,Um);_=h.children.length,x=T}else throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(d)," ").concat(JSON.stringify(h)));C||N.moveNodes(e,{at:p,to:v,voids:o}),E&&N.removeNodes(e,{at:E.current,voids:o}),Q.isElement(h)&&m.isEmpty(e,h)||W.isText(h)&&h.text===""&&g[g.length-1]!==0?N.removeNodes(e,{at:g,voids:o}):e.apply({type:"merge_node",path:v,position:_,properties:x}),E&&E.unref()}}}})},moveNodes(e,t){m.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:i="lowest",voids:o=!1}=t,{match:a}=t;if(n){a==null&&(a=w.isPath(n)?Yr(e,n):p=>m.isBlock(e,p));var s=m.pathRef(e,r),u=m.nodes(e,{at:n,match:a,mode:i,voids:o}),l=Array.from(u,p=>{var[,h]=p;return m.pathRef(e,h)});for(var f of l){var c=f.unref(),d=s.current;c.length!==0&&e.apply({type:"move_node",path:c,newPath:d}),s.current&&w.isSibling(d,c)&&w.isAfter(d,c)&&(s.current=w.next(s.current))}s.unref()}})},removeNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:i="lowest"}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Yr(e,o):d=>m.isBlock(e,d)),!r&&O.isRange(o)&&(o=m.unhangRange(e,o));var s=m.nodes(e,{at:o,match:a,mode:i,voids:n}),u=Array.from(s,d=>{var[,p]=d;return m.pathRef(e,p)});for(var l of u){var f=l.unref();if(f){var[c]=m.node(e,f);e.apply({type:"remove_node",path:f,node:c})}}}})},setNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{match:n,at:i=e.selection}=r,{hanging:o=!1,mode:a="lowest",split:s=!1,voids:u=!1}=r;if(i){if(n==null&&(n=w.isPath(i)?Yr(e,i):E=>m.isBlock(e,E)),!o&&O.isRange(i)&&(i=m.unhangRange(e,i)),s&&O.isRange(i)){if(O.isCollapsed(i)&&m.leaf(e,i.anchor)[0].text.length>0)return;var l=m.rangeRef(e,i,{affinity:"inward"}),[f,c]=O.edges(i),d=a==="lowest"?"lowest":"highest",p=m.isEnd(e,c,c.path);N.splitNodes(e,{at:c,match:n,mode:d,voids:u,always:!p});var h=m.isStart(e,f,f.path);N.splitNodes(e,{at:f,match:n,mode:d,voids:u,always:!h}),i=l.unref(),r.at==null&&N.select(e,i)}for(var[g,v]of m.nodes(e,{at:i,match:n,mode:a,voids:u})){var D={},C={};if(v.length!==0){var b=!1;for(var A in t)A==="children"||A==="text"||t[A]!==g[A]&&(b=!0,g.hasOwnProperty(A)&&(D[A]=g[A]),t[A]!=null&&(C[A]=t[A]));b&&e.apply({type:"set_node",path:v,properties:D,newProperties:C})}}}})},splitNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:i,at:o=e.selection,height:a=0,always:s=!1}=t;if(i==null&&(i=le=>m.isBlock(e,le)),O.isRange(o)&&(o=zm(e,o)),w.isPath(o)){var u=o,l=m.point(e,u),[f]=m.parent(e,u);i=le=>le===f,a=l.path.length-u.length+1,o=l,s=!0}if(o){var c=m.pointRef(e,o,{affinity:"backward"}),[d]=m.nodes(e,{at:o,match:i,mode:r,voids:n});if(d){var p=m.void(e,{at:o,mode:"highest"}),h=0;if(!n&&p){var[g,v]=p;if(Q.isElement(g)&&e.isInline(g)){var D=m.after(e,v);if(!D){var C={text:""},b=w.next(v);N.insertNodes(e,C,{at:b,voids:n}),D=m.point(e,b)}o=D,s=!0}var A=o.path.length-v.length;a=A+1,s=!0}var E=m.pointRef(e,o),x=o.path.length-a,[,_]=d,T=o.path.slice(0,x),k=a===0?o.offset:o.path[x]+h;for(var[M,R]of m.levels(e,{at:T,reverse:!0,voids:n})){var S=!1;if(R.length<_.length||R.length===0||!n&&m.isVoid(e,M))break;var z=c.current,G=m.isEnd(e,z,R);if(s||!c||!m.isEdge(e,z,R)){S=!0;var J=$.extractProps(M);e.apply({type:"split_node",path:R,position:k,properties:J})}k=R[R.length-1]+(S||G?1:0)}if(t.at==null){var oe=E.current||m.end(e,[]);N.select(e,oe)}c.unref(),E.unref()}}})},unsetNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var i of t)n[i]=null;N.setNodes(e,n,r)},unwrapNodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:i=!1}=t,{at:o=e.selection,match:a}=t;if(o){a==null&&(a=w.isPath(o)?Yr(e,o):d=>m.isBlock(e,d)),w.isPath(o)&&(o=m.range(e,o));var s=O.isRange(o)?m.rangeRef(e,o):null,u=m.nodes(e,{at:o,match:a,mode:r,voids:i}),l=Array.from(u,d=>{var[,p]=d;return m.pathRef(e,p)}).reverse(),f=function(p){var h=p.unref(),[g]=m.node(e,h),v=m.range(e,h);n&&s&&(v=O.intersection(s.current,v)),N.liftNodes(e,{at:v,match:D=>Q.isAncestor(g)&&g.children.includes(D),voids:i})};for(var c of l)f(c);s&&s.unref()}})},wrapNodes(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{mode:n="lowest",split:i=!1,voids:o=!1}=r,{match:a,at:s=e.selection}=r;if(s){if(a==null&&(w.isPath(s)?a=Yr(e,s):e.isInline(t)?a=v=>m.isInline(e,v)||W.isText(v):a=v=>m.isBlock(e,v)),i&&O.isRange(s)){var[u,l]=O.edges(s),f=m.rangeRef(e,s,{affinity:"inward"});N.splitNodes(e,{at:l,match:a,voids:o}),N.splitNodes(e,{at:u,match:a,voids:o}),s=f.unref(),r.at==null&&N.select(e,s)}var c=Array.from(m.nodes(e,{at:s,match:e.isInline(t)?v=>m.isBlock(e,v):v=>m.isEditor(v),mode:"lowest",voids:o}));for(var[,d]of c){var p=O.isRange(s)?O.intersection(s,m.range(e,d)):s;if(p){var h=Array.from(m.nodes(e,{at:p,match:a,mode:n,voids:o}));if(h.length>0){var g=function(){var[v]=h,D=h[h.length-1],[,C]=v,[,b]=D;if(C.length===0&&b.length===0)return"continue";var A=w.equals(C,b)?w.parent(C):w.common(C,b),E=m.range(e,C,b),x=m.node(e,A),[_]=x,T=A.length+1,k=w.next(b.slice(0,T)),M=lf(lf({},t),{},{children:[]});N.insertNodes(e,M,{at:k,voids:o}),N.moveNodes(e,{at:E,match:R=>Q.isAncestor(_)&&_.children.includes(R),to:k.concat(0),voids:o})}();if(g==="continue")continue}}}}})}},op=(e,t)=>{if(Q.isElement(t)){var r=t;return m.isVoid(e,t)?!0:r.children.length===1?op(e,r.children[0]):!1}else return!m.isEditor(t)},zm=(e,t)=>{if(O.isCollapsed(t))return t.anchor;var[,r]=O.edges(t),n=m.pointRef(e,r);return N.delete(e,{at:t}),n.unref()},Yr=(e,t)=>{var[r]=m.node(e,t);return n=>n===r};function cf(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ff(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cf(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Wm={collapse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")N.select(e,n.anchor);else if(r==="focus")N.select(e,n.focus);else if(r==="start"){var[i]=O.edges(n);N.select(e,i)}else if(r==="end"){var[,o]=O.edges(n);N.select(e,o)}}else return},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:i="character",reverse:o=!1}=t,{edge:a=null}=t;if(r){a==="start"&&(a=O.isBackward(r)?"focus":"anchor"),a==="end"&&(a=O.isBackward(r)?"anchor":"focus");var{anchor:s,focus:u}=r,l={distance:n,unit:i},f={};if(a==null||a==="anchor"){var c=o?m.before(e,s,l):m.after(e,s,l);c&&(f.anchor=c)}if(a==null||a==="focus"){var d=o?m.before(e,u,l):m.after(e,u,l);d&&(f.focus=d)}N.setSelection(e,f)}},select(e,t){var{selection:r}=e;if(t=m.range(e,t),r){N.setSelection(e,t);return}if(!O.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:r,newProperties:t})},setPoint(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:i="both"}=r;if(n){i==="start"&&(i=O.isBackward(n)?"focus":"anchor"),i==="end"&&(i=O.isBackward(n)?"anchor":"focus");var{anchor:o,focus:a}=n,s=i==="anchor"?o:a;N.setSelection(e,{[i==="anchor"?"anchor":"focus"]:ff(ff({},s),t)})}},setSelection(e,t){var{selection:r}=e,n={},i={};if(r){for(var o in t)(o==="anchor"&&t.anchor!=null&&!Y.equals(t.anchor,r.anchor)||o==="focus"&&t.focus!=null&&!Y.equals(t.focus,r.focus)||o!=="anchor"&&o!=="focus"&&t[o]!==r[o])&&(n[o]=r[o],i[o]=t[o]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:i})}}},qm={delete(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};m.withoutNormalizing(e,()=>{var{reverse:r=!1,unit:n="character",distance:i=1,voids:o=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){if(O.isRange(a)&&O.isCollapsed(a)&&(a=a.anchor),Y.isPoint(a)){var u=m.void(e,{at:a,mode:"highest"});if(!o&&u){var[,l]=u;a=l}else{var f={unit:n,distance:i},c=r?m.before(e,a,f)||m.start(e,[]):m.after(e,a,f)||m.end(e,[]);a={anchor:a,focus:c},s=!0}}if(w.isPath(a)){N.removeNodes(e,{at:a,voids:o});return}if(!O.isCollapsed(a)){if(!s){var[,d]=O.edges(a),p=m.end(e,[]);Y.equals(d,p)||(a=m.unhangRange(e,a,{voids:o}))}var[h,g]=O.edges(a),v=m.above(e,{match:Ue=>m.isBlock(e,Ue),at:h,voids:o}),D=m.above(e,{match:Ue=>m.isBlock(e,Ue),at:g,voids:o}),C=v&&D&&!w.equals(v[1],D[1]),b=w.equals(h.path,g.path),A=o?null:m.void(e,{at:h,mode:"highest"}),E=o?null:m.void(e,{at:g,mode:"highest"});if(A){var x=m.before(e,h);x&&v&&w.isAncestor(v[1],x.path)&&(h=x)}if(E){var _=m.after(e,g);_&&D&&w.isAncestor(D[1],_.path)&&(g=_)}var T=[],k;for(var M of m.nodes(e,{at:a,voids:o})){var[R,S]=M;k&&w.compare(S,k)===0||(!o&&m.isVoid(e,R)||!w.isCommon(S,h.path)&&!w.isCommon(S,g.path))&&(T.push(M),k=S)}var z=Array.from(T,Ue=>{var[,tr]=Ue;return m.pathRef(e,tr)}),G=m.pointRef(e,h),J=m.pointRef(e,g);if(!b&&!A){var oe=G.current,[le]=m.leaf(e,oe),{path:ke}=oe,{offset:he}=h,V=le.text.slice(he);V.length>0&&e.apply({type:"remove_text",path:ke,offset:he,text:V})}for(var Oe of z){var ce=Oe.unref();N.removeNodes(e,{at:ce,voids:o})}if(!E){var se=J.current,[X]=m.leaf(e,se),{path:te}=se,ne=b?h.offset:0,De=X.text.slice(ne,g.offset);De.length>0&&e.apply({type:"remove_text",path:te,offset:ne,text:De})}!b&&C&&J.current&&G.current&&N.mergeNodes(e,{at:J.current,hanging:!0,voids:o});var Ie=r?G.unref()||J.unref():J.unref()||G.unref();t.at==null&&Ie&&N.select(e,Ie)}}})},insertFragment(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:i=!1}=r,{at:o=e.selection}=r;if(t.length){if(o)if(O.isRange(o))if(n||(o=m.unhangRange(e,o)),O.isCollapsed(o))o=o.anchor;else{var[,a]=O.edges(o);if(!i&&m.void(e,{at:a}))return;var s=m.pointRef(e,a);N.delete(e,{at:o}),o=s.unref()}else w.isPath(o)&&(o=m.start(e,o));else return;if(!(!i&&m.void(e,{at:o}))){var u=m.above(e,{at:o,match:X=>m.isInline(e,X),mode:"highest",voids:i});if(u){var[,l]=u;if(m.isEnd(e,o,l)){var f=m.after(e,l);o=f}else if(m.isStart(e,o,l)){var c=m.before(e,l);o=c}}var d=m.above(e,{match:X=>m.isBlock(e,X),at:o,voids:i}),[,p]=d,h=m.isStart(e,o,p),g=m.isEnd(e,o,p),v=h&&g,D=!h||h&&g,C=!g,[,b]=$.first({children:t},[]),[,A]=$.last({children:t},[]),E=[],x=X=>{var[te,ne]=X,De=ne.length===0;return De?!1:v?!0:!(D&&w.isAncestor(ne,b)&&Q.isElement(te)&&!e.isVoid(te)&&!e.isInline(te)||C&&w.isAncestor(ne,A)&&Q.isElement(te)&&!e.isVoid(te)&&!e.isInline(te))};for(var _ of $.nodes({children:t},{pass:x}))x(_)&&E.push(_);var T=[],k=[],M=[],R=!0,S=!1;for(var[z]of E)Q.isElement(z)&&!e.isInline(z)?(R=!1,S=!0,k.push(z)):R?T.push(z):M.push(z);var[G]=m.nodes(e,{at:o,match:X=>W.isText(X)||m.isInline(e,X),mode:"highest",voids:i}),[,J]=G,oe=m.isStart(e,o,J),le=m.isEnd(e,o,J),ke=m.pathRef(e,g?w.next(p):p),he=m.pathRef(e,le?w.next(J):J),V=m.pathRef(e,p);N.splitNodes(e,{at:o,match:X=>S?m.isBlock(e,X):W.isText(X)||m.isInline(e,X),mode:S?"lowest":"highest",voids:i});var Oe=m.pathRef(e,!oe||oe&&le?w.next(J):J);if(N.insertNodes(e,T,{at:Oe.current,match:X=>W.isText(X)||m.isInline(e,X),mode:"highest",voids:i}),v&&k.length&&N.delete(e,{at:V.unref(),voids:i}),N.insertNodes(e,k,{at:ke.current,match:X=>m.isBlock(e,X),mode:"lowest",voids:i}),N.insertNodes(e,M,{at:he.current,match:X=>W.isText(X)||m.isInline(e,X),mode:"highest",voids:i}),!r.at){var ce;M.length>0?ce=w.previous(he.current):k.length>0?ce=w.previous(ke.current):ce=w.previous(Oe.current);var se=m.end(e,ce);N.select(e,se)}Oe.unref(),ke.unref(),he.unref()}}})},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};m.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:i=e.selection}=r;if(i){if(w.isPath(i)&&(i=m.range(e,i)),O.isRange(i))if(O.isCollapsed(i))i=i.anchor;else{var o=O.end(i);if(!n&&m.void(e,{at:o}))return;var a=O.start(i),s=m.pointRef(e,a);N.delete(e,{at:i,voids:n}),i=s.unref(),N.setSelection(e,{anchor:i,focus:i})}if(!(!n&&m.void(e,{at:i}))){var{path:u,offset:l}=i;t.length>0&&e.apply({type:"insert_text",path:u,offset:l,text:t})}}})}};function df(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?df(Object(r),!0).forEach(function(n){Nt(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):df(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var N=co(co(co(co({},Mm),Hm),Wm),qm);function hf(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function yl(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(function(r){typeof e[r]>"u"?e[r]=t[r]:hf(t[r])&&hf(e[r])&&Object.keys(t[r]).length>0&&yl(e[r],t[r])})}var ap={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 Ca(){var e=typeof document<"u"?document:{};return yl(e,ap),e}var Vm={document:ap,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 Ir(){var e=typeof window<"u"?window:{};return yl(e,Vm),e}function Km(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function pu(e){return pu=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},pu(e)}function Lo(e,t){return Lo=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Lo(e,t)}function Gm(){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 Oo(e,t,r){return Gm()?Oo=Reflect.construct:Oo=function(i,o,a){var s=[null];s.push.apply(s,o);var u=Function.bind.apply(i,s),l=new u;return a&&Lo(l,a.prototype),l},Oo.apply(null,arguments)}function Jm(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function gu(e){var t=typeof Map=="function"?new Map:void 0;return gu=function(n){if(n===null||!Jm(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Oo(n,arguments,pu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Lo(i,n)},gu(e)}function Xm(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ym(e){var t=e.__proto__;Object.defineProperty(e,"__proto__",{get:function(){return t},set:function(n){t.__proto__=n}})}var Fr=function(e){Km(t,e);function t(r){var n;return n=e.call.apply(e,[this].concat(r))||this,Ym(Xm(n)),n}return t}(gu(Array));function ba(e){e===void 0&&(e=[]);var t=[];return e.forEach(function(r){Array.isArray(r)?t.push.apply(t,ba(r)):t.push(r)}),t}function Zm(e,t){return Array.prototype.filter.call(e,t)}function Qm(e){for(var t=[],r=0;r<e.length;r+=1)t.indexOf(e[r])===-1&&t.push(e[r]);return t}function e1(e){return e.toLowerCase().replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function t1(e,t){if(typeof e!="string")return[e];for(var r=[],n=t.querySelectorAll(e),i=0;i<n.length;i+=1)r.push(n[i]);return r}function j(e,t){var r=Ir(),n=Ca(),i=[];if(!t&&e instanceof Fr)return e;if(!e)return new Fr(i);if(typeof e=="string"){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var a="div";o.indexOf("<li")===0&&(a="ul"),o.indexOf("<tr")===0&&(a="tbody"),(o.indexOf("<td")===0||o.indexOf("<th")===0)&&(a="tr"),o.indexOf("<tbody")===0&&(a="table"),o.indexOf("<option")===0&&(a="select");var s=n.createElement(a);s.innerHTML=o;for(var u=0;u<s.childNodes.length;u+=1)i.push(s.childNodes[u])}else i=t1(e.trim(),t||n)}else if(e.nodeType||e===r||e===n)i.push(e);else if(Array.isArray(e)){if(e instanceof Fr)return e;i=e}return new Fr(Qm(i))}j.fn=Fr.prototype;function Mo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=ba(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).add.apply(o,n)}),this}function Io(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=ba(t.map(function(i){return i.split(" ")}));return this.forEach(function(i){var o;(o=i.classList).remove.apply(o,n)}),this}function pf(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=ba(t.map(function(i){return i.split(" ")}));return Zm(this,function(i){return n.filter(function(o){return i.classList.contains(o)}).length>0}).length>0}function Uo(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(var r=0;r<this.length;r+=1)if(arguments.length===2)this[r].setAttribute(e,t);else for(var n in e)this[r][n]=e[n],this[r].setAttribute(n,e[n]);return this}function gf(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Ho(){var e=this[0];if(e){var t={};if(e.dataset)for(var r in e.dataset)t[r]=e.dataset[r];else for(var n=0;n<e.attributes.length;n+=1){var i=e.attributes[n];i.name.indexOf("data-")>=0&&(t[e1(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 zo(e){if(typeof e>"u"){var t=this[0];if(!t)return;if(t.multiple&&t.nodeName.toLowerCase()==="select"){for(var r=[],n=0;n<t.selectedOptions.length;n+=1)r.push(t.selectedOptions[n].value);return r}return t.value}for(var i=0;i<this.length;i+=1){var o=this[i];if(Array.isArray(e)&&o.multiple&&o.nodeName.toLowerCase()==="select")for(var a=0;a<o.options.length;a+=1)o.options[a].selected=e.indexOf(o.options[a].value)>=0;else o.value=e}return this}function Wo(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=t[2],a=t[3];typeof t[1]=="function"&&(n=t[0],o=t[1],a=t[2],i=void 0),a||(a=!1);function s(g){var v=g.target;if(v){var D=g.target.dom7EventData||[];if(D.indexOf(g)<0&&D.unshift(g),j(v).is(i))o.apply(v,D);else for(var C=j(v).parents(),b=0;b<C.length;b+=1)j(C[b]).is(i)&&o.apply(C[b],D)}}function u(g){var v=g&&g.target?g.target.dom7EventData||[]:[];v.indexOf(g)<0&&v.unshift(g),o.apply(this,v)}for(var l=n.split(" "),f,c=0;c<this.length;c+=1){var d=this[c];if(i)for(f=0;f<l.length;f+=1){var h=l[f];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[h]||(d.dom7LiveListeners[h]=[]),d.dom7LiveListeners[h].push({listener:o,proxyListener:s}),d.addEventListener(h,s,a)}else for(f=0;f<l.length;f+=1){var p=l[f];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[p]||(d.dom7Listeners[p]=[]),d.dom7Listeners[p].push({listener:o,proxyListener:u}),d.addEventListener(p,u,a)}}return this}function vf(){var e=Ir();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function mf(){var e=Ir();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function yf(){if(this.length>0){var e=Ir(),t=Ca(),r=this[0],n=r.getBoundingClientRect(),i=t.body,o=r.clientTop||i.clientTop||0,a=r.clientLeft||i.clientLeft||0,s=r===e?e.scrollY:r.scrollTop,u=r===e?e.scrollX:r.scrollLeft;return{top:n.top+s-o,left:n.left+u-a}}return null}function Df(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this}function Cf(){for(var e=Ir(),t=0;t<this.length;t+=1){var r=this[t];r.style.display==="none"&&(r.style.display=""),e.getComputedStyle(r,null).getPropertyValue("display")==="none"&&(r.style.display="block")}return this}function bf(e,t){var r=Ir(),n;if(arguments.length===1)if(typeof e=="string"){if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(n=0;n<this.length;n+=1)for(var i in e)this[n].style[i]=e[i];return this}if(arguments.length===2&&typeof e=="string"){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function qo(e){return e?(this.forEach(function(t,r){e.apply(t,[t,r])}),this):this}function Vo(e){if(typeof e>"u")return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function wf(e){if(typeof e>"u")return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this}function Ef(e){var t=Ir(),r=Ca(),n=this[0],i,o;if(!n||typeof e>"u")return!1;if(typeof e=="string"){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(i=j(e),o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}if(e===r)return n===r;if(e===t)return n===t;if(e.nodeType||e instanceof Fr){for(i=e.nodeType?[e]:e,o=0;o<i.length;o+=1)if(i[o]===n)return!0;return!1}return!1}function Ko(){for(var e,t=Ca(),r=0;r<arguments.length;r+=1){e=r<0||arguments.length<=r?void 0:arguments[r];for(var n=0;n<this.length;n+=1)if(typeof e=="string"){var i=t.createElement("div");for(i.innerHTML=e;i.firstChild;)this[n].appendChild(i.firstChild)}else if(e instanceof Fr)for(var o=0;o<e.length;o+=1)this[n].appendChild(e[o]);else this[n].appendChild(e)}return this}function Bf(e){for(var t=[],r=0;r<this.length;r+=1)this[r].parentNode!==null&&(e?j(this[r].parentNode).is(e)&&t.push(this[r].parentNode):t.push(this[r].parentNode));return j(t)}function Af(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].parentNode;n;)e?j(n).is(e)&&t.push(n):t.push(n),n=n.parentNode;return j(t)}function Go(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].querySelectorAll(e),i=0;i<n.length;i+=1)t.push(n[i]);return j(t)}function Jo(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].children,i=0;i<n.length;i+=1)(!e||j(n[i]).is(e))&&t.push(n[i]);return j(t)}function Ff(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function xf(){for(var e=0;e<this.length;e+=1){var t=this[e];if(t.nodeType===1){for(var r=0;r<t.childNodes.length;r+=1)t.childNodes[r].parentNode&&t.childNodes[r].parentNode.removeChild(t.childNodes[r]);t.textContent=""}}return this}var r1="resize scroll".split(" ");function n1(e){function t(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];if(typeof n[0]>"u"){for(var o=0;o<this.length;o+=1)r1.indexOf(e)<0&&(e in this[o]?this[o][e]():j(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}return t}var Xo=n1("focus");Ko&&(j.fn.append=Ko);Wo&&(j.fn.on=Wo);Xo&&(j.fn.focus=Xo);Uo&&(j.fn.attr=Uo);zo&&(j.fn.val=zo);Vo&&(j.fn.html=Vo);Ho&&(j.fn.dataset=Ho);Mo&&(j.fn.addClass=Mo);Io&&(j.fn.removeClass=Io);Jo&&(j.fn.children=Jo);qo&&(j.fn.each=qo);Go&&(j.fn.find=Go);function sp(e){return e.length?e[0].tagName.toLowerCase():""}function up(e,t){let r="";const i=(e.attr("style")||"").split(";"),o=i.length;for(let a=0;a<o;a++){const s=i[a];if(s){const u=s.split(":");u[0].trim()===t&&(r=u[1].trim())}}return r}const i1=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DIV","DL","FIELDSET","FIGURE","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","MAIN","OL","P","PRE","SECTION","UL"]);function Of(e,t){var n;let r=(e==null?void 0:e[t])||null;for(;r;){if(r.nodeType===Node.ELEMENT_NODE||r.nodeType===Node.TEXT_NODE&&((n=r.textContent)!=null&&n.trim()))return!0;r=r[t]}return!1}function Sf(e){return e instanceof HTMLElement&&e.tagName==="BR"}function o1(e){Array.from(e.children).filter(r=>i1.has(r.tagName)).forEach(r=>{const n=r.nextSibling,i=Of(r,"previousSibling"),o=Of(r,"nextSibling");for(i&&!Sf(r.previousSibling)&&e.insertBefore(document.createElement("br"),r);r.firstChild;)e.insertBefore(r.firstChild,r);r.remove();const a=(n==null?void 0:n.previousSibling)||e.lastChild;o&&!Sf(a)&&e.insertBefore(document.createElement("br"),n)})}function a1(e){const t=j(e);if(sp(t)!=="table")return e;const n=t[0];return Array.from(n.children).forEach(i=>{["THEAD","TBODY","TFOOT"].includes(i.tagName)&&(Array.from(i.children).forEach(o=>{o.tagName==="TR"&&n.insertBefore(o,i)}),i.remove())}),n.querySelectorAll("td, th").forEach(i=>o1(i)),n}const s1={selector:"table",preParseHtml:a1};var lp=9007199254740991,u1="[object Arguments]",l1="[object Function]",c1="[object GeneratorFunction]",vu="[object Map]",f1="[object Object]",_f="[object Promise]",mu="[object Set]",d1="[object String]",Pf="[object WeakMap]",kf="[object DataView]",h1=/[\\^$.*+?()[\]{}|]/g,p1=/^\[object .+?Constructor\]$/,g1=/^(?:0|[1-9]\d*)$/,Dl="\\ud800-\\udfff",cp="\\u0300-\\u036f\\ufe20-\\ufe23",fp="\\u20d0-\\u20f0",dp="\\ufe0e\\ufe0f",v1="["+Dl+"]",yu="["+cp+fp+"]",Du="\\ud83c[\\udffb-\\udfff]",m1="(?:"+yu+"|"+Du+")",hp="[^"+Dl+"]",pp="(?:\\ud83c[\\udde6-\\uddff]){2}",gp="[\\ud800-\\udbff][\\udc00-\\udfff]",vp="\\u200d",mp=m1+"?",yp="["+dp+"]?",y1="(?:"+vp+"(?:"+[hp,pp,gp].join("|")+")"+yp+mp+")*",D1=yp+mp+y1,C1="(?:"+[hp+yu+"?",yu,pp,gp,v1].join("|")+")",b1=RegExp(Du+"(?="+Du+")|"+C1+D1,"g"),w1=RegExp("["+vp+Dl+cp+fp+dp+"]"),E1=typeof ae.c=="object"&&ae.c&&ae.c.Object===Object&&ae.c,B1=typeof self=="object"&&self&&self.Object===Object&&self,Ur=E1||B1||Function("return this")();function A1(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function F1(e){return e.split("")}function x1(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function O1(e,t){return A1(t,function(r){return e[r]})}function S1(e,t){return e==null?void 0:e[t]}function _1(e){return w1.test(e)}function P1(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function k1(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function T1(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function j1(e,t){return function(r){return e(t(r))}}function R1(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function N1(e){return _1(e)?$1(e):F1(e)}function $1(e){return e.match(b1)||[]}var L1=Function.prototype,wa=Object.prototype,ss=Ur["__core-js_shared__"],Tf=function(){var e=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Dp=L1.toString,Ea=wa.hasOwnProperty,zi=wa.toString,M1=RegExp("^"+Dp.call(Ea).replace(h1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),jf=Ur.Symbol,us=jf?jf.iterator:void 0,I1=wa.propertyIsEnumerable,U1=j1(Object.keys,Object),Cu=Wi(Ur,"DataView"),bu=Wi(Ur,"Map"),wu=Wi(Ur,"Promise"),Eu=Wi(Ur,"Set"),Bu=Wi(Ur,"WeakMap"),H1=Hr(Cu),z1=Hr(bu),W1=Hr(wu),q1=Hr(Eu),V1=Hr(Bu);function K1(e,t){var r=Cp(e)||ty(e)?x1(e.length,String):[],n=r.length,i=!!n;for(var o in e)Ea.call(e,o)&&!(i&&(o=="length"||Z1(o,n)))&&r.push(o);return r}function G1(e){return zi.call(e)}function J1(e){if(!wp(e)||Q1(e))return!1;var t=bp(e)||P1(e)?M1:p1;return t.test(Hr(e))}function X1(e){if(!ey(e))return U1(e);var t=[];for(var r in Object(e))Ea.call(e,r)&&r!="constructor"&&t.push(r);return t}function Y1(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Wi(e,t){var r=S1(e,t);return J1(r)?r:void 0}var Cr=G1;(Cu&&Cr(new Cu(new ArrayBuffer(1)))!=kf||bu&&Cr(new bu)!=vu||wu&&Cr(wu.resolve())!=_f||Eu&&Cr(new Eu)!=mu||Bu&&Cr(new Bu)!=Pf)&&(Cr=function(e){var t=zi.call(e),r=t==f1?e.constructor:void 0,n=r?Hr(r):void 0;if(n)switch(n){case H1:return kf;case z1:return vu;case W1:return _f;case q1:return mu;case V1:return Pf}return t});function Z1(e,t){return t=t??lp,!!t&&(typeof e=="number"||g1.test(e))&&e>-1&&e%1==0&&e<t}function Q1(e){return!!Tf&&Tf in e}function ey(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wa;return e===r}function Hr(e){if(e!=null){try{return Dp.call(e)}catch{}try{return e+""}catch{}}return""}function ty(e){return ry(e)&&Ea.call(e,"callee")&&(!I1.call(e,"callee")||zi.call(e)==u1)}var Cp=Array.isArray;function Cl(e){return e!=null&&ny(e.length)&&!bp(e)}function ry(e){return Ep(e)&&Cl(e)}function bp(e){var t=wp(e)?zi.call(e):"";return t==l1||t==c1}function ny(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lp}function wp(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ep(e){return!!e&&typeof e=="object"}function iy(e){return typeof e=="string"||!Cp(e)&&Ep(e)&&zi.call(e)==d1}function oy(e){if(!e)return[];if(Cl(e))return iy(e)?N1(e):Y1(e);if(us&&e[us])return k1(e[us]());var t=Cr(e),r=t==vu?T1:t==mu?R1:sy;return r(e)}function ay(e){return Cl(e)?K1(e):X1(e)}function sy(e){return e?O1(e,ay(e)):[]}var uy=oy;const Rf=ae.g(uy);var Bp=9007199254740991,ly="[object Arguments]",cy="[object Function]",fy="[object GeneratorFunction]",dy=/^(?:0|[1-9]\d*)$/;function hy(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function py(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function gy(e,t){return function(r){return e(t(r))}}var Ba=Object.prototype,bl=Ba.hasOwnProperty,Ap=Ba.toString,vy=Ba.propertyIsEnumerable,my=gy(Object.keys,Object);function yy(e,t){var r=Fp(e)||Oy(e)?py(e.length,String):[],n=r.length,i=!!n;for(var o in e)bl.call(e,o)&&!(i&&(o=="length"||Ay(o,n)))&&r.push(o);return r}var Dy=Ey(by),Cy=By();function by(e,t){return e&&Cy(e,t,jy)}function wy(e){if(!Fy(e))return my(e);var t=[];for(var r in Object(e))bl.call(e,r)&&r!="constructor"&&t.push(r);return t}function Ey(e,t){return function(r,n){if(r==null)return r;if(!wl(r))return e(r,n);for(var i=r.length,o=-1,a=Object(r);++o<i&&n(a[o],o,a)!==!1;);return r}}function By(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var u=a[++i];if(r(o[u],u,o)===!1)break}return t}}function Ay(e,t){return t=t??Bp,!!t&&(typeof e=="number"||dy.test(e))&&e>-1&&e%1==0&&e<t}function Fy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ba;return e===r}function xy(e,t){var r=Fp(e)?hy:Dy;return r(e,typeof t=="function"?t:Ry)}function Oy(e){return Sy(e)&&bl.call(e,"callee")&&(!vy.call(e,"callee")||Ap.call(e)==ly)}var Fp=Array.isArray;function wl(e){return e!=null&&Py(e.length)&&!_y(e)}function Sy(e){return Ty(e)&&wl(e)}function _y(e){var t=ky(e)?Ap.call(e):"";return t==cy||t==fy}function Py(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bp}function ky(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ty(e){return!!e&&typeof e=="object"}function jy(e){return wl(e)?yy(e):wy(e)}function Ry(e){return e}var Ny=xy;const $y=ae.g(Ny);function Ly(e,t){return document.createElement(e,t)}function My(e,t,r){return document.createElementNS(e,t,r)}function Iy(){return Sr(document.createDocumentFragment())}function Uy(e){return document.createTextNode(e)}function Hy(e){return document.createComment(e)}function zy(e,t,r){if(kt(e)){let n=e;for(;n&&kt(n);)n=Sr(n).parent;e=n??e}kt(t)&&(t=Sr(t,e)),r&&kt(r)&&(r=Sr(r).firstChildNode),e.insertBefore(t,r)}function Wy(e,t){e.removeChild(t)}function qy(e,t){kt(t)&&(t=Sr(t,e)),e.appendChild(t)}function xp(e){if(kt(e)){for(;e&&kt(e);)e=Sr(e).parent;return e??null}return e.parentNode}function Vy(e){var t;if(kt(e)){const r=Sr(e),n=xp(r);if(n&&r.lastChildNode){const i=Array.from(n.childNodes),o=i.indexOf(r.lastChildNode);return(t=i[o+1])!==null&&t!==void 0?t:null}return null}return e.nextSibling}function Ky(e){return e.tagName}function Gy(e,t){e.textContent=t}function Jy(e){return e.textContent}function Xy(e){return e.nodeType===1}function Yy(e){return e.nodeType===3}function Zy(e){return e.nodeType===8}function kt(e){return e.nodeType===11}function Sr(e,t){var r,n,i;const o=e;return(r=o.parent)!==null&&r!==void 0||(o.parent=t??null),(n=o.firstChildNode)!==null&&n!==void 0||(o.firstChildNode=e.firstChild),(i=o.lastChildNode)!==null&&i!==void 0||(o.lastChildNode=e.lastChild),o}const Qy={createElement:Ly,createElementNS:My,createTextNode:Uy,createDocumentFragment:Iy,createComment:Hy,insertBefore:zy,removeChild:Wy,appendChild:qy,parentNode:xp,nextSibling:Vy,tagName:Ky,setTextContent:Gy,getTextContent:Jy,isElement:Xy,isText:Yy,isComment:Zy,isDocumentFragment:kt};function Dn(e,t,r,n,i){const o=t===void 0?void 0:t.key;return{sel:e,data:t,children:r,text:n,elm:i,key:o}}const Yo=Array.isArray;function So(e){return typeof e=="string"||typeof e=="number"||e instanceof String||e instanceof Number}const ls=Dn("",{},[],void 0,void 0);function Wn(e,t){var r,n;const i=e.key===t.key,o=((r=e.data)===null||r===void 0?void 0:r.is)===((n=t.data)===null||n===void 0?void 0:n.is),a=e.sel===t.sel,s=!e.sel&&e.sel===t.sel?typeof e.text==typeof t.text:!0;return a&&i&&o&&s}function eD(){throw new Error("The document fragment is not supported on this platform.")}function tD(e,t){return e.isElement(t)}function rD(e,t){return e.isDocumentFragment(t)}function nD(e,t,r){var n;const i={};for(let o=t;o<=r;++o){const a=(n=e[o])===null||n===void 0?void 0:n.key;a!==void 0&&(i[a]=o)}return i}const iD=["create","update","remove","destroy","pre","post"];function oD(e,t,r){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},i=Qy;for(const h of iD)for(const g of e){const v=g[h];v!==void 0&&n[h].push(v)}function o(h){const g=h.id?"#"+h.id:"",v=h.getAttribute("class"),D=v?"."+v.split(" ").join("."):"";return Dn(i.tagName(h).toLowerCase()+g+D,{},[],void 0,h)}function a(h){return Dn(void 0,{},[],void 0,h)}function s(h,g){return function(){if(--g===0){const D=i.parentNode(h);D!==null&&i.removeChild(D,h)}}}function u(h,g){var v,D,C,b,A;let E;const x=h.data,_=x==null?void 0:x.hook;(v=_==null?void 0:_.init)===null||v===void 0||v.call(_,h);const T=h.children,k=h.sel;if(k==="!")(D=h.text)!==null&&D!==void 0||(h.text=""),h.elm=i.createComment(h.text);else if(k==="")h.elm=i.createTextNode(h.text);else if(k!==void 0){const M=k.indexOf("#"),R=k.indexOf(".",M),S=M>0?M:k.length,z=R>0?R:k.length,G=M!==-1||R!==-1?k.slice(0,Math.min(S,z)):k,J=x==null?void 0:x.ns,oe=J===void 0?i.createElement(G,x):i.createElementNS(J,G,x);for(h.elm=oe,S<z&&oe.setAttribute("id",k.slice(S+1,z)),R>0&&oe.setAttribute("class",k.slice(z+1).replace(/\./g," ")),E=0;E<n.create.length;++E)n.create[E](ls,h);if(So(h.text)&&(!Yo(T)||T.length===0)&&i.appendChild(oe,i.createTextNode(h.text)),Yo(T))for(E=0;E<T.length;++E){const le=T[E];le!=null&&i.appendChild(oe,u(le,g))}_!==void 0&&((C=_.create)===null||C===void 0||C.call(_,ls,h),_.insert!==void 0&&g.push(h))}else if(!((b=void 0)===null||b===void 0)&&b.fragments&&h.children){for(h.elm=((A=i.createDocumentFragment)!==null&&A!==void 0?A:eD)(),E=0;E<n.create.length;++E)n.create[E](ls,h);for(E=0;E<h.children.length;++E){const M=h.children[E];M!=null&&i.appendChild(h.elm,u(M,g))}}else h.elm=i.createTextNode(h.text);return h.elm}function l(h,g,v,D,C,b){for(;D<=C;++D){const A=v[D];A!=null&&i.insertBefore(h,u(A,b),g)}}function f(h){var g,v;const D=h.data;if(D!==void 0){(v=(g=D==null?void 0:D.hook)===null||g===void 0?void 0:g.destroy)===null||v===void 0||v.call(g,h);for(let C=0;C<n.destroy.length;++C)n.destroy[C](h);if(h.children!==void 0)for(let C=0;C<h.children.length;++C){const b=h.children[C];b!=null&&typeof b!="string"&&f(b)}}}function c(h,g,v,D){for(var C,b;v<=D;++v){let A;const E=g[v];if(E!=null)if(E.sel!==void 0){f(E),A=n.remove.length+1;const x=s(E.elm,A);for(let T=0;T<n.remove.length;++T)n.remove[T](E,x);const _=(b=(C=E==null?void 0:E.data)===null||C===void 0?void 0:C.hook)===null||b===void 0?void 0:b.remove;_!==void 0?_(E,x):x()}else E.children?(f(E),c(h,E.children,0,E.children.length-1)):i.removeChild(h,E.elm)}}function d(h,g,v,D){let C=0,b=0,A=g.length-1,E=g[0],x=g[A],_=v.length-1,T=v[0],k=v[_],M,R,S,z;for(;C<=A&&b<=_;)E==null?E=g[++C]:x==null?x=g[--A]:T==null?T=v[++b]:k==null?k=v[--_]:Wn(E,T)?(p(E,T,D),E=g[++C],T=v[++b]):Wn(x,k)?(p(x,k,D),x=g[--A],k=v[--_]):Wn(E,k)?(p(E,k,D),i.insertBefore(h,E.elm,i.nextSibling(x.elm)),E=g[++C],k=v[--_]):Wn(x,T)?(p(x,T,D),i.insertBefore(h,x.elm,E.elm),x=g[--A],T=v[++b]):(M===void 0&&(M=nD(g,C,A)),R=M[T.key],R===void 0?(i.insertBefore(h,u(T,D),E.elm),T=v[++b]):M[k.key]===void 0?(i.insertBefore(h,u(k,D),i.nextSibling(x.elm)),k=v[--_]):(S=g[R],S.sel!==T.sel?i.insertBefore(h,u(T,D),E.elm):(p(S,T,D),g[R]=void 0,i.insertBefore(h,S.elm,E.elm)),T=v[++b]));b<=_&&(z=v[_+1]==null?null:v[_+1].elm,l(h,z,v,b,_,D)),C<=A&&c(h,g,C,A)}function p(h,g,v){var D,C,b,A,E,x,_,T;const k=(D=g.data)===null||D===void 0?void 0:D.hook;(C=k==null?void 0:k.prepatch)===null||C===void 0||C.call(k,h,g);const M=g.elm=h.elm;if(h===g)return;if(g.data!==void 0||g.text!==void 0&&g.text!==h.text){(b=g.data)!==null&&b!==void 0||(g.data={}),(A=h.data)!==null&&A!==void 0||(h.data={});for(let z=0;z<n.update.length;++z)n.update[z](h,g);(_=(x=(E=g.data)===null||E===void 0?void 0:E.hook)===null||x===void 0?void 0:x.update)===null||_===void 0||_.call(x,h,g)}const R=h.children,S=g.children;g.text===void 0?R!==void 0&&S!==void 0?R!==S&&d(M,R,S,v):S!==void 0?(h.text!==void 0&&i.setTextContent(M,""),l(M,null,S,0,S.length-1,v)):R!==void 0?c(M,R,0,R.length-1):h.text!==void 0&&i.setTextContent(M,""):h.text!==g.text&&(R!==void 0&&c(M,R,0,R.length-1),i.setTextContent(M,g.text)),(T=k==null?void 0:k.postpatch)===null||T===void 0||T.call(k,h,g)}return function(g,v){let D,C,b;const A=[];for(D=0;D<n.pre.length;++D)n.pre[D]();for(tD(i,g)?g=o(g):rD(i,g)&&(g=a(g)),Wn(g,v)?p(g,v,A):(C=g.elm,b=i.parentNode(C),u(v,A),b!==null&&(i.insertBefore(b,v.elm,i.nextSibling(C)),c(b,[g],0,0))),D=0;D<A.length;++D)A[D].data.hook.insert(A[D]);for(D=0;D<n.post.length;++D)n.post[D]();return v}}function Op(e,t,r){if(e.ns="http://www.w3.org/2000/svg",r!=="foreignObject"&&t!==void 0)for(let n=0;n<t.length;++n){const i=t[n];if(typeof i=="string")continue;const o=i.data;o!==void 0&&Op(o,i.children,i.sel)}}function tt(e,t,r){let n={},i,o,a;if(r!==void 0?(t!==null&&(n=t),Yo(r)?i=r:So(r)?o=r.toString():r&&r.sel&&(i=[r])):t!=null&&(Yo(t)?i=t:So(t)?o=t.toString():t&&t.sel?i=[t]:n=t),i!==void 0)for(a=0;a<i.length;++a)So(i[a])&&(i[a]=Dn(void 0,void 0,void 0,i[a],void 0));return e.startsWith("svg")&&(e.length===3||e[3]==="."||e[3]==="#")&&Op(n,i,e),Dn(e,n,i,o,void 0)}const aD="http://www.w3.org/1999/xlink",sD="http://www.w3.org/2000/xmlns/",uD="http://www.w3.org/XML/1998/namespace",Nf=58,lD=120,cD=109;function $f(e,t){let r;const n=t.elm;let i=e.data.attrs,o=t.data.attrs;if(!(!i&&!o)&&i!==o){i=i||{},o=o||{};for(r in o){const a=o[r];i[r]!==a&&(a===!0?n.setAttribute(r,""):a===!1?n.removeAttribute(r):r.charCodeAt(0)!==lD?n.setAttribute(r,a):r.charCodeAt(3)===Nf?n.setAttributeNS(uD,r,a):r.charCodeAt(5)===Nf?r.charCodeAt(1)===cD?n.setAttributeNS(sD,r,a):n.setAttributeNS(aD,r,a):n.setAttribute(r,a))}for(r in i)r in o||n.removeAttribute(r)}}const fD={create:$f,update:$f};function Lf(e,t){let r,n;const i=t.elm;let o=e.data.class,a=t.data.class;if(!(!o&&!a)&&o!==a){o=o||{},a=a||{};for(n in o)o[n]&&!Object.prototype.hasOwnProperty.call(a,n)&&i.classList.remove(n);for(n in a)r=a[n],r!==o[n]&&i.classList[r?"add":"remove"](n)}}const dD={create:Lf,update:Lf},Mf=/[A-Z]/g;function If(e,t){const r=t.elm;let n=e.data.dataset,i=t.data.dataset,o;if(!n&&!i||n===i)return;n=n||{},i=i||{};const a=r.dataset;for(o in n)o in i||(a?o in a&&delete a[o]:r.removeAttribute("data-"+o.replace(Mf,"-$&").toLowerCase()));for(o in i)n[o]!==i[o]&&(a?a[o]=i[o]:r.setAttribute("data-"+o.replace(Mf,"-$&").toLowerCase(),i[o]))}const hD={create:If,update:If};function Sp(e,t,r){if(typeof e=="function")e.call(t,r,t);else if(typeof e=="object")for(let n=0;n<e.length;n++)Sp(e[n],t,r)}function pD(e,t){const r=e.type,n=t.data.on;n&&n[r]&&Sp(n[r],t,e)}function gD(){return function e(t){pD(t,e.vnode)}}function cs(e,t){const r=e.data.on,n=e.listener,i=e.elm,o=t&&t.data.on,a=t&&t.elm;let s;if(r!==o){if(r&&n)if(o)for(s in r)o[s]||i.removeEventListener(s,n,!1);else for(s in r)i.removeEventListener(s,n,!1);if(o){const u=t.listener=e.listener||gD();if(u.vnode=t,r)for(s in o)r[s]||a.addEventListener(s,u,!1);else for(s in o)a.addEventListener(s,u,!1)}}}const vD={create:cs,update:cs,destroy:cs};function Uf(e,t){let r,n,i;const o=t.elm;let a=e.data.props,s=t.data.props;if(!(!a&&!s)&&a!==s){a=a||{},s=s||{};for(r in s)n=s[r],i=a[r],i!==n&&(r!=="value"||o[r]!==n)&&(o[r]=n)}}const mD={create:Uf,update:Uf},Hf=typeof(window==null?void 0:window.requestAnimationFrame)=="function"?window.requestAnimationFrame.bind(window):setTimeout,yD=e=>{Hf(()=>{Hf(e)})};let Au=!1;function DD(e,t,r){yD(()=>{e[t]=r})}function zf(e,t){let r,n;const i=t.elm;let o=e.data.style,a=t.data.style;if(!o&&!a||o===a)return;o=o||{},a=a||{};const s="delayed"in o;for(n in o)n in a||(n[0]==="-"&&n[1]==="-"?i.style.removeProperty(n):i.style[n]="");for(n in a)if(r=a[n],n==="delayed"&&a.delayed)for(const u in a.delayed)r=a.delayed[u],(!s||r!==o.delayed[u])&&DD(i.style,u,r);else n!=="remove"&&r!==o[n]&&(n[0]==="-"&&n[1]==="-"?i.style.setProperty(n,r):i.style[n]=r)}function CD(e){let t,r;const n=e.elm,i=e.data.style;if(!(!i||!(t=i.destroy)))for(r in t)n.style[r]=t[r]}function bD(e,t){const r=e.data.style;if(!r||!r.remove){t();return}Au||(e.elm.offsetLeft,Au=!0);let n;const i=e.elm;let o=0;const a=r.remove;let s=0;const u=[];for(n in a)u.push(n),i.style[n]=a[n];const f=getComputedStyle(i)["transition-property"].split(", ");for(;o<f.length;++o)u.indexOf(f[o])!==-1&&s++;i.addEventListener("transitionend",c=>{c.target===i&&--s,s===0&&t()})}function wD(){Au=!1}const ED={pre:wD,create:zf,update:zf,destroy:CD,remove:bD};function _p(e,t){for(const r of e)r!=null&&r!==!1&&r!==""&&(Array.isArray(r)?_p(r,t):typeof r=="string"||typeof r=="number"||typeof r=="boolean"?t.push(Dn(void 0,void 0,void 0,String(r),void 0)):t.push(r));return t}function Xt(e,t,...r){const n=_p(r,[]);return typeof e=="function"?e(t,n):n.length===1&&!n[0].sel&&n[0].text?tt(e,t,n[0].text):tt(e,t,n)}var BD="[object Symbol]",AD=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,FD=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Aa="\\ud800-\\udfff",Pp="\\u0300-\\u036f\\ufe20-\\ufe23",kp="\\u20d0-\\u20f0",Tp="\\u2700-\\u27bf",jp="a-z\\xdf-\\xf6\\xf8-\\xff",xD="\\xac\\xb1\\xd7\\xf7",OD="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",SD="\\u2000-\\u206f",_D=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rp="A-Z\\xc0-\\xd6\\xd8-\\xde",Np="\\ufe0e\\ufe0f",$p=xD+OD+SD+_D,El="['’]",PD="["+Aa+"]",Wf="["+$p+"]",Zo="["+Pp+kp+"]",Lp="\\d+",kD="["+Tp+"]",Mp="["+jp+"]",Ip="[^"+Aa+$p+Lp+Tp+jp+Rp+"]",Fu="\\ud83c[\\udffb-\\udfff]",TD="(?:"+Zo+"|"+Fu+")",Up="[^"+Aa+"]",Bl="(?:\\ud83c[\\udde6-\\uddff]){2}",Al="[\\ud800-\\udbff][\\udc00-\\udfff]",on="["+Rp+"]",Hp="\\u200d",qf="(?:"+Mp+"|"+Ip+")",jD="(?:"+on+"|"+Ip+")",Vf="(?:"+El+"(?:d|ll|m|re|s|t|ve))?",Kf="(?:"+El+"(?:D|LL|M|RE|S|T|VE))?",zp=TD+"?",Wp="["+Np+"]?",RD="(?:"+Hp+"(?:"+[Up,Bl,Al].join("|")+")"+Wp+zp+")*",qp=Wp+zp+RD,ND="(?:"+[kD,Bl,Al].join("|")+")"+qp,$D="(?:"+[Up+Zo+"?",Zo,Bl,Al,PD].join("|")+")",LD=RegExp(El,"g"),MD=RegExp(Zo,"g"),ID=RegExp(Fu+"(?="+Fu+")|"+$D+qp,"g"),UD=RegExp([on+"?"+Mp+"+"+Vf+"(?="+[Wf,on,"$"].join("|")+")",jD+"+"+Kf+"(?="+[Wf,on+qf,"$"].join("|")+")",on+"?"+qf+"+"+Vf,on+"+"+Kf,Lp,ND].join("|"),"g"),HD=RegExp("["+Hp+Aa+Pp+kp+Np+"]"),zD=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,WD={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"ss"},qD=typeof ae.c=="object"&&ae.c&&ae.c.Object===Object&&ae.c,VD=typeof self=="object"&&self&&self.Object===Object&&self,KD=qD||VD||Function("return this")();function GD(e,t,r,n){for(var i=-1,o=e?e.length:0;++i<o;)r=t(r,e[i],i,e);return r}function JD(e){return e.split("")}function XD(e){return e.match(AD)||[]}function YD(e){return function(t){return e==null?void 0:e[t]}}var ZD=YD(WD);function Vp(e){return HD.test(e)}function QD(e){return zD.test(e)}function eC(e){return Vp(e)?tC(e):JD(e)}function tC(e){return e.match(ID)||[]}function rC(e){return e.match(UD)||[]}var nC=Object.prototype,iC=nC.toString,Gf=KD.Symbol,Jf=Gf?Gf.prototype:void 0,Xf=Jf?Jf.toString:void 0;function oC(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function aC(e){if(typeof e=="string")return e;if(fC(e))return Xf?Xf.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function sC(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:oC(e,t,r)}function uC(e){return function(t){t=Fa(t);var r=Vp(t)?eC(t):void 0,n=r?r[0]:t.charAt(0),i=r?sC(r,1).join(""):t.slice(1);return n[e]()+i}}function lC(e){return function(t){return GD(vC(pC(t).replace(LD,"")),e,"")}}function cC(e){return!!e&&typeof e=="object"}function fC(e){return typeof e=="symbol"||cC(e)&&iC.call(e)==BD}function Fa(e){return e==null?"":aC(e)}var dC=lC(function(e,t,r){return t=t.toLowerCase(),e+(r?hC(t):t)});function hC(e){return gC(Fa(e).toLowerCase())}function pC(e){return e=Fa(e),e&&e.replace(FD,ZD).replace(MD,"")}var gC=uC("toUpperCase");function vC(e,t,r){return e=Fa(e),t=t,t===void 0?QD(e)?rC(e):XD(e):e.match(t)||[]}var mC=dC;const yC=ae.g(mC);var $t={};Object.defineProperty($t,"__esModule",{value:!0});var DC=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),fs={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},Kp={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:DC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},Fl={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 fo=1;fo<20;fo++)Fl["f"+fo]=111+fo;function xa(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(a){return Gp(a,t)}),i=function(s){return n.some(function(u){return Jp(u,s)})},o=r==null?i:i(r);return o}function CC(e,t){return xa(e,t)}function bC(e,t){return xa(e,{byKey:!0},t)}function Gp(e,t){var r=t&&t.byKey,n={};e=e.replace("++","+add");var i=e.split("+"),o=i.length;for(var a in fs)n[fs[a]]=!1;var s=!0,u=!1,l=void 0;try{for(var f=i[Symbol.iterator](),c;!(s=(c=f.next()).done);s=!0){var d=c.value,p=d.endsWith("?")&&d.length>1;p&&(d=d.slice(0,-1));var h=xl(d),g=fs[h];if(d.length>1&&!g&&!Kp[d]&&!Fl[h])throw new TypeError('Unknown modifier: "'+d+'"');(o===1||!g)&&(r?n.key=h:n.which=Xp(d)),g&&(n[g]=p?null:!0)}}catch(v){u=!0,l=v}finally{try{!s&&f.return&&f.return()}finally{if(u)throw l}}return n}function Jp(e,t){for(var r in e){var n=e[r],i=void 0;if(n!=null&&(r==="key"&&t.key!=null?i=t.key.toLowerCase():r==="which"?i=n===91&&t.which===93?91:t.which:i=t[r],!(i==null&&n===!1)&&i!==n))return!1}return!0}function Xp(e){e=xl(e);var t=Fl[e]||e.toUpperCase().charCodeAt(0);return t}function xl(e){return e=e.toLowerCase(),e=Kp[e]||e,e}$t.default=xa;var wC=$t.isHotkey=xa;$t.isCodeHotkey=CC;var ds=$t.isKeyHotkey=bC;$t.parseHotkey=Gp;$t.compareHotkey=Jp;$t.toKeyCode=Xp;$t.toKeyName=xl;var EC=typeof ae.c=="object"&&ae.c&&ae.c.Object===Object&&ae.c,BC=typeof self=="object"&&self&&self.Object===Object&&self;EC||BC||Function("return this")();var Qo={exports:{}};Qo.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",a="[object Array]",s="[object Boolean]",u="[object Date]",l="[object Error]",f="[object Function]",c="[object GeneratorFunction]",d="[object Map]",p="[object Number]",h="[object Object]",g="[object Promise]",v="[object RegExp]",D="[object Set]",C="[object String]",b="[object Symbol]",A="[object WeakMap]",E="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",T="[object Float64Array]",k="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",S="[object Uint8Array]",z="[object Uint8ClampedArray]",G="[object Uint16Array]",J="[object Uint32Array]",oe=/[\\^$.*+?()[\]{}|]/g,le=/\w*$/,ke=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,V={};V[o]=V[a]=V[E]=V[x]=V[s]=V[u]=V[_]=V[T]=V[k]=V[M]=V[R]=V[d]=V[p]=V[h]=V[v]=V[D]=V[C]=V[b]=V[S]=V[z]=V[G]=V[J]=!0,V[l]=V[f]=V[A]=!1;var Oe=typeof ae.c=="object"&&ae.c&&ae.c.Object===Object&&ae.c,ce=typeof self=="object"&&self&&self.Object===Object&&self,se=Oe||ce||Function("return this")(),X=t&&!t.nodeType&&t,te=X&&!0&&e&&!e.nodeType&&e,ne=te&&te.exports===X;function De(y,B){return y.set(B[0],B[1]),y}function Ie(y,B){return y.add(B),y}function Ue(y,B){for(var F=-1,H=y?y.length:0;++F<H&&B(y[F],F,y)!==!1;);return y}function tr(y,B){for(var F=-1,H=B.length,Se=y.length;++F<H;)y[Se+F]=B[F];return y}function jn(y,B,F,H){for(var Se=-1,He=y?y.length:0;++Se<He;)F=B(F,y[Se],Se,y);return F}function eo(y,B){for(var F=-1,H=Array(y);++F<y;)H[F]=B(F);return H}function Rn(y,B){return y==null?void 0:y[B]}function to(y){var B=!1;if(y!=null&&typeof y.toString!="function")try{B=!!(y+"")}catch{}return B}function ro(y){var B=-1,F=Array(y.size);return y.forEach(function(H,Se){F[++B]=[Se,H]}),F}function Nn(y,B){return function(F){return y(B(F))}}function no(y){var B=-1,F=Array(y.size);return y.forEach(function(H){F[++B]=H}),F}var io=Array.prototype,Va=Function.prototype,It=Object.prototype,rr=se["__core-js_shared__"],vt=function(){var y=/[^.]+$/.exec(rr&&rr.keys&&rr.keys.IE_PROTO||"");return y?"Symbol(src)_1."+y:""}(),$n=Va.toString,nt=It.hasOwnProperty,Ze=It.toString,Ut=RegExp("^"+$n.call(nt).replace(oe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ln=ne?se.Buffer:void 0,mt=se.Symbol,nr=se.Uint8Array,oo=Nn(Object.getPrototypeOf,Object),yt=Object.create,Ka=It.propertyIsEnumerable,Ga=io.splice,qr=Object.getOwnPropertySymbols,Ja=Ln?Ln.isBuffer:void 0,Xa=Nn(Object.keys,Object),Mn=Gr(se,"DataView"),ir=Gr(se,"Map"),In=Gr(se,"Promise"),Un=Gr(se,"Set"),Ya=Gr(se,"WeakMap"),Hn=Gr(Object,"create"),zv=sr(Mn),Wv=sr(ir),qv=sr(In),Vv=sr(Un),Kv=sr(Ya),Dc=mt?mt.prototype:void 0,Cc=Dc?Dc.valueOf:void 0;function or(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function Gv(){this.__data__=Hn?Hn(null):{}}function Jv(y){return this.has(y)&&delete this.__data__[y]}function Xv(y){var B=this.__data__;if(Hn){var F=B[y];return F===n?void 0:F}return nt.call(B,y)?B[y]:void 0}function Yv(y){var B=this.__data__;return Hn?B[y]!==void 0:nt.call(B,y)}function Zv(y,B){var F=this.__data__;return F[y]=Hn&&B===void 0?n:B,this}or.prototype.clear=Gv,or.prototype.delete=Jv,or.prototype.get=Xv,or.prototype.has=Yv,or.prototype.set=Zv;function Dt(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function Qv(){this.__data__=[]}function e0(y){var B=this.__data__,F=ao(B,y);if(F<0)return!1;var H=B.length-1;return F==H?B.pop():Ga.call(B,F,1),!0}function t0(y){var B=this.__data__,F=ao(B,y);return F<0?void 0:B[F][1]}function r0(y){return ao(this.__data__,y)>-1}function n0(y,B){var F=this.__data__,H=ao(F,y);return H<0?F.push([y,B]):F[H][1]=B,this}Dt.prototype.clear=Qv,Dt.prototype.delete=e0,Dt.prototype.get=t0,Dt.prototype.has=r0,Dt.prototype.set=n0;function Vr(y){var B=-1,F=y?y.length:0;for(this.clear();++B<F;){var H=y[B];this.set(H[0],H[1])}}function i0(){this.__data__={hash:new or,map:new(ir||Dt),string:new or}}function o0(y){return so(this,y).delete(y)}function a0(y){return so(this,y).get(y)}function s0(y){return so(this,y).has(y)}function u0(y,B){return so(this,y).set(y,B),this}Vr.prototype.clear=i0,Vr.prototype.delete=o0,Vr.prototype.get=a0,Vr.prototype.has=s0,Vr.prototype.set=u0;function Kr(y){this.__data__=new Dt(y)}function l0(){this.__data__=new Dt}function c0(y){return this.__data__.delete(y)}function f0(y){return this.__data__.get(y)}function d0(y){return this.__data__.has(y)}function h0(y,B){var F=this.__data__;if(F instanceof Dt){var H=F.__data__;if(!ir||H.length<r-1)return H.push([y,B]),this;F=this.__data__=new Vr(H)}return F.set(y,B),this}Kr.prototype.clear=l0,Kr.prototype.delete=c0,Kr.prototype.get=f0,Kr.prototype.has=d0,Kr.prototype.set=h0;function p0(y,B){var F=es(y)||L0(y)?eo(y.length,String):[],H=F.length,Se=!!H;for(var He in y)nt.call(y,He)&&!(Se&&(He=="length"||j0(He,H)))&&F.push(He);return F}function bc(y,B,F){var H=y[B];(!(nt.call(y,B)&&Ac(H,F))||F===void 0&&!(B in y))&&(y[B]=F)}function ao(y,B){for(var F=y.length;F--;)if(Ac(y[F][0],B))return F;return-1}function g0(y,B){return y&&wc(B,ts(B),y)}function Za(y,B,F,H,Se,He,Ct){var ze;if(H&&(ze=He?H(y,Se,He,Ct):H(y)),ze!==void 0)return ze;if(!uo(y))return y;var Oc=es(y);if(Oc){if(ze=P0(y),!B)return O0(y,ze)}else{var Jr=ar(y),Sc=Jr==f||Jr==c;if(I0(y))return b0(y,B);if(Jr==h||Jr==o||Sc&&!He){if(to(y))return He?y:{};if(ze=k0(Sc?{}:y),!B)return S0(y,g0(ze,y))}else{if(!V[Jr])return He?y:{};ze=T0(y,Jr,Za,B)}}Ct||(Ct=new Kr);var _c=Ct.get(y);if(_c)return _c;if(Ct.set(y,ze),!Oc)var Pc=F?_0(y):ts(y);return Ue(Pc||y,function(rs,lo){Pc&&(lo=rs,rs=y[lo]),bc(ze,lo,Za(rs,B,F,H,lo,y,Ct))}),ze}function v0(y){return uo(y)?yt(y):{}}function m0(y,B,F){var H=B(y);return es(y)?H:tr(H,F(y))}function y0(y){return Ze.call(y)}function D0(y){if(!uo(y)||N0(y))return!1;var B=xc(y)||to(y)?Ut:ke;return B.test(sr(y))}function C0(y){if(!Bc(y))return Xa(y);var B=[];for(var F in Object(y))nt.call(y,F)&&F!="constructor"&&B.push(F);return B}function b0(y,B){if(B)return y.slice();var F=new y.constructor(y.length);return y.copy(F),F}function Qa(y){var B=new y.constructor(y.byteLength);return new nr(B).set(new nr(y)),B}function w0(y,B){var F=B?Qa(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.byteLength)}function E0(y,B,F){var H=B?F(ro(y),!0):ro(y);return jn(H,De,new y.constructor)}function B0(y){var B=new y.constructor(y.source,le.exec(y));return B.lastIndex=y.lastIndex,B}function A0(y,B,F){var H=B?F(no(y),!0):no(y);return jn(H,Ie,new y.constructor)}function F0(y){return Cc?Object(Cc.call(y)):{}}function x0(y,B){var F=B?Qa(y.buffer):y.buffer;return new y.constructor(F,y.byteOffset,y.length)}function O0(y,B){var F=-1,H=y.length;for(B||(B=Array(H));++F<H;)B[F]=y[F];return B}function wc(y,B,F,H){F||(F={});for(var Se=-1,He=B.length;++Se<He;){var Ct=B[Se],ze=void 0;bc(F,Ct,ze===void 0?y[Ct]:ze)}return F}function S0(y,B){return wc(y,Ec(y),B)}function _0(y){return m0(y,ts,Ec)}function so(y,B){var F=y.__data__;return R0(B)?F[typeof B=="string"?"string":"hash"]:F.map}function Gr(y,B){var F=Rn(y,B);return D0(F)?F:void 0}var Ec=qr?Nn(qr,Object):z0,ar=y0;(Mn&&ar(new Mn(new ArrayBuffer(1)))!=x||ir&&ar(new ir)!=d||In&&ar(In.resolve())!=g||Un&&ar(new Un)!=D||Ya&&ar(new Ya)!=A)&&(ar=function(y){var B=Ze.call(y),F=B==h?y.constructor:void 0,H=F?sr(F):void 0;if(H)switch(H){case zv:return x;case Wv:return d;case qv:return g;case Vv:return D;case Kv:return A}return B});function P0(y){var B=y.length,F=y.constructor(B);return B&&typeof y[0]=="string"&&nt.call(y,"index")&&(F.index=y.index,F.input=y.input),F}function k0(y){return typeof y.constructor=="function"&&!Bc(y)?v0(oo(y)):{}}function T0(y,B,F,H){var Se=y.constructor;switch(B){case E:return Qa(y);case s:case u:return new Se(+y);case x:return w0(y,H);case _:case T:case k:case M:case R:case S:case z:case G:case J:return x0(y,H);case d:return E0(y,H,F);case p:case C:return new Se(y);case v:return B0(y);case D:return A0(y,H,F);case b:return F0(y)}}function j0(y,B){return B=B??i,!!B&&(typeof y=="number"||he.test(y))&&y>-1&&y%1==0&&y<B}function R0(y){var B=typeof y;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?y!=="__proto__":y===null}function N0(y){return!!vt&&vt in y}function Bc(y){var B=y&&y.constructor,F=typeof B=="function"&&B.prototype||It;return y===F}function sr(y){if(y!=null){try{return $n.call(y)}catch{}try{return y+""}catch{}}return""}function $0(y){return Za(y,!0,!0)}function Ac(y,B){return y===B||y!==y&&B!==B}function L0(y){return M0(y)&&nt.call(y,"callee")&&(!Ka.call(y,"callee")||Ze.call(y)==o)}var es=Array.isArray;function Fc(y){return y!=null&&U0(y.length)&&!xc(y)}function M0(y){return H0(y)&&Fc(y)}var I0=Ja||W0;function xc(y){var B=uo(y)?Ze.call(y):"";return B==f||B==c}function U0(y){return typeof y=="number"&&y>-1&&y%1==0&&y<=i}function uo(y){var B=typeof y;return!!y&&(B=="object"||B=="function")}function H0(y){return!!y&&typeof y=="object"}function ts(y){return Fc(y)?p0(y):C0(y)}function z0(){return[]}function W0(){return!1}e.exports=$0})(Qo,Qo.exports);Qo.exports;var Yf={exports:{}},Rr={};function hs(e){return e<10?`0${e}`:e.toString()}function AC(){const e=new Date,t=hs(e.getHours()),r=hs(e.getMinutes()),n=hs(e.getSeconds());return`${t}:${r}:${n}`}var FC=AC;Object.defineProperty(Rr,"__esModule",{value:!0});Rr.justErrorsLogger=Rr.debugLogger=void 0;const _o=FC,xC={debug:()=>{},warn:()=>{},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${_o()}]`,...t)}};Rr.justErrorsLogger=xC;const OC={debug:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.debug(`[Uppy] [${_o()}]`,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.warn(`[Uppy] [${_o()}]`,...t)},error:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return console.error(`[Uppy] [${_o()}]`,...t)}};Rr.debugLogger=OC;let SC="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_C=(e=21)=>{let t="",r=e|0;for(;r--;)t+=SC[Math.random()*64|0];return t};var Yp={nanoid:_C},Vt={},PC=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var r=t<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(r&&(t=-t),t<1)return(r?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),n.length-1);t=Number(t/Math.pow(1024,i));var o=n[i];return t>=10||t%1===0?(r?"-":"")+t.toFixed(0)+" "+o:(r?"-":"")+t.toFixed(1)+" "+o};function Zp(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}Zp.prototype.match=function(e){var t=!0,r=this.parts,n,i=r.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),n=0;t&&n<i;n++)r[n]!=="*"&&(n<o.length?t=r[n]===o[n]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],n=e.length;n--;)this.match(e[n])&&(t[t.length]=e[n]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var kC=function(e,t,r){var n=new Zp(e,r||/[\/\.]/);return typeof t<"u"?n.match(t):n},TC=kC,jC=/[\/\+\.]/,RC=function(e,t){function r(n){var i=TC(n,e,jC);return i&&i.length>=2}return t?r(t.split(";")[0]):r};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.defaultOptions=Vt.RestrictionError=Vt.Restricter=void 0;const ps=PC,NC=RC,$C={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};Vt.defaultOptions=$C;class Wt extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Vt.RestrictionError=Wt;typeof AggregateError>"u"&&(globalThis.AggregateError=class extends Error{constructor(t,r){super(r),this.errors=t}});class LC{constructor(t,r){this.i18n=r,this.getOpts=()=>{const n=t();if(n.restrictions.allowedFileTypes!=null&&!Array.isArray(n.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return n}}validate(t,r){const{maxFileSize:n,minFileSize:i,maxTotalFileSize:o,maxNumberOfFiles:a,allowedFileTypes:s}=this.getOpts().restrictions;if(a&&r.filter(l=>!l.isGhost).length+1>a)throw new Wt(`${this.i18n("youCanOnlyUploadX",{smart_count:a})}`);if(s&&!s.some(l=>l.includes("/")?t.type?NC(t.type.replace(/;.*?$/,""),l):!1:l[0]==="."&&t.extension?t.extension.toLowerCase()===l.slice(1).toLowerCase():!1)){const l=s.join(", ");throw new Wt(this.i18n("youCanOnlyUploadFileTypes",{types:l}))}if(o&&t.size!=null&&r.reduce((l,f)=>l+f.size,t.size)>o)throw new Wt(this.i18n("exceedsSize",{size:ps(o),file:t.name}));if(n&&t.size!=null&&t.size>n)throw new Wt(this.i18n("exceedsSize",{size:ps(n),file:t.name}));if(i&&t.size!=null&&t.size<i)throw new Wt(this.i18n("inferiorSize",{size:ps(i)}))}validateMinNumberOfFiles(t){const{minNumberOfFiles:r}=this.getOpts().restrictions;if(Object.keys(t).length<r)throw new Wt(this.i18n("youHaveToAtLeastSelectX",{smart_count:r}))}getMissingRequiredMetaFields(t){const r=new Wt(this.i18n("missingRequiredMetaFieldOnFile",{fileName:t.name})),{requiredMetaFields:n}=this.getOpts().restrictions,i=Object.prototype.hasOwnProperty,o=[];for(const a of n)(!i.call(t.meta,a)||t.meta[a]==="")&&o.push(a);return{missingFields:o,error:r}}}Vt.Restricter=LC;function MC(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Qp=MC;function Zf(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var IC=0;function UC(e){return"__private_"+IC+++"_"+e}const HC=Qp;function zC(e,t,r){const n=[];return e.forEach(i=>typeof i!="string"?n.push(i):t[Symbol.split](i).forEach((o,a,s)=>{o!==""&&n.push(o),a<s.length-1&&n.push(r)})),n}/**
|
|
9
9
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
10
10
|
* and replaces it with values from options `{smart_count: 5}`
|
|
11
11
|
*
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
* @param {string} phrase that needs interpolation, with placeholders
|
|
16
16
|
* @param {object} options with values that will be used to replace placeholders
|
|
17
17
|
* @returns {any[]} interpolated
|
|
18
|
-
*/function Qf(e,t){const r=/\$/g,n="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=r[Symbol.replace](a,n)),i=zC(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var qn=UC("apply");let WC=class{constructor(t){Object.defineProperty(this,qn,{value:qC}),this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(t)?t.forEach(Zf(this,qn)[qn],this):Zf(this,qn)[qn](t)}translate(t,r){return this.translateArray(t,r).join("")}translateArray(t,r){if(!HC(this.locale.strings,t))throw new Error(`missing string: ${t}`);const n=this.locale.strings[t];if(typeof n=="object"){if(r&&typeof r.smart_count<"u"){const o=this.locale.pluralize(r.smart_count);return Qf(n[o],r)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return Qf(n,r)}};function qC(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var eg=WC,tg=function(){var t={},r=t._fns={};t.emit=function(a,s,u,l,f,c,d){var p=n(a);p.length&&i(a,p,[s,u,l,f,c,d])},t.on=function(a,s){r[a]||(r[a]=[]),r[a].push(s)},t.once=function(a,s){function u(){s.apply(this,arguments),t.off(a,u)}this.on(a,u)},t.off=function(a,s){var u=[];if(a&&s){var l=this._fns[a],f=0,c=l?l.length:0;for(f;f<c;f++)l[f]!==s&&u.push(l[f])}u.length?this._fns[a]=u:delete this._fns[a]};function n(o){var a=r[o]?r[o]:[],s=o.indexOf(":"),u=s===-1?[o]:[o.substring(0,s),o.substring(s+1)],l=Object.keys(r),f=0,c=l.length;for(f;f<c;f++){var d=l[f];if(d==="*"&&(a=a.concat(r[d])),u.length===2&&u[0]===d){a=a.concat(r[d]);break}}return a}function i(o,a,s){var u=0,l=a.length;for(u;u<l&&a[u];u++)a[u].event=o,a[u].apply(a[u],s)}return t};function VC(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var KC=0;function GC(e){return"__private_"+KC+++"_"+e}const JC={version:"2.1.1"};var gs=GC("publish");let rg=class{constructor(){Object.defineProperty(this,gs,{value:XC}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const r={...this.state},n={...this.state,...t};this.state=n,VC(this,gs)[gs](r,n,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}};function XC(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.callbacks.forEach(n=>{n(...t)})}rg.VERSION=JC.version;function YC(){return new rg}var ZC=YC;function QC(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var ng=QC,eb={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",dicom:"application/dicom",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"};const tb=ng,ed=eb;function rb(e){var t;if(e.type)return e.type;const r=e.name?(t=tb(e.name).extension)==null?void 0:t.toLowerCase():null;return r&&r in ed?ed[r]:"application/octet-stream"}var nb=rb;function ib(e){return e.charCodeAt(0).toString(32)}function td(e){let t="";return e.replace(/[^A-Z0-9]/ig,r=>(t+=`-${ib(r)}`,"/"))+t}function ob(e){let t="uppy";return typeof e.name=="string"&&(t+=`-${td(e.name.toLowerCase())}`),e.type!==void 0&&(t+=`-${e.type}`),e.meta&&typeof e.meta.relativePath=="string"&&(t+=`-${td(e.meta.relativePath.toLowerCase())}`),e.data.size!==void 0&&(t+=`-${e.data.size}`),e.data.lastModified!==void 0&&(t+=`-${e.data.lastModified}`),t}var ab=ob;function sb(e){if(e==null&&typeof navigator<"u"&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const r=t[1];let[n,i]=r.split(".");return n=parseInt(n,10),i=parseInt(i,10),n<15||n===15&&i<15063||n>18||n===18&&i>=18218}var ub=sb;function lb(e,t){return t.name?t.name:e.split("/")[0]==="image"?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}var cb=lb,fb={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},db=Yp,rd=Rr,fn=Vt;let ig,og;function I(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var hb=0;function Fe(e){return"__private_"+hb+++"_"+e}const pb=eg,gb=tg,vb=se.l,mb=ZC,yb=nb,Db=ng,Cb=ab,bb=ub,wb=cb,Eb={version:"2.3.4"},Bb=fb;var _e=Fe("plugins"),ot=Fe("restricter"),Vn=Fe("storeUnsubscribe"),wt=Fe("emitter"),wr=Fe("preProcessors"),Er=Fe("uploaders"),_t=Fe("postProcessors"),Je=Fe("informAndEmit"),Si=Fe("checkRequiredMetaFieldsOnFile"),vs=Fe("checkRequiredMetaFields"),Kn=Fe("assertNewUploadAllowed"),Gn=Fe("checkAndCreateFileStateObject"),Jn=Fe("startIfAutoProceed"),ms=Fe("addListeners"),at=Fe("updateOnlineStatus"),Et=Fe("createUpload"),ys=Fe("getUpload"),xr=Fe("removeUpload"),Bt=Fe("runUpload");ig=Symbol.for("uppy test: getPlugins");og=Symbol.for("uppy test: createUpload");class ag{constructor(t){Object.defineProperty(this,Bt,{value:Rb}),Object.defineProperty(this,xr,{value:jb}),Object.defineProperty(this,ys,{value:Tb}),Object.defineProperty(this,Et,{value:kb}),Object.defineProperty(this,ms,{value:Pb}),Object.defineProperty(this,Jn,{value:_b}),Object.defineProperty(this,Gn,{value:Sb}),Object.defineProperty(this,Kn,{value:Ob}),Object.defineProperty(this,vs,{value:xb}),Object.defineProperty(this,Si,{value:Fb}),Object.defineProperty(this,Je,{value:Ab}),Object.defineProperty(this,_e,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,ot,{writable:!0,value:void 0}),Object.defineProperty(this,Vn,{writable:!0,value:void 0}),Object.defineProperty(this,wt,{writable:!0,value:gb()}),Object.defineProperty(this,wr,{writable:!0,value:new Set}),Object.defineProperty(this,Er,{writable:!0,value:new Set}),Object.defineProperty(this,_t,{writable:!0,value:new Set}),Object.defineProperty(this,at,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Bb;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:fn.defaultOptions,meta:{},onBeforeFileAdded:n=>n,onBeforeUpload:n=>n,store:mb(),logger:rd.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...t,restrictions:{...r.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=rd.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=vb(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:bb(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),I(this,ot)[ot]=new fn.Restricter(()=>this.opts,this.i18n),I(this,Vn)[Vn]=this.store.subscribe((n,i,o)=>{this.emit("state-update",n,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),I(this,ms)[ms]()}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];I(this,wt)[wt].emit(t,...n)}on(t,r){return I(this,wt)[wt].on(t,r),this}once(t,r){return I(this,wt)[wt].once(t,r),this}off(t,r){return I(this,wt)[wt].off(t,r),this}updateAll(t){this.iteratePlugins(r=>{r.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,r){if(!this.getState().files[t])throw new Error(`Can’t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...r}}})}i18nInit(){const t=new pb([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(r=>{r.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},r={...this.getState().files},n={};Object.keys(r).forEach(i=>{const o={...r[i]};o.progress={...o.progress,...t},n[i]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){I(this,wr)[wr].add(t)}removePreProcessor(t){return I(this,wr)[wr].delete(t)}addPostProcessor(t){I(this,_t)[_t].add(t)}removePostProcessor(t){return I(this,_t)[_t].delete(t)}addUploader(t){I(this,Er)[Er].add(t)}removeUploader(t){return I(this,Er)[Er].delete(t)}setMeta(t){const r={...this.getState().meta,...t},n={...this.getState().files};Object.keys(n).forEach(i=>{n[i]={...n[i],meta:{...n[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:r,files:n})}setFileMeta(t,r){const n={...this.getState().files};if(!n[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...n[t].meta,...r};n[t]={...n[t],meta:i},this.setState({files:n})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:r,error:n}=this.getState(),i=Object.values(t),o=i.filter(h=>{let{progress:g}=h;return!g.uploadComplete&&g.uploadStarted}),a=i.filter(h=>!h.progress.uploadStarted),s=i.filter(h=>h.progress.uploadStarted||h.progress.preprocess||h.progress.postprocess),u=i.filter(h=>h.progress.uploadStarted),l=i.filter(h=>h.isPaused),f=i.filter(h=>h.progress.uploadComplete),c=i.filter(h=>h.error),d=o.filter(h=>!h.isPaused),p=i.filter(h=>h.progress.preprocess||h.progress.postprocess);return{newFiles:a,startedFiles:s,uploadStartedFiles:u,pausedFiles:l,completeFiles:f,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:u.length>0,isAllComplete:r===100&&f.length===i.length&&p.length===0,isAllErrored:!!n&&c.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(h=>h.isGhost)}}validateRestrictions(t,r){r===void 0&&(r=this.getFiles());try{return I(this,ot)[ot].validate(t,r),{result:!0}}catch(n){return{result:!1,reason:n.message}}}checkIfFileAlreadyExists(t){const{files:r}=this.getState();return!!(r[t]&&!r[t].isGhost)}addFile(t){I(this,Kn)[Kn](t);const{files:r}=this.getState();let n=I(this,Gn)[Gn](r,t);return r[n.id]&&r[n.id].isGhost&&(n={...r[n.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...r,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),I(this,Jn)[Jn](),n.id}addFiles(t){I(this,Kn)[Kn]();const r={...this.getState().files},n=[],i=[];for(let o=0;o<t.length;o++)try{let a=I(this,Gn)[Gn](r,t[o]);r[a.id]&&r[a.id].isGhost&&(a={...r[a.id],data:t[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${a.name}, ${a.id}`)),r[a.id]=a,n.push(a)}catch(a){a.isRestriction||i.push(a)}if(this.setState({files:r}),n.forEach(o=>{this.emit("file-added",o)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(o=>{this.log(`Added file: ${n[o].name}
|
|
18
|
+
*/function Qf(e,t){const r=/\$/g,n="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=r[Symbol.replace](a,n)),i=zC(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var qn=UC("apply");let WC=class{constructor(t){Object.defineProperty(this,qn,{value:qC}),this.locale={strings:{},pluralize(r){return r===1?0:1}},Array.isArray(t)?t.forEach(Zf(this,qn)[qn],this):Zf(this,qn)[qn](t)}translate(t,r){return this.translateArray(t,r).join("")}translateArray(t,r){if(!HC(this.locale.strings,t))throw new Error(`missing string: ${t}`);const n=this.locale.strings[t];if(typeof n=="object"){if(r&&typeof r.smart_count<"u"){const o=this.locale.pluralize(r.smart_count);return Qf(n[o],r)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return Qf(n,r)}};function qC(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var eg=WC,tg=function(){var t={},r=t._fns={};t.emit=function(a,s,u,l,f,c,d){var p=n(a);p.length&&i(a,p,[s,u,l,f,c,d])},t.on=function(a,s){r[a]||(r[a]=[]),r[a].push(s)},t.once=function(a,s){function u(){s.apply(this,arguments),t.off(a,u)}this.on(a,u)},t.off=function(a,s){var u=[];if(a&&s){var l=this._fns[a],f=0,c=l?l.length:0;for(f;f<c;f++)l[f]!==s&&u.push(l[f])}u.length?this._fns[a]=u:delete this._fns[a]};function n(o){var a=r[o]?r[o]:[],s=o.indexOf(":"),u=s===-1?[o]:[o.substring(0,s),o.substring(s+1)],l=Object.keys(r),f=0,c=l.length;for(f;f<c;f++){var d=l[f];if(d==="*"&&(a=a.concat(r[d])),u.length===2&&u[0]===d){a=a.concat(r[d]);break}}return a}function i(o,a,s){var u=0,l=a.length;for(u;u<l&&a[u];u++)a[u].event=o,a[u].apply(a[u],s)}return t};function VC(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var KC=0;function GC(e){return"__private_"+KC+++"_"+e}const JC={version:"2.1.1"};var gs=GC("publish");let rg=class{constructor(){Object.defineProperty(this,gs,{value:XC}),this.state={},this.callbacks=[]}getState(){return this.state}setState(t){const r={...this.state},n={...this.state,...t};this.state=n,VC(this,gs)[gs](r,n,t)}subscribe(t){return this.callbacks.push(t),()=>{this.callbacks.splice(this.callbacks.indexOf(t),1)}}};function XC(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.callbacks.forEach(n=>{n(...t)})}rg.VERSION=JC.version;function YC(){return new rg}var ZC=YC;function QC(e){const t=e.lastIndexOf(".");return t===-1||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}var ng=QC,eb={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",dicom:"application/dicom",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"};const tb=ng,ed=eb;function rb(e){var t;if(e.type)return e.type;const r=e.name?(t=tb(e.name).extension)==null?void 0:t.toLowerCase():null;return r&&r in ed?ed[r]:"application/octet-stream"}var nb=rb;function ib(e){return e.charCodeAt(0).toString(32)}function td(e){let t="";return e.replace(/[^A-Z0-9]/ig,r=>(t+=`-${ib(r)}`,"/"))+t}function ob(e){let t="uppy";return typeof e.name=="string"&&(t+=`-${td(e.name.toLowerCase())}`),e.type!==void 0&&(t+=`-${e.type}`),e.meta&&typeof e.meta.relativePath=="string"&&(t+=`-${td(e.meta.relativePath.toLowerCase())}`),e.data.size!==void 0&&(t+=`-${e.data.size}`),e.data.lastModified!==void 0&&(t+=`-${e.data.lastModified}`),t}var ab=ob;function sb(e){if(e==null&&typeof navigator<"u"&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const r=t[1];let[n,i]=r.split(".");return n=parseInt(n,10),i=parseInt(i,10),n<15||n===15&&i<15063||n>18||n===18&&i>=18218}var ub=sb;function lb(e,t){return t.name?t.name:e.split("/")[0]==="image"?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}var cb=lb,fb={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}},db=Yp,rd=Rr,fn=Vt;let ig,og;function I(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var hb=0;function Fe(e){return"__private_"+hb+++"_"+e}const pb=eg,gb=tg,vb=ae.l,mb=ZC,yb=nb,Db=ng,Cb=ab,bb=ub,wb=cb,Eb={version:"2.3.4"},Bb=fb;var _e=Fe("plugins"),ot=Fe("restricter"),Vn=Fe("storeUnsubscribe"),wt=Fe("emitter"),wr=Fe("preProcessors"),Er=Fe("uploaders"),_t=Fe("postProcessors"),Je=Fe("informAndEmit"),Si=Fe("checkRequiredMetaFieldsOnFile"),vs=Fe("checkRequiredMetaFields"),Kn=Fe("assertNewUploadAllowed"),Gn=Fe("checkAndCreateFileStateObject"),Jn=Fe("startIfAutoProceed"),ms=Fe("addListeners"),at=Fe("updateOnlineStatus"),Et=Fe("createUpload"),ys=Fe("getUpload"),xr=Fe("removeUpload"),Bt=Fe("runUpload");ig=Symbol.for("uppy test: getPlugins");og=Symbol.for("uppy test: createUpload");class ag{constructor(t){Object.defineProperty(this,Bt,{value:Rb}),Object.defineProperty(this,xr,{value:jb}),Object.defineProperty(this,ys,{value:Tb}),Object.defineProperty(this,Et,{value:kb}),Object.defineProperty(this,ms,{value:Pb}),Object.defineProperty(this,Jn,{value:_b}),Object.defineProperty(this,Gn,{value:Sb}),Object.defineProperty(this,Kn,{value:Ob}),Object.defineProperty(this,vs,{value:xb}),Object.defineProperty(this,Si,{value:Fb}),Object.defineProperty(this,Je,{value:Ab}),Object.defineProperty(this,_e,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,ot,{writable:!0,value:void 0}),Object.defineProperty(this,Vn,{writable:!0,value:void 0}),Object.defineProperty(this,wt,{writable:!0,value:gb()}),Object.defineProperty(this,wr,{writable:!0,value:new Set}),Object.defineProperty(this,Er,{writable:!0,value:new Set}),Object.defineProperty(this,_t,{writable:!0,value:new Set}),Object.defineProperty(this,at,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=Bb;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:fn.defaultOptions,meta:{},onBeforeFileAdded:n=>n,onBeforeUpload:n=>n,store:mb(),logger:rd.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...t,restrictions:{...r.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=rd.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=vb(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:bb(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),I(this,ot)[ot]=new fn.Restricter(()=>this.opts,this.i18n),I(this,Vn)[Vn]=this.store.subscribe((n,i,o)=>{this.emit("state-update",n,i,o),this.updateAll(i)}),this.opts.debug&&typeof window<"u"&&(window[this.opts.id]=this),I(this,ms)[ms]()}emit(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];I(this,wt)[wt].emit(t,...n)}on(t,r){return I(this,wt)[wt].on(t,r),this}once(t,r){return I(this,wt)[wt].once(t,r),this}off(t,r){return I(this,wt)[wt].off(t,r),this}updateAll(t){this.iteratePlugins(r=>{r.update(t)})}setState(t){this.store.setState(t)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(t,r){if(!this.getState().files[t])throw new Error(`Can’t set state for ${t} (the file could have been removed)`);this.setState({files:{...this.getState().files,[t]:{...this.getState().files[t],...r}}})}i18nInit(){const t=new pb([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(r=>{r.setOptions()}),this.setState()}resetProgress(){const t={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},r={...this.getState().files},n={};Object.keys(r).forEach(i=>{const o={...r[i]};o.progress={...o.progress,...t},n[i]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(t){I(this,wr)[wr].add(t)}removePreProcessor(t){return I(this,wr)[wr].delete(t)}addPostProcessor(t){I(this,_t)[_t].add(t)}removePostProcessor(t){return I(this,_t)[_t].delete(t)}addUploader(t){I(this,Er)[Er].add(t)}removeUploader(t){return I(this,Er)[Er].delete(t)}setMeta(t){const r={...this.getState().meta,...t},n={...this.getState().files};Object.keys(n).forEach(i=>{n[i]={...n[i],meta:{...n[i].meta,...t}}}),this.log("Adding metadata:"),this.log(t),this.setState({meta:r,files:n})}setFileMeta(t,r){const n={...this.getState().files};if(!n[t]){this.log("Was trying to set metadata for a file that has been removed: ",t);return}const i={...n[t].meta,...r};n[t]={...n[t],meta:i},this.setState({files:n})}getFile(t){return this.getState().files[t]}getFiles(){const{files:t}=this.getState();return Object.values(t)}getObjectOfFilesPerState(){const{files:t,totalProgress:r,error:n}=this.getState(),i=Object.values(t),o=i.filter(h=>{let{progress:g}=h;return!g.uploadComplete&&g.uploadStarted}),a=i.filter(h=>!h.progress.uploadStarted),s=i.filter(h=>h.progress.uploadStarted||h.progress.preprocess||h.progress.postprocess),u=i.filter(h=>h.progress.uploadStarted),l=i.filter(h=>h.isPaused),f=i.filter(h=>h.progress.uploadComplete),c=i.filter(h=>h.error),d=o.filter(h=>!h.isPaused),p=i.filter(h=>h.progress.preprocess||h.progress.postprocess);return{newFiles:a,startedFiles:s,uploadStartedFiles:u,pausedFiles:l,completeFiles:f,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:p,isUploadStarted:u.length>0,isAllComplete:r===100&&f.length===i.length&&p.length===0,isAllErrored:!!n&&c.length===i.length,isAllPaused:o.length!==0&&l.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:i.some(h=>h.isGhost)}}validateRestrictions(t,r){r===void 0&&(r=this.getFiles());try{return I(this,ot)[ot].validate(t,r),{result:!0}}catch(n){return{result:!1,reason:n.message}}}checkIfFileAlreadyExists(t){const{files:r}=this.getState();return!!(r[t]&&!r[t].isGhost)}addFile(t){I(this,Kn)[Kn](t);const{files:r}=this.getState();let n=I(this,Gn)[Gn](r,t);return r[n.id]&&r[n.id].isGhost&&(n={...r[n.id],data:t.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...r,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),I(this,Jn)[Jn](),n.id}addFiles(t){I(this,Kn)[Kn]();const r={...this.getState().files},n=[],i=[];for(let o=0;o<t.length;o++)try{let a=I(this,Gn)[Gn](r,t[o]);r[a.id]&&r[a.id].isGhost&&(a={...r[a.id],data:t[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${a.name}, ${a.id}`)),r[a.id]=a,n.push(a)}catch(a){a.isRestriction||i.push(a)}if(this.setState({files:r}),n.forEach(o=>{this.emit("file-added",o)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(o=>{this.log(`Added file: ${n[o].name}
|
|
19
19
|
id: ${n[o].id}
|
|
20
20
|
type: ${n[o].type}`)}),n.length>0&&I(this,Jn)[Jn](),i.length>0){let o=`Multiple errors occurred while adding files:
|
|
21
21
|
`;if(i.forEach(a=>{o+=`
|
|
22
22
|
* ${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,r){const{files:n,currentUploads:i}=this.getState(),o={...n},a={...i},s=Object.create(null);t.forEach(c=>{n[c]&&(s[c]=n[c],delete o[c])});function u(c){return s[c]===void 0}Object.keys(a).forEach(c=>{const d=i[c].fileIDs.filter(u);if(d.length===0){delete a[c];return}const{capabilities:p}=this.getState();if(d.length!==i[c].fileIDs.length&&!p.individualCancellation)throw new Error("individualCancellation is disabled");a[c]={...i[c],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const f=Object.keys(s);f.forEach(c=>{this.emit("file-removed",s[c],r)}),f.length>5?this.log(`Removed ${f.length} files`):this.log(`Removed files: ${f.join(", ")}`)}removeFile(t,r){r===void 0&&(r=null),this.removeFiles([t],r)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const n=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:n}),this.emit("upload-pause",t,n),n}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const i={...t[n],isPaused:!0};t[n]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(n=>!t[n].progress.uploadComplete&&t[n].progress.uploadStarted).forEach(n=>{const i={...t[n],isPaused:!1,error:null};t[n]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},r=Object.keys(t).filter(i=>t[i].error);if(r.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",r),r.length===0)return Promise.resolve({successful:[],failed:[]});const n=I(this,Et)[Et](r,{forceAllowNewUpload:!0});return I(this,Bt)[Bt](n)}cancelAll(t){let{reason:r="user"}=t===void 0?{}:t;if(this.emit("cancel-all",{reason:r}),r==="user"){const{files:n}=this.getState(),i=Object.keys(n);i.length&&this.removeFiles(i,"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 r=I(this,Et)[Et]([t],{forceAllowNewUpload:!0});return I(this,Bt)[Bt](r)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,r){if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const n=Number.isFinite(r.bytesTotal)&&r.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:r.bytesUploaded,bytesTotal:r.bytesTotal,percentage:n?Math.round(r.bytesUploaded/r.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const r=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(r.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const n=r.filter(l=>l.progress.bytesTotal!=null),i=r.filter(l=>l.progress.bytesTotal==null);if(n.length===0){const l=r.length*100,f=i.reduce((d,p)=>d+p.progress.percentage,0),c=Math.round(f/l*100);this.setState({totalProgress:c});return}let o=n.reduce((l,f)=>l+f.progress.bytesTotal,0);const a=o/n.length;o+=a*i.length;let s=0;n.forEach(l=>{s+=l.progress.bytesUploaded}),i.forEach(l=>{s+=a*(l.progress.percentage||0)/100});let u=o===0?0:Math.round(s/o*100);u>100&&(u=100),this.setState({totalProgress:u}),this.emit("progress",u)}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,r){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 n=new t(this,r),i=n.id;if(!i)throw new Error("Your plugin must have an id");if(!n.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}'.
|
|
23
|
-
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}`),n.type in I(this,_e)[_e]?I(this,_e)[_e][n.type].push(n):I(this,_e)[_e][n.type]=[n],n.install(),this}getPlugin(t){for(const r of Object.values(I(this,_e)[_e])){const n=r.find(i=>i.id===t);if(n!=null)return n}}[ig](t){return I(this,_e)[_e][t]}iteratePlugins(t){Object.values(I(this,_e)[_e]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const r=I(this,_e)[_e][t.type],n=r.findIndex(a=>a.id===t.id);n!==-1&&r.splice(n,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(t){let{reason:r}=t===void 0?{}:t;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:r}),I(this,Vn)[Vn](),this.iteratePlugins(n=>{this.removePlugin(n)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",I(this,at)[at]),window.removeEventListener("offline",I(this,at)[at]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,r,n){r===void 0&&(r="info"),n===void 0&&(n=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:r,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(t,r){const{logger:n}=this.opts;switch(r){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?I(this,Bt)[Bt](t):(I(this,xr)[xr](t),Promise.reject(new Error("Nonexistent upload")))}[og](){return I(this,Et)[Et](...arguments)}addResultData(t,r){if(!I(this,ys)[ys](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:n}=this.getState(),i={...n[t],result:{...n[t].result,...r}};this.setState({currentUploads:{...n,[t]:i}})}upload(){var t;(t=I(this,_e)[_e].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:r}=this.getState();const n=this.opts.onBeforeUpload(r);return n===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&typeof n=="object"&&(r=n,this.setState({files:r})),Promise.resolve().then(()=>I(this,ot)[ot].validateMinNumberOfFiles(r)).catch(i=>{throw I(this,Je)[Je](i),i}).then(()=>{if(!I(this,vs)[vs](r))throw new fn.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(i=>{throw i}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(u=>u.fileIDs),a=[];Object.keys(r).forEach(u=>{const l=this.getFile(u);!l.progress.uploadStarted&&o.indexOf(u)===-1&&a.push(l.id)});const s=I(this,Et)[Et](a);return I(this,Bt)[Bt](s)}).catch(i=>{throw this.emit("error",i),this.log(i,"error"),i}))}}function Ab(e,t){const{message:r,details:n=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:r,details:n},"error",this.opts.infoTimeout),this.log(`${r} ${n}`.trim(),"error")}function Fb(e){const{missingFields:t,error:r}=I(this,ot)[ot].getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(r.message),this.emit("restriction-failed",e,r),!1):!0}function xb(e){let t=!0;for(const r of Object.values(e))I(this,Si)[Si](r)||(t=!1);return t}function Ob(e){const{allowNewUpload:t}=this.getState();if(t===!1){const r=new fn.RestrictionError(this.i18n("noMoreFilesAllowed"));throw I(this,Je)[Je](r,e),r}}function Sb(e,t){const r=yb(t),n=wb(r,t),i=Db(n).extension,o=!!t.isRemote,a=Cb({...t,type:r});if(this.checkIfFileAlreadyExists(a)){const c=new fn.RestrictionError(this.i18n("noDuplicates",{fileName:n}));throw I(this,Je)[Je](c,t),c}const s=t.meta||{};s.name=n,s.type=r;const u=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:n,extension:i||"",meta:{...this.getState().meta,...s},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:u,uploadComplete:!1,uploadStarted:null},size:u,isRemote:o,remote:t.remote||"",preview:t.preview};const f=this.opts.onBeforeFileAdded(l,e);if(f===!1){const c=new fn.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,c),c}else typeof f=="object"&&f!==null&&(l=f);try{const c=Object.keys(e).map(d=>e[d]);I(this,ot)[ot].validate(l,c)}catch(c){throw I(this,Je)[Je](c,l),c}return l}function _b(){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 Pb(){const e=(t,r,n)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),r!=null&&r.id in this.getState().files&&this.setFileState(r.id,{error:i,response:n})};this.on("error",e),this.on("upload-error",(t,r,n)=>{if(e(r,t,n),typeof r=="object"&&r.message){const i=new Error(r.message);i.details=r.message,r.details&&(i.details+=` ${r.details}`),i.message=this.i18n("failedToUpload",{file:t==null?void 0:t.name}),I(this,Je)[Je](i)}else I(this,Je)[Je](r)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0: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,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const n=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...n,postprocess:I(this,_t)[_t].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:r,uploadURL:r.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:r.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:r}})}),this.on("preprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.preprocess,this.setState({files:r})}),this.on("postprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:r}})}),this.on("postprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.postprocess,this.setState({files:r})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&I(this,Si)[Si](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",I(this,at)[at]),window.addEventListener("offline",I(this,at)[at]),setTimeout(I(this,at)[at],3e3))}function kb(e,t){t===void 0&&(t={});const{forceAllowNewUpload:r=!1}=t,{allowNewUpload:n,currentUploads:i}=this.getState();if(!n&&!r)throw new Error("Cannot create a new upload: already uploading.");const o=(0,db.nanoid)();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 Tb(e){const{currentUploads:t}=this.getState();return t[e]}function jb(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function Rb(e){let{currentUploads:t}=this.getState(),r=t[e];const n=r.step||0,i=[...I(this,wr)[wr],...I(this,Er)[Er],...I(this,_t)[_t]];try{for(let a=n;a<i.length&&r;a++){const s=i[a],u={...r,step:a};this.setState({currentUploads:{...t,[e]:u}}),await s(u.fileIDs,e),t=this.getState().currentUploads,r=t[e]}}catch(a){throw I(this,xr)[xr](e),a}if(r){r.fileIDs.forEach(l=>{const f=this.getFile(l);f&&f.progress.postprocess&&this.emit("postprocess-complete",f)});const a=r.fileIDs.map(l=>this.getFile(l)),s=a.filter(l=>!l.error),u=a.filter(l=>l.error);await this.addResultData(e,{successful:s,failed:u,uploadID:e}),t=this.getState().currentUploads,r=t[e]}let o;return r&&(o=r.result,this.emit("complete",o),I(this,xr)[xr](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}ag.VERSION=Eb.version;var nd=ag,qi,de,sg,ug,Br,id,lg,cg,fg,Ol,xu,Ou,dg,_i={},hg=[],Nb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Vi=Array.isArray;function dt(e,t){for(var r in t)e[r]=t[r];return e}function Sl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Su(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?qi.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Di(e,a,n,i,null)}function Di(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++sg,__i:-1,__u:0};return i==null&&de.vnode!=null&&de.vnode(o),o}function $b(){return{current:null}}function Ki(e){return e.children}function Ci(e,t){this.props=e,this.context=t}function Cn(e,t){if(t==null)return e.__?Cn(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Cn(e):null}function pg(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return pg(e)}}function _u(e){(!e.__d&&(e.__d=!0)&&Br.push(e)&&!ea.__r++||id!=de.debounceRendering)&&((id=de.debounceRendering)||lg)(ea)}function ea(){for(var e,t,r,n,i,o,a,s=1;Br.length;)Br.length>s&&Br.sort(cg),e=Br.shift(),s=Br.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=dt({},n)).__v=n.__v+1,de.vnode&&de.vnode(r),_l(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,i??Cn(n),!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,yg(o,r,a),n.__e=n.__=null,r.__e!=i&&pg(r)));ea.__r=0}function gg(e,t,r,n,i,o,a,s,u,l,f){var c,d,p,h,g,v,D,C=n&&n.__k||hg,b=t.length;for(u=Lb(r,t,C,u,b),c=0;c<b;c++)(p=r.__k[c])!=null&&(d=p.__i==-1?_i:C[p.__i]||_i,p.__i=c,v=_l(e,p,d,i,o,a,s,u,l,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Pl(d.ref,null,p),f.push(p.ref,p.__c||h,p)),g==null&&h!=null&&(g=h),(D=!!(4&p.__u))||d.__k===p.__k?u=vg(p,u,e,D):typeof p.type=="function"&&v!==void 0?u=v:h&&(u=h.nextSibling),p.__u&=-7);return r.__e=g,u}function Lb(e,t,r,n,i){var o,a,s,u,l,f=r.length,c=f,d=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(u=o+d,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Di(null,a,null,null,null):Vi(a)?Di(Ki,{children:a},null,null,null):a.constructor==null&&a.__b>0?Di(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(l=a.__i=Mb(a,r,u,c))!=-1&&(c--,(s=r[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>f?d--:i<f&&d++),typeof a.type!="function"&&(a.__u|=4)):l!=u&&(l==u-1?d--:l==u+1?d++:(l>u?d--:d++,a.__u|=4))):e.__k[o]=null;if(c)for(o=0;o<f;o++)(s=r[o])!=null&&!(2&s.__u)&&(s.__e==n&&(n=Cn(s)),Cg(s,s));return n}function vg(e,t,r,n){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=vg(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=Cn(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function mg(e,t){return t=t||[],e==null||typeof e=="boolean"||(Vi(e)?e.some(function(r){mg(r,t)}):t.push(e)),t}function Mb(e,t,r,n){var i,o,a,s=e.key,u=e.type,l=t[r],f=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||f&&s==l.key&&u==l.type)return r;if(n>(f?1:0)){for(i=r-1,o=r+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&!(2&l.__u)&&s==l.key&&u==l.type)return a}return-1}function od(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Nb.test(t)?r:r+"px"}function ho(e,t,r,n,i){var o,a;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||od(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||od(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(fg,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Ol,e.addEventListener(t,o?Ou:xu,o)):e.removeEventListener(t,o?Ou:xu,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function ad(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Ol++;else if(t.t<r.u)return;return r(de.event?de.event(t):t)}}}function _l(e,t,r,n,i,o,a,s,u,l){var f,c,d,p,h,g,v,D,C,b,A,E,x,_,T,k,M,R=t.type;if(t.constructor!=null)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(f=de.__b)&&f(t);e:if(typeof R=="function")try{if(D=t.props,C="prototype"in R&&R.prototype.render,b=(f=R.contextType)&&n[f.__c],A=f?b?b.props.value:f.__:n,r.__c?v=(c=t.__c=r.__c).__=c.__E:(C?t.__c=c=new R(D,A):(t.__c=c=new Ci(D,A),c.constructor=R,c.render=Ub),b&&b.sub(c),c.props=D,c.state||(c.state={}),c.context=A,c.__n=n,d=c.__d=!0,c.__h=[],c._sb=[]),C&&c.__s==null&&(c.__s=c.state),C&&R.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=dt({},c.__s)),dt(c.__s,R.getDerivedStateFromProps(D,c.__s))),p=c.props,h=c.state,c.__v=t,d)C&&R.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),C&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(C&&R.getDerivedStateFromProps==null&&D!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(D,A),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(D,c.__s,A)===!1||t.__v==r.__v){for(t.__v!=r.__v&&(c.props=D,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(S){S&&(S.__=t)}),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(D,c.__s,A),C&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,h,g)})}if(c.context=A,c.props=D,c.__P=e,c.__e=!1,x=de.__r,_=0,C){for(c.state=c.__s,c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[]}else do c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++_<25);c.state=c.__s,c.getChildContext!=null&&(n=dt(dt({},n),c.getChildContext())),C&&!d&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,h)),k=f,f!=null&&f.type===Ki&&f.key==null&&(k=Dg(f.props.children)),s=gg(e,Vi(k)?k:[k],t,r,n,i,o,a,s,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&a.push(c),v&&(c.__E=c.__=null)}catch(S){if(t.__v=null,u||o!=null)if(S.then){for(t.__u|=u?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(M=o.length;M--;)Sl(o[M]);Pu(t)}else t.__e=r.__e,t.__k=r.__k,S.then||Pu(t);de.__e(S,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Ib(r.__e,t,r,n,i,o,a,u,l);return(f=de.diffed)&&f(t),128&t.__u?void 0:s}function Pu(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Pu)}function yg(e,t,r){for(var n=0;n<r.length;n++)Pl(r[n],r[++n],r[++n]);de.__c&&de.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){de.__e(o,i.__v)}})}function Dg(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Vi(e)?e.map(Dg):dt({},e)}function Ib(e,t,r,n,i,o,a,s,u){var l,f,c,d,p,h,g,v=r.props,D=t.props,C=t.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!C&&(C?p.localName==C:p.nodeType==3)){e=p,o[l]=null;break}}if(e==null){if(C==null)return document.createTextNode(D);e=document.createElementNS(i,C,D.is&&D),s&&(de.__m&&de.__m(t,o),s=!1),o=null}if(C==null)v===D||s&&e.data==D||(e.data=D);else{if(o=o&&qi.call(e.childNodes),v=r.props||_i,!s&&o!=null)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in D)){if(l=="value"&&"defaultValue"in D||l=="checked"&&"defaultChecked"in D)continue;ho(e,l,null,p,i)}}for(l in D)p=D[l],l=="children"?d=p:l=="dangerouslySetInnerHTML"?f=p:l=="value"?h=p:l=="checked"?g=p:s&&typeof p!="function"||v[l]===p||ho(e,l,p,v[l],i);if(f)s||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),gg(t.type=="template"?e.content:e,Vi(d)?d:[d],t,r,n,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Cn(r,0),s,u),o!=null)for(l=o.length;l--;)Sl(o[l]);s||(l="value",C=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[l]||C=="progress"&&!h||C=="option"&&h!=v[l])&&ho(e,l,h,v[l],i),l="checked",g!=null&&g!=e[l]&&ho(e,l,g,v[l],i))}return e}function Pl(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){de.__e(i,r)}}function Cg(e,t,r){var n,i;if(de.unmount&&de.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Pl(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){de.__e(o,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Cg(n[i],t,r||typeof e.type!="function");r||Sl(e.__e),e.__c=e.__=e.__e=void 0}function Ub(e,t,r){return this.constructor(e,r)}function bg(e,t,r){var n,i,o,a;t==document&&(t=document.documentElement),de.__&&de.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],_l(t,e=(!n&&r||t).__k=Su(Ki,null,[e]),i||_i,_i,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?qi.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),yg(o,e,a)}function wg(e,t){bg(e,t,wg)}function Hb(e,t,r){var n,i,o,a,s=dt({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?qi.call(arguments,2):r),Di(e.type,s,n||e.key,i||e.ref,null)}function zb(e){function t(r){var n,i;return this.getChildContext||(n=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&n.forEach(function(a){a.__e=!0,_u(a)})},this.sub=function(o){n.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){n&&n.delete(o),a&&a.call(o)}}),r.children}return t.__c="__cC"+dg++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}qi=hg.slice,de={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},sg=0,ug=function(e){return e!=null&&e.constructor==null},Ci.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=dt({},this.state),typeof e=="function"&&(e=e(dt({},r),this.props)),e&&dt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),_u(this))},Ci.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_u(this))},Ci.prototype.render=Ki,Br=[],lg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cg=function(e,t){return e.__v.__b-t.__v.__b},ea.__r=0,fg=/(PointerCapture)$|Capture$/i,Ol=0,xu=ad(!1),Ou=ad(!0),dg=0;const Wb=Object.freeze(Object.defineProperty({__proto__:null,Component:Ci,Fragment:Ki,cloneElement:Hb,createContext:zb,createElement:Su,createRef:$b,h:Su,hydrate:wg,get isValidElement(){return ug},get options(){return de},render:bg,toChildArray:mg},Symbol.toStringTag,{value:"Module"})),qb=se.a(Wb);function Vb(e){return(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE}var Kb=Vb;const Gb=Kb;function Jb(e,t){return t===void 0&&(t=document),typeof e=="string"?t.querySelector(e):Gb(e)?e:null}var Xb=Jb;function Yb(e){for(var t;e&&!e.dir;)e=e.parentNode;return(t=e)==null?void 0:t.dir}var Zb=Yb;const Qb=eg;let ew=class{constructor(t,r){r===void 0&&(r={}),this.uppy=t,this.opts=r}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:r}=this.uppy.getState();this.uppy.setState({plugins:{...r,[this.id]:{...r[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new Qb([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(){}};var ta=ew,sd=qb;function ud(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var tw=0;function rw(e){return"__private_"+tw+++"_"+e}const nw=Xb,iw=Zb,ow=ta;function aw(e){let t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=i,t||(t=Promise.resolve().then(()=>(t=null,e(...r)))),t}}var Xn=rw("updateUI");class kl extends ow{constructor(){super(...arguments),Object.defineProperty(this,Xn,{writable:!0,value:void 0})}mount(t,r){const n=r.id,i=nw(t);if(i){this.isTargetDOMEl=!0;const s=document.createElement("div");return s.classList.add("uppy-Root"),ud(this,Xn)[Xn]=aw(u=>{this.uppy.getPlugin(this.id)&&((0,sd.render)(this.render(u),s),this.afterUpdate())}),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),(0,sd.render)(this.render(this.uppy.getState()),s),this.el=s,i.appendChild(s),s.dir=this.opts.direction||iw(s)||"ltr",this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof kl)o=t;else if(typeof t=="function"){const s=t;this.uppy.iteratePlugins(u=>{u instanceof s&&(o=u)})}if(o)return this.uppy.log(`Installing ${n} to ${o.id}`),this.parent=o,this.el=o.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let a=`Invalid target option given to ${n}.`;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 <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}update(t){if(this.el!=null){var r,n;(r=(n=ud(this,Xn))[Xn])==null||r.call(n,t)}}unmount(){if(this.isTargetDOMEl){var t;(t=this.el)==null||t.remove()}this.onUnmount()}onMount(){}onUnmount(){}}var ld=kl;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return r.debugLogger}});var r=Rr;e.exports=nd;const n=ld;t.UIPlugin=n;const i=ta;t.BasePlugin=i;const o=nd;t.Uppy=o;const a=ld,s=ta;o.Uppy=o,o.UIPlugin=a,o.BasePlugin=s,o.debugLogger=r.debugLogger})(Yf,Yf.exports);var ht={};let sw=class extends Error{constructor(t,r){r===void 0&&(r=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=r}};var Eg=sw;const uw=Eg;function lw(){return fetch(...arguments).catch(e=>{throw e.name==="AbortError"?e:new uw(e)})}var cw=lw;const fw=Qp;let dw=class extends Error{constructor(t,r){r===void 0&&(r={}),super(t),this.cause=r.cause,this.cause&&fw(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}};var hw=dw;let pw=class extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}};var gw=pw;let Bg;function We(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var vw=0;function Oa(e){return"__private_"+vw+++"_"+e}const Ds=cw,mw=hw,yw=gw,Dw={version:"2.2.2"};function Cw(e){return e.replace(/\/$/,"")}async function Cs(e){if(e.status===401)throw new yw;const t=e.json();if(e.status<200||e.status>300){let r=`Failed request with status: ${e.status}. ${e.statusText}`;try{const n=await t;r=n.message?`${r} message: ${n.message}`:r,r=n.requestId?`${r} request-Id: ${n.requestId}`:r}finally{throw new Error(r)}}return t}var At=Oa("companionHeaders"),lr=Oa("getPostResponseFunc"),St=Oa("getUrl"),cr=Oa("errorHandler");Bg=Symbol.for("uppy test: getCompanionHeaders");let ra=class Ag{constructor(t,r){Object.defineProperty(this,cr,{value:ww}),Object.defineProperty(this,St,{value:bw}),Object.defineProperty(this,At,{writable:!0,value:void 0}),Object.defineProperty(this,lr,{writable:!0,value:n=>i=>n?i:this.onReceiveResponse(i)}),this.uppy=t,this.opts=r,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,We(this,At)[At]=r==null?void 0:r.companionHeaders}setCompanionHeaders(t){We(this,At)[At]=t}[Bg](){return We(this,At)[At]}get hostname(){const{companion:t}=this.uppy.getState(),r=this.opts.companionUrl;return Cw(t&&t[r]?t[r]:r)}headers(){return Promise.resolve({...Ag.defaultHeaders,...We(this,At)[At]})}onReceiveResponse(t){const n=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:o}=t;return o.has("i-am")&&o.get("i-am")!==n[i]&&this.uppy.setState({companion:{...n,[i]:o.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(We(this,St)[St](t),{method:"OPTIONS"}).then(r=>(r.headers.has("access-control-allow-headers")&&(this.allowedHeaders=r.headers.get("access-control-allow-headers").split(",").map(n=>n.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(r=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${r}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then(r=>{let[n,i]=r;return Object.keys(i).forEach(o=>{n.includes(o.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${o}`),delete i[o])}),i})}get(t,r){const n="get";return this.preflightAndHeaders(t).then(i=>Ds(We(this,St)[St](t),{method:n,headers:i,credentials:this.opts.companionCookiesRule||"same-origin"})).then(We(this,lr)[lr](r)).then(Cs).catch(We(this,cr)[cr](n,t))}post(t,r,n){const i="post";return this.preflightAndHeaders(t).then(o=>Ds(We(this,St)[St](t),{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(r)})).then(We(this,lr)[lr](n)).then(Cs).catch(We(this,cr)[cr](i,t))}delete(t,r,n){const i="delete";return this.preflightAndHeaders(t).then(o=>Ds(`${this.hostname}/${t}`,{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null})).then(We(this,lr)[lr](n)).then(Cs).catch(We(this,cr)[cr](i,t))}};function bw(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function ww(e,t){return r=>{var n;return(n=r)!=null&&n.isAuthError||(r=new mw(`Could not ${e} ${We(this,St)[St](t)}`,{cause:r})),Promise.reject(r)}}ra.VERSION=Dw.version;ra.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${ra.VERSION}`};var Tl=ra,Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.getItem=Bw;Gi.removeItem=Aw;Gi.setItem=Ew;function Ew(e,t){return new Promise(r=>{localStorage.setItem(e,t),r()})}function Bw(e){return Promise.resolve(localStorage.getItem(e))}function Aw(e){return new Promise(t=>{localStorage.removeItem(e),t()})}var Fw=Gi;const xw=Tl,Ow=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class Sw extends xw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||Ow(this.id),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(t=>{let[r,n]=t;const i={};return n&&(i["uppy-auth-token"]=n),this.companionKeysParams&&(i["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...r,...i}})}onReceiveResponse(t){t=super.onReceiveResponse(t);const r=this.uppy.getPlugin(this.pluginId),i=r.getPluginState().authenticated?t.status!==401:t.status<400;return r.setPluginState({authenticated:i}),t}setAuthToken(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(t){t===void 0&&(t={});const r=new URLSearchParams(t);return this.preAuthToken&&r.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${r}`}fileUrl(t){return`${this.hostname}/${this.id}/get/${t}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const t=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=t.token}catch(t){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}}list(t){return this.get(`${this.id}/list/${t||""}`)}logout(){return this.get(`${this.id}/logout`).then(t=>Promise.all([t,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(t=>{let[r]=t;return r})}static initPlugin(t,r,n){if(t.type="acquirer",t.files=[],n&&(t.opts={...n,...r}),r.serverUrl||r.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(r.companionAllowedHosts){const i=r.companionAllowedHosts;if(typeof i!="string"&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(r.companionUrl)?t.opts.companionAllowedHosts=`https://${r.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(r.companionUrl).origin;t.storage=t.opts.storage||Fw}}var _w=Sw;const Pw=Tl,kw=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class Tw extends Pw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||kw(this.id),this.pluginId=this.opts.pluginId}fileUrl(t){return`${this.hostname}/search/${this.id}/get/${t}`}search(t,r){return this.get(`search/${this.id}/list?q=${encodeURIComponent(t)}${r?`&${r}`:""}`)}}var jw=Tw;let Fg,xg;function we(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Rw=0;function Ji(e){return"__private_"+Rw+++"_"+e}const Nw=tg;var Ft=Ji("queued"),fr=Ji("emitter"),it=Ji("isOpen"),Ne=Ji("socket"),bs=Ji("handleMessage");Fg=Symbol.for("uppy test: getSocket");xg=Symbol.for("uppy test: getQueued");class $w{constructor(t){Object.defineProperty(this,Ft,{writable:!0,value:[]}),Object.defineProperty(this,fr,{writable:!0,value:Nw()}),Object.defineProperty(this,it,{writable:!0,value:!1}),Object.defineProperty(this,Ne,{writable:!0,value:void 0}),Object.defineProperty(this,bs,{writable:!0,value:r=>{try{const n=JSON.parse(r.data);this.emit(n.action,n.payload)}catch(n){console.log(n)}}}),this.opts=t,(!t||t.autoOpen!==!1)&&this.open()}get isOpen(){return we(this,it)[it]}[Fg](){return we(this,Ne)[Ne]}[xg](){return we(this,Ft)[Ft]}open(){we(this,Ne)[Ne]=new WebSocket(this.opts.target),we(this,Ne)[Ne].onopen=()=>{for(we(this,it)[it]=!0;we(this,Ft)[Ft].length>0&&we(this,it)[it];){const t=we(this,Ft)[Ft].shift();this.send(t.action,t.payload)}},we(this,Ne)[Ne].onclose=()=>{we(this,it)[it]=!1},we(this,Ne)[Ne].onmessage=we(this,bs)[bs]}close(){var t;(t=we(this,Ne)[Ne])==null||t.close()}send(t,r){if(!we(this,it)[it]){we(this,Ft)[Ft].push({action:t,payload:r});return}we(this,Ne)[Ne].send(JSON.stringify({action:t,payload:r}))}on(t,r){we(this,fr)[fr].on(t,r)}emit(t,r){we(this,fr)[fr].emit(t,r)}once(t,r){we(this,fr)[fr].once(t,r)}}var Lw=$w;Object.defineProperty(ht,"__esModule",{value:!0});ht.Socket=ht.SearchProvider=ht.RequestClient=ht.Provider=void 0;const Mw=Tl;ht.RequestClient=Mw;const Iw=_w;ht.Provider=Iw;const Uw=jw;ht.SearchProvider=Uw;const Hw=Lw;ht.Socket=Hw;var bn={};Object.defineProperty(bn,"__esModule",{value:!0});bn.internalRateLimitedQueue=bn.RateLimitedQueue=void 0;function q(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var zw=0;function Ve(e){return"__private_"+zw+++"_"+e}function Ww(){return new Error("Cancelled")}var Ge=Ve("activeRequests"),Le=Ve("queuedHandlers"),Ke=Ve("paused"),dr=Ve("pauseTimer"),$e=Ve("downLimit"),hr=Ve("upperLimit"),xt=Ve("rateLimitingTimer"),bi=Ve("call"),Pt=Ve("queueNext"),ku=Ve("next"),ws=Ve("queue"),Tu=Ve("dequeue"),Es=Ve("resume"),pr=Ve("increaseLimit");class qw{constructor(t){Object.defineProperty(this,Tu,{value:Xw}),Object.defineProperty(this,ws,{value:Jw}),Object.defineProperty(this,ku,{value:Gw}),Object.defineProperty(this,Pt,{value:Kw}),Object.defineProperty(this,bi,{value:Vw}),Object.defineProperty(this,Ge,{writable:!0,value:0}),Object.defineProperty(this,Le,{writable:!0,value:[]}),Object.defineProperty(this,Ke,{writable:!0,value:!1}),Object.defineProperty(this,dr,{writable:!0,value:void 0}),Object.defineProperty(this,$e,{writable:!0,value:1}),Object.defineProperty(this,hr,{writable:!0,value:void 0}),Object.defineProperty(this,xt,{writable:!0,value:void 0}),Object.defineProperty(this,Es,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,pr,{writable:!0,value:()=>{if(q(this,Ke)[Ke]){q(this,xt)[xt]=setTimeout(q(this,pr)[pr],0);return}q(this,$e)[$e]=this.limit,this.limit=Math.ceil((q(this,hr)[hr]+q(this,$e)[$e])/2);for(let r=q(this,$e)[$e];r<=this.limit;r++)q(this,Pt)[Pt]();q(this,hr)[hr]-q(this,$e)[$e]>3?q(this,xt)[xt]=setTimeout(q(this,pr)[pr],2e3):q(this,$e)[$e]=Math.floor(q(this,$e)[$e]/2)}}),typeof t!="number"||t===0?this.limit=1/0:this.limit=t}run(t,r){return!q(this,Ke)[Ke]&&q(this,Ge)[Ge]<this.limit?q(this,bi)[bi](t):q(this,ws)[ws](t,r)}wrapPromiseFunction(t,r){var n=this;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];let s;const u=new Promise((l,f)=>{s=n.run(()=>{let c,d;try{d=Promise.resolve(t(...o))}catch(p){d=Promise.reject(p)}return d.then(p=>{c?f(c):(s.done(),l(p))},p=>{c?f(c):(s.done(),f(p))}),()=>{c=Ww()}},r)});return u.abort=()=>{s.abort()},u}}resume(){q(this,Ke)[Ke]=!1,clearTimeout(q(this,dr)[dr]);for(let t=0;t<this.limit;t++)q(this,Pt)[Pt]()}pause(t){t===void 0&&(t=null),q(this,Ke)[Ke]=!0,clearTimeout(q(this,dr)[dr]),t!=null&&(q(this,dr)[dr]=setTimeout(q(this,Es)[Es],t))}rateLimit(t){clearTimeout(q(this,xt)[xt]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(q(this,hr)[hr]=this.limit-1,this.limit=q(this,$e)[$e],q(this,xt)[xt]=setTimeout(q(this,pr)[pr],t))}get isPaused(){return q(this,Ke)[Ke]}}bn.RateLimitedQueue=qw;function Vw(e){q(this,Ge)[Ge]+=1;let t=!1,r;try{r=e()}catch(n){throw q(this,Ge)[Ge]-=1,n}return{abort:()=>{t||(t=!0,q(this,Ge)[Ge]-=1,r(),q(this,Pt)[Pt]())},done:()=>{t||(t=!0,q(this,Ge)[Ge]-=1,q(this,Pt)[Pt]())}}}function Kw(){queueMicrotask(()=>q(this,ku)[ku]())}function Gw(){if(q(this,Ke)[Ke]||q(this,Ge)[Ge]>=this.limit||q(this,Le)[Le].length===0)return;const e=q(this,Le)[Le].shift(),t=q(this,bi)[bi](e.fn);e.abort=t.abort,e.done=t.done}function Jw(e,t){t===void 0&&(t={});const r={fn:e,priority:t.priority||0,abort:()=>{q(this,Tu)[Tu](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=q(this,Le)[Le].findIndex(i=>r.priority>i.priority);return n===-1?q(this,Le)[Le].push(r):q(this,Le)[Le].splice(n,0,r),r}function Xw(e){const t=q(this,Le)[Le].indexOf(e);t!==-1&&q(this,Le)[Le].splice(t,1)}const Yw=Symbol("__queue");bn.internalRateLimitedQueue=Yw;const Zw=se.l;function Qw(e,t,r){const{progress:n,bytesUploaded:i,bytesTotal:o}=t;n&&(e.uppy.log(`Upload progress: ${n}`),e.uppy.emit("upload-progress",r,{uploader:e,bytesUploaded:i,bytesTotal:o}))}var eE=Zw(Qw,300,{leading:!0,trailing:!0});function tE(e){const r=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${r}`}var rE=tE;function nE(e){const t=[],r=[];function n(a){t.push(a)}function i(a){r.push(a)}return Promise.all(e.map(a=>a.then(n,i))).then(()=>({successful:t,failed:r}))}var iE=nE;function Yn(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var oE=0;function Og(e){return"__private_"+oE+++"_"+e}var gr=Og("emitter"),Zn=Og("events");let aE=class{constructor(t){Object.defineProperty(this,gr,{writable:!0,value:void 0}),Object.defineProperty(this,Zn,{writable:!0,value:[]}),Yn(this,gr)[gr]=t}on(t,r){return Yn(this,Zn)[Zn].push([t,r]),Yn(this,gr)[gr].on(t,r)}remove(){for(const[t,r]of Yn(this,Zn)[Zn].splice(0))Yn(this,gr)[gr].off(t,r)}};var sE=aE;function Qe(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var uE=0;function Sa(e){return"__private_"+uE+++"_"+e}var Ot=Sa("aliveTimer"),vr=Sa("isDone"),Qn=Sa("onTimedOut"),mr=Sa("timeout");let lE=class{constructor(t,r){Object.defineProperty(this,Ot,{writable:!0,value:void 0}),Object.defineProperty(this,vr,{writable:!0,value:!1}),Object.defineProperty(this,Qn,{writable:!0,value:void 0}),Object.defineProperty(this,mr,{writable:!0,value:void 0}),Qe(this,mr)[mr]=t,Qe(this,Qn)[Qn]=r}progress(){Qe(this,vr)[vr]||Qe(this,mr)[mr]>0&&(clearTimeout(Qe(this,Ot)[Ot]),Qe(this,Ot)[Ot]=setTimeout(Qe(this,Qn)[Qn],Qe(this,mr)[mr]))}done(){Qe(this,vr)[vr]||(clearTimeout(Qe(this,Ot)[Ot]),Qe(this,Ot)[Ot]=null,Qe(this,vr)[vr]=!0)}};var cE=lE;function fE(e){return e?e.readyState!==0&&e.readyState!==4||e.status===0:!1}var dE=fE,hE={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}},pE=Yp,Bs=ht,po=bn;const gE=ta,vE=eE,mE=rE,yE=iE,cd=sE,fd=cE,Sg=Eg,_g=dE,DE={version:"2.1.3"},CE=hE;function dd(e,t){let r=t;return r||(r=new Error("Upload error")),typeof r=="string"&&(r=new Error(r)),r instanceof Error||(r=Object.assign(new Error("Upload error"),{data:r})),_g(e)?(r=new Sg(r,e),r):(r.request=e,r)}function hd(e){return e.data.slice(0,e.data.size,e.meta.type)}class bE extends gE{constructor(t,r){super(t,r),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=CE;const n={formData:!0,fieldName:r.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:"",getResponseData(i){let o={};try{o=JSON.parse(i)}catch(a){t.log(a)}return o},getResponseError(i,o){let a=new Error("Upload error");return _g(o)&&(a=new Sg(a,o)),a},validateStatus(i){return i>=200&&i<300}};if(this.opts={...n,...r},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),po.internalRateLimitedQueue in this.opts?this.requests=this.opts[po.internalRateLimitedQueue]:this.requests=new po.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(t){const r=this.uppy.getState().xhrUpload,{headers:n}=this.opts,i={...this.opts,...r||{},...t.xhrUpload||{},headers:{}};return typeof n=="function"?i.headers=n(t):Object.assign(i.headers,this.opts.headers),r&&Object.assign(i.headers,r.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,r,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(r)).forEach(o=>{t.append(o,r[o])})}createFormDataUpload(t,r){const n=new FormData;this.addMetadata(n,t.meta,r);const i=hd(t);return t.name?n.append(r.fieldName,i,t.meta.name):n.append(r.fieldName,i),n}createBundledUpload(t,r){const n=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(n,i,r),t.forEach(o=>{const a=this.getOptions(o),s=hd(o);o.name?n.append(a.fieldName,s,o.name):n.append(a.fieldName,s)}),n}upload(t,r,n){const i=this.getOptions(t);return this.uppy.log(`uploading ${r} of ${n}`),new Promise((o,a)=>{this.uppy.emit("upload-started",t);const s=i.formData?this.createFormDataUpload(t,i):t.data,u=new XMLHttpRequest;this.uploaderEvents[t.id]=new cd(this.uppy);let l;const f=new fd(i.timeout,()=>{u.abort(),l.done();const d=new Error(this.i18n("timedOut",{seconds:Math.ceil(i.timeout/1e3)}));this.uppy.emit("upload-error",t,d),a(d)}),c=(0,pE.nanoid)();u.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${c} started`)}),u.upload.addEventListener("progress",d=>{this.uppy.log(`[XHRUpload] ${c} progress: ${d.loaded} / ${d.total}`),f.progress(),d.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:d.loaded,bytesTotal:d.total})}),u.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${c} finished`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i.validateStatus(u.status,u.responseText,u)){const g=i.getResponseData(u.responseText,u),v=g[i.responseUrlFieldName],D={status:u.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),v&&this.uppy.log(`Download ${t.name} from ${v}`),o(t)}const d=i.getResponseData(u.responseText,u),p=dd(u,i.getResponseError(u.responseText,u)),h={status:u.status,body:d};return this.uppy.emit("upload-error",t,p,h),a(p)}),u.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${c} errored`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const d=dd(u,i.getResponseError(u.responseText,u));return this.uppy.emit("upload-error",t,d),a(d)}),u.open(i.method.toUpperCase(),i.endpoint,!0),u.withCredentials=i.withCredentials,i.responseType!==""&&(u.responseType=i.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const d=this.getOptions(t);return Object.keys(d.headers).forEach(p=>{u.setRequestHeader(p,d.headers[p])}),u.send(s),()=>{f.done(),u.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),a(new Error("File removed"))}),this.onCancelAll(t.id,d=>{let{reason:p}=d;p==="user"&&l.abort(),a(new Error("Upload cancelled"))})})}uploadRemote(t){const r=this.getOptions(t);return new Promise((n,i)=>{this.uppy.emit("upload-started",t);const o={};(Array.isArray(r.metaFields)?r.metaFields:Object.keys(t.meta)).forEach(l=>{o[l]=t.meta[l]});const s=t.remote.providerOptions.provider?Bs.Provider:Bs.RequestClient;new s(this.uppy,t.remote.providerOptions).post(t.remote.url,{...t.remote.body,endpoint:r.endpoint,size:t.data.size,fieldname:r.fieldName,metadata:o,httpMethod:r.method,useFormData:r.formData,headers:r.headers}).then(l=>{const{token:f}=l,c=mE(t.remote.companionUrl),d=new Bs.Socket({target:`${c}/api/${f}`,autoOpen:!1});this.uploaderEvents[t.id]=new cd(this.uppy);let p;this.onFileRemove(t.id,()=>{d.send("cancel",{}),p.abort(),n(`upload ${t.id} was removed`)}),this.onCancelAll(t.id,function(h){let{reason:g}=h===void 0?{}:h;g==="user"&&(d.send("cancel",{}),p.abort()),n(`upload ${t.id} was canceled`)}),this.onRetry(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",h=>vE(this,h,t)),d.on("success",h=>{const g=r.getResponseData(h.response.responseText,h.response),v=g[r.responseUrlFieldName],D={status:h.response.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),n()}),d.on("error",h=>{const g=h.response,v=g?r.getResponseError(g.responseText,g):Object.assign(new Error(h.error.message),{cause:h.error});this.uppy.emit("upload-error",t,v),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i(v)}),p=this.requests.run(()=>(d.open(),t.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(l=>{this.uppy.emit("upload-error",t,l),i(l)})})}uploadBundle(t){return new Promise((r,n)=>{const{endpoint:i}=this.opts,{method:o}=this.opts,a=this.uppy.getState().xhrUpload,s=this.createBundledUpload(t,{...this.opts,...a||{}}),u=new XMLHttpRequest,l=c=>{t.forEach(d=>{this.uppy.emit("upload-error",d,c)})},f=new fd(this.opts.timeout,()=>{u.abort();const c=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(c),n(c)});u.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),f.progress()}),u.upload.addEventListener("progress",c=>{f.progress(),c.lengthComputable&&t.forEach(d=>{this.uppy.emit("upload-progress",d,{uploader:this,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})})}),u.addEventListener("load",c=>{if(f.done(),this.opts.validateStatus(c.target.status,u.responseText,u)){const p=this.opts.getResponseData(u.responseText,u),h={status:c.target.status,body:p};return t.forEach(g=>{this.uppy.emit("upload-success",g,h)}),r()}const d=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return d.request=u,l(d),n(d)}),u.addEventListener("error",()=>{f.done();const c=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return l(c),n(c)}),this.uppy.on("cancel-all",function(c){let{reason:d}=c===void 0?{}:c;d==="user"&&(f.done(),u.abort())}),u.open(o.toUpperCase(),i,!0),u.withCredentials=this.opts.withCredentials,this.opts.responseType!==""&&(u.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(c=>{u.setRequestHeader(c,this.opts.headers[c])}),u.send(s),t.forEach(c=>{this.uppy.emit("upload-started",c)})})}uploadFiles(t){const r=t.map((n,i)=>{const o=parseInt(i,10)+1,a=t.length;return n.error?Promise.reject(new Error(n.error)):n.isRemote?this.uploadRemote(n,o,a):this.upload(n,o,a)});return yE(r)}onFileRemove(t,r){this.uploaderEvents[t].on("file-removed",n=>{t===n.id&&r(n.id)})}onRetry(t,r){this.uploaderEvents[t].on("upload-retry",n=>{t===n&&r()})}onRetryAll(t,r){this.uploaderEvents[t].on("retry-all",()=>{this.uppy.getFile(t)&&r()})}onCancelAll(t,r){var n=this;this.uploaderEvents[t].on("cancel-all",function(){n.uppy.getFile(t)&&r(...arguments)})}handleUpload(t){if(t.length===0)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.opts.limit===0&&!this.opts[po.internalRateLimitedQueue]&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const r=t.map(n=>this.uppy.getFile(n));if(this.opts.bundle){if(r.some(i=>i.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(r)}return this.uploadFiles(r).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}bE.VERSION=DE.version;var pd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xi(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ht,Po,go=function(e){return e&&e.Math==Math&&e},P=go(typeof globalThis=="object"&&globalThis)||go(typeof window=="object"&&window)||go(typeof self=="object"&&self)||go(typeof pd=="object"&&pd)||function(){return this}()||Function("return this")(),wE=Object.defineProperty,jl=function(e,t){try{wE(P,e,{value:t,configurable:!0,writable:!0})}catch{P[e]=t}return t},Kt=P["__core-js_shared__"]||jl("__core-js_shared__",{}),Rl=Xi(function(e){(e.exports=function(t,r){return Kt[t]||(Kt[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Pg=Function.prototype,ju=Pg.bind,Ru=Pg.call,EE=ju&&ju.bind(Ru),U=ju?function(e){return e&&EE(Ru,e)}:function(e){return e&&function(){return Ru.apply(e,arguments)}},BE=P.TypeError,rt=function(e){if(e==null)throw BE("Can't call method on "+e);return e},AE=P.Object,Qt=function(e){return AE(rt(e))},FE=U({}.hasOwnProperty),Ce=Object.hasOwn||function(e,t){return FE(Qt(e),t)},xE=0,OE=Math.random(),SE=U(1 .toString),Nl=function(e){return"Symbol("+(e===void 0?"":e)+")_"+SE(++xE+OE,36)},ie=function(e){return typeof e=="function"},_E=function(e){return ie(e)?e:void 0},zr=function(e,t){return arguments.length<2?_E(P[e]):P[e]&&P[e][t]},dn=zr("navigator","userAgent")||"",gd=P.process,vd=P.Deno,md=gd&&gd.versions||vd&&vd.version,yd=md&&md.v8;yd&&(Po=(Ht=yd.split("."))[0]>0&&Ht[0]<4?1:+(Ht[0]+Ht[1])),!Po&&dn&&(!(Ht=dn.match(/Edge\/(\d+)/))||Ht[1]>=74)&&(Ht=dn.match(/Chrome\/(\d+)/))&&(Po=+Ht[1]);var Pi=Po,ee=function(e){try{return!!e()}catch{return!0}},Nu=!!Object.getOwnPropertySymbols&&!ee(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pi&&Pi<41}),$l=Nu&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ei=Rl("wks"),_r=P.Symbol,Dd=_r&&_r.for,PE=$l?_r:_r&&_r.withoutSetter||Nl,ye=function(e){if(!Ce(ei,e)||!Nu&&typeof ei[e]!="string"){var t="Symbol."+e;Nu&&Ce(_r,e)?ei[e]=_r[e]:ei[e]=$l&&Dd?Dd(t):PE(t)}return ei[e]},kg={};kg[ye("toStringTag")]="z";var Ll=String(kg)==="[object z]",xe=!ee(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),le=function(e){return typeof e=="object"?e!==null:ie(e)},$u=P.document,kE=le($u)&&le($u.createElement),ki=function(e){return kE?$u.createElement(e):{}},Tg=!xe&&!ee(function(){return Object.defineProperty(ki("div"),"a",{get:function(){return 7}}).a!=7}),TE=P.String,jE=P.TypeError,be=function(e){if(le(e))return e;throw jE(TE(e)+" is not an object")},ti=Function.prototype.call,Z=ti.bind?ti.bind(ti):function(){return ti.apply(ti,arguments)},Nr=U({}.isPrototypeOf),RE=P.Object,Lu=$l?function(e){return typeof e=="symbol"}:function(e){var t=zr("Symbol");return ie(t)&&Nr(t.prototype,RE(e))},NE=P.String,_a=function(e){try{return NE(e)}catch{return"Object"}},$E=P.TypeError,Yt=function(e){if(ie(e))return e;throw $E(_a(e)+" is not a function")},$r=function(e,t){var r=e[t];return r==null?void 0:Yt(r)},LE=P.TypeError,ME=P.TypeError,IE=ye("toPrimitive"),UE=function(e,t){if(!le(e)||Lu(e))return e;var r,n=$r(e,IE);if(n){if(r=Z(n,e,t),!le(r)||Lu(r))return r;throw ME("Can't convert object to primitive value")}return function(i,o){var a,s;if(ie(a=i.toString)&&!le(s=Z(a,i))||ie(a=i.valueOf)&&!le(s=Z(a,i)))return s;throw LE("Can't convert object to primitive value")}(e)},Ml=function(e){var t=UE(e,"string");return Lu(t)?t:t+""},HE=P.TypeError,Cd=Object.defineProperty,lt={f:xe?Cd:function(e,t,r){if(be(e),t=Ml(t),be(r),Tg)try{return Cd(e,t,r)}catch{}if("get"in r||"set"in r)throw HE("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Pa=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},st=xe?function(e,t,r){return lt.f(e,t,Pa(1,r))}:function(e,t,r){return e[t]=r,e},zE=U(Function.toString);ie(Kt.inspectSource)||(Kt.inspectSource=function(e){return zE(e)});var na,wi,ia,ka=Kt.inspectSource,bd=P.WeakMap,jg=ie(bd)&&/native code/.test(ka(bd)),wd=Rl("keys"),Il=function(e){return wd[e]||(wd[e]=Nl(e))},Ta={},Mu=P.TypeError,WE=P.WeakMap;if(jg||Kt.state){var yr=Kt.state||(Kt.state=new WE),qE=U(yr.get),Ed=U(yr.has),VE=U(yr.set);na=function(e,t){if(Ed(yr,e))throw new Mu("Object already initialized");return t.facade=e,VE(yr,e,t),t},wi=function(e){return qE(yr,e)||{}},ia=function(e){return Ed(yr,e)}}else{var Zr=Il("state");Ta[Zr]=!0,na=function(e,t){if(Ce(e,Zr))throw new Mu("Object already initialized");return t.facade=e,st(e,Zr,t),t},wi=function(e){return Ce(e,Zr)?e[Zr]:{}},ia=function(e){return Ce(e,Zr)}}var je={set:na,get:wi,has:ia,enforce:function(e){return ia(e)?wi(e):na(e,{})},getterFor:function(e){return function(t){var r;if(!le(t)||(r=wi(t)).type!==e)throw Mu("Incompatible receiver, "+e+" required");return r}}},Rg=Function.prototype,KE=xe&&Object.getOwnPropertyDescriptor,As=Ce(Rg,"name"),_n={EXISTS:As,PROPER:As&&(function(){}).name==="something",CONFIGURABLE:As&&(!xe||xe&&KE(Rg,"name").configurable)},qe=Xi(function(e){var t=_n.CONFIGURABLE,r=je.get,n=je.enforce,i=String(String).split("String");(e.exports=function(o,a,s,u){var l,f=!!u&&!!u.unsafe,c=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet,p=u&&u.name!==void 0?u.name:a;ie(s)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ce(s,"name")||t&&s.name!==p)&&st(s,"name",p),(l=n(s)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==P?(f?!d&&o[a]&&(c=!0):delete o[a],c?o[a]=s:st(o,a,s)):c?o[a]=s:jl(a,s)})(Function.prototype,"toString",function(){return ie(this)&&r(this).source||ka(this)})}),GE=U({}.toString),JE=U("".slice),ut=function(e){return JE(GE(e),8,-1)},XE=ye("toStringTag"),YE=P.Object,ZE=ut(function(){return arguments}())=="Arguments",ja=Ll?ut:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=YE(e),XE))=="string"?r:ZE?ut(t):(n=ut(t))=="Object"&&ie(t.callee)?"Arguments":n},QE=Ll?{}.toString:function(){return"[object "+ja(this)+"]"};Ll||qe(Object.prototype,"toString",QE,{unsafe:!0});var oa={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Fs=ki("span").classList,Bd=Fs&&Fs.constructor&&Fs.constructor.prototype,Ng=Bd===Object.prototype?void 0:Bd,Ad=U(U.bind),Lr=function(e,t){return Yt(e),t===void 0?e:Ad?Ad(e,t):function(){return e.apply(t,arguments)}},xs=P.Object,eB=U("".split),Ra=ee(function(){return!xs("z").propertyIsEnumerable(0)})?function(e){return ut(e)=="String"?eB(e,""):xs(e)}:xs,tB=Math.ceil,rB=Math.floor,Yi=function(e){var t=+e;return t!=t||t===0?0:(t>0?rB:tB)(t)},nB=Math.min,Pn=function(e){return e>0?nB(Yi(e),9007199254740991):0},Wr=function(e){return Pn(e.length)},aa=Array.isArray||function(e){return ut(e)=="Array"},$g=function(){},iB=[],Lg=zr("Reflect","construct"),Ul=/^\s*(?:class|function)\b/,oB=U(Ul.exec),aB=!Ul.exec($g),ri=function(e){if(!ie(e))return!1;try{return Lg($g,iB,e),!0}catch{return!1}},Na=!Lg||ee(function(){var e;return ri(ri.call)||!ri(Object)||!ri(function(){e=!0})||e})?function(e){if(!ie(e))return!1;switch(ja(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return aB||!!oB(Ul,ka(e))}:ri,sB=ye("species"),Fd=P.Array,Mg=function(e,t){return new(function(r){var n;return aa(r)&&(n=r.constructor,(Na(n)&&(n===Fd||aa(n.prototype))||le(n)&&(n=n[sB])===null)&&(n=void 0)),n===void 0?Fd:n}(e))(t===0?0:t)},xd=U([].push),ni=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(u,l,f,c){for(var d,p,h=Qt(u),g=Ra(h),v=Lr(l,f),D=Wr(g),C=0,b=c||Mg,A=t?b(u,D):r||a?b(u,0):void 0;D>C;C++)if((s||C in g)&&(p=v(d=g[C],C,h),e))if(t)A[C]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return C;case 2:xd(A,d)}else switch(e){case 4:return!1;case 7:xd(A,d)}return o?-1:n||i?i:A}},kn={forEach:ni(0),map:ni(1),filter:ni(2),find:ni(5),findIndex:ni(6)},Ig=function(e,t){var r=[][e];return!!r&&ee(function(){r.call(null,t||function(){throw 1},1)})},uB=kn.forEach,Os=Ig("forEach")?[].forEach:function(e){return uB(this,e,arguments.length>1?arguments[1]:void 0)},Ug=function(e){if(e&&e.forEach!==Os)try{st(e,"forEach",Os)}catch{e.forEach=Os}};for(var Ss in oa)oa[Ss]&&Ug(P[Ss]&&P[Ss].prototype);Ug(Ng);var Od={}.propertyIsEnumerable,Sd=Object.getOwnPropertyDescriptor,lB=Sd&&!Od.call({1:2},1)?function(e){var t=Sd(this,e);return!!t&&t.enumerable}:Od,Hg={f:lB},er=function(e){return Ra(rt(e))},_d=Object.getOwnPropertyDescriptor,Zi={f:xe?_d:function(e,t){if(e=er(e),t=Ml(t),Tg)try{return _d(e,t)}catch{}if(Ce(e,t))return Pa(!Z(Hg.f,e,t),e[t])}},cB=Math.max,fB=Math.min,wn=function(e,t){var r=Yi(e);return r<0?cB(r+t,0):fB(r,t)},Pd=function(e){return function(t,r,n){var i,o=er(t),a=Wr(o),s=wn(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},zg={includes:Pd(!0),indexOf:Pd(!1)},dB=zg.indexOf,kd=U([].push),Wg=function(e,t){var r,n=er(e),i=0,o=[];for(r in n)!Ce(Ta,r)&&Ce(n,r)&&kd(o,r);for(;t.length>i;)Ce(n,r=t[i++])&&(~dB(o,r)||kd(o,r));return o},sa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hB=sa.concat("length","prototype"),Ti={f:Object.getOwnPropertyNames||function(e){return Wg(e,hB)}},qg={f:Object.getOwnPropertySymbols},pB=U([].concat),gB=zr("Reflect","ownKeys")||function(e){var t=Ti.f(be(e)),r=qg.f;return r?pB(t,r(e)):t},vB=function(e,t){for(var r=gB(t),n=lt.f,i=Zi.f,o=0;o<r.length;o++){var a=r[o];Ce(e,a)||n(e,a,i(t,a))}},mB=/#|\.prototype\./,Qi=function(e,t){var r=DB[yB(e)];return r==bB||r!=CB&&(ie(t)?ee(t):!!t)},yB=Qi.normalize=function(e){return String(e).replace(mB,".").toLowerCase()},DB=Qi.data={},CB=Qi.NATIVE="N",bB=Qi.POLYFILL="P",ji=Qi,wB=Zi.f,me=function(e,t){var r,n,i,o,a,s=e.target,u=e.global,l=e.stat;if(r=u?P:l?P[s]||jl(s,{}):(P[s]||{}).prototype)for(n in t){if(o=t[n],i=e.noTargetGet?(a=wB(r,n))&&a.value:r[n],!ji(u?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;vB(o,i)}(e.sham||i&&i.sham)&&st(o,"sham",!0),qe(r,n,o,e)}},hn=Object.keys||function(e){return Wg(e,sa)},EB=ee(function(){hn(1)});me({target:"Object",stat:!0,forced:EB},{keys:function(e){return hn(Qt(e))}});var BB=P.String,ae=function(e){if(ja(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return BB(e)},Hl=function(){var e=be(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},AB=_n.PROPER,Iu=RegExp.prototype,Vg=Iu.toString,FB=U(Hl),xB=ee(function(){return Vg.call({source:"a",flags:"b"})!="/a/b"}),OB=AB&&Vg.name!="toString";(xB||OB)&&qe(RegExp.prototype,"toString",function(){var e=be(this),t=ae(e.source),r=e.flags;return"/"+t+"/"+ae(r===void 0&&Nr(Iu,e)&&!("flags"in Iu)?FB(e):r)},{unsafe:!0});var vo,SB=xe?Object.defineProperties:function(e,t){be(e);for(var r,n=er(t),i=hn(t),o=i.length,a=0;o>a;)lt.f(e,r=i[a++],n[r]);return e},Uu=zr("document","documentElement"),Kg=Il("IE_PROTO"),_s=function(){},Gg=function(e){return"<script>"+e+"<\/script>"},Td=function(e){e.write(Gg("")),e.close();var t=e.parentWindow.Object;return e=null,t},ko=function(){try{vo=new ActiveXObject("htmlfile")}catch{}var e,t;ko=typeof document<"u"?document.domain&&vo?Td(vo):((t=ki("iframe")).style.display="none",Uu.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(Gg("document.F=Object")),e.close(),e.F):Td(vo);for(var r=sa.length;r--;)delete ko.prototype[sa[r]];return ko()};Ta[Kg]=!0;var $a=Object.create||function(e,t){var r;return e!==null?(_s.prototype=be(e),r=new _s,_s.prototype=null,r[Kg]=e):r=ko(),t===void 0?r:SB(r,t)},Hu=ye("unscopables"),zu=Array.prototype;zu[Hu]==null&<.f(zu,Hu,{configurable:!0,value:$a(null)});var Ei=function(e){zu[Hu][e]=!0},_B=zg.includes;me({target:"Array",proto:!0},{includes:function(e){return _B(this,e,arguments.length>1?arguments[1]:void 0)}}),Ei("includes");var PB=ye("match"),zl=function(e){var t;return le(e)&&((t=e[PB])!==void 0?!!t:ut(e)=="RegExp")},kB=P.TypeError,Wl=function(e){if(zl(e))throw kB("The method doesn't accept regular expressions");return e},TB=ye("match"),ql=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[TB]=!1,"/./"[e](t)}catch{}}return!1},jB=U("".indexOf);me({target:"String",proto:!0,forced:!ql("includes")},{includes:function(e){return!!~jB(ae(rt(this)),ae(Wl(e)),arguments.length>1?arguments[1]:void 0)}});var jd,RB=/"/g,NB=U("".replace);me({target:"String",proto:!0,forced:(jd="anchor",ee(function(){var e=""[jd]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",r="name",n=e,i=ae(rt(this)),o="<"+t,r!==""&&(o+=" "+r+'="'+NB(ae(n),RB,""")+'"'),o+">"+i+"</"+t+">";var t,r,n,i,o}});var Wu=function(e,t,r){var n,i;be(e);try{if(!(n=$r(e,"return"))){if(t==="throw")throw r;return r}n=Z(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return be(n),r},$B=function(e,t,r,n){try{return n?t(be(r)[0],r[1]):t(r)}catch(i){Wu(e,"throw",i)}},En={},LB=ye("iterator"),MB=Array.prototype,Jg=function(e){return e!==void 0&&(En.Array===e||MB[LB]===e)},Ri=function(e,t,r){var n=Ml(t);n in e?lt.f(e,n,Pa(0,r)):e[n]=r},IB=ye("iterator"),Vl=function(e){if(e!=null)return $r(e,IB)||$r(e,"@@iterator")||En[ja(e)]},UB=P.TypeError,Xg=function(e,t){var r=arguments.length<2?Vl(e):t;if(Yt(r))return be(Z(r,e));throw UB(_a(e)+" is not iterable")},Rd=P.Array,Yg=ye("iterator"),Zg=!1;try{var HB=0,Nd={next:function(){return{done:!!HB++}},return:function(){Zg=!0}};Nd[Yg]=function(){return this},Array.from(Nd,function(){throw 2})}catch{}var Kl=function(e,t){if(!Zg)return!1;var r=!1;try{var n={};n[Yg]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},zB=!Kl(function(e){Array.from(e)});me({target:"Array",stat:!0,forced:zB},{from:function(e){var t=Qt(e),r=Na(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=Lr(i,n>2?arguments[2]:void 0));var a,s,u,l,f,c,d=Vl(t),p=0;if(!d||this==Rd&&Jg(d))for(a=Wr(t),s=r?new this(a):Rd(a);a>p;p++)c=o?i(t[p],p):t[p],Ri(s,p,c);else for(f=(l=Xg(t,d)).next,s=r?new this:[];!(u=Z(f,l)).done;p++)c=o?$B(l,i,[u.value,p],!0):u.value,Ri(s,p,c);return s.length=p,s}});var Pr,$d,Ld,WB=U("".charAt),Md=U("".charCodeAt),qB=U("".slice),VB=function(e){return function(t,r){var n,i,o=ae(rt(t)),a=Yi(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=Md(o,a))<55296||n>56319||a+1===s||(i=Md(o,a+1))<56320||i>57343?e?WB(o,a):n:e?qB(o,a,a+2):i-56320+(n-55296<<10)+65536}},Qg={charAt:VB(!0)},KB=!ee(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Id=Il("IE_PROTO"),qu=P.Object,GB=qu.prototype,ua=KB?qu.getPrototypeOf:function(e){var t=Qt(e);if(Ce(t,Id))return t[Id];var r=t.constructor;return ie(r)&&t instanceof r?r.prototype:t instanceof qu?GB:null},Vu=ye("iterator"),ev=!1;[].keys&&("next"in(Ld=[].keys())?($d=ua(ua(Ld)))!==Object.prototype&&(Pr=$d):ev=!0);var JB=Pr==null||ee(function(){var e={};return Pr[Vu].call(e)!==e});JB&&(Pr={}),ie(Pr[Vu])||qe(Pr,Vu,function(){return this});var Gl={IteratorPrototype:Pr,BUGGY_SAFARI_ITERATORS:ev},XB=lt.f,Ud=ye("toStringTag"),la=function(e,t,r){e&&!Ce(e=r?e:e.prototype,Ud)&&XB(e,Ud,{configurable:!0,value:t})},YB=Gl.IteratorPrototype,ZB=function(){return this},QB=P.String,eA=P.TypeError,Bn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=U(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return be(n),function(o){if(typeof o=="object"||ie(o))return o;throw eA("Can't set "+QB(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),tA=_n.PROPER,rA=_n.CONFIGURABLE,Hd=Gl.IteratorPrototype,mo=Gl.BUGGY_SAFARI_ITERATORS,ii=ye("iterator"),nA=function(){return this},Jl=function(e,t,r,n,i,o,a){(function(D,C,b,A){var E=C+" Iterator";D.prototype=$a(YB,{next:Pa(1,b)}),la(D,E,!1),En[E]=ZB})(r,t,n);var s,u,l,f=function(D){if(D===i&&g)return g;if(!mo&&D in p)return p[D];switch(D){case"keys":case"values":case"entries":return function(){return new r(this,D)}}return function(){return new r(this)}},c=t+" Iterator",d=!1,p=e.prototype,h=p[ii]||p["@@iterator"]||i&&p[i],g=!mo&&h||f(i),v=t=="Array"&&p.entries||h;if(v&&(s=ua(v.call(new e)))!==Object.prototype&&s.next&&(ua(s)!==Hd&&(Bn?Bn(s,Hd):ie(s[ii])||qe(s,ii,nA)),la(s,c,!0)),tA&&i=="values"&&h&&h.name!=="values"&&(rA?st(p,"name","values"):(d=!0,g=function(){return Z(h,this)})),i)if(u={values:f("values"),keys:o?g:f("keys"),entries:f("entries")},a)for(l in u)(mo||d||!(l in p))&&qe(p,l,u[l]);else me({target:t,proto:!0,forced:mo||d},u);return p[ii]!==g&&qe(p,ii,g,{name:i}),En[t]=g,u},iA=Qg.charAt,oA=je.set,aA=je.getterFor("String Iterator");Jl(String,"String",function(e){oA(this,{type:"String Iterator",string:ae(e),index:0})},function(){var e,t=aA(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=iA(r,n),t.index+=e.length,{value:e,done:!1})});var Ps,sA=Zi.f,zd=U("".endsWith),uA=U("".slice),lA=Math.min,tv=ql("endsWith"),cA=!(tv||(Ps=sA(String.prototype,"endsWith"),!Ps||Ps.writable));me({target:"String",proto:!0,forced:!cA&&!tv},{endsWith:function(e){var t=ae(rt(this));Wl(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=r===void 0?n:lA(Pn(r),n),o=ae(e);return zd?zd(t,o,i):uA(t,i-o.length,i)===o}});var fA=U([].join),dA=Ra!=Object,hA=Ig("join",",");me({target:"Array",proto:!0,forced:dA||!hA},{join:function(e){return fA(er(this),e===void 0?",":e)}});var pA=ye("species"),La=function(e){return Pi>=51||!ee(function(){var t=[];return(t.constructor={})[pA]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gA=kn.map,vA=La("map");me({target:"Array",proto:!0,forced:!vA},{map:function(e){return gA(this,e,arguments.length>1?arguments[1]:void 0)}});var Xl=P.RegExp,Ku=ee(function(){var e=Xl("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),mA=Ku||ee(function(){return!Xl("a","y").sticky}),Ma={BROKEN_CARET:Ku||ee(function(){var e=Xl("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:mA,UNSUPPORTED_Y:Ku},yA=P.RegExp,Yl=ee(function(){var e=yA(".","s");return!(e.dotAll&&e.exec(`
|
|
24
|
-
`)&&e.flags==="s")}),DA=P.RegExp,Zl=ee(function(){var e=DA("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),CA=je.get,bA=Rl("native-string-replace",String.prototype.replace),ca=RegExp.prototype.exec,Gu=ca,wA=U("".charAt),EA=U("".indexOf),BA=U("".replace),ks=U("".slice),Ts=function(){var e=/a/,t=/b*/g;return Z(ca,e,"a"),Z(ca,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),Wd=Ma.BROKEN_CARET,js=/()??/.exec("")[1]!==void 0;(Ts||js||Wd||Yl||Zl)&&(Gu=function(e){var t,r,n,i,o,a,s,u=this,l=CA(u),f=
|
|
25
|
-
`)&&(g="(?: "+g+")",D=" "+D,v++),r=new RegExp("^(?:"+g+")",h)),js&&(r=new RegExp("^"+g+"$(?!\\s)",h)),Ts&&(n=u.lastIndex),i=Z(ca,p?r:u,D),p?i?(i.input=ks(i.input,v),i[0]=ks(i[0],v),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Ts&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),js&&i&&i.length>1&&Z(bA,i[0],r,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=$a(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Ni=Gu;me({target:"RegExp",proto:!0,forced:/./.exec!==Ni},{exec:Ni});var Ql=Function.prototype,qd=Ql.apply,AA=Ql.bind,Vd=Ql.call,ec=typeof Reflect=="object"&&Reflect.apply||(AA?Vd.bind(qd):function(){return Vd.apply(qd,arguments)}),FA=ye("species"),Rs=RegExp.prototype,tc=function(e,t,r,n){var i=ye(e),o=!ee(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ee(function(){var l=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[FA]=function(){return f},f.flags="",f[i]=/./[i]),f.exec=function(){return l=!0,null},f[i](""),!l});if(!o||!a||r){var s=U(/./[i]),u=t(i,""[e],function(l,f,c,d,p){var h=U(l),g=f.exec;return g===Ni||g===Rs.exec?o&&!p?{done:!0,value:s(f,c,d)}:{done:!0,value:h(c,f,d)}:{done:!1}});qe(String.prototype,e,u[0]),qe(Rs,i,u[1])}n&&st(Rs[i],"sham",!0)},xA=Qg.charAt,rc=function(e,t,r){return t+(r?xA(e,t).length:1)},OA=Math.floor,Ns=U("".charAt),SA=U("".replace),$s=U("".slice),_A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,PA=/\$([$&'`]|\d{1,2})/g,kA=function(e,t,r,n,i,o){var a=r+e.length,s=n.length,u=PA;return i!==void 0&&(i=Qt(i),u=_A),SA(o,u,function(l,f){var c;switch(Ns(f,0)){case"$":return"$";case"&":return e;case"`":return $s(t,0,r);case"'":return $s(t,a);case"<":c=i[$s(f,1,-1)];break;default:var d=+f;if(d===0)return l;if(d>s){var p=OA(d/10);return p===0?l:p<=s?n[p-1]===void 0?Ns(f,1):n[p-1]+Ns(f,1):l}c=n[d-1]}return c===void 0?"":c})},TA=P.TypeError,$i=function(e,t){var r=e.exec;if(
|
|
23
|
+
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}`),n.type in I(this,_e)[_e]?I(this,_e)[_e][n.type].push(n):I(this,_e)[_e][n.type]=[n],n.install(),this}getPlugin(t){for(const r of Object.values(I(this,_e)[_e])){const n=r.find(i=>i.id===t);if(n!=null)return n}}[ig](t){return I(this,_e)[_e][t]}iteratePlugins(t){Object.values(I(this,_e)[_e]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const r=I(this,_e)[_e][t.type],n=r.findIndex(a=>a.id===t.id);n!==-1&&r.splice(n,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(t){let{reason:r}=t===void 0?{}:t;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:r}),I(this,Vn)[Vn](),this.iteratePlugins(n=>{this.removePlugin(n)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",I(this,at)[at]),window.removeEventListener("offline",I(this,at)[at]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,r,n){r===void 0&&(r="info"),n===void 0&&(n=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:r,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(t,r){const{logger:n}=this.opts;switch(r){case"error":n.error(t);break;case"warning":n.warn(t);break;default:n.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?I(this,Bt)[Bt](t):(I(this,xr)[xr](t),Promise.reject(new Error("Nonexistent upload")))}[og](){return I(this,Et)[Et](...arguments)}addResultData(t,r){if(!I(this,ys)[ys](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:n}=this.getState(),i={...n[t],result:{...n[t].result,...r}};this.setState({currentUploads:{...n,[t]:i}})}upload(){var t;(t=I(this,_e)[_e].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:r}=this.getState();const n=this.opts.onBeforeUpload(r);return n===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(n&&typeof n=="object"&&(r=n,this.setState({files:r})),Promise.resolve().then(()=>I(this,ot)[ot].validateMinNumberOfFiles(r)).catch(i=>{throw I(this,Je)[Je](i),i}).then(()=>{if(!I(this,vs)[vs](r))throw new fn.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(i=>{throw i}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(u=>u.fileIDs),a=[];Object.keys(r).forEach(u=>{const l=this.getFile(u);!l.progress.uploadStarted&&o.indexOf(u)===-1&&a.push(l.id)});const s=I(this,Et)[Et](a);return I(this,Bt)[Bt](s)}).catch(i=>{throw this.emit("error",i),this.log(i,"error"),i}))}}function Ab(e,t){const{message:r,details:n=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:r,details:n},"error",this.opts.infoTimeout),this.log(`${r} ${n}`.trim(),"error")}function Fb(e){const{missingFields:t,error:r}=I(this,ot)[ot].getMissingRequiredMetaFields(e);return t.length>0?(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(r.message),this.emit("restriction-failed",e,r),!1):!0}function xb(e){let t=!0;for(const r of Object.values(e))I(this,Si)[Si](r)||(t=!1);return t}function Ob(e){const{allowNewUpload:t}=this.getState();if(t===!1){const r=new fn.RestrictionError(this.i18n("noMoreFilesAllowed"));throw I(this,Je)[Je](r,e),r}}function Sb(e,t){const r=yb(t),n=wb(r,t),i=Db(n).extension,o=!!t.isRemote,a=Cb({...t,type:r});if(this.checkIfFileAlreadyExists(a)){const c=new fn.RestrictionError(this.i18n("noDuplicates",{fileName:n}));throw I(this,Je)[Je](c,t),c}const s=t.meta||{};s.name=n,s.type=r;const u=Number.isFinite(t.data.size)?t.data.size:null;let l={source:t.source||"",id:a,name:n,extension:i||"",meta:{...this.getState().meta,...s},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:u,uploadComplete:!1,uploadStarted:null},size:u,isRemote:o,remote:t.remote||"",preview:t.preview};const f=this.opts.onBeforeFileAdded(l,e);if(f===!1){const c=new fn.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,c),c}else typeof f=="object"&&f!==null&&(l=f);try{const c=Object.keys(e).map(d=>e[d]);I(this,ot)[ot].validate(l,c)}catch(c){throw I(this,Je)[Je](c,l),c}return l}function _b(){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 Pb(){const e=(t,r,n)=>{let i=t.message||"Unknown error";t.details&&(i+=` ${t.details}`),this.setState({error:i}),r!=null&&r.id in this.getState().files&&this.setFileState(r.id,{error:i,response:n})};this.on("error",e),this.on("upload-error",(t,r,n)=>{if(e(r,t,n),typeof r=="object"&&r.message){const i=new Error(r.message);i.details=r.message,r.details&&(i.details+=` ${r.details}`),i.message=this.i18n("failedToUpload",{file:t==null?void 0:t.name}),I(this,Je)[Je](i)}else I(this,Je)[Je](r)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0: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,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const n=this.getFile(t.id).progress;this.setFileState(t.id,{progress:{...n,postprocess:I(this,_t)[_t].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:r,uploadURL:r.uploadURL,isPaused:!1}),t.size==null&&this.setFileState(t.id,{size:r.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,preprocess:r}})}),this.on("preprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.preprocess,this.setState({files:r})}),this.on("postprocess-progress",(t,r)=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}this.setFileState(t.id,{progress:{...this.getState().files[t.id].progress,postprocess:r}})}),this.on("postprocess-complete",t=>{if(t==null||!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t==null?void 0:t.id}`);return}const r={...this.getState().files};r[t.id]={...r[t.id],progress:{...r[t.id].progress}},delete r[t.id].progress.postprocess,this.setState({files:r})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",t=>{t&&I(this,Si)[Si](t)}),typeof window<"u"&&window.addEventListener&&(window.addEventListener("online",I(this,at)[at]),window.addEventListener("offline",I(this,at)[at]),setTimeout(I(this,at)[at],3e3))}function kb(e,t){t===void 0&&(t={});const{forceAllowNewUpload:r=!1}=t,{allowNewUpload:n,currentUploads:i}=this.getState();if(!n&&!r)throw new Error("Cannot create a new upload: already uploading.");const o=(0,db.nanoid)();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 Tb(e){const{currentUploads:t}=this.getState();return t[e]}function jb(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function Rb(e){let{currentUploads:t}=this.getState(),r=t[e];const n=r.step||0,i=[...I(this,wr)[wr],...I(this,Er)[Er],...I(this,_t)[_t]];try{for(let a=n;a<i.length&&r;a++){const s=i[a],u={...r,step:a};this.setState({currentUploads:{...t,[e]:u}}),await s(u.fileIDs,e),t=this.getState().currentUploads,r=t[e]}}catch(a){throw I(this,xr)[xr](e),a}if(r){r.fileIDs.forEach(l=>{const f=this.getFile(l);f&&f.progress.postprocess&&this.emit("postprocess-complete",f)});const a=r.fileIDs.map(l=>this.getFile(l)),s=a.filter(l=>!l.error),u=a.filter(l=>l.error);await this.addResultData(e,{successful:s,failed:u,uploadID:e}),t=this.getState().currentUploads,r=t[e]}let o;return r&&(o=r.result,this.emit("complete",o),I(this,xr)[xr](e)),o==null&&this.log(`Not setting result for an upload that has been removed: ${e}`),o}ag.VERSION=Eb.version;var nd=ag,qi,de,sg,ug,Br,id,lg,cg,fg,Ol,xu,Ou,dg,_i={},hg=[],Nb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Vi=Array.isArray;function dt(e,t){for(var r in t)e[r]=t[r];return e}function Sl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Su(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?qi.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Di(e,a,n,i,null)}function Di(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++sg,__i:-1,__u:0};return i==null&&de.vnode!=null&&de.vnode(o),o}function $b(){return{current:null}}function Ki(e){return e.children}function Ci(e,t){this.props=e,this.context=t}function Cn(e,t){if(t==null)return e.__?Cn(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Cn(e):null}function pg(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return pg(e)}}function _u(e){(!e.__d&&(e.__d=!0)&&Br.push(e)&&!ea.__r++||id!=de.debounceRendering)&&((id=de.debounceRendering)||lg)(ea)}function ea(){for(var e,t,r,n,i,o,a,s=1;Br.length;)Br.length>s&&Br.sort(cg),e=Br.shift(),s=Br.length,e.__d&&(r=void 0,n=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=dt({},n)).__v=n.__v+1,de.vnode&&de.vnode(r),_l(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,i??Cn(n),!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,yg(o,r,a),n.__e=n.__=null,r.__e!=i&&pg(r)));ea.__r=0}function gg(e,t,r,n,i,o,a,s,u,l,f){var c,d,p,h,g,v,D,C=n&&n.__k||hg,b=t.length;for(u=Lb(r,t,C,u,b),c=0;c<b;c++)(p=r.__k[c])!=null&&(d=p.__i==-1?_i:C[p.__i]||_i,p.__i=c,v=_l(e,p,d,i,o,a,s,u,l,f),h=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Pl(d.ref,null,p),f.push(p.ref,p.__c||h,p)),g==null&&h!=null&&(g=h),(D=!!(4&p.__u))||d.__k===p.__k?u=vg(p,u,e,D):typeof p.type=="function"&&v!==void 0?u=v:h&&(u=h.nextSibling),p.__u&=-7);return r.__e=g,u}function Lb(e,t,r,n,i){var o,a,s,u,l,f=r.length,c=f,d=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(u=o+d,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Di(null,a,null,null,null):Vi(a)?Di(Ki,{children:a},null,null,null):a.constructor==null&&a.__b>0?Di(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(l=a.__i=Mb(a,r,u,c))!=-1&&(c--,(s=r[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>f?d--:i<f&&d++),typeof a.type!="function"&&(a.__u|=4)):l!=u&&(l==u-1?d--:l==u+1?d++:(l>u?d--:d++,a.__u|=4))):e.__k[o]=null;if(c)for(o=0;o<f;o++)(s=r[o])!=null&&!(2&s.__u)&&(s.__e==n&&(n=Cn(s)),Cg(s,s));return n}function vg(e,t,r,n){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=vg(i[o],t,r,n));return t}e.__e!=t&&(n&&(t&&e.type&&!t.parentNode&&(t=Cn(e)),r.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function mg(e,t){return t=t||[],e==null||typeof e=="boolean"||(Vi(e)?e.some(function(r){mg(r,t)}):t.push(e)),t}function Mb(e,t,r,n){var i,o,a,s=e.key,u=e.type,l=t[r],f=l!=null&&(2&l.__u)==0;if(l===null&&e.key==null||f&&s==l.key&&u==l.type)return r;if(n>(f?1:0)){for(i=r-1,o=r+1;i>=0||o<t.length;)if((l=t[a=i>=0?i--:o++])!=null&&!(2&l.__u)&&s==l.key&&u==l.type)return a}return-1}function od(e,t,r){t[0]=="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Nb.test(t)?r:r+"px"}function ho(e,t,r,n,i){var o,a;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||od(e.style,t,"");if(r)for(t in r)n&&r[t]==n[t]||od(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(fg,"$1")),a=t.toLowerCase(),t=a in e||t=="onFocusOut"||t=="onFocusIn"?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.u=n.u:(r.u=Ol,e.addEventListener(t,o?Ou:xu,o)):e.removeEventListener(t,o?Ou:xu,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function ad(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.t==null)t.t=Ol++;else if(t.t<r.u)return;return r(de.event?de.event(t):t)}}}function _l(e,t,r,n,i,o,a,s,u,l){var f,c,d,p,h,g,v,D,C,b,A,E,x,_,T,k,M,R=t.type;if(t.constructor!=null)return null;128&r.__u&&(u=!!(32&r.__u),o=[s=t.__e=r.__e]),(f=de.__b)&&f(t);e:if(typeof R=="function")try{if(D=t.props,C="prototype"in R&&R.prototype.render,b=(f=R.contextType)&&n[f.__c],A=f?b?b.props.value:f.__:n,r.__c?v=(c=t.__c=r.__c).__=c.__E:(C?t.__c=c=new R(D,A):(t.__c=c=new Ci(D,A),c.constructor=R,c.render=Ub),b&&b.sub(c),c.props=D,c.state||(c.state={}),c.context=A,c.__n=n,d=c.__d=!0,c.__h=[],c._sb=[]),C&&c.__s==null&&(c.__s=c.state),C&&R.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=dt({},c.__s)),dt(c.__s,R.getDerivedStateFromProps(D,c.__s))),p=c.props,h=c.state,c.__v=t,d)C&&R.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),C&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(C&&R.getDerivedStateFromProps==null&&D!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(D,A),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(D,c.__s,A)===!1||t.__v==r.__v){for(t.__v!=r.__v&&(c.props=D,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(S){S&&(S.__=t)}),E=0;E<c._sb.length;E++)c.__h.push(c._sb[E]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(D,c.__s,A),C&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,h,g)})}if(c.context=A,c.props=D,c.__P=e,c.__e=!1,x=de.__r,_=0,C){for(c.state=c.__s,c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),T=0;T<c._sb.length;T++)c.__h.push(c._sb[T]);c._sb=[]}else do c.__d=!1,x&&x(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++_<25);c.state=c.__s,c.getChildContext!=null&&(n=dt(dt({},n),c.getChildContext())),C&&!d&&c.getSnapshotBeforeUpdate!=null&&(g=c.getSnapshotBeforeUpdate(p,h)),k=f,f!=null&&f.type===Ki&&f.key==null&&(k=Dg(f.props.children)),s=gg(e,Vi(k)?k:[k],t,r,n,i,o,a,s,u,l),c.base=t.__e,t.__u&=-161,c.__h.length&&a.push(c),v&&(c.__E=c.__=null)}catch(S){if(t.__v=null,u||o!=null)if(S.then){for(t.__u|=u?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else{for(M=o.length;M--;)Sl(o[M]);Pu(t)}else t.__e=r.__e,t.__k=r.__k,S.then||Pu(t);de.__e(S,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=Ib(r.__e,t,r,n,i,o,a,u,l);return(f=de.diffed)&&f(t),128&t.__u?void 0:s}function Pu(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Pu)}function yg(e,t,r){for(var n=0;n<r.length;n++)Pl(r[n],r[++n],r[++n]);de.__c&&de.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){de.__e(o,i.__v)}})}function Dg(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Vi(e)?e.map(Dg):dt({},e)}function Ib(e,t,r,n,i,o,a,s,u){var l,f,c,d,p,h,g,v=r.props,D=t.props,C=t.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(l=0;l<o.length;l++)if((p=o[l])&&"setAttribute"in p==!!C&&(C?p.localName==C:p.nodeType==3)){e=p,o[l]=null;break}}if(e==null){if(C==null)return document.createTextNode(D);e=document.createElementNS(i,C,D.is&&D),s&&(de.__m&&de.__m(t,o),s=!1),o=null}if(C==null)v===D||s&&e.data==D||(e.data=D);else{if(o=o&&qi.call(e.childNodes),v=r.props||_i,!s&&o!=null)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],l!="children"){if(l=="dangerouslySetInnerHTML")c=p;else if(!(l in D)){if(l=="value"&&"defaultValue"in D||l=="checked"&&"defaultChecked"in D)continue;ho(e,l,null,p,i)}}for(l in D)p=D[l],l=="children"?d=p:l=="dangerouslySetInnerHTML"?f=p:l=="value"?h=p:l=="checked"?g=p:s&&typeof p!="function"||v[l]===p||ho(e,l,p,v[l],i);if(f)s||c&&(f.__html==c.__html||f.__html==e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(c&&(e.innerHTML=""),gg(t.type=="template"?e.content:e,Vi(d)?d:[d],t,r,n,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Cn(r,0),s,u),o!=null)for(l=o.length;l--;)Sl(o[l]);s||(l="value",C=="progress"&&h==null?e.removeAttribute("value"):h!=null&&(h!==e[l]||C=="progress"&&!h||C=="option"&&h!=v[l])&&ho(e,l,h,v[l],i),l="checked",g!=null&&g!=e[l]&&ho(e,l,g,v[l],i))}return e}function Pl(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){de.__e(i,r)}}function Cg(e,t,r){var n,i;if(de.unmount&&de.unmount(e),(n=e.ref)&&(n.current&&n.current!=e.__e||Pl(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){de.__e(o,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Cg(n[i],t,r||typeof e.type!="function");r||Sl(e.__e),e.__c=e.__=e.__e=void 0}function Ub(e,t,r){return this.constructor(e,r)}function bg(e,t,r){var n,i,o,a;t==document&&(t=document.documentElement),de.__&&de.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],_l(t,e=(!n&&r||t).__k=Su(Ki,null,[e]),i||_i,_i,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?qi.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),yg(o,e,a)}function wg(e,t){bg(e,t,wg)}function Hb(e,t,r){var n,i,o,a,s=dt({},e.props);for(o in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o]===void 0&&a!=null?a[o]:t[o];return arguments.length>2&&(s.children=arguments.length>3?qi.call(arguments,2):r),Di(e.type,s,n||e.key,i||e.ref,null)}function zb(e){function t(r){var n,i;return this.getChildContext||(n=new Set,(i={})[t.__c]=this,this.getChildContext=function(){return i},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(o){this.props.value!=o.value&&n.forEach(function(a){a.__e=!0,_u(a)})},this.sub=function(o){n.add(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){n&&n.delete(o),a&&a.call(o)}}),r.children}return t.__c="__cC"+dg++,t.__=e,t.Provider=t.__l=(t.Consumer=function(r,n){return r.children(n)}).contextType=t,t}qi=hg.slice,de={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},sg=0,ug=function(e){return e!=null&&e.constructor==null},Ci.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=dt({},this.state),typeof e=="function"&&(e=e(dt({},r),this.props)),e&&dt(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),_u(this))},Ci.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_u(this))},Ci.prototype.render=Ki,Br=[],lg=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,cg=function(e,t){return e.__v.__b-t.__v.__b},ea.__r=0,fg=/(PointerCapture)$|Capture$/i,Ol=0,xu=ad(!1),Ou=ad(!0),dg=0;const Wb=Object.freeze(Object.defineProperty({__proto__:null,Component:Ci,Fragment:Ki,cloneElement:Hb,createContext:zb,createElement:Su,createRef:$b,h:Su,hydrate:wg,get isValidElement(){return ug},get options(){return de},render:bg,toChildArray:mg},Symbol.toStringTag,{value:"Module"})),qb=ae.a(Wb);function Vb(e){return(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE}var Kb=Vb;const Gb=Kb;function Jb(e,t){return t===void 0&&(t=document),typeof e=="string"?t.querySelector(e):Gb(e)?e:null}var Xb=Jb;function Yb(e){for(var t;e&&!e.dir;)e=e.parentNode;return(t=e)==null?void 0:t.dir}var Zb=Yb;const Qb=eg;let ew=class{constructor(t,r){r===void 0&&(r={}),this.uppy=t,this.opts=r}getPluginState(){const{plugins:t}=this.uppy.getState();return t[this.id]||{}}setPluginState(t){const{plugins:r}=this.uppy.getState();this.uppy.setState({plugins:{...r,[this.id]:{...r[this.id],...t}}})}setOptions(t){this.opts={...this.opts,...t},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new Qb([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(){}};var ta=ew,sd=qb;function ud(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var tw=0;function rw(e){return"__private_"+tw+++"_"+e}const nw=Xb,iw=Zb,ow=ta;function aw(e){let t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return r=i,t||(t=Promise.resolve().then(()=>(t=null,e(...r)))),t}}var Xn=rw("updateUI");class kl extends ow{constructor(){super(...arguments),Object.defineProperty(this,Xn,{writable:!0,value:void 0})}mount(t,r){const n=r.id,i=nw(t);if(i){this.isTargetDOMEl=!0;const s=document.createElement("div");return s.classList.add("uppy-Root"),ud(this,Xn)[Xn]=aw(u=>{this.uppy.getPlugin(this.id)&&((0,sd.render)(this.render(u),s),this.afterUpdate())}),this.uppy.log(`Installing ${n} to a DOM element '${t}'`),this.opts.replaceTargetContent&&(i.innerHTML=""),(0,sd.render)(this.render(this.uppy.getState()),s),this.el=s,i.appendChild(s),s.dir=this.opts.direction||iw(s)||"ltr",this.onMount(),this.el}let o;if(typeof t=="object"&&t instanceof kl)o=t;else if(typeof t=="function"){const s=t;this.uppy.iteratePlugins(u=>{u instanceof s&&(o=u)})}if(o)return this.uppy.log(`Installing ${n} to ${o.id}`),this.parent=o,this.el=o.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${n}`);let a=`Invalid target option given to ${n}.`;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 <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(a)}update(t){if(this.el!=null){var r,n;(r=(n=ud(this,Xn))[Xn])==null||r.call(n,t)}}unmount(){if(this.isTargetDOMEl){var t;(t=this.el)==null||t.remove()}this.onUnmount()}onMount(){}onUnmount(){}}var ld=kl;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return r.debugLogger}});var r=Rr;e.exports=nd;const n=ld;t.UIPlugin=n;const i=ta;t.BasePlugin=i;const o=nd;t.Uppy=o;const a=ld,s=ta;o.Uppy=o,o.UIPlugin=a,o.BasePlugin=s,o.debugLogger=r.debugLogger})(Yf,Yf.exports);var ht={};let sw=class extends Error{constructor(t,r){r===void 0&&(r=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=t,this.isNetworkError=!0,this.request=r}};var Eg=sw;const uw=Eg;function lw(){return fetch(...arguments).catch(e=>{throw e.name==="AbortError"?e:new uw(e)})}var cw=lw;const fw=Qp;let dw=class extends Error{constructor(t,r){r===void 0&&(r={}),super(t),this.cause=r.cause,this.cause&&fw(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}};var hw=dw;let pw=class extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}};var gw=pw;let Bg;function We(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var vw=0;function Oa(e){return"__private_"+vw+++"_"+e}const Ds=cw,mw=hw,yw=gw,Dw={version:"2.2.2"};function Cw(e){return e.replace(/\/$/,"")}async function Cs(e){if(e.status===401)throw new yw;const t=e.json();if(e.status<200||e.status>300){let r=`Failed request with status: ${e.status}. ${e.statusText}`;try{const n=await t;r=n.message?`${r} message: ${n.message}`:r,r=n.requestId?`${r} request-Id: ${n.requestId}`:r}finally{throw new Error(r)}}return t}var At=Oa("companionHeaders"),lr=Oa("getPostResponseFunc"),St=Oa("getUrl"),cr=Oa("errorHandler");Bg=Symbol.for("uppy test: getCompanionHeaders");let ra=class Ag{constructor(t,r){Object.defineProperty(this,cr,{value:ww}),Object.defineProperty(this,St,{value:bw}),Object.defineProperty(this,At,{writable:!0,value:void 0}),Object.defineProperty(this,lr,{writable:!0,value:n=>i=>n?i:this.onReceiveResponse(i)}),this.uppy=t,this.opts=r,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,We(this,At)[At]=r==null?void 0:r.companionHeaders}setCompanionHeaders(t){We(this,At)[At]=t}[Bg](){return We(this,At)[At]}get hostname(){const{companion:t}=this.uppy.getState(),r=this.opts.companionUrl;return Cw(t&&t[r]?t[r]:r)}headers(){return Promise.resolve({...Ag.defaultHeaders,...We(this,At)[At]})}onReceiveResponse(t){const n=this.uppy.getState().companion||{},i=this.opts.companionUrl,{headers:o}=t;return o.has("i-am")&&o.get("i-am")!==n[i]&&this.uppy.setState({companion:{...n,[i]:o.get("i-am")}}),t}preflight(t){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(We(this,St)[St](t),{method:"OPTIONS"}).then(r=>(r.headers.has("access-control-allow-headers")&&(this.allowedHeaders=r.headers.get("access-control-allow-headers").split(",").map(n=>n.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(r=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${r}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(t){return Promise.all([this.preflight(t),this.headers()]).then(r=>{let[n,i]=r;return Object.keys(i).forEach(o=>{n.includes(o.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${o}`),delete i[o])}),i})}get(t,r){const n="get";return this.preflightAndHeaders(t).then(i=>Ds(We(this,St)[St](t),{method:n,headers:i,credentials:this.opts.companionCookiesRule||"same-origin"})).then(We(this,lr)[lr](r)).then(Cs).catch(We(this,cr)[cr](n,t))}post(t,r,n){const i="post";return this.preflightAndHeaders(t).then(o=>Ds(We(this,St)[St](t),{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(r)})).then(We(this,lr)[lr](n)).then(Cs).catch(We(this,cr)[cr](i,t))}delete(t,r,n){const i="delete";return this.preflightAndHeaders(t).then(o=>Ds(`${this.hostname}/${t}`,{method:i,headers:o,credentials:this.opts.companionCookiesRule||"same-origin",body:r?JSON.stringify(r):null})).then(We(this,lr)[lr](n)).then(Cs).catch(We(this,cr)[cr](i,t))}};function bw(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function ww(e,t){return r=>{var n;return(n=r)!=null&&n.isAuthError||(r=new mw(`Could not ${e} ${We(this,St)[St](t)}`,{cause:r})),Promise.reject(r)}}ra.VERSION=Dw.version;ra.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${ra.VERSION}`};var Tl=ra,Gi={};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.getItem=Bw;Gi.removeItem=Aw;Gi.setItem=Ew;function Ew(e,t){return new Promise(r=>{localStorage.setItem(e,t),r()})}function Bw(e){return Promise.resolve(localStorage.getItem(e))}function Aw(e){return new Promise(t=>{localStorage.removeItem(e),t()})}var Fw=Gi;const xw=Tl,Ow=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class Sw extends xw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||Ow(this.id),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(t=>{let[r,n]=t;const i={};return n&&(i["uppy-auth-token"]=n),this.companionKeysParams&&(i["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...r,...i}})}onReceiveResponse(t){t=super.onReceiveResponse(t);const r=this.uppy.getPlugin(this.pluginId),i=r.getPluginState().authenticated?t.status!==401:t.status<400;return r.setPluginState({authenticated:i}),t}setAuthToken(t){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,t)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(t){t===void 0&&(t={});const r=new URLSearchParams(t);return this.preAuthToken&&r.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${r}`}fileUrl(t){return`${this.hostname}/${this.id}/get/${t}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const t=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=t.token}catch(t){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${t}`,"warning")}}list(t){return this.get(`${this.id}/list/${t||""}`)}logout(){return this.get(`${this.id}/logout`).then(t=>Promise.all([t,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(t=>{let[r]=t;return r})}static initPlugin(t,r,n){if(t.type="acquirer",t.files=[],n&&(t.opts={...n,...r}),r.serverUrl||r.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(r.companionAllowedHosts){const i=r.companionAllowedHosts;if(typeof i!="string"&&!Array.isArray(i)&&!(i instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=i}else/^(?!https?:\/\/).*$/i.test(r.companionUrl)?t.opts.companionAllowedHosts=`https://${r.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(r.companionUrl).origin;t.storage=t.opts.storage||Fw}}var _w=Sw;const Pw=Tl,kw=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ");class Tw extends Pw{constructor(t,r){super(t,r),this.provider=r.provider,this.id=this.provider,this.name=this.opts.name||kw(this.id),this.pluginId=this.opts.pluginId}fileUrl(t){return`${this.hostname}/search/${this.id}/get/${t}`}search(t,r){return this.get(`search/${this.id}/list?q=${encodeURIComponent(t)}${r?`&${r}`:""}`)}}var jw=Tw;let Fg,xg;function we(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Rw=0;function Ji(e){return"__private_"+Rw+++"_"+e}const Nw=tg;var Ft=Ji("queued"),fr=Ji("emitter"),it=Ji("isOpen"),Ne=Ji("socket"),bs=Ji("handleMessage");Fg=Symbol.for("uppy test: getSocket");xg=Symbol.for("uppy test: getQueued");class $w{constructor(t){Object.defineProperty(this,Ft,{writable:!0,value:[]}),Object.defineProperty(this,fr,{writable:!0,value:Nw()}),Object.defineProperty(this,it,{writable:!0,value:!1}),Object.defineProperty(this,Ne,{writable:!0,value:void 0}),Object.defineProperty(this,bs,{writable:!0,value:r=>{try{const n=JSON.parse(r.data);this.emit(n.action,n.payload)}catch(n){console.log(n)}}}),this.opts=t,(!t||t.autoOpen!==!1)&&this.open()}get isOpen(){return we(this,it)[it]}[Fg](){return we(this,Ne)[Ne]}[xg](){return we(this,Ft)[Ft]}open(){we(this,Ne)[Ne]=new WebSocket(this.opts.target),we(this,Ne)[Ne].onopen=()=>{for(we(this,it)[it]=!0;we(this,Ft)[Ft].length>0&&we(this,it)[it];){const t=we(this,Ft)[Ft].shift();this.send(t.action,t.payload)}},we(this,Ne)[Ne].onclose=()=>{we(this,it)[it]=!1},we(this,Ne)[Ne].onmessage=we(this,bs)[bs]}close(){var t;(t=we(this,Ne)[Ne])==null||t.close()}send(t,r){if(!we(this,it)[it]){we(this,Ft)[Ft].push({action:t,payload:r});return}we(this,Ne)[Ne].send(JSON.stringify({action:t,payload:r}))}on(t,r){we(this,fr)[fr].on(t,r)}emit(t,r){we(this,fr)[fr].emit(t,r)}once(t,r){we(this,fr)[fr].once(t,r)}}var Lw=$w;Object.defineProperty(ht,"__esModule",{value:!0});ht.Socket=ht.SearchProvider=ht.RequestClient=ht.Provider=void 0;const Mw=Tl;ht.RequestClient=Mw;const Iw=_w;ht.Provider=Iw;const Uw=jw;ht.SearchProvider=Uw;const Hw=Lw;ht.Socket=Hw;var bn={};Object.defineProperty(bn,"__esModule",{value:!0});bn.internalRateLimitedQueue=bn.RateLimitedQueue=void 0;function q(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var zw=0;function Ve(e){return"__private_"+zw+++"_"+e}function Ww(){return new Error("Cancelled")}var Ge=Ve("activeRequests"),Le=Ve("queuedHandlers"),Ke=Ve("paused"),dr=Ve("pauseTimer"),$e=Ve("downLimit"),hr=Ve("upperLimit"),xt=Ve("rateLimitingTimer"),bi=Ve("call"),Pt=Ve("queueNext"),ku=Ve("next"),ws=Ve("queue"),Tu=Ve("dequeue"),Es=Ve("resume"),pr=Ve("increaseLimit");class qw{constructor(t){Object.defineProperty(this,Tu,{value:Xw}),Object.defineProperty(this,ws,{value:Jw}),Object.defineProperty(this,ku,{value:Gw}),Object.defineProperty(this,Pt,{value:Kw}),Object.defineProperty(this,bi,{value:Vw}),Object.defineProperty(this,Ge,{writable:!0,value:0}),Object.defineProperty(this,Le,{writable:!0,value:[]}),Object.defineProperty(this,Ke,{writable:!0,value:!1}),Object.defineProperty(this,dr,{writable:!0,value:void 0}),Object.defineProperty(this,$e,{writable:!0,value:1}),Object.defineProperty(this,hr,{writable:!0,value:void 0}),Object.defineProperty(this,xt,{writable:!0,value:void 0}),Object.defineProperty(this,Es,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,pr,{writable:!0,value:()=>{if(q(this,Ke)[Ke]){q(this,xt)[xt]=setTimeout(q(this,pr)[pr],0);return}q(this,$e)[$e]=this.limit,this.limit=Math.ceil((q(this,hr)[hr]+q(this,$e)[$e])/2);for(let r=q(this,$e)[$e];r<=this.limit;r++)q(this,Pt)[Pt]();q(this,hr)[hr]-q(this,$e)[$e]>3?q(this,xt)[xt]=setTimeout(q(this,pr)[pr],2e3):q(this,$e)[$e]=Math.floor(q(this,$e)[$e]/2)}}),typeof t!="number"||t===0?this.limit=1/0:this.limit=t}run(t,r){return!q(this,Ke)[Ke]&&q(this,Ge)[Ge]<this.limit?q(this,bi)[bi](t):q(this,ws)[ws](t,r)}wrapPromiseFunction(t,r){var n=this;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];let s;const u=new Promise((l,f)=>{s=n.run(()=>{let c,d;try{d=Promise.resolve(t(...o))}catch(p){d=Promise.reject(p)}return d.then(p=>{c?f(c):(s.done(),l(p))},p=>{c?f(c):(s.done(),f(p))}),()=>{c=Ww()}},r)});return u.abort=()=>{s.abort()},u}}resume(){q(this,Ke)[Ke]=!1,clearTimeout(q(this,dr)[dr]);for(let t=0;t<this.limit;t++)q(this,Pt)[Pt]()}pause(t){t===void 0&&(t=null),q(this,Ke)[Ke]=!0,clearTimeout(q(this,dr)[dr]),t!=null&&(q(this,dr)[dr]=setTimeout(q(this,Es)[Es],t))}rateLimit(t){clearTimeout(q(this,xt)[xt]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(q(this,hr)[hr]=this.limit-1,this.limit=q(this,$e)[$e],q(this,xt)[xt]=setTimeout(q(this,pr)[pr],t))}get isPaused(){return q(this,Ke)[Ke]}}bn.RateLimitedQueue=qw;function Vw(e){q(this,Ge)[Ge]+=1;let t=!1,r;try{r=e()}catch(n){throw q(this,Ge)[Ge]-=1,n}return{abort:()=>{t||(t=!0,q(this,Ge)[Ge]-=1,r(),q(this,Pt)[Pt]())},done:()=>{t||(t=!0,q(this,Ge)[Ge]-=1,q(this,Pt)[Pt]())}}}function Kw(){queueMicrotask(()=>q(this,ku)[ku]())}function Gw(){if(q(this,Ke)[Ke]||q(this,Ge)[Ge]>=this.limit||q(this,Le)[Le].length===0)return;const e=q(this,Le)[Le].shift(),t=q(this,bi)[bi](e.fn);e.abort=t.abort,e.done=t.done}function Jw(e,t){t===void 0&&(t={});const r={fn:e,priority:t.priority||0,abort:()=>{q(this,Tu)[Tu](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},n=q(this,Le)[Le].findIndex(i=>r.priority>i.priority);return n===-1?q(this,Le)[Le].push(r):q(this,Le)[Le].splice(n,0,r),r}function Xw(e){const t=q(this,Le)[Le].indexOf(e);t!==-1&&q(this,Le)[Le].splice(t,1)}const Yw=Symbol("__queue");bn.internalRateLimitedQueue=Yw;const Zw=ae.l;function Qw(e,t,r){const{progress:n,bytesUploaded:i,bytesTotal:o}=t;n&&(e.uppy.log(`Upload progress: ${n}`),e.uppy.emit("upload-progress",r,{uploader:e,bytesUploaded:i,bytesTotal:o}))}var eE=Zw(Qw,300,{leading:!0,trailing:!0});function tE(e){const r=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${r}`}var rE=tE;function nE(e){const t=[],r=[];function n(a){t.push(a)}function i(a){r.push(a)}return Promise.all(e.map(a=>a.then(n,i))).then(()=>({successful:t,failed:r}))}var iE=nE;function Yn(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var oE=0;function Og(e){return"__private_"+oE+++"_"+e}var gr=Og("emitter"),Zn=Og("events");let aE=class{constructor(t){Object.defineProperty(this,gr,{writable:!0,value:void 0}),Object.defineProperty(this,Zn,{writable:!0,value:[]}),Yn(this,gr)[gr]=t}on(t,r){return Yn(this,Zn)[Zn].push([t,r]),Yn(this,gr)[gr].on(t,r)}remove(){for(const[t,r]of Yn(this,Zn)[Zn].splice(0))Yn(this,gr)[gr].off(t,r)}};var sE=aE;function Qe(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var uE=0;function Sa(e){return"__private_"+uE+++"_"+e}var Ot=Sa("aliveTimer"),vr=Sa("isDone"),Qn=Sa("onTimedOut"),mr=Sa("timeout");let lE=class{constructor(t,r){Object.defineProperty(this,Ot,{writable:!0,value:void 0}),Object.defineProperty(this,vr,{writable:!0,value:!1}),Object.defineProperty(this,Qn,{writable:!0,value:void 0}),Object.defineProperty(this,mr,{writable:!0,value:void 0}),Qe(this,mr)[mr]=t,Qe(this,Qn)[Qn]=r}progress(){Qe(this,vr)[vr]||Qe(this,mr)[mr]>0&&(clearTimeout(Qe(this,Ot)[Ot]),Qe(this,Ot)[Ot]=setTimeout(Qe(this,Qn)[Qn],Qe(this,mr)[mr]))}done(){Qe(this,vr)[vr]||(clearTimeout(Qe(this,Ot)[Ot]),Qe(this,Ot)[Ot]=null,Qe(this,vr)[vr]=!0)}};var cE=lE;function fE(e){return e?e.readyState!==0&&e.readyState!==4||e.status===0:!1}var dE=fE,hE={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}},pE=Yp,Bs=ht,po=bn;const gE=ta,vE=eE,mE=rE,yE=iE,cd=sE,fd=cE,Sg=Eg,_g=dE,DE={version:"2.1.3"},CE=hE;function dd(e,t){let r=t;return r||(r=new Error("Upload error")),typeof r=="string"&&(r=new Error(r)),r instanceof Error||(r=Object.assign(new Error("Upload error"),{data:r})),_g(e)?(r=new Sg(r,e),r):(r.request=e,r)}function hd(e){return e.data.slice(0,e.data.size,e.meta.type)}class bE extends gE{constructor(t,r){super(t,r),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=CE;const n={formData:!0,fieldName:r.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:30*1e3,limit:5,withCredentials:!1,responseType:"",getResponseData(i){let o={};try{o=JSON.parse(i)}catch(a){t.log(a)}return o},getResponseError(i,o){let a=new Error("Upload error");return _g(o)&&(a=new Sg(a,o)),a},validateStatus(i){return i>=200&&i<300}};if(this.opts={...n,...r},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),po.internalRateLimitedQueue in this.opts?this.requests=this.opts[po.internalRateLimitedQueue]:this.requests=new po.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(t){const r=this.uppy.getState().xhrUpload,{headers:n}=this.opts,i={...this.opts,...r||{},...t.xhrUpload||{},headers:{}};return typeof n=="function"?i.headers=n(t):Object.assign(i.headers,this.opts.headers),r&&Object.assign(i.headers,r.headers),t.xhrUpload&&Object.assign(i.headers,t.xhrUpload.headers),i}addMetadata(t,r,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(r)).forEach(o=>{t.append(o,r[o])})}createFormDataUpload(t,r){const n=new FormData;this.addMetadata(n,t.meta,r);const i=hd(t);return t.name?n.append(r.fieldName,i,t.meta.name):n.append(r.fieldName,i),n}createBundledUpload(t,r){const n=new FormData,{meta:i}=this.uppy.getState();return this.addMetadata(n,i,r),t.forEach(o=>{const a=this.getOptions(o),s=hd(o);o.name?n.append(a.fieldName,s,o.name):n.append(a.fieldName,s)}),n}upload(t,r,n){const i=this.getOptions(t);return this.uppy.log(`uploading ${r} of ${n}`),new Promise((o,a)=>{this.uppy.emit("upload-started",t);const s=i.formData?this.createFormDataUpload(t,i):t.data,u=new XMLHttpRequest;this.uploaderEvents[t.id]=new cd(this.uppy);let l;const f=new fd(i.timeout,()=>{u.abort(),l.done();const d=new Error(this.i18n("timedOut",{seconds:Math.ceil(i.timeout/1e3)}));this.uppy.emit("upload-error",t,d),a(d)}),c=(0,pE.nanoid)();u.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${c} started`)}),u.upload.addEventListener("progress",d=>{this.uppy.log(`[XHRUpload] ${c} progress: ${d.loaded} / ${d.total}`),f.progress(),d.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:d.loaded,bytesTotal:d.total})}),u.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${c} finished`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i.validateStatus(u.status,u.responseText,u)){const g=i.getResponseData(u.responseText,u),v=g[i.responseUrlFieldName],D={status:u.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),v&&this.uppy.log(`Download ${t.name} from ${v}`),o(t)}const d=i.getResponseData(u.responseText,u),p=dd(u,i.getResponseError(u.responseText,u)),h={status:u.status,body:d};return this.uppy.emit("upload-error",t,p,h),a(p)}),u.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${c} errored`),f.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const d=dd(u,i.getResponseError(u.responseText,u));return this.uppy.emit("upload-error",t,d),a(d)}),u.open(i.method.toUpperCase(),i.endpoint,!0),u.withCredentials=i.withCredentials,i.responseType!==""&&(u.responseType=i.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const d=this.getOptions(t);return Object.keys(d.headers).forEach(p=>{u.setRequestHeader(p,d.headers[p])}),u.send(s),()=>{f.done(),u.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),a(new Error("File removed"))}),this.onCancelAll(t.id,d=>{let{reason:p}=d;p==="user"&&l.abort(),a(new Error("Upload cancelled"))})})}uploadRemote(t){const r=this.getOptions(t);return new Promise((n,i)=>{this.uppy.emit("upload-started",t);const o={};(Array.isArray(r.metaFields)?r.metaFields:Object.keys(t.meta)).forEach(l=>{o[l]=t.meta[l]});const s=t.remote.providerOptions.provider?Bs.Provider:Bs.RequestClient;new s(this.uppy,t.remote.providerOptions).post(t.remote.url,{...t.remote.body,endpoint:r.endpoint,size:t.data.size,fieldname:r.fieldName,metadata:o,httpMethod:r.method,useFormData:r.formData,headers:r.headers}).then(l=>{const{token:f}=l,c=mE(t.remote.companionUrl),d=new Bs.Socket({target:`${c}/api/${f}`,autoOpen:!1});this.uploaderEvents[t.id]=new cd(this.uppy);let p;this.onFileRemove(t.id,()=>{d.send("cancel",{}),p.abort(),n(`upload ${t.id} was removed`)}),this.onCancelAll(t.id,function(h){let{reason:g}=h===void 0?{}:h;g==="user"&&(d.send("cancel",{}),p.abort()),n(`upload ${t.id} was canceled`)}),this.onRetry(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(t.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",h=>vE(this,h,t)),d.on("success",h=>{const g=r.getResponseData(h.response.responseText,h.response),v=g[r.responseUrlFieldName],D={status:h.response.status,body:g,uploadURL:v};return this.uppy.emit("upload-success",t,D),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),n()}),d.on("error",h=>{const g=h.response,v=g?r.getResponseError(g.responseText,g):Object.assign(new Error(h.error.message),{cause:h.error});this.uppy.emit("upload-error",t,v),p.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),i(v)}),p=this.requests.run(()=>(d.open(),t.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(l=>{this.uppy.emit("upload-error",t,l),i(l)})})}uploadBundle(t){return new Promise((r,n)=>{const{endpoint:i}=this.opts,{method:o}=this.opts,a=this.uppy.getState().xhrUpload,s=this.createBundledUpload(t,{...this.opts,...a||{}}),u=new XMLHttpRequest,l=c=>{t.forEach(d=>{this.uppy.emit("upload-error",d,c)})},f=new fd(this.opts.timeout,()=>{u.abort();const c=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(c),n(c)});u.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),f.progress()}),u.upload.addEventListener("progress",c=>{f.progress(),c.lengthComputable&&t.forEach(d=>{this.uppy.emit("upload-progress",d,{uploader:this,bytesUploaded:c.loaded/c.total*d.size,bytesTotal:d.size})})}),u.addEventListener("load",c=>{if(f.done(),this.opts.validateStatus(c.target.status,u.responseText,u)){const p=this.opts.getResponseData(u.responseText,u),h={status:c.target.status,body:p};return t.forEach(g=>{this.uppy.emit("upload-success",g,h)}),r()}const d=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return d.request=u,l(d),n(d)}),u.addEventListener("error",()=>{f.done();const c=this.opts.getResponseError(u.responseText,u)||new Error("Upload error");return l(c),n(c)}),this.uppy.on("cancel-all",function(c){let{reason:d}=c===void 0?{}:c;d==="user"&&(f.done(),u.abort())}),u.open(o.toUpperCase(),i,!0),u.withCredentials=this.opts.withCredentials,this.opts.responseType!==""&&(u.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(c=>{u.setRequestHeader(c,this.opts.headers[c])}),u.send(s),t.forEach(c=>{this.uppy.emit("upload-started",c)})})}uploadFiles(t){const r=t.map((n,i)=>{const o=parseInt(i,10)+1,a=t.length;return n.error?Promise.reject(new Error(n.error)):n.isRemote?this.uploadRemote(n,o,a):this.upload(n,o,a)});return yE(r)}onFileRemove(t,r){this.uploaderEvents[t].on("file-removed",n=>{t===n.id&&r(n.id)})}onRetry(t,r){this.uploaderEvents[t].on("upload-retry",n=>{t===n&&r()})}onRetryAll(t,r){this.uploaderEvents[t].on("retry-all",()=>{this.uppy.getFile(t)&&r()})}onCancelAll(t,r){var n=this;this.uploaderEvents[t].on("cancel-all",function(){n.uppy.getFile(t)&&r(...arguments)})}handleUpload(t){if(t.length===0)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();this.opts.limit===0&&!this.opts[po.internalRateLimitedQueue]&&this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const r=t.map(n=>this.uppy.getFile(n));if(this.opts.bundle){if(r.some(i=>i.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if(typeof this.opts.headers=="function")throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(r)}return this.uploadFiles(r).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:t}=this.uppy.getState();this.uppy.setState({capabilities:{...t,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}bE.VERSION=DE.version;var pd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xi(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ht,Po,go=function(e){return e&&e.Math==Math&&e},P=go(typeof globalThis=="object"&&globalThis)||go(typeof window=="object"&&window)||go(typeof self=="object"&&self)||go(typeof pd=="object"&&pd)||function(){return this}()||Function("return this")(),wE=Object.defineProperty,jl=function(e,t){try{wE(P,e,{value:t,configurable:!0,writable:!0})}catch{P[e]=t}return t},Kt=P["__core-js_shared__"]||jl("__core-js_shared__",{}),Rl=Xi(function(e){(e.exports=function(t,r){return Kt[t]||(Kt[t]=r!==void 0?r:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Pg=Function.prototype,ju=Pg.bind,Ru=Pg.call,EE=ju&&ju.bind(Ru),U=ju?function(e){return e&&EE(Ru,e)}:function(e){return e&&function(){return Ru.apply(e,arguments)}},BE=P.TypeError,rt=function(e){if(e==null)throw BE("Can't call method on "+e);return e},AE=P.Object,Qt=function(e){return AE(rt(e))},FE=U({}.hasOwnProperty),Ce=Object.hasOwn||function(e,t){return FE(Qt(e),t)},xE=0,OE=Math.random(),SE=U(1 .toString),Nl=function(e){return"Symbol("+(e===void 0?"":e)+")_"+SE(++xE+OE,36)},re=function(e){return typeof e=="function"},_E=function(e){return re(e)?e:void 0},zr=function(e,t){return arguments.length<2?_E(P[e]):P[e]&&P[e][t]},dn=zr("navigator","userAgent")||"",gd=P.process,vd=P.Deno,md=gd&&gd.versions||vd&&vd.version,yd=md&&md.v8;yd&&(Po=(Ht=yd.split("."))[0]>0&&Ht[0]<4?1:+(Ht[0]+Ht[1])),!Po&&dn&&(!(Ht=dn.match(/Edge\/(\d+)/))||Ht[1]>=74)&&(Ht=dn.match(/Chrome\/(\d+)/))&&(Po=+Ht[1]);var Pi=Po,ee=function(e){try{return!!e()}catch{return!0}},Nu=!!Object.getOwnPropertySymbols&&!ee(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pi&&Pi<41}),$l=Nu&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ei=Rl("wks"),_r=P.Symbol,Dd=_r&&_r.for,PE=$l?_r:_r&&_r.withoutSetter||Nl,ye=function(e){if(!Ce(ei,e)||!Nu&&typeof ei[e]!="string"){var t="Symbol."+e;Nu&&Ce(_r,e)?ei[e]=_r[e]:ei[e]=$l&&Dd?Dd(t):PE(t)}return ei[e]},kg={};kg[ye("toStringTag")]="z";var Ll=String(kg)==="[object z]",xe=!ee(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),ue=function(e){return typeof e=="object"?e!==null:re(e)},$u=P.document,kE=ue($u)&&ue($u.createElement),ki=function(e){return kE?$u.createElement(e):{}},Tg=!xe&&!ee(function(){return Object.defineProperty(ki("div"),"a",{get:function(){return 7}}).a!=7}),TE=P.String,jE=P.TypeError,be=function(e){if(ue(e))return e;throw jE(TE(e)+" is not an object")},ti=Function.prototype.call,Z=ti.bind?ti.bind(ti):function(){return ti.apply(ti,arguments)},Nr=U({}.isPrototypeOf),RE=P.Object,Lu=$l?function(e){return typeof e=="symbol"}:function(e){var t=zr("Symbol");return re(t)&&Nr(t.prototype,RE(e))},NE=P.String,_a=function(e){try{return NE(e)}catch{return"Object"}},$E=P.TypeError,Yt=function(e){if(re(e))return e;throw $E(_a(e)+" is not a function")},$r=function(e,t){var r=e[t];return r==null?void 0:Yt(r)},LE=P.TypeError,ME=P.TypeError,IE=ye("toPrimitive"),UE=function(e,t){if(!ue(e)||Lu(e))return e;var r,n=$r(e,IE);if(n){if(r=Z(n,e,t),!ue(r)||Lu(r))return r;throw ME("Can't convert object to primitive value")}return function(i,o){var a,s;if(re(a=i.toString)&&!ue(s=Z(a,i))||re(a=i.valueOf)&&!ue(s=Z(a,i)))return s;throw LE("Can't convert object to primitive value")}(e)},Ml=function(e){var t=UE(e,"string");return Lu(t)?t:t+""},HE=P.TypeError,Cd=Object.defineProperty,lt={f:xe?Cd:function(e,t,r){if(be(e),t=Ml(t),be(r),Tg)try{return Cd(e,t,r)}catch{}if("get"in r||"set"in r)throw HE("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Pa=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},st=xe?function(e,t,r){return lt.f(e,t,Pa(1,r))}:function(e,t,r){return e[t]=r,e},zE=U(Function.toString);re(Kt.inspectSource)||(Kt.inspectSource=function(e){return zE(e)});var na,wi,ia,ka=Kt.inspectSource,bd=P.WeakMap,jg=re(bd)&&/native code/.test(ka(bd)),wd=Rl("keys"),Il=function(e){return wd[e]||(wd[e]=Nl(e))},Ta={},Mu=P.TypeError,WE=P.WeakMap;if(jg||Kt.state){var yr=Kt.state||(Kt.state=new WE),qE=U(yr.get),Ed=U(yr.has),VE=U(yr.set);na=function(e,t){if(Ed(yr,e))throw new Mu("Object already initialized");return t.facade=e,VE(yr,e,t),t},wi=function(e){return qE(yr,e)||{}},ia=function(e){return Ed(yr,e)}}else{var Zr=Il("state");Ta[Zr]=!0,na=function(e,t){if(Ce(e,Zr))throw new Mu("Object already initialized");return t.facade=e,st(e,Zr,t),t},wi=function(e){return Ce(e,Zr)?e[Zr]:{}},ia=function(e){return Ce(e,Zr)}}var je={set:na,get:wi,has:ia,enforce:function(e){return ia(e)?wi(e):na(e,{})},getterFor:function(e){return function(t){var r;if(!ue(t)||(r=wi(t)).type!==e)throw Mu("Incompatible receiver, "+e+" required");return r}}},Rg=Function.prototype,KE=xe&&Object.getOwnPropertyDescriptor,As=Ce(Rg,"name"),_n={EXISTS:As,PROPER:As&&(function(){}).name==="something",CONFIGURABLE:As&&(!xe||xe&&KE(Rg,"name").configurable)},qe=Xi(function(e){var t=_n.CONFIGURABLE,r=je.get,n=je.enforce,i=String(String).split("String");(e.exports=function(o,a,s,u){var l,f=!!u&&!!u.unsafe,c=!!u&&!!u.enumerable,d=!!u&&!!u.noTargetGet,p=u&&u.name!==void 0?u.name:a;re(s)&&(String(p).slice(0,7)==="Symbol("&&(p="["+String(p).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Ce(s,"name")||t&&s.name!==p)&&st(s,"name",p),(l=n(s)).source||(l.source=i.join(typeof p=="string"?p:""))),o!==P?(f?!d&&o[a]&&(c=!0):delete o[a],c?o[a]=s:st(o,a,s)):c?o[a]=s:jl(a,s)})(Function.prototype,"toString",function(){return re(this)&&r(this).source||ka(this)})}),GE=U({}.toString),JE=U("".slice),ut=function(e){return JE(GE(e),8,-1)},XE=ye("toStringTag"),YE=P.Object,ZE=ut(function(){return arguments}())=="Arguments",ja=Ll?ut:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=function(i,o){try{return i[o]}catch{}}(t=YE(e),XE))=="string"?r:ZE?ut(t):(n=ut(t))=="Object"&&re(t.callee)?"Arguments":n},QE=Ll?{}.toString:function(){return"[object "+ja(this)+"]"};Ll||qe(Object.prototype,"toString",QE,{unsafe:!0});var oa={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Fs=ki("span").classList,Bd=Fs&&Fs.constructor&&Fs.constructor.prototype,Ng=Bd===Object.prototype?void 0:Bd,Ad=U(U.bind),Lr=function(e,t){return Yt(e),t===void 0?e:Ad?Ad(e,t):function(){return e.apply(t,arguments)}},xs=P.Object,eB=U("".split),Ra=ee(function(){return!xs("z").propertyIsEnumerable(0)})?function(e){return ut(e)=="String"?eB(e,""):xs(e)}:xs,tB=Math.ceil,rB=Math.floor,Yi=function(e){var t=+e;return t!=t||t===0?0:(t>0?rB:tB)(t)},nB=Math.min,Pn=function(e){return e>0?nB(Yi(e),9007199254740991):0},Wr=function(e){return Pn(e.length)},aa=Array.isArray||function(e){return ut(e)=="Array"},$g=function(){},iB=[],Lg=zr("Reflect","construct"),Ul=/^\s*(?:class|function)\b/,oB=U(Ul.exec),aB=!Ul.exec($g),ri=function(e){if(!re(e))return!1;try{return Lg($g,iB,e),!0}catch{return!1}},Na=!Lg||ee(function(){var e;return ri(ri.call)||!ri(Object)||!ri(function(){e=!0})||e})?function(e){if(!re(e))return!1;switch(ja(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return aB||!!oB(Ul,ka(e))}:ri,sB=ye("species"),Fd=P.Array,Mg=function(e,t){return new(function(r){var n;return aa(r)&&(n=r.constructor,(Na(n)&&(n===Fd||aa(n.prototype))||ue(n)&&(n=n[sB])===null)&&(n=void 0)),n===void 0?Fd:n}(e))(t===0?0:t)},xd=U([].push),ni=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,s=e==5||o;return function(u,l,f,c){for(var d,p,h=Qt(u),g=Ra(h),v=Lr(l,f),D=Wr(g),C=0,b=c||Mg,A=t?b(u,D):r||a?b(u,0):void 0;D>C;C++)if((s||C in g)&&(p=v(d=g[C],C,h),e))if(t)A[C]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return C;case 2:xd(A,d)}else switch(e){case 4:return!1;case 7:xd(A,d)}return o?-1:n||i?i:A}},kn={forEach:ni(0),map:ni(1),filter:ni(2),find:ni(5),findIndex:ni(6)},Ig=function(e,t){var r=[][e];return!!r&&ee(function(){r.call(null,t||function(){throw 1},1)})},uB=kn.forEach,Os=Ig("forEach")?[].forEach:function(e){return uB(this,e,arguments.length>1?arguments[1]:void 0)},Ug=function(e){if(e&&e.forEach!==Os)try{st(e,"forEach",Os)}catch{e.forEach=Os}};for(var Ss in oa)oa[Ss]&&Ug(P[Ss]&&P[Ss].prototype);Ug(Ng);var Od={}.propertyIsEnumerable,Sd=Object.getOwnPropertyDescriptor,lB=Sd&&!Od.call({1:2},1)?function(e){var t=Sd(this,e);return!!t&&t.enumerable}:Od,Hg={f:lB},er=function(e){return Ra(rt(e))},_d=Object.getOwnPropertyDescriptor,Zi={f:xe?_d:function(e,t){if(e=er(e),t=Ml(t),Tg)try{return _d(e,t)}catch{}if(Ce(e,t))return Pa(!Z(Hg.f,e,t),e[t])}},cB=Math.max,fB=Math.min,wn=function(e,t){var r=Yi(e);return r<0?cB(r+t,0):fB(r,t)},Pd=function(e){return function(t,r,n){var i,o=er(t),a=Wr(o),s=wn(n,a);if(e&&r!=r){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===r)return e||s||0;return!e&&-1}},zg={includes:Pd(!0),indexOf:Pd(!1)},dB=zg.indexOf,kd=U([].push),Wg=function(e,t){var r,n=er(e),i=0,o=[];for(r in n)!Ce(Ta,r)&&Ce(n,r)&&kd(o,r);for(;t.length>i;)Ce(n,r=t[i++])&&(~dB(o,r)||kd(o,r));return o},sa=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hB=sa.concat("length","prototype"),Ti={f:Object.getOwnPropertyNames||function(e){return Wg(e,hB)}},qg={f:Object.getOwnPropertySymbols},pB=U([].concat),gB=zr("Reflect","ownKeys")||function(e){var t=Ti.f(be(e)),r=qg.f;return r?pB(t,r(e)):t},vB=function(e,t){for(var r=gB(t),n=lt.f,i=Zi.f,o=0;o<r.length;o++){var a=r[o];Ce(e,a)||n(e,a,i(t,a))}},mB=/#|\.prototype\./,Qi=function(e,t){var r=DB[yB(e)];return r==bB||r!=CB&&(re(t)?ee(t):!!t)},yB=Qi.normalize=function(e){return String(e).replace(mB,".").toLowerCase()},DB=Qi.data={},CB=Qi.NATIVE="N",bB=Qi.POLYFILL="P",ji=Qi,wB=Zi.f,me=function(e,t){var r,n,i,o,a,s=e.target,u=e.global,l=e.stat;if(r=u?P:l?P[s]||jl(s,{}):(P[s]||{}).prototype)for(n in t){if(o=t[n],i=e.noTargetGet?(a=wB(r,n))&&a.value:r[n],!ji(u?n:s+(l?".":"#")+n,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;vB(o,i)}(e.sham||i&&i.sham)&&st(o,"sham",!0),qe(r,n,o,e)}},hn=Object.keys||function(e){return Wg(e,sa)},EB=ee(function(){hn(1)});me({target:"Object",stat:!0,forced:EB},{keys:function(e){return hn(Qt(e))}});var BB=P.String,ie=function(e){if(ja(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return BB(e)},Hl=function(){var e=be(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},AB=_n.PROPER,Iu=RegExp.prototype,Vg=Iu.toString,FB=U(Hl),xB=ee(function(){return Vg.call({source:"a",flags:"b"})!="/a/b"}),OB=AB&&Vg.name!="toString";(xB||OB)&&qe(RegExp.prototype,"toString",function(){var e=be(this),t=ie(e.source),r=e.flags;return"/"+t+"/"+ie(r===void 0&&Nr(Iu,e)&&!("flags"in Iu)?FB(e):r)},{unsafe:!0});var vo,SB=xe?Object.defineProperties:function(e,t){be(e);for(var r,n=er(t),i=hn(t),o=i.length,a=0;o>a;)lt.f(e,r=i[a++],n[r]);return e},Uu=zr("document","documentElement"),Kg=Il("IE_PROTO"),_s=function(){},Gg=function(e){return"<script>"+e+"<\/script>"},Td=function(e){e.write(Gg("")),e.close();var t=e.parentWindow.Object;return e=null,t},ko=function(){try{vo=new ActiveXObject("htmlfile")}catch{}var e,t;ko=typeof document<"u"?document.domain&&vo?Td(vo):((t=ki("iframe")).style.display="none",Uu.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(Gg("document.F=Object")),e.close(),e.F):Td(vo);for(var r=sa.length;r--;)delete ko.prototype[sa[r]];return ko()};Ta[Kg]=!0;var $a=Object.create||function(e,t){var r;return e!==null?(_s.prototype=be(e),r=new _s,_s.prototype=null,r[Kg]=e):r=ko(),t===void 0?r:SB(r,t)},Hu=ye("unscopables"),zu=Array.prototype;zu[Hu]==null&<.f(zu,Hu,{configurable:!0,value:$a(null)});var Ei=function(e){zu[Hu][e]=!0},_B=zg.includes;me({target:"Array",proto:!0},{includes:function(e){return _B(this,e,arguments.length>1?arguments[1]:void 0)}}),Ei("includes");var PB=ye("match"),zl=function(e){var t;return ue(e)&&((t=e[PB])!==void 0?!!t:ut(e)=="RegExp")},kB=P.TypeError,Wl=function(e){if(zl(e))throw kB("The method doesn't accept regular expressions");return e},TB=ye("match"),ql=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[TB]=!1,"/./"[e](t)}catch{}}return!1},jB=U("".indexOf);me({target:"String",proto:!0,forced:!ql("includes")},{includes:function(e){return!!~jB(ie(rt(this)),ie(Wl(e)),arguments.length>1?arguments[1]:void 0)}});var jd,RB=/"/g,NB=U("".replace);me({target:"String",proto:!0,forced:(jd="anchor",ee(function(){var e=""[jd]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",r="name",n=e,i=ie(rt(this)),o="<"+t,r!==""&&(o+=" "+r+'="'+NB(ie(n),RB,""")+'"'),o+">"+i+"</"+t+">";var t,r,n,i,o}});var Wu=function(e,t,r){var n,i;be(e);try{if(!(n=$r(e,"return"))){if(t==="throw")throw r;return r}n=Z(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return be(n),r},$B=function(e,t,r,n){try{return n?t(be(r)[0],r[1]):t(r)}catch(i){Wu(e,"throw",i)}},En={},LB=ye("iterator"),MB=Array.prototype,Jg=function(e){return e!==void 0&&(En.Array===e||MB[LB]===e)},Ri=function(e,t,r){var n=Ml(t);n in e?lt.f(e,n,Pa(0,r)):e[n]=r},IB=ye("iterator"),Vl=function(e){if(e!=null)return $r(e,IB)||$r(e,"@@iterator")||En[ja(e)]},UB=P.TypeError,Xg=function(e,t){var r=arguments.length<2?Vl(e):t;if(Yt(r))return be(Z(r,e));throw UB(_a(e)+" is not iterable")},Rd=P.Array,Yg=ye("iterator"),Zg=!1;try{var HB=0,Nd={next:function(){return{done:!!HB++}},return:function(){Zg=!0}};Nd[Yg]=function(){return this},Array.from(Nd,function(){throw 2})}catch{}var Kl=function(e,t){if(!Zg)return!1;var r=!1;try{var n={};n[Yg]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},zB=!Kl(function(e){Array.from(e)});me({target:"Array",stat:!0,forced:zB},{from:function(e){var t=Qt(e),r=Na(this),n=arguments.length,i=n>1?arguments[1]:void 0,o=i!==void 0;o&&(i=Lr(i,n>2?arguments[2]:void 0));var a,s,u,l,f,c,d=Vl(t),p=0;if(!d||this==Rd&&Jg(d))for(a=Wr(t),s=r?new this(a):Rd(a);a>p;p++)c=o?i(t[p],p):t[p],Ri(s,p,c);else for(f=(l=Xg(t,d)).next,s=r?new this:[];!(u=Z(f,l)).done;p++)c=o?$B(l,i,[u.value,p],!0):u.value,Ri(s,p,c);return s.length=p,s}});var Pr,$d,Ld,WB=U("".charAt),Md=U("".charCodeAt),qB=U("".slice),VB=function(e){return function(t,r){var n,i,o=ie(rt(t)),a=Yi(r),s=o.length;return a<0||a>=s?e?"":void 0:(n=Md(o,a))<55296||n>56319||a+1===s||(i=Md(o,a+1))<56320||i>57343?e?WB(o,a):n:e?qB(o,a,a+2):i-56320+(n-55296<<10)+65536}},Qg={charAt:VB(!0)},KB=!ee(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Id=Il("IE_PROTO"),qu=P.Object,GB=qu.prototype,ua=KB?qu.getPrototypeOf:function(e){var t=Qt(e);if(Ce(t,Id))return t[Id];var r=t.constructor;return re(r)&&t instanceof r?r.prototype:t instanceof qu?GB:null},Vu=ye("iterator"),ev=!1;[].keys&&("next"in(Ld=[].keys())?($d=ua(ua(Ld)))!==Object.prototype&&(Pr=$d):ev=!0);var JB=Pr==null||ee(function(){var e={};return Pr[Vu].call(e)!==e});JB&&(Pr={}),re(Pr[Vu])||qe(Pr,Vu,function(){return this});var Gl={IteratorPrototype:Pr,BUGGY_SAFARI_ITERATORS:ev},XB=lt.f,Ud=ye("toStringTag"),la=function(e,t,r){e&&!Ce(e=r?e:e.prototype,Ud)&&XB(e,Ud,{configurable:!0,value:t})},YB=Gl.IteratorPrototype,ZB=function(){return this},QB=P.String,eA=P.TypeError,Bn=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=U(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch{}return function(n,i){return be(n),function(o){if(typeof o=="object"||re(o))return o;throw eA("Can't set "+QB(o)+" as a prototype")}(i),t?e(n,i):n.__proto__=i,n}}():void 0),tA=_n.PROPER,rA=_n.CONFIGURABLE,Hd=Gl.IteratorPrototype,mo=Gl.BUGGY_SAFARI_ITERATORS,ii=ye("iterator"),nA=function(){return this},Jl=function(e,t,r,n,i,o,a){(function(D,C,b,A){var E=C+" Iterator";D.prototype=$a(YB,{next:Pa(1,b)}),la(D,E,!1),En[E]=ZB})(r,t,n);var s,u,l,f=function(D){if(D===i&&g)return g;if(!mo&&D in p)return p[D];switch(D){case"keys":case"values":case"entries":return function(){return new r(this,D)}}return function(){return new r(this)}},c=t+" Iterator",d=!1,p=e.prototype,h=p[ii]||p["@@iterator"]||i&&p[i],g=!mo&&h||f(i),v=t=="Array"&&p.entries||h;if(v&&(s=ua(v.call(new e)))!==Object.prototype&&s.next&&(ua(s)!==Hd&&(Bn?Bn(s,Hd):re(s[ii])||qe(s,ii,nA)),la(s,c,!0)),tA&&i=="values"&&h&&h.name!=="values"&&(rA?st(p,"name","values"):(d=!0,g=function(){return Z(h,this)})),i)if(u={values:f("values"),keys:o?g:f("keys"),entries:f("entries")},a)for(l in u)(mo||d||!(l in p))&&qe(p,l,u[l]);else me({target:t,proto:!0,forced:mo||d},u);return p[ii]!==g&&qe(p,ii,g,{name:i}),En[t]=g,u},iA=Qg.charAt,oA=je.set,aA=je.getterFor("String Iterator");Jl(String,"String",function(e){oA(this,{type:"String Iterator",string:ie(e),index:0})},function(){var e,t=aA(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=iA(r,n),t.index+=e.length,{value:e,done:!1})});var Ps,sA=Zi.f,zd=U("".endsWith),uA=U("".slice),lA=Math.min,tv=ql("endsWith"),cA=!(tv||(Ps=sA(String.prototype,"endsWith"),!Ps||Ps.writable));me({target:"String",proto:!0,forced:!cA&&!tv},{endsWith:function(e){var t=ie(rt(this));Wl(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=r===void 0?n:lA(Pn(r),n),o=ie(e);return zd?zd(t,o,i):uA(t,i-o.length,i)===o}});var fA=U([].join),dA=Ra!=Object,hA=Ig("join",",");me({target:"Array",proto:!0,forced:dA||!hA},{join:function(e){return fA(er(this),e===void 0?",":e)}});var pA=ye("species"),La=function(e){return Pi>=51||!ee(function(){var t=[];return(t.constructor={})[pA]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gA=kn.map,vA=La("map");me({target:"Array",proto:!0,forced:!vA},{map:function(e){return gA(this,e,arguments.length>1?arguments[1]:void 0)}});var Xl=P.RegExp,Ku=ee(function(){var e=Xl("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),mA=Ku||ee(function(){return!Xl("a","y").sticky}),Ma={BROKEN_CARET:Ku||ee(function(){var e=Xl("^r","gy");return e.lastIndex=2,e.exec("str")!=null}),MISSED_STICKY:mA,UNSUPPORTED_Y:Ku},yA=P.RegExp,Yl=ee(function(){var e=yA(".","s");return!(e.dotAll&&e.exec(`
|
|
24
|
+
`)&&e.flags==="s")}),DA=P.RegExp,Zl=ee(function(){var e=DA("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),CA=je.get,bA=Rl("native-string-replace",String.prototype.replace),ca=RegExp.prototype.exec,Gu=ca,wA=U("".charAt),EA=U("".indexOf),BA=U("".replace),ks=U("".slice),Ts=function(){var e=/a/,t=/b*/g;return Z(ca,e,"a"),Z(ca,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),Wd=Ma.BROKEN_CARET,js=/()??/.exec("")[1]!==void 0;(Ts||js||Wd||Yl||Zl)&&(Gu=function(e){var t,r,n,i,o,a,s,u=this,l=CA(u),f=ie(e),c=l.raw;if(c)return c.lastIndex=u.lastIndex,t=Z(Gu,c,f),u.lastIndex=c.lastIndex,t;var d=l.groups,p=Wd&&u.sticky,h=Z(Hl,u),g=u.source,v=0,D=f;if(p&&(h=BA(h,"y",""),EA(h,"g")===-1&&(h+="g"),D=ks(f,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&wA(f,u.lastIndex-1)!==`
|
|
25
|
+
`)&&(g="(?: "+g+")",D=" "+D,v++),r=new RegExp("^(?:"+g+")",h)),js&&(r=new RegExp("^"+g+"$(?!\\s)",h)),Ts&&(n=u.lastIndex),i=Z(ca,p?r:u,D),p?i?(i.input=ks(i.input,v),i[0]=ks(i[0],v),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Ts&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),js&&i&&i.length>1&&Z(bA,i[0],r,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=$a(null),o=0;o<d.length;o++)a[(s=d[o])[0]]=i[s[1]];return i});var Ni=Gu;me({target:"RegExp",proto:!0,forced:/./.exec!==Ni},{exec:Ni});var Ql=Function.prototype,qd=Ql.apply,AA=Ql.bind,Vd=Ql.call,ec=typeof Reflect=="object"&&Reflect.apply||(AA?Vd.bind(qd):function(){return Vd.apply(qd,arguments)}),FA=ye("species"),Rs=RegExp.prototype,tc=function(e,t,r,n){var i=ye(e),o=!ee(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ee(function(){var l=!1,f=/a/;return e==="split"&&((f={}).constructor={},f.constructor[FA]=function(){return f},f.flags="",f[i]=/./[i]),f.exec=function(){return l=!0,null},f[i](""),!l});if(!o||!a||r){var s=U(/./[i]),u=t(i,""[e],function(l,f,c,d,p){var h=U(l),g=f.exec;return g===Ni||g===Rs.exec?o&&!p?{done:!0,value:s(f,c,d)}:{done:!0,value:h(c,f,d)}:{done:!1}});qe(String.prototype,e,u[0]),qe(Rs,i,u[1])}n&&st(Rs[i],"sham",!0)},xA=Qg.charAt,rc=function(e,t,r){return t+(r?xA(e,t).length:1)},OA=Math.floor,Ns=U("".charAt),SA=U("".replace),$s=U("".slice),_A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,PA=/\$([$&'`]|\d{1,2})/g,kA=function(e,t,r,n,i,o){var a=r+e.length,s=n.length,u=PA;return i!==void 0&&(i=Qt(i),u=_A),SA(o,u,function(l,f){var c;switch(Ns(f,0)){case"$":return"$";case"&":return e;case"`":return $s(t,0,r);case"'":return $s(t,a);case"<":c=i[$s(f,1,-1)];break;default:var d=+f;if(d===0)return l;if(d>s){var p=OA(d/10);return p===0?l:p<=s?n[p-1]===void 0?Ns(f,1):n[p-1]+Ns(f,1):l}c=n[d-1]}return c===void 0?"":c})},TA=P.TypeError,$i=function(e,t){var r=e.exec;if(re(r)){var n=Z(r,e,t);return n!==null&&be(n),n}if(ut(e)==="RegExp")return Z(Ni,e,t);throw TA("RegExp#exec called on incompatible receiver")},Ju=ye("replace"),jA=Math.max,RA=Math.min,NA=U([].concat),Ls=U([].push),Kd=U("".indexOf),Gd=U("".slice),$A="a".replace(/./,"$0")==="$0",Jd=!!/./[Ju]&&/./[Ju]("a","$0")==="";tc("replace",function(e,t,r){var n=Jd?"$":"$0";return[function(i,o){var a=rt(this),s=i==null?void 0:$r(i,Ju);return s?Z(s,i,a,o):Z(t,ie(a),i,o)},function(i,o){var a=be(this),s=ie(i);if(typeof o=="string"&&Kd(o,n)===-1&&Kd(o,"$<")===-1){var u=r(t,a,s,o);if(u.done)return u.value}var l=re(o);l||(o=ie(o));var f=a.global;if(f){var c=a.unicode;a.lastIndex=0}for(var d=[];;){var p=$i(a,s);if(p===null||(Ls(d,p),!f))break;ie(p[0])===""&&(a.lastIndex=rc(s,Pn(a.lastIndex),c))}for(var h,g="",v=0,D=0;D<d.length;D++){for(var C=ie((p=d[D])[0]),b=jA(RA(Yi(p.index),s.length),0),A=[],E=1;E<p.length;E++)Ls(A,(h=p[E])===void 0?h:String(h));var x=p.groups;if(l){var _=NA([C],A,b,s);x!==void 0&&Ls(_,x);var T=ie(ec(o,void 0,_))}else T=kA(C,s,b,A,x,o);b>=v&&(g+=Gd(s,v,b)+T,v=b+C.length)}return g+Gd(s,v)}]},!!ee(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!$A||Jd);/*! *****************************************************************************
|
|
26
26
|
Copyright (c) Microsoft Corporation.
|
|
27
27
|
|
|
28
28
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -35,9 +35,9 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
35
35
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
36
36
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
37
37
|
PERFORMANCE OF THIS SOFTWARE.
|
|
38
|
-
***************************************************************************** */var Xu=function(e,t){return Xu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Xu(e,t)};function Tn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Xu(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var fa=function(){return fa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fa.apply(this,arguments)};function oi(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Be(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Xd(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}var LA=0,Yd=function(){this.id=""+LA++},MA=je.set,IA=je.getterFor("Array Iterator"),mi=Jl(Array,"Array",function(e,t){MA(this,{type:"Array Iterator",target:er(e),index:0,kind:t})},function(){var e=IA(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values");En.Arguments=En.Array,Ei("keys"),Ei("values"),Ei("entries");var An=function(e,t,r){for(var n in t)qe(e,n,t[n],r);return e},UA=P.Array,HA=Math.max,Yu=function(e,t,r){for(var n=Wr(e),i=wn(t,n),o=wn(r===void 0?n:r,n),a=UA(HA(o-i,0)),s=0;i<o;i++,s++)Ri(a,s,e[i]);return a.length=s,a},Zd=Ti.f,Qd=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zA={f:function(e){return Qd&&ut(e)=="Window"?function(t){try{return Zd(t)}catch{return Yu(Qd)}}(e):Zd(er(e))}},eh=ee(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),yo=Object.isExtensible,Or=ee(function(){yo(1)})||eh?function(e){return!!le(e)&&(!eh||ut(e)!="ArrayBuffer")&&(!yo||yo(e))}:yo,WA=!ee(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ia=Xi(function(e){var t=lt.f,r=!1,n=Nl("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=Ti.f,u=U([].splice),l={};l[n]=1,s(l).length&&(Ti.f=function(f){for(var c=s(f),d=0,p=c.length;d<p;d++)if(c[d]===n){u(c,d,1);break}return c},me({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zA.f}))},fastKey:function(s,u){if(!le(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!Ce(s,n)){if(!Or(s))return"F";if(!u)return"E";o(s)}return s[n].objectID},getWeakData:function(s,u){if(!Ce(s,n)){if(!Or(s))return!0;if(!u)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return WA&&r&&Or(s)&&!Ce(s,n)&&o(s),s}};Ta[n]=!0}),qA=P.TypeError,To=function(e,t){this.stopped=e,this.result=t},th=To.prototype,Li=function(e,t,r){var n,i,o,a,s,u,l,f=r&&r.that,c=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=Lr(t,f),g=function(D){return n&&Wu(n,"normal",D),new To(!0,D)},v=function(D){return c?(be(D),p?h(D[0],D[1],g):h(D[0],D[1])):p?h(D,g):h(D)};if(d)n=e;else{if(!(i=Vl(e)))throw qA(_a(e)+" is not iterable");if(Jg(i)){for(o=0,a=Wr(e);a>o;o++)if((s=v(e[o]))&&Nr(th,s))return s;return new To(!1)}n=Xg(e,i)}for(u=n.next;!(l=Z(u,n)).done;){try{s=v(l.value)}catch(D){Wu(n,"throw",D)}if(typeof s=="object"&&s&&Nr(th,s))return s}return new To(!1)},VA=P.TypeError,Ua=function(e,t){if(Nr(t,e))return e;throw VA("Incorrect invocation")},rv=function(e,t,r){var n,i;return Bn&&ie(n=t.constructor)&&n!==r&&le(i=n.prototype)&&i!==r.prototype&&Bn(e,i),e},nv=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=P[e],s=a&&a.prototype,u=a,l={},f=function(v){var D=U(s[v]);qe(s,v,v=="add"?function(C){return D(this,C===0?0:C),this}:v=="delete"?function(C){return!(i&&!le(C))&&D(this,C===0?0:C)}:v=="get"?function(C){return i&&!le(C)?void 0:D(this,C===0?0:C)}:v=="has"?function(C){return!(i&&!le(C))&&D(this,C===0?0:C)}:function(C,b){return D(this,C===0?0:C,b),this})};if(ji(e,!ie(a)||!(i||s.forEach&&!ee(function(){new a().entries().next()}))))u=r.getConstructor(t,e,n,o),Ia.enable();else if(ji(e,!0)){var c=new u,d=c[o](i?{}:-0,1)!=c,p=ee(function(){c.has(1)}),h=Kl(function(v){new a(v)}),g=!i&&ee(function(){for(var v=new a,D=5;D--;)v[o](D,D);return!v.has(-0)});h||((u=t(function(v,D){Ua(v,s);var C=rv(new a,v,u);return D!=null&&Li(D,C[o],{that:C,AS_ENTRIES:n}),C})).prototype=s,s.constructor=u),(p||g)&&(f("delete"),f("has"),n&&f("get")),(g||d)&&f(o),i&&s.clear&&delete s.clear}return l[e]=u,me({global:!0,forced:u!=a},l),la(u,e),i||r.setStrong(u,e,n),u},Do=Ia.getWeakData,KA=je.set,GA=je.getterFor,JA=kn.find,XA=kn.findIndex,YA=U([].splice),ZA=0,Co=function(e){return e.frozen||(e.frozen=new iv)},iv=function(){this.entries=[]},Ms=function(e,t){return JA(e.entries,function(r){return r[0]===t})};iv.prototype={get:function(e){var t=Ms(this,e);if(t)return t[1]},has:function(e){return!!Ms(this,e)},set:function(e,t){var r=Ms(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=XA(this.entries,function(r){return r[0]===e});return~t&&YA(this.entries,t,1),!!~t}};var ai,ov={getConstructor:function(e,t,r,n){var i=e(function(u,l){Ua(u,o),KA(u,{type:t,id:ZA++,frozen:void 0}),l!=null&&Li(l,u[n],{that:u,AS_ENTRIES:r})}),o=i.prototype,a=GA(t),s=function(u,l,f){var c=a(u),d=Do(be(l),!0);return d===!0?Co(c).set(l,f):d[c.id]=f,u};return An(o,{delete:function(u){var l=a(this);if(!le(u))return!1;var f=Do(u);return f===!0?Co(l).delete(u):f&&Ce(f,l.id)&&delete f[l.id]},has:function(u){var l=a(this);if(!le(u))return!1;var f=Do(u);return f===!0?Co(l).has(u):f&&Ce(f,l.id)}}),An(o,r?{get:function(u){var l=a(this);if(le(u)){var f=Do(u);return f===!0?Co(l).get(u):f?f[l.id]:void 0}},set:function(u,l){return s(this,u,l)}}:{add:function(u){return s(this,u,!0)}}),i}},bo=je.enforce,QA=!P.ActiveXObject&&"ActiveXObject"in P,av=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},eF=nv("WeakMap",av,ov);if(jg&&QA){ai=ov.getConstructor(av,"WeakMap",!0),Ia.enable();var si=eF.prototype,rh=U(si.delete),wo=U(si.has),nh=U(si.get),ih=U(si.set);An(si,{delete:function(e){if(le(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),rh(this,e)||t.frozen.delete(e)}return rh(this,e)},has:function(e){if(le(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),wo(this,e)||t.frozen.has(e)}return wo(this,e)},get:function(e){if(le(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),wo(this,e)?nh(this,e):t.frozen.get(e)}return nh(this,e)},set:function(e,t){if(le(e)&&!Or(e)){var r=bo(this);r.frozen||(r.frozen=new ai),wo(this,e)?ih(this,e,t):r.frozen.set(e,t)}else ih(this,e,t);return this}})}var Is=ye("iterator"),oh=ye("toStringTag"),Us=mi.values,sv=function(e,t){if(e){if(e[Is]!==Us)try{st(e,Is,Us)}catch{e[Is]=Us}if(e[oh]||st(e,oh,t),oa[t]){for(var r in mi)if(e[r]!==mi[r])try{st(e,r,mi[r])}catch{e[r]=mi[r]}}}};for(var Hs in oa)sv(P[Hs]&&P[Hs].prototype,Hs);sv(Ng,"DOMTokenList");var tF=new WeakMap,rF=new WeakMap,uv=new WeakMap,lv=new WeakMap,nF=new WeakMap,ah=new WeakMap,jo=new WeakMap,sh=new WeakMap,uh=new WeakMap,lh=new WeakMap,nc=new WeakMap,da=new WeakMap,ic=new WeakMap,Ha=new WeakMap,oc=new WeakMap,za=new WeakMap,zs=new WeakMap,cv=new WeakMap,ha=new WeakMap,Ws=new WeakMap,iF=kn.find,ch=!0;"find"in[]&&Array(1).find(function(){ch=!1}),me({target:"Array",proto:!0,forced:ch},{find:function(e){return iF(this,e,arguments.length>1?arguments[1]:void 0)}}),Ei("find"),me({global:!0},{globalThis:P});const oF=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];Uc&&(j.fn.css=Uc),Wo&&(j.fn.append=Wo),No&&(j.fn.addClass=No),$o&&(j.fn.removeClass=$o),jc&&(j.fn.hasClass=jc),Uo&&(j.fn.on=Uo),Ko&&(j.fn.focus=Ko),Lo&&(j.fn.attr=Lo),Rc&&(j.fn.removeAttr=Rc),Mc&&(j.fn.hide=Mc),Ic&&(j.fn.show=Ic),Lc&&(j.fn.offset=Lc),Nc&&(j.fn.width=Nc),$c&&(j.fn.height=$c),Wc&&(j.fn.parent=Wc),qc&&(j.fn.parents=qc),zc&&(j.fn.is=zc),Mo&&(j.fn.dataset=Mo),Io&&(j.fn.val=Io),Hc&&(j.fn.text=Hc),zo&&(j.fn.html=zo),Vo&&(j.fn.children=Vo),Vc&&(j.fn.remove=Vc),qo&&(j.fn.find=qo),Ho&&(j.fn.each=Ho),Kc&&(j.fn.empty=Kc);var fh,ac=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},ct=function(e){return Fn(e)&&e.nodeType===1},Fn=function(e){var t=ac(e);return!!t&&e instanceof t.Node},dh=function(e){var t=e&&e.anchorNode&&ac(e.anchorNode);return!!t&&e instanceof t.Selection},sc=function(e){var t,r,n;return(t=window.document.getElementById(e))!==null&&t!==void 0?t:((n=(r=window.document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.getElementById(e))||null},fv=function(e,t,r){for(var n,i=e.childNodes,o=i[t],a=t,s=!1,u=!1;(Fn(n=o)&&n.nodeType===8||ct(o)&&o.childNodes.length===0||ct(o)&&o.getAttribute("contenteditable")==="false")&&(!s||!u);)a>=i.length?(s=!0,a=t-1,r="backward"):a<0?(u=!0,a=t+1,r="forward"):(o=i[a],t=a,a+=r==="forward"?1:-1);return[o,t]},aF=function(e,t,r){return Be(fv(e,t,r),1)[0]};function dv(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var r=e.childNodes,n=r.length;n--;){var i=r[n],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||dv(i,t)}}(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(fh||(fh={}));var Zu=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Bi=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ui=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),sF=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),uF=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Qu=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),li=!uF&&!sF&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",L={getWindow:function(e){var t=cv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var r=zs.get(t);return r||(r=new Yd,zs.set(t,r)),r},setNewKey:function(e){var t=new Yd;zs.set(e,t)},findPath:function(e,t){for(var r=[],n=t;;){var i=da.get(n);if(i==null){if(m.isEditor(n))return r;break}var o=nc.get(n);if(o==null)break;r.unshift(o),n=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=L.toDOMNode(e,e),r=t.getRootNode();return(r instanceof Document||r instanceof ShadowRoot)&&r.getSelection!=null?r:t.ownerDocument},getParentNode:function(e,t){return da.get(t)||null},getParentsNodes:function(e,t){for(var r=[],n=t;n!==e&&n!=null;){var i=L.getParentNode(e,n);if(i==null)break;r.push(i),n=i}return r},getTopNode:function(e,t){var r=[L.findPath(e,t)[0]];return $.get(e,r)},toDOMNode:function(e,t){var r;if(m.isEditor(t))r=ic.get(e);else{var n=L.findKey(e,t);r=oc.get(n)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return r},hasDOMNode:function(e,t,r){r===void 0&&(r={});var n,i=r.editable,o=i!==void 0&&i,a=L.toDOMNode(e,e);try{n=ct(t)?t:t.parentElement}catch(s){if(!s.message.includes('Permission denied to access property "nodeType"'))throw s}return!!n&&n.closest("[data-slate-editor]")===a&&(!o||n.isContentEditable||!!n.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var r=t.anchor,n=t.focus,i=O.isBackward(t),o=L.toDOMPoint(e,r),a=O.isCollapsed(t)?o:L.toDOMPoint(e,n),s=L.getWindow(e).document.createRange(),u=Be(i?a:o,2),l=u[0],f=u[1],c=Be(i?o:a,2),d=c[0],p=c[1],h=!!(ct(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(ct(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:f),s.setEnd(d,g?1:p),s},toDOMPoint:function(e,t){var r,n,i,o=Be(m.node(e,t.path),1)[0],a=L.toDOMNode(e,o);m.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=oi(s),f=l.next();!f.done;f=l.next()){var c=f.value,d=c.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,h=c.getAttribute("data-slate-length"),g=u+(h==null?p:parseInt(h,10));if(t.offset<=g){i=[d,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return i},toSlateNode:function(e,t){var r=ct(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Ha.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: "+r);return n},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var r=t.clientX,n=t.clientY,i=t.target;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var o,a=L.toSlateNode(e,t.target),s=L.findPath(e,a);if(m.isVoid(e,a)){var u=i.getBoundingClientRect(),l=e.isInline(a)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,f=m.point(e,s,{edge:l?"start":"end"}),c=l?m.before(e,f):m.after(e,f);if(c)return m.range(e,c)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)o=d.caretRangeFromPoint(r,n);else{var p=d.caretPositionFromPoint(r,n);p&&((o=d.createRange()).setStart(p.offsetNode,p.offset),o.setEnd(p.offsetNode,p.offset))}if(!o)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return L.toSlateRange(e,o,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,r){var n,i,o,a,s,u=r.exactMatch,l=r.suppressThrow;if((dh(t)?t.anchorNode:t.startContainer)&&(dh(t)?(n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=Qu&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(n=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=t.collapsed)),n==null||o==null||i==null||a==null)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var f=L.toSlatePoint(e,[n,i],{exactMatch:u,suppressThrow:l});if(!f)return null;var c=s?f:L.toSlatePoint(e,[o,a],{exactMatch:u,suppressThrow:l});if(!c)return null;var d={anchor:f,focus:c};return O.isExpanded(d)&&O.isForward(d)&&ct(o)&&m.void(e,{at:d.focus,mode:"highest"})&&(d=m.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,r){var n,i=r.exactMatch,o=r.suppressThrow,a=Be(i?t:function(C){var b,A=Be(C,2),E=A[0],x=A[1];if(ct(E)&&E.childNodes.length){var _=x===E.childNodes.length,T=_?x-1:x;for(E=(b=Be(fv(E,T,_?"backward":"forward"),2))[0],_=(T=b[1])<x;ct(E)&&E.childNodes.length;){var k=_?E.childNodes.length-1:0;E=aF(E,k,_?"backward":"forward")}x=_&&E.textContent!=null?E.textContent.length:0}return[E,x]}(t),2),s=a[0],u=a[1],l=s.parentNode,f=null,c=0;if(l){var d=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null;if(p){f=p.closest('[data-slate-node="text"]');var g=L.getWindow(e).document.createRange();g.setStart(f,0),g.setEnd(s,u);var v=g.cloneContents();Xd(Xd([],Be(Rf(v.querySelectorAll("[data-slate-zero-width]")))),Be(Rf(v.querySelectorAll("[contenteditable=false]")))).forEach(function(C){C.parentNode.removeChild(C)}),c=v.textContent.length,h=f}else d&&((p=d.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),c=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach(function(C){c-=C.textContent.length})):c=1);h&&c===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||Bi&&(!((n=h.textContent)===null||n===void 0)&&n.endsWith(`
|
|
38
|
+
***************************************************************************** */var Xu=function(e,t){return Xu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},Xu(e,t)};function Tn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Xu(e,t),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var fa=function(){return fa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},fa.apply(this,arguments)};function oi(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Be(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function Xd(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e}var LA=0,Yd=function(){this.id=""+LA++},MA=je.set,IA=je.getterFor("Array Iterator"),mi=Jl(Array,"Array",function(e,t){MA(this,{type:"Array Iterator",target:er(e),index:0,kind:t})},function(){var e=IA(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values");En.Arguments=En.Array,Ei("keys"),Ei("values"),Ei("entries");var An=function(e,t,r){for(var n in t)qe(e,n,t[n],r);return e},UA=P.Array,HA=Math.max,Yu=function(e,t,r){for(var n=Wr(e),i=wn(t,n),o=wn(r===void 0?n:r,n),a=UA(HA(o-i,0)),s=0;i<o;i++,s++)Ri(a,s,e[i]);return a.length=s,a},Zd=Ti.f,Qd=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zA={f:function(e){return Qd&&ut(e)=="Window"?function(t){try{return Zd(t)}catch{return Yu(Qd)}}(e):Zd(er(e))}},eh=ee(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),yo=Object.isExtensible,Or=ee(function(){yo(1)})||eh?function(e){return!!ue(e)&&(!eh||ut(e)!="ArrayBuffer")&&(!yo||yo(e))}:yo,WA=!ee(function(){return Object.isExtensible(Object.preventExtensions({}))}),Ia=Xi(function(e){var t=lt.f,r=!1,n=Nl("meta"),i=0,o=function(s){t(s,n,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},r=!0;var s=Ti.f,u=U([].splice),l={};l[n]=1,s(l).length&&(Ti.f=function(f){for(var c=s(f),d=0,p=c.length;d<p;d++)if(c[d]===n){u(c,d,1);break}return c},me({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zA.f}))},fastKey:function(s,u){if(!ue(s))return typeof s=="symbol"?s:(typeof s=="string"?"S":"P")+s;if(!Ce(s,n)){if(!Or(s))return"F";if(!u)return"E";o(s)}return s[n].objectID},getWeakData:function(s,u){if(!Ce(s,n)){if(!Or(s))return!0;if(!u)return!1;o(s)}return s[n].weakData},onFreeze:function(s){return WA&&r&&Or(s)&&!Ce(s,n)&&o(s),s}};Ta[n]=!0}),qA=P.TypeError,To=function(e,t){this.stopped=e,this.result=t},th=To.prototype,Li=function(e,t,r){var n,i,o,a,s,u,l,f=r&&r.that,c=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=Lr(t,f),g=function(D){return n&&Wu(n,"normal",D),new To(!0,D)},v=function(D){return c?(be(D),p?h(D[0],D[1],g):h(D[0],D[1])):p?h(D,g):h(D)};if(d)n=e;else{if(!(i=Vl(e)))throw qA(_a(e)+" is not iterable");if(Jg(i)){for(o=0,a=Wr(e);a>o;o++)if((s=v(e[o]))&&Nr(th,s))return s;return new To(!1)}n=Xg(e,i)}for(u=n.next;!(l=Z(u,n)).done;){try{s=v(l.value)}catch(D){Wu(n,"throw",D)}if(typeof s=="object"&&s&&Nr(th,s))return s}return new To(!1)},VA=P.TypeError,Ua=function(e,t){if(Nr(t,e))return e;throw VA("Incorrect invocation")},rv=function(e,t,r){var n,i;return Bn&&re(n=t.constructor)&&n!==r&&ue(i=n.prototype)&&i!==r.prototype&&Bn(e,i),e},nv=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=P[e],s=a&&a.prototype,u=a,l={},f=function(v){var D=U(s[v]);qe(s,v,v=="add"?function(C){return D(this,C===0?0:C),this}:v=="delete"?function(C){return!(i&&!ue(C))&&D(this,C===0?0:C)}:v=="get"?function(C){return i&&!ue(C)?void 0:D(this,C===0?0:C)}:v=="has"?function(C){return!(i&&!ue(C))&&D(this,C===0?0:C)}:function(C,b){return D(this,C===0?0:C,b),this})};if(ji(e,!re(a)||!(i||s.forEach&&!ee(function(){new a().entries().next()}))))u=r.getConstructor(t,e,n,o),Ia.enable();else if(ji(e,!0)){var c=new u,d=c[o](i?{}:-0,1)!=c,p=ee(function(){c.has(1)}),h=Kl(function(v){new a(v)}),g=!i&&ee(function(){for(var v=new a,D=5;D--;)v[o](D,D);return!v.has(-0)});h||((u=t(function(v,D){Ua(v,s);var C=rv(new a,v,u);return D!=null&&Li(D,C[o],{that:C,AS_ENTRIES:n}),C})).prototype=s,s.constructor=u),(p||g)&&(f("delete"),f("has"),n&&f("get")),(g||d)&&f(o),i&&s.clear&&delete s.clear}return l[e]=u,me({global:!0,forced:u!=a},l),la(u,e),i||r.setStrong(u,e,n),u},Do=Ia.getWeakData,KA=je.set,GA=je.getterFor,JA=kn.find,XA=kn.findIndex,YA=U([].splice),ZA=0,Co=function(e){return e.frozen||(e.frozen=new iv)},iv=function(){this.entries=[]},Ms=function(e,t){return JA(e.entries,function(r){return r[0]===t})};iv.prototype={get:function(e){var t=Ms(this,e);if(t)return t[1]},has:function(e){return!!Ms(this,e)},set:function(e,t){var r=Ms(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=XA(this.entries,function(r){return r[0]===e});return~t&&YA(this.entries,t,1),!!~t}};var ai,ov={getConstructor:function(e,t,r,n){var i=e(function(u,l){Ua(u,o),KA(u,{type:t,id:ZA++,frozen:void 0}),l!=null&&Li(l,u[n],{that:u,AS_ENTRIES:r})}),o=i.prototype,a=GA(t),s=function(u,l,f){var c=a(u),d=Do(be(l),!0);return d===!0?Co(c).set(l,f):d[c.id]=f,u};return An(o,{delete:function(u){var l=a(this);if(!ue(u))return!1;var f=Do(u);return f===!0?Co(l).delete(u):f&&Ce(f,l.id)&&delete f[l.id]},has:function(u){var l=a(this);if(!ue(u))return!1;var f=Do(u);return f===!0?Co(l).has(u):f&&Ce(f,l.id)}}),An(o,r?{get:function(u){var l=a(this);if(ue(u)){var f=Do(u);return f===!0?Co(l).get(u):f?f[l.id]:void 0}},set:function(u,l){return s(this,u,l)}}:{add:function(u){return s(this,u,!0)}}),i}},bo=je.enforce,QA=!P.ActiveXObject&&"ActiveXObject"in P,av=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},eF=nv("WeakMap",av,ov);if(jg&&QA){ai=ov.getConstructor(av,"WeakMap",!0),Ia.enable();var si=eF.prototype,rh=U(si.delete),wo=U(si.has),nh=U(si.get),ih=U(si.set);An(si,{delete:function(e){if(ue(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),rh(this,e)||t.frozen.delete(e)}return rh(this,e)},has:function(e){if(ue(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),wo(this,e)||t.frozen.has(e)}return wo(this,e)},get:function(e){if(ue(e)&&!Or(e)){var t=bo(this);return t.frozen||(t.frozen=new ai),wo(this,e)?nh(this,e):t.frozen.get(e)}return nh(this,e)},set:function(e,t){if(ue(e)&&!Or(e)){var r=bo(this);r.frozen||(r.frozen=new ai),wo(this,e)?ih(this,e,t):r.frozen.set(e,t)}else ih(this,e,t);return this}})}var Is=ye("iterator"),oh=ye("toStringTag"),Us=mi.values,sv=function(e,t){if(e){if(e[Is]!==Us)try{st(e,Is,Us)}catch{e[Is]=Us}if(e[oh]||st(e,oh,t),oa[t]){for(var r in mi)if(e[r]!==mi[r])try{st(e,r,mi[r])}catch{e[r]=mi[r]}}}};for(var Hs in oa)sv(P[Hs]&&P[Hs].prototype,Hs);sv(Ng,"DOMTokenList");var tF=new WeakMap,rF=new WeakMap,uv=new WeakMap,lv=new WeakMap,nF=new WeakMap,ah=new WeakMap,jo=new WeakMap,sh=new WeakMap,uh=new WeakMap,lh=new WeakMap,nc=new WeakMap,da=new WeakMap,ic=new WeakMap,Ha=new WeakMap,oc=new WeakMap,za=new WeakMap,zs=new WeakMap,cv=new WeakMap,ha=new WeakMap,Ws=new WeakMap,iF=kn.find,ch=!0;"find"in[]&&Array(1).find(function(){ch=!1}),me({target:"Array",proto:!0,forced:ch},{find:function(e){return iF(this,e,arguments.length>1?arguments[1]:void 0)}}),Ei("find"),me({global:!0},{globalThis:P});const oF=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];bf&&(j.fn.css=bf),Ko&&(j.fn.append=Ko),Mo&&(j.fn.addClass=Mo),Io&&(j.fn.removeClass=Io),pf&&(j.fn.hasClass=pf),Wo&&(j.fn.on=Wo),Xo&&(j.fn.focus=Xo),Uo&&(j.fn.attr=Uo),gf&&(j.fn.removeAttr=gf),Df&&(j.fn.hide=Df),Cf&&(j.fn.show=Cf),yf&&(j.fn.offset=yf),vf&&(j.fn.width=vf),mf&&(j.fn.height=mf),Bf&&(j.fn.parent=Bf),Af&&(j.fn.parents=Af),Ef&&(j.fn.is=Ef),Ho&&(j.fn.dataset=Ho),zo&&(j.fn.val=zo),wf&&(j.fn.text=wf),Vo&&(j.fn.html=Vo),Jo&&(j.fn.children=Jo),Ff&&(j.fn.remove=Ff),Go&&(j.fn.find=Go),qo&&(j.fn.each=qo),xf&&(j.fn.empty=xf);var fh,ac=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},ct=function(e){return Fn(e)&&e.nodeType===1},Fn=function(e){var t=ac(e);return!!t&&e instanceof t.Node},dh=function(e){var t=e&&e.anchorNode&&ac(e.anchorNode);return!!t&&e instanceof t.Selection},sc=function(e){var t,r,n;return(t=window.document.getElementById(e))!==null&&t!==void 0?t:((n=(r=window.document.activeElement)===null||r===void 0?void 0:r.shadowRoot)===null||n===void 0?void 0:n.getElementById(e))||null},fv=function(e,t,r){for(var n,i=e.childNodes,o=i[t],a=t,s=!1,u=!1;(Fn(n=o)&&n.nodeType===8||ct(o)&&o.childNodes.length===0||ct(o)&&o.getAttribute("contenteditable")==="false")&&(!s||!u);)a>=i.length?(s=!0,a=t-1,r="backward"):a<0?(u=!0,a=t+1,r="forward"):(o=i[a],t=a,a+=r==="forward"?1:-1);return[o,t]},aF=function(e,t,r){return Be(fv(e,t,r),1)[0]};function dv(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var r=e.childNodes,n=r.length;n--;){var i=r[n],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||dv(i,t)}}(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(fh||(fh={}));var Zu=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),Bi=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ui=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),sF=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),uF=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Qu=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),li=!uF&&!sF&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",L={getWindow:function(e){var t=cv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var r=zs.get(t);return r||(r=new Yd,zs.set(t,r)),r},setNewKey:function(e){var t=new Yd;zs.set(e,t)},findPath:function(e,t){for(var r=[],n=t;;){var i=da.get(n);if(i==null){if(m.isEditor(n))return r;break}var o=nc.get(n);if(o==null)break;r.unshift(o),n=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=L.toDOMNode(e,e),r=t.getRootNode();return(r instanceof Document||r instanceof ShadowRoot)&&r.getSelection!=null?r:t.ownerDocument},getParentNode:function(e,t){return da.get(t)||null},getParentsNodes:function(e,t){for(var r=[],n=t;n!==e&&n!=null;){var i=L.getParentNode(e,n);if(i==null)break;r.push(i),n=i}return r},getTopNode:function(e,t){var r=[L.findPath(e,t)[0]];return $.get(e,r)},toDOMNode:function(e,t){var r;if(m.isEditor(t))r=ic.get(e);else{var n=L.findKey(e,t);r=oc.get(n)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return r},hasDOMNode:function(e,t,r){r===void 0&&(r={});var n,i=r.editable,o=i!==void 0&&i,a=L.toDOMNode(e,e);try{n=ct(t)?t:t.parentElement}catch(s){if(!s.message.includes('Permission denied to access property "nodeType"'))throw s}return!!n&&n.closest("[data-slate-editor]")===a&&(!o||n.isContentEditable||!!n.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var r=t.anchor,n=t.focus,i=O.isBackward(t),o=L.toDOMPoint(e,r),a=O.isCollapsed(t)?o:L.toDOMPoint(e,n),s=L.getWindow(e).document.createRange(),u=Be(i?a:o,2),l=u[0],f=u[1],c=Be(i?o:a,2),d=c[0],p=c[1],h=!!(ct(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(ct(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:f),s.setEnd(d,g?1:p),s},toDOMPoint:function(e,t){var r,n,i,o=Be(m.node(e,t.path),1)[0],a=L.toDOMNode(e,o);m.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=oi(s),f=l.next();!f.done;f=l.next()){var c=f.value,d=c.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,h=c.getAttribute("data-slate-length"),g=u+(h==null?p:parseInt(h,10));if(t.offset<=g){i=[d,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(v){r={error:v}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(t));return i},toSlateNode:function(e,t){var r=ct(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Ha.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: "+r);return n},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var r=t.clientX,n=t.clientY,i=t.target;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);var o,a=L.toSlateNode(e,t.target),s=L.findPath(e,a);if(m.isVoid(e,a)){var u=i.getBoundingClientRect(),l=e.isInline(a)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,f=m.point(e,s,{edge:l?"start":"end"}),c=l?m.before(e,f):m.after(e,f);if(c)return m.range(e,c)}var d=this.getWindow(e).document;if(d.caretRangeFromPoint)o=d.caretRangeFromPoint(r,n);else{var p=d.caretPositionFromPoint(r,n);p&&((o=d.createRange()).setStart(p.offsetNode,p.offset),o.setEnd(p.offsetNode,p.offset))}if(!o)throw new Error("Cannot resolve a Slate range from a DOM event: "+t);return L.toSlateRange(e,o,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,r){var n,i,o,a,s,u=r.exactMatch,l=r.suppressThrow;if((dh(t)?t.anchorNode:t.startContainer)&&(dh(t)?(n=t.anchorNode,i=t.anchorOffset,o=t.focusNode,a=t.focusOffset,s=Qu&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(n=t.startContainer,i=t.startOffset,o=t.endContainer,a=t.endOffset,s=t.collapsed)),n==null||o==null||i==null||a==null)throw new Error("Cannot resolve a Slate range from DOM range: "+t);var f=L.toSlatePoint(e,[n,i],{exactMatch:u,suppressThrow:l});if(!f)return null;var c=s?f:L.toSlatePoint(e,[o,a],{exactMatch:u,suppressThrow:l});if(!c)return null;var d={anchor:f,focus:c};return O.isExpanded(d)&&O.isForward(d)&&ct(o)&&m.void(e,{at:d.focus,mode:"highest"})&&(d=m.unhangRange(e,d,{voids:!0})),d},toSlatePoint:function(e,t,r){var n,i=r.exactMatch,o=r.suppressThrow,a=Be(i?t:function(C){var b,A=Be(C,2),E=A[0],x=A[1];if(ct(E)&&E.childNodes.length){var _=x===E.childNodes.length,T=_?x-1:x;for(E=(b=Be(fv(E,T,_?"backward":"forward"),2))[0],_=(T=b[1])<x;ct(E)&&E.childNodes.length;){var k=_?E.childNodes.length-1:0;E=aF(E,k,_?"backward":"forward")}x=_&&E.textContent!=null?E.textContent.length:0}return[E,x]}(t),2),s=a[0],u=a[1],l=s.parentNode,f=null,c=0;if(l){var d=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null;if(p){f=p.closest('[data-slate-node="text"]');var g=L.getWindow(e).document.createRange();g.setStart(f,0),g.setEnd(s,u);var v=g.cloneContents();Xd(Xd([],Be(Rf(v.querySelectorAll("[data-slate-zero-width]")))),Be(Rf(v.querySelectorAll("[contenteditable=false]")))).forEach(function(C){C.parentNode.removeChild(C)}),c=v.textContent.length,h=f}else d&&((p=d.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),c=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach(function(C){c-=C.textContent.length})):c=1);h&&c===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||Bi&&(!((n=h.textContent)===null||n===void 0)&&n.endsWith(`
|
|
39
39
|
`)))&&c--}if(!f){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var D=L.toSlateNode(e,f);return{path:L.findPath(e,D),offset:c}},hasRange:function(e,t){var r=t.anchor,n=t.focus;return m.hasPath(e,r.path)&&m.hasPath(e,n.path)},getNodeType:function(e){return Q.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return $.string(t)}).join("")},getSelectedElems:function(e){var t,r,n=[],i=m.nodes(e,{universal:!0});try{for(var o=oi(i),a=o.next();!a.done;a=o.next()){var s=Be(a.value,1)[0];Q.isElement(s)&&n.push(s)}}catch(u){t={error:u}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},getSelectedNodeByType:function(e,t){var r=this,n=Be(m.nodes(e,{match:function(o){return r.checkNodeType(o,t)},universal:!0}),1),i=n[0];return i==null?null:i[0]},getSelectedTextNode:function(e){var t=Be(m.nodes(e,{match:function(n){return W.isText(n)},universal:!0}),1),r=t[0];return r==null?null:r[0]},isNodeSelected:function(e,t){var r=Be(m.nodes(e,{match:function(i){return i===t},universal:!0}),1),n=r[0];return n!=null&&Be(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var r=e.selection;return!!r&&(m.isEnd(e,r.anchor,t)||m.isEnd(e,r.focus,t))},getTextarea:function(e){var t=tF.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return uv.get(e)||null},getHoverbar:function(e){return lv.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,r){e.normalizeNode([t,[r]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),r=t.maxLength,n=t.onMaxLength;if(typeof r!="number"||r<=0)return 1/0;var i=r-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&n&&n(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,r,n,i,o=L.getTextarea(e).$textArea,a=o==null?void 0:o[0].childNodes;if(a)try{for(var s=oi(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(l.nodeType!==3)break;l.remove()}}catch(g){t={error:g}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var f=m.nodes(e,{match:function(g){return!(!Q.isElement(g)||e.isInline(g))},universal:!0});try{for(var c=oi(f),d=c.next();!d.done;d=c.next()){var p=d.value;if(p!=null){var h=p[0];dv(L.toDOMNode(e,h),function(g,v){var D=j(v);D.attr("data-slate-string")||D.attr("data-slate-zero-width")||D.attr("data-w-e-reserve")||v.removeChild(g)})}}}catch(g){n={error:g}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}},isLastNode:function(e,t){var r=e.children||[];return r[r.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,r,n=m.nodes(e,{match:function(s){return e.isVoid(s)}}),i=0;try{for(var o=oi(n),a=o.next();!a.done;a=o.next())a.value,i++}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||O.isExpanded(t))return!1;var r=L.getSelectedNodeByType(e,"paragraph");if(r===null)return!1;var n=r.children;return n.length===1&&(n[0].text===""||void 0)},isEmptyPath:function(e,t){var r=m.node(e,t);if(r==null)return!1;var n=Be(r,1)[0].children;return n.length===1&&n[0].text===""}},lF=kn.filter,cF=La("filter");me({target:"Array",proto:!0,forced:!cF},{filter:function(e){return lF(this,e,arguments.length>1?arguments[1]:void 0)}});var el=`
|
|
40
|
-
\v\f\r \u2028\u2029\uFEFF`,hh=U("".replace),pa="["+el+"]",fF=RegExp("^"+pa+pa+"*"),dF=RegExp(pa+pa+"*$"),hF=function(e){return function(t){var r=ae(rt(t));return 1&e&&(r=hh(r,fF,"")),2&e&&(r=hh(r,dF,"")),r}},pF={trim:hF(3)},gF=_n.PROPER,vF=pF.trim;me({target:"String",proto:!0,forced:function(e){return ee(function(){return!!el[e]()||"
"[e]()!=="
"||gF&&el[e].name!==e})}("trim")},{trim:function(){return vF(this)}});var Mi,Qr,ph,qs,ga=P.Promise,gh=ye("species"),uc=function(e){var t=zr(e),r=lt.f;xe&&t&&!t[gh]&&r(t,gh,{configurable:!0,get:function(){return this}})},mF=P.TypeError,yF=ye("species"),hv=function(e,t){var r,n=be(e).constructor;return n===void 0||(r=be(n)[yF])==null?t:function(i){if(Na(i))return i;throw mF(_a(i)+" is not a constructor")}(r)},pv=U([].slice),gv=/(?:ipad|iphone|ipod).*applewebkit/i.test(dn),Gt=ut(P.process)=="process",tl=P.setImmediate,vh=P.clearImmediate,DF=P.process,Vs=P.Dispatch,CF=P.Function,mh=P.MessageChannel,bF=P.String,Ks=0,Ai={};try{Mi=P.location}catch{}var lc=function(e){if(Ce(Ai,e)){var t=Ai[e];delete Ai[e],t()}},Gs=function(e){return function(){lc(e)}},yh=function(e){lc(e.data)},Dh=function(e){P.postMessage(bF(e),Mi.protocol+"//"+Mi.host)};tl&&vh||(tl=function(e){var t=pv(arguments,1);return Ai[++Ks]=function(){ec(ie(e)?e:CF(e),void 0,t)},Qr(Ks),Ks},vh=function(e){delete Ai[e]},Gt?Qr=function(e){DF.nextTick(Gs(e))}:Vs&&Vs.now?Qr=function(e){Vs.now(Gs(e))}:mh&&!gv?(qs=(ph=new mh).port2,ph.port1.onmessage=yh,Qr=Lr(qs.postMessage,qs)):P.addEventListener&&ie(P.postMessage)&&!P.importScripts&&Mi&&Mi.protocol!=="file:"&&!ee(Dh)?(Qr=Dh,P.addEventListener("message",yh,!1)):Qr="onreadystatechange"in ki("script")?function(e){Uu.appendChild(ki("script")).onreadystatechange=function(){Uu.removeChild(this),lc(e)}}:function(e){setTimeout(Gs(e),0)});var ci,Ar,Fi,an,Js,Xs,Ys,Ch,vv={set:tl},wF=/ipad|iphone|ipod/i.test(dn)&&P.Pebble!==void 0,EF=/web0s(?!.*chrome)/i.test(dn),BF=Zi.f,Zs=vv.set,bh=P.MutationObserver||P.WebKitMutationObserver,wh=P.document,Eh=P.process,Eo=P.Promise,Bh=BF(P,"queueMicrotask"),mv=Bh&&Bh.value;mv||(ci=function(){var e,t;for(Gt&&(e=Eh.domain)&&e.exit();Ar;){t=Ar.fn,Ar=Ar.next;try{t()}catch(r){throw Ar?an():Fi=void 0,r}}Fi=void 0,e&&e.enter()},gv||Gt||EF||!bh||!wh?!wF&&Eo&&Eo.resolve?((Ys=Eo.resolve(void 0)).constructor=Eo,Ch=Lr(Ys.then,Ys),an=function(){Ch(ci)}):Gt?an=function(){Eh.nextTick(ci)}:(Zs=Lr(Zs,P),an=function(){Zs(ci)}):(Js=!0,Xs=wh.createTextNode(""),new bh(ci).observe(Xs,{characterData:!0}),an=function(){Xs.data=Js=!Js}));var Qs,Ah,yv,Fh,Dv=mv||function(e){var t={fn:e,next:void 0};Fi&&(Fi.next=t),Ar||(Ar=t,an()),Fi=t},AF=function(e){var t,r;this.promise=new e(function(n,i){if(t!==void 0||r!==void 0)throw TypeError("Bad Promise constructor");t=n,r=i}),this.resolve=Yt(t),this.reject=Yt(r)},cc={f:function(e){return new AF(e)}},rl=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},FF=typeof window=="object",Cv=vv.set,xF=ye("species"),ft="Promise",xh=je.getterFor(ft),OF=je.set,SF=je.getterFor(ft),br=ga&&ga.prototype,pt=ga,fi=br,bv=P.TypeError,nl=P.document,fc=P.process,pn=cc.f,_F=pn,PF=!!(nl&&nl.createEvent&&P.dispatchEvent),wv=ie(P.PromiseRejectionEvent),Ev=!1,xi=ji(ft,function(){var e=ka(pt),t=e!==String(pt);if(!t&&Pi===66)return!0;if(Pi>=51&&/native code/.test(e))return!1;var r=new pt(function(i){i(1)}),n=function(i){i(function(){},function(){})};return(r.constructor={})[xF]=n,!(Ev=r.then(function(){})instanceof n)||!t&&FF&&!wv}),kF=xi||!Kl(function(e){pt.all(e).catch(function(){})}),Bv=function(e){var t;return!(!le(e)||!ie(t=e.then))&&t},dc=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;Dv(function(){for(var n=e.value,i=e.state==1,o=0;r.length>o;){var a,s,u,l=r[o++],f=i?l.ok:l.fail,c=l.resolve,d=l.reject,p=l.domain;try{f?(i||(e.rejection===2&&jF(e),e.rejection=1),f===!0?a=n:(p&&p.enter(),a=f(n),p&&(p.exit(),u=!0)),a===l.promise?d(bv("Promise-chain cycle")):(s=Bv(a))?Z(s,a,c,d):c(a)):d(n)}catch(h){p&&!u&&p.exit(),d(h)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&TF(e)})}},Av=function(e,t,r){var n,i;PF?((n=nl.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),P.dispatchEvent(n)):n={promise:t,reason:r},!wv&&(i=P["on"+e])?i(n):e==="unhandledrejection"&&function(o,a){var s=P.console;s&&s.error&&(arguments.length==1?s.error(o):s.error(o,a))}("Unhandled promise rejection",r)},TF=function(e){Z(Cv,P,function(){var t,r=e.facade,n=e.value;if(Oh(e)&&(t=rl(function(){Gt?fc.emit("unhandledRejection",n,r):Av("unhandledrejection",r,n)}),e.rejection=Gt||Oh(e)?2:1,t.error))throw t.value})},Oh=function(e){return e.rejection!==1&&!e.parent},jF=function(e){Z(Cv,P,function(){var t=e.facade;Gt?fc.emit("rejectionHandled",t):Av("rejectionhandled",t,e.value)})},cn=function(e,t,r){return function(n){e(t,n,r)}},gn=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,dc(e,!0))},il=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw bv("Promise can't be resolved itself");var n=Bv(t);n?Dv(function(){var i={done:!1};try{Z(n,t,cn(il,i,e),cn(gn,i,e))}catch(o){gn(i,o,e)}}):(e.value=t,e.state=1,dc(e,!1))}catch(i){gn({done:!1},i,e)}}};if(xi&&(fi=(pt=function(e){Ua(this,fi),Yt(e),Z(Qs,this);var t=xh(this);try{e(cn(il,t),cn(gn,t))}catch(r){gn(t,r)}}).prototype,(Qs=function(e){OF(this,{type:ft,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=An(fi,{then:function(e,t){var r=SF(this),n=r.reactions,i=pn(hv(this,pt));return i.ok=!ie(e)||e,i.fail=ie(t)&&t,i.domain=Gt?fc.domain:void 0,r.parent=!0,n[n.length]=i,r.state!=0&&dc(r,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),Ah=function(){var e=new Qs,t=xh(e);this.promise=e,this.resolve=cn(il,t),this.reject=cn(gn,t)},cc.f=pn=function(e){return e===pt||e===yv?new Ah(e):_F(e)},ie(ga)&&br!==Object.prototype)){Fh=br.then,Ev||(qe(br,"then",function(e,t){var r=this;return new pt(function(n,i){Z(Fh,r,n,i)}).then(e,t)},{unsafe:!0}),qe(br,"catch",fi.catch,{unsafe:!0}));try{delete br.constructor}catch{}Bn&&Bn(br,fi)}me({global:!0,wrap:!0,forced:xi},{Promise:pt}),la(pt,ft,!1),uc(ft),yv=zr(ft),me({target:ft,stat:!0,forced:xi},{reject:function(e){var t=pn(this);return Z(t.reject,void 0,e),t.promise}}),me({target:ft,stat:!0,forced:xi},{resolve:function(e){return function(t,r){if(be(t),le(r)&&r.constructor===t)return r;var n=cc.f(t);return(0,n.resolve)(r),n.promise}(this,e)}}),me({target:ft,stat:!0,forced:kF},{all:function(e){var t=this,r=pn(t),n=r.resolve,i=r.reject,o=rl(function(){var a=Yt(t.resolve),s=[],u=0,l=1;Li(e,function(f){var c=u++,d=!1;l++,Z(a,t,f).then(function(p){d||(d=!0,s[c]=p,--l||n(s))},i)}),--l||n(s)});return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=pn(t),n=r.reject,i=rl(function(){var o=Yt(t.resolve);Li(e,function(a){Z(o,t,a).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}});var en=Ma.UNSUPPORTED_Y,RF=Math.min,Fv=[].push,NF=U(/./.exec),tn=U(Fv),di=U("".slice);function xn(e){Promise.resolve().then(e)}function $F(e){return"w-e-element-"+e}tc("split",function(e,t,r){var n;return n="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a=ae(rt(this)),s=o===void 0?4294967295:o>>>0;if(s===0)return[];if(i===void 0)return[a];if(!zl(i))return Z(t,a,i,s);for(var u,l,f,c=[],d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),p=0,h=new RegExp(i.source,d+"g");(u=Z(Ni,h,a))&&!((l=h.lastIndex)>p&&(tn(c,di(a,p,u.index)),u.length>1&&u.index<a.length&&ec(Fv,c,Yu(u,1)),f=u[0].length,p=l,c.length>=s));)h.lastIndex===u.index&&h.lastIndex++;return p===a.length?!f&&NF(h,"")||tn(c,""):tn(c,di(a,p)),c.length>s?Yu(c,0,s):c}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Z(t,this,i,o)}:t,[function(i,o){var a=rt(this),s=i==null?void 0:$r(i,e);return s?Z(s,i,a,o):Z(n,ae(a),i,o)},function(i,o){var a=be(this),s=ae(i),u=r(n,a,s,o,n!==t);if(u.done)return u.value;var l=hv(a,RegExp),f=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(en?"g":"y"),d=new l(en?"^(?:"+a.source+")":a,c),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(s.length===0)return $i(d,s)===null?[s]:[];for(var h=0,g=0,v=[];g<s.length;){d.lastIndex=en?0:g;var D,C=$i(d,en?di(s,g):s);if(C===null||(D=RF(Pn(d.lastIndex+(en?g:0)),s.length))===h)g=rc(s,g,f);else{if(tn(v,di(s,h,g)),v.length===p)return v;for(var b=1;b<=C.length-1;b++)if(tn(v,C[b]),v.length===p)return v;g=h=D}}return tn(v,di(s,h)),v}]},!!ee(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"}),en);var LF=lt.f,MF=Ti.f,IF=je.enforce,UF=ye("match"),Tt=P.RegExp,sn=Tt.prototype,HF=P.SyntaxError,zF=U(Hl),WF=U(sn.exec),Bo=U("".charAt),Sh=U("".replace),_h=U("".indexOf),qF=U("".slice),VF=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,kr=/a/g,eu=/a/g,KF=new Tt(kr)!==kr,xv=Ma.MISSED_STICKY,GF=Ma.UNSUPPORTED_Y,JF=xe&&(!KF||xv||Yl||Zl||ee(function(){return eu[UF]=!1,Tt(kr)!=kr||Tt(eu)==eu||Tt(kr,"i")!="/a/i"}));if(ji("RegExp",JF)){for(var zt=function(e,t){var r,n,i,o,a,s,u=Nr(sn,this),l=zl(e),f=t===void 0,c=[],d=e;if(!u&&l&&f&&e.constructor===zt)return e;if((l||Nr(sn,e))&&(e=e.source,f&&(t="flags"in d?d.flags:zF(d))),e=e===void 0?"":ae(e),t=t===void 0?"":ae(t),d=e,Yl&&"dotAll"in kr&&(n=!!t&&_h(t,"s")>-1)&&(t=Sh(t,/s/g,"")),r=t,xv&&"sticky"in kr&&(i=!!t&&_h(t,"y")>-1)&&GF&&(t=Sh(t,/y/g,"")),Zl&&(o=function(p){for(var h,g=p.length,v=0,D="",C=[],b={},A=!1,E=!1,x=0,_="";v<=g;v++){if((h=Bo(p,v))==="\\")h+=Bo(p,++v);else if(h==="]")A=!1;else if(!A)switch(!0){case h==="[":A=!0;break;case h==="(":WF(VF,qF(p,v+1))&&(v+=2,E=!0),D+=h,x++;continue;case(h===">"&&E):if(_===""||Ce(b,_))throw new HF("Invalid capture group name");b[_]=!0,C[C.length]=[_,x],E=!1,_="";continue}E?_+=h:D+=h}return[D,C]}(e),e=o[0],c=o[1]),a=rv(Tt(e,t),u?this:sn,zt),(n||i||c.length)&&(s=IF(a),n&&(s.dotAll=!0,s.raw=zt(function(p){for(var h,g=p.length,v=0,D="",C=!1;v<=g;v++)(h=Bo(p,v))!=="\\"?C||h!=="."?(h==="["?C=!0:h==="]"&&(C=!1),D+=h):D+="[\\s\\S]":D+=h+Bo(p,++v);return D}(e),r)),i&&(s.sticky=!0),c.length&&(s.groups=c)),e!==d)try{st(a,"source",d===""?"(?:)":d)}catch{}return a},XF=function(e){e in zt||LF(zt,e,{configurable:!0,get:function(){return Tt[e]},set:function(t){Tt[e]=t}})},Ph=MF(Tt),kh=0;Ph.length>kh;)XF(Ph[kh++]);sn.constructor=zt,zt.prototype=sn,qe(P,"RegExp",zt)}uc("RegExp");var YF=lt.f,Th=Ia.fastKey,jh=je.set,tu=je.getterFor,ZF={getConstructor:function(e,t,r,n){var i=e(function(l,f){Ua(l,o),jh(l,{type:t,index:$a(null),first:void 0,last:void 0,size:0}),xe||(l.size=0),f!=null&&Li(f,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=tu(t),s=function(l,f,c){var d,p,h=a(l),g=u(l,f);return g?g.value=c:(h.last=g={index:p=Th(f,!0),key:f,value:c,previous:d=h.last,next:void 0,removed:!1},h.first||(h.first=g),d&&(d.next=g),xe?h.size++:l.size++,p!=="F"&&(h.index[p]=g)),l},u=function(l,f){var c,d=a(l),p=Th(f);if(p!=="F")return d.index[p];for(c=d.first;c;c=c.next)if(c.key==f)return c};return An(o,{clear:function(){for(var l=a(this),f=l.index,c=l.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;l.first=l.last=void 0,xe?l.size=0:this.size=0},delete:function(l){var f=this,c=a(f),d=u(f,l);if(d){var p=d.next,h=d.previous;delete c.index[d.index],d.removed=!0,h&&(h.next=p),p&&(p.previous=h),c.first==d&&(c.first=p),c.last==d&&(c.last=h),xe?c.size--:f.size--}return!!d},forEach:function(l){for(var f,c=a(this),d=Lr(l,arguments.length>1?arguments[1]:void 0);f=f?f.next:c.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(l){return!!u(this,l)}}),An(o,r?{get:function(l){var f=u(this,l);return f&&f.value},set:function(l,f){return s(this,l===0?0:l,f)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),xe&&YF(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=tu(t),o=tu(n);Jl(e,t,function(a,s){jh(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,u=a.last;u&&u.removed;)u=u.previous;return a.target&&(a.last=u=u?u.next:a.state.first)?s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),uc(t)}};nv("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},ZF);var yi=function(e){return e!=null},QF={object:!0,function:!0,undefined:!0},e2=function(e){if(!function(t){return!!yi(t)&&hasOwnProperty.call(QF,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},t2=/^\s*class[\s{/}]/,r2=Function.prototype.toString,Rh=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!e2(t)}(e)&&!t2.test(r2.call(e))},hc=function(e){return e!=null},n2=Object.keys,i2=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return n2(hc(e)?Object(e):e)},o2=function(e){if(!hc(e))throw new TypeError("Cannot use null or undefined");return e},a2=Math.max,Nh=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var r,n,i,o=a2(arguments.length,2);for(e=Object(o2(e)),i=function(a){try{e[a]=t[a]}catch(s){r||(r=s)}},n=1;n<o;++n)i2(t=arguments[n]).forEach(i);if(r!==void 0)throw r;return e},s2=Array.prototype.forEach,u2=Object.create,l2=function(e,t){var r;for(r in e)t[r]=e[r]},$h=function(e){var t=u2(null);return s2.call(arguments,function(r){hc(r)&&l2(Object(r),t)}),t},ru="razdwatrzy",c2=String.prototype.indexOf,hi=typeof ru.contains=="function"&&ru.contains("dwa")===!0&&ru.contains("foo")===!1?String.prototype.contains:function(e){return c2.call(this,e,arguments[1])>-1},Ao=Xi(function(e){var t=e.exports=function(r,n){var i,o,a,s,u;return arguments.length<2||typeof r!="string"?(s=n,n=r,r=null):s=arguments[2],yi(r)?(i=hi.call(r,"c"),o=hi.call(r,"e"),a=hi.call(r,"w")):(i=a=!0,o=!1),u={value:n,configurable:i,enumerable:o,writable:a},s?Nh($h(s),u):u};t.gs=function(r,n,i){var o,a,s,u;return typeof r!="string"?(s=i,i=n,n=r,r=null):s=arguments[3],yi(n)?Rh(n)?yi(i)?Rh(i)||(s=i,i=void 0):i=void 0:(s=n,n=i=void 0):n=void 0,yi(r)?(o=hi.call(r,"c"),a=hi.call(r,"e")):(o=!0,a=!1),u={get:n,set:i,configurable:o,enumerable:a},s?Nh($h(s),u):u}}),nu=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e};Xi(function(e,t){var r,n,i,o,a,s,u,l=Function.prototype.apply,f=Function.prototype.call,c=Object.create,d=Object.defineProperty,p=Object.defineProperties,h=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(v,D){var C;return nu(D),h.call(this,"__ee__")?C=this.__ee__:(C=g.value=c(null),d(this,"__ee__",g),g.value=null),C[v]?typeof C[v]=="object"?C[v].push(D):C[v]=[C[v],D]:C[v]=D,this},n=function(v,D){var C,b;return nu(D),b=this,r.call(this,v,C=function(){i.call(b,v,C),l.call(D,this,arguments)}),C.__eeOnceListener__=D,this},i=function(v,D){var C,b,A,E;if(nu(D),!h.call(this,"__ee__"))return this;if(!(C=this.__ee__)[v])return this;if(typeof(b=C[v])=="object")for(E=0;A=b[E];++E)A!==D&&A.__eeOnceListener__!==D||(b.length===2?C[v]=b[E?0:1]:b.splice(E,1));else b!==D&&b.__eeOnceListener__!==D||delete C[v];return this},o=function(v){var D,C,b,A,E;if(h.call(this,"__ee__")&&(A=this.__ee__[v]))if(typeof A=="object"){for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];for(A=A.slice(),D=0;b=A[D];++D)l.call(b,this,E)}else switch(arguments.length){case 1:f.call(A,this);break;case 2:f.call(A,this,arguments[1]);break;case 3:f.call(A,this,arguments[1],arguments[2]);break;default:for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];l.call(A,this,E)}},a={on:r,once:n,off:i,emit:o},s={on:Ao(r),once:Ao(n),off:Ao(i),emit:Ao(o)},u=p({},s),e.exports=t=function(v){return v==null?c(u):p(Object(v),s)},t.methods=a});function pc(e){var t=L.getTextarea(e).$textAreaContainer,r=t.width(),n=t.height(),i=t.offset();return{top:i.top,left:i.left,width:r,height:n}}function f2(e){var t={top:"0",left:"0"},r=e.selection;if(r==null)return t;var n=pc(e);if(n==null)return t;var i=n.top,o=n.left,a=n.width,s=n.height,u=L.toDOMRange(e,r).getClientRects()[0];if(u==null)return t;u.width;var l=u.height,f={},c=u.top-i,d=u.left-o;if(d>a/2){var p=a-d;f.right=p+5+"px"}else f.left=d+5+"px";if(c>s/2){var h=s-c;f.bottom=h+5+"px"}else{var g=c+l;g<0&&(g=0),f.top=g+5+"px"}return f}function d2(e,t,r){var n={top:"0",left:"0"};if(e.selection==null)return n;var i=Q.isElement(t)&&e.isVoid(t),o=Q.isElement(t)&&e.isInline(t),a=za.get(t);if(a==null)return n;var s=a.getBoundingClientRect(),u=s.top,l=s.left,f=s.height,c=s.width;if(i){var d=function(_){var T=[];T.push(_);for(var k=0;T.length>0;){var M=T.pop();if(M==null||++k>1e4)break;var R=M.nodeName;if(M.nodeType===1){var S=R.toLowerCase();if(oF.includes(S)||S==="iframe"||S==="video")return M;var z=M.children||[],G=z.length;if(G)for(var X=G-1;X>=0;X--)T.push(z[X])}}return null}(a);if(d!=null){var p=d.getBoundingClientRect();u=p.top,f=p.height}}var h=pc(e);if(h==null)return n;var g=h.top,v=h.left,D=h.width,C=h.height,b={},A=u-g,E=l-v;{var x;return i?o?E>(D-c)/2?b.right=D-E+5+"px":b.left=E+c+5+"px":b.left="20px":b.left=E+"px",i?((x=A)<0&&(x=0),b.top=x+"px"):A>(C-f)/2?b.bottom=C-A+5+"px":((x=A+f)<0&&(x=0),b.top=x+5+"px"),b}}function h2(e,t){xn(function(){var r=pc(e);if(r!=null){var n,i=r.top,o=r.left,a=r.width,s=r.height,u=t.offset(),l=u.top,f=u.left,c=t.width(),d=t.height(),p=l-i,h=f-o,g=t.attr("style");if(g.indexOf("top")>=0&&(n=p+d-s)>0){var v=t.css("top"),D=parseInt(v.toString())-n;D<0&&(D=0),t.css("top",D+"px")}if(g.indexOf("bottom")>=0&&l<0){var C=t.css("bottom"),b=parseInt(C.toString())-Math.abs(l);t.css("bottom",b+"px")}if(g.indexOf("left")>=0&&(n=h+c-a)>0){var A=t.css("left"),E=parseInt(A.toString())-n;E<0&&(E=0),t.css("left",E+"px")}if(g.indexOf("right")>=0&&f<0){var x=t.css("right"),_=parseInt(x.toString())-Math.abs(f);t.css("right",_+"px")}}})}var p2=La("slice"),g2=ye("species"),iu=P.Array,v2=Math.max;me({target:"Array",proto:!0,forced:!p2},{slice:function(e,t){var r,n,i,o=er(this),a=Wr(o),s=wn(e,a),u=wn(t===void 0?a:t,a);if(aa(o)&&(r=o.constructor,(Na(r)&&(r===iu||aa(r.prototype))||le(r)&&(r=r[g2])===null)&&(r=void 0),r===iu||r===void 0))return pv(o,s,u);for(n=new(r===void 0?iu:r)(v2(u-s,0)),i=0;s<u;s++,i++)s in o&&Ri(n,i,o[s]);return n.length=i,n}});var m2=Zi.f,Lh=U("".startsWith),y2=U("".slice),D2=Math.min,Ov=ql("startsWith"),C2=!Ov&&!!function(){var e=m2(String.prototype,"startsWith");return e&&!e.writable}();me({target:"String",proto:!0,forced:!C2&&!Ov},{startsWith:function(e){var t=ae(rt(this));Wl(e);var r=Pn(D2(arguments.length>1?arguments[1]:void 0,t.length)),n=ae(e);return Lh?Lh(t,n,r):y2(t,r,r+n.length)===n}});var rn=Object.assign,Mh=Object.defineProperty,b2=U([].concat),Ih=!rn||ee(function(){if(xe&&rn({b:1},rn(Mh({},"a",{enumerable:!0,get:function(){Mh(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),rn({},e)[r]!=7||hn(rn({},t)).join("")!=n})?function(e,t){for(var r=Qt(e),n=arguments.length,i=1,o=qg.f,a=Hg.f;n>i;)for(var s,u=Ra(arguments[i++]),l=o?b2(hn(u),o(u)):hn(u),f=l.length,c=0;f>c;)s=l[c++],xe&&!Z(a,u,s)||(r[s]=u[s]);return r}:rn;me({target:"Object",stat:!0,forced:Object.assign!==Ih},{assign:Ih});var w2=["props","attrs","style","dataset","on","hook"];function Sv(e){var t=e.data,r=t===void 0?{}:t,n=e.children,i=n===void 0?[]:n;Object.keys(r).forEach(function(o){var a,s,u=r[o];if(o!=="key"){if(!w2.includes(o)){if(o.startsWith("data-")){var l=o.slice(5);return l=yC(l),function(f,c){f.data==null&&(f.data={});var d=f.data;d.dataset==null&&(d.dataset={}),Object.assign(d.dataset,c)}(e,((a={})[l]=u,a)),void delete r[o]}(function(f,c){f.data==null&&(f.data={});var d=f.data;d.props==null&&(d.props={}),Object.assign(d.props,c)})(e,(s={},s[o]=u,s)),delete r[o]}}else e.key=u}),i.length>0&&i.forEach(function(o){typeof o!="string"&&Sv(o)})}var _v=[],E2={};function B2(e,t,r){var n=r.isInline(e)?"span":"div";return Xt(n,null,t)}function A2(e,t){var r,n=L.findKey(t,e),i=t.isInline(e),o=m.isVoid(t,e),a=$F(n.id),s={id:a,key:n.id,"data-slate-node":"element","data-slate-inline":i},u=e.type,l=e.children,f=l===void 0?[]:l,c=function(C){return E2[C]||B2}(u);r=o?null:f.map(function(C,b){return ol(C,b,e,t)});var d=c(e,r,t);if(o){s["data-slate-void"]=!0;var p=i?"span":"div",h=Be($.texts(e),1),g=Be(h[0],1)[0],v=ol(g,0,e,t),D=Xt(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},v);d=Xt(p,{style:{position:"relative"}},d,D),nc.set(g,0),da.set(g,e)}return d.data==null&&(d.data={}),Object.assign(d.data,s),o||i||(d=function(C,b){var A=b;return _v.forEach(function(E){A=E(C,b)}),A}(e,d)),xn(function(){var C=sc(a);C!=null&&(oc.set(n,C),za.set(e,C),Ha.set(C,e))}),d}function Uh(e,t){return t===void 0&&(t=!1),Xt("span",{"data-slate-string":!0},t?e+`
|
|
40
|
+
\v\f\r \u2028\u2029\uFEFF`,hh=U("".replace),pa="["+el+"]",fF=RegExp("^"+pa+pa+"*"),dF=RegExp(pa+pa+"*$"),hF=function(e){return function(t){var r=ie(rt(t));return 1&e&&(r=hh(r,fF,"")),2&e&&(r=hh(r,dF,"")),r}},pF={trim:hF(3)},gF=_n.PROPER,vF=pF.trim;me({target:"String",proto:!0,forced:function(e){return ee(function(){return!!el[e]()||"
"[e]()!=="
"||gF&&el[e].name!==e})}("trim")},{trim:function(){return vF(this)}});var Mi,Qr,ph,qs,ga=P.Promise,gh=ye("species"),uc=function(e){var t=zr(e),r=lt.f;xe&&t&&!t[gh]&&r(t,gh,{configurable:!0,get:function(){return this}})},mF=P.TypeError,yF=ye("species"),hv=function(e,t){var r,n=be(e).constructor;return n===void 0||(r=be(n)[yF])==null?t:function(i){if(Na(i))return i;throw mF(_a(i)+" is not a constructor")}(r)},pv=U([].slice),gv=/(?:ipad|iphone|ipod).*applewebkit/i.test(dn),Gt=ut(P.process)=="process",tl=P.setImmediate,vh=P.clearImmediate,DF=P.process,Vs=P.Dispatch,CF=P.Function,mh=P.MessageChannel,bF=P.String,Ks=0,Ai={};try{Mi=P.location}catch{}var lc=function(e){if(Ce(Ai,e)){var t=Ai[e];delete Ai[e],t()}},Gs=function(e){return function(){lc(e)}},yh=function(e){lc(e.data)},Dh=function(e){P.postMessage(bF(e),Mi.protocol+"//"+Mi.host)};tl&&vh||(tl=function(e){var t=pv(arguments,1);return Ai[++Ks]=function(){ec(re(e)?e:CF(e),void 0,t)},Qr(Ks),Ks},vh=function(e){delete Ai[e]},Gt?Qr=function(e){DF.nextTick(Gs(e))}:Vs&&Vs.now?Qr=function(e){Vs.now(Gs(e))}:mh&&!gv?(qs=(ph=new mh).port2,ph.port1.onmessage=yh,Qr=Lr(qs.postMessage,qs)):P.addEventListener&&re(P.postMessage)&&!P.importScripts&&Mi&&Mi.protocol!=="file:"&&!ee(Dh)?(Qr=Dh,P.addEventListener("message",yh,!1)):Qr="onreadystatechange"in ki("script")?function(e){Uu.appendChild(ki("script")).onreadystatechange=function(){Uu.removeChild(this),lc(e)}}:function(e){setTimeout(Gs(e),0)});var ci,Ar,Fi,an,Js,Xs,Ys,Ch,vv={set:tl},wF=/ipad|iphone|ipod/i.test(dn)&&P.Pebble!==void 0,EF=/web0s(?!.*chrome)/i.test(dn),BF=Zi.f,Zs=vv.set,bh=P.MutationObserver||P.WebKitMutationObserver,wh=P.document,Eh=P.process,Eo=P.Promise,Bh=BF(P,"queueMicrotask"),mv=Bh&&Bh.value;mv||(ci=function(){var e,t;for(Gt&&(e=Eh.domain)&&e.exit();Ar;){t=Ar.fn,Ar=Ar.next;try{t()}catch(r){throw Ar?an():Fi=void 0,r}}Fi=void 0,e&&e.enter()},gv||Gt||EF||!bh||!wh?!wF&&Eo&&Eo.resolve?((Ys=Eo.resolve(void 0)).constructor=Eo,Ch=Lr(Ys.then,Ys),an=function(){Ch(ci)}):Gt?an=function(){Eh.nextTick(ci)}:(Zs=Lr(Zs,P),an=function(){Zs(ci)}):(Js=!0,Xs=wh.createTextNode(""),new bh(ci).observe(Xs,{characterData:!0}),an=function(){Xs.data=Js=!Js}));var Qs,Ah,yv,Fh,Dv=mv||function(e){var t={fn:e,next:void 0};Fi&&(Fi.next=t),Ar||(Ar=t,an()),Fi=t},AF=function(e){var t,r;this.promise=new e(function(n,i){if(t!==void 0||r!==void 0)throw TypeError("Bad Promise constructor");t=n,r=i}),this.resolve=Yt(t),this.reject=Yt(r)},cc={f:function(e){return new AF(e)}},rl=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},FF=typeof window=="object",Cv=vv.set,xF=ye("species"),ft="Promise",xh=je.getterFor(ft),OF=je.set,SF=je.getterFor(ft),br=ga&&ga.prototype,pt=ga,fi=br,bv=P.TypeError,nl=P.document,fc=P.process,pn=cc.f,_F=pn,PF=!!(nl&&nl.createEvent&&P.dispatchEvent),wv=re(P.PromiseRejectionEvent),Ev=!1,xi=ji(ft,function(){var e=ka(pt),t=e!==String(pt);if(!t&&Pi===66)return!0;if(Pi>=51&&/native code/.test(e))return!1;var r=new pt(function(i){i(1)}),n=function(i){i(function(){},function(){})};return(r.constructor={})[xF]=n,!(Ev=r.then(function(){})instanceof n)||!t&&FF&&!wv}),kF=xi||!Kl(function(e){pt.all(e).catch(function(){})}),Bv=function(e){var t;return!(!ue(e)||!re(t=e.then))&&t},dc=function(e,t){if(!e.notified){e.notified=!0;var r=e.reactions;Dv(function(){for(var n=e.value,i=e.state==1,o=0;r.length>o;){var a,s,u,l=r[o++],f=i?l.ok:l.fail,c=l.resolve,d=l.reject,p=l.domain;try{f?(i||(e.rejection===2&&jF(e),e.rejection=1),f===!0?a=n:(p&&p.enter(),a=f(n),p&&(p.exit(),u=!0)),a===l.promise?d(bv("Promise-chain cycle")):(s=Bv(a))?Z(s,a,c,d):c(a)):d(n)}catch(h){p&&!u&&p.exit(),d(h)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&TF(e)})}},Av=function(e,t,r){var n,i;PF?((n=nl.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),P.dispatchEvent(n)):n={promise:t,reason:r},!wv&&(i=P["on"+e])?i(n):e==="unhandledrejection"&&function(o,a){var s=P.console;s&&s.error&&(arguments.length==1?s.error(o):s.error(o,a))}("Unhandled promise rejection",r)},TF=function(e){Z(Cv,P,function(){var t,r=e.facade,n=e.value;if(Oh(e)&&(t=rl(function(){Gt?fc.emit("unhandledRejection",n,r):Av("unhandledrejection",r,n)}),e.rejection=Gt||Oh(e)?2:1,t.error))throw t.value})},Oh=function(e){return e.rejection!==1&&!e.parent},jF=function(e){Z(Cv,P,function(){var t=e.facade;Gt?fc.emit("rejectionHandled",t):Av("rejectionhandled",t,e.value)})},cn=function(e,t,r){return function(n){e(t,n,r)}},gn=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,dc(e,!0))},il=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw bv("Promise can't be resolved itself");var n=Bv(t);n?Dv(function(){var i={done:!1};try{Z(n,t,cn(il,i,e),cn(gn,i,e))}catch(o){gn(i,o,e)}}):(e.value=t,e.state=1,dc(e,!1))}catch(i){gn({done:!1},i,e)}}};if(xi&&(fi=(pt=function(e){Ua(this,fi),Yt(e),Z(Qs,this);var t=xh(this);try{e(cn(il,t),cn(gn,t))}catch(r){gn(t,r)}}).prototype,(Qs=function(e){OF(this,{type:ft,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=An(fi,{then:function(e,t){var r=SF(this),n=r.reactions,i=pn(hv(this,pt));return i.ok=!re(e)||e,i.fail=re(t)&&t,i.domain=Gt?fc.domain:void 0,r.parent=!0,n[n.length]=i,r.state!=0&&dc(r,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),Ah=function(){var e=new Qs,t=xh(e);this.promise=e,this.resolve=cn(il,t),this.reject=cn(gn,t)},cc.f=pn=function(e){return e===pt||e===yv?new Ah(e):_F(e)},re(ga)&&br!==Object.prototype)){Fh=br.then,Ev||(qe(br,"then",function(e,t){var r=this;return new pt(function(n,i){Z(Fh,r,n,i)}).then(e,t)},{unsafe:!0}),qe(br,"catch",fi.catch,{unsafe:!0}));try{delete br.constructor}catch{}Bn&&Bn(br,fi)}me({global:!0,wrap:!0,forced:xi},{Promise:pt}),la(pt,ft,!1),uc(ft),yv=zr(ft),me({target:ft,stat:!0,forced:xi},{reject:function(e){var t=pn(this);return Z(t.reject,void 0,e),t.promise}}),me({target:ft,stat:!0,forced:xi},{resolve:function(e){return function(t,r){if(be(t),ue(r)&&r.constructor===t)return r;var n=cc.f(t);return(0,n.resolve)(r),n.promise}(this,e)}}),me({target:ft,stat:!0,forced:kF},{all:function(e){var t=this,r=pn(t),n=r.resolve,i=r.reject,o=rl(function(){var a=Yt(t.resolve),s=[],u=0,l=1;Li(e,function(f){var c=u++,d=!1;l++,Z(a,t,f).then(function(p){d||(d=!0,s[c]=p,--l||n(s))},i)}),--l||n(s)});return o.error&&i(o.value),r.promise},race:function(e){var t=this,r=pn(t),n=r.reject,i=rl(function(){var o=Yt(t.resolve);Li(e,function(a){Z(o,t,a).then(r.resolve,n)})});return i.error&&n(i.value),r.promise}});var en=Ma.UNSUPPORTED_Y,RF=Math.min,Fv=[].push,NF=U(/./.exec),tn=U(Fv),di=U("".slice);function xn(e){Promise.resolve().then(e)}function $F(e){return"w-e-element-"+e}tc("split",function(e,t,r){var n;return n="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a=ie(rt(this)),s=o===void 0?4294967295:o>>>0;if(s===0)return[];if(i===void 0)return[a];if(!zl(i))return Z(t,a,i,s);for(var u,l,f,c=[],d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),p=0,h=new RegExp(i.source,d+"g");(u=Z(Ni,h,a))&&!((l=h.lastIndex)>p&&(tn(c,di(a,p,u.index)),u.length>1&&u.index<a.length&&ec(Fv,c,Yu(u,1)),f=u[0].length,p=l,c.length>=s));)h.lastIndex===u.index&&h.lastIndex++;return p===a.length?!f&&NF(h,"")||tn(c,""):tn(c,di(a,p)),c.length>s?Yu(c,0,s):c}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Z(t,this,i,o)}:t,[function(i,o){var a=rt(this),s=i==null?void 0:$r(i,e);return s?Z(s,i,a,o):Z(n,ie(a),i,o)},function(i,o){var a=be(this),s=ie(i),u=r(n,a,s,o,n!==t);if(u.done)return u.value;var l=hv(a,RegExp),f=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(en?"g":"y"),d=new l(en?"^(?:"+a.source+")":a,c),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(s.length===0)return $i(d,s)===null?[s]:[];for(var h=0,g=0,v=[];g<s.length;){d.lastIndex=en?0:g;var D,C=$i(d,en?di(s,g):s);if(C===null||(D=RF(Pn(d.lastIndex+(en?g:0)),s.length))===h)g=rc(s,g,f);else{if(tn(v,di(s,h,g)),v.length===p)return v;for(var b=1;b<=C.length-1;b++)if(tn(v,C[b]),v.length===p)return v;g=h=D}}return tn(v,di(s,h)),v}]},!!ee(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"}),en);var LF=lt.f,MF=Ti.f,IF=je.enforce,UF=ye("match"),Tt=P.RegExp,sn=Tt.prototype,HF=P.SyntaxError,zF=U(Hl),WF=U(sn.exec),Bo=U("".charAt),Sh=U("".replace),_h=U("".indexOf),qF=U("".slice),VF=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,kr=/a/g,eu=/a/g,KF=new Tt(kr)!==kr,xv=Ma.MISSED_STICKY,GF=Ma.UNSUPPORTED_Y,JF=xe&&(!KF||xv||Yl||Zl||ee(function(){return eu[UF]=!1,Tt(kr)!=kr||Tt(eu)==eu||Tt(kr,"i")!="/a/i"}));if(ji("RegExp",JF)){for(var zt=function(e,t){var r,n,i,o,a,s,u=Nr(sn,this),l=zl(e),f=t===void 0,c=[],d=e;if(!u&&l&&f&&e.constructor===zt)return e;if((l||Nr(sn,e))&&(e=e.source,f&&(t="flags"in d?d.flags:zF(d))),e=e===void 0?"":ie(e),t=t===void 0?"":ie(t),d=e,Yl&&"dotAll"in kr&&(n=!!t&&_h(t,"s")>-1)&&(t=Sh(t,/s/g,"")),r=t,xv&&"sticky"in kr&&(i=!!t&&_h(t,"y")>-1)&&GF&&(t=Sh(t,/y/g,"")),Zl&&(o=function(p){for(var h,g=p.length,v=0,D="",C=[],b={},A=!1,E=!1,x=0,_="";v<=g;v++){if((h=Bo(p,v))==="\\")h+=Bo(p,++v);else if(h==="]")A=!1;else if(!A)switch(!0){case h==="[":A=!0;break;case h==="(":WF(VF,qF(p,v+1))&&(v+=2,E=!0),D+=h,x++;continue;case(h===">"&&E):if(_===""||Ce(b,_))throw new HF("Invalid capture group name");b[_]=!0,C[C.length]=[_,x],E=!1,_="";continue}E?_+=h:D+=h}return[D,C]}(e),e=o[0],c=o[1]),a=rv(Tt(e,t),u?this:sn,zt),(n||i||c.length)&&(s=IF(a),n&&(s.dotAll=!0,s.raw=zt(function(p){for(var h,g=p.length,v=0,D="",C=!1;v<=g;v++)(h=Bo(p,v))!=="\\"?C||h!=="."?(h==="["?C=!0:h==="]"&&(C=!1),D+=h):D+="[\\s\\S]":D+=h+Bo(p,++v);return D}(e),r)),i&&(s.sticky=!0),c.length&&(s.groups=c)),e!==d)try{st(a,"source",d===""?"(?:)":d)}catch{}return a},XF=function(e){e in zt||LF(zt,e,{configurable:!0,get:function(){return Tt[e]},set:function(t){Tt[e]=t}})},Ph=MF(Tt),kh=0;Ph.length>kh;)XF(Ph[kh++]);sn.constructor=zt,zt.prototype=sn,qe(P,"RegExp",zt)}uc("RegExp");var YF=lt.f,Th=Ia.fastKey,jh=je.set,tu=je.getterFor,ZF={getConstructor:function(e,t,r,n){var i=e(function(l,f){Ua(l,o),jh(l,{type:t,index:$a(null),first:void 0,last:void 0,size:0}),xe||(l.size=0),f!=null&&Li(f,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=tu(t),s=function(l,f,c){var d,p,h=a(l),g=u(l,f);return g?g.value=c:(h.last=g={index:p=Th(f,!0),key:f,value:c,previous:d=h.last,next:void 0,removed:!1},h.first||(h.first=g),d&&(d.next=g),xe?h.size++:l.size++,p!=="F"&&(h.index[p]=g)),l},u=function(l,f){var c,d=a(l),p=Th(f);if(p!=="F")return d.index[p];for(c=d.first;c;c=c.next)if(c.key==f)return c};return An(o,{clear:function(){for(var l=a(this),f=l.index,c=l.first;c;)c.removed=!0,c.previous&&(c.previous=c.previous.next=void 0),delete f[c.index],c=c.next;l.first=l.last=void 0,xe?l.size=0:this.size=0},delete:function(l){var f=this,c=a(f),d=u(f,l);if(d){var p=d.next,h=d.previous;delete c.index[d.index],d.removed=!0,h&&(h.next=p),p&&(p.previous=h),c.first==d&&(c.first=p),c.last==d&&(c.last=h),xe?c.size--:f.size--}return!!d},forEach:function(l){for(var f,c=a(this),d=Lr(l,arguments.length>1?arguments[1]:void 0);f=f?f.next:c.first;)for(d(f.value,f.key,this);f&&f.removed;)f=f.previous},has:function(l){return!!u(this,l)}}),An(o,r?{get:function(l){var f=u(this,l);return f&&f.value},set:function(l,f){return s(this,l===0?0:l,f)}}:{add:function(l){return s(this,l=l===0?0:l,l)}}),xe&&YF(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=tu(t),o=tu(n);Jl(e,t,function(a,s){jh(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,u=a.last;u&&u.removed;)u=u.previous;return a.target&&(a.last=u=u?u.next:a.state.first)?s=="keys"?{value:u.key,done:!1}:s=="values"?{value:u.value,done:!1}:{value:[u.key,u.value],done:!1}:(a.target=void 0,{value:void 0,done:!0})},r?"entries":"values",!r,!0),uc(t)}};nv("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},ZF);var yi=function(e){return e!=null},QF={object:!0,function:!0,undefined:!0},e2=function(e){if(!function(t){return!!yi(t)&&hasOwnProperty.call(QF,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},t2=/^\s*class[\s{/}]/,r2=Function.prototype.toString,Rh=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!e2(t)}(e)&&!t2.test(r2.call(e))},hc=function(e){return e!=null},n2=Object.keys,i2=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return n2(hc(e)?Object(e):e)},o2=function(e){if(!hc(e))throw new TypeError("Cannot use null or undefined");return e},a2=Math.max,Nh=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var r,n,i,o=a2(arguments.length,2);for(e=Object(o2(e)),i=function(a){try{e[a]=t[a]}catch(s){r||(r=s)}},n=1;n<o;++n)i2(t=arguments[n]).forEach(i);if(r!==void 0)throw r;return e},s2=Array.prototype.forEach,u2=Object.create,l2=function(e,t){var r;for(r in e)t[r]=e[r]},$h=function(e){var t=u2(null);return s2.call(arguments,function(r){hc(r)&&l2(Object(r),t)}),t},ru="razdwatrzy",c2=String.prototype.indexOf,hi=typeof ru.contains=="function"&&ru.contains("dwa")===!0&&ru.contains("foo")===!1?String.prototype.contains:function(e){return c2.call(this,e,arguments[1])>-1},Ao=Xi(function(e){var t=e.exports=function(r,n){var i,o,a,s,u;return arguments.length<2||typeof r!="string"?(s=n,n=r,r=null):s=arguments[2],yi(r)?(i=hi.call(r,"c"),o=hi.call(r,"e"),a=hi.call(r,"w")):(i=a=!0,o=!1),u={value:n,configurable:i,enumerable:o,writable:a},s?Nh($h(s),u):u};t.gs=function(r,n,i){var o,a,s,u;return typeof r!="string"?(s=i,i=n,n=r,r=null):s=arguments[3],yi(n)?Rh(n)?yi(i)?Rh(i)||(s=i,i=void 0):i=void 0:(s=n,n=i=void 0):n=void 0,yi(r)?(o=hi.call(r,"c"),a=hi.call(r,"e")):(o=!0,a=!1),u={get:n,set:i,configurable:o,enumerable:a},s?Nh($h(s),u):u}}),nu=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e};Xi(function(e,t){var r,n,i,o,a,s,u,l=Function.prototype.apply,f=Function.prototype.call,c=Object.create,d=Object.defineProperty,p=Object.defineProperties,h=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(v,D){var C;return nu(D),h.call(this,"__ee__")?C=this.__ee__:(C=g.value=c(null),d(this,"__ee__",g),g.value=null),C[v]?typeof C[v]=="object"?C[v].push(D):C[v]=[C[v],D]:C[v]=D,this},n=function(v,D){var C,b;return nu(D),b=this,r.call(this,v,C=function(){i.call(b,v,C),l.call(D,this,arguments)}),C.__eeOnceListener__=D,this},i=function(v,D){var C,b,A,E;if(nu(D),!h.call(this,"__ee__"))return this;if(!(C=this.__ee__)[v])return this;if(typeof(b=C[v])=="object")for(E=0;A=b[E];++E)A!==D&&A.__eeOnceListener__!==D||(b.length===2?C[v]=b[E?0:1]:b.splice(E,1));else b!==D&&b.__eeOnceListener__!==D||delete C[v];return this},o=function(v){var D,C,b,A,E;if(h.call(this,"__ee__")&&(A=this.__ee__[v]))if(typeof A=="object"){for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];for(A=A.slice(),D=0;b=A[D];++D)l.call(b,this,E)}else switch(arguments.length){case 1:f.call(A,this);break;case 2:f.call(A,this,arguments[1]);break;case 3:f.call(A,this,arguments[1],arguments[2]);break;default:for(C=arguments.length,E=new Array(C-1),D=1;D<C;++D)E[D-1]=arguments[D];l.call(A,this,E)}},a={on:r,once:n,off:i,emit:o},s={on:Ao(r),once:Ao(n),off:Ao(i),emit:Ao(o)},u=p({},s),e.exports=t=function(v){return v==null?c(u):p(Object(v),s)},t.methods=a});function pc(e){var t=L.getTextarea(e).$textAreaContainer,r=t.width(),n=t.height(),i=t.offset();return{top:i.top,left:i.left,width:r,height:n}}function f2(e){var t={top:"0",left:"0"},r=e.selection;if(r==null)return t;var n=pc(e);if(n==null)return t;var i=n.top,o=n.left,a=n.width,s=n.height,u=L.toDOMRange(e,r).getClientRects()[0];if(u==null)return t;u.width;var l=u.height,f={},c=u.top-i,d=u.left-o;if(d>a/2){var p=a-d;f.right=p+5+"px"}else f.left=d+5+"px";if(c>s/2){var h=s-c;f.bottom=h+5+"px"}else{var g=c+l;g<0&&(g=0),f.top=g+5+"px"}return f}function d2(e,t,r){var n={top:"0",left:"0"};if(e.selection==null)return n;var i=Q.isElement(t)&&e.isVoid(t),o=Q.isElement(t)&&e.isInline(t),a=za.get(t);if(a==null)return n;var s=a.getBoundingClientRect(),u=s.top,l=s.left,f=s.height,c=s.width;if(i){var d=function(_){var T=[];T.push(_);for(var k=0;T.length>0;){var M=T.pop();if(M==null||++k>1e4)break;var R=M.nodeName;if(M.nodeType===1){var S=R.toLowerCase();if(oF.includes(S)||S==="iframe"||S==="video")return M;var z=M.children||[],G=z.length;if(G)for(var J=G-1;J>=0;J--)T.push(z[J])}}return null}(a);if(d!=null){var p=d.getBoundingClientRect();u=p.top,f=p.height}}var h=pc(e);if(h==null)return n;var g=h.top,v=h.left,D=h.width,C=h.height,b={},A=u-g,E=l-v;{var x;return i?o?E>(D-c)/2?b.right=D-E+5+"px":b.left=E+c+5+"px":b.left="20px":b.left=E+"px",i?((x=A)<0&&(x=0),b.top=x+"px"):A>(C-f)/2?b.bottom=C-A+5+"px":((x=A+f)<0&&(x=0),b.top=x+5+"px"),b}}function h2(e,t){xn(function(){var r=pc(e);if(r!=null){var n,i=r.top,o=r.left,a=r.width,s=r.height,u=t.offset(),l=u.top,f=u.left,c=t.width(),d=t.height(),p=l-i,h=f-o,g=t.attr("style");if(g.indexOf("top")>=0&&(n=p+d-s)>0){var v=t.css("top"),D=parseInt(v.toString())-n;D<0&&(D=0),t.css("top",D+"px")}if(g.indexOf("bottom")>=0&&l<0){var C=t.css("bottom"),b=parseInt(C.toString())-Math.abs(l);t.css("bottom",b+"px")}if(g.indexOf("left")>=0&&(n=h+c-a)>0){var A=t.css("left"),E=parseInt(A.toString())-n;E<0&&(E=0),t.css("left",E+"px")}if(g.indexOf("right")>=0&&f<0){var x=t.css("right"),_=parseInt(x.toString())-Math.abs(f);t.css("right",_+"px")}}})}var p2=La("slice"),g2=ye("species"),iu=P.Array,v2=Math.max;me({target:"Array",proto:!0,forced:!p2},{slice:function(e,t){var r,n,i,o=er(this),a=Wr(o),s=wn(e,a),u=wn(t===void 0?a:t,a);if(aa(o)&&(r=o.constructor,(Na(r)&&(r===iu||aa(r.prototype))||ue(r)&&(r=r[g2])===null)&&(r=void 0),r===iu||r===void 0))return pv(o,s,u);for(n=new(r===void 0?iu:r)(v2(u-s,0)),i=0;s<u;s++,i++)s in o&&Ri(n,i,o[s]);return n.length=i,n}});var m2=Zi.f,Lh=U("".startsWith),y2=U("".slice),D2=Math.min,Ov=ql("startsWith"),C2=!Ov&&!!function(){var e=m2(String.prototype,"startsWith");return e&&!e.writable}();me({target:"String",proto:!0,forced:!C2&&!Ov},{startsWith:function(e){var t=ie(rt(this));Wl(e);var r=Pn(D2(arguments.length>1?arguments[1]:void 0,t.length)),n=ie(e);return Lh?Lh(t,n,r):y2(t,r,r+n.length)===n}});var rn=Object.assign,Mh=Object.defineProperty,b2=U([].concat),Ih=!rn||ee(function(){if(xe&&rn({b:1},rn(Mh({},"a",{enumerable:!0,get:function(){Mh(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),rn({},e)[r]!=7||hn(rn({},t)).join("")!=n})?function(e,t){for(var r=Qt(e),n=arguments.length,i=1,o=qg.f,a=Hg.f;n>i;)for(var s,u=Ra(arguments[i++]),l=o?b2(hn(u),o(u)):hn(u),f=l.length,c=0;f>c;)s=l[c++],xe&&!Z(a,u,s)||(r[s]=u[s]);return r}:rn;me({target:"Object",stat:!0,forced:Object.assign!==Ih},{assign:Ih});var w2=["props","attrs","style","dataset","on","hook"];function Sv(e){var t=e.data,r=t===void 0?{}:t,n=e.children,i=n===void 0?[]:n;Object.keys(r).forEach(function(o){var a,s,u=r[o];if(o!=="key"){if(!w2.includes(o)){if(o.startsWith("data-")){var l=o.slice(5);return l=yC(l),function(f,c){f.data==null&&(f.data={});var d=f.data;d.dataset==null&&(d.dataset={}),Object.assign(d.dataset,c)}(e,((a={})[l]=u,a)),void delete r[o]}(function(f,c){f.data==null&&(f.data={});var d=f.data;d.props==null&&(d.props={}),Object.assign(d.props,c)})(e,(s={},s[o]=u,s)),delete r[o]}}else e.key=u}),i.length>0&&i.forEach(function(o){typeof o!="string"&&Sv(o)})}var _v=[],E2={};function B2(e,t,r){var n=r.isInline(e)?"span":"div";return Xt(n,null,t)}function A2(e,t){var r,n=L.findKey(t,e),i=t.isInline(e),o=m.isVoid(t,e),a=$F(n.id),s={id:a,key:n.id,"data-slate-node":"element","data-slate-inline":i},u=e.type,l=e.children,f=l===void 0?[]:l,c=function(C){return E2[C]||B2}(u);r=o?null:f.map(function(C,b){return ol(C,b,e,t)});var d=c(e,r,t);if(o){s["data-slate-void"]=!0;var p=i?"span":"div",h=Be($.texts(e),1),g=Be(h[0],1)[0],v=ol(g,0,e,t),D=Xt(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},v);d=Xt(p,{style:{position:"relative"}},d,D),nc.set(g,0),da.set(g,e)}return d.data==null&&(d.data={}),Object.assign(d.data,s),o||i||(d=function(C,b){var A=b;return _v.forEach(function(E){A=E(C,b)}),A}(e,d)),xn(function(){var C=sc(a);C!=null&&(oc.set(n,C),za.set(e,C),Ha.set(C,e))}),d}function Uh(e,t){return t===void 0&&(t=!1),Xt("span",{"data-slate-string":!0},t?e+`
|
|
41
41
|
`:e)}function ou(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),Xt("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?Xt("br",null):null)}function F2(e,t,r){if(e.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(e));var n=L.findKey(r,e),i=r.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var o=L.findPath(r,e),a=i([e,o]),s=W.decorations(e,a),u=s.map(function(c,d){var p=function(h,g,v,D,C){g===void 0&&(g=!1);var b=h.text,A=L.findPath(C,v),E=w.parent(A);if(m.isEditor(D))throw new Error("Text node "+JSON.stringify(v)+" parent is Editor");return C.isVoid(D)?ou($.string(D).length):b!==""||D.children[D.children.length-1]!==v||C.isInline(D)||m.string(C,E)!==""?b===""?ou():g&&b.slice(-1)===`
|
|
42
42
|
`?Uh(b,!0):Uh(b):ou(0,!0)}(c,d===s.length-1,e,t,r);return p=function(h,g){var v=g;return _v.forEach(function(D){v=D(h,v)}),v}(c,p),Xt("span",{"data-slate-leaf":!0},p)}),l=function(c){return"w-e-text-"+c}(n.id),f=Xt("span",{"data-slate-node":"text",id:l,key:n.id},u);return xn(function(){var c=sc(l);c!=null&&(oc.set(n,c),za.set(e,c),Ha.set(c,e))}),f}function ol(e,t,r,n){return nc.set(e,t),da.set(e,r),Q.isElement(e)?A2(e,n):F2(e,r,n)}function x2(e,t){var r,n=e.$scroll,i=function(g){return"w-e-textarea-"+g}(e.id),o=t.getConfig(),a=o.readOnly,s=o.autoFocus,u=function(g,v){return v===void 0&&(v=!1),tt("div#"+g,{props:{contentEditable:!v}})}(i,a),l=t.children||[];u.children=l.map(function(g,v){var D=ol(g,v,t,t);return Sv(D),D});var f=sh.get(e);if(f==null&&(f=!0),f){var c=function(g,v){return j(`<div
|
|
43
43
|
id="`+g+`"
|
|
@@ -48,5 +48,5 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
48
48
|
spellCheck="true"
|
|
49
49
|
autoCorrect="true"
|
|
50
50
|
autoCapitalize="true"
|
|
51
|
-
></div>`)}(i);n.append(c),e.$textArea=c,r=c[0],(p=oD([dD,mD,ED,hD,vD,fD]))(r,u),sh.set(e,!1),uh.set(e,p)}else{var d=lh.get(e),p=uh.get(e);if(d==null||p==null)return;r=d.elm,p(d,u)}if(r!=null||(r=sc(i))!=null){if((f?s:t.isFocused())&&r.focus({preventScroll:!0}),f){var h=ac(r);h&&cv.set(t,h)}ic.set(t,r),za.set(t,r),Ha.set(r,t),lh.set(e,u)}}function Hh(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function zh(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function au(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return zh(r.overflowY,t)||zh(r.overflowX,t)||function(n){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)}(e)}return!1}function Fo(e,t,r,n,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0}function Wh(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,u=typeof a=="function"?a:function(tr){return tr!==a};if(!Hh(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,f=[],c=e;Hh(c)&&u(c);){if((c=c.parentElement)===l){f.push(c);break}c!=null&&c===document.body&&au(c)&&!au(document.documentElement)||c!=null&&au(c,s)&&f.push(c)}for(var d=r.visualViewport?r.visualViewport.width:innerWidth,p=r.visualViewport?r.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),D=v.height,C=v.width,b=v.top,A=v.right,E=v.bottom,x=v.left,_=i==="start"||i==="nearest"?b:i==="end"?E:b+D/2,T=o==="center"?x+C/2:o==="end"?A:x,k=[],M=0;M<f.length;M++){var R=f[M],S=R.getBoundingClientRect(),z=S.height,G=S.width,X=S.top,te=S.right,re=S.bottom,ke=S.left;if(n==="if-needed"&&b>=0&&x>=0&&E<=p&&A<=d&&b>=X&&E<=re&&x>=ke&&A<=te)return k;var he=getComputedStyle(R),V=parseInt(he.borderLeftWidth,10),Oe=parseInt(he.borderTopWidth,10),ce=parseInt(he.borderRightWidth,10),ue=parseInt(he.borderBottomWidth,10),J=0,ne=0,oe="offsetWidth"in R?R.offsetWidth-R.clientWidth-V-ce:0,De="offsetHeight"in R?R.offsetHeight-R.clientHeight-Oe-ue:0;if(l===R)J=i==="start"?_:i==="end"?_-p:i==="nearest"?Fo(g,g+p,p,Oe,ue,g+_,g+_+D,D):_-p/2,ne=o==="start"?T:o==="center"?T-d/2:o==="end"?T-d:Fo(h,h+d,d,V,ce,h+T,h+T+C,C),J=Math.max(0,J+g),ne=Math.max(0,ne+h);else{J=i==="start"?_-X-Oe:i==="end"?_-re+ue+De:i==="nearest"?Fo(X,re,z,Oe,ue+De,_,_+D,D):_-(X+z/2)+De/2,ne=o==="start"?T-ke-V:o==="center"?T-(ke+G/2)+oe/2:o==="end"?T-te+ce+oe:Fo(ke,te,G,V,ce+oe,T,T+C,C);var Ie=R.scrollLeft,Ue=R.scrollTop;_+=Ue-(J=Math.max(0,Math.min(Ue+J,R.scrollHeight-z+De))),T+=Ie-(ne=Math.max(0,Math.min(Ie+ne,R.scrollWidth-G+oe)))}k.push({el:R,top:J,left:ne})}return k}function qh(e){return e===Object(e)&&Object.keys(e).length!==0}function O2(e,t){var r=!e.ownerDocument.documentElement.contains(e);if(qh(t)&&typeof t.behavior=="function")return t.behavior(r?[]:Wh(e,t));if(!r){var n=function(i){return i===!1?{block:"end",inline:"nearest"}:qh(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(s){var u=s.el,l=s.top,f=s.left;u.scroll&&a?u.scroll({top:l,left:f,behavior:o}):(u.scrollTop=l,u.scrollLeft=f)})}(Wh(e,n),n.behavior)}}function et(e,t){return Fn(t)&&L.hasDOMNode(e,t,{editable:!0})}function Vh(e,t){if(e.getConfig().readOnly)return!1;var r=un(e,t)&&L.toSlateNode(e,t);return m.isVoid(e,r)}function un(e,t){return Fn(t)&&L.hasDOMNode(e,t)}function Pv(e,t,r){r===void 0&&(r=!1);var n=t.selection,i=t.getConfig(),o=L.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||r)&&t.isFocused()){var a=o.type!=="None";if(n||a){var s=ic.get(t),u=!1;if(s.contains(o.anchorNode)&&s.contains(o.focusNode)&&(u=!0),a&&u&&n){var l=L.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&O.equals(l,n)){var f=!0;if(O.isCollapsed(n)){var c=o.anchorNode,d=o.anchorOffset;if(c===s){var p=s.childNodes,h=void 0;(h=p[d])&&h.matches("table")&&(f=!1),(h=p[d-1])&&h.matches("table")&&(f=!1)}}if(f)return}}if(!n||L.hasRange(t,n)){e.isUpdatingSelection=!0;var g=n&&L.toDOMRange(t,n);if(g){O.isBackward(n)?o.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):o.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var D=document.body;O2(v,{scrollMode:"if-needed",boundary:i.scroll?s.parentElement:D,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else o.removeAllRanges();setTimeout(function(){g&&Bi&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=L.toSlateRange(t,o,{exactMatch:!1,suppressThrow:!1})}}}var su=new WeakMap,Kh=new WeakMap,S2={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},_2={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},P2={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},fe=function(e){var t=S2[e],r=_2[e],n=P2[e],i=t&&ds(t),o=r&&ds(r),a=n&&ds(n);return function(s){return!(!i||!i(s))||!!(Zu&&o&&o(s))||!(Zu||!a||!a(s))}},ve={isBold:fe("bold"),isCompose:fe("compose"),isMoveBackward:fe("moveBackward"),isMoveForward:fe("moveForward"),isDeleteBackward:fe("deleteBackward"),isDeleteForward:fe("deleteForward"),isDeleteLineBackward:fe("deleteLineBackward"),isDeleteLineForward:fe("deleteLineForward"),isDeleteWordBackward:fe("deleteWordBackward"),isDeleteWordForward:fe("deleteWordForward"),isExtendBackward:fe("extendBackward"),isExtendForward:fe("extendForward"),isExtendLineBackward:fe("extendLineBackward"),isExtendLineForward:fe("extendLineForward"),isItalic:fe("italic"),isMoveLineBackward:fe("moveLineBackward"),isMoveLineForward:fe("moveLineForward"),isMoveWordBackward:fe("moveWordBackward"),isMoveWordForward:fe("moveWordForward"),isRedo:fe("redo"),isSplitBlock:fe("splitBlock"),isTransposeCharacter:fe("transposeCharacter"),isUndo:fe("undo"),isTab:fe("tab"),isSelectAll:fe("selectAll")};function Ee(e){e.preventDefault()}var k2={beforeinput:function(e,t,r){var n=e,i=r.getConfig().readOnly;if(li&&!i&&et(r,n.target)){var o=r.selection,a=n.inputType,s=n.dataTransfer||n.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(n.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=Be(n.getTargetRanges(),1)[0];if(u){var l=L.toSlateRange(r,u,{exactMatch:!1,suppressThrow:!1});o&&O.equals(o,l)||N.select(r,l)}}if(o&&O.isExpanded(o)&&a.startsWith("delete")){var f=a.endsWith("Backward")?"backward":"forward";m.deleteFragment(r,{direction:f})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":m.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":m.deleteForward(r);break;case"deleteContentBackward":m.deleteBackward(r);break;case"deleteEntireSoftLine":m.deleteBackward(r,{unit:"line"}),m.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":m.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":m.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":m.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":m.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":m.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":m.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":m.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!Ws.get(r))break;s instanceof DataTransfer?r.insertData(s):typeof s=="string"&&m.insertText(r,s)}}}},blur:function(e,t,r){var n=e,i=t.isUpdatingSelection,o=t.latestElement;if(!r.getConfig().readOnly&&!i&&et(r,n.target)){var a=L.findDocumentOrShadowRoot(r);if(o!==a.activeElement){var s=n.relatedTarget;if(!(s===L.toDOMNode(r,r)||ct(s)&&s.hasAttribute("data-slate-spacer"))){if(s!=null&&Fn(s)&&L.hasDOMNode(r,s)){var u=L.toSlateNode(r,s);if(Q.isElement(u)&&!r.isVoid(u))return}if(ui){var l=a.getSelection();l==null||l.removeAllRanges()}ha.delete(r)}}}},focus:function(e,t,r){var n=L.toDOMNode(r,r),i=L.findDocumentOrShadowRoot(r);t.latestElement=i.activeElement,Bi&&e.target!==n?n.focus():ha.set(r,!0)},click:function(e,t,r){if(!r.getConfig().readOnly&&un(r,e.target)&&Fn(e.target)){var n=L.toSlateNode(r,e.target),i=L.findPath(r,n);if(m.hasPath(r,i)&&$.get(r,i)===n){var o=m.start(r,i),a=m.end(r,i),s=m.void(r,{at:o}),u=m.void(r,{at:a});if(s&&u&&w.equals(s[1],u[1])){var l=m.range(r,o);N.select(r,l)}}}},compositionstart:function(e,t,r){if(et(r,e.target)){var n=r.selection;if(n&&O.isExpanded(n)&&(m.deleteFragment(r),Promise.resolve().then(function(){Pv(t,r,!0)})),n&&O.isCollapsed(n)){var i=L.toDOMRange(r,n).startContainer,o=i.textContent||"";su.set(r,o),Kh.set(r,i)}t.isComposing=!0,function(a,s){var u;s.getConfig().placeholder&&s.isEmpty()&&a.showPlaceholder&&((u=a.$placeholder)===null||u===void 0||u.hide(),a.showPlaceholder=!1)}(t,r)}},compositionend:function(e,t,r){var n=e;if(et(r,n.target)){t.isComposing=!1;var i=r.selection;if(i!=null){(Qu||Bi)&&L.cleanExposedTexNodeInSelectionBlock(r);for(var o=O.isBackward(i)?i.focus:i.anchor,a=Be(m.node(r,[o.path[0]]),1)[0],s=0;s<o.path.length;s++){var u=Be(m.node(r,o.path.slice(0,s+1)),1)[0];if(Q.isElement(u)&&((ui||Bi)&&u.type==="link"||u.type==="code")){L.setNewKey(a);break}}var l=n.data;if(l){if(r.getConfig().maxLength){var f=L.getLeftLengthOfMaxLength(r);f<l.length?(L.toDOMRange(r,i).startContainer.textContent=su.get(r)||"",f>0&&m.insertText(r,l.slice(0,f)),t.changeViewState()):m.insertText(r,l)}else m.insertText(r,l);ui||setTimeout(function(){var c=r.selection;if(c!=null){var d=Kh.get(r);d!=null&&L.toDOMRange(r,c).startContainer!==d&&(d.textContent=su.get(r)||"")}})}}}},compositionupdate:function(e,t,r){et(r,e.target)&&(t.isComposing=!0)},keydown:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&!t.isComposing&&et(r,n.target)){if(function(a,s){var u=uv.get(a),l=u&&u.getMenus(),f=lv.get(a),c=f&&f.getMenus(),d=fa(fa({},l),c);for(var p in d){var h=d[p],g=h.hotkey;if(g&&wC(g,s)&&!h.isDisabled(a)){var v=h.getValue(a);h.exec(a,v)}}}(r,n),ve.isTab(n))return Ee(n),void r.handleTab();if(ve.isRedo(n))return Ee(n),void(typeof r.redo=="function"&&r.redo());if(ve.isUndo(n))return Ee(n),void(typeof r.undo=="function"&&r.undo());if(ve.isMoveLineBackward(n))return Ee(n),void N.move(r,{unit:"line",reverse:!0});if(ve.isMoveLineForward(n))return Ee(n),void N.move(r,{unit:"line"});if(ve.isExtendLineBackward(n))return Ee(n),void N.move(r,{unit:"line",edge:"focus",reverse:!0});if(ve.isExtendLineForward(n))return Ee(n),void N.move(r,{unit:"line",edge:"focus"});if(ve.isMoveBackward(n))return Ee(n),void(i&&O.isCollapsed(i)?N.move(r,{reverse:!0}):N.collapse(r,{edge:"start"}));if(ve.isMoveForward(n))return Ee(n),void(i&&O.isCollapsed(i)?N.move(r):N.collapse(r,{edge:"end"}));if(ve.isMoveWordBackward(n))return Ee(n),i&&O.isExpanded(i)&&N.collapse(r,{edge:"focus"}),void N.move(r,{unit:"word",reverse:!0});if(ve.isMoveWordForward(n))return Ee(n),i&&O.isExpanded(i)&&N.collapse(r,{edge:"focus"}),void N.move(r,{unit:"word"});if(ve.isSelectAll(n))return Ee(n),void r.selectAll();if(li){if((Qu||ui)&&i&&(ve.isDeleteBackward(n)||ve.isDeleteForward(n))&&O.isCollapsed(i)){var o=$.parent(r,i.anchor.path);if(Q.isElement(o)&&m.isVoid(r,o)&&m.isInline(r,o))return n.preventDefault(),void N.delete(r,{unit:"block"})}}else{if(ve.isBold(n)||ve.isItalic(n)||ve.isTransposeCharacter(n))return void Ee(n);if(ve.isSplitBlock(n))return Ee(n),void m.insertBreak(r);if(ve.isDeleteBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r));if(ve.isDeleteForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r));if(ve.isDeleteLineBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"line"}));if(ve.isDeleteLineForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"line"}));if(ve.isDeleteWordBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"word"}));if(ve.isDeleteWordForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"word"}))}}},keypress:function(e,t,r){if(!li&&!r.getConfig().readOnly&&et(r,e.target)){e.preventDefault();var n=e.key;m.insertText(r,n)}},copy:function(e,t,r){var n=e;if(et(r,n.target)){n.preventDefault();var i=n.clipboardData;i!=null&&r.setFragmentData(i)}},cut:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&et(r,n.target)){n.preventDefault();var o=n.clipboardData;if(o!=null&&(r.setFragmentData(o),i))if(O.isExpanded(i))m.deleteFragment(r);else{var a=$.parent(r,i.anchor.path);m.isVoid(r,a)&&N.delete(r)}}},paste:function(e,t,r){Ws.set(r,!0);var n=e;if(!r.getConfig().readOnly&&et(r,n.target)){var i=r.getConfig().customPaste;if(i&&i(r,n)===!1)return void Ws.set(r,!1);if(!li||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(n)){n.preventDefault();var o=n.clipboardData;o!=null&&r.insertData(o)}}},dragover:function(e,t,r){if(un(r,e.target)){var n=L.toSlateNode(r,e.target);m.isVoid(r,n)&&e.preventDefault()}},dragstart:function(e,t,r){var n=e;if(un(r,n.target)&&!r.getConfig().readOnly){var i=L.toSlateNode(r,n.target),o=L.findPath(r,i);if(m.isVoid(r,i)||m.void(r,{at:o,voids:!0})){var a=m.range(r,o);N.select(r,a)}var s=n.dataTransfer;s!=null&&(t.isDraggingInternally=!0,r.setFragmentData(s))}},dragend:function(e,t,r){var n=e;r.getConfig().readOnly||t.isDraggingInternally&&un(r,n.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,r){var n=e,i=n.dataTransfer;if(!r.getConfig().readOnly&&un(r,n.target)&&i!=null&&!(li&&ui&&i.files.length>0)){n.preventDefault();var o=r.selection,a=L.findEventRange(r,n);N.select(r,a),t.isDraggingInternally&&(o&&N.delete(r,{at:o}),t.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},T2=1;(function(){function e(t){var r=this;this.id=T2++,this.$textArea=null,this.$progressBar=j('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=j('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=se.t(function(){var a=r.editorInstance;(function(s,u){var l=s.isComposing,f=s.isUpdatingSelection,c=s.isDraggingInternally;if(!(u.getConfig().readOnly||l||f||c)){var d=L.findDocumentOrShadowRoot(u),p=d.activeElement,h=L.toDOMNode(u,u),g=d.getSelection();if(p===h?(s.latestElement=p,ha.set(u,!0)):ha.delete(u),!g)return N.deselect(u);var v=g.anchorNode,D=g.focusNode,C=et(u,v)||Vh(u,v),b=et(u,D)||Vh(u,D);if(C&&b){var A=L.toSlateRange(u,g,{exactMatch:!1,suppressThrow:!1});N.select(u,A)}else N.deselect(u)}})(r,a)},100);var n=j(t);if(n.length===0)throw new Error("Cannot find textarea DOM by selector '"+t+"'");this.$box=n;var i=j('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),n.append(i);var o=j('<div class="w-e-scroll"></div>');i.append(o),this.$scroll=o,this.$textAreaContainer=i,xn(function(){var a=r.editorInstance,s=L.getWindow(a);s.document.addEventListener("selectionchange",r.onDOMSelectionChange),a.on("destroyed",function(){s.document.removeEventListener("selectionchange",r.onDOMSelectionChange)}),i.on("click",function(){return a.hidePanelOrModal()}),a.on("change",r.changeViewState.bind(r));var u=a.getConfig().onChange;u&&a.on("change",function(){return u(a)}),r.onFocusAndOnBlur(),a.on("change",r.changeMaxLengthInfo.bind(r)),r.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=rF.get(this);if(t==null)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,r=this.$textArea,n=this.$scroll,i=this.editorInstance;r!=null&&($y(k2,function(o,a){r.on(a,function(s){o(s,t,i)})}),i.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",se.t(function(){i.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,r=this.editorInstance,n=r.getConfig(),i=n.onBlur,o=n.onFocus;this.latestEditorSelection=r.selection,r.on("change",function(){t.latestEditorSelection==null&&r.selection!=null?setTimeout(function(){return o&&o(r)}):t.latestEditorSelection!=null&&r.selection==null&&setTimeout(function(){return i&&i(r)}),t.latestEditorSelection=r.selection})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,r=t.getConfig().maxLength;if(r){var n=r-L.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML=n+"/"+r}},e.prototype.changeProgress=function(t){var r=this.$progressBar;r.css("width",t+"%"),t>=100&&setTimeout(function(){r.hide(),r.css("width","0"),r.show()},1e3)},e.prototype.changeViewState=function(){var t=this,r=this.editorInstance;x2(this,r),function(n,i){var o,a=i.getConfig().placeholder;if(a){var s=i.isEmpty();if(s&&!n.showPlaceholder&&!n.isComposing){if(n.$placeholder==null){var u=j('<div class="w-e-text-placeholder">'+a+"</div>");n.$textAreaContainer.append(u),n.$placeholder=u}return n.$placeholder.show(),void(n.showPlaceholder=!0)}!s&&n.showPlaceholder&&((o=n.$placeholder)===null||o===void 0||o.hide(),n.showPlaceholder=!1)}}(this,r),xn(function(){Pv(t,r)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e})();tc("match",function(e,t,r){return[function(n){var i=rt(this),o=n==null?void 0:$r(n,e);return o?Z(o,n,i):new RegExp(n)[e](ae(i))},function(n){var i=be(this),o=ae(n),a=r(t,i,o);if(a.done)return a.value;if(!i.global)return $i(i,o);var s=i.unicode;i.lastIndex=0;for(var u,l=[],f=0;(u=$i(i,o))!==null;){var c=ae(u[0]);l[f]=c,c===""&&(i.lastIndex=rc(o,Pn(i.lastIndex),s)),f++}return f===0?null:l}]});function kv(e){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&kv(t)}function j2(){return j('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function R2(e,t,r,n,i){if(i===void 0&&(i=!1),t){if(n){var o=Zu?"cmd":"ctrl";n=n.replace("mod",o)}if(i)n&&(e.attr("data-tooltip",n),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=n?r+`
|
|
52
|
-
`+n:r;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var gc=function(){function e(t,r,n){var i=this;n===void 0&&(n=!1),this.$elem=j('<div class="w-e-bar-item"></div>'),this.$button=j('<button type="button"></button>'),this.disabled=!1,this.menu=r;var o=r.tag,a=r.width;if(o!=="button")throw new Error("Invalid tag '"+o+"', expected 'button'");var s=r.title,u=r.hotkey,l=u===void 0?"":u,f=r.iconSvg,c=f===void 0?"":f,d=this.$button;if(c){var p=j(c);kv(p),d.append(p)}else d.text(s);R2(d,c,s,l,n),n&&c&&d.append(j('<span class="title">'+s+"</span>")),a&&d.css("width",a+"px"),d.attr("data-menu-key",t),this.$elem.append(d),xn(function(){return i.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(r){r.preventDefault(),qt(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=qt(this),r=this.menu,n=r.getValue(t);r.exec(t,n)},e.prototype.setActive=function(){var t=qt(this),r=this.$button,n="active";this.menu.isActive(t)?r.addClass(n):r.removeClass(n)},e.prototype.setDisabled=function(){var t=qt(this),r=this.$button,n=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var i="disabled";n?r.addClass(i):r.removeClass(i),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}();(function(e){function t(r,n,i){return i===void 0&&(i=!1),e.call(this,r,n,i)||this}return Tn(t,e),t.prototype.onButtonClick=function(){},t})(gc);var vc=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var r=ah.get(t);r==null&&(r=new Set,ah.set(t,r)),r.add(this),jo.set(this,t)},e.prototype.renderContent=function(t){var r=this.$elem;r.empty(),r.append(t);var n=this.genSelfElem();n&&r.append(n)},e.prototype.appendTo=function(t){var r=this.$elem;t.append(r)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=jo.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=jo.get(this);t&&t.emit("modalOrPanelHide")}},e}(),N2=function(e){function t(r){var n=e.call(this,r)||this;return n.type="dropPanel",n.$elem=j('<div class="w-e-drop-panel"></div>'),n}return Tn(t,e),t.prototype.genSelfElem=function(){return null},t}(vc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var a=j2();o.$button.append(a)}return o}return Tn(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var r=this.menu;if(r.getPanelContentElem!=null){var n=qt(this);if(this.dropPanel==null){var i=new N2(n),o=r.getPanelContentElem(n);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=r.getPanelContentElem(n),a.renderContent(o),a.show())}var s=this.dropPanel;if(s.isShow){var u=this.$elem,l=u.offset().left,f=u.parents(".w-e-bar");l-f.offset().left>=f.width()/2?s.$elem.css({left:"none",right:"0"}):s.$elem.css({left:"0",right:"none"})}}},t})(gc);var $2=function(e){function t(r,n){n===void 0&&(n=0);var i=e.call(this,r)||this;i.type="modal",i.$elem=j('<div class="w-e-modal"></div>'),i.width=0,n&&(i.width=n);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),r.restoreSelection())}),i}return Tn(t,e),t.prototype.genSelfElem=function(){var r=this,n=j('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),i=jo.get(this);return n.on("click",function(){r.hide(),i==null||i.restoreSelection()}),n},t.prototype.setStyle=function(r){var n=this.width,i=this.$elem;i.attr("style",""),n&&i.css("width",n+"px"),i.css(r)},t}(vc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;return o.$body=j("body"),o.modal=null,o.menu=n,o}return Tn(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var r=qt(this),n=this.menu.getModalPositionNode(r);return Q.isElement(n)?d2(r,n):f2(r)},t.prototype.handleModal=function(){var r=qt(this),n=this.menu;if(this.modal==null){var i=new $2(r,n.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},t.prototype.renderAndShowModal=function(r,n){n===void 0&&(n=!1);var i=qt(this),o=this.menu;if(o.getModalContentElem!=null){var a=L.getTextarea(i),s=L.getToolbar(i),u=((s==null?void 0:s.getConfig())||{}).modalAppendToBody,l=o.getModalContentElem(i);if(r.renderContent(l),u)r.setStyle({left:"0",right:"0"});else{var f=this.getPosition();r.setStyle(f)}n&&(u?r.appendTo(this.$body):r.appendTo(a.$textAreaContainer)),r.show(),u||h2(i,r.$elem),setTimeout(function(){i.blur()})}},t})(gc);(function(e){function t(r,n){var i=e.call(this,r)||this;return i.type="selectList",i.$elem=j('<div class="w-e-select-list"></div>'),n&&i.$elem.css("width",n+"px"),i.$elem.on("click",function(o){o.stopPropagation()}),i}return Tn(t,e),t.prototype.renderList=function(r){var n=this.$elem;n.empty();var i=j("<ul></ul>");r.forEach(function(o){var a=o.value,s=o.text,u=o.selected,l=o.styleForRenderMenuList,f=j('<li data-value="'+a+'"></li>');if(l&&f.css(l),u){var c=j('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');f.append(c),f.addClass("selected")}f.append(j('<span data-value="'+a+'">'+s+"</span>")),f.attr("title",s),i.append(f)}),n.append(i)},t.prototype.genSelfElem=function(){return null},t})(vc);function qt(e){var t=nF.get(e);if(t==null)throw new Error("Can not get editor instance");return t}var L2=La("splice"),M2=P.TypeError,I2=Math.max,U2=Math.min;me({target:"Array",proto:!0,forced:!L2},{splice:function(e,t){var r,n,i,o,a,s,u=Qt(this),l=Wr(u),f=wn(e,l),c=arguments.length;if(c===0?r=n=0:c===1?(r=0,n=l-f):(r=c-2,n=U2(I2(Yi(t),0),l-f)),l+r-n>9007199254740991)throw M2("Maximum allowed length exceeded");for(i=Mg(u,n),o=0;o<n;o++)(a=f+o)in u&&Ri(i,o,u[a]);if(i.length=n,r<n){for(o=f;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:delete u[s];for(o=l;o>l-n+r;o--)delete u[o-1]}else if(r>n)for(o=l-n;o>f;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:delete u[s];for(o=0;o<r;o++)u[o+f]=arguments[o+2];return u.length=l-n+r,i}});var H2=_n.EXISTS,z2=lt.f,Tv=Function.prototype,W2=U(Tv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,q2=U(jv.exec);function Jt(e){return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function V2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.forEach(function(i){V2(e,i,r[i])})}return e}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mt(e,t,r){return t&&Gh(e.prototype,t),r&&Gh(e,r),e}function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e,t){if(t&&(Jt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mr(e)}function On(e){return On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},On(e)}function al(e,t){return al=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},al(e,t)}function Wa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&al(e,t)}xe&&!H2&&z2(Tv,"name",{configurable:!0,get:function(){try{return q2(jv,W2(this))[1]}catch{return""}}});var K2={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},jt=new(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Lt(this,e),this.init(t,r)}return Mt(e,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||K2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,r,n,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[r](t))}},{key:"create",value:function(t){return new e(this.logger,Ae({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),Zt=function(){function e(){Lt(this,e),this.observers={}}return Mt(e,[{key:"on",value:function(t,r){var n=this;return t.split(" ").forEach(function(i){n.observers[i]=n.observers[i]||[],n.observers[i].push(r)}),this}},{key:"off",value:function(t,r){this.observers[t]&&(r?this.observers[t]=this.observers[t].filter(function(n){return n!==r}):delete this.observers[t])}},{key:"emit",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach(function(s){s.apply(void 0,n)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(s){s.apply(s,[t].concat(n))})}}}]),e}();function pi(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function Jh(e){return e==null?"":""+e}function G2(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function mc(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function Xh(e,t,r){var n=mc(e,t,Object);n.obj[n.k]=r}function va(e,t){var r=mc(e,t),n=r.obj,i=r.k;if(n)return n[i]}function Yh(e,t,r){var n=va(e,r);return n!==void 0?n:va(t,r)}function Rv(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Rv(e[n],t[n],r):e[n]=t[n]);return e}function nn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function X2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return J2[t]}):e}var qa=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function Nv(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i||typeof i[n[o]]=="string"&&o+1<n.length)return;if(i[n[o]]===void 0){for(var a=2,s=n.slice(o,o+a).join(r),u=i[s];u===void 0&&n.length>o+a;)a++,u=i[s=n.slice(o,o+a).join(r)];if(u===void 0)return;if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s];var l=n.slice(o+a).join(r);return l?Nv(u,l,r):void 0}i=i[n[o]]}return i}}var Y2=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Lt(this,t),n=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(n)),n.data=r||{},n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return Wa(t,Zt),Mt(t,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var n=this.options.ns.indexOf(r);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[r,n];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(a?i.split(a):i)),r.indexOf(".")>-1&&(u=r.split("."));var l=va(this.data,u);return l||!s||typeof i!="string"?l:Nv(this.data&&this.data[r]&&this.data[r][n],i,a)}},{key:"addResource",value:function(r,n,i,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},s=this.options.keySeparator;s===void 0&&(s=".");var u=[r,n];i&&(u=u.concat(s?i.split(s):i)),r.indexOf(".")>-1&&(o=n,n=(u=r.split("."))[1]),this.addNamespaces(n),Xh(this.data,u,o),a.silent||this.emit("added",r,n,i,o)}},{key:"addResources",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in i)typeof i[a]!="string"&&Object.prototype.toString.apply(i[a])!=="[object Array]"||this.addResource(r,n,a,i[a],{silent:!0});o.silent||this.emit("added",r,n,i)}},{key:"addResourceBundle",value:function(r,n,i,o,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[r,n];r.indexOf(".")>-1&&(o=i,i=n,n=(u=r.split("."))[1]),this.addNamespaces(n);var l=va(this.data,u)||{};o?Rv(l,i,a):l=Ae({},l,i),Xh(this.data,u,l),s.silent||this.emit("added",r,n,i)}},{key:"removeResourceBundle",value:function(r,n){this.hasResourceBundle(r,n)&&delete this.data[r][n],this.removeNamespaces(n),this.emit("removed",r,n)}},{key:"hasResourceBundle",value:function(r,n){return this.getResource(r,n)!==void 0}},{key:"getResourceBundle",value:function(r,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ae({},{},this.getResource(r,n)):this.getResource(r,n)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),t}(),$v={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,r,n,i))}),t}},Zh={},Qh=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Lt(this,t),n=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(n)),G2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Mr(n)),n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=jt.create("translator"),n}return Wa(t,Zt),Mt(t,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;var i=this.resolve(r,n);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(r,n){var i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=n.ns||this.options.defaultNS;if(i&&r.indexOf(i)>-1){var s=r.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:r,namespaces:a};var u=r.split(i);(i!==o||i===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),r=u.join(o)}return typeof a=="string"&&(a=[a]),{key:r,namespaces:a}}},{key:"translate",value:function(r,n,i){var o=this;if(Jt(n)!=="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(r[r.length-1],n),u=s.key,l=s.namespaces,f=l[l.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){var p=n.nsSeparator||this.options.nsSeparator;return f+p+u}return u}var h=this.resolve(r,n),g=h&&h.res,v=h&&h.usedKey||u,D=h&&h.exactUsedKey||u,C=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],A=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,x=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(E&&g&&x&&b.indexOf(C)<0&&(typeof A!="string"||C!=="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,Ae({},n,{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var _=C==="[object Array]",T=_?[]:{},k=_?D:v;for(var M in g)if(Object.prototype.hasOwnProperty.call(g,M)){var R="".concat(k).concat(a).concat(M);T[M]=this.translate(R,Ae({},n,{joinArrays:!1,ns:l})),T[M]===R&&(T[M]=g[M])}g=T}}else if(E&&typeof A=="string"&&C==="[object Array]")(g=g.join(A))&&(g=this.extendTranslation(g,r,n,i));else{var S=!1,z=!1,G=n.count!==void 0&&typeof n.count!="string",X=t.hasDefaultValue(n),te=G?this.pluralResolver.getSuffix(c,n.count):"",re=n["defaultValue".concat(te)]||n.defaultValue;!this.isValidLookup(g)&&X&&(S=!0,g=re),this.isValidLookup(g)||(z=!0,g=u);var ke=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,he=ke&&z?void 0:g,V=X&&re!==g&&this.options.updateMissing;if(z||S||V){if(this.logger.log(V?"updateKey":"missingKey",c,f,u,V?re:g),a){var Oe=this.resolve(u,Ae({},n,{keySeparator:!1}));Oe&&Oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ce=[],ue=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ue&&ue[0])for(var J=0;J<ue.length;J++)ce.push(ue[J]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(n.lng||this.language):ce.push(n.lng||this.language);var ne=function(oe,De,Ie){o.options.missingKeyHandler?o.options.missingKeyHandler(oe,f,De,V?Ie:he,V,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(oe,f,De,V?Ie:he,V,n),o.emit("missingKey",oe,f,De,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?ce.forEach(function(oe){o.pluralResolver.getSuffixes(oe).forEach(function(De){ne([oe],u+De,n["defaultValue".concat(De)]||re)})}):ne(ce,u,re))}g=this.extendTranslation(g,r,n,h,i),z&&g===u&&this.options.appendNamespaceToMissingKey&&(g="".concat(f,":").concat(u)),(z||S)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(r,n,i,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)r=this.i18nFormat.parse(r,i,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(Ae({},i,{interpolation:Ae({},this.options.interpolation,i.interpolation)}));var u,l=i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var f=r.match(this.interpolator.nestingRegexp);u=f&&f.length}var c=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(c=Ae({},this.options.interpolation.defaultVariables,c)),r=this.interpolator.interpolate(r,c,i.lng||this.language,i),l){var d=r.match(this.interpolator.nestingRegexp);u<(d&&d.length)&&(i.nest=!1)}i.nest!==!1&&(r=this.interpolator.nest(r,function(){for(var g=arguments.length,v=new Array(g),D=0;D<g;D++)v[D]=arguments[D];return a&&a[0]===v[0]&&!i.context?(s.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(n[0])),null):s.translate.apply(s,v.concat([n]))},i)),i.interpolation&&this.interpolator.reset()}var p=i.postProcess||this.options.postProcess,h=typeof p=="string"?[p]:p;return r!=null&&h&&h.length&&i.applyPostProcessor!==!1&&(r=$v.handle(h,r,n,this.options&&this.options.postProcessPassResolved?Ae({i18nResolved:o},i):i,this)),r}},{key:"resolve",value:function(r){var n,i,o,a,s,u=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof r=="string"&&(r=[r]),r.forEach(function(f){if(!u.isValidLookup(n)){var c=u.extractFromKey(f,l),d=c.key;i=d;var p=c.namespaces;u.options.fallbackNS&&(p=p.concat(u.options.fallbackNS));var h=l.count!==void 0&&typeof l.count!="string",g=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",v=l.lngs?l.lngs:u.languageUtils.toResolveHierarchy(l.lng||u.language,l.fallbackLng);p.forEach(function(D){u.isValidLookup(n)||(s=D,!Zh["".concat(v[0],"-").concat(D)]&&u.utils&&u.utils.hasLoadedNamespace&&!u.utils.hasLoadedNamespace(s)&&(Zh["".concat(v[0],"-").concat(D)]=!0,u.logger.warn('key "'.concat(i,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(function(C){if(!u.isValidLookup(n)){a=C;var b,A,E=d,x=[E];for(u.i18nFormat&&u.i18nFormat.addLookupKeys?u.i18nFormat.addLookupKeys(x,d,C,D,l):(h&&(b=u.pluralResolver.getSuffix(C,l.count)),h&&g&&x.push(E+b),g&&x.push(E+="".concat(u.options.contextSeparator).concat(l.context)),h&&x.push(E+=b));A=x.pop();)u.isValidLookup(n)||(o=A,n=u.getResource(C,D,A,l))}}))})}}),{res:n,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}},{key:"isValidLookup",value:function(r){return!(r===void 0||!this.options.returnNull&&r===null||!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,n,i,o):this.resourceStore.getResource(r,n,i,o)}}],[{key:"hasDefaultValue",value:function(r){var n="defaultValue";for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n===i.substring(0,n.length)&&r[i]!==void 0)return!0;return!1}}]),t}();function uu(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Z2=function(){function e(t){Lt(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}return Mt(e,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return r.length===2?null:(r.pop(),r[r.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(i){return i.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=uu(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=uu(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=uu(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var r,n=this;return t?(t.forEach(function(i){if(!r){var o=n.formatLanguageCode(i);n.options.supportedLngs&&!n.isSupportedCode(o)||(r=o)}}),!r&&this.options.supportedLngs&&t.forEach(function(i){if(!r){var o=n.getLanguagePartFromCode(i);if(n.isSupportedCode(o))return r=o;r=n.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function(s){s&&(n.isSupportedCode(s)?o.push(s):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(s)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),i.forEach(function(s){o.indexOf(s)<0&&a(n.formatLanguageCode(s))}),o}}]),e}(),Q2=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ex={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};function tx(){var e={};return Q2.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:ex[t.fc]}})}),e}var rx=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Lt(this,e),this.languageUtils=t,this.options=r,this.logger=jt.create("pluralResolver"),this.rules=tx()}return Mt(e,[{key:"addRule",value:function(t,r){this.rules[t]=r}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,r){return this.getSuffixes(t).map(function(n){return r+n})}},{key:"getSuffixes",value:function(t){var r=this,n=this.getRule(t);return n?n.numbers.map(function(i){return r.getSuffix(t,i)}):[]}},{key:"getSuffix",value:function(t,r){var n=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),a=i.numbers[o];this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),nx=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lt(this,e),this.logger=jt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Mt(e,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=r.escape!==void 0?r.escape:X2,this.escapeValue=r.escapeValue===void 0||r.escapeValue,this.useRawValueToEscape=r.useRawValueToEscape!==void 0&&r.useRawValueToEscape,this.prefix=r.prefix?nn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?nn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?nn(r.nestingPrefix):r.nestingPrefixEscaped||nn("$t("),this.nestingSuffix=r.nestingSuffix?nn(r.nestingSuffix):r.nestingSuffixEscaped||nn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,r,n,i){var o,a,s,u=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var c=function(g){if(g.indexOf(u.formatSeparator)<0){var v=Yh(r,l,g);return u.alwaysFormat?u.format(v,void 0,n,Ae({},i,r,{interpolationkey:g})):v}var D=g.split(u.formatSeparator),C=D.shift().trim(),b=D.join(u.formatSeparator).trim();return u.format(Yh(r,l,C),b,n,Ae({},i,r,{interpolationkey:C}))};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,h=[{regex:this.regexpUnescape,safeValue:function(g){return f(g)}},{regex:this.regexp,safeValue:function(g){return u.escapeValue?f(u.escape(g)):f(g)}}];return h.forEach(function(g){for(s=0;o=g.regex.exec(t);){if((a=c(o[1].trim()))===void 0)if(typeof d=="function"){var v=d(t,o,i);a=typeof v=="string"?v:""}else{if(p){a=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),a=""}else typeof a=="string"||u.useRawValueToEscape||(a=Jh(a));var D=g.safeValue(a);if(t=t.replace(o[0],D),p?(g.regex.lastIndex+=D.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,++s>=u.maxReplaces)break}}),t}},{key:"nest",value:function(t,r){var n,i,o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=Ae({},a);function u(d,p){var h=this.nestingOptionsSeparator;if(d.indexOf(h)<0)return d;var g=d.split(new RegExp("".concat(h,"[ ]*{"))),v="{".concat(g[1]);d=g[0],v=(v=this.interpolate(v,s)).replace(/'/g,'"');try{s=JSON.parse(v),p&&(s=Ae({},p,s))}catch(D){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),D),"".concat(d).concat(h).concat(v)}return delete s.defaultValue,d}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],f=!1;if(n[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(d){return d.trim()});n[1]=c.shift(),l=c,f=!0}if((i=r(u.call(this,n[1].trim(),s),s))&&n[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Jh(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),i=""),f&&(i=l.reduce(function(d,p){return o.format(d,p,a.lng,Ae({},a,{interpolationkey:n[1].trim()}))},i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}]),e}(),ix=function(e){function t(r,n,i){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Lt(this,t),o=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(o)),o.backend=r,o.store=n,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=jt.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return Wa(t,Zt),Mt(t,[{key:"queueLoad",value:function(r,n,i,o){var a=this,s=[],u=[],l=[],f=[];return r.forEach(function(c){var d=!0;n.forEach(function(p){var h="".concat(c,"|").concat(p);!i.reload&&a.store.hasResourceBundle(c,p)?a.state[h]=2:a.state[h]<0||(a.state[h]===1?u.indexOf(h)<0&&u.push(h):(a.state[h]=1,d=!1,u.indexOf(h)<0&&u.push(h),s.indexOf(h)<0&&s.push(h),f.indexOf(p)<0&&f.push(p)))}),d||l.push(c)}),(s.length||u.length)&&this.queue.push({pending:u,loaded:{},errors:[],callback:o}),{toLoad:s,pending:u,toLoadLanguages:l,toLoadNamespaces:f}}},{key:"loaded",value:function(r,n,i){var o=r.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i),this.state[r]=n?-1:2;var u={};this.queue.forEach(function(l){(function(f,c,d,p){var h=mc(f,c,Object),g=h.obj,v=h.k;g[v]=g[v]||[],g[v].push(d)})(l.loaded,[a],s),function(f,c){for(var d=f.indexOf(c);d!==-1;)f.splice(d,1),d=f.indexOf(c)}(l.pending,r),n&&l.errors.push(n),l.pending.length!==0||l.done||(Object.keys(l.loaded).forEach(function(f){u[f]||(u[f]=[]),l.loaded[f].length&&l.loaded[f].forEach(function(c){u[f].indexOf(c)<0&&u[f].push(c)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(r,n,i){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,u=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[i](r,n,function(l,f){l&&f&&a<5?setTimeout(function(){o.read.call(o,r,n,i,a+1,2*s,u)},s):u(l,f)}):u(null,{})}},{key:"prepareLoading",value:function(r,n){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof n=="string"&&(n=[n]);var s=this.queueLoad(r,n,o,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(r,n,i){this.prepareLoading(r,n,{},i)}},{key:"reload",value:function(r,n,i){this.prepareLoading(r,n,{reload:!0},i)}},{key:"loadOne",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=r.split("|"),a=o[0],s=o[1];this.read(a,s,"read",void 0,void 0,function(u,l){u&&n.logger.warn("".concat(i,"loading namespace ").concat(s," for language ").concat(a," failed"),u),!u&&l&&n.logger.log("".concat(i,"loaded namespace ").concat(s," for language ").concat(a),l),n.loaded(r,u,l)})}},{key:"saveMissing",value:function(r,n,i,o,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):i!=null&&i!==""&&(this.backend&&this.backend.create&&this.backend.create(r,n,i,o,null,Ae({},s,{isUpdate:a})),r&&r[0]&&this.store.addResource(r[0],n,i,o))}}]),t}();function ox(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(Jt(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),Jt(e[2])==="object"||Jt(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(n){t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function ep(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function xo(){}var ax=function(e){function t(){var r,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Lt(this,t),r=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(r)),r.options=ep(n),r.services={},r.logger=jt,r.modules={external:[]},i&&!r.isInitialized&&!n.isClone){if(!r.options.initImmediate)return r.init(n,i),Ii(r,Mr(r));setTimeout(function(){r.init(n,i)},0)}return r}return Wa(t,Zt),Mt(t,[{key:"init",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function o(p){return p?typeof p=="function"?new p:p:null}if(typeof n=="function"&&(i=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Ae({},ox(),this.options,ep(n)),this.format=this.options.interpolation.format,i||(i=xo),!this.options.isClone){this.modules.logger?jt.init(o(this.modules.logger),this.options):jt.init(null,this.options);var a=new Z2(this.options);this.store=new Y2(this.options.resources,this.options);var s=this.services;s.logger=jt,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new rx(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new nx(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ix(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Qh(this.services,this.options),this.translator.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.external.forEach(function(p){p.init&&p.init(r)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments)}});var f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments),r}});var c=pi(),d=function(){var p=function(h,g){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),c.resolve(g),i(h,g)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return p(null,r.t.bind(r));r.changeLanguage(r.options.lng,p)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xo,o=i,a=typeof r=="string"?r:this.language;if(typeof r=="function"&&(o=r),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return o();var s=[],u=function(f){f&&n.services.languageUtils.toResolveHierarchy(f).forEach(function(c){s.indexOf(c)<0&&s.push(c)})};if(a)u(a);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(s,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(r,n,i){var o=pi();return r||(r=this.languages),n||(n=this.options.ns),i||(i=xo),this.services.backendConnector.reload(r,n,function(a){o.resolve(),i(a)}),o}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&$v.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,n){var i=this;this.isLanguageChangingTo=r;var o=pi();this.emit("languageChanging",r);var a=function(s){r||s||!i.services.languageDetector||(s=[]);var u=typeof s=="string"?s:i.services.languageUtils.getBestMatchFromCodes(s);u&&(i.language||(i.language=u,i.languages=i.services.languageUtils.toResolveHierarchy(u)),i.translator.language||i.translator.changeLanguage(u),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(u)),i.loadResources(u,function(l){(function(f,c){c?(i.language=c,i.languages=i.services.languageUtils.toResolveHierarchy(c),i.translator.changeLanguage(c),i.isLanguageChangingTo=void 0,i.emit("languageChanged",c),i.logger.log("languageChanged",c)):i.isLanguageChangingTo=void 0,o.resolve(function(){return i.t.apply(i,arguments)}),n&&n(f,function(){return i.t.apply(i,arguments)})})(l,u)})};return r||!this.services.languageDetector||this.services.languageDetector.async?!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(r):a(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(r,n,i){var o=this,a=function s(u,l){var f;if(Jt(l)!=="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),p=2;p<c;p++)d[p-2]=arguments[p];f=o.options.overloadTranslationOptionHandler([u,l].concat(d))}else f=Ae({},l);f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns;var h=o.options.keySeparator||".",g=i?"".concat(i).concat(h).concat(u):u;return o.t(g,f)};return typeof r=="string"?a.lng=r:a.lngs=r,a.ns=n,a.keyPrefix=i,a}},{key:"t",value:function(){var r;return this.translator&&(r=this.translator).translate.apply(r,arguments)}},{key:"exists",value:function(){var r;return this.translator&&(r=this.translator).exists.apply(r,arguments)}},{key:"setDefaultNamespace",value:function(r){this.options.defaultNS=r}},{key:"hasLoadedNamespace",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],a=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var u=function(f,c){var d=n.services.backendConnector.state["".concat(f,"|").concat(c)];return d===-1||d===2};if(i.precheck){var l=i.precheck(this,u);if(l!==void 0)return l}return!!this.hasResourceBundle(o,r)||!this.services.backendConnector.backend||!(!u(o,r)||a&&!u(s,r))}},{key:"loadNamespaces",value:function(r,n){var i=this,o=pi();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(a){i.options.ns.indexOf(a)<0&&i.options.ns.push(a)}),this.loadResources(function(a){o.resolve(),n&&n(a)}),o):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function(r,n){var i=pi();typeof r=="string"&&(r=[r]);var o=this.options.preload||[],a=r.filter(function(s){return o.indexOf(s)<0});return a.length?(this.options.preload=o.concat(a),this.loadResources(function(s){i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}},{key:"dir",value:function(r){return r||(r=this.languages&&this.languages.length>0?this.languages[0]:this.language),r?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(r,n)}},{key:"cloneInstance",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xo,o=Ae({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach(function(u){a[u]=r[u]}),a.services=Ae({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new Qh(a.services,a.options),a.translator.on("*",function(u){for(var l=arguments.length,f=new Array(l>1?l-1:0),c=1;c<l;c++)f[c-1]=arguments[c];a.emit.apply(a,[u].concat(f))}),a.init(o,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),t}(),sl=new ax;sl.init({lng:"zh-CN",resources:{}});sl.t.bind(sl);function sx(e,t,r){const n=j(e);t=t.filter(s=>!!(W.isText(s)||r.isInline(s))),t.length===0&&(t=[{text:n.text().replace(/\s+/gm," ")}]);const i=parseInt(n.attr("colSpan")||"1"),o=parseInt(n.attr("rowSpan")||"1"),a=n.attr("width")||ip(n,"width")||"auto";return{type:"table-cell",isHeader:np(n)==="th",colSpan:i,rowSpan:o,width:a,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t}}const ux={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:sx};function lx(e,t,r){return{type:"table-row",attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t.filter(n=>L.getNodeType(n)==="table-cell")}}const cx={selector:"tr:not([data-w-e-type])",parseElemHtml:lx};function fx(e,t,r){const n=j(e);let i="auto";return ip(n,"width")==="100%"&&(i="100%"),n.attr("width")==="100%"&&(i="100%"),{type:"table",width:i,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",cellSpacing:e.getAttribute("cellspacing")||"",cellPadding:e.getAttribute("cellpadding")||"",border:e.getAttribute("border")||"",align:e.getAttribute("align")||""},children:t.filter(o=>L.getNodeType(o)==="table-row")}}const dx={selector:"table:not([data-w-e-type])",parseElemHtml:fx};function hx(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}function Me(e,t){return t?` ${e}="${hx(t)}"`:""}function px(e,t){const{width:r="auto",attrs:n={}}=e,i=n.style||(r!=="auto"?`width: ${r};`:"");return`<table${Me("style",i)}${Me("class",n.class)}${Me("cellspacing",n.cellSpacing)}${Me("cellpadding",n.cellPadding)}${Me("border",n.border)}${Me("align",n.align)}><tbody>${t}</tbody></table>`}function gx(e,t){const{attrs:r={}}=e;return`<tr${Me("style",r.style)}${Me("class",r.class)}${Me("align",r.align)}${Me("valign",r.valign)}>${t}</tr>`}function vx(e,t){const{colSpan:r=1,rowSpan:n=1,isHeader:i=!1,width:o="auto",attrs:a={}}=e,s=i?"th":"td",u=o!=="auto"?Me("width",o):"";return`<${s} colspan="${r}" rowspan="${n}"${u}${Me("style",a.style)}${Me("class",a.class)}${Me("align",a.align)}${Me("valign",a.valign)}>${t}</${s}>`}const mx={type:"table",elemToHtml:px},yx={type:"table-row",elemToHtml:gx},Dx={type:"table-cell",elemToHtml:vx};function Cx(e){return e.tagName==="SPAN"&&!!e.closest("table")}function bx(e,t){if(!W.isText(t)||!Cx(e))return t;const r=e.getAttribute("class")||"",n=e.getAttribute("style")||"";return!r&&!n?t:{...t,...r?{tableInlineClass:r}:{},...n?{tableInlineStyle:n}:{}}}function wx(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;if(!r&&!n)return t;const i=r.replace(/&/g,"&").replace(/"/g,"""),o=n.replace(/&/g,"&").replace(/"/g,"""),a=i?` class="${i}"`:"",s=o?` style="${o}"`:"";return`<span${a}${s}>${t}</span>`}function Ex(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;return!r&&!n?t:tt("span",{attrs:{class:r,style:n}},[t])}function Lv(e){const t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function Bx(e,t){const r=L.getParentNode(e,t);if(r==null)return!1;const n=L.getParentNode(e,r);return n==null?!1:Lv(n).some(o=>o===t)}function ma(e){return Object.entries(e||{}).reduce((t,[r,n])=>(typeof n=="string"&&n&&(t[r]=n),t),{})}function yc(e,t){try{return L.findPath(e,t)}catch{return null}}function Ax(e,t){if(e.isDisabled())return!1;const{selection:r}=e;if(r==null||O.isCollapsed(r))return!0;const{anchor:n,focus:i}=r,o=yc(e,t);if(o==null)return!1;const a=m.start(e,o),s=m.end(e,o),u=Y.compare(n,s)<=0&&Y.compare(n,a)>=0,l=Y.compare(i,s)<=0&&Y.compare(i,a)>=0;return!!(u&&l&&w.equals(n.path.slice(0,3),i.path.slice(0,3)))}function Fx(e,t,r){const n=Ax(r,e),{width:i="auto",attrs:o={}}=e,a=L.isNodeSelected(r,e),s=Lv(e);return tt("div",{className:"table-container","data-selected":a,on:{mousedown:u=>{if(u.target.tagName==="DIV"&&u.preventDefault(),r.isDisabled())return;const l=yc(r,e);if(l==null)return;const f=m.start(r,l),{selection:c}=r;if(c==null){r.select(f);return}const{path:d}=c.anchor;d[0]!==l[0]&&r.select(f)}}},[tt("table",{width:i,attrs:ma({style:o.style,class:o.class,cellspacing:o.cellSpacing,cellpadding:o.cellPadding,border:o.border,align:o.align}),contentEditable:n},[tt("colgroup",s.map(u=>{const{width:l="auto"}=u;return tt("col",{width:l})})),tt("tbody",t||[])])])}function xx(e,t,r){const n=e.attrs||{};return tt("tr",{attrs:ma({style:n.style,class:n.class,align:n.align,valign:n.valign})},t||[])}let Ui=!1,Mv=0,Iv=0,vn=null,mn=null;const ya=new WeakMap,Hi=j("body");function Ox(e){ya.has(e)||ya.set(e,e.style.cursor),e.style.cursor="col-resize"}function ul(e){const t=ya.get(e);t!=null&&(e.style.cursor=t,ya.delete(e))}function Sx(e){const t=e.target;if(t.tagName!=="TH"&&t.tagName!=="TD"||t.style.cursor!=="col-resize")return;ul(t),e.preventDefault(),Ui=!0;const{clientX:r}=e;Mv=r;const{width:n}=t.getBoundingClientRect();Iv=n,Hi.on("mousemove",Hv),Hi.on("mouseup",Uv)}Hi.on("mousedown",Sx);function Uv(e){Ui=!1,mn=null,vn=null,Hi.off("mousemove",Hv),Hi.off("mouseup",Uv)}const Hv=se.t(function(e){if(!Ui||mn==null||vn==null)return;e.preventDefault();const{clientX:t}=e;let r=Iv+(t-Mv);r=Math.floor(r*100)/100,r<30&&(r=30),N.setNodes(mn,{width:r.toString()},{at:vn})},100);function _x(e,t,r){const n=Bx(r,e),{colSpan:i=1,rowSpan:o=1,isHeader:a=!1,attrs:s={}}=e;return n?tt(a?"th":"td",{colSpan:i,rowSpan:o,attrs:ma({style:s.style,class:s.class,align:s.align,valign:s.valign}),on:{mousemove:se.t(function(l){const f=this.elm;if(f==null)return;const{left:c,width:d,top:p,height:h}=f.getBoundingClientRect(),{clientX:g,clientY:v}=l;if(Ui)return;const D=g>c+d-5&&g<c+d,C=v>p&&v<p+h;if(D&&C){const b=yc(r,e);if(b==null){ul(f),mn=null,vn=null;return}Ox(f),mn=r,vn=b}else Ui||(ul(f),mn=null,vn=null)},100)}},t||[]):tt("td",{colSpan:i,rowSpan:o,attrs:ma({style:s.style,class:s.class,align:s.align,valign:s.valign})},t||[])}const Px={type:"table",renderElem:Fx},kx={type:"table-row",renderElem:xx},Tx={type:"table-cell",renderElem:_x},tp="__officialBlockTableExtensionsRegistered__",jx=pe.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"Please input content..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(e,{expose:t,emit:r}){const n=globalThis;Re.Boot.registerRenderElem(Tx),Re.Boot.registerRenderElem(kx),Re.Boot.registerRenderElem(Px),n[tp]||(Re.Boot.registerPreParseHtml(um),Re.Boot.registerParseElemHtml(ux),Re.Boot.registerParseElemHtml(cx),Re.Boot.registerParseElemHtml(dx),Re.Boot.registerElemToHtml(Dx),Re.Boot.registerElemToHtml(yx),Re.Boot.registerElemToHtml(mx),Re.Boot.registerParseStyleHtml(bx),Re.Boot.registerRenderStyle(Ex),Re.Boot.registerStyleToHtml(wx),n[tp]=!0);const i=e,o=r,a=pe.shallowRef(),s=pe.ref(""),u=pe.computed(()=>typeof i.height=="number"?`${i.height}px`:i.height),l=pe.inject("handleUpload",()=>{}),f=pe.inject("fileUrl",null),c=pe.inject("chooseName",null),d=pe.ref(""),p=pe.ref(null),h=S=>{if(!l){console.warn("Upload: handleUpload function not provided by ancestor");return}if(d.value=S,a.value)try{const G=a.value.selection;G&&(p.value={anchor:{path:[...G.anchor.path],offset:G.anchor.offset},focus:{path:[...G.focus.path],offset:G.focus.offset}})}catch(G){console.warn("保存光标位置失败:",G)}const z=i.name+"_"+S;l(!0,z,S==="video"?"video":"image")};pe.watch(()=>i.name,()=>{f.value=null},{deep:!0,immediate:!0}),pe.watch(()=>[f==null?void 0:f.value],([S])=>{const z=i.name+"_"+d.value;!S||!c.value||c.value!==z||a.value&&pe.nextTick(()=>{var G,X;if(a.value){try{if(a.value.focus(),p.value)try{a.value.select(p.value)}catch(te){console.warn("恢复光标位置失败,使用默认位置:",te)}}catch(te){console.warn("聚焦编辑器失败:",te)}if(d.value==="img"){const re=`<img src="${S}" alt="图片" style="max-width: 100%;">`;(G=a.value)==null||G.dangerouslyInsertHtml(re)}else{const re=`<video src="${S}" controls style="max-width: 100%;"></video>`;(X=a.value)==null||X.dangerouslyInsertHtml(re)}p.value=null,d.value=""}})},{immediate:!1});function g(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传图片菜单"),S("img")})}}}function v(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传视频菜单"),S("video")})}}}const D={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},C=["#0032A0","#FF0044","#FF8200","#001E60","#E3E3E6","#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E8E8E8","#F5F5F5","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],b={placeholder:i.placeholder,readOnly:i.disabled,maxLength:i.maxLength,MENU_CONF:{color:{colors:C},bgColor:{colors:C}},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},A=Math.random().toString(36).substring(2,9),E=`CustomImageMenu_${A}`,x=`CustomVideoMenu_${A}`,_=S=>{a.value=S;try{const z=g(h),G=v(h),X={key:E,factory(){return new z}},te={key:x,factory(){return new G}};Re.Boot.registerMenu(X),Re.Boot.registerMenu(te)}catch(z){console.warn("菜单注册失败:",z)}D.insertKeys={index:0,keys:[E,x]},o("created",S)};pe.onBeforeUnmount(()=>{const S=a.value;S!=null&&S.destroy()}),pe.watch(()=>i.modelValue,S=>{S!==s.value&&(s.value=S||"")},{immediate:!0});const T=S=>{o("update:modelValue",s.value),o("change",S)},k=()=>{a.value=void 0},M=S=>{o("focus",S)},R=S=>{o("blur",S)};return t({editor:a,getHtml:()=>s.value,getText:()=>{var S;return((S=a.value)==null?void 0:S.getText())||""},isEmpty:()=>{var S;return((S=a.value)==null?void 0:S.isEmpty())||!0},clear:()=>{var S;return(S=a.value)==null?void 0:S.clear()},focus:()=>{var S;return(S=a.value)==null?void 0:S.focus()},blur:()=>{var S;return(S=a.value)==null?void 0:S.blur()},disable:()=>{var S;return(S=a.value)==null?void 0:S.disable()},enable:()=>{var S;return(S=a.value)==null?void 0:S.enable()}}),(S,z)=>(pe.openBlock(),pe.createElementBlock("div",{class:pe.normalizeClass(["rich-text-editor",S.class])},[pe.createVNode(pe.unref(kc.Toolbar),{class:"editor-toolbar",editor:a.value,defaultConfig:D,mode:e.mode},null,8,["editor","mode"]),pe.createVNode(pe.unref(kc.Editor),{class:"editor-content",style:pe.normalizeStyle({height:u.value}),modelValue:s.value,"onUpdate:modelValue":z[0]||(z[0]=G=>s.value=G),defaultConfig:b,mode:e.mode,onOnCreated:_,onOnChange:T,onOnDestroyed:k,onOnFocus:M,onOnBlur:R},null,8,["style","modelValue","mode"])],2))}}),Rx=se._(jx,[["__scopeId","data-v-64e4497a"]]);exports.default=Rx;
|
|
51
|
+
></div>`)}(i);n.append(c),e.$textArea=c,r=c[0],(p=oD([dD,mD,ED,hD,vD,fD]))(r,u),sh.set(e,!1),uh.set(e,p)}else{var d=lh.get(e),p=uh.get(e);if(d==null||p==null)return;r=d.elm,p(d,u)}if(r!=null||(r=sc(i))!=null){if((f?s:t.isFocused())&&r.focus({preventScroll:!0}),f){var h=ac(r);h&&cv.set(t,h)}ic.set(t,r),za.set(t,r),Ha.set(r,t),lh.set(e,u)}}function Hh(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function zh(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function au(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return zh(r.overflowY,t)||zh(r.overflowX,t)||function(n){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)}(e)}return!1}function Fo(e,t,r,n,i,o,a,s){return o<e&&a>t||o>e&&a<t?0:o<=e&&s<=r||a>=t&&s>=r?o-e-n:a>t&&s<r||o<e&&s>r?a-t+i:0}function Wh(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,u=typeof a=="function"?a:function(tr){return tr!==a};if(!Hh(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,f=[],c=e;Hh(c)&&u(c);){if((c=c.parentElement)===l){f.push(c);break}c!=null&&c===document.body&&au(c)&&!au(document.documentElement)||c!=null&&au(c,s)&&f.push(c)}for(var d=r.visualViewport?r.visualViewport.width:innerWidth,p=r.visualViewport?r.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,g=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),D=v.height,C=v.width,b=v.top,A=v.right,E=v.bottom,x=v.left,_=i==="start"||i==="nearest"?b:i==="end"?E:b+D/2,T=o==="center"?x+C/2:o==="end"?A:x,k=[],M=0;M<f.length;M++){var R=f[M],S=R.getBoundingClientRect(),z=S.height,G=S.width,J=S.top,oe=S.right,le=S.bottom,ke=S.left;if(n==="if-needed"&&b>=0&&x>=0&&E<=p&&A<=d&&b>=J&&E<=le&&x>=ke&&A<=oe)return k;var he=getComputedStyle(R),V=parseInt(he.borderLeftWidth,10),Oe=parseInt(he.borderTopWidth,10),ce=parseInt(he.borderRightWidth,10),se=parseInt(he.borderBottomWidth,10),X=0,te=0,ne="offsetWidth"in R?R.offsetWidth-R.clientWidth-V-ce:0,De="offsetHeight"in R?R.offsetHeight-R.clientHeight-Oe-se:0;if(l===R)X=i==="start"?_:i==="end"?_-p:i==="nearest"?Fo(g,g+p,p,Oe,se,g+_,g+_+D,D):_-p/2,te=o==="start"?T:o==="center"?T-d/2:o==="end"?T-d:Fo(h,h+d,d,V,ce,h+T,h+T+C,C),X=Math.max(0,X+g),te=Math.max(0,te+h);else{X=i==="start"?_-J-Oe:i==="end"?_-le+se+De:i==="nearest"?Fo(J,le,z,Oe,se+De,_,_+D,D):_-(J+z/2)+De/2,te=o==="start"?T-ke-V:o==="center"?T-(ke+G/2)+ne/2:o==="end"?T-oe+ce+ne:Fo(ke,oe,G,V,ce+ne,T,T+C,C);var Ie=R.scrollLeft,Ue=R.scrollTop;_+=Ue-(X=Math.max(0,Math.min(Ue+X,R.scrollHeight-z+De))),T+=Ie-(te=Math.max(0,Math.min(Ie+te,R.scrollWidth-G+ne)))}k.push({el:R,top:X,left:te})}return k}function qh(e){return e===Object(e)&&Object.keys(e).length!==0}function O2(e,t){var r=!e.ownerDocument.documentElement.contains(e);if(qh(t)&&typeof t.behavior=="function")return t.behavior(r?[]:Wh(e,t));if(!r){var n=function(i){return i===!1?{block:"end",inline:"nearest"}:qh(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(s){var u=s.el,l=s.top,f=s.left;u.scroll&&a?u.scroll({top:l,left:f,behavior:o}):(u.scrollTop=l,u.scrollLeft=f)})}(Wh(e,n),n.behavior)}}function et(e,t){return Fn(t)&&L.hasDOMNode(e,t,{editable:!0})}function Vh(e,t){if(e.getConfig().readOnly)return!1;var r=un(e,t)&&L.toSlateNode(e,t);return m.isVoid(e,r)}function un(e,t){return Fn(t)&&L.hasDOMNode(e,t)}function Pv(e,t,r){r===void 0&&(r=!1);var n=t.selection,i=t.getConfig(),o=L.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||r)&&t.isFocused()){var a=o.type!=="None";if(n||a){var s=ic.get(t),u=!1;if(s.contains(o.anchorNode)&&s.contains(o.focusNode)&&(u=!0),a&&u&&n){var l=L.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&O.equals(l,n)){var f=!0;if(O.isCollapsed(n)){var c=o.anchorNode,d=o.anchorOffset;if(c===s){var p=s.childNodes,h=void 0;(h=p[d])&&h.matches("table")&&(f=!1),(h=p[d-1])&&h.matches("table")&&(f=!1)}}if(f)return}}if(!n||L.hasRange(t,n)){e.isUpdatingSelection=!0;var g=n&&L.toDOMRange(t,n);if(g){O.isBackward(n)?o.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):o.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var D=document.body;O2(v,{scrollMode:"if-needed",boundary:i.scroll?s.parentElement:D,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else o.removeAllRanges();setTimeout(function(){g&&Bi&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=L.toSlateRange(t,o,{exactMatch:!1,suppressThrow:!1})}}}var su=new WeakMap,Kh=new WeakMap,S2={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},_2={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},P2={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},fe=function(e){var t=S2[e],r=_2[e],n=P2[e],i=t&&ds(t),o=r&&ds(r),a=n&&ds(n);return function(s){return!(!i||!i(s))||!!(Zu&&o&&o(s))||!(Zu||!a||!a(s))}},ve={isBold:fe("bold"),isCompose:fe("compose"),isMoveBackward:fe("moveBackward"),isMoveForward:fe("moveForward"),isDeleteBackward:fe("deleteBackward"),isDeleteForward:fe("deleteForward"),isDeleteLineBackward:fe("deleteLineBackward"),isDeleteLineForward:fe("deleteLineForward"),isDeleteWordBackward:fe("deleteWordBackward"),isDeleteWordForward:fe("deleteWordForward"),isExtendBackward:fe("extendBackward"),isExtendForward:fe("extendForward"),isExtendLineBackward:fe("extendLineBackward"),isExtendLineForward:fe("extendLineForward"),isItalic:fe("italic"),isMoveLineBackward:fe("moveLineBackward"),isMoveLineForward:fe("moveLineForward"),isMoveWordBackward:fe("moveWordBackward"),isMoveWordForward:fe("moveWordForward"),isRedo:fe("redo"),isSplitBlock:fe("splitBlock"),isTransposeCharacter:fe("transposeCharacter"),isUndo:fe("undo"),isTab:fe("tab"),isSelectAll:fe("selectAll")};function Ee(e){e.preventDefault()}var k2={beforeinput:function(e,t,r){var n=e,i=r.getConfig().readOnly;if(li&&!i&&et(r,n.target)){var o=r.selection,a=n.inputType,s=n.dataTransfer||n.data||void 0;if(a!=="insertCompositionText"&&a!=="deleteCompositionText"){if(n.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=Be(n.getTargetRanges(),1)[0];if(u){var l=L.toSlateRange(r,u,{exactMatch:!1,suppressThrow:!1});o&&O.equals(o,l)||N.select(r,l)}}if(o&&O.isExpanded(o)&&a.startsWith("delete")){var f=a.endsWith("Backward")?"backward":"forward";m.deleteFragment(r,{direction:f})}else switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":m.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":m.deleteForward(r);break;case"deleteContentBackward":m.deleteBackward(r);break;case"deleteEntireSoftLine":m.deleteBackward(r,{unit:"line"}),m.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":m.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":m.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":m.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":m.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":m.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":m.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":m.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if(a==="insertFromPaste"&&!Ws.get(r))break;s instanceof DataTransfer?r.insertData(s):typeof s=="string"&&m.insertText(r,s)}}}},blur:function(e,t,r){var n=e,i=t.isUpdatingSelection,o=t.latestElement;if(!r.getConfig().readOnly&&!i&&et(r,n.target)){var a=L.findDocumentOrShadowRoot(r);if(o!==a.activeElement){var s=n.relatedTarget;if(!(s===L.toDOMNode(r,r)||ct(s)&&s.hasAttribute("data-slate-spacer"))){if(s!=null&&Fn(s)&&L.hasDOMNode(r,s)){var u=L.toSlateNode(r,s);if(Q.isElement(u)&&!r.isVoid(u))return}if(ui){var l=a.getSelection();l==null||l.removeAllRanges()}ha.delete(r)}}}},focus:function(e,t,r){var n=L.toDOMNode(r,r),i=L.findDocumentOrShadowRoot(r);t.latestElement=i.activeElement,Bi&&e.target!==n?n.focus():ha.set(r,!0)},click:function(e,t,r){if(!r.getConfig().readOnly&&un(r,e.target)&&Fn(e.target)){var n=L.toSlateNode(r,e.target),i=L.findPath(r,n);if(m.hasPath(r,i)&&$.get(r,i)===n){var o=m.start(r,i),a=m.end(r,i),s=m.void(r,{at:o}),u=m.void(r,{at:a});if(s&&u&&w.equals(s[1],u[1])){var l=m.range(r,o);N.select(r,l)}}}},compositionstart:function(e,t,r){if(et(r,e.target)){var n=r.selection;if(n&&O.isExpanded(n)&&(m.deleteFragment(r),Promise.resolve().then(function(){Pv(t,r,!0)})),n&&O.isCollapsed(n)){var i=L.toDOMRange(r,n).startContainer,o=i.textContent||"";su.set(r,o),Kh.set(r,i)}t.isComposing=!0,function(a,s){var u;s.getConfig().placeholder&&s.isEmpty()&&a.showPlaceholder&&((u=a.$placeholder)===null||u===void 0||u.hide(),a.showPlaceholder=!1)}(t,r)}},compositionend:function(e,t,r){var n=e;if(et(r,n.target)){t.isComposing=!1;var i=r.selection;if(i!=null){(Qu||Bi)&&L.cleanExposedTexNodeInSelectionBlock(r);for(var o=O.isBackward(i)?i.focus:i.anchor,a=Be(m.node(r,[o.path[0]]),1)[0],s=0;s<o.path.length;s++){var u=Be(m.node(r,o.path.slice(0,s+1)),1)[0];if(Q.isElement(u)&&((ui||Bi)&&u.type==="link"||u.type==="code")){L.setNewKey(a);break}}var l=n.data;if(l){if(r.getConfig().maxLength){var f=L.getLeftLengthOfMaxLength(r);f<l.length?(L.toDOMRange(r,i).startContainer.textContent=su.get(r)||"",f>0&&m.insertText(r,l.slice(0,f)),t.changeViewState()):m.insertText(r,l)}else m.insertText(r,l);ui||setTimeout(function(){var c=r.selection;if(c!=null){var d=Kh.get(r);d!=null&&L.toDOMRange(r,c).startContainer!==d&&(d.textContent=su.get(r)||"")}})}}}},compositionupdate:function(e,t,r){et(r,e.target)&&(t.isComposing=!0)},keydown:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&!t.isComposing&&et(r,n.target)){if(function(a,s){var u=uv.get(a),l=u&&u.getMenus(),f=lv.get(a),c=f&&f.getMenus(),d=fa(fa({},l),c);for(var p in d){var h=d[p],g=h.hotkey;if(g&&wC(g,s)&&!h.isDisabled(a)){var v=h.getValue(a);h.exec(a,v)}}}(r,n),ve.isTab(n))return Ee(n),void r.handleTab();if(ve.isRedo(n))return Ee(n),void(typeof r.redo=="function"&&r.redo());if(ve.isUndo(n))return Ee(n),void(typeof r.undo=="function"&&r.undo());if(ve.isMoveLineBackward(n))return Ee(n),void N.move(r,{unit:"line",reverse:!0});if(ve.isMoveLineForward(n))return Ee(n),void N.move(r,{unit:"line"});if(ve.isExtendLineBackward(n))return Ee(n),void N.move(r,{unit:"line",edge:"focus",reverse:!0});if(ve.isExtendLineForward(n))return Ee(n),void N.move(r,{unit:"line",edge:"focus"});if(ve.isMoveBackward(n))return Ee(n),void(i&&O.isCollapsed(i)?N.move(r,{reverse:!0}):N.collapse(r,{edge:"start"}));if(ve.isMoveForward(n))return Ee(n),void(i&&O.isCollapsed(i)?N.move(r):N.collapse(r,{edge:"end"}));if(ve.isMoveWordBackward(n))return Ee(n),i&&O.isExpanded(i)&&N.collapse(r,{edge:"focus"}),void N.move(r,{unit:"word",reverse:!0});if(ve.isMoveWordForward(n))return Ee(n),i&&O.isExpanded(i)&&N.collapse(r,{edge:"focus"}),void N.move(r,{unit:"word"});if(ve.isSelectAll(n))return Ee(n),void r.selectAll();if(li){if((Qu||ui)&&i&&(ve.isDeleteBackward(n)||ve.isDeleteForward(n))&&O.isCollapsed(i)){var o=$.parent(r,i.anchor.path);if(Q.isElement(o)&&m.isVoid(r,o)&&m.isInline(r,o))return n.preventDefault(),void N.delete(r,{unit:"block"})}}else{if(ve.isBold(n)||ve.isItalic(n)||ve.isTransposeCharacter(n))return void Ee(n);if(ve.isSplitBlock(n))return Ee(n),void m.insertBreak(r);if(ve.isDeleteBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r));if(ve.isDeleteForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r));if(ve.isDeleteLineBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"line"}));if(ve.isDeleteLineForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"line"}));if(ve.isDeleteWordBackward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"backward"}):m.deleteBackward(r,{unit:"word"}));if(ve.isDeleteWordForward(n))return Ee(n),void(i&&O.isExpanded(i)?m.deleteFragment(r,{direction:"forward"}):m.deleteForward(r,{unit:"word"}))}}},keypress:function(e,t,r){if(!li&&!r.getConfig().readOnly&&et(r,e.target)){e.preventDefault();var n=e.key;m.insertText(r,n)}},copy:function(e,t,r){var n=e;if(et(r,n.target)){n.preventDefault();var i=n.clipboardData;i!=null&&r.setFragmentData(i)}},cut:function(e,t,r){var n=e,i=r.selection;if(!r.getConfig().readOnly&&et(r,n.target)){n.preventDefault();var o=n.clipboardData;if(o!=null&&(r.setFragmentData(o),i))if(O.isExpanded(i))m.deleteFragment(r);else{var a=$.parent(r,i.anchor.path);m.isVoid(r,a)&&N.delete(r)}}},paste:function(e,t,r){Ws.set(r,!0);var n=e;if(!r.getConfig().readOnly&&et(r,n.target)){var i=r.getConfig().customPaste;if(i&&i(r,n)===!1)return void Ws.set(r,!1);if(!li||function(a){return a.clipboardData&&a.clipboardData.getData("text/plain")!==""&&a.clipboardData.types.length===1}(n)){n.preventDefault();var o=n.clipboardData;o!=null&&r.insertData(o)}}},dragover:function(e,t,r){if(un(r,e.target)){var n=L.toSlateNode(r,e.target);m.isVoid(r,n)&&e.preventDefault()}},dragstart:function(e,t,r){var n=e;if(un(r,n.target)&&!r.getConfig().readOnly){var i=L.toSlateNode(r,n.target),o=L.findPath(r,i);if(m.isVoid(r,i)||m.void(r,{at:o,voids:!0})){var a=m.range(r,o);N.select(r,a)}var s=n.dataTransfer;s!=null&&(t.isDraggingInternally=!0,r.setFragmentData(s))}},dragend:function(e,t,r){var n=e;r.getConfig().readOnly||t.isDraggingInternally&&un(r,n.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,r){var n=e,i=n.dataTransfer;if(!r.getConfig().readOnly&&un(r,n.target)&&i!=null&&!(li&&ui&&i.files.length>0)){n.preventDefault();var o=r.selection,a=L.findEventRange(r,n);N.select(r,a),t.isDraggingInternally&&(o&&N.delete(r,{at:o}),t.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},T2=1;(function(){function e(t){var r=this;this.id=T2++,this.$textArea=null,this.$progressBar=j('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=j('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=ae.t(function(){var a=r.editorInstance;(function(s,u){var l=s.isComposing,f=s.isUpdatingSelection,c=s.isDraggingInternally;if(!(u.getConfig().readOnly||l||f||c)){var d=L.findDocumentOrShadowRoot(u),p=d.activeElement,h=L.toDOMNode(u,u),g=d.getSelection();if(p===h?(s.latestElement=p,ha.set(u,!0)):ha.delete(u),!g)return N.deselect(u);var v=g.anchorNode,D=g.focusNode,C=et(u,v)||Vh(u,v),b=et(u,D)||Vh(u,D);if(C&&b){var A=L.toSlateRange(u,g,{exactMatch:!1,suppressThrow:!1});N.select(u,A)}else N.deselect(u)}})(r,a)},100);var n=j(t);if(n.length===0)throw new Error("Cannot find textarea DOM by selector '"+t+"'");this.$box=n;var i=j('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),n.append(i);var o=j('<div class="w-e-scroll"></div>');i.append(o),this.$scroll=o,this.$textAreaContainer=i,xn(function(){var a=r.editorInstance,s=L.getWindow(a);s.document.addEventListener("selectionchange",r.onDOMSelectionChange),a.on("destroyed",function(){s.document.removeEventListener("selectionchange",r.onDOMSelectionChange)}),i.on("click",function(){return a.hidePanelOrModal()}),a.on("change",r.changeViewState.bind(r));var u=a.getConfig().onChange;u&&a.on("change",function(){return u(a)}),r.onFocusAndOnBlur(),a.on("change",r.changeMaxLengthInfo.bind(r)),r.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var t=rF.get(this);if(t==null)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var t=this,r=this.$textArea,n=this.$scroll,i=this.editorInstance;r!=null&&($y(k2,function(o,a){r.on(a,function(s){o(s,t,i)})}),i.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",ae.t(function(){i.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var t=this,r=this.editorInstance,n=r.getConfig(),i=n.onBlur,o=n.onFocus;this.latestEditorSelection=r.selection,r.on("change",function(){t.latestEditorSelection==null&&r.selection!=null?setTimeout(function(){return o&&o(r)}):t.latestEditorSelection!=null&&r.selection==null&&setTimeout(function(){return i&&i(r)}),t.latestEditorSelection=r.selection})},e.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,r=t.getConfig().maxLength;if(r){var n=r-L.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML=n+"/"+r}},e.prototype.changeProgress=function(t){var r=this.$progressBar;r.css("width",t+"%"),t>=100&&setTimeout(function(){r.hide(),r.css("width","0"),r.show()},1e3)},e.prototype.changeViewState=function(){var t=this,r=this.editorInstance;x2(this,r),function(n,i){var o,a=i.getConfig().placeholder;if(a){var s=i.isEmpty();if(s&&!n.showPlaceholder&&!n.isComposing){if(n.$placeholder==null){var u=j('<div class="w-e-text-placeholder">'+a+"</div>");n.$textAreaContainer.append(u),n.$placeholder=u}return n.$placeholder.show(),void(n.showPlaceholder=!0)}!s&&n.showPlaceholder&&((o=n.$placeholder)===null||o===void 0||o.hide(),n.showPlaceholder=!1)}}(this,r),xn(function(){Pv(t,r)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e})();tc("match",function(e,t,r){return[function(n){var i=rt(this),o=n==null?void 0:$r(n,e);return o?Z(o,n,i):new RegExp(n)[e](ie(i))},function(n){var i=be(this),o=ie(n),a=r(t,i,o);if(a.done)return a.value;if(!i.global)return $i(i,o);var s=i.unicode;i.lastIndex=0;for(var u,l=[],f=0;(u=$i(i,o))!==null;){var c=ie(u[0]);l[f]=c,c===""&&(i.lastIndex=rc(o,Pn(i.lastIndex),s)),f++}return f===0?null:l}]});function kv(e){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&kv(t)}function j2(){return j('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function R2(e,t,r,n,i){if(i===void 0&&(i=!1),t){if(n){var o=Zu?"cmd":"ctrl";n=n.replace("mod",o)}if(i)n&&(e.attr("data-tooltip",n),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=n?r+`
|
|
52
|
+
`+n:r;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var gc=function(){function e(t,r,n){var i=this;n===void 0&&(n=!1),this.$elem=j('<div class="w-e-bar-item"></div>'),this.$button=j('<button type="button"></button>'),this.disabled=!1,this.menu=r;var o=r.tag,a=r.width;if(o!=="button")throw new Error("Invalid tag '"+o+"', expected 'button'");var s=r.title,u=r.hotkey,l=u===void 0?"":u,f=r.iconSvg,c=f===void 0?"":f,d=this.$button;if(c){var p=j(c);kv(p),d.append(p)}else d.text(s);R2(d,c,s,l,n),n&&c&&d.append(j('<span class="title">'+s+"</span>")),a&&d.css("width",a+"px"),d.attr("data-menu-key",t),this.$elem.append(d),xn(function(){return i.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(r){r.preventDefault(),qt(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=qt(this),r=this.menu,n=r.getValue(t);r.exec(t,n)},e.prototype.setActive=function(){var t=qt(this),r=this.$button,n="active";this.menu.isActive(t)?r.addClass(n):r.removeClass(n)},e.prototype.setDisabled=function(){var t=qt(this),r=this.$button,n=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var i="disabled";n?r.addClass(i):r.removeClass(i),this.disabled=n},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}();(function(e){function t(r,n,i){return i===void 0&&(i=!1),e.call(this,r,n,i)||this}return Tn(t,e),t.prototype.onButtonClick=function(){},t})(gc);var vc=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var r=ah.get(t);r==null&&(r=new Set,ah.set(t,r)),r.add(this),jo.set(this,t)},e.prototype.renderContent=function(t){var r=this.$elem;r.empty(),r.append(t);var n=this.genSelfElem();n&&r.append(n)},e.prototype.appendTo=function(t){var r=this.$elem;t.append(r)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=jo.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=jo.get(this);t&&t.emit("modalOrPanelHide")}},e}(),N2=function(e){function t(r){var n=e.call(this,r)||this;return n.type="dropPanel",n.$elem=j('<div class="w-e-drop-panel"></div>'),n}return Tn(t,e),t.prototype.genSelfElem=function(){return null},t}(vc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var a=j2();o.$button.append(a)}return o}return Tn(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var r=this.menu;if(r.getPanelContentElem!=null){var n=qt(this);if(this.dropPanel==null){var i=new N2(n),o=r.getPanelContentElem(n);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=r.getPanelContentElem(n),a.renderContent(o),a.show())}var s=this.dropPanel;if(s.isShow){var u=this.$elem,l=u.offset().left,f=u.parents(".w-e-bar");l-f.offset().left>=f.width()/2?s.$elem.css({left:"none",right:"0"}):s.$elem.css({left:"0",right:"none"})}}},t})(gc);var $2=function(e){function t(r,n){n===void 0&&(n=0);var i=e.call(this,r)||this;i.type="modal",i.$elem=j('<div class="w-e-modal"></div>'),i.width=0,n&&(i.width=n);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),r.restoreSelection())}),i}return Tn(t,e),t.prototype.genSelfElem=function(){var r=this,n=j('<span class="btn-close"><svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg></span>'),i=jo.get(this);return n.on("click",function(){r.hide(),i==null||i.restoreSelection()}),n},t.prototype.setStyle=function(r){var n=this.width,i=this.$elem;i.attr("style",""),n&&i.css("width",n+"px"),i.css(r)},t}(vc);(function(e){function t(r,n,i){i===void 0&&(i=!1);var o=e.call(this,r,n,i)||this;return o.$body=j("body"),o.modal=null,o.menu=n,o}return Tn(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var r=qt(this),n=this.menu.getModalPositionNode(r);return Q.isElement(n)?d2(r,n):f2(r)},t.prototype.handleModal=function(){var r=qt(this),n=this.menu;if(this.modal==null){var i=new $2(r,n.modalWidth);this.renderAndShowModal(i,!0),this.modal=i}else(i=this.modal).isShow?i.hide():this.renderAndShowModal(i,!1)},t.prototype.renderAndShowModal=function(r,n){n===void 0&&(n=!1);var i=qt(this),o=this.menu;if(o.getModalContentElem!=null){var a=L.getTextarea(i),s=L.getToolbar(i),u=((s==null?void 0:s.getConfig())||{}).modalAppendToBody,l=o.getModalContentElem(i);if(r.renderContent(l),u)r.setStyle({left:"0",right:"0"});else{var f=this.getPosition();r.setStyle(f)}n&&(u?r.appendTo(this.$body):r.appendTo(a.$textAreaContainer)),r.show(),u||h2(i,r.$elem),setTimeout(function(){i.blur()})}},t})(gc);(function(e){function t(r,n){var i=e.call(this,r)||this;return i.type="selectList",i.$elem=j('<div class="w-e-select-list"></div>'),n&&i.$elem.css("width",n+"px"),i.$elem.on("click",function(o){o.stopPropagation()}),i}return Tn(t,e),t.prototype.renderList=function(r){var n=this.$elem;n.empty();var i=j("<ul></ul>");r.forEach(function(o){var a=o.value,s=o.text,u=o.selected,l=o.styleForRenderMenuList,f=j('<li data-value="'+a+'"></li>');if(l&&f.css(l),u){var c=j('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');f.append(c),f.addClass("selected")}f.append(j('<span data-value="'+a+'">'+s+"</span>")),f.attr("title",s),i.append(f)}),n.append(i)},t.prototype.genSelfElem=function(){return null},t})(vc);function qt(e){var t=nF.get(e);if(t==null)throw new Error("Can not get editor instance");return t}var L2=La("splice"),M2=P.TypeError,I2=Math.max,U2=Math.min;me({target:"Array",proto:!0,forced:!L2},{splice:function(e,t){var r,n,i,o,a,s,u=Qt(this),l=Wr(u),f=wn(e,l),c=arguments.length;if(c===0?r=n=0:c===1?(r=0,n=l-f):(r=c-2,n=U2(I2(Yi(t),0),l-f)),l+r-n>9007199254740991)throw M2("Maximum allowed length exceeded");for(i=Mg(u,n),o=0;o<n;o++)(a=f+o)in u&&Ri(i,o,u[a]);if(i.length=n,r<n){for(o=f;o<l-n;o++)s=o+r,(a=o+n)in u?u[s]=u[a]:delete u[s];for(o=l;o>l-n+r;o--)delete u[o-1]}else if(r>n)for(o=l-n;o>f;o--)s=o+r-1,(a=o+n-1)in u?u[s]=u[a]:delete u[s];for(o=0;o<r;o++)u[o+f]=arguments[o+2];return u.length=l-n+r,i}});var H2=_n.EXISTS,z2=lt.f,Tv=Function.prototype,W2=U(Tv.toString),jv=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,q2=U(jv.exec);function Jt(e){return Jt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(e)}function V2(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&n.push.apply(n,Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),n.forEach(function(i){V2(e,i,r[i])})}return e}function Lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gh(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Mt(e,t,r){return t&&Gh(e.prototype,t),r&&Gh(e,r),e}function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ii(e,t){if(t&&(Jt(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mr(e)}function On(e){return On=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},On(e)}function al(e,t){return al=Object.setPrototypeOf||function(r,n){return r.__proto__=n,r},al(e,t)}function Wa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&al(e,t)}xe&&!H2&&z2(Tv,"name",{configurable:!0,get:function(){try{return q2(jv,W2(this))[1]}catch{return""}}});var K2={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},jt=new(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Lt(this,e),this.init(t,r)}return Mt(e,[{key:"init",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=t||K2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,r,n,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[r](t))}},{key:"create",value:function(t){return new e(this.logger,Ae({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),Zt=function(){function e(){Lt(this,e),this.observers={}}return Mt(e,[{key:"on",value:function(t,r){var n=this;return t.split(" ").forEach(function(i){n.observers[i]=n.observers[i]||[],n.observers[i].push(r)}),this}},{key:"off",value:function(t,r){this.observers[t]&&(r?this.observers[t]=this.observers[t].filter(function(n){return n!==r}):delete this.observers[t])}},{key:"emit",value:function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(this.observers[t]){var o=[].concat(this.observers[t]);o.forEach(function(s){s.apply(void 0,n)})}if(this.observers["*"]){var a=[].concat(this.observers["*"]);a.forEach(function(s){s.apply(s,[t].concat(n))})}}}]),e}();function pi(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function Jh(e){return e==null?"":""+e}function G2(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function mc(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return i()?{}:{obj:e,k:n(o.shift())}}function Xh(e,t,r){var n=mc(e,t,Object);n.obj[n.k]=r}function va(e,t){var r=mc(e,t),n=r.obj,i=r.k;if(n)return n[i]}function Yh(e,t,r){var n=va(e,r);return n!==void 0?n:va(t,r)}function Rv(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Rv(e[n],t[n],r):e[n]=t[n]);return e}function nn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var J2={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function X2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return J2[t]}):e}var qa=typeof window<"u"&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1;function Nv(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),i=e,o=0;o<n.length;++o){if(!i||typeof i[n[o]]=="string"&&o+1<n.length)return;if(i[n[o]]===void 0){for(var a=2,s=n.slice(o,o+a).join(r),u=i[s];u===void 0&&n.length>o+a;)a++,u=i[s=n.slice(o,o+a).join(r)];if(u===void 0)return;if(typeof u=="string")return u;if(s&&typeof u[s]=="string")return u[s];var l=n.slice(o+a).join(r);return l?Nv(u,l,r):void 0}i=i[n[o]]}return i}}var Y2=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Lt(this,t),n=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(n)),n.data=r||{},n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.options.ignoreJSONStructure===void 0&&(n.options.ignoreJSONStructure=!0),n}return Wa(t,Zt),Mt(t,[{key:"addNamespaces",value:function(r){this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}},{key:"removeNamespaces",value:function(r){var n=this.options.ns.indexOf(r);n>-1&&this.options.ns.splice(n,1)}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[r,n];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(a?i.split(a):i)),r.indexOf(".")>-1&&(u=r.split("."));var l=va(this.data,u);return l||!s||typeof i!="string"?l:Nv(this.data&&this.data[r]&&this.data[r][n],i,a)}},{key:"addResource",value:function(r,n,i,o){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},s=this.options.keySeparator;s===void 0&&(s=".");var u=[r,n];i&&(u=u.concat(s?i.split(s):i)),r.indexOf(".")>-1&&(o=n,n=(u=r.split("."))[1]),this.addNamespaces(n),Xh(this.data,u,o),a.silent||this.emit("added",r,n,i,o)}},{key:"addResources",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in i)typeof i[a]!="string"&&Object.prototype.toString.apply(i[a])!=="[object Array]"||this.addResource(r,n,a,i[a],{silent:!0});o.silent||this.emit("added",r,n,i)}},{key:"addResourceBundle",value:function(r,n,i,o,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[r,n];r.indexOf(".")>-1&&(o=i,i=n,n=(u=r.split("."))[1]),this.addNamespaces(n);var l=va(this.data,u)||{};o?Rv(l,i,a):l=Ae({},l,i),Xh(this.data,u,l),s.silent||this.emit("added",r,n,i)}},{key:"removeResourceBundle",value:function(r,n){this.hasResourceBundle(r,n)&&delete this.data[r][n],this.removeNamespaces(n),this.emit("removed",r,n)}},{key:"hasResourceBundle",value:function(r,n){return this.getResource(r,n)!==void 0}},{key:"getResourceBundle",value:function(r,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ae({},{},this.getResource(r,n)):this.getResource(r,n)}},{key:"getDataByLanguage",value:function(r){return this.data[r]}},{key:"toJSON",value:function(){return this.data}}]),t}(),$v={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,i){var o=this;return e.forEach(function(a){o.processors[a]&&(t=o.processors[a].process(t,r,n,i))}),t}},Zh={},Qh=function(e){function t(r){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Lt(this,t),n=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(n)),G2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Mr(n)),n.options=i,n.options.keySeparator===void 0&&(n.options.keySeparator="."),n.logger=jt.create("translator"),n}return Wa(t,Zt),Mt(t,[{key:"changeLanguage",value:function(r){r&&(this.language=r)}},{key:"exists",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(r==null)return!1;var i=this.resolve(r,n);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(r,n){var i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=n.ns||this.options.defaultNS;if(i&&r.indexOf(i)>-1){var s=r.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:r,namespaces:a};var u=r.split(i);(i!==o||i===o&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),r=u.join(o)}return typeof a=="string"&&(a=[a]),{key:r,namespaces:a}}},{key:"translate",value:function(r,n,i){var o=this;if(Jt(n)!=="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),r==null)return"";Array.isArray(r)||(r=[String(r)]);var a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,s=this.extractFromKey(r[r.length-1],n),u=s.key,l=s.namespaces,f=l[l.length-1],c=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(d){var p=n.nsSeparator||this.options.nsSeparator;return f+p+u}return u}var h=this.resolve(r,n),g=h&&h.res,v=h&&h.usedKey||u,D=h&&h.exactUsedKey||u,C=Object.prototype.toString.apply(g),b=["[object Number]","[object Function]","[object RegExp]"],A=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,E=!this.i18nFormat||this.i18nFormat.handleAsObject,x=typeof g!="string"&&typeof g!="boolean"&&typeof g!="number";if(E&&g&&x&&b.indexOf(C)<0&&(typeof A!="string"||C!=="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects)return this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,g,Ae({},n,{ns:l})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(a){var _=C==="[object Array]",T=_?[]:{},k=_?D:v;for(var M in g)if(Object.prototype.hasOwnProperty.call(g,M)){var R="".concat(k).concat(a).concat(M);T[M]=this.translate(R,Ae({},n,{joinArrays:!1,ns:l})),T[M]===R&&(T[M]=g[M])}g=T}}else if(E&&typeof A=="string"&&C==="[object Array]")(g=g.join(A))&&(g=this.extendTranslation(g,r,n,i));else{var S=!1,z=!1,G=n.count!==void 0&&typeof n.count!="string",J=t.hasDefaultValue(n),oe=G?this.pluralResolver.getSuffix(c,n.count):"",le=n["defaultValue".concat(oe)]||n.defaultValue;!this.isValidLookup(g)&&J&&(S=!0,g=le),this.isValidLookup(g)||(z=!0,g=u);var ke=n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,he=ke&&z?void 0:g,V=J&&le!==g&&this.options.updateMissing;if(z||S||V){if(this.logger.log(V?"updateKey":"missingKey",c,f,u,V?le:g),a){var Oe=this.resolve(u,Ae({},n,{keySeparator:!1}));Oe&&Oe.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var ce=[],se=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&se&&se[0])for(var X=0;X<se.length;X++)ce.push(se[X]);else this.options.saveMissingTo==="all"?ce=this.languageUtils.toResolveHierarchy(n.lng||this.language):ce.push(n.lng||this.language);var te=function(ne,De,Ie){o.options.missingKeyHandler?o.options.missingKeyHandler(ne,f,De,V?Ie:he,V,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(ne,f,De,V?Ie:he,V,n),o.emit("missingKey",ne,f,De,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&G?ce.forEach(function(ne){o.pluralResolver.getSuffixes(ne).forEach(function(De){te([ne],u+De,n["defaultValue".concat(De)]||le)})}):te(ce,u,le))}g=this.extendTranslation(g,r,n,h,i),z&&g===u&&this.options.appendNamespaceToMissingKey&&(g="".concat(f,":").concat(u)),(z||S)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(g))}return g}},{key:"extendTranslation",value:function(r,n,i,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)r=this.i18nFormat.parse(r,i,o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(Ae({},i,{interpolation:Ae({},this.options.interpolation,i.interpolation)}));var u,l=i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(l){var f=r.match(this.interpolator.nestingRegexp);u=f&&f.length}var c=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(c=Ae({},this.options.interpolation.defaultVariables,c)),r=this.interpolator.interpolate(r,c,i.lng||this.language,i),l){var d=r.match(this.interpolator.nestingRegexp);u<(d&&d.length)&&(i.nest=!1)}i.nest!==!1&&(r=this.interpolator.nest(r,function(){for(var g=arguments.length,v=new Array(g),D=0;D<g;D++)v[D]=arguments[D];return a&&a[0]===v[0]&&!i.context?(s.logger.warn("It seems you are nesting recursively key: ".concat(v[0]," in key: ").concat(n[0])),null):s.translate.apply(s,v.concat([n]))},i)),i.interpolation&&this.interpolator.reset()}var p=i.postProcess||this.options.postProcess,h=typeof p=="string"?[p]:p;return r!=null&&h&&h.length&&i.applyPostProcessor!==!1&&(r=$v.handle(h,r,n,this.options&&this.options.postProcessPassResolved?Ae({i18nResolved:o},i):i,this)),r}},{key:"resolve",value:function(r){var n,i,o,a,s,u=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return typeof r=="string"&&(r=[r]),r.forEach(function(f){if(!u.isValidLookup(n)){var c=u.extractFromKey(f,l),d=c.key;i=d;var p=c.namespaces;u.options.fallbackNS&&(p=p.concat(u.options.fallbackNS));var h=l.count!==void 0&&typeof l.count!="string",g=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",v=l.lngs?l.lngs:u.languageUtils.toResolveHierarchy(l.lng||u.language,l.fallbackLng);p.forEach(function(D){u.isValidLookup(n)||(s=D,!Zh["".concat(v[0],"-").concat(D)]&&u.utils&&u.utils.hasLoadedNamespace&&!u.utils.hasLoadedNamespace(s)&&(Zh["".concat(v[0],"-").concat(D)]=!0,u.logger.warn('key "'.concat(i,'" for languages "').concat(v.join(", "),`" won't get resolved as namespace "`).concat(s,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(function(C){if(!u.isValidLookup(n)){a=C;var b,A,E=d,x=[E];for(u.i18nFormat&&u.i18nFormat.addLookupKeys?u.i18nFormat.addLookupKeys(x,d,C,D,l):(h&&(b=u.pluralResolver.getSuffix(C,l.count)),h&&g&&x.push(E+b),g&&x.push(E+="".concat(u.options.contextSeparator).concat(l.context)),h&&x.push(E+=b));A=x.pop();)u.isValidLookup(n)||(o=A,n=u.getResource(C,D,A,l))}}))})}}),{res:n,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}},{key:"isValidLookup",value:function(r){return!(r===void 0||!this.options.returnNull&&r===null||!this.options.returnEmptyString&&r==="")}},{key:"getResource",value:function(r,n,i){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(r,n,i,o):this.resourceStore.getResource(r,n,i,o)}}],[{key:"hasDefaultValue",value:function(r){var n="defaultValue";for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n===i.substring(0,n.length)&&r[i]!==void 0)return!0;return!1}}]),t}();function uu(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Z2=function(){function e(t){Lt(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=jt.create("languageUtils")}return Mt(e,[{key:"getScriptPartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return null;var r=t.split("-");return r.length===2?null:(r.pop(),r[r.length-1].toLowerCase()==="x"?null:this.formatLanguageCode(r.join("-")))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||t.indexOf("-")<0)return t;var r=t.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(t){if(typeof t=="string"&&t.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(i){return i.toLowerCase()}):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=uu(n[1].toLowerCase()))):n.length===3&&(n[0]=n[0].toLowerCase(),n[1].length===2&&(n[1]=n[1].toUpperCase()),n[0]!=="sgn"&&n[2].length===2&&(n[2]=n[2].toUpperCase()),r.indexOf(n[1].toLowerCase())>-1&&(n[1]=uu(n[1].toLowerCase())),r.indexOf(n[2].toLowerCase())>-1&&(n[2]=uu(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isWhitelisted",value:function(t){return this.logger.deprecate("languageUtils.isWhitelisted",`function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it's usage asap.`),this.isSupportedCode(t)}},{key:"isSupportedCode",value:function(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var r,n=this;return t?(t.forEach(function(i){if(!r){var o=n.formatLanguageCode(i);n.options.supportedLngs&&!n.isSupportedCode(o)||(r=o)}}),!r&&this.options.supportedLngs&&t.forEach(function(i){if(!r){var o=n.getLanguagePartFromCode(i);if(n.isSupportedCode(o))return r=o;r=n.options.supportedLngs.find(function(a){if(a.indexOf(o)===0)return a})}}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r):null}},{key:"getFallbackCodes",value:function(t,r){if(!t)return[];if(typeof t=="function"&&(t=t(r)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!r)return t.default||[];var n=t[r];return n||(n=t[this.getScriptPartFromCode(r)]),n||(n=t[this.formatLanguageCode(r)]),n||(n=t[this.getLanguagePartFromCode(r)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,r){var n=this,i=this.getFallbackCodes(r||this.options.fallbackLng||[],t),o=[],a=function(s){s&&(n.isSupportedCode(s)?o.push(s):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(s)))};return typeof t=="string"&&t.indexOf("-")>-1?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),i.forEach(function(s){o.indexOf(s)<0&&a(n.formatLanguageCode(s))}),o}}]),e}(),Q2=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ex={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};function tx(){var e={};return Q2.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:ex[t.fc]}})}),e}var rx=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Lt(this,e),this.languageUtils=t,this.options=r,this.logger=jt.create("pluralResolver"),this.rules=tx()}return Mt(e,[{key:"addRule",value:function(t,r){this.rules[t]=r}},{key:"getRule",value:function(t){return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var r=this.getRule(t);return r&&r.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,r){return this.getSuffixes(t).map(function(n){return r+n})}},{key:"getSuffixes",value:function(t){var r=this,n=this.getRule(t);return n?n.numbers.map(function(i){return r.getSuffix(t,i)}):[]}},{key:"getSuffix",value:function(t,r){var n=this,i=this.getRule(t);if(i){var o=i.noAbs?i.plurals(r):i.plurals(Math.abs(r)),a=i.numbers[o];this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return n.options.prepend&&a.toString()?n.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&i.numbers.length===2&&i.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(t)),""}}]),e}(),nx=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lt(this,e),this.logger=jt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Mt(e,[{key:"init",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var r=t.interpolation;this.escape=r.escape!==void 0?r.escape:X2,this.escapeValue=r.escapeValue===void 0||r.escapeValue,this.useRawValueToEscape=r.useRawValueToEscape!==void 0&&r.useRawValueToEscape,this.prefix=r.prefix?nn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?nn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?nn(r.nestingPrefix):r.nestingPrefixEscaped||nn("$t("),this.nestingSuffix=r.nestingSuffix?nn(r.nestingSuffix):r.nestingSuffixEscaped||nn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0&&r.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(t,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(t,r,n,i){var o,a,s,u=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function f(g){return g.replace(/\$/g,"$$$$")}var c=function(g){if(g.indexOf(u.formatSeparator)<0){var v=Yh(r,l,g);return u.alwaysFormat?u.format(v,void 0,n,Ae({},i,r,{interpolationkey:g})):v}var D=g.split(u.formatSeparator),C=D.shift().trim(),b=D.join(u.formatSeparator).trim();return u.format(Yh(r,l,C),b,n,Ae({},i,r,{interpolationkey:C}))};this.resetRegExp();var d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,p=i&&i.interpolation&&i.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables,h=[{regex:this.regexpUnescape,safeValue:function(g){return f(g)}},{regex:this.regexp,safeValue:function(g){return u.escapeValue?f(u.escape(g)):f(g)}}];return h.forEach(function(g){for(s=0;o=g.regex.exec(t);){if((a=c(o[1].trim()))===void 0)if(typeof d=="function"){var v=d(t,o,i);a=typeof v=="string"?v:""}else{if(p){a=o[0];continue}u.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(t)),a=""}else typeof a=="string"||u.useRawValueToEscape||(a=Jh(a));var D=g.safeValue(a);if(t=t.replace(o[0],D),p?(g.regex.lastIndex+=D.length,g.regex.lastIndex-=o[0].length):g.regex.lastIndex=0,++s>=u.maxReplaces)break}}),t}},{key:"nest",value:function(t,r){var n,i,o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=Ae({},a);function u(d,p){var h=this.nestingOptionsSeparator;if(d.indexOf(h)<0)return d;var g=d.split(new RegExp("".concat(h,"[ ]*{"))),v="{".concat(g[1]);d=g[0],v=(v=this.interpolate(v,s)).replace(/'/g,'"');try{s=JSON.parse(v),p&&(s=Ae({},p,s))}catch(D){return this.logger.warn("failed parsing options string in nesting for key ".concat(d),D),"".concat(d).concat(h).concat(v)}return delete s.defaultValue,d}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],f=!1;if(n[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(d){return d.trim()});n[1]=c.shift(),l=c,f=!0}if((i=r(u.call(this,n[1].trim(),s),s))&&n[0]===t&&typeof i!="string")return i;typeof i!="string"&&(i=Jh(i)),i||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),i=""),f&&(i=l.reduce(function(d,p){return o.format(d,p,a.lng,Ae({},a,{interpolationkey:n[1].trim()}))},i.trim())),t=t.replace(n[0],i),this.regexp.lastIndex=0}return t}}]),e}(),ix=function(e){function t(r,n,i){var o,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Lt(this,t),o=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(o)),o.backend=r,o.store=n,o.services=i,o.languageUtils=i.languageUtils,o.options=a,o.logger=jt.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,a.backend,a),o}return Wa(t,Zt),Mt(t,[{key:"queueLoad",value:function(r,n,i,o){var a=this,s=[],u=[],l=[],f=[];return r.forEach(function(c){var d=!0;n.forEach(function(p){var h="".concat(c,"|").concat(p);!i.reload&&a.store.hasResourceBundle(c,p)?a.state[h]=2:a.state[h]<0||(a.state[h]===1?u.indexOf(h)<0&&u.push(h):(a.state[h]=1,d=!1,u.indexOf(h)<0&&u.push(h),s.indexOf(h)<0&&s.push(h),f.indexOf(p)<0&&f.push(p)))}),d||l.push(c)}),(s.length||u.length)&&this.queue.push({pending:u,loaded:{},errors:[],callback:o}),{toLoad:s,pending:u,toLoadLanguages:l,toLoadNamespaces:f}}},{key:"loaded",value:function(r,n,i){var o=r.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i),this.state[r]=n?-1:2;var u={};this.queue.forEach(function(l){(function(f,c,d,p){var h=mc(f,c,Object),g=h.obj,v=h.k;g[v]=g[v]||[],g[v].push(d)})(l.loaded,[a],s),function(f,c){for(var d=f.indexOf(c);d!==-1;)f.splice(d,1),d=f.indexOf(c)}(l.pending,r),n&&l.errors.push(n),l.pending.length!==0||l.done||(Object.keys(l.loaded).forEach(function(f){u[f]||(u[f]=[]),l.loaded[f].length&&l.loaded[f].forEach(function(c){u[f].indexOf(c)<0&&u[f].push(c)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(l){return!l.done})}},{key:"read",value:function(r,n,i){var o=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:350,u=arguments.length>5?arguments[5]:void 0;return r.length?this.backend[i](r,n,function(l,f){l&&f&&a<5?setTimeout(function(){o.read.call(o,r,n,i,a+1,2*s,u)},s):u(l,f)}):u(null,{})}},{key:"prepareLoading",value:function(r,n){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof r=="string"&&(r=this.languageUtils.toResolveHierarchy(r)),typeof n=="string"&&(n=[n]);var s=this.queueLoad(r,n,o,a);if(!s.toLoad.length)return s.pending.length||a(),null;s.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(r,n,i){this.prepareLoading(r,n,{},i)}},{key:"reload",value:function(r,n,i){this.prepareLoading(r,n,{reload:!0},i)}},{key:"loadOne",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=r.split("|"),a=o[0],s=o[1];this.read(a,s,"read",void 0,void 0,function(u,l){u&&n.logger.warn("".concat(i,"loading namespace ").concat(s," for language ").concat(a," failed"),u),!u&&l&&n.logger.log("".concat(i,"loaded namespace ").concat(s," for language ").concat(a),l),n.loaded(r,u,l)})}},{key:"saveMissing",value:function(r,n,i,o,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)?this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(n,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):i!=null&&i!==""&&(this.backend&&this.backend.create&&this.backend.create(r,n,i,o,null,Ae({},s,{isUpdate:a})),r&&r[0]&&this.store.addResource(r[0],n,i,o))}}]),t}();function ox(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if(Jt(e[1])==="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),Jt(e[2])==="object"||Jt(e[3])==="object"){var r=e[3]||e[2];Object.keys(r).forEach(function(n){t[n]=r[n]})}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function ep(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function xo(){}var ax=function(e){function t(){var r,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Lt(this,t),r=Ii(this,On(t).call(this)),qa&&Zt.call(Mr(r)),r.options=ep(n),r.services={},r.logger=jt,r.modules={external:[]},i&&!r.isInitialized&&!n.isClone){if(!r.options.initImmediate)return r.init(n,i),Ii(r,Mr(r));setTimeout(function(){r.init(n,i)},0)}return r}return Wa(t,Zt),Mt(t,[{key:"init",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;function o(p){return p?typeof p=="function"?new p:p:null}if(typeof n=="function"&&(i=n,n={}),n.whitelist&&!n.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),n.nonExplicitWhitelist&&!n.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=Ae({},ox(),this.options,ep(n)),this.format=this.options.interpolation.format,i||(i=xo),!this.options.isClone){this.modules.logger?jt.init(o(this.modules.logger),this.options):jt.init(null,this.options);var a=new Z2(this.options);this.store=new Y2(this.options.resources,this.options);var s=this.services;s.logger=jt,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new rx(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s.interpolator=new nx(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new ix(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new Qh(this.services,this.options),this.translator.on("*",function(p){for(var h=arguments.length,g=new Array(h>1?h-1:0),v=1;v<h;v++)g[v-1]=arguments[v];r.emit.apply(r,[p].concat(g))}),this.modules.external.forEach(function(p){p.init&&p.init(r)})}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var l=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments)}});var f=["addResource","addResources","addResourceBundle","removeResourceBundle"];f.forEach(function(p){r[p]=function(){var h;return(h=r.store)[p].apply(h,arguments),r}});var c=pi(),d=function(){var p=function(h,g){r.isInitialized&&!r.initializedStoreOnce&&r.logger.warn("init: i18next is already initialized. You should call init just once!"),r.isInitialized=!0,r.options.isClone||r.logger.log("initialized",r.options),r.emit("initialized",r.options),c.resolve(g),i(h,g)};if(r.languages&&r.options.compatibilityAPI!=="v1"&&!r.isInitialized)return p(null,r.t.bind(r));r.changeLanguage(r.options.lng,p)};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xo,o=i,a=typeof r=="string"?r:this.language;if(typeof r=="function"&&(o=r),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return o();var s=[],u=function(f){f&&n.services.languageUtils.toResolveHierarchy(f).forEach(function(c){s.indexOf(c)<0&&s.push(c)})};if(a)u(a);else{var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(s,this.options.ns,o)}else o(null)}},{key:"reloadResources",value:function(r,n,i){var o=pi();return r||(r=this.languages),n||(n=this.options.ns),i||(i=xo),this.services.backendConnector.reload(r,n,function(a){o.resolve(),i(a)}),o}},{key:"use",value:function(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&$v.addPostProcessor(r),r.type==="3rdParty"&&this.modules.external.push(r),this}},{key:"changeLanguage",value:function(r,n){var i=this;this.isLanguageChangingTo=r;var o=pi();this.emit("languageChanging",r);var a=function(s){r||s||!i.services.languageDetector||(s=[]);var u=typeof s=="string"?s:i.services.languageUtils.getBestMatchFromCodes(s);u&&(i.language||(i.language=u,i.languages=i.services.languageUtils.toResolveHierarchy(u)),i.translator.language||i.translator.changeLanguage(u),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(u)),i.loadResources(u,function(l){(function(f,c){c?(i.language=c,i.languages=i.services.languageUtils.toResolveHierarchy(c),i.translator.changeLanguage(c),i.isLanguageChangingTo=void 0,i.emit("languageChanged",c),i.logger.log("languageChanged",c)):i.isLanguageChangingTo=void 0,o.resolve(function(){return i.t.apply(i,arguments)}),n&&n(f,function(){return i.t.apply(i,arguments)})})(l,u)})};return r||!this.services.languageDetector||this.services.languageDetector.async?!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(a):a(r):a(this.services.languageDetector.detect()),o}},{key:"getFixedT",value:function(r,n,i){var o=this,a=function s(u,l){var f;if(Jt(l)!=="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),p=2;p<c;p++)d[p-2]=arguments[p];f=o.options.overloadTranslationOptionHandler([u,l].concat(d))}else f=Ae({},l);f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns;var h=o.options.keySeparator||".",g=i?"".concat(i).concat(h).concat(u):u;return o.t(g,f)};return typeof r=="string"?a.lng=r:a.lngs=r,a.ns=n,a.keyPrefix=i,a}},{key:"t",value:function(){var r;return this.translator&&(r=this.translator).translate.apply(r,arguments)}},{key:"exists",value:function(){var r;return this.translator&&(r=this.translator).exists.apply(r,arguments)}},{key:"setDefaultNamespace",value:function(r){this.options.defaultNS=r}},{key:"hasLoadedNamespace",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var o=this.languages[0],a=!!this.options&&this.options.fallbackLng,s=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;var u=function(f,c){var d=n.services.backendConnector.state["".concat(f,"|").concat(c)];return d===-1||d===2};if(i.precheck){var l=i.precheck(this,u);if(l!==void 0)return l}return!!this.hasResourceBundle(o,r)||!this.services.backendConnector.backend||!(!u(o,r)||a&&!u(s,r))}},{key:"loadNamespaces",value:function(r,n){var i=this,o=pi();return this.options.ns?(typeof r=="string"&&(r=[r]),r.forEach(function(a){i.options.ns.indexOf(a)<0&&i.options.ns.push(a)}),this.loadResources(function(a){o.resolve(),n&&n(a)}),o):(n&&n(),Promise.resolve())}},{key:"loadLanguages",value:function(r,n){var i=pi();typeof r=="string"&&(r=[r]);var o=this.options.preload||[],a=r.filter(function(s){return o.indexOf(s)<0});return a.length?(this.options.preload=o.concat(a),this.loadResources(function(s){i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}},{key:"dir",value:function(r){return r||(r=this.languages&&this.languages.length>0?this.languages[0]:this.language),r?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(r))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new t(r,n)}},{key:"cloneInstance",value:function(){var r=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xo,o=Ae({},this.options,n,{isClone:!0}),a=new t(o),s=["store","services","language"];return s.forEach(function(u){a[u]=r[u]}),a.services=Ae({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new Qh(a.services,a.options),a.translator.on("*",function(u){for(var l=arguments.length,f=new Array(l>1?l-1:0),c=1;c<l;c++)f[c-1]=arguments[c];a.emit.apply(a,[u].concat(f))}),a.init(o,i),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages}}}]),t}(),sl=new ax;sl.init({lng:"zh-CN",resources:{}});sl.t.bind(sl);function sx(e,t,r){const n=j(e);t=t.filter(s=>!!(W.isText(s)||r.isInline(s))),t.length===0&&(t=[{text:n.text().replace(/\s+/gm," ")}]);const i=parseInt(n.attr("colSpan")||"1"),o=parseInt(n.attr("rowSpan")||"1"),a=n.attr("width")||up(n,"width")||"auto";return{type:"table-cell",isHeader:sp(n)==="th",colSpan:i,rowSpan:o,width:a,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t}}const ux={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:sx};function lx(e,t,r){return{type:"table-row",attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",align:e.getAttribute("align")||"",valign:e.getAttribute("valign")||""},children:t.filter(n=>L.getNodeType(n)==="table-cell")}}const cx={selector:"tr:not([data-w-e-type])",parseElemHtml:lx};function fx(e,t,r){const n=j(e);let i="auto";return up(n,"width")==="100%"&&(i="100%"),n.attr("width")==="100%"&&(i="100%"),{type:"table",width:i,attrs:{style:e.getAttribute("style")||"",class:e.getAttribute("class")||"",cellSpacing:e.getAttribute("cellspacing")||"",cellPadding:e.getAttribute("cellpadding")||"",border:e.getAttribute("border")||"",align:e.getAttribute("align")||""},children:t.filter(o=>L.getNodeType(o)==="table-row")}}const dx={selector:"table:not([data-w-e-type])",parseElemHtml:fx};function hx(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}function Me(e,t){return t?` ${e}="${hx(t)}"`:""}function px(e,t){const{width:r="auto",attrs:n={}}=e,i=n.style||(r!=="auto"?`width: ${r};`:"");return`<table${Me("style",i)}${Me("class",n.class)}${Me("cellspacing",n.cellSpacing)}${Me("cellpadding",n.cellPadding)}${Me("border",n.border)}${Me("align",n.align)}><tbody>${t}</tbody></table>`}function gx(e,t){const{attrs:r={}}=e;return`<tr${Me("style",r.style)}${Me("class",r.class)}${Me("align",r.align)}${Me("valign",r.valign)}>${t}</tr>`}function vx(e,t){const{colSpan:r=1,rowSpan:n=1,isHeader:i=!1,width:o="auto",attrs:a={}}=e,s=i?"th":"td",u=o!=="auto"?Me("width",o):"";return`<${s} colspan="${r}" rowspan="${n}"${u}${Me("style",a.style)}${Me("class",a.class)}${Me("align",a.align)}${Me("valign",a.valign)}>${t}</${s}>`}const mx={type:"table",elemToHtml:px},yx={type:"table-row",elemToHtml:gx},Dx={type:"table-cell",elemToHtml:vx};function Cx(e){return e.tagName==="SPAN"&&!!e.closest("table")}function bx(e,t){if(!W.isText(t)||!Cx(e))return t;const r=e.getAttribute("class")||"",n=e.getAttribute("style")||"";return!r&&!n?t:{...t,...r?{tableInlineClass:r}:{},...n?{tableInlineStyle:n}:{}}}function wx(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;if(!r&&!n)return t;const i=r.replace(/&/g,"&").replace(/"/g,"""),o=n.replace(/&/g,"&").replace(/"/g,"""),a=i?` class="${i}"`:"",s=o?` style="${o}"`:"";return`<span${a}${s}>${t}</span>`}function Ex(e,t){if(!W.isText(e))return t;const{tableInlineClass:r="",tableInlineStyle:n=""}=e;return!r&&!n?t:tt("span",{attrs:{class:r,style:n}},[t])}function Lv(e){const t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function Bx(e,t){const r=L.getParentNode(e,t);if(r==null)return!1;const n=L.getParentNode(e,r);return n==null?!1:Lv(n).some(o=>o===t)}function ma(e){return Object.entries(e||{}).reduce((t,[r,n])=>(typeof n=="string"&&n&&(t[r]=n),t),{})}function yc(e,t){try{return L.findPath(e,t)}catch{return null}}function Ax(e,t){if(e.isDisabled())return!1;const{selection:r}=e;if(r==null||O.isCollapsed(r))return!0;const{anchor:n,focus:i}=r,o=yc(e,t);if(o==null)return!1;const a=m.start(e,o),s=m.end(e,o),u=Y.compare(n,s)<=0&&Y.compare(n,a)>=0,l=Y.compare(i,s)<=0&&Y.compare(i,a)>=0;return!!(u&&l&&w.equals(n.path.slice(0,3),i.path.slice(0,3)))}function Fx(e,t,r){const n=Ax(r,e),{width:i="auto",attrs:o={}}=e,a=L.isNodeSelected(r,e),s=Lv(e);return tt("div",{className:"table-container","data-selected":a,on:{mousedown:u=>{if(u.target.tagName==="DIV"&&u.preventDefault(),r.isDisabled())return;const l=yc(r,e);if(l==null)return;const f=m.start(r,l),{selection:c}=r;if(c==null){r.select(f);return}const{path:d}=c.anchor;d[0]!==l[0]&&r.select(f)}}},[tt("table",{width:i,attrs:ma({style:o.style,class:o.class,cellspacing:o.cellSpacing,cellpadding:o.cellPadding,border:o.border,align:o.align}),contentEditable:n},[tt("colgroup",s.map(u=>{const{width:l="auto"}=u;return tt("col",{width:l})})),tt("tbody",t||[])])])}function xx(e,t,r){const n=e.attrs||{};return tt("tr",{attrs:ma({style:n.style,class:n.class,align:n.align,valign:n.valign})},t||[])}let Ui=!1,Mv=0,Iv=0,vn=null,mn=null;const ya=new WeakMap,Hi=j("body");function Ox(e){ya.has(e)||ya.set(e,e.style.cursor),e.style.cursor="col-resize"}function ul(e){const t=ya.get(e);t!=null&&(e.style.cursor=t,ya.delete(e))}function Sx(e){const t=e.target;if(t.tagName!=="TH"&&t.tagName!=="TD"||t.style.cursor!=="col-resize")return;ul(t),e.preventDefault(),Ui=!0;const{clientX:r}=e;Mv=r;const{width:n}=t.getBoundingClientRect();Iv=n,Hi.on("mousemove",Hv),Hi.on("mouseup",Uv)}Hi.on("mousedown",Sx);function Uv(e){Ui=!1,mn=null,vn=null,Hi.off("mousemove",Hv),Hi.off("mouseup",Uv)}const Hv=ae.t(function(e){if(!Ui||mn==null||vn==null)return;e.preventDefault();const{clientX:t}=e;let r=Iv+(t-Mv);r=Math.floor(r*100)/100,r<30&&(r=30),N.setNodes(mn,{width:r.toString()},{at:vn})},100);function _x(e,t,r){const n=Bx(r,e),{colSpan:i=1,rowSpan:o=1,isHeader:a=!1,attrs:s={}}=e;return n?tt(a?"th":"td",{colSpan:i,rowSpan:o,attrs:ma({style:s.style,class:s.class,align:s.align,valign:s.valign}),on:{mousemove:ae.t(function(l){const f=this.elm;if(f==null)return;const{left:c,width:d,top:p,height:h}=f.getBoundingClientRect(),{clientX:g,clientY:v}=l;if(Ui)return;const D=g>c+d-5&&g<c+d,C=v>p&&v<p+h;if(D&&C){const b=yc(r,e);if(b==null){ul(f),mn=null,vn=null;return}Ox(f),mn=r,vn=b}else Ui||(ul(f),mn=null,vn=null)},100)}},t||[]):tt("td",{colSpan:i,rowSpan:o,attrs:ma({style:s.style,class:s.class,align:s.align,valign:s.valign})},t||[])}const Px={type:"table",renderElem:Fx},kx={type:"table-row",renderElem:xx},Tx={type:"table-cell",renderElem:_x},tp="__officialBlockTableExtensionsRegistered__",jx=pe.defineComponent({__name:"index",props:{name:{default:""},modelValue:{default:""},placeholder:{default:"Please input content..."},height:{default:"400px"},mode:{default:"default"},disabled:{type:Boolean,default:!1},maxLength:{default:1e4},excludeKeys:{default:()=>[]},includeKeys:{default:()=>[]}},emits:["update:modelValue","change","focus","blur","created","upload-image","upload-video"],setup(e,{expose:t,emit:r}){const n=globalThis;Re.Boot.registerRenderElem(Tx),Re.Boot.registerRenderElem(kx),Re.Boot.registerRenderElem(Px),n[tp]||(Re.Boot.registerPreParseHtml(s1),Re.Boot.registerParseElemHtml(ux),Re.Boot.registerParseElemHtml(cx),Re.Boot.registerParseElemHtml(dx),Re.Boot.registerElemToHtml(Dx),Re.Boot.registerElemToHtml(yx),Re.Boot.registerElemToHtml(mx),Re.Boot.registerParseStyleHtml(bx),Re.Boot.registerRenderStyle(Ex),Re.Boot.registerStyleToHtml(wx),n[tp]=!0);const i=e,o=r,a=pe.shallowRef(),s=pe.ref(""),u=pe.computed(()=>typeof i.height=="number"?`${i.height}px`:i.height),l=pe.inject("handleUpload",()=>{}),f=pe.inject("fileUrl",null),c=pe.inject("chooseName",null),d=pe.ref(""),p=pe.ref(null),h=S=>{if(!l){console.warn("Upload: handleUpload function not provided by ancestor");return}if(d.value=S,a.value)try{const G=a.value.selection;G&&(p.value={anchor:{path:[...G.anchor.path],offset:G.anchor.offset},focus:{path:[...G.focus.path],offset:G.focus.offset}})}catch(G){console.warn("保存光标位置失败:",G)}const z=i.name+"_"+S;f.value=null,l(!0,z,S==="video"?"video":"image")};pe.watch(()=>i.name,()=>{f.value=null},{deep:!0,immediate:!0}),pe.watch(()=>[f==null?void 0:f.value],([S])=>{const z=i.name+"_"+d.value;!S||!c.value||c.value!==z||a.value&&pe.nextTick(()=>{var G;if(a.value){try{if(a.value.focus(),p.value)try{a.value.select(p.value)}catch(J){console.warn("恢复光标位置失败,使用默认位置:",J)}}catch(J){console.warn("聚焦编辑器失败:",J)}if(d.value==="img"){const oe=`<img src="${S}" alt="图片" style="max-width: 100%;">`;(G=a.value)==null||G.dangerouslyInsertHtml(oe)}else{const J={type:"video",src:S,children:[{text:""}]};Promise.resolve().then(()=>{a.value&&N.insertNodes(a.value,J)})}p.value=null,d.value=""}})},{immediate:!1,flush:"sync"});function g(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传图片",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>'}isActive(){return!1}getValue(){return""}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传图片菜单"),S("img")})}}}function v(S){return class{constructor(){ur(this,"title");ur(this,"tag");ur(this,"iconSvg");this.title="上传视频",this.tag="button",this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>'}getValue(){return""}isActive(){return!1}isDisabled(){return!1}exec(){pe.nextTick(()=>{console.log("点击了自定义上传视频菜单"),S("video")})}}}const D={toolbarKeys:["headerSelect","bold","italic","through","underline","color","fontSize","lineHeight","delIndent","indent","divider","insertTable","justifyCenter","justifyJustify","justifyLeft","justifyRight","bulletedList","numberedList","undo","redo","clearStyle","codeBlock"]},C=["#0032A0","#FF0044","#FF8200","#001E60","#E3E3E6","#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E8E8E8","#F5F5F5","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],b={placeholder:i.placeholder,readOnly:i.disabled,maxLength:i.maxLength,MENU_CONF:{color:{colors:C},bgColor:{colors:C}},hoverbarKeys:{text:{menuKeys:["headerSelect","insertLink","bold","italic","underline","through","clearStyle"]}}},A=Math.random().toString(36).substring(2,9),E=`CustomImageMenu_${A}`,x=`CustomVideoMenu_${A}`,_=S=>{a.value=S;try{const z=g(h),G=v(h),J={key:E,factory(){return new z}},oe={key:x,factory(){return new G}};Re.Boot.registerMenu(J),Re.Boot.registerMenu(oe)}catch(z){console.warn("菜单注册失败:",z)}D.insertKeys={index:0,keys:[E,x]},o("created",S)};pe.onBeforeUnmount(()=>{const S=a.value;S!=null&&S.destroy()}),pe.watch(()=>i.modelValue,S=>{S!==s.value&&(s.value=S||"")},{immediate:!0});const T=S=>{o("update:modelValue",s.value),o("change",S)},k=()=>{a.value=void 0},M=S=>{o("focus",S)},R=S=>{o("blur",S)};return t({editor:a,getHtml:()=>s.value,getText:()=>{var S;return((S=a.value)==null?void 0:S.getText())||""},isEmpty:()=>{var S;return((S=a.value)==null?void 0:S.isEmpty())||!0},clear:()=>{var S;return(S=a.value)==null?void 0:S.clear()},focus:()=>{var S;return(S=a.value)==null?void 0:S.focus()},blur:()=>{var S;return(S=a.value)==null?void 0:S.blur()},disable:()=>{var S;return(S=a.value)==null?void 0:S.disable()},enable:()=>{var S;return(S=a.value)==null?void 0:S.enable()}}),(S,z)=>(pe.openBlock(),pe.createElementBlock("div",{class:pe.normalizeClass(["rich-text-editor",S.class])},[pe.createVNode(pe.unref(kc.Toolbar),{class:"editor-toolbar",editor:a.value,defaultConfig:D,mode:e.mode},null,8,["editor","mode"]),pe.createVNode(pe.unref(kc.Editor),{class:"editor-content",style:pe.normalizeStyle({height:u.value}),modelValue:s.value,"onUpdate:modelValue":z[0]||(z[0]=G=>s.value=G),defaultConfig:b,mode:e.mode,onOnCreated:_,onOnChange:T,onOnDestroyed:k,onOnFocus:M,onOnBlur:R},null,8,["style","modelValue","mode"])],2))}}),Rx=ae._(jx,[["__scopeId","data-v-51ae9d84"]]);exports.default=Rx;
|