@oslokommune/punkt-react 12.3.14 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +2 -2
- package/dist/punkt-react.es.js +27 -19
- package/dist/punkt-react.umd.js +10 -7
- package/package.json +5 -5
- package/src/components/card/Card.tsx +2 -2
- package/src/components/preview/Preview.tsx +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.3.15](https://github.com/oslokommune/punkt/compare/12.3.14...12.3.15) (2024-10-18)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
* En liten Komponentbygger-endring (#1959).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Chores
|
|
21
|
+
Ingen
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
|
|
8
26
|
## [12.3.14](https://github.com/oslokommune/punkt/compare/12.3.13...12.3.14) (2024-10-15)
|
|
9
27
|
|
|
10
28
|
### ⚠ BREAKING CHANGES
|
package/dist/index.d.ts
CHANGED
|
@@ -113,11 +113,11 @@ declare interface IPktCard extends PktElType {
|
|
|
113
113
|
subheading?: string;
|
|
114
114
|
tags?: (Omit<IPktTag, 'closeTag'> & {
|
|
115
115
|
text: string;
|
|
116
|
-
})[];
|
|
116
|
+
})[] | string;
|
|
117
117
|
image?: {
|
|
118
118
|
src: string;
|
|
119
119
|
alt: string;
|
|
120
|
-
};
|
|
120
|
+
} | string;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
declare interface IPktCheckbox extends default_2.InputHTMLAttributes<HTMLInputElement> {
|
package/dist/punkt-react.es.js
CHANGED
|
@@ -699,7 +699,7 @@ const u_ = Ne(
|
|
|
699
699
|
].filter(Boolean).join(" ");
|
|
700
700
|
return /* @__PURE__ */ m.jsx("div", { "data-testid": "pkt-accordion", className: o, ref: i, children: r });
|
|
701
701
|
}
|
|
702
|
-
), ws = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', Zm = "https://punkt-cdn.oslo.kommune.no/12.
|
|
702
|
+
), ws = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', Zm = "https://punkt-cdn.oslo.kommune.no/12.4/icons/";
|
|
703
703
|
function eg(e) {
|
|
704
704
|
return new Promise((t) => setTimeout(t, e));
|
|
705
705
|
}
|
|
@@ -910,7 +910,7 @@ const p_ = Ne(
|
|
|
910
910
|
{
|
|
911
911
|
className: "pkt-btn__icon pkt-btn__spinner",
|
|
912
912
|
name: "spinner-blue",
|
|
913
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
913
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.4/animations/"
|
|
914
914
|
}
|
|
915
915
|
),
|
|
916
916
|
c !== "label-only" && /* @__PURE__ */ m.jsx(ee, { className: "pkt-btn__icon", name: n }),
|
|
@@ -1899,7 +1899,7 @@ var jg = Object.defineProperty, Pg = Object.getOwnPropertyDescriptor, ba = (e, t
|
|
|
1899
1899
|
return r && i && jg(t, n, i), i;
|
|
1900
1900
|
};
|
|
1901
1901
|
window.pktFetch = window.pktFetch === void 0 ? fetch : window.pktFetch;
|
|
1902
|
-
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.
|
|
1902
|
+
window.pktIconPath = window.pktIconPath || "https://punkt-cdn.oslo.kommune.no/12.4/icons/";
|
|
1903
1903
|
const Lg = (e) => new Promise((t) => setTimeout(t, e)), ui = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>', Ss = {}, Og = async (e, t) => {
|
|
1904
1904
|
let n = 0;
|
|
1905
1905
|
for (; Ss[t + e + ".svg"] === "fetching" && (n++, !(n > 50)); )
|
|
@@ -2888,7 +2888,7 @@ const lv = "pkt-card", uv = !0, cv = {
|
|
|
2888
2888
|
description: "Retningen innholdet skal ligge i forhold til kortet",
|
|
2889
2889
|
default: "portrait"
|
|
2890
2890
|
},
|
|
2891
|
-
|
|
2891
|
+
image: {
|
|
2892
2892
|
type: "object",
|
|
2893
2893
|
image: "Image",
|
|
2894
2894
|
description: "Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",
|
|
@@ -5558,7 +5558,7 @@ const q2 = mo({
|
|
|
5558
5558
|
name: "oslologo",
|
|
5559
5559
|
className: "pkt-header__logo-svg",
|
|
5560
5560
|
"aria-hidden": "true",
|
|
5561
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
5561
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.4/logos/"
|
|
5562
5562
|
}
|
|
5563
5563
|
) }) : /* @__PURE__ */ m.jsx(
|
|
5564
5564
|
"button",
|
|
@@ -5572,7 +5572,7 @@ const q2 = mo({
|
|
|
5572
5572
|
name: "oslologo",
|
|
5573
5573
|
className: "pkt-header__logo-svg",
|
|
5574
5574
|
"aria-hidden": "true",
|
|
5575
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
5575
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.4/logos/"
|
|
5576
5576
|
}
|
|
5577
5577
|
)
|
|
5578
5578
|
}
|
|
@@ -5842,7 +5842,7 @@ const V2 = Ne(
|
|
|
5842
5842
|
{
|
|
5843
5843
|
name: b(o),
|
|
5844
5844
|
"aria-label": "loading",
|
|
5845
|
-
path: "https://punkt-cdn.oslo.kommune.no/12.
|
|
5845
|
+
path: "https://punkt-cdn.oslo.kommune.no/12.4/animations/",
|
|
5846
5846
|
className: `pkt-loader__svg pkt-loader__${o}`
|
|
5847
5847
|
}
|
|
5848
5848
|
),
|
|
@@ -14837,11 +14837,6 @@ const Vx = Ne(
|
|
|
14837
14837
|
fn: "github.svg",
|
|
14838
14838
|
cat: "social"
|
|
14839
14839
|
},
|
|
14840
|
-
{
|
|
14841
|
-
id: "wardrobe-girls",
|
|
14842
|
-
fn: "wardrobe-girls.svg",
|
|
14843
|
-
cat: "sign"
|
|
14844
|
-
},
|
|
14845
14840
|
{
|
|
14846
14841
|
id: "graph",
|
|
14847
14842
|
fn: "graph.svg",
|
|
@@ -14852,11 +14847,6 @@ const Vx = Ne(
|
|
|
14852
14847
|
fn: "grid.svg",
|
|
14853
14848
|
cat: "ui"
|
|
14854
14849
|
},
|
|
14855
|
-
{
|
|
14856
|
-
id: "wheelchair",
|
|
14857
|
-
fn: "wheelchair.svg",
|
|
14858
|
-
cat: "sign"
|
|
14859
|
-
},
|
|
14860
14850
|
{
|
|
14861
14851
|
id: "hands-globe",
|
|
14862
14852
|
fn: "hands-globe.svg",
|
|
@@ -15292,11 +15282,21 @@ const Vx = Ne(
|
|
|
15292
15282
|
fn: "wardrobe.svg",
|
|
15293
15283
|
cat: "sign"
|
|
15294
15284
|
},
|
|
15285
|
+
{
|
|
15286
|
+
id: "wardrobe-girls",
|
|
15287
|
+
fn: "wardrobe-girls.svg",
|
|
15288
|
+
cat: "sign"
|
|
15289
|
+
},
|
|
15295
15290
|
{
|
|
15296
15291
|
id: "water-faucet",
|
|
15297
15292
|
fn: "water-faucet.svg",
|
|
15298
15293
|
cat: "services"
|
|
15299
15294
|
},
|
|
15295
|
+
{
|
|
15296
|
+
id: "wheelchair",
|
|
15297
|
+
fn: "wheelchair.svg",
|
|
15298
|
+
cat: "sign"
|
|
15299
|
+
},
|
|
15300
15300
|
{
|
|
15301
15301
|
id: "wine-bottle",
|
|
15302
15302
|
fn: "wine-bottle.svg",
|
|
@@ -15311,6 +15311,11 @@ const Vx = Ne(
|
|
|
15311
15311
|
id: "workplace",
|
|
15312
15312
|
fn: "workplace.svg",
|
|
15313
15313
|
cat: "social"
|
|
15314
|
+
},
|
|
15315
|
+
{
|
|
15316
|
+
id: "wrench",
|
|
15317
|
+
fn: "wrench.svg",
|
|
15318
|
+
cat: "ui"
|
|
15314
15319
|
}
|
|
15315
15320
|
], qs = ({
|
|
15316
15321
|
className: e,
|
|
@@ -15433,7 +15438,10 @@ const Kx = ({ specs: e, children: t, fullWidth: n }) => {
|
|
|
15433
15438
|
x().then(() => {
|
|
15434
15439
|
const L = na(I) ? I.type.displayName || I.type.name : e.name;
|
|
15435
15440
|
h(
|
|
15436
|
-
|
|
15441
|
+
`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
15442
|
+
` + g.replaceAll(L, e.name || "").replaceAll("={", "='").replaceAll(`}
|
|
15443
|
+
`, `'
|
|
15444
|
+
`).replaceAll(/([a-zA-Z0-9]+)(:)/g, '"$1"$2')
|
|
15437
15445
|
);
|
|
15438
15446
|
});
|
|
15439
15447
|
else {
|
|
@@ -15444,7 +15452,7 @@ const Kx = ({ specs: e, children: t, fullWidth: n }) => {
|
|
|
15444
15452
|
h(L.replace(/<\!--.*?-->/g, ""));
|
|
15445
15453
|
}
|
|
15446
15454
|
}, x = async () => {
|
|
15447
|
-
const L = ID(I);
|
|
15455
|
+
const L = await ID(I);
|
|
15448
15456
|
return v(L), Promise.resolve();
|
|
15449
15457
|
}, $ = (L, N) => {
|
|
15450
15458
|
navigator.clipboard.writeText(N).then(() => {
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -62,11 +62,11 @@ Check the top-level render call using <`+U+">.")}return R}}function zn(w,R){{if(
|
|
|
62
62
|
<%s {...props} />
|
|
63
63
|
React keys must be passed directly to JSX without using spread:
|
|
64
64
|
let props = %s;
|
|
65
|
-
<%s key={someKey} {...props} />`,pa,tt,ki,tt),Di[tt+pa]=!0}}return w===r?xo(Te):Ct(Te),Te}}function bi(w,R,U){return yi(w,R,U,!0)}function So(w,R,U){return yi(w,R,U,!1)}var Eo=So,br=bi;Ar.Fragment=r,Ar.jsx=Eo,Ar.jsxs=br}()),Ar}process.env.NODE_ENV==="production"?qi.exports=Zd():qi.exports=eh();var m=qi.exports;const th=M.forwardRef(({compact:e=!1,skin:t="borderless",className:n,children:r},i)=>{const o=[n,"pkt-accordion",e&&"pkt-accordion--compact",t&&`pkt-accordion--${t}`].filter(Boolean).join(" ");return m.jsx("div",{"data-testid":"pkt-accordion",className:o,ref:i,children:r})}),Hi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',nh="https://punkt-cdn.oslo.kommune.no/12.
|
|
65
|
+
<%s key={someKey} {...props} />`,pa,tt,ki,tt),Di[tt+pa]=!0}}return w===r?xo(Te):Ct(Te),Te}}function bi(w,R,U){return yi(w,R,U,!0)}function So(w,R,U){return yi(w,R,U,!1)}var Eo=So,br=bi;Ar.Fragment=r,Ar.jsx=Eo,Ar.jsxs=br}()),Ar}process.env.NODE_ENV==="production"?qi.exports=Zd():qi.exports=eh();var m=qi.exports;const th=M.forwardRef(({compact:e=!1,skin:t="borderless",className:n,children:r},i)=>{const o=[n,"pkt-accordion",e&&"pkt-accordion--compact",t&&`pkt-accordion--${t}`].filter(Boolean).join(" ");return m.jsx("div",{"data-testid":"pkt-accordion",className:o,ref:i,children:r})}),Hi='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',nh="https://punkt-cdn.oslo.kommune.no/12.4/icons/";function rh(e){return new Promise(t=>setTimeout(t,e))}const Ui={},ah=async(e,t)=>{let n=0;for(;Ui[t+e+".svg"]==="fetching"&&(n++,!(n>50));)await rh(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.fetch=="function"?(Ui[t+e+".svg"]="fetching",Promise.resolve(fetch(t+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+t+e+".svg"),Hi)).then(r=>(r!==Hi&&localStorage.setItem(t+e+".svg",r),Ui[t+e+".svg"]="fetched",r)))):Promise.resolve(Hi)},ih={fetchIcon:async(e,t)=>ah(e,t||nh)},nl=M.createContext(ih),ne=({name:e,path:t,className:n="",...r})=>{const[i,o]=M.useState(null),u=M.useContext(nl);return M.useEffect(()=>{e?u.fetchIcon(e,t).then(o):o(null)},[e,t]),i?m.jsx("span",{className:`pkt-icon ${n}`,dangerouslySetInnerHTML:{__html:i},...r}):null};var rl={exports:{}};/*!
|
|
66
66
|
Copyright (c) 2018 Jed Watson.
|
|
67
67
|
Licensed under the MIT License (MIT), see
|
|
68
68
|
http://jedwatson.github.io/classnames
|
|
69
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var u="";for(var c in o)t.call(o,c)&&o[c]&&(u=i(u,c));return u}function i(o,u){return u?o?o+" "+u:o+u:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(rl);var sh=rl.exports;const Je=_a(sh),oh=M.forwardRef(({title:e,className:t,children:n,toggleProps:r,defaultOpen:i=!1,id:o},u)=>{const[c,d]=M.useState(i),h=r?r.isOpen:c,g=b=>b??void 0,v=(b,k)=>{b.preventDefault(),r!==void 0&&r.onToggleClick(b,k),d(!h)},D=Je(t,"pkt-accordion-item");return m.jsxs("details",{className:D,ref:u,id:o,open:g(r?r.isOpen:c),children:[m.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${o}`,onClick:b=>v(b,o),children:[e,m.jsx(ne,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),m.jsx("div",{id:`pkt-accordion-item-content-${o}`,role:"region",className:"pkt-accordion-item__content",children:n})]})}),Wi=M.forwardRef(({children:e,className:t,skin:n="info",closeAlert:r=!1,onClose:i,title:o,date:u,ariaLive:c="polite",compact:d=!1,...h},g)=>{const v=[t,"pkt-alert",n&&`pkt-alert--${n}`,d&&"pkt-alert--compact"].filter(Boolean).join(" "),[D,b]=M.useState(!0),k=()=>{b(!1),i&&i()};return D?m.jsxs("div",{...h,className:v,"aria-live":c,ref:g,children:[m.jsx(ne,{className:"pkt-alert__icon",name:n==="info"?"alert-information":`alert-${n}`}),r&&m.jsx("div",{className:"pkt-alert__close",children:m.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:k,children:m.jsx(ne,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&m.jsx("div",{className:"pkt-alert__title",children:o}),m.jsx("div",{className:"pkt-alert__text",children:e}),u&&m.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",u]})]}):null});Wi.displayName="PktAlert";const al=M.forwardRef(({href:e,text:t,onClick:n,className:r,...i},o)=>{const u=[r,"pkt-back-link"].filter(Boolean).join(" "),c=d=>{n&&n(d)};return m.jsx("nav",{ref:o,className:u,"aria-label":"Gå tilbake et steg",children:m.jsxs("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:c,...i,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),m.jsx("span",{className:"pkt-back-link__text",children:t||"Forsiden"})]})})});al.displayName="PktBackLink";const lh=M.forwardRef(({breadcrumbs:e,navigationType:t,className:n,...r},i)=>{const o=e.slice(0,4),u=o[o.length-2],c=[n,"pkt-breadcrumbs"].filter(Boolean).join(" ");return m.jsxs("nav",{ref:i,"aria-label":"brødsmulemeny",className:c,children:[m.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((d,h)=>m.jsx("li",{className:"pkt-breadcrumbs__item",children:h===o.length-1?m.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?m.jsxs(wn.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...r,children:[m.jsx(ne,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):m.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...r,children:[m.jsx(ne,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${h}`))}),t==="router"?m.jsxs(wn.Link,{to:u.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...r,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]}):m.jsxs("a",{href:u.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...r,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]})]})}),Cn=M.forwardRef(({children:e,className:t,iconName:n="user",secondIconName:r="user",size:i="medium",skin:o="primary",type:u="button",variant:c="label-only",state:d,color:h,isLoading:g=!1,...v},D)=>{const b=[t,"pkt-btn",i&&`pkt-btn--${i}`,o&&`pkt-btn--${o}`,c&&`pkt-btn--${c}`,h&&`pkt-btn--${h}`,g&&"pkt-btn--active",d&&`pkt-btn--${d}`].filter(Boolean).join(" ");return m.jsxs("button",{...v,className:b,type:u,ref:D,children:[g&&m.jsx(ne,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.
|
|
69
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",u=0;u<arguments.length;u++){var c=arguments[u];c&&(o=i(o,r(c)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var u="";for(var c in o)t.call(o,c)&&o[c]&&(u=i(u,c));return u}function i(o,u){return u?o?o+" "+u:o+u:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(rl);var sh=rl.exports;const Je=_a(sh),oh=M.forwardRef(({title:e,className:t,children:n,toggleProps:r,defaultOpen:i=!1,id:o},u)=>{const[c,d]=M.useState(i),h=r?r.isOpen:c,g=b=>b??void 0,v=(b,k)=>{b.preventDefault(),r!==void 0&&r.onToggleClick(b,k),d(!h)},D=Je(t,"pkt-accordion-item");return m.jsxs("details",{className:D,ref:u,id:o,open:g(r?r.isOpen:c),children:[m.jsxs("summary",{className:"pkt-accordion-item__title",id:`pkt-accordion-item-summary-${o}`,onClick:b=>v(b,o),children:[e,m.jsx(ne,{name:"chevron-thin-down",className:"pkt-accordion-item__icon","aria-hidden":"true"})]}),m.jsx("div",{id:`pkt-accordion-item-content-${o}`,role:"region",className:"pkt-accordion-item__content",children:n})]})}),Wi=M.forwardRef(({children:e,className:t,skin:n="info",closeAlert:r=!1,onClose:i,title:o,date:u,ariaLive:c="polite",compact:d=!1,...h},g)=>{const v=[t,"pkt-alert",n&&`pkt-alert--${n}`,d&&"pkt-alert--compact"].filter(Boolean).join(" "),[D,b]=M.useState(!0),k=()=>{b(!1),i&&i()};return D?m.jsxs("div",{...h,className:v,"aria-live":c,ref:g,children:[m.jsx(ne,{className:"pkt-alert__icon",name:n==="info"?"alert-information":`alert-${n}`}),r&&m.jsx("div",{className:"pkt-alert__close",children:m.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:k,children:m.jsx(ne,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&m.jsx("div",{className:"pkt-alert__title",children:o}),m.jsx("div",{className:"pkt-alert__text",children:e}),u&&m.jsxs("div",{className:"pkt-alert__date",children:["Sist oppdatert: ",u]})]}):null});Wi.displayName="PktAlert";const al=M.forwardRef(({href:e,text:t,onClick:n,className:r,...i},o)=>{const u=[r,"pkt-back-link"].filter(Boolean).join(" "),c=d=>{n&&n(d)};return m.jsx("nav",{ref:o,className:u,"aria-label":"Gå tilbake et steg",children:m.jsxs("a",{href:e||"/",className:"pkt-link pkt-link--icon-left",onClick:c,...i,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left","aria-hidden":"true"}),m.jsx("span",{className:"pkt-back-link__text",children:t||"Forsiden"})]})})});al.displayName="PktBackLink";const lh=M.forwardRef(({breadcrumbs:e,navigationType:t,className:n,...r},i)=>{const o=e.slice(0,4),u=o[o.length-2],c=[n,"pkt-breadcrumbs"].filter(Boolean).join(" ");return m.jsxs("nav",{ref:i,"aria-label":"brødsmulemeny",className:c,children:[m.jsx("ol",{className:"pkt-breadcrumbs__list pkt-breadcrumbs--desktop",children:o.map((d,h)=>m.jsx("li",{className:"pkt-breadcrumbs__item",children:h===o.length-1?m.jsx("span",{className:"pkt-breadcrumbs__label","aria-current":"true",children:m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})}):t==="router"?m.jsxs(wn.Link,{to:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...r,children:[m.jsx(ne,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]}):m.jsxs("a",{href:d.href,className:"pkt-link pkt-link--icon-right pkt-breadcrumbs__label pkt-breadcrumbs__link",...r,children:[m.jsx(ne,{className:"pkt-icon pkt-breadcrumbs__icon pkt-link__icon",name:"chevron-thin-right"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:d.text})]})},`breadcrumb-${h}`))}),t==="router"?m.jsxs(wn.Link,{to:u.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...r,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]}):m.jsxs("a",{href:u.href,className:"pkt-link pkt-link--icon-left pkt-breadcrumbs--mobile",...r,children:[m.jsx(ne,{className:"pkt-back-link__icon pkt-icon pkt-link__icon",name:"chevron-thin-left"}),m.jsx("span",{className:"pkt-breadcrumbs__text",children:u.text})]})]})}),Cn=M.forwardRef(({children:e,className:t,iconName:n="user",secondIconName:r="user",size:i="medium",skin:o="primary",type:u="button",variant:c="label-only",state:d,color:h,isLoading:g=!1,...v},D)=>{const b=[t,"pkt-btn",i&&`pkt-btn--${i}`,o&&`pkt-btn--${o}`,c&&`pkt-btn--${c}`,h&&`pkt-btn--${h}`,g&&"pkt-btn--active",d&&`pkt-btn--${d}`].filter(Boolean).join(" ");return m.jsxs("button",{...v,className:b,type:u,ref:D,children:[g&&m.jsx(ne,{className:"pkt-btn__icon pkt-btn__spinner",name:"spinner-blue",path:"https://punkt-cdn.oslo.kommune.no/12.4/animations/"}),c!=="label-only"&&m.jsx(ne,{className:"pkt-btn__icon",name:n}),m.jsx("span",{className:"pkt-btn__text",children:e}),c==="icons-right-and-left"&&m.jsx(ne,{className:"pkt-btn__icon",name:r})]})});Cn.displayName="PktButton";/**
|
|
70
70
|
* @license
|
|
71
71
|
* Copyright 2018 Google LLC
|
|
72
72
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -116,7 +116,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
116
116
|
* @license
|
|
117
117
|
* Copyright 2017 Google LLC
|
|
118
118
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
119
|
-
*/let es=class extends Na{};es.directiveName="unsafeSVG",es.resultType=2;const jl=Lr(es);var Oh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Or=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ih(t,n):t,o=e.length-1,u;o>=0;o--)(u=e[o])&&(i=(r?u(t,n,i):u(i))||i);return r&&i&&Oh(t,n,i),i};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.
|
|
119
|
+
*/let es=class extends Na{};es.directiveName="unsafeSVG",es.resultType=2;const jl=Lr(es);var Oh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Or=(e,t,n,r)=>{for(var i=r>1?void 0:r?Ih(t,n):t,o=e.length-1,u;o>=0;o--)(u=e[o])&&(i=(r?u(t,n,i):u(i))||i);return r&&i&&Oh(t,n,i),i};window.pktFetch=window.pktFetch===void 0?fetch:window.pktFetch,window.pktIconPath=window.pktIconPath||"https://punkt-cdn.oslo.kommune.no/12.4/icons/";const Mh=e=>new Promise(t=>setTimeout(t,e)),Pa='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>',ts={},Rh=async(e,t)=>{let n=0;for(;ts[t+e+".svg"]==="fetching"&&(n++,!(n>50));)await Mh(50);return localStorage.getItem(t+e+".svg")?Promise.resolve(localStorage.getItem(t+e+".svg")):typeof window.pktFetch=="function"?(ts[t+e+".svg"]="fetching",Promise.resolve(window.pktFetch(t+e+".svg").then(r=>r.ok?r.text():(console.error("Missing icon: "+t+e+".svg"),Pa)).then(r=>(r!==Pa&&localStorage.setItem(t+e+".svg",r),ts[t+e+".svg"]="fetched",r)))):Promise.resolve(Pa)};let er=class extends jt{constructor(){super(),this.path=window.pktIconPath,this.name="",this.icon=jl(Pa),this._updatedProps=[],this.classList.add("pkt-icon")}willUpdate(t){super.willUpdate(t),t.has("class")&&this.classList.add("my-element")}async attributeChangedCallback(t,n,r){super.attributeChangedCallback(t,n,r),this._updatedProps.length>0?(this.icon=jl(await Rh(this.name||"",this.path).then(i=>i)),this._updatedProps=[]):this._updatedProps.includes(t)||this._updatedProps.push(t)}render(){return J`${this.name&&this.icon}`}};Or([O({type:String,reflect:!1})],er.prototype,"path",2),Or([O({type:String,reflect:!0})],er.prototype,"name",2),Or([O({type:SVGElement})],er.prototype,"icon",2),Or([O({type:Array,noAccessor:!0})],er.prototype,"_updatedProps",2),er=Or([Gt("pkt-icon")],er);function st(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Fn(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const Pl=6048e5,qh=864e5;let Hh={};function La(){return Hh}function Ir(e,t){var n,r,i,o;const u=La(),c=(t==null?void 0:t.weekStartsOn)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.weekStartsOn)??u.weekStartsOn??((o=(i=u.locale)==null?void 0:i.options)==null?void 0:o.weekStartsOn)??0,d=st(e),h=d.getDay(),g=(h<c?7:0)+h-c;return d.setDate(d.getDate()-g),d.setHours(0,0,0,0),d}function ns(e,t){const n=st(e.start),r=st(e.end);let i=+n>+r;const o=i?+n:+r,u=i?r:n;u.setHours(0,0,0,0);let c=1;const d=[];for(;+u<=o;)d.push(st(u)),u.setDate(u.getDate()+c),u.setHours(0,0,0,0);return i?d.reverse():d}function Ll(e,t){var n,r,i,o;const u=st(e),c=u.getFullYear(),d=La(),h=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??d.firstWeekContainsDate??((o=(i=d.locale)==null?void 0:i.options)==null?void 0:o.firstWeekContainsDate)??1,g=Fn(e,0);g.setFullYear(c+1,0,h),g.setHours(0,0,0,0);const v=Ir(g,t),D=Fn(e,0);D.setFullYear(c,0,h),D.setHours(0,0,0,0);const b=Ir(D,t);return u.getTime()>=v.getTime()?c+1:u.getTime()>=b.getTime()?c:c-1}function Uh(e,t){var n,r,i,o;const u=La(),c=(t==null?void 0:t.firstWeekContainsDate)??((r=(n=t==null?void 0:t.locale)==null?void 0:n.options)==null?void 0:r.firstWeekContainsDate)??u.firstWeekContainsDate??((o=(i=u.locale)==null?void 0:i.options)==null?void 0:o.firstWeekContainsDate)??1,d=Ll(e,t),h=Fn(e,0);return h.setFullYear(d,0,c),h.setHours(0,0,0,0),Ir(h,t)}function Ol(e,t){const n=st(e),r=+Ir(n,t)-+Uh(n,t);return Math.round(r/Pl)+1}function Wh(e){let t=st(e).getDay();return t===0&&(t=7),t}const zh="pkt-calendar",Vh={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"}},Gh={"date-selected":{description:"Returns ISO formatted date string"}},An={name:zh,"css-class":"pkt-calendar",props:Vh,events:Gh};var Yh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Ee=(e,t,n,r)=>{for(var i=r>1?void 0:r?Kh(t,n):t,o=e.length-1,u;o>=0;o--)(u=e[o])&&(i=(r?u(t,n,i):u(i))||i);return r&&i&&Yh(t,n,i),i};let xe=class extends jt{constructor(){super(),this.multiple=An.props.multiple.default,this.maxMultiple=An.props.maxMultiple.default,this.range=An.props.range.default,this.weeknumbers=An.props.weeknumbers.default,this.withcontrols=An.props.withcontrols.default,this.selected=[],this.earliest=An.props.earliest.default,this.latest=An.props.latest.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.dayStrings=this.strings.dates.daysShort,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}connectedCallback(){super.connectedCallback()}disconnectedCallback(){this.removeEventListener("keydown",this.handleKeydown),super.disconnectedCallback()}attributeChangedCallback(t,n,r){t==="selected"&&r&&this.convertSelected(),super.attributeChangedCallback(t,n,r)}updated(t){t.has("selected")&&this.convertSelected(),super.updated(t)}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=>new Date(t)),this.range&&this.selected.length===2){const t=ns({start:new Date(this.selected[0]),end:new Date(this.selected[1])});if(this.inRange={},Array.isArray(t)&&t.length){const n={};for(let r=0;r<t.length;r++)n[this.formatISODate(t[r])]=this.isInRange(t[r]);this.inRange=n}}this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched){this.currentmonthtouched=!0;return}this.selected.length&&this.selected[0]!==""?this.currentmonth=new Date(this.selected[this.selected.length-1]):this.currentmonth===null&&(this.currentmonth=new Date),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,n){if(t.preventDefault(),!this.focusedDate)return;const r=new Date(this.focusedDate);let i=new Date(r.setDate(r.getDate()+n));if(i){let o=this.querySelector(`div[data-date="${this.formatISODate(i)}"]`);if(o instanceof HTMLDivElement){if(o.dataset.disabled){let u=new Date(r.setDate(r.getDate()+n)),c=this.querySelector(`div[data-date="${this.formatISODate(u)}"]`);for(;c&&c instanceof HTMLDivElement&&c.dataset.disabled;)u=new Date(u.setDate(u.getDate()+n)),c=this.querySelector(`div[data-date="${this.formatISODate(u)}"]`);o=c}o instanceof HTMLDivElement&&!o.dataset.disabled&&o.focus()}}}render(){return J`
|
|
120
120
|
<div
|
|
121
121
|
class="pkt-calendar ${this.weeknumbers?"pkt-cal-weeknumbers":re}"
|
|
122
122
|
@focusout=${this.closeEvent}
|
|
@@ -233,7 +233,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
233
|
${this.iconName&&J` <pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon> `}
|
|
234
234
|
<span ${ot(this.defaultSlot)}> </span>
|
|
235
235
|
</span>
|
|
236
|
-
`}};Yt([O({type:Boolean,reflect:!0})],Pt.prototype,"closeTag",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"size",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"skin",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"textStyle",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"iconName",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"type",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"ariaLabel",2),Yt([Qn()],Pt.prototype,"_isClosed",2),Pt=Yt([Gt("pkt-tag")],Pt);const df="pkt-card",hf=!0,ff={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"IPktTag[]",description:"Liste av tags på kortet. Tar inn en array med IPktTag-objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"string",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag"}},required:["text"]}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},
|
|
236
|
+
`}};Yt([O({type:Boolean,reflect:!0})],Pt.prototype,"closeTag",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"size",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"skin",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"textStyle",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"iconName",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"type",2),Yt([O({type:String,reflect:!0})],Pt.prototype,"ariaLabel",2),Yt([Qn()],Pt.prototype,"_isClosed",2),Pt=Yt([Gt("pkt-tag")],Pt);const df="pkt-card",hf=!0,ff={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"IPktTag[]",description:"Liste av tags på kortet. Tar inn en array med IPktTag-objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"string",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag"}},required:["text"]}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},image:{type:"object",image:"Image",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",items:{type:"object",properties:{src:{type:"string",description:"Bilde på kortet"},alt:{type:"string",description:"Tekst for aria-label"}},required:["src","alt"]}}},mf={default:{description:"Innholdet i kortet"}},Rl={name:df,"css-class":"pkt-card",isElement:hf,props:ff,slots:mf};var gf=Object.defineProperty,vf=Object.getOwnPropertyDescriptor,Tn=(e,t,n,r)=>{for(var i=r>1?void 0:r?vf(t,n):t,o=e.length-1,u;o>=0;o--)(u=e[o])&&(i=(r?u(t,n,i):u(i))||i);return r&&i&&gf(t,n,i),i};let Kt=class extends jt{constructor(){super(),this.defaultSlot=_t(),this.skin=Rl.props.skin.default,this.direction=Rl.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new tr(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const t={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return J`
|
|
237
237
|
<div class=${Ge(t)}>
|
|
238
238
|
${this.image.src&&J`
|
|
239
239
|
<div class="pkt-card__image">
|
|
@@ -502,7 +502,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
502
502
|
</div>`:re}
|
|
503
503
|
${this.title?J`<div class="pkt-messagebox__title">${this.title}</div>`:re}
|
|
504
504
|
<div class="pkt-messagebox__text" ${ot(this.defaultSlot)}></div>
|
|
505
|
-
</div>`:re}};Nn([O({type:Boolean,reflect:!0})],dn.prototype,"closable",2),Nn([O({type:Boolean,reflect:!0})],dn.prototype,"compact",2),Nn([O({type:String,reflect:!0})],dn.prototype,"title",2),Nn([O({type:String,reflect:!0})],dn.prototype,"skin",2),Nn([O({type:Boolean,reflect:!0})],dn.prototype,"isDisplayed",2),Nn([O({type:Function,reflect:!0})],dn.prototype,"onClose",2),dn=Nn([Gt("pkt-messagebox")],dn);const Um=zi({tagName:"pkt-card",elementClass:Kt,react:M,displayName:"PktCard",events:{}}),Jl=M.forwardRef(({children:e,...t},n)=>m.jsx(Um,{...t,ref:n,children:m.jsx("div",{className:"pkt-contents",children:e})}));Jl.displayName="PktCard";const Ma=M.forwardRef(({id:e,hasTile:t=!1,disabled:n=!1,label:r,labelPosition:i="right",hideLabel:o=!1,checkHelptext:u,hasError:c=!1,isSwitch:d=!1,className:h,...g},v)=>{const D=[h,"pkt-input-check"].filter(Boolean).join(" ");return m.jsx("div",{className:D,children:m.jsxs("div",{className:`pkt-input-check__input ${t?"pkt-input-check__input--tile":""} ${n&&t?"pkt-input-check__input--tile-disabled":""}`,children:[r&&i==="left"&&m.jsxs("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[r,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]}),m.jsx("input",{ref:v,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:d?"switch":"checkbox",id:e,disabled:n,...g}),r&&i==="right"&&m.jsxs("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[r,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});Ma.displayName="PktCheckbox";const Xl=zi({tagName:"pkt-datepicker",elementClass:Ie,react:M,displayName:"PktDatepicker",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Wm=({columnOne:e,columnTwo:t,socialLinks:n,className:r,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var c,d;const u=[r,"pkt-footer"].filter(Boolean).join(" ");return m.jsx("footer",{className:u,"data-mode":"dark",children:m.jsxs("div",{className:"pkt-footer__container",children:[m.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:e.title}),m.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&m.jsx("li",{className:"pkt-footer__text",children:e.text}),(c=e.links)==null?void 0:c.map((h,g)=>m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:`pkt-footer__link ${h.external?"pkt-link--external":""}`,href:h.href,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),h.text]})},`links-${g}`))]})]}),m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:t.title}),m.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&m.jsx("li",{className:"pkt-footer__text",children:t.text}),(d=t.links)==null?void 0:d.map((h,g)=>m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:`pkt-footer__link ${h.external?"pkt-link--external":""}`,href:h.href,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),h.text]})},`links-${g}`))]})]}),m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),m.jsxs("ul",{className:"pkt-footer__list",children:[m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:"pkt-footer__link",href:i,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:"pkt-footer__link",href:o,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),n&&m.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[m.jsx("div",{className:"pkt-footer__social-languages",children:n.filter(h=>h.language).map((h,g)=>m.jsx("div",{className:"pkt-footer__social-language",children:m.jsx("a",{href:h.href,"aria-label":`til ${h.language} versjon av nettsiden`,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:h.language})},`sociallinks-language-${g}`))}),m.jsx("div",{className:"pkt-footer__social-icons",children:n.filter(h=>h.iconName).map((h,g)=>m.jsx(M.Fragment,{children:m.jsx("a",{href:h.href,"aria-label":`til ${h.iconName}`,className:"pkt-footer__social-icon-link",target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:m.jsx(ne,{className:"pkt-footer__social-icon",name:h.iconName})})},`sociallinks-${g}`))})]})]})})},zm=({links:e=[],personvernOgInfoLink:t="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:n="https://www.oslo.kommune.no/tilgjengelighet/",className:r})=>{const i=[r,"pkt-footer-simple"].filter(Boolean).join(" ");return m.jsx("footer",{className:i,"data-mode":"dark",children:m.jsx("div",{className:"pkt-footer-simple__container",children:m.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((o,u)=>m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:`pkt-footer-simple__link ${o.external?" pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},u)),m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:"pkt-footer-simple__link",href:t,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:"pkt-footer-simple__link",href:n,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},Vm=M.forwardRef(({className:e,logoLink:t="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:i=!0,user:o,userMenu:u,representing:c,userOptions:d,userMenuFooter:h,canChangeRepresentation:g=!0,showMenuButton:v=!1,showLogOutButton:D=!1,openMenu:b,logOut:k,changeRepresentation:x,children:C,...T},F)=>{const S=M.useMemo(()=>typeof(o==null?void 0:o.lastLoggedIn)=="string"?o.lastLoggedIn:o!=null&&o.lastLoggedIn?new Date(o.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[o]),[A,_]=M.useState(!1),[$,P]=M.useState(0),[I,j]=M.useState(!1),z=M.useRef(null);M.useEffect(()=>(document&&(document.addEventListener("mouseup",G),window.addEventListener("scroll",L)),()=>{document&&(document.removeEventListener("mouseup",G),window.removeEventListener("scroll",L))}));const K=()=>{j(!I)},G=N=>{z.current&&!z.current.contains(N.target)&&j(!1)},L=()=>{if(i){const N=window.pageYOffset||document.documentElement.scrollTop;if(N<0||Math.abs(N-$)<60)return;_(N>$),P(N)}};return m.jsxs("header",{...T,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Je(e,"pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":A}),ref:F,children:[m.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?m.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:m.jsx(ne,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.3/logos/"})}):m.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:m.jsx(ne,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.3/logos/"})}),m.jsx("span",{className:"pkt-header__logo-service",children:n})]}),m.jsx("nav",{className:"pkt-header__actions",children:m.jsxs("ul",{className:"pkt-header__actions-row",children:[v&&m.jsx("li",{children:m.jsx(Cn,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(o||c)&&m.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${I&&!A?"pkt-header--open-dropdown":""}`,ref:z,children:[m.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":I,onClick:K,children:[m.jsx(ne,{name:"user",className:"pkt-btn__icon"}),m.jsx("span",{className:"pkt-header__user-fullname",children:(c==null?void 0:c.name)||(o==null?void 0:o.name)}),m.jsx("span",{className:"pkt-header__user-shortname",children:(c==null?void 0:c.shortname)||(o==null?void 0:o.shortname)}),m.jsx(ne,{name:"chevron-thin-down",className:"pkt-btn--closed"}),m.jsx(ne,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),m.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[o&&m.jsxs("li",{children:[m.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),m.jsx("div",{className:"pkt-user-menu__name",children:o.name}),o.lastLoggedIn&&m.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",m.jsx("time",{children:S})]})]}),u&&m.jsx("li",{children:m.jsx("ul",{className:"pkt-list",children:u.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsxs("a",{href:N.target,className:"pkt-link",children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userMenu-${H}`))})}),(c||g)&&m.jsxs("li",{children:[c&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),m.jsx("div",{className:"pkt-user-menu__name",children:c.name}),c.orgNumber&&m.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",c.orgNumber]})]}),m.jsx("ul",{className:"pkt-list mt-size-16",children:g&&m.jsx("li",{children:m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:x,children:[m.jsx(ne,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),m.jsx("li",{children:m.jsx("ul",{className:"pkt-list",children:(d||!D)&&m.jsxs(m.Fragment,{children:[d==null?void 0:d.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsxs("a",{href:N.target,className:"pkt-link",children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userOptions-${H}`)),!D&&m.jsx("li",{children:m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:k,children:[m.jsx(ne,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),h&&m.jsx("li",{className:"footer",children:m.jsx("ul",{className:"pkt-list-horizontal bordered",children:h.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsx("a",{href:N.target,className:"pkt-link",children:N.title}):m.jsx("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:N.title})},`userMenuFooter-${H}`))})})]})]}),C&&m.jsx("li",{children:C}),D&&m.jsx("li",{children:m.jsx(Cn,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:k,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Ql=M.forwardRef(({label:e,id:t,children:n,...r},i)=>m.jsxs("div",{className:"pkt-form-group",children:[m.jsx("label",{htmlFor:t,className:"pkt-form-label",children:e}),m.jsx("input",{className:"pkt-form-input",id:t,...r,ref:i}),n]}));Ql.displayName="PktInput";const sr=M.forwardRef(({forId:e,label:t,helptext:n,helptextDropdown:r,helptextDropdownButton:i,counter:o,counterCurrent:u,counterMaxLength:c,optionalTag:d=!1,optionalText:h="Valgfritt",requiredTag:g=!1,requiredText:v="Må fylles ut",hasError:D,errorMessage:b,disabled:k,inline:x,ariaDescribedby:C,useWrapper:T=!0,children:F,className:S,hasFieldset:A=!1},_)=>{const[$,P]=M.useState(!1),I=()=>{P(!$)},j=()=>d?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":g?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",z=d?h:g?v:"",K=k?"pkt-inputwrapper--disabled":"",G=x?"pkt-inputwrapper--inline":"",L=D?"pkt-inputwrapper--error":"",N=!!r&&r!=="",H=i||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',Q=A?"fieldset":N?"div":"label",fe=A?"legend":N?"h2":"span",ee=C||(n?`${e}-helptext`:void 0);return m.jsxs("div",{className:["pkt-inputwrapper",S,K,G,L].join(" "),ref:_,children:[T?m.jsx(m.Fragment,{children:m.jsxs(Q,{htmlFor:A?void 0:e,"aria-describedby":N?void 0:C,className:`pkt-inputwrapper__label${A?" pkt-inputwrapper__fieldset":""}`,children:[m.jsxs(fe,{id:`${e}-label`,className:`${A?" pkt-inputwrapper__legend":""}`,children:[t,z!==""&&m.jsx("span",{className:j(),children:z})]}),n&&m.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:n}),N&&r!==""&&m.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[m.jsx(Cn,{skin:"tertiary",size:"small",variant:"icon-right",iconName:$?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:I,children:m.jsx("span",{dangerouslySetInnerHTML:{__html:H}})}),m.jsx("div",{className:`pkt-inputwrapper__helptext ${$?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:r}),!A&&m.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":ee,children:t})]}),m.jsx(m.Fragment,{children:F}),o&&m.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[u||0,c&&`/${c}`]})]})}):m.jsxs(m.Fragment,{children:[!A&&m.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":ee,id:`${e}-label`,children:t}),F]}),D&&b&&m.jsx("div",{children:m.jsx(Wi,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:b})})]})});sr.displayName="PktInputWrapper";const Gm=zi({tagName:"pkt-link",elementClass:pn,react:M,displayName:"PktLink",events:{onClick:"click"}}),Zl=M.forwardRef(({children:e,...t},n)=>m.jsx(Gm,{...t,ref:n,children:m.jsx("span",{className:"pkt-contents",children:e})}));Zl.displayName="PktLink";const eu=M.forwardRef(({children:e,className:t,iconName:n,openInNewTab:r=!1,skin:i="normal",href:o="#",external:u=!1,title:c,...d},h)=>{const g=[t,"pkt-linkcard",i&&`pkt-linkcard--${i}`].filter(Boolean).join(" ");return m.jsxs("a",{...d,href:o,className:`pkt-linkcard pkt-link ${g}`,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,ref:h,children:[n&&m.jsx(ne,{className:"pkt-link__icon",name:n}),m.jsx("div",{className:`pkt-linkcard__title ${u?"pkt-link pkt-link--external":""}`,children:c}),m.jsx("div",{className:"pkt-linkcard__text",children:e})]})});eu.displayName="PktLinkCard";const tu=M.forwardRef(({className:e,message:t,size:n="medium",inline:r=!1,isLoading:i=!0,variant:o="rainbow",delay:u=0,children:c,...d},h)=>{const g=`pkt-loader pkt-loader--${n}`,[v,D]=M.useState(!(u>0));u>0&&setTimeout(()=>{D(!0)},u);const b=k=>k==="shapes"?"loader":k==="blue"?"spinner-blue":"spinner";return m.jsx("div",{role:"status","aria-live":"polite","aria-busy":i,className:`pkt-loader--${r?"inline":"box"} ${e||""}`,children:i?m.jsx(m.Fragment,{children:v?m.jsxs("div",{className:g,"data-testid":"pkt-loader",ref:h,...d,children:[m.jsx(ne,{name:b(o),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/12.3/animations/",className:`pkt-loader__svg pkt-loader__${o}`}),t&&m.jsx("p",{children:t})]}):null}):c})});tu.displayName="PktLoader";const nu=M.forwardRef(({children:e,className:t,compact:n=!1,closable:r=!1,skin:i="beige",title:o,onClose:u,...c},d)=>{const[h,g]=M.useState(!0),v=()=>{g(!1),u&&u()},D=[t,"pkt-messagebox",i&&`pkt-messagebox--${i}`,n&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return h?m.jsxs("div",{...c,className:D,ref:d,children:[r&&m.jsx("div",{className:"pkt-messagebox__close",children:m.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:v,children:m.jsx(ne,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&m.jsx("div",{className:"pkt-messagebox__title",children:o}),m.jsx("div",{className:"pkt-messagebox__text",children:e})]}):null});nu.displayName="PktMessagebox";/*!
|
|
505
|
+
</div>`:re}};Nn([O({type:Boolean,reflect:!0})],dn.prototype,"closable",2),Nn([O({type:Boolean,reflect:!0})],dn.prototype,"compact",2),Nn([O({type:String,reflect:!0})],dn.prototype,"title",2),Nn([O({type:String,reflect:!0})],dn.prototype,"skin",2),Nn([O({type:Boolean,reflect:!0})],dn.prototype,"isDisplayed",2),Nn([O({type:Function,reflect:!0})],dn.prototype,"onClose",2),dn=Nn([Gt("pkt-messagebox")],dn);const Um=zi({tagName:"pkt-card",elementClass:Kt,react:M,displayName:"PktCard",events:{}}),Jl=M.forwardRef(({children:e,...t},n)=>m.jsx(Um,{...t,ref:n,children:m.jsx("div",{className:"pkt-contents",children:e})}));Jl.displayName="PktCard";const Ma=M.forwardRef(({id:e,hasTile:t=!1,disabled:n=!1,label:r,labelPosition:i="right",hideLabel:o=!1,checkHelptext:u,hasError:c=!1,isSwitch:d=!1,className:h,...g},v)=>{const D=[h,"pkt-input-check"].filter(Boolean).join(" ");return m.jsx("div",{className:D,children:m.jsxs("div",{className:`pkt-input-check__input ${t?"pkt-input-check__input--tile":""} ${n&&t?"pkt-input-check__input--tile-disabled":""}`,children:[r&&i==="left"&&m.jsxs("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[r,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]}),m.jsx("input",{ref:v,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"checkbox",role:d?"switch":"checkbox",id:e,disabled:n,...g}),r&&i==="right"&&m.jsxs("label",{className:`pkt-input-check__input-label ${o?"pkt-sr-only":""}`,htmlFor:e,children:[r,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});Ma.displayName="PktCheckbox";const Xl=zi({tagName:"pkt-datepicker",elementClass:Ie,react:M,displayName:"PktDatepicker",events:{onChange:"change",onInput:"input",onBlur:"blur",onFocus:"focus",onValueChange:"value-change",onToggleHelpText:"toggleHelpText"}}),Wm=({columnOne:e,columnTwo:t,socialLinks:n,className:r,personvernOgInfoLink:i="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:o="https://www.oslo.kommune.no/tilgjengelighet/"})=>{var c,d;const u=[r,"pkt-footer"].filter(Boolean).join(" ");return m.jsx("footer",{className:u,"data-mode":"dark",children:m.jsxs("div",{className:"pkt-footer__container",children:[m.jsxs("div",{className:"pkt-grid pkt-grid--rowgap-size-32 pkt-grid--gap-size-16",children:[m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:e.title}),m.jsxs("ul",{className:"pkt-footer__list",children:[e.text&&m.jsx("li",{className:"pkt-footer__text",children:e.text}),(c=e.links)==null?void 0:c.map((h,g)=>m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:`pkt-footer__link ${h.external?"pkt-link--external":""}`,href:h.href,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),h.text]})},`links-${g}`))]})]}),m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:t.title}),m.jsxs("ul",{className:"pkt-footer__list",children:[t.text&&m.jsx("li",{className:"pkt-footer__text",children:t.text}),(d=t.links)==null?void 0:d.map((h,g)=>m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:`pkt-footer__link ${h.external?"pkt-link--external":""}`,href:h.href,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),h.text]})},`links-${g}`))]})]}),m.jsxs("div",{className:"pkt-footer__column pkt-cell pkt-cell--span12 pkt-cell--span4-laptop-up",children:[m.jsx("h2",{className:"pkt-footer__title",children:"Om nettstedet"}),m.jsxs("ul",{className:"pkt-footer__list",children:[m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:"pkt-footer__link",href:i,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),m.jsx("li",{className:"pkt-footer__list-item",children:m.jsxs("a",{className:"pkt-footer__link",href:o,children:[m.jsx(ne,{className:"pkt-footer__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})]})]}),n&&m.jsxs("div",{className:"pkt-footer__social","aria-label":"standard lenker",children:[m.jsx("div",{className:"pkt-footer__social-languages",children:n.filter(h=>h.language).map((h,g)=>m.jsx("div",{className:"pkt-footer__social-language",children:m.jsx("a",{href:h.href,"aria-label":`til ${h.language} versjon av nettsiden`,target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:h.language})},`sociallinks-language-${g}`))}),m.jsx("div",{className:"pkt-footer__social-icons",children:n.filter(h=>h.iconName).map((h,g)=>m.jsx(M.Fragment,{children:m.jsx("a",{href:h.href,"aria-label":`til ${h.iconName}`,className:"pkt-footer__social-icon-link",target:h.openInNewTab?"_blank":"_self",rel:h.openInNewTab?"noopener noreferrer":void 0,children:m.jsx(ne,{className:"pkt-footer__social-icon",name:h.iconName})})},`sociallinks-${g}`))})]})]})})},zm=({links:e=[],personvernOgInfoLink:t="https://www.oslo.kommune.no/personvern-og-informasjonskapsler/",tilgjengelighetLink:n="https://www.oslo.kommune.no/tilgjengelighet/",className:r})=>{const i=[r,"pkt-footer-simple"].filter(Boolean).join(" ");return m.jsx("footer",{className:i,"data-mode":"dark",children:m.jsx("div",{className:"pkt-footer-simple__container",children:m.jsxs("ul",{className:"pkt-footer-simple__list",children:[e.map((o,u)=>m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:`pkt-footer-simple__link ${o.external?" pkt-link--external":""}`,href:o.href,target:o.openInNewTab?"_blank":"_self",rel:o.openInNewTab?"noopener noreferrer":void 0,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),o.text]})},u)),m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:"pkt-footer-simple__link",href:t,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Personvern og informasjonskapsler"]})}),m.jsx("li",{className:"pkt-footer-simple__list-item",children:m.jsxs("a",{className:"pkt-footer-simple__link",href:n,children:[m.jsx(ne,{className:"pkt-footer-simple__link-icon",name:"chevron-right"}),"Tilgjengelighet"]})})]})})})},Vm=M.forwardRef(({className:e,logoLink:t="https://www.oslo.kommune.no/",serviceName:n,fixed:r=!0,scrollToHide:i=!0,user:o,userMenu:u,representing:c,userOptions:d,userMenuFooter:h,canChangeRepresentation:g=!0,showMenuButton:v=!1,showLogOutButton:D=!1,openMenu:b,logOut:k,changeRepresentation:x,children:C,...T},F)=>{const S=M.useMemo(()=>typeof(o==null?void 0:o.lastLoggedIn)=="string"?o.lastLoggedIn:o!=null&&o.lastLoggedIn?new Date(o.lastLoggedIn).toLocaleString("nb-NO",{year:"numeric",month:"long",day:"numeric"}):"",[o]),[A,_]=M.useState(!1),[$,P]=M.useState(0),[I,j]=M.useState(!1),z=M.useRef(null);M.useEffect(()=>(document&&(document.addEventListener("mouseup",G),window.addEventListener("scroll",L)),()=>{document&&(document.removeEventListener("mouseup",G),window.removeEventListener("scroll",L))}));const K=()=>{j(!I)},G=N=>{z.current&&!z.current.contains(N.target)&&j(!1)},L=()=>{if(i){const N=window.pageYOffset||document.documentElement.scrollTop;if(N<0||Math.abs(N-$)<60)return;_(N>$),P(N)}};return m.jsxs("header",{...T,id:"pkt-header","data-testid":"pkt-header","aria-label":"Topp",className:Je(e,"pkt-header",{"pkt-header--fixed":r,"pkt-header--scroll-to-hide":i,"pkt-header--hidden":A}),ref:F,children:[m.jsxs("div",{className:"pkt-header__logo",children:[typeof t=="string"?m.jsx("a",{"aria-label":"Tilbake til forside",className:"pkt-header__logo-link",href:t,children:m.jsx(ne,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.4/logos/"})}):m.jsx("button",{"aria-label":"Tilbake til forside",className:"pkt-link-button pkt-link pkt-header__logo-link",onClick:t,children:m.jsx(ne,{name:"oslologo",className:"pkt-header__logo-svg","aria-hidden":"true",path:"https://punkt-cdn.oslo.kommune.no/12.4/logos/"})}),m.jsx("span",{className:"pkt-header__logo-service",children:n})]}),m.jsx("nav",{className:"pkt-header__actions",children:m.jsxs("ul",{className:"pkt-header__actions-row",children:[v&&m.jsx("li",{children:m.jsx(Cn,{className:"pkt-header__menu-btn",skin:"secondary",variant:"icon-right",iconName:"menu",onClick:b,children:"Meny"})}),(o||c)&&m.jsxs("li",{"data-testid":"usermenu",className:`pkt-header--has-dropdown ${I&&!A?"pkt-header--open-dropdown":""}`,ref:z,children:[m.jsxs("button",{className:"pkt-header__user-btn pkt-btn pkt-btn--secondary pkt-btn--icons-right-and-left",type:"button",role:"button","aria-controls":"pktUserDropdown","aria-expanded":I,onClick:K,children:[m.jsx(ne,{name:"user",className:"pkt-btn__icon"}),m.jsx("span",{className:"pkt-header__user-fullname",children:(c==null?void 0:c.name)||(o==null?void 0:o.name)}),m.jsx("span",{className:"pkt-header__user-shortname",children:(c==null?void 0:c.shortname)||(o==null?void 0:o.shortname)}),m.jsx(ne,{name:"chevron-thin-down",className:"pkt-btn--closed"}),m.jsx(ne,{name:"chevron-thin-up",className:"pkt-btn--open"})]}),m.jsxs("ul",{id:"pktUserDropdown",className:"pkt-header__dropdown pkt-user-menu",children:[o&&m.jsxs("li",{children:[m.jsx("div",{className:"pkt-user-menu__label",children:"Pålogget som"}),m.jsx("div",{className:"pkt-user-menu__name",children:o.name}),o.lastLoggedIn&&m.jsxs("div",{className:"pkt-user-menu__last-logged-in",children:["Sist pålogget: ",m.jsx("time",{children:S})]})]}),u&&m.jsx("li",{children:m.jsx("ul",{className:"pkt-list",children:u.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsxs("a",{href:N.target,className:"pkt-link",children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userMenu-${H}`))})}),(c||g)&&m.jsxs("li",{children:[c&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"pkt-user-menu__label",children:"Representerer"}),m.jsx("div",{className:"pkt-user-menu__name",children:c.name}),c.orgNumber&&m.jsxs("div",{className:"pkt-user-menu__org-number",children:["Org.nr. ",c.orgNumber]})]}),m.jsx("ul",{className:"pkt-list mt-size-16",children:g&&m.jsx("li",{children:m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:x,children:[m.jsx(ne,{name:"cogwheel",className:"pkt-link__icon"}),"Endre organisasjon"]})})})]}),m.jsx("li",{children:m.jsx("ul",{className:"pkt-list",children:(d||!D)&&m.jsxs(m.Fragment,{children:[d==null?void 0:d.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsxs("a",{href:N.target,className:"pkt-link",children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]}):m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:[N.iconName&&m.jsx(ne,{name:N.iconName,className:"pkt-link__icon"}),N.title]})},`userOptions-${H}`)),!D&&m.jsx("li",{children:m.jsxs("button",{className:"pkt-link-button pkt-link",onClick:k,children:[m.jsx(ne,{name:"exit",className:"pkt-link__icon"}),"Logg ut"]})})]})})}),h&&m.jsx("li",{className:"footer",children:m.jsx("ul",{className:"pkt-list-horizontal bordered",children:h.map((N,H)=>m.jsx("li",{children:typeof N.target=="string"?m.jsx("a",{href:N.target,className:"pkt-link",children:N.title}):m.jsx("button",{className:"pkt-link-button pkt-link",onClick:N.target,children:N.title})},`userMenuFooter-${H}`))})})]})]}),C&&m.jsx("li",{children:C}),D&&m.jsx("li",{children:m.jsx(Cn,{className:"pkt-header__user-btn pkt-header__user-btn-logout",iconName:"exit",role:"button",onClick:k,skin:"secondary",variant:"icon-right",children:"Logg ut"})})]})})]})}),Ql=M.forwardRef(({label:e,id:t,children:n,...r},i)=>m.jsxs("div",{className:"pkt-form-group",children:[m.jsx("label",{htmlFor:t,className:"pkt-form-label",children:e}),m.jsx("input",{className:"pkt-form-input",id:t,...r,ref:i}),n]}));Ql.displayName="PktInput";const sr=M.forwardRef(({forId:e,label:t,helptext:n,helptextDropdown:r,helptextDropdownButton:i,counter:o,counterCurrent:u,counterMaxLength:c,optionalTag:d=!1,optionalText:h="Valgfritt",requiredTag:g=!1,requiredText:v="Må fylles ut",hasError:D,errorMessage:b,disabled:k,inline:x,ariaDescribedby:C,useWrapper:T=!0,children:F,className:S,hasFieldset:A=!1},_)=>{const[$,P]=M.useState(!1),I=()=>{P(!$)},j=()=>d?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--blue-light":g?"pkt-tag pkt-tag--small pkt-tag--thin-text pkt-tag--beige":"",z=d?h:g?v:"",K=k?"pkt-inputwrapper--disabled":"",G=x?"pkt-inputwrapper--inline":"",L=D?"pkt-inputwrapper--error":"",N=!!r&&r!=="",H=i||'Les mer <span class="pkt-sr-only">om inputfeltet</span>',Q=A?"fieldset":N?"div":"label",fe=A?"legend":N?"h2":"span",ee=C||(n?`${e}-helptext`:void 0);return m.jsxs("div",{className:["pkt-inputwrapper",S,K,G,L].join(" "),ref:_,children:[T?m.jsx(m.Fragment,{children:m.jsxs(Q,{htmlFor:A?void 0:e,"aria-describedby":N?void 0:C,className:`pkt-inputwrapper__label${A?" pkt-inputwrapper__fieldset":""}`,children:[m.jsxs(fe,{id:`${e}-label`,className:`${A?" pkt-inputwrapper__legend":""}`,children:[t,z!==""&&m.jsx("span",{className:j(),children:z})]}),n&&m.jsx("div",{className:"pkt-inputwrapper__helptext",id:`${e}-helptext`,children:n}),N&&r!==""&&m.jsxs("div",{className:"pkt-inputwrapper__helptext-expandable",children:[m.jsx(Cn,{skin:"tertiary",size:"small",variant:"icon-right",iconName:$?"chevron-thin-up":"chevron-thin-down",className:"pkt-link pkt-link--icon-right",onClick:I,children:m.jsx("span",{dangerouslySetInnerHTML:{__html:H}})}),m.jsx("div",{className:`pkt-inputwrapper__helptext ${$?"pkt-inputwrapper__helptext-expandable-open":"pkt-inputwrapper__helptext-expandable-closed"}`,children:r}),!A&&m.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":ee,children:t})]}),m.jsx(m.Fragment,{children:F}),o&&m.jsxs("div",{className:"pkt-input__counter","aria-live":"polite","aria-atomic":!0,children:[u||0,c&&`/${c}`]})]})}):m.jsxs(m.Fragment,{children:[!A&&m.jsx("label",{htmlFor:e,className:"pkt-sr-only","aria-describedby":ee,id:`${e}-label`,children:t}),F]}),D&&b&&m.jsx("div",{children:m.jsx(Wi,{skin:"error","aria-live":"assertive",id:`${e}-error`,compact:!0,children:b})})]})});sr.displayName="PktInputWrapper";const Gm=zi({tagName:"pkt-link",elementClass:pn,react:M,displayName:"PktLink",events:{onClick:"click"}}),Zl=M.forwardRef(({children:e,...t},n)=>m.jsx(Gm,{...t,ref:n,children:m.jsx("span",{className:"pkt-contents",children:e})}));Zl.displayName="PktLink";const eu=M.forwardRef(({children:e,className:t,iconName:n,openInNewTab:r=!1,skin:i="normal",href:o="#",external:u=!1,title:c,...d},h)=>{const g=[t,"pkt-linkcard",i&&`pkt-linkcard--${i}`].filter(Boolean).join(" ");return m.jsxs("a",{...d,href:o,className:`pkt-linkcard pkt-link ${g}`,target:r?"_blank":"_self",rel:r?"noopener noreferrer":void 0,ref:h,children:[n&&m.jsx(ne,{className:"pkt-link__icon",name:n}),m.jsx("div",{className:`pkt-linkcard__title ${u?"pkt-link pkt-link--external":""}`,children:c}),m.jsx("div",{className:"pkt-linkcard__text",children:e})]})});eu.displayName="PktLinkCard";const tu=M.forwardRef(({className:e,message:t,size:n="medium",inline:r=!1,isLoading:i=!0,variant:o="rainbow",delay:u=0,children:c,...d},h)=>{const g=`pkt-loader pkt-loader--${n}`,[v,D]=M.useState(!(u>0));u>0&&setTimeout(()=>{D(!0)},u);const b=k=>k==="shapes"?"loader":k==="blue"?"spinner-blue":"spinner";return m.jsx("div",{role:"status","aria-live":"polite","aria-busy":i,className:`pkt-loader--${r?"inline":"box"} ${e||""}`,children:i?m.jsx(m.Fragment,{children:v?m.jsxs("div",{className:g,"data-testid":"pkt-loader",ref:h,...d,children:[m.jsx(ne,{name:b(o),"aria-label":"loading",path:"https://punkt-cdn.oslo.kommune.no/12.4/animations/",className:`pkt-loader__svg pkt-loader__${o}`}),t&&m.jsx("p",{children:t})]}):null}):c})});tu.displayName="PktLoader";const nu=M.forwardRef(({children:e,className:t,compact:n=!1,closable:r=!1,skin:i="beige",title:o,onClose:u,...c},d)=>{const[h,g]=M.useState(!0),v=()=>{g(!1),u&&u()},D=[t,"pkt-messagebox",i&&`pkt-messagebox--${i}`,n&&"pkt-messagebox--compact"].filter(Boolean).join(" ");return h?m.jsxs("div",{...c,className:D,ref:d,children:[r&&m.jsx("div",{className:"pkt-messagebox__close",children:m.jsx("button",{type:"button",className:"pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only",tabIndex:0,"aria-label":"close",onClick:v,children:m.jsx(ne,{name:"close",className:"pkt-btn__icon","aria-hidden":"true"})})}),o&&m.jsx("div",{className:"pkt-messagebox__title",children:o}),m.jsx("div",{className:"pkt-messagebox__text",children:e})]}):null});nu.displayName="PktMessagebox";/*!
|
|
506
506
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
507
507
|
*
|
|
508
508
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
@@ -606,6 +606,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
606
606
|
* @author Lea Verou <https://lea.verou.me>
|
|
607
607
|
* @namespace
|
|
608
608
|
* @public
|
|
609
|
-
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function F(S){return S instanceof d?new d(S.type,F(S.content),S.alias):Array.isArray(S)?S.map(F):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(F){return Object.prototype.toString.call(F).slice(8,-1)},objId:function(F){return F.__id||Object.defineProperty(F,"__id",{value:++o}),F.__id},clone:function F(S,A){A=A||{};var _,$;switch(c.util.type(S)){case"Object":if($=c.util.objId(S),A[$])return A[$];_={},A[$]=_;for(var P in S)S.hasOwnProperty(P)&&(_[P]=F(S[P],A));return _;case"Array":return $=c.util.objId(S),A[$]?A[$]:(_=[],A[$]=_,S.forEach(function(I,j){_[j]=F(I,A)}),_);default:return S}},getLanguage:function(F){for(;F;){var S=i.exec(F.className);if(S)return S[1].toLowerCase();F=F.parentElement}return"none"},setLanguage:function(F,S){F.className=F.className.replace(RegExp(i,"gi"),""),F.classList.add("language-"+S)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(_){var F=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(_.stack)||[])[1];if(F){var S=document.getElementsByTagName("script");for(var A in S)if(S[A].src==F)return S[A]}return null}},isActive:function(F,S,A){for(var _="no-"+S;F;){var $=F.classList;if($.contains(S))return!0;if($.contains(_))return!1;F=F.parentElement}return!!A}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(F,S){var A=c.util.clone(c.languages[F]);for(var _ in S)A[_]=S[_];return A},insertBefore:function(F,S,A,_){_=_||c.languages;var $=_[F],P={};for(var I in $)if($.hasOwnProperty(I)){if(I==S)for(var j in A)A.hasOwnProperty(j)&&(P[j]=A[j]);A.hasOwnProperty(I)||(P[I]=$[I])}var z=_[F];return _[F]=P,c.languages.DFS(c.languages,function(K,G){G===z&&K!=F&&(this[K]=P)}),P},DFS:function F(S,A,_,$){$=$||{};var P=c.util.objId;for(var I in S)if(S.hasOwnProperty(I)){A.call(S,I,S[I],_||I);var j=S[I],z=c.util.type(j);z==="Object"&&!$[P(j)]?($[P(j)]=!0,F(j,A,null,$)):z==="Array"&&!$[P(j)]&&($[P(j)]=!0,F(j,A,I,$))}}},plugins:{},highlightAll:function(F,S){c.highlightAllUnder(document,F,S)},highlightAllUnder:function(F,S,A){var _={callback:A,container:F,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",_),_.elements=Array.prototype.slice.apply(_.container.querySelectorAll(_.selector)),c.hooks.run("before-all-elements-highlight",_);for(var $=0,P;P=_.elements[$++];)c.highlightElement(P,S===!0,_.callback)},highlightElement:function(F,S,A){var _=c.util.getLanguage(F),$=c.languages[_];c.util.setLanguage(F,_);var P=F.parentElement;P&&P.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(P,_);var I=F.textContent,j={element:F,language:_,grammar:$,code:I};function z(G){j.highlightedCode=G,c.hooks.run("before-insert",j),j.element.innerHTML=j.highlightedCode,c.hooks.run("after-highlight",j),c.hooks.run("complete",j),A&&A.call(j.element)}if(c.hooks.run("before-sanity-check",j),P=j.element.parentElement,P&&P.nodeName.toLowerCase()==="pre"&&!P.hasAttribute("tabindex")&&P.setAttribute("tabindex","0"),!j.code){c.hooks.run("complete",j),A&&A.call(j.element);return}if(c.hooks.run("before-highlight",j),!j.grammar){z(c.util.encode(j.code));return}if(S&&r.Worker){var K=new Worker(c.filename);K.onmessage=function(G){z(G.data)},K.postMessage(JSON.stringify({language:j.language,code:j.code,immediateClose:!0}))}else z(c.highlight(j.code,j.grammar,j.language))},highlight:function(F,S,A){var _={code:F,grammar:S,language:A};if(c.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=c.tokenize(_.code,_.grammar),c.hooks.run("after-tokenize",_),d.stringify(c.util.encode(_.tokens),_.language)},tokenize:function(F,S){var A=S.rest;if(A){for(var _ in A)S[_]=A[_];delete S.rest}var $=new v;return D($,$.head,F),g(F,$,S,$.head,0),k($)},hooks:{all:{},add:function(F,S){var A=c.hooks.all;A[F]=A[F]||[],A[F].push(S)},run:function(F,S){var A=c.hooks.all[F];if(!(!A||!A.length))for(var _=0,$;$=A[_++];)$(S)}},Token:d};r.Prism=c;function d(F,S,A,_){this.type=F,this.content=S,this.alias=A,this.length=(_||"").length|0}d.stringify=function F(S,A){if(typeof S=="string")return S;if(Array.isArray(S)){var _="";return S.forEach(function(z){_+=F(z,A)}),_}var $={type:S.type,content:F(S.content,A),tag:"span",classes:["token",S.type],attributes:{},language:A},P=S.alias;P&&(Array.isArray(P)?Array.prototype.push.apply($.classes,P):$.classes.push(P)),c.hooks.run("wrap",$);var I="";for(var j in $.attributes)I+=" "+j+'="'+($.attributes[j]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+I+">"+$.content+"</"+$.tag+">"};function h(F,S,A,_){F.lastIndex=S;var $=F.exec(A);if($&&_&&$[1]){var P=$[1].length;$.index+=P,$[0]=$[0].slice(P)}return $}function g(F,S,A,_,$,P){for(var I in A)if(!(!A.hasOwnProperty(I)||!A[I])){var j=A[I];j=Array.isArray(j)?j:[j];for(var z=0;z<j.length;++z){if(P&&P.cause==I+","+z)return;var K=j[z],G=K.inside,L=!!K.lookbehind,N=!!K.greedy,H=K.alias;if(N&&!K.pattern.global){var Q=K.pattern.toString().match(/[imsuy]*$/)[0];K.pattern=RegExp(K.pattern.source,Q+"g")}for(var fe=K.pattern||K,ee=_.next,ue=$;ee!==S.tail&&!(P&&ue>=P.reach);ue+=ee.value.length,ee=ee.next){var me=ee.value;if(S.length>F.length)return;if(!(me instanceof d)){var ie=1,De;if(N){if(De=h(fe,ue,F,L),!De||De.index>=F.length)break;var Oe=De.index,rt=De.index+De[0].length,Ne=ue;for(Ne+=ee.value.length;Oe>=Ne;)ee=ee.next,Ne+=ee.value.length;if(Ne-=ee.value.length,ue=Ne,ee.value instanceof d)continue;for(var Fe=ee;Fe!==S.tail&&(Ne<rt||typeof Fe.value=="string");Fe=Fe.next)ie++,Ne+=Fe.value.length;ie--,me=F.slice(ue,Ne),De.index-=ue}else if(De=h(fe,0,me,L),!De)continue;var Oe=De.index,de=De[0],ft=me.slice(0,Oe),Ht=me.slice(Oe+de.length),yt=ue+me.length;P&&yt>P.reach&&(P.reach=yt);var bt=ee.prev;ft&&(bt=D(S,bt,ft),ue+=ft.length),b(S,bt,ie);var Dn=new d(I,G?c.tokenize(de,G):de,H,de);if(ee=D(S,bt,Dn),Ht&&D(S,ee,Ht),ie>1){var kt={cause:I+","+z,reach:yt};g(F,S,A,ee.prev,ue,kt),P&&kt.reach>P.reach&&(P.reach=kt.reach)}}}}}}function v(){var F={value:null,prev:null,next:null},S={value:null,prev:F,next:null};F.next=S,this.head=F,this.tail=S,this.length=0}function D(F,S,A){var _=S.next,$={value:A,prev:S,next:_};return S.next=$,_.prev=$,F.length++,$}function b(F,S,A){for(var _=S.next,$=0;$<A&&_!==F.tail;$++)_=_.next;S.next=_,_.prev=S,F.length-=$}function k(F){for(var S=[],A=F.head.next;A!==F.tail;)S.push(A.value),A=A.next;return S}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(F){var S=JSON.parse(F.data),A=S.language,_=S.code,$=S.immediateClose;r.postMessage(c.highlight(_,c.languages[A],A)),$&&r.close()},!1)),c;var x=c.util.currentScript();x&&(c.filename=x.src,x.hasAttribute("data-manual")&&(c.manual=!0));function C(){c.manual||c.highlightAll()}if(!c.manual){var T=document.readyState;T==="loading"||T==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",C):window.requestAnimationFrame?window.requestAnimationFrame(C):window.setTimeout(C,16)}return c}(t);e.exports&&(e.exports=n),typeof un<"u"&&(un.Prism=n)})(Ap);var Cb=Ap.exports,_b=io;io.displayName="markup",io.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function io(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};o["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var xb=so;so.displayName="css",so.aliases=[];function so(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}var Sb=oo;oo.displayName="clike",oo.aliases=[];function oo(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var Eb=lo;lo.displayName="javascript",lo.aliases=["js"];function lo(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var na=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof un=="object"?un:{},Fb=Wb();na.Prism={manual:!0,disableWorkerMessageHandler:!0};var Ab=H0,$b=sb,$p=Cb,Tb=_b,Bb=xb,Nb=Sb,jb=Eb;Fb();var uo={}.hasOwnProperty;function Tp(){}Tp.prototype=$p;var Me=new Tp,Pb=Me;Me.highlight=Ob,Me.register=ra,Me.alias=Lb,Me.registered=Ib,Me.listLanguages=Mb,ra(Tb),ra(Bb),ra(Nb),ra(jb),Me.util.encode=Hb,Me.Token.stringify=Rb;function ra(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");Me.languages[e.displayName]===void 0&&e(Me)}function Lb(e,t){var n=Me.languages,r=e,i,o,u,c;t&&(r={},r[e]=t);for(i in r)for(o=r[i],o=typeof o=="string"?[o]:o,u=o.length,c=-1;++c<u;)n[o[c]]=n[i]}function Ob(e,t){var n=$p.highlight,r;if(typeof e!="string")throw new Error("Expected `string` for `value`, got `"+e+"`");if(Me.util.type(t)==="Object")r=t,t=null;else{if(typeof t!="string")throw new Error("Expected `string` for `name`, got `"+t+"`");if(uo.call(Me.languages,t))r=Me.languages[t];else throw new Error("Unknown language: `"+t+"` is not registered")}return n.call(this,e,r,t)}function Ib(e){if(typeof e!="string")throw new Error("Expected `string` for `language`, got `"+e+"`");return uo.call(Me.languages,e)}function Mb(){var e=Me.languages,t=[],n;for(n in e)uo.call(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function Rb(e,t,n){var r;return typeof e=="string"?{type:"text",value:e}:Me.util.type(e)==="Array"?qb(e,t):(r={type:e.type,content:Me.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias)),Me.hooks.run("wrap",r),Ab(r.tag+"."+r.classes.join("."),Ub(r.attributes),r.content))}function qb(e,t){for(var n=[],r=e.length,i=-1,o;++i<r;)o=e[i],o!==""&&o!==null&&o!==void 0&&n.push(o);for(i=-1,r=n.length;++i<r;)o=n[i],n[i]=Me.Token.stringify(o,t,n);return n}function Hb(e){return e}function Ub(e){var t;for(t in e)e[t]=$b(e[t]);return e}function Wb(){var e="Prism"in na,t=e?na.Prism:void 0;return n;function n(){e?na.Prism=t:delete na.Prism,e=void 0,t=void 0}}const co=_a(Pb);var aa=_y(co,{});aa.registerLanguage=function(e,t){return co.register(t)},aa.alias=function(e,t){return co.alias(e,t)};const Bp={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var zb=po;po.displayName="jsx",po.aliases=[];function po(e){(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,g){return h=h.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,g)}o=u(o).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(c).join(""):""},d=function(h){for(var g=[],v=0;v<h.length;v++){var D=h[v],b=!1;if(typeof D!="string"&&(D.type==="tag"&&D.content[0]&&D.content[0].type==="tag"?D.content[0].content[0].content==="</"?g.length>0&&g[g.length-1].tagName===c(D.content[0].content[1])&&g.pop():D.content[D.content.length-1].content==="/>"||g.push({tagName:c(D.content[0].content[1]),openedBraces:0}):g.length>0&&D.type==="punctuation"&&D.content==="{"?g[g.length-1].openedBraces++:g.length>0&&g[g.length-1].openedBraces>0&&D.type==="punctuation"&&D.content==="}"?g[g.length-1].openedBraces--:b=!0),(b||typeof D=="string")&&g.length>0&&g[g.length-1].openedBraces===0){var k=c(D);v<h.length-1&&(typeof h[v+1]=="string"||h[v+1].type==="plain-text")&&(k+=c(h[v+1]),h.splice(v+1,1)),v>0&&(typeof h[v-1]=="string"||h[v-1].type==="plain-text")&&(k=c(h[v-1])+k,h.splice(v-1,1),v--),h[v]=new t.Token("plain-text",k,null,k)}D.content&&typeof D.content!="string"&&d(D.content)}};t.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||d(h.tokens)})})(e)}const Vb=_a(zb),ho=M.forwardRef(({ariaDescribedby:e,ariaLabelledby:t,children:n,className:r,disabled:i=!1,errorMessage:o,hasError:u,helptext:c,helptextDropdown:d,helptextDropdownButton:h,id:g,inline:v=!1,fullwidth:D=!1,label:b,name:k,optionalTag:x=!1,optionalText:C,requiredTag:T=!1,requiredText:F,...S},A)=>{const _=[r,"pkt-select"].join(" ");return m.jsx(sr,{className:_,forId:g,label:b,helptext:c,helptextDropdown:d,helptextDropdownButton:h,optionalTag:x,optionalText:C,requiredTag:T,requiredText:F,hasError:u,errorMessage:o,disabled:i,inline:v,ariaDescribedby:e,children:m.jsx("select",{ref:A,className:`pkt-input ${D?"pkt-input--fullwidth":""}`,"aria-invalid":u,"aria-errormessage":`${g}-error`,"aria-labelledby":t||`${g}-label`,disabled:i,id:g,name:k||g,...S,children:n})})}),Dr=M.forwardRef(({children:e,className:t,skin:n="blue",textStyle:r="normal-text",size:i="medium",closeTag:o=!1,iconName:u="",type:c="button",ariaLabel:d="close",onClick:h=()=>{}},g)=>{const[v,D]=M.useState(!1),b=T=>{D(!0),h(T)},k=["pkt-tag",i&&`pkt-tag--${i}`,n&&`pkt-tag--${n}`,r&&`pkt-tag--${r}`,t].filter(Boolean).join(" "),x=["pkt-tag","pkt-btn","pkt-btn--tertiary",i&&`pkt-tag--${i}`,n&&`pkt-tag--${n}`,r&&`pkt-tag--${r}`,u&&o?"pkt-btn--icons-right-and-left":null,o&&!u?"pkt-btn--icon-right":null,t].filter(Boolean).join(" "),C=!v;return o&&u?m.jsx(m.Fragment,{children:C&&m.jsxs("button",{className:x,type:c,"aria-label":d,onClick:b,ref:g,children:[m.jsx(ne,{className:"pkt-tag__icon",name:u}),e,m.jsx(ne,{className:"pkt-tag__close-btn",name:"close"})]})}):o?m.jsx(m.Fragment,{children:C&&m.jsxs("button",{className:x,type:c,"aria-label":d,onClick:b,ref:g,children:[m.jsx(ne,{className:"pkt-tag__close-btn",name:"close"}),e]})}):u?m.jsxs("span",{className:k,children:[m.jsx(ne,{className:"pkt-tag__icon",name:u}),e]}):m.jsx("span",{className:k,children:e})});Dr.displayName="PktTag";const Np=M.forwardRef(({arrowNav:e=!0,tabs:t,onTabSelected:n},r)=>{const i=M.useRef([]);M.useEffect(()=>{i.current=i.current.slice(0,t.length)},[t]);const o=(c,d)=>{d.action&&d.action(c),n&&n(c)},u=(c,d)=>{var h,g;e&&(d.code==="ArrowLeft"&&c!==0&&((h=i.current[c-1])==null||h.focus()),d.code==="ArrowRight"&&c<t.length-1&&((g=i.current[c+1])==null||g.focus()),(d.code==="ArrowDown"||d.code==="Space")&&o(c,t[c]))};return m.jsx("div",{className:"pkt-tabs",ref:r,children:m.jsx("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:t.map((c,d)=>m.jsx(M.Fragment,{children:c.href?m.jsxs("a",{"aria-selected":!!c.active,role:e?"tab":void 0,href:c.href,"aria-controls":c.controls,className:`pkt-tabs__link ${c.active?"active":""}`,onKeyUp:h=>u(d,h),onClick:()=>o(d,c),tabIndex:c.active||!e?void 0:-1,ref:h=>{i.current[d]=h},children:[c.icon&&m.jsx(ne,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&m.jsx(Dr,{skin:c.tag.skin,size:"small",children:c.tag.text})]}):m.jsxs("button",{"aria-selected":!!c.active,role:e?"tab":void 0,type:"button","aria-controls":c.controls,className:`pkt-tabs__button pkt-link-button ${c.active?"active":""}`,onKeyUp:h=>u(d,h),onClick:()=>o(d,c),tabIndex:c.active||!e?void 0:-1,ref:h=>{i.current[d]=h},children:[c.icon&&m.jsx(ne,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&m.jsx(Dr,{skin:c.tag.skin,size:"small",children:c.tag.text})]},"b-"+d)},d))})})}),fo=M.forwardRef(({id:e,ariaDescribedby:t,ariaLabelledby:n,autocomplete:r="off",counter:i,counterMaxLength:o,className:u,disabled:c=!1,errorMessage:d,hasError:h=!1,helptext:g,helptextDropdown:v,helptextDropdownButton:D,iconNameRight:b,inline:k=!1,fullwidth:x=!1,label:C,name:T,optionalTag:F=!1,optionalText:S,requiredTag:A=!1,requiredText:_,placeholder:$,prefix:P,suffix:I,type:j="text",useWrapper:z=!0,omitSearchIcon:K=!1,value:G,onChange:L,...N},H)=>{const Q=[u,"pkt-textinput"].join(" "),fe=n||`${e}-label`,ee=j==="search"&&!b&&!K;M.useRef(null);const[ue,me]=M.useState(0),ie=De=>{var rt,Ne;if(i&&me(((Ne=(rt=De.currentTarget)==null?void 0:rt.value)==null?void 0:Ne.length)||0),L)return L(De)};return m.jsx(sr,{ariaDescribedby:t,className:Q,disabled:c,errorMessage:d,forId:e,hasError:h,helptext:g,helptextDropdown:v,helptextDropdownButton:D,inline:k,label:C,optionalTag:F,optionalText:S,requiredTag:A,requiredText:_,useWrapper:z,counter:i,counterCurrent:ue,counterMaxLength:o,children:m.jsxs("div",{className:"pkt-input__container",children:[P&&m.jsx("div",{className:"pkt-input-prefix",children:P}),m.jsx("input",{ref:H,className:`pkt-input ${x?"pkt-input--fullwidth":""} ${o&&ue>o?"pkt-input--counter-error":""}`,type:j,name:T||e,id:e,placeholder:$,autoComplete:r,value:G,disabled:c,"aria-invalid":h,"aria-errormessage":`${e}-error`,"aria-labelledby":fe,...N,onChange:ie}),I&&m.jsxs("p",{className:"pkt-input-suffix",children:[I,b&&m.jsx(ne,{className:"pkt-input-suffix-icon",name:b}),ee&&m.jsx(ne,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!I&&b&&m.jsx(ne,{className:"pkt-input-icon",name:b}),!I&&ee&&m.jsx(ne,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})}),Gb=[{id:"24h",fn:"24h.svg",cat:"services"},{id:"active-person",fn:"active-person.svg",cat:"people-and-health"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"alert-circle",fn:"alert-circle.svg",cat:"ui"},{id:"alert-error",fn:"alert-error.svg",cat:"ui"},{id:"alert-information",fn:"alert-information.svg",cat:"ui"},{id:"alert-success",fn:"alert-success.svg",cat:"ui"},{id:"alert-warning",fn:"alert-warning.svg",cat:"ui"},{id:"apple",fn:"apple.svg",cat:"ui"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow",fn:"arrow.svg",cat:"arrows"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"balloons",fn:"balloons.svg",cat:"ui"},{id:"books",fn:"books.svg",cat:"services"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"sign"},{id:"brain-heart",fn:"brain-heart.svg",cat:"people-and-health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"people-and-health"},{id:"briefcase",fn:"briefcase.svg",cat:"sign"},{id:"bullseye",fn:"bullseye.svg",cat:"ui"},{id:"bus",fn:"bus.svg",cat:"services"},{id:"cafe",fn:"cafe.svg",cat:"sign"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera",fn:"camera.svg",cat:"ui"},{id:"car",fn:"car.svg",cat:"sign"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"ui"},{id:"character-information",fn:"character-information.svg",cat:"ui"},{id:"care-room",fn:"care-room.svg",cat:"sign"},{id:"check-big",fn:"check-big.svg",cat:"ui"},{id:"check-circle",fn:"check-circle.svg",cat:"ui"},{id:"check-medium",fn:"check-medium.svg",cat:"ui"},{id:"check",fn:"check.svg",cat:"ui"},{id:"chevron-down",fn:"chevron-down.svg",cat:"arrows"},{id:"chevron-left",fn:"chevron-left.svg",cat:"arrows"},{id:"chevron-right",fn:"chevron-right.svg",cat:"arrows"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"arrows"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"arrows"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"arrows"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"arrows"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"arrows"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"ui"},{id:"code",fn:"code.svg",cat:"ui"},{id:"coffee",fn:"coffee.svg",cat:"sign"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"services"},{id:"computer",fn:"computer.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"services"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"data",fn:"data.svg",cat:"ui"},{id:"defibrillators",fn:"defibrillators.svg",cat:"sign"},{id:"district",fn:"district.svg",cat:"ui"},{id:"document-code",fn:"document-code.svg",cat:"ui"},{id:"document-pdf",fn:"document-pdf.svg",cat:"ui"},{id:"document-plain",fn:"document-plain.svg",cat:"ui"},{id:"document-table",fn:"document-table.svg",cat:"ui"},{id:"document-text",fn:"document-text.svg",cat:"ui"},{id:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"sign"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"people-and-health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"email",fn:"email.svg",cat:"ui"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"ui"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"ui"},{id:"exit",fn:"exit.svg",cat:"ui"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"ui"},{id:"feedback",fn:"feedback.svg",cat:"ui"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-emblem",fn:"fire-emblem.svg",cat:"services"},{id:"fire-safety",fn:"fire-safety.svg",cat:"people-and-health"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"game-console",fn:"game-console.svg",cat:"ui"},{id:"github",fn:"github.svg",cat:"social"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"sign"},{id:"graph",fn:"graph.svg",cat:"ui"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"wheelchair",fn:"wheelchair.svg",cat:"sign"},{id:"hands-globe",fn:"hands-globe.svg",cat:"people-and-health"},{id:"heart-hand",fn:"heart-hand.svg",cat:"people-and-health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"services"},{id:"heart",fn:"heart.svg",cat:"ui"},{id:"holding-hands",fn:"holding-hands.svg",cat:"people-and-health"},{id:"home",fn:"home.svg",cat:"ui"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"services"},{id:"information",fn:"information.svg",cat:"ui"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"ui"},{id:"language",fn:"language.svg",cat:"ui"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"ui"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"people-and-health"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"ui"},{id:"location-pin",fn:"location-pin.svg",cat:"ui"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"ui"},{id:"menu",fn:"menu.svg",cat:"ui"},{id:"message",fn:"message.svg",cat:"ui"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"plusminus"},{id:"minus-circle",fn:"minus-circle.svg",cat:"plusminus"},{id:"minus-sign",fn:"minus-sign.svg",cat:"plusminus"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"ui"},{id:"music-notes",fn:"music-notes.svg",cat:"ui"},{id:"new-window-small",fn:"new-window-small.svg",cat:"ui"},{id:"new-window",fn:"new-window.svg",cat:"ui"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"ui"},{id:"organization",fn:"organization.svg",cat:"ui"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"ui"},{id:"palette",fn:"palette.svg",cat:"ui"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"services"},{id:"partner-workout",fn:"partner-workout.svg",cat:"people-and-health"},{id:"picture",fn:"picture.svg",cat:"ui"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"plusminus"},{id:"plus-circle",fn:"plus-circle.svg",cat:"plusminus"},{id:"plus-sign",fn:"plus-sign.svg",cat:"plusminus"},{id:"pride-heart",fn:"pride-heart.svg",cat:"people-and-health"},{id:"print",fn:"print.svg",cat:"ui"},{id:"privacy",fn:"privacy.svg",cat:"ui"},{id:"punkt-circle-blue",fn:"punkt-circle-blue.svg",cat:"social"},{id:"qr-code",fn:"qr-code.svg",cat:"ui"},{id:"question",fn:"question.svg",cat:"ui"},{id:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"services"},{id:"restaurant",fn:"restaurant.svg",cat:"sign"},{id:"ruler",fn:"ruler.svg",cat:"ui"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"save",fn:"save.svg",cat:"ui"},{id:"share-outline",fn:"share-outline.svg",cat:"ui"},{id:"share",fn:"share.svg",cat:"ui"},{id:"slack",fn:"slack.svg",cat:"social"},{id:"smiley-neutral",fn:"smiley-neutral.svg",cat:"feedback"},{id:"smiley-sad",fn:"smiley-sad.svg",cat:"feedback"},{id:"smiley-smile",fn:"smiley-smile.svg",cat:"feedback"},{id:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"ui"},{id:"sound-on",fn:"sound-on.svg",cat:"ui"},{id:"sparkles",fn:"sparkles.svg",cat:"ui"},{id:"svg-logo",fn:"svg.svg",cat:"social"},{id:"swingset",fn:"swingset.svg",cat:"services"},{id:"table",fn:"table.svg",cat:"ui"},{id:"target",fn:"target.svg",cat:"ui"},{id:"tickets",fn:"tickets.svg",cat:"sign"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"people-and-health"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"people-and-health"},{id:"user",fn:"user.svg",cat:"ui"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"wardrobe",fn:"wardrobe.svg",cat:"sign"},{id:"water-faucet",fn:"water-faucet.svg",cat:"services"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"people-and-health"},{id:"wifi",fn:"wifi.svg",cat:"sign"},{id:"workplace",fn:"workplace.svg",cat:"social"}],li=({className:e,compact:t=!1,skin:n="basic",responsiveView:r=!0,children:i})=>m.jsx("table",{"data-testid":"pkt-table",className:Je(e,"pkt-table",{"pkt-table--responsive":r,"pkt-table--compact":t,"pkt-table--basic":n==="basic","pkt-table--zebra-blue":n==="zebra-blue"}),role:"table",children:i}),ui=({className:e,children:t})=>m.jsx("thead",{className:Je(e,"pkt-table__header",{}),role:"rowgroup",children:t}),ci=({children:e,className:t})=>m.jsx("tbody",{className:Je(t,"pkt-table__body",{}),role:"rowgroup",children:e}),Wn=({className:e,children:t})=>m.jsx("tr",{className:Je(e,"pkt-table__row",{}),role:"row",children:t}),Tt=({className:e,children:t})=>m.jsx("th",{className:Je(e,"pkt-table__header-cell",{}),role:"columnheader",children:t}),Dt=({children:e,className:t,dataLabel:n})=>m.jsx("td",{className:Je(t,"pkt-table__data-cell",{}),"data-label":n,role:"cell","data-testid":"pkt-table__data-cell",children:e}),Yb=({specs:e})=>{const t=r=>Array.isArray(r)?r.join(`
|
|
609
|
+
*/var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,u={},c={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function F(S){return S instanceof d?new d(S.type,F(S.content),S.alias):Array.isArray(S)?S.map(F):S.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(F){return Object.prototype.toString.call(F).slice(8,-1)},objId:function(F){return F.__id||Object.defineProperty(F,"__id",{value:++o}),F.__id},clone:function F(S,A){A=A||{};var _,$;switch(c.util.type(S)){case"Object":if($=c.util.objId(S),A[$])return A[$];_={},A[$]=_;for(var P in S)S.hasOwnProperty(P)&&(_[P]=F(S[P],A));return _;case"Array":return $=c.util.objId(S),A[$]?A[$]:(_=[],A[$]=_,S.forEach(function(I,j){_[j]=F(I,A)}),_);default:return S}},getLanguage:function(F){for(;F;){var S=i.exec(F.className);if(S)return S[1].toLowerCase();F=F.parentElement}return"none"},setLanguage:function(F,S){F.className=F.className.replace(RegExp(i,"gi"),""),F.classList.add("language-"+S)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(_){var F=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(_.stack)||[])[1];if(F){var S=document.getElementsByTagName("script");for(var A in S)if(S[A].src==F)return S[A]}return null}},isActive:function(F,S,A){for(var _="no-"+S;F;){var $=F.classList;if($.contains(S))return!0;if($.contains(_))return!1;F=F.parentElement}return!!A}},languages:{plain:u,plaintext:u,text:u,txt:u,extend:function(F,S){var A=c.util.clone(c.languages[F]);for(var _ in S)A[_]=S[_];return A},insertBefore:function(F,S,A,_){_=_||c.languages;var $=_[F],P={};for(var I in $)if($.hasOwnProperty(I)){if(I==S)for(var j in A)A.hasOwnProperty(j)&&(P[j]=A[j]);A.hasOwnProperty(I)||(P[I]=$[I])}var z=_[F];return _[F]=P,c.languages.DFS(c.languages,function(K,G){G===z&&K!=F&&(this[K]=P)}),P},DFS:function F(S,A,_,$){$=$||{};var P=c.util.objId;for(var I in S)if(S.hasOwnProperty(I)){A.call(S,I,S[I],_||I);var j=S[I],z=c.util.type(j);z==="Object"&&!$[P(j)]?($[P(j)]=!0,F(j,A,null,$)):z==="Array"&&!$[P(j)]&&($[P(j)]=!0,F(j,A,I,$))}}},plugins:{},highlightAll:function(F,S){c.highlightAllUnder(document,F,S)},highlightAllUnder:function(F,S,A){var _={callback:A,container:F,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};c.hooks.run("before-highlightall",_),_.elements=Array.prototype.slice.apply(_.container.querySelectorAll(_.selector)),c.hooks.run("before-all-elements-highlight",_);for(var $=0,P;P=_.elements[$++];)c.highlightElement(P,S===!0,_.callback)},highlightElement:function(F,S,A){var _=c.util.getLanguage(F),$=c.languages[_];c.util.setLanguage(F,_);var P=F.parentElement;P&&P.nodeName.toLowerCase()==="pre"&&c.util.setLanguage(P,_);var I=F.textContent,j={element:F,language:_,grammar:$,code:I};function z(G){j.highlightedCode=G,c.hooks.run("before-insert",j),j.element.innerHTML=j.highlightedCode,c.hooks.run("after-highlight",j),c.hooks.run("complete",j),A&&A.call(j.element)}if(c.hooks.run("before-sanity-check",j),P=j.element.parentElement,P&&P.nodeName.toLowerCase()==="pre"&&!P.hasAttribute("tabindex")&&P.setAttribute("tabindex","0"),!j.code){c.hooks.run("complete",j),A&&A.call(j.element);return}if(c.hooks.run("before-highlight",j),!j.grammar){z(c.util.encode(j.code));return}if(S&&r.Worker){var K=new Worker(c.filename);K.onmessage=function(G){z(G.data)},K.postMessage(JSON.stringify({language:j.language,code:j.code,immediateClose:!0}))}else z(c.highlight(j.code,j.grammar,j.language))},highlight:function(F,S,A){var _={code:F,grammar:S,language:A};if(c.hooks.run("before-tokenize",_),!_.grammar)throw new Error('The language "'+_.language+'" has no grammar.');return _.tokens=c.tokenize(_.code,_.grammar),c.hooks.run("after-tokenize",_),d.stringify(c.util.encode(_.tokens),_.language)},tokenize:function(F,S){var A=S.rest;if(A){for(var _ in A)S[_]=A[_];delete S.rest}var $=new v;return D($,$.head,F),g(F,$,S,$.head,0),k($)},hooks:{all:{},add:function(F,S){var A=c.hooks.all;A[F]=A[F]||[],A[F].push(S)},run:function(F,S){var A=c.hooks.all[F];if(!(!A||!A.length))for(var _=0,$;$=A[_++];)$(S)}},Token:d};r.Prism=c;function d(F,S,A,_){this.type=F,this.content=S,this.alias=A,this.length=(_||"").length|0}d.stringify=function F(S,A){if(typeof S=="string")return S;if(Array.isArray(S)){var _="";return S.forEach(function(z){_+=F(z,A)}),_}var $={type:S.type,content:F(S.content,A),tag:"span",classes:["token",S.type],attributes:{},language:A},P=S.alias;P&&(Array.isArray(P)?Array.prototype.push.apply($.classes,P):$.classes.push(P)),c.hooks.run("wrap",$);var I="";for(var j in $.attributes)I+=" "+j+'="'+($.attributes[j]||"").replace(/"/g,""")+'"';return"<"+$.tag+' class="'+$.classes.join(" ")+'"'+I+">"+$.content+"</"+$.tag+">"};function h(F,S,A,_){F.lastIndex=S;var $=F.exec(A);if($&&_&&$[1]){var P=$[1].length;$.index+=P,$[0]=$[0].slice(P)}return $}function g(F,S,A,_,$,P){for(var I in A)if(!(!A.hasOwnProperty(I)||!A[I])){var j=A[I];j=Array.isArray(j)?j:[j];for(var z=0;z<j.length;++z){if(P&&P.cause==I+","+z)return;var K=j[z],G=K.inside,L=!!K.lookbehind,N=!!K.greedy,H=K.alias;if(N&&!K.pattern.global){var Q=K.pattern.toString().match(/[imsuy]*$/)[0];K.pattern=RegExp(K.pattern.source,Q+"g")}for(var fe=K.pattern||K,ee=_.next,ue=$;ee!==S.tail&&!(P&&ue>=P.reach);ue+=ee.value.length,ee=ee.next){var me=ee.value;if(S.length>F.length)return;if(!(me instanceof d)){var ie=1,De;if(N){if(De=h(fe,ue,F,L),!De||De.index>=F.length)break;var Oe=De.index,rt=De.index+De[0].length,Ne=ue;for(Ne+=ee.value.length;Oe>=Ne;)ee=ee.next,Ne+=ee.value.length;if(Ne-=ee.value.length,ue=Ne,ee.value instanceof d)continue;for(var Fe=ee;Fe!==S.tail&&(Ne<rt||typeof Fe.value=="string");Fe=Fe.next)ie++,Ne+=Fe.value.length;ie--,me=F.slice(ue,Ne),De.index-=ue}else if(De=h(fe,0,me,L),!De)continue;var Oe=De.index,de=De[0],ft=me.slice(0,Oe),Ht=me.slice(Oe+de.length),yt=ue+me.length;P&&yt>P.reach&&(P.reach=yt);var bt=ee.prev;ft&&(bt=D(S,bt,ft),ue+=ft.length),b(S,bt,ie);var Dn=new d(I,G?c.tokenize(de,G):de,H,de);if(ee=D(S,bt,Dn),Ht&&D(S,ee,Ht),ie>1){var kt={cause:I+","+z,reach:yt};g(F,S,A,ee.prev,ue,kt),P&&kt.reach>P.reach&&(P.reach=kt.reach)}}}}}}function v(){var F={value:null,prev:null,next:null},S={value:null,prev:F,next:null};F.next=S,this.head=F,this.tail=S,this.length=0}function D(F,S,A){var _=S.next,$={value:A,prev:S,next:_};return S.next=$,_.prev=$,F.length++,$}function b(F,S,A){for(var _=S.next,$=0;$<A&&_!==F.tail;$++)_=_.next;S.next=_,_.prev=S,F.length-=$}function k(F){for(var S=[],A=F.head.next;A!==F.tail;)S.push(A.value),A=A.next;return S}if(!r.document)return r.addEventListener&&(c.disableWorkerMessageHandler||r.addEventListener("message",function(F){var S=JSON.parse(F.data),A=S.language,_=S.code,$=S.immediateClose;r.postMessage(c.highlight(_,c.languages[A],A)),$&&r.close()},!1)),c;var x=c.util.currentScript();x&&(c.filename=x.src,x.hasAttribute("data-manual")&&(c.manual=!0));function C(){c.manual||c.highlightAll()}if(!c.manual){var T=document.readyState;T==="loading"||T==="interactive"&&x&&x.defer?document.addEventListener("DOMContentLoaded",C):window.requestAnimationFrame?window.requestAnimationFrame(C):window.setTimeout(C,16)}return c}(t);e.exports&&(e.exports=n),typeof un<"u"&&(un.Prism=n)})(Ap);var Cb=Ap.exports,_b=io;io.displayName="markup",io.aliases=["html","mathml","svg","xml","ssml","atom","rss"];function io(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};o["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var xb=so;so.displayName="css",so.aliases=[];function so(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined("style","css"),r.tag.addAttribute("style","css"))})(e)}var Sb=oo;oo.displayName="clike",oo.aliases=[];function oo(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}var Eb=lo;lo.displayName="javascript",lo.aliases=["js"];function lo(e){e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}var na=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof un=="object"?un:{},Fb=Wb();na.Prism={manual:!0,disableWorkerMessageHandler:!0};var Ab=H0,$b=sb,$p=Cb,Tb=_b,Bb=xb,Nb=Sb,jb=Eb;Fb();var uo={}.hasOwnProperty;function Tp(){}Tp.prototype=$p;var Me=new Tp,Pb=Me;Me.highlight=Ob,Me.register=ra,Me.alias=Lb,Me.registered=Ib,Me.listLanguages=Mb,ra(Tb),ra(Bb),ra(Nb),ra(jb),Me.util.encode=Hb,Me.Token.stringify=Rb;function ra(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `grammar`, got `"+e+"`");Me.languages[e.displayName]===void 0&&e(Me)}function Lb(e,t){var n=Me.languages,r=e,i,o,u,c;t&&(r={},r[e]=t);for(i in r)for(o=r[i],o=typeof o=="string"?[o]:o,u=o.length,c=-1;++c<u;)n[o[c]]=n[i]}function Ob(e,t){var n=$p.highlight,r;if(typeof e!="string")throw new Error("Expected `string` for `value`, got `"+e+"`");if(Me.util.type(t)==="Object")r=t,t=null;else{if(typeof t!="string")throw new Error("Expected `string` for `name`, got `"+t+"`");if(uo.call(Me.languages,t))r=Me.languages[t];else throw new Error("Unknown language: `"+t+"` is not registered")}return n.call(this,e,r,t)}function Ib(e){if(typeof e!="string")throw new Error("Expected `string` for `language`, got `"+e+"`");return uo.call(Me.languages,e)}function Mb(){var e=Me.languages,t=[],n;for(n in e)uo.call(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function Rb(e,t,n){var r;return typeof e=="string"?{type:"text",value:e}:Me.util.type(e)==="Array"?qb(e,t):(r={type:e.type,content:Me.Token.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias)),Me.hooks.run("wrap",r),Ab(r.tag+"."+r.classes.join("."),Ub(r.attributes),r.content))}function qb(e,t){for(var n=[],r=e.length,i=-1,o;++i<r;)o=e[i],o!==""&&o!==null&&o!==void 0&&n.push(o);for(i=-1,r=n.length;++i<r;)o=n[i],n[i]=Me.Token.stringify(o,t,n);return n}function Hb(e){return e}function Ub(e){var t;for(t in e)e[t]=$b(e[t]);return e}function Wb(){var e="Prism"in na,t=e?na.Prism:void 0;return n;function n(){e?na.Prism=t:delete na.Prism,e=void 0,t=void 0}}const co=_a(Pb);var aa=_y(co,{});aa.registerLanguage=function(e,t){return co.register(t)},aa.alias=function(e,t){return co.alias(e,t)};const Bp={'code[class*="language-"]':{color:"black",background:"none",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{color:"black",background:"#f5f2f0",textShadow:"0 1px white",fontFamily:"Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",fontSize:"1em",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",wordWrap:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto"},'pre[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::-moz-selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'pre[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"]::selection':{textShadow:"none",background:"#b3d4fc"},'code[class*="language-"] ::selection':{textShadow:"none",background:"#b3d4fc"},':not(pre) > code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}};var zb=po;po.displayName="jsx",po.aliases=[];function po(e){(function(t){var n=t.util.clone(t.languages.javascript),r=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,i=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,g){return h=h.replace(/<S>/g,function(){return r}).replace(/<BRACES>/g,function(){return i}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,g)}o=u(o).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(c).join(""):""},d=function(h){for(var g=[],v=0;v<h.length;v++){var D=h[v],b=!1;if(typeof D!="string"&&(D.type==="tag"&&D.content[0]&&D.content[0].type==="tag"?D.content[0].content[0].content==="</"?g.length>0&&g[g.length-1].tagName===c(D.content[0].content[1])&&g.pop():D.content[D.content.length-1].content==="/>"||g.push({tagName:c(D.content[0].content[1]),openedBraces:0}):g.length>0&&D.type==="punctuation"&&D.content==="{"?g[g.length-1].openedBraces++:g.length>0&&g[g.length-1].openedBraces>0&&D.type==="punctuation"&&D.content==="}"?g[g.length-1].openedBraces--:b=!0),(b||typeof D=="string")&&g.length>0&&g[g.length-1].openedBraces===0){var k=c(D);v<h.length-1&&(typeof h[v+1]=="string"||h[v+1].type==="plain-text")&&(k+=c(h[v+1]),h.splice(v+1,1)),v>0&&(typeof h[v-1]=="string"||h[v-1].type==="plain-text")&&(k=c(h[v-1])+k,h.splice(v-1,1),v--),h[v]=new t.Token("plain-text",k,null,k)}D.content&&typeof D.content!="string"&&d(D.content)}};t.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||d(h.tokens)})})(e)}const Vb=_a(zb),ho=M.forwardRef(({ariaDescribedby:e,ariaLabelledby:t,children:n,className:r,disabled:i=!1,errorMessage:o,hasError:u,helptext:c,helptextDropdown:d,helptextDropdownButton:h,id:g,inline:v=!1,fullwidth:D=!1,label:b,name:k,optionalTag:x=!1,optionalText:C,requiredTag:T=!1,requiredText:F,...S},A)=>{const _=[r,"pkt-select"].join(" ");return m.jsx(sr,{className:_,forId:g,label:b,helptext:c,helptextDropdown:d,helptextDropdownButton:h,optionalTag:x,optionalText:C,requiredTag:T,requiredText:F,hasError:u,errorMessage:o,disabled:i,inline:v,ariaDescribedby:e,children:m.jsx("select",{ref:A,className:`pkt-input ${D?"pkt-input--fullwidth":""}`,"aria-invalid":u,"aria-errormessage":`${g}-error`,"aria-labelledby":t||`${g}-label`,disabled:i,id:g,name:k||g,...S,children:n})})}),Dr=M.forwardRef(({children:e,className:t,skin:n="blue",textStyle:r="normal-text",size:i="medium",closeTag:o=!1,iconName:u="",type:c="button",ariaLabel:d="close",onClick:h=()=>{}},g)=>{const[v,D]=M.useState(!1),b=T=>{D(!0),h(T)},k=["pkt-tag",i&&`pkt-tag--${i}`,n&&`pkt-tag--${n}`,r&&`pkt-tag--${r}`,t].filter(Boolean).join(" "),x=["pkt-tag","pkt-btn","pkt-btn--tertiary",i&&`pkt-tag--${i}`,n&&`pkt-tag--${n}`,r&&`pkt-tag--${r}`,u&&o?"pkt-btn--icons-right-and-left":null,o&&!u?"pkt-btn--icon-right":null,t].filter(Boolean).join(" "),C=!v;return o&&u?m.jsx(m.Fragment,{children:C&&m.jsxs("button",{className:x,type:c,"aria-label":d,onClick:b,ref:g,children:[m.jsx(ne,{className:"pkt-tag__icon",name:u}),e,m.jsx(ne,{className:"pkt-tag__close-btn",name:"close"})]})}):o?m.jsx(m.Fragment,{children:C&&m.jsxs("button",{className:x,type:c,"aria-label":d,onClick:b,ref:g,children:[m.jsx(ne,{className:"pkt-tag__close-btn",name:"close"}),e]})}):u?m.jsxs("span",{className:k,children:[m.jsx(ne,{className:"pkt-tag__icon",name:u}),e]}):m.jsx("span",{className:k,children:e})});Dr.displayName="PktTag";const Np=M.forwardRef(({arrowNav:e=!0,tabs:t,onTabSelected:n},r)=>{const i=M.useRef([]);M.useEffect(()=>{i.current=i.current.slice(0,t.length)},[t]);const o=(c,d)=>{d.action&&d.action(c),n&&n(c)},u=(c,d)=>{var h,g;e&&(d.code==="ArrowLeft"&&c!==0&&((h=i.current[c-1])==null||h.focus()),d.code==="ArrowRight"&&c<t.length-1&&((g=i.current[c+1])==null||g.focus()),(d.code==="ArrowDown"||d.code==="Space")&&o(c,t[c]))};return m.jsx("div",{className:"pkt-tabs",ref:r,children:m.jsx("div",{className:"pkt-tabs__list",role:e?"tablist":"navigation",children:t.map((c,d)=>m.jsx(M.Fragment,{children:c.href?m.jsxs("a",{"aria-selected":!!c.active,role:e?"tab":void 0,href:c.href,"aria-controls":c.controls,className:`pkt-tabs__link ${c.active?"active":""}`,onKeyUp:h=>u(d,h),onClick:()=>o(d,c),tabIndex:c.active||!e?void 0:-1,ref:h=>{i.current[d]=h},children:[c.icon&&m.jsx(ne,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&m.jsx(Dr,{skin:c.tag.skin,size:"small",children:c.tag.text})]}):m.jsxs("button",{"aria-selected":!!c.active,role:e?"tab":void 0,type:"button","aria-controls":c.controls,className:`pkt-tabs__button pkt-link-button ${c.active?"active":""}`,onKeyUp:h=>u(d,h),onClick:()=>o(d,c),tabIndex:c.active||!e?void 0:-1,ref:h=>{i.current[d]=h},children:[c.icon&&m.jsx(ne,{name:c.icon,className:"pkt-icon--small"}),c.text,c.tag&&m.jsx(Dr,{skin:c.tag.skin,size:"small",children:c.tag.text})]},"b-"+d)},d))})})}),fo=M.forwardRef(({id:e,ariaDescribedby:t,ariaLabelledby:n,autocomplete:r="off",counter:i,counterMaxLength:o,className:u,disabled:c=!1,errorMessage:d,hasError:h=!1,helptext:g,helptextDropdown:v,helptextDropdownButton:D,iconNameRight:b,inline:k=!1,fullwidth:x=!1,label:C,name:T,optionalTag:F=!1,optionalText:S,requiredTag:A=!1,requiredText:_,placeholder:$,prefix:P,suffix:I,type:j="text",useWrapper:z=!0,omitSearchIcon:K=!1,value:G,onChange:L,...N},H)=>{const Q=[u,"pkt-textinput"].join(" "),fe=n||`${e}-label`,ee=j==="search"&&!b&&!K;M.useRef(null);const[ue,me]=M.useState(0),ie=De=>{var rt,Ne;if(i&&me(((Ne=(rt=De.currentTarget)==null?void 0:rt.value)==null?void 0:Ne.length)||0),L)return L(De)};return m.jsx(sr,{ariaDescribedby:t,className:Q,disabled:c,errorMessage:d,forId:e,hasError:h,helptext:g,helptextDropdown:v,helptextDropdownButton:D,inline:k,label:C,optionalTag:F,optionalText:S,requiredTag:A,requiredText:_,useWrapper:z,counter:i,counterCurrent:ue,counterMaxLength:o,children:m.jsxs("div",{className:"pkt-input__container",children:[P&&m.jsx("div",{className:"pkt-input-prefix",children:P}),m.jsx("input",{ref:H,className:`pkt-input ${x?"pkt-input--fullwidth":""} ${o&&ue>o?"pkt-input--counter-error":""}`,type:j,name:T||e,id:e,placeholder:$,autoComplete:r,value:G,disabled:c,"aria-invalid":h,"aria-errormessage":`${e}-error`,"aria-labelledby":fe,...N,onChange:ie}),I&&m.jsxs("p",{className:"pkt-input-suffix",children:[I,b&&m.jsx(ne,{className:"pkt-input-suffix-icon",name:b}),ee&&m.jsx(ne,{className:"pkt-input-suffix-icon",name:"magnifying-glass-big"})]}),!I&&b&&m.jsx(ne,{className:"pkt-input-icon",name:b}),!I&&ee&&m.jsx(ne,{className:"pkt-input-icon",name:"magnifying-glass-big"})]})})}),Gb=[{id:"24h",fn:"24h.svg",cat:"services"},{id:"active-person",fn:"active-person.svg",cat:"people-and-health"},{id:"adjust",fn:"adjust.svg",cat:"ui"},{id:"alert-circle",fn:"alert-circle.svg",cat:"ui"},{id:"alert-error",fn:"alert-error.svg",cat:"ui"},{id:"alert-information",fn:"alert-information.svg",cat:"ui"},{id:"alert-success",fn:"alert-success.svg",cat:"ui"},{id:"alert-warning",fn:"alert-warning.svg",cat:"ui"},{id:"apple",fn:"apple.svg",cat:"ui"},{id:"archive",fn:"archive.svg",cat:"ui"},{id:"arrow-circle",fn:"arrow-circle.svg",cat:"ui"},{id:"arrow",fn:"arrow.svg",cat:"arrows"},{id:"attachment",fn:"attachment.svg",cat:"ui"},{id:"backpack",fn:"backpack.svg",cat:"services"},{id:"balloons",fn:"balloons.svg",cat:"ui"},{id:"books",fn:"books.svg",cat:"services"},{id:"wardrobe-boys",fn:"wardrobe-boys.svg",cat:"sign"},{id:"brain-heart",fn:"brain-heart.svg",cat:"people-and-health"},{id:"brain-signal",fn:"brain-signal.svg",cat:"people-and-health"},{id:"briefcase",fn:"briefcase.svg",cat:"sign"},{id:"bullseye",fn:"bullseye.svg",cat:"ui"},{id:"bus",fn:"bus.svg",cat:"services"},{id:"cafe",fn:"cafe.svg",cat:"sign"},{id:"calendar",fn:"calendar.svg",cat:"ui"},{id:"camera",fn:"camera.svg",cat:"ui"},{id:"car",fn:"car.svg",cat:"sign"},{id:"character-exclamation-mark",fn:"character-exclamation-mark.svg",cat:"ui"},{id:"character-information",fn:"character-information.svg",cat:"ui"},{id:"care-room",fn:"care-room.svg",cat:"sign"},{id:"check-big",fn:"check-big.svg",cat:"ui"},{id:"check-circle",fn:"check-circle.svg",cat:"ui"},{id:"check-medium",fn:"check-medium.svg",cat:"ui"},{id:"check",fn:"check.svg",cat:"ui"},{id:"chevron-down",fn:"chevron-down.svg",cat:"arrows"},{id:"chevron-left",fn:"chevron-left.svg",cat:"arrows"},{id:"chevron-right",fn:"chevron-right.svg",cat:"arrows"},{id:"chevron-thin-down",fn:"chevron-thin-down.svg",cat:"arrows"},{id:"chevron-thin-left",fn:"chevron-thin-left.svg",cat:"arrows"},{id:"chevron-thin-right",fn:"chevron-thin-right.svg",cat:"arrows"},{id:"chevron-thin-up",fn:"chevron-thin-up.svg",cat:"arrows"},{id:"chevron-up-and-down",fn:"chevron-up-and-down.svg",cat:"ui"},{id:"chevron-up",fn:"chevron-up.svg",cat:"arrows"},{id:"clock",fn:"clock.svg",cat:"ui"},{id:"close",fn:"close.svg",cat:"ui"},{id:"cloud",fn:"cloud.svg",cat:"ui"},{id:"code",fn:"code.svg",cat:"ui"},{id:"coffee",fn:"coffee.svg",cat:"sign"},{id:"cogwheel",fn:"cogwheel.svg",cat:"ui"},{id:"coin-stacks",fn:"coin-stacks.svg",cat:"services"},{id:"computer",fn:"computer.svg",cat:"ui"},{id:"copy",fn:"copy.svg",cat:"ui"},{id:"crane",fn:"crane.svg",cat:"services"},{id:"cross-circle-big",fn:"cross-circle-big.svg",cat:"ui"},{id:"cross-circle-fill",fn:"cross-circle-fill.svg",cat:"ui"},{id:"cross-circle",fn:"cross-circle.svg",cat:"ui"},{id:"cross",fn:"cross.svg",cat:"ui"},{id:"data",fn:"data.svg",cat:"ui"},{id:"defibrillators",fn:"defibrillators.svg",cat:"sign"},{id:"district",fn:"district.svg",cat:"ui"},{id:"document-code",fn:"document-code.svg",cat:"ui"},{id:"document-pdf",fn:"document-pdf.svg",cat:"ui"},{id:"document-plain",fn:"document-plain.svg",cat:"ui"},{id:"document-table",fn:"document-table.svg",cat:"ui"},{id:"document-text",fn:"document-text.svg",cat:"ui"},{id:"download",fn:"download.svg",cat:"ui"},{id:"drag",fn:"drag.svg",cat:"ui"},{id:"drinking-area-refreshments",fn:"drinking-area-refreshments.svg",cat:"sign"},{id:"ecg-heart",fn:"ecg-heart.svg",cat:"people-and-health"},{id:"edit",fn:"edit.svg",cat:"ui"},{id:"email",fn:"email.svg",cat:"ui"},{id:"exclamation-mark-circle",fn:"exclamation-mark-circle.svg",cat:"ui"},{id:"exclamation-mark-square",fn:"exclamation-mark-square.svg",cat:"ui"},{id:"exit",fn:"exit.svg",cat:"ui"},{id:"expand",fn:"expand.svg",cat:"ui"},{id:"eye",fn:"eye.svg",cat:"ui"},{id:"face-almost-happy",fn:"face-almost-happy.svg",cat:"feedback"},{id:"face-almost-sad",fn:"face-almost-sad.svg",cat:"feedback"},{id:"face-happy",fn:"face-happy.svg",cat:"feedback"},{id:"face-neutral",fn:"face-neutral.svg",cat:"feedback"},{id:"face-sad",fn:"face-sad.svg",cat:"feedback"},{id:"facebook",fn:"facebook.svg",cat:"social"},{id:"factory-fill",fn:"factory-fill.svg",cat:"ui"},{id:"feedback",fn:"feedback.svg",cat:"ui"},{id:"figma",fn:"figma.svg",cat:"social"},{id:"filter",fn:"filter.svg",cat:"ui"},{id:"fire-emblem",fn:"fire-emblem.svg",cat:"services"},{id:"fire-safety",fn:"fire-safety.svg",cat:"people-and-health"},{id:"folder",fn:"folder.svg",cat:"ui"},{id:"game-console",fn:"game-console.svg",cat:"ui"},{id:"github",fn:"github.svg",cat:"social"},{id:"graph",fn:"graph.svg",cat:"ui"},{id:"grid",fn:"grid.svg",cat:"ui"},{id:"hands-globe",fn:"hands-globe.svg",cat:"people-and-health"},{id:"heart-hand",fn:"heart-hand.svg",cat:"people-and-health"},{id:"heart-plus",fn:"heart-plus.svg",cat:"services"},{id:"heart",fn:"heart.svg",cat:"ui"},{id:"holding-hands",fn:"holding-hands.svg",cat:"people-and-health"},{id:"home",fn:"home.svg",cat:"ui"},{id:"horizontal-menu",fn:"horizontal-menu.svg",cat:"ui"},{id:"house-heart",fn:"house-heart.svg",cat:"services"},{id:"information",fn:"information.svg",cat:"ui"},{id:"instagram",fn:"instagram.svg",cat:"social"},{id:"invoice",fn:"invoice.svg",cat:"ui"},{id:"key",fn:"key.svg",cat:"ui"},{id:"language",fn:"language.svg",cat:"ui"},{id:"law-paragraph",fn:"law-paragraph.svg",cat:"ui"},{id:"lecture-workplace",fn:"lecture-workplace.svg",cat:"people-and-health"},{id:"link",fn:"link.svg",cat:"ui"},{id:"linkedin",fn:"linkedin.svg",cat:"social"},{id:"list",fn:"list.svg",cat:"ui"},{id:"location-pin-filled",fn:"location-pin-filled.svg",cat:"ui"},{id:"location-pin",fn:"location-pin.svg",cat:"ui"},{id:"lock-locked",fn:"lock-locked.svg",cat:"ui"},{id:"lock-unlocked",fn:"lock-unlocked.svg",cat:"ui"},{id:"magnifying-glass-big",fn:"magnifying-glass-big.svg",cat:"ui"},{id:"magnifying-glass-small",fn:"magnifying-glass-small.svg",cat:"ui"},{id:"map",fn:"map.svg",cat:"ui"},{id:"menu",fn:"menu.svg",cat:"ui"},{id:"message",fn:"message.svg",cat:"ui"},{id:"minimize",fn:"minimize.svg",cat:"ui"},{id:"minus-circle-fill",fn:"minus-circle-fill.svg",cat:"plusminus"},{id:"minus-circle",fn:"minus-circle.svg",cat:"plusminus"},{id:"minus-sign",fn:"minus-sign.svg",cat:"plusminus"},{id:"mobile-phone",fn:"mobile-phone.svg",cat:"ui"},{id:"music-notes",fn:"music-notes.svg",cat:"ui"},{id:"new-window-small",fn:"new-window-small.svg",cat:"ui"},{id:"new-window",fn:"new-window.svg",cat:"ui"},{id:"nodejs",fn:"nodejs.svg",cat:"social"},{id:"obstacle",fn:"obstacle.svg",cat:"ui"},{id:"organization",fn:"organization.svg",cat:"ui"},{id:"paint-bucket",fn:"paint-bucket.svg",cat:"ui"},{id:"palette",fn:"palette.svg",cat:"ui"},{id:"paste",fn:"paste.svg",cat:"ui"},{id:"park",fn:"park.svg",cat:"services"},{id:"partner-workout",fn:"partner-workout.svg",cat:"people-and-health"},{id:"picture",fn:"picture.svg",cat:"ui"},{id:"placeholder-icon",fn:"placeholder-icon.svg",cat:"ui"},{id:"plus-circle-fill",fn:"plus-circle-fill.svg",cat:"plusminus"},{id:"plus-circle",fn:"plus-circle.svg",cat:"plusminus"},{id:"plus-sign",fn:"plus-sign.svg",cat:"plusminus"},{id:"pride-heart",fn:"pride-heart.svg",cat:"people-and-health"},{id:"print",fn:"print.svg",cat:"ui"},{id:"privacy",fn:"privacy.svg",cat:"ui"},{id:"punkt-circle-blue",fn:"punkt-circle-blue.svg",cat:"social"},{id:"qr-code",fn:"qr-code.svg",cat:"ui"},{id:"question",fn:"question.svg",cat:"ui"},{id:"react",fn:"react.svg",cat:"social"},{id:"receipt",fn:"receipt.svg",cat:"ui"},{id:"recycling",fn:"recycling.svg",cat:"services"},{id:"restaurant",fn:"restaurant.svg",cat:"sign"},{id:"ruler",fn:"ruler.svg",cat:"ui"},{id:"sass",fn:"sass.svg",cat:"social"},{id:"save",fn:"save.svg",cat:"ui"},{id:"share-outline",fn:"share-outline.svg",cat:"ui"},{id:"share",fn:"share.svg",cat:"ui"},{id:"slack",fn:"slack.svg",cat:"social"},{id:"smiley-neutral",fn:"smiley-neutral.svg",cat:"feedback"},{id:"smiley-sad",fn:"smiley-sad.svg",cat:"feedback"},{id:"smiley-smile",fn:"smiley-smile.svg",cat:"feedback"},{id:"sort",fn:"sort.svg",cat:"ui"},{id:"sound-off",fn:"sound-off.svg",cat:"ui"},{id:"sound-on",fn:"sound-on.svg",cat:"ui"},{id:"sparkles",fn:"sparkles.svg",cat:"ui"},{id:"svg-logo",fn:"svg.svg",cat:"social"},{id:"swingset",fn:"swingset.svg",cat:"services"},{id:"table",fn:"table.svg",cat:"ui"},{id:"target",fn:"target.svg",cat:"ui"},{id:"tickets",fn:"tickets.svg",cat:"sign"},{id:"thumbs-down",fn:"thumbs-down.svg",cat:"feedback"},{id:"thumbs-up",fn:"thumbs-up.svg",cat:"feedback"},{id:"trash-can",fn:"trash-can.svg",cat:"ui"},{id:"trail",fn:"trail.svg",cat:"sign"},{id:"twitter",fn:"twitter.svg",cat:"social"},{id:"two-people-dancing",fn:"two-people-dancing.svg",cat:"people-and-health"},{id:"two-people-talking",fn:"two-people-talking.svg",cat:"people-and-health"},{id:"user",fn:"user.svg",cat:"ui"},{id:"vertical-menu",fn:"vertical-menu.svg",cat:"ui"},{id:"vue",fn:"vue.svg",cat:"social"},{id:"wardrobe",fn:"wardrobe.svg",cat:"sign"},{id:"wardrobe-girls",fn:"wardrobe-girls.svg",cat:"sign"},{id:"water-faucet",fn:"water-faucet.svg",cat:"services"},{id:"wheelchair",fn:"wheelchair.svg",cat:"sign"},{id:"wine-bottle",fn:"wine-bottle.svg",cat:"people-and-health"},{id:"wifi",fn:"wifi.svg",cat:"sign"},{id:"workplace",fn:"workplace.svg",cat:"social"},{id:"wrench",fn:"wrench.svg",cat:"ui"}],li=({className:e,compact:t=!1,skin:n="basic",responsiveView:r=!0,children:i})=>m.jsx("table",{"data-testid":"pkt-table",className:Je(e,"pkt-table",{"pkt-table--responsive":r,"pkt-table--compact":t,"pkt-table--basic":n==="basic","pkt-table--zebra-blue":n==="zebra-blue"}),role:"table",children:i}),ui=({className:e,children:t})=>m.jsx("thead",{className:Je(e,"pkt-table__header",{}),role:"rowgroup",children:t}),ci=({children:e,className:t})=>m.jsx("tbody",{className:Je(t,"pkt-table__body",{}),role:"rowgroup",children:e}),Wn=({className:e,children:t})=>m.jsx("tr",{className:Je(e,"pkt-table__row",{}),role:"row",children:t}),Tt=({className:e,children:t})=>m.jsx("th",{className:Je(e,"pkt-table__header-cell",{}),role:"columnheader",children:t}),Dt=({children:e,className:t,dataLabel:n})=>m.jsx("td",{className:Je(t,"pkt-table__data-cell",{}),"data-label":n,role:"cell","data-testid":"pkt-table__data-cell",children:e}),Yb=({specs:e})=>{const t=r=>Array.isArray(r)?r.join(`
|
|
610
610
|
`):r,n=r=>typeof r=="boolean"?r?"true":"false":r;return m.jsxs(m.Fragment,{children:[m.jsx("h2",{children:"Egenskaper"}),m.jsxs(li,{compact:!0,children:[m.jsx(ui,{children:m.jsxs(Wn,{children:[m.jsx(Tt,{children:"Navn"}),m.jsx(Tt,{children:"Prop"}),m.jsx(Tt,{children:"Beskrivelse"}),m.jsx(Tt,{children:"Type"}),m.jsx(Tt,{children:"Standardverdi"})]})}),m.jsx(ci,{children:Object.entries(e.props||{}).map(([r,i])=>m.jsxs(Wn,{children:[m.jsx(Dt,{dataLabel:"Prop",children:m.jsx("pre",{children:r})}),m.jsx(Dt,{dataLabel:"Navn",children:!Array.isArray(i)&&i.name||r}),Array.isArray(i)?m.jsxs(m.Fragment,{children:[m.jsx(Dt,{dataLabel:"Beskrivelse"}),m.jsx(Dt,{dataLabel:"Type",children:m.jsx("pre",{children:i.join(`
|
|
611
|
-
`)})})]}):m.jsxs(m.Fragment,{children:[m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})}),m.jsx(Dt,{dataLabel:"Type",children:m.jsx("pre",{children:i.type&&t(i.type)})}),m.jsx(Dt,{dataLabel:"Standardverdi",children:m.jsx("pre",{children:n(i.default)})})]})]},r))})]}),e.events&&m.jsxs(m.Fragment,{children:[m.jsx("h2",{children:"Hendelser / handlinger"}),m.jsxs(li,{compact:!0,children:[m.jsx(ui,{children:m.jsxs(Wn,{children:[m.jsx(Tt,{children:"Event"}),m.jsx(Tt,{children:"Beskrivelse"}),m.jsx(Tt,{children:"Type"})]})}),m.jsx(ci,{children:Object.entries(e.events||{}).map(([r,i])=>m.jsxs(Wn,{children:[m.jsx(Dt,{dataLabel:"Event",children:m.jsx("pre",{children:r})}),m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})}),m.jsx(Dt,{dataLabel:"Type",children:i.type})]},r))})]})]}),e.slots&&m.jsxs(m.Fragment,{children:[m.jsx("h2",{children:"Innhold"}),m.jsxs(li,{compact:!0,children:[m.jsx(ui,{children:m.jsxs(Wn,{children:[m.jsx(Tt,{children:"Slot"}),m.jsx(Tt,{children:"Beskrivelse"})]})}),m.jsx(ci,{children:Object.entries(e.slots||{}).map(([r,i])=>m.jsxs(Wn,{children:[m.jsx(Dt,{dataLabel:"Slot",children:m.jsx("pre",{children:r})}),m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})})]},r))})]})]})]})};aa.registerLanguage("jsx",Vb);const jp=({specs:e,children:t,fullWidth:n})=>{var K,G;const r=e.props&&typeof e.props=="object"&&!Array.isArray(e.props)?Object.entries(e.props).reduce((L,[N,H])=>(typeof H=="object"&&!Array.isArray(H)&&H.default!==void 0&&H.default!==null&&(H.default==="false"&&(H.default=!1),H.default==="true"&&(H.default=!0),L[N]=H.default),L),{}):{},[i,o]=M.useState(r),[u,c]=M.useState("light"),[d,h]=M.useState(""),[g,v]=M.useState(""),[D,b]=M.useState(""),[k,x]=M.useState("Rediger innhold"),[C,T]=M.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${e.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),F=L=>{L===1&&_(),L===2&&(_(),A()),b(""),T(N=>N.map((H,Q)=>({...H,active:Q===L})))},S=M.useRef(null),A=async()=>{if(e.isElement&&M.isValidElement(I))_().then(()=>{const L=M.isValidElement(I)?I.type.displayName||I.type.name:e.name;h(g.replaceAll(L,e.name||"").replaceAll("{",'"').replaceAll("}",'"'))});else{const L=await Us(S.current.innerHTML,{parser:"html",plugins:[ey]});h(L.replace(/<\!--.*?-->/g,""))}},_=async()=>{const L=Ig(I);return v(L),Promise.resolve()},$=(L,N)=>{navigator.clipboard.writeText(N).then(()=>{b(L),console.log("Copied to clipboard",L)})},P=(L,N)=>m.jsxs("div",{className:"pkt-preview__copy",children:[D===L&&m.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),m.jsx(Cn,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>$(L,N),children:"Kopier kode"})]}),I=M.isValidElement(t)&&M.cloneElement(t,{...i},t.props.children?t.props.children:(K=e.slots)!=null&&K.default?k:null),j=(L,N,H=!1)=>{if(!H&&(!N||N=="false")){const{[L]:Q,...fe}=i;o(fe)}else o(Q=>({...Q,[L]:N}))},z=(L,N)=>{if(N.type==="boolean")return m.jsx(sr,{label:N.name||L,forId:L,helptext:N.description||null,hasFieldset:!0,requiredTag:N.required,children:m.jsx(Ma,{id:L,label:L,type:"checkbox",checked:i[L],onChange:H=>j(L,H.target.checked,N.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(N.type==="icon")return m.jsxs(ho,{label:N.name||L,helptext:N.description||null,id:L,value:i[L],onChange:H=>j(L,H.target.value),requiredTag:N.required,children:[m.jsx("option",{value:""}),Gb.map(H=>m.jsx("option",{value:H.id,children:H.id},H.id))]});if(Array.isArray(N)||Array.isArray(N.type)||Array.isArray(N.values)){const H=Array.isArray(N)?N:N.values||N.type;return m.jsxs(ho,{label:N.name||L,helptext:N.description||null,id:L,value:i[L],onChange:Q=>j(L,Q.target.value),requiredTag:N.required,children:[m.jsx("option",{value:""}),H.map(Q=>m.jsx("option",{value:Q,children:Q},Q))]})}else return N.type==="ISOdatestring"?m.jsx(Xl,{id:L,label:N.name||L,helptext:N.description||null,value:i[L],multiple:N.variant==="multiple",maxlength:999,onChange:H=>j(L,H.target.value),requiredTag:N.required}):m.jsx(fo,{id:L,label:N.name||L,helptext:N.description||null,type:"text",value:i[L],onChange:H=>j(L,N.type==="number"?parseFloat(H.currentTarget.value):H.currentTarget.value),requiredTag:N.required})};return m.jsxs("div",{className:"pkt-preview",children:[m.jsxs("div",{className:"pkt-preview__component-container","data-mode":u,children:[e["dark-mode"]&&m.jsx("div",{className:"pkt-preview__mode",children:m.jsx(Ma,{id:"mode",label:"Dark mode",type:"checkbox",checked:u==="dark",onChange:L=>c(L.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),m.jsx("div",{className:`pkt-preview__component ${n&&"pkt-preview__component--fullwidth"}`,ref:S,children:m.jsx("div",{children:I})})]}),m.jsx(Np,{tabs:C,onTabSelected:F}),m.jsxs("div",{className:`pkt-grid pkt-preview__opts ${C[0].active?"":"pkt-hide"}`,children:[((G=e.slots)==null?void 0:G.default)&&!t.props.children&&m.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[m.jsx(Dr,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),m.jsx(fo,{id:"slot",label:"Slot",helptext:e.slots.default.description||"Innholdet i slot",type:"text",value:k,onChange:L=>x(L.currentTarget.value)})]}),e.props&&typeof e.props=="object"&&!Array.isArray(e.props)?Object.entries(e.props).map(([L,N])=>m.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[m.jsx(Dr,{size:"small",skin:"blue-light",textStyle:"thin-text",children:L}),z(L,N)]},L)):m.jsx("p",{children:"OBS! Specs mangler props!"})]}),m.jsxs("div",{className:`pkt-preview__code ${C[1].active?"":"pkt-hide"}`,children:[m.jsx(aa,{language:"jsx",style:Bp,children:g}),P("jsx",g)]}),m.jsxs("div",{className:`pkt-preview__code ${C[2].active?"":"pkt-hide"}`,children:[m.jsx(aa,{language:"html",style:Bp,children:d}),P("html",d)]}),m.jsx("div",{className:`pkt-preview__specs ${C[3].active?"":"pkt-hide"}`,children:m.jsx(Yb,{specs:e})})]})};jp.displayName="PktPreview";for(var Ze=[],mo=0;mo<256;++mo)Ze.push((mo+256).toString(16).slice(1));function Kb(e,t=0){return(Ze[e[t+0]]+Ze[e[t+1]]+Ze[e[t+2]]+Ze[e[t+3]]+"-"+Ze[e[t+4]]+Ze[e[t+5]]+"-"+Ze[e[t+6]]+Ze[e[t+7]]+"-"+Ze[e[t+8]]+Ze[e[t+9]]+"-"+Ze[e[t+10]]+Ze[e[t+11]]+Ze[e[t+12]]+Ze[e[t+13]]+Ze[e[t+14]]+Ze[e[t+15]]).toLowerCase()}var pi,Jb=new Uint8Array(16);function Xb(){if(!pi&&(pi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pi(Jb)}var Qb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Pp={randomUUID:Qb};function Zb(e,t,n){if(Pp.randomUUID&&!t&&!e)return Pp.randomUUID();e=e||{};var r=e.random||(e.rng||Xb)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Kb(r)}const Lp=M.forwardRef(({valueCurrent:e,valueMin:t=0,valueMax:n=100,skin:r="dark-blue",title:i,titlePosition:o="left",statusType:u="none",statusPlacement:c="following",id:d,ariaLabel:h,ariaLabelledby:g,role:v="progressbar",className:D,ariaValueText:b,...k},x)=>{const C=M.useRef(null),[T,F]=M.useState(0),[S,A]=M.useState(d);M.useEffect(()=>{d||A(Zb())},[d]),M.useEffect(()=>{if(C.current){const N=C.current;F(N.getBoundingClientRect().width)}});const _=n-t,$=e/_*100,P=n!==100||t!==0?Math.round($):e,I=`${e} av ${n}`,j=u!=="none",z=Je("pkt-progressbar__bar",{[`pkt-progressbar__bar--${r}`]:r}),K=Je("pkt-progressbar__title",{"pkt-progressbar__title-center":o==="center"}),G=Je("pkt-progressbar__status",{"pkt-progressbar__status--center":c==="center"}),L=Je({"pkt-progressbar__status-placement--following":c==="following","pkt-progressbar__status-placement--center":c==="center","pkt-progressbar__status-placement--left":c==="left"});return m.jsxs("div",{...k,ref:x,className:Je("pkt-progressbar__container",D),id:S,style:{"--pkt-progress-label-width":`${T}px`,"--pkt-progress-width":`${P}%`},children:[i&&m.jsx("p",{id:`${S}-title`,className:K,children:i}),m.jsx("div",{role:v,className:"pkt-progressbar__bar-wrapper","aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e,"aria-labelledby":g||i&&`${S}-title`,"aria-label":h,"aria-valuetext":b,children:m.jsx("div",{className:z})}),j&&m.jsx("div",{className:G,children:m.jsx("span",{className:L,ref:C,children:u==="percentage"?`${P}%`:I})})]})});Lp.displayName="PktProgressbar";const Op=M.forwardRef(({id:e,name:t,label:n,className:r,hasTile:i=!1,disabled:o=!1,checkHelptext:u,hasError:c=!1,...d},h)=>{const g=[r,"pkt-input-check"].filter(Boolean).join(" ");return m.jsx("div",{className:g,children:m.jsxs("div",{className:`pkt-input-check__input ${i?"pkt-input-check__input--tile":""} ${o&&i?"pkt-input-check__input--tile-disabled":""}`,children:[m.jsx("input",{ref:h,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:o,name:t,...d}),m.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[n,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});Op.displayName="PktRadioButton";const ek=M.forwardRef(({appearance:e="local",disabled:t=!1,fullwidth:n=!1,id:r,label:i,name:o,placeholder:u="Søk…",suggestions:c,value:d="",action:h,method:g,onChange:v,onSearch:D,onSuggestionClick:b,...k},x)=>{const C=(_,$)=>{_?_():b&&b($)},T=_=>{d=_.target.value},F=`pkt-searchinput pkt-searchinput--${e} ${n?"pkt-searchinput--fullwidth":""}`,S=i?"label":"div";let A;return h?A=_=>m.jsx("form",{role:"search",className:F,action:h,method:g,children:_}):A=_=>m.jsx("div",{role:"search",className:F,children:_}),A(m.jsxs(m.Fragment,{children:[m.jsxs(S,{htmlFor:i?r:void 0,className:i?"pkt-inputwrapper__label":"",children:[i&&m.jsx(m.Fragment,{children:i}),m.jsxs("div",{className:e==="local"?"pkt-input__container":"pkt-searchinput__field",children:[m.jsx("input",{className:`pkt-input ${n?"pkt-input--fullwidth":""}`,type:"search",name:o||r,id:r,placeholder:u,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:x,"aria-controls":`${r}-suggestions`,onChange:v||T,...k}),m.jsx(Cn,{className:`pkt-searchinput__button ${e==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:e==="local"?"tertiary":"primary",color:e==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:D&&(_=>{_.preventDefault(),D(d)}),onKeyUp:D&&(_=>{_.key==="Enter"&&(_.preventDefault(),D(d))}),children:i||u})]})]}),c&&m.jsx("ul",{id:`${r}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:c.map((_,$)=>m.jsx("li",{children:M.createElement(_.href?"a":_.onClick?"button":"div",{href:_.href,className:`pkt-searchinput__suggestion ${_.onClick?"pkt-link-button":""} ${_.href||_.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:_.onClick?"button":void 0,onClick:()=>C(_.onClick,$),onKeyUp:()=>C(_.onClick,$)},m.jsxs(m.Fragment,{children:[_.title&&m.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:_.title}),_.text&&m.jsx("p",{className:"pkt-searchinput__suggestion-text",children:_.text})]}))},`search-suggestion-${$}`))})]}))}),tk=M.forwardRef(({activeStep:e,className:t,children:n,hideNonActiveStepsContent:r=!0,orientation:i="vertical",...o},u)=>{const c=Je(t,"pkt-stepper",i==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),d=M.Children.map(n,(h,g)=>M.isValidElement(h)?M.cloneElement(h,{className:Je(h.props.className,{"pkt-step--hidden":r&&g!==e})}):h);return m.jsx("ol",{"data-testid":"pkt-stepper",className:c,ref:u,...o,children:d})}),nk=m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:m.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),rk=m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[m.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),m.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),ak=m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[m.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),m.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),ik=({children:e,className:t,status:n="incomplete",title:r})=>m.jsxs("li",{className:Je("pkt-step",t,`pkt-step--${n}`),"data-testid":"pkt-step",children:[m.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),m.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),m.jsx("span",{className:Je("pkt-step__indicator"),children:n==="current"?rk:n==="completed"?ak:nk}),m.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),m.jsxs("div",{className:"pkt-step__wrapper",children:[m.jsx("div",{className:"pkt-step__title",children:r}),m.jsx("div",{className:"pkt-step__content",children:e})]})]}),sk=M.forwardRef(({id:e,ariaDescribedby:t,ariaLabelledby:n,counter:r,counterMaxLength:i,className:o,disabled:u,errorMessage:c,hasError:d,helptext:h,helptextDropdown:g,helptextDropdownButton:v,inline:D,fullwidth:b=!1,label:k,name:x,optionalTag:C=!1,optionalText:T,requiredTag:F=!1,requiredText:S,placeholder:A,rows:_,useWrapper:$=!0,onChange:P,...I},j)=>{const z=[o,"pkt-textinput","pkt-textarea"].join(" "),K=n||`${e}-label`,G=M.useRef(null),[L,N]=M.useState(0),H=Q=>{var fe,ee;if(r&&N(((ee=(fe=Q.currentTarget)==null?void 0:fe.value)==null?void 0:ee.length)||0),P)return P(Q)};return M.useEffect(()=>{var Q,fe;typeof j=="function"&&j(G.current),r&&N(((fe=(Q=G==null?void 0:G.current)==null?void 0:Q.value)==null?void 0:fe.length)||0)},[j]),m.jsx(sr,{ariaDescribedby:t,className:z,disabled:u,errorMessage:c,forId:e,hasError:d,helptext:h,helptextDropdown:g,helptextDropdownButton:v,inline:D,label:k,optionalTag:C,optionalText:T,requiredTag:F,requiredText:S,useWrapper:$,counter:r,counterCurrent:L,counterMaxLength:i,children:m.jsx("textarea",{ref:G,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${i&&L>i?"pkt-input--counter-error":""}`,name:x||e,id:e,placeholder:A,disabled:u,rows:_,"aria-labelledby":K,"aria-invalid":d,"aria-errormessage":`${e}-error`,...I,onChange:H})})});Z.PktAccordion=th,Z.PktAccordionItem=oh,Z.PktAlert=Wi,Z.PktBackLink=al,Z.PktBreadcrumbs=lh,Z.PktButton=Cn,Z.PktCard=Jl,Z.PktCheckbox=Ma,Z.PktDatepicker=Xl,Z.PktFooter=Wm,Z.PktFooterSimple=zm,Z.PktHeader=Vm,Z.PktIcon=ne,Z.PktIconContext=nl,Z.PktInput=Ql,Z.PktInputWrapper=sr,Z.PktLink=Zl,Z.PktLinkCard=eu,Z.PktLoader=tu,Z.PktMessagebox=nu,Z.PktPreview=jp,Z.PktProgressbar=Lp,Z.PktRadioButton=Op,Z.PktSearchInput=ek,Z.PktSelect=ho,Z.PktStep=ik,Z.PktStepper=tk,Z.PktTable=li,Z.PktTableBody=ci,Z.PktTableDataCell=Dt,Z.PktTableHeader=ui,Z.PktTableHeaderCell=Tt,Z.PktTableRow=Wn,Z.PktTabs=Np,Z.PktTag=Dr,Z.PktTextarea=sk,Z.PktTextinput=fo,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
|
611
|
+
`)})})]}):m.jsxs(m.Fragment,{children:[m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})}),m.jsx(Dt,{dataLabel:"Type",children:m.jsx("pre",{children:i.type&&t(i.type)})}),m.jsx(Dt,{dataLabel:"Standardverdi",children:m.jsx("pre",{children:n(i.default)})})]})]},r))})]}),e.events&&m.jsxs(m.Fragment,{children:[m.jsx("h2",{children:"Hendelser / handlinger"}),m.jsxs(li,{compact:!0,children:[m.jsx(ui,{children:m.jsxs(Wn,{children:[m.jsx(Tt,{children:"Event"}),m.jsx(Tt,{children:"Beskrivelse"}),m.jsx(Tt,{children:"Type"})]})}),m.jsx(ci,{children:Object.entries(e.events||{}).map(([r,i])=>m.jsxs(Wn,{children:[m.jsx(Dt,{dataLabel:"Event",children:m.jsx("pre",{children:r})}),m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})}),m.jsx(Dt,{dataLabel:"Type",children:i.type})]},r))})]})]}),e.slots&&m.jsxs(m.Fragment,{children:[m.jsx("h2",{children:"Innhold"}),m.jsxs(li,{compact:!0,children:[m.jsx(ui,{children:m.jsxs(Wn,{children:[m.jsx(Tt,{children:"Slot"}),m.jsx(Tt,{children:"Beskrivelse"})]})}),m.jsx(ci,{children:Object.entries(e.slots||{}).map(([r,i])=>m.jsxs(Wn,{children:[m.jsx(Dt,{dataLabel:"Slot",children:m.jsx("pre",{children:r})}),m.jsx(Dt,{dataLabel:"Beskrivelse",children:m.jsx("span",{dangerouslySetInnerHTML:{__html:i.description||""}})})]},r))})]})]})]})};aa.registerLanguage("jsx",Vb);const jp=({specs:e,children:t,fullWidth:n})=>{var K,G;const r=e.props&&typeof e.props=="object"&&!Array.isArray(e.props)?Object.entries(e.props).reduce((L,[N,H])=>(typeof H=="object"&&!Array.isArray(H)&&H.default!==void 0&&H.default!==null&&(H.default==="false"&&(H.default=!1),H.default==="true"&&(H.default=!0),L[N]=H.default),L),{}):{},[i,o]=M.useState(r),[u,c]=M.useState("light"),[d,h]=M.useState(""),[g,v]=M.useState(""),[D,b]=M.useState(""),[k,x]=M.useState("Rediger innhold"),[C,T]=M.useState([{text:"Rediger",icon:"adjust",active:!0},{text:"Kode (React)",icon:"react",active:!1},{text:`Kode (${e.isElement?"Element":"HTML"})`,icon:"code",active:!1},{text:"Egenskaper",icon:"list",active:!1}]),F=L=>{L===1&&_(),L===2&&(_(),A()),b(""),T(N=>N.map((H,Q)=>({...H,active:Q===L})))},S=M.useRef(null),A=async()=>{if(e.isElement&&M.isValidElement(I))_().then(()=>{const L=M.isValidElement(I)?I.type.displayName||I.type.name:e.name;h(`<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->
|
|
612
|
+
`+g.replaceAll(L,e.name||"").replaceAll("={","='").replaceAll(`}
|
|
613
|
+
`,`'
|
|
614
|
+
`).replaceAll(/([a-zA-Z0-9]+)(:)/g,'"$1"$2'))});else{const L=await Us(S.current.innerHTML,{parser:"html",plugins:[ey]});h(L.replace(/<\!--.*?-->/g,""))}},_=async()=>{const L=await Ig(I);return v(L),Promise.resolve()},$=(L,N)=>{navigator.clipboard.writeText(N).then(()=>{b(L),console.log("Copied to clipboard",L)})},P=(L,N)=>m.jsxs("div",{className:"pkt-preview__copy",children:[D===L&&m.jsx("span",{className:"pkt-preview__copied",children:"Kode kopiert til utklippstavle"}),m.jsx(Cn,{skin:"tertiary",variant:"icon-only",size:"small",iconName:"copy",onClick:()=>$(L,N),children:"Kopier kode"})]}),I=M.isValidElement(t)&&M.cloneElement(t,{...i},t.props.children?t.props.children:(K=e.slots)!=null&&K.default?k:null),j=(L,N,H=!1)=>{if(!H&&(!N||N=="false")){const{[L]:Q,...fe}=i;o(fe)}else o(Q=>({...Q,[L]:N}))},z=(L,N)=>{if(N.type==="boolean")return m.jsx(sr,{label:N.name||L,forId:L,helptext:N.description||null,hasFieldset:!0,requiredTag:N.required,children:m.jsx(Ma,{id:L,label:L,type:"checkbox",checked:i[L],onChange:H=>j(L,H.target.checked,N.displayAsFalse),labelPosition:"right",isSwitch:!0})});if(N.type==="icon")return m.jsxs(ho,{label:N.name||L,helptext:N.description||null,id:L,value:i[L],onChange:H=>j(L,H.target.value),requiredTag:N.required,children:[m.jsx("option",{value:""}),Gb.map(H=>m.jsx("option",{value:H.id,children:H.id},H.id))]});if(Array.isArray(N)||Array.isArray(N.type)||Array.isArray(N.values)){const H=Array.isArray(N)?N:N.values||N.type;return m.jsxs(ho,{label:N.name||L,helptext:N.description||null,id:L,value:i[L],onChange:Q=>j(L,Q.target.value),requiredTag:N.required,children:[m.jsx("option",{value:""}),H.map(Q=>m.jsx("option",{value:Q,children:Q},Q))]})}else return N.type==="ISOdatestring"?m.jsx(Xl,{id:L,label:N.name||L,helptext:N.description||null,value:i[L],multiple:N.variant==="multiple",maxlength:999,onChange:H=>j(L,H.target.value),requiredTag:N.required}):m.jsx(fo,{id:L,label:N.name||L,helptext:N.description||null,type:"text",value:i[L],onChange:H=>j(L,N.type==="number"?parseFloat(H.currentTarget.value):H.currentTarget.value),requiredTag:N.required})};return m.jsxs("div",{className:"pkt-preview",children:[m.jsxs("div",{className:"pkt-preview__component-container","data-mode":u,children:[e["dark-mode"]&&m.jsx("div",{className:"pkt-preview__mode",children:m.jsx(Ma,{id:"mode",label:"Dark mode",type:"checkbox",checked:u==="dark",onChange:L=>c(L.target.checked?"dark":"light"),labelPosition:"right",isSwitch:!0})}),m.jsx("div",{className:`pkt-preview__component ${n&&"pkt-preview__component--fullwidth"}`,ref:S,children:m.jsx("div",{children:I})})]}),m.jsx(Np,{tabs:C,onTabSelected:F}),m.jsxs("div",{className:`pkt-grid pkt-preview__opts ${C[0].active?"":"pkt-hide"}`,children:[((G=e.slots)==null?void 0:G.default)&&!t.props.children&&m.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[m.jsx(Dr,{size:"small",skin:"blue-light",textStyle:"thin-text",children:"children"}),m.jsx(fo,{id:"slot",label:"Slot",helptext:e.slots.default.description||"Innholdet i slot",type:"text",value:k,onChange:L=>x(L.currentTarget.value)})]}),e.props&&typeof e.props=="object"&&!Array.isArray(e.props)?Object.entries(e.props).map(([L,N])=>m.jsxs("div",{className:"pkt-cell pkt-cell--span12 pkt-cell--span6-phablet-up",children:[m.jsx(Dr,{size:"small",skin:"blue-light",textStyle:"thin-text",children:L}),z(L,N)]},L)):m.jsx("p",{children:"OBS! Specs mangler props!"})]}),m.jsxs("div",{className:`pkt-preview__code ${C[1].active?"":"pkt-hide"}`,children:[m.jsx(aa,{language:"jsx",style:Bp,children:g}),P("jsx",g)]}),m.jsxs("div",{className:`pkt-preview__code ${C[2].active?"":"pkt-hide"}`,children:[m.jsx(aa,{language:"html",style:Bp,children:d}),P("html",d)]}),m.jsx("div",{className:`pkt-preview__specs ${C[3].active?"":"pkt-hide"}`,children:m.jsx(Yb,{specs:e})})]})};jp.displayName="PktPreview";for(var Ze=[],mo=0;mo<256;++mo)Ze.push((mo+256).toString(16).slice(1));function Kb(e,t=0){return(Ze[e[t+0]]+Ze[e[t+1]]+Ze[e[t+2]]+Ze[e[t+3]]+"-"+Ze[e[t+4]]+Ze[e[t+5]]+"-"+Ze[e[t+6]]+Ze[e[t+7]]+"-"+Ze[e[t+8]]+Ze[e[t+9]]+"-"+Ze[e[t+10]]+Ze[e[t+11]]+Ze[e[t+12]]+Ze[e[t+13]]+Ze[e[t+14]]+Ze[e[t+15]]).toLowerCase()}var pi,Jb=new Uint8Array(16);function Xb(){if(!pi&&(pi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!pi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pi(Jb)}var Qb=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Pp={randomUUID:Qb};function Zb(e,t,n){if(Pp.randomUUID&&!t&&!e)return Pp.randomUUID();e=e||{};var r=e.random||(e.rng||Xb)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Kb(r)}const Lp=M.forwardRef(({valueCurrent:e,valueMin:t=0,valueMax:n=100,skin:r="dark-blue",title:i,titlePosition:o="left",statusType:u="none",statusPlacement:c="following",id:d,ariaLabel:h,ariaLabelledby:g,role:v="progressbar",className:D,ariaValueText:b,...k},x)=>{const C=M.useRef(null),[T,F]=M.useState(0),[S,A]=M.useState(d);M.useEffect(()=>{d||A(Zb())},[d]),M.useEffect(()=>{if(C.current){const N=C.current;F(N.getBoundingClientRect().width)}});const _=n-t,$=e/_*100,P=n!==100||t!==0?Math.round($):e,I=`${e} av ${n}`,j=u!=="none",z=Je("pkt-progressbar__bar",{[`pkt-progressbar__bar--${r}`]:r}),K=Je("pkt-progressbar__title",{"pkt-progressbar__title-center":o==="center"}),G=Je("pkt-progressbar__status",{"pkt-progressbar__status--center":c==="center"}),L=Je({"pkt-progressbar__status-placement--following":c==="following","pkt-progressbar__status-placement--center":c==="center","pkt-progressbar__status-placement--left":c==="left"});return m.jsxs("div",{...k,ref:x,className:Je("pkt-progressbar__container",D),id:S,style:{"--pkt-progress-label-width":`${T}px`,"--pkt-progress-width":`${P}%`},children:[i&&m.jsx("p",{id:`${S}-title`,className:K,children:i}),m.jsx("div",{role:v,className:"pkt-progressbar__bar-wrapper","aria-valuemin":t,"aria-valuemax":n,"aria-valuenow":e,"aria-labelledby":g||i&&`${S}-title`,"aria-label":h,"aria-valuetext":b,children:m.jsx("div",{className:z})}),j&&m.jsx("div",{className:G,children:m.jsx("span",{className:L,ref:C,children:u==="percentage"?`${P}%`:I})})]})});Lp.displayName="PktProgressbar";const Op=M.forwardRef(({id:e,name:t,label:n,className:r,hasTile:i=!1,disabled:o=!1,checkHelptext:u,hasError:c=!1,...d},h)=>{const g=[r,"pkt-input-check"].filter(Boolean).join(" ");return m.jsx("div",{className:g,children:m.jsxs("div",{className:`pkt-input-check__input ${i?"pkt-input-check__input--tile":""} ${o&&i?"pkt-input-check__input--tile-disabled":""}`,children:[m.jsx("input",{ref:h,className:`pkt-input-check__input-checkbox ${c?"pkt-input-check__input-checkbox--error":""}`,type:"radio",id:e,disabled:o,name:t,...d}),m.jsxs("label",{className:"pkt-input-check__input-label",htmlFor:e,children:[n,u&&m.jsx("div",{className:"pkt-input-check__input-helptext",children:u})]})]})})});Op.displayName="PktRadioButton";const ek=M.forwardRef(({appearance:e="local",disabled:t=!1,fullwidth:n=!1,id:r,label:i,name:o,placeholder:u="Søk…",suggestions:c,value:d="",action:h,method:g,onChange:v,onSearch:D,onSuggestionClick:b,...k},x)=>{const C=(_,$)=>{_?_():b&&b($)},T=_=>{d=_.target.value},F=`pkt-searchinput pkt-searchinput--${e} ${n?"pkt-searchinput--fullwidth":""}`,S=i?"label":"div";let A;return h?A=_=>m.jsx("form",{role:"search",className:F,action:h,method:g,children:_}):A=_=>m.jsx("div",{role:"search",className:F,children:_}),A(m.jsxs(m.Fragment,{children:[m.jsxs(S,{htmlFor:i?r:void 0,className:i?"pkt-inputwrapper__label":"",children:[i&&m.jsx(m.Fragment,{children:i}),m.jsxs("div",{className:e==="local"?"pkt-input__container":"pkt-searchinput__field",children:[m.jsx("input",{className:`pkt-input ${n?"pkt-input--fullwidth":""}`,type:"search",name:o||r,id:r,placeholder:u,defaultValue:d,disabled:t,autoComplete:"off","aria-autocomplete":"list",ref:x,"aria-controls":`${r}-suggestions`,onChange:v||T,...k}),m.jsx(Cn,{className:`pkt-searchinput__button ${e==="local"?"pkt-input-icon":""}`,variant:"icon-only",iconName:"magnifying-glass-big",skin:e==="local"?"tertiary":"primary",color:e==="global"?"yellow":void 0,type:"submit",disabled:t,onClick:D&&(_=>{_.preventDefault(),D(d)}),onKeyUp:D&&(_=>{_.key==="Enter"&&(_.preventDefault(),D(d))}),children:i||u})]})]}),c&&m.jsx("ul",{id:`${r}-suggestions`,className:"pkt-searchinput__suggestions","aria-live":"assertive",children:c.map((_,$)=>m.jsx("li",{children:M.createElement(_.href?"a":_.onClick?"button":"div",{href:_.href,className:`pkt-searchinput__suggestion ${_.onClick?"pkt-link-button":""} ${_.href||_.onClick?"pkt-searchinput__suggestion--has-hover":""}`,type:_.onClick?"button":void 0,onClick:()=>C(_.onClick,$),onKeyUp:()=>C(_.onClick,$)},m.jsxs(m.Fragment,{children:[_.title&&m.jsx("h3",{className:"pkt-searchinput__suggestion-title",children:_.title}),_.text&&m.jsx("p",{className:"pkt-searchinput__suggestion-text",children:_.text})]}))},`search-suggestion-${$}`))})]}))}),tk=M.forwardRef(({activeStep:e,className:t,children:n,hideNonActiveStepsContent:r=!0,orientation:i="vertical",...o},u)=>{const c=Je(t,"pkt-stepper",i==="horizontal"?"pkt-stepper--horizontal":"pkt-stepper--vertical"),d=M.Children.map(n,(h,g)=>M.isValidElement(h)?M.cloneElement(h,{className:Je(h.props.className,{"pkt-step--hidden":r&&g!==e})}):h);return m.jsx("ol",{"data-testid":"pkt-stepper",className:c,ref:u,...o,children:d})}),nk=m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:m.jsx("circle",{cx:"12",cy:"12",r:"7",style:{fill:"var(--pkt-color-grays-grey-200, #CCC)"}})}),rk=m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[m.jsx("circle",{opacity:".15",cx:"12",cy:"12",r:"12",fill:"#2A2859"}),m.jsx("circle",{cx:"12",cy:"12",r:"6",fill:"#2A2859"})]}),ak=m.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",children:[m.jsx("path",{fill:"#2A2859",d:"M3 3h18v18H3z"}),m.jsx("path",{d:"m10.34 16-1.11-1.14L7 12.58l1.11-1.15 2.23 2.28L15.88 8 17 9.15l-5.55 5.71L10.34 16Z",fill:"#F1FDFF"})]}),ik=({children:e,className:t,status:n="incomplete",title:r})=>m.jsxs("li",{className:Je("pkt-step",t,`pkt-step--${n}`),"data-testid":"pkt-step",children:[m.jsx("span",{className:"pkt-step__line pkt-step__line--1","aria-hidden":!0}),m.jsx("span",{className:"pkt-step__line pkt-step__line--2","aria-hidden":!0}),m.jsx("span",{className:Je("pkt-step__indicator"),children:n==="current"?rk:n==="completed"?ak:nk}),m.jsx("span",{className:"pkt-step__line pkt-step__line--3","aria-hidden":!0}),m.jsxs("div",{className:"pkt-step__wrapper",children:[m.jsx("div",{className:"pkt-step__title",children:r}),m.jsx("div",{className:"pkt-step__content",children:e})]})]}),sk=M.forwardRef(({id:e,ariaDescribedby:t,ariaLabelledby:n,counter:r,counterMaxLength:i,className:o,disabled:u,errorMessage:c,hasError:d,helptext:h,helptextDropdown:g,helptextDropdownButton:v,inline:D,fullwidth:b=!1,label:k,name:x,optionalTag:C=!1,optionalText:T,requiredTag:F=!1,requiredText:S,placeholder:A,rows:_,useWrapper:$=!0,onChange:P,...I},j)=>{const z=[o,"pkt-textinput","pkt-textarea"].join(" "),K=n||`${e}-label`,G=M.useRef(null),[L,N]=M.useState(0),H=Q=>{var fe,ee;if(r&&N(((ee=(fe=Q.currentTarget)==null?void 0:fe.value)==null?void 0:ee.length)||0),P)return P(Q)};return M.useEffect(()=>{var Q,fe;typeof j=="function"&&j(G.current),r&&N(((fe=(Q=G==null?void 0:G.current)==null?void 0:Q.value)==null?void 0:fe.length)||0)},[j]),m.jsx(sr,{ariaDescribedby:t,className:z,disabled:u,errorMessage:c,forId:e,hasError:d,helptext:h,helptextDropdown:g,helptextDropdownButton:v,inline:D,label:k,optionalTag:C,optionalText:T,requiredTag:F,requiredText:S,useWrapper:$,counter:r,counterCurrent:L,counterMaxLength:i,children:m.jsx("textarea",{ref:G,className:`pkt-input ${b?"pkt-input--fullwidth":""} ${i&&L>i?"pkt-input--counter-error":""}`,name:x||e,id:e,placeholder:A,disabled:u,rows:_,"aria-labelledby":K,"aria-invalid":d,"aria-errormessage":`${e}-error`,...I,onChange:H})})});Z.PktAccordion=th,Z.PktAccordionItem=oh,Z.PktAlert=Wi,Z.PktBackLink=al,Z.PktBreadcrumbs=lh,Z.PktButton=Cn,Z.PktCard=Jl,Z.PktCheckbox=Ma,Z.PktDatepicker=Xl,Z.PktFooter=Wm,Z.PktFooterSimple=zm,Z.PktHeader=Vm,Z.PktIcon=ne,Z.PktIconContext=nl,Z.PktInput=Ql,Z.PktInputWrapper=sr,Z.PktLink=Zl,Z.PktLinkCard=eu,Z.PktLoader=tu,Z.PktMessagebox=nu,Z.PktPreview=jp,Z.PktProgressbar=Lp,Z.PktRadioButton=Op,Z.PktSearchInput=ek,Z.PktSelect=ho,Z.PktStep=ik,Z.PktStepper=tk,Z.PktTable=li,Z.PktTableBody=ci,Z.PktTableDataCell=Dt,Z.PktTableHeader=ui,Z.PktTableHeaderCell=Tt,Z.PktTableRow=Wn,Z.PktTabs=Np,Z.PktTag=Dr,Z.PktTextarea=sk,Z.PktTextinput=fo,Object.defineProperty(Z,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.4.0",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"react-syntax-highlighter": "^15.5.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@oslokommune/punkt-assets": "^12.
|
|
46
|
-
"@oslokommune/punkt-css": "^12.
|
|
47
|
-
"@oslokommune/punkt-elements": "^12.
|
|
45
|
+
"@oslokommune/punkt-assets": "^12.4.0",
|
|
46
|
+
"@oslokommune/punkt-css": "^12.4.0",
|
|
47
|
+
"@oslokommune/punkt-elements": "^12.4.0",
|
|
48
48
|
"@testing-library/jest-dom": "^6.5.0",
|
|
49
49
|
"@testing-library/react": "^16.0.1",
|
|
50
50
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
103
103
|
},
|
|
104
104
|
"license": "MIT",
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "aeafb5797aedf64dcfe413b752d9f46bc7a82189"
|
|
106
106
|
}
|
|
@@ -9,8 +9,8 @@ interface IPktCard extends PktElType {
|
|
|
9
9
|
skin?: 'outlined' | 'gray' | 'beige' | 'green' | 'blue'
|
|
10
10
|
heading?: string
|
|
11
11
|
subheading?: string
|
|
12
|
-
tags?: (Omit<IPktTag, 'closeTag'> & { text: string })[]
|
|
13
|
-
image?: { src: string; alt: string }
|
|
12
|
+
tags?: (Omit<IPktTag, 'closeTag'> & { text: string })[] | string
|
|
13
|
+
image?: { src: string; alt: string } | string
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
const LitComponent: FC<IPktCard> = createComponent({
|
|
@@ -101,10 +101,12 @@ export const PktPreview: React.FC<PreviewProps> = ({ specs, children, fullWidth
|
|
|
101
101
|
? (component.type as any).displayName || (component.type as any).name
|
|
102
102
|
: specs.name
|
|
103
103
|
setHtmlContent(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
'<!-- Denne koden bør testes grundig før bruk. Spør en Punkt-utvikler om du er usikker. -->\n' +
|
|
105
|
+
jsxContent
|
|
106
|
+
.replaceAll(componentType, specs.name || '')
|
|
107
|
+
.replaceAll('={', "='")
|
|
108
|
+
.replaceAll('}\n', "'\n")
|
|
109
|
+
.replaceAll(/([a-zA-Z0-9]+)(:)/g, '"$1"$2'),
|
|
108
110
|
)
|
|
109
111
|
})
|
|
110
112
|
} else {
|
|
@@ -117,7 +119,7 @@ export const PktPreview: React.FC<PreviewProps> = ({ specs, children, fullWidth
|
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
const fetchJsx = async () => {
|
|
120
|
-
const jsx = reactElementToJSXString(component)
|
|
122
|
+
const jsx = await reactElementToJSXString(component)
|
|
121
123
|
setJsxContent(jsx)
|
|
122
124
|
return Promise.resolve()
|
|
123
125
|
}
|