@warp-ds/elements 1.2.0-next.6 → 1.2.0

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.
@@ -1,23 +1,24 @@
1
- var Et=Object.create;var ye=Object.defineProperty,Rt=Object.defineProperties,Tt=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,Pt=Object.getPrototypeOf,we=Object.prototype.hasOwnProperty,Ie=Object.prototype.propertyIsEnumerable;var ve=(e,t,o)=>t in e?ye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,C=(e,t)=>{for(var o in t||(t={}))we.call(t,o)&&ve(e,o,t[o]);if(ce)for(var o of ce(t))Ie.call(t,o)&&ve(e,o,t[o]);return e},O=(e,t)=>Rt(e,At(t));var J=(e,t)=>{var o={};for(var r in e)we.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&ce)for(var r of ce(e))t.indexOf(r)<0&&Ie.call(e,r)&&(o[r]=e[r]);return o};var qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Mt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ot(t))!we.call(e,a)&&a!==o&&ye(e,a,{get:()=>t[a],enumerable:!(r=Tt(t,a))||r.enumerable});return e};var Bt=(e,t,o)=>(o=e!=null?Et(Pt(e)):{},Mt(t||!e||!e.__esModule?ye(o,"default",{value:e,enumerable:!0}):o,e));var ke=(e,t,o)=>(ve(e,typeof t!="symbol"?t+"":t,o),o);var ut=qe(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.errorMessages=j.ErrorType=void 0;var V;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(V=j.ErrorType||(j.ErrorType={}));j.errorMessages=new Map([[V.MalformedUnicode,"malformed Unicode character escape sequence"],[V.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[V.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[V.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[V.EndOfString,"malformed escape sequence at end of string"]])});var gt=qe(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.unraw=B.errorMessages=B.ErrorType=void 0;var D=ut();Object.defineProperty(B,"ErrorType",{enumerable:!0,get:function(){return D.ErrorType}});Object.defineProperty(B,"errorMessages",{enumerable:!0,get:function(){return D.errorMessages}});function Zt(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function me(e,t,o){let r=Zt(e);if(Number.isNaN(r)||o!==void 0&&o!==e.length)throw new SyntaxError(D.errorMessages.get(t));return r}function eo(e){let t=me(e,D.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}function bt(e,t){let o=me(e,D.ErrorType.MalformedUnicode,4);if(t!==void 0){let r=me(t,D.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,r)}return String.fromCharCode(o)}function to(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function oo(e){if(!to(e))throw new SyntaxError(D.errorMessages.get(D.ErrorType.MalformedUnicode));let t=e.slice(1,-1),o=me(t,D.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(r){throw r instanceof RangeError?new SyntaxError(D.errorMessages.get(D.ErrorType.CodePointLimit)):r}}function ro(e,t=!1){if(t)throw new SyntaxError(D.errorMessages.get(D.ErrorType.OctalDeprecation));let o=parseInt(e,8);return String.fromCharCode(o)}var io=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function no(e){return io.get(e)||e}var lo=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function pt(e,t=!1){return e.replace(lo,function(o,r,a,n,l,i,s,p,g){if(r!==void 0)return"\\";if(a!==void 0)return eo(a);if(n!==void 0)return oo(n);if(l!==void 0)return bt(l,i);if(s!==void 0)return bt(s);if(p==="0")return"\0";if(p!==void 0)return ro(p,!t);if(g!==void 0)return no(g);throw new SyntaxError(D.errorMessages.get(D.ErrorType.EndOfString))})}B.unraw=pt;B.default=pt});import{css as vo,html as ie,nothing as Lt}from"lit";import Ct from"@warp-ds/elements-core";import{ifDefined as yo}from"lit/directives/if-defined.js";import{classMap as _o}from"lit/directives/class-map.js";var Ht=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function je(e){return class extends e{static createProperty(t,o){let r=o;(typeof(o==null?void 0:o.attribute)=="undefined"||(o==null?void 0:o.attribute)===!0)&&(r=Object.assign({},o,{attribute:Ht(t.toString())})),super.createProperty(t,r)}}}function _e(e){let t=[];for(let[o,r]of Object.entries(e))r&&t.push(o);return t.join(" ")}function Ue(){return`m${Math.random().toString(36).slice(2)}`}var De={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var Nt="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",Co={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+De.box,expandableBleed:De.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:Nt+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+De.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},N="font-bold focusable justify-center transition-colors ease-in-out",v={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},f={primary:`border-0 rounded-8 ${N}`,secondary:`border-2 rounded-8 ${N}`,utility:`border rounded-4 ${N}`,negative:`border-0 rounded-8 ${N}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${N}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${v.link}`},u={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},d={medium:"text-m leading-[24]",xsmall:"text-xs"},c={inProgress:`border-transparent animate-inprogress pointer-events-none ${v.loading}`,quiet:`border-0 rounded-8 ${N}`,utilityQuiet:`border-0 rounded-4 ${N}`,negativeQuiet:`border-0 rounded-8 ${N}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${v.disabled}`},So={secondary:`${u.medium} ${d.medium} ${f.secondary} ${v.secondary}`,secondaryHref:`${u.medium} ${d.medium} ${f.secondary} ${v.secondary}`,secondaryDisabled:`${u.medium} ${d.medium} ${f.secondary} ${c.isDisabled}`,secondarySmall:`${d.xsmall} ${u.xsmall} ${f.secondary} ${v.secondary}`,secondarySmallDisabled:`${d.xsmall} ${u.xsmall} ${f.secondary} ${c.isDisabled}`,secondaryQuiet:`${u.medium} ${d.medium} ${c.quiet} ${v.quiet}`,secondaryQuietDisabled:`${u.medium} ${d.medium} ${c.quiet} ${c.isDisabled}`,secondarySmallQuiet:`${d.xsmall} ${u.xsmall} ${c.quiet} ${v.quiet}`,secondarySmallQuietDisabled:`${d.xsmall} ${u.xsmall} ${c.quiet} ${c.isDisabled}`,secondaryLoading:`${u.medium} ${d.medium} ${f.secondary} ${c.inProgress}`,secondarySmallLoading:`${d.xsmall} ${u.xsmall} ${f.secondary} ${c.inProgress}`,secondarySmallQuietLoading:`${d.xsmall} ${u.xsmall} ${c.quiet} ${c.inProgress}`,secondaryQuietLoading:`${u.medium} ${d.medium} ${c.quiet} ${c.inProgress}`,primary:`${u.large} ${d.medium} ${f.primary} ${v.primary}`,primaryDisabled:`${u.large} ${d.medium} ${c.isDisabled} ${f.primary}`,primarySmall:`${u.small} ${d.xsmall} ${f.primary} ${v.primary}`,primarySmallDisabled:`${u.small} ${d.xsmall} ${c.isDisabled} ${f.primary} `,primaryQuiet:`${u.large} ${d.medium} ${c.quiet} ${v.quiet}`,primaryQuietDisabled:`${u.large} ${d.medium} ${c.quiet} ${c.isDisabled}`,primarySmallQuiet:`${u.small} ${d.xsmall} ${c.quiet} ${v.quiet}`,primarySmallQuietDisabled:`${u.small} ${d.xsmall} ${c.quiet} ${c.isDisabled}`,primaryLoading:`${u.large} ${d.medium} ${c.inProgress} ${f.primary}`,primarySmallLoading:`${u.small} ${d.xsmall} ${c.inProgress} ${f.primary}`,primarySmallQuietLoading:`${u.small} ${d.xsmall} ${c.quiet} ${c.inProgress} ${f.primary}`,primaryQuietLoading:`${u.large} ${d.medium} ${c.quiet} ${c.inProgress}`,utility:`${u.utility} ${d.medium} ${f.utility} ${v.utility}`,utilityDisabled:`${u.utility} ${d.medium} ${f.utility} ${c.isDisabled}`,utilityQuiet:`${u.large} ${d.medium} ${c.utilityQuiet} ${v.utilityQuiet}`,utilityQuietDisabled:`${u.large} ${d.medium} ${c.utilityQuiet} ${c.isDisabled}`,utilitySmall:`${u.smallUtility} ${d.xsmall} ${f.utility} ${v.utility}`,utilitySmallDisabled:`${u.smallUtility} ${d.xsmall} ${f.utility} ${c.isDisabled}`,utilitySmallQuiet:`${u.smallUtility} ${d.xsmall} ${c.utilityQuiet} ${v.utilityQuiet}`,utilitySmallQuietDisabled:`${u.smallUtility} ${d.xsmall} ${c.utilityQuiet} ${c.isDisabled}`,utilityLoading:`${u.large} ${d.medium} ${f.utility} ${c.inProgress}`,utilitySmallLoading:`${u.smallUtility} ${d.xsmall} ${f.utility} ${c.inProgress}`,utilityQuietLoading:`${u.large} ${d.medium} ${c.inProgress} ${c.utilityQuiet}`,utilitySmallQuietLoading:`${u.smallUtility} ${d.xsmall} ${c.inProgress} ${c.utilityQuiet}`,negative:`${u.large} ${d.medium} ${f.negative} ${v.destructive}`,negativeDisabled:`${u.large} ${d.medium} ${f.negative} ${c.isDisabled}`,negativeQuiet:`${u.large} ${d.medium} ${c.negativeQuiet} ${v.negativeQuiet}`,negativeQuietDisabled:`${u.large} ${d.medium} ${c.negativeQuiet}${c.isDisabled}`,negativeSmall:`${u.small} ${d.xsmall} ${f.negative} ${v.destructive}`,negativeSmallDisabled:`${u.small} ${d.xsmall} ${f.negative} ${c.isDisabled}`,negativeSmallQuiet:`${u.small} ${d.xsmall} ${c.negativeQuiet} ${v.negativeQuiet}`,negativeSmallQuietDisabled:`${u.small} ${d.xsmall} ${c.negativeQuiet} ${c.isDisabled}`,negativeLoading:`${u.large} ${d.medium} ${f.negative} ${c.inProgress}`,negativeSmallLoading:`${u.small} ${d.xsmall} ${c.inProgress} ${f.negative}`,negativeQuietLoading:`${u.large} ${d.medium} ${c.negativeQuiet} ${f.negative} ${c.inProgress}`,negativeSmallQuietLoading:`${u.small} ${d.xsmall} ${c.negativeQuiet} ${c.inProgress}`,pill:`${u.pill} ${d.medium} ${f.pill} ${v.pill}`,pillSmall:`${u.pillSmall} ${d.xsmall} ${f.pill} ${v.pill}`,pillLoading:`${u.pill} ${d.medium} ${f.pill} ${c.inProgress}`,pillSmallLoading:`${u.pillSmall} ${d.xsmall} ${f.pill} ${c.inProgress}`,link:`${u.link} ${d.medium} ${f.link}`,linkSmall:`${u.link} ${d.xsmall} ${f.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var Eo={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:`${d.medium} ${f.pill} ${v.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"};var Qt={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var ze="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",Ro={wrapper:ze+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},To={wrapper:ze+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var Ao={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${Qt.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};var I={base:"border-2 relative flex items-start",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${d.medium} ${f.pill} ${v.pill} justify-self-end -mr-8 ml-8`};function K(e){return e.split("-")[0]}function ue(e){return e.split("-")[1]}function Y(e){return["top","bottom"].includes(K(e))?"x":"y"}function Ce(e){return e==="y"?"height":"width"}function Ve(e,t,o){let{reference:r,floating:a}=e,n=r.x+r.width/2-a.width/2,l=r.y+r.height/2-a.height/2,i=Y(t),s=Ce(i),p=r[s]/2-a[s]/2,g=i==="x",b;switch(K(t)){case"top":b={x:n,y:r.y-a.height};break;case"bottom":b={x:n,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:l};break;case"left":b={x:r.x-a.width,y:l};break;default:b={x:r.x,y:r.y}}switch(ue(t)){case"start":b[i]-=p*(o&&g?-1:1);break;case"end":b[i]+=p*(o&&g?-1:1)}return b}var We=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:l}=o,i=await(l.isRTL==null?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:g}=Ve(s,r,i),b=r,x={},h=0;for(let m=0;m<n.length;m++){let{name:$,fn:y}=n[m],{x:w,y:L,data:_,reset:k}=await y({x:p,y:g,initialPlacement:r,placement:b,strategy:a,middlewareData:x,rects:s,platform:l,elements:{reference:e,floating:t}});p=w!=null?w:p,g=L!=null?L:g,x=O(C({},x),{[$]:C(C({},x[$]),_)}),k&&h<=50&&(h++,typeof k=="object"&&(k.placement&&(b=k.placement),k.rects&&(s=k.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:p,y:g}=Ve(s,b,i)),m=-1)}return{x:p,y:g,placement:b,strategy:a,middlewareData:x}};function Ge(e){return typeof e!="number"?function(t){return C({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function X(e){return O(C({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Se(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:l,elements:i,strategy:s}=e,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:b="floating",altBoundary:x=!1,padding:h=0}=t,m=Ge(h),$=i[x?b==="floating"?"reference":"floating":b],y=X(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement($)))==null||o?$:$.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:p,rootBoundary:g,strategy:s})),w=X(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:b==="floating"?O(C({},l.floating),{x:r,y:a}):l.reference,offsetParent:await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),strategy:s}):l[b]);return{top:y.top-w.top+m.top,bottom:w.bottom-y.bottom+m.bottom,left:y.left-w.left+m.left,right:w.right-y.right+m.right}}var It=Math.min,qt=Math.max;function Le(e,t,o){return qt(e,It(t,o))}var Ee=e=>({name:"arrow",options:e,async fn(t){let{element:o,padding:r=0}=e!=null?e:{},{x:a,y:n,placement:l,rects:i,platform:s}=t;if(o==null)return{};let p=Ge(r),g={x:a,y:n},b=Y(l),x=ue(l),h=Ce(b),m=await s.getDimensions(o),$=b==="y"?"top":"left",y=b==="y"?"bottom":"right",w=i.reference[h]+i.reference[b]-g[b]-i.floating[h],L=g[b]-i.reference[b],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o)),k=_?b==="y"?_.clientHeight||0:_.clientWidth||0:0;k===0&&(k=i.floating[h]);let le=w/2-L/2,U=p[$],W=k-m[h]-p[y],T=k/2-m[h]/2+le,S=Le(U,T,W),A=(x==="start"?p[$]:p[y])>0&&T!==S&&i.reference[h]<=i.floating[h];return{[b]:g[b]-(A?T<U?U-T:W-T:0),data:{[b]:S,centerOffset:T-S}}}}),jt={left:"right",right:"left",bottom:"top",top:"bottom"};function de(e){return e.replace(/left|right|bottom|top/g,t=>jt[t])}function Ut(e,t,o){o===void 0&&(o=!1);let r=ue(e),a=Y(e),n=Ce(a),l=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(l=de(l)),{main:l,cross:de(l)}}var zt={start:"end",end:"start"};function Fe(e){return e.replace(/start|end/g,t=>zt[t])}var Vt=["top","right","bottom","left"],Po=Vt.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var Re=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o;let{placement:r,middlewareData:a,rects:n,initialPlacement:l,platform:i,elements:s}=t,T=e,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:b,fallbackStrategy:x="bestFit",flipAlignment:h=!0}=T,m=J(T,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),$=K(r),y=b||($===l||!h?[de(l)]:function(S){let A=de(S);return[Fe(S),A,Fe(A)]}(l)),w=[l,...y],L=await Se(t,m),_=[],k=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&_.push(L[$]),g){let{main:S,cross:A}=Ut(r,n,await(i.isRTL==null?void 0:i.isRTL(s.floating)));_.push(L[S],L[A])}if(k=[...k,{placement:r,overflows:_}],!_.every(S=>S<=0)){var le,U;let S=((le=(U=a.flip)==null?void 0:U.index)!=null?le:0)+1,A=w[S];if(A)return{data:{index:S,overflows:k},reset:{placement:A}};let ae="bottom";switch(x){case"bestFit":{var W;let Qe=(W=k.map(se=>[se,se.overflows.filter(G=>G>0).reduce((G,St)=>G+St,0)]).sort((se,G)=>se[1]-G[1])[0])==null?void 0:W[0].placement;Qe&&(ae=Qe);break}case"initialPlacement":ae=l}if(r!==ae)return{reset:{placement:ae}}}return{}}}};var Te=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:o,y:r}=t,a=await async function(n,l){let{placement:i,platform:s,elements:p}=n,g=await(s.isRTL==null?void 0:s.isRTL(p.floating)),b=K(i),x=ue(i),h=Y(i)==="x",m=["left","top"].includes(b)?-1:1,$=g&&h?-1:1,y=typeof l=="function"?l(n):l,{mainAxis:w,crossAxis:L,alignmentAxis:_}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:C({mainAxis:0,crossAxis:0,alignmentAxis:null},y);return x&&typeof _=="number"&&(L=x==="end"?-1*_:_),h?{x:L*$,y:w*m}:{x:w*m,y:L*$}}(t,e);return{x:o+a.x,y:r+a.y,data:a}}}};function Ft(e){return e==="x"?"y":"x"}var Ae=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,y=e,{mainAxis:n=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:L,y:_}=w;return{x:L,y:_}}}}=y,s=J(y,["mainAxis","crossAxis","limiter"]),p={x:o,y:r},g=await Se(t,s),b=Y(K(a)),x=Ft(b),h=p[b],m=p[x];if(n){let w=b==="y"?"bottom":"right";h=Le(h+g[b==="y"?"top":"left"],h,h-g[w])}if(l){let w=x==="y"?"bottom":"right";m=Le(m+g[x==="y"?"top":"left"],m,m-g[w])}let $=i.fn(O(C({},t),{[b]:h,[x]:m}));return O(C({},$),{data:{x:$.x-o,y:$.y-r}})}}};function et(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function M(e){if(e==null)return window;if(!et(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function ee(e){return M(e).getComputedStyle(e)}function P(e){return et(e)?"":e?(e.nodeName||"").toLowerCase():""}function tt(){let e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function R(e){return e instanceof M(e).HTMLElement}function z(e){return e instanceof M(e).Element}function Pe(e){return typeof ShadowRoot=="undefined"?!1:e instanceof M(e).ShadowRoot||e instanceof ShadowRoot}function pe(e){let{overflow:t,overflowX:o,overflowY:r}=ee(e);return/auto|scroll|overlay|hidden/.test(t+r+o)}function Wt(e){return["table","td","th"].includes(P(e))}function Je(e){let t=/firefox/i.test(tt()),o=ee(e);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||t&&o.willChange==="filter"||t&&!!o.filter&&o.filter!=="none"}function ot(){return!/^((?!chrome|android).)*safari/i.test(tt())}var Xe=Math.min,Z=Math.max,be=Math.round;function q(e,t,o){var r,a,n,l;t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=1,p=1;t&&R(e)&&(s=e.offsetWidth>0&&be(i.width)/e.offsetWidth||1,p=e.offsetHeight>0&&be(i.height)/e.offsetHeight||1);let g=z(e)?M(e):window,b=!ot()&&o,x=(i.left+(b&&(r=(a=g.visualViewport)==null?void 0:a.offsetLeft)!=null?r:0))/s,h=(i.top+(b&&(n=(l=g.visualViewport)==null?void 0:l.offsetTop)!=null?n:0))/p,m=i.width/s,$=i.height/p;return{width:m,height:$,top:h,right:x+m,bottom:h+$,left:x,x,y:h}}function Q(e){return(t=e,(t instanceof M(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function ge(e){return z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function rt(e){return q(Q(e)).left+ge(e).scrollLeft}function Gt(e,t,o){let r=R(t),a=Q(t),n=q(e,r&&function(s){let p=q(s);return be(p.width)!==s.offsetWidth||be(p.height)!==s.offsetHeight}(t),o==="fixed"),l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if(r||!r&&o!=="fixed")if((P(t)!=="body"||pe(a))&&(l=ge(t)),R(t)){let s=q(t,!0);i.x=s.x+t.clientLeft,i.y=s.y+t.clientTop}else a&&(i.x=rt(a));return{x:n.left+l.scrollLeft-i.x,y:n.top+l.scrollTop-i.y,width:n.width,height:n.height}}function it(e){return P(e)==="html"?e:e.assignedSlot||e.parentNode||(Pe(e)?e.host:null)||Q(e)}function Ke(e){return R(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Oe(e){let t=M(e),o=Ke(e);for(;o&&Wt(o)&&getComputedStyle(o).position==="static";)o=Ke(o);return o&&(P(o)==="html"||P(o)==="body"&&getComputedStyle(o).position==="static"&&!Je(o))?t:o||function(r){let a=it(r);for(Pe(a)&&(a=a.host);R(a)&&!["html","body"].includes(P(a));){if(Je(a))return a;a=a.parentNode}return null}(e)||t}function Ye(e){if(R(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=q(e);return{width:t.width,height:t.height}}function nt(e){let t=it(e);return["html","body","#document"].includes(P(t))?e.ownerDocument.body:R(t)&&pe(t)?t:nt(t)}function lt(e,t){var o;t===void 0&&(t=[]);let r=nt(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),n=M(r),l=a?[n].concat(n.visualViewport||[],pe(r)?r:[]):r,i=t.concat(l);return a?i:i.concat(lt(l))}function Ze(e,t,o){return t==="viewport"?X(function(r,a){let n=M(r),l=Q(r),i=n.visualViewport,s=l.clientWidth,p=l.clientHeight,g=0,b=0;if(i){s=i.width,p=i.height;let x=ot();(x||!x&&a==="fixed")&&(g=i.offsetLeft,b=i.offsetTop)}return{width:s,height:p,x:g,y:b}}(e,o)):z(t)?function(r,a){let n=q(r,!1,a==="fixed"),l=n.top+r.clientTop,i=n.left+r.clientLeft;return{top:l,left:i,x:i,y:l,right:i+r.clientWidth,bottom:l+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,o):X(function(r){var a;let n=Q(r),l=ge(r),i=(a=r.ownerDocument)==null?void 0:a.body,s=Z(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),p=Z(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),g=-l.scrollLeft+rt(r),b=-l.scrollTop;return ee(i||n).direction==="rtl"&&(g+=Z(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:p,x:g,y:b}}(Q(e)))}function Jt(e){let t=lt(e),o=["absolute","fixed"].includes(ee(e).position)&&R(e)?Oe(e):e;return z(o)?t.filter(r=>z(r)&&function(a,n){let l=n.getRootNode==null?void 0:n.getRootNode();if(a.contains(n))return!0;if(l&&Pe(l)){let i=n;do{if(i&&a===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(r,o)&&P(r)!=="body"):[]}var Xt={getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,n=[...o==="clippingAncestors"?Jt(t):[].concat(o),r],l=n[0],i=n.reduce((s,p)=>{let g=Ze(t,p,a);return s.top=Z(g.top,s.top),s.right=Xe(g.right,s.right),s.bottom=Xe(g.bottom,s.bottom),s.left=Z(g.left,s.left),s},Ze(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:r}=e,a=R(o),n=Q(o);if(o===n)return t;let l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if((a||!a&&r!=="fixed")&&((P(o)!=="body"||pe(n))&&(l=ge(o)),R(o))){let s=q(o,!0);i.x=s.x+o.clientLeft,i.y=s.y+o.clientTop}return O(C({},t),{x:t.x-l.scrollLeft+i.x,y:t.y-l.scrollTop+i.y})},isElement:z,getDimensions:Ye,getOffsetParent:Oe,getDocumentElement:Q,getElementRects:e=>{let{reference:t,floating:o,strategy:r}=e;return{reference:Gt(t,Oe(o),r),floating:O(C({},Ye(o)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>ee(e).direction==="rtl"};var at=(e,t,o)=>We(e,t,C({platform:Xt},o));var te="top",oe="bottom",fe="left",he="right",re={[te]:oe,[oe]:te,[fe]:he,[he]:fe},Wo={[te]:"\u2191",[oe]:"\u2193",[fe]:"\u2190",[he]:"\u2192"};var ct={[fe]:-45,[te]:45,[he]:135,[oe]:-135},st="calc(50% - 7px)",Kt=e=>[te,oe].includes(e);function Yt({actualDirection:e,directionName:t,arrowEl:o}){if(!o)return;e=t;let r=Kt(t);o.style.left=r?st:"",o.style.top=r?"":st}async function dt(e){var a,n;if(!e.isShowing)return;if(await((a=e==null?void 0:e.waitForDOM)==null?void 0:a.call(e)),e.isCallout)return Yt(e);let t=await at(e.targetEl,e.attentionEl,{placement:e.directionName,middleware:[Re(),Te(8),Ae({padding:16}),Ee({element:e.noArrow?void 0:e.arrowEl})]});e.actualDirection=t.placement,Object.assign(((n=e.attentionEl)==null?void 0:n.style)||{},{left:"0",top:"0",transform:`translate3d(${Math.round(t.x)}px, ${Math.round(t.y)}px, 0)`});let{x:o,y:r}=t.middlewareData.arrow;e.arrowEl&&(e.arrowEl.style.left=o?o+"px":"",e.arrowEl.style.top=r?r+"px":"")}var mt=Bt(gt(),1);var H=e=>typeof e=="string",ao=e=>typeof e=="function",ft=new Map;function Ne(e){return[...Array.isArray(e)?e:[e],"en"]}function xt(e,t,o){let r=Ne(e);return xe(()=>$e("date",r,o),()=>new Intl.DateTimeFormat(r,o)).format(H(t)?new Date(t):t)}function Me(e,t,o){let r=Ne(e);return xe(()=>$e("number",r,o),()=>new Intl.NumberFormat(r,o)).format(t)}function ht(e,t,o,n){var l=n,{offset:r=0}=l,a=J(l,["offset"]);var p,g;let i=Ne(e),s=t?xe(()=>$e("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):xe(()=>$e("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(g=(p=a[o])!=null?p:a[s.select(o-r)])!=null?g:a.other}function xe(e,t){let o=e(),r=ft.get(o);return r||(r=t(),ft.set(o,r)),r}function $e(e,t,o){let r=t.join("-");return`${e}-${r}-${JSON.stringify(o)}`}var $t=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,so=(e,t,o={})=>{t=t||e;let r=n=>H(n)?o[n]||{style:n}:n,a=(n,l)=>{let i=Object.keys(o).length?r("number"):{},s=Me(t,n,i);return l.replace("#",s)};return{plural:(n,l)=>{let{offset:i=0}=l,s=ht(t,!1,n,l);return a(n-i,s)},selectordinal:(n,l)=>{let{offset:i=0}=l,s=ht(t,!0,n,l);return a(n-i,s)},select:(n,l)=>{var i;return(i=l[n])!=null?i:l.other},number:(n,l)=>Me(t,n,r(l)),date:(n,l)=>xt(t,n,r(l)),undefined:n=>n}};function co(e,t,o){return(r,a={})=>{let n=so(t,o,a),l=s=>Array.isArray(s)?s.reduce((p,g)=>{if(H(g))return p+g;let[b,x,h]=g,m={};h!=null&&!H(h)?Object.keys(h).forEach(y=>{m[y]=l(h[y])}):m=h;let $=n[x](r[b],m);return $==null?p:p+$},""):s,i=l(e);return H(i)&&$t.test(i)?(0,mt.default)(i.trim()):H(i)?i.trim():i}}var uo=Object.defineProperty,bo=(e,t,o)=>t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,po=(e,t,o)=>(bo(e,typeof t!="symbol"?t+"":t,o),o),Be=class{constructor(){po(this,"_events",{})}on(t,o){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(o),()=>this.removeListener(t,o)}removeListener(t,o){if(!this._hasEvent(t))return;let r=this._events[t].indexOf(o);~r&&this._events[t].splice(r,1)}emit(t,...o){this._hasEvent(t)&&this._events[t].map(r=>r.apply(this,o))}_hasEvent(t){return Array.isArray(this._events[t])}},go=Object.defineProperty,fo=(e,t,o)=>t in e?go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,F=(e,t,o)=>(fo(e,typeof t!="symbol"?t+"":t,o),o),He=class extends Be{constructor(t){super(),F(this,"_locale"),F(this,"_locales"),F(this,"_localeData"),F(this,"_messages"),F(this,"_missing"),F(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,o){this._localeData[t]==null?this._localeData[t]=o:Object.assign(this._localeData[t],o)}loadLocaleData(t,o){o!=null?this._loadLocaleData(t,o):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,o){this._messages[t]==null?this._messages[t]=o:Object.assign(this._messages[t],o)}load(t,o){o!=null?this._load(t,o):Object.keys(t).forEach(r=>this._load(r,t[r])),this.emit("change")}loadAndActivate({locale:t,locales:o,messages:r}){this._locale=t,this._locales=o||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,o){this._locale=t,this._locales=o,this.emit("change")}_(t,o={},{message:r,formats:a}={}){H(t)||(o=t.values||o,r=t.message,t=t.id);let n=!this.messages[t],l=this._missing;if(l&&n)return ao(l)?l(this._locale,t):l;n&&this.emit("missing",{id:t,locale:this._locale});let i=this.messages[t]||r||t;return H(i)&&$t.test(i)?JSON.parse(`"${i}"`):H(i)?i:co(i,this._locale,this._locales)(o,a)}date(t,o){return xt(this._locales||this._locale,t,o)}number(t,o){return Me(this._locales||this._locale,t,o)}};function ho(e={}){return new He(e)}var E=ho();var vt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Close","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var yt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Lukk","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var wt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Sulje","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var mo=["en","nb","fi"],_t="en",kt=e=>mo.find(t=>e===t||e.toLowerCase().includes(t))||_t;function xo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return kt(e)}try{let e=document.documentElement.lang;return kt(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),_t}}var $o=(e,t,o,r)=>e==="nb"?o:e==="fi"?r:t,Dt=(e,t,o)=>{let r=xo(),a=$o(r,e,t,o);E.load(r,a),E.activate(r)};var ne=class extends je(Ct){constructor(){super(),Dt(vt,yt,wt),this.show=!1,this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1}connectedCallback(){if(super.connectedCallback(),!this.placement||!Object.keys(re).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
3
- ${JSON.stringify(Object.keys(re))}`);setTimeout(()=>this.requestUpdate(),0)}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowDirection(){return re[this.placement]}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this.renderRoot.querySelector("#arrow"),attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow},dt(this.attentionState)}pointingAtDirection(){switch(re[this._actualDirection]){case"top":return E._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right":return E._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom":return E._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left":return E._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return E._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return E._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return E._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return E._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let t=this._messageEl.id||(this._messageEl.id=Ue());this._targetEl.setAttribute("aria-details",t)}}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},o=Object.keys(t).find(r=>!!t[r])||"";return{wrapper:I[o],arrow:I[`arrow${o.charAt(0).toUpperCase()+o.slice(1)}`]}}get _ariaClose(){return E._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}firstUpdated(){this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){return this.renderRoot.querySelector("slot[name='target']").assignedNodes()[0]}get _messageEl(){return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0]}get _wrapperClasses(){return _e({[I.base]:!0,[this._activeVariantClasses.wrapper]:!0})}get _arrowClasses(){return _e({[I.arrowBase]:!0,[I[`arrowDirection${this._arrowDirection.charAt(0).toUpperCase()+this._arrowDirection.slice(1)}`]]:!0,[this._activeVariantClasses.arrow]:!0})}get _arrowHtml(){return this.noArrow?"":ie`<div
1
+ var Vt=Object.create;var De=Object.defineProperty,Wt=Object.defineProperties,Jt=Object.getOwnPropertyDescriptor,Gt=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertyNames,ue=Object.getOwnPropertySymbols,Kt=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var _e=(e,t,o)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,L=(e,t)=>{for(var o in t||(t={}))Ee.call(t,o)&&_e(e,o,t[o]);if(ue)for(var o of ue(t))We.call(t,o)&&_e(e,o,t[o]);return e},R=(e,t)=>Wt(e,Gt(t));var Y=(e,t)=>{var o={};for(var r in e)Ee.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&ue)for(var r of ue(e))t.indexOf(r)<0&&We.call(e,r)&&(o[r]=e[r]);return o};var Je=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Yt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Xt(t))!Ee.call(e,a)&&a!==o&&De(e,a,{get:()=>t[a],enumerable:!(r=Jt(t,a))||r.enumerable});return e};var Zt=(e,t,o)=>(o=e!=null?Vt(Kt(e)):{},Yt(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e));var Le=(e,t,o)=>(_e(e,typeof t!="symbol"?t+"":t,o),o);var xt=Je(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.errorMessages=V.ErrorType=void 0;var J;(function(e){e.MalformedUnicode="MALFORMED_UNICODE",e.MalformedHexadecimal="MALFORMED_HEXADECIMAL",e.CodePointLimit="CODE_POINT_LIMIT",e.OctalDeprecation="OCTAL_DEPRECATION",e.EndOfString="END_OF_STRING"})(J=V.ErrorType||(V.ErrorType={}));V.errorMessages=new Map([[J.MalformedUnicode,"malformed Unicode character escape sequence"],[J.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[J.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[J.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[J.EndOfString,"malformed escape sequence at end of string"]])});var yt=Je(j=>{"use strict";Object.defineProperty(j,"__esModule",{value:!0});j.unraw=j.errorMessages=j.ErrorType=void 0;var E=xt();Object.defineProperty(j,"ErrorType",{enumerable:!0,get:function(){return E.ErrorType}});Object.defineProperty(j,"errorMessages",{enumerable:!0,get:function(){return E.errorMessages}});function mo(e){return!e.match(/[^a-f0-9]/i)?parseInt(e,16):NaN}function ve(e,t,o){let r=mo(e);if(Number.isNaN(r)||o!==void 0&&o!==e.length)throw new SyntaxError(E.errorMessages.get(t));return r}function xo(e){let t=ve(e,E.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(t)}function vt(e,t){let o=ve(e,E.ErrorType.MalformedUnicode,4);if(t!==void 0){let r=ve(t,E.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,r)}return String.fromCharCode(o)}function vo(e){return e.charAt(0)==="{"&&e.charAt(e.length-1)==="}"}function $o(e){if(!vo(e))throw new SyntaxError(E.errorMessages.get(E.ErrorType.MalformedUnicode));let t=e.slice(1,-1),o=ve(t,E.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(r){throw r instanceof RangeError?new SyntaxError(E.errorMessages.get(E.ErrorType.CodePointLimit)):r}}function yo(e,t=!1){if(t)throw new SyntaxError(E.errorMessages.get(E.ErrorType.OctalDeprecation));let o=parseInt(e,8);return String.fromCharCode(o)}var wo=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ko(e){return wo.get(e)||e}var _o=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function $t(e,t=!1){return e.replace(_o,function(o,r,a,n,l,i,s,d,p){if(r!==void 0)return"\\";if(a!==void 0)return xo(a);if(n!==void 0)return $o(n);if(l!==void 0)return vt(l,i);if(s!==void 0)return vt(s);if(d==="0")return"\0";if(d!==void 0)return yo(d,!t);if(p!==void 0)return ko(p);throw new SyntaxError(E.errorMessages.get(E.ErrorType.EndOfString))})}j.unraw=$t;j.default=$t});import{css as hr,html as ae,nothing as Qt}from"lit";import Ft from"@warp-ds/elements-core";import{ifDefined as mr}from"lit/directives/if-defined.js";import{classMap as $r}from"lit/directives/class-map.js";var eo=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Ge(e){return class extends e{static createProperty(t,o){let r=o;(typeof(o==null?void 0:o.attribute)=="undefined"||(o==null?void 0:o.attribute)===!0)&&(r=Object.assign({},o,{attribute:eo(t.toString())})),super.createProperty(t,r)}}}function Oe(e){let t=[];for(let[o,r]of Object.entries(e))r&&t.push(o);return t.join(" ")}function Xe(){return`m${Math.random().toString(36).slice(2)}`}var Se={box:"group block relative break-words last-child:mb-0 p-16 rounded-8",bleed:"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",info:"i-bg-$color-box-info-background i-text-$color-box-info-text",neutral:"i-bg-$color-box-neutral-background i-text-$color-box-neutral-text",bordered:"border-2 i-border-$color-box-bordered-border i-bg-$color-box-bordered-background i-text-$color-box-bordered-text",infoClickable:"hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",neutralClickable:"hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",borderedClickable:"hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"};var to="focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block",kr={expandable:"will-change-height",expandableTitle:"font-bold i-text-$color-expandable-title-text",expandableBox:"i-bg-$color-expandable-background hover:i-bg-$color-expandable-background-hover py-0 px-0 "+Se.box,expandableBleed:Se.bleed,chevron:"inline-block align-middle i-text-$color-expandable-icon",chevronNonBox:"relative left-8",chevronBox:"absolute right-16",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:to+" hover:underline focus:underline",buttonBox:"w-full text-left relative inline-flex items-center "+Se.box,paddingTop:"pt-0",title:"flex justify-between items-center",titleType:"h4"},q="font-bold focusable justify-center transition-colors ease-in-out",y={primary:"i-text-$color-button-primary-text hover:i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover active:i-bg-$color-button-primary-background-active",secondary:"i-text-$color-button-secondary-text hover:i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",utility:"i-text-$color-button-utility-text hover:i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover active:i-border-$color-button-utility-border-active",destructive:"i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover active:i-bg-$color-button-negative-background-active",pill:"i-text-$color-button-pill-icon hover:i-text-$color-button-pill-icon-hover active:i-text-$color-button-pill-icon-active i-bg-$color-button-pill-background hover:i-bg-$color-button-pill-background-hover active:i-bg-$color-button-pill-background-active",disabled:"i-text-$color-button-disabled-text i-bg-$color-button-disabled-background",quiet:"i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",utilityQuiet:"i-text-$color-button-utility-quiet-text i-bg-$color-button-utility-quiet-background hover:i-bg-$color-button-utility-quiet-background-hover",negativeQuiet:"i-bg-$color-button-negative-quiet-background i-text-$color-button-negative-quiet-text hover:i-bg-$color-button-negative-quiet-background-hover active:i-bg-$color-button-negative-quiet-background-active",loading:"i-text-$color-button-loading-text i-bg-$color-button-loading-background",link:"i-text-$color-button-link-text"},x={primary:`border-0 rounded-8 ${q}`,secondary:`border-2 rounded-8 ${q}`,utility:`border rounded-4 ${q}`,negative:`border-0 rounded-8 ${q}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${q}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline ${y.link}`},g={xsmall:"py-6 px-16",small:"py-8 px-16",medium:"py-10 px-14",large:"py-12 px-16",utility:"py-[11px] px-[15px]",smallUtility:"py-[7px] px-[15px]",pill:"min-h-[44px] min-w-[44px]",pillSmall:"min-h-32 min-w-32",link:"p-0"},b={medium:"text-m leading-[24]",xsmall:"text-xs"},u={inProgress:`border-transparent animate-inprogress pointer-events-none ${y.loading}`,quiet:`border-0 rounded-8 ${q}`,utilityQuiet:`border-0 rounded-4 ${q}`,negativeQuiet:`border-0 rounded-8 ${q}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${y.disabled}`},_r={secondary:`${g.medium} ${b.medium} ${x.secondary} ${y.secondary}`,secondaryHref:`${g.medium} ${b.medium} ${x.secondary} ${y.secondary}`,secondaryDisabled:`${g.medium} ${b.medium} ${x.secondary} ${u.isDisabled}`,secondarySmall:`${b.xsmall} ${g.xsmall} ${x.secondary} ${y.secondary}`,secondarySmallDisabled:`${b.xsmall} ${g.xsmall} ${x.secondary} ${u.isDisabled}`,secondaryQuiet:`${g.medium} ${b.medium} ${u.quiet} ${y.quiet}`,secondaryQuietDisabled:`${g.medium} ${b.medium} ${u.quiet} ${u.isDisabled}`,secondarySmallQuiet:`${b.xsmall} ${g.xsmall} ${u.quiet} ${y.quiet}`,secondarySmallQuietDisabled:`${b.xsmall} ${g.xsmall} ${u.quiet} ${u.isDisabled}`,secondaryLoading:`${g.medium} ${b.medium} ${x.secondary} ${u.inProgress}`,secondarySmallLoading:`${b.xsmall} ${g.xsmall} ${x.secondary} ${u.inProgress}`,secondarySmallQuietLoading:`${b.xsmall} ${g.xsmall} ${u.quiet} ${u.inProgress}`,secondaryQuietLoading:`${g.medium} ${b.medium} ${u.quiet} ${u.inProgress}`,primary:`${g.large} ${b.medium} ${x.primary} ${y.primary}`,primaryDisabled:`${g.large} ${b.medium} ${u.isDisabled} ${x.primary}`,primarySmall:`${g.small} ${b.xsmall} ${x.primary} ${y.primary}`,primarySmallDisabled:`${g.small} ${b.xsmall} ${u.isDisabled} ${x.primary} `,primaryQuiet:`${g.large} ${b.medium} ${u.quiet} ${y.quiet}`,primaryQuietDisabled:`${g.large} ${b.medium} ${u.quiet} ${u.isDisabled}`,primarySmallQuiet:`${g.small} ${b.xsmall} ${u.quiet} ${y.quiet}`,primarySmallQuietDisabled:`${g.small} ${b.xsmall} ${u.quiet} ${u.isDisabled}`,primaryLoading:`${g.large} ${b.medium} ${u.inProgress} ${x.primary}`,primarySmallLoading:`${g.small} ${b.xsmall} ${u.inProgress} ${x.primary}`,primarySmallQuietLoading:`${g.small} ${b.xsmall} ${u.quiet} ${u.inProgress} ${x.primary}`,primaryQuietLoading:`${g.large} ${b.medium} ${u.quiet} ${u.inProgress}`,utility:`${g.utility} ${b.medium} ${x.utility} ${y.utility}`,utilityDisabled:`${g.utility} ${b.medium} ${x.utility} ${u.isDisabled}`,utilityQuiet:`${g.large} ${b.medium} ${u.utilityQuiet} ${y.utilityQuiet}`,utilityQuietDisabled:`${g.large} ${b.medium} ${u.utilityQuiet} ${u.isDisabled}`,utilitySmall:`${g.smallUtility} ${b.xsmall} ${x.utility} ${y.utility}`,utilitySmallDisabled:`${g.smallUtility} ${b.xsmall} ${x.utility} ${u.isDisabled}`,utilitySmallQuiet:`${g.smallUtility} ${b.xsmall} ${u.utilityQuiet} ${y.utilityQuiet}`,utilitySmallQuietDisabled:`${g.smallUtility} ${b.xsmall} ${u.utilityQuiet} ${u.isDisabled}`,utilityLoading:`${g.large} ${b.medium} ${x.utility} ${u.inProgress}`,utilitySmallLoading:`${g.smallUtility} ${b.xsmall} ${x.utility} ${u.inProgress}`,utilityQuietLoading:`${g.large} ${b.medium} ${u.inProgress} ${u.utilityQuiet}`,utilitySmallQuietLoading:`${g.smallUtility} ${b.xsmall} ${u.inProgress} ${u.utilityQuiet}`,negative:`${g.large} ${b.medium} ${x.negative} ${y.destructive}`,negativeDisabled:`${g.large} ${b.medium} ${x.negative} ${u.isDisabled}`,negativeQuiet:`${g.large} ${b.medium} ${u.negativeQuiet} ${y.negativeQuiet}`,negativeQuietDisabled:`${g.large} ${b.medium} ${u.negativeQuiet}${u.isDisabled}`,negativeSmall:`${g.small} ${b.xsmall} ${x.negative} ${y.destructive}`,negativeSmallDisabled:`${g.small} ${b.xsmall} ${x.negative} ${u.isDisabled}`,negativeSmallQuiet:`${g.small} ${b.xsmall} ${u.negativeQuiet} ${y.negativeQuiet}`,negativeSmallQuietDisabled:`${g.small} ${b.xsmall} ${u.negativeQuiet} ${u.isDisabled}`,negativeLoading:`${g.large} ${b.medium} ${x.negative} ${u.inProgress}`,negativeSmallLoading:`${g.small} ${b.xsmall} ${u.inProgress} ${x.negative}`,negativeQuietLoading:`${g.large} ${b.medium} ${u.negativeQuiet} ${x.negative} ${u.inProgress}`,negativeSmallQuietLoading:`${g.small} ${b.xsmall} ${u.negativeQuiet} ${u.inProgress}`,pill:`${g.pill} ${b.medium} ${x.pill} ${y.pill}`,pillSmall:`${g.pillSmall} ${b.xsmall} ${x.pill} ${y.pill}`,pillLoading:`${g.pill} ${b.medium} ${x.pill} ${u.inProgress}`,pillSmallLoading:`${g.pillSmall} ${b.xsmall} ${x.pill} ${u.inProgress}`,link:`${g.link} ${b.medium} ${x.link}`,linkSmall:`${g.link} ${b.xsmall} ${x.link}`,linkAsButton:"inline-block hover:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var Dr={transparentBg:'before:i-bg-$color-modal-backdrop-background before:content-[""] before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:opacity-25',backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-20 [--w-modal-max-height:80%] [--w-modal-width:640px]",modal:"pb-safe-[32] i-shadow-$shadow-modal max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 i-bg-$color-modal-background flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",content:"block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",footer:"flex justify-end shrink-0 px-16 sm:px-32",transitionTitle:"transition-all duration-300",transitionTitleCenter:"justify-self-center",transitionTitleColSpan:"col-span-2",title:"-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-center px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:`${b.medium} ${x.pill} ${y.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,titleButtonLeft:"-ml-8 sm:-ml-12 justify-self-start",titleButtonRight:"-mr-8 sm:-mr-12 justify-self-end",titleButtonIcon:"h-16 w-16 sm:h-24 sm:w-24",titleButtonIconRotated:"transform rotate-90"};var oo={label:"antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",labelInvalid:"i-text-$color-label-text-negative",optional:"pl-8 font-normal text-s i-text-$color-label-optional-text"};var Ke="absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ",Er={wrapper:Ke+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"},Lr={wrapper:Ke+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"};var Or={toggle:"absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",label:`px-12 ${oo.label} py-8! cursor-pointer focusable focusable-inset`,buttonOrLink:"bg-transparent focusable",buttonOrLinkStretch:"inset-0 absolute"};var F={base:"border-2 relative flex items-start",tooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",callout:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",highlight:"i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",popover:"i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeft:"-left-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionTop:"-top-[8px]",arrowTooltip:"i-bg-$color-tooltip-background i-border-$color-tooltip-background",arrowCallout:"i-bg-$color-callout-background i-border-$color-callout-border",arrowPopover:"i-bg-$color-popover-background i-border-$color-popover-background",arrowHighlight:"i-bg-$color-callout-background i-border-$color-callout-border",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${b.medium} ${x.pill} ${y.pill} justify-self-end -mr-8 ml-8`};function ee(e){return e.split("-")[0]}function pe(e){return e.split("-")[1]}function te(e){return["top","bottom"].includes(ee(e))?"x":"y"}function Te(e){return e==="y"?"height":"width"}function Ye(e,t,o){let{reference:r,floating:a}=e,n=r.x+r.width/2-a.width/2,l=r.y+r.height/2-a.height/2,i=te(t),s=Te(i),d=r[s]/2-a[s]/2,p=i==="x",f;switch(ee(t)){case"top":f={x:n,y:r.y-a.height};break;case"bottom":f={x:n,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:l};break;case"left":f={x:r.x-a.width,y:l};break;default:f={x:r.x,y:r.y}}switch(pe(t)){case"start":f[i]-=d*(o&&p?-1:1);break;case"end":f[i]+=d*(o&&p?-1:1)}return f}var et=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:l}=o,i=await(l.isRTL==null?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:p}=Ye(s,r,i),f=r,$={},c=0;for(let h=0;h<n.length;h++){let{name:m,fn:v}=n[h],{x:w,y:D,data:k,reset:_}=await v({x:d,y:p,initialPlacement:r,placement:f,strategy:a,middlewareData:$,rects:s,platform:l,elements:{reference:e,floating:t}});d=w!=null?w:d,p=D!=null?D:p,$=R(L({},$),{[m]:L(L({},$[m]),k)}),_&&c<=50&&(c++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(s=_.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):_.rects),{x:d,y:p}=Ye(s,f,i)),h=-1)}return{x:d,y:p,placement:f,strategy:a,middlewareData:$}};function tt(e){return typeof e!="number"?function(t){return L({top:0,right:0,bottom:0,left:0},t)}(e):{top:e,right:e,bottom:e,left:e}}function Z(e){return R(L({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}async function Ae(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:l,elements:i,strategy:s}=e,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:$=!1,padding:c=0}=t,h=tt(c),m=i[$?f==="floating"?"reference":"floating":f],v=Z(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(m)))==null||o?m:m.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:d,rootBoundary:p,strategy:s})),w=Z(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:f==="floating"?R(L({},l.floating),{x:r,y:a}):l.reference,offsetParent:await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),strategy:s}):l[f]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}var ro=Math.min,io=Math.max;function Ce(e,t,o){return io(e,ro(t,o))}var Pe=e=>({name:"arrow",options:e,async fn(t){let{element:o,padding:r=0}=e!=null?e:{},{x:a,y:n,placement:l,rects:i,platform:s}=t;if(o==null)return{};let d=tt(r),p={x:a,y:n},f=te(l),$=pe(l),c=Te(f),h=await s.getDimensions(o),m=f==="y"?"top":"left",v=f==="y"?"bottom":"right",w=i.reference[c]+i.reference[f]-p[f]-i.floating[c],D=p[f]-i.reference[f],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o)),_=k?f==="y"?k.clientHeight||0:k.clientWidth||0:0;_===0&&(_=i.floating[c]);let Q=w/2-D/2,C=d[m],B=_-h[c]-d[v],A=_/2-h[c]/2+Q,O=Ce(C,A,B),P=($==="start"?d[m]:d[v])>0&&A!==O&&i.reference[c]<=i.floating[c];return{[f]:p[f]-(P?A<C?C-A:B-A:0),data:{[f]:O,centerOffset:A-O}}}}),no={left:"right",right:"left",bottom:"top",top:"bottom"};function be(e){return e.replace(/left|right|bottom|top/g,t=>no[t])}function lo(e,t,o){o===void 0&&(o=!1);let r=pe(e),a=te(e),n=Te(a),l=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(l=be(l)),{main:l,cross:be(l)}}var ao={start:"end",end:"start"};function Ze(e){return e.replace(/start|end/g,t=>ao[t])}var so=["top","right","bottom","left"],Cr=so.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);var Re=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o;let{placement:r,middlewareData:a,rects:n,initialPlacement:l,platform:i,elements:s}=t,A=e,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:$="bestFit",flipAlignment:c=!0}=A,h=Y(A,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","flipAlignment"]),m=ee(r),v=f||(m===l||!c?[be(l)]:function(O){let P=be(O);return[Ze(O),P,Ze(P)]}(l)),w=[l,...v],D=await Ae(t,h),k=[],_=((o=a.flip)==null?void 0:o.overflows)||[];if(d&&k.push(D[m]),p){let{main:O,cross:P}=lo(r,n,await(i.isRTL==null?void 0:i.isRTL(s.floating)));k.push(D[O],D[P])}if(_=[..._,{placement:r,overflows:k}],!k.every(O=>O<=0)){var Q,C;let O=((Q=(C=a.flip)==null?void 0:C.index)!=null?Q:0)+1,P=w[O];if(P)return{data:{index:O,overflows:_},reset:{placement:P}};let ce="bottom";switch($){case"bestFit":{var B;let Ve=(B=_.map(de=>[de,de.overflows.filter(K=>K>0).reduce((K,zt)=>K+zt,0)]).sort((de,K)=>de[1]-K[1])[0])==null?void 0:B[0].placement;Ve&&(ce=Ve);break}case"initialPlacement":ce=l}if(r!==ce)return{reset:{placement:ce}}}return{}}}};var Me=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){let{x:o,y:r}=t,a=await async function(n,l){let{placement:i,platform:s,elements:d}=n,p=await(s.isRTL==null?void 0:s.isRTL(d.floating)),f=ee(i),$=pe(i),c=te(i)==="x",h=["left","top"].includes(f)?-1:1,m=p&&c?-1:1,v=typeof l=="function"?l(n):l,{mainAxis:w,crossAxis:D,alignmentAxis:k}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:L({mainAxis:0,crossAxis:0,alignmentAxis:null},v);return $&&typeof k=="number"&&(D=$==="end"?-1*k:k),c?{x:D*m,y:w*h}:{x:w*h,y:D*m}}(t,e);return{x:o+a.x,y:r+a.y,data:a}}}};function co(e){return e==="x"?"y":"x"}var Ne=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,v=e,{mainAxis:n=!0,crossAxis:l=!1,limiter:i={fn:w=>{let{x:D,y:k}=w;return{x:D,y:k}}}}=v,s=Y(v,["mainAxis","crossAxis","limiter"]),d={x:o,y:r},p=await Ae(t,s),f=te(ee(a)),$=co(f),c=d[f],h=d[$];if(n){let w=f==="y"?"bottom":"right";c=Ce(c+p[f==="y"?"top":"left"],c,c-p[w])}if(l){let w=$==="y"?"bottom":"right";h=Ce(h+p[$==="y"?"top":"left"],h,h-p[w])}let m=i.fn(R(L({},t),{[f]:c,[$]:h}));return R(L({},m),{data:{x:m.x-o,y:m.y-r}})}}};function at(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function N(e){if(e==null)return window;if(!at(e)){let t=e.ownerDocument;return t&&t.defaultView||window}return e}function re(e){return N(e).getComputedStyle(e)}function M(e){return at(e)?"":e?(e.nodeName||"").toLowerCase():""}function st(){let e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function T(e){return e instanceof N(e).HTMLElement}function W(e){return e instanceof N(e).Element}function Ie(e){return typeof ShadowRoot=="undefined"?!1:e instanceof N(e).ShadowRoot||e instanceof ShadowRoot}function fe(e){let{overflow:t,overflowX:o,overflowY:r}=re(e);return/auto|scroll|overlay|hidden/.test(t+r+o)}function uo(e){return["table","td","th"].includes(M(e))}function ot(e){let t=/firefox/i.test(st()),o=re(e);return o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].includes(o.willChange)||t&&o.willChange==="filter"||t&&!!o.filter&&o.filter!=="none"}function ct(){return!/^((?!chrome|android).)*safari/i.test(st())}var rt=Math.min,oe=Math.max,ge=Math.round;function z(e,t,o){var r,a,n,l;t===void 0&&(t=!1),o===void 0&&(o=!1);let i=e.getBoundingClientRect(),s=1,d=1;t&&T(e)&&(s=e.offsetWidth>0&&ge(i.width)/e.offsetWidth||1,d=e.offsetHeight>0&&ge(i.height)/e.offsetHeight||1);let p=W(e)?N(e):window,f=!ct()&&o,$=(i.left+(f&&(r=(a=p.visualViewport)==null?void 0:a.offsetLeft)!=null?r:0))/s,c=(i.top+(f&&(n=(l=p.visualViewport)==null?void 0:l.offsetTop)!=null?n:0))/d,h=i.width/s,m=i.height/d;return{width:h,height:m,top:c,right:$+h,bottom:c+m,left:$,x:$,y:c}}function U(e){return(t=e,(t instanceof N(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function he(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dt(e){return z(U(e)).left+he(e).scrollLeft}function bo(e,t,o){let r=T(t),a=U(t),n=z(e,r&&function(s){let d=z(s);return ge(d.width)!==s.offsetWidth||ge(d.height)!==s.offsetHeight}(t),o==="fixed"),l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if(r||!r&&o!=="fixed")if((M(t)!=="body"||fe(a))&&(l=he(t)),T(t)){let s=z(t,!0);i.x=s.x+t.clientLeft,i.y=s.y+t.clientTop}else a&&(i.x=dt(a));return{x:n.left+l.scrollLeft-i.x,y:n.top+l.scrollTop-i.y,width:n.width,height:n.height}}function ut(e){return M(e)==="html"?e:e.assignedSlot||e.parentNode||(Ie(e)?e.host:null)||U(e)}function it(e){return T(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function je(e){let t=N(e),o=it(e);for(;o&&uo(o)&&getComputedStyle(o).position==="static";)o=it(o);return o&&(M(o)==="html"||M(o)==="body"&&getComputedStyle(o).position==="static"&&!ot(o))?t:o||function(r){let a=ut(r);for(Ie(a)&&(a=a.host);T(a)&&!["html","body"].includes(M(a));){if(ot(a))return a;a=a.parentNode}return null}(e)||t}function nt(e){if(T(e))return{width:e.offsetWidth,height:e.offsetHeight};let t=z(e);return{width:t.width,height:t.height}}function bt(e){let t=ut(e);return["html","body","#document"].includes(M(t))?e.ownerDocument.body:T(t)&&fe(t)?t:bt(t)}function pt(e,t){var o;t===void 0&&(t=[]);let r=bt(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),n=N(r),l=a?[n].concat(n.visualViewport||[],fe(r)?r:[]):r,i=t.concat(l);return a?i:i.concat(pt(l))}function lt(e,t,o){return t==="viewport"?Z(function(r,a){let n=N(r),l=U(r),i=n.visualViewport,s=l.clientWidth,d=l.clientHeight,p=0,f=0;if(i){s=i.width,d=i.height;let $=ct();($||!$&&a==="fixed")&&(p=i.offsetLeft,f=i.offsetTop)}return{width:s,height:d,x:p,y:f}}(e,o)):W(t)?function(r,a){let n=z(r,!1,a==="fixed"),l=n.top+r.clientTop,i=n.left+r.clientLeft;return{top:l,left:i,x:i,y:l,right:i+r.clientWidth,bottom:l+r.clientHeight,width:r.clientWidth,height:r.clientHeight}}(t,o):Z(function(r){var a;let n=U(r),l=he(r),i=(a=r.ownerDocument)==null?void 0:a.body,s=oe(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),d=oe(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),p=-l.scrollLeft+dt(r),f=-l.scrollTop;return re(i||n).direction==="rtl"&&(p+=oe(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:d,x:p,y:f}}(U(e)))}function po(e){let t=pt(e),o=["absolute","fixed"].includes(re(e).position)&&T(e)?je(e):e;return W(o)?t.filter(r=>W(r)&&function(a,n){let l=n.getRootNode==null?void 0:n.getRootNode();if(a.contains(n))return!0;if(l&&Ie(l)){let i=n;do{if(i&&a===i)return!0;i=i.parentNode||i.host}while(i)}return!1}(r,o)&&M(r)!=="body"):[]}var go={getClippingRect:function(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,n=[...o==="clippingAncestors"?po(t):[].concat(o),r],l=n[0],i=n.reduce((s,d)=>{let p=lt(t,d,a);return s.top=oe(p.top,s.top),s.right=rt(p.right,s.right),s.bottom=rt(p.bottom,s.bottom),s.left=oe(p.left,s.left),s},lt(t,l,a));return{width:i.right-i.left,height:i.bottom-i.top,x:i.left,y:i.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:o,strategy:r}=e,a=T(o),n=U(o);if(o===n)return t;let l={scrollLeft:0,scrollTop:0},i={x:0,y:0};if((a||!a&&r!=="fixed")&&((M(o)!=="body"||fe(n))&&(l=he(o)),T(o))){let s=z(o,!0);i.x=s.x+o.clientLeft,i.y=s.y+o.clientTop}return R(L({},t),{x:t.x-l.scrollLeft+i.x,y:t.y-l.scrollTop+i.y})},isElement:W,getDimensions:nt,getOffsetParent:je,getDocumentElement:U,getElementRects:e=>{let{reference:t,floating:o,strategy:r}=e;return{reference:bo(t,je(o),r),floating:R(L({},nt(o)),{x:0,y:0})}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>re(e).direction==="rtl"};var gt=(e,t,o)=>et(e,t,L({platform:go},o));var ie="top",ne="bottom",me="left",xe="right",le={[ie]:ne,[ne]:ie,[me]:xe,[xe]:me},Qr={[ie]:"\u2191",[ne]:"\u2193",[me]:"\u2190",[xe]:"\u2192"};var ht={[me]:-45,[ie]:45,[xe]:135,[ne]:-135},ft="calc(50% - 7px)",fo=e=>[ie,ne].includes(e);function ho({actualDirection:e,directionName:t,arrowEl:o}){if(!o)return;e=t;let r=fo(t);o.style.left=r?ft:"",o.style.top=r?"":ft}async function mt(e){var a,n;if(!e.isShowing)return;if(await((a=e==null?void 0:e.waitForDOM)==null?void 0:a.call(e)),e.isCallout)return ho(e);let t=await gt(e.targetEl,e.attentionEl,{placement:e.directionName,middleware:[Re(),Me(8),Ne({padding:16}),Pe({element:e.noArrow?void 0:e.arrowEl})]});e.actualDirection=t.placement,Object.assign(((n=e.attentionEl)==null?void 0:n.style)||{},{left:"0",top:"0",transform:`translate3d(${Math.round(t.x)}px, ${Math.round(t.y)}px, 0)`});let{x:o,y:r}=t.middlewareData.arrow;e.arrowEl&&(e.arrowEl.style.left=o?o+"px":"",e.arrowEl.style.top=r?r+"px":"")}var _t=Zt(yt(),1);var I=e=>typeof e=="string",Do=e=>typeof e=="function",wt=new Map;function Ue(e){return[...Array.isArray(e)?e:[e],"en"]}function Dt(e,t,o){let r=Ue(e);return $e(()=>ye("date",r,o),()=>new Intl.DateTimeFormat(r,o)).format(I(t)?new Date(t):t)}function He(e,t,o){let r=Ue(e);return $e(()=>ye("number",r,o),()=>new Intl.NumberFormat(r,o)).format(t)}function kt(e,t,o,n){var l=n,{offset:r=0}=l,a=Y(l,["offset"]);var d,p;let i=Ue(e),s=t?$e(()=>ye("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):$e(()=>ye("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(p=(d=a[o])!=null?d:a[s.select(o-r)])!=null?p:a.other}function $e(e,t){let o=e(),r=wt.get(o);return r||(r=t(),wt.set(o,r)),r}function ye(e,t,o){let r=t.join("-");return`${e}-${r}-${JSON.stringify(o)}`}var Et=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Eo=(e,t,o={})=>{t=t||e;let r=n=>I(n)?o[n]||{style:n}:n,a=(n,l)=>{let i=Object.keys(o).length?r("number"):{},s=He(t,n,i);return l.replace("#",s)};return{plural:(n,l)=>{let{offset:i=0}=l,s=kt(t,!1,n,l);return a(n-i,s)},selectordinal:(n,l)=>{let{offset:i=0}=l,s=kt(t,!0,n,l);return a(n-i,s)},select:(n,l)=>{var i;return(i=l[n])!=null?i:l.other},number:(n,l)=>He(t,n,r(l)),date:(n,l)=>Dt(t,n,r(l)),undefined:n=>n}};function Lo(e,t,o){return(r,a={})=>{let n=Eo(t,o,a),l=s=>Array.isArray(s)?s.reduce((d,p)=>{if(I(p))return d+p;let[f,$,c]=p,h={};c!=null&&!I(c)?Object.keys(c).forEach(v=>{h[v]=l(c[v])}):h=c;let m=n[$](r[f],h);return m==null?d:d+m},""):s,i=l(e);return I(i)&&Et.test(i)?(0,_t.default)(i.trim()):I(i)?i.trim():i}}var Oo=Object.defineProperty,So=(e,t,o)=>t in e?Oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Co=(e,t,o)=>(So(e,typeof t!="symbol"?t+"":t,o),o),Be=class{constructor(){Co(this,"_events",{})}on(t,o){return this._hasEvent(t)||(this._events[t]=[]),this._events[t].push(o),()=>this.removeListener(t,o)}removeListener(t,o){if(!this._hasEvent(t))return;let r=this._events[t].indexOf(o);~r&&this._events[t].splice(r,1)}emit(t,...o){this._hasEvent(t)&&this._events[t].map(r=>r.apply(this,o))}_hasEvent(t){return Array.isArray(this._events[t])}},To=Object.defineProperty,Ao=(e,t,o)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,G=(e,t,o)=>(Ao(e,typeof t!="symbol"?t+"":t,o),o),qe=class extends Be{constructor(t){super(),G(this,"_locale"),G(this,"_locales"),G(this,"_localeData"),G(this,"_messages"),G(this,"_missing"),G(this,"t",this._.bind(this)),this._messages={},this._localeData={},t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),t.localeData!=null&&this.loadLocaleData(t.localeData),(t.locale!=null||t.locales!=null)&&this.activate(t.locale,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var t;return(t=this._messages[this._locale])!=null?t:{}}get localeData(){var t;return(t=this._localeData[this._locale])!=null?t:{}}_loadLocaleData(t,o){this._localeData[t]==null?this._localeData[t]=o:Object.assign(this._localeData[t],o)}loadLocaleData(t,o){o!=null?this._loadLocaleData(t,o):Object.keys(t).forEach(r=>this._loadLocaleData(r,t[r])),this.emit("change")}_load(t,o){this._messages[t]==null?this._messages[t]=o:Object.assign(this._messages[t],o)}load(t,o){o!=null?this._load(t,o):Object.keys(t).forEach(r=>this._load(r,t[r])),this.emit("change")}loadAndActivate({locale:t,locales:o,messages:r}){this._locale=t,this._locales=o||void 0,this._messages[this._locale]=r,this.emit("change")}activate(t,o){this._locale=t,this._locales=o,this.emit("change")}_(t,o={},{message:r,formats:a}={}){I(t)||(o=t.values||o,r=t.message,t=t.id);let n=!this.messages[t],l=this._missing;if(l&&n)return Do(l)?l(this._locale,t):l;n&&this.emit("missing",{id:t,locale:this._locale});let i=this.messages[t]||r||t;return I(i)&&Et.test(i)?JSON.parse(`"${i}"`):I(i)?i:Lo(i,this._locale,this._locales)(o,a)}date(t,o){return Dt(this._locales||this._locale,t,o)}number(t,o){return He(this._locales||this._locale,t,o)}};function Po(e={}){return new qe(e)}var S=Po();var Lt=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Close","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var Ot=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Lukk","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var St=JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Sulje","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');var Ro=["en","nb","fi"],Tt="en",Ct=e=>Ro.find(t=>e===t||e.toLowerCase().includes(t))||Tt;function Mo(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ct(e)}try{let e=document.documentElement.lang;return Ct(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Tt}}var No=(e,t,o,r)=>e==="nb"?o:e==="fi"?r:t,At=(e,t,o)=>{let r=Mo(),a=No(r,e,t,o);S.load(r,a),S.activate(r)};import{LitElement as Wo}from"lit";import{unsafeStatic as Jo,html as Go}from"lit/static-html.js";var jo=Object.create,jt=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,Ho=Object.getOwnPropertyNames,Pt=Object.getOwnPropertySymbols,Bo=Object.getPrototypeOf,It=Object.prototype.hasOwnProperty,qo=Object.prototype.propertyIsEnumerable,Uo=(e,t)=>{var o={};for(var r in e)It.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Pt)for(var r of Pt(e))t.indexOf(r)<0&&qo.call(e,r)&&(o[r]=e[r]);return o},Ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Qo=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Ho(t))!It.call(e,a)&&a!==o&&jt(e,a,{get:()=>t[a],enumerable:!(r=Io(t,a))||r.enumerable});return e},Fo=(e,t,o)=>(o=e!=null?jo(Bo(e)):{},Qo(t||!e||!e.__esModule?jt(o,"default",{value:e,enumerable:!0}):o,e)),zo=Ht(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.errorMessages=e.ErrorType=void 0;var t;(function(o){o.MalformedUnicode="MALFORMED_UNICODE",o.MalformedHexadecimal="MALFORMED_HEXADECIMAL",o.CodePointLimit="CODE_POINT_LIMIT",o.OctalDeprecation="OCTAL_DEPRECATION",o.EndOfString="END_OF_STRING"})(t=e.ErrorType||(e.ErrorType={})),e.errorMessages=new Map([[t.MalformedUnicode,"malformed Unicode character escape sequence"],[t.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[t.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[t.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[t.EndOfString,"malformed escape sequence at end of string"]])}),Vo=Ht(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unraw=e.errorMessages=e.ErrorType=void 0;var t=zo();Object.defineProperty(e,"ErrorType",{enumerable:!0,get:function(){return t.ErrorType}}),Object.defineProperty(e,"errorMessages",{enumerable:!0,get:function(){return t.errorMessages}});function o(c){return c.match(/[^a-f0-9]/i)?NaN:parseInt(c,16)}function r(c,h,m){let v=o(c);if(Number.isNaN(v)||m!==void 0&&m!==c.length)throw new SyntaxError(t.errorMessages.get(h));return v}function a(c){let h=r(c,t.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(h)}function n(c,h){let m=r(c,t.ErrorType.MalformedUnicode,4);if(h!==void 0){let v=r(h,t.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,v)}return String.fromCharCode(m)}function l(c){return c.charAt(0)==="{"&&c.charAt(c.length-1)==="}"}function i(c){if(!l(c))throw new SyntaxError(t.errorMessages.get(t.ErrorType.MalformedUnicode));let h=c.slice(1,-1),m=r(h,t.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(v){throw v instanceof RangeError?new SyntaxError(t.errorMessages.get(t.ErrorType.CodePointLimit)):v}}function s(c,h=!1){if(h)throw new SyntaxError(t.errorMessages.get(t.ErrorType.OctalDeprecation));let m=parseInt(c,8);return String.fromCharCode(m)}var d=new Map([["b","\b"],["f","\f"],["n",`
3
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function p(c){return d.get(c)||c}var f=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function $(c,h=!1){return c.replace(f,function(m,v,w,D,k,_,Q,C,B){if(v!==void 0)return"\\";if(w!==void 0)return a(w);if(D!==void 0)return i(D);if(k!==void 0)return n(k,_);if(Q!==void 0)return n(Q);if(C==="0")return"\0";if(C!==void 0)return s(C,!h);if(B!==void 0)return p(B);throw new SyntaxError(t.errorMessages.get(t.ErrorType.EndOfString))})}e.unraw=$,e.default=$}),Xo=Fo(Vo(),1),H=e=>typeof e=="string",Ko=e=>typeof e=="function",Rt=new Map;function ze(e){return[...Array.isArray(e)?e:[e],"en"]}function Bt(e,t,o){let r=ze(e);return we(()=>ke("date",r,o),()=>new Intl.DateTimeFormat(r,o)).format(H(t)?new Date(t):t)}function Qe(e,t,o){let r=ze(e);return we(()=>ke("number",r,o),()=>new Intl.NumberFormat(r,o)).format(t)}function Mt(e,t,o,r){var a=r,{offset:n=0}=a,l=Uo(a,["offset"]),i,s;let d=ze(e),p=t?we(()=>ke("plural-ordinal",d),()=>new Intl.PluralRules(d,{type:"ordinal"})):we(()=>ke("plural-cardinal",d),()=>new Intl.PluralRules(d,{type:"cardinal"}));return(s=(i=l[o])!=null?i:l[p.select(o-n)])!=null?s:l.other}function we(e,t){let o=e(),r=Rt.get(o);return r||(r=t(),Rt.set(o,r)),r}function ke(e,t,o){let r=t.join("-");return`${e}-${r}-${JSON.stringify(o)}`}var qt=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Yo=(e,t,o={})=>{t=t||e;let r=n=>H(n)?o[n]||{style:n}:n,a=(n,l)=>{let i=Object.keys(o).length?r("number"):{},s=Qe(t,n,i);return l.replace("#",s)};return{plural:(n,l)=>{let{offset:i=0}=l,s=Mt(t,!1,n,l);return a(n-i,s)},selectordinal:(n,l)=>{let{offset:i=0}=l,s=Mt(t,!0,n,l);return a(n-i,s)},select:(n,l)=>{var i;return(i=l[n])!=null?i:l.other},number:(n,l)=>Qe(t,n,r(l)),date:(n,l)=>Bt(t,n,r(l)),undefined:n=>n}};function Zo(e,t,o){return(r,a={})=>{let n=Yo(t,o,a),l=s=>Array.isArray(s)?s.reduce((d,p)=>{if(H(p))return d+p;let[f,$,c]=p,h={};c!=null&&!H(c)?Object.keys(c).forEach(v=>{h[v]=l(c[v])}):h=c;let m=n[$](r[f],h);return m==null?d:d+m},""):s,i=l(e);return H(i)&&qt.test(i)?(0,Xo.default)(i.trim()):H(i)?i.trim():i}}var er=Object.defineProperty,tr=(e,t,o)=>t in e?er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,or=(e,t,o)=>(tr(e,typeof t!="symbol"?t+"":t,o),o),rr=class{constructor(){or(this,"_events",{})}on(e,t){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(t),()=>this.removeListener(e,t)}removeListener(e,t){if(!this._hasEvent(e))return;let o=this._events[e].indexOf(t);~o&&this._events[e].splice(o,1)}emit(e,...t){this._hasEvent(e)&&this._events[e].map(o=>o.apply(this,t))}_hasEvent(e){return Array.isArray(this._events[e])}},ir=Object.defineProperty,nr=(e,t,o)=>t in e?ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,X=(e,t,o)=>(nr(e,typeof t!="symbol"?t+"":t,o),o),lr=class extends rr{constructor(e){super(),X(this,"_locale"),X(this,"_locales"),X(this,"_localeData"),X(this,"_messages"),X(this,"_missing"),X(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,t){this._localeData[e]==null?this._localeData[e]=t:Object.assign(this._localeData[e],t)}loadLocaleData(e,t){t!=null?this._loadLocaleData(e,t):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,t){this._messages[e]==null?this._messages[e]=t:Object.assign(this._messages[e],t)}load(e,t){t!=null?this._load(e,t):Object.keys(e).forEach(o=>this._load(o,e[o])),this.emit("change")}loadAndActivate({locale:e,locales:t,messages:o}){this._locale=e,this._locales=t||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,t){this._locale=e,this._locales=t,this.emit("change")}_(e,t={},{message:o,formats:r}={}){H(e)||(t=e.values||t,o=e.message,e=e.id);let a=!this.messages[e],n=this._missing;if(n&&a)return Ko(n)?n(this._locale,e):n;a&&this.emit("missing",{id:e,locale:this._locale});let l=this.messages[e]||o||e;return H(l)&&qt.test(l)?JSON.parse(`"${l}"`):H(l)?l:Zo(l,this._locale,this._locales)(t,r)}date(e,t){return Bt(this._locales||this._locale,e,t)}number(e,t){return Qe(this._locales||this._locale,e,t)}};function ar(e={}){return new lr(e)}var Fe=ar(),sr=JSON.parse('{"icon.title.close":"Kryss"}'),cr=JSON.parse('{"icon.title.close":"Cross"}'),dr=JSON.parse('{"icon.title.close":"Risti"}'),ur=["en","nb","fi"],Ut="en",Nt=e=>ur.find(t=>e===t||e.toLowerCase().includes(t))||Ut;function br(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Nt(e)}try{let e=document.documentElement.lang;return Nt(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Ut}}var pr=(e,t,o,r)=>e==="nb"?o:e==="fi"?r:t,gr=(e,t,o)=>{let r=br(),a=pr(r,e,t,o);Fe.load(r,a),Fe.activate(r)};gr(cr,sr,dr);var fr=class extends Wo{render(){let e=Fe.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return Go`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16">${Jo(`<title>${e}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9M3.5 3.5l9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",fr);var se=class extends Ge(Ft){constructor(){super(),At(Lt,Ot,St),this.show=!1,this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1}connectedCallback(){if(super.connectedCallback(),!this.placement||!Object.keys(le).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
4
+ ${JSON.stringify(Object.keys(le))}`);setTimeout(()=>this.requestUpdate(),0)}get _actualDirection(){return this.placement}set _actualDirection(t){this.placement=t}get _arrowDirection(){return le[this.placement]}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this.renderRoot.querySelector("#arrow"),attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow},mt(this.attentionState)}pointingAtDirection(){switch(le[this._actualDirection]){case"top":return S._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right":return S._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom":return S._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left":return S._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return S._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return S._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return S._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return S._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let t=this._messageEl.id||(this._messageEl.id=Xe());this._targetEl.setAttribute("aria-details",t)}}get _activeVariantClasses(){let t={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},o=Object.keys(t).find(r=>!!t[r])||"";return{wrapper:F[o],arrow:F[`arrow${o.charAt(0).toUpperCase()+o.slice(1)}`]}}get _ariaClose(){return S._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}firstUpdated(){this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){return this.renderRoot.querySelector("slot[name='target']").assignedNodes()[0]}get _messageEl(){return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0]}get _wrapperClasses(){return Oe({[F.base]:!0,[this._activeVariantClasses.wrapper]:!0})}get _arrowClasses(){return Oe({[F.arrowBase]:!0,[F[`arrowDirection${this._arrowDirection.charAt(0).toUpperCase()+this._arrowDirection.slice(1)}`]]:!0,[this._activeVariantClasses.arrow]:!0})}get _arrowHtml(){return this.noArrow?"":ae`<div
4
5
  id="arrow"
5
6
  role="img"
6
7
  class="${this._arrowClasses}"
7
- style="transform:rotate(${ct[this._arrowDirection]}deg);
8
+ style="transform:rotate(${ht[this._arrowDirection]}deg);
8
9
  margin-${this._arrowDirection.charAt(0).toLowerCase()+this._arrowDirection.slice(1)}:-0.5px;"
9
- />`}close(){let t=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(t))}keypressed(t){this.canClose&&t.key==="Escape"&&(t.preventDefault(),this.close())}get _closeBtnHtml(){return ie`
10
+ />`}close(){let t=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(t))}keypressed(t){this.canClose&&t.key==="Escape"&&(t.preventDefault(),this.close())}get _closeBtnHtml(){return ae`
10
11
  <button
11
12
  aria-label="${this._ariaClose}"
12
13
  @click="${this.close}"
13
14
  @keydown=${this.keypressed}
14
- class="${I.closeBtn}"
15
+ class="${F.closeBtn}"
15
16
  >
16
17
  <w-icon-close-16 />
17
18
  </button>
18
- `}render(){return ie`
19
- <div class=${yo(this.className?this.className:void 0)}>
20
- ${this.placement==="right"||this.placement==="bottom"?ie`
19
+ `}render(){return ae`
20
+ <div class=${mr(this.className?this.className:void 0)}>
21
+ ${this.placement==="right"||this.placement==="bottom"?ae`
21
22
  <slot name="target"></slot>
22
23
 
23
24
  <div
@@ -28,18 +29,18 @@ ${JSON.stringify(Object.keys(re))}`);setTimeout(()=>this.requestUpdate(),0)}get
28
29
  >
29
30
  ${this._arrowHtml}
30
31
  <slot name="message"></slot>
31
- ${this.canClose?this._closeBtnHtml:Lt}
32
+ ${this.canClose?this._closeBtnHtml:Qt}
32
33
  </div>
33
- `:ie`
34
+ `:ae`
34
35
  <div id="attention" class="${this._wrapperClasses}">
35
36
  <slot name="message"></slot>
36
37
  ${this._arrowHtml}
37
- ${this.canClose?this._closeBtnHtml:Lt}
38
+ ${this.canClose?this._closeBtnHtml:Qt}
38
39
  </div>
39
40
  <slot name="target"></slot>
40
41
  `}
41
42
  </div>
42
- `}};ke(ne,"properties",{show:{type:Boolean,reflect:!0},placement:{type:String},tooltip:{type:Boolean,reflect:!0},callout:{type:Boolean,reflect:!0},popover:{type:Boolean,reflect:!0},highlight:{type:Boolean,reflect:!0},canClose:{type:Boolean,reflect:!0},noArrow:{type:Boolean,reflect:!0}}),ke(ne,"styles",[Ct.styles,vo`
43
+ `}};Le(se,"properties",{show:{type:Boolean,reflect:!0},placement:{type:String},tooltip:{type:Boolean,reflect:!0},callout:{type:Boolean,reflect:!0},popover:{type:Boolean,reflect:!0},highlight:{type:Boolean,reflect:!0},canClose:{type:Boolean,reflect:!0},noArrow:{type:Boolean,reflect:!0}}),Le(se,"styles",[Ft.styles,hr`
43
44
  #attention {
44
45
  position: absolute;
45
46
  z-index: 50;
@@ -55,5 +56,5 @@ ${JSON.stringify(Object.keys(re))}`);setTimeout(()=>this.requestUpdate(),0)}get
55
56
  border-top-left-radius: 4px;
56
57
  z-index: 1;
57
58
  }
58
- `]);customElements.get("w-attention")||customElements.define("w-attention",ne);export{ne as WarpAttention};
59
+ `]);customElements.get("w-attention")||customElements.define("w-attention",se);export{se as WarpAttention};
59
60
  //# sourceMappingURL=index.js.map