@oslokommune/punkt-elements 12.11.2 → 12.11.4

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.
Files changed (45) hide show
  1. package/dist/{class-map-DpN1m5lh.js → class-map-BQ3-MseA.js} +1 -1
  2. package/dist/{class-map-B9m-NycN.cjs → class-map-DLFPHEre.cjs} +1 -1
  3. package/dist/{helptext-B0Frb38k.js → helptext-D-5_-HAW.js} +3 -3
  4. package/dist/{helptext-0fI9cWEe.cjs → helptext-WCq0-Dq8.cjs} +1 -1
  5. package/dist/{index-Dw-V4--g.js → index-BQ9BMXel.js} +31 -27
  6. package/dist/{index-DmedytuY.js → index-BR7EVgX9.js} +3 -3
  7. package/dist/{index-CBFF6OHE.cjs → index-BVbNUNAa.cjs} +5 -5
  8. package/dist/{index-DkLa0YLm.js → index-BfUPq43a.js} +1 -1
  9. package/dist/{index-CqWQt14b.cjs → index-DYiD-o1w.cjs} +1 -1
  10. package/dist/{index-aLVFdclF.cjs → index-DyL6sqFY.cjs} +1 -1
  11. package/dist/index.d.ts +3 -14
  12. package/dist/{modal-FnkYHLoK.cjs → modal-BXKX0dxk.cjs} +1 -1
  13. package/dist/{modal-D6J8TqCp.js → modal-CYx_wrz1.js} +4 -4
  14. package/dist/pkt-alert.cjs +1 -1
  15. package/dist/pkt-alert.js +4 -4
  16. package/dist/pkt-calendar.cjs +1 -1
  17. package/dist/pkt-calendar.js +4 -4
  18. package/dist/pkt-card.cjs +1 -1
  19. package/dist/pkt-card.js +4 -4
  20. package/dist/pkt-component-template.cjs +1 -1
  21. package/dist/pkt-component-template.js +3 -3
  22. package/dist/pkt-datepicker.cjs +42 -37
  23. package/dist/pkt-datepicker.js +194 -173
  24. package/dist/pkt-element.cjs +1 -1
  25. package/dist/pkt-element.js +1 -1
  26. package/dist/pkt-helptext.cjs +1 -1
  27. package/dist/pkt-helptext.js +1 -1
  28. package/dist/pkt-icon.cjs +1 -1
  29. package/dist/pkt-icon.js +2 -2
  30. package/dist/pkt-index.cjs +1 -1
  31. package/dist/pkt-index.js +4 -4
  32. package/dist/pkt-input-wrapper.cjs +1 -1
  33. package/dist/pkt-input-wrapper.js +5 -5
  34. package/dist/pkt-link.cjs +1 -1
  35. package/dist/pkt-link.js +4 -4
  36. package/dist/pkt-messagebox.cjs +1 -1
  37. package/dist/pkt-messagebox.js +4 -4
  38. package/dist/pkt-modal.cjs +1 -1
  39. package/dist/pkt-modal.js +1 -1
  40. package/dist/pkt-tag.cjs +1 -1
  41. package/dist/pkt-tag.js +4 -4
  42. package/dist/{ref-D5FOI49b.js → ref-BjO0bKwt.js} +1 -1
  43. package/dist/{ref-3QXuhm6y.cjs → ref-CIjJrMxp.cjs} +1 -1
  44. package/package.json +3 -3
  45. package/src/components/datepicker/index.ts +42 -23
@@ -1,4 +1,4 @@
1
- import { T as a } from "./index-Dw-V4--g.js";
1
+ import { T as a } from "./index-BQ9BMXel.js";
2
2
  import { e as h, i as d, a as c } from "./custom-element-CWfU4dcr.js";
3
3
  /**
4
4
  * @license
@@ -1,4 +1,4 @@
1
- "use strict";const a=require("./index-CBFF6OHE.cjs"),r=require("./custom-element-B-TlBwRu.cjs");/**
1
+ "use strict";const a=require("./index-BVbNUNAa.cjs"),r=require("./custom-element-B-TlBwRu.cjs");/**
2
2
  * @license
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,6 +1,6 @@
1
- import { r as c, P as u, v, s as w, x as l, n as i, E as a } from "./index-Dw-V4--g.js";
2
- import { o as d } from "./index-DkLa0YLm.js";
3
- import { e as _ } from "./class-map-DpN1m5lh.js";
1
+ import { r as c, P as u, v, s as w, x as l, n as i, E as a } from "./index-BQ9BMXel.js";
2
+ import { o as d } from "./index-BfUPq43a.js";
3
+ import { e as _ } from "./class-map-BQ3-MseA.js";
4
4
  import { t as f } from "./custom-element-CWfU4dcr.js";
5
5
  var b = Object.defineProperty, k = Object.getOwnPropertyDescriptor, r = (n, p, o, s) => {
6
6
  for (var t = s > 1 ? void 0 : s ? k(p, o) : p, h = n.length - 1, x; h >= 0; h--)
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./index-CBFF6OHE.cjs"),h=require("./index-CqWQt14b.cjs"),x=require("./class-map-B9m-NycN.cjs"),c=require("./custom-element-B-TlBwRu.cjs");var u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var e=n>1?void 0:n?a(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(e=(n?i(p,l,e):i(e))||e);return n&&e&&u(p,l,e),e};exports.PktHelptext=class extends t.PktElement{constructor(){super(),this.forId=t.v4(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=t.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1}render(){const p=()=>{this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:!this.isHelpTextOpen}})),this.isHelpTextOpen=!this.isHelpTextOpen},l={"pkt-inputwrapper__helptext":!0,"pkt-inputwrapper__helptext-expandable-open":this.isHelpTextOpen,"pkt-inputwrapper__helptext-expandable-closed":!this.isHelpTextOpen},n=()=>this.helptext||this.helptextDropdown?t.x`<div>
1
+ "use strict";const t=require("./index-BVbNUNAa.cjs"),h=require("./index-DYiD-o1w.cjs"),x=require("./class-map-DLFPHEre.cjs"),c=require("./custom-element-B-TlBwRu.cjs");var u=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var e=n>1?void 0:n?a(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(e=(n?i(p,l,e):i(e))||e);return n&&e&&u(p,l,e),e};exports.PktHelptext=class extends t.PktElement{constructor(){super(),this.forId=t.v4(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=t.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1}render(){const p=()=>{this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:!this.isHelpTextOpen}})),this.isHelpTextOpen=!this.isHelpTextOpen},l={"pkt-inputwrapper__helptext":!0,"pkt-inputwrapper__helptext-expandable-open":this.isHelpTextOpen,"pkt-inputwrapper__helptext-expandable-closed":!this.isHelpTextOpen},n=()=>this.helptext||this.helptextDropdown?t.x`<div>
2
2
  ${this.helptext?t.x`<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
3
3
  ${h.o(this.helptext)}
4
4
  </div>`:t.E}
@@ -3,9 +3,9 @@
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
5
  */
6
- const P = globalThis, F = P.trustedTypes, X = F ? F.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, J = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Z = "?" + v, At = `<${Z}>`, S = document, O = () => S.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, dt = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[
6
+ const T = globalThis, F = T.trustedTypes, X = F ? F.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, J = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, Z = "?" + v, At = `<${Z}>`, S = document, O = () => S.createComment(""), H = (r) => r === null || typeof r != "object" && typeof r != "function", K = Array.isArray, dt = (r) => K(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", B = `[
7
7
  \f\r]`, C = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Y = /-->/g, tt = />/g, b = RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
8
- \f\r"'\`<>=]|("|')|))|$)`, "g"), et = /'/g, st = /"/g, pt = /^(?:script|style|textarea|title)$/i, bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Qt = bt(1), x = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
8
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), et = /'/g, st = /"/g, pt = /^(?:script|style|textarea|title)$/i, bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Xt = bt(1), x = Symbol.for("lit-noChange"), m = Symbol.for("lit-nothing"), it = /* @__PURE__ */ new WeakMap(), E = S.createTreeWalker(S, 129);
9
9
  function ct(r, t) {
10
10
  if (!K(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
11
11
  return X !== void 0 ? X.createHTML(t) : t;
@@ -223,8 +223,8 @@ class $t {
223
223
  w(this, t);
224
224
  }
225
225
  }
226
- const Xt = { M: J, P: v, A: Z, C: 1, L: ut, R: mt, D: dt, V: w, I: U, H: V, N: gt, U: yt, B: ft, F: $t }, j = P.litHtmlPolyfillSupport;
227
- j == null || j(R, U), (P.litHtmlVersions ?? (P.litHtmlVersions = [])).push("3.2.1");
226
+ const Yt = { M: J, P: v, A: Z, C: 1, L: ut, R: mt, D: dt, V: w, I: U, H: V, N: gt, U: yt, B: ft, F: $t }, j = T.litHtmlPolyfillSupport;
227
+ j == null || j(R, U), (T.litHtmlVersions ?? (T.litHtmlVersions = [])).push("3.2.1");
228
228
  const Et = (r, t, e) => {
229
229
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
230
230
  let i = s._$litPart$;
@@ -274,7 +274,7 @@ const wt = (r) => new St(typeof r == "string" ? r : r + "", void 0, vt), kt = (r
274
274
  * Copyright 2017 Google LLC
275
275
  * SPDX-License-Identifier: BSD-3-Clause
276
276
  */
277
- const { is: xt, defineProperty: Ut, getOwnPropertyDescriptor: Ct, getOwnPropertyNames: Pt, getOwnPropertySymbols: Tt, getPrototypeOf: Mt } = Object, A = globalThis, ot = A.trustedTypes, Ot = ot ? ot.emptyScript : "", q = A.reactiveElementPolyfillSupport, T = (r, t) => r, L = { toAttribute(r, t) {
277
+ const { is: xt, defineProperty: Ut, getOwnPropertyDescriptor: Ct, getOwnPropertyNames: Tt, getOwnPropertySymbols: Pt, getPrototypeOf: Mt } = Object, A = globalThis, ot = A.trustedTypes, Ot = ot ? ot.emptyScript : "", q = A.reactiveElementPolyfillSupport, P = (r, t) => r, L = { toAttribute(r, t) {
278
278
  switch (t) {
279
279
  case Boolean:
280
280
  r = r ? Ot : null;
@@ -334,14 +334,14 @@ class k extends HTMLElement {
334
334
  return this.elementProperties.get(t) ?? at;
335
335
  }
336
336
  static _$Ei() {
337
- if (this.hasOwnProperty(T("elementProperties"))) return;
337
+ if (this.hasOwnProperty(P("elementProperties"))) return;
338
338
  const t = Mt(this);
339
339
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
340
340
  }
341
341
  static finalize() {
342
- if (this.hasOwnProperty(T("finalized"))) return;
343
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
344
- const e = this.properties, s = [...Pt(e), ...Tt(e)];
342
+ if (this.hasOwnProperty(P("finalized"))) return;
343
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
344
+ const e = this.properties, s = [...Tt(e), ...Pt(e)];
345
345
  for (const i of s) this.createProperty(i, e[i]);
346
346
  }
347
347
  const t = this[Symbol.metadata];
@@ -502,7 +502,7 @@ class k extends HTMLElement {
502
502
  firstUpdated(t) {
503
503
  }
504
504
  }
505
- k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[T("elementProperties")] = /* @__PURE__ */ new Map(), k[T("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: k }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.0.4");
505
+ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[P("elementProperties")] = /* @__PURE__ */ new Map(), k[P("finalized")] = /* @__PURE__ */ new Map(), q == null || q({ ReactiveElement: k }), (A.reactiveElementVersions ?? (A.reactiveElementVersions = [])).push("2.0.4");
506
506
  /**
507
507
  * @license
508
508
  * Copyright 2017 Google LLC
@@ -604,9 +604,12 @@ function Lt(r, t, e) {
604
604
  const Bt = {
605
605
  hi: "Hei!"
606
606
  }, jt = {
607
+ from: "Fra",
608
+ to: "Til"
609
+ }, qt = {
607
610
  buttonAltText: "Åpne kalender",
608
611
  deleteDate: "Fjern dato"
609
- }, qt = {
612
+ }, zt = {
610
613
  month: "Måned",
611
614
  year: "År",
612
615
  days: [
@@ -658,7 +661,7 @@ const Bt = {
658
661
  week: "Uke",
659
662
  prevMonth: "Forrige måned",
660
663
  nextMonth: "Neste måned"
661
- }, zt = {
664
+ }, Wt = {
662
665
  labels: {
663
666
  optional: "Valgfritt",
664
667
  required: "Må fylles ut"
@@ -679,14 +682,15 @@ const Bt = {
679
682
  }
680
683
  }, y = {
681
684
  example: Bt,
682
- calendar: jt,
683
- dates: qt,
684
- forms: zt
685
- }, Wt = "pkt-inputwrapper", Jt = {
685
+ generic: jt,
686
+ calendar: qt,
687
+ dates: zt,
688
+ forms: Wt
689
+ }, Jt = "pkt-inputwrapper", Zt = {
686
690
  toggleHelpText: {
687
691
  description: "Event for å vise eller skjule hjelpetekst i dropdown"
688
692
  }
689
- }, Zt = {
693
+ }, Kt = {
690
694
  forId: {
691
695
  name: "For ID",
692
696
  description: "Id-en til inputfeltet som dette wrapper rundt",
@@ -796,16 +800,16 @@ const Bt = {
796
800
  type: "boolean",
797
801
  default: !0
798
802
  }
799
- }, Kt = {
800
- name: Wt,
803
+ }, Gt = {
804
+ name: Jt,
801
805
  "css-class": "pkt-inputwrapper",
802
- events: Jt,
803
- props: Zt
806
+ events: Zt,
807
+ props: Kt
804
808
  };
805
- var Gt = Object.defineProperty, p = (r, t, e, s) => {
809
+ var Qt = Object.defineProperty, p = (r, t, e, s) => {
806
810
  for (var i = void 0, o = r.length - 1, n; o >= 0; o--)
807
811
  (n = r[o]) && (i = n(t, e, i) || i);
808
- return i && Gt(t, e, i), i;
812
+ return i && Qt(t, e, i), i;
809
813
  };
810
814
  class _t extends M {
811
815
  /**
@@ -838,7 +842,7 @@ p([
838
842
  ], _t.prototype, "strings");
839
843
  class c extends _t {
840
844
  constructor() {
841
- super(), this.id = Lt(), this.name = this.id, this.required = !1, this.disabled = !1, this.placeholder = "", this.min = null, this.max = null, this.minlength = 0, this.maxlength = 0, this.pattern = "", this.label = null, this.optionalTag = !1, this.optionalText = y.forms.labels.optional, this.requiredTag = !1, this.requiredText = y.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = Kt.props.helptextDropdownButton.default, this.fullwidth = !1, this.touched = !1, this.internals = this.attachInternals();
845
+ super(), this.id = Lt(), this.name = this.id, this.required = !1, this.disabled = !1, this.placeholder = "", this.min = null, this.max = null, this.minlength = 0, this.maxlength = 0, this.pattern = "", this.label = null, this.optionalTag = !1, this.optionalText = y.forms.labels.optional, this.requiredTag = !1, this.requiredText = y.forms.labels.required, this.hasError = !1, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = Gt.props.helptextDropdownButton.default, this.fullwidth = !1, this.touched = !1, this.internals = this.attachInternals();
842
846
  }
843
847
  static get formAssociated() {
844
848
  return !0;
@@ -982,12 +986,12 @@ export {
982
986
  m as E,
983
987
  _t as P,
984
988
  x as T,
985
- Xt as Z,
989
+ Yt as Z,
986
990
  c as a,
987
991
  d as n,
988
992
  Vt as r,
989
- Kt as s,
993
+ Gt as s,
990
994
  y as t,
991
995
  Lt as v,
992
- Qt as x
996
+ Xt as x
993
997
  };
@@ -1,8 +1,8 @@
1
- import { r as _, P as ht, x as D, E as I, n as m } from "./index-Dw-V4--g.js";
1
+ import { r as _, P as ht, x as D, E as I, n as m } from "./index-BQ9BMXel.js";
2
2
  import { a as L } from "./converters-DNCwIFwr.js";
3
3
  import { t as dt } from "./custom-element-CWfU4dcr.js";
4
- import { e as ft } from "./class-map-DpN1m5lh.js";
5
- import "./index-DkLa0YLm.js";
4
+ import { e as ft } from "./class-map-BQ3-MseA.js";
5
+ import "./index-BfUPq43a.js";
6
6
  const at = 6048e5, mt = 864e5, gt = 36e5, X = Symbol.for("constructDateFrom");
7
7
  function S(t, e) {
8
8
  return typeof t == "function" ? t(e) : t && typeof t == "object" && X in t ? t[X](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
@@ -2,17 +2,17 @@
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const P=globalThis,F=P.trustedTypes,Y=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,J="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+v,St=`<${Z}>`,S=document,O=()=>S.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",K=Array.isArray,pt=r=>K(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",B=`[
5
+ */const T=globalThis,F=T.trustedTypes,Y=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,J="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,Z="?"+v,St=`<${Z}>`,S=document,O=()=>S.createComment(""),H=r=>r===null||typeof r!="object"&&typeof r!="function",K=Array.isArray,pt=r=>K(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",B=`[
6
6
  \f\r]`,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,et=/>/g,b=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^
7
- \f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,it=/"/g,ct=/^(?:script|style|textarea|title)$/i,wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),kt=wt(1),w=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),rt=new WeakMap,E=S.createTreeWalker(S,129);function ut(r,t){if(!K(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Y!==void 0?Y.createHTML(t):t}const mt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let l=0;l<e;l++){const a=r[l];let m,g,h=-1,$=0;for(;$<a.length&&(n.lastIndex=$,g=n.exec(a),g!==null);)$=n.lastIndex,n===C?g[1]==="!--"?n=tt:g[1]!==void 0?n=et:g[2]!==void 0?(ct.test(g[2])&&(i=RegExp("</"+g[2],"g")),n=b):g[3]!==void 0&&(n=b):n===b?g[0]===">"?(n=i??C,h=-1):g[1]===void 0?h=-2:(h=n.lastIndex-g[2].length,m=g[1],n=g[3]===void 0?b:g[3]==='"'?it:st):n===it||n===st?n=b:n===tt||n===et?n=C:(n=b,i=void 0);const _=n===b&&r[l+1].startsWith("/>")?" ":"";o+=n===C?a+St:h>=0?(s.push(m),a.slice(0,h)+J+a.slice(h)+v+_):a+v+(h===-2?l:_)}return[ut(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class R{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const l=t.length-1,a=this.parts,[m,g]=mt(t,e);if(this.el=R.createElement(m,s),E.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=E.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(J)){const $=g[n++],_=i.getAttribute(h).split(v),N=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:N[2],strings:_,ctor:N[1]==="."?gt:N[1]==="?"?yt:N[1]==="@"?$t:V}),i.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:o}),i.removeAttribute(h));if(ct.test(i.tagName)){const h=i.textContent.split(v),$=h.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let _=0;_<$;_++)i.append(h[_],O()),E.nextNode(),a.push({type:2,index:++o});i.append(h[$],O())}}}else if(i.nodeType===8)if(i.data===Z)a.push({type:2,index:o});else{let h=-1;for(;(h=i.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:o}),h+=v.length-1}o++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function k(r,t,e=r,s){var n,l;if(t===w)return t;let i=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl;const o=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=k(r,i._$AS(r,t.values),i,s)),t}class ft{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??S).importNode(e,!0);E.currentNode=i;let o=E.nextNode(),n=0,l=0,a=s[0];for(;a!==void 0;){if(n===a.index){let m;a.type===2?m=new U(o,o.nextSibling,this,t):a.type===1?m=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(m=new vt(o,this,t)),this._$AV.push(m),a=s[++l]}n!==(a==null?void 0:a.index)&&(o=E.nextNode(),n++)}return E.currentNode=S,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class U{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),H(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=R.createElement(ut(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new ft(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=rt.get(t.strings);return e===void 0&&rt.set(t.strings,e=new R(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new U(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=k(this,t,e,0),n=!H(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const l=t;let a,m;for(t=o[0],a=0;a<o.length-1;a++)m=k(this,l[s+a],e,a),m===w&&(m=this._$AH[a]),n||(n=!H(m)||m!==this._$AH[a]),m===u?t=u:t!==u&&(t+=(m??"")+o[a+1]),this._$AH[a]=m}n&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class gt extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}class yt extends V{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class $t extends V{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=k(this,t,e,0)??u)===w)return;const s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}}const xt={M:J,P:v,A:Z,C:1,L:mt,R:ft,D:pt,V:k,I:U,H:V,N:yt,U:$t,B:gt,F:vt},j=P.litHtmlPolyfillSupport;j==null||j(R,U),(P.litHtmlVersions??(P.litHtmlVersions=[])).push("3.2.1");const Ut=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new U(t.insertBefore(O(),o),o,void 0,e??{})}return i._$AI(r),i};/**
7
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),st=/'/g,it=/"/g,ct=/^(?:script|style|textarea|title)$/i,wt=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),kt=wt(1),w=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),rt=new WeakMap,E=S.createTreeWalker(S,129);function ut(r,t){if(!K(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return Y!==void 0?Y.createHTML(t):t}const mt=(r,t)=>{const e=r.length-1,s=[];let i,o=t===2?"<svg>":t===3?"<math>":"",n=C;for(let l=0;l<e;l++){const a=r[l];let m,g,h=-1,$=0;for(;$<a.length&&(n.lastIndex=$,g=n.exec(a),g!==null);)$=n.lastIndex,n===C?g[1]==="!--"?n=tt:g[1]!==void 0?n=et:g[2]!==void 0?(ct.test(g[2])&&(i=RegExp("</"+g[2],"g")),n=b):g[3]!==void 0&&(n=b):n===b?g[0]===">"?(n=i??C,h=-1):g[1]===void 0?h=-2:(h=n.lastIndex-g[2].length,m=g[1],n=g[3]===void 0?b:g[3]==='"'?it:st):n===it||n===st?n=b:n===tt||n===et?n=C:(n=b,i=void 0);const _=n===b&&r[l+1].startsWith("/>")?" ":"";o+=n===C?a+St:h>=0?(s.push(m),a.slice(0,h)+J+a.slice(h)+v+_):a+v+(h===-2?l:_)}return[ut(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class R{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const l=t.length-1,a=this.parts,[m,g]=mt(t,e);if(this.el=R.createElement(m,s),E.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=E.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(J)){const $=g[n++],_=i.getAttribute(h).split(v),N=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:N[2],strings:_,ctor:N[1]==="."?gt:N[1]==="?"?yt:N[1]==="@"?$t:V}),i.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:o}),i.removeAttribute(h));if(ct.test(i.tagName)){const h=i.textContent.split(v),$=h.length-1;if($>0){i.textContent=F?F.emptyScript:"";for(let _=0;_<$;_++)i.append(h[_],O()),E.nextNode(),a.push({type:2,index:++o});i.append(h[$],O())}}}else if(i.nodeType===8)if(i.data===Z)a.push({type:2,index:o});else{let h=-1;for(;(h=i.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:o}),h+=v.length-1}o++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function k(r,t,e=r,s){var n,l;if(t===w)return t;let i=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl;const o=H(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==o&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=k(r,i._$AS(r,t.values),i,s)),t}class ft{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=((t==null?void 0:t.creationScope)??S).importNode(e,!0);E.currentNode=i;let o=E.nextNode(),n=0,l=0,a=s[0];for(;a!==void 0;){if(n===a.index){let m;a.type===2?m=new U(o,o.nextSibling,this,t):a.type===1?m=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(m=new vt(o,this,t)),this._$AV.push(m),a=s[++l]}n!==(a==null?void 0:a.index)&&(o=E.nextNode(),n++)}return E.currentNode=S,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class U{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),H(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==w&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&H(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=R.createElement(ut(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===i)this._$AH.p(e);else{const n=new ft(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=rt.get(t.strings);return e===void 0&&rt.set(t.strings,e=new R(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new U(this.O(O()),this.O(O()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(o===void 0)t=k(this,t,e,0),n=!H(t)||t!==this._$AH&&t!==w,n&&(this._$AH=t);else{const l=t;let a,m;for(t=o[0],a=0;a<o.length-1;a++)m=k(this,l[s+a],e,a),m===w&&(m=this._$AH[a]),n||(n=!H(m)||m!==this._$AH[a]),m===u?t=u:t!==u&&(t+=(m??"")+o[a+1]),this._$AH[a]=m}n&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class gt extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}class yt extends V{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class $t extends V{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=k(this,t,e,0)??u)===w)return;const s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){k(this,t)}}const xt={M:J,P:v,A:Z,C:1,L:mt,R:ft,D:pt,V:k,I:U,H:V,N:yt,U:$t,B:gt,F:vt},j=T.litHtmlPolyfillSupport;j==null||j(R,U),(T.litHtmlVersions??(T.litHtmlVersions=[])).push("3.2.1");const Ut=(r,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let i=s._$litPart$;if(i===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=i=new U(t.insertBefore(O(),o),o,void 0,e??{})}return i._$AI(r),i};/**
8
8
  * @license
9
9
  * Copyright 2019 Google LLC
10
10
  * SPDX-License-Identifier: BSD-3-Clause
11
- */const D=globalThis,G=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),nt=new WeakMap;let Ct=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==_t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(G&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&nt.set(e,t))}return t}toString(){return this.cssText}};const Pt=r=>new Ct(typeof r=="string"?r:r+"",void 0,_t),Tt=(r,t)=>{if(G)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=D.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},ot=G?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Pt(e)})(r):r;/**
11
+ */const D=globalThis,G=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_t=Symbol(),nt=new WeakMap;let Ct=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==_t)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(G&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&nt.set(e,t))}return t}toString(){return this.cssText}};const Tt=r=>new Ct(typeof r=="string"?r:r+"",void 0,_t),Pt=(r,t)=>{if(G)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=D.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},ot=G?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Tt(e)})(r):r;/**
12
12
  * @license
13
13
  * Copyright 2017 Google LLC
14
14
  * SPDX-License-Identifier: BSD-3-Clause
15
- */const{is:Mt,defineProperty:Ot,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Rt,getOwnPropertySymbols:Vt,getPrototypeOf:Nt}=Object,A=globalThis,at=A.trustedTypes,It=at?at.emptyScript:"",q=A.reactiveElementPolyfillSupport,T=(r,t)=>r,L={toAttribute(r,t){switch(t){case Boolean:r=r?It:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Q=(r,t)=>!Mt(r,t),lt={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:Q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);class x extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ot(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=Ht(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const l=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??lt}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Nt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,s=[...Rt(e),...Vt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(ot(i))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Tt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:L).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),l=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:L;this._$Em=i,this[i]=l.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??Q)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[T("elementProperties")]=new Map,x[T("finalized")]=new Map,q==null||q({ReactiveElement:x}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
15
+ */const{is:Mt,defineProperty:Ot,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Rt,getOwnPropertySymbols:Vt,getPrototypeOf:Nt}=Object,A=globalThis,at=A.trustedTypes,It=at?at.emptyScript:"",q=A.reactiveElementPolyfillSupport,P=(r,t)=>r,L={toAttribute(r,t){switch(t){case Boolean:r=r?It:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Q=(r,t)=>!Mt(r,t),lt={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:Q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);class x extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=lt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Ot(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=Ht(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const l=i==null?void 0:i.call(this);o.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??lt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const t=Nt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const e=this.properties,s=[...Rt(e),...Vt(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(ot(i))}else t!==void 0&&e.push(ot(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:L).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),l=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:L;this._$Em=i,this[i]=l.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??Q)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[o,n]of i)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(i=>{var o;return(o=i.hostUpdate)==null?void 0:o.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var i;return(i=s.hostUpdated)==null?void 0:i.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}x.elementStyles=[],x.shadowRootOptions={mode:"open"},x[P("elementProperties")]=new Map,x[P("finalized")]=new Map,q==null||q({ReactiveElement:x}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -24,4 +24,4 @@
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */class M extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ut(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return w}}var dt;M._$litElement$=!0,M.finalized=!0,(dt=globalThis.litElementHydrateSupport)==null||dt.call(globalThis,{LitElement:M});const z=globalThis.litElementPolyfillSupport;z==null||z({LitElement:M});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var f=[];for(var W=0;W<256;++W)f.push((W+256).toString(16).slice(1));function Lt(r,t=0){return(f[r[t+0]]+f[r[t+1]]+f[r[t+2]]+f[r[t+3]]+"-"+f[r[t+4]]+f[r[t+5]]+"-"+f[r[t+6]]+f[r[t+7]]+"-"+f[r[t+8]]+f[r[t+9]]+"-"+f[r[t+10]]+f[r[t+11]]+f[r[t+12]]+f[r[t+13]]+f[r[t+14]]+f[r[t+15]]).toLowerCase()}var I,Bt=new Uint8Array(16);function jt(){if(!I&&(I=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(Bt)}var qt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const ht={randomUUID:qt};function bt(r,t,e){if(ht.randomUUID&&!t&&!r)return ht.randomUUID();r=r||{};var s=r.random||(r.rng||jt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Lt(s)}const zt={hi:"Hei!"},Wt={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},Jt={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Zt={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},y={example:zt,calendar:Wt,dates:Jt,forms:Zt},Kt="pkt-inputwrapper",Gt={toggleHelpText:{description:"Event for å vise eller skjule hjelpetekst i dropdown"}},Qt={forId:{name:"For ID",description:"Id-en til inputfeltet som dette wrapper rundt",type:"string",required:!0},label:{name:"Merkelapp",description:"Merkelapp for inputfeltet",type:"boolean",required:!0,default:"input"},helptext:{name:"Hjelpetekst",description:"Hjelpetekst for inputfeltet",type:"string"},helptextDropdown:{name:"Hjelpetekst i dropdown",description:"Hjelpetekst som vises i ekspanderende felt",type:"string"},helptextDropdownButton:{name:"Tekst i hjelpetekst-knapp",description:"Tekst som vises i knappen for å vise hjelpetekst i dropdown",default:"Les mer <span class='pkt-sr-only'>om feltet</span>",type:"string"},counter:{name:"Teller",description:"Teller for antall tegn i inputfeltet",type:"boolean",default:!1},counterCurrent:{name:"Tellerverdi",description:"Tellerens nåværende verdi",type:"number"},counterMaxLength:{name:"Maks tegn",description:"Maks antall tegn som kan skrives i inputfeltet",type:"number"},optionalTag:{name:"Vise valgfritt-merking",description:"Viser en merking som indikerer at feltet er valgfritt",type:"boolean",default:!1},optionalText:{name:"Valgfritt-tekst",description:"Tekst som vises i valgfritt-merkingen",type:"string",default:"Valgfritt"},requiredTag:{name:"Vise påkrevd-merking",description:"Viser en merking som indikerer at feltet er påkrevd",type:"boolean",default:!1},requiredText:{name:"Påkrevd-tekst",description:"Tekst som vises i påkrevd-merkingen",type:"string",default:"Må fylles ut"},hasError:{name:"Feil",description:"Indikerer at inputfeltet har en feil",type:"boolean",default:!1},errorMessage:{name:"Feilmelding",description:"Feilmelding som vises i tilknytning til inputfeltet",type:"string"},disabled:{name:"Deaktivert",description:"Indikerer at inputfeltet er deaktivert",type:"boolean",default:!1},inline:{name:"Inline",description:"Indikerer at inputfeltet skal flyte sammen med sidens innhold",type:"boolean",default:!1},ariaDescribedby:{name:"aria-describedby",description:"Id-en til elementet som beskriver inputfeltet",type:"string"},hasFieldset:{name:"Har fieldset",description:"Indikerer at inputfeltet er en del av et fieldset",type:"boolean",default:!1},useWrapper:{name:"Bruk wrapper",description:"Indikerer om inputfeltet skal bruke en wrapper",type:"boolean",default:!0}},Et={name:Kt,"css-class":"pkt-inputwrapper",events:Gt,props:Qt};var Xt=Object.defineProperty,p=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Xt(t,e,i),i};class X extends M{constructor(){super(),this.strings=y}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}}p([d({type:Object})],X.prototype,"strings");class c extends X{constructor(){super(),this.id=bt(),this.name=this.id,this.required=!1,this.disabled=!1,this.placeholder="",this.min=null,this.max=null,this.minlength=0,this.maxlength=0,this.pattern="",this.label=null,this.optionalTag=!1,this.optionalText=y.forms.labels.optional,this.requiredTag=!1,this.requiredText=y.forms.labels.required,this.hasError=!1,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Et.props.helptextDropdownButton.default,this.fullwidth=!1,this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){this.required&&!this.value?this.internals.setValidity({valueMissing:!0},y.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},y.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},y.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},y.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},y.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},y.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},y.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(s=>{e.append(this.name,s)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChanged(t,e){typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=t,this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate())}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus"))}onBlur(){this.dispatchEvent(new FocusEvent("blur"))}onInput(){this.dispatchEvent(new InputEvent("input"))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}firstUpdated(t){super.firstUpdated(t),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.internals.setFormValue(this.value),this.inputRef.value&&this.manageValidity(this.inputRef.value)}}p([d({type:String})],c.prototype,"id");p([d({type:String})],c.prototype,"name");p([d({type:Boolean})],c.prototype,"required");p([d({type:Boolean})],c.prototype,"disabled");p([d({type:String})],c.prototype,"placeholder");p([d({type:Number})],c.prototype,"min");p([d({type:Number})],c.prototype,"max");p([d({type:Number})],c.prototype,"minlength");p([d({type:Number})],c.prototype,"maxlength");p([d({type:String})],c.prototype,"pattern");p([d({type:String})],c.prototype,"label");p([d({type:Boolean})],c.prototype,"optionalTag");p([d({type:String})],c.prototype,"optionalText");p([d({type:Boolean})],c.prototype,"requiredTag");p([d({type:String})],c.prototype,"requiredText");p([d({type:Boolean})],c.prototype,"hasError");p([d({type:String})],c.prototype,"errorMessage");p([d({type:String})],c.prototype,"helptext");p([d({type:String})],c.prototype,"helptextDropdown");p([d({type:String})],c.prototype,"helptextDropdownButton");p([d({type:Boolean})],c.prototype,"fullwidth");p([At()],c.prototype,"touched");exports.E=u;exports.PktElement=X;exports.PktInputElement=c;exports.T=w;exports.Z=xt;exports.n=d;exports.r=At;exports.specs=Et;exports.translations=y;exports.v4=bt;exports.x=kt;
27
+ */class M extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ut(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return w}}var dt;M._$litElement$=!0,M.finalized=!0,(dt=globalThis.litElementHydrateSupport)==null||dt.call(globalThis,{LitElement:M});const z=globalThis.litElementPolyfillSupport;z==null||z({LitElement:M});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");var f=[];for(var W=0;W<256;++W)f.push((W+256).toString(16).slice(1));function Lt(r,t=0){return(f[r[t+0]]+f[r[t+1]]+f[r[t+2]]+f[r[t+3]]+"-"+f[r[t+4]]+f[r[t+5]]+"-"+f[r[t+6]]+f[r[t+7]]+"-"+f[r[t+8]]+f[r[t+9]]+"-"+f[r[t+10]]+f[r[t+11]]+f[r[t+12]]+f[r[t+13]]+f[r[t+14]]+f[r[t+15]]).toLowerCase()}var I,Bt=new Uint8Array(16);function jt(){if(!I&&(I=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!I))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(Bt)}var qt=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const ht={randomUUID:qt};function bt(r,t,e){if(ht.randomUUID&&!t&&!r)return ht.randomUUID();r=r||{};var s=r.random||(r.rng||jt)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Lt(s)}const zt={hi:"Hei!"},Wt={from:"Fra",to:"Til"},Jt={buttonAltText:"Åpne kalender",deleteDate:"Fjern dato"},Zt={month:"Måned",year:"År",days:["Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Man","Tir","Ons","Tor","Fre","Lør","Søn"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],week:"Uke",prevMonth:"Forrige måned",nextMonth:"Neste måned"},Kt={labels:{optional:"Valgfritt",required:"Må fylles ut"},messages:{required:"Dette feltet er påkrevd",invalid:"Ugyldig verdi",invalidPattern:"Ugyldig format",tooShort:"For kort",tooLong:"For lang",rangeUnderflow:"For lav verdi",rangeOverflow:"For høy verdi",dateUnderflow:"For tidlig dato",dateOverflow:"For sen dato"},date:{multiple:"Her kan du velge flere datoer. Trykk komma eller enter når du har skrevet inn en dato."}},y={example:zt,generic:Wt,calendar:Jt,dates:Zt,forms:Kt},Gt="pkt-inputwrapper",Qt={toggleHelpText:{description:"Event for å vise eller skjule hjelpetekst i dropdown"}},Xt={forId:{name:"For ID",description:"Id-en til inputfeltet som dette wrapper rundt",type:"string",required:!0},label:{name:"Merkelapp",description:"Merkelapp for inputfeltet",type:"boolean",required:!0,default:"input"},helptext:{name:"Hjelpetekst",description:"Hjelpetekst for inputfeltet",type:"string"},helptextDropdown:{name:"Hjelpetekst i dropdown",description:"Hjelpetekst som vises i ekspanderende felt",type:"string"},helptextDropdownButton:{name:"Tekst i hjelpetekst-knapp",description:"Tekst som vises i knappen for å vise hjelpetekst i dropdown",default:"Les mer <span class='pkt-sr-only'>om feltet</span>",type:"string"},counter:{name:"Teller",description:"Teller for antall tegn i inputfeltet",type:"boolean",default:!1},counterCurrent:{name:"Tellerverdi",description:"Tellerens nåværende verdi",type:"number"},counterMaxLength:{name:"Maks tegn",description:"Maks antall tegn som kan skrives i inputfeltet",type:"number"},optionalTag:{name:"Vise valgfritt-merking",description:"Viser en merking som indikerer at feltet er valgfritt",type:"boolean",default:!1},optionalText:{name:"Valgfritt-tekst",description:"Tekst som vises i valgfritt-merkingen",type:"string",default:"Valgfritt"},requiredTag:{name:"Vise påkrevd-merking",description:"Viser en merking som indikerer at feltet er påkrevd",type:"boolean",default:!1},requiredText:{name:"Påkrevd-tekst",description:"Tekst som vises i påkrevd-merkingen",type:"string",default:"Må fylles ut"},hasError:{name:"Feil",description:"Indikerer at inputfeltet har en feil",type:"boolean",default:!1},errorMessage:{name:"Feilmelding",description:"Feilmelding som vises i tilknytning til inputfeltet",type:"string"},disabled:{name:"Deaktivert",description:"Indikerer at inputfeltet er deaktivert",type:"boolean",default:!1},inline:{name:"Inline",description:"Indikerer at inputfeltet skal flyte sammen med sidens innhold",type:"boolean",default:!1},ariaDescribedby:{name:"aria-describedby",description:"Id-en til elementet som beskriver inputfeltet",type:"string"},hasFieldset:{name:"Har fieldset",description:"Indikerer at inputfeltet er en del av et fieldset",type:"boolean",default:!1},useWrapper:{name:"Bruk wrapper",description:"Indikerer om inputfeltet skal bruke en wrapper",type:"boolean",default:!0}},Et={name:Gt,"css-class":"pkt-inputwrapper",events:Qt,props:Xt};var Yt=Object.defineProperty,p=(r,t,e,s)=>{for(var i=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=n(t,e,i)||i);return i&&Yt(t,e,i),i};class X extends M{constructor(){super(),this.strings=y}connectedCallback(){super.connectedCallback()}createRenderRoot(){return this}hotReplacedCallback(){this.requestUpdate()}}p([d({type:Object})],X.prototype,"strings");class c extends X{constructor(){super(),this.id=bt(),this.name=this.id,this.required=!1,this.disabled=!1,this.placeholder="",this.min=null,this.max=null,this.minlength=0,this.maxlength=0,this.pattern="",this.label=null,this.optionalTag=!1,this.optionalText=y.forms.labels.optional,this.requiredTag=!1,this.requiredText=y.forms.labels.required,this.hasError=!1,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Et.props.helptextDropdownButton.default,this.fullwidth=!1,this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){this.required&&!this.value?this.internals.setValidity({valueMissing:!0},y.forms.messages.required,t):t.validity.typeMismatch||t.validity.badInput?this.internals.setValidity({typeMismatch:!0},y.forms.messages.invalid,t):t.validity.patternMismatch?this.internals.setValidity({patternMismatch:!0},y.forms.messages.invalidPattern,t):t.validity.tooShort||this.minLength>0&&this.value.length<this.minLength?this.internals.setValidity({tooShort:!0},y.forms.messages.tooShort,t):t.validity.tooLong||this.maxLength>0&&this.value.length>this.maxLength?this.internals.setValidity({tooLong:!0},y.forms.messages.tooLong,t):t.validity.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},y.forms.messages.rangeUnderflow,t):t.validity.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},y.forms.messages.rangeOverflow,t):t.validity.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({})}setFormValue(t){if(this.internals)if(Array.isArray(t)){const e=new FormData;t.forEach(s=>{e.append(this.name,s)}),this.internals.setFormValue(e)}else this.internals.setFormValue(t)}valueChanged(t,e){typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=t,this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&e&&e.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(e==null?void 0:e.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate())}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus"))}onBlur(){this.dispatchEvent(new FocusEvent("blur"))}onInput(){this.dispatchEvent(new InputEvent("input"))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRef2&&this.manageValidity(this.inputRef2.value),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}firstUpdated(t){super.firstUpdated(t),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.internals.setFormValue(this.value),this.inputRef.value&&this.manageValidity(this.inputRef.value)}}p([d({type:String})],c.prototype,"id");p([d({type:String})],c.prototype,"name");p([d({type:Boolean})],c.prototype,"required");p([d({type:Boolean})],c.prototype,"disabled");p([d({type:String})],c.prototype,"placeholder");p([d({type:Number})],c.prototype,"min");p([d({type:Number})],c.prototype,"max");p([d({type:Number})],c.prototype,"minlength");p([d({type:Number})],c.prototype,"maxlength");p([d({type:String})],c.prototype,"pattern");p([d({type:String})],c.prototype,"label");p([d({type:Boolean})],c.prototype,"optionalTag");p([d({type:String})],c.prototype,"optionalText");p([d({type:Boolean})],c.prototype,"requiredTag");p([d({type:String})],c.prototype,"requiredText");p([d({type:Boolean})],c.prototype,"hasError");p([d({type:String})],c.prototype,"errorMessage");p([d({type:String})],c.prototype,"helptext");p([d({type:String})],c.prototype,"helptextDropdown");p([d({type:String})],c.prototype,"helptextDropdownButton");p([d({type:Boolean})],c.prototype,"fullwidth");p([At()],c.prototype,"touched");exports.E=u;exports.PktElement=X;exports.PktInputElement=c;exports.T=w;exports.Z=xt;exports.n=d;exports.r=At;exports.specs=Et;exports.translations=y;exports.v4=bt;exports.x=kt;
@@ -1,4 +1,4 @@
1
- import { E as f, T as v, P as m, x as y, n as h } from "./index-Dw-V4--g.js";
1
+ import { E as f, T as v, P as m, x as y, n as h } from "./index-BQ9BMXel.js";
2
2
  import { i as P, a as k, e as g, t as _ } from "./custom-element-CWfU4dcr.js";
3
3
  /**
4
4
  * @license
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index-CBFF6OHE.cjs"),r=require("./custom-element-B-TlBwRu.cjs");/**
1
+ "use strict";const o=require("./index-BVbNUNAa.cjs"),r=require("./custom-element-B-TlBwRu.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./index-CBFF6OHE.cjs"),H=require("./converters-DhM11VlY.cjs"),ot=require("./custom-element-B-TlBwRu.cjs"),ct=require("./class-map-B9m-NycN.cjs");require("./index-CqWQt14b.cjs");const tt=6048e5,lt=864e5,ut=36e5,B=Symbol.for("constructDateFrom");function D(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&B in n?n[B](t):n instanceof Date?new n.constructor(t):new Date(t)}function v(n,t){return D(t||n,n)}function q(n,t,e){const r=v(n,e==null?void 0:e.in);return isNaN(t)?D(n,NaN):(t&&r.setDate(r.getDate()+t),r)}function ht(n,t,e){return D(n,+v(n)+t)}function $(n,t,e){return ht(n,t*ut)}let dt={};function _(){return dt}function A(n,t){var c,l,u,f;const e=_(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,a=v(n,t==null?void 0:t.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function F(n,t){return A(n,{...t,weekStartsOn:1})}function et(n,t){const e=v(n,t==null?void 0:t.in),r=e.getFullYear(),a=D(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=F(a),i=D(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=F(i);return e.getTime()>=s.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function Q(n){const t=v(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function nt(n,...t){const e=D.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function j(n,t){const e=v(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function ft(n,t,e){const[r,a]=nt(e==null?void 0:e.in,n,t),s=j(r),i=j(a),c=+s-Q(s),l=+i-Q(i);return Math.round((c-l)/lt)}function mt(n,t){const e=et(n,t),r=D(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),F(r)}function gt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function yt(n){return!(!gt(n)&&typeof n!="number"||isNaN(+v(n)))}function pt(n,t){const[e,r]=nt(n,t.start,t.end);return{start:e,end:r}}function L(n,t){const{start:e,end:r}=pt(t==null?void 0:t.in,n);let a=+e>+r;const s=a?+e:+r,i=a?r:e;i.setHours(0,0,0,0);let c=1;const l=[];for(;+i<=s;)l.push(D(e,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return a?l.reverse():l}function wt(n,t){const e=v(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const bt={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"}},kt=(n,t,e)=>{let r;const a=bt[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function R(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const vt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},St={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mt={date:R({formats:vt,defaultWidth:"full"}),time:R({formats:Dt,defaultWidth:"full"}),dateTime:R({formats:St,defaultWidth:"full"})},xt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tt=(n,t,e,r)=>xt[n];function E(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=e!=null&&e.width?String(e.width):i;a=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[c]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(t):t;return a[s]}}const Pt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ot={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ct={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"]},$t={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"]},Et={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"}},Wt={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"}},Nt=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Yt={ordinalNumber:Nt,era:E({values:Pt,defaultWidth:"wide"}),quarter:E({values:Ot,defaultWidth:"wide",argumentCallback:n=>n-1}),month:E({values:Ct,defaultWidth:"wide"}),day:E({values:$t,defaultWidth:"wide"}),dayPeriod:E({values:Et,defaultWidth:"wide",formattingValues:Wt,defaultFormattingWidth:"wide"})};function W(n){return(t,e={})=>{const r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=t.match(a);if(!s)return null;const i=s[0],c=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Ft(c,p=>p.test(i)):At(c,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function At(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Ft(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function Ht(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const a=r[0],s=t.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const c=t.slice(a.length);return{value:i,rest:c}}}const _t=/^(\d+)(th|st|nd|rd)?/i,It=/\d+/i,qt={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},Lt={any:[/^b/i,/^(a|c)/i]},Rt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ut={any:[/1/i,/2/i,/3/i,/4/i]},zt={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},Bt={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]},Qt={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},jt={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]},Gt={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},Xt={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}},Vt={ordinalNumber:Ht({matchPattern:_t,parsePattern:It,valueCallback:n=>parseInt(n,10)}),era:W({matchPatterns:qt,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),quarter:W({matchPatterns:Rt,defaultMatchWidth:"wide",parsePatterns:Ut,defaultParseWidth:"any",valueCallback:n=>n+1}),month:W({matchPatterns:zt,defaultMatchWidth:"wide",parsePatterns:Bt,defaultParseWidth:"any"}),day:W({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),dayPeriod:W({matchPatterns:Gt,defaultMatchWidth:"any",parsePatterns:Xt,defaultParseWidth:"any"})},Jt={code:"en-US",formatDistance:kt,formatLong:Mt,formatRelative:Tt,localize:Yt,match:Vt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Kt(n,t){const e=v(n,t==null?void 0:t.in);return ft(e,wt(e))+1}function Zt(n,t){const e=v(n,t==null?void 0:t.in),r=+F(e)-+mt(e);return Math.round(r/tt)+1}function rt(n,t){var f,p,w,m;const e=v(n,t==null?void 0:t.in),r=e.getFullYear(),a=_(),s=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(w=a.locale)==null?void 0:w.options)==null?void 0:m.firstWeekContainsDate)??1,i=D((t==null?void 0:t.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=A(i,t),l=D((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=A(l,t);return+e>=+c?r+1:+e>=+u?r:r-1}function te(n,t){var c,l,u,f;const e=_(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt(n,t),s=D((t==null?void 0:t.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),A(s,t)}function at(n,t){const e=v(n,t==null?void 0:t.in),r=+A(e,t)-+te(e,t);return Math.round(r/tt)+1}function h(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const x={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return h(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):h(e+1,2)},d(n,t){return h(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return h(n.getHours()%12||12,t.length)},H(n,t){return h(n.getHours(),t.length)},m(n,t){return h(n.getMinutes(),t.length)},s(n,t){return h(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return h(a,t.length)}},C={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},G={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return x.y(n,t)},Y:function(n,t,e,r){const a=rt(n,r),s=a>0?a:1-a;if(t==="YY"){const i=s%100;return h(i,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):h(s,t.length)},R:function(n,t){const e=et(n);return h(e,t.length)},u:function(n,t){const e=n.getFullYear();return h(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return h(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return h(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return x.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return h(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const a=at(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):h(a,t.length)},I:function(n,t,e){const r=Zt(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):h(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):x.d(n,t)},D:function(n,t,e){const r=Kt(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):h(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return h(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return h(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return h(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return x.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):x.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):x.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):x.s(n,t)},S:function(n,t){return x.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return V(r);case"XXXX":case"XX":return O(r);case"XXXXX":case"XXX":default:return O(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return V(r);case"xxxx":case"xx":return O(r);case"xxxxx":case"xxx":default:return O(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+X(r,":");case"OOOO":default:return"GMT"+O(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+X(r,":");case"zzzz":default:return"GMT"+O(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return h(r,t.length)},T:function(n,t,e){return h(+n,t.length)}};function X(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?e+String(a):e+String(a)+t+h(s,2)}function V(n,t){return n%60===0?(n>0?"-":"+")+h(Math.abs(n)/60,2):O(n,t)}function O(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=h(Math.trunc(r/60),2),s=h(r%60,2);return e+a+t+s}const J=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},st=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ee=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return J(n,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",J(r,t)).replace("{{time}}",st(a,t))},ne={p:st,P:ee},re=/^D+$/,ae=/^Y+$/,se=["D","DD","YY","YYYY"];function ie(n){return re.test(n)}function oe(n){return ae.test(n)}function ce(n,t,e){const r=le(n,t,e);if(console.warn(r),se.includes(n))throw new RangeError(r)}function le(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ue=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,me=/[a-zA-Z]/;function ge(n,t,e){var f,p,w,m;const r=_(),a=r.locale??Jt,s=r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(w=r.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??0,c=v(n,e==null?void 0:e.in);if(!yt(c))throw new RangeError("Invalid time value");let l=t.match(he).map(g=>{const k=g[0];if(k==="p"||k==="P"){const I=ne[k];return I(g,a.formatLong)}return g}).join("").match(ue).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const k=g[0];if(k==="'")return{isToken:!1,value:ye(g)};if(G[k])return{isToken:!0,value:g};if(k.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(l=a.localize.preprocessor(c,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(g=>{if(!g.isToken)return g.value;const k=g.value;(oe(k)||ie(k))&&ce(k,t,String(n));const I=G[k[0]];return I(c,k,a.localize,u)}).join("")}function ye(n){const t=n.match(de);return t?t[1].replace(fe,"'"):n}function pe(n,t){const e=v(n,t==null?void 0:t.in).getDay();return e===0?7:e}const U={},N={};function Y(n,t){try{const r=(U[n]||(U[n]=new Intl.DateTimeFormat("en-GB",{timeZone:n,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in N?N[r]:K(r,r.split(":"))}catch{if(n in N)return N[n];const e=n==null?void 0:n.match(we);return e?K(n,e.slice(1)):NaN}}const we=/([+-]\d\d):?(\d\d)?/;function K(n,t){const e=+t[0],r=+(t[1]||0);return N[n]=e>0?e*60+r:e*60-r}class S extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Y(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),it(this),z(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new S(...e,t):new S(Date.now(),t)}withTimeZone(t){return new S(+this,t)}getTimezoneOffset(){return-Y(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),z(this),+this}[Symbol.for("constructDateFrom")](t){return new S(+new Date(t),this.timeZone)}}const Z=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!Z.test(n))return;const t=n.replace(Z,"$1UTC");S.prototype[t]&&(n.startsWith("get")?S.prototype[n]=function(){return this.internal[t]()}:(S.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),be(this),+this},S.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),z(this),+this}))});function z(n){n.internal.setTime(+n),n.internal.setUTCMinutes(n.internal.getUTCMinutes()-n.getTimezoneOffset())}function be(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),it(n)}function it(n){const t=Y(n.timeZone,n),e=new Date(+n);e.setUTCHours(e.getUTCHours()-1);const r=-new Date(+n).getTimezoneOffset(),a=-new Date(+e).getTimezoneOffset(),s=r-a,i=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();s&&i&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+s);const c=r-t;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);const l=Y(n.timeZone,n),f=-new Date(+n).getTimezoneOffset()-l,p=l!==t,w=f-c;if(p&&w){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+w);const m=Y(n.timeZone,n),g=l-m;g&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+g))}}class M extends S{static tz(t,...e){return e.length?new M(...e,t):new M(Date.now(),t)}toISOString(){const[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${ke(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,r,a]}withTimeZone(t){return new M(+this,t)}[Symbol.for("constructDateFrom")](t){return new M(+new Date(t),this.timeZone)}}function ke(n,t){return new Intl.DateTimeFormat("en-GB",{timeZone:n,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const y=n=>n.toISOString().split("T")[0],ve=n=>{if(!n)return null;const t=$(new M(n,window.pktTz),12);return isNaN(t.getTime())?null:t},De=(n,t)=>{const e=b(n);return isNaN(e.getTime())?"":ge(e,t)},b=(n="")=>$(n===""||!n?new M(new Date,window.pktTz):new M(n,window.pktTz),12),T=(n,t,e=1)=>$(new M(n,t,e,window.pktTz),12),Se=n=>new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(n),Me="pkt-calendar",xe={id:{type:"string",name:"ID",description:"Unique identifier for the calendar"},currentmonth:{type:"date",converter:"stringToDate",description:"The current month to display"},selected:{type:"array",converter:"csvToArray",reflect:!0,items:{type:"date"},description:"Array of selected dates"},excludeweekdays:{type:"array",converter:"csvToArray",items:{type:"string"},description:"Array of weekdays (1-7) to exclude"},excludedates:{type:"array",converter:"stringsToDate",items:{type:"date"},description:"Array of specific dates to exclude"},earliest:{type:"date",converter:"stringToDate",default:null,description:"Earliest selectable date"},latest:{type:"date",converter:"stringToDate",default:null,description:"Latest selectable date"},weeknumbers:{type:"boolean",reflect:!0,default:!1,description:"Show week numbers in calendar"},withcontrols:{type:"boolean",reflect:!0,default:!1,description:"Show month and year navigation controls"},multiple:{type:"boolean",reflect:!0,default:!1,description:"Allow multiple date selection"},maxMultiple:{type:"number",default:4,description:"Maximum number of dates that can be selected"},range:{type:"boolean",reflect:!0,default:!1,description:"Allow date range selection"}},Te={"date-selected":{description:"Returns ISO formatted date string"}},P={name:Me,"css-class":"pkt-calendar",props:xe,events:Te};var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,d=(n,t,e,r)=>{for(var a=r>1?void 0:r?Oe(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=(r?i(t,e,a):i(a))||a);return r&&a&&Pe(t,e,a),a};exports.PktCalendar=class extends o.PktElement{constructor(){super(...arguments),this.multiple=P.props.multiple.default,this.maxMultiple=P.props.maxMultiple.default,this.range=P.props.range.default,this.weeknumbers=P.props.weeknumbers.default,this.withcontrols=P.props.withcontrols.default,this.selected=[],this.earliest=P.props.earliest.default,this.latest=P.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(t,e,r){t==="selected"&&r&&this.convertSelected(),super.attributeChangedCallback(t,e,r)}updated(t){t.has("selected")&&this.convertSelected(),super.updated(t)}firstUpdated(t){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(t=>b(t)),this.range&&this.selected.length===2){const t=L({start:b(this.selected[0]),end:b(this.selected[1])});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let r=0;r<t.length;r++)e[y(t[r])]=this.isInRange(t[r]);this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}this.selected.length&&this.selected[0]!==""?this.currentmonth=b(this.selected[this.selected.length-1]):this.currentmonth===null&&(this.currentmonth=b()),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var s,i,c;if(((s=t.target)==null?void 0:s.nodeName)==="INPUT"||((i=t.target)==null?void 0:i.nodeName)==="SELECT"||((c=t.target)==null?void 0:c.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const r=this.focusedDate?b(this.focusedDate):T(this.year,this.month,1);let a=q(r,e);if(a){let l=this.querySelector(`div[data-date="${y(a)}"]`);if(l instanceof HTMLDivElement){if(l.dataset.disabled){a=q(a,e);let u=this.querySelector(`div[data-date="${y(a)}"]`);for(;u&&u instanceof HTMLDivElement&&u.dataset.disabled;)a=q(a,e),u=this.querySelector(`div[data-date="${y(a)}"]`);l=u}l instanceof HTMLDivElement&&!l.dataset.disabled&&(this.focusedDate=y(a),l.focus())}}}render(){return o.x`
1
+ "use strict";const o=require("./index-BVbNUNAa.cjs"),H=require("./converters-DhM11VlY.cjs"),ot=require("./custom-element-B-TlBwRu.cjs"),ct=require("./class-map-DLFPHEre.cjs");require("./index-DYiD-o1w.cjs");const tt=6048e5,lt=864e5,ut=36e5,B=Symbol.for("constructDateFrom");function D(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&B in n?n[B](t):n instanceof Date?new n.constructor(t):new Date(t)}function v(n,t){return D(t||n,n)}function q(n,t,e){const r=v(n,e==null?void 0:e.in);return isNaN(t)?D(n,NaN):(t&&r.setDate(r.getDate()+t),r)}function ht(n,t,e){return D(n,+v(n)+t)}function $(n,t,e){return ht(n,t*ut)}let dt={};function _(){return dt}function A(n,t){var c,l,u,f;const e=_(),r=(t==null?void 0:t.weekStartsOn)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.weekStartsOn)??e.weekStartsOn??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,a=v(n,t==null?void 0:t.in),s=a.getDay(),i=(s<r?7:0)+s-r;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}function F(n,t){return A(n,{...t,weekStartsOn:1})}function et(n,t){const e=v(n,t==null?void 0:t.in),r=e.getFullYear(),a=D(e,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const s=F(a),i=D(e,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const c=F(i);return e.getTime()>=s.getTime()?r+1:e.getTime()>=c.getTime()?r:r-1}function Q(n){const t=v(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function nt(n,...t){const e=D.bind(null,t.find(r=>typeof r=="object"));return t.map(e)}function j(n,t){const e=v(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function ft(n,t,e){const[r,a]=nt(e==null?void 0:e.in,n,t),s=j(r),i=j(a),c=+s-Q(s),l=+i-Q(i);return Math.round((c-l)/lt)}function mt(n,t){const e=et(n,t),r=D(n,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),F(r)}function gt(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function yt(n){return!(!gt(n)&&typeof n!="number"||isNaN(+v(n)))}function pt(n,t){const[e,r]=nt(n,t.start,t.end);return{start:e,end:r}}function L(n,t){const{start:e,end:r}=pt(t==null?void 0:t.in,n);let a=+e>+r;const s=a?+e:+r,i=a?r:e;i.setHours(0,0,0,0);let c=1;const l=[];for(;+i<=s;)l.push(D(e,i)),i.setDate(i.getDate()+c),i.setHours(0,0,0,0);return a?l.reverse():l}function wt(n,t){const e=v(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const bt={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"}},kt=(n,t,e)=>{let r;const a=bt[n];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r};function R(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const vt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Dt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},St={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Mt={date:R({formats:vt,defaultWidth:"full"}),time:R({formats:Dt,defaultWidth:"full"}),dateTime:R({formats:St,defaultWidth:"full"})},xt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tt=(n,t,e,r)=>xt[n];function E(n){return(t,e)=>{const r=e!=null&&e.context?String(e.context):"standalone";let a;if(r==="formatting"&&n.formattingValues){const i=n.defaultFormattingWidth||n.defaultWidth,c=e!=null&&e.width?String(e.width):i;a=n.formattingValues[c]||n.formattingValues[i]}else{const i=n.defaultWidth,c=e!=null&&e.width?String(e.width):n.defaultWidth;a=n.values[c]||n.values[i]}const s=n.argumentCallback?n.argumentCallback(t):t;return a[s]}}const Pt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ot={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ct={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"]},$t={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"]},Et={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"}},Wt={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"}},Nt=(n,t)=>{const e=Number(n),r=e%100;if(r>20||r<10)switch(r%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},Yt={ordinalNumber:Nt,era:E({values:Pt,defaultWidth:"wide"}),quarter:E({values:Ot,defaultWidth:"wide",argumentCallback:n=>n-1}),month:E({values:Ct,defaultWidth:"wide"}),day:E({values:$t,defaultWidth:"wide"}),dayPeriod:E({values:Et,defaultWidth:"wide",formattingValues:Wt,defaultFormattingWidth:"wide"})};function W(n){return(t,e={})=>{const r=e.width,a=r&&n.matchPatterns[r]||n.matchPatterns[n.defaultMatchWidth],s=t.match(a);if(!s)return null;const i=s[0],c=r&&n.parsePatterns[r]||n.parsePatterns[n.defaultParseWidth],l=Array.isArray(c)?Ft(c,p=>p.test(i)):At(c,p=>p.test(i));let u;u=n.valueCallback?n.valueCallback(l):l,u=e.valueCallback?e.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function At(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Ft(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function Ht(n){return(t,e={})=>{const r=t.match(n.matchPattern);if(!r)return null;const a=r[0],s=t.match(n.parsePattern);if(!s)return null;let i=n.valueCallback?n.valueCallback(s[0]):s[0];i=e.valueCallback?e.valueCallback(i):i;const c=t.slice(a.length);return{value:i,rest:c}}}const _t=/^(\d+)(th|st|nd|rd)?/i,It=/\d+/i,qt={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},Lt={any:[/^b/i,/^(a|c)/i]},Rt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ut={any:[/1/i,/2/i,/3/i,/4/i]},zt={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},Bt={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]},Qt={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},jt={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]},Gt={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},Xt={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}},Vt={ordinalNumber:Ht({matchPattern:_t,parsePattern:It,valueCallback:n=>parseInt(n,10)}),era:W({matchPatterns:qt,defaultMatchWidth:"wide",parsePatterns:Lt,defaultParseWidth:"any"}),quarter:W({matchPatterns:Rt,defaultMatchWidth:"wide",parsePatterns:Ut,defaultParseWidth:"any",valueCallback:n=>n+1}),month:W({matchPatterns:zt,defaultMatchWidth:"wide",parsePatterns:Bt,defaultParseWidth:"any"}),day:W({matchPatterns:Qt,defaultMatchWidth:"wide",parsePatterns:jt,defaultParseWidth:"any"}),dayPeriod:W({matchPatterns:Gt,defaultMatchWidth:"any",parsePatterns:Xt,defaultParseWidth:"any"})},Jt={code:"en-US",formatDistance:kt,formatLong:Mt,formatRelative:Tt,localize:Yt,match:Vt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Kt(n,t){const e=v(n,t==null?void 0:t.in);return ft(e,wt(e))+1}function Zt(n,t){const e=v(n,t==null?void 0:t.in),r=+F(e)-+mt(e);return Math.round(r/tt)+1}function rt(n,t){var f,p,w,m;const e=v(n,t==null?void 0:t.in),r=e.getFullYear(),a=_(),s=(t==null?void 0:t.firstWeekContainsDate)??((p=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??a.firstWeekContainsDate??((m=(w=a.locale)==null?void 0:w.options)==null?void 0:m.firstWeekContainsDate)??1,i=D((t==null?void 0:t.in)||n,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const c=A(i,t),l=D((t==null?void 0:t.in)||n,0);l.setFullYear(r,0,s),l.setHours(0,0,0,0);const u=A(l,t);return+e>=+c?r+1:+e>=+u?r:r-1}function te(n,t){var c,l,u,f;const e=_(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:l.firstWeekContainsDate)??e.firstWeekContainsDate??((f=(u=e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,a=rt(n,t),s=D((t==null?void 0:t.in)||n,0);return s.setFullYear(a,0,r),s.setHours(0,0,0,0),A(s,t)}function at(n,t){const e=v(n,t==null?void 0:t.in),r=+A(e,t)-+te(e,t);return Math.round(r/tt)+1}function h(n,t){const e=n<0?"-":"",r=Math.abs(n).toString().padStart(t,"0");return e+r}const x={y(n,t){const e=n.getFullYear(),r=e>0?e:1-e;return h(t==="yy"?r%100:r,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):h(e+1,2)},d(n,t){return h(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return h(n.getHours()%12||12,t.length)},H(n,t){return h(n.getHours(),t.length)},m(n,t){return h(n.getMinutes(),t.length)},s(n,t){return h(n.getSeconds(),t.length)},S(n,t){const e=t.length,r=n.getMilliseconds(),a=Math.trunc(r*Math.pow(10,e-3));return h(a,t.length)}},C={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},G={G:function(n,t,e){const r=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const r=n.getFullYear(),a=r>0?r:1-r;return e.ordinalNumber(a,{unit:"year"})}return x.y(n,t)},Y:function(n,t,e,r){const a=rt(n,r),s=a>0?a:1-a;if(t==="YY"){const i=s%100;return h(i,2)}return t==="Yo"?e.ordinalNumber(s,{unit:"year"}):h(s,t.length)},R:function(n,t){const e=et(n);return h(e,t.length)},u:function(n,t){const e=n.getFullYear();return h(e,t.length)},Q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return h(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(n,t,e){const r=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return h(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(n,t,e){const r=n.getMonth();switch(t){case"M":case"MM":return x.M(n,t);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(n,t,e){const r=n.getMonth();switch(t){case"L":return String(r+1);case"LL":return h(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(n,t,e,r){const a=at(n,r);return t==="wo"?e.ordinalNumber(a,{unit:"week"}):h(a,t.length)},I:function(n,t,e){const r=Zt(n);return t==="Io"?e.ordinalNumber(r,{unit:"week"}):h(r,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):x.d(n,t)},D:function(n,t,e){const r=Kt(n);return t==="Do"?e.ordinalNumber(r,{unit:"dayOfYear"}):h(r,t.length)},E:function(n,t,e){const r=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return h(s,2);case"eo":return e.ordinalNumber(s,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(n,t,e,r){const a=n.getDay(),s=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return h(s,t.length);case"co":return e.ordinalNumber(s,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(n,t,e){const r=n.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return h(a,t.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(n,t,e){const a=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(n,t,e){const r=n.getHours();let a;switch(r===12?a=C.noon:r===0?a=C.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(n,t,e){const r=n.getHours();let a;switch(r>=17?a=C.evening:r>=12?a=C.afternoon:r>=4?a=C.morning:a=C.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let r=n.getHours()%12;return r===0&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return x.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):x.H(n,t)},K:function(n,t,e){const r=n.getHours()%12;return t==="Ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},k:function(n,t,e){let r=n.getHours();return r===0&&(r=24),t==="ko"?e.ordinalNumber(r,{unit:"hour"}):h(r,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):x.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):x.s(n,t)},S:function(n,t){return x.S(n,t)},X:function(n,t,e){const r=n.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return V(r);case"XXXX":case"XX":return O(r);case"XXXXX":case"XXX":default:return O(r,":")}},x:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"x":return V(r);case"xxxx":case"xx":return O(r);case"xxxxx":case"xxx":default:return O(r,":")}},O:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+X(r,":");case"OOOO":default:return"GMT"+O(r,":")}},z:function(n,t,e){const r=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+X(r,":");case"zzzz":default:return"GMT"+O(r,":")}},t:function(n,t,e){const r=Math.trunc(+n/1e3);return h(r,t.length)},T:function(n,t,e){return h(+n,t.length)}};function X(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=Math.trunc(r/60),s=r%60;return s===0?e+String(a):e+String(a)+t+h(s,2)}function V(n,t){return n%60===0?(n>0?"-":"+")+h(Math.abs(n)/60,2):O(n,t)}function O(n,t=""){const e=n>0?"-":"+",r=Math.abs(n),a=h(Math.trunc(r/60),2),s=h(r%60,2);return e+a+t+s}const J=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},st=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},ee=(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],r=e[1],a=e[2];if(!a)return J(n,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",J(r,t)).replace("{{time}}",st(a,t))},ne={p:st,P:ee},re=/^D+$/,ae=/^Y+$/,se=["D","DD","YY","YYYY"];function ie(n){return re.test(n)}function oe(n){return ae.test(n)}function ce(n,t,e){const r=le(n,t,e);if(console.warn(r),se.includes(n))throw new RangeError(r)}function le(n,t,e){const r=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${r} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ue=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,he=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,de=/^'([^]*?)'?$/,fe=/''/g,me=/[a-zA-Z]/;function ge(n,t,e){var f,p,w,m;const r=_(),a=r.locale??Jt,s=r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,i=r.weekStartsOn??((m=(w=r.locale)==null?void 0:w.options)==null?void 0:m.weekStartsOn)??0,c=v(n,e==null?void 0:e.in);if(!yt(c))throw new RangeError("Invalid time value");let l=t.match(he).map(g=>{const k=g[0];if(k==="p"||k==="P"){const I=ne[k];return I(g,a.formatLong)}return g}).join("").match(ue).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const k=g[0];if(k==="'")return{isToken:!1,value:ye(g)};if(G[k])return{isToken:!0,value:g};if(k.match(me))throw new RangeError("Format string contains an unescaped latin alphabet character `"+k+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(l=a.localize.preprocessor(c,l));const u={firstWeekContainsDate:s,weekStartsOn:i,locale:a};return l.map(g=>{if(!g.isToken)return g.value;const k=g.value;(oe(k)||ie(k))&&ce(k,t,String(n));const I=G[k[0]];return I(c,k,a.localize,u)}).join("")}function ye(n){const t=n.match(de);return t?t[1].replace(fe,"'"):n}function pe(n,t){const e=v(n,t==null?void 0:t.in).getDay();return e===0?7:e}const U={},N={};function Y(n,t){try{const r=(U[n]||(U[n]=new Intl.DateTimeFormat("en-GB",{timeZone:n,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in N?N[r]:K(r,r.split(":"))}catch{if(n in N)return N[n];const e=n==null?void 0:n.match(we);return e?K(n,e.slice(1)):NaN}}const we=/([+-]\d\d):?(\d\d)?/;function K(n,t){const e=+t[0],r=+(t[1]||0);return N[n]=e>0?e*60+r:e*60-r}class S extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Y(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),it(this),z(this)):this.setTime(Date.now())}static tz(t,...e){return e.length?new S(...e,t):new S(Date.now(),t)}withTimeZone(t){return new S(+this,t)}getTimezoneOffset(){return-Y(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),z(this),+this}[Symbol.for("constructDateFrom")](t){return new S(+new Date(t),this.timeZone)}}const Z=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(n=>{if(!Z.test(n))return;const t=n.replace(Z,"$1UTC");S.prototype[t]&&(n.startsWith("get")?S.prototype[n]=function(){return this.internal[t]()}:(S.prototype[n]=function(){return Date.prototype[t].apply(this.internal,arguments),be(this),+this},S.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),z(this),+this}))});function z(n){n.internal.setTime(+n),n.internal.setUTCMinutes(n.internal.getUTCMinutes()-n.getTimezoneOffset())}function be(n){Date.prototype.setFullYear.call(n,n.internal.getUTCFullYear(),n.internal.getUTCMonth(),n.internal.getUTCDate()),Date.prototype.setHours.call(n,n.internal.getUTCHours(),n.internal.getUTCMinutes(),n.internal.getUTCSeconds(),n.internal.getUTCMilliseconds()),it(n)}function it(n){const t=Y(n.timeZone,n),e=new Date(+n);e.setUTCHours(e.getUTCHours()-1);const r=-new Date(+n).getTimezoneOffset(),a=-new Date(+e).getTimezoneOffset(),s=r-a,i=Date.prototype.getHours.apply(n)!==n.internal.getUTCHours();s&&i&&n.internal.setUTCMinutes(n.internal.getUTCMinutes()+s);const c=r-t;c&&Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+c);const l=Y(n.timeZone,n),f=-new Date(+n).getTimezoneOffset()-l,p=l!==t,w=f-c;if(p&&w){Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+w);const m=Y(n.timeZone,n),g=l-m;g&&(n.internal.setUTCMinutes(n.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(n,Date.prototype.getUTCMinutes.call(n)+g))}}class M extends S{static tz(t,...e){return e.length?new M(...e,t):new M(Date.now(),t)}toISOString(){const[t,e,r]=this.tzComponents(),a=`${t}${e}:${r}`;return this.internal.toISOString().slice(0,-1)+a}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,e,r,a]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${e} ${a}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[e,r,a]=this.tzComponents();return`${t} GMT${e}${r}${a} (${ke(this.timeZone,this)})`}toLocaleString(t,e){return Date.prototype.toLocaleString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleDateString(t,e){return Date.prototype.toLocaleDateString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}toLocaleTimeString(t,e){return Date.prototype.toLocaleTimeString.call(this,t,{...e,timeZone:(e==null?void 0:e.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),e=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),a=String(Math.abs(t)%60).padStart(2,"0");return[e,r,a]}withTimeZone(t){return new M(+this,t)}[Symbol.for("constructDateFrom")](t){return new M(+new Date(t),this.timeZone)}}function ke(n,t){return new Intl.DateTimeFormat("en-GB",{timeZone:n,timeZoneName:"long"}).format(t).slice(12)}window.pktTz=window.pktTz===void 0?"Europe/Oslo":window.pktTz;const y=n=>n.toISOString().split("T")[0],ve=n=>{if(!n)return null;const t=$(new M(n,window.pktTz),12);return isNaN(t.getTime())?null:t},De=(n,t)=>{const e=b(n);return isNaN(e.getTime())?"":ge(e,t)},b=(n="")=>$(n===""||!n?new M(new Date,window.pktTz):new M(n,window.pktTz),12),T=(n,t,e=1)=>$(new M(n,t,e,window.pktTz),12),Se=n=>new Intl.DateTimeFormat("no",{dateStyle:"full",timeZone:window.pktTz}).format(n),Me="pkt-calendar",xe={id:{type:"string",name:"ID",description:"Unique identifier for the calendar"},currentmonth:{type:"date",converter:"stringToDate",description:"The current month to display"},selected:{type:"array",converter:"csvToArray",reflect:!0,items:{type:"date"},description:"Array of selected dates"},excludeweekdays:{type:"array",converter:"csvToArray",items:{type:"string"},description:"Array of weekdays (1-7) to exclude"},excludedates:{type:"array",converter:"stringsToDate",items:{type:"date"},description:"Array of specific dates to exclude"},earliest:{type:"date",converter:"stringToDate",default:null,description:"Earliest selectable date"},latest:{type:"date",converter:"stringToDate",default:null,description:"Latest selectable date"},weeknumbers:{type:"boolean",reflect:!0,default:!1,description:"Show week numbers in calendar"},withcontrols:{type:"boolean",reflect:!0,default:!1,description:"Show month and year navigation controls"},multiple:{type:"boolean",reflect:!0,default:!1,description:"Allow multiple date selection"},maxMultiple:{type:"number",default:4,description:"Maximum number of dates that can be selected"},range:{type:"boolean",reflect:!0,default:!1,description:"Allow date range selection"}},Te={"date-selected":{description:"Returns ISO formatted date string"}},P={name:Me,"css-class":"pkt-calendar",props:xe,events:Te};var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,d=(n,t,e,r)=>{for(var a=r>1?void 0:r?Oe(t,e):t,s=n.length-1,i;s>=0;s--)(i=n[s])&&(a=(r?i(t,e,a):i(a))||a);return r&&a&&Pe(t,e,a),a};exports.PktCalendar=class extends o.PktElement{constructor(){super(...arguments),this.multiple=P.props.multiple.default,this.maxMultiple=P.props.maxMultiple.default,this.range=P.props.range.default,this.weeknumbers=P.props.weeknumbers.default,this.withcontrols=P.props.withcontrols.default,this.selected=[],this.earliest=P.props.earliest.default,this.latest=P.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(t,e,r){t==="selected"&&r&&this.convertSelected(),super.attributeChangedCallback(t,e,r)}updated(t){t.has("selected")&&this.convertSelected(),super.updated(t)}firstUpdated(t){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(t=>b(t)),this.range&&this.selected.length===2){const t=L({start:b(this.selected[0]),end:b(this.selected[1])});if(this.inRange={},Array.isArray(t)&&t.length){const e={};for(let r=0;r<t.length;r++)e[y(t[r])]=this.isInRange(t[r]);this.inRange=e}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}this.selected.length&&this.selected[0]!==""?this.currentmonth=b(this.selected[this.selected.length-1]):this.currentmonth===null&&(this.currentmonth=b()),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(t){switch(t.key){case"ArrowLeft":this.handleArrowKey(t,-1);break;case"ArrowRight":this.handleArrowKey(t,1);break;case"ArrowUp":this.handleArrowKey(t,-7);break;case"ArrowDown":this.handleArrowKey(t,7);break}}handleArrowKey(t,e){var s,i,c;if(((s=t.target)==null?void 0:s.nodeName)==="INPUT"||((i=t.target)==null?void 0:i.nodeName)==="SELECT"||((c=t.target)==null?void 0:c.nodeName)==="BUTTON")return;t.preventDefault(),this.focusedDate||this.focusOnCurrentDate();const r=this.focusedDate?b(this.focusedDate):T(this.year,this.month,1);let a=q(r,e);if(a){let l=this.querySelector(`div[data-date="${y(a)}"]`);if(l instanceof HTMLDivElement){if(l.dataset.disabled){a=q(a,e);let u=this.querySelector(`div[data-date="${y(a)}"]`);for(;u&&u instanceof HTMLDivElement&&u.dataset.disabled;)a=q(a,e),u=this.querySelector(`div[data-date="${y(a)}"]`);l=u}l instanceof HTMLDivElement&&!l.dataset.disabled&&(this.focusedDate=y(a),l.focus())}}}render(){return o.x`
2
2
  <div
3
3
  class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":o.E}"
4
4
  @focusout=${this.closeEvent}
package/dist/index.d.ts CHANGED
@@ -197,6 +197,7 @@ export declare class PktDatepicker extends PktInputElement {
197
197
  multiple: boolean;
198
198
  maxlength: number | null;
199
199
  range: boolean;
200
+ showRangeLabels: boolean;
200
201
  min: string | null;
201
202
  max: string | null;
202
203
  weeknumbers: boolean;
@@ -208,6 +209,8 @@ export declare class PktDatepicker extends PktInputElement {
208
209
  useWrapper: boolean;
209
210
  calendarOpen: boolean;
210
211
  timezone: string;
212
+ inputClasses: {};
213
+ buttonClasses: {};
211
214
  /**
212
215
  * Housekeeping / lifecycle methods
213
216
  */
@@ -224,20 +227,6 @@ export declare class PktDatepicker extends PktInputElement {
224
227
  btnRef: Ref<HTMLButtonElement>;
225
228
  calRef: Ref<PktCalendar>;
226
229
  popupRef: Ref<HTMLDivElement>;
227
- /**
228
- * CSS classes
229
- */
230
- inputClasses: {
231
- 'pkt-input': boolean;
232
- 'pkt-datepicker__input': boolean;
233
- 'pkt-input--fullwidth': boolean;
234
- };
235
- buttonClasses: {
236
- 'pkt-input-icon': boolean;
237
- 'pkt-btn': boolean;
238
- 'pkt-btn--icon-only': boolean;
239
- 'pkt-btn--tertiary': boolean;
240
- };
241
230
  /**
242
231
  * Rendering
243
232
  */
@@ -1,4 +1,4 @@
1
- "use strict";const p=require("./class-map-B9m-NycN.cjs"),k=require("./custom-element-B-TlBwRu.cjs"),n=require("./index-CBFF6OHE.cjs"),a=require("./ref-3QXuhm6y.cjs");require("./index-CqWQt14b.cjs");const u="pkt-modal",m=!0,h={"background-click":{description:"Event som trigges når bakgrunnen trykkes på"},close:{description:"Event som trigges når meldingsboksen lukkes"}},f={headingText:{name:"Heading text",description:"Heading tekst på modalen",type:"string"},hideCloseButton:{name:"Gjem 'Lukk'-knapp",description:"Gjemmer lukkeknappen. Dersom denne er satt til true, vil ikke lukkeknappen vises, og dermed er det viktig at man tilbyr en annen måte som f.eks. en knapp for å lukke modalen på.",type:"boolean",default:!1},closeOnBackdropClick:{name:"Lukk modalen når bakgrunnen trykkes på",description:"Lukk modalen når bakgrunnen trykkes på",type:"boolean",default:!1},size:{name:"Størrelse",description:"Størrelsen på modalen",type:["small","medium","large"],default:"medium"}},g={default:{description:"Innholdet i meldingen. Her tilbyr vi støtteklasser for å style 1-3 knapper i modalen."}},c={name:u,"css-class":"pkt-modal",isElements:m,events:h,props:f,slots:g};var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,l=(d,e,t,s)=>{for(var o=s>1?void 0:s?v(e,t):e,i=d.length-1,r;i>=0;i--)(r=d[i])&&(o=(s?r(e,t,o):r(o))||o);return s&&o&&b(e,t,o),o};exports.PktModal=class extends n.PktElement{constructor(){super(),this.headingText="",this.hideCloseButton=c.props.hideCloseButton.default,this.closeOnBackdropClick=c.props.closeOnBackdropClick.default,this.size=c.props.size.default,this.defaultSlot=a.e(),this.dialogRef=a.e(),this._isOpen=!1,this.close=(e,t=!1)=>{var i;this._isOpen=!1,t||(i=this.dialogRef.value)==null||i.close();const s=document.activeElement;s&&!this.isElementInViewport(s)&&s.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),document.querySelector(".pkt-modal")&&document.body.classList.remove("pkt-modal--open"),this.requestUpdate()},this.showModal=e=>{var s;this._isOpen=!0,(s=this.dialogRef.value)==null||s.showModal(),document.querySelector(".pkt-modal")&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:e},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new a.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){var e;super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.addEventListener("submit",t=>this.close(t,!0))}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),document.removeEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.removeEventListener("submit",t=>this.close(t,!0))}handleKeyDown(e){e.key==="Escape"&&this.close(e)}handleBackdropClick(e){var t;this.closeOnBackdropClick&&e.target===((t=this.dialogRef)==null?void 0:t.value)&&this.close(e)}isElementInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const e={"pkt-modal":!0,[`pkt-modal--${this.size}`]:this.size!==void 0};return n.x`
1
+ "use strict";const p=require("./class-map-DLFPHEre.cjs"),k=require("./custom-element-B-TlBwRu.cjs"),n=require("./index-BVbNUNAa.cjs"),a=require("./ref-CIjJrMxp.cjs");require("./index-DYiD-o1w.cjs");const u="pkt-modal",m=!0,h={"background-click":{description:"Event som trigges når bakgrunnen trykkes på"},close:{description:"Event som trigges når meldingsboksen lukkes"}},f={headingText:{name:"Heading text",description:"Heading tekst på modalen",type:"string"},hideCloseButton:{name:"Gjem 'Lukk'-knapp",description:"Gjemmer lukkeknappen. Dersom denne er satt til true, vil ikke lukkeknappen vises, og dermed er det viktig at man tilbyr en annen måte som f.eks. en knapp for å lukke modalen på.",type:"boolean",default:!1},closeOnBackdropClick:{name:"Lukk modalen når bakgrunnen trykkes på",description:"Lukk modalen når bakgrunnen trykkes på",type:"boolean",default:!1},size:{name:"Størrelse",description:"Størrelsen på modalen",type:["small","medium","large"],default:"medium"}},g={default:{description:"Innholdet i meldingen. Her tilbyr vi støtteklasser for å style 1-3 knapper i modalen."}},c={name:u,"css-class":"pkt-modal",isElements:m,events:h,props:f,slots:g};var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,l=(d,e,t,s)=>{for(var o=s>1?void 0:s?v(e,t):e,i=d.length-1,r;i>=0;i--)(r=d[i])&&(o=(s?r(e,t,o):r(o))||o);return s&&o&&b(e,t,o),o};exports.PktModal=class extends n.PktElement{constructor(){super(),this.headingText="",this.hideCloseButton=c.props.hideCloseButton.default,this.closeOnBackdropClick=c.props.closeOnBackdropClick.default,this.size=c.props.size.default,this.defaultSlot=a.e(),this.dialogRef=a.e(),this._isOpen=!1,this.close=(e,t=!1)=>{var i;this._isOpen=!1,t||(i=this.dialogRef.value)==null||i.close();const s=document.activeElement;s&&!this.isElementInViewport(s)&&s.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),document.querySelector(".pkt-modal")&&document.body.classList.remove("pkt-modal--open"),this.requestUpdate()},this.showModal=e=>{var s;this._isOpen=!0,(s=this.dialogRef.value)==null||s.showModal(),document.querySelector(".pkt-modal")&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:e},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new a.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){var e;super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.addEventListener("submit",t=>this.close(t,!0))}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),document.removeEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.removeEventListener("submit",t=>this.close(t,!0))}handleKeyDown(e){e.key==="Escape"&&this.close(e)}handleBackdropClick(e){var t;this.closeOnBackdropClick&&e.target===((t=this.dialogRef)==null?void 0:t.value)&&this.close(e)}isElementInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const e={"pkt-modal":!0,[`pkt-modal--${this.size}`]:this.size!==void 0};return n.x`
2
2
  <dialog
3
3
  class=${p.e(e)}
4
4
  aria-modal=${this._isOpen}