Files

48 lines
458 KiB
JavaScript
Raw Permalink Normal View History

2026-02-13 22:24:27 +08:00
"use strict";var gu=Object.defineProperty;var bu=(t,e,n)=>e in t?gu(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>bu(t,typeof e!="symbol"?e+"":e,n);const mr=require("siyuan");var Mi=typeof document<"u"?document.currentScript:null;function De(){}const Ql=t=>t;function Ee(t,e){for(const n in e)t[n]=e[n];return t}function $l(t){return t()}function Xo(){return Object.create(null)}function Ot(t){t.forEach($l)}function Dr(t){return typeof t=="function"}function Ue(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function vu(t){return Object.keys(t).length===0}function Ge(t,e,n,r){if(t){const i=ec(t,e,n,r);return t[0](i)}}function ec(t,e,n,r){return t[1]&&r?Ee(n.ctx.slice(),t[1](r(e))):n.ctx}function Je(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],o=Math.max(e.dirty.length,i.length);for(let f=0;f<o;f+=1)s[f]=e.dirty[f]|i[f];return s}return e.dirty|i}return e.dirty}function Qe(t,e,n,r,i,s){if(i){const o=ec(e,n,r,s);t.p(o,i)}}function $e(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let r=0;r<n;r++)e[r]=-1;return e}return-1}function hn(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function rt(t,e){const n={};e=new Set(e);for(const r in t)!e.has(r)&&r[0]!=="$"&&(n[r]=t[r]);return n}function Br(t){const e={};for(const n in t)e[n]=!0;return e}function Zs(t){return t&&Dr(t.destroy)?t.destroy:De}const _u=["",!0,1,"true","contenteditable"],tc=typeof window<"u";let nc=tc?()=>window.performance.now():()=>Date.now(),_o=tc?t=>requestAnimationFrame(t):De;const Hn=new Set;function rc(t){Hn.forEach(e=>{e.c(t)||(Hn.delete(e),e.f())}),Hn.size!==0&&_o(rc)}function ic(t){let e;return Hn.size===0&&_o(rc),{promise:new Promise(n=>{Hn.add(e={c:t,f:n})}),abort(){Hn.delete(e)}}}function le(t,e){t.appendChild(e)}function sc(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function yu(t){const e=ce("style");return e.textContent="/* empty */",wu(sc(t),e),e.sheet}function wu(t,e){return le(t.head||t,e),e.sheet}function se(t,e,n){t.insertBefore(e,n||null)}function ie(t){t.parentNode&&t.parentNode.removeChild(t)}function ku(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function ce(t){return document.createElement(t)}function ft(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Pt(t){return document.createTextNode(t)}function Ae(){return Pt(" ")}function Et(){return Pt("")}function ze(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function W(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const Eu=["width","height"];function je(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const r in e)e[r]==null?t.removeAttribute(r):r==="style"?t.style.cssText=e[r]:r==="__value"?t.value=t[r]=e[r]:n[r]&&n[r].set&&Eu.indexOf(r)===-1?t[r]=e[r]:W(t,r,e[r])}function Cu(t,e){Object.keys(e).forEach(n=>{Au(t,n,e[n])})}function Au(t,e,n){const r=e.toLowerCase();r in t?t[r]=typeof t[r]=="boolean"&&n===""?!0:n:e in t?t[e]=typeof t[e]=="boolean"&&n===""?!0:n:W(t,e,n)}function Gn(t){return/-/.test(t)?Cu:je}function Su(t){return Array.from(t.childNodes)}function Jt(t,e){e=""+e,t.data!==e&&(t.data=e)}function Du(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Bu(t,e,n){~_u.indexOf(n)?Du(t,e):Jt(t,e)}function ae(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,"")}function Jn(t,e,n){t.classList.toggle(e,!0)}function oc(t,e,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(t,{detail:e,bubbles:n,cancelable:r})}const ci=new Map;let fi=0;function Fu(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Tu(t,e){const n={stylesheet:yu(e),rules:{}};return ci.set(t,n),n}function ac(t,e,n,r,i,s,o,f=0){const l=16.666/r;let a=`{
`;for(let p=0;p<=1;p+=l){const g=e+(n-e)*s(p);a+=p*100+`%{${o(g,1-g)}}
`}const c=a+`100% {${o(n,1-n)}}
}`,u=`__svelte_${Fu(c)}_${f}`,h=sc(t),{stylesheet:d,rules:b}=ci.get(h)||Tu(h,t);b[u]||(b[u]=!0,d.insertRule(`@keyframes ${u} ${c}`,d.cssRules.length));const x=t.style.animation||"";return t.style.animation=`${x?`${x}, `:""}${u} ${r}ms linear ${i}ms 1 both`,fi+=1,u}function Xs(t,e){const n=(t.style.animation||"").split(", "),r=n.filter(e?s=>s.indexOf(e)<0:s=>s.indexOf("__svelte")===-1),i=n.length-r.length;i&&(t.style.animation=r.join(", "),fi-=i,fi||Ru())}function Ru(){_o(()=>{fi||(ci.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&ie(e)}),ci.clear())})}let vr;function gr(t){vr=t}function tr(){if(!vr)throw new Error("Function called outside component initialization");return vr}function Fr(t){tr().$$.on_mount.push(t)}function Ou(t){tr().$$.after_update.push(t)}function yo(t){tr().$$.on_destroy.push(t)}function pn(){const t=tr();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const s=oc(e,n,{cancelable:r});return i.slice().forEach(o=>{o.call(t,s)}),!s.defaultPrevented}return!0}}function Pu(t,e){return tr().$$.context.set(t,e),e}function Yn(t){return tr().$$.context.get(t)}const Mn=[],dt=[];let Kn=[];const Gs=[],lc=Promise.resolve();let Js=!1;function cc(){Js||(Js=!0,lc.then(fc))}function _n(){return cc(),lc}function Qn(t){Kn.push(t)}function Iu(t){Gs.push(t)}const ji=new Set;let Pn=0;function fc(){if(Pn!==0)return;const t=vr;do{try{for(;Pn<Mn.length;){const e=Mn[Pn];Pn++,gr(e),Lu(e.$$)}}catch(e){throw Mn.length=0,Pn=0,e}for(gr(null),Mn.length=0,Pn=0;dt.length;)dt.pop()();for(let e=0;e<Kn.length;e+=1){const n=Kn[e];ji.has(n)||(ji.add(n),n())}Kn.length=0}while(Mn.length);for(;Gs.length;)Gs.pop()();Js=!1,ji.clear(),gr(t)}function Lu(t){if(t.fragment!==null){t.update(),Ot(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(Qn)}}function qu(t){const e=[],n=[];Kn.forEach(r=>t.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Kn=e}let lr;function uc(){return lr||(lr=Promise.resolve(),lr.then(()=>{lr=null})),lr}function ui(t,e,n){t.dispatchEvent(oc(`${e?"intro":"outro"}${n}`))}const ei=new Set;let cn;function Ne(){cn={r:0,c:[],p:cn}}function We(){cn.r||Ot(cn.c),cn=cn.p}function K(t,e){t&&t.i&&(ei.delete(t),t.i(e))}function X(t,e,n,r){if(t&&t.o){if(ei.has(t))return;ei.add(t),cn.c.push(()=>{ei.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}const dc={duration:0};function Nu(t,e,n){const r={direction:"in"};let i=e(t,n,r),s=!1,o,f,l=0;function a(){o&&Xs(t,o)}function c(){const{delay:h=0,duration:d=300,easing:b=Ql,tick:x=De,css:p}=i||dc;p&&(o=ac(t,0,1,d,h,b,p,l++)),x(0,1);const g=nc()+h,m=g+d;f&&f.abort(),s=!0,Qn(()=>ui(t,!0,"start")),f=ic(v=>{if(s){if(v>=m)return x(1,0),ui(t,!0,"end"),a(),s=!1;if(v>=g){const _=b((v-g)/d);x(_,1-_)}}return s})}let u=!1;return{start(){u||(u=!0,Xs(t),Dr(i)?(i=i(r),uc().then(c)):c())},invalidate(){u=!1},end(){s&&(a(),s=!1)}}}function Wu(t,e,n){const r={direction:"out"};let i=e(t,n,r),s=!0,o;const f=cn;f.r+=1;let l;function a(){const{delay:c=0,duration:u=300,easing:h=Ql,tick:d=De,css:b}=i||dc;b&&(o=ac(t,1,0,u,c,h,b));const x=nc()+c,p=x+u;Qn(()=>ui(t,!1,"start")),"inert"in t&&(l=t.inert,t.inert=!0),ic(g=>{if(s){if(g>=p)return d(0,1),ui(t,!1,"end"),--f.r||Ot(f.c),!1;if(g>=x){const m=h((g-x)/u);d(1-m,m)}}return s})}return Dr(i)?uc().then(()=>{i=i(r),a()}):a(),{end(c){c&&"inert"in t&&(t.inert=l),c&&i.tick&&i.tick(1,0),s&&(o&&Xs(t,o),s=!1)}}}function di(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function Mu(t,e){X(t,1,1,()=>{e.delete(t.key)})}function ju(t,e,n,r,i,s,o,f,l,a,c,u){let h=t.length,d=s.length,b=h;const x={};for(;b--;)x[t[b].key]=b;const p=[],g=new Map,m=new Map,v=[];for(b=d;b--;){const w=u(i,s,b),k=n(w);let S=o.get(k);S?v.push(()=>S.p(w,e)):(S=a(k,w),S.c()),g.set(k,p[b]=S),k in x&&m.set(k,Math.abs(b-x[k]))}const _=new Set,C=new Set;function y(w){K(w,1),w.m(f,c),o.set(w.key,w),c=w.first,d--}for(;h&&d;){const w=p[d-1],k=t[h-1],S=w.key,E=k.key;w===k?(c=w.first,h--,d--):g.has(E)?!o.has(S)||_.has(S)?y(w):C.has(E)?h--:m.get(S)>m.get(E)?(C.add(S),y(w)):(_.add(E),h--):(l(k,o),h--)}for(;h--;){const w=t[h];g.has(w.key)
`),x=h.length;for(x>0&&h.includes("unstyle")&&(h=[...new Set(["unstyle",...h])].reverse());x-- >0;)d=l(o.styles[h[x]],d,b);return d},c=(u,h,d)=>{o.styles[u]=f({name:u,codes:h}),(o.keys[d]||(o.keys[d]=[])).push(u),Reflect.defineProperty(o,u,{configurable:!0,enumerable:!0,set(x){o.alias(u,x)},get(){let x=p=>a(p,x.stack);return Reflect.setPrototypeOf(x,o),x.stack=this.stack?this.stack.concat(u):[u],x}})};return c("reset",[0,0],"modifier"),c("bold",[1,22],"modifier"),c("dim",[2,22],"modifier"),c("italic",[3,23],"modifier"),c("underline",[4,24],"modifier"),c("inverse",[7,27],"modifier"),c("hidden",[8,28],"modifier"),c("strikethrough",[9,29],"modifier"),c("black",[30,39],"color"),c("red",[31,39],"color"),c("green",[32,39],"color"),c("yellow",[33,39],"color"),c("blue",[34,39],"color"),c("magenta",[35,39],"color"),c("cyan",[36,39],"color"),c("white",[37,39],"color"),c("gray",[90,39],"color"),c("grey",[90,39],"color"),c("bgBlack",[40,49],"bg"),c("bgRed",[41,49],"bg"),c("bgGreen",[42,49],"bg"),c("bgYellow",[43,49],"bg"),c("bgBlue",[44,49],"bg"),c("bgMagenta",[45,49],"bg"),c("bgCyan",[46,49],"bg"),c("bgWhite",[47,49],"bg"),c("blackBright",[90,39],"bright"),c("redBright",[91,39],"bright"),c("greenBright",[92,39],"bright"),c("yellowBright",[93,39],"bright"),c("blueBright",[94,39],"bright"),c("magentaBright",[95,39],"bright"),c("cyanBright",[96,39],"bright"),c("whiteBright",[97,39],"bright"),c("bgBlackBright",[100,49],"bgBright"),c("bgRedBright",[101,49],"bgBright"),c("bgGreenBright",[102,49],"bgBright"),c("bgYellowBright",[103,49],"bgBright"),c("bgBlueBright",[104,49],"bgBright"),c("bgMagentaBright",[105,49],"bgBright"),c("bgCyanBright",[106,49],"bgBright"),c("bgWhiteBright",[107,49],"bgBright"),o.ansiRegex=r,o.hasColor=o.hasAnsi=u=>(o.ansiRegex.lastIndex=0,typeof u=="string"&&u!==""&&o.ansiRegex.test(u)),o.alias=(u,h)=>{let d=typeof h=="string"?o[h]:h;if(typeof d!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");d.stack||(Reflect.defineProperty(d,"name",{value:u}),o.styles[u]=d,d.stack=[u]),Reflect.defineProperty(o,u,{configurable:!0,enumerable:!0,set(b){o.alias(u,b)},get(){let b=x=>a(x,b.stack);return Reflect.setPrototypeOf(b,o),b.stack=this.stack?this.stack.concat(d.stack):d.stack,b}})},o.theme=u=>{if(!n(u))throw new TypeError("Expected theme to be an object");for(let h of Object.keys(u))o.alias(h,u[h]);return o},o.alias("unstyle",u=>typeof u=="string"&&u!==""?(o.ansiRegex.lastIndex=0,u.replace(o.ansiRegex,"")):""),o.alias("noop",u=>u),o.none=o.clear=o.noop,o.stripColor=o.unstyle,o.symbols=n1(),o.define=c,o};e.exports=s(),e.exports.create=s}});t1(r1());var i1=(t,e)=>Object.assign({},t,e),s1=t=>typeof t=="string"&&t.constructor===String,Qs=t=>typeof t=="number",o1=t=>Object.prototype.toString.call(t)==="[object Function]"||Object.prototype.toString.call(t)==="[object AsyncFunction]";function $s(t){return t==null?!1:toString.call(t)==="[object Object]"}var a1=Object.create,vc=Object.defineProperty,l1=Object.getOwnPropertyDescriptor,_c=Object.getOwnPropertyNames,c1=Object.getPrototypeOf,f1=Object.prototype.hasOwnProperty,u1=(t,e)=>function(){return e||(0,t[_c(t)[0]])((e={exports:{}}).exports,e),e.exports},d1=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of _c(e))!f1.call(t,i)&&i!==n&&vc(t,i,{get:()=>e[i],enumerable:!(r=l1(e,i))||r.enumerable});return t},h1=(t,e,n)=>(n=t!=null?a1(c1(t)):{},d1(vc(n,"default",{value:t,enumerable:!0}),t)),p1=u1({"../node_modules/.pnpm/hash-sum@2.0.0/node_modules/hash-sum/hash-sum.js"(t,e){function n(l,a){for(;l.length<a;)l="0"+l;return l}function r(l,a){var c,u,h;if(a.length===0)return l;for(c=0,h=a.length;c<h;c++)u=a.charCodeAt(c),l=(l<<5)-l+u,l|=0;return l<0?l*-2:l}function i(l,a,c){return Object.keys(a).sort().reduce(u,l);function u(h,d){return s(h,a[d],d,c)}}function s(l,a,c,u){var h=r(r(r(l,c),o(a)),typeof a);if(a===null)return r(h,"null");if(a===void 0)return r(h,"undefined");if(typeof a=="object"||typeof a=="function"){if(u.indexOf(a)!==-1)return r(h,"[Circular]"+c);u.push(a);var d=i(h,a,u);if(!("valueOf"in a)||type
transform: ${l} scale(${1-a*h});
opacity: ${f-c*h}
`}}const $n=Math.min,kn=Math.max,pi=Math.round,Mr=Math.floor,Ut=t=>({x:t,y:t}),U1={left:"right",right:"left",bottom:"top",top:"bottom"},H1={start:"end",end:"start"};function eo(t,e,n){return kn(t,$n(e,n))}function Tr(t,e){return typeof t=="function"?t(e):t}function Sn(t){return t.split("-")[0]}function Rr(t){return t.split("-")[1]}function kc(t){return t==="x"?"y":"x"}function Co(t){return t==="y"?"height":"width"}function fn(t){return["top","bottom"].includes(Sn(t))?"y":"x"}function Ao(t){return kc(fn(t))}function Y1(t,e,n){n===void 0&&(n=!1);const r=Rr(t),i=Ao(t),s=Co(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=xi(o)),[o,xi(o)]}function K1(t){const e=xi(t);return[to(t),e,to(e)]}function to(t){return t.replace(/start|end/g,e=>H1[e])}function V1(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:o;default:return[]}}function Z1(t,e,n,r){const i=Rr(t);let s=V1(Sn(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(to)))),s}function xi(t){return t.replace(/left|right|bottom|top/g,e=>U1[e])}function X1(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ec(t){return typeof t!="number"?X1(t):{top:t,right:t,bottom:t,left:t}}function mi(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function o0(t,e,n){let{reference:r,floating:i}=t;const s=fn(e),o=Ao(e),f=Co(o),l=Sn(e),a=s==="y",c=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,h=r[f]/2-i[f]/2;let d;switch(l){case"top":d={x:c,y:r.y-i.height};break;case"bottom":d={x:c,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:u};break;case"left":d={x:r.x-i.width,y:u};break;default:d={x:r.x,y:r.y}}switch(Rr(e)){case"start":d[o]-=h*(n&&a?-1:1);break;case"end":d[o]+=h*(n&&a?-1:1);break}return d}const G1=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,f=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:u}=o0(a,r,l),h=r,d={},b=0;for(let x=0;x<f.length;x++){const{name:p,fn:g}=f[x],{x:m,y:v,data:_,reset:C}=await g({x:c,y:u,initialPlacement:r,placement:h,strategy:i,middlewareData:d,rects:a,platform:o,elements:{reference:t,floating:e}});c=m??c,u=v??u,d={...d,[p]:{...d[p],..._}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(a=C.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:c,y:u}=o0(a,h,l)),x=-1)}return{x:c,y:u,placement:h,strategy:i,middlewareData:d}};async function Cc(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:f,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:c="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=Tr(e,t),b=Ec(d),p=f[h?u==="floating"?"reference":"floating":u],g=mi(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:a,rootBoundary:c,strategy:l})),m=u==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),_=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},C=mi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:m,offsetParent:v,strategy:l}):m);return{top:(g.top-C.top+b.top)/_.y,bottom:(C.bottom-g.bottom+b.bottom)/_.y,left:(g.left-C.left+b.left)/_.x,right:(C.right-g.right+b.right)/_.x}}const J1=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:f,middlewareData:l}=e,{element:a,padding:c=0}=Tr(t,e)||{};if(a==null)return{};const u=Ec(c),h={x:n,y:r},d=Ao(i),b=Co(d),x=await o.getDimensions(a),p=d==="y",g=p?"top":"left",m=p?"bottom"
`+t[0]+`
`}],l={};for(let a=0;a<f.length;a+=1)l=Ee(l,f[a]);return{c(){e=ce("option"),n=Pt(t[0]),je(e,l)},m(a,c){se(a,e,c),le(e,n),s||(o=ze(e,"click",t[4]),s=!0)},p(a,c){c&1&&Bu(n,a[0],l.contenteditable),je(e,l=Ct(f,[c&12&&r!==(r=`${a[3]} ${a[2]}`)&&{class:r},c&32&&a[5],c&2&&a[1],c&1&&i!==(i=`
`+a[0]+`
`)&&{__value:i}]))},d(a){a&&ie(e),s=!1,o()}}}function Dd(t){let e;const n=t[11].default,r=Ge(n,t,t[10],null),i=r||Sd(t);return{c(){i&&i.c()},m(s,o){i&&i.m(s,o),e=!0},p(s,[o]){r?r.p&&(!e||o&1024)&&Qe(r,n,s,s[10],e?Je(n,s[10],o,null):$e(s[10]),null):i&&i.p&&(!e||o&47)&&i.p(s,e?o:-1)},i(s){e||(K(i,s),e=!0)},o(s){X(i,s),e=!1},d(s){i&&i.d(s)}}}function Bd(t,e,n){let r,i;const s=["label","cls","disabled","isActive","attrs","fitInputWidth"];let o=rt(e,s),{$$slots:f={},$$scope:l}=e,{label:a=""}=e,{cls:c=void 0}=e,{disabled:u=!1}=e,{isActive:h=!1}=e,{attrs:d={}}=e,{fitInputWidth:b=!1}=e;const x=pn(),p=()=>{u||x("click")},g=At("select--option");return t.$$set=m=>{e=Ee(Ee({},e),hn(m)),n(5,o=rt(e,s)),"label"in m&&n(0,a=m.label),"cls"in m&&n(6,c=m.cls),"disabled"in m&&n(7,u=m.disabled),"isActive"in m&&n(8,h=m.isActive),"attrs"in m&&n(1,d=m.attrs),"fitInputWidth"in m&&n(9,b=m.fitInputWidth),"$$scope"in m&&n(10,l=m.$$scope)},t.$$.update=()=>{t.$$.dirty&704&&n(3,r=Oe(`${g}`,`${g}__dark`,`${g}__hover`,{[`${g}--base__disabled__dark`]:u,[`${g}__fit`]:b},c)),t.$$.dirty&256&&n(2,i=h?`${g}__active`:"")},[a,d,i,r,p,o,c,u,h,b,l,f]}class Fd extends st{constructor(e){super(),it(this,e,Bd,Dd,Ue,{label:0,cls:6,disabled:7,isActive:8,attrs:1,fitInputWidth:9})}}const Td=t=>({}),b0=t=>({}),Rd=t=>({}),v0=t=>({}),Od=t=>({data:t[2]&2048,label:t[2]&2048,isActive:t[2]&2048}),_0=t=>({data:t[73],onSelect:t[26],label:t[28](t[73]),isActive:t[29](t[73])});function y0(t){let e,n,r;return n=new nr({props:{icon:t[1],cls:t[35],width:"auto",height:"auto"}}),{c(){e=ce("i"),we(n.$$.fragment)},m(i,s){se(i,e,s),_e(n,e,null),r=!0},p(i,s){const o={};s[0]&2&&(o.icon=i[1]),n.$set(o)},i(i){r||(K(n.$$.fragment,i),r=!0)},o(i){X(n.$$.fragment,i),r=!1},d(i){i&&ie(e),ye(n)}}}function Pd(t){let e,n,r=t[1]&&y0(t);return{c(){r&&r.c(),e=Et()},m(i,s){r&&r.m(i,s),se(i,e,s),n=!0},p(i,s){i[1]?r?(r.p(i,s),s[0]&2&&K(r,1)):(r=y0(i),r.c(),K(r,1),r.m(e.parentNode,e)):r&&(Ne(),X(r,1,1,()=>{r=null}),We())},i(i){n||(K(r),n=!0)},o(i){X(r),n=!1},d(i){i&&ie(e),r&&r.d(i)}}}function w0(t){let e,n,r;return n=new nr({props:{icon:t[2],cls:t[36],width:"auto",height:"auto"}}),{c(){e=ce("i"),we(n.$$.fragment)},m(i,s){se(i,e,s),_e(n,e,null),r=!0},p(i,s){const o={};s[0]&4&&(o.icon=i[2]),n.$set(o)},i(i){r||(K(n.$$.fragment,i),r=!0)},o(i){X(n.$$.fragment,i),r=!1},d(i){i&&ie(e),ye(n)}}}function Id(t){let e,n,r=t[2]&&w0(t);return{c(){r&&r.c(),e=Et()},m(i,s){r&&r.m(i,s),se(i,e,s),n=!0},p(i,s){i[2]?r?(r.p(i,s),s[0]&4&&K(r,1)):(r=w0(i),r.c(),K(r,1),r.m(e.parentNode,e)):r&&(Ne(),X(r,1,1,()=>{r=null}),We())},i(i){n||(K(r),n=!0)},o(i){X(r),n=!1},d(i){i&&ie(e),r&&r.d(i)}}}function Ld(t){let e,n,r;return n=new nr({props:{icon:t[19],cls:t[37],width:"auto",height:"auto"}}),{c(){e=ce("i"),we(n.$$.fragment)},m(i,s){se(i,e,s),_e(n,e,null),r=!0},p(i,s){const o={};s[0]&524288&&(o.icon=i[19]),n.$set(o)},i(i){r||(K(n.$$.fragment,i),r=!0)},o(i){X(n.$$.fragment,i),r=!1},d(i){i&&ie(e),ye(n)}}}function qd(t){let e,n,r,i,s;return n=new nr({props:{icon:"i-carbon-close-outline",cls:t[37],width:"auto",height:"auto"}}),{c(){e=ce("button"),we(n.$$.fragment),W(e,"data-k-select-clear",""),W(e,"class",t[34])},m(o,f){se(o,e,f),_e(n,e,null),r=!0,i||(s=ze(e,"click",t[31]),i=!0)},p:De,i(o){r||(K(n.$$.fragment,o),r=!0)},o(o){X(n.$$.fragment,o),r=!1},d(o){o&&ie(e),ye(n),i=!1,s()}}}function Nd(t){let e,n,r,i,s,o,f,l,a,c,u,h;const d=t[51].prefix,b=Ge(d,t,t[59],v0),x=b||Pd(t),p=t[51].suffix,g=Ge(p,t,t[59],b0),m=g||Id(t),v=[qd,Ld],_=[];function C(k,S){return k[9]&&k[17]?0:1}l=C(t),a=_[l]=v[l](t);let y=[t[5],{class:t[25]},{slot:"triggerEl"},{role:"button"},{tabindex:"-1"}],w={};for(let k=0;k<y.length;k+=1)w=Ee(w,y[k]);return{c(){e=ce("div"),x&&x.c(),n=Ae(),r=ce("input"),o=Ae(),m&&m.c(),f=Ae(),a.c(),W(r,"class",t[24]),r.readOnly=i=!t[10],r.value=s=t[28](t[0]),r.disabled=t[11],W(r,"placeholder",t[4]),je(e,w)},m(k,S){se(k,e,S),x&&x.m(e,null),le(e,n),le(e,r),le(e,o),m&&m.m(e,null),le(e,f),_[l].m(e,null),t[57](e),c=!0,u||(h=[ze(r,"input",t[33]),ze(e,"mouseenter",t[55]),ze(e,"mouseleave",t[56])],u=!0)},p(k,S){b?b.p&&(!c||S[1]&268435456)&&Qe(b,d,k,k[59],c?Je
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&hp[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},R0=Symbol("internals");function cr(t){return t&&String(t).trim().toLowerCase()}function ni(t){return t===!1||t==null?t:U.isArray(t)?t.map(ni):String(t)}function xp(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const mp=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ki(t,e,n,r,i){if(U.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!U.isString(e)){if(U.isString(r))return e.indexOf(r)!==-1;if(U.isRegExp(r))return r.test(e)}}function gp(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function bp(t,e){const n=U.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let pt=class{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function i(o,f,l){const a=cr(f);if(!a)throw new Error("header name must be a non-empty string");const c=U.findKey(r,a);(!c||r[c]===void 0||l===!0||l===void 0&&r[c]!==!1)&&(r[c||f]=ni(o))}const s=(o,f)=>U.forEach(o,(l,a)=>i(l,a,f));if(U.isPlainObject(t)||t instanceof this.constructor)s(t,e);else if(U.isString(t)&&(t=t.trim())&&!mp(t))s(pp(t),e);else if(U.isHeaders(t))for(const[o,f]of t.entries())i(f,o,n);else t!=null&&i(e,t,n);return this}get(t,e){if(t=cr(t),t){const n=U.findKey(this,t);if(n){const r=this[n];if(!e)return r;if(e===!0)return xp(r);if(U.isFunction(e))return e.call(this,r,n);if(U.isRegExp(e))return e.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=cr(t),t){const n=U.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||Ki(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let r=!1;function i(s){if(s=cr(s),s){const o=U.findKey(n,s);o&&(!e||Ki(n,n[o],o,e))&&(delete n[o],r=!0)}}return U.isArray(t)?t.forEach(i):i(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const i=e[n];(!t||Ki(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const e=this,n={};return U.forEach(this,(r,i)=>{const s=U.findKey(n,i);if(s){e[s]=ni(r),delete e[i];return}const o=t?gp(i):String(i).trim();o!==i&&delete e[i],e[o]=ni(r),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return U.forEach(this,(n,r)=>{n!=null&&n!==!1&&(e[r]=t&&U.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(r=>n.set(r)),n}static accessor(t){const e=(this[R0]=this[R0]={accessors:{}}).accessors,n=this.prototype;function r(i){const s=cr(i);e[s]||(bp(n,i),e[s]=!0)}return U.isArray(t)?t.forEach(r):r(t),this}};pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(pt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});U.freezeMethods(pt);function Vi(t,e){const n=this||Ir,r=e||n,i=pt.from(r.headers);let s=r.data;return U.forEach(t,function(o){s=o.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function Xc(t){return!!(t&&t.__CANCEL__)}function sr(t,e,n){ue.call(this,t??"canceled",ue.ERR_CANCELED,e,n),this.name="CanceledError"}U.inherits(sr,ue,{__CANCEL__:!0});function Gc(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new ue("Request failed with status code "+n.status,[ue.ERR_BAD_REQUEST,ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function vp(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function _p(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(f){const l=Date.now(),a=r[s];o||(o=l),n[i]=f,r[i]=l;let c=s,u=0;for(;c!==i;)u+=n[c++],c=c%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),l-o<e)return;const h=a&&l-a;return h?Math.round(u*1e3/h):void 0}}function yp(t,e){let n=0,r=1e3/e,i,s;const o=(f,l=Date.now())=>{n=l,i=null,s&&(clearTimeout(s),s=null),t.apply(null,f)};return[(...f)=>{const l=Date.now(),a=l-n;a>=r?o(f,l):(i=f,s||(s=setTimeout(()=>{s=null,o(i)},r-a)))},()=>i&&o(i)]}const gi=(t,e,n=3)=>{let r=0;const i=_p(50,250);return yp(s=>{const o=s.loaded,f=s.lengthComputable?s.total:void 0,l=o-r,a=i(l),c=o<=f;r=o;const u={loaded:o,total:f,progress:f?o/f:void 0,bytes:l,rate:a||void 0,estimated:a&&f&&c?(f-o)/a:void 0,event:s,lengthComputable:f!=null,[e?"download":"upload"]:!0};t(u)},n)},O0=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},P0=t=>(...e)=>U.asap(()=>t(...e)),wp=ht.hasStandardBrowserEnv?function(){const t=ht.navigator&&/(msie|trident)/i.test(ht.navigator.userAgent),e=document.createElement("a");let n;function r(i){let s=i;return t&&(e.setAttribute("href",s),s=e.href),e.setAttribute("href",s),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(i){const s=U.isString(i)?r(i):i;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}(),kp=ht.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];U.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),U.isString(r)&&o.push("path="+r),U.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ep(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Cp(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Jc(t,e){return t&&!Ep(e)?Cp(t,e):e}const I0=t=>t instanceof pt?{...t}:t;function Bn(t,e){e=e||{};const n={};function r(a,c,u){return U.isPlainObject(a)&&U.isPlainObject(c)?U.merge.call({caseless:u},a,c):U.isPlainObject(c)?U.merge({},c):U.isArray(c)?c.slice():c}function i(a,c,u){if(U.isUndefined(c)){if(!U.isUndefined(a))return r(void 0,a,u)}else return r(a,c,u)}function s(a,c){if(!U.isUndefined(c))return r(void 0,c)}function o(a,c){if(U.isUndefined(c)){if(!U.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function f(a,c,u){if(u in e)return r(a,c);if(u in t)return r(void 0,a)}
`+s.map(N0).join(`
`):" "+N0(s[0]):"as no adapter specified";throw new ue("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ao};function Zi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new sr(null,t)}function W0(t){return Zi(t),t.headers=pt.from(t.headers),t.data=Vi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),tf.getAdapter(t.adapter||Ir.adapter)(t).then(function(e){return Zi(t),e.data=Vi.call(t,t.transformResponse,e),e.headers=pt.from(e.headers),e},function(e){return Xc(e)||(Zi(t),e&&e.response&&(e.response.data=Vi.call(t,t.transformResponse,e.response),e.response.headers=pt.from(e.response.headers))),Promise.reject(e)})}const nf="1.7.7",Io={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Io[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const M0={};Io.transitional=function(t,e,n){function r(i,s){return"[Axios v"+nf+"] Transitional option '"+i+"'"+s+(n?". "+n:"")}return(i,s,o)=>{if(t===!1)throw new ue(r(s," has been removed"+(e?" in "+e:"")),ue.ERR_DEPRECATED);return e&&!M0[s]&&(M0[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(i,s,o):!0}};function Np(t,e,n){if(typeof t!="object")throw new ue("options must be an object",ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const f=t[s],l=f===void 0||o(f,s,t);if(l!==!0)throw new ue("option "+s+" must be "+l,ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ue("Unknown option "+s,ue.ERR_BAD_OPTION)}}const lo={assertOptions:Np,validators:Io},tn=lo.validators;let En=class{constructor(t){this.defaults=t,this.interceptors={request:new T0,response:new T0}}async request(t,e){try{return await this._request(t,e)}catch(n){if(n instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+i):n.stack=i}catch{}}throw n}}_request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Bn(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:i}=e;n!==void 0&&lo.assertOptions(n,{silentJSONParsing:tn.transitional(tn.boolean),forcedJSONParsing:tn.transitional(tn.boolean),clarifyTimeoutError:tn.transitional(tn.boolean)},!1),r!=null&&(U.isFunction(r)?e.paramsSerializer={serialize:r}:lo.assertOptions(r,{encode:tn.function,serialize:tn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let s=i&&U.merge(i.common,i[e.method]);i&&U.forEach(["delete","get","head","post","put","patch","common"],d=>{delete i[d]}),e.headers=pt.concat(s,i);const o=[];let f=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(f=f&&d.synchronous,o.unshift(d.fulfilled,d.rejected))});const l=[];this.interceptors.response.forEach(function(d){l.push(d.fulfilled,d.rejected)});let a,c=0,u;if(!f){const d=[W0.bind(this),void 0];for(d.unshift.apply(d,o),d.push.apply(d,l),u=d.length,a=Promise.resolve(e);c<u;)a=a.then(d[c++],d[c++]);return a}u=o.length;let h=e;for(c=0;c<u;){const d=o[c++],b=o[c++];try{h=d(h)}catch(x){b.call(this,x);break}}try{a=W0.call(this,h)}catch(d){return Promise.reject(d)}for(c=0,u=l.length;c<u;)a=a.then(l[c++],l[c++]);return a}getUri(t){t=Bn(this.defaults,t);const e=Jc(t.baseURL,t.url);return Kc(e,t.params,t.paramsSerializer)}};U.forEach(["delete","get","head","options"],function(t){En.prototype[t]=function(e,n){return this.request(Bn(n||{},{method:t,url:e,data:(n||{}).data}))}});U.forEach(["post","put","patch"],function(t){function e(n){return function(r,i,s){return this.request(Bn(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}En.prototype[t]=e(),En.prototype[t+"Form"]=e(!0)});let Wp=class rf{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(f=>{r.subscribe(f),s=f}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(i,s,o){r.reason||(r.reason=new sr(i,s,o),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new rf(function(n){e=n}),cancel:e}}};function Mp(t){return function(e){return t.apply(null,e)}}function jp(t){return U.isObject(t)&&t.isAxiosError===!0}const co={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenti
`,r=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(n):URL.createObjectURL(new Blob([n],{type:"text/javascript"}));t({workerScripts:{inflate:[r],deflate:[r]}})}const Vm="Writer iterator completed too soon",Zm="Content-Type",Xm=64*1024,Mf="writable";class jo{constructor(){this.size=0}init(){this.initialized=!0}}class jf extends jo{get readable(){const e=this,{chunkSize:n=Xm}=e,r=new ReadableStream({start(){this.chunkOffset=0},async pull(i){const{offset:s=0,size:o,diskNumberStart:f}=r,{chunkOffset:l}=this,a=o===Xe?n:Math.min(n,o-l),c=await nt(e,s+l,a,f);i.enqueue(c),l+n>o||o===Xe&&!c.length&&a?i.close():this.chunkOffset+=n}});return r}}class zo extends jf{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,n){const r=this,i=e+n;let o=await(e||i<r.size?r.blob.slice(e,i):r.blob).arrayBuffer();return o.byteLength>n&&(o=o.slice(e,i)),new Uint8Array(o)}}class zf extends jo{constructor(e){super();const n=this,r=new TransformStream,i=[];e&&i.push([Zm,e]),Object.defineProperty(n,Mf,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:i}).blob()}getData(){return this.blob}}class Gm extends zf{constructor(e){super(e),Object.assign(this,{encoding:e,utf8:!e||e.toLowerCase()=="utf-8"})}async getData(){const{encoding:e,utf8:n}=this,r=await super.getData();if(r.text&&n)return r.text();{const i=new FileReader;return new Promise((s,o)=>{Object.assign(i,{onload:({target:f})=>s(f.result),onerror:()=>o(i.error)}),i.readAsText(r,e)})}}}class Jm extends jf{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:n}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(n.map(async(r,i)=>{await r.init(),i!=n.length-1&&(e.lastDiskOffset+=r.size),e.size+=r.size})),super.init()}async readUint8Array(e,n,r=0){const i=this,{readers:s}=this;let o,f=r;f==-1&&(f=s.length-1);let l=e;for(;l>=s[f].size;)l-=s[f].size,f++;const a=s[f],c=a.size;if(l+n<=c)o=await nt(a,l,n);else{const u=c-l;o=new Uint8Array(n),o.set(await nt(a,l,u)),o.set(await i.readUint8Array(e+u,n-u,r),u)}return i.lastDiskNumber=Math.max(f,i.lastDiskNumber),o}}class Xa extends jo{constructor(e,n=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let i,s,o;const f=new WritableStream({async write(c){const{availableSize:u}=r;if(o)c.length>=u?(await l(c.slice(0,u)),await a(),r.diskOffset+=i.size,r.diskNumber++,o=null,await this.write(c.slice(u))):await l(c);else{const{value:h,done:d}=await e.next();if(d&&!h)throw new Error(Vm);i=h,i.size=0,i.maxSize&&(r.maxSize=i.maxSize),r.availableSize=r.maxSize,await Ei(i),s=h.writable,o=s.getWriter(),await this.write(c)}},async close(){await o.ready,await a()}});Object.defineProperty(r,Mf,{get(){return f}});async function l(c){const u=c.length;u&&(await o.ready,await o.write(c),i.size+=u,r.size+=u,r.availableSize-=u)}async function a(){s.size=i.size,await o.close()}}}async function Ei(t,e){if(t.init&&!t.initialized)await t.init(e);else return Promise.resolve()}function Qm(t){return Array.isArray(t)&&(t=new Jm(t)),t instanceof ReadableStream&&(t={readable:t}),t}function $m(t){t.writable===Xe&&typeof t.next==Lr&&(t=new Xa(t)),t instanceof WritableStream&&(t={writable:t});const{writable:e}=t;return e.size===Xe&&(e.size=0),t instanceof Xa||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}function nt(t,e,n,r){return t.readUint8Array(e,n,r)}const Uf="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥ƒáíóúñѪº¿¬½¼¡«»αßΓπΣσµτΦΘΩδφε±÷°·ⁿ² ".split(""),e8=Uf.length==256;function t8(t){if(e8){let e="";for(let n=0;n<t.length;n++)e+=Uf[t[n]];return e}else return new TextDecoder().decode(t)}f
`],{type:"text/javascript"}));t({workerScripts:{inflate:[e],deflate:[e]}})}P8(Li);class I8{constructor(e){Me(this,"type","file");Me(this,"file");Me(this,"fullpath");Me(this,"name");Me(this,"basename");Me(this,"extension");this.file=e;let n=this.name=e.name;this.fullpath=n;let{basename:r,extension:i}=Ni(n);this.basename=r,this.extension=i}readText(){let{file:e}=this;return e.text?e.text():new Promise((n,r)=>{let i=new FileReader;i.addEventListener("load",()=>n(i.result)),i.addEventListener("error",r),i.readAsText(this.file)})}async read(){let{file:e}=this;return e.arrayBuffer?e.arrayBuffer():new Promise((n,r)=>{let i=new FileReader;i.addEventListener("load",()=>n(i.result)),i.addEventListener("error",r),i.readAsArrayBuffer(this.file)})}async readZip(e){return e(new $f(new zo(this.file)))}toString(){return this.file.toString()}}function Ni(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n=t,r="";e>=0&&(n=t.substring(e+1),r=t.substring(0,e));let[i,s]=L8(n);return{parent:r,name:n,basename:i,extension:s}}function L8(t){let e=t.lastIndexOf("."),n=t,r="";return e>0&&(n=t.substring(0,e),r=t.substring(e+1).toLowerCase()),[n,r]}class q8{constructor(e,n){Me(this,"idsToFileInfo",{});Me(this,"pathsToAttachmentInfo",{});Me(this,"attachmentPath");Me(this,"singleLineBreaks");this.attachmentPath=e,this.singleLineBreaks=n}getPathForFile(e){let{idsToFileInfo:n}=this;const r=e.path.split("/");return e.parentIds.map(i=>{var s,o;return((s=n[i])==null?void 0:s.title)??((o=r.find(f=>f.includes(i)))==null?void 0:o.replace(` ${i}`,""))}).filter(i=>i).map(i=>i.replace(/[\. ]+$/,"")).join("/")+"/"}}class N8{constructor(e,n){Me(this,"type","file");Me(this,"entry");Me(this,"fullpath");Me(this,"parent");Me(this,"name");Me(this,"basename");Me(this,"extension");this.entry=n,this.fullpath=e.fullpath+"/"+n.filename;let{parent:r,name:i,basename:s,extension:o}=Ni(n.filename);this.parent=r,this.name=i,this.basename=s,this.extension=o}async readText(){return this.entry.getData(new Gm)}async read(){return(await this.entry.getData(new zf)).arrayBuffer()}get filepath(){return this.entry.filename}get size(){return this.entry.uncompressedSize}get ctime(){return this.entry.creationDate}get mtime(){return this.entry.lastModDate}async readZip(e){return e(new $f(new zo(new Blob([await this.read()]))))}}async function W8(t,e){await t.readZip(async n=>{let i=(await n.getEntries()).filter(s=>!s.directory&&!!s.getData).map(s=>new N8(t,s));return e(n,i)})}const M8=t=>t.replace(/-/g,"").replace(/[ -]?[a-f0-9]{32}(\.|$)/,"$1"),An=t=>{var e;return(e=t.replace(/-/g,"").match(/([a-f0-9]{32})(\?|\.|$)/))==null?void 0:e[1]},nl=t=>{const{parent:e}=Ni(t);return e.split("/").map(n=>An(n)).filter(n=>n)};function j8(t){return t.replace(/^(\.\.\/)+/,"")}function z8(t){const e=/#[a-z0-9\-]+/gi;if(!e.test(t))return t;const n=t.split(`
`);for(let r=0;r<n.length;r++){const i=n[r].match(e);if(!i)continue;let s=n[r];for(let o of i)new RegExp(`\\[\\[[^\\]]*${o}[^\\]]*\\]\\]|\\[[^\\]]*${o}[^\\]]*\\]\\([^\\)]*\\)|\\[[^\\]]*\\]\\([^\\)]*${o}[^\\)]*\\)|\\\\${o}`).test(s)||(s=s.replace(o,"\\"+o));n[r]=s}return t=n.join(`
`),t}function ru(t){t.replaceWith(...Array.from(t.childNodes))}function U8(t){const e=new Date(t);return isNaN(e.getTime())?0:e.getTime()}function H8(t){const e=new Date(t);return e.getHours()===0&&e.getMinutes()===0&&e.getSeconds()===0&&e.getMilliseconds()===0}var de=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Y8(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function K8(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var iu={exports:{}};function V8(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var hs={exports:{}};const Z8={},X8=Object.freeze(Object.defineProperty({__proto__:null,default:Z8},Symbol.toStringTag,{value:"Module"})),G8=K8(X8);var rl;function ge(){return rl||(rl=1,function(t,e){(function(n,r){t.exports=r()})(de,function(){var n=n||function(r,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof de<"u"&&de.crypto&&(s=de.crypto),!s&&typeof V8=="function")try{s=G8}catch{}var o=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},f=Object.create||function(){function m(){}return function(v){var _;return m.prototype=v,_=new m,m.prototype=null,_}}(),l={},a=l.lib={},c=a.Base=function(){return{extend:function(m){var v=f(this);return m&&v.mixIn(m),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var m=this.extend();return m.init.apply(m,arguments),m},init:function(){},mixIn:function(m){for(var v in m)m.hasOwnProperty(v)&&(this[v]=m[v]);m.hasOwnProperty("toString")&&(this.toString=m.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),u=a.WordArray=c.extend({init:function(m,v){m=this.words=m||[],v!=i?this.sigBytes=v:this.sigBytes=m.length*4},toString:function(m){return(m||d).stringify(this)},concat:function(m){var v=this.words,_=m.words,C=this.sigBytes,y=m.sigBytes;if(this.clamp(),C%4)for(var w=0;w<y;w++){var k=_[w>>>2]>>>24-w%4*8&255;v[C+w>>>2]|=k<<24-(C+w)%4*8}else for(var S=0;S<y;S+=4)v[C+S>>>2]=_[S>>>2];return this.sigBytes+=y,this},clamp:function(){var m=this.words,v=this.sigBytes;m[v>>>2]&=4294967295<<32-v%4*8,m.length=r.ceil(v/4)},clone:function(){var m=c.clone.call(this);return m.words=this.words.slice(0),m},random:function(m){for(var v=[],_=0;_<m;_+=4)v.push(o());return new u.init(v,m)}}),h=l.enc={},d=h.Hex={stringify:function(m){for(var v=m.words,_=m.sigBytes,C=[],y=0;y<_;y++){var w=v[y>>>2]>>>24-y%4*8&255;C.push((w>>>4).toString(16)),C.push((w&15).toString(16))}return C.join("")},parse:function(m){for(var v=m.length,_=[],C=0;C<v;C+=2)_[C>>>3]|=parseInt(m.substr(C,2),16)<<24-C%8*4;return new u.init(_,v/2)}},b=h.Latin1={stringify:function(m){for(var v=m.words,_=m.sigBytes,C=[],y=0;y<_;y++){var w=v[y>>>2]>>>24-y%4*8&255;C.push(String.fromCharCode(w))}return C.join("")},parse:function(m){for(var v=m.length,_=[],C=0;C<v;C++)_[C>>>2]|=(m.charCodeAt(C)&255)<<24-C%4*8;return new u.init(_,v)}},x=h.Utf8={stringify:function(m){try{return decodeURIComponent(escape(b.stringify(m)))}catch{throw new Error("Malformed U
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/return function(r){var i=n,s=i.lib,o=s.WordArray,f=s.Hasher,l=i.algo,a=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),h=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=o.create([0,1518500249,1859775393,2400959708,2840853838]),b=o.create([1352829926,1548603684,1836072691,2053994217,0]),x=l.RIPEMD160=f.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(y,w){for(var k=0;k<16;k++){var S=w+k,E=y[S];y[S]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}var A=this._hash.words,B=d.words,D=b.words,F=a.words,R=c.words,T=u.words,N=h.words,P,Y,z,I,O,q,j,te,ne,he;q=P=A[0],j=Y=A[1],te=z=A[2],ne=I=A[3],he=O=A[4];for(var re,k=0;k<80;k+=1)re=P+y[w+F[k]]|0,k<16?re+=p(Y,z,I)+B[0]:k<32?re+=g(Y,z,I)+B[1]:k<48?re+=m(Y,z,I)+B[2]:k<64?re+=v(Y,z,I)+B[3]:re+=_(Y,z,I)+B[4],re=re|0,re=C(re,T[k]),re=re+O|0,P=O,O=I,I=C(z,10),z=Y,Y=re,re=q+y[w+R[k]]|0,k<16?re+=_(j,te,ne)+D[0]:k<32?re+=v(j,te,ne)+D[1]:k<48?re+=m(j,te,ne)+D[2]:k<64?re+=g(j,te,ne)+D[3]:re+=p(j,te,ne)+D[4],re=re|0,re=C(re,N[k]),re=re+he|0,q=he,he=ne,ne=C(te,10),te=j,j=re;re=A[1]+z+ne|0,A[1]=A[2]+I+he|0,A[2]=A[3]+O+q|0,A[3]=A[4]+P+j|0,A[4]=A[0]+Y+te|0,A[0]=re},_doFinalize:function(){var y=this._data,w=y.words,k=this._nDataBytes*8,S=y.sigBytes*8;w[S>>>5]|=128<<24-S%32,w[(S+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,y.sigBytes=(w.length+1)*4,this._process();for(var E=this._hash,A=E.words,B=0;B<5;B++){var D=A[B];A[B]=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360}return E},clone:function(){var y=f.clone.call(this);return y._hash=this._hash.clone(),y}});function p(y,w,k){return y^w^k}function g(y,w,k){return y&w|~y&k}function m(y,w,k){return(y|~w)^k}function v(y,w,k){return y&k|w&~k}function _(y,w,k){return y^(w|~k)}function C(y,w){return y<<w|y>>>32-w}i.RIPEMD160=f._createHelper(x),i.HmacRIPEMD160=f._createHmacHelper(x)}(),n.RIPEMD160})}(As)),As.exports}var Ss={exports:{}},gl;function Ho(){return gl||(gl=1,function(t,e){(function(n,r){t.exports=r(ge())})(de,function(n){(function(){var r=n,i=r.lib,s=i.Base,o=r.enc,f=o.Utf8,l=r.algo;l.HMAC=s.extend({init:function(a,c){a=this._hasher=new a.init,typeof c=="string"&&(c=f.parse(c));var u=a.blockSize,h=u*4;c.sigBytes>h&&(c=a.finalize(c)),c.clamp();for(var d=this._oKey=c.clone(),b=this._iKey=c.clone(),x=d.words,p=b.words,g=0;g<u;g++)x[g]^=1549556828,p[g]^=909522486;d.sigBytes=b.sigBytes=h,this.reset()},reset:function(){var a=this._hasher;a.reset(),a.update(this._iKey)},update:function(a){return this._hasher.update(a),this},finalize:function(a){var c=this._hasher,u=c.finalize(a);c.reset();var h=c.finalize(this._oKey.clone().concat(u));return h}})})()})}(Ss)),Ss.exports}var Ds={exports:{}},bl;function ig(){return bl||(bl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Uo(),Ho())})(de,function(n){return function(){var r=n,i=r.lib,s=i.Base,o=i.WordArray,f=r.algo,l=f.SHA256,a=f.HMAC,c=f.PBKDF2=s.extend({cfg:s.extend({keySize:128/32,hasher:l,iterations:25e4}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,h){for(var d=this.cfg,b=a.create(d.hasher,u),x=o.create(),p=o.create([1]),g=x.words,m=p.words,v=d.keySize,_=d.iterations;g.length<v;){var C=b.update(h).finalize(p);b.reset();for(var y=C.words,w=y.length,k=C,S=1;S<_;S++){k=b.finalize(k),b.reset();for(var E=k.words,A=0;A<w;A++)y[A]^=E[A]}x.concat(C),m[0]++}re
* Counter block mode compatible with Dr Brian Gladman fileenc.c
* derived from CryptoJS.mode.CTR
* Jan Hruby jhruby.web@gmail.com
*/return n.mode.CTRGladman=function(){var r=n.lib.BlockCipherMode.extend();function i(f){if((f>>24&255)===255){var l=f>>16&255,a=f>>8&255,c=f&255;l===255?(l=0,a===255?(a=0,c===255?c=0:++c):++a):++l,f=0,f+=l<<16,f+=a<<8,f+=c}else f+=1<<24;return f}function s(f){return(f[0]=i(f[0]))===0&&(f[1]=i(f[1])),f}var o=r.Encryptor=r.extend({processBlock:function(f,l){var a=this._cipher,c=a.blockSize,u=this._iv,h=this._counter;u&&(h=this._counter=u.slice(0),this._iv=void 0),s(h);var d=h.slice(0);a.encryptBlock(d,0);for(var b=0;b<c;b++)f[l+b]^=d[b]}});return r.Decryptor=o,r}(),n.mode.CTRGladman})}(Os)),Os.exports}var Ps={exports:{}},El;function lg(){return El||(El=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.mode.OFB=function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(s,o){var f=this._cipher,l=f.blockSize,a=this._iv,c=this._keystream;a&&(c=this._keystream=a.slice(0),this._iv=void 0),f.encryptBlock(c,0);for(var u=0;u<l;u++)s[o+u]^=c[u]}});return r.Decryptor=i,r}(),n.mode.OFB})}(Ps)),Ps.exports}var Is={exports:{}},Cl;function cg(){return Cl||(Cl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.mode.ECB=function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,s){this._cipher.encryptBlock(i,s)}}),r.Decryptor=r.extend({processBlock:function(i,s){this._cipher.decryptBlock(i,s)}}),r}(),n.mode.ECB})}(Is)),Is.exports}var Ls={exports:{}},Al;function fg(){return Al||(Al=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.pad.AnsiX923={pad:function(r,i){var s=r.sigBytes,o=i*4,f=o-s%o,l=s+f-1;r.clamp(),r.words[l>>>2]|=f<<24-l%4*8,r.sigBytes+=f},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})}(Ls)),Ls.exports}var qs={exports:{}},Sl;function ug(){return Sl||(Sl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.pad.Iso10126={pad:function(r,i){var s=i*4,o=s-r.sigBytes%s;r.concat(n.lib.WordArray.random(o-1)).concat(n.lib.WordArray.create([o<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})}(qs)),qs.exports}var Ns={exports:{}},Dl;function dg(){return Dl||(Dl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})}(Ns)),Ns.exports}var Ws={exports:{}},Bl;function hg(){return Bl||(Bl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.pad.ZeroPadding={pad:function(r,i){var s=i*4;r.clamp(),r.sigBytes+=s-(r.sigBytes%s||s)},unpad:function(r){for(var i=r.words,s=r.sigBytes-1,s=r.sigBytes-1;s>=0;s--)if(i[s>>>2]>>>24-s%4*8&255){r.sigBytes=s+1;break}}},n.pad.ZeroPadding})}(Ws)),Ws.exports}var Ms={exports:{}},Fl;function pg(){return Fl||(Fl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(Ms)),Ms.exports}var js={exports:{}},Tl;function xg(){return Tl||(Tl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Ke())})(de,function(n){return function(r){var i=n,s=i.lib,o=s.CipherParams,f=i.enc,l=f.Hex,a=i.format;a.Hex={stringify:function(c){return c.ciphertext.toString(l)},parse:function(c){var u=l.parse(c);return o.create({ciphertext:u})}}}(),n.format.Hex})}(js)),js.exports}var zs={exports:{}},Rl;function mg(){return Rl||(Rl=1,function(t,e){(function(n,r,i){t.exports=r(ge(),Tn(),Rn(),xn(),Ke())})(de,function(n){return function(){var r=n,i=r.lib,s=i.BlockCipher,o=r.algo,f=[],l=[],a=[],c=[],u=[],h=[],d=[],b=[],x=[],p=[];(function(){for(var v=[],_=0;_<256;_++)_<128?v[_]=_<<1:v[_]=_<<1^283;for(var C=0,y=0,_=0;_<256;_++){var w=y^y<<1^y<<2^y<<3^y<<4;w=w>>>8^w&255^99,f[C]=w,l[w]=C;var k=v[C],S=v[k],E=v[S],A=v[w]*257^w*16843008;a[C]=A<<24|A>>>8,c[C]=A<<16|A>>>16,u[C]=A<<8|A>>>24,h[C]=A;var A=E*16843009^S*65537^k*257^C*16843008;d[w]=A<<24|
`)),u=z8(u),u=Mg(u);const h=(d=r.querySelector("p[class*=page-description]"))==null?void 0:d.textContent;return h&&(u=h+`
`+u),u=u.replace(/\[:av:(.*?):\]/g,(b,x)=>`<div data-type="NodeAttributeView" data-av-id="${x}" data-av-type="table"></div>`),{content:u.trim(),attrs:l,attributeViews:o}}const Ml={checkbox:["checkbox"],date:["created_time","last_edited_time","date"],list:["file","multi_select","relation"],number:["number","auto_increment_id"],text:["email","person","phone_number","text","url","status","select","formula","rollup","last_edited_by","created_by"]};function Wg(t){var o,f,l;const e=(o=t.className.match(/property-row-(.*)/))==null?void 0:o[1];if(!e)throw new Error("property type not found for: "+t);const n=lu(t.cells[0].textContent??""),r=t.cells[1];let i=Object.keys(Ml).find(a=>Ml[a].includes(e));if(!i)throw new Error("type not found for: "+r);let s="";switch(i){case"checkbox":s=String(r.innerHTML.includes("checkbox-on"));break;case"number":const a=Number(r.textContent);if(isNaN(a))return;s=String(a);break;case"date":du(r),s=((f=r.querySelector("time"))==null?void 0:f.textContent)||"";break;case"list":const c=r.children,u=[];for(let h=0;h<c.length;h++){const d=(l=c.item(h))==null?void 0:l.textContent;d&&u.push(d)}if(s=u.join(`
`),s.length===0)return;break;case"text":if(s=r.textContent??"",s.length===0)return;break}return{title:n,content:s}}function cu(t){return/(\.png|\.jpg|\.webp|\.gif|\.bmp|\.jpeg)\!?\S*$/i.test(t)}function fu(t){return j8(decodeURI(t.getAttribute("href")??""))}function uu(t,e){for(const n of Object.keys(t.pathsToAttachmentInfo))if(n.includes(e))return t.pathsToAttachmentInfo[n]}function jl(t,e){const n=[];for(const r of Pe(e,"a")){const i=fu(r),s=An(i),o=uu(t,i);if(s&&i.endsWith(".html"))n.push({type:"relation",a:r,id:s});else if(o){let f="attachment";cu(i)&&(f="image"),n.push({type:f,a:r,path:o.path})}}return n}function Mg(t){const e=/\[\[[^\]]*(\\\\)\|[^\]]*\]\]/,n=t.match(new RegExp(e,"g"));return n==null||n.forEach(r=>{t=t.replace(r,r.replace(/\\\\\|/g,"\\|"))}),t}function jg(t){for(const n of Pe(t,".katex-html"))n.remove();const e=Pe(t,"math");for(const n of e){const r=n.querySelector("annotation");r&&(r.textContent=r.textContent.trim(),!/\\begin\{.*?\}[\s\S]+\\end\{.*?\}/gmi.test(r.textContent)&&(r.textContent=`\\begin{align}
${r.textContent}
\\end{align}`,n.replaceWith(r)))}}function zg(t){var n;return((n=t.match(/^[^\.\?\!\n]*[\.\?\!]?/))==null?void 0:n[0])??""}function Ug(t){for(let e of Pe(t,"figure.callout")){const n=zt("blockquote"),r=Sr();r.textContent="[!important]",n.replaceChildren(...e.childNodes),n.insertBefore(r,n.firstChild),e.replaceWith(n)}}function Hg(t){var e,n;for(let r of Pe(t,"a.bookmark.source")){const i=r.getAttribute("href"),s=(e=r.querySelector("div.bookmark-title"))==null?void 0:e.textContent,o=zg(((n=r.querySelector("div.bookmark-description"))==null?void 0:n.textContent)??"");let f=zt("blockquote");const l=["[!bookmark]🔖",s,o];let a=[];for(const h of l){const d=zt("div");d.textContent=h.replace(/\n/g,"<br />"),a.push(d)}const c=zt("div"),u=zt("a");u.setAttribute("href",i),u.textContent=i,c.appendChild(u),a.push(c);for(const h of a)f.appendChild(h);r.replaceWith(f)}}function Yg(t){var e;for(const n of Pe(t,"span[class=user]"))n.innerText=n.textContent??"";for(const n of Pe(t,"td div[class*=checkbox]")){const r=Sr();r.textContent=n.classList.contains("checkbox-on")?"X":"",n.replaceWith(r)}for(const n of Pe(t,"table span[class*=selected-value]"))((e=n.parentElement)==null?void 0:e.lastElementChild)!==n&&(n.textContent=n.textContent+", ");for(const n of Pe(t,"a[href]"))if(!/^(https?:\/\/|www\.)/.test(n.href)){const r=Sr();r.textContent=n.textContent??"",n.replaceWith(r)}}function zl(t,e){for(const n of Pe(t,e)){if(!n.parentElement||n.parentElement.tagName===e.toUpperCase())continue;let r=n.querySelector(e);for(;r;)ru(r),r=n.querySelector(e)}}function Ul(t,e){const n=t.match(new RegExp(`<${e}>(.|
)*</${e}>`));if(n)for(let r of n.filter(i=>i.includes("<br />")))t=t.replace(r,r.split("<br />").join(`</${r}><br /><${r}>`))}function Kg(t){var n;const e=Pe(t,"a[href*=\\#]");for(const r of e)(n=r.getAttribute("href"))!=null&&n.startsWith("#")&&r.setAttribute("href","#"+r.textContent)}function Vg(t){for(const e of Pe(t,"link"))e.innerText=e.textContent??""}function du(t){var e;for(const n of Pe(t,"time"))n.textContent=((e=n.textContent)==null?void 0:e.replace(/@/g,""))??""}const Hl={"1.875em":"h1","1.5em":"h2","1.25em":"h3"};function Zg(t){const e=Pe(t,"summary");for(const n of e){const r=n.getAttribute("style");if(r){for(const i of Object.keys(Hl))if(r.includes(i)){n.replaceWith(zt(Hl[i],{text:n.textContent??""}));break}}}}function Xg(t){const e=Pe(t,"summary");for(const n of e){if(n.getAttribute("style"))continue;const i=n.closest("li");i&&i.replaceWith(...i.childNodes),n.replaceWith(zt("li",{text:n.textContent??""}))}}function Yl(t,e){let n=Pe(t,e);for(const r of n)ru(r)}function Kl(t,e){for(const n of Pe(t,e)){const r=[],i=[];let s=n;for(;s.tagName===e.toUpperCase();){r.push(s);for(let f=0;f<s.children.length;f++)i.push(s.children[f]);if(!s.nextElementSibling||s.getAttribute("class")!==s.nextElementSibling.getAttribute("class"))break;s=s.nextElementSibling}const o=zt(e);for(const f of i)o.appendChild(f);r[0].replaceWith(o),r.slice(1).forEach(f=>f.remove())}}function Gg(t){for(let e of Pe(t,".checkbox.checkbox-on"))e.replaceWith("[x] ");for(let e of Pe(t,".checkbox.checkbox-off"))e.replaceWith("[ ] ")}function Jg(t){const e=Pe(t,"a");if(e.length===0)return t;for(const n of e){const r=Sr();r.textContent=n.getAttribute("href")??"",n.replaceWith(r)}}function Vl(t,e){for(let n of e){let r=Sr();switch(n.type){case"relation":const i=t.idsToFileInfo[n.id];if(i&&i.blockID!=="")r.textContent=`((${i.blockID} '${i.title}'))`;else{console.warn("missing relation data for id: "+n.id);const{basename:f}=Ni(decodeURI(n.a.getAttribute("href")??""));r.textContent=`[[${M8(f)}]]`}break;case"attachment":let s=t.pathsToAttachmentInfo[n.path];if(!s){console.warn("missing attachment data for: "+n.path);continue}r.textContent=`[${s.nameWithExtension}](${s.pathInSiYuanMd})`;break;case"image":r=zt("img");let o=t.pathsToAttachmentInfo[n.path];if(!o){console.warn("missing image file for: "+n.path);continue}r.setAttribute("src",o.pathInSiYuanMd),r.setAttribute("alt",o.nameWithExtension);break}n.a.replaceWith(r)}}function Qg(t){for(const e of Pe(t,"script[src]"))e.remove();for(const e of Pe(t,'link[rel="stylesheet"]'))e.remove();for(const e of Pe(t,"style"))e.remove()}function Wn(t,e,n){return{id:Dt(),name:t,type:e,icon:"",numberFormat:"",template:"",options:n}}function $g(t,e){var l;let n=[];if(!!!e.querySelector('table[class="collection-content"]'))return[];const i=!!e.querySelector('div[class="collection-content"]');i?n=Array.from(e.querySelectorAll('div[class="collection-content"]')).map(a=>{var c;return{title:((c=a.querySelector(".collection-title"))==null?void 0:c.innerText.trim())||"",tableNode:a.querySelector('table[class="collection-content"]')}}):n=[{title:((l=e.querySelector(".page-title"))==null?void 0:l.innerText.trim())||"",tableNode:e.querySelector('table[class="collection-content"]')}];let s=n.map(a=>{let c=a.tableNode,u=Array.from(c.querySelectorAll("thead > tr > th")).map(d=>({type:d.querySelector("span > svg").classList[0],name:d.innerText.trim(),selectValues:new Set,values:[]})),h=0;for(const d of u.keys())if(u[d].type==="typesTitle"){h=d;break}return Array.from(c.querySelectorAll("tbody > tr")).forEach(d=>{var g;const b=An(d.querySelectorAll("td")[h].querySelector("a").href),x=((g=t.idsToFileInfo[b])==null?void 0:g.blockID)||Dt(),p=!!(t.idsToFileInfo[b]&&t.idsToFileInfo[b].blockID!=="");Array.from(d.querySelectorAll("td")).forEach((m,v)=>{let _={rowid:x,hasRelBlock:p};if(u[v].type==="typesTitle")u[v].values.push({..._,value:m.querySelector("a").innerText.trim()});else if(u[v].type==="typesDate"){const C=m.innerText.trim().replace("@","").split("").map(y=>y.trim()).filter(Boolean);u[v].values.push({..._,value:C})}else if(["t
<symbol id="iconCYImportLine" viewBox="0 0 36 36">
<path d="M28 4H14.87L8 10.86V15h2v-1.39h7.61V6H28v24H8a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2Zm-12 8h-6v-.32L15.7 6h.3Z" class="clr-i-outline clr-i-outline-path-1"/>
<path d="M11.94 26.28a1 1 0 1 0 1.41 1.41L19 22l-5.68-5.68a1 1 0 0 0-1.41 1.41L15.2 21H3a1 1 0 1 0 0 2h12.23Z" class="clr-i-outline clr-i-outline-path-2"/>
<path fill="none" d="M0 0h36v36H0z"/>
</symbol>
`),this.addTopBar({icon:"iconCYImportLine",title:this.i18n.addTopBarIcon,position:"right",callback:()=>{this.showDialog()}}),console.log(this.i18n.helloPlugin)}async onunload(){console.log(this.i18n.byePlugin)}async updateCards(e){return e.cards.sort((n,r)=>n.blockID<r.blockID?-1:n.blockID>r.blockID?1:0),e}showDialog(){k3({title:this.i18n.dialogTitle,width:"720px",constructor:e=>new w3({target:e,props:{pluginInstance:this}})})}}module.exports=E3;