vdc-editor 0.1.282 → 0.1.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BulkSpellChecker-DgIhy1y0.mjs +5 -0
- package/lib/BulkSpellChecker-DgIhy1y0.mjs.map +1 -0
- package/lib/{index-ARe29obu.mjs → index-C51bIxfa.mjs} +22 -7
- package/lib/{index-ARe29obu.mjs.map → index-C51bIxfa.mjs.map} +1 -1
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +1 -1
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
- package/lib/BulkSpellChecker-B8B_X7p2.mjs +0 -5
- package/lib/BulkSpellChecker-B8B_X7p2.mjs.map +0 -1
package/lib/vdc-editor.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as i, b as o, a as t, D as r, c as E, E as d, S as p, g as S, d as u, S as C, j as H, i as L, k as n, n as l, u as T, e as _, h as f, f as g } from "./index-
|
|
1
|
+
import { A as i, b as o, a as t, D as r, c as E, E as d, S as p, g as S, d as u, S as C, j as H, i as L, k as n, n as l, u as T, e as _, h as f, f as g } from "./index-C51bIxfa.mjs";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
export {
|
|
4
4
|
i as ArticleCompareEditor,
|
package/lib/vdc-editor.umd.js
CHANGED
|
@@ -132,7 +132,7 @@ __p += '`),xt&&(xe+=`' +
|
|
|
132
132
|
function print() { __p += __j.call(arguments, '') }
|
|
133
133
|
`:`;
|
|
134
134
|
`)+xe+`return __p
|
|
135
|
-
}`;var gt=U9(function(){return Mt(P,Ue+"return "+xe).apply(n,U)});if(gt.source=xe,K2(gt))throw gt;return gt}function aue(d){return It(d).toLowerCase()}function lue(d){return It(d).toUpperCase()}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Br(h)))return d;var S=So(d),B=So(h),P=QS(S,B),U=NS(S,B)+1;return Vs(S,P,U).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Br(h)))return d;var S=So(d),B=NS(S,So(h))+1;return Vs(S,0,B).join("")}function due(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Br(h)))return d;var S=So(d),B=QS(S,So(h));return Vs(S,B).join("")}function fue(d,h){var w=M,S=$;if(nn(h)){var B="separator"in h?h.separator:B;w="length"in h?ft(h.length):w,S="omission"in h?Br(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var U=So(d);P=U.length}if(w>=P)return d;var K=w-tu(S);if(K<1)return S;var Z=U?Vs(U,0,K).join(""):d.slice(0,K);if(B===n)return Z+S;if(U&&(K+=Z.length-K),G2(B)){if(d.slice(K).search(B)){var ve,ye=Z;for(B.global||(B=u2(B.source,It(yS.exec(B))+"g")),B.lastIndex=0;ve=B.exec(ye);)var xe=ve.index;Z=Z.slice(0,xe===n?K:xe)}}else if(d.indexOf(Br(B),K)!=K){var Re=Z.lastIndexOf(B);Re>-1&&(Z=Z.slice(0,Re))}return Z+S}function pue(d){return d=It(d),d&&An.test(d)?d.replace(fn,Ure):d}var hue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Vre(d)?qre(d):Are(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Mr(d,n,h)}catch(w){return K2(w)?w:new it(w)}}),mue=Oi(function(d,h){return Nr(h,function(w){w=ei(w),Ai(d,w,j2(d[w],d))}),d});function gue(d){var h=d==null?0:d.length,w=Ye();return d=h?Qt(d,function(S){if(typeof S[1]!="function")throw new eo(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var B=-1;++B<h;){var P=d[B];if(Mr(P[0],this,S))return Mr(P[1],this,S)}})}function bue(d){return Uoe(no(d,p))}function Z2(d){return function(){return d}}function vue(d,h){return d==null||d!==d?h:d}var yue=q_(),wue=q_(!0);function br(d){return d}function Q2(d){return x_(typeof d=="function"?d:no(d,p))}function xue(d){return E_(no(d,p))}function Cue(d,h){return k_(d,no(h,p))}var Eue=bt(function(d,h){return function(w){return rd(w,d,h)}}),kue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=Mn(h),B=lm(h,S);w==null&&!(nn(h)&&(B.length||!S.length))&&(w=h,h=d,d=this,B=lm(h,Mn(h)));var P=!(nn(w)&&"chain"in w)||!!w.chain,U=Ii(d);return Nr(B,function(K){var Z=h[K];d[K]=Z,U&&(d.prototype[K]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),xe=ye.__actions__=hr(this.__actions__);return xe.push({func:Z,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return Z.apply(d,Bs([this.value()],arguments))})}),d}function Sue(){return Dn._===this&&(Dn._=Zre),this}function ey(){}function _ue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var Tue=B2(Qt),Aue=B2(KS),Mue=B2(n2);function W9(d){return F2(d)?r2(ei(d)):iie(d)}function Oue(d){return function(h){return d==null?n:Ha(d,h)}}var Bue=G_(),Iue=G_(!0);function ty(){return[]}function ny(){return!1}function Rue(){return{}}function Lue(){return""}function Due(){return!0}function Pue(d,h){if(d=ft(d),d<1||d>H)return[];var w=X,S=Gn(d,X);h=Ye(h),d-=X;for(var B=s2(S,h);++w<d;)h(w);return B}function Vue(d){return lt(d)?Qt(d,ei):Ir(d)?[d]:hr(u9(It(d)))}function Fue(d){var h=++Yre;return It(d)+h}var $ue=hm(function(d,h){return d+h},0),Hue=I2("ceil"),zue=hm(function(d,h){return d/h},1),Uue=I2("floor");function Wue(d){return d&&d.length?am(d,br,b2):n}function jue(d,h){return d&&d.length?am(d,Ye(h,2),b2):n}function que(d){return YS(d,br)}function Kue(d,h){return YS(d,Ye(h,2))}function Gue(d){return d&&d.length?am(d,br,x2):n}function Xue(d,h){return d&&d.length?am(d,Ye(h,2),x2):n}var Yue=hm(function(d,h){return d*h},1),Jue=I2("round"),Zue=hm(function(d,h){return d-h},0);function Que(d){return d&&d.length?i2(d,br):0}function Nue(d,h){return d&&d.length?i2(d,Ye(h,2)):0}return I.after=xae,I.ary=w9,I.assign=lle,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=ule,I.at=cle,I.before=x9,I.bind=j2,I.bindAll=mue,I.bindKey=C9,I.castArray=Rae,I.chain=b9,I.chunk=Uie,I.compact=Wie,I.concat=jie,I.cond=gue,I.conforms=bue,I.constant=Z2,I.countBy=Qse,I.create=dle,I.curry=E9,I.curryRight=k9,I.debounce=S9,I.defaults=fle,I.defaultsDeep=ple,I.defer=Cae,I.delay=Eae,I.difference=qie,I.differenceBy=Kie,I.differenceWith=Gie,I.drop=Xie,I.dropRight=Yie,I.dropRightWhile=Jie,I.dropWhile=Zie,I.fill=Qie,I.filter=eae,I.flatMap=rae,I.flatMapDeep=oae,I.flatMapDepth=iae,I.flatten=p9,I.flattenDeep=Nie,I.flattenDepth=ese,I.flip=kae,I.flow=yue,I.flowRight=wue,I.fromPairs=tse,I.functions=wle,I.functionsIn=xle,I.groupBy=sae,I.initial=rse,I.intersection=ose,I.intersectionBy=ise,I.intersectionWith=sse,I.invert=Ele,I.invertBy=kle,I.invokeMap=lae,I.iteratee=Q2,I.keyBy=uae,I.keys=Mn,I.keysIn=gr,I.map=xm,I.mapKeys=_le,I.mapValues=Tle,I.matches=xue,I.matchesProperty=Cue,I.memoize=Em,I.merge=Ale,I.mergeWith=D9,I.method=Eue,I.methodOf=kue,I.mixin=N2,I.negate=km,I.nthArg=_ue,I.omit=Mle,I.omitBy=Ole,I.once=Sae,I.orderBy=cae,I.over=Tue,I.overArgs=_ae,I.overEvery=Aue,I.overSome=Mue,I.partial=q2,I.partialRight=_9,I.partition=dae,I.pick=Ble,I.pickBy=P9,I.property=W9,I.propertyOf=Oue,I.pull=cse,I.pullAll=m9,I.pullAllBy=dse,I.pullAllWith=fse,I.pullAt=pse,I.range=Bue,I.rangeRight=Iue,I.rearg=Tae,I.reject=hae,I.remove=hse,I.rest=Aae,I.reverse=U2,I.sampleSize=gae,I.set=Rle,I.setWith=Lle,I.shuffle=bae,I.slice=mse,I.sortBy=wae,I.sortedUniq=Cse,I.sortedUniqBy=Ese,I.split=rue,I.spread=Mae,I.tail=kse,I.take=Sse,I.takeRight=_se,I.takeRightWhile=Tse,I.takeWhile=Ase,I.tap=Wse,I.throttle=Oae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Vue,I.toPlainObject=R9,I.transform=Dle,I.unary=Bae,I.union=Mse,I.unionBy=Ose,I.unionWith=Bse,I.uniq=Ise,I.uniqBy=Rse,I.uniqWith=Lse,I.unset=Ple,I.unzip=W2,I.unzipWith=g9,I.update=Vle,I.updateWith=Fle,I.values=du,I.valuesIn=$le,I.without=Dse,I.words=z9,I.wrap=Iae,I.xor=Pse,I.xorBy=Vse,I.xorWith=Fse,I.zip=$se,I.zipObject=Hse,I.zipObjectDeep=zse,I.zipWith=Use,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=$ue,I.attempt=U9,I.camelCase=Wle,I.capitalize=$9,I.ceil=Hue,I.clamp=Hle,I.clone=Lae,I.cloneDeep=Pae,I.cloneDeepWith=Vae,I.cloneWith=Dae,I.conformsTo=Fae,I.deburr=H9,I.defaultTo=vue,I.divide=zue,I.endsWith=jle,I.eq=To,I.escape=qle,I.escapeRegExp=Kle,I.every=Nse,I.find=tae,I.findIndex=d9,I.findKey=hle,I.findLast=nae,I.findLastIndex=f9,I.findLastKey=mle,I.floor=Uue,I.forEach=v9,I.forEachRight=y9,I.forIn=gle,I.forInRight=ble,I.forOwn=vle,I.forOwnRight=yle,I.get=X2,I.gt=$ae,I.gte=Hae,I.has=Cle,I.hasIn=Y2,I.head=h9,I.identity=br,I.includes=aae,I.indexOf=nse,I.inRange=zle,I.invoke=Sle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=zae,I.isArrayLike=mr,I.isArrayLikeObject=pn,I.isBoolean=Uae,I.isBuffer=Fs,I.isDate=Wae,I.isElement=jae,I.isEmpty=qae,I.isEqual=Kae,I.isEqualWith=Gae,I.isError=K2,I.isFinite=Xae,I.isFunction=Ii,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Yae,I.isMatchWith=Jae,I.isNaN=Zae,I.isNative=Qae,I.isNil=ele,I.isNull=Nae,I.isNumber=M9,I.isObject=nn,I.isObjectLike=un,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=tle,I.isSet=O9,I.isString=_m,I.isSymbol=Ir,I.isTypedArray=cu,I.isUndefined=nle,I.isWeakMap=rle,I.isWeakSet=ole,I.join=ase,I.kebabCase=Gle,I.last=oo,I.lastIndexOf=lse,I.lowerCase=Xle,I.lowerFirst=Yle,I.lt=ile,I.lte=sle,I.max=Wue,I.maxBy=jue,I.mean=que,I.meanBy=Kue,I.min=Gue,I.minBy=Xue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Rue,I.stubString=Lue,I.stubTrue=Due,I.multiply=Yue,I.nth=use,I.noConflict=Sue,I.noop=ey,I.now=Cm,I.pad=Jle,I.padEnd=Zle,I.padStart=Qle,I.parseInt=Nle,I.random=Ule,I.reduce=fae,I.reduceRight=pae,I.repeat=eue,I.replace=tue,I.result=Ile,I.round=Jue,I.runInContext=J,I.sample=mae,I.size=vae,I.snakeCase=nue,I.some=yae,I.sortedIndex=gse,I.sortedIndexBy=bse,I.sortedIndexOf=vse,I.sortedLastIndex=yse,I.sortedLastIndexBy=wse,I.sortedLastIndexOf=xse,I.startCase=oue,I.startsWith=iue,I.subtract=Zue,I.sum=Que,I.sumBy=Nue,I.template=sue,I.times=Pue,I.toFinite=Ri,I.toInteger=ft,I.toLength=I9,I.toLower=aue,I.toNumber=io,I.toSafeInteger=ale,I.toString=It,I.toUpper=lue,I.trim=uue,I.trimEnd=cue,I.trimStart=due,I.truncate=fue,I.unescape=pue,I.uniqueId=Fue,I.upperCase=hue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return Qo(I,function(h,w){Rt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),Nr(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:En(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Gn(w,S.__takeCount__):S.__views__.push({size:Gn(w,X),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),Nr(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==F;wt.prototype[d]=function(B){var P=this.clone();return P.__iteratees__.push({iteratee:Ye(B,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),Nr(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),Nr(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(br)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(km(Ye(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(X)},Qo(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),B=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);B&&(I.prototype[h]=function(){var U=this.__wrapped__,K=S?[1]:arguments,Z=U instanceof wt,ve=K[0],ye=Z||lt(U),xe=function(vt){var xt=B.apply(I,Bs([vt],K));return S&&Re?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(Z=ye=!1);var Re=this.__chain__,Ue=!!this.__actions__.length,Ze=P&&!Re,gt=Z&&!Ue;if(!P&&ye){U=gt?U:new wt(this);var Qe=d.apply(U,K);return Qe.__actions__.push({func:wm,args:[xe],thisArg:n}),new to(Qe,Re)}return Ze&>?d.apply(this,K):(Qe=this.thru(xe),Ze?S?Qe.value()[0]:Qe.value():Qe)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var B=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],B)}return this[w](function(U){return h.apply(lt(U)?U:[],B)})}}),Qo(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Rt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=poe,wt.prototype.reverse=hoe,wt.prototype.value=moe,I.prototype.at=jse,I.prototype.chain=qse,I.prototype.commit=Kse,I.prototype.next=Gse,I.prototype.plant=Yse,I.prototype.reverse=Jse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Zse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Xse),I},nu=Kre();Da?((Da.exports=nu)._=nu,Qv._=nu):Dn._=nu}).call(ml)}(uf,uf.exports);var kt=uf.exports;const rn=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function d6(t){return/\s/.test(t)}function f6(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(d6(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&d6(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=Pr.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let Ni=null;function aR(){if(Ni)return Ni;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),Ni=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=k=>parseFloat(k)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,E=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+E+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),t!=null&&t.fontSize&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),Ni&&Ni.parentNode&&(Ni.parentNode.removeChild(Ni),Ni=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Lt.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:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:o6,height:o6}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:D,flipY:O}=e.node.attrs,M=[];D&&M.push("rotateX(180deg)"),O&&M.push("rotateY(180deg)");const $=M.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=kt.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},i6);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const D=document.querySelector(".image-resizer");if(D&&(D.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:M}=o.unref(s),$=O/M;let V=Number(e.node.attrs.width)||O,G=Number(e.node.attrs.height)||Math.round(V/$);const ee=o.unref(i).width;V=Math.min(V>ee?ee:V,ee),G=Math.round(V/$),Object.assign(l.value,{x:T,y:A,w:V,h:G,dir:_}),a.value=!0,y()}const b=kt.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:D}=o.unref(l),O=(_-T)*(/l/.test(D)?-1:1),M=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:M})},i6),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const E=new ResizeObserver(m),k=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),E.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),E.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},k.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Se)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),uo=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=uo(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"inline",inline:!0,defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.style.width||e.getAttribute("width")||null;return n&&n.endsWith("%")?n:n==null?null:parseInt(n,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"}]},addProseMirrorPlugins(){return[new nt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=uo(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var k;const E=((k=e.extensions)==null?void 0:k.filter(C=>C.name!=="spellchecker"))||[];return E.some(C=>C.name==="image")||E.push(qu.configure()),E}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(E){return u1(E).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(E){return new Lo({extensions:n.value,content:E,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(E,k){if(!E)return;const C=bn(k,!0,e.mode);kt.isEqual(E.getHTML(),C)||E.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,E=>{r.value||b(f.value,E)}),o.watch(()=>e.commentCuesheet,E=>{i.value||b(p.value,E)}),o.watch(()=>e.content,E=>{s.value||b(m.value,E)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(E,k)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[E.comment&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=E.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameComment.label,"custom-class":E.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.commentCuesheet&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=E.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameCommentCuesheet.label,"custom-class":E.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=E.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameContent.label,"custom-class":E.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],es=Math.min,Cr=Math.max,ff=Math.round,pf=Math.floor,Fo=t=>({x:t,y:t}),ER={left:"right",right:"left",bottom:"top",top:"bottom"},kR={start:"end",end:"start"};function m1(t,e,n){return Cr(t,es(e,n))}function di(t,e){return typeof t=="function"?t(e):t}function fi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function ts(t){return["top","bottom"].includes(fi(t))?"y":"x"}function v1(t){return g1(ts(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>kR[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(fi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>ER[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function p6(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(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 h6(t,e,n){let{reference:r,floating:i}=t;const s=ts(e),a=v1(e),l=b1(a),u=fi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=h6(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:E,y:k,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=E??f,p=k??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=h6(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=di(e,t),b=p6(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),E=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:k,strategy:u}):E);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=di(t,e)||{};if(c==null)return{};const p=p6(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",E=y?"bottom":"right",k=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[k]||s.floating[b]);const D=C/2-_/2,O=A/2-v[b]/2-1,M=es(p[x],O),$=es(p[E],O),V=M,G=A-v[b]-$,ee=A/2-v[b]/2+D,W=m1(V,ee,G),F=!u.arrow&&gl(i)!=null&&ee!==W&&s.reference[b]/2-(ee<V?M:$)-v[b]/2<0,R=F?ee<V?ee-V:ee-G:0;return{[g]:m[g]+R,data:{[g]:W,centerOffset:ee-W-R,...F&&{alignmentOffset:R}},reset:F}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=di(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=fi(i),E=ts(l),k=fi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(k||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],D=await Ku(e,y),O=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(D[x]),p){const ee=SR(i,a,C);O.push(D[ee[0]],D[ee[1]])}if(M=[...M,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,V;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,W=A[ee];if(W)return{data:{index:ee,overflows:M},reset:{placement:W}};let F=(V=M.filter(R=>R.overflows[0]<=0).sort((R,H)=>R.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(g){case"bestFit":{var G;const R=(G=M.filter(H=>{if(T){const L=ts(H.placement);return L===E||L==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(L=>L>0).reduce((L,q)=>L+q,0)]).sort((H,L)=>H[1]-L[1])[0])==null?void 0:G[0];R&&(F=R);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function m6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g6(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=di(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=m6(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g6(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=m6(s,n.floating);return{data:{escapedOffsets:a,escaped:g6(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=fi(n),l=gl(n),u=ts(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=di(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:E}=y;return{x,y:E}}},...u}=di(t,e),c={x:n,y:r},f=await Ku(e,u),p=ts(fi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",E=g+f[y],k=g-f[x];g=m1(E,g,k)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",E=b+f[y],k=b-f[x];b=m1(E,b,k)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=di(t,e),f={x:n,y:r},p=ts(i),m=g1(p);let g=f[m],b=f[p];const v=di(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=m==="y"?"height":"width",C=s.reference[m]-s.floating[k]+y.mainAxis,_=s.reference[m]+s.reference[k]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,E;const k=m==="y"?"width":"height",C=["top","left"].includes(fi(i)),_=s.reference[p]-s.floating[k]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[k]+(C?0:((E=a.offset)==null?void 0:E[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=di(t,e),f=await Ku(e,c),p=fi(i),m=gl(i),g=ts(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const E=v-f.top-f.bottom,k=b-f.left-f.right,C=es(v-f[y],E),_=es(b-f[x],k),T=!e.middlewareData.shift;let A=C,D=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=E),T&&!m){const M=Cr(f.left,0),$=Cr(f.right,0),V=Cr(f.top,0),G=Cr(f.bottom,0);g?D=b-2*(M!==0||$!==0?M+$:Cr(f.left,f.right)):A=v-2*(V!==0||G!==0?V+G:Cr(f.top,f.bottom))}await u({...e,availableWidth:D,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function Er(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $o(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof Er(t).Node:!1}function co(t){return gf()?t instanceof Element||t instanceof Er(t).Element:!1}function Ho(t){return gf()?t instanceof HTMLElement||t instanceof Er(t).HTMLElement:!1}function b6(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Er(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=fo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=co(t)?fo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ns(t);for(;Ho(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ns(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function fo(t){return Er(t).getComputedStyle(t)}function vf(t){return co(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ns(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||b6(t)&&t.host||$o(t);return b6(e)?e.host:e}function v6(t){const e=ns(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ho(e)&&Gu(e)?e:v6(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=v6(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Er(i);if(s){const l=E1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function E1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y6(t){const e=fo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ho(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function k1(t){return co(t)?t:t.contextElement}function vl(t){const e=k1(t);if(!Ho(e))return Fo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=y6(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=Fo(0);function w6(t){const e=Er(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Er(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=k1(t);let a=Fo(1);e&&(r?co(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?w6(s):Fo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=Er(s),g=r&&co(r)?Er(r):r;let b=m,v=E1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),E=fo(v),k=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=k,c+=C,b=Er(v),v=E1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa($o(t)).left+n}function x6(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=$o(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=Fo(1);const f=Fo(0),p=Ho(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Ho(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?x6(a,u,!0):Fo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=$o(t),n=vf(t),r=t.ownerDocument.body,i=Cr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Cr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return fo(r).direction==="rtl"&&(a+=Cr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=Er(t),r=$o(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Ho(t)?vl(t):Fo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function C6(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR($o(t));else if(co(e))r=GR(e,n);else{const i=w6(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function E6(t,e){const n=ns(t);return n===e||!co(n)||bl(n)?!1:fo(n).position==="fixed"||E6(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>co(l)&&ia(l)!=="body"),i=null;const s=fo(t).position==="fixed";let a=s?ns(t):t;for(;co(a)&&!bl(a);){const l=fo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&E6(t,a))?r=r.filter(f=>f!==a):i=l,a=ns(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=C6(e,f,i);return c.top=Cr(p.top,c.top),c.right=es(p.right,c.right),c.bottom=es(p.bottom,c.bottom),c.left=Cr(p.left,c.left),c},C6(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=y6(t);return{width:e,height:n}}function ZR(t,e,n){const r=Ho(e),i=$o(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Fo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?x6(i,l):Fo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return fo(t).position==="static"}function k6(t,e){if(!Ho(t)||fo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $o(t)===n&&(n=n.ownerDocument.body),n}function S6(t,e){const n=Er(t);if(bf(t))return n;if(!Ho(t)){let i=ns(t);for(;i&&!bl(i);){if(co(i)&&!_1(i))return i;i=ns(i)}return n}let r=k6(t,e);for(;r&&$R(r)&&_1(r);)r=k6(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||S6,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return fo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:$o,getClippingRect:YR,getOffsetParent:S6,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:co,isRTL:NR};function _6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=$o(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),k={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Cr(0,es(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_6(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,k)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=k1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[E]=x;E&&E.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_6(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,T6=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function A6(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function M6(t,e){const n=A6(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const D=M6(f.value,p.value),O=M6(f.value,m.value);return u.value?{...A,transform:"translate("+D+"px, "+O+"px)",...A6(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:D+"px",top:O+"px"}});let E;function k(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(D=>{p.value=D.x,m.value=D.y,g.value=D.strategy,b.value=D.placement,v.value=D.middlewareData,y.value=A!==!1})}function C(){typeof E=="function"&&(E(),E=void 0)}function _(){if(C(),r===void 0){k();return}if(c.value!=null&&f.value!=null){E=r(c.value,f.value,k);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],k,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:k}}function Ht(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function O6(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function B6(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function zo(t){return typeof t=="function"?t():o.unref(t)}const pi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},I6=wL();function wL(){var t,e;return pi&&((t=window==null?void 0:window.navigator)==null?void 0:t.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 xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=zo(t),u=zo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function EL(t){return o.getCurrentInstance()}function R6(t,e=1e4){return o.customRef((n,r)=>{let i=zo(t),s;const a=()=>setTimeout(()=>{i=zo(t),r()},zo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function L6(t,e=200,n={}){return xL(CL(e,n),t)}function kL(t,e){EL()&&o.onBeforeUnmount(t,e)}function D6(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},zo(e))}return r&&(i.value=!0,pi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function po(t){var e;const n=zo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=pi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[po(e),zo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&zo(l)||u(c)&&n(c)},a)}function P6(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=P6();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>po(p)):[po(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function kr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=k=>l?typeof l=="function"?l(k):ML(k):k,x=()=>bL(t[e])?y(t[e]):p,E=k=>{m?m(k)&&b(v,k):b(v,k)};if(u){const k=x(),C=o.ref(k);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&E(T)},{deep:f}),C}else return o.computed({get(){return x()},set(k){E(k)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Un(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,E=p||m;if(!v&&!y&&(!x&&!E||i==="vertical"&&E||i==="horizontal"&&x))return null;const k=n?Array.from(n.querySelectorAll(s)):a;if(!k.length)return null;c&&t.preventDefault();let C=null;return E||x?C=V6(k,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=k.at(0)||null:y&&(C=k.at(-1)||null),f&&(C==null||C.focus()),C}function V6(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?V6(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,hce]=Ht("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=B6(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",I6&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!pi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),I6&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return kL(()=>{n.value.delete(e)}),r}function F6(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:F6(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&F6(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=po(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!pi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$6()),document.body.insertAdjacentElement("beforeend",e[1]??$6()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return zo(t)?!!((e=po(t))!=null&&e.closest("form")):!0})}function Nn(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Dt(t,e){const n=Nn(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function De(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:po(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=R6(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},El=new WeakMap,Ef=new WeakMap,kf={},D1=0,H6=function(t){return t&&(t.host||H6(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=H6(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);kf[n]||(kf[n]=new WeakMap);var s=kf[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(El.get(m)||0)+1,y=(s.get(m)||0)+1;El.set(m,v),s.set(m,y),a.push(m),v===1&&b&&Ef.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=El.get(p)-1,g=s.get(p)-1;El.set(p,m),s.set(p,g),m||(Ef.has(p)||p.removeAttribute(r),Ef.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(El=new WeakMap,El=new WeakMap,Ef=new WeakMap,kf={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>po(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Wr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=po(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function z6(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=R6("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Un(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Je=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function U6(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:po(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=z6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(pi){const E=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(E)}};o.watch(t,async(y,x)=>{var E;const k=x!==y;if(await o.nextTick(),k){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((E=r.value)==null?void 0:E.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),E=x.includes(y.animationName),k=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&E&&(p(`after-${k}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const jr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
135
|
+
}`;var gt=U9(function(){return Mt(P,Ue+"return "+xe).apply(n,U)});if(gt.source=xe,K2(gt))throw gt;return gt}function aue(d){return It(d).toLowerCase()}function lue(d){return It(d).toUpperCase()}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Br(h)))return d;var S=So(d),B=So(h),P=QS(S,B),U=NS(S,B)+1;return Vs(S,P,U).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Br(h)))return d;var S=So(d),B=NS(S,So(h))+1;return Vs(S,0,B).join("")}function due(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Br(h)))return d;var S=So(d),B=QS(S,So(h));return Vs(S,B).join("")}function fue(d,h){var w=M,S=$;if(nn(h)){var B="separator"in h?h.separator:B;w="length"in h?ft(h.length):w,S="omission"in h?Br(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var U=So(d);P=U.length}if(w>=P)return d;var K=w-tu(S);if(K<1)return S;var Z=U?Vs(U,0,K).join(""):d.slice(0,K);if(B===n)return Z+S;if(U&&(K+=Z.length-K),G2(B)){if(d.slice(K).search(B)){var ve,ye=Z;for(B.global||(B=u2(B.source,It(yS.exec(B))+"g")),B.lastIndex=0;ve=B.exec(ye);)var xe=ve.index;Z=Z.slice(0,xe===n?K:xe)}}else if(d.indexOf(Br(B),K)!=K){var Re=Z.lastIndexOf(B);Re>-1&&(Z=Z.slice(0,Re))}return Z+S}function pue(d){return d=It(d),d&&An.test(d)?d.replace(fn,Ure):d}var hue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Vre(d)?qre(d):Are(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Mr(d,n,h)}catch(w){return K2(w)?w:new it(w)}}),mue=Oi(function(d,h){return Nr(h,function(w){w=ei(w),Ai(d,w,j2(d[w],d))}),d});function gue(d){var h=d==null?0:d.length,w=Ye();return d=h?Qt(d,function(S){if(typeof S[1]!="function")throw new eo(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var B=-1;++B<h;){var P=d[B];if(Mr(P[0],this,S))return Mr(P[1],this,S)}})}function bue(d){return Uoe(no(d,p))}function Z2(d){return function(){return d}}function vue(d,h){return d==null||d!==d?h:d}var yue=q_(),wue=q_(!0);function br(d){return d}function Q2(d){return x_(typeof d=="function"?d:no(d,p))}function xue(d){return E_(no(d,p))}function Cue(d,h){return k_(d,no(h,p))}var Eue=bt(function(d,h){return function(w){return rd(w,d,h)}}),kue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=Mn(h),B=lm(h,S);w==null&&!(nn(h)&&(B.length||!S.length))&&(w=h,h=d,d=this,B=lm(h,Mn(h)));var P=!(nn(w)&&"chain"in w)||!!w.chain,U=Ii(d);return Nr(B,function(K){var Z=h[K];d[K]=Z,U&&(d.prototype[K]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),xe=ye.__actions__=hr(this.__actions__);return xe.push({func:Z,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return Z.apply(d,Bs([this.value()],arguments))})}),d}function Sue(){return Dn._===this&&(Dn._=Zre),this}function ey(){}function _ue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var Tue=B2(Qt),Aue=B2(KS),Mue=B2(n2);function W9(d){return F2(d)?r2(ei(d)):iie(d)}function Oue(d){return function(h){return d==null?n:Ha(d,h)}}var Bue=G_(),Iue=G_(!0);function ty(){return[]}function ny(){return!1}function Rue(){return{}}function Lue(){return""}function Due(){return!0}function Pue(d,h){if(d=ft(d),d<1||d>H)return[];var w=X,S=Gn(d,X);h=Ye(h),d-=X;for(var B=s2(S,h);++w<d;)h(w);return B}function Vue(d){return lt(d)?Qt(d,ei):Ir(d)?[d]:hr(u9(It(d)))}function Fue(d){var h=++Yre;return It(d)+h}var $ue=hm(function(d,h){return d+h},0),Hue=I2("ceil"),zue=hm(function(d,h){return d/h},1),Uue=I2("floor");function Wue(d){return d&&d.length?am(d,br,b2):n}function jue(d,h){return d&&d.length?am(d,Ye(h,2),b2):n}function que(d){return YS(d,br)}function Kue(d,h){return YS(d,Ye(h,2))}function Gue(d){return d&&d.length?am(d,br,x2):n}function Xue(d,h){return d&&d.length?am(d,Ye(h,2),x2):n}var Yue=hm(function(d,h){return d*h},1),Jue=I2("round"),Zue=hm(function(d,h){return d-h},0);function Que(d){return d&&d.length?i2(d,br):0}function Nue(d,h){return d&&d.length?i2(d,Ye(h,2)):0}return I.after=xae,I.ary=w9,I.assign=lle,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=ule,I.at=cle,I.before=x9,I.bind=j2,I.bindAll=mue,I.bindKey=C9,I.castArray=Rae,I.chain=b9,I.chunk=Uie,I.compact=Wie,I.concat=jie,I.cond=gue,I.conforms=bue,I.constant=Z2,I.countBy=Qse,I.create=dle,I.curry=E9,I.curryRight=k9,I.debounce=S9,I.defaults=fle,I.defaultsDeep=ple,I.defer=Cae,I.delay=Eae,I.difference=qie,I.differenceBy=Kie,I.differenceWith=Gie,I.drop=Xie,I.dropRight=Yie,I.dropRightWhile=Jie,I.dropWhile=Zie,I.fill=Qie,I.filter=eae,I.flatMap=rae,I.flatMapDeep=oae,I.flatMapDepth=iae,I.flatten=p9,I.flattenDeep=Nie,I.flattenDepth=ese,I.flip=kae,I.flow=yue,I.flowRight=wue,I.fromPairs=tse,I.functions=wle,I.functionsIn=xle,I.groupBy=sae,I.initial=rse,I.intersection=ose,I.intersectionBy=ise,I.intersectionWith=sse,I.invert=Ele,I.invertBy=kle,I.invokeMap=lae,I.iteratee=Q2,I.keyBy=uae,I.keys=Mn,I.keysIn=gr,I.map=xm,I.mapKeys=_le,I.mapValues=Tle,I.matches=xue,I.matchesProperty=Cue,I.memoize=Em,I.merge=Ale,I.mergeWith=D9,I.method=Eue,I.methodOf=kue,I.mixin=N2,I.negate=km,I.nthArg=_ue,I.omit=Mle,I.omitBy=Ole,I.once=Sae,I.orderBy=cae,I.over=Tue,I.overArgs=_ae,I.overEvery=Aue,I.overSome=Mue,I.partial=q2,I.partialRight=_9,I.partition=dae,I.pick=Ble,I.pickBy=P9,I.property=W9,I.propertyOf=Oue,I.pull=cse,I.pullAll=m9,I.pullAllBy=dse,I.pullAllWith=fse,I.pullAt=pse,I.range=Bue,I.rangeRight=Iue,I.rearg=Tae,I.reject=hae,I.remove=hse,I.rest=Aae,I.reverse=U2,I.sampleSize=gae,I.set=Rle,I.setWith=Lle,I.shuffle=bae,I.slice=mse,I.sortBy=wae,I.sortedUniq=Cse,I.sortedUniqBy=Ese,I.split=rue,I.spread=Mae,I.tail=kse,I.take=Sse,I.takeRight=_se,I.takeRightWhile=Tse,I.takeWhile=Ase,I.tap=Wse,I.throttle=Oae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Vue,I.toPlainObject=R9,I.transform=Dle,I.unary=Bae,I.union=Mse,I.unionBy=Ose,I.unionWith=Bse,I.uniq=Ise,I.uniqBy=Rse,I.uniqWith=Lse,I.unset=Ple,I.unzip=W2,I.unzipWith=g9,I.update=Vle,I.updateWith=Fle,I.values=du,I.valuesIn=$le,I.without=Dse,I.words=z9,I.wrap=Iae,I.xor=Pse,I.xorBy=Vse,I.xorWith=Fse,I.zip=$se,I.zipObject=Hse,I.zipObjectDeep=zse,I.zipWith=Use,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=$ue,I.attempt=U9,I.camelCase=Wle,I.capitalize=$9,I.ceil=Hue,I.clamp=Hle,I.clone=Lae,I.cloneDeep=Pae,I.cloneDeepWith=Vae,I.cloneWith=Dae,I.conformsTo=Fae,I.deburr=H9,I.defaultTo=vue,I.divide=zue,I.endsWith=jle,I.eq=To,I.escape=qle,I.escapeRegExp=Kle,I.every=Nse,I.find=tae,I.findIndex=d9,I.findKey=hle,I.findLast=nae,I.findLastIndex=f9,I.findLastKey=mle,I.floor=Uue,I.forEach=v9,I.forEachRight=y9,I.forIn=gle,I.forInRight=ble,I.forOwn=vle,I.forOwnRight=yle,I.get=X2,I.gt=$ae,I.gte=Hae,I.has=Cle,I.hasIn=Y2,I.head=h9,I.identity=br,I.includes=aae,I.indexOf=nse,I.inRange=zle,I.invoke=Sle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=zae,I.isArrayLike=mr,I.isArrayLikeObject=pn,I.isBoolean=Uae,I.isBuffer=Fs,I.isDate=Wae,I.isElement=jae,I.isEmpty=qae,I.isEqual=Kae,I.isEqualWith=Gae,I.isError=K2,I.isFinite=Xae,I.isFunction=Ii,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Yae,I.isMatchWith=Jae,I.isNaN=Zae,I.isNative=Qae,I.isNil=ele,I.isNull=Nae,I.isNumber=M9,I.isObject=nn,I.isObjectLike=un,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=tle,I.isSet=O9,I.isString=_m,I.isSymbol=Ir,I.isTypedArray=cu,I.isUndefined=nle,I.isWeakMap=rle,I.isWeakSet=ole,I.join=ase,I.kebabCase=Gle,I.last=oo,I.lastIndexOf=lse,I.lowerCase=Xle,I.lowerFirst=Yle,I.lt=ile,I.lte=sle,I.max=Wue,I.maxBy=jue,I.mean=que,I.meanBy=Kue,I.min=Gue,I.minBy=Xue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Rue,I.stubString=Lue,I.stubTrue=Due,I.multiply=Yue,I.nth=use,I.noConflict=Sue,I.noop=ey,I.now=Cm,I.pad=Jle,I.padEnd=Zle,I.padStart=Qle,I.parseInt=Nle,I.random=Ule,I.reduce=fae,I.reduceRight=pae,I.repeat=eue,I.replace=tue,I.result=Ile,I.round=Jue,I.runInContext=J,I.sample=mae,I.size=vae,I.snakeCase=nue,I.some=yae,I.sortedIndex=gse,I.sortedIndexBy=bse,I.sortedIndexOf=vse,I.sortedLastIndex=yse,I.sortedLastIndexBy=wse,I.sortedLastIndexOf=xse,I.startCase=oue,I.startsWith=iue,I.subtract=Zue,I.sum=Que,I.sumBy=Nue,I.template=sue,I.times=Pue,I.toFinite=Ri,I.toInteger=ft,I.toLength=I9,I.toLower=aue,I.toNumber=io,I.toSafeInteger=ale,I.toString=It,I.toUpper=lue,I.trim=uue,I.trimEnd=cue,I.trimStart=due,I.truncate=fue,I.unescape=pue,I.uniqueId=Fue,I.upperCase=hue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return Qo(I,function(h,w){Rt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,Nr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),Nr(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:En(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Gn(w,S.__takeCount__):S.__views__.push({size:Gn(w,X),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),Nr(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==F;wt.prototype[d]=function(B){var P=this.clone();return P.__iteratees__.push({iteratee:Ye(B,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),Nr(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),Nr(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(br)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(km(Ye(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(X)},Qo(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),B=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);B&&(I.prototype[h]=function(){var U=this.__wrapped__,K=S?[1]:arguments,Z=U instanceof wt,ve=K[0],ye=Z||lt(U),xe=function(vt){var xt=B.apply(I,Bs([vt],K));return S&&Re?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(Z=ye=!1);var Re=this.__chain__,Ue=!!this.__actions__.length,Ze=P&&!Re,gt=Z&&!Ue;if(!P&&ye){U=gt?U:new wt(this);var Qe=d.apply(U,K);return Qe.__actions__.push({func:wm,args:[xe],thisArg:n}),new to(Qe,Re)}return Ze&>?d.apply(this,K):(Qe=this.thru(xe),Ze?S?Qe.value()[0]:Qe.value():Qe)})}),Nr(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var B=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],B)}return this[w](function(U){return h.apply(lt(U)?U:[],B)})}}),Qo(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Rt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=poe,wt.prototype.reverse=hoe,wt.prototype.value=moe,I.prototype.at=jse,I.prototype.chain=qse,I.prototype.commit=Kse,I.prototype.next=Gse,I.prototype.plant=Yse,I.prototype.reverse=Jse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Zse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Xse),I},nu=Kre();Da?((Da.exports=nu)._=nu,Qv._=nu):Dn._=nu}).call(ml)}(uf,uf.exports);var kt=uf.exports;const rn=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function d6(t){return/\s/.test(t)}function f6(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(d6(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&d6(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=Pr.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let Ni=null;function aR(){if(Ni)return Ni;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),Ni=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=k=>parseFloat(k)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,E=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+E+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),t!=null&&t.fontSize&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),Ni&&Ni.parentNode&&(Ni.parentNode.removeChild(Ni),Ni=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Lt.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:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:o6,height:o6}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:D,flipY:O}=e.node.attrs,M=[];D&&M.push("rotateX(180deg)"),O&&M.push("rotateY(180deg)");const $=M.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=kt.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},i6);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const D=document.querySelector(".image-resizer");if(D&&(D.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:M}=o.unref(s),$=O/M;let V=Number(e.node.attrs.width)||O,G=Number(e.node.attrs.height)||Math.round(V/$);const ee=o.unref(i).width;V=Math.min(V>ee?ee:V,ee),G=Math.round(V/$),Object.assign(l.value,{x:T,y:A,w:V,h:G,dir:_}),a.value=!0,y()}const b=kt.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:D}=o.unref(l),O=(_-T)*(/l/.test(D)?-1:1),M=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:M})},i6),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const E=new ResizeObserver(m),k=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),E.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),E.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},k.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Se)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),uo=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=uo(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),src:{default:null,parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e;return n==null?void 0:n.getAttribute("src")}},flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e,r=n&&(n.style.width||n.getAttribute("width"))||null;return r&&r.endsWith("%")?r:r==null?null:parseInt(r,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null||n==="auto"?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"},{tag:"p",priority:1001,getAttrs:t=>{var n,r;const e=t;return e.children.length===1&&((n=e.firstElementChild)==null?void 0:n.tagName)==="IMG"&&!!!((r=e.textContent)!=null&&r.trim())&&e.firstElementChild.hasAttribute("src")?null:!1}}]},addProseMirrorPlugins(){return[new nt({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Ve&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=uo(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var k;const E=((k=e.extensions)==null?void 0:k.filter(C=>C.name!=="spellchecker"))||[];return E.some(C=>C.name==="image")||E.push(qu.configure()),E}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(E){return u1(E).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(E){return new Lo({extensions:n.value,content:E,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(bn(e.comment,!0,e.mode))),i.value||(p.value=g(bn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(bn(e.content,!0,e.mode)));function b(E,k){if(!E)return;const C=bn(k,!0,e.mode);kt.isEqual(E.getHTML(),C)||E.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,E=>{r.value||b(f.value,E)}),o.watch(()=>e.commentCuesheet,E=>{i.value||b(p.value,E)}),o.watch(()=>e.content,E=>{s.value||b(m.value,E)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(E,k)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[E.comment&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=E.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameComment.label,"custom-class":E.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.commentCuesheet&&!E.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=E.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameCommentCuesheet.label,"custom-class":E.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),E.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=E.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:E.fieldNameContent.label,"custom-class":E.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Qn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],es=Math.min,Cr=Math.max,ff=Math.round,pf=Math.floor,Fo=t=>({x:t,y:t}),ER={left:"right",right:"left",bottom:"top",top:"bottom"},kR={start:"end",end:"start"};function m1(t,e,n){return Cr(t,es(e,n))}function di(t,e){return typeof t=="function"?t(e):t}function fi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function ts(t){return["top","bottom"].includes(fi(t))?"y":"x"}function v1(t){return g1(ts(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>kR[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(fi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>ER[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function p6(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(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 h6(t,e,n){let{reference:r,floating:i}=t;const s=ts(e),a=v1(e),l=b1(a),u=fi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=h6(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:E,y:k,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=E??f,p=k??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=h6(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=di(e,t),b=p6(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),E=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:k,strategy:u}):E);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=di(t,e)||{};if(c==null)return{};const p=p6(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",E=y?"bottom":"right",k=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[k]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[k]||s.floating[b]);const D=C/2-_/2,O=A/2-v[b]/2-1,M=es(p[x],O),$=es(p[E],O),V=M,G=A-v[b]-$,ee=A/2-v[b]/2+D,W=m1(V,ee,G),F=!u.arrow&&gl(i)!=null&&ee!==W&&s.reference[b]/2-(ee<V?M:$)-v[b]/2<0,R=F?ee<V?ee-V:ee-G:0;return{[g]:m[g]+R,data:{[g]:W,centerOffset:ee-W-R,...F&&{alignmentOffset:R}},reset:F}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=di(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=fi(i),E=ts(l),k=fi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(k||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],D=await Ku(e,y),O=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(D[x]),p){const ee=SR(i,a,C);O.push(D[ee[0]],D[ee[1]])}if(M=[...M,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,V;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,W=A[ee];if(W)return{data:{index:ee,overflows:M},reset:{placement:W}};let F=(V=M.filter(R=>R.overflows[0]<=0).sort((R,H)=>R.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!F)switch(g){case"bestFit":{var G;const R=(G=M.filter(H=>{if(T){const L=ts(H.placement);return L===E||L==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(L=>L>0).reduce((L,q)=>L+q,0)]).sort((H,L)=>H[1]-L[1])[0])==null?void 0:G[0];R&&(F=R);break}case"initialPlacement":F=l;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function m6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g6(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=di(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=m6(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g6(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=m6(s,n.floating);return{data:{escapedOffsets:a,escaped:g6(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=fi(n),l=gl(n),u=ts(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=di(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:E}=y;return{x,y:E}}},...u}=di(t,e),c={x:n,y:r},f=await Ku(e,u),p=ts(fi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",E=g+f[y],k=g-f[x];g=m1(E,g,k)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",E=b+f[y],k=b-f[x];b=m1(E,b,k)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=di(t,e),f={x:n,y:r},p=ts(i),m=g1(p);let g=f[m],b=f[p];const v=di(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=m==="y"?"height":"width",C=s.reference[m]-s.floating[k]+y.mainAxis,_=s.reference[m]+s.reference[k]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,E;const k=m==="y"?"width":"height",C=["top","left"].includes(fi(i)),_=s.reference[p]-s.floating[k]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[k]+(C?0:((E=a.offset)==null?void 0:E[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=di(t,e),f=await Ku(e,c),p=fi(i),m=gl(i),g=ts(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const E=v-f.top-f.bottom,k=b-f.left-f.right,C=es(v-f[y],E),_=es(b-f[x],k),T=!e.middlewareData.shift;let A=C,D=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=E),T&&!m){const M=Cr(f.left,0),$=Cr(f.right,0),V=Cr(f.top,0),G=Cr(f.bottom,0);g?D=b-2*(M!==0||$!==0?M+$:Cr(f.left,f.right)):A=v-2*(V!==0||G!==0?V+G:Cr(f.top,f.bottom))}await u({...e,availableWidth:D,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function Er(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function $o(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof Er(t).Node:!1}function co(t){return gf()?t instanceof Element||t instanceof Er(t).Element:!1}function Ho(t){return gf()?t instanceof HTMLElement||t instanceof Er(t).HTMLElement:!1}function b6(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Er(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=fo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=co(t)?fo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ns(t);for(;Ho(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ns(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function fo(t){return Er(t).getComputedStyle(t)}function vf(t){return co(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ns(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||b6(t)&&t.host||$o(t);return b6(e)?e.host:e}function v6(t){const e=ns(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ho(e)&&Gu(e)?e:v6(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=v6(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Er(i);if(s){const l=E1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function E1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y6(t){const e=fo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Ho(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function k1(t){return co(t)?t:t.contextElement}function vl(t){const e=k1(t);if(!Ho(e))return Fo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=y6(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=Fo(0);function w6(t){const e=Er(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Er(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=k1(t);let a=Fo(1);e&&(r?co(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?w6(s):Fo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=Er(s),g=r&&co(r)?Er(r):r;let b=m,v=E1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),E=fo(v),k=x.left+(v.clientLeft+parseFloat(E.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=k,c+=C,b=Er(v),v=E1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa($o(t)).left+n}function x6(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=$o(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=Fo(1);const f=Fo(0),p=Ho(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Ho(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?x6(a,u,!0):Fo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=$o(t),n=vf(t),r=t.ownerDocument.body,i=Cr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Cr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return fo(r).direction==="rtl"&&(a+=Cr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=Er(t),r=$o(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Ho(t)?vl(t):Fo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function C6(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR($o(t));else if(co(e))r=GR(e,n);else{const i=w6(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function E6(t,e){const n=ns(t);return n===e||!co(n)||bl(n)?!1:fo(n).position==="fixed"||E6(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>co(l)&&ia(l)!=="body"),i=null;const s=fo(t).position==="fixed";let a=s?ns(t):t;for(;co(a)&&!bl(a);){const l=fo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&E6(t,a))?r=r.filter(f=>f!==a):i=l,a=ns(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=C6(e,f,i);return c.top=Cr(p.top,c.top),c.right=es(p.right,c.right),c.bottom=es(p.bottom,c.bottom),c.left=Cr(p.left,c.left),c},C6(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=y6(t);return{width:e,height:n}}function ZR(t,e,n){const r=Ho(e),i=$o(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=Fo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?x6(i,l):Fo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return fo(t).position==="static"}function k6(t,e){if(!Ho(t)||fo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return $o(t)===n&&(n=n.ownerDocument.body),n}function S6(t,e){const n=Er(t);if(bf(t))return n;if(!Ho(t)){let i=ns(t);for(;i&&!bl(i);){if(co(i)&&!_1(i))return i;i=ns(i)}return n}let r=k6(t,e);for(;r&&$R(r)&&_1(r);)r=k6(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||S6,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return fo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:$o,getClippingRect:YR,getOffsetParent:S6,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:co,isRTL:NR};function _6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=$o(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),k={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Cr(0,es(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_6(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,k)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=k1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[E]=x;E&&E.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_6(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(E=>{i&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,T6=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function A6(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function M6(t,e){const n=A6(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const D=M6(f.value,p.value),O=M6(f.value,m.value);return u.value?{...A,transform:"translate("+D+"px, "+O+"px)",...A6(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:D+"px",top:O+"px"}});let E;function k(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(D=>{p.value=D.x,m.value=D.y,g.value=D.strategy,b.value=D.placement,v.value=D.middlewareData,y.value=A!==!1})}function C(){typeof E=="function"&&(E(),E=void 0)}function _(){if(C(),r===void 0){k();return}if(c.value!=null&&f.value!=null){E=r(c.value,f.value,k);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],k,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:k}}function Ht(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function O6(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function B6(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function zo(t){return typeof t=="function"?t():o.unref(t)}const pi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},I6=wL();function wL(){var t,e;return pi&&((t=window==null?void 0:window.navigator)==null?void 0:t.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 xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=zo(t),u=zo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function EL(t){return o.getCurrentInstance()}function R6(t,e=1e4){return o.customRef((n,r)=>{let i=zo(t),s;const a=()=>setTimeout(()=>{i=zo(t),r()},zo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function L6(t,e=200,n={}){return xL(CL(e,n),t)}function kL(t,e){EL()&&o.onBeforeUnmount(t,e)}function D6(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},zo(e))}return r&&(i.value=!0,pi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function po(t){var e;const n=zo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=pi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[po(e),zo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&zo(l)||u(c)&&n(c)},a)}function P6(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=P6();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>po(p)):[po(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function kr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=k=>l?typeof l=="function"?l(k):ML(k):k,x=()=>bL(t[e])?y(t[e]):p,E=k=>{m?m(k)&&b(v,k):b(v,k)};if(u){const k=x(),C=o.ref(k);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&E(T)},{deep:f}),C}else return o.computed({get(){return x()},set(k){E(k)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Un(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,E=p||m;if(!v&&!y&&(!x&&!E||i==="vertical"&&E||i==="horizontal"&&x))return null;const k=n?Array.from(n.querySelectorAll(s)):a;if(!k.length)return null;c&&t.preventDefault();let C=null;return E||x?C=V6(k,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=k.at(0)||null:y&&(C=k.at(-1)||null),f&&(C==null||C.focus()),C}function V6(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?V6(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,hce]=Ht("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=B6(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",I6&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!pi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),I6&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return kL(()=>{n.value.delete(e)}),r}function F6(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:F6(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&F6(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=po(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!pi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$6()),document.body.insertAdjacentElement("beforeend",e[1]??$6()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return zo(t)?!!((e=po(t))!=null&&e.closest("form")):!0})}function Nn(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Dt(t,e){const n=Nn(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function De(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:po(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=R6(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},El=new WeakMap,Ef=new WeakMap,kf={},D1=0,H6=function(t){return t&&(t.host||H6(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=H6(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);kf[n]||(kf[n]=new WeakMap);var s=kf[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(El.get(m)||0)+1,y=(s.get(m)||0)+1;El.set(m,v),s.set(m,y),a.push(m),v===1&&b&&Ef.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=El.get(p)-1,g=s.get(p)-1;El.set(p,m),s.set(p,g),m||(Ef.has(p)||p.removeAttribute(r),Ef.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(El=new WeakMap,El=new WeakMap,Ef=new WeakMap,kf={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>po(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Wr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=po(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function z6(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=R6("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Un(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Je=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function U6(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:po(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=z6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(pi){const E=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(E)}};o.watch(t,async(y,x)=>{var E;const k=x!==y;if(await o.nextTick(),k){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((E=r.value)==null?void 0:E.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),E=x.includes(y.animationName),k=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&E&&(p(`after-${k}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const jr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
136
136
|
`)].join(`
|
|
137
137
|
`))}return()=>s.value||i.value||l.value?o.h(e.default({present:l})[0],{ref:f=>{const p=po(f);return typeof(p==null?void 0:p.hasAttribute)>"u"||(p!=null&&p.hasAttribute("data-radix-popper-content-wrapper")?a.value=p.firstElementChild:a.value=p),p}}):null}}),[Uo,nD]=Ht("DialogRoot"),rD=o.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=kr(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=o.ref(),s=o.ref(),{modal:a}=o.toRefs(n);return nD({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:s}),(l,u)=>o.renderSlot(l.$slots,"default",{open:o.unref(r)})}}),oD=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Uo(),{forwardRef:r,currentElement:i}=De();return n.contentId||(n.contentId=Wr(void 0,"radix-vue-dialog-content")),o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Je),o.mergeProps(e,{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value||!1,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).open.value?"open":"closed",onClick:o.unref(n).onOpenToggle}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Ju=o.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=P6();return(n,r)=>o.unref(e)||n.forceMount?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:n.to,disabled:n.disabled},[o.renderSlot(n.$slots,"default")],8,["to","disabled"])):o.createCommentVNode("",!0)}}),F1=o.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),iD="dismissableLayer.pointerDownOutside",sD="dismissableLayer.focusOutside";function W6(t,e){const n=e.closest("[data-dismissable-layer]"),r=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),i=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||i.indexOf(r)<i.indexOf(n))}function aD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1),s=o.ref(()=>{});return o.watchEffect(a=>{if(!pi)return;const l=async c=>{const f=c.target;if(e!=null&&e.value){if(W6(e.value,f)){i.value=!1;return}if(c.target&&!i.value){let p=function(){O6(iD,t,m)};const m={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=p,r.addEventListener("click",s.value,{once:!0})):p()}else r.removeEventListener("click",s.value);i.value=!1}},u=window.setTimeout(()=>{r.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(u),r.removeEventListener("pointerdown",l),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>i.value=!0}}function lD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1);return o.watchEffect(s=>{if(!pi)return;const a=async l=>{e!=null&&e.value&&(await o.nextTick(),!(!e.value||W6(e.value,l.target))&&l.target&&!i.value&&O6(sD,t,{originalEvent:l}))};r.addEventListener("focusin",a),s(()=>r.removeEventListener("focusin",a))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const hi=o.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zu=o.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=De(),a=o.computed(()=>{var b;return((b=s.value)==null?void 0:b.ownerDocument)??globalThis.document}),l=o.computed(()=>hi.layersRoot),u=o.computed(()=>s.value?Array.from(l.value).indexOf(s.value):-1),c=o.computed(()=>hi.layersWithOutsidePointerEventsDisabled.size>0),f=o.computed(()=>{const b=Array.from(l.value),[v]=[...hi.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v);return u.value>=y}),p=aD(async b=>{const v=[...hi.branches].some(y=>y==null?void 0:y.contains(b.target));!f.value||v||(r("pointerDownOutside",b),r("interactOutside",b),await o.nextTick(),b.defaultPrevented||r("dismiss"))},s),m=lD(b=>{[...hi.branches].some(v=>v==null?void 0:v.contains(b.target))||(r("focusOutside",b),r("interactOutside",b),b.defaultPrevented||r("dismiss"))},s);TL("Escape",b=>{u.value===l.value.size-1&&(r("escapeKeyDown",b),b.defaultPrevented||r("dismiss"))});let g;return o.watchEffect(b=>{s.value&&(n.disableOutsidePointerEvents&&(hi.layersWithOutsidePointerEventsDisabled.size===0&&(g=a.value.body.style.pointerEvents,a.value.body.style.pointerEvents="none"),hi.layersWithOutsidePointerEventsDisabled.add(s.value)),l.value.add(s.value),b(()=>{n.disableOutsidePointerEvents&&hi.layersWithOutsidePointerEventsDisabled.size===1&&(a.value.body.style.pointerEvents=g)}))}),o.watchEffect(b=>{b(()=>{s.value&&(l.value.delete(s.value),hi.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(b,v)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref:o.unref(i),"as-child":b.asChild,as:b.as,"data-dismissable-layer":"",style:o.normalizeStyle({pointerEvents:c.value?f.value?"auto":"none":void 0}),onFocusCapture:o.unref(m).onFocusCapture,onBlurCapture:o.unref(m).onBlurCapture,onPointerdownCapture:o.unref(p).onPointerDownCapture},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$1="focusScope.autoFocusOnMount",H1="focusScope.autoFocusOnUnmount",j6={bubbles:!1,cancelable:!0};function uD(t,{select:e=!1}={}){const n=Un();for(const r of t)if(rs(r,{select:e}),Un()!==n)return!0}function cD(t){const e=q6(t),n=K6(e,t),r=K6(e.reverse(),t);return[n,r]}function q6(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function K6(t,e){for(const n of t)if(!dD(n,{upTo:e}))return n}function dD(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fD(t){return t instanceof HTMLInputElement&&"select"in t}function rs(t,{select:e=!1}={}){if(t&&t.focus){const n=Un();t.focus({preventScroll:!0}),t!==n&&fD(t)&&e&&t.select()}}const pD=gL(()=>o.ref([]));function hD(){const t=pD();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=G6(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=G6(t.value,e),(n=t.value[0])==null||n.resume()}}}function G6(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function mD(t){return t.filter(e=>e.tagName!=="A")}const Tf=o.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,r=e,{currentRef:i,currentElement:s}=De(),a=o.ref(null),l=hD(),u=o.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});o.watchEffect(f=>{if(!pi)return;const p=s.value;if(!n.trapped)return;function m(y){if(u.paused||!p)return;const x=y.target;p.contains(x)?a.value=x:rs(a.value,{select:!0})}function g(y){if(u.paused||!p)return;const x=y.relatedTarget;x!==null&&(p.contains(x)||rs(a.value,{select:!0}))}function b(y){p.contains(a.value)||rs(p)}document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(b);p&&v.observe(p,{childList:!0,subtree:!0}),f(()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()})}),o.watchEffect(async f=>{const p=s.value;if(await o.nextTick(),!p)return;l.add(u);const m=Un();if(!p.contains(m)){const g=new CustomEvent($1,j6);p.addEventListener($1,b=>r("mountAutoFocus",b)),p.dispatchEvent(g),g.defaultPrevented||(uD(mD(q6(p)),{select:!0}),Un()===m&&rs(p))}f(()=>{p.removeEventListener($1,v=>r("mountAutoFocus",v));const g=new CustomEvent(H1,j6),b=v=>{r("unmountAutoFocus",v)};p.addEventListener(H1,b),p.dispatchEvent(g),setTimeout(()=>{g.defaultPrevented||rs(m??document.body,{select:!0}),p.removeEventListener(H1,b),l.remove(u)},0)})});function c(f){if(!n.loop&&!n.trapped||u.paused)return;const p=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=Un();if(p&&m){const g=f.currentTarget,[b,v]=cD(g);b&&v?!f.shiftKey&&m===v?(f.preventDefault(),n.loop&&rs(b,{select:!0})):f.shiftKey&&m===b&&(f.preventDefault(),n.loop&&rs(v,{select:!0})):m===g&&f.preventDefault()}}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(Je),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":f.asChild,as:f.as,onKeydown:c},{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},8,["as-child","as"]))}}),gD="menu.itemSelect",z1=["Enter"," "],bD=["ArrowDown","PageUp","Home"],X6=["ArrowUp","PageDown","End"],vD=[...bD,...X6];[...z1],[...z1];function Y6(t){return t?"open":"closed"}function Af(t){return t==="indeterminate"}function J6(t){return Af(t)?"indeterminate":t?"checked":"unchecked"}function U1(t){const e=Un();for(const n of t)if(n===e||(n.focus(),Un()!==e))return}function yD(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function wD(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return yD(n,e)}function W1(t){return t.pointerType==="mouse"}const xD="DialogTitle",CD="DialogContent";function ED({titleName:t=xD,contentName:e=CD,componentLink:n="dialog.html#title",titleId:r,descriptionId:i,contentElement:s}){const a=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users.
|
|
138
138
|
|