@warp-ds/elements 2.3.0-next.10 → 2.3.0-next.11

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.
@@ -1884,17 +1884,38 @@
1884
1884
  "type": {
1885
1885
  "text": "boolean"
1886
1886
  },
1887
- "description": "Whether the element should receive focus on render",
1887
+ "description": "Whether the element should receive focus on render.",
1888
+ "deprecated": "Use the native `autofocus` attribute instead.",
1888
1889
  "attribute": "auto-focus",
1889
1890
  "reflects": true
1890
1891
  },
1892
+ {
1893
+ "kind": "field",
1894
+ "name": "autofocus",
1895
+ "type": {
1896
+ "text": "boolean"
1897
+ },
1898
+ "description": "Whether the element should receive focus on render",
1899
+ "attribute": "autofocus",
1900
+ "reflects": true
1901
+ },
1902
+ {
1903
+ "kind": "field",
1904
+ "name": "helpText",
1905
+ "type": {
1906
+ "text": "string"
1907
+ },
1908
+ "description": "The content displayed as the help text. Paired with `invalid` to show the text as a validation error.",
1909
+ "attribute": "help-text",
1910
+ "reflects": true
1911
+ },
1891
1912
  {
1892
1913
  "kind": "field",
1893
1914
  "name": "invalid",
1894
1915
  "type": {
1895
1916
  "text": "boolean"
1896
1917
  },
1897
- "description": "Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error",
1918
+ "description": "Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error.",
1898
1919
  "attribute": "invalid",
1899
1920
  "reflects": true
1900
1921
  },
@@ -1904,7 +1925,8 @@
1904
1925
  "type": {
1905
1926
  "text": "boolean"
1906
1927
  },
1907
- "description": "Whether to always show a hint",
1928
+ "description": "Whether to always show a hint.",
1929
+ "deprecated": "Use `help-text` instead and only set it if you want to display the help text.",
1908
1930
  "attribute": "always",
1909
1931
  "reflects": true
1910
1932
  },
@@ -1914,7 +1936,8 @@
1914
1936
  "type": {
1915
1937
  "text": "string"
1916
1938
  },
1917
- "description": "The content displayed as the help text",
1939
+ "description": "The content displayed as the help text.",
1940
+ "deprecated": "Use `help-text` instead.",
1918
1941
  "attribute": "hint",
1919
1942
  "reflects": true
1920
1943
  },
@@ -1955,9 +1978,20 @@
1955
1978
  "text": "boolean"
1956
1979
  },
1957
1980
  "description": "Renders the field in a readonly state.",
1981
+ "deprecated": "Use the native readonly attribute instead.",
1958
1982
  "attribute": "read-only",
1959
1983
  "reflects": true
1960
1984
  },
1985
+ {
1986
+ "kind": "field",
1987
+ "name": "readonly",
1988
+ "type": {
1989
+ "text": "boolean"
1990
+ },
1991
+ "description": "Renders the field in a readonly state.",
1992
+ "attribute": "readonly",
1993
+ "reflects": true
1994
+ },
1961
1995
  {
1962
1996
  "kind": "field",
1963
1997
  "name": "name",
@@ -2040,15 +2074,32 @@
2040
2074
  "type": {
2041
2075
  "text": "boolean"
2042
2076
  },
2043
- "description": "Whether the element should receive focus on render",
2077
+ "description": "Whether the element should receive focus on render.",
2078
+ "deprecated": "Use the native `autofocus` attribute instead.",
2044
2079
  "fieldName": "autoFocus"
2045
2080
  },
2081
+ {
2082
+ "name": "autofocus",
2083
+ "type": {
2084
+ "text": "boolean"
2085
+ },
2086
+ "description": "Whether the element should receive focus on render",
2087
+ "fieldName": "autofocus"
2088
+ },
2089
+ {
2090
+ "name": "help-text",
2091
+ "type": {
2092
+ "text": "string"
2093
+ },
2094
+ "description": "The content displayed as the help text. Paired with `invalid` to show the text as a validation error.",
2095
+ "fieldName": "helpText"
2096
+ },
2046
2097
  {
2047
2098
  "name": "invalid",
2048
2099
  "type": {
2049
2100
  "text": "boolean"
2050
2101
  },
2051
- "description": "Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error",
2102
+ "description": "Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error.",
2052
2103
  "fieldName": "invalid"
2053
2104
  },
2054
2105
  {
@@ -2056,7 +2107,8 @@
2056
2107
  "type": {
2057
2108
  "text": "boolean"
2058
2109
  },
2059
- "description": "Whether to always show a hint",
2110
+ "description": "Whether to always show a hint.",
2111
+ "deprecated": "Use `help-text` instead and only set it if you want to display the help text.",
2060
2112
  "fieldName": "always"
2061
2113
  },
2062
2114
  {
@@ -2064,7 +2116,8 @@
2064
2116
  "type": {
2065
2117
  "text": "string"
2066
2118
  },
2067
- "description": "The content displayed as the help text",
2119
+ "description": "The content displayed as the help text.",
2120
+ "deprecated": "Use `help-text` instead.",
2068
2121
  "fieldName": "hint"
2069
2122
  },
2070
2123
  {
@@ -2097,8 +2150,17 @@
2097
2150
  "text": "boolean"
2098
2151
  },
2099
2152
  "description": "Renders the field in a readonly state.",
2153
+ "deprecated": "Use the native readonly attribute instead.",
2100
2154
  "fieldName": "readOnly"
2101
2155
  },
2156
+ {
2157
+ "name": "readonly",
2158
+ "type": {
2159
+ "text": "boolean"
2160
+ },
2161
+ "description": "Renders the field in a readonly state.",
2162
+ "fieldName": "readonly"
2163
+ },
2102
2164
  {
2103
2165
  "name": "name",
2104
2166
  "type": {
package/dist/index.d.ts CHANGED
@@ -379,15 +379,21 @@ export type WarpPillProps = {
379
379
 
380
380
 
381
381
  export type WarpSelectProps = {
382
- /** Whether the element should receive focus on render */
382
+ /** @deprecated Use the native `autofocus` attribute instead. - Whether the element should receive focus on render. */
383
383
  "auto-focus"?: WarpSelect['autoFocus'];
384
- /** Whether the element should receive focus on render */
384
+ /** @deprecated Use the native `autofocus` attribute instead. - Whether the element should receive focus on render. */
385
385
  "autoFocus"?: WarpSelect['autoFocus'];
386
- /** Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error */
386
+ /** Whether the element should receive focus on render */
387
+ "autofocus"?: WarpSelect['autofocus'];
388
+ /** The content displayed as the help text. Paired with `invalid` to show the text as a validation error. */
389
+ "help-text"?: WarpSelect['helpText'];
390
+ /** The content displayed as the help text. Paired with `invalid` to show the text as a validation error. */
391
+ "helpText"?: WarpSelect['helpText'];
392
+ /** Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error. */
387
393
  "invalid"?: WarpSelect['invalid'];
388
- /** Whether to always show a hint */
394
+ /** @deprecated Use `help-text` instead and only set it if you want to display the help text. - Whether to always show a hint. */
389
395
  "always"?: WarpSelect['always'];
390
- /** The content displayed as the help text */
396
+ /** @deprecated Use `help-text` instead. - The content displayed as the help text. */
391
397
  "hint"?: WarpSelect['hint'];
392
398
  /** The content to disply as the label */
393
399
  "label"?: WarpSelect['label'];
@@ -395,10 +401,12 @@ export type WarpSelectProps = {
395
401
  "optional"?: WarpSelect['optional'];
396
402
  /** Renders the field in a disabled state. */
397
403
  "disabled"?: WarpSelect['disabled'];
398
- /** Renders the field in a readonly state. */
404
+ /** @deprecated Use the native readonly attribute instead. - Renders the field in a readonly state. */
399
405
  "read-only"?: WarpSelect['readOnly'];
400
- /** Renders the field in a readonly state. */
406
+ /** @deprecated Use the native readonly attribute instead. - Renders the field in a readonly state. */
401
407
  "readOnly"?: WarpSelect['readOnly'];
408
+ /** Renders the field in a readonly state. */
409
+ "readonly"?: WarpSelect['readonly'];
402
410
  /** */
403
411
  "name"?: WarpSelect['name'];
404
412
  /** */
@@ -1131,14 +1139,17 @@ export type WarpTextareaProps = {
1131
1139
  *
1132
1140
  * Component attributes and properties that can be applied to the element or by using JavaScript.
1133
1141
  *
1134
- * - `auto-focus`/`autoFocus`: Whether the element should receive focus on render
1135
- * - `invalid`: Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error
1136
- * - `always`: Whether to always show a hint
1137
- * - `hint`: The content displayed as the help text
1142
+ * - `auto-focus`/`autoFocus`: Whether the element should receive focus on render.
1143
+ * - `autofocus`: Whether the element should receive focus on render
1144
+ * - `help-text`/`helpText`: The content displayed as the help text. Paired with `invalid` to show the text as a validation error.
1145
+ * - `invalid`: Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error.
1146
+ * - `always`: Whether to always show a hint.
1147
+ * - `hint`: The content displayed as the help text.
1138
1148
  * - `label`: The content to disply as the label
1139
1149
  * - `optional`: Whether to show optional text
1140
1150
  * - `disabled`: Renders the field in a disabled state.
1141
1151
  * - `read-only`/`readOnly`: Renders the field in a readonly state.
1152
+ * - `readonly`: Renders the field in a readonly state.
1142
1153
  * - `name`: undefined
1143
1154
  * - `value`: undefined
1144
1155
  *
@@ -9,7 +9,7 @@ declare const _default: {
9
9
  onChange: string;
10
10
  onchange: string;
11
11
  }>;
12
- render(args: Omit<React.HTMLAttributes<import(".").WarpCombobox>, "label" | "onchange" | "onselect" | "onChange" | "onSelect" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "disabled" | "name" | "value" | "invalid" | "optional" | "helpText" | "placeholder" | "required" | "options" | "openOnFocus" | "selectOnBlur" | "matchTextSegments" | "disableStaticFiltering" | "containerClassName" | "listClassName"> & {
12
+ render(args: Omit<React.HTMLAttributes<import(".").WarpCombobox>, "label" | "onchange" | "onselect" | "onChange" | "onSelect" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "disabled" | "name" | "value" | "invalid" | "helpText" | "optional" | "placeholder" | "required" | "options" | "openOnFocus" | "selectOnBlur" | "matchTextSegments" | "disableStaticFiltering" | "containerClassName" | "listClassName"> & {
13
13
  onSelect?: (e: Event) => void;
14
14
  onselect?: (e: Event) => void;
15
15
  onChange?: (e: Event) => void;
@@ -8,13 +8,28 @@ declare const WarpSelect_base: import("@open-wc/form-control").Constructor<impor
8
8
  */
9
9
  export declare class WarpSelect extends WarpSelect_base {
10
10
  #private;
11
- /** Whether the element should receive focus on render */
11
+ /**
12
+ * Whether the element should receive focus on render.
13
+ * @deprecated Use the native `autofocus` attribute instead.
14
+ */
12
15
  autoFocus: boolean;
13
- /** Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error */
16
+ /** Whether the element should receive focus on render */
17
+ autofocus: boolean;
18
+ /**
19
+ * The content displayed as the help text. Paired with `invalid` to show the text as a validation error.
20
+ */
21
+ helpText: string;
22
+ /** Renders the field in an invalid state. Paired with `help-text` to provide feedback about the error. */
14
23
  invalid: boolean;
15
- /** Whether to always show a hint */
24
+ /**
25
+ * Whether to always show a hint.
26
+ * @deprecated Use `help-text` instead and only set it if you want to display the help text.
27
+ */
16
28
  always: boolean;
17
- /** The content displayed as the help text */
29
+ /**
30
+ * The content displayed as the help text.
31
+ * @deprecated Use `help-text` instead.
32
+ */
18
33
  hint: string;
19
34
  /** The content to disply as the label */
20
35
  label: string;
@@ -22,8 +37,13 @@ export declare class WarpSelect extends WarpSelect_base {
22
37
  optional: boolean;
23
38
  /** Renders the field in a disabled state. */
24
39
  disabled: boolean;
25
- /** Renders the field in a readonly state. */
40
+ /**
41
+ * Renders the field in a readonly state.
42
+ * @deprecated Use the native readonly attribute instead.
43
+ */
26
44
  readOnly: boolean;
45
+ /** Renders the field in a readonly state. */
46
+ readonly: boolean;
27
47
  /** @internal */
28
48
  _options: Array<TemplateResult>;
29
49
  name: string;
@@ -1,5 +1,5 @@
1
- var Xe=Object.create;var re=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var ue=r=>{throw TypeError(r)};var pe=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ge=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ze(e))!qe.call(r,a)&&a!==o&&re(r,a,{get:()=>e[a],enumerable:!(t=he(e,a))||t.enumerable});return r};var Ke=(r,e,o)=>(o=r!=null?Xe(Je(r)):{},Ge(e||!r||!r.__esModule?re(o,"default",{value:r,enumerable:!0}):o,r));var _=(r,e,o,t)=>{for(var a=t>1?void 0:t?he(e,o):e,s=r.length-1,i;s>=0;s--)(i=r[s])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&re(e,o,a),a};var We=(r,e,o)=>e.has(r)||ue("Cannot "+o);var M=(r,e,o)=>(We(r,e,"read from private field"),o?o.call(r):e.get(r)),ge=(r,e,o)=>e.has(r)?ue("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,o);var ve=pe(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.errorMessages=P.ErrorType=void 0;var j;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(j=P.ErrorType||(P.ErrorType={}));P.errorMessages=new Map([[j.MalformedUnicode,"malformed Unicode character escape sequence"],[j.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[j.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[j.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[j.EndOfString,"malformed escape sequence at end of string"]])});var we=pe(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.unraw=O.errorMessages=O.ErrorType=void 0;var f=ve();Object.defineProperty(O,"ErrorType",{enumerable:!0,get:function(){return f.ErrorType}});Object.defineProperty(O,"errorMessages",{enumerable:!0,get:function(){return f.errorMessages}});function Qe(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function Z(r,e,o){let t=Qe(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(f.errorMessages.get(e));return t}function er(r){let e=Z(r,f.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function me(r,e){let o=Z(r,f.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=Z(e,f.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function rr(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function or(r){if(!rr(r))throw new SyntaxError(f.errorMessages.get(f.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=Z(e,f.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(f.errorMessages.get(f.ErrorType.CodePointLimit)):t}}function tr(r,e=!1){if(e)throw new SyntaxError(f.errorMessages.get(f.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var ar=new Map([["b","\b"],["f","\f"],["n",`
2
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ir(r){return ar.get(r)||r}var nr=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function fe(r,e=!1){return r.replace(nr,function(o,t,a,s,i,n,c,h,v){if(t!==void 0)return"\\";if(a!==void 0)return er(a);if(s!==void 0)return or(s);if(i!==void 0)return me(i,n);if(c!==void 0)return me(c);if(h==="0")return"\0";if(h!==void 0)return tr(h,!e);if(v!==void 0)return ir(v);throw new SyntaxError(f.errorMessages.get(f.ErrorType.EndOfString))})}O.unraw=fe;O.default=fe});import{css as Sr,html as I,LitElement as Pr}from"lit";var X=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r.reduce(function(o,t){return o.concat(typeof t=="string"?t:Array.isArray(t)?X.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var ye=Ke(we(),1);var $=r=>typeof r=="string",sr=r=>typeof r=="function",xe=new Map,_e="en";function ie(r){return[...Array.isArray(r)?r:[r],_e]}function ne(r,e,o){let t=ie(r);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return J(()=>q("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format($(e)?new Date(e):e)}function lr(r,e,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return ne(r,e,t)}function oe(r,e,o){let t=ie(r);return J(()=>q("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function ke(r,e,o,{offset:t=0,...a}){var n,c;let s=ie(r),i=e?J(()=>q("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):J(()=>q("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return(c=(n=a[o])!=null?n:a[i.select(o-t)])!=null?c:a.other}function J(r,e){let o=r(),t=xe.get(o);return t||(t=e(),xe.set(o,t)),t}function q(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var Ce=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ze="%__lingui_octothorpe__%",cr=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],s=(i,n)=>{let c=Object.keys(o).length?a("number"):void 0,h=oe(t,i,c);return n.replace(new RegExp(ze,"g"),h)};return{plural:(i,n)=>{let{offset:c=0}=n,h=ke(t,!1,i,n);return s(i-c,h)},selectordinal:(i,n)=>{let{offset:c=0}=n,h=ke(t,!0,i,n);return s(i-c,h)},select:dr,number:(i,n)=>oe(t,i,a(n)||{style:n}),date:(i,n)=>ne(t,i,a(n)||n),time:(i,n)=>lr(t,i,a(n)||n)}},dr=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function br(r,e,o){return(t={},a)=>{let s=cr(e,o,a),i=(c,h=!1)=>Array.isArray(c)?c.reduce((v,C)=>{if(C==="#"&&h)return v+ze;if($(C))return v+C;let[F,k,A]=C,T={};k==="plural"||k==="selectordinal"||k==="select"?Object.entries(A).forEach(([S,Y])=>{T[S]=i(Y,k==="plural"||k==="selectordinal")}):T=A;let x;if(k){let S=s[k];x=S(t[F],T)}else x=t[F];return x==null?v:v+x},""):c,n=i(r);return $(n)&&Ce.test(n)?(0,ye.unraw)(n):$(n)?n:n?String(n):""}}var hr=Object.defineProperty,ur=(r,e,o)=>e in r?hr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,pr=(r,e,o)=>(ur(r,typeof e!="symbol"?e+"":e,o),o),te=class{constructor(){pr(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},gr=Object.defineProperty,vr=(r,e,o)=>e in r?gr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,D=(r,e,o)=>(vr(r,typeof e!="symbol"?e+"":e,o),o),ae=class extends te{constructor(e){var o;super(),D(this,"_locale",""),D(this,"_locales"),D(this,"_localeData",{}),D(this,"_messages",{}),D(this,"_missing"),D(this,"_messageCompiler"),D(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((o=e.locale)!=null?o:_e,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,o,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),$(e)||(o=e.values||o,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return sr(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let c=s||a||e;return $(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
1
+ var Xe=Object.create;var re=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var Ze=Object.getOwnPropertyNames;var Je=Object.getPrototypeOf,qe=Object.prototype.hasOwnProperty;var ue=r=>{throw TypeError(r)};var pe=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Ge=(r,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Ze(e))!qe.call(r,a)&&a!==o&&re(r,a,{get:()=>e[a],enumerable:!(t=he(e,a))||t.enumerable});return r};var Ke=(r,e,o)=>(o=r!=null?Xe(Je(r)):{},Ge(e||!r||!r.__esModule?re(o,"default",{value:r,enumerable:!0}):o,r));var w=(r,e,o,t)=>{for(var a=t>1?void 0:t?he(e,o):e,s=r.length-1,i;s>=0;s--)(i=r[s])&&(a=(t?i(e,o,a):i(a))||a);return t&&a&&re(e,o,a),a};var We=(r,e,o)=>e.has(r)||ue("Cannot "+o);var M=(r,e,o)=>(We(r,e,"read from private field"),o?o.call(r):e.get(r)),ge=(r,e,o)=>e.has(r)?ue("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,o);var ve=pe(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.errorMessages=P.ErrorType=void 0;var j;(function(r){r.MalformedUnicode="MALFORMED_UNICODE",r.MalformedHexadecimal="MALFORMED_HEXADECIMAL",r.CodePointLimit="CODE_POINT_LIMIT",r.OctalDeprecation="OCTAL_DEPRECATION",r.EndOfString="END_OF_STRING"})(j=P.ErrorType||(P.ErrorType={}));P.errorMessages=new Map([[j.MalformedUnicode,"malformed Unicode character escape sequence"],[j.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[j.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[j.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[j.EndOfString,"malformed escape sequence at end of string"]])});var we=pe(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.unraw=O.errorMessages=O.ErrorType=void 0;var x=ve();Object.defineProperty(O,"ErrorType",{enumerable:!0,get:function(){return x.ErrorType}});Object.defineProperty(O,"errorMessages",{enumerable:!0,get:function(){return x.errorMessages}});function Qe(r){return!r.match(/[^a-f0-9]/i)?parseInt(r,16):NaN}function Z(r,e,o){let t=Qe(r);if(Number.isNaN(t)||o!==void 0&&o!==r.length)throw new SyntaxError(x.errorMessages.get(e));return t}function er(r){let e=Z(r,x.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function me(r,e){let o=Z(r,x.ErrorType.MalformedUnicode,4);if(e!==void 0){let t=Z(e,x.ErrorType.MalformedUnicode,4);return String.fromCharCode(o,t)}return String.fromCharCode(o)}function rr(r){return r.charAt(0)==="{"&&r.charAt(r.length-1)==="}"}function or(r){if(!rr(r))throw new SyntaxError(x.errorMessages.get(x.ErrorType.MalformedUnicode));let e=r.slice(1,-1),o=Z(e,x.ErrorType.MalformedUnicode);try{return String.fromCodePoint(o)}catch(t){throw t instanceof RangeError?new SyntaxError(x.errorMessages.get(x.ErrorType.CodePointLimit)):t}}function tr(r,e=!1){if(e)throw new SyntaxError(x.errorMessages.get(x.ErrorType.OctalDeprecation));let o=parseInt(r,8);return String.fromCharCode(o)}var ar=new Map([["b","\b"],["f","\f"],["n",`
2
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function ir(r){return ar.get(r)||r}var nr=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function fe(r,e=!1){return r.replace(nr,function(o,t,a,s,i,n,c,h,m){if(t!==void 0)return"\\";if(a!==void 0)return er(a);if(s!==void 0)return or(s);if(i!==void 0)return me(i,n);if(c!==void 0)return me(c);if(h==="0")return"\0";if(h!==void 0)return tr(h,!e);if(m!==void 0)return ir(m);throw new SyntaxError(x.errorMessages.get(x.ErrorType.EndOfString))})}O.unraw=fe;O.default=fe});import{css as Sr,html as I,LitElement as Pr}from"lit";var X=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return r.reduce(function(o,t){return o.concat(typeof t=="string"?t:Array.isArray(t)?X.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};var ye=Ke(we(),1);var A=r=>typeof r=="string",sr=r=>typeof r=="function",xe=new Map,_e="en";function ie(r){return[...Array.isArray(r)?r:[r],_e]}function ne(r,e,o){let t=ie(r);o||(o="default");let a;if(typeof o=="string")switch(a={day:"numeric",month:"short",year:"numeric"},o){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=o;return J(()=>q("date",t,o),()=>new Intl.DateTimeFormat(t,a)).format(A(e)?new Date(e):e)}function lr(r,e,o){let t;if(o||(o="default"),typeof o=="string")switch(t={second:"numeric",minute:"numeric",hour:"numeric"},o){case"full":case"long":t.timeZoneName="short";break;case"short":delete t.second}else t=o;return ne(r,e,t)}function oe(r,e,o){let t=ie(r);return J(()=>q("number",t,o),()=>new Intl.NumberFormat(t,o)).format(e)}function ke(r,e,o,{offset:t=0,...a}){var n,c;let s=ie(r),i=e?J(()=>q("plural-ordinal",s),()=>new Intl.PluralRules(s,{type:"ordinal"})):J(()=>q("plural-cardinal",s),()=>new Intl.PluralRules(s,{type:"cardinal"}));return(c=(n=a[o])!=null?n:a[i.select(o-t)])!=null?c:a.other}function J(r,e){let o=r(),t=xe.get(o);return t||(t=e(),xe.set(o,t)),t}function q(r,e,o){let t=e.join("-");return`${r}-${t}-${JSON.stringify(o)}`}var Ce=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,ze="%__lingui_octothorpe__%",cr=(r,e,o={})=>{let t=e||r,a=i=>typeof i=="object"?i:o[i],s=(i,n)=>{let c=Object.keys(o).length?a("number"):void 0,h=oe(t,i,c);return n.replace(new RegExp(ze,"g"),h)};return{plural:(i,n)=>{let{offset:c=0}=n,h=ke(t,!1,i,n);return s(i-c,h)},selectordinal:(i,n)=>{let{offset:c=0}=n,h=ke(t,!0,i,n);return s(i-c,h)},select:dr,number:(i,n)=>oe(t,i,a(n)||{style:n}),date:(i,n)=>ne(t,i,a(n)||n),time:(i,n)=>lr(t,i,a(n)||n)}},dr=(r,e)=>{var o;return(o=e[r])!=null?o:e.other};function br(r,e,o){return(t={},a)=>{let s=cr(e,o,a),i=(c,h=!1)=>Array.isArray(c)?c.reduce((m,z)=>{if(z==="#"&&h)return m+ze;if(A(z))return m+z;let[F,_,T]=z,$={};_==="plural"||_==="selectordinal"||_==="select"?Object.entries(T).forEach(([S,Y])=>{$[S]=i(Y,_==="plural"||_==="selectordinal")}):$=T;let y;if(_){let S=s[_];y=S(t[F],$)}else y=t[F];return y==null?m:m+y},""):c,n=i(r);return A(n)&&Ce.test(n)?(0,ye.unraw)(n):A(n)?n:n?String(n):""}}var hr=Object.defineProperty,ur=(r,e,o)=>e in r?hr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,pr=(r,e,o)=>(ur(r,typeof e!="symbol"?e+"":e,o),o),te=class{constructor(){pr(this,"_events",{})}on(e,o){var a;var t;return(a=(t=this._events)[e])!=null||(t[e]=[]),this._events[e].push(o),()=>this.removeListener(e,o)}removeListener(e,o){let t=this._getListeners(e);if(!t)return;let a=t.indexOf(o);~a&&t.splice(a,1)}emit(e,...o){let t=this._getListeners(e);t&&t.map(a=>a.apply(this,o))}_getListeners(e){let o=this._events[e];return Array.isArray(o)?o:!1}},gr=Object.defineProperty,vr=(r,e,o)=>e in r?gr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[e]=o,D=(r,e,o)=>(vr(r,typeof e!="symbol"?e+"":e,o),o),ae=class extends te{constructor(e){var o;super(),D(this,"_locale",""),D(this,"_locales"),D(this,"_localeData",{}),D(this,"_messages",{}),D(this,"_missing"),D(this,"_messageCompiler"),D(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((o=e.locale)!=null?o:_e,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){var e;return(e=this._messages[this._locale])!=null?e:{}}get localeData(){var e;return(e=this._localeData[this._locale])!=null?e:{}}_loadLocaleData(e,o){let t=this._localeData[e];t?Object.assign(t,o):this._localeData[e]=o}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,o){typeof e=="string"?this._loadLocaleData(e,o):Object.keys(e).forEach(t=>this._loadLocaleData(t,e[t])),this.emit("change")}_load(e,o){let t=this._messages[e];t?Object.assign(t,o):this._messages[e]=o}load(e,o){typeof e=="string"&&typeof o=="object"?this._load(e,o):Object.entries(e).forEach(([t,a])=>this._load(t,a)),this.emit("change")}loadAndActivate({locale:e,locales:o,messages:t}){this._locale=e,this._locales=o||void 0,this._messages[this._locale]=t,this.emit("change")}activate(e,o){this._locale=e,this._locales=o,this.emit("change")}_(e,o,t){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=t==null?void 0:t.message;e||(e=""),A(e)||(o=e.values||o,a=e.message,e=e.id);let s=this.messages[e],i=s===void 0,n=this._missing;if(n&&i)return sr(n)?n(this._locale,e):n;i&&this.emit("missing",{id:e,locale:this._locale});let c=s||a||e;return A(c)&&(this._messageCompiler?c=this._messageCompiler(c):console.warn(`Uncompiled message detected! Message:
3
3
 
4
4
  > ${c}
5
5
 
@@ -7,7 +7,7 @@ That means you use raw catalog or your catalog doesn't have a translation for th
7
7
  ICU features such as interpolation and plurals will not work properly for that message.
8
8
 
9
9
  Please compile your catalog first.
10
- `)),$(c)&&Ce.test(c)?JSON.parse(`"${c}"`):$(c)?c:br(c,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return ne(this._locales||this._locale,e,o)}number(e,o){return oe(this._locales||this._locale,e,o)}};function mr(r={}){return new ae(r)}var E=mr();var b=function(r,e,o,t){if(o==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!t:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?t:o==="a"?t.call(r):t?t.value:e.get(r)},p=function(r,e,o,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(r,o):a?a.value=o:e.set(r,o),o};function Me(r){var e,o,t,a,s,i,n,c,h,v,C,F,k,A,T,x,S,Y,W;class He extends r{constructor(...l){var d,u,g;super(...l),e.add(this),this.internals=this.attachInternals(),o.set(this,!1),t.set(this,!1),a.set(this,!1),s.set(this,void 0),i.set(this,void 0),n.set(this,!0),h.set(this,""),v.set(this,()=>{p(this,a,!0,"f"),p(this,o,!0,"f"),b(this,e,"m",x).call(this)}),C.set(this,()=>{p(this,o,!1,"f"),b(this,e,"m",S).call(this,this.shouldFormValueUpdate()?b(this,h,"f"):""),!this.validity.valid&&b(this,a,"f")&&p(this,t,!0,"f");let L=b(this,e,"m",x).call(this);this.validationMessageCallback&&this.validationMessageCallback(L?this.internals.validationMessage:"")}),F.set(this,()=>{var L;b(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),p(this,n,!1,"f")),p(this,a,!0,"f"),p(this,t,!0,"f"),b(this,e,"m",x).call(this),(L=this===null||this===void 0?void 0:this.validationMessageCallback)===null||L===void 0||L.call(this,this.showError?this.internals.validationMessage:"")}),k.set(this,void 0),A.set(this,!1),T.set(this,Promise.resolve()),(d=this.addEventListener)===null||d===void 0||d.call(this,"focus",b(this,v,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",b(this,C,"f")),(g=this.addEventListener)===null||g===void 0||g.call(this,"invalid",b(this,F,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(g=>g.attribute).flat(),d=super.observedAttributes||[];return[...new Set([...d,...l])]}static getValidator(l){return this.validators.find(d=>d.attribute===l)||null}static getValidators(l){return this.validators.filter(d=>{var u;if(d.attribute===l||!((u=d.attribute)===null||u===void 0)&&u.includes(l))return!0})}get form(){return this.internals.form}get showError(){return b(this,e,"m",x).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,d,u){var g;(g=super.attributeChangedCallback)===null||g===void 0||g.call(this,l,d,u);let R=this.constructor.getValidators(l);R!=null&&R.length&&this.validationTarget&&this.setValue(b(this,h,"f"))}setValue(l){var d;p(this,t,!1,"f"),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,""),p(this,h,l,"f");let g=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(g),b(this,e,"m",S).call(this,g),this.valueChangedCallback&&this.valueChangedCallback(g),b(this,e,"m",x).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(b(this,T,"f")))}formResetCallback(){var l,d;p(this,a,!1,"f"),p(this,t,!1,"f"),b(this,e,"m",x).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,b(this,e,"m",x).call(this)?this.validationMessage:"")}}return o=new WeakMap,t=new WeakMap,a=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakMap,h=new WeakMap,v=new WeakMap,C=new WeakMap,F=new WeakMap,k=new WeakMap,A=new WeakMap,T=new WeakMap,e=new WeakSet,c=function(){let l=this.getRootNode(),d=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(d)},x=function(){if(this.hasAttribute("disabled"))return!1;let l=b(this,t,"f")||b(this,a,"f")&&!this.validity.valid&&!b(this,o,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},S=function(l){let d=this.constructor,u={},g=d.validators,L=[],R=g.some(y=>y.isValid instanceof Promise);b(this,A,"f")||(p(this,T,new Promise(y=>{p(this,k,y,"f")}),"f"),p(this,A,!0,"f")),b(this,s,"f")&&(b(this,s,"f").abort(),p(this,i,b(this,s,"f"),"f"));let B=new AbortController;p(this,s,B,"f");let H,be=!1;g.length&&(g.forEach(y=>{let Q=y.key||"customError",V=y.isValid(this,l,B.signal);V instanceof Promise?(L.push(V),V.then(ee=>{ee!=null&&(u[Q]=!ee,H=b(this,e,"m",W).call(this,y,l),b(this,e,"m",Y).call(this,u,H))})):(u[Q]=!V,this.validity[Q]!==!V&&(be=!0),!V&&!H&&(H=b(this,e,"m",W).call(this,y,l)))}),Promise.allSettled(L).then(()=>{var y;B!=null&&B.signal.aborted||(p(this,A,!1,"f"),(y=b(this,k,"f"))===null||y===void 0||y.call(this))}),(be||!R)&&b(this,e,"m",Y).call(this,u,H))},Y=function(l,d){if(this.validationTarget)this.internals.setValidity(l,d,this.validationTarget),p(this,n,!1,"f");else{if(this.internals.setValidity(l,d),this.internals.validity.valid)return;p(this,n,!0,"f")}},W=function(l,d){if(this.validityCallback){let u=this.validityCallback(l.key||"customError");if(u)return u}return l.message instanceof Function?l.message(this,d):l.message},He}import{property as z}from"lit/decorators.js";import{ifDefined as le}from"lit/directives/if-defined.js";import{when as ce}from"lit/directives/when.js";var fr=["en","nb","fi","da","sv"],Fe="en",Ee=r=>fr.find(e=>r===e||r.toLowerCase().includes(e))||Fe;function wr(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ee(r)}try{let r=document.documentElement.lang;return Ee(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Fe}}var xr=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,Le=(r,e,o,t,a)=>{let s=wr(),i=xr(s,r,e,o,t,a);E.load(s,i),E.activate(s)};import{css as Oe}from"lit";var Ne=Oe`
10
+ `)),A(c)&&Ce.test(c)?JSON.parse(`"${c}"`):A(c)?c:br(c,this._locale,this._locales)(o,t==null?void 0:t.formats)}date(e,o){return ne(this._locales||this._locale,e,o)}number(e,o){return oe(this._locales||this._locale,e,o)}};function mr(r={}){return new ae(r)}var E=mr();var b=function(r,e,o,t){if(o==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!t:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?t:o==="a"?t.call(r):t?t.value:e.get(r)},p=function(r,e,o,t,a){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?a.call(r,o):a?a.value=o:e.set(r,o),o};function Me(r){var e,o,t,a,s,i,n,c,h,m,z,F,_,T,$,y,S,Y,W;class He extends r{constructor(...l){var d,u,v;super(...l),e.add(this),this.internals=this.attachInternals(),o.set(this,!1),t.set(this,!1),a.set(this,!1),s.set(this,void 0),i.set(this,void 0),n.set(this,!0),h.set(this,""),m.set(this,()=>{p(this,a,!0,"f"),p(this,o,!0,"f"),b(this,e,"m",y).call(this)}),z.set(this,()=>{p(this,o,!1,"f"),b(this,e,"m",S).call(this,this.shouldFormValueUpdate()?b(this,h,"f"):""),!this.validity.valid&&b(this,a,"f")&&p(this,t,!0,"f");let L=b(this,e,"m",y).call(this);this.validationMessageCallback&&this.validationMessageCallback(L?this.internals.validationMessage:"")}),F.set(this,()=>{var L;b(this,n,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),p(this,n,!1,"f")),p(this,a,!0,"f"),p(this,t,!0,"f"),b(this,e,"m",y).call(this),(L=this===null||this===void 0?void 0:this.validationMessageCallback)===null||L===void 0||L.call(this,this.showError?this.internals.validationMessage:"")}),_.set(this,void 0),T.set(this,!1),$.set(this,Promise.resolve()),(d=this.addEventListener)===null||d===void 0||d.call(this,"focus",b(this,m,"f")),(u=this.addEventListener)===null||u===void 0||u.call(this,"blur",b(this,z,"f")),(v=this.addEventListener)===null||v===void 0||v.call(this,"invalid",b(this,F,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let l=this.validators.map(v=>v.attribute).flat(),d=super.observedAttributes||[];return[...new Set([...d,...l])]}static getValidator(l){return this.validators.find(d=>d.attribute===l)||null}static getValidators(l){return this.validators.filter(d=>{var u;if(d.attribute===l||!((u=d.attribute)===null||u===void 0)&&u.includes(l))return!0})}get form(){return this.internals.form}get showError(){return b(this,e,"m",y).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(l,d,u){var v;(v=super.attributeChangedCallback)===null||v===void 0||v.call(this,l,d,u);let R=this.constructor.getValidators(l);R!=null&&R.length&&this.validationTarget&&this.setValue(b(this,h,"f"))}setValue(l){var d;p(this,t,!1,"f"),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,""),p(this,h,l,"f");let v=this.shouldFormValueUpdate()?l:null;this.internals.setFormValue(v),b(this,e,"m",S).call(this,v),this.valueChangedCallback&&this.valueChangedCallback(v),b(this,e,"m",y).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(l=>l(b(this,$,"f")))}formResetCallback(){var l,d;p(this,a,!1,"f"),p(this,t,!1,"f"),b(this,e,"m",y).call(this),(l=this.resetFormControl)===null||l===void 0||l.call(this),(d=this.validationMessageCallback)===null||d===void 0||d.call(this,b(this,e,"m",y).call(this)?this.validationMessage:"")}}return o=new WeakMap,t=new WeakMap,a=new WeakMap,s=new WeakMap,i=new WeakMap,n=new WeakMap,h=new WeakMap,m=new WeakMap,z=new WeakMap,F=new WeakMap,_=new WeakMap,T=new WeakMap,$=new WeakMap,e=new WeakSet,c=function(){let l=this.getRootNode(),d=`${this.localName}[name="${this.getAttribute("name")}"]`;return l.querySelectorAll(d)},y=function(){if(this.hasAttribute("disabled"))return!1;let l=b(this,t,"f")||b(this,a,"f")&&!this.validity.valid&&!b(this,o,"f");return l&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),l},S=function(l){let d=this.constructor,u={},v=d.validators,L=[],R=v.some(C=>C.isValid instanceof Promise);b(this,T,"f")||(p(this,$,new Promise(C=>{p(this,_,C,"f")}),"f"),p(this,T,!0,"f")),b(this,s,"f")&&(b(this,s,"f").abort(),p(this,i,b(this,s,"f"),"f"));let B=new AbortController;p(this,s,B,"f");let H,be=!1;v.length&&(v.forEach(C=>{let Q=C.key||"customError",V=C.isValid(this,l,B.signal);V instanceof Promise?(L.push(V),V.then(ee=>{ee!=null&&(u[Q]=!ee,H=b(this,e,"m",W).call(this,C,l),b(this,e,"m",Y).call(this,u,H))})):(u[Q]=!V,this.validity[Q]!==!V&&(be=!0),!V&&!H&&(H=b(this,e,"m",W).call(this,C,l)))}),Promise.allSettled(L).then(()=>{var C;B!=null&&B.signal.aborted||(p(this,T,!1,"f"),(C=b(this,_,"f"))===null||C===void 0||C.call(this))}),(be||!R)&&b(this,e,"m",Y).call(this,u,H))},Y=function(l,d){if(this.validationTarget)this.internals.setValidity(l,d,this.validationTarget),p(this,n,!1,"f");else{if(this.internals.setValidity(l,d),this.internals.validity.valid)return;p(this,n,!0,"f")}},W=function(l,d){if(this.validityCallback){let u=this.validityCallback(l.key||"customError");if(u)return u}return l.message instanceof Function?l.message(this,d):l.message},He}import{property as k}from"lit/decorators.js";import{ifDefined as le}from"lit/directives/if-defined.js";import{when as ce}from"lit/directives/when.js";var fr=["en","nb","fi","da","sv"],Fe="en",Ee=r=>fr.find(e=>r===e||r.toLowerCase().includes(e))||Fe;function wr(){if(typeof window=="undefined"){let r=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return Ee(r)}try{let r=document.documentElement.lang;return Ee(r)}catch(r){return console.warn("could not detect locale, falling back to source locale",r),Fe}}var xr=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,Le=(r,e,o,t,a)=>{let s=wr(),i=xr(s,r,e,o,t,a);E.load(s,i),E.activate(s)};import{css as Oe}from"lit";var Ne=Oe`
11
11
  *,
12
12
  :before,
13
13
  :after {
@@ -2446,8 +2446,8 @@ Please compile your catalog first.
2446
2446
  display: none
2447
2447
  }
2448
2448
  }
2449
- `;var Ae=JSON.parse('{"select.label.optional":["(valgfrit)"]}');var Te=JSON.parse('{"select.label.optional":["(optional)"]}');var $e=JSON.parse('{"select.label.optional":["(vapaaehtoinen)"]}');var Se=JSON.parse('{"select.label.optional":["(valgfritt)"]}');var Pe=JSON.parse('{"select.label.optional":["(valfritt)"]}');import{css as kr}from"lit";var De=kr`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-0{border-width:0}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.opacity-25{opacity:.25}.block,.before\\:block:before{display:block}.before\\:hidden:before{display:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.bottom-0{bottom:0}.right-0{right:0}.before\\:bottom-0:before{bottom:0}.before\\:right-0:before{right:0}.top-\\[30\\%\\]{top:30%}.absolute{position:absolute}.relative{position:relative}.static{position:static}.before\\:absolute:before{position:absolute}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.s-icon{color:var(--w-s-color-icon)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-disabled:hover{border-color:var(--w-s-color-border-disabled)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-disabled:active{border-color:var(--w-s-color-border-disabled)}.h-full{height:100%}.w-32{width:3.2rem}.w-full{width:100%}.before\\:h-full:before{height:100%}.before\\:w-32:before{width:3.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-32{padding-right:3.2rem}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none,.before\\:pointer-events-none:before{pointer-events:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{LitElement as yr}from"lit";import{unsafeStatic as _r,html as Cr}from"lit/static-html.js";var zr=JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}'),Mr=JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}'),Er=JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}'),Fr=JSON.parse('{"icon.title.chevron-down":["Pil nedad"]}'),Lr=JSON.parse('{"icon.title.chevron-down":["Pil ned"]}'),Ve=["en","nb","fi","da","sv"],je="en",Or=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Ie=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":je},se=r=>Ve.find(e=>r===e||r.toLowerCase().includes(e))||Ie();function Nr(){var r;if(typeof window=="undefined"){let e=Or();return se(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=Ie();return Ve.includes(e)?se(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),se(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),je}}var Ar=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,Tr=(r,e,o,t,a)=>{let s=Nr(),i=Ar(s,r,e,o,t,a);E.load(s,i),E.activate(s)};Tr(Mr,zr,Er,Fr,Lr);var $r=class extends yr{render(){let r=E.t({message:"Downward arrow",id:"icon.title.chevron-down",comment:"Title for chevron-down icon"});return Cr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${_r(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-down-16")||customElements.define("w-icon-chevron-down-16",$r);var N={base:"block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current",default:"s-text s-bg pl-8 border-1 s-border-strong hover:s-border-strong-hover active:s-border-active",disabled:"s-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none",invalid:"s-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!",readOnly:"s-text bg-transparent pl-0 border-0 pointer-events-none before:hidden",wrapper:"relative",selectWrapper:"relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none ",chevron:"block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer",chevronDisabled:"opacity-25"},Ye={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},de={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},m,Ue,Re,Be,G,K,w=class extends Me(Pr){constructor(){super();ge(this,m);this._setValue=o=>{this.value=o,this.setValue(o)};Le(Te,Se,$e,Ae,Pe)}connectedCallback(){super.connectedCallback(),this.autoFocus&&this.shadowRoot.querySelector("select").focus();let t=Array.from(this.children).filter(a=>a.tagName.toLowerCase()==="option"||a.tagName.toLowerCase()==="w-option").map(a=>{var h,v;let s=(h=a.getAttribute("value"))!=null?h:"",i=(v=a.textContent)!=null?v:"",n=a.hasAttribute("selected"),c=a.hasAttribute("disabled");return n&&this._setValue(s),I`<option value="${s}" ?selected=${n} ?disabled=${c}>${i}</option>`});this._options=t}handleKeyDown(o){this.readOnly&&(o.key===" "||o.key==="ArrowDown"||o.key==="ArrowUp")&&o.preventDefault()}onChange({target:o}){this._setValue(o.value);let t=new CustomEvent("change",{detail:o.value}),s=Array.from(this.children).filter(i=>i.tagName.toLowerCase()==="option"||i.tagName.toLowerCase()==="w-option").map(i=>{var C,F;let n=(C=i.getAttribute("value"))!=null?C:"",c=n===o.value,h=(F=i.textContent)!=null?F:"",v=i.hasAttribute("disabled");return I`<option value="${n}" ?selected=${c} ?disabled=${v}>${h}</option>`});this._options=s,this.dispatchEvent(t)}render(){return I`<div class="${N.wrapper}">
2450
- ${ce(this.label,()=>I`<label class="${Ye.base}" for="${M(this,m,G)}">
2449
+ `;var Te=JSON.parse('{"select.label.optional":["(valgfrit)"]}');var $e=JSON.parse('{"select.label.optional":["(optional)"]}');var Ae=JSON.parse('{"select.label.optional":["(vapaaehtoinen)"]}');var Se=JSON.parse('{"select.label.optional":["(valgfritt)"]}');var Pe=JSON.parse('{"select.label.optional":["(valfritt)"]}');import{css as kr}from"lit";var De=kr`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-0{border-width:0}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.opacity-25{opacity:.25}.block,.before\\:block:before{display:block}.before\\:hidden:before{display:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.bottom-0{bottom:0}.right-0{right:0}.before\\:bottom-0:before{bottom:0}.before\\:right-0:before{right:0}.top-\\[30\\%\\]{top:30%}.absolute{position:absolute}.relative{position:relative}.static{position:static}.before\\:absolute:before{position:absolute}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.s-icon{color:var(--w-s-color-icon)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.s-border-strong{border-color:var(--w-s-color-border-strong)}.hover\\:s-border-disabled:hover{border-color:var(--w-s-color-border-disabled)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.hover\\:s-border-strong-hover:hover{border-color:var(--w-s-color-border-strong-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-disabled:active{border-color:var(--w-s-color-border-disabled)}.h-full{height:100%}.w-32{width:3.2rem}.w-full{width:100%}.before\\:h-full:before{height:100%}.before\\:w-32:before{width:3.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-32{padding-right:3.2rem}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none,.before\\:pointer-events-none:before{pointer-events:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{LitElement as yr}from"lit";import{unsafeStatic as _r,html as Cr}from"lit/static-html.js";var zr=JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}'),Mr=JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}'),Er=JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}'),Fr=JSON.parse('{"icon.title.chevron-down":["Pil nedad"]}'),Lr=JSON.parse('{"icon.title.chevron-down":["Pil ned"]}'),Ve=["en","nb","fi","da","sv"],je="en",Or=()=>{var r;let e;switch((r=process==null?void 0:process.env)==null?void 0:r.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Ie=()=>{var r;let e=(r=document==null?void 0:document.location)==null?void 0:r.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":je},se=r=>Ve.find(e=>r===e||r.toLowerCase().includes(e))||Ie();function Nr(){var r;if(typeof window=="undefined"){let e=Or();return se(e)}try{let e=(r=document==null?void 0:document.documentElement)==null?void 0:r.lang,o=Ie();return Ve.includes(e)?se(e!=null?e:o):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),se(o))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),je}}var Tr=(r,e,o,t,a,s)=>r==="nb"?o:r==="fi"?t:r==="da"?a:r==="sv"?s:e,$r=(r,e,o,t,a)=>{let s=Nr(),i=Tr(s,r,e,o,t,a);E.load(s,i),E.activate(s)};$r(Mr,zr,Er,Fr,Lr);var Ar=class extends yr{render(){let r=E.t({message:"Downward arrow",id:"icon.title.chevron-down",comment:"Title for chevron-down icon"});return Cr`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${_r(`<title>${r}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-down-16")||customElements.define("w-icon-chevron-down-16",Ar);var N={base:"block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current",default:"s-text s-bg pl-8 border-1 s-border-strong hover:s-border-strong-hover active:s-border-active",disabled:"s-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none",invalid:"s-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!",readOnly:"s-text bg-transparent pl-0 border-0 pointer-events-none before:hidden",wrapper:"relative",selectWrapper:"relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none ",chevron:"block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer",chevronDisabled:"opacity-25"},Ye={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},de={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},f,Ue,Re,Be,G,K,g=class extends Me(Pr){constructor(){super();ge(this,f);this._setValue=o=>{this.value=o,this.setValue(o)};Le($e,Se,Ae,Te,Pe)}connectedCallback(){super.connectedCallback(),(this.autofocus||this.autoFocus)&&this.shadowRoot.querySelector("select").focus();let t=Array.from(this.children).filter(a=>a.tagName.toLowerCase()==="option"||a.tagName.toLowerCase()==="w-option").map(a=>{var h,m;let s=(h=a.getAttribute("value"))!=null?h:"",i=(m=a.textContent)!=null?m:"",n=a.hasAttribute("selected"),c=a.hasAttribute("disabled");return n&&this._setValue(s),I`<option value="${s}" ?selected=${n} ?disabled=${c}>${i}</option>`});this._options=t}handleKeyDown(o){(this.readonly||this.readOnly)&&(o.key===" "||o.key==="ArrowDown"||o.key==="ArrowUp")&&o.preventDefault()}onChange({target:o}){this._setValue(o.value);let t=new CustomEvent("change",{detail:o.value}),s=Array.from(this.children).filter(i=>i.tagName.toLowerCase()==="option"||i.tagName.toLowerCase()==="w-option").map(i=>{var z,F;let n=(z=i.getAttribute("value"))!=null?z:"",c=n===o.value,h=(F=i.textContent)!=null?F:"",m=i.hasAttribute("disabled");return I`<option value="${n}" ?selected=${c} ?disabled=${m}>${h}</option>`});this._options=s,this.dispatchEvent(t)}render(){return I`<div class="${N.wrapper}">
2450
+ ${ce(this.label,()=>I`<label class="${Ye.base}" for="${M(this,f,G)}">
2451
2451
  ${this.label}
2452
2452
  ${ce(this.optional,()=>I`<span class="${Ye.optional}"
2453
2453
  >${E._({id:"select.label.optional",message:"(optional)",comment:"Shown behind label when marked as optional"})}</span
@@ -2455,27 +2455,28 @@ Please compile your catalog first.
2455
2455
  >`)}
2456
2456
  <div class="${N.selectWrapper}">
2457
2457
  <select
2458
- class="${M(this,m,Ue)}"
2459
- id="${M(this,m,G)}"
2458
+ class="${M(this,f,Ue)}"
2459
+ id="${M(this,f,G)}"
2460
2460
  ?disabled=${this.disabled}
2461
- aria-describedby="${le(M(this,m,K))}"
2461
+ aria-readonly="${this.readonly}"
2462
+ aria-describedby="${le(M(this,f,K))}"
2462
2463
  aria-invalid="${le(this.invalid)}"
2463
- aria-errormessage="${le(this.invalid&&M(this,m,K))}"
2464
+ aria-errormessage="${le(this.invalid&&M(this,f,K))}"
2464
2465
  @keydown=${this.handleKeyDown}
2465
2466
  @change=${this.onChange}>
2466
2467
  ${this._options}
2467
2468
  </select>
2468
- <div class="${M(this,m,Be)}">
2469
+ <div class="${M(this,f,Be)}">
2469
2470
  <w-icon-chevron-down-16></w-icon-chevron-down-16>
2470
2471
  </div>
2471
2472
  </div>
2472
- ${ce(this.always||this.invalid,()=>I`<div id="${M(this,m,K)}" class="${M(this,m,Re)}">${this.hint}</div>`)}
2473
- </div>`}};m=new WeakSet,Ue=function(){return X([N.base,!this.invalid&&!this.disabled&&!this.readOnly&&N.default,this.invalid&&N.invalid,this.disabled&&N.disabled,this.readOnly&&N.readOnly])},Re=function(){return X([de.base,this.invalid?de.colorInvalid:de.color])},Be=function(){return X([N.chevron,this.disabled&&N.chevronDisabled])},G=function(){return"select_id"},K=function(){return this.hint?`${M(this,m,G)}__hint`:void 0},w.styles=[Ne,De,Sr`
2473
+ ${ce(this.helpText||this.always||this.invalid,()=>I`<div id="${M(this,f,K)}" class="${M(this,f,Re)}">${this.helpText||this.hint}</div>`)}
2474
+ </div>`}};f=new WeakSet,Ue=function(){return X([N.base,!this.invalid&&!this.disabled&&!(this.readonly||this.readOnly)&&N.default,this.invalid&&N.invalid,this.disabled&&N.disabled,(this.readonly||this.readOnly)&&N.readOnly])},Re=function(){return X([de.base,this.invalid?de.colorInvalid:de.color])},Be=function(){return X([N.chevron,this.disabled&&N.chevronDisabled])},G=function(){return"select_id"},K=function(){return this.hint?`${M(this,f,G)}__hint`:void 0},g.styles=[Ne,De,Sr`
2474
2475
  /* if there is an option with an empty value and it is selected */
2475
2476
  select:has(option[value=""][selected]),
2476
2477
  /* if there is an option with an empty value, and no other options are selected */
2477
2478
  select:has(option[value=""]):not(:has(option[selected])) {
2478
2479
  color: var(--w-s-color-text-placeholder);
2479
2480
  }
2480
- `],_([z({attribute:"auto-focus",type:Boolean,reflect:!0})],w.prototype,"autoFocus",2),_([z({type:Boolean,reflect:!0})],w.prototype,"invalid",2),_([z({type:Boolean,reflect:!0})],w.prototype,"always",2),_([z({reflect:!0})],w.prototype,"hint",2),_([z({reflect:!0})],w.prototype,"label",2),_([z({type:Boolean,reflect:!0})],w.prototype,"optional",2),_([z({type:Boolean,reflect:!0})],w.prototype,"disabled",2),_([z({attribute:"read-only",type:Boolean,reflect:!0})],w.prototype,"readOnly",2),_([z({attribute:!1,state:!0})],w.prototype,"_options",2),_([z({reflect:!0})],w.prototype,"name",2),_([z({reflect:!0})],w.prototype,"value",2);customElements.get("w-select")||customElements.define("w-select",w);export{w as WarpSelect};
2481
+ `],w([k({attribute:"auto-focus",type:Boolean,reflect:!0})],g.prototype,"autoFocus",2),w([k({type:Boolean,reflect:!0})],g.prototype,"autofocus",2),w([k({attribute:"help-text",reflect:!0})],g.prototype,"helpText",2),w([k({type:Boolean,reflect:!0})],g.prototype,"invalid",2),w([k({type:Boolean,reflect:!0})],g.prototype,"always",2),w([k({reflect:!0})],g.prototype,"hint",2),w([k({reflect:!0})],g.prototype,"label",2),w([k({type:Boolean,reflect:!0})],g.prototype,"optional",2),w([k({type:Boolean,reflect:!0})],g.prototype,"disabled",2),w([k({attribute:"read-only",type:Boolean,reflect:!0})],g.prototype,"readOnly",2),w([k({type:Boolean,reflect:!0})],g.prototype,"readonly",2),w([k({attribute:!1,state:!0})],g.prototype,"_options",2),w([k({reflect:!0})],g.prototype,"name",2),w([k({reflect:!0})],g.prototype,"value",2);customElements.get("w-select")||customElements.define("w-select",g);export{g as WarpSelect};
2481
2482
  //# sourceMappingURL=index.js.map