@arbetsformedlingen/yrkesvaljaren 2.0.5
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/LICENSE +190 -0
- package/README.md +369 -0
- package/dist/cjs/af-validation-message-BzY5H0xU.js +16 -0
- package/dist/cjs/core-selector.cjs.entry.js +476 -0
- package/dist/cjs/digi-service-job-selector.cjs.entry.js +1619 -0
- package/dist/cjs/fuse-BTLNKxuL.js +1631 -0
- package/dist/cjs/geo-valjaren.cjs.entry.js +14910 -0
- package/dist/cjs/index-BOuTGlEp.js +1817 -0
- package/dist/cjs/index.cjs.js +14 -0
- package/dist/cjs/job-selector-demo.cjs.entry.js +692 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/neobrutal-search.cjs.entry.js +171 -0
- package/dist/cjs/search.engine-D0cMelRi.js +489 -0
- package/dist/cjs/taxonomy-registry-DVmuDUpM.js +435 -0
- package/dist/cjs/types-CtHBl6Ra.js +14 -0
- package/dist/cjs/yrkesvaljaren.cjs.js +24 -0
- package/dist/collection/collection-manifest.json +15 -0
- package/dist/collection/components/core-selector/core-selector.css +803 -0
- package/dist/collection/components/core-selector/core-selector.js +761 -0
- package/dist/collection/components/core-selector/types.js +1 -0
- package/dist/collection/components/design-compat/af-icon.js +13 -0
- package/dist/collection/components/design-compat/af-label.js +2 -0
- package/dist/collection/components/design-compat/af-tag.js +6 -0
- package/dist/collection/components/design-compat/af-validation-message.js +11 -0
- package/dist/collection/components/design-compat/index.js +4 -0
- package/dist/collection/components/geovaljaren/geovaljaren.css +21 -0
- package/dist/collection/components/geovaljaren/geovaljaren.js +304 -0
- package/dist/collection/components/geovaljaren/logic/adapter.utils.js +20 -0
- package/dist/collection/components/geovaljaren/logic/data.utils.js +12 -0
- package/dist/collection/components/geovaljaren/logic/history-service.js +25 -0
- package/dist/collection/components/geovaljaren/logic/search.engine.js +28 -0
- package/dist/collection/components/job-selector/constants.js +26 -0
- package/dist/collection/components/job-selector/history-service.js +41 -0
- package/dist/collection/components/job-selector/job-selector-controller.js +835 -0
- package/dist/collection/components/job-selector/job-selector.css +318 -0
- package/dist/collection/components/job-selector/job-selector.js +1378 -0
- package/dist/collection/components/job-selector/keyboard-handlers.js +84 -0
- package/dist/collection/components/job-selector/logic/adapter.utils.js +75 -0
- package/dist/collection/components/job-selector/logic/label-formatter.js +118 -0
- package/dist/collection/components/job-selector/logic/search.engine.js +50 -0
- package/dist/collection/components/job-selector/search-logic.js +35 -0
- package/dist/collection/components/job-selector/search.utils.js +224 -0
- package/dist/collection/components/job-selector/suggestions-list.js +31 -0
- package/dist/collection/components/job-selector/taxonomy-registry.js +60 -0
- package/dist/collection/components/job-selector/test-data.mock.js +33 -0
- package/dist/collection/components/job-selector/types.js +10 -0
- package/dist/collection/components/job-selector/validation-message.js +24 -0
- package/dist/collection/demo-data.js +20 -0
- package/dist/collection/index.js +7 -0
- package/dist/collection/verkstad/verkstad.js +407 -0
- package/dist/components/core-selector.d.ts +11 -0
- package/dist/components/core-selector.js +1 -0
- package/dist/components/core-selector2.js +1 -0
- package/dist/components/digi-service-job-selector.d.ts +11 -0
- package/dist/components/digi-service-job-selector.js +1 -0
- package/dist/components/fuse.js +1 -0
- package/dist/components/geo-valjaren.d.ts +11 -0
- package/dist/components/geo-valjaren.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/job-selector-demo.d.ts +11 -0
- package/dist/components/job-selector-demo.js +1 -0
- package/dist/components/job-selector.js +1 -0
- package/dist/components/neobrutal-search.d.ts +11 -0
- package/dist/components/neobrutal-search.js +1 -0
- package/dist/components/search.engine.js +1 -0
- package/dist/components/types.js +1 -0
- package/dist/esm/af-validation-message-F8NIH2rC.js +14 -0
- package/dist/esm/core-selector.entry.js +474 -0
- package/dist/esm/digi-service-job-selector.entry.js +1617 -0
- package/dist/esm/fuse-BPnhMTul.js +1629 -0
- package/dist/esm/geo-valjaren.entry.js +14908 -0
- package/dist/esm/index-CGXZllj2.js +1806 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/job-selector-demo.entry.js +690 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/neobrutal-search.entry.js +169 -0
- package/dist/esm/search.engine-nZ7AcXba.js +479 -0
- package/dist/esm/taxonomy-registry-Dw0VR9Aw.js +430 -0
- package/dist/esm/types-DHUftoZJ.js +12 -0
- package/dist/esm/yrkesvaljaren.js +20 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/core-selector/core-selector.d.ts +46 -0
- package/dist/types/components/core-selector/types.d.ts +1 -0
- package/dist/types/components/design-compat/af-icon.d.ts +7 -0
- package/dist/types/components/design-compat/af-label.d.ts +8 -0
- package/dist/types/components/design-compat/af-tag.d.ts +8 -0
- package/dist/types/components/design-compat/af-validation-message.d.ts +9 -0
- package/dist/types/components/design-compat/index.d.ts +5 -0
- package/dist/types/components/geovaljaren/geovaljaren.d.ts +24 -0
- package/dist/types/components/geovaljaren/logic/adapter.utils.d.ts +7 -0
- package/dist/types/components/geovaljaren/logic/data.utils.d.ts +7 -0
- package/dist/types/components/geovaljaren/logic/history-service.d.ts +6 -0
- package/dist/types/components/geovaljaren/logic/search.engine.d.ts +7 -0
- package/dist/types/components/job-selector/ambient.d.ts +4 -0
- package/dist/types/components/job-selector/constants.d.ts +13 -0
- package/dist/types/components/job-selector/history-service.d.ts +6 -0
- package/dist/types/components/job-selector/job-selector-controller.d.ts +82 -0
- package/dist/types/components/job-selector/job-selector.d.ts +140 -0
- package/dist/types/components/job-selector/keyboard-handlers.d.ts +13 -0
- package/dist/types/components/job-selector/logic/adapter.utils.d.ts +12 -0
- package/dist/types/components/job-selector/logic/label-formatter.d.ts +4 -0
- package/dist/types/components/job-selector/logic/search.engine.d.ts +21 -0
- package/dist/types/components/job-selector/search-logic.d.ts +17 -0
- package/dist/types/components/job-selector/search.utils.d.ts +10 -0
- package/dist/types/components/job-selector/suggestions-list.d.ts +13 -0
- package/dist/types/components/job-selector/taxonomy-registry.d.ts +20 -0
- package/dist/types/components/job-selector/test-data.mock.d.ts +7 -0
- package/dist/types/components/job-selector/types.d.ts +107 -0
- package/dist/types/components/job-selector/validation-message.d.ts +8 -0
- package/dist/types/components/job-selector-demo/job-selector-demo.d.ts +55 -0
- package/dist/types/components/neobrutal-search/neobrutal-search.d.ts +18 -0
- package/dist/types/components.d.ts +425 -0
- package/dist/types/demo-data.d.ts +16 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/stencil-public-runtime.d.ts +1873 -0
- package/dist/types/verkstad/verkstad.d.ts +1 -0
- package/dist/yrkesvaljaren/fuse-B0eHOxow.js.map +1 -0
- package/dist/yrkesvaljaren/index-Cy4BCo5s.js.map +1 -0
- package/dist/yrkesvaljaren/index-DfJXTQqL.js.map +1 -0
- package/dist/yrkesvaljaren/index.esm.js +1 -0
- package/dist/yrkesvaljaren/index.esm.js.map +1 -0
- package/dist/yrkesvaljaren/p-16636162.entry.js +1 -0
- package/dist/yrkesvaljaren/p-273cf6df.entry.js +1 -0
- package/dist/yrkesvaljaren/p-9e48afa4.entry.js +1 -0
- package/dist/yrkesvaljaren/p-BPnhMTul.js +1 -0
- package/dist/yrkesvaljaren/p-CGXZllj2.js +3 -0
- package/dist/yrkesvaljaren/p-DHUftoZJ.js +1 -0
- package/dist/yrkesvaljaren/p-DYFAzvqX.js +1 -0
- package/dist/yrkesvaljaren/p-Dw0VR9Aw.js +1 -0
- package/dist/yrkesvaljaren/p-aef7b5ae.entry.js +1 -0
- package/dist/yrkesvaljaren/p-b0f16abd.entry.js +1 -0
- package/dist/yrkesvaljaren/p-uBrs3sSs.js +1 -0
- package/dist/yrkesvaljaren/search.engine-DPT6roRm.js.map +1 -0
- package/dist/yrkesvaljaren/taxonomy-registry-s5khf6s4.js.map +1 -0
- package/dist/yrkesvaljaren/types-DHUftoZJ.js.map +1 -0
- package/dist/yrkesvaljaren/yrkesvaljaren.css +1 -0
- package/dist/yrkesvaljaren/yrkesvaljaren.esm.js +1 -0
- package/dist/yrkesvaljaren/yrkesvaljaren.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +126 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,r as e,c as i,h as s,F as a}from"./p-CGXZllj2.js";import{T as r,D as o,L as n,s as l,M as h,a as c,P as d,b as u,c as g}from"./p-uBrs3sSs.js";import{l as m,g as p,i as f,r as v}from"./p-Dw0VR9Aw.js";import{I as y}from"./p-DHUftoZJ.js";import{A as b}from"./p-DYFAzvqX.js";import"./p-BPnhMTul.js";let w=null;const S={saveHistory(t){w=t;try{localStorage.setItem("job-selector_history",JSON.stringify(t)),m.debug("[HistoryService] saveHistory - History saved.")}catch(t){m.error("Kunde inte spara historik.",t)}},loadHistory(){if(w)return w;try{const t=localStorage.getItem("job-selector_history");if(t)return w=JSON.parse(t),w}catch(t){m.error("Kunde inte läsa historik.",t)}return w=[],w},clearHistory(){w=[];try{localStorage.removeItem("job-selector_history"),m.debug("[HistoryService] clearHistory - History cleared.")}catch(t){m.error("Kunde inte rensa historik.",t)}}};class k{callbacks;config;state={status:"loading"};taxonomyData=[];popularItems=[];searchEngine=null;debounceTimer;validationTimer;isTouched=!1;activeErrorType=null;constructor(t,e){this.callbacks=t,this.config=e}getState(){return this.state}getActiveErrorType(){return this.activeErrorType}updateConfig(t){this.config={...this.config,...t},void 0===t.required&&void 0===t.requireSelection||this.runValidation()}getTaxonomyData(){if(this.taxonomyData.length>0)return this.taxonomyData;const t=p();return t&&t.length>0&&(m.debug("[Controller] getTaxonomyData - Late initializing from registry"),this.taxonomyData=t,this.popularItems=this.computePopularItems(this.taxonomyData),this.searchEngine=new r(this.taxonomyData)),this.taxonomyData}destroy(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.validationTimer&&(clearTimeout(this.validationTimer),this.validationTimer=void 0)}async initialize(t){m.debug("[Controller] initialize - START",{hasInitialData:!!t}),this.updateState({status:"loading"});const e=t&&t.length>0?t:p();e&&e.length>0?(m.debug("[Controller] initialize - Loaded taxonomy from registry"),this.setStateToActive(e,"registry",(new Date).toISOString())):(m.warn("[Controller] initialize - No taxonomy found in registry. Has registerTaxonomy() been called?"),this.updateState({status:"error",message:"Kunde inte hitta yrkesdata. Kontrollera att komponenten är initierad korrekt."}))}handleFocus(){this.isTouched=!0}setStateToActive(t,e,i){this.taxonomyData=t,this.popularItems=this.computePopularItems(this.taxonomyData),this.searchEngine=new r(this.taxonomyData);const s={dataSource:e,dataSourceDate:i};this.updateState(this.config.enableMultiple?{status:"multiSelect",inputValue:"",selectedItems:[],suggestions:[],validation:"idle",...s}:{status:"searching",inputValue:"",suggestions:[],validation:"idle",...s})}handleInput(t){this.isTouched=!0,m.debug("[Controller] handleInput - Value:",t);const e="error"===this.state.validation||"from-error"===this.state.validationContext?"from-error":void 0;if(clearTimeout(this.debounceTimer),""!==t.trim()){switch(this.state.status){case"multiSelect":case"multiSelectShowingHistory":this.updateState({status:"multiSelect",inputValue:t,selectedItems:"selectedItems"in this.state?this.state.selectedItems:[],suggestions:"suggestions"in this.state?this.state.suggestions:"historyItems"in this.state?this.state.historyItems:[],validation:"idle",validationContext:e,dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0});break;case"itemSelected":case"searching":case"showingHistory":this.updateState({status:"searching",inputValue:t,suggestions:"suggestions"in this.state?this.state.suggestions:"historyItems"in this.state?this.state.historyItems:[],validation:"idle",validationContext:e,dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0});break;case"loading":case"error":return;default:return this.state}t.length>=this.config.minLength&&(this.debounceTimer=setTimeout((()=>this.performSearch(t)),o))}else this.updateState(this.config.enableMultiple?{status:"multiSelect",inputValue:"",selectedItems:"selectedItems"in this.state?this.state.selectedItems:[],suggestions:[],validation:"idle",validationContext:e,...this.getCommonState()}:{status:"searching",inputValue:"",suggestions:[],validation:"idle",validationContext:e,...this.getCommonState()}),this.showHistory()}performSearch(t){if(this.searchEngine)switch(this.state.status){case"searching":case"multiSelect":{const e=this.searchEngine.searchAsGeneric(t,this.config.maxResults).flatMap((t=>t.metadata?.originalResult?[t.metadata.originalResult]:[]));this.updateState({...this.state,suggestions:e});break}case"loading":case"error":case"itemSelected":case"showingHistory":case"multiSelectShowingHistory":return;default:return this.state}}addToHistory(t){if(!this.config.history)return;const e=S.loadHistory(),i=n.format(t.rawLabel,"",t.occupationLabel),s={...t,displaySegments:i,highlightedLabel:l(i)},a=e.filter((t=>t.id&&s.id?t.id!==s.id:t.rawLabel!==s.rawLabel)),r=[s,...a].slice(0,this.config.maxHistoryItems);S.saveHistory(r)}clearHistory(){S.clearHistory(),this.showHistory(!0)}computePopularItems(t,e=this.config.maxResults||h){if(!t||0===t.length)return[];if(!t.some((t=>"number"==typeof t.weight&&t.weight>0)))return t.slice(0,e);const i=[...t].sort(((t,e)=>(e.weight??0)-(t.weight??0))),s=new Set,a=[];for(const t of i){const i=t.occupation_name_preferred_label||t.preferred_label;if(s.has(i)||(s.add(i),a.push(t)),a.length===e)break}return a}showHistory(t=!1){if("loading"===this.state.status||"error"===this.state.status)return;if(!this.config.history)return;const e=S.loadHistory();let i=e,s=!1;0===e.length&&(!1===this.config.popular?i=[]:(0===this.popularItems.length&&this.taxonomyData.length>0&&(this.popularItems=this.computePopularItems(this.taxonomyData)),i=this.popularItems.map((t=>this.toSearchResult(t))),s=!0));const a=i.filter((t=>"ManualInput"===t.type?!this.config.requireSelection:this.taxonomyData.some((e=>e.id===t.id)))).map((t=>{const e=n.format(t.rawLabel,"",t.occupationLabel);return{...t,displaySegments:e,highlightedLabel:l(e)}})),{dataSource:r,dataSourceDate:o}=this.getCommonState(),h="inputValue"in this.state?this.state.inputValue:"";(t||""===h.trim()||"showingHistory"===this.state.status||"multiSelectShowingHistory"===this.state.status)&&this.updateState(this.config.enableMultiple?{status:"multiSelectShowingHistory",selectedItems:"selectedItems"in this.state?this.state.selectedItems:[],historyItems:a,inputValue:h,validation:"validation"in this.state?this.state.validation:"idle",validationContext:"error"===this.state.validation||"from-error"===this.state.validationContext?"from-error":void 0,dataSource:r,dataSourceDate:o,isPopularView:s}:{status:"showingHistory",historyItems:a,inputValue:h,validation:"validation"in this.state?this.state.validation:"idle",validationContext:"error"===this.state.validation||"from-error"===this.state.validationContext?"from-error":void 0,dataSource:r,dataSourceDate:o,isPopularView:s})}selectItem(t){m.debug("[Controller] selectItem",t),this.isTouched=!0,this.addToHistory(t);const e="error"===this.state.validation||"from-error"===this.state.validationContext?"from-error":void 0;switch(this.state.status){case"multiSelect":case"multiSelectShowingHistory":{const i="dataSource"in this.state?this.state.dataSource:void 0,s="dataSourceDate"in this.state?this.state.dataSourceDate:void 0,a="selectedItems"in this.state?this.state.selectedItems:[];if(a.findIndex((e=>e.id&&t.id?e.id===t.id:e.rawLabel===t.rawLabel))>-1)return;const r=[...a,t];this.updateState({...this.state,status:"multiSelect",selectedItems:r,inputValue:"",suggestions:[],validation:"idle",validationContext:e,dataSource:i,dataSourceDate:s}),this.callbacks.onEmitSelection(r.map((t=>this.toPublicSelection(t)))),this.showHistory(!0);break}case"searching":case"showingHistory":this.updateState({status:"itemSelected",selectedItem:t,inputValue:t.preferred_label,validation:"idle",validationContext:e,dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0}),this.callbacks.onEmitSelection(this.toPublicSelection(t)),this.config.enableMultiple&&this.showHistory(!0);break;case"loading":case"error":break;case"itemSelected":this.updateState({...this.state,status:"itemSelected",selectedItem:t,inputValue:t.preferred_label,validation:"idle",validationContext:e,dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0}),this.callbacks.onEmitSelection(this.toPublicSelection(t));break;default:m.warn("[Controller] selectItem - Unexpected state:",this.state)}this.runValidation()}clearSelection(){"itemSelected"===this.state.status&&(this.isTouched=!0,this.updateState({status:"searching",inputValue:this.state.inputValue||"",suggestions:[],validation:"idle",...this.getCommonState()}),this.callbacks.onEmitSelection([]),this.showHistory(),this.runValidation())}removeItem(t){switch(this.state.status){case"multiSelect":case"multiSelectShowingHistory":{const e=this.state.selectedItems.filter((e=>e.id&&t.id?e.id!==t.id:e.rawLabel!==t.rawLabel));this.isTouched=!0,this.updateState({...this.state,selectedItems:e}),this.callbacks.onEmitSelection(e.map((t=>this.toPublicSelection(t)))),""===("inputValue"in this.state?this.state.inputValue:"")&&this.showHistory(),this.runValidation();break}}}handleBlur(){if(this.isTouched=!0,"searching"===this.state.status){const t=(this.state.inputValue||"").trim();if(""!==t){const e=this.findExactMatch(t);if(e)return void this.selectItem(this.toSearchResult(e))}}switch(this.state.status){case"searching":case"showingHistory":this.updateState({...this.state,status:"searching",inputValue:"inputValue"in this.state?this.state.inputValue:"",suggestions:[]});break;case"multiSelect":case"multiSelectShowingHistory":this.updateState({...this.state,status:"multiSelect",inputValue:"inputValue"in this.state?this.state.inputValue:"",suggestions:[]});break;case"loading":case"error":case"itemSelected":break;default:return this.state}this.runValidation()}runValidation(t=!1){if(t&&(this.isTouched=!0),!this.isTouched)return!0;if("loading"===this.state.status||"error"===this.state.status)return!0;const e=this.checkHasValue();let i=!0,s=null;const a="searching"===this.state.status||"multiSelect"===this.state.status||"multiSelectShowingHistory"===this.state.status,r=""!==("inputValue"in this.state?this.state.inputValue:"").trim();a&&r?(i=!1,s="invalidInput"):this.config.required&&!e&&(i=!1,s="required"),this.activeErrorType=s;const o="error"===this.state.validation||"from-error"===this.state.validationContext;let n;switch(n=i?o&&e?"success":"idle":"invalidInput"===s||t||o?"error":"idle","success"===n&&(clearTimeout(this.validationTimer),this.validationTimer=setTimeout((()=>{const t="validation"in this.state&&"success"===this.state.validation;["itemSelected","multiSelect","multiSelectShowingHistory"].includes(this.state.status)&&t&&this.updateState({...this.state,validation:"idle",validationContext:void 0}),this.validationTimer=void 0}),3e3)),this.state.status){case"searching":case"showingHistory":case"multiSelect":case"multiSelectShowingHistory":this.updateState({...this.state,validation:n});break;case"itemSelected":"error"!==n&&this.updateState({...this.state,validation:n});break;default:return this.state}return this.callbacks.onEmitValidation({isValid:i,errorType:s}),i}selectItemById(t){if(!t||this.config.enableMultiple||!this.taxonomyData)return;const e=this.taxonomyData.find((e=>e.id===t));if(e){const t=this.toSearchResult(e);this.updateState({status:"itemSelected",selectedItem:t,inputValue:t.preferred_label,validation:"idle",dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0})}this.runValidation()}selectItemsByIds(t){if(!t||!this.config.enableMultiple||!this.taxonomyData)return;const e=t.map((t=>this.taxonomyData.find((e=>e.id===t))));if(e.some((t=>!t)))return;const i=e.filter((t=>!!t)).map((t=>this.toSearchResult(t)));switch(this.state.status){case"multiSelect":case"multiSelectShowingHistory":this.updateState({...this.state,selectedItems:i})}this.runValidation()}setSelection(t){const e=[],i=t.map((t=>{if(null!==t.id){const i=this.taxonomyData.find((e=>e.id===t.id));return i?this.toSearchResult(i):void e.push(t.id)}return this.createManualInputItem(t.preferred_label)}));if(e.length>0)return{ok:!1,invalidIds:e};const s=i,a=this.getCommonState();if(this.config.enableMultiple)this.updateState({...this.state,status:"multiSelect",selectedItems:s,inputValue:"",suggestions:[],validation:"idle",...a});else if(1===s.length){const t=s[0];this.updateState({status:"itemSelected",selectedItem:t,inputValue:t.preferred_label,validation:"idle",...a})}else this.updateState({status:"searching",inputValue:"",suggestions:[],validation:"idle",...a});return this.runValidation(),{ok:!0,selection:s.map((t=>this.toPublicSelection(t)))}}editSelection(){const t=this.state.selectedItem;if("itemSelected"!==this.state.status||!t||!this.searchEngine)return;const e=t.displayLabel,{dataSource:i,dataSourceDate:s}=this.state,a=this.searchEngine.searchAsGeneric(e,this.config.maxResults).flatMap((t=>t.metadata?.originalResult?[t.metadata.originalResult]:[]));this.updateState({status:"searching",inputValue:e,suggestions:a,validation:"idle",dataSource:i,dataSourceDate:s})}checkHasValue(){switch(this.state.status){case"itemSelected":return!0;case"multiSelect":case"multiSelectShowingHistory":return this.state.selectedItems.length>0;case"searching":case"showingHistory":return!this.config.requireSelection&&""!==("inputValue"in this.state?this.state.inputValue:"").trim();case"loading":case"error":return!1;default:return this.state}}getCommonState(){return{dataSource:"dataSource"in this.state?this.state.dataSource:void 0,dataSourceDate:"dataSourceDate"in this.state?this.state.dataSourceDate:void 0}}resetMultiSelection(){const t=this.getCommonState();this.updateState({...this.state,status:"multiSelect",selectedItems:[],inputValue:"",suggestions:[],validation:"idle",...t}),this.callbacks.onEmitSelection([])}updateState(t){this.state=t,this.callbacks.onStateChange(t)}toSearchResult(t){return{...t,rawLabel:t.preferred_label,displayLabel:t.occupation_name_preferred_label?`${t.preferred_label} (${t.occupation_name_preferred_label})`:t.preferred_label,highlightedLabel:t.preferred_label,score:3,occupationLabel:t.occupation_name_preferred_label,occupationId:t.occupation_name_id,ssyk_level_4_id:t.ssyk_level_4_id,ssyk_code_2012:t.ssyk_code_2012}}toPublicSelection(t){return c.toPublicSelection(t)}createManualInputItem(t){return{id:"",type:"ManualInput",preferred_label:t,rawLabel:t,displayLabel:t,highlightedLabel:t,score:1}}findExactMatch(t){return this.taxonomyData.find((e=>(e.occupation_name_preferred_label?`${e.preferred_label} (${e.occupation_name_preferred_label})`:e.preferred_label).toLowerCase()===t.toLowerCase()||e.preferred_label.toLowerCase()===t.toLowerCase()))}handleFreeTextSelection(t){if(!t)return;this.isTouched=!0;const e=this.findExactMatch(t);this.selectItem(e?this.toSearchResult(e):this.createManualInputItem(t))}loadMore(){this.config.maxResults+=10;const t="inputValue"in this.state?this.state.inputValue:"";t&&this.performSearch(t)}resetSearch(){switch(this.state.status){case"searching":case"multiSelect":this.updateState({...this.state,inputValue:"",suggestions:[]}),this.showHistory(!0);break;case"showingHistory":case"multiSelectShowingHistory":this.updateState({...this.state,inputValue:""});break;case"itemSelected":this.clearSelection()}}}m.setLevel(m.levels.SILENT);const x=/^[123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{4}_[123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{3}_[123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ]{3}$/,C=class{get hostElement(){return t(this)}internals;name="yrkesvaljaren";taxonomyUrl;placeholder=d;label="Välj yrke";disabled=!1;enableMultiple=!1;showSearchIcon=!0;errorMessage;labelDescription;required=!1;manualInput=!1;history=!0;popular=!0;maxHistoryItems=10;enableSelectionAnimation=!1;afFocused=!1;populateInputOnSelect=!1;maxVisibleRows;minLength=u;maxResults=10;get requireSelection(){return!this.manualInput}size="medium";constructor(t){e(this,t),this.afJobSelectedEmitter=i(this,"afJobSelected"),this.dataLoadFailedEmitter=i(this,"afJobDataLoadFailed"),this.validationChangeEmitter=i(this,"afJobValidationChange"),t.$hostElement$["s-ei"]?this.internals=t.$hostElement$["s-ei"]:(this.internals=t.$hostElement$.attachInternals(),t.$hostElement$["s-ei"]=this.internals),m.debug("[JobSelector] Constructor - enableMultiple:",this.enableMultiple)}state={status:"loading"};activeErrorType=null;animatingItemId=null;animationTimer;cloneSelection(t){return t.map((t=>null===t.id?{...t}:{...t,related:t.related?{...t.related}:void 0}))}rebuildValidJobIds(){const t=this.controller?.getTaxonomyData?.()??this.taxonomyData??[];this.validJobIds=new Set(t.map((t=>t.id)).filter(Boolean))}validateSelectionCandidate(t){const e="string"==typeof t?[t]:Array.isArray(t)?t:null;if(!e)return{ok:!1,reason:"invalid-input"};const i=e.some((t=>"string"==typeof t)),s=e.some((t=>"object"==typeof t&&null!==t));if(i&&s||e.some((t=>"string"!=typeof t&&("object"!=typeof t||null===t))))return{ok:!1,reason:"invalid-input"};const a=[],r=[],o=[];for(const t of e){if("string"==typeof t){const e=t.trim();if(!e)return{ok:!1,reason:"invalid-input"};if(x.test(e))r.push(e),a.push({id:e});else{if(!this.manualInput)return{ok:!1,reason:"manual-input-disabled"};o.push(e),a.push({type:"manual-input",id:null,preferred_label:e})}continue}if(!t||"object"!=typeof t)return{ok:!1,reason:"invalid-input"};const e=t;if("string"==typeof e.id){const t=e.id.trim();if(!t||"job-title"!==e.type&&"occupation-name"!==e.type||"string"!=typeof e.preferred_label||!e.preferred_label.trim())return{ok:!1,reason:"invalid-input"};if(void 0!==e.related){const t=e.related;if(!t||"occupation-name"!==t.type||"string"!=typeof t.id||!t.id.trim()||"string"!=typeof t.preferred_label||!t.preferred_label.trim())return{ok:!1,reason:"invalid-input"}}r.push(t),a.push({id:t})}else{if(null!==e.id||"manual-input"!==e.type)return{ok:!1,reason:"invalid-input"};{if("string"!=typeof e.preferred_label||!e.preferred_label.trim())return{ok:!1,reason:"invalid-input"};if(!this.manualInput)return{ok:!1,reason:"manual-input-disabled"};const t=e.preferred_label.trim();o.push(t),a.push({type:"manual-input",id:null,preferred_label:t})}}}if(!this.enableMultiple&&a.length>1)return{ok:!1,reason:"multiple-disabled"};if(new Set(r).size!==r.length)return{ok:!1,reason:"duplicate-taxonomy-id"};if(new Set(o).size!==o.length)return{ok:!1,reason:"duplicate-manual-label"};const n=r.filter((t=>!this.validJobIds.has(t)));return n.length>0?{ok:!1,reason:"unknown-id",invalidIds:n}:{ok:!0,selection:a}}describeSelectionRejection(t){switch(t.reason){case"invalid-input":return"setSelection accepterar en sträng, en homogen strängarray eller en array med fullständiga JobSelectionItem-objekt.";case"data-unavailable":return"setSelection kan inte användas eftersom yrkesdata inte kunde laddas.";case"duplicate-taxonomy-id":return"selection får inte innehålla dubbla taxonomi-id:n.";case"duplicate-manual-label":return"selection får inte innehålla dubbla manuella labels.";case"multiple-disabled":return'flera värden kräver af-enable-multiple="true".';case"manual-input-disabled":return'manual-val kräver af-manual-input="true".';case"unknown-id":return`okända Concept ID:n: ${t.invalidIds?.join(", ")}`}}errorCodeForRejection(t){switch(t){case"unknown-id":return"unknown-id";case"manual-input-disabled":return"manual-input-disabled";case"multiple-disabled":return"multiple-disabled";default:return"invalid-input"}}rejectSelection(t,e){const i=this.describeSelectionRejection(e);return console.error(`[Yrkesväljaren] Ogiltig selection: ${i} Värdet accepterades inte; senaste giltiga val behålls.`,{selection:t,previousSelection:this.lastAcceptedSelection}),this.activeErrorType="invalidInput",this.validationChangeEmitter.emit({isValid:!1,errorType:"invalidInput"}),this.updateValidity(!1),new y(i,this.errorCodeForRejection(e.reason),e.invalidIds)}syncAcceptedSelection(t){const e=this.cloneSelection(t);if(this.lastAcceptedSelection=e,"invalidInput"===this.activeErrorType){const t=e.length>0||!this.required,i=t?null:"required";this.activeErrorType=i,this.validationChangeEmitter.emit({isValid:t,errorType:i}),this.updateValidity(t)}}applySelection(t){if(!this.controller)throw this.rejectSelection(t,{ok:!1,reason:"data-unavailable"});const e=this.validateSelectionCandidate(t);if(!e.ok)throw this.rejectSelection(t,e);const i=this.controller.setSelection(e.selection);if(!i.ok)throw this.rejectSelection(t,{ok:!1,reason:"unknown-id",invalidIds:i.invalidIds});return this.syncAcceptedSelection(i.selection),this.cloneSelection(i.selection)}watchRequired(t){this.controller.updateConfig({required:t})}watchManualInput(t){this.controller.updateConfig({requireSelection:!t})}watchHistory(t){this.controller.updateConfig({history:t})}watchPopular(t){this.controller.updateConfig({popular:t})}watchEnableMultiple(t){this.controller.updateConfig({enableMultiple:t})}watchDisabled(t){t&&(this.afFocused=!1)}watchTaxonomyData(t){this.controller&&t&&t.length>0&&this.controller.initialize(t).then((()=>{this.rebuildValidJobIds(),this.restoreAcceptedSelectionAfterDataUpdate()}))}taxonomyData=[];afJobSelectedEmitter;syncFormValue(){if(this.state)if(this.enableMultiple){const t="multiSelect"===this.state.status||"multiSelectShowingHistory"===this.state.status?this.state.selectedItems:[],e=new FormData;t.forEach((t=>{e.append(this.name,t.id||t.rawLabel)})),this.internals.setFormValue(e)}else{const t="itemSelected"===this.state.status?this.state.selectedItem:null;this.internals.setFormValue(t?t.id||t.rawLabel:null)}}handleFormValidationSync(t){this.updateValidity(t.detail.isValid)}dataLoadFailedEmitter;validationChangeEmitter;static nextId=0;componentId="job-selector-"+C.nextId++;observer;controller;validJobIds=new Set;lastAcceptedSelection=[];restoreAcceptedSelectionAfterDataUpdate(){if(0===this.lastAcceptedSelection.length)return;const t=this.controller.setSelection(this.lastAcceptedSelection);t.ok?this.syncAcceptedSelection(t.selection):this.rejectSelection(this.lastAcceptedSelection,{ok:!1,reason:"unknown-id",invalidIds:t.invalidIds})}async componentWillLoad(){m.setLevel(m.levels.WARN);const t=p();if(!(this.taxonomyData&&this.taxonomyData.length>0||t&&t.length>0)){this.state={status:"loading"};try{const t=this.taxonomyUrl??"https://d3hng02m5bee8m.cloudfront.net/yrkesvaljaren/latest.json";m.debug(`[JobSelector] Hämtar yrkesdata från: ${t}`);const e=await fetch(t);if(!e.ok)throw new Error(`Kunde inte ladda yrkesdata från ${t}: ${e.status} ${e.statusText}`);const i=await e.json();if(!f(i))throw new Error("Yrkesdatan har ett ogiltigt format.");v(i),m.debug("[JobSelector] Data-laddning lyckades.")}catch(t){return m.error("[JobSelector] Fel vid data-laddning:",t),this.state={status:"error",message:"Kunde inte ladda yrkesdata."},void this.dataLoadFailedEmitter.emit({error:t instanceof Error?t:new Error(String(t))})}}this.controller=new k({onStateChange:t=>{this.state={...t},this.syncFormValue()},onEmitSelection:t=>{const e=t?Array.isArray(t)?t:[t]:[];this.syncAcceptedSelection(e),this.afJobSelectedEmitter.emit(e)},onEmitValidation:t=>{this.activeErrorType=t.errorType,this.validationChangeEmitter.emit(t)},onEmitDataLoadFailed:t=>{this.dataLoadFailedEmitter.emit({error:t})},onEmitStatusChange:()=>{}},{enableMultiple:this.enableMultiple,required:this.required,requireSelection:this.requireSelection,history:this.history,popular:this.popular,maxHistoryItems:this.maxHistoryItems,minLength:this.minLength,maxResults:this.maxResults}),await this.controller.initialize(this.taxonomyData),this.taxonomyData=this.controller.getTaxonomyData(),this.rebuildValidJobIds(),"invalidInput"===this.activeErrorType?this.updateValidity(!1):this.required&&0===this.lastAcceptedSelection.length?this.internals.setValidity({customError:!0},this.errorMessage||"Välj ett yrke från listan."):this.internals.setValidity({})}componentDidLoad(){this.handleHashFocus()}disconnectedCallback(){this.observer&&this.observer.disconnect(),this.controller&&this.controller.destroy(),clearTimeout(this.animationTimer),this.animationTimer=void 0}handleHashFocus(){const t=window.location.hash;if(!t)return;const e=t.substring(1),i=this.hostElement.getAttribute("id");i&&e===i&&(this.setFocus(),this.hostElement.scrollIntoView({behavior:"smooth",block:"center"}),history.replaceState(null,"",window.location.pathname+window.location.search))}handleInput(t){this.afFocused=!0,this.controller.handleInput(t.detail)}handleCsSelect(t){this.afFocused=!0;const e=t.detail;this.enableSelectionAnimation&&(this.animatingItemId=e.id,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((()=>{this.animatingItemId=null,this.animationTimer=void 0}),600));const i=e.metadata?.original;i&&"displayLabel"in i?this.controller.selectItem(i):"ManualInput"===e.metadata?.type?this.controller.handleFreeTextSelection(e.label):this.controller.selectItem({id:e.id,type:"unknown",preferred_label:e.label,rawLabel:e.label,displayLabel:e.label,highlightedLabel:e.highlightedLabel||e.label,score:1})}handleCsClear(){this.controller.resetSearch()}handleCsClearHistory(){this.controller.clearHistory()}handleCsRequestHistory(){this.controller.showHistory()}handleCsLoadMore(){this.controller.loadMore()}handleCsRemoveItem(t){const e=t.detail,i=e.metadata?.original;i&&"displayLabel"in i&&this.controller.removeItem(i)}handleCsFocus(){this.afFocused=!0,this.controller.handleFocus()}handleCsBlur(){this.afFocused=!1,this.controller.handleBlur(),this.validate()}handleCsEditSelection(){this.afFocused=!0,this.controller.editSelection()}async updateData(){m.debug("[JobSelector] updateData called"),await this.controller.initialize(),this.taxonomyData=this.controller.getTaxonomyData(),this.rebuildValidJobIds(),this.restoreAcceptedSelectionAfterDataUpdate()}async setSelection(t){return this.applySelection(t)}async setFocus(){const t=this.hostElement.shadowRoot?.querySelector("core-selector");t&&"function"==typeof t.setFocus&&await t.setFocus()}async validate(t=!1){const e=await this.controller.runValidation(t);return this.updateValidity(e),e}async checkValidity(){return this.internals.checkValidity()}async reportValidity(){return this.internals.reportValidity()}async getValidity(){return this.internals.validity}async getValidationMessage(){return this.internals.validationMessage}updateValidity(t){t?this.internals.setValidity({}):this.internals.setValidity({customError:!0},"invalidInput"===this.activeErrorType?this.errorMessage||"Komponenten har fått ett ogiltigt värde.":this.errorMessage||"Välj ett yrke från listan.")}_mapSearchResultToGenericItem(t){const e=this.enableMultiple?("multiSelect"===this.state.status||"multiSelectShowingHistory"===this.state.status)&&this.state.selectedItems.some((e=>e.id&&t.id?e.id===t.id:e.rawLabel===t.rawLabel)):"itemSelected"===this.state.status&&this.state.selectedItem?.id===t.id;return{id:t.id,label:t.displayLabel,isSelected:this.animatingItemId===t.id||e,highlightedLabel:t.highlightedLabel,displaySegments:t.displaySegments,group:"occupation-name"===t.type?"Yrkesgrupper":"Yrkesbenämningar",metadata:{original:t}}}_mapStateToSelectorState(t){let e,i,s,a,r="loading",o="",n=[],l=[],h="idle",c=this.errorMessage||"";switch("validation"in t&&t.validation&&(h=t.validation,"error"===t.validation?"required"===this.activeErrorType||"invalidInput"===this.activeErrorType?c=this.errorMessage||"Välj ett yrke från listan.":this.errorMessage&&(c=this.errorMessage):"success"===t.validation&&(c="Tack!")),"message"in t&&t.message&&(c=t.message),"validationContext"in t&&(i=t.validationContext),t.status){case"loading":r="loading";break;case"error":r="error";break;case"searching":r="searching",o=t.inputValue,n=t.suggestions.map((t=>this._mapSearchResultToGenericItem(t)));break;case"showingHistory":r="searching",o=t.inputValue||"",n=t.historyItems.map((t=>this._mapSearchResultToGenericItem(t)));break;case"itemSelected":r="itemSelected",e=this._mapSearchResultToGenericItem(t.selectedItem),e.highlightedLabel=g(e.label),o=t.inputValue||"";break;case"multiSelect":r="multiSelect",o=t.inputValue,n=t.suggestions.map((t=>this._mapSearchResultToGenericItem(t))),l=t.selectedItems.map((t=>this._mapSearchResultToGenericItem(t)));break;case"multiSelectShowingHistory":r="multiSelect",o=t.inputValue||"",n=t.historyItems.map((t=>this._mapSearchResultToGenericItem(t))),l=t.selectedItems.map((t=>this._mapSearchResultToGenericItem(t)))}const d="showingHistory"===t.status||"multiSelectShowingHistory"===t.status;return"multiSelect"===r||"itemSelected"===r||"searching"===r?(l.length>0&&(n=n.filter((t=>!l.some((e=>e.id&&t.id?e.id===t.id:e.label===t.label))))),d&&n.length>0?t.isPopularView?(s="Populära sökningar",a=!1):(a=!0,s=void 0):(s=void 0,a=!1)):(s=void 0,a=!1),{status:r,inputValue:o,suggestions:n,selectedItem:e,selectedItems:l,validation:h,validationContext:i,message:c,listHeader:s,showHistoryHeader:a,isHistoryView:d}}render(){const t=this._mapStateToSelectorState(this.state),e={disabled:this.disabled,placeholder:this.placeholder,minLength:this.minLength,maxResults:this.maxResults,enableMultiple:this.enableMultiple,showSearchIcon:this.showSearchIcon,requireSelection:this.requireSelection,size:this.size,enableSelectionAnimation:this.enableSelectionAnimation,populateInputOnSelect:this.populateInputOnSelect,maxVisibleRows:this.maxVisibleRows,manualInputBehavior:"select",showHistoryHeader:this.history&&!t.listHeader,listHeader:t.listHeader,enableInfiniteScroll:!0};return s("div",{key:"11b208182109be21dcf759010cb87f1bbd10b618",class:"job-selector-wrapper"},"error"===this.state.status?s("div",{class:"error-message"},s(b,{variant:"error",role:"alert"},this.state.message||"Ett fel uppstod.")):s(a,null,s("core-selector",{id:this.componentId,componentId:this.componentId,state:t,config:e,label:this.label,labelDescription:this.labelDescription,size:this.size,afFocused:this.afFocused})))}static get delegatesFocus(){return!0}static get formAssociated(){return!0}static get watchers(){return{required:[{watchRequired:0}],manualInput:[{watchManualInput:0}],history:[{watchHistory:0}],popular:[{watchPopular:0}],enableMultiple:[{watchEnableMultiple:0}],disabled:[{watchDisabled:0}],taxonomyData:[{watchTaxonomyData:0}]}}};C.style=":host{--digi--grayscale-0:#ffffff;--digi--grayscale-50:#fbfbfb;--digi--grayscale-100:#f4f4f4;--digi--grayscale-200:#ededed;--digi--grayscale-300:#e4e4e4;--digi--grayscale-400:#dddddd;--digi--grayscale-500:#cacaca;--digi--grayscale-600:#acacac;--digi--grayscale-700:#757575;--digi--grayscale-800:#5c5c5c;--digi--grayscale-900:#333333;--digi--grayscale-1000:#000000;--digi--global--color--cta--link--base:#1616b2;--digi--global--color--function--danger--base:#da0000;--digi--global--color--function--success--base:#008a20;--digi--global--color--function--success--lightest-3:#d4edda;--digi--global--color--function--warning--base:#ffe200;--digi--color--text--primary:var(--digi--grayscale-900);--digi--color--text--secondary:var(--digi--grayscale-700);--digi--color--text--link:var(--digi--global--color--cta--link--base);--digi--color--icons--success:var(--digi--global--color--function--success--base);--digi--color--icons--warning:#8a7a00;--digi--color--icons--danger:var(--digi--global--color--function--danger--base);--digi--global--typography--font-family--default:\"Open Sans\", Arial, sans-serif;--digi--global--typography--font-size--base:1rem;--digi--global--typography--font-size--small:0.875rem;--digi--global--typography--font-weight--regular:400;--digi--global--typography--font-weight--semibold:600;--digi--global--typography--font-weight--bold:700;--digi--global--typography--line-height--base:1.5;--digi--typography--label--font-size--desktop:1rem;--digi--typography--label--font-weight--desktop:600;--digi--typography--label--line-height--desktop:1.5;--digi--typography--label-description--font-size--desktop:1rem;--digi--typography--label-description--line-height--desktop:1.5;--digi--typography--tag--font-size--desktop:0.875rem;--digi--gutter--icon:0.625rem;--digi--gutter--smaller:0.75rem;--digi--gutter--small:0.875rem;--digi--gutter--medium:1rem;--digi--border-width--primary:1px;--digi--border-style--primary:solid;--digi--border-radius--primary:0;--digi--border-radius--secondary:6px;--af-tag-color:#091d54;--af-tag-hover-background:#ddf1fc}.af-form-label{color:var(--digi--color--text--primary);display:flex;flex-direction:column;font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--label--font-size--desktop);margin-bottom:0.5rem}.af-form-label__label{cursor:pointer;display:block;font-weight:var(--digi--typography--label--font-weight--desktop);line-height:var(--digi--typography--label--line-height--desktop)}.af-form-label__description{display:block;font-size:var(--digi--typography--label-description--font-size--desktop);line-height:var(--digi--typography--label-description--line-height--desktop);max-width:35rem}.af-validation-message{align-items:center;display:flex;flex-wrap:wrap}.af-validation-message__icon{flex:0 0 auto;height:1.25em;margin-inline-end:var(--digi--gutter--icon);width:1.25em}.af-validation-message__icon--success,.af-validation-message__icon--error{background-color:var(--af-validation-icon-color, currentColor);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.af-validation-message__icon--success{--af-validation-icon-color:var(--digi--color--icons--success);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath d='M25 12.5C25 19.404 19.404 25 12.5 25S0 19.404 0 12.5 5.596 0 12.5 0 25 5.596 25 12.5zm-13.946 6.619l9.274-9.275a.806.806 0 000-1.14l-1.14-1.14a.806.806 0 00-1.14 0l-7.564 7.563-3.531-3.531a.807.807 0 00-1.14 0l-1.141 1.14a.806.806 0 000 1.14l5.242 5.243a.806.806 0 001.14 0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath d='M25 12.5C25 19.404 19.404 25 12.5 25S0 19.404 0 12.5 5.596 0 12.5 0 25 5.596 25 12.5zm-13.946 6.619l9.274-9.275a.806.806 0 000-1.14l-1.14-1.14a.806.806 0 00-1.14 0l-7.564 7.563-3.531-3.531a.807.807 0 00-1.14 0l-1.141 1.14a.806.806 0 000 1.14l5.242 5.243a.806.806 0 001.14 0z'/%3E%3C/svg%3E\")}.af-validation-message__icon--error{--af-validation-icon-color:var(--digi--color--icons--danger);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M34.4328058,0 C35.5494848,0 36.5900526,0.609146757 37.1483921,1.58958113 L47.5812454,19.9104189 C48.1395849,20.8909496 48.1395849,22.1090504 47.5812454,23.0895811 L37.1483921,41.4104189 C36.5900526,42.3908532 35.5494848,43 34.4328058,43 L13.5671942,43 C12.4505152,43 11.4099474,42.3908532 10.8516079,41.4104189 L0.41875464,23.0895811 C-0.13958488,22.1090504 -0.13958488,20.8909496 0.41875464,19.9104189 L10.8516079,1.58958113 C11.4099474,0.609146757 12.4505152,0 13.5671942,0 Z M18.6736823,12.3728178 C18.2711762,11.964729 17.6203819,11.964729 17.2178757,12.3728178 L15.2825964,14.334939 C14.8800903,14.7430278 14.8800903,15.4028485 15.2825964,15.8109373 L20.6089616,21.2111779 L15.2825964,26.6114185 C14.8800903,27.0195074 14.8800903,27.6793281 15.2825964,28.0874169 L17.2178757,30.049538 C17.6203819,30.4576269 18.2711762,30.4576269 18.6736823,30.049538 L24.0000475,24.6492974 L29.3264127,30.049538 C29.7289188,30.4576269 30.3797132,30.4576269 30.7822193,30.049538 L32.7174986,28.0874169 C33.1200048,27.6793281 33.1200048,27.0195074 32.7174986,26.6114185 L27.3911334,21.2111779 L32.7174986,15.8109373 C33.1200048,15.4028485 33.1200048,14.7430278 32.7174986,14.334939 L30.7822193,12.3728178 C30.3797132,11.964729 29.7289188,11.964729 29.3264127,12.3728178 L24.0000475,17.7730584 Z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M34.4328058,0 C35.5494848,0 36.5900526,0.609146757 37.1483921,1.58958113 L47.5812454,19.9104189 C48.1395849,20.8909496 48.1395849,22.1090504 47.5812454,23.0895811 L37.1483921,41.4104189 C36.5900526,42.3908532 35.5494848,43 34.4328058,43 L13.5671942,43 C12.4505152,43 11.4099474,42.3908532 10.8516079,41.4104189 L0.41875464,23.0895811 C-0.13958488,22.1090504 -0.13958488,20.8909496 0.41875464,19.9104189 L10.8516079,1.58958113 C11.4099474,0.609146757 12.4505152,0 13.5671942,0 Z M18.6736823,12.3728178 C18.2711762,11.964729 17.6203819,11.964729 17.2178757,12.3728178 L15.2825964,14.334939 C14.8800903,14.7430278 14.8800903,15.4028485 15.2825964,15.8109373 L20.6089616,21.2111779 L15.2825964,26.6114185 C14.8800903,27.0195074 14.8800903,27.6793281 15.2825964,28.0874169 L17.2178757,30.049538 C17.6203819,30.4576269 18.2711762,30.4576269 18.6736823,30.049538 L24.0000475,24.6492974 L29.3264127,30.049538 C29.7289188,30.4576269 30.3797132,30.4576269 30.7822193,30.049538 L32.7174986,28.0874169 C33.1200048,27.6793281 33.1200048,27.0195074 32.7174986,26.6114185 L27.3911334,21.2111779 L32.7174986,15.8109373 C33.1200048,15.4028485 33.1200048,14.7430278 32.7174986,14.334939 L30.7822193,12.3728178 C30.3797132,11.964729 29.7289188,11.964729 29.3264127,12.3728178 L24.0000475,17.7730584 Z'/%3E%3C/svg%3E\")}.af-validation-message__icon--warning{background:center / contain no-repeat url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='6.75' fill='%23333'/%3E%3Cpath d='m18 9c0 4.9717-4.0298 9-9 9-4.9702 0-9-4.0283-9-9 0-4.9688 4.0298-9 9-9 4.9702 0 9 4.0312 9 9zm-9 1.8145c-0.92196 0-1.6694 0.7474-1.6694 1.6694 0 0.92196 0.7474 1.6694 1.6694 1.6694s1.6694-0.7474 1.6694-1.6694c0-0.92196-0.7474-1.6694-1.6694-1.6694zm-1.3157-1.065c0.012593 0.23095 0.20355 0.41175 0.43483 0.41175h1.7618c0.23128 0 0.42224-0.1808 0.43483-0.41175l0.2692-4.9355c0.013609-0.24946-0.18501-0.45922-0.43483-0.45922h-2.3002c-0.24982 0-0.4484 0.20976-0.43479 0.45922l0.2692 4.9355z' fill='%23FFE200'/%3E%3C/svg%3E\");position:relative;top:3px}.af-validation-message__text{color:var(--digi--color--text--primary);flex:1;font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--tag--font-size--desktop);transform:translateY(1px)}.af-tag{display:block;max-width:100%;min-width:0}.af-tag__button{align-items:center;background:var(--digi--grayscale-0);border:var(--digi--border-width--primary) var(--digi--border-style--primary) var(--af-tag-color);border-radius:var(--digi--border-radius--secondary);color:var(--af-tag-color);cursor:pointer;display:inline-flex;font-family:var(--digi--global--typography--font-family--default);font-size:0.875rem;font-weight:var(--digi--global--typography--font-weight--semibold);gap:10px;height:auto;max-width:100%;min-height:unset;min-width:0;padding:6px 8px;text-align:left;white-space:normal}.af-tag__button:hover{background:var(--af-tag-hover-background)}.af-tag__button:focus-visible{background:var(--af-tag-hover-background);border-color:var(--af-tag-color);outline:2px solid var(--digi--grayscale-1000);outline-offset:2px;box-shadow:0 0 0 5px var(--digi--grayscale-0)}.af-tag__button:active{background:var(--af-tag-hover-background)}.af-tag__text{display:inline-block;max-width:100%;min-width:0;white-space:normal}.af-tag__text--break{overflow-wrap:anywhere;word-break:break-word}.af-tag__remove-icon{flex:0 0 auto;height:1em;min-height:0 !important;width:1em}:host{--yrkesvaljaren-width:var(--af-width, 100%);--yrkesvaljaren-min-width:var(--af-min-width, 200px);--yrkesvaljaren-max-width:var(--af-max-width, none);--yrkesvaljaren-height:var(--af-height, auto);--yrkesvaljaren-min-height:var(--af-min-height, auto);--yrkesvaljaren-max-height:var(--af-max-height, none);--selector-width:var(--yrkesvaljaren-width);--selector-min-width:var(--yrkesvaljaren-min-width);--selector-max-width:var(--yrkesvaljaren-max-width);--selector-height:var(--yrkesvaljaren-height);--selector-min-height:var(--yrkesvaljaren-min-height);--selector-max-height:var(--yrkesvaljaren-max-height);--selector-font-family:var(--global-font-family, 'Open Sans', sans-serif);--selector-font-size:var(--sok-font-size, 1rem);--selector-text-color:var(--sok-text-color, #212529);--selector-placeholder-color:var(--sok-placeholder-color, #6c757d);--selector-border-color:var(--sok-border-color, #d1d5db);--selector-focus-border-color:var(--sok-focus-border-color, #86b7fe);--selector-focus-shadow:var(--sok-focus-shadow, 0 0 0 0.25rem rgba(13, 110, 253, 0.25));--selector-background-color:var(--sok-background-color, #fff);--selector-icon-color:var(--sok-icon-color, #6c757d);--selector-clear-button-color:var(--sok-clear-button-color, #6c757d);--selector-clear-button-hover-color:var(--sok-clear-button-hover-color, #212529);--selector-suggestion-background-color:var(--sok-suggestion-background-color, #fff);--selector-suggestion-border-color:var(--sok-suggestion-border-color, #ced4da);--selector-suggestion-hover-background:var(--sok-suggestion-hover-background, #e9ecef);--selector-suggestion-active-background:var(--sok-suggestion-active-background, #dde4eb);--selector-suggestion-text-color:var(--sok-suggestion-text-color, #212529);--selector-suggestion-highlight-weight:var(--sok-suggestion-highlight-weight, bold);--selector-error-color:var(--sok-error-color, #dc3545);--selector-loading-color:var(--sok-loading-color, #6c757d);display:flex;flex-direction:column;width:var(--yrkesvaljaren-width);min-width:var(--yrkesvaljaren-min-width);max-width:var(--yrkesvaljaren-max-width);height:var(--yrkesvaljaren-height);min-height:var(--yrkesvaljaren-min-height);max-height:var(--yrkesvaljaren-max-height);position:relative}:host([af-size=\"small\"]){--cs-size:small;--selector-container-min-height:32px;--selector-padding-y:2px;--selector-icon-size:1em;--selector-gap:4px}:host([af-size=\"medium\"]){--selector-container-min-height:40px;--selector-padding-y:6px}:host([af-size=\"large\"]){--selector-container-min-height:48px;--selector-padding-y:10px;--selector-icon-size:1.25em;--selector-gap:8px}*{box-sizing:border-box}.yrkesvaljaren-wrapper{display:flex;flex-direction:column;flex:1;min-height:inherit}core-selector{margin-top:0.5rem}.status-message{margin-top:0.5rem;font-size:0.9em;font-style:italic;color:var(--sok-loading-color, #6c757d)}.history-header{font-size:0.875rem;color:var(--digi--grayscale-700, #757575);border-bottom:1px solid var(--selector-suggestion-border-color, #ced4da);margin-bottom:0px}.history-header a{color:inherit;text-decoration:underline}.history-header a:hover{color:var(--digi--global--color--cta--link--base, #1616B2)}";export{C as digi_service_job_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function t(t){return Array.isArray?Array.isArray(t):"[object Array]"===o(t)}function e(t){return null==t?"":function(t){if("string"==typeof t)return t;if("bigint"==typeof t)return t.toString();const e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}function i(t){return"string"==typeof t}function n(t){return"number"==typeof t}function s(t){return"object"==typeof t}function r(t){return null!=t}function u(t){return!t.trim().length}function o(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const c="Invalid doc index: must be a non-negative integer within the bounds of the docs array",h=Object.prototype.hasOwnProperty;var a=class{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach((t=>{const i=l(t);this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight})),this._keys.forEach((t=>{t.weight/=e}))}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function l(e){let n=null,s=null,r=null,u=1,o=null;if(i(e)||t(e))r=e,n=f(e),s=d(e);else{if(!h.call(e,"name"))throw new Error("Missing name property in key");const t=e.name;if(r=t,h.call(e,"weight")&&void 0!==e.weight&&(u=e.weight,u<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(d(t)));n=f(t),s=d(t),o=e.getFn??null}return{path:n,id:s,weight:u,src:r,getFn:o}}function f(e){return t(e)?e:e.split(".")}function d(e){return t(e)?e.join("."):e}const A=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function(u,c){const h=[];let a=!1;const l=(u,c,f,d)=>{if(r(u))if(c[f]){const A=u[c[f]];if(!r(A))return;if(f===c.length-1&&(i(A)||n(A)||function(t){return!0===t||!1===t||function(t){return s(t)&&null!==t}(t)&&"[object Boolean]"==o(t)}(A)||"bigint"==typeof A))h.push(void 0!==d?{v:e(A),i:d}:e(A));else if(t(A)){a=!0;for(let t=0,e=A.length;t<e;t+=1)l(A[t],c,f+1,t)}else c.length&&l(A,c,f+1,d)}else h.push(void 0!==d?{v:u,i:d}:u)};return l(u,i(c)?c.split("."):c,0),a?h:h[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var g=class{constructor({getFn:t=A.getFn,fieldNormWeight:e=A.fieldNormWeight}={}){this.norm=function(t=1,e=3){const i=new Map,n=Math.pow(10,e);return{get(e){let s=0,r=!1;for(let t=0;t<e.length;t++)(u=e.charCodeAt(t))>=9&&u<=13||32===u||160===u?r=!1:r||(s++,r=!0);var u;if(0===s&&(s=1),i.has(s))return i.get(s);const o=Math.round(n/Math.pow(s,.5*t))/n;return i.set(s,o),o},clear(){i.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach(((t,e)=>{this._keysMap[t.id]=e}))}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const t=this.docs.length;this.records=new Array(t);let e=0;if(i(this.docs[0]))for(let i=0;i<t;i++){const t=this._createStringRecord(this.docs[i],i);t&&(this.records[e++]=t)}else for(let i=0;i<t;i++)this.records[e++]=this._createObjectRecord(this.docs[i],i);this.records.length=e,this.norm.clear()}add(t,e){if(!Number.isInteger(e)||e<0)throw new Error(c);if(i(t)){const i=this._createStringRecord(t,e);return i&&this.records.push(i),i}const n=this._createObjectRecord(t,e);return this.records.push(n),n}removeAt(t){if(!Number.isInteger(t)||t<0)throw new Error(c);for(let e=0,i=this.records.length;e<i;e+=1)if(this.records[e].i===t){this.records.splice(e,1);break}for(let e=0,i=this.records.length;e<i;e+=1)this.records[e].i>t&&(this.records[e].i-=1)}removeAll(t){const e=new Set;for(const i of t)Number.isInteger(i)&&i>=0&&e.add(i);if(0===e.size)return;this.records=this.records.filter((t=>!e.has(t.i)));const i=Array.from(e).sort(((t,e)=>t-e));for(const t of this.records){let e=0,n=i.length;for(;e<n;){const s=e+n>>>1;i[s]<t.i?e=s+1:n=s}t.i-=e}}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_createStringRecord(t,e){return!r(t)||u(t)?null:{v:t,i:e,n:this.norm.get(t)}}_createObjectRecord(n,s){const o={i:s,$:{}};for(let s=0,c=this.keys.length;s<c;s++){const c=this.keys[s],h=c.getFn?c.getFn(n):this.getFn(n,c.path);if(r(h))if(t(h)){const t=[];for(let n=0,s=h.length;n<s;n+=1){const s=h[n];if(r(s))if(i(s)){if(!u(s)){const e={v:s,i:n,n:this.norm.get(s)};t.push(e)}}else if(r(s.v)){const n=i(s.v)?s.v:e(s.v);if(!u(n)){const e={v:n,i:s.i,n:this.norm.get(n)};t.push(e)}}}o.$[s]=t}else if(i(h)&&!u(h)){const t={v:h,n:this.norm.get(h)};o.$[s]=t}}return o}toJSON(){return{keys:this.keys.map((({getFn:t,...e})=>e)),records:this.records}}};function C(t,e,{getFn:i=A.getFn,fieldNormWeight:n=A.fieldNormWeight}={}){const s=new g({getFn:i,fieldNormWeight:n});return s.setKeys(t.map(l)),s.setSources(e),s.create(),s}function F(t){const e={};for(let i=0,n=t.length;i<n;i+=1){const s=t.charAt(i);e[s]=(e[s]||0)|1<<n-i-1}return e}function D(t){if(t.length<=1)return t;t.sort(((t,e)=>t[0]-e[0]||t[1]-e[1]));const e=[t[0]];for(let i=1,n=t.length;i<n;i+=1){const n=e[e.length-1],s=t[i];s[0]<=n[1]+1?n[1]=Math.max(n[1],s[1]):e.push(s)}return e}const B={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},M=new RegExp("["+Object.keys(B).join("")+"]","g"),m="function"==typeof String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(M,(t=>B[t])):t=>t;var E=class{constructor(t,{location:e=A.location,threshold:i=A.threshold,distance:n=A.distance,includeMatches:s=A.includeMatches,findAllMatches:r=A.findAllMatches,minMatchCharLength:u=A.minMatchCharLength,isCaseSensitive:o=A.isCaseSensitive,ignoreDiacritics:c=A.ignoreDiacritics,ignoreLocation:h=A.ignoreLocation}={}){if(this.options={location:e,threshold:i,distance:n,includeMatches:s,findAllMatches:r,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:c,ignoreLocation:h},t=o?t:t.toLowerCase(),t=c?m(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const a=(t,e)=>{this.chunks.push({pattern:t,alphabet:F(t),startIndex:e})},l=this.pattern.length;if(l>32){let t=0;const e=l%32,i=l-e;for(;t<i;)a(this.pattern.substr(t,32),t),t+=32;if(e){const t=l-32;a(this.pattern.substr(t),t)}}else a(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,ignoreDiacritics:i,includeMatches:n}=this.options;if(t=e?t:t.toLowerCase(),t=i?m(t):t,this.pattern===t){if(t.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};const e={isMatch:!0,score:0};return n&&(e.indices=[[0,t.length-1]]),e}const{location:s,distance:r,threshold:u,findAllMatches:o,minMatchCharLength:c,ignoreLocation:h}=this.options,a=[];let l=0,f=!1;this.chunks.forEach((({pattern:e,alphabet:i,startIndex:d})=>{const{isMatch:g,score:C,indices:F}=function(t,e,i,{location:n=A.location,distance:s=A.distance,threshold:r=A.threshold,findAllMatches:u=A.findAllMatches,minMatchCharLength:o=A.minMatchCharLength,includeMatches:c=A.includeMatches,ignoreLocation:h=A.ignoreLocation}={}){if(e.length>32)throw new Error("Pattern length exceeds max of 32.");const a=e.length,l=t.length,f=Math.max(0,Math.min(n,l));let d=r,g=f;const C=(t,e)=>{const i=t/a;if(h)return i;const n=Math.abs(f-e);return s?i+n/s:n?1:i},F=o>1||c,D=F?Array(l):[];let B;for(;(B=t.indexOf(e,g))>-1;){const t=C(0,B);if(d=Math.min(t,d),g=B+a,F){let t=0;for(;t<a;)D[B+t]=1,t+=1}}g=-1;let M=[],m=1,E=0,v=a+l;const p=1<<a-1;for(let e=0;e<a;e+=1){let n=0,s=v;for(;n<s;)C(e,f+s)<=d?n=s:v=s,s=Math.floor((v-n)/2+n);v=s;let r=Math.max(1,f-s+1);const o=u?l:Math.min(f+s,l)+a,c=Array(o+2);c[o+1]=(1<<e)-1;for(let n=o;n>=r;n-=1){const s=n-1;if(c[n]=(c[n+1]<<1|1)&i[t[s]],e&&(c[n]|=(M[n+1]|M[n])<<1|1|M[n+1]),c[n]&p&&(m=C(e,s),m<=d)){if(d=m,g=s,E=e,g<=f)break;r=Math.max(1,2*f-g)}}if(C(e+1,f)>d)break;M=c}if(F&&g>=0){const e=Math.min(l-1,g+a-1+E);for(let n=g;n<=e;n+=1)i[t[n]]&&(D[n]=1)}const y={isMatch:g>=0,score:Math.max(.001,m)};if(F){const t=function(t=[],e=A.minMatchCharLength){const i=[];let n=-1,s=-1,r=0;for(let u=t.length;r<u;r+=1){const u=t[r];u&&-1===n?n=r:u||-1===n||(s=r-1,s-n+1>=e&&i.push([n,s]),n=-1)}return t[r-1]&&r-n>=e&&i.push([n,r-1]),i}(D,o);t.length?c&&(y.indices=t):y.isMatch=!1}return y}(t,e,i,{location:s+d,distance:r,threshold:u,findAllMatches:o,minMatchCharLength:c,includeMatches:n,ignoreLocation:h});g&&(f=!0),l+=C,g&&F&&a.push(...F)}));const d={isMatch:f,score:f?l/this.chunks.length:1};return f&&n&&(d.indices=D(a)),d}};const v=new Set(["fuzzy","include"]),p=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:t=>({type:"exact",search(e){const i=e===t;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:t=>({type:"include",search(e){let i,n=0;const s=[],r=t.length;for(;(i=e.indexOf(t,n))>-1;)n=i+r,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:t=>({type:"prefix-exact",search(e){const i=e.startsWith(t);return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:t=>({type:"inverse-prefix-exact",search(e){const i=!e.startsWith(t);return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:t=>({type:"inverse-suffix-exact",search(e){const i=!e.endsWith(t);return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:t=>({type:"suffix-exact",search(e){const i=e.endsWith(t);return{isMatch:i,score:i?0:1,indices:[e.length-t.length,e.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:t=>({type:"inverse-exact",search(e){const i=-1===e.indexOf(t);return{isMatch:i,score:i?0:1,indices:[0,e.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(t,e={})=>{const i=new E(t,{location:e.location??A.location,threshold:e.threshold??A.threshold,distance:e.distance??A.distance,includeMatches:e.includeMatches??A.includeMatches,findAllMatches:e.findAllMatches??A.findAllMatches,minMatchCharLength:e.minMatchCharLength??A.minMatchCharLength,isCaseSensitive:e.isCaseSensitive??A.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics??A.ignoreDiacritics,ignoreLocation:e.ignoreLocation??A.ignoreLocation});return{type:"fuzzy",search:t=>i.searchIn(t)}}}],y=p.length;function x(t,e){const i=t.match(e);return i?i[1]:null}const w=[];function k(...t){w.push(...t)}function b(t,e){for(let i=0,n=w.length;i<n;i+=1){const n=w[i];if(n.condition(t,e))return new n(t,e)}return new E(t,e)}const S="$and",$="$path",N=t=>!(!t[S]&&!t.$or),L=t=>({[S]:Object.keys(t).map((e=>({[e]:t[e]})))});function R(e,n,{auto:r=!0}={}){const u=e=>{if(i(e)){const t={keyId:null,pattern:e};return r&&(t.searcher=b(e,n)),t}const o=Object.keys(e),c=(t=>!!t[$])(e);if(!c&&o.length>1&&!N(e))return u(L(e));if((e=>!t(e)&&s(e)&&!N(e))(e)){const t=c?e[$]:o[0],s=c?e.$val:e[t];if(!i(s))throw new Error((t=>`Invalid value for key ${t}`)(t));const u={keyId:d(t),pattern:s};return r&&(u.searcher=b(s,n)),u}const h={children:[],operator:o[0]};return o.forEach((i=>{const n=e[i];t(n)&&n.forEach((t=>{h.children.push(u(t))}))})),h};return N(e)||(e=L(e)),u(e)}function I(t,{ignoreFieldNorm:e=A.ignoreFieldNorm}){let i=1;return t.forEach((({key:t,norm:n,score:s})=>{const r=t?t.weight:null;i*=Math.pow(0===s&&r?Number.EPSILON:s,(r||1)*(e?1:n))})),i}var z=class{constructor(t,e){this.limit=t,this.heap=[],this.comparator=e}get size(){return this.heap.length}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):this.comparator(t,this.heap[0])<0&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(t){const e=this.heap;for(;t>0;){const i=t-1>>1;if(this.comparator(e[t],e[i])<=0)break;const n=e[t];e[t]=e[i],e[i]=n,t=i}}_sinkDown(t){const e=this.heap,i=e.length;let n=t;do{const s=2*(t=n)+1,r=2*t+2;if(s<i&&this.comparator(e[s],e[n])>0&&(n=s),r<i&&this.comparator(e[r],e[n])>0&&(n=r),n!==t){const i=e[t];e[t]=e[n],e[n]=i}}while(n!==t)}};const _=/[\p{L}\p{M}\p{N}_]+/gu,j=new WeakSet;function O({isCaseSensitive:t=!1,ignoreDiacritics:e=!1,tokenize:i}={}){const n=function(t){if("function"==typeof t){let e=!1;return i=>{const n=t(i);if(!e&&(e=!0,!Array.isArray(n)||n.some((t=>"string"!=typeof t))))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return t instanceof RegExp?(t.global||j.has(e=t)||(j.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`)),e=>e.match(t)||[]):t=>t.match(_)||[];var e}(i);return{tokenize:i=>(t||(i=i.toLowerCase()),e&&(i=m(i)),n(i))}}function W(t,e,i,n){const s=n.tokenize(e);if(!s.length)return;t.fieldCount++,t.docFieldCount.set(i,(t.docFieldCount.get(i)||0)+1);const r=new Set(s);let u=t.docTermFieldHits.get(i);u||(u=new Map,t.docTermFieldHits.set(i,u));for(const e of r)u.set(e,(u.get(e)||0)+1),t.df.set(e,(t.df.get(e)||0)+1)}function T(t,e,i,n){const{i:s,v:r,$:u}=e;if(void 0===r){if(u)for(let e=0;e<i;e++){const i=u[e];if(i)if(Array.isArray(i))for(const e of i)W(t,e.v,s,n);else W(t,i.v,s,n)}}else W(t,r,s,n)}function J(t,e){const i=t.docFieldCount.get(e);if(void 0===i)return;t.fieldCount-=i,t.docFieldCount.delete(e);const n=t.docTermFieldHits.get(e);if(n){for(const[e,i]of n){const n=(t.df.get(e)||0)-i;n<=0?t.df.delete(e):t.df.set(e,n)}t.docTermFieldHits.delete(e)}}function K(t,e){if(0===e.length)return;const i=Array.from(new Set(e)).sort(((t,e)=>t-e));for(const e of i)J(t,e);const n=t=>{let e=0,n=i.length;for(;e<n;){const s=e+n>>>1;i[s]<t?e=s+1:n=s}return t-e},s=i[0],r=new Map;for(const[e,i]of t.docFieldCount)r.set(e>s?n(e):e,i);t.docFieldCount=r;const u=new Map;for(const[e,i]of t.docTermFieldHits)u.set(e>s?n(e):e,i);t.docTermFieldHits=u}var U=class{constructor(t,e,i){this.options={...A,...e},this._keyStore=new a(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const e=b(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=e,e}setCollection(t,e){if(this._docs=t,e&&!(e instanceof g))throw new Error("Incorrect 'index' type");if(this._myIndex=e||C(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const t=O({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function(t,e,i){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const s of t)T(n,s,e,i);return n}(this._myIndex.records,this._myIndex.keys.length,t)}this._invalidateSearcherCache()}add(t){if(!r(t))return;this._docs.push(t);const e=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&e){const t=O({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function(t,e,i,n){T(t,e,i,n)}(this._invertedIndex,e,this._myIndex.keys.length,t)}this._invalidateSearcherCache()}remove(t=()=>!1){const e=[],i=[];for(let n=0,s=this._docs.length;n<s;n+=1)t(this._docs[n],n)&&(e.push(this._docs[n]),i.push(n));if(i.length){this._invertedIndex&&K(this._invertedIndex,i);const t=new Set(i);this._docs=this._docs.filter(((e,i)=>!t.has(i))),this._myIndex.removeAll(i),this._invalidateSearcherCache()}return e}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(c);this._invertedIndex&&K(this._invertedIndex,[t]);const e=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),e}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map((t=>this._keyStore.get(t.id)||t))}search(t,e){const{limit:s=-1}=e||{},{includeMatches:u,includeScore:o,shouldSort:c,sortFn:h,ignoreFieldNorm:a}=this.options;if(i(t)&&!t.trim()){let t=this._docs.map(((t,e)=>({item:t,refIndex:e})));return n(s)&&s>-1&&(t=t.slice(0,s)),t}const l=c&&n(s)&&s>0&&i(t),f=h,d=(t,e)=>f(t,e)||t.idx-e.idx;let g;if(l){const e=new z(s,d);i(this._docs[0])?this._searchStringList(t,{heap:e,ignoreFieldNorm:a}):this._searchObjectList(t,{heap:e,ignoreFieldNorm:a}),g=e.extractSorted()}else g=i(t)?i(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function(t,{ignoreFieldNorm:e=A.ignoreFieldNorm}){t.forEach((t=>{t.score=I(t.matches,{ignoreFieldNorm:e})}))}(g,{ignoreFieldNorm:a}),c&&g.sort(i(t)?d:f),n(s)&&s>-1&&(g=g.slice(0,s));return function(t,e,{includeMatches:i=A.includeMatches,includeScore:n=A.includeScore}={}){return t.map((t=>{const{idx:s}=t,u={item:e[s],refIndex:s};return i&&(u.matches=function(t){const e=[];return t.matches.forEach((t=>{if(!r(t.indices)||!t.indices.length)return;const i={indices:t.indices,value:t.value};t.key&&(i.key=t.key.id),t.idx>-1&&(i.refIndex=t.idx),e.push(i)})),e}(t)),n&&(u.score=t.score),u}))}(g,this._docs,{includeMatches:u,includeScore:o})}_searchStringList(t,{heap:e,ignoreFieldNorm:i}={}){const n=this._getSearcher(t),s=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:u}=this._myIndex,o=e?null:[];return u.forEach((({v:t,i:u,n:c})=>{if(!r(t))return;const h=n.searchIn(t);if(h.isMatch){const n={score:h.score,value:t,norm:c,indices:h.indices};s&&(n.matchedMask=h.matchedMask,n.matchedTerms=h.matchedTerms,n.termCount=h.termCount);const r=[n];if(!s||this._coversAllTokens(r)){const n={item:t,idx:u,matches:r};e?(n.score=I(n.matches,{ignoreFieldNorm:i}),e.insert(n)):o.push(n)}}})),o}_searchLogical(t){const e=R(t,this.options),i=this._normalizedKeys(),n=(t,e,s)=>{if(!("children"in t)){const{keyId:n,searcher:r}=t;let u;return null===n?(u=[],i.forEach(((t,i)=>{u.push(...this._findMatches({key:t,value:e[i],searcher:r}))}))):u=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(e,n),searcher:r}),u&&u.length?[{idx:s,item:e,matches:u}]:[]}const{children:r,operator:u}=t,o=[];for(let t=0,i=r.length;t<i;t+=1){const i=n(r[t],e,s);if(i.length)o.push(...i);else if(u===S)return[]}return o},s=this._myIndex.records,u=new Map,o=[];return s.forEach((({$:t,i})=>{if(r(t)){const s=n(e,t,i);s.length&&(u.has(i)||(u.set(i,{idx:i,item:t,matches:[]}),o.push(u.get(i))),s.forEach((({matches:t})=>{u.get(i).matches.push(...t)})))}})),o}_searchObjectList(t,{heap:e,ignoreFieldNorm:i}={}){const n=this._getSearcher(t),s=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:u}=this._myIndex,o=this._normalizedKeys(),c=e?null:[];return u.forEach((({$:t,i:u})=>{if(!r(t))return;const h=[];let a=!1,l=!1;if(o.forEach(((e,i)=>{const s=this._findMatches({key:e,value:t[i],searcher:n});s.length?(h.push(...s),s[0].hasInverse&&(l=!0)):a=!0})),(!l||!a)&&h.length&&(!s||this._coversAllTokens(h))){const n={idx:u,item:t,matches:h};e?(n.score=I(n.matches,{ignoreFieldNorm:i}),e.insert(n)):c.push(n)}})),c}_findMatches({key:e,value:i,searcher:n}){if(!r(i))return[];const s=[];if(t(i))i.forEach((({v:t,i,n:u})=>{if(!r(t))return;const o=n.searchIn(t);if(o.isMatch){const n={score:o.score,key:e,value:t,idx:i,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),s.push(n)}}));else{const{v:t,n:r}=i,u=n.searchIn(t);if(u.isMatch){const i={score:u.score,key:e,value:t,norm:r,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(i.matchedMask=u.matchedMask,i.matchedTerms=u.matchedTerms,i.termCount=u.termCount),s.push(i)}}return s}_coversAllTokens(t){const e=t.length?t[0].termCount:void 0;if(void 0===e)return!0;if(e<=31){let i=0;for(let e=0;e<t.length;e++)i|=t[e].matchedMask||0;return i===2**e-1}const i=new Set;for(let e=0;e<t.length;e++){const n=t[e].matchedTerms;if(n)for(const t of n)i.add(t)}return i.size===e}};U.version="7.5.0",U.createIndex=C,U.parseIndex=function(t,{getFn:e=A.getFn,fieldNormWeight:i=A.fieldNormWeight}={}){const{keys:n,records:s}=t,r=new g({getFn:e,fieldNormWeight:i});return r.setKeys(n),r.setIndexRecords(s),r},U.config=A,U.match=function(t,e,i){if(i&&i.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return b(t,{...A,...i}).searchIn(e)},U.parseQuery=R,k(class{constructor(t,{isCaseSensitive:e=A.isCaseSensitive,ignoreDiacritics:i=A.ignoreDiacritics,includeMatches:n=A.includeMatches,minMatchCharLength:s=A.minMatchCharLength,ignoreLocation:r=A.ignoreLocation,findAllMatches:u=A.findAllMatches,location:o=A.location,threshold:c=A.threshold,distance:h=A.distance}={}){this.query=null,this.options={isCaseSensitive:e,ignoreDiacritics:i,includeMatches:n,minMatchCharLength:s,findAllMatches:u,ignoreLocation:r,location:o,threshold:c,distance:h},t=e?t:t.toLowerCase(),t=i?m(t):t,this.pattern=t,this.query=function(t,e={}){return t.replace(/\\\|/g,"\0").split("|").map((t=>{const i=function(t){const e=[],i=t.length;let n=0;for(;n<i;){for(;n<i&&" "===t[n];)n++;if(n>=i)break;let s=n;for(;s<i&&" "!==t[s]&&'"'!==t[s];)s++;if(s<i&&'"'===t[s]){for(s++;s<i;){if('"'===t[s]){const e=s+1;if(e>=i||" "===t[e]){s++;break}if("$"===t[e]&&(e+1>=i||" "===t[e+1])){s+=2;break}}s++}e.push(t.substring(n,s)),n=s}else{for(;s<i&&" "!==t[s];)s++;e.push(t.substring(n,s)),n=s}}return e}(t.replace(/\u0000/g,"|").trim()).filter((t=>t&&!!t.trim())),n=[];for(let t=0,s=i.length;t<s;t+=1){const s=i[t];let r=!1,u=-1;for(;!r&&++u<y;){const t=p[u],i=x(s,t.multiRegex);i&&(n.push(t.create(i,e)),r=!0)}if(!r)for(u=-1;++u<y;){const t=p[u],i=x(s,t.singleRegex);if(i){n.push(t.create(i,e));break}}}return n}))}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n,ignoreDiacritics:s}=this.options;t=n?t:t.toLowerCase(),t=s?m(t):t;let r=0;const u=[];let o=0,c=!1;for(let n=0,s=e.length;n<s;n+=1){const s=e[n];u.length=0,r=0,c=!1;for(let e=0,n=s.length;e<n;e+=1){const n=s[e],{isMatch:h,indices:a,score:l}=n.search(t);if(!h){o=0,r=0,u.length=0,c=!1;break}r+=1,o+=l,n.type.startsWith("inverse")&&(c=!0),i&&(v.has(n.type)?u.push(...a):u.push(a))}if(r){const t={isMatch:!0,score:o/r};return c&&(t.hasInverse=!0),i&&(t.indices=D(u)),t}}return{isMatch:!1,score:1}}}),k(class{static condition(t,e){return e.useTokenSearch}constructor(t,e){this.options=e,this.analyzer=O({isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,tokenize:e.tokenize});const i=this.analyzer.tokenize(t),{df:n,fieldCount:s}=e._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const t of i){this.termSearchers.push(new E(t,{location:e.location,threshold:e.threshold,distance:e.distance,includeMatches:e.includeMatches,findAllMatches:e.findAllMatches,minMatchCharLength:e.minMatchCharLength,isCaseSensitive:e.isCaseSensitive,ignoreDiacritics:e.ignoreDiacritics,ignoreLocation:!0}));const i=n.get(t)||0,r=Math.log(1+(s-i+.5)/(i+.5));this.idfWeights.push(r)}this.combineAll="all"===e.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const e=[];let i=0,n=0,s=0,r=0;const u=this.combineAll&&!this.useMask?new Set:null;for(let o=0;o<this.termSearchers.length;o++){const c=this.termSearchers[o].searchIn(t),h=this.idfWeights[o];n+=h,c.isMatch&&(s++,i+=h*(1-c.score),c.indices&&e.push(...c.indices),this.combineAll&&(this.useMask?r|=1<<o:u.add(o)))}if(0===s)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-i/n:0)};return this.options.includeMatches&&e.length&&(o.indices=D(e)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=u,o.termCount=this.numTerms),o}}),U.use=function(...t){t.forEach((t=>k(t)))};var H=U;export{H as e}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const t=()=>{},e="body.modal-open{overflow:hidden}";function n(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var o,l=(t,e)=>{var o;Object.entries(null!=(o=e.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=t[o],i=n(Object.getPrototypeOf(t),o,!0)||Object.getOwnPropertyDescriptor(t,o);i&&Object.defineProperty(t,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),e.l.has(o)?t[o]=e.l.get(o):void 0!==l&&(t[o]=l)}}))},i=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},s=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&l(t,e))},r=(t,e)=>e in t,c=(t,e)=>(0,console.error)(t,e),u=new Map,a=new Map,f=new Map,d=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],p="undefined"!=typeof window?window:{},h={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},v=t=>Promise.resolve(t),m=(()=>{try{return!!p.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),y=!!m&&(()=>!!p.document&&Object.getOwnPropertyDescriptor(p.document.adoptedStyleSheets,"length").writable)(),b=!1,$=[],w=[],g=()=>{var t;return(null==(t=p.document)?void 0:t.hidden)?k(O):h.raf(O)},j=(t,e)=>n=>{t.push(n),b||(b=!0,e&&4&h.u?k(O):g())},S=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){c(t)}t.length=0},O=()=>{S($),S(w),(b=$.length>0)&&g()},k=t=>v().then(t),C=j(w,!0);function E(t){var n;const l={mode:"open"};l.delegatesFocus=!!(16&t.u);const i=this.attachShadow(l);if(void 0===o&&(o=null!=(n=function(t){if(!m)return;const e=new CSSStyleSheet;return e.replaceSync(t),e}(e))?n:null),o)y?i.adoptedStyleSheets.push(o):i.adoptedStyleSheets=[...i.adoptedStyleSheets,o];else if(!m){const t=document.createElement("style");t.innerHTML=e,i.prepend(t)}}function M(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var R,x=new WeakMap,A=t=>"sc-"+t.h,D=t=>"object"==(t=typeof t)||"function"===t,L=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],u=e=>{for(let n=0;n<e.length;n++)if(o=e[n],Array.isArray(o))u(o);else if(null!=o&&"boolean"!=typeof o){if(i="function"!=typeof t&&!D(o))o+="";else if("function"!=typeof t&&void 0===o.u){c("Invalid vNode child");continue}i&&s?r[r.length-1].v+=o:r.push(i?P(null,o):o),s=i}};if(u(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,H);const a=P(t,null);return a.m=e,r.length>0&&(a.$=r),a.j=l,a},P=(t,e)=>({u:0,S:t,v:null!=e?e:null,O:null,$:null,m:null,j:null}),T={},H={forEach:(t,e)=>t.map(N).forEach(e),map:(t,e)=>t.map(N).map(e).map(U)},N=t=>({vattrs:t.m,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.S,vtext:t.v}),U=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),L(t.vtag,e,...t.vchildren||[])}const e=P(t.vtag,t.vtext);return e.m=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},W=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},z=(t,e,n)=>null==t||D(t)?t:4&e?(n&&"string"==typeof t||"false"!==t)&&(""===t||!!t):1&e?t+"":t,F=t=>{var e;return null==(e=i(t))?void 0:e.$hostElement$},V=(t,e)=>{const n=F(t);return{emit:t=>q(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},q=(t,e,n)=>{const o=h.ce(e,n);return t.dispatchEvent(o),o},B=(t,e,n,o,l,s)=>{if(n===o)return;let c=r(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,l=Z(n);let i=Z(o);e.remove(...l.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&ut(o,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let l;{const e=i(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(l=t[1])}}return l||(l=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const i=D(o);if((c||i&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?c=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?(!1!==o||""===t.getAttribute(e)||4&s&&!I(e))&&t.removeAttribute(e):(!c||4&s||l)&&!i&&1===t.nodeType&&t.setAttribute(e,o=!0===o?"":o)}}else if(e="-"===e[2]?e.slice(3):r(p,u)?u.slice(2):u[2]+e.slice(3),n||o){const l=e.endsWith(_);e=e.replace(J,""),n&&h.rel(t,e,n,l),o&&h.ael(t,e,o,l)}},G=new Set(["draggable","contenteditable","spellcheck"]),I=t=>G.has(t)||t.startsWith("aria-"),Y=/\s/,Z=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(Y):[]),_="Capture",J=RegExp(_+"$"),K=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.m||{},i=e.m||{};for(const t of Q(Object.keys(l)))t in i||B(o,t,l[t],void 0,n,e.u);for(const t of Q(Object.keys(i)))B(o,t,l[t],i[t],n,e.u)};function Q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var X=!1,tt=!1,et=[],nt=[],ot=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.v)l=o.O=p.document.createTextNode(o.v);else{if(!p.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=p.document.createElement(o.S),K(null,o,tt),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=ot(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=R,l},lt=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===R&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=ot(null,n,l),s&&(o[l].O=s,at(r,s,e)))},it=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;ct(e),t&&t.remove()}}},st=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),rt=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.v;null==s?("slot"!==e.S||X||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{h.u|=1;const e=t.closest(R.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(at(e,t,null!=n?n:null),t["s-sh"]=void 0)}h.u&=-2})(e.O.parentElement)),K(t,e,tt),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,a=0,f=e.length-1,d=e[0],p=e[f],h=o.length-1,v=o[0],m=o[h];const y="template"===n.S?t.content:t;for(;r<=f&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--f];else if(null==v)v=o[++c];else if(null==m)m=o[--h];else if(st(d,v,l))rt(d,v,l),d=e[++r],v=o[++c];else if(st(p,m,l))rt(p,m,l),p=e[--f],m=o[--h];else if(st(d,m,l))rt(d,m,l),at(y,d.O,p.O.nextSibling),d=e[++r],m=o[--h];else if(st(p,v,l))rt(p,v,l),at(y,p.O,d.O),p=e[--f],v=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].j&&e[a].j===v.j){u=a;break}u>=0?(s=e[u],s.S!==v.S?i=ot(e&&e[c],n,u):(rt(s,v,l),e[u]=void 0,i=s.O),v=o[++c]):(i=ot(e&&e[c],n,c),v=o[++c]),i&&at(d.O.parentNode,i,d.O)}r>f?lt(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&it(e,r,f)})(o,l,e,i,n):null!==i?(null!==t.v&&(o.textContent=""),lt(o,null,e,i,0,i.length-1)):!n&&null!==l&&it(l,0,l.length-1)):t.v!==s&&(o.data=s)},ct=t=>{t.m&&t.m.ref&&et.push((()=>t.m.ref(null))),t.$&&t.$.map(ct)},ut=(t,e)=>{nt.push((()=>t(e)))},at=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),ft=(t,e)=>{if(e&&!t.C&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.C=()=>{e["s-p"].splice(n-1,1),o()})))}},dt=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);ft(t,t.M);const n=()=>pt(t,e);if(!e)return C(n);queueMicrotask((()=>{n()}))},pt=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.u|=256,t.R&&(t.R.map((([t,e])=>wt(o,t,e,n))),t.R=void 0),t.A.length&&t.A.forEach((t=>t(n))),l=wt(o,"componentWillLoad",void 0,n)):l=wt(o,"componentWillUpdate",void 0,n),l=ht(l,(()=>wt(o,"componentWillRender",void 0,n))),ht(l,(()=>mt(t,o,e)))},ht=(t,e)=>vt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),vt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,mt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=A(e),s=f.get(i);if(!p.document)return i;if(t=11===t.nodeType?t:p.document,s)if("string"==typeof s){let l,r=x.get(t=t.head||t);if(r||x.set(t,r=new Set),!r.has(i)){l=p.document.createElement("style"),l.textContent=s;const c=null!=(n=h.D)?n:M(p.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(m){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),y?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=x.get(t);if(e||x.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}y?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);yt(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>bt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},yt=(t,e,n,o)=>{try{e=e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.L||P(null,null),s=(t=>t&&t.S===T)(e)?e:L(null,null,e);if(R=o.tagName,l.P&&(s.m=s.m||{},l.P.forEach((([t,e])=>{s.m[e]=o[t]}))),n&&s.m)for(const t of Object.keys(s.m))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.m[t]=o[t]);s.S=null,s.u|=4,t.L=s,s.O=i.O=o.shadowRoot||o,X=!(!(1&l.u)||128&l.u),rt(i,s,n),et.forEach((t=>t())),et.length=0,nt.forEach((t=>t())),nt.length=0})(t,e,o)}catch(e){c(e,t.$hostElement$)}return null},bt=t=>{const e=t.$hostElement$,n=t.i,o=t.M;wt(n,"componentDidRender",void 0,e),64&t.u?wt(n,"componentDidUpdate",void 0,e):(t.u|=64,gt(e),wt(n,"componentDidLoad",void 0,e),t.T(e),o||$t()),t.H(e),t.C&&(t.C(),t.C=void 0),512&t.u&&k((()=>dt(t,!1))),t.u&=-517},$t=()=>{k((()=>q(p,"appload",{detail:{namespace:"yrkesvaljaren"}})))},wt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){c(t,o)}},gt=t=>t.classList.add("hydrated"),jt=(t,e,n,o)=>{const l=i(t);if(!l)return;if(!l)throw Error(`Couldn't find host element for "${o.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=l.$hostElement$,r=l.l.get(e),u=l.u,a=l.i;if(n=z(n,o.t[e][0],!!(64&o.u)),!(8&u&&void 0!==r||n===r||Number.isNaN(r)&&Number.isNaN(n))){if(l.l.set(e,n),o.N){const t=o.N[e];t&&t.map((t=>{try{const[[o,i]]=Object.entries(t);(128&u||1&i)&&(a?a[o](n,r,e):l.A.push((()=>{l.i[o](n,r,e)})))}catch(t){c(t,s)}}))}if(2&u){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,r,e)&&!(16&u))return;16&u||dt(l,!1)}}},St=(t,e,o)=>{var l,s;const r=t.prototype;64&e.u&&1&o&&d.forEach((t=>{Object.defineProperty(r,t,{value(...e){var n;const o=i(this),l=null==o?void 0:o.i;if(l){const n=l[t];"function"==typeof n&&n.call(l,...e)}else null==(n=null==o?void 0:o.U)||n.then((n=>{const o=n[t];"function"==typeof o&&o.call(n,...e)}))}})}));{t.watchers&&!e.N&&(e.N=W(t.watchers)),t.deserializers&&!e.W&&(e.W=t.deserializers),t.serializers&&!e.F&&(e.F=t.serializers);const c=Object.entries(null!=(l=e.t)?l:{});if(c.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:c}=n(r,t)||{};s&&(e.t[t][0]|=2048),c&&(e.t[t][0]|=4096),(1&o||!s)&&Object.defineProperty(r,t,{get(){{if(!(2048&e.t[t][0]))return((t,e)=>i(this).l.get(e))(0,t);const n=i(this),o=n?n.i:r;if(!o)return;return o[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,t,{set(n){const s=i(this);if(s){if(c)return void 0===(32&l?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(n=s.l.get(t)),c.call(this,z(n,l,!!(64&e.u))),void jt(this,t,n=32&l?this[t]:s.$hostElement$[t],e);{if(!(1&o&&4096&e.t[t][0]))return jt(this,t,n,e),void(1&o&&!s.i&&s.A.push((()=>{4096&e.t[t][0]&&s.i[t]!==s.l.get(t)&&(s.i[t]=n)})));const i=()=>{const o=s.i[t];!s.l.get(t)&&o&&s.l.set(t,o),s.i[t]=z(n,l,!!(64&e.u)),jt(this,t,s.i[t],e)};s.i?i():s.A.push((()=>{i()}))}}}})}else 1&o&&64&l&&Object.defineProperty(r,t,{value(...e){var n;const o=i(this);return null==(n=null==o?void 0:o.V)?void 0:n.then((()=>{var n;return null==(n=o.i)?void 0:n[t](...e)}))}})})),1&o){const n=new Map;r.attributeChangedCallback=function(t,o,l){h.jmp((()=>{var s;const u=n.get(t),a=i(this);if(this.hasOwnProperty(u)&&(l=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==l)return;if(null==u){const n=null==a?void 0:a.u;if(a&&n&&!(8&n)&&l!==o){const i=a.i,r=null==(s=e.N)?void 0:s[t];null==r||r.forEach((e=>{const[[s,r]]=Object.entries(e);null!=i[s]&&(128&n||1&r)&&i[s].call(i,l,o,t)}))}return}const f=c.find((([t])=>t===u)),d=f&&4&f[1][0],p=d&&null===l&&void 0===this[u];d&&(l=null!==l&&"false"!==l);const h=Object.getOwnPropertyDescriptor(r,u);p||l==this[u]||h.get&&!h.set||(this[u]=l)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.N)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([t,o])=>{var l;const i=o[1]||t;return n.set(i,t),512&o[0]&&(null==(l=e.P)||l.push([t,i])),i}))]))}}return t},Ot=async(t,e,n)=>{var o;let l;try{if(!(32&e.u)){if(e.u|=32,e.u&=-1025,n.q){const i=((t,e)=>{var n;const o=t.h.replace(/-/g,"_"),l=t.q;if(!l)return;const i=u.get(l);if(i)return i[o];const s=null!=(n=a.get(l))?n:0,r=[s>0?"s-retry="+s:"",""].filter(Boolean).join("&");
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
3
|
+
return import(`./${l}.entry.js${r?"?"+r:""}`).then((t=>(a.delete(l),u.set(l,t),t[o])),(t=>{a.set(l,s+1),c(t,e.$hostElement$)}))})(n,e);if(i&&"then"in i){const t=()=>{};l=await i,t()}else l=i;if(!l)throw e.u&=-33,e.B=(null!=(o=e.B)?o:0)+1,e.B<3&&(e.u|=1024),Error(`Constructor for "${n.h}#${e.G}" was not found`);l.isProxied||(n.N=W(l.watchers),n.F=l.serializers,n.W=l.deserializers,St(l,n,2),l.isProxied=!0);const s=()=>{};e.u|=8;try{new l(e)}catch(e){c(e,t)}e.u&=-9,e.u|=128,s(),kt(e.i,t)}else l=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(l&&l.style){let t;"string"==typeof l.style&&(t=l.style);const e=A(n);if(!f.has(e)){const o=()=>{};((t,e,n)=>{let o=f.get(t);m&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,f.set(t,o)})(e,t,!!(1&n.u)),o()}}}const i=e.M,s=()=>dt(e,!0);i&&i["s-rc"]?i["s-rc"].push(s):s()}catch(n){c(n,t),e.C&&(e.C(),e.C=void 0),!e.T||1024&e.u||e.T(t)}},kt=(t,e)=>{wt(t,"connectedCallback",void 0,e)},Ct=(t,e)=>{wt(t,"disconnectedCallback",void 0,e||t)},Et=(t,e={})=>{var n;if(!p.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],l=e.exclude||[],s=p.customElements,r=p.document.head,c=r.querySelector("meta[charset]"),u=p.document.createElement("style"),a=[];let f,d=!0;if(Object.assign(h,e),h.p=new URL(e.resourcesUrl||"./",p.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,r;const c={u:e[0],h:e[1],t:e[2],I:e[3]};c.t=e[2],c.I=e[3],c.P=[],c.N=W(e[4]),c.F=null!=(n=e[5])?n:{},c.W=null!=(r=e[6])?r:{};const u=c.h,p=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,Y:new Map};n.V=new Promise((t=>n.H=t)),n.U=new Promise((t=>n.T=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,c),1&c.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else E.call(t,c)}connectedCallback(){const t=i(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Rt(this,t,c.I)),f&&(clearTimeout(f),f=null),d?a.push(this):h.jmp((()=>(t=>{if(!(1&h.u)){const e=i(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.u)Rt(t,e,n.I),(null==e?void 0:e.i)?kt(e.i,t):1024&e.u?setTimeout((()=>Ot(t,e,n)),1e3):(null==e?void 0:e.U)&&e.U.then((()=>kt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ft(e,e.M=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),Ot(t,e,n)}o()}})(this))))}disconnectedCallback(){h.jmp((()=>(async t=>{if(!(1&h.u)){const e=i(t);(null==e?void 0:e.Z)&&(e.Z.map((t=>t())),e.Z=void 0),(null==e?void 0:e.i)?Ct(e.i,t):(null==e?void 0:e.U)&&e.U.then((()=>Ct(e.i,t)))}x.has(t)&&x.delete(t),t.shadowRoot&&x.has(t.shadowRoot)&&x.delete(t.shadowRoot)})(this))),k((()=>{var t;const e=i(this);if(!e)return;const n=a.findIndex((t=>t===this));n>-1&&a.splice(n,1),(null==(t=null==e?void 0:e.L)?void 0:t.O)instanceof Node&&!e.L.O.isConnected&&delete e.L.O}))}componentOnReady(){var t;return null==(t=i(this))?void 0:t.U}};64&c.u&&(p.formAssociated=!0),c.q=t[0],l.includes(u)||s.get(u)||(o.push(u),s.define(u,St(p,c,1)))}))})),o.length>0&&(u.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",u.innerHTML.length)){u.setAttribute("data-styles","");const t=null!=(n=h.D)?n:M(p.document);null!=t&&u.setAttribute("nonce",t),r.insertBefore(u,c?c.nextSibling:r.firstChild)}d=!1,a.length?a.map((t=>t.connectedCallback())):h.jmp((()=>f=setTimeout($t,30)))},Mt=(t,e)=>e,Rt=(t,e,n)=>{n&&p.document&&n.map((([n,o,l])=>{const i=At(p.document,t,n),s=xt(e,l),r=Dt(n);h.ael(i,o,s,r),(e.Z=e.Z||[]).push((()=>h.rel(i,o,s,r)))}))},xt=(t,e)=>n=>{var o;try{256&t.u?null==(o=t.i)||o[e](n):(t.R=t.R||[]).push([e,n])}catch(e){c(e,t.$hostElement$)}},At=(t,e,n)=>8&n?p:e,Dt=t=>({passive:!!(1&t),capture:!!(2&t)}),Lt=t=>h.D=t;export{Mt as F,T as H,F as a,Et as b,V as c,t as g,L as h,v as p,s as r,Lt as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
class r extends Error{code;invalidIds;constructor(r,s,t){super(r),this.name="InvalidSelectionError",this.code=s,this.invalidIds=t}}export{r as I}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as a}from"./p-CGXZllj2.js";const s=(s,i)=>{const e=s.class||"";return a("div",{id:s.id,role:s.role,class:{[e]:!!e}},a("div",{class:{"af-validation-message":!0,[`af-validation-message--${s.variant}`]:!0}},a("span",{class:{"af-validation-message__icon":!0,[`af-validation-message__icon--${s.variant}`]:!0},"aria-hidden":"true"}),a("span",{class:"af-validation-message__text"},i)))};export{s as A}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var o,t,e,r={exports:{}},i=n((o||(o=1,t=r.exports,e=function(){var n=function(){},o="undefined",t=typeof window!==o&&typeof window.navigator!==o&&/Trident\/|MSIE /.test(window.navigator.userAgent),e=["trace","debug","info","warn","error"],r={},i=null;function u(n,o){var t=n[o];if("function"==typeof t.bind)return t.bind(n);try{return Function.prototype.bind.call(t,n)}catch(o){return function(){return Function.prototype.apply.apply(t,[n,arguments])}}}function c(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function f(){for(var t=this.getLevel(),r=0;r<e.length;r++){var i=e[r];this[i]=r<t?n:this.methodFactory(i,t,this.name)}if(this.log=this.debug,typeof console===o&&t<this.levels.SILENT)return"No console available for logging"}function a(n){return function(){typeof console!==o&&(f.call(this),this[n].apply(this,arguments))}}function s(e,r,i){return function(e){return"debug"===e&&(e="log"),typeof console!==o&&("trace"===e&&t?c:void 0!==console[e]?u(console,e):void 0!==console.log?u(console,"log"):n)}(e)||a.apply(this,arguments)}function l(n,t){var u,c,a,l=this,d="loglevel";function w(){var n;if(typeof window!==o&&d){try{n=window.localStorage[d]}catch(n){}if(typeof n===o)try{var t=window.document.cookie,e=encodeURIComponent(d),r=t.indexOf(e+"=");-1!==r&&(n=/^([^;]+)/.exec(t.slice(r+e.length+1))[1])}catch(n){}return void 0===l.levels[n]&&(n=void 0),n}}function y(n){var o=n;if("string"==typeof o&&void 0!==l.levels[o.toUpperCase()]&&(o=l.levels[o.toUpperCase()]),"number"==typeof o&&o>=0&&o<=l.levels.SILENT)return o;throw new TypeError("log.setLevel() called with invalid level: "+n)}"string"==typeof n?d+=":"+n:"symbol"==typeof n&&(d=void 0),l.name=n,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=t||s,l.getLevel=function(){return null!=a?a:null!=c?c:u},l.setLevel=function(n,t){return a=y(n),!1!==t&&function(n){var t=(e[n]||"silent").toUpperCase();if(typeof window!==o&&d){try{return void(window.localStorage[d]=t)}catch(n){}try{window.document.cookie=encodeURIComponent(d)+"="+t+";"}catch(n){}}}(a),f.call(l)},l.setDefaultLevel=function(n){c=y(n),w()||l.setLevel(n,!1)},l.resetLevel=function(){a=null,function(){if(typeof window!==o&&d){try{window.localStorage.removeItem(d)}catch(n){}try{window.document.cookie=encodeURIComponent(d)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(n){}}}(),f.call(l)},l.enableAll=function(n){l.setLevel(l.levels.TRACE,n)},l.disableAll=function(n){l.setLevel(l.levels.SILENT,n)},l.rebuild=function(){if(i!==l&&(u=y(i.getLevel())),f.call(l),i===l)for(var n in r)r[n].rebuild()},u=y(i?i.getLevel():"WARN");var p=w();null!=p&&(a=y(p)),f.call(l)}(i=new l).getLogger=function(n){if("symbol"!=typeof n&&"string"!=typeof n||""===n)throw new TypeError("You must supply a name when creating a logger.");var o=r[n];return o||(o=r[n]=new l(n,i.methodFactory)),o};var d=typeof window!==o?window.log:void 0;return i.noConflict=function(){return typeof window!==o&&window.log===i&&(window.log=d),i},i.getLoggers=function(){return r},i.default=i,i},r.exports?r.exports=e():t.log=e()),r.exports));let u=[],c=null;function f(n){return"object"==typeof n&&null!==n&&!Array.isArray(n)}function a(n){return"string"==typeof n&&n.trim().length>0}function s(n){return void 0===n||"string"==typeof n}function l(n){return!(!f(n)||!Array.isArray(n.data)||0===n.data.length)&&n.data.every((n=>function(n){return!!f(n)&&a(n.id)&&("job-title"===n.type||"occupation-name"===n.type)&&a(n.preferred_label)&&s(n.ssyk_level_4_id)&&s(n.ssyk_code_2012)&&s(n.occupation_name_id)&&s(n.occupation_name_preferred_label)&&(void 0===n.weight||"number"==typeof n.weight&&Number.isFinite(n.weight))}(n)))}function d(n){if(!l(n))return void i.error("[TaxonomyRegistry] Felaktigt format på taxonomidata vid registrering.");u=n.data.map((n=>({...n})));const o=f(n.metadata)?n.metadata.labour_market_taxonomy_version:void 0;c=void 0!==o?String(o):void 0!==n.taxonomyVersion?String(n.taxonomyVersion):"unknown",i.debug(`[TaxonomyRegistry] Taxonomi version ${c} registrerades med ${u.length} yrken.`)}function w(){return 0===u.length&&i.warn("[TaxonomyRegistry] Ingen taxonomi är registrerad ännu! Anropa registerTaxonomy(data) först."),u}export{w as g,l as i,i as l,d as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,a as t,h as o}from"./p-CGXZllj2.js";import{T as a}from"./p-uBrs3sSs.js";import{g as n}from"./p-Dw0VR9Aw.js";import"./p-BPnhMTul.js";const i=class{constructor(t){e(this,t)}get el(){return t(this)}engine=null;results=[];inputValue="";isLoading=!0;error="";selectedItem=null;isFlipped=!1;async componentWillLoad(){try{console.log("[NeobrutalSearch] Initializing...");const e=n();this.engine=new a(e),this.isLoading=!1}catch(e){console.error("[NeobrutalSearch] Init failed:",e),this.error="DATA FAILURE",this.isLoading=!1}}componentDidUpdate(){this.isFlipped&&this.highlightCode()}highlightCode(){const e=window.hljs;e&&this.el?.shadowRoot&&this.el.shadowRoot.querySelectorAll("pre code").forEach((t=>{e.highlightElement(t)}))}handleInput(e){const t=e.target.value;if(this.inputValue=t,this.selectedItem=null,!this.engine||t.length<2)return void(this.results=[]);const o=this.engine.search(t,3);this.results=o}handleSelect(e){this.selectedItem=e,this.results=[],this.inputValue=e.label}toggleFlip(){this.isFlipped=!this.isFlipped,this.isFlipped&&setTimeout((()=>this.highlightCode()),100)}render(){return o("div",{key:"032a555551974ef504c703419db83581652a5083",class:"flip-container "+(this.isFlipped?"flipped":"")},o("link",{key:"8af8fac02cd7b8ac1112c08c51e32be3845b7647",rel:"stylesheet",href:"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/atom-one-dark.min.css"}),o("div",{key:"5f63de826af07f1139126a64fb205f65e14f5060",class:"flipper"},o("div",{key:"a7878c0a9db257884cedab104366639d2edb506b",class:"front neobrutal-container"},o("button",{key:"6d65c76d93c717e7c056f0e2da60d2f825efd781",class:"flip-btn",onClick:()=>this.toggleFlip()},"FLIP_ME 🔄"),o("h1",{key:"56981f916be340a827e376cb713e6b6fb5e097bb",class:"glitch","data-text":"YRKE_SÖK"},"YRKE_SÖK"),o("div",{key:"ba3c2e76b631e0d48c5f2ecee1095a999393822e",class:"input-wrapper"},o("input",{key:"75a8e4553a2e77992efa9591a64fba83c3dbe3ea",type:"text",placeholder:"VAD VILL DU BLI?",onInput:e=>this.handleInput(e),value:this.inputValue,disabled:this.isLoading})),this.isLoading&&o("div",{key:"46ec1526451477d7ecf90ffe46dd964986096903",class:"status"},"LOADING_DATA..."),this.error&&o("div",{key:"01bc30a4d4e17e493d8deb08c7e5b71da9c23df7",class:"status error"},this.error),this.selectedItem&&o("div",{key:"0e6d79bc76dbecd7a79bbf0b00246acdef45eda3"},o("div",{key:"f942688584b54c4b43679903549781fbe346e154",class:"fire-status"},o("span",{key:"efde5818a4449b710d22e43e9c8148f380f89f3d",class:"fire-emoji"},"🔥 🔥 🔥"),"HETT VAL: ",this.selectedItem.label.toUpperCase(),"!",o("span",{key:"7764fa1ed1fd7b0541f5ad3a49e3135f4a61edfe",class:"fire-emoji"},"🔥 🔥 🔥")),o("div",{key:"415e1ee36443cc50cddb0f87e8750b34084fd485",class:"raw-data-container"},o("div",{key:"ed730d664599ecac4a89ccdf597833ea3f9fb47a",class:"raw-label"},"RAW_JSON_DATA:"),o("pre",{key:"0921ef8ebccb5add5e9d379e31872b2798b399f8",class:"raw-output"},JSON.stringify(this.selectedItem,null,2)))),o("div",{key:"9af42c5d7cb9d901b6909e8ea4260da7dfee09fd",class:"results-container"},this.results.map((e=>{const t=e?.metadata||{},a=t?.originalResult;return o("div",{class:"result-card",onClick:()=>this.handleSelect(e)},o("div",{class:"card-header"},o("span",{class:"type-badge"},"job-title"===a?.category?"YRK":"GRP"),o("span",{class:"score-badge"},"SCR: ",Math.round(10*(t?.score||0)))),o("div",{class:"card-body"},o("div",{class:"label"},e.displayLabel||e.label)))})))),o("div",{key:"349e56ba67845d6b63ab8616823c5909452ed593",class:"back neobrutal-container source-view"},o("button",{key:"1de742d808b48a65bb266ea19a83ccf567a76ac6",class:"flip-btn",onClick:()=>this.toggleFlip()},"BACK 🔙"),o("h1",{key:"b2400cbd8d36417df1cbb3c487fa7e3d824f4a02",class:"source-header"},"FULL_SOURCE_CODE"),o("p",{key:"59c3e040a7177810b53200426da4543f99c7ca73",class:"source-desc"},"Exakt den koden du ser, inga fejk snippets här inte:"),o("div",{key:"8ed08d5d1d79ec49c6e6bb6a5be504ddd6ed84c2",class:"code-scroll-container"},o("div",{key:"5018114c97191ccf174ae197d56917f35848dcef",class:"code-block"},o("div",{key:"466523ef6acb91d435248d5d399fef5a79bc2e6f",class:"code-label"},"neobrutal-search.tsx"),o("pre",{key:"2a3ad662ac5a0346131aaa13dfd9544169338e48"},o("code",{key:"76b3240d79589217899d74f6727b64d1c8495d7a",class:"language-typescript"},"import { Component, h, State, Element } from '@stencil/core';\nimport { TaxonomySearchEngine } from '../job-selector/logic/search.engine';\nimport { getRegisteredTaxonomy } from '../job-selector/taxonomy-registry';\n\n@Component({ tag: 'neobrutal-search', styleUrl: 'neobrutal-search.css', shadow: true })\nexport class NeobrutalSearch {\n @Element() el!: HTMLElement;\n @State() engine: TaxonomySearchEngine | null = null;\n @State() results: any[] = [];\n @State() inputValue: string = '';\n @State() isLoading: boolean = true;\n @State() error: string = '';\n @State() selectedItem: any | null = null;\n @State() isFlipped: boolean = false;\n\n async componentWillLoad() {\n try {\n const taxonomyData = getRegisteredTaxonomy();\n this.engine = new TaxonomySearchEngine(taxonomyData);\n this.isLoading = false;\n } catch (err) {\n this.error = 'DATA FAILURE';\n this.isLoading = false;\n }\n }\n\n componentDidUpdate() {\n if (this.isFlipped) this.highlightCode();\n }\n\n highlightCode() {\n const hljs = (window as any).hljs;\n if (hljs && this.el?.shadowRoot) {\n const blocks = this.el.shadowRoot.querySelectorAll('pre code');\n blocks.forEach((block) => hljs.highlightElement(block));\n }\n }\n\n handleInput(event: Event) {\n const query = (event.target as HTMLInputElement).value;\n this.inputValue = query;\n this.selectedItem = null;\n\n if (!this.engine || query.length < 2) {\n this.results = [];\n return;\n }\n\n this.results = this.engine.search(query, 3);\n }\n\n handleSelect(item: any) {\n this.selectedItem = item;\n this.results = [];\n this.inputValue = item.label;\n }\n\n toggleFlip() {\n this.isFlipped = !this.isFlipped;\n if (this.isFlipped) setTimeout(() => this.highlightCode(), 100);\n }\n\n render() {\n return (\n <div class=\"neobrutal-container\">\n {/* ... UI structure ... */}\n </div>\n );\n }\n}"))),o("div",{key:"2990f5d3da12a8c8ffeccbb4f786945b7eb70483",class:"code-block"},o("div",{key:"5b957f082c75f5de3f5bd766c9fd135e1ee06471",class:"code-label"},"neobrutal-search.css"),o("pre",{key:"8a2c509035923387c2dac463b72feda6c2c41ba2"},o("code",{key:"581e2ccebcef975ac6dd79059da4c82cb0ffe176",class:"language-css"},".neobrutal-container {\n background-color: #fff4e6;\n padding: 40px;\n border: 4px solid #000;\n box-shadow: 8px 8px 0px #000;\n font-family: 'Courier New', Courier, monospace;\n}\n\n.fire-status {\n background-color: #ff4500;\n animation: fire-flicker 0.2s infinite alternate;\n}\n\n.raw-data-container {\n background: #000;\n color: #0f0;\n padding: 15px;\n box-shadow: 5px 5px 0px #ff00ff;\n}")))))))}};i.style=":host{display:block;font-family:'Courier New', Courier, monospace;--bg-color:#fff4e6;--primary:#ff00ff;--secondary:#00ffff;--text:#000;--border:4px solid #000;--shadow:8px 8px 0px #000}.neobrutal-container{background-color:var(--bg-color);padding:40px;border:var(--border);box-shadow:var(--shadow);max-width:600px;margin:20px auto;min-height:600px;position:relative;box-sizing:border-box;display:flex;flex-direction:column;transition:min-height 0.6s cubic-bezier(0.23, 1, 0.32, 1)}.flip-container{perspective:1000px;width:100%}.flipper{transition:0.6s;transform-style:preserve-3d;position:relative;width:100%}.flip-container.flipped .flipper{transform:rotateY(180deg)}.front,.back{backface-visibility:hidden;top:0;left:0;width:100%}.front{z-index:2;transform:rotateY(0deg);position:relative}.flip-container.flipped .front{position:absolute}.back{transform:rotateY(180deg);box-sizing:border-box;position:absolute}.flip-container.flipped .back{position:relative;z-index:3}h1.glitch{font-size:3rem;font-weight:900;text-transform:uppercase;margin-bottom:30px;background-color:var(--primary);color:var(--text);display:inline-block;padding:5px 15px;border:var(--border);box-shadow:4px 4px 0px #000}.input-wrapper{margin-bottom:50px;padding-right:10px;padding-bottom:10px}input{width:100%;padding:20px;font-size:1.5rem;font-family:inherit;font-weight:bold;border:var(--border);background:white;outline:none;text-transform:uppercase;box-shadow:8px 8px 0px #000;transition:all 0.1s;box-sizing:border-box}.status{font-size:1.5rem;font-weight:bold;background-color:yellow;border:var(--border);padding:10px;margin-bottom:20px;text-align:center}.fire-status{font-size:1.8rem;font-weight:900;background-color:#ff4500;color:#fff;border:var(--border);padding:15px;margin-bottom:15px;text-align:center;position:relative;box-shadow:10px 10px 0px #000;animation:fire-flicker 0.2s infinite alternate}@keyframes fire-flicker{0%{transform:scale(1) rotate(-0.5deg)}100%{transform:scale(1.01) rotate(0.5deg)}}.fire-emoji{font-size:2rem;display:inline-block;margin:0 10px}.raw-data-container{margin-top:10px;margin-bottom:30px;background:#000;border:2px solid #fff;padding:15px;text-align:left;box-shadow:5px 5px 0px #ff00ff}.raw-label{font-size:0.8rem;color:#0f0;margin-bottom:5px;font-weight:bold}.raw-output{font-family:'Courier New', Courier, monospace;font-size:0.8rem;color:#0f0;margin:0;white-space:pre-wrap;word-break:break-all}.flip-btn{position:absolute;top:10px;right:10px;background:#000;color:#fff;border:2px solid #fff;padding:5px 10px;font-weight:bold;cursor:pointer;font-family:'Courier New', Courier, monospace;z-index:10}.flip-btn:hover{background:#ff00ff;color:#000}.source-view{background:#0d1117 !important;color:#e6edf3 !important;border-color:#30363d !important;padding:30px !important;display:flex;flex-direction:column}.source-header{font-size:2rem;color:#ff00ff;margin-bottom:20px;text-shadow:2px 2px 0 #000}.code-scroll-container{flex:1;background:#161b22;border:1px solid #30363d;border-radius:6px;padding:10px}.code-block{margin-bottom:25px;text-align:left}.code-label{background:#238636;color:#fff;display:inline-block;padding:4px 8px;font-weight:bold;font-size:0.8rem;border-radius:4px 4px 0 0}pre{background:#0d1117;margin:0;padding:10px;border:1px solid #30363d}pre code{font-family:'Courier New', Courier, monospace;font-size:0.85rem;line-height:1.4;background:transparent !important;color:#e6edf3}.result-card{background-color:white;border:var(--border);box-shadow:5px 5px 0px #000;padding:15px;transition:all 0.1s;cursor:pointer}.result-card:hover{transform:translate(2px, 2px);box-shadow:3px 3px 0px #000;background-color:var(--secondary)}.card-header{display:flex;justify-content:space-between;margin-bottom:10px;border-bottom:2px solid #000;padding-bottom:5px}.type-badge{background-color:yellow;padding:2px 8px;font-weight:bold;border:2px solid #000}.score-badge{background-color:lime;padding:2px 8px;font-weight:bold;border:2px solid #000}.label{font-size:1.2rem;font-weight:800}";export{i as neobrutal_search}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e,r as i,c as t,a as s}from"./p-CGXZllj2.js";import{A as o}from"./p-DYFAzvqX.js";const a={search:'<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" style="width:100%;height:100%"><path d="M25.645 22.437l-5.063-5.053a1.22 1.22 0 00-.864-.355h-.827a10.477 10.477 0 002.234-6.487C21.125 4.719 16.397 0 10.562 0 4.729 0 0 4.719 0 10.542c0 5.823 4.728 10.542 10.563 10.542 2.452 0 4.707-.831 6.5-2.23v.826c0 .324.126.633.355.862l5.063 5.053c.477.476 1.25.476 1.721 0l1.437-1.435a1.22 1.22 0 00.006-1.723zm-15.082-5.408c-3.59 0-6.5-2.899-6.5-6.487a6.49 6.49 0 016.5-6.487c3.59 0 6.5 2.899 6.5 6.487a6.49 6.49 0 01-6.5 6.487z" fill="currentColor" fill-rule="nonzero"/></svg>',check:'<svg width="23" height="18" viewBox="0 0 23 18" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" style="width:100%;height:100%"><path d="M20.547.18L7.315 13.627 2.453 8.686a.597.597 0 00-.853 0L.177 10.132a.62.62 0 000 .868l6.711 6.82c.236.24.618.24.854 0L22.823 2.493a.62.62 0 000-.867L21.4.18a.597.597 0 00-.853 0z" fill="currentColor"/></svg>',x:'<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" style="width:100%;height:100%"><g stroke="currentColor" stroke-width="2" fill="none" fill-rule="evenodd" stroke-linecap="square"><path d="M2 2l7.986 7.986M9.986 2L2 9.986"/></g></svg>'},r=({name:i,class:t})=>e("span",{class:t,"aria-hidden":"true",innerHTML:a[i],style:{display:"flex",width:t?void 0:"12px",height:t?void 0:"12px",minHeight:"1.4em",alignItems:"center"}}),n=({label:i,forId:t,description:s,required:o=!1})=>e("div",{class:"af-form-label"},e("label",{class:"af-form-label__label",htmlFor:t},i,o?" *":""),s&&e("span",{class:"af-form-label__description"},s)),l=({text:i,breakWords:t=!1,onRemove:s})=>e("span",{class:"af-tag"},e("button",{type:"button",class:"af-tag__button","aria-label":`Ta bort ${i}`,onClick:e=>{e.preventDefault(),s()}},e("span",{class:{"af-tag__text":!0,"af-tag__text--break":t}},i),e(r,{name:"x",class:"af-tag__remove-icon"})));function c(e,i=!1){if(!e||i)return!1;const t=e.inputValue.trim();return""!==t&&!e.suggestions.some((e=>e.label.toLowerCase()===t.toLowerCase()))}const h=class{constructor(e){i(this,e),this.csInput=t(this,"csInput"),this.csSelect=t(this,"csSelect"),this.csClear=t(this,"csClear"),this.csRemoveItem=t(this,"csRemoveItem"),this.csBlur=t(this,"csBlur"),this.csEditSelection=t(this,"csEditSelection"),this.csFocus=t(this,"csFocus"),this.csLoadMore=t(this,"csLoadMore"),this.csClearHistory=t(this,"csClearHistory"),this.csRequestHistory=t(this,"csRequestHistory")}historyRequestTimer;disconnectedCallback(){clearTimeout(this.historyRequestTimer),this.historyRequestTimer=void 0}static nextId=0;get hostElement(){return s(this)}state;config={disabled:!1,placeholder:"Sök...",minLength:1,maxResults:10,enableMultiple:!1,showSearchIcon:!0,requireSelection:!0,size:"medium"};label="";labelDescription;componentId="cs-"+h.nextId++;size="medium";csInput;csSelect;csClear;csRemoveItem;csBlur;csEditSelection;csFocus;csLoadMore;csClearHistory;csRequestHistory;afFocused=!1;activeIndex=-1;isFocusedInternal=!1;isNavigatingWithKeyboard=!1;async setFocus(){if(this.inputRef){this.inputRef.focus();const e=this.inputRef.value.length;this.inputRef.setSelectionRange(e,e)}else this.shouldFocusAfterRender=!0}inputRef;listRef;shouldFocusAfterRender=!1;handleKeyDown=e=>{if(this.config.disabled)return void e.preventDefault();if(!this.state)return;if("BUTTON"===e.target.tagName)return;if("ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"Enter"!==e.key&&"Escape"!==e.key&&(this.isNavigatingWithKeyboard=!1),"itemSelected"===this.state.status&&"Tab"!==e.key&&"Shift"!==e.key&&!e.ctrlKey&&!e.metaKey)return void this.csEditSelection.emit();if("searching"!==this.state.status&&"multiSelect"!==this.state.status)return;const i=this.state.suggestions,t=c(this.state,this.config.requireSelection),s=i.length+(t?1:0);switch(e.key){case"ArrowDown":s>0?(e.preventDefault(),this.isNavigatingWithKeyboard=!0,this.activeIndex<s-1&&(this.activeIndex=this.activeIndex+1,this.scrollToActive()),this.activeIndex>=i.length-3&&this.csLoadMore.emit()):this.csFocus.emit();break;case"ArrowUp":s>0&&(e.preventDefault(),this.isNavigatingWithKeyboard=!0,this.activeIndex>0?(this.activeIndex=this.activeIndex-1,this.scrollToActive()):0!==this.activeIndex&&-1!==this.activeIndex||(this.activeIndex=s-1,this.scrollToActive()));break;case" ":case"Enter":if(" "===e.key&&-1===this.activeIndex)return;if(this.activeIndex>=0&&this.activeIndex<i.length){e.preventDefault();const t=i[this.activeIndex];this.shouldFocusAfterRender=!0,t.isSelected?this.csRemoveItem.emit(t):this.csSelect.emit(t)}else t&&this.activeIndex===i.length&&this.isNavigatingWithKeyboard?(e.preventDefault(),this.handleManualSelect()):"Enter"===e.key&&(t||i.length>0)&&(e.preventDefault(),this.isNavigatingWithKeyboard=!0);break;case"Escape":this.activeIndex=-1,this.csClear.emit()}};onWrapperFocusIn=()=>{this.config.disabled||this.state&&this.isFocusedInternal||this.state&&(this.isFocusedInternal=!0,this.activeIndex=-1,this.csFocus.emit(),""===this.state.inputValue.trim()&&this.csRequestHistory.emit())};onWrapperFocusOut=()=>{this.shouldFocusAfterRender||requestAnimationFrame((()=>{const e=this.hostElement.shadowRoot,i=e?.activeElement||document.activeElement;i&&this.hostElement.contains(i)||e&&e.contains(i)||(this.isFocusedInternal=!1,this.activeIndex=-1,this.csBlur.emit())}))};handleAfFocusedChange(e){this.isFocusedInternal=e,e&&(this.shouldFocusAfterRender=!0)}handleConfigChange(e){e.disabled&&(this.isFocusedInternal=!1,this.activeIndex=-1,this.shouldFocusAfterRender=!1)}handleStateChange(e,i){const t=function({activeIndex:e,newState:i,oldState:t,requireSelection:s=!1}){if(t&&i.inputValue!==t.inputValue)return{activeIndex:-1,shouldRestoreFocus:!1};let o=e;"multiSelect"===i.status&&"multiSelect"===t?.status&&i.selectedItems.length>t.selectedItems.length&&(o=0);const a=c(t,s),r=Boolean(t&&a&&e===t.suggestions.length),n=c(i,s),l=i.suggestions.length+(n?1:0);return r?o=n?i.suggestions.length:-1:0===l?o=-1:o>=l&&(o=l-1),{activeIndex:o,shouldRestoreFocus:"itemSelected"===i.status&&"itemSelected"!==t?.status}}({activeIndex:this.activeIndex,newState:e,oldState:i,requireSelection:this.config.requireSelection});this.activeIndex=t.activeIndex,t.shouldRestoreFocus&&(this.shouldFocusAfterRender=!0)}componentDidUpdate(){this.shouldFocusAfterRender&&this.performFocusRestoration()}performFocusRestoration(e=0){if(this.config.disabled)this.shouldFocusAfterRender=!1;else if(this.inputRef){this.isFocusedInternal=!0,this.inputRef.focus();const i=this.hostElement.shadowRoot?.activeElement;if(i===this.inputRef||e>20){const e=this.inputRef.value.length;this.inputRef.setSelectionRange(e,e),this.shouldFocusAfterRender=!1}else requestAnimationFrame((()=>this.performFocusRestoration(e+1)))}}handleScroll(e){if(!this.config.enableInfiniteScroll)return;const i=e.target;i.scrollHeight-(i.scrollTop+i.clientHeight)<50&&this.csLoadMore.emit()}scrollToActive(){if(!this.listRef||!this.state)return;const e=this.listRef.querySelector("#"+(this.activeIndex===this.state.suggestions.length?`${this.componentId}-list-option-manual-input`:`${this.componentId}-list-option-${this.activeIndex}`));e?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleManualSelect(){const e={id:"",label:this.state.inputValue.trim(),metadata:{type:"ManualInput"}};this.shouldFocusAfterRender=!0,this.csSelect.emit(e),this.config.enableMultiple&&""===this.state?.inputValue?.trim()&&this.csRequestHistory.emit()}render(){if(!this.state)return null;const i="itemSelected"===this.state.status;return e("div",{class:{"core-selector-wrapper":!0,"is-disabled":!!this.config.disabled},"aria-disabled":this.config.disabled?"true":"false",onKeyDown:e=>this.handleKeyDown(e),onMouseMove:()=>{this.isNavigatingWithKeyboard=!1},onFocusin:this.onWrapperFocusIn,onFocusout:this.onWrapperFocusOut},this.label&&e(n,{label:this.label,forId:`${this.componentId}-input`,description:this.labelDescription}),this.labelDescription&&e("div",{id:`${this.componentId}-description`,class:"visually-hidden"},this.labelDescription),this.state&&"loading"===this.state.status&&e("div",{class:"loading-indicator"},"Laddar..."),this.state&&"error"===this.state.status&&e("div",{class:"error-message"},this.state.message),this.state&&["searching","itemSelected","multiSelect"].includes(this.state.status)&&e("div",{class:"combobox-container"},this.renderSearchContainer(),this.isFocusedInternal&&!i&&this.renderSuggestionsList()),this.state&&"idle"!==this.state.validation&&"itemSelected"!==this.state.status&&e(o,{id:`${this.componentId}-validation-message`,variant:"error"===this.state.validation?"error":"success",role:"error"===this.state.validation?"alert":void 0,class:"selector-validation-message"},this.state.message))}renderSearchContainer(){const i="itemSelected"===this.state.status,t=i?this.state.selectedItem?.label||"":this.state.inputValue,s="multiSelect"===this.state.status,o=t.length>0,a=s&&this.state.selectedItems.length>0,n=this.state&&(this.state.suggestions.length>0||c(this.state,this.config.requireSelection)),h=this.activeIndex>=0&&this.isNavigatingWithKeyboard?this.activeIndex===this.state.suggestions.length?`${this.componentId}-list-option-manual-input`:`${this.componentId}-list-option-${this.activeIndex}`:void 0,d=`${this.componentId}-validation-message`,g=this.state&&"error"===this.state.validation&&this.state.message,p=[];!!this.labelDescription&&0===t.length&&p.push(`${this.componentId}-description`),g&&p.push(d);const u=p.length>0?p.join(" "):void 0;return e("div",{class:{"search-container":!0,"is-inactive-selected":i,"multi-search-container":s,"has-tags":a,"has-validation-error":"error"===this.state?.validation,"has-positive-validation":!i&&"success"===this.state?.validation},onClick:()=>{this.config.disabled||(i?this.csEditSelection.emit():""===this.state.inputValue.trim()&&this.csRequestHistory.emit())}},s&&this.state.selectedItems.length>0&&e("div",{class:"selected-tags-wrapper"},this.state.selectedItems.map((i=>e(l,{key:i.id,text:i.label,breakWords:!0,onRemove:()=>{this.shouldFocusAfterRender=!0,this.csRemoveItem.emit(i)}})))),e("div",{class:"input-controls-wrapper"},e(r,{name:"search",class:{"search-icon-container":!0,"selector-search-icon":!0,"is-hidden":!this.config.showSearchIcon||o||a}}),e("div",{class:{"input-area":!0,"has-value":!this.config.showSearchIcon||o||a}},i&&e("span",{class:"selected-text-in-box"},t),e("input",{class:{"selector-input-field":!0,"visually-hidden-selected":i},ref:e=>this.inputRef=e,id:`${this.componentId}-input`,type:"text",placeholder:this.config.placeholder,value:t,onInput:e=>{this.config.disabled||(this.isNavigatingWithKeyboard=!1,this.csInput.emit(e.target.value))},autocomplete:"off",role:"combobox","aria-label":this.label,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":!i&&n&&this.isNavigatingWithKeyboard?"true":"false","aria-controls":!i&&n&&this.isNavigatingWithKeyboard?`${this.componentId}-listbox`:void 0,"aria-activedescendant":h,"aria-invalid":g?"true":"false","aria-describedby":u,readOnly:i,disabled:!!this.config.disabled})),e("button",{type:"button",class:{"clear-button":!0,"is-visible":o||i},tabIndex:o||i?0:-1,disabled:!!this.config.disabled,"aria-label":"Rensa inmatad text",onMouseDown:e=>e.preventDefault(),onClick:()=>{this.config.disabled||(this.csInput.emit(""),this.shouldFocusAfterRender=!0,this.csClear.emit(),this.csRequestHistory.emit())}},e(r,{name:"x"}))))}renderSuggestionsList(){if("itemSelected"===this.state.status)return null;const i=Boolean(this.state.inputValue&&this.state.inputValue.trim().length>0),t=c(this.state,this.config.requireSelection),s=Boolean(this.state.suggestions&&this.state.suggestions.length>0),o=i&&!s&&!t;if(!s&&!t&&!o)return null;const a=this.state.listHeader||this.config.listHeader,n=this.state.showHistoryHeader||this.state.isHistoryView&&this.config.showHistoryHeader;return e("div",{class:"suggestions-box-container"},e("div",{class:"suggestions-box",ref:e=>this.listRef=e,onScroll:e=>this.handleScroll(e)},(a||n)&&e("div",{class:"list-header-container"},e("slot",{name:"suggestions-overlay"}),a&&e("div",{class:"list-header"},e("span",null,a)),n&&e("div",{class:"list-header history-header"},e("span",null,"Din privata historik")," - ",e("button",{type:"button",class:"history-clear-link","aria-label":"Rensa historik",disabled:!!this.config.disabled,onMouseDown:e=>e.preventDefault(),onClick:()=>{this.config.disabled||this.csClearHistory.emit()}},"Rensa"))),!a&&!n&&e("slot",{name:"suggestions-overlay"}),e("div",{id:`${this.componentId}-listbox`,role:"listbox"},o&&e("div",{class:"suggestion-item no-results"},"Inga resultat matchade din sökning"),!o&&this.state.suggestions.map(((i,t)=>e("div",{key:i.id||t,role:"option",id:`${this.componentId}-list-option-${t}`,"aria-selected":!!i.isSelected,"aria-current":t===this.activeIndex?"true":"false",class:{"suggestion-item":!0,"active-suggestion":t===this.activeIndex,"is-selected":!!i.isSelected,"is-keyboard-focus":t===this.activeIndex&&this.isNavigatingWithKeyboard},onMouseDown:e=>{e.preventDefault(),this.config.disabled||(this.shouldFocusAfterRender=!0,i.isSelected?this.csRemoveItem.emit(i):this.csSelect.emit(i),this.config.enableMultiple&&(clearTimeout(this.historyRequestTimer),this.historyRequestTimer=setTimeout((()=>{this.csRequestHistory.emit(),this.historyRequestTimer=void 0}),50)))},onMouseEnter:()=>{this.config.disabled||i.isSelected||(this.activeIndex=t,this.isNavigatingWithKeyboard=!1)}},e(r,{name:"check",class:"selection-indicator-icon"}),e("span",null,i.displaySegments?i.displaySegments.map(((i,t)=>e("span",{key:t,class:{"match-highlight":!!i.isMatch,"metadata-dimmed":!!i.isMetadata}},i.text))):i.label)))),!o&&c(this.state,this.config.requireSelection)&&e("div",{role:"option",id:`${this.componentId}-list-option-manual-input`,class:{"suggestion-item":!0,"active-suggestion":this.activeIndex===this.state.suggestions.length,"is-keyboard-focus":this.activeIndex===this.state.suggestions.length&&this.isNavigatingWithKeyboard},onMouseDown:e=>{e.preventDefault(),this.config.disabled||this.handleManualSelect()},onMouseEnter:()=>{this.config.disabled||(this.activeIndex=this.state.suggestions.length,this.isNavigatingWithKeyboard=!1)}},e("span",null,'Använd "',e("strong",null,this.state.inputValue.trim()),'"')))))}static get delegatesFocus(){return!0}static get watchers(){return{afFocused:[{handleAfFocusedChange:0}],config:[{handleConfigChange:0}],state:[{handleStateChange:0}]}}};h.style=":host{--digi--grayscale-0:#ffffff;--digi--grayscale-50:#fbfbfb;--digi--grayscale-100:#f4f4f4;--digi--grayscale-200:#ededed;--digi--grayscale-300:#e4e4e4;--digi--grayscale-400:#dddddd;--digi--grayscale-500:#cacaca;--digi--grayscale-600:#acacac;--digi--grayscale-700:#757575;--digi--grayscale-800:#5c5c5c;--digi--grayscale-900:#333333;--digi--grayscale-1000:#000000;--digi--global--color--cta--link--base:#1616b2;--digi--global--color--function--danger--base:#da0000;--digi--global--color--function--success--base:#008a20;--digi--global--color--function--success--lightest-3:#d4edda;--digi--global--color--function--warning--base:#ffe200;--digi--color--text--primary:var(--digi--grayscale-900);--digi--color--text--secondary:var(--digi--grayscale-700);--digi--color--text--link:var(--digi--global--color--cta--link--base);--digi--color--icons--success:var(--digi--global--color--function--success--base);--digi--color--icons--warning:#8a7a00;--digi--color--icons--danger:var(--digi--global--color--function--danger--base);--digi--global--typography--font-family--default:\"Open Sans\", Arial, sans-serif;--digi--global--typography--font-size--base:1rem;--digi--global--typography--font-size--small:0.875rem;--digi--global--typography--font-weight--regular:400;--digi--global--typography--font-weight--semibold:600;--digi--global--typography--font-weight--bold:700;--digi--global--typography--line-height--base:1.5;--digi--typography--label--font-size--desktop:1rem;--digi--typography--label--font-weight--desktop:600;--digi--typography--label--line-height--desktop:1.5;--digi--typography--label-description--font-size--desktop:1rem;--digi--typography--label-description--line-height--desktop:1.5;--digi--typography--tag--font-size--desktop:0.875rem;--digi--gutter--icon:0.625rem;--digi--gutter--smaller:0.75rem;--digi--gutter--small:0.875rem;--digi--gutter--medium:1rem;--digi--border-width--primary:1px;--digi--border-style--primary:solid;--digi--border-radius--primary:0;--digi--border-radius--secondary:6px;--af-tag-color:#091d54;--af-tag-hover-background:#ddf1fc}.af-form-label{color:var(--digi--color--text--primary);display:flex;flex-direction:column;font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--label--font-size--desktop);margin-bottom:0.5rem}.af-form-label__label{cursor:pointer;display:block;font-weight:var(--digi--typography--label--font-weight--desktop);line-height:var(--digi--typography--label--line-height--desktop)}.af-form-label__description{display:block;font-size:var(--digi--typography--label-description--font-size--desktop);line-height:var(--digi--typography--label-description--line-height--desktop);max-width:35rem}.af-validation-message{align-items:center;display:flex;flex-wrap:wrap}.af-validation-message__icon{flex:0 0 auto;height:1.25em;margin-inline-end:var(--digi--gutter--icon);width:1.25em}.af-validation-message__icon--success,.af-validation-message__icon--error{background-color:var(--af-validation-icon-color, currentColor);-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}.af-validation-message__icon--success{--af-validation-icon-color:var(--digi--color--icons--success);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath d='M25 12.5C25 19.404 19.404 25 12.5 25S0 19.404 0 12.5 5.596 0 12.5 0 25 5.596 25 12.5zm-13.946 6.619l9.274-9.275a.806.806 0 000-1.14l-1.14-1.14a.806.806 0 00-1.14 0l-7.564 7.563-3.531-3.531a.807.807 0 00-1.14 0l-1.141 1.14a.806.806 0 000 1.14l5.242 5.243a.806.806 0 001.14 0z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 25 25'%3E%3Cpath d='M25 12.5C25 19.404 19.404 25 12.5 25S0 19.404 0 12.5 5.596 0 12.5 0 25 5.596 25 12.5zm-13.946 6.619l9.274-9.275a.806.806 0 000-1.14l-1.14-1.14a.806.806 0 00-1.14 0l-7.564 7.563-3.531-3.531a.807.807 0 00-1.14 0l-1.141 1.14a.806.806 0 000 1.14l5.242 5.243a.806.806 0 001.14 0z'/%3E%3C/svg%3E\")}.af-validation-message__icon--error{--af-validation-icon-color:var(--digi--color--icons--danger);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M34.4328058,0 C35.5494848,0 36.5900526,0.609146757 37.1483921,1.58958113 L47.5812454,19.9104189 C48.1395849,20.8909496 48.1395849,22.1090504 47.5812454,23.0895811 L37.1483921,41.4104189 C36.5900526,42.3908532 35.5494848,43 34.4328058,43 L13.5671942,43 C12.4505152,43 11.4099474,42.3908532 10.8516079,41.4104189 L0.41875464,23.0895811 C-0.13958488,22.1090504 -0.13958488,20.8909496 0.41875464,19.9104189 L10.8516079,1.58958113 C11.4099474,0.609146757 12.4505152,0 13.5671942,0 Z M18.6736823,12.3728178 C18.2711762,11.964729 17.6203819,11.964729 17.2178757,12.3728178 L15.2825964,14.334939 C14.8800903,14.7430278 14.8800903,15.4028485 15.2825964,15.8109373 L20.6089616,21.2111779 L15.2825964,26.6114185 C14.8800903,27.0195074 14.8800903,27.6793281 15.2825964,28.0874169 L17.2178757,30.049538 C17.6203819,30.4576269 18.2711762,30.4576269 18.6736823,30.049538 L24.0000475,24.6492974 L29.3264127,30.049538 C29.7289188,30.4576269 30.3797132,30.4576269 30.7822193,30.049538 L32.7174986,28.0874169 C33.1200048,27.6793281 33.1200048,27.0195074 32.7174986,26.6114185 L27.3911334,21.2111779 L32.7174986,15.8109373 C33.1200048,15.4028485 33.1200048,14.7430278 32.7174986,14.334939 L30.7822193,12.3728178 C30.3797132,11.964729 29.7289188,11.964729 29.3264127,12.3728178 L24.0000475,17.7730584 Z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M34.4328058,0 C35.5494848,0 36.5900526,0.609146757 37.1483921,1.58958113 L47.5812454,19.9104189 C48.1395849,20.8909496 48.1395849,22.1090504 47.5812454,23.0895811 L37.1483921,41.4104189 C36.5900526,42.3908532 35.5494848,43 34.4328058,43 L13.5671942,43 C12.4505152,43 11.4099474,42.3908532 10.8516079,41.4104189 L0.41875464,23.0895811 C-0.13958488,22.1090504 -0.13958488,20.8909496 0.41875464,19.9104189 L10.8516079,1.58958113 C11.4099474,0.609146757 12.4505152,0 13.5671942,0 Z M18.6736823,12.3728178 C18.2711762,11.964729 17.6203819,11.964729 17.2178757,12.3728178 L15.2825964,14.334939 C14.8800903,14.7430278 14.8800903,15.4028485 15.2825964,15.8109373 L20.6089616,21.2111779 L15.2825964,26.6114185 C14.8800903,27.0195074 14.8800903,27.6793281 15.2825964,28.0874169 L17.2178757,30.049538 C17.6203819,30.4576269 18.2711762,30.4576269 18.6736823,30.049538 L24.0000475,24.6492974 L29.3264127,30.049538 C29.7289188,30.4576269 30.3797132,30.4576269 30.7822193,30.049538 L32.7174986,28.0874169 C33.1200048,27.6793281 33.1200048,27.0195074 32.7174986,26.6114185 L27.3911334,21.2111779 L32.7174986,15.8109373 C33.1200048,15.4028485 33.1200048,14.7430278 32.7174986,14.334939 L30.7822193,12.3728178 C30.3797132,11.964729 29.7289188,11.964729 29.3264127,12.3728178 L24.0000475,17.7730584 Z'/%3E%3C/svg%3E\")}.af-validation-message__icon--warning{background:center / contain no-repeat url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='6.75' fill='%23333'/%3E%3Cpath d='m18 9c0 4.9717-4.0298 9-9 9-4.9702 0-9-4.0283-9-9 0-4.9688 4.0298-9 9-9 4.9702 0 9 4.0312 9 9zm-9 1.8145c-0.92196 0-1.6694 0.7474-1.6694 1.6694 0 0.92196 0.7474 1.6694 1.6694 1.6694s1.6694-0.7474 1.6694-1.6694c0-0.92196-0.7474-1.6694-1.6694-1.6694zm-1.3157-1.065c0.012593 0.23095 0.20355 0.41175 0.43483 0.41175h1.7618c0.23128 0 0.42224-0.1808 0.43483-0.41175l0.2692-4.9355c0.013609-0.24946-0.18501-0.45922-0.43483-0.45922h-2.3002c-0.24982 0-0.4484 0.20976-0.43479 0.45922l0.2692 4.9355z' fill='%23FFE200'/%3E%3C/svg%3E\");position:relative;top:3px}.af-validation-message__text{color:var(--digi--color--text--primary);flex:1;font-family:var(--digi--global--typography--font-family--default);font-size:var(--digi--typography--tag--font-size--desktop);transform:translateY(1px)}.af-tag{display:block;max-width:100%;min-width:0}.af-tag__button{align-items:center;background:var(--digi--grayscale-0);border:var(--digi--border-width--primary) var(--digi--border-style--primary) var(--af-tag-color);border-radius:var(--digi--border-radius--secondary);color:var(--af-tag-color);cursor:pointer;display:inline-flex;font-family:var(--digi--global--typography--font-family--default);font-size:0.875rem;font-weight:var(--digi--global--typography--font-weight--semibold);gap:10px;height:auto;max-width:100%;min-height:unset;min-width:0;padding:6px 8px;text-align:left;white-space:normal}.af-tag__button:hover{background:var(--af-tag-hover-background)}.af-tag__button:focus-visible{background:var(--af-tag-hover-background);border-color:var(--af-tag-color);outline:2px solid var(--digi--grayscale-1000);outline-offset:2px;box-shadow:0 0 0 5px var(--digi--grayscale-0)}.af-tag__button:active{background:var(--af-tag-hover-background)}.af-tag__text{display:inline-block;max-width:100%;min-width:0;white-space:normal}.af-tag__text--break{overflow-wrap:anywhere;word-break:break-word}.af-tag__remove-icon{flex:0 0 auto;height:1em;min-height:0 !important;width:1em}:host{--selector-width:var(--cs-width, 100%);--selector-min-width:var(--cs-min-width, 200px);--selector-max-width:var(--cs-max-width, none);--selector-height:var(--cs-height, auto);--selector-min-height:var(--cs-min-height, auto);--selector-max-height:var(--cs-max-height, none);--selector-font-family:var(--global-font-family, 'Open Sans', sans-serif);--selector-font-size:var(--cs-font-size, 1rem);--selector-text-color:var(--cs-text-color, #212529);--selector-placeholder-color:var(--cs-placeholder-color, #6c757d);--selector-border-color:var(--cs-border-color, #d1d5db);--selector-focus-border-color:var(--cs-focus-border-color, #86b7fe);--selector-focus-shadow:var(--cs-focus-shadow, 0 0 0 0.25rem rgba(13, 110, 253, 0.25));--selector-background-color:var(--cs-background-color, #fff);--selector-icon-color:var(--cs-icon-color, #6c757d);--selector-clear-button-color:var(--cs-clear-button-color, #6c757d);--selector-clear-button-hover-color:var(--cs-clear-button-hover-color, #212529);--selector-suggestion-background-color:var(--cs-suggestion-background-color, #fff);--selector-suggestion-border-color:var(--cs-suggestion-border-color, #ced4da);--selector-suggestion-hover-background:var(--cs-suggestion-hover-background, #e9ecef);--selector-suggestion-active-background:var(--cs-suggestion-active-background, #dde4eb);--selector-suggestion-text-color:var(--cs-suggestion-text-color, #212529);--selector-suggestion-highlight-weight:var(--cs-suggestion-highlight-weight, bold);--selector-error-color:var(--cs-error-color, #dc3545);--selector-loading-color:var(--cs-loading-color, #6c757d);--selector-container-min-height:40px;--selector-padding-y:6px;--selector-padding-x:10px;--selector-icon-size:1.1em;--selector-gap:6px;--cs-row-height:32px;display:flex;flex-direction:column;width:var(--selector-width);min-width:var(--selector-min-width);max-width:var(--selector-max-width);height:var(--selector-height);min-height:var(--selector-min-height);max-height:var(--selector-max-height);font-family:var(--selector-font-family);font-size:var(--selector-font-size);color:var(--selector-text-color);position:relative}:host([cs-size=\"small\"]){--selector-container-min-height:32px;--selector-padding-y:2px;--selector-icon-size:1em;--selector-gap:4px;--cs-row-height:28px}:host([cs-size=\"medium\"]){--selector-container-min-height:40px;--selector-padding-y:6px;--cs-row-height:32px}:host([cs-size=\"large\"]){--selector-container-min-height:48px;--selector-padding-y:10px;--selector-icon-size:1.25em;--selector-gap:8px;--cs-row-height:40px}*{box-sizing:border-box}.core-selector-wrapper{display:flex;flex-direction:column;flex:1;min-height:inherit}.af-form-label{margin-bottom:0.5rem}.search-container{display:flex;align-items:center;flex-wrap:wrap;gap:6px;border:1px solid #757575;border-radius:0px;padding:var(--selector-padding-y) var(--selector-padding-x);flex:1;min-height:var(--selector-container-min-height);cursor:text;background-color:var(--selector-background-color);position:relative;overflow:hidden}.search-container:focus-within{outline:2px solid black;outline-offset:2px}.search-container.is-inactive-selected .selector-input-field{caret-color:transparent;cursor:default}.is-inactive-selected+.suggestions-box-container{display:none !important}.search-container.is-inactive-selected .search-icon-container{display:none}.search-container.is-inactive-selected .input-area{padding-left:0}.input-controls-wrapper{position:relative;width:100%;display:flex;align-items:center}.search-icon-container{position:absolute;left:0;top:50%;width:20px;height:20px;transform:translateY(-50%);z-index:1;pointer-events:none;display:flex;align-items:center;justify-content:center;transition:transform 0.2s ease-in-out, opacity 0.2s ease-in-out;opacity:1;max-height:100%}.search-icon-container.is-hidden{opacity:0;transform:translateY(-50%) scale(0.7)}.selector-search-icon{color:var(--digi--color--icon--primary, #333);display:block;flex:0 0 auto;width:20px;height:20px}.clear-button>span{color:var(--digi--color--icon--primary, #333)}.input-area{flex:1;min-width:0;padding-left:27px;display:flex;align-items:center;transition:padding-left 0.2s ease-in-out}.input-area.has-value{padding-left:0}.selector-input-field{width:100%;font-family:inherit;font-size:var(--selector-font-size);color:inherit;border:none;outline:none;background:transparent;transition:padding-right 0.2s ease-in-out}.search-container.has-input .selector-input-field{padding-right:0}.selector-input-field::placeholder{color:var(--selector-placeholder-color);opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.clear-button{position:static;flex-shrink:0;opacity:0;pointer-events:none;z-index:2;background:none;border:none;padding:0;margin:0;height:20px;width:20px;cursor:pointer;color:var(--selector-clear-button-color);line-height:1;display:flex;align-items:center;transition:color 0.2s ease-in-out, opacity 0.2s ease-in-out}.clear-button.is-visible{opacity:1;pointer-events:auto}.clear-button:hover,.clear-button:focus{color:var(--selector-clear-button-hover-color);outline:none}.search-container.multi-search-container{display:flex;flex-direction:column;gap:0.5rem;align-items:stretch;padding-top:var(--selector-padding-y);padding-bottom:var(--selector-padding-y);width:100%;max-width:100%}.selected-tags-wrapper{display:flex;flex-wrap:wrap;gap:0.5rem;width:100%;max-width:100%;box-sizing:border-box}.selected-tags-wrapper .af-tag{display:block;max-width:100%;min-width:0}.selected-tags-wrapper .af-tag__button{white-space:normal !important;height:auto !important;text-align:left !important;word-break:break-word !important;overflow-wrap:anywhere !important;max-width:100% !important}.search-container.single-value-display{display:flex;align-items:center;flex-wrap:nowrap;gap:0.5rem;min-height:var(--selector-container-min-height);padding:var(--selector-padding-y) var(--selector-padding-x)}.selected-text-in-box{flex-grow:1;white-space:normal;word-break:break-word;min-width:0;line-height:inherit}.search-container.single-value-display .clear-button{position:static;transform:none;opacity:1;pointer-events:auto;flex-shrink:0}.combobox-container{position:relative;margin-top:0;display:flex;flex-direction:column;flex:1}.suggestions-box-container{position:absolute;top:100%;left:0;right:0;z-index:100}.suggestions-box-container.is-hidden-list{z-index:101;pointer-events:none}.suggestions-box{position:relative;background-color:white;border:1px solid var(--selector-suggestion-border-color);border-radius:4px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow-y:auto;margin:2px 0px;max-height:calc(var(--max-visible-rows, 10) * var(--cs-row-height) + 40px)}.suggestion-item{display:flex;align-items:center;min-height:var(--cs-row-height);height:auto;padding:6px 1rem;font-size:inherit;line-height:1.25;cursor:pointer;color:var(--selector-suggestion-text-color);list-style:none;transition:background-color 0.15s ease, color 0.15s ease;white-space:normal !important;word-break:break-word !important;overflow-wrap:anywhere !important;position:relative;z-index:1;box-sizing:border-box}.suggestion-item>span{transition:font-weight 0.2s ease, transform 0.2s ease;display:inline;vertical-align:middle;white-space:normal;word-break:break-word;overflow-wrap:anywhere}.suggestion-item:hover,.suggestion-item.active-suggestion{background-color:var(--selector-suggestion-active-background)}.suggestion-item.active-suggestion.is-keyboard-focus{outline:1px solid black;outline-offset:-1px}.suggestion-item.is-selected{color:var(--selector-suggestion-text-color) !important;cursor:default;background-color:#f2f2f2 !important}.suggestion-item.is-selected span{font-weight:600}.selection-indicator-icon{width:0;height:20px;opacity:0;transform:scale(0.5);margin-right:0;transition:width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), margin-right 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);color:var(--digi--grayscale-800, #333);flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden}.suggestion-item.is-selected .selection-indicator-icon{width:24px;opacity:1;transform:scale(1);margin-right:8px}.suggestion-item.is-selected.active-suggestion{background-color:#f2f2f2 !important}.suggestion-item .suggestion-text strong,.suggestion-item .match-highlight{font-weight:var(--selector-suggestion-highlight-weight);color:inherit;display:inline}.metadata-dimmed,.occupation-variant-label{font-size:1rem;color:var(--digi--grayscale-700, #757575);margin-left:0.25rem;display:inline;vertical-align:baseline;line-height:inherit;white-space:normal}.suggestion-item.no-results{color:var(--selector-placeholder-color);cursor:default;padding:0.5rem 1rem;font-style:italic;text-align:center;height:auto}.search-container.has-validation-error{border-color:var(--selector-error-color);border-width:2px;background-color:#fef3f2}.search-container.has-positive-validation{border-color:#155724;background-color:#d4edda}.status-message{margin-top:0.5rem}.selector-validation-message{margin-top:0.5rem;display:block}.visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}input::-webkit-search-decoration,input::-webkit-search-cancel-button,input::-webkit-search-results-button,input::-webkit-search-results-decoration{-webkit-appearance:none;display:none}input::-ms-clear{display:none;width:0;height:0}.list-header-container{position:sticky;top:0;z-index:10;background-color:#f8f9fa;border-bottom:1px solid var(--selector-suggestion-border-color);min-height:auto;display:flex;flex-direction:column}.list-header-container ::slotted([slot=\"suggestions-overlay\"]){position:absolute !important;top:0;left:0;width:100%;height:100%;z-index:20}.suggestions-box>::slotted([slot=\"suggestions-overlay\"]){position:sticky !important;top:0;left:0;width:100%;z-index:20}.list-header{display:flex;align-items:center;min-height:var(--cs-row-height);padding:6px 1rem;font-size:0.875rem;line-height:1.25;color:var(--digi--grayscale-700, #757575);border-bottom:1px solid var(--selector-suggestion-border-color, #ced4da)}.list-header span{font-size:0.875rem;font-weight:normal}.history-clear-link{color:var(--digi--grayscale-700, #757575);text-decoration:underline;cursor:pointer;margin-left:0.25rem;background:transparent;border:0;padding:0;font:inherit}.history-clear-link:hover{color:var(--digi--grayscale-900, #222)}@keyframes cs-shrink-fade{from{opacity:1}to{opacity:1}}@keyframes cs-collapse{from{height:auto}to{height:auto}}.cs-toast{position:absolute;top:0;left:0;width:100%;height:100%;z-index:20;display:flex;align-items:center;justify-content:center;gap:8px;background-color:#f8fdf0;animation:cs-toastSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;pointer-events:none;box-sizing:border-box}.cs-toast.is-closing{animation:cs-toastSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards}.cs-toast-text{margin:0;font-size:0.875rem;font-weight:500;color:#2e7d32}@keyframes cs-toastSlideDown{from{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes cs-toastSlideUp{from{transform:translateY(0)}to{transform:translateY(-100%)}}.selector-input-field.visually-hidden-selected{position:absolute;opacity:0;pointer-events:none;width:1px;height:1px;overflow:hidden}";export{h as core_selector}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as t}from"./p-BPnhMTul.js";import{l as e}from"./p-Dw0VR9Aw.js";const r=1,n=100,i=10,o={keys:["preferred_label"],includeScore:!0,ignoreDiacritics:!0,ignoreFieldNorm:!0,threshold:.6,minMatchCharLength:1,ignoreLocation:!0,distance:100},s="T.ex. frisör, vårdbiträde, snickare",a={format:(t,e,r)=>{const n=function(t,e){if(!t)return[];if(!e||0===e.trim().length)return[{text:t,isMatch:!1}];const r=t.toLowerCase(),n=e.toLowerCase().split(/\s+/).filter((t=>t.length>0)),i=new Set;if(n.forEach((t=>{let e=0;for(;-1!==(e=r.indexOf(t,e));){for(let r=0;r<t.length;r++)i.add(e+r);e+=t.length}})),0===i.size&&n.forEach((e=>{const r=function(t,e){const r=t.toLowerCase(),n=e.length;let i=99,o=-1,s=0;const a=Math.max(3,n-2),c=Math.min(r.length,n+2);for(let t=0;t<=r.length-a;t++)for(let n=a;n<=c&&t+n<=r.length;n++){const a=l(e,r.slice(t,t+n));a<i&&(i=a,o=t,s=n)}return i<=Math.max(2,Math.floor(.25*n))&&-1!==o?{start:o,length:s}:null}(t,e);if(r)for(let t=0;t<r.length;t++)i.add(r.start+t)})),0===i.size)return[{text:t,isMatch:!1}];const o=[];let s="",a=i.has(0);for(let e=0;e<t.length;e++){const r=i.has(e);r!==a?(s.length>0&&o.push({text:s,isMatch:a}),s=t[e],a=r):s+=t[e]}return s.length>0&&o.push({text:s,isMatch:a}),o}(t,e);return r?[...n,{text:" ",isMatch:!1},{text:`(${r})`,isMetadata:!0}]:n}};function l(t,e){const r=t.length,n=e.length,i=Array.from({length:r+1},(()=>new Array(n+1).fill(0)));for(let t=0;t<=r;t++)i[t][0]=t;for(let t=0;t<=n;t++)i[0][t]=t;for(let o=1;o<=r;o++)for(let r=1;r<=n;r++)i[o][r]=t[o-1]===e[r-1]?i[o-1][r-1]:1+Math.min(i[o-1][r],i[o][r-1],i[o-1][r-1]);return i[r][n]}e.setLevel(e.levels.DEBUG);const c=t=>t?t.toLowerCase().trim():"";function u(t){return t.sort(((t,e)=>{const r=t.score??0,n=e.score??0;if(r!==n)return n-r;const i=t.weight??0,o=e.weight??0;return i!==o?o-i:t.displayLabel.localeCompare(e.displayLabel,"sv")}))}function f(t){return t.map((t=>t.isMatch?`<strong>${t.text}</strong>`:t.isMetadata?`<span class="occupation-variant-label">${t.text}</span>`:t.text)).join("")}const h=t=>t?t.replace(/ (\([^)]+\))/g,' <span class="occupation-variant-label">$1</span>'):"";function d(t,e,r){return t===e?1:r.length>1?r.every((e=>t.includes(e)))?.98:null:t.startsWith(e)?.99:t.includes(e)?.95:null}function p(t,e){const r=t.length,n=e.length,i=Array.from({length:r+1},(()=>new Array(n+1).fill(0)));for(let t=0;t<=r;t++)i[t][0]=t;for(let t=0;t<=n;t++)i[0][t]=t;for(let o=1;o<=r;o++)for(let r=1;r<=n;r++)i[o][r]=t[o-1]===e[r-1]?i[o-1][r-1]:1+Math.min(i[o-1][r],i[o][r-1],i[o-1][r-1]);return i[r][n]}function g(t,e){const r=t.toLowerCase().trim(),n=e.toLowerCase().trim();return n.includes(" ")?p(r,n)<=Math.max(2,Math.floor(.25*r.length))&&Math.abs(r.length-n.length)<=2:null!==function(t,e){const r=t.toLowerCase(),n=e.length;let i=99;const o=Math.max(3,n-2),s=Math.min(r.length,n+2);for(let t=0;t<=r.length-o;t++)for(let n=o;n<=s&&t+n<=r.length;n++){const o=p(e,r.slice(t,t+n));o<i&&(i=o)}return i<=Math.max(2,Math.floor(.25*n))?i:null}(n,r)}function M(t,e,r){const n=function(t){return t.occupation_name_preferred_label?`${t.preferred_label||""} (${t.occupation_name_preferred_label})`:t.preferred_label||""}(t),i=a.format(t.preferred_label||"",e,t.occupation_name_preferred_label);return{id:t.id,type:t.type,preferred_label:t.preferred_label||"",rawLabel:t.preferred_label||"",displayLabel:n,highlightedLabel:f(i),displaySegments:i,weight:t.weight??0,score:r,occupationId:t.occupation_name_id,occupationLabel:t.occupation_name_preferred_label,ssyk_level_4_id:t.ssyk_level_4_id,ssyk_code_2012:t.ssyk_code_2012}}function b(t,r,n,i){if(!n)return[];if(!r||!Array.isArray(r))return e.warn("[searchConcepts] Ogiltig items array."),[];if(!t||t.length<1)return[];const o=c(t),s=o.split(" ").filter((t=>t.length>0)),a=[],l=new Set;for(const e of r){const r=d(c(e.preferred_label),o,s);null!==r&&(a.push(M(e,t,r)),l.add(e.id))}if(a.length>0)return u(a).slice(0,i);if(n){const e=n.search(o);if(0===e.length)return[];const r=e[0].score??1,s=[];let a=!1;for(const n of e){if(l.has(n.item.id))continue;const e=n.score??1,i=1-e;if(i<.4)continue;if(e>r+.12)continue;const u=c(n.item.preferred_label),f=n.item.weight??0,h=g(o,u);h&&e<=.25&&(a=!0);let d=.7*i+.1*f;h&&(d+=.12);const p=Math.min(.84,Math.max(.4,d));s.push(M(n.item,t,p)),l.add(n.item.id)}const f=u(s);if(0===f.length)return[];const h=a?Math.min(5,i):Math.min(3,i);return f.slice(0,h)}return[]}const m={toGenericItem:t=>({id:t.id,label:t.preferred_label||"",description:t.occupation_name_preferred_label,metadata:{original:t,type:t.type,ssyk_level_4_id:t.ssyk_level_4_id,weight:t.weight}}),searchResultToGenericItem(t,e){const r=a.format(t.preferred_label||"",e,t.occupation_name_preferred_label);return{id:t.id,label:t.preferred_label||"",displaySegments:r,highlightedLabel:f(r),metadata:{original:t,ssyk_level_4_id:t.ssyk_level_4_id,weight:t.weight}}},fromGenericItem:t=>({id:t.id,preferred_label:t.label,weight:t.metadata?.weight,...t.metadata?.original}),toPublicSelection(t){const e=t.id||"",r=t.preferred_label||t.rawLabel||"";if(!e)return{type:"manual-input",id:null,preferred_label:r};if("job-title"!==t.type&&"occupation-name"!==t.type)throw new Error(`Ogiltig intern yrkestyp för ${e}: ${t.type}`);const n={type:t.type,id:e,preferred_label:r};t.ssyk_code_2012&&(n.ssyk_code_2012=t.ssyk_code_2012);const i=t.occupation_name_id||t.occupationId,o=t.occupation_name_preferred_label||t.occupationLabel;return"job-title"===t.type&&i&&o&&(n.related={type:"occupation-name",id:i,preferred_label:o}),n}};class y{fuseInstance=null;items=[];constructor(e){this.items=e,this.fuseInstance=new t(e,o)}search(t,e=10){return this.fuseInstance?b(t,this.items,this.fuseInstance,e).map((t=>m.toPublicSelection(t))):[]}searchAsGeneric(t,e=10){return this.fuseInstance?b(t,this.items,this.fuseInstance,e).map((t=>({id:t.id,label:t.displayLabel,description:t.occupationLabel,group:"job-title"===t.type?"Yrke":"Yrkesgrupp",metadata:{originalResult:t,highlightedLabel:t.highlightedLabel,score:t.score,weight:t.weight}}))):[]}updateData(e){this.items=e,this.fuseInstance=new t(e,o)}}export{n as D,a as L,i as M,s as P,y as T,m as a,r as b,h as c,f as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.engine-DPT6roRm.js","sources":["src/components/job-selector/constants.ts","src/components/job-selector/logic/label-formatter.ts","src/components/job-selector/search.utils.ts","src/components/job-selector/logic/adapter.utils.ts","src/components/job-selector/logic/search.engine.ts"],"sourcesContent":["import { IFuseOptions } from 'fuse.js';\nimport { TaxonomyItem } from './types';\n\n// Minimum number of characters required to trigger search\nexport const MIN_INPUT_LENGTH = 1;\n\n// Debounce time for search input (ms)\nexport const DEBOUNCE_TIME = 100; // ms - Återställt till 250 baserat på sok-box.tsx initialt\n\n// Default maximum number of results to display\nexport const MAX_RESULTS = 10;\n\n// Configuration for Fuse.js\nexport const FUSE_OPTIONS: IFuseOptions<TaxonomyItem> = {\n keys: ['preferred_label'], // Ändrat från 'label' till 'preferred_label' för att matcha datastrukturen\n includeScore: true,\n ignoreDiacritics: true, // Lägg till för att matcha t.ex. vard -> vård\n ignoreFieldNorm: true, // Lägg till för att ignorera fältlängd vid poängsättning\n threshold: 0.6, // Behåll 0.6\n minMatchCharLength: MIN_INPUT_LENGTH, // Refererar till konstant ovan\n ignoreLocation: true, // Match anywhere in the string\n distance: 100, // Allow matches further apart\n};\n\n// UI Text Strings\nexport const PLACEHOLDER_TEXT = \"T.ex. frisör, vårdbiträde, snickare\"; // Uppdaterad standardplaceholder enligt Figma-design\nexport const NO_RESULTS_TEXT = \"Inga resultat matchade din sökning.\";\nexport const VALIDATION_ERROR_REQUIRED_FIELD = \"Du måste göra ett val\";\nexport const VALIDATION_ERROR_EMPTY_FIELD = \"Välj ett yrke från listan\";\n\n// Nya konstanter för aria-label\nexport const CLEAR_BUTTON_LABEL_TEXT = \"Rensa sökfält\";\nexport const REMOVE_ITEM_LABEL_TEXT_PREFIX = \"Ta bort\";\nexport const POSITIVE_VALIDATION_TEXT = \"Valt yrke\";\n","import { TextSegment } from '../../core-selector/types';\n\nexport const LabelFormatter = {\n format: (label: string, query: string, occupationLabel?: string): TextSegment[] => {\n // 1. Highlight the main label based on query\n const labelSegments = highlightText(label, query);\n\n // 2. Append occupation label if it exists (the \"metadata\" part)\n if (occupationLabel) {\n return [\n ...labelSegments,\n { text: ' ', isMatch: false },\n { text: `(${occupationLabel})`, isMetadata: true }\n ];\n }\n\n return labelSegments;\n }\n};\n\nfunction calculateEditDistance(a: string, b: string): number {\n const m = a.length;\n const n = b.length;\n const dp: number[][] = Array.from({ length: m + 1 }, () => new Array(n + 1).fill(0));\n for (let i = 0; i <= m; i++) dp[i][0] = i;\n for (let j = 0; j <= n; j++) dp[0][j] = j;\n for (let i = 1; i <= m; i++) {\n for (let j = 1; j <= n; j++) {\n dp[i][j] = a[i - 1] === b[j - 1]\n ? dp[i - 1][j - 1]\n : 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);\n }\n }\n return dp[m][n];\n}\n\nfunction findBestFuzzySubstring(text: string, qToken: string): { start: number; length: number } | null {\n const lowerText = text.toLowerCase();\n const targetLen = qToken.length;\n let bestDist = 99;\n let bestStart = -1;\n let bestLen = 0;\n\n const minLen = Math.max(3, targetLen - 2);\n const maxLen = Math.min(lowerText.length, targetLen + 2);\n\n for (let start = 0; start <= lowerText.length - minLen; start++) {\n for (let len = minLen; len <= maxLen && start + len <= lowerText.length; len++) {\n const sub = lowerText.slice(start, start + len);\n const dist = calculateEditDistance(qToken, sub);\n if (dist < bestDist) {\n bestDist = dist;\n bestStart = start;\n bestLen = len;\n }\n }\n }\n\n const maxAllowedDist = Math.max(2, Math.floor(targetLen * 0.25));\n if (bestDist <= maxAllowedDist && bestStart !== -1) {\n return { start: bestStart, length: bestLen };\n }\n return null;\n}\n\n/**\n * Highlights matches in text based on query.\n * Supports multi-word queries.\n */\nfunction highlightText(text: string, query: string): TextSegment[] {\n if (!text) return [];\n if (!query || query.trim().length === 0) {\n return [{ text, isMatch: false }];\n }\n\n const lowerText = text.toLowerCase();\n const tokens = query.toLowerCase().split(/\\s+/).filter(t => t.length > 0);\n\n // Set of indices in the original text that should be highlighted\n const highlightedIndices = new Set<number>();\n\n tokens.forEach(token => {\n let startIndex = 0;\n while ((startIndex = lowerText.indexOf(token, startIndex)) !== -1) {\n for (let i = 0; i < token.length; i++) {\n highlightedIndices.add(startIndex + i);\n }\n startIndex += token.length;\n }\n });\n\n if (highlightedIndices.size === 0) {\n // Fuzzy highlight fallback: Hitta bästa matchande delsträng i sammansatta ord eller felstavningar\n tokens.forEach(qToken => {\n const match = findBestFuzzySubstring(text, qToken);\n if (match) {\n for (let i = 0; i < match.length; i++) {\n highlightedIndices.add(match.start + i);\n }\n }\n });\n }\n\n if (highlightedIndices.size === 0) {\n return [{ text, isMatch: false }];\n }\n\n const segments: TextSegment[] = [];\n let currentSegmentText = '';\n let currentIsMatch = highlightedIndices.has(0);\n\n for (let i = 0; i < text.length; i++) {\n const isMatch = highlightedIndices.has(i);\n\n if (isMatch !== currentIsMatch) {\n // Push previous segment\n if (currentSegmentText.length > 0) {\n segments.push({ text: currentSegmentText, isMatch: currentIsMatch });\n }\n // Start new segment\n currentSegmentText = text[i];\n currentIsMatch = isMatch;\n } else {\n currentSegmentText += text[i];\n }\n }\n\n // Push the last segment\n if (currentSegmentText.length > 0) {\n segments.push({ text: currentSegmentText, isMatch: currentIsMatch });\n }\n\n return segments;\n}\n","// src/components/job-selector/search.utils.ts\nimport Fuse from 'fuse.js';\nimport { TaxonomyItem, SearchResult } from './types';\nimport { MIN_INPUT_LENGTH } from './constants';\nimport log from 'loglevel';\nimport { LabelFormatter } from './logic/label-formatter';\nimport { FormattedText } from '../core-selector/types';\n\nconst MAX_WEAK_FUZZY_RESULTS = 3;\nconst MIN_FUZZY_SCORE = 0.4;\nconst MAX_FUZZY_SCORE = 0.84;\n\nif (process.env.NODE_ENV === 'test') {\n log.setLevel(log.levels.SILENT);\n} else {\n log.setLevel(log.levels.DEBUG); // Set log level to DEBUG for development/testing\n}\n\nexport const normalizeForComparison = (text: string | undefined | null): string => {\n if (!text) {\n return '';\n }\n const normalized = text.toLowerCase().trim();\n return normalized;\n};\n\nexport function formatDisplayLabel(item: TaxonomyItem): string {\n if (item.occupation_name_preferred_label) {\n return `${item.preferred_label || ''} (${item.occupation_name_preferred_label})`;\n }\n return item.preferred_label || '';\n};\n\nexport function getLabel(item: TaxonomyItem): string {\n return item.preferred_label || '';\n}\n\nexport function sortResultsStrict(results: SearchResult[]): SearchResult[] {\n return results.sort((a, b) => {\n const scoreA = a.score ?? 0;\n const scoreB = b.score ?? 0;\n if (scoreA !== scoreB) {\n return scoreB - scoreA;\n }\n\n const weightA = a.weight ?? 0;\n const weightB = b.weight ?? 0;\n if (weightA !== weightB) {\n // Buggen är fixad här\n return weightB - weightA;\n }\n\n return a.displayLabel.localeCompare(b.displayLabel, 'sv');\n });\n}\n\nexport function segmentsToHtml(segments: FormattedText): string {\n return segments.map(seg => {\n if (seg.isMatch) {\n return `<strong>${seg.text}</strong>`;\n }\n if (seg.isMetadata) {\n return `<span class=\"occupation-variant-label\">${seg.text}</span>`;\n }\n return seg.text;\n }).join('');\n}\n\n// Keep export for controller compatibility (it was used there)\n// But implement using new logic or just re-export if we want to keep it simple?\n// The controller passes HTML to it.\n// Actually, `styleParentheticalText` took a string (HTML) and did regex replacement.\n// If the controller uses it on `item.displayLabel` (which is plain text usually, or mapped),\n// the controller does: `const historyItem = { ...item, highlightedLabel: styleParentheticalText(item.displayLabel) };`\n// `displayLabel` for \"Frontend (System)\" is \"Frontend (System)\".\n// If we run that through `segmentsToHtml(LabelFormatter.format(label, ''))`, we get the same result!\n// So let's re-implement `styleParentheticalText` using `LabelFormatter`.\n\nexport const styleParentheticalText = (text: string | undefined | null): string => {\n if (!text) return '';\n return text.replace(/ (\\([^)]+\\))/g, ' <span class=\"occupation-variant-label\">$1</span>');\n};\n\nfunction getDirectScore(normalizedLabel: string, normalizedQuery: string, searchTokens: string[]): number | null {\n if (normalizedLabel === normalizedQuery) {\n return 1.0;\n }\n\n if (searchTokens.length > 1) {\n return searchTokens.every(token => normalizedLabel.includes(token)) ? 0.98 : null;\n }\n\n if (normalizedLabel.startsWith(normalizedQuery)) {\n return 0.99;\n }\n\n if (normalizedLabel.includes(normalizedQuery)) {\n return 0.95;\n }\n\n return null;\n}\n\nfunction calculateEditDistance(a: string, b: string): number {\n const m = a.length;\n const n = b.length;\n const dp: number[][] = Array.from({ length: m + 1 }, () => new Array(n + 1).fill(0));\n for (let i = 0; i <= m; i++) dp[i][0] = i;\n for (let j = 0; j <= n; j++) dp[0][j] = j;\n for (let i = 1; i <= m; i++) {\n for (let j = 1; j <= n; j++) {\n dp[i][j] = a[i - 1] === b[j - 1]\n ? dp[i - 1][j - 1]\n : 1 + Math.min(dp[i - 1][j], dp[i][j - 1], dp[i - 1][j - 1]);\n }\n }\n return dp[m][n];\n}\n\nfunction findBestFuzzySubstring(text: string, qToken: string): number | null {\n const lowerText = text.toLowerCase();\n const targetLen = qToken.length;\n let bestDist = 99;\n\n const minLen = Math.max(3, targetLen - 2);\n const maxLen = Math.min(lowerText.length, targetLen + 2);\n\n for (let start = 0; start <= lowerText.length - minLen; start++) {\n for (let len = minLen; len <= maxLen && start + len <= lowerText.length; len++) {\n const sub = lowerText.slice(start, start + len);\n const dist = calculateEditDistance(qToken, sub);\n if (dist < bestDist) {\n bestDist = dist;\n }\n }\n }\n\n const maxAllowedDist = Math.max(2, Math.floor(targetLen * 0.25));\n return bestDist <= maxAllowedDist ? bestDist : null;\n}\n\nfunction isSingleWordOrCompoundRoot(query: string, label: string): boolean {\n const normQ = query.toLowerCase().trim();\n const normL = label.toLowerCase().trim();\n if (normL.includes(' ')) {\n const dist = calculateEditDistance(normQ, normL);\n return dist <= Math.max(2, Math.floor(normQ.length * 0.25)) && Math.abs(normQ.length - normL.length) <= 2;\n }\n const subDist = findBestFuzzySubstring(normL, normQ);\n return subDist !== null;\n}\n\nfunction createSearchResult(item: TaxonomyItem, query: string, score: number): SearchResult {\n const displayLabel = formatDisplayLabel(item);\n const displaySegments = LabelFormatter.format(item.preferred_label || '', query, item.occupation_name_preferred_label);\n\n return {\n id: item.id,\n type: item.type,\n preferred_label: item.preferred_label || '',\n rawLabel: item.preferred_label || '',\n displayLabel,\n highlightedLabel: segmentsToHtml(displaySegments),\n displaySegments,\n weight: item.weight ?? 0,\n score,\n occupationId: item.occupation_name_id,\n occupationLabel: item.occupation_name_preferred_label,\n ssyk_level_4_id: item.ssyk_level_4_id,\n ssyk_code_2012: item.ssyk_code_2012,\n };\n}\n\nexport function searchConcepts(\n query: string,\n items: TaxonomyItem[],\n fuseInstance: Fuse<TaxonomyItem>,\n maxResults: number\n): SearchResult[] {\n if (!fuseInstance) {\n return [];\n }\n if (!items || !Array.isArray(items)) {\n log.warn('[searchConcepts] Ogiltig items array.');\n return [];\n }\n if (!query || query.length < MIN_INPUT_LENGTH) {\n return [];\n }\n\n const normalizedQuery = normalizeForComparison(query);\n const searchTokens = normalizedQuery.split(' ').filter(t => t.length > 0);\n const directResults: SearchResult[] = [];\n const processedIds = new Set<string>();\n\n for (const item of items) {\n const normalizedLabel = normalizeForComparison(item.preferred_label);\n const score = getDirectScore(normalizedLabel, normalizedQuery, searchTokens);\n if (score !== null) {\n directResults.push(createSearchResult(item, query, score));\n processedIds.add(item.id);\n }\n }\n\n if (directResults.length > 0) {\n return sortResultsStrict(directResults).slice(0, maxResults);\n }\n\n // Fuzzy är ren fallback när inga direkta träffar finns.\n if (fuseInstance) {\n const fuseSearchOutput = fuseInstance.search(normalizedQuery);\n if (fuseSearchOutput.length === 0) {\n return [];\n }\n\n const bestRawScore = fuseSearchOutput[0].score ?? 1.0;\n const candidateResults: SearchResult[] = [];\n let hasStrongRootMatch = false;\n\n for (const fr of fuseSearchOutput) {\n if (processedIds.has(fr.item.id)) {\n continue;\n }\n\n const rawScore = fr.score ?? 1.0;\n const baseFuzzyScore = 1 - rawScore;\n if (baseFuzzyScore < MIN_FUZZY_SCORE) {\n continue;\n }\n\n // Strikt gap-filter: Tillåt aldrig träffar som har mer än 0.12 sämre råpoäng än bästa träffen\n if (rawScore > bestRawScore + 0.12) {\n continue;\n }\n\n const label = normalizeForComparison(fr.item.preferred_label);\n const weight = fr.item.weight ?? 0;\n\n // Hitta om etiketten innehåller en rotterm eller sammansatt del som matchar sökningen\n const isRootMatch = isSingleWordOrCompoundRoot(normalizedQuery, label);\n if (isRootMatch && rawScore <= 0.25) {\n hasStrongRootMatch = true;\n }\n\n let score = baseFuzzyScore * 0.70 + (weight * 0.10);\n if (isRootMatch) {\n score += 0.12;\n }\n const boundedScore = Math.min(MAX_FUZZY_SCORE, Math.max(MIN_FUZZY_SCORE, score));\n\n candidateResults.push(createSearchResult(fr.item, query, boundedScore));\n processedIds.add(fr.item.id);\n }\n\n const sortedFuzzy = sortResultsStrict(candidateResults);\n if (sortedFuzzy.length === 0) {\n return [];\n }\n\n // Dynamiskt maxantal vid fuzzy-sökningar:\n // - Stark rotmatchning (t.ex. injenjör, barlnmorska): Visa upp till 5 relevanta förslag så att fritextfältet syns utan att skrolla.\n // - Svag/osäker matchning (t.ex. böla fölkja, pensionär): Visa MAX 3 träffar.\n const limit = hasStrongRootMatch ? Math.min(5, maxResults) : Math.min(MAX_WEAK_FUZZY_RESULTS, maxResults);\n return sortedFuzzy.slice(0, limit);\n }\n\n return [];\n}\n","// src/components/job-selector/logic/adapter.utils.ts\nimport { GenericItem } from '../../core-selector/types';\nimport { TaxonomyItem, SearchResult, JobSelectionItem, JobSelectorMetadata } from '../types';\nimport { LabelFormatter } from './label-formatter';\nimport { segmentsToHtml } from '../search.utils';\n\nexport const TaxonomyAdapter = {\n /** Maps a raw TaxonomyItem to a GenericItem for the CoreSelector */\n toGenericItem(item: TaxonomyItem): GenericItem<JobSelectorMetadata> {\n return {\n id: item.id,\n label: item.preferred_label || '',\n description: item.occupation_name_preferred_label,\n metadata: {\n original: item,\n type: item.type,\n ssyk_level_4_id: item.ssyk_level_4_id,\n weight: item.weight\n }\n };\n },\n\n /** Maps a SearchResult (from our engine) to a GenericItem */\n searchResultToGenericItem(result: SearchResult, query: string): GenericItem<JobSelectorMetadata> {\n const segments = LabelFormatter.format(\n result.preferred_label || '',\n query,\n result.occupation_name_preferred_label\n );\n\n return {\n id: result.id,\n label: result.preferred_label || '',\n displaySegments: segments,\n highlightedLabel: segmentsToHtml(segments),\n metadata: {\n original: result,\n ssyk_level_4_id: result.ssyk_level_4_id,\n weight: result.weight\n }\n };\n },\n\n /** Maps a GenericItem back to our internal SearchResult format */\n fromGenericItem(item: GenericItem<JobSelectorMetadata>): Partial<SearchResult> {\n return {\n id: item.id,\n preferred_label: item.label,\n weight: item.metadata?.weight,\n ...item.metadata?.original\n };\n },\n\n /** Maps an internal item to the public event format */\n toPublicSelection(item: SearchResult | Partial<SearchResult>): JobSelectionItem {\n const id = item.id || '';\n const preferredLabel = item.preferred_label || item.rawLabel || '';\n\n if (!id) {\n return {\n type: 'manual-input',\n id: null,\n preferred_label: preferredLabel,\n };\n }\n\n if (item.type !== 'job-title' && item.type !== 'occupation-name') {\n throw new Error(`Ogiltig intern yrkestyp för ${id}: ${item.type}`);\n }\n\n const selection: JobSelectionItem = {\n type: item.type,\n id,\n preferred_label: preferredLabel,\n };\n\n if (item.ssyk_code_2012) {\n selection.ssyk_code_2012 = item.ssyk_code_2012;\n }\n\n const occupationId = item.occupation_name_id || item.occupationId;\n const occupationLabel = item.occupation_name_preferred_label || item.occupationLabel;\n if (item.type === 'job-title' && occupationId && occupationLabel) {\n selection.related = {\n type: 'occupation-name',\n id: occupationId,\n preferred_label: occupationLabel,\n };\n }\n\n return selection;\n }\n};\n","import Fuse from 'fuse.js';\nimport { TaxonomyItem, JobSelectionItem, JobSelectorMetadata } from '../types';\nimport { GenericItem } from '../../core-selector/types';\nimport { searchConcepts } from '../search.utils';\nimport { FUSE_OPTIONS } from '../constants';\nimport { TaxonomyAdapter } from './adapter.utils';\n\nexport interface IPublicSearchEngine {\n search(query: string, maxResults?: number): JobSelectionItem[];\n}\n\nexport class TaxonomySearchEngine implements IPublicSearchEngine {\n private fuseInstance: Fuse<TaxonomyItem> | null = null;\n private items: TaxonomyItem[] = [];\n\n constructor(data: TaxonomyItem[]) {\n this.items = data;\n this.fuseInstance = new Fuse(data, FUSE_OPTIONS);\n }\n\n /**\n * Public API: Performs a search and returns clean, official domain objects.\n * This is what external consumers (headless) should use.\n */\n search(query: string, maxResults: number = 10): JobSelectionItem[] {\n if (!this.fuseInstance) return [];\n\n const results = searchConcepts(query, this.items, this.fuseInstance, maxResults);\n\n // Map directly to public selection objects\n return results.map(result => TaxonomyAdapter.toPublicSelection(result));\n }\n\n /**\n * Internal API: Performs a search and returns GenericItems for the CoreSelector UI (\"Bucky\").\n * Includes highlighting, grouping and internal metadata.\n */\n searchAsGeneric(query: string, maxResults: number = 10): GenericItem<JobSelectorMetadata>[] {\n if (!this.fuseInstance) return [];\n\n // Use the existing robust search function\n const results = searchConcepts(query, this.items, this.fuseInstance, maxResults);\n\n // Adapt SearchResult -> GenericItem\n return results.map(result => ({\n id: result.id,\n label: result.displayLabel, // Use the formatted label (e.g. \"Nurse (Healthcare)\")\n description: result.occupationLabel,\n group: result.type === 'job-title' ? 'Yrke' : 'Yrkesgrupp',\n metadata: {\n originalResult: result, // Keep full original result for consumers\n highlightedLabel: result.highlightedLabel,\n score: result.score,\n weight: result.weight\n }\n }));\n }\n\n updateData(newData: TaxonomyItem[]) {\n this.items = newData;\n this.fuseInstance = new Fuse(newData, FUSE_OPTIONS);\n }\n}\n"],"names":["calculateEditDistance","findBestFuzzySubstring","Fuse"],"mappings":";;;AAGA;AACO,MAAM,gBAAgB,GAAG;AAEhC;AACO,MAAM,aAAa,GAAG,IAAI;AAEjC;AACO,MAAM,WAAW,GAAG;AAE3B;AACO,MAAM,YAAY,GAA+B;AACtD,IAAA,IAAI,EAAE,CAAC,iBAAiB,CAAC;AACzB,IAAA,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,GAAG;IACd,kBAAkB,EAAE,gBAAgB;IACpC,cAAc,EAAE,IAAI;IACpB,QAAQ,EAAE,GAAG;CACd;AAED;AACO,MAAM,gBAAgB,GAAG,sCAAsC;AAC/D,MAAM,eAAe,GAAG,qCAAqC;AAC7D,MAAM,+BAA+B,GAAG,uBAAuB;AAC/D,MAAM,4BAA4B,GAAG,2BAA2B;AAEvE;AACO,MAAM,uBAAuB,GAAG,eAAe;AAC/C,MAAM,6BAA6B,GAAG,SAAS;AAC/C,MAAM,wBAAwB,GAAG,WAAW;;AC/B5C,MAAM,cAAc,GAAG;IAC1B,MAAM,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,eAAwB,KAAmB;;QAE9E,MAAM,aAAa,GAAG,aAAa,C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AA;QAClD,IAAI,CAAC,IAAI,CAAC,YAAY;AAAE,YAAA,OAAO,EAAE;;AAGjC,QAAA,MAAM,OAAO,GAAG,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;;QAGhF,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,KAAK;YAC1B,EAAE,EAAE,MAAM,CAAC,EAAE;AACb,YAAA,KAAK,EAAE,MAAM,CAAC,YAAY;YAC1B,WAAW,EAAE,MAAM,CAAC,eAAe;AACnC,YAAA,KAAK,EAAE,MAAM,CAAC,IAAI,KAAK,WAAW,GAAG,MAAM,GAAG,YAAY;AAC1D,YAAA,QAAQ,EAAE;gBACN,cAAc,EAAE,MAAM;gBACtB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;gBACzC,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,MAAM,EAAE,MAAM,CAAC;AAClB;AACJ,SAAA,CAAC,CAAC;;AAGP,IAAA,UAAU,CAAC,OAAuB,EAAA;AAC9B,QAAA,IAAI,CAAC,KAAK,GAAG,OAAO;QACpB,IAAI,CAAC,YAAY,GAAG,IAAIA,aAAI,CAAC,OAAO,EAAE,YAAY,CAAC;;AAE1D;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taxonomy-registry-s5khf6s4.js","sources":["node_modules/loglevel/lib/loglevel.js","src/components/job-selector/taxonomy-registry.ts"],"sourcesContent":["/*\n* loglevel - https://github.com/pimterry/loglevel\n*\n* Copyright (c) 2013 Tim Perry\n* Licensed under the MIT license.\n*/\n(function (root, definition) {\n \"use strict\";\n if (typeof define === 'function' && define.amd) {\n define(definition);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = definition();\n } else {\n root.log = definition();\n }\n}(this, function () {\n \"use strict\";\n\n // Slightly dubious tricks to cut down minimized file size\n var noop = function() {};\n var undefinedType = \"undefined\";\n var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (\n /Trident\\/|MSIE /.test(window.navigator.userAgent)\n );\n\n var logMethods = [\n \"trace\",\n \"debug\",\n \"info\",\n \"warn\",\n \"error\"\n ];\n\n var _loggersByName = {};\n var defaultLogger = null;\n\n // Cross-browser bind equivalent that works at least back to IE6\n function bindMethod(obj, methodName) {\n var method = obj[methodName];\n if (typeof method.bind === 'function') {\n return method.bind(obj);\n } else {\n try {\n return Function.prototype.bind.call(method, obj);\n } catch (e) {\n // Missing bind shim or IE8 + Modernizr, fallback to wrapping\n return function() {\n return Function.prototype.apply.apply(method, [obj, arguments]);\n };\n }\n }\n }\n\n // Trace() doesn't print the message in IE, so for that case we need to wrap it\n function traceForIE() {\n if (console.log) {\n if (console.log.apply) {\n console.log.apply(console, arguments);\n } else {\n // In old IE, native console methods themselves don't have apply().\n Function.prototype.apply.apply(console.log, [console, arguments]);\n }\n }\n if (console.trace) console.trace();\n }\n\n // Build the best logging method possible for this env\n // Wherever possible we want to bind, not wrap, to preserve stack traces\n function realMethod(methodName) {\n if (methodName === 'debug') {\n methodName = 'log';\n }\n\n if (typeof console === undefinedType) {\n return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives\n } else if (methodName === 'trace' && isIE) {\n return traceForIE;\n } else if (console[methodName] !== undefined) {\n return bindMethod(console, methodName);\n } else if (console.log !== undefined) {\n return bindMethod(console, 'log');\n } else {\n return noop;\n }\n }\n\n // These private functions always need `this` to be set properly\n\n function replaceLoggingMethods() {\n /*jshint validthis:true */\n var level = this.getLevel();\n\n // Replace the actual methods.\n for (var i = 0; i < logMethods.length; i++) {\n var methodName = logMethods[i];\n this[methodName] = (i < level) ?\n noop :\n this.methodFactory(methodName, level, this.name);\n }\n\n // Define log.log as an alias for log.debug\n this.log = this.debug;\n\n // Return any important warnings.\n if (typeof console === undefinedType && level < this.levels.SILENT) {\n return \"No console available for logging\";\n }\n }\n\n // In old IE versions, the console isn't present until you first open it.\n // We build realMethod() replacements here that regenerate logging methods\n function enableLoggingWhenConsoleArrives(methodName) {\n return function () {\n if (typeof console !== undefinedType) {\n replaceLoggingMethods.call(this);\n this[methodName].apply(this, arguments);\n }\n };\n }\n\n // By default, we use closely bound real methods wherever possible, and\n // otherwise we wait for a console to appear, and then try again.\n function defaultMethodFactory(methodName, _level, _loggerName) {\n /*jshint validthis:true */\n return realMethod(methodName) ||\n enableLoggingWhenConsoleArrives.apply(this, arguments);\n }\n\n function Logger(name, factory) {\n // Private instance variables.\n var self = this;\n /**\n * The level inherited from a parent logger (or a global default). We\n * cache this here rather than delegating to the parent so that it stays\n * in sync with the actual logging methods that we have installed (the\n * parent could change levels but we might not have rebuilt the loggers\n * in this child yet).\n * @type {number}\n */\n var inheritedLevel;\n /**\n * The default level for this logger, if any. If set, this overrides\n * `inheritedLevel`.\n * @type {number|null}\n */\n var defaultLevel;\n /**\n * A user-specific level for this logger. If set, this overrides\n * `defaultLevel`.\n * @type {number|null}\n */\n var userLevel;\n\n var storageKey = \"loglevel\";\n if (typeof name === \"string\") {\n storageKey += \":\" + name;\n } else if (typeof name === \"symbol\") {\n storageKey = undefined;\n }\n\n function persistLevelIfPossible(levelNum) {\n var levelName = (logMethods[levelNum] || 'silent').toUpperCase();\n\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage[storageKey] = levelName;\n return;\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=\" + levelName + \";\";\n } catch (ignore) {}\n }\n\n function getPersistedLevel() {\n var storedLevel;\n\n if (typeof window === undefinedType || !storageKey) return;\n\n try {\n storedLevel = window.localStorage[storageKey];\n } catch (ignore) {}\n\n // Fallback to cookies if local storage gives us nothing\n if (typeof storedLevel === undefinedType) {\n try {\n var cookie = window.document.cookie;\n var cookieName = encodeURIComponent(storageKey);\n var location = cookie.indexOf(cookieName + \"=\");\n if (location !== -1) {\n storedLevel = /^([^;]+)/.exec(\n cookie.slice(location + cookieName.length + 1)\n )[1];\n }\n } catch (ignore) {}\n }\n\n // If the stored level is not valid, treat it as if nothing was stored.\n if (self.levels[storedLevel] === undefined) {\n storedLevel = undefined;\n }\n\n return storedLevel;\n }\n\n function clearPersistedLevel() {\n if (typeof window === undefinedType || !storageKey) return;\n\n // Use localStorage if available\n try {\n window.localStorage.removeItem(storageKey);\n } catch (ignore) {}\n\n // Use session cookie as fallback\n try {\n window.document.cookie =\n encodeURIComponent(storageKey) + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC\";\n } catch (ignore) {}\n }\n\n function normalizeLevel(input) {\n var level = input;\n if (typeof level === \"string\" && self.levels[level.toUpperCase()] !== undefined) {\n level = self.levels[level.toUpperCase()];\n }\n if (typeof level === \"number\" && level >= 0 && level <= self.levels.SILENT) {\n return level;\n } else {\n throw new TypeError(\"log.setLevel() called with invalid level: \" + input);\n }\n }\n\n /*\n *\n * Public logger API - see https://github.com/pimterry/loglevel for details\n *\n */\n\n self.name = name;\n\n self.levels = { \"TRACE\": 0, \"DEBUG\": 1, \"INFO\": 2, \"WARN\": 3,\n \"ERROR\": 4, \"SILENT\": 5};\n\n self.methodFactory = factory || defaultMethodFactory;\n\n self.getLevel = function () {\n if (userLevel != null) {\n return userLevel;\n } else if (defaultLevel != null) {\n return defaultLevel;\n } else {\n return inheritedLevel;\n }\n };\n\n self.setLevel = function (level, persist) {\n userLevel = normalizeLevel(level);\n if (persist !== false) { // defaults to true\n persistLevelIfPossible(userLevel);\n }\n\n // NOTE: in v2, this should call rebuild(), which updates children.\n return replaceLoggingMethods.call(self);\n };\n\n self.setDefaultLevel = function (level) {\n defaultLevel = normalizeLevel(level);\n if (!getPersistedLevel()) {\n self.setLevel(level, false);\n }\n };\n\n self.resetLevel = function () {\n userLevel = null;\n clearPersistedLevel();\n replaceLoggingMethods.call(self);\n };\n\n self.enableAll = function(persist) {\n self.setLevel(self.levels.TRACE, persist);\n };\n\n self.disableAll = function(persist) {\n self.setLevel(self.levels.SILENT, persist);\n };\n\n self.rebuild = function () {\n if (defaultLogger !== self) {\n inheritedLevel = normalizeLevel(defaultLogger.getLevel());\n }\n replaceLoggingMethods.call(self);\n\n if (defaultLogger === self) {\n for (var childName in _loggersByName) {\n _loggersByName[childName].rebuild();\n }\n }\n };\n\n // Initialize all the internal levels.\n inheritedLevel = normalizeLevel(\n defaultLogger ? defaultLogger.getLevel() : \"WARN\"\n );\n var initialLevel = getPersistedLevel();\n if (initialLevel != null) {\n userLevel = normalizeLevel(initialLevel);\n }\n replaceLoggingMethods.call(self);\n }\n\n /*\n *\n * Top-level API\n *\n */\n\n defaultLogger = new Logger();\n\n defaultLogger.getLogger = function getLogger(name) {\n if ((typeof name !== \"symbol\" && typeof name !== \"string\") || name === \"\") {\n throw new TypeError(\"You must supply a name when creating a logger.\");\n }\n\n var logger = _loggersByName[name];\n if (!logger) {\n logger = _loggersByName[name] = new Logger(\n name,\n defaultLogger.methodFactory\n );\n }\n return logger;\n };\n\n // Grab the current global log variable in case of overwrite\n var _log = (typeof window !== undefinedType) ? window.log : undefined;\n defaultLogger.noConflict = function() {\n if (typeof window !== undefinedType &&\n window.log === defaultLogger) {\n window.log = _log;\n }\n\n return defaultLogger;\n };\n\n defaultLogger.getLoggers = function getLoggers() {\n return _loggersByName;\n };\n\n // ES6 default export, for compatibility\n defaultLogger['default'] = defaultLogger;\n\n return defaultLogger;\n}));\n","import log from 'loglevel';\n\nimport { TaxonomyItem } from './types';\n\ninterface TaxonomyRegistration {\n data: TaxonomyItem[];\n metadata?: {\n labour_market_taxonomy_version?: unknown;\n };\n taxonomyVersion?: unknown;\n}\n\nlet registeredTaxonomy: TaxonomyItem[] = [];\nlet registeredVersion: string | null = null;\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction isNonEmptyString(value: unknown): value is string {\n return typeof value === 'string' && value.trim().length > 0;\n}\n\nfunction isOptionalString(value: unknown): value is string | undefined {\n return value === undefined || typeof value === 'string';\n}\n\nexport function isTaxonomyItem(value: unknown): value is TaxonomyItem {\n if (!isRecord(value)) return false;\n\n return (\n isNonEmptyString(value.id)\n && (value.type === 'job-title' || value.type === 'occupation-name')\n && isNonEmptyString(value.preferred_label)\n && isOptionalString(value.ssyk_level_4_id)\n && isOptionalString(value.ssyk_code_2012)\n && isOptionalString(value.occupation_name_id)\n && isOptionalString(value.occupation_name_preferred_label)\n && (value.weight === undefined || (typeof value.weight === 'number' && Number.isFinite(value.weight)))\n );\n}\n\nexport function isTaxonomyRegistration(value: unknown): value is TaxonomyRegistration {\n if (!isRecord(value) || !Array.isArray(value.data) || value.data.length === 0) {\n return false;\n }\n\n return value.data.every((item) => isTaxonomyItem(item));\n}\n\n/**\n * Registrerar validerad taxonomidata för webbkomponenten.\n * Ogiltig data ersätter aldrig en tidigare giltig registrering.\n */\nexport function registerTaxonomy(data: unknown): void {\n if (!isTaxonomyRegistration(data)) {\n log.error('[TaxonomyRegistry] Felaktigt format på taxonomidata vid registrering.');\n return;\n }\n\n registeredTaxonomy = data.data.map((item) => ({ ...item }));\n\n const metadataVersion = isRecord(data.metadata)\n ? data.metadata.labour_market_taxonomy_version\n : undefined;\n registeredVersion = metadataVersion !== undefined\n ? String(metadataVersion)\n : (data.taxonomyVersion !== undefined ? String(data.taxonomyVersion) : 'unknown');\n\n log.debug(`[TaxonomyRegistry] Taxonomi version ${registeredVersion} registrerades med ${registeredTaxonomy.length} yrken.`);\n}\n\n/** Hämtar den registrerade taxonomin. */\nexport function getRegisteredTaxonomy(): TaxonomyItem[] {\n if (registeredTaxonomy.length === 0) {\n log.warn('[TaxonomyRegistry] Ingen taxonomi är registrerad ännu! Anropa registerTaxonomy(data) först.');\n }\n return registeredTaxonomy;\n}\n\n/** Endast för testning: återställer registret. */\nexport function __resetRegistry(): void {\n registeredTaxonomy = [];\n registeredVersion = null;\n}\n"],"names":["define","this"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A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G,IAAI,EAAE,CAAC,CAAC;AAE3D,IAAA,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ;AAC1C,UAAE,IAAI,CAAC,QAAQ,CAAC;UACd,SAAS;IACf,iBAAiB,GAAG,eAAe,KAAK;AACpC,UAAE,MAAM,CAAC,eAAe;WACrB,IAAI,CAAC,eAAe,KAAK,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,SAAS,CAAC;IAErF,GAAG,CAAC,KAAK,CAAC,CAAA,oCAAA,EAAuC,iBAAiB,CAAA,mBAAA,EAAsB,kBAAkB,CAAC,MAAM,CAAA,OAAA,CAAS,CAAC;AAC/H;AAEA;SACgB,qBAAqB,GAAA;AACjC,IAAA,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;AACjC,QAAA,GAAG,CAAC,IAAI,CAAC,6FAA6F,CAAC;;AAE3G,IAAA,OAAO,kBAAkB;AAC7B;AAEA;SACgB,eAAe,GAAA;IAC3B,kBAAkB,GAAG,EAAE;IACvB,iBAAiB,GAAG,IAAI;AAC5B;;;;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-DHUftoZJ.js","sources":["src/components/job-selector/types.ts"],"sourcesContent":["import type { FormattedText } from '../core-selector/types';\n\nexport type ComponentStatus =\n | 'loading'\n | 'error'\n | 'searching'\n | 'showingHistory'\n | 'itemSelected'\n | 'multiSelect'\n | 'multiSelectShowingHistory';\n\nexport type ValidationStatus = 'idle' | 'error' | 'success';\n\nexport interface BaseState {\n status: ComponentStatus;\n dataSource?: 'registry' | 'api';\n dataSourceDate?: string;\n validation?: ValidationStatus;\n validationContext?: 'from-error';\n isPopularView?: boolean;\n}\n\nexport interface LoadingState extends BaseState {\n status: 'loading';\n}\n\nexport interface ErrorState extends BaseState {\n status: 'error';\n message: string;\n}\n\nexport interface SearchingState extends BaseState {\n status: 'searching';\n inputValue: string;\n suggestions: SearchResult[];\n}\n\nexport interface ShowingHistoryState extends BaseState {\n status: 'showingHistory';\n inputValue: string;\n historyItems: SearchResult[];\n validation: 'idle';\n}\n\nexport interface ItemSelectedState extends BaseState {\n status: 'itemSelected';\n selectedItem: SearchResult;\n inputValue: string;\n}\n\nexport interface MultiSelectState extends BaseState {\n status: 'multiSelect';\n inputValue: string;\n selectedItems: SearchResult[];\n suggestions: SearchResult[];\n}\n\nexport interface MultiSelectShowingHistoryState extends BaseState {\n status: 'multiSelectShowingHistory';\n inputValue: string;\n selectedItems: SearchResult[];\n historyItems: SearchResult[];\n}\n\nexport type ComponentState =\n | LoadingState\n | ErrorState\n | SearchingState\n | ShowingHistoryState\n | ItemSelectedState\n | MultiSelectState\n | MultiSelectShowingHistoryState;\n\nexport interface TaxonomyItem {\n id: string;\n type: 'job-title' | 'occupation-name';\n preferred_label: string;\n ssyk_level_4_id?: string;\n ssyk_code_2012?: string;\n occupation_name_id?: string;\n occupation_name_preferred_label?: string;\n weight?: number;\n}\n\nexport interface SearchResult extends Omit<TaxonomyItem, 'type'> {\n type: TaxonomyItem['type'] | 'ManualInput' | 'unknown';\n rawLabel: string;\n displayLabel: string;\n highlightedLabel: string;\n score: number;\n displaySegments?: FormattedText;\n occupationLabel?: string;\n occupationId?: string;\n isSelected?: boolean;\n weight?: number;\n}\n\nexport interface JobSelectorMetadata {\n original?: SearchResult | TaxonomyItem;\n originalResult?: SearchResult;\n type?: string;\n weight?: number;\n [key: string]: unknown;\n}\n\nexport interface RawTaxonomyDataResponse {\n concepts: TaxonomyItem[];\n}\n\nexport interface OccupationNameSelectionItem {\n type: 'occupation-name';\n id: string;\n preferred_label: string;\n}\n\nexport type JobSelectionItem =\n | {\n type: 'job-title' | 'occupation-name';\n id: string;\n preferred_label: string;\n ssyk_code_2012?: string;\n related?: OccupationNameSelectionItem;\n }\n | {\n type: 'manual-input';\n id: null;\n preferred_label: string;\n };\n\nexport type JobSelectionReference =\n | { id: string }\n | Extract<JobSelectionItem, { type: 'manual-input' }>;\n\nexport type JobSelectionInput = string | string[] | JobSelectionItem[];\n\nexport type InvalidSelectionErrorCode =\n | 'unknown-id'\n | 'invalid-input'\n | 'manual-input-disabled'\n | 'multiple-disabled';\n\nexport class InvalidSelectionError extends Error {\n readonly code: InvalidSelectionErrorCode;\n readonly invalidIds?: string[];\n\n constructor(\n message: string,\n code: InvalidSelectionErrorCode,\n invalidIds?: string[]\n ) {\n super(message);\n this.name = 'InvalidSelectionError';\n this.code = code;\n this.invalidIds = invalidIds;\n }\n}\n"],"names":[],"mappings":"AA6IM,MAAO,qBAAsB,SAAQ,KAAK,CAAA;AACrC,IAAA,IAAI;AACJ,IAAA,UAAU;AAEnB,IAAA,WAAA,CACE,OAAe,EACf,IAA+B,EAC/B,UAAqB,EAAA;QAErB,KAAK,CAAC,OAAO,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,uBAAuB;AACnC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;AAChB,QAAA,IAAI,CAAC,UAAU,GAAG,UAAU;;AAE/B;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body.modal-open{overflow:hidden}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,g as a,b as l}from"./p-CGXZllj2.js";export{s as setNonce}from"./p-CGXZllj2.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await a(),l([["p-16636162",[[512,"job-selector-demo",{afHideHeader:[4,"af-hide-header"],afHidePreamble:[4,"af-hide-preamble"],variant:[32],version:[32],required:[32],allowFreeText:[32],history:[32],size:[32],framework:[32],codeInstallationMode:[32],lastSingleSelection:[32],lastMultiSelection:[32],implementationCode:[32],readmeMainContent:[32],readmeCodeContent:[32],availableYvVersions:[32],latestYvDataVersion:[32],latestVersion:[32],latestDate:[32],latestType:[32],latestChanges:[32],isTaxonomyLoading:[32]},[[0,"afJobSelected","handleSelection"]]]]],["p-273cf6df",[[513,"geo-valjaren",{label:[513,"af-label"],placeholder:[513,"af-placeholder"],selectorState:[32]},[[0,"csInput","handleInput"],[0,"csFocus","handleFocus"],[0,"csRequestHistory","handleRequestHistory"],[0,"csSelect","handleSelect"],[0,"csBlur","handleBlur"],[0,"csClear","handleClear"],[0,"csClearHistory","handleCsClearHistory"],[0,"csEditSelection","handleEdit"]]]]],["p-aef7b5ae",[[513,"neobrutal-search",{engine:[32],results:[32],inputValue:[32],isLoading:[32],error:[32],selectedItem:[32],isFlipped:[32]}]]],["p-b0f16abd",[[785,"core-selector",{state:[16],config:[16],label:[1],labelDescription:[1,"label-description"],componentId:[1,"component-id"],size:[513,"cs-size"],afFocused:[4,"af-focused"],activeIndex:[32],isFocusedInternal:[32],isNavigatingWithKeyboard:[32],setFocus:[64]},null,{afFocused:[{handleAfFocusedChange:0}],config:[{handleConfigChange:0}],state:[{handleStateChange:0}]}]]],["p-9e48afa4",[[593,"digi-service-job-selector",{name:[513],taxonomyUrl:[513,"af-taxonomy-url"],placeholder:[513,"af-placeholder"],label:[513,"af-label"],disabled:[516],enableMultiple:[516,"af-enable-multiple"],showSearchIcon:[516,"af-show-search-icon"],errorMessage:[513,"af-error-message"],labelDescription:[513,"af-label-description"],required:[516,"af-required"],manualInput:[516,"af-manual-input"],history:[516,"af-history"],popular:[516,"af-popular"],size:[513,"af-size"],taxonomyData:[1040],afFocused:[32],state:[32],activeErrorType:[32],animatingItemId:[32],updateData:[64],setSelection:[64],setFocus:[64],validate:[64],checkValidity:[64],reportValidity:[64],getValidity:[64],getValidationMessage:[64]},[[0,"afJobValidationChange","handleFormValidationSync"],[8,"hashchange","handleHashFocus"],[0,"csInput","handleInput"],[0,"csSelect","handleCsSelect"],[0,"csClear","handleCsClear"],[0,"csClearHistory","handleCsClearHistory"],[0,"csRequestHistory","handleCsRequestHistory"],[0,"csLoadMore","handleCsLoadMore"],[0,"csRemoveItem","handleCsRemoveItem"],[0,"csFocus","handleCsFocus"],[0,"csBlur","handleCsBlur"],[0,"csEditSelection","handleCsEditSelection"]],{required:[{watchRequired:0}],manualInput:[{watchManualInput:0}],history:[{watchHistory:0}],popular:[{watchPopular:0}],enableMultiple:[{watchEnableMultiple:0}],disabled:[{watchDisabled:0}],taxonomyData:[{watchTaxonomyData:0}]}]]]],e))));
|