Files
lichterei-web/kirby/panel/dist/js/vendor.js
Bastian Allgeier 833f327139 Upgrade to 3.7.2
2022-07-27 15:34:32 +02:00

20 lines
375 KiB
JavaScript
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*!
* Vue.js v2.7.5
* (c) 2014-2022 Evan You
* Released under the MIT License.
*/
var t=Object.freeze({}),e=Array.isArray;function n(t){return null==t}function r(t){return null!=t}function o(t){return!0===t}function i(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function s(t){return"function"==typeof t}function a(t){return null!==t&&"object"==typeof t}var l=Object.prototype.toString;function c(t){return"[object Object]"===l.call(t)}function u(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function d(t){return r(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function h(t){return null==t?"":Array.isArray(t)||c(t)&&t.toString===l?JSON.stringify(t,null,2):String(t)}function f(t){var e=parseFloat(t);return isNaN(e)?t:e}function p(t,e){for(var n=Object.create(null),r=t.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}var m=p("slot,component",!0),g=p("key,ref,slot,slot-scope,is");function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}var y=Object.prototype.hasOwnProperty;function b(t,e){return y.call(t,e)}function w(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}var x=/-(\w)/g,S=w((function(t){return t.replace(x,(function(t,e){return e?e.toUpperCase():""}))})),k=w((function(t){return t.charAt(0).toUpperCase()+t.slice(1)})),_=/\B([A-Z])/g,O=w((function(t){return t.replace(_,"-$1").toLowerCase()}));var C=Function.prototype.bind?function(t,e){return t.bind(e)}:function(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n};function M(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function D(t,e){for(var n in e)t[n]=e[n];return t}function T(t){for(var e={},n=0;n<t.length;n++)t[n]&&D(e,t[n]);return e}function $(t,e,n){}var E=function(t,e,n){return!1},N=function(t){return t};function A(t,e){if(t===e)return!0;var n=a(t),r=a(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var o=Array.isArray(t),i=Array.isArray(e);if(o&&i)return t.length===e.length&&t.every((function(t,n){return A(t,e[n])}));if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(o||i)return!1;var s=Object.keys(t),l=Object.keys(e);return s.length===l.length&&s.every((function(n){return A(t[n],e[n])}))}catch(c){return!1}}function P(t,e){for(var n=0;n<t.length;n++)if(A(t[n],e))return n;return-1}function I(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function R(t,e){return t===e?0===t&&1/t!=1/e:t==t||e==e}var z=["component","directive","filter"],j=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:E,isReservedAttr:E,isUnknownElement:E,getTagNamespace:$,parsePlatformTagName:N,mustUseProp:E,async:!0,_lifecycleHooks:j},L=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function B(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function V(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var W=new RegExp("[^".concat(L.source,".$_\\d]"));var q="__proto__"in{},H="undefined"!=typeof window,J=H&&window.navigator.userAgent.toLowerCase(),K=J&&/msie|trident/.test(J),Y=J&&J.indexOf("msie 9.0")>0,U=J&&J.indexOf("edge/")>0;J&&J.indexOf("android");var G=J&&/iphone|ipad|ipod|ios/.test(J);J&&/chrome\/\d+/.test(J),J&&/phantomjs/.test(J);var X,Z=J&&J.match(/firefox\/(\d+)/),Q={}.watch,tt=!1;if(H)try{var et={};Object.defineProperty(et,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,et)}catch(Fy){}var nt=function(){return void 0===X&&(X=!H&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),X},rt=H&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ot(t){return"function"==typeof t&&/native code/.test(t.toString())}var it,st="undefined"!=typeof Symbol&&ot(Symbol)&&"undefined"!=typeof Reflect&&ot(Reflect.ownKeys);it="undefined"!=typeof Set&&ot(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var at=null;function lt(t){void 0===t&&(t=null),t||at&&at._scope.off(),at=t,t&&t._scope.on()}var ct=function(){function t(t,e,n,r,o,i,s,a){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(t.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),t}(),ut=function(t){void 0===t&&(t="");var e=new ct;return e.text=t,e.isComment=!0,e};function dt(t){return new ct(void 0,void 0,void 0,String(t))}function ht(t){var e=new ct(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}var ft=0,pt=function(){function t(){this.id=ft++,this.subs=[]}return t.prototype.addSub=function(t){this.subs.push(t)},t.prototype.removeSub=function(t){v(this.subs,t)},t.prototype.depend=function(e){t.target&&t.target.addDep(this)},t.prototype.notify=function(t){for(var e=this.subs.slice(),n=0,r=e.length;n<r;n++)e[n].update()},t}();pt.target=null;var mt=[];function gt(t){mt.push(t),pt.target=t}function vt(){mt.pop(),pt.target=mt[mt.length-1]}var yt=Array.prototype,bt=Object.create(yt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(t){var e=yt[t];V(bt,t,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=e.apply(this,n),s=this.__ob__;switch(t){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&s.observeArray(o),s.dep.notify(),i}))}));var wt=Object.getOwnPropertyNames(bt),xt={},St=!0;function kt(t){St=t}var _t={notify:$,depend:$,addSub:$,removeSub:$},Ot=function(){function t(t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!1),this.value=t,this.shallow=n,this.mock=r,this.dep=r?_t:new pt,this.vmCount=0,V(t,"__ob__",this),e(t)){if(!r)if(q)t.__proto__=bt;else for(var o=0,i=wt.length;o<i;o++){V(t,a=wt[o],bt[a])}n||this.observeArray(t)}else{var s=Object.keys(t);for(o=0;o<s.length;o++){var a;Mt(t,a=s[o],xt,void 0,n,r)}}}return t.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)Ct(t[e],!1,this.mock)},t}();function Ct(t,n,r){var o;if(!(!a(t)||At(t)||t instanceof ct))return b(t,"__ob__")&&t.__ob__ instanceof Ot?o=t.__ob__:!St||!r&&nt()||!e(t)&&!c(t)||!Object.isExtensible(t)||t.__v_skip||(o=new Ot(t,n,r)),o}function Mt(t,n,r,o,i,s){var a=new pt,l=Object.getOwnPropertyDescriptor(t,n);if(!l||!1!==l.configurable){var c=l&&l.get,u=l&&l.set;c&&!u||r!==xt&&2!==arguments.length||(r=t[n]);var d=!i&&Ct(r,!1,s);return Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var n=c?c.call(t):r;return pt.target&&(a.depend(),d&&(d.dep.depend(),e(n)&&$t(n))),At(n)&&!i?n.value:n},set:function(e){var n=c?c.call(t):r;if(R(n,e)){if(u)u.call(t,e);else{if(c)return;if(At(n)&&!At(e))return void(n.value=e);r=e}d=!i&&Ct(e,!1,s),a.notify()}}}),a}}function Dt(t,n,r){if(!Nt(t)){var o=t.__ob__;return e(t)&&u(n)?(t.length=Math.max(t.length,n),t.splice(n,1,r),o&&!o.shallow&&o.mock&&Ct(r,!1,!0),r):n in t&&!(n in Object.prototype)?(t[n]=r,r):t._isVue||o&&o.vmCount?r:o?(Mt(o.value,n,r,void 0,o.shallow,o.mock),o.dep.notify(),r):(t[n]=r,r)}}function Tt(t,n){if(e(t)&&u(n))t.splice(n,1);else{var r=t.__ob__;t._isVue||r&&r.vmCount||Nt(t)||b(t,n)&&(delete t[n],r&&r.dep.notify())}}function $t(t){for(var n=void 0,r=0,o=t.length;r<o;r++)(n=t[r])&&n.__ob__&&n.__ob__.dep.depend(),e(n)&&$t(n)}function Et(t){return function(t,e){Nt(t)||Ct(t,e,nt())}(t,!0),V(t,"__v_isShallow",!0),t}function Nt(t){return!(!t||!t.__v_isReadonly)}function At(t){return!(!t||!0!==t.__v_isRef)}function Pt(t,e,n){Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:function(){var t=e[n];if(At(t))return t.value;var r=t&&t.__ob__;return r&&r.dep.depend(),t},set:function(t){var r=e[n];At(r)&&!At(t)?r.value=t:e[n]=t}})}var It=w((function(t){var e="&"===t.charAt(0),n="~"===(t=e?t.slice(1):t).charAt(0),r="!"===(t=n?t.slice(1):t).charAt(0);return{name:t=r?t.slice(1):t,once:n,capture:r,passive:e}}));function Rt(t,n){function r(){var t=r.fns;if(!e(t))return qe(t,null,arguments,n,"v-on handler");for(var o=t.slice(),i=0;i<o.length;i++)qe(o[i],null,arguments,n,"v-on handler")}return r.fns=t,r}function zt(t,e,r,i,s,a){var l,c,u,d;for(l in t)c=t[l],u=e[l],d=It(l),n(c)||(n(u)?(n(c.fns)&&(c=t[l]=Rt(c,a)),o(d.once)&&(c=t[l]=s(d.name,c,d.capture)),r(d.name,c,d.capture,d.passive,d.params)):c!==u&&(u.fns=c,t[l]=u));for(l in e)n(t[l])&&i((d=It(l)).name,e[l],d.capture)}function jt(t,e,i){var s;t instanceof ct&&(t=t.data.hook||(t.data.hook={}));var a=t[e];function l(){i.apply(this,arguments),v(s.fns,l)}n(a)?s=Rt([l]):r(a.fns)&&o(a.merged)?(s=a).fns.push(l):s=Rt([a,l]),s.merged=!0,t[e]=s}function Ft(t,e,n,o,i){if(r(e)){if(b(e,n))return t[n]=e[n],i||delete e[n],!0;if(b(e,o))return t[n]=e[o],i||delete e[o],!0}return!1}function Lt(t){return i(t)?[dt(t)]:e(t)?Vt(t):void 0}function Bt(t){return r(t)&&r(t.text)&&!1===t.isComment}function Vt(t,s){var a,l,c,u,d=[];for(a=0;a<t.length;a++)n(l=t[a])||"boolean"==typeof l||(u=d[c=d.length-1],e(l)?l.length>0&&(Bt((l=Vt(l,"".concat(s||"","_").concat(a)))[0])&&Bt(u)&&(d[c]=dt(u.text+l[0].text),l.shift()),d.push.apply(d,l)):i(l)?Bt(u)?d[c]=dt(u.text+l):""!==l&&d.push(dt(l)):Bt(l)&&Bt(u)?d[c]=dt(u.text+l.text):(o(t._isVList)&&r(l.tag)&&n(l.key)&&r(s)&&(l.key="__vlist".concat(s,"_").concat(a,"__")),d.push(l)));return d}function Wt(t,n,l,c,u,d){return(e(l)||i(l))&&(u=c,c=l,l=void 0),o(d)&&(u=2),function(t,n,o,i,l){if(r(o)&&r(o.__ob__))return ut();r(o)&&r(o.is)&&(n=o.is);if(!n)return ut();e(i)&&s(i[0])&&((o=o||{}).scopedSlots={default:i[0]},i.length=0);2===l?i=Lt(i):1===l&&(i=function(t){for(var n=0;n<t.length;n++)if(e(t[n]))return Array.prototype.concat.apply([],t);return t}(i));var c,u;if("string"==typeof n){var d=void 0;u=t.$vnode&&t.$vnode.ns||F.getTagNamespace(n),c=F.isReservedTag(n)?new ct(F.parsePlatformTagName(n),o,i,void 0,void 0,t):o&&o.pre||!r(d=Rn(t.$options,"components",n))?new ct(n,o,i,void 0,void 0,t):Cn(d,o,t,i,n)}else c=Cn(n,o,t,i);return e(c)?c:r(c)?(r(u)&&qt(c,u),r(o)&&function(t){a(t.style)&&on(t.style);a(t.class)&&on(t.class)}(o),c):ut()}(t,n,l,c,u)}function qt(t,e,i){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,i=!0),r(t.children))for(var s=0,a=t.children.length;s<a;s++){var l=t.children[s];r(l.tag)&&(n(l.ns)||o(i)&&"svg"!==l.tag)&&qt(l,e,i)}}function Ht(t,n){var o,i,s,l,c=null;if(e(t)||"string"==typeof t)for(c=new Array(t.length),o=0,i=t.length;o<i;o++)c[o]=n(t[o],o);else if("number"==typeof t)for(c=new Array(t),o=0;o<t;o++)c[o]=n(o+1,o);else if(a(t))if(st&&t[Symbol.iterator]){c=[];for(var u=t[Symbol.iterator](),d=u.next();!d.done;)c.push(n(d.value,c.length)),d=u.next()}else for(s=Object.keys(t),c=new Array(s.length),o=0,i=s.length;o<i;o++)l=s[o],c[o]=n(t[l],l,o);return r(c)||(c=[]),c._isVList=!0,c}function Jt(t,e,n,r){var o,i=this.$scopedSlots[t];i?(n=n||{},r&&(n=D(D({},r),n)),o=i(n)||(s(e)?e():e)):o=this.$slots[t]||(s(e)?e():e);var a=n&&n.slot;return a?this.$createElement("template",{slot:a},o):o}function Kt(t){return Rn(this.$options,"filters",t)||N}function Yt(t,n){return e(t)?-1===t.indexOf(n):t!==n}function Ut(t,e,n,r,o){var i=F.keyCodes[e]||n;return o&&r&&!F.keyCodes[e]?Yt(o,r):i?Yt(i,t):r?O(r)!==e:void 0===t}function Gt(t,n,r,o,i){if(r)if(a(r)){e(r)&&(r=T(r));var s=void 0,l=function(e){if("class"===e||"style"===e||g(e))s=t;else{var a=t.attrs&&t.attrs.type;s=o||F.mustUseProp(n,a,e)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var l=S(e),c=O(e);l in s||c in s||(s[e]=r[e],i&&((t.on||(t.on={}))["update:".concat(e)]=function(t){r[e]=t}))};for(var c in r)l(c)}else;return t}function Xt(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e||Qt(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,this._c,this),"__static__".concat(t),!1),r}function Zt(t,e,n){return Qt(t,"__once__".concat(e).concat(n?"_".concat(n):""),!0),t}function Qt(t,n,r){if(e(t))for(var o=0;o<t.length;o++)t[o]&&"string"!=typeof t[o]&&te(t[o],"".concat(n,"_").concat(o),r);else te(t,n,r)}function te(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function ee(t,e){if(e)if(c(e)){var n=t.on=t.on?D({},t.on):{};for(var r in e){var o=n[r],i=e[r];n[r]=o?[].concat(o,i):i}}else;return t}function ne(t,n,r,o){n=n||{$stable:!r};for(var i=0;i<t.length;i++){var s=t[i];e(s)?ne(s,n,r):s&&(s.proxy&&(s.fn.proxy=!0),n[s.key]=s.fn)}return o&&(n.$key=o),n}function re(t,e){for(var n=0;n<e.length;n+=2){var r=e[n];"string"==typeof r&&r&&(t[e[n]]=e[n+1])}return t}function oe(t,e){return"string"==typeof t?e+t:t}function ie(t){t._o=Zt,t._n=f,t._s=h,t._l=Ht,t._t=Jt,t._q=A,t._i=P,t._m=Xt,t._f=Kt,t._k=Ut,t._b=Gt,t._v=dt,t._e=ut,t._u=ne,t._g=ee,t._d=re,t._p=oe}function se(t,e){if(!t||!t.length)return{};for(var n={},r=0,o=t.length;r<o;r++){var i=t[r],s=i.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,i.context!==e&&i.fnContext!==e||!s||null==s.slot)(n.default||(n.default=[])).push(i);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===i.tag?l.push.apply(l,i.children||[]):l.push(i)}}for(var c in n)n[c].every(ae)&&delete n[c];return n}function ae(t){return t.isComment&&!t.asyncFactory||" "===t.text}function le(t){return t.isComment&&t.asyncFactory}function ce(e,n,r,o){var i,s=Object.keys(r).length>0,a=n?!!n.$stable:!s,l=n&&n.$key;if(n){if(n._normalized)return n._normalized;if(a&&o&&o!==t&&l===o.$key&&!s&&!o.$hasNormal)return o;for(var c in i={},n)n[c]&&"$"!==c[0]&&(i[c]=ue(e,r,c,n[c]))}else i={};for(var u in r)u in i||(i[u]=de(r,u));return n&&Object.isExtensible(n)&&(n._normalized=i),V(i,"$stable",a),V(i,"$key",l),V(i,"$hasNormal",s),i}function ue(t,n,r,o){var i=function(){var n=at;lt(t);var r=arguments.length?o.apply(null,arguments):o({}),i=(r=r&&"object"==typeof r&&!e(r)?[r]:Lt(r))&&r[0];return lt(n),r&&(!i||1===r.length&&i.isComment&&!le(i))?void 0:r};return o.proxy&&Object.defineProperty(n,r,{get:i,enumerable:!0,configurable:!0}),i}function de(t,e){return function(){return t[e]}}function he(e){var n=e.$options,r=n.setup;if(r){var o=e._setupContext=function(e){return{get attrs(){return function(e){if(!e._attrsProxy){var n=e._attrsProxy={};V(n,"_v_attr_proxy",!0),fe(n,e.$attrs,t,e)}return e._attrsProxy}(e)},get slots(){return function(t){t._slotsProxy||me(t._slotsProxy={},t.$scopedSlots);return t._slotsProxy}(e)},emit:C(e.$emit,e),expose:function(t){t&&Object.keys(t).forEach((function(n){return Pt(e,t,n)}))}}}(e);lt(e),gt();var i=qe(r,null,[e._props||Et({}),o],e,"setup");if(vt(),lt(),s(i))n.render=i;else if(a(i))if(e._setupState=i,i.__sfc){var l=e._setupProxy={};for(var c in i)"__sfc"!==c&&Pt(l,i,c)}else for(var c in i)B(c)||Pt(e,i,c)}}function fe(t,e,n,r){var o=!1;for(var i in e)i in t?e[i]!==n[i]&&(o=!0):(o=!0,pe(t,i,r));for(var i in t)i in e||(o=!0,delete t[i]);return o}function pe(t,e,n){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){return n.$attrs[e]}})}function me(t,e){for(var n in e)t[n]=e[n];for(var n in t)n in e||delete t[n]}var ge,ve=null;function ye(t,e){return(t.__esModule||st&&"Module"===t[Symbol.toStringTag])&&(t=t.default),a(t)?e.extend(t):t}function be(t){if(e(t))for(var n=0;n<t.length;n++){var o=t[n];if(r(o)&&(r(o.componentOptions)||le(o)))return o}}function we(t,e){ge.$on(t,e)}function xe(t,e){ge.$off(t,e)}function Se(t,e){var n=ge;return function r(){var o=e.apply(null,arguments);null!==o&&n.$off(t,r)}}function ke(t,e,n){ge=t,zt(e,n||{},we,xe,Se,t),ge=void 0}var _e=null;function Oe(t){var e=_e;return _e=t,function(){_e=e}}function Ce(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Me(t,e){if(e){if(t._directInactive=!1,Ce(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Me(t.$children[n]);Te(t,"activated")}}function De(t,e){if(!(e&&(t._directInactive=!0,Ce(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)De(t.$children[n]);Te(t,"deactivated")}}function Te(t,e,n,r){void 0===r&&(r=!0),gt();var o=at;r&&lt(t);var i=t.$options[e],s="".concat(e," hook");if(i)for(var a=0,l=i.length;a<l;a++)qe(i[a],t,n||null,t,s);t._hasHookEvent&&t.$emit("hook:"+e),r&&lt(o),vt()}var $e=[],Ee=[],Ne={},Ae=!1,Pe=!1,Ie=0;var Re,ze=0,je=Date.now;if(H&&!K){var Fe=window.performance;Fe&&"function"==typeof Fe.now&&je()>document.createEvent("Event").timeStamp&&(je=function(){return Fe.now()})}function Le(){var t,e;for(ze=je(),Pe=!0,$e.sort((function(t,e){return t.id-e.id})),Ie=0;Ie<$e.length;Ie++)(t=$e[Ie]).before&&t.before(),e=t.id,Ne[e]=null,t.run();var n=Ee.slice(),r=$e.slice();Ie=$e.length=Ee.length=0,Ne={},Ae=Pe=!1,function(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Me(t[e],!0)}(n),function(t){var e=t.length;for(;e--;){var n=t[e],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&Te(r,"updated")}}(r),rt&&F.devtools&&rt.emit("flush")}var Be=function(){function t(t){void 0===t&&(t=!1),this.active=!0,this.effects=[],this.cleanups=[],!t&&Re&&(this.parent=Re,this.index=(Re.scopes||(Re.scopes=[])).push(this)-1)}return t.prototype.run=function(t){if(this.active){var e=Re;try{return Re=this,t()}finally{Re=e}}},t.prototype.on=function(){Re=this},t.prototype.off=function(){Re=this.parent},t.prototype.stop=function(t){if(this.active){var e=void 0,n=void 0;for(e=0,n=this.effects.length;e<n;e++)this.effects[e].teardown();for(e=0,n=this.cleanups.length;e<n;e++)this.cleanups[e]();if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].stop(!0);if(this.parent&&!t){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.active=!1}},t}();function Ve(t,e){if(at){var n=at._provided,r=at.$parent&&at.$parent._provided;r===n&&(n=at._provided=Object.create(r)),n[t]=e}else;}function We(t,e,n){gt();try{if(e)for(var r=e;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,t,e,n))return}catch(Fy){He(Fy,r,"errorCaptured hook")}}He(t,e,n)}finally{vt()}}function qe(t,e,n,r,o){var i;try{(i=n?t.apply(e,n):t.call(e))&&!i._isVue&&d(i)&&!i._handled&&(i.catch((function(t){return We(t,r,o+" (Promise/async)")})),i._handled=!0)}catch(Fy){We(Fy,r,o)}return i}function He(t,e,n){if(F.errorHandler)try{return F.errorHandler.call(null,t,e,n)}catch(Fy){Fy!==t&&Je(Fy)}Je(t)}function Je(t,e,n){if(!H||"undefined"==typeof console)throw t;console.error(t)}var Ke,Ye=!1,Ue=[],Ge=!1;function Xe(){Ge=!1;var t=Ue.slice(0);Ue.length=0;for(var e=0;e<t.length;e++)t[e]()}if("undefined"!=typeof Promise&&ot(Promise)){var Ze=Promise.resolve();Ke=function(){Ze.then(Xe),G&&setTimeout($)},Ye=!0}else if(K||"undefined"==typeof MutationObserver||!ot(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Ke="undefined"!=typeof setImmediate&&ot(setImmediate)?function(){setImmediate(Xe)}:function(){setTimeout(Xe,0)};else{var Qe=1,tn=new MutationObserver(Xe),en=document.createTextNode(String(Qe));tn.observe(en,{characterData:!0}),Ke=function(){Qe=(Qe+1)%2,en.data=String(Qe)},Ye=!0}function nn(t,e){var n;if(Ue.push((function(){if(t)try{t.call(e)}catch(Fy){We(Fy,e,"nextTick")}else n&&n(e)})),Ge||(Ge=!0,Ke()),!t&&"undefined"!=typeof Promise)return new Promise((function(t){n=t}))}var rn=new it;function on(t){return sn(t,rn),rn.clear(),t}function sn(t,n){var r,o,i=e(t);if(!(!i&&!a(t)||Object.isFrozen(t)||t instanceof ct)){if(t.__ob__){var s=t.__ob__.dep.id;if(n.has(s))return;n.add(s)}if(i)for(r=t.length;r--;)sn(t[r],n);else if(At(t))sn(t.value,n);else for(r=(o=Object.keys(t)).length;r--;)sn(t[o[r]],n)}}var an=0,ln=function(){function t(t,e,n,r,o){var i,a;i=this,void 0===(a=Re||(t?t._scope:void 0))&&(a=Re),a&&a.active&&a.effects.push(i),(this.vm=t)&&o&&(t._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++an,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new it,this.newDepIds=new it,this.expression="",s(e)?this.getter=e:(this.getter=function(t){if(!W.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}(e),this.getter||(this.getter=$)),this.value=this.lazy?void 0:this.get()}return t.prototype.get=function(){var t;gt(this);var e=this.vm;try{t=this.getter.call(e,e)}catch(Fy){if(!this.user)throw Fy;We(Fy,e,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&on(t),vt(),this.cleanupDeps()}return t},t.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},t.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},t.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(t){var e=t.id;if(null==Ne[e]&&(t!==pt.target||!t.noRecurse)){if(Ne[e]=!0,Pe){for(var n=$e.length-1;n>Ie&&$e[n].id>t.id;)n--;$e.splice(n+1,0,t)}else $e.push(t);Ae||(Ae=!0,nn(Le))}}(this)},t.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||a(t)||this.deep){var e=this.value;if(this.value=t,this.user){var n='callback for watcher "'.concat(this.expression,'"');qe(this.cb,this.vm,[t,e],this.vm,n)}else this.cb.call(this.vm,t,e)}}},t.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},t.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},t.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&v(this.vm._scope.effects,this),this.active){for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},t}(),cn={enumerable:!0,configurable:!0,get:$,set:$};function un(t,e,n){cn.get=function(){return this[e][n]},cn.set=function(t){this[e][n]=t},Object.defineProperty(t,n,cn)}function dn(t){var n=t.$options;if(n.props&&function(t,e){var n=t.$options.propsData||{},r=t._props=Et({}),o=t.$options._propKeys=[];t.$parent&&kt(!1);var i=function(i){o.push(i);var s=zn(i,e,n,t);Mt(r,i,s),i in t||un(t,"_props",i)};for(var s in e)i(s);kt(!0)}(t,n.props),he(t),n.methods&&function(t,e){for(var n in t.$options.props,e)t[n]="function"!=typeof e[n]?$:C(e[n],t)}(t,n.methods),n.data)!function(t){var e=t.$options.data;c(e=t._data=s(e)?function(t,e){gt();try{return t.call(e,e)}catch(Fy){return We(Fy,e,"data()"),{}}finally{vt()}}(e,t):e||{})||(e={});var n=Object.keys(e),r=t.$options.props;t.$options.methods;var o=n.length;for(;o--;){var i=n[o];r&&b(r,i)||B(i)||un(t,"_data",i)}var a=Ct(e);a&&a.vmCount++}(t);else{var r=Ct(t._data={});r&&r.vmCount++}n.computed&&function(t,e){var n=t._computedWatchers=Object.create(null),r=nt();for(var o in e){var i=e[o],a=s(i)?i:i.get;r||(n[o]=new ln(t,a||$,$,hn)),o in t||fn(t,o,i)}}(t,n.computed),n.watch&&n.watch!==Q&&function(t,n){for(var r in n){var o=n[r];if(e(o))for(var i=0;i<o.length;i++)gn(t,r,o[i]);else gn(t,r,o)}}(t,n.watch)}var hn={lazy:!0};function fn(t,e,n){var r=!nt();s(n)?(cn.get=r?pn(e):mn(n),cn.set=$):(cn.get=n.get?r&&!1!==n.cache?pn(e):mn(n.get):$,cn.set=n.set||$),Object.defineProperty(t,e,cn)}function pn(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),pt.target&&e.depend(),e.value}}function mn(t){return function(){return t.call(this,this)}}function gn(t,e,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function vn(t,e){if(t){for(var n=Object.create(null),r=st?Reflect.ownKeys(t):Object.keys(t),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var a=t[i].from;if(a in e._provided)n[i]=e._provided[a];else if("default"in t[i]){var l=t[i].default;n[i]=s(l)?l.call(e):l}}}return n}}var yn=0;function bn(t){var e=t.options;if(t.super){var n=bn(t.super);if(n!==t.superOptions){t.superOptions=n;var r=function(t){var e,n=t.options,r=t.sealedOptions;for(var o in n)n[o]!==r[o]&&(e||(e={}),e[o]=n[o]);return e}(t);r&&D(t.extendOptions,r),(e=t.options=In(n,t.extendOptions)).name&&(e.components[e.name]=t)}}return e}function wn(n,r,i,s,a){var l,c=this,u=a.options;b(s,"_uid")?(l=Object.create(s))._original=s:(l=s,s=s._original);var d=o(u._compiled),h=!d;this.data=n,this.props=r,this.children=i,this.parent=s,this.listeners=n.on||t,this.injections=vn(u.inject,s),this.slots=function(){return c.$slots||ce(s,n.scopedSlots,c.$slots=se(i,s)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return ce(s,n.scopedSlots,this.slots())}}),d&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=ce(s,n.scopedSlots,this.$slots)),u._scopeId?this._c=function(t,n,r,o){var i=Wt(l,t,n,r,o,h);return i&&!e(i)&&(i.fnScopeId=u._scopeId,i.fnContext=s),i}:this._c=function(t,e,n,r){return Wt(l,t,e,n,r,h)}}function xn(t,e,n,r,o){var i=ht(t);return i.fnContext=n,i.fnOptions=r,e.slot&&((i.data||(i.data={})).slot=e.slot),i}function Sn(t,e){for(var n in e)t[S(n)]=e[n]}function kn(t){return t.name||t.__name||t._componentTag}ie(wn.prototype);var _n={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;_n.prepatch(n,n)}else{(t.componentInstance=function(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},o=t.data.inlineTemplate;r(o)&&(n.render=o.render,n.staticRenderFns=o.staticRenderFns);return new t.componentOptions.Ctor(n)}(t,_e)).$mount(e?t.elm:void 0,e)}},prepatch:function(e,n){var r=n.componentOptions;!function(e,n,r,o,i){var s=o.data.scopedSlots,a=e.$scopedSlots,l=!!(s&&!s.$stable||a!==t&&!a.$stable||s&&e.$scopedSlots.$key!==s.$key||!s&&e.$scopedSlots.$key),c=!!(i||e.$options._renderChildren||l),u=e.$vnode;e.$options._parentVnode=o,e.$vnode=o,e._vnode&&(e._vnode.parent=o),e.$options._renderChildren=i;var d=o.data.attrs||t;if(e._attrsProxy&&fe(e._attrsProxy,d,u.data&&u.data.attrs||t,e)&&(c=!0),e.$attrs=d,e.$listeners=r||t,n&&e.$options.props){kt(!1);for(var h=e._props,f=e.$options._propKeys||[],p=0;p<f.length;p++){var m=f[p],g=e.$options.props;h[m]=zn(m,g,n,e)}kt(!0),e.$options.propsData=n}r=r||t;var v=e.$options._parentListeners;e.$options._parentListeners=r,ke(e,r,v),c&&(e.$slots=se(i,o.context),e.$forceUpdate())}(n.componentInstance=e.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(t){var e,n=t.context,r=t.componentInstance;r._isMounted||(r._isMounted=!0,Te(r,"mounted")),t.data.keepAlive&&(n._isMounted?((e=r)._inactive=!1,Ee.push(e)):Me(r,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?De(e,!0):e.$destroy())}},On=Object.keys(_n);function Cn(i,s,l,c,u){if(!n(i)){var h=l.$options._base;if(a(i)&&(i=h.extend(i)),"function"==typeof i){var f;if(n(i.cid)&&(i=function(t,e){if(o(t.error)&&r(t.errorComp))return t.errorComp;if(r(t.resolved))return t.resolved;var i=ve;if(i&&r(t.owners)&&-1===t.owners.indexOf(i)&&t.owners.push(i),o(t.loading)&&r(t.loadingComp))return t.loadingComp;if(i&&!r(t.owners)){var s=t.owners=[i],l=!0,c=null,u=null;i.$on("hook:destroyed",(function(){return v(s,i)}));var h=function(t){for(var e=0,n=s.length;e<n;e++)s[e].$forceUpdate();t&&(s.length=0,null!==c&&(clearTimeout(c),c=null),null!==u&&(clearTimeout(u),u=null))},f=I((function(n){t.resolved=ye(n,e),l?s.length=0:h(!0)})),p=I((function(e){r(t.errorComp)&&(t.error=!0,h(!0))})),m=t(f,p);return a(m)&&(d(m)?n(t.resolved)&&m.then(f,p):d(m.component)&&(m.component.then(f,p),r(m.error)&&(t.errorComp=ye(m.error,e)),r(m.loading)&&(t.loadingComp=ye(m.loading,e),0===m.delay?t.loading=!0:c=setTimeout((function(){c=null,n(t.resolved)&&n(t.error)&&(t.loading=!0,h(!1))}),m.delay||200)),r(m.timeout)&&(u=setTimeout((function(){u=null,n(t.resolved)&&p(null)}),m.timeout)))),l=!1,t.loading?t.loadingComp:t.resolved}}(f=i,h),void 0===i))return function(t,e,n,r,o){var i=ut();return i.asyncFactory=t,i.asyncMeta={data:e,context:n,children:r,tag:o},i}(f,s,l,c,u);s=s||{},bn(i),r(s.model)&&function(t,n){var o=t.model&&t.model.prop||"value",i=t.model&&t.model.event||"input";(n.attrs||(n.attrs={}))[o]=n.model.value;var s=n.on||(n.on={}),a=s[i],l=n.model.callback;r(a)?(e(a)?-1===a.indexOf(l):a!==l)&&(s[i]=[l].concat(a)):s[i]=l}(i.options,s);var p=function(t,e,o){var i=e.options.props;if(!n(i)){var s={},a=t.attrs,l=t.props;if(r(a)||r(l))for(var c in i){var u=O(c);Ft(s,l,c,u,!0)||Ft(s,a,c,u,!1)}return s}}(s,i);if(o(i.options.functional))return function(n,o,i,s,a){var l=n.options,c={},u=l.props;if(r(u))for(var d in u)c[d]=zn(d,u,o||t);else r(i.attrs)&&Sn(c,i.attrs),r(i.props)&&Sn(c,i.props);var h=new wn(i,c,a,s,n),f=l.render.call(null,h._c,h);if(f instanceof ct)return xn(f,i,h.parent,l);if(e(f)){for(var p=Lt(f)||[],m=new Array(p.length),g=0;g<p.length;g++)m[g]=xn(p[g],i,h.parent,l);return m}}(i,p,s,l,c);var m=s.on;if(s.on=s.nativeOn,o(i.options.abstract)){var g=s.slot;s={},g&&(s.slot=g)}!function(t){for(var e=t.hook||(t.hook={}),n=0;n<On.length;n++){var r=On[n],o=e[r],i=_n[r];o===i||o&&o._merged||(e[r]=o?Mn(i,o):i)}}(s);var y=kn(i.options)||u;return new ct("vue-component-".concat(i.cid).concat(y?"-".concat(y):""),s,void 0,void 0,void 0,l,{Ctor:i,propsData:p,listeners:m,tag:u,children:c},f)}}}function Mn(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}var Dn=$,Tn=F.optionMergeStrategies;function $n(t,e){if(!e)return t;for(var n,r,o,i=st?Reflect.ownKeys(e):Object.keys(e),s=0;s<i.length;s++)"__ob__"!==(n=i[s])&&(r=t[n],o=e[n],b(t,n)?r!==o&&c(r)&&c(o)&&$n(r,o):Dt(t,n,o));return t}function En(t,e,n){return n?function(){var r=s(e)?e.call(n,n):e,o=s(t)?t.call(n,n):t;return r?$n(r,o):o}:e?t?function(){return $n(s(e)?e.call(this,this):e,s(t)?t.call(this,this):t)}:e:t}function Nn(t,n){var r=n?t?t.concat(n):e(n)?n:[n]:t;return r?function(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}(r):r}function An(t,e,n,r){var o=Object.create(t||null);return e?D(o,e):o}Tn.data=function(t,e,n){return n?En(t,e,n):e&&"function"!=typeof e?t:En(t,e)},j.forEach((function(t){Tn[t]=Nn})),z.forEach((function(t){Tn[t+"s"]=An})),Tn.watch=function(t,n,r,o){if(t===Q&&(t=void 0),n===Q&&(n=void 0),!n)return Object.create(t||null);if(!t)return n;var i={};for(var s in D(i,t),n){var a=i[s],l=n[s];a&&!e(a)&&(a=[a]),i[s]=a?a.concat(l):e(l)?l:[l]}return i},Tn.props=Tn.methods=Tn.inject=Tn.computed=function(t,e,n,r){if(!t)return e;var o=Object.create(null);return D(o,t),e&&D(o,e),o},Tn.provide=En;var Pn=function(t,e){return void 0===e?t:e};function In(t,n,r){if(s(n)&&(n=n.options),function(t,n){var r=t.props;if(r){var o,i,s={};if(e(r))for(o=r.length;o--;)"string"==typeof(i=r[o])&&(s[S(i)]={type:null});else if(c(r))for(var a in r)i=r[a],s[S(a)]=c(i)?i:{type:i};t.props=s}}(n),function(t,n){var r=t.inject;if(r){var o=t.inject={};if(e(r))for(var i=0;i<r.length;i++)o[r[i]]={from:r[i]};else if(c(r))for(var s in r){var a=r[s];o[s]=c(a)?D({from:s},a):{from:a}}}}(n),function(t){var e=t.directives;if(e)for(var n in e){var r=e[n];s(r)&&(e[n]={bind:r,update:r})}}(n),!n._base&&(n.extends&&(t=In(t,n.extends,r)),n.mixins))for(var o=0,i=n.mixins.length;o<i;o++)t=In(t,n.mixins[o],r);var a,l={};for(a in t)u(a);for(a in n)b(t,a)||u(a);function u(e){var o=Tn[e]||Pn;l[e]=o(t[e],n[e],r,e)}return l}function Rn(t,e,n,r){if("string"==typeof n){var o=t[e];if(b(o,n))return o[n];var i=S(n);if(b(o,i))return o[i];var s=k(i);return b(o,s)?o[s]:o[n]||o[i]||o[s]}}function zn(t,e,n,r){var o=e[t],i=!b(n,t),a=n[t],l=Bn(Boolean,o.type);if(l>-1)if(i&&!b(o,"default"))a=!1;else if(""===a||a===O(t)){var c=Bn(String,o.type);(c<0||l<c)&&(a=!0)}if(void 0===a){a=function(t,e,n){if(!b(e,"default"))return;var r=e.default;if(t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n])return t._props[n];return s(r)&&"Function"!==Fn(e.type)?r.call(t):r}(r,o,t);var u=St;kt(!0),Ct(a),kt(u)}return a}var jn=/^\s*function (\w+)/;function Fn(t){var e=t&&t.toString().match(jn);return e?e[1]:""}function Ln(t,e){return Fn(t)===Fn(e)}function Bn(t,n){if(!e(n))return Ln(n,t)?0:-1;for(var r=0,o=n.length;r<o;r++)if(Ln(n[r],t))return r;return-1}function Vn(t){this._init(t)}function Wn(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,o=t._Ctor||(t._Ctor={});if(o[r])return o[r];var i=kn(t)||kn(n.options),s=function(t){this._init(t)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=e++,s.options=In(n.options,t),s.super=n,s.options.props&&function(t){var e=t.options.props;for(var n in e)un(t.prototype,"_props",n)}(s),s.options.computed&&function(t){var e=t.options.computed;for(var n in e)fn(t.prototype,n,e[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,z.forEach((function(t){s[t]=n[t]})),i&&(s.options.components[i]=s),s.superOptions=n.options,s.extendOptions=t,s.sealedOptions=D({},s.options),o[r]=s,s}}function qn(t){return t&&(kn(t.Ctor.options)||t.tag)}function Hn(t,n){return e(t)?t.indexOf(n)>-1:"string"==typeof t?t.split(",").indexOf(n)>-1:(r=t,"[object RegExp]"===l.call(r)&&t.test(n));var r}function Jn(t,e){var n=t.cache,r=t.keys,o=t._vnode;for(var i in n){var s=n[i];if(s){var a=s.name;a&&!e(a)&&Kn(n,i,r,o)}}}function Kn(t,e,n,r){var o=t[e];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),t[e]=null,v(n,e)}Vn.prototype._init=function(e){var n=this;n._uid=yn++,n._isVue=!0,n.__v_skip=!0,n._scope=new Be(!0),e&&e._isComponent?function(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}(n,e):n.$options=In(bn(n.constructor),e||{},n),n._renderProxy=n,n._self=n,function(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._provided=n?n._provided:Object.create(null),t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}(n),function(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&ke(t,e)}(n),function(e){e._vnode=null,e._staticTrees=null;var n=e.$options,r=e.$vnode=n._parentVnode,o=r&&r.context;e.$slots=se(n._renderChildren,o),e.$scopedSlots=t,e._c=function(t,n,r,o){return Wt(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Wt(e,t,n,r,o,!0)};var i=r&&r.data;Mt(e,"$attrs",i&&i.attrs||t,null,!0),Mt(e,"$listeners",n._parentListeners||t,null,!0)}(n),Te(n,"beforeCreate",void 0,!1),function(t){var e=vn(t.$options.inject,t);e&&(kt(!1),Object.keys(e).forEach((function(n){Mt(t,n,e[n])})),kt(!0))}(n),dn(n),function(t){var e=t.$options.provide;if(e){var n=s(e)?e.call(t):e;if(!a(n))return;var r=st?Reflect.ownKeys(n):Object.keys(n);lt(t);for(var o=0;o<r.length;o++)Ve(r[o],n[r[o]]);lt()}}(n),Te(n,"created"),n.$options.el&&n.$mount(n.$options.el)},function(t){var e={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=Dt,t.prototype.$delete=Tt,t.prototype.$watch=function(t,e,n){var r=this;if(c(e))return gn(r,t,e,n);(n=n||{}).user=!0;var o=new ln(r,t,e,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');gt(),qe(e,r,[o.value],r,i),vt()}return function(){o.teardown()}}}(Vn),function(t){var n=/^hook:/;t.prototype.$on=function(t,r){var o=this;if(e(t))for(var i=0,s=t.length;i<s;i++)o.$on(t[i],r);else(o._events[t]||(o._events[t]=[])).push(r),n.test(t)&&(o._hasHookEvent=!0);return o},t.prototype.$once=function(t,e){var n=this;function r(){n.$off(t,r),e.apply(n,arguments)}return r.fn=e,n.$on(t,r),n},t.prototype.$off=function(t,n){var r=this;if(!arguments.length)return r._events=Object.create(null),r;if(e(t)){for(var o=0,i=t.length;o<i;o++)r.$off(t[o],n);return r}var s,a=r._events[t];if(!a)return r;if(!n)return r._events[t]=null,r;for(var l=a.length;l--;)if((s=a[l])===n||s.fn===n){a.splice(l,1);break}return r},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?M(n):n;for(var r=M(arguments,1),o='event handler for "'.concat(t,'"'),i=0,s=n.length;i<s;i++)qe(n[i],e,r,e,o)}return e}}(Vn),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,o=n._vnode,i=Oe(n);n._vnode=t,n.$el=o?n.__patch__(o,t):n.__patch__(n.$el,t,e,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Te(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._scope.stop(),t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Te(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Vn),function(t){ie(t.prototype),t.prototype.$nextTick=function(t){return nn(t,this)},t.prototype._render=function(){var t,n=this,r=n.$options,o=r.render,i=r._parentVnode;i&&(n.$scopedSlots=ce(n.$parent,i.data.scopedSlots,n.$slots,n.$scopedSlots),n._slotsProxy&&me(n._slotsProxy,n.$scopedSlots)),n.$vnode=i;try{lt(n),ve=n,t=o.call(n._renderProxy,n.$createElement)}catch(Fy){We(Fy,n,"render"),t=n._vnode}finally{ve=null,lt()}return e(t)&&1===t.length&&(t=t[0]),t instanceof ct||(t=ut()),t.parent=i,t}}(Vn);var Yn=[String,RegExp,Array],Un={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Yn,exclude:Yn,max:[String,Number]},methods:{cacheVNode:function(){var t=this,e=t.cache,n=t.keys,r=t.vnodeToCache,o=t.keyToCache;if(r){var i=r.tag,s=r.componentInstance,a=r.componentOptions;e[o]={name:qn(a),tag:i,componentInstance:s},n.push(o),this.max&&n.length>parseInt(this.max)&&Kn(e,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)Kn(this.cache,t,this.keys)},mounted:function(){var t=this;this.cacheVNode(),this.$watch("include",(function(e){Jn(t,(function(t){return Hn(e,t)}))})),this.$watch("exclude",(function(e){Jn(t,(function(t){return!Hn(e,t)}))}))},updated:function(){this.cacheVNode()},render:function(){var t=this.$slots.default,e=be(t),n=e&&e.componentOptions;if(n){var r=qn(n),o=this.include,i=this.exclude;if(o&&(!r||!Hn(o,r))||i&&r&&Hn(i,r))return e;var s=this.cache,a=this.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):e.key;s[l]?(e.componentInstance=s[l].componentInstance,v(a,l),a.push(l)):(this.vnodeToCache=e,this.keyToCache=l),e.data.keepAlive=!0}return e||t&&t[0]}}};!function(t){var e={get:function(){return F}};Object.defineProperty(t,"config",e),t.util={warn:Dn,extend:D,mergeOptions:In,defineReactive:Mt},t.set=Dt,t.delete=Tt,t.nextTick=nn,t.observable=function(t){return Ct(t),t},t.options=Object.create(null),z.forEach((function(e){t.options[e+"s"]=Object.create(null)})),t.options._base=t,D(t.options.components,Un),function(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=M(arguments,1);return n.unshift(this),s(t.install)?t.install.apply(t,n):s(t)&&t.apply(null,n),e.push(t),this}}(t),function(t){t.mixin=function(t){return this.options=In(this.options,t),this}}(t),Wn(t),function(t){z.forEach((function(e){t[e]=function(t,n){return n?("component"===e&&c(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&s(n)&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}}))}(t)}(Vn),Object.defineProperty(Vn.prototype,"$isServer",{get:nt}),Object.defineProperty(Vn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Vn,"FunctionalRenderContext",{value:wn}),Vn.version="2.7.5";var Gn=p("style,class"),Xn=p("input,textarea,option,select,progress"),Zn=function(t,e,n){return"value"===n&&Xn(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Qn=p("contenteditable,draggable,spellcheck"),tr=p("events,caret,typing,plaintext-only"),er=p("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),nr="http://www.w3.org/1999/xlink",rr=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},or=function(t){return rr(t)?t.slice(6,t.length):""},ir=function(t){return null==t||!1===t};function sr(t){for(var e=t.data,n=t,o=t;r(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(e=ar(o.data,e));for(;r(n=n.parent);)n&&n.data&&(e=ar(e,n.data));return function(t,e){if(r(t)||r(e))return lr(t,cr(e));return""}(e.staticClass,e.class)}function ar(t,e){return{staticClass:lr(t.staticClass,e.staticClass),class:r(t.class)?[t.class,e.class]:e.class}}function lr(t,e){return t?e?t+" "+e:t:e||""}function cr(t){return Array.isArray(t)?function(t){for(var e,n="",o=0,i=t.length;o<i;o++)r(e=cr(t[o]))&&""!==e&&(n&&(n+=" "),n+=e);return n}(t):a(t)?function(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}(t):"string"==typeof t?t:""}var ur={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},dr=p("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),hr=p("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),fr=function(t){return dr(t)||hr(t)};function pr(t){return hr(t)?"svg":"math"===t?"math":void 0}var mr=Object.create(null);var gr=p("text,number,password,search,email,tel,url");function vr(t){if("string"==typeof t){var e=document.querySelector(t);return e||document.createElement("div")}return t}var yr=Object.freeze({__proto__:null,createElement:function(t,e){var n=document.createElement(t);return"select"!==t||e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(t,e){return document.createElementNS(ur[t],e)},createTextNode:function(t){return document.createTextNode(t)},createComment:function(t){return document.createComment(t)},insertBefore:function(t,e,n){t.insertBefore(e,n)},removeChild:function(t,e){t.removeChild(e)},appendChild:function(t,e){t.appendChild(e)},parentNode:function(t){return t.parentNode},nextSibling:function(t){return t.nextSibling},tagName:function(t){return t.tagName},setTextContent:function(t,e){t.textContent=e},setStyleScope:function(t,e){t.setAttribute(e,"")}}),br={create:function(t,e){wr(e)},update:function(t,e){t.data.ref!==e.data.ref&&(wr(t,!0),wr(e))},destroy:function(t){wr(t,!0)}};function wr(t,n){var o=t.data.ref;if(r(o)){var i=t.context,a=t.componentInstance||t.elm,l=n?null:a,c=n?void 0:a;if(s(o))qe(o,i,[l],i,"template ref function");else{var u=t.data.refInFor,d="string"==typeof o||"number"==typeof o,h=At(o),f=i.$refs;if(d||h)if(u){var p=d?f[o]:o.value;n?e(p)&&v(p,a):e(p)?p.includes(a)||p.push(a):d?(f[o]=[a],xr(i,o,f[o])):o.value=[a]}else if(d){if(n&&f[o]!==a)return;f[o]=c,xr(i,o,l)}else if(h){if(n&&o.value!==a)return;o.value=l}}}}function xr(t,e,n){var r=t._setupState;r&&b(r,e)&&(At(r[e])?r[e].value=n:r[e]=n)}var Sr=new ct("",{},[]),kr=["create","activate","update","remove","destroy"];function _r(t,e){return t.key===e.key&&t.asyncFactory===e.asyncFactory&&(t.tag===e.tag&&t.isComment===e.isComment&&r(t.data)===r(e.data)&&function(t,e){if("input"!==t.tag)return!0;var n,o=r(n=t.data)&&r(n=n.attrs)&&n.type,i=r(n=e.data)&&r(n=n.attrs)&&n.type;return o===i||gr(o)&&gr(i)}(t,e)||o(t.isAsyncPlaceholder)&&n(e.asyncFactory.error))}function Or(t,e,n){var o,i,s={};for(o=e;o<=n;++o)r(i=t[o].key)&&(s[i]=o);return s}var Cr={create:Mr,update:Mr,destroy:function(t){Mr(t,Sr)}};function Mr(t,e){(t.data.directives||e.data.directives)&&function(t,e){var n,r,o,i=t===Sr,s=e===Sr,a=Tr(t.data.directives,t.context),l=Tr(e.data.directives,e.context),c=[],u=[];for(n in l)r=a[n],o=l[n],r?(o.oldValue=r.value,o.oldArg=r.arg,Er(o,"update",e,t),o.def&&o.def.componentUpdated&&u.push(o)):(Er(o,"bind",e,t),o.def&&o.def.inserted&&c.push(o));if(c.length){var d=function(){for(var n=0;n<c.length;n++)Er(c[n],"inserted",e,t)};i?jt(e,"insert",d):d()}u.length&&jt(e,"postpatch",(function(){for(var n=0;n<u.length;n++)Er(u[n],"componentUpdated",e,t)}));if(!i)for(n in a)l[n]||Er(a[n],"unbind",t,t,s)}(t,e)}var Dr=Object.create(null);function Tr(t,e){var n,r,o=Object.create(null);if(!t)return o;for(n=0;n<t.length;n++)(r=t[n]).modifiers||(r.modifiers=Dr),o[$r(r)]=r,e._setupState&&e._setupState.__sfc&&(r.def=r.def||Rn(e,"_setupState","v-"+r.name)),r.def=r.def||Rn(e.$options,"directives",r.name);return o}function $r(t){return t.rawName||"".concat(t.name,".").concat(Object.keys(t.modifiers||{}).join("."))}function Er(t,e,n,r,o){var i=t.def&&t.def[e];if(i)try{i(n.elm,t,n,r,o)}catch(Fy){We(Fy,n.context,"directive ".concat(t.name," ").concat(e," hook"))}}var Nr=[br,Cr];function Ar(t,e){var i=e.componentOptions;if(!(r(i)&&!1===i.Ctor.options.inheritAttrs||n(t.data.attrs)&&n(e.data.attrs))){var s,a,l=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};for(s in(r(u.__ob__)||o(u._v_attr_proxy))&&(u=e.data.attrs=D({},u)),u)a=u[s],c[s]!==a&&Pr(l,s,a,e.data.pre);for(s in(K||U)&&u.value!==c.value&&Pr(l,"value",u.value),c)n(u[s])&&(rr(s)?l.removeAttributeNS(nr,or(s)):Qn(s)||l.removeAttribute(s))}}function Pr(t,e,n,r){r||t.tagName.indexOf("-")>-1?Ir(t,e,n):er(e)?ir(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Qn(e)?t.setAttribute(e,function(t,e){return ir(e)||"false"===e?"false":"contenteditable"===t&&tr(e)?e:"true"}(e,n)):rr(e)?ir(n)?t.removeAttributeNS(nr,or(e)):t.setAttributeNS(nr,e,n):Ir(t,e,n)}function Ir(t,e,n){if(ir(n))t.removeAttribute(e);else{if(K&&!Y&&"TEXTAREA"===t.tagName&&"placeholder"===e&&""!==n&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}var Rr={create:Ar,update:Ar};function zr(t,e){var o=e.elm,i=e.data,s=t.data;if(!(n(i.staticClass)&&n(i.class)&&(n(s)||n(s.staticClass)&&n(s.class)))){var a=sr(e),l=o._transitionClasses;r(l)&&(a=lr(a,cr(l))),a!==o._prevClass&&(o.setAttribute("class",a),o._prevClass=a)}}var jr,Fr,Lr,Br,Vr,Wr,qr={create:zr,update:zr},Hr=/[\w).+\-_$\]]/;function Jr(t){var e,n,r,o,i,s=!1,a=!1,l=!1,c=!1,u=0,d=0,h=0,f=0;for(r=0;r<t.length;r++)if(n=e,e=t.charCodeAt(r),s)39===e&&92!==n&&(s=!1);else if(a)34===e&&92!==n&&(a=!1);else if(l)96===e&&92!==n&&(l=!1);else if(c)47===e&&92!==n&&(c=!1);else if(124!==e||124===t.charCodeAt(r+1)||124===t.charCodeAt(r-1)||u||d||h){switch(e){case 34:a=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:h++;break;case 41:h--;break;case 91:d++;break;case 93:d--;break;case 123:u++;break;case 125:u--}if(47===e){for(var p=r-1,m=void 0;p>=0&&" "===(m=t.charAt(p));p--);m&&Hr.test(m)||(c=!0)}}else void 0===o?(f=r+1,o=t.slice(0,r).trim()):g();function g(){(i||(i=[])).push(t.slice(f,r).trim()),f=r+1}if(void 0===o?o=t.slice(0,r).trim():0!==f&&g(),i)for(r=0;r<i.length;r++)o=Kr(o,i[r]);return o}function Kr(t,e){var n=e.indexOf("(");if(n<0)return'_f("'.concat(e,'")(').concat(t,")");var r=e.slice(0,n),o=e.slice(n+1);return'_f("'.concat(r,'")(').concat(t).concat(")"!==o?","+o:o)}function Yr(t,e){console.error("[Vue compiler]: ".concat(t))}function Ur(t,e){return t?t.map((function(t){return t[e]})).filter((function(t){return t})):[]}function Gr(t,e,n,r,o){(t.props||(t.props=[])).push(io({name:e,value:n,dynamic:o},r)),t.plain=!1}function Xr(t,e,n,r,o){(o?t.dynamicAttrs||(t.dynamicAttrs=[]):t.attrs||(t.attrs=[])).push(io({name:e,value:n,dynamic:o},r)),t.plain=!1}function Zr(t,e,n,r){t.attrsMap[e]=n,t.attrsList.push(io({name:e,value:n},r))}function Qr(t,e,n,r,o,i,s,a){(t.directives||(t.directives=[])).push(io({name:e,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:s},a)),t.plain=!1}function to(t,e,n){return n?"_p(".concat(e,',"').concat(t,'")'):t+e}function eo(e,n,r,o,i,s,a,l){var c;(o=o||t).right?l?n="(".concat(n,")==='click'?'contextmenu':(").concat(n,")"):"click"===n&&(n="contextmenu",delete o.right):o.middle&&(l?n="(".concat(n,")==='click'?'mouseup':(").concat(n,")"):"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=to("!",n,l)),o.once&&(delete o.once,n=to("~",n,l)),o.passive&&(delete o.passive,n=to("&",n,l)),o.native?(delete o.native,c=e.nativeEvents||(e.nativeEvents={})):c=e.events||(e.events={});var u=io({value:r.trim(),dynamic:l},a);o!==t&&(u.modifiers=o);var d=c[n];Array.isArray(d)?i?d.unshift(u):d.push(u):c[n]=d?i?[u,d]:[d,u]:u,e.plain=!1}function no(t,e,n){var r=ro(t,":"+e)||ro(t,"v-bind:"+e);if(null!=r)return Jr(r);if(!1!==n){var o=ro(t,e);if(null!=o)return JSON.stringify(o)}}function ro(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var o=t.attrsList,i=0,s=o.length;i<s;i++)if(o[i].name===e){o.splice(i,1);break}return n&&delete t.attrsMap[e],r}function oo(t,e){for(var n=t.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(e.test(i.name))return n.splice(r,1),i}}function io(t,e){return e&&(null!=e.start&&(t.start=e.start),null!=e.end&&(t.end=e.end)),t}function so(t,e,n){var r=n||{},o=r.number,i="$$v",s=i;r.trim&&(s="(typeof ".concat(i," === 'string'")+"? ".concat(i,".trim()")+": ".concat(i,")")),o&&(s="_n(".concat(s,")"));var a=ao(e,s);t.model={value:"(".concat(e,")"),expression:JSON.stringify(e),callback:"function (".concat(i,") {").concat(a,"}")}}function ao(t,e){var n=function(t){if(t=t.trim(),jr=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<jr-1)return(Br=t.lastIndexOf("."))>-1?{exp:t.slice(0,Br),key:'"'+t.slice(Br+1)+'"'}:{exp:t,key:null};Fr=t,Br=Vr=Wr=0;for(;!co();)uo(Lr=lo())?fo(Lr):91===Lr&&ho(Lr);return{exp:t.slice(0,Vr),key:t.slice(Vr+1,Wr)}}(t);return null===n.key?"".concat(t,"=").concat(e):"$set(".concat(n.exp,", ").concat(n.key,", ").concat(e,")")}function lo(){return Fr.charCodeAt(++Br)}function co(){return Br>=jr}function uo(t){return 34===t||39===t}function ho(t){var e=1;for(Vr=Br;!co();)if(uo(t=lo()))fo(t);else if(91===t&&e++,93===t&&e--,0===e){Wr=Br;break}}function fo(t){for(var e=t;!co()&&(t=lo())!==e;);}var po;function mo(t,e,n){var r=po;return function o(){var i=e.apply(null,arguments);null!==i&&yo(t,o,n,r)}}var go=Ye&&!(Z&&Number(Z[1])<=53);function vo(t,e,n,r){if(go){var o=ze,i=e;e=i._wrapper=function(t){if(t.target===t.currentTarget||t.timeStamp>=o||t.timeStamp<=0||t.target.ownerDocument!==document)return i.apply(this,arguments)}}po.addEventListener(t,e,tt?{capture:n,passive:r}:n)}function yo(t,e,n,r){(r||po).removeEventListener(t,e._wrapper||e,n)}function bo(t,e){if(!n(t.data.on)||!n(e.data.on)){var o=e.data.on||{},i=t.data.on||{};po=e.elm||t.elm,function(t){if(r(t.__r)){var e=K?"change":"input";t[e]=[].concat(t.__r,t[e]||[]),delete t.__r}r(t.__c)&&(t.change=[].concat(t.__c,t.change||[]),delete t.__c)}(o),zt(o,i,vo,yo,mo,e.context),po=void 0}}var wo,xo={create:bo,update:bo,destroy:function(t){return bo(t,Sr)}};function So(t,e){if(!n(t.data.domProps)||!n(e.data.domProps)){var i,s,a=e.elm,l=t.data.domProps||{},c=e.data.domProps||{};for(i in(r(c.__ob__)||o(c._v_attr_proxy))&&(c=e.data.domProps=D({},c)),l)i in c||(a[i]="");for(i in c){if(s=c[i],"textContent"===i||"innerHTML"===i){if(e.children&&(e.children.length=0),s===l[i])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===i&&"PROGRESS"!==a.tagName){a._value=s;var u=n(s)?"":String(s);ko(a,u)&&(a.value=u)}else if("innerHTML"===i&&hr(a.tagName)&&n(a.innerHTML)){(wo=wo||document.createElement("div")).innerHTML="<svg>".concat(s,"</svg>");for(var d=wo.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;d.firstChild;)a.appendChild(d.firstChild)}else if(s!==l[i])try{a[i]=s}catch(Fy){}}}}function ko(t,e){return!t.composing&&("OPTION"===t.tagName||function(t,e){var n=!0;try{n=document.activeElement!==t}catch(Fy){}return n&&t.value!==e}(t,e)||function(t,e){var n=t.value,o=t._vModifiers;if(r(o)){if(o.number)return f(n)!==f(e);if(o.trim)return n.trim()!==e.trim()}return n!==e}(t,e))}var _o={create:So,update:So},Oo=w((function(t){var e={},n=/:(.+)/;return t.split(/;(?![^(]*\))/g).forEach((function(t){if(t){var r=t.split(n);r.length>1&&(e[r[0].trim()]=r[1].trim())}})),e}));function Co(t){var e=Mo(t.style);return t.staticStyle?D(t.staticStyle,e):e}function Mo(t){return Array.isArray(t)?T(t):"string"==typeof t?Oo(t):t}var Do,To=/^--/,$o=/\s*!important$/,Eo=function(t,e,n){if(To.test(e))t.style.setProperty(e,n);else if($o.test(n))t.style.setProperty(O(e),n.replace($o,""),"important");else{var r=Ao(e);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)t.style[r]=n[o];else t.style[r]=n}},No=["Webkit","Moz","ms"],Ao=w((function(t){if(Do=Do||document.createElement("div").style,"filter"!==(t=S(t))&&t in Do)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<No.length;n++){var r=No[n]+e;if(r in Do)return r}}));function Po(t,e){var o=e.data,i=t.data;if(!(n(o.staticStyle)&&n(o.style)&&n(i.staticStyle)&&n(i.style))){var s,a,l=e.elm,c=i.staticStyle,u=i.normalizedStyle||i.style||{},d=c||u,h=Mo(e.data.style)||{};e.data.normalizedStyle=r(h.__ob__)?D({},h):h;var f=function(t,e){var n,r={};if(e)for(var o=t;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=Co(o.data))&&D(r,n);(n=Co(t.data))&&D(r,n);for(var i=t;i=i.parent;)i.data&&(n=Co(i.data))&&D(r,n);return r}(e,!0);for(a in d)n(f[a])&&Eo(l,a,"");for(a in f)(s=f[a])!==d[a]&&Eo(l,a,null==s?"":s)}}var Io={create:Po,update:Po},Ro=/\s+/;function zo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ro).forEach((function(e){return t.classList.add(e)})):t.classList.add(e);else{var n=" ".concat(t.getAttribute("class")||""," ");n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function jo(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(Ro).forEach((function(e){return t.classList.remove(e)})):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" ".concat(t.getAttribute("class")||""," "),r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?t.setAttribute("class",n):t.removeAttribute("class")}}function Fo(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&D(e,Lo(t.name||"v")),D(e,t),e}return"string"==typeof t?Lo(t):void 0}}var Lo=w((function(t){return{enterClass:"".concat(t,"-enter"),enterToClass:"".concat(t,"-enter-to"),enterActiveClass:"".concat(t,"-enter-active"),leaveClass:"".concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-to"),leaveActiveClass:"".concat(t,"-leave-active")}})),Bo=H&&!Y,Vo="transition",Wo="transitionend",qo="animation",Ho="animationend";Bo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Vo="WebkitTransition",Wo="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(qo="WebkitAnimation",Ho="webkitAnimationEnd"));var Jo=H?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()};function Ko(t){Jo((function(){Jo(t)}))}function Yo(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),zo(t,e))}function Uo(t,e){t._transitionClasses&&v(t._transitionClasses,e),jo(t,e)}function Go(t,e,n){var r=Zo(t,e),o=r.type,i=r.timeout,s=r.propCount;if(!o)return n();var a="transition"===o?Wo:Ho,l=0,c=function(){t.removeEventListener(a,u),n()},u=function(e){e.target===t&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),i+1),t.addEventListener(a,u)}var Xo=/\b(transform|all)(,|$)/;function Zo(t,e){var n,r=window.getComputedStyle(t),o=(r[Vo+"Delay"]||"").split(", "),i=(r[Vo+"Duration"]||"").split(", "),s=Qo(o,i),a=(r[qo+"Delay"]||"").split(", "),l=(r[qo+"Duration"]||"").split(", "),c=Qo(a,l),u=0,d=0;return"transition"===e?s>0&&(n="transition",u=s,d=i.length):"animation"===e?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?i.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Xo.test(r[Vo+"Property"])}}function Qo(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map((function(e,n){return ti(e)+ti(t[n])})))}function ti(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function ei(t,e){var o=t.elm;r(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var i=Fo(t.data.transition);if(!n(i)&&!r(o._enterCb)&&1===o.nodeType){for(var l=i.css,c=i.type,u=i.enterClass,d=i.enterToClass,h=i.enterActiveClass,p=i.appearClass,m=i.appearToClass,g=i.appearActiveClass,v=i.beforeEnter,y=i.enter,b=i.afterEnter,w=i.enterCancelled,x=i.beforeAppear,S=i.appear,k=i.afterAppear,_=i.appearCancelled,O=i.duration,C=_e,M=_e.$vnode;M&&M.parent;)C=M.context,M=M.parent;var D=!C._isMounted||!t.isRootInsert;if(!D||S||""===S){var T=D&&p?p:u,$=D&&g?g:h,E=D&&m?m:d,N=D&&x||v,A=D&&s(S)?S:y,P=D&&k||b,R=D&&_||w,z=f(a(O)?O.enter:O),j=!1!==l&&!Y,F=oi(A),L=o._enterCb=I((function(){j&&(Uo(o,E),Uo(o,$)),L.cancelled?(j&&Uo(o,T),R&&R(o)):P&&P(o),o._enterCb=null}));t.data.show||jt(t,"insert",(function(){var e=o.parentNode,n=e&&e._pending&&e._pending[t.key];n&&n.tag===t.tag&&n.elm._leaveCb&&n.elm._leaveCb(),A&&A(o,L)})),N&&N(o),j&&(Yo(o,T),Yo(o,$),Ko((function(){Uo(o,T),L.cancelled||(Yo(o,E),F||(ri(z)?setTimeout(L,z):Go(o,c,L)))}))),t.data.show&&(e&&e(),A&&A(o,L)),j||F||L()}}}function ni(t,e){var o=t.elm;r(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var i=Fo(t.data.transition);if(n(i)||1!==o.nodeType)return e();if(!r(o._leaveCb)){var s=i.css,l=i.type,c=i.leaveClass,u=i.leaveToClass,d=i.leaveActiveClass,h=i.beforeLeave,p=i.leave,m=i.afterLeave,g=i.leaveCancelled,v=i.delayLeave,y=i.duration,b=!1!==s&&!Y,w=oi(p),x=f(a(y)?y.leave:y),S=o._leaveCb=I((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),b&&(Uo(o,u),Uo(o,d)),S.cancelled?(b&&Uo(o,c),g&&g(o)):(e(),m&&m(o)),o._leaveCb=null}));v?v(k):k()}function k(){S.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),h&&h(o),b&&(Yo(o,c),Yo(o,d),Ko((function(){Uo(o,c),S.cancelled||(Yo(o,u),w||(ri(x)?setTimeout(S,x):Go(o,l,S)))}))),p&&p(o,S),b||w||S())}}function ri(t){return"number"==typeof t&&!isNaN(t)}function oi(t){if(n(t))return!1;var e=t.fns;return r(e)?oi(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function ii(t,e){!0!==e.data.show&&ei(e)}var si=function(t){var s,a,l={},c=t.modules,u=t.nodeOps;for(s=0;s<kr.length;++s)for(l[kr[s]]=[],a=0;a<c.length;++a)r(c[a][kr[s]])&&l[kr[s]].push(c[a][kr[s]]);function d(t){var e=u.parentNode(t);r(e)&&u.removeChild(e,t)}function h(t,e,n,i,s,a,c){if(r(t.elm)&&r(a)&&(t=a[c]=ht(t)),t.isRootInsert=!s,!function(t,e,n,i){var s=t.data;if(r(s)){var a=r(t.componentInstance)&&s.keepAlive;if(r(s=s.hook)&&r(s=s.init)&&s(t,!1),r(t.componentInstance))return f(t,e),m(n,t.elm,i),o(a)&&function(t,e,n,o){var i,s=t;for(;s.componentInstance;)if(r(i=(s=s.componentInstance._vnode).data)&&r(i=i.transition)){for(i=0;i<l.activate.length;++i)l.activate[i](Sr,s);e.push(s);break}m(n,t.elm,o)}(t,e,n,i),!0}}(t,e,n,i)){var d=t.data,h=t.children,p=t.tag;r(p)?(t.elm=t.ns?u.createElementNS(t.ns,p):u.createElement(p,t),b(t),g(t,h,e),r(d)&&y(t,e),m(n,t.elm,i)):o(t.isComment)?(t.elm=u.createComment(t.text),m(n,t.elm,i)):(t.elm=u.createTextNode(t.text),m(n,t.elm,i))}}function f(t,e){r(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(y(t,e),b(t)):(wr(t),e.push(t))}function m(t,e,n){r(t)&&(r(n)?u.parentNode(n)===t&&u.insertBefore(t,e,n):u.appendChild(t,e))}function g(t,n,r){if(e(n))for(var o=0;o<n.length;++o)h(n[o],r,t.elm,null,!0,n,o);else i(t.text)&&u.appendChild(t.elm,u.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return r(t.tag)}function y(t,e){for(var n=0;n<l.create.length;++n)l.create[n](Sr,t);r(s=t.data.hook)&&(r(s.create)&&s.create(Sr,t),r(s.insert)&&e.push(t))}function b(t){var e;if(r(e=t.fnScopeId))u.setStyleScope(t.elm,e);else for(var n=t;n;)r(e=n.context)&&r(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e),n=n.parent;r(e=_e)&&e!==t.context&&e!==t.fnContext&&r(e=e.$options._scopeId)&&u.setStyleScope(t.elm,e)}function w(t,e,n,r,o,i){for(;r<=o;++r)h(n[r],i,t,e,!1,n,r)}function x(t){var e,n,o=t.data;if(r(o))for(r(e=o.hook)&&r(e=e.destroy)&&e(t),e=0;e<l.destroy.length;++e)l.destroy[e](t);if(r(e=t.children))for(n=0;n<t.children.length;++n)x(t.children[n])}function S(t,e,n){for(;e<=n;++e){var o=t[e];r(o)&&(r(o.tag)?(k(o),x(o)):d(o.elm))}}function k(t,e){if(r(e)||r(t.data)){var n,o=l.remove.length+1;for(r(e)?e.listeners+=o:e=function(t,e){function n(){0==--n.listeners&&d(t)}return n.listeners=e,n}(t.elm,o),r(n=t.componentInstance)&&r(n=n._vnode)&&r(n.data)&&k(n,e),n=0;n<l.remove.length;++n)l.remove[n](t,e);r(n=t.data.hook)&&r(n=n.remove)?n(t,e):e()}else d(t.elm)}function _(t,e,n,o){for(var i=n;i<o;i++){var s=e[i];if(r(s)&&_r(t,s))return i}}function O(t,e,i,s,a,c){if(t!==e){r(e.elm)&&r(s)&&(e=s[a]=ht(e));var d=e.elm=t.elm;if(o(t.isAsyncPlaceholder))r(e.asyncFactory.resolved)?D(t.elm,e,i):e.isAsyncPlaceholder=!0;else if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))e.componentInstance=t.componentInstance;else{var f,p=e.data;r(p)&&r(f=p.hook)&&r(f=f.prepatch)&&f(t,e);var m=t.children,g=e.children;if(r(p)&&v(e)){for(f=0;f<l.update.length;++f)l.update[f](t,e);r(f=p.hook)&&r(f=f.update)&&f(t,e)}n(e.text)?r(m)&&r(g)?m!==g&&function(t,e,o,i,s){for(var a,l,c,d=0,f=0,p=e.length-1,m=e[0],g=e[p],v=o.length-1,y=o[0],b=o[v],x=!s;d<=p&&f<=v;)n(m)?m=e[++d]:n(g)?g=e[--p]:_r(m,y)?(O(m,y,i,o,f),m=e[++d],y=o[++f]):_r(g,b)?(O(g,b,i,o,v),g=e[--p],b=o[--v]):_r(m,b)?(O(m,b,i,o,v),x&&u.insertBefore(t,m.elm,u.nextSibling(g.elm)),m=e[++d],b=o[--v]):_r(g,y)?(O(g,y,i,o,f),x&&u.insertBefore(t,g.elm,m.elm),g=e[--p],y=o[++f]):(n(a)&&(a=Or(e,d,p)),n(l=r(y.key)?a[y.key]:_(y,e,d,p))?h(y,i,t,m.elm,!1,o,f):_r(c=e[l],y)?(O(c,y,i,o,f),e[l]=void 0,x&&u.insertBefore(t,c.elm,m.elm)):h(y,i,t,m.elm,!1,o,f),y=o[++f]);d>p?w(t,n(o[v+1])?null:o[v+1].elm,o,f,v,i):f>v&&S(e,d,p)}(d,m,g,i,c):r(g)?(r(t.text)&&u.setTextContent(d,""),w(d,null,g,0,g.length-1,i)):r(m)?S(m,0,m.length-1):r(t.text)&&u.setTextContent(d,""):t.text!==e.text&&u.setTextContent(d,e.text),r(p)&&r(f=p.hook)&&r(f=f.postpatch)&&f(t,e)}}}function C(t,e,n){if(o(n)&&r(t.parent))t.parent.data.pendingInsert=e;else for(var i=0;i<e.length;++i)e[i].data.hook.insert(e[i])}var M=p("attrs,class,staticClass,staticStyle,key");function D(t,e,n,i){var s,a=e.tag,l=e.data,c=e.children;if(i=i||l&&l.pre,e.elm=t,o(e.isComment)&&r(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(r(l)&&(r(s=l.hook)&&r(s=s.init)&&s(e,!0),r(s=e.componentInstance)))return f(e,n),!0;if(r(a)){if(r(c))if(t.hasChildNodes())if(r(s=l)&&r(s=s.domProps)&&r(s=s.innerHTML)){if(s!==t.innerHTML)return!1}else{for(var u=!0,d=t.firstChild,h=0;h<c.length;h++){if(!d||!D(d,c[h],n,i)){u=!1;break}d=d.nextSibling}if(!u||d)return!1}else g(e,c,n);if(r(l)){var p=!1;for(var m in l)if(!M(m)){p=!0,y(e,n);break}!p&&l.class&&on(l.class)}}else t.data!==e.text&&(t.data=e.text);return!0}return function(t,e,i,s){if(!n(e)){var a,c=!1,d=[];if(n(t))c=!0,h(e,d);else{var f=r(t.nodeType);if(!f&&_r(t,e))O(t,e,d,null,null,s);else{if(f){if(1===t.nodeType&&t.hasAttribute("data-server-rendered")&&(t.removeAttribute("data-server-rendered"),i=!0),o(i)&&D(t,e,d))return C(e,d,!0),t;a=t,t=new ct(u.tagName(a).toLowerCase(),{},[],void 0,a)}var p=t.elm,m=u.parentNode(p);if(h(e,d,p._leaveCb?null:m,u.nextSibling(p)),r(e.parent))for(var g=e.parent,y=v(e);g;){for(var b=0;b<l.destroy.length;++b)l.destroy[b](g);if(g.elm=e.elm,y){for(var w=0;w<l.create.length;++w)l.create[w](Sr,g);var k=g.data.hook.insert;if(k.merged)for(var _=1;_<k.fns.length;_++)k.fns[_]()}else wr(g);g=g.parent}r(m)?S([t],0,0):r(t.tag)&&x(t)}}return C(e,d,c),e.elm}r(t)&&x(t)}}({nodeOps:yr,modules:[Rr,qr,xo,_o,Io,H?{create:ii,activate:ii,remove:function(t,e){!0!==t.data.show?ni(t,e):e()}}:{}].concat(Nr)});Y&&document.addEventListener("selectionchange",(function(){var t=document.activeElement;t&&t.vmodel&&pi(t,"input")}));var ai={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?jt(n,"postpatch",(function(){ai.componentUpdated(t,e,n)})):li(t,e,n.context),t._vOptions=[].map.call(t.options,di)):("textarea"===n.tag||gr(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",hi),t.addEventListener("compositionend",fi),t.addEventListener("change",fi),Y&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){li(t,e,n.context);var r=t._vOptions,o=t._vOptions=[].map.call(t.options,di);if(o.some((function(t,e){return!A(t,r[e])})))(t.multiple?e.value.some((function(t){return ui(t,o)})):e.value!==e.oldValue&&ui(e.value,o))&&pi(t,"change")}}};function li(t,e,n){ci(t,e),(K||U)&&setTimeout((function(){ci(t,e)}),0)}function ci(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,s,a=0,l=t.options.length;a<l;a++)if(s=t.options[a],o)i=P(r,di(s))>-1,s.selected!==i&&(s.selected=i);else if(A(di(s),r))return void(t.selectedIndex!==a&&(t.selectedIndex=a));o||(t.selectedIndex=-1)}}function ui(t,e){return e.every((function(e){return!A(e,t)}))}function di(t){return"_value"in t?t._value:t.value}function hi(t){t.target.composing=!0}function fi(t){t.target.composing&&(t.target.composing=!1,pi(t.target,"input"))}function pi(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function mi(t){return!t.componentInstance||t.data&&t.data.transition?t:mi(t.componentInstance._vnode)}var gi={model:ai,show:{bind:function(t,e,n){var r=e.value,o=(n=mi(n)).data&&n.data.transition,i=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&o?(n.data.show=!0,ei(n,(function(){t.style.display=i}))):t.style.display=r?i:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&((n=mi(n)).data&&n.data.transition?(n.data.show=!0,r?ei(n,(function(){t.style.display=t.__vOriginalDisplay})):ni(n,(function(){t.style.display="none"}))):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,o){o||(t.style.display=t.__vOriginalDisplay)}}},vi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function yi(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?yi(be(e.children)):t}function bi(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var o=n._parentListeners;for(var r in o)e[S(r)]=o[r];return e}function wi(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}var xi=function(t){return t.tag||le(t)},Si=function(t){return"show"===t.name},ki={name:"transition",props:vi,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(xi)).length){var r=this.mode,o=n[0];if(function(t){for(;t=t.parent;)if(t.data.transition)return!0}(this.$vnode))return o;var s=yi(o);if(!s)return o;if(this._leaving)return wi(t,o);var a="__transition-".concat(this._uid,"-");s.key=null==s.key?s.isComment?a+"comment":a+s.tag:i(s.key)?0===String(s.key).indexOf(a)?s.key:a+s.key:s.key;var l=(s.data||(s.data={})).transition=bi(this),c=this._vnode,u=yi(c);if(s.data.directives&&s.data.directives.some(Si)&&(s.data.show=!0),u&&u.data&&!function(t,e){return e.key===t.key&&e.tag===t.tag}(s,u)&&!le(u)&&(!u.componentInstance||!u.componentInstance._vnode.isComment)){var d=u.data.transition=D({},l);if("out-in"===r)return this._leaving=!0,jt(d,"afterLeave",(function(){e._leaving=!1,e.$forceUpdate()})),wi(t,o);if("in-out"===r){if(le(s))return c;var h,f=function(){h()};jt(l,"afterEnter",f),jt(l,"enterCancelled",f),jt(d,"delayLeave",(function(t){h=t}))}}return o}}},_i=D({tag:String,moveClass:String},vi);delete _i.mode;var Oi={props:_i,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var o=Oe(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,o(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],s=bi(this),a=0;a<o.length;a++){(u=o[a]).tag&&null!=u.key&&0!==String(u.key).indexOf("__vlist")&&(i.push(u),n[u.key]=u,(u.data||(u.data={})).transition=s)}if(r){var l=[],c=[];for(a=0;a<r.length;a++){var u;(u=r[a]).data.transition=s,u.data.pos=u.elm.getBoundingClientRect(),n[u.key]?l.push(u):c.push(u)}this.kept=t(e,null,l),this.removed=c}return t(e,null,i)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Ci),t.forEach(Mi),t.forEach(Di),this._reflow=document.body.offsetHeight,t.forEach((function(t){if(t.data.moved){var n=t.elm,r=n.style;Yo(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Wo,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Wo,t),n._moveCb=null,Uo(n,e))})}})))},methods:{hasMove:function(t,e){if(!Bo)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach((function(t){jo(n,t)})),zo(n,e),n.style.display="none",this.$el.appendChild(n);var r=Zo(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function Ci(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Mi(t){t.data.newPos=t.elm.getBoundingClientRect()}function Di(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,o=e.top-n.top;if(r||o){t.data.moved=!0;var i=t.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var Ti={Transition:ki,TransitionGroup:Oi};Vn.config.mustUseProp=Zn,Vn.config.isReservedTag=fr,Vn.config.isReservedAttr=Gn,Vn.config.getTagNamespace=pr,Vn.config.isUnknownElement=function(t){if(!H)return!0;if(fr(t))return!1;if(t=t.toLowerCase(),null!=mr[t])return mr[t];var e=document.createElement(t);return t.indexOf("-")>-1?mr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:mr[t]=/HTMLUnknownElement/.test(e.toString())},D(Vn.options.directives,gi),D(Vn.options.components,Ti),Vn.prototype.__patch__=H?si:$,Vn.prototype.$mount=function(t,e){return function(t,e,n){var r;t.$el=e,t.$options.render||(t.$options.render=ut),Te(t,"beforeMount"),r=function(){t._update(t._render(),n)},new ln(t,r,$,{before:function(){t._isMounted&&!t._isDestroyed&&Te(t,"beforeUpdate")}},!0),n=!1;var o=t._preWatchers;if(o)for(var i=0;i<o.length;i++)o[i].run();return null==t.$vnode&&(t._isMounted=!0,Te(t,"mounted")),t}(this,t=t&&H?vr(t):void 0,e)},H&&setTimeout((function(){F.devtools&&rt&&rt.emit("init",Vn)}),0);var $i=/\{\{((?:.|\r?\n)+?)\}\}/g,Ei=/[-.*+?^${}()|[\]\/\\]/g,Ni=w((function(t){var e=t[0].replace(Ei,"\\$&"),n=t[1].replace(Ei,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}));var Ai={staticKeys:["staticClass"],transformNode:function(t,e){e.warn;var n=ro(t,"class");n&&(t.staticClass=JSON.stringify(n.replace(/\s+/g," ").trim()));var r=no(t,"class",!1);r&&(t.classBinding=r)},genData:function(t){var e="";return t.staticClass&&(e+="staticClass:".concat(t.staticClass,",")),t.classBinding&&(e+="class:".concat(t.classBinding,",")),e}};var Pi,Ii={staticKeys:["staticStyle"],transformNode:function(t,e){e.warn;var n=ro(t,"style");n&&(t.staticStyle=JSON.stringify(Oo(n)));var r=no(t,"style",!1);r&&(t.styleBinding=r)},genData:function(t){var e="";return t.staticStyle&&(e+="staticStyle:".concat(t.staticStyle,",")),t.styleBinding&&(e+="style:(".concat(t.styleBinding,"),")),e}},Ri=function(t){return(Pi=Pi||document.createElement("div")).innerHTML=t,Pi.textContent},zi=p("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),ji=p("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),Fi=p("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),Li=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Bi=/^\s*((?:v-[\w-]+:|@|:|#)\[[^=]+?\][^\s"'<>\/=]*)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,Vi="[a-zA-Z_][\\-\\.0-9_a-zA-Z".concat(L.source,"]*"),Wi="((?:".concat(Vi,"\\:)?").concat(Vi,")"),qi=new RegExp("^<".concat(Wi)),Hi=/^\s*(\/?)>/,Ji=new RegExp("^<\\/".concat(Wi,"[^>]*>")),Ki=/^<!DOCTYPE [^>]+>/i,Yi=/^<!\--/,Ui=/^<!\[/,Gi=p("script,style,textarea",!0),Xi={},Zi={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t","&#39;":"'"},Qi=/&(?:lt|gt|quot|amp|#39);/g,ts=/&(?:lt|gt|quot|amp|#39|#10|#9);/g,es=p("pre,textarea",!0),ns=function(t,e){return t&&es(t)&&"\n"===e[0]};function rs(t,e){var n=e?ts:Qi;return t.replace(n,(function(t){return Zi[t]}))}function is(t,e){for(var n,r,o=[],i=e.expectHTML,s=e.isUnaryTag||E,a=e.canBeLeftOpenTag||E,l=0,c=function(){if(n=t,r&&Gi(r)){var c=0,h=r.toLowerCase(),f=Xi[h]||(Xi[h]=new RegExp("([\\s\\S]*?)(</"+h+"[^>]*>)","i"));S=t.replace(f,(function(t,n,r){return c=r.length,Gi(h)||"noscript"===h||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),ns(h,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""}));l+=t.length-S.length,t=S,d(h,l-c,l)}else{var p=t.indexOf("<");if(0===p){if(Yi.test(t)){var m=t.indexOf("--\x3e");if(m>=0)return e.shouldKeepComment&&e.comment&&e.comment(t.substring(4,m),l,l+m+3),u(m+3),"continue"}if(Ui.test(t)){var g=t.indexOf("]>");if(g>=0)return u(g+2),"continue"}var v=t.match(Ki);if(v)return u(v[0].length),"continue";var y=t.match(Ji);if(y){var b=l;return u(y[0].length),d(y[1],b,l),"continue"}var w=function(){var e=t.match(qi);if(e){var n={tagName:e[1],attrs:[],start:l};u(e[0].length);for(var r=void 0,o=void 0;!(r=t.match(Hi))&&(o=t.match(Bi)||t.match(Li));)o.start=l,u(o[0].length),o.end=l,n.attrs.push(o);if(r)return n.unarySlash=r[1],u(r[0].length),n.end=l,n}}();if(w)return function(t){var n=t.tagName,l=t.unarySlash;i&&("p"===r&&Fi(n)&&d(r),a(n)&&r===n&&d(n));for(var c=s(n)||!!l,u=t.attrs.length,h=new Array(u),f=0;f<u;f++){var p=t.attrs[f],m=p[3]||p[4]||p[5]||"",g="a"===n&&"href"===p[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;h[f]={name:p[1],value:rs(m,g)}}c||(o.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:h,start:t.start,end:t.end}),r=n);e.start&&e.start(n,h,c,t.start,t.end)}(w),ns(w.tagName,t)&&u(1),"continue"}var x=void 0,S=void 0,k=void 0;if(p>=0){for(S=t.slice(p);!(Ji.test(S)||qi.test(S)||Yi.test(S)||Ui.test(S)||(k=S.indexOf("<",1))<0);)p+=k,S=t.slice(p);x=t.substring(0,p)}p<0&&(x=t),x&&u(x.length),e.chars&&x&&e.chars(x,l-x.length,l)}if(t===n)return e.chars&&e.chars(t),"break"};t;){if("break"===c())break}function u(e){l+=e,t=t.substring(e)}function d(t,n,i){var s,a;if(null==n&&(n=l),null==i&&(i=l),t)for(a=t.toLowerCase(),s=o.length-1;s>=0&&o[s].lowerCasedTag!==a;s--);else s=0;if(s>=0){for(var c=o.length-1;c>=s;c--)e.end&&e.end(o[c].tag,n,i);o.length=s,r=s&&o[s-1].tag}else"br"===a?e.start&&e.start(t,[],!0,n,i):"p"===a&&(e.start&&e.start(t,[],!1,n,i),e.end&&e.end(t,n,i))}d()}var ss,as,ls,cs,us,ds,hs,fs,ps=/^@|^v-on:/,ms=/^v-|^@|^:|^#/,gs=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,vs=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ys=/^\(|\)$/g,bs=/^\[.*\]$/,ws=/:(.*)$/,xs=/^:|^\.|^v-bind:/,Ss=/\.[^.\]]+(?=[^\]]*$)/g,ks=/^v-slot(:|$)|^#/,_s=/[\r\n]/,Os=/[ \f\t\r\n]+/g,Cs=w(Ri);function Ms(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:Ps(e),rawAttrsMap:{},parent:n,children:[]}}function Ds(t,e){ss=e.warn||Yr,ds=e.isPreTag||E,hs=e.mustUseProp||E,fs=e.getTagNamespace||E,e.isReservedTag,ls=Ur(e.modules,"transformNode"),cs=Ur(e.modules,"preTransformNode"),us=Ur(e.modules,"postTransformNode"),as=e.delimiters;var n,r,o=[],i=!1!==e.preserveWhitespace,s=e.whitespace,a=!1,l=!1;function c(t){if(u(t),a||t.processed||(t=Ts(t,e)),o.length||t===n||n.if&&(t.elseif||t.else)&&Es(n,{exp:t.elseif,block:t}),r&&!t.forbidden)if(t.elseif||t.else)s=t,c=function(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}(r.children),c&&c.if&&Es(c,{exp:s.elseif,block:s});else{if(t.slotScope){var i=t.slotTarget||'"default"';(r.scopedSlots||(r.scopedSlots={}))[i]=t}r.children.push(t),t.parent=r}var s,c;t.children=t.children.filter((function(t){return!t.slotScope})),u(t),t.pre&&(a=!1),ds(t.tag)&&(l=!1);for(var d=0;d<us.length;d++)us[d](t,e)}function u(t){if(!l)for(var e=void 0;(e=t.children[t.children.length-1])&&3===e.type&&" "===e.text;)t.children.pop()}return is(t,{warn:ss,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,outputSourceRange:e.outputSourceRange,start:function(t,i,s,u,d){var h=r&&r.ns||fs(t);K&&"svg"===h&&(i=function(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Is.test(r.name)||(r.name=r.name.replace(Rs,""),e.push(r))}return e}(i));var f,p=Ms(t,i,r);h&&(p.ns=h),"style"!==(f=p).tag&&("script"!==f.tag||f.attrsMap.type&&"text/javascript"!==f.attrsMap.type)||nt()||(p.forbidden=!0);for(var m=0;m<cs.length;m++)p=cs[m](p,e)||p;a||(!function(t){null!=ro(t,"v-pre")&&(t.pre=!0)}(p),p.pre&&(a=!0)),ds(p.tag)&&(l=!0),a?function(t){var e=t.attrsList,n=e.length;if(n)for(var r=t.attrs=new Array(n),o=0;o<n;o++)r[o]={name:e[o].name,value:JSON.stringify(e[o].value)},null!=e[o].start&&(r[o].start=e[o].start,r[o].end=e[o].end);else t.pre||(t.plain=!0)}(p):p.processed||($s(p),function(t){var e=ro(t,"v-if");if(e)t.if=e,Es(t,{exp:e,block:t});else{null!=ro(t,"v-else")&&(t.else=!0);var n=ro(t,"v-else-if");n&&(t.elseif=n)}}(p),function(t){null!=ro(t,"v-once")&&(t.once=!0)}(p)),n||(n=p),s?c(p):(r=p,o.push(p))},end:function(t,e,n){var i=o[o.length-1];o.length-=1,r=o[o.length-1],c(i)},chars:function(t,e,n){if(r&&(!K||"textarea"!==r.tag||r.attrsMap.placeholder!==t)){var o,c=r.children;if(t=l||t.trim()?"script"===(o=r).tag||"style"===o.tag?t:Cs(t):c.length?s?"condense"===s&&_s.test(t)?"":" ":i?" ":"":""){l||"condense"!==s||(t=t.replace(Os," "));var u=void 0,d=void 0;!a&&" "!==t&&(u=function(t,e){var n=e?Ni(e):$i;if(n.test(t)){for(var r,o,i,s=[],a=[],l=n.lastIndex=0;r=n.exec(t);){(o=r.index)>l&&(a.push(i=t.slice(l,o)),s.push(JSON.stringify(i)));var c=Jr(r[1].trim());s.push("_s(".concat(c,")")),a.push({"@binding":c}),l=o+r[0].length}return l<t.length&&(a.push(i=t.slice(l)),s.push(JSON.stringify(i))),{expression:s.join("+"),tokens:a}}}(t,as))?d={type:2,expression:u.expression,tokens:u.tokens,text:t}:" "===t&&c.length&&" "===c[c.length-1].text||(d={type:3,text:t}),d&&c.push(d)}}},comment:function(t,e,n){if(r){var o={type:3,text:t,isComment:!0};r.children.push(o)}}}),n}function Ts(t,e){var n,r;(r=no(n=t,"key"))&&(n.key=r),t.plain=!t.key&&!t.scopedSlots&&!t.attrsList.length,function(t){var e=no(t,"ref");e&&(t.ref=e,t.refInFor=function(t){var e=t;for(;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}(t))}(t),function(t){var e;"template"===t.tag?(e=ro(t,"scope"),t.slotScope=e||ro(t,"slot-scope")):(e=ro(t,"slot-scope"))&&(t.slotScope=e);var n=no(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,t.slotTargetDynamic=!(!t.attrsMap[":slot"]&&!t.attrsMap["v-bind:slot"]),"template"===t.tag||t.slotScope||Xr(t,"slot",n,function(t,e){return t.rawAttrsMap[":"+e]||t.rawAttrsMap["v-bind:"+e]||t.rawAttrsMap[e]}(t,"slot")));if("template"===t.tag){if(s=oo(t,ks)){var r=Ns(s),o=r.name,i=r.dynamic;t.slotTarget=o,t.slotTargetDynamic=i,t.slotScope=s.value||"_empty_"}}else{var s;if(s=oo(t,ks)){var a=t.scopedSlots||(t.scopedSlots={}),l=Ns(s),c=l.name,u=(i=l.dynamic,a[c]=Ms("template",[],t));u.slotTarget=c,u.slotTargetDynamic=i,u.children=t.children.filter((function(t){if(!t.slotScope)return t.parent=u,!0})),u.slotScope=s.value||"_empty_",t.children=[],t.plain=!1}}}(t),function(t){"slot"===t.tag&&(t.slotName=no(t,"name"))}(t),function(t){var e;(e=no(t,"is"))&&(t.component=e);null!=ro(t,"inline-template")&&(t.inlineTemplate=!0)}(t);for(var o=0;o<ls.length;o++)t=ls[o](t,e)||t;return function(t){var e,n,r,o,i,s,a,l,c=t.attrsList;for(e=0,n=c.length;e<n;e++)if(r=o=c[e].name,i=c[e].value,ms.test(r))if(t.hasBindings=!0,(s=As(r.replace(ms,"")))&&(r=r.replace(Ss,"")),xs.test(r))r=r.replace(xs,""),i=Jr(i),(l=bs.test(r))&&(r=r.slice(1,-1)),s&&(s.prop&&!l&&"innerHtml"===(r=S(r))&&(r="innerHTML"),s.camel&&!l&&(r=S(r)),s.sync&&(a=ao(i,"$event"),l?eo(t,'"update:"+('.concat(r,")"),a,null,!1,0,c[e],!0):(eo(t,"update:".concat(S(r)),a,null,!1,0,c[e]),O(r)!==S(r)&&eo(t,"update:".concat(O(r)),a,null,!1,0,c[e])))),s&&s.prop||!t.component&&hs(t.tag,t.attrsMap.type,r)?Gr(t,r,i,c[e],l):Xr(t,r,i,c[e],l);else if(ps.test(r))r=r.replace(ps,""),(l=bs.test(r))&&(r=r.slice(1,-1)),eo(t,r,i,s,!1,0,c[e],l);else{var u=(r=r.replace(ms,"")).match(ws),d=u&&u[1];l=!1,d&&(r=r.slice(0,-(d.length+1)),bs.test(d)&&(d=d.slice(1,-1),l=!0)),Qr(t,r,o,i,d,l,s,c[e])}else Xr(t,r,JSON.stringify(i),c[e]),!t.component&&"muted"===r&&hs(t.tag,t.attrsMap.type,r)&&Gr(t,r,"true",c[e])}(t),t}function $s(t){var e;if(e=ro(t,"v-for")){var n=function(t){var e=t.match(gs);if(!e)return;var n={};n.for=e[2].trim();var r=e[1].trim().replace(ys,""),o=r.match(vs);o?(n.alias=r.replace(vs,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r;return n}(e);n&&D(t,n)}}function Es(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function Ns(t){var e=t.name.replace(ks,"");return e||"#"!==t.name[0]&&(e="default"),bs.test(e)?{name:e.slice(1,-1),dynamic:!0}:{name:'"'.concat(e,'"'),dynamic:!1}}function As(t){var e=t.match(Ss);if(e){var n={};return e.forEach((function(t){n[t.slice(1)]=!0})),n}}function Ps(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}var Is=/^xmlns:NS\d+/,Rs=/^NS\d+:/;function zs(t){return Ms(t.tag,t.attrsList.slice(),t.parent)}var js=[Ai,Ii,{preTransformNode:function(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r=void 0;if((n[":type"]||n["v-bind:type"])&&(r=no(t,"type")),n.type||r||!n["v-bind"]||(r="(".concat(n["v-bind"],").type")),r){var o=ro(t,"v-if",!0),i=o?"&&(".concat(o,")"):"",s=null!=ro(t,"v-else",!0),a=ro(t,"v-else-if",!0),l=zs(t);$s(l),Zr(l,"type","checkbox"),Ts(l,e),l.processed=!0,l.if="(".concat(r,")==='checkbox'")+i,Es(l,{exp:l.if,block:l});var c=zs(t);ro(c,"v-for",!0),Zr(c,"type","radio"),Ts(c,e),Es(l,{exp:"(".concat(r,")==='radio'")+i,block:c});var u=zs(t);return ro(u,"v-for",!0),Zr(u,":type",r),Ts(u,e),Es(l,{exp:o,block:u}),s?l.else=!0:a&&(l.elseif=a),l}}}}];var Fs,Ls,Bs,Vs={model:function(t,e,n){var r=e.value,o=e.modifiers,i=t.tag,s=t.attrsMap.type;if(t.component)return so(t,r,o),!1;if("select"===i)!function(t,e,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;'+"return ".concat(r?"_n(val)":"val","})"),i="$event.target.multiple ? $$selectedVal : $$selectedVal[0]",s="var $$selectedVal = ".concat(o,";");s="".concat(s," ").concat(ao(e,i)),eo(t,"change",s,null,!0)}(t,r,o);else if("input"===i&&"checkbox"===s)!function(t,e,n){var r=n&&n.number,o=no(t,"value")||"null",i=no(t,"true-value")||"true",s=no(t,"false-value")||"false";Gr(t,"checked","Array.isArray(".concat(e,")")+"?_i(".concat(e,",").concat(o,")>-1")+("true"===i?":(".concat(e,")"):":_q(".concat(e,",").concat(i,")"))),eo(t,"change","var $$a=".concat(e,",")+"$$el=$event.target,"+"$$c=$$el.checked?(".concat(i,"):(").concat(s,");")+"if(Array.isArray($$a)){"+"var $$v=".concat(r?"_n("+o+")":o,",")+"$$i=_i($$a,$$v);"+"if($$el.checked){$$i<0&&(".concat(ao(e,"$$a.concat([$$v])"),")}")+"else{$$i>-1&&(".concat(ao(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))"),")}")+"}else{".concat(ao(e,"$$c"),"}"),null,!0)}(t,r,o);else if("input"===i&&"radio"===s)!function(t,e,n){var r=n&&n.number,o=no(t,"value")||"null";o=r?"_n(".concat(o,")"):o,Gr(t,"checked","_q(".concat(e,",").concat(o,")")),eo(t,"change",ao(e,o),null,!0)}(t,r,o);else if("input"===i||"textarea"===i)!function(t,e,n){var r=t.attrsMap.type,o=n||{},i=o.lazy,s=o.number,a=o.trim,l=!i&&"range"!==r,c=i?"change":"range"===r?"__r":"input",u="$event.target.value";a&&(u="$event.target.value.trim()");s&&(u="_n(".concat(u,")"));var d=ao(e,u);l&&(d="if($event.target.composing)return;".concat(d));Gr(t,"value","(".concat(e,")")),eo(t,c,d,null,!0),(a||s)&&eo(t,"blur","$forceUpdate()")}(t,r,o);else if(!F.isReservedTag(i))return so(t,r,o),!1;return!0},text:function(t,e){e.value&&Gr(t,"textContent","_s(".concat(e.value,")"),e)},html:function(t,e){e.value&&Gr(t,"innerHTML","_s(".concat(e.value,")"),e)}},Ws={expectHTML:!0,modules:js,directives:Vs,isPreTag:function(t){return"pre"===t},isUnaryTag:zi,mustUseProp:Zn,canBeLeftOpenTag:ji,isReservedTag:fr,getTagNamespace:pr,staticKeys:(Fs=js,Fs.reduce((function(t,e){return t.concat(e.staticKeys||[])}),[]).join(","))},qs=w((function(t){return p("type,tag,attrsList,attrsMap,plain,parent,children,attrs,start,end,rawAttrsMap"+(t?","+t:""))}));function Hs(t,e){t&&(Ls=qs(e.staticKeys||""),Bs=e.isReservedTag||E,Js(t),Ks(t,!1))}function Js(t){if(t.static=function(t){if(2===t.type)return!1;if(3===t.type)return!0;return!(!t.pre&&(t.hasBindings||t.if||t.for||m(t.tag)||!Bs(t.tag)||function(t){for(;t.parent;){if("template"!==(t=t.parent).tag)return!1;if(t.for)return!0}return!1}(t)||!Object.keys(t).every(Ls)))}(t),1===t.type){if(!Bs(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Js(r),r.static||(t.static=!1)}if(t.ifConditions)for(e=1,n=t.ifConditions.length;e<n;e++){var o=t.ifConditions[e].block;Js(o),o.static||(t.static=!1)}}}function Ks(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ks(t.children[n],e||!!t.for);if(t.ifConditions)for(n=1,r=t.ifConditions.length;n<r;n++)Ks(t.ifConditions[n].block,e)}}var Ys=/^([\w$_]+|\([^)]*?\))\s*=>|^function(?:\s+[\w$]+)?\s*\(/,Us=/\([^)]*?\);*$/,Gs=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Xs={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},Zs={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},Qs=function(t){return"if(".concat(t,")return null;")},ta={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:Qs("$event.target !== $event.currentTarget"),ctrl:Qs("!$event.ctrlKey"),shift:Qs("!$event.shiftKey"),alt:Qs("!$event.altKey"),meta:Qs("!$event.metaKey"),left:Qs("'button' in $event && $event.button !== 0"),middle:Qs("'button' in $event && $event.button !== 1"),right:Qs("'button' in $event && $event.button !== 2")};function ea(t,e){var n=e?"nativeOn:":"on:",r="",o="";for(var i in t){var s=na(t[i]);t[i]&&t[i].dynamic?o+="".concat(i,",").concat(s,","):r+='"'.concat(i,'":').concat(s,",")}return r="{".concat(r.slice(0,-1),"}"),o?n+"_d(".concat(r,",[").concat(o.slice(0,-1),"])"):n+r}function na(t){if(!t)return"function(){}";if(Array.isArray(t))return"[".concat(t.map((function(t){return na(t)})).join(","),"]");var e=Gs.test(t.value),n=Ys.test(t.value),r=Gs.test(t.value.replace(Us,""));if(t.modifiers){var o="",i="",s=[],a=function(e){if(ta[e])i+=ta[e],Xs[e]&&s.push(e);else if("exact"===e){var n=t.modifiers;i+=Qs(["ctrl","shift","alt","meta"].filter((function(t){return!n[t]})).map((function(t){return"$event.".concat(t,"Key")})).join("||"))}else s.push(e)};for(var l in t.modifiers)a(l);s.length&&(o+=function(t){return"if(!$event.type.indexOf('key')&&"+"".concat(t.map(ra).join("&&"),")return null;")}(s)),i&&(o+=i);var c=e?"return ".concat(t.value,".apply(null, arguments)"):n?"return (".concat(t.value,").apply(null, arguments)"):r?"return ".concat(t.value):t.value;return"function($event){".concat(o).concat(c,"}")}return e||n?t.value:"function($event){".concat(r?"return ".concat(t.value):t.value,"}")}function ra(t){var e=parseInt(t,10);if(e)return"$event.keyCode!==".concat(e);var n=Xs[t],r=Zs[t];return"_k($event.keyCode,"+"".concat(JSON.stringify(t),",")+"".concat(JSON.stringify(n),",")+"$event.key,"+"".concat(JSON.stringify(r))+")"}var oa={on:function(t,e){t.wrapListeners=function(t){return"_g(".concat(t,",").concat(e.value,")")}},bind:function(t,e){t.wrapData=function(n){return"_b(".concat(n,",'").concat(t.tag,"',").concat(e.value,",").concat(e.modifiers&&e.modifiers.prop?"true":"false").concat(e.modifiers&&e.modifiers.sync?",true":"",")")}},cloak:$},ia=function(t){this.options=t,this.warn=t.warn||Yr,this.transforms=Ur(t.modules,"transformCode"),this.dataGenFns=Ur(t.modules,"genData"),this.directives=D(D({},oa),t.directives);var e=t.isReservedTag||E;this.maybeComponent=function(t){return!!t.component||!e(t.tag)},this.onceId=0,this.staticRenderFns=[],this.pre=!1};function sa(t,e){var n=new ia(e),r=t?"script"===t.tag?"null":aa(t,n):'_c("div")';return{render:"with(this){return ".concat(r,"}"),staticRenderFns:n.staticRenderFns}}function aa(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return ca(t,e);if(t.once&&!t.onceProcessed)return ua(t,e);if(t.for&&!t.forProcessed)return fa(t,e);if(t.if&&!t.ifProcessed)return da(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return function(t,e){var n=t.slotName||'"default"',r=va(t,e),o="_t(".concat(n).concat(r?",function(){return ".concat(r,"}"):""),i=t.attrs||t.dynamicAttrs?wa((t.attrs||[]).concat(t.dynamicAttrs||[]).map((function(t){return{name:S(t.name),value:t.value,dynamic:t.dynamic}}))):null,s=t.attrsMap["v-bind"];!i&&!s||r||(o+=",null");i&&(o+=",".concat(i));s&&(o+="".concat(i?"":",null",",").concat(s));return o+")"}(t,e);var n=void 0;if(t.component)n=function(t,e,n){var r=e.inlineTemplate?null:va(e,n,!0);return"_c(".concat(t,",").concat(pa(e,n)).concat(r?",".concat(r):"",")")}(t.component,t,e);else{var r=void 0;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=pa(t,e));var o=void 0,i=e.options.bindings;i&&!1!==i.__isScriptSetup&&(o=la(i,t.tag)||la(i,S(t.tag))||la(i,k(S(t.tag)))),o||(o="'".concat(t.tag,"'"));var s=t.inlineTemplate?null:va(t,e,!0);n="_c(".concat(o).concat(r?",".concat(r):"").concat(s?",".concat(s):"",")")}for(var a=0;a<e.transforms.length;a++)n=e.transforms[a](t,n);return n}return va(t,e)||"void 0"}function la(t,e){var n=t[e];if(n&&n.startsWith("setup"))return e}function ca(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return ".concat(aa(t,e),"}")),e.pre=n,"_m(".concat(e.staticRenderFns.length-1).concat(t.staticInFor?",true":"",")")}function ua(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return da(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o(".concat(aa(t,e),",").concat(e.onceId++,",").concat(n,")"):aa(t,e)}return ca(t,e)}function da(t,e,n,r){return t.ifProcessed=!0,ha(t.ifConditions.slice(),e,n,r)}function ha(t,e,n,r){if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"(".concat(o.exp,")?").concat(i(o.block),":").concat(ha(t,e,n,r)):"".concat(i(o.block));function i(t){return n?n(t,e):t.once?ua(t,e):aa(t,e)}}function fa(t,e,n,r){var o=t.for,i=t.alias,s=t.iterator1?",".concat(t.iterator1):"",a=t.iterator2?",".concat(t.iterator2):"";return t.forProcessed=!0,"".concat(r||"_l","((").concat(o,"),")+"function(".concat(i).concat(s).concat(a,"){")+"return ".concat((n||aa)(t,e))+"})"}function pa(t,e){var n="{",r=function(t,e){var n=t.directives;if(!n)return;var r,o,i,s,a="directives:[",l=!1;for(r=0,o=n.length;r<o;r++){i=n[r],s=!0;var c=e.directives[i.name];c&&(s=!!c(t,i,e.warn)),s&&(l=!0,a+='{name:"'.concat(i.name,'",rawName:"').concat(i.rawName,'"').concat(i.value?",value:(".concat(i.value,"),expression:").concat(JSON.stringify(i.value)):"").concat(i.arg?",arg:".concat(i.isDynamicArg?i.arg:'"'.concat(i.arg,'"')):"").concat(i.modifiers?",modifiers:".concat(JSON.stringify(i.modifiers)):"","},"))}if(l)return a.slice(0,-1)+"]"}(t,e);r&&(n+=r+","),t.key&&(n+="key:".concat(t.key,",")),t.ref&&(n+="ref:".concat(t.ref,",")),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'.concat(t.tag,'",'));for(var o=0;o<e.dataGenFns.length;o++)n+=e.dataGenFns[o](t);if(t.attrs&&(n+="attrs:".concat(wa(t.attrs),",")),t.props&&(n+="domProps:".concat(wa(t.props),",")),t.events&&(n+="".concat(ea(t.events,!1),",")),t.nativeEvents&&(n+="".concat(ea(t.nativeEvents,!0),",")),t.slotTarget&&!t.slotScope&&(n+="slot:".concat(t.slotTarget,",")),t.scopedSlots&&(n+="".concat(function(t,e,n){var r=t.for||Object.keys(e).some((function(t){var n=e[t];return n.slotTargetDynamic||n.if||n.for||ma(n)})),o=!!t.if;if(!r)for(var i=t.parent;i;){if(i.slotScope&&"_empty_"!==i.slotScope||i.for){r=!0;break}i.if&&(o=!0),i=i.parent}var s=Object.keys(e).map((function(t){return ga(e[t],n)})).join(",");return"scopedSlots:_u([".concat(s,"]").concat(r?",null,true":"").concat(!r&&o?",null,false,".concat(function(t){var e=5381,n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e>>>0}(s)):"",")")}(t,t.scopedSlots,e),",")),t.model&&(n+="model:{value:".concat(t.model.value,",callback:").concat(t.model.callback,",expression:").concat(t.model.expression,"},")),t.inlineTemplate){var i=function(t,e){var n=t.children[0];if(n&&1===n.type){var r=sa(n,e.options);return"inlineTemplate:{render:function(){".concat(r.render,"},staticRenderFns:[").concat(r.staticRenderFns.map((function(t){return"function(){".concat(t,"}")})).join(","),"]}")}}(t,e);i&&(n+="".concat(i,","))}return n=n.replace(/,$/,"")+"}",t.dynamicAttrs&&(n="_b(".concat(n,',"').concat(t.tag,'",').concat(wa(t.dynamicAttrs),")")),t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function ma(t){return 1===t.type&&("slot"===t.tag||t.children.some(ma))}function ga(t,e){var n=t.attrsMap["slot-scope"];if(t.if&&!t.ifProcessed&&!n)return da(t,e,ga,"null");if(t.for&&!t.forProcessed)return fa(t,e,ga);var r="_empty_"===t.slotScope?"":String(t.slotScope),o="function(".concat(r,"){")+"return ".concat("template"===t.tag?t.if&&n?"(".concat(t.if,")?").concat(va(t,e)||"undefined",":undefined"):va(t,e)||"undefined":aa(t,e),"}"),i=r?"":",proxy:true";return"{key:".concat(t.slotTarget||'"default"',",fn:").concat(o).concat(i,"}")}function va(t,e,n,r,o){var i=t.children;if(i.length){var s=i[0];if(1===i.length&&s.for&&"template"!==s.tag&&"slot"!==s.tag){var a=n?e.maybeComponent(s)?",1":",0":"";return"".concat((r||aa)(s,e)).concat(a)}var l=n?function(t,e){for(var n=0,r=0;r<t.length;r++){var o=t[r];if(1===o.type){if(ya(o)||o.ifConditions&&o.ifConditions.some((function(t){return ya(t.block)}))){n=2;break}(e(o)||o.ifConditions&&o.ifConditions.some((function(t){return e(t.block)})))&&(n=1)}}return n}(i,e.maybeComponent):0,c=o||ba;return"[".concat(i.map((function(t){return c(t,e)})).join(","),"]").concat(l?",".concat(l):"")}}function ya(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function ba(t,e){return 1===t.type?aa(t,e):3===t.type&&t.isComment?(r=t,"_e(".concat(JSON.stringify(r.text),")")):"_v(".concat(2===(n=t).type?n.expression:xa(JSON.stringify(n.text)),")");var n,r}function wa(t){for(var e="",n="",r=0;r<t.length;r++){var o=t[r],i=xa(o.value);o.dynamic?n+="".concat(o.name,",").concat(i,","):e+='"'.concat(o.name,'":').concat(i,",")}return e="{".concat(e.slice(0,-1),"}"),n?"_d(".concat(e,",[").concat(n.slice(0,-1),"])"):e}function xa(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function Sa(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),$}}function ka(t){var e=Object.create(null);return function(n,r,o){(r=D({},r)).warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(e[i])return e[i];var s=t(n,r),a={},l=[];return a.render=Sa(s.render,l),a.staticRenderFns=s.staticRenderFns.map((function(t){return Sa(t,l)})),e[i]=a}}new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)");var _a,Oa,Ca=(_a=function(t,e){var n=Ds(t.trim(),e);!1!==e.optimize&&Hs(n,e);var r=sa(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}},function(t){function e(e,n){var r=Object.create(t),o=[],i=[];if(n)for(var s in n.modules&&(r.modules=(t.modules||[]).concat(n.modules)),n.directives&&(r.directives=D(Object.create(t.directives||null),n.directives)),n)"modules"!==s&&"directives"!==s&&(r[s]=n[s]);r.warn=function(t,e,n){(n?i:o).push(t)};var a=_a(e.trim(),r);return a.errors=o,a.tips=i,a}return{compile:e,compileToFunctions:ka(e)}}),Ma=Ca(Ws).compileToFunctions;function Da(t){return(Oa=Oa||document.createElement("div")).innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',Oa.innerHTML.indexOf("&#10;")>0}var Ta=!!H&&Da(!1),$a=!!H&&Da(!0),Ea=w((function(t){var e=vr(t);return e&&e.innerHTML})),Na=Vn.prototype.$mount;Vn.prototype.$mount=function(t,e){if((t=t&&vr(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=Ea(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=function(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}(t));if(r){var o=Ma(r,{outputSourceRange:!1,shouldDecodeNewlines:Ta,shouldDecodeNewlinesForHref:$a,delimiters:n.delimiters,comments:n.comments},this),i=o.render,s=o.staticRenderFns;n.render=i,n.staticRenderFns=s}}return Na.call(this,t,e)},Vn.compile=Ma;var Aa=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function Pa(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=Pa(t[n],e)})),o}function Ia(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function Ra(t){return null!==t&&"object"==typeof t}var za=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},ja={namespaced:{configurable:!0}};ja.namespaced.get=function(){return!!this._rawModule.namespaced},za.prototype.addChild=function(t,e){this._children[t]=e},za.prototype.removeChild=function(t){delete this._children[t]},za.prototype.getChild=function(t){return this._children[t]},za.prototype.hasChild=function(t){return t in this._children},za.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},za.prototype.forEachChild=function(t){Ia(this._children,t)},za.prototype.forEachGetter=function(t){this._rawModule.getters&&Ia(this._rawModule.getters,t)},za.prototype.forEachAction=function(t){this._rawModule.actions&&Ia(this._rawModule.actions,t)},za.prototype.forEachMutation=function(t){this._rawModule.mutations&&Ia(this._rawModule.mutations,t)},Object.defineProperties(za.prototype,ja);var Fa,La=function(t){this.register([],t,!1)};function Ba(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;Ba(t.concat(r),e.getChild(r),n.modules[r])}}La.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},La.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},La.prototype.update=function(t){Ba([],this.root,t)},La.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var o=new za(e,n);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&Ia(e.modules,(function(e,o){r.register(t.concat(o),e,n)}))},La.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},La.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var Va=function(t){var e=this;void 0===t&&(t={}),!Fa&&"undefined"!=typeof window&&window.Vue&&Ga(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new La(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Fa,this._makeLocalGettersCache=Object.create(null);var o=this,i=this.dispatch,s=this.commit;this.dispatch=function(t,e){return i.call(o,t,e)},this.commit=function(t,e,n){return s.call(o,t,e,n)},this.strict=r;var a=this._modules.root.state;Ka(this,a,[],this._modules.root),Ja(this,a),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:Fa.config.devtools)&&function(t){Aa&&(t._devtoolHook=Aa,Aa.emit("vuex:init",t),Aa.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){Aa.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){Aa.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},Wa={state:{configurable:!0}};function qa(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function Ha(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Ka(t,n,[],t._modules.root,!0),Ja(t,n,e)}function Ja(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={};Ia(o,(function(e,n){i[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=Fa.config.silent;Fa.config.silent=!0,t._vm=new Fa({data:{$$state:e},computed:i}),Fa.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),Fa.nextTick((function(){return r.$destroy()})))}function Ka(t,e,n,r,o){var i=!n.length,s=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[s],t._modulesNamespaceMap[s]=r),!i&&!o){var a=Ya(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit((function(){Fa.set(a,l,r.state)}))}var c=r.context=function(t,e,n){var r=""===e,o={dispatch:r?t.dispatch:function(n,r,o){var i=Ua(n,r,o),s=i.payload,a=i.options,l=i.type;return a&&a.root||(l=e+l),t.dispatch(l,s)},commit:r?t.commit:function(n,r,o){var i=Ua(n,r,o),s=i.payload,a=i.options,l=i.type;a&&a.root||(l=e+l),t.commit(l,s,a)}};return Object.defineProperties(o,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,r)===e){var i=o.slice(r);Object.defineProperty(n,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return Ya(t.state,n)}}}),o}(t,s,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,s+n,e,c)})),r.forEachAction((function(e,n){var r=e.root?n:s+n,o=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var o,i=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,r,o,c)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,s+n,e,c)})),r.forEachChild((function(r,i){Ka(t,e,n.concat(i),r,o)}))}function Ya(t,e){return e.reduce((function(t,e){return t[e]}),t)}function Ua(t,e,n){return Ra(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function Ga(t){Fa&&t===Fa||
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(Fa=t)}Wa.state.get=function(){return this._vm._data.$$state},Wa.state.set=function(t){},Va.prototype.commit=function(t,e,n){var r=this,o=Ua(t,e,n),i=o.type,s=o.payload,a={type:i,payload:s},l=this._mutations[i];l&&(this._withCommit((function(){l.forEach((function(t){t(s)}))})),this._subscribers.slice().forEach((function(t){return t(a,r.state)})))},Va.prototype.dispatch=function(t,e){var n=this,r=Ua(t,e),o=r.type,i=r.payload,s={type:o,payload:i},a=this._actions[o];if(a){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(s,n.state)}))}catch(Fy){}var l=a.length>1?Promise.all(a.map((function(t){return t(i)}))):a[0](i);return new Promise((function(t,e){l.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(s,n.state)}))}catch(Fy){}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(s,n.state,t)}))}catch(Fy){}e(t)}))}))}},Va.prototype.subscribe=function(t,e){return qa(t,this._subscribers,e)},Va.prototype.subscribeAction=function(t,e){return qa("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},Va.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch((function(){return t(r.state,r.getters)}),e,n)},Va.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},Va.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),Ka(this,this.state,t,this._modules.get(t),n.preserveState),Ja(this,this.state)},Va.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=Ya(e.state,t.slice(0,-1));Fa.delete(n,t[t.length-1])})),Ha(this)},Va.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},Va.prototype.hotUpdate=function(t){this._modules.update(t),Ha(this,!0)},Va.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(Va.prototype,Wa);var Xa=nl((function(t,e){var n={};return el(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=rl(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof o?o.call(this,e,n):e[o]},n[r].vuex=!0})),n})),Za=nl((function(t,e){var n={};return el(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var i=rl(this.$store,"mapMutations",t);if(!i)return;r=i.context.commit}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n})),Qa=nl((function(t,e){var n={};return el(e).forEach((function(e){var r=e.key,o=e.val;o=t+o,n[r]=function(){if(!t||rl(this.$store,"mapGetters",t))return this.$store.getters[o]},n[r].vuex=!0})),n})),tl=nl((function(t,e){var n={};return el(e).forEach((function(e){var r=e.key,o=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var i=rl(this.$store,"mapActions",t);if(!i)return;r=i.context.dispatch}return"function"==typeof o?o.apply(this,[r].concat(e)):r.apply(this.$store,[o].concat(e))}})),n}));function el(t){return function(t){return Array.isArray(t)||Ra(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function nl(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function rl(t,e,n){return t._modulesNamespaceMap[n]}function ol(t,e,n){var r=n?t.groupCollapsed:t.group;try{r.call(t,e)}catch(Fy){t.log(e)}}function il(t){try{t.groupEnd()}catch(Fy){t.log("—— log end ——")}}function sl(){var t=new Date;return" @ "+al(t.getHours(),2)+":"+al(t.getMinutes(),2)+":"+al(t.getSeconds(),2)+"."+al(t.getMilliseconds(),3)}function al(t,e){return n="0",r=e-t.toString().length,new Array(r+1).join(n)+t;var n,r}const ll={Store:Va,install:Ga,version:"3.6.2",mapState:Xa,mapMutations:Za,mapGetters:Qa,mapActions:tl,createNamespacedHelpers:function(t){return{mapState:Xa.bind(null,t),mapGetters:Qa.bind(null,t),mapMutations:Za.bind(null,t),mapActions:tl.bind(null,t)}},createLogger:function(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var r=t.transformer;void 0===r&&(r=function(t){return t});var o=t.mutationTransformer;void 0===o&&(o=function(t){return t});var i=t.actionFilter;void 0===i&&(i=function(t,e){return!0});var s=t.actionTransformer;void 0===s&&(s=function(t){return t});var a=t.logMutations;void 0===a&&(a=!0);var l=t.logActions;void 0===l&&(l=!0);var c=t.logger;return void 0===c&&(c=console),function(t){var u=Pa(t.state);void 0!==c&&(a&&t.subscribe((function(t,i){var s=Pa(i);if(n(t,u,s)){var a=sl(),l=o(t),d="mutation "+t.type+a;ol(c,d,e),c.log("%c prev state","color: #9E9E9E; font-weight: bold",r(u)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",r(s)),il(c)}u=s})),l&&t.subscribeAction((function(t,n){if(i(t,n)){var r=sl(),o=s(t),a="action "+t.type+r;ol(c,a,e),c.log("%c action","color: #03A9F4; font-weight: bold",o),il(c)}})))}}};function cl(t){return{all:t=t||new Map,on:function(e,n){var r=t.get(e);r?r.push(n):t.set(e,[n])},off:function(e,n){var r=t.get(e);r&&(n?r.splice(r.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var r=t.get(e);r&&r.slice().map((function(t){t(n)})),(r=t.get("*"))&&r.slice().map((function(t){t(e,n)}))}}}var ul,dl,hl="function"==typeof Map?new Map:(ul=[],dl=[],{has:function(t){return ul.indexOf(t)>-1},get:function(t){return dl[ul.indexOf(t)]},set:function(t,e){-1===ul.indexOf(t)&&(ul.push(t),dl.push(e))},delete:function(t){var e=ul.indexOf(t);e>-1&&(ul.splice(e,1),dl.splice(e,1))}}),fl=function(t){return new Event(t,{bubbles:!0})};try{new Event("test")}catch(Fy){fl=function(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!1),e}}function pl(t){var e=hl.get(t);e&&e.destroy()}function ml(t){var e=hl.get(t);e&&e.update()}var gl=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((gl=function(t){return t}).destroy=function(t){return t},gl.update=function(t){return t}):((gl=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!hl.has(t)){var e,n=null,r=null,o=null,i=function(){t.clientWidth!==r&&c()},s=function(e){window.removeEventListener("resize",i,!1),t.removeEventListener("input",c,!1),t.removeEventListener("keyup",c,!1),t.removeEventListener("autosize:destroy",s,!1),t.removeEventListener("autosize:update",c,!1),Object.keys(e).forEach((function(n){t.style[n]=e[n]})),hl.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",s,!1),"onpropertychange"in t&&"oninput"in t&&t.addEventListener("keyup",c,!1),window.addEventListener("resize",i,!1),t.addEventListener("input",c,!1),t.addEventListener("autosize:update",c,!1),t.style.overflowX="hidden",t.style.wordWrap="break-word",hl.set(t,{destroy:s,update:c}),"vertical"===(e=window.getComputedStyle(t,null)).resize?t.style.resize="none":"both"===e.resize&&(t.style.resize="horizontal"),n="content-box"===e.boxSizing?-(parseFloat(e.paddingTop)+parseFloat(e.paddingBottom)):parseFloat(e.borderTopWidth)+parseFloat(e.borderBottomWidth),isNaN(n)&&(n=0),c()}function a(e){var n=t.style.width;t.style.width="0px",t.style.width=n,t.style.overflowY=e}function l(){if(0!==t.scrollHeight){var e=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push({node:t.parentNode,scrollTop:t.parentNode.scrollTop}),t=t.parentNode;return e}(t),o=document.documentElement&&document.documentElement.scrollTop;t.style.height="",t.style.height=t.scrollHeight+n+"px",r=t.clientWidth,e.forEach((function(t){t.node.scrollTop=t.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function c(){l();var e=Math.round(parseFloat(t.style.height)),n=window.getComputedStyle(t,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):t.offsetHeight;if(r<e?"hidden"===n.overflowY&&(a("scroll"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight):"hidden"!==n.overflowY&&(a("hidden"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(t,null).height)):t.offsetHeight),o!==r){o=r;var i=fl("autosize:resized");try{t.dispatchEvent(i)}catch(s){}}}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],pl),t},gl.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],ml),t});var vl=gl;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function yl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bl={exports:{}};const wl=bl.exports=function(){var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",s="hour",a="day",l="week",c="month",u="quarter",d="year",h="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},y={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,c),i=n-o<0,s=e.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-s:s-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:d,w:l,d:a,D:h,h:s,m:i,s:o,ms:r,Q:u}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=g;var x=function(t){return t instanceof O},S=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var s=e.split("-");if(!o&&s.length>1)return t(s[0])}else{var a=e.name;w[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},k=function(t,e){if(x(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new O(n)},_=y;_.l=S,_.i=x,_.w=function(t,e){return k(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var O=function(){function g(t){this.$L=S(t.locale,null,!0),this.parse(t)}var v=g.prototype;return v.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(_.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},v.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},v.$utils=function(){return _},v.isValid=function(){return!(this.$d.toString()===f)},v.isSame=function(t,e){var n=k(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return k(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<k(t)},v.$g=function(t,e,n){return _.u(t)?this[e]:this.set(n,t)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(t,e){var n=this,r=!!_.u(e)||e,u=_.p(t),f=function(t,e){var o=_.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},p=function(t,e){return _.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,g=this.$M,v=this.$D,y="set"+(this.$u?"UTC":"");switch(u){case d:return r?f(1,0):f(31,11);case c:return r?f(1,g):f(0,g+1);case l:var b=this.$locale().weekStart||0,w=(m<b?m+7:m)-b;return f(r?v-w:v+(6-w),g);case a:case h:return p(y+"Hours",0);case s:return p(y+"Minutes",1);case i:return p(y+"Seconds",2);case o:return p(y+"Milliseconds",3);default:return this.clone()}},v.endOf=function(t){return this.startOf(t,!1)},v.$set=function(t,e){var n,l=_.p(t),u="set"+(this.$u?"UTC":""),f=(n={},n[a]=u+"Date",n[h]=u+"Date",n[c]=u+"Month",n[d]=u+"FullYear",n[s]=u+"Hours",n[i]=u+"Minutes",n[o]=u+"Seconds",n[r]=u+"Milliseconds",n)[l],p=l===a?this.$D+(e-this.$W):e;if(l===c||l===d){var m=this.clone().set(h,1);m.$d[f](p),m.init(),this.$d=m.set(h,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},v.set=function(t,e){return this.clone().$set(t,e)},v.get=function(t){return this[_.p(t)]()},v.add=function(r,u){var h,f=this;r=Number(r);var p=_.p(u),m=function(t){var e=k(f);return _.w(e.date(e.date()+Math.round(t*r)),f)};if(p===c)return this.set(c,this.$M+r);if(p===d)return this.set(d,this.$y+r);if(p===a)return m(1);if(p===l)return m(7);var g=(h={},h[i]=e,h[s]=n,h[o]=t,h)[p]||1,v=this.$d.getTime()+r*g;return _.w(v,this)},v.subtract=function(t,e){return this.add(-1*t,e)},v.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=_.z(this),i=this.$H,s=this.$m,a=this.$M,l=n.weekdays,c=n.months,u=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},d=function(t){return _.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:_.s(a+1,2,"0"),MMM:u(n.monthsShort,a,c,3),MMMM:u(c,a),D:this.$D,DD:_.s(this.$D,2,"0"),d:String(this.$W),dd:u(n.weekdaysMin,this.$W,l,2),ddd:u(n.weekdaysShort,this.$W,l,3),dddd:l[this.$W],H:String(i),HH:_.s(i,2,"0"),h:d(1),hh:d(2),a:h(i,s,!0),A:h(i,s,!1),m:String(s),mm:_.s(s,2,"0"),s:String(this.$s),ss:_.s(this.$s,2,"0"),SSS:_.s(this.$ms,3,"0"),Z:o};return r.replace(m,(function(t,e){return e||p[t]||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,h,f){var p,m=_.p(h),g=k(r),v=(g.utcOffset()-this.utcOffset())*e,y=this-g,b=_.m(this,g);return b=(p={},p[d]=b/12,p[c]=b,p[u]=b/3,p[l]=(y-v)/6048e5,p[a]=(y-v)/864e5,p[s]=y/n,p[i]=y/e,p[o]=y/t,p)[m]||y,f?b:_.a(b)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return _.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},g}(),C=O.prototype;return k.prototype=C,[["$ms",r],["$s",o],["$m",i],["$H",s],["$W",a],["$M",c],["$y",d],["$D",h]].forEach((function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),k.extend=function(t,e){return t.$i||(t(e,O,k),t.$i=!0),k},k.locale=S,k.isDayjs=x,k.unix=function(t){return k(1e3*t)},k.en=w[b],k.Ls=w,k.p={},k}();var xl={exports:{}};const Sl=xl.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,o=/\d*[^\s\d-_:/()]+/,i={},s=function(t){return(t=+t)+(t>68?1900:2e3)},a=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],c=function(t){var e=i[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,r=i.meridiem;if(r){for(var o=1;o<=24;o+=1)if(t.indexOf(r(o,0,e))>-1){n=o>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[o,function(t){this.afternoon=u(t,!1)}],a:[o,function(t){this.afternoon=u(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[o,function(t){var e=i.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[o,function(t){var e=c("months"),n=(c("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(t){var e=c("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\d{4}/,a("year")],Z:l,ZZ:l};function h(n){var r,o;r=n,o=i&&i.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var i=r&&r.toUpperCase();return n||o[r]||t[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,l=0;l<a;l+=1){var c=s[l],u=d[c],h=u&&u[0],f=u&&u[1];s[l]=f?{regex:h,parser:f}:c.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var o=s[n];if("string"==typeof o)r+=o.length;else{var i=o.regex,l=o.parser,c=t.slice(r),u=i.exec(c)[0];l.call(e,u),t=t.replace(u,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,o=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var l=!0===s[2],c=!0===s[3],u=l||c,d=s[2];c&&(d=s[2]),i=this.$locale(),!l&&d&&(i=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=h(e)(t),o=r.year,i=r.month,s=r.day,a=r.hours,l=r.minutes,c=r.seconds,u=r.milliseconds,d=r.zone,f=new Date,p=s||(o||i?1:f.getDate()),m=o||f.getFullYear(),g=0;o&&!i||(g=i>0?i-1:f.getMonth());var v=a||0,y=l||0,b=c||0,w=u||0;return d?new Date(Date.UTC(m,g,p,v,y,b,w+60*d.offset*1e3)):n?new Date(Date.UTC(m,g,p,v,y,b,w)):new Date(m,g,p,v,y,b,w)}catch(x){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&e!=this.format(a)&&(this.$d=new Date("")),i={}}else if(a instanceof Array)for(var f=a.length,p=1;p<=f;p+=1){s[1]=a[p-1];var m=n.apply(this,s);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===f&&(this.$d=new Date(""))}else o.call(this,t)}}}();function kl(t){return(kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var _l={selector:"vue-portal-target-".concat(((t=21)=>{let e="",n=t;for(;n--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e})())},Ol=function(t){return _l.selector=t},Cl="undefined"!=typeof window&&void 0!==("undefined"==typeof document?"undefined":kl(document)),Ml=Vn.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(t){return{updatedNodes:t.nodes}},render:function(t){var e=this.updatedNodes&&this.updatedNodes();return e?1!==e.length||e[0].text?t(this.tag||"DIV",e):e:t()},destroyed:function(){var t=this.$el;t&&t.parentNode.removeChild(t)}}),Dl=Vn.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(_l.selector)}},tag:{type:String,default:"DIV"}},render:function(t){if(this.disabled){var e=this.$scopedSlots&&this.$scopedSlots.default();return e?e.length<2&&!e[0].text?e:t(this.tag,e):t()}return t()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var t=this;this.$nextTick((function(){t.disabled||t.slotFn===t.$scopedSlots.default||(t.container.updatedNodes=t.$scopedSlots.default),t.slotFn=t.$scopedSlots.default}))},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(Cl)return document.querySelector(this.selector)},insertTargetEl:function(){if(Cl){var t=document.querySelector("body"),e=document.createElement(this.tag);e.id=this.selector.substring(1),t.appendChild(e)}},mount:function(){if(Cl){var t=this.getTargetEl(),e=document.createElement("DIV");this.prepend&&t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),this.container=new Ml({el:e,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function Tl(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(e.name||"portal",Dl),e.defaultSelector&&Ol(e.defaultSelector)}"undefined"!=typeof window&&window.Vue&&window.Vue===Vn&&Vn.use(Tl);var $l={},El={};function Nl(t){return null==t}function Al(t){return null!=t}function Pl(t,e){return e.tag===t.tag&&e.key===t.key}function Il(t){var e=t.tag;t.vm=new e({data:t.args})}function Rl(t,e,n){var r,o,i={};for(r=e;r<=n;++r)Al(o=t[r].key)&&(i[o]=r);return i}function zl(t,e,n){for(;e<=n;++e)Il(t[e])}function jl(t,e,n){for(;e<=n;++e){var r=t[e];Al(r)&&(r.vm.$destroy(),r.vm=null)}}function Fl(t,e){t!==e&&(e.vm=t.vm,function(t){for(var e=Object.keys(t.args),n=0;n<e.length;n++)e.forEach((function(e){t.vm[e]=t.args[e]}))}(e))}Object.defineProperty(El,"__esModule",{value:!0}),El.h=function(t,e,n){return{tag:t,key:e,args:n}},El.patchChildren=function(t,e){Al(t)&&Al(e)?t!==e&&function(t,e){var n,r,o,i=0,s=0,a=t.length-1,l=t[0],c=t[a],u=e.length-1,d=e[0],h=e[u];for(;i<=a&&s<=u;)Nl(l)?l=t[++i]:Nl(c)?c=t[--a]:Pl(l,d)?(Fl(l,d),l=t[++i],d=e[++s]):Pl(c,h)?(Fl(c,h),c=t[--a],h=e[--u]):Pl(l,h)?(Fl(l,h),l=t[++i],h=e[--u]):Pl(c,d)?(Fl(c,d),c=t[--a],d=e[++s]):(Nl(n)&&(n=Rl(t,i,a)),Nl(r=Al(d.key)?n[d.key]:null)?(Il(d),d=e[++s]):Pl(o=t[r],d)?(Fl(o,d),t[r]=void 0,d=e[++s]):(Il(d),d=e[++s]));i>a?zl(e,s,u):s>u&&jl(t,i,a)}(t,e):Al(e)?zl(e,0,e.length-1):Al(t)&&jl(t,0,t.length-1)};var Ll={};function Bl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Bl(Object(n),!0).forEach((function(e){Wl(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Wl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ql(t){return(ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(Ll,"__esModule",{value:!0}),Ll._setTarget=void 0,Ll.popParams=Yl,Ll.pushParams=Kl,Ll.target=void 0,Ll.withParams=function(t,e){if("object"===ql(t)&&void 0!==e)return n=t,r=e,Gl((function(t){return function(){t(n);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return r.apply(this,o)}}));var n,r;return Gl(t)};var Hl=[],Jl=null;Ll.target=Jl;function Kl(){null!==Jl&&Hl.push(Jl),Ll.target=Jl={}}function Yl(){var t=Jl,e=Ll.target=Jl=Hl.pop()||null;return e&&(Array.isArray(e.$sub)||(e.$sub=[]),e.$sub.push(t)),t}function Ul(t){if("object"!==ql(t)||Array.isArray(t))throw new Error("params must be an object");Ll.target=Jl=Vl(Vl({},Jl),t)}function Gl(t){var e=t(Ul);return function(){Kl();try{for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.apply(this,n)}finally{Yl()}}}Ll._setTarget=function(t){Ll.target=Jl=t},function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Vuelidate=_,t.validationMixin=t.default=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.withParams}});var e=El,n=Ll;function r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function l(t){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var c=function(){return null},u=function(t,e,n){return t.reduce((function(t,r){return t[n?n(r):r]=e(r),t}),{})};function d(t){return"function"==typeof t}function h(t){return null!==t&&("object"===l(t)||d(t))}var f=function(t,e,n,r){if("function"==typeof n)return n.call(t,e,r);n=Array.isArray(n)?n:n.split(".");for(var o=0;o<n.length;o++){if(!e||"object"!==l(e))return r;e=e[n[o]]}return void 0===e?r:e};var p={$invalid:function(){var t=this,e=this.proxy;return this.nestedKeys.some((function(e){return t.refProxy(e).$invalid}))||this.ruleKeys.some((function(t){return!e[t]}))},$dirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.every((function(e){return t.refProxy(e).$dirty}))},$anyDirty:function(){var t=this;return!!this.dirty||0!==this.nestedKeys.length&&this.nestedKeys.some((function(e){return t.refProxy(e).$anyDirty}))},$error:function(){return this.$dirty&&!this.$pending&&this.$invalid},$anyError:function(){var t=this;return!!this.$error||this.nestedKeys.some((function(e){return t.refProxy(e).$anyError}))},$pending:function(){var t=this;return this.ruleKeys.some((function(e){return t.getRef(e).$pending}))||this.nestedKeys.some((function(e){return t.refProxy(e).$pending}))},$params:function(){var t=this,e=this.validations;return s(s({},u(this.nestedKeys,(function(t){return e[t]&&e[t].$params||null}))),u(this.ruleKeys,(function(e){return t.getRef(e).$params})))}};function m(t){this.dirty=t;var e=this.proxy,n=t?"$touch":"$reset";this.nestedKeys.forEach((function(t){e[t][n]()}))}var g={$touch:function(){m.call(this,!0)},$reset:function(){m.call(this,!1)},$flattenParams:function(){var t=this.proxy,e=[];for(var n in this.$params)if(this.isNested(n)){for(var r=t[n].$flattenParams(),o=0;o<r.length;o++)r[o].path.unshift(n);e=e.concat(r)}else e.push({path:[],name:n,params:this.$params[n]});return e}},v=Object.keys(p),y=Object.keys(g),b=null,w=function(t){if(b)return b;var o=t.extend({computed:{refs:function(){var t=this._vval;this._vval=this.children,(0,e.patchChildren)(t,this._vval);var n={};return this._vval.forEach((function(t){n[t.key]=t.vm})),n}},beforeCreate:function(){this._vval=null},beforeDestroy:function(){this._vval&&((0,e.patchChildren)(this._vval),this._vval=null)},methods:{getModel:function(){return this.lazyModel?this.lazyModel(this.prop):this.model},getModelKey:function(t){var e=this.getModel();if(e)return e[t]},hasIter:function(){return!1}}}),i=o.extend({data:function(){return{rule:null,lazyModel:null,model:null,lazyParentModel:null,rootModel:null}},methods:{runRule:function(e){var r=this.getModel();(0,n.pushParams)();var o,i=this.rule.call(this.rootModel,r,e),s=h(o=i)&&d(o.then)?function(t,e){var n=new t({data:{p:!0,v:!1}});return e.then((function(t){n.p=!1,n.v=t}),(function(t){throw n.p=!1,n.v=!1,t})),n.__isVuelidateAsyncVm=!0,n}(t,i):i,a=(0,n.popParams)();return{output:s,params:a&&a.$sub?a.$sub.length>1?a:a.$sub[0]:null}}},computed:{run:function(){var t=this,e=this.lazyParentModel();if(Array.isArray(e)&&e.__ob__){var n=e.__ob__.dep;n.depend();var r=n.constructor.target;if(!this._indirectWatcher){var o=r.constructor;this._indirectWatcher=new o(this,(function(){return t.runRule(e)}),null,{lazy:!0})}var i=this.getModel();if(!this._indirectWatcher.dirty&&this._lastModel===i)return this._indirectWatcher.depend(),r.value;this._lastModel=i,this._indirectWatcher.evaluate(),this._indirectWatcher.depend()}else this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null);return this._indirectWatcher?this._indirectWatcher.value:this.runRule(e)},$params:function(){return this.run.params},proxy:function(){var t=this.run.output;return t.__isVuelidateAsyncVm?!!t.v:!!t},$pending:function(){var t=this.run.output;return!!t.__isVuelidateAsyncVm&&t.p}},destroyed:function(){this._indirectWatcher&&(this._indirectWatcher.teardown(),this._indirectWatcher=null)}}),a=o.extend({data:function(){return{dirty:!1,validations:null,lazyModel:null,model:null,prop:null,lazyParentModel:null,rootModel:null}},methods:s(s({},g),{},{refProxy:function(t){return this.getRef(t).proxy},getRef:function(t){return this.refs[t]},isNested:function(t){return"function"!=typeof this.validations[t]}}),computed:s(s({},p),{},{nestedKeys:function(){return this.keys.filter(this.isNested)},ruleKeys:function(){var t=this;return this.keys.filter((function(e){return!t.isNested(e)}))},keys:function(){return Object.keys(this.validations).filter((function(t){return"$params"!==t}))},proxy:function(){var t=this,e=u(this.keys,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t.refProxy(e)}}})),n=u(v,(function(e){return{enumerable:!0,configurable:!0,get:function(){return t[e]}}})),r=u(y,(function(e){return{enumerable:!1,configurable:!0,get:function(){return t[e]}}})),o=this.hasIter()?{$iter:{enumerable:!0,value:Object.defineProperties({},s({},e))}}:{};return Object.defineProperties({},s(s(s(s({},e),o),{},{$model:{enumerable:!0,get:function(){var e=t.lazyParentModel();return null!=e?e[t.prop]:null},set:function(e){var n=t.lazyParentModel();null!=n&&(n[t.prop]=e,t.$touch())}}},n),r))},children:function(){var t=this;return[].concat(r(this.nestedKeys.map((function(e){return w(t,e)}))),r(this.ruleKeys.map((function(e){return x(t,e)})))).filter(Boolean)}})}),l=a.extend({methods:{isNested:function(t){return void 0!==this.validations[t]()},getRef:function(t){var e=this;return{get proxy(){return e.validations[t]()||!1}}}}}),m=a.extend({computed:{keys:function(){var t=this.getModel();return h(t)?Object.keys(t):[]},tracker:function(){var t=this,e=this.validations.$trackBy;return e?function(n){return"".concat(f(t.rootModel,t.getModelKey(n),e))}:function(t){return"".concat(t)}},getModelLazy:function(){var t=this;return function(){return t.getModel()}},children:function(){var t=this,n=this.validations,r=this.getModel(),o=s({},n);delete o.$trackBy;var i={};return this.keys.map((function(n){var s=t.tracker(n);return i.hasOwnProperty(s)?null:(i[s]=!0,(0,e.h)(a,s,{validations:o,prop:n,lazyParentModel:t.getModelLazy,model:r[n],rootModel:t.rootModel}))})).filter(Boolean)}},methods:{isNested:function(){return!0},getRef:function(t){return this.refs[this.tracker(t)]},hasIter:function(){return!0}}}),w=function(t,n){if("$each"===n)return(0,e.h)(m,n,{validations:t.validations[n],lazyParentModel:t.lazyParentModel,prop:n,lazyModel:t.getModel,rootModel:t.rootModel});var r=t.validations[n];if(Array.isArray(r)){var o=t.rootModel,i=u(r,(function(t){return function(){return f(o,o.$v,t)}}),(function(t){return Array.isArray(t)?t.join("."):t}));return(0,e.h)(l,n,{validations:i,lazyParentModel:c,prop:n,lazyModel:c,rootModel:o})}return(0,e.h)(a,n,{validations:r,lazyParentModel:t.getModel,prop:n,lazyModel:t.getModelKey,rootModel:t.rootModel})},x=function(t,n){return(0,e.h)(i,n,{rule:t.validations[n],lazyParentModel:t.lazyParentModel,lazyModel:t.getModel,rootModel:t.rootModel})};return b={VBase:o,Validation:a}},x=null;var S=function(t,n){var r=function(t){if(x)return x;for(var e=t.constructor;e.super;)e=e.super;return x=e,e}(t),o=w(r),i=o.Validation;return new(0,o.VBase)({computed:{children:function(){var r="function"==typeof n?n.call(t):n;return[(0,e.h)(i,"$v",{validations:r,lazyParentModel:c,prop:"$v",model:t,rootModel:t})]}}})},k={data:function(){var t=this.$options.validations;return t&&(this._vuelidate=S(this,t)),{}},beforeCreate:function(){var t=this.$options;t.validations&&(t.computed||(t.computed={}),t.computed.$v||(t.computed.$v=function(){return this._vuelidate?this._vuelidate.refs.$v.proxy:null}))},beforeDestroy:function(){this._vuelidate&&(this._vuelidate.$destroy(),this._vuelidate=null)}};function _(t){t.mixin(k)}t.validationMixin=k;var O=_;t.default=O}($l);const Xl=yl($l);function Zl(t){this.content=t}function Ql(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let t=0;o.text[t]==i.text[t];t++)n++;return n}if(o.content.size||i.content.size){let t=Ql(o.content,i.content,n+1);if(null!=t)return t}n+=o.nodeSize}else n+=o.nodeSize}}function tc(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=t.child(--o),a=e.child(--i),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let t=0,e=Math.min(s.text.length,a.text.length);for(;t<e&&s.text[s.text.length-t-1]==a.text[a.text.length-t-1];)t++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let t=tc(s.content,a.content,n-1,r-1);if(t)return t}n-=l,r-=l}else n-=l,r-=l}}Zl.prototype={constructor:Zl,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return-1==e?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return-1==o?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new Zl(i)},remove:function(t){var e=this.find(t);if(-1==e)return this;var n=this.content.slice();return n.splice(e,2),new Zl(n)},addToStart:function(t,e){return new Zl([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Zl(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(-1==i?o.length:i,0,e,n),new Zl(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return(t=Zl.from(t)).size?new Zl(t.content.concat(this.subtract(t).content)):this},append:function(t){return(t=Zl.from(t)).size?new Zl(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Zl.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},get size(){return this.content.length>>1}},Zl.from=function(t){if(t instanceof Zl)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Zl(e)};class ec{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let n=0;n<t.length;n++)this.size+=t[n].nodeSize}nodesBetween(t,e,n,r=0,o){for(let i=0,s=0;s<e;i++){let a=this.content[i],l=s+a.nodeSize;if(l>t&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,t-o),Math.min(a.content.size,e-o),n,r+o)}s=l}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,n,r){let o="",i=!0;return this.nodesBetween(t,e,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(t,a)-a,e-a),i=!n):s.isLeaf&&r?(o+="function"==typeof r?r(s):r,i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,n=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(n)&&(r[r.length-1]=e.withText(e.text+n.text),o=1);o<t.content.length;o++)r.push(t.content[o]);return new ec(r,this.size+t.size)}cut(t,e=this.size){if(0==t&&e==this.size)return this;let n=[],r=0;if(e>t)for(let o=0,i=0;i<e;o++){let s=this.content[o],a=i+s.nodeSize;a>t&&((i<t||a>e)&&(s=s.isText?s.cut(Math.max(0,t-i),Math.min(s.text.length,e-i)):s.cut(Math.max(0,t-i-1),Math.min(s.content.size,e-i-1))),n.push(s),r+=s.nodeSize),i=a}return new ec(n,r)}cutByIndex(t,e){return t==e?ec.empty:0==t&&e==this.content.length?this:new ec(this.content.slice(t,e))}replaceChild(t,e){let n=this.content[t];if(n==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-n.nodeSize;return r[t]=e,new ec(r,o)}addToStart(t){return new ec([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new ec(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;e<this.content.length;e++)if(!this.content[e].eq(t.content[e]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let e=this.content[t];if(!e)throw new RangeError("Index "+t+" out of range for "+this);return e}maybeChild(t){return this.content[t]||null}forEach(t){for(let e=0,n=0;e<this.content.length;e++){let r=this.content[e];t(r,n,e),n+=r.nodeSize}}findDiffStart(t,e=0){return Ql(this,t,e)}findDiffEnd(t,e=this.size,n=t.size){return tc(this,t,e,n)}findIndex(t,e=-1){if(0==t)return rc(0,t);if(t==this.size)return rc(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=t)return o==t||e>0?rc(n+1,o):rc(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((t=>t.toJSON())):null}static fromJSON(t,e){if(!e)return ec.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new ec(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return ec.empty;let e,n=0;for(let r=0;r<t.length;r++){let o=t[r];n+=o.nodeSize,r&&o.isText&&t[r-1].sameMarkup(o)?(e||(e=t.slice(0,r)),e[e.length-1]=o.withText(e[e.length-1].text+o.text)):e&&e.push(o)}return new ec(e||t,n)}static from(t){if(!t)return ec.empty;if(t instanceof ec)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new ec([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ec.empty=new ec([],0);const nc={index:0,offset:0};function rc(t,e){return nc.index=t,nc.offset=e,nc}function oc(t,e){if(t===e)return!0;if(!t||"object"!=typeof t||!e||"object"!=typeof e)return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!oc(t[n],e[n]))return!1}else{for(let n in t)if(!(n in e)||!oc(t[n],e[n]))return!1;for(let n in e)if(!(n in t))return!1}return!0}class ic{constructor(t,e){this.type=t,this.attrs=e}addToSet(t){let e,n=!1;for(let r=0;r<t.length;r++){let o=t[r];if(this.eq(o))return t;if(this.type.excludes(o.type))e||(e=t.slice(0,r));else{if(o.type.excludes(this.type))return t;!n&&o.type.rank>this.type.rank&&(e||(e=t.slice(0,r)),e.push(this),n=!0),e&&e.push(o)}}return e||(e=t.slice()),n||e.push(this),e}removeFromSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return t.slice(0,e).concat(t.slice(e+1));return t}isInSet(t){for(let e=0;e<t.length;e++)if(this.eq(t[e]))return!0;return!1}eq(t){return this==t||this.type==t.type&&oc(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Mark.fromJSON");let n=t.marks[e.type];if(!n)throw new RangeError(`There is no mark type ${e.type} in this schema`);return n.create(e.attrs)}static sameSet(t,e){if(t==e)return!0;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].eq(e[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return ic.none;if(t instanceof ic)return[t];let e=t.slice();return e.sort(((t,e)=>t.type.rank-e.type.rank)),e}}ic.none=[];class sc extends Error{}class ac{constructor(t,e,n){this.content=t,this.openStart=e,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let n=cc(this.content,t+this.openStart,e);return n&&new ac(n,this.openStart,this.openEnd)}removeBetween(t,e){return new ac(lc(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return ac.empty;let n=e.openStart||0,r=e.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new ac(ec.fromJSON(t,e.content),n,r)}static maxOpen(t,e=!0){let n=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new ac(t,n,r)}}function lc(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:a}=t.findIndex(n);if(o==e||i.isText){if(a!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(lc(i.content,e-o-1,n-o-1)))}function cc(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=cc(s.content,e-i-1,n);return a&&t.replaceChild(o,s.copy(a))}function uc(t,e,n){if(n.openStart>t.depth)throw new sc("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new sc("Inconsistent open depths");return dc(t,e,n,0)}function dc(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=dc(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||t.depth!=r||e.depth!=r){let{start:o,end:s}=function(t,e){let n=e.depth-t.openStart,r=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)r=e.node(o).copy(ec.from(r));return{start:r.resolveNoCache(t.openStart+n),end:r.resolveNoCache(r.content.size-t.openEnd-n)}}(n,t);return gc(i,vc(t,o,s,e,r))}{let r=t.parent,o=r.content;return gc(r,o.cut(0,t.parentOffset).append(n.content).append(o.cut(e.parentOffset)))}}return gc(i,yc(t,e,r))}function hc(t,e){if(!e.type.compatibleContent(t.type))throw new sc("Cannot join "+e.type.name+" onto "+t.type.name)}function fc(t,e,n){let r=t.node(n);return hc(r,e.node(n)),r}function pc(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function mc(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(pc(t.nodeAfter,r),i++));for(let a=i;a<s;a++)pc(o.child(a),r);e&&e.depth==n&&e.textOffset&&pc(e.nodeBefore,r)}function gc(t,e){if(!t.type.validContent(e))throw new sc("Invalid content for node "+t.type.name);return t.copy(e)}function vc(t,e,n,r,o){let i=t.depth>o&&fc(t,e,o+1),s=r.depth>o&&fc(n,r,o+1),a=[];return mc(null,t,o,a),i&&s&&e.index(o)==n.index(o)?(hc(i,s),pc(gc(i,vc(t,e,n,r,o+1)),a)):(i&&pc(gc(i,yc(t,e,o+1)),a),mc(e,n,o,a),s&&pc(gc(s,yc(n,r,o+1)),a)),mc(r,null,o,a),new ec(a)}function yc(t,e,n){let r=[];if(mc(null,t,n,r),t.depth>n){pc(gc(fc(t,e,n+1),yc(t,e,n+1)),r)}return mc(e,null,n,r),new ec(r)}ac.empty=new ac(ec.empty,0,0);class bc{constructor(t,e,n){this.pos=t,this.path=e,this.parentOffset=n,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=t.child(e);return n?t.child(e).cut(n):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let n=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o<t;o++)r+=n.child(o).nodeSize;return r}marks(){let t=this.parent,e=this.index();if(0==t.content.size)return ic.none;if(this.textOffset)return t.child(e).marks;let n=t.maybeChild(e-1),r=t.maybeChild(e);if(!n){let t=n;n=r,r=t}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(t){let e=this.parent.maybeChild(this.index());if(!e||!e.isInline)return null;let n=e.marks,r=t.parent.maybeChild(t.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(t){for(let e=this.depth;e>0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos<this.pos)return t.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);n>=0;n--)if(t.pos<=this.end(n)&&(!e||e(this.node(n))))return new kc(this,t,n);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let e=1;e<=this.depth;e++)t+=(t?"/":"")+this.node(e).type.name+"_"+this.index(e-1);return t+":"+this.parentOffset}static resolve(t,e){if(!(e>=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let n=[],r=0,o=e;for(let i=t;;){let{index:t,offset:e}=i.content.findIndex(o),s=o-e;if(n.push(i,t,r+e),!s)break;if(i=i.child(t),i.isText)break;o=s-1,r+=e+1}return new bc(e,n,o)}static resolveCached(t,e){for(let r=0;r<wc.length;r++){let n=wc[r];if(n.pos==e&&n.doc==t)return n}let n=wc[xc]=bc.resolve(t,e);return xc=(xc+1)%Sc,n}}let wc=[],xc=0,Sc=12;class kc{constructor(t,e,n){this.$from=t,this.$to=e,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const _c=Object.create(null);class Oc{constructor(t,e,n,r=ic.none){this.type=t,this.attrs=e,this.marks=r,this.content=n||ec.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,e,n,r=0){this.content.nodesBetween(t,e,n,r,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.textBetween(0,this.content.size,"")}textBetween(t,e,n,r){return this.content.textBetween(t,e,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,e,n){return this.type==t&&oc(this.attrs,e||t.defaultAttrs||_c)&&ic.sameSet(this.marks,n||ic.none)}copy(t=null){return t==this.content?this:new Oc(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Oc(this.type,this.attrs,this.content,t)}cut(t,e=this.content.size){return 0==t&&e==this.content.size?this:this.copy(this.content.cut(t,e))}slice(t,e=this.content.size,n=!1){if(t==e)return ac.empty;let r=this.resolve(t),o=this.resolve(e),i=n?0:r.sharedDepth(e),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new ac(a,r.depth-i,o.depth-i)}replace(t,e,n){return uc(this.resolve(t),this.resolve(e),n)}nodeAt(t){for(let e=this;;){let{index:n,offset:r}=e.content.findIndex(t);if(e=e.maybeChild(n),!e)return null;if(r==t||e.isText)return e;t-=r+1}}childAfter(t){let{index:e,offset:n}=this.content.findIndex(t);return{node:this.content.maybeChild(e),index:e,offset:n}}childBefore(t){if(0==t)return{node:null,index:0,offset:0};let{index:e,offset:n}=this.content.findIndex(t);if(n<t)return{node:this.content.child(e),index:e,offset:n};let r=this.content.child(e-1);return{node:r,index:e-1,offset:n-r.nodeSize}}resolve(t){return bc.resolveCached(this,t)}resolveNoCache(t){return bc.resolve(this,t)}rangeHasMark(t,e,n){let r=!1;return e>t&&this.nodesBetween(t,e,(t=>(n.isInSet(t.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Mc(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,n=ec.empty,r=0,o=n.childCount){let i=this.contentMatchAt(t).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,e);if(!s||!s.validEnd)return!1;for(let a=r;a<o;a++)if(!this.type.allowsMarks(n.child(a).marks))return!1;return!0}canReplaceWith(t,e,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(t).matchType(n),i=o&&o.matchFragment(this.content,e);return!!i&&i.validEnd}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let t=ic.none;for(let e=0;e<this.marks.length;e++)t=this.marks[e].addToSet(t);if(!ic.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((t=>t.type.name))}`);this.content.forEach((t=>t.check()))}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map((t=>t.toJSON()))),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,n)}let r=ec.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,n)}}Oc.prototype.text=void 0;class Cc extends Oc{constructor(t,e,n,r){if(super(t,e,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Mc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,e){return this.text.slice(t,e)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new Cc(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new Cc(this.type,this.attrs,t,this.marks)}cut(t=0,e=this.text.length){return 0==t&&e==this.text.length?this:this.withText(this.text.slice(t,e))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Mc(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Dc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let n=new Tc(t,e);if(null==n.next)return Dc.empty;let r=$c(n);n.next&&n.err("Unexpected trailing text");let o=function(t){let e=Object.create(null);return n(Rc(t,0));function n(r){let o=[];r.forEach((e=>{t[e].forEach((({term:e,to:n})=>{if(!e)return;let r;for(let t=0;t<o.length;t++)o[t][0]==e&&(r=o[t][1]);Rc(t,n).forEach((t=>{r||o.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)}))}))}));let i=e[r.join(",")]=new Dc(r.indexOf(t.length-1)>-1);for(let t=0;t<o.length;t++){let r=o[t][1].sort(Ic);i.next.push({type:o[t][0],next:e[r.join(",")]||n(r)})}return i}}(function(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(t,n,r){let o={term:r,to:n};return e[t].push(o),o}function o(t,e){t.forEach((t=>t.to=e))}function i(t,e){if("choice"==t.type)return t.exprs.reduce(((t,n)=>t.concat(i(n,e))),[]);if("seq"!=t.type){if("star"==t.type){let s=n();return r(e,s),o(i(t.expr,s),s),[r(s)]}if("plus"==t.type){let s=n();return o(i(t.expr,e),s),o(i(t.expr,s),s),[r(s)]}if("opt"==t.type)return[r(e)].concat(i(t.expr,e));if("range"==t.type){let s=e;for(let e=0;e<t.min;e++){let e=n();o(i(t.expr,s),e),s=e}if(-1==t.max)o(i(t.expr,s),s);else for(let e=t.min;e<t.max;e++){let e=n();r(s,e),o(i(t.expr,s),e),s=e}return[r(s)]}if("name"==t.type)return[r(e,void 0,t.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(t.exprs[r],e);if(r==t.exprs.length-1)return s;o(s,e=n())}}}(r));return function(t,e){for(let n=0,r=[t];n<r.length;n++){let t=r[n],o=!t.validEnd,i=[];for(let e=0;e<t.next.length;e++){let{type:n,next:s}=t.next[e];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(t){for(let e=0;e<this.next.length;e++)if(this.next[e].type==t)return this.next[e].next;return null}matchFragment(t,e=0,n=t.childCount){let r=this;for(let o=e;r&&o<n;o++)r=r.matchType(t.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:e}=this.next[t];if(!e.isText&&!e.hasRequiredAttrs())return e}return null}compatible(t){for(let e=0;e<this.next.length;e++)for(let n=0;n<t.next.length;n++)if(this.next[e].type==t.next[n].type)return!0;return!1}fillBefore(t,e=!1,n=0){let r=[this];return function o(i,s){let a=i.matchFragment(t,n);if(a&&(!e||a.validEnd))return ec.from(s.map((t=>t.createAndFill())));for(let t=0;t<i.next.length;t++){let{type:e,next:n}=i.next[t];if(!e.isText&&!e.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let t=o(n,s.concat(e));if(t)return t}}return null}(this,[])}findWrapping(t){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==t)return this.wrapCache[n+1];let e=this.computeWrapping(t);return this.wrapCache.push(t,e),e}computeWrapping(t){let e=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(t)){let t=[];for(let e=r;e.type;e=e.via)t.push(e.type);return t.reverse()}for(let t=0;t<o.next.length;t++){let{type:i,next:s}=o.next[t];i.isLeaf||i.hasRequiredAttrs()||i.name in e||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),e[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(n){t.push(n);for(let r=0;r<n.next.length;r++)-1==t.indexOf(n.next[r].next)&&e(n.next[r].next)}(this),t.map(((e,n)=>{let r=n+(e.validEnd?"*":" ")+" ";for(let o=0;o<e.next.length;o++)r+=(o?", ":"")+e.next[o].type.name+"->"+t.indexOf(e.next[o].next);return r})).join("\n")}}Dc.empty=new Dc(!0);class Tc{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function $c(t){let e=[];do{e.push(Ec(t))}while(t.eat("|"));return 1==e.length?e[0]:{type:"choice",exprs:e}}function Ec(t){let e=[];do{e.push(Nc(t))}while(t.next&&")"!=t.next&&"|"!=t.next);return 1==e.length?e[0]:{type:"seq",exprs:e}}function Nc(t){let e=function(t){if(t.eat("(")){let e=$c(t);return t.eat(")")||t.err("Missing closing paren"),e}if(!/\W/.test(t.next)){let e=function(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let t=n[i];t.groups.indexOf(e)>-1&&o.push(t)}0==o.length&&t.err("No node type or group '"+e+"' found");return o}(t,t.next).map((e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e})));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}t.err("Unexpected token '"+t.next+"'")}(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else{if(!t.eat("{"))break;e=Pc(t,e)}return e}function Ac(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Pc(t,e){let n=Ac(t),r=n;return t.eat(",")&&(r="}"!=t.next?Ac(t):-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Ic(t,e){return e-t}function Rc(t,e){let n=[];return function e(r){let o=t[r];if(1==o.length&&!o[0].term)return e(o[0].to);n.push(r);for(let t=0;t<o.length;t++){let{term:r,to:i}=o[t];r||-1!=n.indexOf(i)||e(i)}}(e),n.sort(Ic)}function zc(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function jc(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(void 0===o){let e=t[r];if(!e.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=e.default}n[r]=o}return n}function Fc(t){let e=Object.create(null);if(t)for(let n in t)e[n]=new Bc(t[n]);return e}class Lc{constructor(t,e,n){this.name=t,this.schema=e,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Fc(n.attrs),this.defaultAttrs=zc(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==t),this.isText="text"==t}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Dc.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:jc(this.attrs,t)}create(t=null,e,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Oc(this,this.computeAttrs(t),ec.from(e),ic.setFrom(n))}createChecked(t=null,e,n){if(e=ec.from(e),!this.validContent(e))throw new RangeError("Invalid content for node "+this.name);return new Oc(this,this.computeAttrs(t),e,ic.setFrom(n))}createAndFill(t=null,e,n){if(t=this.computeAttrs(t),(e=ec.from(e)).size){let t=this.contentMatch.fillBefore(e);if(!t)return null;e=t.append(e)}let r=this.contentMatch.matchFragment(e),o=r&&r.fillBefore(ec.empty,!0);return o?new Oc(this,t,e.append(o),ic.setFrom(n)):null}validContent(t){let e=this.contentMatch.matchFragment(t);if(!e||!e.validEnd)return!1;for(let n=0;n<t.childCount;n++)if(!this.allowsMarks(t.child(n).marks))return!1;return!0}allowsMarkType(t){return null==this.markSet||this.markSet.indexOf(t)>-1}allowsMarks(t){if(null==this.markSet)return!0;for(let e=0;e<t.length;e++)if(!this.allowsMarkType(t[e].type))return!1;return!0}allowedMarks(t){if(null==this.markSet)return t;let e;for(let n=0;n<t.length;n++)this.allowsMarkType(t[n].type)?e&&e.push(t[n]):e||(e=t.slice(0,n));return e?e.length?e:ic.none:t}static compile(t,e){let n=Object.create(null);t.forEach(((t,r)=>n[t]=new Lc(t,e,r)));let r=e.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let o in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Bc{constructor(t){this.hasDefault=Object.prototype.hasOwnProperty.call(t,"default"),this.default=t.default}get isRequired(){return!this.hasDefault}}class Vc{constructor(t,e,n,r){this.name=t,this.rank=e,this.schema=n,this.spec=r,this.attrs=Fc(r.attrs),this.excluded=null;let o=zc(this.attrs);this.instance=o?new ic(this,o):null}create(t=null){return!t&&this.instance?this.instance:new ic(this,jc(this.attrs,t))}static compile(t,e){let n=Object.create(null),r=0;return t.forEach(((t,o)=>n[t]=new Vc(t,r++,e,o))),n}removeFromSet(t){for(var e=0;e<t.length;e++)t[e].type==this&&(t=t.slice(0,e).concat(t.slice(e+1)),e--);return t}isInSet(t){for(let e=0;e<t.length;e++)if(t[e].type==this)return t[e]}excludes(t){return this.excluded.indexOf(t)>-1}}class Wc{constructor(t){this.cached=Object.create(null),this.spec={nodes:Zl.from(t.nodes),marks:Zl.from(t.marks||{}),topNode:t.topNode},this.nodes=Lc.compile(this.spec.nodes,this),this.marks=Vc.compile(this.spec.marks,this);let e=Object.create(null);for(let n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");let t=this.nodes[n],r=t.spec.content||"",o=t.spec.marks;t.contentMatch=e[r]||(e[r]=Dc.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.markSet="_"==o?null:o?qc(this,o.split(" ")):""!=o&&t.inlineContent?null:[]}for(let n in this.marks){let t=this.marks[n],e=t.spec.excludes;t.excluded=null==e?[t]:""==e?[]:qc(this,e.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,e=null,n,r){if("string"==typeof t)t=this.nodeType(t);else{if(!(t instanceof Lc))throw new RangeError("Invalid node type: "+t);if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}return t.createChecked(e,n,r)}text(t,e){let n=this.nodes.text;return new Cc(n,n.defaultAttrs,t,ic.setFrom(e))}mark(t,e){return"string"==typeof t&&(t=this.marks[t]),t.create(e)}nodeFromJSON(t){return Oc.fromJSON(this,t)}markFromJSON(t){return ic.fromJSON(this,t)}nodeType(t){let e=this.nodes[t];if(!e)throw new RangeError("Unknown node type: "+t);return e}}function qc(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let e in t.marks){let r=t.marks[e];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}class Hc{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach((t=>{t.tag?this.tags.push(t):t.style&&this.styles.push(t)})),this.normalizeLists=!this.tags.some((e=>{if(!/^(ul|ol)\b/.test(e.tag)||!e.node)return!1;let n=t.nodes[e.node];return n.contentMatch.matchType(n)}))}parse(t,e={}){let n=new Xc(this,e,!1);return n.addAll(t,e.from,e.to),n.finish()}parseSlice(t,e={}){let n=new Xc(this,e,!0);return n.addAll(t,e.from,e.to),ac.maxOpen(n.finish())}matchTag(t,e,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Zc(t,n.tag)&&(void 0===n.namespace||t.namespaceURI==n.namespace)&&(!n.context||e.matchesContext(n.context))){if(n.getAttrs){let e=n.getAttrs(t);if(!1===e)continue;n.attrs=e||void 0}return n}}}matchStyle(t,e,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(t)||r.context&&!n.matchesContext(r.context)||i.length>t.length&&(61!=i.charCodeAt(t.length)||i.slice(t.length+1)!=e))){if(r.getAttrs){let t=r.getAttrs(e);if(!1===t)continue;r.attrs=t||void 0}return r}}}static schemaRules(t){let e=[];function n(t){let n=null==t.priority?50:t.priority,r=0;for(;r<e.length;r++){let t=e[r];if((null==t.priority?50:t.priority)<n)break}e.splice(r,0,t)}for(let r in t.marks){let e=t.marks[r].spec.parseDOM;e&&e.forEach((t=>{n(t=Qc(t)),t.mark=r}))}for(let r in t.nodes){let e=t.nodes[r].spec.parseDOM;e&&e.forEach((t=>{n(t=Qc(t)),t.node=r}))}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new Hc(t,Hc.schemaRules(t)))}}const Jc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Kc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Yc={ol:!0,ul:!0};function Uc(t,e,n){return null!=e?(e?1:0)|("full"===e?2:0):t&&"pre"==t.whitespace?3:-5&n}class Gc{constructor(t,e,n,r,o,i,s){this.type=t,this.attrs=e,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=ic.none,this.stashMarks=[],this.match=i||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(ec.from(t));if(!e){let e,n=this.type.contentMatch;return(e=n.findWrapping(t.type))?(this.match=n,e):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let t,e=this.content[this.content.length-1];if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let e=ec.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(ec.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,n=this.pendingMarks;e<n.length;e++){let r=n[e];(this.type?this.type.allowsMarkType(r.type):tu(r.type,t))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Jc.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Xc{constructor(t,e,n){this.parser=t,this.options=e,this.isOpen=n,this.open=0;let r,o=e.topNode,i=Uc(null,e.preserveWhitespace,0)|(n?4:0);r=o?new Gc(o.type,o.attrs,ic.none,ic.none,!0,e.topMatch||o.type.contentMatch,i):new Gc(n?null:t.schema.topNodeType,null,ic.none,ic.none,!0,null,i),this.nodes=[r],this.find=e.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t){if(3==t.nodeType)this.addTextNode(t);else if(1==t.nodeType){let e=t.getAttribute("style"),n=e?this.readStyles(function(t){let e,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;e=n.exec(t);)r.push(e[1],e[2].trim());return r}(e)):null,r=this.top;if(null!=n)for(let t=0;t<n.length;t++)this.addPendingMark(n[t]);if(this.addElement(t),null!=n)for(let t=0;t<n.length;t++)this.removePendingMark(n[t],r)}}addTextNode(t){let e=t.nodeValue,n=this.top;if(2&n.options||n.inlineContext(t)||/[^ \t\r\n\u000c]/.test(e)){if(1&n.options)e=2&n.options?e.replace(/\r\n?/g,"\n"):e.replace(/\r?\n|\r/g," ");else if(e=e.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(e)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=t.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(e=e.slice(1))}e&&this.insertNode(this.parser.schema.text(e)),this.findInText(t)}else this.findInside(t)}addElement(t,e){let n,r=t.nodeName.toLowerCase();Yc.hasOwnProperty(r)&&this.parser.normalizeLists&&function(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let t=1==e.nodeType?e.nodeName.toLowerCase():null;t&&Yc.hasOwnProperty(t)&&n?(n.appendChild(e),e=n):"li"==t?n=e:t&&(n=null)}}(t);let o=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(n=this.parser.matchTag(t,this,e));if(o?o.ignore:Kc.hasOwnProperty(r))this.findInside(t),this.ignoreFallback(t);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(t=o.skip);let e,n=this.top,i=this.needsBlock;if(Jc.hasOwnProperty(r))e=!0,n.type||(this.needsBlock=!0);else if(!t.firstChild)return void this.leafFallback(t);this.addAll(t),e&&this.sync(n),this.needsBlock=i}else this.addElementByRule(t,o,!1===o.consuming?n:void 0)}leafFallback(t){"BR"==t.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode("\n"))}ignoreFallback(t){"BR"!=t.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(t){let e=ic.none;t:for(let n=0;n<t.length;n+=2)for(let r;;){let o=this.parser.matchStyle(t[n],t[n+1],this,r);if(!o)continue t;if(o.ignore)return null;if(e=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(e),!1!==o.consuming)break;r=o}return e}addElementByRule(t,e,n){let r,o,i;if(e.node)o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace);else{i=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(i)}let s=this.top;if(o&&o.isLeaf)this.findInside(t);else if(n)this.addElement(t,n);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach((t=>this.insertNode(t)));else{let n=t;"string"==typeof e.contentElement?n=t.querySelector(e.contentElement):"function"==typeof e.contentElement?n=e.contentElement(t):e.contentElement&&(n=e.contentElement),this.findAround(t,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(t,e,n){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,i=null==n?null:t.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(t);if(i&&(!e||e.length>i.length)&&(e=i,n=o,!i.length))break;if(o.solid)break}if(!e)return!1;this.sync(n);for(let r=0;r<e.length;r++)this.enterInner(e[r],null,!1);return!0}insertNode(t){if(t.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(t)){this.closeExtra();let e=this.top;e.applyPending(t.type),e.match&&(e.match=e.match.matchType(t.type));let n=e.activeMarks;for(let r=0;r<t.marks.length;r++)e.type&&!e.type.allowsMarkType(t.marks[r].type)||(n=t.marks[r].addToSet(n));return e.content.push(t.mark(n)),!0}return!1}enter(t,e,n){let r=this.findPlace(t.create(e));return r&&this.enterInner(t,e,!0,n),r}enterInner(t,e=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(t),o.match=o.match&&o.match.matchType(t);let i=Uc(t,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new Gc(t,e,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(t=!1){let e=this.nodes.length-1;if(e>this.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let n=this.nodes[e].content;for(let e=n.length-1;e>=0;e--)t+=n[e].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&this.find[n].offset==e&&(this.find[n].pos=this.currentPos)}findInside(t){if(this.find)for(let e=0;e<this.find.length;e++)null==this.find[e].pos&&1==t.nodeType&&t.contains(this.find[e].node)&&(this.find[e].pos=this.currentPos)}findAround(t,e,n){if(t!=e&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==t.nodeType&&t.contains(this.find[r].node)){e.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(t){if(this.find)for(let e=0;e<this.find.length;e++)this.find[e].node==t&&(this.find[e].pos=this.currentPos-(t.nodeValue.length-this.find[e].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(t,s)=>{for(;t>=0;t--){let a=e[t];if(""==a){if(t==e.length-1||0==t)continue;for(;s>=o;s--)if(i(t-1,s))return!0;return!1}{let t=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!t||t.name!=a&&-1==t.groups.indexOf(a))return!1;s--}}return!0};return i(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let n=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(t){let e=function(t,e){for(let n=0;n<e.length;n++)if(t.eq(e[n]))return e[n]}(t,this.top.pendingMarks);e&&this.top.stashMarks.push(e),this.top.pendingMarks=t.addToSet(this.top.pendingMarks)}removePendingMark(t,e){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let e=r.popFromStashMark(t);e&&r.type&&r.type.allowsMarkType(e.type)&&(r.activeMarks=e.addToSet(r.activeMarks))}if(r==e)break}}}function Zc(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Qc(t){let e={};for(let n in t)e[n]=t[n];return e}function tu(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=t=>{i.push(t);for(let n=0;n<t.edgeCount;n++){let{type:r,next:o}=t.edge(n);if(r==e)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class eu{constructor(t,e){this.nodes=t,this.marks=e}serializeFragment(t,e={},n){n||(n=ru(e).createDocumentFragment());let r=n,o=[];return t.forEach((t=>{if(o.length||t.marks.length){let n=0,i=0;for(;n<o.length&&i<t.marks.length;){let e=t.marks[i];if(this.marks[e.type.name]){if(!e.eq(o[n][0])||!1===e.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<t.marks.length;){let n=t.marks[i++],s=this.serializeMark(n,t.isInline,e);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(t,e))})),n}serializeNodeInner(t,e){let{dom:n,contentDOM:r}=eu.renderSpec(ru(e),this.nodes[t.type.name](t));if(r){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,e,r)}return n}serializeNode(t,e={}){let n=this.serializeNodeInner(t,e);for(let r=t.marks.length-1;r>=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(t,e,n={}){let r=this.marks[t.type.name];return r&&eu.renderSpec(ru(n),r(t,e))}static renderSpec(t,e,n=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r,o=e[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?t.createElementNS(n,o):t.createElement(o),a=e[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let t in a)if(null!=a[t]){let e=t.indexOf(" ");e>0?s.setAttributeNS(t.slice(0,e),t.slice(e+1),a[t]):s.setAttribute(t,a[t])}}for(let c=l;c<e.length;c++){let o=e[c];if(0===o){if(c<e.length-1||c>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:e,contentDOM:i}=eu.renderSpec(t,o,n);if(s.appendChild(e),i){if(r)throw new RangeError("Multiple content holes");r=i}}}return{dom:s,contentDOM:r}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new eu(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=nu(t.nodes);return e.text||(e.text=t=>t.text),e}static marksFromSchema(t){return nu(t.marks)}}function nu(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function ru(t){return t.document||window.document}const ou=Math.pow(2,16);function iu(t){return 65535&t}class su{constructor(t,e=!1,n=null){this.pos=t,this.deleted=e,this.recover=n}}class au{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&au.empty)return au.empty}recover(t){let e=0,n=iu(t);if(!this.inverted)for(let r=0;r<n;r++)e+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+e+function(t){return(t-(65535&t))/ou}(t)}mapResult(t,e=1){return this._map(t,e,!1)}map(t,e=1){return this._map(t,e,!0)}_map(t,e,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>t)break;let l=this.ranges[s+o],c=this.ranges[s+i],u=a+l;if(t<=u){let o=a+r+((l?t==a?-1:t==u?1:e:e)<0?0:c);if(n)return o;let i=t==(e<0?a:u)?null:s/3+(t-a)*ou;return new su(o,e<0?t!=a:t!=u,i)}r+=c-l}return n?t+r:new su(t+r)}touches(t,e){let n=0,r=iu(e),o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let e=this.ranges[s]-(this.inverted?n:0);if(e>t)break;let a=this.ranges[s+o];if(t<=e+a&&s==3*r)return!0;n+=this.ranges[s+i]-a}return!1}forEach(t){let e=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+e],c=this.ranges[r+n];t(s,s+l,a,a+c),o+=c-l}}invert(){return new au(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return 0==t?au.empty:new au(t<0?[0,-t,0]:[0,0,t])}}au.empty=new au([]);class lu{constructor(t=[],e,n=0,r=t.length){this.maps=t,this.mirror=e,this.from=n,this.to=r}slice(t=0,e=this.maps.length){return new lu(this.maps,this.mirror,t,e)}copy(){return new lu(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(t,e){this.to=this.maps.push(t),null!=e&&this.setMirror(this.maps.length-1,e)}appendMapping(t){for(let e=0,n=this.maps.length;e<t.maps.length;e++){let r=t.getMirror(e);this.appendMap(t.maps[e],null!=r&&r<e?n+r:void 0)}}getMirror(t){if(this.mirror)for(let e=0;e<this.mirror.length;e++)if(this.mirror[e]==t)return this.mirror[e+(e%2?-1:1)]}setMirror(t,e){this.mirror||(this.mirror=[]),this.mirror.push(t,e)}appendMappingInverted(t){for(let e=t.maps.length-1,n=this.maps.length+t.maps.length;e>=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?n-r-1:void 0)}}invert(){let t=new lu;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let n=this.from;n<this.to;n++)t=this.maps[n].map(t,e);return t}mapResult(t,e=1){return this._map(t,e,!1)}_map(t,e,n){let r=!1;for(let o=this.from;o<this.to;o++){let n=this.maps[o].mapResult(t,e);if(null!=n.recover){let e=this.getMirror(o);if(null!=e&&e>o&&e<this.to){o=e,t=this.maps[e].recover(n.recover);continue}}n.deleted&&(r=!0),t=n.pos}return n?t:new su(t,r)}}const cu=Object.create(null);class uu{getMap(){return au.empty}merge(t){return null}static fromJSON(t,e){if(!e||!e.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=cu[e.stepType];if(!n)throw new RangeError(`No step type ${e.stepType} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in cu)throw new RangeError("Duplicate use of step JSON ID "+t);return cu[t]=e,e.prototype.jsonID=t,e}}class du{constructor(t,e){this.doc=t,this.failed=e}static ok(t){return new du(t,null)}static fail(t){return new du(null,t)}static fromReplace(t,e,n,r){try{return du.ok(t.replace(e,n,r))}catch(Fy){if(Fy instanceof sc)return du.fail(Fy.message);throw Fy}}}function hu(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(hu(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return ec.fromArray(r)}class fu extends uu{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=t.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new ac(hu(e.content,((t,e)=>t.isAtom&&e.type.allowsMarkType(this.mark.type)?t.mark(this.mark.addToSet(t.marks)):t),r),e.openStart,e.openEnd);return du.fromReplace(t,this.from,this.to,o)}invert(){return new pu(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new fu(e.pos,n.pos,this.mark)}merge(t){return t instanceof fu&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new fu(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new fu(e.from,e.to,t.markFromJSON(e.mark))}}uu.jsonID("addMark",fu);class pu extends uu{constructor(t,e,n){super(),this.from=t,this.to=e,this.mark=n}apply(t){let e=t.slice(this.from,this.to),n=new ac(hu(e.content,(t=>t.mark(this.mark.removeFromSet(t.marks))),t),e.openStart,e.openEnd);return du.fromReplace(t,this.from,this.to,n)}invert(){return new fu(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted||e.pos>=n.pos?null:new pu(e.pos,n.pos,this.mark)}merge(t){return t instanceof pu&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new pu(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new pu(e.from,e.to,t.markFromJSON(e.mark))}}uu.jsonID("removeMark",pu);class mu extends uu{constructor(t,e,n,r=!1){super(),this.from=t,this.to=e,this.slice=n,this.structure=r}apply(t){return this.structure&&vu(t,this.from,this.to)?du.fail("Structure replace would overwrite content"):du.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new au([this.from,this.to-this.from,this.slice.size])}invert(t){return new mu(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1);return e.deleted&&n.deleted?null:new mu(e.pos,Math.max(e.pos,n.pos),this.slice)}merge(t){if(!(t instanceof mu)||t.structure||this.structure)return null;if(this.from+this.slice.size!=t.from||this.slice.openEnd||t.slice.openStart){if(t.to!=this.from||this.slice.openStart||t.slice.openEnd)return null;{let e=this.slice.size+t.slice.size==0?ac.empty:new ac(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new mu(t.from,this.to,e,this.structure)}}{let e=this.slice.size+t.slice.size==0?ac.empty:new ac(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new mu(this.from,this.to+(t.to-t.from),e,this.structure)}}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new mu(e.from,e.to,ac.fromJSON(t,e.slice),!!e.structure)}}uu.jsonID("replace",mu);class gu extends uu{constructor(t,e,n,r,o,i,s=!1){super(),this.from=t,this.to=e,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(t){if(this.structure&&(vu(t,this.from,this.gapFrom)||vu(t,this.gapTo,this.to)))return du.fail("Structure gap-replace would overwrite content");let e=t.slice(this.gapFrom,this.gapTo);if(e.openStart||e.openEnd)return du.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,e.content);return n?du.fromReplace(t,this.from,this.to,n):du.fail("Content does not fit in gap")}getMap(){return new au([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let e=this.gapTo-this.gapFrom;return new gu(this.from,this.from+this.slice.size+e,this.from+this.insert,this.from+this.insert+e,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let e=t.mapResult(this.from,1),n=t.mapResult(this.to,-1),r=t.map(this.gapFrom,-1),o=t.map(this.gapTo,1);return e.deleted&&n.deleted||r<e.pos||o>n.pos?null:new gu(e.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new gu(e.from,e.to,e.gapFrom,e.gapTo,ac.fromJSON(t,e.slice),e.insert,!!e.structure)}}function vu(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let t=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!t||t.isLeaf)return!0;t=t.firstChild,o--}}return!1}function yu(t,e,n){return(0==e||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function bu(t){let e=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let n=t.depth;;--n){let r=t.$from.node(n),o=t.$from.index(n),i=t.$to.indexAfter(n);if(n<t.depth&&r.canReplace(o,i,e))return n;if(0==n||r.type.spec.isolating||!yu(r,o,i))break}return null}function wu(t,e,n=null,r=t){let o=function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}(t,e),i=o&&function(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let l=r;a&&l<o;l++)a=a.matchType(n.child(l).type);return a&&a.validEnd?s:null}(r,e);return i?o.map(xu).concat({type:e,attrs:n}).concat(i.map(xu)):null}function xu(t){return{type:t,attrs:null}}function Su(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>i;c--,u--){let t=o.node(c),e=o.index(c);if(t.type.spec.isolating)return!1;let n=t.content.cutByIndex(e,t.childCount),i=r&&r[u]||t;if(i!=t&&(n=n.replaceChild(0,i.type.create(i.attrs))),!t.canReplace(e+1,t.childCount)||!i.type.validContent(n))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function ku(t,e){let n=t.resolve(e),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function _u(t,e,n=e,r=ac.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return Ou(o,i,r)?new mu(e,n,r):new Cu(o,i,r).fit()}function Ou(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}uu.jsonID("replaceAround",gu);class Cu{constructor(t,e,n){this.$from=t,this.$to=e,this.unplaced=n,this.frontier=[],this.placed=ec.empty;for(let r=0;r<=t.depth;r++){let e=t.node(r);this.frontier.push({type:e.type,match:e.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=ec.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let t=this.findFittable();t?this.placeNodes(t):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(t<0?this.$to:n.doc.resolve(t));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new ac(o,i,s);return t>-1?new gu(n.pos,t,this.$to.pos,this.$to.end(),a,e):a.size||n.pos!=this.$to.pos?new mu(n.pos,r.pos,a):null}findFittable(){for(let t=1;t<=2;t++)for(let e=this.unplaced.openStart;e>=0;e--){let n,r=null;e?(r=Tu(this.unplaced.content,e-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let i=this.depth;i>=0;i--){let n,{type:s,match:a}=this.frontier[i],l=null;if(1==t&&(o?a.matchType(o.type)||(l=a.fillBefore(ec.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:e,frontierDepth:i,parent:r,inject:l};if(2==t&&o&&(n=a.findWrapping(o.type)))return{sliceDepth:e,frontierDepth:i,parent:r,wrap:n};if(r&&a.matchType(r.type))break}}}openMore(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Tu(t,e);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new ac(t,e+1,Math.max(n,r.size+e>=t.size-n?e+1:0)),!0)}dropNode(){let{content:t,openStart:e,openEnd:n}=this.unplaced,r=Tu(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new ac(Mu(t,e-1,1),e-1,o?e-1:n)}else this.unplaced=new ac(Mu(t,e,1),e,n)}placeNodes({sliceDepth:t,frontierDepth:e,parent:n,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let p=0;p<o.length;p++)this.openFrontierNode(o[p]);let i=this.unplaced,s=n?n.content:i.content,a=i.openStart-t,l=0,c=[],{match:u,type:d}=this.frontier[e];if(r){for(let t=0;t<r.childCount;t++)c.push(r.child(t));u=u.matchFragment(r)}let h=s.size+t-(i.content.size-i.openEnd);for(;l<s.childCount;){let t=s.child(l),e=u.matchType(t.type);if(!e)break;l++,(l>1||0==a||t.content.size)&&(u=e,c.push($u(t.mark(d.allowedMarks(t.marks)),1==l?a:0,l==s.childCount?h:-1)))}let f=l==s.childCount;f||(h=-1),this.placed=Du(this.placed,e,ec.from(c)),this.frontier[e].match=u,f&&h<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let p=0,m=s;p<h;p++){let t=m.lastChild;this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),m=t.content}this.unplaced=f?0==t?ac.empty:new ac(Mu(i.content,t-1,1),t-1,h<0?i.openEnd:t-1):new ac(Mu(i.content,t,l),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,e=this.frontier[this.depth];if(!e.type.isTextblock||!Eu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(t){t:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:n,type:r}=this.frontier[e],o=e<t.depth&&t.end(e+1)==t.pos+(t.depth-(e+1)),i=Eu(t,e,r,n,o);if(i){for(let n=e-1;n>=0;n--){let{match:e,type:r}=this.frontier[n],o=Eu(t,n,r,e,!0);if(!o||o.childCount)continue t}return{depth:e,fit:i,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Du(this.placed,e.depth,e.fit)),t=e.move;for(let n=e.depth+1;n<=t.depth;n++){let e=t.node(n),r=e.type.contentMatch.fillBefore(e.content,!0,t.index(n));this.openFrontierNode(e.type,e.attrs,r)}return t}openFrontierNode(t,e=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Du(this.placed,this.depth,ec.from(t.create(e,n))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(ec.empty,!0);t.childCount&&(this.placed=Du(this.placed,this.frontier.length,t))}}function Mu(t,e,n){return 0==e?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Mu(t.firstChild.content,e-1,n)))}function Du(t,e,n){return 0==e?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Du(t.lastChild.content,e-1,n)))}function Tu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function $u(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,$u(r.firstChild,e-1,1==r.childCount?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ec.empty,!0)))),t.copy(r)}function Eu(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function Nu(t){return t.spec.defining||t.spec.definingForContent}function Au(t,e,n,r,o){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(Au(o.content,e+1,n,r,o)))}if(e>r){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(ec.empty,!0))}return t}function Pu(t,e){let n=[];for(let r=Math.min(t.depth,e.depth);r>=0;r--){let o=t.start(r);if(o<t.pos-(t.depth-r)||e.end(r)>e.pos+(e.depth-r)||t.node(r).type.spec.isolating||e.node(r).type.spec.isolating)break;(o==e.start(r)||r==t.depth&&r==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&r&&e.start(r-1)==o-1)&&n.push(r)}return n}let Iu=class extends Error{};Iu=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},(Iu.prototype=Object.create(Error.prototype)).constructor=Iu,Iu.prototype.name="TransformError";const Ru=Object.create(null);class zu{constructor(t,e,n){this.$anchor=t,this.$head=e,this.ranges=n||[new ju(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e<t.length;e++)if(t[e].$from.pos!=t[e].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,e=ac.empty){let n=e.content.lastChild,r=null;for(let s=0;s<e.openEnd;s++)r=n,n=n.lastChild;let o=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],c=t.mapping.slice(o);t.replaceRange(c.map(a.pos),c.map(l.pos),s?ac.empty:e),0==s&&Yu(t,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(t,e){let n=t.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=t.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?t.deleteRange(l,c):(t.replaceRangeWith(l,c,e),Yu(t,n,e.isInline?-1:1))}}static findFrom(t,e,n=!1){let r=t.parent.inlineContent?new Bu(t):Ku(t.node(0),t.parent,t.pos,t.index(),e,n);if(r)return r;for(let o=t.depth-1;o>=0;o--){let r=e<0?Ku(t.node(0),t.node(o),t.before(o+1),t.index(o),e,n):Ku(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,n);if(r)return r}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Hu(t.node(0))}static atStart(t){return Ku(t,t,0,0,1)||new Hu(t)}static atEnd(t){return Ku(t,t,t.content.size,t.childCount,-1)||new Hu(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=Ru[e.type];if(!n)throw new RangeError(`No selection type ${e.type} defined`);return n.fromJSON(t,e)}static jsonID(t,e){if(t in Ru)throw new RangeError("Duplicate use of selection JSON ID "+t);return Ru[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Bu.between(this.$anchor,this.$head).getBookmark()}}zu.prototype.visible=!0;class ju{constructor(t,e){this.$from=t,this.$to=e}}let Fu=!1;function Lu(t){Fu||t.parent.inlineContent||(Fu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Bu extends zu{constructor(t,e=t){Lu(t),Lu(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let n=t.resolve(e.map(this.head));if(!n.parent.inlineContent)return zu.near(n);let r=t.resolve(e.map(this.anchor));return new Bu(r.parent.inlineContent?r:n,n)}replace(t,e=ac.empty){if(super.replace(t,e),e==ac.empty){let e=this.$from.marksAcross(this.$to);e&&t.ensureMarks(e)}}eq(t){return t instanceof Bu&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Vu(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Bu(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,n=e){let r=t.resolve(e);return new this(r,n==e?r:t.resolve(n))}static between(t,e,n){let r=t.pos-e.pos;if(n&&!r||(n=r>=0?1:-1),!e.parent.inlineContent){let t=zu.findFrom(e,n,!0)||zu.findFrom(e,-n,!0);if(!t)return zu.near(e,n);e=t.$head}return t.parent.inlineContent||(0==r||(t=(zu.findFrom(t,-n,!0)||zu.findFrom(t,n,!0)).$anchor).pos<e.pos!=r<0)&&(t=e),new Bu(t,e)}}zu.jsonID("text",Bu);class Vu{constructor(t,e){this.anchor=t,this.head=e}map(t){return new Vu(t.map(this.anchor),t.map(this.head))}resolve(t){return Bu.between(t.resolve(this.anchor),t.resolve(this.head))}}class Wu extends zu{constructor(t){let e=t.nodeAfter,n=t.node(0).resolve(t.pos+e.nodeSize);super(t,n),this.node=e}map(t,e){let{deleted:n,pos:r}=e.mapResult(this.anchor),o=t.resolve(r);return n?zu.near(o):new Wu(o)}content(){return new ac(ec.from(this.node),0,0)}eq(t){return t instanceof Wu&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new qu(this.anchor)}static fromJSON(t,e){if("number"!=typeof e.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Wu(t.resolve(e.anchor))}static create(t,e){return new Wu(t.resolve(e))}static isSelectable(t){return!t.isText&&!1!==t.type.spec.selectable}}Wu.prototype.visible=!1,zu.jsonID("node",Wu);class qu{constructor(t){this.anchor=t}map(t){let{deleted:e,pos:n}=t.mapResult(this.anchor);return e?new Vu(n,n):new qu(n)}resolve(t){let e=t.resolve(this.anchor),n=e.nodeAfter;return n&&Wu.isSelectable(n)?new Wu(e):zu.near(e)}}class Hu extends zu{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,e=ac.empty){if(e==ac.empty){t.delete(0,t.doc.content.size);let e=zu.atStart(t.doc);e.eq(t.selection)||t.setSelection(e)}else super.replace(t,e)}toJSON(){return{type:"all"}}static fromJSON(t){return new Hu(t)}map(t){return new Hu(t)}eq(t){return t instanceof Hu}getBookmark(){return Ju}}zu.jsonID("all",Hu);const Ju={map(){return this},resolve:t=>new Hu(t)};function Ku(t,e,n,r,o,i=!1){if(e.inlineContent)return Bu.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let r=e.child(s);if(r.isAtom){if(!i&&Wu.isSelectable(r))return Wu.create(t,n-(o<0?r.nodeSize:0))}else{let e=Ku(t,r,n+o,o<0?r.childCount:0,o,i);if(e)return e}n+=r.nodeSize*o}return null}function Yu(t,e,n){let r=t.steps.length-1;if(r<e)return;let o,i=t.steps[r];(i instanceof mu||i instanceof gu)&&(t.mapping.maps[r].forEach(((t,e,n,r)=>{null==o&&(o=r)})),t.setSelection(zu.near(t.doc.resolve(o),n)))}class Uu extends class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new lu}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new Iu(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,n=ac.empty){let r=_u(this.doc,t,e,n);return r&&this.step(r),this}replaceWith(t,e,n){return this.replace(t,e,new ac(ec.from(n),0,0))}delete(t,e){return this.replace(t,e,ac.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,n){return function(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(Ou(o,i,r))return t.step(new mu(e,n,r));let s=Pu(o,t.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let h=o.depth,f=o.pos-1;h>0;h--,f--){let t=o.node(h).type.spec;if(t.defining||t.definingAsContext||t.isolating)break;s.indexOf(h)>-1?a=h:o.before(h)==f&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=r.openStart;for(let h=r.content,f=0;;f++){let t=h.firstChild;if(c.push(t),f==r.openStart)break;h=t.content}for(let h=u-1;h>=0;h--){let t=c[h].type,e=Nu(t);if(e&&o.node(l).type!=t)u=h;else if(e||!t.isTextblock)break}for(let h=r.openStart;h>=0;h--){let e=(h+u+1)%(r.openStart+1),a=c[e];if(a)for(let c=0;c<s.length;c++){let u=s[(c+l)%s.length],d=!0;u<0&&(d=!1,u=-u);let h=o.node(u-1),f=o.index(u-1);if(h.canReplaceWith(f,f,a.type,a.marks))return t.replace(o.before(u),d?i.after(u):n,new ac(Au(r.content,0,r.openStart,e),e,r.openEnd))}}let d=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>d));h--){let t=s[h];t<0||(e=o.before(t),n=i.after(t))}}(this,t,e,n),this}replaceRangeWith(t,e,n){return function(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=function(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let t=r.index(o);if(r.node(o).canReplaceWith(t,t,n))return r.before(o+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let t=r.indexAfter(o);if(r.node(o).canReplaceWith(t,t,n))return r.after(o+1);if(t<r.node(o).childCount)return null}return null}(t.doc,e,r.type);null!=o&&(e=n=o)}t.replaceRange(e,n,new ac(ec.from(r),0,0))}(this,t,e,n),this}deleteRange(t,e){return function(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=Pu(r,o);for(let s=0;s<i.length;s++){let e=i[s],n=s==i.length-1;if(n&&0==e||r.node(e).type.contentMatch.validEnd)return t.delete(r.start(e),o.end(e));if(e>0&&(n||r.node(e-1).canReplace(r.index(e-1),o.indexAfter(e-1))))return t.delete(r.before(e),o.after(e))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s)return t.delete(r.before(s),n);t.delete(e,n)}(this,t,e),this}lift(t,e){return function(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=ec.empty,d=0;for(let p=i,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,u=ec.from(r.node(p).copy(u)),d++):l--;let h=ec.empty,f=0;for(let p=i,m=!1;p>n;p--)m||o.after(p+1)<o.end(p)?(m=!0,h=ec.from(o.node(p).copy(h)),f++):c++;t.step(new gu(l,c,s,a,new ac(u.append(h),d,f),u.size-d,!0))}(this,t,e),this}join(t,e=1){return function(t,e,n){let r=new mu(e-n,e+n,ac.empty,!0);t.step(r)}(this,t,e),this}wrap(t,e){return function(t,e,n){let r=ec.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let t=n[s].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ec.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new gu(o,i,o,i,new ac(r,0,0),n.length,!0))}(this,t,e),this}setBlockType(t,e=t,n,r=null){return function(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,((e,n)=>{if(e.isTextblock&&!e.hasMarkup(r,o)&&function(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(t.doc,t.mapping.slice(i).map(n),r)){t.clearIncompatible(t.mapping.slice(i).map(n,1),r);let s=t.mapping.slice(i),a=s.map(n,1),l=s.map(n+e.nodeSize,1);return t.step(new gu(a,l,a+1,l-1,new ac(ec.from(r.create(o,null,e.marks)),0,0),1,!0)),!1}}))}(this,t,e,n,r),this}setNodeMarkup(t,e,n=null,r=[]){return function(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new gu(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ac(ec.from(s),0,0),1,!0))}(this,t,e,n,r),this}split(t,e=1,n){return function(t,e,n=1,r){let o=t.doc.resolve(e),i=ec.empty,s=ec.empty;for(let a=o.depth,l=o.depth-n,c=n-1;a>l;a--,c--){i=ec.from(o.node(a).copy(i));let t=r&&r[c];s=ec.from(t?t.type.create(t.attrs,s):o.node(a).copy(s))}t.step(new mu(e,e,new ac(i.append(s),n,n),!0))}(this,t,e,n),this}addMark(t,e,n){return function(t,e,n,r){let o,i,s=[],a=[];t.doc.nodesBetween(e,n,((t,l,c)=>{if(!t.isInline)return;let u=t.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,e),d=Math.min(l+t.nodeSize,n),h=r.addToSet(u);for(let t=0;t<u.length;t++)u[t].isInSet(h)||(o&&o.to==c&&o.mark.eq(u[t])?o.to=d:s.push(o=new pu(c,d,u[t])));i&&i.to==c?i.to=d:a.push(i=new fu(c,d,r))}})),s.forEach((e=>t.step(e))),a.forEach((e=>t.step(e)))}(this,t,e,n),this}removeMark(t,e,n){return function(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,((t,s)=>{if(!t.isInline)return;i++;let a=null;if(r instanceof Vc){let e,n=t.marks;for(;e=r.isInSet(n);)(a||(a=[])).push(e),n=e.removeFromSet(n)}else r?r.isInSet(t.marks)&&(a=[r]):a=t.marks;if(a&&a.length){let r=Math.min(s+t.nodeSize,n);for(let t=0;t<a.length;t++){let n,l=a[t];for(let t=0;t<o.length;t++){let e=o[t];e.step==i-1&&l.eq(o[t].style)&&(n=e)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(s,e),to:r,step:i})}}})),o.forEach((e=>t.step(new pu(e.from,e.to,e.style))))}(this,t,e,n),this}clearIncompatible(t,e,n){return function(t,e,n,r=n.contentMatch){let o=t.doc.nodeAt(e),i=[],s=e+1;for(let a=0;a<o.childCount;a++){let e=o.child(a),l=s+e.nodeSize,c=r.matchType(e.type);if(c){r=c;for(let r=0;r<e.marks.length;r++)n.allowsMarkType(e.marks[r].type)||t.step(new pu(s,l,e.marks[r]))}else i.push(new mu(s,l,ac.empty));s=l}if(!r.validEnd){let e=r.fillBefore(ec.empty,!0);t.replace(s,s,new ac(e,0,0))}for(let a=i.length-1;a>=0;a--)t.step(i[a])}(this,t,e,n),this}}{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=-3&(1|this.updated),this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=2,this}ensureMarks(t){return ic.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(t,e){super.addStep(t,e),this.updated=-3&this.updated,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,e=!0){let n=this.selection;return e&&(t=t.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||ic.none))),n.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,e,n){let r=this.doc.type.schema;if(null==e)return t?this.replaceSelectionWith(r.text(t),!0):this.deleteSelection();{if(null==n&&(n=e),n=null==n?e:n,!t)return this.deleteRange(e,n);let o=this.storedMarks;if(!o){let t=this.doc.resolve(e);o=n==e?t.marks():t.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(e,n,r.text(t,o)),this.selection.empty||this.setSelection(zu.near(this.selection.$to)),this}}setMeta(t,e){return this.meta["string"==typeof t?t:t.key]=e,this}getMeta(t){return this.meta["string"==typeof t?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function Gu(t,e){return e&&t?t.bind(e):t}class Xu{constructor(t,e,n){this.name=t,this.init=Gu(e.init,n),this.apply=Gu(e.apply,n)}}const Zu=[new Xu("doc",{init:t=>t.doc||t.schema.topNodeType.createAndFill(),apply:t=>t.doc}),new Xu("selection",{init:(t,e)=>t.selection||zu.atStart(e.doc),apply:t=>t.selection}),new Xu("storedMarks",{init:t=>t.storedMarks||null,apply:(t,e,n,r)=>r.selection.$cursor?t.storedMarks:null}),new Xu("scrollToSelection",{init:()=>0,apply:(t,e)=>t.scrolledIntoView?e+1:e})];class Qu{constructor(t,e){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Zu.slice(),e&&e.forEach((t=>{if(this.pluginsByKey[t.key])throw new RangeError("Adding different instances of a keyed plugin ("+t.key+")");this.plugins.push(t),this.pluginsByKey[t.key]=t,t.spec.state&&this.fields.push(new Xu(t.key,t.spec.state,t))}))}}class td{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,e=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=e){let e=this.config.plugins[n];if(e.spec.filterTransaction&&!e.spec.filterTransaction.call(e,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let e=[t],n=this.applyInner(t),r=null;for(;;){let o=!1;for(let i=0;i<this.config.plugins.length;i++){let s=this.config.plugins[i];if(s.spec.appendTransaction){let a=r?r[i].n:0,l=r?r[i].state:this,c=a<e.length&&s.spec.appendTransaction.call(s,a?e.slice(a):e,l,n);if(c&&n.filterTransaction(c,i)){if(c.setMeta("appendedTransaction",t),!r){r=[];for(let t=0;t<this.config.plugins.length;t++)r.push(t<i?{state:n,n:e.length}:{state:this,n:0})}e.push(c),n=n.applyInner(c),o=!0}r&&(r[i]={state:n,n:e.length})}}if(!o)return{state:n,transactions:e}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let e=new td(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];e[o.name]=o.apply(t,this[o.name],this,e)}return e}get tr(){return new Uu(this)}static create(t){let e=new Qu(t.doc?t.doc.type.schema:t.schema,t.plugins),n=new td(e);for(let r=0;r<e.fields.length;r++)n[e.fields[r].name]=e.fields[r].init(t,n);return n}reconfigure(t){let e=new Qu(this.schema,t.plugins),n=e.fields,r=new td(e);for(let o=0;o<n.length;o++){let e=n[o].name;r[e]=this.hasOwnProperty(e)?this[e]:n[o].init(t,r)}return r}toJSON(t){let e={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(e.storedMarks=this.storedMarks.map((t=>t.toJSON()))),t&&"object"==typeof t)for(let n in t){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=t[n],o=r.spec.state;o&&o.toJSON&&(e[n]=o.toJSON.call(r,this[r.key]))}return e}static fromJSON(t,e,n){if(!e)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let r=new Qu(t.schema,t.plugins),o=new td(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=Oc.fromJSON(t.schema,e.doc);else if("selection"==r.name)o.selection=zu.fromJSON(o.doc,e.selection);else if("storedMarks"==r.name)e.storedMarks&&(o.storedMarks=e.storedMarks.map(t.schema.markFromJSON));else{if(n)for(let i in n){let s=n[i],a=s.spec.state;if(s.key==r.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(e,i))return void(o[r.name]=a.fromJSON.call(s,t,e[i],o))}o[r.name]=r.init(t,o)}})),o}}function ed(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):"handleDOMEvents"==r&&(o=ed(o,e,{})),n[r]=o}return n}class nd{constructor(t){this.spec=t,this.props={},t.props&&ed(t.props,this,this.props),this.key=t.key?t.key.key:od("plugin")}getState(t){return t[this.key]}}const rd=Object.create(null);function od(t){return t in rd?t+"$"+ ++rd[t]:(rd[t]=0,t+"$")}class id{constructor(t="key"){this.key=od(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const sd="undefined"!=typeof navigator?navigator:null,ad="undefined"!=typeof document?document:null,ld=sd&&sd.userAgent||"",cd=/Edge\/(\d+)/.exec(ld),ud=/MSIE \d/.exec(ld),dd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ld),hd=!!(ud||dd||cd),fd=ud?document.documentMode:dd?+dd[1]:cd?+cd[1]:0,pd=!hd&&/gecko\/(\d+)/i.test(ld);pd&&(/Firefox\/(\d+)/.exec(ld)||[0,0])[1];const md=!hd&&/Chrome\/(\d+)/.exec(ld),gd=!!md,vd=md?+md[1]:0,yd=!hd&&!!sd&&/Apple Computer/.test(sd.vendor),bd=yd&&(/Mobile\/\w+/.test(ld)||!!sd&&sd.maxTouchPoints>2),wd=bd||!!sd&&/Mac/.test(sd.platform),xd=/Android \d/.test(ld),Sd=!!ad&&"webkitFontSmoothing"in ad.documentElement.style,kd=Sd?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,_d=function(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e},Od=function(t){let e=t.assignedSlot||t.parentNode;return e&&11==e.nodeType?e.host:e};let Cd=null;const Md=function(t,e,n){let r=Cd||(Cd=document.createRange());return r.setEnd(t,null==n?t.nodeValue.length:n),r.setStart(t,e||0),r},Dd=function(t,e,n,r){return n&&($d(t,e,n,r,-1)||$d(t,e,n,r,1))},Td=/^(img|br|input|textarea|hr)$/i;function $d(t,e,n,r,o){for(;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ed(t))){let n=t.parentNode;if(!n||1!=n.nodeType||Nd(t)||Td.test(t.nodeName)||"false"==t.contentEditable)return!1;e=_d(t)+(o<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if("false"==(t=t.childNodes[e+(o<0?-1:0)]).contentEditable)return!1;e=o<0?Ed(t):0}}}function Ed(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Nd(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Ad=function(t){let e=t.isCollapsed;return e&&gd&&t.rangeCount&&!t.getRangeAt(0).collapsed&&(e=!1),e};function Pd(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Id(t){return{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Rd(t,e){return"number"==typeof t?t:t[e]}function zd(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function jd(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;s=Od(s)){if(1!=s.nodeType)continue;let t=s,n=t==i.body,a=n?Id(i):zd(t),l=0,c=0;if(e.top<a.top+Rd(r,"top")?c=-(a.top-e.top+Rd(o,"top")):e.bottom>a.bottom-Rd(r,"bottom")&&(c=e.bottom-a.bottom+Rd(o,"bottom")),e.left<a.left+Rd(r,"left")?l=-(a.left-e.left+Rd(o,"left")):e.right>a.right-Rd(r,"right")&&(l=e.right-a.right+Rd(o,"right")),l||c)if(n)i.defaultView.scrollBy(l,c);else{let n=t.scrollLeft,r=t.scrollTop;c&&(t.scrollTop+=c),l&&(t.scrollLeft+=l);let o=t.scrollLeft-n,i=t.scrollTop-r;e={left:e.left-o,top:e.top-i,right:e.right-o,bottom:e.bottom-i}}if(n)break}}function Fd(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Od(r));return e}function Ld(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let Bd=null;function Vd(t,e){let n,r,o=2e8,i=0,s=e.top,a=e.top;for(let l=t.firstChild,c=0;l;l=l.nextSibling,c++){let t;if(1==l.nodeType)t=l.getClientRects();else{if(3!=l.nodeType)continue;t=Md(l).getClientRects()}for(let u=0;u<t.length;u++){let d=t[u];if(d.top<=s&&d.bottom>=a){s=Math.max(d.bottom,s),a=Math.min(d.top,a);let t=d.left>e.left?d.left-e.left:d.right<e.left?e.left-d.right:0;if(t<o){n=l,o=t,r=t&&3==n.nodeType?{left:d.right<e.left?d.right:d.left,top:e.top}:e,1==l.nodeType&&t&&(i=c+(e.left>=(d.left+d.right)/2?1:0));continue}}!n&&(e.left>=d.right&&e.top>=d.top||e.left>=d.left&&e.top>=d.bottom)&&(i=c+1)}}return n&&3==n.nodeType?function(t,e){let n=t.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(t,o+1),r.setStart(t,o);let n=Jd(r,1);if(n.top!=n.bottom&&Wd(e,n))return{node:t,offset:o+(e.left>=(n.left+n.right)/2?1:0)}}return{node:t,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:t,offset:i}:Vd(n,r)}function Wd(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function qd(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let n=t.childNodes[i];if(1==n.nodeType){let t=n.getClientRects();for(let r=0;r<t.length;r++){let o=t[r];if(Wd(e,o))return qd(n,e,o)}}if((i=(i+1)%r)==o)break}return t}function Hd(t,e){let n,r=t.dom.ownerDocument,o=0;if(r.caretPositionFromPoint)try{let t=r.caretPositionFromPoint(e.left,e.top);t&&({offsetNode:n,offset:o}=t)}catch(l){}if(!n&&r.caretRangeFromPoint){let t=r.caretRangeFromPoint(e.left,e.top);t&&({startContainer:n,startOffset:o}=t)}let i,s=(t.root.elementFromPoint?t.root:r).elementFromPoint(e.left,e.top+1);if(!s||!t.dom.contains(1!=s.nodeType?s.parentNode:s)){let n=t.dom.getBoundingClientRect();if(!Wd(e,n))return null;if(s=qd(t.dom,e,n),!s)return null}if(yd)for(let c=s;n&&c;c=Od(c))c.draggable&&(n=void 0);if(s=function(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}(s,e),n){if(pd&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let t,r=n.childNodes[o];"IMG"==r.nodeName&&(t=r.getBoundingClientRect()).right<=e.left&&t.bottom>e.top&&o++}n==t.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&e.top>n.lastChild.getBoundingClientRect().bottom?i=t.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(t,e,n,r){let o=-1;for(let i=e;i!=t.dom;){let e=t.docView.nearestDesc(i,!0);if(!e)return null;if(e.node.isBlock&&e.parent){let t=e.dom.getBoundingClientRect();if(t.left>r.left||t.top>r.top)o=e.posBefore;else{if(!(t.right<r.left||t.bottom<r.top))break;o=e.posAfter}}i=e.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,1)}(t,n,o,e))}null==i&&(i=function(t,e,n){let{node:r,offset:o}=Vd(e,n),i=-1;if(1==r.nodeType&&!r.firstChild){let t=r.getBoundingClientRect();i=t.left!=t.right&&n.left>(t.left+t.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:i,inside:a?a.posAtStart-a.border:-1}}function Jd(t,e){let n=t.getClientRects();return n.length?n[e<0?0:n.length-1]:t.getBoundingClientRect()}const Kd=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Yd(t,e,n){let{node:r,offset:o}=t.docView.domFromPos(e,n<0?-1:1),i=Sd||pd;if(3==r.nodeType){if(!i||!Kd.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let t=o,e=o,i=n<0?1:-1;return n<0&&!o?(e++,i=-1):n>=0&&o==r.nodeValue.length?(t--,i=1):n<0?t--:e++,Ud(Jd(Md(r,t,e),i),i<0)}{let t=Jd(Md(r,o,o),n);if(pd&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let e=Jd(Md(r,o-1,o-1),-1);if(e.top==t.top){let n=Jd(Md(r,o,o+1),-1);if(n.top!=t.top)return Ud(n,n.left<e.left)}}return t}}if(!t.state.doc.resolve(e).parent.inlineContent){if(o&&(n<0||o==Ed(r))){let t=r.childNodes[o-1];if(1==t.nodeType)return Gd(t.getBoundingClientRect(),!1)}if(o<Ed(r)){let t=r.childNodes[o];if(1==t.nodeType)return Gd(t.getBoundingClientRect(),!0)}return Gd(r.getBoundingClientRect(),n>=0)}if(o&&(n<0||o==Ed(r))){let t=r.childNodes[o-1],e=3==t.nodeType?Md(t,Ed(t)-(i?0:1)):1!=t.nodeType||"BR"==t.nodeName&&t.nextSibling?null:t;if(e)return Ud(Jd(e,1),!1)}if(o<Ed(r)){let t=r.childNodes[o];for(;t.pmViewDesc&&t.pmViewDesc.ignoreForCoords;)t=t.nextSibling;let e=t?3==t.nodeType?Md(t,0,i?0:1):1==t.nodeType?t:null:null;if(e)return Ud(Jd(e,-1),!0)}return Ud(Jd(3==r.nodeType?Md(r):r,-n),n>=0)}function Ud(t,e){if(0==t.width)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Gd(t,e){if(0==t.height)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Xd(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}const Zd=/[\u0590-\u08ac]/;let Qd=null,th=null,eh=!1;function nh(t,e,n){return Qd==e&&th==n?eh:(Qd=e,th=n,eh="up"==n||"down"==n?function(t,e,n){let r=e.selection,o="up"==n?r.$from:r.$to;return Xd(t,e,(()=>{let{node:e}=t.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=t.docView.nearestDesc(e,!0);if(!n)break;if(n.node.isBlock){e=n.dom;break}e=n.dom.parentNode}let r=Yd(t,o.pos,1);for(let t=e.firstChild;t;t=t.nextSibling){let e;if(1==t.nodeType)e=t.getClientRects();else{if(3!=t.nodeType)continue;e=Md(t,0,t.nodeValue.length).getClientRects()}for(let t=0;t<e.length;t++){let o=e[t];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(t,e,n):function(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,a=t.domSelection();return Zd.test(r.parent.textContent)&&a.modify?Xd(t,e,(()=>{let e=a.getRangeAt(0),o=a.focusNode,i=a.focusOffset,s=a.caretBidiLevel;a.modify("move",n,"character");let l=!(r.depth?t.docView.domAfterPos(r.before()):t.dom).contains(1==a.focusNode.nodeType?a.focusNode:a.focusNode.parentNode)||o==a.focusNode&&i==a.focusOffset;return a.removeAllRanges(),a.addRange(e),null!=s&&(a.caretBidiLevel=s),l})):"left"==n||"backward"==n?i:s}(t,e,n))}class rh{constructor(t,e,n,r){this.parent=t,this.children=e,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,e,n){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let e=0;e<this.children.length;e++)t+=this.children[e].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let e=0,n=this.posAtStart;;e++){let r=this.children[e];if(r==t)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,e,n){if(this.contentDOM&&this.contentDOM.contains(1==t.nodeType?t:t.parentNode)){if(n<0){let n,r;if(t==this.contentDOM)n=t.childNodes[e-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(t==this.contentDOM)n=t.childNodes[e];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;n=t.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(t==this.dom&&this.contentDOM)r=e>_d(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&t.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==e)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!1;break}if(e.previousSibling)break}if(null==r&&e==t.childNodes.length)for(let e=t;;e=e.parentNode){if(e==this.dom){r=!0;break}if(e.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(t,e=!1){for(let n=!0,r=t;r;r=r.parentNode){let o,i=this.getDesc(r);if(i&&(!e||i.node)){if(!n||!(o=i.nodeDOM)||(1==o.nodeType?o.contains(1==t.nodeType?t:t.parentNode):o==t))return i;n=!1}}}getDesc(t){let e=t.pmViewDesc;for(let n=e;n;n=n.parent)if(n==this)return e}posFromDOM(t,e,n){for(let r=t;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(t,e,n)}return-1}descAt(t){for(let e=0,n=0;e<this.children.length;e++){let r=this.children[e],o=n+r.size;if(n==t&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(t<o)return r.descAt(t-n-r.border);n=o}}domFromPos(t,e){if(!this.contentDOM)return{node:this.dom,offset:0};let n,r=0,o=0;for(let i=0;r<this.children.length;r++){let e=this.children[r],n=i+e.size;if(n>t||e instanceof uh){o=t-i;break}i=n}if(o)return this.children[r].domFromPos(o-this.children[r].border,e);for(;r&&!(n=this.children[r-1]).size&&n instanceof oh&&n.side>=0;r--);if(e<=0){let t,n=!0;for(;t=r?this.children[r-1]:null,t&&t.dom.parentNode!=this.contentDOM;r--,n=!1);return t&&e&&n&&!t.border&&!t.domAtom?t.domFromPos(t.size,e):{node:this.contentDOM,offset:t?_d(t.dom)+1:0}}{let t,n=!0;for(;t=r<this.children.length?this.children[r]:null,t&&t.dom.parentNode!=this.contentDOM;r++,n=!1);return t&&n&&!t.border&&!t.domAtom?t.domFromPos(0,e):{node:this.contentDOM,offset:t?_d(t.dom):this.contentDOM.childNodes.length}}}parseRange(t,e,n=0){if(0==this.children.length)return{node:this.contentDOM,from:t,to:e,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let i=n,s=0;;s++){let n=this.children[s],a=i+n.size;if(-1==r&&t<=a){let o=i+n.border;if(t>=o&&e<=a-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(t,e,o);t=i;for(let e=s;e>0;e--){let n=this.children[e-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=_d(n.dom)+1;break}t-=n.size}-1==r&&(r=0)}if(r>-1&&(a>e||s==this.children.length-1)){e=a;for(let t=s+1;t<this.children.length;t++){let n=this.children[t];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=_d(n.dom);break}e+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}i=a}return{node:this.contentDOM,from:t,to:e,fromOffset:r,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let e=this.children[t<0?0:this.children.length-1];return 0==e.size||e.emptyChildAt(t)}domAfterPos(t){let{node:e,offset:n}=this.domFromPos(t,0);if(1!=e.nodeType||n==e.childNodes.length)throw new RangeError("No node after pos "+t);return e.childNodes[n]}setSelection(t,e,n,r=!1){let o=Math.min(t,e),i=Math.max(t,e);for(let h=0,f=0;h<this.children.length;h++){let s=this.children[h],a=f+s.size;if(o>f&&i<a)return s.setSelection(t-f-s.border,e-f-s.border,n,r);f=a}let s=this.domFromPos(t,t?-1:1),a=e==t?s:this.domFromPos(e,e?-1:1),l=n.getSelection(),c=!1;if((pd||yd)&&t==e){let{node:t,offset:e}=s;if(3==t.nodeType){if(c=!(!e||"\n"!=t.nodeValue[e-1]),c&&e==t.nodeValue.length)for(let n,r=t;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(s=a={node:n.parentNode,offset:_d(n)+1});break}let t=r.pmViewDesc;if(t&&t.node&&t.node.isBlock)break}}else{let n=t.childNodes[e-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(pd&&l.focusNode&&l.focusNode!=a.node&&1==l.focusNode.nodeType){let t=l.focusNode.childNodes[l.focusOffset];t&&"false"==t.contentEditable&&(r=!0)}if(!(r||c&&yd)&&Dd(s.node,s.offset,l.anchorNode,l.anchorOffset)&&Dd(a.node,a.offset,l.focusNode,l.focusOffset))return;let u=!1;if((l.extend||t==e)&&!c){l.collapse(s.node,s.offset);try{t!=e&&l.extend(a.node,a.offset),u=!0}catch(d){if(!(d instanceof DOMException))throw d}}if(!u){if(t>e){let t=s;s=a,a=t}let n=document.createRange();n.setEnd(a.node,a.offset),n.setStart(s.node,s.offset),l.removeAllRanges(),l.addRange(n)}}ignoreMutation(t){return!this.contentDOM&&"selection"!=t.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,e){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],i=n+o.size;if(n==i?t<=i&&e>=n:t<i&&e>n){let r=n+o.border,s=i-o.border;if(t>=r&&e<=s)return this.dirty=t==n||e==i?2:1,void(t!=r||e!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-r,e-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=i}this.dirty=2}markParentsDirty(){let t=1;for(let e=this.parent;e;e=e.parent,t++){let n=1==t?2:1;e.dirty<n&&(e.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class oh extends rh{constructor(t,e,n,r){let o,i=e.type.toDOM;if("function"==typeof i&&(i=i(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!e.type.spec.raw){if(1!=i.nodeType){let t=document.createElement("span");t.appendChild(i),i=t}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(t,[],i,null),this.widget=e,this.widget=e,o=this}matchesWidget(t){return 0==this.dirty&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let e=this.widget.spec.stopEvent;return!!e&&e(t)}ignoreMutation(t){return"selection"!=t.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class ih extends rh{constructor(t,e,n,r){super(t,[],e,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(t,e){return t!=this.textDOM?this.posAtStart+(e?this.size:0):this.posAtStart+e}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return"characterData"===t.type&&t.target.nodeValue==t.oldValue}}class sh extends rh{constructor(t,e,n,r){super(t,[],n,r),this.mark=e}static create(t,e,n,r){let o=r.nodeViews[e.type.name],i=o&&o(e,r,n);return i&&i.dom||(i=eu.renderSpec(document,e.type.spec.toDOM(e,n))),new sh(t,e,i.dom,i.contentDOM||i.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM||void 0}}matchesMark(t){return 3!=this.dirty&&this.mark.eq(t)}markDirty(t,e){if(super.markDirty(t,e),0!=this.dirty){let t=this.parent;for(;!t.node;)t=t.parent;t.dirty<this.dirty&&(t.dirty=this.dirty),this.dirty=0}}slice(t,e,n){let r=sh.create(this.parent,this.mark,!0,n),o=this.children,i=this.size;e<i&&(o=kh(o,e,i,n)),t>0&&(o=kh(o,0,t,n));for(let s=0;s<o.length;s++)o[s].parent=r;return r.children=o,r}}class ah extends rh{constructor(t,e,n,r,o,i,s,a,l){super(t,[],o,i),this.node=e,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=s,i&&this.updateChildren(a,l)}static create(t,e,n,r,o,i){let s,a=o.nodeViews[e.type.name],l=a&&a(e,o,(()=>s?s.parent?s.parent.posBeforeChild(s):void 0:i),n,r),c=l&&l.dom,u=l&&l.contentDOM;if(e.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(e.text);else c||({dom:c,contentDOM:u}=eu.renderSpec(document,e.type.spec.toDOM(e)));u||e.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),e.type.spec.draggable&&(c.draggable=!0));let d=c;return c=yh(c,n,e),l?s=new dh(t,e,n,r,c,u||null,d,l,o,i+1):e.isText?new ch(t,e,n,r,c,d,o):new ah(t,e,n,r,c,u||null,d,o,i+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(t.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}t.contentElement||(t.getContent=()=>ec.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,e,n){return 0==this.dirty&&t.eq(this.node)&&bh(e,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,e){let n=this.node.inlineContent,r=e,o=t.composing?this.localCompositionInfo(t,e):null,i=o&&o.pos>-1?o:null,s=o&&o.pos<0,a=new xh(this,i&&i.node);!function(t,e,n,r){let o=e.locals(t),i=0;if(0==o.length){for(let n=0;n<t.childCount;n++){let s=t.child(n);r(s,o,e.forChild(i,s),n),i+=s.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){if(s<o.length&&o[s].to==i){let t,e=o[s++];for(;s<o.length&&o[s].to==i;)(t||(t=[e])).push(o[s++]);if(t){t.sort(Sh);for(let e=0;e<t.length;e++)n(t[e],c,!!l)}else n(e,c,!!l)}let u,d;if(l)d=-1,u=l,l=null;else{if(!(c<t.childCount))break;d=c,u=t.child(c++)}for(let t=0;t<a.length;t++)a[t].to<=i&&a.splice(t--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)a.push(o[s++]);let h=i+u.nodeSize;if(u.isText){let t=h;s<o.length&&o[s].from<t&&(t=o[s].from);for(let e=0;e<a.length;e++)a[e].to<t&&(t=a[e].to);t<h&&(l=u.cut(t-i),u=u.cut(0,t-i),h=t,d=-1)}r(u,u.isInline&&!u.isLeaf?a.filter((t=>!t.inline)):a.slice(),e.forChild(i,u),d),i=h}}(this.node,this.innerDeco,((e,o,i)=>{e.spec.marks?a.syncToMarks(e.spec.marks,n,t):e.type.side>=0&&!i&&a.syncToMarks(o==this.node.childCount?ic.none:this.node.child(o).marks,n,t),a.placeWidget(e,t,r)}),((e,i,l,c)=>{let u;a.syncToMarks(e.marks,n,t),a.findNodeMatch(e,i,l,c)||s&&t.state.selection.from>r&&t.state.selection.to<r+e.nodeSize&&(u=a.findIndexWithChild(o.node))>-1&&a.updateNodeAt(e,i,l,u,t)||a.updateNextNode(e,i,l,t,c)||a.addNode(e,i,l,t,r),r+=e.nodeSize})),a.syncToMarks([],n,t),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||2==this.dirty)&&(i&&this.protectLocalComposition(t,i),hh(this.contentDOM,this.children,t),bd&&function(t){if("UL"==t.nodeName||"OL"==t.nodeName){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}(this.dom))}localCompositionInfo(t,e){let{from:n,to:r}=t.state.selection;if(!(t.state.selection instanceof Bu)||n<e||r>e+this.node.content.size)return null;let o=t.domSelection(),i=function(t,e){for(;;){if(3==t.nodeType)return t;if(1==t.nodeType&&e>0){if(t.childNodes.length>e&&3==t.childNodes[e].nodeType)return t.childNodes[e];e=Ed(t=t.childNodes[e-1])}else{if(!(1==t.nodeType&&e<t.childNodes.length))return null;t=t.childNodes[e],e=0}}}(o.focusNode,o.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let t=i.nodeValue,o=function(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),a=i;if(i+=s.nodeSize,!s.isText)continue;let l=s.text;for(;o<t.childCount;){let e=t.child(o++);if(i+=e.nodeSize,!e.isText)break;l+=e.text}if(i>=n){let t=a<r?l.lastIndexOf(e,r-a-1):-1;if(t>=0&&t+e.length+a>=n)return a+t;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}(this.node.content,t,n-e,r-e);return o<0?null:{node:i,pos:o,text:t}}return{node:i,pos:-1,text:""}}protectLocalComposition(t,{node:e,pos:n,text:r}){if(this.getDesc(e))return;let o=e;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let i=new ih(this,o,e,r);t.input.compositionNodes.push(i),this.children=kh(this.children,n,n+r.length,t,i)}update(t,e,n,r){return!(3==this.dirty||!t.sameMarkup(this.node))&&(this.updateInner(t,e,n,r),!0)}updateInner(t,e,n,r){this.updateOuterDeco(e),this.node=t,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(bh(t,this.outerDeco))return;let e=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=gh(this.dom,this.nodeDOM,mh(this.outerDeco,this.node,e),mh(t,this.node,e)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function lh(t,e,n,r,o){return yh(r,e,t),new ah(void 0,t,e,n,r,r,r,o,0)}class ch extends ah{constructor(t,e,n,r,o,i,s){super(t,e,n,r,o,null,i,s,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,e,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(e),0==this.dirty&&t.text==this.node.text||t.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=t.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=t,this.dirty=0,!0)}inParent(){let t=this.parent.contentDOM;for(let e=this.nodeDOM;e;e=e.parentNode)if(e==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,e,n){return t==this.nodeDOM?this.posAtStart+Math.min(e,this.node.text.length):super.localPosFromDOM(t,e,n)}ignoreMutation(t){return"characterData"!=t.type&&"selection"!=t.type}slice(t,e,n){let r=this.node.cut(t,e),o=document.createTextNode(r.text);return new ch(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(t,e){super.markDirty(t,e),this.dom==this.nodeDOM||0!=t&&e!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}}class uh extends rh{parseRule(){return{ignore:!0}}matchesHack(t){return 0==this.dirty&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class dh extends ah{constructor(t,e,n,r,o,i,s,a,l,c){super(t,e,n,r,o,i,s,l,c),this.spec=a}update(t,e,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(t,e,n);return o&&this.updateInner(t,e,n,r),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,e,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,e,n,r){this.spec.setSelection?this.spec.setSelection(t,e,n):super.setSelection(t,e,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return!!this.spec.stopEvent&&this.spec.stopEvent(t)}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function hh(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=s.dom;if(a.parentNode==t){for(;a!=r;)r=wh(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(a,r);if(s instanceof sh){let e=r?r.previousSibling:t.lastChild;hh(s.contentDOM,s.children,n),r=e?e.nextSibling:t.firstChild}}for(;r;)r=wh(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const fh=function(t){t&&(this.nodeName=t)};fh.prototype=Object.create(null);const ph=[new fh];function mh(t,e,n){if(0==t.length)return ph;let r=n?ph[0]:new fh,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new fh(s.nodeName));for(let t in s){let i=s[t];null!=i&&(n&&1==o.length&&o.push(r=new fh(e.isInline?"span":"div")),"class"==t?r.class=(r.class?r.class+" ":"")+i:"style"==t?r.style=(r.style?r.style+";":"")+i:"nodeName"!=t&&(r[t]=i))}}}return o}function gh(t,e,n,r){if(n==ph&&r==ph)return e;let o=e;for(let i=0;i<r.length;i++){let e=r[i],s=n[i];if(i){let n;s&&s.nodeName==e.nodeName&&o!=t&&(n=o.parentNode)&&n.nodeName.toLowerCase()==e.nodeName||(n=document.createElement(e.nodeName),n.pmIsDeco=!0,n.appendChild(o),s=ph[0]),o=n}vh(o,s||ph[0],e)}return o}function vh(t,e,n){for(let r in e)"class"==r||"style"==r||"nodeName"==r||r in n||t.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let e=0;e<r.length;e++)-1==o.indexOf(r[e])&&t.classList.remove(r[e]);for(let e=0;e<o.length;e++)-1==r.indexOf(o[e])&&t.classList.add(o[e]);0==t.classList.length&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(e.style);)t.style.removeProperty(n[1])}n.style&&(t.style.cssText+=n.style)}}function yh(t,e,n){return gh(t,t,ph,mh(e,n,1!=t.nodeType))}function bh(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function wh(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class xh{constructor(t,e){this.lock=e,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=function(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];t:for(;o>0;){let a;for(;;)if(r){let t=n.children[r-1];if(!(t instanceof sh)){a=t,r--;break}n=t,r=t.children.length}else{if(n==e)break t;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(o-1))break;--o,i.set(a,o),s.push(a)}}return{index:o,matched:i,matches:s.reverse()}}(t.node.content,t)}destroyBetween(t,e){if(t!=e){for(let n=t;n<e;n++)this.top.children[n].destroy();this.top.children.splice(t,e-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,e,n){let r=0,o=this.stack.length>>1,i=Math.min(o,t.length);for(;r<i&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(t[r])&&!1!==t[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let e=this.index;e<Math.min(this.index+3,this.top.children.length);e++)if(this.top.children[e].matchesMark(t[o])){r=e;break}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=sh.create(this.top,t[o],e,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(t,e,n,r){let o,i=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(t,e,n))i=this.top.children.indexOf(o,this.index);else for(let s=this.index,a=Math.min(this.top.children.length,s+5);s<a;s++){let r=this.top.children[s];if(r.matchesNode(t,e,n)&&!this.preMatch.matched.has(r)){i=s;break}}return!(i<0)&&(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(t,e,n,r,o){let i=this.top.children[r];return 3==i.dirty&&i.dom==i.contentDOM&&(i.dirty=2),!!i.update(t,e,n,o)&&(this.destroyBetween(this.index,r),this.index=r+1,!0)}findIndexWithChild(t){for(;;){let e=t.parentNode;if(!e)return-1;if(e==this.top.contentDOM){let e=t.pmViewDesc;if(e)for(let t=this.index;t<this.top.children.length;t++)if(this.top.children[t]==e)return t;return-1}t=e}}updateNextNode(t,e,n,r,o){for(let i=this.index;i<this.top.children.length;i++){let s=this.top.children[i];if(s instanceof ah){let a=this.preMatch.matched.get(s);if(null!=a&&a!=o)return!1;let l=s.dom;if(!(this.lock&&(l==this.lock||1==l.nodeType&&l.contains(this.lock.parentNode))&&!(t.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==t.text&&3!=s.dirty&&bh(e,s.outerDeco)))&&s.update(t,e,n,r))return this.destroyBetween(this.index,i),s.dom!=l&&(this.changed=!0),this.index++,!0;break}}return!1}addNode(t,e,n,r,o){this.top.children.splice(this.index++,0,ah.create(this.top,t,e,n,r,o)),this.changed=!0}placeWidget(t,e,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(t)||t!=r.widget&&r.widget.type.toDOM.parentNode){let r=new oh(this.top,t,e,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],e=this.top;for(;t instanceof sh;)e=t,t=e.children[e.children.length-1];t&&t instanceof ch&&!/\n$/.test(t.node.text)||((yd||gd)&&t&&"false"==t.dom.contentEditable&&this.addHackNode("IMG",e),this.addHackNode("BR",this.top))}addHackNode(t,e){if(e==this.top&&this.index<e.children.length&&e.children[this.index].matchesHack(t))this.index++;else{let n=document.createElement(t);"IMG"==t&&(n.className="ProseMirror-separator",n.alt=""),"BR"==t&&(n.className="ProseMirror-trailingBreak");let r=new uh(this.top,[],n,null);e!=this.top?e.children.push(r):e.children.splice(this.index++,0,r),this.changed=!0}}}function Sh(t,e){return t.type.side-e.type.side}function kh(t,e,n,r,o){let i=[];for(let s=0,a=0;s<t.length;s++){let l=t[s],c=a,u=a+=l.size;c>=n||u<=e?i.push(l):(c<e&&i.push(l.slice(0,e-c,r)),o&&(i.push(o),o=void 0),u>n&&i.push(l.slice(n-c,l.size,r)))}return i}function _h(t,e=null){let n=t.domSelection(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(Ad(n)){for(a=c;o&&!o.node;)o=o.parent;let t=o.node;if(o&&t.isAtom&&Wu.isSelectable(t)&&o.parent&&(!t.isInline||!function(t,e,n){for(let r=0==e,o=e==Ed(t);r||o;){if(t==n)return!0;let e=_d(t);if(!(t=t.parentNode))return!1;r=r&&0==e,o=o&&e==Ed(t)}}(n.focusNode,n.focusOffset,o.dom))){let t=o.posBefore;l=new Wu(s==t?c:r.resolve(t))}}else{let e=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(e<0)return null;a=r.resolve(e)}if(!l){l=Ah(t,a,c,"pointer"==e||t.state.selection.head<c.pos&&!i?1:-1)}return l}function Oh(t){return t.editable?t.hasFocus():Ih(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Ch(t,e=!1){let n=t.state.selection;if(Eh(t,n),Oh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&gd){let e=t.domSelection(),n=t.domObserver.currentSelection;if(e.anchorNode&&n.anchorNode&&Dd(e.anchorNode,e.anchorOffset,n.anchorNode,n.anchorOffset))return t.input.mouseDown.delayedSelectionSync=!0,void t.domObserver.setCurSelection()}if(t.domObserver.disconnectSelection(),t.cursorWrapper)!function(t){let e=t.domSelection(),n=document.createRange(),r=t.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,_d(r)+1):n.setEnd(r,0);n.collapse(!1),e.removeAllRanges(),e.addRange(n),!o&&!t.state.selection.visible&&hd&&fd<=11&&(r.disabled=!0,r.disabled=!1)}(t);else{let r,o,{anchor:i,head:s}=n;!Mh||n instanceof Bu||(n.$from.parent.inlineContent||(r=Dh(t,n.from)),n.empty||n.$from.parent.inlineContent||(o=Dh(t,n.to))),t.docView.setSelection(i,s,t.root,e),Mh&&(r&&$h(r),o&&$h(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelection(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout((()=>{Oh(t)&&!t.state.selection.visible||t.dom.classList.remove("ProseMirror-hideselection")}),20))})}(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Mh=yd||gd&&vd<63;function Dh(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(yd&&o&&"false"==o.contentEditable)return Th(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return Th(o);if(i)return Th(i)}}function Th(t){return t.contentEditable="true",yd&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function $h(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Eh(t,e){if(e instanceof Wu){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Nh(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Nh(t)}function Nh(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function Ah(t,e,n,r){return t.someProp("createSelectionBetween",(r=>r(t,e,n)))||Bu.between(e,n,r)}function Ph(t){return(!t.editable||t.root.activeElement==t.dom)&&Ih(t)}function Ih(t){let e=t.domSelection();if(!e.anchorNode)return!1;try{return t.dom.contains(3==e.anchorNode.nodeType?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(3==e.focusNode.nodeType?e.focusNode.parentNode:e.focusNode))}catch(n){return!1}}function Rh(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&zu.findFrom(i,e)}function zh(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function jh(t,e,n){let r=t.state.selection;if(!(r instanceof Bu)){if(r instanceof Wu&&r.node.isInline)return zh(t,new Bu(e>0?r.$to:r.$from));{let n=Rh(t.state,e);return!!n&&zh(t,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(t.endOfTextblock(e>0?"right":"left")){let n=Rh(t.state,e);return!!(n&&n instanceof Wu)&&zh(t,n)}if(!(wd&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=e<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=t.docView.descAt(s))&&!n.contentDOM)&&(Wu.isSelectable(i)?zh(t,new Wu(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):!!Sd&&zh(t,new Bu(t.state.doc.resolve(e<0?s:s+i.nodeSize))))}}function Fh(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Lh(t){let e=t.pmViewDesc;return e&&0==e.size&&(t.nextSibling||"BR"!=t.nodeName)}function Bh(t){let e=t.domSelection(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(pd&&1==n.nodeType&&r<Fh(n)&&Lh(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let t=n.childNodes[r-1];if(Lh(t))o=n,i=--r;else{if(3!=t.nodeType)break;n=t,r=n.nodeValue.length}}}else{if(Wh(n))break;{let e=n.previousSibling;for(;e&&Lh(e);)o=n.parentNode,i=_d(e),e=e.previousSibling;if(e)n=e,r=Fh(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?qh(t,e,n,r):o&&qh(t,e,o,i)}function Vh(t){let e=t.domSelection(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=Fh(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!Lh(n.childNodes[r]))break;o=n,i=++r}else{if(Wh(n))break;{let e=n.nextSibling;for(;e&&Lh(e);)o=e.parentNode,i=_d(e)+1,e=e.nextSibling;if(e)n=e,r=0,s=Fh(n);else{if(n=n.parentNode,n==t.dom)break;r=s=0}}}o&&qh(t,e,o,i)}function Wh(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function qh(t,e,n,r){if(Ad(e)){let t=document.createRange();t.setEnd(n,r),t.setStart(n,r),e.removeAllRanges(),e.addRange(t)}else e.extend&&e.extend(n,r);t.domObserver.setCurSelection();let{state:o}=t;setTimeout((()=>{t.state==o&&Ch(t)}),50)}function Hh(t,e,n){let r=t.state.selection;if(r instanceof Bu&&!r.empty||n.indexOf("s")>-1)return!1;if(wd&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let n=Rh(t.state,e);if(n&&n instanceof Wu)return zh(t,n)}if(!o.parent.inlineContent){let n=e<0?o:i,s=r instanceof Hu?zu.near(n,e):zu.findFrom(n,e);return!!s&&zh(t,s)}return!1}function Jh(t,e){if(!(t.state.selection instanceof Bu))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=t.state.tr;return e<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),t.dispatch(r),!0}return!1}function Kh(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Yh(t,e){let n=e.keyCode,r=function(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}(e);return 8==n||wd&&72==n&&"c"==r?Jh(t,-1)||Bh(t):46==n||wd&&68==n&&"c"==r?Jh(t,1)||Vh(t):13==n||27==n||(37==n||wd&&66==n&&"c"==r?jh(t,-1,r)||Bh(t):39==n||wd&&70==n&&"c"==r?jh(t,1,r)||Vh(t):38==n||wd&&80==n&&"c"==r?Hh(t,-1,r)||Bh(t):40==n||wd&&78==n&&"c"==r?function(t){if(!yd||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelection();if(e&&1==e.nodeType&&0==n&&e.firstChild&&"false"==e.firstChild.contentEditable){let n=e.firstChild;Kh(t,n,"true"),setTimeout((()=>Kh(t,n,"false")),20)}return!1}(t)||Hh(t,1,r)||Vh(t):r==(wd?"m":"c")&&(66==n||73==n||89==n||90==n))}function Uh(t,e){let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let t=r.firstChild;n.push(t.type.name,t.attrs!=t.type.defaultAttrs?t.attrs:null),r=t.content}let s=t.someProp("clipboardSerializer")||eu.fromSchema(t.state.schema),a=sf(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=rf[u.nodeName.toLowerCase()]);){for(let t=c.length-1;t>=0;t--){let e=a.createElement(c[t]);for(;l.firstChild;)e.appendChild(l.firstChild);l.appendChild(e),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:t.someProp("clipboardTextSerializer",(t=>t(e)))||e.content.textBetween(0,e.content.size,"\n\n")}}function Gh(t,e,n,r,o){let i,s,a=o.parent.type.spec.code;if(!n&&!e)return null;let l=e&&(r||a||!n);if(l){if(t.someProp("transformPastedText",(t=>{e=t(e,a||r)})),a)return e?new ac(ec.from(t.state.schema.text(e.replace(/\r\n?/g,"\n"))),0,0):ac.empty;let n=t.someProp("clipboardTextParser",(t=>t(e,o,r)));if(n)s=n;else{let n=o.marks(),{schema:r}=t.state,s=eu.fromSchema(r);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach((t=>{let e=i.appendChild(document.createElement("p"));t&&e.appendChild(s.serializeNode(r.text(t,n)))}))}}else t.someProp("transformPastedHTML",(t=>{n=t(n)})),i=function(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n,r=sf().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(t);(n=o&&rf[o[1].toLowerCase()])&&(t=n.map((t=>"<"+t+">")).join("")+t+n.map((t=>"</"+t+">")).reverse().join(""));if(r.innerHTML=t,n)for(let i=0;i<n.length;i++)r=r.querySelector(n[i])||r;return r}(n),Sd&&function(t){let e=t.querySelectorAll(gd?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0&&i.firstChild;d--)i=i.firstChild;if(!s){let e=t.someProp("clipboardParser")||t.someProp("domParser")||Hc.fromSchema(t.state.schema);s=e.parseSlice(i,{preserveWhitespace:!(!l&&!u),context:o,ruleFromNode:t=>"BR"!=t.nodeName||t.nextSibling||!t.parentNode||Xh.test(t.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(t,e){if(!t.size)return t;let n,r=t.content.firstChild.type.schema;try{n=JSON.parse(e)}catch(Fy){return t}let{content:o,openStart:i,openEnd:s}=t;for(let a=n.length-2;a>=0;a-=2){let t=r.nodes[n[a]];if(!t||t.hasRequiredAttrs())break;o=ec.from(t.create(n[a+1],o)),i++,s++}return new ac(o,i,s)}(nf(s,+u[1],+u[2]),u[4]);else if(s=ac.maxOpen(function(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let r,o=e.node(n).contentMatchAt(e.index(n)),i=[];if(t.forEach((t=>{if(!i)return;let e,n=o.findWrapping(t.type);if(!n)return i=null;if(e=i.length&&r.length&&Qh(n,r,t,i[i.length-1],0))i[i.length-1]=e;else{i.length&&(i[i.length-1]=tf(i[i.length-1],r.length));let e=Zh(t,n);i.push(e),o=o.matchType(e.type),r=n}})),i)return ec.from(i)}return t}(s.content,o),!0),s.openStart||s.openEnd){let t=0,e=0;for(let n=s.content.firstChild;t<s.openStart&&!n.type.spec.isolating;t++,n=n.firstChild);for(let n=s.content.lastChild;e<s.openEnd&&!n.type.spec.isolating;e++,n=n.lastChild);s=nf(s,t,e)}return t.someProp("transformPasted",(t=>{s=t(s)})),s}const Xh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Zh(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ec.from(t));return t}function Qh(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Qh(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(ec.from(Zh(n,t,o+1))))}}function tf(t,e){if(0==e)return t;let n=t.content.replaceChild(t.childCount-1,tf(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ec.empty,!0);return t.copy(n.append(r))}function ef(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,a=s.content;return o<r-1&&(a=ef(a,e,n,r,o+1,i)),o>=n&&(a=e<0?s.contentMatchAt(0).fillBefore(a,t.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(ec.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(a))}function nf(t,e,n){return e<t.openStart&&(t=new ac(ef(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ac(ef(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const rf={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let of=null;function sf(){return of||(of=document.implementation.createHTMLDocument("title"))}const af={};let lf={};class cf{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function uf(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function df(t){t.someProp("handleDOMEvents",(e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=e=>hf(t,e))}))}function hf(t,e){return t.someProp("handleDOMEvents",(n=>{let r=n[e.type];return!!r&&(r(t,e)||e.defaultPrevented)}))}function ff(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function pf(t){return{left:t.clientX,top:t.clientY}}function mf(t,e,n,r,o){if(-1==r)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,(e=>s>i.depth?e(t,n,i.nodeAfter,i.before(s),o,!0):e(t,n,i.node(s),i.before(s),o,!1))))return!0;return!1}function gf(t,e,n){t.focused||t.focus();let r=t.state.tr.setSelection(e);"pointer"==n&&r.setMeta("pointer",!0),t.dispatch(r)}function vf(t,e,n,r,o){return mf(t,"handleClickOn",e,n,r)||t.someProp("handleClick",(n=>n(t,e,r)))||(o?function(t,e){if(-1==e)return!1;let n,r,o=t.state.selection;o instanceof Wu&&(n=o.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let t=s>i.depth?i.nodeAfter:i.node(s);if(Wu.isSelectable(t)){r=n&&o.$from.depth>0&&s>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(s);break}}return null!=r&&(gf(t,Wu.create(t.state.doc,r),"pointer"),!0)}(t,n):function(t,e){if(-1==e)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return!!(r&&r.isAtom&&Wu.isSelectable(r))&&(gf(t,new Wu(n),"pointer"),!0)}(t,n))}function yf(t,e,n,r){return mf(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",(n=>n(t,e,r)))}function bf(t,e,n,r){return mf(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",(n=>n(t,e,r)))||function(t,e,n){if(0!=n.button)return!1;let r=t.state.doc;if(-1==e)return!!r.inlineContent&&(gf(t,Bu.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let e=i>o.depth?o.nodeAfter:o.node(i),n=o.before(i);if(e.inlineContent)gf(t,Bu.create(r,n+1,n+1+e.content.size),"pointer");else{if(!Wu.isSelectable(e))continue;gf(t,Wu.create(r,n),"pointer")}return!0}}(t,n,r)}function wf(t){return Mf(t)}lf.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=16==n.keyCode||n.shiftKey,!kf(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!xd||!gd||13!=n.keyCode))if(229!=n.keyCode&&t.domObserver.forceFlush(),!bd||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)t.someProp("handleKeyDown",(e=>e(t,n)))||Yh(t,n)?n.preventDefault():uf(t,"key");else{let e=Date.now();t.input.lastIOSEnter=e,t.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{t.input.lastIOSEnter==e&&(t.someProp("handleKeyDown",(e=>e(t,Pd(13,"Enter")))),t.input.lastIOSEnter=0)}),200)}},lf.keyup=(t,e)=>{16==e.keyCode&&(t.input.shiftKey=!1)},lf.keypress=(t,e)=>{let n=e;if(kf(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||wd&&n.metaKey)return;if(t.someProp("handleKeyPress",(e=>e(t,n))))return void n.preventDefault();let r=t.state.selection;if(!(r instanceof Bu&&r.$from.sameParent(r.$to))){let e=String.fromCharCode(n.charCode);t.someProp("handleTextInput",(n=>n(t,r.$from.pos,r.$to.pos,e)))||t.dispatch(t.state.tr.insertText(e).scrollIntoView()),n.preventDefault()}};const xf=wd?"metaKey":"ctrlKey";af.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=wf(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&function(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}(n,t.input.lastClick)&&!n[xf]&&("singleClick"==t.input.lastClick.type?i="doubleClick":"doubleClick"==t.input.lastClick.type&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=t.posAtCoords(pf(n));s&&("singleClick"==i?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Sf(t,s,n,!!r)):("doubleClick"==i?yf:bf)(t,s.pos,s.inside,n)?n.preventDefault():uf(t,"pointer"))};class Sf{constructor(t,e,n,r){let o,i;if(this.view=t,this.pos=e,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!n[xf],this.allowDefault=n.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),i=e.inside;else{let n=t.state.doc.resolve(e.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,a=s?t.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=t.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof Wu&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!pd||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),uf(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>Ch(this.view))),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(pf(t))),this.allowDefault||!e?uf(this.view,"pointer"):vf(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||yd&&this.mightDrag&&!this.mightDrag.node.isAtom||gd&&!(this.view.state.selection instanceof Bu)&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(gf(this.view,zu.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):uf(this.view,"pointer")}move(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0),uf(this.view,"pointer"),0==t.buttons&&this.done()}}function kf(t,e){return!!t.composing||!!(yd&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500)&&(t.input.compositionEndedAt=-2e8,!0)}af.touchdown=t=>{wf(t),uf(t,"pointer")},af.contextmenu=t=>wf(t);const _f=xd?5e3:-1;function Of(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout((()=>Mf(t)),e))}function Cf(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Mf(t,e=!1){if(!(xd&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Cf(t),e||t.docView&&t.docView.dirty){let e=_h(t);return e&&!e.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(e)):t.updateState(t.state),!0}return!1}}lf.compositionstart=lf.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((t=>!1===t.type.spec.inclusive))))t.markCursor=t.state.storedMarks||n.marks(),Mf(t,!0),t.markCursor=null;else if(Mf(t),pd&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let e=t.domSelection();for(let t=e.focusNode,n=e.focusOffset;t&&1==t.nodeType&&0!=n;){let r=n<0?t.lastChild:t.childNodes[n-1];if(!r)break;if(3==r.nodeType){e.collapse(r,r.nodeValue.length);break}t=r,n=-1}}t.input.composing=!0}Of(t,_f)},lf.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,Of(t,20))};const Df=hd&&fd<15||bd&&kd<604;function Tf(t,e,n,r){let o=Gh(t,e,n,t.input.shiftKey,t.state.selection.$from);if(t.someProp("handlePaste",(e=>e(t,r,o||ac.empty))))return!0;if(!o)return!1;let i=function(t){return 0==t.openStart&&0==t.openEnd&&1==t.content.childCount?t.content.firstChild:null}(o),s=i?t.state.tr.replaceSelectionWith(i,t.input.shiftKey):t.state.tr.replaceSelection(o);return t.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}af.copy=lf.cut=(t,e)=>{let n=e,r=t.state.selection,o="cut"==n.type;if(r.empty)return;let i=Df?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Uh(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()}),50)}(t,a),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},lf.paste=(t,e)=>{let n=e;if(t.composing&&!xd)return;let r=Df?null:n.clipboardData;r&&Tf(t,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Tf(t,r.value,null,e):Tf(t,r.textContent,r.innerHTML,e)}),50)}(t,n)};class $f{constructor(t,e){this.slice=t,this.move=e}}const Ef=wd?"altKey":"ctrlKey";af.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(pf(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof Wu?o.to-1:o.to));else if(r&&r.mightDrag)t.dispatch(t.state.tr.setSelection(Wu.create(t.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let e=t.docView.nearestDesc(n.target,!0);e&&e.node.type.spec.draggable&&e!=t.docView&&t.dispatch(t.state.tr.setSelection(Wu.create(t.state.doc,e.posBefore)))}let s=t.state.selection.content(),{dom:a,text:l}=Uh(t,s);n.dataTransfer.clearData(),n.dataTransfer.setData(Df?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",Df||n.dataTransfer.setData("text/plain",l),t.dragging=new $f(s,!n[Ef])},af.dragend=t=>{let e=t.dragging;window.setTimeout((()=>{t.dragging==e&&(t.dragging=null)}),50)},lf.dragover=lf.dragenter=(t,e)=>e.preventDefault(),lf.drop=(t,e)=>{let n=e,r=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let o=t.posAtCoords(pf(n));if(!o)return;let i=t.state.doc.resolve(o.pos);if(!i)return;let s=r&&r.slice;s?t.someProp("transformPasted",(t=>{s=t(s)})):s=Gh(t,n.dataTransfer.getData(Df?"Text":"text/plain"),Df?null:n.dataTransfer.getData("text/html"),!1,i);let a=!(!r||n[Ef]);if(t.someProp("handleDrop",(e=>e(t,n,s||ac.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(0==n.openStart&&n.size?2:1);i++)for(let t=r.depth;t>=0;t--){let e=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,n=r.index(t)+(e>0?1:0),s=r.node(t),a=!1;if(1==i)a=s.canReplace(n,n,o);else{let t=s.contentMatchAt(n).findWrapping(o.firstChild.type);a=t&&s.canReplaceWith(n,n,t[0])}if(a)return 0==e?r.pos:e<0?r.before(t+1):r.after(t+1)}return null}(t.state.doc,i.pos,s):i.pos;null==l&&(l=i.pos);let c=t.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Wu.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Wu(f));else{let e=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((t,n,r,o)=>e=o)),c.setSelection(Ah(t,f,c.doc.resolve(e)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))},af.focus=t=>{t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout((()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelection())&&Ch(t)}),20))},af.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},af.beforeinput=(t,e)=>{if(gd&&xd&&"deleteContentBackward"==e.inputType){t.domObserver.flushSoon();let{domChangeCount:e}=t.input;setTimeout((()=>{if(t.input.domChangeCount!=e)return;if(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",(e=>e(t,Pd(8,"Backspace")))))return;let{$cursor:n}=t.state.selection;n&&n.pos>0&&t.dispatch(t.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in lf)af[os]=lf[os];function Nf(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class Af{constructor(t,e){this.toDOM=t,this.spec=e||jf,this.side=this.spec.side||0}map(t,e,n,r){let{pos:o,deleted:i}=t.mapResult(e.from+r,this.side<0?-1:1);return i?null:new Rf(o-n,o-n,this)}valid(){return!0}eq(t){return this==t||t instanceof Af&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Nf(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Pf{constructor(t,e){this.attrs=t,this.spec=e||jf}map(t,e,n,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-n,i=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new Rf(o,i,this)}valid(t,e){return e.from<e.to}eq(t){return this==t||t instanceof Pf&&Nf(this.attrs,t.attrs)&&Nf(this.spec,t.spec)}static is(t){return t.type instanceof Pf}destroy(){}}class If{constructor(t,e){this.attrs=t,this.spec=e||jf}map(t,e,n,r){let o=t.mapResult(e.from+r,1);if(o.deleted)return null;let i=t.mapResult(e.to+r,-1);return i.deleted||i.pos<=o.pos?null:new Rf(o.pos-n,i.pos-n,this)}valid(t,e){let n,{index:r,offset:o}=t.content.findIndex(e.from);return o==e.from&&!(n=t.child(r)).isText&&o+n.nodeSize==e.to}eq(t){return this==t||t instanceof If&&Nf(this.attrs,t.attrs)&&Nf(this.spec,t.spec)}destroy(){}}class Rf{constructor(t,e,n){this.from=t,this.to=e,this.type=n}copy(t,e){return new Rf(t,e,this.type)}eq(t,e=0){return this.type.eq(t.type)&&this.from+e==t.from&&this.to+e==t.to}map(t,e,n){return this.type.map(t,this,e,n)}static widget(t,e,n){return new Rf(t,t,new Af(e,n))}static inline(t,e,n,r){return new Rf(t,e,new Pf(n,r))}static node(t,e,n,r){return new Rf(t,e,new If(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof Pf}}const zf=[],jf={};class Ff{constructor(t,e){this.local=t.length?t:zf,this.children=e.length?e:zf}static create(t,e){return e.length?Hf(e,t,0,jf):Lf}find(t,e,n){let r=[];return this.findInner(null==t?0:t,null==e?1e9:e,r,0,n),r}findInner(t,e,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=e&&s.to>=t&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<e&&this.children[i+1]>t){let s=this.children[i]+1;this.children[i+2].findInner(t-s,e-s,n,r+s,o)}}map(t,e,n){return this==Lf||0==t.maps.length?this:this.mapInner(t,e,0,0,n||jf)}mapInner(t,e,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(t,n,r);a&&a.type.valid(e,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(t,e,n,r,o,i,s){let a=t.slice(),l=(t,e,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||t>c+i)continue;let u=a[s]+i;e>=u?a[s+1]=t<=u?-2:-1:n>=o&&(l=r-n-(e-t))&&(a[s]+=l,a[s+1]+=l)}};for(let u=0;u<n.maps.length;u++)n.maps[u].forEach(l);let c=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(-2==a[u+1]){c=!0,a[u+1]=-1;continue}let e=n.map(t[u]+i),l=e-o;if(l<0||l>=r.content.size){c=!0;continue}let d=n.map(t[u+1]+i,-1)-o,{index:h,offset:f}=r.content.findIndex(l),p=r.maybeChild(h);if(p&&f==l&&f+p.nodeSize==d){let r=a[u+2].mapInner(n,p,e+1,t[u]+i+1,s);r!=Lf?(a[u]=l,a[u+1]=d,a[u+2]=r):(a[u+1]=-2,c=!0)}else c=!0}if(c){let l=function(t,e,n,r,o,i,s){function a(t,e){for(let i=0;i<t.local.length;i++){let a=t.local[i].map(r,o,e);a?n.push(a):s.onRemove&&s.onRemove(t.local[i].spec)}for(let n=0;n<t.children.length;n+=3)a(t.children[n+2],t.children[n]+e+1)}for(let l=0;l<t.length;l+=3)-1==t[l+1]&&a(t[l+2],e[l]+i+1);return n}(a,t,e,n,o,i,s),c=Hf(l,r,0,s);e=c.local;for(let t=0;t<a.length;t+=3)a[t+1]<0&&(a.splice(t,3),t-=3);for(let t=0,e=0;t<c.children.length;t+=3){let n=c.children[t];for(;e<a.length&&a[e]<n;)e+=3;a.splice(e,0,c.children[t],c.children[t+1],c.children[t+2])}}return new Ff(e.sort(Jf),a)}(this.children,i||[],t,e,n,r,o):i?new Ff(i.sort(Jf),zf):Lf}add(t,e){return e.length?this==Lf?Ff.create(t,e):this.addInner(t,e,0):this}addInner(t,e,n){let r,o=0;t.forEach(((t,i)=>{let s,a=i+n;if(s=Wf(e,t,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(t,s,a+1):r.splice(o,0,i,i+t.nodeSize,Hf(s,t,a+1,jf)),o+=3}}));let i=Vf(o?qf(e):e,-n);for(let s=0;s<i.length;s++)i[s].type.valid(t,i[s])||i.splice(s--,1);return new Ff(i.length?this.local.concat(i).sort(Jf):this.local,r||this.children)}remove(t){return 0==t.length||this==Lf?this:this.removeInner(t,0)}removeInner(t,e){let n=this.children,r=this.local;for(let o=0;o<n.length;o+=3){let r,i=n[o]+e,s=n[o+1]+e;for(let e,n=0;n<t.length;n++)(e=t[n])&&e.from>i&&e.to<s&&(t[n]=null,(r||(r=[])).push(e));if(!r)continue;n==this.children&&(n=this.children.slice());let a=n[o+2].removeInner(r,i+1);a!=Lf?n[o+2]=a:(n.splice(o,3),o-=3)}if(r.length)for(let o,i=0;i<t.length;i++)if(o=t[i])for(let t=0;t<r.length;t++)r[t].eq(o,e)&&(r==this.local&&(r=this.local.slice()),r.splice(t--,1));return n==this.children&&r==this.local?this:r.length||n.length?new Ff(r,n):Lf}forChild(t,e){if(this==Lf)return this;if(e.isLeaf)return Ff.empty;let n,r;for(let s=0;s<this.children.length;s+=3)if(this.children[s]>=t){this.children[s]==t&&(n=this.children[s+2]);break}let o=t+1,i=o+e.content.size;for(let s=0;s<this.local.length;s++){let t=this.local[s];if(t.from<i&&t.to>o&&t.type instanceof Pf){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let t=new Ff(r.sort(Jf),zf);return n?new Bf([t,n]):t}return n||Lf}eq(t){if(this==t)return!0;if(!(t instanceof Ff)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(t){return Kf(this.localsInner(t))}localsInner(t){if(this==Lf)return zf;if(t.inlineContent||!this.local.some(Pf.is))return this.local;let e=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof Pf||e.push(this.local[n]);return e}}Ff.empty=new Ff([],[]),Ff.removeOverlap=Kf;const Lf=Ff.empty;class Bf{constructor(t){this.members=t}map(t,e){const n=this.members.map((n=>n.map(t,e,jf)));return Bf.from(n)}forChild(t,e){if(e.isLeaf)return Ff.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(t,e);o!=Lf&&(o instanceof Bf?n=n.concat(o.members):n.push(o))}return Bf.from(n)}eq(t){if(!(t instanceof Bf)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(t){let e,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(t);if(o.length)if(e){n&&(e=e.slice(),n=!1);for(let t=0;t<o.length;t++)e.push(o[t])}else e=o}return e?Kf(n?e:e.sort(Jf)):zf}static from(t){switch(t.length){case 0:return Lf;case 1:return t[0];default:return new Bf(t)}}}function Vf(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new Rf(o.from+e,o.to+e,o.type))}return n}function Wf(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i,s=0;s<t.length;s++)(i=t[s])&&i.from>n&&i.to<r&&((o||(o=[])).push(i),t[s]=null);return o}function qf(t){let e=[];for(let n=0;n<t.length;n++)null!=t[n]&&e.push(t[n]);return e}function Hf(t,e,n,r){let o=[],i=!1;e.forEach(((e,s)=>{let a=Wf(t,e,s+n);if(a){i=!0;let t=Hf(a,e,n+s+1,r);t!=Lf&&o.push(s,s+e.nodeSize,t)}}));let s=Vf(i?qf(t):t,-n).sort(Jf);for(let a=0;a<s.length;a++)s[a].type.valid(e,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||o.length?new Ff(s,o):Lf}function Jf(t,e){return t.from-e.from||t.to-e.to}function Kf(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from!=r.from){i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),Yf(e,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),Yf(e,o+1,i.copy(r.to,i.to)))}}return e}function Yf(t,e,n){for(;e<t.length&&Jf(n,t[e])>0;)e++;t.splice(e,0,n)}function Uf(t){let e=[];return t.someProp("decorations",(n=>{let r=n(t.state);r&&r!=Lf&&e.push(r)})),t.cursorWrapper&&e.push(Ff.create(t.state.doc,[t.cursorWrapper.deco])),Bf.from(e)}const Gf={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Xf=hd&&fd<=11;class Zf{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class Qf{constructor(t,e){this.view=t,this.handleDOMChange=e,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Zf,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver((t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);hd&&fd<=11&&t.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),Xf&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&this.observer.observe(this.view.dom,Gf),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let e=0;e<t.length;e++)this.queue.push(t[e]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(Ph(this.view)){if(this.suppressingSelectionUpdates)return Ch(this.view);if(hd&&fd<=11&&!this.view.state.selection.empty){let t=this.view.domSelection();if(t.focusNode&&Dd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelection())}ignoreSelectionChange(t){if(0==t.rangeCount)return!0;let e=t.getRangeAt(0).commonAncestorContainer,n=this.view.docView.nearestDesc(e);return n&&n.ignoreMutation({type:"selection",target:3==e.nodeType?e.parentNode:e})?(this.setCurSelection(),!0):void 0}flush(){if(!this.view.docView||this.flushingSoon>-1)return;let t=this.observer?this.observer.takeRecords():[];this.queue.length&&(t=this.queue.concat(t),this.queue.length=0);let e=this.view.domSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&Ph(this.view)&&!this.ignoreSelectionChange(e),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(let a=0;a<t.length;a++){let e=this.registerMutation(t[a],s);e&&(r=r<0?e.from:Math.min(e.from,r),o=o<0?e.to:Math.max(e.to,o),e.typeOver&&(i=!0))}if(pd&&s.length>1){let t=s.filter((t=>"BR"==t.nodeName));if(2==t.length){let e=t[0],n=t[1];e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(t){if(tp)return;tp=!0,"normal"==getComputedStyle(t.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView&&this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(e)||Ch(this.view),this.currentSelection.set(e))}registerMutation(t,e){if(e.indexOf(t.target)>-1)return null;let n=this.view.docView.nearestDesc(t.target);if("attributes"==t.type&&(n==this.view.docView||"contenteditable"==t.attributeName||"style"==t.attributeName&&!t.oldValue&&!t.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(t))return null;if("childList"==t.type){for(let n=0;n<t.addedNodes.length;n++)e.push(t.addedNodes[n]);if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(t.target))return{from:n.posBefore,to:n.posAfter};let r=t.previousSibling,o=t.nextSibling;if(hd&&fd<=11&&t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){let{previousSibling:n,nextSibling:i}=t.addedNodes[e];(!n||Array.prototype.indexOf.call(t.addedNodes,n)<0)&&(r=n),(!i||Array.prototype.indexOf.call(t.addedNodes,i)<0)&&(o=i)}let i=r&&r.parentNode==t.target?_d(r)+1:0,s=n.localPosFromDOM(t.target,i,-1),a=o&&o.parentNode==t.target?_d(o):t.target.childNodes.length;return{from:s,to:n.localPosFromDOM(t.target,a,1)}}return"attributes"==t.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:{from:n.posAtStart,to:n.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}}let tp=!1;function ep(t){let e=t.pmViewDesc;if(e)return e.parseRule();if("BR"==t.nodeName&&t.parentNode){if(yd&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}if(t.parentNode.lastChild==t||yd&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if("IMG"==t.nodeName&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}function np(t,e,n,r,o){if(e<0){let e=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,n=_h(t,e);if(n&&!t.state.selection.eq(n)){let r=t.state.tr.setSelection(n);"pointer"==e?r.setMeta("pointer",!0):"key"==e&&r.scrollIntoView(),t.dispatch(r)}return}let i=t.state.doc.resolve(e),s=i.sharedDepth(n);e=i.before(s+1),n=t.state.doc.resolve(n).after(s+1);let a=t.state.selection,l=function(t,e,n){let r,{node:o,fromOffset:i,toOffset:s,from:a,to:l}=t.docView.parseRange(e,n),c=t.domSelection(),u=c.anchorNode;if(u&&t.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],Ad(c)||r.push({node:c.focusNode,offset:c.focusOffset})),gd&&8===t.input.lastKeyCode)for(let g=s;g>i;g--){let t=o.childNodes[g-1],e=t.pmViewDesc;if("BR"==t.nodeName&&!e){s=g;break}if(!e||e.size)break}let d=t.state.doc,h=t.someProp("domParser")||Hc.fromSchema(t.state.schema),f=d.resolve(a),p=null,m=h.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:s,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:ep,context:f});if(r&&null!=r[0].pos){let t=r[0].pos,e=r[1]&&r[1].pos;null==e&&(e=t),p={anchor:t+a,head:e+a}}return{doc:m,sel:p,from:a,to:l}}(t,e,n);if(gd&&t.cursorWrapper&&l.sel&&l.sel.anchor==t.cursorWrapper.deco.from){let e=t.cursorWrapper.deco.type.toDOM.nextSibling,n=e&&e.nodeValue?e.nodeValue.length:1;l.sel={anchor:l.sel.anchor+n,head:l.sel.anchor+n}}let c,u,d=t.state.doc,h=d.slice(l.from,l.to);8===t.input.lastKeyCode&&Date.now()-100<t.input.lastKeyCodeTime?(c=t.state.selection.to,u="end"):(c=t.state.selection.from,u="start"),t.input.lastKeyCode=null;let f=function(t,e,n,r,o){let i=t.findDiffStart(e,n);if(null==i)return null;let{a:s,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if("end"==o){r-=s+Math.max(0,i-Math.min(s,a))-i}if(s<i&&t.size<e.size){i-=r<=i&&r>=s?i-r:0,a=i+(a-s),s=i}else if(a<i){i-=r<=i&&r>=a?i-r:0,s=i+(s-a),a=i}return{start:i,endA:s,endB:a}}(h.content,l.doc.content,l.from,c,u);if((bd&&t.input.lastIOSEnter>Date.now()-225||xd)&&o.some((t=>"DIV"==t.nodeName||"P"==t.nodeName))&&(!f||f.endA>=f.endB)&&t.someProp("handleKeyDown",(e=>e(t,Pd(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(!f){if(!(r&&a instanceof Bu&&!a.empty&&a.$head.sameParent(a.$anchor))||t.composing||l.sel&&l.sel.anchor!=l.sel.head){if(l.sel){let e=rp(t,t.state.doc,l.sel);e&&!e.eq(t.state.selection)&&t.dispatch(t.state.tr.setSelection(e))}return}f={start:a.from,endA:a.to,endB:a.to}}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&f.start==f.endB&&t.state.selection instanceof Bu&&(f.start>t.state.selection.from&&f.start<=t.state.selection.from+2&&t.state.selection.from>=l.from?f.start=t.state.selection.from:f.endA<t.state.selection.to&&f.endA>=t.state.selection.to-2&&t.state.selection.to<=l.to&&(f.endB+=t.state.selection.to-f.endA,f.endA=t.state.selection.to)),hd&&fd<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>l.from&&"  "==l.doc.textBetween(f.start-l.from-1,f.start-l.from+1)&&(f.start--,f.endA--,f.endB--);let p,m=l.doc.resolveNoCache(f.start-l.from),g=l.doc.resolveNoCache(f.endB-l.from),v=d.resolve(f.start),y=m.sameParent(g)&&m.parent.inlineContent&&v.end()>=f.endA;if((bd&&t.input.lastIOSEnter>Date.now()-225&&(!y||o.some((t=>"DIV"==t.nodeName||"P"==t.nodeName)))||!y&&m.pos<l.doc.content.size&&(p=zu.findFrom(l.doc.resolve(m.pos+1),1,!0))&&p.head==g.pos)&&t.someProp("handleKeyDown",(e=>e(t,Pd(13,"Enter")))))return void(t.input.lastIOSEnter=0);if(t.state.selection.anchor>f.start&&function(t,e,n,r,o){if(!r.parent.isTextblock||n-e<=o.pos-r.pos||op(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(op(i,!0,!0));return!(!s.parent.isTextblock||s.pos>n||op(s,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(s.parent.content)}(d,f.start,f.endA,m,g)&&t.someProp("handleKeyDown",(e=>e(t,Pd(8,"Backspace")))))return void(xd&&gd&&t.domObserver.suppressSelectionUpdates());gd&&xd&&f.endB==f.start&&(t.input.lastAndroidDelete=Date.now()),xd&&!y&&m.start()!=g.start()&&0==g.parentOffset&&m.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==f.endA&&(f.endB-=2,g=l.doc.resolveNoCache(f.endB-l.from),setTimeout((()=>{t.someProp("handleKeyDown",(function(e){return e(t,Pd(13,"Enter"))}))}),20));let b,w,x,S=f.start,k=f.endA;if(y)if(m.pos==g.pos)hd&&fd<=11&&0==m.parentOffset&&(t.domObserver.suppressSelectionUpdates(),setTimeout((()=>Ch(t)),20)),b=t.state.tr.delete(S,k),w=d.resolve(f.start).marksAcross(d.resolve(f.endA));else if(f.endA==f.endB&&(x=function(t,e){let n,r,o,i=t.firstChild.marks,s=e.firstChild.marks,a=i,l=s;for(let u=0;u<s.length;u++)a=s[u].removeFromSet(a);for(let u=0;u<i.length;u++)l=i[u].removeFromSet(l);if(1==a.length&&0==l.length)r=a[0],n="add",o=t=>t.mark(r.addToSet(t.marks));else{if(0!=a.length||1!=l.length)return null;r=l[0],n="remove",o=t=>t.mark(r.removeFromSet(t.marks))}let c=[];for(let u=0;u<e.childCount;u++)c.push(o(e.child(u)));if(ec.from(c).eq(t))return{mark:r,type:n}}(m.parent.content.cut(m.parentOffset,g.parentOffset),v.parent.content.cut(v.parentOffset,f.endA-v.start()))))b=t.state.tr,"add"==x.type?b.addMark(S,k,x.mark):b.removeMark(S,k,x.mark);else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let e=m.parent.textBetween(m.parentOffset,g.parentOffset);if(t.someProp("handleTextInput",(n=>n(t,S,k,e))))return;b=t.state.tr.insertText(e,S,k)}if(b||(b=t.state.tr.replace(S,k,l.doc.slice(f.start-l.from,f.endB-l.from))),l.sel){let e=rp(t,b.doc,l.sel);e&&!(gd&&xd&&t.composing&&e.empty&&(f.start!=f.endB||t.input.lastAndroidDelete<Date.now()-100)&&(e.head==S||e.head==b.mapping.map(k)-1)||hd&&e.empty&&e.head==S)&&b.setSelection(e)}w&&b.ensureMarks(w),t.dispatch(b.scrollIntoView())}function rp(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:Ah(t,e.resolve(n.anchor),e.resolve(n.head))}function op(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let e=t.node(r).maybeChild(t.indexAfter(r));for(;e&&!e.isLeaf;)e=e.firstChild,o++}return o}class ip{constructor(t,e){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new cf,this.prevDirectPlugins=[],this.pluginViews=[],this.dragging=null,this._props=e,this.state=e.state,this.directPlugins=e.plugins||[],this.directPlugins.forEach(up),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):"function"==typeof t?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=lp(this),ap(this),this.nodeViews=cp(this),this.docView=lh(this.state.doc,sp(this),Uf(this),this.dom,this),this.domObserver=new Qf(this,((t,e,n,r)=>np(this,t,e,n,r))),this.domObserver.start(),function(t){for(let e in af){let n=af[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=e=>{!ff(t,e)||hf(t,e)||!t.editable&&e.type in lf||n(t,e)})}yd&&t.dom.addEventListener("input",(()=>null)),df(t)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let e in t)this._props[e]=t[e];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&df(this),this._props=t,t.plugins&&(t.plugins.forEach(up),this.directPlugins=t.plugins),this.updateStateInner(t.state,!0)}setProps(t){let e={};for(let n in this._props)e[n]=this._props[n];e.state=this.state;for(let n in t)e[n]=t[n];this.update(e)}updateState(t){this.updateStateInner(t,this.state.plugins!=t.plugins)}updateStateInner(t,e){let n=this.state,r=!1,o=!1;if(t.storedMarks&&this.composing&&(Cf(this),o=!0),this.state=t,e){let t=cp(this);(function(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r})(t,this.nodeViews)&&(this.nodeViews=t,r=!0),df(this)}this.editable=lp(this),ap(this);let i=Uf(this),s=sp(this),a=e?"reset":t.scrollToSelection>n.scrollToSelection?"to selection":"preserve",l=r||!this.docView.matchesNode(t.doc,s,i);!l&&t.selection.eq(n.selection)||(o=!0);let c="preserve"==a&&o&&null==this.dom.style.overflowAnchor&&function(t){let e,n,r=t.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let i=(r.left+r.right)/2,s=o+1;s<Math.min(innerHeight,r.bottom);s+=5){let r=t.root.elementFromPoint(i,s);if(!r||r==t.dom||!t.dom.contains(r))continue;let a=r.getBoundingClientRect();if(a.top>=o-20){e=r,n=a.top;break}}return{refDOM:e,refTop:n,stack:Fd(t.dom)}}(this);if(o){this.domObserver.stop();let e=l&&(hd||gd)&&!this.composing&&!n.selection.empty&&!t.selection.empty&&function(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}(n.selection,t.selection);if(l){let n=gd?this.trackWrites=this.domSelection().focusNode:null;!r&&this.docView.update(t.doc,s,i,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=lh(t.doc,s,i,this.dom,this)),n&&!this.trackWrites&&(e=!0)}e||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelection())&&function(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelection();return Dd(e.node,e.offset,n.anchorNode,n.anchorOffset)}(this))?Ch(this,e):(Eh(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}if(this.updatePluginViews(n),"reset"==a)this.dom.scrollTop=0;else if("to selection"==a){let e=this.domSelection().focusNode;if(this.someProp("handleScrollToSelection",(t=>t(this))));else if(t.selection instanceof Wu){let n=this.docView.domAfterPos(t.selection.from);1==n.nodeType&&jd(this,n.getBoundingClientRect(),e)}else jd(this,this.coordsAtPos(t.selection.head,1),e)}else c&&function({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;Ld(n,0==r?0:r-e)}(c)}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(t&&t.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let e=0;e<this.pluginViews.length;e++){let n=this.pluginViews[e];n.update&&n.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let e=this.directPlugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let e=this.state.plugins[t];e.spec.view&&this.pluginViews.push(e.spec.view(this))}}}someProp(t,e){let n,r=this._props&&this._props[t];if(null!=r&&(n=e?e(r):r))return n;for(let i=0;i<this.directPlugins.length;i++){let r=this.directPlugins[i].props[t];if(null!=r&&(n=e?e(r):r))return n}let o=this.state.plugins;if(o)for(let i=0;i<o.length;i++){let r=o[i].props[t];if(null!=r&&(n=e?e(r):r))return n}}hasFocus(){return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(t){if(t.setActive)return t.setActive();if(Bd)return t.focus(Bd);let e=Fd(t);t.focus(null==Bd?{get preventScroll(){return Bd={preventScroll:!0},!0}}:void 0),Bd||(Bd=!1,Ld(e,0))}(this.dom),Ch(this),this.domObserver.start()}get root(){let t=this._root;if(null==t)for(let e=this.dom.parentNode;e;e=e.parentNode)if(9==e.nodeType||11==e.nodeType&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e;return t||document}posAtCoords(t){return Hd(this,t)}coordsAtPos(t,e=1){return Yd(this,t,e)}domAtPos(t,e=0){return this.docView.domFromPos(t,e)}nodeDOM(t){let e=this.docView.descAt(t);return e?e.nodeDOM:null}posAtDOM(t,e,n=-1){let r=this.docView.posFromDOM(t,e,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(t,e){return nh(this,e||this.state,t)}destroy(){this.docView&&(!function(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Uf(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return null==this.docView}dispatchEvent(t){return function(t,e){hf(t,e)||!af[e.type]||!t.editable&&e.type in lf||af[e.type](t,e)}(this,t)}dispatch(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))}domSelection(){return this.root.getSelection()}}function sp(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),e.translate="no",t.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(t.state)),n)for(let t in n)"class"==t&&(e.class+=" "+n[t]),"style"==t?e.style=(e.style?e.style+";":"")+n[t]:e[t]||"contenteditable"==t||"nodeName"==t||(e[t]=String(n[t]))})),[Rf.node(0,t.state.doc.content.size,e)]}function ap(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Rf.widget(t.state.selection.head,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function lp(t){return!t.someProp("editable",(e=>!1===e(t.state)))}function cp(t){let e=Object.create(null);return t.someProp("nodeViews",(t=>{for(let n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n])})),e}function up(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var dp={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},hp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},fp="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),pp="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),mp="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),gp="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),vp="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),yp=fp&&(gp||+fp[1]<57)||mp&&gp,bp=0;bp<10;bp++)dp[48+bp]=dp[96+bp]=String(bp);for(bp=1;bp<=24;bp++)dp[bp+111]="F"+bp;for(bp=65;bp<=90;bp++)dp[bp]=String.fromCharCode(bp+32),hp[bp]=String.fromCharCode(bp);for(var wp in dp)hp.hasOwnProperty(wp)||(hp[wp]=dp[wp]);const xp="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function Sp(t){let e,n,r,o,i=t.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let a=0;a<i.length-1;a++){let t=i[a];if(/^(cmd|meta|m)$/i.test(t))o=!0;else if(/^a(lt)?$/i.test(t))e=!0;else if(/^(c|ctrl|control)$/i.test(t))n=!0;else if(/^s(hift)?$/i.test(t))r=!0;else{if(!/^mod$/i.test(t))throw new Error("Unrecognized modifier name: "+t);xp?o=!0:n=!0}}return e&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function kp(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}function _p(t){return new nd({props:{handleKeyDown:Op(t)}})}function Op(t){let e=function(t){let e=Object.create(null);for(let n in t)e[Sp(n)]=t[n];return e}(t);return function(t,n){let r,o=function(t){var e=!(yp&&(t.ctrlKey||t.altKey||t.metaKey)||(pp||vp)&&t.shiftKey&&t.key&&1==t.key.length)&&t.key||(t.shiftKey?hp:dp)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(n),i=1==o.length&&" "!=o,s=e[kp(o,n,!i)];if(s&&s(t.state,t.dispatch,t))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=dp[n.keyCode])&&r!=o){let o=e[kp(r,n,!0)];if(o&&o(t.state,t.dispatch,t))return!0}else if(i&&n.shiftKey){let r=e[kp(o,n,!0)];if(r&&r(t.state,t.dispatch,t))return!0}return!1}}const Cp=(t,e)=>!t.selection.empty&&(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Mp(t,e,n=!1){for(let r=t;r;r="start"==e?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Dp(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Tp(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}function $p(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Ep=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=$p(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let r=n.after(),o=t.tr.replaceWith(r,r,s.createAndFill());o.setSelection(zu.near(o.doc.resolve(r),1)),e(o.scrollIntoView())}return!0};function Np(t,e,n){let r,o,i=e.nodeBefore,s=e.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),0):!e.parent.canReplace(i,i+1)||!o.isTextblock&&!ku(t.doc,e.pos)||(n&&n(t.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),0)))}(t,e,n))return!0;let a=e.parent.canReplace(e.index(),e.index()+1);if(a&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){let o=e.pos+s.nodeSize,a=ec.empty;for(let t=r.length-1;t>=0;t--)a=ec.from(r[t].create(null,a));a=ec.from(i.copy(a));let l=t.tr.step(new gu(e.pos-1,o,e.pos,o,new ac(a,1,0),r.length,!0)),c=o+2*r.length;ku(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=zu.findFrom(e,1),c=l&&l.$from.blockRange(l.$to),u=c&&bu(c);if(null!=u&&u>=e.depth)return n&&n(t.tr.lift(c,u).scrollIntoView()),!0;if(a&&Mp(s,"start",!0)&&Mp(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=ec.empty;for(let t=o.length-1;t>=0;t--)r=ec.from(o[t].copy(r));n(t.tr.step(new gu(e.pos-o.length,e.pos+s.nodeSize,e.pos+l,e.pos+s.nodeSize-l,new ac(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Ap(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(e.tr.setSelection(Bu.create(e.doc,t<0?o.start(i):o.end(i)))),!0)}}const Pp=Ap(-1),Ip=Ap(1);function Rp(t,e=null){return function(n,r){let{from:o,to:i}=n.selection,s=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(t,e))if(r.type==t)s=!0;else{let e=n.doc.resolve(o),r=e.index();s=e.parent.canReplaceWith(r,r+1,t)}})),!!s&&(r&&r(n.tr.setBlockType(o,i,t,e).scrollIntoView()),!0)}}function zp(t,e=null){return function(n,r){let{empty:o,$cursor:i,ranges:s}=n.selection;if(o&&!i||!function(t,e,n){for(let r=0;r<e.length;r++){let{$from:o,$to:i}=e[r],s=0==o.depth&&t.type.allowsMarkType(n);if(t.nodesBetween(o.pos,i.pos,(t=>{if(s)return!1;s=t.inlineContent&&t.type.allowsMarkType(n)})),s)return!0}return!1}(n.doc,s,t))return!1;if(r)if(i)t.isInSet(n.storedMarks||i.marks())?r(n.tr.removeStoredMark(t)):r(n.tr.addStoredMark(t.create(e)));else{let o=!1,i=n.tr;for(let e=0;!o&&e<s.length;e++){let{$from:r,$to:i}=s[e];o=n.doc.rangeHasMark(r.pos,i.pos,t)}for(let n=0;n<s.length;n++){let{$from:r,$to:a}=s[n];if(o)i.removeMark(r.pos,a.pos,t);else{let n=r.pos,o=a.pos,s=r.nodeAfter,l=a.nodeBefore,c=s&&s.isText?/^\s*/.exec(s.text)[0].length:0,u=l&&l.isText?/\s*$/.exec(l.text)[0].length:0;n+c<o&&(n+=c,o-=u),i.addMark(n,o,t.create(e))}}r(i.scrollIntoView())}return!0}}function jp(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}let Fp=jp(Cp,((t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("backward",t):r.parentOffset>0))return!1;let o=Dp(r);if(!o){let n=r.blockRange(),o=n&&bu(n);return null!=o&&(e&&e(t.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Np(t,o,e))return!0;if(0==r.parent.content.size&&(Mp(i,"end")||Wu.isSelectable(i))){let n=_u(t.doc,r.before(),r.after(),ac.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(Mp(i,"end")?zu.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Wu.create(r.doc,o.pos-i.nodeSize)),e(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0)}),((t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Dp(r)}let s=i&&i.nodeBefore;return!(!s||!Wu.isSelectable(s))&&(e&&e(t.tr.setSelection(Wu.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)})),Lp=jp(Cp,((t,e,n)=>{let{$cursor:r}=t.selection;if(!r||(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size))return!1;let o=Tp(r);if(!o)return!1;let i=o.nodeAfter;if(Np(t,o,e))return!0;if(0==r.parent.content.size&&(Mp(i,"start")||Wu.isSelectable(i))){let n=_u(t.doc,r.before(),r.after(),ac.empty);if(n&&n.slice.size<n.to-n.from){if(e){let r=t.tr.step(n);r.setSelection(Mp(i,"start")?zu.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Wu.create(r.doc,r.mapping.map(o.pos))),e(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1)&&(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0)}),((t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=Tp(r)}let s=i&&i.nodeAfter;return!(!s||!Wu.isSelectable(s))&&(e&&e(t.tr.setSelection(Wu.create(t.doc,i.pos)).scrollIntoView()),!0)}));const Bp={Enter:jp(((t,e)=>{let{$head:n,$anchor:r}=t.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(e&&e(t.tr.insertText("\n").scrollIntoView()),!0)}),((t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Hu||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=$p(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=t.tr.insert(n,i.createAndFill());s.setSelection(Bu.create(s.doc,n+1)),e(s.scrollIntoView())}return!0}),((t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Su(t.doc,r))return e&&e(t.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&bu(r);return null!=o&&(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)}),((t,e)=>{let{$from:n,$to:r}=t.selection;if(t.selection instanceof Wu&&t.selection.node.isBlock)return!(!n.parentOffset||!Su(t.doc,n.pos))&&(e&&e(t.tr.split(n.pos).scrollIntoView()),!0);if(!n.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,i=t.tr;(t.selection instanceof Bu||t.selection instanceof Hu)&&i.deleteSelection();let s=0==n.depth?null:$p(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=o&&s?[{type:s}]:void 0,l=Su(i.doc,i.mapping.map(n.pos),1,a);if(a||l||!Su(i.doc,i.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(i.split(i.mapping.map(n.pos),1,a),!o&&!n.parentOffset&&n.parent.type!=s)){let t=i.mapping.map(n.before()),e=i.doc.resolve(t);s&&n.node(-1).canReplaceWith(e.index(),e.index()+1,s)&&i.setNodeMarkup(i.mapping.map(n.before()),s)}e(i.scrollIntoView())}return!0})),"Mod-Enter":Ep,Backspace:Fp,"Mod-Backspace":Fp,"Shift-Backspace":Fp,Delete:Lp,"Mod-Delete":Lp,"Mod-a":(t,e)=>(e&&e(t.tr.setSelection(new Hu(t.doc))),!0)},Vp={"Ctrl-h":Bp.Backspace,"Alt-Backspace":Bp["Mod-Backspace"],"Ctrl-d":Bp.Delete,"Ctrl-Alt-Backspace":Bp["Mod-Delete"],"Alt-Delete":Bp["Mod-Delete"],"Alt-d":Bp["Mod-Delete"],"Ctrl-a":Pp,"Ctrl-e":Ip};for(let os in Bp)Vp[os]=Bp[os];const Wp=("undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!("undefined"==typeof os||!os.platform)&&"darwin"==os.platform())?Vp:Bp;class qp{constructor(t,e){var n;this.match=t,this.match=t,this.handler="string"==typeof e?(n=e,function(t,e,r,o){let i=n;if(e[1]){let t=e[0].lastIndexOf(e[1]);i+=e[0].slice(t+e[1].length);let n=(r+=t)-o;n>0&&(i=e[0].slice(t-n,t)+i,r=o)}return t.tr.insertText(i,r,o)}):e}}function Hp({rules:t}){let e=new nd({state:{init:()=>null,apply(t,e){let n=t.getMeta(this);return n||(t.selectionSet||t.docChanged?null:e)}},props:{handleTextInput:(n,r,o,i)=>Jp(n,r,o,i,t,e),handleDOMEvents:{compositionend:n=>{setTimeout((()=>{let{$cursor:r}=n.state.selection;r&&Jp(n,r.pos,r.pos,"",t,e)}))}}},isInputRules:!0});return e}function Jp(t,e,n,r,o,i){if(t.composing)return!1;let s=t.state,a=s.doc.resolve(e);if(a.parent.type.spec.code)return!1;let l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,null,"")+r;for(let c=0;c<o.length;c++){let a=o[c].match.exec(l),u=a&&o[c].handler(s,a,e-(a[0].length-r.length),n);if(u)return t.dispatch(u.setMeta(i,{transform:u,from:e,to:n,text:r})),!0}return!1}const Kp=(t,e)=>{let n=t.plugins;for(let r=0;r<n.length;r++){let o,i=n[r];if(i.spec.isInputRules&&(o=i.getState(t))){if(e){let n=t.tr,r=o.transform;for(let t=r.steps.length-1;t>=0;t--)n.step(r.steps[t].invert(r.docs[t]));if(o.text){let e=n.doc.resolve(o.from).marks();n.replaceWith(o.from,o.to,t.schema.text(o.text,e))}else n.delete(o.from,o.to);e(n)}return!0}}return!1};function Yp(t,e,n=null,r){return new qp(t,((t,o,i,s)=>{let a=n instanceof Function?n(o):n,l=t.tr.delete(i,s),c=l.doc.resolve(i).blockRange(),u=c&&wu(c,e,a);if(!u)return null;l.wrap(c,u);let d=l.doc.resolve(i-1).nodeBefore;return d&&d.type==e&&ku(l.doc,i-1)&&(!r||r(o,d))&&l.join(i-1),l}))}function Up(t,e,n=null){return new qp(t,((t,r,o,i)=>{let s=t.doc.resolve(o),a=n instanceof Function?n(r):n;return s.node(-1).canReplaceWith(s.index(-1),s.indexAfter(-1),e)?t.tr.delete(o,i).setBlockType(o,o,e,a):null}))}new qp(/--$/,"—"),new qp(/\.\.\.$/,"…"),new qp(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“"),new qp(/"$/,"”"),new qp(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,""),new qp(/'$/,"");const Gp=["ol",0],Xp=["ul",0],Zp=["li",0],Qp={attrs:{order:{default:1}},parseDOM:[{tag:"ol",getAttrs:t=>({order:t.hasAttribute("start")?+t.getAttribute("start"):1})}],toDOM:t=>1==t.attrs.order?Gp:["ol",{start:t.attrs.order},0]},tm={parseDOM:[{tag:"ul"}],toDOM:()=>Xp},em={parseDOM:[{tag:"li"}],toDOM:()=>Zp,defining:!0};function nm(t,e){let n={};for(let r in t)n[r]=t[r];for(let r in e)n[r]=e[r];return n}function rm(t,e,n){return t.append({ordered_list:nm(Qp,{content:"list_item+",group:n}),bullet_list:nm(tm,{content:"list_item+",group:n}),list_item:nm(em,{content:e})})}function om(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(t)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let t=n.doc.resolve(s.start-2);l=new kc(t,t,s.depth),s.endIndex<s.parent.childCount&&(s=new kc(o,n.doc.resolve(i.end(s.depth)),s.depth)),a=!0}let c=wu(l,t,e,s);return!!c&&(r&&r(function(t,e,n,r,o){let i=ec.empty;for(let u=n.length-1;u>=0;u--)i=ec.from(n[u].type.create(n[u].attrs,i));t.step(new gu(e.start-(r?2:0),e.end,e.start,e.end,new ac(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let a=n.length-s,l=e.start+n.length-(r?2:0),c=e.parent;for(let u=e.startIndex,d=e.endIndex,h=!0;u<d;u++,h=!1)!h&&Su(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=c.child(u).nodeSize;return t}(n.tr,s,c,a,t).scrollIntoView()),!0)}}function im(t){return function(e,n){let{$from:r,$to:o,node:i}=e.selection;if(i&&i.isBlock||r.depth<2||!r.sameParent(o))return!1;let s=r.node(-1);if(s.type!=t)return!1;if(0==r.parent.content.size&&r.node(-1).childCount==r.indexAfter(-1)){if(3==r.depth||r.node(-3).type!=t||r.index(-2)!=r.node(-2).childCount-1)return!1;if(n){let o=ec.empty,i=r.index(-1)?1:r.index(-2)?2:3;for(let t=r.depth-i;t>=r.depth-3;t--)o=ec.from(r.node(t).copy(o));let s=r.indexAfter(-1)<r.node(-2).childCount?1:r.indexAfter(-2)<r.node(-3).childCount?2:3;o=o.append(ec.from(t.createAndFill()));let a=r.before(r.depth-(i-1)),l=e.tr.replace(a,r.after(-s),new ac(o,4-i,0)),c=-1;l.doc.nodesBetween(a,l.doc.content.size,((t,e)=>{if(c>-1)return!1;t.isTextblock&&0==t.content.size&&(c=e+1)})),c>-1&&l.setSelection(zu.near(l.doc.resolve(c))),n(l.scrollIntoView())}return!0}let a=o.pos==r.end()?s.contentMatchAt(0).defaultType:null,l=e.tr.delete(r.pos,o.pos),c=a?[null,{type:a}]:void 0;return!!Su(l.doc,r.pos,2,c)&&(n&&n(l.split(r.pos,2,c).scrollIntoView()),!0)}}function sm(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,(e=>e.childCount>0&&e.firstChild.type==t));return!!i&&(!n||(r.node(i.depth-1).type==t?function(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new gu(i-1,s,i,s,new ac(ec.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new kc(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));return e(o.lift(r,bu(r)).scrollIntoView()),!0}(e,n,t,i):function(t,e,n){let r=t.tr,o=n.parent;for(let f=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)f-=o.child(p).nodeSize,r.delete(f-1,f+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?ec.empty:ec.from(o))))return!1;let d=i.pos,h=d+s.nodeSize;return r.step(new gu(d-(a?1:0),h+(l?1:0),d+1,h-1,new ac((a?ec.empty:ec.from(o.copy(ec.empty))).append(l?ec.empty:ec.from(o.copy(ec.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}(e,n,i)))}}function am(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,(e=>e.childCount>0&&e.firstChild.type==t));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=t)return!1;if(n){let r=l.lastChild&&l.lastChild.type==a.type,o=ec.from(r?t.create():null),s=new ac(ec.from(t.create(null,ec.from(a.type.create(null,o)))),r?3:1,0),c=i.start,u=i.end;n(e.tr.step(new gu(c-(r?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0}}var lm=function(){};lm.prototype.append=function(t){return t.length?(t=lm.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},lm.prototype.prepend=function(t){return t.length?lm.from(t).append(this):this},lm.prototype.appendInner=function(t){return new um(this,t)},lm.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?lm.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},lm.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},lm.prototype.forEach=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length),e<=n?this.forEachInner(t,e,n,0):this.forEachInvertedInner(t,e,n,0)},lm.prototype.map=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(e,n){return r.push(t(e,n))}),e,n),r},lm.from=function(t){return t instanceof lm?t:t&&t.length?new cm(t):lm.empty};var cm=function(t){function e(e){t.call(this),this.values=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(t,n){return 0==t&&n==this.length?this:new e(this.values.slice(t,n))},e.prototype.getInner=function(t){return this.values[t]},e.prototype.forEachInner=function(t,e,n,r){for(var o=e;o<n;o++)if(!1===t(this.values[o],r+o))return!1},e.prototype.forEachInvertedInner=function(t,e,n,r){for(var o=e-1;o>=n;o--)if(!1===t(this.values[o],r+o))return!1},e.prototype.leafAppend=function(t){if(this.length+t.length<=200)return new e(this.values.concat(t.flatten()))},e.prototype.leafPrepend=function(t){if(this.length+t.length<=200)return new e(t.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(lm);lm.empty=new cm([]);var um=function(t){function e(e,n){t.call(this),this.left=e,this.right=n,this.length=e.length+n.length,this.depth=Math.max(e.depth,n.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(t){return t<this.left.length?this.left.get(t):this.right.get(t-this.left.length)},e.prototype.forEachInner=function(t,e,n,r){var o=this.left.length;return!(e<o&&!1===this.left.forEachInner(t,e,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(t,Math.max(e-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},e.prototype.forEachInvertedInner=function(t,e,n,r){var o=this.left.length;return!(e>o&&!1===this.right.forEachInvertedInner(t,e-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(t,Math.min(e,o),n,r))&&void 0)},e.prototype.sliceInner=function(t,e){if(0==t&&e==this.length)return this;var n=this.left.length;return e<=n?this.left.slice(t,e):t>=n?this.right.slice(t-n,e-n):this.left.slice(t,n).append(this.right.slice(0,e-n))},e.prototype.leafAppend=function(t){var n=this.right.leafAppend(t);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(t){var n=this.left.leafPrepend(t);if(n)return new e(n,this.right)},e.prototype.appendInner=function(t){return this.left.depth>=Math.max(this.right.depth,t.depth)+1?new e(this.left,new e(this.right,t)):new e(this,t)},e}(lm),dm=lm;class hm{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}e&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=t.tr,l=[],c=[];return this.items.forEach(((t,e)=>{if(!t.step)return n||(n=this.remapping(o,e+1),r=n.maps.length),r--,void c.push(t);if(n){c.push(new fm(t.map));let e,o=t.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(e=a.mapping.maps[a.mapping.maps.length-1],l.push(new fm(e,void 0,void 0,l.length+c.length))),r--,e&&n.appendMap(e,r)}else a.maybeStep(t.step);return t.selection?(i=n?t.selection.map(n.slice(r)):t.selection,s=new hm(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(t,e,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let c=0;c<t.steps.length;c++){let n,l=t.steps[c].invert(t.docs[c]),u=new fm(t.mapping.maps[c],l,e);(n=a&&a.merge(u))&&(u=n,c?o.pop():s=s.slice(0,s.length-1)),o.push(u),e&&(i++,e=void 0),r||(a=u)}let l=i-n.depth;return l>mm&&(s=function(t,e){let n;return t.forEach(((t,r)=>{if(t.selection&&0==e--)return n=r,!1})),t.slice(n)}(s,l),i-=l),new hm(s.append(o),i)}remapping(t,e){let n=new lu;return this.items.forEach(((e,r)=>{let o=null!=e.mirrorOffset&&r-e.mirrorOffset>=t?n.maps.length-e.mirrorOffset:void 0;n.appendMap(e.map,o)}),t,e),n}addMaps(t){return 0==this.eventCount?this:new hm(this.items.append(t.map((t=>new fm(t)))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-e),o=t.mapping,i=t.steps.length,s=this.eventCount;this.items.forEach((t=>{t.selection&&s--}),r);let a=e;this.items.forEach((e=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(e.step){let i=t.steps[r].invert(t.docs[r]),c=e.selection&&e.selection.map(o.slice(a+1,r));c&&s++,n.push(new fm(l,i,c))}else n.push(new fm(l))}),r);let l=[];for(let d=e;d<i;d++)l.push(new fm(o.maps[d]));let c=this.items.slice(0,r).append(l).append(n),u=new hm(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let t=0;return this.items.forEach((e=>{e.step||t++})),t}compress(t=this.items.length){let e=this.remapping(0,t),n=e.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=t)r.push(i),i.selection&&o++;else if(i.step){let t=i.step.map(e.slice(n)),s=t&&t.getMap();if(n--,s&&e.appendMap(s,n),t){let a=i.selection&&i.selection.map(e.slice(n));a&&o++;let l,c=new fm(s.invert(),t,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new hm(dm.from(r.reverse()),o)}}hm.empty=new hm(dm.empty,0);class fm{constructor(t,e,n,r){this.map=t,this.step=e,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new fm(e.getMap().invert(),e,this.selection)}}}class pm{constructor(t,e,n,r){this.done=t,this.undone=e,this.prevRanges=n,this.prevTime=r}}const mm=20;function gm(t){let e=[];return t.forEach(((t,n,r,o)=>e.push(r,o))),e}function vm(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function ym(t,e,n,r){let o=xm(e),i=Sm.get(e).spec.config,s=(r?t.undone:t.done).popEvent(e,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,o),c=new pm(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(Sm,{redo:r,historyState:c}).scrollIntoView())}let bm=!1,wm=null;function xm(t){let e=t.plugins;if(wm!=e){bm=!1,wm=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){bm=!0;break}}return bm}const Sm=new id("history"),km=new id("closeHistory");function _m(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new nd({key:Sm,state:{init:()=>new pm(hm.empty,hm.empty,null,0),apply:(e,n,r)=>function(t,e,n,r){let o,i=n.getMeta(Sm);if(i)return i.historyState;n.getMeta(km)&&(t=new pm(t.done,t.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return t;if(s&&s.getMeta(Sm))return s.getMeta(Sm).redo?new pm(t.done.addTransform(n,void 0,r,xm(e)),t.undone,gm(n.mapping.maps[n.steps.length-1]),t.prevTime):new pm(t.done,t.undone.addTransform(n,void 0,r,xm(e)),null,t.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new pm(t.done.rebased(n,o),t.undone.rebased(n,o),vm(t.prevRanges,n.mapping),t.prevTime):new pm(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),vm(t.prevRanges,n.mapping),t.prevTime);{let o=0==t.prevTime||!s&&(t.prevTime<(n.time||0)-r.newGroupDelay||!function(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach(((t,r)=>{for(let o=0;o<e.length;o+=2)t<=e[o+1]&&r>=e[o]&&(n=!0)})),n}(n,t.prevRanges)),i=s?vm(t.prevRanges,n.mapping):gm(n.mapping.maps[n.steps.length-1]);return new pm(t.done.addTransform(n,o?e.selection.getBookmark():void 0,r,xm(e)),hm.empty,i,n.time)}}(n,r,e,t)},config:t,props:{handleDOMEvents:{beforeinput(t,e){let n=e.inputType,r="historyUndo"==n?Om:"historyRedo"==n?Cm:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const Om=(t,e)=>{let n=Sm.getState(t);return!(!n||0==n.done.eventCount)&&(e&&ym(n,t,e,!1),!0)},Cm=(t,e)=>{let n=Sm.getState(t);return!(!n||0==n.undone.eventCount)&&(e&&ym(n,t,e,!0),!0)};function Mm(t){let e=Sm.getState(t);return e?e.done.eventCount:0}function Dm(t){let e=Sm.getState(t);return e?e.undone.eventCount:0}var Tm={},$m={},Em={},Nm={};Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.default=void 0;var Am=Ll.withParams;Nm.default=Am,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.req=t.regex=t.ref=t.len=void 0,Object.defineProperty(t,"withParams",{enumerable:!0,get:function(){return n.default}});var e,n=(e=Nm)&&e.__esModule?e:{default:e};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=function(t){if(Array.isArray(t))return!!t.length;if(null==t)return!1;if(!1===t)return!0;if(t instanceof Date)return!isNaN(t.getTime());if("object"===r(t)){for(var e in t)return!0;return!1}return!!String(t).length};t.req=o;t.len=function(t){return Array.isArray(t)?t.length:"object"===r(t)?Object.keys(t).length:String(t).length};t.ref=function(t,e,n){return"function"==typeof t?t.call(e,n):n[t]};t.regex=function(t,e){return(0,n.default)({type:t},(function(t){return!o(t)||e.test(t)}))}}(Em),Object.defineProperty($m,"__esModule",{value:!0}),$m.default=void 0;var Pm=(0,Em.regex)("alpha",/^[a-zA-Z]*$/);$m.default=Pm;var Im={};Object.defineProperty(Im,"__esModule",{value:!0}),Im.default=void 0;var Rm=(0,Em.regex)("alphaNum",/^[a-zA-Z0-9]*$/);Im.default=Rm;var zm={};Object.defineProperty(zm,"__esModule",{value:!0}),zm.default=void 0;var jm=(0,Em.regex)("numeric",/^[0-9]*$/);zm.default=jm;var Fm={};Object.defineProperty(Fm,"__esModule",{value:!0}),Fm.default=void 0;var Lm=Em;Fm.default=function(t,e){return(0,Lm.withParams)({type:"between",min:t,max:e},(function(n){return!(0,Lm.req)(n)||(!/\s/.test(n)||n instanceof Date)&&+t<=+n&&+e>=+n}))};var Bm={};Object.defineProperty(Bm,"__esModule",{value:!0}),Bm.default=void 0;var Vm=(0,Em.regex)("email",/^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i);Bm.default=Vm;var Wm={};Object.defineProperty(Wm,"__esModule",{value:!0}),Wm.default=void 0;var qm=Em,Hm=(0,qm.withParams)({type:"ipAddress"},(function(t){if(!(0,qm.req)(t))return!0;if("string"!=typeof t)return!1;var e=t.split(".");return 4===e.length&&e.every(Jm)}));Wm.default=Hm;var Jm=function(t){if(t.length>3||0===t.length)return!1;if("0"===t[0]&&"0"!==t)return!1;if(!t.match(/^\d+$/))return!1;var e=0|+t;return e>=0&&e<=255},Km={};Object.defineProperty(Km,"__esModule",{value:!0}),Km.default=void 0;var Ym=Em;Km.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:":";return(0,Ym.withParams)({type:"macAddress"},(function(e){if(!(0,Ym.req)(e))return!0;if("string"!=typeof e)return!1;var n="string"==typeof t&&""!==t?e.split(t):12===e.length||16===e.length?e.match(/.{2}/g):null;return null!==n&&(6===n.length||8===n.length)&&n.every(Um)}))};var Um=function(t){return t.toLowerCase().match(/^[0-9a-f]{2}$/)},Gm={};Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.default=void 0;var Xm=Em;Gm.default=function(t){return(0,Xm.withParams)({type:"maxLength",max:t},(function(e){return!(0,Xm.req)(e)||(0,Xm.len)(e)<=t}))};var Zm={};Object.defineProperty(Zm,"__esModule",{value:!0}),Zm.default=void 0;var Qm=Em;Zm.default=function(t){return(0,Qm.withParams)({type:"minLength",min:t},(function(e){return!(0,Qm.req)(e)||(0,Qm.len)(e)>=t}))};var tg={};Object.defineProperty(tg,"__esModule",{value:!0}),tg.default=void 0;var eg=Em,ng=(0,eg.withParams)({type:"required"},(function(t){return(0,eg.req)("string"==typeof t?t.trim():t)}));tg.default=ng;var rg={};Object.defineProperty(rg,"__esModule",{value:!0}),rg.default=void 0;var og=Em;rg.default=function(t){return(0,og.withParams)({type:"requiredIf",prop:t},(function(e,n){return!(0,og.ref)(t,this,n)||(0,og.req)(e)}))};var ig={};Object.defineProperty(ig,"__esModule",{value:!0}),ig.default=void 0;var sg=Em;ig.default=function(t){return(0,sg.withParams)({type:"requiredUnless",prop:t},(function(e,n){return!!(0,sg.ref)(t,this,n)||(0,sg.req)(e)}))};var ag={};Object.defineProperty(ag,"__esModule",{value:!0}),ag.default=void 0;var lg=Em;ag.default=function(t){return(0,lg.withParams)({type:"sameAs",eq:t},(function(e,n){return e===(0,lg.ref)(t,this,n)}))};var cg={};Object.defineProperty(cg,"__esModule",{value:!0}),cg.default=void 0;var ug=(0,Em.regex)("url",/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i);cg.default=ug;var dg={};Object.defineProperty(dg,"__esModule",{value:!0}),dg.default=void 0;var hg=Em;dg.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,hg.withParams)({type:"or"},(function(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.length>0&&e.reduce((function(e,n){return e||n.apply(t,r)}),!1)}))};var fg={};Object.defineProperty(fg,"__esModule",{value:!0}),fg.default=void 0;var pg=Em;fg.default=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return(0,pg.withParams)({type:"and"},(function(){for(var t=this,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.length>0&&e.reduce((function(e,n){return e&&n.apply(t,r)}),!0)}))};var mg={};Object.defineProperty(mg,"__esModule",{value:!0}),mg.default=void 0;var gg=Em;mg.default=function(t){return(0,gg.withParams)({type:"not"},(function(e,n){return!(0,gg.req)(e)||!t.call(this,e,n)}))};var vg={};Object.defineProperty(vg,"__esModule",{value:!0}),vg.default=void 0;var yg=Em;vg.default=function(t){return(0,yg.withParams)({type:"minValue",min:t},(function(e){return!(0,yg.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e>=+t}))};var bg={};Object.defineProperty(bg,"__esModule",{value:!0}),bg.default=void 0;var wg=Em;bg.default=function(t){return(0,wg.withParams)({type:"maxValue",max:t},(function(e){return!(0,wg.req)(e)||(!/\s/.test(e)||e instanceof Date)&&+e<=+t}))};var xg={};Object.defineProperty(xg,"__esModule",{value:!0}),xg.default=void 0;var Sg=(0,Em.regex)("integer",/(^[0-9]*$)|(^-[0-9]+$)/);xg.default=Sg;var kg={};Object.defineProperty(kg,"__esModule",{value:!0}),kg.default=void 0;var _g=(0,Em.regex)("decimal",/^[-]?\d*(\.\d+)?$/);
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
function Og(t){return(Og="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Cg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mg(){return Mg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mg.apply(this,arguments)}function Dg(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){Cg(t,e,n[e])}))}return t}function Tg(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}kg.default=_g,function(t){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"alpha",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"alphaNum",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"and",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(t,"between",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"decimal",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(t,"email",{enumerable:!0,get:function(){return s.default}}),t.helpers=void 0,Object.defineProperty(t,"integer",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(t,"ipAddress",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"macAddress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"maxLength",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"maxValue",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(t,"minLength",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"minValue",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(t,"not",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(t,"numeric",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"or",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(t,"required",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"requiredIf",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(t,"requiredUnless",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(t,"sameAs",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(t,"url",{enumerable:!0,get:function(){return m.default}});var n=O($m),r=O(Im),o=O(zm),i=O(Fm),s=O(Bm),a=O(Wm),l=O(Km),c=O(Gm),u=O(Zm),d=O(tg),h=O(rg),f=O(ig),p=O(ag),m=O(cg),g=O(dg),v=O(fg),y=O(mg),b=O(vg),w=O(bg),x=O(xg),S=O(kg),k=function(t,n){if(!n&&t&&t.__esModule)return t;if(null===t||"object"!==e(t)&&"function"!=typeof t)return{default:t};var r=_(n);if(r&&r.has(t))return r.get(t);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=i?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(o,s,a):o[s]=t[s]}o.default=t,r&&r.set(t,o);return o}(Em);function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}function O(t){return t&&t.__esModule?t:{default:t}}t.helpers=k}(Tm);function $g(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var Eg=$g(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ng=$g(/Edge/i),Ag=$g(/firefox/i),Pg=$g(/safari/i)&&!$g(/chrome/i)&&!$g(/android/i),Ig=$g(/iP(ad|od|hone)/i),Rg=$g(/chrome/i)&&$g(/android/i),zg={capture:!1,passive:!1};function jg(t,e,n){t.addEventListener(e,n,!Eg&&zg)}function Fg(t,e,n){t.removeEventListener(e,n,!Eg&&zg)}function Lg(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function Bg(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function Vg(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&Lg(t,e):Lg(t,e))||r&&t===n)return t;if(t===n)break}while(t=Bg(t))}return null}var Wg,qg=/\s+/g;function Hg(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(qg," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(qg," ")}}function Jg(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"==typeof n?"":"px")}}function Kg(t,e){var n="";if("string"==typeof t)n=t;else do{var r=Jg(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Yg(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function Ug(){var t=document.scrollingElement;return t||document.documentElement}function Gg(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var i,s,a,l,c,u,d;if(t!==window&&t!==Ug()?(s=(i=t.getBoundingClientRect()).top,a=i.left,l=i.bottom,c=i.right,u=i.height,d=i.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,d=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!Eg))do{if(o&&o.getBoundingClientRect&&("none"!==Jg(o,"transform")||n&&"static"!==Jg(o,"position"))){var h=o.getBoundingClientRect();s-=h.top+parseInt(Jg(o,"border-top-width")),a-=h.left+parseInt(Jg(o,"border-left-width")),l=s+i.height,c=a+i.width;break}}while(o=o.parentNode);if(r&&t!==window){var f=Kg(o||t),p=f&&f.a,m=f&&f.d;f&&(l=(s/=m)+(u/=m),c=(a/=p)+(d/=p))}return{top:s,left:a,bottom:l,right:c,width:d,height:u}}}function Xg(t,e,n){for(var r=nv(t,!0),o=Gg(t)[e];r;){var i=Gg(r)[n];if(!("top"===n||"left"===n?o>=i:o<=i))return r;if(r===Ug())break;r=nv(r,!1)}return!1}function Zg(t,e,n){for(var r=0,o=0,i=t.children;o<i.length;){if("none"!==i[o].style.display&&i[o]!==oy.ghost&&i[o]!==oy.dragged&&Vg(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function Qg(t,e){for(var n=t.lastElementChild;n&&(n===oy.ghost||"none"===Jg(n,"display")||e&&!Lg(n,e));)n=n.previousElementSibling;return n||null}function tv(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===oy.clone||e&&!Lg(t,e)||n++;return n}function ev(t){var e=0,n=0,r=Ug();if(t)do{var o=Kg(t),i=o.a,s=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*s}while(t!==r&&(t=t.parentNode));return[e,n]}function nv(t,e){if(!t||!t.getBoundingClientRect)return Ug();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=Jg(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Ug();if(r||e)return n;r=!0}}}while(n=n.parentNode);return Ug()}function rv(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function ov(t,e){return function(){if(!Wg){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),Wg=setTimeout((function(){Wg=void 0}),e)}}}function iv(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function sv(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}var av="Sortable"+(new Date).getTime();function lv(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Jg(t,"display")&&t!==oy.ghost){e.push({target:t,rect:Gg(t)});var n=Dg({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=Kg(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var o=!1,i=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Gg(n),l=n.prevFromRect,c=n.prevToRect,u=t.rect,d=Kg(n,!0);d&&(a.top-=d.f,a.left-=d.e),n.toRect=a,n.thisAnimationDuration&&rv(l,a)&&!rv(s,a)&&(u.top-a.top)/(u.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}(u,l,c,r.options)),rv(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=r.options.animation),r.animate(n,u,a,e)),e&&(o=!0,i=Math.max(i,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){Jg(t,"transition",""),Jg(t,"transform","");var o=Kg(this.el),i=o&&o.a,s=o&&o.d,a=(e.left-n.left)/(i||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Jg(t,"transform","translate3d("+a+"px,"+l+"px,0)"),function(t){t.offsetWidth}(t),Jg(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),Jg(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Jg(t,"transition",""),Jg(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}var cv=[],uv={initializeByDefault:!0},dv={mount:function(t){for(var e in uv)uv.hasOwnProperty(e)&&!(e in t)&&(t[e]=uv[e]);cv.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";cv.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](Dg({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](Dg({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in cv.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var i=new r(t,e,t.options);i.sortable=t,i.options=t.options,t[o]=i,Mg(n,i.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var i=this.modifyOption(t,o,t.options[o]);void 0!==i&&(t.options[o]=i)}},getEventProperties:function(t,e){var n={};return cv.forEach((function(r){"function"==typeof r.eventProperties&&Mg(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return cv.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};var hv=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=Tg(n,["evt"]);dv.pluginEvent.bind(oy)(t,e,Dg({dragEl:pv,parentEl:mv,ghostEl:gv,rootEl:vv,nextEl:yv,lastDownEl:bv,cloneEl:wv,cloneHidden:xv,dragStarted:Pv,putSortable:Mv,activeSortable:oy.active,originalEvent:r,oldIndex:Sv,oldDraggableIndex:_v,newIndex:kv,newDraggableIndex:Ov,hideGhostForTarget:ty,unhideGhostForTarget:ey,cloneNowHidden:function(){xv=!0},cloneNowShown:function(){xv=!1},dispatchSortableEvent:function(t){fv({sortable:e,name:t,originalEvent:r})}},o))};function fv(t){!function(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,f=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[av]){var m,g=e.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||Eg||Ng?(m=document.createEvent("Event")).initEvent(r,!0,!0):m=new CustomEvent(r,{bubbles:!0,cancelable:!0}),m.to=s||n,m.from=a||n,m.item=o||n,m.clone=i,m.oldIndex=l,m.newIndex=c,m.oldDraggableIndex=u,m.newDraggableIndex=d,m.originalEvent=h,m.pullMode=f?f.lastPutMode:void 0;var y=Dg({},p,dv.getEventProperties(r,e));for(var b in y)m[b]=y[b];n&&n.dispatchEvent(m),g[v]&&g[v].call(e,m)}}(Dg({putSortable:Mv,cloneEl:wv,targetEl:pv,rootEl:vv,oldIndex:Sv,oldDraggableIndex:_v,newIndex:kv,newDraggableIndex:Ov},t))}var pv,mv,gv,vv,yv,bv,wv,xv,Sv,kv,_v,Ov,Cv,Mv,Dv,Tv,$v,Ev,Nv,Av,Pv,Iv,Rv,zv,jv,Fv=!1,Lv=!1,Bv=[],Vv=!1,Wv=!1,qv=[],Hv=!1,Jv=[],Kv="undefined"!=typeof document,Yv=Ig,Uv=Ng||Eg?"cssFloat":"float",Gv=Kv&&!Rg&&!Ig&&"draggable"in document.createElement("div"),Xv=function(){if(Kv){if(Eg)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Zv=function(t,e){var n=Jg(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=Zg(t,0,e),i=Zg(t,1,e),s=o&&Jg(o),a=i&&Jg(i),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Gg(o).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Gg(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&"none"!==s.float){var u="left"===s.float?"left":"right";return!i||"both"!==a.clear&&a.clear!==u?"horizontal":"vertical"}return o&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=r&&"none"===n[Uv]||i&&"none"===n[Uv]&&l+c>r)?"vertical":"horizontal"},Qv=function(t){function e(t,n){return function(r,o,i,s){var a=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(r,o,i,s),n)(r,o,i,s);var l=(n?r:o).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},r=t.group;r&&"object"==Og(r)||(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},ty=function(){!Xv&&gv&&Jg(gv,"display","none")},ey=function(){!Xv&&gv&&Jg(gv,"display","")};Kv&&document.addEventListener("click",(function(t){if(Lv)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Lv=!1,!1}),!0);var ny=function(t){if(pv){t=t.touches?t.touches[0]:t;var e=(o=t.clientX,i=t.clientY,Bv.some((function(t){if(!Qg(t)){var e=Gg(t),n=t[av].options.emptyInsertThreshold,r=o>=e.left-n&&o<=e.right+n,a=i>=e.top-n&&i<=e.bottom+n;return n&&r&&a?s=t:void 0}})),s);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[av]._onDragOver(n)}}var o,i,s},ry=function(t){pv&&pv.parentNode[av]._isOutsideThisEl(t.target)};function oy(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=Mg({},e),t[av]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zv(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==oy.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in dv.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Qv(e),this)"_"===o.charAt(0)&&"function"==typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&Gv,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?jg(t,"pointerdown",this._onTapStart):(jg(t,"mousedown",this._onTapStart),jg(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(jg(t,"dragover",this),jg(t,"dragenter",this)),Bv.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Mg(this,lv())}function iy(t,e,n,r,o,i,s,a){var l,c,u=t[av],d=u.options.onMove;return!window.CustomEvent||Eg||Ng?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=o||e,l.relatedRect=i||Gg(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),d&&(c=d.call(u,l,s)),c}function sy(t){t.draggable=!1}function ay(){Hv=!1}function ly(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;n--;)r+=e.charCodeAt(n);return r.toString(36)}function cy(t){return setTimeout(t,0)}function uy(t){return clearTimeout(t)}oy.prototype={constructor:oy,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(Iv=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,pv):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=r.filter;if(function(t){Jv.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var r=e[n];r.checked&&Jv.push(r)}}(n),!pv&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled||l.isContentEditable||(a=Vg(a,r.draggable,n,!1))&&a.animated||bv===a)){if(Sv=tv(a),_v=tv(a,r.draggable),"function"==typeof c){if(c.call(this,t,a,this))return fv({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),hv("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=Vg(l,r.trim(),n,!1))return fv({sortable:e,rootEl:r,name:"filter",targetEl:a,fromEl:n,toEl:n}),hv("filter",e,{evt:t}),!0}))))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!Vg(l,r.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,s=o.options,a=i.ownerDocument;if(n&&!pv&&n.parentNode===i){var l=Gg(n);if(vv=i,mv=(pv=n).parentNode,yv=pv.nextSibling,bv=n,Cv=s.group,oy.dragged=pv,Dv={target:pv,clientX:(e||t).clientX,clientY:(e||t).clientY},Nv=Dv.clientX-l.left,Av=Dv.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,pv.style["will-change"]="all",r=function(){hv("delayEnded",o,{evt:t}),oy.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!Ag&&o.nativeDraggable&&(pv.draggable=!0),o._triggerDragStart(t,e),fv({sortable:o,name:"choose",originalEvent:t}),Hg(pv,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Yg(pv,t.trim(),sy)})),jg(a,"dragover",ny),jg(a,"mousemove",ny),jg(a,"touchmove",ny),jg(a,"mouseup",o._onDrop),jg(a,"touchend",o._onDrop),jg(a,"touchcancel",o._onDrop),Ag&&this.nativeDraggable&&(this.options.touchStartThreshold=4,pv.draggable=!0),hv("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(Ng||Eg))r();else{if(oy.eventCanceled)return void this._onDrop();jg(a,"mouseup",o._disableDelayedDrag),jg(a,"touchend",o._disableDelayedDrag),jg(a,"touchcancel",o._disableDelayedDrag),jg(a,"mousemove",o._delayedDragTouchMoveHandler),jg(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&jg(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){pv&&sy(pv),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;Fg(t,"mouseup",this._disableDelayedDrag),Fg(t,"touchend",this._disableDelayedDrag),Fg(t,"touchcancel",this._disableDelayedDrag),Fg(t,"mousemove",this._delayedDragTouchMoveHandler),Fg(t,"touchmove",this._delayedDragTouchMoveHandler),Fg(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?jg(document,"pointermove",this._onTouchMove):jg(document,e?"touchmove":"mousemove",this._onTouchMove):(jg(pv,"dragend",this),jg(vv,"dragstart",this._onDragStart));try{document.selection?cy((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(Fv=!1,vv&&pv){hv("dragStarted",this,{evt:e}),this.nativeDraggable&&jg(document,"dragover",ry);var n=this.options;!t&&Hg(pv,n.dragClass,!1),Hg(pv,n.ghostClass,!0),oy.active=this,t&&this._appendGhost(),fv({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(Tv){this._lastX=Tv.clientX,this._lastY=Tv.clientY,ty();for(var t=document.elementFromPoint(Tv.clientX,Tv.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Tv.clientX,Tv.clientY))!==e;)e=t;if(pv.parentNode[av]._isOutsideThisEl(t),e)do{if(e[av]){if(e[av]._onDragOver({clientX:Tv.clientX,clientY:Tv.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);ey()}},_onTouchMove:function(t){if(Dv){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=gv&&Kg(gv,!0),s=gv&&i&&i.a,a=gv&&i&&i.d,l=Yv&&jv&&ev(jv),c=(o.clientX-Dv.clientX+r.x)/(s||1)+(l?l[0]-qv[0]:0)/(s||1),u=(o.clientY-Dv.clientY+r.y)/(a||1)+(l?l[1]-qv[1]:0)/(a||1);if(!oy.active&&!Fv){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(gv){i?(i.e+=c-($v||0),i.f+=u-(Ev||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");Jg(gv,"webkitTransform",d),Jg(gv,"mozTransform",d),Jg(gv,"msTransform",d),Jg(gv,"transform",d),$v=c,Ev=u,Tv=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!gv){var t=this.options.fallbackOnBody?document.body:vv,e=Gg(pv,!0,Yv,!0,t),n=this.options;if(Yv){for(jv=t;"static"===Jg(jv,"position")&&"none"===Jg(jv,"transform")&&jv!==document;)jv=jv.parentNode;jv!==document.body&&jv!==document.documentElement?(jv===document&&(jv=Ug()),e.top+=jv.scrollTop,e.left+=jv.scrollLeft):jv=Ug(),qv=ev(jv)}Hg(gv=pv.cloneNode(!0),n.ghostClass,!1),Hg(gv,n.fallbackClass,!0),Hg(gv,n.dragClass,!0),Jg(gv,"transition",""),Jg(gv,"transform",""),Jg(gv,"box-sizing","border-box"),Jg(gv,"margin",0),Jg(gv,"top",e.top),Jg(gv,"left",e.left),Jg(gv,"width",e.width),Jg(gv,"height",e.height),Jg(gv,"opacity","0.8"),Jg(gv,"position",Yv?"absolute":"fixed"),Jg(gv,"zIndex","100000"),Jg(gv,"pointerEvents","none"),oy.ghost=gv,t.appendChild(gv),Jg(gv,"transform-origin",Nv/parseInt(gv.style.width)*100+"% "+Av/parseInt(gv.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;hv("dragStart",this,{evt:t}),oy.eventCanceled?this._onDrop():(hv("setupClone",this),oy.eventCanceled||((wv=sv(pv)).draggable=!1,wv.style["will-change"]="",this._hideClone(),Hg(wv,this.options.chosenClass,!1),oy.clone=wv),n.cloneId=cy((function(){hv("clone",n),oy.eventCanceled||(n.options.removeCloneOnHide||vv.insertBefore(wv,pv),n._hideClone(),fv({sortable:n,name:"clone"}))})),!e&&Hg(pv,o.dragClass,!0),e?(Lv=!0,n._loopId=setInterval(n._emulateDragOver,50)):(Fg(document,"mouseup",n._onDrop),Fg(document,"touchend",n._onDrop),Fg(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,pv)),jg(document,"drop",n),Jg(pv,"transform","translateZ(0)")),Fv=!0,n._dragStartId=cy(n._dragStarted.bind(n,e,t)),jg(document,"selectstart",n),Pv=!0,Pg&&Jg(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,i=this.el,s=t.target,a=this.options,l=a.group,c=oy.active,u=Cv===l,d=a.sort,h=Mv||c,f=this,p=!1;if(!Hv){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=Vg(s,a.draggable,i,!0),D("dragOver"),oy.eventCanceled)return p;if(pv.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return $(!1);if(Lv=!1,c&&!a.disabled&&(u?d||(r=!vv.contains(pv)):Mv===this||(this.lastPutMode=Cv.checkPull(this,c,pv,t))&&l.checkPut(this,c,pv,t))){if(o="vertical"===this._getDirection(t,s),e=Gg(pv),D("dragOverValid"),oy.eventCanceled)return p;if(r)return mv=vv,T(),this._hideClone(),D("revert"),oy.eventCanceled||(yv?vv.insertBefore(pv,yv):vv.appendChild(pv)),$(!0);var m=Qg(i,a.draggable);if(!m||function(t,e,n){var r=Gg(Qg(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}(t,o,this)&&!m.animated){if(m===pv)return $(!1);if(m&&i===t.target&&(s=m),s&&(n=Gg(s)),!1!==iy(vv,i,pv,e,s,n,t,!!s))return T(),i.appendChild(pv),mv=i,E(),$(!0)}else if(s.parentNode===i){n=Gg(s);var g,v,y,b=pv.parentNode!==i,w=!function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return r===s||o===a||r+i/2===s+l/2}(pv.animated&&pv.toRect||e,s.animated&&s.toRect||n,o),x=o?"top":"left",S=Xg(s,"top","top")||Xg(pv,"top","top"),k=S?S.scrollTop:void 0;if(Iv!==s&&(v=n[x],Vv=!1,Wv=!w&&a.invertSwap||b),g=function(t,e,n,r,o,i,s,a){var l=r?t.clientY:t.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,h=!1;if(!s)if(a&&zv<c*o){if(!Vv&&(1===Rv?l>u+c*i/2:l<d-c*i/2)&&(Vv=!0),Vv)h=!0;else if(1===Rv?l<u+zv:l>d-zv)return-Rv}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return function(t){return tv(pv)<tv(t)?1:-1}(e);if((h=h||s)&&(l<u+c*i/2||l>d-c*i/2))return l>u+c/2?1:-1;return 0}(t,s,n,o,w?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,Wv,Iv===s),0!==g){var _=tv(pv);do{_-=g,y=mv.children[_]}while(y&&("none"===Jg(y,"display")||y===gv))}if(0===g||y===s)return $(!1);Iv=s,Rv=g;var O=s.nextElementSibling,C=!1,M=iy(vv,i,pv,e,s,n,t,C=1===g);if(!1!==M)return 1!==M&&-1!==M||(C=1===M),Hv=!0,setTimeout(ay,30),T(),C&&!O?i.appendChild(pv):s.parentNode.insertBefore(pv,C?O:s),S&&iv(S,0,k-S.scrollTop),mv=pv.parentNode,void 0===v||Wv||(zv=Math.abs(v-Gg(s)[x])),E(),$(!0)}if(i.contains(pv))return $(!1)}return!1}function D(a,l){hv(a,f,Dg({evt:t,isOwner:u,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:h,target:s,completed:$,onMove:function(n,r){return iy(vv,i,pv,e,n,Gg(n),t,r)},changed:E},l))}function T(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function $(e){return D("dragOverCompleted",{insertion:e}),e&&(u?c._hideClone():c._showClone(f),f!==h&&(Hg(pv,Mv?Mv.options.ghostClass:c.options.ghostClass,!1),Hg(pv,a.ghostClass,!0)),Mv!==f&&f!==oy.active?Mv=f:f===oy.active&&Mv&&(Mv=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll((function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===pv&&!pv.animated||s===i&&!s.animated)&&(Iv=null),a.dragoverBubble||t.rootEl||s===document||(pv.parentNode[av]._isOutsideThisEl(t.target),!e&&ny(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),p=!0}function E(){kv=tv(pv),Ov=tv(pv,a.draggable),fv({sortable:f,name:"change",toEl:i,newIndex:kv,newDraggableIndex:Ov,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){Fg(document,"mousemove",this._onTouchMove),Fg(document,"touchmove",this._onTouchMove),Fg(document,"pointermove",this._onTouchMove),Fg(document,"dragover",ny),Fg(document,"mousemove",ny),Fg(document,"touchmove",ny)},_offUpEvents:function(){var t=this.el.ownerDocument;Fg(t,"mouseup",this._onDrop),Fg(t,"touchend",this._onDrop),Fg(t,"pointerup",this._onDrop),Fg(t,"touchcancel",this._onDrop),Fg(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;kv=tv(pv),Ov=tv(pv,n.draggable),hv("drop",this,{evt:t}),mv=pv&&pv.parentNode,kv=tv(pv),Ov=tv(pv,n.draggable),oy.eventCanceled||(Fv=!1,Wv=!1,Vv=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),uy(this.cloneId),uy(this._dragStartId),this.nativeDraggable&&(Fg(document,"drop",this),Fg(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Pg&&Jg(document.body,"user-select",""),Jg(pv,"transform",""),t&&(Pv&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),gv&&gv.parentNode&&gv.parentNode.removeChild(gv),(vv===mv||Mv&&"clone"!==Mv.lastPutMode)&&wv&&wv.parentNode&&wv.parentNode.removeChild(wv),pv&&(this.nativeDraggable&&Fg(pv,"dragend",this),sy(pv),pv.style["will-change"]="",Pv&&!Fv&&Hg(pv,Mv?Mv.options.ghostClass:this.options.ghostClass,!1),Hg(pv,this.options.chosenClass,!1),fv({sortable:this,name:"unchoose",toEl:mv,newIndex:null,newDraggableIndex:null,originalEvent:t}),vv!==mv?(kv>=0&&(fv({rootEl:mv,name:"add",toEl:mv,fromEl:vv,originalEvent:t}),fv({sortable:this,name:"remove",toEl:mv,originalEvent:t}),fv({rootEl:mv,name:"sort",toEl:mv,fromEl:vv,originalEvent:t}),fv({sortable:this,name:"sort",toEl:mv,originalEvent:t})),Mv&&Mv.save()):kv!==Sv&&kv>=0&&(fv({sortable:this,name:"update",toEl:mv,originalEvent:t}),fv({sortable:this,name:"sort",toEl:mv,originalEvent:t})),oy.active&&(null!=kv&&-1!==kv||(kv=Sv,Ov=_v),fv({sortable:this,name:"end",toEl:mv,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){hv("nulling",this),vv=pv=mv=gv=yv=wv=bv=xv=Dv=Tv=Pv=kv=Ov=Sv=_v=Iv=Rv=Mv=Cv=oy.dragged=oy.ghost=oy.clone=oy.active=null,Jv.forEach((function(t){t.checked=!0})),Jv.length=$v=Ev=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":pv&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)Vg(t=n[r],i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||ly(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];Vg(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Vg(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=dv.modifyOption(this,t,e);n[t]=void 0!==r?r:e,"group"===t&&Qv(n)},destroy:function(){hv("destroy",this);var t=this.el;t[av]=null,Fg(t,"mousedown",this._onTapStart),Fg(t,"touchstart",this._onTapStart),Fg(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(Fg(t,"dragover",this),Fg(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Bv.splice(Bv.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!xv){if(hv("hideClone",this),oy.eventCanceled)return;Jg(wv,"display","none"),this.options.removeCloneOnHide&&wv.parentNode&&wv.parentNode.removeChild(wv),xv=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(xv){if(hv("showClone",this),oy.eventCanceled)return;vv.contains(pv)&&!this.options.group.revertClone?vv.insertBefore(wv,pv):yv?vv.insertBefore(wv,yv):vv.appendChild(wv),this.options.group.revertClone&&this.animate(pv,wv),Jg(wv,"display",""),xv=!1}}else this._hideClone()}},Kv&&jg(document,"touchmove",(function(t){(oy.active||Fv)&&t.cancelable&&t.preventDefault()})),oy.utils={on:jg,off:Fg,css:Jg,find:Yg,is:function(t,e){return!!Vg(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:ov,closest:Vg,toggleClass:Hg,clone:sv,index:tv,nextTick:cy,cancelNextTick:uy,detectDirection:Zv,getChild:Zg},oy.get=function(t){return t[av]},oy.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(oy.utils=Dg({},oy.utils,t.utils)),dv.mount(t)}))},oy.create=function(t,e){return new oy(t,e)},oy.version="1.10.2";var dy,hy,fy,py,my,gy,vy=[],yy=!1;function by(){vy.forEach((function(t){clearInterval(t.pid)})),vy=[]}function wy(){clearInterval(gy)}var xy=ov((function(t,e,n,r){if(e.scroll){var o,i=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=Ug(),u=!1;hy!==n&&(hy=n,by(),dy=e.scroll,o=e.scrollFn,!0===dy&&(dy=nv(n,!0)));var d=0,h=dy;do{var f=h,p=Gg(f),m=p.top,g=p.bottom,v=p.left,y=p.right,b=p.width,w=p.height,x=void 0,S=void 0,k=f.scrollWidth,_=f.scrollHeight,O=Jg(f),C=f.scrollLeft,M=f.scrollTop;f===c?(x=b<k&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),S=w<_&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(x=b<k&&("auto"===O.overflowX||"scroll"===O.overflowX),S=w<_&&("auto"===O.overflowY||"scroll"===O.overflowY));var D=x&&(Math.abs(y-i)<=a&&C+b<k)-(Math.abs(v-i)<=a&&!!C),T=S&&(Math.abs(g-s)<=a&&M+w<_)-(Math.abs(m-s)<=a&&!!M);if(!vy[d])for(var $=0;$<=d;$++)vy[$]||(vy[$]={});vy[d].vx==D&&vy[d].vy==T&&vy[d].el===f||(vy[d].el=f,vy[d].vx=D,vy[d].vy=T,clearInterval(vy[d].pid),0==D&&0==T||(u=!0,vy[d].pid=setInterval(function(){r&&0===this.layer&&oy.active._onTouchMove(my);var e=vy[this.layer].vy?vy[this.layer].vy*l:0,n=vy[this.layer].vx?vy[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(oy.dragged.parentNode[av],n,e,t,my,vy[this.layer].el)||iv(vy[this.layer].el,n,e)}.bind({layer:d}),24))),d++}while(e.bubbleScroll&&h!==c&&(h=nv(h,!1)));yy=u}}),30),Sy=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,i=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||o;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(u)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function ky(){}function _y(){}ky.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=Zg(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:Sy},Mg(ky,{pluginName:"revertOnSpill"}),_y.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:Sy},Mg(_y,{pluginName:"removeOnSpill"}),oy.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?jg(document,"dragover",this._handleAutoScroll):this.options.supportPointer?jg(document,"pointermove",this._handleFallbackAutoScroll):e.touches?jg(document,"touchmove",this._handleFallbackAutoScroll):jg(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?Fg(document,"dragover",this._handleAutoScroll):(Fg(document,"pointermove",this._handleFallbackAutoScroll),Fg(document,"touchmove",this._handleFallbackAutoScroll),Fg(document,"mousemove",this._handleFallbackAutoScroll)),wy(),by(),clearTimeout(Wg),Wg=void 0},nulling:function(){my=hy=dy=yy=gy=fy=py=null,vy.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(my=t,e||Ng||Eg||Pg){xy(t,this.options,i,e);var s=nv(i,!0);!yy||gy&&r===fy&&o===py||(gy&&wy(),gy=setInterval((function(){var i=nv(document.elementFromPoint(r,o),!0);i!==s&&(s=i,by()),xy(t,n.options,i,e)}),10),fy=r,py=o)}else{if(!this.options.bubbleScroll||nv(i,!0)===Ug())return void by();xy(t,this.options,nv(i,!1),!1)}}},Mg(t,{pluginName:"scroll",initializeByDefault:!0})}),oy.mount(_y,ky);const Oy="undefined"!=typeof window?window.console:global.console;const Cy=/-(\w)/g,My=function(t){const e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}((t=>t.replace(Cy,((t,e)=>e?e.toUpperCase():""))));function Dy(t){null!==t.parentElement&&t.parentElement.removeChild(t)}function Ty(t,e,n){const r=0===n?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,r)}function $y(t,e){this.$nextTick((()=>this.$emit(t.toLowerCase(),e)))}function Ey(t){return e=>{null!==this.realList&&this["onDrag"+t](e),$y.call(this,t,e)}}function Ny(t){return["transition-group","TransitionGroup"].includes(t)}function Ay(t,e,n){return t[n]||(e[n]?e[n]():void 0)}const Py=["Start","Add","Remove","Update","End"],Iy=["Choose","Unchoose","Sort","Filter","Clone"],Ry=["Move",...Py,...Iy].map((t=>"on"+t));var zy=null;const jy={name:"draggable",inheritAttrs:!1,props:{options:Object,list:{type:Array,required:!1,default:null},value:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},element:{type:String,default:"div"},tag:{type:String,default:null},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},data:()=>({transitionMode:!1,noneFunctionalComponentMode:!1}),render(t){const e=this.$slots.default;this.transitionMode=function(t){if(!t||1!==t.length)return!1;const[{componentOptions:e}]=t;return!!e&&Ny(e.tag)}(e);const{children:n,headerOffset:r,footerOffset:o}=function(t,e,n){let r=0,o=0;const i=Ay(e,n,"header");i&&(r=i.length,t=t?[...i,...t]:[...i]);const s=Ay(e,n,"footer");return s&&(o=s.length,t=t?[...t,...s]:[...s]),{children:t,headerOffset:r,footerOffset:o}}(e,this.$slots,this.$scopedSlots);this.headerOffset=r,this.footerOffset=o;const i=function(t,e){let n=null;const r=(t,e)=>{n=function(t,e,n){return void 0===n||((t=t||{})[e]=n),t}(n,t,e)};if(r("attrs",Object.keys(t).filter((t=>"id"===t||t.startsWith("data-"))).reduce(((e,n)=>(e[n]=t[n],e)),{})),!e)return n;const{on:o,props:i,attrs:s}=e;return r("on",o),r("props",i),Object.assign(n.attrs,s),n}(this.$attrs,this.componentData);return t(this.getTag(),i,n)},created(){null!==this.list&&null!==this.value&&Oy.error("Value and list props are mutually exclusive! Please set one or another."),"div"!==this.element&&Oy.warn("Element props is deprecated please use tag props instead. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#element-props"),void 0!==this.options&&Oy.warn("Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props")},mounted(){if(this.noneFunctionalComponentMode=this.getTag().toLowerCase()!==this.$el.nodeName.toLowerCase()&&!this.getIsFunctional(),this.noneFunctionalComponentMode&&this.transitionMode)throw new Error(`Transition-group inside component is not supported. Please alter tag value or remove transition-group. Current tag value: ${this.getTag()}`);const t={};Py.forEach((e=>{t["on"+e]=Ey.call(this,e)})),Iy.forEach((e=>{t["on"+e]=$y.bind(this,e)}));const e=Object.keys(this.$attrs).reduce(((t,e)=>(t[My(e)]=this.$attrs[e],t)),{}),n=Object.assign({},this.options,e,t,{onMove:(t,e)=>this.onDragMove(t,e)});!("draggable"in n)&&(n.draggable=">*"),this._sortable=new oy(this.rootContainer,n),this.computeIndexes()},beforeDestroy(){void 0!==this._sortable&&this._sortable.destroy()},computed:{rootContainer(){return this.transitionMode?this.$el.children[0]:this.$el},realList(){return this.list?this.list:this.value}},watch:{options:{handler(t){this.updateOptions(t)},deep:!0},$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getIsFunctional(){const{fnOptions:t}=this._vnode;return t&&t.functional},getTag(){return this.tag||this.element},updateOptions(t){for(var e in t){const n=My(e);-1===Ry.indexOf(n)&&this._sortable.option(n,t[e])}},getChildrenNodes(){if(this.noneFunctionalComponentMode)return this.$children[0].$slots.default;const t=this.$slots.default;return this.transitionMode?t[0].child.$slots.default:t},computeIndexes(){this.$nextTick((()=>{this.visibleIndexes=function(t,e,n,r){if(!t)return[];const o=t.map((t=>t.elm)),i=e.length-r,s=[...e].map(((t,e)=>e>=i?o.length:o.indexOf(t)));return n?s.filter((t=>-1!==t)):s}(this.getChildrenNodes(),this.rootContainer.children,this.transitionMode,this.footerOffset)}))},getUnderlyingVm(t){const e=function(t,e){return t.map((t=>t.elm)).indexOf(e)}(this.getChildrenNodes()||[],t);if(-1===e)return null;return{index:e,element:this.realList[e]}},getUnderlyingPotencialDraggableComponent:({__vue__:t})=>t&&t.$options&&Ny(t.$options._componentTag)?t.$parent:!("realList"in t)&&1===t.$children.length&&"realList"in t.$children[0]?t.$children[0]:t,emitChanges(t){this.$nextTick((()=>{this.$emit("change",t)}))},alterList(t){if(this.list)return void t(this.list);const e=[...this.value];t(e),this.$emit("input",e)},spliceList(){this.alterList((t=>t.splice(...arguments)))},updatePosition(t,e){this.alterList((n=>n.splice(e,0,n.splice(t,1)[0])))},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getUnderlyingPotencialDraggableComponent(t);if(!n)return{component:n};const r=n.realList,o={list:r,component:n};if(t!==e&&r&&n.getUnderlyingVm){const t=n.getUnderlyingVm(e);if(t)return Object.assign(t,o)}return o},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default[0].componentInstance},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;this.getChildrenNodes()[t].data=null;const e=this.getComponent();e.children=[],e.kept=void 0},onDragStart(t){this.context=this.getUnderlyingVm(t.item),t.item._underlying_vm_=this.clone(this.context.element),zy=t.item},onDragAdd(t){const e=t.item._underlying_vm_;if(void 0===e)return;Dy(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const r={element:e,newIndex:n};this.emitChanges({added:r})},onDragRemove(t){if(Ty(this.rootContainer,t.item,t.oldIndex),"clone"===t.pullMode)return void Dy(t.clone);const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){Dy(t.item),Ty(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const r={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:r})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},computeFutureIndex(t,e){if(!t.element)return 0;const n=[...e.to.children].filter((t=>"none"!==t.style.display)),r=n.indexOf(e.related),o=t.component.getVmIndex(r);return-1!==n.indexOf(zy)||!e.willInsertAfter?o:o+1},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const r=this.getRelatedContextFromMoveEvent(t),o=this.context,i=this.computeFutureIndex(r,t);Object.assign(o,{futureIndex:i});return n(Object.assign({},t,{relatedContext:r,draggedContext:o}),e)},onDragEnd(){this.computeIndexes(),zy=null}}};"undefined"!=typeof window&&"Vue"in window&&window.Vue.component("draggable",jy);export{Dm as A,_m as B,Tm as C,Hc as D,td as E,ec as F,jy as G,Tl as H,qp as I,Xl as J,Wu as N,nd as P,ac as S,Bu as T,Vn as V,ll as a,vl as b,Sl as c,wl as d,jp as e,Ep as f,Yp as g,Up as h,rm as i,im as j,am as k,sm as l,cl as m,_p as n,Wc as o,Hp as p,ip as q,eu as r,Rp as s,zp as t,Kp as u,Wp as v,om as w,Om as x,Cm as y,Mm as z};