| 1 |
import{_ as sn,c as me,r as Jo,o as I,s as vr,d as ue,u as v,a as f4,b as O,p as mn,e as N,w as Xe,h as st,n as Dt,f as Hn,i as yt,g as jT,j as Kd,k as KT,M as GT,S as qy,l as YT,U as Jy,m as Xy,q as Zy,t as Qy,v as bd,x as qT,y as Qm,z as eb,A as JT,B as p4,C as h4,D as Ma,E as XT,F as ZT,G as QT,H as e9,I as Pa,J as Ge,K as $n,L as yn,N as t9,O as n9,P as r9,Q as tb,R as je,T as m4,V as v4,W as o9,X as Mo,Y as mt,Z as to,$ as no,a0 as ku,a1 as Kn,a2 as q,a3 as an,a4 as Q,a5 as H,a6 as en,a7 as Qn,a8 as Is,a9 as z,aa as R,ab as it,ac as Rt,ad as gi,ae as we,af as Vr,ag as Br,ah as a9,ai as ln,aj as l1,ak as fe,al as ve,am as nn,an as Fr,ao as kn,ap as ht,aq as Ee,ar as Os,as as Cs,at as Da,au as Na,av as s9,aw as g4,ax as Dn,ay as La,az as pt,aA as xt,aB as ro,aC as y4,aD as gt,aE as nb,aF as Co,aG as Nn,aH as Qr,aI as Pn,aJ as So,aK as $a,aL as Eu,aM as Tu,aN as Yu,aO as Qe,aP as Gd,aQ as i9,aR as qu,aS as xs,aT as b4,aU as rl,aV as l9,aW as qf,aX as Mu,aY as S4,aZ as xo,a_ as Bo,a$ as u9,b0 as Oa,b1 as c9,b2 as gr,b3 as w4,b4 as u1,b5 as d9,b6 as c1,b7 as d1,b8 as f9,b9 as p9,ba as h9,bb as m9,bc as us,bd as zn,be as Ju,bf as It,bg as C4,bh as Ht,bi as v9,bj as f1,bk as g9,bl as di,bm as y9,bn as ks,bo as Iu,bp as Es,bq as ml,br as b9,bs as S9,bt as Yl,bu as x4,bv as Sd,bw as w9,bx as Ou,by as C9,bz as Ts,bA as x9,bB as Do,bC as ev,bD as wd,bE as Yd,bF as k9,bG as E9,bH as T9,bI as rb,bJ as tv,bK as M9,bL as I9,bM as O9,bN as _9,bO as ob,bP as A9,bQ as R9,bR as P9,bS as k4,bT as E4,bU as $9,bV as yi,bW as D9,bX as qd,bY as nv,bZ as ab,b_ as N9,b$ as L9,c0 as B9,c1 as F9,c2 as V9,c3 as z9,c4 as sb,c5 as Jf,c6 as H9,c7 as W9,c8 as U9,c9 as j9,ca as K9,cb as G9,cc as ib,cd as Y9,ce as lb,cf as q9,cg as ra,ch as J9,ci as T4,cj as vl,ck as rn,cl as X9,cm as Qt,cn as Xu,co as zo,cp as Jn,cq as gl,cr as Z9,cs as oo,ct as Xf,cu as Q9,cv as eM,cw as oa,cx as tM,cy as Zf,cz as nM,cA as rM,cB as oM,cC as aM,cD as sM,cE as iM,cF as lM,cG as uM}from"./chunks/index-BExjLrSj.js";const cM={};function dM(n,e){const t=Jo("RouterView");return I(),me(t)}const fM=sn(cM,[["render",dM]]);/*! |
| 2 |
* vue-router v4.5.0 |
| 3 |
* (c) 2024 Eduardo San Martin Morote |
| 4 |
* @license MIT |
| 5 |
*/const Ui=typeof document<"u";function M4(n){return typeof n=="object"||"displayName"in n||"props"in n||"__vccOpts"in n}function pM(n){return n.__esModule||n[Symbol.toStringTag]==="Module"||n.default&&M4(n.default)}const dn=Object.assign;function Zh(n,e){const t={};for(const r in e){const o=e[r];t[r]=Ho(o)?o.map(n):n(o)}return t}const su=()=>{},Ho=Array.isArray,I4=/#/g,hM=/&/g,mM=/\//g,vM=/=/g,gM=/\?/g,O4=/\+/g,yM=/%5B/g,bM=/%5D/g,_4=/%5E/g,SM=/%60/g,A4=/%7B/g,wM=/%7C/g,R4=/%7D/g,CM=/%20/g;function p1(n){return encodeURI(""+n).replace(wM,"|").replace(yM,"[").replace(bM,"]")}function xM(n){return p1(n).replace(A4,"{").replace(R4,"}").replace(_4,"^")}function rv(n){return p1(n).replace(O4,"%2B").replace(CM,"+").replace(I4,"%23").replace(hM,"%26").replace(SM,"`").replace(A4,"{").replace(R4,"}").replace(_4,"^")}function kM(n){return rv(n).replace(vM,"%3D")}function EM(n){return p1(n).replace(I4,"%23").replace(gM,"%3F")}function TM(n){return n==null?"":EM(n).replace(mM,"%2F")}function _u(n){try{return decodeURIComponent(""+n)}catch{}return""+n}const MM=/\/$/,IM=n=>n.replace(MM,"");function Qh(n,e,t="/"){let r,o={},s="",a="";const i=e.indexOf("#");let l=e.indexOf("?");return i<l&&i>=0&&(l=-1),l>-1&&(r=e.slice(0,l),s=e.slice(l+1,i>-1?i:e.length),o=n(s)),i>-1&&(r=r||e.slice(0,i),a=e.slice(i,e.length)),r=RM(r??e,t),{fullPath:r+(s&&"?")+s+a,path:r,query:o,hash:_u(a)}}function OM(n,e){const t=e.query?n(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function ub(n,e){return!e||!n.toLowerCase().startsWith(e.toLowerCase())?n:n.slice(e.length)||"/"}function _M(n,e,t){const r=e.matched.length-1,o=t.matched.length-1;return r>-1&&r===o&&ol(e.matched[r],t.matched[o])&&P4(e.params,t.params)&&n(e.query)===n(t.query)&&e.hash===t.hash}function ol(n,e){return(n.aliasOf||n)===(e.aliasOf||e)}function P4(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(!AM(n[t],e[t]))return!1;return!0}function AM(n,e){return Ho(n)?cb(n,e):Ho(e)?cb(e,n):n===e}function cb(n,e){return Ho(e)?n.length===e.length&&n.every((t,r)=>t===e[r]):n.length===1&&n[0]===e}function RM(n,e){if(n.startsWith("/"))return n;if(!n)return e;const t=e.split("/"),r=n.split("/"),o=r[r.length-1];(o===".."||o===".")&&r.push("");let s=t.length-1,a,i;for(a=0;a<r.length;a++)if(i=r[a],i!==".")if(i==="..")s>1&&s--;else break;return t.slice(0,s).join("/")+"/"+r.slice(a).join("/")}const Ya={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Au;(function(n){n.pop="pop",n.push="push"})(Au||(Au={}));var iu;(function(n){n.back="back",n.forward="forward",n.unknown=""})(iu||(iu={}));function PM(n){if(!n)if(Ui){const e=document.querySelector("base");n=e&&e.getAttribute("href")||"/",n=n.replace(/^\w+:\/\/[^\/]+/,"")}else n="/";return n[0]!=="/"&&n[0]!=="#"&&(n="/"+n),IM(n)}const $M=/^[^#]+#/;function DM(n,e){return n.replace($M,"#")+e}function NM(n,e){const t=document.documentElement.getBoundingClientRect(),r=n.getBoundingClientRect();return{behavior:e.behavior,left:r.left-t.left-(e.left||0),top:r.top-t.top-(e.top||0)}}const Qf=()=>({left:window.scrollX,top:window.scrollY});function LM(n){let e;if("el"in n){const t=n.el,r=typeof t=="string"&&t.startsWith("#"),o=typeof t=="string"?r?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!o)return;e=NM(o,n)}else e=n;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function db(n,e){return(history.state?history.state.position-e:-1)+n}const ov=new Map;function BM(n,e){ov.set(n,e)}function FM(n){const e=ov.get(n);return ov.delete(n),e}let VM=()=>location.protocol+"//"+location.host;function $4(n,e){const{pathname:t,search:r,hash:o}=e,s=n.indexOf("#");if(s>-1){let i=o.includes(n.slice(s))?n.slice(s).length:1,l=o.slice(i);return l[0]!=="/"&&(l="/"+l),ub(l,"")}return ub(t,n)+r+o}function zM(n,e,t,r){let o=[],s=[],a=null;const i=({state:h})=>{const m=$4(n,location),g=t.value,y=e.value;let S=0;if(h){if(t.value=m,e.value=h,a&&a===g){a=null;return}S=y?h.position-y.position:0}else r(m);o.forEach(w=>{w(t.value,g,{delta:S,type:Au.pop,direction:S?S>0?iu.forward:iu.back:iu.unknown})})};function l(){a=t.value}function c(h){o.push(h);const m=()=>{const g=o.indexOf(h);g>-1&&o.splice(g,1)};return s.push(m),m}function d(){const{history:h}=window;h.state&&h.replaceState(dn({},h.state,{scroll:Qf()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:l,listen:c,destroy:f}}function fb(n,e,t,r=!1,o=!1){return{back:n,current:e,forward:t,replaced:r,position:window.history.length,scroll:o?Qf():null}}function HM(n){const{history:e,location:t}=window,r={value:$4(n,t)},o={value:e.state};o.value||s(r.value,{back:null,current:r.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(l,c,d){const f=n.indexOf("#"),h=f>-1?(t.host&&document.querySelector("base")?n:n.slice(f))+l:VM()+n+l;try{e[d?"replaceState":"pushState"](c,"",h),o.value=c}catch(m){console.error(m),t[d?"replace":"assign"](h)}}function a(l,c){const d=dn({},e.state,fb(o.value.back,l,o.value.forward,!0),c,{position:o.value.position});s(l,d,!0),r.value=l}function i(l,c){const d=dn({},o.value,e.state,{forward:l,scroll:Qf()});s(d.current,d,!0);const f=dn({},fb(r.value,l,null),{position:d.position+1},c);s(l,f,!1),r.value=l}return{location:r,state:o,push:i,replace:a}}function WM(n){n=PM(n);const e=HM(n),t=zM(n,e.state,e.location,e.replace);function r(s,a=!0){a||t.pauseListeners(),history.go(s)}const o=dn({location:"",base:n,go:r,createHref:DM.bind(null,n)},e,t);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>e.state.value}),o}function UM(n){return n=location.host?n||location.pathname+location.search:"",n.includes("#")||(n+="#"),WM(n)}function jM(n){return typeof n=="string"||n&&typeof n=="object"}function D4(n){return typeof n=="string"||typeof n=="symbol"}const N4=Symbol("");var pb;(function(n){n[n.aborted=4]="aborted",n[n.cancelled=8]="cancelled",n[n.duplicated=16]="duplicated"})(pb||(pb={}));function al(n,e){return dn(new Error,{type:n,[N4]:!0},e)}function ga(n,e){return n instanceof Error&&N4 in n&&(e==null||!!(n.type&e))}const hb="[^/]+?",KM={sensitive:!1,strict:!1,start:!0,end:!0},GM=/[.+*?^${}()[\]/\\]/g;function YM(n,e){const t=dn({},KM,e),r=[];let o=t.start?"^":"";const s=[];for(const c of n){const d=c.length?[]:[90];t.strict&&!c.length&&(o+="/");for(let f=0;f<c.length;f++){const h=c[f];let m=40+(t.sensitive?.25:0);if(h.type===0)f||(o+="/"),o+=h.value.replace(GM,"\\$&"),m+=40;else if(h.type===1){const{value:g,repeatable:y,optional:S,regexp:w}=h;s.push({name:g,repeatable:y,optional:S});const x=w||hb;if(x!==hb){m+=10;try{new RegExp(`(${x})`)}catch(k){throw new Error(`Invalid custom RegExp for param "${g}" (${x}): `+k.message)}}let T=y?`((?:${x})(?:/(?:${x}))*)`:`(${x})`;f||(T=S&&c.length<2?`(?:/${T})`:"/"+T),S&&(T+="?"),o+=T,m+=20,S&&(m+=-8),y&&(m+=-20),x===".*"&&(m+=-50)}d.push(m)}r.push(d)}if(t.strict&&t.end){const c=r.length-1;r[c][r[c].length-1]+=.7000000000000001}t.strict||(o+="/?"),t.end?o+="$":t.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const a=new RegExp(o,t.sensitive?"":"i");function i(c){const d=c.match(a),f={};if(!d)return null;for(let h=1;h<d.length;h++){const m=d[h]||"",g=s[h-1];f[g.name]=m&&g.repeatable?m.split("/"):m}return f}function l(c){let d="",f=!1;for(const h of n){(!f||!d.endsWith("/"))&&(d+="/"),f=!1;for(const m of h)if(m.type===0)d+=m.value;else if(m.type===1){const{value:g,repeatable:y,optional:S}=m,w=g in c?c[g]:"";if(Ho(w)&&!y)throw new Error(`Provided param "${g}" is an array but it is not repeatable (* or + modifiers)`);const x=Ho(w)?w.join("/"):w;if(!x)if(S)h.length<2&&(d.endsWith("/")?d=d.slice(0,-1):f=!0);else throw new Error(`Missing required param "${g}"`);d+=x}}return d||"/"}return{re:a,score:r,keys:s,parse:i,stringify:l}}function qM(n,e){let t=0;for(;t<n.length&&t<e.length;){const r=e[t]-n[t];if(r)return r;t++}return n.length<e.length?n.length===1&&n[0]===80?-1:1:n.length>e.length?e.length===1&&e[0]===80?1:-1:0}function L4(n,e){let t=0;const r=n.score,o=e.score;for(;t<r.length&&t<o.length;){const s=qM(r[t],o[t]);if(s)return s;t++}if(Math.abs(o.length-r.length)===1){if(mb(r))return 1;if(mb(o))return-1}return o.length-r.length}function mb(n){const e=n[n.length-1];return n.length>0&&e[e.length-1]<0}const JM={type:0,value:""},XM=/[a-zA-Z0-9_]/;function ZM(n){if(!n)return[[]];if(n==="/")return[[JM]];if(!n.startsWith("/"))throw new Error(`Invalid path "${n}"`);function e(m){throw new Error(`ERR (${t})/"${c}": ${m}`)}let t=0,r=t;const o=[];let s;function a(){s&&o.push(s),s=[]}let i=0,l,c="",d="";function f(){c&&(t===0?s.push({type:0,value:c}):t===1||t===2||t===3?(s.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:c,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;i<n.length;){if(l=n[i++],l==="\\"&&t!==2){r=t,t=4;continue}switch(t){case 0:l==="/"?(c&&f(),a()):l===":"?(f(),t=1):h();break;case 4:h(),t=r;break;case 1:l==="("?t=2:XM.test(l)?h():(f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&i--);break;case 2:l===")"?d[d.length-1]=="\\"?d=d.slice(0,-1)+l:t=3:d+=l;break;case 3:f(),t=0,l!=="*"&&l!=="?"&&l!=="+"&&i--,d="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${c}"`),f(),a(),o}function QM(n,e,t){const r=YM(ZM(n.path),t),o=dn(r,{record:n,parent:e,children:[],alias:[]});return e&&!o.record.aliasOf==!e.record.aliasOf&&e.children.push(o),o}function eI(n,e){const t=[],r=new Map;e=bb({strict:!1,end:!0,sensitive:!1},e);function o(f){return r.get(f)}function s(f,h,m){const g=!m,y=gb(f);y.aliasOf=m&&m.record;const S=bb(e,f),w=[y];if("alias"in f){const k=typeof f.alias=="string"?[f.alias]:f.alias;for(const C of k)w.push(gb(dn({},y,{components:m?m.record.components:y.components,path:C,aliasOf:m?m.record:y})))}let x,T;for(const k of w){const{path:C}=k;if(h&&C[0]!=="/"){const M=h.record.path,A=M[M.length-1]==="/"?"":"/";k.path=h.record.path+(C&&A+C)}if(x=QM(k,h,S),m?m.alias.push(x):(T=T||x,T!==x&&T.alias.push(x),g&&f.name&&!yb(x)&&a(f.name)),B4(x)&&l(x),y.children){const M=y.children;for(let A=0;A<M.length;A++)s(M[A],x,m&&m.children[A])}m=m||x}return T?()=>{a(T)}:su}function a(f){if(D4(f)){const h=r.get(f);h&&(r.delete(f),t.splice(t.indexOf(h),1),h.children.forEach(a),h.alias.forEach(a))}else{const h=t.indexOf(f);h>-1&&(t.splice(h,1),f.record.name&&r.delete(f.record.name),f.children.forEach(a),f.alias.forEach(a))}}function i(){return t}function l(f){const h=rI(f,t);t.splice(h,0,f),f.record.name&&!yb(f)&&r.set(f.record.name,f)}function c(f,h){let m,g={},y,S;if("name"in f&&f.name){if(m=r.get(f.name),!m)throw al(1,{location:f});S=m.record.name,g=dn(vb(h.params,m.keys.filter(T=>!T.optional).concat(m.parent?m.parent.keys.filter(T=>T.optional):[]).map(T=>T.name)),f.params&&vb(f.params,m.keys.map(T=>T.name))),y=m.stringify(g)}else if(f.path!=null)y=f.path,m=t.find(T=>T.re.test(y)),m&&(g=m.parse(y),S=m.record.name);else{if(m=h.name?r.get(h.name):t.find(T=>T.re.test(h.path)),!m)throw al(1,{location:f,currentLocation:h});S=m.record.name,g=dn({},h.params,f.params),y=m.stringify(g)}const w=[];let x=m;for(;x;)w.unshift(x.record),x=x.parent;return{name:S,path:y,params:g,matched:w,meta:nI(w)}}n.forEach(f=>s(f));function d(){t.length=0,r.clear()}return{addRoute:s,resolve:c,removeRoute:a,clearRoutes:d,getRoutes:i,getRecordMatcher:o}}function vb(n,e){const t={};for(const r of e)r in n&&(t[r]=n[r]);return t}function gb(n){const e={path:n.path,redirect:n.redirect,name:n.name,meta:n.meta||{},aliasOf:n.aliasOf,beforeEnter:n.beforeEnter,props:tI(n),children:n.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in n?n.components||null:n.component&&{default:n.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function tI(n){const e={},t=n.props||!1;if("component"in n)e.default=t;else for(const r in n.components)e[r]=typeof t=="object"?t[r]:t;return e}function yb(n){for(;n;){if(n.record.aliasOf)return!0;n=n.parent}return!1}function nI(n){return n.reduce((e,t)=>dn(e,t.meta),{})}function bb(n,e){const t={};for(const r in n)t[r]=r in e?e[r]:n[r];return t}function rI(n,e){let t=0,r=e.length;for(;t!==r;){const s=t+r>>1;L4(n,e[s])<0?r=s:t=s+1}const o=oI(n);return o&&(r=e.lastIndexOf(o,r-1)),r}function oI(n){let e=n;for(;e=e.parent;)if(B4(e)&&L4(n,e)===0)return e}function B4({record:n}){return!!(n.name||n.components&&Object.keys(n.components).length||n.redirect)}function aI(n){const e={};if(n===""||n==="?")return e;const r=(n[0]==="?"?n.slice(1):n).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(O4," "),a=s.indexOf("="),i=_u(a<0?s:s.slice(0,a)),l=a<0?null:_u(s.slice(a+1));if(i in e){let c=e[i];Ho(c)||(c=e[i]=[c]),c.push(l)}else e[i]=l}return e}function Sb(n){let e="";for(let t in n){const r=n[t];if(t=kM(t),r==null){r!==void 0&&(e+=(e.length?"&":"")+t);continue}(Ho(r)?r.map(s=>s&&rv(s)):[r&&rv(r)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+t,s!=null&&(e+="="+s))})}return e}function sI(n){const e={};for(const t in n){const r=n[t];r!==void 0&&(e[t]=Ho(r)?r.map(o=>o==null?null:""+o):r==null?r:""+r)}return e}const iI=Symbol(""),wb=Symbol(""),ep=Symbol(""),h1=Symbol(""),av=Symbol("");function Vl(){let n=[];function e(r){return n.push(r),()=>{const o=n.indexOf(r);o>-1&&n.splice(o,1)}}function t(){n=[]}return{add:e,list:()=>n.slice(),reset:t}}function es(n,e,t,r,o,s=a=>a()){const a=r&&(r.enterCallbacks[o]=r.enterCallbacks[o]||[]);return()=>new Promise((i,l)=>{const c=h=>{h===!1?l(al(4,{from:t,to:e})):h instanceof Error?l(h):jM(h)?l(al(2,{from:e,to:h})):(a&&r.enterCallbacks[o]===a&&typeof h=="function"&&a.push(h),i())},d=s(()=>n.call(r&&r.instances[o],e,t,c));let f=Promise.resolve(d);n.length<3&&(f=f.then(c)),f.catch(h=>l(h))})}function em(n,e,t,r,o=s=>s()){const s=[];for(const a of n)for(const i in a.components){let l=a.components[i];if(!(e!=="beforeRouteEnter"&&!a.instances[i]))if(M4(l)){const d=(l.__vccOpts||l)[e];d&&s.push(es(d,t,r,a,i,o))}else{let c=l();s.push(()=>c.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${i}" at "${a.path}"`);const f=pM(d)?d.default:d;a.mods[i]=d,a.components[i]=f;const m=(f.__vccOpts||f)[e];return m&&es(m,t,r,a,i,o)()}))}}return s}function Cb(n){const e=yt(ep),t=yt(h1),r=O(()=>{const l=v(n.to);return e.resolve(l)}),o=O(()=>{const{matched:l}=r.value,{length:c}=l,d=l[c-1],f=t.matched;if(!d||!f.length)return-1;const h=f.findIndex(ol.bind(null,d));if(h>-1)return h;const m=xb(l[c-2]);return c>1&&xb(d)===m&&f[f.length-1].path!==m?f.findIndex(ol.bind(null,l[c-2])):h}),s=O(()=>o.value>-1&&fI(t.params,r.value.params)),a=O(()=>o.value>-1&&o.value===t.matched.length-1&&P4(t.params,r.value.params));function i(l={}){if(dI(l)){const c=e[v(n.replace)?"replace":"push"](v(n.to)).catch(su);return n.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:O(()=>r.value.href),isActive:s,isExactActive:a,navigate:i}}function lI(n){return n.length===1?n[0]:n}const uI=ue({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Cb,setup(n,{slots:e}){const t=Hn(Cb(n)),{options:r}=yt(ep),o=O(()=>({[kb(n.activeClass,r.linkActiveClass,"router-link-active")]:t.isActive,[kb(n.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const s=e.default&&lI(e.default(t));return n.custom?s:st("a",{"aria-current":t.isExactActive?n.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:o.value},s)}}}),cI=uI;function dI(n){if(!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)&&!n.defaultPrevented&&!(n.button!==void 0&&n.button!==0)){if(n.currentTarget&&n.currentTarget.getAttribute){const e=n.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return n.preventDefault&&n.preventDefault(),!0}}function fI(n,e){for(const t in e){const r=e[t],o=n[t];if(typeof r=="string"){if(r!==o)return!1}else if(!Ho(o)||o.length!==r.length||r.some((s,a)=>s!==o[a]))return!1}return!0}function xb(n){return n?n.aliasOf?n.aliasOf.path:n.path:""}const kb=(n,e,t)=>n??e??t,pI=ue({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(n,{attrs:e,slots:t}){const r=yt(av),o=O(()=>n.route||r.value),s=yt(wb,0),a=O(()=>{let c=v(s);const{matched:d}=o.value;let f;for(;(f=d[c])&&!f.components;)c++;return c}),i=O(()=>o.value.matched[a.value]);mn(wb,O(()=>a.value+1)),mn(iI,i),mn(av,o);const l=N();return Xe(()=>[l.value,i.value,n.name],([c,d,f],[h,m,g])=>{d&&(d.instances[f]=c,m&&m!==d&&c&&c===h&&(d.leaveGuards.size||(d.leaveGuards=m.leaveGuards),d.updateGuards.size||(d.updateGuards=m.updateGuards))),c&&d&&(!m||!ol(d,m)||!h)&&(d.enterCallbacks[f]||[]).forEach(y=>y(c))},{flush:"post"}),()=>{const c=o.value,d=n.name,f=i.value,h=f&&f.components[d];if(!h)return Eb(t.default,{Component:h,route:c});const m=f.props[d],g=m?m===!0?c.params:typeof m=="function"?m(c):m:null,S=st(h,dn({},g,e,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(f.instances[d]=null)},ref:l}));return Eb(t.default,{Component:S,route:c})||S}}});function Eb(n,e){if(!n)return null;const t=n(e);return t.length===1?t[0]:t}const hI=pI;function mI(n){const e=eI(n.routes,n),t=n.parseQuery||aI,r=n.stringifyQuery||Sb,o=n.history,s=Vl(),a=Vl(),i=Vl(),l=vr(Ya);let c=Ya;Ui&&n.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=Zh.bind(null,le=>""+le),f=Zh.bind(null,TM),h=Zh.bind(null,_u);function m(le,xe){let Me,De;return D4(le)?(Me=e.getRecordMatcher(le),De=xe):De=le,e.addRoute(De,Me)}function g(le){const xe=e.getRecordMatcher(le);xe&&e.removeRoute(xe)}function y(){return e.getRoutes().map(le=>le.record)}function S(le){return!!e.getRecordMatcher(le)}function w(le,xe){if(xe=dn({},xe||l.value),typeof le=="string"){const Pe=Qh(t,le,xe.path),nt=e.resolve({path:Pe.path},xe),Ot=o.createHref(Pe.fullPath);return dn(Pe,nt,{params:h(nt.params),hash:_u(Pe.hash),redirectedFrom:void 0,href:Ot})}let Me;if(le.path!=null)Me=dn({},le,{path:Qh(t,le.path,xe.path).path});else{const Pe=dn({},le.params);for(const nt in Pe)Pe[nt]==null&&delete Pe[nt];Me=dn({},le,{params:f(Pe)}),xe.params=f(xe.params)}const De=e.resolve(Me,xe),Ze=le.hash||"";De.params=d(h(De.params));const lt=OM(r,dn({},le,{hash:xM(Ze),path:De.path})),ze=o.createHref(lt);return dn({fullPath:lt,hash:Ze,query:r===Sb?sI(le.query):le.query||{}},De,{redirectedFrom:void 0,href:ze})}function x(le){return typeof le=="string"?Qh(t,le,l.value.path):dn({},le)}function T(le,xe){if(c!==le)return al(8,{from:xe,to:le})}function k(le){return A(le)}function C(le){return k(dn(x(le),{replace:!0}))}function M(le){const xe=le.matched[le.matched.length-1];if(xe&&xe.redirect){const{redirect:Me}=xe;let De=typeof Me=="function"?Me(le):Me;return typeof De=="string"&&(De=De.includes("?")||De.includes("#")?De=x(De):{path:De},De.params={}),dn({query:le.query,hash:le.hash,params:De.path!=null?{}:le.params},De)}}function A(le,xe){const Me=c=w(le),De=l.value,Ze=le.state,lt=le.force,ze=le.replace===!0,Pe=M(Me);if(Pe)return A(dn(x(Pe),{state:typeof Pe=="object"?dn({},Ze,Pe.state):Ze,force:lt,replace:ze}),xe||Me);const nt=Me;nt.redirectedFrom=xe;let Ot;return!lt&&_M(r,De,Me)&&(Ot=al(16,{to:nt,from:De}),X(De,De,!0,!1)),(Ot?Promise.resolve(Ot):L(nt,De)).catch(_e=>ga(_e)?ga(_e,2)?_e:ee(_e):te(_e,nt,De)).then(_e=>{if(_e){if(ga(_e,2))return A(dn({replace:ze},x(_e.to),{state:typeof _e.to=="object"?dn({},Ze,_e.to.state):Ze,force:lt}),xe||nt)}else _e=J(nt,De,!0,ze,Ze);return K(nt,De,_e),_e})}function V(le,xe){const Me=T(le,xe);return Me?Promise.reject(Me):Promise.resolve()}function P(le){const xe=ye.values().next().value;return xe&&typeof xe.runWithContext=="function"?xe.runWithContext(le):le()}function L(le,xe){let Me;const[De,Ze,lt]=vI(le,xe);Me=em(De.reverse(),"beforeRouteLeave",le,xe);for(const Pe of De)Pe.leaveGuards.forEach(nt=>{Me.push(es(nt,le,xe))});const ze=V.bind(null,le,xe);return Me.push(ze),Be(Me).then(()=>{Me=[];for(const Pe of s.list())Me.push(es(Pe,le,xe));return Me.push(ze),Be(Me)}).then(()=>{Me=em(Ze,"beforeRouteUpdate",le,xe);for(const Pe of Ze)Pe.updateGuards.forEach(nt=>{Me.push(es(nt,le,xe))});return Me.push(ze),Be(Me)}).then(()=>{Me=[];for(const Pe of lt)if(Pe.beforeEnter)if(Ho(Pe.beforeEnter))for(const nt of Pe.beforeEnter)Me.push(es(nt,le,xe));else Me.push(es(Pe.beforeEnter,le,xe));return Me.push(ze),Be(Me)}).then(()=>(le.matched.forEach(Pe=>Pe.enterCallbacks={}),Me=em(lt,"beforeRouteEnter",le,xe,P),Me.push(ze),Be(Me))).then(()=>{Me=[];for(const Pe of a.list())Me.push(es(Pe,le,xe));return Me.push(ze),Be(Me)}).catch(Pe=>ga(Pe,8)?Pe:Promise.reject(Pe))}function K(le,xe,Me){i.list().forEach(De=>P(()=>De(le,xe,Me)))}function J(le,xe,Me,De,Ze){const lt=T(le,xe);if(lt)return lt;const ze=xe===Ya,Pe=Ui?history.state:{};Me&&(De||ze?o.replace(le.fullPath,dn({scroll:ze&&Pe&&Pe.scroll},Ze)):o.push(le.fullPath,Ze)),l.value=le,X(le,xe,Me,ze),ee()}let G;function ne(){G||(G=o.listen((le,xe,Me)=>{if(!ke.listening)return;const De=w(le),Ze=M(De);if(Ze){A(dn(Ze,{replace:!0,force:!0}),De).catch(su);return}c=De;const lt=l.value;Ui&&BM(db(lt.fullPath,Me.delta),Qf()),L(De,lt).catch(ze=>ga(ze,12)?ze:ga(ze,2)?(A(dn(x(ze.to),{force:!0}),De).then(Pe=>{ga(Pe,20)&&!Me.delta&&Me.type===Au.pop&&o.go(-1,!1)}).catch(su),Promise.reject()):(Me.delta&&o.go(-Me.delta,!1),te(ze,De,lt))).then(ze=>{ze=ze||J(De,lt,!1),ze&&(Me.delta&&!ga(ze,8)?o.go(-Me.delta,!1):Me.type===Au.pop&&ga(ze,20)&&o.go(-1,!1)),K(De,lt,ze)}).catch(su)}))}let W=Vl(),D=Vl(),U;function te(le,xe,Me){ee(le);const De=D.list();return De.length?De.forEach(Ze=>Ze(le,xe,Me)):console.error(le),Promise.reject(le)}function j(){return U&&l.value!==Ya?Promise.resolve():new Promise((le,xe)=>{W.add([le,xe])})}function ee(le){return U||(U=!le,ne(),W.list().forEach(([xe,Me])=>le?Me(le):xe()),W.reset()),le}function X(le,xe,Me,De){const{scrollBehavior:Ze}=n;if(!Ui||!Ze)return Promise.resolve();const lt=!Me&&FM(db(le.fullPath,0))||(De||!Me)&&history.state&&history.state.scroll||null;return Dt().then(()=>Ze(le,xe,lt)).then(ze=>ze&&LM(ze)).catch(ze=>te(ze,le,xe))}const ce=le=>o.go(le);let ae;const ye=new Set,ke={currentRoute:l,listening:!0,addRoute:m,removeRoute:g,clearRoutes:e.clearRoutes,hasRoute:S,getRoutes:y,resolve:w,options:n,push:k,replace:C,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:s.add,beforeResolve:a.add,afterEach:i.add,onError:D.add,isReady:j,install(le){const xe=this;le.component("RouterLink",cI),le.component("RouterView",hI),le.config.globalProperties.$router=xe,Object.defineProperty(le.config.globalProperties,"$route",{enumerable:!0,get:()=>v(l)}),Ui&&!ae&&l.value===Ya&&(ae=!0,k(o.location).catch(Ze=>{}));const Me={};for(const Ze in Ya)Object.defineProperty(Me,Ze,{get:()=>l.value[Ze],enumerable:!0});le.provide(ep,xe),le.provide(h1,f4(Me)),le.provide(av,l);const De=le.unmount;ye.add(le),le.unmount=function(){ye.delete(le),ye.size<1&&(c=Ya,G&&G(),G=null,l.value=Ya,ae=!1,U=!1),De()}}};function Be(le){return le.reduce((xe,Me)=>xe.then(()=>P(Me)),Promise.resolve())}return ke}function vI(n,e){const t=[],r=[],o=[],s=Math.max(e.matched.length,n.matched.length);for(let a=0;a<s;a++){const i=e.matched[a];i&&(n.matched.find(c=>ol(c,i))?r.push(i):t.push(i));const l=n.matched[a];l&&(e.matched.find(c=>ol(c,l))||o.push(l))}return[t,r,o]}function yl(){return yt(ep)}function _s(n){return yt(h1)}const F4=Symbol();var gI=/\s/;function yI(n){for(var e=n.length;e--&&gI.test(n.charAt(e)););return e}var bI=/^\s+/;function SI(n){return n&&n.slice(0,yI(n)+1).replace(bI,"")}var Tb=NaN,wI=/^[-+]0x[0-9a-f]+$/i,CI=/^0b[01]+$/i,xI=/^0o[0-7]+$/i,kI=parseInt;function Mb(n){if(typeof n=="number")return n;if(jT(n))return Tb;if(Kd(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Kd(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=SI(n);var t=CI.test(n);return t||xI.test(n)?kI(n.slice(2),t?2:8):wI.test(n)?Tb:+n}function EI(n,e,t,r){n.length;for(var o=t+1;o--;)if(e(n[o],o,n))return o;return-1}var TI=1,MI=4;function Ib(n){return KT(n,TI|MI)}var II="__lodash_hash_undefined__";function OI(n){return this.__data__.set(n,II),this}function _I(n){return this.__data__.has(n)}function Jd(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new GT;++e<t;)this.add(n[e])}Jd.prototype.add=Jd.prototype.push=OI;Jd.prototype.has=_I;function AI(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function RI(n,e){return n.has(e)}var PI=1,$I=2;function V4(n,e,t,r,o,s){var a=t&PI,i=n.length,l=e.length;if(i!=l&&!(a&&l>i))return!1;var c=s.get(n),d=s.get(e);if(c&&d)return c==e&&d==n;var f=-1,h=!0,m=t&$I?new Jd:void 0;for(s.set(n,e),s.set(e,n);++f<i;){var g=n[f],y=e[f];if(r)var S=a?r(y,g,f,e,n,s):r(g,y,f,n,e,s);if(S!==void 0){if(S)continue;h=!1;break}if(m){if(!AI(e,function(w,x){if(!RI(m,x)&&(g===w||o(g,w,t,r,s)))return m.push(x)})){h=!1;break}}else if(!(g===y||o(g,y,t,r,s))){h=!1;break}}return s.delete(n),s.delete(e),h}function DI(n){var e=-1,t=Array(n.size);return n.forEach(function(r,o){t[++e]=[o,r]}),t}function NI(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var LI=1,BI=2,FI="[object Boolean]",VI="[object Date]",zI="[object Error]",HI="[object Map]",WI="[object Number]",UI="[object RegExp]",jI="[object Set]",KI="[object String]",GI="[object Symbol]",YI="[object ArrayBuffer]",qI="[object DataView]",Ob=qy?qy.prototype:void 0,tm=Ob?Ob.valueOf:void 0;function JI(n,e,t,r,o,s,a){switch(t){case qI:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case YI:return!(n.byteLength!=e.byteLength||!s(new Jy(n),new Jy(e)));case FI:case VI:case WI:return YT(+n,+e);case zI:return n.name==e.name&&n.message==e.message;case UI:case KI:return n==e+"";case HI:var i=DI;case jI:var l=r&LI;if(i||(i=NI),n.size!=e.size&&!l)return!1;var c=a.get(n);if(c)return c==e;r|=BI,a.set(n,e);var d=V4(i(n),i(e),r,o,s,a);return a.delete(n),d;case GI:if(tm)return tm.call(n)==tm.call(e)}return!1}var XI=1,ZI=Object.prototype,QI=ZI.hasOwnProperty;function eO(n,e,t,r,o,s){var a=t&XI,i=Xy(n),l=i.length,c=Xy(e),d=c.length;if(l!=d&&!a)return!1;for(var f=l;f--;){var h=i[f];if(!(a?h in e:QI.call(e,h)))return!1}var m=s.get(n),g=s.get(e);if(m&&g)return m==e&&g==n;var y=!0;s.set(n,e),s.set(e,n);for(var S=a;++f<l;){h=i[f];var w=n[h],x=e[h];if(r)var T=a?r(x,w,h,e,n,s):r(w,x,h,n,e,s);if(!(T===void 0?w===x||o(w,x,t,r,s):T)){y=!1;break}S||(S=h=="constructor")}if(y&&!S){var k=n.constructor,C=e.constructor;k!=C&&"constructor"in n&&"constructor"in e&&!(typeof k=="function"&&k instanceof k&&typeof C=="function"&&C instanceof C)&&(y=!1)}return s.delete(n),s.delete(e),y}var tO=1,_b="[object Arguments]",Ab="[object Array]",Kc="[object Object]",nO=Object.prototype,Rb=nO.hasOwnProperty;function rO(n,e,t,r,o,s){var a=Qm(n),i=Qm(e),l=a?Ab:Zy(n),c=i?Ab:Zy(e);l=l==_b?Kc:l,c=c==_b?Kc:c;var d=l==Kc,f=c==Kc,h=l==c;if(h&&Qy(n)){if(!Qy(e))return!1;a=!0,d=!1}if(h&&!d)return s||(s=new bd),a||qT(n)?V4(n,e,t,r,o,s):JI(n,e,l,t,r,o,s);if(!(t&tO)){var m=d&&Rb.call(n,"__wrapped__"),g=f&&Rb.call(e,"__wrapped__");if(m||g){var y=m?n.value():n,S=g?e.value():e;return s||(s=new bd),o(y,S,t,r,s)}}return h?(s||(s=new bd),eO(n,e,t,r,o,s)):!1}function tp(n,e,t,r,o){return n===e?!0:n==null||e==null||!eb(n)&&!eb(e)?n!==n&&e!==e:rO(n,e,t,r,tp,o)}var oO=1,aO=2;function sO(n,e,t,r){var o=t.length,s=o;if(n==null)return!s;for(n=Object(n);o--;){var a=t[o];if(a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++o<s;){a=t[o];var i=a[0],l=n[i],c=a[1];if(a[2]){if(l===void 0&&!(i in n))return!1}else{var d=new bd,f;if(!(f===void 0?tp(c,l,oO|aO,r,d):f))return!1}}return!0}function z4(n){return n===n&&!Kd(n)}function iO(n){for(var e=JT(n),t=e.length;t--;){var r=e[t],o=n[r];e[t]=[r,o,z4(o)]}return e}function H4(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function lO(n){var e=iO(n);return e.length==1&&e[0][2]?H4(e[0][0],e[0][1]):function(t){return t===n||sO(t,n,e)}}var uO=1,cO=2;function dO(n,e){return p4(n)&&z4(e)?H4(h4(n),e):function(t){var r=Ma(t,n);return r===void 0&&r===e?XT(t,n):tp(e,r,uO|cO)}}function fO(n){return function(e){return e==null?void 0:e[n]}}function pO(n){return function(e){return ZT(e,n)}}function hO(n){return p4(n)?fO(h4(n)):pO(n)}function mO(n){return typeof n=="function"?n:n==null?QT:typeof n=="object"?Qm(n)?dO(n[0],n[1]):lO(n):hO(n)}var nm=function(){return e9.Date.now()},vO="Expected a function",gO=Math.max,yO=Math.min;function m1(n,e,t){var r,o,s,a,i,l,c=0,d=!1,f=!1,h=!0;if(typeof n!="function")throw new TypeError(vO);e=Mb(e)||0,Kd(t)&&(d=!!t.leading,f="maxWait"in t,s=f?gO(Mb(t.maxWait)||0,e):s,h="trailing"in t?!!t.trailing:h);function m(M){var A=r,V=o;return r=o=void 0,c=M,a=n.apply(V,A),a}function g(M){return c=M,i=setTimeout(w,e),d?m(M):a}function y(M){var A=M-l,V=M-c,P=e-A;return f?yO(P,s-V):P}function S(M){var A=M-l,V=M-c;return l===void 0||A>=e||A<0||f&&V>=s}function w(){var M=nm();if(S(M))return x(M);i=setTimeout(w,y(M))}function x(M){return i=void 0,h&&r?m(M):(r=o=void 0,a)}function T(){i!==void 0&&clearTimeout(i),c=0,r=l=o=i=void 0}function k(){return i===void 0?a:x(nm())}function C(){var M=nm(),A=S(M);if(r=arguments,o=this,l=M,A){if(i===void 0)return g(l);if(f)return clearTimeout(i),i=setTimeout(w,e),m(l)}return i===void 0&&(i=setTimeout(w,e)),a}return C.cancel=T,C.flush=k,C}function bO(n,e,t){var r=n==null?0:n.length;if(!r)return-1;var o=r-1;return EI(n,mO(e),o)}function vs(n,e){return tp(n,e)}var SO={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const wO=n=>(e,t)=>CO(e,t,v(n)),CO=(n,e,t)=>Ma(t,n,n).replace(/\{(\w+)\}/g,(r,o)=>{var s;return`${(s=e==null?void 0:e[o])!=null?s:`{${o}}`}`}),xO=n=>{const e=O(()=>v(n).name),t=Pa(n)?n:N(n);return{lang:e,locale:t,t:wO(n)}},W4=Symbol("localeContextKey"),En=n=>{const e=n||yt(W4,N());return xO(O(()=>e.value||SO))},U4=Symbol("emptyValuesContextKey"),kO=["",void 0,null],EO=void 0,v1=Ge({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:n=>$n(n)?!n():!n}}),j4=(n,e)=>{const t=yn()?yt(U4,N({})):N({}),r=O(()=>n.emptyValues||t.value.emptyValues||kO),o=O(()=>$n(n.valueOnClear)?n.valueOnClear():n.valueOnClear!==void 0?n.valueOnClear:$n(t.value.valueOnClear)?t.value.valueOnClear():t.value.valueOnClear!==void 0?t.value.valueOnClear:e!==void 0?e:EO),s=a=>r.value.includes(a);return r.value.includes(o.value),{emptyValues:r,valueOnClear:o,isEmptyValue:s}},Xd=N();function np(n,e=void 0){const t=yn()?yt(F4,Xd):Xd;return n?O(()=>{var r,o;return(o=(r=t.value)==null?void 0:r[n])!=null?o:e}):t}function TO(n,e){const t=np(),r=je(n,O(()=>{var i;return((i=t.value)==null?void 0:i.namespace)||m4})),o=En(O(()=>{var i;return(i=t.value)==null?void 0:i.locale})),s=v4(O(()=>{var i;return((i=t.value)==null?void 0:i.zIndex)||o9})),a=O(()=>{var i;return v(e)||((i=t.value)==null?void 0:i.size)||""});return K4(O(()=>v(t)||{})),{ns:r,locale:o,zIndex:s,size:a}}const K4=(n,e,t=!1)=>{var r;const o=!!yn(),s=o?np():void 0,a=(r=void 0)!=null?r:o?mn:void 0;if(!a)return;const i=O(()=>{const l=v(n);return s!=null&&s.value?MO(s.value,l):l});return a(F4,i),a(W4,O(()=>i.value.locale)),a(t9,O(()=>i.value.namespace)),a(n9,O(()=>i.value.zIndex)),a(r9,{size:O(()=>i.value.size||"")}),a(U4,O(()=>({emptyValues:i.value.emptyValues,valueOnClear:i.value.valueOnClear}))),(t||!Xd.value)&&(Xd.value=i.value),i},MO=(n,e)=>{const t=[...new Set([...tb(n),...tb(e)])],r={};for(const o of t)r[o]=e[o]!==void 0?e[o]:n[o];return r},G4=n=>Mo?window.requestAnimationFrame(n):setTimeout(n,16),Y4=n=>Mo?window.cancelAnimationFrame(n):clearTimeout(n);let Gc;const q4=n=>{var e;if(!Mo)return 0;if(Gc!==void 0)return Gc;const t=document.createElement("div");t.className=`${n}-scrollbar__wrap`,t.style.visibility="hidden",t.style.width="100px",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const r=t.offsetWidth;t.style.overflow="scroll";const o=document.createElement("div");o.style.width="100%",t.appendChild(o);const s=o.offsetWidth;return(e=t.parentNode)==null||e.removeChild(t),Gc=r-s,Gc};function IO(n,e){if(!Mo)return;if(!e){n.scrollTop=0;return}const t=[];let r=e.offsetParent;for(;r!==null&&n!==r&&n.contains(r);)t.push(r),r=r.offsetParent;const o=e.offsetTop+t.reduce((l,c)=>l+c.offsetTop,0),s=o+e.offsetHeight,a=n.scrollTop,i=a+n.clientHeight;o<a?n.scrollTop=o:s>i&&(n.scrollTop=s-n.clientHeight)}const Li=4,J4={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},OO=({move:n,size:e,bar:t})=>({[t.size]:e,transform:`translate${t.axis}(${n}%)`}),g1=Symbol("scrollbarContextKey"),_O=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),AO="Thumb",RO=ue({__name:"thumb",props:_O,setup(n){const e=n,t=yt(g1),r=je("scrollbar");t||to(AO,"can not inject scrollbar context");const o=N(),s=N(),a=N({}),i=N(!1);let l=!1,c=!1,d=Mo?document.onselectstart:null;const f=O(()=>J4[e.vertical?"vertical":"horizontal"]),h=O(()=>OO({size:e.size,move:e.move,bar:f.value})),m=O(()=>o.value[f.value.offset]**2/t.wrapElement[f.value.scrollSize]/e.ratio/s.value[f.value.offset]),g=M=>{var A;if(M.stopPropagation(),M.ctrlKey||[1,2].includes(M.button))return;(A=window.getSelection())==null||A.removeAllRanges(),S(M);const V=M.currentTarget;V&&(a.value[f.value.axis]=V[f.value.offset]-(M[f.value.client]-V.getBoundingClientRect()[f.value.direction]))},y=M=>{if(!s.value||!o.value||!t.wrapElement)return;const A=Math.abs(M.target.getBoundingClientRect()[f.value.direction]-M[f.value.client]),V=s.value[f.value.offset]/2,P=(A-V)*100*m.value/o.value[f.value.offset];t.wrapElement[f.value.scroll]=P*t.wrapElement[f.value.scrollSize]/100},S=M=>{M.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",w),document.addEventListener("mouseup",x),d=document.onselectstart,document.onselectstart=()=>!1},w=M=>{if(!o.value||!s.value||l===!1)return;const A=a.value[f.value.axis];if(!A)return;const V=(o.value.getBoundingClientRect()[f.value.direction]-M[f.value.client])*-1,P=s.value[f.value.offset]-A,L=(V-P)*100*m.value/o.value[f.value.offset];t.wrapElement[f.value.scroll]=L*t.wrapElement[f.value.scrollSize]/100},x=()=>{l=!1,a.value[f.value.axis]=0,document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",x),C(),c&&(i.value=!1)},T=()=>{c=!1,i.value=!!e.size},k=()=>{c=!0,i.value=l};no(()=>{C(),document.removeEventListener("mouseup",x)});const C=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return ku(Kn(t,"scrollbarElement"),"mousemove",T),ku(Kn(t,"scrollbarElement"),"mouseleave",k),(M,A)=>(I(),me(Is,{name:v(r).b("fade"),persisted:""},{default:q(()=>[an(Q("div",{ref_key:"instance",ref:o,class:H([v(r).e("bar"),v(r).is(v(f).key)]),onMousedown:y},[Q("div",{ref_key:"thumb",ref:s,class:H(v(r).e("thumb")),style:en(v(h)),onMousedown:g},null,38)],34),[[Qn,M.always||i.value]])]),_:1},8,["name"]))}});var Pb=mt(RO,[["__file","thumb.vue"]]);const PO=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),$O=ue({__name:"bar",props:PO,setup(n,{expose:e}){const t=n,r=yt(g1),o=N(0),s=N(0),a=N(""),i=N(""),l=N(1),c=N(1);return e({handleScroll:h=>{if(h){const m=h.offsetHeight-Li,g=h.offsetWidth-Li;s.value=h.scrollTop*100/m*l.value,o.value=h.scrollLeft*100/g*c.value}},update:()=>{const h=r==null?void 0:r.wrapElement;if(!h)return;const m=h.offsetHeight-Li,g=h.offsetWidth-Li,y=m**2/h.scrollHeight,S=g**2/h.scrollWidth,w=Math.max(y,t.minSize),x=Math.max(S,t.minSize);l.value=y/(m-y)/(w/(m-w)),c.value=S/(g-S)/(x/(g-x)),i.value=w+Li<m?`${w}px`:"",a.value=x+Li<g?`${x}px`:""}}),(h,m)=>(I(),z(it,null,[R(Pb,{move:o.value,ratio:c.value,size:a.value,always:h.always},null,8,["move","ratio","size","always"]),R(Pb,{move:s.value,ratio:l.value,size:i.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}});var DO=mt($O,[["__file","bar.vue"]]);const NO=Ge({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:we([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...gi(["ariaLabel","ariaOrientation"])}),LO={scroll:({scrollTop:n,scrollLeft:e})=>[n,e].every(Rt)},BO="ElScrollbar",FO=ue({name:BO}),VO=ue({...FO,props:NO,emits:LO,setup(n,{expose:e,emit:t}){const r=n,o=je("scrollbar");let s,a,i=0,l=0;const c=N(),d=N(),f=N(),h=N(),m=O(()=>{const C={};return r.height&&(C.height=Vr(r.height)),r.maxHeight&&(C.maxHeight=Vr(r.maxHeight)),[r.wrapStyle,C]}),g=O(()=>[r.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!r.native}]),y=O(()=>[o.e("view"),r.viewClass]),S=()=>{var C;d.value&&((C=h.value)==null||C.handleScroll(d.value),i=d.value.scrollTop,l=d.value.scrollLeft,t("scroll",{scrollTop:d.value.scrollTop,scrollLeft:d.value.scrollLeft}))};function w(C,M){Fr(C)?d.value.scrollTo(C):Rt(C)&&Rt(M)&&d.value.scrollTo(C,M)}const x=C=>{Rt(C)&&(d.value.scrollTop=C)},T=C=>{Rt(C)&&(d.value.scrollLeft=C)},k=()=>{var C;(C=h.value)==null||C.update()};return Xe(()=>r.noresize,C=>{C?(s==null||s(),a==null||a()):({stop:s}=Br(f,k),a=ku("resize",k))},{immediate:!0}),Xe(()=>[r.maxHeight,r.height],()=>{r.native||Dt(()=>{var C;k(),d.value&&((C=h.value)==null||C.handleScroll(d.value))})}),mn(g1,Hn({scrollbarElement:c,wrapElement:d})),a9(()=>{d.value&&(d.value.scrollTop=i,d.value.scrollLeft=l)}),ln(()=>{r.native||Dt(()=>{k()})}),l1(()=>k()),e({wrapRef:d,update:k,scrollTo:w,setScrollTop:x,setScrollLeft:T,handleScroll:S}),(C,M)=>(I(),z("div",{ref_key:"scrollbarRef",ref:c,class:H(v(o).b())},[Q("div",{ref_key:"wrapRef",ref:d,class:H(v(g)),style:en(v(m)),tabindex:C.tabindex,onScroll:S},[(I(),me(nn(C.tag),{id:C.id,ref_key:"resizeRef",ref:f,class:H(v(y)),style:en(C.viewStyle),role:C.role,"aria-label":C.ariaLabel,"aria-orientation":C.ariaOrientation},{default:q(()=>[ve(C.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),C.native?fe("v-if",!0):(I(),me(DO,{key:0,ref_key:"barRef",ref:h,always:C.always,"min-size":C.minSize},null,8,["always","min-size"]))],2))}});var zO=mt(VO,[["__file","scrollbar.vue"]]);const y1=kn(zO),HO=Ge({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:we([String,Object,Array])},offset:{type:we(Array),default:[0,0]},badgeClass:{type:String}}),WO=ue({name:"ElBadge"}),UO=ue({...WO,props:HO,setup(n,{expose:e}){const t=n,r=je("badge"),o=O(()=>t.isDot?"":Rt(t.value)&&Rt(t.max)?t.max<t.value?`${t.max}+`:`${t.value}`:`${t.value}`),s=O(()=>{var a,i,l,c,d;return[{backgroundColor:t.color,marginRight:Vr(-((i=(a=t.offset)==null?void 0:a[0])!=null?i:0)),marginTop:Vr((c=(l=t.offset)==null?void 0:l[1])!=null?c:0)},(d=t.badgeStyle)!=null?d:{}]});return e({content:o}),(a,i)=>(I(),z("div",{class:H(v(r).b())},[ve(a.$slots,"default"),R(Is,{name:`${v(r).namespace.value}-zoom-in-center`,persisted:""},{default:q(()=>[an(Q("sup",{class:H([v(r).e("content"),v(r).em("content",a.type),v(r).is("fixed",!!a.$slots.default),v(r).is("dot",a.isDot),v(r).is("hide-zero",!a.showZero&&t.value===0),a.badgeClass]),style:en(v(s))},[ve(a.$slots,"content",{value:v(o)},()=>[ht(Ee(v(o)),1)])],6),[[Qn,!a.hidden&&(v(o)||a.isDot||a.$slots.content)]])]),_:3},8,["name"])],2))}});var jO=mt(UO,[["__file","badge.vue"]]);const KO=kn(jO),X4=Symbol("buttonGroupContextKey"),oi=({from:n,replacement:e,scope:t,version:r,ref:o,type:s="API"},a)=>{Xe(()=>v(a),i=>{},{immediate:!0})},GO=(n,e)=>{oi({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},O(()=>n.type==="text"));const t=yt(X4,void 0),r=np("button"),{form:o}=Os(),s=Cs(O(()=>t==null?void 0:t.size)),a=Da(),i=N(),l=Na(),c=O(()=>n.type||(t==null?void 0:t.type)||""),d=O(()=>{var g,y,S;return(S=(y=n.autoInsertSpace)!=null?y:(g=r.value)==null?void 0:g.autoInsertSpace)!=null?S:!1}),f=O(()=>n.tag==="button"?{ariaDisabled:a.value||n.loading,disabled:a.value||n.loading,autofocus:n.autofocus,type:n.nativeType}:{}),h=O(()=>{var g;const y=(g=l.default)==null?void 0:g.call(l);if(d.value&&(y==null?void 0:y.length)===1){const S=y[0];if((S==null?void 0:S.type)===s9){const w=S.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(w.trim())}}return!1});return{_disabled:a,_size:s,_type:c,_ref:i,_props:f,shouldAddSpace:h,handleClick:g=>{if(a.value||n.loading){g.stopPropagation();return}n.nativeType==="reset"&&(o==null||o.resetFields()),e("click",g)}}},YO=["default","primary","success","warning","info","danger","text",""],qO=["button","submit","reset"],sv=Ge({size:La,disabled:Boolean,type:{type:String,values:YO,default:""},icon:{type:Dn},nativeType:{type:String,values:qO,default:"button"},loading:Boolean,loadingIcon:{type:Dn,default:()=>g4},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:we([String,Object]),default:"button"}}),JO={click:n=>n instanceof MouseEvent};function cr(n,e){XO(n)&&(n="100%");var t=ZO(n);return n=e===360?n:Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(String(n*e),10)/100),Math.abs(n-e)<1e-6?1:(e===360?n=(n<0?n%e+e:n%e)/parseFloat(String(e)):n=n%e/parseFloat(String(e)),n)}function Yc(n){return Math.min(1,Math.max(0,n))}function XO(n){return typeof n=="string"&&n.indexOf(".")!==-1&&parseFloat(n)===1}function ZO(n){return typeof n=="string"&&n.indexOf("%")!==-1}function Z4(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function qc(n){return n<=1?"".concat(Number(n)*100,"%"):n}function Xs(n){return n.length===1?"0"+n:String(n)}function QO(n,e,t){return{r:cr(n,255)*255,g:cr(e,255)*255,b:cr(t,255)*255}}function $b(n,e,t){n=cr(n,255),e=cr(e,255),t=cr(t,255);var r=Math.max(n,e,t),o=Math.min(n,e,t),s=0,a=0,i=(r+o)/2;if(r===o)a=0,s=0;else{var l=r-o;switch(a=i>.5?l/(2-r-o):l/(r+o),r){case n:s=(e-t)/l+(e<t?6:0);break;case e:s=(t-n)/l+2;break;case t:s=(n-e)/l+4;break}s/=6}return{h:s,s:a,l:i}}function rm(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*(6*t):t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function e_(n,e,t){var r,o,s;if(n=cr(n,360),e=cr(e,100),t=cr(t,100),e===0)o=t,s=t,r=t;else{var a=t<.5?t*(1+e):t+e-t*e,i=2*t-a;r=rm(i,a,n+1/3),o=rm(i,a,n),s=rm(i,a,n-1/3)}return{r:r*255,g:o*255,b:s*255}}function Db(n,e,t){n=cr(n,255),e=cr(e,255),t=cr(t,255);var r=Math.max(n,e,t),o=Math.min(n,e,t),s=0,a=r,i=r-o,l=r===0?0:i/r;if(r===o)s=0;else{switch(r){case n:s=(e-t)/i+(e<t?6:0);break;case e:s=(t-n)/i+2;break;case t:s=(n-e)/i+4;break}s/=6}return{h:s,s:l,v:a}}function t_(n,e,t){n=cr(n,360)*6,e=cr(e,100),t=cr(t,100);var r=Math.floor(n),o=n-r,s=t*(1-e),a=t*(1-o*e),i=t*(1-(1-o)*e),l=r%6,c=[t,a,s,s,i,t][l],d=[i,t,t,a,s,s][l],f=[s,s,i,t,t,a][l];return{r:c*255,g:d*255,b:f*255}}function Nb(n,e,t,r){var o=[Xs(Math.round(n).toString(16)),Xs(Math.round(e).toString(16)),Xs(Math.round(t).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function n_(n,e,t,r,o){var s=[Xs(Math.round(n).toString(16)),Xs(Math.round(e).toString(16)),Xs(Math.round(t).toString(16)),Xs(r_(r))];return o&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))&&s[3].startsWith(s[3].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0)+s[3].charAt(0):s.join("")}function r_(n){return Math.round(parseFloat(n)*255).toString(16)}function Lb(n){return Yr(n)/255}function Yr(n){return parseInt(n,16)}function o_(n){return{r:n>>16,g:(n&65280)>>8,b:n&255}}var iv={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function a_(n){var e={r:0,g:0,b:0},t=1,r=null,o=null,s=null,a=!1,i=!1;return typeof n=="string"&&(n=l_(n)),typeof n=="object"&&(ya(n.r)&&ya(n.g)&&ya(n.b)?(e=QO(n.r,n.g,n.b),a=!0,i=String(n.r).substr(-1)==="%"?"prgb":"rgb"):ya(n.h)&&ya(n.s)&&ya(n.v)?(r=qc(n.s),o=qc(n.v),e=t_(n.h,r,o),a=!0,i="hsv"):ya(n.h)&&ya(n.s)&&ya(n.l)&&(r=qc(n.s),s=qc(n.l),e=e_(n.h,r,s),a=!0,i="hsl"),Object.prototype.hasOwnProperty.call(n,"a")&&(t=n.a)),t=Z4(t),{ok:a,format:n.format||i,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}var s_="[-\\+]?\\d+%?",i_="[-\\+]?\\d*\\.\\d+%?",cs="(?:".concat(i_,")|(?:").concat(s_,")"),om="[\\s|\\(]+(".concat(cs,")[,|\\s]+(").concat(cs,")[,|\\s]+(").concat(cs,")\\s*\\)?"),am="[\\s|\\(]+(".concat(cs,")[,|\\s]+(").concat(cs,")[,|\\s]+(").concat(cs,")[,|\\s]+(").concat(cs,")\\s*\\)?"),$o={CSS_UNIT:new RegExp(cs),rgb:new RegExp("rgb"+om),rgba:new RegExp("rgba"+am),hsl:new RegExp("hsl"+om),hsla:new RegExp("hsla"+am),hsv:new RegExp("hsv"+om),hsva:new RegExp("hsva"+am),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function l_(n){if(n=n.trim().toLowerCase(),n.length===0)return!1;var e=!1;if(iv[n])n=iv[n],e=!0;else if(n==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t=$o.rgb.exec(n);return t?{r:t[1],g:t[2],b:t[3]}:(t=$o.rgba.exec(n),t?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=$o.hsl.exec(n),t?{h:t[1],s:t[2],l:t[3]}:(t=$o.hsla.exec(n),t?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=$o.hsv.exec(n),t?{h:t[1],s:t[2],v:t[3]}:(t=$o.hsva.exec(n),t?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=$o.hex8.exec(n),t?{r:Yr(t[1]),g:Yr(t[2]),b:Yr(t[3]),a:Lb(t[4]),format:e?"name":"hex8"}:(t=$o.hex6.exec(n),t?{r:Yr(t[1]),g:Yr(t[2]),b:Yr(t[3]),format:e?"name":"hex"}:(t=$o.hex4.exec(n),t?{r:Yr(t[1]+t[1]),g:Yr(t[2]+t[2]),b:Yr(t[3]+t[3]),a:Lb(t[4]+t[4]),format:e?"name":"hex8"}:(t=$o.hex3.exec(n),t?{r:Yr(t[1]+t[1]),g:Yr(t[2]+t[2]),b:Yr(t[3]+t[3]),format:e?"name":"hex"}:!1)))))))))}function ya(n){return!!$o.CSS_UNIT.exec(String(n))}var Q4=function(){function n(e,t){e===void 0&&(e=""),t===void 0&&(t={});var r;if(e instanceof n)return e;typeof e=="number"&&(e=o_(e)),this.originalInput=e;var o=a_(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=t.format)!==null&&r!==void 0?r:o.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return n.prototype.isDark=function(){return this.getBrightness()<128},n.prototype.isLight=function(){return!this.isDark()},n.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},n.prototype.getLuminance=function(){var e=this.toRgb(),t,r,o,s=e.r/255,a=e.g/255,i=e.b/255;return s<=.03928?t=s/12.92:t=Math.pow((s+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),i<=.03928?o=i/12.92:o=Math.pow((i+.055)/1.055,2.4),.2126*t+.7152*r+.0722*o},n.prototype.getAlpha=function(){return this.a},n.prototype.setAlpha=function(e){return this.a=Z4(e),this.roundA=Math.round(100*this.a)/100,this},n.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},n.prototype.toHsv=function(){var e=Db(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},n.prototype.toHsvString=function(){var e=Db(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.v*100);return this.a===1?"hsv(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},n.prototype.toHsl=function(){var e=$b(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},n.prototype.toHslString=function(){var e=$b(this.r,this.g,this.b),t=Math.round(e.h*360),r=Math.round(e.s*100),o=Math.round(e.l*100);return this.a===1?"hsl(".concat(t,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(t,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},n.prototype.toHex=function(e){return e===void 0&&(e=!1),Nb(this.r,this.g,this.b,e)},n.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},n.prototype.toHex8=function(e){return e===void 0&&(e=!1),n_(this.r,this.g,this.b,this.a,e)},n.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},n.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},n.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},n.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(t,", ").concat(r,")"):"rgba(".concat(e,", ").concat(t,", ").concat(r,", ").concat(this.roundA,")")},n.prototype.toPercentageRgb=function(){var e=function(t){return"".concat(Math.round(cr(t,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},n.prototype.toPercentageRgbString=function(){var e=function(t){return Math.round(cr(t,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},n.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Nb(this.r,this.g,this.b,!1),t=0,r=Object.entries(iv);t<r.length;t++){var o=r[t],s=o[0],a=o[1];if(e===a)return s}return!1},n.prototype.toString=function(e){var t=!!e;e=e??this.format;var r=!1,o=this.a<1&&this.a>=0,s=!t&&o&&(e.startsWith("hex")||e==="name");return s?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},n.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},n.prototype.clone=function(){return new n(this.toString())},n.prototype.lighten=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=Yc(t.l),new n(t)},n.prototype.brighten=function(e){e===void 0&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),new n(t)},n.prototype.darken=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=Yc(t.l),new n(t)},n.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},n.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},n.prototype.desaturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=Yc(t.s),new n(t)},n.prototype.saturate=function(e){e===void 0&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=Yc(t.s),new n(t)},n.prototype.greyscale=function(){return this.desaturate(100)},n.prototype.spin=function(e){var t=this.toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,new n(t)},n.prototype.mix=function(e,t){t===void 0&&(t=50);var r=this.toRgb(),o=new n(e).toRgb(),s=t/100,a={r:(o.r-r.r)*s+r.r,g:(o.g-r.g)*s+r.g,b:(o.b-r.b)*s+r.b,a:(o.a-r.a)*s+r.a};return new n(a)},n.prototype.analogous=function(e,t){e===void 0&&(e=6),t===void 0&&(t=30);var r=this.toHsl(),o=360/t,s=[this];for(r.h=(r.h-(o*e>>1)+720)%360;--e;)r.h=(r.h+o)%360,s.push(new n(r));return s},n.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new n(e)},n.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var t=this.toHsv(),r=t.h,o=t.s,s=t.v,a=[],i=1/e;e--;)a.push(new n({h:r,s:o,v:s})),s=(s+i)%1;return a},n.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new n({h:(t+72)%360,s:e.s,l:e.l}),new n({h:(t+216)%360,s:e.s,l:e.l})]},n.prototype.onBackground=function(e){var t=this.toRgb(),r=new n(e).toRgb(),o=t.a+r.a*(1-t.a);return new n({r:(t.r*t.a+r.r*r.a*(1-t.a))/o,g:(t.g*t.a+r.g*r.a*(1-t.a))/o,b:(t.b*t.a+r.b*r.a*(1-t.a))/o,a:o})},n.prototype.triad=function(){return this.polyad(3)},n.prototype.tetrad=function(){return this.polyad(4)},n.prototype.polyad=function(e){for(var t=this.toHsl(),r=t.h,o=[this],s=360/e,a=1;a<e;a++)o.push(new n({h:(r+a*s)%360,s:t.s,l:t.l}));return o},n.prototype.equals=function(e){return this.toRgbString()===new n(e).toRgbString()},n}();function qa(n,e=20){return n.mix("#141414",e).toString()}function u_(n){const e=Da(),t=je("button");return O(()=>{let r={},o=n.color;if(o){const s=o.match(/var\((.*?)\)/);s&&(o=window.getComputedStyle(window.document.documentElement).getPropertyValue(s[1]));const a=new Q4(o),i=n.dark?a.tint(20).toString():qa(a,20);if(n.plain)r=t.cssVarBlock({"bg-color":n.dark?qa(a,90):a.tint(90).toString(),"text-color":o,"border-color":n.dark?qa(a,50):a.tint(50).toString(),"hover-text-color":`var(${t.cssVarName("color-white")})`,"hover-bg-color":o,"hover-border-color":o,"active-bg-color":i,"active-text-color":`var(${t.cssVarName("color-white")})`,"active-border-color":i}),e.value&&(r[t.cssVarBlockName("disabled-bg-color")]=n.dark?qa(a,90):a.tint(90).toString(),r[t.cssVarBlockName("disabled-text-color")]=n.dark?qa(a,50):a.tint(50).toString(),r[t.cssVarBlockName("disabled-border-color")]=n.dark?qa(a,80):a.tint(80).toString());else{const l=n.dark?qa(a,30):a.tint(30).toString(),c=a.isDark()?`var(${t.cssVarName("color-white")})`:`var(${t.cssVarName("color-black")})`;if(r=t.cssVarBlock({"bg-color":o,"text-color":c,"border-color":o,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":i,"active-border-color":i}),e.value){const d=n.dark?qa(a,50):a.tint(50).toString();r[t.cssVarBlockName("disabled-bg-color")]=d,r[t.cssVarBlockName("disabled-text-color")]=n.dark?"rgba(255, 255, 255, 0.5)":`var(${t.cssVarName("color-white")})`,r[t.cssVarBlockName("disabled-border-color")]=d}}}return r})}const c_=ue({name:"ElButton"}),d_=ue({...c_,props:sv,emits:JO,setup(n,{expose:e,emit:t}){const r=n,o=u_(r),s=je("button"),{_ref:a,_size:i,_type:l,_disabled:c,_props:d,shouldAddSpace:f,handleClick:h}=GO(r,t),m=O(()=>[s.b(),s.m(l.value),s.m(i.value),s.is("disabled",c.value),s.is("loading",r.loading),s.is("plain",r.plain),s.is("round",r.round),s.is("circle",r.circle),s.is("text",r.text),s.is("link",r.link),s.is("has-bg",r.bg)]);return e({ref:a,size:i,type:l,disabled:c,shouldAddSpace:f}),(g,y)=>(I(),me(nn(g.tag),xt({ref_key:"_ref",ref:a},v(d),{class:v(m),style:v(o),onClick:v(h)}),{default:q(()=>[g.loading?(I(),z(it,{key:0},[g.$slots.loading?ve(g.$slots,"loading",{key:0}):(I(),me(v(pt),{key:1,class:H(v(s).is("loading"))},{default:q(()=>[(I(),me(nn(g.loadingIcon)))]),_:1},8,["class"]))],64)):g.icon||g.$slots.icon?(I(),me(v(pt),{key:1},{default:q(()=>[g.icon?(I(),me(nn(g.icon),{key:0})):ve(g.$slots,"icon",{key:1})]),_:3})):fe("v-if",!0),g.$slots.default?(I(),z("span",{key:2,class:H({[v(s).em("text","expand")]:v(f)})},[ve(g.$slots,"default")],2)):fe("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var f_=mt(d_,[["__file","button.vue"]]);const p_={size:sv.size,type:sv.type},h_=ue({name:"ElButtonGroup"}),m_=ue({...h_,props:p_,setup(n){const e=n;mn(X4,Hn({size:Kn(e,"size"),type:Kn(e,"type")}));const t=je("button");return(r,o)=>(I(),z("div",{class:H(v(t).b("group"))},[ve(r.$slots,"default")],2))}});var eS=mt(m_,[["__file","button-group.vue"]]);const Zd=kn(f_,{ButtonGroup:eS});ro(eS);var Jc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aa(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function tS(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}),t}var Cd={exports:{}},v_=Cd.exports,Bb;function g_(){return Bb||(Bb=1,function(n,e){(function(t,r){n.exports=r()})(v_,function(){var t=1e3,r=6e4,o=36e5,s="millisecond",a="second",i="minute",l="hour",c="day",d="week",f="month",h="quarter",m="year",g="date",y="Invalid Date",S=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|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,x={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("_"),ordinal:function(ne){var W=["th","st","nd","rd"],D=ne%100;return"["+ne+(W[(D-20)%10]||W[D]||W[0])+"]"}},T=function(ne,W,D){var U=String(ne);return!U||U.length>=W?ne:""+Array(W+1-U.length).join(D)+ne},k={s:T,z:function(ne){var W=-ne.utcOffset(),D=Math.abs(W),U=Math.floor(D/60),te=D%60;return(W<=0?"+":"-")+T(U,2,"0")+":"+T(te,2,"0")},m:function ne(W,D){if(W.date()<D.date())return-ne(D,W);var U=12*(D.year()-W.year())+(D.month()-W.month()),te=W.clone().add(U,f),j=D-te<0,ee=W.clone().add(U+(j?-1:1),f);return+(-(U+(D-te)/(j?te-ee:ee-te))||0)},a:function(ne){return ne<0?Math.ceil(ne)||0:Math.floor(ne)},p:function(ne){return{M:f,y:m,w:d,d:c,D:g,h:l,m:i,s:a,ms:s,Q:h}[ne]||String(ne||"").toLowerCase().replace(/s$/,"")},u:function(ne){return ne===void 0}},C="en",M={};M[C]=x;var A="$isDayjsObject",V=function(ne){return ne instanceof J||!(!ne||!ne[A])},P=function ne(W,D,U){var te;if(!W)return C;if(typeof W=="string"){var j=W.toLowerCase();M[j]&&(te=j),D&&(M[j]=D,te=j);var ee=W.split("-");if(!te&&ee.length>1)return ne(ee[0])}else{var X=W.name;M[X]=W,te=X}return!U&&te&&(C=te),te||!U&&C},L=function(ne,W){if(V(ne))return ne.clone();var D=typeof W=="object"?W:{};return D.date=ne,D.args=arguments,new J(D)},K=k;K.l=P,K.i=V,K.w=function(ne,W){return L(ne,{locale:W.$L,utc:W.$u,x:W.$x,$offset:W.$offset})};var J=function(){function ne(D){this.$L=P(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[A]=!0}var W=ne.prototype;return W.parse=function(D){this.$d=function(U){var te=U.date,j=U.utc;if(te===null)return new Date(NaN);if(K.u(te))return new Date;if(te instanceof Date)return new Date(te);if(typeof te=="string"&&!/Z$/i.test(te)){var ee=te.match(S);if(ee){var X=ee[2]-1||0,ce=(ee[7]||"0").substring(0,3);return j?new Date(Date.UTC(ee[1],X,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,ce)):new Date(ee[1],X,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,ce)}}return new Date(te)}(D),this.init()},W.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},W.$utils=function(){return K},W.isValid=function(){return this.$d.toString()!==y},W.isSame=function(D,U){var te=L(D);return this.startOf(U)<=te&&te<=this.endOf(U)},W.isAfter=function(D,U){return L(D)<this.startOf(U)},W.isBefore=function(D,U){return this.endOf(U)<L(D)},W.$g=function(D,U,te){return K.u(D)?this[U]:this.set(te,D)},W.unix=function(){return Math.floor(this.valueOf()/1e3)},W.valueOf=function(){return this.$d.getTime()},W.startOf=function(D,U){var te=this,j=!!K.u(U)||U,ee=K.p(D),X=function(Me,De){var Ze=K.w(te.$u?Date.UTC(te.$y,De,Me):new Date(te.$y,De,Me),te);return j?Ze:Ze.endOf(c)},ce=function(Me,De){return K.w(te.toDate()[Me].apply(te.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(De)),te)},ae=this.$W,ye=this.$M,ke=this.$D,Be="set"+(this.$u?"UTC":"");switch(ee){case m:return j?X(1,0):X(31,11);case f:return j?X(1,ye):X(0,ye+1);case d:var le=this.$locale().weekStart||0,xe=(ae<le?ae+7:ae)-le;return X(j?ke-xe:ke+(6-xe),ye);case c:case g:return ce(Be+"Hours",0);case l:return ce(Be+"Minutes",1);case i:return ce(Be+"Seconds",2);case a:return ce(Be+"Milliseconds",3);default:return this.clone()}},W.endOf=function(D){return this.startOf(D,!1)},W.$set=function(D,U){var te,j=K.p(D),ee="set"+(this.$u?"UTC":""),X=(te={},te[c]=ee+"Date",te[g]=ee+"Date",te[f]=ee+"Month",te[m]=ee+"FullYear",te[l]=ee+"Hours",te[i]=ee+"Minutes",te[a]=ee+"Seconds",te[s]=ee+"Milliseconds",te)[j],ce=j===c?this.$D+(U-this.$W):U;if(j===f||j===m){var ae=this.clone().set(g,1);ae.$d[X](ce),ae.init(),this.$d=ae.set(g,Math.min(this.$D,ae.daysInMonth())).$d}else X&&this.$d[X](ce);return this.init(),this},W.set=function(D,U){return this.clone().$set(D,U)},W.get=function(D){return this[K.p(D)]()},W.add=function(D,U){var te,j=this;D=Number(D);var ee=K.p(U),X=function(ye){var ke=L(j);return K.w(ke.date(ke.date()+Math.round(ye*D)),j)};if(ee===f)return this.set(f,this.$M+D);if(ee===m)return this.set(m,this.$y+D);if(ee===c)return X(1);if(ee===d)return X(7);var ce=(te={},te[i]=r,te[l]=o,te[a]=t,te)[ee]||1,ae=this.$d.getTime()+D*ce;return K.w(ae,this)},W.subtract=function(D,U){return this.add(-1*D,U)},W.format=function(D){var U=this,te=this.$locale();if(!this.isValid())return te.invalidDate||y;var j=D||"YYYY-MM-DDTHH:mm:ssZ",ee=K.z(this),X=this.$H,ce=this.$m,ae=this.$M,ye=te.weekdays,ke=te.months,Be=te.meridiem,le=function(De,Ze,lt,ze){return De&&(De[Ze]||De(U,j))||lt[Ze].slice(0,ze)},xe=function(De){return K.s(X%12||12,De,"0")},Me=Be||function(De,Ze,lt){var ze=De<12?"AM":"PM";return lt?ze.toLowerCase():ze};return j.replace(w,function(De,Ze){return Ze||function(lt){switch(lt){case"YY":return String(U.$y).slice(-2);case"YYYY":return K.s(U.$y,4,"0");case"M":return ae+1;case"MM":return K.s(ae+1,2,"0");case"MMM":return le(te.monthsShort,ae,ke,3);case"MMMM":return le(ke,ae);case"D":return U.$D;case"DD":return K.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return le(te.weekdaysMin,U.$W,ye,2);case"ddd":return le(te.weekdaysShort,U.$W,ye,3);case"dddd":return ye[U.$W];case"H":return String(X);case"HH":return K.s(X,2,"0");case"h":return xe(1);case"hh":return xe(2);case"a":return Me(X,ce,!0);case"A":return Me(X,ce,!1);case"m":return String(ce);case"mm":return K.s(ce,2,"0");case"s":return String(U.$s);case"ss":return K.s(U.$s,2,"0");case"SSS":return K.s(U.$ms,3,"0");case"Z":return ee}return null}(De)||ee.replace(":","")})},W.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},W.diff=function(D,U,te){var j,ee=this,X=K.p(U),ce=L(D),ae=(ce.utcOffset()-this.utcOffset())*r,ye=this-ce,ke=function(){return K.m(ee,ce)};switch(X){case m:j=ke()/12;break;case f:j=ke();break;case h:j=ke()/3;break;case d:j=(ye-ae)/6048e5;break;case c:j=(ye-ae)/864e5;break;case l:j=ye/o;break;case i:j=ye/r;break;case a:j=ye/t;break;default:j=ye}return te?j:K.a(j)},W.daysInMonth=function(){return this.endOf(f).$D},W.$locale=function(){return M[this.$L]},W.locale=function(D,U){if(!D)return this.$L;var te=this.clone(),j=P(D,U,!0);return j&&(te.$L=j),te},W.clone=function(){return K.w(this.$d,this)},W.toDate=function(){return new Date(this.valueOf())},W.toJSON=function(){return this.isValid()?this.toISOString():null},W.toISOString=function(){return this.$d.toISOString()},W.toString=function(){return this.$d.toUTCString()},ne}(),G=J.prototype;return L.prototype=G,[["$ms",s],["$s",a],["$m",i],["$H",l],["$W",c],["$M",f],["$y",m],["$D",g]].forEach(function(ne){G[ne[1]]=function(W){return this.$g(W,ne[0],ne[1])}}),L.extend=function(ne,W){return ne.$i||(ne(W,J,L),ne.$i=!0),L},L.locale=P,L.isDayjs=V,L.unix=function(ne){return L(1e3*ne)},L.en=M[C],L.Ls=M,L.p={},L})}(Cd)),Cd.exports}var y_=g_();const tt=aa(y_),sm=(n,e)=>[n>0?n-1:void 0,n,n<e?n+1:void 0],nS=n=>Array.from(Array.from({length:n}).keys()),rS=n=>n.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),oS=n=>n.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),Fb=function(n,e){const t=nb(n),r=nb(e);return t&&r?n.getTime()===e.getTime():!t&&!r?n===e:!1},Vb=function(n,e){const t=gt(n),r=gt(e);return t&&r?n.length!==e.length?!1:n.every((o,s)=>Fb(o,e[s])):!t&&!r?Fb(n,e):!1},zb=function(n,e,t){const r=y4(e)||e==="x"?tt(n).locale(t):tt(n,e).locale(t);return r.isValid()?r:void 0},Hb=function(n,e,t){return y4(e)?n:e==="x"?+n:tt(n).locale(t).format(e)},im=(n,e)=>{var t;const r=[],o=e==null?void 0:e();for(let s=0;s<n;s++)r.push((t=o==null?void 0:o.includes(s))!=null?t:!1);return r},Xc=n=>gt(n)?n.map(e=>e.toDate()):n.toDate();var xd={exports:{}},b_=xd.exports,Wb;function S_(){return Wb||(Wb=1,function(n,e){(function(t,r){n.exports=r()})(b_,function(){return function(t,r,o){var s=r.prototype,a=function(f){return f&&(f.indexOf?f:f.s)},i=function(f,h,m,g,y){var S=f.name?f:f.$locale(),w=a(S[h]),x=a(S[m]),T=w||x.map(function(C){return C.slice(0,g)});if(!y)return T;var k=S.weekStart;return T.map(function(C,M){return T[(M+(k||0))%7]})},l=function(){return o.Ls[o.locale()]},c=function(f,h){return f.formats[h]||function(m){return m.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(g,y,S){return y||S.slice(1)})}(f.formats[h.toUpperCase()])},d=function(){var f=this;return{months:function(h){return h?h.format("MMMM"):i(f,"months")},monthsShort:function(h){return h?h.format("MMM"):i(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):i(f,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):i(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):i(f,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(f.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};s.localeData=function(){return d.bind(this)()},o.localeData=function(){var f=l();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return o.weekdays()},weekdaysShort:function(){return o.weekdaysShort()},weekdaysMin:function(){return o.weekdaysMin()},months:function(){return o.months()},monthsShort:function(){return o.monthsShort()},longDateFormat:function(h){return c(f,h)},meridiem:f.meridiem,ordinal:f.ordinal}},o.months=function(){return i(l(),"months")},o.monthsShort=function(){return i(l(),"monthsShort","months",3)},o.weekdays=function(f){return i(l(),"weekdays",null,null,f)},o.weekdaysShort=function(f){return i(l(),"weekdaysShort","weekdays",3,f)},o.weekdaysMin=function(f){return i(l(),"weekdaysMin","weekdays",2,f)}}})}(xd)),xd.exports}var w_=S_();const C_=aa(w_),x_=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"];var kd=(n=>(n[n.TEXT=1]="TEXT",n[n.CLASS=2]="CLASS",n[n.STYLE=4]="STYLE",n[n.PROPS=8]="PROPS",n[n.FULL_PROPS=16]="FULL_PROPS",n[n.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",n[n.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",n[n.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",n[n.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",n[n.NEED_PATCH=512]="NEED_PATCH",n[n.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",n[n.HOISTED=-1]="HOISTED",n[n.BAIL=-2]="BAIL",n))(kd||{});const lu=n=>{const e=gt(n)?n:[n],t=[];return e.forEach(r=>{var o;gt(r)?t.push(...lu(r)):Co(r)&&((o=r.component)!=null&&o.subTree)?t.push(r,...lu(r.component.subTree)):Co(r)&>(r.children)?t.push(...lu(r.children)):t.push(r)}),t},k_=(n,e,t)=>lu(n.subTree).filter(s=>{var a;return Co(s)&&((a=s.type)==null?void 0:a.name)===e&&!!s.component}).map(s=>s.component.uid).map(s=>t[s]).filter(s=>!!s),E_=(n,e)=>{const t={},r=vr([]);return{children:r,addChild:a=>{t[a.uid]=a,r.value=k_(n,e,t)},removeChild:a=>{delete t[a],r.value=r.value.filter(i=>i.uid!==a)}}},aS={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:La,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...gi(["ariaControls"])},sS={[Pn]:n=>Nn(n)||Rt(n)||Qr(n),change:n=>Nn(n)||Rt(n)||Qr(n)},bl=Symbol("checkboxGroupContextKey"),T_=({model:n,isChecked:e})=>{const t=yt(bl,void 0),r=O(()=>{var s,a;const i=(s=t==null?void 0:t.max)==null?void 0:s.value,l=(a=t==null?void 0:t.min)==null?void 0:a.value;return!So(i)&&n.value.length>=i&&!e.value||!So(l)&&n.value.length<=l&&e.value});return{isDisabled:Da(O(()=>(t==null?void 0:t.disabled.value)||r.value)),isLimitDisabled:r}},M_=(n,{model:e,isLimitExceeded:t,hasOwnLabel:r,isDisabled:o,isLabeledByFormItem:s})=>{const a=yt(bl,void 0),{formItem:i}=Os(),{emit:l}=yn();function c(g){var y,S,w,x;return[!0,n.trueValue,n.trueLabel].includes(g)?(S=(y=n.trueValue)!=null?y:n.trueLabel)!=null?S:!0:(x=(w=n.falseValue)!=null?w:n.falseLabel)!=null?x:!1}function d(g,y){l("change",c(g),y)}function f(g){if(t.value)return;const y=g.target;l("change",c(y.checked),g)}async function h(g){t.value||!r.value&&!o.value&&s.value&&(g.composedPath().some(w=>w.tagName==="LABEL")||(e.value=c([!1,n.falseValue,n.falseLabel].includes(e.value)),await Dt(),d(e.value,g)))}const m=O(()=>(a==null?void 0:a.validateEvent)||n.validateEvent);return Xe(()=>n.modelValue,()=>{m.value&&(i==null||i.validate("change").catch(g=>$a()))}),{handleChange:f,onClickRoot:h}},I_=n=>{const e=N(!1),{emit:t}=yn(),r=yt(bl,void 0),o=O(()=>So(r)===!1),s=N(!1),a=O({get(){var i,l;return o.value?(i=r==null?void 0:r.modelValue)==null?void 0:i.value:(l=n.modelValue)!=null?l:e.value},set(i){var l,c;o.value&>(i)?(s.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&i.length>(r==null?void 0:r.max.value)&&i.length>a.value.length,s.value===!1&&((c=r==null?void 0:r.changeEvent)==null||c.call(r,i))):(t(Pn,i),e.value=i)}});return{model:a,isGroup:o,isLimitExceeded:s}},O_=(n,e,{model:t})=>{const r=yt(bl,void 0),o=N(!1),s=O(()=>Eu(n.value)?n.label:n.value),a=O(()=>{const d=t.value;return Qr(d)?d:gt(d)?Fr(s.value)?d.map(Tu).some(f=>vs(f,s.value)):d.map(Tu).includes(s.value):d!=null?d===n.trueValue||d===n.trueLabel:!!d}),i=Cs(O(()=>{var d;return(d=r==null?void 0:r.size)==null?void 0:d.value}),{prop:!0}),l=Cs(O(()=>{var d;return(d=r==null?void 0:r.size)==null?void 0:d.value})),c=O(()=>!!e.default||!Eu(s.value));return{checkboxButtonSize:i,isChecked:a,isFocused:o,checkboxSize:l,hasOwnLabel:c,actualValue:s}},iS=(n,e)=>{const{formItem:t}=Os(),{model:r,isGroup:o,isLimitExceeded:s}=I_(n),{isFocused:a,isChecked:i,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:d,actualValue:f}=O_(n,e,{model:r}),{isDisabled:h}=T_({model:r,isChecked:i}),{inputId:m,isLabeledByFormItem:g}=Yu(n,{formItemContext:t,disableIdGeneration:d,disableIdManagement:o}),{handleChange:y,onClickRoot:S}=M_(n,{model:r,isLimitExceeded:s,hasOwnLabel:d,isDisabled:h,isLabeledByFormItem:g});return(()=>{function x(){var T,k;gt(r.value)&&!r.value.includes(f.value)?r.value.push(f.value):r.value=(k=(T=n.trueValue)!=null?T:n.trueLabel)!=null?k:!0}n.checked&&x()})(),oi({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>o.value&&Eu(n.value))),oi({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>!!n.trueLabel)),oi({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},O(()=>!!n.falseLabel)),{inputId:m,isLabeledByFormItem:g,isChecked:i,isDisabled:h,isFocused:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:d,model:r,actualValue:f,handleChange:y,onClickRoot:S}},__=ue({name:"ElCheckbox"}),A_=ue({...__,props:aS,emits:sS,setup(n){const e=n,t=Na(),{inputId:r,isLabeledByFormItem:o,isChecked:s,isDisabled:a,isFocused:i,checkboxSize:l,hasOwnLabel:c,model:d,actualValue:f,handleChange:h,onClickRoot:m}=iS(e,t),g=je("checkbox"),y=O(()=>[g.b(),g.m(l.value),g.is("disabled",a.value),g.is("bordered",e.border),g.is("checked",s.value)]),S=O(()=>[g.e("input"),g.is("disabled",a.value),g.is("checked",s.value),g.is("indeterminate",e.indeterminate),g.is("focus",i.value)]);return(w,x)=>(I(),me(nn(!v(c)&&v(o)?"span":"label"),{class:H(v(y)),"aria-controls":w.indeterminate?w.ariaControls:null,onClick:v(m)},{default:q(()=>{var T,k,C,M;return[Q("span",{class:H(v(S))},[w.trueValue||w.falseValue||w.trueLabel||w.falseLabel?an((I(),z("input",{key:0,id:v(r),"onUpdate:modelValue":A=>Pa(d)?d.value=A:null,class:H(v(g).e("original")),type:"checkbox",indeterminate:w.indeterminate,name:w.name,tabindex:w.tabindex,disabled:v(a),"true-value":(k=(T=w.trueValue)!=null?T:w.trueLabel)!=null?k:!0,"false-value":(M=(C=w.falseValue)!=null?C:w.falseLabel)!=null?M:!1,onChange:v(h),onFocus:A=>i.value=!0,onBlur:A=>i.value=!1,onClick:Qe(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Gd,v(d)]]):an((I(),z("input",{key:1,id:v(r),"onUpdate:modelValue":A=>Pa(d)?d.value=A:null,class:H(v(g).e("original")),type:"checkbox",indeterminate:w.indeterminate,disabled:v(a),value:v(f),name:w.name,tabindex:w.tabindex,onChange:v(h),onFocus:A=>i.value=!0,onBlur:A=>i.value=!1,onClick:Qe(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[Gd,v(d)]]),Q("span",{class:H(v(g).e("inner"))},null,2)],2),v(c)?(I(),z("span",{key:0,class:H(v(g).e("label"))},[ve(w.$slots,"default"),w.$slots.default?fe("v-if",!0):(I(),z(it,{key:0},[ht(Ee(w.label),1)],64))],2)):fe("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var R_=mt(A_,[["__file","checkbox.vue"]]);const P_=ue({name:"ElCheckboxButton"}),$_=ue({...P_,props:aS,emits:sS,setup(n){const e=n,t=Na(),{isFocused:r,isChecked:o,isDisabled:s,checkboxButtonSize:a,model:i,actualValue:l,handleChange:c}=iS(e,t),d=yt(bl,void 0),f=je("checkbox"),h=O(()=>{var g,y,S,w;const x=(y=(g=d==null?void 0:d.fill)==null?void 0:g.value)!=null?y:"";return{backgroundColor:x,borderColor:x,color:(w=(S=d==null?void 0:d.textColor)==null?void 0:S.value)!=null?w:"",boxShadow:x?`-1px 0 0 0 ${x}`:void 0}}),m=O(()=>[f.b("button"),f.bm("button",a.value),f.is("disabled",s.value),f.is("checked",o.value),f.is("focus",r.value)]);return(g,y)=>{var S,w,x,T;return I(),z("label",{class:H(v(m))},[g.trueValue||g.falseValue||g.trueLabel||g.falseLabel?an((I(),z("input",{key:0,"onUpdate:modelValue":k=>Pa(i)?i.value=k:null,class:H(v(f).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:v(s),"true-value":(w=(S=g.trueValue)!=null?S:g.trueLabel)!=null?w:!0,"false-value":(T=(x=g.falseValue)!=null?x:g.falseLabel)!=null?T:!1,onChange:v(c),onFocus:k=>r.value=!0,onBlur:k=>r.value=!1,onClick:Qe(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Gd,v(i)]]):an((I(),z("input",{key:1,"onUpdate:modelValue":k=>Pa(i)?i.value=k:null,class:H(v(f).be("button","original")),type:"checkbox",name:g.name,tabindex:g.tabindex,disabled:v(s),value:v(l),onChange:v(c),onFocus:k=>r.value=!0,onBlur:k=>r.value=!1,onClick:Qe(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[Gd,v(i)]]),g.$slots.default||g.label?(I(),z("span",{key:2,class:H(v(f).be("button","inner")),style:en(v(o)?v(h):void 0)},[ve(g.$slots,"default",{},()=>[ht(Ee(g.label),1)])],6)):fe("v-if",!0)],2)}}});var lS=mt($_,[["__file","checkbox-button.vue"]]);const D_=Ge({modelValue:{type:we(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:La,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...gi(["ariaLabel"])}),N_={[Pn]:n=>gt(n),change:n=>gt(n)},L_=ue({name:"ElCheckboxGroup"}),B_=ue({...L_,props:D_,emits:N_,setup(n,{emit:e}){const t=n,r=je("checkbox"),{formItem:o}=Os(),{inputId:s,isLabeledByFormItem:a}=Yu(t,{formItemContext:o}),i=async c=>{e(Pn,c),await Dt(),e("change",c)},l=O({get(){return t.modelValue},set(c){i(c)}});return mn(bl,{...i9(qu(t),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:i}),Xe(()=>t.modelValue,()=>{t.validateEvent&&(o==null||o.validate("change").catch(c=>$a()))}),(c,d)=>{var f;return I(),me(nn(c.tag),{id:v(s),class:H(v(r).b("group")),role:"group","aria-label":v(a)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":v(a)?(f=v(o))==null?void 0:f.labelId:void 0},{default:q(()=>[ve(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var uS=mt(B_,[["__file","checkbox-group.vue"]]);const F_=kn(R_,{CheckboxButton:lS,CheckboxGroup:uS});ro(lS);ro(uS);const cS=Ge({modelValue:{type:[String,Number,Boolean],default:void 0},size:La,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),V_=Ge({...cS,border:Boolean}),dS={[Pn]:n=>Nn(n)||Rt(n)||Qr(n),[xs]:n=>Nn(n)||Rt(n)||Qr(n)},fS=Symbol("radioGroupKey"),pS=(n,e)=>{const t=N(),r=yt(fS,void 0),o=O(()=>!!r),s=O(()=>Eu(n.value)?n.label:n.value),a=O({get(){return o.value?r.modelValue:n.modelValue},set(f){o.value?r.changeEvent(f):e&&e(Pn,f),t.value.checked=n.modelValue===s.value}}),i=Cs(O(()=>r==null?void 0:r.size)),l=Da(O(()=>r==null?void 0:r.disabled)),c=N(!1),d=O(()=>l.value||o.value&&a.value!==s.value?-1:0);return oi({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},O(()=>o.value&&Eu(n.value))),{radioRef:t,isGroup:o,radioGroup:r,focus:c,size:i,disabled:l,tabIndex:d,modelValue:a,actualValue:s}},z_=ue({name:"ElRadio"}),H_=ue({...z_,props:V_,emits:dS,setup(n,{emit:e}){const t=n,r=je("radio"),{radioRef:o,radioGroup:s,focus:a,size:i,disabled:l,modelValue:c,actualValue:d}=pS(t,e);function f(){Dt(()=>e("change",c.value))}return(h,m)=>{var g;return I(),z("label",{class:H([v(r).b(),v(r).is("disabled",v(l)),v(r).is("focus",v(a)),v(r).is("bordered",h.border),v(r).is("checked",v(c)===v(d)),v(r).m(v(i))])},[Q("span",{class:H([v(r).e("input"),v(r).is("disabled",v(l)),v(r).is("checked",v(c)===v(d))])},[an(Q("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":y=>Pa(c)?c.value=y:null,class:H(v(r).e("original")),value:v(d),name:h.name||((g=v(s))==null?void 0:g.name),disabled:v(l),checked:v(c)===v(d),type:"radio",onFocus:y=>a.value=!0,onBlur:y=>a.value=!1,onChange:f,onClick:Qe(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[b4,v(c)]]),Q("span",{class:H(v(r).e("inner"))},null,2)],2),Q("span",{class:H(v(r).e("label")),onKeydown:Qe(()=>{},["stop"])},[ve(h.$slots,"default",{},()=>[ht(Ee(h.label),1)])],42,["onKeydown"])],2)}}});var W_=mt(H_,[["__file","radio.vue"]]);const U_=Ge({...cS}),j_=ue({name:"ElRadioButton"}),K_=ue({...j_,props:U_,setup(n){const e=n,t=je("radio"),{radioRef:r,focus:o,size:s,disabled:a,modelValue:i,radioGroup:l,actualValue:c}=pS(e),d=O(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(f,h)=>{var m;return I(),z("label",{class:H([v(t).b("button"),v(t).is("active",v(i)===v(c)),v(t).is("disabled",v(a)),v(t).is("focus",v(o)),v(t).bm("button",v(s))])},[an(Q("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":g=>Pa(i)?i.value=g:null,class:H(v(t).be("button","original-radio")),value:v(c),type:"radio",name:f.name||((m=v(l))==null?void 0:m.name),disabled:v(a),onFocus:g=>o.value=!0,onBlur:g=>o.value=!1,onClick:Qe(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[b4,v(i)]]),Q("span",{class:H(v(t).be("button","inner")),style:en(v(i)===v(c)?v(d):{}),onKeydown:Qe(()=>{},["stop"])},[ve(f.$slots,"default",{},()=>[ht(Ee(f.label),1)])],46,["onKeydown"])],2)}}});var hS=mt(K_,[["__file","radio-button.vue"]]);const G_=Ge({id:{type:String,default:void 0},size:La,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...gi(["ariaLabel"])}),Y_=dS,q_=ue({name:"ElRadioGroup"}),J_=ue({...q_,props:G_,emits:Y_,setup(n,{emit:e}){const t=n,r=je("radio"),o=rl(),s=N(),{formItem:a}=Os(),{inputId:i,isLabeledByFormItem:l}=Yu(t,{formItemContext:a}),c=f=>{e(Pn,f),Dt(()=>e("change",f))};ln(()=>{const f=s.value.querySelectorAll("[type=radio]"),h=f[0];!Array.from(f).some(m=>m.checked)&&h&&(h.tabIndex=0)});const d=O(()=>t.name||o.value);return mn(fS,Hn({...qu(t),changeEvent:c,name:d})),Xe(()=>t.modelValue,()=>{t.validateEvent&&(a==null||a.validate("change").catch(f=>$a()))}),(f,h)=>(I(),z("div",{id:v(i),ref_key:"radioGroupRef",ref:s,class:H(v(r).b("group")),role:"radiogroup","aria-label":v(l)?void 0:f.ariaLabel||"radio-group","aria-labelledby":v(l)?v(a).labelId:void 0},[ve(f.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var mS=mt(J_,[["__file","radio-group.vue"]]);const X_=kn(W_,{RadioButton:hS,RadioGroup:mS}),Z_=ro(mS);ro(hS);const Q_=(n="")=>n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),as=n=>l9(n),Xr=n=>!n&&n!==0?[]:gt(n)?n:[n],lv=Ge({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:qf},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),eA={close:n=>n instanceof MouseEvent,click:n=>n instanceof MouseEvent},tA=ue({name:"ElTag"}),nA=ue({...tA,props:lv,emits:eA,setup(n,{emit:e}){const t=n,r=Cs(),o=je("tag"),s=O(()=>{const{type:c,hit:d,effect:f,closable:h,round:m}=t;return[o.b(),o.is("closable",h),o.m(c||"primary"),o.m(r.value),o.m(f),o.is("hit",d),o.is("round",m)]}),a=c=>{e("close",c)},i=c=>{e("click",c)},l=c=>{var d,f,h;(h=(f=(d=c==null?void 0:c.component)==null?void 0:d.subTree)==null?void 0:f.component)!=null&&h.bum&&(c.component.subTree.component.bum=null)};return(c,d)=>c.disableTransitions?(I(),z("span",{key:0,class:H(v(s)),style:en({backgroundColor:c.color}),onClick:i},[Q("span",{class:H(v(o).e("content"))},[ve(c.$slots,"default")],2),c.closable?(I(),me(v(pt),{key:0,class:H(v(o).e("close")),onClick:Qe(a,["stop"])},{default:q(()=>[R(v(Mu))]),_:1},8,["class","onClick"])):fe("v-if",!0)],6)):(I(),me(Is,{key:1,name:`${v(o).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:q(()=>[Q("span",{class:H(v(s)),style:en({backgroundColor:c.color}),onClick:i},[Q("span",{class:H(v(o).e("content"))},[ve(c.$slots,"default")],2),c.closable?(I(),me(v(pt),{key:0,class:H(v(o).e("close")),onClick:Qe(a,["stop"])},{default:q(()=>[R(v(Mu))]),_:1},8,["class","onClick"])):fe("v-if",!0)],6)]),_:3},8,["name"]))}});var rA=mt(nA,[["__file","tag.vue"]]);const oA=kn(rA),Za=new Map;if(Mo){let n;document.addEventListener("mousedown",e=>n=e),document.addEventListener("mouseup",e=>{if(n){for(const t of Za.values())for(const{documentHandler:r}of t)r(e,n);n=void 0}})}function Ub(n,e){let t=[];return gt(e.arg)?t=e.arg:S4(e.arg)&&t.push(e.arg),function(r,o){const s=e.instance.popperRef,a=r.target,i=o==null?void 0:o.target,l=!e||!e.instance,c=!a||!i,d=n.contains(a)||n.contains(i),f=n===a,h=t.length&&t.some(g=>g==null?void 0:g.contains(a))||t.length&&t.includes(i),m=s&&(s.contains(a)||s.contains(i));l||c||d||f||h||m||e.value(r,o)}}const Ru={beforeMount(n,e){Za.has(n)||Za.set(n,[]),Za.get(n).push({documentHandler:Ub(n,e),bindingFn:e.value})},updated(n,e){Za.has(n)||Za.set(n,[]);const t=Za.get(n),r=t.findIndex(s=>s.bindingFn===e.oldValue),o={documentHandler:Ub(n,e),bindingFn:e.value};r>=0?t.splice(r,1,o):t.push(o)},unmounted(n){Za.delete(n)}},jb=n=>Rt(n)||Nn(n)||gt(n),aA=Ge({accordion:Boolean,modelValue:{type:we([Array,String,Number]),default:()=>xo([])}}),sA={[Pn]:jb,[xs]:jb},vS=Symbol("collapseContextKey"),iA=(n,e)=>{const t=N(Bo(n.modelValue)),r=s=>{t.value=s;const a=n.accordion?t.value[0]:t.value;e(Pn,a),e(xs,a)},o=s=>{if(n.accordion)r([t.value[0]===s?"":s]);else{const a=[...t.value],i=a.indexOf(s);i>-1?a.splice(i,1):a.push(s),r(a)}};return Xe(()=>n.modelValue,()=>t.value=Bo(n.modelValue),{deep:!0}),mn(vS,{activeNames:t,handleItemClick:o}),{activeNames:t,setActiveNames:r}},lA=()=>{const n=je("collapse");return{rootKls:O(()=>n.b())}},uA=ue({name:"ElCollapse"}),cA=ue({...uA,props:aA,emits:sA,setup(n,{expose:e,emit:t}){const r=n,{activeNames:o,setActiveNames:s}=iA(r,t),{rootKls:a}=lA();return e({activeNames:o,setActiveNames:s}),(i,l)=>(I(),z("div",{class:H(v(a))},[ve(i.$slots,"default")],2))}});var dA=mt(cA,[["__file","collapse.vue"]]);const fA=ue({name:"ElCollapseTransition"}),pA=ue({...fA,setup(n){const e=je("collapse-transition"),t=o=>{o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom},r={beforeEnter(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.style.height&&(o.dataset.elExistsHeight=o.style.height),o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0},enter(o){requestAnimationFrame(()=>{o.dataset.oldOverflow=o.style.overflow,o.dataset.elExistsHeight?o.style.maxHeight=o.dataset.elExistsHeight:o.scrollHeight!==0?o.style.maxHeight=`${o.scrollHeight}px`:o.style.maxHeight=0,o.style.paddingTop=o.dataset.oldPaddingTop,o.style.paddingBottom=o.dataset.oldPaddingBottom,o.style.overflow="hidden"})},afterEnter(o){o.style.maxHeight="",o.style.overflow=o.dataset.oldOverflow},enterCancelled(o){t(o)},beforeLeave(o){o.dataset||(o.dataset={}),o.dataset.oldPaddingTop=o.style.paddingTop,o.dataset.oldPaddingBottom=o.style.paddingBottom,o.dataset.oldOverflow=o.style.overflow,o.style.maxHeight=`${o.scrollHeight}px`,o.style.overflow="hidden"},leave(o){o.scrollHeight!==0&&(o.style.maxHeight=0,o.style.paddingTop=0,o.style.paddingBottom=0)},afterLeave(o){t(o)},leaveCancelled(o){t(o)}};return(o,s)=>(I(),me(Is,xt({name:v(e).b()},u9(r)),{default:q(()=>[ve(o.$slots,"default")]),_:3},16,["name"]))}});var hA=mt(pA,[["__file","collapse-transition.vue"]]);const gS=kn(hA),mA=Ge({title:{type:String,default:""},name:{type:we([String,Number]),default:void 0},icon:{type:Dn,default:Oa},disabled:Boolean}),vA=n=>{const e=yt(vS),{namespace:t}=je("collapse"),r=N(!1),o=N(!1),s=c9(),a=O(()=>s.current++),i=O(()=>{var h;return(h=n.name)!=null?h:`${t.value}-id-${s.prefix}-${v(a)}`}),l=O(()=>e==null?void 0:e.activeNames.value.includes(v(i)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{o.value?o.value=!1:r.value=!0},50)},handleHeaderClick:()=>{n.disabled||(e==null||e.handleItemClick(v(i)),r.value=!1,o.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(v(i))}}},gA=(n,{focusing:e,isActive:t,id:r})=>{const o=je("collapse"),s=O(()=>[o.b("item"),o.is("active",v(t)),o.is("disabled",n.disabled)]),a=O(()=>[o.be("item","header"),o.is("active",v(t)),{focusing:v(e)&&!n.disabled}]),i=O(()=>[o.be("item","arrow"),o.is("active",v(t))]),l=O(()=>o.be("item","wrap")),c=O(()=>o.be("item","content")),d=O(()=>o.b(`content-${v(r)}`)),f=O(()=>o.b(`head-${v(r)}`));return{arrowKls:i,headKls:a,rootKls:s,itemWrapperKls:l,itemContentKls:c,scopedContentId:d,scopedHeadId:f}},yA=ue({name:"ElCollapseItem"}),bA=ue({...yA,props:mA,setup(n,{expose:e}){const t=n,{focusing:r,id:o,isActive:s,handleFocus:a,handleHeaderClick:i,handleEnterClick:l}=vA(t),{arrowKls:c,headKls:d,rootKls:f,itemWrapperKls:h,itemContentKls:m,scopedContentId:g,scopedHeadId:y}=gA(t,{focusing:r,isActive:s,id:o});return e({isActive:s}),(S,w)=>(I(),z("div",{class:H(v(f))},[Q("button",{id:v(y),class:H(v(d)),"aria-expanded":v(s),"aria-controls":v(g),"aria-describedby":v(g),tabindex:S.disabled?-1:0,type:"button",onClick:v(i),onKeydown:gr(Qe(v(l),["stop","prevent"]),["space","enter"]),onFocus:v(a),onBlur:x=>r.value=!1},[ve(S.$slots,"title",{},()=>[ht(Ee(S.title),1)]),ve(S.$slots,"icon",{isActive:v(s)},()=>[R(v(pt),{class:H(v(c))},{default:q(()=>[(I(),me(nn(S.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),R(v(gS),null,{default:q(()=>[an(Q("div",{id:v(g),role:"region",class:H(v(h)),"aria-hidden":!v(s),"aria-labelledby":v(y)},[Q("div",{class:H(v(m))},[ve(S.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[Qn,v(s)]])]),_:3})],2))}});var yS=mt(bA,[["__file","collapse-item.vue"]]);const SA=kn(dA,{CollapseItem:yS}),wA=ro(yS),CA=Ge({a11y:{type:Boolean,default:!0},locale:{type:we(Object)},size:La,button:{type:we(Object)},experimentalFeatures:{type:we(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:we(Object)},zIndex:Number,namespace:{type:String,default:"el"},...v1}),No={},xA=ue({name:"ElConfigProvider",props:CA,setup(n,{slots:e}){Xe(()=>n.message,r=>{Object.assign(No,r??{})},{immediate:!0,deep:!0});const t=K4(n);return()=>ve(e,"default",{config:t==null?void 0:t.value})}}),kA=kn(xA);var Ed={exports:{}},EA=Ed.exports,Kb;function TA(){return Kb||(Kb=1,function(n,e){(function(t,r){n.exports=r()})(EA,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"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,s=/\d\d/,a=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},c=function(S){return(S=+S)+(S>68?1900:2e3)},d=function(S){return function(w){this[S]=+w}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(S){(this.zone||(this.zone={})).offset=function(w){if(!w||w==="Z")return 0;var x=w.match(/([+-]|\d\d)/g),T=60*x[1]+(+x[2]||0);return T===0?0:x[0]==="+"?-T:T}(S)}],h=function(S){var w=l[S];return w&&(w.indexOf?w:w.s.concat(w.f))},m=function(S,w){var x,T=l.meridiem;if(T){for(var k=1;k<=24;k+=1)if(S.indexOf(T(k,0,w))>-1){x=k>12;break}}else x=S===(w?"pm":"PM");return x},g={A:[i,function(S){this.afternoon=m(S,!1)}],a:[i,function(S){this.afternoon=m(S,!0)}],Q:[o,function(S){this.month=3*(S-1)+1}],S:[o,function(S){this.milliseconds=100*+S}],SS:[s,function(S){this.milliseconds=10*+S}],SSS:[/\d{3}/,function(S){this.milliseconds=+S}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[s,d("day")],Do:[i,function(S){var w=l.ordinal,x=S.match(/\d+/);if(this.day=x[0],w)for(var T=1;T<=31;T+=1)w(T).replace(/\[|\]/g,"")===S&&(this.day=T)}],w:[a,d("week")],ww:[s,d("week")],M:[a,d("month")],MM:[s,d("month")],MMM:[i,function(S){var w=h("months"),x=(h("monthsShort")||w.map(function(T){return T.slice(0,3)})).indexOf(S)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[i,function(S){var w=h("months").indexOf(S)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(S){this.year=c(S)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function y(S){var w,x;w=S,x=l&&l.formats;for(var T=(S=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,K,J){var G=J&&J.toUpperCase();return K||x[J]||t[J]||x[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ne,W,D){return W||D.slice(1)})})).match(r),k=T.length,C=0;C<k;C+=1){var M=T[C],A=g[M],V=A&&A[0],P=A&&A[1];T[C]=P?{regex:V,parser:P}:M.replace(/^\[|\]$/g,"")}return function(L){for(var K={},J=0,G=0;J<k;J+=1){var ne=T[J];if(typeof ne=="string")G+=ne.length;else{var W=ne.regex,D=ne.parser,U=L.slice(G),te=W.exec(U)[0];D.call(K,te),L=L.replace(te,"")}}return function(j){var ee=j.afternoon;if(ee!==void 0){var X=j.hours;ee?X<12&&(j.hours+=12):X===12&&(j.hours=0),delete j.afternoon}}(K),K}}return function(S,w,x){x.p.customParseFormat=!0,S&&S.parseTwoDigitYear&&(c=S.parseTwoDigitYear);var T=w.prototype,k=T.parse;T.parse=function(C){var M=C.date,A=C.utc,V=C.args;this.$u=A;var P=V[1];if(typeof P=="string"){var L=V[2]===!0,K=V[3]===!0,J=L||K,G=V[2];K&&(G=V[2]),l=this.$locale(),!L&&G&&(l=x.Ls[G]),this.$d=function(U,te,j,ee){try{if(["x","X"].indexOf(te)>-1)return new Date((te==="X"?1e3:1)*U);var X=y(te)(U),ce=X.year,ae=X.month,ye=X.day,ke=X.hours,Be=X.minutes,le=X.seconds,xe=X.milliseconds,Me=X.zone,De=X.week,Ze=new Date,lt=ye||(ce||ae?1:Ze.getDate()),ze=ce||Ze.getFullYear(),Pe=0;ce&&!ae||(Pe=ae>0?ae-1:Ze.getMonth());var nt,Ot=ke||0,_e=Be||0,He=le||0,Fe=xe||0;return Me?new Date(Date.UTC(ze,Pe,lt,Ot,_e,He,Fe+60*Me.offset*1e3)):j?new Date(Date.UTC(ze,Pe,lt,Ot,_e,He,Fe)):(nt=new Date(ze,Pe,lt,Ot,_e,He,Fe),De&&(nt=ee(nt).week(De).toDate()),nt)}catch{return new Date("")}}(M,P,A,x),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),J&&M!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var ne=P.length,W=1;W<=ne;W+=1){V[1]=P[W-1];var D=x.apply(this,V);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}W===ne&&(this.$d=new Date(""))}else k.call(this,C)}}})}(Ed)),Ed.exports}var MA=TA();const IA=aa(MA);var Td={exports:{}},OA=Td.exports,Gb;function _A(){return Gb||(Gb=1,function(n,e){(function(t,r){n.exports=r()})(OA,function(){return function(t,r){var o=r.prototype,s=o.format;o.format=function(a){var i=this,l=this.$locale();if(!this.isValid())return s.bind(this)(a);var c=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return l.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return l.ordinal(i.week(),"W");case"w":case"ww":return c.s(i.week(),f==="w"?1:2,"0");case"W":case"WW":return c.s(i.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return c.s(String(i.$H===0?24:i.$H),f==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return f}});return s.bind(this)(d)}}})}(Td)),Td.exports}var AA=_A();const RA=aa(AA);var Md={exports:{}},PA=Md.exports,Yb;function $A(){return Yb||(Yb=1,function(n,e){(function(t,r){n.exports=r()})(PA,function(){var t="week",r="year";return function(o,s,a){var i=s.prototype;i.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=a(this).startOf(r).add(1,r).date(c),f=a(this).endOf(t);if(d.isBefore(f))return 1}var h=a(this).startOf(r).date(c).startOf(t).subtract(1,"millisecond"),m=this.diff(h,t,!0);return m<0?a(this).startOf("week").week():Math.ceil(m)},i.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(Md)),Md.exports}var DA=$A();const NA=aa(DA);var Id={exports:{}},LA=Id.exports,qb;function BA(){return qb||(qb=1,function(n,e){(function(t,r){n.exports=r()})(LA,function(){return function(t,r){r.prototype.weekYear=function(){var o=this.month(),s=this.week(),a=this.year();return s===1&&o===11?a+1:o===0&&s>=52?a-1:a}}})}(Id)),Id.exports}var FA=BA();const VA=aa(FA);var Od={exports:{}},zA=Od.exports,Jb;function HA(){return Jb||(Jb=1,function(n,e){(function(t,r){n.exports=r()})(zA,function(){return function(t,r,o){r.prototype.dayOfYear=function(s){var a=Math.round((o(this).startOf("day")-o(this).startOf("year"))/864e5)+1;return s==null?a:this.add(s-a,"day")}}})}(Od)),Od.exports}var WA=HA();const UA=aa(WA);var _d={exports:{}},jA=_d.exports,Xb;function KA(){return Xb||(Xb=1,function(n,e){(function(t,r){n.exports=r()})(jA,function(){return function(t,r){r.prototype.isSameOrAfter=function(o,s){return this.isSame(o,s)||this.isAfter(o,s)}}})}(_d)),_d.exports}var GA=KA();const YA=aa(GA);var Ad={exports:{}},qA=Ad.exports,Zb;function JA(){return Zb||(Zb=1,function(n,e){(function(t,r){n.exports=r()})(qA,function(){return function(t,r){r.prototype.isSameOrBefore=function(o,s){return this.isSame(o,s)||this.isBefore(o,s)}}})}(Ad)),Ad.exports}var XA=JA();const ZA=aa(XA),Qb=["hours","minutes","seconds"],e2="HH:mm:ss",ji="YYYY-MM-DD",QA={date:ji,dates:ji,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${ji} ${e2}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:ji,datetimerange:`${ji} ${e2}`},bS=Ge({disabledHours:{type:we(Function)},disabledMinutes:{type:we(Function)},disabledSeconds:{type:we(Function)}}),eR=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),SS=Ge({id:{type:we([Array,String])},name:{type:we([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:we([String,Object]),default:u1},editable:{type:Boolean,default:!0},prefixIcon:{type:we([String,Object]),default:""},size:La,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},modelValue:{type:we([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:we([Date,Array])},defaultTime:{type:we([Date,Array])},isRange:Boolean,...bS,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:we([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:we(String),values:w4,default:"bottom"},fallbackPlacements:{type:we(Array),default:["bottom","top","right","left"]},...v1,...gi(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),tR=Ge({id:{type:we(Array)},name:{type:we(Array)},modelValue:{type:we([Array,String])},startPlaceholder:String,endPlaceholder:String}),nR=ue({name:"PickerRangeTrigger",inheritAttrs:!1}),rR=ue({...nR,props:tR,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(n,{expose:e,emit:t}){const r=d9(),o=je("date"),s=je("range"),a=N(),i=N(),{wrapperRef:l,isFocused:c}=c1(a),d=k=>{t("click",k)},f=k=>{t("mouseenter",k)},h=k=>{t("mouseleave",k)},m=k=>{t("mouseenter",k)},g=k=>{t("startInput",k)},y=k=>{t("endInput",k)},S=k=>{t("startChange",k)},w=k=>{t("endChange",k)};return e({focus:()=>{var k;(k=a.value)==null||k.focus()},blur:()=>{var k,C;(k=a.value)==null||k.blur(),(C=i.value)==null||C.blur()}}),(k,C)=>(I(),z("div",{ref_key:"wrapperRef",ref:l,class:H([v(o).is("active",v(c)),k.$attrs.class]),style:en(k.$attrs.style),onClick:d,onMouseenter:f,onMouseleave:h,onTouchstartPassive:m},[ve(k.$slots,"prefix"),Q("input",xt(v(r),{id:k.id&&k.id[0],ref_key:"inputRef",ref:a,name:k.name&&k.name[0],placeholder:k.startPlaceholder,value:k.modelValue&&k.modelValue[0],class:v(s).b("input"),onInput:g,onChange:S}),null,16,["id","name","placeholder","value"]),ve(k.$slots,"range-separator"),Q("input",xt(v(r),{id:k.id&&k.id[1],ref_key:"endInputRef",ref:i,name:k.name&&k.name[1],placeholder:k.endPlaceholder,value:k.modelValue&&k.modelValue[1],class:v(s).b("input"),onInput:y,onChange:w}),null,16,["id","name","placeholder","value"]),ve(k.$slots,"suffix")],38))}});var oR=mt(rR,[["__file","picker-range-trigger.vue"]]);const aR=ue({name:"Picker"}),sR=ue({...aR,props:SS,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(n,{expose:e,emit:t}){const r=n,o=d1(),{lang:s}=En(),a=je("date"),i=je("input"),l=je("range"),{form:c,formItem:d}=Os(),f=yt("ElPopperOptions",{}),{valueOnClear:h}=j4(r,null),m=N(),g=N(),y=N(!1),S=N(!1),w=N(null);let x=!1;const{isFocused:T,handleFocus:k,handleBlur:C}=c1(g,{beforeFocus(){return r.readonly||j.value},afterFocus(){y.value=!0},beforeBlur(Y){var Ie;return!x&&((Ie=m.value)==null?void 0:Ie.isFocusInsideContent(Y))},afterBlur(){Ye(),y.value=!1,x=!1,r.validateEvent&&(d==null||d.validate("blur").catch(Y=>$a()))}}),M=O(()=>[a.b("editor"),a.bm("editor",r.type),i.e("wrapper"),a.is("disabled",j.value),a.is("active",y.value),l.b("editor"),Ot?l.bm("editor",Ot.value):"",o.class]),A=O(()=>[i.e("icon"),l.e("close-icon"),xe.value?"":l.e("close-icon--hidden")]);Xe(y,Y=>{Y?Dt(()=>{Y&&(w.value=r.modelValue)}):(Fe.value=null,Dt(()=>{V(r.modelValue)}))});const V=(Y,Ie)=>{(Ie||!Vb(Y,w.value))&&(t("change",Y),r.validateEvent&&(d==null||d.validate("change").catch(Re=>$a())))},P=Y=>{if(!Vb(r.modelValue,Y)){let Ie;gt(Y)?Ie=Y.map(Re=>Hb(Re,r.valueFormat,s.value)):Y&&(Ie=Hb(Y,r.valueFormat,s.value)),t("update:modelValue",Y&&Ie,s.value)}},L=Y=>{t("keydown",Y)},K=O(()=>g.value?Array.from(g.value.$el.querySelectorAll("input")):[]),J=(Y,Ie,Re)=>{const Ne=K.value;Ne.length&&(!Re||Re==="min"?(Ne[0].setSelectionRange(Y,Ie),Ne[0].focus()):Re==="max"&&(Ne[1].setSelectionRange(Y,Ie),Ne[1].focus()))},G=(Y="",Ie=!1)=>{y.value=Ie;let Re;gt(Y)?Re=Y.map(Ne=>Ne.toDate()):Re=Y&&Y.toDate(),Fe.value=null,P(Re)},ne=()=>{S.value=!0},W=()=>{t("visible-change",!0)},D=()=>{S.value=!1,y.value=!1,t("visible-change",!1)},U=()=>{y.value=!0},te=()=>{y.value=!1},j=O(()=>r.disabled||(c==null?void 0:c.disabled)),ee=O(()=>{let Y;if(De.value?F.value.getDefaultValue&&(Y=F.value.getDefaultValue()):gt(r.modelValue)?Y=r.modelValue.map(Ie=>zb(Ie,r.valueFormat,s.value)):Y=zb(r.modelValue,r.valueFormat,s.value),F.value.getRangeAvailableTime){const Ie=F.value.getRangeAvailableTime(Y);vs(Ie,Y)||(Y=Ie,De.value||P(Xc(Y)))}return gt(Y)&&Y.some(Ie=>!Ie)&&(Y=[]),Y}),X=O(()=>{if(!F.value.panelReady)return"";const Y=dt(ee.value);return gt(Fe.value)?[Fe.value[0]||Y&&Y[0]||"",Fe.value[1]||Y&&Y[1]||""]:Fe.value!==null?Fe.value:!ae.value&&De.value||!y.value&&De.value?"":Y?ye.value||ke.value||Be.value?Y.join(", "):Y:""}),ce=O(()=>r.type.includes("time")),ae=O(()=>r.type.startsWith("time")),ye=O(()=>r.type==="dates"),ke=O(()=>r.type==="months"),Be=O(()=>r.type==="years"),le=O(()=>r.prefixIcon||(ce.value?f9:p9)),xe=N(!1),Me=Y=>{r.readonly||j.value||(xe.value&&(Y.stopPropagation(),F.value.handleClear?F.value.handleClear():P(h.value),V(h.value,!0),xe.value=!1,D()),t("clear"))},De=O(()=>{const{modelValue:Y}=r;return!Y||gt(Y)&&!Y.filter(Boolean).length}),Ze=async Y=>{var Ie;r.readonly||j.value||(((Ie=Y.target)==null?void 0:Ie.tagName)!=="INPUT"||T.value)&&(y.value=!0)},lt=()=>{r.readonly||j.value||!De.value&&r.clearable&&(xe.value=!0)},ze=()=>{xe.value=!1},Pe=Y=>{var Ie;r.readonly||j.value||(((Ie=Y.touches[0].target)==null?void 0:Ie.tagName)!=="INPUT"||T.value)&&(y.value=!0)},nt=O(()=>r.type.includes("range")),Ot=Cs(),_e=O(()=>{var Y,Ie;return(Ie=(Y=v(m))==null?void 0:Y.popperRef)==null?void 0:Ie.contentRef}),He=h9(g,Y=>{const Ie=v(_e),Re=m9(g);Ie&&(Y.target===Ie||Y.composedPath().includes(Ie))||Y.target===Re||Re&&Y.composedPath().includes(Re)||(y.value=!1)});no(()=>{He==null||He()});const Fe=N(null),Ye=()=>{if(Fe.value){const Y=qe(X.value);Y&&vt(Y)&&(P(Xc(Y)),Fe.value=null)}Fe.value===""&&(P(h.value),V(h.value),Fe.value=null)},qe=Y=>Y?F.value.parseUserInput(Y):null,dt=Y=>Y?F.value.formatToString(Y):null,vt=Y=>F.value.isValidValue(Y),bt=async Y=>{if(r.readonly||j.value)return;const{code:Ie}=Y;if(L(Y),Ie===It.esc){y.value===!0&&(y.value=!1,Y.preventDefault(),Y.stopPropagation());return}if(Ie===It.down&&(F.value.handleFocusPicker&&(Y.preventDefault(),Y.stopPropagation()),y.value===!1&&(y.value=!0,await Dt()),F.value.handleFocusPicker)){F.value.handleFocusPicker();return}if(Ie===It.tab){x=!0;return}if(Ie===It.enter||Ie===It.numpadEnter){(Fe.value===null||Fe.value===""||vt(qe(X.value)))&&(Ye(),y.value=!1),Y.stopPropagation();return}if(Fe.value){Y.stopPropagation();return}F.value.handleKeydownInput&&F.value.handleKeydownInput(Y)},kt=Y=>{Fe.value=Y,y.value||(y.value=!0)},Lt=Y=>{const Ie=Y.target;Fe.value?Fe.value=[Ie.value,Fe.value[1]]:Fe.value=[Ie.value,null]},Yt=Y=>{const Ie=Y.target;Fe.value?Fe.value=[Fe.value[0],Ie.value]:Fe.value=[null,Ie.value]},Pt=()=>{var Y;const Ie=Fe.value,Re=qe(Ie&&Ie[0]),Ne=v(ee);if(Re&&Re.isValid()){Fe.value=[dt(Re),((Y=X.value)==null?void 0:Y[1])||null];const ot=[Re,Ne&&(Ne[1]||null)];vt(ot)&&(P(Xc(ot)),Fe.value=null)}},pe=()=>{var Y;const Ie=v(Fe),Re=qe(Ie&&Ie[1]),Ne=v(ee);if(Re&&Re.isValid()){Fe.value=[((Y=v(X))==null?void 0:Y[0])||null,dt(Re)];const ot=[Ne&&Ne[0],Re];vt(ot)&&(P(Xc(ot)),Fe.value=null)}},F=N({}),re=Y=>{F.value[Y[0]]=Y[1],F.value.panelReady=!0},ge=Y=>{t("calendar-change",Y)},oe=(Y,Ie,Re)=>{t("panel-change",Y,Ie,Re)},ie=()=>{var Y;(Y=g.value)==null||Y.focus()},be=()=>{var Y;(Y=g.value)==null||Y.blur()};return mn("EP_PICKER_BASE",{props:r}),e({focus:ie,blur:be,handleOpen:U,handleClose:te,onPick:G}),(Y,Ie)=>(I(),me(v(Ju),xt({ref_key:"refPopper",ref:m,visible:y.value,effect:"light",pure:"",trigger:"click"},Y.$attrs,{role:"dialog",teleported:"",transition:`${v(a).namespace.value}-zoom-in-top`,"popper-class":[`${v(a).namespace.value}-picker__popper`,Y.popperClass],"popper-options":v(f),"fallback-placements":Y.fallbackPlacements,"gpu-acceleration":!1,placement:Y.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:ne,onShow:W,onHide:D}),{default:q(()=>[v(nt)?(I(),me(oR,{key:1,id:Y.id,ref_key:"inputRef",ref:g,"model-value":v(X),name:Y.name,disabled:v(j),readonly:!Y.editable||Y.readonly,"start-placeholder":Y.startPlaceholder,"end-placeholder":Y.endPlaceholder,class:H(v(M)),style:en(Y.$attrs.style),"aria-label":Y.ariaLabel,tabindex:Y.tabindex,autocomplete:"off",role:"combobox",onClick:Ze,onFocus:v(k),onBlur:v(C),onStartInput:Lt,onStartChange:Pt,onEndInput:Yt,onEndChange:pe,onMousedown:Ze,onMouseenter:lt,onMouseleave:ze,onTouchstartPassive:Pe,onKeydown:bt},{prefix:q(()=>[v(le)?(I(),me(v(pt),{key:0,class:H([v(i).e("icon"),v(l).e("icon")])},{default:q(()=>[(I(),me(nn(v(le))))]),_:1},8,["class"])):fe("v-if",!0)]),"range-separator":q(()=>[ve(Y.$slots,"range-separator",{},()=>[Q("span",{class:H(v(l).b("separator"))},Ee(Y.rangeSeparator),3)])]),suffix:q(()=>[Y.clearIcon?(I(),me(v(pt),{key:0,class:H(v(A)),onMousedown:Qe(v(zn),["prevent"]),onClick:Me},{default:q(()=>[(I(),me(nn(Y.clearIcon)))]),_:1},8,["class","onMousedown"])):fe("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(I(),me(v(us),{key:0,id:Y.id,ref_key:"inputRef",ref:g,"container-role":"combobox","model-value":v(X),name:Y.name,size:v(Ot),disabled:v(j),placeholder:Y.placeholder,class:H([v(a).b("editor"),v(a).bm("editor",Y.type),Y.$attrs.class]),style:en(Y.$attrs.style),readonly:!Y.editable||Y.readonly||v(ye)||v(ke)||v(Be)||Y.type==="week","aria-label":Y.ariaLabel,tabindex:Y.tabindex,"validate-event":!1,onInput:kt,onFocus:v(k),onBlur:v(C),onKeydown:bt,onChange:Ye,onMousedown:Ze,onMouseenter:lt,onMouseleave:ze,onTouchstartPassive:Pe,onClick:Qe(()=>{},["stop"])},{prefix:q(()=>[v(le)?(I(),me(v(pt),{key:0,class:H(v(i).e("icon")),onMousedown:Qe(Ze,["prevent"]),onTouchstartPassive:Pe},{default:q(()=>[(I(),me(nn(v(le))))]),_:1},8,["class","onMousedown"])):fe("v-if",!0)]),suffix:q(()=>[xe.value&&Y.clearIcon?(I(),me(v(pt),{key:0,class:H(`${v(i).e("icon")} clear-icon`),onMousedown:Qe(v(zn),["prevent"]),onClick:Me},{default:q(()=>[(I(),me(nn(Y.clearIcon)))]),_:1},8,["class","onMousedown"])):fe("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:q(()=>[ve(Y.$slots,"default",{visible:y.value,actualVisible:S.value,parsedValue:v(ee),format:Y.format,dateFormat:Y.dateFormat,timeFormat:Y.timeFormat,unlinkPanels:Y.unlinkPanels,type:Y.type,defaultValue:Y.defaultValue,showNow:Y.showNow,onPick:G,onSelectRange:J,onSetPickerOption:re,onCalendarChange:ge,onPanelChange:oe,onMousedown:Qe(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var iR=mt(sR,[["__file","picker.vue"]]);const lR=Ge({...eR,datetimeRole:String,parsedValue:{type:we(Object)}}),uR=({getAvailableHours:n,getAvailableMinutes:e,getAvailableSeconds:t})=>{const r=(a,i,l,c)=>{const d={hour:n,minute:e,second:t};let f=a;return["hour","minute","second"].forEach(h=>{if(d[h]){let m;const g=d[h];switch(h){case"minute":{m=g(f.hour(),i,c);break}case"second":{m=g(f.hour(),f.minute(),i,c);break}default:{m=g(i,c);break}}if(m!=null&&m.length&&!m.includes(f[h]())){const y=l?0:m.length-1;f=f[h](m[y])}}}),f},o={};return{timePickerOptions:o,getAvailableTime:r,onSetOption:([a,i])=>{o[a]=i}}},lm=n=>{const e=(r,o)=>r||o,t=r=>r!==!0;return n.map(e).filter(t)},wS=(n,e,t)=>({getHoursList:(a,i)=>im(24,n&&(()=>n==null?void 0:n(a,i))),getMinutesList:(a,i,l)=>im(60,e&&(()=>e==null?void 0:e(a,i,l))),getSecondsList:(a,i,l,c)=>im(60,t&&(()=>t==null?void 0:t(a,i,l,c)))}),cR=(n,e,t)=>{const{getHoursList:r,getMinutesList:o,getSecondsList:s}=wS(n,e,t);return{getAvailableHours:(c,d)=>lm(r(c,d)),getAvailableMinutes:(c,d,f)=>lm(o(c,d,f)),getAvailableSeconds:(c,d,f,h)=>lm(s(c,d,f,h))}},dR=n=>{const e=N(n.parsedValue);return Xe(()=>n.visible,t=>{t||(e.value=n.parsedValue)}),e},fR=Ge({role:{type:String,required:!0},spinnerDate:{type:we(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:we(String),default:""},...bS}),pR=100,hR=600,t2={beforeMount(n,e){const t=e.value,{interval:r=pR,delay:o=hR}=$n(t)?{}:t;let s,a;const i=()=>$n(t)?t():t.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),s&&(clearInterval(s),s=void 0)};n.addEventListener("mousedown",c=>{c.button===0&&(l(),i(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{s=setInterval(()=>{i()},r)},o))})}},mR=ue({__name:"basic-time-spinner",props:fR,emits:["change","select-range","set-option"],setup(n,{emit:e}){const t=n,r=yt("EP_PICKER_BASE"),{isRange:o}=r.props,s=je("time"),{getHoursList:a,getMinutesList:i,getSecondsList:l}=wS(t.disabledHours,t.disabledMinutes,t.disabledSeconds);let c=!1;const d=N(),f=N(),h=N(),m=N(),g={hours:f,minutes:h,seconds:m},y=O(()=>t.showSeconds?Qb:Qb.slice(0,2)),S=O(()=>{const{spinnerDate:X}=t,ce=X.hour(),ae=X.minute(),ye=X.second();return{hours:ce,minutes:ae,seconds:ye}}),w=O(()=>{const{hours:X,minutes:ce}=v(S),{role:ae,spinnerDate:ye}=t,ke=o?void 0:ye;return{hours:a(ae,ke),minutes:i(X,ae,ke),seconds:l(X,ce,ae,ke)}}),x=O(()=>{const{hours:X,minutes:ce,seconds:ae}=v(S);return{hours:sm(X,23),minutes:sm(ce,59),seconds:sm(ae,59)}}),T=m1(X=>{c=!1,M(X)},200),k=X=>{if(!!!t.amPmMode)return"";const ae=t.amPmMode==="A";let ye=X<12?" am":" pm";return ae&&(ye=ye.toUpperCase()),ye},C=X=>{let ce;switch(X){case"hours":ce=[0,2];break;case"minutes":ce=[3,5];break;case"seconds":ce=[6,8];break}const[ae,ye]=ce;e("select-range",ae,ye),d.value=X},M=X=>{P(X,v(S)[X])},A=()=>{M("hours"),M("minutes"),M("seconds")},V=X=>X.querySelector(`.${s.namespace.value}-scrollbar__wrap`),P=(X,ce)=>{if(t.arrowControl)return;const ae=v(g[X]);ae&&ae.$el&&(V(ae.$el).scrollTop=Math.max(0,ce*L(X)))},L=X=>{const ce=v(g[X]),ae=ce==null?void 0:ce.$el.querySelector("li");return ae&&Number.parseFloat(C4(ae,"height"))||0},K=()=>{G(1)},J=()=>{G(-1)},G=X=>{d.value||C("hours");const ce=d.value,ae=v(S)[ce],ye=d.value==="hours"?24:60,ke=ne(ce,ae,X,ye);W(ce,ke),P(ce,ke),Dt(()=>C(ce))},ne=(X,ce,ae,ye)=>{let ke=(ce+ae+ye)%ye;const Be=v(w)[X];for(;Be[ke]&&ke!==ce;)ke=(ke+ae+ye)%ye;return ke},W=(X,ce)=>{if(v(w)[X][ce])return;const{hours:ke,minutes:Be,seconds:le}=v(S);let xe;switch(X){case"hours":xe=t.spinnerDate.hour(ce).minute(Be).second(le);break;case"minutes":xe=t.spinnerDate.hour(ke).minute(ce).second(le);break;case"seconds":xe=t.spinnerDate.hour(ke).minute(Be).second(ce);break}e("change",xe)},D=(X,{value:ce,disabled:ae})=>{ae||(W(X,ce),C(X),P(X,ce))},U=X=>{const ce=v(g[X]);if(!ce)return;c=!0,T(X);const ae=Math.min(Math.round((V(ce.$el).scrollTop-(te(X)*.5-10)/L(X)+3)/L(X)),X==="hours"?23:59);W(X,ae)},te=X=>v(g[X]).$el.offsetHeight,j=()=>{const X=ce=>{const ae=v(g[ce]);ae&&ae.$el&&(V(ae.$el).onscroll=()=>{U(ce)})};X("hours"),X("minutes"),X("seconds")};ln(()=>{Dt(()=>{!t.arrowControl&&j(),A(),t.role==="start"&&C("hours")})});const ee=(X,ce)=>{g[ce].value=X??void 0};return e("set-option",[`${t.role}_scrollDown`,G]),e("set-option",[`${t.role}_emitSelectRange`,C]),Xe(()=>t.spinnerDate,()=>{c||A()}),(X,ce)=>(I(),z("div",{class:H([v(s).b("spinner"),{"has-seconds":X.showSeconds}])},[X.arrowControl?fe("v-if",!0):(I(!0),z(it,{key:0},Ht(v(y),ae=>(I(),me(v(y1),{key:ae,ref_for:!0,ref:ye=>ee(ye,ae),class:H(v(s).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":v(s).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ye=>C(ae),onMousemove:ye=>M(ae)},{default:q(()=>[(I(!0),z(it,null,Ht(v(w)[ae],(ye,ke)=>(I(),z("li",{key:ke,class:H([v(s).be("spinner","item"),v(s).is("active",ke===v(S)[ae]),v(s).is("disabled",ye)]),onClick:Be=>D(ae,{value:ke,disabled:ye})},[ae==="hours"?(I(),z(it,{key:0},[ht(Ee(("0"+(X.amPmMode?ke%12||12:ke)).slice(-2))+Ee(k(ke)),1)],64)):(I(),z(it,{key:1},[ht(Ee(("0"+ke).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),X.arrowControl?(I(!0),z(it,{key:1},Ht(v(y),ae=>(I(),z("div",{key:ae,class:H([v(s).be("spinner","wrapper"),v(s).is("arrow")]),onMouseenter:ye=>C(ae)},[an((I(),me(v(pt),{class:H(["arrow-up",v(s).be("spinner","arrow")])},{default:q(()=>[R(v(v9))]),_:1},8,["class"])),[[v(t2),J]]),an((I(),me(v(pt),{class:H(["arrow-down",v(s).be("spinner","arrow")])},{default:q(()=>[R(v(f1))]),_:1},8,["class"])),[[v(t2),K]]),Q("ul",{class:H(v(s).be("spinner","list"))},[(I(!0),z(it,null,Ht(v(x)[ae],(ye,ke)=>(I(),z("li",{key:ke,class:H([v(s).be("spinner","item"),v(s).is("active",ye===v(S)[ae]),v(s).is("disabled",v(w)[ae][ye])])},[v(Rt)(ye)?(I(),z(it,{key:0},[ae==="hours"?(I(),z(it,{key:0},[ht(Ee(("0"+(X.amPmMode?ye%12||12:ye)).slice(-2))+Ee(k(ye)),1)],64)):(I(),z(it,{key:1},[ht(Ee(("0"+ye).slice(-2)),1)],64))],64)):fe("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):fe("v-if",!0)],2))}});var vR=mt(mR,[["__file","basic-time-spinner.vue"]]);const gR=ue({__name:"panel-time-pick",props:lR,emits:["pick","select-range","set-picker-option"],setup(n,{emit:e}){const t=n,r=yt("EP_PICKER_BASE"),{arrowControl:o,disabledHours:s,disabledMinutes:a,disabledSeconds:i,defaultValue:l}=r.props,{getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}=cR(s,a,i),h=je("time"),{t:m,lang:g}=En(),y=N([0,2]),S=dR(t),w=O(()=>So(t.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),x=O(()=>t.format.includes("ss")),T=O(()=>t.format.includes("A")?"A":t.format.includes("a")?"a":""),k=te=>{const j=tt(te).locale(g.value),ee=ne(j);return j.isSame(ee)},C=()=>{e("pick",S.value,!1)},M=(te=!1,j=!1)=>{j||e("pick",t.parsedValue,te)},A=te=>{if(!t.visible)return;const j=ne(te).millisecond(0);e("pick",j,!0)},V=(te,j)=>{e("select-range",te,j),y.value=[te,j]},P=te=>{const j=[0,3].concat(x.value?[6]:[]),ee=["hours","minutes"].concat(x.value?["seconds"]:[]),ce=(j.indexOf(y.value[0])+te+j.length)%j.length;K.start_emitSelectRange(ee[ce])},L=te=>{const j=te.code,{left:ee,right:X,up:ce,down:ae}=It;if([ee,X].includes(j)){P(j===ee?-1:1),te.preventDefault();return}if([ce,ae].includes(j)){const ye=j===ce?-1:1;K.start_scrollDown(ye),te.preventDefault();return}},{timePickerOptions:K,onSetOption:J,getAvailableTime:G}=uR({getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}),ne=te=>G(te,t.datetimeRole||"",!0),W=te=>te?tt(te,t.format).locale(g.value):null,D=te=>te?te.format(t.format):null,U=()=>tt(l).locale(g.value);return e("set-picker-option",["isValidValue",k]),e("set-picker-option",["formatToString",D]),e("set-picker-option",["parseUserInput",W]),e("set-picker-option",["handleKeydownInput",L]),e("set-picker-option",["getRangeAvailableTime",ne]),e("set-picker-option",["getDefaultValue",U]),(te,j)=>(I(),me(Is,{name:v(w)},{default:q(()=>[te.actualVisible||te.visible?(I(),z("div",{key:0,class:H(v(h).b("panel"))},[Q("div",{class:H([v(h).be("panel","content"),{"has-seconds":v(x)}])},[R(vR,{ref:"spinner",role:te.datetimeRole||"start","arrow-control":v(o),"show-seconds":v(x),"am-pm-mode":v(T),"spinner-date":te.parsedValue,"disabled-hours":v(s),"disabled-minutes":v(a),"disabled-seconds":v(i),onChange:A,onSetOption:v(J),onSelectRange:V},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),Q("div",{class:H(v(h).be("panel","footer"))},[Q("button",{type:"button",class:H([v(h).be("panel","btn"),"cancel"]),onClick:C},Ee(v(m)("el.datepicker.cancel")),3),Q("button",{type:"button",class:H([v(h).be("panel","btn"),"confirm"]),onClick:ee=>M()},Ee(v(m)("el.datepicker.confirm")),11,["onClick"])],2)],2)):fe("v-if",!0)]),_:1},8,["name"]))}});var uv=mt(gR,[["__file","panel-time-pick.vue"]]);const rp=Symbol(),yR=Ge({...SS,type:{type:we(String),default:"date"}}),bR=["date","dates","year","years","month","months","week","range"],b1=Ge({disabledDate:{type:we(Function)},date:{type:we(Object),required:!0},minDate:{type:we(Object)},maxDate:{type:we(Object)},parsedValue:{type:we([Object,Array])},rangeState:{type:we(Object),default:()=>({endDate:null,selecting:!1})}}),CS=Ge({type:{type:we(String),required:!0,values:x_},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),S1=Ge({unlinkPanels:Boolean,parsedValue:{type:we(Array)}}),w1=n=>({type:String,values:bR,default:n}),SR=Ge({...CS,parsedValue:{type:we([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),sl=n=>{if(!gt(n))return!1;const[e,t]=n;return tt.isDayjs(e)&&tt.isDayjs(t)&&e.isSameOrBefore(t)},C1=(n,{lang:e,unit:t,unlinkPanels:r})=>{let o;if(gt(n)){let[s,a]=n.map(i=>tt(i).locale(e));return r||(a=s.add(1,t)),[s,a]}else n?o=tt(n):o=tt();return o=o.locale(e),[o,o.add(1,t)]},wR=(n,e,{columnIndexOffset:t,startDate:r,nextEndDate:o,now:s,unit:a,relativeDateGetter:i,setCellMetadata:l,setRowMetadata:c})=>{for(let d=0;d<n.row;d++){const f=e[d];for(let h=0;h<n.column;h++){let m=f[h+t];m||(m={row:d,column:h,type:"normal",inRange:!1,start:!1,end:!1});const g=d*n.column+h,y=i(g);m.dayjs=y,m.date=y.toDate(),m.timestamp=y.valueOf(),m.type="normal",m.inRange=!!(r&&y.isSameOrAfter(r,a)&&o&&y.isSameOrBefore(o,a))||!!(r&&y.isSameOrBefore(r,a)&&o&&y.isSameOrAfter(o,a)),r!=null&&r.isSameOrAfter(o)?(m.start=!!o&&y.isSame(o,a),m.end=r&&y.isSame(r,a)):(m.start=!!r&&y.isSame(r,a),m.end=!!o&&y.isSame(o,a)),y.isSame(s,a)&&(m.type="today"),l==null||l(m,{rowIndex:d,columnIndex:h}),f[h+t]=m}c==null||c(f)}},Qd=(n,e,t)=>{const r=tt().locale(t).startOf("month").month(e).year(n),o=r.daysInMonth();return nS(o).map(s=>r.add(s,"day").toDate())},Pu=(n,e,t,r)=>{const o=tt().year(n).month(e).startOf("month"),s=Qd(n,e,t).find(a=>!(r!=null&&r(a)));return s?tt(s).locale(t):o.locale(t)},cv=(n,e,t)=>{const r=n.year();if(!(t!=null&&t(n.toDate())))return n.locale(e);const o=n.month();if(!Qd(r,o,e).every(t))return Pu(r,o,e,t);for(let s=0;s<12;s++)if(!Qd(r,s,e).every(t))return Pu(r,s,e,t);return n},CR=Ge({...b1,cellClassName:{type:we(Function)},showWeekNumber:Boolean,selectionMode:w1("date")}),xR=["changerange","pick","select"],dv=(n="")=>["normal","today"].includes(n),kR=(n,e)=>{const{lang:t}=En(),r=N(),o=N(),s=N(),a=N(),i=N([[],[],[],[],[],[]]);let l=!1;const c=n.date.$locale().weekStart||7,d=n.date.locale("en").localeData().weekdaysShort().map(j=>j.toLowerCase()),f=O(()=>c>3?7-c:-c),h=O(()=>{const j=n.date.startOf("month");return j.subtract(j.day()||7,"day")}),m=O(()=>d.concat(d).slice(c,c+7)),g=O(()=>g9(v(k)).some(j=>j.isCurrent)),y=O(()=>{const j=n.date.startOf("month"),ee=j.day()||7,X=j.daysInMonth(),ce=j.subtract(1,"month").daysInMonth();return{startOfMonthDay:ee,dateCountOfMonth:X,dateCountOfLastMonth:ce}}),S=O(()=>n.selectionMode==="dates"?Xr(n.parsedValue):[]),w=(j,{count:ee,rowIndex:X,columnIndex:ce})=>{const{startOfMonthDay:ae,dateCountOfMonth:ye,dateCountOfLastMonth:ke}=v(y),Be=v(f);if(X>=0&&X<=1){const le=ae+Be<0?7+ae+Be:ae+Be;if(ce+X*7>=le)return j.text=ee,!0;j.text=ke-(le-ce%7)+1+X*7,j.type="prev-month"}else return ee<=ye?j.text=ee:(j.text=ee-ye,j.type="next-month"),!0;return!1},x=(j,{columnIndex:ee,rowIndex:X},ce)=>{const{disabledDate:ae,cellClassName:ye}=n,ke=v(S),Be=w(j,{count:ce,rowIndex:X,columnIndex:ee}),le=j.dayjs.toDate();return j.selected=ke.find(xe=>xe.isSame(j.dayjs,"day")),j.isSelected=!!j.selected,j.isCurrent=M(j),j.disabled=ae==null?void 0:ae(le),j.customClass=ye==null?void 0:ye(le),Be},T=j=>{if(n.selectionMode==="week"){const[ee,X]=n.showWeekNumber?[1,7]:[0,6],ce=te(j[ee+1]);j[ee].inRange=ce,j[ee].start=ce,j[X].inRange=ce,j[X].end=ce}},k=O(()=>{const{minDate:j,maxDate:ee,rangeState:X,showWeekNumber:ce}=n,ae=v(f),ye=v(i),ke="day";let Be=1;if(ce)for(let le=0;le<6;le++)ye[le][0]||(ye[le][0]={type:"week",text:v(h).add(le*7+1,ke).week()});return wR({row:6,column:7},ye,{startDate:j,columnIndexOffset:ce?1:0,nextEndDate:X.endDate||ee||X.selecting&&j||null,now:tt().locale(v(t)).startOf(ke),unit:ke,relativeDateGetter:le=>v(h).add(le-ae,ke),setCellMetadata:(...le)=>{x(...le,Be)&&(Be+=1)},setRowMetadata:T}),ye});Xe(()=>n.date,async()=>{var j;(j=v(r))!=null&&j.contains(document.activeElement)&&(await Dt(),await C())});const C=async()=>{var j;return(j=v(o))==null?void 0:j.focus()},M=j=>n.selectionMode==="date"&&dv(j.type)&&A(j,n.parsedValue),A=(j,ee)=>ee?tt(ee).locale(v(t)).isSame(n.date.date(Number(j.text)),"day"):!1,V=(j,ee)=>{const X=j*7+(ee-(n.showWeekNumber?1:0))-v(f);return v(h).add(X,"day")},P=j=>{var ee;if(!n.rangeState.selecting)return;let X=j.target;if(X.tagName==="SPAN"&&(X=(ee=X.parentNode)==null?void 0:ee.parentNode),X.tagName==="DIV"&&(X=X.parentNode),X.tagName!=="TD")return;const ce=X.parentNode.rowIndex-1,ae=X.cellIndex;v(k)[ce][ae].disabled||(ce!==v(s)||ae!==v(a))&&(s.value=ce,a.value=ae,e("changerange",{selecting:!0,endDate:V(ce,ae)}))},L=j=>!v(g)&&(j==null?void 0:j.text)===1&&j.type==="normal"||j.isCurrent,K=j=>{l||v(g)||n.selectionMode!=="date"||U(j,!0)},J=j=>{j.target.closest("td")&&(l=!0)},G=j=>{j.target.closest("td")&&(l=!1)},ne=j=>{!n.rangeState.selecting||!n.minDate?(e("pick",{minDate:j,maxDate:null}),e("select",!0)):(j>=n.minDate?e("pick",{minDate:n.minDate,maxDate:j}):e("pick",{minDate:j,maxDate:n.minDate}),e("select",!1))},W=j=>{const ee=j.week(),X=`${j.year()}w${ee}`;e("pick",{year:j.year(),week:ee,value:X,date:j.startOf("week")})},D=(j,ee)=>{const X=ee?Xr(n.parsedValue).filter(ce=>(ce==null?void 0:ce.valueOf())!==j.valueOf()):Xr(n.parsedValue).concat([j]);e("pick",X)},U=(j,ee=!1)=>{const X=j.target.closest("td");if(!X)return;const ce=X.parentNode.rowIndex-1,ae=X.cellIndex,ye=v(k)[ce][ae];if(ye.disabled||ye.type==="week")return;const ke=V(ce,ae);switch(n.selectionMode){case"range":{ne(ke);break}case"date":{e("pick",ke,ee);break}case"week":{W(ke);break}case"dates":{D(ke,!!ye.selected);break}}},te=j=>{if(n.selectionMode!=="week")return!1;let ee=n.date.startOf("day");if(j.type==="prev-month"&&(ee=ee.subtract(1,"month")),j.type==="next-month"&&(ee=ee.add(1,"month")),ee=ee.date(Number.parseInt(j.text,10)),n.parsedValue&&!gt(n.parsedValue)){const X=(n.parsedValue.day()-c+7)%7-1;return n.parsedValue.subtract(X,"day").isSame(ee,"day")}return!1};return{WEEKS:m,rows:k,tbodyRef:r,currentCellRef:o,focus:C,isCurrent:M,isWeekActive:te,isSelectedCell:L,handlePickDate:U,handleMouseUp:G,handleMouseDown:J,handleMouseMove:P,handleFocus:K}},ER=(n,{isCurrent:e,isWeekActive:t})=>{const r=je("date-table"),{t:o}=En(),s=O(()=>[r.b(),{"is-week-mode":n.selectionMode==="week"}]),a=O(()=>o("el.datepicker.dateTablePrompt")),i=O(()=>o("el.datepicker.week"));return{tableKls:s,tableLabel:a,weekLabel:i,getCellClasses:d=>{const f=[];return dv(d.type)&&!d.disabled?(f.push("available"),d.type==="today"&&f.push("today")):f.push(d.type),e(d)&&f.push("current"),d.inRange&&(dv(d.type)||n.selectionMode==="week")&&(f.push("in-range"),d.start&&f.push("start-date"),d.end&&f.push("end-date")),d.disabled&&f.push("disabled"),d.selected&&f.push("selected"),d.customClass&&f.push(d.customClass),f.join(" ")},getRowKls:d=>[r.e("row"),{current:t(d)}],t:o}},TR=Ge({cell:{type:we(Object)}});var x1=ue({name:"ElDatePickerCell",props:TR,setup(n){const e=je("date-table-cell"),{slots:t}=yt(rp);return()=>{const{cell:r}=n;return ve(t,"default",{...r},()=>{var o;return[R("div",{class:e.b()},[R("span",{class:e.e("text")},[(o=r==null?void 0:r.renderText)!=null?o:r==null?void 0:r.text])])]})}}});const MR=ue({__name:"basic-date-table",props:CR,emits:xR,setup(n,{expose:e,emit:t}){const r=n,{WEEKS:o,rows:s,tbodyRef:a,currentCellRef:i,focus:l,isCurrent:c,isWeekActive:d,isSelectedCell:f,handlePickDate:h,handleMouseUp:m,handleMouseDown:g,handleMouseMove:y,handleFocus:S}=kR(r,t),{tableLabel:w,tableKls:x,weekLabel:T,getCellClasses:k,getRowKls:C,t:M}=ER(r,{isCurrent:c,isWeekActive:d});return e({focus:l}),(A,V)=>(I(),z("table",{"aria-label":v(w),class:H(v(x)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:v(h),onMousemove:v(y),onMousedown:Qe(v(g),["prevent"]),onMouseup:v(m)},[Q("tbody",{ref_key:"tbodyRef",ref:a},[Q("tr",null,[A.showWeekNumber?(I(),z("th",{key:0,scope:"col"},Ee(v(T)),1)):fe("v-if",!0),(I(!0),z(it,null,Ht(v(o),(P,L)=>(I(),z("th",{key:L,"aria-label":v(M)("el.datepicker.weeksFull."+P),scope:"col"},Ee(v(M)("el.datepicker.weeks."+P)),9,["aria-label"]))),128))]),(I(!0),z(it,null,Ht(v(s),(P,L)=>(I(),z("tr",{key:L,class:H(v(C)(P[1]))},[(I(!0),z(it,null,Ht(P,(K,J)=>(I(),z("td",{key:`${L}.${J}`,ref_for:!0,ref:G=>v(f)(K)&&(i.value=G),class:H(v(k)(K)),"aria-current":K.isCurrent?"date":void 0,"aria-selected":K.isCurrent,tabindex:v(f)(K)?0:-1,onFocus:v(S)},[R(v(x1),{cell:K},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var fv=mt(MR,[["__file","basic-date-table.vue"]]);const IR=Ge({...b1,selectionMode:w1("month")}),OR=ue({__name:"basic-month-table",props:IR,emits:["changerange","pick","select"],setup(n,{expose:e,emit:t}){const r=n,o=je("month-table"),{t:s,lang:a}=En(),i=N(),l=N(),c=N(r.date.locale("en").localeData().monthsShort().map(T=>T.toLowerCase())),d=N([[],[],[]]),f=N(),h=N(),m=O(()=>{var T,k;const C=d.value,M=tt().locale(a.value).startOf("month");for(let A=0;A<3;A++){const V=C[A];for(let P=0;P<4;P++){const L=V[P]||(V[P]={row:A,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});L.type="normal";const K=A*4+P,J=r.date.startOf("year").month(K),G=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;L.inRange=!!(r.minDate&&J.isSameOrAfter(r.minDate,"month")&&G&&J.isSameOrBefore(G,"month"))||!!(r.minDate&&J.isSameOrBefore(r.minDate,"month")&&G&&J.isSameOrAfter(G,"month")),(T=r.minDate)!=null&&T.isSameOrAfter(G)?(L.start=!!(G&&J.isSame(G,"month")),L.end=r.minDate&&J.isSame(r.minDate,"month")):(L.start=!!(r.minDate&&J.isSame(r.minDate,"month")),L.end=!!(G&&J.isSame(G,"month"))),M.isSame(J)&&(L.type="today"),L.text=K,L.disabled=((k=r.disabledDate)==null?void 0:k.call(r,J.toDate()))||!1}}return C}),g=()=>{var T;(T=l.value)==null||T.focus()},y=T=>{const k={},C=r.date.year(),M=new Date,A=T.text;return k.disabled=r.disabledDate?Qd(C,A,a.value).every(r.disabledDate):!1,k.current=Xr(r.parsedValue).findIndex(V=>tt.isDayjs(V)&&V.year()===C&&V.month()===A)>=0,k.today=M.getFullYear()===C&&M.getMonth()===A,T.inRange&&(k["in-range"]=!0,T.start&&(k["start-date"]=!0),T.end&&(k["end-date"]=!0)),k},S=T=>{const k=r.date.year(),C=T.text;return Xr(r.date).findIndex(M=>M.year()===k&&M.month()===C)>=0},w=T=>{var k;if(!r.rangeState.selecting)return;let C=T.target;if(C.tagName==="SPAN"&&(C=(k=C.parentNode)==null?void 0:k.parentNode),C.tagName==="DIV"&&(C=C.parentNode),C.tagName!=="TD")return;const M=C.parentNode.rowIndex,A=C.cellIndex;m.value[M][A].disabled||(M!==f.value||A!==h.value)&&(f.value=M,h.value=A,t("changerange",{selecting:!0,endDate:r.date.startOf("year").month(M*4+A)}))},x=T=>{var k;const C=(k=T.target)==null?void 0:k.closest("td");if((C==null?void 0:C.tagName)!=="TD"||di(C,"disabled"))return;const M=C.cellIndex,V=C.parentNode.rowIndex*4+M,P=r.date.startOf("year").month(V);if(r.selectionMode==="months"){if(T.type==="keydown"){t("pick",Xr(r.parsedValue),!1);return}const L=Pu(r.date.year(),V,a.value,r.disabledDate),K=di(C,"current")?Xr(r.parsedValue).filter(J=>(J==null?void 0:J.month())!==L.month()):Xr(r.parsedValue).concat([tt(L)]);t("pick",K)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&P>=r.minDate?t("pick",{minDate:r.minDate,maxDate:P}):t("pick",{minDate:P,maxDate:r.minDate}),t("select",!1)):(t("pick",{minDate:P,maxDate:null}),t("select",!0)):t("pick",V)};return Xe(()=>r.date,async()=>{var T,k;(T=i.value)!=null&&T.contains(document.activeElement)&&(await Dt(),(k=l.value)==null||k.focus())}),e({focus:g}),(T,k)=>(I(),z("table",{role:"grid","aria-label":v(s)("el.datepicker.monthTablePrompt"),class:H(v(o).b()),onClick:x,onMousemove:w},[Q("tbody",{ref_key:"tbodyRef",ref:i},[(I(!0),z(it,null,Ht(v(m),(C,M)=>(I(),z("tr",{key:M},[(I(!0),z(it,null,Ht(C,(A,V)=>(I(),z("td",{key:V,ref_for:!0,ref:P=>S(A)&&(l.value=P),class:H(y(A)),"aria-selected":`${S(A)}`,"aria-label":v(s)(`el.datepicker.month${+A.text+1}`),tabindex:S(A)?0:-1,onKeydown:[gr(Qe(x,["prevent","stop"]),["space"]),gr(Qe(x,["prevent","stop"]),["enter"])]},[R(v(x1),{cell:{...A,renderText:v(s)("el.datepicker.months."+c.value[A.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var pv=mt(OR,[["__file","basic-month-table.vue"]]);const _R=Ge({...b1,selectionMode:w1("year")}),AR=ue({__name:"basic-year-table",props:_R,emits:["changerange","pick","select"],setup(n,{expose:e,emit:t}){const r=n,o=(k,C)=>{const M=tt(String(k)).locale(C).startOf("year"),V=M.endOf("year").dayOfYear();return nS(V).map(P=>M.add(P,"day").toDate())},s=je("year-table"),{t:a,lang:i}=En(),l=N(),c=N(),d=O(()=>Math.floor(r.date.year()/10)*10),f=N([[],[],[]]),h=N(),m=N(),g=O(()=>{var k;const C=f.value,M=tt().locale(i.value).startOf("year");for(let A=0;A<3;A++){const V=C[A];for(let P=0;P<4&&!(A*4+P>=10);P++){let L=V[P];L||(L={row:A,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),L.type="normal";const K=A*4+P+d.value,J=tt().year(K),G=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;L.inRange=!!(r.minDate&&J.isSameOrAfter(r.minDate,"year")&&G&&J.isSameOrBefore(G,"year"))||!!(r.minDate&&J.isSameOrBefore(r.minDate,"year")&&G&&J.isSameOrAfter(G,"year")),(k=r.minDate)!=null&&k.isSameOrAfter(G)?(L.start=!!(G&&J.isSame(G,"year")),L.end=!!(r.minDate&&J.isSame(r.minDate,"year"))):(L.start=!!(r.minDate&&J.isSame(r.minDate,"year")),L.end=!!(G&&J.isSame(G,"year"))),M.isSame(J)&&(L.type="today"),L.text=K;const W=J.toDate();L.disabled=r.disabledDate&&r.disabledDate(W)||!1,V[P]=L}}return C}),y=()=>{var k;(k=c.value)==null||k.focus()},S=k=>{const C={},M=tt().locale(i.value),A=k.text;return C.disabled=r.disabledDate?o(A,i.value).every(r.disabledDate):!1,C.today=M.year()===A,C.current=Xr(r.parsedValue).findIndex(V=>V.year()===A)>=0,k.inRange&&(C["in-range"]=!0,k.start&&(C["start-date"]=!0),k.end&&(C["end-date"]=!0)),C},w=k=>{const C=k.text;return Xr(r.date).findIndex(M=>M.year()===C)>=0},x=k=>{var C;const M=(C=k.target)==null?void 0:C.closest("td");if(!M||!M.textContent||di(M,"disabled"))return;const A=M.cellIndex,P=M.parentNode.rowIndex*4+A+d.value,L=tt().year(P);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&L>=r.minDate?t("pick",{minDate:r.minDate,maxDate:L}):t("pick",{minDate:L,maxDate:r.minDate}),t("select",!1)):(t("pick",{minDate:L,maxDate:null}),t("select",!0));else if(r.selectionMode==="years"){if(k.type==="keydown"){t("pick",Xr(r.parsedValue),!1);return}const K=cv(L.startOf("year"),i.value,r.disabledDate),J=di(M,"current")?Xr(r.parsedValue).filter(G=>(G==null?void 0:G.year())!==P):Xr(r.parsedValue).concat([K]);t("pick",J)}else t("pick",P)},T=k=>{var C;if(!r.rangeState.selecting)return;const M=(C=k.target)==null?void 0:C.closest("td");if(!M)return;const A=M.parentNode.rowIndex,V=M.cellIndex;g.value[A][V].disabled||(A!==h.value||V!==m.value)&&(h.value=A,m.value=V,t("changerange",{selecting:!0,endDate:tt().year(d.value).add(A*4+V,"year")}))};return Xe(()=>r.date,async()=>{var k,C;(k=l.value)!=null&&k.contains(document.activeElement)&&(await Dt(),(C=c.value)==null||C.focus())}),e({focus:y}),(k,C)=>(I(),z("table",{role:"grid","aria-label":v(a)("el.datepicker.yearTablePrompt"),class:H(v(s).b()),onClick:x,onMousemove:T},[Q("tbody",{ref_key:"tbodyRef",ref:l},[(I(!0),z(it,null,Ht(v(g),(M,A)=>(I(),z("tr",{key:A},[(I(!0),z(it,null,Ht(M,(V,P)=>(I(),z("td",{key:`${A}_${P}`,ref_for:!0,ref:L=>w(V)&&(c.value=L),class:H(["available",S(V)]),"aria-selected":w(V),"aria-label":String(V.text),tabindex:w(V)?0:-1,onKeydown:[gr(Qe(x,["prevent","stop"]),["space"]),gr(Qe(x,["prevent","stop"]),["enter"])]},[R(v(x1),{cell:V},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var hv=mt(AR,[["__file","basic-year-table.vue"]]);const RR=ue({__name:"panel-date-pick",props:SR,emits:["pick","set-picker-option","panel-change"],setup(n,{emit:e}){const t=n,r=(oe,ie,be)=>!0,o=je("picker-panel"),s=je("date-picker"),a=d1(),i=Na(),{t:l,lang:c}=En(),d=yt("EP_PICKER_BASE"),f=yt(y9),{shortcuts:h,disabledDate:m,cellClassName:g,defaultTime:y}=d.props,S=Kn(d.props,"defaultValue"),w=N(),x=N(tt().locale(c.value)),T=N(!1);let k=!1;const C=O(()=>tt(y).locale(c.value)),M=O(()=>x.value.month()),A=O(()=>x.value.year()),V=N([]),P=N(null),L=N(null),K=oe=>V.value.length>0?r(oe,V.value,t.format||"HH:mm:ss"):!0,J=oe=>y&&!nt.value&&!T.value&&!k?C.value.year(oe.year()).month(oe.month()).date(oe.date()):le.value?oe.millisecond(0):oe.startOf("day"),G=(oe,...ie)=>{if(!oe)e("pick",oe,...ie);else if(gt(oe)){const be=oe.map(J);e("pick",be,...ie)}else e("pick",J(oe),...ie);P.value=null,L.value=null,T.value=!1,k=!1},ne=async(oe,ie)=>{if(ee.value==="date"){oe=oe;let be=t.parsedValue?t.parsedValue.year(oe.year()).month(oe.month()).date(oe.date()):oe;K(be)||(be=V.value[0][0].year(oe.year()).month(oe.month()).date(oe.date())),x.value=be,G(be,le.value||ie),t.type==="datetime"&&(await Dt(),Pt())}else ee.value==="week"?G(oe.date):ee.value==="dates"&&G(oe,!0)},W=oe=>{const ie=oe?"add":"subtract";x.value=x.value[ie](1,"month"),ge("month")},D=oe=>{const ie=x.value,be=oe?"add":"subtract";x.value=U.value==="year"?ie[be](10,"year"):ie[be](1,"year"),ge("year")},U=N("date"),te=O(()=>{const oe=l("el.datepicker.year");if(U.value==="year"){const ie=Math.floor(A.value/10)*10;return oe?`${ie} ${oe} - ${ie+9} ${oe}`:`${ie} - ${ie+9}`}return`${A.value} ${oe}`}),j=oe=>{const ie=$n(oe.value)?oe.value():oe.value;if(ie){k=!0,G(tt(ie).locale(c.value));return}oe.onClick&&oe.onClick({attrs:a,slots:i,emit:e})},ee=O(()=>{const{type:oe}=t;return["week","month","months","year","years","dates"].includes(oe)?oe:"date"}),X=O(()=>ee.value==="dates"||ee.value==="months"||ee.value==="years"),ce=O(()=>ee.value==="date"?U.value:ee.value),ae=O(()=>!!h.length),ye=async(oe,ie)=>{ee.value==="month"?(x.value=Pu(x.value.year(),oe,c.value,m),G(x.value,!1)):ee.value==="months"?G(oe,ie??!0):(x.value=Pu(x.value.year(),oe,c.value,m),U.value="date",["month","year","date","week"].includes(ee.value)&&(G(x.value,!0),await Dt(),Pt())),ge("month")},ke=async(oe,ie)=>{if(ee.value==="year"){const be=x.value.startOf("year").year(oe);x.value=cv(be,c.value,m),G(x.value,!1)}else if(ee.value==="years")G(oe,ie??!0);else{const be=x.value.year(oe);x.value=cv(be,c.value,m),U.value="month",["month","year","date","week"].includes(ee.value)&&(G(x.value,!0),await Dt(),Pt())}ge("year")},Be=async oe=>{U.value=oe,await Dt(),Pt()},le=O(()=>t.type==="datetime"||t.type==="datetimerange"),xe=O(()=>{const oe=le.value||ee.value==="dates",ie=ee.value==="years",be=ee.value==="months",Y=U.value==="date",Ie=U.value==="year",Re=U.value==="month";return oe&&Y||ie&&Ie||be&&Re}),Me=O(()=>m?t.parsedValue?gt(t.parsedValue)?m(t.parsedValue[0].toDate()):m(t.parsedValue.toDate()):!0:!1),De=()=>{if(X.value)G(t.parsedValue);else{let oe=t.parsedValue;if(!oe){const ie=tt(y).locale(c.value),be=Yt();oe=ie.year(be.year()).month(be.month()).date(be.date())}x.value=oe,G(oe)}},Ze=O(()=>m?m(tt().locale(c.value).toDate()):!1),lt=()=>{const ie=tt().locale(c.value).toDate();T.value=!0,(!m||!m(ie))&&K(ie)&&(x.value=tt().locale(c.value),G(x.value))},ze=O(()=>t.timeFormat||oS(t.format)),Pe=O(()=>t.dateFormat||rS(t.format)),nt=O(()=>{if(L.value)return L.value;if(!(!t.parsedValue&&!S.value))return(t.parsedValue||x.value).format(ze.value)}),Ot=O(()=>{if(P.value)return P.value;if(!(!t.parsedValue&&!S.value))return(t.parsedValue||x.value).format(Pe.value)}),_e=N(!1),He=()=>{_e.value=!0},Fe=()=>{_e.value=!1},Ye=oe=>({hour:oe.hour(),minute:oe.minute(),second:oe.second(),year:oe.year(),month:oe.month(),date:oe.date()}),qe=(oe,ie,be)=>{const{hour:Y,minute:Ie,second:Re}=Ye(oe),Ne=t.parsedValue?t.parsedValue.hour(Y).minute(Ie).second(Re):oe;x.value=Ne,G(x.value,!0),be||(_e.value=ie)},dt=oe=>{const ie=tt(oe,ze.value).locale(c.value);if(ie.isValid()&&K(ie)){const{year:be,month:Y,date:Ie}=Ye(x.value);x.value=ie.year(be).month(Y).date(Ie),L.value=null,_e.value=!1,G(x.value,!0)}},vt=oe=>{const ie=tt(oe,Pe.value).locale(c.value);if(ie.isValid()){if(m&&m(ie.toDate()))return;const{hour:be,minute:Y,second:Ie}=Ye(x.value);x.value=ie.hour(be).minute(Y).second(Ie),P.value=null,G(x.value,!0)}},bt=oe=>tt.isDayjs(oe)&&oe.isValid()&&(m?!m(oe.toDate()):!0),kt=oe=>gt(oe)?oe.map(ie=>ie.format(t.format)):oe.format(t.format),Lt=oe=>tt(oe,t.format).locale(c.value),Yt=()=>{const oe=tt(S.value).locale(c.value);if(!S.value){const ie=C.value;return tt().hour(ie.hour()).minute(ie.minute()).second(ie.second()).locale(c.value)}return oe},Pt=()=>{var oe;["week","month","year","date"].includes(ee.value)&&((oe=w.value)==null||oe.focus())},pe=()=>{Pt(),ee.value==="week"&&re(It.down)},F=oe=>{const{code:ie}=oe;[It.up,It.down,It.left,It.right,It.home,It.end,It.pageUp,It.pageDown].includes(ie)&&(re(ie),oe.stopPropagation(),oe.preventDefault()),[It.enter,It.space,It.numpadEnter].includes(ie)&&P.value===null&&L.value===null&&(oe.preventDefault(),G(x.value,!1))},re=oe=>{var ie;const{up:be,down:Y,left:Ie,right:Re,home:Ne,end:ot,pageUp:at,pageDown:Et}=It,on={year:{[be]:-4,[Y]:4,[Ie]:-1,[Re]:1,offset:(tn,Gn)=>tn.setFullYear(tn.getFullYear()+Gn)},month:{[be]:-4,[Y]:4,[Ie]:-1,[Re]:1,offset:(tn,Gn)=>tn.setMonth(tn.getMonth()+Gn)},week:{[be]:-1,[Y]:1,[Ie]:-1,[Re]:1,offset:(tn,Gn)=>tn.setDate(tn.getDate()+Gn*7)},date:{[be]:-7,[Y]:7,[Ie]:-1,[Re]:1,[Ne]:tn=>-tn.getDay(),[ot]:tn=>-tn.getDay()+6,[at]:tn=>-new Date(tn.getFullYear(),tn.getMonth(),0).getDate(),[Et]:tn=>new Date(tn.getFullYear(),tn.getMonth()+1,0).getDate(),offset:(tn,Gn)=>tn.setDate(tn.getDate()+Gn)}},Ln=x.value.toDate();for(;Math.abs(x.value.diff(Ln,"year",!0))<1;){const tn=on[ce.value];if(!tn)return;if(tn.offset(Ln,$n(tn[oe])?tn[oe](Ln):(ie=tn[oe])!=null?ie:0),m&&m(Ln))break;const Gn=tt(Ln).locale(c.value);x.value=Gn,e("pick",Gn,!0);break}},ge=oe=>{e("panel-change",x.value.toDate(),oe,U.value)};return Xe(()=>ee.value,oe=>{if(["month","year"].includes(oe)){U.value=oe;return}else if(oe==="years"){U.value="year";return}else if(oe==="months"){U.value="month";return}U.value="date"},{immediate:!0}),Xe(()=>U.value,()=>{f==null||f.updatePopper()}),Xe(()=>S.value,oe=>{oe&&(x.value=Yt())},{immediate:!0}),Xe(()=>t.parsedValue,oe=>{if(oe){if(X.value||gt(oe))return;x.value=oe}else x.value=Yt()},{immediate:!0}),e("set-picker-option",["isValidValue",bt]),e("set-picker-option",["formatToString",kt]),e("set-picker-option",["parseUserInput",Lt]),e("set-picker-option",["handleFocusPicker",pe]),(oe,ie)=>(I(),z("div",{class:H([v(o).b(),v(s).b(),{"has-sidebar":oe.$slots.sidebar||v(ae),"has-time":v(le)}])},[Q("div",{class:H(v(o).e("body-wrapper"))},[ve(oe.$slots,"sidebar",{class:H(v(o).e("sidebar"))}),v(ae)?(I(),z("div",{key:0,class:H(v(o).e("sidebar"))},[(I(!0),z(it,null,Ht(v(h),(be,Y)=>(I(),z("button",{key:Y,type:"button",class:H(v(o).e("shortcut")),onClick:Ie=>j(be)},Ee(be.text),11,["onClick"]))),128))],2)):fe("v-if",!0),Q("div",{class:H(v(o).e("body"))},[v(le)?(I(),z("div",{key:0,class:H(v(s).e("time-header"))},[Q("span",{class:H(v(s).e("editor-wrap"))},[R(v(us),{placeholder:v(l)("el.datepicker.selectDate"),"model-value":v(Ot),size:"small","validate-event":!1,onInput:be=>P.value=be,onChange:vt},null,8,["placeholder","model-value","onInput"])],2),an((I(),z("span",{class:H(v(s).e("editor-wrap"))},[R(v(us),{placeholder:v(l)("el.datepicker.selectTime"),"model-value":v(nt),size:"small","validate-event":!1,onFocus:He,onInput:be=>L.value=be,onChange:dt},null,8,["placeholder","model-value","onInput"]),R(v(uv),{visible:_e.value,format:v(ze),"parsed-value":x.value,onPick:qe},null,8,["visible","format","parsed-value"])],2)),[[v(Ru),Fe]])],2)):fe("v-if",!0),an(Q("div",{class:H([v(s).e("header"),(U.value==="year"||U.value==="month")&&v(s).e("header--bordered")])},[Q("span",{class:H(v(s).e("prev-btn"))},[Q("button",{type:"button","aria-label":v(l)("el.datepicker.prevYear"),class:H(["d-arrow-left",v(o).e("icon-btn")]),onClick:be=>D(!1)},[ve(oe.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["aria-label","onClick"]),an(Q("button",{type:"button","aria-label":v(l)("el.datepicker.prevMonth"),class:H([v(o).e("icon-btn"),"arrow-left"]),onClick:be=>W(!1)},[ve(oe.$slots,"prev-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Iu))]),_:1})])],10,["aria-label","onClick"]),[[Qn,U.value==="date"]])],2),Q("span",{role:"button",class:H(v(s).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:gr(be=>Be("year"),["enter"]),onClick:be=>Be("year")},Ee(v(te)),43,["onKeydown","onClick"]),an(Q("span",{role:"button","aria-live":"polite",tabindex:"0",class:H([v(s).e("header-label"),{active:U.value==="month"}]),onKeydown:gr(be=>Be("month"),["enter"]),onClick:be=>Be("month")},Ee(v(l)(`el.datepicker.month${v(M)+1}`)),43,["onKeydown","onClick"]),[[Qn,U.value==="date"]]),Q("span",{class:H(v(s).e("next-btn"))},[an(Q("button",{type:"button","aria-label":v(l)("el.datepicker.nextMonth"),class:H([v(o).e("icon-btn"),"arrow-right"]),onClick:be=>W(!0)},[ve(oe.$slots,"next-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Oa))]),_:1})])],10,["aria-label","onClick"]),[[Qn,U.value==="date"]]),Q("button",{type:"button","aria-label":v(l)("el.datepicker.nextYear"),class:H([v(o).e("icon-btn"),"d-arrow-right"]),onClick:be=>D(!0)},[ve(oe.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[Qn,U.value!=="time"]]),Q("div",{class:H(v(o).e("content")),onKeydown:F},[U.value==="date"?(I(),me(fv,{key:0,ref_key:"currentViewRef",ref:w,"selection-mode":v(ee),date:x.value,"parsed-value":oe.parsedValue,"disabled-date":v(m),"cell-class-name":v(g),onPick:ne},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):fe("v-if",!0),U.value==="year"?(I(),me(hv,{key:1,ref_key:"currentViewRef",ref:w,"selection-mode":v(ee),date:x.value,"disabled-date":v(m),"parsed-value":oe.parsedValue,onPick:ke},null,8,["selection-mode","date","disabled-date","parsed-value"])):fe("v-if",!0),U.value==="month"?(I(),me(pv,{key:2,ref_key:"currentViewRef",ref:w,"selection-mode":v(ee),date:x.value,"parsed-value":oe.parsedValue,"disabled-date":v(m),onPick:ye},null,8,["selection-mode","date","parsed-value","disabled-date"])):fe("v-if",!0)],34)],2)],2),an(Q("div",{class:H(v(o).e("footer"))},[an(R(v(Zd),{text:"",size:"small",class:H(v(o).e("link-btn")),disabled:v(Ze),onClick:lt},{default:q(()=>[ht(Ee(v(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Qn,!v(X)&&oe.showNow]]),R(v(Zd),{plain:"",size:"small",class:H(v(o).e("link-btn")),disabled:v(Me),onClick:De},{default:q(()=>[ht(Ee(v(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Qn,v(xe)]])],2))}});var PR=mt(RR,[["__file","panel-date-pick.vue"]]);const $R=Ge({...CS,...S1,visible:Boolean}),xS=n=>{const{emit:e}=yn(),t=d1(),r=Na();return s=>{const a=$n(s.value)?s.value():s.value;if(a){e("pick",[tt(a[0]).locale(n.value),tt(a[1]).locale(n.value)]);return}s.onClick&&s.onClick({attrs:t,slots:r,emit:e})}},kS=(n,{defaultValue:e,leftDate:t,rightDate:r,unit:o,onParsedValueChanged:s})=>{const{emit:a}=yn(),{pickerNs:i}=yt(rp),l=je("date-range-picker"),{t:c,lang:d}=En(),f=xS(d),h=N(),m=N(),g=N({endDate:null,selecting:!1}),y=k=>{g.value=k},S=(k=!1)=>{const C=v(h),M=v(m);sl([C,M])&&a("pick",[C,M],k)},w=k=>{g.value.selecting=k,k||(g.value.endDate=null)},x=k=>{if(gt(k)&&k.length===2){const[C,M]=k;h.value=C,t.value=C,m.value=M,s(v(h),v(m))}else T()},T=()=>{const[k,C]=C1(v(e),{lang:v(d),unit:o,unlinkPanels:n.unlinkPanels});h.value=void 0,m.value=void 0,t.value=k,r.value=C};return Xe(e,k=>{k&&T()},{immediate:!0}),Xe(()=>n.parsedValue,x,{immediate:!0}),{minDate:h,maxDate:m,rangeState:g,lang:d,ppNs:i,drpNs:l,handleChangeRange:y,handleRangeConfirm:S,handleShortcutClick:f,onSelect:w,onReset:x,t:c}},Zc="month",DR=ue({__name:"panel-date-range",props:$R,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(n,{emit:e}){const t=n,r=yt("EP_PICKER_BASE"),{disabledDate:o,cellClassName:s,defaultTime:a,clearable:i}=r.props,l=Kn(r.props,"format"),c=Kn(r.props,"shortcuts"),d=Kn(r.props,"defaultValue"),{lang:f}=En(),h=N(tt().locale(f.value)),m=N(tt().locale(f.value).add(1,Zc)),{minDate:g,maxDate:y,rangeState:S,ppNs:w,drpNs:x,handleChangeRange:T,handleRangeConfirm:k,handleShortcutClick:C,onSelect:M,onReset:A,t:V}=kS(t,{defaultValue:d,leftDate:h,rightDate:m,unit:Zc,onParsedValueChanged:oe});Xe(()=>t.visible,ie=>{!ie&&S.value.selecting&&(A(t.parsedValue),M(!1))});const P=N({min:null,max:null}),L=N({min:null,max:null}),K=O(()=>`${h.value.year()} ${V("el.datepicker.year")} ${V(`el.datepicker.month${h.value.month()+1}`)}`),J=O(()=>`${m.value.year()} ${V("el.datepicker.year")} ${V(`el.datepicker.month${m.value.month()+1}`)}`),G=O(()=>h.value.year()),ne=O(()=>h.value.month()),W=O(()=>m.value.year()),D=O(()=>m.value.month()),U=O(()=>!!c.value.length),te=O(()=>P.value.min!==null?P.value.min:g.value?g.value.format(ae.value):""),j=O(()=>P.value.max!==null?P.value.max:y.value||g.value?(y.value||g.value).format(ae.value):""),ee=O(()=>L.value.min!==null?L.value.min:g.value?g.value.format(ce.value):""),X=O(()=>L.value.max!==null?L.value.max:y.value||g.value?(y.value||g.value).format(ce.value):""),ce=O(()=>t.timeFormat||oS(l.value)),ae=O(()=>t.dateFormat||rS(l.value)),ye=ie=>sl(ie)&&(o?!o(ie[0].toDate())&&!o(ie[1].toDate()):!0),ke=()=>{h.value=h.value.subtract(1,"year"),t.unlinkPanels||(m.value=h.value.add(1,"month")),ze("year")},Be=()=>{h.value=h.value.subtract(1,"month"),t.unlinkPanels||(m.value=h.value.add(1,"month")),ze("month")},le=()=>{t.unlinkPanels?m.value=m.value.add(1,"year"):(h.value=h.value.add(1,"year"),m.value=h.value.add(1,"month")),ze("year")},xe=()=>{t.unlinkPanels?m.value=m.value.add(1,"month"):(h.value=h.value.add(1,"month"),m.value=h.value.add(1,"month")),ze("month")},Me=()=>{h.value=h.value.add(1,"year"),ze("year")},De=()=>{h.value=h.value.add(1,"month"),ze("month")},Ze=()=>{m.value=m.value.subtract(1,"year"),ze("year")},lt=()=>{m.value=m.value.subtract(1,"month"),ze("month")},ze=ie=>{e("panel-change",[h.value.toDate(),m.value.toDate()],ie)},Pe=O(()=>{const ie=(ne.value+1)%12,be=ne.value+1>=12?1:0;return t.unlinkPanels&&new Date(G.value+be,ie)<new Date(W.value,D.value)}),nt=O(()=>t.unlinkPanels&&W.value*12+D.value-(G.value*12+ne.value+1)>=12),Ot=O(()=>!(g.value&&y.value&&!S.value.selecting&&sl([g.value,y.value]))),_e=O(()=>t.type==="datetime"||t.type==="datetimerange"),He=(ie,be)=>{if(ie)return a?tt(a[be]||a).locale(f.value).year(ie.year()).month(ie.month()).date(ie.date()):ie},Fe=(ie,be=!0)=>{const Y=ie.minDate,Ie=ie.maxDate,Re=He(Y,0),Ne=He(Ie,1);y.value===Ne&&g.value===Re||(e("calendar-change",[Y.toDate(),Ie&&Ie.toDate()]),y.value=Ne,g.value=Re,!(!be||_e.value)&&k())},Ye=N(!1),qe=N(!1),dt=()=>{Ye.value=!1},vt=()=>{qe.value=!1},bt=(ie,be)=>{P.value[be]=ie;const Y=tt(ie,ae.value).locale(f.value);if(Y.isValid()){if(o&&o(Y.toDate()))return;be==="min"?(h.value=Y,g.value=(g.value||h.value).year(Y.year()).month(Y.month()).date(Y.date()),!t.unlinkPanels&&(!y.value||y.value.isBefore(g.value))&&(m.value=Y.add(1,"month"),y.value=g.value.add(1,"month"))):(m.value=Y,y.value=(y.value||m.value).year(Y.year()).month(Y.month()).date(Y.date()),!t.unlinkPanels&&(!g.value||g.value.isAfter(y.value))&&(h.value=Y.subtract(1,"month"),g.value=y.value.subtract(1,"month")))}},kt=(ie,be)=>{P.value[be]=null},Lt=(ie,be)=>{L.value[be]=ie;const Y=tt(ie,ce.value).locale(f.value);Y.isValid()&&(be==="min"?(Ye.value=!0,g.value=(g.value||h.value).hour(Y.hour()).minute(Y.minute()).second(Y.second())):(qe.value=!0,y.value=(y.value||m.value).hour(Y.hour()).minute(Y.minute()).second(Y.second()),m.value=y.value))},Yt=(ie,be)=>{L.value[be]=null,be==="min"?(h.value=g.value,Ye.value=!1,(!y.value||y.value.isBefore(g.value))&&(y.value=g.value)):(m.value=y.value,qe.value=!1,y.value&&y.value.isBefore(g.value)&&(g.value=y.value))},Pt=(ie,be,Y)=>{L.value.min||(ie&&(h.value=ie,g.value=(g.value||h.value).hour(ie.hour()).minute(ie.minute()).second(ie.second())),Y||(Ye.value=be),(!y.value||y.value.isBefore(g.value))&&(y.value=g.value,m.value=ie))},pe=(ie,be,Y)=>{L.value.max||(ie&&(m.value=ie,y.value=(y.value||m.value).hour(ie.hour()).minute(ie.minute()).second(ie.second())),Y||(qe.value=be),y.value&&y.value.isBefore(g.value)&&(g.value=y.value))},F=()=>{h.value=C1(v(d),{lang:v(f),unit:"month",unlinkPanels:t.unlinkPanels})[0],m.value=h.value.add(1,"month"),y.value=void 0,g.value=void 0,e("pick",null)},re=ie=>gt(ie)?ie.map(be=>be.format(l.value)):ie.format(l.value),ge=ie=>gt(ie)?ie.map(be=>tt(be,l.value).locale(f.value)):tt(ie,l.value).locale(f.value);function oe(ie,be){if(t.unlinkPanels&&be){const Y=(ie==null?void 0:ie.year())||0,Ie=(ie==null?void 0:ie.month())||0,Re=be.year(),Ne=be.month();m.value=Y===Re&&Ie===Ne?be.add(1,Zc):be}else m.value=h.value.add(1,Zc),be&&(m.value=m.value.hour(be.hour()).minute(be.minute()).second(be.second()))}return e("set-picker-option",["isValidValue",ye]),e("set-picker-option",["parseUserInput",ge]),e("set-picker-option",["formatToString",re]),e("set-picker-option",["handleClear",F]),(ie,be)=>(I(),z("div",{class:H([v(w).b(),v(x).b(),{"has-sidebar":ie.$slots.sidebar||v(U),"has-time":v(_e)}])},[Q("div",{class:H(v(w).e("body-wrapper"))},[ve(ie.$slots,"sidebar",{class:H(v(w).e("sidebar"))}),v(U)?(I(),z("div",{key:0,class:H(v(w).e("sidebar"))},[(I(!0),z(it,null,Ht(v(c),(Y,Ie)=>(I(),z("button",{key:Ie,type:"button",class:H(v(w).e("shortcut")),onClick:Re=>v(C)(Y)},Ee(Y.text),11,["onClick"]))),128))],2)):fe("v-if",!0),Q("div",{class:H(v(w).e("body"))},[v(_e)?(I(),z("div",{key:0,class:H(v(x).e("time-header"))},[Q("span",{class:H(v(x).e("editors-wrap"))},[Q("span",{class:H(v(x).e("time-picker-wrap"))},[R(v(us),{size:"small",disabled:v(S).selecting,placeholder:v(V)("el.datepicker.startDate"),class:H(v(x).e("editor")),"model-value":v(te),"validate-event":!1,onInput:Y=>bt(Y,"min"),onChange:Y=>kt(Y,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),an((I(),z("span",{class:H(v(x).e("time-picker-wrap"))},[R(v(us),{size:"small",class:H(v(x).e("editor")),disabled:v(S).selecting,placeholder:v(V)("el.datepicker.startTime"),"model-value":v(ee),"validate-event":!1,onFocus:Y=>Ye.value=!0,onInput:Y=>Lt(Y,"min"),onChange:Y=>Yt(Y,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),R(v(uv),{visible:Ye.value,format:v(ce),"datetime-role":"start","parsed-value":h.value,onPick:Pt},null,8,["visible","format","parsed-value"])],2)),[[v(Ru),dt]])],2),Q("span",null,[R(v(pt),null,{default:q(()=>[R(v(Oa))]),_:1})]),Q("span",{class:H([v(x).e("editors-wrap"),"is-right"])},[Q("span",{class:H(v(x).e("time-picker-wrap"))},[R(v(us),{size:"small",class:H(v(x).e("editor")),disabled:v(S).selecting,placeholder:v(V)("el.datepicker.endDate"),"model-value":v(j),readonly:!v(g),"validate-event":!1,onInput:Y=>bt(Y,"max"),onChange:Y=>kt(Y,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),an((I(),z("span",{class:H(v(x).e("time-picker-wrap"))},[R(v(us),{size:"small",class:H(v(x).e("editor")),disabled:v(S).selecting,placeholder:v(V)("el.datepicker.endTime"),"model-value":v(X),readonly:!v(g),"validate-event":!1,onFocus:Y=>v(g)&&(qe.value=!0),onInput:Y=>Lt(Y,"max"),onChange:Y=>Yt(Y,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),R(v(uv),{"datetime-role":"end",visible:qe.value,format:v(ce),"parsed-value":m.value,onPick:pe},null,8,["visible","format","parsed-value"])],2)),[[v(Ru),vt]])],2)],2)):fe("v-if",!0),Q("div",{class:H([[v(w).e("content"),v(x).e("content")],"is-left"])},[Q("div",{class:H(v(x).e("header"))},[Q("button",{type:"button",class:H([v(w).e("icon-btn"),"d-arrow-left"]),"aria-label":v(V)("el.datepicker.prevYear"),onClick:ke},[ve(ie.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["aria-label"]),Q("button",{type:"button",class:H([v(w).e("icon-btn"),"arrow-left"]),"aria-label":v(V)("el.datepicker.prevMonth"),onClick:Be},[ve(ie.$slots,"prev-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Iu))]),_:1})])],10,["aria-label"]),ie.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(nt),class:H([[v(w).e("icon-btn"),{"is-disabled":!v(nt)}],"d-arrow-right"]),"aria-label":v(V)("el.datepicker.nextYear"),onClick:Me},[ve(ie.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["disabled","aria-label"])):fe("v-if",!0),ie.unlinkPanels?(I(),z("button",{key:1,type:"button",disabled:!v(Pe),class:H([[v(w).e("icon-btn"),{"is-disabled":!v(Pe)}],"arrow-right"]),"aria-label":v(V)("el.datepicker.nextMonth"),onClick:De},[ve(ie.$slots,"next-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Oa))]),_:1})])],10,["disabled","aria-label"])):fe("v-if",!0),Q("div",null,Ee(v(K)),1)],2),R(fv,{"selection-mode":"range",date:h.value,"min-date":v(g),"max-date":v(y),"range-state":v(S),"disabled-date":v(o),"cell-class-name":v(s),onChangerange:v(T),onPick:Fe,onSelect:v(M)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),Q("div",{class:H([[v(w).e("content"),v(x).e("content")],"is-right"])},[Q("div",{class:H(v(x).e("header"))},[ie.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(nt),class:H([[v(w).e("icon-btn"),{"is-disabled":!v(nt)}],"d-arrow-left"]),"aria-label":v(V)("el.datepicker.prevYear"),onClick:Ze},[ve(ie.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["disabled","aria-label"])):fe("v-if",!0),ie.unlinkPanels?(I(),z("button",{key:1,type:"button",disabled:!v(Pe),class:H([[v(w).e("icon-btn"),{"is-disabled":!v(Pe)}],"arrow-left"]),"aria-label":v(V)("el.datepicker.prevMonth"),onClick:lt},[ve(ie.$slots,"prev-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Iu))]),_:1})])],10,["disabled","aria-label"])):fe("v-if",!0),Q("button",{type:"button","aria-label":v(V)("el.datepicker.nextYear"),class:H([v(w).e("icon-btn"),"d-arrow-right"]),onClick:le},[ve(ie.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["aria-label"]),Q("button",{type:"button",class:H([v(w).e("icon-btn"),"arrow-right"]),"aria-label":v(V)("el.datepicker.nextMonth"),onClick:xe},[ve(ie.$slots,"next-month",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Oa))]),_:1})])],10,["aria-label"]),Q("div",null,Ee(v(J)),1)],2),R(fv,{"selection-mode":"range",date:m.value,"min-date":v(g),"max-date":v(y),"range-state":v(S),"disabled-date":v(o),"cell-class-name":v(s),onChangerange:v(T),onPick:Fe,onSelect:v(M)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),v(_e)?(I(),z("div",{key:0,class:H(v(w).e("footer"))},[v(i)?(I(),me(v(Zd),{key:0,text:"",size:"small",class:H(v(w).e("link-btn")),onClick:F},{default:q(()=>[ht(Ee(v(V)("el.datepicker.clear")),1)]),_:1},8,["class"])):fe("v-if",!0),R(v(Zd),{plain:"",size:"small",class:H(v(w).e("link-btn")),disabled:v(Ot),onClick:Y=>v(k)(!1)},{default:q(()=>[ht(Ee(v(V)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):fe("v-if",!0)],2))}});var NR=mt(DR,[["__file","panel-date-range.vue"]]);const LR=Ge({...S1}),BR=["pick","set-picker-option","calendar-change"],FR=({unlinkPanels:n,leftDate:e,rightDate:t})=>{const{t:r}=En(),o=()=>{e.value=e.value.subtract(1,"year"),n.value||(t.value=t.value.subtract(1,"year"))},s=()=>{n.value||(e.value=e.value.add(1,"year")),t.value=t.value.add(1,"year")},a=()=>{e.value=e.value.add(1,"year")},i=()=>{t.value=t.value.subtract(1,"year")},l=O(()=>`${e.value.year()} ${r("el.datepicker.year")}`),c=O(()=>`${t.value.year()} ${r("el.datepicker.year")}`),d=O(()=>e.value.year()),f=O(()=>t.value.year()===e.value.year()?e.value.year()+1:t.value.year());return{leftPrevYear:o,rightNextYear:s,leftNextYear:a,rightPrevYear:i,leftLabel:l,rightLabel:c,leftYear:d,rightYear:f}},Qc="year",VR=ue({name:"DatePickerMonthRange"}),zR=ue({...VR,props:LR,emits:BR,setup(n,{emit:e}){const t=n,{lang:r}=En(),o=yt("EP_PICKER_BASE"),{shortcuts:s,disabledDate:a}=o.props,i=Kn(o.props,"format"),l=Kn(o.props,"defaultValue"),c=N(tt().locale(r.value)),d=N(tt().locale(r.value).add(1,Qc)),{minDate:f,maxDate:h,rangeState:m,ppNs:g,drpNs:y,handleChangeRange:S,handleRangeConfirm:w,handleShortcutClick:x,onSelect:T}=kS(t,{defaultValue:l,leftDate:c,rightDate:d,unit:Qc,onParsedValueChanged:te}),k=O(()=>!!s.length),{leftPrevYear:C,rightNextYear:M,leftNextYear:A,rightPrevYear:V,leftLabel:P,rightLabel:L,leftYear:K,rightYear:J}=FR({unlinkPanels:Kn(t,"unlinkPanels"),leftDate:c,rightDate:d}),G=O(()=>t.unlinkPanels&&J.value>K.value+1),ne=(j,ee=!0)=>{const X=j.minDate,ce=j.maxDate;h.value===ce&&f.value===X||(e("calendar-change",[X.toDate(),ce&&ce.toDate()]),h.value=ce,f.value=X,ee&&w())},W=()=>{c.value=C1(v(l),{lang:v(r),unit:"year",unlinkPanels:t.unlinkPanels})[0],d.value=c.value.add(1,"year"),e("pick",null)},D=j=>gt(j)?j.map(ee=>ee.format(i.value)):j.format(i.value),U=j=>gt(j)?j.map(ee=>tt(ee,i.value).locale(r.value)):tt(j,i.value).locale(r.value);function te(j,ee){if(t.unlinkPanels&&ee){const X=(j==null?void 0:j.year())||0,ce=ee.year();d.value=X===ce?ee.add(1,Qc):ee}else d.value=c.value.add(1,Qc)}return e("set-picker-option",["isValidValue",sl]),e("set-picker-option",["formatToString",D]),e("set-picker-option",["parseUserInput",U]),e("set-picker-option",["handleClear",W]),(j,ee)=>(I(),z("div",{class:H([v(g).b(),v(y).b(),{"has-sidebar":!!j.$slots.sidebar||v(k)}])},[Q("div",{class:H(v(g).e("body-wrapper"))},[ve(j.$slots,"sidebar",{class:H(v(g).e("sidebar"))}),v(k)?(I(),z("div",{key:0,class:H(v(g).e("sidebar"))},[(I(!0),z(it,null,Ht(v(s),(X,ce)=>(I(),z("button",{key:ce,type:"button",class:H(v(g).e("shortcut")),onClick:ae=>v(x)(X)},Ee(X.text),11,["onClick"]))),128))],2)):fe("v-if",!0),Q("div",{class:H(v(g).e("body"))},[Q("div",{class:H([[v(g).e("content"),v(y).e("content")],"is-left"])},[Q("div",{class:H(v(y).e("header"))},[Q("button",{type:"button",class:H([v(g).e("icon-btn"),"d-arrow-left"]),onClick:v(C)},[ve(j.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["onClick"]),j.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(G),class:H([[v(g).e("icon-btn"),{[v(g).is("disabled")]:!v(G)}],"d-arrow-right"]),onClick:v(A)},[ve(j.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["disabled","onClick"])):fe("v-if",!0),Q("div",null,Ee(v(P)),1)],2),R(pv,{"selection-mode":"range",date:c.value,"min-date":v(f),"max-date":v(h),"range-state":v(m),"disabled-date":v(a),onChangerange:v(S),onPick:ne,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),Q("div",{class:H([[v(g).e("content"),v(y).e("content")],"is-right"])},[Q("div",{class:H(v(y).e("header"))},[j.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(G),class:H([[v(g).e("icon-btn"),{"is-disabled":!v(G)}],"d-arrow-left"]),onClick:v(V)},[ve(j.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["disabled","onClick"])):fe("v-if",!0),Q("button",{type:"button",class:H([v(g).e("icon-btn"),"d-arrow-right"]),onClick:v(M)},[ve(j.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["onClick"]),Q("div",null,Ee(v(L)),1)],2),R(pv,{"selection-mode":"range",date:d.value,"min-date":v(f),"max-date":v(h),"range-state":v(m),"disabled-date":v(a),onChangerange:v(S),onPick:ne,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var HR=mt(zR,[["__file","panel-month-range.vue"]]);const WR=Ge({...S1}),UR=["pick","set-picker-option","calendar-change"],jR=({unlinkPanels:n,leftDate:e,rightDate:t})=>{const r=()=>{e.value=e.value.subtract(10,"year"),n.value||(t.value=t.value.subtract(10,"year"))},o=()=>{n.value||(e.value=e.value.add(10,"year")),t.value=t.value.add(10,"year")},s=()=>{e.value=e.value.add(10,"year")},a=()=>{t.value=t.value.subtract(10,"year")},i=O(()=>{const f=Math.floor(e.value.year()/10)*10;return`${f}-${f+9}`}),l=O(()=>{const f=Math.floor(t.value.year()/10)*10;return`${f}-${f+9}`}),c=O(()=>Math.floor(e.value.year()/10)*10+9),d=O(()=>Math.floor(t.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:o,leftNextYear:s,rightPrevYear:a,leftLabel:i,rightLabel:l,leftYear:c,rightYear:d}},n2="year",KR=ue({name:"DatePickerYearRange"}),GR=ue({...KR,props:WR,emits:UR,setup(n,{emit:e}){const t=n,{lang:r}=En(),o=N(tt().locale(r.value)),s=N(o.value.add(10,"year")),{pickerNs:a}=yt(rp),i=je("date-range-picker"),l=O(()=>!!ne.length),c=O(()=>[a.b(),i.b(),{"has-sidebar":!!Na().sidebar||l.value}]),d=O(()=>({content:[a.e("content"),i.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!C.value},"d-arrow-right"]})),f=O(()=>({content:[a.e("content"),i.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!C.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),h=xS(r),{leftPrevYear:m,rightNextYear:g,leftNextYear:y,rightPrevYear:S,leftLabel:w,rightLabel:x,leftYear:T,rightYear:k}=jR({unlinkPanels:Kn(t,"unlinkPanels"),leftDate:o,rightDate:s}),C=O(()=>t.unlinkPanels&&k.value>T.value+1),M=N(),A=N(),V=N({endDate:null,selecting:!1}),P=ae=>{V.value=ae},L=(ae,ye=!0)=>{const ke=ae.minDate,Be=ae.maxDate;A.value===Be&&M.value===ke||(e("calendar-change",[ke.toDate(),Be&&Be.toDate()]),A.value=Be,M.value=ke,ye&&K())},K=(ae=!1)=>{sl([M.value,A.value])&&e("pick",[M.value,A.value],ae)},J=ae=>{V.value.selecting=ae,ae||(V.value.endDate=null)},G=yt("EP_PICKER_BASE"),{shortcuts:ne,disabledDate:W}=G.props,D=Kn(G.props,"format"),U=Kn(G.props,"defaultValue"),te=()=>{let ae;if(gt(U.value)){const ye=tt(U.value[0]);let ke=tt(U.value[1]);return t.unlinkPanels||(ke=ye.add(10,n2)),[ye,ke]}else U.value?ae=tt(U.value):ae=tt();return ae=ae.locale(r.value),[ae,ae.add(10,n2)]};Xe(()=>U.value,ae=>{if(ae){const ye=te();o.value=ye[0],s.value=ye[1]}},{immediate:!0}),Xe(()=>t.parsedValue,ae=>{if(ae&&ae.length===2)if(M.value=ae[0],A.value=ae[1],o.value=M.value,t.unlinkPanels&&A.value){const ye=M.value.year(),ke=A.value.year();s.value=ye===ke?A.value.add(10,"year"):A.value}else s.value=o.value.add(10,"year");else{const ye=te();M.value=void 0,A.value=void 0,o.value=ye[0],s.value=ye[1]}},{immediate:!0});const j=ae=>gt(ae)?ae.map(ye=>tt(ye,D.value).locale(r.value)):tt(ae,D.value).locale(r.value),ee=ae=>gt(ae)?ae.map(ye=>ye.format(D.value)):ae.format(D.value),X=ae=>sl(ae)&&(W?!W(ae[0].toDate())&&!W(ae[1].toDate()):!0),ce=()=>{const ae=te();o.value=ae[0],s.value=ae[1],A.value=void 0,M.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",X]),e("set-picker-option",["parseUserInput",j]),e("set-picker-option",["formatToString",ee]),e("set-picker-option",["handleClear",ce]),(ae,ye)=>(I(),z("div",{class:H(v(c))},[Q("div",{class:H(v(a).e("body-wrapper"))},[ve(ae.$slots,"sidebar",{class:H(v(a).e("sidebar"))}),v(l)?(I(),z("div",{key:0,class:H(v(a).e("sidebar"))},[(I(!0),z(it,null,Ht(v(ne),(ke,Be)=>(I(),z("button",{key:Be,type:"button",class:H(v(a).e("shortcut")),onClick:le=>v(h)(ke)},Ee(ke.text),11,["onClick"]))),128))],2)):fe("v-if",!0),Q("div",{class:H(v(a).e("body"))},[Q("div",{class:H(v(d).content)},[Q("div",{class:H(v(i).e("header"))},[Q("button",{type:"button",class:H(v(d).arrowLeftBtn),onClick:v(m)},[ve(ae.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["onClick"]),ae.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(C),class:H(v(d).arrowRightBtn),onClick:v(y)},[ve(ae.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["disabled","onClick"])):fe("v-if",!0),Q("div",null,Ee(v(w)),1)],2),R(hv,{"selection-mode":"range",date:o.value,"min-date":M.value,"max-date":A.value,"range-state":V.value,"disabled-date":v(W),onChangerange:P,onPick:L,onSelect:J},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),Q("div",{class:H(v(f).content)},[Q("div",{class:H(v(i).e("header"))},[ae.unlinkPanels?(I(),z("button",{key:0,type:"button",disabled:!v(C),class:H(v(f).arrowLeftBtn),onClick:v(S)},[ve(ae.$slots,"prev-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(ks))]),_:1})])],10,["disabled","onClick"])):fe("v-if",!0),Q("button",{type:"button",class:H(v(f).arrowRightBtn),onClick:v(g)},[ve(ae.$slots,"next-year",{},()=>[R(v(pt),null,{default:q(()=>[R(v(Es))]),_:1})])],10,["onClick"]),Q("div",null,Ee(v(x)),1)],2),R(hv,{"selection-mode":"range",date:s.value,"min-date":M.value,"max-date":A.value,"range-state":V.value,"disabled-date":v(W),onChangerange:P,onPick:L,onSelect:J},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var YR=mt(GR,[["__file","panel-year-range.vue"]]);const qR=function(n){switch(n){case"daterange":case"datetimerange":return NR;case"monthrange":return HR;case"yearrange":return YR;default:return PR}};tt.extend(C_);tt.extend(RA);tt.extend(IA);tt.extend(NA);tt.extend(VA);tt.extend(UA);tt.extend(YA);tt.extend(ZA);var JR=ue({name:"ElDatePicker",install:null,props:yR,emits:["update:modelValue"],setup(n,{expose:e,emit:t,slots:r}){const o=je("picker-panel");mn("ElPopperOptions",Hn(Kn(n,"popperOptions"))),mn(rp,{slots:r,pickerNs:o});const s=N();e({focus:()=>{var l;(l=s.value)==null||l.focus()},blur:()=>{var l;(l=s.value)==null||l.blur()},handleOpen:()=>{var l;(l=s.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=s.value)==null||l.handleClose()}});const i=l=>{t("update:modelValue",l)};return()=>{var l;const c=(l=n.format)!=null?l:QA[n.type]||ji,d=qR(n.type);return R(iR,xt(n,{format:c,type:n.type,ref:s,"onUpdate:modelValue":i}),{default:f=>R(d,f,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const XR=kn(JR),ES=n=>{if(!n)return{onClick:zn,onMousedown:zn,onMouseup:zn};let e=!1,t=!1;return{onClick:a=>{e&&t&&n(a),e=t=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{t=a.target===a.currentTarget}}},ZR=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:we([String,Array,Object])},zIndex:{type:we([String,Number])}}),QR={click:n=>n instanceof MouseEvent},eP="overlay";var tP=ue({name:"ElOverlay",props:ZR,emits:QR,setup(n,{slots:e,emit:t}){const r=je(eP),o=l=>{t("click",l)},{onClick:s,onMousedown:a,onMouseup:i}=ES(n.customMaskEvent?void 0:o);return()=>n.mask?R("div",{class:[r.b(),n.overlayClass],style:{zIndex:n.zIndex},onClick:s,onMousedown:a,onMouseup:i},[ve(e,"default")],kd.STYLE|kd.CLASS|kd.PROPS,["onClick","onMouseup","onMousedown"]):st("div",{class:n.overlayClass,style:{zIndex:n.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ve(e,"default")])}});const nP=tP,TS=Symbol("dialogInjectionKey"),MS=Ge({center:Boolean,alignCenter:Boolean,closeIcon:{type:Dn},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),rP={close:()=>!0},oP=(n,e,t,r)=>{let o={offsetX:0,offsetY:0};const s=c=>{const d=c.clientX,f=c.clientY,{offsetX:h,offsetY:m}=o,g=n.value.getBoundingClientRect(),y=g.left,S=g.top,w=g.width,x=g.height,T=document.documentElement.clientWidth,k=document.documentElement.clientHeight,C=-y+h,M=-S+m,A=T-y-w+h,V=k-S-x+m,P=K=>{let J=h+K.clientX-d,G=m+K.clientY-f;r!=null&&r.value||(J=Math.min(Math.max(J,C),A),G=Math.min(Math.max(G,M),V)),o={offsetX:J,offsetY:G},n.value&&(n.value.style.transform=`translate(${Vr(J)}, ${Vr(G)})`)},L=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",L)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",L)},a=()=>{e.value&&n.value&&e.value.addEventListener("mousedown",s)},i=()=>{e.value&&n.value&&e.value.removeEventListener("mousedown",s)},l=()=>{o={offsetX:0,offsetY:0},n.value&&(n.value.style.transform="none")};return ln(()=>{ml(()=>{t.value?a():i()})}),no(()=>{i()}),{resetPosition:l}},aP=(...n)=>e=>{n.forEach(t=>{$n(t)?t(e):t.value=e})},sP=ue({name:"ElDialogContent"}),iP=ue({...sP,props:MS,emits:rP,setup(n,{expose:e}){const t=n,{t:r}=En(),{Close:o}=S9,{dialogRef:s,headerRef:a,bodyId:i,ns:l,style:c}=yt(TS),{focusTrapRef:d}=yt(b9),f=O(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),h=aP(d,s),m=O(()=>t.draggable),g=O(()=>t.overflow),{resetPosition:y}=oP(s,a,m,g);return e({resetPosition:y}),(S,w)=>(I(),z("div",{ref:v(h),class:H(v(f)),style:en(v(c)),tabindex:"-1"},[Q("header",{ref_key:"headerRef",ref:a,class:H([v(l).e("header"),S.headerClass,{"show-close":S.showClose}])},[ve(S.$slots,"header",{},()=>[Q("span",{role:"heading","aria-level":S.ariaLevel,class:H(v(l).e("title"))},Ee(S.title),11,["aria-level"])]),S.showClose?(I(),z("button",{key:0,"aria-label":v(r)("el.dialog.close"),class:H(v(l).e("headerbtn")),type:"button",onClick:x=>S.$emit("close")},[R(v(pt),{class:H(v(l).e("close"))},{default:q(()=>[(I(),me(nn(S.closeIcon||v(o))))]),_:1},8,["class"])],10,["aria-label","onClick"])):fe("v-if",!0)],2),Q("div",{id:v(i),class:H([v(l).e("body"),S.bodyClass])},[ve(S.$slots,"default")],10,["id"]),S.$slots.footer?(I(),z("footer",{key:0,class:H([v(l).e("footer"),S.footerClass])},[ve(S.$slots,"footer")],2)):fe("v-if",!0)],6))}});var lP=mt(iP,[["__file","dialog-content.vue"]]);const uP=Ge({...MS,appendToBody:Boolean,appendTo:{type:we([String,Object]),default:"body"},beforeClose:{type:we(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),cP={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Pn]:n=>Qr(n),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},dP=(n,e={})=>{Pa(n)||to("[useLockscreen]","You need to pass a ref param to this function");const t=e.ns||je("popup"),r=O(()=>t.bm("parent","hidden"));if(!Mo||di(document.body,r.value))return;let o=0,s=!1,a="0";const i=()=>{setTimeout(()=>{typeof document>"u"||s&&document&&(document.body.style.width=a,Sd(document.body,r.value))},200)};Xe(n,l=>{if(!l){i();return}s=!di(document.body,r.value),s&&(a=document.body.style.width,Yl(document.body,r.value)),o=q4(t.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,d=C4(document.body,"overflowY");o>0&&(c||d==="scroll")&&s&&(document.body.style.width=`calc(100% - ${o}px)`)}),x4(()=>i())},fP=(n,e)=>{var t;const o=yn().emit,{nextZIndex:s}=v4();let a="";const i=rl(),l=rl(),c=N(!1),d=N(!1),f=N(!1),h=N((t=n.zIndex)!=null?t:s());let m,g;const y=np("namespace",m4),S=O(()=>{const W={},D=`--${y.value}-dialog`;return n.fullscreen||(n.top&&(W[`${D}-margin-top`]=n.top),n.width&&(W[`${D}-width`]=Vr(n.width))),W}),w=O(()=>n.alignCenter?{display:"flex"}:{});function x(){o("opened")}function T(){o("closed"),o(Pn,!1),n.destroyOnClose&&(f.value=!1)}function k(){o("close")}function C(){g==null||g(),m==null||m(),n.openDelay&&n.openDelay>0?{stop:m}=Ou(()=>P(),n.openDelay):P()}function M(){m==null||m(),g==null||g(),n.closeDelay&&n.closeDelay>0?{stop:g}=Ou(()=>L(),n.closeDelay):L()}function A(){function W(D){D||(d.value=!0,c.value=!1)}n.beforeClose?n.beforeClose(W):M()}function V(){n.closeOnClickModal&&A()}function P(){Mo&&(c.value=!0)}function L(){c.value=!1}function K(){o("openAutoFocus")}function J(){o("closeAutoFocus")}function G(W){var D;((D=W.detail)==null?void 0:D.focusReason)==="pointer"&&W.preventDefault()}n.lockScroll&&dP(c);function ne(){n.closeOnPressEscape&&A()}return Xe(()=>n.modelValue,W=>{W?(d.value=!1,C(),f.value=!0,h.value=w9(n.zIndex)?s():h.value++,Dt(()=>{o("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):c.value&&M()}),Xe(()=>n.fullscreen,W=>{e.value&&(W?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),ln(()=>{n.modelValue&&(c.value=!0,f.value=!0,C())}),{afterEnter:x,afterLeave:T,beforeLeave:k,handleClose:A,onModalClick:V,close:M,doClose:L,onOpenAutoFocus:K,onCloseAutoFocus:J,onCloseRequested:ne,onFocusoutPrevented:G,titleId:i,bodyId:l,closed:d,style:S,overlayDialogStyle:w,rendered:f,visible:c,zIndex:h}},pP=ue({name:"ElDialog",inheritAttrs:!1}),hP=ue({...pP,props:uP,emits:cP,setup(n,{expose:e}){const t=n,r=Na();oi({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},O(()=>!!r.title));const o=je("dialog"),s=N(),a=N(),i=N(),{visible:l,titleId:c,bodyId:d,style:f,overlayDialogStyle:h,rendered:m,zIndex:g,afterEnter:y,afterLeave:S,beforeLeave:w,handleClose:x,onModalClick:T,onOpenAutoFocus:k,onCloseAutoFocus:C,onCloseRequested:M,onFocusoutPrevented:A}=fP(t,s);mn(TS,{dialogRef:s,headerRef:a,bodyId:d,ns:o,rendered:m,style:f});const V=ES(T),P=O(()=>t.draggable&&!t.fullscreen);return e({visible:l,dialogContentRef:i,resetPosition:()=>{var K;(K=i.value)==null||K.resetPosition()}}),(K,J)=>(I(),me(v(x9),{to:K.appendTo,disabled:K.appendTo!=="body"?!1:!K.appendToBody},{default:q(()=>[R(Is,{name:"dialog-fade",onAfterEnter:v(y),onAfterLeave:v(S),onBeforeLeave:v(w),persisted:""},{default:q(()=>[an(R(v(nP),{"custom-mask-event":"",mask:K.modal,"overlay-class":K.modalClass,"z-index":v(g)},{default:q(()=>[Q("div",{role:"dialog","aria-modal":"true","aria-label":K.title||void 0,"aria-labelledby":K.title?void 0:v(c),"aria-describedby":v(d),class:H(`${v(o).namespace.value}-overlay-dialog`),style:en(v(h)),onClick:v(V).onClick,onMousedown:v(V).onMousedown,onMouseup:v(V).onMouseup},[R(v(C9),{loop:"",trapped:v(l),"focus-start-el":"container",onFocusAfterTrapped:v(k),onFocusAfterReleased:v(C),onFocusoutPrevented:v(A),onReleaseRequested:v(M)},{default:q(()=>[v(m)?(I(),me(lP,xt({key:0,ref_key:"dialogContentRef",ref:i},K.$attrs,{center:K.center,"align-center":K.alignCenter,"close-icon":K.closeIcon,draggable:v(P),overflow:K.overflow,fullscreen:K.fullscreen,"header-class":K.headerClass,"body-class":K.bodyClass,"footer-class":K.footerClass,"show-close":K.showClose,title:K.title,"aria-level":K.headerAriaLevel,onClose:v(x)}),Ts({header:q(()=>[K.$slots.title?ve(K.$slots,"title",{key:1}):ve(K.$slots,"header",{key:0,close:v(x),titleId:v(c),titleClass:v(o).e("title")})]),default:q(()=>[ve(K.$slots,"default")]),_:2},[K.$slots.footer?{name:"footer",fn:q(()=>[ve(K.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):fe("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[Qn,v(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var mP=mt(hP,[["__file","dialog.vue"]]);const IS=kn(mP),vP=ue({inheritAttrs:!1});function gP(n,e,t,r,o,s){return ve(n.$slots,"default")}var yP=mt(vP,[["render",gP],["__file","collection.vue"]]);const bP=ue({name:"ElCollectionItem",inheritAttrs:!1});function SP(n,e,t,r,o,s){return ve(n.$slots,"default")}var wP=mt(bP,[["render",SP],["__file","collection-item.vue"]]);const CP="data-el-collection-item",xP=n=>{const e=`El${n}Collection`,t=`${e}Item`,r=Symbol(e),o=Symbol(t),s={...yP,name:e,setup(){const i=N(null),l=new Map;mn(r,{itemMap:l,getItems:()=>{const d=v(i);if(!d)return[];const f=Array.from(d.querySelectorAll(`[${CP}]`));return[...l.values()].sort((m,g)=>f.indexOf(m.ref)-f.indexOf(g.ref))},collectionRef:i})}},a={...wP,name:t,setup(i,{attrs:l}){const c=N(null),d=yt(r,void 0);mn(o,{collectionItemRef:c}),ln(()=>{const f=v(c);f&&d.itemMap.set(f,{ref:f,...l})}),no(()=>{const f=v(c);d.itemMap.delete(f)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:o,ElCollection:s,ElCollectionItem:a}},um=Ge({trigger:ev.trigger,triggerKeys:{type:we(Array),default:()=>[It.enter,It.numpadEnter,It.space,It.down]},effect:{...Do.effect,default:"light"},type:{type:we(String)},placement:{type:we(String),default:"bottom"},popperOptions:{type:we(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:we([Number,String]),default:0},maxHeight:{type:we([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:we(Object)},teleported:Do.teleported});Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Dn}});Ge({onKeydown:{type:we(Function)}});xP("Dropdown");const kP=ue({name:"ImgEmpty"}),EP=ue({...kP,setup(n){const e=je("empty"),t=rl();return(r,o)=>(I(),z("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Q("defs",null,[Q("linearGradient",{id:`linearGradient-1-${v(t)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[Q("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),Q("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),Q("linearGradient",{id:`linearGradient-2-${v(t)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[Q("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),Q("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),Q("rect",{id:`path-3-${v(t)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),Q("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[Q("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[Q("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[Q("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${v(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),Q("polygon",{id:"Rectangle-Copy-14",fill:`var(${v(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),Q("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[Q("polygon",{id:"Rectangle-Copy-10",fill:`var(${v(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),Q("polygon",{id:"Rectangle-Copy-11",fill:`var(${v(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),Q("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${v(t)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),Q("polygon",{id:"Rectangle-Copy-13",fill:`var(${v(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),Q("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${v(t)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),Q("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[Q("use",{id:"Mask",fill:`var(${v(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${v(t)}`},null,8,["fill","xlink:href"]),Q("polygon",{id:"Rectangle-Copy",fill:`var(${v(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${v(t)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),Q("polygon",{id:"Rectangle-Copy-18",fill:`var(${v(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var TP=mt(EP,[["__file","img-empty.vue"]]);const MP=Ge({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),IP=ue({name:"ElEmpty"}),OP=ue({...IP,props:MP,setup(n){const e=n,{t}=En(),r=je("empty"),o=O(()=>e.description||t("el.table.emptyText")),s=O(()=>({width:Vr(e.imageSize)}));return(a,i)=>(I(),z("div",{class:H(v(r).b())},[Q("div",{class:H(v(r).e("image")),style:en(v(s))},[a.image?(I(),z("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):ve(a.$slots,"image",{key:1},()=>[R(TP)])],6),Q("div",{class:H(v(r).e("description"))},[a.$slots.description?ve(a.$slots,"description",{key:0}):(I(),z("p",{key:1},Ee(v(o)),1))],2),a.$slots.default?(I(),z("div",{key:0,class:H(v(r).e("bottom"))},[ve(a.$slots,"default")],2)):fe("v-if",!0)],2))}});var _P=mt(OP,[["__file","empty.vue"]]);const AP=kn(_P);function RP(){const n=vr(),e=N(0),t=11,r=O(()=>({minWidth:`${Math.max(e.value,t)}px`}));return Br(n,()=>{var s,a;e.value=(a=(s=n.value)==null?void 0:s.getBoundingClientRect().width)!=null?a:0}),{calculatorRef:n,calculatorWidth:e,inputStyle:r}}const PP=Ge({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Dn}}),$P={click:n=>n instanceof MouseEvent},DP=ue({name:"ElLink"}),NP=ue({...DP,props:PP,emits:$P,setup(n,{emit:e}){const t=n,r=je("link"),o=O(()=>[r.b(),r.m(t.type),r.is("disabled",t.disabled),r.is("underline",t.underline&&!t.disabled)]);function s(a){t.disabled||e("click",a)}return(a,i)=>(I(),z("a",{class:H(v(o)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:s},[a.icon?(I(),me(v(pt),{key:0},{default:q(()=>[(I(),me(nn(a.icon)))]),_:1})):fe("v-if",!0),a.$slots.default?(I(),z("span",{key:1,class:H(v(r).e("inner"))},[ve(a.$slots,"default")],2)):fe("v-if",!0),a.$slots.icon?ve(a.$slots,"icon",{key:2}):fe("v-if",!0)],10,["href","target"]))}});var LP=mt(NP,[["__file","link.vue"]]);const BP=kn(LP);let FP=class{constructor(e,t){this.parent=e,this.domNode=t,this.subIndex=0,this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,t=>{t.addEventListener("keydown",r=>{let o=!1;switch(r.code){case It.down:{this.gotoSubIndex(this.subIndex+1),o=!0;break}case It.up:{this.gotoSubIndex(this.subIndex-1),o=!0;break}case It.tab:{wd(e,"mouseleave");break}case It.enter:case It.numpadEnter:case It.space:{o=!0,r.currentTarget.click();break}}return o&&(r.preventDefault(),r.stopPropagation()),!1})})}},VP=class{constructor(e,t){this.domNode=e,this.submenu=null,this.submenu=null,this.init(t)}init(e){this.domNode.setAttribute("tabindex","0");const t=this.domNode.querySelector(`.${e}-menu`);t&&(this.submenu=new FP(this,t)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let t=!1;switch(e.code){case It.down:{wd(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),t=!0;break}case It.up:{wd(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),t=!0;break}case It.tab:{wd(e.currentTarget,"mouseleave");break}case It.enter:case It.numpadEnter:case It.space:{t=!0,e.currentTarget.click();break}}t&&e.preventDefault()})}},zP=class{constructor(e,t){this.domNode=e,this.init(t)}init(e){const t=this.domNode.childNodes;Array.from(t).forEach(r=>{r.nodeType===1&&new VP(r,e)})}};const HP=ue({name:"ElMenuCollapseTransition",setup(){const n=je("menu");return{listeners:{onBeforeEnter:t=>t.style.opacity="0.2",onEnter(t,r){Yl(t,`${n.namespace.value}-opacity-transition`),t.style.opacity="1",r()},onAfterEnter(t){Sd(t,`${n.namespace.value}-opacity-transition`),t.style.opacity=""},onBeforeLeave(t){t.dataset||(t.dataset={}),di(t,n.m("collapse"))?(Sd(t,n.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),Yl(t,n.m("collapse"))):(Yl(t,n.m("collapse")),t.dataset.oldOverflow=t.style.overflow,t.dataset.scrollWidth=t.clientWidth.toString(),Sd(t,n.m("collapse"))),t.style.width=`${t.scrollWidth}px`,t.style.overflow="hidden"},onLeave(t){Yl(t,"horizontal-collapse-transition"),t.style.width=`${t.dataset.scrollWidth}px`}}}}});function WP(n,e,t,r,o,s){return I(),me(Is,xt({mode:"out-in"},n.listeners),{default:q(()=>[ve(n.$slots,"default")]),_:3},16)}var UP=mt(HP,[["render",WP],["__file","menu-collapse-transition.vue"]]);function OS(n,e){const t=O(()=>{let o=n.parent;const s=[e.value];for(;o.type.name!=="ElMenu";)o.props.index&&s.unshift(o.props.index),o=o.parent;return s});return{parentMenu:O(()=>{let o=n.parent;for(;o&&!["ElMenu","ElSubMenu"].includes(o.type.name);)o=o.parent;return o}),indexPath:t}}function jP(n){return O(()=>{const t=n.backgroundColor;return t?new Q4(t).shade(20).toString():""})}const _S=(n,e)=>{const t=je("menu");return O(()=>t.cssVarBlock({"text-color":n.textColor||"","hover-text-color":n.textColor||"","bg-color":n.backgroundColor||"","hover-bg-color":jP(n).value||"","active-color":n.activeTextColor||"",level:`${e}`}))},KP=Ge({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Dn},expandOpenIcon:{type:Dn},collapseCloseIcon:{type:Dn},collapseOpenIcon:{type:Dn}}),cm="ElSubMenu";var k1=ue({name:cm,props:KP,setup(n,{slots:e,expose:t}){const r=yn(),{indexPath:o,parentMenu:s}=OS(r,O(()=>n.index)),a=je("menu"),i=je("sub-menu"),l=yt("rootMenu");l||to(cm,"can not inject root menu");const c=yt(`subMenu:${s.value.uid}`);c||to(cm,"can not inject sub menu");const d=N({}),f=N({});let h;const m=N(!1),g=N(),y=N(null),S=O(()=>V.value==="horizontal"&&x.value?"bottom-start":"right-start"),w=O(()=>V.value==="horizontal"&&x.value||V.value==="vertical"&&!l.props.collapse?n.expandCloseIcon&&n.expandOpenIcon?M.value?n.expandOpenIcon:n.expandCloseIcon:f1:n.collapseCloseIcon&&n.collapseOpenIcon?M.value?n.collapseOpenIcon:n.collapseCloseIcon:Oa),x=O(()=>c.level===0),T=O(()=>{const ee=n.teleported;return ee===void 0?x.value:ee}),k=O(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),C=O(()=>V.value==="horizontal"&&x.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),M=O(()=>l.openedMenus.includes(n.index)),A=O(()=>{let ee=!1;return Object.values(d.value).forEach(X=>{X.active&&(ee=!0)}),Object.values(f.value).forEach(X=>{X.active&&(ee=!0)}),ee}),V=O(()=>l.props.mode),P=Hn({index:n.index,indexPath:o,active:A}),L=_S(l.props,c.level+1),K=O(()=>{var ee;return(ee=n.popperOffset)!=null?ee:l.props.popperOffset}),J=O(()=>{var ee;return(ee=n.popperClass)!=null?ee:l.props.popperClass}),G=O(()=>{var ee;return(ee=n.showTimeout)!=null?ee:l.props.showTimeout}),ne=O(()=>{var ee;return(ee=n.hideTimeout)!=null?ee:l.props.hideTimeout}),W=()=>{var ee,X,ce;return(ce=(X=(ee=y.value)==null?void 0:ee.popperRef)==null?void 0:X.popperInstanceRef)==null?void 0:ce.destroy()},D=ee=>{ee||W()},U=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||n.disabled||l.handleSubMenuClick({index:n.index,indexPath:o.value,active:A.value})},te=(ee,X=G.value)=>{var ce;if(ee.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||n.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,h==null||h(),{stop:h}=Ou(()=>{l.openMenu(n.index,o.value)},X),T.value&&((ce=s.value.vnode.el)==null||ce.dispatchEvent(new MouseEvent("mouseenter")))}},j=(ee=!1)=>{var X;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){c.mouseInChild.value=!1;return}h==null||h(),c.mouseInChild.value=!1,{stop:h}=Ou(()=>!m.value&&l.closeMenu(n.index,o.value),ne.value),T.value&&ee&&((X=c.handleMouseleave)==null||X.call(c,!0))};Xe(()=>l.props.collapse,ee=>D(!!ee));{const ee=ce=>{f.value[ce.index]=ce},X=ce=>{delete f.value[ce.index]};mn(`subMenu:${r.uid}`,{addSubMenu:ee,removeSubMenu:X,handleMouseleave:j,mouseInChild:m,level:c.level+1})}return t({opened:M}),ln(()=>{l.addSubMenu(P),c.addSubMenu(P)}),no(()=>{c.removeSubMenu(P),l.removeSubMenu(P)}),()=>{var ee;const X=[(ee=e.title)==null?void 0:ee.call(e),st(pt,{class:i.e("icon-arrow"),style:{transform:M.value?n.expandCloseIcon&&n.expandOpenIcon||n.collapseCloseIcon&&n.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Nn(w.value)?st(r.appContext.components[w.value]):st(w.value)})],ce=l.isMenuPopup?st(Ju,{ref:y,visible:M.value,effect:"light",pure:!0,offset:K.value,showArrow:!1,persistent:!0,popperClass:J.value,placement:S.value,teleported:T.value,fallbackPlacements:C.value,transition:k.value,gpuAcceleration:!1},{content:()=>{var ae;return st("div",{class:[a.m(V.value),a.m("popup-container"),J.value],onMouseenter:ye=>te(ye,100),onMouseleave:()=>j(!0),onFocus:ye=>te(ye,100)},[st("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${S.value}`)],style:L.value},[(ae=e.default)==null?void 0:ae.call(e)])])},default:()=>st("div",{class:i.e("title"),onClick:U},X)}):st(it,{},[st("div",{class:i.e("title"),ref:g,onClick:U},X),st(gS,{},{default:()=>{var ae;return an(st("ul",{role:"menu",class:[a.b(),a.m("inline")],style:L.value},[(ae=e.default)==null?void 0:ae.call(e)]),[[Qn,M.value]])}})]);return st("li",{class:[i.b(),i.is("active",A.value),i.is("opened",M.value),i.is("disabled",n.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:M.value,onMouseenter:te,onMouseleave:()=>j(),onFocus:te},[ce])}}});const GP=Ge({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:we(Array),default:()=>xo([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:Dn,default:()=>k9},popperEffect:{type:we(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),dm=n=>gt(n)&&n.every(e=>Nn(e)),YP={close:(n,e)=>Nn(n)&&dm(e),open:(n,e)=>Nn(n)&&dm(e),select:(n,e,t,r)=>Nn(n)&&dm(e)&&Fr(t)&&(r===void 0||r instanceof Promise)};var qP=ue({name:"ElMenu",props:GP,emits:YP,setup(n,{emit:e,slots:t,expose:r}){const o=yn(),s=o.appContext.config.globalProperties.$router,a=N(),i=je("menu"),l=je("sub-menu"),c=N(-1),d=N(n.defaultOpeneds&&!n.collapse?n.defaultOpeneds.slice(0):[]),f=N(n.defaultActive),h=N({}),m=N({}),g=O(()=>n.mode==="horizontal"||n.mode==="vertical"&&n.collapse),y=()=>{const W=f.value&&h.value[f.value];if(!W||n.mode==="horizontal"||n.collapse)return;W.indexPath.forEach(U=>{const te=m.value[U];te&&S(U,te.indexPath)})},S=(W,D)=>{d.value.includes(W)||(n.uniqueOpened&&(d.value=d.value.filter(U=>D.includes(U))),d.value.push(W),e("open",W,D))},w=W=>{const D=d.value.indexOf(W);D!==-1&&d.value.splice(D,1)},x=(W,D)=>{w(W),e("close",W,D)},T=({index:W,indexPath:D})=>{d.value.includes(W)?x(W,D):S(W,D)},k=W=>{(n.mode==="horizontal"||n.collapse)&&(d.value=[]);const{index:D,indexPath:U}=W;if(!(Yd(D)||Yd(U)))if(n.router&&s){const te=W.route||D,j=s.push(te).then(ee=>(ee||(f.value=D),ee));e("select",D,U,{index:D,indexPath:U,route:te},j)}else f.value=D,e("select",D,U,{index:D,indexPath:U})},C=W=>{const D=h.value,U=D[W]||f.value&&D[f.value]||D[n.defaultActive];U?f.value=U.index:f.value=W},M=W=>{const D=getComputedStyle(W),U=Number.parseInt(D.marginLeft,10),te=Number.parseInt(D.marginRight,10);return W.offsetWidth+U+te||0},A=()=>{var W,D;if(!a.value)return-1;const U=Array.from((D=(W=a.value)==null?void 0:W.childNodes)!=null?D:[]).filter(ke=>ke.nodeName!=="#text"||ke.nodeValue),te=64,j=getComputedStyle(a.value),ee=Number.parseInt(j.paddingLeft,10),X=Number.parseInt(j.paddingRight,10),ce=a.value.clientWidth-ee-X;let ae=0,ye=0;return U.forEach((ke,Be)=>{ke.nodeName!=="#comment"&&(ae+=M(ke),ae<=ce-te&&(ye=Be+1))}),ye===U.length?-1:ye},V=W=>m.value[W].indexPath,P=(W,D=33.34)=>{let U;return()=>{U&&clearTimeout(U),U=setTimeout(()=>{W()},D)}};let L=!0;const K=()=>{if(c.value===A())return;const W=()=>{c.value=-1,Dt(()=>{c.value=A()})};L?W():P(W)(),L=!1};Xe(()=>n.defaultActive,W=>{h.value[W]||(f.value=""),C(W)}),Xe(()=>n.collapse,W=>{W&&(d.value=[])}),Xe(h.value,y);let J;ml(()=>{n.mode==="horizontal"&&n.ellipsis?J=Br(a,K).stop:J==null||J()});const G=N(!1);{const W=j=>{m.value[j.index]=j},D=j=>{delete m.value[j.index]};mn("rootMenu",Hn({props:n,openedMenus:d,items:h,subMenus:m,activeIndex:f,isMenuPopup:g,addMenuItem:j=>{h.value[j.index]=j},removeMenuItem:j=>{delete h.value[j.index]},addSubMenu:W,removeSubMenu:D,openMenu:S,closeMenu:x,handleMenuItemClick:k,handleSubMenuClick:T})),mn(`subMenu:${o.uid}`,{addSubMenu:W,removeSubMenu:D,mouseInChild:G,level:0})}ln(()=>{n.mode==="horizontal"&&new zP(o.vnode.el,i.namespace.value)}),r({open:D=>{const{indexPath:U}=m.value[D];U.forEach(te=>S(te,U))},close:w,handleResize:K});const ne=_S(n,0);return()=>{var W,D;let U=(D=(W=t.default)==null?void 0:W.call(t))!=null?D:[];const te=[];if(n.mode==="horizontal"&&a.value){const X=lu(U),ce=c.value===-1?X:X.slice(0,c.value),ae=c.value===-1?[]:X.slice(c.value);ae!=null&&ae.length&&n.ellipsis&&(U=ce,te.push(st(k1,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:n.popperOffset},{title:()=>st(pt,{class:l.e("icon-more")},{default:()=>st(n.ellipsisIcon)}),default:()=>ae})))}const j=n.closeOnClickOutside?[[Ru,()=>{d.value.length&&(G.value||(d.value.forEach(X=>e("close",X,V(X))),d.value=[]))}]]:[],ee=an(st("ul",{key:String(n.collapse),role:"menubar",ref:a,style:ne.value,class:{[i.b()]:!0,[i.m(n.mode)]:!0,[i.m("collapse")]:n.collapse}},[...U,...te]),j);return n.collapseTransition&&n.mode==="vertical"?st(UP,()=>ee):ee}}});const JP=Ge({index:{type:we([String,null]),default:null},route:{type:we([String,Object])},disabled:Boolean}),XP={click:n=>Nn(n.index)&>(n.indexPath)},fm="ElMenuItem",ZP=ue({name:fm,components:{ElTooltip:Ju},props:JP,emits:XP,setup(n,{emit:e}){const t=yn(),r=yt("rootMenu"),o=je("menu"),s=je("menu-item");r||to(fm,"can not inject root menu");const{parentMenu:a,indexPath:i}=OS(t,Kn(n,"index")),l=yt(`subMenu:${a.value.uid}`);l||to(fm,"can not inject sub menu");const c=O(()=>n.index===r.activeIndex),d=Hn({index:n.index,indexPath:i,active:c}),f=()=>{n.disabled||(r.handleMenuItemClick({index:n.index,indexPath:i.value,route:n.route}),e("click",d))};return ln(()=>{l.addSubMenu(d),r.addMenuItem(d)}),no(()=>{l.removeSubMenu(d),r.removeMenuItem(d)}),{parentMenu:a,rootMenu:r,active:c,nsMenu:o,nsMenuItem:s,handleClick:f}}});function QP(n,e,t,r,o,s){const a=Jo("el-tooltip");return I(),z("li",{class:H([n.nsMenuItem.b(),n.nsMenuItem.is("active",n.active),n.nsMenuItem.is("disabled",n.disabled)]),role:"menuitem",tabindex:"-1",onClick:n.handleClick},[n.parentMenu.type.name==="ElMenu"&&n.rootMenu.props.collapse&&n.$slots.title?(I(),me(a,{key:0,effect:n.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:q(()=>[ve(n.$slots,"title")]),default:q(()=>[Q("div",{class:H(n.nsMenu.be("tooltip","trigger"))},[ve(n.$slots,"default")],2)]),_:3},8,["effect"])):(I(),z(it,{key:1},[ve(n.$slots,"default"),ve(n.$slots,"title")],64))],10,["onClick"])}var AS=mt(ZP,[["render",QP],["__file","menu-item.vue"]]);const e$={title:String},t$="ElMenuItemGroup",n$=ue({name:t$,props:e$,setup(){return{ns:je("menu-item-group")}}});function r$(n,e,t,r,o,s){return I(),z("li",{class:H(n.ns.b())},[Q("div",{class:H(n.ns.e("title"))},[n.$slots.title?ve(n.$slots,"title",{key:1}):(I(),z(it,{key:0},[ht(Ee(n.title),1)],64))],2),Q("ul",null,[ve(n.$slots,"default")])],2)}var RS=mt(n$,[["render",r$],["__file","menu-item-group.vue"]]);const o$=kn(qP,{MenuItem:AS,MenuItemGroup:RS,SubMenu:k1}),a$=ro(AS);ro(RS);ro(k1);const PS=Symbol("elPaginationKey"),s$=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Dn}}),i$={click:n=>n instanceof MouseEvent},l$=ue({name:"ElPaginationPrev"}),u$=ue({...l$,props:s$,emits:i$,setup(n){const e=n,{t}=En(),r=O(()=>e.disabled||e.currentPage<=1);return(o,s)=>(I(),z("button",{type:"button",class:"btn-prev",disabled:v(r),"aria-label":o.prevText||v(t)("el.pagination.prev"),"aria-disabled":v(r),onClick:a=>o.$emit("click",a)},[o.prevText?(I(),z("span",{key:0},Ee(o.prevText),1)):(I(),me(v(pt),{key:1},{default:q(()=>[(I(),me(nn(o.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var c$=mt(u$,[["__file","prev.vue"]]);const d$=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Dn}}),f$=ue({name:"ElPaginationNext"}),p$=ue({...f$,props:d$,emits:["click"],setup(n){const e=n,{t}=En(),r=O(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(o,s)=>(I(),z("button",{type:"button",class:"btn-next",disabled:v(r),"aria-label":o.nextText||v(t)("el.pagination.next"),"aria-disabled":v(r),onClick:a=>o.$emit("click",a)},[o.nextText?(I(),z("span",{key:0},Ee(o.nextText),1)):(I(),me(v(pt),{key:1},{default:q(()=>[(I(),me(nn(o.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var h$=mt(p$,[["__file","next.vue"]]);const $S=Symbol("ElSelectGroup"),op=Symbol("ElSelect");function m$(n,e){const t=yt(op),r=yt($S,{disabled:!1}),o=O(()=>d(Bo(t.props.modelValue),n.value)),s=O(()=>{var m;if(t.props.multiple){const g=Bo((m=t.props.modelValue)!=null?m:[]);return!o.value&&g.length>=t.props.multipleLimit&&t.props.multipleLimit>0}else return!1}),a=O(()=>n.label||(Fr(n.value)?"":n.value)),i=O(()=>n.value||n.label||""),l=O(()=>n.disabled||e.groupDisabled||s.value),c=yn(),d=(m=[],g)=>{if(Fr(n.value)){const y=t.props.valueKey;return m&&m.some(S=>Tu(Ma(S,y))===Ma(g,y))}else return m&&m.includes(g)},f=()=>{!n.disabled&&!r.disabled&&(t.states.hoveringIndex=t.optionsArray.indexOf(c.proxy))},h=m=>{const g=new RegExp(Q_(m),"i");e.visible=g.test(a.value)||n.created};return Xe(()=>a.value,()=>{!n.created&&!t.props.remote&&t.setSelected()}),Xe(()=>n.value,(m,g)=>{const{remote:y,valueKey:S}=t.props;if(m!==g&&(t.onOptionDestroy(g,c.proxy),t.onOptionCreate(c.proxy)),!n.created&&!y){if(S&&Fr(m)&&Fr(g)&&m[S]===g[S])return;t.setSelected()}}),Xe(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:t,currentLabel:a,currentValue:i,itemSelected:o,isDisabled:l,hoverItem:f,updateOption:h}}const v$=ue({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(n){const e=je("select"),t=rl(),r=O(()=>[e.be("dropdown","item"),e.is("disabled",v(i)),e.is("selected",v(a)),e.is("hovering",v(h))]),o=Hn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:s,itemSelected:a,isDisabled:i,select:l,hoverItem:c,updateOption:d}=m$(n,o),{visible:f,hover:h}=qu(o),m=yn().proxy;l.onOptionCreate(m),no(()=>{const y=m.value,{selected:S}=l.states,w=S.some(x=>x.value===m.value);Dt(()=>{l.states.cachedOptions.get(y)===m&&!w&&l.states.cachedOptions.delete(y)}),l.onOptionDestroy(y,m)});function g(){i.value||l.handleOptionSelect(m)}return{ns:e,id:t,containerKls:r,currentLabel:s,itemSelected:a,isDisabled:i,select:l,hoverItem:c,updateOption:d,visible:f,hover:h,selectOptionClick:g,states:o}}});function g$(n,e,t,r,o,s){return an((I(),z("li",{id:n.id,class:H(n.containerKls),role:"option","aria-disabled":n.isDisabled||void 0,"aria-selected":n.itemSelected,onMousemove:n.hoverItem,onClick:Qe(n.selectOptionClick,["stop"])},[ve(n.$slots,"default",{},()=>[Q("span",null,Ee(n.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[Qn,n.visible]])}var E1=mt(v$,[["render",g$],["__file","option.vue"]]);const y$=ue({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const n=yt(op),e=je("select"),t=O(()=>n.props.popperClass),r=O(()=>n.props.multiple),o=O(()=>n.props.fitInputWidth),s=N("");function a(){var i;s.value=`${(i=n.selectRef)==null?void 0:i.offsetWidth}px`}return ln(()=>{a(),Br(n.selectRef,a)}),{ns:e,minWidth:s,popperClass:t,isMultiple:r,isFitInputWidth:o}}});function b$(n,e,t,r,o,s){return I(),z("div",{class:H([n.ns.b("dropdown"),n.ns.is("multiple",n.isMultiple),n.popperClass]),style:en({[n.isFitInputWidth?"width":"minWidth"]:n.minWidth})},[n.$slots.header?(I(),z("div",{key:0,class:H(n.ns.be("dropdown","header"))},[ve(n.$slots,"header")],2)):fe("v-if",!0),ve(n.$slots,"default"),n.$slots.footer?(I(),z("div",{key:1,class:H(n.ns.be("dropdown","footer"))},[ve(n.$slots,"footer")],2)):fe("v-if",!0)],6)}var S$=mt(y$,[["render",b$],["__file","select-dropdown.vue"]]);const w$=(n,e)=>{const{t}=En(),r=rl(),o=je("select"),s=je("input"),a=Hn({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),i=N(null),l=N(null),c=N(null),d=N(null),f=N(null),h=N(null),m=N(null),g=N(null),y=N(null),S=N(null),w=N(null),{isComposing:x,handleCompositionStart:T,handleCompositionUpdate:k,handleCompositionEnd:C}=E9({afterComposition:Ce=>Pt(Ce)}),{wrapperRef:M,isFocused:A,handleBlur:V}=c1(f,{beforeFocus(){return D.value},afterFocus(){n.automaticDropdown&&!P.value&&(P.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(Ce){var Ke,Bt;return((Ke=c.value)==null?void 0:Ke.isFocusInsideContent(Ce))||((Bt=d.value)==null?void 0:Bt.isFocusInsideContent(Ce))},afterBlur(){P.value=!1,a.menuVisibleOnFocus=!1}}),P=N(!1),L=N(),{form:K,formItem:J}=Os(),{inputId:G}=Yu(n,{formItemContext:J}),{valueOnClear:ne,isEmptyValue:W}=j4(n),D=O(()=>n.disabled||(K==null?void 0:K.disabled)),U=O(()=>gt(n.modelValue)?n.modelValue.length>0:!W(n.modelValue)),te=O(()=>{var Ce;return(Ce=K==null?void 0:K.statusIcon)!=null?Ce:!1}),j=O(()=>n.clearable&&!D.value&&a.inputHovering&&U.value),ee=O(()=>n.remote&&n.filterable&&!n.remoteShowSuffix?"":n.suffixIcon),X=O(()=>o.is("reverse",ee.value&&P.value)),ce=O(()=>(J==null?void 0:J.validateState)||""),ae=O(()=>T9[ce.value]),ye=O(()=>n.remote?300:0),ke=O(()=>n.remote&&!a.inputValue&&a.options.size===0),Be=O(()=>n.loading?n.loadingText||t("el.select.loading"):n.filterable&&a.inputValue&&a.options.size>0&&le.value===0?n.noMatchText||t("el.select.noMatch"):a.options.size===0?n.noDataText||t("el.select.noData"):null),le=O(()=>xe.value.filter(Ce=>Ce.visible).length),xe=O(()=>{const Ce=Array.from(a.options.values()),Ke=[];return a.optionValues.forEach(Bt=>{const Bn=Ce.findIndex(Cr=>Cr.value===Bt);Bn>-1&&Ke.push(Ce[Bn])}),Ke.length>=Ce.length?Ke:Ce}),Me=O(()=>Array.from(a.cachedOptions.values())),De=O(()=>{const Ce=xe.value.filter(Ke=>!Ke.created).some(Ke=>Ke.currentLabel===a.inputValue);return n.filterable&&n.allowCreate&&a.inputValue!==""&&!Ce}),Ze=()=>{n.filterable&&$n(n.filterMethod)||n.filterable&&n.remote&&$n(n.remoteMethod)||xe.value.forEach(Ce=>{var Ke;(Ke=Ce.updateOption)==null||Ke.call(Ce,a.inputValue)})},lt=Cs(),ze=O(()=>["small"].includes(lt.value)?"small":"default"),Pe=O({get(){return P.value&&!ke.value},set(Ce){P.value=Ce}}),nt=O(()=>{if(n.multiple&&!So(n.modelValue))return Bo(n.modelValue).length===0&&!a.inputValue;const Ce=gt(n.modelValue)?n.modelValue[0]:n.modelValue;return n.filterable||So(Ce)?!a.inputValue:!0}),Ot=O(()=>{var Ce;const Ke=(Ce=n.placeholder)!=null?Ce:t("el.select.placeholder");return n.multiple||!U.value?Ke:a.selectedLabel}),_e=O(()=>rb?null:"mouseenter");Xe(()=>n.modelValue,(Ce,Ke)=>{n.multiple&&n.filterable&&!n.reserveKeyword&&(a.inputValue="",He("")),Ye(),!vs(Ce,Ke)&&n.validateEvent&&(J==null||J.validate("change").catch(Bt=>$a()))},{flush:"post",deep:!0}),Xe(()=>P.value,Ce=>{Ce?He(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",Ce)}),Xe(()=>a.options.entries(),()=>{Mo&&(Ye(),n.defaultFirstOption&&(n.filterable||n.remote)&&le.value&&Fe())},{flush:"post"}),Xe(()=>a.hoveringIndex,Ce=>{Rt(Ce)&&Ce>-1?L.value=xe.value[Ce]||{}:L.value={},xe.value.forEach(Ke=>{Ke.hover=L.value===Ke})}),ml(()=>{a.isBeforeHide||Ze()});const He=Ce=>{a.previousQuery===Ce||x.value||(a.previousQuery=Ce,n.filterable&&$n(n.filterMethod)?n.filterMethod(Ce):n.filterable&&n.remote&&$n(n.remoteMethod)&&n.remoteMethod(Ce),n.defaultFirstOption&&(n.filterable||n.remote)&&le.value?Dt(Fe):Dt(dt))},Fe=()=>{const Ce=xe.value.filter(Cr=>Cr.visible&&!Cr.disabled&&!Cr.states.groupDisabled),Ke=Ce.find(Cr=>Cr.created),Bt=Ce[0],Bn=xe.value.map(Cr=>Cr.value);a.hoveringIndex=Y(Bn,Ke||Bt)},Ye=()=>{if(n.multiple)a.selectedLabel="";else{const Ke=gt(n.modelValue)?n.modelValue[0]:n.modelValue,Bt=qe(Ke);a.selectedLabel=Bt.currentLabel,a.selected=[Bt];return}const Ce=[];So(n.modelValue)||Bo(n.modelValue).forEach(Ke=>{Ce.push(qe(Ke))}),a.selected=Ce},qe=Ce=>{let Ke;const Bt=tv(Ce);for(let ia=a.cachedOptions.size-1;ia>=0;ia--){const Uo=Me.value[ia];if(Bt?Ma(Uo.value,n.valueKey)===Ma(Ce,n.valueKey):Uo.value===Ce){Ke={value:Ce,currentLabel:Uo.currentLabel,get isDisabled(){return Uo.isDisabled}};break}}if(Ke)return Ke;const Bn=Bt?Ce.label:Ce??"";return{value:Ce,currentLabel:Bn}},dt=()=>{a.hoveringIndex=xe.value.findIndex(Ce=>a.selected.some(Ke=>Si(Ke)===Si(Ce)))},vt=()=>{a.selectionWidth=l.value.getBoundingClientRect().width},bt=()=>{a.collapseItemWidth=S.value.getBoundingClientRect().width},kt=()=>{var Ce,Ke;(Ke=(Ce=c.value)==null?void 0:Ce.updatePopper)==null||Ke.call(Ce)},Lt=()=>{var Ce,Ke;(Ke=(Ce=d.value)==null?void 0:Ce.updatePopper)==null||Ke.call(Ce)},Yt=()=>{a.inputValue.length>0&&!P.value&&(P.value=!0),He(a.inputValue)},Pt=Ce=>{if(a.inputValue=Ce.target.value,n.remote)pe();else return Yt()},pe=m1(()=>{Yt()},ye.value),F=Ce=>{vs(n.modelValue,Ce)||e(xs,Ce)},re=Ce=>bO(Ce,Ke=>{const Bt=a.cachedOptions.get(Ke);return Bt&&!Bt.disabled&&!Bt.states.groupDisabled}),ge=Ce=>{if(n.multiple&&Ce.code!==It.delete&&Ce.target.value.length<=0){const Ke=Bo(n.modelValue).slice(),Bt=re(Ke);if(Bt<0)return;const Bn=Ke[Bt];Ke.splice(Bt,1),e(Pn,Ke),F(Ke),e("remove-tag",Bn)}},oe=(Ce,Ke)=>{const Bt=a.selected.indexOf(Ke);if(Bt>-1&&!D.value){const Bn=Bo(n.modelValue).slice();Bn.splice(Bt,1),e(Pn,Bn),F(Bn),e("remove-tag",Ke.value)}Ce.stopPropagation(),Et()},ie=Ce=>{Ce.stopPropagation();const Ke=n.multiple?[]:ne.value;if(n.multiple)for(const Bt of a.selected)Bt.isDisabled&&Ke.push(Bt.value);e(Pn,Ke),F(Ke),a.hoveringIndex=-1,P.value=!1,e("clear"),Et()},be=Ce=>{var Ke;if(n.multiple){const Bt=Bo((Ke=n.modelValue)!=null?Ke:[]).slice(),Bn=Y(Bt,Ce);Bn>-1?Bt.splice(Bn,1):(n.multipleLimit<=0||Bt.length<n.multipleLimit)&&Bt.push(Ce.value),e(Pn,Bt),F(Bt),Ce.created&&He(""),n.filterable&&!n.reserveKeyword&&(a.inputValue="")}else e(Pn,Ce.value),F(Ce.value),P.value=!1;Et(),!P.value&&Dt(()=>{Ie(Ce)})},Y=(Ce=[],Ke)=>So(Ke)?-1:Fr(Ke.value)?Ce.findIndex(Bt=>vs(Ma(Bt,n.valueKey),Si(Ke))):Ce.indexOf(Ke.value),Ie=Ce=>{var Ke,Bt,Bn,Cr,ia;const Uo=gt(Ce)?Ce[0]:Ce;let Ci=null;if(Uo!=null&&Uo.value){const $s=xe.value.filter(zp=>zp.value===Uo.value);$s.length>0&&(Ci=$s[0].$el)}if(c.value&&Ci){const $s=(Cr=(Bn=(Bt=(Ke=c.value)==null?void 0:Ke.popperRef)==null?void 0:Bt.contentRef)==null?void 0:Bn.querySelector)==null?void 0:Cr.call(Bn,`.${o.be("dropdown","wrap")}`);$s&&IO($s,Ci)}(ia=w.value)==null||ia.handleScroll()},Re=Ce=>{a.options.set(Ce.value,Ce),a.cachedOptions.set(Ce.value,Ce)},Ne=(Ce,Ke)=>{a.options.get(Ce)===Ke&&a.options.delete(Ce)},ot=O(()=>{var Ce,Ke;return(Ke=(Ce=c.value)==null?void 0:Ce.popperRef)==null?void 0:Ke.contentRef}),at=()=>{a.isBeforeHide=!1,Dt(()=>Ie(a.selected))},Et=()=>{var Ce;(Ce=f.value)==null||Ce.focus()},on=()=>{var Ce;if(P.value){P.value=!1,Dt(()=>{var Ke;return(Ke=f.value)==null?void 0:Ke.blur()});return}(Ce=f.value)==null||Ce.blur()},Ln=Ce=>{ie(Ce)},tn=Ce=>{if(P.value=!1,A.value){const Ke=new FocusEvent("focus",Ce);Dt(()=>V(Ke))}},Gn=()=>{a.inputValue.length>0?a.inputValue="":P.value=!1},xl=()=>{D.value||(rb&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:P.value=!P.value)},Dp=()=>{if(!P.value)xl();else{const Ce=xe.value[a.hoveringIndex];Ce&&!Ce.isDisabled&&be(Ce)}},Si=Ce=>Fr(Ce.value)?Ma(Ce.value,n.valueKey):Ce.value,Np=O(()=>xe.value.filter(Ce=>Ce.visible).every(Ce=>Ce.isDisabled)),kl=O(()=>n.multiple?n.collapseTags?a.selected.slice(0,n.maxCollapseTags):a.selected:[]),Lp=O(()=>n.multiple?n.collapseTags?a.selected.slice(n.maxCollapseTags):[]:[]),wi=Ce=>{if(!P.value){P.value=!0;return}if(!(a.options.size===0||le.value===0||x.value)&&!Np.value){Ce==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):Ce==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Ke=xe.value[a.hoveringIndex];(Ke.isDisabled||!Ke.visible)&&wi(Ce),Dt(()=>Ie(L.value))}},Bp=()=>{if(!l.value)return 0;const Ce=window.getComputedStyle(l.value);return Number.parseFloat(Ce.gap||"6px")},Fp=O(()=>{const Ce=Bp();return{maxWidth:`${S.value&&n.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-Ce:a.selectionWidth}px`}}),Vp=O(()=>({maxWidth:`${a.selectionWidth}px`}));return Br(l,vt),Br(g,kt),Br(M,kt),Br(y,Lt),Br(S,bt),ln(()=>{Ye()}),{inputId:G,contentId:r,nsSelect:o,nsInput:s,states:a,isFocused:A,expanded:P,optionsArray:xe,hoverOption:L,selectSize:lt,filteredOptionsCount:le,updateTooltip:kt,updateTagTooltip:Lt,debouncedOnInputChange:pe,onInput:Pt,deletePrevTag:ge,deleteTag:oe,deleteSelected:ie,handleOptionSelect:be,scrollToOption:Ie,hasModelValue:U,shouldShowPlaceholder:nt,currentPlaceholder:Ot,mouseEnterEventName:_e,needStatusIcon:te,showClose:j,iconComponent:ee,iconReverse:X,validateState:ce,validateIcon:ae,showNewOption:De,updateOptions:Ze,collapseTagSize:ze,setSelected:Ye,selectDisabled:D,emptyText:Be,handleCompositionStart:T,handleCompositionUpdate:k,handleCompositionEnd:C,onOptionCreate:Re,onOptionDestroy:Ne,handleMenuEnter:at,focus:Et,blur:on,handleClearClick:Ln,handleClickOutside:tn,handleEsc:Gn,toggleMenu:xl,selectOption:Dp,getValueKey:Si,navigateOptions:wi,dropdownMenuVisible:Pe,showTagList:kl,collapseTagList:Lp,tagStyle:Fp,collapseTagStyle:Vp,popperRef:ot,inputRef:f,tooltipRef:c,tagTooltipRef:d,prefixRef:h,suffixRef:m,selectRef:i,wrapperRef:M,selectionRef:l,scrollbarRef:w,menuRef:g,tagMenuRef:y,collapseItemRef:S}};var C$=ue({name:"ElOptions",setup(n,{slots:e}){const t=yt(op);let r=[];return()=>{var o,s;const a=(o=e.default)==null?void 0:o.call(e),i=[];function l(c){gt(c)&&c.forEach(d=>{var f,h,m,g;const y=(f=(d==null?void 0:d.type)||{})==null?void 0:f.name;y==="ElOptionGroup"?l(!Nn(d.children)&&!gt(d.children)&&$n((h=d.children)==null?void 0:h.default)?(m=d.children)==null?void 0:m.default():d.children):y==="ElOption"?i.push((g=d.props)==null?void 0:g.value):gt(d.children)&&l(d.children)})}return a.length&&l((s=a[0])==null?void 0:s.children),vs(i,r)||(r=i,t&&(t.states.optionValues=i)),a}}});const x$=Ge({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:La,effect:{type:we(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:we(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Do.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Dn,default:u1},fitInputWidth:Boolean,suffixIcon:{type:Dn,default:f1},tagType:{...lv.type,default:"info"},tagEffect:{...lv.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:we(String),values:w4,default:"bottom-start"},fallbackPlacements:{type:we(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:String,...v1,...gi(["ariaLabel"])}),r2="ElSelect",k$=ue({name:r2,componentName:r2,components:{ElSelectMenu:S$,ElOption:E1,ElOptions:C$,ElTag:oA,ElScrollbar:y1,ElTooltip:Ju,ElIcon:pt},directives:{ClickOutside:Ru},props:x$,emits:[Pn,xs,"remove-tag","clear","visible-change","focus","blur"],setup(n,{emit:e}){const t=O(()=>{const{modelValue:l,multiple:c}=n,d=c?[]:void 0;return gt(l)?c?l:d:c?d:l}),r=Hn({...qu(n),modelValue:t}),o=w$(r,e),{calculatorRef:s,inputStyle:a}=RP();mn(op,Hn({props:r,states:o.states,optionsArray:o.optionsArray,handleOptionSelect:o.handleOptionSelect,onOptionCreate:o.onOptionCreate,onOptionDestroy:o.onOptionDestroy,selectRef:o.selectRef,setSelected:o.setSelected}));const i=O(()=>n.multiple?o.states.selected.map(l=>l.currentLabel):o.states.selectedLabel);return{...o,modelValue:t,selectedLabel:i,calculatorRef:s,inputStyle:a}}});function E$(n,e,t,r,o,s){const a=Jo("el-tag"),i=Jo("el-tooltip"),l=Jo("el-icon"),c=Jo("el-option"),d=Jo("el-options"),f=Jo("el-scrollbar"),h=Jo("el-select-menu"),m=M9("click-outside");return an((I(),z("div",{ref:"selectRef",class:H([n.nsSelect.b(),n.nsSelect.m(n.selectSize)]),[O9(n.mouseEnterEventName)]:g=>n.states.inputHovering=!0,onMouseleave:g=>n.states.inputHovering=!1},[R(i,{ref:"tooltipRef",visible:n.dropdownMenuVisible,placement:n.placement,teleported:n.teleported,"popper-class":[n.nsSelect.e("popper"),n.popperClass],"popper-options":n.popperOptions,"fallback-placements":n.fallbackPlacements,effect:n.effect,pure:"",trigger:"click",transition:`${n.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:n.persistent,"append-to":n.appendTo,"show-arrow":n.showArrow,offset:n.offset,onBeforeShow:n.handleMenuEnter,onHide:g=>n.states.isBeforeHide=!1},{default:q(()=>{var g;return[Q("div",{ref:"wrapperRef",class:H([n.nsSelect.e("wrapper"),n.nsSelect.is("focused",n.isFocused),n.nsSelect.is("hovering",n.states.inputHovering),n.nsSelect.is("filterable",n.filterable),n.nsSelect.is("disabled",n.selectDisabled)]),onClick:Qe(n.toggleMenu,["prevent"])},[n.$slots.prefix?(I(),z("div",{key:0,ref:"prefixRef",class:H(n.nsSelect.e("prefix"))},[ve(n.$slots,"prefix")],2)):fe("v-if",!0),Q("div",{ref:"selectionRef",class:H([n.nsSelect.e("selection"),n.nsSelect.is("near",n.multiple&&!n.$slots.prefix&&!!n.states.selected.length)])},[n.multiple?ve(n.$slots,"tag",{key:0},()=>[(I(!0),z(it,null,Ht(n.showTagList,y=>(I(),z("div",{key:n.getValueKey(y),class:H(n.nsSelect.e("selected-item"))},[R(a,{closable:!n.selectDisabled&&!y.isDisabled,size:n.collapseTagSize,type:n.tagType,effect:n.tagEffect,"disable-transitions":"",style:en(n.tagStyle),onClose:S=>n.deleteTag(S,y)},{default:q(()=>[Q("span",{class:H(n.nsSelect.e("tags-text"))},[ve(n.$slots,"label",{label:y.currentLabel,value:y.value},()=>[ht(Ee(y.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),n.collapseTags&&n.states.selected.length>n.maxCollapseTags?(I(),me(i,{key:0,ref:"tagTooltipRef",disabled:n.dropdownMenuVisible||!n.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:n.effect,placement:"bottom",teleported:n.teleported},{default:q(()=>[Q("div",{ref:"collapseItemRef",class:H(n.nsSelect.e("selected-item"))},[R(a,{closable:!1,size:n.collapseTagSize,type:n.tagType,effect:n.tagEffect,"disable-transitions":"",style:en(n.collapseTagStyle)},{default:q(()=>[Q("span",{class:H(n.nsSelect.e("tags-text"))}," + "+Ee(n.states.selected.length-n.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:q(()=>[Q("div",{ref:"tagMenuRef",class:H(n.nsSelect.e("selection"))},[(I(!0),z(it,null,Ht(n.collapseTagList,y=>(I(),z("div",{key:n.getValueKey(y),class:H(n.nsSelect.e("selected-item"))},[R(a,{class:"in-tooltip",closable:!n.selectDisabled&&!y.isDisabled,size:n.collapseTagSize,type:n.tagType,effect:n.tagEffect,"disable-transitions":"",onClose:S=>n.deleteTag(S,y)},{default:q(()=>[Q("span",{class:H(n.nsSelect.e("tags-text"))},[ve(n.$slots,"label",{label:y.currentLabel,value:y.value},()=>[ht(Ee(y.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):fe("v-if",!0)]):fe("v-if",!0),Q("div",{class:H([n.nsSelect.e("selected-item"),n.nsSelect.e("input-wrapper"),n.nsSelect.is("hidden",!n.filterable)])},[an(Q("input",{id:n.inputId,ref:"inputRef","onUpdate:modelValue":y=>n.states.inputValue=y,type:"text",name:n.name,class:H([n.nsSelect.e("input"),n.nsSelect.is(n.selectSize)]),disabled:n.selectDisabled,autocomplete:n.autocomplete,style:en(n.inputStyle),tabindex:n.tabindex,role:"combobox",readonly:!n.filterable,spellcheck:"false","aria-activedescendant":((g=n.hoverOption)==null?void 0:g.id)||"","aria-controls":n.contentId,"aria-expanded":n.dropdownMenuVisible,"aria-label":n.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[gr(Qe(y=>n.navigateOptions("next"),["stop","prevent"]),["down"]),gr(Qe(y=>n.navigateOptions("prev"),["stop","prevent"]),["up"]),gr(Qe(n.handleEsc,["stop","prevent"]),["esc"]),gr(Qe(n.selectOption,["stop","prevent"]),["enter"]),gr(Qe(n.deletePrevTag,["stop"]),["delete"])],onCompositionstart:n.handleCompositionStart,onCompositionupdate:n.handleCompositionUpdate,onCompositionend:n.handleCompositionEnd,onInput:n.onInput,onClick:Qe(n.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[I9,n.states.inputValue]]),n.filterable?(I(),z("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:H(n.nsSelect.e("input-calculator")),textContent:Ee(n.states.inputValue)},null,10,["textContent"])):fe("v-if",!0)],2),n.shouldShowPlaceholder?(I(),z("div",{key:1,class:H([n.nsSelect.e("selected-item"),n.nsSelect.e("placeholder"),n.nsSelect.is("transparent",!n.hasModelValue||n.expanded&&!n.states.inputValue)])},[n.hasModelValue?ve(n.$slots,"label",{key:0,label:n.currentPlaceholder,value:n.modelValue},()=>[Q("span",null,Ee(n.currentPlaceholder),1)]):(I(),z("span",{key:1},Ee(n.currentPlaceholder),1))],2)):fe("v-if",!0)],2),Q("div",{ref:"suffixRef",class:H(n.nsSelect.e("suffix"))},[n.iconComponent&&!n.showClose?(I(),me(l,{key:0,class:H([n.nsSelect.e("caret"),n.nsSelect.e("icon"),n.iconReverse])},{default:q(()=>[(I(),me(nn(n.iconComponent)))]),_:1},8,["class"])):fe("v-if",!0),n.showClose&&n.clearIcon?(I(),me(l,{key:1,class:H([n.nsSelect.e("caret"),n.nsSelect.e("icon"),n.nsSelect.e("clear")]),onClick:n.handleClearClick},{default:q(()=>[(I(),me(nn(n.clearIcon)))]),_:1},8,["class","onClick"])):fe("v-if",!0),n.validateState&&n.validateIcon&&n.needStatusIcon?(I(),me(l,{key:2,class:H([n.nsInput.e("icon"),n.nsInput.e("validateIcon"),n.nsInput.is("loading",n.validateState==="validating")])},{default:q(()=>[(I(),me(nn(n.validateIcon)))]),_:1},8,["class"])):fe("v-if",!0)],2)],10,["onClick"])]}),content:q(()=>[R(h,{ref:"menuRef"},{default:q(()=>[n.$slots.header?(I(),z("div",{key:0,class:H(n.nsSelect.be("dropdown","header")),onClick:Qe(()=>{},["stop"])},[ve(n.$slots,"header")],10,["onClick"])):fe("v-if",!0),an(R(f,{id:n.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":n.nsSelect.be("dropdown","wrap"),"view-class":n.nsSelect.be("dropdown","list"),class:H([n.nsSelect.is("empty",n.filteredOptionsCount===0)]),role:"listbox","aria-label":n.ariaLabel,"aria-orientation":"vertical"},{default:q(()=>[n.showNewOption?(I(),me(c,{key:0,value:n.states.inputValue,created:!0},null,8,["value"])):fe("v-if",!0),R(d,null,{default:q(()=>[ve(n.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Qn,n.states.options.size>0&&!n.loading]]),n.$slots.loading&&n.loading?(I(),z("div",{key:1,class:H(n.nsSelect.be("dropdown","loading"))},[ve(n.$slots,"loading")],2)):n.loading||n.filteredOptionsCount===0?(I(),z("div",{key:2,class:H(n.nsSelect.be("dropdown","empty"))},[ve(n.$slots,"empty",{},()=>[Q("span",null,Ee(n.emptyText),1)])],2)):fe("v-if",!0),n.$slots.footer?(I(),z("div",{key:3,class:H(n.nsSelect.be("dropdown","footer")),onClick:Qe(()=>{},["stop"])},[ve(n.$slots,"footer")],10,["onClick"])):fe("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[m,n.handleClickOutside,n.popperRef]])}var T$=mt(k$,[["render",E$],["__file","select.vue"]]);const M$=ue({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(n){const e=je("select"),t=N(null),r=yn(),o=N([]);mn($S,Hn({...qu(n)}));const s=O(()=>o.value.some(c=>c.visible===!0)),a=c=>{var d,f;return((d=c.type)==null?void 0:d.name)==="ElOption"&&!!((f=c.component)!=null&&f.proxy)},i=c=>{const d=Bo(c),f=[];return d.forEach(h=>{var m,g;a(h)?f.push(h.component.proxy):(m=h.children)!=null&&m.length?f.push(...i(h.children)):(g=h.component)!=null&&g.subTree&&f.push(...i(h.component.subTree))}),f},l=()=>{o.value=i(r.subTree)};return ln(()=>{l()}),_9(t,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:t,visible:s,ns:e}}});function I$(n,e,t,r,o,s){return an((I(),z("ul",{ref:"groupRef",class:H(n.ns.be("group","wrap"))},[Q("li",{class:H(n.ns.be("group","title"))},Ee(n.label),3),Q("li",null,[Q("ul",{class:H(n.ns.b("group"))},[ve(n.$slots,"default")],2)])],2)),[[Qn,n.visible]])}var DS=mt(M$,[["render",I$],["__file","option-group.vue"]]);const NS=kn(T$,{Option:E1,OptionGroup:DS}),LS=ro(E1);ro(DS);const T1=()=>yt(PS,{}),O$=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:we(Array),default:()=>xo([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:qf},appendSizeTo:String}),_$=ue({name:"ElPaginationSizes"}),A$=ue({..._$,props:O$,emits:["page-size-change"],setup(n,{emit:e}){const t=n,{t:r}=En(),o=je("pagination"),s=T1(),a=N(t.pageSize);Xe(()=>t.pageSizes,(c,d)=>{if(!vs(c,d)&>(c)){const f=c.includes(t.pageSize)?t.pageSize:t.pageSizes[0];e("page-size-change",f)}}),Xe(()=>t.pageSize,c=>{a.value=c});const i=O(()=>t.pageSizes);function l(c){var d;c!==a.value&&(a.value=c,(d=s.handleSizeChange)==null||d.call(s,Number(c)))}return(c,d)=>(I(),z("span",{class:H(v(o).e("sizes"))},[R(v(NS),{"model-value":a.value,disabled:c.disabled,"popper-class":c.popperClass,size:c.size,teleported:c.teleported,"validate-event":!1,"append-to":c.appendSizeTo,onChange:l},{default:q(()=>[(I(!0),z(it,null,Ht(v(i),f=>(I(),me(v(LS),{key:f,value:f,label:f+v(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var R$=mt(A$,[["__file","sizes.vue"]]);const P$=Ge({size:{type:String,values:qf}}),$$=ue({name:"ElPaginationJumper"}),D$=ue({...$$,props:P$,setup(n){const{t:e}=En(),t=je("pagination"),{pageCount:r,disabled:o,currentPage:s,changeEvent:a}=T1(),i=N(),l=O(()=>{var f;return(f=i.value)!=null?f:s==null?void 0:s.value});function c(f){i.value=f?+f:""}function d(f){f=Math.trunc(+f),a==null||a(f),i.value=void 0}return(f,h)=>(I(),z("span",{class:H(v(t).e("jump")),disabled:v(o)},[Q("span",{class:H([v(t).e("goto")])},Ee(v(e)("el.pagination.goto")),3),R(v(us),{size:f.size,class:H([v(t).e("editor"),v(t).is("in-pagination")]),min:1,max:v(r),disabled:v(o),"model-value":v(l),"validate-event":!1,"aria-label":v(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:d},null,8,["size","class","max","disabled","model-value","aria-label"]),Q("span",{class:H([v(t).e("classifier")])},Ee(v(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var N$=mt(D$,[["__file","jumper.vue"]]);const L$=Ge({total:{type:Number,default:1e3}}),B$=ue({name:"ElPaginationTotal"}),F$=ue({...B$,props:L$,setup(n){const{t:e}=En(),t=je("pagination"),{disabled:r}=T1();return(o,s)=>(I(),z("span",{class:H(v(t).e("total")),disabled:v(r)},Ee(v(e)("el.pagination.total",{total:o.total})),11,["disabled"]))}});var V$=mt(F$,[["__file","total.vue"]]);const z$=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),H$=ue({name:"ElPaginationPager"}),W$=ue({...H$,props:z$,emits:["change"],setup(n,{emit:e}){const t=n,r=je("pager"),o=je("icon"),{t:s}=En(),a=N(!1),i=N(!1),l=N(!1),c=N(!1),d=N(!1),f=N(!1),h=O(()=>{const k=t.pagerCount,C=(k-1)/2,M=Number(t.currentPage),A=Number(t.pageCount);let V=!1,P=!1;A>k&&(M>k-C&&(V=!0),M<A-C&&(P=!0));const L=[];if(V&&!P){const K=A-(k-2);for(let J=K;J<A;J++)L.push(J)}else if(!V&&P)for(let K=2;K<k;K++)L.push(K);else if(V&&P){const K=Math.floor(k/2)-1;for(let J=M-K;J<=M+K;J++)L.push(J)}else for(let K=2;K<A;K++)L.push(K);return L}),m=O(()=>["more","btn-quickprev",o.b(),r.is("disabled",t.disabled)]),g=O(()=>["more","btn-quicknext",o.b(),r.is("disabled",t.disabled)]),y=O(()=>t.disabled?-1:0);ml(()=>{const k=(t.pagerCount-1)/2;a.value=!1,i.value=!1,t.pageCount>t.pagerCount&&(t.currentPage>t.pagerCount-k&&(a.value=!0),t.currentPage<t.pageCount-k&&(i.value=!0))});function S(k=!1){t.disabled||(k?l.value=!0:c.value=!0)}function w(k=!1){k?d.value=!0:f.value=!0}function x(k){const C=k.target;if(C.tagName.toLowerCase()==="li"&&Array.from(C.classList).includes("number")){const M=Number(C.textContent);M!==t.currentPage&&e("change",M)}else C.tagName.toLowerCase()==="li"&&Array.from(C.classList).includes("more")&&T(k)}function T(k){const C=k.target;if(C.tagName.toLowerCase()==="ul"||t.disabled)return;let M=Number(C.textContent);const A=t.pageCount,V=t.currentPage,P=t.pagerCount-2;C.className.includes("more")&&(C.className.includes("quickprev")?M=V-P:C.className.includes("quicknext")&&(M=V+P)),Number.isNaN(+M)||(M<1&&(M=1),M>A&&(M=A)),M!==V&&e("change",M)}return(k,C)=>(I(),z("ul",{class:H(v(r).b()),onClick:T,onKeyup:gr(x,["enter"])},[k.pageCount>0?(I(),z("li",{key:0,class:H([[v(r).is("active",k.currentPage===1),v(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===1,"aria-label":v(s)("el.pagination.currentPage",{pager:1}),tabindex:v(y)}," 1 ",10,["aria-current","aria-label","tabindex"])):fe("v-if",!0),a.value?(I(),z("li",{key:1,class:H(v(m)),tabindex:v(y),"aria-label":v(s)("el.pagination.prevPages",{pager:k.pagerCount-2}),onMouseenter:M=>S(!0),onMouseleave:M=>l.value=!1,onFocus:M=>w(!0),onBlur:M=>d.value=!1},[(l.value||d.value)&&!k.disabled?(I(),me(v(ks),{key:0})):(I(),me(v(ob),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):fe("v-if",!0),(I(!0),z(it,null,Ht(v(h),M=>(I(),z("li",{key:M,class:H([[v(r).is("active",k.currentPage===M),v(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===M,"aria-label":v(s)("el.pagination.currentPage",{pager:M}),tabindex:v(y)},Ee(M),11,["aria-current","aria-label","tabindex"]))),128)),i.value?(I(),z("li",{key:2,class:H(v(g)),tabindex:v(y),"aria-label":v(s)("el.pagination.nextPages",{pager:k.pagerCount-2}),onMouseenter:M=>S(),onMouseleave:M=>c.value=!1,onFocus:M=>w(),onBlur:M=>f.value=!1},[(c.value||f.value)&&!k.disabled?(I(),me(v(Es),{key:0})):(I(),me(v(ob),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):fe("v-if",!0),k.pageCount>1?(I(),z("li",{key:3,class:H([[v(r).is("active",k.currentPage===k.pageCount),v(r).is("disabled",k.disabled)],"number"]),"aria-current":k.currentPage===k.pageCount,"aria-label":v(s)("el.pagination.currentPage",{pager:k.pageCount}),tabindex:v(y)},Ee(k.pageCount),11,["aria-current","aria-label","tabindex"])):fe("v-if",!0)],42,["onKeyup"]))}});var U$=mt(W$,[["__file","pager.vue"]]);const Tr=n=>typeof n!="number",j$=Ge({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:n=>Rt(n)&&Math.trunc(n)===n&&n>4&&n<22&&n%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:we(Array),default:()=>xo([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:Dn,default:()=>Iu},nextText:{type:String,default:""},nextIcon:{type:Dn,default:()=>Oa},teleported:{type:Boolean,default:!0},small:Boolean,size:La,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),K$={"update:current-page":n=>Rt(n),"update:page-size":n=>Rt(n),"size-change":n=>Rt(n),change:(n,e)=>Rt(n)&&Rt(e),"current-change":n=>Rt(n),"prev-click":n=>Rt(n),"next-click":n=>Rt(n)},o2="ElPagination";var G$=ue({name:o2,props:j$,emits:K$,setup(n,{emit:e,slots:t}){const{t:r}=En(),o=je("pagination"),s=yn().vnode.props||{},a=A9(),i=O(()=>{var C;return n.small?"small":(C=n.size)!=null?C:a.value});oi({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},O(()=>!!n.small));const l="onUpdate:currentPage"in s||"onUpdate:current-page"in s||"onCurrentChange"in s,c="onUpdate:pageSize"in s||"onUpdate:page-size"in s||"onSizeChange"in s,d=O(()=>{if(Tr(n.total)&&Tr(n.pageCount)||!Tr(n.currentPage)&&!l)return!1;if(n.layout.includes("sizes")){if(Tr(n.pageCount)){if(!Tr(n.total)&&!Tr(n.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),f=N(Tr(n.defaultPageSize)?10:n.defaultPageSize),h=N(Tr(n.defaultCurrentPage)?1:n.defaultCurrentPage),m=O({get(){return Tr(n.pageSize)?f.value:n.pageSize},set(C){Tr(n.pageSize)&&(f.value=C),c&&(e("update:page-size",C),e("size-change",C))}}),g=O(()=>{let C=0;return Tr(n.pageCount)?Tr(n.total)||(C=Math.max(1,Math.ceil(n.total/m.value))):C=n.pageCount,C}),y=O({get(){return Tr(n.currentPage)?h.value:n.currentPage},set(C){let M=C;C<1?M=1:C>g.value&&(M=g.value),Tr(n.currentPage)&&(h.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Xe(g,C=>{y.value>C&&(y.value=C)}),Xe([y,m],C=>{e("change",...C)},{flush:"post"});function S(C){y.value=C}function w(C){m.value=C;const M=g.value;y.value>M&&(y.value=M)}function x(){n.disabled||(y.value-=1,e("prev-click",y.value))}function T(){n.disabled||(y.value+=1,e("next-click",y.value))}function k(C,M){C&&(C.props||(C.props={}),C.props.class=[C.props.class,M].join(" "))}return mn(PS,{pageCount:g,disabled:O(()=>n.disabled),currentPage:y,changeEvent:S,handleSizeChange:w}),()=>{var C,M;if(!d.value)return $a(o2,r("el.pagination.deprecationWarning")),null;if(!n.layout||n.hideOnSinglePage&&g.value<=1)return null;const A=[],V=[],P=st("div",{class:o.e("rightwrapper")},V),L={prev:st(c$,{disabled:n.disabled,currentPage:y.value,prevText:n.prevText,prevIcon:n.prevIcon,onClick:x}),jumper:st(N$,{size:i.value}),pager:st(U$,{currentPage:y.value,pageCount:g.value,pagerCount:n.pagerCount,onChange:S,disabled:n.disabled}),next:st(h$,{disabled:n.disabled,currentPage:y.value,pageCount:g.value,nextText:n.nextText,nextIcon:n.nextIcon,onClick:T}),sizes:st(R$,{pageSize:m.value,pageSizes:n.pageSizes,popperClass:n.popperClass,disabled:n.disabled,teleported:n.teleported,size:i.value,appendSizeTo:n.appendSizeTo}),slot:(M=(C=t==null?void 0:t.default)==null?void 0:C.call(t))!=null?M:null,total:st(V$,{total:Tr(n.total)?0:n.total})},K=n.layout.split(",").map(G=>G.trim());let J=!1;return K.forEach(G=>{if(G==="->"){J=!0;return}J?V.push(L[G]):A.push(L[G])}),k(A[0],o.is("first")),k(A[A.length-1],o.is("last")),J&&V.length>0&&(k(V[0],o.is("first")),k(V[V.length-1],o.is("last")),A.push(P)),st("div",{class:[o.b(),o.is("background",n.background),o.m(i.value)]},A)}}});const Y$=kn(G$),q$=Ge({trigger:ev.trigger,placement:um.placement,disabled:ev.disabled,visible:Do.visible,transition:Do.transition,popperOptions:um.popperOptions,tabindex:um.tabindex,content:Do.content,popperStyle:Do.popperStyle,popperClass:Do.popperClass,enterable:{...Do.enterable,default:!0},effect:{...Do.effect,default:"light"},teleported:Do.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),J$={"update:visible":n=>Qr(n),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},X$="onUpdate:visible",Z$=ue({name:"ElPopover"}),Q$=ue({...Z$,props:q$,emits:J$,setup(n,{expose:e,emit:t}){const r=n,o=O(()=>r[X$]),s=je("popover"),a=N(),i=O(()=>{var S;return(S=v(a))==null?void 0:S.popperRef}),l=O(()=>[{width:Vr(r.width)},r.popperStyle]),c=O(()=>[s.b(),r.popperClass,{[s.m("plain")]:!!r.content}]),d=O(()=>r.transition===`${s.namespace.value}-fade-in-linear`),f=()=>{var S;(S=a.value)==null||S.hide()},h=()=>{t("before-enter")},m=()=>{t("before-leave")},g=()=>{t("after-enter")},y=()=>{t("update:visible",!1),t("after-leave")};return e({popperRef:i,hide:f}),(S,w)=>(I(),me(v(Ju),xt({ref_key:"tooltipRef",ref:a},S.$attrs,{trigger:S.trigger,placement:S.placement,disabled:S.disabled,visible:S.visible,transition:S.transition,"popper-options":S.popperOptions,tabindex:S.tabindex,content:S.content,offset:S.offset,"show-after":S.showAfter,"hide-after":S.hideAfter,"auto-close":S.autoClose,"show-arrow":S.showArrow,"aria-label":S.title,effect:S.effect,enterable:S.enterable,"popper-class":v(c),"popper-style":v(l),teleported:S.teleported,persistent:S.persistent,"gpu-acceleration":v(d),"onUpdate:visible":v(o),onBeforeShow:h,onBeforeHide:m,onShow:g,onHide:y}),{content:q(()=>[S.title?(I(),z("div",{key:0,class:H(v(s).e("title")),role:"title"},Ee(S.title),3)):fe("v-if",!0),ve(S.$slots,"default",{},()=>[ht(Ee(S.content),1)])]),default:q(()=>[S.$slots.reference?ve(S.$slots,"reference",{key:0}):fe("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var eD=mt(Q$,[["__file","popover.vue"]]);const a2=(n,e)=>{const t=e.arg||e.value,r=t==null?void 0:t.popperRef;r&&(r.triggerRef=n)};var tD={mounted(n,e){a2(n,e)},updated(n,e){a2(n,e)}};const nD="popover",rD=R9(tD,nD),oD=kn(eD,{directive:rD}),aD=Ge({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:n=>n>=0&&n<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:we(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:we([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:we(Function),default:n=>`${n}%`}}),sD=ue({name:"ElProgress"}),iD=ue({...sD,props:aD,setup(n){const e=n,t={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=je("progress"),o=O(()=>{const T={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},k=x(e.percentage);return k.includes("gradient")?T.background=k:T.backgroundColor=k,T}),s=O(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=O(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(s.value)/2}`,10):0),i=O(()=>{const T=a.value,k=e.type==="dashboard";return` |
| 6 |
M 50 50 |
| 7 |
m 0 ${k?"":"-"}${T} |
| 8 |
a ${T} ${T} 0 1 1 0 ${k?"-":""}${T*2} |
| 9 |
a ${T} ${T} 0 1 1 0 ${k?"":"-"}${T*2} |
| 10 |
`}),l=O(()=>2*Math.PI*a.value),c=O(()=>e.type==="dashboard"?.75:1),d=O(()=>`${-1*l.value*(1-c.value)/2}px`),f=O(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:d.value})),h=O(()=>({strokeDasharray:`${l.value*c.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),m=O(()=>{let T;return e.color?T=x(e.percentage):T=t[e.status]||t.default,T}),g=O(()=>e.status==="warning"?P9:e.type==="line"?e.status==="success"?k4:u1:e.status==="success"?E4:Mu),y=O(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),S=O(()=>e.format(e.percentage));function w(T){const k=100/T.length;return T.map((M,A)=>Nn(M)?{color:M,percentage:(A+1)*k}:M).sort((M,A)=>M.percentage-A.percentage)}const x=T=>{var k;const{color:C}=e;if($n(C))return C(T);if(Nn(C))return C;{const M=w(C);for(const A of M)if(A.percentage>T)return A.color;return(k=M[M.length-1])==null?void 0:k.color}};return(T,k)=>(I(),z("div",{class:H([v(r).b(),v(r).m(T.type),v(r).is(T.status),{[v(r).m("without-text")]:!T.showText,[v(r).m("text-inside")]:T.textInside}]),role:"progressbar","aria-valuenow":T.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[T.type==="line"?(I(),z("div",{key:0,class:H(v(r).b("bar"))},[Q("div",{class:H(v(r).be("bar","outer")),style:en({height:`${T.strokeWidth}px`})},[Q("div",{class:H([v(r).be("bar","inner"),{[v(r).bem("bar","inner","indeterminate")]:T.indeterminate},{[v(r).bem("bar","inner","striped")]:T.striped},{[v(r).bem("bar","inner","striped-flow")]:T.stripedFlow}]),style:en(v(o))},[(T.showText||T.$slots.default)&&T.textInside?(I(),z("div",{key:0,class:H(v(r).be("bar","innerText"))},[ve(T.$slots,"default",{percentage:T.percentage},()=>[Q("span",null,Ee(v(S)),1)])],2)):fe("v-if",!0)],6)],6)],2)):(I(),z("div",{key:1,class:H(v(r).b("circle")),style:en({height:`${T.width}px`,width:`${T.width}px`})},[(I(),z("svg",{viewBox:"0 0 100 100"},[Q("path",{class:H(v(r).be("circle","track")),d:v(i),stroke:`var(${v(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":T.strokeLinecap,"stroke-width":v(s),fill:"none",style:en(v(f))},null,14,["d","stroke","stroke-linecap","stroke-width"]),Q("path",{class:H(v(r).be("circle","path")),d:v(i),stroke:v(m),fill:"none",opacity:T.percentage?1:0,"stroke-linecap":T.strokeLinecap,"stroke-width":v(s),style:en(v(h))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(T.showText||T.$slots.default)&&!T.textInside?(I(),z("div",{key:2,class:H(v(r).e("text")),style:en({fontSize:`${v(y)}px`})},[ve(T.$slots,"default",{percentage:T.percentage},()=>[T.status?(I(),me(v(pt),{key:1},{default:q(()=>[(I(),me(nn(v(g))))]),_:1})):(I(),z("span",{key:0},Ee(v(S)),1))])],6)):fe("v-if",!0)],10,["aria-valuenow"]))}});var lD=mt(iD,[["__file","progress.vue"]]);const uD=kn(lD);var s2=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function cD(n,e){return!!(n===e||s2(n)&&s2(e))}function dD(n,e){if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++)if(!cD(n[t],e[t]))return!1;return!0}function fD(n,e){e===void 0&&(e=dD);var t=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(t&&t.lastThis===this&&e(o,t.lastArgs))return t.lastResult;var a=n.apply(this,o);return t={lastResult:a,lastArgs:o,lastThis:this},a}return r.clear=function(){t=null},r}const pD=()=>{const e=yn().proxy.$props;return O(()=>{const t=(r,o,s)=>({});return e.perfMode?$9(t):fD(t)})},i2=50,l2="itemRendered",u2="scroll",ql="forward",mv="backward",Zs="auto",BS="smart",vv="start",Ji="center",gv="end",yv="horizontal",FS="vertical",VS="rtl",bv="negative",zS="positive-ascending",HS="positive-descending",hD={[yv]:"left",[FS]:"top"},mD=20,Sv=yi({type:we([Number,Function]),required:!0}),wv=yi({type:Number}),Cv=yi({type:Number,default:2}),vD=yi({type:String,values:["ltr","rtl"],default:"ltr"}),xv=yi({type:Number,default:0}),ef=yi({type:Number,required:!0}),WS=yi({type:String,values:["horizontal","vertical"],default:FS}),US=Ge({className:{type:String,default:""},containerElement:{type:we([String,Object]),default:"div"},data:{type:we(Array),default:()=>xo([])},direction:vD,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:we([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),gD=Ge({cache:Cv,estimatedItemSize:wv,layout:WS,initScrollOffset:xv,total:ef,itemSize:Sv,...US}),kv={type:Number,default:6},jS={type:Number,default:0},KS={type:Number,default:2},ai=Ge({columnCache:Cv,columnWidth:Sv,estimatedColumnWidth:wv,estimatedRowHeight:wv,initScrollLeft:xv,initScrollTop:xv,itemKey:{type:we(Function),default:({columnIndex:n,rowIndex:e})=>`${e}:${n}`},rowCache:Cv,rowHeight:Sv,totalColumn:ef,totalRow:ef,hScrollbarSize:kv,vScrollbarSize:kv,scrollbarStartGap:jS,scrollbarEndGap:KS,role:String,...US}),GS=Ge({alwaysOn:Boolean,class:String,layout:WS,total:ef,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:kv,startGap:jS,endGap:KS,visible:Boolean}),ed=(n,e)=>n<e?ql:mv,c2=n=>n===VS;let Bi=null;function d2(n=!1){if(Bi===null||n){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Bi=HS:(e.scrollLeft=1,e.scrollLeft===0?Bi=bv:Bi=zS),document.body.removeChild(e),Bi}return Bi}function yD({move:n,size:e,bar:t},r){const o={},s=`translate${t.axis}(${n}px)`;return o[t.size]=e,o.transform=s,o.msTransform=s,o.webkitTransform=s,r==="horizontal"?o.height="100%":o.width="100%",o}const f2=ue({name:"ElVirtualScrollBar",props:GS,emits:["scroll","start-move","stop-move"],setup(n,{emit:e}){const t=O(()=>n.startGap+n.endGap),r=je("virtual-scrollbar"),o=je("scrollbar"),s=N(),a=N();let i=null,l=null;const c=Hn({isDragging:!1,traveled:0}),d=O(()=>J4[n.layout]),f=O(()=>n.clientSize-v(t)),h=O(()=>({position:"absolute",width:`${yv===n.layout?f.value:n.scrollbarSize}px`,height:`${yv===n.layout?n.scrollbarSize:f.value}px`,[hD[n.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),m=O(()=>{const M=n.ratio,A=n.clientSize;if(M>=100)return Number.POSITIVE_INFINITY;if(M>=50)return M*A/100;const V=A/3;return Math.floor(Math.min(Math.max(M*A,mD),V))}),g=O(()=>{if(!Number.isFinite(m.value))return{display:"none"};const M=`${m.value}px`;return yD({bar:d.value,size:M,move:c.traveled},n.layout)}),y=O(()=>Math.floor(n.clientSize-m.value-v(t))),S=()=>{window.addEventListener("mousemove",k),window.addEventListener("mouseup",T);const M=v(a);M&&(l=document.onselectstart,document.onselectstart=()=>!1,M.addEventListener("touchmove",k,{passive:!0}),M.addEventListener("touchend",T))},w=()=>{window.removeEventListener("mousemove",k),window.removeEventListener("mouseup",T),document.onselectstart=l,l=null;const M=v(a);M&&(M.removeEventListener("touchmove",k),M.removeEventListener("touchend",T))},x=M=>{M.stopImmediatePropagation(),!(M.ctrlKey||[1,2].includes(M.button))&&(c.isDragging=!0,c[d.value.axis]=M.currentTarget[d.value.offset]-(M[d.value.client]-M.currentTarget.getBoundingClientRect()[d.value.direction]),e("start-move"),S())},T=()=>{c.isDragging=!1,c[d.value.axis]=0,e("stop-move"),w()},k=M=>{const{isDragging:A}=c;if(!A||!a.value||!s.value)return;const V=c[d.value.axis];if(!V)return;Y4(i);const P=(s.value.getBoundingClientRect()[d.value.direction]-M[d.value.client])*-1,L=a.value[d.value.offset]-V,K=P-L;i=G4(()=>{c.traveled=Math.max(n.startGap,Math.min(K,y.value)),e("scroll",K,y.value)})},C=M=>{const A=Math.abs(M.target.getBoundingClientRect()[d.value.direction]-M[d.value.client]),V=a.value[d.value.offset]/2,P=A-V;c.traveled=Math.max(0,Math.min(P,y.value)),e("scroll",P,y.value)};return Xe(()=>n.scrollFrom,M=>{c.isDragging||(c.traveled=Math.ceil(M*y.value))}),no(()=>{w()}),()=>st("div",{role:"presentation",ref:s,class:[r.b(),n.class,(n.alwaysOn||c.isDragging)&&"always-on"],style:h.value,onMousedown:Qe(C,["stop","prevent"]),onTouchstartPrevent:x},st("div",{ref:a,class:o.e("thumb"),style:g.value,onMousedown:x},[]))}}),bD=Ge({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:we([Number,Object])}}),SD=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),wD=ue({name:"ElSkeletonItem"}),CD=ue({...wD,props:SD,setup(n){const e=je("skeleton");return(t,r)=>(I(),z("div",{class:H([v(e).e("item"),v(e).e(t.variant)])},[t.variant==="image"?(I(),me(v(D9),{key:0})):fe("v-if",!0)],2))}});var tf=mt(CD,[["__file","skeleton-item.vue"]]);const xD=(n,e=0)=>{if(e===0)return n;const t=Fr(e)&&!!e.initVal,r=N(t);let o=null;const s=i=>{if(So(i)){r.value=n.value;return}o&&clearTimeout(o),o=setTimeout(()=>{r.value=n.value},i)},a=i=>{i==="leading"?Rt(e)?s(e):s(e.leading):Fr(e)?s(e.trailing):r.value=!1};return ln(()=>a("leading")),Xe(()=>n.value,i=>{a(i?"leading":"trailing")}),r},kD=ue({name:"ElSkeleton"}),ED=ue({...kD,props:bD,setup(n,{expose:e}){const t=n,r=je("skeleton"),o=xD(Kn(t,"loading"),t.throttle);return e({uiLoading:o}),(s,a)=>v(o)?(I(),z("div",xt({key:0,class:[v(r).b(),v(r).is("animated",s.animated)]},s.$attrs),[(I(!0),z(it,null,Ht(s.count,i=>(I(),z(it,{key:i},[v(o)?ve(s.$slots,"template",{key:i},()=>[R(tf,{class:H(v(r).is("first")),variant:"p"},null,8,["class"]),(I(!0),z(it,null,Ht(s.rows,l=>(I(),me(tf,{key:l,class:H([v(r).e("paragraph"),v(r).is("last",l===s.rows&&s.rows>1)]),variant:"p"},null,8,["class"]))),128))]):fe("v-if",!0)],64))),128))],16)):ve(s.$slots,"default",qd(xt({key:1},s.$attrs)))}});var TD=mt(ED,[["__file","skeleton.vue"]]);const MD=kn(TD,{SkeletonItem:tf}),ID=ro(tf),OD=n=>["",...qf].includes(n),_D=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:OD},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Dn},activeActionIcon:{type:Dn},activeIcon:{type:Dn},inactiveIcon:{type:Dn},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:we(Function)},id:String,tabindex:{type:[String,Number]},...gi(["ariaLabel"])}),AD={[Pn]:n=>Qr(n)||Nn(n)||Rt(n),[xs]:n=>Qr(n)||Nn(n)||Rt(n),[nv]:n=>Qr(n)||Nn(n)||Rt(n)},YS="ElSwitch",RD=ue({name:YS}),PD=ue({...RD,props:_D,emits:AD,setup(n,{expose:e,emit:t}){const r=n,{formItem:o}=Os(),s=Cs(),a=je("switch"),{inputId:i}=Yu(r,{formItemContext:o}),l=Da(O(()=>r.loading)),c=N(r.modelValue!==!1),d=N(),f=N(),h=O(()=>[a.b(),a.m(s.value),a.is("disabled",l.value),a.is("checked",w.value)]),m=O(()=>[a.e("label"),a.em("label","left"),a.is("active",!w.value)]),g=O(()=>[a.e("label"),a.em("label","right"),a.is("active",w.value)]),y=O(()=>({width:Vr(r.width)}));Xe(()=>r.modelValue,()=>{c.value=!0});const S=O(()=>c.value?r.modelValue:!1),w=O(()=>S.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(S.value)||(t(Pn,r.inactiveValue),t(xs,r.inactiveValue),t(nv,r.inactiveValue)),Xe(w,C=>{var M;d.value.checked=C,r.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(A=>$a()))});const x=()=>{const C=w.value?r.inactiveValue:r.activeValue;t(Pn,C),t(xs,C),t(nv,C),Dt(()=>{d.value.checked=w.value})},T=()=>{if(l.value)return;const{beforeChange:C}=r;if(!C){x();return}const M=C();[ab(M),Qr(M)].includes(!0)||to(YS,"beforeChange must return type `Promise<boolean>` or `boolean`"),ab(M)?M.then(V=>{V&&x()}).catch(V=>{}):M&&x()},k=()=>{var C,M;(M=(C=d.value)==null?void 0:C.focus)==null||M.call(C)};return ln(()=>{d.value.checked=w.value}),e({focus:k,checked:w}),(C,M)=>(I(),z("div",{class:H(v(h)),onClick:Qe(T,["prevent"])},[Q("input",{id:v(i),ref_key:"input",ref:d,class:H(v(a).e("input")),type:"checkbox",role:"switch","aria-checked":v(w),"aria-disabled":v(l),"aria-label":C.ariaLabel,name:C.name,"true-value":C.activeValue,"false-value":C.inactiveValue,disabled:v(l),tabindex:C.tabindex,onChange:x,onKeydown:gr(T,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!C.inlinePrompt&&(C.inactiveIcon||C.inactiveText)?(I(),z("span",{key:0,class:H(v(m))},[C.inactiveIcon?(I(),me(v(pt),{key:0},{default:q(()=>[(I(),me(nn(C.inactiveIcon)))]),_:1})):fe("v-if",!0),!C.inactiveIcon&&C.inactiveText?(I(),z("span",{key:1,"aria-hidden":v(w)},Ee(C.inactiveText),9,["aria-hidden"])):fe("v-if",!0)],2)):fe("v-if",!0),Q("span",{ref_key:"core",ref:f,class:H(v(a).e("core")),style:en(v(y))},[C.inlinePrompt?(I(),z("div",{key:0,class:H(v(a).e("inner"))},[C.activeIcon||C.inactiveIcon?(I(),me(v(pt),{key:0,class:H(v(a).is("icon"))},{default:q(()=>[(I(),me(nn(v(w)?C.activeIcon:C.inactiveIcon)))]),_:1},8,["class"])):C.activeText||C.inactiveText?(I(),z("span",{key:1,class:H(v(a).is("text")),"aria-hidden":!v(w)},Ee(v(w)?C.activeText:C.inactiveText),11,["aria-hidden"])):fe("v-if",!0)],2)):fe("v-if",!0),Q("div",{class:H(v(a).e("action"))},[C.loading?(I(),me(v(pt),{key:0,class:H(v(a).is("loading"))},{default:q(()=>[R(v(g4))]),_:1},8,["class"])):v(w)?ve(C.$slots,"active-action",{key:1},()=>[C.activeActionIcon?(I(),me(v(pt),{key:0},{default:q(()=>[(I(),me(nn(C.activeActionIcon)))]),_:1})):fe("v-if",!0)]):v(w)?fe("v-if",!0):ve(C.$slots,"inactive-action",{key:2},()=>[C.inactiveActionIcon?(I(),me(v(pt),{key:0},{default:q(()=>[(I(),me(nn(C.inactiveActionIcon)))]),_:1})):fe("v-if",!0)])],2)],6),!C.inlinePrompt&&(C.activeIcon||C.activeText)?(I(),z("span",{key:1,class:H(v(g))},[C.activeIcon?(I(),me(v(pt),{key:0},{default:q(()=>[(I(),me(nn(C.activeIcon)))]),_:1})):fe("v-if",!0),!C.activeIcon&&C.activeText?(I(),z("span",{key:1,"aria-hidden":!v(w)},Ee(C.activeText),9,["aria-hidden"])):fe("v-if",!0)],2)):fe("v-if",!0)],10,["onClick"]))}});var $D=mt(PD,[["__file","switch.vue"]]);const DD=kn($D);var $u=(n=>(n.ASC="asc",n.DESC="desc",n))($u||{}),Du=(n=>(n.CENTER="center",n.RIGHT="right",n))(Du||{}),qS=(n=>(n.LEFT="left",n.RIGHT="right",n))(qS||{});const Ev={asc:"desc",desc:"asc"},Nu=Symbol("placeholder"),ND=(n,e,t)=>{var r;const o={flexGrow:0,flexShrink:0,...t?{}:{flexGrow:n.flexGrow||0,flexShrink:n.flexShrink||1}};t||(o.flexShrink=1);const s={...(r=n.style)!=null?r:{},...o,flexBasis:"auto",width:n.width};return e||(n.maxWidth&&(s.maxWidth=n.maxWidth),n.minWidth&&(s.minWidth=n.minWidth)),s};function LD(n,e,t){const r=O(()=>v(e).map((S,w)=>{var x,T;return{...S,key:(T=(x=S.key)!=null?x:S.dataKey)!=null?T:w}})),o=O(()=>v(r).filter(S=>!S.hidden)),s=O(()=>v(o).filter(S=>S.fixed==="left"||S.fixed===!0)),a=O(()=>v(o).filter(S=>S.fixed==="right")),i=O(()=>v(o).filter(S=>!S.fixed)),l=O(()=>{const S=[];return v(s).forEach(w=>{S.push({...w,placeholderSign:Nu})}),v(i).forEach(w=>{S.push(w)}),v(a).forEach(w=>{S.push({...w,placeholderSign:Nu})}),S}),c=O(()=>v(s).length||v(a).length),d=O(()=>v(r).reduce((S,w)=>(S[w.key]=ND(w,v(t),n.fixed),S),{})),f=O(()=>v(o).reduce((S,w)=>S+w.width,0)),h=S=>v(r).find(w=>w.key===S),m=S=>v(d)[S],g=(S,w)=>{S.width=w};function y(S){var w;const{key:x}=S.currentTarget.dataset;if(!x)return;const{sortState:T,sortBy:k}=n;let C=$u.ASC;Fr(T)?C=Ev[T[x]]:C=Ev[k.order],(w=n.onColumnSort)==null||w.call(n,{column:h(x),key:x,order:C})}return{columns:r,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:s,fixedColumnsOnRight:a,hasFixedColumns:c,mainColumns:l,normalColumns:i,visibleColumns:o,getColumn:h,getColumnStyle:m,updateColumnWidth:g,onColumnSorted:y}}const BD=(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,onMaybeEndReached:o})=>{const s=N({scrollLeft:0,scrollTop:0});function a(m){var g,y,S;const{scrollTop:w}=m;(g=e.value)==null||g.scrollTo(m),(y=t.value)==null||y.scrollToTop(w),(S=r.value)==null||S.scrollToTop(w)}function i(m){s.value=m,a(m)}function l(m){s.value.scrollTop=m,a(v(s))}function c(m){var g,y;s.value.scrollLeft=m,(y=(g=e.value)==null?void 0:g.scrollTo)==null||y.call(g,v(s))}function d(m){var g;i(m),(g=n.onScroll)==null||g.call(n,m)}function f({scrollTop:m}){const{scrollTop:g}=v(s);m!==g&&l(m)}function h(m,g="auto"){var y;(y=e.value)==null||y.scrollToRow(m,g)}return Xe(()=>v(s).scrollTop,(m,g)=>{m>g&&o()}),{scrollPos:s,scrollTo:i,scrollToLeft:c,scrollToTop:l,scrollToRow:h,onScroll:d,onVerticalScroll:f}},FD=(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,tableInstance:o,ns:s,isScrolling:a})=>{const i=yn(),{emit:l}=i,c=vr(!1),d=N(n.defaultExpandedRowKeys||[]),f=N(-1),h=vr(null),m=N({}),g=N({}),y=vr({}),S=vr({}),w=vr({}),x=O(()=>Rt(n.estimatedRowHeight));function T(L){var K;(K=n.onRowsRendered)==null||K.call(n,L),L.rowCacheEnd>v(f)&&(f.value=L.rowCacheEnd)}function k({hovered:L,rowKey:K}){if(a.value)return;o.vnode.el.querySelectorAll(`[rowkey="${String(K)}"]`).forEach(ne=>{L?ne.classList.add(s.is("hovered")):ne.classList.remove(s.is("hovered"))})}function C({expanded:L,rowData:K,rowIndex:J,rowKey:G}){var ne,W;const D=[...v(d)],U=D.indexOf(G);L?U===-1&&D.push(G):U>-1&&D.splice(U,1),d.value=D,l("update:expandedRowKeys",D),(ne=n.onRowExpand)==null||ne.call(n,{expanded:L,rowData:K,rowIndex:J,rowKey:G}),(W=n.onExpandedRowsChange)==null||W.call(n,D)}const M=m1(()=>{var L,K,J,G;c.value=!0,m.value={...v(m),...v(g)},A(v(h),!1),g.value={},h.value=null,(L=e.value)==null||L.forceUpdate(),(K=t.value)==null||K.forceUpdate(),(J=r.value)==null||J.forceUpdate(),(G=i.proxy)==null||G.$forceUpdate(),c.value=!1},0);function A(L,K=!1){v(x)&&[e,t,r].forEach(J=>{const G=v(J);G&&G.resetAfterRowIndex(L,K)})}function V(L,K,J){const G=v(h);(G===null||G>J)&&(h.value=J),g.value[L]=K}function P({rowKey:L,height:K,rowIndex:J},G){G?G===qS.RIGHT?w.value[L]=K:y.value[L]=K:S.value[L]=K;const ne=Math.max(...[y,w,S].map(W=>W.value[L]||0));v(m)[L]!==ne&&(V(L,ne,J),M())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:x,isResetting:c,rowHeights:m,resetAfterIndex:A,onRowExpanded:C,onRowHovered:k,onRowsRendered:T,onRowHeightChange:P}},VD=(n,{expandedRowKeys:e,lastRenderedRowIndex:t,resetAfterIndex:r})=>{const o=N({}),s=O(()=>{const i={},{data:l,rowKey:c}=n,d=v(e);if(!d||!d.length)return l;const f=[],h=new Set;d.forEach(g=>h.add(g));let m=l.slice();for(m.forEach(g=>i[g[c]]=0);m.length>0;){const g=m.shift();f.push(g),h.has(g[c])&>(g.children)&&g.children.length>0&&(m=[...g.children,...m],g.children.forEach(y=>i[y[c]]=i[g[c]]+1))}return o.value=i,f}),a=O(()=>{const{data:i,expandColumnKey:l}=n;return l?v(s):i});return Xe(a,(i,l)=>{i!==l&&(t.value=-1,r(0,!0))}),{data:a,depthMap:o}},zD=(n,e)=>n+e,Rd=n=>gt(n)?n.reduce(zD,0):n,fi=(n,e,t={})=>$n(n)?n(e):n??t,ds=n=>(["width","maxWidth","minWidth","height"].forEach(e=>{n[e]=Vr(n[e])}),n),JS=n=>Co(n)?e=>st(n,e):n,HD=(n,{columnsTotalWidth:e,rowsHeight:t,fixedColumnsOnLeft:r,fixedColumnsOnRight:o})=>{const s=O(()=>{const{fixed:x,width:T,vScrollbarSize:k}=n,C=T-k;return x?Math.max(Math.round(v(e)),C):C}),a=O(()=>v(s)+n.vScrollbarSize),i=O(()=>{const{height:x=0,maxHeight:T=0,footerHeight:k,hScrollbarSize:C}=n;if(T>0){const M=v(m),A=v(t),P=v(h)+M+A+C;return Math.min(P,T-k)}return x-k}),l=O(()=>{const{maxHeight:x}=n,T=v(i);if(Rt(x)&&x>0)return T;const k=v(t)+v(h)+v(m);return Math.min(T,k)}),c=x=>x.width,d=O(()=>Rd(v(r).map(c))),f=O(()=>Rd(v(o).map(c))),h=O(()=>Rd(n.headerHeight)),m=O(()=>{var x;return(((x=n.fixedData)==null?void 0:x.length)||0)*n.rowHeight}),g=O(()=>v(i)-v(h)-v(m)),y=O(()=>{const{style:x={},height:T,width:k}=n;return ds({...x,height:T,width:k})}),S=O(()=>ds({height:n.footerHeight})),w=O(()=>({top:Vr(v(h)),bottom:Vr(n.footerHeight),width:Vr(n.width)}));return{bodyWidth:s,fixedTableHeight:l,mainTableHeight:i,leftTableWidth:d,rightTableWidth:f,headerWidth:a,windowHeight:g,footerHeight:S,emptyStyle:w,rootStyle:y,headerHeight:h}};function WD(n){const e=N(),t=N(),r=N(),{columns:o,columnsStyles:s,columnsTotalWidth:a,fixedColumnsOnLeft:i,fixedColumnsOnRight:l,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=LD(n,Kn(n,"columns"),Kn(n,"fixed")),{scrollTo:h,scrollToLeft:m,scrollToTop:g,scrollToRow:y,onScroll:S,onVerticalScroll:w,scrollPos:x}=BD(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,onMaybeEndReached:ze}),T=je("table-v2"),k=yn(),C=vr(!1),{expandedRowKeys:M,lastRenderedRowIndex:A,isDynamic:V,isResetting:P,rowHeights:L,resetAfterIndex:K,onRowExpanded:J,onRowHeightChange:G,onRowHovered:ne,onRowsRendered:W}=FD(n,{mainTableRef:e,leftTableRef:t,rightTableRef:r,tableInstance:k,ns:T,isScrolling:C}),{data:D,depthMap:U}=VD(n,{expandedRowKeys:M,lastRenderedRowIndex:A,resetAfterIndex:K}),te=O(()=>{const{estimatedRowHeight:Pe,rowHeight:nt}=n,Ot=v(D);return Rt(Pe)?Object.values(v(L)).reduce((_e,He)=>_e+He,0):Ot.length*nt}),{bodyWidth:j,fixedTableHeight:ee,mainTableHeight:X,leftTableWidth:ce,rightTableWidth:ae,headerWidth:ye,windowHeight:ke,footerHeight:Be,emptyStyle:le,rootStyle:xe,headerHeight:Me}=HD(n,{columnsTotalWidth:a,fixedColumnsOnLeft:i,fixedColumnsOnRight:l,rowsHeight:te}),De=N(),Ze=O(()=>{const Pe=v(D).length===0;return gt(n.fixedData)?n.fixedData.length===0&&Pe:Pe});function lt(Pe){const{estimatedRowHeight:nt,rowHeight:Ot,rowKey:_e}=n;return nt?v(L)[v(D)[Pe][_e]]||nt:Ot}function ze(){const{onEndReached:Pe}=n;if(!Pe)return;const{scrollTop:nt}=v(x),Ot=v(te),_e=v(ke),He=Ot-(nt+_e)+n.hScrollbarSize;v(A)>=0&&Ot===nt+v(X)-v(Me)&&Pe(He)}return Xe(()=>n.expandedRowKeys,Pe=>M.value=Pe,{deep:!0}),{columns:o,containerRef:De,mainTableRef:e,leftTableRef:t,rightTableRef:r,isDynamic:V,isResetting:P,isScrolling:C,hasFixedColumns:c,columnsStyles:s,columnsTotalWidth:a,data:D,expandedRowKeys:M,depthMap:U,fixedColumnsOnLeft:i,fixedColumnsOnRight:l,mainColumns:d,bodyWidth:j,emptyStyle:le,rootStyle:xe,headerWidth:ye,footerHeight:Be,mainTableHeight:X,fixedTableHeight:ee,leftTableWidth:ce,rightTableWidth:ae,showEmpty:Ze,getRowHeight:lt,onColumnSorted:f,onRowHovered:ne,onRowExpanded:J,onRowsRendered:W,onRowHeightChange:G,scrollTo:h,scrollToLeft:m,scrollToTop:g,scrollToRow:y,onScroll:S,onVerticalScroll:w}}const M1=Symbol("tableV2"),XS=String,Zu={type:we(Array),required:!0},I1={type:we(Array)},ZS={...I1,required:!0},UD=String,p2={type:we(Array),default:()=>xo([])},Ys={type:Number,required:!0},QS={type:we([String,Number,Symbol]),default:"id"},h2={type:we(Object)},Qs=Ge({class:String,columns:Zu,columnsStyles:{type:we(Object),required:!0},depth:Number,expandColumnKey:UD,estimatedRowHeight:{...ai.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:we(Function)},onRowHover:{type:we(Function)},onRowHeightChange:{type:we(Function)},rowData:{type:we(Object),required:!0},rowEventHandlers:{type:we(Object)},rowIndex:{type:Number,required:!0},rowKey:QS,style:{type:we(Object)}}),pm={type:Number,required:!0},O1=Ge({class:String,columns:Zu,fixedHeaderData:{type:we(Array)},headerData:{type:we(Array),required:!0},headerHeight:{type:we([Number,Array]),default:50},rowWidth:pm,rowHeight:{type:Number,default:50},height:pm,width:pm}),Pd=Ge({columns:Zu,data:ZS,fixedData:I1,estimatedRowHeight:Qs.estimatedRowHeight,width:Ys,height:Ys,headerWidth:Ys,headerHeight:O1.headerHeight,bodyWidth:Ys,rowHeight:Ys,cache:gD.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:ai.scrollbarAlwaysOn,scrollbarStartGap:ai.scrollbarStartGap,scrollbarEndGap:ai.scrollbarEndGap,class:XS,style:h2,containerStyle:h2,getRowHeight:{type:we(Function),required:!0},rowKey:Qs.rowKey,onRowsRendered:{type:we(Function)},onScroll:{type:we(Function)}}),jD=Ge({cache:Pd.cache,estimatedRowHeight:Qs.estimatedRowHeight,rowKey:QS,headerClass:{type:we([String,Function])},headerProps:{type:we([Object,Function])},headerCellProps:{type:we([Object,Function])},headerHeight:O1.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:we([String,Function])},rowProps:{type:we([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:we([Object,Function])},columns:Zu,data:ZS,dataGetter:{type:we(Function)},fixedData:I1,expandColumnKey:Qs.expandColumnKey,expandedRowKeys:p2,defaultExpandedRowKeys:p2,class:XS,fixed:Boolean,style:{type:we(Object)},width:Ys,height:Ys,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:ai.hScrollbarSize,vScrollbarSize:ai.vScrollbarSize,scrollbarAlwaysOn:GS.alwaysOn,sortBy:{type:we(Object),default:()=>({})},sortState:{type:we(Object),default:void 0},onColumnSort:{type:we(Function)},onExpandedRowsChange:{type:we(Function)},onEndReached:{type:we(Function)},onRowExpand:Qs.onRowExpand,onScroll:Pd.onScroll,onRowsRendered:Pd.onRowsRendered,rowEventHandlers:Qs.rowEventHandlers}),KD="ElTableV2Header",GD=ue({name:KD,props:O1,setup(n,{slots:e,expose:t}){const r=je("table-v2"),o=yt("tableV2GridScrollLeft"),s=N(),a=O(()=>ds({width:n.width,height:n.height})),i=O(()=>ds({width:n.rowWidth,height:n.height})),l=O(()=>Bo(v(n.headerHeight))),c=h=>{const m=v(s);Dt(()=>{m!=null&&m.scroll&&m.scroll({left:h})})},d=()=>{const h=r.e("fixed-header-row"),{columns:m,fixedHeaderData:g,rowHeight:y}=n;return g==null?void 0:g.map((S,w)=>{var x;const T=ds({height:y,width:"100%"});return(x=e.fixed)==null?void 0:x.call(e,{class:h,columns:m,rowData:S,rowIndex:-(w+1),style:T})})},f=()=>{const h=r.e("dynamic-header-row"),{columns:m}=n;return v(l).map((g,y)=>{var S;const w=ds({width:"100%",height:g});return(S=e.dynamic)==null?void 0:S.call(e,{class:h,columns:m,headerIndex:y,style:w})})};return l1(()=>{o!=null&&o.value&&c(o.value)}),t({scrollToLeft:c}),()=>{if(!(n.height<=0))return R("div",{ref:s,class:n.class,style:v(a),role:"rowgroup"},[R("div",{style:v(i),class:r.e("header")},[f(),d()])])}}});var YD=GD;const qD=({atXEndEdge:n,atXStartEdge:e,atYEndEdge:t,atYStartEdge:r},o)=>{let s=null,a=0,i=0;const l=(d,f)=>{const h=d<=0&&e.value||d>=0&&n.value,m=f<=0&&r.value||f>=0&&t.value;return h&&m};return{hasReachedEdge:l,onWheel:d=>{Y4(s);let f=d.deltaX,h=d.deltaY;Math.abs(f)>Math.abs(h)?h=0:f=0,d.shiftKey&&h!==0&&(f=h,h=0),!(l(a,i)&&l(a+f,i+h))&&(a+=f,i+=h,d.preventDefault(),s=G4(()=>{o(a,i),a=0,i=0}))}}},e5=({name:n,clearCache:e,getColumnPosition:t,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:o,getEstimatedTotalHeight:s,getEstimatedTotalWidth:a,getColumnOffset:i,getRowOffset:l,getRowPosition:c,getRowStartIndexForOffset:d,getRowStopIndexForStartIndex:f,initCache:h,injectToInstance:m,validateProps:g})=>ue({name:n??"ElVirtualList",props:ai,emits:[l2,u2],setup(y,{emit:S,expose:w,slots:x}){const T=je("vl");g(y);const k=yn(),C=N(h(y,k));m==null||m(k,C);const M=N(),A=N(),V=N(),P=N(null),L=N({isScrolling:!1,scrollLeft:Rt(y.initScrollLeft)?y.initScrollLeft:0,scrollTop:Rt(y.initScrollTop)?y.initScrollTop:0,updateRequested:!1,xAxisScrollDir:ql,yAxisScrollDir:ql}),K=pD(),J=O(()=>Number.parseInt(`${y.height}`,10)),G=O(()=>Number.parseInt(`${y.width}`,10)),ne=O(()=>{const{totalColumn:_e,totalRow:He,columnCache:Fe}=y,{isScrolling:Ye,xAxisScrollDir:qe,scrollLeft:dt}=v(L);if(_e===0||He===0)return[0,0,0,0];const vt=r(y,dt,v(C)),bt=o(y,vt,dt,v(C)),kt=!Ye||qe===mv?Math.max(1,Fe):1,Lt=!Ye||qe===ql?Math.max(1,Fe):1;return[Math.max(0,vt-kt),Math.max(0,Math.min(_e-1,bt+Lt)),vt,bt]}),W=O(()=>{const{totalColumn:_e,totalRow:He,rowCache:Fe}=y,{isScrolling:Ye,yAxisScrollDir:qe,scrollTop:dt}=v(L);if(_e===0||He===0)return[0,0,0,0];const vt=d(y,dt,v(C)),bt=f(y,vt,dt,v(C)),kt=!Ye||qe===mv?Math.max(1,Fe):1,Lt=!Ye||qe===ql?Math.max(1,Fe):1;return[Math.max(0,vt-kt),Math.max(0,Math.min(He-1,bt+Lt)),vt,bt]}),D=O(()=>s(y,v(C))),U=O(()=>a(y,v(C))),te=O(()=>{var _e;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:y.direction,height:Rt(y.height)?`${y.height}px`:y.height,width:Rt(y.width)?`${y.width}px`:y.width},(_e=y.style)!=null?_e:{}]}),j=O(()=>{const _e=`${v(U)}px`;return{height:`${v(D)}px`,pointerEvents:v(L).isScrolling?"none":void 0,width:_e}}),ee=()=>{const{totalColumn:_e,totalRow:He}=y;if(_e>0&&He>0){const[bt,kt,Lt,Yt]=v(ne),[Pt,pe,F,re]=v(W);S(l2,{columnCacheStart:bt,columnCacheEnd:kt,rowCacheStart:Pt,rowCacheEnd:pe,columnVisibleStart:Lt,columnVisibleEnd:Yt,rowVisibleStart:F,rowVisibleEnd:re})}const{scrollLeft:Fe,scrollTop:Ye,updateRequested:qe,xAxisScrollDir:dt,yAxisScrollDir:vt}=v(L);S(u2,{xAxisScrollDir:dt,scrollLeft:Fe,yAxisScrollDir:vt,scrollTop:Ye,updateRequested:qe})},X=_e=>{const{clientHeight:He,clientWidth:Fe,scrollHeight:Ye,scrollLeft:qe,scrollTop:dt,scrollWidth:vt}=_e.currentTarget,bt=v(L);if(bt.scrollTop===dt&&bt.scrollLeft===qe)return;let kt=qe;if(c2(y.direction))switch(d2()){case bv:kt=-qe;break;case HS:kt=vt-Fe-qe;break}L.value={...bt,isScrolling:!0,scrollLeft:kt,scrollTop:Math.max(0,Math.min(dt,Ye-He)),updateRequested:!0,xAxisScrollDir:ed(bt.scrollLeft,kt),yAxisScrollDir:ed(bt.scrollTop,dt)},Dt(()=>xe()),Me(),ee()},ce=(_e,He)=>{const Fe=v(J),Ye=(D.value-Fe)/He*_e;ke({scrollTop:Math.min(D.value-Fe,Ye)})},ae=(_e,He)=>{const Fe=v(G),Ye=(U.value-Fe)/He*_e;ke({scrollLeft:Math.min(U.value-Fe,Ye)})},{onWheel:ye}=qD({atXStartEdge:O(()=>L.value.scrollLeft<=0),atXEndEdge:O(()=>L.value.scrollLeft>=U.value-v(G)),atYStartEdge:O(()=>L.value.scrollTop<=0),atYEndEdge:O(()=>L.value.scrollTop>=D.value-v(J))},(_e,He)=>{var Fe,Ye,qe,dt;(Ye=(Fe=A.value)==null?void 0:Fe.onMouseUp)==null||Ye.call(Fe),(dt=(qe=V.value)==null?void 0:qe.onMouseUp)==null||dt.call(qe);const vt=v(G),bt=v(J);ke({scrollLeft:Math.min(L.value.scrollLeft+_e,U.value-vt),scrollTop:Math.min(L.value.scrollTop+He,D.value-bt)})});ku(M,"wheel",ye,{passive:!1});const ke=({scrollLeft:_e=L.value.scrollLeft,scrollTop:He=L.value.scrollTop})=>{_e=Math.max(_e,0),He=Math.max(He,0);const Fe=v(L);He===Fe.scrollTop&&_e===Fe.scrollLeft||(L.value={...Fe,xAxisScrollDir:ed(Fe.scrollLeft,_e),yAxisScrollDir:ed(Fe.scrollTop,He),scrollLeft:_e,scrollTop:He,updateRequested:!0},Dt(()=>xe()),Me(),ee())},Be=(_e=0,He=0,Fe=Zs)=>{const Ye=v(L);He=Math.max(0,Math.min(He,y.totalColumn-1)),_e=Math.max(0,Math.min(_e,y.totalRow-1));const qe=q4(T.namespace.value),dt=v(C),vt=s(y,dt),bt=a(y,dt);ke({scrollLeft:i(y,He,Fe,Ye.scrollLeft,dt,bt>y.width?qe:0),scrollTop:l(y,_e,Fe,Ye.scrollTop,dt,vt>y.height?qe:0)})},le=(_e,He)=>{const{columnWidth:Fe,direction:Ye,rowHeight:qe}=y,dt=K.value(e&&Fe,e&&qe,e&&Ye),vt=`${_e},${He}`;if(N9(dt,vt))return dt[vt];{const[,bt]=t(y,He,v(C)),kt=v(C),Lt=c2(Ye),[Yt,Pt]=c(y,_e,kt),[pe]=t(y,He,kt);return dt[vt]={position:"absolute",left:Lt?void 0:`${bt}px`,right:Lt?`${bt}px`:void 0,top:`${Pt}px`,height:`${Yt}px`,width:`${pe}px`},dt[vt]}},xe=()=>{L.value.isScrolling=!1,Dt(()=>{K.value(-1,null,null)})};ln(()=>{if(!Mo)return;const{initScrollLeft:_e,initScrollTop:He}=y,Fe=v(M);Fe&&(Rt(_e)&&(Fe.scrollLeft=_e),Rt(He)&&(Fe.scrollTop=He)),ee()});const Me=()=>{const{direction:_e}=y,{scrollLeft:He,scrollTop:Fe,updateRequested:Ye}=v(L),qe=v(M);if(Ye&&qe){if(_e===VS)switch(d2()){case bv:{qe.scrollLeft=-He;break}case zS:{qe.scrollLeft=He;break}default:{const{clientWidth:dt,scrollWidth:vt}=qe;qe.scrollLeft=vt-dt-He;break}}else qe.scrollLeft=Math.max(0,He);qe.scrollTop=Math.max(0,Fe)}},{resetAfterColumnIndex:De,resetAfterRowIndex:Ze,resetAfter:lt}=k.proxy;w({windowRef:M,innerRef:P,getItemStyleCache:K,scrollTo:ke,scrollToItem:Be,states:L,resetAfterColumnIndex:De,resetAfterRowIndex:Ze,resetAfter:lt});const ze=()=>{const{scrollbarAlwaysOn:_e,scrollbarStartGap:He,scrollbarEndGap:Fe,totalColumn:Ye,totalRow:qe}=y,dt=v(G),vt=v(J),bt=v(U),kt=v(D),{scrollLeft:Lt,scrollTop:Yt}=v(L),Pt=st(f2,{ref:A,alwaysOn:_e,startGap:He,endGap:Fe,class:T.e("horizontal"),clientSize:dt,layout:"horizontal",onScroll:ae,ratio:dt*100/bt,scrollFrom:Lt/(bt-dt),total:qe,visible:!0}),pe=st(f2,{ref:V,alwaysOn:_e,startGap:He,endGap:Fe,class:T.e("vertical"),clientSize:vt,layout:"vertical",onScroll:ce,ratio:vt*100/kt,scrollFrom:Yt/(kt-vt),total:Ye,visible:!0});return{horizontalScrollbar:Pt,verticalScrollbar:pe}},Pe=()=>{var _e;const[He,Fe]=v(ne),[Ye,qe]=v(W),{data:dt,totalColumn:vt,totalRow:bt,useIsScrolling:kt,itemKey:Lt}=y,Yt=[];if(bt>0&&vt>0)for(let Pt=Ye;Pt<=qe;Pt++)for(let pe=He;pe<=Fe;pe++){const F=Lt({columnIndex:pe,data:dt,rowIndex:Pt});Yt.push(st(it,{key:F},(_e=x.default)==null?void 0:_e.call(x,{columnIndex:pe,data:dt,isScrolling:kt?v(L).isScrolling:void 0,style:le(Pt,pe),rowIndex:Pt})))}return Yt},nt=()=>{const _e=nn(y.innerElement),He=Pe();return[st(_e,{style:v(j),ref:P},Nn(_e)?He:{default:()=>He})]};return()=>{const _e=nn(y.containerElement),{horizontalScrollbar:He,verticalScrollbar:Fe}=ze(),Ye=nt();return st("div",{key:0,class:T.e("wrapper"),role:y.role},[st(_e,{class:y.className,style:v(te),onScroll:X,ref:M},Nn(_e)?Ye:{default:()=>Ye}),He,Fe])}}}),{max:nf,min:t5,floor:n5}=Math,JD={column:"columnWidth",row:"rowHeight"},Tv={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Ea=(n,e,t,r)=>{const[o,s,a]=[t[r],n[JD[r]],t[Tv[r]]];if(e>a){let i=0;if(a>=0){const l=o[a];i=l.offset+l.size}for(let l=a+1;l<=e;l++){const c=s(l);o[l]={offset:i,size:c},i+=c}t[Tv[r]]=e}return o[e]},r5=(n,e,t,r,o,s)=>{for(;t<=r;){const a=t+n5((r-t)/2),i=Ea(n,a,e,s).offset;if(i===o)return a;i<o?t=a+1:r=a-1}return nf(0,t-1)},XD=(n,e,t,r,o)=>{const s=o==="column"?n.totalColumn:n.totalRow;let a=1;for(;t<s&&Ea(n,t,e,o).offset<r;)t+=a,a*=2;return r5(n,e,n5(t/2),t5(t,s-1),r,o)},m2=(n,e,t,r)=>{const[o,s]=[e[r],e[Tv[r]]];return(s>0?o[s].offset:0)>=t?r5(n,e,0,s,t,r):XD(n,e,nf(0,s),t,r)},o5=({totalRow:n},{estimatedRowHeight:e,lastVisitedRowIndex:t,row:r})=>{let o=0;if(t>=n&&(t=n-1),t>=0){const i=r[t];o=i.offset+i.size}const a=(n-t-1)*e;return o+a},a5=({totalColumn:n},{column:e,estimatedColumnWidth:t,lastVisitedColumnIndex:r})=>{let o=0;if(r>n&&(r=n-1),r>=0){const i=e[r];o=i.offset+i.size}const a=(n-r-1)*t;return o+a},ZD={column:a5,row:o5},v2=(n,e,t,r,o,s,a)=>{const[i,l]=[s==="row"?n.height:n.width,ZD[s]],c=Ea(n,e,o,s),d=l(n,o),f=nf(0,t5(d-i,c.offset)),h=nf(0,c.offset-i+a+c.size);switch(t===BS&&(r>=h-i&&r<=f+i?t=Zs:t=Ji),t){case vv:return f;case gv:return h;case Ji:return Math.round(h+(f-h)/2);case Zs:default:return r>=h&&r<=f?r:h>f||r<h?h:f}},QD=e5({name:"ElDynamicSizeGrid",getColumnPosition:(n,e,t)=>{const r=Ea(n,e,t,"column");return[r.size,r.offset]},getRowPosition:(n,e,t)=>{const r=Ea(n,e,t,"row");return[r.size,r.offset]},getColumnOffset:(n,e,t,r,o,s)=>v2(n,e,t,r,o,"column",s),getRowOffset:(n,e,t,r,o,s)=>v2(n,e,t,r,o,"row",s),getColumnStartIndexForOffset:(n,e,t)=>m2(n,t,e,"column"),getColumnStopIndexForStartIndex:(n,e,t,r)=>{const o=Ea(n,e,r,"column"),s=t+n.width;let a=o.offset+o.size,i=e;for(;i<n.totalColumn-1&&a<s;)i++,a+=Ea(n,e,r,"column").size;return i},getEstimatedTotalHeight:o5,getEstimatedTotalWidth:a5,getRowStartIndexForOffset:(n,e,t)=>m2(n,t,e,"row"),getRowStopIndexForStartIndex:(n,e,t,r)=>{const{totalRow:o,height:s}=n,a=Ea(n,e,r,"row"),i=t+s;let l=a.size+a.offset,c=e;for(;c<o-1&&l<i;)c++,l+=Ea(n,c,r,"row").size;return c},injectToInstance:(n,e)=>{const t=({columnIndex:s,rowIndex:a},i)=>{var l,c;i=So(i)?!0:i,Rt(s)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,s-1)),Rt(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=n.exposed)==null||l.getItemStyleCache.value(-1,null,null),i&&((c=n.proxy)==null||c.$forceUpdate())},r=(s,a)=>{t({columnIndex:s},a)},o=(s,a)=>{t({rowIndex:s},a)};Object.assign(n.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:o,resetAfter:t})},initCache:({estimatedColumnWidth:n=i2,estimatedRowHeight:e=i2})=>({column:{},estimatedColumnWidth:n,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:n,rowHeight:e})=>{}}),eN=e5({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:n},e)=>[n,e*n],getRowPosition:({rowHeight:n},e)=>[n,e*n],getEstimatedTotalHeight:({totalRow:n,rowHeight:e})=>e*n,getEstimatedTotalWidth:({totalColumn:n,columnWidth:e})=>e*n,getColumnOffset:({totalColumn:n,columnWidth:e,width:t},r,o,s,a,i)=>{t=Number(t);const l=Math.max(0,n*e-t),c=Math.min(l,r*e),d=Math.max(0,r*e-t+i+e);switch(o==="smart"&&(s>=d-t&&s<=c+t?o=Zs:o=Ji),o){case vv:return c;case gv:return d;case Ji:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(t/2)?0:f>l+Math.floor(t/2)?l:f}case Zs:default:return s>=d&&s<=c?s:d>c||s<d?d:c}},getRowOffset:({rowHeight:n,height:e,totalRow:t},r,o,s,a,i)=>{e=Number(e);const l=Math.max(0,t*n-e),c=Math.min(l,r*n),d=Math.max(0,r*n-e+i+n);switch(o===BS&&(s>=d-e&&s<=c+e?o=Zs:o=Ji),o){case vv:return c;case gv:return d;case Ji:{const f=Math.round(d+(c-d)/2);return f<Math.ceil(e/2)?0:f>l+Math.floor(e/2)?l:f}case Zs:default:return s>=d&&s<=c?s:d>c||s<d?d:c}},getColumnStartIndexForOffset:({columnWidth:n,totalColumn:e},t)=>Math.max(0,Math.min(e-1,Math.floor(t/n))),getColumnStopIndexForStartIndex:({columnWidth:n,totalColumn:e,width:t},r,o)=>{const s=r*n,a=Math.ceil((t+o-s)/n);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:n,totalRow:e},t)=>Math.max(0,Math.min(e-1,Math.floor(t/n))),getRowStopIndexForStartIndex:({rowHeight:n,totalRow:e,height:t},r,o)=>{const s=r*n,a=Math.ceil((t+o-s)/n);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:n,rowHeight:e})=>{}}),tN="ElTableV2Grid",nN=n=>{const e=N(),t=N(),r=N(0),o=O(()=>{const{data:S,rowHeight:w,estimatedRowHeight:x}=n;if(!x)return S.length*w}),s=O(()=>{const{fixedData:S,rowHeight:w}=n;return((S==null?void 0:S.length)||0)*w}),a=O(()=>Rd(n.headerHeight)),i=O(()=>{const{height:S}=n;return Math.max(0,S-v(a)-v(s))}),l=O(()=>v(a)+v(s)>0),c=({data:S,rowIndex:w})=>S[w][n.rowKey];function d({rowCacheStart:S,rowCacheEnd:w,rowVisibleStart:x,rowVisibleEnd:T}){var k;(k=n.onRowsRendered)==null||k.call(n,{rowCacheStart:S,rowCacheEnd:w,rowVisibleStart:x,rowVisibleEnd:T})}function f(S,w){var x;(x=t.value)==null||x.resetAfterRowIndex(S,w)}function h(S,w){const x=v(e),T=v(t);Fr(S)?(x==null||x.scrollToLeft(S.scrollLeft),r.value=S.scrollLeft,T==null||T.scrollTo(S)):(x==null||x.scrollToLeft(S),r.value=S,T==null||T.scrollTo({scrollLeft:S,scrollTop:w}))}function m(S){var w;(w=v(t))==null||w.scrollTo({scrollTop:S})}function g(S,w){var x;(x=v(t))==null||x.scrollToItem(S,1,w)}function y(){var S,w;(S=v(t))==null||S.$forceUpdate(),(w=v(e))==null||w.$forceUpdate()}return{bodyRef:t,forceUpdate:y,fixedRowHeight:s,gridHeight:i,hasHeader:l,headerHeight:a,headerRef:e,totalHeight:o,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:h,scrollToTop:m,scrollToRow:g,scrollLeft:r}},rN=ue({name:tN,props:Pd,setup(n,{slots:e,expose:t}){const{ns:r}=yt(M1),{bodyRef:o,fixedRowHeight:s,gridHeight:a,hasHeader:i,headerRef:l,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:h,onItemRendered:m,resetAfterRowIndex:g,scrollTo:y,scrollToTop:S,scrollToRow:w,scrollLeft:x}=nN(n);mn("tableV2GridScrollLeft",x),t({forceUpdate:f,totalHeight:d,scrollTo:y,scrollToTop:S,scrollToRow:w,resetAfterRowIndex:g});const T=()=>n.bodyWidth;return()=>{const{cache:k,columns:C,data:M,fixedData:A,useIsScrolling:V,scrollbarAlwaysOn:P,scrollbarEndGap:L,scrollbarStartGap:K,style:J,rowHeight:G,bodyWidth:ne,estimatedRowHeight:W,headerWidth:D,height:U,width:te,getRowHeight:j,onScroll:ee}=n,X=Rt(W),ce=X?QD:eN,ae=v(c);return R("div",{role:"table",class:[r.e("table"),n.class],style:J},[R(ce,{ref:o,data:M,useIsScrolling:V,itemKey:h,columnCache:0,columnWidth:X?T:ne,totalColumn:1,totalRow:M.length,rowCache:k,rowHeight:X?j:G,width:te,height:v(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:K,scrollbarEndGap:L,scrollbarAlwaysOn:P,onScroll:ee,onItemRendered:m,perfMode:!1},{default:ye=>{var ke;const Be=M[ye.rowIndex];return(ke=e.row)==null?void 0:ke.call(e,{...ye,columns:C,rowData:Be})}}),v(i)&&R(YD,{ref:l,class:r.e("header-wrapper"),columns:C,headerData:M,headerHeight:n.headerHeight,fixedHeaderData:A,rowWidth:D,rowHeight:G,width:te,height:Math.min(ae+v(s),U)},{dynamic:e.header,fixed:e.row})])}}});var _1=rN;function oN(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const aN=(n,{slots:e})=>{const{mainTableRef:t,...r}=n;return R(_1,xt({ref:t},r),oN(e)?e:{default:()=>[e]})};var sN=aN;function iN(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const lN=(n,{slots:e})=>{if(!n.columns.length)return;const{leftTableRef:t,...r}=n;return R(_1,xt({ref:t},r),iN(e)?e:{default:()=>[e]})};var uN=lN;function cN(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const dN=(n,{slots:e})=>{if(!n.columns.length)return;const{rightTableRef:t,...r}=n;return R(_1,xt({ref:t},r),cN(e)?e:{default:()=>[e]})};var fN=dN;const pN=n=>{const{isScrolling:e}=yt(M1),t=N(!1),r=N(),o=O(()=>Rt(n.estimatedRowHeight)&&n.rowIndex>=0),s=(l=!1)=>{const c=v(r);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:h,rowIndex:m,style:g}=n,{height:y}=c.getBoundingClientRect();t.value=!0,Dt(()=>{if(l||y!==Number.parseInt(g.height)){const S=d[0],w=(S==null?void 0:S.placeholderSign)===Nu;f==null||f({rowKey:h,height:y,rowIndex:m},S&&!w&&S.fixed)}})},a=O(()=>{const{rowData:l,rowIndex:c,rowKey:d,onRowHover:f}=n,h=n.rowEventHandlers||{},m={};return Object.entries(h).forEach(([g,y])=>{$n(y)&&(m[g]=S=>{y({event:S,rowData:l,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:g,hovered:y})=>{const S=m[g];m[g]=w=>{f({event:w,hovered:y,rowData:l,rowIndex:c,rowKey:d}),S==null||S(w)}}),m}),i=l=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:h}=n;c==null||c({expanded:l,rowData:d,rowIndex:f,rowKey:h})};return ln(()=>{v(o)&&s(!0)}),{isScrolling:e,measurable:o,measured:t,rowRef:r,eventHandlers:a,onExpand:i}},hN="ElTableV2TableRow",mN=ue({name:hN,props:Qs,setup(n,{expose:e,slots:t,attrs:r}){const{eventHandlers:o,isScrolling:s,measurable:a,measured:i,rowRef:l,onExpand:c}=pN(n);return e({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:h,depth:m,rowData:g,rowIndex:y,style:S}=n;let w=d.map((x,T)=>{const k=gt(g.children)&&g.children.length>0&&x.key===h;return t.cell({column:x,columns:d,columnIndex:T,depth:m,style:f[x.key],rowData:g,rowIndex:y,isScrolling:v(s),expandIconProps:k?{rowData:g,rowIndex:y,onExpand:c}:void 0})});if(t.row&&(w=t.row({cells:w.map(x=>gt(x)&&x.length===1?x[0]:x),style:S,columns:d,depth:m,rowData:g,rowIndex:y,isScrolling:v(s)})),v(a)){const{height:x,...T}=S||{},k=v(i);return R("div",xt({ref:l,class:n.class,style:k?S:T,role:"row"},r,v(o)),[w])}return R("div",xt(r,{ref:l,class:n.class,style:S,role:"row"},v(o)),[w])}}});var vN=mN;function gN(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const yN=(n,{slots:e})=>{const{columns:t,columnsStyles:r,depthMap:o,expandColumnKey:s,expandedRowKeys:a,estimatedRowHeight:i,hasFixedColumns:l,rowData:c,rowIndex:d,style:f,isScrolling:h,rowProps:m,rowClass:g,rowKey:y,rowEventHandlers:S,ns:w,onRowHovered:x,onRowExpanded:T}=n,k=fi(g,{columns:t,rowData:c,rowIndex:d},""),C=fi(m,{columns:t,rowData:c,rowIndex:d}),M=c[y],A=o[M]||0,V=!!s,P=d<0,L=[w.e("row"),k,{[w.e(`row-depth-${A}`)]:V&&d>=0,[w.is("expanded")]:V&&a.includes(M),[w.is("fixed")]:!A&&P,[w.is("customized")]:!!e.row}],K=l?x:void 0,J={...C,columns:t,columnsStyles:r,class:L,depth:A,expandColumnKey:s,estimatedRowHeight:P?void 0:i,isScrolling:h,rowIndex:d,rowData:c,rowKey:M,rowEventHandlers:S,style:f};return R(vN,xt(J,{onRowExpand:T,onMouseenter:W=>{K==null||K({hovered:!0,rowKey:M,event:W,rowData:c,rowIndex:d})},onMouseleave:W=>{K==null||K({hovered:!1,rowKey:M,event:W,rowData:c,rowIndex:d})},rowkey:M}),gN(e)?e:{default:()=>[e]})};var bN=yN;const A1=(n,{slots:e})=>{var t;const{cellData:r,style:o}=n,s=((t=r==null?void 0:r.toString)==null?void 0:t.call(r))||"",a=ve(e,"default",n,()=>[s]);return R("div",{class:n.class,title:s,style:o},[a])};A1.displayName="ElTableV2Cell";A1.inheritAttrs=!1;var SN=A1;const wN=n=>{const{expanded:e,expandable:t,onExpand:r,style:o,size:s}=n,a={onClick:t?()=>r(!e):void 0,class:n.class};return R(pt,xt(a,{size:s,style:o}),{default:()=>[R(Oa,null,null)]})};var CN=wN;const s5=({columns:n,column:e,columnIndex:t,depth:r,expandIconProps:o,isScrolling:s,rowData:a,rowIndex:i,style:l,expandedRowKeys:c,ns:d,cellProps:f,expandColumnKey:h,indentSize:m,iconSize:g,rowKey:y},{slots:S})=>{const w=ds(l);if(e.placeholderSign===Nu)return R("div",{class:d.em("row-cell","placeholder"),style:w},null);const{cellRenderer:x,dataKey:T,dataGetter:k}=e,C=$n(k)?k({columns:n,column:e,columnIndex:t,rowData:a,rowIndex:i}):Ma(a,T??""),M=fi(f,{cellData:C,columns:n,column:e,columnIndex:t,rowIndex:i,rowData:a}),A={class:d.e("cell-text"),columns:n,column:e,columnIndex:t,cellData:C,isScrolling:s,rowData:a,rowIndex:i},V=JS(x),P=V?V(A):ve(S,"default",A,()=>[R(SN,A,null)]),L=[d.e("row-cell"),e.class,e.align===Du.CENTER&&d.is("align-center"),e.align===Du.RIGHT&&d.is("align-right")],K=i>=0&&h&&e.key===h,J=i>=0&&c.includes(a[y]);let G;const ne=`margin-inline-start: ${r*m}px;`;return K&&(Fr(o)?G=R(CN,xt(o,{class:[d.e("expand-icon"),d.is("expanded",J)],size:g,expanded:J,style:ne,expandable:!0}),null):G=R("div",{style:[ne,`width: ${g}px; height: ${g}px;`].join(" ")},null)),R("div",xt({class:L,style:w},M,{role:"cell"}),[G,P])};s5.inheritAttrs=!1;var g2=s5;const xN=Ge({class:String,columns:Zu,columnsStyles:{type:we(Object),required:!0},headerIndex:Number,style:{type:we(Object)}}),kN=ue({name:"ElTableV2HeaderRow",props:xN,setup(n,{slots:e}){return()=>{const{columns:t,columnsStyles:r,headerIndex:o,style:s}=n;let a=t.map((i,l)=>e.cell({columns:t,column:i,columnIndex:l,headerIndex:o,style:r[i.key]}));return e.header&&(a=e.header({cells:a.map(i=>gt(i)&&i.length===1?i[0]:i),columns:t,headerIndex:o})),R("div",{class:n.class,style:s,role:"row"},[a])}}});var EN=kN;function TN(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const MN=({columns:n,columnsStyles:e,headerIndex:t,style:r,headerClass:o,headerProps:s,ns:a},{slots:i})=>{const l={columns:n,headerIndex:t},c=[a.e("header-row"),fi(o,l,""),{[a.is("customized")]:!!i.header}],d={...fi(s,l),columnsStyles:e,class:c,columns:n,headerIndex:t,style:r};return R(EN,d,TN(i)?i:{default:()=>[i]})};var IN=MN;const R1=(n,{slots:e})=>ve(e,"default",n,()=>{var t,r;return[R("div",{class:n.class,title:(t=n.column)==null?void 0:t.title},[(r=n.column)==null?void 0:r.title])]});R1.displayName="ElTableV2HeaderCell";R1.inheritAttrs=!1;var ON=R1;const _N=n=>{const{sortOrder:e}=n;return R(pt,{size:14,class:n.class},{default:()=>[e===$u.ASC?R(L9,null,null):R(B9,null,null)]})};var AN=_N;const RN=(n,{slots:e})=>{const{column:t,ns:r,style:o,onColumnSorted:s}=n,a=ds(o);if(t.placeholderSign===Nu)return R("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:i,headerClass:l,sortable:c}=t,d={...n,class:r.e("header-cell-text")},f=JS(i),h=f?f(d):ve(e,"default",d,()=>[R(ON,d,null)]),{sortBy:m,sortState:g,headerCellProps:y}=n;let S,w;if(g){const k=g[t.key];S=!!Ev[k],w=S?k:$u.ASC}else S=t.key===m.key,w=S?m.order:$u.ASC;const x=[r.e("header-cell"),fi(l,n,""),t.align===Du.CENTER&&r.is("align-center"),t.align===Du.RIGHT&&r.is("align-right"),c&&r.is("sortable")],T={...fi(y,n),onClick:t.sortable?s:void 0,class:x,style:a,"data-key":t.key};return R("div",xt(T,{role:"columnheader"}),[h,c&&R(AN,{class:[r.e("sort-icon"),S&&r.is("sorting")],sortOrder:w},null)])};var y2=RN;const i5=(n,{slots:e})=>{var t;return R("div",{class:n.class,style:n.style},[(t=e.default)==null?void 0:t.call(e)])};i5.displayName="ElTableV2Footer";var PN=i5;const l5=(n,{slots:e})=>{const t=ve(e,"default",{},()=>[R(AP,null,null)]);return R("div",{class:n.class,style:n.style},[t])};l5.displayName="ElTableV2Empty";var $N=l5;const u5=(n,{slots:e})=>{var t;return R("div",{class:n.class,style:n.style},[(t=e.default)==null?void 0:t.call(e)])};u5.displayName="ElTableV2Overlay";var DN=u5;function zl(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!Co(n)}const NN="ElTableV2",LN=ue({name:NN,props:jD,setup(n,{slots:e,expose:t}){const r=je("table-v2"),{columnsStyles:o,fixedColumnsOnLeft:s,fixedColumnsOnRight:a,mainColumns:i,mainTableHeight:l,fixedTableHeight:c,leftTableWidth:d,rightTableWidth:f,data:h,depthMap:m,expandedRowKeys:g,hasFixedColumns:y,mainTableRef:S,leftTableRef:w,rightTableRef:x,isDynamic:T,isResetting:k,isScrolling:C,bodyWidth:M,emptyStyle:A,rootStyle:V,headerWidth:P,footerHeight:L,showEmpty:K,scrollTo:J,scrollToLeft:G,scrollToTop:ne,scrollToRow:W,getRowHeight:D,onColumnSorted:U,onRowHeightChange:te,onRowHovered:j,onRowExpanded:ee,onRowsRendered:X,onScroll:ce,onVerticalScroll:ae}=WD(n);return t({scrollTo:J,scrollToLeft:G,scrollToTop:ne,scrollToRow:W}),mn(M1,{ns:r,isResetting:k,isScrolling:C}),()=>{const{cache:ye,cellProps:ke,estimatedRowHeight:Be,expandColumnKey:le,fixedData:xe,headerHeight:Me,headerClass:De,headerProps:Ze,headerCellProps:lt,sortBy:ze,sortState:Pe,rowHeight:nt,rowClass:Ot,rowEventHandlers:_e,rowKey:He,rowProps:Fe,scrollbarAlwaysOn:Ye,indentSize:qe,iconSize:dt,useIsScrolling:vt,vScrollbarSize:bt,width:kt}=n,Lt=v(h),Yt={cache:ye,class:r.e("main"),columns:v(i),data:Lt,fixedData:xe,estimatedRowHeight:Be,bodyWidth:v(M)+bt,headerHeight:Me,headerWidth:v(P),height:v(l),mainTableRef:S,rowKey:He,rowHeight:nt,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:bt,useIsScrolling:vt,width:kt,getRowHeight:D,onRowsRendered:X,onScroll:ce},Pt=v(d),pe=v(c),F={cache:ye,class:r.e("left"),columns:v(s),data:Lt,estimatedRowHeight:Be,leftTableRef:w,rowHeight:nt,bodyWidth:Pt,headerWidth:Pt,headerHeight:Me,height:pe,rowKey:He,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:bt,useIsScrolling:vt,width:Pt,getRowHeight:D,onScroll:ae},ge=v(f)+bt,oe={cache:ye,class:r.e("right"),columns:v(a),data:Lt,estimatedRowHeight:Be,rightTableRef:x,rowHeight:nt,bodyWidth:ge,headerWidth:ge,headerHeight:Me,height:pe,rowKey:He,scrollbarAlwaysOn:Ye,scrollbarStartGap:2,scrollbarEndGap:bt,width:ge,style:`--${v(r.namespace)}-table-scrollbar-size: ${bt}px`,useIsScrolling:vt,getRowHeight:D,onScroll:ae},ie=v(o),be={ns:r,depthMap:v(m),columnsStyles:ie,expandColumnKey:le,expandedRowKeys:v(g),estimatedRowHeight:Be,hasFixedColumns:v(y),rowProps:Fe,rowClass:Ot,rowKey:He,rowEventHandlers:_e,onRowHovered:j,onRowExpanded:ee,onRowHeightChange:te},Y={cellProps:ke,expandColumnKey:le,indentSize:qe,iconSize:dt,rowKey:He,expandedRowKeys:v(g),ns:r},Ie={ns:r,headerClass:De,headerProps:Ze,columnsStyles:ie},Re={ns:r,sortBy:ze,sortState:Pe,headerCellProps:lt,onColumnSorted:U},Ne={row:Et=>R(bN,xt(Et,be),{row:e.row,cell:on=>{let Ln;return e.cell?R(g2,xt(on,Y,{style:ie[on.column.key]}),zl(Ln=e.cell(on))?Ln:{default:()=>[Ln]}):R(g2,xt(on,Y,{style:ie[on.column.key]}),null)}}),header:Et=>R(IN,xt(Et,Ie),{header:e.header,cell:on=>{let Ln;return e["header-cell"]?R(y2,xt(on,Re,{style:ie[on.column.key]}),zl(Ln=e["header-cell"](on))?Ln:{default:()=>[Ln]}):R(y2,xt(on,Re,{style:ie[on.column.key]}),null)}})},ot=[n.class,r.b(),r.e("root"),{[r.is("dynamic")]:v(T)}],at={class:r.e("footer"),style:v(L)};return R("div",{class:ot,style:v(V)},[R(sN,Yt,zl(Ne)?Ne:{default:()=>[Ne]}),R(uN,F,zl(Ne)?Ne:{default:()=>[Ne]}),R(fN,oe,zl(Ne)?Ne:{default:()=>[Ne]}),e.footer&&R(PN,at,{default:e.footer}),v(K)&&R($N,{class:r.e("empty"),style:v(A)},{default:e.empty}),e.overlay&&R(DN,{class:r.e("overlay")},{default:e.overlay})])}}});var BN=LN;const FN=Ge({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:we(Function)}}),VN=n=>{const e=N(),t=N(0),r=N(0);let o;return ln(()=>{o=Br(e,([s])=>{const{width:a,height:i}=s.contentRect,{paddingLeft:l,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(s.target),h=Number.parseInt(l)||0,m=Number.parseInt(c)||0,g=Number.parseInt(d)||0,y=Number.parseInt(f)||0;t.value=a-h-m,r.value=i-g-y}).stop}),no(()=>{o==null||o()}),Xe([t,r],([s,a])=>{var i;(i=n.onResize)==null||i.call(n,{width:s,height:a})}),{sizer:e,width:t,height:r}},zN=ue({name:"ElAutoResizer",props:FN,setup(n,{slots:e}){const t=je("auto-resizer"),{height:r,width:o,sizer:s}=VN(n),a={width:"100%",height:"100%"};return()=>{var i;return R("div",{ref:s,class:t.b(),style:a},[(i=e.default)==null?void 0:i.call(e,{height:r.value,width:o.value})])}}});var HN=zN;const WN=kn(BN),UN=kn(HN),ap=Symbol("tabsRootContextKey"),jN=Ge({tabs:{type:we(Array),default:()=>xo([])}}),c5="ElTabBar",KN=ue({name:c5}),GN=ue({...KN,props:jN,setup(n,{expose:e}){const t=n,r=yn(),o=yt(ap);o||to(c5,"<el-tabs><el-tab-bar /></el-tabs>");const s=je("tabs"),a=N(),i=N(),l=()=>{let m=0,g=0;const y=["top","bottom"].includes(o.props.tabPosition)?"width":"height",S=y==="width"?"x":"y",w=S==="x"?"left":"top";return t.tabs.every(x=>{var T,k;const C=(k=(T=r.parent)==null?void 0:T.refs)==null?void 0:k[`tab-${x.uid}`];if(!C)return!1;if(!x.active)return!0;m=C[`offset${as(w)}`],g=C[`client${as(y)}`];const M=window.getComputedStyle(C);return y==="width"&&(g-=Number.parseFloat(M.paddingLeft)+Number.parseFloat(M.paddingRight),m+=Number.parseFloat(M.paddingLeft)),!1}),{[y]:`${g}px`,transform:`translate${as(S)}(${m}px)`}},c=()=>i.value=l(),d=[],f=()=>{var m;d.forEach(y=>y.stop()),d.length=0;const g=(m=r.parent)==null?void 0:m.refs;if(g){for(const y in g)if(y.startsWith("tab-")){const S=g[y];S&&d.push(Br(S,c))}}};Xe(()=>t.tabs,async()=>{await Dt(),c(),f()},{immediate:!0});const h=Br(a,()=>c());return no(()=>{d.forEach(m=>m.stop()),d.length=0,h.stop()}),e({ref:a,update:c}),(m,g)=>(I(),z("div",{ref_key:"barRef",ref:a,class:H([v(s).e("active-bar"),v(s).is(v(o).props.tabPosition)]),style:en(i.value)},null,6))}});var YN=mt(GN,[["__file","tab-bar.vue"]]);const qN=Ge({panes:{type:we(Array),default:()=>xo([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),JN={tabClick:(n,e,t)=>t instanceof Event,tabRemove:(n,e)=>e instanceof Event},b2="ElTabNav",XN=ue({name:b2,props:qN,emits:JN,setup(n,{expose:e,emit:t}){const r=yt(ap);r||to(b2,"<el-tabs><tab-nav /></el-tabs>");const o=je("tabs"),s=F9(),a=V9(),i=N(),l=N(),c=N(),d=N(),f=N(!1),h=N(0),m=N(!1),g=N(!0),y=O(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),S=O(()=>({transform:`translate${y.value==="width"?"X":"Y"}(-${h.value}px)`})),w=()=>{if(!i.value)return;const V=i.value[`offset${as(y.value)}`],P=h.value;if(!P)return;const L=P>V?P-V:0;h.value=L},x=()=>{if(!i.value||!l.value)return;const V=l.value[`offset${as(y.value)}`],P=i.value[`offset${as(y.value)}`],L=h.value;if(V-L<=P)return;const K=V-L>P*2?L+P:V-P;h.value=K},T=async()=>{const V=l.value;if(!f.value||!c.value||!i.value||!V)return;await Dt();const P=c.value.querySelector(".is-active");if(!P)return;const L=i.value,K=["top","bottom"].includes(r.props.tabPosition),J=P.getBoundingClientRect(),G=L.getBoundingClientRect(),ne=K?V.offsetWidth-G.width:V.offsetHeight-G.height,W=h.value;let D=W;K?(J.left<G.left&&(D=W-(G.left-J.left)),J.right>G.right&&(D=W+J.right-G.right)):(J.top<G.top&&(D=W-(G.top-J.top)),J.bottom>G.bottom&&(D=W+(J.bottom-G.bottom))),D=Math.max(D,0),h.value=Math.min(D,ne)},k=()=>{var V;if(!l.value||!i.value)return;n.stretch&&((V=d.value)==null||V.update());const P=l.value[`offset${as(y.value)}`],L=i.value[`offset${as(y.value)}`],K=h.value;L<P?(f.value=f.value||{},f.value.prev=K,f.value.next=K+L<P,P-K<L&&(h.value=P-L)):(f.value=!1,K>0&&(h.value=0))},C=V=>{let P=0;switch(V.code){case It.left:case It.up:P=-1;break;case It.right:case It.down:P=1;break;default:return}const L=Array.from(V.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let J=L.indexOf(V.target)+P;J<0?J=L.length-1:J>=L.length&&(J=0),L[J].focus({preventScroll:!0}),L[J].click(),M()},M=()=>{g.value&&(m.value=!0)},A=()=>m.value=!1;return Xe(s,V=>{V==="hidden"?g.value=!1:V==="visible"&&setTimeout(()=>g.value=!0,50)}),Xe(a,V=>{V?setTimeout(()=>g.value=!0,50):g.value=!1}),Br(c,k),ln(()=>setTimeout(()=>T(),0)),l1(()=>k()),e({scrollToActiveTab:T,removeFocus:A}),()=>{const V=f.value?[R("span",{class:[o.e("nav-prev"),o.is("disabled",!f.value.prev)],onClick:w},[R(pt,null,{default:()=>[R(Iu,null,null)]})]),R("span",{class:[o.e("nav-next"),o.is("disabled",!f.value.next)],onClick:x},[R(pt,null,{default:()=>[R(Oa,null,null)]})])]:null,P=n.panes.map((L,K)=>{var J,G,ne,W;const D=L.uid,U=L.props.disabled,te=(G=(J=L.props.name)!=null?J:L.index)!=null?G:`${K}`,j=!U&&(L.isClosable||n.editable);L.index=`${K}`;const ee=j?R(pt,{class:"is-icon-close",onClick:ae=>t("tabRemove",L,ae)},{default:()=>[R(Mu,null,null)]}):null,X=((W=(ne=L.slots).label)==null?void 0:W.call(ne))||L.props.label,ce=!U&&L.active?0:-1;return R("div",{ref:`tab-${D}`,class:[o.e("item"),o.is(r.props.tabPosition),o.is("active",L.active),o.is("disabled",U),o.is("closable",j),o.is("focus",m.value)],id:`tab-${te}`,key:`tab-${D}`,"aria-controls":`pane-${te}`,role:"tab","aria-selected":L.active,tabindex:ce,onFocus:()=>M(),onBlur:()=>A(),onClick:ae=>{A(),t("tabClick",L,te,ae)},onKeydown:ae=>{j&&(ae.code===It.delete||ae.code===It.backspace)&&t("tabRemove",L,ae)}},[X,ee])});return R("div",{ref:c,class:[o.e("nav-wrap"),o.is("scrollable",!!f.value),o.is(r.props.tabPosition)]},[V,R("div",{class:o.e("nav-scroll"),ref:i},[R("div",{class:[o.e("nav"),o.is(r.props.tabPosition),o.is("stretch",n.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:S.value,role:"tablist",onKeydown:C},[n.type?null:R(YN,{ref:d,tabs:[...n.panes]},null),P])])])}}}),ZN=Ge({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:we(Function),default:()=>!0},stretch:Boolean}),hm=n=>Nn(n)||Rt(n),QN={[Pn]:n=>hm(n),tabClick:(n,e)=>e instanceof Event,tabChange:n=>hm(n),edit:(n,e)=>["remove","add"].includes(e),tabRemove:n=>hm(n),tabAdd:()=>!0},eL=ue({name:"ElTabs",props:ZN,emits:QN,setup(n,{emit:e,slots:t,expose:r}){var o;const s=je("tabs"),a=O(()=>["left","right"].includes(n.tabPosition)),{children:i,addChild:l,removeChild:c}=E_(yn(),"ElTabPane"),d=N(),f=N((o=n.modelValue)!=null?o:"0"),h=async(w,x=!1)=>{var T,k;if(!(f.value===w||So(w)))try{let C;if(n.beforeLeave){const M=n.beforeLeave(w,f.value);C=M instanceof Promise?await M:M}else C=!0;C!==!1&&(f.value=w,x&&(e(Pn,w),e("tabChange",w)),(k=(T=d.value)==null?void 0:T.removeFocus)==null||k.call(T))}catch{}},m=(w,x,T)=>{w.props.disabled||(h(x,!0),e("tabClick",w,T))},g=(w,x)=>{w.props.disabled||So(w.props.name)||(x.stopPropagation(),e("edit",w.props.name,"remove"),e("tabRemove",w.props.name))},y=()=>{e("edit",void 0,"add"),e("tabAdd")};Xe(()=>n.modelValue,w=>h(w)),Xe(f,async()=>{var w;await Dt(),(w=d.value)==null||w.scrollToActiveTab()}),mn(ap,{props:n,currentName:f,registerPane:w=>{i.value.push(w)},sortPane:l,unregisterPane:c}),r({currentName:f});const S=({render:w})=>w();return()=>{const w=t["add-icon"],x=n.editable||n.addable?R("div",{class:[s.e("new-tab"),a.value&&s.e("new-tab-vertical")],tabindex:"0",onClick:y,onKeydown:C=>{[It.enter,It.numpadEnter].includes(C.code)&&y()}},[w?ve(t,"add-icon"):R(pt,{class:s.is("icon-plus")},{default:()=>[R(z9,null,null)]})]):null,T=R("div",{class:[s.e("header"),a.value&&s.e("header-vertical"),s.is(n.tabPosition)]},[R(S,{render:()=>{const C=i.value.some(M=>M.slots.label);return R(XN,{ref:d,currentName:f.value,editable:n.editable,type:n.type,panes:i.value,stretch:n.stretch,onTabClick:m,onTabRemove:g},{$stable:!C})}},null),x]),k=R("div",{class:s.e("content")},[ve(t,"default")]);return R("div",{class:[s.b(),s.m(n.tabPosition),{[s.m("card")]:n.type==="card",[s.m("border-card")]:n.type==="border-card"}]},[k,T])}}});var tL=eL;const nL=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),d5="ElTabPane",rL=ue({name:d5}),oL=ue({...rL,props:nL,setup(n){const e=n,t=yn(),r=Na(),o=yt(ap);o||to(d5,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const s=je("tab-pane"),a=N(),i=O(()=>e.closable||o.props.closable),l=sb(()=>{var m;return o.currentName.value===((m=e.name)!=null?m:a.value)}),c=N(l.value),d=O(()=>{var m;return(m=e.name)!=null?m:a.value}),f=sb(()=>!e.lazy||c.value||l.value);Xe(l,m=>{m&&(c.value=!0)});const h=Hn({uid:t.uid,slots:r,props:e,paneName:d,active:l,index:a,isClosable:i});return o.registerPane(h),ln(()=>{o.sortPane(h)}),Jf(()=>{o.unregisterPane(h.uid)}),(m,g)=>v(f)?an((I(),z("div",{key:0,id:`pane-${v(d)}`,class:H(v(s).b()),role:"tabpanel","aria-hidden":!v(l),"aria-labelledby":`tab-${v(d)}`},[ve(m.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Qn,v(l)]]):fe("v-if",!0)}});var f5=mt(oL,[["__file","tab-pane.vue"]]);const aL=kn(tL,{TabPane:f5}),sL=ro(f5),p5=Symbol("uploadContextKey"),iL="ElUpload";class lL extends Error{constructor(e,t,r,o){super(e),this.name="UploadAjaxError",this.status=t,this.method=r,this.url=o}}function S2(n,e,t){let r;return t.response?r=`${t.response.error||t.response}`:t.responseText?r=`${t.responseText}`:r=`fail to ${e.method} ${n} ${t.status}`,new lL(r,t.status,e.method,n)}function uL(n){const e=n.responseText||n.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const cL=n=>{typeof XMLHttpRequest>"u"&&to(iL,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,t=n.action;e.upload&&e.upload.addEventListener("progress",s=>{const a=s;a.percent=s.total>0?s.loaded/s.total*100:0,n.onProgress(a)});const r=new FormData;if(n.data)for(const[s,a]of Object.entries(n.data))gt(a)&&a.length?r.append(s,...a):r.append(s,a);r.append(n.filename,n.file,n.file.name),e.addEventListener("error",()=>{n.onError(S2(t,n,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return n.onError(S2(t,n,e));n.onSuccess(uL(e))}),e.open(n.method,t,!0),n.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const o=n.headers||{};if(o instanceof Headers)o.forEach((s,a)=>e.setRequestHeader(a,s));else for(const[s,a]of Object.entries(o))Yd(a)||e.setRequestHeader(s,String(a));return e.send(r),e},h5=["text","picture","picture-card"];let dL=1;const Mv=()=>Date.now()+dL++,m5=Ge({action:{type:String,default:"#"},headers:{type:we(Object)},method:{type:String,default:"post"},data:{type:we([Object,Function,Promise]),default:()=>xo({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:we(Array),default:()=>xo([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:h5,default:"text"},httpRequest:{type:we(Function),default:cL},disabled:Boolean,limit:Number}),fL=Ge({...m5,beforeUpload:{type:we(Function),default:zn},beforeRemove:{type:we(Function)},onRemove:{type:we(Function),default:zn},onChange:{type:we(Function),default:zn},onPreview:{type:we(Function),default:zn},onSuccess:{type:we(Function),default:zn},onProgress:{type:we(Function),default:zn},onError:{type:we(Function),default:zn},onExceed:{type:we(Function),default:zn},crossorigin:{type:we(String)}}),pL=Ge({files:{type:we(Array),default:()=>xo([])},disabled:{type:Boolean,default:!1},handlePreview:{type:we(Function),default:zn},listType:{type:String,values:h5,default:"text"},crossorigin:{type:we(String)}}),hL={remove:n=>!!n},mL=ue({name:"ElUploadList"}),vL=ue({...mL,props:pL,emits:hL,setup(n,{emit:e}){const t=n,{t:r}=En(),o=je("upload"),s=je("icon"),a=je("list"),i=Da(),l=N(!1),c=O(()=>[o.b("list"),o.bm("list",t.listType),o.is("disabled",t.disabled)]),d=f=>{e("remove",f)};return(f,h)=>(I(),me(j9,{tag:"ul",class:H(v(c)),name:v(a).b()},{default:q(()=>[(I(!0),z(it,null,Ht(f.files,(m,g)=>(I(),z("li",{key:m.uid||m.name,class:H([v(o).be("list","item"),v(o).is(m.status),{focusing:l.value}]),tabindex:"0",onKeydown:gr(y=>!v(i)&&d(m),["delete"]),onFocus:y=>l.value=!0,onBlur:y=>l.value=!1,onClick:y=>l.value=!1},[ve(f.$slots,"default",{file:m,index:g},()=>[f.listType==="picture"||m.status!=="uploading"&&f.listType==="picture-card"?(I(),z("img",{key:0,class:H(v(o).be("list","item-thumbnail")),src:m.url,crossorigin:f.crossorigin,alt:""},null,10,["src","crossorigin"])):fe("v-if",!0),m.status==="uploading"||f.listType!=="picture-card"?(I(),z("div",{key:1,class:H(v(o).be("list","item-info"))},[Q("a",{class:H(v(o).be("list","item-name")),onClick:Qe(y=>f.handlePreview(m),["prevent"])},[R(v(pt),{class:H(v(s).m("document"))},{default:q(()=>[R(v(H9))]),_:1},8,["class"]),Q("span",{class:H(v(o).be("list","item-file-name")),title:m.name},Ee(m.name),11,["title"])],10,["onClick"]),m.status==="uploading"?(I(),me(v(uD),{key:0,type:f.listType==="picture-card"?"circle":"line","stroke-width":f.listType==="picture-card"?6:2,percentage:Number(m.percentage),style:en(f.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):fe("v-if",!0)],2)):fe("v-if",!0),Q("label",{class:H(v(o).be("list","item-status-label"))},[f.listType==="text"?(I(),me(v(pt),{key:0,class:H([v(s).m("upload-success"),v(s).m("circle-check")])},{default:q(()=>[R(v(k4))]),_:1},8,["class"])):["picture-card","picture"].includes(f.listType)?(I(),me(v(pt),{key:1,class:H([v(s).m("upload-success"),v(s).m("check")])},{default:q(()=>[R(v(E4))]),_:1},8,["class"])):fe("v-if",!0)],2),v(i)?fe("v-if",!0):(I(),me(v(pt),{key:2,class:H(v(s).m("close")),onClick:y=>d(m)},{default:q(()=>[R(v(Mu))]),_:2},1032,["class","onClick"])),fe(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),fe(" This is a bug which needs to be fixed "),fe(" TODO: Fix the incorrect navigation interaction "),v(i)?fe("v-if",!0):(I(),z("i",{key:3,class:H(v(s).m("close-tip"))},Ee(v(r)("el.upload.deleteTip")),3)),f.listType==="picture-card"?(I(),z("span",{key:4,class:H(v(o).be("list","item-actions"))},[Q("span",{class:H(v(o).be("list","item-preview")),onClick:y=>f.handlePreview(m)},[R(v(pt),{class:H(v(s).m("zoom-in"))},{default:q(()=>[R(v(W9))]),_:1},8,["class"])],10,["onClick"]),v(i)?fe("v-if",!0):(I(),z("span",{key:0,class:H(v(o).be("list","item-delete")),onClick:y=>d(m)},[R(v(pt),{class:H(v(s).m("delete"))},{default:q(()=>[R(v(U9))]),_:1},8,["class"])],10,["onClick"]))],2)):fe("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),ve(f.$slots,"append")]),_:3},8,["class","name"]))}});var w2=mt(vL,[["__file","upload-list.vue"]]);const gL=Ge({disabled:{type:Boolean,default:!1}}),yL={file:n=>gt(n)},v5="ElUploadDrag",bL=ue({name:v5}),SL=ue({...bL,props:gL,emits:yL,setup(n,{emit:e}){yt(p5)||to(v5,"usage: <el-upload><el-upload-dragger /></el-upload>");const r=je("upload"),o=N(!1),s=Da(),a=l=>{if(s.value)return;o.value=!1,l.stopPropagation();const c=Array.from(l.dataTransfer.files);e("file",c)},i=()=>{s.value||(o.value=!0)};return(l,c)=>(I(),z("div",{class:H([v(r).b("dragger"),v(r).is("dragover",o.value)]),onDrop:Qe(a,["prevent"]),onDragover:Qe(i,["prevent"]),onDragleave:Qe(d=>o.value=!1,["prevent"])},[ve(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var wL=mt(SL,[["__file","upload-dragger.vue"]]);const CL=Ge({...m5,beforeUpload:{type:we(Function),default:zn},onRemove:{type:we(Function),default:zn},onStart:{type:we(Function),default:zn},onSuccess:{type:we(Function),default:zn},onProgress:{type:we(Function),default:zn},onError:{type:we(Function),default:zn},onExceed:{type:we(Function),default:zn}}),xL=ue({name:"ElUploadContent",inheritAttrs:!1}),kL=ue({...xL,props:CL,setup(n,{expose:e}){const t=n,r=je("upload"),o=Da(),s=vr({}),a=vr(),i=y=>{if(y.length===0)return;const{autoUpload:S,limit:w,fileList:x,multiple:T,onStart:k,onExceed:C}=t;if(w&&x.length+y.length>w){C(y,x);return}T||(y=y.slice(0,1));for(const M of y){const A=M;A.uid=Mv(),k(A),S&&l(A)}},l=async y=>{if(a.value.value="",!t.beforeUpload)return d(y);let S,w={};try{const T=t.data,k=t.beforeUpload(y);w=tv(t.data)?Ib(t.data):t.data,S=await k,tv(t.data)&&vs(T,w)&&(w=Ib(t.data))}catch{S=!1}if(S===!1){t.onRemove(y);return}let x=y;S instanceof Blob&&(S instanceof File?x=S:x=new File([S],y.name,{type:y.type})),d(Object.assign(x,{uid:y.uid}),w)},c=async(y,S)=>$n(y)?y(S):y,d=async(y,S)=>{const{headers:w,data:x,method:T,withCredentials:k,name:C,action:M,onProgress:A,onSuccess:V,onError:P,httpRequest:L}=t;try{S=await c(S??x,y)}catch{t.onRemove(y);return}const{uid:K}=y,J={headers:w||{},withCredentials:k,file:y,data:S,method:T,filename:C,action:M,onProgress:ne=>{A(ne,y)},onSuccess:ne=>{V(ne,y),delete s.value[K]},onError:ne=>{P(ne,y),delete s.value[K]}},G=L(J);s.value[K]=G,G instanceof Promise&&G.then(J.onSuccess,J.onError)},f=y=>{const S=y.target.files;S&&i(Array.from(S))},h=()=>{o.value||(a.value.value="",a.value.click())},m=()=>{h()};return e({abort:y=>{K9(s.value).filter(y?([w])=>String(y.uid)===w:()=>!0).forEach(([w,x])=>{x instanceof XMLHttpRequest&&x.abort(),delete s.value[w]})},upload:l}),(y,S)=>(I(),z("div",{class:H([v(r).b(),v(r).m(y.listType),v(r).is("drag",y.drag),v(r).is("disabled",v(o))]),tabindex:v(o)?"-1":"0",onClick:h,onKeydown:gr(Qe(m,["self"]),["enter","space"])},[y.drag?(I(),me(wL,{key:0,disabled:v(o),onFile:i},{default:q(()=>[ve(y.$slots,"default")]),_:3},8,["disabled"])):ve(y.$slots,"default",{key:1}),Q("input",{ref_key:"inputRef",ref:a,class:H(v(r).e("input")),name:y.name,disabled:v(o),multiple:y.multiple,accept:y.accept,type:"file",onChange:f,onClick:Qe(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var C2=mt(kL,[["__file","upload-content.vue"]]);const x2="ElUpload",k2=n=>{var e;(e=n.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(n.url)},EL=(n,e)=>{const t=G9(n,"fileList",void 0,{passive:!0}),r=m=>t.value.find(g=>g.uid===m.uid);function o(m){var g;(g=e.value)==null||g.abort(m)}function s(m=["ready","uploading","success","fail"]){t.value=t.value.filter(g=>!m.includes(g.status))}function a(m){t.value=t.value.filter(g=>g.uid!==m.uid)}const i=(m,g)=>{const y=r(g);y&&(console.error(m),y.status="fail",a(y),n.onError(m,y,t.value),n.onChange(y,t.value))},l=(m,g)=>{const y=r(g);y&&(n.onProgress(m,y,t.value),y.status="uploading",y.percentage=Math.round(m.percent))},c=(m,g)=>{const y=r(g);y&&(y.status="success",y.response=m,n.onSuccess(m,y,t.value),n.onChange(y,t.value))},d=m=>{Yd(m.uid)&&(m.uid=Mv());const g={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(n.listType==="picture-card"||n.listType==="picture")try{g.url=URL.createObjectURL(m)}catch(y){$a(x2,y.message),n.onError(y,g,t.value)}t.value=[...t.value,g],n.onChange(g,t.value)},f=async m=>{const g=m instanceof File?r(m):m;g||to(x2,"file to be removed not found");const y=S=>{o(S),a(S),n.onRemove(S,t.value),k2(S)};n.beforeRemove?await n.beforeRemove(g,t.value)!==!1&&y(g):y(g)};function h(){t.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var g;return m&&((g=e.value)==null?void 0:g.upload(m))})}return Xe(()=>n.listType,m=>{m!=="picture-card"&&m!=="picture"||(t.value=t.value.map(g=>{const{raw:y,url:S}=g;if(!S&&y)try{g.url=URL.createObjectURL(y)}catch(w){n.onError(w,g,t.value)}return g}))}),Xe(t,m=>{for(const g of m)g.uid||(g.uid=Mv()),g.status||(g.status="success")},{immediate:!0,deep:!0}),{uploadFiles:t,abort:o,clearFiles:s,handleError:i,handleProgress:l,handleStart:d,handleSuccess:c,handleRemove:f,submit:h,revokeFileObjectURL:k2}},TL=ue({name:"ElUpload"}),ML=ue({...TL,props:fL,setup(n,{expose:e}){const t=n,r=Da(),o=vr(),{abort:s,submit:a,clearFiles:i,uploadFiles:l,handleStart:c,handleError:d,handleRemove:f,handleSuccess:h,handleProgress:m,revokeFileObjectURL:g}=EL(t,o),y=O(()=>t.listType==="picture-card"),S=O(()=>({...t,fileList:l.value,onStart:c,onProgress:m,onSuccess:h,onError:d,onRemove:f}));return no(()=>{l.value.forEach(g)}),mn(p5,{accept:Kn(t,"accept")}),e({abort:s,submit:a,clearFiles:i,handleStart:c,handleRemove:f}),(w,x)=>(I(),z("div",null,[v(y)&&w.showFileList?(I(),me(w2,{key:0,disabled:v(r),"list-type":w.listType,files:v(l),crossorigin:w.crossorigin,"handle-preview":w.onPreview,onRemove:v(f)},Ts({append:q(()=>[R(C2,xt({ref_key:"uploadRef",ref:o},v(S)),{default:q(()=>[w.$slots.trigger?ve(w.$slots,"trigger",{key:0}):fe("v-if",!0),!w.$slots.trigger&&w.$slots.default?ve(w.$slots,"default",{key:1}):fe("v-if",!0)]),_:3},16)]),_:2},[w.$slots.file?{name:"default",fn:q(({file:T,index:k})=>[ve(w.$slots,"file",{file:T,index:k})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):fe("v-if",!0),!v(y)||v(y)&&!w.showFileList?(I(),me(C2,xt({key:1,ref_key:"uploadRef",ref:o},v(S)),{default:q(()=>[w.$slots.trigger?ve(w.$slots,"trigger",{key:0}):fe("v-if",!0),!w.$slots.trigger&&w.$slots.default?ve(w.$slots,"default",{key:1}):fe("v-if",!0)]),_:3},16)):fe("v-if",!0),w.$slots.trigger?ve(w.$slots,"default",{key:2}):fe("v-if",!0),ve(w.$slots,"tip"),!v(y)&&w.showFileList?(I(),me(w2,{key:3,disabled:v(r),"list-type":w.listType,files:v(l),crossorigin:w.crossorigin,"handle-preview":w.onPreview,onRemove:v(f)},Ts({_:2},[w.$slots.file?{name:"default",fn:q(({file:T,index:k})=>[ve(w.$slots,"file",{file:T,index:k})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):fe("v-if",!0)]))}});var IL=mt(ML,[["__file","upload.vue"]]);const OL=kn(IL),g5=["success","info","warning","error"],hr=xo({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Mo?document.body:void 0}),_L=Ge({customClass:{type:String,default:hr.customClass},center:{type:Boolean,default:hr.center},dangerouslyUseHTMLString:{type:Boolean,default:hr.dangerouslyUseHTMLString},duration:{type:Number,default:hr.duration},icon:{type:Dn,default:hr.icon},id:{type:String,default:hr.id},message:{type:we([String,Object,Function]),default:hr.message},onClose:{type:we(Function),default:hr.onClose},showClose:{type:Boolean,default:hr.showClose},type:{type:String,values:g5,default:hr.type},plain:{type:Boolean,default:hr.plain},offset:{type:Number,default:hr.offset},zIndex:{type:Number,default:hr.zIndex},grouping:{type:Boolean,default:hr.grouping},repeatNum:{type:Number,default:hr.repeatNum}}),AL={destroy:()=>!0},Fo=f4([]),RL=n=>{const e=Fo.findIndex(o=>o.id===n),t=Fo[e];let r;return e>0&&(r=Fo[e-1]),{current:t,prev:r}},PL=n=>{const{prev:e}=RL(n);return e?e.vm.exposed.bottom.value:0},$L=(n,e)=>Fo.findIndex(r=>r.id===n)>0?16:e,DL=ue({name:"ElMessage"}),NL=ue({...DL,props:_L,emits:AL,setup(n,{expose:e}){const t=n,{Close:r}=Y9,{ns:o,zIndex:s}=TO("message"),{currentZIndex:a,nextZIndex:i}=s,l=N(),c=N(!1),d=N(0);let f;const h=O(()=>t.type?t.type==="error"?"danger":t.type:"info"),m=O(()=>{const A=t.type;return{[o.bm("icon",A)]:A&&ib[A]}}),g=O(()=>t.icon||ib[t.type]||""),y=O(()=>PL(t.id)),S=O(()=>$L(t.id,t.offset)+y.value),w=O(()=>d.value+S.value),x=O(()=>({top:`${S.value}px`,zIndex:a.value}));function T(){t.duration!==0&&({stop:f}=Ou(()=>{C()},t.duration))}function k(){f==null||f()}function C(){c.value=!1}function M({code:A}){A===It.esc&&C()}return ln(()=>{T(),i(),c.value=!0}),Xe(()=>t.repeatNum,()=>{k(),T()}),ku(document,"keydown",M),Br(l,()=>{d.value=l.value.getBoundingClientRect().height}),e({visible:c,bottom:w,close:C}),(A,V)=>(I(),me(Is,{name:v(o).b("fade"),onBeforeLeave:A.onClose,onAfterLeave:P=>A.$emit("destroy"),persisted:""},{default:q(()=>[an(Q("div",{id:A.id,ref_key:"messageRef",ref:l,class:H([v(o).b(),{[v(o).m(A.type)]:A.type},v(o).is("center",A.center),v(o).is("closable",A.showClose),v(o).is("plain",A.plain),A.customClass]),style:en(v(x)),role:"alert",onMouseenter:k,onMouseleave:T},[A.repeatNum>1?(I(),me(v(KO),{key:0,value:A.repeatNum,type:v(h),class:H(v(o).e("badge"))},null,8,["value","type","class"])):fe("v-if",!0),v(g)?(I(),me(v(pt),{key:1,class:H([v(o).e("icon"),v(m)])},{default:q(()=>[(I(),me(nn(v(g))))]),_:1},8,["class"])):fe("v-if",!0),ve(A.$slots,"default",{},()=>[A.dangerouslyUseHTMLString?(I(),z(it,{key:1},[fe(" Caution here, message could've been compromised, never use user's input as message "),Q("p",{class:H(v(o).e("content")),innerHTML:A.message},null,10,["innerHTML"])],2112)):(I(),z("p",{key:0,class:H(v(o).e("content"))},Ee(A.message),3))]),A.showClose?(I(),me(v(pt),{key:2,class:H(v(o).e("closeBtn")),onClick:Qe(C,["stop"])},{default:q(()=>[R(v(r))]),_:1},8,["class","onClick"])):fe("v-if",!0)],46,["id"]),[[Qn,c.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var LL=mt(NL,[["__file","message.vue"]]);let BL=1;const y5=n=>{const e=!n||Nn(n)||Co(n)||$n(n)?{message:n}:n,t={...hr,...e};if(!t.appendTo)t.appendTo=document.body;else if(Nn(t.appendTo)){let r=document.querySelector(t.appendTo);S4(r)||(r=document.body),t.appendTo=r}return Qr(No.grouping)&&!t.grouping&&(t.grouping=No.grouping),Rt(No.duration)&&t.duration===3e3&&(t.duration=No.duration),Rt(No.offset)&&t.offset===16&&(t.offset=No.offset),Qr(No.showClose)&&!t.showClose&&(t.showClose=No.showClose),t},FL=n=>{const e=Fo.indexOf(n);if(e===-1)return;Fo.splice(e,1);const{handler:t}=n;t.close()},VL=({appendTo:n,...e},t)=>{const r=`message_${BL++}`,o=e.onClose,s=document.createElement("div"),a={...e,id:r,onClose:()=>{o==null||o(),FL(d)},onDestroy:()=>{lb(null,s)}},i=R(LL,a,$n(a.message)||Co(a.message)?{default:$n(a.message)?a.message:()=>a.message}:null);i.appContext=t||il._context,lb(i,s),n.appendChild(s.firstElementChild);const l=i.component,d={id:r,vnode:i,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:i.component.props};return d},il=(n={},e)=>{if(!Mo)return{close:()=>{}};const t=y5(n);if(t.grouping&&Fo.length){const o=Fo.find(({vnode:s})=>{var a;return((a=s.props)==null?void 0:a.message)===t.message});if(o)return o.props.repeatNum+=1,o.props.type=t.type,o.handler}if(Rt(No.max)&&Fo.length>=No.max)return{close:()=>{}};const r=VL(t,e);return Fo.push(r),r.handler};g5.forEach(n=>{il[n]=(e={},t)=>{const r=y5(e);return il({...r,type:n},t)}});function zL(n){for(const e of Fo)(!n||n===e.props.type)&&e.handler.close()}il.closeAll=zL;il._context=null;const HL=q9(il,"$message"),WL={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function UL(n,e){return I(),z("svg",WL,e[0]||(e[0]=[Q("rect",{width:"40",height:"40",fill:"#F4F6F9",rx:"20"},null,-1)]))}const jL={render:UL},KL={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function GL(n,e){return I(),z("svg",KL,e[0]||(e[0]=[Q("rect",{width:"40",height:"40",fill:"#232E3C",rx:"20"},null,-1)]))}const YL={render:GL},qL={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function JL(n,e){return I(),z("svg",qL,e[0]||(e[0]=[ra('<g fill="#394452" clip-path="url(#a)"><path d="M13.955 20.316a6.047 6.047 0 1 1 12.094 0 6.047 6.047 0 0 1-12.094 0"></path><path fill-rule="evenodd" d="M20.002 33.316a.907.907 0 0 1-.907-.907V29.99a.907.907 0 1 1 1.814 0v2.419a.907.907 0 0 1-.907.907m13-13c0 .5-.406.907-.907.907h-2.419a.907.907 0 0 1 0-1.814h2.419c.5 0 .907.406.907.907m-21.768 0c0 .5-.406.907-.906.907h-2.42a.907.907 0 0 1 0-1.814h2.42c.5 0 .907.406.907.907m8.768-8.767a.907.907 0 0 1-.907-.907v-2.42a.907.907 0 1 1 1.814 0v2.42c0 .5-.406.907-.907.907" clip-rule="evenodd"></path><g opacity=".6"><path d="M30.077 30.334a.907.907 0 0 1-1.282.058l-2.687-2.457a.907.907 0 1 1 1.224-1.339l2.687 2.457c.37.338.396.912.058 1.281M9.927 30.334a.907.907 0 0 1 .057-1.281l2.687-2.457a.907.907 0 0 1 1.224 1.339l-2.687 2.457a.907.907 0 0 1-1.281-.058M13.924 14.24a.907.907 0 0 1-1.282 0l-2.687-2.688a.907.907 0 0 1 1.282-1.283l2.687 2.688a.907.907 0 0 1 0 1.282M26.079 14.24a.907.907 0 0 1 0-1.283l2.687-2.688a.907.907 0 0 1 1.283 1.283l-2.687 2.687a.907.907 0 0 1-1.283 0"></path></g></g><defs><clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20"></rect></clipPath></defs>',2)]))}const XL={render:JL},ZL={xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",fill:"none"};function QL(n,e){return I(),z("svg",ZL,e[0]||(e[0]=[ra('<g filter="url(#a)"><path fill="#DBDEE3" d="M21.045 19.374c2.26 3.912 1.293 8.818-2.045 11.657a10.4 10.4 0 0 0 5.131-1.397c4.977-2.874 6.69-9.21 3.828-14.165-2.86-4.956-9.204-6.64-14.181-3.767a10.35 10.35 0 0 0-3.636 3.534c4.1-1.368 8.663.258 10.903 4.138"></path></g><path fill="#fff" d="M21.045 19.373c2.26 3.912 1.293 8.817-2.045 11.657a10.4 10.4 0 0 0 5.131-1.397c4.977-2.874 6.69-9.21 3.828-14.165-2.86-4.956-9.204-6.64-14.181-3.767a10.35 10.35 0 0 0-3.636 3.534c4.1-1.368 8.663.258 10.903 4.138"></path><defs><filter id="a" width="26.051" height="27.58" x="6.718" y="6.875" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feGaussianBlur result="effect1_foregroundBlur_5298_34939" stdDeviation="1.712"></feGaussianBlur></filter></defs>',3)]))}const eB={render:QL},tB={class:"ivyforms-theme-switch__images"},nB={class:"ivyforms-theme-switch__images__item"},rB={class:"ivyforms-theme-switch__images__item"},oB=ue({__name:"IvyThemeSwitch",props:{modelValue:{default:"light"}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,o=O({get(){return t.modelValue},set(a){r("update:modelValue",a)}});function s(){o.value=o.value==="light"?"dark":"light"}return(a,i)=>(I(),z("div",{class:H(["ivyforms-theme-switch",{"is-dark":o.value==="dark"}]),onClick:s},[R(v(jL),{class:"ivyforms-theme-switch__background ivyforms-theme-switch__background--light"}),R(v(YL),{class:"ivyforms-theme-switch__background ivyforms-theme-switch__background--dark"}),Q("div",tB,[Q("div",nB,[R(v(XL))]),Q("div",rB,[R(v(eB))])])],2))}}),aB={},sB={xmlns:"http://www.w3.org/2000/svg",width:"2",height:"30",viewBox:"0 0 2 30",fill:"none"};function iB(n,e){return I(),z("svg",sB,e[0]||(e[0]=[Q("path",{d:"M1 1L1 29",stroke:"#5A6C7E","stroke-opacity":"0.2","stroke-linecap":"round"},null,-1)]))}const sp=sn(aB,[["render",iB]]),lB={xmlns:"http://www.w3.org/2000/svg",width:"147",height:"32",fill:"none"};function uB(n,e){return I(),z("svg",lB,e[0]||(e[0]=[ra('<path fill="#43D9B8" d="M17.754 13.682q0-5.82 2.952-8.417 3.03-2.598 9.714-2.598H32v9.82q0 12.081-6.89 15.485-2.41 1.194-5.776 1.195h-1.58zM12.64 29.167q-6.501 0-9.687-4.547Q0 20.411 0 12.487v-9.82h1.58q6.682 0 9.714 2.598 2.952 2.598 2.952 8.417v15.485z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M18.395 8.957q-.642 2.013-.641 4.725v15.485h1.58q3.367 0 5.776-1.196 5.523-2.728 6.619-11.031c-2.687-4.261-7.58-7.313-13.334-7.983M13.605 8.957q.642 2.013.641 4.725v15.485h-1.605q-6.502 0-9.688-4.547Q.893 21.684.27 16.941c2.687-4.261 7.58-7.314 13.335-7.984"></path></g><path fill="#03455A" d="M12.016 17.836c.872 3.131.555 6.983-2.117 7.117-3.14.157-6.237-1.098-7.206-3.973s.332-5.91 2.906-6.779 5.603.71 6.417 3.635"></path><path fill="#fff" d="M12.391 18.85c.818 2.911.575 6.478-1.825 6.574-2.822.112-5.618-1.085-6.52-3.761-.903-2.676.234-5.476 2.539-6.253 2.304-.777 5.043.72 5.806 3.44"></path><path fill="#03455A" d="M12.612 23.502c.354-1.306.222-3.075-.22-4.652q-.03-.106-.063-.207a3.48 3.48 0 1 0 .283 4.86"></path><path fill="#fff" d="M6.892 19.801a1.374 1.374 0 1 1 2.748 0 1.374 1.374 0 0 1-2.748 0"></path><path fill="#03455A" d="M20.152 17.837c-.872 3.13-.555 6.982 2.116 7.116 3.141.157 6.238-1.098 7.207-3.973.97-2.876-.332-5.91-2.906-6.779s-5.603.71-6.417 3.636"></path><path fill="#fff" d="M19.777 18.85c-.818 2.911-.575 6.478 1.825 6.574 2.822.112 5.618-1.085 6.52-3.76.903-2.677-.234-5.477-2.539-6.254s-5.043.72-5.806 3.44"></path><path fill="#03455A" d="M19.556 23.502c-.354-1.306-.222-3.075.22-4.652q.03-.106.063-.207a3.48 3.48 0 1 1-.283 4.86"></path><path fill="#fff" d="M25.28 19.788a1.387 1.387 0 1 0-2.774 0 1.387 1.387 0 0 0 2.775 0"></path><path fill="#0A0F1A" d="M38.453 24.773a.65.65 0 0 1-.186.4.51.51 0 0 1-.374.16.58.58 0 0 1-.426-.16.6.6 0 0 1-.134-.4V7.227q0-.24.16-.4a.54.54 0 0 1 .4-.16q.24 0 .4.16t.16.4zM42.432 11.547q.132 0 .266.106a.4.4 0 0 1 .214.24l4.933 11.814-.267.186 5.014-12q.133-.346.56-.346.132 0 .32.106a.35.35 0 0 1 .186.32q0 .134-.026.214l-.054.106-5.306 12.694a.5.5 0 0 1-.507.346.7.7 0 0 1-.32-.08.56.56 0 0 1-.187-.266L41.925 12.32l-.053-.107v-.133q0-.213.133-.373t.427-.16M66.634 11.6q.24 0 .373.16.16.16.16.373v11.894q0 2.053-.827 3.546-.825 1.493-2.24 2.294-1.413.8-3.226.8-1.227 0-2.214-.294-.96-.293-1.573-.72a1 1 0 0 1-.293-.32.4.4 0 0 1 0-.4.6.6 0 0 1 .293-.293.4.4 0 0 1 .4.053q.454.267 1.36.64.934.374 2.08.374 1.547 0 2.693-.72a4.8 4.8 0 0 0 1.814-2q.666-1.28.666-2.96v-1.974l.054.667q-.374.8-1.147 1.467a6.4 6.4 0 0 1-1.707 1.04 5.2 5.2 0 0 1-1.946.373q-1.655 0-2.72-.64a4.05 4.05 0 0 1-1.547-1.813q-.48-1.147-.48-2.694v-8.32q0-.213.133-.373a.54.54 0 0 1 .4-.16.46.46 0 0 1 .374.16q.16.16.16.373v8.32q0 1.894.826 3.014.854 1.12 2.854 1.12 1.2 0 2.266-.587a5.5 5.5 0 0 0 1.787-1.573q.693-.96.693-1.974v-8.32q0-.213.134-.373a.54.54 0 0 1 .4-.16M72.674 25.333q-.64 0-1.04-.373a1.4 1.4 0 0 1-.373-.987V8.027q0-.587.4-.96.4-.4.96-.4h9.013q.587 0 .96.373.4.373.4.933 0 .507-.4.88-.374.374-.96.374h-7.786l.186-.267v5.947l-.16-.32h6.56q.587 0 .96.373.4.373.4.933 0 .507-.4.88-.373.374-.96.374h-6.613l.213-.214v7.04q0 .587-.4.987a1.36 1.36 0 0 1-.96.373M98.776 18.32q0 2.133-.933 3.787a6.87 6.87 0 0 1-2.533 2.56q-1.6.933-3.6.933t-3.6-.933a7.07 7.07 0 0 1-2.56-2.56q-.934-1.654-.934-3.787 0-2.16.934-3.787a7 7 0 0 1 2.56-2.586q1.599-.96 3.6-.96 2 0 3.6.96a6.8 6.8 0 0 1 2.533 2.586q.933 1.627.933 3.787m-2.666 0q0-1.467-.587-2.533a4.36 4.36 0 0 0-1.6-1.707 4 4 0 0 0-2.213-.64 4.1 4.1 0 0 0-2.24.64 4.36 4.36 0 0 0-1.6 1.707q-.587 1.066-.587 2.533 0 1.413.587 2.507a4.36 4.36 0 0 0 1.6 1.706 4.24 4.24 0 0 0 2.24.614q1.227 0 2.213-.614a4.36 4.36 0 0 0 1.6-1.706q.587-1.094.587-2.507M102.861 25.333q-.587 0-.96-.373a1.4 1.4 0 0 1-.373-.987V12.667q0-.586.373-.96.373-.4.96-.4.56 0 .934.4.4.374.4.96v2.986l-.267-1.146q.213-.747.64-1.387.453-.64 1.067-1.12t1.36-.747a4.9 4.9 0 0 1 1.6-.266q.693 0 1.2.373.506.373.506.933 0 .72-.373 1.067a1.24 1.24 0 0 1-.827.32q-.4 0-.773-.16a1.95 1.95 0 0 0-.88-.187q-.56 0-1.147.294a3.3 3.3 0 0 0-1.066.88q-.48.56-.774 1.333a5.3 5.3 0 0 0-.266 1.733v6.4q0 .587-.4.987-.373.373-.934.373M119.447 11.067q1.974 0 3.04.986 1.066.96 1.414 2.614l-.427-.134.187-.426q.346-.694 1.04-1.387a5.8 5.8 0 0 1 1.706-1.173q.987-.48 2.107-.48 1.84 0 2.853.8 1.014.772 1.414 2.106.4 1.307.4 2.934v7.066q0 .587-.374.987-.374.373-.96.373-.56 0-.96-.373a1.4 1.4 0 0 1-.373-.987v-7.04a5.2 5.2 0 0 0-.267-1.706 2.3 2.3 0 0 0-.88-1.227q-.614-.48-1.706-.48-1.04 0-1.867.48a3.32 3.32 0 0 0-1.707 2.933v7.04q0 .587-.373.987-.374.373-.96.373-.587 0-.96-.373a1.4 1.4 0 0 1-.373-.987v-7.066q0-.934-.267-1.707a2.35 2.35 0 0 0-.853-1.227q-.613-.453-1.707-.453-1.04 0-1.84.453a3.3 3.3 0 0 0-1.253 1.227 3.47 3.47 0 0 0-.427 1.707v7.066q0 .587-.4.987-.374.373-.933.373-.588 0-.96-.373a1.4 1.4 0 0 1-.374-.987V12.667q0-.586.374-.96.372-.4.96-.4.56 0 .933.4.4.374.4.96v1.573l-.507.293q.187-.585.614-1.2.426-.613 1.066-1.12a6.3 6.3 0 0 1 1.467-.826 4.6 4.6 0 0 1 1.733-.32M135.819 23.147a1.4 1.4 0 0 1-.213-.854q.026-.506.56-.853a1.12 1.12 0 0 1 .773-.187q.427.027.8.4a6 6 0 0 0 1.653 1.307q.934.48 2.24.48.534-.027 1.094-.16a2.3 2.3 0 0 0 .96-.533q.4-.401.4-1.147 0-.666-.427-1.067-.426-.4-1.12-.64a15 15 0 0 0-1.493-.48 38 38 0 0 1-1.734-.533 7 7 0 0 1-1.546-.747 4 4 0 0 1-1.147-1.226q-.427-.747-.427-1.84 0-1.254.694-2.16a4.87 4.87 0 0 1 1.84-1.414 6.1 6.1 0 0 1 2.48-.506q.773 0 1.626.213.853.187 1.654.613.8.427 1.386 1.12.267.347.294.827.053.48-.427.853a1.06 1.06 0 0 1-.773.24 1.18 1.18 0 0 1-.747-.293 3.3 3.3 0 0 0-1.307-.987q-.8-.373-1.813-.373-.506 0-1.067.16a1.9 1.9 0 0 0-.906.507q-.374.373-.374 1.093 0 .666.427 1.067.453.4 1.173.666.72.267 1.574.48.826.214 1.626.507.827.294 1.467.773.667.454 1.067 1.2.426.72.426 1.84 0 1.307-.773 2.24-.747.907-1.92 1.387-1.146.48-2.427.48a9.1 9.1 0 0 1-3.04-.533q-1.493-.561-2.533-1.92"></path>',11)]))}const cB={render:uB},dB={xmlns:"http://www.w3.org/2000/svg",width:"83",height:"72",fill:"none"};function fB(n,e){return I(),z("svg",dB,e[0]||(e[0]=[ra('<path fill="#43D9B8" d="M44.202 17.958q0-7.638 3.876-11.048Q52.055 3.5 60.827 3.5h2.074v12.89q0 15.855-9.043 20.323-3.162 1.568-7.582 1.568h-2.074zm-6.71 20.323q-8.535 0-12.715-5.967Q20.9 26.79 20.9 16.39V3.5h2.074q8.77 0 12.749 3.41 3.875 3.41 3.875 11.048v20.323z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M45.044 11.756q-.842 2.642-.842 6.202v20.323h2.074q4.42 0 7.581-1.568 7.25-3.581 8.688-14.48c-3.527-5.592-9.948-9.597-17.5-10.477M38.757 11.756q.843 2.642.842 6.202v20.323h-2.107q-8.535 0-12.715-5.967-2.704-3.853-3.522-10.079c3.527-5.593 9.949-9.6 17.502-10.479"></path></g><path fill="#03455A" d="M36.672 23.41c1.144 4.11.729 9.164-2.778 9.34-4.122.207-8.187-1.44-9.459-5.214s.436-7.758 3.815-8.897 7.353.933 8.422 4.771"></path><path fill="#fff" d="M37.165 24.74c1.072 3.822.753 8.504-2.397 8.629-3.703.147-7.373-1.424-8.558-4.936s.308-7.187 3.333-8.207 6.62.944 7.621 4.514"></path><path fill="#03455A" d="M37.454 30.847c.464-1.714.292-4.037-.29-6.107a7 7 0 0 0-.081-.271 4.566 4.566 0 1 0 .371 6.378"></path><path fill="#fff" d="M29.947 25.99a1.803 1.803 0 1 1 3.606 0 1.803 1.803 0 0 1-3.606 0"></path><path fill="#03455A" d="M47.35 23.41c-1.144 4.11-.728 9.164 2.778 9.34 4.122.207 8.187-1.44 9.46-5.214 1.271-3.775-.436-7.758-3.816-8.897s-7.353.933-8.422 4.771"></path><path fill="#fff" d="M46.858 24.74c-1.073 3.822-.754 8.504 2.396 8.629 3.703.147 7.373-1.424 8.558-4.936s-.308-7.187-3.333-8.207-6.62.944-7.621 4.514"></path><path fill="#03455A" d="M46.568 30.847c-.464-1.714-.292-4.037.29-6.107q.038-.138.082-.271a4.566 4.566 0 1 1-.371 6.378"></path><path fill="#fff" d="M54.082 25.972a1.821 1.821 0 1 0-3.642 0 1.821 1.821 0 0 0 3.642 0"></path><path fill="#0A0F1A" d="M1.799 67.58a.5.5 0 0 1-.14.3.38.38 0 0 1-.28.12.43.43 0 0 1-.32-.12.45.45 0 0 1-.1-.3V54.42a.407.407 0 0 1 .42-.42.407.407 0 0 1 .42.42zM4.782 57.66a.32.32 0 0 1 .2.08q.12.06.16.18l3.7 8.86-.2.14 3.76-9q.1-.26.42-.26.1 0 .24.08a.26.26 0 0 1 .14.24q0 .1-.02.16l-.04.08-3.98 9.52a.375.375 0 0 1-.38.26q-.12 0-.24-.06a.42.42 0 0 1-.14-.2l-4-9.5-.04-.08v-.1q0-.16.1-.28t.32-.12M22.934 57.7q.18 0 .28.12.12.12.12.28v8.92q0 1.54-.62 2.66a4.35 4.35 0 0 1-1.68 1.72q-1.06.6-2.42.6a5.8 5.8 0 0 1-1.66-.22q-.72-.22-1.18-.54a.75.75 0 0 1-.22-.24.3.3 0 0 1 0-.3.44.44 0 0 1 .22-.22.3.3 0 0 1 .3.04q.34.2 1.02.48.7.28 1.56.28 1.16 0 2.02-.54.88-.54 1.36-1.5.5-.96.5-2.22v-1.48l.04.5q-.28.6-.86 1.1-.56.48-1.28.78-.7.28-1.46.28-1.24 0-2.04-.48a3.04 3.04 0 0 1-1.16-1.36q-.36-.86-.36-2.02V58.1q0-.16.1-.28.12-.12.3-.12t.28.12q.12.12.12.28v6.24q0 1.42.62 2.26.64.84 2.14.84.9 0 1.7-.44a4.1 4.1 0 0 0 1.34-1.18q.52-.72.52-1.48V58.1q0-.16.1-.28.12-.12.3-.12M27.464 68q-.48 0-.78-.28-.28-.3-.28-.74V55.02q0-.44.3-.72.3-.3.72-.3h6.76q.441 0 .72.28.3.28.3.7 0 .38-.3.66a.98.98 0 0 1-.72.28h-5.84l.14-.2v4.46l-.12-.24h4.92q.441 0 .72.28.3.28.3.7 0 .38-.3.66a.98.98 0 0 1-.72.28h-4.96l.16-.16v5.28q0 .44-.3.74-.3.28-.72.28M47.041 62.74q0 1.6-.7 2.84a5.15 5.15 0 0 1-1.9 1.92q-1.2.7-2.7.7t-2.7-.7a5.3 5.3 0 0 1-1.92-1.92q-.7-1.24-.7-2.84 0-1.62.7-2.84a5.26 5.26 0 0 1 1.92-1.94q1.2-.72 2.7-.72t2.7.72a5.1 5.1 0 0 1 1.9 1.94q.7 1.22.7 2.84m-2 0q0-1.1-.44-1.9a3.27 3.27 0 0 0-1.2-1.28 3 3 0 0 0-1.66-.48q-.92 0-1.68.48a3.27 3.27 0 0 0-1.2 1.28q-.44.8-.44 1.9 0 1.06.44 1.88t1.2 1.28 1.68.46a3.1 3.1 0 0 0 1.66-.46 3.27 3.27 0 0 0 1.2-1.28q.44-.82.44-1.88M50.105 68a.98.98 0 0 1-.72-.28q-.28-.3-.28-.74V58.5q0-.44.28-.72a.94.94 0 0 1 .72-.3q.42 0 .7.3.3.28.3.72v2.24l-.2-.86q.159-.56.48-1.04.34-.48.8-.84.459-.36 1.02-.56.579-.2 1.2-.2.519 0 .9.28.38.28.38.7 0 .54-.28.8a.93.93 0 0 1-.62.24q-.3 0-.58-.12a1.46 1.46 0 0 0-.66-.14q-.42 0-.86.22t-.8.66a3.3 3.3 0 0 0-.58 1q-.2.58-.2 1.3v4.8q0 .44-.3.74a.95.95 0 0 1-.7.28M62.544 57.3q1.48 0 2.28.74.8.72 1.06 1.96l-.32-.1.14-.32q.26-.52.78-1.04.54-.54 1.28-.88.74-.36 1.58-.36 1.38 0 2.14.6.76.58 1.06 1.58.3.98.3 2.2v5.3q0 .44-.28.74a.98.98 0 0 1-.72.28q-.42 0-.72-.28-.28-.3-.28-.74V61.7q0-.7-.2-1.28a1.72 1.72 0 0 0-.66-.92q-.46-.36-1.28-.36-.78 0-1.4.36a2.49 2.49 0 0 0-1.28 2.2v5.28q0 .44-.28.74a.98.98 0 0 1-.72.28.98.98 0 0 1-.72-.28q-.28-.3-.28-.74v-5.3q0-.7-.2-1.28a1.76 1.76 0 0 0-.64-.92q-.46-.34-1.28-.34-.78 0-1.38.34t-.94.92q-.32.58-.32 1.28v5.3q0 .44-.3.74a.95.95 0 0 1-.7.28.98.98 0 0 1-.72-.28q-.28-.3-.28-.74V58.5q0-.44.28-.72a.94.94 0 0 1 .72-.3q.42 0 .7.3.3.28.3.72v1.18l-.38.22a3.4 3.4 0 0 1 .46-.9 4 4 0 0 1 .8-.84q.5-.38 1.1-.62t1.3-.24M74.823 66.36q-.18-.28-.16-.64.02-.38.42-.64a.84.84 0 0 1 .58-.14q.32.02.6.3.56.62 1.24.98.7.36 1.68.36.4-.02.82-.12.42-.12.72-.4.3-.3.3-.86 0-.5-.32-.8t-.84-.48a11 11 0 0 0-1.12-.36 29 29 0 0 1-1.3-.4 5.2 5.2 0 0 1-1.16-.56 3 3 0 0 1-.86-.92q-.32-.56-.32-1.38 0-.94.52-1.62a3.65 3.65 0 0 1 1.38-1.06 4.55 4.55 0 0 1 1.86-.38q.58 0 1.22.16.64.14 1.24.46t1.04.84q.2.26.22.62.04.36-.32.64a.8.8 0 0 1-.58.18.88.88 0 0 1-.56-.22 2.5 2.5 0 0 0-.98-.74q-.6-.28-1.36-.28-.38 0-.8.12a1.43 1.43 0 0 0-.68.38q-.28.28-.28.82 0 .5.32.8.34.3.88.5t1.18.36q.62.16 1.22.38.62.22 1.1.58.5.34.8.9.32.54.32 1.38 0 .98-.58 1.68-.56.68-1.44 1.04-.86.36-1.82.36-1.14 0-2.28-.4-1.12-.42-1.9-1.44"></path>',11)]))}const pB={render:fB},hB={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none"};function mB(n,e){return I(),z("svg",hB,e[0]||(e[0]=[ra('<path fill="#43D9B8" d="M13.315 10.262q0-4.365 2.215-6.313Q17.803 1.999 22.815 2H24v7.365q0 9.06-5.168 11.614-1.806.896-4.332.896h-1.185zM9.48 21.875q-4.875 0-7.265-3.41Q0 15.31 0 9.365V2h1.185Q6.197 2 8.47 3.949q2.215 1.948 2.215 6.313v11.613z"></path><g fill="#fff" opacity=".6" style="mix-blend-mode:luminosity;"><path d="M13.796 6.718q-.48 1.509-.48 3.544v11.613H14.5q2.526 0 4.332-.896 4.143-2.046 4.965-8.274c-2.016-3.196-5.685-5.485-10-5.987M10.204 6.718q.48 1.509.48 3.544v11.613H9.48q-4.875 0-7.265-3.41Q.67 16.264.203 12.705c2.015-3.195 5.684-5.484 10-5.987"></path></g><path fill="#03455A" d="M9.012 13.377c.654 2.348.416 5.237-1.587 5.338-2.356.118-4.678-.824-5.405-2.98s.248-4.433 2.18-5.084c1.93-.651 4.201.533 4.812 2.726"></path><path fill="#fff" d="M9.294 14.137c.612 2.184.43 4.86-1.37 4.931-2.116.084-4.213-.814-4.89-2.82-.677-2.008.176-4.108 1.905-4.69 1.728-.583 3.782.539 4.355 2.58"></path><path fill="#03455A" d="M9.459 17.627c.265-.98.167-2.307-.165-3.49l-.047-.155a2.61 2.61 0 1 0 .212 3.645"></path><path fill="#fff" d="M5.169 14.851a1.03 1.03 0 1 1 2.061 0 1.03 1.03 0 0 1-2.061 0"></path><path fill="#03455A" d="M15.114 13.377c-.654 2.348-.416 5.237 1.587 5.338 2.356.118 4.678-.824 5.406-2.98s-.25-4.433-2.18-5.084-4.202.533-4.813 2.726"></path><path fill="#fff" d="M14.832 14.137c-.613 2.184-.43 4.86 1.37 4.931 2.116.084 4.213-.813 4.89-2.82.677-2.008-.176-4.108-1.905-4.69-1.728-.583-3.782.539-4.355 2.58"></path><path fill="#03455A" d="M14.667 17.627c-.265-.98-.167-2.307.165-3.49l.047-.155a2.61 2.61 0 1 1-.212 3.645"></path><path fill="#fff" d="M18.96 14.841a1.04 1.04 0 1 0-2.08 0 1.04 1.04 0 0 0 2.08 0"></path>',10)]))}const vB={render:mB},gB=ue({__name:"IvyLogo",props:{orientation:{default:"horizontal"}},setup(n){const e=n;return(t,r)=>(I(),z("div",{class:H(`ivyforms-logo ${e.orientation}`)},[e.orientation==="horizontal"?(I(),me(v(cB),{key:0})):e.orientation==="vertical"?(I(),me(v(pB),{key:1})):(I(),me(v(vB),{key:2}))],2))}});function b5(n){return J9()?(x4(n),!0):!1}const mm=new WeakMap,yB=(...n)=>{var e;const t=n[0],r=(e=yn())==null?void 0:e.proxy;if(r==null&&!T4())throw new Error("injectLocal must be called in setup");return r&&mm.has(r)&&t in mm.get(r)?mm.get(r)[t]:yt(...n)},S5=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bB=Object.prototype.toString,SB=n=>bB.call(n)==="[object Object]",vm=()=>{},wB=CB();function CB(){var n,e;return S5&&((n=window==null?void 0:window.navigator)==null?void 0:n.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xB(n,e){var t;if(typeof n=="number")return n+e;const r=((t=n.match(/^-?\d+\.?\d*/))==null?void 0:t[0])||"",o=n.slice(r.length),s=Number.parseFloat(r)+e;return Number.isNaN(s)?n:s+o}function uu(n){return n.endsWith("rem")?Number.parseFloat(n)*16:Number.parseFloat(n)}function kB(n){return yn()}function gm(n){return Array.isArray(n)?n:[n]}function EB(n,e=!0,t){kB()?ln(n,t):e?n():Dt(n)}function TB(n,e,t){return Xe(n,e,{...t,immediate:!0})}var td={};/*! |
| 11 |
* cookie |
| 12 |
* Copyright(c) 2012-2014 Roman Shtylman |
| 13 |
* Copyright(c) 2015 Douglas Christopher Wilson |
| 14 |
* MIT Licensed |
| 15 |
*/var E2;function MB(){if(E2)return td;E2=1,td.parse=a,td.serialize=c;var n=Object.prototype.toString,e=Object.prototype.hasOwnProperty,t=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,s=/^[\u0020-\u003A\u003D-\u007E]*$/;function a(m,g){if(typeof m!="string")throw new TypeError("argument str must be a string");var y={},S=m.length;if(S<2)return y;var w=g&&g.decode||d,x=0,T=0,k=0;do{if(T=m.indexOf("=",x),T===-1)break;if(k=m.indexOf(";",x),k===-1)k=S;else if(T>k){x=m.lastIndexOf(";",T-1)+1;continue}var C=i(m,x,T),M=l(m,T,C),A=m.slice(C,M);if(!e.call(y,A)){var V=i(m,T+1,k),P=l(m,k,V);m.charCodeAt(V)===34&&m.charCodeAt(P-1)===34&&(V++,P--);var L=m.slice(V,P);y[A]=h(L,w)}x=k+1}while(x<S);return y}function i(m,g,y){do{var S=m.charCodeAt(g);if(S!==32&&S!==9)return g}while(++g<y);return y}function l(m,g,y){for(;g>y;){var S=m.charCodeAt(--g);if(S!==32&&S!==9)return g+1}return y}function c(m,g,y){var S=y&&y.encode||encodeURIComponent;if(typeof S!="function")throw new TypeError("option encode is invalid");if(!t.test(m))throw new TypeError("argument name is invalid");var w=S(g);if(!r.test(w))throw new TypeError("argument val is invalid");var x=m+"="+w;if(!y)return x;if(y.maxAge!=null){var T=Math.floor(y.maxAge);if(!isFinite(T))throw new TypeError("option maxAge is invalid");x+="; Max-Age="+T}if(y.domain){if(!o.test(y.domain))throw new TypeError("option domain is invalid");x+="; Domain="+y.domain}if(y.path){if(!s.test(y.path))throw new TypeError("option path is invalid");x+="; Path="+y.path}if(y.expires){var k=y.expires;if(!f(k)||isNaN(k.valueOf()))throw new TypeError("option expires is invalid");x+="; Expires="+k.toUTCString()}if(y.httpOnly&&(x+="; HttpOnly"),y.secure&&(x+="; Secure"),y.partitioned&&(x+="; Partitioned"),y.priority){var C=typeof y.priority=="string"?y.priority.toLowerCase():y.priority;switch(C){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(y.sameSite){var M=typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite;switch(M){case!0:x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"strict":x+="; SameSite=Strict";break;case"none":x+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return x}function d(m){return m.indexOf("%")!==-1?decodeURIComponent(m):m}function f(m){return n.call(m)==="[object Date]"}function h(m,g){try{return g(m)}catch{return m}}return td}var $d=MB();function IB(){const n=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof n=="boolean"?n:typeof document=="object"&&typeof document.cookie=="string"}function OB(n){return typeof n=="string"?$d.parse(n):typeof n=="object"&&n!==null?n:{}}function ym(n,e={}){const t=_B(n);if(!e.doNotParse)try{return JSON.parse(t)}catch{}return n}function _B(n){return n&&n[0]==="j"&&n[1]===":"?n.substr(2):n}class AB{constructor(e,t={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const o=this.cookies;this.cookies=$d.parse(document.cookie),this._checkChanges(o)};const r=typeof document>"u"?"":document.cookie;this.cookies=OB(e||r),this.defaultSetOptions=t,this.HAS_DOCUMENT_COOKIE=IB()}_emitChange(e){for(let t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)}_checkChanges(e){new Set(Object.keys(e).concat(Object.keys(this.cookies))).forEach(r=>{e[r]!==this.cookies[r]&&this._emitChange({name:r,value:ym(this.cookies[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(e,t={}){return t.doNotUpdate||this.update(),ym(this.cookies[e],t)}getAll(e={}){e.doNotUpdate||this.update();const t={};for(let r in this.cookies)t[r]=ym(this.cookies[r],e);return t}set(e,t,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const o=typeof t=="string"?t:JSON.stringify(t);this.cookies=Object.assign(Object.assign({},this.cookies),{[e]:o}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=$d.serialize(e,o,r)),this._emitChange({name:e,value:t,options:r})}remove(e,t){const r=t=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=$d.serialize(e,"",r)),this._emitChange({name:e,value:void 0,options:t})}addChangeListener(e){this.changeListeners.push(e),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(e){const t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}function w5(n,{doNotParse:e=!1,autoUpdateDependencies:t=!1}={},r=new AB){const o=t?[...n||[]]:n;let s=r.getAll({doNotParse:!0});const a=N(0),i=()=>{const l=r.getAll({doNotParse:!0});RB(o||null,l,s)&&a.value++,s=l};return r.addChangeListener(i),b5(()=>{r.removeChangeListener(i)}),{get:(...l)=>(t&&o&&!o.includes(l[0])&&o.push(l[0]),a.value,r.get(l[0],{doNotParse:e,...l[1]})),getAll:(...l)=>(a.value,r.getAll({doNotParse:e,...l[0]})),set:(...l)=>r.set(...l),remove:(...l)=>r.remove(...l),addChangeListener:(...l)=>r.addChangeListener(...l),removeChangeListener:(...l)=>r.removeChangeListener(...l)}}function RB(n,e,t){if(!n)return!0;for(const r of n)if(e[r]!==t[r])return!0;return!1}const ip=vl("globalState",{state:()=>({currentPage:"",isFullScreenMode:!1}),actions:{setCurrentPage(n){this.currentPage=n},setFullScreenMode(n){this.isFullScreenMode=n}}});function PB(n){return{all:n=n||new Map,on:function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},off:function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},emit:function(e,t){var r=n.get(e);r&&r.slice().map(function(o){o(t)}),(r=n.get("*"))&&r.slice().map(function(o){o(e,t)})}}}const $B=PB(),Xi=N("light"),C5=w5(["ivyforms_theme"]),nd=C5.get("ivyforms_theme");nd&&(nd==="light"||nd==="dark")&&(Xi.value=nd);const T2=n=>{Xi.value=n,C5.set("ivyforms_theme",n),n==="dark"?document.body.classList.add("ivyforms-theme-dark"):document.body.classList.remove("ivyforms-theme-dark"),$B.emit("theme-changed",n)};function x5(){return{theme:O({get:()=>Xi.value,set:e=>T2(e)}),isDark:()=>Xi.value==="dark",isLight:()=>Xi.value==="light",setTheme:T2,getTheme:()=>Xi.value}}const DB={class:"ivyforms-header"},NB={class:"ivyforms-header__left"},LB={key:2,class:"ivyforms-header__title ivyforms-flex-1 ivyforms-align-items-center ivyforms-gap-12 medium-18"},BB={class:"ivyforms-header__center"},FB={class:"ivyforms-header__right"},VB=ue({__name:"PageHeader",setup(n){const{getLabel:e}=rn(),t=w5(),r=N(!1),o=ip(),s=yt("pageTitle",""),a=N(!1),i=O(()=>new URLSearchParams(window.location.search).get("page")==="ivyforms-builder"),{theme:l,setTheme:c}=x5();X9(()=>{c(t.get("ivyforms_theme")||"light")});const d=()=>{r.value=!r.value,o.setFullScreenMode(r.value),a.value=!0;const h=document.body,m=document.getElementById("adminmenumain"),g=document.getElementById("wpcontent"),y=document.getElementById("wpadminbar"),S=document.getElementsByClassName("wp-toolbar")[0];localStorage.setItem("ivyFullscreenMode",r.value?"true":"false"),r.value?(h.classList.add("ivyforms-fullscreen-mode"),m&&(m.style.display="none"),g&&(g.style.marginLeft="0",g.style.width="100vw",g.style.height="100vh"),y&&(y.style.display="none"),S instanceof HTMLElement&&(S.style.padding="0")):(h.classList.remove("ivyforms-fullscreen-mode"),m&&(m.style.display=""),g&&(g.style.marginLeft="",g.style.width="",g.style.height=""),y&&(y.style.display=""),S instanceof HTMLElement&&(S.style.padding="")),setTimeout(()=>{a.value=!1},1e3)},f=()=>{window.location.href="admin.php?page=ivyforms-forms"};return ln(()=>{if(localStorage.getItem("ivyFullscreenMode")==="true"){r.value=!0,o.setFullScreenMode(r.value),document.body.classList.add("ivyforms-fullscreen-mode");const m=document.getElementById("adminmenumain"),g=document.getElementById("wpcontent"),y=document.getElementById("wpadminbar"),S=document.getElementsByClassName("wp-toolbar")[0];m&&(m.style.display="none"),g&&(g.style.marginLeft="0",g.style.width="100vw",g.style.height="100vh"),y&&(y.style.display="none"),S instanceof HTMLElement&&(S.style.padding="0")}}),Jf(()=>{document.body.classList.remove("ivyforms-fullscreen-mode");const h=document.getElementById("adminmenumain");h&&(h.style.display="")}),(h,m)=>{const g=Qt,y=gB,S=sp,w=oB,x=Xu;return I(),z("header",DB,[Q("div",NB,[r.value&&i.value?(I(),me(g,{key:0,priority:"tertiary","icon-start":"chevron-left","icon-start-category":"arrows","icon-start-type":"outline",onClick:f},{default:q(()=>[ht(Ee(v(e)("back")),1)]),_:1})):(I(),me(y,{key:1,class:"ivyforms-header__logo",orientation:"logoOnly"})),R(S),v(s)&&!r.value?(I(),z("div",LB,[Q("span",null,Ee(v(s)),1)])):fe("",!0),ve(h.$slots,"left",{},void 0,!0)]),Q("div",BB,[ve(h.$slots,"center",{},void 0,!0)]),Q("div",FB,[R(x,{content:v(l)==="dark"?v(e)("light_theme"):v(e)("dark_theme"),placement:"bottom"},{default:q(()=>[R(w,{modelValue:v(l),"onUpdate:modelValue":m[0]||(m[0]=T=>Pa(l)?l.value=T:null)},null,8,["modelValue"])]),_:1},8,["content"]),R(S),ve(h.$slots,"right",{},void 0,!0),R(x,{content:r.value?v(e)("collapse"):v(e)("full_screen"),disabled:a.value},{default:q(()=>[R(g,{priority:"tertiary","icon-start-category":"arrows","icon-start":r.value?"collapse":"expand",onClick:d},null,8,["icon-start"])]),_:1},8,["content","disabled"])])])}}}),lp=sn(VB,[["__scopeId","data-v-30e226e4"]]),zB=ue({__name:"DashboardPage",setup(n){const{getLabel:e}=rn(),t=e("dashboard");return mn("pageTitle",t),(r,o)=>{const s=lp;return I(),me(s)}}}),HB={class:"ivyforms-page-section ivyforms-flex ivyforms-flex-1 ivyforms-p-20 ivyforms-gap-24"},WB={ref:"bottomPaddingRef",class:"ivyforms-scroll-bottom-padding"},UB=ue({__name:"PageSection",props:{hasTable:{type:Boolean,default:!1}},setup(n){const e=n,t=_s(),r=O(()=>{const s=t.hash.replace("#",""),a=t.path,i=s||a;return i.includes("/settings/general/")?"general":i.includes("/notification/manage/")?"notification":i.includes("/confirmation/manage/")?"confirmation":null}),o=O(()=>{if(e.hasTable)return"";const s="ivyforms-page-section__content";return r.value?`${s} ${s}__${r.value}`:s});return(s,a)=>(I(),z("div",HB,[Q("div",{ref:"contentRef",class:H(o.value)},[ve(s.$slots,"default",{},void 0,!0),Q("div",WB,null,512)],2)]))}}),P1=sn(UB,[["__scopeId","data-v-06ea585c"]]),up=S5?window:void 0;function Jl(n){var e;const t=zo(n);return(e=t==null?void 0:t.$el)!=null?e:t}function Ta(...n){const e=[],t=()=>{e.forEach(i=>i()),e.length=0},r=(i,l,c,d)=>(i.addEventListener(l,c,d),()=>i.removeEventListener(l,c,d)),o=O(()=>{const i=gm(zo(n[0])).filter(l=>l!=null);return i.every(l=>typeof l!="string")?i:void 0}),s=TB(()=>{var i,l;return[(l=(i=o.value)==null?void 0:i.map(c=>Jl(c)))!=null?l:[up].filter(c=>c!=null),gm(zo(o.value?n[1]:n[0])),gm(v(o.value?n[2]:n[1])),zo(o.value?n[3]:n[2])]},([i,l,c,d])=>{if(t(),!(i!=null&&i.length)||!(l!=null&&l.length)||!(c!=null&&c.length))return;const f=SB(d)?{...d}:d;e.push(...i.flatMap(h=>l.flatMap(m=>c.map(g=>r(h,m,g,f)))))},{flush:"post"}),a=()=>{s(),t()};return b5(t),a}let M2=!1;function Iv(n,e,t={}){const{window:r=up,ignore:o=[],capture:s=!0,detectIframe:a=!1}=t;if(!r)return vm;if(wB&&!M2){M2=!0;const y={passive:!0};Array.from(r.document.body.children).forEach(S=>Ta(S,"click",vm,y)),Ta(r.document.documentElement,"click",vm,y)}let i=!0;const l=y=>zo(o).some(S=>{if(typeof S=="string")return Array.from(r.document.querySelectorAll(S)).some(w=>w===y.target||y.composedPath().includes(w));{const w=Jl(S);return w&&(y.target===w||y.composedPath().includes(w))}});function c(y){const S=zo(y);return S&&S.$.subTree.shapeFlag===16}function d(y,S){const w=zo(y),x=w.$.subTree&&w.$.subTree.children;return x==null||!Array.isArray(x)?!1:x.some(T=>T.el===S.target||S.composedPath().includes(T.el))}const f=y=>{const S=Jl(n);if(y.target!=null&&!(!(S instanceof Element)&&c(n)&&d(n,y))&&!(!S||S===y.target||y.composedPath().includes(S))){if(y.detail===0&&(i=!l(y)),!i){i=!0;return}e(y)}};let h=!1;const m=[Ta(r,"click",y=>{h||(h=!0,setTimeout(()=>{h=!1},0),f(y))},{passive:!0,capture:s}),Ta(r,"pointerdown",y=>{const S=Jl(n);i=!l(y)&&!!(S&&!y.composedPath().includes(S))},{passive:!0}),a&&Ta(r,"blur",y=>{setTimeout(()=>{var S;const w=Jl(n);((S=r.document.activeElement)==null?void 0:S.tagName)==="IFRAME"&&!(w!=null&&w.contains(r.document.activeElement))&&e(y)},0)},{passive:!0})].filter(Boolean);return()=>m.forEach(y=>y())}function jB(){const n=N(!1),e=yn();return e&&ln(()=>{n.value=!0},e),n}function KB(n){const e=jB();return O(()=>(e.value,!!n()))}const GB=Symbol("vueuse-ssr-width");function k5(){const n=T4()?yB(GB,null):null;return typeof n=="number"?n:void 0}function Hl(n,e={}){const{window:t=up,ssrWidth:r=k5()}=e,o=KB(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function"),s=N(typeof r=="number"),a=vr(),i=N(!1),l=c=>{i.value=c.matches};return ml(()=>{if(s.value){s.value=!o.value;const c=zo(n).split(",");i.value=c.some(d=>{const f=d.includes("not all"),h=d.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),m=d.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(h||m);return h&&g&&(g=r>=uu(h[1])),m&&g&&(g=r<=uu(m[1])),f?!g:g});return}o.value&&(a.value=t.matchMedia(zo(n)),i.value=a.value.matches)}),Ta(a,"change",l,{passive:!0}),O(()=>i.value)}function YB(n,e={}){function t(m,g){let y=zo(n[zo(m)]);return g!=null&&(y=xB(y,g)),typeof y=="number"&&(y=`${y}px`),y}const{window:r=up,strategy:o="min-width",ssrWidth:s=k5()}=e,a=typeof s=="number",i=a?N(!1):{value:!0};a&&EB(()=>i.value=!!r);function l(m,g){return!i.value&&a?m==="min"?s>=uu(g):s<=uu(g):r?r.matchMedia(`(${m}-width: ${g})`).matches:!1}const c=m=>Hl(()=>`(min-width: ${t(m)})`,e),d=m=>Hl(()=>`(max-width: ${t(m)})`,e),f=Object.keys(n).reduce((m,g)=>(Object.defineProperty(m,g,{get:()=>o==="min-width"?c(g):d(g),enumerable:!0,configurable:!0}),m),{});function h(){const m=Object.keys(n).map(g=>[g,f[g],uu(t(g))]).sort((g,y)=>g[2]-y[2]);return O(()=>m.filter(([,g])=>g.value).map(([g])=>g))}return Object.assign(f,{greaterOrEqual:c,smallerOrEqual:d,greater(m){return Hl(()=>`(min-width: ${t(m,.1)})`,e)},smaller(m){return Hl(()=>`(max-width: ${t(m,-.1)})`,e)},between(m,g){return Hl(()=>`(min-width: ${t(m)}) and (max-width: ${t(g,-.1)})`,e)},isGreater(m){return l("min",t(m,.1))},isGreaterOrEqual(m){return l("min",t(m))},isSmaller(m){return l("max",t(m,-.1))},isSmallerOrEqual(m){return l("max",t(m))},isInBetween(m,g){return l("min",t(m))&&l("max",t(g,-.1))},current:h,active(){const m=h();return O(()=>m.value.length===0?"":m.value.at(o==="min-width"?-1:0))}})}function E5(n,e={}){const{threshold:t=50,onSwipe:r,onSwipeEnd:o,onSwipeStart:s,passive:a=!0}=e,i=Hn({x:0,y:0}),l=Hn({x:0,y:0}),c=O(()=>i.x-l.x),d=O(()=>i.y-l.y),{max:f,abs:h}=Math,m=O(()=>f(h(c.value),h(d.value))>=t),g=N(!1),y=O(()=>m.value?h(c.value)>h(d.value)?c.value>0?"left":"right":d.value>0?"up":"down":"none"),S=A=>[A.touches[0].clientX,A.touches[0].clientY],w=(A,V)=>{i.x=A,i.y=V},x=(A,V)=>{l.x=A,l.y=V},T={passive:a,capture:!a},k=A=>{g.value&&(o==null||o(A,y.value)),g.value=!1},C=[Ta(n,"touchstart",A=>{if(A.touches.length!==1)return;const[V,P]=S(A);w(V,P),x(V,P),s==null||s(A)},T),Ta(n,"touchmove",A=>{if(A.touches.length!==1)return;const[V,P]=S(A);x(V,P),T.capture&&!T.passive&&Math.abs(c.value)>Math.abs(d.value)&&A.preventDefault(),!g.value&&m.value&&(g.value=!0),g.value&&(r==null||r(A))},T),Ta(n,["touchend","touchcancel"],k,T)];return{isSwiping:g,direction:y,coordsStart:i,coordsEnd:l,lengthX:c,lengthY:d,stop:()=>C.forEach(A=>A()),isPassiveEventSupported:!0}}const qB={class:"ivyforms-subdialog-wrapper"},JB={class:"ivyforms-subdialog-header-icon"},XB={key:0,class:"ivyforms-subdialog__header__title-wrapper"},ZB={key:1,class:"ivyforms-subdialog__header__title-wrapper ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-8"},QB={class:"ivyforms-subdialog__header__title ivyforms-flex ivyforms-gap-8 ivyforms-justify-content-between ivyforms-align-items-center"},eF={class:"medium-18"},tF={key:0,class:"regular-16 ivyforms-text-secondary"},nF={key:2,class:"ivyforms-subdialog__header__close"},rF={key:0,class:"ivyforms-subdialog__body"},T5=ue({__name:"IvyShortDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},subtitle:{default:""},showClose:{type:Boolean,default:!0},width:{default:"500"},type:{default:"success"},align:{default:"center"}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,o=N(null),s=N(0),a=N(0),i=N(null),l=O({get(){return t.modelValue},set(h){r("update:modelValue",h)}}),c=()=>{s.value=0,d();const{direction:h,lengthY:m}=E5(o,{threshold:0,onSwipe(){h.value==="down"?s.value=Math.min(m.value,window.innerHeight):h.value==="up"&&(s.value=Math.max(s.value-m.value,0))},onSwipeEnd(){h.value==="down"&&Math.abs(m.value)>a.value/2?l.value=!1:s.value=0}});i.value.$el.nextSibling.querySelector(".el-overlay-dialog").scrollTo(0,0)},d=()=>{const h=document.querySelector(".ivyforms-subdialog");h&&(a.value=h.clientHeight)},f=()=>t.type==="success"?"check-circle":t.type==="warning"||t.type==="error"?"danger":t.type==="premium"?"bolt-lightning":t.type==="upcoming"?"upcoming":t.type==="default"?"sticker":"info";return(h,m)=>{const g=Jn,y=IS;return I(),z("div",qB,[R(y,xt({ref_key:"dialogRef",ref:i,modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=S=>l.value=S)},{...h.$attrs,type:t.type},{"show-close":!1,style:{bottom:s.value+"px"},class:["ivyforms-subdialog",[`type-${t.type}`,`ivyforms-align-${t.align}`]],onOpen:m[2]||(m[2]=S=>c())}),Ts({header:q(()=>[Q("div",{ref_key:"dialogHeader",ref:o,class:"ivyforms-subdialog__header"},[m[3]||(m[3]=Q("div",{class:"ivyforms-subdialog__header__drag-handle"},null,-1)),Q("div",JB,[R(g,{name:f(),type:"fill-duo",size:"l",color:"var(--map-base-dusk-fill--4)"},null,8,["name"])]),h.$slots.header?(I(),z("div",XB,[ve(h.$slots,"header")])):fe("",!0),t.title&&!h.$slots.header?(I(),z("div",ZB,[Q("div",QB,[Q("span",eF,Ee(t.title),1),ve(h.$slots,"titleButton")]),t.subtitle?(I(),z("span",tF,Ee(t.subtitle),1)):fe("",!0)])):fe("",!0),h.showClose?(I(),z("div",nF,[R(g,{priority:"tertiary",name:"close",type:"outline",size:"s",category:"global",color:"var(--map-base-dusk-symbol-2)",onClick:m[0]||(m[0]=S=>l.value=!1)})])):fe("",!0)],512)]),default:q(()=>[h.$slots.default?(I(),z("div",rF,[ve(h.$slots,"default")])):fe("",!0)]),_:2},[h.$slots.footer?{name:"footer",fn:q(()=>[ve(h.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","style","class"])])}}}),oF=()=>{const n=YB({tabletStart:768,desktopSmallStart:1024,desktopLargeStart:1200}),e=n.smaller("tabletStart"),t=n.between("tabletStart","desktopSmallStart"),r=n.greaterOrEqual("desktopSmallStart"),o=n.between("desktopSmallStart","desktopLargeStart"),s=n.greaterOrEqual("desktopLargeStart");return{isMobile:e,isTablet:t,isDesktop:r,isDesktopSmall:o,isDesktopLarge:s}},$1=ue({__name:"IvyPagination",props:{total:{default:0},background:{type:Boolean,default:!1},more:{type:Boolean},count:{type:Boolean,default:!0}},setup(n){const{isMobile:e}=oF(),t=N(10),r=O(()=>"total, sizes, prev, pager, next, jumper");return(o,s)=>{const a=Y$;return I(),me(a,xt({"page-size":t.value,"onUpdate:pageSize":s[0]||(s[0]=i=>t.value=i),class:[v(e)?"ivyforms-pagination-mobile":"ivyforms-pagination"],"pager-count":5,"page-sizes":[10,20,30,40],layout:r.value},{...o.$props,...o.$attrs}),null,16,["page-size","class","layout"])}}}),aF={class:"ivyforms-table__container"},sF=["onClick"],iF={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},lF={style:{opacity:"0.5",cursor:"not-allowed"}},uF={key:2},cF={key:3,style:{"margin-left":"5px"}},dF={key:0},fF={key:0},pF={key:1},hF={key:1},M5=ue({__name:"IvyTable",props:{data:{},columns:{default:()=>[]},loading:{type:Boolean,default:!1},pagination:{type:Boolean,default:!0},groupBy:{default:""},fixed:{type:Boolean},isCustomHeader:{type:Boolean,default:!1},minTableWidth:{default:600}},emits:["sort-change"],setup(n,{emit:e}){const t=n,r=e,o=N(document.body.classList.contains("ivyforms-theme-dark")),s=new MutationObserver(()=>{o.value=document.body.classList.contains("ivyforms-theme-dark")});s.observe(document.body,{attributes:!0,attributeFilter:["class"]}),Jf(()=>{s.disconnect()});const a=h=>{const y=(t.data.length+1)*50;return Math.max(550,Math.min(y,h))},i=O(()=>{var h;return((h=t.columns)==null?void 0:h.filter(m=>m.visible).map(m=>({...m,sortable:m.sortable||!1,headerRenderer:m.headerRenderer||void 0,cellRenderer:m.cellRenderer||(g=>st("span",{},g.rowData[m.key])),minWidth:typeof m.minWidth=="string"?parseInt(m.minWidth,10)||100:m.minWidth,width:typeof m.width=="string"?parseInt(m.width,10)||100:m.width})))||[]}),l=N(null),c=N(null),d=h=>{if(!h.sortable)return;l.value===h.key?c.value=c.value==="asc"?"desc":"asc":(l.value=h.key,c.value="asc");const m={column:l.value,order:c.value};r("sort-change",m)},f=({rowData:h})=>h.selected?"is-selected":"";return(h,m)=>{const g=gl,y=Jn,S=WN,w=$1,x=UN;return I(),z("div",aF,[R(x,null,{default:q(({width:T,height:k})=>[R(S,xt({ref:"tableV2Ref"},h.$attrs,{columns:i.value,data:t.data,width:Math.max(T,t.minTableWidth),height:a(k),class:"ivyforms-table",fixed:t.fixed,"row-class":f}),Ts({"header-cell":q(({column:C})=>[Q("div",{style:en({display:"flex",alignItems:"center",cursor:C.sortable?"pointer":"default"}),onClick:M=>d(C)},[C.headerRenderer?(I(),me(nn(C.headerRenderer()),{key:0})):C.comingSoon?(I(),z("div",iF,[Q("div",lF,Ee(C.title),1),R(g,{size:"s"})])):(I(),z("span",uF,Ee(C.title),1)),C.sortable?(I(),z("span",cF,[l.value===C.key?(I(),z("span",dF,[c.value==="asc"?(I(),z("span",fF,[R(y,{size:"d","outer-size":"20px",name:o.value?"sort-asc-dark":"sort-asc",category:"table"},null,8,["name"])])):c.value==="desc"?(I(),z("span",pF,[R(y,{size:"d","outer-size":"20px",name:o.value?"sort-desc-dark":"sort-desc",category:"table"},null,8,["name"])])):fe("",!0)])):(I(),z("span",hF,[R(y,{size:"d","outer-size":"20px",name:"arrow-up-down-2",category:"arrows",type:"outline",color:"var(--map-base-dusk-symbol-2)"})]))])):fe("",!0)],12,sF)]),empty:q(()=>[ve(h.$slots,"empty")]),_:2},[h.isCustomHeader?{name:"header",fn:q(()=>[ve(h.$slots,"header")]),key:"0"}:void 0]),1040,["columns","data","width","height","fixed"]),h.pagination&&h.data.length?ve(h.$slots,"pagination",{key:0},()=>[R(w,{total:t.data.length,class:"ivyforms-table__pagination"},null,8,["total"])]):fe("",!0)]),_:3})])}}}),mF={xmlns:"http://www.w3.org/2000/svg",width:"199",height:"200",fill:"none"};function vF(n,e){return I(),z("svg",mF,e[0]||(e[0]=[ra('<path fill="#8B929C" fill-opacity=".3" d="M172.234 99.896c0 41.062-33.288 74.349-74.35 74.349s-74.35-33.287-74.35-74.35c0-41.061 33.288-74.35 74.35-74.35s74.35 33.289 74.35 74.35" opacity=".44"></path><mask id="a" width="150" height="150" x="23" y="25" maskUnits="userSpaceOnUse" style="mask-type:alpha;"><path fill="#232E3C" d="M172.234 99.896c0 41.062-33.288 74.349-74.35 74.349s-74.35-33.287-74.35-74.35c0-41.061 33.288-74.35 74.35-74.35s74.35 33.289 74.35 74.35"></path></mask><g mask="url(#a)"><path fill="#37C6AB" d="M85.747 109.575c1.092.289 1.697 1.073 1.766 2.106.12 1.692-4.503 3.03-5.627 4.401-1.114 1.373-3.098 8.207-5.709 10.032 0 0-6.638 3.851-12.797 2.885-3.536-.554-5.83-6.445-9.382-6.011.489-.102 4.55-5.68 8.5-6.906 1.514-.466 3.76 3.605 4.68 3.116.11-.053.213-.114.306-.168 3.139-1.882 6.36-2.668 7.98-3.961.495-.385 1.12-.962 1.825-1.602 1.656-1.465 3.763-3.238 5.735-3.764 1.107-.29 2.016-.31 2.723-.128"></path><path fill="#C53434" d="M85.747 109.575c1.092.289 1.697 1.073 1.766 2.106.12 1.691-4.503 3.03-5.627 4.401-1.114 1.373-3.278 8.092-5.888 9.917 0 0-6.233 3.947-12.618 3-3.402-.505-5.997-6.425-9.382-6.011.489-.102 5.433 3.738 9.383 2.511 10.454.099 9.913-4.495 17.55-10.574 3.063-2.436 6.122-2.882 4.816-5.35" opacity=".14"></path><path fill="#01384D" d="M77.29 113.467c.033.082.058.165.092.247.119.329.242.673.182 1.013-.053.34-.278.629-.505.887a10.86 10.86 0 0 1-7.316 3.624c-.852.059-1.706.018-2.563-.04.109-.053.211-.114.305-.169 3.138-1.881 6.36-2.667 7.98-3.96.495-.387 1.12-.962 1.825-1.602" opacity=".59"></path><path fill="#37C6AB" d="M66.952 145.294s7.275 4.972 8.908 10.325c1.634 5.355.23 8.16-.534 9.434 0 0 6.374-1.403 9.18 0 2.804 1.401 1.783 4.787-1.531 5.006-3.314.221-7.393-1.31-14.022-.673-6.63.639-8.814.256-9.25-2.676-.438-2.931-4.185-20.906 7.249-21.416"></path><path fill="#C53434" d="M66.952 145.294s7.275 4.972 8.908 10.325c1.634 5.355.23 8.16-.534 9.434 0 0 6.374-1.403 9.18 0 2.804 1.401 1.783 4.787-1.531 5.006-3.314.221-7.393-1.31-14.022-.673-6.63.639-8.814.256-9.25-2.676-.438-2.931-4.185-20.906 7.249-21.416" opacity=".14"></path><path fill="#37C6AB" d="M73.545 160.593c-.513 5.606-6.118 7.136-10.6 7.901q-1.046.173-2.226.267c-2.731.229-6.035.177-9.967.161-2.072 0-4.329 0-6.76.061l-.75.023c-5.506.16-13.782 1.828-19.19.612l-.298-.069c-2.937-.742-4.956-2.393-5.116-5.706 0-.099-.009-.215-.009-.32-.007-.819.047-1.676.154-2.556.382-3.143 1.437-6.638 2.792-10.225a131 131 0 0 1 2.247-5.561c1.822-4.267 3.763-8.475 5.202-12.222a52 52 0 0 0 1.139-3.235c.03-.077.054-.16.077-.237 1.599-5.239 2.203-10.585 2.425-14.387.183-3.242.09-5.369.09-5.369s2.984 3.151 9.868 4.719c1.53.351 3.25.619 5.17.758 4.887.352 8.857-.513 11.71-1.561a.2.2 0 0 0 .054-.014c.083-.032.16-.062.245-.093.014 0 .03-.008.045-.015 3.112-1.185 4.81-2.524 4.81-2.524a20 20 0 0 0-.305 4.283c.107 3.618 1.055 7.067 1.866 10.409.475 1.935.903 3.833 1.094 5.706.512 5.025-.665 10.134-1.094 12.941-.06.39-.108.742-.13 1.033a4 4 0 0 0-.007.688c.183 1.782 7.977 8.918 7.464 14.532"></path><path fill="#FEF3C6" d="M62.04 147.171c-.627 4.672-1.72 8.536-3.265 10.891-1.063 1.613-2.34 2.525-3.832 2.493-3.128-.062-5.285-1.253-6.685-3.495-.903-1.423-1.491-3.274-1.828-5.523-.214-1.414-.328-2.99-.36-4.71-.014-.88-.008-1.791.016-2.746.03-.865.069-1.767.13-2.7.062-1.064.145-2.164.245-3.312.053-.658.1-1.323.13-1.973.36-9.064-2.256-17.286-3.97-21.645 1.53.351 3.251.619 5.17.757 4.889.352 8.858-.513 11.711-1.56a2.664 2.664 0 0 0 .298-.107c.015 0 .03-.009.046-.016.351 1.293.666 2.624.948 4.001 2.004 9.636 2.417 21.009 1.247 29.645"></path><path fill="#C53434" d="M64.352 115.284a15.1 15.1 0 0 1-3.556 2.24 13 13 0 0 1-1.507.582c-4.39 1.407-9.83.941-11.405 1.361-1.567.421-1.162 4.23-.527 8.299.298 1.889.45 5.292.344 8.788a57 57 0 0 1-.36 5.001 27 27 0 0 1-.405 2.532c-.222 1.071-.497 1.989-.833 2.678-.008.022-.023.038-.03.06-.873 1.828-.383 3.244.358 4.712.796 1.584 1.867 3.228 1.828 5.523-.076 4.45-.29 7.861-2.653 9.903-1.523 1.317 2.302.689 5.146 1.959-2.072 0-4.329 0-6.76.061l-.75.023c-5.506.16-13.782 1.828-19.19.612q-.15-.034-.298-.069c-2.937-.742-4.956-2.393-5.117-5.706 0-.099-.008-.215-.008-.321-.007-.818.047-1.676.153-2.555.383-3.143 1.438-6.638 2.793-10.225a131 131 0 0 1 2.247-5.561c1.822-4.267 3.763-8.475 5.202-12.222a52 52 0 0 0 1.139-3.235c.03-.077.054-.16.077-.237 1.599-5.239 2.203-10.585 2.425-14.387.183-3.242.09-5.369.09-5.369s2.984 3.151 9.868 4.719c1.53.351 3.25.619 5.17.758 4.887.351 8.857-.513 11.71-1.561a.2.2 0 0 0 .053-.014l.245-.094q.022-.002.046-.014c3.112-1.185 4.81-2.524 4.81-2.524a20 20 0 0 0-.305 4.283" opacity=".14"></path><path fill="#37C6AB" d="M74.57 131.692c.194.513.156 1.068-.125 1.635-1.125 2.257-6.052.125-8.008 1.311-1.957 1.197-6.784 8.485-9.108 8.824-2.328.345-6.929-.964-12.709-3.26-4.905-1.962-12.758-8.061-10.907-12.911.941-2.465 4.272-4.32 8.795-4.052 4.37.257 9.866 2.507 15.402 8.111.38.38 5.403-3.49 10.138-2.906 3.537.434 5.992 1.691 6.523 3.248"></path><path fill="#C53434" d="M74.57 131.692c.194.513.156 1.068-.125 1.635-1.125 2.257-6.052.125-8.008 1.311-1.957 1.197-6.784 8.485-9.108 8.824-2.328.345-6.929-.964-12.709-3.26-4.905-1.962-12.758-8.061-10.907-12.911.941-2.465 4.272-4.32 8.795-4.052-6.375 1.343-6.505 5.511 3.098 11.847 10.007 6.597 13.085 3.355 16.372.141 3.291-3.208 5.336-2.715 9.331-2.177 1.16.159 2.26-.395 3.262-1.358" opacity=".14"></path><path fill="#01384D" d="M30.72 140.623c-.291.658-.941 1.071-1.56 1.438-1.76 1.071-3.527 2.142-5.34 3.12 1.822-4.267 3.763-8.473 5.201-12.221.536 1.729 1.003 3.488 1.523 5.17.26.81.52 1.713.176 2.493" opacity=".59"></path><path fill="#37C6AB" d="M49.484 172.334c.016 1.062-.848 2.042-2.194 2.326-2.678.55-4.972-.299-11.427-.429s-11.396 1.017-13.56 0c-.858-.398-1.615-.98-2.219-1.95-.933-1.485-1.491-3.895-1.453-7.994.068-7.289 1.69-12.283 4.23-15.449 2.868-3.595 6.906-4.842 11.189-4.437 2.456.231 4.688 1.141 6.57 2.487v.008c4.298 3.074 6.77 8.474 5.844 13.438-1.34 7.144-9.118 8.413-9.118 8.413 2.417-.123 4.842-.382 9.118.818 2.117.597 3.005 1.72 3.02 2.769"></path><path fill="#01384D" d="M29.534 157.518c-.833 1.859-2.172 3.473-2.884 5.386-.465 1.261-.65 2.615-1.14 3.862-.97 2.47-3.035 4.275-5.43 5.514-.933-1.484-1.491-3.894-1.453-7.992.07-7.288 1.691-12.284 4.23-15.45.07.024.138.053.206.077 1.148.436 2.295.879 3.435 1.315.971.375 1.98.772 2.692 1.529 1.384 1.5 1.17 3.902.344 5.759" opacity=".59"></path><path fill="#C53434" d="M49.484 172.334c.016 1.062-.848 2.042-2.194 2.326-2.678.55-4.972-.299-11.427-.429s-11.396 1.017-13.56 0c-.858-.398-1.615-.98-2.219-1.95-.933-1.485-1.491-3.895-1.453-7.994.068-7.289 1.69-12.283 4.23-15.449 2.868-3.595 6.906-4.842 11.189-4.437 2.456.231 4.688 1.141 6.57 2.487v.008c-8.49-3.68-15.77-.803-16.796 12.688-1.025 13.499 1.155 13.018 7.067 12.697 4.873-.268 13.76.986 18.593.053" opacity=".14"></path><path fill="#37C6AB" d="M43.24 86.563c-.925.162-1.804.398-2.623.697-6.164 2.18-9.37 7.655-10.769 10.814-.612 1.407-.872 2.355-.872 2.355-2.027-11.373 2.41-24.956 7.182-25.437 4.788-.483 7.083 11.57 7.083 11.57"></path><path fill="#01384D" d="M40.617 87.26c-6.165 2.18-9.37 7.656-10.77 10.814-.596-9.605 2.7-20.856 6.005-21.453 2.746-.497 4.199 6.807 4.765 10.64" opacity=".59"></path><path fill="#37C6AB" d="m67.312 95.053-1.232-1.452c-1.95-2.325-5.79-5.683-12.467-7.428a31 31 0 0 0-2.34-.519s.8-11.806 6.134-11.808c4.771-.003 9.77 11.808 9.905 21.207"></path><path fill="#01384D" d="M66.08 93.6c-1.95-2.324-5.79-5.683-12.467-7.426.3-3.42 1.316-10.424 4.642-10.133 3.825.336 7.512 11.157 7.825 17.56" opacity=".59"></path><path fill="#FEF3C6" d="M68.862 107.666a15.7 15.7 0 0 1-1.936 3.053c-.007.007-.007.015-.014.015-1.447 1.812-3.382 3.418-5.799 4.695-7.548 4.024-17.759 2.578-20.55 1.622-2.502-.849-9.523-3.457-11.305-11.151a16.5 16.5 0 0 1-.367-2.509c-.497-7.267 4.184-15.741 14.823-17.736h.008q2.17-.414 4.673-.436c4.466-.031 8.16.81 11.15 2.095q.046.013.046.015c6.334 2.732 9.515 7.465 10.218 10.227.88 3.403.566 6.936-.947 10.11"></path><path fill="#37C6AB" d="M29.259 105.9a16.6 16.6 0 0 1-.368-2.509c-.496-7.266 4.184-15.74 14.822-17.737h.009c2.83.766 7.395 2.83 9.362 8.36 2.776 7.839-8.705 18.93-23.825 11.886M68.865 107.666c-3.067-.359-6.524-2.049-8.497-5.675-3.456-6.355-1.89-12.03-.773-14.66 6.334 2.73 9.515 7.463 10.219 10.224.879 3.405.565 6.936-.949 10.111"></path><path fill="#C53434" d="M66.912 110.733c-1.446 1.812-3.38 3.419-5.799 4.697-7.548 4.022-17.759 2.576-20.55 1.621-2.5-.85-9.523-3.458-11.304-11.152a16.6 16.6 0 0 1-.368-2.509c-.497-7.265 4.184-15.74 14.823-17.736h.008q2.17-.414 4.673-.436c4.466-.03 8.16.811 11.151 2.096-.872-.29-13.797-4.422-22.195 3.09-8.689 7.778-2.51 23.427 7.763 25.238 8.244 1.455 15.411.269 21.798-4.909" opacity=".14"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".579" d="M42.76 103.367s-11.486-4.979-25.05-3.641M42.76 104.963s-14.28-.404-24.134 2.392M68.457 100.361s5.962-3.695 15.426-3.468M68.457 101.958s7.714-2.857 15.988.154"></path><path fill="#01384D" d="M57.392 100.71c-.473 0-.773-.215-.954-.477a1 1 0 0 1-.122.167c-.185.206-.448.31-.777.31-.907 0-1.177-.788-1.195-1.205a.2.2 0 0 1 .191-.207h.01a.2.2 0 0 1 .2.19c.003.085.059.821.794.821.215 0 .373-.058.482-.177.207-.228.175-.612.175-.616a.2.2 0 0 1 .05-.153c.11-.12.343-.037.35.125.005.085.06.821.796.821.215 0 .372-.058.482-.177.206-.228.175-.612.174-.616a.2.2 0 0 1 .18-.217c.107-.017.206.069.218.178.002.024.05.563-.277.923q-.28.31-.777.31"></path><path fill="#01384D" d="M56.399 99.698a.2.2 0 0 1-.2-.2v-2.202a.2.2 0 1 1 .4 0v2.201a.2.2 0 0 1-.2.201M56.364 102.559a1.47 1.47 0 0 1-1.054-.44.2.2 0 0 1 .021-.281.2.2 0 0 1 .282.02c.027.031.627.682 1.686-.034a.2.2 0 1 1 .225.33c-.446.302-.837.405-1.16.405"></path><path fill="#01384D" d="M54.941 96.22c0-1.233 2.905-1.393 2.905 0s-2.905 1.472-2.905 0"></path><path fill="#FDE047" d="M46.554 91.799c7.243.05 7.298 10.866 0 10.866-7.297 0-7.74-10.92 0-10.866M63.014 91.774c5.531.039 5.574 8.654 0 8.654s-5.91-8.697 0-8.654"></path><path fill="#01384D" d="M48.896 94.227c4.406.028 4.439 6.383 0 6.383-4.44 0-4.709-6.414 0-6.383M64.22 93.597c3.241.022 3.265 4.742 0 4.742s-3.465-4.766 0-4.742"></path></g><rect width="75" height="20" x="88.5" y="62.5" fill="#8B929C" fill-opacity=".1" rx="10"></rect><rect width="75" height="20" x="88.5" y="62.5" stroke="#C0C5CB" rx="10"></rect><rect width="75" height="20" x="88.5" y="87.5" fill="#7A69EE" fill-opacity=".1" rx="10"></rect><rect width="75" height="20" x="88.5" y="87.5" stroke="#7A69EE" rx="10"></rect><rect width="42" height="20" x="88.5" y="112.5" fill="#8B929C" fill-opacity=".1" rx="10"></rect><rect width="42" height="20" x="88.5" y="112.5" stroke="#C0C5CB" rx="10"></rect>',9)]))}const gF={render:vF},yF={xmlns:"http://www.w3.org/2000/svg",width:"118",height:"61",fill:"none"};function bF(n,e){return I(),z("svg",yF,e[0]||(e[0]=[ra('<rect width="74" height="28" x="43.5" y="32.5" fill="#fff" rx="3.5"></rect><rect width="74" height="28" x="43.5" y="32.5" stroke="#C0C5CB" stroke-dasharray="6 6" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" fill="#fff" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" stroke="#7A69EE" rx="3.5"></rect><path stroke="#394452" stroke-width="1.5" d="M10 21c0-3.771 0-5.657 1.172-6.828S14.229 13 18 13h4c3.771 0 5.657 0 6.828 1.172S30 17.229 30 21s0 5.657-1.172 6.828S25.771 29 22 29h-4c-3.771 0-5.657 0-6.828-1.172S10 24.771 10 21Z"></path><path stroke="#394452" stroke-linecap="round" stroke-width="1.5" d="m14 17 2.159 1.8c1.837 1.53 2.755 2.295 3.841 2.295s2.005-.765 3.841-2.296L26 17"></path><path fill="#212832" d="M43.526 24.64V26h-5.284v-1.36zm-4.799-8.593V26h-1.715v-9.953zm4.109 4.156v1.34h-4.594v-1.34zm.656-4.156v1.367h-5.25v-1.367zm2.92 4.06V26h-1.648v-7.396h1.551zm-.267 1.921-.561-.006q0-.766.191-1.416.192-.65.56-1.128.37-.484.917-.745.554-.266 1.278-.266.506 0 .923.15.424.144.732.458.315.315.478.807.171.491.171 1.19V26h-1.648v-4.785q0-.54-.163-.848a.9.9 0 0 0-.459-.437 1.7 1.7 0 0 0-.704-.137q-.465 0-.793.178-.321.177-.526.485a2.2 2.2 0 0 0-.3.711 3.7 3.7 0 0 0-.096.861m4.586-.437-.772.17q0-.669.185-1.264.191-.601.553-1.053.37-.458.91-.717a2.8 2.8 0 0 1 1.237-.26q.567 0 1.011.157.451.15.766.479.315.327.479.854.164.52.164 1.258V26h-1.655v-4.792q0-.56-.164-.868a.85.85 0 0 0-.45-.424 1.8 1.8 0 0 0-.705-.123q-.382 0-.677.143a1.34 1.34 0 0 0-.485.39 1.7 1.7 0 0 0-.3.568 2.4 2.4 0 0 0-.097.697m10.398 2.926v-3.528q0-.396-.144-.683a1 1 0 0 0-.437-.445q-.288-.157-.725-.157-.403 0-.697.137a1.1 1.1 0 0 0-.458.369.9.9 0 0 0-.164.526h-1.64q0-.437.211-.847.212-.411.615-.732.404-.321.964-.506a4 4 0 0 1 1.258-.184q.834 0 1.477.28.65.28 1.018.848.376.56.376 1.408v3.288q0 .505.069.91.074.396.212.69V26h-1.689a3 3 0 0 1-.185-.677 5.5 5.5 0 0 1-.061-.806m.24-3.015.013 1.018h-1.183q-.458 0-.806.09a1.7 1.7 0 0 0-.581.245q-.233.165-.35.397a1.16 1.16 0 0 0-.115.526q0 .294.136.54.138.24.397.376.267.137.642.137.507 0 .882-.205.383-.211.602-.513.219-.307.232-.58l.534.73a2.5 2.5 0 0 1-.28.602q-.2.322-.52.616-.315.286-.76.471a2.6 2.6 0 0 1-1.01.185q-.726 0-1.293-.287a2.3 2.3 0 0 1-.889-.787 2.04 2.04 0 0 1-.32-1.127q0-.588.218-1.04.226-.457.656-.765.438-.307 1.067-.465.628-.164 1.435-.164zm4.9-2.898V26h-1.654v-7.396zm-1.763-1.942q0-.375.246-.622.253-.253.697-.253.438 0 .69.253a.83.83 0 0 1 .254.622.82.82 0 0 1-.253.615q-.254.246-.69.246-.446 0-.698-.246a.83.83 0 0 1-.246-.615m5.332-1.162V26h-1.654V15.5z"></path><g clip-rule="evenodd" filter="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path><path stroke="#080C11" stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path></g><path fill="#080C11" fill-rule="evenodd" d="M82 9.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0zm1.5-.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5m2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5" clip-rule="evenodd"></path><defs><filter id="a" width="17.75" height="16.75" x="73.625" y="2.625" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.027451 0 0 0 0 0.12549 0 0 0 0 0.239216 0 0 0 0.24 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1437_271071"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_1437_271071" result="shape"></feBlend></filter></defs>',10)]))}const SF={render:bF},wF={xmlns:"http://www.w3.org/2000/svg",width:"118",height:"61",fill:"none"};function CF(n,e){return I(),z("svg",wF,e[0]||(e[0]=[ra('<rect width="74" height="28" x="43.5" y="32.5" fill="#161E27" rx="3.5"></rect><rect width="74" height="28" x="43.5" y="32.5" stroke="#535D69" stroke-dasharray="6 6" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" fill="#2A3540" rx="3.5"></rect><rect width="85" height="39" x=".5" y="1.5" stroke="#7A69EE" rx="3.5"></rect><path stroke="#DBDEE3" stroke-width="1.5" d="M10 21c0-3.771 0-5.657 1.172-6.828S14.229 13 18 13h4c3.771 0 5.657 0 6.828 1.172S30 17.229 30 21s0 5.657-1.172 6.828S25.771 29 22 29h-4c-3.771 0-5.657 0-6.828-1.172S10 24.771 10 21Z"></path><path stroke="#DBDEE3" stroke-linecap="round" stroke-width="1.5" d="m14 17 2.159 1.8c1.837 1.53 2.755 2.295 3.841 2.295s2.005-.765 3.841-2.296L26 17"></path><path fill="#F4F6F9" d="M43.526 24.64V26h-5.284v-1.36zm-4.799-8.593V26h-1.715v-9.953zm4.109 4.156v1.34h-4.594v-1.34zm.656-4.156v1.367h-5.25v-1.367zm2.92 4.06V26h-1.648v-7.396h1.551zm-.267 1.921-.561-.006q0-.766.191-1.416.192-.65.56-1.128.37-.484.917-.745.554-.266 1.278-.266.506 0 .923.15.424.144.732.458.315.315.478.807.171.491.171 1.19V26h-1.648v-4.785q0-.54-.163-.848a.9.9 0 0 0-.459-.437 1.7 1.7 0 0 0-.704-.137q-.465 0-.793.178-.321.177-.526.485a2.2 2.2 0 0 0-.3.711 3.7 3.7 0 0 0-.096.861m4.586-.437-.772.17q0-.669.185-1.264.191-.601.553-1.053.37-.458.91-.717a2.8 2.8 0 0 1 1.237-.26q.567 0 1.011.157.451.15.766.479.315.327.479.854.164.52.164 1.258V26h-1.655v-4.792q0-.56-.164-.868a.85.85 0 0 0-.45-.424 1.8 1.8 0 0 0-.705-.123q-.382 0-.677.143a1.34 1.34 0 0 0-.485.39 1.7 1.7 0 0 0-.3.568 2.4 2.4 0 0 0-.097.697m10.398 2.926v-3.528q0-.396-.144-.683a1 1 0 0 0-.437-.445q-.288-.157-.725-.157-.403 0-.697.137a1.1 1.1 0 0 0-.458.369.9.9 0 0 0-.164.526h-1.64q0-.437.211-.847.212-.411.615-.732.404-.321.964-.506a4 4 0 0 1 1.258-.184q.834 0 1.477.28.65.28 1.018.848.376.56.376 1.408v3.288q0 .505.069.91.074.396.212.69V26h-1.689a3 3 0 0 1-.185-.677 5.5 5.5 0 0 1-.061-.806m.24-3.015.013 1.018h-1.183q-.458 0-.806.09a1.7 1.7 0 0 0-.581.245q-.233.165-.35.397a1.16 1.16 0 0 0-.115.526q0 .294.136.54.138.24.397.376.267.137.642.137.507 0 .882-.205.383-.211.602-.513.219-.307.232-.58l.534.73a2.5 2.5 0 0 1-.28.602q-.2.322-.52.616-.315.286-.76.471a2.6 2.6 0 0 1-1.01.185q-.726 0-1.293-.287a2.3 2.3 0 0 1-.889-.787 2.04 2.04 0 0 1-.32-1.127q0-.588.218-1.04.226-.457.656-.765.438-.307 1.067-.465.628-.164 1.435-.164zm4.9-2.898V26h-1.654v-7.396zm-1.763-1.942q0-.375.246-.622.253-.253.697-.253.438 0 .69.253a.83.83 0 0 1 .254.622.82.82 0 0 1-.253.615q-.254.246-.69.246-.446 0-.698-.246a.83.83 0 0 1-.246-.615m5.332-1.162V26h-1.654V15.5z"></path><g clip-rule="evenodd" filter="url(#a)"><path fill="#fff" fill-rule="evenodd" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path><path stroke="#080C11" stroke-linecap="round" stroke-linejoin="round" stroke-width=".75" d="M78.673 4.848c.487-.186 1.448-.072 1.702.492.216.481.402 1.293.412 1.12.025-.384-.024-1.215.14-1.65.118-.316.351-.614.696-.72.289-.089.629-.12.93-.057.317.067.651.3.776.52.368.649.374 1.978.39 1.907.066-.283.072-1.28.288-1.65.143-.244.505-.463.697-.498.299-.055.666-.071.979-.009.253.051.595.358.687.507.223.359.347 1.37.385 1.727.016.147.075-.41.297-.767.413-.665 1.872-.794 1.927.666.026.68.02.65.02 1.108 0 .537-.012.862-.04 1.252-.03.415-.118 1.358-.245 1.814-.087.313-.376 1.018-.663 1.44 0 0-1.09 1.303-1.209 1.888-.118.586-.079.59-.103 1.005s.123.96.123.96-.813.11-1.253.036c-.397-.064-.888-.874-1.015-1.122-.175-.342-.547-.276-.692-.024-.228.399-.72 1.114-1.066 1.159-.68.087-2.086.031-3.188.02 0 0 .188-1.052-.23-1.413-.31-.271-.843-.817-1.162-1.104l-.844-.96c-.287-.374-1.017-.967-1.262-2.067-.216-.974-.195-1.452.038-1.843.235-.397.68-.613.867-.65.21-.044.702-.041.888.064.226.128.318.166.495.407.234.32.317.475.216.126-.077-.273-.326-.62-.44-1.01-.11-.376-.407-.982-.386-1.59.008-.23.105-.802.845-1.084"></path></g><path fill="#080C11" fill-rule="evenodd" d="M82 9.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0zm1.5-.5a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5m2 0a.5.5 0 0 1 .5.5v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 .5-.5" clip-rule="evenodd"></path><defs><filter id="a" width="17.75" height="16.75" x="73.625" y="2.625" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feColorMatrix values="0 0 0 0 0.027451 0 0 0 0 0.12549 0 0 0 0 0.239216 0 0 0 0.24 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1437_271071"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_1437_271071" result="shape"></feBlend></filter></defs>',10)]))}const xF={render:CF},kF={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",fill:"none"};function EF(n,e){return I(),z("svg",kF,e[0]||(e[0]=[ra('<path fill="#8B929C" fill-opacity=".3" d="M179.04 108.84c0 43.162-34.99 78.151-78.152 78.151s-78.15-34.989-78.15-78.151 34.988-78.153 78.15-78.153 78.152 34.99 78.152 78.153" opacity=".44"></path><path fill="#9C8EF4" d="M63.25 130.137c0 .814-.029 1.649-.164 2.424-.14.796-.66 1.498-.93 2.241-.277.756-.716 1.404-1.114 2.092-.402.694-.858 1.302-1.371 1.912-.515.612-.877 1.356-1.49 1.87-.61.513-1.353.829-2.047 1.23-.688.398-1.335.877-2.092 1.153-.743.27-1.55.292-2.347.432-.775.135-1.542.242-2.355.242-.814 0-1.613.078-2.388-.058-.797-.139-1.52-.489-2.263-.761-.757-.274-1.436-.646-2.124-1.044-.694-.402-1.561-.56-2.171-1.073-.612-.513-.868-1.381-1.384-1.994-.512-.61-1.325-1.012-1.727-1.706-.398-.687-.425-1.56-.7-2.317-.271-.743-.888-1.416-1.027-2.212-.135-.775.032-1.617.032-2.431 0-.813.02-1.622.155-2.397.14-.798.246-1.621.516-2.364.276-.756.93-1.336 1.327-2.024.402-.694.565-1.563 1.078-2.173.514-.612 1.076-1.238 1.688-1.753.61-.513 1.46-.723 2.154-1.125.688-.398 1.422-.68 2.178-.956.743-.27 1.455-.698 2.252-.837.775-.136 1.59.124 2.404.124s1.641-.335 2.416-.199c.796.139 1.472.708 2.215.978.757.276 1.52.482 2.208.88.694.402 1.297.91 1.907 1.422a13.6 13.6 0 0 1 1.677 1.678c.512.61.911 1.277 1.312 1.971.399.687.666 1.404.942 2.161.27.743.841 1.409.98 2.206.136.775.254 1.595.254 2.408"></path><path fill="#7A69EE" d="M43.452 142.359c-1.865-11.714-.848-20.422-.102-24.482q-.345.155-.68.337c-.321 1.851-.67 4.496-.817 7.824-1.303-1.862-2.116-3.835-2.62-5.51q-.249.272-.484.551c.587 1.828 1.536 3.959 3.068 5.945a77 77 0 0 0-.024 3.555c-2.027-1.573-3.928-3.602-5.443-5.414q-.05.104-.091.211c-.055.15-.099.305-.142.46.56.659 1.164 1.341 1.807 2.018-.785.539-1.582 1.206-2.334 1.896l-.003.387q-.001.233-.016.47c.885-.844 1.85-1.679 2.782-2.309.533.545 1.09 1.079 1.66 1.59-.76 3.075-1.092 6.207-1.23 8.675q.121.115.227.24c.13.154.243.324.349.501.106-2.449.403-5.724 1.174-8.962q.628.534 1.274 1.014c.083 3.166.371 6.737.97 10.634q.335.192.675.369M52.263 130.101a94 94 0 0 1 3.925-2.262c.52.67 2.288 3.045 4.15 6.591-2.452-.943-5.324-2.331-8.075-4.329m-3.404 1.438a56 56 0 0 1-.801-1.47c1.61-2.951 3.268-5.377 4.844-7.354.328-.033 1.32-.114 2.97-.112-.262.977-1.033 3.664-2.14 5.916a95 95 0 0 0-4.873 3.02m12.33 3.208c-1.916-3.769-3.812-6.364-4.455-7.201q.695-.371 1.416-.737a75 75 0 0 1 5.095 3.868q.006-.27.006-.54c0-.084-.006-.169-.008-.253a77 77 0 0 0-4.47-3.387 56 56 0 0 1 3.082-1.413 18 18 0 0 0-.221-.565c-2.438 1.023-4.88 2.286-6.982 3.473.991-2.239 1.656-4.64 1.85-5.384 1.151.016 2.57.074 4.25.205a15 15 0 0 0-.413-.647c-3.529-.257-5.815-.184-6.902-.111q.594-.714 1.164-1.345a87 87 0 0 1 4.096-.438c-.2-.189-.397-.38-.61-.559l-.002-.002c-1.2.109-2.187.22-2.838.299.492-.518.965-.985 1.417-1.412a8 8 0 0 0-.484-.307q-.04-.02-.077-.038c-2.429 2.321-5.458 5.889-8.383 11.163q-.278-.548-.523-1.053c.07-.763.688-6.131 4.698-11.897-.047-.011-.092-.025-.139-.033a2.5 2.5 0 0 0-.559-.027c-3.137 4.631-4.162 8.975-4.48 10.93a41 41 0 0 1-1.232-2.963c.154-3.373.573-6.069.89-7.721-.227.076-.45.167-.67.263-.471 2.567-1.085 7.159-.828 12.718l-.014.004.019.067c.203 4.271.924 9.107 2.62 14.033q.325.021.657.017c-1.412-4.035-2.163-8.014-2.5-11.67 1.002 2.707 3.04 7.229 6.587 11.324.244-.032.487-.061.728-.098-5.23-5.874-7.235-12.78-7.487-13.71a56 56 0 0 1-.051-3.675c1.264 3.061 4.687 10.37 10.538 16.078l.16-.097q.196-.111.396-.218c-3.142-3.032-5.586-6.543-7.367-9.616.217-.145.574-.381 1.042-.682 2.843 3.939 6.418 6.394 9.148 7.832q.151-.215.318-.416l.06-.073c-2.667-1.391-6.197-3.789-9.01-7.674q.445-.282.978-.611c3.51 2.592 7.242 4.196 10.09 5.152q.143-.27.263-.556-.419-.138-.863-.297"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M41.5 140.5s-18 2-17.5 5.5 25 2 25 2 27.5-1.5 28 0-11.5 2.5-11.5 2.5-14 0-13.5 2.5 14 3 18.5 3 40.1-.5 42.5-10.5c1.5-2.667 1.4-9-11-13"></path><path fill="#C53434" d="M108.411 104.279c5.382 6.127 3.552 8.525 7.165 14.543 3.609 6.012 12.26 12.921 23.435 10.031 7.165-1.851 12.151-4.844 14.8-6.762-.42-2.105-1.178-4.484-2.395-6.658l-.019-.028c-5.152-9.152-22.332-17.225-22.332-17.225s-3.52-1.133-7.806-2.954c-2.926-1.247-6.212-2.814-8.977-4.553-11.964-1.624-8.806 7.977-3.871 13.606" opacity=".14"></path><path fill="#37C6AB" d="M84.125 125.007c2.302 2.437 5.027 4.365 8.248 5.523 2.04.734 4.274 1.44 6.643 2.09a124 124 0 0 0 12.619 2.766c8.167 1.353 16.745 1.927 24.116 1.13 13.757-1.49 17.154-3.686 17.154-3.686s7.802 2.721 10.976 2.365c3.091-.345 11.441-.745 10.523-4.235a2 2 0 0 0-.088-.287c-1.46-3.758-7.629-.641-11.974-2.638a74 74 0 0 0-5.825-2.37c-1.014-.357-1.755-.594-2.098-.704a6 6 0 0 1-.209-.065 23 23 0 0 0-.401-2.805c-.419-2.105-1.177-4.483-2.395-6.658l-.018-.027c-5.153-9.152-22.332-17.227-22.332-17.227s-2.604-.84-6.062-2.234a87 87 0 0 1-1.745-.72c-2.925-1.246-6.213-2.814-8.977-4.552-2.033-1.282-3.783-2.659-4.921-4.075-2.112-2.647-3.944-5.112-6.225-6.962-3.045-2.47-6.905-3.824-13.34-3.002-2.232.286-4.215.938-5.942 1.902-7.014 3.866-9.909 12.669-8.316 21.935 1.446 8.36 4.563 18.171 10.588 24.536"></path><path fill="#C53434" d="M111.636 135.385c8.167 1.354 16.744 1.926 24.116 1.13 13.756-1.49 17.155-3.686 17.155-3.686s7.8 2.721 10.974 2.365c3.092-.345 11.442-.745 10.523-4.235-7.425 3.674-18.995 2.245-18.375-1.028.282-1.507.427-3.01.489-4.267a73 73 0 0 0-2.097-.703q-.21-.062-.21-.064a23 23 0 0 0-.402-2.808c-.419-2.104-1.177-4.482-2.394-6.657-.008-.011-.01-.016-.019-.027-5.152-9.153-22.331-17.227-22.331-17.227s-2.603-.84-6.062-2.234a14729 14729 0 0 0-11.367 39.441" opacity=".14"></path><path fill="#FEF3C6" d="M84.125 125.007c2.302 2.437 5.028 4.366 8.248 5.523 11.644 4.175 29.615 7.479 43.379 5.987 4.933-.534 8.533-1.159 11.123-1.742 4.526-1.016 7.765-5.105 7.548-9.739l-.003-.074c-.268-5.212-2.753-9.146-3.006-9.529-.008-.011-.01-.017-.018-.027 0 0-13.481-1.683-10.995 8.251 2.486 9.927-5.91 12.447-24.178 9.344-18.273-3.102-20.374-4.905-26.364-10.503-5.985-5.599-10.98-5.568-5.734 2.509"></path><path fill="#01384D" d="M87.136 87.902c.54 1.844.313 3.854.883 5.685.525 1.686 1.682 3.104 2.955 4.329.819.776 1.706 1.51 2.757 1.916 2.183.852 4.785.228 6.861 1.307 1.141.588 1.976 1.621 2.991 2.405 3.473 2.7 9.13 1.869 11.682-1.715.965-1.36 1.506-2.994 2.534-4.31.884-1.127 2.151-1.746 3.46-2.293-5.069-2.162-11.218-5.277-13.897-8.629-4.944-6.18-8.314-11.403-19.566-9.962-2.233.284-4.215.937-5.943 1.9q.032.154.074.312c.91 3.386 4.231 5.69 5.209 9.055" opacity=".59"></path><path fill="#C53434" d="M84.125 125.007c2.302 2.437 5.028 4.366 8.248 5.523 2.04.735 4.275 1.44 6.643 2.09 1.002-5.83 1.432-13.133-.75-19.284-4.439-12.501-19.544-11.465-15.489-24.159 4.049-12.686 18.357-9.54 18.357-9.54-3.044-2.471-6.905-3.825-13.34-3.002-2.232.285-4.215.937-5.942 1.902-7.013 3.865-9.908 12.668-8.315 21.934 1.445 8.36 4.563 18.171 10.588 24.536" opacity=".14"></path><path fill="#37C6AB" d="M108.822 126.995c1.204 5.116 4.439 12.075 7.45 13.869 3.017 1.795 13.827 3.055 19.778 3.405 4.791.286 12.756.496 15.467-1.59.654-.5 1.007-1.136.939-1.935-.276-3.198-6.246-1.427-8.716-1.547-2.469-.121-8.527-3.405-10.588-4.564-.733-.417-1.467-2.526-2.475-5.214-1.916-5.157-4.832-12.459-10.657-14.067-8.862-2.44-12.407 6.528-11.198 11.643"></path><path fill="#C53434" d="M108.823 126.995c1.204 5.116 4.438 12.075 7.449 13.869 3.017 1.795 13.827 3.055 19.778 3.405 4.791.286 12.756.496 15.467-1.59-16.877 2.062-34.82-6.178-37.228-11.041-2.583-5.23 3.712-7.071 7.819-4.052 3.397 2.502 7.322 2.063 8.569 1.833-1.916-5.157-4.832-12.459-10.657-14.067-8.862-2.44-12.407 6.528-11.197 11.643" opacity=".14"></path><path fill="#37C6AB" d="M85.337 131.227c4.71 3.06 13.276 5.617 18.193 6.514 2.156.397 3.638-.072 4.291-.884.835-1.025.321-2.629-1.859-3.711-3.88-1.933-9.085-1.141-8.266-5.876.82-4.737.163-10.678-4.904-16.769-.386-.457-.861-.968-1.414-1.474-.007-.005-.008-.012-.015-.016a16 16 0 0 0-1.595-1.299c-.006 0-.014-.004-.015-.011-3.085-2.203-7.55-3.705-12.162-.487-6.515 4.546 3.037 20.955 7.746 24.013"></path><path fill="#C53434" d="M85.338 131.227c4.71 3.06 13.276 5.617 18.193 6.514 2.156.397 3.638-.072 4.291-.884-7.765-1.034-20.124-4.286-25.77-16.043-5.065-10.531 2.637-15.951 7.702-13.113-3.085-2.202-7.55-3.705-12.162-.487-6.515 4.546 3.037 20.955 7.746 24.013" opacity=".14"></path><path fill="#37C6AB" d="M134.72 88.471c2.025 3.753 3.749 7.683 3.749 7.683s.92-.057 2.434.084c2.756.246 7.484 1.148 12.188 4.232q.868.561 1.729 1.233s-3.797-11.627-13.419-16.445c-8.035-4.019-8.282.256-6.681 3.213"></path><path fill="#01384D" d="M140.903 96.238c2.756.247 7.485 1.148 12.188 4.232-1.379-3.073-3.787-7.554-7.229-10.844-5.468-5.21-10.166-5.91-10.161-3.808.011 1.722 3.375 5.26 5.202 10.42" opacity=".59"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M115.312 92c-8.333 4.167-23 17.8-15 39"></path><path stroke="#7A69EE" stroke-linecap="round" stroke-width="1.5" d="M115.311 101C106.978 105.167 96 115.5 100 130.5"></path><path fill="#37C6AB" d="M111.677 104.915c4.93 6.93 6.844 12.732 6.844 12.732-.02-1.149.025-2.231.122-3.243.645-6.823 3.642-10.656 6.045-12.671 1.739-1.452 3.168-1.959 3.168-1.959-6.507-5.925-17.778-8.497-20.091-6.335-2.304 2.16-1.019 4.548 3.912 11.476"></path><path fill="#01384D" d="M110.03 99.83c2.343 3.252 6.682 9.063 8.61 14.573.646-6.822 3.643-10.656 6.047-12.669-2.247-1.749-7.349-5.478-11.472-6.69-5.451-1.606-6.028.849-3.185 4.786" opacity=".59"></path><path fill="#FEF3C6" d="M117.976 116.84c.24.846.54 1.637.877 2.352 3.325 7.082 10.667 8.15 13.273 8.45 2.902.347 13.095-.378 19.569-5.846a19 19 0 0 0 1.816-1.732c.006-.001.006-.001.012-.009 2.111-2.271 3.447-4.807 4.065-7.395.803-3.389.371-6.88-1.189-9.99-1.255-2.531-5.322-6.453-12.029-7.78-3.171-.628-6.942-.683-11.288.283-1.608.365-3.091.827-4.435 1.396l-.006.001c-9.895 4.152-12.665 13.332-10.665 20.27"></path><path fill="#37C6AB" d="M118.85 119.195a16.5 16.5 0 0 1-.879-2.354c-1.993-6.936.776-16.121 10.668-20.27l.008-.002c2.901.153 7.754 1.204 10.81 6.151 4.322 7.017-4.491 20.151-20.607 16.475M157.586 112.662c-3.045.289-6.747-.627-9.414-3.729-4.671-5.437-4.333-11.263-3.801-14.043 6.706 1.325 10.772 5.249 12.029 7.779 1.561 3.113 1.994 6.602 1.186 9.993"></path><path fill="#C53434" d="M117.975 116.84c.24.846.54 1.636.877 2.352 3.325 7.082 10.668 8.15 13.273 8.45 2.902.346 13.096-.378 19.569-5.847a19 19 0 0 0 1.817-1.731c-18.527 11.635-35.984-.853-31.128-13.179 4.86-12.328 21.986-11.995 21.986-11.995-3.17-.628-6.942-.683-11.287.282-1.608.366-3.091.828-4.436 1.397l-.005.001c-9.896 4.152-12.665 13.332-10.666 20.27" opacity=".14"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".472" d="M131.401 113.928s-12.163-2.43-25.025 1.687M131.734 115.478s-13.918 2.581-22.882 7.343M155.672 105.669s5.005-4.822 14.222-6.571M156.003 107.215s6.878-4.373 15.521-3.178"></path><path fill="#01384D" d="M141.718 104.471c-.256-1.195 2.523-1.954 2.814-.605.289 1.349-2.508 2.031-2.814.605M143.231 108.696c.318-.068.551-.224.688-.461q.053-.093.084-.188c.228.217.564.362 1.022.263q.481-.104.69-.461c.241-.419.082-.931.075-.952a.198.198 0 0 0-.377.12c.002.004.113.37-.043.635-.08.138-.22.227-.428.272-.712.153-.92-.55-.94-.631-.042-.156-.282-.189-.364-.049a.2.2 0 0 0-.021.159c.002.003.113.37-.041.635q-.118.206-.43.272c-.71.151-.919-.551-.94-.632a.2.2 0 0 0-.233-.143l-.009.001a.2.2 0 0 0-.141.242c.102.4.529 1.107 1.408.918"></path><path fill="#01384D" d="M143.852 107.536a.2.2 0 0 0 .151-.236l-.458-2.133a.198.198 0 1 0-.387.083l.458 2.134a.2.2 0 0 0 .236.152M144.412 110.316c.313-.068.671-.247 1.041-.633a.2.2 0 0 0-.007-.281.2.2 0 0 0-.281.007c-.878.917-1.597.405-1.626.383a.198.198 0 0 0-.239.317c.008.005.467.345 1.112.207"></path><path fill="#FDE047" d="M132.668 101.933c7.028-1.459 9.332 9.008 2.262 10.527s-9.771-8.966-2.262-10.527M148.608 98.483c5.366-1.113 7.2 7.225 1.801 8.385-5.4 1.16-7.536-7.195-1.801-8.385"></path><path fill="#01384D" d="M134.747 104.392c4.274-.889 5.63 5.262 1.328 6.184-4.3.925-5.896-5.234-1.328-6.184M150.429 100.384c3.144-.654 4.15 3.914.987 4.593-3.165.681-4.348-3.895-.987-4.593"></path><path fill="#37C6AB" d="M52.298 60.811c5.362 1.43 9.627 4.02 13.293 11.478 3.665 7.464 5.241 10.724 13.433 14.563l2.176-5.88s-2.327-.772-4.939-3.269c-1.808-1.729-3.757-4.295-5.16-8.012-3.413-9.062-11.27-12.678-17.252-13.688a10 10 0 0 0-1.067-.124c-5.013-.339-5.504 3.596-.484 4.932"></path><path fill="#C53434" d="M52.298 60.813c5.362 1.43 9.627 4.02 13.293 11.477 3.665 7.464 5.241 10.725 13.433 14.563l2.176-5.88s-2.327-.772-4.939-3.268c-3.25 2.327-5.435-.905-7.766-5.545-2.697-5.356-7.324-11.046-13.646-13.873-1.965-.879-2.396-1.699-2.068-2.407-5.012-.339-5.503 3.596-.483 4.933" opacity=".14"></path>',30)]))}const TF={render:EF},MF={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",fill:"none",viewBox:"0 0 174 155"};function IF(n,e){return I(),z("svg",MF,e[0]||(e[0]=[ra('<path fill="#8B929C" fill-opacity=".3" d="M163.646 75.594c0 41.694-33.799 75.493-75.493 75.493s-75.492-33.799-75.492-75.493S46.459.099 88.153.099s75.493 33.8 75.493 75.495" opacity=".44"></path><path fill="#01384D" d="M119.825 91.312c-1.608 2.6-3.958 4.738-6.731 6.009-2.369 1.079-5.008 1.57-7.213 2.947-1.763 1.098-3.169 2.716-5.028 3.641-2.715 1.347-6.047.981-8.753-.376-1.474-.732-2.85-1.791-3.64-3.246-.568-1.058-.79-2.252-1.136-3.41a15.77 15.77 0 0 0-5.527-7.914c-.772-.579-1.822-1.185-2.794-1.888q.375-.142.75-.27c19.397-6.73 32.907-2.783 40.072 4.507" opacity=".59"></path><path fill="#37C6AB" d="M144.363 63.606c-5.615 2.89-9.736 6.808-12.009 15.996-2.273 9.196-3.236 13.212-11.421 19.472l-3.852-6.02s1.993-1.184 4.083-3.968c1.8-2.397 3.678-5.98 4.42-11.035 1.608-10.921 9.476-16.853 15.89-19.424 6.423-2.572 8.513 2.089 2.889 4.978"></path><path fill="#C53434" d="M144.363 63.606c-5.615 2.89-9.736 6.808-12.009 15.996-2.273 9.196-3.236 13.212-11.421 19.472l-3.852-6.02s1.993-1.184 4.083-3.968c4.824 4.488 6.472 2.813 8.619-6.422 2.33-10.035 3.187-12.721 8.234-17.69 5.046-4.97 7.704-7.012 3.457-6.347 6.423-2.572 8.513 2.089 2.889 4.978" opacity=".14"></path><path fill="#37C6AB" d="M126.71 134.06c-1.445 4.661-.646 6.905-2.725 8.35-2.09 1.444-8.032 2.888-10.276 1.761-.473-.24-.809-.529-1.029-.857-.82-1.222.018-2.936 1.675-3.957 2.08-1.281 2.08-1.763.799-4.006-1.02-1.791-6.395-7.117-9.524-9.948a.2.2 0 0 0-.048-.039c-.791-.723-1.436-1.281-1.821-1.57-1.926-1.444-4.178-1.608-13.327.636-1.34.328-2.86.665-4.499.973-1.29.25-2.666.472-4.082.664-4.034.54-8.455.799-12.576.356-5.105-.529-9.746-2.118-12.684-5.517-4.45-5.171-5.807-12.047-6.192-16.545-.24-2.774-.117-4.641-.117-4.641s1.32-1.493 8.582-4.797c4.305-1.955 10.699-4.555 20.137-7.848.25-.096.5-.183.75-.27 19.396-6.73 32.906-2.783 40.072 4.507 2.464 2.504 4.179 5.412 5.122 8.408 3.688 11.709-1.444 21.504-2.089 22.428-.645.925 2.725 3.244 3.852 4.054 1.126.8 1.445 3.207 0 7.858"></path><path fill="#FEF3C6" d="M105.63 125.403c-.809-.741-1.474-1.309-1.868-1.608-1.925-1.445-4.179-1.609-13.328.635-9.148 2.254-26.636 4.816-33.84-3.524-7.194-8.35-6.308-21.187-6.308-21.187s1.319-1.492 8.58-4.795c1.002 6.095 5.644 24.952 24.26 23.526 22.168-1.695 22.504 6.953 22.504 6.953"></path><path fill="#37C6AB" d="M88.15 115.281c-.038.28-.075.577-.124.886-.376 2.523-1.136 5.816-2.09 9.236-2.206 7.867-5.441 16.419-7.386 17.854-1.28.944-3.718 1.425-6.047 1.493-2.9.086-5.644-.453-5.818-1.493-.326-1.878 3.043-4.381 3.505-9.197.203-2.08-.326-4.709-.914-7.637-.77-3.842-1.627-8.195-1.07-12.461.29-2.167.723-7.983 7.147-10.256 6.414-2.263 13.762 3.592 12.798 11.575"></path><path fill="#C53434" d="M105.581 125.364c-.79-.723-1.434-1.281-1.82-1.57-1.925-1.445-4.179-1.608-13.328.636-1.338.328-2.86.664-4.497.972-2.206 7.868-5.441 16.42-7.386 17.855-1.282.943-3.718 1.425-6.047 1.493 2.185-1.562 4.998-4.296 6.5-8.601 1.386-3.977 2.243-7.193 2.85-10.082.568-2.697.915-5.124 1.271-7.618.222-1.531 2.195-2.234 4.902-2.282 6.384-.135 16.833 3.361 17.603 7.935.068.386.048.809-.048 1.262" opacity=".14"></path><path fill="#C53434" d="M126.71 134.06c-1.445 4.661-.646 6.905-2.725 8.35-2.09 1.444-8.032 2.888-10.276 1.761-.473-.24-.809-.529-1.029-.857 2.011.088 4.333-.172 5.845-1.473 3.149-2.716 4.333-4.728 2.714-9.533-1.607-4.816-3.678-4.344-5.42-8.321-1.744-3.977 3.187-7.338-2.263-19.231-5.461-11.893-23.681-12.422-28.091-11.816-4.402.596-6.665 8.782-16.026 11.816-6.856 2.225-15.118.626-19.038-.395-.24-2.774-.117-4.641-.117-4.641s1.32-1.493 8.582-4.797c4.305-1.955 10.699-4.555 20.137-7.848.25-.096.5-.183.75-.27 19.396-6.73 32.906-2.783 40.072 4.507 2.464 2.504 4.179 5.412 5.122 8.408 3.688 11.709-1.444 21.504-2.089 22.428-.645.925 2.725 3.244 3.852 4.054 1.126.8 1.445 3.207 0 7.858" opacity=".14"></path><path fill="#37C6AB" d="M70.19 124.593c-1.31 3.534-6.075 17.817-7.683 18.943-1.292.896-4.344 1.8-7.3 1.492a9.2 9.2 0 0 1-2.1-.452c-3.457-1.204-.867-3.929 0-5.219.876-1.282 1.694-1.926 1.116-8.34-.288-3.13-.558-8.022-.76-12.202-.222-4.4-.356-8.022-.356-8.022 4.247 12.355 17.083 13.8 17.083 13.8"></path><path fill="#C53434" d="M70.19 124.593c-1.31 3.534-6.075 17.817-7.683 18.943-1.292.896-4.344 1.8-7.3 1.492 3.764-1.049 5.75-3.785 6.654-6.114 1.367-3.487 1.531-9.746-3.14-13.512-2.224-1.801-4.016-4.381-5.258-6.587-.222-4.4-.356-8.022-.356-8.022 4.247 12.355 17.083 13.8 17.083 13.8" opacity=".14"></path><path fill="#37C6AB" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.17-1.088 1.493-2.86 2.118-4.93 2.34-1.272.144-2.648.125-4.055.068-3.688-.154-1.281-3.689 0-4.97 1.28-1.29 2.725-4.015 2.408-7.068-.136-1.377-.424-3.217-.684-4.815-.309-1.936-.598-3.525-.598-3.525 4.007-4.333 15.727-3.852 15.563.8"></path><path fill="#C53434" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.171-1.089 1.492-2.861 2.118-4.931 2.34 6.096-7.724 8.504-15.14 6.077-17.489-1.993-1.936-6.385-.241-8.407.703-.309-1.936-.598-3.524-.598-3.524 4.007-4.334 15.727-3.852 15.563.799" opacity=".14"></path><path fill="#C53434" d="M106.805 123.631c-.155 4.651-5.932 14.762-7.704 17.171-1.089 1.492-2.861 2.118-4.931 2.34 6.096-7.724 8.504-15.14 6.077-17.489-1.993-1.936-6.385-.241-8.407.703-.309-1.936-.598-3.524-.598-3.524 4.007-4.334 15.727-3.852 15.563.799" opacity=".14"></path><path fill="#37C6AB" d="M81.661 79.274s-.607-1.156-1.908-2.744c-2.397-2.928-7.183-7.31-14.973-8.619-1.85-.318-3.862-.453-6.058-.356 0 0 8.436-14.542 14.86-13.906 6.432.645 8.08 25.625 8.08 25.625"></path><path fill="#01384D" d="M79.753 76.53c-2.397-2.927-7.183-7.31-14.975-8.619 1.416-3.227 5.634-12.115 9.45-11.855 3.9.279 5.207 15.552 5.525 20.474" opacity=".59"></path><path fill="#01384D" d="M67.858 69.832s3.086-10.356 6.37-9.582c3.28.773 1.748 13.662 1.748 13.662z"></path><path fill="#37C6AB" d="M49.9 68.287s-1.82.423-4.227 1.772c-.01.008 0 .008 0 .008a21.64 21.64 0 0 0-9.033 9.65 24.3 24.3 0 0 0-1.473 3.891s-.501-17.623 2.35-24.2c2.86-6.588 12.384 8.879 12.384 8.879"></path><path fill="#01384D" d="M45.672 70.06c-.009.009.001.008.001.008a21.63 21.63 0 0 0-9.033 9.65c-.298-7.252.656-18.47 2.272-19.646 1.628-1.184 5.172 6.357 6.76 9.987" opacity=".59"></path><path fill="#01384D" d="M37.99 77.578s-.106-12.42 1.913-13.687c2.017-1.266 4.666 8.829 4.666 8.829z"></path><path fill="#FEF3C6" d="M82.104 87.854c-1.108 7.57-6.155 11.7-10.709 13.915-3.177 1.552-15.313 2.976-22.159.897-2.447-.742-5.2-1.744-7.627-3.467-2.937-2.081-5.382-5.201-6.202-10.18a22 22 0 0 1-.298-3.9c.028-8.243 4.661-14.031 11.845-16.833a28 28 0 0 1 5.595-1.483 33 33 0 0 1 3.871-.386c.664-.038 1.348-.048 2.042-.038 13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249"></path><path fill="#37C6AB" d="M48.13 85.275c-1.475 6.615-8.197 7.097-12.724 3.746a22.5 22.5 0 0 1-.298-3.9c.03-8.244 4.662-14.032 11.847-16.833 1.154 3.89 2.59 10.64 1.175 16.987M82.104 87.854c-8.302 6.385-25.973 6.163-27.456-3.718-1.28-8.455.617-14.83 1.772-17.719a29 29 0 0 1 2.042-.038c13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249"></path><path fill="#C53434" d="M82.104 87.854c-1.108 7.57-6.155 11.7-10.709 13.915-3.177 1.552-15.313 2.976-22.159.897-2.447-.742-5.2-1.744-7.627-3.467.29.086.597.192.906.299 24.383 8.618 39.28-10.537 32.674-22.449-6.606-11.922-22.64-10.246-22.64-10.246a33 33 0 0 1 3.871-.386c.664-.038 1.348-.048 2.042-.038 13.376.145 22.9 5.239 23.786 16.226.154 1.907.096 3.66-.144 5.249" opacity=".14"></path><path fill="#FDE047" d="M42.433 88.058c-4.185 0-6.22-3.747-5.85-7.107.297-2.764 2.21-5.258 5.85-5.23.795.01 1.497.145 2.126.396 5.368 2.09 4.702 11.94-2.126 11.94"></path><path fill="#01384D" d="M41.105 78.914c4.603.035 4.638 7.506 0 7.506s-4.919-7.542 0-7.506"></path><path fill="#FDE047" d="M61.973 87.93c-4.58 0-6.806-3.746-6.4-7.107.323-2.763 2.416-5.257 6.4-5.228.871.01 1.638.144 2.326.395 5.876 2.089 5.149 11.94-2.326 11.94"></path><path fill="#01384D" d="M60.518 78.787c5.038.033 5.075 7.506 0 7.506s-5.382-7.543 0-7.506"></path><path stroke="#014D5D" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width=".48" d="M39.903 90.694s-8.85-5.16-23.616-3.706M35.932 92.459s-8.919-.466-19.644 2.578M65.472 90.694s14.628-5.16 29.394-3.706M69.444 92.458s14.696-.465 25.422 2.58"></path><path fill="#9C8EF4" d="m29.925 109.052 133.991-9.068s-4.195-39.403-14.699-66.367c0 0-48.495-8.354-110.554 4.33 0 0-5.283 8.533-8.738 71.105"></path><path fill="#CEC4FD" d="M38.663 37.947s-5.236 3.11-18.56 11.75c0 0-6.261 39.108-6.904 58.059 0 0 8.734.335 16.725 1.297 0 0 4.993-59.394 8.74-71.106"></path><path fill="#9C8EF4" d="m29.923 109.052-6.13-14.574H3.89l9.308 13.279z"></path><path fill="#CEC4FD" d="m29.925 109.053 6.708-17.11s101.116-7.603 135.784-7.925l-8.501 15.967s-119.833 8.104-133.991 9.068"></path>',32)]))}const OF={render:IF},_F={class:"ivyforms-page-empty-state__text"},AF={class:"medium-16"},RF={class:"ivyforms-page-empty-state__text__subtitle regular-14"},PF=ue({__name:"PageEmptyState",props:{title:{default:""},subtitle:{default:""},image:{default:"fields"}},setup(n){const e=n,{isDark:t,isLight:r}=x5();return(o,s)=>(I(),z("div",{class:H(["ivyforms-page-empty-state",`ivyforms-page-empty-state__${e.image}`])},[e.image==="fields"?(I(),me(v(gF),{key:0})):e.image==="form-builder"&&v(r)()?(I(),me(v(SF),{key:1})):e.image==="form-builder"&&v(t)()?(I(),me(v(xF),{key:2})):e.image==="filters"?(I(),me(v(TF),{key:3})):e.image==="not-found"?(I(),me(v(OF),{key:4})):fe("",!0),Q("div",_F,[Q("span",AF,Ee(e.title),1),Q("span",RF,Ee(e.subtitle),1)]),ve(o.$slots,"actionButton",{},void 0,!0)],2))}}),cp=sn(PF,[["__scopeId","data-v-41eed4b2"]]),$F={};function DF(n,e){const t=MD;return I(),me(t,xt({class:"ivyforms-skeleton"},{...n.$props,...n.$attrs},{animated:""}),Ts({_:2},[n.$slots.template?{name:"template",fn:q(()=>[ve(n.$slots,"template")]),key:"0"}:void 0,n.$slots.default?{name:"default",fn:q(()=>[ve(n.$slots,"default")]),key:"1"}:void 0]),1040)}const I5=sn($F,[["render",DF]]),NF={};function LF(n,e){const t=ID;return I(),me(t,xt({class:"ivyforms-skeleton-item"},{...n.$props,...n.$attrs}),null,16)}const O5=sn(NF,[["render",LF]]),BF={key:0,class:"ivyforms-checkbox__description"},Xo=ue({__name:"IvyCheckbox",props:{modelValue:{type:Boolean},indeterminate:{type:Boolean,default:!1},labelPosition:{default:"right"},description:{default:""},priority:{default:"primary"},size:{default:"d"},type:{default:"withMarker"},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,r=e,o=O({get(){return t.modelValue},set(s){r("update:modelValue",s)}});return(s,a)=>{const i=F_;return s.$slots.default?(I(),me(i,{key:0,modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),class:H(["ivyforms-checkbox",[`size-${t.size}`,`priority-${t.priority}`,`type-${t.type}`,t.labelPosition==="left"?"label-left":"label-right",{"with-description":t.description},{"is-checked":o.value,"is-indeterminate":t.indeterminate,"is-disabled":t.disabled,"with-marker":t.type==="withMarker"}]]),disabled:t.disabled,onChange:a[1]||(a[1]=l=>s.$emit("change",l))},{default:q(()=>[ve(s.$slots,"default"),t.description?(I(),z("span",BF,Ee(t.description),1)):fe("",!0)]),_:3},8,["modelValue","class","disabled"])):fe("",!0)}}}),We=n=>{const e={success:"var(--map-status-success-fill-0)",warning:"var(--map-status-warning-fill-0)",error:"var(--map-status-error-fill-0)",info:"var(--map-base-purple-fill-0)",default:"var(--map-base-dusk-fill-4)"},t={success:"var(--primitive-white)",warning:"var(--primitive-white)",error:"var(--primitive-white)",info:"var(--primitive-white)",default:"var(--map-base-dusk-fill--4)"},o={...n,class:"ivyforms-message regular-14 ivyforms-pr-8",offset:48,icon:st(Jn,{name:{success:"check-circle",warning:"danger",error:"danger",info:"danger",default:"sticker"}[n.type]||"sticker",size:"s",outerSize:"24px",type:"fill-duo",color:"var(--map-base-dusk-fill--4)"}),style:{backgroundColor:e[n.type]||e.default,borderColor:e[n.type]||e.default}};HL(o);const s=document.createElement("style");s.textContent=` |
| 16 |
.ivyforms-message.el-message .el-message__content { |
| 17 |
color: ${t[n.type]}; |
| 18 |
} |
| 19 |
.ivyforms-message .el-message__icon .ivyforms-icon svg { |
| 20 |
width: 24px; |
| 21 |
height: 24px; |
| 22 |
fill: ${t[n.type]}; |
| 23 |
} |
| 24 |
`,document.head.appendChild(s)},dp=vl("allForms",()=>{const n=N([]),e=N([]),t=N({page:1,perPage:10,total:0}),{getLabel:r}=rn(),o=async({page:d=1,perPage:f=10,search:h="",sortBy:m="",sortOrder:g="asc",dateRange:y=[],filters:S={}}={})=>{try{const w={page:d,perPage:f,search:h,orderBy:m,order:g,dateRange:y,filters:S},{data:x}=await Z9.get("/wp-json/ivyforms/v1/forms/search",{params:w,headers:{"X-WP-Nonce":wpIvyApiSettings.nonce}}),T=x.data;e.value=c(T.data.data),t.value=T.data.meta}catch(w){We({message:`${r("error_fetching_forms")} ${w}`,type:"error"})}},s=async(d,f)=>{try{const h=await fetch(`/wp-json/ivyforms/v1/form/update/starred/${d}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify({attribute:"starred",value:f})}),m=await h.json();h.ok?We({message:r("form_updated"),type:"success"}):We({message:`${r("failed_to_update_form")} ${m.message}`,type:"error"})}catch(h){We({message:`${r("error_updating_forms")} ${h}`,type:"error"})}},a=async(d,f)=>{try{const h=await fetch(`/wp-json/ivyforms/v1/form/update/status/${d}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify({value:f})}),m=await h.json();h.ok?We({message:r("form_updated"),type:"success"}):We({message:`${r("failed_to_update_form")} ${m.message}`,type:"error"})}catch(h){We({message:`${r("error_updating_forms")} ${h}`,type:"error"})}},i=async d=>{try{const f=await fetch("/wp-json/ivyforms/v1/forms/delete",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify({ids:d})}),h=await f.json();if(f.ok)return We({message:r("form_duplicated"),type:"success"}),!0;We({message:`${r("failed_to_delete_form")} ${h.message}`,type:"error"})}catch(f){We({message:`${r("error_deleting_forms")} ${f}`,type:"error"})}},l=async d=>{try{const f=await fetch(`/wp-json/ivyforms/v1/form/duplicate/${d}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),h=await f.json();f.ok?(We({message:r("form_duplicated_successfully"),type:"success"}),n.value.push(h.data)):We({message:`${r("failed_to_duplicate_form")} ${h.message}`,type:"error"})}catch(f){We({message:`${r("error_duplicating_forms")} ${f}`,type:"error"})}},c=d=>d.map(f=>({...f,starred:f.starred==="1",published:f.published==="1"}));return{tableData:e,paginationMeta:t,fetchForms:o,updateStarred:s,updateStatus:a,deleteForms:i,duplicateForm:l}}),FF={class:"ivyforms-all-forms__header"},VF=ue({__name:"AllFormsTableHeader",props:{selectedIds:{}},emits:["unselect-all","reload"],setup(n,{emit:e}){const{getLabel:t}=rn(),r=n,o=N(!1),s=dp(),a=O(()=>r.selectedIds.length>0),i=e,l=d=>{d||i("unselect-all")},c=async()=>{await s.deleteForms(r.selectedIds),i("reload"),o.value=!1};return(d,f)=>{const h=Xo,m=T5;return I(),z("div",FF,[R(h,{type:"checkmark",indeterminate:"",size:"s","model-value":a.value,"onUpdate:modelValue":l},{default:q(()=>[ve(d.$slots,"default")]),_:3},8,["model-value"]),R(Qt,{priority:"danger",size:"xs",onClick:f[0]||(f[0]=g=>o.value=!0)},{default:q(()=>f[3]||(f[3]=[ht(" Delete")])),_:1}),R(m,{modelValue:o.value,"onUpdate:modelValue":f[2]||(f[2]=g=>o.value=g),title:v(t)("delete_form"),subtitle:v(t)("action_undone"),"show-close":"","align-center":"",type:"error"},{footer:q(()=>[R(Qt,{priority:"danger",size:"d",type:"fill",onClick:c},{default:q(()=>[ht(Ee(v(t)("delete")),1)]),_:1}),R(Qt,{priority:"tertiary",size:"d",type:"fill",onClick:f[1]||(f[1]=g=>o.value=!1)},{default:q(()=>[ht(Ee(v(t)("cancel")),1)]),_:1})]),_:1},8,["modelValue","title","subtitle"])])}}}),zF=ue({__name:"IvyIndicatorButton",props:{type:{default:"sort"},color:{default:"tertiary"},indicator:{type:Boolean,default:!1},indicatorPriority:{default:"secondary"},customHideIndicator:{type:Function,default:void 0}},setup(n){const e=n,t=N(e.indicator),r=N(!1),o=N(!1),s=()=>{r.value=!r.value},a=()=>{e.customHideIndicator?e.customHideIndicator():t.value=!1,r.value=!1};Xe(()=>e.indicator,f=>{t.value=f});const i=f=>{const h={sort:{default:"sort-default",hover:"sort-from-top",active:"sort-from-top"},filter:{default:"filter",hover:"filter",active:"filter"},folder:{default:"folder",hover:"folder",active:"folder"},datepicker:{default:"calendar-dot",hover:"calendar-dot",active:"calendar-dot"},import:{default:"import",hover:"import",active:"import"},export:{default:"export",hover:"export",active:"export"}};return r.value?h[f].active:o.value?h[f].hover:h[f].default},l=()=>e.color==="tertiary"?"var(--map-base-dusk-fill--4)":"var(--map-ground-level-3)",c=()=>e.color!=="tertiary"&&(o.value||r.value)?"var(--map-base-purple-symbol-0)":"var(--map-base-dusk-symbol-2)",d=O(()=>i(e.type));return(f,h)=>{const m=Jn;return I(),z("button",{class:H(["ivyforms-indicator-button__wrapper",{"is-active":r.value,"is-fab":e.color==="fab"}]),style:en({background:l()}),onClick:s,onMouseenter:h[0]||(h[0]=g=>o.value=!0),onMouseleave:h[1]||(h[1]=g=>o.value=!1)},[R(m,{name:d.value,color:c(),type:"outline",size:"l"},null,8,["name","color"]),t.value?(I(),z("span",{key:0,class:H(["ivyforms-indicator-button__indicator",`priority-${e.indicatorPriority}`]),onClick:Qe(a,["stop"])},null,2)):fe("",!0)],38)}}}),HF={class:"ivyforms-search"},D1=ue({__name:"IvySearch",props:{modelValue:{default:""},placeholder:{default:""},isSecondary:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=e;function r(o){t("update:modelValue",o)}return(o,s)=>{const a=oo;return I(),z("div",HF,[R(a,{ref:"elInputRef","model-value":o.modelValue,clearable:!0,placeholder:o.placeholder,"icon-start":"search","icon-start-type":"outline",class:H({"is-secondary":o.isSecondary}),"onUpdate:modelValue":r},null,8,["model-value","placeholder","class"])])}}});var Xl={exports:{}};/** |
| 25 |
* @license |
| 26 |
* Lodash <https://lodash.com/> |
| 27 |
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/> |
| 28 |
* Released under MIT license <https://lodash.com/license> |
| 29 |
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> |
| 30 |
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors |
| 31 |
*/var WF=Xl.exports,I2;function UF(){return I2||(I2=1,function(n,e){(function(){var t,r="4.17.21",o=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",i="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,d="__lodash_placeholder__",f=1,h=2,m=4,g=1,y=2,S=1,w=2,x=4,T=8,k=16,C=32,M=64,A=128,V=256,P=512,L=30,K="...",J=800,G=16,ne=1,W=2,D=3,U=1/0,te=9007199254740991,j=17976931348623157e292,ee=NaN,X=4294967295,ce=X-1,ae=X>>>1,ye=[["ary",A],["bind",S],["bindKey",w],["curry",T],["curryRight",k],["flip",P],["partial",C],["partialRight",M],["rearg",V]],ke="[object Arguments]",Be="[object Array]",le="[object AsyncFunction]",xe="[object Boolean]",Me="[object Date]",De="[object DOMException]",Ze="[object Error]",lt="[object Function]",ze="[object GeneratorFunction]",Pe="[object Map]",nt="[object Number]",Ot="[object Null]",_e="[object Object]",He="[object Promise]",Fe="[object Proxy]",Ye="[object RegExp]",qe="[object Set]",dt="[object String]",vt="[object Symbol]",bt="[object Undefined]",kt="[object WeakMap]",Lt="[object WeakSet]",Yt="[object ArrayBuffer]",Pt="[object DataView]",pe="[object Float32Array]",F="[object Float64Array]",re="[object Int8Array]",ge="[object Int16Array]",oe="[object Int32Array]",ie="[object Uint8Array]",be="[object Uint8ClampedArray]",Y="[object Uint16Array]",Ie="[object Uint32Array]",Re=/\b__p \+= '';/g,Ne=/\b(__p \+=) '' \+/g,ot=/(__e\(.*?\)|\b__t\)) \+\n'';/g,at=/&(?:amp|lt|gt|quot|#39);/g,Et=/[&<>"']/g,on=RegExp(at.source),Ln=RegExp(Et.source),tn=/<%-([\s\S]+?)%>/g,Gn=/<%([\s\S]+?)%>/g,xl=/<%=([\s\S]+?)%>/g,Dp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Si=/^\w*$/,Np=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kl=/[\\^$.*+?()[\]{}|]/g,Lp=RegExp(kl.source),wi=/^\s+/,Bp=/\s/,Fp=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Vp=/\{\n\/\* \[wrapped with (.+)\] \*/,Ce=/,? & /,Ke=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bt=/[()=,{}\[\]\/\s]/,Bn=/\\(\\)?/g,Cr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ia=/\w*$/,Uo=/^[-+]0x[0-9a-f]+$/i,Ci=/^0b[01]+$/i,$s=/^\[object .+?Constructor\]$/,zp=/^0o[0-7]+$/i,D8=/^(?:0|[1-9]\d*)$/,N8=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oc=/($^)/,L8=/['\n\r\u2028\u2029\\]/g,ac="\\ud800-\\udfff",B8="\\u0300-\\u036f",F8="\\ufe20-\\ufe2f",V8="\\u20d0-\\u20ff",kg=B8+F8+V8,Eg="\\u2700-\\u27bf",Tg="a-z\\xdf-\\xf6\\xf8-\\xff",z8="\\xac\\xb1\\xd7\\xf7",H8="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",W8="\\u2000-\\u206f",U8=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Mg="A-Z\\xc0-\\xd6\\xd8-\\xde",Ig="\\ufe0e\\ufe0f",Og=z8+H8+W8+U8,Hp="['’]",j8="["+ac+"]",_g="["+Og+"]",sc="["+kg+"]",Ag="\\d+",K8="["+Eg+"]",Rg="["+Tg+"]",Pg="[^"+ac+Og+Ag+Eg+Tg+Mg+"]",Wp="\\ud83c[\\udffb-\\udfff]",G8="(?:"+sc+"|"+Wp+")",$g="[^"+ac+"]",Up="(?:\\ud83c[\\udde6-\\uddff]){2}",jp="[\\ud800-\\udbff][\\udc00-\\udfff]",xi="["+Mg+"]",Dg="\\u200d",Ng="(?:"+Rg+"|"+Pg+")",Y8="(?:"+xi+"|"+Pg+")",Lg="(?:"+Hp+"(?:d|ll|m|re|s|t|ve))?",Bg="(?:"+Hp+"(?:D|LL|M|RE|S|T|VE))?",Fg=G8+"?",Vg="["+Ig+"]?",q8="(?:"+Dg+"(?:"+[$g,Up,jp].join("|")+")"+Vg+Fg+")*",J8="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",X8="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zg=Vg+Fg+q8,Z8="(?:"+[K8,Up,jp].join("|")+")"+zg,Q8="(?:"+[$g+sc+"?",sc,Up,jp,j8].join("|")+")",ew=RegExp(Hp,"g"),tw=RegExp(sc,"g"),Kp=RegExp(Wp+"(?="+Wp+")|"+Q8+zg,"g"),nw=RegExp([xi+"?"+Rg+"+"+Lg+"(?="+[_g,xi,"$"].join("|")+")",Y8+"+"+Bg+"(?="+[_g,xi+Ng,"$"].join("|")+")",xi+"?"+Ng+"+"+Lg,xi+"+"+Bg,X8,J8,Ag,Z8].join("|"),"g"),rw=RegExp("["+Dg+ac+kg+Ig+"]"),ow=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,aw=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],sw=-1,bn={};bn[pe]=bn[F]=bn[re]=bn[ge]=bn[oe]=bn[ie]=bn[be]=bn[Y]=bn[Ie]=!0,bn[ke]=bn[Be]=bn[Yt]=bn[xe]=bn[Pt]=bn[Me]=bn[Ze]=bn[lt]=bn[Pe]=bn[nt]=bn[_e]=bn[Ye]=bn[qe]=bn[dt]=bn[kt]=!1;var vn={};vn[ke]=vn[Be]=vn[Yt]=vn[Pt]=vn[xe]=vn[Me]=vn[pe]=vn[F]=vn[re]=vn[ge]=vn[oe]=vn[Pe]=vn[nt]=vn[_e]=vn[Ye]=vn[qe]=vn[dt]=vn[vt]=vn[ie]=vn[be]=vn[Y]=vn[Ie]=!0,vn[Ze]=vn[lt]=vn[kt]=!1;var iw={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},lw={"&":"&","<":"<",">":">",'"':""","'":"'"},uw={"&":"&","<":"<",">":">",""":'"',"'":"'"},cw={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dw=parseFloat,fw=parseInt,Hg=typeof Jc=="object"&&Jc&&Jc.Object===Object&&Jc,pw=typeof self=="object"&&self&&self.Object===Object&&self,or=Hg||pw||Function("return this")(),Gp=e&&!e.nodeType&&e,Ds=Gp&&!0&&n&&!n.nodeType&&n,Wg=Ds&&Ds.exports===Gp,Yp=Wg&&Hg.process,so=function(){try{var de=Ds&&Ds.require&&Ds.require("util").types;return de||Yp&&Yp.binding&&Yp.binding("util")}catch{}}(),Ug=so&&so.isArrayBuffer,jg=so&&so.isDate,Kg=so&&so.isMap,Gg=so&&so.isRegExp,Yg=so&&so.isSet,qg=so&&so.isTypedArray;function Hr(de,Te,Se){switch(Se.length){case 0:return de.call(Te);case 1:return de.call(Te,Se[0]);case 2:return de.call(Te,Se[0],Se[1]);case 3:return de.call(Te,Se[0],Se[1],Se[2])}return de.apply(Te,Se)}function hw(de,Te,Se,rt){for(var _t=-1,un=de==null?0:de.length;++_t<un;){var Yn=de[_t];Te(rt,Yn,Se(Yn),de)}return rt}function io(de,Te){for(var Se=-1,rt=de==null?0:de.length;++Se<rt&&Te(de[Se],Se,de)!==!1;);return de}function mw(de,Te){for(var Se=de==null?0:de.length;Se--&&Te(de[Se],Se,de)!==!1;);return de}function Jg(de,Te){for(var Se=-1,rt=de==null?0:de.length;++Se<rt;)if(!Te(de[Se],Se,de))return!1;return!0}function Fa(de,Te){for(var Se=-1,rt=de==null?0:de.length,_t=0,un=[];++Se<rt;){var Yn=de[Se];Te(Yn,Se,de)&&(un[_t++]=Yn)}return un}function ic(de,Te){var Se=de==null?0:de.length;return!!Se&&ki(de,Te,0)>-1}function qp(de,Te,Se){for(var rt=-1,_t=de==null?0:de.length;++rt<_t;)if(Se(Te,de[rt]))return!0;return!1}function wn(de,Te){for(var Se=-1,rt=de==null?0:de.length,_t=Array(rt);++Se<rt;)_t[Se]=Te(de[Se],Se,de);return _t}function Va(de,Te){for(var Se=-1,rt=Te.length,_t=de.length;++Se<rt;)de[_t+Se]=Te[Se];return de}function Jp(de,Te,Se,rt){var _t=-1,un=de==null?0:de.length;for(rt&&un&&(Se=de[++_t]);++_t<un;)Se=Te(Se,de[_t],_t,de);return Se}function vw(de,Te,Se,rt){var _t=de==null?0:de.length;for(rt&&_t&&(Se=de[--_t]);_t--;)Se=Te(Se,de[_t],_t,de);return Se}function Xp(de,Te){for(var Se=-1,rt=de==null?0:de.length;++Se<rt;)if(Te(de[Se],Se,de))return!0;return!1}var gw=Zp("length");function yw(de){return de.split("")}function bw(de){return de.match(Ke)||[]}function Xg(de,Te,Se){var rt;return Se(de,function(_t,un,Yn){if(Te(_t,un,Yn))return rt=un,!1}),rt}function lc(de,Te,Se,rt){for(var _t=de.length,un=Se+(rt?1:-1);rt?un--:++un<_t;)if(Te(de[un],un,de))return un;return-1}function ki(de,Te,Se){return Te===Te?Aw(de,Te,Se):lc(de,Zg,Se)}function Sw(de,Te,Se,rt){for(var _t=Se-1,un=de.length;++_t<un;)if(rt(de[_t],Te))return _t;return-1}function Zg(de){return de!==de}function Qg(de,Te){var Se=de==null?0:de.length;return Se?eh(de,Te)/Se:ee}function Zp(de){return function(Te){return Te==null?t:Te[de]}}function Qp(de){return function(Te){return de==null?t:de[Te]}}function e0(de,Te,Se,rt,_t){return _t(de,function(un,Yn,pn){Se=rt?(rt=!1,un):Te(Se,un,Yn,pn)}),Se}function ww(de,Te){var Se=de.length;for(de.sort(Te);Se--;)de[Se]=de[Se].value;return de}function eh(de,Te){for(var Se,rt=-1,_t=de.length;++rt<_t;){var un=Te(de[rt]);un!==t&&(Se=Se===t?un:Se+un)}return Se}function th(de,Te){for(var Se=-1,rt=Array(de);++Se<de;)rt[Se]=Te(Se);return rt}function Cw(de,Te){return wn(Te,function(Se){return[Se,de[Se]]})}function t0(de){return de&&de.slice(0,a0(de)+1).replace(wi,"")}function Wr(de){return function(Te){return de(Te)}}function nh(de,Te){return wn(Te,function(Se){return de[Se]})}function El(de,Te){return de.has(Te)}function n0(de,Te){for(var Se=-1,rt=de.length;++Se<rt&&ki(Te,de[Se],0)>-1;);return Se}function r0(de,Te){for(var Se=de.length;Se--&&ki(Te,de[Se],0)>-1;);return Se}function xw(de,Te){for(var Se=de.length,rt=0;Se--;)de[Se]===Te&&++rt;return rt}var kw=Qp(iw),Ew=Qp(lw);function Tw(de){return"\\"+cw[de]}function Mw(de,Te){return de==null?t:de[Te]}function Ei(de){return rw.test(de)}function Iw(de){return ow.test(de)}function Ow(de){for(var Te,Se=[];!(Te=de.next()).done;)Se.push(Te.value);return Se}function rh(de){var Te=-1,Se=Array(de.size);return de.forEach(function(rt,_t){Se[++Te]=[_t,rt]}),Se}function o0(de,Te){return function(Se){return de(Te(Se))}}function za(de,Te){for(var Se=-1,rt=de.length,_t=0,un=[];++Se<rt;){var Yn=de[Se];(Yn===Te||Yn===d)&&(de[Se]=d,un[_t++]=Se)}return un}function uc(de){var Te=-1,Se=Array(de.size);return de.forEach(function(rt){Se[++Te]=rt}),Se}function _w(de){var Te=-1,Se=Array(de.size);return de.forEach(function(rt){Se[++Te]=[rt,rt]}),Se}function Aw(de,Te,Se){for(var rt=Se-1,_t=de.length;++rt<_t;)if(de[rt]===Te)return rt;return-1}function Rw(de,Te,Se){for(var rt=Se+1;rt--;)if(de[rt]===Te)return rt;return rt}function Ti(de){return Ei(de)?$w(de):gw(de)}function Io(de){return Ei(de)?Dw(de):yw(de)}function a0(de){for(var Te=de.length;Te--&&Bp.test(de.charAt(Te)););return Te}var Pw=Qp(uw);function $w(de){for(var Te=Kp.lastIndex=0;Kp.test(de);)++Te;return Te}function Dw(de){return de.match(Kp)||[]}function Nw(de){return de.match(nw)||[]}var Lw=function de(Te){Te=Te==null?or:Mi.defaults(or.Object(),Te,Mi.pick(or,aw));var Se=Te.Array,rt=Te.Date,_t=Te.Error,un=Te.Function,Yn=Te.Math,pn=Te.Object,oh=Te.RegExp,Bw=Te.String,lo=Te.TypeError,cc=Se.prototype,Fw=un.prototype,Ii=pn.prototype,dc=Te["__core-js_shared__"],fc=Fw.toString,fn=Ii.hasOwnProperty,Vw=0,s0=function(){var u=/[^.]+$/.exec(dc&&dc.keys&&dc.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),pc=Ii.toString,zw=fc.call(pn),Hw=or._,Ww=oh("^"+fc.call(fn).replace(kl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),hc=Wg?Te.Buffer:t,Ha=Te.Symbol,mc=Te.Uint8Array,i0=hc?hc.allocUnsafe:t,vc=o0(pn.getPrototypeOf,pn),l0=pn.create,u0=Ii.propertyIsEnumerable,gc=cc.splice,c0=Ha?Ha.isConcatSpreadable:t,Tl=Ha?Ha.iterator:t,Ns=Ha?Ha.toStringTag:t,yc=function(){try{var u=zs(pn,"defineProperty");return u({},"",{}),u}catch{}}(),Uw=Te.clearTimeout!==or.clearTimeout&&Te.clearTimeout,jw=rt&&rt.now!==or.Date.now&&rt.now,Kw=Te.setTimeout!==or.setTimeout&&Te.setTimeout,bc=Yn.ceil,Sc=Yn.floor,ah=pn.getOwnPropertySymbols,Gw=hc?hc.isBuffer:t,d0=Te.isFinite,Yw=cc.join,qw=o0(pn.keys,pn),qn=Yn.max,dr=Yn.min,Jw=rt.now,Xw=Te.parseInt,f0=Yn.random,Zw=cc.reverse,sh=zs(Te,"DataView"),Ml=zs(Te,"Map"),ih=zs(Te,"Promise"),Oi=zs(Te,"Set"),Il=zs(Te,"WeakMap"),Ol=zs(pn,"create"),wc=Il&&new Il,_i={},Qw=Hs(sh),e7=Hs(Ml),t7=Hs(ih),n7=Hs(Oi),r7=Hs(Il),Cc=Ha?Ha.prototype:t,_l=Cc?Cc.valueOf:t,p0=Cc?Cc.toString:t;function $(u){if(In(u)&&!$t(u)&&!(u instanceof qt)){if(u instanceof uo)return u;if(fn.call(u,"__wrapped__"))return hy(u)}return new uo(u)}var Ai=function(){function u(){}return function(p){if(!Tn(p))return{};if(l0)return l0(p);u.prototype=p;var b=new u;return u.prototype=t,b}}();function xc(){}function uo(u,p){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!p,this.__index__=0,this.__values__=t}$.templateSettings={escape:tn,evaluate:Gn,interpolate:xl,variable:"",imports:{_:$}},$.prototype=xc.prototype,$.prototype.constructor=$,uo.prototype=Ai(xc.prototype),uo.prototype.constructor=uo;function qt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=X,this.__views__=[]}function o7(){var u=new qt(this.__wrapped__);return u.__actions__=Ar(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Ar(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Ar(this.__views__),u}function a7(){if(this.__filtered__){var u=new qt(this);u.__dir__=-1,u.__filtered__=!0}else u=this.clone(),u.__dir__*=-1;return u}function s7(){var u=this.__wrapped__.value(),p=this.__dir__,b=$t(u),E=p<0,_=b?u.length:0,B=yC(0,_,this.__views__),Z=B.start,se=B.end,he=se-Z,Oe=E?se:Z-1,Ae=this.__iteratees__,$e=Ae.length,Je=0,ft=dr(he,this.__takeCount__);if(!b||!E&&_==he&&ft==he)return L0(u,this.__actions__);var wt=[];e:for(;he--&&Je<ft;){Oe+=p;for(var Vt=-1,Ct=u[Oe];++Vt<$e;){var Gt=Ae[Vt],Zt=Gt.iteratee,Kr=Gt.type,Er=Zt(Ct);if(Kr==W)Ct=Er;else if(!Er){if(Kr==ne)continue e;break e}}wt[Je++]=Ct}return wt}qt.prototype=Ai(xc.prototype),qt.prototype.constructor=qt;function Ls(u){var p=-1,b=u==null?0:u.length;for(this.clear();++p<b;){var E=u[p];this.set(E[0],E[1])}}function i7(){this.__data__=Ol?Ol(null):{},this.size=0}function l7(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function u7(u){var p=this.__data__;if(Ol){var b=p[u];return b===l?t:b}return fn.call(p,u)?p[u]:t}function c7(u){var p=this.__data__;return Ol?p[u]!==t:fn.call(p,u)}function d7(u,p){var b=this.__data__;return this.size+=this.has(u)?0:1,b[u]=Ol&&p===t?l:p,this}Ls.prototype.clear=i7,Ls.prototype.delete=l7,Ls.prototype.get=u7,Ls.prototype.has=c7,Ls.prototype.set=d7;function la(u){var p=-1,b=u==null?0:u.length;for(this.clear();++p<b;){var E=u[p];this.set(E[0],E[1])}}function f7(){this.__data__=[],this.size=0}function p7(u){var p=this.__data__,b=kc(p,u);if(b<0)return!1;var E=p.length-1;return b==E?p.pop():gc.call(p,b,1),--this.size,!0}function h7(u){var p=this.__data__,b=kc(p,u);return b<0?t:p[b][1]}function m7(u){return kc(this.__data__,u)>-1}function v7(u,p){var b=this.__data__,E=kc(b,u);return E<0?(++this.size,b.push([u,p])):b[E][1]=p,this}la.prototype.clear=f7,la.prototype.delete=p7,la.prototype.get=h7,la.prototype.has=m7,la.prototype.set=v7;function ua(u){var p=-1,b=u==null?0:u.length;for(this.clear();++p<b;){var E=u[p];this.set(E[0],E[1])}}function g7(){this.size=0,this.__data__={hash:new Ls,map:new(Ml||la),string:new Ls}}function y7(u){var p=Nc(this,u).delete(u);return this.size-=p?1:0,p}function b7(u){return Nc(this,u).get(u)}function S7(u){return Nc(this,u).has(u)}function w7(u,p){var b=Nc(this,u),E=b.size;return b.set(u,p),this.size+=b.size==E?0:1,this}ua.prototype.clear=g7,ua.prototype.delete=y7,ua.prototype.get=b7,ua.prototype.has=S7,ua.prototype.set=w7;function Bs(u){var p=-1,b=u==null?0:u.length;for(this.__data__=new ua;++p<b;)this.add(u[p])}function C7(u){return this.__data__.set(u,l),this}function x7(u){return this.__data__.has(u)}Bs.prototype.add=Bs.prototype.push=C7,Bs.prototype.has=x7;function Oo(u){var p=this.__data__=new la(u);this.size=p.size}function k7(){this.__data__=new la,this.size=0}function E7(u){var p=this.__data__,b=p.delete(u);return this.size=p.size,b}function T7(u){return this.__data__.get(u)}function M7(u){return this.__data__.has(u)}function I7(u,p){var b=this.__data__;if(b instanceof la){var E=b.__data__;if(!Ml||E.length<o-1)return E.push([u,p]),this.size=++b.size,this;b=this.__data__=new ua(E)}return b.set(u,p),this.size=b.size,this}Oo.prototype.clear=k7,Oo.prototype.delete=E7,Oo.prototype.get=T7,Oo.prototype.has=M7,Oo.prototype.set=I7;function h0(u,p){var b=$t(u),E=!b&&Ws(u),_=!b&&!E&&Ga(u),B=!b&&!E&&!_&&Di(u),Z=b||E||_||B,se=Z?th(u.length,Bw):[],he=se.length;for(var Oe in u)(p||fn.call(u,Oe))&&!(Z&&(Oe=="length"||_&&(Oe=="offset"||Oe=="parent")||B&&(Oe=="buffer"||Oe=="byteLength"||Oe=="byteOffset")||pa(Oe,he)))&&se.push(Oe);return se}function m0(u){var p=u.length;return p?u[yh(0,p-1)]:t}function O7(u,p){return Lc(Ar(u),Fs(p,0,u.length))}function _7(u){return Lc(Ar(u))}function lh(u,p,b){(b!==t&&!_o(u[p],b)||b===t&&!(p in u))&&ca(u,p,b)}function Al(u,p,b){var E=u[p];(!(fn.call(u,p)&&_o(E,b))||b===t&&!(p in u))&&ca(u,p,b)}function kc(u,p){for(var b=u.length;b--;)if(_o(u[b][0],p))return b;return-1}function A7(u,p,b,E){return Wa(u,function(_,B,Z){p(E,_,b(_),Z)}),E}function v0(u,p){return u&&Ko(p,Xn(p),u)}function R7(u,p){return u&&Ko(p,Pr(p),u)}function ca(u,p,b){p=="__proto__"&&yc?yc(u,p,{configurable:!0,enumerable:!0,value:b,writable:!0}):u[p]=b}function uh(u,p){for(var b=-1,E=p.length,_=Se(E),B=u==null;++b<E;)_[b]=B?t:Wh(u,p[b]);return _}function Fs(u,p,b){return u===u&&(b!==t&&(u=u<=b?u:b),p!==t&&(u=u>=p?u:p)),u}function co(u,p,b,E,_,B){var Z,se=p&f,he=p&h,Oe=p&m;if(b&&(Z=_?b(u,E,_,B):b(u)),Z!==t)return Z;if(!Tn(u))return u;var Ae=$t(u);if(Ae){if(Z=SC(u),!se)return Ar(u,Z)}else{var $e=fr(u),Je=$e==lt||$e==ze;if(Ga(u))return V0(u,se);if($e==_e||$e==ke||Je&&!_){if(Z=he||Je?{}:ay(u),!se)return he?uC(u,R7(Z,u)):lC(u,v0(Z,u))}else{if(!vn[$e])return _?u:{};Z=wC(u,$e,se)}}B||(B=new Oo);var ft=B.get(u);if(ft)return ft;B.set(u,Z),$y(u)?u.forEach(function(Ct){Z.add(co(Ct,p,b,Ct,u,B))}):Ry(u)&&u.forEach(function(Ct,Gt){Z.set(Gt,co(Ct,p,b,Gt,u,B))});var wt=Oe?he?Oh:Ih:he?Pr:Xn,Vt=Ae?t:wt(u);return io(Vt||u,function(Ct,Gt){Vt&&(Gt=Ct,Ct=u[Gt]),Al(Z,Gt,co(Ct,p,b,Gt,u,B))}),Z}function P7(u){var p=Xn(u);return function(b){return g0(b,u,p)}}function g0(u,p,b){var E=b.length;if(u==null)return!E;for(u=pn(u);E--;){var _=b[E],B=p[_],Z=u[_];if(Z===t&&!(_ in u)||!B(Z))return!1}return!0}function y0(u,p,b){if(typeof u!="function")throw new lo(a);return Bl(function(){u.apply(t,b)},p)}function Rl(u,p,b,E){var _=-1,B=ic,Z=!0,se=u.length,he=[],Oe=p.length;if(!se)return he;b&&(p=wn(p,Wr(b))),E?(B=qp,Z=!1):p.length>=o&&(B=El,Z=!1,p=new Bs(p));e:for(;++_<se;){var Ae=u[_],$e=b==null?Ae:b(Ae);if(Ae=E||Ae!==0?Ae:0,Z&&$e===$e){for(var Je=Oe;Je--;)if(p[Je]===$e)continue e;he.push(Ae)}else B(p,$e,E)||he.push(Ae)}return he}var Wa=j0(jo),b0=j0(dh,!0);function $7(u,p){var b=!0;return Wa(u,function(E,_,B){return b=!!p(E,_,B),b}),b}function Ec(u,p,b){for(var E=-1,_=u.length;++E<_;){var B=u[E],Z=p(B);if(Z!=null&&(se===t?Z===Z&&!jr(Z):b(Z,se)))var se=Z,he=B}return he}function D7(u,p,b,E){var _=u.length;for(b=Ft(b),b<0&&(b=-b>_?0:_+b),E=E===t||E>_?_:Ft(E),E<0&&(E+=_),E=b>E?0:Ny(E);b<E;)u[b++]=p;return u}function S0(u,p){var b=[];return Wa(u,function(E,_,B){p(E,_,B)&&b.push(E)}),b}function ar(u,p,b,E,_){var B=-1,Z=u.length;for(b||(b=xC),_||(_=[]);++B<Z;){var se=u[B];p>0&&b(se)?p>1?ar(se,p-1,b,E,_):Va(_,se):E||(_[_.length]=se)}return _}var ch=K0(),w0=K0(!0);function jo(u,p){return u&&ch(u,p,Xn)}function dh(u,p){return u&&w0(u,p,Xn)}function Tc(u,p){return Fa(p,function(b){return ha(u[b])})}function Vs(u,p){p=ja(p,u);for(var b=0,E=p.length;u!=null&&b<E;)u=u[Go(p[b++])];return b&&b==E?u:t}function C0(u,p,b){var E=p(u);return $t(u)?E:Va(E,b(u))}function xr(u){return u==null?u===t?bt:Ot:Ns&&Ns in pn(u)?gC(u):_C(u)}function fh(u,p){return u>p}function N7(u,p){return u!=null&&fn.call(u,p)}function L7(u,p){return u!=null&&p in pn(u)}function B7(u,p,b){return u>=dr(p,b)&&u<qn(p,b)}function ph(u,p,b){for(var E=b?qp:ic,_=u[0].length,B=u.length,Z=B,se=Se(B),he=1/0,Oe=[];Z--;){var Ae=u[Z];Z&&p&&(Ae=wn(Ae,Wr(p))),he=dr(Ae.length,he),se[Z]=!b&&(p||_>=120&&Ae.length>=120)?new Bs(Z&&Ae):t}Ae=u[0];var $e=-1,Je=se[0];e:for(;++$e<_&&Oe.length<he;){var ft=Ae[$e],wt=p?p(ft):ft;if(ft=b||ft!==0?ft:0,!(Je?El(Je,wt):E(Oe,wt,b))){for(Z=B;--Z;){var Vt=se[Z];if(!(Vt?El(Vt,wt):E(u[Z],wt,b)))continue e}Je&&Je.push(wt),Oe.push(ft)}}return Oe}function F7(u,p,b,E){return jo(u,function(_,B,Z){p(E,b(_),B,Z)}),E}function Pl(u,p,b){p=ja(p,u),u=uy(u,p);var E=u==null?u:u[Go(po(p))];return E==null?t:Hr(E,u,b)}function x0(u){return In(u)&&xr(u)==ke}function V7(u){return In(u)&&xr(u)==Yt}function z7(u){return In(u)&&xr(u)==Me}function $l(u,p,b,E,_){return u===p?!0:u==null||p==null||!In(u)&&!In(p)?u!==u&&p!==p:H7(u,p,b,E,$l,_)}function H7(u,p,b,E,_,B){var Z=$t(u),se=$t(p),he=Z?Be:fr(u),Oe=se?Be:fr(p);he=he==ke?_e:he,Oe=Oe==ke?_e:Oe;var Ae=he==_e,$e=Oe==_e,Je=he==Oe;if(Je&&Ga(u)){if(!Ga(p))return!1;Z=!0,Ae=!1}if(Je&&!Ae)return B||(B=new Oo),Z||Di(u)?ny(u,p,b,E,_,B):mC(u,p,he,b,E,_,B);if(!(b&g)){var ft=Ae&&fn.call(u,"__wrapped__"),wt=$e&&fn.call(p,"__wrapped__");if(ft||wt){var Vt=ft?u.value():u,Ct=wt?p.value():p;return B||(B=new Oo),_(Vt,Ct,b,E,B)}}return Je?(B||(B=new Oo),vC(u,p,b,E,_,B)):!1}function W7(u){return In(u)&&fr(u)==Pe}function hh(u,p,b,E){var _=b.length,B=_,Z=!E;if(u==null)return!B;for(u=pn(u);_--;){var se=b[_];if(Z&&se[2]?se[1]!==u[se[0]]:!(se[0]in u))return!1}for(;++_<B;){se=b[_];var he=se[0],Oe=u[he],Ae=se[1];if(Z&&se[2]){if(Oe===t&&!(he in u))return!1}else{var $e=new Oo;if(E)var Je=E(Oe,Ae,he,u,p,$e);if(!(Je===t?$l(Ae,Oe,g|y,E,$e):Je))return!1}}return!0}function k0(u){if(!Tn(u)||EC(u))return!1;var p=ha(u)?Ww:$s;return p.test(Hs(u))}function U7(u){return In(u)&&xr(u)==Ye}function j7(u){return In(u)&&fr(u)==qe}function K7(u){return In(u)&&Wc(u.length)&&!!bn[xr(u)]}function E0(u){return typeof u=="function"?u:u==null?$r:typeof u=="object"?$t(u)?I0(u[0],u[1]):M0(u):Gy(u)}function mh(u){if(!Ll(u))return qw(u);var p=[];for(var b in pn(u))fn.call(u,b)&&b!="constructor"&&p.push(b);return p}function G7(u){if(!Tn(u))return OC(u);var p=Ll(u),b=[];for(var E in u)E=="constructor"&&(p||!fn.call(u,E))||b.push(E);return b}function vh(u,p){return u<p}function T0(u,p){var b=-1,E=Rr(u)?Se(u.length):[];return Wa(u,function(_,B,Z){E[++b]=p(_,B,Z)}),E}function M0(u){var p=Ah(u);return p.length==1&&p[0][2]?iy(p[0][0],p[0][1]):function(b){return b===u||hh(b,u,p)}}function I0(u,p){return Ph(u)&&sy(p)?iy(Go(u),p):function(b){var E=Wh(b,u);return E===t&&E===p?Uh(b,u):$l(p,E,g|y)}}function Mc(u,p,b,E,_){u!==p&&ch(p,function(B,Z){if(_||(_=new Oo),Tn(B))Y7(u,p,Z,b,Mc,E,_);else{var se=E?E(Dh(u,Z),B,Z+"",u,p,_):t;se===t&&(se=B),lh(u,Z,se)}},Pr)}function Y7(u,p,b,E,_,B,Z){var se=Dh(u,b),he=Dh(p,b),Oe=Z.get(he);if(Oe){lh(u,b,Oe);return}var Ae=B?B(se,he,b+"",u,p,Z):t,$e=Ae===t;if($e){var Je=$t(he),ft=!Je&&Ga(he),wt=!Je&&!ft&&Di(he);Ae=he,Je||ft||wt?$t(se)?Ae=se:Fn(se)?Ae=Ar(se):ft?($e=!1,Ae=V0(he,!0)):wt?($e=!1,Ae=z0(he,!0)):Ae=[]:Fl(he)||Ws(he)?(Ae=se,Ws(se)?Ae=Ly(se):(!Tn(se)||ha(se))&&(Ae=ay(he))):$e=!1}$e&&(Z.set(he,Ae),_(Ae,he,E,B,Z),Z.delete(he)),lh(u,b,Ae)}function O0(u,p){var b=u.length;if(b)return p+=p<0?b:0,pa(p,b)?u[p]:t}function _0(u,p,b){p.length?p=wn(p,function(B){return $t(B)?function(Z){return Vs(Z,B.length===1?B[0]:B)}:B}):p=[$r];var E=-1;p=wn(p,Wr(St()));var _=T0(u,function(B,Z,se){var he=wn(p,function(Oe){return Oe(B)});return{criteria:he,index:++E,value:B}});return ww(_,function(B,Z){return iC(B,Z,b)})}function q7(u,p){return A0(u,p,function(b,E){return Uh(u,E)})}function A0(u,p,b){for(var E=-1,_=p.length,B={};++E<_;){var Z=p[E],se=Vs(u,Z);b(se,Z)&&Dl(B,ja(Z,u),se)}return B}function J7(u){return function(p){return Vs(p,u)}}function gh(u,p,b,E){var _=E?Sw:ki,B=-1,Z=p.length,se=u;for(u===p&&(p=Ar(p)),b&&(se=wn(u,Wr(b)));++B<Z;)for(var he=0,Oe=p[B],Ae=b?b(Oe):Oe;(he=_(se,Ae,he,E))>-1;)se!==u&&gc.call(se,he,1),gc.call(u,he,1);return u}function R0(u,p){for(var b=u?p.length:0,E=b-1;b--;){var _=p[b];if(b==E||_!==B){var B=_;pa(_)?gc.call(u,_,1):wh(u,_)}}return u}function yh(u,p){return u+Sc(f0()*(p-u+1))}function X7(u,p,b,E){for(var _=-1,B=qn(bc((p-u)/(b||1)),0),Z=Se(B);B--;)Z[E?B:++_]=u,u+=b;return Z}function bh(u,p){var b="";if(!u||p<1||p>te)return b;do p%2&&(b+=u),p=Sc(p/2),p&&(u+=u);while(p);return b}function Wt(u,p){return Nh(ly(u,p,$r),u+"")}function Z7(u){return m0(Ni(u))}function Q7(u,p){var b=Ni(u);return Lc(b,Fs(p,0,b.length))}function Dl(u,p,b,E){if(!Tn(u))return u;p=ja(p,u);for(var _=-1,B=p.length,Z=B-1,se=u;se!=null&&++_<B;){var he=Go(p[_]),Oe=b;if(he==="__proto__"||he==="constructor"||he==="prototype")return u;if(_!=Z){var Ae=se[he];Oe=E?E(Ae,he,se):t,Oe===t&&(Oe=Tn(Ae)?Ae:pa(p[_+1])?[]:{})}Al(se,he,Oe),se=se[he]}return u}var P0=wc?function(u,p){return wc.set(u,p),u}:$r,eC=yc?function(u,p){return yc(u,"toString",{configurable:!0,enumerable:!1,value:Kh(p),writable:!0})}:$r;function tC(u){return Lc(Ni(u))}function fo(u,p,b){var E=-1,_=u.length;p<0&&(p=-p>_?0:_+p),b=b>_?_:b,b<0&&(b+=_),_=p>b?0:b-p>>>0,p>>>=0;for(var B=Se(_);++E<_;)B[E]=u[E+p];return B}function nC(u,p){var b;return Wa(u,function(E,_,B){return b=p(E,_,B),!b}),!!b}function Ic(u,p,b){var E=0,_=u==null?E:u.length;if(typeof p=="number"&&p===p&&_<=ae){for(;E<_;){var B=E+_>>>1,Z=u[B];Z!==null&&!jr(Z)&&(b?Z<=p:Z<p)?E=B+1:_=B}return _}return Sh(u,p,$r,b)}function Sh(u,p,b,E){var _=0,B=u==null?0:u.length;if(B===0)return 0;p=b(p);for(var Z=p!==p,se=p===null,he=jr(p),Oe=p===t;_<B;){var Ae=Sc((_+B)/2),$e=b(u[Ae]),Je=$e!==t,ft=$e===null,wt=$e===$e,Vt=jr($e);if(Z)var Ct=E||wt;else Oe?Ct=wt&&(E||Je):se?Ct=wt&&Je&&(E||!ft):he?Ct=wt&&Je&&!ft&&(E||!Vt):ft||Vt?Ct=!1:Ct=E?$e<=p:$e<p;Ct?_=Ae+1:B=Ae}return dr(B,ce)}function $0(u,p){for(var b=-1,E=u.length,_=0,B=[];++b<E;){var Z=u[b],se=p?p(Z):Z;if(!b||!_o(se,he)){var he=se;B[_++]=Z===0?0:Z}}return B}function D0(u){return typeof u=="number"?u:jr(u)?ee:+u}function Ur(u){if(typeof u=="string")return u;if($t(u))return wn(u,Ur)+"";if(jr(u))return p0?p0.call(u):"";var p=u+"";return p=="0"&&1/u==-1/0?"-0":p}function Ua(u,p,b){var E=-1,_=ic,B=u.length,Z=!0,se=[],he=se;if(b)Z=!1,_=qp;else if(B>=o){var Oe=p?null:pC(u);if(Oe)return uc(Oe);Z=!1,_=El,he=new Bs}else he=p?[]:se;e:for(;++E<B;){var Ae=u[E],$e=p?p(Ae):Ae;if(Ae=b||Ae!==0?Ae:0,Z&&$e===$e){for(var Je=he.length;Je--;)if(he[Je]===$e)continue e;p&&he.push($e),se.push(Ae)}else _(he,$e,b)||(he!==se&&he.push($e),se.push(Ae))}return se}function wh(u,p){return p=ja(p,u),u=uy(u,p),u==null||delete u[Go(po(p))]}function N0(u,p,b,E){return Dl(u,p,b(Vs(u,p)),E)}function Oc(u,p,b,E){for(var _=u.length,B=E?_:-1;(E?B--:++B<_)&&p(u[B],B,u););return b?fo(u,E?0:B,E?B+1:_):fo(u,E?B+1:0,E?_:B)}function L0(u,p){var b=u;return b instanceof qt&&(b=b.value()),Jp(p,function(E,_){return _.func.apply(_.thisArg,Va([E],_.args))},b)}function Ch(u,p,b){var E=u.length;if(E<2)return E?Ua(u[0]):[];for(var _=-1,B=Se(E);++_<E;)for(var Z=u[_],se=-1;++se<E;)se!=_&&(B[_]=Rl(B[_]||Z,u[se],p,b));return Ua(ar(B,1),p,b)}function B0(u,p,b){for(var E=-1,_=u.length,B=p.length,Z={};++E<_;){var se=E<B?p[E]:t;b(Z,u[E],se)}return Z}function xh(u){return Fn(u)?u:[]}function kh(u){return typeof u=="function"?u:$r}function ja(u,p){return $t(u)?u:Ph(u,p)?[u]:py(cn(u))}var rC=Wt;function Ka(u,p,b){var E=u.length;return b=b===t?E:b,!p&&b>=E?u:fo(u,p,b)}var F0=Uw||function(u){return or.clearTimeout(u)};function V0(u,p){if(p)return u.slice();var b=u.length,E=i0?i0(b):new u.constructor(b);return u.copy(E),E}function Eh(u){var p=new u.constructor(u.byteLength);return new mc(p).set(new mc(u)),p}function oC(u,p){var b=p?Eh(u.buffer):u.buffer;return new u.constructor(b,u.byteOffset,u.byteLength)}function aC(u){var p=new u.constructor(u.source,ia.exec(u));return p.lastIndex=u.lastIndex,p}function sC(u){return _l?pn(_l.call(u)):{}}function z0(u,p){var b=p?Eh(u.buffer):u.buffer;return new u.constructor(b,u.byteOffset,u.length)}function H0(u,p){if(u!==p){var b=u!==t,E=u===null,_=u===u,B=jr(u),Z=p!==t,se=p===null,he=p===p,Oe=jr(p);if(!se&&!Oe&&!B&&u>p||B&&Z&&he&&!se&&!Oe||E&&Z&&he||!b&&he||!_)return 1;if(!E&&!B&&!Oe&&u<p||Oe&&b&&_&&!E&&!B||se&&b&&_||!Z&&_||!he)return-1}return 0}function iC(u,p,b){for(var E=-1,_=u.criteria,B=p.criteria,Z=_.length,se=b.length;++E<Z;){var he=H0(_[E],B[E]);if(he){if(E>=se)return he;var Oe=b[E];return he*(Oe=="desc"?-1:1)}}return u.index-p.index}function W0(u,p,b,E){for(var _=-1,B=u.length,Z=b.length,se=-1,he=p.length,Oe=qn(B-Z,0),Ae=Se(he+Oe),$e=!E;++se<he;)Ae[se]=p[se];for(;++_<Z;)($e||_<B)&&(Ae[b[_]]=u[_]);for(;Oe--;)Ae[se++]=u[_++];return Ae}function U0(u,p,b,E){for(var _=-1,B=u.length,Z=-1,se=b.length,he=-1,Oe=p.length,Ae=qn(B-se,0),$e=Se(Ae+Oe),Je=!E;++_<Ae;)$e[_]=u[_];for(var ft=_;++he<Oe;)$e[ft+he]=p[he];for(;++Z<se;)(Je||_<B)&&($e[ft+b[Z]]=u[_++]);return $e}function Ar(u,p){var b=-1,E=u.length;for(p||(p=Se(E));++b<E;)p[b]=u[b];return p}function Ko(u,p,b,E){var _=!b;b||(b={});for(var B=-1,Z=p.length;++B<Z;){var se=p[B],he=E?E(b[se],u[se],se,b,u):t;he===t&&(he=u[se]),_?ca(b,se,he):Al(b,se,he)}return b}function lC(u,p){return Ko(u,Rh(u),p)}function uC(u,p){return Ko(u,ry(u),p)}function _c(u,p){return function(b,E){var _=$t(b)?hw:A7,B=p?p():{};return _(b,u,St(E,2),B)}}function Ri(u){return Wt(function(p,b){var E=-1,_=b.length,B=_>1?b[_-1]:t,Z=_>2?b[2]:t;for(B=u.length>3&&typeof B=="function"?(_--,B):t,Z&&kr(b[0],b[1],Z)&&(B=_<3?t:B,_=1),p=pn(p);++E<_;){var se=b[E];se&&u(p,se,E,B)}return p})}function j0(u,p){return function(b,E){if(b==null)return b;if(!Rr(b))return u(b,E);for(var _=b.length,B=p?_:-1,Z=pn(b);(p?B--:++B<_)&&E(Z[B],B,Z)!==!1;);return b}}function K0(u){return function(p,b,E){for(var _=-1,B=pn(p),Z=E(p),se=Z.length;se--;){var he=Z[u?se:++_];if(b(B[he],he,B)===!1)break}return p}}function cC(u,p,b){var E=p&S,_=Nl(u);function B(){var Z=this&&this!==or&&this instanceof B?_:u;return Z.apply(E?b:this,arguments)}return B}function G0(u){return function(p){p=cn(p);var b=Ei(p)?Io(p):t,E=b?b[0]:p.charAt(0),_=b?Ka(b,1).join(""):p.slice(1);return E[u]()+_}}function Pi(u){return function(p){return Jp(jy(Uy(p).replace(ew,"")),u,"")}}function Nl(u){return function(){var p=arguments;switch(p.length){case 0:return new u;case 1:return new u(p[0]);case 2:return new u(p[0],p[1]);case 3:return new u(p[0],p[1],p[2]);case 4:return new u(p[0],p[1],p[2],p[3]);case 5:return new u(p[0],p[1],p[2],p[3],p[4]);case 6:return new u(p[0],p[1],p[2],p[3],p[4],p[5]);case 7:return new u(p[0],p[1],p[2],p[3],p[4],p[5],p[6])}var b=Ai(u.prototype),E=u.apply(b,p);return Tn(E)?E:b}}function dC(u,p,b){var E=Nl(u);function _(){for(var B=arguments.length,Z=Se(B),se=B,he=$i(_);se--;)Z[se]=arguments[se];var Oe=B<3&&Z[0]!==he&&Z[B-1]!==he?[]:za(Z,he);if(B-=Oe.length,B<b)return Z0(u,p,Ac,_.placeholder,t,Z,Oe,t,t,b-B);var Ae=this&&this!==or&&this instanceof _?E:u;return Hr(Ae,this,Z)}return _}function Y0(u){return function(p,b,E){var _=pn(p);if(!Rr(p)){var B=St(b,3);p=Xn(p),b=function(se){return B(_[se],se,_)}}var Z=u(p,b,E);return Z>-1?_[B?p[Z]:Z]:t}}function q0(u){return fa(function(p){var b=p.length,E=b,_=uo.prototype.thru;for(u&&p.reverse();E--;){var B=p[E];if(typeof B!="function")throw new lo(a);if(_&&!Z&&Dc(B)=="wrapper")var Z=new uo([],!0)}for(E=Z?E:b;++E<b;){B=p[E];var se=Dc(B),he=se=="wrapper"?_h(B):t;he&&$h(he[0])&&he[1]==(A|T|C|V)&&!he[4].length&&he[9]==1?Z=Z[Dc(he[0])].apply(Z,he[3]):Z=B.length==1&&$h(B)?Z[se]():Z.thru(B)}return function(){var Oe=arguments,Ae=Oe[0];if(Z&&Oe.length==1&&$t(Ae))return Z.plant(Ae).value();for(var $e=0,Je=b?p[$e].apply(this,Oe):Ae;++$e<b;)Je=p[$e].call(this,Je);return Je}})}function Ac(u,p,b,E,_,B,Z,se,he,Oe){var Ae=p&A,$e=p&S,Je=p&w,ft=p&(T|k),wt=p&P,Vt=Je?t:Nl(u);function Ct(){for(var Gt=arguments.length,Zt=Se(Gt),Kr=Gt;Kr--;)Zt[Kr]=arguments[Kr];if(ft)var Er=$i(Ct),Gr=xw(Zt,Er);if(E&&(Zt=W0(Zt,E,_,ft)),B&&(Zt=U0(Zt,B,Z,ft)),Gt-=Gr,ft&&Gt<Oe){var Vn=za(Zt,Er);return Z0(u,p,Ac,Ct.placeholder,b,Zt,Vn,se,he,Oe-Gt)}var Ao=$e?b:this,va=Je?Ao[u]:u;return Gt=Zt.length,se?Zt=AC(Zt,se):wt&&Gt>1&&Zt.reverse(),Ae&&he<Gt&&(Zt.length=he),this&&this!==or&&this instanceof Ct&&(va=Vt||Nl(va)),va.apply(Ao,Zt)}return Ct}function J0(u,p){return function(b,E){return F7(b,u,p(E),{})}}function Rc(u,p){return function(b,E){var _;if(b===t&&E===t)return p;if(b!==t&&(_=b),E!==t){if(_===t)return E;typeof b=="string"||typeof E=="string"?(b=Ur(b),E=Ur(E)):(b=D0(b),E=D0(E)),_=u(b,E)}return _}}function Th(u){return fa(function(p){return p=wn(p,Wr(St())),Wt(function(b){var E=this;return u(p,function(_){return Hr(_,E,b)})})})}function Pc(u,p){p=p===t?" ":Ur(p);var b=p.length;if(b<2)return b?bh(p,u):p;var E=bh(p,bc(u/Ti(p)));return Ei(p)?Ka(Io(E),0,u).join(""):E.slice(0,u)}function fC(u,p,b,E){var _=p&S,B=Nl(u);function Z(){for(var se=-1,he=arguments.length,Oe=-1,Ae=E.length,$e=Se(Ae+he),Je=this&&this!==or&&this instanceof Z?B:u;++Oe<Ae;)$e[Oe]=E[Oe];for(;he--;)$e[Oe++]=arguments[++se];return Hr(Je,_?b:this,$e)}return Z}function X0(u){return function(p,b,E){return E&&typeof E!="number"&&kr(p,b,E)&&(b=E=t),p=ma(p),b===t?(b=p,p=0):b=ma(b),E=E===t?p<b?1:-1:ma(E),X7(p,b,E,u)}}function $c(u){return function(p,b){return typeof p=="string"&&typeof b=="string"||(p=ho(p),b=ho(b)),u(p,b)}}function Z0(u,p,b,E,_,B,Z,se,he,Oe){var Ae=p&T,$e=Ae?Z:t,Je=Ae?t:Z,ft=Ae?B:t,wt=Ae?t:B;p|=Ae?C:M,p&=~(Ae?M:C),p&x||(p&=-4);var Vt=[u,p,_,ft,$e,wt,Je,se,he,Oe],Ct=b.apply(t,Vt);return $h(u)&&cy(Ct,Vt),Ct.placeholder=E,dy(Ct,u,p)}function Mh(u){var p=Yn[u];return function(b,E){if(b=ho(b),E=E==null?0:dr(Ft(E),292),E&&d0(b)){var _=(cn(b)+"e").split("e"),B=p(_[0]+"e"+(+_[1]+E));return _=(cn(B)+"e").split("e"),+(_[0]+"e"+(+_[1]-E))}return p(b)}}var pC=Oi&&1/uc(new Oi([,-0]))[1]==U?function(u){return new Oi(u)}:qh;function Q0(u){return function(p){var b=fr(p);return b==Pe?rh(p):b==qe?_w(p):Cw(p,u(p))}}function da(u,p,b,E,_,B,Z,se){var he=p&w;if(!he&&typeof u!="function")throw new lo(a);var Oe=E?E.length:0;if(Oe||(p&=-97,E=_=t),Z=Z===t?Z:qn(Ft(Z),0),se=se===t?se:Ft(se),Oe-=_?_.length:0,p&M){var Ae=E,$e=_;E=_=t}var Je=he?t:_h(u),ft=[u,p,b,E,_,Ae,$e,B,Z,se];if(Je&&IC(ft,Je),u=ft[0],p=ft[1],b=ft[2],E=ft[3],_=ft[4],se=ft[9]=ft[9]===t?he?0:u.length:qn(ft[9]-Oe,0),!se&&p&(T|k)&&(p&=-25),!p||p==S)var wt=cC(u,p,b);else p==T||p==k?wt=dC(u,p,se):(p==C||p==(S|C))&&!_.length?wt=fC(u,p,b,E):wt=Ac.apply(t,ft);var Vt=Je?P0:cy;return dy(Vt(wt,ft),u,p)}function ey(u,p,b,E){return u===t||_o(u,Ii[b])&&!fn.call(E,b)?p:u}function ty(u,p,b,E,_,B){return Tn(u)&&Tn(p)&&(B.set(p,u),Mc(u,p,t,ty,B),B.delete(p)),u}function hC(u){return Fl(u)?t:u}function ny(u,p,b,E,_,B){var Z=b&g,se=u.length,he=p.length;if(se!=he&&!(Z&&he>se))return!1;var Oe=B.get(u),Ae=B.get(p);if(Oe&&Ae)return Oe==p&&Ae==u;var $e=-1,Je=!0,ft=b&y?new Bs:t;for(B.set(u,p),B.set(p,u);++$e<se;){var wt=u[$e],Vt=p[$e];if(E)var Ct=Z?E(Vt,wt,$e,p,u,B):E(wt,Vt,$e,u,p,B);if(Ct!==t){if(Ct)continue;Je=!1;break}if(ft){if(!Xp(p,function(Gt,Zt){if(!El(ft,Zt)&&(wt===Gt||_(wt,Gt,b,E,B)))return ft.push(Zt)})){Je=!1;break}}else if(!(wt===Vt||_(wt,Vt,b,E,B))){Je=!1;break}}return B.delete(u),B.delete(p),Je}function mC(u,p,b,E,_,B,Z){switch(b){case Pt:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case Yt:return!(u.byteLength!=p.byteLength||!B(new mc(u),new mc(p)));case xe:case Me:case nt:return _o(+u,+p);case Ze:return u.name==p.name&&u.message==p.message;case Ye:case dt:return u==p+"";case Pe:var se=rh;case qe:var he=E&g;if(se||(se=uc),u.size!=p.size&&!he)return!1;var Oe=Z.get(u);if(Oe)return Oe==p;E|=y,Z.set(u,p);var Ae=ny(se(u),se(p),E,_,B,Z);return Z.delete(u),Ae;case vt:if(_l)return _l.call(u)==_l.call(p)}return!1}function vC(u,p,b,E,_,B){var Z=b&g,se=Ih(u),he=se.length,Oe=Ih(p),Ae=Oe.length;if(he!=Ae&&!Z)return!1;for(var $e=he;$e--;){var Je=se[$e];if(!(Z?Je in p:fn.call(p,Je)))return!1}var ft=B.get(u),wt=B.get(p);if(ft&&wt)return ft==p&&wt==u;var Vt=!0;B.set(u,p),B.set(p,u);for(var Ct=Z;++$e<he;){Je=se[$e];var Gt=u[Je],Zt=p[Je];if(E)var Kr=Z?E(Zt,Gt,Je,p,u,B):E(Gt,Zt,Je,u,p,B);if(!(Kr===t?Gt===Zt||_(Gt,Zt,b,E,B):Kr)){Vt=!1;break}Ct||(Ct=Je=="constructor")}if(Vt&&!Ct){var Er=u.constructor,Gr=p.constructor;Er!=Gr&&"constructor"in u&&"constructor"in p&&!(typeof Er=="function"&&Er instanceof Er&&typeof Gr=="function"&&Gr instanceof Gr)&&(Vt=!1)}return B.delete(u),B.delete(p),Vt}function fa(u){return Nh(ly(u,t,gy),u+"")}function Ih(u){return C0(u,Xn,Rh)}function Oh(u){return C0(u,Pr,ry)}var _h=wc?function(u){return wc.get(u)}:qh;function Dc(u){for(var p=u.name+"",b=_i[p],E=fn.call(_i,p)?b.length:0;E--;){var _=b[E],B=_.func;if(B==null||B==u)return _.name}return p}function $i(u){var p=fn.call($,"placeholder")?$:u;return p.placeholder}function St(){var u=$.iteratee||Gh;return u=u===Gh?E0:u,arguments.length?u(arguments[0],arguments[1]):u}function Nc(u,p){var b=u.__data__;return kC(p)?b[typeof p=="string"?"string":"hash"]:b.map}function Ah(u){for(var p=Xn(u),b=p.length;b--;){var E=p[b],_=u[E];p[b]=[E,_,sy(_)]}return p}function zs(u,p){var b=Mw(u,p);return k0(b)?b:t}function gC(u){var p=fn.call(u,Ns),b=u[Ns];try{u[Ns]=t;var E=!0}catch{}var _=pc.call(u);return E&&(p?u[Ns]=b:delete u[Ns]),_}var Rh=ah?function(u){return u==null?[]:(u=pn(u),Fa(ah(u),function(p){return u0.call(u,p)}))}:Jh,ry=ah?function(u){for(var p=[];u;)Va(p,Rh(u)),u=vc(u);return p}:Jh,fr=xr;(sh&&fr(new sh(new ArrayBuffer(1)))!=Pt||Ml&&fr(new Ml)!=Pe||ih&&fr(ih.resolve())!=He||Oi&&fr(new Oi)!=qe||Il&&fr(new Il)!=kt)&&(fr=function(u){var p=xr(u),b=p==_e?u.constructor:t,E=b?Hs(b):"";if(E)switch(E){case Qw:return Pt;case e7:return Pe;case t7:return He;case n7:return qe;case r7:return kt}return p});function yC(u,p,b){for(var E=-1,_=b.length;++E<_;){var B=b[E],Z=B.size;switch(B.type){case"drop":u+=Z;break;case"dropRight":p-=Z;break;case"take":p=dr(p,u+Z);break;case"takeRight":u=qn(u,p-Z);break}}return{start:u,end:p}}function bC(u){var p=u.match(Vp);return p?p[1].split(Ce):[]}function oy(u,p,b){p=ja(p,u);for(var E=-1,_=p.length,B=!1;++E<_;){var Z=Go(p[E]);if(!(B=u!=null&&b(u,Z)))break;u=u[Z]}return B||++E!=_?B:(_=u==null?0:u.length,!!_&&Wc(_)&&pa(Z,_)&&($t(u)||Ws(u)))}function SC(u){var p=u.length,b=new u.constructor(p);return p&&typeof u[0]=="string"&&fn.call(u,"index")&&(b.index=u.index,b.input=u.input),b}function ay(u){return typeof u.constructor=="function"&&!Ll(u)?Ai(vc(u)):{}}function wC(u,p,b){var E=u.constructor;switch(p){case Yt:return Eh(u);case xe:case Me:return new E(+u);case Pt:return oC(u,b);case pe:case F:case re:case ge:case oe:case ie:case be:case Y:case Ie:return z0(u,b);case Pe:return new E;case nt:case dt:return new E(u);case Ye:return aC(u);case qe:return new E;case vt:return sC(u)}}function CC(u,p){var b=p.length;if(!b)return u;var E=b-1;return p[E]=(b>1?"& ":"")+p[E],p=p.join(b>2?", ":" "),u.replace(Fp,`{ |
| 32 |
/* [wrapped with `+p+`] */ |
| 33 |
`)}function xC(u){return $t(u)||Ws(u)||!!(c0&&u&&u[c0])}function pa(u,p){var b=typeof u;return p=p??te,!!p&&(b=="number"||b!="symbol"&&D8.test(u))&&u>-1&&u%1==0&&u<p}function kr(u,p,b){if(!Tn(b))return!1;var E=typeof p;return(E=="number"?Rr(b)&&pa(p,b.length):E=="string"&&p in b)?_o(b[p],u):!1}function Ph(u,p){if($t(u))return!1;var b=typeof u;return b=="number"||b=="symbol"||b=="boolean"||u==null||jr(u)?!0:Si.test(u)||!Dp.test(u)||p!=null&&u in pn(p)}function kC(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function $h(u){var p=Dc(u),b=$[p];if(typeof b!="function"||!(p in qt.prototype))return!1;if(u===b)return!0;var E=_h(b);return!!E&&u===E[0]}function EC(u){return!!s0&&s0 in u}var TC=dc?ha:Xh;function Ll(u){var p=u&&u.constructor,b=typeof p=="function"&&p.prototype||Ii;return u===b}function sy(u){return u===u&&!Tn(u)}function iy(u,p){return function(b){return b==null?!1:b[u]===p&&(p!==t||u in pn(b))}}function MC(u){var p=zc(u,function(E){return b.size===c&&b.clear(),E}),b=p.cache;return p}function IC(u,p){var b=u[1],E=p[1],_=b|E,B=_<(S|w|A),Z=E==A&&b==T||E==A&&b==V&&u[7].length<=p[8]||E==(A|V)&&p[7].length<=p[8]&&b==T;if(!(B||Z))return u;E&S&&(u[2]=p[2],_|=b&S?0:x);var se=p[3];if(se){var he=u[3];u[3]=he?W0(he,se,p[4]):se,u[4]=he?za(u[3],d):p[4]}return se=p[5],se&&(he=u[5],u[5]=he?U0(he,se,p[6]):se,u[6]=he?za(u[5],d):p[6]),se=p[7],se&&(u[7]=se),E&A&&(u[8]=u[8]==null?p[8]:dr(u[8],p[8])),u[9]==null&&(u[9]=p[9]),u[0]=p[0],u[1]=_,u}function OC(u){var p=[];if(u!=null)for(var b in pn(u))p.push(b);return p}function _C(u){return pc.call(u)}function ly(u,p,b){return p=qn(p===t?u.length-1:p,0),function(){for(var E=arguments,_=-1,B=qn(E.length-p,0),Z=Se(B);++_<B;)Z[_]=E[p+_];_=-1;for(var se=Se(p+1);++_<p;)se[_]=E[_];return se[p]=b(Z),Hr(u,this,se)}}function uy(u,p){return p.length<2?u:Vs(u,fo(p,0,-1))}function AC(u,p){for(var b=u.length,E=dr(p.length,b),_=Ar(u);E--;){var B=p[E];u[E]=pa(B,b)?_[B]:t}return u}function Dh(u,p){if(!(p==="constructor"&&typeof u[p]=="function")&&p!="__proto__")return u[p]}var cy=fy(P0),Bl=Kw||function(u,p){return or.setTimeout(u,p)},Nh=fy(eC);function dy(u,p,b){var E=p+"";return Nh(u,CC(E,RC(bC(E),b)))}function fy(u){var p=0,b=0;return function(){var E=Jw(),_=G-(E-b);if(b=E,_>0){if(++p>=J)return arguments[0]}else p=0;return u.apply(t,arguments)}}function Lc(u,p){var b=-1,E=u.length,_=E-1;for(p=p===t?E:p;++b<p;){var B=yh(b,_),Z=u[B];u[B]=u[b],u[b]=Z}return u.length=p,u}var py=MC(function(u){var p=[];return u.charCodeAt(0)===46&&p.push(""),u.replace(Np,function(b,E,_,B){p.push(_?B.replace(Bn,"$1"):E||b)}),p});function Go(u){if(typeof u=="string"||jr(u))return u;var p=u+"";return p=="0"&&1/u==-1/0?"-0":p}function Hs(u){if(u!=null){try{return fc.call(u)}catch{}try{return u+""}catch{}}return""}function RC(u,p){return io(ye,function(b){var E="_."+b[0];p&b[1]&&!ic(u,E)&&u.push(E)}),u.sort()}function hy(u){if(u instanceof qt)return u.clone();var p=new uo(u.__wrapped__,u.__chain__);return p.__actions__=Ar(u.__actions__),p.__index__=u.__index__,p.__values__=u.__values__,p}function PC(u,p,b){(b?kr(u,p,b):p===t)?p=1:p=qn(Ft(p),0);var E=u==null?0:u.length;if(!E||p<1)return[];for(var _=0,B=0,Z=Se(bc(E/p));_<E;)Z[B++]=fo(u,_,_+=p);return Z}function $C(u){for(var p=-1,b=u==null?0:u.length,E=0,_=[];++p<b;){var B=u[p];B&&(_[E++]=B)}return _}function DC(){var u=arguments.length;if(!u)return[];for(var p=Se(u-1),b=arguments[0],E=u;E--;)p[E-1]=arguments[E];return Va($t(b)?Ar(b):[b],ar(p,1))}var NC=Wt(function(u,p){return Fn(u)?Rl(u,ar(p,1,Fn,!0)):[]}),LC=Wt(function(u,p){var b=po(p);return Fn(b)&&(b=t),Fn(u)?Rl(u,ar(p,1,Fn,!0),St(b,2)):[]}),BC=Wt(function(u,p){var b=po(p);return Fn(b)&&(b=t),Fn(u)?Rl(u,ar(p,1,Fn,!0),t,b):[]});function FC(u,p,b){var E=u==null?0:u.length;return E?(p=b||p===t?1:Ft(p),fo(u,p<0?0:p,E)):[]}function VC(u,p,b){var E=u==null?0:u.length;return E?(p=b||p===t?1:Ft(p),p=E-p,fo(u,0,p<0?0:p)):[]}function zC(u,p){return u&&u.length?Oc(u,St(p,3),!0,!0):[]}function HC(u,p){return u&&u.length?Oc(u,St(p,3),!0):[]}function WC(u,p,b,E){var _=u==null?0:u.length;return _?(b&&typeof b!="number"&&kr(u,p,b)&&(b=0,E=_),D7(u,p,b,E)):[]}function my(u,p,b){var E=u==null?0:u.length;if(!E)return-1;var _=b==null?0:Ft(b);return _<0&&(_=qn(E+_,0)),lc(u,St(p,3),_)}function vy(u,p,b){var E=u==null?0:u.length;if(!E)return-1;var _=E-1;return b!==t&&(_=Ft(b),_=b<0?qn(E+_,0):dr(_,E-1)),lc(u,St(p,3),_,!0)}function gy(u){var p=u==null?0:u.length;return p?ar(u,1):[]}function UC(u){var p=u==null?0:u.length;return p?ar(u,U):[]}function jC(u,p){var b=u==null?0:u.length;return b?(p=p===t?1:Ft(p),ar(u,p)):[]}function KC(u){for(var p=-1,b=u==null?0:u.length,E={};++p<b;){var _=u[p];E[_[0]]=_[1]}return E}function yy(u){return u&&u.length?u[0]:t}function GC(u,p,b){var E=u==null?0:u.length;if(!E)return-1;var _=b==null?0:Ft(b);return _<0&&(_=qn(E+_,0)),ki(u,p,_)}function YC(u){var p=u==null?0:u.length;return p?fo(u,0,-1):[]}var qC=Wt(function(u){var p=wn(u,xh);return p.length&&p[0]===u[0]?ph(p):[]}),JC=Wt(function(u){var p=po(u),b=wn(u,xh);return p===po(b)?p=t:b.pop(),b.length&&b[0]===u[0]?ph(b,St(p,2)):[]}),XC=Wt(function(u){var p=po(u),b=wn(u,xh);return p=typeof p=="function"?p:t,p&&b.pop(),b.length&&b[0]===u[0]?ph(b,t,p):[]});function ZC(u,p){return u==null?"":Yw.call(u,p)}function po(u){var p=u==null?0:u.length;return p?u[p-1]:t}function QC(u,p,b){var E=u==null?0:u.length;if(!E)return-1;var _=E;return b!==t&&(_=Ft(b),_=_<0?qn(E+_,0):dr(_,E-1)),p===p?Rw(u,p,_):lc(u,Zg,_,!0)}function ex(u,p){return u&&u.length?O0(u,Ft(p)):t}var tx=Wt(by);function by(u,p){return u&&u.length&&p&&p.length?gh(u,p):u}function nx(u,p,b){return u&&u.length&&p&&p.length?gh(u,p,St(b,2)):u}function rx(u,p,b){return u&&u.length&&p&&p.length?gh(u,p,t,b):u}var ox=fa(function(u,p){var b=u==null?0:u.length,E=uh(u,p);return R0(u,wn(p,function(_){return pa(_,b)?+_:_}).sort(H0)),E});function ax(u,p){var b=[];if(!(u&&u.length))return b;var E=-1,_=[],B=u.length;for(p=St(p,3);++E<B;){var Z=u[E];p(Z,E,u)&&(b.push(Z),_.push(E))}return R0(u,_),b}function Lh(u){return u==null?u:Zw.call(u)}function sx(u,p,b){var E=u==null?0:u.length;return E?(b&&typeof b!="number"&&kr(u,p,b)?(p=0,b=E):(p=p==null?0:Ft(p),b=b===t?E:Ft(b)),fo(u,p,b)):[]}function ix(u,p){return Ic(u,p)}function lx(u,p,b){return Sh(u,p,St(b,2))}function ux(u,p){var b=u==null?0:u.length;if(b){var E=Ic(u,p);if(E<b&&_o(u[E],p))return E}return-1}function cx(u,p){return Ic(u,p,!0)}function dx(u,p,b){return Sh(u,p,St(b,2),!0)}function fx(u,p){var b=u==null?0:u.length;if(b){var E=Ic(u,p,!0)-1;if(_o(u[E],p))return E}return-1}function px(u){return u&&u.length?$0(u):[]}function hx(u,p){return u&&u.length?$0(u,St(p,2)):[]}function mx(u){var p=u==null?0:u.length;return p?fo(u,1,p):[]}function vx(u,p,b){return u&&u.length?(p=b||p===t?1:Ft(p),fo(u,0,p<0?0:p)):[]}function gx(u,p,b){var E=u==null?0:u.length;return E?(p=b||p===t?1:Ft(p),p=E-p,fo(u,p<0?0:p,E)):[]}function yx(u,p){return u&&u.length?Oc(u,St(p,3),!1,!0):[]}function bx(u,p){return u&&u.length?Oc(u,St(p,3)):[]}var Sx=Wt(function(u){return Ua(ar(u,1,Fn,!0))}),wx=Wt(function(u){var p=po(u);return Fn(p)&&(p=t),Ua(ar(u,1,Fn,!0),St(p,2))}),Cx=Wt(function(u){var p=po(u);return p=typeof p=="function"?p:t,Ua(ar(u,1,Fn,!0),t,p)});function xx(u){return u&&u.length?Ua(u):[]}function kx(u,p){return u&&u.length?Ua(u,St(p,2)):[]}function Ex(u,p){return p=typeof p=="function"?p:t,u&&u.length?Ua(u,t,p):[]}function Bh(u){if(!(u&&u.length))return[];var p=0;return u=Fa(u,function(b){if(Fn(b))return p=qn(b.length,p),!0}),th(p,function(b){return wn(u,Zp(b))})}function Sy(u,p){if(!(u&&u.length))return[];var b=Bh(u);return p==null?b:wn(b,function(E){return Hr(p,t,E)})}var Tx=Wt(function(u,p){return Fn(u)?Rl(u,p):[]}),Mx=Wt(function(u){return Ch(Fa(u,Fn))}),Ix=Wt(function(u){var p=po(u);return Fn(p)&&(p=t),Ch(Fa(u,Fn),St(p,2))}),Ox=Wt(function(u){var p=po(u);return p=typeof p=="function"?p:t,Ch(Fa(u,Fn),t,p)}),_x=Wt(Bh);function Ax(u,p){return B0(u||[],p||[],Al)}function Rx(u,p){return B0(u||[],p||[],Dl)}var Px=Wt(function(u){var p=u.length,b=p>1?u[p-1]:t;return b=typeof b=="function"?(u.pop(),b):t,Sy(u,b)});function wy(u){var p=$(u);return p.__chain__=!0,p}function $x(u,p){return p(u),u}function Bc(u,p){return p(u)}var Dx=fa(function(u){var p=u.length,b=p?u[0]:0,E=this.__wrapped__,_=function(B){return uh(B,u)};return p>1||this.__actions__.length||!(E instanceof qt)||!pa(b)?this.thru(_):(E=E.slice(b,+b+(p?1:0)),E.__actions__.push({func:Bc,args:[_],thisArg:t}),new uo(E,this.__chain__).thru(function(B){return p&&!B.length&&B.push(t),B}))});function Nx(){return wy(this)}function Lx(){return new uo(this.value(),this.__chain__)}function Bx(){this.__values__===t&&(this.__values__=Dy(this.value()));var u=this.__index__>=this.__values__.length,p=u?t:this.__values__[this.__index__++];return{done:u,value:p}}function Fx(){return this}function Vx(u){for(var p,b=this;b instanceof xc;){var E=hy(b);E.__index__=0,E.__values__=t,p?_.__wrapped__=E:p=E;var _=E;b=b.__wrapped__}return _.__wrapped__=u,p}function zx(){var u=this.__wrapped__;if(u instanceof qt){var p=u;return this.__actions__.length&&(p=new qt(this)),p=p.reverse(),p.__actions__.push({func:Bc,args:[Lh],thisArg:t}),new uo(p,this.__chain__)}return this.thru(Lh)}function Hx(){return L0(this.__wrapped__,this.__actions__)}var Wx=_c(function(u,p,b){fn.call(u,b)?++u[b]:ca(u,b,1)});function Ux(u,p,b){var E=$t(u)?Jg:$7;return b&&kr(u,p,b)&&(p=t),E(u,St(p,3))}function jx(u,p){var b=$t(u)?Fa:S0;return b(u,St(p,3))}var Kx=Y0(my),Gx=Y0(vy);function Yx(u,p){return ar(Fc(u,p),1)}function qx(u,p){return ar(Fc(u,p),U)}function Jx(u,p,b){return b=b===t?1:Ft(b),ar(Fc(u,p),b)}function Cy(u,p){var b=$t(u)?io:Wa;return b(u,St(p,3))}function xy(u,p){var b=$t(u)?mw:b0;return b(u,St(p,3))}var Xx=_c(function(u,p,b){fn.call(u,b)?u[b].push(p):ca(u,b,[p])});function Zx(u,p,b,E){u=Rr(u)?u:Ni(u),b=b&&!E?Ft(b):0;var _=u.length;return b<0&&(b=qn(_+b,0)),Uc(u)?b<=_&&u.indexOf(p,b)>-1:!!_&&ki(u,p,b)>-1}var Qx=Wt(function(u,p,b){var E=-1,_=typeof p=="function",B=Rr(u)?Se(u.length):[];return Wa(u,function(Z){B[++E]=_?Hr(p,Z,b):Pl(Z,p,b)}),B}),ek=_c(function(u,p,b){ca(u,b,p)});function Fc(u,p){var b=$t(u)?wn:T0;return b(u,St(p,3))}function tk(u,p,b,E){return u==null?[]:($t(p)||(p=p==null?[]:[p]),b=E?t:b,$t(b)||(b=b==null?[]:[b]),_0(u,p,b))}var nk=_c(function(u,p,b){u[b?0:1].push(p)},function(){return[[],[]]});function rk(u,p,b){var E=$t(u)?Jp:e0,_=arguments.length<3;return E(u,St(p,4),b,_,Wa)}function ok(u,p,b){var E=$t(u)?vw:e0,_=arguments.length<3;return E(u,St(p,4),b,_,b0)}function ak(u,p){var b=$t(u)?Fa:S0;return b(u,Hc(St(p,3)))}function sk(u){var p=$t(u)?m0:Z7;return p(u)}function ik(u,p,b){(b?kr(u,p,b):p===t)?p=1:p=Ft(p);var E=$t(u)?O7:Q7;return E(u,p)}function lk(u){var p=$t(u)?_7:tC;return p(u)}function uk(u){if(u==null)return 0;if(Rr(u))return Uc(u)?Ti(u):u.length;var p=fr(u);return p==Pe||p==qe?u.size:mh(u).length}function ck(u,p,b){var E=$t(u)?Xp:nC;return b&&kr(u,p,b)&&(p=t),E(u,St(p,3))}var dk=Wt(function(u,p){if(u==null)return[];var b=p.length;return b>1&&kr(u,p[0],p[1])?p=[]:b>2&&kr(p[0],p[1],p[2])&&(p=[p[0]]),_0(u,ar(p,1),[])}),Vc=jw||function(){return or.Date.now()};function fk(u,p){if(typeof p!="function")throw new lo(a);return u=Ft(u),function(){if(--u<1)return p.apply(this,arguments)}}function ky(u,p,b){return p=b?t:p,p=u&&p==null?u.length:p,da(u,A,t,t,t,t,p)}function Ey(u,p){var b;if(typeof p!="function")throw new lo(a);return u=Ft(u),function(){return--u>0&&(b=p.apply(this,arguments)),u<=1&&(p=t),b}}var Fh=Wt(function(u,p,b){var E=S;if(b.length){var _=za(b,$i(Fh));E|=C}return da(u,E,p,b,_)}),Ty=Wt(function(u,p,b){var E=S|w;if(b.length){var _=za(b,$i(Ty));E|=C}return da(p,E,u,b,_)});function My(u,p,b){p=b?t:p;var E=da(u,T,t,t,t,t,t,p);return E.placeholder=My.placeholder,E}function Iy(u,p,b){p=b?t:p;var E=da(u,k,t,t,t,t,t,p);return E.placeholder=Iy.placeholder,E}function Oy(u,p,b){var E,_,B,Z,se,he,Oe=0,Ae=!1,$e=!1,Je=!0;if(typeof u!="function")throw new lo(a);p=ho(p)||0,Tn(b)&&(Ae=!!b.leading,$e="maxWait"in b,B=$e?qn(ho(b.maxWait)||0,p):B,Je="trailing"in b?!!b.trailing:Je);function ft(Vn){var Ao=E,va=_;return E=_=t,Oe=Vn,Z=u.apply(va,Ao),Z}function wt(Vn){return Oe=Vn,se=Bl(Gt,p),Ae?ft(Vn):Z}function Vt(Vn){var Ao=Vn-he,va=Vn-Oe,Yy=p-Ao;return $e?dr(Yy,B-va):Yy}function Ct(Vn){var Ao=Vn-he,va=Vn-Oe;return he===t||Ao>=p||Ao<0||$e&&va>=B}function Gt(){var Vn=Vc();if(Ct(Vn))return Zt(Vn);se=Bl(Gt,Vt(Vn))}function Zt(Vn){return se=t,Je&&E?ft(Vn):(E=_=t,Z)}function Kr(){se!==t&&F0(se),Oe=0,E=he=_=se=t}function Er(){return se===t?Z:Zt(Vc())}function Gr(){var Vn=Vc(),Ao=Ct(Vn);if(E=arguments,_=this,he=Vn,Ao){if(se===t)return wt(he);if($e)return F0(se),se=Bl(Gt,p),ft(he)}return se===t&&(se=Bl(Gt,p)),Z}return Gr.cancel=Kr,Gr.flush=Er,Gr}var pk=Wt(function(u,p){return y0(u,1,p)}),hk=Wt(function(u,p,b){return y0(u,ho(p)||0,b)});function mk(u){return da(u,P)}function zc(u,p){if(typeof u!="function"||p!=null&&typeof p!="function")throw new lo(a);var b=function(){var E=arguments,_=p?p.apply(this,E):E[0],B=b.cache;if(B.has(_))return B.get(_);var Z=u.apply(this,E);return b.cache=B.set(_,Z)||B,Z};return b.cache=new(zc.Cache||ua),b}zc.Cache=ua;function Hc(u){if(typeof u!="function")throw new lo(a);return function(){var p=arguments;switch(p.length){case 0:return!u.call(this);case 1:return!u.call(this,p[0]);case 2:return!u.call(this,p[0],p[1]);case 3:return!u.call(this,p[0],p[1],p[2])}return!u.apply(this,p)}}function vk(u){return Ey(2,u)}var gk=rC(function(u,p){p=p.length==1&&$t(p[0])?wn(p[0],Wr(St())):wn(ar(p,1),Wr(St()));var b=p.length;return Wt(function(E){for(var _=-1,B=dr(E.length,b);++_<B;)E[_]=p[_].call(this,E[_]);return Hr(u,this,E)})}),Vh=Wt(function(u,p){var b=za(p,$i(Vh));return da(u,C,t,p,b)}),_y=Wt(function(u,p){var b=za(p,$i(_y));return da(u,M,t,p,b)}),yk=fa(function(u,p){return da(u,V,t,t,t,p)});function bk(u,p){if(typeof u!="function")throw new lo(a);return p=p===t?p:Ft(p),Wt(u,p)}function Sk(u,p){if(typeof u!="function")throw new lo(a);return p=p==null?0:qn(Ft(p),0),Wt(function(b){var E=b[p],_=Ka(b,0,p);return E&&Va(_,E),Hr(u,this,_)})}function wk(u,p,b){var E=!0,_=!0;if(typeof u!="function")throw new lo(a);return Tn(b)&&(E="leading"in b?!!b.leading:E,_="trailing"in b?!!b.trailing:_),Oy(u,p,{leading:E,maxWait:p,trailing:_})}function Ck(u){return ky(u,1)}function xk(u,p){return Vh(kh(p),u)}function kk(){if(!arguments.length)return[];var u=arguments[0];return $t(u)?u:[u]}function Ek(u){return co(u,m)}function Tk(u,p){return p=typeof p=="function"?p:t,co(u,m,p)}function Mk(u){return co(u,f|m)}function Ik(u,p){return p=typeof p=="function"?p:t,co(u,f|m,p)}function Ok(u,p){return p==null||g0(u,p,Xn(p))}function _o(u,p){return u===p||u!==u&&p!==p}var _k=$c(fh),Ak=$c(function(u,p){return u>=p}),Ws=x0(function(){return arguments}())?x0:function(u){return In(u)&&fn.call(u,"callee")&&!u0.call(u,"callee")},$t=Se.isArray,Rk=Ug?Wr(Ug):V7;function Rr(u){return u!=null&&Wc(u.length)&&!ha(u)}function Fn(u){return In(u)&&Rr(u)}function Pk(u){return u===!0||u===!1||In(u)&&xr(u)==xe}var Ga=Gw||Xh,$k=jg?Wr(jg):z7;function Dk(u){return In(u)&&u.nodeType===1&&!Fl(u)}function Nk(u){if(u==null)return!0;if(Rr(u)&&($t(u)||typeof u=="string"||typeof u.splice=="function"||Ga(u)||Di(u)||Ws(u)))return!u.length;var p=fr(u);if(p==Pe||p==qe)return!u.size;if(Ll(u))return!mh(u).length;for(var b in u)if(fn.call(u,b))return!1;return!0}function Lk(u,p){return $l(u,p)}function Bk(u,p,b){b=typeof b=="function"?b:t;var E=b?b(u,p):t;return E===t?$l(u,p,t,b):!!E}function zh(u){if(!In(u))return!1;var p=xr(u);return p==Ze||p==De||typeof u.message=="string"&&typeof u.name=="string"&&!Fl(u)}function Fk(u){return typeof u=="number"&&d0(u)}function ha(u){if(!Tn(u))return!1;var p=xr(u);return p==lt||p==ze||p==le||p==Fe}function Ay(u){return typeof u=="number"&&u==Ft(u)}function Wc(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=te}function Tn(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function In(u){return u!=null&&typeof u=="object"}var Ry=Kg?Wr(Kg):W7;function Vk(u,p){return u===p||hh(u,p,Ah(p))}function zk(u,p,b){return b=typeof b=="function"?b:t,hh(u,p,Ah(p),b)}function Hk(u){return Py(u)&&u!=+u}function Wk(u){if(TC(u))throw new _t(s);return k0(u)}function Uk(u){return u===null}function jk(u){return u==null}function Py(u){return typeof u=="number"||In(u)&&xr(u)==nt}function Fl(u){if(!In(u)||xr(u)!=_e)return!1;var p=vc(u);if(p===null)return!0;var b=fn.call(p,"constructor")&&p.constructor;return typeof b=="function"&&b instanceof b&&fc.call(b)==zw}var Hh=Gg?Wr(Gg):U7;function Kk(u){return Ay(u)&&u>=-9007199254740991&&u<=te}var $y=Yg?Wr(Yg):j7;function Uc(u){return typeof u=="string"||!$t(u)&&In(u)&&xr(u)==dt}function jr(u){return typeof u=="symbol"||In(u)&&xr(u)==vt}var Di=qg?Wr(qg):K7;function Gk(u){return u===t}function Yk(u){return In(u)&&fr(u)==kt}function qk(u){return In(u)&&xr(u)==Lt}var Jk=$c(vh),Xk=$c(function(u,p){return u<=p});function Dy(u){if(!u)return[];if(Rr(u))return Uc(u)?Io(u):Ar(u);if(Tl&&u[Tl])return Ow(u[Tl]());var p=fr(u),b=p==Pe?rh:p==qe?uc:Ni;return b(u)}function ma(u){if(!u)return u===0?u:0;if(u=ho(u),u===U||u===-1/0){var p=u<0?-1:1;return p*j}return u===u?u:0}function Ft(u){var p=ma(u),b=p%1;return p===p?b?p-b:p:0}function Ny(u){return u?Fs(Ft(u),0,X):0}function ho(u){if(typeof u=="number")return u;if(jr(u))return ee;if(Tn(u)){var p=typeof u.valueOf=="function"?u.valueOf():u;u=Tn(p)?p+"":p}if(typeof u!="string")return u===0?u:+u;u=t0(u);var b=Ci.test(u);return b||zp.test(u)?fw(u.slice(2),b?2:8):Uo.test(u)?ee:+u}function Ly(u){return Ko(u,Pr(u))}function Zk(u){return u?Fs(Ft(u),-9007199254740991,te):u===0?u:0}function cn(u){return u==null?"":Ur(u)}var Qk=Ri(function(u,p){if(Ll(p)||Rr(p)){Ko(p,Xn(p),u);return}for(var b in p)fn.call(p,b)&&Al(u,b,p[b])}),By=Ri(function(u,p){Ko(p,Pr(p),u)}),jc=Ri(function(u,p,b,E){Ko(p,Pr(p),u,E)}),eE=Ri(function(u,p,b,E){Ko(p,Xn(p),u,E)}),tE=fa(uh);function nE(u,p){var b=Ai(u);return p==null?b:v0(b,p)}var rE=Wt(function(u,p){u=pn(u);var b=-1,E=p.length,_=E>2?p[2]:t;for(_&&kr(p[0],p[1],_)&&(E=1);++b<E;)for(var B=p[b],Z=Pr(B),se=-1,he=Z.length;++se<he;){var Oe=Z[se],Ae=u[Oe];(Ae===t||_o(Ae,Ii[Oe])&&!fn.call(u,Oe))&&(u[Oe]=B[Oe])}return u}),oE=Wt(function(u){return u.push(t,ty),Hr(Fy,t,u)});function aE(u,p){return Xg(u,St(p,3),jo)}function sE(u,p){return Xg(u,St(p,3),dh)}function iE(u,p){return u==null?u:ch(u,St(p,3),Pr)}function lE(u,p){return u==null?u:w0(u,St(p,3),Pr)}function uE(u,p){return u&&jo(u,St(p,3))}function cE(u,p){return u&&dh(u,St(p,3))}function dE(u){return u==null?[]:Tc(u,Xn(u))}function fE(u){return u==null?[]:Tc(u,Pr(u))}function Wh(u,p,b){var E=u==null?t:Vs(u,p);return E===t?b:E}function pE(u,p){return u!=null&&oy(u,p,N7)}function Uh(u,p){return u!=null&&oy(u,p,L7)}var hE=J0(function(u,p,b){p!=null&&typeof p.toString!="function"&&(p=pc.call(p)),u[p]=b},Kh($r)),mE=J0(function(u,p,b){p!=null&&typeof p.toString!="function"&&(p=pc.call(p)),fn.call(u,p)?u[p].push(b):u[p]=[b]},St),vE=Wt(Pl);function Xn(u){return Rr(u)?h0(u):mh(u)}function Pr(u){return Rr(u)?h0(u,!0):G7(u)}function gE(u,p){var b={};return p=St(p,3),jo(u,function(E,_,B){ca(b,p(E,_,B),E)}),b}function yE(u,p){var b={};return p=St(p,3),jo(u,function(E,_,B){ca(b,_,p(E,_,B))}),b}var bE=Ri(function(u,p,b){Mc(u,p,b)}),Fy=Ri(function(u,p,b,E){Mc(u,p,b,E)}),SE=fa(function(u,p){var b={};if(u==null)return b;var E=!1;p=wn(p,function(B){return B=ja(B,u),E||(E=B.length>1),B}),Ko(u,Oh(u),b),E&&(b=co(b,f|h|m,hC));for(var _=p.length;_--;)wh(b,p[_]);return b});function wE(u,p){return Vy(u,Hc(St(p)))}var CE=fa(function(u,p){return u==null?{}:q7(u,p)});function Vy(u,p){if(u==null)return{};var b=wn(Oh(u),function(E){return[E]});return p=St(p),A0(u,b,function(E,_){return p(E,_[0])})}function xE(u,p,b){p=ja(p,u);var E=-1,_=p.length;for(_||(_=1,u=t);++E<_;){var B=u==null?t:u[Go(p[E])];B===t&&(E=_,B=b),u=ha(B)?B.call(u):B}return u}function kE(u,p,b){return u==null?u:Dl(u,p,b)}function EE(u,p,b,E){return E=typeof E=="function"?E:t,u==null?u:Dl(u,p,b,E)}var zy=Q0(Xn),Hy=Q0(Pr);function TE(u,p,b){var E=$t(u),_=E||Ga(u)||Di(u);if(p=St(p,4),b==null){var B=u&&u.constructor;_?b=E?new B:[]:Tn(u)?b=ha(B)?Ai(vc(u)):{}:b={}}return(_?io:jo)(u,function(Z,se,he){return p(b,Z,se,he)}),b}function ME(u,p){return u==null?!0:wh(u,p)}function IE(u,p,b){return u==null?u:N0(u,p,kh(b))}function OE(u,p,b,E){return E=typeof E=="function"?E:t,u==null?u:N0(u,p,kh(b),E)}function Ni(u){return u==null?[]:nh(u,Xn(u))}function _E(u){return u==null?[]:nh(u,Pr(u))}function AE(u,p,b){return b===t&&(b=p,p=t),b!==t&&(b=ho(b),b=b===b?b:0),p!==t&&(p=ho(p),p=p===p?p:0),Fs(ho(u),p,b)}function RE(u,p,b){return p=ma(p),b===t?(b=p,p=0):b=ma(b),u=ho(u),B7(u,p,b)}function PE(u,p,b){if(b&&typeof b!="boolean"&&kr(u,p,b)&&(p=b=t),b===t&&(typeof p=="boolean"?(b=p,p=t):typeof u=="boolean"&&(b=u,u=t)),u===t&&p===t?(u=0,p=1):(u=ma(u),p===t?(p=u,u=0):p=ma(p)),u>p){var E=u;u=p,p=E}if(b||u%1||p%1){var _=f0();return dr(u+_*(p-u+dw("1e-"+((_+"").length-1))),p)}return yh(u,p)}var $E=Pi(function(u,p,b){return p=p.toLowerCase(),u+(b?Wy(p):p)});function Wy(u){return jh(cn(u).toLowerCase())}function Uy(u){return u=cn(u),u&&u.replace(N8,kw).replace(tw,"")}function DE(u,p,b){u=cn(u),p=Ur(p);var E=u.length;b=b===t?E:Fs(Ft(b),0,E);var _=b;return b-=p.length,b>=0&&u.slice(b,_)==p}function NE(u){return u=cn(u),u&&Ln.test(u)?u.replace(Et,Ew):u}function LE(u){return u=cn(u),u&&Lp.test(u)?u.replace(kl,"\\$&"):u}var BE=Pi(function(u,p,b){return u+(b?"-":"")+p.toLowerCase()}),FE=Pi(function(u,p,b){return u+(b?" ":"")+p.toLowerCase()}),VE=G0("toLowerCase");function zE(u,p,b){u=cn(u),p=Ft(p);var E=p?Ti(u):0;if(!p||E>=p)return u;var _=(p-E)/2;return Pc(Sc(_),b)+u+Pc(bc(_),b)}function HE(u,p,b){u=cn(u),p=Ft(p);var E=p?Ti(u):0;return p&&E<p?u+Pc(p-E,b):u}function WE(u,p,b){u=cn(u),p=Ft(p);var E=p?Ti(u):0;return p&&E<p?Pc(p-E,b)+u:u}function UE(u,p,b){return b||p==null?p=0:p&&(p=+p),Xw(cn(u).replace(wi,""),p||0)}function jE(u,p,b){return(b?kr(u,p,b):p===t)?p=1:p=Ft(p),bh(cn(u),p)}function KE(){var u=arguments,p=cn(u[0]);return u.length<3?p:p.replace(u[1],u[2])}var GE=Pi(function(u,p,b){return u+(b?"_":"")+p.toLowerCase()});function YE(u,p,b){return b&&typeof b!="number"&&kr(u,p,b)&&(p=b=t),b=b===t?X:b>>>0,b?(u=cn(u),u&&(typeof p=="string"||p!=null&&!Hh(p))&&(p=Ur(p),!p&&Ei(u))?Ka(Io(u),0,b):u.split(p,b)):[]}var qE=Pi(function(u,p,b){return u+(b?" ":"")+jh(p)});function JE(u,p,b){return u=cn(u),b=b==null?0:Fs(Ft(b),0,u.length),p=Ur(p),u.slice(b,b+p.length)==p}function XE(u,p,b){var E=$.templateSettings;b&&kr(u,p,b)&&(p=t),u=cn(u),p=jc({},p,E,ey);var _=jc({},p.imports,E.imports,ey),B=Xn(_),Z=nh(_,B),se,he,Oe=0,Ae=p.interpolate||oc,$e="__p += '",Je=oh((p.escape||oc).source+"|"+Ae.source+"|"+(Ae===xl?Cr:oc).source+"|"+(p.evaluate||oc).source+"|$","g"),ft="//# sourceURL="+(fn.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sw+"]")+` |
| 34 |
`;u.replace(Je,function(Ct,Gt,Zt,Kr,Er,Gr){return Zt||(Zt=Kr),$e+=u.slice(Oe,Gr).replace(L8,Tw),Gt&&(se=!0,$e+=`' + |
| 35 |
__e(`+Gt+`) + |
| 36 |
'`),Er&&(he=!0,$e+=`'; |
| 37 |
`+Er+`; |
| 38 |
__p += '`),Zt&&($e+=`' + |
| 39 |
((__t = (`+Zt+`)) == null ? '' : __t) + |
| 40 |
'`),Oe=Gr+Ct.length,Ct}),$e+=`'; |
| 41 |
`;var wt=fn.call(p,"variable")&&p.variable;if(!wt)$e=`with (obj) { |
| 42 |
`+$e+` |
| 43 |
} |
| 44 |
`;else if(Bt.test(wt))throw new _t(i);$e=(he?$e.replace(Re,""):$e).replace(Ne,"$1").replace(ot,"$1;"),$e="function("+(wt||"obj")+`) { |
| 45 |
`+(wt?"":`obj || (obj = {}); |
| 46 |
`)+"var __t, __p = ''"+(se?", __e = _.escape":"")+(he?`, __j = Array.prototype.join; |
| 47 |
function print() { __p += __j.call(arguments, '') } |
| 48 |
`:`; |
| 49 |
`)+$e+`return __p |
| 50 |
}`;var Vt=Ky(function(){return un(B,ft+"return "+$e).apply(t,Z)});if(Vt.source=$e,zh(Vt))throw Vt;return Vt}function ZE(u){return cn(u).toLowerCase()}function QE(u){return cn(u).toUpperCase()}function eT(u,p,b){if(u=cn(u),u&&(b||p===t))return t0(u);if(!u||!(p=Ur(p)))return u;var E=Io(u),_=Io(p),B=n0(E,_),Z=r0(E,_)+1;return Ka(E,B,Z).join("")}function tT(u,p,b){if(u=cn(u),u&&(b||p===t))return u.slice(0,a0(u)+1);if(!u||!(p=Ur(p)))return u;var E=Io(u),_=r0(E,Io(p))+1;return Ka(E,0,_).join("")}function nT(u,p,b){if(u=cn(u),u&&(b||p===t))return u.replace(wi,"");if(!u||!(p=Ur(p)))return u;var E=Io(u),_=n0(E,Io(p));return Ka(E,_).join("")}function rT(u,p){var b=L,E=K;if(Tn(p)){var _="separator"in p?p.separator:_;b="length"in p?Ft(p.length):b,E="omission"in p?Ur(p.omission):E}u=cn(u);var B=u.length;if(Ei(u)){var Z=Io(u);B=Z.length}if(b>=B)return u;var se=b-Ti(E);if(se<1)return E;var he=Z?Ka(Z,0,se).join(""):u.slice(0,se);if(_===t)return he+E;if(Z&&(se+=he.length-se),Hh(_)){if(u.slice(se).search(_)){var Oe,Ae=he;for(_.global||(_=oh(_.source,cn(ia.exec(_))+"g")),_.lastIndex=0;Oe=_.exec(Ae);)var $e=Oe.index;he=he.slice(0,$e===t?se:$e)}}else if(u.indexOf(Ur(_),se)!=se){var Je=he.lastIndexOf(_);Je>-1&&(he=he.slice(0,Je))}return he+E}function oT(u){return u=cn(u),u&&on.test(u)?u.replace(at,Pw):u}var aT=Pi(function(u,p,b){return u+(b?" ":"")+p.toUpperCase()}),jh=G0("toUpperCase");function jy(u,p,b){return u=cn(u),p=b?t:p,p===t?Iw(u)?Nw(u):bw(u):u.match(p)||[]}var Ky=Wt(function(u,p){try{return Hr(u,t,p)}catch(b){return zh(b)?b:new _t(b)}}),sT=fa(function(u,p){return io(p,function(b){b=Go(b),ca(u,b,Fh(u[b],u))}),u});function iT(u){var p=u==null?0:u.length,b=St();return u=p?wn(u,function(E){if(typeof E[1]!="function")throw new lo(a);return[b(E[0]),E[1]]}):[],Wt(function(E){for(var _=-1;++_<p;){var B=u[_];if(Hr(B[0],this,E))return Hr(B[1],this,E)}})}function lT(u){return P7(co(u,f))}function Kh(u){return function(){return u}}function uT(u,p){return u==null||u!==u?p:u}var cT=q0(),dT=q0(!0);function $r(u){return u}function Gh(u){return E0(typeof u=="function"?u:co(u,f))}function fT(u){return M0(co(u,f))}function pT(u,p){return I0(u,co(p,f))}var hT=Wt(function(u,p){return function(b){return Pl(b,u,p)}}),mT=Wt(function(u,p){return function(b){return Pl(u,b,p)}});function Yh(u,p,b){var E=Xn(p),_=Tc(p,E);b==null&&!(Tn(p)&&(_.length||!E.length))&&(b=p,p=u,u=this,_=Tc(p,Xn(p)));var B=!(Tn(b)&&"chain"in b)||!!b.chain,Z=ha(u);return io(_,function(se){var he=p[se];u[se]=he,Z&&(u.prototype[se]=function(){var Oe=this.__chain__;if(B||Oe){var Ae=u(this.__wrapped__),$e=Ae.__actions__=Ar(this.__actions__);return $e.push({func:he,args:arguments,thisArg:u}),Ae.__chain__=Oe,Ae}return he.apply(u,Va([this.value()],arguments))})}),u}function vT(){return or._===this&&(or._=Hw),this}function qh(){}function gT(u){return u=Ft(u),Wt(function(p){return O0(p,u)})}var yT=Th(wn),bT=Th(Jg),ST=Th(Xp);function Gy(u){return Ph(u)?Zp(Go(u)):J7(u)}function wT(u){return function(p){return u==null?t:Vs(u,p)}}var CT=X0(),xT=X0(!0);function Jh(){return[]}function Xh(){return!1}function kT(){return{}}function ET(){return""}function TT(){return!0}function MT(u,p){if(u=Ft(u),u<1||u>te)return[];var b=X,E=dr(u,X);p=St(p),u-=X;for(var _=th(E,p);++b<u;)p(b);return _}function IT(u){return $t(u)?wn(u,Go):jr(u)?[u]:Ar(py(cn(u)))}function OT(u){var p=++Vw;return cn(u)+p}var _T=Rc(function(u,p){return u+p},0),AT=Mh("ceil"),RT=Rc(function(u,p){return u/p},1),PT=Mh("floor");function $T(u){return u&&u.length?Ec(u,$r,fh):t}function DT(u,p){return u&&u.length?Ec(u,St(p,2),fh):t}function NT(u){return Qg(u,$r)}function LT(u,p){return Qg(u,St(p,2))}function BT(u){return u&&u.length?Ec(u,$r,vh):t}function FT(u,p){return u&&u.length?Ec(u,St(p,2),vh):t}var VT=Rc(function(u,p){return u*p},1),zT=Mh("round"),HT=Rc(function(u,p){return u-p},0);function WT(u){return u&&u.length?eh(u,$r):0}function UT(u,p){return u&&u.length?eh(u,St(p,2)):0}return $.after=fk,$.ary=ky,$.assign=Qk,$.assignIn=By,$.assignInWith=jc,$.assignWith=eE,$.at=tE,$.before=Ey,$.bind=Fh,$.bindAll=sT,$.bindKey=Ty,$.castArray=kk,$.chain=wy,$.chunk=PC,$.compact=$C,$.concat=DC,$.cond=iT,$.conforms=lT,$.constant=Kh,$.countBy=Wx,$.create=nE,$.curry=My,$.curryRight=Iy,$.debounce=Oy,$.defaults=rE,$.defaultsDeep=oE,$.defer=pk,$.delay=hk,$.difference=NC,$.differenceBy=LC,$.differenceWith=BC,$.drop=FC,$.dropRight=VC,$.dropRightWhile=zC,$.dropWhile=HC,$.fill=WC,$.filter=jx,$.flatMap=Yx,$.flatMapDeep=qx,$.flatMapDepth=Jx,$.flatten=gy,$.flattenDeep=UC,$.flattenDepth=jC,$.flip=mk,$.flow=cT,$.flowRight=dT,$.fromPairs=KC,$.functions=dE,$.functionsIn=fE,$.groupBy=Xx,$.initial=YC,$.intersection=qC,$.intersectionBy=JC,$.intersectionWith=XC,$.invert=hE,$.invertBy=mE,$.invokeMap=Qx,$.iteratee=Gh,$.keyBy=ek,$.keys=Xn,$.keysIn=Pr,$.map=Fc,$.mapKeys=gE,$.mapValues=yE,$.matches=fT,$.matchesProperty=pT,$.memoize=zc,$.merge=bE,$.mergeWith=Fy,$.method=hT,$.methodOf=mT,$.mixin=Yh,$.negate=Hc,$.nthArg=gT,$.omit=SE,$.omitBy=wE,$.once=vk,$.orderBy=tk,$.over=yT,$.overArgs=gk,$.overEvery=bT,$.overSome=ST,$.partial=Vh,$.partialRight=_y,$.partition=nk,$.pick=CE,$.pickBy=Vy,$.property=Gy,$.propertyOf=wT,$.pull=tx,$.pullAll=by,$.pullAllBy=nx,$.pullAllWith=rx,$.pullAt=ox,$.range=CT,$.rangeRight=xT,$.rearg=yk,$.reject=ak,$.remove=ax,$.rest=bk,$.reverse=Lh,$.sampleSize=ik,$.set=kE,$.setWith=EE,$.shuffle=lk,$.slice=sx,$.sortBy=dk,$.sortedUniq=px,$.sortedUniqBy=hx,$.split=YE,$.spread=Sk,$.tail=mx,$.take=vx,$.takeRight=gx,$.takeRightWhile=yx,$.takeWhile=bx,$.tap=$x,$.throttle=wk,$.thru=Bc,$.toArray=Dy,$.toPairs=zy,$.toPairsIn=Hy,$.toPath=IT,$.toPlainObject=Ly,$.transform=TE,$.unary=Ck,$.union=Sx,$.unionBy=wx,$.unionWith=Cx,$.uniq=xx,$.uniqBy=kx,$.uniqWith=Ex,$.unset=ME,$.unzip=Bh,$.unzipWith=Sy,$.update=IE,$.updateWith=OE,$.values=Ni,$.valuesIn=_E,$.without=Tx,$.words=jy,$.wrap=xk,$.xor=Mx,$.xorBy=Ix,$.xorWith=Ox,$.zip=_x,$.zipObject=Ax,$.zipObjectDeep=Rx,$.zipWith=Px,$.entries=zy,$.entriesIn=Hy,$.extend=By,$.extendWith=jc,Yh($,$),$.add=_T,$.attempt=Ky,$.camelCase=$E,$.capitalize=Wy,$.ceil=AT,$.clamp=AE,$.clone=Ek,$.cloneDeep=Mk,$.cloneDeepWith=Ik,$.cloneWith=Tk,$.conformsTo=Ok,$.deburr=Uy,$.defaultTo=uT,$.divide=RT,$.endsWith=DE,$.eq=_o,$.escape=NE,$.escapeRegExp=LE,$.every=Ux,$.find=Kx,$.findIndex=my,$.findKey=aE,$.findLast=Gx,$.findLastIndex=vy,$.findLastKey=sE,$.floor=PT,$.forEach=Cy,$.forEachRight=xy,$.forIn=iE,$.forInRight=lE,$.forOwn=uE,$.forOwnRight=cE,$.get=Wh,$.gt=_k,$.gte=Ak,$.has=pE,$.hasIn=Uh,$.head=yy,$.identity=$r,$.includes=Zx,$.indexOf=GC,$.inRange=RE,$.invoke=vE,$.isArguments=Ws,$.isArray=$t,$.isArrayBuffer=Rk,$.isArrayLike=Rr,$.isArrayLikeObject=Fn,$.isBoolean=Pk,$.isBuffer=Ga,$.isDate=$k,$.isElement=Dk,$.isEmpty=Nk,$.isEqual=Lk,$.isEqualWith=Bk,$.isError=zh,$.isFinite=Fk,$.isFunction=ha,$.isInteger=Ay,$.isLength=Wc,$.isMap=Ry,$.isMatch=Vk,$.isMatchWith=zk,$.isNaN=Hk,$.isNative=Wk,$.isNil=jk,$.isNull=Uk,$.isNumber=Py,$.isObject=Tn,$.isObjectLike=In,$.isPlainObject=Fl,$.isRegExp=Hh,$.isSafeInteger=Kk,$.isSet=$y,$.isString=Uc,$.isSymbol=jr,$.isTypedArray=Di,$.isUndefined=Gk,$.isWeakMap=Yk,$.isWeakSet=qk,$.join=ZC,$.kebabCase=BE,$.last=po,$.lastIndexOf=QC,$.lowerCase=FE,$.lowerFirst=VE,$.lt=Jk,$.lte=Xk,$.max=$T,$.maxBy=DT,$.mean=NT,$.meanBy=LT,$.min=BT,$.minBy=FT,$.stubArray=Jh,$.stubFalse=Xh,$.stubObject=kT,$.stubString=ET,$.stubTrue=TT,$.multiply=VT,$.nth=ex,$.noConflict=vT,$.noop=qh,$.now=Vc,$.pad=zE,$.padEnd=HE,$.padStart=WE,$.parseInt=UE,$.random=PE,$.reduce=rk,$.reduceRight=ok,$.repeat=jE,$.replace=KE,$.result=xE,$.round=zT,$.runInContext=de,$.sample=sk,$.size=uk,$.snakeCase=GE,$.some=ck,$.sortedIndex=ix,$.sortedIndexBy=lx,$.sortedIndexOf=ux,$.sortedLastIndex=cx,$.sortedLastIndexBy=dx,$.sortedLastIndexOf=fx,$.startCase=qE,$.startsWith=JE,$.subtract=HT,$.sum=WT,$.sumBy=UT,$.template=XE,$.times=MT,$.toFinite=ma,$.toInteger=Ft,$.toLength=Ny,$.toLower=ZE,$.toNumber=ho,$.toSafeInteger=Zk,$.toString=cn,$.toUpper=QE,$.trim=eT,$.trimEnd=tT,$.trimStart=nT,$.truncate=rT,$.unescape=oT,$.uniqueId=OT,$.upperCase=aT,$.upperFirst=jh,$.each=Cy,$.eachRight=xy,$.first=yy,Yh($,function(){var u={};return jo($,function(p,b){fn.call($.prototype,b)||(u[b]=p)}),u}(),{chain:!1}),$.VERSION=r,io(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){$[u].placeholder=$}),io(["drop","take"],function(u,p){qt.prototype[u]=function(b){b=b===t?1:qn(Ft(b),0);var E=this.__filtered__&&!p?new qt(this):this.clone();return E.__filtered__?E.__takeCount__=dr(b,E.__takeCount__):E.__views__.push({size:dr(b,X),type:u+(E.__dir__<0?"Right":"")}),E},qt.prototype[u+"Right"]=function(b){return this.reverse()[u](b).reverse()}}),io(["filter","map","takeWhile"],function(u,p){var b=p+1,E=b==ne||b==D;qt.prototype[u]=function(_){var B=this.clone();return B.__iteratees__.push({iteratee:St(_,3),type:b}),B.__filtered__=B.__filtered__||E,B}}),io(["head","last"],function(u,p){var b="take"+(p?"Right":"");qt.prototype[u]=function(){return this[b](1).value()[0]}}),io(["initial","tail"],function(u,p){var b="drop"+(p?"":"Right");qt.prototype[u]=function(){return this.__filtered__?new qt(this):this[b](1)}}),qt.prototype.compact=function(){return this.filter($r)},qt.prototype.find=function(u){return this.filter(u).head()},qt.prototype.findLast=function(u){return this.reverse().find(u)},qt.prototype.invokeMap=Wt(function(u,p){return typeof u=="function"?new qt(this):this.map(function(b){return Pl(b,u,p)})}),qt.prototype.reject=function(u){return this.filter(Hc(St(u)))},qt.prototype.slice=function(u,p){u=Ft(u);var b=this;return b.__filtered__&&(u>0||p<0)?new qt(b):(u<0?b=b.takeRight(-u):u&&(b=b.drop(u)),p!==t&&(p=Ft(p),b=p<0?b.dropRight(-p):b.take(p-u)),b)},qt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},qt.prototype.toArray=function(){return this.take(X)},jo(qt.prototype,function(u,p){var b=/^(?:filter|find|map|reject)|While$/.test(p),E=/^(?:head|last)$/.test(p),_=$[E?"take"+(p=="last"?"Right":""):p],B=E||/^find/.test(p);_&&($.prototype[p]=function(){var Z=this.__wrapped__,se=E?[1]:arguments,he=Z instanceof qt,Oe=se[0],Ae=he||$t(Z),$e=function(Gt){var Zt=_.apply($,Va([Gt],se));return E&&Je?Zt[0]:Zt};Ae&&b&&typeof Oe=="function"&&Oe.length!=1&&(he=Ae=!1);var Je=this.__chain__,ft=!!this.__actions__.length,wt=B&&!Je,Vt=he&&!ft;if(!B&&Ae){Z=Vt?Z:new qt(this);var Ct=u.apply(Z,se);return Ct.__actions__.push({func:Bc,args:[$e],thisArg:t}),new uo(Ct,Je)}return wt&&Vt?u.apply(this,se):(Ct=this.thru($e),wt?E?Ct.value()[0]:Ct.value():Ct)})}),io(["pop","push","shift","sort","splice","unshift"],function(u){var p=cc[u],b=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",E=/^(?:pop|shift)$/.test(u);$.prototype[u]=function(){var _=arguments;if(E&&!this.__chain__){var B=this.value();return p.apply($t(B)?B:[],_)}return this[b](function(Z){return p.apply($t(Z)?Z:[],_)})}}),jo(qt.prototype,function(u,p){var b=$[p];if(b){var E=b.name+"";fn.call(_i,E)||(_i[E]=[]),_i[E].push({name:p,func:b})}}),_i[Ac(t,w).name]=[{name:"wrapper",func:t}],qt.prototype.clone=o7,qt.prototype.reverse=a7,qt.prototype.value=s7,$.prototype.at=Dx,$.prototype.chain=Nx,$.prototype.commit=Lx,$.prototype.next=Bx,$.prototype.plant=Vx,$.prototype.reverse=zx,$.prototype.toJSON=$.prototype.valueOf=$.prototype.value=Hx,$.prototype.first=$.prototype.head,Tl&&($.prototype[Tl]=Fx),$},Mi=Lw();Ds?((Ds.exports=Mi)._=Mi,Gp._=Mi):or._=Mi}).call(WF)}(Xl,Xl.exports)),Xl.exports}var O2=UF();const jF=["onClick"],KF={class:"ivyforms-context-menu-action__wrapper__content ivyforms-flex ivyforms-align-items-center"},GF=ue({__name:"IvyContextMenuActions",props:{actions:{default:()=>[]},entityId:{default:null},style:{default:"filled"}},setup(n){const e=n,t=c=>s(c.danger)?"var(--map-status-error-symbol-0)":c.iconColor?c.iconColor:"var(--map-base-dusk-symbol-2)",r=c=>typeof c=="function"?c(e.entityId):c,o=c=>typeof c=="function"?c(e.entityId):c,s=c=>typeof c=="function"?c():c,a=c=>typeof c=="function"?c():c,i=c=>typeof c=="function"?c():c,l=c=>typeof c=="function"?c():c;return(c,d)=>{const f=Jn,h=gl;return I(!0),z(it,null,Ht(e.actions,m=>{var g,y;return I(),z("div",{key:r(m.label),class:H(["ivyforms-context-menu-action regular-16",{divided:a(m.divided),secondary:i(m.secondary),hidden:(g=m==null?void 0:m.isHidden)==null?void 0:g.call(m),ghost:e.style==="ghost",active:(y=m==null?void 0:m.isActive)==null?void 0:y.call(m),"coming-soon":l(m.isComingSoon)}]),onClick:()=>{var S;return!l(m.isComingSoon)&&((S=m.handler)==null?void 0:S.call(m,e.entityId))}},[Q("div",{class:H(["ivyforms-context-menu-action__wrapper ivyforms-flex ivyforms-justify-content-between ivyforms-flex-grow ivyforms-gap-8",{danger:s(m.danger)}])},[Q("div",KF,[m.icon?(I(),me(f,{key:0,color:t(m),name:o(m.icon),type:m.iconType||"outline",category:m.iconCategory||"global",size:m.iconSize||"d"},null,8,["color","name","type","category","size"])):fe("",!0),ht(" "+Ee(m.label),1)]),l(m.isComingSoon)?(I(),me(h,{key:0})):fe("",!0)],2)],10,jF)}),128)}}}),_5=vl("contextMenu",()=>{const n=N(!1),e=vr(null),t=N({}),r=(s={})=>{n.value&&o(),e.value=GF,t.value=s;const a=t.value.contextMenuButtonRef;let i=null;a&&"$el"in a?i=a.$el:a instanceof HTMLElement&&(i=a),i&&i.classList.add("opened"),n.value=!0},o=()=>{n.value=!1;const s=t.value.contextMenuButtonRef;let a=null;s&&"$el"in s?a=s.$el:s instanceof HTMLElement&&(a=s),a&&a.classList.remove("opened"),typeof t.value.onClose=="function"&&t.value.onClose(),setTimeout(()=>{n.value||(t.value={},e.value=null)},200)};return{isOpen:n,contextMenuContent:e,contextMenuProps:t,openContextMenu:r,closeContextMenu:o}}),YF={key:0,class:"ivyforms-toogle__text-block"},qF={key:0,class:"ivyforms-toggle__text-block__title ivyforms-flex ivyforms-align-items-center"},JF={key:0,class:"regular-16"},XF={key:1,class:"ivyforms-toogle__text-block__description"},fp=ue({__name:"IvyToggle",props:{modelValue:{type:[Boolean,String,Number],default:""},label:{default:""},disabled:{type:Boolean,default:!1},size:{default:"d"},priority:{default:"primary"},type:{default:"fill"},textPosition:{default:"right"},title:{default:""},description:{default:""},tooltip:{default:""}},emits:["update:modelValue","change"],setup(n,{emit:e}){const{getLabel:t}=rn(),r=n,o=e,s=O({get(){return r.modelValue},set(l){o("update:modelValue",l)}}),a=O(()=>r.type==="stroke-with-text"?r.label?r.label:t("on"):""),i=O(()=>r.type==="stroke-with-text"?r.label?r.label:t("off"):"");return(l,c)=>{const d=DD,f=Jn,h=Xu;return I(),z("div",{class:H(["ivyforms-toggle",[`text-position-${r.textPosition}`,`size-${r.size}`,`priority-${r.priority}`,`type-${r.type}`,{"is-disabled":r.disabled}]])},[R(d,xt({modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=m=>s.value=m)},{...l.$props,...l.$attrs,size:""},{"inline-prompt":r.type==="stroke-with-text","active-text":a.value,"inactive-text":i.value,onChange:c[1]||(c[1]=m=>l.$emit("change",m))}),null,16,["modelValue","inline-prompt","active-text","inactive-text"]),r.title||r.tooltip||r.description?(I(),z("div",YF,[r.title||r.tooltip?(I(),z("div",qF,[r.title?(I(),z("div",JF,Ee(r.title),1)):fe("",!0),r.tooltip?(I(),me(h,{key:1,content:r.tooltip,"raw-content":"",placement:"top"},{default:q(()=>[R(f,{name:"question",type:"outline",size:"s",color:"var(--map-base-dusk-symbol-2)",onClick:c[2]||(c[2]=Qe(()=>{},["prevent"]))})]),_:1},8,["content"])):fe("",!0)])):fe("",!0),r.description?(I(),z("div",XF,Ee(r.description),1)):fe("",!0)])):fe("",!0)],2)}}}),_2=ue({__name:"IvyLink",props:{href:{default:"#"},priority:{default:"primary"},target:{default:"_blank"},rel:{default:"noreferrer"},size:{default:"d"},onClick:{type:Function,default:()=>{}}},setup(n){const e=n,t=N(!1),r=N(!1),o=O(()=>({href:e.href==="#"?"":e.href,target:e.target,rel:e.target==="_blank"?e.rel:""})),s=c=>{e.href==="#"||!e.href?c.preventDefault():r.value=!0},a=()=>{t.value=!0},i=()=>{t.value=!1},l=()=>{t.value=!1};return(c,d)=>{const f=BP;return I(),z("div",null,[R(f,xt(o.value,{underline:!1,class:["ivyforms-link",`priority-${e.priority} size-${e.size} ${t.value?"pressed":""} ${r.value?"used":""}`],onClick:s,onMousedown:a,onMouseup:i,onMouseleave:l}),{default:q(()=>[ve(c.$slots,"default")]),_:3},16,["class"])])}}}),ZF={class:"ivyforms-popover"},Sl=ue({__name:"IvyPopover",props:{popperClass:{default:void 0},popperBackground:{default:"level-2-foreground"},popperArrow:{default:"without-arrow"},isWithScrollbar:{type:Boolean,default:!1}},emits:["show"],setup(n,{expose:e,emit:t}){const r=n,o=t,s=N(),a=()=>{var l;(l=s.value)==null||l.hide()},i=()=>{o("show")};return e({hide:a}),(l,c)=>(I(),z("div",ZF,[R(v(oD),xt({ref_key:"elPopoverRef",ref:s},{...l.$props,...l.$attrs},{"popper-class":`ivyforms-popover-popper ${r.popperBackground} ivyforms-popover-arrow ${r.popperArrow}`+(r.isWithScrollbar?" is-with-scrollbar":"")+(r.popperClass?" "+r.popperClass:""),onShow:i}),{reference:q(()=>[ve(l.$slots,"reference")]),default:q(()=>[l.$slots.default&&r.isWithScrollbar?(I(),z(it,{key:0},[],64)):ve(l.$slots,"default",{key:1})]),_:3},16,["popper-class"])]))}}),QF=ue({__name:"IvyContextMenu",setup(n){const e=_5(),{isOpen:t}=Xf(e),r=N(null),o=O(()=>e.contextMenuProps);Xe(()=>o.value.contextMenuButtonRef,a=>{r.value&&r.value(),a instanceof HTMLElement?r.value=Iv(a,()=>e.closeContextMenu()):a&&a.$el&&a.$el instanceof HTMLElement?r.value=Iv(a.$el,()=>e.closeContextMenu()):r.value=null});const s=O(()=>{const a=e.contextMenuProps.contextMenuButtonRef;return a&&"$el"in a&&a.$el instanceof HTMLElement?a.$el:a instanceof HTMLElement?a:null});return Xe(t,a=>{!a&&r.value&&(r.value(),r.value=null)}),(a,i)=>{const l=Sl;return I(),me(l,{visible:v(t),"popper-class":"ivyforms-popper-context-menu","popper-background":"level-1-foreground",width:205,placement:"bottom-end","virtual-ref":s.value,"show-arrow":!1,"virtual-triggering":""},{default:q(()=>[(I(),me(nn(v(e).contextMenuContent),{actions:v(e).contextMenuProps.actions,"entity-id":v(e).contextMenuProps.entityId},null,8,["actions","entity-id"]))]),_:1},8,["visible","virtual-ref"])}}}),eV=ue({__name:"IvyDatePicker",props:{modelValue:{default:null},disabled:{type:Boolean},clearable:{type:Boolean},weekStart:{default:1},prefixIcon:{default:"calendar-mark"},prefixIconColor:{default:"var(--map-base-danube-symbol-2)"},prefixIconColorWhenActive:{default:void 0},clearIconType:{default:"outline"},type:{default:"date"},popperBackground:{default:"level-2-foreground"},rangeSeparator:{default:"-"},loading:{type:Boolean},cellClassName:{type:Function,default:void 0},shortcuts:{default:void 0}},emits:["update:modelValue","change"],setup(n,{emit:e}){Q9(c=>({"77a87ed0":l.value}));const t=n,r=[{text:"Today",value:new Date},{text:"Yesterday",value:()=>{const c=new Date;return c.setTime(c.getTime()-3600*1e3*24),c}},{text:"Last week",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*7),[d,c]}},{text:"Last month",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*30),[d,c]}},{text:"Last 3 months",value:()=>{const c=new Date,d=new Date;return d.setTime(d.getTime()-3600*1e3*24*90),[d,c]}},{text:"This month",value:[new Date,new Date]},{text:"This year",value:()=>{const c=new Date;return[new Date(new Date().getFullYear(),0),c]}},{text:"Last 6 months",value:()=>{const c=new Date,d=new Date;return d.setMonth(d.getMonth()-6),[d,c]}}],o=e,s=N(),a=t.prefixIcon?vr({render(){return st(Jn,{name:t.prefixIcon,color:t.prefixIconColor})}}):null;tt.en.weekStart=t.weekStart!==void 0?t.weekStart:1;const i=O({get(){return t.modelValue},set(c){o("update:modelValue",c),Dt(()=>{const d=s.value.querySelector(".el-input__inner"),f=s.value.querySelectorAll(".el-range-input");d?d.blur():f.length&&f.forEach(h=>h.blur())})}}),l=O(()=>t.prefixIconColorWhenActive||t.prefixIconColor);return(c,d)=>{const f=XR,h=kA;return I(),z("div",{ref_key:"ivyDatePickerRef",ref:s,class:"ivyforms-date-picker"},[R(h,null,{default:q(()=>[R(f,xt({modelValue:i.value,"onUpdate:modelValue":d[0]||(d[0]=m=>i.value=m),class:["ivyforms-input ivyforms-input__size__default",{"has-value":Array.isArray(i.value)?i.value.length>0:i.value,"is-clearable":t.clearable}]},{...c.$props,...c.$attrs},{"popper-class":`ivyforms-date-picker-popper ${t.type==="daterange"?"ivyforms-date-range-popper":""} ${t.popperBackground}`,"popper-options":{placement:"bottom-start"},"prefix-icon":v(a),"range-separator":t.rangeSeparator,shortcuts:t.shortcuts?r:void 0,"cell-class-name":m=>{var S;const g=((S=t.cellClassName)==null?void 0:S.call(t,m))||"",y=t.loading?"is-loading":"";return[g,y].filter(Boolean).join(" ")},onChange:d[1]||(d[1]=()=>o("change",i.value))}),null,16,["modelValue","class","popper-class","prefix-icon","range-separator","shortcuts","cell-class-name"])]),_:1})],512)}}});var Ca=(n=>(n.Rename="Rename",n.ShowAll="ShowAll",n.MoveToFolder="MoveToFolder",n.MoveUp="MoveUp",n.Export="Export",n.Entries="Entries",n.Download="Download",n.MarkAsSpam="MarkAsSpam",n.ResendNotification="ResendNotification",n.Save="Save",n.Placeholder="Placeholder",n.AddSubfolder="AddSubfolder",n.Print="Print",n.Folder="Folder",n.MoveDown="MoveDown",n.Import="Import",n.Preview="Preview",n.AddStar="AddStar",n.MarkAsRead="MarkAsRead",n.Trash="Trash",n.SaveAsDraft="SaveAsDraft",n.Cancel="Cancel",n.Edit="Edit",n.SortBy="SortBy",n.Duplicate="Duplicate",n.Translate="Translate",n.Settings="Settings",n.Locate="Locate",n.RemoveStar="RemoveStar",n.MarkAsUnread="MarkAsUnread",n.Restore="Restore",n.Page="Page",n.Delete="Delete",n.Starred="Starred",n.Unstarred="Unstarred",n.Published="Published",n.Unpublished="Unpublished",n.ResetFilters="Reset Filters",n))(Ca||{});const Ja=(n,e={})=>{const{getLabel:t}=rn();return{...{Edit:{label:t("edit"),icon:"edit",handler:()=>alert("Edit clicked")},Delete:{label:t("delete"),icon:"trash",danger:!0,handler:()=>alert("Delete clicked")},MoveToFolder:{label:t("move_to_folder"),icon:"move-to",showArrow:!0,handler:()=>{alert("Move to folder clicked")}},Folder:{label:"",icon:"folder",handler:o=>{const s=String(o);alert(`${t("move_up")} ${s}`)}},Duplicate:{label:t("duplicate"),icon:"copy",handler:()=>alert("Duplicate clicked")},MoveUp:{label:t("move_up"),icon:"arrow-up",iconCategory:"arrows",handler:()=>alert("Move up clicked")},MoveDown:{label:t("move_down"),icon:"arrow-down",iconCategory:"arrows",handler:()=>alert("Move down clicked")},Save:{label:t("save"),icon:"cloud-save",handler:()=>alert("Save clicked")},SaveAsDraft:{label:t("save_as_draft"),icon:"archive-check",handler:()=>alert("Save as draft clicked")},Cancel:{label:t("cancel"),icon:"close-circle",danger:!0,handler:()=>alert("Cancel clicked")},Print:{label:t("print"),icon:"print",handler:()=>alert("Print clicked")},Export:{label:t("export"),icon:"export",handler:()=>alert("Export clicked")},Import:{label:t("import"),icon:"import",handler:()=>alert("Import clicked")},Download:{label:t("download"),icon:"cloud-download",handler:()=>alert("Download clicked")},MarkAsSpam:{label:t("mark_as_spam"),icon:"spam",handler:()=>alert("Mark as spam clicked")},MarkAsRead:{label:t("mark_as_read"),icon:"read",handler:()=>alert("Mark as read clicked")},MarkAsUnread:{label:t("mark_as_unread"),icon:"unread",handler:()=>alert("Mark as unread clicked")},AddStar:{label:t("add_star"),icon:"star",iconType:"fill",handler:()=>alert("Add star clicked")},RemoveStar:{label:t("remove_star"),icon:"star",handler:()=>alert("Remove star clicked")},Locate:{label:t("locate"),icon:"send-locate",handler:()=>alert("Locate clicked")},Settings:{label:t("settings"),icon:"settings",handler:()=>alert("Settings clicked")},SortBy:{label:t("sort_by"),icon:"sort",handler:()=>alert("Sort by clicked")},Translate:{label:t("translate"),icon:"globe",handler:()=>alert("Translate clicked")},Preview:{label:t("preview"),icon:"preview",handler:()=>alert("Preview clicked")},AddSubfolder:{label:t("add_subfolder"),icon:"plus",handler:()=>alert("Add subfolder clicked")},Trash:{label:t("trash"),icon:"archive",handler:()=>alert("Trash clicked")},Restore:{label:t("restore"),icon:"restore",handler:()=>alert("Restore clicked")},ShowAll:{label:t("show_all"),icon:"checklist",handler:()=>alert("Show all clicked")},Entries:{label:t("entries"),icon:"login",iconCategory:"arrows",handler:()=>alert("Entries clicked"),isComingSoon:!0},Page:{label:"",handler:()=>alert("Page clicked")},Placeholder:{label:"[placeholder name]",handler:()=>alert("Placeholder clicked")},Rename:{label:t("rename"),icon:"edit-field",handler:()=>alert("Rename clicked")},ResendNotification:{label:t("resend_notification"),icon:"resend",handler:()=>alert("Resend notification clicked")},Starred:{label:t("starred"),icon:"star",iconCategory:"global",iconType:"fill",iconSize:"s",handler:()=>alert("Starred clicked")},Unstarred:{label:t("unstarred"),icon:"star",iconCategory:"global",iconType:"outline",iconSize:"s",handler:()=>alert("Unstarred clicked")},Unpublished:{label:t("unpublished"),icon:"toggle-off",iconCategory:"table",handler:()=>alert("Unpublished clicked")},Published:{label:t("published"),icon:"toggle-on",iconCategory:"table",handler:()=>alert("Published clicked")},"Reset Filters":{label:"Reset filters",handler:()=>alert("Reset clicked")}}[n],...e}},tV={class:"all-forms ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-p-4 ivyforms-gap-24"},nV={class:"ivyforms-all-forms-option-bar"},rV={class:"ivyforms-all-forms-option-bar__left"},oV={class:"ivyforms-all-forms-option-bar__right"},aV={class:"ivyforms-all-forms-table"},sV={key:0,class:"ivyforms-table-skeleton"},iV=ue({__name:"AllForms",setup(n){const{getLabel:e}=rn(),t=dp(),r=_5(),o=N(),s=N(null),a=N(null),i=N(!1),l=N([]),c=N([]),d=N(0),f=N(null),h=N(!1),m=N(!0),g=N(!1),y=N(!1),S=N({}),w=N(null),x=N(""),T=N(""),k=O2.debounce(F=>{T.value=F},500),C=Hn({starred:null,published:null}),M=Hn({page:1,perPage:10}),A=Hn({column:"id",order:"desc"}),V=()=>st(Xo,{modelValue:X.value,size:"s",type:"checkmark","onUpdate:modelValue":F=>_e(F)},()=>[]),P=({rowData:F})=>F?st(Xo,{modelValue:F.selected,type:"checkmark",size:"s","onUpdate:modelValue":re=>F.selected=re},()=>[]):null,L=({rowData:F})=>F?st(_2,{size:"s",href:`/wp-admin/admin.php?page=ivyforms-builder#/manage/${F.id}`},()=>[F.id]):null,K=({rowData:F})=>F?st(_2,{size:"s",href:`/wp-admin/admin.php?page=ivyforms-builder#/manage/${F.id}`},()=>[F.name]):null,J=({rowData:F})=>F?st(Jn,{name:F.starred?"star-2":"star",type:"fill",size:"d",color:F.starred?"var(--map-accent-amber-symbol-0)":"var(--map-base-dusk-symbol--1)",style:"cursor: pointer;",onClick:async()=>{F.starred=!F.starred,await t.updateStarred(F.id,F.starred)}}):null,G=({rowData:F})=>F?st(fp,{modelValue:F.published,size:"s","onUpdate:modelValue":async re=>{F.published=re,await t.updateStatus(F.id,F.published)}}):null,ne=({rowData:F})=>{if(!F)return null;const re=`[ivyforms id=${F.id}]`;return st("div",[st(Qt,{iconOnly:!0,iconStart:"copy",size:"xs",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:le(re)}),st("span",re)])},W=({rowData:F})=>F?st("div",{class:["ivyforms-column-actions",{hovered:F.id===w.value}]},[st(Qt,{iconOnly:!0,iconStart:"edit",size:"xs",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:Ze(F.id)}),st(Qt,{iconOnly:!0,iconStart:"copy",size:"xs",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:ze(F.id)}),st(Qt,{iconOnly:!0,iconStart:"preview",size:"xs",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:Pe(F.id)}),st(Qt,{iconOnly:!0,iconStart:"context-menu-dot",size:"xs",type:"ghost",priority:"tertiary",iconStartType:"outline",ref:re=>{S.value[F.id]=re&&"$el"in re&&re.$el instanceof HTMLElement?re.$el:null},onClick:()=>He(F.id)})]):null,D=N([{key:"select",class:"ivyforms-sticky-left",width:56,minWidth:56,headerRenderer:V,cellRenderer:P,visible:!0,showInModal:!1},{key:"star",width:32,minWidth:32,title:e("starred"),headerRenderer:()=>st(Jn,{name:"star",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)"}),cellRenderer:J,visible:!0,showInModal:!0},{key:"id",title:e("id"),width:40,minWidth:40,cellRenderer:L,visible:!0,showInModal:!0,sortable:!0},{key:"name",title:e("form_name"),width:204,minWidth:204,sortable:!0,cellRenderer:K,visible:!0,showInModal:!0},{key:"published",title:e("status"),width:48,minWidth:48,cellRenderer:G,visible:!0,showInModal:!0},{key:"entries",title:e("entries"),width:54,minWidth:54,cellRenderer:()=>st("span","999999"),visible:!0,showInModal:!0,comingSoon:!0},{key:"shortcode",title:e("shortcode"),width:160,minWidth:160,cellRenderer:ne,visible:!0,showInModal:!0},{key:"date-created",title:e("date_created"),width:105,minWidth:105,cellRenderer:({rowData:F})=>{const re=typeof F.dateCreated=="string"||typeof F.dateCreated=="number"?new Date(F.dateCreated):null,ge=new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"short",year:"numeric"}).format(re);return st("span",ge)},visible:!0,showInModal:!0},{key:"date-edited",title:e("date_edited"),width:105,minWidth:105,cellRenderer:({rowData:F})=>{const re=typeof F.dateEdited=="string"||typeof F.dateEdited=="number"?new Date(F.dateEdited):null,ge=new Intl.DateTimeFormat("en-GB",{day:"2-digit",month:"short",year:"numeric"}).format(re);return st("span",ge)},visible:!0,showInModal:!0},{key:"author",title:e("author"),width:204,minWidth:204,cellRenderer:({rowData:F})=>st("span",F.author),visible:!0,sortable:!0,showInModal:!0},{key:"actions",headerRenderer:()=>st(Jn,{name:"eye-opened",type:"outline",size:"d",color:"var(--map-base-dusk-symbol-2)",onClick:Fe,style:"cursor: pointer;"}),class:"ivyforms-cell-actions, ivyforms-sticky-right",width:158,minWidth:158,cellRenderer:W,visible:!0,showInModal:!1}]),U=O(()=>{var Y,Ie;const F=D.value.filter(Re=>Re.visible),re=F.filter(Re=>Re.showInModal),ge=((Ie=(Y=o.value)==null?void 0:Y.$el)==null?void 0:Ie.offsetWidth)||0,oe=F.reduce((Re,Ne)=>Re+(typeof Ne.width=="number"?Ne.width:0),0),be=ge-oe>0?ge/re.length:null;return F.map(Re=>Re.showInModal&&be?{...Re,width:be}:Re)}),te=O(()=>D.value.reduce((F,re)=>F+(typeof re.minWidth=="number"?re.minWidth:parseFloat(re.minWidth)||0),0)),j=O(()=>c.value.some(F=>F.selected)),ee=O(()=>c.value.filter(F=>F.selected).map(F=>F.id)),X=O(()=>c.value.length>0&&c.value.every(F=>F.selected)),ce=O({get(){return l.value.every(F=>F.visible)},set(F){l.value.forEach(ge=>{ge.key!=="id"&&ge.showInModal&&(ge.visible=F)});const re=l.value.find(ge=>ge.key==="id");re&&(re.visible=!0)}}),ae=O(()=>l.value.filter(F=>F.visible).length),ye=F=>{var re;return ae.value===3&&((re=l.value.find(ge=>ge.key===F))==null?void 0:re.visible)},ke=O(()=>x.value.trim()!==""||f.value||C.starred!==null||C.published!==null),Be=()=>({page:M.page,perPage:M.perPage,search:T.value,sortBy:A.column,sortOrder:A.order,dateRange:Tu(f.value),filters:{starred:C.starred,published:C.published}}),le=F=>()=>{navigator.clipboard?navigator.clipboard.writeText(F).then(()=>{We({message:e("copied_shortcode"),type:"success"})}):We({message:e("clipboard_api_not_supported"),type:"error"})};Xe(x,k),Xe([()=>M.page,()=>M.perPage,()=>T.value,()=>C.starred,()=>C.published,()=>f.value],async()=>{m.value=!0,await t.fetchForms(Be()),c.value=t.tableData,m.value=!1}),Xe(f,()=>y.value=!!f.value),Xe(()=>t.paginationMeta,F=>{d.value=Tu(F).total||0},{immediate:!0}),Xe(()=>l.value.map(F=>F.visible),()=>{if(l.value.filter(re=>re.visible).length===0){const re=l.value.find(ge=>ge.key==="id");re&&(re.visible=!0)}});const xe=async()=>{m.value=!0;try{await t.fetchForms(Be()),c.value=t.tableData;const F=t.paginationMeta;M.page=F.page,M.perPage=F.perPage,d.value=F.total}finally{m.value=!1}},Me=({column:F,order:re})=>{A.column=F,A.order=re==="asc"?"asc":re==="desc"?"desc":"",M.page=1,xe()},De=()=>{window.location.href="/wp-admin/admin.php?page=ivyforms-builder#/"},Ze=F=>()=>{window.location.href=`/wp-admin/admin.php?page=ivyforms-builder#/manage/${F}`},lt=F=>()=>{window.location.href=`/wp-admin/admin.php?page=ivyforms-builder#/settings/general/manage/${F}`},ze=F=>async()=>{try{await t.duplicateForm(F),await xe(),We({message:e("duplicated_successfully"),type:"success"})}catch{We({message:e("duplicated_failed"),type:"error"})}},Pe=F=>()=>{window.open(`/?ivyforms_preview=${F}&_wpNonce=${wpIvyApiSettings.nonce}`,"_blank")},nt=()=>{c.value.forEach(F=>{F.selected=!1})},Ot=async()=>{await xe(),nt()},_e=F=>{c.value.forEach(re=>re.selected=F)},He=O2.debounce(F=>{const re=S.value[F];if(!re){We({message:e("menu_button_element_not_found"),type:"error"});return}w.value=F,r.openContextMenu({actions:[Ja(Ca.Entries,{handler:()=>{},isComingSoon:!0}),Ja(Ca.Settings,{handler:lt(F)}),Ja(Ca.Delete,{handler:async()=>{await t.deleteForms([F]),await xe()}})],contextMenuButtonRef:re,onClose:()=>{document.querySelectorAll(".el-table-v2__row.hovered").forEach(oe=>oe.classList.remove("hovered")),w.value=null}})},300),Fe=()=>{l.value=D.value.map(F=>({key:F.key,visible:F.visible,showInModal:F.showInModal??!0,title:F.title})),i.value=!0},Ye=()=>{l.value.forEach(ge=>{const oe=D.value.find(ie=>ie.key===ge.key);oe&&(oe.visible=ge.visible)}),D.value=[...D.value];const F=D.value.filter(ge=>ge.visible&&ge.showInModal),re=F.length>0?`${100/F.length}%`:"auto";D.value.forEach(ge=>{ge.showInModal&&(ge.width=ge.visible?re:null)}),i.value=!1},qe=()=>{h.value=!0,Dt(()=>{dt();const F=document.querySelector(".el-date-editor");F==null||F.click()})},dt=()=>{Dt(()=>{const F=s.value&&"$el"in s.value?s.value.$el:s.value,re=a.value&&"$el"in a.value?a.value.$el:a.value;if(F instanceof HTMLElement&&re instanceof HTMLElement){const ge=F.getBoundingClientRect();re.style.position="absolute",re.style.top=`${ge.bottom+8}px`,re.style.left=`${ge.left}px`,re.style.inset="unset"}})},vt=()=>{h.value=!1},bt=()=>{f.value=null,y.value=!1,h.value=!1},kt=(F,re=500)=>()=>{F(),setTimeout(()=>{r.closeContextMenu()},re)},Lt=(F,re)=>{C.starred=F==="starred"?re:null,C.published=F==="published"?re:null,g.value=re!==null},Yt=()=>{if(r.isOpen){r.closeContextMenu();return}r.openContextMenu({actions:[Ja(Ca.Published,{handler:kt(()=>Lt("published",!0)),isActive:()=>C.published===!0,secondary:!0}),Ja(Ca.Unpublished,{handler:kt(()=>Lt("published",!1)),isActive:()=>C.published===!1,secondary:!0}),Ja(Ca.Starred,{handler:kt(()=>Lt("starred",!0)),isActive:()=>C.starred===!0,secondary:!0}),Ja(Ca.Unstarred,{handler:kt(()=>Lt("starred",!1)),isActive:()=>C.starred===!1,secondary:!0}),Ja(Ca.ResetFilters,{handler:kt(()=>{Lt("starred",null),Lt("published",null)}),secondary:!0})],contextMenuButtonRef:s.value})},Pt=()=>{C.starred=null,C.published=null,g.value=!1},pe=()=>{C.starred=null,C.published=null,f.value=null,x.value="",M.page=1,g.value=!1,y.value=!1};return ln(()=>{xe()}),(F,re)=>{const ge=D1,oe=zF,ie=VF,be=O5,Y=I5,Ie=cp,Re=$1,Ne=M5,ot=T5;return I(),z("div",tV,[Q("div",nV,[Q("div",rV,[R(ge,{modelValue:x.value,"onUpdate:modelValue":re[0]||(re[0]=at=>x.value=at),class:"ivyforms-search__fixed-width",placeholder:v(e)("search")},null,8,["modelValue","placeholder"]),R(oe,{ref_key:"menuButtonRef",ref:s,color:"tertiary",type:"datepicker",indicator:y.value,"custom-hide-indicator":bt,onClick:qe},null,8,["indicator"]),R(oe,{color:"tertiary",type:"filter",indicator:g.value,"custom-hide-indicator":Pt,onClick:Yt},null,8,["indicator"]),h.value?(I(),me(eV,{key:0,ref_key:"datePickerPopperRef",ref:a,modelValue:f.value,"onUpdate:modelValue":re[1]||(re[1]=at=>f.value=at),type:"daterange",clearable:"",onClose:vt},null,8,["modelValue"])):fe("",!0),R(QF)]),Q("div",oV,[R(Qt,{"icon-start":"plus",onClick:De},{default:q(()=>[ht(Ee(v(e)("form")),1)]),_:1})])]),Q("div",aV,[R(Ne,{ref_key:"tableRef",ref:o,data:m.value?[]:c.value,loading:m.value,total:d.value,"row-key":"id",columns:U.value,"min-table-width":te.value,"is-custom-header":j.value,sort:A,onSortChange:Me},{header:q(()=>[R(ie,{"selected-ids":ee.value,onUnselectAll:nt,onReload:Ot},null,8,["selected-ids"])]),empty:q(()=>[m.value?(I(),z("div",sV,[R(Y,null,{template:q(()=>[(I(!0),z(it,null,Ht(M.perPage,at=>(I(),me(be,{key:at,class:"ivyforms-skeleton-row"}))),128))]),_:1})])):fe("",!0),ke.value?(I(),me(Ie,{key:2,image:"filters",title:v(e)("empty_state_all_forms_title"),subtitle:v(e)("empty_state_all_forms_subtitle")},{actionButton:q(()=>[R(Qt,{onClick:pe},{default:q(()=>re[7]||(re[7]=[ht("Reset Filters")])),_:1})]),_:1},8,["title","subtitle"])):(I(),me(Ie,{key:1,image:"not-found",title:v(e)("empty_state_all_forms_title"),subtitle:v(e)("empty_state_all_forms_subtitle")},{actionButton:q(()=>[R(Qt,{"icon-start":"plus",onClick:De},{default:q(()=>[ht(Ee(v(e)("form")),1)]),_:1})]),_:1},8,["title","subtitle"]))]),pagination:q(()=>[R(Re,{"current-page":M.page,"onUpdate:currentPage":re[2]||(re[2]=at=>M.page=at),"page-size":M.perPage,"onUpdate:pageSize":re[3]||(re[3]=at=>M.perPage=at),class:"ivyforms-pt-24",total:d.value,"hide-on-single-page":""},null,8,["current-page","page-size","total"])]),_:1},8,["data","loading","total","columns","min-table-width","is-custom-header","sort"]),R(ot,{modelValue:i.value,"onUpdate:modelValue":re[6]||(re[6]=at=>i.value=at),title:v(e)("edit_table"),subtitle:v(e)("edit_columns"),"show-close":"","align-center":""},{footer:q(()=>[R(Qt,{priority:"tertiary",size:"d",type:"fill",onClick:re[5]||(re[5]=at=>i.value=!1)},{default:q(()=>[ht(Ee(v(e)("cancel")),1)]),_:1}),R(Qt,{priority:"success",size:"d",type:"fill",onClick:Ye},{default:q(()=>[ht(Ee(v(e)("save")),1)]),_:1})]),default:q(()=>[R(Xo,{modelValue:ce.value,"onUpdate:modelValue":re[4]||(re[4]=at=>ce.value=at),priority:"secondary",size:"s",type:"checkmark",style:{"border-bottom":"1px solid var(--map-divider)"}},{default:q(()=>[ve(F.$slots,"default",{},()=>[ht(Ee(v(e)("show_all_forms")),1)])]),_:3},8,["modelValue"]),(I(!0),z(it,null,Ht(l.value,at=>(I(),z("div",{key:at.key},[at.showInModal?(I(),me(Xo,{key:0,modelValue:at.visible,"onUpdate:modelValue":Et=>at.visible=Et,disabled:ye(at.key),priority:"secondary",size:"s",type:"checkmark"},{default:q(()=>[ht(Ee(at.title),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])):fe("",!0)]))),128))]),_:3},8,["modelValue","title","subtitle"])])])}}}),lV={};function uV(n,e){const t=iV,r=P1;return I(),me(r,{"has-table":""},{default:q(()=>[R(t)]),_:1})}const cV=sn(lV,[["render",uV]]),dV={},fV={class:"ivyforms-menu-wrapper"};function pV(n,e){const t=o$;return I(),z("div",fV,[R(t,xt({class:"ivyforms-menu"},{...n.$props,...n.$attrs}),{default:q(()=>[ve(n.$slots,"default")]),_:3},16)])}const pp=sn(dV,[["render",pV]]),hV={class:"ivyforms-header-button-wrapper"},hp=ue({__name:"IvyHeaderButton",props:{name:{default:""},label:{},priority:{default:"primary"},size:{default:"d"},type:{default:"filled"},disabled:{type:Boolean,default:!1},isActive:{type:Boolean,default:!1},iconStartConfig:{default:void 0},iconEndConfig:{default:void 0},comingSoon:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t={name:"page",size:"l",outerSize:"20px"},r=c=>c?{...t,...c}:void 0,o=n,s=O(()=>r(o.iconStartConfig)),a=O(()=>r(o.iconEndConfig)),i=e,l=()=>{o.disabled||i("click",o.name)};return(c,d)=>{const f=Jn,h=a$,m=gl;return I(),z("div",hV,[R(h,{index:c.name,class:H([`size-${c.size}`,"ivyforms-menu-item",`priority-${c.priority}`,`type-${c.type}`,{"is-active":c.isActive},{"has-coming-soon":c.comingSoon}]),disabled:c.disabled||c.comingSoon,onClick:l},{default:q(()=>{var g,y;return[(g=s.value)!=null&&g.name?(I(),me(f,qd(xt({key:0},s.value)),null,16)):fe("",!0),Q("span",null,Ee(c.label),1),(y=a.value)!=null&&y.name?(I(),me(f,qd(xt({key:1},a.value)),null,16)):fe("",!0)]}),_:1},8,["index","class","disabled"]),o.comingSoon?(I(),me(m,{key:0,class:"ivyforms-header-button-wrapper__coming-soon",size:"s"})):fe("",!0)])}}}),mV={class:"ivyforms-all-forms-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8"},vV=ue({__name:"FormsPage",setup(n){const{getLabel:e}=rn(),t=e("all_forms");mn("pageTitle",t);const r=ip(),o=O(()=>r.isFullScreenMode),s=N("all-forms"),a=[{label:e("all_forms"),index:"all-forms"},{label:e("entries"),index:"entries"},{label:e("integrations"),index:"integrations"}];return(i,l)=>{const c=sp,d=lp,f=cV;return I(),z(it,null,[R(d,null,{left:q(()=>[o.value?(I(),me(pp,{key:0,mode:"horizontal",ellipsis:!1},{default:q(()=>[(I(),z(it,null,Ht(a,h=>R(hp,{key:h.index,label:h.label,name:h.index,"is-active":s.value===h.index,type:"tonal","coming-soon":h.index==="entries"||h.index==="integrations"},null,8,["label","name","is-active","coming-soon"])),64))]),_:1})):fe("",!0)]),default:q(()=>[R(c)]),_:1}),Q("div",mV,[R(f)])],64)}}});var Dd={exports:{}};const gV=tS(eM);/**! |
| 51 |
* Sortable 1.14.0 |
| 52 |
* @author RubaXa <[email protected]> |
| 53 |
* @author owenm <[email protected]> |
| 54 |
* @license MIT |
| 55 |
*/function A2(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,r)}return t}function ea(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?A2(Object(t),!0).forEach(function(r){yV(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):A2(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Nd(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nd=function(e){return typeof e}:Nd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nd(n)}function yV(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ko(){return ko=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},ko.apply(this,arguments)}function bV(n,e){if(n==null)return{};var t={},r=Object.keys(n),o,s;for(s=0;s<r.length;s++)o=r[s],!(e.indexOf(o)>=0)&&(t[o]=n[o]);return t}function SV(n,e){if(n==null)return{};var t=bV(n,e),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(o=0;o<s.length;o++)r=s[o],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function wV(n){return CV(n)||xV(n)||kV(n)||EV()}function CV(n){if(Array.isArray(n))return Ov(n)}function xV(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function kV(n,e){if(n){if(typeof n=="string")return Ov(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);if(t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set")return Array.from(n);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ov(n,e)}}function Ov(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function EV(){throw new TypeError(`Invalid attempt to spread non-iterable instance. |
| 56 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var TV="1.14.0";function _a(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var Ba=_a(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Qu=_a(/Edge/i),R2=_a(/firefox/i),cu=_a(/safari/i)&&!_a(/chrome/i)&&!_a(/android/i),A5=_a(/iP(ad|od|hone)/i),MV=_a(/chrome/i)&&_a(/android/i),R5={capture:!1,passive:!1};function Jt(n,e,t){n.addEventListener(e,t,!Ba&&R5)}function jt(n,e,t){n.removeEventListener(e,t,!Ba&&R5)}function rf(n,e){if(e){if(e[0]===">"&&(e=e.substring(1)),n)try{if(n.matches)return n.matches(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e)}catch{return!1}return!1}}function IV(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function Lo(n,e,t,r){if(n){t=t||document;do{if(e!=null&&(e[0]===">"?n.parentNode===t&&rf(n,e):rf(n,e))||r&&n===t)return n;if(n===t)break}while(n=IV(n))}return null}var P2=/\s+/g;function Mn(n,e,t){if(n&&e)if(n.classList)n.classList[t?"add":"remove"](e);else{var r=(" "+n.className+" ").replace(P2," ").replace(" "+e+" "," ");n.className=(r+(t?" "+e:"")).replace(P2," ")}}function ct(n,e,t){var r=n&&n.style;if(r){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(t=n.currentStyle),e===void 0?t:t[e];!(e in r)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),r[e]=t+(typeof t=="string"?"":"px")}}function si(n,e){var t="";if(typeof n=="string")t=n;else do{var r=ct(n,"transform");r&&r!=="none"&&(t=r+" "+t)}while(!e&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function P5(n,e,t){if(n){var r=n.getElementsByTagName(e),o=0,s=r.length;if(t)for(;o<s;o++)t(r[o],o);return r}return[]}function Qo(){var n=document.scrollingElement;return n||document.documentElement}function xn(n,e,t,r,o){if(!(!n.getBoundingClientRect&&n!==window)){var s,a,i,l,c,d,f;if(n!==window&&n.parentNode&&n!==Qo()?(s=n.getBoundingClientRect(),a=s.top,i=s.left,l=s.bottom,c=s.right,d=s.height,f=s.width):(a=0,i=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(e||t)&&n!==window&&(o=o||n.parentNode,!Ba))do if(o&&o.getBoundingClientRect&&(ct(o,"transform")!=="none"||t&&ct(o,"position")!=="static")){var h=o.getBoundingClientRect();a-=h.top+parseInt(ct(o,"border-top-width")),i-=h.left+parseInt(ct(o,"border-left-width")),l=a+s.height,c=i+s.width;break}while(o=o.parentNode);if(r&&n!==window){var m=si(o||n),g=m&&m.a,y=m&&m.d;m&&(a/=y,i/=g,f/=g,d/=y,l=a+d,c=i+f)}return{top:a,left:i,bottom:l,right:c,width:f,height:d}}}function $2(n,e,t){for(var r=fs(n,!0),o=xn(n)[e];r;){var s=xn(r)[t],a=void 0;if(a=o>=s,!a)return r;if(r===Qo())break;r=fs(r,!1)}return!1}function ll(n,e,t,r){for(var o=0,s=0,a=n.children;s<a.length;){if(a[s].style.display!=="none"&&a[s]!==Tt.ghost&&(r||a[s]!==Tt.dragged)&&Lo(a[s],t.draggable,n,!1)){if(o===e)return a[s];o++}s++}return null}function N1(n,e){for(var t=n.lastElementChild;t&&(t===Tt.ghost||ct(t,"display")==="none"||e&&!rf(t,e));)t=t.previousElementSibling;return t||null}function Rn(n,e){var t=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Tt.clone&&(!e||rf(n,e))&&t++;return t}function D2(n){var e=0,t=0,r=Qo();if(n)do{var o=si(n),s=o.a,a=o.d;e+=n.scrollLeft*s,t+=n.scrollTop*a}while(n!==r&&(n=n.parentNode));return[e,t]}function OV(n,e){for(var t in n)if(n.hasOwnProperty(t)){for(var r in e)if(e.hasOwnProperty(r)&&e[r]===n[t][r])return Number(t)}return-1}function fs(n,e){if(!n||!n.getBoundingClientRect)return Qo();var t=n,r=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=ct(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return Qo();if(r||e)return t;r=!0}}while(t=t.parentNode);return Qo()}function _V(n,e){if(n&&e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}function bm(n,e){return Math.round(n.top)===Math.round(e.top)&&Math.round(n.left)===Math.round(e.left)&&Math.round(n.height)===Math.round(e.height)&&Math.round(n.width)===Math.round(e.width)}var du;function $5(n,e){return function(){if(!du){var t=arguments,r=this;t.length===1?n.call(r,t[0]):n.apply(r,t),du=setTimeout(function(){du=void 0},e)}}}function AV(){clearTimeout(du),du=void 0}function D5(n,e,t){n.scrollLeft+=e,n.scrollTop+=t}function L1(n){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(n).cloneNode(!0):t?t(n).clone(!0)[0]:n.cloneNode(!0)}function N2(n,e){ct(n,"position","absolute"),ct(n,"top",e.top),ct(n,"left",e.left),ct(n,"width",e.width),ct(n,"height",e.height)}function Sm(n){ct(n,"position",""),ct(n,"top",""),ct(n,"left",""),ct(n,"width",""),ct(n,"height","")}var yr="Sortable"+new Date().getTime();function RV(){var n=[],e;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(o){if(!(ct(o,"display")==="none"||o===Tt.ghost)){n.push({target:o,rect:xn(o)});var s=ea({},n[n.length-1].rect);if(o.thisAnimationDuration){var a=si(o,!0);a&&(s.top-=a.f,s.left-=a.e)}o.fromRect=s}})}},addAnimationState:function(r){n.push(r)},removeAnimationState:function(r){n.splice(OV(n,{target:r}),1)},animateAll:function(r){var o=this;if(!this.options.animation){clearTimeout(e),typeof r=="function"&&r();return}var s=!1,a=0;n.forEach(function(i){var l=0,c=i.target,d=c.fromRect,f=xn(c),h=c.prevFromRect,m=c.prevToRect,g=i.rect,y=si(c,!0);y&&(f.top-=y.f,f.left-=y.e),c.toRect=f,c.thisAnimationDuration&&bm(h,f)&&!bm(d,f)&&(g.top-f.top)/(g.left-f.left)===(d.top-f.top)/(d.left-f.left)&&(l=$V(g,h,m,o.options)),bm(f,d)||(c.prevFromRect=d,c.prevToRect=f,l||(l=o.options.animation),o.animate(c,g,f,l)),l&&(s=!0,a=Math.max(a,l),clearTimeout(c.animationResetTimer),c.animationResetTimer=setTimeout(function(){c.animationTime=0,c.prevFromRect=null,c.fromRect=null,c.prevToRect=null,c.thisAnimationDuration=null},l),c.thisAnimationDuration=l)}),clearTimeout(e),s?e=setTimeout(function(){typeof r=="function"&&r()},a):typeof r=="function"&&r(),n=[]},animate:function(r,o,s,a){if(a){ct(r,"transition",""),ct(r,"transform","");var i=si(this.el),l=i&&i.a,c=i&&i.d,d=(o.left-s.left)/(l||1),f=(o.top-s.top)/(c||1);r.animatingX=!!d,r.animatingY=!!f,ct(r,"transform","translate3d("+d+"px,"+f+"px,0)"),this.forRepaintDummy=PV(r),ct(r,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),ct(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){ct(r,"transition",""),ct(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},a)}}}}function PV(n){return n.offsetWidth}function $V(n,e,t,r){return Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*r.animation}var Fi=[],wm={initializeByDefault:!0},ec={mount:function(e){for(var t in wm)wm.hasOwnProperty(t)&&!(t in e)&&(e[t]=wm[t]);Fi.forEach(function(r){if(r.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Fi.push(e)},pluginEvent:function(e,t,r){var o=this;this.eventCanceled=!1,r.cancel=function(){o.eventCanceled=!0};var s=e+"Global";Fi.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][s]&&t[a.pluginName][s](ea({sortable:t},r)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](ea({sortable:t},r)))})},initializePlugins:function(e,t,r,o){Fi.forEach(function(i){var l=i.pluginName;if(!(!e.options[l]&&!i.initializeByDefault)){var c=new i(e,t,e.options);c.sortable=e,c.options=e.options,e[l]=c,ko(r,c.defaults)}});for(var s in e.options)if(e.options.hasOwnProperty(s)){var a=this.modifyOption(e,s,e.options[s]);typeof a<"u"&&(e.options[s]=a)}},getEventProperties:function(e,t){var r={};return Fi.forEach(function(o){typeof o.eventProperties=="function"&&ko(r,o.eventProperties.call(t[o.pluginName],e))}),r},modifyOption:function(e,t,r){var o;return Fi.forEach(function(s){e[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[t]=="function"&&(o=s.optionListeners[t].call(e[s.pluginName],r))}),o}};function Zl(n){var e=n.sortable,t=n.rootEl,r=n.name,o=n.targetEl,s=n.cloneEl,a=n.toEl,i=n.fromEl,l=n.oldIndex,c=n.newIndex,d=n.oldDraggableIndex,f=n.newDraggableIndex,h=n.originalEvent,m=n.putSortable,g=n.extraEventProperties;if(e=e||t&&t[yr],!!e){var y,S=e.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Ba&&!Qu?y=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(r,!0,!0)),y.to=a||t,y.from=i||t,y.item=o||t,y.clone=s,y.oldIndex=l,y.newIndex=c,y.oldDraggableIndex=d,y.newDraggableIndex=f,y.originalEvent=h,y.pullMode=m?m.lastPutMode:void 0;var x=ea(ea({},g),ec.getEventProperties(r,e));for(var T in x)y[T]=x[T];t&&t.dispatchEvent(y),S[w]&&S[w].call(e,y)}}var DV=["evt"],Dr=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.evt,s=SV(r,DV);ec.pluginEvent.bind(Tt)(e,t,ea({dragEl:Ue,parentEl:_n,ghostEl:Nt,rootEl:Cn,nextEl:Gs,lastDownEl:Ld,cloneEl:An,cloneHidden:ss,dragStarted:Ql,putSortable:sr,activeSortable:Tt.active,originalEvent:o,oldIndex:Zi,oldDraggableIndex:fu,newIndex:Jr,newDraggableIndex:ts,hideGhostForTarget:F5,unhideGhostForTarget:V5,cloneNowHidden:function(){ss=!0},cloneNowShown:function(){ss=!1},dispatchSortableEvent:function(i){Mr({sortable:t,name:i,originalEvent:o})}},s))};function Mr(n){Zl(ea({putSortable:sr,cloneEl:An,targetEl:Ue,rootEl:Cn,oldIndex:Zi,oldDraggableIndex:fu,newIndex:Jr,newDraggableIndex:ts},n))}var Ue,_n,Nt,Cn,Gs,Ld,An,ss,Zi,Jr,fu,ts,rd,sr,Ki=!1,of=!1,af=[],Us,Ro,Cm,xm,L2,B2,Ql,Vi,pu,hu=!1,od=!1,Bd,pr,km=[],_v=!1,sf=[],mp=typeof document<"u",ad=A5,F2=Qu||Ba?"cssFloat":"float",NV=mp&&!MV&&!A5&&"draggable"in document.createElement("div"),N5=function(){if(mp){if(Ba)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),L5=function(e,t){var r=ct(e),o=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),s=ll(e,0,t),a=ll(e,1,t),i=s&&ct(s),l=a&&ct(a),c=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+xn(s).width,d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+xn(a).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&i.float&&i.float!=="none"){var f=i.float==="left"?"left":"right";return a&&(l.clear==="both"||l.clear===f)?"vertical":"horizontal"}return s&&(i.display==="block"||i.display==="flex"||i.display==="table"||i.display==="grid"||c>=o&&r[F2]==="none"||a&&r[F2]==="none"&&c+d>o)?"vertical":"horizontal"},LV=function(e,t,r){var o=r?e.left:e.top,s=r?e.right:e.bottom,a=r?e.width:e.height,i=r?t.left:t.top,l=r?t.right:t.bottom,c=r?t.width:t.height;return o===i||s===l||o+a/2===i+c/2},BV=function(e,t){var r;return af.some(function(o){var s=o[yr].options.emptyInsertThreshold;if(!(!s||N1(o))){var a=xn(o),i=e>=a.left-s&&e<=a.right+s,l=t>=a.top-s&&t<=a.bottom+s;if(i&&l)return r=o}}),r},B5=function(e){function t(s,a){return function(i,l,c,d){var f=i.options.group.name&&l.options.group.name&&i.options.group.name===l.options.group.name;if(s==null&&(a||f))return!0;if(s==null||s===!1)return!1;if(a&&s==="clone")return s;if(typeof s=="function")return t(s(i,l,c,d),a)(i,l,c,d);var h=(a?i:l).options.group.name;return s===!0||typeof s=="string"&&s===h||s.join&&s.indexOf(h)>-1}}var r={},o=e.group;(!o||Nd(o)!="object")&&(o={name:o}),r.name=o.name,r.checkPull=t(o.pull,!0),r.checkPut=t(o.put),r.revertClone=o.revertClone,e.group=r},F5=function(){!N5&&Nt&&ct(Nt,"display","none")},V5=function(){!N5&&Nt&&ct(Nt,"display","")};mp&&document.addEventListener("click",function(n){if(of)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),of=!1,!1},!0);var js=function(e){if(Ue){e=e.touches?e.touches[0]:e;var t=BV(e.clientX,e.clientY);if(t){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[yr]._onDragOver(r)}}},FV=function(e){Ue&&Ue.parentNode[yr]._isOutsideThisEl(e.target)};function Tt(n,e){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=e=ko({},e),n[yr]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return L5(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,i){a.setData("Text",i.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:Tt.supportPointer!==!1&&"PointerEvent"in window&&!cu,emptyInsertThreshold:5};ec.initializePlugins(this,n,t);for(var r in t)!(r in e)&&(e[r]=t[r]);B5(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:NV,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Jt(n,"pointerdown",this._onTapStart):(Jt(n,"mousedown",this._onTapStart),Jt(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(Jt(n,"dragover",this),Jt(n,"dragenter",this)),af.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ko(this,RV())}Tt.prototype={constructor:Tt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Vi=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,Ue):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,r=this.el,o=this.options,s=o.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(i||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,d=o.filter;if(GV(r),!Ue&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&cu&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Lo(l,o.draggable,r,!1),!(l&&l.animated)&&Ld!==l)){if(Zi=Rn(l),fu=Rn(l,o.draggable),typeof d=="function"){if(d.call(this,e,l,this)){Mr({sortable:t,rootEl:c,name:"filter",targetEl:l,toEl:r,fromEl:r}),Dr("filter",t,{evt:e}),s&&e.cancelable&&e.preventDefault();return}}else if(d&&(d=d.split(",").some(function(f){if(f=Lo(c,f.trim(),r,!1),f)return Mr({sortable:t,rootEl:f,name:"filter",targetEl:l,fromEl:r,toEl:r}),Dr("filter",t,{evt:e}),!0}),d)){s&&e.cancelable&&e.preventDefault();return}o.handle&&!Lo(c,o.handle,r,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,r){var o=this,s=o.el,a=o.options,i=s.ownerDocument,l;if(r&&!Ue&&r.parentNode===s){var c=xn(r);if(Cn=s,Ue=r,_n=Ue.parentNode,Gs=Ue.nextSibling,Ld=r,rd=a.group,Tt.dragged=Ue,Us={target:Ue,clientX:(t||e).clientX,clientY:(t||e).clientY},L2=Us.clientX-c.left,B2=Us.clientY-c.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Ue.style["will-change"]="all",l=function(){if(Dr("delayEnded",o,{evt:e}),Tt.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!R2&&o.nativeDraggable&&(Ue.draggable=!0),o._triggerDragStart(e,t),Mr({sortable:o,name:"choose",originalEvent:e}),Mn(Ue,a.chosenClass,!0)},a.ignore.split(",").forEach(function(d){P5(Ue,d.trim(),Em)}),Jt(i,"dragover",js),Jt(i,"mousemove",js),Jt(i,"touchmove",js),Jt(i,"mouseup",o._onDrop),Jt(i,"touchend",o._onDrop),Jt(i,"touchcancel",o._onDrop),R2&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ue.draggable=!0),Dr("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Qu||Ba))){if(Tt.eventCanceled){this._onDrop();return}Jt(i,"mouseup",o._disableDelayedDrag),Jt(i,"touchend",o._disableDelayedDrag),Jt(i,"touchcancel",o._disableDelayedDrag),Jt(i,"mousemove",o._delayedDragTouchMoveHandler),Jt(i,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&Jt(i,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,a.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ue&&Em(Ue),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;jt(e,"mouseup",this._disableDelayedDrag),jt(e,"touchend",this._disableDelayedDrag),jt(e,"touchcancel",this._disableDelayedDrag),jt(e,"mousemove",this._delayedDragTouchMoveHandler),jt(e,"touchmove",this._delayedDragTouchMoveHandler),jt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Jt(document,"pointermove",this._onTouchMove):t?Jt(document,"touchmove",this._onTouchMove):Jt(document,"mousemove",this._onTouchMove):(Jt(Ue,"dragend",this),Jt(Cn,"dragstart",this._onDragStart));try{document.selection?Fd(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ki=!1,Cn&&Ue){Dr("dragStarted",this,{evt:t}),this.nativeDraggable&&Jt(document,"dragover",FV);var r=this.options;!e&&Mn(Ue,r.dragClass,!1),Mn(Ue,r.ghostClass,!0),Tt.active=this,e&&this._appendGhost(),Mr({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Ro){this._lastX=Ro.clientX,this._lastY=Ro.clientY,F5();for(var e=document.elementFromPoint(Ro.clientX,Ro.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ro.clientX,Ro.clientY),e!==t);)t=e;if(Ue.parentNode[yr]._isOutsideThisEl(e),t)do{if(t[yr]){var r=void 0;if(r=t[yr]._onDragOver({clientX:Ro.clientX,clientY:Ro.clientY,target:e,rootEl:t}),r&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);V5()}},_onTouchMove:function(e){if(Us){var t=this.options,r=t.fallbackTolerance,o=t.fallbackOffset,s=e.touches?e.touches[0]:e,a=Nt&&si(Nt,!0),i=Nt&&a&&a.a,l=Nt&&a&&a.d,c=ad&&pr&&D2(pr),d=(s.clientX-Us.clientX+o.x)/(i||1)+(c?c[0]-km[0]:0)/(i||1),f=(s.clientY-Us.clientY+o.y)/(l||1)+(c?c[1]-km[1]:0)/(l||1);if(!Tt.active&&!Ki){if(r&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<r)return;this._onDragStart(e,!0)}if(Nt){a?(a.e+=d-(Cm||0),a.f+=f-(xm||0)):a={a:1,b:0,c:0,d:1,e:d,f};var h="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");ct(Nt,"webkitTransform",h),ct(Nt,"mozTransform",h),ct(Nt,"msTransform",h),ct(Nt,"transform",h),Cm=d,xm=f,Ro=s}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Nt){var e=this.options.fallbackOnBody?document.body:Cn,t=xn(Ue,!0,ad,!0,e),r=this.options;if(ad){for(pr=e;ct(pr,"position")==="static"&&ct(pr,"transform")==="none"&&pr!==document;)pr=pr.parentNode;pr!==document.body&&pr!==document.documentElement?(pr===document&&(pr=Qo()),t.top+=pr.scrollTop,t.left+=pr.scrollLeft):pr=Qo(),km=D2(pr)}Nt=Ue.cloneNode(!0),Mn(Nt,r.ghostClass,!1),Mn(Nt,r.fallbackClass,!0),Mn(Nt,r.dragClass,!0),ct(Nt,"transition",""),ct(Nt,"transform",""),ct(Nt,"box-sizing","border-box"),ct(Nt,"margin",0),ct(Nt,"top",t.top),ct(Nt,"left",t.left),ct(Nt,"width",t.width),ct(Nt,"height",t.height),ct(Nt,"opacity","0.8"),ct(Nt,"position",ad?"absolute":"fixed"),ct(Nt,"zIndex","100000"),ct(Nt,"pointerEvents","none"),Tt.ghost=Nt,e.appendChild(Nt),ct(Nt,"transform-origin",L2/parseInt(Nt.style.width)*100+"% "+B2/parseInt(Nt.style.height)*100+"%")}},_onDragStart:function(e,t){var r=this,o=e.dataTransfer,s=r.options;if(Dr("dragStart",this,{evt:e}),Tt.eventCanceled){this._onDrop();return}Dr("setupClone",this),Tt.eventCanceled||(An=L1(Ue),An.draggable=!1,An.style["will-change"]="",this._hideClone(),Mn(An,this.options.chosenClass,!1),Tt.clone=An),r.cloneId=Fd(function(){Dr("clone",r),!Tt.eventCanceled&&(r.options.removeCloneOnHide||Cn.insertBefore(An,Ue),r._hideClone(),Mr({sortable:r,name:"clone"}))}),!t&&Mn(Ue,s.dragClass,!0),t?(of=!0,r._loopId=setInterval(r._emulateDragOver,50)):(jt(document,"mouseup",r._onDrop),jt(document,"touchend",r._onDrop),jt(document,"touchcancel",r._onDrop),o&&(o.effectAllowed="move",s.setData&&s.setData.call(r,o,Ue)),Jt(document,"drop",r),ct(Ue,"transform","translateZ(0)")),Ki=!0,r._dragStartId=Fd(r._dragStarted.bind(r,t,e)),Jt(document,"selectstart",r),Ql=!0,cu&&ct(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,r=e.target,o,s,a,i=this.options,l=i.group,c=Tt.active,d=rd===l,f=i.sort,h=sr||c,m,g=this,y=!1;if(_v)return;function S(te,j){Dr(te,g,ea({evt:e,isOwner:d,axis:m?"vertical":"horizontal",revert:a,dragRect:o,targetRect:s,canSort:f,fromSortable:h,target:r,completed:x,onMove:function(X,ce){return sd(Cn,t,Ue,o,X,xn(X),e,ce)},changed:T},j))}function w(){S("dragOverAnimationCapture"),g.captureAnimationState(),g!==h&&h.captureAnimationState()}function x(te){return S("dragOverCompleted",{insertion:te}),te&&(d?c._hideClone():c._showClone(g),g!==h&&(Mn(Ue,sr?sr.options.ghostClass:c.options.ghostClass,!1),Mn(Ue,i.ghostClass,!0)),sr!==g&&g!==Tt.active?sr=g:g===Tt.active&&sr&&(sr=null),h===g&&(g._ignoreWhileAnimating=r),g.animateAll(function(){S("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(r===Ue&&!Ue.animated||r===t&&!r.animated)&&(Vi=null),!i.dragoverBubble&&!e.rootEl&&r!==document&&(Ue.parentNode[yr]._isOutsideThisEl(e.target),!te&&js(e)),!i.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function T(){Jr=Rn(Ue),ts=Rn(Ue,i.draggable),Mr({sortable:g,name:"change",toEl:t,newIndex:Jr,newDraggableIndex:ts,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),r=Lo(r,i.draggable,t,!0),S("dragOver"),Tt.eventCanceled)return y;if(Ue.contains(e.target)||r.animated&&r.animatingX&&r.animatingY||g._ignoreWhileAnimating===r)return x(!1);if(of=!1,c&&!i.disabled&&(d?f||(a=_n!==Cn):sr===this||(this.lastPutMode=rd.checkPull(this,c,Ue,e))&&l.checkPut(this,c,Ue,e))){if(m=this._getDirection(e,r)==="vertical",o=xn(Ue),S("dragOverValid"),Tt.eventCanceled)return y;if(a)return _n=Cn,w(),this._hideClone(),S("revert"),Tt.eventCanceled||(Gs?Cn.insertBefore(Ue,Gs):Cn.appendChild(Ue)),x(!0);var k=N1(t,i.draggable);if(!k||WV(e,m,this)&&!k.animated){if(k===Ue)return x(!1);if(k&&t===e.target&&(r=k),r&&(s=xn(r)),sd(Cn,t,Ue,o,r,s,e,!!r)!==!1)return w(),t.appendChild(Ue),_n=t,T(),x(!0)}else if(k&&HV(e,m,this)){var C=ll(t,0,i,!0);if(C===Ue)return x(!1);if(r=C,s=xn(r),sd(Cn,t,Ue,o,r,s,e,!1)!==!1)return w(),t.insertBefore(Ue,C),_n=t,T(),x(!0)}else if(r.parentNode===t){s=xn(r);var M=0,A,V=Ue.parentNode!==t,P=!LV(Ue.animated&&Ue.toRect||o,r.animated&&r.toRect||s,m),L=m?"top":"left",K=$2(r,"top","top")||$2(Ue,"top","top"),J=K?K.scrollTop:void 0;Vi!==r&&(A=s[L],hu=!1,od=!P&&i.invertSwap||V),M=UV(e,r,s,m,P?1:i.swapThreshold,i.invertedSwapThreshold==null?i.swapThreshold:i.invertedSwapThreshold,od,Vi===r);var G;if(M!==0){var ne=Rn(Ue);do ne-=M,G=_n.children[ne];while(G&&(ct(G,"display")==="none"||G===Nt))}if(M===0||G===r)return x(!1);Vi=r,pu=M;var W=r.nextElementSibling,D=!1;D=M===1;var U=sd(Cn,t,Ue,o,r,s,e,D);if(U!==!1)return(U===1||U===-1)&&(D=U===1),_v=!0,setTimeout(zV,30),w(),D&&!W?t.appendChild(Ue):r.parentNode.insertBefore(Ue,D?W:r),K&&D5(K,0,J-K.scrollTop),_n=Ue.parentNode,A!==void 0&&!od&&(Bd=Math.abs(A-xn(r)[L])),T(),x(!0)}if(t.contains(Ue))return x(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){jt(document,"mousemove",this._onTouchMove),jt(document,"touchmove",this._onTouchMove),jt(document,"pointermove",this._onTouchMove),jt(document,"dragover",js),jt(document,"mousemove",js),jt(document,"touchmove",js)},_offUpEvents:function(){var e=this.el.ownerDocument;jt(e,"mouseup",this._onDrop),jt(e,"touchend",this._onDrop),jt(e,"pointerup",this._onDrop),jt(e,"touchcancel",this._onDrop),jt(document,"selectstart",this)},_onDrop:function(e){var t=this.el,r=this.options;if(Jr=Rn(Ue),ts=Rn(Ue,r.draggable),Dr("drop",this,{evt:e}),_n=Ue&&Ue.parentNode,Jr=Rn(Ue),ts=Rn(Ue,r.draggable),Tt.eventCanceled){this._nulling();return}Ki=!1,od=!1,hu=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Av(this.cloneId),Av(this._dragStartId),this.nativeDraggable&&(jt(document,"drop",this),jt(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),cu&&ct(document.body,"user-select",""),ct(Ue,"transform",""),e&&(Ql&&(e.cancelable&&e.preventDefault(),!r.dropBubble&&e.stopPropagation()),Nt&&Nt.parentNode&&Nt.parentNode.removeChild(Nt),(Cn===_n||sr&&sr.lastPutMode!=="clone")&&An&&An.parentNode&&An.parentNode.removeChild(An),Ue&&(this.nativeDraggable&&jt(Ue,"dragend",this),Em(Ue),Ue.style["will-change"]="",Ql&&!Ki&&Mn(Ue,sr?sr.options.ghostClass:this.options.ghostClass,!1),Mn(Ue,this.options.chosenClass,!1),Mr({sortable:this,name:"unchoose",toEl:_n,newIndex:null,newDraggableIndex:null,originalEvent:e}),Cn!==_n?(Jr>=0&&(Mr({rootEl:_n,name:"add",toEl:_n,fromEl:Cn,originalEvent:e}),Mr({sortable:this,name:"remove",toEl:_n,originalEvent:e}),Mr({rootEl:_n,name:"sort",toEl:_n,fromEl:Cn,originalEvent:e}),Mr({sortable:this,name:"sort",toEl:_n,originalEvent:e})),sr&&sr.save()):Jr!==Zi&&Jr>=0&&(Mr({sortable:this,name:"update",toEl:_n,originalEvent:e}),Mr({sortable:this,name:"sort",toEl:_n,originalEvent:e})),Tt.active&&((Jr==null||Jr===-1)&&(Jr=Zi,ts=fu),Mr({sortable:this,name:"end",toEl:_n,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Dr("nulling",this),Cn=Ue=_n=Nt=Gs=An=Ld=ss=Us=Ro=Ql=Jr=ts=Zi=fu=Vi=pu=sr=rd=Tt.dragged=Tt.ghost=Tt.clone=Tt.active=null,sf.forEach(function(e){e.checked=!0}),sf.length=Cm=xm=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Ue&&(this._onDragOver(e),VV(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,r=this.el.children,o=0,s=r.length,a=this.options;o<s;o++)t=r[o],Lo(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||KV(t));return e},sort:function(e,t){var r={},o=this.el;this.toArray().forEach(function(s,a){var i=o.children[a];Lo(i,this.options.draggable,o,!1)&&(r[s]=i)},this),t&&this.captureAnimationState(),e.forEach(function(s){r[s]&&(o.removeChild(r[s]),o.appendChild(r[s]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return Lo(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var r=this.options;if(t===void 0)return r[e];var o=ec.modifyOption(this,e,t);typeof o<"u"?r[e]=o:r[e]=t,e==="group"&&B5(r)},destroy:function(){Dr("destroy",this);var e=this.el;e[yr]=null,jt(e,"mousedown",this._onTapStart),jt(e,"touchstart",this._onTapStart),jt(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(jt(e,"dragover",this),jt(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),af.splice(af.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ss){if(Dr("hideClone",this),Tt.eventCanceled)return;ct(An,"display","none"),this.options.removeCloneOnHide&&An.parentNode&&An.parentNode.removeChild(An),ss=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(ss){if(Dr("showClone",this),Tt.eventCanceled)return;Ue.parentNode==Cn&&!this.options.group.revertClone?Cn.insertBefore(An,Ue):Gs?Cn.insertBefore(An,Gs):Cn.appendChild(An),this.options.group.revertClone&&this.animate(Ue,An),ct(An,"display",""),ss=!1}}};function VV(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function sd(n,e,t,r,o,s,a,i){var l,c=n[yr],d=c.options.onMove,f;return window.CustomEvent&&!Ba&&!Qu?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=e,l.from=n,l.dragged=t,l.draggedRect=r,l.related=o||e,l.relatedRect=s||xn(e),l.willInsertAfter=i,l.originalEvent=a,n.dispatchEvent(l),d&&(f=d.call(c,l,a)),f}function Em(n){n.draggable=!1}function zV(){_v=!1}function HV(n,e,t){var r=xn(ll(t.el,0,t.options,!0)),o=10;return e?n.clientX<r.left-o||n.clientY<r.top&&n.clientX<r.right:n.clientY<r.top-o||n.clientY<r.bottom&&n.clientX<r.left}function WV(n,e,t){var r=xn(N1(t.el,t.options.draggable)),o=10;return e?n.clientX>r.right+o||n.clientX<=r.right&&n.clientY>r.bottom&&n.clientX>=r.left:n.clientX>r.right&&n.clientY>r.top||n.clientX<=r.right&&n.clientY>r.bottom+o}function UV(n,e,t,r,o,s,a,i){var l=r?n.clientY:n.clientX,c=r?t.height:t.width,d=r?t.top:t.left,f=r?t.bottom:t.right,h=!1;if(!a){if(i&&Bd<c*o){if(!hu&&(pu===1?l>d+c*s/2:l<f-c*s/2)&&(hu=!0),hu)h=!0;else if(pu===1?l<d+Bd:l>f-Bd)return-pu}else if(l>d+c*(1-o)/2&&l<f-c*(1-o)/2)return jV(e)}return h=h||a,h&&(l<d+c*s/2||l>f-c*s/2)?l>d+c/2?1:-1:0}function jV(n){return Rn(Ue)<Rn(n)?1:-1}function KV(n){for(var e=n.tagName+n.className+n.src+n.href+n.textContent,t=e.length,r=0;t--;)r+=e.charCodeAt(t);return r.toString(36)}function GV(n){sf.length=0;for(var e=n.getElementsByTagName("input"),t=e.length;t--;){var r=e[t];r.checked&&sf.push(r)}}function Fd(n){return setTimeout(n,0)}function Av(n){return clearTimeout(n)}mp&&Jt(document,"touchmove",function(n){(Tt.active||Ki)&&n.cancelable&&n.preventDefault()});Tt.utils={on:Jt,off:jt,css:ct,find:P5,is:function(e,t){return!!Lo(e,t,e,!1)},extend:_V,throttle:$5,closest:Lo,toggleClass:Mn,clone:L1,index:Rn,nextTick:Fd,cancelNextTick:Av,detectDirection:L5,getChild:ll};Tt.get=function(n){return n[yr]};Tt.mount=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(Tt.utils=ea(ea({},Tt.utils),r.utils)),ec.mount(r)})};Tt.create=function(n,e){return new Tt(n,e)};Tt.version=TV;var Un=[],eu,Rv,Pv=!1,Tm,Mm,lf,tu;function YV(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return n.prototype={dragStarted:function(t){var r=t.originalEvent;this.sortable.nativeDraggable?Jt(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Jt(document,"pointermove",this._handleFallbackAutoScroll):r.touches?Jt(document,"touchmove",this._handleFallbackAutoScroll):Jt(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var r=t.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?jt(document,"dragover",this._handleAutoScroll):(jt(document,"pointermove",this._handleFallbackAutoScroll),jt(document,"touchmove",this._handleFallbackAutoScroll),jt(document,"mousemove",this._handleFallbackAutoScroll)),V2(),Vd(),AV()},nulling:function(){lf=Rv=eu=Pv=tu=Tm=Mm=null,Un.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,r){var o=this,s=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(s,a);if(lf=t,r||this.options.forceAutoScrollFallback||Qu||Ba||cu){Im(t,this.options,i,r);var l=fs(i,!0);Pv&&(!tu||s!==Tm||a!==Mm)&&(tu&&V2(),tu=setInterval(function(){var c=fs(document.elementFromPoint(s,a),!0);c!==l&&(l=c,Vd()),Im(t,o.options,c,r)},10),Tm=s,Mm=a)}else{if(!this.options.bubbleScroll||fs(i,!0)===Qo()){Vd();return}Im(t,this.options,fs(i,!1),!1)}}},ko(n,{pluginName:"scroll",initializeByDefault:!0})}function Vd(){Un.forEach(function(n){clearInterval(n.pid)}),Un=[]}function V2(){clearInterval(tu)}var Im=$5(function(n,e,t,r){if(e.scroll){var o=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,a=e.scrollSensitivity,i=e.scrollSpeed,l=Qo(),c=!1,d;Rv!==t&&(Rv=t,Vd(),eu=e.scroll,d=e.scrollFn,eu===!0&&(eu=fs(t,!0)));var f=0,h=eu;do{var m=h,g=xn(m),y=g.top,S=g.bottom,w=g.left,x=g.right,T=g.width,k=g.height,C=void 0,M=void 0,A=m.scrollWidth,V=m.scrollHeight,P=ct(m),L=m.scrollLeft,K=m.scrollTop;m===l?(C=T<A&&(P.overflowX==="auto"||P.overflowX==="scroll"||P.overflowX==="visible"),M=k<V&&(P.overflowY==="auto"||P.overflowY==="scroll"||P.overflowY==="visible")):(C=T<A&&(P.overflowX==="auto"||P.overflowX==="scroll"),M=k<V&&(P.overflowY==="auto"||P.overflowY==="scroll"));var J=C&&(Math.abs(x-o)<=a&&L+T<A)-(Math.abs(w-o)<=a&&!!L),G=M&&(Math.abs(S-s)<=a&&K+k<V)-(Math.abs(y-s)<=a&&!!K);if(!Un[f])for(var ne=0;ne<=f;ne++)Un[ne]||(Un[ne]={});(Un[f].vx!=J||Un[f].vy!=G||Un[f].el!==m)&&(Un[f].el=m,Un[f].vx=J,Un[f].vy=G,clearInterval(Un[f].pid),(J!=0||G!=0)&&(c=!0,Un[f].pid=setInterval((function(){r&&this.layer===0&&Tt.active._onTouchMove(lf);var W=Un[this.layer].vy?Un[this.layer].vy*i:0,D=Un[this.layer].vx?Un[this.layer].vx*i:0;typeof d=="function"&&d.call(Tt.dragged.parentNode[yr],D,W,n,lf,Un[this.layer].el)!=="continue"||D5(Un[this.layer].el,D,W)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==l&&(h=fs(h,!1)));Pv=c}},30),z5=function(e){var t=e.originalEvent,r=e.putSortable,o=e.dragEl,s=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var c=r||s;i();var d=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,f=document.elementFromPoint(d.clientX,d.clientY);l(),c&&!c.el.contains(f)&&(a("spill"),this.onSpill({dragEl:o,putSortable:r}))}};function B1(){}B1.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,r=e.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var o=ll(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),r&&r.animateAll()},drop:z5};ko(B1,{pluginName:"revertOnSpill"});function F1(){}F1.prototype={onSpill:function(e){var t=e.dragEl,r=e.putSortable,o=r||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:z5};ko(F1,{pluginName:"removeOnSpill"});var mo;function qV(){function n(){this.defaults={swapClass:"sortable-swap-highlight"}}return n.prototype={dragStart:function(t){var r=t.dragEl;mo=r},dragOverValid:function(t){var r=t.completed,o=t.target,s=t.onMove,a=t.activeSortable,i=t.changed,l=t.cancel;if(a.options.swap){var c=this.sortable.el,d=this.options;if(o&&o!==c){var f=mo;s(o)!==!1?(Mn(o,d.swapClass,!0),mo=o):mo=null,f&&f!==mo&&Mn(f,d.swapClass,!1)}i(),r(!0),l()}},drop:function(t){var r=t.activeSortable,o=t.putSortable,s=t.dragEl,a=o||this.sortable,i=this.options;mo&&Mn(mo,i.swapClass,!1),mo&&(i.swap||o&&o.options.swap)&&s!==mo&&(a.captureAnimationState(),a!==r&&r.captureAnimationState(),JV(s,mo),a.animateAll(),a!==r&&r.animateAll())},nulling:function(){mo=null}},ko(n,{pluginName:"swap",eventProperties:function(){return{swapItem:mo}}})}function JV(n,e){var t=n.parentNode,r=e.parentNode,o,s;!t||!r||t.isEqualNode(e)||r.isEqualNode(n)||(o=Rn(n),s=Rn(e),t.isEqualNode(r)&&o<s&&s++,t.insertBefore(e,t.children[o]),r.insertBefore(n,r.children[s]))}var At=[],qr=[],Wl,Po,Ul=!1,Nr=!1,zi=!1,gn,jl,id;function XV(){function n(e){for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this));e.options.supportPointer?Jt(document,"pointerup",this._deselectMultiDrag):(Jt(document,"mouseup",this._deselectMultiDrag),Jt(document,"touchend",this._deselectMultiDrag)),Jt(document,"keydown",this._checkKeyDown),Jt(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(o,s){var a="";At.length&&Po===e?At.forEach(function(i,l){a+=(l?", ":"")+i.textContent}):a=s.textContent,o.setData("Text",a)}}}return n.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var r=t.dragEl;gn=r},delayEnded:function(){this.isMultiDrag=~At.indexOf(gn)},setupClone:function(t){var r=t.sortable,o=t.cancel;if(this.isMultiDrag){for(var s=0;s<At.length;s++)qr.push(L1(At[s])),qr[s].sortableIndex=At[s].sortableIndex,qr[s].draggable=!1,qr[s].style["will-change"]="",Mn(qr[s],this.options.selectedClass,!1),At[s]===gn&&Mn(qr[s],this.options.chosenClass,!1);r._hideClone(),o()}},clone:function(t){var r=t.sortable,o=t.rootEl,s=t.dispatchSortableEvent,a=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||At.length&&Po===r&&(z2(!0,o),s("clone"),a()))},showClone:function(t){var r=t.cloneNowShown,o=t.rootEl,s=t.cancel;this.isMultiDrag&&(z2(!1,o),qr.forEach(function(a){ct(a,"display","")}),r(),id=!1,s())},hideClone:function(t){var r=this;t.sortable;var o=t.cloneNowHidden,s=t.cancel;this.isMultiDrag&&(qr.forEach(function(a){ct(a,"display","none"),r.options.removeCloneOnHide&&a.parentNode&&a.parentNode.removeChild(a)}),o(),id=!0,s())},dragStartGlobal:function(t){t.sortable,!this.isMultiDrag&&Po&&Po.multiDrag._deselectMultiDrag(),At.forEach(function(r){r.sortableIndex=Rn(r)}),At=At.sort(function(r,o){return r.sortableIndex-o.sortableIndex}),zi=!0},dragStarted:function(t){var r=this,o=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(o.captureAnimationState(),this.options.animation)){At.forEach(function(a){a!==gn&&ct(a,"position","absolute")});var s=xn(gn,!1,!0,!0);At.forEach(function(a){a!==gn&&N2(a,s)}),Nr=!0,Ul=!0}o.animateAll(function(){Nr=!1,Ul=!1,r.options.animation&&At.forEach(function(a){Sm(a)}),r.options.sort&&ld()})}},dragOver:function(t){var r=t.target,o=t.completed,s=t.cancel;Nr&&~At.indexOf(r)&&(o(!1),s())},revert:function(t){var r=t.fromSortable,o=t.rootEl,s=t.sortable,a=t.dragRect;At.length>1&&(At.forEach(function(i){s.addAnimationState({target:i,rect:Nr?xn(i):a}),Sm(i),i.fromRect=a,r.removeAnimationState(i)}),Nr=!1,ZV(!this.options.removeCloneOnHide,o))},dragOverCompleted:function(t){var r=t.sortable,o=t.isOwner,s=t.insertion,a=t.activeSortable,i=t.parentEl,l=t.putSortable,c=this.options;if(s){if(o&&a._hideClone(),Ul=!1,c.animation&&At.length>1&&(Nr||!o&&!a.options.sort&&!l)){var d=xn(gn,!1,!0,!0);At.forEach(function(h){h!==gn&&(N2(h,d),i.appendChild(h))}),Nr=!0}if(!o)if(Nr||ld(),At.length>1){var f=id;a._showClone(r),a.options.animation&&!id&&f&&qr.forEach(function(h){a.addAnimationState({target:h,rect:jl}),h.fromRect=jl,h.thisAnimationDuration=null})}else a._showClone(r)}},dragOverAnimationCapture:function(t){var r=t.dragRect,o=t.isOwner,s=t.activeSortable;if(At.forEach(function(i){i.thisAnimationDuration=null}),s.options.animation&&!o&&s.multiDrag.isMultiDrag){jl=ko({},r);var a=si(gn,!0);jl.top-=a.f,jl.left-=a.e}},dragOverAnimationComplete:function(){Nr&&(Nr=!1,ld())},drop:function(t){var r=t.originalEvent,o=t.rootEl,s=t.parentEl,a=t.sortable,i=t.dispatchSortableEvent,l=t.oldIndex,c=t.putSortable,d=c||this.sortable;if(r){var f=this.options,h=s.children;if(!zi)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Mn(gn,f.selectedClass,!~At.indexOf(gn)),~At.indexOf(gn))At.splice(At.indexOf(gn),1),Wl=null,Zl({sortable:a,rootEl:o,name:"deselect",targetEl:gn});else{if(At.push(gn),Zl({sortable:a,rootEl:o,name:"select",targetEl:gn}),r.shiftKey&&Wl&&a.el.contains(Wl)){var m=Rn(Wl),g=Rn(gn);if(~m&&~g&&m!==g){var y,S;for(g>m?(S=m,y=g):(S=g,y=m+1);S<y;S++)~At.indexOf(h[S])||(Mn(h[S],f.selectedClass,!0),At.push(h[S]),Zl({sortable:a,rootEl:o,name:"select",targetEl:h[S]}))}}else Wl=gn;Po=d}if(zi&&this.isMultiDrag){if(Nr=!1,(s[yr].options.sort||s!==o)&&At.length>1){var w=xn(gn),x=Rn(gn,":not(."+this.options.selectedClass+")");if(!Ul&&f.animation&&(gn.thisAnimationDuration=null),d.captureAnimationState(),!Ul&&(f.animation&&(gn.fromRect=w,At.forEach(function(k){if(k.thisAnimationDuration=null,k!==gn){var C=Nr?xn(k):w;k.fromRect=C,d.addAnimationState({target:k,rect:C})}})),ld(),At.forEach(function(k){h[x]?s.insertBefore(k,h[x]):s.appendChild(k),x++}),l===Rn(gn))){var T=!1;At.forEach(function(k){if(k.sortableIndex!==Rn(k)){T=!0;return}}),T&&i("update")}At.forEach(function(k){Sm(k)}),d.animateAll()}Po=d}(o===s||c&&c.lastPutMode!=="clone")&&qr.forEach(function(k){k.parentNode&&k.parentNode.removeChild(k)})}},nullingGlobal:function(){this.isMultiDrag=zi=!1,qr.length=0},destroyGlobal:function(){this._deselectMultiDrag(),jt(document,"pointerup",this._deselectMultiDrag),jt(document,"mouseup",this._deselectMultiDrag),jt(document,"touchend",this._deselectMultiDrag),jt(document,"keydown",this._checkKeyDown),jt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(typeof zi<"u"&&zi)&&Po===this.sortable&&!(t&&Lo(t.target,this.options.draggable,this.sortable.el,!1))&&!(t&&t.button!==0))for(;At.length;){var r=At[0];Mn(r,this.options.selectedClass,!1),At.shift(),Zl({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:r})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},ko(n,{pluginName:"multiDrag",utils:{select:function(t){var r=t.parentNode[yr];!r||!r.options.multiDrag||~At.indexOf(t)||(Po&&Po!==r&&(Po.multiDrag._deselectMultiDrag(),Po=r),Mn(t,r.options.selectedClass,!0),At.push(t))},deselect:function(t){var r=t.parentNode[yr],o=At.indexOf(t);!r||!r.options.multiDrag||!~o||(Mn(t,r.options.selectedClass,!1),At.splice(o,1))}},eventProperties:function(){var t=this,r=[],o=[];return At.forEach(function(s){r.push({multiDragElement:s,index:s.sortableIndex});var a;Nr&&s!==gn?a=-1:Nr?a=Rn(s,":not(."+t.options.selectedClass+")"):a=Rn(s),o.push({multiDragElement:s,index:a})}),{items:wV(At),clones:[].concat(qr),oldIndicies:r,newIndicies:o}},optionListeners:{multiDragKey:function(t){return t=t.toLowerCase(),t==="ctrl"?t="Control":t.length>1&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}function ZV(n,e){At.forEach(function(t,r){var o=e.children[t.sortableIndex+(n?Number(r):0)];o?e.insertBefore(t,o):e.appendChild(t)})}function z2(n,e){qr.forEach(function(t,r){var o=e.children[t.sortableIndex+(n?Number(r):0)];o?e.insertBefore(t,o):e.appendChild(t)})}function ld(){At.forEach(function(n){n!==gn&&n.parentNode&&n.parentNode.removeChild(n)})}Tt.mount(new YV);Tt.mount(F1,B1);const QV=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:XV,Sortable:Tt,Swap:qV,default:Tt},Symbol.toStringTag,{value:"Module"})),ez=tS(QV);var tz=Dd.exports,H2;function nz(){return H2||(H2=1,function(n,e){(function(r,o){n.exports=o(gV,ez)})(typeof self<"u"?self:tz,function(t,r){return function(o){var s={};function a(i){if(s[i])return s[i].exports;var l=s[i]={i,l:!1,exports:{}};return o[i].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return a.m=o,a.c=s,a.d=function(i,l,c){a.o(i,l)||Object.defineProperty(i,l,{enumerable:!0,get:c})},a.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},a.t=function(i,l){if(l&1&&(i=a(i)),l&8||l&4&&typeof i=="object"&&i&&i.__esModule)return i;var c=Object.create(null);if(a.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:i}),l&2&&typeof i!="string")for(var d in i)a.d(c,d,(function(f){return i[f]}).bind(null,d));return c},a.n=function(i){var l=i&&i.__esModule?function(){return i.default}:function(){return i};return a.d(l,"a",l),l},a.o=function(i,l){return Object.prototype.hasOwnProperty.call(i,l)},a.p="",a(a.s="fb15")}({"00ee":function(o,s,a){var i=a("b622"),l=i("toStringTag"),c={};c[l]="z",o.exports=String(c)==="[object z]"},"0366":function(o,s,a){var i=a("1c0b");o.exports=function(l,c,d){if(i(l),c===void 0)return l;switch(d){case 0:return function(){return l.call(c)};case 1:return function(f){return l.call(c,f)};case 2:return function(f,h){return l.call(c,f,h)};case 3:return function(f,h,m){return l.call(c,f,h,m)}}return function(){return l.apply(c,arguments)}}},"057f":function(o,s,a){var i=a("fc6a"),l=a("241c").f,c={}.toString,d=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(h){try{return l(h)}catch{return d.slice()}};o.exports.f=function(m){return d&&c.call(m)=="[object Window]"?f(m):l(i(m))}},"06cf":function(o,s,a){var i=a("83ab"),l=a("d1e7"),c=a("5c6c"),d=a("fc6a"),f=a("c04e"),h=a("5135"),m=a("0cfb"),g=Object.getOwnPropertyDescriptor;s.f=i?g:function(S,w){if(S=d(S),w=f(w,!0),m)try{return g(S,w)}catch{}if(h(S,w))return c(!l.f.call(S,w),S[w])}},"0cfb":function(o,s,a){var i=a("83ab"),l=a("d039"),c=a("cc12");o.exports=!i&&!l(function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(o,s,a){var i=a("23e7"),l=a("d58f").left,c=a("a640"),d=a("ae40"),f=c("reduce"),h=d("reduce",{1:0});i({target:"Array",proto:!0,forced:!f||!h},{reduce:function(g){return l(this,g,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(o,s,a){var i=a("c6b6"),l=a("9263");o.exports=function(c,d){var f=c.exec;if(typeof f=="function"){var h=f.call(c,d);if(typeof h!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return h}if(i(c)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(c,d)}},"159b":function(o,s,a){var i=a("da84"),l=a("fdbc"),c=a("17c2"),d=a("9112");for(var f in l){var h=i[f],m=h&&h.prototype;if(m&&m.forEach!==c)try{d(m,"forEach",c)}catch{m.forEach=c}}},"17c2":function(o,s,a){var i=a("b727").forEach,l=a("a640"),c=a("ae40"),d=l("forEach"),f=c("forEach");o.exports=!d||!f?function(m){return i(this,m,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(o,s,a){var i=a("d066");o.exports=i("document","documentElement")},"1c0b":function(o,s){o.exports=function(a){if(typeof a!="function")throw TypeError(String(a)+" is not a function");return a}},"1c7e":function(o,s,a){var i=a("b622"),l=i("iterator"),c=!1;try{var d=0,f={next:function(){return{done:!!d++}},return:function(){c=!0}};f[l]=function(){return this},Array.from(f,function(){throw 2})}catch{}o.exports=function(h,m){if(!m&&!c)return!1;var g=!1;try{var y={};y[l]=function(){return{next:function(){return{done:g=!0}}}},h(y)}catch{}return g}},"1d80":function(o,s){o.exports=function(a){if(a==null)throw TypeError("Can't call method on "+a);return a}},"1dde":function(o,s,a){var i=a("d039"),l=a("b622"),c=a("2d00"),d=l("species");o.exports=function(f){return c>=51||!i(function(){var h=[],m=h.constructor={};return m[d]=function(){return{foo:1}},h[f](Boolean).foo!==1})}},"23cb":function(o,s,a){var i=a("a691"),l=Math.max,c=Math.min;o.exports=function(d,f){var h=i(d);return h<0?l(h+f,0):c(h,f)}},"23e7":function(o,s,a){var i=a("da84"),l=a("06cf").f,c=a("9112"),d=a("6eeb"),f=a("ce4e"),h=a("e893"),m=a("94ca");o.exports=function(g,y){var S=g.target,w=g.global,x=g.stat,T,k,C,M,A,V;if(w?k=i:x?k=i[S]||f(S,{}):k=(i[S]||{}).prototype,k)for(C in y){if(A=y[C],g.noTargetGet?(V=l(k,C),M=V&&V.value):M=k[C],T=m(w?C:S+(x?".":"#")+C,g.forced),!T&&M!==void 0){if(typeof A==typeof M)continue;h(A,M)}(g.sham||M&&M.sham)&&c(A,"sham",!0),d(k,C,A,g)}}},"241c":function(o,s,a){var i=a("ca84"),l=a("7839"),c=l.concat("length","prototype");s.f=Object.getOwnPropertyNames||function(f){return i(f,c)}},"25f0":function(o,s,a){var i=a("6eeb"),l=a("825a"),c=a("d039"),d=a("ad6d"),f="toString",h=RegExp.prototype,m=h[f],g=c(function(){return m.call({source:"a",flags:"b"})!="/a/b"}),y=m.name!=f;(g||y)&&i(RegExp.prototype,f,function(){var w=l(this),x=String(w.source),T=w.flags,k=String(T===void 0&&w instanceof RegExp&&!("flags"in h)?d.call(w):T);return"/"+x+"/"+k},{unsafe:!0})},"2ca0":function(o,s,a){var i=a("23e7"),l=a("06cf").f,c=a("50c4"),d=a("5a34"),f=a("1d80"),h=a("ab13"),m=a("c430"),g="".startsWith,y=Math.min,S=h("startsWith"),w=!m&&!S&&!!function(){var x=l(String.prototype,"startsWith");return x&&!x.writable}();i({target:"String",proto:!0,forced:!w&&!S},{startsWith:function(T){var k=String(f(this));d(T);var C=c(y(arguments.length>1?arguments[1]:void 0,k.length)),M=String(T);return g?g.call(k,M,C):k.slice(C,C+M.length)===M}})},"2d00":function(o,s,a){var i=a("da84"),l=a("342f"),c=i.process,d=c&&c.versions,f=d&&d.v8,h,m;f?(h=f.split("."),m=h[0]+h[1]):l&&(h=l.match(/Edge\/(\d+)/),(!h||h[1]>=74)&&(h=l.match(/Chrome\/(\d+)/),h&&(m=h[1]))),o.exports=m&&+m},"342f":function(o,s,a){var i=a("d066");o.exports=i("navigator","userAgent")||""},"35a1":function(o,s,a){var i=a("f5df"),l=a("3f8c"),c=a("b622"),d=c("iterator");o.exports=function(f){if(f!=null)return f[d]||f["@@iterator"]||l[i(f)]}},"37e8":function(o,s,a){var i=a("83ab"),l=a("9bf2"),c=a("825a"),d=a("df75");o.exports=i?Object.defineProperties:function(h,m){c(h);for(var g=d(m),y=g.length,S=0,w;y>S;)l.f(h,w=g[S++],m[w]);return h}},"3bbe":function(o,s,a){var i=a("861d");o.exports=function(l){if(!i(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(o,s,a){var i=a("6547").charAt,l=a("69f3"),c=a("7dd0"),d="String Iterator",f=l.set,h=l.getterFor(d);c(String,"String",function(m){f(this,{type:d,string:String(m),index:0})},function(){var g=h(this),y=g.string,S=g.index,w;return S>=y.length?{value:void 0,done:!0}:(w=i(y,S),g.index+=w.length,{value:w,done:!1})})},"3f8c":function(o,s){o.exports={}},4160:function(o,s,a){var i=a("23e7"),l=a("17c2");i({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(o,s,a){var i=a("da84");o.exports=i},"44ad":function(o,s,a){var i=a("d039"),l=a("c6b6"),c="".split;o.exports=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return l(d)=="String"?c.call(d,""):Object(d)}:Object},"44d2":function(o,s,a){var i=a("b622"),l=a("7c73"),c=a("9bf2"),d=i("unscopables"),f=Array.prototype;f[d]==null&&c.f(f,d,{configurable:!0,value:l(null)}),o.exports=function(h){f[d][h]=!0}},"44e7":function(o,s,a){var i=a("861d"),l=a("c6b6"),c=a("b622"),d=c("match");o.exports=function(f){var h;return i(f)&&((h=f[d])!==void 0?!!h:l(f)=="RegExp")}},4930:function(o,s,a){var i=a("d039");o.exports=!!Object.getOwnPropertySymbols&&!i(function(){return!String(Symbol())})},"4d64":function(o,s,a){var i=a("fc6a"),l=a("50c4"),c=a("23cb"),d=function(f){return function(h,m,g){var y=i(h),S=l(y.length),w=c(g,S),x;if(f&&m!=m){for(;S>w;)if(x=y[w++],x!=x)return!0}else for(;S>w;w++)if((f||w in y)&&y[w]===m)return f||w||0;return!f&&-1}};o.exports={includes:d(!0),indexOf:d(!1)}},"4de4":function(o,s,a){var i=a("23e7"),l=a("b727").filter,c=a("1dde"),d=a("ae40"),f=c("filter"),h=d("filter");i({target:"Array",proto:!0,forced:!f||!h},{filter:function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(o,s,a){var i=a("0366"),l=a("7b0b"),c=a("9bdd"),d=a("e95a"),f=a("50c4"),h=a("8418"),m=a("35a1");o.exports=function(y){var S=l(y),w=typeof this=="function"?this:Array,x=arguments.length,T=x>1?arguments[1]:void 0,k=T!==void 0,C=m(S),M=0,A,V,P,L,K,J;if(k&&(T=i(T,x>2?arguments[2]:void 0,2)),C!=null&&!(w==Array&&d(C)))for(L=C.call(S),K=L.next,V=new w;!(P=K.call(L)).done;M++)J=k?c(L,T,[P.value,M],!0):P.value,h(V,M,J);else for(A=f(S.length),V=new w(A);A>M;M++)J=k?T(S[M],M):S[M],h(V,M,J);return V.length=M,V}},"4fad":function(o,s,a){var i=a("23e7"),l=a("6f53").entries;i({target:"Object",stat:!0},{entries:function(d){return l(d)}})},"50c4":function(o,s,a){var i=a("a691"),l=Math.min;o.exports=function(c){return c>0?l(i(c),9007199254740991):0}},5135:function(o,s){var a={}.hasOwnProperty;o.exports=function(i,l){return a.call(i,l)}},5319:function(o,s,a){var i=a("d784"),l=a("825a"),c=a("7b0b"),d=a("50c4"),f=a("a691"),h=a("1d80"),m=a("8aa5"),g=a("14c3"),y=Math.max,S=Math.min,w=Math.floor,x=/\$([$&'`]|\d\d?|<[^>]*>)/g,T=/\$([$&'`]|\d\d?)/g,k=function(C){return C===void 0?C:String(C)};i("replace",2,function(C,M,A,V){var P=V.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,L=V.REPLACE_KEEPS_$0,K=P?"$":"$0";return[function(ne,W){var D=h(this),U=ne==null?void 0:ne[C];return U!==void 0?U.call(ne,D,W):M.call(String(D),ne,W)},function(G,ne){if(!P&&L||typeof ne=="string"&&ne.indexOf(K)===-1){var W=A(M,G,this,ne);if(W.done)return W.value}var D=l(G),U=String(this),te=typeof ne=="function";te||(ne=String(ne));var j=D.global;if(j){var ee=D.unicode;D.lastIndex=0}for(var X=[];;){var ce=g(D,U);if(ce===null||(X.push(ce),!j))break;var ae=String(ce[0]);ae===""&&(D.lastIndex=m(U,d(D.lastIndex),ee))}for(var ye="",ke=0,Be=0;Be<X.length;Be++){ce=X[Be];for(var le=String(ce[0]),xe=y(S(f(ce.index),U.length),0),Me=[],De=1;De<ce.length;De++)Me.push(k(ce[De]));var Ze=ce.groups;if(te){var lt=[le].concat(Me,xe,U);Ze!==void 0&<.push(Ze);var ze=String(ne.apply(void 0,lt))}else ze=J(le,U,xe,Me,Ze,ne);xe>=ke&&(ye+=U.slice(ke,xe)+ze,ke=xe+le.length)}return ye+U.slice(ke)}];function J(G,ne,W,D,U,te){var j=W+G.length,ee=D.length,X=T;return U!==void 0&&(U=c(U),X=x),M.call(te,X,function(ce,ae){var ye;switch(ae.charAt(0)){case"$":return"$";case"&":return G;case"`":return ne.slice(0,W);case"'":return ne.slice(j);case"<":ye=U[ae.slice(1,-1)];break;default:var ke=+ae;if(ke===0)return ce;if(ke>ee){var Be=w(ke/10);return Be===0?ce:Be<=ee?D[Be-1]===void 0?ae.charAt(1):D[Be-1]+ae.charAt(1):ce}ye=D[ke-1]}return ye===void 0?"":ye})}})},5692:function(o,s,a){var i=a("c430"),l=a("c6cd");(o.exports=function(c,d){return l[c]||(l[c]=d!==void 0?d:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(o,s,a){var i=a("d066"),l=a("241c"),c=a("7418"),d=a("825a");o.exports=i("Reflect","ownKeys")||function(h){var m=l.f(d(h)),g=c.f;return g?m.concat(g(h)):m}},"5a34":function(o,s,a){var i=a("44e7");o.exports=function(l){if(i(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(o,s){o.exports=function(a,i){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:i}}},"5db7":function(o,s,a){var i=a("23e7"),l=a("a2bf"),c=a("7b0b"),d=a("50c4"),f=a("1c0b"),h=a("65f0");i({target:"Array",proto:!0},{flatMap:function(g){var y=c(this),S=d(y.length),w;return f(g),w=h(y,0),w.length=l(w,y,y,S,0,1,g,arguments.length>1?arguments[1]:void 0),w}})},6547:function(o,s,a){var i=a("a691"),l=a("1d80"),c=function(d){return function(f,h){var m=String(l(f)),g=i(h),y=m.length,S,w;return g<0||g>=y?d?"":void 0:(S=m.charCodeAt(g),S<55296||S>56319||g+1===y||(w=m.charCodeAt(g+1))<56320||w>57343?d?m.charAt(g):S:d?m.slice(g,g+2):(S-55296<<10)+(w-56320)+65536)}};o.exports={codeAt:c(!1),charAt:c(!0)}},"65f0":function(o,s,a){var i=a("861d"),l=a("e8b5"),c=a("b622"),d=c("species");o.exports=function(f,h){var m;return l(f)&&(m=f.constructor,typeof m=="function"&&(m===Array||l(m.prototype))?m=void 0:i(m)&&(m=m[d],m===null&&(m=void 0))),new(m===void 0?Array:m)(h===0?0:h)}},"69f3":function(o,s,a){var i=a("7f9a"),l=a("da84"),c=a("861d"),d=a("9112"),f=a("5135"),h=a("f772"),m=a("d012"),g=l.WeakMap,y,S,w,x=function(P){return w(P)?S(P):y(P,{})},T=function(P){return function(L){var K;if(!c(L)||(K=S(L)).type!==P)throw TypeError("Incompatible receiver, "+P+" required");return K}};if(i){var k=new g,C=k.get,M=k.has,A=k.set;y=function(P,L){return A.call(k,P,L),L},S=function(P){return C.call(k,P)||{}},w=function(P){return M.call(k,P)}}else{var V=h("state");m[V]=!0,y=function(P,L){return d(P,V,L),L},S=function(P){return f(P,V)?P[V]:{}},w=function(P){return f(P,V)}}o.exports={set:y,get:S,has:w,enforce:x,getterFor:T}},"6eeb":function(o,s,a){var i=a("da84"),l=a("9112"),c=a("5135"),d=a("ce4e"),f=a("8925"),h=a("69f3"),m=h.get,g=h.enforce,y=String(String).split("String");(o.exports=function(S,w,x,T){var k=T?!!T.unsafe:!1,C=T?!!T.enumerable:!1,M=T?!!T.noTargetGet:!1;if(typeof x=="function"&&(typeof w=="string"&&!c(x,"name")&&l(x,"name",w),g(x).source=y.join(typeof w=="string"?w:"")),S===i){C?S[w]=x:d(w,x);return}else k?!M&&S[w]&&(C=!0):delete S[w];C?S[w]=x:l(S,w,x)})(Function.prototype,"toString",function(){return typeof this=="function"&&m(this).source||f(this)})},"6f53":function(o,s,a){var i=a("83ab"),l=a("df75"),c=a("fc6a"),d=a("d1e7").f,f=function(h){return function(m){for(var g=c(m),y=l(g),S=y.length,w=0,x=[],T;S>w;)T=y[w++],(!i||d.call(g,T))&&x.push(h?[T,g[T]]:g[T]);return x}};o.exports={entries:f(!0),values:f(!1)}},"73d9":function(o,s,a){var i=a("44d2");i("flatMap")},7418:function(o,s){s.f=Object.getOwnPropertySymbols},"746f":function(o,s,a){var i=a("428f"),l=a("5135"),c=a("e538"),d=a("9bf2").f;o.exports=function(f){var h=i.Symbol||(i.Symbol={});l(h,f)||d(h,f,{value:c.f(f)})}},7839:function(o,s){o.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(o,s,a){var i=a("1d80");o.exports=function(l){return Object(i(l))}},"7c73":function(o,s,a){var i=a("825a"),l=a("37e8"),c=a("7839"),d=a("d012"),f=a("1be4"),h=a("cc12"),m=a("f772"),g=">",y="<",S="prototype",w="script",x=m("IE_PROTO"),T=function(){},k=function(P){return y+w+g+P+y+"/"+w+g},C=function(P){P.write(k("")),P.close();var L=P.parentWindow.Object;return P=null,L},M=function(){var P=h("iframe"),L="java"+w+":",K;return P.style.display="none",f.appendChild(P),P.src=String(L),K=P.contentWindow.document,K.open(),K.write(k("document.F=Object")),K.close(),K.F},A,V=function(){try{A=document.domain&&new ActiveXObject("htmlfile")}catch{}V=A?C(A):M();for(var P=c.length;P--;)delete V[S][c[P]];return V()};d[x]=!0,o.exports=Object.create||function(L,K){var J;return L!==null?(T[S]=i(L),J=new T,T[S]=null,J[x]=L):J=V(),K===void 0?J:l(J,K)}},"7dd0":function(o,s,a){var i=a("23e7"),l=a("9ed3"),c=a("e163"),d=a("d2bb"),f=a("d44e"),h=a("9112"),m=a("6eeb"),g=a("b622"),y=a("c430"),S=a("3f8c"),w=a("ae93"),x=w.IteratorPrototype,T=w.BUGGY_SAFARI_ITERATORS,k=g("iterator"),C="keys",M="values",A="entries",V=function(){return this};o.exports=function(P,L,K,J,G,ne,W){l(K,L,J);var D=function(Be){if(Be===G&&X)return X;if(!T&&Be in j)return j[Be];switch(Be){case C:return function(){return new K(this,Be)};case M:return function(){return new K(this,Be)};case A:return function(){return new K(this,Be)}}return function(){return new K(this)}},U=L+" Iterator",te=!1,j=P.prototype,ee=j[k]||j["@@iterator"]||G&&j[G],X=!T&&ee||D(G),ce=L=="Array"&&j.entries||ee,ae,ye,ke;if(ce&&(ae=c(ce.call(new P)),x!==Object.prototype&&ae.next&&(!y&&c(ae)!==x&&(d?d(ae,x):typeof ae[k]!="function"&&h(ae,k,V)),f(ae,U,!0,!0),y&&(S[U]=V))),G==M&&ee&&ee.name!==M&&(te=!0,X=function(){return ee.call(this)}),(!y||W)&&j[k]!==X&&h(j,k,X),S[L]=X,G)if(ye={values:D(M),keys:ne?X:D(C),entries:D(A)},W)for(ke in ye)(T||te||!(ke in j))&&m(j,ke,ye[ke]);else i({target:L,proto:!0,forced:T||te},ye);return ye}},"7f9a":function(o,s,a){var i=a("da84"),l=a("8925"),c=i.WeakMap;o.exports=typeof c=="function"&&/native code/.test(l(c))},"825a":function(o,s,a){var i=a("861d");o.exports=function(l){if(!i(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(o,s,a){var i=a("d039");o.exports=!i(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(o,s,a){var i=a("c04e"),l=a("9bf2"),c=a("5c6c");o.exports=function(d,f,h){var m=i(f);m in d?l.f(d,m,c(0,h)):d[m]=h}},"861d":function(o,s){o.exports=function(a){return typeof a=="object"?a!==null:typeof a=="function"}},8875:function(o,s,a){var i,l,c;(function(d,f){l=[],i=f,c=typeof i=="function"?i.apply(s,l):i,c!==void 0&&(o.exports=c)})(typeof self<"u"?self:this,function(){function d(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==d&&document.currentScript)return document.currentScript;try{throw new Error}catch(A){var h=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,m=/@([^@]*):(\d+):(\d+)\s*$/ig,g=h.exec(A.stack)||m.exec(A.stack),y=g&&g[1]||!1,S=g&&g[2]||!1,w=document.location.href.replace(document.location.hash,""),x,T,k,C=document.getElementsByTagName("script");y===w&&(x=document.documentElement.outerHTML,T=new RegExp("(?:[^\\n]+?\\n){0,"+(S-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),k=x.replace(T,"$1").trim());for(var M=0;M<C.length;M++)if(C[M].readyState==="interactive"||C[M].src===y||y===w&&C[M].innerHTML&&C[M].innerHTML.trim()===k)return C[M];return null}}return d})},8925:function(o,s,a){var i=a("c6cd"),l=Function.toString;typeof i.inspectSource!="function"&&(i.inspectSource=function(c){return l.call(c)}),o.exports=i.inspectSource},"8aa5":function(o,s,a){var i=a("6547").charAt;o.exports=function(l,c,d){return c+(d?i(l,c).length:1)}},"8bbf":function(o,s){o.exports=t},"90e3":function(o,s){var a=0,i=Math.random();o.exports=function(l){return"Symbol("+String(l===void 0?"":l)+")_"+(++a+i).toString(36)}},9112:function(o,s,a){var i=a("83ab"),l=a("9bf2"),c=a("5c6c");o.exports=i?function(d,f,h){return l.f(d,f,c(1,h))}:function(d,f,h){return d[f]=h,d}},9263:function(o,s,a){var i=a("ad6d"),l=a("9f7f"),c=RegExp.prototype.exec,d=String.prototype.replace,f=c,h=function(){var S=/a/,w=/b*/g;return c.call(S,"a"),c.call(w,"a"),S.lastIndex!==0||w.lastIndex!==0}(),m=l.UNSUPPORTED_Y||l.BROKEN_CARET,g=/()??/.exec("")[1]!==void 0,y=h||g||m;y&&(f=function(w){var x=this,T,k,C,M,A=m&&x.sticky,V=i.call(x),P=x.source,L=0,K=w;return A&&(V=V.replace("y",""),V.indexOf("g")===-1&&(V+="g"),K=String(w).slice(x.lastIndex),x.lastIndex>0&&(!x.multiline||x.multiline&&w[x.lastIndex-1]!==` |
| 57 |
`)&&(P="(?: "+P+")",K=" "+K,L++),k=new RegExp("^(?:"+P+")",V)),g&&(k=new RegExp("^"+P+"$(?!\\s)",V)),h&&(T=x.lastIndex),C=c.call(A?k:x,K),A?C?(C.input=C.input.slice(L),C[0]=C[0].slice(L),C.index=x.lastIndex,x.lastIndex+=C[0].length):x.lastIndex=0:h&&C&&(x.lastIndex=x.global?C.index+C[0].length:T),g&&C&&C.length>1&&d.call(C[0],k,function(){for(M=1;M<arguments.length-2;M++)arguments[M]===void 0&&(C[M]=void 0)}),C}),o.exports=f},"94ca":function(o,s,a){var i=a("d039"),l=/#|\.prototype\./,c=function(g,y){var S=f[d(g)];return S==m?!0:S==h?!1:typeof y=="function"?i(y):!!y},d=c.normalize=function(g){return String(g).replace(l,".").toLowerCase()},f=c.data={},h=c.NATIVE="N",m=c.POLYFILL="P";o.exports=c},"99af":function(o,s,a){var i=a("23e7"),l=a("d039"),c=a("e8b5"),d=a("861d"),f=a("7b0b"),h=a("50c4"),m=a("8418"),g=a("65f0"),y=a("1dde"),S=a("b622"),w=a("2d00"),x=S("isConcatSpreadable"),T=9007199254740991,k="Maximum allowed index exceeded",C=w>=51||!l(function(){var P=[];return P[x]=!1,P.concat()[0]!==P}),M=y("concat"),A=function(P){if(!d(P))return!1;var L=P[x];return L!==void 0?!!L:c(P)},V=!C||!M;i({target:"Array",proto:!0,forced:V},{concat:function(L){var K=f(this),J=g(K,0),G=0,ne,W,D,U,te;for(ne=-1,D=arguments.length;ne<D;ne++)if(te=ne===-1?K:arguments[ne],A(te)){if(U=h(te.length),G+U>T)throw TypeError(k);for(W=0;W<U;W++,G++)W in te&&m(J,G,te[W])}else{if(G>=T)throw TypeError(k);m(J,G++,te)}return J.length=G,J}})},"9bdd":function(o,s,a){var i=a("825a");o.exports=function(l,c,d,f){try{return f?c(i(d)[0],d[1]):c(d)}catch(m){var h=l.return;throw h!==void 0&&i(h.call(l)),m}}},"9bf2":function(o,s,a){var i=a("83ab"),l=a("0cfb"),c=a("825a"),d=a("c04e"),f=Object.defineProperty;s.f=i?f:function(m,g,y){if(c(m),g=d(g,!0),c(y),l)try{return f(m,g,y)}catch{}if("get"in y||"set"in y)throw TypeError("Accessors not supported");return"value"in y&&(m[g]=y.value),m}},"9ed3":function(o,s,a){var i=a("ae93").IteratorPrototype,l=a("7c73"),c=a("5c6c"),d=a("d44e"),f=a("3f8c"),h=function(){return this};o.exports=function(m,g,y){var S=g+" Iterator";return m.prototype=l(i,{next:c(1,y)}),d(m,S,!1,!0),f[S]=h,m}},"9f7f":function(o,s,a){var i=a("d039");function l(c,d){return RegExp(c,d)}s.UNSUPPORTED_Y=i(function(){var c=l("a","y");return c.lastIndex=2,c.exec("abcd")!=null}),s.BROKEN_CARET=i(function(){var c=l("^r","gy");return c.lastIndex=2,c.exec("str")!=null})},a2bf:function(o,s,a){var i=a("e8b5"),l=a("50c4"),c=a("0366"),d=function(f,h,m,g,y,S,w,x){for(var T=y,k=0,C=w?c(w,x,3):!1,M;k<g;){if(k in m){if(M=C?C(m[k],k,h):m[k],S>0&&i(M))T=d(f,h,M,l(M.length),T,S-1)-1;else{if(T>=9007199254740991)throw TypeError("Exceed the acceptable array length");f[T]=M}T++}k++}return T};o.exports=d},a352:function(o,s){o.exports=r},a434:function(o,s,a){var i=a("23e7"),l=a("23cb"),c=a("a691"),d=a("50c4"),f=a("7b0b"),h=a("65f0"),m=a("8418"),g=a("1dde"),y=a("ae40"),S=g("splice"),w=y("splice",{ACCESSORS:!0,0:0,1:2}),x=Math.max,T=Math.min,k=9007199254740991,C="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!S||!w},{splice:function(A,V){var P=f(this),L=d(P.length),K=l(A,L),J=arguments.length,G,ne,W,D,U,te;if(J===0?G=ne=0:J===1?(G=0,ne=L-K):(G=J-2,ne=T(x(c(V),0),L-K)),L+G-ne>k)throw TypeError(C);for(W=h(P,ne),D=0;D<ne;D++)U=K+D,U in P&&m(W,D,P[U]);if(W.length=ne,G<ne){for(D=K;D<L-ne;D++)U=D+ne,te=D+G,U in P?P[te]=P[U]:delete P[te];for(D=L;D>L-ne+G;D--)delete P[D-1]}else if(G>ne)for(D=L-ne;D>K;D--)U=D+ne-1,te=D+G-1,U in P?P[te]=P[U]:delete P[te];for(D=0;D<G;D++)P[D+K]=arguments[D+2];return P.length=L-ne+G,W}})},a4d3:function(o,s,a){var i=a("23e7"),l=a("da84"),c=a("d066"),d=a("c430"),f=a("83ab"),h=a("4930"),m=a("fdbf"),g=a("d039"),y=a("5135"),S=a("e8b5"),w=a("861d"),x=a("825a"),T=a("7b0b"),k=a("fc6a"),C=a("c04e"),M=a("5c6c"),A=a("7c73"),V=a("df75"),P=a("241c"),L=a("057f"),K=a("7418"),J=a("06cf"),G=a("9bf2"),ne=a("d1e7"),W=a("9112"),D=a("6eeb"),U=a("5692"),te=a("f772"),j=a("d012"),ee=a("90e3"),X=a("b622"),ce=a("e538"),ae=a("746f"),ye=a("d44e"),ke=a("69f3"),Be=a("b727").forEach,le=te("hidden"),xe="Symbol",Me="prototype",De=X("toPrimitive"),Ze=ke.set,lt=ke.getterFor(xe),ze=Object[Me],Pe=l.Symbol,nt=c("JSON","stringify"),Ot=J.f,_e=G.f,He=L.f,Fe=ne.f,Ye=U("symbols"),qe=U("op-symbols"),dt=U("string-to-symbol-registry"),vt=U("symbol-to-string-registry"),bt=U("wks"),kt=l.QObject,Lt=!kt||!kt[Me]||!kt[Me].findChild,Yt=f&&g(function(){return A(_e({},"a",{get:function(){return _e(this,"a",{value:7}).a}})).a!=7})?function(Re,Ne,ot){var at=Ot(ze,Ne);at&&delete ze[Ne],_e(Re,Ne,ot),at&&Re!==ze&&_e(ze,Ne,at)}:_e,Pt=function(Re,Ne){var ot=Ye[Re]=A(Pe[Me]);return Ze(ot,{type:xe,tag:Re,description:Ne}),f||(ot.description=Ne),ot},pe=m?function(Re){return typeof Re=="symbol"}:function(Re){return Object(Re)instanceof Pe},F=function(Ne,ot,at){Ne===ze&&F(qe,ot,at),x(Ne);var Et=C(ot,!0);return x(at),y(Ye,Et)?(at.enumerable?(y(Ne,le)&&Ne[le][Et]&&(Ne[le][Et]=!1),at=A(at,{enumerable:M(0,!1)})):(y(Ne,le)||_e(Ne,le,M(1,{})),Ne[le][Et]=!0),Yt(Ne,Et,at)):_e(Ne,Et,at)},re=function(Ne,ot){x(Ne);var at=k(ot),Et=V(at).concat(Y(at));return Be(Et,function(on){(!f||oe.call(at,on))&&F(Ne,on,at[on])}),Ne},ge=function(Ne,ot){return ot===void 0?A(Ne):re(A(Ne),ot)},oe=function(Ne){var ot=C(Ne,!0),at=Fe.call(this,ot);return this===ze&&y(Ye,ot)&&!y(qe,ot)?!1:at||!y(this,ot)||!y(Ye,ot)||y(this,le)&&this[le][ot]?at:!0},ie=function(Ne,ot){var at=k(Ne),Et=C(ot,!0);if(!(at===ze&&y(Ye,Et)&&!y(qe,Et))){var on=Ot(at,Et);return on&&y(Ye,Et)&&!(y(at,le)&&at[le][Et])&&(on.enumerable=!0),on}},be=function(Ne){var ot=He(k(Ne)),at=[];return Be(ot,function(Et){!y(Ye,Et)&&!y(j,Et)&&at.push(Et)}),at},Y=function(Ne){var ot=Ne===ze,at=He(ot?qe:k(Ne)),Et=[];return Be(at,function(on){y(Ye,on)&&(!ot||y(ze,on))&&Et.push(Ye[on])}),Et};if(h||(Pe=function(){if(this instanceof Pe)throw TypeError("Symbol is not a constructor");var Ne=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),ot=ee(Ne),at=function(Et){this===ze&&at.call(qe,Et),y(this,le)&&y(this[le],ot)&&(this[le][ot]=!1),Yt(this,ot,M(1,Et))};return f&&Lt&&Yt(ze,ot,{configurable:!0,set:at}),Pt(ot,Ne)},D(Pe[Me],"toString",function(){return lt(this).tag}),D(Pe,"withoutSetter",function(Re){return Pt(ee(Re),Re)}),ne.f=oe,G.f=F,J.f=ie,P.f=L.f=be,K.f=Y,ce.f=function(Re){return Pt(X(Re),Re)},f&&(_e(Pe[Me],"description",{configurable:!0,get:function(){return lt(this).description}}),d||D(ze,"propertyIsEnumerable",oe,{unsafe:!0}))),i({global:!0,wrap:!0,forced:!h,sham:!h},{Symbol:Pe}),Be(V(bt),function(Re){ae(Re)}),i({target:xe,stat:!0,forced:!h},{for:function(Re){var Ne=String(Re);if(y(dt,Ne))return dt[Ne];var ot=Pe(Ne);return dt[Ne]=ot,vt[ot]=Ne,ot},keyFor:function(Ne){if(!pe(Ne))throw TypeError(Ne+" is not a symbol");if(y(vt,Ne))return vt[Ne]},useSetter:function(){Lt=!0},useSimple:function(){Lt=!1}}),i({target:"Object",stat:!0,forced:!h,sham:!f},{create:ge,defineProperty:F,defineProperties:re,getOwnPropertyDescriptor:ie}),i({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:be,getOwnPropertySymbols:Y}),i({target:"Object",stat:!0,forced:g(function(){K.f(1)})},{getOwnPropertySymbols:function(Ne){return K.f(T(Ne))}}),nt){var Ie=!h||g(function(){var Re=Pe();return nt([Re])!="[null]"||nt({a:Re})!="{}"||nt(Object(Re))!="{}"});i({target:"JSON",stat:!0,forced:Ie},{stringify:function(Ne,ot,at){for(var Et=[Ne],on=1,Ln;arguments.length>on;)Et.push(arguments[on++]);if(Ln=ot,!(!w(ot)&&Ne===void 0||pe(Ne)))return S(ot)||(ot=function(tn,Gn){if(typeof Ln=="function"&&(Gn=Ln.call(this,tn,Gn)),!pe(Gn))return Gn}),Et[1]=ot,nt.apply(null,Et)}})}Pe[Me][De]||W(Pe[Me],De,Pe[Me].valueOf),ye(Pe,xe),j[le]=!0},a630:function(o,s,a){var i=a("23e7"),l=a("4df4"),c=a("1c7e"),d=!c(function(f){Array.from(f)});i({target:"Array",stat:!0,forced:d},{from:l})},a640:function(o,s,a){var i=a("d039");o.exports=function(l,c){var d=[][l];return!!d&&i(function(){d.call(null,c||function(){throw 1},1)})}},a691:function(o,s){var a=Math.ceil,i=Math.floor;o.exports=function(l){return isNaN(l=+l)?0:(l>0?i:a)(l)}},ab13:function(o,s,a){var i=a("b622"),l=i("match");o.exports=function(c){var d=/./;try{"/./"[c](d)}catch{try{return d[l]=!1,"/./"[c](d)}catch{}}return!1}},ac1f:function(o,s,a){var i=a("23e7"),l=a("9263");i({target:"RegExp",proto:!0,forced:/./.exec!==l},{exec:l})},ad6d:function(o,s,a){var i=a("825a");o.exports=function(){var l=i(this),c="";return l.global&&(c+="g"),l.ignoreCase&&(c+="i"),l.multiline&&(c+="m"),l.dotAll&&(c+="s"),l.unicode&&(c+="u"),l.sticky&&(c+="y"),c}},ae40:function(o,s,a){var i=a("83ab"),l=a("d039"),c=a("5135"),d=Object.defineProperty,f={},h=function(m){throw m};o.exports=function(m,g){if(c(f,m))return f[m];g||(g={});var y=[][m],S=c(g,"ACCESSORS")?g.ACCESSORS:!1,w=c(g,0)?g[0]:h,x=c(g,1)?g[1]:void 0;return f[m]=!!y&&!l(function(){if(S&&!i)return!0;var T={length:-1};S?d(T,1,{enumerable:!0,get:h}):T[1]=1,y.call(T,w,x)})}},ae93:function(o,s,a){var i=a("e163"),l=a("9112"),c=a("5135"),d=a("b622"),f=a("c430"),h=d("iterator"),m=!1,g=function(){return this},y,S,w;[].keys&&(w=[].keys(),"next"in w?(S=i(i(w)),S!==Object.prototype&&(y=S)):m=!0),y==null&&(y={}),!f&&!c(y,h)&&l(y,h,g),o.exports={IteratorPrototype:y,BUGGY_SAFARI_ITERATORS:m}},b041:function(o,s,a){var i=a("00ee"),l=a("f5df");o.exports=i?{}.toString:function(){return"[object "+l(this)+"]"}},b0c0:function(o,s,a){var i=a("83ab"),l=a("9bf2").f,c=Function.prototype,d=c.toString,f=/^\s*function ([^ (]*)/,h="name";i&&!(h in c)&&l(c,h,{configurable:!0,get:function(){try{return d.call(this).match(f)[1]}catch{return""}}})},b622:function(o,s,a){var i=a("da84"),l=a("5692"),c=a("5135"),d=a("90e3"),f=a("4930"),h=a("fdbf"),m=l("wks"),g=i.Symbol,y=h?g:g&&g.withoutSetter||d;o.exports=function(S){return c(m,S)||(f&&c(g,S)?m[S]=g[S]:m[S]=y("Symbol."+S)),m[S]}},b64b:function(o,s,a){var i=a("23e7"),l=a("7b0b"),c=a("df75"),d=a("d039"),f=d(function(){c(1)});i({target:"Object",stat:!0,forced:f},{keys:function(m){return c(l(m))}})},b727:function(o,s,a){var i=a("0366"),l=a("44ad"),c=a("7b0b"),d=a("50c4"),f=a("65f0"),h=[].push,m=function(g){var y=g==1,S=g==2,w=g==3,x=g==4,T=g==6,k=g==5||T;return function(C,M,A,V){for(var P=c(C),L=l(P),K=i(M,A,3),J=d(L.length),G=0,ne=V||f,W=y?ne(C,J):S?ne(C,0):void 0,D,U;J>G;G++)if((k||G in L)&&(D=L[G],U=K(D,G,P),g)){if(y)W[G]=U;else if(U)switch(g){case 3:return!0;case 5:return D;case 6:return G;case 2:h.call(W,D)}else if(x)return!1}return T?-1:w||x?x:W}};o.exports={forEach:m(0),map:m(1),filter:m(2),some:m(3),every:m(4),find:m(5),findIndex:m(6)}},c04e:function(o,s,a){var i=a("861d");o.exports=function(l,c){if(!i(l))return l;var d,f;if(c&&typeof(d=l.toString)=="function"&&!i(f=d.call(l))||typeof(d=l.valueOf)=="function"&&!i(f=d.call(l))||!c&&typeof(d=l.toString)=="function"&&!i(f=d.call(l)))return f;throw TypeError("Can't convert object to primitive value")}},c430:function(o,s){o.exports=!1},c6b6:function(o,s){var a={}.toString;o.exports=function(i){return a.call(i).slice(8,-1)}},c6cd:function(o,s,a){var i=a("da84"),l=a("ce4e"),c="__core-js_shared__",d=i[c]||l(c,{});o.exports=d},c740:function(o,s,a){var i=a("23e7"),l=a("b727").findIndex,c=a("44d2"),d=a("ae40"),f="findIndex",h=!0,m=d(f);f in[]&&Array(1)[f](function(){h=!1}),i({target:"Array",proto:!0,forced:h||!m},{findIndex:function(y){return l(this,y,arguments.length>1?arguments[1]:void 0)}}),c(f)},c8ba:function(o,s){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch{typeof window=="object"&&(a=window)}o.exports=a},c975:function(o,s,a){var i=a("23e7"),l=a("4d64").indexOf,c=a("a640"),d=a("ae40"),f=[].indexOf,h=!!f&&1/[1].indexOf(1,-0)<0,m=c("indexOf"),g=d("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:h||!m||!g},{indexOf:function(S){return h?f.apply(this,arguments)||0:l(this,S,arguments.length>1?arguments[1]:void 0)}})},ca84:function(o,s,a){var i=a("5135"),l=a("fc6a"),c=a("4d64").indexOf,d=a("d012");o.exports=function(f,h){var m=l(f),g=0,y=[],S;for(S in m)!i(d,S)&&i(m,S)&&y.push(S);for(;h.length>g;)i(m,S=h[g++])&&(~c(y,S)||y.push(S));return y}},caad:function(o,s,a){var i=a("23e7"),l=a("4d64").includes,c=a("44d2"),d=a("ae40"),f=d("indexOf",{ACCESSORS:!0,1:0});i({target:"Array",proto:!0,forced:!f},{includes:function(m){return l(this,m,arguments.length>1?arguments[1]:void 0)}}),c("includes")},cc12:function(o,s,a){var i=a("da84"),l=a("861d"),c=i.document,d=l(c)&&l(c.createElement);o.exports=function(f){return d?c.createElement(f):{}}},ce4e:function(o,s,a){var i=a("da84"),l=a("9112");o.exports=function(c,d){try{l(i,c,d)}catch{i[c]=d}return d}},d012:function(o,s){o.exports={}},d039:function(o,s){o.exports=function(a){try{return!!a()}catch{return!0}}},d066:function(o,s,a){var i=a("428f"),l=a("da84"),c=function(d){return typeof d=="function"?d:void 0};o.exports=function(d,f){return arguments.length<2?c(i[d])||c(l[d]):i[d]&&i[d][f]||l[d]&&l[d][f]}},d1e7:function(o,s,a){var i={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c=l&&!i.call({1:2},1);s.f=c?function(f){var h=l(this,f);return!!h&&h.enumerable}:i},d28b:function(o,s,a){var i=a("746f");i("iterator")},d2bb:function(o,s,a){var i=a("825a"),l=a("3bbe");o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var c=!1,d={},f;try{f=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,f.call(d,[]),c=d instanceof Array}catch{}return function(m,g){return i(m),l(g),c?f.call(m,g):m.__proto__=g,m}}():void 0)},d3b7:function(o,s,a){var i=a("00ee"),l=a("6eeb"),c=a("b041");i||l(Object.prototype,"toString",c,{unsafe:!0})},d44e:function(o,s,a){var i=a("9bf2").f,l=a("5135"),c=a("b622"),d=c("toStringTag");o.exports=function(f,h,m){f&&!l(f=m?f:f.prototype,d)&&i(f,d,{configurable:!0,value:h})}},d58f:function(o,s,a){var i=a("1c0b"),l=a("7b0b"),c=a("44ad"),d=a("50c4"),f=function(h){return function(m,g,y,S){i(g);var w=l(m),x=c(w),T=d(w.length),k=h?T-1:0,C=h?-1:1;if(y<2)for(;;){if(k in x){S=x[k],k+=C;break}if(k+=C,h?k<0:T<=k)throw TypeError("Reduce of empty array with no initial value")}for(;h?k>=0:T>k;k+=C)k in x&&(S=g(S,x[k],k,w));return S}};o.exports={left:f(!1),right:f(!0)}},d784:function(o,s,a){a("ac1f");var i=a("6eeb"),l=a("d039"),c=a("b622"),d=a("9263"),f=a("9112"),h=c("species"),m=!l(function(){var x=/./;return x.exec=function(){var T=[];return T.groups={a:"7"},T},"".replace(x,"$<a>")!=="7"}),g=function(){return"a".replace(/./,"$0")==="$0"}(),y=c("replace"),S=function(){return/./[y]?/./[y]("a","$0")==="":!1}(),w=!l(function(){var x=/(?:)/,T=x.exec;x.exec=function(){return T.apply(this,arguments)};var k="ab".split(x);return k.length!==2||k[0]!=="a"||k[1]!=="b"});o.exports=function(x,T,k,C){var M=c(x),A=!l(function(){var G={};return G[M]=function(){return 7},""[x](G)!=7}),V=A&&!l(function(){var G=!1,ne=/a/;return x==="split"&&(ne={},ne.constructor={},ne.constructor[h]=function(){return ne},ne.flags="",ne[M]=/./[M]),ne.exec=function(){return G=!0,null},ne[M](""),!G});if(!A||!V||x==="replace"&&!(m&&g&&!S)||x==="split"&&!w){var P=/./[M],L=k(M,""[x],function(G,ne,W,D,U){return ne.exec===d?A&&!U?{done:!0,value:P.call(ne,W,D)}:{done:!0,value:G.call(W,ne,D)}:{done:!1}},{REPLACE_KEEPS_$0:g,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:S}),K=L[0],J=L[1];i(String.prototype,x,K),i(RegExp.prototype,M,T==2?function(G,ne){return J.call(G,this,ne)}:function(G){return J.call(G,this)})}C&&f(RegExp.prototype[M],"sham",!0)}},d81d:function(o,s,a){var i=a("23e7"),l=a("b727").map,c=a("1dde"),d=a("ae40"),f=c("map"),h=d("map");i({target:"Array",proto:!0,forced:!f||!h},{map:function(g){return l(this,g,arguments.length>1?arguments[1]:void 0)}})},da84:function(o,s,a){(function(i){var l=function(c){return c&&c.Math==Math&&c};o.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof i=="object"&&i)||Function("return this")()}).call(this,a("c8ba"))},dbb4:function(o,s,a){var i=a("23e7"),l=a("83ab"),c=a("56ef"),d=a("fc6a"),f=a("06cf"),h=a("8418");i({target:"Object",stat:!0,sham:!l},{getOwnPropertyDescriptors:function(g){for(var y=d(g),S=f.f,w=c(y),x={},T=0,k,C;w.length>T;)C=S(y,k=w[T++]),C!==void 0&&h(x,k,C);return x}})},dbf1:function(o,s,a){(function(i){a.d(s,"a",function(){return c});function l(){return typeof window<"u"?window.console:i.console}var c=l()}).call(this,a("c8ba"))},ddb0:function(o,s,a){var i=a("da84"),l=a("fdbc"),c=a("e260"),d=a("9112"),f=a("b622"),h=f("iterator"),m=f("toStringTag"),g=c.values;for(var y in l){var S=i[y],w=S&&S.prototype;if(w){if(w[h]!==g)try{d(w,h,g)}catch{w[h]=g}if(w[m]||d(w,m,y),l[y]){for(var x in c)if(w[x]!==c[x])try{d(w,x,c[x])}catch{w[x]=c[x]}}}}},df75:function(o,s,a){var i=a("ca84"),l=a("7839");o.exports=Object.keys||function(d){return i(d,l)}},e01a:function(o,s,a){var i=a("23e7"),l=a("83ab"),c=a("da84"),d=a("5135"),f=a("861d"),h=a("9bf2").f,m=a("e893"),g=c.Symbol;if(l&&typeof g=="function"&&(!("description"in g.prototype)||g().description!==void 0)){var y={},S=function(){var M=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),A=this instanceof S?new g(M):M===void 0?g():g(M);return M===""&&(y[A]=!0),A};m(S,g);var w=S.prototype=g.prototype;w.constructor=S;var x=w.toString,T=String(g("test"))=="Symbol(test)",k=/^Symbol\((.*)\)[^)]+$/;h(w,"description",{configurable:!0,get:function(){var M=f(this)?this.valueOf():this,A=x.call(M);if(d(y,M))return"";var V=T?A.slice(7,-1):A.replace(k,"$1");return V===""?void 0:V}}),i({global:!0,forced:!0},{Symbol:S})}},e163:function(o,s,a){var i=a("5135"),l=a("7b0b"),c=a("f772"),d=a("e177"),f=c("IE_PROTO"),h=Object.prototype;o.exports=d?Object.getPrototypeOf:function(m){return m=l(m),i(m,f)?m[f]:typeof m.constructor=="function"&&m instanceof m.constructor?m.constructor.prototype:m instanceof Object?h:null}},e177:function(o,s,a){var i=a("d039");o.exports=!i(function(){function l(){}return l.prototype.constructor=null,Object.getPrototypeOf(new l)!==l.prototype})},e260:function(o,s,a){var i=a("fc6a"),l=a("44d2"),c=a("3f8c"),d=a("69f3"),f=a("7dd0"),h="Array Iterator",m=d.set,g=d.getterFor(h);o.exports=f(Array,"Array",function(y,S){m(this,{type:h,target:i(y),index:0,kind:S})},function(){var y=g(this),S=y.target,w=y.kind,x=y.index++;return!S||x>=S.length?(y.target=void 0,{value:void 0,done:!0}):w=="keys"?{value:x,done:!1}:w=="values"?{value:S[x],done:!1}:{value:[x,S[x]],done:!1}},"values"),c.Arguments=c.Array,l("keys"),l("values"),l("entries")},e439:function(o,s,a){var i=a("23e7"),l=a("d039"),c=a("fc6a"),d=a("06cf").f,f=a("83ab"),h=l(function(){d(1)}),m=!f||h;i({target:"Object",stat:!0,forced:m,sham:!f},{getOwnPropertyDescriptor:function(y,S){return d(c(y),S)}})},e538:function(o,s,a){var i=a("b622");s.f=i},e893:function(o,s,a){var i=a("5135"),l=a("56ef"),c=a("06cf"),d=a("9bf2");o.exports=function(f,h){for(var m=l(h),g=d.f,y=c.f,S=0;S<m.length;S++){var w=m[S];i(f,w)||g(f,w,y(h,w))}}},e8b5:function(o,s,a){var i=a("c6b6");o.exports=Array.isArray||function(c){return i(c)=="Array"}},e95a:function(o,s,a){var i=a("b622"),l=a("3f8c"),c=i("iterator"),d=Array.prototype;o.exports=function(f){return f!==void 0&&(l.Array===f||d[c]===f)}},f5df:function(o,s,a){var i=a("00ee"),l=a("c6b6"),c=a("b622"),d=c("toStringTag"),f=l(function(){return arguments}())=="Arguments",h=function(m,g){try{return m[g]}catch{}};o.exports=i?l:function(m){var g,y,S;return m===void 0?"Undefined":m===null?"Null":typeof(y=h(g=Object(m),d))=="string"?y:f?l(g):(S=l(g))=="Object"&&typeof g.callee=="function"?"Arguments":S}},f772:function(o,s,a){var i=a("5692"),l=a("90e3"),c=i("keys");o.exports=function(d){return c[d]||(c[d]=l(d))}},fb15:function(o,s,a){if(a.r(s),typeof window<"u"){var i=window.document.currentScript;{var l=a("8875");i=l(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:l})}var c=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(a.p=c[1])}a("99af"),a("4de4"),a("4160"),a("c975"),a("d81d"),a("a434"),a("159b"),a("a4d3"),a("e439"),a("dbb4"),a("b64b");function d(pe,F,re){return F in pe?Object.defineProperty(pe,F,{value:re,enumerable:!0,configurable:!0,writable:!0}):pe[F]=re,pe}function f(pe,F){var re=Object.keys(pe);if(Object.getOwnPropertySymbols){var ge=Object.getOwnPropertySymbols(pe);F&&(ge=ge.filter(function(oe){return Object.getOwnPropertyDescriptor(pe,oe).enumerable})),re.push.apply(re,ge)}return re}function h(pe){for(var F=1;F<arguments.length;F++){var re=arguments[F]!=null?arguments[F]:{};F%2?f(Object(re),!0).forEach(function(ge){d(pe,ge,re[ge])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(re)):f(Object(re)).forEach(function(ge){Object.defineProperty(pe,ge,Object.getOwnPropertyDescriptor(re,ge))})}return pe}function m(pe){if(Array.isArray(pe))return pe}a("e01a"),a("d28b"),a("e260"),a("d3b7"),a("3ca3"),a("ddb0");function g(pe,F){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(pe)))){var re=[],ge=!0,oe=!1,ie=void 0;try{for(var be=pe[Symbol.iterator](),Y;!(ge=(Y=be.next()).done)&&(re.push(Y.value),!(F&&re.length===F));ge=!0);}catch(Ie){oe=!0,ie=Ie}finally{try{!ge&&be.return!=null&&be.return()}finally{if(oe)throw ie}}return re}}a("a630"),a("fb6a"),a("b0c0"),a("25f0");function y(pe,F){(F==null||F>pe.length)&&(F=pe.length);for(var re=0,ge=new Array(F);re<F;re++)ge[re]=pe[re];return ge}function S(pe,F){if(pe){if(typeof pe=="string")return y(pe,F);var re=Object.prototype.toString.call(pe).slice(8,-1);if(re==="Object"&&pe.constructor&&(re=pe.constructor.name),re==="Map"||re==="Set")return Array.from(pe);if(re==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(re))return y(pe,F)}}function w(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. |
| 58 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x(pe,F){return m(pe)||g(pe,F)||S(pe,F)||w()}function T(pe){if(Array.isArray(pe))return y(pe)}function k(pe){if(typeof Symbol<"u"&&Symbol.iterator in Object(pe))return Array.from(pe)}function C(){throw new TypeError(`Invalid attempt to spread non-iterable instance. |
| 59 |
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M(pe){return T(pe)||k(pe)||S(pe)||C()}var A=a("a352"),V=a.n(A);function P(pe){pe.parentElement!==null&&pe.parentElement.removeChild(pe)}function L(pe,F,re){var ge=re===0?pe.children[0]:pe.children[re-1].nextSibling;pe.insertBefore(F,ge)}var K=a("dbf1");a("13d5"),a("4fad"),a("ac1f"),a("5319");function J(pe){var F=Object.create(null);return function(ge){var oe=F[ge];return oe||(F[ge]=pe(ge))}}var G=/-(\w)/g,ne=J(function(pe){return pe.replace(G,function(F,re){return re.toUpperCase()})});a("5db7"),a("73d9");var W=["Start","Add","Remove","Update","End"],D=["Choose","Unchoose","Sort","Filter","Clone"],U=["Move"],te=[U,W,D].flatMap(function(pe){return pe}).map(function(pe){return"on".concat(pe)}),j={manage:U,manageAndEmit:W,emit:D};function ee(pe){return te.indexOf(pe)!==-1}a("caad"),a("2ca0");var X=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function ce(pe){return X.includes(pe)}function ae(pe){return["transition-group","TransitionGroup"].includes(pe)}function ye(pe){return["id","class","role","style"].includes(pe)||pe.startsWith("data-")||pe.startsWith("aria-")||pe.startsWith("on")}function ke(pe){return pe.reduce(function(F,re){var ge=x(re,2),oe=ge[0],ie=ge[1];return F[oe]=ie,F},{})}function Be(pe){var F=pe.$attrs,re=pe.componentData,ge=re===void 0?{}:re,oe=ke(Object.entries(F).filter(function(ie){var be=x(ie,2),Y=be[0];return be[1],ye(Y)}));return h(h({},oe),ge)}function le(pe){var F=pe.$attrs,re=pe.callBackBuilder,ge=ke(xe(F));Object.entries(re).forEach(function(ie){var be=x(ie,2),Y=be[0],Ie=be[1];j[Y].forEach(function(Re){ge["on".concat(Re)]=Ie(Re)})});var oe="[data-draggable]".concat(ge.draggable||"");return h(h({},ge),{},{draggable:oe})}function xe(pe){return Object.entries(pe).filter(function(F){var re=x(F,2),ge=re[0];return re[1],!ye(ge)}).map(function(F){var re=x(F,2),ge=re[0],oe=re[1];return[ne(ge),oe]}).filter(function(F){var re=x(F,2),ge=re[0];return re[1],!ee(ge)})}a("c740");function Me(pe,F){if(!(pe instanceof F))throw new TypeError("Cannot call a class as a function")}function De(pe,F){for(var re=0;re<F.length;re++){var ge=F[re];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(pe,ge.key,ge)}}function Ze(pe,F,re){return F&&De(pe.prototype,F),pe}var lt=function(F){var re=F.el;return re},ze=function(F,re){return F.__draggable_context=re},Pe=function(F){return F.__draggable_context},nt=function(){function pe(F){var re=F.nodes,ge=re.header,oe=re.default,ie=re.footer,be=F.root,Y=F.realList;Me(this,pe),this.defaultNodes=oe,this.children=[].concat(M(ge),M(oe),M(ie)),this.externalComponent=be.externalComponent,this.rootTransition=be.transition,this.tag=be.tag,this.realList=Y}return Ze(pe,[{key:"render",value:function(re,ge){var oe=this.tag,ie=this.children,be=this._isRootComponent,Y=be?{default:function(){return ie}}:ie;return re(oe,ge,Y)}},{key:"updated",value:function(){var re=this.defaultNodes,ge=this.realList;re.forEach(function(oe,ie){ze(lt(oe),{element:ge[ie],index:ie})})}},{key:"getUnderlyingVm",value:function(re){return Pe(re)}},{key:"getVmIndexFromDomIndex",value:function(re,ge){var oe=this.defaultNodes,ie=oe.length,be=ge.children,Y=be.item(re);if(Y===null)return ie;var Ie=Pe(Y);if(Ie)return Ie.index;if(ie===0)return 0;var Re=lt(oe[0]),Ne=M(be).findIndex(function(ot){return ot===Re});return re<Ne?0:ie}},{key:"_isRootComponent",get:function(){return this.externalComponent||this.rootTransition}}]),pe}(),Ot=a("8bbf");function _e(pe,F){var re=pe[F];return re?re():[]}function He(pe){var F=pe.$slots,re=pe.realList,ge=pe.getKey,oe=re||[],ie=["header","footer"].map(function(ot){return _e(F,ot)}),be=x(ie,2),Y=be[0],Ie=be[1],Re=F.item;if(!Re)throw new Error("draggable element must have an item slot");var Ne=oe.flatMap(function(ot,at){return Re({element:ot,index:at}).map(function(Et){return Et.key=ge(ot),Et.props=h(h({},Et.props||{}),{},{"data-draggable":!0}),Et})});if(Ne.length!==oe.length)throw new Error("Item slot must have only one child");return{header:Y,footer:Ie,default:Ne}}function Fe(pe){var F=ae(pe),re=!ce(pe)&&!F;return{transition:F,externalComponent:re,tag:re?Object(Ot.resolveComponent)(pe):F?Ot.TransitionGroup:pe}}function Ye(pe){var F=pe.$slots,re=pe.tag,ge=pe.realList,oe=pe.getKey,ie=He({$slots:F,realList:ge,getKey:oe}),be=Fe(re);return new nt({nodes:ie,root:be,realList:ge})}function qe(pe,F){var re=this;Object(Ot.nextTick)(function(){return re.$emit(pe.toLowerCase(),F)})}function dt(pe){var F=this;return function(re,ge){if(F.realList!==null)return F["onDrag".concat(pe)](re,ge)}}function vt(pe){var F=this,re=dt.call(this,pe);return function(ge,oe){re.call(F,ge,oe),qe.call(F,pe,ge)}}var bt=null,kt={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:function(F){return F}},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Lt=["update:modelValue","change"].concat(M([].concat(M(j.manageAndEmit),M(j.emit)).map(function(pe){return pe.toLowerCase()}))),Yt=Object(Ot.defineComponent)({name:"draggable",inheritAttrs:!1,props:kt,emits:Lt,data:function(){return{error:!1}},render:function(){try{this.error=!1;var F=this.$slots,re=this.$attrs,ge=this.tag,oe=this.componentData,ie=this.realList,be=this.getKey,Y=Ye({$slots:F,tag:ge,realList:ie,getKey:be});this.componentStructure=Y;var Ie=Be({$attrs:re,componentData:oe});return Y.render(Ot.h,Ie)}catch(Re){return this.error=!0,Object(Ot.h)("pre",{style:{color:"red"}},Re.stack)}},created:function(){this.list!==null&&this.modelValue!==null&&K.a.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted:function(){var F=this;if(!this.error){var re=this.$attrs,ge=this.$el,oe=this.componentStructure;oe.updated();var ie=le({$attrs:re,callBackBuilder:{manageAndEmit:function(Ie){return vt.call(F,Ie)},emit:function(Ie){return qe.bind(F,Ie)},manage:function(Ie){return dt.call(F,Ie)}}}),be=ge.nodeType===1?ge:ge.parentElement;this._sortable=new V.a(be,ie),this.targetDomElement=be,be.__draggable_component__=this}},updated:function(){this.componentStructure.updated()},beforeUnmount:function(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList:function(){var F=this.list;return F||this.modelValue},getKey:function(){var F=this.itemKey;return typeof F=="function"?F:function(re){return re[F]}}},watch:{$attrs:{handler:function(F){var re=this._sortable;re&&xe(F).forEach(function(ge){var oe=x(ge,2),ie=oe[0],be=oe[1];re.option(ie,be)})},deep:!0}},methods:{getUnderlyingVm:function(F){return this.componentStructure.getUnderlyingVm(F)||null},getUnderlyingPotencialDraggableComponent:function(F){return F.__draggable_component__},emitChanges:function(F){var re=this;Object(Ot.nextTick)(function(){return re.$emit("change",F)})},alterList:function(F){if(this.list){F(this.list);return}var re=M(this.modelValue);F(re),this.$emit("update:modelValue",re)},spliceList:function(){var F=arguments,re=function(oe){return oe.splice.apply(oe,M(F))};this.alterList(re)},updatePosition:function(F,re){var ge=function(ie){return ie.splice(re,0,ie.splice(F,1)[0])};this.alterList(ge)},getRelatedContextFromMoveEvent:function(F){var re=F.to,ge=F.related,oe=this.getUnderlyingPotencialDraggableComponent(re);if(!oe)return{component:oe};var ie=oe.realList,be={list:ie,component:oe};if(re!==ge&&ie){var Y=oe.getUnderlyingVm(ge)||{};return h(h({},Y),be)}return be},getVmIndexFromDomIndex:function(F){return this.componentStructure.getVmIndexFromDomIndex(F,this.targetDomElement)},onDragStart:function(F){this.context=this.getUnderlyingVm(F.item),F.item._underlying_vm_=this.clone(this.context.element),bt=F.item},onDragAdd:function(F){var re=F.item._underlying_vm_;if(re!==void 0){P(F.item);var ge=this.getVmIndexFromDomIndex(F.newIndex);this.spliceList(ge,0,re);var oe={element:re,newIndex:ge};this.emitChanges({added:oe})}},onDragRemove:function(F){if(L(this.$el,F.item,F.oldIndex),F.pullMode==="clone"){P(F.clone);return}var re=this.context,ge=re.index,oe=re.element;this.spliceList(ge,1);var ie={element:oe,oldIndex:ge};this.emitChanges({removed:ie})},onDragUpdate:function(F){P(F.item),L(F.from,F.item,F.oldIndex);var re=this.context.index,ge=this.getVmIndexFromDomIndex(F.newIndex);this.updatePosition(re,ge);var oe={element:this.context.element,oldIndex:re,newIndex:ge};this.emitChanges({moved:oe})},computeFutureIndex:function(F,re){if(!F.element)return 0;var ge=M(re.to.children).filter(function(Y){return Y.style.display!=="none"}),oe=ge.indexOf(re.related),ie=F.component.getVmIndexFromDomIndex(oe),be=ge.indexOf(bt)!==-1;return be||!re.willInsertAfter?ie:ie+1},onDragMove:function(F,re){var ge=this.move,oe=this.realList;if(!ge||!oe)return!0;var ie=this.getRelatedContextFromMoveEvent(F),be=this.computeFutureIndex(ie,F),Y=h(h({},this.context),{},{futureIndex:be}),Ie=h(h({},F),{},{relatedContext:ie,draggedContext:Y});return ge(Ie,re)},onDragEnd:function(){bt=null}}}),Pt=Yt;s.default=Pt},fb6a:function(o,s,a){var i=a("23e7"),l=a("861d"),c=a("e8b5"),d=a("23cb"),f=a("50c4"),h=a("fc6a"),m=a("8418"),g=a("b622"),y=a("1dde"),S=a("ae40"),w=y("slice"),x=S("slice",{ACCESSORS:!0,0:0,1:2}),T=g("species"),k=[].slice,C=Math.max;i({target:"Array",proto:!0,forced:!w||!x},{slice:function(A,V){var P=h(this),L=f(P.length),K=d(A,L),J=d(V===void 0?L:V,L),G,ne,W;if(c(P)&&(G=P.constructor,typeof G=="function"&&(G===Array||c(G.prototype))?G=void 0:l(G)&&(G=G[T],G===null&&(G=void 0)),G===Array||G===void 0))return k.call(P,K,J);for(ne=new(G===void 0?Array:G)(C(J-K,0)),W=0;K<J;K++,W++)K in P&&m(ne,W,P[K]);return ne.length=W,ne}})},fc6a:function(o,s,a){var i=a("44ad"),l=a("1d80");o.exports=function(c){return i(l(c))}},fdbc:function(o,s){o.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(o,s,a){var i=a("4930");o.exports=i&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}).default})}(Dd)),Dd.exports}var rz=nz();const H5=aa(rz),Wn=vl("formBuilderData",()=>{const n=N(null),e=N(!1),t=N([]),r=N(0),o=N(null),s=N("addField"),a=N(null),i=N("Blank form"),l=N(!0),c=N(!0),d=N(!1),f=N(!1),h=N(null),m=yl(),{getLabel:g}=rn(),y=W=>{o.value=t.value.find(D=>D.fieldIndex===W)||null,s.value="options"};function S(W){W.stopPropagation();const D=W.target,U=document.querySelectorAll(".ivyforms-form-builder__list-group__item");let te=!1;U.forEach(j=>{j.contains(D)&&(te=!0)}),te||(o.value=null)}const w=W=>{var D;return((D=o.value)==null?void 0:D.fieldIndex)===W},x=(W,D)=>{const U=t.value.findIndex(te=>{var j;return te.fieldIndex===((j=o.value)==null?void 0:j.fieldIndex)});U!==-1&&(t.value[U][W]=D)},T=W=>{const D=W.position??t.value.length+1;t.value.push({id:W.id,fieldIndex:W.fieldIndex,type:W.type,label:W.label,defaultValue:"",required:W.required||!1,placeholder:W.placeholder||"",position:D}),k()},k=()=>{t.value.forEach((W,D)=>{W.position=D+1})},C=()=>(r.value++,r.value);return{formId:n,fields:t,isEditing:e,selectedField:o,activeTab:s,counterFields:r,description:a,name:i,published:l,showTitle:c,showDescription:d,isEditingSettingGeneral:f,confirmationId:h,saveForm:async()=>{var D;const W={name:i.value||"Blank form",description:a.value||"",showTitle:c.value||!1,published:l.value||!1,showDescription:d.value||!1,fields:t.value.map(U=>({id:U.id,fieldIndex:U.fieldIndex,type:U.type,label:U.label,required:U.required,defaultValue:U.defaultValue,placeholder:U.placeholder,position:U.position}))};try{const U=await fetch("/wp-json/ivyforms/v1/form/add/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(W)}),te=await U.json();U.ok&&((D=te.data.data)!=null&&D.id)?(n.value=te.data.data.id,h.value=te.data.data.confirmationId,e.value=!0,f.value=!0,await m.push({hash:`manage/${n.value}`}),We({message:g("successfully_created_form"),type:"success"})):We({message:g("failed_save_form"),type:"error"})}catch(U){We({message:`${g("error_save_form")} ${U}`,type:"error"})}},loadForm:async W=>{try{const D=await fetch(`/wp-json/ivyforms/v1/form/${W}/`,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),U=await D.json();if(D.ok&&D.status==200&&U.data.data){n.value=W,e.value=!0,f.value=!0,i.value=U.data.data.name||"Blank form",a.value=U.data.data.description||"",l.value=U.data.data.published||!1,c.value=U.data.data.showTitle||!1,d.value=U.data.data.showDescription||!1,h.value=U.data.data.confirmationId||null;const te=U.data.data.fields;t.value=te.map((j,ee)=>({id:j.id,fieldIndex:j.fieldIndex,type:j.type,label:j.label,defaultValue:j.defaultValue||"",required:j.required||!1,placeholder:j.placeholder||"",position:j.position||ee+1})),r.value=0,te.length&&(r.value=Math.max(...te.map(j=>j.fieldIndex)))}else We({message:g("failed_to_tab_form"),type:"error"}),console.error(g("failed_to_tab_form"),U.data.message)}catch(D){We({message:g("error_loading_form"),type:"error"}),console.error(g("error_loading_form"),D)}},updateForm:async()=>{if(!n.value)return;const W={name:i.value||"Updated form",description:a.value||"",published:l.value||!1,showTitle:c.value||!1,showDescription:d.value||!1,fields:t.value?t.value:[]};try{const D=await fetch(`/wp-json/ivyforms/v1/form/update/${n.value}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(W)}),U=await D.json();D.ok?(We({message:g("successfully_updated_form"),type:"success"}),console.log(g("successfully_updated_form"),U.data.message)):(We({message:g("failed_to_update_form"),type:"error"}),console.error(g("failed_to_update_form"),U.data.message))}catch(D){We({message:g("error_updating_form"),type:"error"}),console.error(g("error_updating_form"),D)}},increaseCounter:C,addField:T,selectField:y,deselectField:S,isSelected:w,updateSelectedField:x,updateFieldPositions:k,moveFieldUp:W=>{const D=t.value.findIndex(U=>U.fieldIndex===W);if(D>0){const U=t.value[D];t.value[D]=t.value[D-1],t.value[D-1]=U,k()}},moveFieldDown:W=>{const D=t.value.findIndex(U=>U.fieldIndex===W);if(D<t.value.length-1){const U=t.value[D];t.value[D]=t.value[D+1],t.value[D+1]=U,k()}},deleteField:W=>{var U;const D=t.value.findIndex(te=>te.fieldIndex===W);D!==-1&&(t.value.splice(D,1),((U=o.value)==null?void 0:U.fieldIndex)===W&&(o.value=null),k())},duplicateField:W=>{const D=t.value.find(ee=>ee.fieldIndex===W);if(!D)return;const U=C(),te={...JSON.parse(JSON.stringify(D)),id:0,fieldIndex:U,label:D.label+" (copy)"},j=t.value.findIndex(ee=>ee.fieldIndex===W);t.value.splice(j+1,0,te),k()},saveFormSettings:async()=>{var D;const W={name:i.value||g("blank_form"),description:a.value||"",published:l.value||!1,showTitle:c.value||!1,showDescription:d.value||!1,fields:t.value.map(U=>({id:U.id,fieldIndex:U.fieldIndex,type:U.type,label:U.label,required:U.required,defaultValue:U.defaultValue,placeholder:U.placeholder,position:U.position}))};try{const U=await fetch("/wp-json/ivyforms/v1/form/add/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(W)}),te=await U.json();U.ok&&((D=te.data.data)!=null&&D.id)?(n.value=te.data.data.id,e.value=!0,f.value=!0,await m.push({hash:`/settings/general/manage/${n.value}`}),We({message:g("successfully_created_form"),type:"success"})):We({message:g("failed_save_form"),type:"error"})}catch(U){We({message:`${g("error_save_form")} ${U}`,type:"error"})}},resetForm:()=>{n.value=null,e.value=!1,t.value=[],r.value=0,o.value=null,s.value="addField",a.value=null,i.value="Blank form",l.value=!0,c.value=!0,d.value=!1,f.value=!1,h.value=null}}}),oz={class:"ivyforms-field__text"},az=ue({__name:"TextField",props:{fieldIndex:{}},setup(n){const e=n,t=Wn(),r=O(()=>t.fields.find(d=>d.fieldIndex===e.fieldIndex)),o=O(()=>{var d;return((d=r.value)==null?void 0:d.label)||""}),s=O(()=>{var d;return((d=r.value)==null?void 0:d.placeholder)||""}),a=O(()=>{var d;return((d=r.value)==null?void 0:d.required)||!1}),i=O(()=>{var d;return((d=r.value)==null?void 0:d.fieldIndex)??e.fieldIndex}),l=O(()=>{var d;return((d=r.value)==null?void 0:d.defaultValue)||""}),c=O(()=>{var d;return((d=r.value)==null?void 0:d.type)||"text"});return(d,f)=>{const h=oo,m=oa;return I(),z("div",oz,[R(m,{label:o.value,required:a.value},{default:q(()=>[R(h,{id:i.value,readonly:"",placeholder:s.value,"model-value":l.value,type:c.value},null,8,["id","placeholder","model-value","type"])]),_:1},8,["label","required"])])}}}),W2=sn(az,[["__scopeId","data-v-1ceaa4b4"]]),sz={class:"ivyforms-field__email"},iz=ue({__name:"EmailField",props:{fieldIndex:{}},setup(n){const e=n,t=Wn(),r=O(()=>t.fields.find(d=>d.fieldIndex===e.fieldIndex)),o=O(()=>{var d;return((d=r.value)==null?void 0:d.label)||""}),s=O(()=>{var d;return((d=r.value)==null?void 0:d.placeholder)||""}),a=O(()=>{var d;return((d=r.value)==null?void 0:d.required)||!1}),i=O(()=>{var d;return((d=r.value)==null?void 0:d.fieldIndex)??e.fieldIndex}),l=O(()=>{var d;return((d=r.value)==null?void 0:d.defaultValue)||""}),c=O(()=>{var d;return((d=r.value)==null?void 0:d.type)||"email"});return(d,f)=>{const h=oo,m=oa;return I(),z("div",sz,[R(m,{label:o.value,required:a.value},{default:q(()=>[R(h,{id:i.value,readonly:"",placeholder:s.value,"model-value":l.value,type:c.value},null,8,["id","placeholder","model-value","type"])]),_:1},8,["label","required"])])}}}),lz=sn(iz,[["__scopeId","data-v-950ae3eb"]]),uz={class:"ivyforms-field__numeric"},cz=ue({__name:"NumericField",props:{fieldIndex:{}},setup(n){const e=n,t=Wn(),r=O(()=>t.fields.find(d=>d.fieldIndex===e.fieldIndex)),o=O(()=>{var d;return((d=r.value)==null?void 0:d.label)||""}),s=O(()=>{var d;return((d=r.value)==null?void 0:d.placeholder)||""}),a=O(()=>{var d;return((d=r.value)==null?void 0:d.required)||!1}),i=O(()=>{var d;return((d=r.value)==null?void 0:d.fieldIndex)??e.fieldIndex}),l=O(()=>{var d;return((d=r.value)==null?void 0:d.type)||"number"}),c=O(()=>{var d;return((d=r.value)==null?void 0:d.defaultValue)||""});return(d,f)=>{const h=oo,m=oa;return I(),z("div",uz,[R(m,{label:o.value,required:a.value},{default:q(()=>[R(h,{id:i.value,readonly:"",placeholder:s.value,"model-value":c.value,type:l.value},null,8,["id","placeholder","model-value","type"])]),_:1},8,["label","required"])])}}}),dz=sn(cz,[["__scopeId","data-v-eba22f70"]]),fz={class:"ivyforms-field__paragraph"},pz=ue({__name:"ParagraphField",props:{fieldIndex:{}},setup(n){const e=n,t=Wn(),r=O(()=>t.fields.find(d=>d.fieldIndex===e.fieldIndex)),o=O(()=>{var d;return((d=r.value)==null?void 0:d.label)||""}),s=O(()=>{var d;return((d=r.value)==null?void 0:d.placeholder)||""}),a=O(()=>{var d;return((d=r.value)==null?void 0:d.required)||!1}),i=O(()=>{var d;return((d=r.value)==null?void 0:d.fieldIndex)??e.fieldIndex}),l=O(()=>{var d;return((d=r.value)==null?void 0:d.defaultValue)||""}),c=O(()=>{var d;return((d=r.value)==null?void 0:d.type)||"textarea"});return(d,f)=>{const h=oo,m=oa;return I(),z("div",fz,[R(m,{label:o.value,required:a.value},{default:q(()=>[R(h,{id:i.value,readonly:"",placeholder:s.value,"model-value":l.value,type:c.value},null,8,["id","placeholder","model-value","type"])]),_:1},8,["label","required"])])}}}),hz=sn(pz,[["__scopeId","data-v-fced026f"]]),mz={class:"ivyforms-field__phone"},vz=ue({__name:"PhoneField",props:{fieldIndex:{}},setup(n){const e=n,t=Wn(),r=O(()=>t.fields.find(d=>d.fieldIndex===e.fieldIndex)),o=O(()=>{var d;return((d=r.value)==null?void 0:d.label)||""}),s=O(()=>{var d;return((d=r.value)==null?void 0:d.placeholder)||"(___) __ - __ - __"}),a=O(()=>{var d;return((d=r.value)==null?void 0:d.required)||!1}),i=O(()=>{var d;return((d=r.value)==null?void 0:d.fieldIndex)??e.fieldIndex}),l=O(()=>{var d;return((d=r.value)==null?void 0:d.type)||"number"}),c=O(()=>{var d;return((d=r.value)==null?void 0:d.defaultValue)||""});return(d,f)=>{const h=oa;return I(),z("div",mz,[R(h,{label:o.value,required:a.value},{default:q(()=>[R(tM,{id:i.value,disabled:"",placeholder:s.value,"model-value":c.value,type:l.value},null,8,["id","placeholder","model-value","type"])]),_:1},8,["label","required"])])}}}),gz=sn(vz,[["__scopeId","data-v-19f51bc4"]]),yz={class:"ivyforms-dialog-wrapper"},bz={key:0,class:"ivyforms-dialog__header__title-wrapper"},Sz={key:1,class:"ivyforms-dialog__header__title-wrapper ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-8"},wz={class:"ivyforms-dialog__header__title ivyforms-flex ivyforms-gap-8 ivyforms-justify-content-between ivyforms-align-items-center"},Cz={class:"medium-18"},xz={key:0,class:"regular-16 ivyforms-text-secondary"},kz={key:2,class:"ivyforms-dialog__header__close"},Ez={key:0,class:"ivyforms-dialog__body"},Tz=ue({__name:"IvyDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},subtitle:{default:""},showClose:{type:Boolean,default:!0},width:{default:"500"},type:{default:"fill"}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=e,o=N(null),s=N(0),a=N(0),i=N(null),l=O({get(){return t.modelValue},set(f){r("update:modelValue",f)}}),c=()=>{s.value=0,d();const{direction:f,lengthY:h}=E5(o,{threshold:0,onSwipe(){f.value==="down"?s.value=Math.min(h.value,window.innerHeight):f.value==="up"&&(s.value=Math.max(s.value-h.value,0))},onSwipeEnd(){f.value==="down"&&Math.abs(h.value)>a.value/2?l.value=!1:s.value=0}});i.value.$el.nextSibling.querySelector(".el-overlay-dialog").scrollTo(0,0)},d=()=>{const f=document.querySelector(".ivyforms-dialog");f&&(a.value=f.clientHeight)};return(f,h)=>{const m=Jn,g=IS;return I(),z("div",yz,[R(g,xt({ref_key:"dialogRef",ref:i,modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=y=>l.value=y)},{...f.$attrs,...f.$props},{"show-close":!1,style:{bottom:s.value+"px"},class:["ivyforms-dialog",[`type-${t.type}`]],onOpen:h[2]||(h[2]=y=>c())}),Ts({header:q(()=>[Q("div",{ref_key:"dialogHeader",ref:o,class:"ivyforms-dialog__header"},[h[3]||(h[3]=Q("div",{class:"ivyforms-dialog__header__drag-handle"},null,-1)),f.$slots.header?(I(),z("div",bz,[ve(f.$slots,"header")])):fe("",!0),t.title&&!f.$slots.header?(I(),z("div",Sz,[Q("div",wz,[Q("span",Cz,Ee(t.title),1),ve(f.$slots,"titleButton")]),t.subtitle?(I(),z("span",xz,Ee(t.subtitle),1)):fe("",!0)])):fe("",!0),f.showClose?(I(),z("div",kz,[R(m,{priority:"tertiary",name:"close",type:"outline",size:"s",category:"global",color:"var(--map-base-dusk-symbol-2)",onClick:h[0]||(h[0]=y=>l.value=!1)})])):fe("",!0)],512)]),default:q(()=>[f.$slots.default?(I(),z("div",Ez,[ve(f.$slots,"default")])):fe("",!0)]),_:2},[f.$slots.footer?{name:"footer",fn:q(()=>[ve(f.$slots,"footer")]),key:"0"}:void 0]),1040,["modelValue","style","class"])])}}}),Mz={class:"action-buttons"},Iz=ue({__name:"IvyFieldUnit",props:{variant:{},type:{},fieldIndex:{}},setup(n){const e=Wn(),t=N(null),r=n,o=()=>{e.selectField(r.fieldIndex)},s=N(!1),a=()=>{r.fieldIndex!==void 0&&e.deleteField(r.fieldIndex),s.value=!1},i=N(!1),l=O(()=>e.isSelected(r.fieldIndex)),c=O(()=>{const f=r.fieldIndex,h=e.fields.find(y=>y.fieldIndex===f),m=e.fields.length;if(!h)return[];const g=h.position;return[{icon:"arrow-up",category:"arrows",type:"outline",hidden:m===1||g===1,handler:()=>{e.moveFieldUp(h.fieldIndex)}},{icon:"arrow-down",category:"arrows",type:"outline",hidden:m===1||g===m,handler:()=>{e.moveFieldDown(h.fieldIndex)}},{icon:"settings",category:"global",type:"outline",hidden:!1,handler:()=>{o()}},{icon:"copy",category:"global",type:"outline",hidden:!1,handler:()=>{e.duplicateField(h.fieldIndex)}},{icon:"trash",category:"global",type:"outline",hidden:!1,handler:()=>{s.value=!0}}]}),d=f=>{switch(f){case"text":return W2;case"email":return lz;case"number":return dz;case"textarea":return hz;case"phone":return gz;default:return W2}};return(f,h)=>(I(),z("div",{ref_key:"fieldRef",ref:t,class:H(["ivyforms-field-unit",{"is-hovered":i.value,"is-selected":l.value}]),onMouseover:h[2]||(h[2]=m=>i.value=!0),onMouseleave:h[3]||(h[3]=m=>i.value=!1),onClick:Qe(o,["stop"])},[(I(),me(nn(d(f.type)),{"field-index":f.fieldIndex,readonly:""},null,8,["field-index"])),an(Q("div",Mz,[(I(!0),z(it,null,Ht(c.value,(m,g)=>an((I(),me(Qt,{key:g,size:"d",class:H([{"ivyforms-drag-item":m.icon==="move"}]),priority:"white",type:"ghost","icon-only":"","icon-start":m.icon,"icon-start-category":m.category,"icon-start-type":m.type,onClick:Qe(m.handler,["stop","prevent"])},null,8,["class","icon-start","icon-start-category","icon-start-type","onClick"])),[[Qn,!m.hidden]])),128))],512),[[Qn,i.value||l.value]]),R(Tz,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=m=>s.value=m),title:"Delete Field",subtitle:"Are you sure you want to delete this field?","show-close":"","align-center":""},{footer:q(()=>[R(Qt,{priority:"tertiary",size:"d",type:"fill","full-width":!0,onClick:h[0]||(h[0]=m=>s.value=!1)},{default:q(()=>h[4]||(h[4]=[ht(" Cancel ")])),_:1}),R(Qt,{priority:"danger",size:"d",type:"fill","full-width":!0,onClick:Qe(a,["stop","prevent"])},{default:q(()=>h[5]||(h[5]=[ht(" Delete ")])),_:1})]),default:q(()=>[h[6]||(h[6]=Q("div",null,"Treba da se promeni.....",-1))]),_:1},8,["modelValue"])],34))}}),Oz=sn(Iz,[["__scopeId","data-v-cd29da2c"]]),_z={key:1},Az={class:"ivyforms-form-builder__submit-button"},Rz=ue({__name:"FormBuilder",setup(n){const{getLabel:e}=rn(),t=_s(),r=Wn(),o=O(()=>r.fields),s=N(!1),a=()=>e("empty_state_title");ln(async()=>{t.params.id&&(r.formId=t.params.id,r.fields.length||(r.counterFields=0))});const i=S=>"ivyforms-field-unit_"+r.formId+"_"+S.fieldIndex,l=()=>{s.value=!0},c=()=>{s.value=!1,y()},d=S=>{S.preventDefault(),document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(k=>{k.classList.remove("dragging-over-top","dragging-over-bottom")});const w=S.currentTarget,x=w.getBoundingClientRect();S.clientY-x.top<x.height/2?w.classList.add("dragging-over-top"):w.classList.add("dragging-over-bottom"),document.querySelectorAll(".action-buttons").forEach(k=>{k.classList.add("hidden")})},f=S=>{S.preventDefault(),[...document.querySelectorAll(".ivyforms-form-builder__list-group__item")].some(x=>x.matches(":hover"))||document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(x=>{x.classList.remove("dragging-over-top","dragging-over-bottom")})},h=S=>{S.preventDefault(),document.querySelectorAll(".ivyforms-form-builder__list-group__item").forEach(w=>{w.classList.remove("dragging-over-top","dragging-over-bottom")}),document.querySelectorAll(".action-buttons").forEach(w=>{w.classList.remove("hidden")})},m=S=>{r.selectField(S)},g=S=>{r.deselectField(S)},y=()=>{r.fields.forEach((S,w)=>{S.position=w+1})};return(S,w)=>{const x=cp,T=Qt,k=Zf;return I(),z("div",{class:"ivyforms-form-builder ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column",onClick:g},[R(k,null,{default:q(()=>[R(v(H5),{class:"ivyforms-form-builder__drop-area ivyforms-form-builder__list-group",list:o.value,group:"d_fields","item-key":"name","drag-class":"drag-class",onChange:y,onDragstart:l,onDragend:c},{item:q(({element:C})=>[Q("div",{class:"ivyforms-form-builder__list-group__item",onDragover:d,onDragleave:f,onDrop:h},[R(Oz,{id:i(C),variant:"default",type:C.type,"field-index":C.fieldIndex,onSelectField:m},null,8,["id","type","field-index"])],32)]),footer:q(()=>[o.value.length===0?(I(),z("div",{key:0,class:"ivyforms-form-builder__item__wrapper__empty",onDragover:d,onDragleave:f},[R(x,{title:a(),image:"form-builder"},null,8,["title"])],32)):fe("",!0),o.value.length!==0?(I(),z("div",_z,[Q("div",Az,[R(T,{priority:"tertiary",type:"border",readonly:"",onClick:w[0]||(w[0]=Qe(()=>{},["prevent"]))},{default:q(()=>[ht(Ee(v(e)("submit")),1)]),_:1})])])):fe("",!0)]),_:1},8,["list"])]),_:1})])}}}),Pz=sn(Rz,[["__scopeId","data-v-bc825ba2"]]),$z={class:"ivyforms-page-section-header ivyforms-flex ivyforms-flex-1"},Dz={class:"ivyforms-page-section-header__right"},Nz=ue({__name:"PageSectionHeader",setup(n){const{getLabel:e}=rn(),t=Wn(),r=()=>{if(!t.formId){We({message:e("form_id_not_found"),type:"error"});return}const o=`[ivyforms id=${t.formId}]`;navigator.clipboard?navigator.clipboard.writeText(o).then(()=>{We({message:e("shortcode_copied"),type:"success"})}):We({message:e("clipboard_api_not_supported"),type:"error"})};return(o,s)=>{const a=Qt,i=Xu;return I(),z("div",$z,[s[0]||(s[0]=Q("div",{class:"ivyforms-page-section-header__left"},null,-1)),Q("div",Dz,[R(i,{content:v(e)("copy_shortcode"),placement:"top"},{default:q(()=>[R(a,{size:"s",priority:"tertiary",type:"fill","icon-only":"","icon-start":"code","icon-start-category":"global","icon-start-type":"fill",onClick:Qe(r,["stop"])})]),_:1},8,["content"])])])}}}),Lz=sn(Nz,[["__scopeId","data-v-1ce4ac47"]]),Bz={},Fz={class:"ivyforms-page-section-wrapper ivyforms-flex ivyforms-flex-1 ivyforms-gap-8 ivyforms-flex-direction-column"};function Vz(n,e){const t=Lz,r=Pz,o=P1;return I(),z("div",Fz,[R(t),R(o,null,{default:q(()=>[R(r)]),_:1})])}const zz=sn(Bz,[["render",Vz]]),Hz=ue({__name:"PagePanel",props:{width:{type:[String,Number],default:"240px"}},setup(n){const e=n,t=O(()=>typeof e.width=="number"?`${e.width}px`:e.width);return(r,o)=>(I(),z("div",{class:"ivyforms-page-panel",style:en({width:t.value})},[ve(r.$slots,"default",{},void 0,!0)],4))}}),W5=sn(Hz,[["__scopeId","data-v-527370a4"]]),Wz=ue({__name:"FieldStyleTabContent",setup(n){const{getLabel:e}=rn();return(t,r)=>Ee(v(e)("style_data"))}}),Uz={key:0,class:"ivyforms-advanced-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},jz=ue({__name:"AdvancedFieldOptions",setup(n){const{getLabel:e}=rn(),{selectedField:t}=Xf(Wn()),{updateSelectedField:r}=Wn(),o=(s,a)=>{r(s,a)};return(s,a)=>{const i=oo,l=oa;return["text","email","number","textarea"].includes(v(t).type)?(I(),z("div",Uz,[R(l,{label:v(e)("default_value")},{default:q(()=>[["text","email","number"].includes(v(t).type)?(I(),me(i,{key:0,modelValue:v(t).defaultValue,"onUpdate:modelValue":a[0]||(a[0]=c=>v(t).defaultValue=c),onInput:a[1]||(a[1]=c=>o("defaultValue",c))},null,8,["modelValue"])):fe("",!0),v(t).type==="textarea"?(I(),me(i,{key:1,modelValue:v(t).defaultValue,"onUpdate:modelValue":a[2]||(a[2]=c=>v(t).defaultValue=c),type:"textarea"},null,8,["modelValue"])):fe("",!0)]),_:1},8,["label"])])):fe("",!0)}}}),Kz=sn(jz,[["__scopeId","data-v-ffd858a0"]]),Gz={},Yz={class:"ivyforms-divider"};function qz(n,e){return I(),z("div",Yz)}const Jz=sn(Gz,[["render",qz],["__scopeId","data-v-2f5ea421"]]),Xz={class:"ivyforms-general-field-options ivyforms-flex ivyforms-flex-direction-column ivyforms-gap-16"},Zz=ue({__name:"GeneralFieldOptions",setup(n){const{getLabel:e}=rn(),{selectedField:t}=Xf(Wn()),{updateSelectedField:r}=Wn(),o=(s,a)=>{r(s,a)};return(s,a)=>{const i=oo,l=oa,c=Jz,d=Xo;return I(),z("div",Xz,[R(l,{label:v(e)("label")},{default:q(()=>[R(i,{modelValue:v(t).label,"onUpdate:modelValue":a[0]||(a[0]=f=>v(t).label=f),onInput:a[1]||(a[1]=f=>o("label",f))},null,8,["modelValue"])]),_:1},8,["label"]),R(l,{label:v(e)("placeholder")},{default:q(()=>[R(i,{modelValue:v(t).placeholder,"onUpdate:modelValue":a[2]||(a[2]=f=>v(t).placeholder=f),onInput:a[3]||(a[3]=f=>o("placeholder",f))},null,8,["modelValue"])]),_:1},8,["label"]),R(c),R(d,{modelValue:v(t).required,"onUpdate:modelValue":a[4]||(a[4]=f=>v(t).required=f),priority:"secondary",type:"checkmark",onChange:a[5]||(a[5]=f=>o("required",f))},{default:q(()=>[ht(Ee(v(e)("required")),1)]),_:1},8,["modelValue"])])}}}),Qz=sn(Zz,[["__scopeId","data-v-c10bf1f0"]]),eH={class:"ivyforms-tab-label-wrapper"},tH=["id","aria-selected","aria-controls"],vp=ue({__name:"IvyTabs",props:{background:{type:Boolean,default:!1},comingSoon:{type:Boolean},priority:{default:"primary"},size:{default:"d"},type:{default:"filled"},modelValue:{},position:{default:"top"},addTab:{type:Boolean,default:!1},stretch:{type:Boolean,default:!0},minWidth:{default:"50px"},tabs:{}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=N([...t.tabs]),o=e,s=O({get:()=>t.modelValue,set:c=>o("update:modelValue",c)}),a=()=>{const c=`tab-${nM(6)}`;r.value.push({name:c,label:`Page ${r.value.length+1}`}),s.value=c},i=()=>{var c;r.value=r.value.filter(d=>d.name!==s.value),r.value.length>0&&(s.value=((c=r.value[0])==null?void 0:c.name)||"")};ln(()=>{document.addEventListener("keydown",l)}),Jf(()=>{document.removeEventListener("keydown",l)});const l=c=>{if(!r.value.length)return;const d=r.value.findIndex(f=>f.name===s.value);if(d!==-1){if(c.key==="ArrowRight"){let f=(d+1)%r.value.length;for(;r.value[f].disabled&&f!==d;)f=(f+1)%r.value.length;f!==d&&(s.value=r.value[f].name)}else if(c.key==="ArrowLeft"){let f=(d-1+r.value.length)%r.value.length;for(;r.value[f].disabled&&f!==d;)f=(f-1+r.value.length)%r.value.length;f!==d&&(s.value=r.value[f].name)}}};return(c,d)=>{const f=sL,h=aL,m=gl;return I(),z("div",{class:H(["ivyforms-tabs-wrapper",{"bg-transparent":!c.background}])},[R(h,{modelValue:s.value,"onUpdate:modelValue":d[0]||(d[0]=g=>s.value=g),type:"card","tab-position":c.position,addable:c.addTab,editable:c.addTab,stretch:c.stretch,class:H([`size-${c.size}`,"ivyforms-tabs-group",`priority-${c.priority}`,`type-${c.type}`,{"bg-transparent":!c.background}]),onTabAdd:a,onTabRemove:i},{default:q(()=>[(I(!0),z(it,null,Ht(r.value,g=>(I(),me(f,{id:`tab-panel-${g.name}`,key:g.name,name:g.name,"aria-labelledby":`tab-${g.name}`,role:"tabpanel","aria-live":"polite",disabled:g.disabled,type:{minWidth:t.minWidth},onClick:y=>!g.disabled&&(s.value=g.name)},{label:q(()=>{var y;return[Q("div",eH,[(y=g.iconConfig)!=null&&y.name?(I(),me(Jn,xt({key:0,ref_for:!0},g.iconConfig),null,16)):fe("",!0),Q("span",{id:`tab-${g.name}`,role:"tab","aria-selected":s.value===g.name,"aria-controls":`tab-panel-${g.name}`,tabindex:"0"},Ee(g.label),9,tH)])]}),default:q(()=>[ve(c.$slots,g.name)]),_:2},1032,["id","name","aria-labelledby","disabled","type","onClick"]))),128))]),_:3},8,["modelValue","tab-position","addable","editable","stretch","class"]),t.comingSoon?(I(),me(m,{key:0})):fe("",!0)],2)}}}),nH={key:0,class:"ivyforms-secondary-tab-menu"},rH={class:"ivyforms-secondary-tab-menu__tabs"},oH={class:"ivyforms-secondary-tab-menu__content"},aH={key:0},sH={key:1},iH={key:2},lH={key:1},uH=ue({__name:"FieldOptionsTabContent",props:{field:{default:null}},setup(n){const{getLabel:e}=rn(),t=()=>e("no_field_selected"),r=()=>e("please_select_field"),o=N("general"),s=[{name:"general",label:e("general")},{name:"advanced",label:e("advanced")}];return(a,i)=>{const l=vp,c=Qz,d=Kz,f=cp;return a.field?(I(),z("div",nH,[Q("div",rH,[R(l,{modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=h=>o.value=h),type:"tonal",priority:"secondary",tabs:s},null,8,["modelValue"])]),Q("div",oH,[o.value==="general"?(I(),z("div",aH,[R(c,{field:a.field},null,8,["field"])])):fe("",!0),o.value==="advanced"?(I(),z("div",sH,[R(d)])):fe("",!0),o.value==="smartLogic"?(I(),z("div",iH)):fe("",!0)])])):(I(),z("div",lH,[R(f,{title:t(),subtitle:r(),image:"fields"},null,8,["title","subtitle"])]))}}}),cH=sn(uH,[["__scopeId","data-v-ae0577bd"]]),dH=ue({__name:"IvyCollapse",props:{accordion:{type:Boolean,default:!1}},setup(n){const e=N(["1"]),t=n;return(r,o)=>{const s=SA;return I(),me(s,xt({modelValue:e.value,"onUpdate:modelValue":o[0]||(o[0]=a=>e.value=a),class:"ivyforms-collapse ivyforms-width-100"},r.$attrs,{accordion:t.accordion}),{default:q(()=>[ve(r.$slots,"default",{},void 0,!0)]),_:3},16,["modelValue","accordion"])}}}),fH=sn(dH,[["__scopeId","data-v-1086a760"]]),pH={class:"el-icon el-collapse-item__arrow"},hH={class:"ivyforms-collapse-item__title"},mH=ue({__name:"IvyCollapseItem",props:{disabled:{type:Boolean,default:!1},comingSoon:{type:Boolean,default:!1},title:{type:String,default:""}},setup(n){const e=n,t=O(()=>e.disabled||e.comingSoon);return(r,o)=>{const s=gl,a=wA;return I(),me(a,xt({class:["ivyforms-collapse-item",{"is-disabled":t.value}]},r.$attrs,{disabled:t.value}),{icon:q(({isActive:i})=>[e.comingSoon?(I(),me(s,{key:0,class:"ivyforms-collapse-item__coming-soon"})):fe("",!0),Q("i",pH,[(I(),me(nn(i?v(rM):v(oM)),{class:"icon"}))])]),title:q(()=>[Q("span",hH,[ve(r.$slots,"title",{},()=>[ht(Ee(e.title),1)],!0)])]),default:q(()=>[ve(r.$slots,"default",{},void 0,!0)]),_:3},16,["class","disabled"])}}}),vH=sn(mH,[["__scopeId","data-v-fcd88002"]]),gH=["disabled"],yH={class:"ivyforms-add-field__left-content"},bH={class:"ivyforms-add-field__name"},SH={class:"ivyforms-add-field__right-content"},wH=ue({__name:"IvyAddField",props:{type:{default:"fill"},disabled:{type:Boolean,default:!1},comingSoon:{type:Boolean},iconStart:{default:""},iconEnd:{default:""},iconStartCategory:{default:"global"},iconEndCategory:{default:"global"},iconStartType:{default:"fill"},iconEndType:{default:"fill"},fieldName:{default:""},fieldType:{default:"text"}},setup(n){const e=n;return(t,r)=>{const o=Jn,s=gl;return I(),z("button",{class:H(["ivyforms-add-field",["ivyforms-add-field__type__"+e.type,{"is-icon-start":e.iconStart,"is-icon-end":e.iconEnd}]]),disabled:e.disabled||e.comingSoon},[Q("span",yH,[e.iconStart?(I(),me(o,{key:0,name:e.iconStart,category:e.iconStartCategory,type:e.iconStartType,class:"ivyforms-add-field__icon-start",size:"d"},null,8,["name","category","type"])):fe("",!0),Q("span",bH,Ee(e.fieldName),1)]),Q("span",SH,[e.iconEnd?(I(),me(o,{key:0,name:e.iconEnd,category:e.iconEndCategory,type:e.iconEndType,class:"ivyforms-add-field__icon-end",size:"l"},null,8,["name","category","type"])):fe("",!0)]),e.comingSoon?(I(),me(s,{key:0,class:"ivyforms-add-field__coming-soon",size:"s"})):fe("",!0)],10,gH)}}}),CH=sn(wH,[["__scopeId","data-v-a73bdd2c"]]),xH={class:"ivyforms-add-field__drag-area ivyforms-flex-1"},kH=ue({__name:"AddFieldTabContent",setup(n){const{getLabel:e}=rn(),t=f=>f.filter(h=>!h.comingSoon),r=f=>f.filter(h=>h.comingSoon),o=f=>{const h=s.increaseCounter(),m=c({type:f},h),g=s.fields.find(y=>y.fieldIndex===m.fieldIndex);(s.fields.length===0||!g)&&s.addField({id:0,fieldIndex:m.fieldIndex,type:m.type,label:m.label||"",defaultValue:m.defaultValue||"",required:m.required||!1,placeholder:m.placeholder||"",position:s.fields.length+1}),a()},s=Wn(),a=()=>{s.fields.forEach((f,h)=>{f.position=h+1})},i=f=>{var g;const h=f.target,m=c(h.__draggable_context.element,s.counterFields);(g=f.dataTransfer)==null||g.setData("fieldData",JSON.stringify(m))},l=f=>{const h=s.increaseCounter();return c(f,h)},c=(f,h)=>{switch(f.type){case"text":return{id:0,fieldIndex:h,type:"text",label:e("text"),required:!1,defaultValue:"",placeholder:"",position:0};case"email":return{id:0,fieldIndex:h,type:"email",label:e("email"),required:!1,defaultValue:"",placeholder:"",position:0};case"number":return{id:0,fieldIndex:h,type:"number",label:e("number"),required:!1,defaultValue:"",placeholder:"",position:0};case"textarea":return{id:0,fieldIndex:h,type:"textarea",label:e("paragraph"),required:!1,defaultValue:"",placeholder:"",position:0};case"phone":return{id:0,fieldIndex:h,type:"phone",label:e("phone"),required:!1,defaultValue:"",placeholder:"",position:0}}},d=[{title:"General",name:"1",dragFields:[{type:"text",name:e("text"),iconStart:"field",iconStartType:"outline",iconStartCategory:"global"},{type:"email",name:e("email"),iconStart:"email",iconStartType:"outline",iconStartCategory:"global"},{type:"number",name:e("number"),iconStart:"hashtag",iconStartType:"outline",iconStartCategory:"global"},{type:"textarea",name:e("paragraph"),iconStart:"paragraph",iconStartType:"outline",iconStartCategory:"global"},{type:"phone",name:e("phone"),iconStart:"phone",iconStartType:"outline",iconStartCategory:"global"},{type:"name",name:e("name"),iconStart:"user",iconStartType:"outline",iconStartCategory:"global",comingSoon:!0},{type:"checkbox",name:e("checkbox"),iconStart:"checkbox",iconStartType:"outline",iconStartCategory:"global",comingSoon:!0},{type:"dropdown",name:e("dropdown"),iconStart:"chevron-square-down",iconStartType:"outline",iconStartCategory:"arrows",comingSoon:!0},{type:"radio",name:e("radio_button"),iconStart:"radio",iconStartType:"outline",iconStartCategory:"global",comingSoon:!0}]},{title:e("security"),name:"2",dragFields:[]}];return(f,h)=>{const m=CH,g=vH,y=fH;return I(),me(y,{accordion:!1},{default:q(()=>[(I(),z(it,null,Ht(d,(S,w)=>R(g,{key:w,title:S.title,name:S.name,"coming-soon":S.dragFields.length===0},{default:q(()=>[Q("div",xH,[R(v(H5),{class:"ivyforms-add-field__draggable-wrapper",list:t(S.dragFields),sort:!1,group:{name:"d_fields",pull:"clone",put:!1},clone:l,"item-key":"type",onDragstart:h[0]||(h[0]=x=>i(x))},{item:q(({element:x})=>[R(m,{"field-type":x.type,"field-name":x.name,"icon-start":x.iconStart,"icon-start-category":x.iconStartCategory,"icon-start-type":x.iconStartType,onClick:T=>o(x.type)},null,8,["field-type","field-name","icon-start","icon-start-category","icon-start-type","onClick"])]),_:2},1032,["list"]),(I(!0),z(it,null,Ht(r(S.dragFields),x=>(I(),me(m,{key:x.type,"field-type":x.type,"field-name":x.name,"icon-start":x.iconStart,"icon-start-category":x.iconStartCategory,"icon-start-type":x.iconStartType,"coming-soon":!0,disabled:!0},null,8,["field-type","field-name","icon-start","icon-start-category","icon-start-type"]))),128))])]),_:2},1032,["title","name","coming-soon"])),64))]),_:1})}}}),EH=sn(kH,[["__scopeId","data-v-4e6f8bba"]]),TH={class:"ivyforms-tabs-container"},MH={class:"ivyforms-tab-content"},IH={key:0},OH={key:1},_H={key:2},AH=ue({__name:"FormBuilderPagePanel",setup(n){const{getLabel:e}=rn(),t=Wn(),r=N("addField"),o=[{name:"addField",label:e("add_field")},{name:"options",label:e("options")},{name:"style",label:e("style"),disabled:!0}];return Xe(()=>t.selectedField,s=>{s&&(r.value="options")}),(s,a)=>{const i=vp,l=EH,c=cH,d=Wz,f=W5;return I(),me(f,{width:360},{default:q(()=>[Q("div",TH,[R(i,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=h=>r.value=h),background:"",type:"filled",priority:"primary",tabs:o,"coming-soon":!0},null,8,["modelValue"])]),Q("div",MH,[r.value==="addField"?(I(),z("div",IH,[R(l)])):fe("",!0),r.value==="options"?(I(),z("div",OH,[R(c,{field:v(t).selectedField},null,8,["field"])])):fe("",!0),r.value==="style"?(I(),z("div",_H,[R(d)])):fe("",!0)])]),_:1})}}}),RH=sn(AH,[["__scopeId","data-v-d99c0184"]]),PH=ue({__name:"IvyScrollbar",setup(n,{expose:e}){const t=N(null);return e({handleScroll:()=>{var c;(c=t.value)==null||c.handleScroll()},scrollTo:(c,d)=>{var f;(f=t.value)==null||f.scrollTo(c,d)},setScrollTop:c=>{var d;(d=t.value)==null||d.setScrollTop(c)},setScrollLeft:c=>{var d;(d=t.value)==null||d.setScrollLeft(c)},update:()=>{var c;(c=t.value)==null||c.update()},getWrapRef:()=>t.value.wrapRef}),(c,d)=>{const f=y1;return I(),me(f,xt({ref_key:"scrollbar",ref:t},{...c.$props,...c.$attrs}),{default:q(()=>[ve(c.$slots,"default")]),_:3},16)}}}),$H=["disabled"],DH={key:0,class:"ivyforms-button-option__spinner-container"},NH={key:2},wl=ue({__name:"IvyButtonOption",props:{priority:{default:"primary"},type:{default:"fill"},size:{default:"d"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},active:{type:Boolean,default:!1},iconStart:{default:""},iconEnd:{default:""},iconStartCategory:{default:"global"},iconEndCategory:{default:"global"},iconStartType:{default:"fill"},iconEndType:{default:"fill"},fullWidth:{type:Boolean,default:!1},iconOnly:{type:Boolean,default:!1}},setup(n){const e=n,t=()=>{(document==null?void 0:document.activeElement).blur()},r=o=>{o.preventDefault()};return(o,s)=>{const a=Jn;return I(),z("button",{class:H(["ivyforms-button-option",["ivyforms-button-option__priority__"+e.priority,"ivyforms-button-option__type__"+e.type,"ivyforms-button-option__size__"+e.size,{"is-active":e.active,"is-loading":e.loading,"is-icon-start":e.iconStart&&o.$slots.default&&!e.iconOnly,"is-icon-end":e.iconEnd&&o.$slots.default&&!e.iconOnly,"is-icon-only":(e.iconStart||e.iconEnd)&&!o.$slots.default||e.iconOnly}]]),disabled:e.disabled||e.loading,style:en({width:e.fullWidth?"100%":void 0}),onClick:t,onMousedown:r},[e.loading?(I(),z("span",DH,s[0]||(s[0]=[Q("svg",{viewBox:"0 0 50 50",class:"ivyforms-button-option__spinner"},[Q("circle",{class:"ivyforms-button-option__spinner__line",cx:"25",cy:"25",r:"22.5"})],-1)]))):fe("",!0),e.iconStart&&!e.loading?(I(),me(a,{key:1,name:e.iconStart,category:e.iconStartCategory,type:e.iconStartType,size:e.size,class:"ivyforms-button-option__icon-start"},null,8,["name","category","type","size"])):fe("",!0),o.$slots.default&&!e.iconOnly?(I(),z("span",NH,[ve(o.$slots,"default")])):fe("",!0),e.iconEnd?(I(),me(a,{key:3,name:e.iconEnd,category:e.iconEndCategory,type:e.iconEndType,size:e.size,class:"ivyforms-button-option__icon-end"},null,8,["name","category","type","size"])):fe("",!0),s[1]||(s[1]=Q("svg",{class:"ivyforms-button-option__transition",width:"100%",height:"100%",fill:"none"},[Q("g",null,[Q("rect",{width:"100%",height:"100%"})])],-1))],46,$H)}}}),LH=["onClick"],BH={class:"ivyforms-flex ivyforms-align-items-center ivyforms-gap-4"},FH={class:"ivyforms-filter-item-label"},VH={class:"ivyforms-filter-item-value"},zH={key:0,class:"ivyforms-filter-item-subtitle"},HH={class:"ivyforms-filter-item__children__items"},WH=["onClick"],UH={key:2,class:"ivyforms-filter-options--empty ivyforms-p-16"},jH={class:"ivyforms-filter-options--empty__text medium-14 ivyforms-mb-8 text-align-center"},KH={class:"ivyforms-filter-options--empty__text regular-12 text-align-center"},GH=ue({__name:"IvyFilterItems",props:{options:{},selectedItems:{},filterText:{},loading:{type:Boolean}},emits:["select"],setup(n,{emit:e}){const{getLabel:t}=rn(),r=h=>`${t("no_results_for")} ${h}`,o=n,s=e,a=N([]),i=O(()=>{const h=JSON.parse(JSON.stringify(o.options));return o.filterText?h.filter(m=>{if(m.children){const g=m.children.filter(y=>y.label.toLowerCase().includes(o.filterText.toLowerCase()));return m.children=g,g.length>0}return m.label.toLowerCase().includes(o.filterText.toLowerCase())}):h}),l=h=>{if(h.children){const m=d(h);for(const g of h.children)m&&c(g)||s("select",g.value);return}s("select",h.value)},c=h=>Array.isArray(o.selectedItems)?h.children?h.children.every(m=>o.selectedItems.includes(m.value)):o.selectedItems.includes(h.value):o.selectedItems===h.value,d=h=>Array.isArray(o.selectedItems)&&h.children?!h.children.every(m=>o.selectedItems.includes(m.value))&&h.children.some(m=>o.selectedItems.includes(m.value)):!1,f=h=>{const m=a.value.findIndex(g=>g===h);m===-1?a.value.push(h):a.value.splice(m,1)};return(h,m)=>{const g=wl,y=Jn,S=Xo,w=O5,x=I5;return I(),z("div",null,[h.loading?fe("",!0):(I(!0),z(it,{key:0},Ht(i.value,(T,k)=>(I(),z("div",{key:k,class:H(["ivyforms-filter-options",{"ivyforms-filter-options--parent":T.children}])},[Q("div",{class:H(["ivyforms-filter-item",{"ivyforms-filter-item--parent":T.children,"is-selected":c(T)&&!Array.isArray(o.selectedItems)}]),onClick:C=>T.children?void 0:l(T)},[Q("div",BH,[T.children?(I(),me(g,{key:0,type:"ghost","icon-start-type":"outline","icon-start":"arrow-down","icon-start-category":"arrows",size:"xs",class:H(["ivyforms-filter-item__collapse-button",{collapsed:a.value.includes(T.value)}]),onClick:C=>f(T.value)},null,8,["class","onClick"])):fe("",!0),T.icon?(I(),me(y,{key:1,name:T.icon,category:T.iconCategory||"global",color:T.iconColor,type:T.iconType,"outer-size":"20px"},null,8,["name","category","color","type"])):fe("",!0),Q("div",null,[Q("div",FH,[ht(Ee(T.label)+" ",1),Q("div",VH,Ee(T.labelId),1)]),T.subtitle?(I(),z("div",zH,Ee(T.subtitle),1)):fe("",!0)])]),Array.isArray(o.selectedItems)?(I(),me(S,{key:0,indeterminate:d(T),"model-value":c(T),onChange:C=>T.children?l(T):void 0},null,8,["indeterminate","model-value","onChange"])):fe("",!0)],10,LH),T.children?(I(),z("div",{key:0,class:H(["ivyforms-filter-item__children__wrapper",{collapsed:a.value.includes(T.value)}])},[Q("div",HH,[(I(!0),z(it,null,Ht(T.children,(C,M)=>(I(),z("div",{key:M,class:"ivyforms-filter-item",onClick:A=>l(C)},[ht(Ee(C.label)+" ",1),R(S,{"model-value":c(C)},null,8,["model-value"])],8,WH))),128))])],2)):fe("",!0)],2))),128)),h.loading?(I(),me(x,{key:1},{template:q(()=>[(I(),z(it,null,Ht(10,T=>Q("div",{key:T,class:"ivyforms-filter-options--parent ivyforms-py-8"},[R(w,{style:{height:"20px"}})])),64))]),_:1})):fe("",!0),!i.value.length&&!h.loading?(I(),z("div",UH,[Q("div",jH,Ee(r(h.filterText)),1),Q("div",KH,Ee(v(t)("try_adjusting_search")),1)])):fe("",!0)])}}}),YH={key:0,class:"ivyforms-filter__button__loading"},qH={key:0,class:"ivyforms-filter__button__placeholder"},JH={key:1,class:"ivyforms-filter__button__label"},XH={class:"ivyforms-text-cut"},ZH={key:2,class:"ivyforms-filter__button__clear ivyforms-filter__icon"},QH={key:3,class:"ivyforms-filter__button__arrow ivyforms-filter__icon"},eW={key:0,class:"ivyforms-filter__search"},U5=ue({__name:"IvyFilter",props:{modelValue:{},size:{default:"d"},priority:{default:"primary"},popperClass:{default:""},icon:{default:"filter"},iconCategory:{default:"global"},iconColor:{default:""},iconType:{default:"outline"},clearable:{type:Boolean},searchable:{type:Boolean,default:!0},disabled:{type:Boolean},placeholder:{default:""},loading:{type:Boolean},options:{},popoverWidth:{default:"272px"},showOnlyIcon:{type:Boolean},type:{default:"fill"},popperBackground:{default:"level-2-foreground"},isFullWidth:{type:Boolean,default:!1},remoteMethod:{}},emits:["update:modelValue","visibleChange","change"],setup(n,{emit:e}){const{getLabel:t}=rn(),r=n,o=e,s=N(!1),a=N(!1),i=N(null),l=N(null),c=N("");Iv(i,()=>{v(l)});const d=O({get(){return r.modelValue},set(k){o("update:modelValue",k),o("change",k)}}),f=O(()=>{const k=d.value;return r.clearable&&(Array.isArray(k)?k.length:k)}),h=O(()=>{const k=d.value;return Array.isArray(k)?k.length>0:!!k}),m=N(d.value),g=()=>{for(const k of r.options){if(k.children){for(const C of k.children)if(C.value===d.value[0])return C.label}if(k.value===(Array.isArray(d.value)?d.value[0]:d.value))return k.label}},y=()=>{r.clearable&&(Array.isArray(d.value)?d.value=[]:d.value=null,o("update:modelValue",Array.isArray(d.value)?[]:null))},S=()=>{Array.isArray(d.value)?m.value=[...d.value]:m.value=d.value,s.value=!0,T("")},w=()=>{s.value=!1,c.value=""},x=k=>{if(Array.isArray(d.value)){const C=d.value.findIndex(M=>M===k);C===-1?d.value.push(k):d.value.splice(C,1)}else d.value=k,l.value&&l.value.hide()},T=async k=>{r.remoteMethod&&(a.value=!0,await r.remoteMethod(k),a.value=!1)};return(k,C)=>{const M=wl,A=Jn,V=D1,P=GH,L=PH,K=Sl;return I(),z("div",{class:H(["ivyforms-filter",[`size-${r.size}`,{"is-clearable":f.value,"is-open":s.value,"has-value":Array.isArray(d.value)?d.value.length>0:d.value,"is-disabled":r.disabled,"is-icon-only":r.showOnlyIcon,"is-full-width":r.isFullWidth,"is-loading":r.loading}]])},[r.showOnlyIcon?(I(),me(M,{key:0,ref_key:"filterButtonRef",ref:i,"icon-start":r.icon,"icon-start-type":r.iconType,"icon-start-category":r.iconCategory,type:r.type,priority:r.priority,active:h.value,onClick:C[0]||(C[0]=J=>S())},null,8,["icon-start","icon-start-type","icon-start-category","type","priority","active"])):(I(),z("div",{key:1,ref_key:"filterButtonRef",ref:i,class:H(["ivyforms-filter__button",{"ivyforms-filter__button--border":r.type==="border","ivyforms-filter__button--loading":r.loading}]),onClick:C[1]||(C[1]=J=>S())},[r.loading?(I(),z("div",YH,C[5]||(C[5]=[Q("span",{class:"ivyforms-filter__button__spinner-container"},[Q("svg",{viewBox:"0 0 50 50",class:"ivyforms-filter__button__spinner"},[Q("circle",{class:"ivyforms-filter__button__spinner__line",cx:"25",cy:"25",r:"22.5"})])],-1)]))):fe("",!0),r.loading?fe("",!0):(I(),z(it,{key:1},[h.value?fe("",!0):(I(),z("span",qH,Ee(r.placeholder),1)),h.value?(I(),z("div",JH,[Q("span",XH,Ee(g()),1)])):fe("",!0)],64)),f.value&&!r.loading?(I(),z("div",ZH,[R(A,{class:"ivyforms-filter__icon",name:"close",size:"s",onClick:Qe(y,["stop"])})])):r.loading?fe("",!0):(I(),z("div",QH,[R(A,{priority:"tertiary",name:"chevron-down",type:"outline",category:"arrows",size:"s"})]))],2)),R(K,{ref_key:"filterPopoverRef",ref:l,trigger:"click",placement:"bottom-start","virtual-ref":i.value,"show-arrow":!1,width:k.popoverWidth,"virtual-triggering":"","popper-class":"ivyforms-filter-popover","popper-background":r.popperBackground,"is-with-scrollbar":!1,onBeforeEnter:C[3]||(C[3]=J=>s.value=!0),onAfterLeave:C[4]||(C[4]=J=>w())},{default:q(()=>[k.searchable?(I(),z("div",eW,[R(V,{modelValue:c.value,"onUpdate:modelValue":[C[2]||(C[2]=J=>c.value=J),T],placeholder:v(t)("search"),"should-collapse-on-mobile":!1},null,8,["modelValue","placeholder"])])):fe("",!0),R(L,null,{default:q(()=>[R(P,{class:"ivyforms-filter-popover__items",options:k.options,"selected-items":d.value,"filter-text":c.value,loading:a.value,onSelect:x},null,8,["options","selected-items","filter-text","loading"])]),_:1})]),_:1},8,["virtual-ref","width","popper-background"])],2)}}}),gp=vl("notificationSettingBuilder",()=>{const n=N([]),e=N("New Notification"),t=N(""),r=N(""),o=N(!1),s=N(""),a=N(""),i=N(!1),l=N(null),c=N(null),d=N(!1),{getLabel:f}=rn();return{allNotifications:n,name:e,sender:t,receiver:r,status:o,subject:s,message:a,smartLogic:i,formId:l,id:c,isEditing:d,fetchAllFormNotifications:async k=>{try{const C=k?`/wp-json/ivyforms/v1/notifications/${k}`:"/wp-json/ivyforms/v1/notifications",M=await fetch(C,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}});if(!M.ok){We({message:`${f("failed_to_fetch_notification")} ${M.statusText}`,type:"error"});return}const A=await M.json();A&&A.data?n.value=A.data.data:(n.value=[],We({message:`${f("unexpected_response_structure")} ${A}`,type:"error"}))}catch(C){We({message:`${f("failed_to_fetch_notification")} ${C}`,type:"error"})}},fetchAllNotifications:async()=>{try{const C=await fetch("/wp-json/ivyforms/v1/notifications",{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}});if(!C.ok){We({message:`${f("failed_to_fetch_notification")} ${C.statusText}`,type:"error"});return}const M=await C.json();M&&M.data?n.value=M.data.data:(n.value=[],We({message:`${f("unexpected_response_structure")} ${M}`,type:"error"}))}catch(k){We({message:`${f("failed_to_fetch_notification")} ${k}`,type:"error"})}},resetNotification:k=>{e.value=f("new_notification"),t.value="",r.value="",o.value=!0,s.value=f("new_notification"),a.value="{all_data}",i.value=!1,l.value=k,c.value=null,d.value=!1},createNotification:async k=>{const C={name:e.value||f("new_notification"),sender:t.value||"",receiver:r.value||"",status:o.value||!1,subject:s.value||f("new_notification"),message:a.value||"",smartLogic:i.value||!1,formId:k||null};try{const M=await fetch("/wp-json/ivyforms/v1/notification/add/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(C)}),A=await M.json();M.ok?(c.value=A.data.data.id,n.value.push(A.data),We({message:f("create_notification"),type:"success"})):We({message:`${f("failed_create_notification")} ${A.message}`,type:"error"})}catch(M){We({message:`${f("creating_error_notification")} ${M}`,type:"error"})}},updateNotification:async(k,C)=>{try{const M=await fetch(`/wp-json/ivyforms/v1/notification/update/${k}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(C)}),A=await M.json();M.ok?We({message:f("update_notification"),type:"success"}):We({message:`${f("failed_to_update_notification")} ${A.message}`,type:"error"})}catch(M){We({message:`${f("updating_error_notification")} ${M}`,type:"error"})}},deleteNotifications:async k=>{try{const C=await fetch(`/wp-json/ivyforms/v1/notification/delete/${k}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify({id:k})}),M=await C.json();C.ok?(We({message:f("delete_notification"),type:"success"}),n.value.length===1?n.value=[]:n.value.push(M.data)):We({message:`${f("failed_deleting_notification")} ${M.message}`,type:"error"})}catch(C){We({message:`${f("error_deleting_notification")} ${C}`,type:"error"})}},loadNotification:async k=>{try{const C=await fetch(`/wp-json/ivyforms/v1/notification/${k}`,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),M=await C.json();C.ok&&C.status==200&&M.data.data?(l.value=M.data.data.formId,c.value=k,e.value=M.data.data.name||"New Notification",t.value=M.data.data.sender||"",r.value=M.data.data.receiver||"",o.value=M.data.data.status||!1,s.value=M.data.data.subject||"New Notification",a.value=M.data.data.message||"",i.value=!1,d.value=!0):We({message:`${f("failed_to_load_notification")} ${M.message}`,type:"error"})}catch(C){We({message:`${f("failed_to_load_notification")} ${C}`,type:"error"})}},duplicateNotification:async k=>{try{const C=await fetch(`/wp-json/ivyforms/v1/notification/duplicate/${k}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),M=await C.json();C.ok?(We({message:f("duplicated_notification"),type:"success"}),n.value.push(M.data)):We({message:`${f("failed_to_duplicate_notification")} ${M.message}`,type:"error"})}catch(C){We({message:`${f("updating_duplicate_notification")} ${C}`,type:"error"})}}}}),yp=vl("confirmationSettingBuilder",()=>{const n=N([]),e=N(null),t=N(null),r=N("successMessage"),o=N(!0),s=N(!1),a=N(""),i=N(""),l=N(""),c=N(!1),{getLabel:d}=rn();return{allConfirmations:n,id:e,formId:t,type:r,status:o,showForm:s,message:a,url:i,page:l,isEditing:c,fetchAllConfirmations:async x=>{try{const T=await fetch(`/wp-json/ivyforms/v1/confirmations/${x}`,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),k=await T.json();T.ok&&T.status==200&&k.data?(e.value=k.data[0][0].id,t.value=k.data[0][0].formId,r.value=k.data[0][0].type||"successMessage",o.value=k.data[0][0].status||!1,s.value=k.data[0][0].showForm||!1,a.value=k.data[0][0].message||"",i.value=k.data[0][0].url||"",l.value=k.data[0][0].page||"",c.value=!0):We({message:`${d("failed_to_fetch_confirmation")} ${k.message}`,type:"error"})}catch(T){We({message:`${d("failed_to_fetch_confirmation")} ${T}`,type:"error"})}},resetConfirmation:()=>{e.value=null,t.value=null,r.value="",o.value=!0,s.value=!1,a.value="",i.value="",l.value="",c.value=!1},createConfirmation:async()=>{const x={formId:t.value??null,type:r.value||"",status:o.value||!1,showForm:s.value||!1,message:a.value||"",url:i.value||"",page:l.value||""};try{const T=await fetch("/wp-json/ivyforms/v1/confirmation/add/",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(x)}),k=await T.json();T.ok?(e.value=k.data.data.id,n.value.push(k.data),We({message:d("create_confirmation"),type:"success"})):We({message:`${d("failed_to_create_confirmation")} ${k.message}`,type:"error"})}catch(T){We({message:`${d("create_error_confirmation")} ${T}`,type:"error"})}},updateConfirmation:async(x,T)=>{try{const k=await fetch(`/wp-json/ivyforms/v1/confirmation/update/${x}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify(T)}),C=await k.json();k.ok?We({message:d("update_confirmation"),type:"success"}):We({message:`${d("creating_error_confirmation")} ${C.message}`,type:"error"})}catch(k){We({message:`${d("failed_to_update_confirmation")} ${k}`,type:"error"})}},deleteConfirmation:async x=>{try{const T=await fetch(`/wp-json/ivyforms/v1/confirmation/delete/${x}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce},body:JSON.stringify({id:x})}),k=await T.json();T.ok?(We({message:d("delete_confirmation"),type:"success"}),n.value=n.value.filter(C=>C.id!==x)):We({message:`${d("failed_to_delete_confirmation")} ${k.message}`,type:"error"})}catch(T){We({message:`${d("error_delete_confirmation")} ${T}`,type:"error"})}},loadConfirmation:async x=>{try{const T=await fetch(`/wp-json/ivyforms/v1/confirmation/${x}`,{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),k=await T.json();T.ok&&T.status==200&&k.data.data?(e.value=x,t.value=k.data.data.formId,r.value=k.data.data.type||"successMessage",o.value=k.data.data.status||!1,s.value=k.data.data.showForm||!1,a.value=k.data.data.message||"",i.value=k.data.data.url||"",l.value=k.data.data.page||"",c.value=!0):We({message:`${d("failed_to_load_confirmation")} ${k.message}`,type:"error"})}catch(T){We({message:`${d("failed_to_load_confirmation")} ${T}`,type:"error"})}},duplicateConfirmation:async x=>{try{const T=await fetch(`/wp-json/ivyforms/v1/confirmation/duplicate/${x}/`,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}}),k=await T.json();T.ok?(We({message:d("updating_duplicated_confirmation"),type:"success"}),n.value.push(k.data)):We({message:`${d("failed_to_duplicate_confirmation")} ${k.message}`,type:"error"})}catch(T){We({message:`${d("error_duplicate_confirmation")} ${T}`,type:"error"})}}}}),tW=ue({__name:"FormBuilderPage",setup(n){const{getLabel:e}=rn(),t=yl(),r=[{label:e("build"),index:"build"},{label:e("settings"),index:"settings"},{label:e("results"),index:"results"}],o=N("build"),s=N([]),a=N(!1),i=N(!1),l=Wn(),c=ip(),d=dp(),f=gp(),h=yp(),m=O(()=>l.formId),g=async()=>{a.value=!0;try{await d.fetchForms({page:1,perPage:100}),s.value=d.tableData.map(k=>({value:k.id,labelId:`${e("id")}: ${k.id}`,label:k.name||`Form #${k.id}`}))}catch(k){console.error(e("failed_to_fetch_form"),k),We({message:e("failed_to_fetch_form"),type:"error"})}finally{a.value=!1}},y=async k=>{if(!k){l.resetForm(),f.allNotifications=[],f.formId=null,h.allConfirmations=[],h.formId=null,await t.push({path:"/"});return}i.value=!0;try{await l.loadForm(k),t.currentRoute.value.path.includes("/settings/general/")||t.currentRoute.value.path.includes("/settings/notification/manage")||t.currentRoute.value.path.includes("/settings/confirmation/manage")?(await t.push({path:`/settings/general/manage/${k}`}),We({message:e("form_loaded_successfully"),type:"success"})):t.currentRoute.value.path.includes("/settings/notification/")?(await f.fetchAllFormNotifications(parseInt(k)),await t.push({path:`/settings/notification/${k}`}),We({message:e("notification_loaded"),type:"success"})):(await t.push({path:`/manage/${k}`}),We({message:e("form_loaded_successfully"),type:"success"}))}catch(C){console.error(e("failed_to_load_form"),C),We({message:e("failed_to_load_form"),type:"error"})}finally{i.value=!1}},S=k=>{o.value=k;const C=l.formId;k==="settings"&&(C?window.location.href=`/wp-admin/admin.php?page=ivyforms-builder#/settings/general/manage/${C}`:window.location.href="/wp-admin/admin.php?page=ivyforms-builder#/settings/general")},w=async()=>{i.value=!0;try{await l.saveForm(),await g()}finally{i.value=!1}},x=async()=>{i.value=!0;try{await l.updateForm(),await g()}finally{i.value=!1}},T=()=>{l.formId||We({message:e("first_save_form"),type:"error"}),window.open(`/?ivyforms_preview=${l.formId}&_wpNonce=${wpIvyApiSettings.nonce}`,"_blank")};return ln(()=>{g(),l.formId&&l.loadForm(l.formId),c.setCurrentPage("FormBuilderPage")}),Xe(()=>l.name,k=>{if(k&&l.formId){const C=s.value.findIndex(M=>M.value===l.formId);C!==-1&&(s.value[C].label=k)}}),(k,C)=>{const M=U5,A=hp,V=pp,P=Qt,L=Xu,K=sp,J=lp,G=RH,ne=zz;return I(),z(it,null,[R(J,null,{left:q(()=>[R(M,{modelValue:m.value,"onUpdate:modelValue":C[0]||(C[0]=W=>m.value=W),size:"s",type:"border",placeholder:v(e)("select_form"),options:s.value,loading:a.value||i.value,onChange:y},null,8,["modelValue","placeholder","options","loading"])]),center:q(()=>[R(V,{mode:"horizontal",ellipsis:!1},{default:q(()=>[(I(),z(it,null,Ht(r,W=>R(A,{key:W.index,label:W.label,name:W.index,type:"tonal","is-active":o.value===W.index,"coming-soon":W.index==="results",onClick:D=>S(W.index)},null,8,["label","name","is-active","coming-soon","onClick"])),64))]),_:1})]),right:q(()=>[R(L,{content:v(e)("preview_form"),placement:"bottom"},{default:q(()=>[R(P,{priority:"tertiary","icon-start":"eye-opened","icon-start-type":"outline",onClick:T})]),_:1},8,["content"]),v(l).isEditing?(I(),me(P,{key:0,class:H(["ivyforms-button__action--update"]),priority:"primary",loading:i.value,onClick:x},{default:q(()=>[i.value?fe("",!0):(I(),z(it,{key:0},[ht(Ee(v(e)("update")),1)],64))]),_:1},8,["loading"])):(I(),me(P,{key:1,class:H(["ivyforms-button__action--save"]),priority:"primary",loading:i.value,onClick:w},{default:q(()=>[i.value?fe("",!0):(I(),z(it,{key:0},[ht(Ee(v(e)("save")),1)],64))]),_:1},8,["loading"])),R(K)]),_:1}),Q("div",{class:H(["ivyforms-form-builder-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":v(c).isFullScreenMode}])},[R(G),R(ne)],2)],64)}}}),U2=sn(tW,[["__scopeId","data-v-cc4b9706"]]),nW=ue({__name:"FormSettingsPageSection",emits:["update:isAddingNotification"],setup(n,{emit:e}){const t=e,r=()=>{t("update:isAddingNotification",!1)},o=_s(),s=O(()=>["/general/","/notification/manage","/confirmation/manage"].some(l=>o.path.includes(l))?!1:["/notification/","/confirmation/"].some(l=>o.path.includes(l)));return(a,i)=>{const l=Jo("router-view"),c=P1;return I(),me(c,{"has-table":s.value},{default:q(()=>[R(l,null,{default:q(({Component:d})=>[(I(),me(nn(d),{onCreated:r},null,32))]),_:1})]),_:1},8,["has-table"])}}}),rW=ue({__name:"FormSettingsPagePanel",props:{activeIndex:{}},emits:["update:activeIndex"],setup(n,{emit:e}){const{getLabel:t}=rn(),r=N("vertical"),o=n,s=e,a=[{label:t("general_settings"),index:"general"},{label:t("notifications"),index:"notifications"},{label:t("confirmations"),index:"confirmations"}],i=Wn(),l=yp(),c=_s(),d=yl(),f=h=>{s("update:activeIndex",h);const m=i.formId||c.params.id,g=l.id||i.confirmationId;h==="general"?d.push({path:`/settings/general/manage/${m}`}):h==="notifications"?d.push({path:`/settings/notification/${m}`}):h==="confirmations"&&d.push({path:`/settings/confirmation/manage/${g}`})};return(h,m)=>{const g=hp,y=pp,S=W5;return I(),me(S,null,{default:q(()=>[R(y,{mode:r.value,ellipsis:!1,class:"ivyforms-form-builder-settings__menu"},{default:q(()=>[(I(),z(it,null,Ht(a,w=>R(g,{key:w.index,label:w.label,name:w.index,type:"tonal","is-active":o.activeIndex===w.index,onClick:x=>f(w.index)},null,8,["label","name","is-active","onClick"])),64))]),_:1},8,["mode"])]),_:1})}}}),oW=ue({__name:"FormBuilderSettingsPage",setup(n){const{getLabel:e}=rn(),t=Wn(),r=ip(),o=dp(),s=gp(),a=yp(),i=N("settings"),l=N("general"),c=N(!1),d=N("horizontal"),f=_s(),h=yl(),m=O(()=>t.formId||null),g=N([]),y=N(!1),S=N(!1),w=[{label:e("build"),index:"build"},{label:e("settings"),index:"settings"},{label:e("results"),index:"results"}],x=A=>{i.value=A,A==="build"&&(t.formId?h.push({path:`/manage/${t.formId}`}):h.push({path:"/"}))},T=A=>{l.value=A},k=()=>{t.formId||We({message:e("first_save_form"),type:"error"}),window.open(`/?ivyforms_preview=${t.formId}&_wpNonce=${wpIvyApiSettings.nonce}`,"_blank")},C=async A=>{if(!A){t.resetForm(),s.allNotifications=[],s.formId=null,a.allConfirmations=[],a.formId=null,await h.push({path:"/"});return}S.value=!0;try{await t.loadForm(A),h.currentRoute.value.path.includes("/settings/general/")||h.currentRoute.value.path.includes("/settings/notification/manage")||h.currentRoute.value.path.includes("/settings/confirmation/manage")?(await h.push({path:`/settings/general/manage/${A}`}),l.value="general",We({message:e("form_loaded_successfully"),type:"success"})):h.currentRoute.value.path.includes("/settings/notification/")?(await s.fetchAllFormNotifications(parseInt(A)),await h.push({path:`/settings/notification/${A}`}),We({message:e("notification_loaded"),type:"success"})):(await h.push({path:`/manage/${A}`}),We({message:e("form_loaded_successfully"),type:"success"}))}catch(V){console.error(e("failed_to_load_form"),V),We({message:e("failed_to_load_form"),type:"error"})}finally{S.value=!1}},M=async()=>{y.value=!0;try{await o.fetchForms({page:1,perPage:100}),g.value=o.tableData.map(A=>({value:A.id,label:A.name||`Form #${A.id}`}))}catch(A){console.error(e("failed_to_load_form"),A),We({message:e("failed_to_fetch_form"),type:"error"})}finally{y.value=!1}};return ln(async()=>{await M(),t.formId||(t.counterFields=0)}),Xe(()=>t.name,A=>{if(A&&t.formId){const V=g.value.findIndex(P=>P.value===t.formId);V!==-1&&(g.value[V].label=A)}}),Xe(()=>f.hash,A=>{A.includes("/notification")?(l.value="notifications",c.value=!0):A.includes("/confirmation")?(l.value="confirmations",c.value=!1):A.includes("/general")&&(l.value="general",c.value=!1)},{immediate:!0}),(A,V)=>{const P=U5,L=hp,K=pp,J=Qt,G=Xu,ne=sp,W=lp,D=rW,U=nW;return I(),z(it,null,[R(W,null,{left:q(()=>[R(P,{modelValue:m.value,"onUpdate:modelValue":V[0]||(V[0]=te=>m.value=te),size:"s",type:"border",placeholder:"Select a form",options:g.value,loading:y.value||S.value,onChange:C},null,8,["modelValue","options","loading"])]),center:q(()=>[R(K,{mode:d.value,ellipsis:!1},{default:q(()=>[(I(),z(it,null,Ht(w,te=>R(L,{key:te.index,label:te.label,name:te.index,type:"tonal","is-active":i.value===te.index,"coming-soon":te.index==="results",onClick:j=>x(te.index)},null,8,["label","name","is-active","coming-soon","onClick"])),64))]),_:1},8,["mode"])]),right:q(()=>[R(G,{content:v(e)("preview_form"),placement:"bottom"},{default:q(()=>[R(J,{priority:"tertiary","icon-start":"eye-opened","icon-start-type":"outline",onClick:k})]),_:1},8,["content"]),R(ne)]),_:1}),Q("div",{class:H(["ivyforms-form-builder-settings-page ivyforms-flex ivyforms-gap-8 ivyforms-p-8",{"ivyforms-fullscreen-mode":v(r).isFullScreenMode}])},[(I(),me(D,{key:m.value,"active-index":l.value,"onUpdate:activeIndex":T},null,8,["active-index"])),R(U,{"active-index":l.value,"is-adding-notification":c.value},null,8,["active-index","is-adding-notification"])],2)],64)}}}),aW=sn(oW,[["__scopeId","data-v-7c5a62c5"]]),V1=ue({__name:"IvySelectInput",props:{modelValue:{},label:{default:""},placeholder:{default:""},iconStart:{default:""},iconEnd:{default:""},iconStartCategory:{default:"global"},iconEndCategory:{default:"global"},avatar:{default:""},iconStartType:{default:"outline"},iconEndType:{default:"outline"},filled:{type:Boolean},prefix:{default:""},suffix:{default:""},clearable:{type:Boolean},disabled:{type:Boolean},multiple:{type:Boolean},maxTags:{default:3}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,r=yt("isSecondary",!1),o=Na(),s=e,a=O({get:()=>t.modelValue,set:i=>s("update:modelValue",i)});return(i,l)=>{const c=Jn,d=NS;return I(),me(d,xt({ref:"elInputRef"},{...i.$attrs,...i.$props},{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=f=>a.value=f),placeholder:t.placeholder,disabled:t.disabled,multiple:t.multiple,"collapse-tags":t.multiple,clearable:t.clearable,class:[{"is-clearable":t.clearable,"is-filled":t.filled,"is-secondary":v(r)},"ivyforms-form-item-select"],"max-collapse-tags":t.maxTags}),Ts({default:q(()=>[ve(i.$slots,"default")]),_:2},[v(o).prefix||i.iconStart?{name:"prefix",fn:q(()=>[ve(i.$slots,"prefix",{},()=>[i.iconStart?(I(),me(c,{key:0,name:i.iconStart,category:i.iconStartCategory,type:i.iconStartType,class:"ivyforms-input__icon-start",size:"l",color:"var(--map-base-dusk-symbol-2)"},null,8,["name","category","type"])):fe("",!0),t.avatar?(I(),me(c,{key:1,class:"ivyforms-input__avatar",name:"user",size:"l"})):fe("",!0)])]),key:"0"}:void 0]),1040,["modelValue","placeholder","disabled","multiple","collapse-tags","clearable","class","max-collapse-tags"])}}}),z1=ue({__name:"IvySelectOption",props:{value:{type:[String,Number,Boolean,Object]},label:{},disabled:{type:Boolean},iconConfig:{}},setup(n){const e=n,t=yt("isSecondary",!1);return(r,o)=>{const s=LS;return I(),me(s,{class:H(["ivyforms-select-option",{"is-secondary":v(t)}]),value:e.value,label:e.label,disabled:r.disabled},{default:q(()=>{var a;return[ve(r.$slots,"default"),(a=e.iconConfig)!=null&&a.name?(I(),me(Jn,qd(xt({key:0},{...e.iconConfig,name:e.iconConfig.name})),null,16)):fe("",!0)]}),_:3},8,["class","value","label","disabled"])}}});function ir(n){this.content=n}ir.prototype={constructor:ir,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),s=r.content.slice();return o==-1?s.push(t||n,e):(s[o+1]=e,t&&(s[o]=t)),new ir(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ir(t)},addToStart:function(n,e){return new ir([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ir(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),s=r.find(n);return o.splice(s==-1?o.length:s,0,e,t),new ir(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ir.from(n),n.size?new ir(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ir.from(n),n.size?new ir(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ir.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ir.from=function(n){if(n instanceof ir)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ir(e)};function j5(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),s=e.child(r);if(o==s){t+=o.nodeSize;continue}if(!o.sameMarkup(s))return t;if(o.isText&&o.text!=s.text){for(let a=0;o.text[a]==s.text[a];a++)t++;return t}if(o.content.size||s.content.size){let a=j5(o.content,s.content,t+1);if(a!=null)return a}t+=o.nodeSize}}function K5(n,e,t,r){for(let o=n.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:t,b:r};let a=n.child(--o),i=e.child(--s),l=a.nodeSize;if(a==i){t-=l,r-=l;continue}if(!a.sameMarkup(i))return{a:t,b:r};if(a.isText&&a.text!=i.text){let c=0,d=Math.min(a.text.length,i.text.length);for(;c<d&&a.text[a.text.length-c-1]==i.text[i.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(a.content.size||i.content.size){let c=K5(a.content,i.content,t-1,r-1);if(c)return c}t-=l,r-=l}}class Le{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,s){for(let a=0,i=0;i<t;a++){let l=this.content[a],c=i+l.nodeSize;if(c>e&&r(l,o+i,s||null,a)!==!1&&l.content.size){let d=i+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,t-d),r,o+d)}i=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let s="",a=!0;return this.nodesBetween(e,t,(i,l)=>{let c=i.isText?i.text.slice(Math.max(e,l)-l,t-l):i.isLeaf?o?typeof o=="function"?o(i):o:i.type.spec.leafText?i.type.spec.leafText(i):"":"";i.isBlock&&(i.isLeaf&&c||i.isTextblock)&&r&&(a?a=!1:s+=r),s+=c},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new Le(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let s=0,a=0;a<t;s++){let i=this.content[s],l=a+i.nodeSize;l>e&&((a<e||l>t)&&(i.isText?i=i.cut(Math.max(0,e-a),Math.min(i.text.length,t-a)):i=i.cut(Math.max(0,e-a-1),Math.min(i.content.size,t-a-1))),r.push(i),o+=i.nodeSize),a=l}return new Le(r,o)}cutByIndex(e,t){return e==t?Le.empty:e==0&&t==this.content.length?this:new Le(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new Le(o,s)}addToStart(e){return new Le([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Le(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return j5(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return K5(this,e,t,r)}findIndex(e,t=-1){if(e==0)return ud(0,e);if(e==this.size)return ud(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),a=o+s.nodeSize;if(a>=e)return a==e||t>0?ud(r+1,a):ud(r,o);o=a}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return Le.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Le(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Le.empty;let t,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(t||(t=e.slice(0,o)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new Le(t||e,r)}static from(e){if(!e)return Le.empty;if(e instanceof Le)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Le([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Le.empty=new Le([],0);const Om={index:0,offset:0};function ud(n,e){return Om.index=n,Om.offset=e,Om}function uf(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!uf(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!uf(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let hn=class $v{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&uf(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let o=r.create(t.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return $v.none;if(e instanceof $v)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};hn.none=[];class cf extends Error{}class et{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Y5(this.content,e+this.openStart,t);return r&&new et(r,this.openStart,this.openEnd)}removeBetween(e,t){return new et(G5(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return et.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new et(Le.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)o++;return new et(e,r,o)}}et.empty=new et(Le.empty,0,0);function G5(n,e,t){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r),{index:a,offset:i}=n.findIndex(t);if(o==e||s.isText){if(i!=t&&!n.child(a).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=a)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(G5(s.content,e-o-1,t-o-1)))}function Y5(n,e,t,r){let{index:o,offset:s}=n.findIndex(e),a=n.maybeChild(o);if(s==e||a.isText)return n.cut(0,e).append(t).append(n.cut(e));let i=Y5(a.content,e-s-1,t);return i&&n.replaceChild(o,a.copy(i))}function sW(n,e,t){if(t.openStart>n.depth)throw new cf("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new cf("Inconsistent open depths");return q5(n,e,t,0)}function q5(n,e,t,r){let o=n.index(r),s=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let a=q5(n,e,t,r+1);return s.copy(s.content.replaceChild(o,a))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let a=n.parent,i=a.content;return li(a,i.cut(0,n.parentOffset).append(t.content).append(i.cut(e.parentOffset)))}else{let{start:a,end:i}=iW(t,n);return li(s,X5(n,a,i,e,r))}else return li(s,df(n,e,r))}function J5(n,e){if(!e.type.compatibleContent(n.type))throw new cf("Cannot join "+e.type.name+" onto "+n.type.name)}function Dv(n,e,t){let r=n.node(t);return J5(r,e.node(t)),r}function ii(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function mu(n,e,t,r){let o=(e||n).node(t),s=0,a=e?e.index(t):o.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(ii(n.nodeAfter,r),s++));for(let i=s;i<a;i++)ii(o.child(i),r);e&&e.depth==t&&e.textOffset&&ii(e.nodeBefore,r)}function li(n,e){return n.type.checkContent(e),n.copy(e)}function X5(n,e,t,r,o){let s=n.depth>o&&Dv(n,e,o+1),a=r.depth>o&&Dv(t,r,o+1),i=[];return mu(null,n,o,i),s&&a&&e.index(o)==t.index(o)?(J5(s,a),ii(li(s,X5(n,e,t,r,o+1)),i)):(s&&ii(li(s,df(n,e,o+1)),i),mu(e,t,o,i),a&&ii(li(a,df(t,r,o+1)),i)),mu(r,null,o,i),new Le(i)}function df(n,e,t){let r=[];if(mu(null,n,t,r),n.depth>t){let o=Dv(n,e,t+1);ii(li(o,df(n,e,t+1)),r)}return mu(e,null,t,r),new Le(r)}function iW(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)o=e.node(s).copy(Le.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Lu{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return hn.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let i=r;r=o,o=i}let s=r.marks;for(var a=0;a<s.length;a++)s[a].type.spec.inclusive===!1&&(!o||!s[a].isInSet(o.marks))&&(s=s[a--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new ff(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,s=t;for(let a=e;;){let{index:i,offset:l}=a.content.findIndex(s),c=s-l;if(r.push(a,i,o+l),!c||(a=a.child(i),a.isText))break;s=c-1,o+=l+1}return new Lu(t,r,s)}static resolveCached(e,t){let r=j2.get(e);if(r)for(let s=0;s<r.elts.length;s++){let a=r.elts[s];if(a.pos==t)return a}else j2.set(e,r=new lW);let o=r.elts[r.i]=Lu.resolve(e,t);return r.i=(r.i+1)%uW,o}}class lW{constructor(){this.elts=[],this.i=0}}const uW=12,j2=new WeakMap;class ff{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}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 cW=Object.create(null);let gs=class Nv{constructor(e,t,r,o=hn.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||Le.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,o=0){this.content.nodesBetween(e,t,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,o){return this.content.textBetween(e,t,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&uf(this.attrs,t||e.defaultAttrs||cW)&&hn.sameSet(this.marks,r||hn.none)}copy(e=null){return e==this.content?this:new Nv(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Nv(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return et.empty;let o=this.resolve(e),s=this.resolve(t),a=r?0:o.sharedDepth(t),i=o.start(a),c=o.node(a).content.cut(o.pos-i,s.pos-i);return new et(c,o.depth-a,s.depth-a)}replace(e,t,r){return sW(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return Lu.resolveCached(this,e)}resolveNoCache(e){return Lu.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(o=!0),!o)),o}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Z5(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=Le.empty,o=0,s=r.childCount){let a=this.contentMatchAt(e).matchFragment(r,o,s),i=a&&a.matchFragment(this.content,t);if(!i||!i.validEnd)return!1;for(let l=o;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),a=s&&s.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=hn.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!hn.sameSet(e,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 e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=Le.fromJSON(e,t.content),s=e.nodeType(t.type).create(t.attrs,o,r);return s.type.checkAttrs(s.attrs),s}};gs.prototype.text=void 0;class pf extends gs{constructor(e,t,r,o){if(super(e,t,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Z5(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new pf(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new pf(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Z5(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class pi{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new dW(e,t);if(r.next==null)return pi.empty;let o=Q5(r);r.next&&r.err("Unexpected trailing text");let s=yW(gW(o));return bW(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let s=t;o&&s<r;s++)o=o.matchType(e.child(s).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function s(a,i){let l=a.matchFragment(e,r);if(l&&(!t||l.validEnd))return Le.from(i.map(c=>c.createAndFill()));for(let c=0;c<a.next.length;c++){let{type:d,next:f}=a.next[c];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=s(f,i.concat(d));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let a=[];for(let i=o;i.type;i=i.via)a.push(i.type);return a.reverse()}for(let a=0;a<s.next.length;a++){let{type:i,next:l}=s.next[a];!i.isLeaf&&!i.hasRequiredAttrs()&&!(i.name in t)&&(!o.type||l.validEnd)&&(r.push({match:i.contentMatch,type:i,via:o}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let a=0;a<r.next.length;a++)s+=(a?", ":"")+r.next[a].type.name+"->"+e.indexOf(r.next[a].next);return s}).join(` |
| 60 |
`)}}pi.empty=new pi(!0);class dW{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Q5(n){let e=[];do e.push(fW(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function fW(n){let e=[];do e.push(pW(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function pW(n){let e=vW(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=hW(n,e);else break;return e}function K2(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function hW(n,e){let t=K2(n),r=t;return n.eat(",")&&(n.next!="}"?r=K2(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function mW(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let s in t){let a=t[s];a.isInGroup(e)&&o.push(a)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function vW(n){if(n.eat("(")){let e=Q5(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=mW(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function gW(n){let e=[[]];return o(s(n,0),t()),e;function t(){return e.push([])-1}function r(a,i,l){let c={term:l,to:i};return e[a].push(c),c}function o(a,i){a.forEach(l=>l.to=i)}function s(a,i){if(a.type=="choice")return a.exprs.reduce((l,c)=>l.concat(s(c,i)),[]);if(a.type=="seq")for(let l=0;;l++){let c=s(a.exprs[l],i);if(l==a.exprs.length-1)return c;o(c,i=t())}else if(a.type=="star"){let l=t();return r(i,l),o(s(a.expr,l),l),[r(l)]}else if(a.type=="plus"){let l=t();return o(s(a.expr,i),l),o(s(a.expr,l),l),[r(l)]}else{if(a.type=="opt")return[r(i)].concat(s(a.expr,i));if(a.type=="range"){let l=i;for(let c=0;c<a.min;c++){let d=t();o(s(a.expr,l),d),l=d}if(a.max==-1)o(s(a.expr,l),l);else for(let c=a.min;c<a.max;c++){let d=t();r(l,d),o(s(a.expr,l),d),l=d}return[r(l)]}else{if(a.type=="name")return[r(i,void 0,a.value)];throw new Error("Unknown expr type")}}}}function e6(n,e){return e-n}function G2(n,e){let t=[];return r(e),t.sort(e6);function r(o){let s=n[o];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(o);for(let a=0;a<s.length;a++){let{term:i,to:l}=s[a];!i&&t.indexOf(l)==-1&&r(l)}}}function yW(n){let e=Object.create(null);return t(G2(n,0));function t(r){let o=[];r.forEach(a=>{n[a].forEach(({term:i,to:l})=>{if(!i)return;let c;for(let d=0;d<o.length;d++)o[d][0]==i&&(c=o[d][1]);G2(n,l).forEach(d=>{c||o.push([i,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=e[r.join(",")]=new pi(r.indexOf(n.length-1)>-1);for(let a=0;a<o.length;a++){let i=o[a][1].sort(e6);s.next.push({type:o[a][0],next:e[i.join(",")]||t(i)})}return s}}function bW(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],s=!o.validEnd,a=[];for(let i=0;i<o.next.length;i++){let{type:l,next:c}=o.next[i];a.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function t6(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function n6(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let s=n[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function r6(n,e,t,r){for(let o in e)if(!(o in n))throw new RangeError(`Unsupported attribute ${o} for ${t} of type ${o}`);for(let o in n){let s=n[o];s.validate&&s.validate(e[o])}}function o6(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new wW(n,r,e[r]);return t}let Y2=class a6{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=o6(e,r.attrs),this.defaultAttrs=t6(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pi.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:n6(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new gs(this,this.computeAttrs(e),Le.from(t),hn.setFrom(r))}createChecked(e=null,t,r){return t=Le.from(t),this.checkContent(t),new gs(this,this.computeAttrs(e),t,hn.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=Le.from(t),t.size){let a=this.contentMatch.fillBefore(t);if(!a)return null;t=a.append(t)}let o=this.contentMatch.matchFragment(t),s=o&&o.fillBefore(Le.empty,!0);return s?new gs(this,e,t.append(s),hn.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){r6(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:hn.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,a)=>r[s]=new a6(s,t,a));let o=t.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function SW(n,e,t){let r=t.split("|");return o=>{let s=o===null?"null":typeof o;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${s}`)}}class wW{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?SW(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class bp{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=o6(e,o.attrs),this.excluded=null;let s=t6(this.attrs);this.instance=s?new hn(this,s):null}create(e=null){return!e&&this.instance?this.instance:new hn(this,n6(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((s,a)=>r[s]=new bp(s,o++,t,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){r6(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class s6{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=ir.from(e.nodes),t.marks=ir.from(e.marks||{}),this.nodes=Y2.compile(this.spec.nodes,this),this.marks=bp.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let s=this.nodes[o],a=s.spec.content||"",i=s.spec.marks;if(s.contentMatch=r[a]||(r[a]=pi.parse(a,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=i=="_"?null:i?q2(this,i.split(" ")):i==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],a=s.spec.excludes;s.excluded=a==null?[s]:a==""?[]:q2(this,a.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(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Y2){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,o)}text(e,t){let r=this.nodes.text;return new pf(r,r.defaultAttrs,e,hn.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return gs.fromJSON(this,e)}markFromJSON(e){return hn.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function q2(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],s=n.marks[o],a=s;if(s)t.push(s);else for(let i in n.marks){let l=n.marks[i];(o=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(o)>-1)&&t.push(a=l)}if(!a)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function CW(n){return n.tag!=null}function xW(n){return n.style!=null}class ys{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(o=>{if(CW(o))this.tags.push(o);else if(xW(o)){let s=/[^=]*/.exec(o.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let s=e.nodes[o.node];return s.contentMatch.matchType(s)})}parse(e,t={}){let r=new X2(this,t,!1);return r.addAll(e,hn.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new X2(this,t,!0);return r.addAll(e,hn.none,t.from,t.to),et.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(TW(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let a=s.getAttrs(e);if(a===!1)continue;s.attrs=a||void 0}return s}}}matchStyle(e,t,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let a=this.styles[s],i=a.style;if(!(i.indexOf(e)!=0||a.context&&!r.matchesContext(a.context)||i.length>e.length&&(i.charCodeAt(e.length)!=61||i.slice(e.length+1)!=t))){if(a.getAttrs){let l=a.getAttrs(t);if(l===!1)continue;a.attrs=l||void 0}return a}}}static schemaRules(e){let t=[];function r(o){let s=o.priority==null?50:o.priority,a=0;for(;a<t.length;a++){let i=t[a];if((i.priority==null?50:i.priority)<s)break}t.splice(a,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(a=>{r(a=Z2(a)),a.mark||a.ignore||a.clearMark||(a.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(a=>{r(a=Z2(a)),a.node||a.ignore||a.mark||(a.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new ys(e,ys.schemaRules(e)))}}const i6={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},kW={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},l6={ol:!0,ul:!0},Bu=1,Lv=2,zd=4;function J2(n,e,t){return e!=null?(e?Bu:0)|(e==="full"?Lv:0):n&&n.whitespace=="pre"?Bu|Lv:t&-5}class cd{constructor(e,t,r,o,s,a){this.type=e,this.attrs=t,this.marks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=hn.none,this.match=s||(a&zd?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Le.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Bu)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let t=Le.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Le.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!i6.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class X2{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=t.topNode,s,a=J2(null,t.preserveWhitespace,0)|(r?zd:0);o?s=new cd(o.type,o.attrs,hn.none,!0,t.topMatch||o.type.contentMatch,a):r?s=new cd(null,null,hn.none,!0,null,a):s=new cd(e.schema.topNodeType,null,hn.none,!0,null,a),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,o=this.top,s=o.options&Lv?"full":this.localPreserveWS||(o.options&Bu)>0;if(s==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)s!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,` |
| 61 |
`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=o.content[o.content.length-1],i=e.previousSibling;(!a||i&&i.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let o=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),i;l6.hasOwnProperty(a)&&this.parser.normalizeLists&&EW(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,r));e:if(l?l.ignore:kW.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(i6.hasOwnProperty(a))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),c=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let f=l&&l.skip?t:this.readStyles(e,t);f&&this.addAll(e,f),c&&this.sync(s),this.needsBlock=d}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,l,c,l.consuming===!1?i:void 0)}this.localPreserveWS=o}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(` |
| 62 |
`),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let s=this.parser.matchedStyles[o],a=r.getPropertyValue(s);if(a)for(let i=void 0;;){let l=this.parser.matchStyle(s,a,this,i);if(!l)break;if(l.ignore)return null;if(l.clearMark?t=t.filter(c=>!l.clearMark(c)):t=t.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)i=l;else break}}return t}addElementByRule(e,t,r,o){let s,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(a,t.attrs||null,r,t.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[t.mark];r=r.concat(l.create(t.attrs))}let i=this.top;if(a&&a.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof t.contentElement=="string"?l=e.querySelector(t.contentElement):typeof t.contentElement=="function"?l=t.contentElement(e):t.contentElement&&(l=t.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(i)&&this.open--}addAll(e,t,r,o){let s=r||0;for(let a=r?e.childNodes[r]:e.firstChild,i=o==null?null:e.childNodes[o];a!=i;a=a.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(a,t);this.findAtPoint(e,s)}findPlace(e,t,r){let o,s;for(let a=this.open,i=0;a>=0;a--){let l=this.nodes[a],c=l.findWrapping(e);if(c&&(!o||o.length>c.length+i)&&(o=c,s=l,!c.length))break;if(l.solid){if(r)break;i+=2}}if(!o)return null;this.sync(s);for(let a=0;a<o.length;a++)t=this.enterInner(o[a],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(t=this.enterInner(s,null,t))}let o=this.findPlace(e,t,r);if(o){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let a=hn.none;for(let i of o.concat(e.marks))(s.type?s.type.allowsMarkType(i.type):Q2(i.type,e.type))&&(a=i.addToSet(a));return s.content.push(e.mark(a)),!0}return!1}enter(e,t,r,o){let s=this.findPlace(e.create(t),r,!1);return s&&(s=this.enterInner(e,t,r,!0,o)),s}enterInner(e,t,r,o=!1,s){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let i=J2(e,s,a.options);a.options&zd&&a.content.length==0&&(i|=zd);let l=hn.none;return r=r.filter(c=>(a.type?a.type.allowsMarkType(c.type):Q2(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new cd(e,t,l,o,null,i)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Bu)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),a=(i,l)=>{for(;i>=0;i--){let c=t[i];if(c==""){if(i==t.length-1||i==0)continue;for(;l>=s;l--)if(a(i-1,l))return!0;return!1}else{let d=l>0||l==0&&o?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function EW(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&l6.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function TW(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Z2(n){let e={};for(let t in n)e[t]=n[t];return e}function Q2(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let s=[],a=i=>{s.push(i);for(let l=0;l<i.edgeCount;l++){let{type:c,next:d}=i.edge(l);if(c==e||s.indexOf(d)<0&&a(d))return!0}};if(a(o.contentMatch))return!0}}class bi{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=_m(t).createDocumentFragment());let o=r,s=[];return e.forEach(a=>{if(s.length||a.marks.length){let i=0,l=0;for(;i<s.length&&l<a.marks.length;){let c=a.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(s[i][0])||c.type.spec.spanning===!1)break;i++,l++}for(;i<s.length;)o=s.pop()[1];for(;l<a.marks.length;){let c=a.marks[l++],d=this.serializeMark(c,a.isInline,t);d&&(s.push([c,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(a,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=Hd(_m(t),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&Hd(_m(r),o(e,t),null,e.attrs)}static renderSpec(e,t,r=null,o){return Hd(e,t,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new bi(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=e3(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return e3(e.marks)}}function e3(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function _m(n){return n.document||window.document}const t3=new WeakMap;function MW(n){let e=t3.get(n);return e===void 0&&t3.set(n,e=IW(n)),e}function IW(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)t(r[o]);else for(let o in r)t(r[o])}return t(n),e}function Hd(n,e,t,r){if(typeof e=="string")return{dom:n.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],s;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=MW(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let a=o.indexOf(" ");a>0&&(t=o.slice(0,a),o=o.slice(a+1));let i,l=t?n.createElementNS(t,o):n.createElement(o),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let h=f.indexOf(" ");h>0?l.setAttributeNS(f.slice(0,h),f.slice(h+1),c[f]):l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:g}=Hd(n,h,t,r);if(l.appendChild(m),g){if(i)throw new RangeError("Multiple content holes");i=g}}}return{dom:l,contentDOM:i}}const u6=65535,c6=Math.pow(2,16);function OW(n,e){return n+e*c6}function n3(n){return n&u6}function _W(n){return(n-(n&u6))/c6}const d6=1,f6=2,Wd=4,p6=8;class Bv{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&p6)>0}get deletedBefore(){return(this.delInfo&(d6|Wd))>0}get deletedAfter(){return(this.delInfo&(f6|Wd))>0}get deletedAcross(){return(this.delInfo&Wd)>0}}class Zr{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Zr.empty)return Zr.empty}recover(e){let t=0,r=n3(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+_W(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,s=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?o:0);if(l>e)break;let c=this.ranges[i+s],d=this.ranges[i+a],f=l+c;if(e<=f){let h=c?e==l?-1:e==f?1:t:t,m=l+o+(h<0?0:d);if(r)return m;let g=e==(t<0?l:f)?null:OW(i/3,e-l),y=e==l?f6:e==f?d6:Wd;return(t<0?e!=l:e!=f)&&(y|=p6),new Bv(m,y,g)}o+=d-c}return r?e+o:new Bv(e+o,0,null)}touches(e,t){let r=0,o=n3(t),s=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[i+s],d=l+c;if(e<=d&&i==o*3)return!0;r+=this.ranges[i+a]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let a=this.ranges[o],i=a-(this.inverted?s:0),l=a+(this.inverted?0:s),c=this.ranges[o+t],d=this.ranges[o+r];e(i,i+c,l,l+d),s+=d-c}}invert(){return new Zr(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Zr.empty:new Zr(e<0?[0,-e,0]:[0,0,e])}}Zr.empty=new Zr([]);class hf{constructor(e,t,r=0,o=e?e.length:0){this.mirror=t,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new hf(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let o=e.getMirror(t);this.appendMap(e._maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e._maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new hf;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let s=this.from;s<this.to;s++){let a=this._maps[s],i=a.mapResult(e,t);if(i.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(i.recover);continue}}o|=i.delInfo,e=i.pos}return r?e:new Bv(e,o,null)}}const Am=Object.create(null);class wr{getMap(){return Zr.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Am[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Am)throw new RangeError("Duplicate use of step JSON ID "+e);return Am[e]=t,t.prototype.jsonID=e,t}}class jn{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new jn(e,null)}static fail(e){return new jn(null,e)}static fromReplace(e,t,r,o){try{return jn.ok(e.replace(t,r,o))}catch(s){if(s instanceof cf)return jn.fail(s.message);throw s}}}function H1(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let s=n.child(o);s.content.size&&(s=s.copy(H1(s.content,e,s))),s.isInline&&(s=e(s,t,o)),r.push(s)}return Le.fromArray(r)}class ps extends wr{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new et(H1(t.content,(a,i)=>!a.isAtom||!i.type.allowsMarkType(this.mark.type)?a:a.mark(this.mark.addToSet(a.marks)),o),t.openStart,t.openEnd);return jn.fromReplace(e,this.from,this.to,s)}invert(){return new Zo(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new ps(t.pos,r.pos,this.mark)}merge(e){return e instanceof ps&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ps(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ps(t.from,t.to,e.markFromJSON(t.mark))}}wr.jsonID("addMark",ps);class Zo extends wr{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new et(H1(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return jn.fromReplace(e,this.from,this.to,r)}invert(){return new ps(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Zo(t.pos,r.pos,this.mark)}merge(e){return e instanceof Zo&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Zo(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Zo(t.from,t.to,e.markFromJSON(t.mark))}}wr.jsonID("removeMark",Zo);class hs extends wr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return jn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return jn.fromReplace(e,this.pos,this.pos+1,new et(Le.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new hs(this.pos,t.marks[o]);return new hs(this.pos,this.mark)}}return new hi(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new hs(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new hs(t.pos,e.markFromJSON(t.mark))}}wr.jsonID("addNodeMark",hs);class hi extends wr{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return jn.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return jn.fromReplace(e,this.pos,this.pos+1,new et(Le.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new hs(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new hi(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new hi(t.pos,e.markFromJSON(t.mark))}}wr.jsonID("removeNodeMark",hi);class er extends wr{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&Fv(e,this.from,this.to)?jn.fail("Structure replace would overwrite content"):jn.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Zr([this.from,this.to-this.from,this.slice.size])}invert(e){return new er(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new er(t.pos,Math.max(t.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof er)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?et.empty:new et(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new er(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?et.empty:new et(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new er(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new er(t.from,t.to,et.fromJSON(e,t.slice),!!t.structure)}}wr.jsonID("replace",er);class tr extends wr{constructor(e,t,r,o,s,a,i=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=a,this.structure=i}apply(e){if(this.structure&&(Fv(e,this.from,this.gapFrom)||Fv(e,this.gapTo,this.to)))return jn.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return jn.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?jn.fromReplace(e,this.from,this.to,r):jn.fail("Content does not fit in gap")}getMap(){return new Zr([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new tr(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||s>r.pos?null:new tr(t.pos,r.pos,o,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new tr(t.from,t.to,t.gapFrom,t.gapTo,et.fromJSON(e,t.slice),t.insert,!!t.structure)}}wr.jsonID("replaceAround",tr);function Fv(n,e,t){let r=n.resolve(e),o=t-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let a=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}}return!1}function AW(n,e,t,r){let o=[],s=[],a,i;n.doc.nodesBetween(e,t,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(c,e),m=Math.min(c+l.nodeSize,t),g=r.addToSet(f);for(let y=0;y<f.length;y++)f[y].isInSet(g)||(a&&a.to==h&&a.mark.eq(f[y])?a.to=m:o.push(a=new Zo(h,m,f[y])));i&&i.to==h?i.to=m:s.push(i=new ps(h,m,r))}}),o.forEach(l=>n.step(l)),s.forEach(l=>n.step(l))}function RW(n,e,t,r){let o=[],s=0;n.doc.nodesBetween(e,t,(a,i)=>{if(!a.isInline)return;s++;let l=null;if(r instanceof bp){let c=a.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(a.marks)&&(l=[r]):l=a.marks;if(l&&l.length){let c=Math.min(i+a.nodeSize,t);for(let d=0;d<l.length;d++){let f=l[d],h;for(let m=0;m<o.length;m++){let g=o[m];g.step==s-1&&f.eq(o[m].style)&&(h=g)}h?(h.to=c,h.step=s):o.push({style:f,from:Math.max(i,e),to:c,step:s})}}}),o.forEach(a=>n.step(new Zo(a.from,a.to,a.style)))}function W1(n,e,t,r=t.contentMatch,o=!0){let s=n.doc.nodeAt(e),a=[],i=e+1;for(let l=0;l<s.childCount;l++){let c=s.child(l),d=i+c.nodeSize,f=r.matchType(c.type);if(!f)a.push(new er(i,d,et.empty));else{r=f;for(let h=0;h<c.marks.length;h++)t.allowsMarkType(c.marks[h].type)||n.step(new Zo(i,d,c.marks[h]));if(o&&c.isText&&t.whitespace!="pre"){let h,m=/\r?\n|\r/g,g;for(;h=m.exec(c.text);)g||(g=new et(Le.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),a.push(new er(i+h.index,i+h.index+h[0].length,g))}}i=d}if(!r.validEnd){let l=r.fillBefore(Le.empty,!0);n.replace(i,i,new et(l,0,0))}for(let l=a.length-1;l>=0;l--)n.step(a[l])}function PW(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Cl(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),s=n.$from.index(r),a=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(s,a,t))return r;if(r==0||o.type.spec.isolating||!PW(o,s,a))break}return null}function $W(n,e,t){let{$from:r,$to:o,depth:s}=e,a=r.before(s+1),i=o.after(s+1),l=a,c=i,d=Le.empty,f=0;for(let g=s,y=!1;g>t;g--)y||r.index(g)>0?(y=!0,d=Le.from(r.node(g).copy(d)),f++):l--;let h=Le.empty,m=0;for(let g=s,y=!1;g>t;g--)y||o.after(g+1)<o.end(g)?(y=!0,h=Le.from(o.node(g).copy(h)),m++):c++;n.step(new tr(l,c,a,i,new et(d.append(h),f,m),d.size-f,!0))}function U1(n,e,t=null,r=n){let o=DW(n,e),s=o&&NW(r,e);return s?o.map(r3).concat({type:e,attrs:t}).concat(s.map(r3)):null}function r3(n){return{type:n,attrs:null}}function DW(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let a=s.length?s[0]:e;return t.canReplaceWith(r,o,a)?s:null}function NW(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.child(r),a=e.contentMatch.findWrapping(s.type);if(!a)return null;let l=(a.length?a[a.length-1]:e).contentMatch;for(let c=r;l&&c<o;c++)l=l.matchType(t.child(c).type);return!l||!l.validEnd?null:a}function LW(n,e,t){let r=Le.empty;for(let a=t.length-1;a>=0;a--){if(r.size){let i=t[a].type.contentMatch.matchFragment(r);if(!i||!i.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Le.from(t[a].type.create(t[a].attrs,r))}let o=e.start,s=e.end;n.step(new tr(o,s,o,s,new et(r,0,0),t.length,!0))}function BW(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(a,i)=>{let l=typeof o=="function"?o(a):o;if(a.isTextblock&&!a.hasMarkup(r,l)&&FW(n.doc,n.mapping.slice(s).map(i),r)){let c=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",g=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!g?c=!1:!m&&g&&(c=!0)}c===!1&&m6(n,a,i,s),W1(n,n.mapping.slice(s).map(i,1),r,void 0,c===null);let d=n.mapping.slice(s),f=d.map(i,1),h=d.map(i+a.nodeSize,1);return n.step(new tr(f,h,f+1,h-1,new et(Le.from(r.create(l,null,a.marks)),0,0),1,!0)),c===!0&&h6(n,a,i,s),!1}})}function h6(n,e,t,r){e.forEach((o,s)=>{if(o.isText){let a,i=/\r?\n|\r/g;for(;a=i.exec(o.text);){let l=n.mapping.slice(r).map(t+1+s+a.index);n.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function m6(n,e,t,r){e.forEach((o,s)=>{if(o.type==o.type.schema.linebreakReplacement){let a=n.mapping.slice(r).map(t+1+s);n.replaceWith(a,a+1,e.type.schema.text(` |
| 63 |
`))}})}function FW(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function VW(n,e,t,r,o){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let a=t.create(r,null,o||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,a);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new tr(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new et(Le.from(a),0,0),1,!0))}function Aa(n,e,t=1,r){let o=n.resolve(e),s=o.depth-t,a=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!a.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,d=t-2;c>s;c--,d--){let f=o.node(c),h=o.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(h,f.childCount),g=r&&r[d+1];g&&(m=m.replaceChild(0,g.type.create(g.attrs)));let y=r&&r[d]||f;if(!f.canReplace(h+1,f.childCount)||!y.type.validContent(m))return!1}let i=o.indexAfter(s),l=r&&r[0];return o.node(s).canReplaceWith(i,i,l?l.type:o.node(s+1).type)}function zW(n,e,t=1,r){let o=n.doc.resolve(e),s=Le.empty,a=Le.empty;for(let i=o.depth,l=o.depth-t,c=t-1;i>l;i--,c--){s=Le.from(o.node(i).copy(s));let d=r&&r[c];a=Le.from(d?d.type.create(d.attrs,a):o.node(i).copy(a))}n.step(new er(e,e,new et(s.append(a),t,t),!0))}function As(n,e){let t=n.resolve(e),r=t.index();return v6(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function HW(n,e){e.content.size||n.type.compatibleContent(e.type);let t=n.contentMatchAt(n.childCount),{linebreakReplacement:r}=n.type.schema;for(let o=0;o<e.childCount;o++){let s=e.child(o),a=s.type==r?n.type.schema.nodes.text:s.type;if(t=t.matchType(a),!t||!n.type.allowsMarks(s.marks))return!1}return t.validEnd}function v6(n,e){return!!(n&&e&&!n.isLeaf&&HW(n,e))}function Sp(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let s,a,i=r.index(o);if(o==r.depth?(s=r.nodeBefore,a=r.nodeAfter):t>0?(s=r.node(o+1),i++,a=r.node(o).maybeChild(i)):(s=r.node(o).maybeChild(i-1),a=r.node(o+1)),s&&!s.isTextblock&&v6(s,a)&&r.node(o).canReplace(i,i+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function WW(n,e,t){let r=null,{linebreakReplacement:o}=n.doc.type.schema,s=n.doc.resolve(e-t),a=s.node().type;if(o&&a.inlineContent){let d=a.whitespace=="pre",f=!!a.contentMatch.matchType(o);d&&!f?r=!1:!d&&f&&(r=!0)}let i=n.steps.length;if(r===!1){let d=n.doc.resolve(e+t);m6(n,d.node(),d.before(),i)}a.inlineContent&&W1(n,e+t-1,a,s.node().contentMatchAt(s.index()),r==null);let l=n.mapping.slice(i),c=l.map(e-t);if(n.step(new er(c,l.map(e+t,-1),et.empty,!0)),r===!0){let d=n.doc.resolve(c);h6(n,d.node(),d.before(),n.steps.length)}return n}function UW(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,t))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,t))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function jW(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let s=0;s<t.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let a=r.depth;a>=0;a--){let i=a==r.depth?0:r.pos<=(r.start(a+1)+r.end(a+1))/2?-1:1,l=r.index(a)+(i>0?1:0),c=r.node(a),d=!1;if(s==1)d=c.canReplace(l,l,o);else{let f=c.contentMatchAt(l).findWrapping(o.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return i==0?r.pos:i<0?r.before(a+1):r.after(a+1)}return null}function wp(n,e,t=e,r=et.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),s=n.resolve(t);return g6(o,s,r)?new er(e,t,r):new KW(o,s,r).fit()}function g6(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class KW{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=Le.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=Le.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let s=this.placed,a=r.depth,i=o.depth;for(;a&&i&&s.childCount==1;)s=s.firstChild.content,a--,i--;let l=new et(s,a,i);return e>-1?new tr(r.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||r.pos!=this.$to.pos?new er(r.pos,o.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=t.firstChild;if(t.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=Rm(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let a=o.firstChild;for(let i=this.depth;i>=0;i--){let{type:l,match:c}=this.frontier[i],d,f=null;if(t==1&&(a?c.matchType(a.type)||(f=c.fillBefore(Le.from(a),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:i,parent:s,inject:f};if(t==2&&a&&(d=c.findWrapping(a.type)))return{sliceDepth:r,frontierDepth:i,parent:s,wrap:d};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Rm(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new et(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=Rm(e,t);if(o.childCount<=1&&t>0){let s=e.size-t<=t+o.size;this.unplaced=new et(nu(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new et(nu(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let y=0;y<s.length;y++)this.openFrontierNode(s[y]);let a=this.unplaced,i=r?r.content:a.content,l=a.openStart-e,c=0,d=[],{match:f,type:h}=this.frontier[t];if(o){for(let y=0;y<o.childCount;y++)d.push(o.child(y));f=f.matchFragment(o)}let m=i.size+e-(a.content.size-a.openEnd);for(;c<i.childCount;){let y=i.child(c),S=f.matchType(y.type);if(!S)break;c++,(c>1||l==0||y.content.size)&&(f=S,d.push(y6(y.mark(h.allowedMarks(y.marks)),c==1?l:0,c==i.childCount?m:-1)))}let g=c==i.childCount;g||(m=-1),this.placed=ru(this.placed,t,Le.from(d)),this.frontier[t].match=f,g&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let y=0,S=i;y<m;y++){let w=S.lastChild;this.frontier.push({type:w.type,match:w.contentMatchAt(w.childCount)}),S=w.content}this.unplaced=g?e==0?et.empty:new et(nu(a.content,e-1,1),e-1,m<0?a.openEnd:e-1):new et(nu(a.content,e,c),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Pm(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:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Pm(e,t,o,r,s);if(a){for(let i=t-1;i>=0;i--){let{match:l,type:c}=this.frontier[i],d=Pm(e,i,c,l,!0);if(!d||d.childCount)continue e}return{depth:t,fit:a,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=ru(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=ru(this.placed,this.depth,Le.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(Le.empty,!0);t.childCount&&(this.placed=ru(this.placed,this.frontier.length,t))}}function nu(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(nu(n.firstChild.content,e-1,t)))}function ru(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(ru(n.lastChild.content,e-1,t)))}function Rm(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function y6(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,y6(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(Le.empty,!0)))),n.copy(r)}function Pm(n,e,t,r,o){let s=n.node(e),a=o?n.indexAfter(e):n.index(e);if(a==s.childCount&&!t.compatibleContent(s.type))return null;let i=r.fillBefore(s.content,!0,a);return i&&!GW(t,s.content,a)?i:null}function GW(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function YW(n){return n.spec.defining||n.spec.definingForContent}function qW(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),s=n.doc.resolve(t);if(g6(o,s,r))return n.step(new er(e,t,r));let a=S6(o,n.doc.resolve(t));a[a.length-1]==0&&a.pop();let i=-(o.depth+1);a.unshift(i);for(let h=o.depth,m=o.pos-1;h>0;h--,m--){let g=o.node(h).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;a.indexOf(h)>-1?i=h:o.before(h)==m&&a.splice(1,0,-h)}let l=a.indexOf(i),c=[],d=r.openStart;for(let h=r.content,m=0;;m++){let g=h.firstChild;if(c.push(g),m==r.openStart)break;h=g.content}for(let h=d-1;h>=0;h--){let m=c[h],g=YW(m.type);if(g&&!m.sameMarkup(o.node(Math.abs(i)-1)))d=h;else if(g||!m.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let m=(h+d+1)%(r.openStart+1),g=c[m];if(g)for(let y=0;y<a.length;y++){let S=a[(y+l)%a.length],w=!0;S<0&&(w=!1,S=-S);let x=o.node(S-1),T=o.index(S-1);if(x.canReplaceWith(T,T,g.type,g.marks))return n.replace(o.before(S),w?s.after(S):t,new et(b6(r.content,0,r.openStart,m),m,r.openEnd))}}let f=n.steps.length;for(let h=a.length-1;h>=0&&(n.replace(e,t,r),!(n.steps.length>f));h--){let m=a[h];m<0||(e=o.before(m),t=s.after(m))}}function b6(n,e,t,r,o){if(e<t){let s=n.firstChild;n=n.replaceChild(0,s.copy(b6(s.content,e+1,t,r,s)))}if(e>r){let s=o.contentMatchAt(0),a=s.fillBefore(n).append(n);n=a.append(s.matchFragment(a).fillBefore(Le.empty,!0))}return n}function JW(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=UW(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new et(Le.from(r),0,0))}function XW(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),s=S6(r,o);for(let a=0;a<s.length;a++){let i=s[a],l=a==s.length-1;if(l&&i==0||r.node(i).type.contentMatch.validEnd)return n.delete(r.start(i),o.end(i));if(i>0&&(l||r.node(i-1).canReplace(r.index(i-1),o.indexAfter(i-1))))return n.delete(r.before(i),o.after(i))}for(let a=1;a<=r.depth&&a<=o.depth;a++)if(e-r.start(a)==r.depth-a&&t>r.end(a)&&o.end(a)-t!=o.depth-a&&r.start(a-1)==o.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),o.index(a-1)))return n.delete(r.before(a),t);n.delete(e,t)}function S6(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let s=n.start(o);if(s<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&t.push(o)}return t}class tl extends wr{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return jn.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return jn.fromReplace(e,this.pos,this.pos+1,new et(Le.from(o),0,t.isLeaf?0:1))}getMap(){return Zr.empty}invert(e){return new tl(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new tl(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new tl(t.pos,t.attr,t.value)}}wr.jsonID("attr",tl);class Fu extends wr{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return jn.ok(r)}getMap(){return Zr.empty}invert(e){return new Fu(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Fu(t.attr,t.value)}}wr.jsonID("docAttr",Fu);let ul=class extends Error{};ul=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};ul.prototype=Object.create(Error.prototype);ul.prototype.constructor=ul;ul.prototype.name="TransformError";class w6{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new hf}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new ul(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=et.empty){let o=wp(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new et(Le.from(r),0,0))}delete(e,t){return this.replace(e,t,et.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return qW(this,e,t,r),this}replaceRangeWith(e,t,r){return JW(this,e,t,r),this}deleteRange(e,t){return XW(this,e,t),this}lift(e,t){return $W(this,e,t),this}join(e,t=1){return WW(this,e,t),this}wrap(e,t){return LW(this,e,t),this}setBlockType(e,t=e,r,o=null){return BW(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return VW(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new tl(e,t,r)),this}setDocAttribute(e,t){return this.step(new Fu(e,t)),this}addNodeMark(e,t){return this.step(new hs(e,t)),this}removeNodeMark(e,t){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t instanceof hn)t.isInSet(r.marks)&&this.step(new hi(e,t));else{let o=r.marks,s,a=[];for(;s=t.isInSet(o);)a.push(new hi(e,s)),o=s.removeFromSet(o);for(let i=a.length-1;i>=0;i--)this.step(a[i])}return this}split(e,t=1,r){return zW(this,e,t,r),this}addMark(e,t,r){return AW(this,e,t,r),this}removeMark(e,t,r){return RW(this,e,t,r),this}clearIncompatible(e,t,r){return W1(this,e,t,r),this}}const $m=Object.create(null);class Xt{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new ZW(e.min(t),e.max(t))]}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 e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=et.empty){let r=t.content.lastChild,o=null;for(let i=0;i<t.openEnd;i++)o=r,r=r.lastChild;let s=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:c}=a[i],d=e.mapping.slice(s);e.replaceRange(d.map(l.pos),d.map(c.pos),i?et.empty:t),i==0&&s3(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:a,$to:i}=o[s],l=e.mapping.slice(r),c=l.map(a.pos),d=l.map(i.pos);s?e.deleteRange(c,d):(e.replaceRangeWith(c,d,t),s3(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new Ut(e):Gi(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let a=t<0?Gi(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):Gi(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(a)return a}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new eo(e.node(0))}static atStart(e){return Gi(e,e,0,0,1)||new eo(e)}static atEnd(e){return Gi(e,e,e.content.size,e.childCount,-1)||new eo(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=$m[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in $m)throw new RangeError("Duplicate use of selection JSON ID "+e);return $m[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ut.between(this.$anchor,this.$head).getBookmark()}}Xt.prototype.visible=!0;class ZW{constructor(e,t){this.$from=e,this.$to=t}}let o3=!1;function a3(n){!o3&&!n.parent.inlineContent&&(o3=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Ut extends Xt{constructor(e,t=e){a3(e),a3(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return Xt.near(r);let o=e.resolve(t.map(this.anchor));return new Ut(o.parent.inlineContent?o:r,r)}replace(e,t=et.empty){if(super.replace(e,t),t==et.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ut&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Cp(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ut(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let s=Xt.findFrom(t,r,!0)||Xt.findFrom(t,-r,!0);if(s)t=s.$head;else return Xt.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=(Xt.findFrom(e,-r,!0)||Xt.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new Ut(e,t)}}Xt.jsonID("text",Ut);class Cp{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Cp(e.map(this.anchor),e.map(this.head))}resolve(e){return Ut.between(e.resolve(this.anchor),e.resolve(this.head))}}class Mt extends Xt{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),s=e.resolve(o);return r?Xt.near(s):new Mt(s)}content(){return new et(Le.from(this.node),0,0)}eq(e){return e instanceof Mt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new j1(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Mt(e.resolve(t.anchor))}static create(e,t){return new Mt(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Mt.prototype.visible=!1;Xt.jsonID("node",Mt);class j1{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Cp(r,r):new j1(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Mt.isSelectable(r)?new Mt(t):Xt.near(t)}}class eo extends Xt{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=et.empty){if(t==et.empty){e.delete(0,e.doc.content.size);let r=Xt.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new eo(e)}map(e){return new eo(e)}eq(e){return e instanceof eo}getBookmark(){return QW}}Xt.jsonID("all",eo);const QW={map(){return this},resolve(n){return new eo(n)}};function Gi(n,e,t,r,o,s=!1){if(e.inlineContent)return Ut.create(n,t);for(let a=r-(o>0?0:1);o>0?a<e.childCount:a>=0;a+=o){let i=e.child(a);if(i.isAtom){if(!s&&Mt.isSelectable(i))return Mt.create(n,t-(o<0?i.nodeSize:0))}else{let l=Gi(n,i,t+o,o<0?i.childCount:0,o,s);if(l)return l}t+=i.nodeSize*o}return null}function s3(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof er||o instanceof tr))return;let s=n.mapping.maps[r],a;s.forEach((i,l,c,d)=>{a==null&&(a=d)}),n.setSelection(Xt.near(n.doc.resolve(a),t))}const i3=1,l3=2,u3=4;class eU extends w6{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.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(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|i3)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&i3)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=l3,this}ensureMarks(e){return hn.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&l3)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||hn.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let a=this.doc.resolve(t);s=r==t?a.marks():a.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,s)),this.selection.empty||this.setSelection(Xt.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=u3,this}get scrolledIntoView(){return(this.updated&u3)>0}}function c3(n,e){return!e||!n?n:n.bind(e)}class ou{constructor(e,t,r){this.name=e,this.init=c3(t.init,r),this.apply=c3(t.apply,r)}}const tU=[new ou("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new ou("selection",{init(n,e){return n.selection||Xt.atStart(e.doc)},apply(n){return n.selection}}),new ou("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new ou("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Dm{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=tU.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ou(r.key,r.spec.state,r))})}}class Qi{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),o=null;for(;;){let s=!1;for(let a=0;a<this.config.plugins.length;a++){let i=this.config.plugins[a];if(i.spec.appendTransaction){let l=o?o[a].n:0,c=o?o[a].state:this,d=l<t.length&&i.spec.appendTransaction.call(i,l?t.slice(l):t,c,r);if(d&&r.filterTransaction(d,a)){if(d.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<a?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),s=!0}o&&(o[a]={state:r,n:t.length})}}if(!s)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Qi(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let s=r[o];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new eU(this)}static create(e){let t=new Dm(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Qi(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new Dm(this.schema,e.plugins),r=t.fields,o=new Qi(t);for(let s=0;s<r.length;s++){let a=r[s].name;o[a]=this.hasOwnProperty(a)?this[a]:r[s].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],s=o.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Dm(e.schema,e.plugins),s=new Qi(o);return o.fields.forEach(a=>{if(a.name=="doc")s.doc=gs.fromJSON(e.schema,t.doc);else if(a.name=="selection")s.selection=Xt.fromJSON(s.doc,t.selection);else if(a.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let i in r){let l=r[i],c=l.spec.state;if(l.key==a.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,i)){s[a.name]=c.fromJSON.call(l,e,t[i],s);return}}s[a.name]=a.init(e,s)}}),s}}function C6(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=C6(o,e,{})),t[r]=o}return t}class ao{constructor(e){this.spec=e,this.props={},e.props&&C6(e.props,this,this.props),this.key=e.key?e.key.key:x6("plugin")}getState(e){return e[this.key]}}const Nm=Object.create(null);function x6(n){return n in Nm?n+"$"+ ++Nm[n]:(Nm[n]=0,n+"$")}class sa{constructor(e="key"){this.key=x6(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const lr=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},cl=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let Vv=null;const ka=function(n,e,t){let r=Vv||(Vv=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},nU=function(){Vv=null},mi=function(n,e,t,r){return t&&(d3(n,e,t,r,-1)||d3(n,e,t,r,1))},rU=/^(img|br|input|textarea|hr)$/i;function d3(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:bo(n))){let s=n.parentNode;if(!s||s.nodeType!=1||tc(n)||rU.test(n.nodeName)||n.contentEditable=="false")return!1;e=lr(n)+(o<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?bo(n):0}else return!1}}function bo(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function oU(n,e){for(;;){if(n.nodeType==3&&e)return n;if(n.nodeType==1&&e>0){if(n.contentEditable=="false")return null;n=n.childNodes[e-1],e=bo(n)}else if(n.parentNode&&!tc(n))e=lr(n),n=n.parentNode;else return null}}function aU(n,e){for(;;){if(n.nodeType==3&&e<n.nodeValue.length)return n;if(n.nodeType==1&&e<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[e],e=0}else if(n.parentNode&&!tc(n))e=lr(n)+1,n=n.parentNode;else return null}}function sU(n,e,t){for(let r=e==0,o=e==bo(n);r||o;){if(n==t)return!0;let s=lr(n);if(n=n.parentNode,!n)return!1;r=r&&s==0,o=o&&s==bo(n)}}function tc(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const xp=function(n){return n.focusNode&&mi(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function qs(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function iU(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function lU(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:Math.min(bo(r.offsetNode),r.offset)}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:Math.min(bo(r.startContainer),r.startOffset)}}}const ta=typeof navigator<"u"?navigator:null,f3=typeof document<"u"?document:null,Rs=ta&&ta.userAgent||"",zv=/Edge\/(\d+)/.exec(Rs),k6=/MSIE \d/.exec(Rs),Hv=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Rs),zr=!!(k6||Hv||zv),bs=k6?document.documentMode:Hv?+Hv[1]:zv?+zv[1]:0,Wo=!zr&&/gecko\/(\d+)/i.test(Rs);Wo&&+(/Firefox\/(\d+)/.exec(Rs)||[0,0])[1];const Wv=!zr&&/Chrome\/(\d+)/.exec(Rs),br=!!Wv,E6=Wv?+Wv[1]:0,Ir=!zr&&!!ta&&/Apple Computer/.test(ta.vendor),dl=Ir&&(/Mobile\/\w+/.test(Rs)||!!ta&&ta.maxTouchPoints>2),yo=dl||(ta?/Mac/.test(ta.platform):!1),uU=ta?/Win/.test(ta.platform):!1,Ia=/Android \d/.test(Rs),nc=!!f3&&"webkitFontSmoothing"in f3.documentElement.style,cU=nc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dU(n){let e=n.defaultView&&n.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function ba(n,e){return typeof n=="number"?n:n[e]}function fU(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function p3(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let a=t||n.dom;a;){if(a.nodeType!=1){a=cl(a);continue}let i=a,l=i==s.body,c=l?dU(s):fU(i),d=0,f=0;if(e.top<c.top+ba(r,"top")?f=-(c.top-e.top+ba(o,"top")):e.bottom>c.bottom-ba(r,"bottom")&&(f=e.bottom-e.top>c.bottom-c.top?e.top+ba(o,"top")-c.top:e.bottom-c.bottom+ba(o,"bottom")),e.left<c.left+ba(r,"left")?d=-(c.left-e.left+ba(o,"left")):e.right>c.right-ba(r,"right")&&(d=e.right-c.right+ba(o,"right")),d||f)if(l)s.defaultView.scrollBy(d,f);else{let m=i.scrollLeft,g=i.scrollTop;f&&(i.scrollTop+=f),d&&(i.scrollLeft+=d);let y=i.scrollLeft-m,S=i.scrollTop-g;e={left:e.left-y,top:e.top-S,right:e.right-y,bottom:e.bottom-S}}let h=l?"fixed":getComputedStyle(a).position;if(/^(fixed|sticky)$/.test(h))break;a=h=="absolute"?a.offsetParent:cl(a)}}function pU(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let s=(e.left+e.right)/2,a=t+1;a<Math.min(innerHeight,e.bottom);a+=5){let i=n.root.elementFromPoint(s,a);if(!i||i==n.dom||!n.dom.contains(i))continue;let l=i.getBoundingClientRect();if(l.top>=t-20){r=i,o=l.top;break}}return{refDOM:r,refTop:o,stack:T6(n.dom)}}function T6(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=cl(r));return e}function hU({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;M6(t,r==0?0:r-e)}function M6(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:s}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let Hi=null;function mU(n){if(n.setActive)return n.setActive();if(Hi)return n.focus(Hi);let e=T6(n);n.focus(Hi==null?{get preventScroll(){return Hi={preventScroll:!0},!0}}:void 0),Hi||(Hi=!1,M6(e,0))}function I6(n,e){let t,r=2e8,o,s=0,a=e.top,i=e.top,l,c;for(let d=n.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=ka(d).getClientRects();else continue;for(let m=0;m<h.length;m++){let g=h[m];if(g.top<=a&&g.bottom>=i){a=Math.max(g.bottom,a),i=Math.min(g.top,i);let y=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(y<r){t=d,r=y,o=y&&t.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,d.nodeType==1&&y&&(s=f+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!l&&g.left<=e.left&&g.right>=e.left&&(l=d,c={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!t&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(s=f+1)}}return!t&&l&&(t=l,o=c,r=0),t&&t.nodeType==3?vU(t,o):!t||r&&t.nodeType==1?{node:n,offset:s}:I6(t,o)}function vU(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let s=Qa(r,1);if(s.top!=s.bottom&&K1(e,s))return{node:n,offset:o+(e.left>=(s.left+s.right)/2?1:0)}}return{node:n,offset:0}}function K1(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function gU(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function yU(n,e,t){let{node:r,offset:o}=I6(e,t),s=-1;if(r.nodeType==1&&!r.firstChild){let a=r.getBoundingClientRect();s=a.left!=a.right&&t.left>(a.left+a.right)/2?1:-1}return n.docView.posFromDOM(r,o,s)}function bU(n,e,t,r){let o=-1;for(let s=e,a=!1;s!=n.dom;){let i=n.docView.nearestDesc(s,!0),l;if(!i)return null;if(i.dom.nodeType==1&&(i.node.isBlock&&i.parent||!i.contentDOM)&&((l=i.dom.getBoundingClientRect()).width||l.height)&&(i.node.isBlock&&i.parent&&(!a&&l.left>r.left||l.top>r.top?o=i.posBefore:(!a&&l.right<r.left||l.bottom<r.top)&&(o=i.posAfter),a=!0),!i.contentDOM&&o<0&&!i.node.isText))return(i.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?i.posBefore:i.posAfter;s=i.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function O6(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),s=o;;){let a=n.childNodes[s];if(a.nodeType==1){let i=a.getClientRects();for(let l=0;l<i.length;l++){let c=i[l];if(K1(e,c))return O6(a,e,c)}}if((s=(s+1)%r)==o)break}return n}function SU(n,e){let t=n.dom.ownerDocument,r,o=0,s=lU(t,e.left,e.top);s&&({node:r,offset:o}=s);let a=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),i;if(!a||!n.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=n.dom.getBoundingClientRect();if(!K1(e,c)||(a=O6(n.dom,e,c),!a))return null}if(Ir)for(let c=a;r&&c;c=cl(c))c.draggable&&(r=void 0);if(a=gU(a,e),r){if(Wo&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let d=r.childNodes[o],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let c;nc&&o&&r.nodeType==1&&(c=r.childNodes[o-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?i=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(i=bU(n,r,o,e))}i==null&&(i=yU(n,a,e));let l=n.docView.nearestDesc(a,!0);return{pos:i,inside:l?l.posAtStart-l.border:-1}}function h3(n){return n.top<n.bottom||n.left<n.right}function Qa(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(h3(r))return r}return Array.prototype.find.call(t,h3)||n.getBoundingClientRect()}const wU=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _6(n,e,t){let{node:r,offset:o,atom:s}=n.docView.domFromPos(e,t<0?-1:1),a=nc||Wo;if(r.nodeType==3)if(a&&(wU.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let l=Qa(ka(r,o,o),t);if(Wo&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let c=Qa(ka(r,o-1,o-1),-1);if(c.top==l.top){let d=Qa(ka(r,o,o+1),-1);if(d.top!=l.top)return Kl(d,d.left<c.left)}}return l}else{let l=o,c=o,d=t<0?1:-1;return t<0&&!o?(c++,d=-1):t>=0&&o==r.nodeValue.length?(l--,d=1):t<0?l--:c++,Kl(Qa(ka(r,l,c),d),d<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(t<0||o==bo(r))){let l=r.childNodes[o-1];if(l.nodeType==1)return Lm(l.getBoundingClientRect(),!1)}if(s==null&&o<bo(r)){let l=r.childNodes[o];if(l.nodeType==1)return Lm(l.getBoundingClientRect(),!0)}return Lm(r.getBoundingClientRect(),t>=0)}if(s==null&&o&&(t<0||o==bo(r))){let l=r.childNodes[o-1],c=l.nodeType==3?ka(l,bo(l)-(a?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Kl(Qa(c,1),!1)}if(s==null&&o<bo(r)){let l=r.childNodes[o];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?ka(l,0,a?0:1):l.nodeType==1?l:null:null;if(c)return Kl(Qa(c,-1),!0)}return Kl(Qa(r.nodeType==3?ka(r):r,-t),t>=0)}function Kl(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Lm(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function A6(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function CU(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return A6(n,e,()=>{let{node:s}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let i=n.docView.nearestDesc(s,!0);if(!i)break;if(i.node.isBlock){s=i.contentDOM||i.dom;break}s=i.dom.parentNode}let a=_6(n,o.pos,1);for(let i=s.firstChild;i;i=i.nextSibling){let l;if(i.nodeType==1)l=i.getClientRects();else if(i.nodeType==3)l=ka(i,0,i.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(t=="up"?a.top-d.top>(d.bottom-a.top)*2:d.bottom-a.bottom>(a.bottom-d.top)*2))return!1}}return!0})}const xU=/[\u0590-\u08ac]/;function kU(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,a=o==r.parent.content.size,i=n.domSelection();return i?!xU.test(r.parent.textContent)||!i.modify?t=="left"||t=="backward"?s:a:A6(n,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=n.domSelectionRange(),h=i.caretBidiLevel;i.modify("move",t,"character");let m=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:g,focusOffset:y}=n.domSelectionRange(),S=g&&!m.contains(g.nodeType==1?g:g.parentNode)||l==g&&c==y;try{i.collapse(d,f),l&&(l!=d||c!=f)&&i.extend&&i.extend(l,c)}catch{}return h!=null&&(i.caretBidiLevel=h),S}):r.pos==r.start()||r.pos==r.end()}let m3=null,v3=null,g3=!1;function EU(n,e,t){return m3==e&&v3==t?g3:(m3=e,v3=t,g3=t=="up"||t=="down"?CU(n,e,t):kU(n,e,t))}const wo=0,y3=1,ei=2,na=3;class rc{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=wo,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let o=this.children[t];if(o==e)return r;r+=o.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(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,a;if(e==this.contentDOM)s=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(a)+a.size:this.posAtStart}else{let s,a;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((a=s.pmViewDesc)&&a.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(a):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>lr(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),a;if(s&&(!t||s.node))if(r&&(a=s.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],s=r+o.size;if(r==e&&s!=r){for(;!o.border&&o.children.length;)for(let a=0;a<o.children.length;a++){let i=o.children[a];if(i.size){o=i;break}}return o}if(e<s)return o.descAt(e-r-o.border);r=s}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let s=0;r<this.children.length;r++){let a=this.children[r],i=s+a.size;if(i>e||a instanceof P6){o=e-s;break}s=i}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof R6&&s.side>=0;r--);if(t<=0){let s,a=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,a=!1);return s&&t&&a&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?lr(s.dom)+1:0}}else{let s,a=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,a=!1);return s&&a&&!s.border&&!s.domAtom?s.domFromPos(0,t):{node:this.contentDOM,offset:s?lr(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let a=r,i=0;;i++){let l=this.children[i],c=a+l.size;if(o==-1&&e<=c){let d=a+l.border;if(e>=d&&t<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,t,d);e=a;for(let f=i;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=lr(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(c>t||i==this.children.length-1)){t=c;for(let d=i+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=lr(f.dom);break}t+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}a=c}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let s=Math.min(e,t),a=Math.max(e,t);for(let m=0,g=0;m<this.children.length;m++){let y=this.children[m],S=g+y.size;if(s>g&&a<S)return y.setSelection(e-g-y.border,t-g-y.border,r,o);g=S}let i=this.domFromPos(e,e?-1:1),l=t==e?i:this.domFromPos(t,t?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),f=!1;if((Wo||Ir)&&e==t){let{node:m,offset:g}=i;if(m.nodeType==3){if(f=!!(g&&m.nodeValue[g-1]==` |
| 64 |
`),f&&g==m.nodeValue.length)for(let y=m,S;y;y=y.parentNode){if(S=y.nextSibling){S.nodeName=="BR"&&(i=l={node:S.parentNode,offset:lr(S)+1});break}let w=y.pmViewDesc;if(w&&w.node&&w.node.isBlock)break}}else{let y=m.childNodes[g-1];f=y&&(y.nodeName=="BR"||y.contentEditable=="false")}}if(Wo&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(o=!0)}if(!(o||f&&Ir)&&mi(i.node,i.offset,d.anchorNode,d.anchorOffset)&&mi(l.node,l.offset,d.focusNode,d.focusOffset))return;let h=!1;if((c.extend||e==t)&&!f){c.collapse(i.node,i.offset);try{e!=t&&c.extend(l.node,l.offset),h=!0}catch{}}if(!h){if(e>t){let g=i;i=l,l=g}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(i.node,i.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let s=this.children[o],a=r+s.size;if(r==a?e<=a&&t>=r:e<a&&t>r){let i=r+s.border,l=a-s.border;if(e>=i&&t<=l){this.dirty=e==r||t==a?ei:y3,e==i&&t==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=na:s.markDirty(e-i,t-i);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?ei:na}r=a}this.dirty=ei}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?ei:y3;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class R6 extends rc{constructor(e,t,r,o){let s,a=t.type.toDOM;if(typeof a=="function"&&(a=a(r,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(a.nodeType!=1){let i=document.createElement("span");i.appendChild(a),a=i}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==wo&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!="selection"||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 TU extends rc{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class vi extends rc{constructor(e,t,r,o,s){super(e,[],r,o),this.mark=t,this.spec=s}static create(e,t,r,o){let s=o.nodeViews[t.type.name],a=s&&s(t,o,r);return(!a||!a.dom)&&(a=bi.renderSpec(document,t.type.spec.toDOM(t,r),null,t.attrs)),new vi(e,t,a.dom,a.contentDOM||a.dom,a)}parseRule(){return this.dirty&na||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=na&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=wo){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=wo}}slice(e,t,r){let o=vi.create(this.parent,this.mark,!0,r),s=this.children,a=this.size;t<a&&(s=jv(s,t,a,r)),e>0&&(s=jv(s,0,e,r));for(let i=0;i<s.length;i++)s[i].parent=o;return o.children=s,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Ss extends rc{constructor(e,t,r,o,s,a,i,l,c){super(e,[],s,a),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=i}static create(e,t,r,o,s,a){let i=s.nodeViews[t.type.name],l,c=i&&i(t,s,()=>{if(!l)return a;if(l.parent)return l.parent.posBeforeChild(l)},r,o),d=c&&c.dom,f=c&&c.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=bi.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!f&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let h=d;return d=N6(d,r,t),c?l=new MU(e,t,r,o,d,f||null,h,c,s,a+1):t.isText?new kp(e,t,r,o,d,h,s):new Ss(e,t,r,o,d,f||null,h,s,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>Le.empty)}return e}matchesNode(e,t,r){return this.dirty==wo&&e.eq(this.node)&&mf(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,s=e.composing?this.localCompositionInfo(e,t):null,a=s&&s.pos>-1?s:null,i=s&&s.pos<0,l=new OU(this,a&&a.node,e);RU(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,e):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?hn.none:this.node.child(d).marks,r,e),l.placeWidget(c,e,o)},(c,d,f,h)=>{l.syncToMarks(c.marks,r,e);let m;l.findNodeMatch(c,d,f,h)||i&&e.state.selection.from>o&&e.state.selection.to<o+c.nodeSize&&(m=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(c,d,f,m,e)||l.updateNextNode(c,d,f,e,h,o)||l.addNode(c,d,f,e,o),o+=c.nodeSize}),l.syncToMarks([],r,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==ei)&&(a&&this.protectLocalComposition(e,a),$6(this.contentDOM,this.children,e),dl&&PU(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ut)||r<t||o>t+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let a=s.nodeValue,i=$U(this.node.content,a,r-t,o-t);return i<0?null:{node:s,pos:i,text:a}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let a=new TU(this,s,t,o);e.input.compositionNodes.push(a),this.children=jv(this.children,r,r+o.length,e,a)}update(e,t,r,o){return this.dirty==na||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=wo}updateOuterDeco(e){if(mf(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=D6(this.dom,this.nodeDOM,Uv(this.outerDeco,this.node,t),Uv(e,this.node,t)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function b3(n,e,t,r,o){N6(r,e,n);let s=new Ss(void 0,n,e,t,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class kp extends Ss{constructor(e,t,r,o,s,a,i){super(e,t,r,o,s,null,a,i,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==na||this.dirty!=wo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=wo||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=wo,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),s=document.createTextNode(o.text);return new kp(this.parent,o,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=na)}get domAtom(){return!1}isText(e){return this.node.text==e}}class P6 extends rc{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==wo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class MU extends Ss{constructor(e,t,r,o,s,a,i,l,c,d){super(e,t,r,o,s,a,i,c,d),this.spec=l}update(e,t,r,o){if(this.dirty==na)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r.root):super.setSelection(e,t,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function $6(n,e,t){let r=n.firstChild,o=!1;for(let s=0;s<e.length;s++){let a=e[s],i=a.dom;if(i.parentNode==n){for(;i!=r;)r=S3(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(i,r);if(a instanceof vi){let l=r?r.previousSibling:n.lastChild;$6(a.contentDOM,a.children,t),r=l?l.nextSibling:n.firstChild}}for(;r;)r=S3(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const vu=function(n){n&&(this.nodeName=n)};vu.prototype=Object.create(null);const ti=[new vu];function Uv(n,e,t){if(n.length==0)return ti;let r=t?ti[0]:new vu,o=[r];for(let s=0;s<n.length;s++){let a=n[s].type.attrs;if(a){a.nodeName&&o.push(r=new vu(a.nodeName));for(let i in a){let l=a[i];l!=null&&(t&&o.length==1&&o.push(r=new vu(e.isInline?"span":"div")),i=="class"?r.class=(r.class?r.class+" ":"")+l:i=="style"?r.style=(r.style?r.style+";":"")+l:i!="nodeName"&&(r[i]=l))}}}return o}function D6(n,e,t,r){if(t==ti&&r==ti)return e;let o=e;for(let s=0;s<r.length;s++){let a=r[s],i=t[s];if(s){let l;i&&i.nodeName==a.nodeName&&o!=n&&(l=o.parentNode)&&l.nodeName.toLowerCase()==a.nodeName||(l=document.createElement(a.nodeName),l.pmIsDeco=!0,l.appendChild(o),i=ti[0]),o=l}IU(o,i||ti[0],a)}return o}function IU(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&n.classList.remove(r[s]);for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&n.classList.add(o[s]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function N6(n,e,t){return D6(n,n,ti,Uv(e,t,n.nodeType!=1))}function mf(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function S3(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class OU{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=_U(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,s=this.stack.length>>1,a=Math.min(s,e.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=wo,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let i=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[s])&&!this.isLocked(c.dom)){i=l;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let l=vi.create(this.top,e[s],t,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,s++}}findNodeMatch(e,t,r,o){let s=-1,a;if(o>=this.preMatch.index&&(a=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,r))s=this.top.children.indexOf(a,this.index);else for(let i=this.index,l=Math.min(this.top.children.length,i+5);i<l;i++){let c=this.top.children[i];if(c.matchesNode(e,t,r)&&!this.preMatch.matched.has(c)){s=i;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,r,o,s){let a=this.top.children[o];return a.dirty==na&&a.dom==a.contentDOM&&(a.dirty=ei),a.update(e,t,r,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=t}}updateNextNode(e,t,r,o,s,a){for(let i=this.index;i<this.top.children.length;i++){let l=this.top.children[i];if(l instanceof Ss){let c=this.preMatch.matched.get(l);if(c!=null&&c!=s)return!1;let d=l.dom,f,h=this.isLocked(d)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=na&&mf(t,l.outerDeco));if(!h&&l.update(e,t,r,o))return this.destroyBetween(this.index,i),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(l,e,t,r,o,a)))return this.destroyBetween(this.index,i),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=ei,f.updateChildren(o,a+1),f.dirty=wo),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,s,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!mf(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let i=Ss.create(this.top,t,r,o,s,a);if(i.contentDOM){i.children=e.children,e.children=[];for(let l of i.children)l.parent=i}return e.destroy(),i}addNode(e,t,r,o,s){let a=Ss.create(this.top,e,t,r,o,s);a.contentDOM&&a.updateChildren(o,s+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let s=new R6(this.top,e,t,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof vi;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof kp)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ir||br)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new P6(this.top,[],r,null);t!=this.top?t.children.push(o):t.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function _U(n,e){let t=e,r=t.children.length,o=n.childCount,s=new Map,a=[];e:for(;o>0;){let i;for(;;)if(r){let c=t.children[r-1];if(c instanceof vi)t=c,r=c.children.length;else{i=c,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let l=i.node;if(l){if(l!=n.child(o-1))break;--o,s.set(i,o),a.push(i)}}return{index:o,matched:s,matches:a.reverse()}}function AU(n,e){return n.type.side-e.type.side}function RU(n,e,t,r){let o=e.locals(n),s=0;if(o.length==0){for(let c=0;c<n.childCount;c++){let d=n.child(c);r(d,o,e.forChild(s,d),c),s+=d.nodeSize}return}let a=0,i=[],l=null;for(let c=0;;){let d,f;for(;a<o.length&&o[a].to==s;){let S=o[a++];S.widget&&(d?(f||(f=[d])).push(S):d=S)}if(d)if(f){f.sort(AU);for(let S=0;S<f.length;S++)t(f[S],c,!!l)}else t(d,c,!!l);let h,m;if(l)m=-1,h=l,l=null;else if(c<n.childCount)m=c,h=n.child(c++);else break;for(let S=0;S<i.length;S++)i[S].to<=s&&i.splice(S--,1);for(;a<o.length&&o[a].from<=s&&o[a].to>s;)i.push(o[a++]);let g=s+h.nodeSize;if(h.isText){let S=g;a<o.length&&o[a].from<S&&(S=o[a].from);for(let w=0;w<i.length;w++)i[w].to<S&&(S=i[w].to);S<g&&(l=h.cut(S-s),h=h.cut(0,S-s),g=S,m=-1)}else for(;a<o.length&&o[a].to<g;)a++;let y=h.isInline&&!h.isLeaf?i.filter(S=>!S.inline):i.slice();r(h,y,e.forChild(s,h),m),s=g}}function PU(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function $U(n,e,t,r){for(let o=0,s=0;o<n.childCount&&s<=r;){let a=n.child(o++),i=s;if(s+=a.nodeSize,!a.isText)continue;let l=a.text;for(;o<n.childCount;){let c=n.child(o++);if(s+=c.nodeSize,!c.isText)break;l+=c.text}if(s>=t){if(s>=r&&l.slice(r-e.length-i,r-i)==e)return r-e.length;let c=i<r?l.lastIndexOf(e,r-i-1):-1;if(c>=0&&c+e.length+i>=t)return i+c;if(t==r&&l.length>=r+e.length-i&&l.slice(r-i,r-i+e.length)==e)return r}}return-1}function jv(n,e,t,r,o){let s=[];for(let a=0,i=0;a<n.length;a++){let l=n[a],c=i,d=i+=l.size;c>=t||d<=e?s.push(l):(c<e&&s.push(l.slice(0,e-c,r)),o&&(s.push(o),o=void 0),d>t&&s.push(l.slice(t-c,l.size,r)))}return s}function G1(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),s=o&&o.size==0,a=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(a<0)return null;let i=r.resolve(a),l,c;if(xp(t)){for(l=a;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&Mt.isSelectable(f)&&o.parent&&!(f.isInline&&sU(t.focusNode,t.focusOffset,o.dom))){let h=o.posBefore;c=new Mt(a==h?i:r.resolve(h))}}else{if(t instanceof n.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let f=a,h=a;for(let m=0;m<t.rangeCount;m++){let g=t.getRangeAt(m);f=Math.min(f,n.docView.posFromDOM(g.startContainer,g.startOffset,1)),h=Math.max(h,n.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(f<0)return null;[l,a]=h==n.state.selection.anchor?[h,f]:[f,h],i=r.resolve(a)}else l=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let f=e=="pointer"||n.state.selection.head<i.pos&&!s?1:-1;c=Y1(n,d,i,f)}return c}function L6(n){return n.editable?n.hasFocus():F6(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Ra(n,e=!1){let t=n.state.selection;if(B6(n,t),!!L6(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&br){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&mi(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)NU(n);else{let{anchor:r,head:o}=t,s,a;w3&&!(t instanceof Ut)&&(t.$from.parent.inlineContent||(s=C3(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(a=C3(n,t.to))),n.docView.setSelection(r,o,n,e),w3&&(s&&x3(s),a&&x3(a)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&DU(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const w3=Ir||br&&E6<63;function C3(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,s=r?t.childNodes[r-1]:null;if(Ir&&o&&o.contentEditable=="false")return Bm(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Bm(o);if(s)return Bm(s)}}function Bm(n){return n.contentEditable="true",Ir&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function x3(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function DU(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!L6(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function NU(n){let e=n.domSelection(),t=document.createRange();if(!e)return;let r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setStart(r.parentNode,lr(r)+1):t.setStart(r,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&zr&&bs<=11&&(r.disabled=!0,r.disabled=!1)}function B6(n,e){if(e instanceof Mt){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(k3(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else k3(n)}function k3(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Y1(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||Ut.between(e,t,r)}function E3(n){return n.editable&&!n.hasFocus()?!1:F6(n)}function F6(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function LU(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return mi(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Kv(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&Xt.findFrom(s,e)}function ns(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function T3(n,e,t){let r=n.state.selection;if(r instanceof Ut)if(t.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let a=n.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return ns(n,new Ut(r.$anchor,a))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=Kv(n.state,e);return o&&o instanceof Mt?ns(n,o):!1}else if(!(yo&&t.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,a;if(!s||s.isText)return!1;let i=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(a=n.docView.descAt(i))&&!a.contentDOM?Mt.isSelectable(s)?ns(n,new Mt(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):nc?ns(n,new Ut(n.state.doc.resolve(e<0?i:i+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Mt&&r.node.isInline)return ns(n,new Ut(e>0?r.$to:r.$from));{let o=Kv(n.state,e);return o?ns(n,o):!1}}}function vf(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function gu(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function Wi(n,e){return e<0?BU(n):FU(n)}function BU(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,s,a=!1;for(Wo&&t.nodeType==1&&r<vf(t)&&gu(t.childNodes[r],-1)&&(a=!0);;)if(r>0){if(t.nodeType!=1)break;{let i=t.childNodes[r-1];if(gu(i,-1))o=t,s=--r;else if(i.nodeType==3)t=i,r=t.nodeValue.length;else break}}else{if(V6(t))break;{let i=t.previousSibling;for(;i&&gu(i,-1);)o=t.parentNode,s=lr(i),i=i.previousSibling;if(i)t=i,r=vf(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}a?Gv(n,t,r):o&&Gv(n,o,s)}function FU(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=vf(t),s,a;for(;;)if(r<o){if(t.nodeType!=1)break;let i=t.childNodes[r];if(gu(i,1))s=t,a=++r;else break}else{if(V6(t))break;{let i=t.nextSibling;for(;i&&gu(i,1);)s=i.parentNode,a=lr(i)+1,i=i.nextSibling;if(i)t=i,r=0,o=vf(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}s&&Gv(n,s,a)}function V6(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function VU(n,e){for(;n&&e==n.childNodes.length&&!tc(n);)e=lr(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function zU(n,e){for(;n&&!e&&!tc(n);)e=lr(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function Gv(n,e,t){if(e.nodeType!=3){let s,a;(a=VU(e,t))?(e=a,t=0):(s=zU(e,t))&&(e=s,t=s.nodeValue.length)}let r=n.domSelection();if(!r)return;if(xp(r)){let s=document.createRange();s.setEnd(e,t),s.setStart(e,t),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&Ra(n)},50)}function M3(n,e){let t=n.state.doc.resolve(e);if(!(br||uU)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),a=(s.top+s.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<t.end()){let s=n.coordsAtPos(e+1),a=(s.top+s.bottom)/2;if(a>o.top&&a<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function I3(n,e,t){let r=n.state.selection;if(r instanceof Ut&&!r.empty||t.indexOf("s")>-1||yo&&t.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let a=Kv(n.state,e);if(a&&a instanceof Mt)return ns(n,a)}if(!o.parent.inlineContent){let a=e<0?o:s,i=r instanceof eo?Xt.near(a,e):Xt.findFrom(a,e);return i?ns(n,i):!1}return!1}function O3(n,e){if(!(n.state.selection instanceof Ut))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let a=n.state.tr;return e<0?a.delete(t.pos-s.nodeSize,t.pos):a.delete(t.pos,t.pos+s.nodeSize),n.dispatch(a),!0}return!1}function _3(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function HU(n){if(!Ir||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;_3(n,r,"true"),setTimeout(()=>_3(n,r,"false"),20)}return!1}function WU(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function UU(n,e){let t=e.keyCode,r=WU(e);if(t==8||yo&&t==72&&r=="c")return O3(n,-1)||Wi(n,-1);if(t==46&&!e.shiftKey||yo&&t==68&&r=="c")return O3(n,1)||Wi(n,1);if(t==13||t==27)return!0;if(t==37||yo&&t==66&&r=="c"){let o=t==37?M3(n,n.state.selection.from)=="ltr"?-1:1:-1;return T3(n,o,r)||Wi(n,o)}else if(t==39||yo&&t==70&&r=="c"){let o=t==39?M3(n,n.state.selection.from)=="ltr"?1:-1:1;return T3(n,o,r)||Wi(n,o)}else{if(t==38||yo&&t==80&&r=="c")return I3(n,-1,r)||Wi(n,-1);if(t==40||yo&&t==78&&r=="c")return HU(n)||I3(n,1,r)||Wi(n,1);if(r==(yo?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function q1(n,e){n.someProp("transformCopied",m=>{e=m(e,n)});let t=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let m=r.firstChild;t.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let a=n.someProp("clipboardSerializer")||bi.fromSchema(n.state.schema),i=K6(),l=i.createElement("div");l.appendChild(a.serializeFragment(r,{document:i}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=j6[c.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let g=i.createElement(d[m]);for(;l.firstChild;)g.appendChild(l.firstChild);l.appendChild(g),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${o} ${s}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",m=>m(e,n))||e.content.textBetween(0,e.content.size,` |
| 65 |
|
| 66 |
`);return{dom:l,text:h,slice:e}}function z6(n,e,t,r,o){let s=o.parent.type.spec.code,a,i;if(!t&&!e)return null;let l=e&&(r||s||!t);if(l){if(n.someProp("transformPastedText",h=>{e=h(e,s||r,n)}),s)return e?new et(Le.from(n.state.schema.text(e.replace(/\r\n?/g,` |
| 67 |
`))),0,0):et.empty;let f=n.someProp("clipboardTextParser",h=>h(e,o,r,n));if(f)i=f;else{let h=o.marks(),{schema:m}=n.state,g=bi.fromSchema(m);a=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(y=>{let S=a.appendChild(document.createElement("p"));y&&S.appendChild(g.serializeNode(m.text(y,h)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),a=YU(t),nc&&qU(a);let c=a&&a.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=a.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;a=h}if(i||(i=(n.someProp("clipboardParser")||n.someProp("domParser")||ys.fromSchema(n.state.schema)).parseSlice(a,{preserveWhitespace:!!(l||d),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!jU.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)i=JU(A3(i,+d[1],+d[2]),d[4]);else if(i=et.maxOpen(KU(i.content,o),!0),i.openStart||i.openEnd){let f=0,h=0;for(let m=i.content.firstChild;f<i.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=i.content.lastChild;h<i.openEnd&&!m.type.spec.isolating;h++,m=m.lastChild);i=A3(i,f,h)}return n.someProp("transformPasted",f=>{i=f(i,n)}),i}const jU=/^(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 KU(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),s,a=[];if(n.forEach(i=>{if(!a)return;let l=o.findWrapping(i.type),c;if(!l)return a=null;if(c=a.length&&s.length&&W6(l,s,i,a[a.length-1],0))a[a.length-1]=c;else{a.length&&(a[a.length-1]=U6(a[a.length-1],s.length));let d=H6(i,l);a.push(d),o=o.matchType(d.type),s=l}}),a)return Le.from(a)}return n}function H6(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,Le.from(n));return n}function W6(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let s=W6(n,e,t,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(Le.from(H6(t,n,o+1))))}}function U6(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,U6(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(Le.empty,!0);return n.copy(t.append(r))}function Yv(n,e,t,r,o,s){let a=e<0?n.firstChild:n.lastChild,i=a.content;return n.childCount>1&&(s=0),o<r-1&&(i=Yv(i,e,t,r,o+1,s)),o>=t&&(i=e<0?a.contentMatchAt(0).fillBefore(i,s<=o).append(i):i.append(a.contentMatchAt(a.childCount).fillBefore(Le.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,a.copy(i))}function A3(n,e,t){return e<n.openStart&&(n=new et(Yv(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new et(Yv(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const j6={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 R3=null;function K6(){return R3||(R3=document.implementation.createHTMLDocument("title"))}let Fm=null;function GU(n){let e=window.trustedTypes;return e?(Fm||(Fm=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),Fm.createHTML(n)):n}function YU(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=K6().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&j6[r[1].toLowerCase()])&&(n=o.map(s=>"<"+s+">").join("")+n+o.map(s=>"</"+s+">").reverse().join("")),t.innerHTML=GU(n),o)for(let s=0;s<o.length;s++)t=t.querySelector(o[s])||t;return t}function qU(n){let e=n.querySelectorAll(br?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function JU(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:s,openEnd:a}=n;for(let i=r.length-2;i>=0;i-=2){let l=t.nodes[r[i]];if(!l||l.hasRequiredAttrs())break;o=Le.from(l.create(r[i+1],o)),s++,a++}return new et(o,s,a)}const Or={},_r={},XU={touchstart:!0,touchmove:!0};class ZU{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.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function QU(n){for(let e in Or){let t=Or[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{tj(n,r)&&!J1(n,r)&&(n.editable||!(r.type in _r))&&t(n,r)},XU[e]?{passive:!0}:void 0)}Ir&&n.dom.addEventListener("input",()=>null),qv(n)}function ms(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function ej(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function qv(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>J1(n,r))})}function J1(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function tj(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function nj(n,e){!J1(n,e)&&Or[e.type]&&(n.editable||!(e.type in _r))&&Or[e.type](n,e)}_r.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!Y6(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(Ia&&br&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),dl&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,qs(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||UU(n,t)?t.preventDefault():ms(n,"key")};_r.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};_r.keypress=(n,e)=>{let t=e;if(Y6(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||yo&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof Ut)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",s=>s(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Ep(n){return{left:n.clientX,top:n.clientY}}function rj(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function X1(n,e,t,r,o){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let a=s.depth+1;a>0;a--)if(n.someProp(e,i=>a>s.depth?i(n,t,s.nodeAfter,s.before(a),o,!0):i(n,t,s.node(a),s.before(a),o,!1)))return!0;return!1}function nl(n,e,t){if(n.focused||n.focus(),n.state.selection.eq(e))return;let r=n.state.tr.setSelection(e);r.setMeta("pointer",!0),n.dispatch(r)}function oj(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Mt.isSelectable(r)?(nl(n,new Mt(t)),!0):!1}function aj(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Mt&&(r=t.node);let s=n.state.doc.resolve(e);for(let a=s.depth+1;a>0;a--){let i=a>s.depth?s.nodeAfter:s.node(a);if(Mt.isSelectable(i)){r&&t.$from.depth>0&&a>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?o=s.before(t.$from.depth):o=s.before(a);break}}return o!=null?(nl(n,Mt.create(n.state.doc,o)),!0):!1}function sj(n,e,t,r,o){return X1(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(o?aj(n,t):oj(n,t))}function ij(n,e,t,r){return X1(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function lj(n,e,t,r){return X1(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||uj(n,t,r)}function uj(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(nl(n,Ut.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s),i=o.before(s);if(a.inlineContent)nl(n,Ut.create(r,i+1,i+1+a.content.size));else if(Mt.isSelectable(a))nl(n,Mt.create(r,i));else continue;return!0}}function Z1(n){return gf(n)}const G6=yo?"metaKey":"ctrlKey";Or.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=Z1(n),o=Date.now(),s="singleClick";o-n.input.lastClick.time<500&&rj(t,n.input.lastClick)&&!t[G6]&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:s};let a=n.posAtCoords(Ep(t));a&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new cj(n,a,t,!!r)):(s=="doubleClick"?ij:lj)(n,a.pos,a.inside,t)?t.preventDefault():ms(n,"pointer"))};class cj{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[G6],this.allowDefault=r.shiftKey;let s,a;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),a=t.inside;else{let d=e.state.doc.resolve(t.pos);s=d.parent,a=d.depth?d.before():0}const i=o?null:r.target,l=i?e.docView.nearestDesc(i,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||c instanceof Mt&&c.from<=a&&c.to>a)&&(this.mightDrag={node:s,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Wo&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),ms(e,"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(()=>Ra(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ep(e))),this.updateAllowDefault(e),this.allowDefault||!t?ms(this.view,"pointer"):sj(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ir&&this.mightDrag&&!this.mightDrag.node.isAtom||br&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(nl(this.view,Xt.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):ms(this.view,"pointer")}move(e){this.updateAllowDefault(e),ms(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Or.touchstart=n=>{n.input.lastTouch=Date.now(),Z1(n),ms(n,"pointer")};Or.touchmove=n=>{n.input.lastTouch=Date.now(),ms(n,"pointer")};Or.contextmenu=n=>Z1(n);function Y6(n,e){return n.composing?!0:Ir&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const dj=Ia?5e3:-1;_r.compositionstart=_r.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$to;if(e.selection instanceof Ut&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),gf(n,!0),n.markCursor=null;else if(gf(n,!e.selection.empty),Wo&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let a=s<0?o.lastChild:o.childNodes[s-1];if(!a)break;if(a.nodeType==3){let i=n.domSelection();i&&i.collapse(a,a.nodeValue.length);break}else o=a,s=-1}}n.input.composing=!0}q6(n,dj)};_r.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionNode=null,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,q6(n,20))};function q6(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>gf(n),e))}function J6(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=pj());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function fj(n){let e=n.domSelectionRange();if(!e.focusNode)return null;let t=oU(e.focusNode,e.focusOffset),r=aU(e.focusNode,e.focusOffset);if(t&&r&&t!=r){let o=r.pmViewDesc,s=n.domObserver.lastChangedTextNode;if(t==s||r==s)return s;if(!o||!o.isText(r.nodeValue))return r;if(n.input.compositionNode==r){let a=t.pmViewDesc;if(!(!a||!a.isText(t.nodeValue)))return r}}return t||r}function pj(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function gf(n,e=!1){if(!(Ia&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),J6(n),e||n.docView&&n.docView.dirty){let t=G1(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):(n.markCursor||e)&&!n.state.selection.empty?n.dispatch(n.state.tr.deleteSelection()):n.updateState(n.state),!0}return!1}}function hj(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const Vu=zr&&bs<15||dl&&cU<604;Or.copy=_r.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let s=Vu?null:t.clipboardData,a=r.content(),{dom:i,text:l}=q1(n,a);s?(t.preventDefault(),s.clearData(),s.setData("text/html",i.innerHTML),s.setData("text/plain",l)):hj(n,i),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function mj(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function vj(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?zu(n,r.value,null,o,e):zu(n,r.textContent,r.innerHTML,o,e)},50)}function zu(n,e,t,r,o){let s=z6(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,o,s||et.empty)))return!0;if(!s)return!1;let a=mj(s),i=a?n.state.tr.replaceSelectionWith(a,r):n.state.tr.replaceSelection(s);return n.dispatch(i.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function X6(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}_r.paste=(n,e)=>{let t=e;if(n.composing&&!Ia)return;let r=Vu?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&zu(n,X6(r),r.getData("text/html"),o,t)?t.preventDefault():vj(n,t)};class Z6{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const gj=yo?"altKey":"ctrlKey";function Q6(n,e){let t=n.someProp("dragCopies",r=>!r(e));return t??!e[gj]}Or.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,s=o.empty?null:n.posAtCoords(Ep(t)),a;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Mt?o.to-1:o.to))){if(r&&r.mightDrag)a=Mt.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let f=n.docView.nearestDesc(t.target,!0);f&&f.node.type.spec.draggable&&f!=n.docView&&(a=Mt.create(n.state.doc,f.posBefore))}}let i=(a||n.state.selection).content(),{dom:l,text:c,slice:d}=q1(n,i);(!t.dataTransfer.files.length||!br||E6>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Vu?"Text":"text/html",l.innerHTML),t.dataTransfer.effectAllowed="copyMove",Vu||t.dataTransfer.setData("text/plain",c),n.dragging=new Z6(d,Q6(n,t),a)};Or.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};_r.dragover=_r.dragenter=(n,e)=>e.preventDefault();_r.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Ep(t));if(!o)return;let s=n.state.doc.resolve(o.pos),a=r&&r.slice;a?n.someProp("transformPasted",g=>{a=g(a,n)}):a=z6(n,X6(t.dataTransfer),Vu?null:t.dataTransfer.getData("text/html"),!1,s);let i=!!(r&&Q6(n,t));if(n.someProp("handleDrop",g=>g(n,t,a||et.empty,i))){t.preventDefault();return}if(!a)return;t.preventDefault();let l=a?jW(n.state.doc,s.pos,a):s.pos;l==null&&(l=s.pos);let c=n.state.tr;if(i){let{node:g}=r;g?g.replace(c):c.deleteSelection()}let d=c.mapping.map(l),f=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,h=c.doc;if(f?c.replaceRangeWith(d,d,a.content.firstChild):c.replaceRange(d,d,a),c.doc.eq(h))return;let m=c.doc.resolve(d);if(f&&Mt.isSelectable(a.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new Mt(m));else{let g=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((y,S,w,x)=>g=x),c.setSelection(Y1(n,m,c.doc.resolve(g)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))};Or.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Ra(n)},20))};Or.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};Or.beforeinput=(n,e)=>{if(br&&Ia&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,qs(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in _r)Or[n]=_r[n];function Hu(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class yf{constructor(e,t){this.toDOM=e,this.spec=t||ui,this.side=this.spec.side||0}map(e,t,r,o){let{pos:s,deleted:a}=e.mapResult(t.from+o,this.side<0?-1:1);return a?null:new Vo(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof yf&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Hu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class ws{constructor(e,t){this.attrs=e,this.spec=t||ui}map(e,t,r,o){let s=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,a=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=a?null:new Vo(s,a,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof ws&&Hu(this.attrs,e.attrs)&&Hu(this.spec,e.spec)}static is(e){return e.type instanceof ws}destroy(){}}class Q1{constructor(e,t){this.attrs=e,this.spec=t||ui}map(e,t,r,o){let s=e.mapResult(t.from+o,1);if(s.deleted)return null;let a=e.mapResult(t.to+o,-1);return a.deleted||a.pos<=s.pos?null:new Vo(s.pos-r,a.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),s;return o==t.from&&!(s=e.child(r)).isText&&o+s.nodeSize==t.to}eq(e){return this==e||e instanceof Q1&&Hu(this.attrs,e.attrs)&&Hu(this.spec,e.spec)}destroy(){}}class Vo{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new Vo(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new Vo(e,e,new yf(t,r))}static inline(e,t,r,o){return new Vo(e,t,new ws(r,o))}static node(e,t,r,o){return new Vo(e,t,new Q1(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof ws}get widget(){return this.type instanceof yf}}const Yi=[],ui={};class Zn{constructor(e,t){this.local=e.length?e:Yi,this.children=t.length?t:Yi}static create(e,t){return t.length?bf(t,e,0,ui):mr}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,s){for(let a=0;a<this.local.length;a++){let i=this.local[a];i.from<=t&&i.to>=e&&(!s||s(i.spec))&&r.push(i.copy(i.from+o,i.to+o))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let i=this.children[a]+1;this.children[a+2].findInner(e-i,t-i,r,o+i,s)}}map(e,t,r){return this==mr||e.maps.length==0?this:this.mapInner(e,t,0,0,r||ui)}mapInner(e,t,r,o,s){let a;for(let i=0;i<this.local.length;i++){let l=this.local[i].map(e,r,o);l&&l.type.valid(t,l)?(a||(a=[])).push(l):s.onRemove&&s.onRemove(this.local[i].spec)}return this.children.length?yj(this.children,a||[],e,t,r,o,s):a?new Zn(a.sort(ci),Yi):mr}add(e,t){return t.length?this==mr?Zn.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,s=0;e.forEach((i,l)=>{let c=l+r,d;if(d=t8(t,i,c)){for(o||(o=this.children.slice());s<o.length&&o[s]<l;)s+=3;o[s]==l?o[s+2]=o[s+2].addInner(i,d,c+1):o.splice(s,0,l,l+i.nodeSize,bf(d,i,c+1,ui)),s+=3}});let a=e8(s?n8(t):t,-r);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||a.splice(i--,1);return new Zn(a.length?this.local.concat(a).sort(ci):this.local,o||this.children)}remove(e){return e.length==0||this==mr?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let a,i=r[s]+t,l=r[s+1]+t;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>i&&f.to<l&&(e[d]=null,(a||(a=[])).push(f));if(!a)continue;r==this.children&&(r=this.children.slice());let c=r[s+2].removeInner(a,i+1);c!=mr?r[s+2]=c:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,a;s<e.length;s++)if(a=e[s])for(let i=0;i<o.length;i++)o[i].eq(a,t)&&(o==this.local&&(o=this.local.slice()),o.splice(i--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new Zn(o,r):mr}forChild(e,t){if(this==mr)return this;if(t.isLeaf)return Zn.empty;let r,o;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(r=this.children[i+2]);break}let s=e+1,a=s+t.content.size;for(let i=0;i<this.local.length;i++){let l=this.local[i];if(l.from<a&&l.to>s&&l.type instanceof ws){let c=Math.max(s,l.from)-s,d=Math.min(a,l.to)-s;c<d&&(o||(o=[])).push(l.copy(c,d))}}if(o){let i=new Zn(o.sort(ci),Yi);return r?new is([i,r]):i}return r||mr}eq(e){if(this==e)return!0;if(!(e instanceof Zn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return eg(this.localsInner(e))}localsInner(e){if(this==mr)return Yi;if(e.inlineContent||!this.local.some(ws.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof ws||t.push(this.local[r]);return t}forEachSet(e){e(this)}}Zn.empty=new Zn([],[]);Zn.removeOverlap=eg;const mr=Zn.empty;class is{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,ui));return is.from(r)}forChild(e,t){if(t.isLeaf)return Zn.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,t);s!=mr&&(s instanceof is?r=r.concat(s.members):r.push(s))}return is.from(r)}eq(e){if(!(e instanceof is)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!t)t=s;else{r&&(t=t.slice(),r=!1);for(let a=0;a<s.length;a++)t.push(s[a])}}return t?eg(r?t:t.sort(ci)):Yi}static from(e){switch(e.length){case 0:return mr;case 1:return e[0];default:return new is(e.every(t=>t instanceof Zn)?e:e.reduce((t,r)=>t.concat(r instanceof Zn?r:r.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function yj(n,e,t,r,o,s,a){let i=n.slice();for(let c=0,d=s;c<t.maps.length;c++){let f=0;t.maps[c].forEach((h,m,g,y)=>{let S=y-g-(m-h);for(let w=0;w<i.length;w+=3){let x=i[w+1];if(x<0||h>x+d-f)continue;let T=i[w]+d-f;m>=T?i[w+1]=h<=T?-2:-1:h>=d&&S&&(i[w]+=S,i[w+1]+=S)}f+=S}),d=t.maps[c].map(d,-1)}let l=!1;for(let c=0;c<i.length;c+=3)if(i[c+1]<0){if(i[c+1]==-2){l=!0,i[c+1]=-1;continue}let d=t.map(n[c]+s),f=d-o;if(f<0||f>=r.content.size){l=!0;continue}let h=t.map(n[c+1]+s,-1),m=h-o,{index:g,offset:y}=r.content.findIndex(f),S=r.maybeChild(g);if(S&&y==f&&y+S.nodeSize==m){let w=i[c+2].mapInner(t,S,d+1,n[c]+s+1,a);w!=mr?(i[c]=f,i[c+1]=m,i[c+2]=w):(i[c+1]=-2,l=!0)}else l=!0}if(l){let c=bj(i,n,e,t,o,s,a),d=bf(c,r,0,a);e=d.local;for(let f=0;f<i.length;f+=3)i[f+1]<0&&(i.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let m=d.children[f];for(;h<i.length&&i[h]<m;)h+=3;i.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new Zn(e.sort(ci),i)}function e8(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new Vo(o.from+e,o.to+e,o.type))}return t}function bj(n,e,t,r,o,s,a){function i(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(r,o,c);f?t.push(f):a.onRemove&&a.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)i(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<n.length;l+=3)n[l+1]==-1&&i(n[l+2],e[l]+s+1);return t}function t8(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let s=0,a;s<n.length;s++)(a=n[s])&&a.from>t&&a.to<r&&((o||(o=[])).push(a),n[s]=null);return o}function n8(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function bf(n,e,t,r){let o=[],s=!1;e.forEach((i,l)=>{let c=t8(n,i,l+t);if(c){s=!0;let d=bf(c,i,t+l+1,r);d!=mr&&o.push(l,l+i.nodeSize,d)}});let a=e8(s?n8(n):n,-t).sort(ci);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||(r.onRemove&&r.onRemove(a[i].spec),a.splice(i--,1));return a.length||o.length?new Zn(a,o):mr}function ci(n,e){return n.from-e.from||n.to-e.to}function eg(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let s=e[o];if(s.from==r.from){s.to!=r.to&&(e==n&&(e=n.slice()),e[o]=s.copy(s.from,r.to),P3(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,s.from),P3(e,o,r.copy(s.from,r.to)));break}}}return e}function P3(n,e,t){for(;e<n.length&&ci(t,n[e])>0;)e++;n.splice(e,0,t)}function Vm(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=mr&&e.push(r)}),n.cursorWrapper&&e.push(Zn.create(n.state.doc,[n.cursorWrapper.deco])),is.from(e)}const Sj={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},wj=zr&&bs<=11;class Cj{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class xj{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Cj,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);zr&&bs<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),wj&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.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.takeRecords(),this.observer.observe(this.view.dom,Sj)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);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(E3(this.view)){if(this.suppressingSelectionUpdates)return Ra(this.view);if(zr&&bs<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&mi(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,r;for(let s=e.focusNode;s;s=cl(s))t.add(s);for(let s=e.anchorNode;s;s=cl(s))if(t.has(s)){r=s;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&E3(e)&&!this.ignoreSelectionChange(r),s=-1,a=-1,i=!1,l=[];if(e.editable)for(let d=0;d<t.length;d++){let f=this.registerMutation(t[d],l);f&&(s=s<0?f.from:Math.min(f.from,s),a=a<0?f.to:Math.max(f.to,a),f.typeOver&&(i=!0))}if(Wo&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,h]=d;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of d){let m=h.parentNode;m&&m.nodeName=="LI"&&(!f||Tj(e,f)!=m)&&h.remove()}}}let c=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&xp(r)&&(c=G1(e))&&c.eq(Xt.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Ra(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,a),kj(e)),this.handleDOMChange(s,a,i,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Ra(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let d=0;d<e.addedNodes.length;d++){let f=e.addedNodes[d];t.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,s=e.nextSibling;if(zr&&bs<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h)}let a=o&&o.parentNode==e.target?lr(o)+1:0,i=r.localPosFromDOM(e.target,a,-1),l=s&&s.parentNode==e.target?lr(s):e.target.childNodes.length,c=r.localPosFromDOM(e.target,l,1);return{from:i,to:c}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let $3=new WeakMap,D3=!1;function kj(n){if(!$3.has(n)&&($3.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=Wo,D3)return;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."),D3=!0}}function N3(n,e){let t=e.startContainer,r=e.startOffset,o=e.endContainer,s=e.endOffset,a=n.domAtPos(n.state.selection.anchor);return mi(a.node,a.offset,o,s)&&([t,r,o,s]=[o,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:o,focusOffset:s}}function Ej(n,e){if(e.getComposedRanges){let o=e.getComposedRanges(n.root)[0];if(o)return N3(n,o)}let t;function r(o){o.preventDefault(),o.stopImmediatePropagation(),t=o.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",r,!0),t?N3(n,t):null}function Tj(n,e){for(let t=e.parentNode;t&&t!=n.dom;t=t.parentNode){let r=n.docView.nearestDesc(t,!0);if(r&&r.node.isBlock)return t}return null}function Mj(n,e,t){let{node:r,fromOffset:o,toOffset:s,from:a,to:i}=n.docView.parseRange(e,t),l=n.domSelectionRange(),c,d=l.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],xp(l)||c.push({node:l.focusNode,offset:l.focusOffset})),br&&n.input.lastKeyCode===8)for(let S=s;S>o;S--){let w=r.childNodes[S-1],x=w.pmViewDesc;if(w.nodeName=="BR"&&!x){s=S;break}if(!x||x.size)break}let f=n.state.doc,h=n.someProp("domParser")||ys.fromSchema(n.state.schema),m=f.resolve(a),g=null,y=h.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:o,to:s,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:Ij,context:m});if(c&&c[0].pos!=null){let S=c[0].pos,w=c[1]&&c[1].pos;w==null&&(w=S),g={anchor:S+a,head:w+a}}return{doc:y,sel:g,from:a,to:i}}function Ij(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(Ir&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||Ir&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Oj=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function _j(n,e,t,r,o){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let P=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,L=G1(n,P);if(L&&!n.state.selection.eq(L)){if(br&&Ia&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",J=>J(n,qs(13,"Enter"))))return;let K=n.state.tr.setSelection(L);P=="pointer"?K.setMeta("pointer",!0):P=="key"&&K.scrollIntoView(),s&&K.setMeta("composition",s),n.dispatch(K)}return}let a=n.state.doc.resolve(e),i=a.sharedDepth(t);e=a.before(i+1),t=n.state.doc.resolve(t).after(i+1);let l=n.state.selection,c=Mj(n,e,t),d=n.state.doc,f=d.slice(c.from,c.to),h,m;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(h=n.state.selection.to,m="end"):(h=n.state.selection.from,m="start"),n.input.lastKeyCode=null;let g=Pj(f.content,c.doc.content,c.from,h,m);if(g&&n.input.domChangeCount++,(dl&&n.input.lastIOSEnter>Date.now()-225||Ia)&&o.some(P=>P.nodeType==1&&!Oj.test(P.nodeName))&&(!g||g.endA>=g.endB)&&n.someProp("handleKeyDown",P=>P(n,qs(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!g)if(r&&l instanceof Ut&&!l.empty&&l.$head.sameParent(l.$anchor)&&!n.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))g={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let P=L3(n,n.state.doc,c.sel);if(P&&!P.eq(n.state.selection)){let L=n.state.tr.setSelection(P);s&&L.setMeta("composition",s),n.dispatch(L)}}return}n.state.selection.from<n.state.selection.to&&g.start==g.endB&&n.state.selection instanceof Ut&&(g.start>n.state.selection.from&&g.start<=n.state.selection.from+2&&n.state.selection.from>=c.from?g.start=n.state.selection.from:g.endA<n.state.selection.to&&g.endA>=n.state.selection.to-2&&n.state.selection.to<=c.to&&(g.endB+=n.state.selection.to-g.endA,g.endA=n.state.selection.to)),zr&&bs<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>c.from&&c.doc.textBetween(g.start-c.from-1,g.start-c.from+1)==" "&&(g.start--,g.endA--,g.endB--);let y=c.doc.resolveNoCache(g.start-c.from),S=c.doc.resolveNoCache(g.endB-c.from),w=d.resolve(g.start),x=y.sameParent(S)&&y.parent.inlineContent&&w.end()>=g.endA,T;if((dl&&n.input.lastIOSEnter>Date.now()-225&&(!x||o.some(P=>P.nodeName=="DIV"||P.nodeName=="P"))||!x&&y.pos<c.doc.content.size&&(!y.sameParent(S)||!y.parent.inlineContent)&&!/\S/.test(c.doc.textBetween(y.pos,S.pos,"",""))&&(T=Xt.findFrom(c.doc.resolve(y.pos+1),1,!0))&&T.head>y.pos)&&n.someProp("handleKeyDown",P=>P(n,qs(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>g.start&&Rj(d,g.start,g.endA,y,S)&&n.someProp("handleKeyDown",P=>P(n,qs(8,"Backspace")))){Ia&&br&&n.domObserver.suppressSelectionUpdates();return}br&&g.endB==g.start&&(n.input.lastChromeDelete=Date.now()),Ia&&!x&&y.start()!=S.start()&&S.parentOffset==0&&y.depth==S.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==g.endA&&(g.endB-=2,S=c.doc.resolveNoCache(g.endB-c.from),setTimeout(()=>{n.someProp("handleKeyDown",function(P){return P(n,qs(13,"Enter"))})},20));let k=g.start,C=g.endA,M,A,V;if(x){if(y.pos==S.pos)zr&&bs<=11&&y.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>Ra(n),20)),M=n.state.tr.delete(k,C),A=d.resolve(g.start).marksAcross(d.resolve(g.endA));else if(g.endA==g.endB&&(V=Aj(y.parent.content.cut(y.parentOffset,S.parentOffset),w.parent.content.cut(w.parentOffset,g.endA-w.start()))))M=n.state.tr,V.type=="add"?M.addMark(k,C,V.mark):M.removeMark(k,C,V.mark);else if(y.parent.child(y.index()).isText&&y.index()==S.index()-(S.textOffset?0:1)){let P=y.parent.textBetween(y.parentOffset,S.parentOffset);if(n.someProp("handleTextInput",L=>L(n,k,C,P)))return;M=n.state.tr.insertText(P,k,C)}}if(M||(M=n.state.tr.replace(k,C,c.doc.slice(g.start-c.from,g.endB-c.from))),c.sel){let P=L3(n,M.doc,c.sel);P&&!(br&&n.composing&&P.empty&&(g.start!=g.endB||n.input.lastChromeDelete<Date.now()-100)&&(P.head==k||P.head==M.mapping.map(C)-1)||zr&&P.empty&&P.head==k)&&M.setSelection(P)}A&&M.ensureMarks(A),s&&M.setMeta("composition",s),n.dispatch(M.scrollIntoView())}function L3(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Y1(n,e.resolve(t.anchor),e.resolve(t.head))}function Aj(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,s=r,a,i,l;for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);for(let d=0;d<t.length;d++)s=t[d].removeFromSet(s);if(o.length==1&&s.length==0)i=o[0],a="add",l=d=>d.mark(i.addToSet(d.marks));else if(o.length==0&&s.length==1)i=s[0],a="remove",l=d=>d.mark(i.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<e.childCount;d++)c.push(l(e.child(d)));if(Le.from(c).eq(n))return{mark:i,type:a}}function Rj(n,e,t,r,o){if(t-e<=o.pos-r.pos||zm(r,!0,!1)<o.pos)return!1;let s=n.resolve(e);if(!r.parent.isTextblock){let i=s.nodeAfter;return i!=null&&t==e+i.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let a=n.resolve(zm(s,!0,!0));return!a.parent.isTextblock||a.pos>t||zm(a,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(a.parent.content)}function zm(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function Pj(n,e,t,r,o){let s=n.findDiffStart(e,t);if(s==null)return null;let{a,b:i}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let l=Math.max(0,s-Math.min(a,i));r-=a+l-s}if(a<s&&n.size<e.size){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<e.size&&B3(e.textBetween(s-1,s+1))&&(s+=l?1:-1),i=s+(i-a),a=s}else if(i<s){let l=r<=s&&r>=i?s-r:0;s-=l,s&&s<n.size&&B3(n.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-i),i=s}return{start:s,endA:a,endB:i}}function B3(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class $j{constructor(e,t){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 ZU,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(W3),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=z3(this),V3(this),this.nodeViews=H3(this),this.docView=b3(this.state.doc,F3(this),Vm(this),this.dom,this),this.domObserver=new xj(this,(r,o,s,a)=>_j(this,r,o,s,a)),this.domObserver.start(),QU(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&qv(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(W3),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,s=!1,a=!1;e.storedMarks&&this.composing&&(J6(this),a=!0),this.state=e;let i=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let m=H3(this);Nj(m,this.nodeViews)&&(this.nodeViews=m,s=!0)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&qv(this),this.editable=z3(this),V3(this);let l=Vm(this),c=F3(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=s||!this.docView.matchesNode(e.doc,c,l);(f||!e.selection.eq(o.selection))&&(a=!0);let h=d=="preserve"&&a&&this.dom.style.overflowAnchor==null&&pU(this);if(a){this.domObserver.stop();let m=f&&(zr||br)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&Dj(o.selection,e.selection);if(f){let g=br?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=fj(this)),(s||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=b3(e.doc,c,l,this.dom,this)),g&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&LU(this))?Ra(this,m):(B6(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&hU(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Mt){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&p3(this,t.getBoundingClientRect(),e)}else p3(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let s=r.from+(this.state.doc.content.size-t.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(o=s)}this.dragging=new Z6(e.slice,e.move,o<0?void 0:Mt.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let a=0;a<this.directPlugins.length;a++){let i=this.directPlugins[a].props[e];if(i!=null&&(o=t?t(i):i))return o}let s=this.state.plugins;if(s)for(let a=0;a<s.length;a++){let i=s[a].props[e];if(i!=null&&(o=t?t(i):i))return o}}hasFocus(){if(zr){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&mU(this.dom),Ra(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return SU(this,e)}coordsAtPos(e,t=1){return _6(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return EU(this,t||this.state,e)}pasteHTML(e,t){return zu(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return zu(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return q1(this,e)}destroy(){this.docView&&(ej(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Vm(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,nU())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return nj(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?Ir&&this.root.nodeType===11&&iU(this.dom.ownerDocument)==this.dom&&Ej(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function F3(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[Vo.node(0,n.state.doc.content.size,e)]}function V3(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:Vo.widget(n.state.selection.from,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function z3(n){return!n.someProp("editable",e=>e(n.state)===!1)}function Dj(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function H3(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function Nj(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function W3(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Ms={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:"'"},Sf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Lj=typeof navigator<"u"&&/Mac/.test(navigator.platform),Bj=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ur=0;ur<10;ur++)Ms[48+ur]=Ms[96+ur]=String(ur);for(var ur=1;ur<=24;ur++)Ms[ur+111]="F"+ur;for(var ur=65;ur<=90;ur++)Ms[ur]=String.fromCharCode(ur+32),Sf[ur]=String.fromCharCode(ur);for(var Hm in Ms)Sf.hasOwnProperty(Hm)||(Sf[Hm]=Ms[Hm]);function Fj(n){var e=Lj&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Bj&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Sf:Ms)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const Vj=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),zj=typeof navigator<"u"&&/Win/.test(navigator.platform);function Hj(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,s,a;for(let i=0;i<e.length-1;i++){let l=e[i];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))Vj?a=!0:o=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),a&&(t="Meta-"+t),s&&(t="Shift-"+t),t}function Wj(n){let e=Object.create(null);for(let t in n)e[Hj(t)]=n[t];return e}function Wm(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function Uj(n){return new ao({props:{handleKeyDown:jj(n)}})}function jj(n){let e=Wj(n);return function(t,r){let o=Fj(r),s,a=e[Wm(o,r)];if(a&&a(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let i=e[Wm(o,r,!1)];if(i&&i(t.state,t.dispatch,t))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(zj&&r.ctrlKey&&r.altKey)&&(s=Ms[r.keyCode])&&s!=o){let i=e[Wm(s,r)];if(i&&i(t.state,t.dispatch,t))return!0}}return!1}}const tg=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function r8(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const o8=(n,e,t)=>{let r=r8(n,t);if(!r)return!1;let o=ng(r);if(!o){let a=r.blockRange(),i=a&&Cl(a);return i==null?!1:(e&&e(n.tr.lift(a,i).scrollIntoView()),!0)}let s=o.nodeBefore;if(p8(n,o,e,-1))return!0;if(r.parent.content.size==0&&(fl(s,"end")||Mt.isSelectable(s)))for(let a=r.depth;;a--){let i=wp(n.doc,r.before(a),r.after(a),et.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=n.tr.step(i);l.setSelection(fl(s,"end")?Xt.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Mt.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}if(a==1||r.node(a-1).childCount>1)break}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1},Kj=(n,e,t)=>{let r=r8(n,t);if(!r)return!1;let o=ng(r);return o?a8(n,o,e):!1},Gj=(n,e,t)=>{let r=i8(n,t);if(!r)return!1;let o=rg(r);return o?a8(n,o,e):!1};function a8(n,e,t){let r=e.nodeBefore,o=r,s=e.pos-1;for(;!o.isTextblock;s--){if(o.type.spec.isolating)return!1;let d=o.lastChild;if(!d)return!1;o=d}let a=e.nodeAfter,i=a,l=e.pos+1;for(;!i.isTextblock;l++){if(i.type.spec.isolating)return!1;let d=i.firstChild;if(!d)return!1;i=d}let c=wp(n.doc,s,l,et.empty);if(!c||c.from!=s||c instanceof er&&c.slice.size>=l-s)return!1;if(t){let d=n.tr.step(c);d.setSelection(Ut.create(d.doc,s)),t(d.scrollIntoView())}return!0}function fl(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const s8=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=ng(r)}let a=s&&s.nodeBefore;return!a||!Mt.isSelectable(a)?!1:(e&&e(n.tr.setSelection(Mt.create(n.doc,s.pos-a.nodeSize)).scrollIntoView()),!0)};function ng(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function i8(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const l8=(n,e,t)=>{let r=i8(n,t);if(!r)return!1;let o=rg(r);if(!o)return!1;let s=o.nodeAfter;if(p8(n,o,e,1))return!0;if(r.parent.content.size==0&&(fl(s,"start")||Mt.isSelectable(s))){let a=wp(n.doc,r.before(),r.after(),et.empty);if(a&&a.slice.size<a.to-a.from){if(e){let i=n.tr.step(a);i.setSelection(fl(s,"start")?Xt.findFrom(i.doc.resolve(i.mapping.map(o.pos)),1):Mt.create(i.doc,i.mapping.map(o.pos))),e(i.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},u8=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;s=rg(r)}let a=s&&s.nodeAfter;return!a||!Mt.isSelectable(a)?!1:(e&&e(n.tr.setSelection(Mt.create(n.doc,s.pos)).scrollIntoView()),!0)};function rg(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const Yj=(n,e)=>{let t=n.selection,r=t instanceof Mt,o;if(r){if(t.node.isTextblock||!As(n.doc,t.from))return!1;o=t.from}else if(o=Sp(n.doc,t.from,-1),o==null)return!1;if(e){let s=n.tr.join(o);r&&s.setSelection(Mt.create(s.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},qj=(n,e)=>{let t=n.selection,r;if(t instanceof Mt){if(t.node.isTextblock||!As(n.doc,t.to))return!1;r=t.to}else if(r=Sp(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},Jj=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),s=o&&Cl(o);return s==null?!1:(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)},c8=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(` |
| 68 |
`).scrollIntoView()),!0)};function og(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const Xj=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),s=t.indexAfter(-1),a=og(o.contentMatchAt(s));if(!a||!o.canReplaceWith(s,s,a))return!1;if(e){let i=t.after(),l=n.tr.replaceWith(i,i,a.createAndFill());l.setSelection(Xt.near(l.doc.resolve(i),1)),e(l.scrollIntoView())}return!0},d8=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof eo||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=og(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let a=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,i=n.tr.insert(a,s.createAndFill());i.setSelection(Ut.create(i.doc,a+1)),e(i.scrollIntoView())}return!0},f8=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(Aa(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),o=r&&Cl(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)};function Zj(n){return(e,t)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof Mt&&e.selection.node.isBlock)return!r.parentOffset||!Aa(e.doc,r.pos)?!1:(t&&t(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],a,i,l=!1,c=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),c=r.start(m)==r.pos-(r.depth-m),i=og(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),s.unshift(l&&i?{type:i}:null),a=m;break}else{if(m==1)return!1;s.unshift(null)}let d=e.tr;(e.selection instanceof Ut||e.selection instanceof eo)&&d.deleteSelection();let f=d.mapping.map(r.pos),h=Aa(d.doc,f,s.length,s);if(h||(s[0]=i?{type:i}:null,h=Aa(d.doc,f,s.length,s)),!h)return!1;if(d.split(f,s.length,s),!l&&c&&r.node(a).type!=i){let m=d.mapping.map(r.before(a)),g=d.doc.resolve(m);i&&r.node(a-1).canReplaceWith(g.index(),g.index()+1,i)&&d.setNodeMarkup(d.mapping.map(r.before(a)),i)}return t&&t(d.scrollIntoView()),!0}}const Qj=Zj(),eK=(n,e)=>{let{$from:t,to:r}=n.selection,o,s=t.sharedDepth(r);return s==0?!1:(o=t.before(s),e&&e(n.tr.setSelection(Mt.create(n.doc,o))),!0)};function tK(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||As(n.doc,e.pos))?!1:(t&&t(n.tr.join(e.pos).scrollIntoView()),!0)}function p8(n,e,t,r){let o=e.nodeBefore,s=e.nodeAfter,a,i,l=o.type.spec.isolating||s.type.spec.isolating;if(!l&&tK(n,e,t))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(a=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(a[0]||s.type).validEnd){if(t){let m=e.pos+s.nodeSize,g=Le.empty;for(let w=a.length-1;w>=0;w--)g=Le.from(a[w].create(null,g));g=Le.from(o.copy(g));let y=n.tr.step(new tr(e.pos-1,m,e.pos,m,new et(g,1,0),a.length,!0)),S=y.doc.resolve(m+2*a.length);S.nodeAfter&&S.nodeAfter.type==o.type&&As(y.doc,S.pos)&&y.join(S.pos),t(y.scrollIntoView())}return!0}let d=s.type.spec.isolating||r>0&&l?null:Xt.findFrom(e,1),f=d&&d.$from.blockRange(d.$to),h=f&&Cl(f);if(h!=null&&h>=e.depth)return t&&t(n.tr.lift(f,h).scrollIntoView()),!0;if(c&&fl(s,"start",!0)&&fl(o,"end")){let m=o,g=[];for(;g.push(m),!m.isTextblock;)m=m.lastChild;let y=s,S=1;for(;!y.isTextblock;y=y.firstChild)S++;if(m.canReplace(m.childCount,m.childCount,y.content)){if(t){let w=Le.empty;for(let T=g.length-1;T>=0;T--)w=Le.from(g[T].copy(w));let x=n.tr.step(new tr(e.pos-g.length,e.pos+s.nodeSize,e.pos+S,e.pos+s.nodeSize-S,new et(w,g.length,0),0,!0));t(x.scrollIntoView())}return!0}}return!1}function h8(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(t&&t(e.tr.setSelection(Ut.create(e.doc,n<0?o.start(s):o.end(s)))),!0):!1}}const nK=h8(-1),rK=h8(1);function oK(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s),i=a&&U1(a,n,e);return i?(r&&r(t.tr.wrap(a,i).scrollIntoView()),!0):!1}}function U3(n,e=null){return function(t,r){let o=!1;for(let s=0;s<t.selection.ranges.length&&!o;s++){let{$from:{pos:a},$to:{pos:i}}=t.selection.ranges[s];t.doc.nodesBetween(a,i,(l,c)=>{if(o)return!1;if(!(!l.isTextblock||l.hasMarkup(n,e)))if(l.type==n)o=!0;else{let d=t.doc.resolve(c),f=d.index();o=d.parent.canReplaceWith(f,f+1,n)}})}if(!o)return!1;if(r){let s=t.tr;for(let a=0;a<t.selection.ranges.length;a++){let{$from:{pos:i},$to:{pos:l}}=t.selection.ranges[a];s.setBlockType(i,l,n,e)}r(s.scrollIntoView())}return!0}}function ag(...n){return function(e,t,r){for(let o=0;o<n.length;o++)if(n[o](e,t,r))return!0;return!1}}ag(tg,o8,s8);ag(tg,l8,u8);ag(c8,d8,f8,Qj);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function aK(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,a=o.blockRange(s);if(!a)return!1;let i=r?t.tr:null;return sK(i,a,n,e)?(r&&r(i.scrollIntoView()),!0):!1}}function sK(n,e,t,r=null){let o=!1,s=e,a=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=a.resolve(e.start-2);s=new ff(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new ff(e.$from,a.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let i=U1(s,t,r,e);return i?(n&&iK(n,e,i,o,t),!0):!1}function iK(n,e,t,r,o){let s=Le.empty;for(let d=t.length-1;d>=0;d--)s=Le.from(t[d].type.create(t[d].attrs,s));n.step(new tr(e.start-(r?2:0),e.end,e.start,e.end,new et(s,0,0),t.length,!0));let a=0;for(let d=0;d<t.length;d++)t[d].type==o&&(a=d+1);let i=t.length-a,l=e.start+t.length-(r?2:0),c=e.parent;for(let d=e.startIndex,f=e.endIndex,h=!0;d<f;d++,h=!1)!h&&Aa(n.doc,l,i)&&(n.split(l,i),l+=2*i),l+=c.child(d).nodeSize;return n}function lK(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,a=>a.childCount>0&&a.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?uK(e,t,n,s):cK(e,t,s):!0:!1}}function uK(n,e,t,r){let o=n.tr,s=r.end,a=r.$to.end(r.depth);s<a&&(o.step(new tr(s-1,a,s,a,new et(Le.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new ff(o.doc.resolve(r.$from.pos),o.doc.resolve(a),r.depth));const i=Cl(r);if(i==null)return!1;o.lift(r,i);let l=o.doc.resolve(o.mapping.map(s,-1)-1);return As(o.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&o.join(l.pos),e(o.scrollIntoView()),!0}function cK(n,e,t){let r=n.tr,o=t.parent;for(let m=t.end,g=t.endIndex-1,y=t.startIndex;g>y;g--)m-=o.child(g).nodeSize,r.delete(m-1,m+1);let s=r.doc.resolve(t.start),a=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let i=t.startIndex==0,l=t.endIndex==o.childCount,c=s.node(-1),d=s.index(-1);if(!c.canReplace(d+(i?0:1),d+1,a.content.append(l?Le.empty:Le.from(o))))return!1;let f=s.pos,h=f+a.nodeSize;return r.step(new tr(f-(i?1:0),h+(l?1:0),f+1,h-1,new et((i?Le.empty:Le.from(o.copy(Le.empty))).append(l?Le.empty:Le.from(o.copy(Le.empty))),i?0:1,l?0:1),i?0:1)),e(r.scrollIntoView()),!0}function dK(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,c=>c.childCount>0&&c.firstChild.type==n);if(!s)return!1;let a=s.startIndex;if(a==0)return!1;let i=s.parent,l=i.child(a-1);if(l.type!=n)return!1;if(t){let c=l.lastChild&&l.lastChild.type==i.type,d=Le.from(c?n.create():null),f=new et(Le.from(n.create(null,Le.from(i.type.create(null,d)))),c?3:1,0),h=s.start,m=s.end;t(e.tr.step(new tr(h-(c?3:1),m,h,m,f,1,!0)).scrollIntoView())}return!0}}function Tp(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,s=t.storedMarks,t}}}class Mp{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:s}=r,a=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([i,l])=>[i,(...d)=>{const f=l(...d)(a);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:a}=o,i=[],l=!!e,c=e||s.tr,d=()=>(!l&&t&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&a.dispatch(c),i.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(r).map(([h,m])=>[h,(...y)=>{const S=this.buildProps(c,t),w=m(...y)(S);return i.push(w),f}])),run:d};return f}createCan(e){const{rawCommands:t,state:r}=this,o=!1,s=e||r.tr,a=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(t).map(([l,c])=>[l,(...d)=>c(...d)({...a,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:a}=o,i={tr:e,editor:o,view:a,state:Tp({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([l,c])=>[l,(...d)=>c(...d)(i)]))}};return i}}class fK{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}once(e,t){const r=(...o)=>{this.off(e,r),t.apply(this,o)};return this.on(e,r)}removeAllListeners(){this.callbacks={}}}function ut(n,e,t){return n.config[e]===void 0&&n.parent?ut(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?ut(n.parent,e,t):null}):n.config[e]}function Ip(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function m8(n){const e=[],{nodeExtensions:t,markExtensions:r}=Ip(n),o=[...t,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(a=>{const i={name:a.name,options:a.options,storage:a.storage,extensions:o},l=ut(a,"addGlobalAttributes",i);if(!l)return;l().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([h,m])=>{e.push({type:f,name:h,attribute:{...s,...m}})})})})}),o.forEach(a=>{const i={name:a.name,options:a.options,storage:a.storage},l=ut(a,"addAttributes",i);if(!l)return;const c=l();Object.entries(c).forEach(([d,f])=>{const h={...s,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:a.name,name:d,attribute:h})})}),e}function nr(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function rr(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const i=s?String(s).split(" "):[],l=r[o]?r[o].split(" "):[],c=i.filter(d=>!l.includes(d));r[o]=[...l,...c].join(" ")}else if(o==="style"){const i=s?s.split(";").map(d=>d.trim()).filter(Boolean):[],l=r[o]?r[o].split(";").map(d=>d.trim()).filter(Boolean):[],c=new Map;l.forEach(d=>{const[f,h]=d.split(":").map(m=>m.trim());c.set(f,h)}),i.forEach(d=>{const[f,h]=d.split(":").map(m=>m.trim());c.set(f,h)}),r[o]=Array.from(c.entries()).map(([d,f])=>`${d}: ${f}`).join("; ")}else r[o]=s}),r},{})}function Jv(n,e){return e.filter(t=>t.type===n.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>rr(t,r),{})}function v8(n){return typeof n=="function"}function Kt(n,e=void 0,...t){return v8(n)?e?n.bind(e)(...t):n(...t):n}function pK(n={}){return Object.keys(n).length===0&&n.constructor===Object}function hK(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function j3(n,e){return"style"in n?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((s,a)=>{const i=a.attribute.parseHTML?a.attribute.parseHTML(t):hK(t.getAttribute(a.name));return i==null?s:{...s,[a.name]:i}},{});return{...r,...o}}}}function K3(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&pK(t)?!1:t!=null))}function mK(n,e){var t;const r=m8(n),{nodeExtensions:o,markExtensions:s}=Ip(n),a=(t=o.find(c=>ut(c,"topNode")))===null||t===void 0?void 0:t.name,i=Object.fromEntries(o.map(c=>{const d=r.filter(w=>w.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=n.reduce((w,x)=>{const T=ut(x,"extendNodeSchema",f);return{...w,...T?T(c):{}}},{}),m=K3({...h,content:Kt(ut(c,"content",f)),marks:Kt(ut(c,"marks",f)),group:Kt(ut(c,"group",f)),inline:Kt(ut(c,"inline",f)),atom:Kt(ut(c,"atom",f)),selectable:Kt(ut(c,"selectable",f)),draggable:Kt(ut(c,"draggable",f)),code:Kt(ut(c,"code",f)),whitespace:Kt(ut(c,"whitespace",f)),linebreakReplacement:Kt(ut(c,"linebreakReplacement",f)),defining:Kt(ut(c,"defining",f)),isolating:Kt(ut(c,"isolating",f)),attrs:Object.fromEntries(d.map(w=>{var x;return[w.name,{default:(x=w==null?void 0:w.attribute)===null||x===void 0?void 0:x.default}]}))}),g=Kt(ut(c,"parseHTML",f));g&&(m.parseDOM=g.map(w=>j3(w,d)));const y=ut(c,"renderHTML",f);y&&(m.toDOM=w=>y({node:w,HTMLAttributes:Jv(w,d)}));const S=ut(c,"renderText",f);return S&&(m.toText=S),[c.name,m]})),l=Object.fromEntries(s.map(c=>{const d=r.filter(S=>S.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:e},h=n.reduce((S,w)=>{const x=ut(w,"extendMarkSchema",f);return{...S,...x?x(c):{}}},{}),m=K3({...h,inclusive:Kt(ut(c,"inclusive",f)),excludes:Kt(ut(c,"excludes",f)),group:Kt(ut(c,"group",f)),spanning:Kt(ut(c,"spanning",f)),code:Kt(ut(c,"code",f)),attrs:Object.fromEntries(d.map(S=>{var w;return[S.name,{default:(w=S==null?void 0:S.attribute)===null||w===void 0?void 0:w.default}]}))}),g=Kt(ut(c,"parseHTML",f));g&&(m.parseDOM=g.map(S=>j3(S,d)));const y=ut(c,"renderHTML",f);return y&&(m.toDOM=S=>y({mark:S,HTMLAttributes:Jv(S,d)})),[c.name,m]}));return new s6({topNode:a,nodes:i,marks:l})}function Um(n,e){return e.nodes[n]||e.marks[n]||null}function G3(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}function sg(n,e){const t=bi.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}const vK=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,s,a,i)=>{var l,c;const d=((c=(l=o.type.spec).toText)===null||c===void 0?void 0:c.call(l,{node:o,pos:s,parent:a,index:i}))||o.textContent||"%leaf%";t+=o.isAtom&&!o.isText?d:d.slice(0,Math.max(0,r-s))}),t};function ig(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class Op{constructor(e){this.find=e.find,this.handler=e.handler}}const gK=(n,e)=>{if(ig(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function dd(n){var e;const{editor:t,from:r,to:o,text:s,rules:a,plugin:i}=n,{view:l}=t;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||!((e=c.nodeBefore||c.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let d=!1;const f=vK(c)+s;return a.forEach(h=>{if(d)return;const m=gK(f,h.find);if(!m)return;const g=l.state.tr,y=Tp({state:l.state,transaction:g}),S={from:r-(m[0].length-s.length),to:o},{commands:w,chain:x,can:T}=new Mp({editor:t,state:y});h.handler({state:y,range:S,match:m,commands:w,chain:x,can:T})===null||!g.steps.length||(g.setMeta(i,{transform:g,from:r,to:o,text:s}),l.dispatch(g),d=!0)}),d}function yK(n){const{editor:e,rules:t}=n,r=new ao({state:{init(){return null},apply(o,s,a){const i=o.getMeta(r);if(i)return i;const l=o.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=sg(Le.from(d),a.schema);const{from:f}=l,h=f+d.length;dd({editor:e,from:f,to:h,text:d,rules:t,plugin:r})}),o.selectionSet||o.docChanged?null:s}},props:{handleTextInput(o,s,a,i){return dd({editor:e,from:s,to:a,text:i,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&dd({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:a}=o.state.selection;return a?dd({editor:e,from:a.pos,to:a.pos,text:` |
| 69 |
`,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function bK(n){return Object.prototype.toString.call(n).slice(8,-1)}function fd(n){return bK(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function _p(n,e){const t={...n};return fd(n)&&fd(e)&&Object.keys(e).forEach(r=>{fd(e[r])&&fd(n[r])?t[r]=_p(n[r],e[r]):t[r]=e[r]}),t}class Eo{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Kt(ut(this,"addOptions",{name:this.name}))),this.storage=Kt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Eo(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_p(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Eo(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Kt(ut(t,"addOptions",{name:t.name})),t.storage=Kt(ut(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const a=o.marks();if(!!!a.find(c=>(c==null?void 0:c.type.name)===t.name))return!1;const l=a.find(c=>(c==null?void 0:c.type.name)===t.name);return l&&r.removeStoredMark(l),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}function SK(n){return typeof n=="number"}class wK{constructor(e){this.find=e.find,this.handler=e.handler}}const CK=(n,e,t)=>{if(ig(e))return[...n.matchAll(e)];const r=e(n,t);return r?r.map(o=>{const s=[o.text];return s.index=o.index,s.input=n,s.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(o.replaceWith)),s}):[]};function xK(n){const{editor:e,state:t,from:r,to:o,rule:s,pasteEvent:a,dropEvent:i}=n,{commands:l,chain:c,can:d}=new Mp({editor:e,state:t}),f=[];return t.doc.nodesBetween(r,o,(m,g)=>{if(!m.isTextblock||m.type.spec.code)return;const y=Math.max(r,g),S=Math.min(o,g+m.content.size),w=m.textBetween(y-g,S-g,void 0,"");CK(w,s.find,a).forEach(T=>{if(T.index===void 0)return;const k=y+T.index+1,C=k+T[0].length,M={from:t.tr.mapping.map(k),to:t.tr.mapping.map(C)},A=s.handler({state:t,range:M,match:T,commands:l,chain:c,can:d,pasteEvent:a,dropEvent:i});f.push(A)})}),f.every(m=>m!==null)}let pd=null;const kK=n=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",n),t};function EK(n){const{editor:e,rules:t}=n;let r=null,o=!1,s=!1,a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,i;try{i=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{i=null}const l=({state:d,from:f,to:h,rule:m,pasteEvt:g})=>{const y=d.tr,S=Tp({state:d,transaction:y});if(!(!xK({editor:e,state:S,from:Math.max(f-1,0),to:h.b-1,rule:m,pasteEvent:g,dropEvent:i})||!y.steps.length)){try{i=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{i=null}return a=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,y}};return t.map(d=>new ao({view(f){const h=g=>{var y;r=!((y=f.dom.parentElement)===null||y===void 0)&&y.contains(g.target)?f.dom.parentElement:null,r&&(pd=e)},m=()=>{pd&&(pd=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(s=r===f.dom.parentElement,i=h,!s){const m=pd;m&&setTimeout(()=>{const g=m.state.selection;g&&m.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(f,h)=>{var m;const g=(m=h.clipboardData)===null||m===void 0?void 0:m.getData("text/html");return a=h,o=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,m)=>{const g=f[0],y=g.getMeta("uiEvent")==="paste"&&!o,S=g.getMeta("uiEvent")==="drop"&&!s,w=g.getMeta("applyPasteRules"),x=!!w;if(!y&&!S&&!x)return;if(x){let{text:C}=w;typeof C=="string"?C=C:C=sg(Le.from(C),m.schema);const{from:M}=w,A=M+C.length,V=kK(C);return l({rule:d,state:m,from:M,to:{b:A},pasteEvt:V})}const T=h.doc.content.findDiffStart(m.doc.content),k=h.doc.content.findDiffEnd(m.doc.content);if(!(!SK(T)||!k||T===k.b))return l({rule:d,state:m,from:T,to:k,pasteEvt:a})}}))}function TK(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return Array.from(new Set(e))}class el{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=el.resolve(e),this.schema=mK(this.extensions,t),this.setupExtensions()}static resolve(e){const t=el.sort(el.flatten(e)),r=TK(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},o=ut(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const s=ut(r,"priority")||100,a=ut(o,"priority")||100;return s>a?-1:s<a?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Um(t.name,this.schema)},o=ut(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=el.sort([...this.extensions].reverse()),r=[],o=[],s=t.map(a=>{const i={name:a.name,options:a.options,storage:a.storage,editor:e,type:Um(a.name,this.schema)},l=[],c=ut(a,"addKeyboardShortcuts",i);let d={};if(a.type==="mark"&&ut(a,"exitable",i)&&(d.ArrowRight=()=>Eo.handleExit({editor:e,mark:a})),c){const y=Object.fromEntries(Object.entries(c()).map(([S,w])=>[S,()=>w({editor:e})]));d={...d,...y}}const f=Uj(d);l.push(f);const h=ut(a,"addInputRules",i);G3(a,e.options.enableInputRules)&&h&&r.push(...h());const m=ut(a,"addPasteRules",i);G3(a,e.options.enablePasteRules)&&m&&o.push(...m());const g=ut(a,"addProseMirrorPlugins",i);if(g){const y=g();l.push(...y)}return l}).flat();return[yK({editor:e,rules:r}),...EK({editor:e,rules:o}),...s]}get attributes(){return m8(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Ip(this.extensions);return Object.fromEntries(t.filter(r=>!!ut(r,"addNodeView")).map(r=>{const o=this.attributes.filter(l=>l.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:e,type:nr(r.name,this.schema)},a=ut(r,"addNodeView",s);if(!a)return[];const i=(l,c,d,f,h)=>{const m=Jv(l,o);return a()({node:l,view:c,getPos:d,decorations:f,innerDecorations:h,editor:e,extension:r,HTMLAttributes:m})};return[r.name,i]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const r={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:Um(e.name,this.schema)};e.type==="mark"&&(!((t=Kt(ut(e,"keepOnSplit",r)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const o=ut(e,"onBeforeCreate",r),s=ut(e,"onCreate",r),a=ut(e,"onUpdate",r),i=ut(e,"onSelectionUpdate",r),l=ut(e,"onTransaction",r),c=ut(e,"onFocus",r),d=ut(e,"onBlur",r),f=ut(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),s&&this.editor.on("create",s),a&&this.editor.on("update",a),i&&this.editor.on("selectionUpdate",i),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}}class Sr{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Kt(ut(this,"addOptions",{name:this.name}))),this.storage=Kt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Sr(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_p(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Sr({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Kt(ut(t,"addOptions",{name:t.name})),t.storage=Kt(ut(t,"addStorage",{name:t.name,options:t.options})),t}}function g8(n,e,t){const{from:r,to:o}=e,{blockSeparator:s=` |
| 70 |
|
| 71 |
`,textSerializers:a={}}=t||{};let i="";return n.nodesBetween(r,o,(l,c,d,f)=>{var h;l.isBlock&&c>r&&(i+=s);const m=a==null?void 0:a[l.type.name];if(m)return d&&(i+=m({node:l,pos:c,parent:d,index:f,range:e})),!1;l.isText&&(i+=(h=l==null?void 0:l.text)===null||h===void 0?void 0:h.slice(Math.max(r,c)-c,o-c))}),i}function y8(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const MK=Sr.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ao({key:new sa("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:s}=o,a=Math.min(...s.map(d=>d.$from.pos)),i=Math.max(...s.map(d=>d.$to.pos)),l=y8(t);return g8(r,{from:a,to:i},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),IK=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),OK=(n=!1)=>({commands:e})=>e.setContent("",n),_K=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:s,$to:a})=>{n.doc.nodesBetween(s.pos,a.pos,(i,l)=>{if(i.type.isText)return;const{doc:c,mapping:d}=e,f=c.resolve(d.map(l)),h=c.resolve(d.map(l+i.nodeSize)),m=f.blockRange(h);if(!m)return;const g=Cl(m);if(i.type.isTextblock){const{defaultType:y}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(m.start,y)}(g||g===0)&&e.lift(m,g)})}),!0},AK=n=>e=>n(e),RK=()=>({state:n,dispatch:e})=>d8(n,e),PK=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,s=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const a=r.mapping.map(e);return r.insert(a,s.content),r.setSelection(new Ut(r.doc.resolve(a-1))),!0},$K=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const i=o.before(s),l=o.after(s);n.delete(i,l).scrollIntoView()}return!0}return!1},DK=n=>({tr:e,state:t,dispatch:r})=>{const o=nr(n,t.schema),s=e.selection.$anchor;for(let a=s.depth;a>0;a-=1)if(s.node(a).type===o){if(r){const l=s.before(a),c=s.after(a);e.delete(l,c).scrollIntoView()}return!0}return!1},NK=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},LK=()=>({state:n,dispatch:e})=>tg(n,e),BK=()=>({commands:n})=>n.keyboardShortcut("Enter"),FK=()=>({state:n,dispatch:e})=>Xj(n,e);function wf(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:ig(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function b8(n,e,t={}){return n.find(r=>r.type===e&&wf(Object.fromEntries(Object.keys(t).map(o=>[o,r.attrs[o]])),t))}function Y3(n,e,t={}){return!!b8(n,e,t)}function lg(n,e,t){var r;if(!n||!e)return;let o=n.parent.childAfter(n.parentOffset);if((!o.node||!o.node.marks.some(d=>d.type===e))&&(o=n.parent.childBefore(n.parentOffset)),!o.node||!o.node.marks.some(d=>d.type===e)||(t=t||((r=o.node.marks[0])===null||r===void 0?void 0:r.attrs),!b8([...o.node.marks],e,t)))return;let a=o.index,i=n.start()+o.offset,l=a+1,c=i+o.node.nodeSize;for(;a>0&&Y3([...n.parent.child(a-1).marks],e,t);)a-=1,i-=n.parent.child(a).nodeSize;for(;l<n.parent.childCount&&Y3([...n.parent.child(l).marks],e,t);)c+=n.parent.child(l).nodeSize,l+=1;return{from:i,to:c}}function Ps(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const VK=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const s=Ps(n,r.schema),{doc:a,selection:i}=t,{$from:l,from:c,to:d}=i;if(o){const f=lg(l,s,e);if(f&&f.from<=c&&f.to>=d){const h=Ut.create(a,f.from,f.to);t.setSelection(h)}}return!0},zK=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function S8(n){return n instanceof Ut}function ni(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function w8(n,e=null){if(!e)return null;const t=Xt.atStart(n),r=Xt.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,s=r.to;return e==="all"?Ut.create(n,ni(0,o,s),ni(n.content.size,o,s)):Ut.create(n,ni(e,o,s),ni(e,o,s))}function HK(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function ug(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const WK=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const a=()=>{(ug()||HK())&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(s&&n===null&&!S8(t.state.selection))return a(),!0;const i=w8(o.doc,n)||t.state.selection,l=t.state.selection.eq(i);return s&&(l||o.setSelection(i),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),a()),!0},UK=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),jK=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e),C8=n=>{const e=n.childNodes;for(let t=e.length-1;t>=0;t-=1){const r=e[t];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?n.removeChild(r):r.nodeType===1&&C8(r)}return n};function hd(n){const e=`<body>${n}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return C8(t)}function Cf(n,e,t){if(n instanceof gs||n instanceof Le)return n;t={slice:!0,parseOptions:{},...t};const r=typeof n=="object"&&n!==null,o=typeof n=="string";if(r)try{if(Array.isArray(n)&&n.length>0)return Le.fromArray(n.map(i=>e.nodeFromJSON(i)));const a=e.nodeFromJSON(n);return t.errorOnInvalidContent&&a.check(),a}catch(s){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",s),Cf("",e,t)}if(o){if(t.errorOnInvalidContent){let a=!1,i="";const l=new s6({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(a=!0,i=typeof c=="string"?c:c.outerHTML,null)}]}})});if(t.slice?ys.fromSchema(l).parseSlice(hd(n),t.parseOptions):ys.fromSchema(l).parse(hd(n),t.parseOptions),t.errorOnInvalidContent&&a)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${i}`)})}const s=ys.fromSchema(e);return t.slice?s.parseSlice(hd(n),t.parseOptions).content:s.parse(hd(n),t.parseOptions)}return Cf("",e,t)}function KK(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof er||o instanceof tr))return;const s=n.mapping.maps[r];let a=0;s.forEach((i,l,c,d)=>{a===0&&(a=d)}),n.setSelection(Xt.near(n.doc.resolve(a),t))}const GK=n=>!("type"in n),YK=(n,e,t)=>({tr:r,dispatch:o,editor:s})=>{var a;if(o){t={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let i;try{i=Cf(e,s.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions},errorOnInvalidContent:(a=t.errorOnInvalidContent)!==null&&a!==void 0?a:s.options.enableContentCheck})}catch(g){return s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}}),!1}let{from:l,to:c}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},d=!0,f=!0;if((GK(i)?i:[i]).forEach(g=>{g.check(),d=d?g.isText&&g.marks.length===0:!1,f=f?g.isBlock:!1}),l===c&&f){const{parent:g}=r.doc.resolve(l);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(l-=1,c+=1)}let m;if(d){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof Le){let g="";e.forEach(y=>{y.text&&(g+=y.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,l,c)}else m=i,r.replaceWith(l,c,m);t.updateSelection&&KK(r,r.steps.length-1,-1),t.applyInputRules&&r.setMeta("applyInputRules",{from:l,text:m}),t.applyPasteRules&&r.setMeta("applyPasteRules",{from:l,text:m})}return!0},qK=()=>({state:n,dispatch:e})=>Yj(n,e),JK=()=>({state:n,dispatch:e})=>qj(n,e),XK=()=>({state:n,dispatch:e})=>o8(n,e),ZK=()=>({state:n,dispatch:e})=>l8(n,e),QK=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Sp(n.doc,n.selection.$from.pos,-1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},eG=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Sp(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}},tG=()=>({state:n,dispatch:e})=>Kj(n,e),nG=()=>({state:n,dispatch:e})=>Gj(n,e);function x8(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function rG(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,s,a;for(let i=0;i<e.length-1;i+=1){const l=e[i];if(/^(cmd|meta|m)$/i.test(l))a=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))o=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))ug()||x8()?a=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),a&&(t=`Meta-${t}`),s&&(t=`Shift-${t}`),t}const oG=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const s=rG(n).split(/-(?!$)/),a=s.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),i=new KeyboardEvent("keydown",{key:a==="Space"?" ":a,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{t.someProp("handleKeyDown",c=>c(t,i))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&o&&r.maybeStep(d)}),!0};function Wu(n,e,t={}){const{from:r,to:o,empty:s}=n.selection,a=e?nr(e,n.schema):null,i=[];n.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const m=Math.max(r,h),g=Math.min(o,h+f.nodeSize);i.push({node:f,from:m,to:g})});const l=o-r,c=i.filter(f=>a?a.name===f.node.type.name:!0).filter(f=>wf(f.node.attrs,t,{strict:!1}));return s?!!c.length:c.reduce((f,h)=>f+h.to-h.from,0)>=l}const aG=(n,e={})=>({state:t,dispatch:r})=>{const o=nr(n,t.schema);return Wu(t,o,e)?Jj(t,r):!1},sG=()=>({state:n,dispatch:e})=>f8(n,e),iG=n=>({state:e,dispatch:t})=>{const r=nr(n,e.schema);return lK(r)(e,t)},lG=()=>({state:n,dispatch:e})=>c8(n,e);function Ap(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function q3(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const uG=(n,e)=>({tr:t,state:r,dispatch:o})=>{let s=null,a=null;const i=Ap(typeof n=="string"?n:n.name,r.schema);return i?(i==="node"&&(s=nr(n,r.schema)),i==="mark"&&(a=Ps(n,r.schema)),o&&t.selection.ranges.forEach(l=>{r.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,d)=>{s&&s===c.type&&t.setNodeMarkup(d,void 0,q3(c.attrs,e)),a&&c.marks.length&&c.marks.forEach(f=>{a===f.type&&t.addMark(d,d+c.nodeSize,a.create(q3(f.attrs,e)))})})}),!0):!1},cG=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),dG=()=>({tr:n,dispatch:e})=>{if(e){const t=new eo(n.doc);n.setSelection(t)}return!0},fG=()=>({state:n,dispatch:e})=>s8(n,e),pG=()=>({state:n,dispatch:e})=>u8(n,e),hG=()=>({state:n,dispatch:e})=>eK(n,e),mG=()=>({state:n,dispatch:e})=>rK(n,e),vG=()=>({state:n,dispatch:e})=>nK(n,e);function Xv(n,e,t={},r={}){return Cf(n,e,{slice:!1,parseOptions:t,errorOnInvalidContent:r.errorOnInvalidContent})}const gG=(n,e=!1,t={},r={})=>({editor:o,tr:s,dispatch:a,commands:i})=>{var l,c;const{doc:d}=s;if(t.preserveWhitespace!=="full"){const f=Xv(n,o.schema,t,{errorOnInvalidContent:(l=r.errorOnInvalidContent)!==null&&l!==void 0?l:o.options.enableContentCheck});return a&&s.replaceWith(0,d.content.size,f).setMeta("preventUpdate",!e),!0}return a&&s.setMeta("preventUpdate",!e),i.insertContentAt({from:0,to:d.content.size},n,{parseOptions:t,errorOnInvalidContent:(c=r.errorOnInvalidContent)!==null&&c!==void 0?c:o.options.enableContentCheck})};function cg(n,e){const t=Ps(e,n.schema),{from:r,to:o,empty:s}=n.selection,a=[];s?(n.storedMarks&&a.push(...n.storedMarks),a.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,l=>{a.push(...l.marks)});const i=a.find(l=>l.type.name===t.name);return i?{...i.attrs}:{}}function yG(n,e){const t=new w6(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function bG(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function SG(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,s)=>{t(o)&&r.push({node:o,pos:s})}),r}function wG(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function dg(n){return e=>wG(e.$from,n)}function CG(n,e){const t={from:0,to:n.content.size};return g8(n,t,e)}function xG(n,e){const t=nr(e,n.schema),{from:r,to:o}=n.selection,s=[];n.doc.nodesBetween(r,o,i=>{s.push(i)});const a=s.reverse().find(i=>i.type.name===t.name);return a?{...a.attrs}:{}}function k8(n,e){const t=Ap(typeof e=="string"?e:e.name,n.schema);return t==="node"?xG(n,e):t==="mark"?cg(n,e):{}}function kG(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function EG(n){const e=kG(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,a)=>a!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function TG(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,s)=>{const a=[];if(o.ranges.length)o.forEach((i,l)=>{a.push({from:i,to:l})});else{const{from:i,to:l}=t[s];if(i===void 0||l===void 0)return;a.push({from:i,to:l})}a.forEach(({from:i,to:l})=>{const c=e.slice(s).map(i,-1),d=e.slice(s).map(l),f=e.invert().map(c,-1),h=e.invert().map(d);r.push({oldRange:{from:f,to:h},newRange:{from:c,to:d}})})}),EG(r)}function fg(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const s=t.resolve(n),a=lg(s,o.type);a&&r.push({mark:o,...a})}):t.nodesBetween(n,e,(o,s)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(a=>({from:s,to:s+o.nodeSize,mark:a})))}),r}function Ud(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function Zv(n,e,t={}){const{empty:r,ranges:o}=n.selection,s=e?Ps(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(f=>s?s.name===f.type.name:!0).find(f=>wf(f.attrs,t,{strict:!1}));let a=0;const i=[];if(o.forEach(({$from:f,$to:h})=>{const m=f.pos,g=h.pos;n.doc.nodesBetween(m,g,(y,S)=>{if(!y.isText&&!y.marks.length)return;const w=Math.max(m,S),x=Math.min(g,S+y.nodeSize),T=x-w;a+=T,i.push(...y.marks.map(k=>({mark:k,from:w,to:x})))})}),a===0)return!1;const l=i.filter(f=>s?s.name===f.mark.type.name:!0).filter(f=>wf(f.mark.attrs,t,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),c=i.filter(f=>s?f.mark.type!==s&&f.mark.type.excludes(s):!0).reduce((f,h)=>f+h.to-h.from,0);return(l>0?l+c:l)>=a}function MG(n,e,t={}){if(!e)return Wu(n,null,t)||Zv(n,null,t);const r=Ap(e,n.schema);return r==="node"?Wu(n,e,t):r==="mark"?Zv(n,e,t):!1}function J3(n,e){const{nodeExtensions:t}=Ip(e),r=t.find(a=>a.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=Kt(ut(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function pg(n,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var r;if(t){if(n.type.name==="hardBreak")return!0;if(n.isText)return/^\s*$/m.test((r=n.text)!==null&&r!==void 0?r:"")}if(n.isText)return!n.text;if(n.isAtom||n.isLeaf)return!1;if(n.content.childCount===0)return!0;if(e){let o=!0;return n.content.forEach(s=>{o!==!1&&(pg(s,{ignoreWhitespace:t,checkChildren:e})||(o=!1))}),o}return!1}function IG(n,e,t){var r;const{selection:o}=e;let s=null;if(S8(o)&&(s=o.$cursor),s){const i=(r=n.storedMarks)!==null&&r!==void 0?r:s.marks();return!!t.isInSet(i)||!i.some(l=>l.type.excludes(t))}const{ranges:a}=o;return a.some(({$from:i,$to:l})=>{let c=i.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(i.pos,l.pos,(d,f,h)=>{if(c)return!1;if(d.isInline){const m=!h||h.type.allowsMarkType(t),g=!!t.isInSet(d.marks)||!d.marks.some(y=>y.type.excludes(t));c=m&&g}return!c}),c})}const OG=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:s}=t,{empty:a,ranges:i}=s,l=Ps(n,r.schema);if(o)if(a){const c=cg(r,l);t.addStoredMark(l.create({...c,...e}))}else i.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(d,f,(h,m)=>{const g=Math.max(m,d),y=Math.min(m+h.nodeSize,f);h.marks.find(w=>w.type===l)?h.marks.forEach(w=>{l===w.type&&t.addMark(g,y,l.create({...w.attrs,...e}))}):t.addMark(g,y,l.create(e))})});return IG(r,t,l)},_G=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),AG=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const s=nr(n,t.schema);let a;return t.selection.$anchor.sameParent(t.selection.$head)&&(a=t.selection.$anchor.parent.attrs),s.isTextblock?o().command(({commands:i})=>U3(s,{...a,...e})(t)?!0:i.clearNodes()).command(({state:i})=>U3(s,{...a,...e})(i,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},RG=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=ni(n,0,r.content.size),s=Mt.create(r,o);e.setSelection(s)}return!0},PG=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:s}=typeof n=="number"?{from:n,to:n}:n,a=Ut.atStart(r).from,i=Ut.atEnd(r).to,l=ni(o,a,i),c=ni(s,a,i),d=Ut.create(r,l,c);e.setSelection(d)}return!0},$G=n=>({state:e,dispatch:t})=>{const r=nr(n,e.schema);return dK(r)(e,t)};function X3(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const DG=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:s,doc:a}=e,{$from:i,$to:l}=s,c=o.extensionManager.attributes,d=Ud(c,i.node().type.name,i.node().attrs);if(s instanceof Mt&&s.node.isBlock)return!i.parentOffset||!Aa(a,i.pos)?!1:(r&&(n&&X3(t,o.extensionManager.splittableMarks),e.split(i.pos).scrollIntoView()),!0);if(!i.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,h=i.depth===0?void 0:bG(i.node(-1).contentMatchAt(i.indexAfter(-1)));let m=f&&h?[{type:h,attrs:d}]:void 0,g=Aa(e.doc,e.mapping.map(i.pos),1,m);if(!m&&!g&&Aa(e.doc,e.mapping.map(i.pos),1,h?[{type:h}]:void 0)&&(g=!0,m=h?[{type:h,attrs:d}]:void 0),r){if(g&&(s instanceof Ut&&e.deleteSelection(),e.split(e.mapping.map(i.pos),1,m),h&&!f&&!i.parentOffset&&i.parent.type!==h)){const y=e.mapping.map(i.before()),S=e.doc.resolve(y);i.node(-1).canReplaceWith(S.index(),S.index()+1,h)&&e.setNodeMarkup(e.mapping.map(i.before()),h)}n&&X3(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return g},NG=(n,e={})=>({tr:t,state:r,dispatch:o,editor:s})=>{var a;const i=nr(n,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==i)return!1;const h=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(o){let w=Le.empty;const x=l.index(-1)?1:l.index(-2)?2:3;for(let V=l.depth-x;V>=l.depth-3;V-=1)w=Le.from(l.node(V).copy(w));const T=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,k={...Ud(h,l.node().type.name,l.node().attrs),...e},C=((a=i.contentMatch.defaultType)===null||a===void 0?void 0:a.createAndFill(k))||void 0;w=w.append(Le.from(i.createAndFill(null,C)||void 0));const M=l.before(l.depth-(x-1));t.replace(M,l.after(-T),new et(w,4-x,0));let A=-1;t.doc.nodesBetween(M,t.doc.content.size,(V,P)=>{if(A>-1)return!1;V.isTextblock&&V.content.size===0&&(A=P+1)}),A>-1&&t.setSelection(Ut.near(t.doc.resolve(A))),t.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,g={...Ud(h,f.type.name,f.attrs),...e},y={...Ud(h,l.node().type.name,l.node().attrs),...e};t.delete(l.pos,c.pos);const S=m?[{type:i,attrs:g},{type:m,attrs:y}]:[{type:i,attrs:g}];if(!Aa(t.doc,l.pos,2))return!1;if(o){const{selection:w,storedMarks:x}=r,{splittableMarks:T}=s.extensionManager,k=x||w.$to.parentOffset&&w.$from.marks();if(t.split(l.pos,2,S).scrollIntoView(),!k||!o)return!0;const C=k.filter(M=>T.includes(M.type.name));t.ensureMarks(C)}return!0},jm=(n,e)=>{const t=dg(a=>a.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&As(n.doc,t.pos)&&n.join(t.pos),!0},Km=(n,e)=>{const t=dg(a=>a.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&As(n.doc,r)&&n.join(r),!0},LG=(n,e,t,r={})=>({editor:o,tr:s,state:a,dispatch:i,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,m=nr(n,a.schema),g=nr(e,a.schema),{selection:y,storedMarks:S}=a,{$from:w,$to:x}=y,T=w.blockRange(x),k=S||y.$to.parentOffset&&y.$from.marks();if(!T)return!1;const C=dg(M=>J3(M.type.name,f))(y);if(T.depth>=1&&C&&T.depth-C.depth<=1){if(C.node.type===m)return c.liftListItem(g);if(J3(C.node.type.name,f)&&m.validContent(C.node.content)&&i)return l().command(()=>(s.setNodeMarkup(C.pos,m),!0)).command(()=>jm(s,m)).command(()=>Km(s,m)).run()}return!t||!k||!i?l().command(()=>d().wrapInList(m,r)?!0:c.clearNodes()).wrapInList(m,r).command(()=>jm(s,m)).command(()=>Km(s,m)).run():l().command(()=>{const M=d().wrapInList(m,r),A=k.filter(V=>h.includes(V.type.name));return s.ensureMarks(A),M?!0:c.clearNodes()}).wrapInList(m,r).command(()=>jm(s,m)).command(()=>Km(s,m)).run()},BG=(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=t,a=Ps(n,r.schema);return Zv(r,a,e)?o.unsetMark(a,{extendEmptyMarkRange:s}):o.setMark(a,e)},FG=(n,e,t={})=>({state:r,commands:o})=>{const s=nr(n,r.schema),a=nr(e,r.schema),i=Wu(r,s,t);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),i?o.setNode(a,l):o.setNode(s,{...l,...t})},VG=(n,e={})=>({state:t,commands:r})=>{const o=nr(n,t.schema);return Wu(t,o,e)?r.lift(o):r.wrapIn(o,e)},zG=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let s;if(o.spec.isInputRules&&(s=o.getState(n))){if(e){const a=n.tr,i=s.transform;for(let l=i.steps.length-1;l>=0;l-=1)a.step(i.steps[l].invert(i.docs[l]));if(s.text){const l=a.doc.resolve(s.from).marks();a.replaceWith(s.from,s.to,n.schema.text(s.text,l))}else a.delete(s.from,s.to)}return!0}}return!1},HG=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},WG=(n,e={})=>({tr:t,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:a=!1}=e,{selection:i}=t,l=Ps(n,r.schema),{$from:c,empty:d,ranges:f}=i;if(!o)return!0;if(d&&a){let{from:h,to:m}=i;const g=(s=c.marks().find(S=>S.type===l))===null||s===void 0?void 0:s.attrs,y=lg(c,l,g);y&&(h=y.from,m=y.to),t.removeMark(h,m,l)}else f.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,l)});return t.removeStoredMark(l),!0},UG=(n,e={})=>({tr:t,state:r,dispatch:o})=>{let s=null,a=null;const i=Ap(typeof n=="string"?n:n.name,r.schema);return i?(i==="node"&&(s=nr(n,r.schema)),i==="mark"&&(a=Ps(n,r.schema)),o&&t.selection.ranges.forEach(l=>{const c=l.$from.pos,d=l.$to.pos;let f,h,m,g;t.selection.empty?r.doc.nodesBetween(c,d,(y,S)=>{s&&s===y.type&&(m=Math.max(S,c),g=Math.min(S+y.nodeSize,d),f=S,h=y)}):r.doc.nodesBetween(c,d,(y,S)=>{S<c&&s&&s===y.type&&(m=Math.max(S,c),g=Math.min(S+y.nodeSize,d),f=S,h=y),S>=c&&S<=d&&(s&&s===y.type&&t.setNodeMarkup(S,void 0,{...y.attrs,...e}),a&&y.marks.length&&y.marks.forEach(w=>{if(a===w.type){const x=Math.max(S,c),T=Math.min(S+y.nodeSize,d);t.addMark(x,T,a.create({...w.attrs,...e}))}}))}),h&&(f!==void 0&&t.setNodeMarkup(f,void 0,{...h.attrs,...e}),a&&h.marks.length&&h.marks.forEach(y=>{a===y.type&&t.addMark(m,g,a.create({...y.attrs,...e}))}))}),!0):!1},jG=(n,e={})=>({state:t,dispatch:r})=>{const o=nr(n,t.schema);return oK(o,e)(t,r)},KG=(n,e={})=>({state:t,dispatch:r})=>{const o=nr(n,t.schema);return aK(o,e)(t,r)};var GG=Object.freeze({__proto__:null,blur:IK,clearContent:OK,clearNodes:_K,command:AK,createParagraphNear:RK,cut:PK,deleteCurrentNode:$K,deleteNode:DK,deleteRange:NK,deleteSelection:LK,enter:BK,exitCode:FK,extendMarkRange:VK,first:zK,focus:WK,forEach:UK,insertContent:jK,insertContentAt:YK,joinBackward:XK,joinDown:JK,joinForward:ZK,joinItemBackward:QK,joinItemForward:eG,joinTextblockBackward:tG,joinTextblockForward:nG,joinUp:qK,keyboardShortcut:oG,lift:aG,liftEmptyBlock:sG,liftListItem:iG,newlineInCode:lG,resetAttributes:uG,scrollIntoView:cG,selectAll:dG,selectNodeBackward:fG,selectNodeForward:pG,selectParentNode:hG,selectTextblockEnd:mG,selectTextblockStart:vG,setContent:gG,setMark:OG,setMeta:_G,setNode:AG,setNodeSelection:RG,setTextSelection:PG,sinkListItem:$G,splitBlock:DG,splitListItem:NG,toggleList:LG,toggleMark:BG,toggleNode:FG,toggleWrap:VG,undoInputRule:zG,unsetAllMarks:HG,unsetMark:WG,updateAttributes:UG,wrapIn:jG,wrapInList:KG});const YG=Sr.create({name:"commands",addCommands(){return{...GG}}}),qG=Sr.create({name:"drop",addProseMirrorPlugins(){return[new ao({key:new sa("tiptapDrop"),props:{handleDrop:(n,e,t,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:r})}}})]}}),JG=Sr.create({name:"editable",addProseMirrorPlugins(){return[new ao({key:new sa("editable"),props:{editable:()=>this.editor.options.editable}})]}}),XG=Sr.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new ao({key:new sa("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),ZG=Sr.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:a})=>[()=>a.undoInputRule(),()=>a.command(({tr:i})=>{const{selection:l,doc:c}=i,{empty:d,$anchor:f}=l,{pos:h,parent:m}=f,g=f.parent.isTextblock&&h>0?i.doc.resolve(h-1):f,y=g.parent.type.spec.isolating,S=f.pos-f.parentOffset,w=y&&g.parent.childCount===1?S===f.pos:Xt.atStart(c).from===h;return!d||!m.type.isTextblock||m.textContent.length||!w||w&&f.parent.type.name==="paragraph"?!1:a.clearNodes()}),()=>a.deleteSelection(),()=>a.joinBackward(),()=>a.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:a})=>[()=>a.deleteSelection(),()=>a.deleteCurrentNode(),()=>a.joinForward(),()=>a.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:a})=>[()=>a.newlineInCode(),()=>a.createParagraphNear(),()=>a.liftEmptyBlock(),()=>a.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return ug()||x8()?s:o},addProseMirrorPlugins(){return[new ao({key:new sa("clearDocument"),appendTransaction:(n,e,t)=>{if(n.some(y=>y.getMeta("composition")))return;const r=n.some(y=>y.docChanged)&&!e.doc.eq(t.doc),o=n.some(y=>y.getMeta("preventClearDocument"));if(!r||o)return;const{empty:s,from:a,to:i}=e.selection,l=Xt.atStart(e.doc).from,c=Xt.atEnd(e.doc).to;if(s||!(a===l&&i===c)||!pg(t.doc))return;const h=t.tr,m=Tp({state:t,transaction:h}),{commands:g}=new Mp({editor:this.editor,state:m});if(g.clearNodes(),!!h.steps.length)return h}})]}}),QG=Sr.create({name:"paste",addProseMirrorPlugins(){return[new ao({key:new sa("tiptapPaste"),props:{handlePaste:(n,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),eY=Sr.create({name:"tabindex",addProseMirrorPlugins(){return[new ao({key:new sa("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Js{get name(){return this.node.type.name}constructor(e,t,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=t,this.currentNode=o}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!==null&&e!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:t,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new Js(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Js(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Js(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,r)=>{const o=t.isBlock&&!t.isTextblock,s=t.isAtom&&!t.isText,a=this.pos+r+(s?0:1),i=this.resolvedPos.doc.resolve(a);if(!o&&i.depth<=this.depth)return;const l=new Js(i,this.editor,o,o?t:null);o&&(l.actualDepth=this.depth+1),e.push(new Js(i,this.editor,o,o?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(t).length>0){const s=o.node.attrs,a=Object.keys(t);for(let i=0;i<a.length;i+=1){const l=a[i];if(s[l]!==t[l])break}}else r=o;o=o.parent}return r}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const s=Object.keys(t);return this.children.forEach(a=>{r&&o.length>0||(a.node.type.name===e&&s.every(l=>t[l]===a.node.attrs[l])&&o.push(a),!(r&&o.length>0)&&(o=o.concat(a.querySelectorAll(e,t,r))))}),o}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const tY=`.ProseMirror { |
| 72 |
position: relative; |
| 73 |
} |
| 74 |
|
| 75 |
.ProseMirror { |
| 76 |
word-wrap: break-word; |
| 77 |
white-space: pre-wrap; |
| 78 |
white-space: break-spaces; |
| 79 |
-webkit-font-variant-ligatures: none; |
| 80 |
font-variant-ligatures: none; |
| 81 |
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ |
| 82 |
} |
| 83 |
|
| 84 |
.ProseMirror [contenteditable="false"] { |
| 85 |
white-space: normal; |
| 86 |
} |
| 87 |
|
| 88 |
.ProseMirror [contenteditable="false"] [contenteditable="true"] { |
| 89 |
white-space: pre-wrap; |
| 90 |
} |
| 91 |
|
| 92 |
.ProseMirror pre { |
| 93 |
white-space: pre-wrap; |
| 94 |
} |
| 95 |
|
| 96 |
img.ProseMirror-separator { |
| 97 |
display: inline !important; |
| 98 |
border: none !important; |
| 99 |
margin: 0 !important; |
| 100 |
width: 0 !important; |
| 101 |
height: 0 !important; |
| 102 |
} |
| 103 |
|
| 104 |
.ProseMirror-gapcursor { |
| 105 |
display: none; |
| 106 |
pointer-events: none; |
| 107 |
position: absolute; |
| 108 |
margin: 0; |
| 109 |
} |
| 110 |
|
| 111 |
.ProseMirror-gapcursor:after { |
| 112 |
content: ""; |
| 113 |
display: block; |
| 114 |
position: absolute; |
| 115 |
top: -2px; |
| 116 |
width: 20px; |
| 117 |
border-top: 1px solid black; |
| 118 |
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; |
| 119 |
} |
| 120 |
|
| 121 |
@keyframes ProseMirror-cursor-blink { |
| 122 |
to { |
| 123 |
visibility: hidden; |
| 124 |
} |
| 125 |
} |
| 126 |
|
| 127 |
.ProseMirror-hideselection *::selection { |
| 128 |
background: transparent; |
| 129 |
} |
| 130 |
|
| 131 |
.ProseMirror-hideselection *::-moz-selection { |
| 132 |
background: transparent; |
| 133 |
} |
| 134 |
|
| 135 |
.ProseMirror-hideselection * { |
| 136 |
caret-color: transparent; |
| 137 |
} |
| 138 |
|
| 139 |
.ProseMirror-focused .ProseMirror-gapcursor { |
| 140 |
display: block; |
| 141 |
} |
| 142 |
|
| 143 |
.tippy-box[data-animation=fade][data-state=hidden] { |
| 144 |
opacity: 0 |
| 145 |
}`;function nY(n,e,t){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(o),o}let rY=class extends fK{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:t,slice:r,moved:o})=>this.options.onDrop(t,r,o)),this.on("paste",({event:t,slice:r})=>this.options.onPaste(t,r)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=nY(tY,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=v8(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let r=t;if([].concat(e).forEach(s=>{const a=typeof s=="string"?`${s}$`:s.key;r=t.filter(i=>!i.key.startsWith(a))}),t.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,t;const o=[...this.options.enableCoreExtensions?[JG,MK.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),YG,XG,ZG,eY,qG,QG].filter(s=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[s.name]!==!1:!0):[],...this.options.extensions].filter(s=>["extension","node","mark"].includes(s==null?void 0:s.type));this.extensionManager=new el(o,this)}createCommandManager(){this.commandManager=new Mp({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=Xv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(a){if(!(a instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(a.message))throw a;this.emit("contentError",{editor:this,error:a,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(i=>i.name!=="collaboration"),this.createExtensionManager()}}),t=Xv(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const r=w8(t,this.options.autofocus);this.view=new $j(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:Qi.create({doc:t,selection:r||void 0})});const o=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(o),this.createNodeViews(),this.prependClass();const s=this.view.dom;s.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(a=>{var i;return(i=this.capturedTransaction)===null||i===void 0?void 0:i.step(a)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),s=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return k8(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return MG(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return sg(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=` |
| 146 |
|
| 147 |
`,textSerializers:r={}}=e||{};return CG(this.state.doc,{blockSeparator:t,textSerializers:{...y8(this.schema),...r}})}get isEmpty(){return pg(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelector(e,t))||null}$nodes(e,t){var r;return((r=this.$doc)===null||r===void 0?void 0:r.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new Js(t,this)}get $doc(){return this.$pos(0)}};function Uu(n){return new Op({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Kt(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,a=r[r.length-1],i=r[0];if(a){const l=i.search(/\S/),c=t.from+i.indexOf(a),d=c+a.length;if(fg(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(y=>y===n.type&&y!==m.mark.type)).filter(m=>m.to>c).length)return null;d<t.to&&s.delete(d,t.to),c>t.from&&s.delete(t.from+l,c);const h=t.from+l+a.length;s.addMark(t.from+l,h,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}function oY(n){return new Op({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Kt(n.getAttributes,void 0,r)||{},{tr:s}=e,a=t.from;let i=t.to;const l=n.type.create(o);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=a+c;d>i?d=i:i=d+r[1].length;const f=r[0][r[0].length-1];s.insertText(f,a+r[0].length-1),s.replaceWith(d,i,l)}else if(r[0]){const c=n.type.isInline?a:a-1;s.insert(c,n.type.create(o)).delete(s.mapping.map(a),s.mapping.map(i))}s.scrollIntoView()}})}function aY(n){return new Op({find:n.find,handler:({state:e,range:t,match:r})=>{const o=e.doc.resolve(t.from),s=Kt(n.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),n.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,n.type,s)}})}function ju(n){return new Op({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const s=Kt(n.getAttributes,void 0,r)||{},a=e.tr.delete(t.from,t.to),l=a.doc.resolve(t.from).blockRange(),c=l&&U1(l,n.type,s);if(!c)return null;if(a.wrap(l,c),n.keepMarks&&n.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:m}=n.editor.extensionManager,g=h||f.$to.parentOffset&&f.$from.marks();if(g){const y=g.filter(S=>m.includes(S.type.name));a.ensureMarks(y)}}if(n.keepAttributes){const f=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,s).run()}const d=a.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&As(a.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&a.join(t.from-1)}})}class To{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Kt(ut(this,"addOptions",{name:this.name}))),this.storage=Kt(ut(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new To(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>_p(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new To(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Kt(ut(t,"addOptions",{name:t.name})),t.storage=Kt(ut(t,"addStorage",{name:t.name,options:t.options})),t}}function pl(n){return new wK({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const s=Kt(n.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:a}=e,i=r[r.length-1],l=r[0];let c=t.to;if(i){const d=l.search(/\S/),f=t.from+l.indexOf(i),h=f+i.length;if(fg(t.from,t.to,e.doc).filter(g=>g.mark.type.excluded.find(S=>S===n.type&&S!==g.mark.type)).filter(g=>g.to>f).length)return null;h<t.to&&a.delete(h,t.to),f>t.from&&a.delete(t.from+d,f),c=t.from+d+i.length,a.addMark(t.from+d,c,n.type.create(s||{})),a.removeStoredMark(n.type)}}})}function Z3(n){return sM((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class sY extends rY{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=Z3(this.view.state),this.reactiveExtensionStorage=Z3(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),aM(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const r=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}}const Q3=ue({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=N(),t=yn();return ml(()=>{const r=n.editor;r&&r.options.element&&e.value&&Dt(()=>{if(!e.value||!r.options.element.firstChild)return;const o=v(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,t&&(r.appContext={...t.appContext,provides:t.provides}),r.setOptions({element:o}),r.createNodeViews()})}),no(()=>{const r=n.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return st("div",{ref:n=>{this.rootEl=n}})}}),iY=(n={})=>{const e=vr();return ln(()=>{e.value=new sY(n)}),no(()=>{var t,r,o;const s=(t=e.value)===null||t===void 0?void 0:t.options.element,a=s==null?void 0:s.cloneNode(!0);(r=s==null?void 0:s.parentNode)===null||r===void 0||r.replaceChild(a,s),(o=e.value)===null||o===void 0||o.destroy()}),e},lY=ue({__name:"IvyFontFamilyPopover",props:{editor:{}},setup(n){const e=N(!0),t=n,r=["Inter","Comic Sans MS","Sans Serif","serif","monospace","cursive"],o=N("Sans Serif"),s=a=>{t.editor.chain().focus().setFontFamily(a).run()};return(a,i)=>{const l=z1,c=V1;return I(),me(c,{ref:"elInputRef",modelValue:o.value,"onUpdate:modelValue":i[0]||(i[0]=d=>o.value=d),placeholder:"Select font",clearable:!1,disabled:!1,multiple:!1,class:H({"is-secondary":e.value}),onChange:s},{default:q(()=>[(I(),z(it,null,Ht(r,d=>R(l,{key:d,value:d,label:d,class:H({"is-secondary":e.value})},{default:q(()=>[Q("span",{style:en({fontFamily:d})},Ee(d),5)]),_:2},1032,["value","label","class"])),64))]),_:1},8,["modelValue","class"])}}}),uY=ue({__name:"IvyHeadingPopover",props:{editor:{}},setup(n){const e=n,t=N(!0),r=N("Paragraph"),o=s=>{if(s>0){e.editor.commands.toggleHeading({level:s});return}e.editor.commands.setParagraph()};return(s,a)=>{const i=z1,l=V1;return I(),me(l,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=c=>r.value=c),placeholder:"Select Heading Level",clearable:!1,disabled:!1,multiple:!1,class:H({"is-secondary":t.value}),onChange:o},{default:q(()=>[R(i,{value:0,label:"Paragraph",class:H({"is-secondary":t.value})},{default:q(()=>a[1]||(a[1]=[Q("p",null,"Paragraph",-1)])),_:1},8,["class"]),(I(),z(it,null,Ht(6,c=>R(i,{key:c,value:c,label:"Heading "+c,class:H({"is-secondary":t.value})},{default:q(()=>[(I(),me(nn("h"+c),{"data-item-type":"heading"},{default:q(()=>[ht("Heading "+Ee(c),1)]),_:2},1024))]),_:2},1032,["value","label","class"])),64))]),_:1},8,["modelValue","class"])}}}),cY={class:"ivyforms-flex ivyforms-gap-8"},dY=ue({__name:"IvyImagePopover",props:{editor:{}},setup(n){const{getLabel:e}=rn(),t=n,r=N(null),o=N(!1),s=N(null),a=N(!1),i=async f=>{const h=await c(f.raw);t.editor.commands.setImage({src:h}),v(r).hide()},l=()=>{t.editor.commands.setImage({src:s.value}),v(r).hide()},c=f=>{const h=new FileReader;return new Promise((m,g)=>{h.onload=y=>{var S;(S=y.target)!=null&&S.result?m(y.target.result):g(new Error("Failed to read file"))},h.onerror=g,h.readAsDataURL(f)})},d=()=>{s.value=null,o.value=!1};return(f,h)=>{const m=OL,g=Xo,y=Sl;return I(),me(y,{ref_key:"popoverRef",ref:r,trigger:"click",width:o.value?350:200,"popper-background":"level-2-foreground",placement:o.value?"bottom-end":"bottom",onHide:d},{reference:q(()=>[R(wl,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"image",onClick:h[4]||(h[4]=Qe(()=>{},["stop","prevent"]))})]),default:q(()=>[o.value?(I(),z(it,{key:1},[Q("div",cY,[R(oo,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=S=>s.value=S),placeholder:"Image Url"},null,8,["modelValue"]),R(Qt,{onClick:[l,h[2]||(h[2]=Qe(()=>{},["stop","prevent"]))]},{default:q(()=>[ht(Ee(v(e)("save")),1)]),_:1})]),R(g,{modelValue:a.value,"onUpdate:modelValue":h[3]||(h[3]=S=>a.value=S),class:"ivyforms-ml-8"},{default:q(()=>[ht(Ee(v(e)("open_in_new_tab")),1)]),_:1},8,["modelValue"])],64)):(I(),z(it,{key:0},[R(Qt,{type:"ghost",class:"insert-image-button",priority:"secondary",onClick:h[0]||(h[0]=Qe(S=>o.value=!0,["stop","prevent"]))},{default:q(()=>[ht(Ee(v(e)("insert_image_by_url")),1)]),_:1}),R(m,{"auto-upload":!1,"show-file-list":!1,"on-change":i},{trigger:q(()=>[R(Qt,{type:"ghost",priority:"secondary"},{default:q(()=>[ht(Ee(v(e)("upload_image")),1)]),_:1})]),_:1})],64))]),_:1},8,["width","placement"])}}}),fY={class:"ivyforms-flex ivyforms-gap-8 ivyforms-mt-4"},pY={class:"ivyforms-flex ivyforms-gap-16 ivyforms-mt-4"},hY=ue({__name:"IvyLinkPopover",props:{editor:{}},setup(n){const{getLabel:e}=rn(),t=n,r=N(null),o=N(""),s=N(!1),a=()=>{t.editor.chain().focus().extendMarkRange("link").setLink({href:o.value,target:s.value===!0?"_blank":"_self"}).run(),v(r).hide()},i=()=>{window.open(o.value,"_blank")},l=()=>{t.editor.chain().focus().extendMarkRange("link").unsetLink().run(),v(r).hide()},c=()=>{const f=t.editor.getAttributes("link");o.value=f.href,s.value=f.target==="_blank"},d=()=>{o.value="",s.value=!1};return(f,h)=>{const m=Sl;return I(),me(m,{ref_key:"popoverRef",ref:r,class:"ivyforms-link-popover",trigger:"click","popper-background":"level-2-foreground",width:"250",onShow:c,onHide:d},{reference:q(()=>[R(wl,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"link",active:f.editor.isActive("link"),onClick:h[2]||(h[2]=Qe(()=>{},["stop","prevent"]))},null,8,["active"])]),default:q(()=>[Q("div",fY,[R(oo,{modelValue:o.value,"onUpdate:modelValue":h[0]||(h[0]=g=>o.value=g),placeholder:"Enter Link",autofocus:""},null,8,["modelValue"])]),R(Xo,{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=g=>s.value=g),class:"ivyforms-ml-8",onClick:i},{default:q(()=>[ht(Ee(v(e)("open_in_new_tab")),1)]),_:1},8,["modelValue"]),Q("div",pY,[R(Qt,{class:"ivyforms-flex-grow",priority:"white",type:"fill",size:"d",disabled:!f.editor.isActive("link"),onClick:Qe(l,["stop","prevent"])},{default:q(()=>[ht(Ee(v(e)("clear")),1)]),_:1},8,["disabled"]),R(Qt,{class:"ivyforms-flex-grow",size:"d",onClick:Qe(a,["prevent"])},{default:q(()=>[ht(Ee(v(e)("save")),1)]),_:1})])]),_:1},512)}}}),mY=["#232E3C","#0938B9","#014D5D","#CA8A04","#CC5C00","#970202","#892969","#4034AB","#8B929C","#316BFF","#06A192","#E9B308","#F0852E","#D92E2E","#DE5EB3","#7A69EE","#FFFFFF","#CBE3FF","#D4FEEB","#FEF18B","#FFC799","#F3A5A5","#F7CAE8","#CEC4FD"],vY={class:"ivyforms-color-set"},gY=["onClick"],yY={class:"ivyforms-flex ivyforms-gap-16 ivyforms-mt-24"},bY=ue({__name:"IvyColorPickerPopover",props:{editor:{},textStyleProperty:{}},setup(n){const{getLabel:e}=rn(),t=n,r=N(null),o=N(null),s=N(null),a=N(null),i=()=>{a.value=cg(t.editor.state,"textStyle")[t.textStyleProperty]||null,r.value.updateHasValue()},l=f=>{a.value=f,r.value.updateHasValue(),t.textStyleProperty==="color"?t.editor.commands.setColor(f):t.editor.chain().focus().setTextBackgroundColor(f).run()},c=()=>{o.value.focus(),t.textStyleProperty==="color"?t.editor.commands.setColor(a.value):t.editor.chain().focus().setTextBackgroundColor(a.value).run(),v(s).hide()},d=()=>{a.value=null,r.value.updateHasValue(),t.textStyleProperty==="color"?t.editor.commands.unsetColor():t.editor.chain().focus().unsetTextBackgroundColor().run()};return(f,h)=>{const m=Qt,g=Sl;return I(),me(g,{ref_key:"popoverRef",ref:s,trigger:"click",width:296,onShow:h[2]||(h[2]=y=>i())},{reference:q(()=>[ve(f.$slots,"reference")]),default:q(()=>[Q("div",vY,[(I(!0),z(it,null,Ht(v(mY),y=>(I(),z("div",{key:y,style:en({"background-color":y,border:y==="#FFFFFF"?"1px solid var(--map-base-dusk-stroke--2)":"none",width:y==="#FFFFFF"?"24px":"26px",height:y==="#FFFFFF"?"24px":"26px"}),class:H(["ivyforms-color-set__item",{"color--selected":a.value===y}]),onMousedown:h[0]||(h[0]=Qe(()=>{},["prevent"])),onClick:Qe(S=>l(y),["stop"])},null,46,gY))),128))]),R(Zf,null,{default:q(()=>[R(oa,{ref_key:"hexFormItemRef",ref:r,label:"Hex"},{default:q(()=>[R(oo,{ref_key:"hexInputRef",ref:o,modelValue:a.value,"onUpdate:modelValue":h[1]||(h[1]=y=>a.value=y),autofocus:"",maxlength:"7"},null,8,["modelValue"])]),_:1},512),Q("div",yY,[R(m,{class:"ivyforms-flex-1",type:"border",size:"s",onClick:Qe(d,["prevent"])},{default:q(()=>[ht(Ee(v(e)("reset")),1)]),_:1}),R(m,{class:"ivyforms-flex-1",size:"s",onClick:Qe(c,["prevent"])},{default:q(()=>[ht(Ee(v(e)("save")),1)]),_:1})])]),_:1})]),_:3},512)}}}),SY=ue({__name:"IvyTextAlignPopoover",props:{editor:{}},setup(n){const e=n,t=N(null),r=o=>{e.editor.chain().focus().setTextAlign(o).run(),t.value.hide()};return(o,s)=>{const a=wl,i=Sl;return I(),me(i,{ref_key:"popoverRef",ref:t,trigger:"click","popper-background":"level-2-foreground",width:"10"},{reference:q(()=>[R(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":`text-align-${o.editor.getAttributes(o.editor.state.selection.$anchor.node().type.name).textAlign||"left"}`,onClick:s[0]||(s[0]=Qe(()=>{},["stop","prevent"]))},null,8,["icon-start"])]),default:q(()=>[R(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-left",active:o.editor.isActive({textAlign:"left"}),onClick:s[1]||(s[1]=Qe(l=>r("left"),["stop","prevent"]))},null,8,["active"]),R(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-right",active:o.editor.isActive({textAlign:"right"}),onClick:s[2]||(s[2]=Qe(l=>r("right"),["stop","prevent"]))},null,8,["active"]),R(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-center",active:o.editor.isActive({textAlign:"center"}),onClick:s[3]||(s[3]=Qe(l=>r("center"),["stop","prevent"]))},null,8,["active"]),R(a,{size:"s",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-align-justify",active:o.editor.isActive({textAlign:"justify"}),onClick:s[4]||(s[4]=Qe(l=>r("justify"),["stop","prevent"]))},null,8,["active"])]),_:1},512)}}}),wY=To.create({name:"doc",topNode:!0,content:"block+"}),CY=To.create({name:"text",group:"inline"}),xY=To.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),kY=n=>{if(!n.children.length)return;const e=n.querySelectorAll("span");e&&e.forEach(t=>{var r,o;const s=t.getAttribute("style"),a=(o=(r=t.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||o===void 0?void 0:o.getAttribute("style");t.setAttribute("style",`${a};${s}`)})},EY=Eo.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&kY(n),{}):!1}]},renderHTML({HTMLAttributes:n}){return["span",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:n})=>{const{selection:e}=n;return n.doc.nodesBetween(e.from,e.to,(t,r)=>{if(t.isTextblock)return!0;t.marks.filter(o=>o.type===this.type).some(o=>Object.values(o.attrs).some(s=>!!s))||n.removeMark(r,r+t.nodeSize,this.type)}),!0}}}}),TY=Sr.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return(e=n.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:n=>n.color?{style:`color: ${n.color}`}:{}}}}]},addCommands(){return{setColor:n=>({chain:e})=>e().setMark("textStyle",{color:n}).run(),unsetColor:()=>({chain:n})=>n().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),MY=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,IY=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,OY=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,_Y=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,AY=Eo.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:n=>n.type.name===this.name},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Uu({find:MY,type:this.type}),Uu({find:OY,type:this.type})]},addPasteRules(){return[pl({find:IY,type:this.type}),pl({find:_Y,type:this.type})]}}),RY=Sr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"textAlign")).every(e=>e)}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),PY=To.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,rr(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>aY({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}}),$Y=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,DY=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,NY=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,LY=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,BY=Eo.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:n=>n.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Uu({find:$Y,type:this.type}),Uu({find:NY,type:this.type})]},addPasteRules(){return[pl({find:DY,type:this.type}),pl({find:LY,type:this.type})]}}),FY=Eo.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),VY=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,zY=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,HY=Eo.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Uu({find:VY,type:this.type})]},addPasteRules(){return[pl({find:zY,type:this.type})]}}),WY=/^\s*>\s$/,UY=To.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:n}){return["blockquote",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[ju({find:WY,type:this.type})]}}),jY="listItem",e4="textStyle",t4=/^\s*([-+*])\s$/,KY=To.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(jY,this.editor.getAttributes(e4)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=ju({find:t4,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ju({find:t4,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(e4),editor:this.editor})),[n]}}),GY=To.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",rr(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),YY="listItem",n4="textStyle",r4=/^(\d+)\.\s$/,qY=To.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",rr(this.options.HTMLAttributes,t),0]:["ol",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YY,this.editor.getAttributes(n4)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=ju({find:r4,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=ju({find:r4,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(n4)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),JY=Eo.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(n){return n!=="super"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sup",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),XY=Eo.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(n){return n!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:n}){return["sub",rr(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),ZY=Sr.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:n=>n.style.fontFamily,renderHTML:n=>n.fontFamily?{style:`font-family: ${n.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:n=>({chain:e})=>e().setMark("textStyle",{fontFamily:n}).run(),unsetFontFamily:()=>({chain:n})=>n().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),QY="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",eq="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",hl=(n,e)=>{for(const t in e)n[t]=e[t];return n},Qv="numeric",e1="ascii",t1="alpha",yu="asciinumeric",au="alphanumeric",n1="domain",E8="emoji",tq="scheme",nq="slashscheme",Gm="whitespace";function rq(n,e){return n in e||(e[n]=[]),e[n]}function ri(n,e,t){e[Qv]&&(e[yu]=!0,e[au]=!0),e[e1]&&(e[yu]=!0,e[t1]=!0),e[yu]&&(e[au]=!0),e[t1]&&(e[au]=!0),e[au]&&(e[n1]=!0),e[E8]&&(e[n1]=!0);for(const r in e){const o=rq(r,t);o.indexOf(n)<0&&o.push(n)}}function oq(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function Lr(n=null){this.j={},this.jr=[],this.jd=null,this.t=n}Lr.groups={};Lr.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(n))return s}return e.jd},has(n,e=!1){return e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||Lr.groups;let o;return e&&e.j?o=e:(o=new Lr(e),t&&r&&ri(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const s=n.length;if(!s)return o;for(let a=0;a<s-1;a++)o=o.tt(n[a]);return o.tt(n[s-1],e,t,r)},tt(n,e,t,r){r=r||Lr.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const s=e;let a,i=o.go(n);if(i?(a=new Lr,hl(a.j,i.j),a.jr.push.apply(a.jr,i.jr),a.jd=i.jd,a.t=i.t):a=new Lr,s){if(r)if(a.t&&typeof a.t=="string"){const l=hl(oq(a.t,r),t);ri(s,l,r)}else t&&ri(s,t,r);a.t=s}return o.j[n]=a,a}};const zt=(n,e,t,r,o)=>n.ta(e,t,r,o),On=(n,e,t,r,o)=>n.tr(e,t,r,o),o4=(n,e,t,r,o)=>n.ts(e,t,r,o),Ve=(n,e,t,r,o)=>n.tt(e,t,r,o),xa="WORD",r1="UWORD",T8="ASCIINUMERICAL",M8="ALPHANUMERICAL",Ku="LOCALHOST",o1="TLD",a1="UTLD",jd="SCHEME",qi="SLASH_SCHEME",hg="NUM",s1="WS",mg="NL",bu="OPENBRACE",Su="CLOSEBRACE",xf="OPENBRACKET",kf="CLOSEBRACKET",Ef="OPENPAREN",Tf="CLOSEPAREN",Mf="OPENANGLEBRACKET",If="CLOSEANGLEBRACKET",Of="FULLWIDTHLEFTPAREN",_f="FULLWIDTHRIGHTPAREN",Af="LEFTCORNERBRACKET",Rf="RIGHTCORNERBRACKET",Pf="LEFTWHITECORNERBRACKET",$f="RIGHTWHITECORNERBRACKET",Df="FULLWIDTHLESSTHAN",Nf="FULLWIDTHGREATERTHAN",Lf="AMPERSAND",vg="APOSTROPHE",Bf="ASTERISK",rs="AT",Ff="BACKSLASH",Vf="BACKTICK",zf="CARET",ls="COLON",gg="COMMA",Hf="DOLLAR",Yo="DOT",Wf="EQUALS",yg="EXCLAMATION",go="HYPHEN",wu="PERCENT",Uf="PIPE",jf="PLUS",Kf="POUND",Cu="QUERY",bg="QUOTE",I8="FULLWIDTHMIDDLEDOT",Sg="SEMI",qo="SLASH",xu="TILDE",Gf="UNDERSCORE",O8="EMOJI",Yf="SYM";var _8=Object.freeze({__proto__:null,WORD:xa,UWORD:r1,ASCIINUMERICAL:T8,ALPHANUMERICAL:M8,LOCALHOST:Ku,TLD:o1,UTLD:a1,SCHEME:jd,SLASH_SCHEME:qi,NUM:hg,WS:s1,NL:mg,OPENBRACE:bu,CLOSEBRACE:Su,OPENBRACKET:xf,CLOSEBRACKET:kf,OPENPAREN:Ef,CLOSEPAREN:Tf,OPENANGLEBRACKET:Mf,CLOSEANGLEBRACKET:If,FULLWIDTHLEFTPAREN:Of,FULLWIDTHRIGHTPAREN:_f,LEFTCORNERBRACKET:Af,RIGHTCORNERBRACKET:Rf,LEFTWHITECORNERBRACKET:Pf,RIGHTWHITECORNERBRACKET:$f,FULLWIDTHLESSTHAN:Df,FULLWIDTHGREATERTHAN:Nf,AMPERSAND:Lf,APOSTROPHE:vg,ASTERISK:Bf,AT:rs,BACKSLASH:Ff,BACKTICK:Vf,CARET:zf,COLON:ls,COMMA:gg,DOLLAR:Hf,DOT:Yo,EQUALS:Wf,EXCLAMATION:yg,HYPHEN:go,PERCENT:wu,PIPE:Uf,PLUS:jf,POUND:Kf,QUERY:Cu,QUOTE:bg,FULLWIDTHMIDDLEDOT:I8,SEMI:Sg,SLASH:qo,TILDE:xu,UNDERSCORE:Gf,EMOJI:O8,SYM:Yf});const Sa=/[a-z]/,Gl=new RegExp("\\p{L}","u"),Ym=new RegExp("\\p{Emoji}","u"),wa=/\d/,qm=/\s/,a4="\r",Jm=` |
| 148 |
`,aq="️",sq="",Xm="";let md=null,vd=null;function iq(n=[]){const e={};Lr.groups=e;const t=new Lr;md==null&&(md=s4(QY)),vd==null&&(vd=s4(eq)),Ve(t,"'",vg),Ve(t,"{",bu),Ve(t,"}",Su),Ve(t,"[",xf),Ve(t,"]",kf),Ve(t,"(",Ef),Ve(t,")",Tf),Ve(t,"<",Mf),Ve(t,">",If),Ve(t,"(",Of),Ve(t,")",_f),Ve(t,"「",Af),Ve(t,"」",Rf),Ve(t,"『",Pf),Ve(t,"』",$f),Ve(t,"<",Df),Ve(t,">",Nf),Ve(t,"&",Lf),Ve(t,"*",Bf),Ve(t,"@",rs),Ve(t,"`",Vf),Ve(t,"^",zf),Ve(t,":",ls),Ve(t,",",gg),Ve(t,"$",Hf),Ve(t,".",Yo),Ve(t,"=",Wf),Ve(t,"!",yg),Ve(t,"-",go),Ve(t,"%",wu),Ve(t,"|",Uf),Ve(t,"+",jf),Ve(t,"#",Kf),Ve(t,"?",Cu),Ve(t,'"',bg),Ve(t,"/",qo),Ve(t,";",Sg),Ve(t,"~",xu),Ve(t,"_",Gf),Ve(t,"\\",Ff),Ve(t,"・",I8);const r=On(t,wa,hg,{[Qv]:!0});On(r,wa,r);const o=On(r,Sa,T8,{[yu]:!0}),s=On(r,Gl,M8,{[au]:!0}),a=On(t,Sa,xa,{[e1]:!0});On(a,wa,o),On(a,Sa,a),On(o,wa,o),On(o,Sa,o);const i=On(t,Gl,r1,{[t1]:!0});On(i,Sa),On(i,wa,s),On(i,Gl,i),On(s,wa,s),On(s,Sa),On(s,Gl,s);const l=Ve(t,Jm,mg,{[Gm]:!0}),c=Ve(t,a4,s1,{[Gm]:!0}),d=On(t,qm,s1,{[Gm]:!0});Ve(t,Xm,d),Ve(c,Jm,l),Ve(c,Xm,d),On(c,qm,d),Ve(d,a4),Ve(d,Jm),On(d,qm,d),Ve(d,Xm,d);const f=On(t,Ym,O8,{[E8]:!0});Ve(f,"#"),On(f,Ym,f),Ve(f,aq,f);const h=Ve(f,sq);Ve(h,"#"),On(h,Ym,f);const m=[[Sa,a],[wa,o]],g=[[Sa,null],[Gl,i],[wa,s]];for(let y=0;y<md.length;y++)Xa(t,md[y],o1,xa,m);for(let y=0;y<vd.length;y++)Xa(t,vd[y],a1,r1,g);ri(o1,{tld:!0,ascii:!0},e),ri(a1,{utld:!0,alpha:!0},e),Xa(t,"file",jd,xa,m),Xa(t,"mailto",jd,xa,m),Xa(t,"http",qi,xa,m),Xa(t,"https",qi,xa,m),Xa(t,"ftp",qi,xa,m),Xa(t,"ftps",qi,xa,m),ri(jd,{scheme:!0,ascii:!0},e),ri(qi,{slashscheme:!0,ascii:!0},e),n=n.sort((y,S)=>y[0]>S[0]?1:-1);for(let y=0;y<n.length;y++){const S=n[y][0],x=n[y][1]?{[tq]:!0}:{[nq]:!0};S.indexOf("-")>=0?x[n1]=!0:Sa.test(S)?wa.test(S)?x[yu]=!0:x[e1]=!0:x[Qv]=!0,o4(t,S,S,x)}return o4(t,"localhost",Ku,{ascii:!0}),t.jd=new Lr(Yf),{start:t,tokens:hl({groups:e},_8)}}function A8(n,e){const t=lq(e.replace(/[A-Z]/g,i=>i.toLowerCase())),r=t.length,o=[];let s=0,a=0;for(;a<r;){let i=n,l=null,c=0,d=null,f=-1,h=-1;for(;a<r&&(l=i.go(t[a]));)i=l,i.accepts()?(f=0,h=0,d=i):f>=0&&(f+=t[a].length,h++),c+=t[a].length,s+=t[a].length,a++;s-=f,a-=h,c-=f,o.push({t:d.t,v:e.slice(s-c,s),s:s-c,e:s})}return o}function lq(n){const e=[],t=n.length;let r=0;for(;r<t;){let o=n.charCodeAt(r),s,a=o<55296||o>56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(a),r+=a.length}return e}function Xa(n,e,t,r,o){let s;const a=e.length;for(let i=0;i<a-1;i++){const l=e[i];n.j[l]?s=n.j[l]:(s=new Lr(r),s.jr=o.slice(),n.j[l]=s),n=s}return s=new Lr(t),s.jr=o.slice(),n.j[e[a-1]]=s,s}function s4(n){const e=[],t=[];let r=0,o="0123456789";for(;r<n.length;){let s=0;for(;o.indexOf(n[r+s])>=0;)s++;if(s>0){e.push(t.join(""));for(let a=parseInt(n.substring(r,r+s),10);a>0;a--)t.pop();r+=s}else t.push(n[r]),r++}return e}const Gu={defaultProtocol:"http",events:null,format:i4,formatHref:i4,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function wg(n,e=null){let t=hl({},Gu);n&&(t=hl(t,n instanceof wg?n.o:n));const r=t.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=o}wg.prototype={o:Gu,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let o=this.o[n];return o&&(typeof o=="object"?(o=t.t in o?o[t.t]:Gu[n],typeof o=="function"&&r&&(o=o(e,t))):typeof o=="function"&&r&&(o=o(e,t.t,t)),o)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function i4(n){return n}function R8(n,e){this.t="token",this.v=n,this.tk=e}R8.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n=Gu.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),o=n.get("tagName",t,e),s=this.toFormattedString(n),a={},i=n.get("className",t,e),l=n.get("target",t,e),c=n.get("rel",t,e),d=n.getObj("attributes",t,e),f=n.getObj("events",t,e);return a.href=r,i&&(a.class=i),l&&(a.target=l),c&&(a.rel=c),d&&hl(a,d),{tagName:o,attributes:a,content:s,eventListeners:f}}};function Rp(n,e){class t extends R8{constructor(o,s){super(o,s),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const l4=Rp("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),u4=Rp("text"),uq=Rp("nl"),gd=Rp("url",{isLink:!0,toHref(n=Gu.defaultProtocol){return this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Ku&&n[1].t===ls}}),vo=n=>new Lr(n);function cq({groups:n}){const e=n.domain.concat([Lf,Bf,rs,Ff,Vf,zf,Hf,Wf,go,hg,wu,Uf,jf,Kf,qo,Yf,xu,Gf]),t=[ls,gg,Yo,yg,wu,Cu,bg,Sg,Mf,If,bu,Su,kf,xf,Ef,Tf,Of,_f,Af,Rf,Pf,$f,Df,Nf],r=[Lf,vg,Bf,Ff,Vf,zf,Hf,Wf,go,bu,Su,wu,Uf,jf,Kf,Cu,qo,Yf,xu,Gf],o=vo(),s=Ve(o,xu);zt(s,r,s),zt(s,n.domain,s);const a=vo(),i=vo(),l=vo();zt(o,n.domain,a),zt(o,n.scheme,i),zt(o,n.slashscheme,l),zt(a,r,s),zt(a,n.domain,a);const c=Ve(a,rs);Ve(s,rs,c),Ve(i,rs,c),Ve(l,rs,c);const d=Ve(s,Yo);zt(d,r,s),zt(d,n.domain,s);const f=vo();zt(c,n.domain,f),zt(f,n.domain,f);const h=Ve(f,Yo);zt(h,n.domain,f);const m=vo(l4);zt(h,n.tld,m),zt(h,n.utld,m),Ve(c,Ku,m);const g=Ve(f,go);Ve(g,go,g),zt(g,n.domain,f),zt(m,n.domain,f),Ve(m,Yo,h),Ve(m,go,g);const y=Ve(m,ls);zt(y,n.numeric,l4);const S=Ve(a,go),w=Ve(a,Yo);Ve(S,go,S),zt(S,n.domain,a),zt(w,r,s),zt(w,n.domain,a);const x=vo(gd);zt(w,n.tld,x),zt(w,n.utld,x),zt(x,n.domain,a),zt(x,r,s),Ve(x,Yo,w),Ve(x,go,S),Ve(x,rs,c);const T=Ve(x,ls),k=vo(gd);zt(T,n.numeric,k);const C=vo(gd),M=vo();zt(C,e,C),zt(C,t,M),zt(M,e,C),zt(M,t,M),Ve(x,qo,C),Ve(k,qo,C);const A=Ve(i,ls),V=Ve(l,ls),P=Ve(V,qo),L=Ve(P,qo);zt(i,n.domain,a),Ve(i,Yo,w),Ve(i,go,S),zt(l,n.domain,a),Ve(l,Yo,w),Ve(l,go,S),zt(A,n.domain,C),Ve(A,qo,C),Ve(A,Cu,C),zt(L,n.domain,C),zt(L,e,C),Ve(L,qo,C);const K=[[bu,Su],[xf,kf],[Ef,Tf],[Mf,If],[Of,_f],[Af,Rf],[Pf,$f],[Df,Nf]];for(let J=0;J<K.length;J++){const[G,ne]=K[J],W=Ve(C,G);Ve(M,G,W),Ve(W,ne,C);const D=vo(gd);zt(W,e,D);const U=vo();zt(W,t),zt(D,e,D),zt(D,t,U),zt(U,e,D),zt(U,t,U),Ve(D,ne,C),Ve(U,ne,C)}return Ve(o,Ku,x),Ve(o,mg,uq),{start:o,tokens:_8}}function dq(n,e,t){let r=t.length,o=0,s=[],a=[];for(;o<r;){let i=n,l=null,c=null,d=0,f=null,h=-1;for(;o<r&&!(l=i.go(t[o].t));)a.push(t[o++]);for(;o<r&&(c=l||i.go(t[o].t));)l=null,i=c,i.accepts()?(h=0,f=i):h>=0&&h++,o++,d++;if(h<0)o-=d,o<r&&(a.push(t[o]),o++);else{a.length>0&&(s.push(Zm(u4,e,a)),a=[]),o-=h,d-=h;const m=f.t,g=t.slice(o-d,o);s.push(Zm(m,e,g))}}return a.length>0&&s.push(Zm(u4,e,a)),s}function Zm(n,e,t){const r=t[0].s,o=t[t.length-1].e,s=e.slice(r,o);return new n(s,t)}const fq=typeof console<"u"&&console&&console.warn||(()=>{}),pq="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Sn={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function hq(){return Lr.groups={},Sn.scanner=null,Sn.parser=null,Sn.tokenQueue=[],Sn.pluginQueue=[],Sn.customSchemes=[],Sn.initialized=!1,Sn}function c4(n,e=!1){if(Sn.initialized&&fq(`linkifyjs: already initialized - will not register custom scheme "${n}" ${pq}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format. |
| 149 |
1. Must only contain digits, lowercase ASCII letters or "-" |
| 150 |
2. Cannot start or end with "-" |
| 151 |
3. "-" cannot repeat`);Sn.customSchemes.push([n,e])}function mq(){Sn.scanner=iq(Sn.customSchemes);for(let n=0;n<Sn.tokenQueue.length;n++)Sn.tokenQueue[n][1]({scanner:Sn.scanner});Sn.parser=cq(Sn.scanner.tokens);for(let n=0;n<Sn.pluginQueue.length;n++)Sn.pluginQueue[n][1]({scanner:Sn.scanner,parser:Sn.parser});return Sn.initialized=!0,Sn}function Cg(n){return Sn.initialized||mq(),dq(Sn.parser.start,n,A8(Sn.scanner.start,n))}Cg.scan=A8;function P8(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new wg(t),o=Cg(n),s=[];for(let a=0;a<o.length;a++){const i=o[a];i.isLink&&(!e||i.t===e)&&r.check(i)&&s.push(i.toFormattedObject(r))}return s}function vq(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function gq(n){return new ao({key:new sa("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!o||s)return;const{tr:a}=r,i=yG(t.doc,[...e]);if(TG(i).forEach(({newRange:c})=>{const d=SG(r.doc,c,m=>m.isTextblock);let f,h;if(d.length>1?(f=d[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(f=d[0],h=r.doc.textBetween(f.pos,c.to,void 0," ")),f&&h){const m=h.split(" ").filter(w=>w!=="");if(m.length<=0)return!1;const g=m[m.length-1],y=f.pos+h.lastIndexOf(g);if(!g)return!1;const S=Cg(g).map(w=>w.toObject(n.defaultProtocol));if(!vq(S))return!1;S.filter(w=>w.isLink).map(w=>({...w,from:y+w.start+1,to:y+w.end+1})).filter(w=>r.schema.marks.code?!r.doc.rangeHasMark(w.from,w.to,r.schema.marks.code):!0).filter(w=>n.validate(w.value)).filter(w=>n.shouldAutoLink(w.value)).forEach(w=>{fg(w.from,w.to,r.doc).some(x=>x.mark.type===n.type)||a.addMark(w.from,w.to,n.type.create({href:w.href}))})}}),!!a.steps.length)return a}})}function yq(n){return new ao({key:new sa("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,s;if(r.button!==0||!e.editable)return!1;let a=r.target;const i=[];for(;a.nodeName!=="DIV";)i.push(a),a=a.parentNode;if(!i.find(h=>h.nodeName==="A"))return!1;const l=k8(e.state,n.type.name),c=r.target,d=(o=c==null?void 0:c.href)!==null&&o!==void 0?o:l.href,f=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:l.target;return c&&d?(window.open(d,f),!0):!1}}})}function bq(n){return new ao({key:new sa("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:o}=e,{selection:s}=o,{empty:a}=s;if(a)return!1;let i="";r.content.forEach(c=>{i+=c.textContent});const l=P8(i,{defaultProtocol:n.defaultProtocol}).find(c=>c.isLink&&c.value===i);return!i||!l?!1:n.editor.commands.setMark(n.type,{href:l.href})}}})}const Sq=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function Ks(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&t.push(o)}),!n||n.replace(Sq,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const wq=Eo.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){c4(n);return}c4(n.scheme,n.optionalSlashes)})},onDestroy(){hq()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!Ks(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Ks(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!Ks(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",rr(this.options.HTMLAttributes,n),0]:["a",rr(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Ks(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!Ks(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[pl({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,o=P8(n).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!Ks(a,t),protocols:t,defaultProtocol:r}));o.length&&o.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(gq({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Ks(o,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(yq({type:this.type})),this.options.linkOnPaste&&n.push(bq({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),Cq=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,xq=To.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",rr(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:e})=>e.insertContent({type:this.name,attrs:n})}},addInputRules(){return[oY({find:Cq,type:this.type,getAttributes:n=>{const[,,e,t,r]=n;return{src:t,alt:e,title:r}}})]}}),kq=Sr.create({name:"preserveClass",addGlobalAttributes(){return[{types:["paragraph","heading","bulletList","orderedList","listItem","blockquote"],attributes:{class:{default:null,parseHTML:n=>n.getAttribute("class"),renderHTML:n=>({class:n.class||""})}}}]}});function yd(n){if(!n||n.indexOf("rgb")<0||n.charAt(0)=="#")return n;const e=/(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/i.exec(n),t=parseInt(e[2],10).toString(16),r=parseInt(e[3],10).toString(16),o=parseInt(e[4],10).toString(16);return("#"+((t.length==1?"0"+t:t)+(r.length==1?"0"+r:r)+(o.length==1?"0"+o:o))).toLowerCase()}const Eq=Sr.create({name:"IvyEditorColorExtension",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:n=>{var e;return yd((e=n.style.color)==null?void 0:e.replace(/['"]+/g,""))},renderHTML:n=>n.color?{style:`color: ${yd(n.color)}`}:{}},backgroundColor:{default:null,parseHTML:n=>{var e;return yd((e=n.style.backgroundColor)==null?void 0:e.replace(/['"]+/g,""))},renderHTML:n=>n.backgroundColor?{style:`background-color: ${yd(n.backgroundColor)}`}:{}}}}]},addCommands(){return{setTextBackgroundColor:n=>({chain:e})=>e().setMark("textStyle",{backgroundColor:n}).run(),unsetTextBackgroundColor:()=>({chain:n})=>n().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Tq={class:"tab-content"},Mq={key:0},Iq={key:0,class:"ivyforms-editor__control"},Oq={key:1},$8=ue({__name:"IvyEditor",props:{modelValue:{}},emits:["update:modelValue","input"],setup(n,{expose:e,emit:t}){const{getLabel:r}=rn(),o=N("visual"),s=[{label:r("visual"),index:"visual"},{label:r("html"),index:"html"}],a=n,i=t,l=O({get(){return a.modelValue},set(h){i("update:modelValue",h)}}),c=iY({extensions:[wY,CY,xY,AY,BY,FY,HY,UY,EY,TY,RY.configure({types:["heading","paragraph"]}),PY,KY,qY,GY,JY,XY,ZY,wq.configure({openOnClick:!0,defaultProtocol:"https"}),xq,kq,Eq],content:l.value,onUpdate:()=>{l.value=c.value.getHTML()}});Xe(l,()=>{c.value.getHTML()!==l.value&&c.value.commands.setContent(l.value)});const d=()=>{c.value.commands.focus()};return e({editor:c,focus:d,hasContent:()=>{var m,g;const h=(g=(m=c==null?void 0:c.value)==null?void 0:m.getJSON())==null?void 0:g.content;return!(Array.isArray(h)&&h.length===1&&!Object.hasOwn(h[0],"content"))}}),(h,m)=>{var M;const g=vp,y=wl,S=SY,w=bY,x=hY,T=dY,k=uY,C=lY;return I(),z("div",{class:H(["ivyforms-editor",{"is-focused":(M=v(c))==null?void 0:M.isFocused}])},[R(g,{modelValue:o.value,"onUpdate:modelValue":m[0]||(m[0]=A=>o.value=A),type:"tonal",priority:"secondary",size:"l",tabs:s.map(A=>({name:A.index,label:A.label}))},null,8,["modelValue","tabs"]),Q("div",Tq,[o.value==="visual"?(I(),z("div",Mq,[R(v(Q3),{class:"ivyforms-editor__content ivyforms-p-12",editor:v(c),onMousedown:d},null,8,["editor"]),v(c)?(I(),z("div",Iq,[R(y,{size:"s","icon-only":"",type:"ghost",priority:"white","icon-start-category":"text-formatting","icon-start":"text-bold",active:v(c).isActive("bold"),onClick:m[1]||(m[1]=Qe(A=>v(c).chain().focus().toggleBold().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-italic",active:v(c).isActive("italic"),onClick:m[2]||(m[2]=Qe(A=>v(c).chain().focus().toggleItalic().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-underline",active:v(c).isActive("underline"),onClick:m[3]||(m[3]=Qe(A=>v(c).chain().focus().toggleUnderline().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-strikethrough",active:v(c).isActive("strike"),onClick:m[4]||(m[4]=Qe(A=>v(c).chain().focus().toggleStrike().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"list-bulleted",active:v(c).isActive("bulletList"),onClick:m[5]||(m[5]=Qe(A=>v(c).chain().focus().toggleBulletList().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"list-numbered",active:v(c).isActive("orderedList"),onClick:m[6]||(m[6]=Qe(A=>v(c).chain().focus().toggleOrderedList().run(),["stop","prevent"]))},null,8,["active"]),R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"quotes",active:v(c).isActive("blockquote"),onClick:m[7]||(m[7]=Qe(A=>v(c).chain().focus().toggleBlockquote().run(),["stop","prevent"]))},null,8,["active"]),R(S,{editor:v(c)},null,8,["editor"]),R(w,{editor:v(c),"text-style-property":"color"},{reference:q(()=>[R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"text-color",onClick:m[8]||(m[8]=Qe(()=>{},["stop","prevent"]))})]),_:1},8,["editor"]),R(w,{editor:v(c),"text-style-property":"backgroundColor"},{reference:q(()=>[R(y,{size:"s",type:"ghost",priority:"white","icon-only":"","icon-start-category":"text-formatting","icon-start":"bg-highlight",name:"bg-highlight",onClick:m[9]||(m[9]=Qe(()=>{},["stop","prevent"]))})]),_:1},8,["editor"]),R(x,{editor:v(c)},null,8,["editor"]),R(T,{editor:v(c)},null,8,["editor"]),R(k,{editor:v(c)},null,8,["editor"]),R(C,{editor:v(c)},null,8,["editor"])])):fe("",!0)])):fe("",!0),o.value==="html"?(I(),z("div",Oq,[R(v(Q3),{class:"ivyforms-editor__content ivyforms-p-12 ivyforms-flex-grow ivyforms-editor-html",editor:v(c),onMousedown:d},null,8,["editor"])])):fe("",!0)])],2)}}}),_q={class:"ivyforms-form-builder-settings ivyforms-settings-notification ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},Aq={class:"ivyforms-settings-notification__option-bar"},Rq={class:"ivyforms-form-button-container"},Pq={key:0},$q={key:1},Dq=ue({__name:"FormBuilderManageNotification",setup(n){const e=yl(),{getLabel:t}=rn(),r=()=>{e.push({name:"FormNotifications",params:{id:i.formId}})},o=gp(),{isEditing:s}=Xf(o),a=N({formName:"",formDescription:""}),i=Wn(),l=N(!1),c=async()=>{l.value=!0;try{const d={name:o.name,sender:o.sender,receiver:o.receiver,status:o.status,subject:o.subject,message:o.message,smartLogic:o.smartLogic,formId:i.formId||o.formId};o.isEditing?await o.updateNotification(o.id,d):await o.createNotification(i.formId),await e.push({name:"FormNotifications",params:{id:i.formId}})}catch(d){console.error(t("error_saving_notification"),d)}finally{l.value=!1}};return(d,f)=>{const h=fp,m=oo,g=oa,y=$8,S=Zf,w=Qt;return I(),z("div",_q,[Q("div",Aq,[R(h,{modelValue:v(o).status,"onUpdate:modelValue":f[0]||(f[0]=x=>v(o).status=x),priority:"primary",size:"d",title:v(t)("enabled_status"),"text-position":"left",tooltip:v(t)("enable_notification")},null,8,["modelValue","title","tooltip"])]),R(S,{model:a.value},{default:q(()=>[R(g,{label:v(t)("name"),prop:"notificationName"},{default:q(()=>[R(m,{modelValue:v(o).name,"onUpdate:modelValue":f[1]||(f[1]=x=>v(o).name=x),placeholder:v(t)("example")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),R(g,{label:v(t)("send_from"),prop:"notificationSender"},{default:q(()=>[R(m,{modelValue:v(o).sender,"onUpdate:modelValue":f[2]||(f[2]=x=>v(o).sender=x),placeholder:"[email protected]",type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),R(g,{label:v(t)("send_to"),prop:"notificationReceiver"},{default:q(()=>[R(m,{modelValue:v(o).receiver,"onUpdate:modelValue":f[3]||(f[3]=x=>v(o).receiver=x),placeholder:"[email protected]",type:"email"},null,8,["modelValue"])]),_:1},8,["label"]),R(g,{label:v(t)("subject"),prop:"notificationSubject"},{default:q(()=>[R(m,{modelValue:v(o).subject,"onUpdate:modelValue":f[4]||(f[4]=x=>v(o).subject=x),placeholder:v(t)("example")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),R(g,{label:v(t)("message"),prop:"formDescription",class:"ivyforms-form-settings-description"},{default:q(()=>[R(y,{modelValue:v(o).message,"onUpdate:modelValue":f[5]||(f[5]=x=>v(o).message=x)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"]),Q("div",Rq,[R(w,{class:H(["ivyforms-button__action--cancel"]),priority:"tertiary",onClick:r},{default:q(()=>[ht(Ee(v(t)("cancel")),1)]),_:1}),R(w,{class:H(["ivyforms-button__action--save"]),priority:"primary",loading:l.value,onClick:c},{default:q(()=>[l.value?fe("",!0):(I(),z(it,{key:0},[v(s)?(I(),z("span",Pq,Ee(v(t)("update")),1)):(I(),z("span",$q,Ee(v(t)("save")),1))],64))]),_:1},8,["loading"])])])}}}),i1=sn(Dq,[["__scopeId","data-v-20d69a68"]]),Nq={class:"ivyforms-form-builder-settings ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},Lq={class:"ivyforms-form-checkbox ivyforms-flex ivyforms-flex-direction-column"},Bq={class:"ivyforms-form-button-container"},Fq=ue({__name:"FormBuilderSettings",setup(n){const{getLabel:e}=rn(),t=_s(),r=N({formName:"",formDescription:""}),o=Wn(),s=N(!1);ln(async()=>{t.params.id&&await o.loadForm(t.params.id)});const a=async()=>{s.value=!0;try{await o.saveFormSettings()}finally{s.value=!1}},i=async()=>{s.value=!0;try{await o.updateForm()}finally{s.value=!1}};return(l,c)=>{const d=oo,f=oa,h=Xo,m=Zf,g=Qt;return I(),z("div",Nq,[R(m,{model:r.value},{default:q(()=>[R(f,{label:v(e)("form_name"),prop:"formName"},{default:q(()=>[R(d,{modelValue:v(o).name,"onUpdate:modelValue":c[0]||(c[0]=y=>v(o).name=y),placeholder:"[email protected]"},null,8,["modelValue"])]),_:1},8,["label"]),R(f,{label:v(e)("form_name"),prop:"formDescription",class:"ivyforms-form-settings-description"},{default:q(()=>[R(d,{modelValue:v(o).description,"onUpdate:modelValue":c[1]||(c[1]=y=>v(o).description=y),type:"textarea",placeholder:v(e)("form_description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),Q("div",Lq,[R(h,{modelValue:v(o).showTitle,"onUpdate:modelValue":c[2]||(c[2]=y=>v(o).showTitle=y),priority:"secondary",size:"d",type:"checkmark"},{default:q(()=>[ht(Ee(v(e)("show_form_title")),1)]),_:1},8,["modelValue"]),R(h,{modelValue:v(o).showDescription,"onUpdate:modelValue":c[3]||(c[3]=y=>v(o).showDescription=y),priority:"secondary",size:"d",type:"checkmark"},{default:q(()=>[ht(Ee(v(e)("show_form_description")),1)]),_:1},8,["modelValue"])])]),_:1},8,["model"]),Q("div",Bq,[v(o).isEditingSettingGeneral?(I(),me(g,{key:0,class:H(["ivyforms-button__action--update"]),priority:"primary",loading:s.value,onClick:i},{default:q(()=>[s.value?fe("",!0):(I(),z(it,{key:0},[ht(Ee(v(e)("save")),1)],64))]),_:1},8,["loading"])):(I(),me(g,{key:1,class:H(["ivyforms-button__action--save"]),priority:"primary",loading:s.value,onClick:a},{default:q(()=>[s.value?fe("",!0):(I(),z(it,{key:0},[ht(Ee(v(e)("save")),1)],64))]),_:1},8,["loading"]))])])}}}),d4=sn(Fq,[["__scopeId","data-v-2e4fd9e9"]]),Vq={class:"ivyforms-settings-notification ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column ivyforms-p-4 ivyforms-gap-24"},zq={key:0},Hq={class:"ivyforms-settings-notification__option-bar"},Wq={class:"ivyforms-settings-notification__option-bar-left"},Uq={class:"ivyforms-settings-notification__option-bar-right"},jq={class:"ivyforms-settings-notification__table"},Kq={key:1},Gq=ue({__name:"FormBuilderNotificationTable",setup(n){const{getLabel:e}=rn(),t=Wn(),r=gp(),o=N(""),s=N(1),a=N(10),i=N(!1),l=N(!1),c=N(!1),d=O(()=>o.value.trim().length>0),f=_s(),h=yl(),m=()=>{const J=Array.isArray(f.params.id)?f.params.id[0]:f.params.id;r.resetNotification(J),l.value=!0,c.value=!1,h.replace("/settings/notification/manage/")},g=()=>{l.value=!1,c.value=!1,y(),h.push({hash:`/settings/notification/${t.formId}`})},y=async()=>{i.value=!0;try{if(f.params.id){const J=Array.isArray(f.params.id)?f.params.id[0]:f.params.id,G=parseInt(J,10);await r.fetchAllFormNotifications(G)}}catch(J){console.error(e("error_loading_notification"),J)}finally{i.value=!1}},S=O(()=>(Array.isArray(r.allNotifications)?r.allNotifications:[r.allNotifications]).map(G=>({...G,hiddenId:G.id})));ln(()=>{y()});const w=O(()=>S.value.filter(G=>{var ne;return(ne=G.name)==null?void 0:ne.toLowerCase().includes(o.value.toLowerCase())}));Xe(o,()=>{s.value=1});const x=O(()=>{const J=(s.value-1)*a.value;return w.value.slice(J,J+a.value)}),T=J=>{s.value=J},k=J=>async()=>{i.value=!0;try{await r.loadNotification(J),l.value=!0,c.value=!0}catch(G){console.error(e("error_loading_notification"),G)}finally{i.value=!1,await h.push(`/settings/notification/manage/${J}`)}},C=Hn({column:"hiddenId",order:"desc"}),M=({column:J,order:G})=>{C.column=J,C.order=G==="asc"?"asc":G==="desc"?"desc":"",y()},A=({rowData:J})=>J?st("div",{class:"ivyforms-column-actions"},[st(Qt,{iconOnly:!0,iconStart:"edit",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:k(Number(J.hiddenId))}),st(Qt,{iconOnly:!0,iconStart:"copy",size:"s",type:"ghost",priority:"tertiary",iconStartType:"outline",onClick:P(J.id)}),st(Qt,{iconOnly:!0,iconStart:"trash",size:"s",type:"ghost",priority:"danger",iconStartType:"outline",onClick:L(J.id)})]):null,V=({rowData:J})=>J?st(fp,{modelValue:J.status,size:"s","onUpdate:modelValue":async G=>{J.status=G,await r.updateNotification(J.id,J),await y()}}):null,P=J=>async()=>{try{await r.duplicateNotification(J),await y(),We({message:e("duplicated_notification"),type:"success"})}catch{We({message:e("failed_to_duplicate_notification"),type:"error"})}},L=J=>async()=>{try{await r.deleteNotifications(J),await y()}catch{We({message:e("failed_to_duplicate_notification"),type:"error"})}},K=N([{key:"status",title:e("status"),cellRenderer:V,width:100,visible:!0,class:"status-column"},{key:"name",title:e("name"),width:300,visible:!0,class:"name-column",sortable:!0},{key:"receiver",title:e("receiver"),width:250,visible:!0,class:"receiver-column",sortable:!0},{key:"subject",title:e("subject"),width:300,visible:!0,class:"subject-column",sortable:!0},{key:"hiddenId",title:e("id"),visible:!1,class:"id-column",sortable:!0},{key:"actions",title:"",cellRenderer:A,width:200,visible:!0,class:"ivyforms-cell-actions"}]);return(J,G)=>{const ne=cp;return I(),z("div",Vq,[l.value?(I(),z("div",Kq,[R(i1,{onClose:g})])):(I(),z("div",zq,[Q("div",Hq,[Q("div",Wq,[R(D1,{modelValue:o.value,"onUpdate:modelValue":G[0]||(G[0]=W=>o.value=W),placeholder:v(e)("search_notifications")},null,8,["modelValue","placeholder"])]),Q("div",Uq,[R(Qt,{"icon-start":"plus",onClick:m},{default:q(()=>[ht(Ee(v(e)("notifications")),1)]),_:1})])]),Q("div",jq,[R(M5,{columns:K.value,data:x.value,loading:i.value,sort:C,"row-key":"hiddenId",onSortChange:M},{empty:q(()=>[d.value?(I(),me(ne,{key:1,image:"filters",title:v(e)("empty_search_title"),subtitle:v(e)("empty_search_subtitle")},null,8,["title","subtitle"])):(I(),me(ne,{key:0,image:"not-found",title:v(e)("empty_state_notification_title"),subtitle:v(e)("empty_state_notification_subtitle")},{actionButton:q(()=>[R(Qt,{"icon-start":"plus",onClick:m},{default:q(()=>[ht(Ee(v(e)("notifications")),1)]),_:1})]),_:1},8,["title","subtitle"]))]),pagination:q(()=>[R($1,{"current-page":s.value,"onUpdate:currentPage":[G[1]||(G[1]=W=>s.value=W),T],total:w.value.length,"page-size":a.value,class:"ivyforms-pt-24"},null,8,["current-page","total","page-size"])]),_:1},8,["columns","data","loading","sort"])])]))])}}}),Yq=ue({__name:"IvyRadioGroup",props:{modelValue:{type:[String,Number,Boolean],default:void 0},direction:{default:"horizontal"}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,r=e,o=O({get(){return t.modelValue},set(s){r("update:modelValue",s)}});return(s,a)=>{const i=Z_;return I(),me(i,xt({modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),class:["ivyforms-radio-group",[`direction-${t.direction}`]]},{...s.$props,...s.$attrs},{onChange:a[1]||(a[1]=l=>s.$emit("change",l))}),{default:q(()=>[ve(s.$slots,"default")]),_:3},16,["modelValue","class"])}}}),qq={key:0,class:"ivyforms-radio__description"},Jq=ue({__name:"IvyRadio",props:{modelValue:{type:[String,Number,Boolean],default:""},labelPosition:{default:"right"},description:{default:""},priority:{default:"primary"},size:{default:"d"},type:{default:"withMarker"}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,r=e,o=O({get(){return t.modelValue},set(s){r("update:modelValue",s)}});return(s,a)=>{const i=X_;return s.$slots.default?(I(),me(i,xt({key:0,modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),class:["ivyforms-radio",[`size-${t.size}`,`type-${t.type}`,`priority-${t.priority}`,t.labelPosition==="left"?"label-left":"label-right",{"with-description":t.description}]]},{...s.$props,...s.$attrs,size:""},{onChange:a[1]||(a[1]=l=>s.$emit("change",l))}),{default:q(()=>[ve(s.$slots,"default"),t.description?(I(),z("span",qq,Ee(t.description),1)):fe("",!0)]),_:3},16,["modelValue","class"])):fe("",!0)}}}),Xq={class:"ivyforms-form-builder-settings-confirmation ivyforms-flex ivyforms-flex-1 ivyforms-flex-direction-column"},Zq={class:"ivyforms-form-builder-settings-confirmation__toggle-section"},Qq={key:0,class:"content-section"},eJ={class:"ivyforms-form-builder-settings-confirmation__radio-section"},tJ={key:1,class:"ivyforms-form-builder-settings-confirmation__content-section"},nJ={key:2,class:"ivyforms-form-builder-settings-confirmation__content-section"},rJ={class:"ivyforms-form-button-container"},oJ=ue({__name:"FormBuilderConfirmation",setup(n){const{getLabel:e}=rn(),t=_s(),r=yp(),o=Wn(),s=N("horizontal"),a=N("successMessage"),i=N([]),l=[{label:e("success_message"),index:"successMessage"},{label:e("redirect_to_page"),index:"redirectToPage"},{label:e("redirect_to_custom_url"),index:"redirectToCustomUrl"}],c=async()=>{switch(a.value){case"successMessage":r.page="",r.url="";break;case"redirectToPage":r.message="",r.url="";break;case"redirectToCustomUrl":r.message="",r.page="";break}const d={formId:o.formId,type:a.value,status:r.status,showForm:r.showForm,message:r.message||"",url:r.url||"",page:r.page||""};r.type=a.value,r.formId=Number(o.formId),r.id?await r.updateConfirmation(r.id,d):await r.createConfirmation()};return ln(async()=>{try{const f=await(await fetch("/wp-json/wp/v2/pages",{method:"GET",headers:{"Content-Type":"application/json","X-WP-Nonce":wpIvyApiSettings.nonce}})).json();i.value=f.map(m=>({value:m.id,label:m.title.rendered}));let h=null;t.params.id&&(h=await r.loadConfirmation(Number(t.params.id))),a.value=h?r.type:"successMessage"}catch(d){console.error(e("error_loading_data_confirmation"),d)}}),Xe(a,d=>{r.type=d}),(d,f)=>{const h=fp,m=vp,g=$8,y=Jq,S=Yq,w=z1,x=V1,T=oo,k=Qt;return I(),z("div",Xq,[Q("div",Zq,[R(h,{modelValue:v(r).status,"onUpdate:modelValue":f[0]||(f[0]=C=>v(r).status=C),priority:"primary",size:"d","text-position":"left",title:v(e)("enabled_status"),tooltip:v(e)("enable_confirmation")},null,8,["modelValue","title","tooltip"])]),R(m,{modelValue:a.value,"onUpdate:modelValue":f[1]||(f[1]=C=>a.value=C),mode:s.value,type:"tonal",priority:"tertiary",class:"ivyforms-form-builder-settings-confirmation__menu",tabs:l.map(C=>({name:C.index,label:C.label}))},null,8,["modelValue","mode","tabs"]),a.value==="successMessage"?(I(),z("div",Qq,[R(g,{modelValue:v(r).message,"onUpdate:modelValue":f[2]||(f[2]=C=>v(r).message=C)},null,8,["modelValue"]),Q("div",eJ,[Q("p",null,Ee(v(e)("after_form_submission")),1),R(S,{modelValue:v(r).showForm,"onUpdate:modelValue":f[3]||(f[3]=C=>v(r).showForm=C),priority:"secondary"},{default:q(()=>[R(y,{value:!1,priority:"secondary"},{default:q(()=>[ht(Ee(v(e)("hide_form")),1)]),_:1}),R(y,{value:!0,priority:"secondary"},{default:q(()=>[ht(Ee(v(e)("reset_form")),1)]),_:1})]),_:1},8,["modelValue"])])])):a.value==="redirectToPage"?(I(),z("div",tJ,[R(x,{modelValue:v(r).page,"onUpdate:modelValue":f[4]||(f[4]=C=>v(r).page=C),placeholder:v(e)("select_page"),clearable:!1,disabled:!1,multiple:!1},{default:q(()=>[(I(!0),z(it,null,Ht(i.value,C=>(I(),me(w,{key:C.value,value:C.value,label:C.label},{default:q(()=>[ht(Ee(C.label),1)]),_:2},1032,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])])):a.value==="redirectToCustomUrl"?(I(),z("div",nJ,[R(T,{modelValue:v(r).url,"onUpdate:modelValue":f[5]||(f[5]=C=>v(r).url=C),placeholder:v(e)("select_url")},null,8,["modelValue","placeholder"])])):fe("",!0),Q("div",rJ,[R(k,{class:H(["ivyforms-button__action--save"]),priority:"primary",onClick:c},{default:q(()=>[ht(Ee(v(e)("save")),1)]),_:1})])])}}}),xg=new URLSearchParams(window.location.search).get("page");let Pp=[];xg==="ivyforms-dashboard"&&(Pp=[{path:"/",name:"Dashboard",component:zB}]);xg==="ivyforms-forms"&&(Pp=[{path:"/",name:"AllForms",component:vV}]);xg==="ivyforms-builder"&&(Pp=[{path:"/",name:"AddForm",component:U2,children:[{path:"/manage/:id(\\d+)",name:"EditForm",component:U2}]},{path:"/settings",name:"Settings",component:aW,children:[{path:"general",name:"FormSettings",component:d4},{path:"general/manage/:id(\\d+)",name:"FormSetting",component:d4},{path:"notification/:id(\\d+)",name:"FormNotifications",component:Gq},{path:"notification/manage",name:"NewNotifications",component:i1},{path:"notification/manage/:id(\\d+)?",name:"EditNotifications",component:i1},{path:"confirmation/manage/:id(\\d+)",name:"FormConfirmation",component:oJ}]}]);const aJ=mI({history:UM(),routes:Pp}),$p=iM(fM),sJ=lM();$p.use(sJ);$p.use(aJ);const iJ=uM();iJ.initialize();$p.config.globalProperties.$labels=rn();$p.mount("#ivyforms-app"); |
| 152 |
|