@oslokommune/punkt-react 12.42.6 → 12.42.8

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.
@@ -23079,6 +23079,21 @@ let mo = class extends Kr {
23079
23079
  super(), this.defaultSlot = pn(), this.iconName = "user", this.secondIconName = "user", this.mode = "light", this.size = "medium", this.skin = "primary", this.variant = "label-only", this.state = "normal", this.type = "button", this.form = void 0, this.isLoading = !1, this.disabled = !1, this.loadingAnimationPath = window.pktAnimationPath, this.slotController = new ja(this, this.defaultSlot);
23080
23080
  }
23081
23081
  // Lifecycle
23082
+ connectedCallback() {
23083
+ super.connectedCallback(), this.addEventListener(
23084
+ "click",
23085
+ (n) => {
23086
+ (this.disabled || this.hasAttribute("disabled") || this.isLoading) && (n.preventDefault(), n.stopImmediatePropagation());
23087
+ },
23088
+ !0
23089
+ ), this.addEventListener(
23090
+ "keydown",
23091
+ (n) => {
23092
+ (this.disabled || this.hasAttribute("disabled") || this.isLoading) && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.stopImmediatePropagation());
23093
+ },
23094
+ !0
23095
+ );
23096
+ }
23082
23097
  attributeChangedCallback(n, i, l) {
23083
23098
  super.attributeChangedCallback(n, i, l), n === "disabled" && l === "false" && (this.disabled = !1), (n === "isloading" || n === "isLoading") && l === "false" && (this.isLoading = !1);
23084
23099
  }
@@ -23103,7 +23118,7 @@ let mo = class extends Kr {
23103
23118
  type=${this.type}
23104
23119
  ?disabled=${!!this.disabled}
23105
23120
  aria-busy=${an(this.isLoading ? "true" : void 0)}
23106
- aria-disabled=${an(this.disabled ? "true" : void 0)}
23121
+ aria-disabled=${an(this.disabled || this.isLoading ? "true" : void 0)}
23107
23122
  form=${an(n)}
23108
23123
  >
23109
23124
  ${this.isLoading ? be`<pkt-icon
@@ -23143,7 +23158,7 @@ Wo([
23143
23158
  z({ type: String, reflect: !0 })
23144
23159
  ], mo.prototype, "state", 2);
23145
23160
  Wo([
23146
- z({ type: String })
23161
+ z({ type: String, reflect: !0 })
23147
23162
  ], mo.prototype, "type", 2);
23148
23163
  Wo([
23149
23164
  z({ type: String })
@@ -414,13 +414,13 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
414
414
  ></pkt-icon
415
415
  ><span class="pkt-back-link__text">${this.text}</span></a
416
416
  >
417
- </nav>`}};Zy([z({type:String,reflect:!0})],xh.prototype,"href",2),Zy([z({type:String,reflect:!0})],xh.prototype,"text",2),Zy([z({type:String,reflect:!0})],xh.prototype,"ariaLabel",2),xh=Zy([fr("pkt-backlink")],xh);var IP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,bo=(r,n,i,l)=>{for(var c=l>1?void 0:l?jP(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&IP(n,i,c),c};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/12.42/animations/";let Yi=class extends Hr{constructor(){super(),this.defaultSlot=pn(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new Ca(this,this.defaultSlot)}attributeChangedCallback(n,i,l){super.attributeChangedCallback(n,i,l),n==="disabled"&&l==="false"&&(this.disabled=!1),(n==="isloading"||n==="isLoading")&&l==="false"&&(this.isLoading=!1)}firstUpdated(n){super.firstUpdated(n),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const n=this.form??this.getAttribute("form")??void 0,i={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return be`
417
+ </nav>`}};Zy([z({type:String,reflect:!0})],xh.prototype,"href",2),Zy([z({type:String,reflect:!0})],xh.prototype,"text",2),Zy([z({type:String,reflect:!0})],xh.prototype,"ariaLabel",2),xh=Zy([fr("pkt-backlink")],xh);var IP=Object.defineProperty,jP=Object.getOwnPropertyDescriptor,bo=(r,n,i,l)=>{for(var c=l>1?void 0:l?jP(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&IP(n,i,c),c};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/12.42/animations/";let Yi=class extends Hr{constructor(){super(),this.defaultSlot=pn(),this.iconName="user",this.secondIconName="user",this.mode="light",this.size="medium",this.skin="primary",this.variant="label-only",this.state="normal",this.type="button",this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=window.pktAnimationPath,this.slotController=new Ca(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this.addEventListener("click",n=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(n.preventDefault(),n.stopImmediatePropagation())},!0),this.addEventListener("keydown",n=>{(this.disabled||this.hasAttribute("disabled")||this.isLoading)&&(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),n.stopImmediatePropagation())},!0)}attributeChangedCallback(n,i,l){super.attributeChangedCallback(n,i,l),n==="disabled"&&l==="false"&&(this.disabled=!1),(n==="isloading"||n==="isLoading")&&l==="false"&&(this.isLoading=!1)}firstUpdated(n){super.firstUpdated(n),this.disabled==="false"&&(this.disabled=!1),this.isLoading==="false"&&(this.isLoading=!1)}render(){const n=this.form??this.getAttribute("form")??void 0,i={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--disabled":!!this.disabled,"pkt-btn--isLoading":!!this.isLoading};return be`
418
418
  <button
419
419
  class=${Bt(i)}
420
420
  type=${this.type}
421
421
  ?disabled=${!!this.disabled}
422
422
  aria-busy=${en(this.isLoading?"true":void 0)}
423
- aria-disabled=${en(this.disabled?"true":void 0)}
423
+ aria-disabled=${en(this.disabled||this.isLoading?"true":void 0)}
424
424
  form=${en(n)}
425
425
  >
426
426
  ${this.isLoading?be`<pkt-icon
@@ -432,7 +432,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
432
432
  <span class="pkt-btn__text" ${Vt(this.defaultSlot)}></span>
433
433
  ${this.variant==="icons-right-and-left"?be`<pkt-icon class="pkt-btn__icon" name=${this.secondIconName}></pkt-icon>`:Ve}
434
434
  </button>
435
- `}};bo([z({type:String})],Yi.prototype,"iconName",2),bo([z({type:String})],Yi.prototype,"secondIconName",2),bo([z({type:String})],Yi.prototype,"mode",2),bo([z({type:String})],Yi.prototype,"size",2),bo([z({type:String})],Yi.prototype,"color",2),bo([z({type:String})],Yi.prototype,"skin",2),bo([z({type:String})],Yi.prototype,"variant",2),bo([z({type:String,reflect:!0})],Yi.prototype,"state",2),bo([z({type:String})],Yi.prototype,"type",2),bo([z({type:String})],Yi.prototype,"form",2),bo([z({type:Boolean,reflect:!0})],Yi.prototype,"isLoading",2),bo([z({type:Boolean,reflect:!0})],Yi.prototype,"disabled",2),bo([z({type:String})],Yi.prototype,"loadingAnimationPath",2),Yi=bo([fr("pkt-button")],Yi);const S_=6048e5,zP=864e5,C_=Symbol.for("constructDateFrom");function du(r,n){return typeof r=="function"?r(n):r&&typeof r=="object"&&C_ in r?r[C_](n):r instanceof Date?new r.constructor(n):new Date(n)}function ko(r,n){return du(n||r,r)}function s0(r,n,i){const l=ko(r,void 0);return isNaN(n)?du(r,NaN):(n&&l.setDate(l.getDate()+n),l)}let UP={};function eb(){return UP}function Fg(r,n){var i,l,c,h;const m=eb(),D=(n==null?void 0:n.weekStartsOn)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??m.weekStartsOn??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??0,C=ko(r,n==null?void 0:n.in),T=C.getDay(),$=(T<D?7:0)+T-D;return C.setDate(C.getDate()-$),C.setHours(0,0,0,0),C}function tb(r,n){return Fg(r,{...n,weekStartsOn:1})}function __(r,n){const i=ko(r,void 0),l=i.getFullYear(),c=du(i,0);c.setFullYear(l+1,0,4),c.setHours(0,0,0,0);const h=tb(c),m=du(i,0);m.setFullYear(l,0,4),m.setHours(0,0,0,0);const D=tb(m);return i.getTime()>=h.getTime()?l+1:i.getTime()>=D.getTime()?l:l-1}function x_(r){const n=ko(r),i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),+r-+i}function E_(r,...n){const i=du.bind(null,n.find(l=>typeof l=="object"));return n.map(i)}function l0(r,n){const i=ko(r,void 0);return i.setHours(0,0,0,0),i}function HP(r,n,i){const[l,c]=E_(void 0,r,n),h=l0(l),m=l0(c),D=+h-x_(h),C=+m-x_(m);return Math.round((D-C)/zP)}function qP(r,n){const i=__(r),l=du(r,0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),tb(l)}function VP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function WP(r){return!(!VP(r)&&typeof r!="number"||isNaN(+ko(r)))}function YP(r,n){const i=ko(r,void 0);return i.setHours(23,59,59,999),i}function GP(r,n){const[i,l]=E_(r,n.start,n.end);return{start:i,end:l}}function u0(r,n){const{start:i,end:l}=GP(void 0,r);let c=+i>+l;const h=c?+i:+l,m=c?l:i;m.setHours(0,0,0,0);let D=1;const C=[];for(;+m<=h;)C.push(du(i,m)),m.setDate(m.getDate()+D),m.setHours(0,0,0,0);return c?C.reverse():C}function KP(r,n){const i=ko(r,void 0);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const QP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},XP=(r,n,i)=>{let l;const c=QP[r];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+l:l+" ago":l};function c0(r){return(n={})=>{const i=n.width?String(n.width):r.defaultWidth;return r.formats[i]||r.formats[r.defaultWidth]}}const JP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ZP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tN={date:c0({formats:JP,defaultWidth:"full"}),time:c0({formats:ZP,defaultWidth:"full"}),dateTime:c0({formats:eN,defaultWidth:"full"})},nN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rN=(r,n,i,l)=>nN[r];function $g(r){return(n,i)=>{const l=i!=null&&i.context?String(i.context):"standalone";let c;if(l==="formatting"&&r.formattingValues){const m=r.defaultFormattingWidth||r.defaultWidth,D=i!=null&&i.width?String(i.width):m;c=r.formattingValues[D]||r.formattingValues[m]}else{const m=r.defaultWidth,D=i!=null&&i.width?String(i.width):r.defaultWidth;c=r.values[D]||r.values[m]}const h=r.argumentCallback?r.argumentCallback(n):n;return c[h]}}const aN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cN=(r,n)=>{const i=Number(r),l=i%100;if(l>20||l<10)switch(l%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},dN={ordinalNumber:cN,era:$g({values:aN,defaultWidth:"wide"}),quarter:$g({values:iN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:$g({values:oN,defaultWidth:"wide"}),day:$g({values:sN,defaultWidth:"wide"}),dayPeriod:$g({values:lN,defaultWidth:"wide",formattingValues:uN,defaultFormattingWidth:"wide"})};function Pg(r){return(n,i={})=>{const l=i.width,c=l&&r.matchPatterns[l]||r.matchPatterns[r.defaultMatchWidth],h=n.match(c);if(!h)return null;const m=h[0],D=l&&r.parsePatterns[l]||r.parsePatterns[r.defaultParseWidth],C=Array.isArray(D)?pN(D,N=>N.test(m)):fN(D,N=>N.test(m));let T;T=r.valueCallback?r.valueCallback(C):C,T=i.valueCallback?i.valueCallback(T):T;const $=n.slice(m.length);return{value:T,rest:$}}}function fN(r,n){for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n(r[i]))return i}function pN(r,n){for(let i=0;i<r.length;i++)if(n(r[i]))return i}function hN(r){return(n,i={})=>{const l=n.match(r.matchPattern);if(!l)return null;const c=l[0],h=n.match(r.parsePattern);if(!h)return null;let m=r.valueCallback?r.valueCallback(h[0]):h[0];m=i.valueCallback?i.valueCallback(m):m;const D=n.slice(c.length);return{value:m,rest:D}}}const mN=/^(\d+)(th|st|nd|rd)?/i,gN=/\d+/i,vN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yN={any:[/^b/i,/^(a|c)/i]},bN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kN={any:[/1/i,/2/i,/3/i,/4/i]},wN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},DN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},SN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_N={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},EN={ordinalNumber:hN({matchPattern:mN,parsePattern:gN,valueCallback:r=>parseInt(r,10)}),era:Pg({matchPatterns:vN,defaultMatchWidth:"wide",parsePatterns:yN,defaultParseWidth:"any"}),quarter:Pg({matchPatterns:bN,defaultMatchWidth:"wide",parsePatterns:kN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Pg({matchPatterns:wN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),day:Pg({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any"}),dayPeriod:Pg({matchPatterns:_N,defaultMatchWidth:"any",parsePatterns:xN,defaultParseWidth:"any"})},TN={code:"en-US",formatDistance:XP,formatLong:tN,formatRelative:rN,localize:dN,match:EN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function AN(r,n){const i=ko(r,void 0);return HP(i,KP(i))+1}function FN(r,n){const i=ko(r,void 0),l=+tb(i)-+qP(i);return Math.round(l/S_)+1}function T_(r,n){var i,l,c,h;const m=ko(r,n==null?void 0:n.in),D=m.getFullYear(),C=eb(),T=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??C.firstWeekContainsDate??((h=(c=C.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,$=du((n==null?void 0:n.in)||r,0);$.setFullYear(D+1,0,T),$.setHours(0,0,0,0);const N=Fg($,n),O=du((n==null?void 0:n.in)||r,0);O.setFullYear(D,0,T),O.setHours(0,0,0,0);const R=Fg(O,n);return+m>=+N?D+1:+m>=+R?D:D-1}function $N(r,n){var i,l,c,h;const m=eb(),D=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??m.firstWeekContainsDate??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,C=T_(r,n),T=du((n==null?void 0:n.in)||r,0);return T.setFullYear(C,0,D),T.setHours(0,0,0,0),Fg(T,n)}function A_(r,n){const i=ko(r,n==null?void 0:n.in),l=+Fg(i,n)-+$N(i,n);return Math.round(l/S_)+1}function ar(r,n){const i=r<0?"-":"",l=Math.abs(r).toString().padStart(n,"0");return i+l}const _d={y(r,n){const i=r.getFullYear(),l=i>0?i:1-i;return ar(n==="yy"?l%100:l,n.length)},M(r,n){const i=r.getMonth();return n==="M"?String(i+1):ar(i+1,2)},d(r,n){return ar(r.getDate(),n.length)},a(r,n){const i=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(r,n){return ar(r.getHours()%12||12,n.length)},H(r,n){return ar(r.getHours(),n.length)},m(r,n){return ar(r.getMinutes(),n.length)},s(r,n){return ar(r.getSeconds(),n.length)},S(r,n){const i=n.length,l=r.getMilliseconds(),c=Math.trunc(l*Math.pow(10,i-3));return ar(c,n.length)}},Eh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},F_={G:function(r,n,i){const l=r.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(l,{width:"abbreviated"});case"GGGGG":return i.era(l,{width:"narrow"});case"GGGG":default:return i.era(l,{width:"wide"})}},y:function(r,n,i){if(n==="yo"){const l=r.getFullYear(),c=l>0?l:1-l;return i.ordinalNumber(c,{unit:"year"})}return _d.y(r,n)},Y:function(r,n,i,l){const c=T_(r,l),h=c>0?c:1-c;if(n==="YY"){const m=h%100;return ar(m,2)}return n==="Yo"?i.ordinalNumber(h,{unit:"year"}):ar(h,n.length)},R:function(r,n){const i=__(r);return ar(i,n.length)},u:function(r,n){const i=r.getFullYear();return ar(i,n.length)},Q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"Q":return String(l);case"QQ":return ar(l,2);case"Qo":return i.ordinalNumber(l,{unit:"quarter"});case"QQQ":return i.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"q":return String(l);case"qq":return ar(l,2);case"qo":return i.ordinalNumber(l,{unit:"quarter"});case"qqq":return i.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,n,i){const l=r.getMonth();switch(n){case"M":case"MM":return _d.M(r,n);case"Mo":return i.ordinalNumber(l+1,{unit:"month"});case"MMM":return i.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(l,{width:"wide",context:"formatting"})}},L:function(r,n,i){const l=r.getMonth();switch(n){case"L":return String(l+1);case"LL":return ar(l+1,2);case"Lo":return i.ordinalNumber(l+1,{unit:"month"});case"LLL":return i.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(l,{width:"wide",context:"standalone"})}},w:function(r,n,i,l){const c=A_(r,l);return n==="wo"?i.ordinalNumber(c,{unit:"week"}):ar(c,n.length)},I:function(r,n,i){const l=FN(r);return n==="Io"?i.ordinalNumber(l,{unit:"week"}):ar(l,n.length)},d:function(r,n,i){return n==="do"?i.ordinalNumber(r.getDate(),{unit:"date"}):_d.d(r,n)},D:function(r,n,i){const l=AN(r);return n==="Do"?i.ordinalNumber(l,{unit:"dayOfYear"}):ar(l,n.length)},E:function(r,n,i){const l=r.getDay();switch(n){case"E":case"EE":case"EEE":return i.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(l,{width:"short",context:"formatting"});case"EEEE":default:return i.day(l,{width:"wide",context:"formatting"})}},e:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"e":return String(h);case"ee":return ar(h,2);case"eo":return i.ordinalNumber(h,{unit:"day"});case"eee":return i.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(c,{width:"short",context:"formatting"});case"eeee":default:return i.day(c,{width:"wide",context:"formatting"})}},c:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"c":return String(h);case"cc":return ar(h,n.length);case"co":return i.ordinalNumber(h,{unit:"day"});case"ccc":return i.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(c,{width:"narrow",context:"standalone"});case"cccccc":return i.day(c,{width:"short",context:"standalone"});case"cccc":default:return i.day(c,{width:"wide",context:"standalone"})}},i:function(r,n,i){const l=r.getDay(),c=l===0?7:l;switch(n){case"i":return String(c);case"ii":return ar(c,n.length);case"io":return i.ordinalNumber(c,{unit:"day"});case"iii":return i.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(l,{width:"short",context:"formatting"});case"iiii":default:return i.day(l,{width:"wide",context:"formatting"})}},a:function(r,n,i){const l=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(r,n,i){const l=r.getHours();let c;switch(l===12?c=Eh.noon:l===0?c=Eh.midnight:c=l/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(r,n,i){const l=r.getHours();let c;switch(l>=17?c=Eh.evening:l>=12?c=Eh.afternoon:l>=4?c=Eh.morning:c=Eh.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(r,n,i){if(n==="ho"){let l=r.getHours()%12;return l===0&&(l=12),i.ordinalNumber(l,{unit:"hour"})}return _d.h(r,n)},H:function(r,n,i){return n==="Ho"?i.ordinalNumber(r.getHours(),{unit:"hour"}):_d.H(r,n)},K:function(r,n,i){const l=r.getHours()%12;return n==="Ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},k:function(r,n,i){let l=r.getHours();return l===0&&(l=24),n==="ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},m:function(r,n,i){return n==="mo"?i.ordinalNumber(r.getMinutes(),{unit:"minute"}):_d.m(r,n)},s:function(r,n,i){return n==="so"?i.ordinalNumber(r.getSeconds(),{unit:"second"}):_d.s(r,n)},S:function(r,n){return _d.S(r,n)},X:function(r,n,i){const l=r.getTimezoneOffset();if(l===0)return"Z";switch(n){case"X":return P_(l);case"XXXX":case"XX":return Mf(l);case"XXXXX":case"XXX":default:return Mf(l,":")}},x:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"x":return P_(l);case"xxxx":case"xx":return Mf(l);case"xxxxx":case"xxx":default:return Mf(l,":")}},O:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+$_(l,":");case"OOOO":default:return"GMT"+Mf(l,":")}},z:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+$_(l,":");case"zzzz":default:return"GMT"+Mf(l,":")}},t:function(r,n,i){const l=Math.trunc(+r/1e3);return ar(l,n.length)},T:function(r,n,i){return ar(+r,n.length)}};function $_(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=Math.trunc(l/60),h=l%60;return h===0?i+String(c):i+String(c)+n+ar(h,2)}function P_(r,n){return r%60===0?(r>0?"-":"+")+ar(Math.abs(r)/60,2):Mf(r,n)}function Mf(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=ar(Math.trunc(l/60),2),h=ar(l%60,2);return i+c+n+h}const N_=(r,n)=>{switch(r){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},O_=(r,n)=>{switch(r){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},PN=(r,n)=>{const i=r.match(/(P+)(p+)?/)||[],l=i[1],c=i[2];if(!c)return N_(r,n);let h;switch(l){case"P":h=n.dateTime({width:"short"});break;case"PP":h=n.dateTime({width:"medium"});break;case"PPP":h=n.dateTime({width:"long"});break;case"PPPP":default:h=n.dateTime({width:"full"});break}return h.replace("{{date}}",N_(l,n)).replace("{{time}}",O_(c,n))},NN={p:O_,P:PN},ON=/^D+$/,RN=/^Y+$/,LN=["D","DD","YY","YYYY"];function BN(r){return ON.test(r)}function MN(r){return RN.test(r)}function IN(r,n,i){const l=jN(r,n,i);if(console.warn(l),LN.includes(r))throw new RangeError(l)}function jN(r,n,i){const l=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${n}\`) for formatting ${l} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,UN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HN=/^'([^]*?)'?$/,qN=/''/g,VN=/[a-zA-Z]/;function WN(r,n,i){var l,c,h,m;const D=eb(),C=D.locale??TN,T=D.firstWeekContainsDate??((c=(l=D.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,$=D.weekStartsOn??((m=(h=D.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,N=ko(r,void 0);if(!WP(N))throw new RangeError("Invalid time value");let O=n.match(UN).map(j=>{const Q=j[0];if(Q==="p"||Q==="P"){const G=NN[Q];return G(j,C.formatLong)}return j}).join("").match(zN).map(j=>{if(j==="''")return{isToken:!1,value:"'"};const Q=j[0];if(Q==="'")return{isToken:!1,value:YN(j)};if(F_[Q])return{isToken:!0,value:j};if(Q.match(VN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return{isToken:!1,value:j}});C.localize.preprocessor&&(O=C.localize.preprocessor(N,O));const R={firstWeekContainsDate:T,weekStartsOn:$,locale:C};return O.map(j=>{if(!j.isToken)return j.value;const Q=j.value;(MN(Q)||BN(Q))&&IN(Q,n,String(r));const G=F_[Q[0]];return G(N,Q,C.localize,R)}).join("")}function YN(r){const n=r.match(HN);return n?n[1].replace(qN,"'"):r}function GN(r,n){const i=ko(r,void 0).getDay();return i===0?7:i}const R_={},Ng={};function Og(r,n){try{const i=(R_[r]||(R_[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(n).split("GMT")[1]||"";return i in Ng?Ng[i]:L_(i,i.split(":"))}catch{if(r in Ng)return Ng[r];const i=r==null?void 0:r.match(KN);return i?L_(r,i.slice(1)):NaN}}const KN=/([+-]\d\d):?(\d\d)?/;function L_(r,n){const i=+n[0],l=+(n[1]||0);return Ng[r]=i>0?i*60+l:i*60-l}let Rg=class Ry extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(Og(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),M_(this),d0(this)):this.setTime(Date.now())}static tz(n,...i){return i.length?new Ry(...i,n):new Ry(Date.now(),n)}withTimeZone(n){return new Ry(+this,n)}getTimezoneOffset(){return-Og(this.timeZone,this)}setTime(n){return Date.prototype.setTime.apply(this,arguments),d0(this),+this}[Symbol.for("constructDateFrom")](n){return new Ry(+new Date(n),this.timeZone)}};const B_=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!B_.test(r))return;const n=r.replace(B_,"$1UTC");Rg.prototype[n]&&(r.startsWith("get")?Rg.prototype[r]=function(){return this.internal[n]()}:(Rg.prototype[r]=function(){return Date.prototype[n].apply(this.internal,arguments),QN(this),+this},Rg.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),d0(this),+this}))});function d0(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function QN(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),M_(r)}function M_(r){const n=Og(r.timeZone,r),i=new Date(+r);i.setUTCHours(i.getUTCHours()-1);const l=-new Date(+r).getTimezoneOffset(),c=-new Date(+i).getTimezoneOffset(),h=l-c,m=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();h&&m&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+h);const D=l-n;D&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+D);const C=Og(r.timeZone,r),T=-new Date(+r).getTimezoneOffset()-C,$=C!==n,N=T-D;if($&&N){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N);const O=Og(r.timeZone,r),R=C-O;R&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+R),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+R))}}let XN=class Ly extends Rg{static tz(n,...i){return i.length?new Ly(...i,n):new Ly(Date.now(),n)}toISOString(){const[n,i,l]=this.tzComponents(),c=`${n}${i}:${l}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[n,i,l,c]=this.internal.toUTCString().split(" ");return`${n==null?void 0:n.slice(0,-1)} ${l} ${i} ${c}`}toTimeString(){const n=this.internal.toUTCString().split(" ")[4],[i,l,c]=this.tzComponents();return`${n} GMT${i}${l}${c} (${JN(this.timeZone,this)})`}toLocaleString(n,i){return Date.prototype.toLocaleString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleDateString(n,i){return Date.prototype.toLocaleDateString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleTimeString(n,i){return Date.prototype.toLocaleTimeString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}tzComponents(){const n=this.getTimezoneOffset(),i=n>0?"-":"+",l=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),c=String(Math.abs(n)%60).padStart(2,"0");return[i,l,c]}withTimeZone(n){return new Ly(+this,n)}[Symbol.for("constructDateFrom")](n){return new Ly(+new Date(n),this.timeZone)}};function JN(r,n){return new Intl.DateTimeFormat("en-GB",{timeZone:r,timeZoneName:"long"}).format(n).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const ZN=(r=window.pktTz)=>{const n=new XN(new Date().toISOString(),r);return n.setHours(0,0,0,0),isNaN(n.getTime())?new Date:new Date(n.getFullYear(),n.getMonth(),n.getDate())};function If(r){if(!r||r==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(r)){const[n,i,l]=r.split("-").map(Number);return new Date(n,i-1,l)}if(/^\d{4}-\d{2}$/.test(r)){const[n,i]=r.split("-").map(Number);return new Date(n,i-1,1)}return/^\d{4}$/.test(r)?new Date(Number(r),0,1):new Date(r)}const Ha=r=>{if(!r||isNaN(r.getTime()))return"";const n=r.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return`${n}-${i}-${l}`},f0=r=>{if(!r)return null;const n=If(r);return isNaN(n.getTime())?null:n},I_=(r,n)=>{const i=wi(r);return isNaN(i.getTime())?"":WN(i,n)},wi=(r="",n)=>{const i=typeof r=="string"?If(r):r;return!i||isNaN(i.getTime())?new Date:n?n==="end"?YP(i):l0(i):i},xd=(r,n,i=1)=>{if(typeof r!="number"||typeof n!="number"||typeof i!="number"||isNaN(r)||isNaN(n)||isNaN(i))return new Date;const l=new Date(r,n,i);return isNaN(l.getTime())?new Date:l},e3=r=>!r||isNaN(r.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(r),j_=r=>{if(Array.isArray(r))return r;if(typeof r=="string")return r.split(",")},t3=r=>r?If(r):null,n3=r=>{if(typeof r=="string")return r.split(",").map(n=>If(n));if(Array.isArray(r))return r.map(n=>If(n))},Th={csvToArray:j_,stringToDate:t3,stringsToDate:n3},r3={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},jf={props:r3};var a3=Object.defineProperty,i3=Object.getOwnPropertyDescriptor,pr=(r,n,i,l)=>{for(var c=l>1?void 0:l?i3(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&a3(n,i,c),c};let ir=class extends Hr{constructor(){super(...arguments),this.multiple=jf.props.multiple.default,this.maxMultiple=jf.props.maxMultiple.default,this.range=jf.props.range.default,this.weeknumbers=jf.props.weeknumbers.default,this.withcontrols=jf.props.withcontrols.default,this.selected=[],this.earliest=jf.props.earliest.default,this.latest=jf.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(n,i,l){n==="selected"&&l&&this.convertSelected(),super.attributeChangedCallback(n,i,l)}updated(n){super.updated(n),n.has("selected")&&this.convertSelected()}firstUpdated(n){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(n=>If(n)),this.range&&this.selected.length===2){const n=u0({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(n)&&n.length){const i={};for(let l=0;l<n.length;l++)i[Ha(n[l])]=this.isInRange(n[l]);this.inRange=i}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const n=If(this.selected[this.selected.length-1]);this.currentmonth=isNaN(n.getTime())?new Date:n}else this.currentmonth===null&&(this.currentmonth=new Date);(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=new Date),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(n){switch(n.key){case"ArrowLeft":this.handleArrowKey(n,-1);break;case"ArrowRight":this.handleArrowKey(n,1);break;case"ArrowUp":this.handleArrowKey(n,-7);break;case"ArrowDown":this.handleArrowKey(n,7);break}}handleArrowKey(n,i){var l,c,h;if(((l=n.target)==null?void 0:l.nodeName)==="INPUT"||((c=n.target)==null?void 0:c.nodeName)==="SELECT"||((h=n.target)==null?void 0:h.nodeName)==="BUTTON")return;n.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const m=this.focusedDate?wi(this.focusedDate):xd(this.year,this.month,1);let D=s0(m,i);if(D){let C=this.querySelector(`div[data-date="${Ha(D)}"]`);if(C instanceof HTMLDivElement){if(C.dataset.disabled){D=s0(D,i);let T=this.querySelector(`div[data-date="${Ha(D)}"]`);for(;T&&T instanceof HTMLDivElement&&T.dataset.disabled;)D=s0(D,i),T=this.querySelector(`div[data-date="${Ha(D)}"]`);C=T}C instanceof HTMLDivElement&&!C.dataset.disabled&&(this.focusedDate=Ha(D),C.focus())}}}render(){return be`
435
+ `}};bo([z({type:String})],Yi.prototype,"iconName",2),bo([z({type:String})],Yi.prototype,"secondIconName",2),bo([z({type:String})],Yi.prototype,"mode",2),bo([z({type:String})],Yi.prototype,"size",2),bo([z({type:String})],Yi.prototype,"color",2),bo([z({type:String})],Yi.prototype,"skin",2),bo([z({type:String})],Yi.prototype,"variant",2),bo([z({type:String,reflect:!0})],Yi.prototype,"state",2),bo([z({type:String,reflect:!0})],Yi.prototype,"type",2),bo([z({type:String})],Yi.prototype,"form",2),bo([z({type:Boolean,reflect:!0})],Yi.prototype,"isLoading",2),bo([z({type:Boolean,reflect:!0})],Yi.prototype,"disabled",2),bo([z({type:String})],Yi.prototype,"loadingAnimationPath",2),Yi=bo([fr("pkt-button")],Yi);const S_=6048e5,zP=864e5,C_=Symbol.for("constructDateFrom");function du(r,n){return typeof r=="function"?r(n):r&&typeof r=="object"&&C_ in r?r[C_](n):r instanceof Date?new r.constructor(n):new Date(n)}function ko(r,n){return du(n||r,r)}function s0(r,n,i){const l=ko(r,void 0);return isNaN(n)?du(r,NaN):(n&&l.setDate(l.getDate()+n),l)}let UP={};function eb(){return UP}function Fg(r,n){var i,l,c,h;const m=eb(),D=(n==null?void 0:n.weekStartsOn)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??m.weekStartsOn??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.weekStartsOn)??0,C=ko(r,n==null?void 0:n.in),T=C.getDay(),$=(T<D?7:0)+T-D;return C.setDate(C.getDate()-$),C.setHours(0,0,0,0),C}function tb(r,n){return Fg(r,{...n,weekStartsOn:1})}function __(r,n){const i=ko(r,void 0),l=i.getFullYear(),c=du(i,0);c.setFullYear(l+1,0,4),c.setHours(0,0,0,0);const h=tb(c),m=du(i,0);m.setFullYear(l,0,4),m.setHours(0,0,0,0);const D=tb(m);return i.getTime()>=h.getTime()?l+1:i.getTime()>=D.getTime()?l:l-1}function x_(r){const n=ko(r),i=new Date(Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()));return i.setUTCFullYear(n.getFullYear()),+r-+i}function E_(r,...n){const i=du.bind(null,n.find(l=>typeof l=="object"));return n.map(i)}function l0(r,n){const i=ko(r,void 0);return i.setHours(0,0,0,0),i}function HP(r,n,i){const[l,c]=E_(void 0,r,n),h=l0(l),m=l0(c),D=+h-x_(h),C=+m-x_(m);return Math.round((D-C)/zP)}function qP(r,n){const i=__(r),l=du(r,0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),tb(l)}function VP(r){return r instanceof Date||typeof r=="object"&&Object.prototype.toString.call(r)==="[object Date]"}function WP(r){return!(!VP(r)&&typeof r!="number"||isNaN(+ko(r)))}function YP(r,n){const i=ko(r,void 0);return i.setHours(23,59,59,999),i}function GP(r,n){const[i,l]=E_(r,n.start,n.end);return{start:i,end:l}}function u0(r,n){const{start:i,end:l}=GP(void 0,r);let c=+i>+l;const h=c?+i:+l,m=c?l:i;m.setHours(0,0,0,0);let D=1;const C=[];for(;+m<=h;)C.push(du(i,m)),m.setDate(m.getDate()+D),m.setHours(0,0,0,0);return c?C.reverse():C}function KP(r,n){const i=ko(r,void 0);return i.setFullYear(i.getFullYear(),0,1),i.setHours(0,0,0,0),i}const QP={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},XP=(r,n,i)=>{let l;const c=QP[r];return typeof c=="string"?l=c:n===1?l=c.one:l=c.other.replace("{{count}}",n.toString()),i!=null&&i.addSuffix?i.comparison&&i.comparison>0?"in "+l:l+" ago":l};function c0(r){return(n={})=>{const i=n.width?String(n.width):r.defaultWidth;return r.formats[i]||r.formats[r.defaultWidth]}}const JP={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ZP={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},eN={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tN={date:c0({formats:JP,defaultWidth:"full"}),time:c0({formats:ZP,defaultWidth:"full"}),dateTime:c0({formats:eN,defaultWidth:"full"})},nN={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rN=(r,n,i,l)=>nN[r];function $g(r){return(n,i)=>{const l=i!=null&&i.context?String(i.context):"standalone";let c;if(l==="formatting"&&r.formattingValues){const m=r.defaultFormattingWidth||r.defaultWidth,D=i!=null&&i.width?String(i.width):m;c=r.formattingValues[D]||r.formattingValues[m]}else{const m=r.defaultWidth,D=i!=null&&i.width?String(i.width):r.defaultWidth;c=r.values[D]||r.values[m]}const h=r.argumentCallback?r.argumentCallback(n):n;return c[h]}}const aN={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iN={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},oN={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},sN={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},lN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},uN={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},cN=(r,n)=>{const i=Number(r),l=i%100;if(l>20||l<10)switch(l%10){case 1:return i+"st";case 2:return i+"nd";case 3:return i+"rd"}return i+"th"},dN={ordinalNumber:cN,era:$g({values:aN,defaultWidth:"wide"}),quarter:$g({values:iN,defaultWidth:"wide",argumentCallback:r=>r-1}),month:$g({values:oN,defaultWidth:"wide"}),day:$g({values:sN,defaultWidth:"wide"}),dayPeriod:$g({values:lN,defaultWidth:"wide",formattingValues:uN,defaultFormattingWidth:"wide"})};function Pg(r){return(n,i={})=>{const l=i.width,c=l&&r.matchPatterns[l]||r.matchPatterns[r.defaultMatchWidth],h=n.match(c);if(!h)return null;const m=h[0],D=l&&r.parsePatterns[l]||r.parsePatterns[r.defaultParseWidth],C=Array.isArray(D)?pN(D,N=>N.test(m)):fN(D,N=>N.test(m));let T;T=r.valueCallback?r.valueCallback(C):C,T=i.valueCallback?i.valueCallback(T):T;const $=n.slice(m.length);return{value:T,rest:$}}}function fN(r,n){for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&n(r[i]))return i}function pN(r,n){for(let i=0;i<r.length;i++)if(n(r[i]))return i}function hN(r){return(n,i={})=>{const l=n.match(r.matchPattern);if(!l)return null;const c=l[0],h=n.match(r.parsePattern);if(!h)return null;let m=r.valueCallback?r.valueCallback(h[0]):h[0];m=i.valueCallback?i.valueCallback(m):m;const D=n.slice(c.length);return{value:m,rest:D}}}const mN=/^(\d+)(th|st|nd|rd)?/i,gN=/\d+/i,vN={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},yN={any:[/^b/i,/^(a|c)/i]},bN={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},kN={any:[/1/i,/2/i,/3/i,/4/i]},wN={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},DN={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},SN={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CN={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_N={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xN={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},EN={ordinalNumber:hN({matchPattern:mN,parsePattern:gN,valueCallback:r=>parseInt(r,10)}),era:Pg({matchPatterns:vN,defaultMatchWidth:"wide",parsePatterns:yN,defaultParseWidth:"any"}),quarter:Pg({matchPatterns:bN,defaultMatchWidth:"wide",parsePatterns:kN,defaultParseWidth:"any",valueCallback:r=>r+1}),month:Pg({matchPatterns:wN,defaultMatchWidth:"wide",parsePatterns:DN,defaultParseWidth:"any"}),day:Pg({matchPatterns:SN,defaultMatchWidth:"wide",parsePatterns:CN,defaultParseWidth:"any"}),dayPeriod:Pg({matchPatterns:_N,defaultMatchWidth:"any",parsePatterns:xN,defaultParseWidth:"any"})},TN={code:"en-US",formatDistance:XP,formatLong:tN,formatRelative:rN,localize:dN,match:EN,options:{weekStartsOn:0,firstWeekContainsDate:1}};function AN(r,n){const i=ko(r,void 0);return HP(i,KP(i))+1}function FN(r,n){const i=ko(r,void 0),l=+tb(i)-+qP(i);return Math.round(l/S_)+1}function T_(r,n){var i,l,c,h;const m=ko(r,n==null?void 0:n.in),D=m.getFullYear(),C=eb(),T=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??C.firstWeekContainsDate??((h=(c=C.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,$=du((n==null?void 0:n.in)||r,0);$.setFullYear(D+1,0,T),$.setHours(0,0,0,0);const N=Fg($,n),O=du((n==null?void 0:n.in)||r,0);O.setFullYear(D,0,T),O.setHours(0,0,0,0);const R=Fg(O,n);return+m>=+N?D+1:+m>=+R?D:D-1}function $N(r,n){var i,l,c,h;const m=eb(),D=(n==null?void 0:n.firstWeekContainsDate)??((l=(i=n==null?void 0:n.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??m.firstWeekContainsDate??((h=(c=m.locale)==null?void 0:c.options)==null?void 0:h.firstWeekContainsDate)??1,C=T_(r,n),T=du((n==null?void 0:n.in)||r,0);return T.setFullYear(C,0,D),T.setHours(0,0,0,0),Fg(T,n)}function A_(r,n){const i=ko(r,n==null?void 0:n.in),l=+Fg(i,n)-+$N(i,n);return Math.round(l/S_)+1}function ar(r,n){const i=r<0?"-":"",l=Math.abs(r).toString().padStart(n,"0");return i+l}const _d={y(r,n){const i=r.getFullYear(),l=i>0?i:1-i;return ar(n==="yy"?l%100:l,n.length)},M(r,n){const i=r.getMonth();return n==="M"?String(i+1):ar(i+1,2)},d(r,n){return ar(r.getDate(),n.length)},a(r,n){const i=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.toUpperCase();case"aaa":return i;case"aaaaa":return i[0];case"aaaa":default:return i==="am"?"a.m.":"p.m."}},h(r,n){return ar(r.getHours()%12||12,n.length)},H(r,n){return ar(r.getHours(),n.length)},m(r,n){return ar(r.getMinutes(),n.length)},s(r,n){return ar(r.getSeconds(),n.length)},S(r,n){const i=n.length,l=r.getMilliseconds(),c=Math.trunc(l*Math.pow(10,i-3));return ar(c,n.length)}},Eh={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},F_={G:function(r,n,i){const l=r.getFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return i.era(l,{width:"abbreviated"});case"GGGGG":return i.era(l,{width:"narrow"});case"GGGG":default:return i.era(l,{width:"wide"})}},y:function(r,n,i){if(n==="yo"){const l=r.getFullYear(),c=l>0?l:1-l;return i.ordinalNumber(c,{unit:"year"})}return _d.y(r,n)},Y:function(r,n,i,l){const c=T_(r,l),h=c>0?c:1-c;if(n==="YY"){const m=h%100;return ar(m,2)}return n==="Yo"?i.ordinalNumber(h,{unit:"year"}):ar(h,n.length)},R:function(r,n){const i=__(r);return ar(i,n.length)},u:function(r,n){const i=r.getFullYear();return ar(i,n.length)},Q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"Q":return String(l);case"QQ":return ar(l,2);case"Qo":return i.ordinalNumber(l,{unit:"quarter"});case"QQQ":return i.quarter(l,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(l,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(l,{width:"wide",context:"formatting"})}},q:function(r,n,i){const l=Math.ceil((r.getMonth()+1)/3);switch(n){case"q":return String(l);case"qq":return ar(l,2);case"qo":return i.ordinalNumber(l,{unit:"quarter"});case"qqq":return i.quarter(l,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(l,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(l,{width:"wide",context:"standalone"})}},M:function(r,n,i){const l=r.getMonth();switch(n){case"M":case"MM":return _d.M(r,n);case"Mo":return i.ordinalNumber(l+1,{unit:"month"});case"MMM":return i.month(l,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(l,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(l,{width:"wide",context:"formatting"})}},L:function(r,n,i){const l=r.getMonth();switch(n){case"L":return String(l+1);case"LL":return ar(l+1,2);case"Lo":return i.ordinalNumber(l+1,{unit:"month"});case"LLL":return i.month(l,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(l,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(l,{width:"wide",context:"standalone"})}},w:function(r,n,i,l){const c=A_(r,l);return n==="wo"?i.ordinalNumber(c,{unit:"week"}):ar(c,n.length)},I:function(r,n,i){const l=FN(r);return n==="Io"?i.ordinalNumber(l,{unit:"week"}):ar(l,n.length)},d:function(r,n,i){return n==="do"?i.ordinalNumber(r.getDate(),{unit:"date"}):_d.d(r,n)},D:function(r,n,i){const l=AN(r);return n==="Do"?i.ordinalNumber(l,{unit:"dayOfYear"}):ar(l,n.length)},E:function(r,n,i){const l=r.getDay();switch(n){case"E":case"EE":case"EEE":return i.day(l,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(l,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(l,{width:"short",context:"formatting"});case"EEEE":default:return i.day(l,{width:"wide",context:"formatting"})}},e:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"e":return String(h);case"ee":return ar(h,2);case"eo":return i.ordinalNumber(h,{unit:"day"});case"eee":return i.day(c,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(c,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(c,{width:"short",context:"formatting"});case"eeee":default:return i.day(c,{width:"wide",context:"formatting"})}},c:function(r,n,i,l){const c=r.getDay(),h=(c-l.weekStartsOn+8)%7||7;switch(n){case"c":return String(h);case"cc":return ar(h,n.length);case"co":return i.ordinalNumber(h,{unit:"day"});case"ccc":return i.day(c,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(c,{width:"narrow",context:"standalone"});case"cccccc":return i.day(c,{width:"short",context:"standalone"});case"cccc":default:return i.day(c,{width:"wide",context:"standalone"})}},i:function(r,n,i){const l=r.getDay(),c=l===0?7:l;switch(n){case"i":return String(c);case"ii":return ar(c,n.length);case"io":return i.ordinalNumber(c,{unit:"day"});case"iii":return i.day(l,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(l,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(l,{width:"short",context:"formatting"});case"iiii":default:return i.day(l,{width:"wide",context:"formatting"})}},a:function(r,n,i){const l=r.getHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(r,n,i){const l=r.getHours();let c;switch(l===12?c=Eh.noon:l===0?c=Eh.midnight:c=l/12>=1?"pm":"am",n){case"b":case"bb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},B:function(r,n,i){const l=r.getHours();let c;switch(l>=17?c=Eh.evening:l>=12?c=Eh.afternoon:l>=4?c=Eh.morning:c=Eh.night,n){case"B":case"BB":case"BBB":return i.dayPeriod(c,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(c,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(c,{width:"wide",context:"formatting"})}},h:function(r,n,i){if(n==="ho"){let l=r.getHours()%12;return l===0&&(l=12),i.ordinalNumber(l,{unit:"hour"})}return _d.h(r,n)},H:function(r,n,i){return n==="Ho"?i.ordinalNumber(r.getHours(),{unit:"hour"}):_d.H(r,n)},K:function(r,n,i){const l=r.getHours()%12;return n==="Ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},k:function(r,n,i){let l=r.getHours();return l===0&&(l=24),n==="ko"?i.ordinalNumber(l,{unit:"hour"}):ar(l,n.length)},m:function(r,n,i){return n==="mo"?i.ordinalNumber(r.getMinutes(),{unit:"minute"}):_d.m(r,n)},s:function(r,n,i){return n==="so"?i.ordinalNumber(r.getSeconds(),{unit:"second"}):_d.s(r,n)},S:function(r,n){return _d.S(r,n)},X:function(r,n,i){const l=r.getTimezoneOffset();if(l===0)return"Z";switch(n){case"X":return P_(l);case"XXXX":case"XX":return Mf(l);case"XXXXX":case"XXX":default:return Mf(l,":")}},x:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"x":return P_(l);case"xxxx":case"xx":return Mf(l);case"xxxxx":case"xxx":default:return Mf(l,":")}},O:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+$_(l,":");case"OOOO":default:return"GMT"+Mf(l,":")}},z:function(r,n,i){const l=r.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+$_(l,":");case"zzzz":default:return"GMT"+Mf(l,":")}},t:function(r,n,i){const l=Math.trunc(+r/1e3);return ar(l,n.length)},T:function(r,n,i){return ar(+r,n.length)}};function $_(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=Math.trunc(l/60),h=l%60;return h===0?i+String(c):i+String(c)+n+ar(h,2)}function P_(r,n){return r%60===0?(r>0?"-":"+")+ar(Math.abs(r)/60,2):Mf(r,n)}function Mf(r,n=""){const i=r>0?"-":"+",l=Math.abs(r),c=ar(Math.trunc(l/60),2),h=ar(l%60,2);return i+c+n+h}const N_=(r,n)=>{switch(r){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},O_=(r,n)=>{switch(r){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},PN=(r,n)=>{const i=r.match(/(P+)(p+)?/)||[],l=i[1],c=i[2];if(!c)return N_(r,n);let h;switch(l){case"P":h=n.dateTime({width:"short"});break;case"PP":h=n.dateTime({width:"medium"});break;case"PPP":h=n.dateTime({width:"long"});break;case"PPPP":default:h=n.dateTime({width:"full"});break}return h.replace("{{date}}",N_(l,n)).replace("{{time}}",O_(c,n))},NN={p:O_,P:PN},ON=/^D+$/,RN=/^Y+$/,LN=["D","DD","YY","YYYY"];function BN(r){return ON.test(r)}function MN(r){return RN.test(r)}function IN(r,n,i){const l=jN(r,n,i);if(console.warn(l),LN.includes(r))throw new RangeError(l)}function jN(r,n,i){const l=r[0]==="Y"?"years":"days of the month";return`Use \`${r.toLowerCase()}\` instead of \`${r}\` (in \`${n}\`) for formatting ${l} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const zN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,UN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,HN=/^'([^]*?)'?$/,qN=/''/g,VN=/[a-zA-Z]/;function WN(r,n,i){var l,c,h,m;const D=eb(),C=D.locale??TN,T=D.firstWeekContainsDate??((c=(l=D.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??1,$=D.weekStartsOn??((m=(h=D.locale)==null?void 0:h.options)==null?void 0:m.weekStartsOn)??0,N=ko(r,void 0);if(!WP(N))throw new RangeError("Invalid time value");let O=n.match(UN).map(j=>{const Q=j[0];if(Q==="p"||Q==="P"){const G=NN[Q];return G(j,C.formatLong)}return j}).join("").match(zN).map(j=>{if(j==="''")return{isToken:!1,value:"'"};const Q=j[0];if(Q==="'")return{isToken:!1,value:YN(j)};if(F_[Q])return{isToken:!0,value:j};if(Q.match(VN))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");return{isToken:!1,value:j}});C.localize.preprocessor&&(O=C.localize.preprocessor(N,O));const R={firstWeekContainsDate:T,weekStartsOn:$,locale:C};return O.map(j=>{if(!j.isToken)return j.value;const Q=j.value;(MN(Q)||BN(Q))&&IN(Q,n,String(r));const G=F_[Q[0]];return G(N,Q,C.localize,R)}).join("")}function YN(r){const n=r.match(HN);return n?n[1].replace(qN,"'"):r}function GN(r,n){const i=ko(r,void 0).getDay();return i===0?7:i}const R_={},Ng={};function Og(r,n){try{const i=(R_[r]||(R_[r]=new Intl.DateTimeFormat("en-GB",{timeZone:r,hour:"numeric",timeZoneName:"longOffset"}).format))(n).split("GMT")[1]||"";return i in Ng?Ng[i]:L_(i,i.split(":"))}catch{if(r in Ng)return Ng[r];const i=r==null?void 0:r.match(KN);return i?L_(r,i.slice(1)):NaN}}const KN=/([+-]\d\d):?(\d\d)?/;function L_(r,n){const i=+n[0],l=+(n[1]||0);return Ng[r]=i>0?i*60+l:i*60-l}let Rg=class Ry extends Date{constructor(...n){super(),n.length>1&&typeof n[n.length-1]=="string"&&(this.timeZone=n.pop()),this.internal=new Date,isNaN(Og(this.timeZone,this))?this.setTime(NaN):n.length?typeof n[0]=="number"&&(n.length===1||n.length===2&&typeof n[1]!="number")?this.setTime(n[0]):typeof n[0]=="string"?this.setTime(+new Date(n[0])):n[0]instanceof Date?this.setTime(+n[0]):(this.setTime(+new Date(...n)),M_(this),d0(this)):this.setTime(Date.now())}static tz(n,...i){return i.length?new Ry(...i,n):new Ry(Date.now(),n)}withTimeZone(n){return new Ry(+this,n)}getTimezoneOffset(){return-Og(this.timeZone,this)}setTime(n){return Date.prototype.setTime.apply(this,arguments),d0(this),+this}[Symbol.for("constructDateFrom")](n){return new Ry(+new Date(n),this.timeZone)}};const B_=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(r=>{if(!B_.test(r))return;const n=r.replace(B_,"$1UTC");Rg.prototype[n]&&(r.startsWith("get")?Rg.prototype[r]=function(){return this.internal[n]()}:(Rg.prototype[r]=function(){return Date.prototype[n].apply(this.internal,arguments),QN(this),+this},Rg.prototype[n]=function(){return Date.prototype[n].apply(this,arguments),d0(this),+this}))});function d0(r){r.internal.setTime(+r),r.internal.setUTCMinutes(r.internal.getUTCMinutes()-r.getTimezoneOffset())}function QN(r){Date.prototype.setFullYear.call(r,r.internal.getUTCFullYear(),r.internal.getUTCMonth(),r.internal.getUTCDate()),Date.prototype.setHours.call(r,r.internal.getUTCHours(),r.internal.getUTCMinutes(),r.internal.getUTCSeconds(),r.internal.getUTCMilliseconds()),M_(r)}function M_(r){const n=Og(r.timeZone,r),i=new Date(+r);i.setUTCHours(i.getUTCHours()-1);const l=-new Date(+r).getTimezoneOffset(),c=-new Date(+i).getTimezoneOffset(),h=l-c,m=Date.prototype.getHours.apply(r)!==r.internal.getUTCHours();h&&m&&r.internal.setUTCMinutes(r.internal.getUTCMinutes()+h);const D=l-n;D&&Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+D);const C=Og(r.timeZone,r),T=-new Date(+r).getTimezoneOffset()-C,$=C!==n,N=T-D;if($&&N){Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+N);const O=Og(r.timeZone,r),R=C-O;R&&(r.internal.setUTCMinutes(r.internal.getUTCMinutes()+R),Date.prototype.setUTCMinutes.call(r,Date.prototype.getUTCMinutes.call(r)+R))}}let XN=class Ly extends Rg{static tz(n,...i){return i.length?new Ly(...i,n):new Ly(Date.now(),n)}toISOString(){const[n,i,l]=this.tzComponents(),c=`${n}${i}:${l}`;return this.internal.toISOString().slice(0,-1)+c}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[n,i,l,c]=this.internal.toUTCString().split(" ");return`${n==null?void 0:n.slice(0,-1)} ${l} ${i} ${c}`}toTimeString(){const n=this.internal.toUTCString().split(" ")[4],[i,l,c]=this.tzComponents();return`${n} GMT${i}${l}${c} (${JN(this.timeZone,this)})`}toLocaleString(n,i){return Date.prototype.toLocaleString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleDateString(n,i){return Date.prototype.toLocaleDateString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}toLocaleTimeString(n,i){return Date.prototype.toLocaleTimeString.call(this,n,{...i,timeZone:(i==null?void 0:i.timeZone)||this.timeZone})}tzComponents(){const n=this.getTimezoneOffset(),i=n>0?"-":"+",l=String(Math.floor(Math.abs(n)/60)).padStart(2,"0"),c=String(Math.abs(n)%60).padStart(2,"0");return[i,l,c]}withTimeZone(n){return new Ly(+this,n)}[Symbol.for("constructDateFrom")](n){return new Ly(+new Date(n),this.timeZone)}};function JN(r,n){return new Intl.DateTimeFormat("en-GB",{timeZone:r,timeZoneName:"long"}).format(n).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const ZN=(r=window.pktTz)=>{const n=new XN(new Date().toISOString(),r);return n.setHours(0,0,0,0),isNaN(n.getTime())?new Date:new Date(n.getFullYear(),n.getMonth(),n.getDate())};function If(r){if(!r||r==="")return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(r)){const[n,i,l]=r.split("-").map(Number);return new Date(n,i-1,l)}if(/^\d{4}-\d{2}$/.test(r)){const[n,i]=r.split("-").map(Number);return new Date(n,i-1,1)}return/^\d{4}$/.test(r)?new Date(Number(r),0,1):new Date(r)}const Ha=r=>{if(!r||isNaN(r.getTime()))return"";const n=r.getFullYear(),i=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return`${n}-${i}-${l}`},f0=r=>{if(!r)return null;const n=If(r);return isNaN(n.getTime())?null:n},I_=(r,n)=>{const i=wi(r);return isNaN(i.getTime())?"":WN(i,n)},wi=(r="",n)=>{const i=typeof r=="string"?If(r):r;return!i||isNaN(i.getTime())?new Date:n?n==="end"?YP(i):l0(i):i},xd=(r,n,i=1)=>{if(typeof r!="number"||typeof n!="number"||typeof i!="number"||isNaN(r)||isNaN(n)||isNaN(i))return new Date;const l=new Date(r,n,i);return isNaN(l.getTime())?new Date:l},e3=r=>!r||isNaN(r.getTime())?"":new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(r),j_=r=>{if(Array.isArray(r))return r;if(typeof r=="string")return r.split(",")},t3=r=>r?If(r):null,n3=r=>{if(typeof r=="string")return r.split(",").map(n=>If(n));if(Array.isArray(r))return r.map(n=>If(n))},Th={csvToArray:j_,stringToDate:t3,stringsToDate:n3},r3={earliest:{default:null},latest:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},maxMultiple:{default:4},range:{default:!1}},jf={props:r3};var a3=Object.defineProperty,i3=Object.getOwnPropertyDescriptor,pr=(r,n,i,l)=>{for(var c=l>1?void 0:l?i3(n,i):n,h=r.length-1,m;h>=0;h--)(m=r[h])&&(c=(l?m(n,i,c):m(c))||c);return l&&c&&a3(n,i,c),c};let ir=class extends Hr{constructor(){super(...arguments),this.multiple=jf.props.multiple.default,this.maxMultiple=jf.props.maxMultiple.default,this.range=jf.props.range.default,this.weeknumbers=jf.props.weeknumbers.default,this.withcontrols=jf.props.withcontrols.default,this.selected=[],this.earliest=jf.props.earliest.default,this.latest=jf.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,this.dayStringsLong=this.strings.dates.days,this.monthStrings=this.strings.dates.months,this.weekString=this.strings.dates.week,this.prevMonthString=this.strings.dates.prevMonth,this.nextMonthString=this.strings.dates.nextMonth,this._selected=[],this.year=0,this.month=0,this.week=0,this.rangeHovered=null,this.inRange={},this.focusedDate=null,this.selectableDates=[],this.currentmonthtouched=!1,this.tabIndexSet=0}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(n,i,l){n==="selected"&&l&&this.convertSelected(),super.attributeChangedCallback(n,i,l)}updated(n){super.updated(n),n.has("selected")&&this.convertSelected()}firstUpdated(n){this.addEventListener("keydown",this.handleKeydown)}convertSelected(){if(typeof this.selected=="string"&&(this.selected=this.selected.split(",")),this.selected.length===1&&this.selected[0]===""&&(this.selected=[]),this._selected=this.selected.map(n=>If(n)),this.range&&this.selected.length===2){const n=u0({start:this._selected[0],end:this._selected[1]});if(this.inRange={},Array.isArray(n)&&n.length){const i={};for(let l=0;l<n.length;l++)i[Ha(n[l])]=this.isInRange(n[l]);this.inRange=i}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}if(this.selected.length&&this.selected[0]!==""){const n=If(this.selected[this.selected.length-1]);this.currentmonth=isNaN(n.getTime())?new Date:n}else this.currentmonth===null&&(this.currentmonth=new Date);(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=new Date),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(n){switch(n.key){case"ArrowLeft":this.handleArrowKey(n,-1);break;case"ArrowRight":this.handleArrowKey(n,1);break;case"ArrowUp":this.handleArrowKey(n,-7);break;case"ArrowDown":this.handleArrowKey(n,7);break}}handleArrowKey(n,i){var l,c,h;if(((l=n.target)==null?void 0:l.nodeName)==="INPUT"||((c=n.target)==null?void 0:c.nodeName)==="SELECT"||((h=n.target)==null?void 0:h.nodeName)==="BUTTON")return;n.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const m=this.focusedDate?wi(this.focusedDate):xd(this.year,this.month,1);let D=s0(m,i);if(D){let C=this.querySelector(`div[data-date="${Ha(D)}"]`);if(C instanceof HTMLDivElement){if(C.dataset.disabled){D=s0(D,i);let T=this.querySelector(`div[data-date="${Ha(D)}"]`);for(;T&&T instanceof HTMLDivElement&&T.dataset.disabled;)D=s0(D,i),T=this.querySelector(`div[data-date="${Ha(D)}"]`);C=T}C instanceof HTMLDivElement&&!C.dataset.disabled&&(this.focusedDate=Ha(D),C.focus())}}}render(){return be`
436
436
  <div
437
437
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":Ve}"
438
438
  @focusout=${this.closeEvent}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-react",
3
- "version": "12.42.6",
3
+ "version": "12.42.8",
4
4
  "description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@lit-labs/ssr-dom-shim": "^1.2.1",
40
40
  "@lit/react": "^1.0.7",
41
- "@oslokommune/punkt-elements": "^12.42.6",
41
+ "@oslokommune/punkt-elements": "^12.42.8",
42
42
  "angular-html-parser": "^6.0.2",
43
43
  "html-format": "^1.1.7",
44
44
  "prettier": "^3.3.3",
@@ -49,7 +49,7 @@
49
49
  "devDependencies": {
50
50
  "@babel/plugin-proposal-private-property-in-object": "^7.18.6",
51
51
  "@oslokommune/punkt-assets": "^12.39.2",
52
- "@oslokommune/punkt-css": "^12.42.5",
52
+ "@oslokommune/punkt-css": "^12.42.8",
53
53
  "@testing-library/jest-dom": "^6.5.0",
54
54
  "@testing-library/react": "^16.0.1",
55
55
  "@testing-library/user-event": "^14.5.2",
@@ -112,5 +112,5 @@
112
112
  "url": "https://github.com/oslokommune/punkt/issues"
113
113
  },
114
114
  "license": "MIT",
115
- "gitHead": "1d82a7a76a25908e1453c48520da98dfeeae19c2"
115
+ "gitHead": "a2ef9aba6584e59ec9225af086f8791c9a546081"
116
116
  }