vanilla-breeze 0.1.2 → 0.1.3
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/dist/cdn/components/accordion-wc.js +1 -1
- package/dist/cdn/components/analytics-panel.js +1 -1
- package/dist/cdn/components/audio-player.js +1 -1
- package/dist/cdn/components/audio-visualizer.js +2 -2
- package/dist/cdn/components/author-index.js +1 -1
- package/dist/cdn/components/brand-mark.js +1 -1
- package/dist/cdn/components/calendar-wc.js +2 -2
- package/dist/cdn/components/card-list.js +1 -1
- package/dist/cdn/components/carousel-wc.js +1 -1
- package/dist/cdn/components/change-set.js +1 -1
- package/dist/cdn/components/chart-wc.js +11 -11
- package/dist/cdn/components/chat-input.js +1 -1
- package/dist/cdn/components/chat-window.js +1 -1
- package/dist/cdn/components/color-palette.js +4 -4
- package/dist/cdn/components/color-picker.js +1 -1
- package/dist/cdn/components/combo-box.js +1 -1
- package/dist/cdn/components/command-palette.js +1 -1
- package/dist/cdn/components/comment-wc.js +1 -1
- package/dist/cdn/components/compare-surface.js +1 -1
- package/dist/cdn/components/component-sampler.js +4 -4
- package/dist/cdn/components/consent-banner.js +1 -1
- package/dist/cdn/components/content-lens.js +1 -1
- package/dist/cdn/components/content-swap.js +1 -1
- package/dist/cdn/components/context-menu.js +1 -1
- package/dist/cdn/components/data-table.js +1 -1
- package/dist/cdn/components/date-picker.js +1 -1
- package/dist/cdn/components/day-view.js +1 -1
- package/dist/cdn/components/drag-surface.js +1 -1
- package/dist/cdn/components/drop-down.js +1 -1
- package/dist/cdn/components/emoji-picker.js +1 -1
- package/dist/cdn/components/flow-diagram.js +1 -1
- package/dist/cdn/components/font-pairer.js +1 -1
- package/dist/cdn/components/foot-notes.js +1 -1
- package/dist/cdn/components/form-field.js +1 -1
- package/dist/cdn/components/gantt-chart.js +1 -1
- package/dist/cdn/components/geo-map.js +3 -3
- package/dist/cdn/components/glossary-index.js +1 -1
- package/dist/cdn/components/glossary-wc.js +1 -1
- package/dist/cdn/components/gradient-builder.js +1 -1
- package/dist/cdn/components/heading-links.js +1 -1
- package/dist/cdn/components/highlight-wc.js +2 -2
- package/dist/cdn/components/image-gallery.js +1 -1
- package/dist/cdn/components/image-map.js +1 -1
- package/dist/cdn/components/impact-effort.js +1 -1
- package/dist/cdn/components/include-file.js +1 -1
- package/dist/cdn/components/kanban-board.js +1 -1
- package/dist/cdn/components/manifest.json +95 -95
- package/dist/cdn/components/markdown-editor.js +1 -1
- package/dist/cdn/components/markdown-viewer.js +1 -1
- package/dist/cdn/components/motion-specimen.js +3 -3
- package/dist/cdn/components/note-wc.js +1 -1
- package/dist/cdn/components/notification-wc.js +4 -4
- package/dist/cdn/components/page-info.js +20 -20
- package/dist/cdn/components/page-stats.js +1 -1
- package/dist/cdn/components/page-toc.js +1 -1
- package/dist/cdn/components/page-tools.js +1 -1
- package/dist/cdn/components/page-tour.js +2 -2
- package/dist/cdn/components/palette-generator.js +1 -1
- package/dist/cdn/components/popularity-index.js +1 -1
- package/dist/cdn/components/print-page.js +1 -1
- package/dist/cdn/components/qr-code.js +1 -1
- package/dist/cdn/components/reader-view.js +2 -2
- package/dist/cdn/components/recently-visited.js +26 -2
- package/dist/cdn/components/selection-menu.js +1 -1
- package/dist/cdn/components/semantic-palette.js +1 -1
- package/dist/cdn/components/settings-panel.js +2 -2
- package/dist/cdn/components/share-wc.js +1 -1
- package/dist/cdn/components/short-cuts.js +1 -1
- package/dist/cdn/components/site-index.js +1 -1
- package/dist/cdn/components/site-map-wc.js +1 -1
- package/dist/cdn/components/site-map.js +1 -1
- package/dist/cdn/components/site-search.js +3 -3
- package/dist/cdn/components/slide-accept.js +1 -1
- package/dist/cdn/components/social-embed.js +1 -1
- package/dist/cdn/components/spacing-specimen.js +2 -2
- package/dist/cdn/components/split-surface.js +1 -1
- package/dist/cdn/components/star-rating.js +1 -1
- package/dist/cdn/components/story-map.js +1 -1
- package/dist/cdn/components/tab-set.js +1 -1
- package/dist/cdn/components/text-reader.js +2 -2
- package/dist/cdn/components/theme-export.js +1 -1
- package/dist/cdn/components/theme-picker.js +3 -3
- package/dist/cdn/components/time-index.js +1 -1
- package/dist/cdn/components/time-picker.js +1 -1
- package/dist/cdn/components/toast-msg.js +1 -1
- package/dist/cdn/components/token-specimen.js +6 -6
- package/dist/cdn/components/tool-tip.js +1 -1
- package/dist/cdn/components/topic-map.js +3 -2
- package/dist/cdn/components/trust-filter.js +3 -3
- package/dist/cdn/components/type-specimen.js +1 -1
- package/dist/cdn/components/user-story.js +8 -8
- package/dist/cdn/components/video-player.js +4 -4
- package/dist/cdn/components/watch-wc.js +2 -2
- package/dist/cdn/components/week-view.js +1 -1
- package/dist/cdn/components/work-item.js +14 -14
- package/dist/cdn/components/youtube-player.js +1 -1
- package/dist/cdn/packs/design-system.full.js +15 -15
- package/dist/cdn/packs/effects.full.js +1 -1
- package/dist/cdn/packs/manifest.json +5 -5
- package/dist/cdn/packs/ui.full.css +1 -1
- package/dist/cdn/packs/ui.full.js +5 -5
- package/dist/cdn/packs/ux-planning.full.js +119 -119
- package/dist/cdn/vanilla-breeze-charts.css +1 -1
- package/dist/cdn/vanilla-breeze-charts.js +11 -11
- package/dist/cdn/vanilla-breeze-core.css +1 -1
- package/dist/cdn/vanilla-breeze-core.js +21 -21
- package/dist/cdn/vanilla-breeze-extras.js +3 -3
- package/dist/cdn/vanilla-breeze.css +1 -1
- package/dist/cdn/vanilla-breeze.js +210 -185
- package/package.json +5 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ls=Object.defineProperty;var Bt=(r,t)=>()=>(r&&(t=r(r=0)),t);var gi=(r,t)=>{for(var e in t)Ls(r,e,{get:t[e],enumerable:!0})};function wi(r,t,e){let i=Math.pow(2,e),s=r*Math.PI/180,n=(t+180)/360*i,o=(1-Math.log(Math.tan(s)+1/Math.cos(s))/Math.PI)/2*i,a=Math.floor(n),l=Math.floor(o),c=Math.round((n-a)*256),h=Math.round((o-l)*256);return{tileX:a,tileY:l,pixelX:c,pixelY:h}}function ki(r,t,e){let i=256*Math.pow(2,e),s=r/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:s}}function mt(r,t,e,i,s){if(s)return s.replace("{z}",String(t)).replace("{x}",String(e)).replace("{y}",String(i));switch(r){case"carto-light":return`https://basemaps.cartocdn.com/light_all/${t}/${e}/${i}.png`;case"carto-dark":return`https://basemaps.cartocdn.com/dark_all/${t}/${e}/${i}.png`;default:return`https://tile.openstreetmap.org/${t}/${e}/${i}.png`}}var Ht=Bt(()=>{});var xi={};gi(xi,{MapInteraction:()=>Ut});var Ut,Ai=Bt(()=>{Ht();Ut=class{#t;#e;#i;#n;#r;#s;#a=0;#o=0;#c=15;#l=1;#h=19;#f=0;#d=0;#u=new Map;#m=null;#b=0;#v=0;#p=!1;#g=0;#y=0;constructor({shadow:t,host:e,lat:i,lng:s,zoom:n,provider:o,tileUrl:a,onDeactivate:l}){this.#t=t,this.#e=e,this.#n=o,this.#r=a||"",this.#s=l,this.#c=n,this.#i=t.querySelector('[part="tiles"]'),this.#m=t.querySelector('[part="marker"]');let c=256*Math.pow(2,n),h=i*Math.PI/180;this.#a=(s+180)/360*c,this.#o=(1-Math.log(Math.tan(h)+1/Math.cos(h))/Math.PI)/2*c,this.#b=this.#a,this.#v=this.#o,this.#f=this.#e.offsetWidth||400,this.#d=this.#e.offsetHeight||300,this.#i.innerHTML="",this.#i.style.transform="",this.#m&&(this.#m.style.position="absolute",this.#m.style.top="",this.#m.style.left="",this.#i.appendChild(this.#m)),this.#w(),this.#$()}#w(){this.#i.addEventListener("pointerdown",this.#k),this.#i.addEventListener("wheel",this.#A,{passive:!1}),this.#e.addEventListener("keydown",this.#T)}#k=t=>{t.button===0&&(t.preventDefault(),this.#p=!0,this.#g=t.clientX,this.#y=t.clientY,this.#i.setPointerCapture(t.pointerId),this.#i.setAttribute("data-dragging",""),this.#i.addEventListener("pointermove",this.#C),this.#i.addEventListener("pointerup",this.#x))};#C=t=>{if(!this.#p)return;let e=t.clientX-this.#g,i=t.clientY-this.#y;this.#g=t.clientX,this.#y=t.clientY,this.#a-=e,this.#o-=i,this.#S(),this.#$()};#x=t=>{this.#p=!1,this.#i.releasePointerCapture(t.pointerId),this.#i.removeAttribute("data-dragging"),this.#i.removeEventListener("pointermove",this.#C),this.#i.removeEventListener("pointerup",this.#x),this.#_()};#A=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#l,Math.min(this.#h,this.#c+e)));if(i===this.#c)return;let s=this.#e.getBoundingClientRect(),n=t.clientX-s.left,o=t.clientY-s.top;this.#E(i,n,o)};#T=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.#a-=80,this.#S(),this.#$(),this.#_();break;case"ArrowRight":t.preventDefault(),this.#a+=80,this.#S(),this.#$(),this.#_();break;case"ArrowUp":t.preventDefault(),this.#o-=80,this.#S(),this.#$(),this.#_();break;case"ArrowDown":t.preventDefault(),this.#o+=80,this.#S(),this.#$(),this.#_();break;case"+":case"=":t.preventDefault(),this.#E(this.#c+1,this.#f/2,this.#d/2);break;case"-":t.preventDefault(),this.#E(this.#c-1,this.#f/2,this.#d/2);break;case"Escape":t.preventDefault(),this.#s();break}};#E(t,e,i){if(t=Math.max(this.#l,Math.min(this.#h,t)),t===this.#c)return;let s=this.#a-this.#f/2,n=this.#o-this.#d/2,o=s+e,a=n+i,l=Math.pow(2,t-this.#c);this.#a=o*l-e+this.#f/2,this.#o=a*l-i+this.#d/2,this.#b*=l,this.#v*=l,this.#c=t,this.#z(),this.#S(),this.#$(),this.#_()}#S(){let t=256*Math.pow(2,this.#c);this.#a=(this.#a%t+t)%t,this.#o=Math.max(this.#d/2,Math.min(t-this.#d/2,this.#o))}#$(){let t=-(this.#a-this.#f/2),e=-(this.#o-this.#d/2);this.#i.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#L(),this.#R(),this.#j()}#L(){let t=this.#c,e=Math.pow(2,t),i=this.#a-this.#f/2,s=this.#o-this.#d/2,n=i+this.#f,o=s+this.#d,a=Math.floor(i/256)-1,l=Math.max(0,Math.floor(s/256)-1),c=Math.ceil(n/256)+1,h=Math.min(e,Math.ceil(o/256)+1);for(let u=l;u<h;u++)for(let d=a;d<c;d++){let f=(d%e+e)%e,g=`${t}/${f}/${u}`;this.#u.has(g)||this.#M(t,d,u,f)}}#M(t,e,i,s){let n=`${t}/${s}/${i}`;if(this.#u.has(n))return;let o=e*256,a=i*256,l=document.createElement("img");l.src=mt(this.#n,t,s,i,this.#r),l.alt="",l.draggable=!1,l.style.left=o+"px",l.style.top=a+"px",l.style.width="256px",l.style.height="256px",l._wx=o,l._wy=a,this.#u.set(n,l),this.#i.appendChild(l)}#R(){let t=this.#a-this.#f/2,e=this.#o-this.#d/2,i=512;for(let[s,n]of this.#u){let o=n._wx,a=n._wy;(o+256<t-i||o>t+this.#f+i||a+256<e-i||a>e+this.#d+i)&&(n.remove(),this.#u.delete(s))}}#j(){if(!this.#m)return;let t=this.#m.offsetWidth||32;this.#m.style.left=`${Math.round(this.#b-t/2)}px`,this.#m.style.top=`${Math.round(this.#v-t)}px`,this.#m.style.transform=""}#_(){let{lat:t,lng:e}=ki(this.#a,this.#o,this.#c);this.#e.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#c}}))}#z(){for(let t of this.#u.values())t.remove();this.#u.clear()}destroy(){if(this.#i.removeEventListener("pointerdown",this.#k),this.#i.removeEventListener("wheel",this.#A),this.#e.removeEventListener("keydown",this.#T),this.#i.removeEventListener("pointermove",this.#C),this.#i.removeEventListener("pointerup",this.#x),this.#m&&this.#m.parentNode===this.#i){let t=this.#t.querySelector('[part="container"]');t&&(t.insertBefore(this.#m,this.#i.nextSibling),this.#m.style.position="",this.#m.style.left="",this.#m.style.top="",this.#m.style.transform="")}this.#z(),this.#e.removeAttribute("data-interactive-active")}}});var Wt={};gi(Wt,{EMOJI_ALIASES:()=>Ei,EMOJI_GROUPS:()=>js,EMOJI_GROUP_ICONS:()=>Ps,EMOJI_GROUP_LABELS:()=>zs,EMOJI_MAP:()=>st,getByGroup:()=>qs,resolveEmoji:()=>Bs,searchEmoji:()=>Is});function Si(r){for(let[t,e,i,s]of r){if(st.has(t))continue;let n={shortcode:t,emoji:e,name:i,keywords:[],group:s};st.set(t,n),gt.push(n)}}function Bs(r){let t=st.get(r);if(t)return t;let e=Ei.get(r);return e&&st.get(e)||null}function qs(r){let t=ft.filter(i=>i.group===r),e=gt.filter(i=>i.group===r);return e.length>0?t.concat(e):t}function Is(r){let t=r.toLowerCase().trim(),e=gt.length>0?ft.concat(gt):ft;return t?e.filter(i=>i.shortcode.includes(t)||i.name.toLowerCase().includes(t)||i.keywords&&i.keywords.some(s=>s.includes(t))):e}var ft,st,Ei,js,zs,Ps,gt,Gt=Bt(()=>{ft=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],st=new Map(ft.map(r=>[r.shortcode,r])),Ei=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["raised_fist","muscle"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["poop","skull"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),js=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],zs={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},Ps={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},gt=[];globalThis.__vbEmojiRegister=Si;globalThis.__vbEmojiExtended&&(Si(globalThis.__vbEmojiExtended),delete globalThis.__vbEmojiExtended)});var go=window.matchMedia("(prefers-reduced-motion: reduce)");var bi=new Map;function p(r,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},n=bi.get(r);if(customElements.get(r)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}bi.set(r,s),customElements.define(r,t)}var m=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&this.setAttribute("data-upgraded","")}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#t.push(()=>t.removeEventListener(e,i,s))}setup(){}teardown(){}};var qt=class extends m{#t=null;#e=null;#i=!1;#n=null;#r=null;#s=null;#a=null;#o=null;#c=null;#l=null;#h=null;#f=null;setup(){if(this.#t=this.querySelector("audio"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls");let t=!this.shadowRoot;this.#d(),t&&(this.#m(),this.#b(),this.#v()),this.#k(),this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{}),this.#f=()=>{let e=this.shadowRoot?.querySelector(".player");e&&(e.style.display="none",e.offsetHeight,e.style.display="")},this.listen(window,"vb:theme-change",this.#f)}teardown(){this.#t&&this.#t.setAttribute("controls","")}#d(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
1
|
+
var Ls=Object.defineProperty;var Bt=(r,t)=>()=>(r&&(t=r(r=0)),t);var gi=(r,t)=>{for(var e in t)Ls(r,e,{get:t[e],enumerable:!0})};function wi(r,t,e){let i=Math.pow(2,e),s=r*Math.PI/180,n=(t+180)/360*i,o=(1-Math.log(Math.tan(s)+1/Math.cos(s))/Math.PI)/2*i,a=Math.floor(n),l=Math.floor(o),c=Math.round((n-a)*256),h=Math.round((o-l)*256);return{tileX:a,tileY:l,pixelX:c,pixelY:h}}function ki(r,t,e){let i=256*Math.pow(2,e),s=r/i*360-180;return{lat:Math.atan(Math.sinh(Math.PI*(1-2*t/i)))*180/Math.PI,lng:s}}function mt(r,t,e,i,s){if(s)return s.replace("{z}",String(t)).replace("{x}",String(e)).replace("{y}",String(i));switch(r){case"carto-light":return`https://basemaps.cartocdn.com/light_all/${t}/${e}/${i}.png`;case"carto-dark":return`https://basemaps.cartocdn.com/dark_all/${t}/${e}/${i}.png`;default:return`https://tile.openstreetmap.org/${t}/${e}/${i}.png`}}var Ht=Bt(()=>{});var xi={};gi(xi,{MapInteraction:()=>Ut});var Ut,Ai=Bt(()=>{Ht();Ut=class{#t;#e;#i;#n;#r;#s;#a=0;#o=0;#c=15;#l=1;#h=19;#f=0;#d=0;#u=new Map;#m=null;#b=0;#v=0;#p=!1;#g=0;#y=0;constructor({shadow:t,host:e,lat:i,lng:s,zoom:n,provider:o,tileUrl:a,onDeactivate:l}){this.#t=t,this.#e=e,this.#n=o,this.#r=a||"",this.#s=l,this.#c=n,this.#i=t.querySelector('[part="tiles"]'),this.#m=t.querySelector('[part="marker"]');let c=256*Math.pow(2,n),h=i*Math.PI/180;this.#a=(s+180)/360*c,this.#o=(1-Math.log(Math.tan(h)+1/Math.cos(h))/Math.PI)/2*c,this.#b=this.#a,this.#v=this.#o,this.#f=this.#e.offsetWidth||400,this.#d=this.#e.offsetHeight||300,this.#i.innerHTML="",this.#i.style.transform="",this.#m&&(this.#m.style.position="absolute",this.#m.style.top="",this.#m.style.left="",this.#i.appendChild(this.#m)),this.#w(),this.#$()}#w(){this.#i.addEventListener("pointerdown",this.#k),this.#i.addEventListener("wheel",this.#A,{passive:!1}),this.#e.addEventListener("keydown",this.#T)}#k=t=>{t.button===0&&(t.preventDefault(),this.#p=!0,this.#g=t.clientX,this.#y=t.clientY,this.#i.setPointerCapture(t.pointerId),this.#i.setAttribute("data-dragging",""),this.#i.addEventListener("pointermove",this.#C),this.#i.addEventListener("pointerup",this.#x))};#C=t=>{if(!this.#p)return;let e=t.clientX-this.#g,i=t.clientY-this.#y;this.#g=t.clientX,this.#y=t.clientY,this.#a-=e,this.#o-=i,this.#S(),this.#$()};#x=t=>{this.#p=!1,this.#i.releasePointerCapture(t.pointerId),this.#i.removeAttribute("data-dragging"),this.#i.removeEventListener("pointermove",this.#C),this.#i.removeEventListener("pointerup",this.#x),this.#_()};#A=t=>{t.preventDefault();let e=t.ctrlKey?-t.deltaY*.01:-Math.sign(t.deltaY),i=Math.round(Math.max(this.#l,Math.min(this.#h,this.#c+e)));if(i===this.#c)return;let s=this.#e.getBoundingClientRect(),n=t.clientX-s.left,o=t.clientY-s.top;this.#E(i,n,o)};#T=t=>{switch(t.key){case"ArrowLeft":t.preventDefault(),this.#a-=80,this.#S(),this.#$(),this.#_();break;case"ArrowRight":t.preventDefault(),this.#a+=80,this.#S(),this.#$(),this.#_();break;case"ArrowUp":t.preventDefault(),this.#o-=80,this.#S(),this.#$(),this.#_();break;case"ArrowDown":t.preventDefault(),this.#o+=80,this.#S(),this.#$(),this.#_();break;case"+":case"=":t.preventDefault(),this.#E(this.#c+1,this.#f/2,this.#d/2);break;case"-":t.preventDefault(),this.#E(this.#c-1,this.#f/2,this.#d/2);break;case"Escape":t.preventDefault(),this.#s();break}};#E(t,e,i){if(t=Math.max(this.#l,Math.min(this.#h,t)),t===this.#c)return;let s=this.#a-this.#f/2,n=this.#o-this.#d/2,o=s+e,a=n+i,l=Math.pow(2,t-this.#c);this.#a=o*l-e+this.#f/2,this.#o=a*l-i+this.#d/2,this.#b*=l,this.#v*=l,this.#c=t,this.#z(),this.#S(),this.#$(),this.#_()}#S(){let t=256*Math.pow(2,this.#c);this.#a=(this.#a%t+t)%t,this.#o=Math.max(this.#d/2,Math.min(t-this.#d/2,this.#o))}#$(){let t=-(this.#a-this.#f/2),e=-(this.#o-this.#d/2);this.#i.style.transform=`translate(${Math.round(t)}px, ${Math.round(e)}px)`,this.#L(),this.#R(),this.#j()}#L(){let t=this.#c,e=Math.pow(2,t),i=this.#a-this.#f/2,s=this.#o-this.#d/2,n=i+this.#f,o=s+this.#d,a=Math.floor(i/256)-1,l=Math.max(0,Math.floor(s/256)-1),c=Math.ceil(n/256)+1,h=Math.min(e,Math.ceil(o/256)+1);for(let u=l;u<h;u++)for(let d=a;d<c;d++){let f=(d%e+e)%e,g=`${t}/${f}/${u}`;this.#u.has(g)||this.#M(t,d,u,f)}}#M(t,e,i,s){let n=`${t}/${s}/${i}`;if(this.#u.has(n))return;let o=e*256,a=i*256,l=document.createElement("img");l.src=mt(this.#n,t,s,i,this.#r),l.alt="",l.draggable=!1,l.style.left=o+"px",l.style.top=a+"px",l.style.width="256px",l.style.height="256px",l._wx=o,l._wy=a,this.#u.set(n,l),this.#i.appendChild(l)}#R(){let t=this.#a-this.#f/2,e=this.#o-this.#d/2,i=512;for(let[s,n]of this.#u){let o=n._wx,a=n._wy;(o+256<t-i||o>t+this.#f+i||a+256<e-i||a>e+this.#d+i)&&(n.remove(),this.#u.delete(s))}}#j(){if(!this.#m)return;let t=this.#m.offsetWidth||32;this.#m.style.left=`${Math.round(this.#b-t/2)}px`,this.#m.style.top=`${Math.round(this.#v-t)}px`,this.#m.style.transform=""}#_(){let{lat:t,lng:e}=ki(this.#a,this.#o,this.#c);this.#e.dispatchEvent(new CustomEvent("geo-map:move",{bubbles:!0,detail:{lat:+t.toFixed(6),lng:+e.toFixed(6),zoom:this.#c}}))}#z(){for(let t of this.#u.values())t.remove();this.#u.clear()}destroy(){if(this.#i.removeEventListener("pointerdown",this.#k),this.#i.removeEventListener("wheel",this.#A),this.#e.removeEventListener("keydown",this.#T),this.#i.removeEventListener("pointermove",this.#C),this.#i.removeEventListener("pointerup",this.#x),this.#m&&this.#m.parentNode===this.#i){let t=this.#t.querySelector('[part="container"]');t&&(t.insertBefore(this.#m,this.#i.nextSibling),this.#m.style.position="",this.#m.style.left="",this.#m.style.top="",this.#m.style.transform="")}this.#z(),this.#e.removeAttribute("data-interactive-active")}}});var Wt={};gi(Wt,{EMOJI_ALIASES:()=>Ei,EMOJI_GROUPS:()=>js,EMOJI_GROUP_ICONS:()=>Ps,EMOJI_GROUP_LABELS:()=>zs,EMOJI_MAP:()=>st,getByGroup:()=>qs,resolveEmoji:()=>Bs,searchEmoji:()=>Is});function Si(r){for(let[t,e,i,s]of r){if(st.has(t))continue;let n={shortcode:t,emoji:e,name:i,keywords:[],group:s};st.set(t,n),gt.push(n)}}function Bs(r){let t=st.get(r);if(t)return t;let e=Ei.get(r);return e&&st.get(e)||null}function qs(r){let t=ft.filter(i=>i.group===r),e=gt.filter(i=>i.group===r);return e.length>0?t.concat(e):t}function Is(r){let t=r.toLowerCase().trim(),e=gt.length>0?ft.concat(gt):ft;return t?e.filter(i=>i.shortcode.includes(t)||i.name.toLowerCase().includes(t)||i.keywords&&i.keywords.some(s=>s.includes(t))):e}var ft,st,Ei,js,zs,Ps,gt,Gt=Bt(()=>{ft=[{shortcode:"smile",emoji:"\u{1F604}",name:"Smiling Face with Open Mouth",keywords:["happy","joy","laugh"],group:"smileys"},{shortcode:"grinning",emoji:"\u{1F600}",name:"Grinning Face",keywords:["happy","smile"],group:"smileys"},{shortcode:"laughing",emoji:"\u{1F606}",name:"Grinning Squinting Face",keywords:["happy","laugh"],group:"smileys"},{shortcode:"sweat_smile",emoji:"\u{1F605}",name:"Grinning Face with Sweat",keywords:["hot","relief"],group:"smileys"},{shortcode:"rofl",emoji:"\u{1F923}",name:"Rolling on the Floor Laughing",keywords:["lol","funny"],group:"smileys"},{shortcode:"joy",emoji:"\u{1F602}",name:"Face with Tears of Joy",keywords:["happy","cry","laugh"],group:"smileys"},{shortcode:"slightly_smiling_face",emoji:"\u{1F642}",name:"Slightly Smiling Face",keywords:["smile"],group:"smileys"},{shortcode:"upside_down_face",emoji:"\u{1F643}",name:"Upside-Down Face",keywords:["sarcasm","silly"],group:"smileys"},{shortcode:"wink",emoji:"\u{1F609}",name:"Winking Face",keywords:["flirt","joke"],group:"smileys"},{shortcode:"blush",emoji:"\u{1F60A}",name:"Smiling Face with Smiling Eyes",keywords:["happy","shy"],group:"smileys"},{shortcode:"innocent",emoji:"\u{1F607}",name:"Smiling Face with Halo",keywords:["angel","good"],group:"smileys"},{shortcode:"heart_eyes",emoji:"\u{1F60D}",name:"Smiling Face with Heart-Eyes",keywords:["love","crush"],group:"smileys"},{shortcode:"star_struck",emoji:"\u{1F929}",name:"Star-Struck",keywords:["wow","amazing"],group:"smileys"},{shortcode:"kissing_heart",emoji:"\u{1F618}",name:"Face Blowing a Kiss",keywords:["love","kiss"],group:"smileys"},{shortcode:"yum",emoji:"\u{1F60B}",name:"Face Savoring Food",keywords:["delicious","tasty"],group:"smileys"},{shortcode:"stuck_out_tongue",emoji:"\u{1F61B}",name:"Face with Tongue",keywords:["playful","silly"],group:"smileys"},{shortcode:"stuck_out_tongue_winking_eye",emoji:"\u{1F61C}",name:"Winking Face with Tongue",keywords:["silly","playful"],group:"smileys"},{shortcode:"zany_face",emoji:"\u{1F92A}",name:"Zany Face",keywords:["crazy","wild"],group:"smileys"},{shortcode:"hugs",emoji:"\u{1F917}",name:"Hugging Face",keywords:["hug","warm"],group:"smileys"},{shortcode:"thinking",emoji:"\u{1F914}",name:"Thinking Face",keywords:["hmm","consider"],group:"smileys"},{shortcode:"shushing_face",emoji:"\u{1F92B}",name:"Shushing Face",keywords:["quiet","secret"],group:"smileys"},{shortcode:"smirk",emoji:"\u{1F60F}",name:"Smirking Face",keywords:["sly","suggestive"],group:"smileys"},{shortcode:"unamused",emoji:"\u{1F612}",name:"Unamused Face",keywords:["bored","unimpressed"],group:"smileys"},{shortcode:"roll_eyes",emoji:"\u{1F644}",name:"Face with Rolling Eyes",keywords:["annoyed","whatever"],group:"smileys"},{shortcode:"grimacing",emoji:"\u{1F62C}",name:"Grimacing Face",keywords:["awkward","nervous"],group:"smileys"},{shortcode:"relieved",emoji:"\u{1F60C}",name:"Relieved Face",keywords:["calm","peaceful"],group:"smileys"},{shortcode:"pensive",emoji:"\u{1F614}",name:"Pensive Face",keywords:["sad","thoughtful"],group:"smileys"},{shortcode:"sleepy",emoji:"\u{1F62A}",name:"Sleepy Face",keywords:["tired","sleep"],group:"smileys"},{shortcode:"sleeping",emoji:"\u{1F634}",name:"Sleeping Face",keywords:["zzz","sleep"],group:"smileys"},{shortcode:"mask",emoji:"\u{1F637}",name:"Face with Medical Mask",keywords:["sick","health"],group:"smileys"},{shortcode:"nerd_face",emoji:"\u{1F913}",name:"Nerd Face",keywords:["geek","smart"],group:"smileys"},{shortcode:"sunglasses",emoji:"\u{1F60E}",name:"Smiling Face with Sunglasses",keywords:["cool","chill"],group:"smileys"},{shortcode:"confused",emoji:"\u{1F615}",name:"Confused Face",keywords:["puzzled","unsure"],group:"smileys"},{shortcode:"worried",emoji:"\u{1F61F}",name:"Worried Face",keywords:["anxious","concern"],group:"smileys"},{shortcode:"cry",emoji:"\u{1F622}",name:"Crying Face",keywords:["sad","tear"],group:"smileys"},{shortcode:"sob",emoji:"\u{1F62D}",name:"Loudly Crying Face",keywords:["sad","cry"],group:"smileys"},{shortcode:"angry",emoji:"\u{1F620}",name:"Angry Face",keywords:["mad","annoyed"],group:"smileys"},{shortcode:"rage",emoji:"\u{1F92C}",name:"Face with Symbols on Mouth",keywords:["angry","swear"],group:"smileys"},{shortcode:"exploding_head",emoji:"\u{1F92F}",name:"Exploding Head",keywords:["mind blown","shocked"],group:"smileys"},{shortcode:"flushed",emoji:"\u{1F633}",name:"Flushed Face",keywords:["embarrassed","shocked"],group:"smileys"},{shortcode:"scream",emoji:"\u{1F631}",name:"Face Screaming in Fear",keywords:["scared","horror"],group:"smileys"},{shortcode:"skull",emoji:"\u{1F480}",name:"Skull",keywords:["dead","death"],group:"smileys"},{shortcode:"clown_face",emoji:"\u{1F921}",name:"Clown Face",keywords:["joke","funny"],group:"smileys"},{shortcode:"ghost",emoji:"\u{1F47B}",name:"Ghost",keywords:["halloween","spooky"],group:"smileys"},{shortcode:"wave",emoji:"\u{1F44B}",name:"Waving Hand",keywords:["hello","goodbye"],group:"people"},{shortcode:"raised_hand",emoji:"\u270B",name:"Raised Hand",keywords:["stop","high five"],group:"people"},{shortcode:"ok_hand",emoji:"\u{1F44C}",name:"OK Hand",keywords:["perfect","nice"],group:"people"},{shortcode:"thumbsup",emoji:"\u{1F44D}",name:"Thumbs Up",keywords:["approve","good","yes"],group:"people"},{shortcode:"thumbsdown",emoji:"\u{1F44E}",name:"Thumbs Down",keywords:["disapprove","bad","no"],group:"people"},{shortcode:"clap",emoji:"\u{1F44F}",name:"Clapping Hands",keywords:["applause","bravo"],group:"people"},{shortcode:"raised_hands",emoji:"\u{1F64C}",name:"Raising Hands",keywords:["celebration","hooray"],group:"people"},{shortcode:"pray",emoji:"\u{1F64F}",name:"Folded Hands",keywords:["thanks","please","hope"],group:"people"},{shortcode:"handshake",emoji:"\u{1F91D}",name:"Handshake",keywords:["deal","agreement"],group:"people"},{shortcode:"point_up",emoji:"\u261D\uFE0F",name:"Index Pointing Up",keywords:["attention","important"],group:"people"},{shortcode:"point_right",emoji:"\u{1F449}",name:"Backhand Index Pointing Right",keywords:["direction","this"],group:"people"},{shortcode:"point_left",emoji:"\u{1F448}",name:"Backhand Index Pointing Left",keywords:["direction","that"],group:"people"},{shortcode:"point_down",emoji:"\u{1F447}",name:"Backhand Index Pointing Down",keywords:["direction","below"],group:"people"},{shortcode:"v",emoji:"\u270C\uFE0F",name:"Victory Hand",keywords:["peace","two"],group:"people"},{shortcode:"crossed_fingers",emoji:"\u{1F91E}",name:"Crossed Fingers",keywords:["luck","hope"],group:"people"},{shortcode:"muscle",emoji:"\u{1F4AA}",name:"Flexed Biceps",keywords:["strong","power"],group:"people"},{shortcode:"writing_hand",emoji:"\u270D\uFE0F",name:"Writing Hand",keywords:["write","note"],group:"people"},{shortcode:"eyes",emoji:"\u{1F440}",name:"Eyes",keywords:["look","see","watch"],group:"people"},{shortcode:"brain",emoji:"\u{1F9E0}",name:"Brain",keywords:["smart","think","mind"],group:"people"},{shortcode:"speaking_head",emoji:"\u{1F5E3}\uFE0F",name:"Speaking Head",keywords:["talk","announce"],group:"people"},{shortcode:"baby",emoji:"\u{1F476}",name:"Baby",keywords:["child","newborn"],group:"people"},{shortcode:"person_shrugging",emoji:"\u{1F937}",name:"Person Shrugging",keywords:["dunno","whatever"],group:"people"},{shortcode:"person_facepalming",emoji:"\u{1F926}",name:"Person Facepalming",keywords:["frustration","disbelief"],group:"people"},{shortcode:"person_raising_hand",emoji:"\u{1F64B}",name:"Person Raising Hand",keywords:["question","volunteer"],group:"people"},{shortcode:"ninja",emoji:"\u{1F977}",name:"Ninja",keywords:["stealth","hidden"],group:"people"},{shortcode:"dog",emoji:"\u{1F436}",name:"Dog Face",keywords:["puppy","pet"],group:"animals"},{shortcode:"cat",emoji:"\u{1F431}",name:"Cat Face",keywords:["kitten","pet"],group:"animals"},{shortcode:"mouse",emoji:"\u{1F42D}",name:"Mouse Face",keywords:["rodent"],group:"animals"},{shortcode:"rabbit",emoji:"\u{1F430}",name:"Rabbit Face",keywords:["bunny","easter"],group:"animals"},{shortcode:"fox",emoji:"\u{1F98A}",name:"Fox",keywords:["clever","sly"],group:"animals"},{shortcode:"bear",emoji:"\u{1F43B}",name:"Bear",keywords:["teddy","nature"],group:"animals"},{shortcode:"unicorn",emoji:"\u{1F984}",name:"Unicorn",keywords:["magic","fantasy"],group:"animals"},{shortcode:"bee",emoji:"\u{1F41D}",name:"Honeybee",keywords:["honey","buzz"],group:"animals"},{shortcode:"butterfly",emoji:"\u{1F98B}",name:"Butterfly",keywords:["pretty","nature"],group:"animals"},{shortcode:"turtle",emoji:"\u{1F422}",name:"Turtle",keywords:["slow","shell"],group:"animals"},{shortcode:"snake",emoji:"\u{1F40D}",name:"Snake",keywords:["reptile"],group:"animals"},{shortcode:"whale",emoji:"\u{1F433}",name:"Spouting Whale",keywords:["ocean","sea"],group:"animals"},{shortcode:"dolphin",emoji:"\u{1F42C}",name:"Dolphin",keywords:["ocean","smart"],group:"animals"},{shortcode:"eagle",emoji:"\u{1F985}",name:"Eagle",keywords:["bird","freedom"],group:"animals"},{shortcode:"owl",emoji:"\u{1F989}",name:"Owl",keywords:["wise","night"],group:"animals"},{shortcode:"penguin",emoji:"\u{1F427}",name:"Penguin",keywords:["cold","linux"],group:"animals"},{shortcode:"octopus",emoji:"\u{1F419}",name:"Octopus",keywords:["ocean","tentacle"],group:"animals"},{shortcode:"seedling",emoji:"\u{1F331}",name:"Seedling",keywords:["plant","grow"],group:"animals"},{shortcode:"evergreen_tree",emoji:"\u{1F332}",name:"Evergreen Tree",keywords:["nature","pine"],group:"animals"},{shortcode:"sunflower",emoji:"\u{1F33B}",name:"Sunflower",keywords:["flower","yellow"],group:"animals"},{shortcode:"rose",emoji:"\u{1F339}",name:"Rose",keywords:["flower","love"],group:"animals"},{shortcode:"apple",emoji:"\u{1F34E}",name:"Red Apple",keywords:["fruit","healthy"],group:"food"},{shortcode:"banana",emoji:"\u{1F34C}",name:"Banana",keywords:["fruit","yellow"],group:"food"},{shortcode:"grapes",emoji:"\u{1F347}",name:"Grapes",keywords:["fruit","wine"],group:"food"},{shortcode:"watermelon",emoji:"\u{1F349}",name:"Watermelon",keywords:["fruit","summer"],group:"food"},{shortcode:"avocado",emoji:"\u{1F951}",name:"Avocado",keywords:["guacamole","healthy"],group:"food"},{shortcode:"pizza",emoji:"\u{1F355}",name:"Pizza",keywords:["food","italian"],group:"food"},{shortcode:"hamburger",emoji:"\u{1F354}",name:"Hamburger",keywords:["burger","fast food"],group:"food"},{shortcode:"taco",emoji:"\u{1F32E}",name:"Taco",keywords:["mexican","food"],group:"food"},{shortcode:"sushi",emoji:"\u{1F363}",name:"Sushi",keywords:["japanese","fish"],group:"food"},{shortcode:"cookie",emoji:"\u{1F36A}",name:"Cookie",keywords:["sweet","biscuit"],group:"food"},{shortcode:"cake",emoji:"\u{1F382}",name:"Birthday Cake",keywords:["birthday","celebration"],group:"food"},{shortcode:"ice_cream",emoji:"\u{1F366}",name:"Soft Ice Cream",keywords:["dessert","cold"],group:"food"},{shortcode:"chocolate_bar",emoji:"\u{1F36B}",name:"Chocolate Bar",keywords:["sweet","candy"],group:"food"},{shortcode:"popcorn",emoji:"\u{1F37F}",name:"Popcorn",keywords:["movie","snack"],group:"food"},{shortcode:"coffee",emoji:"\u2615",name:"Hot Beverage",keywords:["tea","drink","morning"],group:"food"},{shortcode:"beer",emoji:"\u{1F37A}",name:"Beer Mug",keywords:["drink","bar"],group:"food"},{shortcode:"wine_glass",emoji:"\u{1F377}",name:"Wine Glass",keywords:["drink","alcohol"],group:"food"},{shortcode:"cocktail",emoji:"\u{1F378}",name:"Cocktail Glass",keywords:["drink","martini"],group:"food"},{shortcode:"hot_pepper",emoji:"\u{1F336}\uFE0F",name:"Hot Pepper",keywords:["spicy","chili"],group:"food"},{shortcode:"egg",emoji:"\u{1F95A}",name:"Egg",keywords:["breakfast","food"],group:"food"},{shortcode:"earth_americas",emoji:"\u{1F30E}",name:"Globe Americas",keywords:["world","planet"],group:"travel"},{shortcode:"earth_europe",emoji:"\u{1F30D}",name:"Globe Europe-Africa",keywords:["world","planet"],group:"travel"},{shortcode:"sun",emoji:"\u2600\uFE0F",name:"Sun",keywords:["weather","bright","warm"],group:"travel"},{shortcode:"moon",emoji:"\u{1F319}",name:"Crescent Moon",keywords:["night","sleep"],group:"travel"},{shortcode:"star",emoji:"\u2B50",name:"Star",keywords:["favorite","rating"],group:"travel"},{shortcode:"star2",emoji:"\u{1F31F}",name:"Glowing Star",keywords:["sparkle","shine"],group:"travel"},{shortcode:"cloud",emoji:"\u2601\uFE0F",name:"Cloud",keywords:["weather","sky"],group:"travel"},{shortcode:"rainbow",emoji:"\u{1F308}",name:"Rainbow",keywords:["colorful","weather"],group:"travel"},{shortcode:"snowflake",emoji:"\u2744\uFE0F",name:"Snowflake",keywords:["cold","winter"],group:"travel"},{shortcode:"zap",emoji:"\u26A1",name:"High Voltage",keywords:["lightning","electric","fast"],group:"travel"},{shortcode:"fire",emoji:"\u{1F525}",name:"Fire",keywords:["hot","flame","lit"],group:"travel"},{shortcode:"ocean",emoji:"\u{1F30A}",name:"Water Wave",keywords:["sea","wave","surf"],group:"travel"},{shortcode:"airplane",emoji:"\u2708\uFE0F",name:"Airplane",keywords:["travel","flight"],group:"travel"},{shortcode:"rocket",emoji:"\u{1F680}",name:"Rocket",keywords:["launch","space","fast"],group:"travel"},{shortcode:"car",emoji:"\u{1F697}",name:"Automobile",keywords:["drive","vehicle"],group:"travel"},{shortcode:"house",emoji:"\u{1F3E0}",name:"House",keywords:["home","building"],group:"travel"},{shortcode:"tent",emoji:"\u26FA",name:"Tent",keywords:["camping","outdoor"],group:"travel"},{shortcode:"mountain",emoji:"\u26F0\uFE0F",name:"Mountain",keywords:["nature","hike"],group:"travel"},{shortcode:"desert_island",emoji:"\u{1F3DD}\uFE0F",name:"Desert Island",keywords:["beach","vacation"],group:"travel"},{shortcode:"volcano",emoji:"\u{1F30B}",name:"Volcano",keywords:["eruption","nature"],group:"travel"},{shortcode:"soccer",emoji:"\u26BD",name:"Soccer Ball",keywords:["football","sport"],group:"activities"},{shortcode:"basketball",emoji:"\u{1F3C0}",name:"Basketball",keywords:["sport","hoop"],group:"activities"},{shortcode:"tennis",emoji:"\u{1F3BE}",name:"Tennis",keywords:["sport","ball"],group:"activities"},{shortcode:"video_game",emoji:"\u{1F3AE}",name:"Video Game",keywords:["gaming","controller"],group:"activities"},{shortcode:"dart",emoji:"\u{1F3AF}",name:"Bullseye",keywords:["target","goal"],group:"activities"},{shortcode:"trophy",emoji:"\u{1F3C6}",name:"Trophy",keywords:["winner","champion"],group:"activities"},{shortcode:"medal",emoji:"\u{1F947}",name:"Gold Medal",keywords:["first","winner"],group:"activities"},{shortcode:"tada",emoji:"\u{1F389}",name:"Party Popper",keywords:["celebration","party"],group:"activities"},{shortcode:"confetti_ball",emoji:"\u{1F38A}",name:"Confetti Ball",keywords:["party","celebration"],group:"activities"},{shortcode:"balloon",emoji:"\u{1F388}",name:"Balloon",keywords:["party","birthday"],group:"activities"},{shortcode:"art",emoji:"\u{1F3A8}",name:"Artist Palette",keywords:["paint","creative"],group:"activities"},{shortcode:"musical_note",emoji:"\u{1F3B5}",name:"Musical Note",keywords:["music","song"],group:"activities"},{shortcode:"microphone",emoji:"\u{1F3A4}",name:"Microphone",keywords:["sing","karaoke"],group:"activities"},{shortcode:"guitar",emoji:"\u{1F3B8}",name:"Guitar",keywords:["music","rock"],group:"activities"},{shortcode:"dice",emoji:"\u{1F3B2}",name:"Game Die",keywords:["chance","random"],group:"activities"},{shortcode:"bulb",emoji:"\u{1F4A1}",name:"Light Bulb",keywords:["idea","bright"],group:"objects"},{shortcode:"computer",emoji:"\u{1F4BB}",name:"Laptop",keywords:["tech","work"],group:"objects"},{shortcode:"keyboard",emoji:"\u2328\uFE0F",name:"Keyboard",keywords:["type","computer"],group:"objects"},{shortcode:"phone",emoji:"\u{1F4F1}",name:"Mobile Phone",keywords:["cell","call"],group:"objects"},{shortcode:"camera",emoji:"\u{1F4F7}",name:"Camera",keywords:["photo","picture"],group:"objects"},{shortcode:"tv",emoji:"\u{1F4FA}",name:"Television",keywords:["watch","screen"],group:"objects"},{shortcode:"battery",emoji:"\u{1F50B}",name:"Battery",keywords:["charge","power"],group:"objects"},{shortcode:"electric_plug",emoji:"\u{1F50C}",name:"Electric Plug",keywords:["power","connect"],group:"objects"},{shortcode:"mag",emoji:"\u{1F50D}",name:"Magnifying Glass Left",keywords:["search","find"],group:"objects"},{shortcode:"lock",emoji:"\u{1F512}",name:"Locked",keywords:["security","private"],group:"objects"},{shortcode:"unlock",emoji:"\u{1F513}",name:"Unlocked",keywords:["open","access"],group:"objects"},{shortcode:"key",emoji:"\u{1F511}",name:"Key",keywords:["access","password"],group:"objects"},{shortcode:"hammer",emoji:"\u{1F528}",name:"Hammer",keywords:["tool","build"],group:"objects"},{shortcode:"wrench",emoji:"\u{1F527}",name:"Wrench",keywords:["tool","fix"],group:"objects"},{shortcode:"gear",emoji:"\u2699\uFE0F",name:"Gear",keywords:["settings","config"],group:"objects"},{shortcode:"link",emoji:"\u{1F517}",name:"Link",keywords:["chain","url"],group:"objects"},{shortcode:"paperclip",emoji:"\u{1F4CE}",name:"Paperclip",keywords:["attach","clip"],group:"objects"},{shortcode:"scissors",emoji:"\u2702\uFE0F",name:"Scissors",keywords:["cut","snip"],group:"objects"},{shortcode:"pen",emoji:"\u{1F58A}\uFE0F",name:"Pen",keywords:["write","sign"],group:"objects"},{shortcode:"pencil",emoji:"\u270F\uFE0F",name:"Pencil",keywords:["write","draw"],group:"objects"},{shortcode:"book",emoji:"\u{1F4D6}",name:"Open Book",keywords:["read","study"],group:"objects"},{shortcode:"memo",emoji:"\u{1F4DD}",name:"Memo",keywords:["note","write"],group:"objects"},{shortcode:"package",emoji:"\u{1F4E6}",name:"Package",keywords:["box","delivery"],group:"objects"},{shortcode:"mailbox",emoji:"\u{1F4EC}",name:"Open Mailbox with Raised Flag",keywords:["mail","letter"],group:"objects"},{shortcode:"bell",emoji:"\u{1F514}",name:"Bell",keywords:["notification","alert"],group:"objects"},{shortcode:"red_heart",emoji:"\u2764\uFE0F",name:"Red Heart",keywords:["love","valentine"],group:"symbols"},{shortcode:"orange_heart",emoji:"\u{1F9E1}",name:"Orange Heart",keywords:["love"],group:"symbols"},{shortcode:"yellow_heart",emoji:"\u{1F49B}",name:"Yellow Heart",keywords:["love","friendship"],group:"symbols"},{shortcode:"green_heart",emoji:"\u{1F49A}",name:"Green Heart",keywords:["love","nature"],group:"symbols"},{shortcode:"blue_heart",emoji:"\u{1F499}",name:"Blue Heart",keywords:["love","trust"],group:"symbols"},{shortcode:"purple_heart",emoji:"\u{1F49C}",name:"Purple Heart",keywords:["love"],group:"symbols"},{shortcode:"broken_heart",emoji:"\u{1F494}",name:"Broken Heart",keywords:["sad","breakup"],group:"symbols"},{shortcode:"sparkles",emoji:"\u2728",name:"Sparkles",keywords:["shine","magic","new"],group:"symbols"},{shortcode:"hundred",emoji:"\u{1F4AF}",name:"Hundred Points",keywords:["perfect","score"],group:"symbols"},{shortcode:"boom",emoji:"\u{1F4A5}",name:"Collision",keywords:["explosion","impact"],group:"symbols"},{shortcode:"speech_balloon",emoji:"\u{1F4AC}",name:"Speech Balloon",keywords:["talk","chat","message"],group:"symbols"},{shortcode:"thought_balloon",emoji:"\u{1F4AD}",name:"Thought Balloon",keywords:["think","dream"],group:"symbols"},{shortcode:"check_mark",emoji:"\u2705",name:"Check Mark Button",keywords:["done","yes","complete"],group:"symbols"},{shortcode:"x",emoji:"\u274C",name:"Cross Mark",keywords:["no","wrong","delete"],group:"symbols"},{shortcode:"warning",emoji:"\u26A0\uFE0F",name:"Warning",keywords:["caution","alert"],group:"symbols"},{shortcode:"no_entry",emoji:"\u26D4",name:"No Entry",keywords:["stop","forbidden"],group:"symbols"},{shortcode:"question",emoji:"\u2753",name:"Question Mark",keywords:["help","what"],group:"symbols"},{shortcode:"exclamation",emoji:"\u2757",name:"Exclamation Mark",keywords:["important","attention"],group:"symbols"},{shortcode:"arrow_right",emoji:"\u27A1\uFE0F",name:"Right Arrow",keywords:["next","forward"],group:"symbols"},{shortcode:"arrow_left",emoji:"\u2B05\uFE0F",name:"Left Arrow",keywords:["back","previous"],group:"symbols"},{shortcode:"arrow_up",emoji:"\u2B06\uFE0F",name:"Up Arrow",keywords:["above"],group:"symbols"},{shortcode:"arrow_down",emoji:"\u2B07\uFE0F",name:"Down Arrow",keywords:["below"],group:"symbols"},{shortcode:"recycle",emoji:"\u267B\uFE0F",name:"Recycling Symbol",keywords:["environment","green"],group:"symbols"},{shortcode:"infinity",emoji:"\u267E\uFE0F",name:"Infinity",keywords:["forever","loop"],group:"symbols"},{shortcode:"checkered_flag",emoji:"\u{1F3C1}",name:"Chequered Flag",keywords:["finish","race"],group:"flags"},{shortcode:"triangular_flag",emoji:"\u{1F6A9}",name:"Triangular Flag",keywords:["red flag","warning"],group:"flags"},{shortcode:"white_flag",emoji:"\u{1F3F3}\uFE0F",name:"White Flag",keywords:["surrender","peace"],group:"flags"},{shortcode:"rainbow_flag",emoji:"\u{1F3F3}\uFE0F\u200D\u{1F308}",name:"Rainbow Flag",keywords:["pride","lgbtq"],group:"flags"},{shortcode:"pirate_flag",emoji:"\u{1F3F4}\u200D\u2620\uFE0F",name:"Pirate Flag",keywords:["jolly roger","skull"],group:"flags"},{shortcode:"flag_us",emoji:"\u{1F1FA}\u{1F1F8}",name:"Flag: United States",keywords:["usa","america"],group:"flags"},{shortcode:"flag_gb",emoji:"\u{1F1EC}\u{1F1E7}",name:"Flag: United Kingdom",keywords:["uk","britain"],group:"flags"},{shortcode:"flag_fr",emoji:"\u{1F1EB}\u{1F1F7}",name:"Flag: France",keywords:["french"],group:"flags"},{shortcode:"flag_de",emoji:"\u{1F1E9}\u{1F1EA}",name:"Flag: Germany",keywords:["german"],group:"flags"},{shortcode:"flag_jp",emoji:"\u{1F1EF}\u{1F1F5}",name:"Flag: Japan",keywords:["japanese"],group:"flags"},{shortcode:"flag_kr",emoji:"\u{1F1F0}\u{1F1F7}",name:"Flag: South Korea",keywords:["korean"],group:"flags"},{shortcode:"flag_br",emoji:"\u{1F1E7}\u{1F1F7}",name:"Flag: Brazil",keywords:["brazilian"],group:"flags"},{shortcode:"flag_in",emoji:"\u{1F1EE}\u{1F1F3}",name:"Flag: India",keywords:["indian"],group:"flags"},{shortcode:"flag_ca",emoji:"\u{1F1E8}\u{1F1E6}",name:"Flag: Canada",keywords:["canadian","maple"],group:"flags"},{shortcode:"flag_au",emoji:"\u{1F1E6}\u{1F1FA}",name:"Flag: Australia",keywords:["australian"],group:"flags"}],st=new Map(ft.map(r=>[r.shortcode,r])),Ei=new Map([["+1","thumbsup"],["-1","thumbsdown"],["heart","red_heart"],["thumbs_up","thumbsup"],["thumbs_down","thumbsdown"],["grin","grinning"],["laughing_crying","joy"],["lol","rofl"],["smiley","smile"],["cool","sunglasses"],["nerd","nerd_face"],["kiss","kissing_heart"],["hug","hugs"],["think","thinking"],["sad","cry"],["mad","angry"],["shrug","person_shrugging"],["facepalm","person_facepalming"],["raised_fist","muscle"],["pray_hands","pray"],["hi","wave"],["bye","wave"],["lightning","zap"],["flame","fire"],["hot","fire"],["bomb","boom"],["idea","bulb"],["laptop","computer"],["search","mag"],["party","tada"],["celebrate","tada"],["congrats","tada"],["check","check_mark"],["done","check_mark"],["yes","check_mark"],["no","x"],["wrong","x"],["love","red_heart"],["star_eyes","star_struck"],["mindblown","exploding_head"],["poop","skull"],["memo_pad","memo"],["notes","memo"],["coffee_cup","coffee"],["tea","coffee"]]),js=["smileys","people","animals","food","travel","activities","objects","symbols","flags"],zs={smileys:"Smileys & Emotion",people:"People & Body",animals:"Animals & Nature",food:"Food & Drink",travel:"Travel & Places",activities:"Activities",objects:"Objects",symbols:"Symbols",flags:"Flags"},Ps={smileys:"\u{1F600}",people:"\u{1F44B}",animals:"\u{1F436}",food:"\u{1F355}",travel:"\u{1F30D}",activities:"\u{1F389}",objects:"\u{1F4A1}",symbols:"\u2764\uFE0F",flags:"\u{1F3C1}"},gt=[];globalThis.__vbEmojiRegister=Si;globalThis.__vbEmojiExtended&&(Si(globalThis.__vbEmojiExtended),delete globalThis.__vbEmojiExtended)});var go=window.matchMedia("(prefers-reduced-motion: reduce)");var bi=new Map;function p(r,t,e={}){let i=e.priority??10,s={impl:t,bundle:e.bundle,contract:e.contract,priority:i},n=bi.get(r);if(customElements.get(r)){if(!n||n.priority>=i){n&&n.priority===i&&n.impl!==t&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}" (priority ${n.priority}). Skipping "${e.bundle}".`);return}console.warn(`[VB Bundle] Tag <${r}> defined by "${n.bundle}" cannot be replaced (customElements.define is permanent). "${e.bundle}" has higher priority but arrived late.`);return}if(n&&n.priority>=i){n.priority===i&&console.warn(`[VB Bundle] Tag <${r}> already registered by "${n.bundle}". Skipping "${e.bundle}" (first wins at equal priority).`);return}bi.set(r,s),customElements.define(r,t)}var m=class extends HTMLElement{#t=[];connectedCallback(){this.hasAttribute("data-upgraded")||this.setup()!==!1&&(this.setAttribute("data-upgraded",""),this.dispatchEvent(new CustomEvent(`${this.localName}:upgraded`,{bubbles:!0})))}disconnectedCallback(){for(let t of this.#t)t();this.#t=[],this.removeAttribute("data-upgraded"),this.teardown()}listen(t,e,i,s){t.addEventListener(e,i,s),this.#t.push(()=>t.removeEventListener(e,i,s))}setup(){}teardown(){}};var qt=class extends m{#t=null;#e=null;#i=!1;#n=null;#r=null;#s=null;#a=null;#o=null;#c=null;#l=null;#h=null;#f=null;setup(){if(this.#t=this.querySelector("audio"),!this.#t)return!1;this.#e=this.querySelector(".track-list"),this.#t.removeAttribute("controls");let t=!this.shadowRoot;this.#d(),t&&(this.#m(),this.#b(),this.#v()),this.#k(),this.hasAttribute("autoplay")&&this.#t.play().catch(()=>{}),this.#f=()=>{let e=this.shadowRoot?.querySelector(".player");e&&(e.style.display="none",e.offsetHeight,e.style.display="")},this.listen(window,"vb:theme-change",this.#f)}teardown(){this.#t&&this.#t.setAttribute("controls","")}#d(){if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"});t.innerHTML=`
|
|
2
2
|
<style>${this.#u()}</style>
|
|
3
3
|
<div part="player" class="player">
|
|
4
4
|
<div part="controls" class="controls" role="group" aria-label="Audio controls">
|
|
@@ -1060,7 +1060,7 @@ var Ls=Object.defineProperty;var Bt=(r,t)=>()=>(r&&(t=r(r=0)),t);var gi=(r,t)=>{
|
|
|
1060
1060
|
<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">© OpenStreetMap</a>
|
|
1061
1061
|
</div>
|
|
1062
1062
|
</div>
|
|
1063
|
-
`}loadTiles(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let s=this.zoom,n=this.provider,{tileX:o,tileY:a,pixelX:l,pixelY:c}=wi(e,i,s),h=this.shadowRoot.querySelector('[part="tiles"]');if(!h)return;h.innerHTML="";let u=this,d=u.offsetWidth||400,f=u.offsetHeight||300,g=Math.round(d/2-256-l),v=Math.round(f/2-256-c);h.style.transform=`translate(${g}px, ${v}px)`;let b=0,k=0,S=9;for(let N=-1;N<=1;N++)for(let j=-1;j<=1;j++){let z=o+j,I=a+N,Ts=mt(n,s,z,I,this.tileUrl),H=document.createElement("img");H.src=Ts,H.alt="",H.loading="lazy",H.draggable=!1,H.addEventListener("load",()=>{b++,b+k===S&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),H.addEventListener("error",()=>{k++,k===S?this.handleError("Failed to load map tiles"):b+k===S&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),h.appendChild(H)}}#a(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#c()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#c())}#o(){if(this.#e)return;let t=this.tileUrl;if(t)try{let n=new URL(t,location.origin);if(n.origin===location.origin){this.#e=!0;return}this.#e=!0;let o=document.createElement("link");o.rel="preconnect",o.href=n.origin,o.crossOrigin="",document.head.appendChild(o);return}catch{}this.#e=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let s=document.createElement("link");s.rel="preconnect",s.href=i,s.crossOrigin="",document.head.appendChild(s)}async#c(){if(this.#t)return;let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:s}=await Promise.resolve().then(()=>(Ai(),xi));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#t=new s({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#l()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#l(){this.#t&&(this.#t.destroy(),this.#t=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#a())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};p("geo-map",Vt);var bt=null;async function Ds(){return bt||(bt=await Promise.resolve().then(()=>(Gt(),Wt)),bt)}var Kt=8,Os=150,Ci="vb-emoji-recent",Xt=class extends m{#t;#e;#i;#n;#r;#s=!1;#a=[];#o=-1;#c=null;#l="";#h=null;#f=!1;#d=null;#u=null;async setup(){this.#h=await Ds(),this.#f||(this.#m(),this.#f=!0),this.#t&&this.listen(this.#t,"click",this.#y),this.listen(document,"click",this.#w),this.listen(document,"keydown",this.#k)}teardown(){this.#c&&clearTimeout(this.#c)}#m(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.type="button",this.#t.textContent="\u{1F600}",this.#t.setAttribute("data-trigger",""),this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-label",this.#t.getAttribute("aria-label")||"Open emoji picker"),this.#b()}#b(){this.#e=document.createElement("div"),this.#e.classList.add("picker"),this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Emoji picker"),this.#e.hidden=!0,this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder="Search emoji\u2026",this.#i.setAttribute("aria-label","Search emoji"),this.#i.addEventListener("input",this.#C),this.#i.addEventListener("keydown",this.#x),this.#e.appendChild(this.#i),this.#r=document.createElement("nav"),this.#r.classList.add("categories"),this.#r.setAttribute("role","tablist"),this.#r.setAttribute("aria-label","Emoji categories");for(let t of this.#h.EMOJI_GROUPS){let e=document.createElement("button");e.type="button",e.setAttribute("role","tab"),e.setAttribute("aria-selected",t===this.#h.EMOJI_GROUPS[0]?"true":"false"),e.setAttribute("data-group",t),e.setAttribute("aria-label",this.#h.EMOJI_GROUP_LABELS[t]),e.title=this.#h.EMOJI_GROUP_LABELS[t],e.textContent=this.#h.EMOJI_GROUP_ICONS[t],e.addEventListener("click",this.#A),this.#r.appendChild(e)}this.#e.appendChild(this.#r),this.#n=document.createElement("div"),this.#n.classList.add("grid"),this.#n.setAttribute("role","grid"),this.#n.setAttribute("aria-label","Emoji"),this.#n.addEventListener("keydown",this.#T),this.#e.appendChild(this.#n),this.appendChild(this.#e),this.#v()}#v(t=null){this.#n.innerHTML="",this.#a=[],this.#o=-1;let e=this.#M();if(!this.#l&&e.length>0){let s=document.createElement("div");s.classList.add("group-label"),s.textContent="Recently Used",s.setAttribute("data-group-heading","recent"),this.#n.appendChild(s);for(let n of e){let o=this.#h.EMOJI_MAP.get(n);o&&this.#p(o)}}let i=t||null;if(i)if(i.length===0){let s=document.createElement("div");s.classList.add("no-results"),s.textContent="No emoji found",this.#n.appendChild(s)}else for(let s of i)this.#p(s);else for(let s of this.#h.EMOJI_GROUPS){let n=document.createElement("div");n.classList.add("group-label"),n.textContent=this.#h.EMOJI_GROUP_LABELS[s],n.setAttribute("data-group-heading",s),this.#n.appendChild(n);let o=this.#h.getByGroup(s);for(let a of o)this.#p(a)}}#p(t){let e=document.createElement("button");e.type="button",e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e.setAttribute("data-shortcode",t.shortcode),e.title=`${t.name} :${t.shortcode}:`,e.textContent=t.emoji,e.addEventListener("click",this.#E),this.#n.appendChild(e),this.#a.push(e)}#g(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);if(e){if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"){let i=e;this.#d={start:i.selectionStart??i.value.length,end:i.selectionEnd??i.value.length},this.#u=null}else if(e.isContentEditable){let i=window.getSelection();i&&i.rangeCount>0&&(this.#u=i.getRangeAt(0).cloneRange()),this.#d=null}}}#y=t=>{t.stopPropagation(),this.toggle()};#w=t=>{this.#s&&!this.contains(t.target)&&this.close()};#k=t=>{t.key==="Escape"&&this.#s&&(t.preventDefault(),this.close(),this.#t?.focus())};#C=()=>{this.#c&&clearTimeout(this.#c),this.#c=setTimeout(()=>{if(this.#l=this.#i.value.trim(),this.#l){let t=this.#h.searchEmoji(this.#l);this.#v(t)}else this.#v()},Os)};#x=t=>{t.key==="ArrowDown"&&(t.preventDefault(),this.#a.length>0&&this.#S(0))};#A=t=>{let e=t.currentTarget.getAttribute("data-group");for(let s of this.#r.querySelectorAll('[role="tab"]'))s.setAttribute("aria-selected",s===t.currentTarget?"true":"false");this.#l&&(this.#i.value="",this.#l="",this.#v());let i=this.#n.querySelector(`[data-group-heading="${e}"]`);i&&i.scrollIntoView({block:"start",behavior:"smooth"})};#T=t=>{let e=this.#a.length;if(e!==0)switch(t.key){case"ArrowRight":t.preventDefault(),this.#S(this.#o+1);break;case"ArrowLeft":t.preventDefault(),this.#S(this.#o-1);break;case"ArrowDown":t.preventDefault(),this.#S(this.#o+Kt);break;case"ArrowUp":t.preventDefault(),this.#o<Kt?(this.#i.focus(),this.#o=-1):this.#S(this.#o-Kt);break;case"Home":t.preventDefault(),this.#S(0);break;case"End":t.preventDefault(),this.#S(e-1);break;case"Enter":case" ":t.preventDefault(),this.#o>=0&&this.#a[this.#o].click();break;case"Tab":this.close();break}};#E=t=>{let e=t.currentTarget.getAttribute("data-shortcode"),i=this.#h.EMOJI_MAP.get(e);i&&(this.#R(e),this.#$(i),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),this.#L())};#S(t){let e=this.#a.length;e!==0&&(t<0&&(t=0),t>=e&&(t=e-1),this.#o=t,this.#a[t].focus())}#$(t){let e=this.getAttribute("for");if(!e)return;let i=document.getElementById(e);if(i){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"){let s=i,n=this.#d?.start??s.value.length,o=this.#d?.end??n,a=s.value.slice(0,n),l=s.value.slice(o);s.value=a+t.emoji+l;let c=n+t.emoji.length;s.setSelectionRange(c,c),this.#d={start:c,end:c},i.dispatchEvent(new Event("input",{bubbles:!0}))}else if(i.isContentEditable){i.focus();let s=window.getSelection();if(s&&this.#u){s.removeAllRanges(),s.addRange(this.#u);let n=s.getRangeAt(0);n.deleteContents();let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n),this.#u=n.cloneRange()}else if(s){let n=document.createRange();n.selectNodeContents(i),n.collapse(!1);let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n)}}}}#L(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);e&&e.focus()}#M(){try{return JSON.parse(localStorage.getItem(Ci)||"[]")}catch{return[]}}#R(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#M();i=i.filter(s=>s!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(Ci,JSON.stringify(i))}catch{}}open(){this.#s||(this.#g(),this.#s=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#i.value="",this.#l="",this.#v(),requestAnimationFrame(()=>{this.#i.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#s&&(this.#s=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#e.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#s?this.close():this.open()}get isOpen(){return this.#s}};p("emoji-picker",Xt);var Jt=class r extends m{#t=null;#e=null;#i=!1;#n=null;setup(){this.setAttribute("role","list"),this.#i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#s(),this.#o(),this.#u(),this.#r()}teardown(){this.#t&&(this.#t.remove(),this.#t=null),r.#A?.source===this&&(r.#A=null)}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")||"vertical"}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#r(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("aria-grabbed")||t.setAttribute("aria-grabbed","false")}#s(){this.#t=document.createElement("div"),this.#t.setAttribute("role","status"),this.#t.setAttribute("aria-live","polite"),this.#t.setAttribute("aria-atomic","true"),this.#t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",this.prepend(this.#t)}#a(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#o(){this.listen(this,"pointerdown",t=>{this.#n=t.target}),this.listen(this,"dragstart",this.#c.bind(this)),this.listen(this,"dragover",this.#l.bind(this)),this.listen(this,"dragleave",this.#h.bind(this)),this.listen(this,"drop",this.#f.bind(this)),this.listen(this,"dragend",this.#d.bind(this))}#c(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.querySelector("[data-drag-handle]");if(i&&!i.contains(this.#n)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let s=this.#g(e);r.#A={item:e,source:this,originalIndex:s},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#l(t){let e=r.#A;if(!e||(this.group||e.source.group)&&this.group!==e.source.group)return;t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over","");let i=this.orientation==="horizontal"?t.clientX:t.clientY;this.#C(i)}#h(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#x())}#f(t){t.preventDefault(),this.removeAttribute("data-drag-over"),this.#x();let e=r.#A;if(!e)return;let{item:i,source:s,originalIndex:n}=e,o=this.orientation==="horizontal"?t.clientX:t.clientY,a=this.#k(o);if(s===this){this.#y(i,a),this.#w();let l=this.#g(i);this.#b(i),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,oldIndex:n,newIndex:l,order:this.sortedOrder}}))}else this.#y(i,a),this.#w(),s.#w(),this.#b(i),this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,fromSurface:s,toSurface:this,newIndex:this.#g(i),fromOrder:s.sortedOrder,toOrder:this.sortedOrder}}))}#d(){let t=r.#A;t?.item&&t.item.removeAttribute("data-dragging"),this.removeAttribute("data-drag-over"),this.#x(),r.#A=null,this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#u(){this.listen(this,"keydown",this.#m.bind(this))}#m(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.getAttribute("aria-grabbed")==="true",s=this.orientation==="horizontal",n=s?"ArrowLeft":"ArrowUp",o=s?"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){if(t.preventDefault(),i){e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#w(),this.#b(e);let c=this.#g(e),h=this.draggableChildren;this.#a(`${this.#p(e)}, dropped at position ${c+1} of ${h.length}`),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,oldIndex:this.#e,newIndex:c,order:this.sortedOrder}})),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null}else{this.#e=this.#g(e),e.setAttribute("aria-grabbed","true"),this.setAttribute("data-reorder-mode","");let c=this.draggableChildren;this.#a(`${this.#p(e)}, grabbed. Position ${this.#e+1} of ${c.length}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}return}if(!i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&c[u].focus();return}if(i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&(this.#y(e,u),e.focus(),this.#a(`Position ${u+1} of ${c.length}`));return}let a=s?"ArrowUp":"ArrowLeft",l=s?"ArrowDown":"ArrowRight";if(i&&(t.key===a||t.key===l)){if(t.preventDefault(),!this.group)return;let c=t.key===l?1:-1,h=this.#v(c);if(!h)return;h.appendChild(e),h.#w(),this.#w(),h.#b(e),e.focus();let u=h.getAttribute("aria-label")||"next surface";h.#a(`Moved to ${u}`),h.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,fromSurface:this,toSurface:h,newIndex:h.draggableChildren.indexOf(e),fromOrder:this.sortedOrder,toOrder:h.sortedOrder}})),this.removeAttribute("data-reorder-mode"),h.setAttribute("data-reorder-mode",""),this.#e=null;return}if(i&&t.key==="Escape"){t.preventDefault(),e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#e!=null&&(this.#y(e,this.#e),e.focus()),this.#a("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null;return}!i&&t.key==="Escape"&&(t.preventDefault(),e.blur())}#b(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#v(t){if(!this.group)return null;let e=[...document.querySelectorAll(`drag-surface[group="${this.group}"]`)];if(e.length<2)return null;e.sort((n,o)=>{let a=n.getBoundingClientRect(),l=o.getBoundingClientRect();return a.left-l.left||a.top-l.top});let i=e.indexOf(this);return e[i+t]||null}#p(t){return t.dataset.id||t.textContent.trim().slice(0,40)}#g(t){return this.draggableChildren.indexOf(t)}#y(t,e){let s=this.draggableChildren.filter(n=>n!==t)[e]||null;s?this.insertBefore(t,s):this.appendChild(t)}#w(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#k(t){let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o)return s}return i.length}#C(t){this.#x();let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o){i[s].setAttribute("data-drop-target","before");return}}i.length>0&&i[i.length-1].setAttribute("data-drop-target","after")}#x(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#A=null};p("drag-surface",Jt);var Yt=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),$i={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function rt(r){let t=Yt?$i.mac:$i.other;return r.split("+").map(e=>{let i=e.trim().toLowerCase();return t[i]??i.toUpperCase()}).join(Yt?"":"+")}function Ti(r){let t=r.toLowerCase().split("+").map(i=>i.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function Li(r,t){if(r.key.toLowerCase()!==t.key)return!1;let e,i;return Yt?(e=t.meta,i=t.ctrl):(e=!1,i=t.meta||t.ctrl),!(e!==r.metaKey||i!==r.ctrlKey||t.shift!==r.shiftKey||t.alt!==r.altKey)}var Fs=new Set(["INPUT","TEXTAREA","SELECT"]),nt=[],Mi=!1;function Hs(r){let t=Fs.has(r.target.tagName)||r.target.isContentEditable;for(let e of nt)if(!(t&&!e.global)&&Li(r,e.descriptor)){r.preventDefault(),e.callback(r);return}}function Us(){Mi||(document.addEventListener("keydown",Hs),Mi=!0)}function Y(r,t,e={}){Us();let i=Ti(r),s={combo:r,descriptor:i,callback:t,global:e.global===!0};return nt.find(o=>o.combo===r)&&console.warn(`[hotkey-bind] Shortcut "${r}" already bound. Last-connected-wins.`),nt.unshift(s),function(){let a=nt.indexOf(s);a!==-1&&nt.splice(a,1)}}var Zt=class extends m{#t;#e;#i;#n=[];#r=-1;#s=[];#a=null;#o=[];setup(){this.#c(),this.#l(),this.hasAttribute("discover")&&this.#b()}teardown(){this.#a?.()}#c(){this.#t=document.createElement("dialog"),this.#t.className="command-dialog",this.#t.addEventListener("click",i=>{i.target===this.#t&&this.close()});let t=document.createElement("div");t.className="command-search",this.#e=document.createElement("input"),this.#e.type="search",this.#e.placeholder=this.getAttribute("placeholder")||"Type a command...",this.#e.setAttribute("aria-label","Search commands"),this.#e.autocomplete="off",this.#e.addEventListener("input",this.#h),this.#e.addEventListener("keydown",this.#f),t.appendChild(this.#e),this.#i=document.createElement("div"),this.#i.className="command-list",this.#i.setAttribute("role","listbox"),this.#s=Array.from(this.querySelectorAll("command-group")),this.#s.forEach(i=>{let s=document.createElement("div");s.className="command-group-header",s.textContent=i.getAttribute("label")||"",s.setAttribute("role","presentation");let n=Array.from(i.querySelectorAll("command-item"));this.#i.appendChild(s),n.forEach(o=>{let a=document.createElement("button");a.className="command-option",a.setAttribute("role","option"),a.dataset.value=o.getAttribute("value")||"",a.dataset.searchText=o.textContent.toLowerCase().trim();let l=o.querySelector('[slot="icon"]');if(l){let u=document.createElement("span");u.className="command-icon",u.appendChild(l.cloneNode(!0)),a.appendChild(u)}let c=document.createElement("span");c.className="command-label",c.textContent=o.textContent.trim(),a.appendChild(c);let h=o.getAttribute("data-hotkey");if(h){let u=document.createElement("kbd");u.className="command-kbd",u.textContent=rt(h),a.appendChild(u)}a.addEventListener("click",()=>{this.#m(a.dataset.value)}),this.#i.appendChild(a),this.#n.push({btn:a,header:s,group:i})})});let e=document.createElement("div");e.className="command-empty",e.textContent="No results found.",e.hidden=!0,this.#i.appendChild(e),this.#t.appendChild(t),this.#t.appendChild(this.#i),this.appendChild(this.#t)}#l(){let t=this.getAttribute("hotkey")||"meta+k";this.#a=Y(t,()=>{this.#t.open?this.close():this.open()},{global:!0})}#h=()=>{let t=this.#e.value.toLowerCase().trim(),e=0,i=new Set;this.#n.forEach(({btn:n,header:o})=>{let a=!t||n.dataset.searchText.includes(t);n.hidden=!a,a&&(e++,i.add(o))}),this.#i.querySelectorAll(".command-group-header").forEach(n=>{n.hidden=!i.has(n)});let s=this.#i.querySelector(".command-empty");s&&(s.hidden=e>0),this.#r=-1,e>0&&this.#u(0)};#f=t=>{let e=this.#d();switch(t.key){case"ArrowDown":t.preventDefault(),this.#u(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#u(this.#r-1);break;case"Enter":t.preventDefault(),this.#r>=0&&e[this.#r]&&e[this.#r].btn.click();break;case"Escape":t.preventDefault(),this.close();break}};#d(){return this.#n.filter(({btn:t})=>!t.hidden)}#u(t){let e=this.#d();if(e.length===0)return;e.forEach(({btn:s})=>s.removeAttribute("data-active")),t<0&&(t=e.length-1),t>=e.length&&(t=0),this.#r=t;let{btn:i}=e[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"})}#m(t){this.close(),this.dispatchEvent(new CustomEvent("command-palette:select",{bubbles:!0,detail:{value:t}}))}#b(){this.listen(document,"vb:command-registry-change",this.#v)}#v=()=>{this.#t?.open&&(this.#p(),this.#h())};#p(){if(!this.hasAttribute("discover"))return;let{getRegisteredCommands:t,scanAutoDiscoverable:e}=window.__commandRegistry||{};if(!t)return;this.#n=this.#n.filter(n=>!n.discovered),this.#o.forEach(n=>n.remove()),this.#o=[];let i=this.#i.querySelector(".command-empty"),s=t();for(let[n,o]of s){let a=document.createElement("div");a.className="command-group-header",a.textContent=n,a.setAttribute("role","presentation"),this.#i.insertBefore(a,i),this.#o.push(a);for(let l of o){if(this.contains(l.element))continue;let c=this.#g(l.label,l.icon,l.shortcut);c.dataset.value=`__discovered:${l.label}`,c.addEventListener("click",()=>{this.close(),l.element.click()}),this.#i.insertBefore(c,i),this.#n.push({btn:c,header:a,group:null,discovered:!0})}}if(this.getAttribute("discover")==="auto"&&e){let n=e(),o=new Map;for(let a of n){let l=o.get(a.group)||[];l.push(a),o.set(a.group,l)}for(let[a,l]of o){let c=document.createElement("div");c.className="command-group-header",c.textContent=a,c.setAttribute("role","presentation"),this.#i.insertBefore(c,i),this.#o.push(c);for(let h of l){if(this.contains(h.element))continue;let u=this.#g(h.label,h.icon,h.shortcut);u.dataset.value=`__auto:${h.label}`,u.dataset.auto="",u.addEventListener("click",()=>{this.close(),h.action?h.action():h.element.click()}),this.#i.insertBefore(u,i),this.#n.push({btn:u,header:c,group:null,discovered:!0})}}}}#g(t,e,i){let s=document.createElement("button");if(s.className="command-option",s.setAttribute("role","option"),s.dataset.searchText=t.toLowerCase(),e){let o=document.createElement("span");o.className="command-icon";let a=document.createElement("icon-wc");a.setAttribute("name",e),o.appendChild(a),s.appendChild(o)}let n=document.createElement("span");if(n.className="command-label",n.textContent=t,s.appendChild(n),i){let o=document.createElement("kbd");o.className="command-kbd",o.textContent=rt(i),s.appendChild(o)}return s}open(){this.#t.open||(this.#p(),this.#t.showModal(),this.#e.value="",this.#h(),this.#e.focus(),this.dispatchEvent(new CustomEvent("command-palette:open",{bubbles:!0})))}close(){this.#t.open&&(this.#t.close(),this.dispatchEvent(new CustomEvent("command-palette:close",{bubbles:!0})))}get isOpen(){return this.#t?.open??!1}},Qt=class extends HTMLElement{},te=class extends HTMLElement{};p("command-palette",Zt);p("command-group",Qt);p("command-item",te);var ee=class extends m{#t;#e=null;setup(){this.#i(),this.#e=Y("shift+?",()=>{this.#t.open?this.#t.close():this.#n()})}teardown(){this.#e?.(),this.#e=null,this.#t?.remove(),this.#t=null}#i(){this.#t=document.createElement("dialog"),this.#t.className="shortcut-dialog",this.#t.addEventListener("click",t=>{t.target===this.#t&&this.#t.close()}),this.appendChild(this.#t)}#n(){this.#t.innerHTML="";let t=document.createElement("div");t.className="shortcut-header",t.innerHTML="<h2>Keyboard Shortcuts</h2>",this.#t.appendChild(t);let e=document.createElement("div");e.className="shortcut-body";let{getRegisteredCommands:i}=window.__commandRegistry||{},s=new Map;if(s.set("General",[{label:"Show keyboard shortcuts",shortcut:"shift+?"}]),i)for(let[o,a]of i())for(let l of a){if(!l.shortcut)continue;let c=s.get(o)||[];c.push({label:l.label,shortcut:l.shortcut}),s.set(o,c)}let{getHotkeyActions:n}=window.__hotkeyActionRegistry||{};if(n)for(let[o,a]of n()){let l=s.get(o)||[];for(let c of a)l.push({label:c.label,shortcut:c.shortcut});s.set(o,l)}for(let[o,a]of s){let l=document.createElement("div");l.className="shortcut-group";let c=document.createElement("div");c.className="shortcut-group-header",c.textContent=o,l.appendChild(c);for(let h of a){let u=document.createElement("div");u.className="shortcut-row";let d=document.createElement("span");d.className="shortcut-label",d.textContent=h.label;let f=document.createElement("kbd");f.className="shortcut-kbd",f.textContent=rt(h.shortcut),u.appendChild(d),u.appendChild(f),l.appendChild(u)}e.appendChild(l)}this.#t.appendChild(e),this.#t.showModal()}};p("short-cuts",ee);var ie=class extends m{#t;#e=!1;setup(){let t=[...this.children];if(t.length<2)return!1;t.length>2&&console.warn("[compare-surface] Expected exactly 2 children; extra children will be ignored.");let e=this.getAttribute("position"),i=e!==null?Number(e):50,s=Math.min(100,Math.max(0,isNaN(i)?50:i));this.#t=document.createElement("div"),this.#t.className="comparison-divider",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-label","Comparison slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-valuenow",String(Math.round(s))),this.#t.setAttribute("tabindex","0"),this.appendChild(this.#t),this.#a(s),this.listen(this.#t,"pointerdown",this.#i),this.listen(this.#t,"keydown",this.#s)}teardown(){this.#t&&(this.#t.remove(),this.#t=null),this.#e=!1}#i=t=>{t.preventDefault(),this.#e=!0,this.#t.setPointerCapture(t.pointerId),this.#t.addEventListener("pointermove",this.#n),this.#t.addEventListener("pointerup",this.#r)};#n=t=>{if(!this.#e)return;let e=this.getBoundingClientRect(),i=t.clientX-e.left,s=Math.min(100,Math.max(0,i/e.width*100));this.#a(s)};#r=t=>{this.#e=!1,this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#n),this.#t.removeEventListener("pointerup",this.#r)};#s=t=>{let e=t.shiftKey?10:1,i=Number(this.#t.getAttribute("aria-valuenow"));t.key==="ArrowLeft"||t.key==="ArrowDown"?(t.preventDefault(),this.#a(Math.max(0,i-e))):(t.key==="ArrowRight"||t.key==="ArrowUp")&&(t.preventDefault(),this.#a(Math.min(100,i+e)))};#a(t){let e=Math.round(t);this.style.setProperty("--_position",`${t}%`),this.#t&&(this.#t.setAttribute("aria-valuenow",String(e)),this.#t.style.left=`${t}%`),this.setAttribute("position",String(e)),this.dispatchEvent(new CustomEvent("compare-surface:change",{detail:{position:t},bubbles:!0}))}get position(){return Number(this.getAttribute("position"))||0}set position(t){let e=Math.min(100,Math.max(0,Number(t)||0));this.#a(e)}};p("compare-surface",ie);function Vs(){let r=globalThis.localStorage;if(!r)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return r.getItem(t)},async setRaw(t,e){r.setItem(t,e)},async removeRaw(t){r.removeItem(t)},async keys(t){let e=[];for(let i=0;i<r.length;i++){let s=r.key(i);s&&s.startsWith(t)&&e.push(s)}return e}}}var vt=null;function D(){return vt||(vt=Vs()),vt}function se(r,t){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${r}:${t}`}function _i(r){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${r}:`}function Ri(r){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var T={configure(r={}){vt=r.backend??null},async set(r,t,e){let i={data:e,timestamp:Date.now()};await D().setRaw(se(r,t),JSON.stringify(i))},async get(r,t,e){let i=await D().getRaw(se(r,t));if(i==null)return null;let s=Ri(i);return!s||e?.maxAge!=null&&Date.now()-s.timestamp>e.maxAge?null:s.data},async remove(r,t){await D().removeRaw(se(r,t))},async list(r){let t=_i(r),e=await D().keys(t),i=[];for(let s of e){let n=await D().getRaw(s);if(n==null)continue;let o=Ri(n);o&&i.push({key:s.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(r){let t=_i(r),e=await D().keys(t);for(let i of e)await D().removeRaw(i)},async clearAll(){let r=await D().keys("vb:");for(let t of r)await D().removeRaw(t)},async setMany(r,t){for(let[e,i]of t)await T.set(r,e,i)}};var re=class extends m{#t;#e;#i;#n=!1;#r=50;#s=!1;#a=50;get#o(){return this.getAttribute("direction")==="vertical"}get#c(){let t=this.getAttribute("min"),e=Number(t);return t!==null&&!isNaN(e)?e:10}get#l(){let t=this.getAttribute("max"),e=Number(t);return t!==null&&!isNaN(e)?e:90}get position(){return this.#r}set position(t){this.#p(Number(t))}get collapsed(){return this.#s}set collapsed(t){t?this.#b():this.#v()}reset(){let t=this.getAttribute("position"),e=Number(t),i=t!==null&&!isNaN(e)?e:50;this.#s=!1,this.#p(i),this.#w()}async setup(){let t=[...this.children].filter(a=>!a.classList.contains("split-divider"));if(t.length<2)return!1;this.#e=t[0],this.#i=t[1];let e=this.getAttribute("position"),i=Number(e),s=e!==null&&!isNaN(i)?i:null,n=await this.#g(),o=s??n??50;this.#t=document.createElement("div"),this.#t.className="split-divider",this.#t.setAttribute("role","separator"),this.#t.setAttribute("aria-orientation",this.#o?"vertical":"horizontal"),this.#t.setAttribute("aria-valuenow",String(Math.round(o))),this.#t.setAttribute("aria-valuemin",String(this.#c)),this.#t.setAttribute("aria-valuemax",String(this.#l)),this.#t.setAttribute("aria-label","Resize panels"),this.#t.setAttribute("tabindex","0"),this.insertBefore(this.#t,this.#i),this.#p(o),this.listen(this.#t,"pointerdown",this.#h),this.listen(this.#t,"keydown",this.#u),this.hasAttribute("collapsible")&&this.listen(this.#t,"dblclick",this.#m)}teardown(){this.#t&&(this.#t.remove(),this.#t=null)}#h=t=>{t.preventDefault(),this.#n=!0,this.#t.setPointerCapture(t.pointerId),this.style.userSelect="none",this.#t.addEventListener("pointermove",this.#f),this.#t.addEventListener("pointerup",this.#d)};#f=t=>{if(!this.#n)return;let e=this.getBoundingClientRect(),i;this.#o?i=(t.clientY-e.top)/e.height*100:i=(t.clientX-e.left)/e.width*100,this.#s&&(this.#s=!1),this.#p(i)};#d=t=>{this.#n=!1,this.#t.releasePointerCapture(t.pointerId),this.style.userSelect="",this.#t.removeEventListener("pointermove",this.#f),this.#t.removeEventListener("pointerup",this.#d),this.#y()};#u=t=>{let e=t.shiftKey?10:1,i=this.#r,s=this.#o?["ArrowUp"]:["ArrowLeft"],n=this.#o?["ArrowDown"]:["ArrowRight"];s.includes(t.key)?(t.preventDefault(),this.#p(i-e),this.#y()):n.includes(t.key)?(t.preventDefault(),this.#p(i+e),this.#y()):t.key==="Home"?(t.preventDefault(),this.#p(this.#c),this.#y()):t.key==="End"&&(t.preventDefault(),this.#p(this.#l),this.#y())};#m=()=>{this.#s?this.#v():this.#b(),this.#y()};#b(){this.#a=this.#r,this.#s=!0,this.#e.style.flexBasis="0%",this.#e.style.overflow="hidden",this.#t.setAttribute("aria-valuenow","0"),this.#r=0,this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!0},bubbles:!0}))}#v(){this.#s=!1,this.#e.style.overflow="auto",this.#p(this.#a),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!1},bubbles:!0}))}#p(t){let e=this.#s?0:Math.min(this.#l,Math.max(this.#c,t));this.#r=e,this.#e.style.flexBasis=`${e}%`,this.#e.style.flexGrow="0",this.#e.style.flexShrink="0",this.#e.style.overflow="auto",this.#i.style.flexGrow="1",this.#i.style.overflow="auto",this.#t.setAttribute("aria-valuenow",String(Math.round(e))),this.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:e},bubbles:!0}))}async#g(){let t=this.getAttribute("persist");if(!t)return null;let e=await T.get("layout",`split:${t}`);return typeof e=="number"?e:null}#y(){let t=this.getAttribute("persist");t&&T.set("layout",`split:${t}`,Math.round(this.#r)).catch(()=>{})}#w(){let t=this.getAttribute("persist");t&&T.remove("layout",`split:${t}`).catch(()=>{})}};p("split-surface",re);var ne=class extends m{#t;#e=null;setup(){this.#e===null&&(this.#e=this.getAttribute("value")||this.textContent.trim());let t=this.#e;if(!t)return!1;let e=parseInt(this.getAttribute("size")??"200",10)||200,i=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t=document.createElement("canvas"),this.#t.width=e,this.#t.height=e,this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`QR code: ${t}`),this.#i(t,e,i)}static get observedAttributes(){return["value","size"]}attributeChangedCallback(t,e,i){if(!this.#t||!this.isConnected)return;t==="value"&&i&&(this.#e=i);let s=this.#e||this.getAttribute("value")||"";if(!s)return;let n=parseInt(this.getAttribute("size")??"200",10)||200,o=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t.width=n,this.#t.height=n,this.#t.setAttribute("aria-label",`QR code: ${s}`),this.#i(s,n,o)}#i(t,e,i){let s=Gs(t,i),n=this.#t.getContext("2d"),o=s.length,a=e/o,l=getComputedStyle(this),c=this.getAttribute("color")||l.color||"#000",h=this.getAttribute("background")||"transparent";n.clearRect(0,0,e,e),h!=="transparent"&&(n.fillStyle=h,n.fillRect(0,0,e,e)),n.fillStyle=c;for(let d=0;d<o;d++)for(let f=0;f<o;f++)s[d][f]&&n.fillRect(Math.round(f*a),Math.round(d*a),Math.ceil(a),Math.ceil(a));this.textContent="",this.appendChild(this.#t);let u=document.createElement("span");u.className="sr-only",u.textContent=t,this.appendChild(u)}toDataURL(t="image/png"){return this.#t?.toDataURL(t)??""}},yt=[[[26,7],[44,10],[70,15],[100,20],[134,26],[172,18],[196,20],[242,24],[292,30],[346,18]],[[26,10],[44,16],[70,26],[100,18],[134,24],[172,16],[196,18],[242,22],[292,22],[346,26]],[[26,13],[44,22],[70,18],[100,26],[134,18],[172,24],[196,18],[242,22],[292,20],[346,28]],[[26,17],[44,28],[70,22],[100,16],[134,22],[172,28],[196,26],[242,26],[292,24],[346,28]]],Ws=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,52]];function Gs(r,t=1){let e=new TextEncoder().encode(r),i=Ks(e.length,t),s=yt[t][i-1][0],n=yt[t][i-1][1],o=s-n,a=Xs(e,i,o),l=Js(a,o,n),c=i*4+17,h=Array.from({length:c},()=>new Uint8Array(c)),u=Array.from({length:c},()=>new Uint8Array(c));return Zs(h,u,c),Qs(h,u,i),tr(h,u,c),er(u,c),ir(h,u,l,c),cr(h,u,c,t)}function Ks(r,t){for(let e=1;e<=10;e++){let i=yt[t][e-1][0],s=yt[t][e-1][1],n=i-s,o=e<=9?8:16,a=Math.ceil((4+o)/8);if(r<=n-a)return e}return 10}function Xs(r,t,e){let i=[],s=(u,d)=>{for(let f=d-1;f>=0;f--)i.push(u>>f&1)};s(4,4);let n=t<=9?8:16;s(r.length,n);for(let u of r)s(u,8);let o=e*8,a=Math.min(4,o-i.length);for(s(0,a);i.length%8!==0;)i.push(0);let l=[236,17],c=0;for(;i.length<o;)s(l[c%2],8),c++;let h=[];for(let u=0;u<i.length;u+=8){let d=0;for(let f=0;f<8;f++)d=d<<1|(i[u+f]||0);h.push(d)}return h}function Js(r,t,e){let i=Ys(e),s=new Uint8Array(t+e);for(let o=0;o<t;o++)s[o]=r[o];for(let o=0;o<t;o++){let a=s[o];if(a===0)continue;let l=wt[a];for(let c=0;c<i.length;c++)s[o+c]^=ot[(l+wt[i[c]])%255]}let n=[...r.slice(0,t)];for(let o=0;o<e;o++)n.push(s[t+o]);return n}var ot=new Uint8Array(512),wt=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)ot[e]=t,wt[t]=e,t<<=1,t>=256&&(t^=285);for(let e=255;e<512;e++)ot[e]=ot[e-255]})();function Ys(r){let t=new Uint8Array([1]);for(let e=0;e<r;e++){let i=new Uint8Array(t.length+1),s=e;for(let n=0;n<t.length;n++)i[n]^=t[n],i[n+1]^=ot[(wt[t[n]]+s)%255];t=i}return t}function Zs(r,t,e){let i=[[0,0],[e-7,0],[0,e-7]];for(let[s,n]of i){for(let o=0;o<7;o++)for(let a=0;a<7;a++){let l=o===0||o===6||a===0||a===6||o>=2&&o<=4&&a>=2&&a<=4;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}for(let o=-1;o<=7;o++)for(let[a,l]of[[o,-1],[o,7],[-1,o],[7,o]]){let c=s+a,h=n+l;c>=0&&c<e&&h>=0&&h<e&&(r[c][h]=0,t[c][h]=1)}}}function Qs(r,t,e){if(e<2)return;let i=Ws[e-1];for(let s of i)for(let n of i)if(!t[s][n])for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++){let l=Math.abs(o)===2||Math.abs(a)===2||o===0&&a===0;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}}function tr(r,t,e){for(let i=8;i<e-8;i++){let s=i%2===0?1:0;t[6][i]||(r[6][i]=s,t[6][i]=1),t[i][6]||(r[i][6]=s,t[i][6]=1)}}function er(r,t){for(let e=0;e<=8;e++)e<t&&(r[8][e]=1),e<t&&(r[e][8]=1);for(let e=0;e<=7;e++)r[8][t-1-e]=1,r[t-1-e][8]=1;r[t-8][8]=1}function ir(r,t,e,i){let s=[];for(let a of e)for(let l=7;l>=0;l--)s.push(a>>l&1);let n=0,o=!0;for(let a=i-1;a>=1;a-=2){a===6&&(a=5);let l=o?Array.from({length:i},(c,h)=>i-1-h):Array.from({length:i},(c,h)=>h);for(let c of l)for(let h of[a,a-1])h<0||h>=i||t[c][h]||(r[c][h]=n<s.length?s[n]:0,n++);o=!o}}var sr=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107];function rr(r,t){let i=[1,0,3,2][r]*8+t;return sr[i]}var nr=[(r,t)=>(r+t)%2===0,r=>r%2===0,(r,t)=>t%3===0,(r,t)=>(r+t)%3===0,(r,t)=>(Math.floor(r/2)+Math.floor(t/3))%2===0,(r,t)=>r*t%2+r*t%3===0,(r,t)=>(r*t%2+r*t%3)%2===0,(r,t)=>((r+t)%2+r*t%3)%2===0];function or(r,t,e,i){let s=r.map(o=>new Uint8Array(o)),n=nr[i];for(let o=0;o<e;o++)for(let a=0;a<e;a++)!t[o][a]&&n(o,a)&&(s[o][a]^=1);return s}function ar(r,t,e,i){let s=rr(e,i),n=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]];for(let a=0;a<15;a++){let[l,c]=n[a];r[l][c]=s>>14-a&1}let o=[[8,t-1],[8,t-2],[8,t-3],[8,t-4],[8,t-5],[8,t-6],[8,t-7],[8,t-8],[t-7,8],[t-6,8],[t-5,8],[t-4,8],[t-3,8],[t-2,8],[t-1,8]];for(let a=0;a<15;a++){let[l,c]=o[a];r[l][c]=s>>14-a&1}r[t-8][8]=1}function lr(r,t){let e=0;for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[i][n]===r[i][n-1]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[n][i]===r[n-1][i]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t-1;i++)for(let s=0;s<t-1;s++){let n=r[i][s];n===r[i][s+1]&&n===r[i+1][s]&&n===r[i+1][s+1]&&(e+=3)}return e}function cr(r,t,e,i){let s=1/0,n=null;for(let o=0;o<8;o++){let a=or(r,t,e,o);ar(a,e,i,o);let l=lr(a,e);l<s&&(s=l,n=a)}return n}p("qr-code",ne);var oe=class extends m{#t;#e;#i;#n=!1;#r=0;#s=0;#a=0;#o=!1;#c=!1;get activated(){return this.#o}get#l(){let t=this.getAttribute("threshold"),e=Number(t);return t!==null&&!isNaN(e)?Math.min(100,Math.max(0,e)):90}setup(){this.#c||(this.#h(),this.#c=!0),this.listen(this.#t,"pointerdown",this.#f),this.listen(this.#t,"keydown",this.#m),this.listen(this.#t,"transitionend",this.#b)}#h(){this.#i=document.createElement("div"),this.#i.className="slide-track",this.#e=document.createElement("span"),this.#e.className="slide-label",this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t=document.createElement("div"),this.#t.className="slide-handle",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-valuenow","0"),this.#t.setAttribute("aria-label",this.getAttribute("label")||"Slide to confirm"),this.#t.setAttribute("tabindex","0"),this.#t.innerHTML='<icon-wc name="chevrons-right" size="sm"></icon-wc>',this.#i.append(this.#e,this.#t),this.textContent="",this.appendChild(this.#i),this.#g(0)}reset(){this.#o=!1,this.removeAttribute("data-activated"),this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t.removeAttribute("aria-disabled"),this.#t.setAttribute("tabindex","0"),this.#g(0),this.dispatchEvent(new CustomEvent("slide-accept:reset",{bubbles:!0}))}#f=t=>{if(!this.#o){if(t.preventDefault(),this.hasAttribute("transitioning")){let e=this.#t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=parseFloat(getComputedStyle(this.#i).getPropertyValue("--_handle-inset")||"0"),n=this.#t.offsetWidth,o=i.width-n-s*2,a=e.left-i.left-s;this.removeAttribute("transitioning"),this.#r=o>0?Math.max(0,Math.min(100,a/o*100)):0,this.#g(this.#r)}this.#n=!0,this.#s=t.clientX,this.#a=this.#r,this.#t.setPointerCapture(t.pointerId),this.setAttribute("data-dragging",""),this.#t.addEventListener("pointermove",this.#d),this.#t.addEventListener("pointerup",this.#u),this.#t.addEventListener("pointercancel",this.#u)}};#d=t=>{if(!this.#n)return;let e=this.#i.getBoundingClientRect().width-this.#t.offsetWidth;if(e<=0)return;let s=(t.clientX-this.#s)/e*100,n=Math.min(100,Math.max(0,this.#a+s));this.#g(n)};#u=t=>{this.#n&&(this.#n=!1,this.removeAttribute("data-dragging"),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#d),this.#t.removeEventListener("pointerup",this.#u),this.#t.removeEventListener("pointercancel",this.#u),this.#r>=this.#l?this.#v():this.#p())};#m=t=>{if(this.#o)return;let e=t.shiftKey?20:5;t.key==="ArrowRight"?(t.preventDefault(),this.#g(Math.min(100,this.#r+e))):t.key==="ArrowLeft"?(t.preventDefault(),this.#g(Math.max(0,this.#r-e))):t.key==="End"?(t.preventDefault(),this.#v()):t.key==="Home"&&(t.preventDefault(),this.#g(0)),t.key==="ArrowRight"&&this.#r>=this.#l&&this.#v()};#b=()=>{this.removeAttribute("transitioning")};#v(){this.#o=!0,this.#g(100),this.setAttribute("data-activated",""),this.#e.textContent=this.getAttribute("activated-label")||"Confirmed!",this.#t.setAttribute("aria-disabled","true"),this.#t.removeAttribute("tabindex"),this.dispatchEvent(new CustomEvent("slide-accept:accept",{bubbles:!0}))}#p(){this.setAttribute("transitioning",""),this.#g(0),setTimeout(()=>{this.hasAttribute("transitioning")&&this.removeAttribute("transitioning")},500)}#g(t){this.#r=t,this.style.setProperty("--_slide-position",String(t)),this.#t.setAttribute("aria-valuenow",String(Math.round(t)))}};p("slide-accept",oe);var ae=class extends m{static observedAttributes=["colors","names","layout","show-values","show-names","size","editable"];#t=[];setup(){this.#e()}attributeChangedCallback(){this.isConnected&&this.#e()}#e(){let t=this.getAttribute("colors")||"",e=this.getAttribute("names")||"",i=this.getAttribute("layout")||"inline",s=this.getAttribute("size")||"md",n=this.hasAttribute("show-values"),o=this.hasAttribute("show-names")||e.length>0,a=this.hasAttribute("editable"),l=this.#c(t);this.#t=l.slice();let c=e?e.split(",").map(g=>g.trim()):[],u={sm:48,md:80,lg:120}[s]||80,d="display:flex;flex-wrap:wrap;gap:var(--size-xs,0.5rem)";i==="grid"?d=`display:grid;grid-template-columns:repeat(auto-fill,minmax(${u}px,1fr));gap:var(--size-xs,0.5rem)`:i==="list"&&(d="display:flex;flex-direction:column;gap:var(--size-xs,0.5rem)");let f=l.map((g,v)=>{let b=c[v]||"",k=this.#l(g),S=i==="list"?"display:flex;flex-direction:row;align-items:center;gap:0.75rem":`display:flex;flex-direction:column;align-items:center;gap:0.25rem;max-inline-size:${u}px`,N=i==="list"?36:u,j=`background:${g};color:${k};width:${N}px;height:${N}px;border:1px solid oklch(0% 0 0/0.15);border-radius:var(--radius-s,0.25rem);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;font-family:var(--font-mono,monospace);position:relative;overflow:hidden;flex-shrink:0`;if(a){let z=this.#a(g);return`<div class="swatch-wrap" role="listitem" style="${S}">
|
|
1063
|
+
`}loadTiles(){let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i)){this.handleError("Missing or invalid lat/lng coordinates");return}let s=this.zoom,n=this.provider,{tileX:o,tileY:a,pixelX:l,pixelY:c}=wi(e,i,s),h=this.shadowRoot.querySelector('[part="tiles"]');if(!h)return;h.innerHTML="";let u=this,d=u.offsetWidth||400,f=u.offsetHeight||300,g=Math.round(d/2-256-l),v=Math.round(f/2-256-c);h.style.transform=`translate(${g}px, ${v}px)`;let b=0,k=0,S=9;for(let N=-1;N<=1;N++)for(let j=-1;j<=1;j++){let z=o+j,I=a+N,Ts=mt(n,s,z,I,this.tileUrl),H=document.createElement("img");H.src=Ts,H.alt="",H.loading="lazy",H.draggable=!1,H.addEventListener("load",()=>{b++,b+k===S&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),H.addEventListener("error",()=>{k++,k===S?this.handleError("Failed to load map tiles"):b+k===S&&this.dispatchEvent(new CustomEvent("geo-map:ready",{bubbles:!0,detail:{lat:e,lng:i,zoom:s}}))}),h.appendChild(H)}}#a(){let t=this.shadowRoot.querySelector('[part="overlay"]');if(!t)return;let e=t.querySelector('[part="activate"]');t.addEventListener("mouseenter",()=>this.#o(),{once:!0}),e&&e.addEventListener("focus",()=>this.#o(),{once:!0}),e&&e.addEventListener("click",()=>this.#c()),this.interactive==="eager"&&requestAnimationFrame(()=>this.#c())}#o(){if(this.#e)return;let t=this.tileUrl;if(t)try{let n=new URL(t,location.origin);if(n.origin===location.origin){this.#e=!0;return}this.#e=!0;let o=document.createElement("link");o.rel="preconnect",o.href=n.origin,o.crossOrigin="",document.head.appendChild(o);return}catch{}this.#e=!0;let e=this.provider,i;e==="carto-light"||e==="carto-dark"?i="https://basemaps.cartocdn.com":i="https://tile.openstreetmap.org";let s=document.createElement("link");s.rel="preconnect",s.href=i,s.crossOrigin="",document.head.appendChild(s)}async#c(){if(this.#t)return;let t=this.#i(),e=t?.lat??NaN,i=t?.lng??NaN;if(isNaN(e)||isNaN(i))return;let{MapInteraction:s}=await Promise.resolve().then(()=>(Ai(),xi));this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.focus(),this.setAttribute("data-interactive-active",""),this.#t=new s({shadow:this.shadowRoot,host:this,lat:e,lng:i,zoom:this.zoom,provider:this.provider,tileUrl:this.tileUrl,onDeactivate:()=>this.#l()}),this.dispatchEvent(new CustomEvent("geo-map:activate",{bubbles:!0,detail:{lat:e,lng:i,zoom:this.zoom}}))}#l(){this.#t&&(this.#t.destroy(),this.#t=null,this.removeAttribute("data-interactive-active"),this.render(),this.loadTiles(),this.#a())}handleError(t){let e=this.shadowRoot.querySelector('[part="container"]');e&&(e.setAttribute("data-state","error"),e.setAttribute("data-error",t)),this.dispatchEvent(new CustomEvent("geo-map:error",{bubbles:!0,detail:{message:t}}))}};p("geo-map",Vt);var bt=null;async function Ds(){return bt||(bt=await Promise.resolve().then(()=>(Gt(),Wt)),bt)}var Kt=8,Os=150,Ci="vb-emoji-recent",Xt=class extends m{#t;#e;#i;#n;#r;#s=!1;#a=[];#o=-1;#c=null;#l="";#h=null;#f=!1;#d=null;#u=null;async setup(){this.#h=await Ds(),this.#f||(this.#m(),this.#f=!0),this.#t&&this.listen(this.#t,"click",this.#y),this.listen(document,"click",this.#w),this.listen(document,"keydown",this.#k)}teardown(){this.#c&&clearTimeout(this.#c)}#m(){this.#t=this.querySelector(":scope > [data-trigger]")||this.querySelector(":scope > button"),this.#t||(this.#t=document.createElement("button"),this.#t.type="button",this.#t.textContent="\u{1F600}",this.#t.setAttribute("data-trigger",""),this.prepend(this.#t)),this.#t.setAttribute("aria-haspopup","dialog"),this.#t.setAttribute("aria-expanded","false"),this.#t.setAttribute("aria-label",this.#t.getAttribute("aria-label")||"Open emoji picker"),this.#b()}#b(){this.#e=document.createElement("div"),this.#e.classList.add("picker"),this.#e.setAttribute("role","dialog"),this.#e.setAttribute("aria-label","Emoji picker"),this.#e.hidden=!0,this.#i=document.createElement("input"),this.#i.type="search",this.#i.placeholder="Search emoji\u2026",this.#i.setAttribute("aria-label","Search emoji"),this.#i.addEventListener("input",this.#C),this.#i.addEventListener("keydown",this.#x),this.#e.appendChild(this.#i),this.#r=document.createElement("nav"),this.#r.classList.add("categories"),this.#r.setAttribute("role","tablist"),this.#r.setAttribute("aria-label","Emoji categories");for(let t of this.#h.EMOJI_GROUPS){let e=document.createElement("button");e.type="button",e.setAttribute("role","tab"),e.setAttribute("aria-selected",t===this.#h.EMOJI_GROUPS[0]?"true":"false"),e.setAttribute("data-group",t),e.setAttribute("aria-label",this.#h.EMOJI_GROUP_LABELS[t]),e.title=this.#h.EMOJI_GROUP_LABELS[t],e.textContent=this.#h.EMOJI_GROUP_ICONS[t],e.addEventListener("click",this.#A),this.#r.appendChild(e)}this.#e.appendChild(this.#r),this.#n=document.createElement("div"),this.#n.classList.add("grid"),this.#n.setAttribute("role","grid"),this.#n.setAttribute("aria-label","Emoji"),this.#n.addEventListener("keydown",this.#T),this.#e.appendChild(this.#n),this.appendChild(this.#e),this.#v()}#v(t=null){this.#n.innerHTML="",this.#a=[],this.#o=-1;let e=this.#M();if(!this.#l&&e.length>0){let s=document.createElement("div");s.classList.add("group-label"),s.textContent="Recently Used",s.setAttribute("data-group-heading","recent"),this.#n.appendChild(s);for(let n of e){let o=this.#h.EMOJI_MAP.get(n);o&&this.#p(o)}}let i=t||null;if(i)if(i.length===0){let s=document.createElement("div");s.classList.add("no-results"),s.textContent="No emoji found",this.#n.appendChild(s)}else for(let s of i)this.#p(s);else for(let s of this.#h.EMOJI_GROUPS){let n=document.createElement("div");n.classList.add("group-label"),n.textContent=this.#h.EMOJI_GROUP_LABELS[s],n.setAttribute("data-group-heading",s),this.#n.appendChild(n);let o=this.#h.getByGroup(s);for(let a of o)this.#p(a)}}#p(t){let e=document.createElement("button");e.type="button",e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e.setAttribute("data-shortcode",t.shortcode),e.title=`${t.name} :${t.shortcode}:`,e.textContent=t.emoji,e.addEventListener("click",this.#E),this.#n.appendChild(e),this.#a.push(e)}#g(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);if(e){if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"){let i=e;this.#d={start:i.selectionStart??i.value.length,end:i.selectionEnd??i.value.length},this.#u=null}else if(e.isContentEditable){let i=window.getSelection();i&&i.rangeCount>0&&(this.#u=i.getRangeAt(0).cloneRange()),this.#d=null}}}#y=t=>{t.stopPropagation(),this.toggle()};#w=t=>{this.#s&&!this.contains(t.target)&&this.close()};#k=t=>{t.key==="Escape"&&this.#s&&(t.preventDefault(),this.close(),this.#t?.focus())};#C=()=>{this.#c&&clearTimeout(this.#c),this.#c=setTimeout(()=>{if(this.#l=this.#i.value.trim(),this.#l){let t=this.#h.searchEmoji(this.#l);this.#v(t)}else this.#v()},Os)};#x=t=>{t.key==="ArrowDown"&&(t.preventDefault(),this.#a.length>0&&this.#S(0))};#A=t=>{let e=t.currentTarget.getAttribute("data-group");for(let s of this.#r.querySelectorAll('[role="tab"]'))s.setAttribute("aria-selected",s===t.currentTarget?"true":"false");this.#l&&(this.#i.value="",this.#l="",this.#v());let i=this.#n.querySelector(`[data-group-heading="${e}"]`);i&&i.scrollIntoView({block:"start",behavior:"smooth"})};#T=t=>{let e=this.#a.length;if(e!==0)switch(t.key){case"ArrowRight":t.preventDefault(),this.#S(this.#o+1);break;case"ArrowLeft":t.preventDefault(),this.#S(this.#o-1);break;case"ArrowDown":t.preventDefault(),this.#S(this.#o+Kt);break;case"ArrowUp":t.preventDefault(),this.#o<Kt?(this.#i.focus(),this.#o=-1):this.#S(this.#o-Kt);break;case"Home":t.preventDefault(),this.#S(0);break;case"End":t.preventDefault(),this.#S(e-1);break;case"Enter":case" ":t.preventDefault(),this.#o>=0&&this.#a[this.#o].click();break;case"Tab":this.close();break}};#E=t=>{let e=t.currentTarget.getAttribute("data-shortcode"),i=this.#h.EMOJI_MAP.get(e);i&&(this.#R(e),this.#$(i),this.dispatchEvent(new CustomEvent("emoji-picker:select",{bubbles:!0,detail:{shortcode:i.shortcode,emoji:i.emoji,name:i.name,keywords:i.keywords}})),this.close(),this.#L())};#S(t){let e=this.#a.length;e!==0&&(t<0&&(t=0),t>=e&&(t=e-1),this.#o=t,this.#a[t].focus())}#$(t){let e=this.getAttribute("for");if(!e)return;let i=document.getElementById(e);if(i){if(i.tagName==="INPUT"||i.tagName==="TEXTAREA"){let s=i,n=this.#d?.start??s.value.length,o=this.#d?.end??n,a=s.value.slice(0,n),l=s.value.slice(o);s.value=a+t.emoji+l;let c=n+t.emoji.length;s.setSelectionRange(c,c),this.#d={start:c,end:c},i.dispatchEvent(new Event("input",{bubbles:!0}))}else if(i.isContentEditable){i.focus();let s=window.getSelection();if(s&&this.#u){s.removeAllRanges(),s.addRange(this.#u);let n=s.getRangeAt(0);n.deleteContents();let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n),this.#u=n.cloneRange()}else if(s){let n=document.createRange();n.selectNodeContents(i),n.collapse(!1);let o=document.createTextNode(t.emoji);n.insertNode(o),n.setStartAfter(o),n.collapse(!0),s.removeAllRanges(),s.addRange(n)}}}}#L(){let t=this.getAttribute("for");if(!t)return;let e=document.getElementById(t);e&&e.focus()}#M(){try{return JSON.parse(localStorage.getItem(Ci)||"[]")}catch{return[]}}#R(t){let e=parseInt(this.getAttribute("recent-limit")??"24",10)||24,i=this.#M();i=i.filter(s=>s!==t),i.unshift(t),i.length>e&&(i.length=e);try{localStorage.setItem(Ci,JSON.stringify(i))}catch{}}open(){this.#s||(this.#g(),this.#s=!0,this.setAttribute("open",""),this.#t?.setAttribute("aria-expanded","true"),this.#e.hidden=!1,this.#i.value="",this.#l="",this.#v(),requestAnimationFrame(()=>{this.#i.focus()}),this.dispatchEvent(new CustomEvent("emoji-picker:open",{bubbles:!0})))}close(){this.#s&&(this.#s=!1,this.removeAttribute("open"),this.#t?.setAttribute("aria-expanded","false"),this.#e.hidden=!0,this.dispatchEvent(new CustomEvent("emoji-picker:close",{bubbles:!0})))}toggle(){this.#s?this.close():this.open()}get isOpen(){return this.#s}};p("emoji-picker",Xt);var Jt=class r extends m{#t=null;#e=null;#i=!1;#n=null;setup(){this.setAttribute("role","list"),this.#i=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.#s(),this.#o(),this.#u(),this.#r()}teardown(){this.#t&&(this.#t.remove(),this.#t=null),r.#A?.source===this&&(r.#A=null)}get draggableChildren(){return[...this.querySelectorAll(':scope > [draggable="true"]')]}get group(){return this.getAttribute("group")||null}get orientation(){return this.getAttribute("orientation")||"vertical"}get sortedOrder(){return this.draggableChildren.map(t=>t.dataset.id)}#r(){for(let t of this.draggableChildren)t.getAttribute("role")||t.setAttribute("role","listitem"),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("aria-grabbed")||t.setAttribute("aria-grabbed","false")}#s(){this.#t=document.createElement("div"),this.#t.setAttribute("role","status"),this.#t.setAttribute("aria-live","polite"),this.#t.setAttribute("aria-atomic","true"),this.#t.style.cssText="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",this.prepend(this.#t)}#a(t){let e=this.#t;e&&(e.textContent="",requestAnimationFrame(()=>{e.textContent=t}))}#o(){this.listen(this,"pointerdown",t=>{this.#n=t.target}),this.listen(this,"dragstart",this.#c.bind(this)),this.listen(this,"dragover",this.#l.bind(this)),this.listen(this,"dragleave",this.#h.bind(this)),this.listen(this,"drop",this.#f.bind(this)),this.listen(this,"dragend",this.#d.bind(this))}#c(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.querySelector("[data-drag-handle]");if(i&&!i.contains(this.#n)){t.preventDefault();return}e.setAttribute("data-dragging",""),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",e.dataset.id||""),t.dataTransfer.setData("application/x-drag-surface-group",this.group||"");let s=this.#g(e);r.#A={item:e,source:this,originalIndex:s},this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}#l(t){let e=r.#A;if(!e||(this.group||e.source.group)&&this.group!==e.source.group)return;t.preventDefault(),t.dataTransfer.dropEffect="move",this.setAttribute("data-drag-over","");let i=this.orientation==="horizontal"?t.clientX:t.clientY;this.#C(i)}#h(t){t.relatedTarget&&!this.contains(t.relatedTarget)&&(this.removeAttribute("data-drag-over"),this.#x())}#f(t){t.preventDefault(),this.removeAttribute("data-drag-over"),this.#x();let e=r.#A;if(!e)return;let{item:i,source:s,originalIndex:n}=e,o=this.orientation==="horizontal"?t.clientX:t.clientY,a=this.#k(o);if(s===this){this.#y(i,a),this.#w();let l=this.#g(i);this.#b(i),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,oldIndex:n,newIndex:l,order:this.sortedOrder}}))}else this.#y(i,a),this.#w(),s.#w(),this.#b(i),this.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:i,itemId:i.dataset.id,fromSurface:s,toSurface:this,newIndex:this.#g(i),fromOrder:s.sortedOrder,toOrder:this.sortedOrder}}))}#d(){let t=r.#A;t?.item&&t.item.removeAttribute("data-dragging"),this.removeAttribute("data-drag-over"),this.#x(),r.#A=null,this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0}))}#u(){this.listen(this,"keydown",this.#m.bind(this))}#m(t){let e=t.target.closest('[draggable="true"]');if(!e||e.parentElement!==this||this.hasAttribute("disabled"))return;let i=e.getAttribute("aria-grabbed")==="true",s=this.orientation==="horizontal",n=s?"ArrowLeft":"ArrowUp",o=s?"ArrowRight":"ArrowDown";if(t.key===" "||t.key==="Enter"){if(t.preventDefault(),i){e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#w(),this.#b(e);let c=this.#g(e),h=this.draggableChildren;this.#a(`${this.#p(e)}, dropped at position ${c+1} of ${h.length}`),this.dispatchEvent(new CustomEvent("drag-surface:reorder",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,oldIndex:this.#e,newIndex:c,order:this.sortedOrder}})),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null}else{this.#e=this.#g(e),e.setAttribute("aria-grabbed","true"),this.setAttribute("data-reorder-mode","");let c=this.draggableChildren;this.#a(`${this.#p(e)}, grabbed. Position ${this.#e+1} of ${c.length}. Use arrow keys to move, Enter to drop, Escape to cancel.`),this.dispatchEvent(new CustomEvent("drag-surface:reorder-start",{bubbles:!0}))}return}if(!i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&c[u].focus();return}if(i&&(t.key===n||t.key===o)){t.preventDefault();let c=this.draggableChildren,h=c.indexOf(e),u=t.key===n?Math.max(0,h-1):Math.min(c.length-1,h+1);u!==h&&(this.#y(e,u),e.focus(),this.#a(`Position ${u+1} of ${c.length}`));return}let a=s?"ArrowUp":"ArrowLeft",l=s?"ArrowDown":"ArrowRight";if(i&&(t.key===a||t.key===l)){if(t.preventDefault(),!this.group)return;let c=t.key===l?1:-1,h=this.#v(c);if(!h)return;h.appendChild(e),h.#w(),this.#w(),h.#b(e),e.focus();let u=h.getAttribute("aria-label")||"next surface";h.#a(`Moved to ${u}`),h.dispatchEvent(new CustomEvent("drag-surface:transfer",{bubbles:!0,detail:{item:e,itemId:e.dataset.id,fromSurface:this,toSurface:h,newIndex:h.draggableChildren.indexOf(e),fromOrder:this.sortedOrder,toOrder:h.sortedOrder}})),this.removeAttribute("data-reorder-mode"),h.setAttribute("data-reorder-mode",""),this.#e=null;return}if(i&&t.key==="Escape"){t.preventDefault(),e.setAttribute("aria-grabbed","false"),this.removeAttribute("data-reorder-mode"),this.#e!=null&&(this.#y(e,this.#e),e.focus()),this.#a("Reorder cancelled"),this.dispatchEvent(new CustomEvent("drag-surface:reorder-end",{bubbles:!0})),this.#e=null;return}!i&&t.key==="Escape"&&(t.preventDefault(),e.blur())}#b(t){t.setAttribute("data-just-dropped",""),t.addEventListener("animationend",()=>{t.removeAttribute("data-just-dropped")},{once:!0}),setTimeout(()=>t.removeAttribute("data-just-dropped"),500)}#v(t){if(!this.group)return null;let e=[...document.querySelectorAll(`drag-surface[group="${this.group}"]`)];if(e.length<2)return null;e.sort((n,o)=>{let a=n.getBoundingClientRect(),l=o.getBoundingClientRect();return a.left-l.left||a.top-l.top});let i=e.indexOf(this);return e[i+t]||null}#p(t){return t.dataset.id||t.textContent.trim().slice(0,40)}#g(t){return this.draggableChildren.indexOf(t)}#y(t,e){let s=this.draggableChildren.filter(n=>n!==t)[e]||null;s?this.insertBefore(t,s):this.appendChild(t)}#w(){this.draggableChildren.forEach((t,e)=>{t.dataset.sortOrder=String(e+1)})}#k(t){let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o)return s}return i.length}#C(t){this.#x();let e=this.orientation==="horizontal",i=this.draggableChildren.filter(s=>!s.hasAttribute("data-dragging"));for(let s=0;s<i.length;s++){let n=i[s].getBoundingClientRect(),o=e?n.left+n.width/2:n.top+n.height/2;if(t<o){i[s].setAttribute("data-drop-target","before");return}}i.length>0&&i[i.length-1].setAttribute("data-drop-target","after")}#x(){for(let t of this.querySelectorAll("[data-drop-target]"))t.removeAttribute("data-drop-target")}static#A=null};p("drag-surface",Jt);var Yt=/Mac|iPhone|iPad|iPod/.test(navigator.platform??""),$i={mac:{meta:"\u2318",cmd:"\u2318",alt:"\u2325",shift:"\u21E7",ctrl:"\u2303"},other:{meta:"Ctrl",cmd:"Ctrl",alt:"Alt",shift:"Shift",ctrl:"Ctrl"}};function rt(r){let t=Yt?$i.mac:$i.other;return r.split("+").map(e=>{let i=e.trim().toLowerCase();return t[i]??i.toUpperCase()}).join(Yt?"":"+")}function Ti(r){let t=r.toLowerCase().split("+").map(i=>i.trim());return{key:t.pop()??"",meta:t.includes("meta")||t.includes("cmd"),ctrl:t.includes("ctrl"),shift:t.includes("shift"),alt:t.includes("alt")}}function Li(r,t){if(r.key.toLowerCase()!==t.key)return!1;let e,i;return Yt?(e=t.meta,i=t.ctrl):(e=!1,i=t.meta||t.ctrl),!(e!==r.metaKey||i!==r.ctrlKey||t.shift!==r.shiftKey||t.alt!==r.altKey)}var Fs=new Set(["INPUT","TEXTAREA","SELECT"]),nt=[],Mi=!1;function Hs(r){let t=Fs.has(r.target.tagName)||r.target.isContentEditable;for(let e of nt)if(!(t&&!e.global)&&Li(r,e.descriptor)){r.preventDefault(),e.callback(r);return}}function Us(){Mi||(document.addEventListener("keydown",Hs),Mi=!0)}function Y(r,t,e={}){Us();let i=Ti(r),s={combo:r,descriptor:i,callback:t,global:e.global===!0};return nt.find(o=>o.combo===r)&&console.warn(`[hotkey-bind] Shortcut "${r}" already bound. Last-connected-wins.`),nt.unshift(s),function(){let a=nt.indexOf(s);a!==-1&&nt.splice(a,1)}}var Zt=class extends m{#t;#e;#i;#n=[];#r=-1;#s=[];#a=null;#o=[];setup(){this.#c(),this.#l(),this.hasAttribute("discover")&&this.#b()}teardown(){this.#a?.()}#c(){this.#t=document.createElement("dialog"),this.#t.className="command-dialog",this.#t.addEventListener("click",i=>{i.target===this.#t&&this.close()});let t=document.createElement("div");t.className="command-search",this.#e=document.createElement("input"),this.#e.type="search",this.#e.placeholder=this.getAttribute("placeholder")||"Type a command...",this.#e.setAttribute("aria-label","Search commands"),this.#e.autocomplete="off",this.#e.addEventListener("input",this.#h),this.#e.addEventListener("keydown",this.#f),t.appendChild(this.#e),this.#i=document.createElement("div"),this.#i.className="command-list",this.#i.setAttribute("role","listbox"),this.#s=Array.from(this.querySelectorAll("command-group")),this.#s.forEach(i=>{let s=document.createElement("div");s.className="command-group-header",s.textContent=i.getAttribute("label")||"",s.setAttribute("role","presentation");let n=Array.from(i.querySelectorAll("command-item"));this.#i.appendChild(s),n.forEach(o=>{let a=document.createElement("button");a.className="command-option",a.setAttribute("role","option"),a.dataset.value=o.getAttribute("value")||"",a.dataset.searchText=o.textContent.toLowerCase().trim();let l=o.querySelector('[slot="icon"]');if(l){let u=document.createElement("span");u.className="command-icon",u.appendChild(l.cloneNode(!0)),a.appendChild(u)}let c=document.createElement("span");c.className="command-label",c.textContent=o.textContent.trim(),a.appendChild(c);let h=o.getAttribute("data-hotkey");if(h){let u=document.createElement("kbd");u.className="command-kbd",u.textContent=rt(h),a.appendChild(u)}a.addEventListener("click",()=>{this.#m(a.dataset.value)}),this.#i.appendChild(a),this.#n.push({btn:a,header:s,group:i})})});let e=document.createElement("div");e.className="command-empty",e.textContent="No results found.",e.hidden=!0,this.#i.appendChild(e),this.#t.appendChild(t),this.#t.appendChild(this.#i),this.appendChild(this.#t)}#l(){let t=this.getAttribute("hotkey")||"meta+k";this.#a=Y(t,()=>{this.#t.open?this.close():this.open()},{global:!0})}#h=()=>{let t=this.#e.value.toLowerCase().trim(),e=0,i=new Set;this.#n.forEach(({btn:n,header:o})=>{let a=!t||n.dataset.searchText.includes(t);n.hidden=!a,a&&(e++,i.add(o))}),this.#i.querySelectorAll(".command-group-header").forEach(n=>{n.hidden=!i.has(n)});let s=this.#i.querySelector(".command-empty");s&&(s.hidden=e>0),this.#r=-1,e>0&&this.#u(0)};#f=t=>{let e=this.#d();switch(t.key){case"ArrowDown":t.preventDefault(),this.#u(this.#r+1);break;case"ArrowUp":t.preventDefault(),this.#u(this.#r-1);break;case"Enter":t.preventDefault(),this.#r>=0&&e[this.#r]&&e[this.#r].btn.click();break;case"Escape":t.preventDefault(),this.close();break}};#d(){return this.#n.filter(({btn:t})=>!t.hidden)}#u(t){let e=this.#d();if(e.length===0)return;e.forEach(({btn:s})=>s.removeAttribute("data-active")),t<0&&(t=e.length-1),t>=e.length&&(t=0),this.#r=t;let{btn:i}=e[t];i.setAttribute("data-active",""),i.scrollIntoView({block:"nearest"})}#m(t){this.close(),this.dispatchEvent(new CustomEvent("command-palette:select",{bubbles:!0,detail:{value:t}}))}#b(){this.listen(document,"vb:command-registry-change",this.#v)}#v=()=>{this.#t?.open&&(this.#p(),this.#h())};#p(){if(!this.hasAttribute("discover"))return;let{getRegisteredCommands:t,scanAutoDiscoverable:e}=window.__commandRegistry||{};if(!t)return;this.#n=this.#n.filter(n=>!n.discovered),this.#o.forEach(n=>n.remove()),this.#o=[];let i=this.#i.querySelector(".command-empty"),s=t();for(let[n,o]of s){let a=document.createElement("div");a.className="command-group-header",a.textContent=n,a.setAttribute("role","presentation"),this.#i.insertBefore(a,i),this.#o.push(a);for(let l of o){if(this.contains(l.element))continue;let c=this.#g(l.label,l.icon,l.shortcut);c.dataset.value=`__discovered:${l.label}`,c.addEventListener("click",()=>{this.close(),l.element.click()}),this.#i.insertBefore(c,i),this.#n.push({btn:c,header:a,group:null,discovered:!0})}}if(this.getAttribute("discover")==="auto"&&e){let n=e(),o=new Map;for(let a of n){let l=o.get(a.group)||[];l.push(a),o.set(a.group,l)}for(let[a,l]of o){let c=document.createElement("div");c.className="command-group-header",c.textContent=a,c.setAttribute("role","presentation"),this.#i.insertBefore(c,i),this.#o.push(c);for(let h of l){if(this.contains(h.element))continue;let u=this.#g(h.label,h.icon,h.shortcut);u.dataset.value=`__auto:${h.label}`,u.dataset.auto="",u.addEventListener("click",()=>{this.close(),h.action?h.action():h.element.click()}),this.#i.insertBefore(u,i),this.#n.push({btn:u,header:c,group:null,discovered:!0})}}}}#g(t,e,i){let s=document.createElement("button");if(s.className="command-option",s.setAttribute("role","option"),s.dataset.searchText=t.toLowerCase(),e){let o=document.createElement("span");o.className="command-icon";let a=document.createElement("icon-wc");a.setAttribute("name",e),o.appendChild(a),s.appendChild(o)}let n=document.createElement("span");if(n.className="command-label",n.textContent=t,s.appendChild(n),i){let o=document.createElement("kbd");o.className="command-kbd",o.textContent=rt(i),s.appendChild(o)}return s}open(){this.#t.open||(this.#p(),this.#t.showModal(),this.#e.value="",this.#h(),this.#e.focus(),this.dispatchEvent(new CustomEvent("command-palette:open",{bubbles:!0})))}close(){this.#t.open&&(this.#t.close(),this.dispatchEvent(new CustomEvent("command-palette:close",{bubbles:!0})))}get isOpen(){return this.#t?.open??!1}},Qt=class extends HTMLElement{},te=class extends HTMLElement{};p("command-palette",Zt);p("command-group",Qt);p("command-item",te);var ee=class extends m{#t;#e=null;setup(){this.#i(),this.#e=Y("shift+?",()=>{this.#t.open?this.#t.close():this.#n()})}teardown(){this.#e?.(),this.#e=null,this.#t?.remove(),this.#t=null}#i(){this.#t=document.createElement("dialog"),this.#t.className="shortcut-dialog",this.#t.addEventListener("click",t=>{t.target===this.#t&&this.#t.close()}),this.appendChild(this.#t)}#n(){this.#t.innerHTML="";let t=document.createElement("div");t.className="shortcut-header",t.innerHTML="<h2>Keyboard Shortcuts</h2>",this.#t.appendChild(t);let e=document.createElement("div");e.className="shortcut-body";let{getRegisteredCommands:i}=window.__commandRegistry||{},s=new Map;if(s.set("General",[{label:"Show keyboard shortcuts",shortcut:"shift+?"}]),i)for(let[o,a]of i())for(let l of a){if(!l.shortcut)continue;let c=s.get(o)||[];c.push({label:l.label,shortcut:l.shortcut}),s.set(o,c)}let{getHotkeyActions:n}=window.__hotkeyActionRegistry||{};if(n)for(let[o,a]of n()){let l=s.get(o)||[];for(let c of a)l.push({label:c.label,shortcut:c.shortcut});s.set(o,l)}for(let[o,a]of s){let l=document.createElement("div");l.className="shortcut-group";let c=document.createElement("div");c.className="shortcut-group-header",c.textContent=o,l.appendChild(c);for(let h of a){let u=document.createElement("div");u.className="shortcut-row";let d=document.createElement("span");d.className="shortcut-label",d.textContent=h.label;let f=document.createElement("kbd");f.className="shortcut-kbd",f.textContent=rt(h.shortcut),u.appendChild(d),u.appendChild(f),l.appendChild(u)}e.appendChild(l)}this.#t.appendChild(e),this.#t.showModal()}};p("short-cuts",ee);var ie=class extends m{#t;#e=!1;setup(){let t=[...this.children];if(t.length<2)return!1;t.length>2&&console.warn("[compare-surface] Expected exactly 2 children; extra children will be ignored.");let e=this.getAttribute("position"),i=e!==null?Number(e):50,s=Math.min(100,Math.max(0,isNaN(i)?50:i));this.#t=document.createElement("div"),this.#t.className="comparison-divider",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-label","Comparison slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-valuenow",String(Math.round(s))),this.#t.setAttribute("tabindex","0"),this.appendChild(this.#t),this.#a(s),this.listen(this.#t,"pointerdown",this.#i),this.listen(this.#t,"keydown",this.#s)}teardown(){this.#t&&(this.#t.remove(),this.#t=null),this.#e=!1}#i=t=>{t.preventDefault(),this.#e=!0,this.#t.setPointerCapture(t.pointerId),this.#t.addEventListener("pointermove",this.#n),this.#t.addEventListener("pointerup",this.#r)};#n=t=>{if(!this.#e)return;let e=this.getBoundingClientRect(),i=t.clientX-e.left,s=Math.min(100,Math.max(0,i/e.width*100));this.#a(s)};#r=t=>{this.#e=!1,this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#n),this.#t.removeEventListener("pointerup",this.#r)};#s=t=>{let e=t.shiftKey?10:1,i=Number(this.#t.getAttribute("aria-valuenow"));t.key==="ArrowLeft"||t.key==="ArrowDown"?(t.preventDefault(),this.#a(Math.max(0,i-e))):(t.key==="ArrowRight"||t.key==="ArrowUp")&&(t.preventDefault(),this.#a(Math.min(100,i+e)))};#a(t){let e=Math.round(t);this.style.setProperty("--_position",`${t}%`),this.#t&&(this.#t.setAttribute("aria-valuenow",String(e)),this.#t.style.left=`${t}%`),this.setAttribute("position",String(e)),this.dispatchEvent(new CustomEvent("compare-surface:change",{detail:{position:t},bubbles:!0}))}get position(){return Number(this.getAttribute("position"))||0}set position(t){let e=Math.min(100,Math.max(0,Number(t)||0));this.#a(e)}};p("compare-surface",ie);function Vs(){let r=globalThis.localStorage;if(!r)throw new Error("VBStore: localStorage is not available in this environment");return{async getRaw(t){return r.getItem(t)},async setRaw(t,e){r.setItem(t,e)},async removeRaw(t){r.removeItem(t)},async keys(t){let e=[];for(let i=0;i<r.length;i++){let s=r.key(i);s&&s.startsWith(t)&&e.push(s)}return e}}}var vt=null;function D(){return vt||(vt=Vs()),vt}function se(r,t){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");if(typeof t!="string"||!t)throw new TypeError("VBStore: key must be a non-empty string");return`vb:${r}:${t}`}function _i(r){if(typeof r!="string"||!r)throw new TypeError("VBStore: namespace must be a non-empty string");return`vb:${r}:`}function Ri(r){try{let t=JSON.parse(r);if(t&&typeof t=="object"&&typeof t.timestamp=="number")return t}catch{}return null}var T={configure(r={}){vt=r.backend??null},async set(r,t,e){let i={data:e,timestamp:Date.now()};await D().setRaw(se(r,t),JSON.stringify(i))},async get(r,t,e){let i=await D().getRaw(se(r,t));if(i==null)return null;let s=Ri(i);return!s||e?.maxAge!=null&&Date.now()-s.timestamp>e.maxAge?null:s.data},async remove(r,t){await D().removeRaw(se(r,t))},async list(r){let t=_i(r),e=await D().keys(t),i=[];for(let s of e){let n=await D().getRaw(s);if(n==null)continue;let o=Ri(n);o&&i.push({key:s.slice(t.length),data:o.data,timestamp:o.timestamp})}return i},async clear(r){let t=_i(r),e=await D().keys(t);for(let i of e)await D().removeRaw(i)},async clearAll(){let r=await D().keys("vb:");for(let t of r)await D().removeRaw(t)},async setMany(r,t){for(let[e,i]of t)await T.set(r,e,i)}};var re=class extends m{#t;#e;#i;#n=!1;#r=50;#s=!1;#a=50;get#o(){return this.getAttribute("direction")==="vertical"}get#c(){let t=this.getAttribute("min"),e=Number(t);return t!==null&&!isNaN(e)?e:10}get#l(){let t=this.getAttribute("max"),e=Number(t);return t!==null&&!isNaN(e)?e:90}get position(){return this.#r}set position(t){this.#p(Number(t))}get collapsed(){return this.#s}set collapsed(t){t?this.#b():this.#v()}reset(){let t=this.getAttribute("position"),e=Number(t),i=t!==null&&!isNaN(e)?e:50;this.#s=!1,this.#p(i),this.#w()}async setup(){let t=[...this.children].filter(a=>!a.classList.contains("split-divider"));if(t.length<2)return!1;this.#e=t[0],this.#i=t[1];let e=this.getAttribute("position"),i=Number(e),s=e!==null&&!isNaN(i)?i:null,n=await this.#g(),o=s??n??50;this.#t=document.createElement("div"),this.#t.className="split-divider",this.#t.setAttribute("role","separator"),this.#t.setAttribute("aria-orientation",this.#o?"vertical":"horizontal"),this.#t.setAttribute("aria-valuenow",String(Math.round(o))),this.#t.setAttribute("aria-valuemin",String(this.#c)),this.#t.setAttribute("aria-valuemax",String(this.#l)),this.#t.setAttribute("aria-label","Resize panels"),this.#t.setAttribute("tabindex","0"),this.insertBefore(this.#t,this.#i),this.#p(o),this.listen(this.#t,"pointerdown",this.#h),this.listen(this.#t,"keydown",this.#u),this.hasAttribute("collapsible")&&this.listen(this.#t,"dblclick",this.#m)}teardown(){this.#t&&(this.#t.remove(),this.#t=null)}#h=t=>{t.preventDefault(),this.#n=!0,this.#t.setPointerCapture(t.pointerId),this.style.userSelect="none",this.#t.addEventListener("pointermove",this.#f),this.#t.addEventListener("pointerup",this.#d)};#f=t=>{if(!this.#n)return;let e=this.getBoundingClientRect(),i;this.#o?i=(t.clientY-e.top)/e.height*100:i=(t.clientX-e.left)/e.width*100,this.#s&&(this.#s=!1),this.#p(i)};#d=t=>{this.#n=!1,this.#t.releasePointerCapture(t.pointerId),this.style.userSelect="",this.#t.removeEventListener("pointermove",this.#f),this.#t.removeEventListener("pointerup",this.#d),this.#y()};#u=t=>{let e=t.shiftKey?10:1,i=this.#r,s=this.#o?["ArrowUp"]:["ArrowLeft"],n=this.#o?["ArrowDown"]:["ArrowRight"];s.includes(t.key)?(t.preventDefault(),this.#p(i-e),this.#y()):n.includes(t.key)?(t.preventDefault(),this.#p(i+e),this.#y()):t.key==="Home"?(t.preventDefault(),this.#p(this.#c),this.#y()):t.key==="End"&&(t.preventDefault(),this.#p(this.#l),this.#y())};#m=()=>{this.#s?this.#v():this.#b(),this.#y()};#b(){this.#a=this.#r,this.#s=!0,this.#e.style.flexBasis="0%",this.#e.style.overflow="hidden",this.#t.setAttribute("aria-valuenow","0"),this.#r=0,this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!0},bubbles:!0}))}#v(){this.#s=!1,this.#e.style.overflow="auto",this.#p(this.#a),this.dispatchEvent(new CustomEvent("split-surface:collapse",{detail:{collapsed:!1},bubbles:!0}))}#p(t){let e=this.#s?0:Math.min(this.#l,Math.max(this.#c,t));this.#r=e,this.#e.style.flexBasis=`${e}%`,this.#e.style.flexGrow="0",this.#e.style.flexShrink="0",this.#e.style.overflow="auto",this.#i.style.flexGrow="1",this.#i.style.overflow="auto",this.#t.setAttribute("aria-valuenow",String(Math.round(e))),this.dispatchEvent(new CustomEvent("split-surface:resize",{detail:{position:e},bubbles:!0}))}async#g(){let t=this.getAttribute("persist");if(!t)return null;let e=await T.get("layout",`split:${t}`);return typeof e=="number"?e:null}#y(){let t=this.getAttribute("persist");t&&T.set("layout",`split:${t}`,Math.round(this.#r)).catch(()=>{})}#w(){let t=this.getAttribute("persist");t&&T.remove("layout",`split:${t}`).catch(()=>{})}};p("split-surface",re);var ne=class extends m{#t;#e=null;setup(){this.#e===null&&(this.#e=this.getAttribute("value")||this.textContent.trim());let t=this.#e;if(!t)return!1;let e=parseInt(this.getAttribute("size")??"200",10)||200,i=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t=document.createElement("canvas"),this.#t.width=e,this.#t.height=e,this.#t.setAttribute("role","img"),this.#t.setAttribute("aria-label",`QR code: ${t}`),this.#i(t,e,i)}static get observedAttributes(){return["value","size"]}attributeChangedCallback(t,e,i){if(!this.#t||!this.isConnected)return;t==="value"&&i&&(this.#e=i);let s=this.#e||this.getAttribute("value")||"";if(!s)return;let n=parseInt(this.getAttribute("size")??"200",10)||200,o=parseInt(this.getAttribute("error-correction")??"1",10)||1;this.#t.width=n,this.#t.height=n,this.#t.setAttribute("aria-label",`QR code: ${s}`),this.#i(s,n,o)}#i(t,e,i){let s=Gs(t,i),n=this.#t.getContext("2d"),o=s.length,a=e/o,l=getComputedStyle(this),c=this.getAttribute("color")||l.color||"#000",h=this.getAttribute("background")||"transparent";n.clearRect(0,0,e,e),h!=="transparent"&&(n.fillStyle=h,n.fillRect(0,0,e,e)),n.fillStyle=c;for(let d=0;d<o;d++)for(let f=0;f<o;f++)s[d][f]&&n.fillRect(Math.round(f*a),Math.round(d*a),Math.ceil(a),Math.ceil(a));this.textContent="",this.appendChild(this.#t);let u=document.createElement("span");u.className="visually-hidden",u.textContent=t,this.appendChild(u)}toDataURL(t="image/png"){return this.#t?.toDataURL(t)??""}},yt=[[[26,7],[44,10],[70,15],[100,20],[134,26],[172,18],[196,20],[242,24],[292,30],[346,18]],[[26,10],[44,16],[70,26],[100,18],[134,24],[172,16],[196,18],[242,22],[292,22],[346,26]],[[26,13],[44,22],[70,18],[100,26],[134,18],[172,24],[196,18],[242,22],[292,20],[346,28]],[[26,17],[44,28],[70,22],[100,16],[134,22],[172,28],[196,26],[242,26],[292,24],[346,28]]],Ws=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,52]];function Gs(r,t=1){let e=new TextEncoder().encode(r),i=Ks(e.length,t),s=yt[t][i-1][0],n=yt[t][i-1][1],o=s-n,a=Xs(e,i,o),l=Js(a,o,n),c=i*4+17,h=Array.from({length:c},()=>new Uint8Array(c)),u=Array.from({length:c},()=>new Uint8Array(c));return Zs(h,u,c),Qs(h,u,i),tr(h,u,c),er(u,c),ir(h,u,l,c),cr(h,u,c,t)}function Ks(r,t){for(let e=1;e<=10;e++){let i=yt[t][e-1][0],s=yt[t][e-1][1],n=i-s,o=e<=9?8:16,a=Math.ceil((4+o)/8);if(r<=n-a)return e}return 10}function Xs(r,t,e){let i=[],s=(u,d)=>{for(let f=d-1;f>=0;f--)i.push(u>>f&1)};s(4,4);let n=t<=9?8:16;s(r.length,n);for(let u of r)s(u,8);let o=e*8,a=Math.min(4,o-i.length);for(s(0,a);i.length%8!==0;)i.push(0);let l=[236,17],c=0;for(;i.length<o;)s(l[c%2],8),c++;let h=[];for(let u=0;u<i.length;u+=8){let d=0;for(let f=0;f<8;f++)d=d<<1|(i[u+f]||0);h.push(d)}return h}function Js(r,t,e){let i=Ys(e),s=new Uint8Array(t+e);for(let o=0;o<t;o++)s[o]=r[o];for(let o=0;o<t;o++){let a=s[o];if(a===0)continue;let l=wt[a];for(let c=0;c<i.length;c++)s[o+c]^=ot[(l+wt[i[c]])%255]}let n=[...r.slice(0,t)];for(let o=0;o<e;o++)n.push(s[t+o]);return n}var ot=new Uint8Array(512),wt=new Uint8Array(256);(function(){let t=1;for(let e=0;e<255;e++)ot[e]=t,wt[t]=e,t<<=1,t>=256&&(t^=285);for(let e=255;e<512;e++)ot[e]=ot[e-255]})();function Ys(r){let t=new Uint8Array([1]);for(let e=0;e<r;e++){let i=new Uint8Array(t.length+1),s=e;for(let n=0;n<t.length;n++)i[n]^=t[n],i[n+1]^=ot[(wt[t[n]]+s)%255];t=i}return t}function Zs(r,t,e){let i=[[0,0],[e-7,0],[0,e-7]];for(let[s,n]of i){for(let o=0;o<7;o++)for(let a=0;a<7;a++){let l=o===0||o===6||a===0||a===6||o>=2&&o<=4&&a>=2&&a<=4;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}for(let o=-1;o<=7;o++)for(let[a,l]of[[o,-1],[o,7],[-1,o],[7,o]]){let c=s+a,h=n+l;c>=0&&c<e&&h>=0&&h<e&&(r[c][h]=0,t[c][h]=1)}}}function Qs(r,t,e){if(e<2)return;let i=Ws[e-1];for(let s of i)for(let n of i)if(!t[s][n])for(let o=-2;o<=2;o++)for(let a=-2;a<=2;a++){let l=Math.abs(o)===2||Math.abs(a)===2||o===0&&a===0;r[s+o][n+a]=l?1:0,t[s+o][n+a]=1}}function tr(r,t,e){for(let i=8;i<e-8;i++){let s=i%2===0?1:0;t[6][i]||(r[6][i]=s,t[6][i]=1),t[i][6]||(r[i][6]=s,t[i][6]=1)}}function er(r,t){for(let e=0;e<=8;e++)e<t&&(r[8][e]=1),e<t&&(r[e][8]=1);for(let e=0;e<=7;e++)r[8][t-1-e]=1,r[t-1-e][8]=1;r[t-8][8]=1}function ir(r,t,e,i){let s=[];for(let a of e)for(let l=7;l>=0;l--)s.push(a>>l&1);let n=0,o=!0;for(let a=i-1;a>=1;a-=2){a===6&&(a=5);let l=o?Array.from({length:i},(c,h)=>i-1-h):Array.from({length:i},(c,h)=>h);for(let c of l)for(let h of[a,a-1])h<0||h>=i||t[c][h]||(r[c][h]=n<s.length?s[n]:0,n++);o=!o}}var sr=[30660,29427,32170,30877,26159,25368,27713,26998,21522,20773,24188,23371,17913,16590,20375,19104,13663,12392,16177,14854,9396,8579,11994,11245,5769,5054,7399,6608,1890,597,3340,2107];function rr(r,t){let i=[1,0,3,2][r]*8+t;return sr[i]}var nr=[(r,t)=>(r+t)%2===0,r=>r%2===0,(r,t)=>t%3===0,(r,t)=>(r+t)%3===0,(r,t)=>(Math.floor(r/2)+Math.floor(t/3))%2===0,(r,t)=>r*t%2+r*t%3===0,(r,t)=>(r*t%2+r*t%3)%2===0,(r,t)=>((r+t)%2+r*t%3)%2===0];function or(r,t,e,i){let s=r.map(o=>new Uint8Array(o)),n=nr[i];for(let o=0;o<e;o++)for(let a=0;a<e;a++)!t[o][a]&&n(o,a)&&(s[o][a]^=1);return s}function ar(r,t,e,i){let s=rr(e,i),n=[[0,8],[1,8],[2,8],[3,8],[4,8],[5,8],[7,8],[8,8],[8,7],[8,5],[8,4],[8,3],[8,2],[8,1],[8,0]];for(let a=0;a<15;a++){let[l,c]=n[a];r[l][c]=s>>14-a&1}let o=[[8,t-1],[8,t-2],[8,t-3],[8,t-4],[8,t-5],[8,t-6],[8,t-7],[8,t-8],[t-7,8],[t-6,8],[t-5,8],[t-4,8],[t-3,8],[t-2,8],[t-1,8]];for(let a=0;a<15;a++){let[l,c]=o[a];r[l][c]=s>>14-a&1}r[t-8][8]=1}function lr(r,t){let e=0;for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[i][n]===r[i][n-1]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t;i++){let s=1;for(let n=1;n<t;n++)r[n][i]===r[n-1][i]?(s++,s===5?e+=3:s>5&&(e+=1)):s=1}for(let i=0;i<t-1;i++)for(let s=0;s<t-1;s++){let n=r[i][s];n===r[i][s+1]&&n===r[i+1][s]&&n===r[i+1][s+1]&&(e+=3)}return e}function cr(r,t,e,i){let s=1/0,n=null;for(let o=0;o<8;o++){let a=or(r,t,e,o);ar(a,e,i,o);let l=lr(a,e);l<s&&(s=l,n=a)}return n}p("qr-code",ne);var oe=class extends m{#t;#e;#i;#n=!1;#r=0;#s=0;#a=0;#o=!1;#c=!1;get activated(){return this.#o}get#l(){let t=this.getAttribute("threshold"),e=Number(t);return t!==null&&!isNaN(e)?Math.min(100,Math.max(0,e)):90}setup(){this.#c||(this.#h(),this.#c=!0),this.listen(this.#t,"pointerdown",this.#f),this.listen(this.#t,"keydown",this.#m),this.listen(this.#t,"transitionend",this.#b)}#h(){this.#i=document.createElement("div"),this.#i.className="slide-track",this.#e=document.createElement("span"),this.#e.className="slide-label",this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t=document.createElement("div"),this.#t.className="slide-handle",this.#t.setAttribute("role","slider"),this.#t.setAttribute("aria-valuemin","0"),this.#t.setAttribute("aria-valuemax","100"),this.#t.setAttribute("aria-valuenow","0"),this.#t.setAttribute("aria-label",this.getAttribute("label")||"Slide to confirm"),this.#t.setAttribute("tabindex","0"),this.#t.innerHTML='<icon-wc name="chevrons-right" size="sm"></icon-wc>',this.#i.append(this.#e,this.#t),this.textContent="",this.appendChild(this.#i),this.#g(0)}reset(){this.#o=!1,this.removeAttribute("data-activated"),this.#e.textContent=this.getAttribute("label")||"Slide to confirm",this.#t.removeAttribute("aria-disabled"),this.#t.setAttribute("tabindex","0"),this.#g(0),this.dispatchEvent(new CustomEvent("slide-accept:reset",{bubbles:!0}))}#f=t=>{if(!this.#o){if(t.preventDefault(),this.hasAttribute("transitioning")){let e=this.#t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=parseFloat(getComputedStyle(this.#i).getPropertyValue("--_handle-inset")||"0"),n=this.#t.offsetWidth,o=i.width-n-s*2,a=e.left-i.left-s;this.removeAttribute("transitioning"),this.#r=o>0?Math.max(0,Math.min(100,a/o*100)):0,this.#g(this.#r)}this.#n=!0,this.#s=t.clientX,this.#a=this.#r,this.#t.setPointerCapture(t.pointerId),this.setAttribute("data-dragging",""),this.#t.addEventListener("pointermove",this.#d),this.#t.addEventListener("pointerup",this.#u),this.#t.addEventListener("pointercancel",this.#u)}};#d=t=>{if(!this.#n)return;let e=this.#i.getBoundingClientRect().width-this.#t.offsetWidth;if(e<=0)return;let s=(t.clientX-this.#s)/e*100,n=Math.min(100,Math.max(0,this.#a+s));this.#g(n)};#u=t=>{this.#n&&(this.#n=!1,this.removeAttribute("data-dragging"),this.#t.releasePointerCapture(t.pointerId),this.#t.removeEventListener("pointermove",this.#d),this.#t.removeEventListener("pointerup",this.#u),this.#t.removeEventListener("pointercancel",this.#u),this.#r>=this.#l?this.#v():this.#p())};#m=t=>{if(this.#o)return;let e=t.shiftKey?20:5;t.key==="ArrowRight"?(t.preventDefault(),this.#g(Math.min(100,this.#r+e))):t.key==="ArrowLeft"?(t.preventDefault(),this.#g(Math.max(0,this.#r-e))):t.key==="End"?(t.preventDefault(),this.#v()):t.key==="Home"&&(t.preventDefault(),this.#g(0)),t.key==="ArrowRight"&&this.#r>=this.#l&&this.#v()};#b=()=>{this.removeAttribute("transitioning")};#v(){this.#o=!0,this.#g(100),this.setAttribute("data-activated",""),this.#e.textContent=this.getAttribute("activated-label")||"Confirmed!",this.#t.setAttribute("aria-disabled","true"),this.#t.removeAttribute("tabindex"),this.dispatchEvent(new CustomEvent("slide-accept:accept",{bubbles:!0}))}#p(){this.setAttribute("transitioning",""),this.#g(0),setTimeout(()=>{this.hasAttribute("transitioning")&&this.removeAttribute("transitioning")},500)}#g(t){this.#r=t,this.style.setProperty("--_slide-position",String(t)),this.#t.setAttribute("aria-valuenow",String(Math.round(t)))}};p("slide-accept",oe);var ae=class extends m{static observedAttributes=["colors","names","layout","show-values","show-names","size","editable"];#t=[];setup(){this.#e()}attributeChangedCallback(){this.isConnected&&this.#e()}#e(){let t=this.getAttribute("colors")||"",e=this.getAttribute("names")||"",i=this.getAttribute("layout")||"inline",s=this.getAttribute("size")||"md",n=this.hasAttribute("show-values"),o=this.hasAttribute("show-names")||e.length>0,a=this.hasAttribute("editable"),l=this.#c(t);this.#t=l.slice();let c=e?e.split(",").map(g=>g.trim()):[],u={sm:48,md:80,lg:120}[s]||80,d="display:flex;flex-wrap:wrap;gap:var(--size-xs,0.5rem)";i==="grid"?d=`display:grid;grid-template-columns:repeat(auto-fill,minmax(${u}px,1fr));gap:var(--size-xs,0.5rem)`:i==="list"&&(d="display:flex;flex-direction:column;gap:var(--size-xs,0.5rem)");let f=l.map((g,v)=>{let b=c[v]||"",k=this.#l(g),S=i==="list"?"display:flex;flex-direction:row;align-items:center;gap:0.75rem":`display:flex;flex-direction:column;align-items:center;gap:0.25rem;max-inline-size:${u}px`,N=i==="list"?36:u,j=`background:${g};color:${k};width:${N}px;height:${N}px;border:1px solid oklch(0% 0 0/0.15);border-radius:var(--radius-s,0.25rem);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;font-family:var(--font-mono,monospace);position:relative;overflow:hidden;flex-shrink:0`;if(a){let z=this.#a(g);return`<div class="swatch-wrap" role="listitem" style="${S}">
|
|
1064
1064
|
<label class="color-box color-box-edit" style="${j};cursor:pointer" data-index="${v}" title="Click to edit${b?": "+b:""}" aria-label="${b||"Color "+(v+1)}: ${g}. Click to edit.">
|
|
1065
1065
|
<input type="color" class="color-input" value="${z}" data-index="${v}" style="position:absolute;inset:0;opacity:0;cursor:pointer;inline-size:100%;block-size:100%" aria-label="${b||"Color "+(v+1)} picker">
|
|
1066
1066
|
<span class="color-value" style="font-size:0.625rem;line-height:1.2;opacity:${n?"1":"0"};text-align:center;padding:2px 4px;word-break:break-all;transition:opacity 0.15s ease;pointer-events:none">${this.#o(g)}</span>
|
|
@@ -1176,7 +1176,7 @@ ${s}
|
|
|
1176
1176
|
background-color: var(--text-reader-highlight, Mark);
|
|
1177
1177
|
color: var(--text-reader-highlight-text, MarkText);
|
|
1178
1178
|
}
|
|
1179
|
-
`),this.#a=t,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}#Y(){let t=this.#a;t&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==t),this.#a=null),this.#V()}#Z(t,e){if(!CSS.highlights||this.getAttribute("highlight")==="false")return;let i=this.#W(t);if(!i)return;let s=t-i.speechStart,n=this.#Q(i.element,s,e);if(!n)return;let o=new Highlight(n);if(CSS.highlights.set("text-reader-word",o),this.#o=o,this.getAttribute("scroll")!=="false"){let a=n.getBoundingClientRect(),l=window.innerHeight;(a.top<0||a.bottom>l)&&i.element.scrollIntoView({behavior:"smooth",block:"nearest"})}}#V(){CSS.highlights&&CSS.highlights.delete("text-reader-word"),this.#o=null}#W(t){let e=this.#i,i=0,s=e.length-1;for(;i<=s;){let n=i+s>>>1,o=e[n];if(t<o.speechStart)s=n-1;else if(t>=o.speechEnd)i=n+1;else return o}return null}#Q(t,e,i){let s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){let o=s.currentNode,a=o.textContent??"";if(!a.trim())continue;let l=a.length;if(n+l>e){let c=e-n,h=document.createRange();h.setStart(o,Math.min(c,l));let u=c+i;return u<=l?h.setEnd(o,u):h.setEnd(o,l),h}n+=l}return null}async#G(){let t=speechSynthesis.getVoices();return t.length>0?t:new Promise(e=>{let i=()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())};speechSynthesis.addEventListener("voiceschanged",i),setTimeout(()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())},3e3)})}#tt(t){if(!this.#b||!t.length)return;let e=this.#b;e.innerHTML="";let i=document.documentElement.lang||"en",s=t.filter(l=>l.lang.startsWith(i)),n=t.filter(l=>!l.lang.startsWith(i)),o=[...s,...n],a=this.getAttribute("voice");for(let l of o){let c=document.createElement("option");c.textContent=`${l.name} (${l.lang})`,c.dataset.voiceUri=l.voiceURI,a&&l.voiceURI===a&&(c.selected=!0),e.append(c)}if(!a){let l=s.find(c=>c.default)||s[0];if(l){let c=[...e.options].find(h=>h.dataset.voiceUri===l.voiceURI);c&&(c.selected=!0)}}}#K(t){!this.#d||!this.#u||!this.#m||(t?(this.#d.hidden=!0,this.#u.hidden=!1,this.#m.disabled=!1):(this.#d.hidden=!1,this.#u.hidden=!0,this.#m.disabled=!0),this.#y&&(this.#w&&this.#w.setAttribute("aria-pressed",String(t)),t?this.#$():this.#L()))}#X(t){!this.#d||!this.#u||(this.#d.hidden=!t,this.#u.hidden=t)}#U(){this.#l=!1,this.#h=!1,this.#r=0,this.#e=null,this.#N(),this.#V(),this.#K(!1)}#O(t){return Math.round(Math.max(.5,Math.min(2,t))*10)/10}#B(t,e={}){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}#et=()=>{speechSynthesis.cancel()}};p("text-reader",Ee);function Se(r){if(!r||typeof r!="string")return"";let t=document.createElement("template");return t.innerHTML=r,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(s=>s.remove()),t.content.querySelectorAll("*").forEach(s=>{for(let n of[...s.attributes]){if(n.name.startsWith("on")){s.removeAttribute(n.name);continue}if(["href","src","action","formaction","xlink:href"].includes(n.name)){let o=n.value.trim().toLowerCase();(o.startsWith("javascript:")||o.startsWith("data:text/html"))&&s.removeAttribute(n.name);continue}(n.name==="srcdoc"||n.name==="data"&&s.tagName==="OBJECT")&&s.removeAttribute(n.name)}}),t.innerHTML}var Ce=class extends m{#t=null;#e=null;#i=null;#n=new Map;#r=null;setup(){this.#s(),this.#a(),this.#l(),this.#o(),this.#p(),this.#h()}teardown(){}#s(){this.#t=this.querySelector(":scope > chat-thread"),this.#e=this.querySelector(":scope > chat-input"),this.#i=this.querySelector(":scope > header select[data-model-select]")}#a(){let t=this.querySelector(":scope > script[data-participants]");if(t)try{let e=JSON.parse(t.textContent);this.#n=new Map(Object.entries(e))}catch{console.warn("[chat-window] Invalid participant JSON")}}#o(){if(this.#t)for(let t of this.#t.querySelectorAll("chat-message[data-from]"))this.#c(t)}#c(t){let e=t.getAttribute("data-from");if(!e)return;let i=this.#n.get(e);i?.name?t.setAttribute("data-from-label",i.name):t.hasAttribute("data-from-label")||t.setAttribute("data-from-label",e)}#l(){if(!this.#i)return;let t=this.getAttribute("model");t?this.#i.value=t:this.#i.value&&this.setAttribute("model",this.#i.value)}#h(){this.listen(this,"chat-input:send",this.#f),this.#i&&this.listen(this.#i,"change",this.#d)}#f=async t=>{t.stopPropagation();let{message:e}=t.detail;if(!e||!this.#t)return;let i=this.#u("user",e,"user");this.#t.appendChild(i),this.#g(),this.#p();let s=this.#v(),n=this.#m(s);this.#t.appendChild(n),this.#g(),this.#e&&(this.#e.disabled=!0);let o=this.getAttribute("endpoint");if(o)try{let a=await this.#y(o,e);this.#b(n,a)}catch(a){this.#b(n,"<p>Sorry, something went wrong.</p>"),n.setAttribute("data-status","error"),this.dispatchEvent(new CustomEvent("chat-window:error",{bubbles:!0,detail:{error:a.message,status:a.status??0}}))}else this.dispatchEvent(new CustomEvent("chat-window:send",{bubbles:!0,detail:{message:e,typingElement:n}}));this.#e&&(this.#e.disabled=!1,this.#e.focus()),this.#g()};#d=()=>{let t=this.#i.value;this.setAttribute("model",t),this.dispatchEvent(new CustomEvent("chat-window:model-change",{bubbles:!0,detail:{model:t}}))};#u(t,e,i){let s=document.createElement("chat-message");s.setAttribute("data-role",t),i&&(s.setAttribute("data-from",i),this.#c(s));let n=document.createElement("chat-bubble");if(e.includes("<"))n.innerHTML=Se(e);else{let o=document.createElement("p");o.textContent=e,n.appendChild(o)}return s.appendChild(n),s}#m(t){let e=document.createElement("chat-message");if(e.setAttribute("data-role","agent"),e.setAttribute("data-status","typing"),t){e.setAttribute("data-from",t),this.#c(e);let o=this.#n.get(t)?.name??t;e.setAttribute("aria-label",`${o} is typing`)}else e.setAttribute("aria-label","Agent is typing");let i=this.getAttribute("model");i&&e.setAttribute("data-model",i);let s=document.createElement("chat-bubble");return e.appendChild(s),e}#b(t,e){let i=t.querySelector("chat-bubble");i&&(i.innerHTML=Se(e)),t.removeAttribute("data-status"),t.removeAttribute("aria-label")}#v(){for(let[t,e]of this.#n)if(e.role==="agent")return t;return null}#p(){if(!this.#t)return;this.#t.querySelector("chat-message")!==null?(this.#r&&(this.#r.remove(),this.#r=null),this.#t.hidden=!1):(this.#t.hidden=!0,this.#r||(this.#r=document.createElement("p"),this.#r.setAttribute("data-chat-empty",""),this.#r.textContent=this.getAttribute("empty-message")||"Send a message to start.",this.#t.insertAdjacentElement("afterend",this.#r)))}#g(){this.#t&&requestAnimationFrame(()=>{this.#t.scrollTop=this.#t.scrollHeight})}async#y(t,e){let i={message:e,model:this.getAttribute("model")||void 0},s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok){let o=new Error(`Chat request failed: ${s.status}`);throw o.status=s.status,o}let n=await s.json();return n.html??n.message??n.content??""}get model(){return this.getAttribute("model")??""}set model(t){this.setAttribute("model",t),this.#i&&(this.#i.value=t)}get participants(){return this.#n}set participants(t){this.#n=t instanceof Map?t:new Map(Object.entries(t)),this.#o()}clearThread(){if(this.#t){for(;this.#t.firstChild;)this.#t.removeChild(this.#t.firstChild);this.#p()}}appendMessage(t,e,i){if(!this.#t)return;let s=this.#u(t,e,i);this.#t.appendChild(s),this.#g(),this.#p()}};p("chat-window",Ce);var $e=class extends m{static formAssociated=!0;#t;#e;#i;#n;constructor(){super(),this.#t=this.attachInternals()}setup(){if(this.#e=this.querySelector(":scope > textarea, :scope textarea[data-grow]"),this.#i=this.querySelector("[data-send]"),!this.#e)return!1;this.listen(this.#e,"keydown",this.#r),this.listen(this.#e,"input",this.#s),this.#i&&this.listen(this.#i,"click",this.#a),this.#c(),this.#l(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>this.#e.focus())}teardown(){clearTimeout(this.#n)}#r=t=>{switch(t.key){case"Enter":t.shiftKey||(t.preventDefault(),this.#o());break;case"Escape":t.preventDefault(),this.reset();break}};#s=()=>{this.#c(),this.#l(),clearTimeout(this.#n),this.#n=setTimeout(()=>{this.dispatchEvent(new CustomEvent("chat-input:input",{bubbles:!0,detail:{value:this.value,length:this.value.length}}))},100)};#a=t=>{t.preventDefault(),this.#o()};#o(){let t=this.value.trim(),e=parseInt(this.getAttribute("minlength")??"1",10)||1;t.length<e||this.disabled||(this.dispatchEvent(new CustomEvent("chat-input:send",{bubbles:!0,detail:{message:t,from:null,model:null}})),this.reset())}#c(){let t=this.value;t?this.#t.setFormValue(t):this.#t.setFormValue(null)}#l(){let t=this.value,e=parseInt(this.getAttribute("maxlength")??"4000",10)||4e3;t.length>e?this.#t.setValidity({tooLong:!0},`Message exceeds ${e} characters`,this.#e):this.#t.setValidity({})}formResetCallback(){this.reset()}formStateRestoreCallback(t){!t||!this.#e||(this.#e.value=t,this.#c(),this.#l())}get value(){return this.#e?.value??""}set value(t){this.#e&&(this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#c(),this.#l())}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?(this.setAttribute("disabled",""),this.#e&&(this.#e.disabled=!0),this.#i&&(this.#i.disabled=!0)):(this.removeAttribute("disabled"),this.#e&&(this.#e.disabled=!1),this.#i&&(this.#i.disabled=!1))}focus(){this.#e?.focus()}reset(){this.#e&&(this.#e.value="",this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#c(),this.#l())}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t,e,i){if(t==="disabled"){let s=i!==null;this.#e&&(this.#e.disabled=s),this.#i&&(this.#i.disabled=s)}}};p("chat-input",$e);var Et="http://www.w3.org/2000/svg";function Mr(r){return r.trim().split(/[\s,]+/).map(Number)}function _r(r,t){let e=Mr(t);switch(r){case"rect":{let[i,s,n,o]=e;return{type:"rect",x:i,y:s,width:n-i,height:o-s}}case"circle":{let[i,s,n]=e;return{type:"circle",cx:i,cy:s,r:n}}case"poly":{let i=[];for(let s=0;s<e.length;s+=2)i.push([e[s],e[s+1]]);return{type:"poly",points:i}}default:return null}}function Rr(r){if(!r)return null;switch(r.type){case"rect":{let t=document.createElementNS(Et,"rect");return t.setAttribute("x",String(r.x)),t.setAttribute("y",String(r.y)),t.setAttribute("width",String(r.width)),t.setAttribute("height",String(r.height)),t}case"circle":{let t=document.createElementNS(Et,"circle");return t.setAttribute("cx",String(r.cx)),t.setAttribute("cy",String(r.cy)),t.setAttribute("r",String(r.r)),t}case"poly":{let t=document.createElementNS(Et,"polygon");return t.setAttribute("points",r.points.map(e=>e.join(",")).join(" ")),t}default:return null}}function Nr(r){if(!r)return{x:0,y:0,width:0,height:0};switch(r.type){case"rect":return{x:r.x,y:r.y,width:r.width,height:r.height};case"circle":return{x:r.cx-r.r,y:r.cy-r.r,width:r.r*2,height:r.r*2};case"poly":{let t=100,e=100,i=0,s=0;for(let[n,o]of r.points)n<t&&(t=n),o<e&&(e=o),n>i&&(i=n),o>s&&(s=o);return{x:t,y:e,width:i-t,height:s-e}}default:return{x:0,y:0,width:0,height:0}}}var Te=class extends HTMLElement{get shape(){return this.getAttribute("shape")||"rect"}get coords(){return this.getAttribute("coords")||""}get label(){return this.getAttribute("label")||""}get href(){return this.getAttribute("href")}get target(){return this.getAttribute("target")||""}get tooltipMode(){return this.getAttribute("tooltip")||"hover"}get disabled(){return this.hasAttribute("disabled")}connectedCallback(){this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}},Le=class extends m{#t=null;#e=null;#i=null;#n=[];#r=[];#s=null;#a=null;#o=null;setup(){if(this.#t=this.querySelector(":scope > img"),!this.#t){let t=this.getAttribute("src"),e=this.getAttribute("alt");if(t)this.#t=document.createElement("img"),this.#t.src=t,this.#t.alt=e||"",this.prepend(this.#t);else return!1}this.#t.classList.add("image-map-img"),this.#t.complete?this.#c():this.#t.addEventListener("load",()=>this.#c(),{once:!0})}teardown(){this.#a?.disconnect(),this.#h(),this.#e?.remove(),this.#i?.remove();for(let t of this.#r)t.anchor?.remove();this.#r=[],this.#n=[]}#c(){let t=[...this.querySelectorAll(":scope > map-area")];if(t.length===0){this.setAttribute("data-upgraded","");return}this.#e=document.createElementNS(Et,"svg"),this.#e.setAttribute("viewBox","0 0 100 100"),this.#e.setAttribute("preserveAspectRatio","none"),this.#e.setAttribute("aria-hidden","true"),this.#e.classList.add("image-map-overlay"),this.#i=document.createElement("div"),this.#i.className="image-map-tooltip",this.#i.setAttribute("role","tooltip"),this.#i.setAttribute("aria-live","polite"),this.#i.id=`imap-tip-${crypto.randomUUID().slice(0,8)}`;for(let e of t){let i=e,s=i.shape,n=i.coords,o=_r(s,n),a=Rr(o);if(!a)continue;let l=Nr(o),c=i.href?document.createElement("a"):document.createElement("button");i.href&&(c.href=i.href,i.target&&(c.target=i.target)),c.className="image-map-anchor",c.setAttribute("aria-label",i.label),c.setAttribute("aria-describedby",this.#i.id),c.textContent=i.label,c.style.left=`${l.x}%`,c.style.top=`${l.y}%`,c.style.width=`${l.width}%`,c.style.height=`${l.height}%`,i.disabled&&(a.setAttribute("data-disabled",""),c.setAttribute("tabindex","-1"),c.setAttribute("aria-disabled","true"));let h=e.innerHTML,u={area:e,parsed:o,svgShape:a,anchor:c,contentHTML:h};if(!i.disabled){let d=i.tooltipMode;this.listen(a,"pointerenter",()=>{d==="hover"&&this.#l(u),a.setAttribute("data-hover",""),this.#u("image-map:area-enter",i)}),this.listen(a,"pointerleave",()=>{d==="hover"&&this.#h(),a.removeAttribute("data-hover"),this.#u("image-map:area-leave",i)}),this.listen(a,"click",()=>{d==="click"&&(this.#s===u?this.#h():this.#l(u)),this.#u("image-map:area-activate",i),i.href&&d!=="click"&&(i.target==="_blank"?window.open(i.href,"_blank","noopener"):window.location.href=i.href)}),this.listen(a,"touchstart",f=>{d==="hover"&&(this.#o!==u?(f.preventDefault(),this.#o=u,this.#l(u)):this.#o=null)},{passive:!1}),this.listen(c,"focus",()=>{this.#l(u),a.setAttribute("data-hover","")}),this.listen(c,"blur",()=>{this.#h(),a.removeAttribute("data-hover")})}this.#e.appendChild(a),this.#r.push(u),this.#n.push(c)}this.appendChild(this.#e);for(let e of this.#n)this.appendChild(e);this.appendChild(this.#i),this.listen(this,"keydown",this.#d),this.#a=new ResizeObserver(()=>{this.#s&&this.#f(this.#s.svgShape)}),this.#a.observe(this.#t),this.setAttribute("role","group"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.#t.alt||"Image map"),this.setAttribute("data-upgraded","")}#l(t){this.#i&&(this.#s=t,this.#i.innerHTML=t.contentHTML,this.#i.setAttribute("data-visible",""),this.#f(t.svgShape))}#h(){this.#i&&(this.#s=null,this.#i.removeAttribute("data-visible"))}#f(t){if(!this.#i||!t)return;let e=t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=8,n=8,o=window.innerWidth,a=window.innerHeight,l,c,h=e.top-i.height-s;h>=n?(l=h,c=e.left+(e.width-i.width)/2):e.bottom+s+i.height<=a-n?(l=e.bottom+s,c=e.left+(e.width-i.width)/2):e.right+s+i.width<=o-n?(l=e.top+(e.height-i.height)/2,c=e.right+s):(l=e.top+(e.height-i.height)/2,c=e.left-i.width-s),c=Math.max(n,Math.min(c,o-i.width-n)),l=Math.max(n,Math.min(l,a-i.height-n)),this.#i.style.top=`${l}px`,this.#i.style.left=`${c}px`}#d=t=>{let e=this.#n.filter(s=>!s.hasAttribute("aria-disabled")),i=e.indexOf(document.activeElement);switch(t.key){case"ArrowDown":case"ArrowRight":{t.preventDefault();let s=i<e.length-1?i+1:0;e[s]?.focus();break}case"ArrowUp":case"ArrowLeft":{t.preventDefault();let s=i>0?i-1:e.length-1;e[s]?.focus();break}case"Escape":this.#h(),this.#o=null;break}};#u(t,e){this.dispatchEvent(new CustomEvent(t,{detail:{area:e},bubbles:!0}))}};p("map-area",Te);p("image-map",Le);var jr='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',zr={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},Me=class extends m{#t;#e;setup(){if(this.#t=this.getAttribute("video-id"),this.#e=this.getAttribute("title")??"Play video",!this.#t)return console.warn("youtube-player: missing required video-id attribute"),!1;this.hasAttribute("autoplay")?this.#o():this.#r()}#i(){let t=new URLSearchParams({autoplay:"1"}),e=this.getAttribute("start");e&&t.set("start",e);let i=this.getAttribute("list");return i&&t.set("list",i),this.getAttribute("params")&&new URLSearchParams(this.getAttribute("params")).forEach((s,n)=>t.set(n,s)),`https://www.youtube-nocookie.com/embed/${this.#t}?${t}`}#n(){let t=this.getAttribute("thumbnail")??"hq";return`https://i.ytimg.com/vi/${this.#t}/${zr[t]??"hqdefault"}.jpg`}#r(){this.setAttribute("state","ready"),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-label",`Play ${this.#e}`),this.innerHTML=`<img src="${this.#n()}" alt="" loading="lazy" decoding="async"><button type="button" aria-label="Play ${this.#e}">${jr}</button>`,this.addEventListener("click",this.#s,{once:!0}),this.addEventListener("keydown",this.#a)}#s=()=>{this.removeEventListener("keydown",this.#a),this.#o()};#a=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.removeEventListener("click",this.#s),this.#o())};#o(){this.setAttribute("state","active"),this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label"),this.innerHTML=`<iframe src="${this.#i()}" title="${this.#e}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>`,this.querySelector("iframe")?.focus()}};p("youtube-player",Me);var St=CSS.supports("anchor-name","--x"),Wi=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,_e=class extends HTMLElement{get target(){return this.dataset.target}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}},Re=class r extends m{#t=[];#e=0;#i=!1;#n=null;#r=null;#s=null;#a=null;#o=null;#c=null;#l=null;#h=null;static#f=null;static observedAttributes=["data-step"];setup(){if(this.#t=[...this.querySelectorAll("tour-step")],this.#t.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target.closest(`[data-tour="${this.id}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#z();e?.complete||e?.skipped?this.setAttribute("data-complete",""):setTimeout(()=>this.start(e?.step??0),400)}}teardown(){this.#i&&this.stop()}attributeChangedCallback(t,e,i){if(t==="data-step"&&this.#i&&e!==null){let s=parseInt(i,10);!Number.isNaN(s)&&s!==this.#e&&this.#y(s)}}start(t=0){r.#f&&r.#f!==this&&r.#f.stop(),this.#o=document.activeElement,this.#i=!0,r.#f=this,this.#d(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#M("tour:start",{step:t}),this.#y(t)}stop(){this.#$(),this.#i=!1,this.removeAttribute("data-active"),r.#f===this&&(r.#f=null)}next(){!this.#i||this.#s?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting")||(this.#e<this.#t.length-1?this.#y(this.#e+1,"next"):this.#S())}prev(){this.#i&&this.#e>0&&this.#y(this.#e-1,"prev")}goto(t){this.#i&&t>=0&&t<this.#t.length&&this.#y(t)}skip(){!this.#i||(this.dataset.mode??"passive")==="forced"||(this.#M("tour:skip",{step:this.#e}),this.#_({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#P(),this.removeAttribute("data-complete"),this.dataset.step="0"}#d(){this.#n=document.createElement("div"),this.#n.className="page-tour-backdrop",this.#n.setAttribute("aria-hidden","true"),this.#n.addEventListener("click",()=>{(this.dataset.mode??"passive")!=="forced"&&this.skip()}),this.#r=document.createElement("div"),this.#r.className="page-tour-spotlight",this.#r.setAttribute("aria-hidden","true"),this.#s=document.createElement("div"),this.#s.className="page-tour-card",this.#s.setAttribute("popover","manual"),this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-modal","true"),this.#s.setAttribute("aria-label",this.dataset.title??"Page Tour"),this.#s.addEventListener("keydown",t=>this.#k(t)),this.#s.addEventListener("click",t=>this.#x(t)),this.#a=document.createElement("div"),this.#a.setAttribute("aria-live","polite"),this.#a.setAttribute("aria-atomic","true"),this.#a.className="sr-only",this.#a.id=`page-tour-announcer-${crypto.randomUUID().slice(0,8)}`,this.append(this.#n,this.#r,this.#s,this.#a),this.#s.showPopover(),requestAnimationFrame(()=>{this.#n?.setAttribute("data-visible","")})}#u(t){let e=parseInt(this.dataset.spotlightPadding,10)||8,i=t.getBoundingClientRect();Object.assign(this.#r.style,{top:`${i.top-e}px`,left:`${i.left-e}px`,width:`${i.width+e*2}px`,height:`${i.height+e*2}px`})}#m(t,e){if(this.#s){if(St){this.#b(t,e);return}this.#v(t,e)}}#b(t,e){let i="--tour-target";t.style.anchorName=i,this.#s.style.positionAnchor=i,this.#s.style.position="fixed",this.#s.style.top="",this.#s.style.left="",this.#s.style.bottom="",this.#s.style.right="";let s="var(--tour-card-offset, 0.75rem)";switch(e==="auto"?this.#p(t):e){case"bottom":this.#s.style.top="anchor(bottom)",this.#s.style.left="anchor(center)",this.#s.style.translate="0 calc("+s+")";break;case"top":this.#s.style.bottom="anchor(top)",this.#s.style.left="anchor(center)",this.#s.style.translate="0 calc(-1 * "+s+")";break;case"right":this.#s.style.left="anchor(right)",this.#s.style.top="anchor(center)",this.#s.style.translate=s+" 0";break;case"left":this.#s.style.right="anchor(left)",this.#s.style.top="anchor(center)",this.#s.style.translate="calc(-1 * "+s+") 0";break}}#v(t,e){let i=t.getBoundingClientRect(),s=12,n=8,o=e==="auto"?this.#p(t):e;this.#s.style.position="fixed",this.#s.style.visibility="hidden",this.#s.style.top="0",this.#s.style.left="0",this.#s.style.translate="";let a=this.#s.getBoundingClientRect();this.#s.style.visibility="";let l,c,h=parseInt(this.dataset.spotlightPadding,10)||8;switch(o){case"bottom":l=i.bottom+h+s,c=i.left+(i.width-a.width)/2;break;case"top":l=i.top-h-s-a.height,c=i.left+(i.width-a.width)/2;break;case"right":l=i.top+(i.height-a.height)/2,c=i.right+h+s;break;case"left":l=i.top+(i.height-a.height)/2,c=i.left-h-s-a.width;break}c=Math.max(n,Math.min(c,window.innerWidth-a.width-n)),l=Math.max(n,Math.min(l,window.innerHeight-a.height-n)),Object.assign(this.#s.style,{top:`${l}px`,left:`${c}px`,translate:""})}#p(t){let e=t.getBoundingClientRect(),i=window.innerWidth,n=window.innerHeight-e.bottom,o=e.top,a=i-e.right,l=e.left,c=Math.max(n,o,a,l);return c===n?"bottom":c===o?"top":c===a?"right":"left"}#g(t,e){let i=this.#t.length,s=e===i-1,n=e===0,a=(this.dataset.mode??"passive")!=="forced",l=t.action!=="none";this.#s.innerHTML=`
|
|
1179
|
+
`),this.#a=t,document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}#Y(){let t=this.#a;t&&(document.adoptedStyleSheets=document.adoptedStyleSheets.filter(e=>e!==t),this.#a=null),this.#V()}#Z(t,e){if(!CSS.highlights||this.getAttribute("highlight")==="false")return;let i=this.#W(t);if(!i)return;let s=t-i.speechStart,n=this.#Q(i.element,s,e);if(!n)return;let o=new Highlight(n);if(CSS.highlights.set("text-reader-word",o),this.#o=o,this.getAttribute("scroll")!=="false"){let a=n.getBoundingClientRect(),l=window.innerHeight;(a.top<0||a.bottom>l)&&i.element.scrollIntoView({behavior:"smooth",block:"nearest"})}}#V(){CSS.highlights&&CSS.highlights.delete("text-reader-word"),this.#o=null}#W(t){let e=this.#i,i=0,s=e.length-1;for(;i<=s;){let n=i+s>>>1,o=e[n];if(t<o.speechStart)s=n-1;else if(t>=o.speechEnd)i=n+1;else return o}return null}#Q(t,e,i){let s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),n=0;for(;s.nextNode();){let o=s.currentNode,a=o.textContent??"";if(!a.trim())continue;let l=a.length;if(n+l>e){let c=e-n,h=document.createRange();h.setStart(o,Math.min(c,l));let u=c+i;return u<=l?h.setEnd(o,u):h.setEnd(o,l),h}n+=l}return null}async#G(){let t=speechSynthesis.getVoices();return t.length>0?t:new Promise(e=>{let i=()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())};speechSynthesis.addEventListener("voiceschanged",i),setTimeout(()=>{speechSynthesis.removeEventListener("voiceschanged",i),e(speechSynthesis.getVoices())},3e3)})}#tt(t){if(!this.#b||!t.length)return;let e=this.#b;e.innerHTML="";let i=document.documentElement.lang||"en",s=t.filter(l=>l.lang.startsWith(i)),n=t.filter(l=>!l.lang.startsWith(i)),o=[...s,...n],a=this.getAttribute("voice");for(let l of o){let c=document.createElement("option");c.textContent=`${l.name} (${l.lang})`,c.dataset.voiceUri=l.voiceURI,a&&l.voiceURI===a&&(c.selected=!0),e.append(c)}if(!a){let l=s.find(c=>c.default)||s[0];if(l){let c=[...e.options].find(h=>h.dataset.voiceUri===l.voiceURI);c&&(c.selected=!0)}}}#K(t){!this.#d||!this.#u||!this.#m||(t?(this.#d.hidden=!0,this.#u.hidden=!1,this.#m.disabled=!1):(this.#d.hidden=!1,this.#u.hidden=!0,this.#m.disabled=!0),this.#y&&(this.#w&&this.#w.setAttribute("aria-pressed",String(t)),t?this.#$():this.#L()))}#X(t){!this.#d||!this.#u||(this.#d.hidden=!t,this.#u.hidden=t)}#U(){this.#l=!1,this.#h=!1,this.#r=0,this.#e=null,this.#N(),this.#V(),this.#K(!1)}#O(t){return Math.round(Math.max(.5,Math.min(2,t))*10)/10}#B(t,e={}){this.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}#et=()=>{speechSynthesis.cancel()}};p("text-reader",Ee);function Se(r){if(!r||typeof r!="string")return"";let t=document.createElement("template");return t.innerHTML=r,t.content.querySelectorAll("script, iframe, object, embed, form, base, link, meta, noscript").forEach(s=>s.remove()),t.content.querySelectorAll("*").forEach(s=>{for(let n of[...s.attributes]){if(n.name.startsWith("on")){s.removeAttribute(n.name);continue}if(["href","src","action","formaction","xlink:href"].includes(n.name)){let o=n.value.trim().toLowerCase();(o.startsWith("javascript:")||o.startsWith("data:text/html"))&&s.removeAttribute(n.name);continue}(n.name==="srcdoc"||n.name==="data"&&s.tagName==="OBJECT")&&s.removeAttribute(n.name)}}),t.innerHTML}var Ce=class extends m{#t=null;#e=null;#i=null;#n=new Map;#r=null;setup(){this.#s(),this.#a(),this.#l(),this.#o(),this.#p(),this.#h()}teardown(){}#s(){this.#t=this.querySelector(":scope > chat-thread"),this.#e=this.querySelector(":scope > chat-input"),this.#i=this.querySelector(":scope > header select[data-model-select]")}#a(){let t=this.querySelector(":scope > script[data-participants]");if(t)try{let e=JSON.parse(t.textContent);this.#n=new Map(Object.entries(e))}catch{console.warn("[chat-window] Invalid participant JSON")}}#o(){if(this.#t)for(let t of this.#t.querySelectorAll("chat-message[data-from]"))this.#c(t)}#c(t){let e=t.getAttribute("data-from");if(!e)return;let i=this.#n.get(e);i?.name?t.setAttribute("data-from-label",i.name):t.hasAttribute("data-from-label")||t.setAttribute("data-from-label",e)}#l(){if(!this.#i)return;let t=this.getAttribute("model");t?this.#i.value=t:this.#i.value&&this.setAttribute("model",this.#i.value)}#h(){this.listen(this,"chat-input:send",this.#f),this.#i&&this.listen(this.#i,"change",this.#d)}#f=async t=>{t.stopPropagation();let{message:e}=t.detail;if(!e||!this.#t)return;let i=this.#u("user",e,"user");this.#t.appendChild(i),this.#g(),this.#p();let s=this.#v(),n=this.#m(s);this.#t.appendChild(n),this.#g(),this.#e&&(this.#e.disabled=!0);let o=this.getAttribute("endpoint");if(o)try{let a=await this.#y(o,e);this.#b(n,a)}catch(a){this.#b(n,"<p>Sorry, something went wrong.</p>"),n.setAttribute("data-status","error"),this.dispatchEvent(new CustomEvent("chat-window:error",{bubbles:!0,detail:{error:a.message,status:a.status??0}}))}else this.dispatchEvent(new CustomEvent("chat-window:send",{bubbles:!0,detail:{message:e,typingElement:n}}));this.#e&&(this.#e.disabled=!1,this.#e.focus()),this.#g()};#d=()=>{let t=this.#i.value;this.setAttribute("model",t),this.dispatchEvent(new CustomEvent("chat-window:model-change",{bubbles:!0,detail:{model:t}}))};#u(t,e,i){let s=document.createElement("chat-message");s.setAttribute("data-role",t),i&&(s.setAttribute("data-from",i),this.#c(s));let n=document.createElement("chat-bubble");if(e.includes("<"))n.innerHTML=Se(e);else{let o=document.createElement("p");o.textContent=e,n.appendChild(o)}return s.appendChild(n),s}#m(t){let e=document.createElement("chat-message");if(e.setAttribute("data-role","agent"),e.setAttribute("data-status","typing"),t){e.setAttribute("data-from",t),this.#c(e);let o=this.#n.get(t)?.name??t;e.setAttribute("aria-label",`${o} is typing`)}else e.setAttribute("aria-label","Agent is typing");let i=this.getAttribute("model");i&&e.setAttribute("data-model",i);let s=document.createElement("chat-bubble");return e.appendChild(s),e}#b(t,e){let i=t.querySelector("chat-bubble");i&&(i.innerHTML=Se(e)),t.removeAttribute("data-status"),t.removeAttribute("aria-label")}#v(){for(let[t,e]of this.#n)if(e.role==="agent")return t;return null}#p(){if(!this.#t)return;this.#t.querySelector("chat-message")!==null?(this.#r&&(this.#r.remove(),this.#r=null),this.#t.hidden=!1):(this.#t.hidden=!0,this.#r||(this.#r=document.createElement("p"),this.#r.setAttribute("data-chat-empty",""),this.#r.textContent=this.getAttribute("empty-message")||"Send a message to start.",this.#t.insertAdjacentElement("afterend",this.#r)))}#g(){this.#t&&requestAnimationFrame(()=>{this.#t.scrollTop=this.#t.scrollHeight})}async#y(t,e){let i={message:e,model:this.getAttribute("model")||void 0},s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!s.ok){let o=new Error(`Chat request failed: ${s.status}`);throw o.status=s.status,o}let n=await s.json();return n.html??n.message??n.content??""}get model(){return this.getAttribute("model")??""}set model(t){this.setAttribute("model",t),this.#i&&(this.#i.value=t)}get participants(){return this.#n}set participants(t){this.#n=t instanceof Map?t:new Map(Object.entries(t)),this.#o()}clearThread(){if(this.#t){for(;this.#t.firstChild;)this.#t.removeChild(this.#t.firstChild);this.#p()}}appendMessage(t,e,i){if(!this.#t)return;let s=this.#u(t,e,i);this.#t.appendChild(s),this.#g(),this.#p()}};p("chat-window",Ce);var $e=class extends m{static formAssociated=!0;#t;#e;#i;#n;constructor(){super(),this.#t=this.attachInternals()}setup(){if(this.#e=this.querySelector(":scope > textarea, :scope textarea[data-grow]"),this.#i=this.querySelector("[data-send]"),!this.#e)return!1;this.listen(this.#e,"keydown",this.#r),this.listen(this.#e,"input",this.#s),this.#i&&this.listen(this.#i,"click",this.#a),this.#c(),this.#l(),this.hasAttribute("autofocus")&&requestAnimationFrame(()=>this.#e.focus())}teardown(){clearTimeout(this.#n)}#r=t=>{switch(t.key){case"Enter":t.shiftKey||(t.preventDefault(),this.#o());break;case"Escape":t.preventDefault(),this.reset();break}};#s=()=>{this.#c(),this.#l(),clearTimeout(this.#n),this.#n=setTimeout(()=>{this.dispatchEvent(new CustomEvent("chat-input:input",{bubbles:!0,detail:{value:this.value,length:this.value.length}}))},100)};#a=t=>{t.preventDefault(),this.#o()};#o(){let t=this.value.trim(),e=parseInt(this.getAttribute("minlength")??"1",10)||1;t.length<e||this.disabled||(this.dispatchEvent(new CustomEvent("chat-input:send",{bubbles:!0,detail:{message:t,from:null,model:null}})),this.reset())}#c(){let t=this.value;t?this.#t.setFormValue(t):this.#t.setFormValue(null)}#l(){let t=this.value,e=parseInt(this.getAttribute("maxlength")??"4000",10)||4e3;t.length>e?this.#t.setValidity({tooLong:!0},`Message exceeds ${e} characters`,this.#e):this.#t.setValidity({})}formResetCallback(){this.reset()}formStateRestoreCallback(t){!t||!this.#e||(this.#e.value=t,this.#c(),this.#l())}get value(){return this.#e?.value??""}set value(t){this.#e&&(this.#e.value=t,this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#c(),this.#l())}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?(this.setAttribute("disabled",""),this.#e&&(this.#e.disabled=!0),this.#i&&(this.#i.disabled=!0)):(this.removeAttribute("disabled"),this.#e&&(this.#e.disabled=!1),this.#i&&(this.#i.disabled=!1))}focus(){this.#e?.focus()}reset(){this.#e&&(this.#e.value="",this.#e.dispatchEvent(new Event("input",{bubbles:!0})),this.#c(),this.#l())}static get observedAttributes(){return["disabled"]}attributeChangedCallback(t,e,i){if(t==="disabled"){let s=i!==null;this.#e&&(this.#e.disabled=s),this.#i&&(this.#i.disabled=s)}}};p("chat-input",$e);var Et="http://www.w3.org/2000/svg";function Mr(r){return r.trim().split(/[\s,]+/).map(Number)}function _r(r,t){let e=Mr(t);switch(r){case"rect":{let[i,s,n,o]=e;return{type:"rect",x:i,y:s,width:n-i,height:o-s}}case"circle":{let[i,s,n]=e;return{type:"circle",cx:i,cy:s,r:n}}case"poly":{let i=[];for(let s=0;s<e.length;s+=2)i.push([e[s],e[s+1]]);return{type:"poly",points:i}}default:return null}}function Rr(r){if(!r)return null;switch(r.type){case"rect":{let t=document.createElementNS(Et,"rect");return t.setAttribute("x",String(r.x)),t.setAttribute("y",String(r.y)),t.setAttribute("width",String(r.width)),t.setAttribute("height",String(r.height)),t}case"circle":{let t=document.createElementNS(Et,"circle");return t.setAttribute("cx",String(r.cx)),t.setAttribute("cy",String(r.cy)),t.setAttribute("r",String(r.r)),t}case"poly":{let t=document.createElementNS(Et,"polygon");return t.setAttribute("points",r.points.map(e=>e.join(",")).join(" ")),t}default:return null}}function Nr(r){if(!r)return{x:0,y:0,width:0,height:0};switch(r.type){case"rect":return{x:r.x,y:r.y,width:r.width,height:r.height};case"circle":return{x:r.cx-r.r,y:r.cy-r.r,width:r.r*2,height:r.r*2};case"poly":{let t=100,e=100,i=0,s=0;for(let[n,o]of r.points)n<t&&(t=n),o<e&&(e=o),n>i&&(i=n),o>s&&(s=o);return{x:t,y:e,width:i-t,height:s-e}}default:return{x:0,y:0,width:0,height:0}}}var Te=class extends HTMLElement{get shape(){return this.getAttribute("shape")||"rect"}get coords(){return this.getAttribute("coords")||""}get label(){return this.getAttribute("label")||""}get href(){return this.getAttribute("href")}get target(){return this.getAttribute("target")||""}get tooltipMode(){return this.getAttribute("tooltip")||"hover"}get disabled(){return this.hasAttribute("disabled")}connectedCallback(){this.setAttribute("data-upgraded","")}disconnectedCallback(){this.removeAttribute("data-upgraded")}},Le=class extends m{#t=null;#e=null;#i=null;#n=[];#r=[];#s=null;#a=null;#o=null;setup(){if(this.#t=this.querySelector(":scope > img"),!this.#t){let t=this.getAttribute("src"),e=this.getAttribute("alt");if(t)this.#t=document.createElement("img"),this.#t.src=t,this.#t.alt=e||"",this.prepend(this.#t);else return!1}this.#t.classList.add("image-map-img"),this.#t.complete?this.#c():this.#t.addEventListener("load",()=>this.#c(),{once:!0})}teardown(){this.#a?.disconnect(),this.#h(),this.#e?.remove(),this.#i?.remove();for(let t of this.#r)t.anchor?.remove();this.#r=[],this.#n=[]}#c(){let t=[...this.querySelectorAll(":scope > map-area")];if(t.length===0){this.setAttribute("data-upgraded","");return}this.#e=document.createElementNS(Et,"svg"),this.#e.setAttribute("viewBox","0 0 100 100"),this.#e.setAttribute("preserveAspectRatio","none"),this.#e.setAttribute("aria-hidden","true"),this.#e.classList.add("image-map-overlay"),this.#i=document.createElement("div"),this.#i.className="image-map-tooltip",this.#i.setAttribute("role","tooltip"),this.#i.setAttribute("aria-live","polite"),this.#i.id=`imap-tip-${crypto.randomUUID().slice(0,8)}`;for(let e of t){let i=e,s=i.shape,n=i.coords,o=_r(s,n),a=Rr(o);if(!a)continue;let l=Nr(o),c=i.href?document.createElement("a"):document.createElement("button");i.href&&(c.href=i.href,i.target&&(c.target=i.target)),c.className="image-map-anchor",c.setAttribute("aria-label",i.label),c.setAttribute("aria-describedby",this.#i.id),c.textContent=i.label,c.style.left=`${l.x}%`,c.style.top=`${l.y}%`,c.style.width=`${l.width}%`,c.style.height=`${l.height}%`,i.disabled&&(a.setAttribute("data-disabled",""),c.setAttribute("tabindex","-1"),c.setAttribute("aria-disabled","true"));let h=e.innerHTML,u={area:e,parsed:o,svgShape:a,anchor:c,contentHTML:h};if(!i.disabled){let d=i.tooltipMode;this.listen(a,"pointerenter",()=>{d==="hover"&&this.#l(u),a.setAttribute("data-hover",""),this.#u("image-map:area-enter",i)}),this.listen(a,"pointerleave",()=>{d==="hover"&&this.#h(),a.removeAttribute("data-hover"),this.#u("image-map:area-leave",i)}),this.listen(a,"click",()=>{d==="click"&&(this.#s===u?this.#h():this.#l(u)),this.#u("image-map:area-activate",i),i.href&&d!=="click"&&(i.target==="_blank"?window.open(i.href,"_blank","noopener"):window.location.href=i.href)}),this.listen(a,"touchstart",f=>{d==="hover"&&(this.#o!==u?(f.preventDefault(),this.#o=u,this.#l(u)):this.#o=null)},{passive:!1}),this.listen(c,"focus",()=>{this.#l(u),a.setAttribute("data-hover","")}),this.listen(c,"blur",()=>{this.#h(),a.removeAttribute("data-hover")})}this.#e.appendChild(a),this.#r.push(u),this.#n.push(c)}this.appendChild(this.#e);for(let e of this.#n)this.appendChild(e);this.appendChild(this.#i),this.listen(this,"keydown",this.#d),this.#a=new ResizeObserver(()=>{this.#s&&this.#f(this.#s.svgShape)}),this.#a.observe(this.#t),this.setAttribute("role","group"),this.hasAttribute("aria-label")||this.setAttribute("aria-label",this.#t.alt||"Image map"),this.setAttribute("data-upgraded","")}#l(t){this.#i&&(this.#s=t,this.#i.innerHTML=t.contentHTML,this.#i.setAttribute("data-visible",""),this.#f(t.svgShape))}#h(){this.#i&&(this.#s=null,this.#i.removeAttribute("data-visible"))}#f(t){if(!this.#i||!t)return;let e=t.getBoundingClientRect(),i=this.#i.getBoundingClientRect(),s=8,n=8,o=window.innerWidth,a=window.innerHeight,l,c,h=e.top-i.height-s;h>=n?(l=h,c=e.left+(e.width-i.width)/2):e.bottom+s+i.height<=a-n?(l=e.bottom+s,c=e.left+(e.width-i.width)/2):e.right+s+i.width<=o-n?(l=e.top+(e.height-i.height)/2,c=e.right+s):(l=e.top+(e.height-i.height)/2,c=e.left-i.width-s),c=Math.max(n,Math.min(c,o-i.width-n)),l=Math.max(n,Math.min(l,a-i.height-n)),this.#i.style.top=`${l}px`,this.#i.style.left=`${c}px`}#d=t=>{let e=this.#n.filter(s=>!s.hasAttribute("aria-disabled")),i=e.indexOf(document.activeElement);switch(t.key){case"ArrowDown":case"ArrowRight":{t.preventDefault();let s=i<e.length-1?i+1:0;e[s]?.focus();break}case"ArrowUp":case"ArrowLeft":{t.preventDefault();let s=i>0?i-1:e.length-1;e[s]?.focus();break}case"Escape":this.#h(),this.#o=null;break}};#u(t,e){this.dispatchEvent(new CustomEvent(t,{detail:{area:e},bubbles:!0}))}};p("map-area",Te);p("image-map",Le);var jr='<svg viewBox="0 0 68 48" width="68" height="48" aria-hidden="true" focusable="false"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="var(--color-error, #f00)"/><path d="M45 24 27 14v20z" fill="#fff"/></svg>',zr={hq:"hqdefault",mq:"mqdefault",sd:"sddefault",maxres:"maxresdefault"},Me=class extends m{#t;#e;setup(){if(this.#t=this.getAttribute("video-id"),this.#e=this.getAttribute("title")??"Play video",!this.#t)return console.warn("youtube-player: missing required video-id attribute"),!1;this.hasAttribute("autoplay")?this.#o():this.#r()}#i(){let t=new URLSearchParams({autoplay:"1"}),e=this.getAttribute("start");e&&t.set("start",e);let i=this.getAttribute("list");return i&&t.set("list",i),this.getAttribute("params")&&new URLSearchParams(this.getAttribute("params")).forEach((s,n)=>t.set(n,s)),`https://www.youtube-nocookie.com/embed/${this.#t}?${t}`}#n(){let t=this.getAttribute("thumbnail")??"hq";return`https://i.ytimg.com/vi/${this.#t}/${zr[t]??"hqdefault"}.jpg`}#r(){this.setAttribute("state","ready"),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-label",`Play ${this.#e}`),this.innerHTML=`<img src="${this.#n()}" alt="" loading="lazy" decoding="async"><button type="button" aria-label="Play ${this.#e}">${jr}</button>`,this.addEventListener("click",this.#s,{once:!0}),this.addEventListener("keydown",this.#a)}#s=()=>{this.removeEventListener("keydown",this.#a),this.#o()};#a=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.removeEventListener("click",this.#s),this.#o())};#o(){this.setAttribute("state","active"),this.removeAttribute("tabindex"),this.removeAttribute("role"),this.removeAttribute("aria-label"),this.innerHTML=`<iframe src="${this.#i()}" title="${this.#e}" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen loading="lazy"></iframe>`,this.querySelector("iframe")?.focus()}};p("youtube-player",Me);var St=CSS.supports("anchor-name","--x"),Wi=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches,_e=class extends HTMLElement{get target(){return this.dataset.target}get placement(){return this.dataset.placement??"auto"}get action(){return this.dataset.action??"none"}get actionHint(){return this.dataset.actionHint??null}get skippable(){return this.dataset.skippable!=="false"}get scrollBehavior(){return this.dataset.scroll??"smooth"}},Re=class r extends m{#t=[];#e=0;#i=!1;#n=null;#r=null;#s=null;#a=null;#o=null;#c=null;#l=null;#h=null;static#f=null;static observedAttributes=["data-step"];setup(){if(this.#t=[...this.querySelectorAll("tour-step")],this.#t.length===0)return!1;let t=this.querySelector(".page-tour-start-btn");if(t&&this.listen(t,"click",e=>{e.preventDefault(),this.start()}),this.id&&this.listen(document,"click",e=>{e.target.closest(`[data-tour="${this.id}"]`)&&(e.preventDefault(),this.start())}),this.dataset.trigger==="auto"){let e=this.#z();e?.complete||e?.skipped?this.setAttribute("data-complete",""):setTimeout(()=>this.start(e?.step??0),400)}}teardown(){this.#i&&this.stop()}attributeChangedCallback(t,e,i){if(t==="data-step"&&this.#i&&e!==null){let s=parseInt(i,10);!Number.isNaN(s)&&s!==this.#e&&this.#y(s)}}start(t=0){r.#f&&r.#f!==this&&r.#f.stop(),this.#o=document.activeElement,this.#i=!0,r.#f=this,this.#d(),this.setAttribute("data-active",""),this.removeAttribute("data-complete"),this.#M("tour:start",{step:t}),this.#y(t)}stop(){this.#$(),this.#i=!1,this.removeAttribute("data-active"),r.#f===this&&(r.#f=null)}next(){!this.#i||this.#s?.querySelector('[data-action="next"]')?.hasAttribute("data-waiting")||(this.#e<this.#t.length-1?this.#y(this.#e+1,"next"):this.#S())}prev(){this.#i&&this.#e>0&&this.#y(this.#e-1,"prev")}goto(t){this.#i&&t>=0&&t<this.#t.length&&this.#y(t)}skip(){!this.#i||(this.dataset.mode??"passive")==="forced"||(this.#M("tour:skip",{step:this.#e}),this.#_({skipped:!0}),this.stop(),this.setAttribute("data-complete",""))}reset(){this.#P(),this.removeAttribute("data-complete"),this.dataset.step="0"}#d(){this.#n=document.createElement("div"),this.#n.className="page-tour-backdrop",this.#n.setAttribute("aria-hidden","true"),this.#n.addEventListener("click",()=>{(this.dataset.mode??"passive")!=="forced"&&this.skip()}),this.#r=document.createElement("div"),this.#r.className="page-tour-spotlight",this.#r.setAttribute("aria-hidden","true"),this.#s=document.createElement("div"),this.#s.className="page-tour-card",this.#s.setAttribute("popover","manual"),this.#s.setAttribute("role","dialog"),this.#s.setAttribute("aria-modal","true"),this.#s.setAttribute("aria-label",this.dataset.title??"Page Tour"),this.#s.addEventListener("keydown",t=>this.#k(t)),this.#s.addEventListener("click",t=>this.#x(t)),this.#a=document.createElement("div"),this.#a.setAttribute("aria-live","polite"),this.#a.setAttribute("aria-atomic","true"),this.#a.className="visually-hidden",this.#a.id=`page-tour-announcer-${crypto.randomUUID().slice(0,8)}`,this.append(this.#n,this.#r,this.#s,this.#a),this.#s.showPopover(),requestAnimationFrame(()=>{this.#n?.setAttribute("data-visible","")})}#u(t){let e=parseInt(this.dataset.spotlightPadding,10)||8,i=t.getBoundingClientRect();Object.assign(this.#r.style,{top:`${i.top-e}px`,left:`${i.left-e}px`,width:`${i.width+e*2}px`,height:`${i.height+e*2}px`})}#m(t,e){if(this.#s){if(St){this.#b(t,e);return}this.#v(t,e)}}#b(t,e){let i="--tour-target";t.style.anchorName=i,this.#s.style.positionAnchor=i,this.#s.style.position="fixed",this.#s.style.top="",this.#s.style.left="",this.#s.style.bottom="",this.#s.style.right="";let s="var(--tour-card-offset, 0.75rem)";switch(e==="auto"?this.#p(t):e){case"bottom":this.#s.style.top="anchor(bottom)",this.#s.style.left="anchor(center)",this.#s.style.translate="0 calc("+s+")";break;case"top":this.#s.style.bottom="anchor(top)",this.#s.style.left="anchor(center)",this.#s.style.translate="0 calc(-1 * "+s+")";break;case"right":this.#s.style.left="anchor(right)",this.#s.style.top="anchor(center)",this.#s.style.translate=s+" 0";break;case"left":this.#s.style.right="anchor(left)",this.#s.style.top="anchor(center)",this.#s.style.translate="calc(-1 * "+s+") 0";break}}#v(t,e){let i=t.getBoundingClientRect(),s=12,n=8,o=e==="auto"?this.#p(t):e;this.#s.style.position="fixed",this.#s.style.visibility="hidden",this.#s.style.top="0",this.#s.style.left="0",this.#s.style.translate="";let a=this.#s.getBoundingClientRect();this.#s.style.visibility="";let l,c,h=parseInt(this.dataset.spotlightPadding,10)||8;switch(o){case"bottom":l=i.bottom+h+s,c=i.left+(i.width-a.width)/2;break;case"top":l=i.top-h-s-a.height,c=i.left+(i.width-a.width)/2;break;case"right":l=i.top+(i.height-a.height)/2,c=i.right+h+s;break;case"left":l=i.top+(i.height-a.height)/2,c=i.left-h-s-a.width;break}c=Math.max(n,Math.min(c,window.innerWidth-a.width-n)),l=Math.max(n,Math.min(l,window.innerHeight-a.height-n)),Object.assign(this.#s.style,{top:`${l}px`,left:`${c}px`,translate:""})}#p(t){let e=t.getBoundingClientRect(),i=window.innerWidth,n=window.innerHeight-e.bottom,o=e.top,a=i-e.right,l=e.left,c=Math.max(n,o,a,l);return c===n?"bottom":c===o?"top":c===a?"right":"left"}#g(t,e){let i=this.#t.length,s=e===i-1,n=e===0,a=(this.dataset.mode??"passive")!=="forced",l=t.action!=="none";this.#s.innerHTML=`
|
|
1180
1180
|
<div class="page-tour-progress" aria-hidden="true">
|
|
1181
1181
|
${this.#t.map((c,h)=>`
|
|
1182
1182
|
<span class="page-tour-pip" ${h===e?"data-active":""} ${h<e?"data-visited":""}></span>
|