Files
DeviceManager/_app/immutable/chunks/Action.tNSJ0eLt.js
2024-07-09 14:44:55 +00:00

3 lines
43 KiB
JavaScript

import{l as Ur,f as Fr,b as qr,g as zr}from"./connection.wgaIHNYB.js";import{d as ht,w as Yr}from"./index.Lgv2TFSy.js";import{K as xt}from"./keymap-codes.DVdCLxHW.js";import{s as hr,a as Xr,y as Se,g as Kr,i as Q,n as dt,f as j,e as we,R as Jr,c as Oe,b as Ae,S as Gr,m as qe,C as Qr,t as ze,d as Ye,h as Xe,j as Ke,a9 as Zr,k as Ft,aa as M,U as kt,p as Mt}from"./scheduler.CXEVs2ap.js";import{S as gr,i as yr}from"./index.CTdcniaS.js";import{e as qt}from"./each.CypvCfon.js";import{L as en}from"./i18n-svelte.D0STxjoQ.js";var W="top",X="bottom",K="right",$="left",Bt="auto",Je=[W,X,K,$],_e="start",Ue="end",tn="clippingParents",br="viewport",He="popper",rn="reference",zt=Je.reduce(function(e,t){return e.concat([t+"-"+_e,t+"-"+Ue])},[]),wr=[].concat(Je,[Bt]).reduce(function(e,t){return e.concat([t,t+"-"+_e,t+"-"+Ue])},[]),nn="beforeRead",an="read",on="afterRead",sn="beforeMain",un="main",fn="afterMain",cn="beforeWrite",ln="write",pn="afterWrite",dn=[nn,an,on,sn,un,fn,cn,ln,pn];function ie(e){return e?(e.nodeName||"").toLowerCase():null}function q(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function be(e){var t=q(e).Element;return e instanceof t||e instanceof Element}function Y(e){var t=q(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pt(e){if(typeof ShadowRoot>"u")return!1;var t=q(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vn(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!Y(a)||!ie(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var u=i[o];u===!1?a.removeAttribute(o):a.setAttribute(o,u===!0?"":u)}))})}function mn(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),u=o.reduce(function(f,p){return f[p]="",f},{});!Y(i)||!ie(i)||(Object.assign(i.style,u),Object.keys(a).forEach(function(f){i.removeAttribute(f)}))})}}const Or={name:"applyStyles",enabled:!0,phase:"write",fn:vn,effect:mn,requires:["computeStyles"]};function ne(e){return e.split("-")[0]}var ye=Math.max,vt=Math.min,ke=Math.round;function Dt(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ar(){return!/^((?!chrome|android).)*safari/i.test(Dt())}function Me(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&Y(e)&&(i=e.offsetWidth>0&&ke(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&ke(n.height)/e.offsetHeight||1);var o=be(e)?q(e):window,u=o.visualViewport,f=!Ar()&&r,p=(n.left+(f&&u?u.offsetLeft:0))/i,l=(n.top+(f&&u?u.offsetTop:0))/a,b=n.width/i,A=n.height/a;return{width:b,height:A,top:l,right:p+b,bottom:l+A,left:p,x:p,y:l}}function Rt(e){var t=Me(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function Er(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Pt(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fe(e){return q(e).getComputedStyle(e)}function hn(e){return["table","td","th"].indexOf(ie(e))>=0}function pe(e){return((be(e)?e.ownerDocument:e.document)||window.document).documentElement}function gt(e){return ie(e)==="html"?e:e.assignedSlot||e.parentNode||(Pt(e)?e.host:null)||pe(e)}function Yt(e){return!Y(e)||fe(e).position==="fixed"?null:e.offsetParent}function gn(e){var t=/firefox/i.test(Dt()),r=/Trident/i.test(Dt());if(r&&Y(e)){var n=fe(e);if(n.position==="fixed")return null}var i=gt(e);for(Pt(i)&&(i=i.host);Y(i)&&["html","body"].indexOf(ie(i))<0;){var a=fe(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Ge(e){for(var t=q(e),r=Yt(e);r&&hn(r)&&fe(r).position==="static";)r=Yt(r);return r&&(ie(r)==="html"||ie(r)==="body"&&fe(r).position==="static")?t:r||gn(e)||t}function jt(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ve(e,t,r){return ye(e,vt(t,r))}function yn(e,t,r){var n=Ve(e,t,r);return n>r?r:n}function Tr(){return{top:0,right:0,bottom:0,left:0}}function xr(e){return Object.assign({},Tr(),e)}function Dr(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var bn=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,xr(typeof t!="number"?t:Dr(t,Je))};function wn(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,u=ne(r.placement),f=jt(u),p=[$,K].indexOf(u)>=0,l=p?"height":"width";if(!(!a||!o)){var b=bn(i.padding,r),A=Rt(a),h=f==="y"?W:$,w=f==="y"?X:K,g=r.rects.reference[l]+r.rects.reference[f]-o[f]-r.rects.popper[l],y=o[f]-r.rects.reference[f],T=Ge(a),D=T?f==="y"?T.clientHeight||0:T.clientWidth||0:0,L=g/2-y/2,s=b[h],E=D-A[l]-b[w],v=D/2-A[l]/2+L,C=Ve(s,v,E),P=f;r.modifiersData[n]=(t={},t[P]=C,t.centerOffset=C-v,t)}}function On(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Er(t.elements.popper,i)&&(t.elements.arrow=i))}const An={name:"arrow",enabled:!0,phase:"main",fn:wn,effect:On,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Be(e){return e.split("-")[1]}var En={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tn(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:ke(r*i)/i||0,y:ke(n*i)/i||0}}function Xt(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,u=e.position,f=e.gpuAcceleration,p=e.adaptive,l=e.roundOffsets,b=e.isFixed,A=o.x,h=A===void 0?0:A,w=o.y,g=w===void 0?0:w,y=typeof l=="function"?l({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var T=o.hasOwnProperty("x"),D=o.hasOwnProperty("y"),L=$,s=W,E=window;if(p){var v=Ge(r),C="clientHeight",P="clientWidth";if(v===q(r)&&(v=pe(r),fe(v).position!=="static"&&u==="absolute"&&(C="scrollHeight",P="scrollWidth")),v=v,i===W||(i===$||i===K)&&a===Ue){s=X;var B=b&&v===E&&E.visualViewport?E.visualViewport.height:v[C];g-=B-n.height,g*=f?1:-1}if(i===$||(i===W||i===X)&&a===Ue){L=K;var _=b&&v===E&&E.visualViewport?E.visualViewport.width:v[P];h-=_-n.width,h*=f?1:-1}}var R=Object.assign({position:u},p&&En),k=l===!0?Tn({x:h,y:g},q(r)):{x:h,y:g};if(h=k.x,g=k.y,f){var S;return Object.assign({},R,(S={},S[s]=D?"0":"",S[L]=T?"0":"",S.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",S))}return Object.assign({},R,(t={},t[s]=D?g+"px":"",t[L]=T?h+"px":"",t.transform="",t))}function xn(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,u=r.roundOffsets,f=u===void 0?!0:u,p={placement:ne(t.placement),variation:Be(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Xt(Object.assign({},p,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xt(Object.assign({},p,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Dn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xn,data:{}};var ct={passive:!0};function Cn(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,u=o===void 0?!0:o,f=q(t.elements.popper),p=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&p.forEach(function(l){l.addEventListener("scroll",r.update,ct)}),u&&f.addEventListener("resize",r.update,ct),function(){a&&p.forEach(function(l){l.removeEventListener("scroll",r.update,ct)}),u&&f.removeEventListener("resize",r.update,ct)}}const Ln={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Cn,data:{}};var Sn={left:"right",right:"left",bottom:"top",top:"bottom"};function pt(e){return e.replace(/left|right|bottom|top/g,function(t){return Sn[t]})}var _n={start:"end",end:"start"};function Kt(e){return e.replace(/start|end/g,function(t){return _n[t]})}function Nt(e){var t=q(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function It(e){return Me(pe(e)).left+Nt(e).scrollLeft}function kn(e,t){var r=q(e),n=pe(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,u=0,f=0;if(i){a=i.width,o=i.height;var p=Ar();(p||!p&&t==="fixed")&&(u=i.offsetLeft,f=i.offsetTop)}return{width:a,height:o,x:u+It(e),y:f}}function Mn(e){var t,r=pe(e),n=Nt(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=ye(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ye(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-n.scrollLeft+It(e),f=-n.scrollTop;return fe(i||r).direction==="rtl"&&(u+=ye(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:u,y:f}}function Ht(e){var t=fe(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function Cr(e){return["html","body","#document"].indexOf(ie(e))>=0?e.ownerDocument.body:Y(e)&&Ht(e)?e:Cr(gt(e))}function We(e,t){var r;t===void 0&&(t=[]);var n=Cr(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=q(n),o=i?[a].concat(a.visualViewport||[],Ht(n)?n:[]):n,u=t.concat(o);return i?u:u.concat(We(gt(o)))}function Ct(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Bn(e,t){var r=Me(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function Jt(e,t,r){return t===br?Ct(kn(e,r)):be(t)?Bn(t,r):Ct(Mn(pe(e)))}function Pn(e){var t=We(gt(e)),r=["absolute","fixed"].indexOf(fe(e).position)>=0,n=r&&Y(e)?Ge(e):e;return be(n)?t.filter(function(i){return be(i)&&Er(i,n)&&ie(i)!=="body"}):[]}function Rn(e,t,r,n){var i=t==="clippingParents"?Pn(e):[].concat(t),a=[].concat(i,[r]),o=a[0],u=a.reduce(function(f,p){var l=Jt(e,p,n);return f.top=ye(l.top,f.top),f.right=vt(l.right,f.right),f.bottom=vt(l.bottom,f.bottom),f.left=ye(l.left,f.left),f},Jt(e,o,n));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function Lr(e){var t=e.reference,r=e.element,n=e.placement,i=n?ne(n):null,a=n?Be(n):null,o=t.x+t.width/2-r.width/2,u=t.y+t.height/2-r.height/2,f;switch(i){case W:f={x:o,y:t.y-r.height};break;case X:f={x:o,y:t.y+t.height};break;case K:f={x:t.x+t.width,y:u};break;case $:f={x:t.x-r.width,y:u};break;default:f={x:t.x,y:t.y}}var p=i?jt(i):null;if(p!=null){var l=p==="y"?"height":"width";switch(a){case _e:f[p]=f[p]-(t[l]/2-r[l]/2);break;case Ue:f[p]=f[p]+(t[l]/2-r[l]/2);break}}return f}function Fe(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,u=r.boundary,f=u===void 0?tn:u,p=r.rootBoundary,l=p===void 0?br:p,b=r.elementContext,A=b===void 0?He:b,h=r.altBoundary,w=h===void 0?!1:h,g=r.padding,y=g===void 0?0:g,T=xr(typeof y!="number"?y:Dr(y,Je)),D=A===He?rn:He,L=e.rects.popper,s=e.elements[w?D:A],E=Rn(be(s)?s:s.contextElement||pe(e.elements.popper),f,l,o),v=Me(e.elements.reference),C=Lr({reference:v,element:L,strategy:"absolute",placement:i}),P=Ct(Object.assign({},L,C)),B=A===He?P:v,_={top:E.top-B.top+T.top,bottom:B.bottom-E.bottom+T.bottom,left:E.left-B.left+T.left,right:B.right-E.right+T.right},R=e.modifiersData.offset;if(A===He&&R){var k=R[i];Object.keys(_).forEach(function(S){var U=[K,X].indexOf(S)>=0?1:-1,F=[W,X].indexOf(S)>=0?"y":"x";_[S]+=k[F]*U})}return _}function jn(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,u=r.flipVariations,f=r.allowedAutoPlacements,p=f===void 0?wr:f,l=Be(n),b=l?u?zt:zt.filter(function(w){return Be(w)===l}):Je,A=b.filter(function(w){return p.indexOf(w)>=0});A.length===0&&(A=b);var h=A.reduce(function(w,g){return w[g]=Fe(e,{placement:g,boundary:i,rootBoundary:a,padding:o})[ne(g)],w},{});return Object.keys(h).sort(function(w,g){return h[w]-h[g]})}function Nn(e){if(ne(e)===Bt)return[];var t=pt(e);return[Kt(e),t,Kt(t)]}function In(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,u=o===void 0?!0:o,f=r.fallbackPlacements,p=r.padding,l=r.boundary,b=r.rootBoundary,A=r.altBoundary,h=r.flipVariations,w=h===void 0?!0:h,g=r.allowedAutoPlacements,y=t.options.placement,T=ne(y),D=T===y,L=f||(D||!w?[pt(y)]:Nn(y)),s=[y].concat(L).reduce(function(ae,J){return ae.concat(ne(J)===Bt?jn(t,{placement:J,boundary:l,rootBoundary:b,padding:p,flipVariations:w,allowedAutoPlacements:g}):J)},[]),E=t.rects.reference,v=t.rects.popper,C=new Map,P=!0,B=s[0],_=0;_<s.length;_++){var R=s[_],k=ne(R),S=Be(R)===_e,U=[W,X].indexOf(k)>=0,F=U?"width":"height",I=Fe(t,{placement:R,boundary:l,rootBoundary:b,altBoundary:A,padding:p}),H=U?S?K:$:S?X:W;E[F]>v[F]&&(H=pt(H));var N=pt(H),Z=[];if(a&&Z.push(I[k]<=0),u&&Z.push(I[H]<=0,I[N]<=0),Z.every(function(ae){return ae})){B=R,P=!1;break}C.set(R,Z)}if(P)for(var ee=w?3:1,de=function(J){var oe=s.find(function(Ee){var se=C.get(Ee);if(se)return se.slice(0,J).every(function(Te){return Te})});if(oe)return B=oe,"break"},te=ee;te>0;te--){var ve=de(te);if(ve==="break")break}t.placement!==B&&(t.modifiersData[n]._skip=!0,t.placement=B,t.reset=!0)}}const Hn={name:"flip",enabled:!0,phase:"main",fn:In,requiresIfExists:["offset"],data:{_skip:!1}};function Gt(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Qt(e){return[W,K,X,$].some(function(t){return e[t]>=0})}function Vn(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=Fe(t,{elementContext:"reference"}),u=Fe(t,{altBoundary:!0}),f=Gt(o,n),p=Gt(u,i,a),l=Qt(f),b=Qt(p);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:p,isReferenceHidden:l,hasPopperEscaped:b},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":b})}const Wn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Vn};function $n(e,t,r){var n=ne(e),i=[$,W].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],u=a[1];return o=o||0,u=(u||0)*i,[$,K].indexOf(n)>=0?{x:u,y:o}:{x:o,y:u}}function Un(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=wr.reduce(function(l,b){return l[b]=$n(b,t.rects,a),l},{}),u=o[t.placement],f=u.x,p=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=o}const Fn={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Un};function qn(e){var t=e.state,r=e.name;t.modifiersData[r]=Lr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const zn={name:"popperOffsets",enabled:!0,phase:"read",fn:qn,data:{}};function Yn(e){return e==="x"?"y":"x"}function Xn(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,u=o===void 0?!1:o,f=r.boundary,p=r.rootBoundary,l=r.altBoundary,b=r.padding,A=r.tether,h=A===void 0?!0:A,w=r.tetherOffset,g=w===void 0?0:w,y=Fe(t,{boundary:f,rootBoundary:p,padding:b,altBoundary:l}),T=ne(t.placement),D=Be(t.placement),L=!D,s=jt(T),E=Yn(s),v=t.modifiersData.popperOffsets,C=t.rects.reference,P=t.rects.popper,B=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,_=typeof B=="number"?{mainAxis:B,altAxis:B}:Object.assign({mainAxis:0,altAxis:0},B),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(v){if(a){var S,U=s==="y"?W:$,F=s==="y"?X:K,I=s==="y"?"height":"width",H=v[s],N=H+y[U],Z=H-y[F],ee=h?-P[I]/2:0,de=D===_e?C[I]:P[I],te=D===_e?-P[I]:-C[I],ve=t.elements.arrow,ae=h&&ve?Rt(ve):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Tr(),oe=J[U],Ee=J[F],se=Ve(0,C[I],ae[I]),Te=L?C[I]/2-ee-se-oe-_.mainAxis:de-se-oe-_.mainAxis,ce=L?-C[I]/2+ee+se+Ee+_.mainAxis:te+se+Ee+_.mainAxis,xe=t.elements.arrow&&Ge(t.elements.arrow),Ze=xe?s==="y"?xe.clientTop||0:xe.clientLeft||0:0,Pe=(S=R?.[s])!=null?S:0,et=H+Te-Pe-Ze,tt=H+ce-Pe,Re=Ve(h?vt(N,et):N,H,h?ye(Z,tt):Z);v[s]=Re,k[s]=Re-H}if(u){var je,rt=s==="x"?W:$,nt=s==="x"?X:K,ue=v[E],le=E==="y"?"height":"width",Ne=ue+y[rt],me=ue-y[nt],Ie=[W,$].indexOf(T)!==-1,it=(je=R?.[E])!=null?je:0,at=Ie?Ne:ue-C[le]-P[le]-it+_.altAxis,ot=Ie?ue+C[le]+P[le]-it-_.altAxis:me,st=h&&Ie?yn(at,ue,ot):Ve(h?at:Ne,ue,h?ot:me);v[E]=st,k[E]=st-ue}t.modifiersData[n]=k}}const Kn={name:"preventOverflow",enabled:!0,phase:"main",fn:Xn,requiresIfExists:["offset"]};function Jn(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Gn(e){return e===q(e)||!Y(e)?Nt(e):Jn(e)}function Qn(e){var t=e.getBoundingClientRect(),r=ke(t.width)/e.offsetWidth||1,n=ke(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Zn(e,t,r){r===void 0&&(r=!1);var n=Y(t),i=Y(t)&&Qn(t),a=pe(t),o=Me(e,i,r),u={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(n||!n&&!r)&&((ie(t)!=="body"||Ht(a))&&(u=Gn(t)),Y(t)?(f=Me(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):a&&(f.x=It(a))),{x:o.left+u.scrollLeft-f.x,y:o.top+u.scrollTop-f.y,width:o.width,height:o.height}}function ei(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(u){if(!r.has(u)){var f=t.get(u);f&&i(f)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function ti(e){var t=ei(e);return dn.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function ri(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function ni(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Zt={placement:"bottom",modifiers:[],strategy:"absolute"};function er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function ii(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?Zt:i;return function(u,f,p){p===void 0&&(p=a);var l={placement:"bottom",orderedModifiers:[],options:Object.assign({},Zt,a),modifiersData:{},elements:{reference:u,popper:f},attributes:{},styles:{}},b=[],A=!1,h={state:l,setOptions:function(T){var D=typeof T=="function"?T(l.options):T;g(),l.options=Object.assign({},a,l.options,D),l.scrollParents={reference:be(u)?We(u):u.contextElement?We(u.contextElement):[],popper:We(f)};var L=ti(ni([].concat(n,l.options.modifiers)));return l.orderedModifiers=L.filter(function(s){return s.enabled}),w(),h.update()},forceUpdate:function(){if(!A){var T=l.elements,D=T.reference,L=T.popper;if(er(D,L)){l.rects={reference:Zn(D,Ge(L),l.options.strategy==="fixed"),popper:Rt(L)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach(function(_){return l.modifiersData[_.name]=Object.assign({},_.data)});for(var s=0;s<l.orderedModifiers.length;s++){if(l.reset===!0){l.reset=!1,s=-1;continue}var E=l.orderedModifiers[s],v=E.fn,C=E.options,P=C===void 0?{}:C,B=E.name;typeof v=="function"&&(l=v({state:l,options:P,name:B,instance:h})||l)}}}},update:ri(function(){return new Promise(function(y){h.forceUpdate(),y(l)})}),destroy:function(){g(),A=!0}};if(!er(u,f))return h;h.setOptions(p).then(function(y){!A&&p.onFirstUpdate&&p.onFirstUpdate(y)});function w(){l.orderedModifiers.forEach(function(y){var T=y.name,D=y.options,L=D===void 0?{}:D,s=y.effect;if(typeof s=="function"){var E=s({state:l,name:T,instance:h,options:L}),v=function(){};b.push(E||v)}})}function g(){b.forEach(function(y){return y()}),b=[]}return h}}var ai=[Ln,zn,Dn,Or,Fn,Hn,Kn,An,Wn],oi=ii({defaultModifiers:ai}),si="tippy-box",Sr="tippy-content",ui="tippy-backdrop",_r="tippy-arrow",kr="tippy-svg-arrow",ge={passive:!0,capture:!0},Mr=function(){return document.body};function Ot(e,t,r){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(r)?r[t]:r)}return e}function Vt(e,t){var r={}.toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function Br(e,t){return typeof e=="function"?e.apply(void 0,t):e}function tr(e,t){if(t===0)return e;var r;return function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)}}function fi(e){return e.split(/\s+/).filter(Boolean)}function Le(e){return[].concat(e)}function rr(e,t){e.indexOf(t)===-1&&e.push(t)}function ci(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function li(e){return e.split("-")[0]}function mt(e){return[].slice.call(e)}function nr(e){return Object.keys(e).reduce(function(t,r){return e[r]!==void 0&&(t[r]=e[r]),t},{})}function $e(){return document.createElement("div")}function yt(e){return["Element","Fragment"].some(function(t){return Vt(e,t)})}function pi(e){return Vt(e,"NodeList")}function di(e){return Vt(e,"MouseEvent")}function vi(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function mi(e){return yt(e)?[e]:pi(e)?mt(e):Array.isArray(e)?e:mt(document.querySelectorAll(e))}function At(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function ir(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function hi(e){var t,r=Le(e),n=r[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function gi(e,t){var r=t.clientX,n=t.clientY;return e.every(function(i){var a=i.popperRect,o=i.popperState,u=i.props,f=u.interactiveBorder,p=li(o.placement),l=o.modifiersData.offset;if(!l)return!0;var b=p==="bottom"?l.top.y:0,A=p==="top"?l.bottom.y:0,h=p==="right"?l.left.x:0,w=p==="left"?l.right.x:0,g=a.top-n+b>f,y=n-a.bottom-A>f,T=a.left-r+h>f,D=r-a.right-w>f;return g||y||T||D})}function Et(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[n](i,r)})}function ar(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var re={isTouch:!1},or=0;function yi(){re.isTouch||(re.isTouch=!0,window.performance&&document.addEventListener("mousemove",Pr))}function Pr(){var e=performance.now();e-or<20&&(re.isTouch=!1,document.removeEventListener("mousemove",Pr)),or=e}function bi(){var e=document.activeElement;if(vi(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function wi(){document.addEventListener("touchstart",yi,ge),window.addEventListener("blur",bi)}var Oi=typeof window<"u"&&typeof document<"u",Ai=Oi?!!window.msCrypto:!1,Ei={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Ti={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},G=Object.assign({appendTo:Mr,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Ei,Ti),xi=Object.keys(G),Di=function(t){var r=Object.keys(t);r.forEach(function(n){G[n]=t[n]})};function Rr(e){var t=e.plugins||[],r=t.reduce(function(n,i){var a=i.name,o=i.defaultValue;if(a){var u;n[a]=e[a]!==void 0?e[a]:(u=G[a])!=null?u:o}return n},{});return Object.assign({},e,r)}function Ci(e,t){var r=t?Object.keys(Rr(Object.assign({},G,{plugins:t}))):xi,n=r.reduce(function(i,a){var o=(e.getAttribute("data-tippy-"+a)||"").trim();if(!o)return i;if(a==="content")i[a]=o;else try{i[a]=JSON.parse(o)}catch{i[a]=o}return i},{});return n}function sr(e,t){var r=Object.assign({},t,{content:Br(t.content,[e])},t.ignoreAttributes?{}:Ci(e,t.plugins));return r.aria=Object.assign({},G.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content},r}var Li=function(){return"innerHTML"};function Lt(e,t){e[Li()]=t}function ur(e){var t=$e();return e===!0?t.className=_r:(t.className=kr,yt(e)?t.appendChild(e):Lt(t,e)),t}function fr(e,t){yt(t.content)?(Lt(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Lt(e,t.content):e.textContent=t.content)}function St(e){var t=e.firstElementChild,r=mt(t.children);return{box:t,content:r.find(function(n){return n.classList.contains(Sr)}),arrow:r.find(function(n){return n.classList.contains(_r)||n.classList.contains(kr)}),backdrop:r.find(function(n){return n.classList.contains(ui)})}}function jr(e){var t=$e(),r=$e();r.className=si,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=$e();n.className=Sr,n.setAttribute("data-state","hidden"),fr(n,e.props),t.appendChild(r),r.appendChild(n),i(e.props,e.props);function i(a,o){var u=St(t),f=u.box,p=u.content,l=u.arrow;o.theme?f.setAttribute("data-theme",o.theme):f.removeAttribute("data-theme"),typeof o.animation=="string"?f.setAttribute("data-animation",o.animation):f.removeAttribute("data-animation"),o.inertia?f.setAttribute("data-inertia",""):f.removeAttribute("data-inertia"),f.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?f.setAttribute("role",o.role):f.removeAttribute("role"),(a.content!==o.content||a.allowHTML!==o.allowHTML)&&fr(p,e.props),o.arrow?l?a.arrow!==o.arrow&&(f.removeChild(l),f.appendChild(ur(o.arrow))):f.appendChild(ur(o.arrow)):l&&f.removeChild(l)}return{popper:t,onUpdate:i}}jr.$$tippy=!0;var Si=1,lt=[],Tt=[];function _i(e,t){var r=sr(e,Object.assign({},G,Rr(nr(t)))),n,i,a,o=!1,u=!1,f=!1,p=!1,l,b,A,h=[],w=tr(et,r.interactiveDebounce),g,y=Si++,T=null,D=ci(r.plugins),L={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},s={id:y,reference:e,popper:$e(),popperInstance:T,props:r,state:L,plugins:D,clearDelayTimeouts:at,setProps:ot,setContent:st,show:Nr,hide:Ir,hideWithInteractivity:Hr,enable:Ie,disable:it,unmount:Vr,destroy:Wr};if(!r.render)return s;var E=r.render(s),v=E.popper,C=E.onUpdate;v.setAttribute("data-tippy-root",""),v.id="tippy-"+s.id,s.popper=v,e._tippy=s,v._tippy=s;var P=D.map(function(c){return c.fn(s)}),B=e.hasAttribute("aria-expanded");return xe(),ee(),H(),N("onCreate",[s]),r.showOnCreate&&Ne(),v.addEventListener("mouseenter",function(){s.props.interactive&&s.state.isVisible&&s.clearDelayTimeouts()}),v.addEventListener("mouseleave",function(){s.props.interactive&&s.props.trigger.indexOf("mouseenter")>=0&&U().addEventListener("mousemove",w)}),s;function _(){var c=s.props.touch;return Array.isArray(c)?c:[c,0]}function R(){return _()[0]==="hold"}function k(){var c;return!!((c=s.props.render)!=null&&c.$$tippy)}function S(){return g||e}function U(){var c=S().parentNode;return c?hi(c):document}function F(){return St(v)}function I(c){return s.state.isMounted&&!s.state.isVisible||re.isTouch||l&&l.type==="focus"?0:Ot(s.props.delay,c?0:1,G.delay)}function H(c){c===void 0&&(c=!1),v.style.pointerEvents=s.props.interactive&&!c?"":"none",v.style.zIndex=""+s.props.zIndex}function N(c,d,m){if(m===void 0&&(m=!0),P.forEach(function(O){O[c]&&O[c].apply(O,d)}),m){var x;(x=s.props)[c].apply(x,d)}}function Z(){var c=s.props.aria;if(c.content){var d="aria-"+c.content,m=v.id,x=Le(s.props.triggerTarget||e);x.forEach(function(O){var V=O.getAttribute(d);if(s.state.isVisible)O.setAttribute(d,V?V+" "+m:m);else{var z=V&&V.replace(m,"").trim();z?O.setAttribute(d,z):O.removeAttribute(d)}})}}function ee(){if(!(B||!s.props.aria.expanded)){var c=Le(s.props.triggerTarget||e);c.forEach(function(d){s.props.interactive?d.setAttribute("aria-expanded",s.state.isVisible&&d===S()?"true":"false"):d.removeAttribute("aria-expanded")})}}function de(){U().removeEventListener("mousemove",w),lt=lt.filter(function(c){return c!==w})}function te(c){if(!(re.isTouch&&(f||c.type==="mousedown"))){var d=c.composedPath&&c.composedPath()[0]||c.target;if(!(s.props.interactive&&ar(v,d))){if(Le(s.props.triggerTarget||e).some(function(m){return ar(m,d)})){if(re.isTouch||s.state.isVisible&&s.props.trigger.indexOf("click")>=0)return}else N("onClickOutside",[s,c]);s.props.hideOnClick===!0&&(s.clearDelayTimeouts(),s.hide(),u=!0,setTimeout(function(){u=!1}),s.state.isMounted||oe())}}}function ve(){f=!0}function ae(){f=!1}function J(){var c=U();c.addEventListener("mousedown",te,!0),c.addEventListener("touchend",te,ge),c.addEventListener("touchstart",ae,ge),c.addEventListener("touchmove",ve,ge)}function oe(){var c=U();c.removeEventListener("mousedown",te,!0),c.removeEventListener("touchend",te,ge),c.removeEventListener("touchstart",ae,ge),c.removeEventListener("touchmove",ve,ge)}function Ee(c,d){Te(c,function(){!s.state.isVisible&&v.parentNode&&v.parentNode.contains(v)&&d()})}function se(c,d){Te(c,d)}function Te(c,d){var m=F().box;function x(O){O.target===m&&(Et(m,"remove",x),d())}if(c===0)return d();Et(m,"remove",b),Et(m,"add",x),b=x}function ce(c,d,m){m===void 0&&(m=!1);var x=Le(s.props.triggerTarget||e);x.forEach(function(O){O.addEventListener(c,d,m),h.push({node:O,eventType:c,handler:d,options:m})})}function xe(){R()&&(ce("touchstart",Pe,{passive:!0}),ce("touchend",tt,{passive:!0})),fi(s.props.trigger).forEach(function(c){if(c!=="manual")switch(ce(c,Pe),c){case"mouseenter":ce("mouseleave",tt);break;case"focus":ce(Ai?"focusout":"blur",Re);break;case"focusin":ce("focusout",Re);break}})}function Ze(){h.forEach(function(c){var d=c.node,m=c.eventType,x=c.handler,O=c.options;d.removeEventListener(m,x,O)}),h=[]}function Pe(c){var d,m=!1;if(!(!s.state.isEnabled||je(c)||u)){var x=((d=l)==null?void 0:d.type)==="focus";l=c,g=c.currentTarget,ee(),!s.state.isVisible&&di(c)&&lt.forEach(function(O){return O(c)}),c.type==="click"&&(s.props.trigger.indexOf("mouseenter")<0||o)&&s.props.hideOnClick!==!1&&s.state.isVisible?m=!0:Ne(c),c.type==="click"&&(o=!m),m&&!x&&me(c)}}function et(c){var d=c.target,m=S().contains(d)||v.contains(d);if(!(c.type==="mousemove"&&m)){var x=le().concat(v).map(function(O){var V,z=O._tippy,De=(V=z.popperInstance)==null?void 0:V.state;return De?{popperRect:O.getBoundingClientRect(),popperState:De,props:r}:null}).filter(Boolean);gi(x,c)&&(de(),me(c))}}function tt(c){var d=je(c)||s.props.trigger.indexOf("click")>=0&&o;if(!d){if(s.props.interactive){s.hideWithInteractivity(c);return}me(c)}}function Re(c){s.props.trigger.indexOf("focusin")<0&&c.target!==S()||s.props.interactive&&c.relatedTarget&&v.contains(c.relatedTarget)||me(c)}function je(c){return re.isTouch?R()!==c.type.indexOf("touch")>=0:!1}function rt(){nt();var c=s.props,d=c.popperOptions,m=c.placement,x=c.offset,O=c.getReferenceClientRect,V=c.moveTransition,z=k()?St(v).arrow:null,De=O?{getBoundingClientRect:O,contextElement:O.contextElement||S()}:e,Ut={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ut){var Ce=ut.state;if(k()){var $r=F(),wt=$r.box;["placement","reference-hidden","escaped"].forEach(function(ft){ft==="placement"?wt.setAttribute("data-placement",Ce.placement):Ce.attributes.popper["data-popper-"+ft]?wt.setAttribute("data-"+ft,""):wt.removeAttribute("data-"+ft)}),Ce.attributes.popper={}}}},he=[{name:"offset",options:{offset:x}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!V}},Ut];k()&&z&&he.push({name:"arrow",options:{element:z,padding:3}}),he.push.apply(he,d?.modifiers||[]),s.popperInstance=oi(De,v,Object.assign({},d,{placement:m,onFirstUpdate:A,modifiers:he}))}function nt(){s.popperInstance&&(s.popperInstance.destroy(),s.popperInstance=null)}function ue(){var c=s.props.appendTo,d,m=S();s.props.interactive&&c===Mr||c==="parent"?d=m.parentNode:d=Br(c,[m]),d.contains(v)||d.appendChild(v),s.state.isMounted=!0,rt()}function le(){return mt(v.querySelectorAll("[data-tippy-root]"))}function Ne(c){s.clearDelayTimeouts(),c&&N("onTrigger",[s,c]),J();var d=I(!0),m=_(),x=m[0],O=m[1];re.isTouch&&x==="hold"&&O&&(d=O),d?n=setTimeout(function(){s.show()},d):s.show()}function me(c){if(s.clearDelayTimeouts(),N("onUntrigger",[s,c]),!s.state.isVisible){oe();return}if(!(s.props.trigger.indexOf("mouseenter")>=0&&s.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(c.type)>=0&&o)){var d=I(!1);d?i=setTimeout(function(){s.state.isVisible&&s.hide()},d):a=requestAnimationFrame(function(){s.hide()})}}function Ie(){s.state.isEnabled=!0}function it(){s.hide(),s.state.isEnabled=!1}function at(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(a)}function ot(c){if(!s.state.isDestroyed){N("onBeforeUpdate",[s,c]),Ze();var d=s.props,m=sr(e,Object.assign({},d,nr(c),{ignoreAttributes:!0}));s.props=m,xe(),d.interactiveDebounce!==m.interactiveDebounce&&(de(),w=tr(et,m.interactiveDebounce)),d.triggerTarget&&!m.triggerTarget?Le(d.triggerTarget).forEach(function(x){x.removeAttribute("aria-expanded")}):m.triggerTarget&&e.removeAttribute("aria-expanded"),ee(),H(),C&&C(d,m),s.popperInstance&&(rt(),le().forEach(function(x){requestAnimationFrame(x._tippy.popperInstance.forceUpdate)})),N("onAfterUpdate",[s,c])}}function st(c){s.setProps({content:c})}function Nr(){var c=s.state.isVisible,d=s.state.isDestroyed,m=!s.state.isEnabled,x=re.isTouch&&!s.props.touch,O=Ot(s.props.duration,0,G.duration);if(!(c||d||m||x)&&!S().hasAttribute("disabled")&&(N("onShow",[s],!1),s.props.onShow(s)!==!1)){if(s.state.isVisible=!0,k()&&(v.style.visibility="visible"),H(),J(),s.state.isMounted||(v.style.transition="none"),k()){var V=F(),z=V.box,De=V.content;At([z,De],0)}A=function(){var he;if(!(!s.state.isVisible||p)){if(p=!0,v.offsetHeight,v.style.transition=s.props.moveTransition,k()&&s.props.animation){var bt=F(),ut=bt.box,Ce=bt.content;At([ut,Ce],O),ir([ut,Ce],"visible")}Z(),ee(),rr(Tt,s),(he=s.popperInstance)==null||he.forceUpdate(),N("onMount",[s]),s.props.animation&&k()&&se(O,function(){s.state.isShown=!0,N("onShown",[s])})}},ue()}}function Ir(){var c=!s.state.isVisible,d=s.state.isDestroyed,m=!s.state.isEnabled,x=Ot(s.props.duration,1,G.duration);if(!(c||d||m)&&(N("onHide",[s],!1),s.props.onHide(s)!==!1)){if(s.state.isVisible=!1,s.state.isShown=!1,p=!1,o=!1,k()&&(v.style.visibility="hidden"),de(),oe(),H(!0),k()){var O=F(),V=O.box,z=O.content;s.props.animation&&(At([V,z],x),ir([V,z],"hidden"))}Z(),ee(),s.props.animation?k()&&Ee(x,s.unmount):s.unmount()}}function Hr(c){U().addEventListener("mousemove",w),rr(lt,w),w(c)}function Vr(){s.state.isVisible&&s.hide(),s.state.isMounted&&(nt(),le().forEach(function(c){c._tippy.unmount()}),v.parentNode&&v.parentNode.removeChild(v),Tt=Tt.filter(function(c){return c!==s}),s.state.isMounted=!1,N("onHidden",[s]))}function Wr(){s.state.isDestroyed||(s.clearDelayTimeouts(),s.unmount(),Ze(),delete e._tippy,s.state.isDestroyed=!0,N("onDestroy",[s]))}}function Qe(e,t){t===void 0&&(t={});var r=G.plugins.concat(t.plugins||[]);wi();var n=Object.assign({},t,{plugins:r}),i=mi(e),a=i.reduce(function(o,u){var f=u&&_i(u,n);return f&&o.push(f),o},[]);return yt(e)?a[0]:a}Qe.defaultProps=G;Qe.setDefaultProps=Di;Qe.currentInput=re;Object.assign({},Or,{effect:function(t){var r=t.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});Qe.setDefaultProps({render:jr});var ki=(e=>(e[e.Layout=0]="Layout",e[e.Chord=1]="Chord",e[e.Setting=2]="Setting",e))(ki||{});const Mi=Ur("changes",[]),Wt=ht(Mi,e=>{const t={layout:[new Map,new Map,new Map],chords:new Map,settings:new Map};for(const r of e)switch(r.type){case 0:t.layout[r.layer]?.set(r.id,r.action);break;case 1:t.chords.set(JSON.stringify(r.id),{actions:r.actions,phrase:r.phrase,deleted:r.deleted??!1});break;case 2:t.settings.set(r.id,r.setting);break}return t}),Ji=ht([Wt,Fr],([e,t])=>t.map((r,n)=>({value:e.settings.get(n)??r,isApplied:!e.settings.has(n)}))),Gi=ht([Wt,qr],([e,t])=>t.map((r,n)=>r.map((i,a)=>({action:e.layout[n]?.get(a)??i,isApplied:!e.layout[n]?.has(a)})))),Qi=ht([Wt,zr],([e,t])=>{const r=new Set(e.chords.keys()),n=t.map(i=>{const a=JSON.stringify(i.actions);if(e.chords.has(a)){r.delete(a);const o=e.chords.get(a);return{id:i.actions,sortBy:i.phrase.map(u=>xt.get(u)?.id??u).join(),actions:o.actions,phrase:o.phrase,actionsChanged:a!==JSON.stringify(o.actions),phraseChanged:JSON.stringify(i.phrase)!==JSON.stringify(o.phrase),isApplied:!1,deleted:o.deleted}}else return{id:i.actions,sortBy:i.phrase.map(o=>xt.get(o)?.id??o).join(),actions:i.actions,phrase:i.phrase,phraseChanged:!1,actionsChanged:!1,isApplied:!0,deleted:!1}});for(const i of r){const a=e.chords.get(i);n.push({sortBy:"",isApplied:!1,actionsChanged:!0,phraseChanged:!1,deleted:a.deleted,id:JSON.parse(i),phrase:a.phrase,actions:a.actions})}return n.sort(({sortBy:i},{sortBy:a})=>i.localeCompare(a))});function cr(e,t,r){const n=e.slice();return n[2]=t[r],n}function lr(e){let t,r;return{c(){t=we("p"),r=new Jr(!1),this.h()},l(n){t=Oe(n,"P",{class:!0});var i=Ae(t);r=Gr(i,!1),i.forEach(j),this.h()},h(){r.a=null,qe(t,"class","svelte-18gg13o")},m(n,i){Q(n,t,i),r.m(e[0],t)},p(n,i){i&1&&r.p(n[0])},d(n){n&&j(t)}}}function pr(e){let t,r=qt(e[1].split("+")),n=[];for(let i=0;i<r.length;i+=1)n[i]=dr(cr(e,r,i));return{c(){t=we("kbd");for(let i=0;i<n.length;i+=1)n[i].c()},l(i){t=Oe(i,"KBD",{});var a=Ae(t);for(let o=0;o<n.length;o+=1)n[o].l(a);a.forEach(j)},m(i,a){Q(i,t,a);for(let o=0;o<n.length;o+=1)n[o]&&n[o].m(t,null)},p(i,a){if(a&2){r=qt(i[1].split("+"));let o;for(o=0;o<r.length;o+=1){const u=cr(i,r,o);n[o]?n[o].p(u,a):(n[o]=dr(u),n[o].c(),n[o].m(t,null))}for(;o<n.length;o+=1)n[o].d(1);n.length=r.length}},d(i){i&&j(t),Qr(n,i)}}}function dr(e){let t,r=e[2]+"",n;return{c(){t=we("kbd"),n=ze(r)},l(i){t=Oe(i,"KBD",{});var a=Ae(t);n=Ye(a,r),a.forEach(j)},m(i,a){Q(i,t,a),Xe(t,n)},p(i,a){a&2&&r!==(r=i[2]+"")&&Ke(n,r)},d(i){i&&j(t)}}}function Bi(e){let t,r,n=e[0]&&lr(e),i=e[1]&&pr(e);return{c(){n&&n.c(),t=Xr(),i&&i.c(),r=Se()},l(a){n&&n.l(a),t=Kr(a),i&&i.l(a),r=Se()},m(a,o){n&&n.m(a,o),Q(a,t,o),i&&i.m(a,o),Q(a,r,o)},p(a,[o]){a[0]?n?n.p(a,o):(n=lr(a),n.c(),n.m(t.parentNode,t)):n&&(n.d(1),n=null),a[1]?i?i.p(a,o):(i=pr(a),i.c(),i.m(r.parentNode,r)):i&&(i.d(1),i=null)},i:dt,o:dt,d(a){a&&(j(t),j(r)),n&&n.d(a),i&&i.d(a)}}}function Pi(e,t,r){let{title:n}=t,{shortcut:i}=t;return e.$$set=a=>{"title"in a&&r(0,n=a.title),"shortcut"in a&&r(1,i=a.shortcut)},[n,i]}class Ri extends gr{constructor(t){super(),yr(this,t,Pi,Bi,hr,{title:0,shortcut:1})}}const vr=new Map,$t=(e,{title:t,shortcut:r})=>{let n;const i=Qe(e,{arrow:!1,theme:"tooltip",animation:"fade",onShow(a){n??=new Ri({target:a.popper.querySelector(".tippy-content"),props:{title:t,shortcut:r}})},onHidden(){n?.$destroy(),n=void 0}});return r&&e instanceof HTMLElement&&vr.set(r,e),{destroy(){i.destroy(),r&&e instanceof HTMLElement&&vr.delete(r)}}},_t=Yr(new Map);async function mr(){const e=await navigator.keyboard.getLayoutMap(),t=Zr(_t);(e.size!==t.size||[...e.keys()].some(r=>e.get(r)!==t.get(r)))&&_t.set(e)}function Zi(){if("keyboard"in navigator){mr();const e=setInterval(mr,5e3);return()=>clearInterval(e)}else return console.warn("Keyboard API not supported"),()=>{}}function ji(e){let t;function r(a,o){return!a[1].icon&&a[1].id?.length===1?Vi:Hi}let n=r(e),i=n(e);return{c(){i.c(),t=Se()},l(a){i.l(a),t=Se()},m(a,o){i.m(a,o),Q(a,t,o)},p(a,o){n===(n=r(a))&&i?i.p(a,o):(i.d(1),i=n(a),i&&(i.c(),i.m(t.parentNode,t)))},d(a){a&&j(t),i.d(a)}}}function Ni(e){let t,r=(e[1].icon??e[1].display??e[1].id??`0x${e[1].code.toString(16)}`)+"",n,i,a,o;return{c(){t=we("kbd"),n=ze(r),this.h()},l(u){t=Oe(u,"KBD",{class:!0});var f=Ae(t);n=Ye(f,r),f.forEach(j),this.h()},h(){qe(t,"class","svelte-18hxb2i"),M(t,"icon",!!e[1].icon),M(t,"left",e[1].variant==="left"),M(t,"right",e[1].variant==="right")},m(u,f){Q(u,t,f),Xe(t,n),a||(o=kt(i=$t.call(null,t,{title:e[2]})),a=!0)},p(u,f){f&2&&r!==(r=(u[1].icon??u[1].display??u[1].id??`0x${u[1].code.toString(16)}`)+"")&&Ke(n,r),i&&Mt(i.update)&&f&4&&i.update.call(null,{title:u[2]}),f&2&&M(t,"icon",!!u[1].icon),f&2&&M(t,"left",u[1].variant==="left"),f&2&&M(t,"right",u[1].variant==="right")},d(u){u&&j(t),a=!1,o()}}}function Ii(e){let t,r,n,i,a;return{c(){t=we("span"),r=ze(e[3]),this.h()},l(o){t=Oe(o,"SPAN",{class:!0});var u=Ae(t);r=Ye(u,e[3]),u.forEach(j),this.h()},h(){qe(t,"class","dynamic svelte-18hxb2i"),M(t,"left",e[1].variant==="left"),M(t,"right",e[1].variant==="right"),M(t,"inline",e[0]==="inline-keys")},m(o,u){Q(o,t,u),Xe(t,r),i||(a=kt(n=$t.call(null,t,{title:e[4].actionSearch.LIVE_LAYOUT_INFO()})),i=!0)},p(o,u){u&8&&Ke(r,o[3]),n&&Mt(n.update)&&u&16&&n.update.call(null,{title:o[4].actionSearch.LIVE_LAYOUT_INFO()}),u&2&&M(t,"left",o[1].variant==="left"),u&2&&M(t,"right",o[1].variant==="right"),u&1&&M(t,"inline",o[0]==="inline-keys")},d(o){o&&j(t),i=!1,a()}}}function Hi(e){let t,r=(e[1].icon??e[1].display??e[1].id??`0x${e[1].code.toString(16)}`)+"",n,i,a,o;return{c(){t=we("kbd"),n=ze(r),this.h()},l(u){t=Oe(u,"KBD",{class:!0});var f=Ae(t);n=Ye(f,r),f.forEach(j),this.h()},h(){qe(t,"class","inline-kbd svelte-18hxb2i"),M(t,"left",e[1].variant==="left"),M(t,"right",e[1].variant==="right"),M(t,"icon",!!e[1].icon)},m(u,f){Q(u,t,f),Xe(t,n),a||(o=kt(i=$t.call(null,t,{title:e[2]})),a=!0)},p(u,f){f&2&&r!==(r=(u[1].icon??u[1].display??u[1].id??`0x${u[1].code.toString(16)}`)+"")&&Ke(n,r),i&&Mt(i.update)&&f&4&&i.update.call(null,{title:u[2]}),f&2&&M(t,"left",u[1].variant==="left"),f&2&&M(t,"right",u[1].variant==="right"),f&2&&M(t,"icon",!!u[1].icon)},d(u){u&&j(t),a=!1,o()}}}function Vi(e){let t,r=e[1].id+"",n;return{c(){t=we("span"),n=ze(r),this.h()},l(i){t=Oe(i,"SPAN",{class:!0});var a=Ae(t);n=Ye(a,r),a.forEach(j),this.h()},h(){qe(t,"class","svelte-18hxb2i"),M(t,"left",e[1].variant==="left"),M(t,"right",e[1].variant==="right")},m(i,a){Q(i,t,a),Xe(t,n)},p(i,a){a&2&&r!==(r=i[1].id+"")&&Ke(n,r),a&2&&M(t,"left",i[1].variant==="left"),a&2&&M(t,"right",i[1].variant==="right")},d(i){i&&j(t)}}}function Wi(e){let t;function r(a,o){if(a[3])return Ii;if(a[0]==="keys")return Ni;if(a[0]==="inline-keys")return ji}let n=r(e),i=n&&n(e);return{c(){i&&i.c(),t=Se()},l(a){i&&i.l(a),t=Se()},m(a,o){i&&i.m(a,o),Q(a,t,o)},p(a,[o]){n===(n=r(a))&&i?i.p(a,o):(i&&i.d(1),i=n&&n(a),i&&(i.c(),i.m(t.parentNode,t)))},i:dt,o:dt,d(a){a&&j(t),i&&i.d(a)}}}function $i(e,t,r){let n,i,a,o,u;Ft(e,_t,l=>r(6,o=l)),Ft(e,en,l=>r(4,u=l));let{action:f}=t,{display:p="inline-keys"}=t;return e.$$set=l=>{"action"in l&&r(5,f=l.action),"display"in l&&r(0,p=l.display)},e.$$.update=()=>{e.$$.dirty&32&&r(1,n=typeof f=="number"?xt.get(f)??{code:f}:f),e.$$.dirty&66&&r(3,i=n.keyCode&&o.get(n.keyCode)),e.$$.dirty&2&&r(2,a=`&lt;${n.id??`0x${n.code.toString(16)}`}&gt; `+(n.title??"")+(n.variant==="left"?" (left)":n.variant==="right"?" (right)":""))},[p,n,a,i,u,f,o]}class ea extends gr{constructor(t){super(),yr(this,t,$i,Wi,hr,{action:5,display:0})}}export{ea as A,ki as C,$t as a,Mi as b,Qi as c,Wt as d,vr as h,Gi as l,_t as o,Zi as r,Ji as s,Qe as t};
//# sourceMappingURL=Action.tNSJ0eLt.js.map