@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.
Files changed (146) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +369 -0
  3. package/dist/cjs/af-validation-message-BzY5H0xU.js +16 -0
  4. package/dist/cjs/core-selector.cjs.entry.js +476 -0
  5. package/dist/cjs/digi-service-job-selector.cjs.entry.js +1619 -0
  6. package/dist/cjs/fuse-BTLNKxuL.js +1631 -0
  7. package/dist/cjs/geo-valjaren.cjs.entry.js +14910 -0
  8. package/dist/cjs/index-BOuTGlEp.js +1817 -0
  9. package/dist/cjs/index.cjs.js +14 -0
  10. package/dist/cjs/job-selector-demo.cjs.entry.js +692 -0
  11. package/dist/cjs/loader.cjs.js +12 -0
  12. package/dist/cjs/neobrutal-search.cjs.entry.js +171 -0
  13. package/dist/cjs/search.engine-D0cMelRi.js +489 -0
  14. package/dist/cjs/taxonomy-registry-DVmuDUpM.js +435 -0
  15. package/dist/cjs/types-CtHBl6Ra.js +14 -0
  16. package/dist/cjs/yrkesvaljaren.cjs.js +24 -0
  17. package/dist/collection/collection-manifest.json +15 -0
  18. package/dist/collection/components/core-selector/core-selector.css +803 -0
  19. package/dist/collection/components/core-selector/core-selector.js +761 -0
  20. package/dist/collection/components/core-selector/types.js +1 -0
  21. package/dist/collection/components/design-compat/af-icon.js +13 -0
  22. package/dist/collection/components/design-compat/af-label.js +2 -0
  23. package/dist/collection/components/design-compat/af-tag.js +6 -0
  24. package/dist/collection/components/design-compat/af-validation-message.js +11 -0
  25. package/dist/collection/components/design-compat/index.js +4 -0
  26. package/dist/collection/components/geovaljaren/geovaljaren.css +21 -0
  27. package/dist/collection/components/geovaljaren/geovaljaren.js +304 -0
  28. package/dist/collection/components/geovaljaren/logic/adapter.utils.js +20 -0
  29. package/dist/collection/components/geovaljaren/logic/data.utils.js +12 -0
  30. package/dist/collection/components/geovaljaren/logic/history-service.js +25 -0
  31. package/dist/collection/components/geovaljaren/logic/search.engine.js +28 -0
  32. package/dist/collection/components/job-selector/constants.js +26 -0
  33. package/dist/collection/components/job-selector/history-service.js +41 -0
  34. package/dist/collection/components/job-selector/job-selector-controller.js +835 -0
  35. package/dist/collection/components/job-selector/job-selector.css +318 -0
  36. package/dist/collection/components/job-selector/job-selector.js +1378 -0
  37. package/dist/collection/components/job-selector/keyboard-handlers.js +84 -0
  38. package/dist/collection/components/job-selector/logic/adapter.utils.js +75 -0
  39. package/dist/collection/components/job-selector/logic/label-formatter.js +118 -0
  40. package/dist/collection/components/job-selector/logic/search.engine.js +50 -0
  41. package/dist/collection/components/job-selector/search-logic.js +35 -0
  42. package/dist/collection/components/job-selector/search.utils.js +224 -0
  43. package/dist/collection/components/job-selector/suggestions-list.js +31 -0
  44. package/dist/collection/components/job-selector/taxonomy-registry.js +60 -0
  45. package/dist/collection/components/job-selector/test-data.mock.js +33 -0
  46. package/dist/collection/components/job-selector/types.js +10 -0
  47. package/dist/collection/components/job-selector/validation-message.js +24 -0
  48. package/dist/collection/demo-data.js +20 -0
  49. package/dist/collection/index.js +7 -0
  50. package/dist/collection/verkstad/verkstad.js +407 -0
  51. package/dist/components/core-selector.d.ts +11 -0
  52. package/dist/components/core-selector.js +1 -0
  53. package/dist/components/core-selector2.js +1 -0
  54. package/dist/components/digi-service-job-selector.d.ts +11 -0
  55. package/dist/components/digi-service-job-selector.js +1 -0
  56. package/dist/components/fuse.js +1 -0
  57. package/dist/components/geo-valjaren.d.ts +11 -0
  58. package/dist/components/geo-valjaren.js +1 -0
  59. package/dist/components/index.d.ts +35 -0
  60. package/dist/components/index.js +1 -0
  61. package/dist/components/job-selector-demo.d.ts +11 -0
  62. package/dist/components/job-selector-demo.js +1 -0
  63. package/dist/components/job-selector.js +1 -0
  64. package/dist/components/neobrutal-search.d.ts +11 -0
  65. package/dist/components/neobrutal-search.js +1 -0
  66. package/dist/components/search.engine.js +1 -0
  67. package/dist/components/types.js +1 -0
  68. package/dist/esm/af-validation-message-F8NIH2rC.js +14 -0
  69. package/dist/esm/core-selector.entry.js +474 -0
  70. package/dist/esm/digi-service-job-selector.entry.js +1617 -0
  71. package/dist/esm/fuse-BPnhMTul.js +1629 -0
  72. package/dist/esm/geo-valjaren.entry.js +14908 -0
  73. package/dist/esm/index-CGXZllj2.js +1806 -0
  74. package/dist/esm/index.js +10 -0
  75. package/dist/esm/job-selector-demo.entry.js +690 -0
  76. package/dist/esm/loader.js +10 -0
  77. package/dist/esm/neobrutal-search.entry.js +169 -0
  78. package/dist/esm/search.engine-nZ7AcXba.js +479 -0
  79. package/dist/esm/taxonomy-registry-Dw0VR9Aw.js +430 -0
  80. package/dist/esm/types-DHUftoZJ.js +12 -0
  81. package/dist/esm/yrkesvaljaren.js +20 -0
  82. package/dist/index.cjs.js +1 -0
  83. package/dist/index.js +1 -0
  84. package/dist/types/components/core-selector/core-selector.d.ts +46 -0
  85. package/dist/types/components/core-selector/types.d.ts +1 -0
  86. package/dist/types/components/design-compat/af-icon.d.ts +7 -0
  87. package/dist/types/components/design-compat/af-label.d.ts +8 -0
  88. package/dist/types/components/design-compat/af-tag.d.ts +8 -0
  89. package/dist/types/components/design-compat/af-validation-message.d.ts +9 -0
  90. package/dist/types/components/design-compat/index.d.ts +5 -0
  91. package/dist/types/components/geovaljaren/geovaljaren.d.ts +24 -0
  92. package/dist/types/components/geovaljaren/logic/adapter.utils.d.ts +7 -0
  93. package/dist/types/components/geovaljaren/logic/data.utils.d.ts +7 -0
  94. package/dist/types/components/geovaljaren/logic/history-service.d.ts +6 -0
  95. package/dist/types/components/geovaljaren/logic/search.engine.d.ts +7 -0
  96. package/dist/types/components/job-selector/ambient.d.ts +4 -0
  97. package/dist/types/components/job-selector/constants.d.ts +13 -0
  98. package/dist/types/components/job-selector/history-service.d.ts +6 -0
  99. package/dist/types/components/job-selector/job-selector-controller.d.ts +82 -0
  100. package/dist/types/components/job-selector/job-selector.d.ts +140 -0
  101. package/dist/types/components/job-selector/keyboard-handlers.d.ts +13 -0
  102. package/dist/types/components/job-selector/logic/adapter.utils.d.ts +12 -0
  103. package/dist/types/components/job-selector/logic/label-formatter.d.ts +4 -0
  104. package/dist/types/components/job-selector/logic/search.engine.d.ts +21 -0
  105. package/dist/types/components/job-selector/search-logic.d.ts +17 -0
  106. package/dist/types/components/job-selector/search.utils.d.ts +10 -0
  107. package/dist/types/components/job-selector/suggestions-list.d.ts +13 -0
  108. package/dist/types/components/job-selector/taxonomy-registry.d.ts +20 -0
  109. package/dist/types/components/job-selector/test-data.mock.d.ts +7 -0
  110. package/dist/types/components/job-selector/types.d.ts +107 -0
  111. package/dist/types/components/job-selector/validation-message.d.ts +8 -0
  112. package/dist/types/components/job-selector-demo/job-selector-demo.d.ts +55 -0
  113. package/dist/types/components/neobrutal-search/neobrutal-search.d.ts +18 -0
  114. package/dist/types/components.d.ts +425 -0
  115. package/dist/types/demo-data.d.ts +16 -0
  116. package/dist/types/index.d.ts +5 -0
  117. package/dist/types/stencil-public-runtime.d.ts +1873 -0
  118. package/dist/types/verkstad/verkstad.d.ts +1 -0
  119. package/dist/yrkesvaljaren/fuse-B0eHOxow.js.map +1 -0
  120. package/dist/yrkesvaljaren/index-Cy4BCo5s.js.map +1 -0
  121. package/dist/yrkesvaljaren/index-DfJXTQqL.js.map +1 -0
  122. package/dist/yrkesvaljaren/index.esm.js +1 -0
  123. package/dist/yrkesvaljaren/index.esm.js.map +1 -0
  124. package/dist/yrkesvaljaren/p-16636162.entry.js +1 -0
  125. package/dist/yrkesvaljaren/p-273cf6df.entry.js +1 -0
  126. package/dist/yrkesvaljaren/p-9e48afa4.entry.js +1 -0
  127. package/dist/yrkesvaljaren/p-BPnhMTul.js +1 -0
  128. package/dist/yrkesvaljaren/p-CGXZllj2.js +3 -0
  129. package/dist/yrkesvaljaren/p-DHUftoZJ.js +1 -0
  130. package/dist/yrkesvaljaren/p-DYFAzvqX.js +1 -0
  131. package/dist/yrkesvaljaren/p-Dw0VR9Aw.js +1 -0
  132. package/dist/yrkesvaljaren/p-aef7b5ae.entry.js +1 -0
  133. package/dist/yrkesvaljaren/p-b0f16abd.entry.js +1 -0
  134. package/dist/yrkesvaljaren/p-uBrs3sSs.js +1 -0
  135. package/dist/yrkesvaljaren/search.engine-DPT6roRm.js.map +1 -0
  136. package/dist/yrkesvaljaren/taxonomy-registry-s5khf6s4.js.map +1 -0
  137. package/dist/yrkesvaljaren/types-DHUftoZJ.js.map +1 -0
  138. package/dist/yrkesvaljaren/yrkesvaljaren.css +1 -0
  139. package/dist/yrkesvaljaren/yrkesvaljaren.esm.js +1 -0
  140. package/dist/yrkesvaljaren/yrkesvaljaren.esm.js.map +1 -0
  141. package/loader/cdn.js +1 -0
  142. package/loader/index.cjs.js +1 -0
  143. package/loader/index.d.ts +24 -0
  144. package/loader/index.es2017.js +1 -0
  145. package/loader/index.js +2 -0
  146. package/package.json +126 -0
@@ -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,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface GeoValjaren extends Components.GeoValjaren, HTMLElement {}
4
+ export const GeoValjaren: {
5
+ prototype: GeoValjaren;
6
+ new (): GeoValjaren;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;